From bf2c1481db0cc8011a81aa709e9e84a4578faeca Mon Sep 17 00:00:00 2001 From: Monod Olivier Date: Tue, 28 Feb 2023 17:00:51 +0100 Subject: [PATCH 01/17] wip: integrate advanced geometry plugin --- .../js/advanced-geometry-edition/aerial.svg | 9 + .../js/advanced-geometry-edition/base.svg | 9 + .../js/advanced-geometry-edition/border.json | 34 + .../geocity-wc-map.js | 23447 ++++++++++++++++ geocity/apps/submissions/forms.py | 4 +- .../advancedgeometrywidget.html | 94 + geocity/fields.py | 36 + 7 files changed, 23631 insertions(+), 2 deletions(-) create mode 100644 geocity/apps/core/static/libs/js/advanced-geometry-edition/aerial.svg create mode 100644 geocity/apps/core/static/libs/js/advanced-geometry-edition/base.svg create mode 100644 geocity/apps/core/static/libs/js/advanced-geometry-edition/border.json create mode 100644 geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js create mode 100644 geocity/apps/submissions/templates/advancedgeometrywidget/advancedgeometrywidget.html diff --git a/geocity/apps/core/static/libs/js/advanced-geometry-edition/aerial.svg b/geocity/apps/core/static/libs/js/advanced-geometry-edition/aerial.svg new file mode 100644 index 000000000..beb07016f --- /dev/null +++ b/geocity/apps/core/static/libs/js/advanced-geometry-edition/aerial.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/geocity/apps/core/static/libs/js/advanced-geometry-edition/base.svg b/geocity/apps/core/static/libs/js/advanced-geometry-edition/base.svg new file mode 100644 index 000000000..d53f5d4d2 --- /dev/null +++ b/geocity/apps/core/static/libs/js/advanced-geometry-edition/base.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/geocity/apps/core/static/libs/js/advanced-geometry-edition/border.json b/geocity/apps/core/static/libs/js/advanced-geometry-edition/border.json new file mode 100644 index 000000000..81cd3c916 --- /dev/null +++ b/geocity/apps/core/static/libs/js/advanced-geometry-edition/border.json @@ -0,0 +1,34 @@ +{ + "type": "FeatureCollection", + "crs": { "type": "name", "properties": { "name": "EPSG:2056" } }, + "features": [ + { + "type": "Feature", + "properties": { "name": "Démo Yverdon" }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + [ + [ + [2538391.0, 1176432.0], + [2538027.0, 1178201.0], + [2538485.0, 1178804.0], + [2537777.0, 1179199.0], + [2536748.0, 1178450.0], + [2536123.0, 1179647.0], + [2537382.0, 1180593.0], + [2537143.0, 1181623.0], + [2538651.0, 1183257.0], + [2540368.0, 1183236.0], + [2541252.0, 1181093.0], + [2541460.0, 1180458.0], + [2540160.0, 1179543.0], + [2540097.0, 1178877.0], + [2538391.0, 1176432.0] + ] + ] + ] + } + } + ] +} diff --git a/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js b/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js new file mode 100644 index 000000000..06bbd619f --- /dev/null +++ b/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js @@ -0,0 +1,23447 @@ +/** + * @license + * Copyright 2019 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const Wr = window, ul = Wr.ShadowRoot && (Wr.ShadyCSS === void 0 || Wr.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Pu = Symbol(), Sh = /* @__PURE__ */ new WeakMap(); +class yg { + constructor(t, e, i) { + if (this._$cssResult$ = !0, i !== Pu) + throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); + this.cssText = t, this.t = e; + } + get styleSheet() { + let t = this.o; + const e = this.t; + if (ul && t === void 0) { + const i = e !== void 0 && e.length === 1; + i && (t = Sh.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Sh.set(e, t)); + } + return t; + } + toString() { + return this.cssText; + } +} +const Mt = (n) => new yg(typeof n == "string" ? n : n + "", void 0, Pu), vg = (n, t) => { + ul ? n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => { + const i = document.createElement("style"), s = Wr.litNonce; + s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, n.appendChild(i); + }); +}, Rh = ul ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => { + let e = ""; + for (const i of t.cssRules) + e += i.cssText; + return Mt(e); +})(n) : n; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +var Jo; +const qr = window, Th = qr.trustedTypes, xg = Th ? Th.emptyScript : "", bh = qr.reactiveElementPolyfillSupport, Ta = { toAttribute(n, t) { + switch (t) { + case Boolean: + n = n ? xg : null; + break; + case Object: + case Array: + n = n == null ? n : JSON.stringify(n); + } + return n; +}, fromAttribute(n, t) { + let e = n; + switch (t) { + case Boolean: + e = n !== null; + break; + case Number: + e = n === null ? null : Number(n); + break; + case Object: + case Array: + try { + e = JSON.parse(n); + } catch { + e = null; + } + } + return e; +} }, Au = (n, t) => t !== n && (t == t || n == n), Qo = { attribute: !0, type: String, converter: Ta, reflect: !1, hasChanged: Au }; +class Sn extends HTMLElement { + constructor() { + super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u(); + } + static addInitializer(t) { + var e; + this.finalize(), ((e = this.h) !== null && e !== void 0 ? e : this.h = []).push(t); + } + static get observedAttributes() { + this.finalize(); + const t = []; + return this.elementProperties.forEach((e, i) => { + const s = this._$Ep(i, e); + s !== void 0 && (this._$Ev.set(s, i), t.push(s)); + }), t; + } + static createProperty(t, e = Qo) { + if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) { + const i = typeof t == "symbol" ? Symbol() : "__" + t, s = this.getPropertyDescriptor(t, i, e); + s !== void 0 && Object.defineProperty(this.prototype, t, s); + } + } + static getPropertyDescriptor(t, e, i) { + return { get() { + return this[e]; + }, set(s) { + const r = this[t]; + this[e] = s, this.requestUpdate(t, r, i); + }, configurable: !0, enumerable: !0 }; + } + static getPropertyOptions(t) { + return this.elementProperties.get(t) || Qo; + } + static finalize() { + if (this.hasOwnProperty("finalized")) + return !1; + this.finalized = !0; + const t = Object.getPrototypeOf(this); + if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) { + const e = this.properties, i = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)]; + for (const s of i) + this.createProperty(s, e[s]); + } + return this.elementStyles = this.finalizeStyles(this.styles), !0; + } + static finalizeStyles(t) { + const e = []; + if (Array.isArray(t)) { + const i = new Set(t.flat(1 / 0).reverse()); + for (const s of i) + e.unshift(Rh(s)); + } else + t !== void 0 && e.push(Rh(t)); + return e; + } + static _$Ep(t, e) { + const i = e.attribute; + return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0; + } + u() { + var t; + this._$E_ = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach((e) => e(this)); + } + addController(t) { + var e, i; + ((e = this._$ES) !== null && e !== void 0 ? e : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((i = t.hostConnected) === null || i === void 0 || i.call(t)); + } + removeController(t) { + var e; + (e = this._$ES) === null || e === void 0 || e.splice(this._$ES.indexOf(t) >>> 0, 1); + } + _$Eg() { + this.constructor.elementProperties.forEach((t, e) => { + this.hasOwnProperty(e) && (this._$Ei.set(e, this[e]), delete this[e]); + }); + } + createRenderRoot() { + var t; + const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions); + return vg(e, this.constructor.elementStyles), e; + } + connectedCallback() { + var t; + this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach((e) => { + var i; + return (i = e.hostConnected) === null || i === void 0 ? void 0 : i.call(e); + }); + } + enableUpdating(t) { + } + disconnectedCallback() { + var t; + (t = this._$ES) === null || t === void 0 || t.forEach((e) => { + var i; + return (i = e.hostDisconnected) === null || i === void 0 ? void 0 : i.call(e); + }); + } + attributeChangedCallback(t, e, i) { + this._$AK(t, i); + } + _$EO(t, e, i = Qo) { + var s; + const r = this.constructor._$Ep(t, i); + if (r !== void 0 && i.reflect === !0) { + const o = (((s = i.converter) === null || s === void 0 ? void 0 : s.toAttribute) !== void 0 ? i.converter : Ta).toAttribute(e, i.type); + this._$El = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$El = null; + } + } + _$AK(t, e) { + var i; + const s = this.constructor, r = s._$Ev.get(t); + if (r !== void 0 && this._$El !== r) { + const o = s.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((i = o.converter) === null || i === void 0 ? void 0 : i.fromAttribute) !== void 0 ? o.converter : Ta; + this._$El = r, this[r] = a.fromAttribute(e, o.type), this._$El = null; + } + } + requestUpdate(t, e, i) { + let s = !0; + t !== void 0 && (((i = i || this.constructor.getPropertyOptions(t)).hasChanged || Au)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, i))) : s = !1), !this.isUpdatePending && s && (this._$E_ = this._$Ej()); + } + async _$Ej() { + this.isUpdatePending = !0; + try { + await this._$E_; + } catch (e) { + Promise.reject(e); + } + const t = this.scheduleUpdate(); + return t != null && await t, !this.isUpdatePending; + } + scheduleUpdate() { + return this.performUpdate(); + } + performUpdate() { + var t; + if (!this.isUpdatePending) + return; + this.hasUpdated, this._$Ei && (this._$Ei.forEach((s, r) => this[r] = s), this._$Ei = void 0); + let e = !1; + const i = this._$AL; + try { + e = this.shouldUpdate(i), e ? (this.willUpdate(i), (t = this._$ES) === null || t === void 0 || t.forEach((s) => { + var r; + return (r = s.hostUpdate) === null || r === void 0 ? void 0 : r.call(s); + }), this.update(i)) : this._$Ek(); + } catch (s) { + throw e = !1, this._$Ek(), s; + } + e && this._$AE(i); + } + willUpdate(t) { + } + _$AE(t) { + var e; + (e = this._$ES) === null || e === void 0 || e.forEach((i) => { + var s; + return (s = i.hostUpdated) === null || s === void 0 ? void 0 : s.call(i); + }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t); + } + _$Ek() { + this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1; + } + get updateComplete() { + return this.getUpdateComplete(); + } + getUpdateComplete() { + return this._$E_; + } + shouldUpdate(t) { + return !0; + } + update(t) { + this._$EC !== void 0 && (this._$EC.forEach((e, i) => this._$EO(i, this[i], e)), this._$EC = void 0), this._$Ek(); + } + updated(t) { + } + firstUpdated(t) { + } +} +Sn.finalized = !0, Sn.elementProperties = /* @__PURE__ */ new Map(), Sn.elementStyles = [], Sn.shadowRootOptions = { mode: "open" }, bh == null || bh({ ReactiveElement: Sn }), ((Jo = qr.reactiveElementVersions) !== null && Jo !== void 0 ? Jo : qr.reactiveElementVersions = []).push("1.5.0"); +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +var ta; +const Kr = window, Vn = Kr.trustedTypes, Lh = Vn ? Vn.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, ni = `lit$${(Math.random() + "").slice(9)}$`, dl = "?" + ni, Cg = `<${dl}>`, Un = document, Ps = (n = "") => Un.createComment(n), As = (n) => n === null || typeof n != "object" && typeof n != "function", Ou = Array.isArray, Fu = (n) => Ou(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", fs = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ih = /-->/g, Ph = />/g, $i = RegExp(`>|[ +\f\r](?:([^\\s"'>=/]+)([ +\f\r]*=[ +\f\r]*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`, "g"), Ah = /'/g, Oh = /"/g, Nu = /^(?:script|style|textarea|title)$/i, Mg = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), Lt = Mg(1), bi = Symbol.for("lit-noChange"), bt = Symbol.for("lit-nothing"), Fh = /* @__PURE__ */ new WeakMap(), $n = Un.createTreeWalker(Un, 129, null, !1), Du = (n, t) => { + const e = n.length - 1, i = []; + let s, r = t === 2 ? "" : "", o = fs; + for (let l = 0; l < e; l++) { + const h = n[l]; + let c, u, d = -1, f = 0; + for (; f < h.length && (o.lastIndex = f, u = o.exec(h), u !== null); ) + f = o.lastIndex, o === fs ? u[1] === "!--" ? o = Ih : u[1] !== void 0 ? o = Ph : u[2] !== void 0 ? (Nu.test(u[2]) && (s = RegExp("" ? (o = s != null ? s : fs, d = -1) : u[1] === void 0 ? d = -2 : (d = o.lastIndex - u[2].length, c = u[1], o = u[3] === void 0 ? $i : u[3] === '"' ? Oh : Ah) : o === Oh || o === Ah ? o = $i : o === Ih || o === Ph ? o = fs : (o = $i, s = void 0); + const g = o === $i && n[l + 1].startsWith("/>") ? " " : ""; + r += o === fs ? h + Cg : d >= 0 ? (i.push(c), h.slice(0, d) + "$lit$" + h.slice(d) + ni + g) : h + ni + (d === -2 ? (i.push(void 0), l) : g); + } + const a = r + (n[e] || "") + (t === 2 ? "" : ""); + if (!Array.isArray(n) || !n.hasOwnProperty("raw")) + throw Error("invalid template strings array"); + return [Lh !== void 0 ? Lh.createHTML(a) : a, i]; +}; +class Os { + constructor({ strings: t, _$litType$: e }, i) { + let s; + this.parts = []; + let r = 0, o = 0; + const a = t.length - 1, l = this.parts, [h, c] = Du(t, e); + if (this.el = Os.createElement(h, i), $n.currentNode = this.el.content, e === 2) { + const u = this.el.content, d = u.firstChild; + d.remove(), u.append(...d.childNodes); + } + for (; (s = $n.nextNode()) !== null && l.length < a; ) { + if (s.nodeType === 1) { + if (s.hasAttributes()) { + const u = []; + for (const d of s.getAttributeNames()) + if (d.endsWith("$lit$") || d.startsWith(ni)) { + const f = c[o++]; + if (u.push(d), f !== void 0) { + const g = s.getAttribute(f.toLowerCase() + "$lit$").split(ni), m = /([.?@])?(.*)/.exec(f); + l.push({ type: 1, index: r, name: m[2], strings: g, ctor: m[1] === "." ? Gu : m[1] === "?" ? $u : m[1] === "@" ? Bu : qs }); + } else + l.push({ type: 6, index: r }); + } + for (const d of u) + s.removeAttribute(d); + } + if (Nu.test(s.tagName)) { + const u = s.textContent.split(ni), d = u.length - 1; + if (d > 0) { + s.textContent = Vn ? Vn.emptyScript : ""; + for (let f = 0; f < d; f++) + s.append(u[f], Ps()), $n.nextNode(), l.push({ type: 2, index: ++r }); + s.append(u[d], Ps()); + } + } + } else if (s.nodeType === 8) + if (s.data === dl) + l.push({ type: 2, index: r }); + else { + let u = -1; + for (; (u = s.data.indexOf(ni, u + 1)) !== -1; ) + l.push({ type: 7, index: r }), u += ni.length - 1; + } + r++; + } + } + static createElement(t, e) { + const i = Un.createElement("template"); + return i.innerHTML = t, i; + } +} +function Qi(n, t, e = n, i) { + var s, r, o, a; + if (t === bi) + return t; + let l = i !== void 0 ? (s = e._$Co) === null || s === void 0 ? void 0 : s[i] : e._$Cl; + const h = As(t) ? void 0 : t._$litDirective$; + return (l == null ? void 0 : l.constructor) !== h && ((r = l == null ? void 0 : l._$AO) === null || r === void 0 || r.call(l, !1), h === void 0 ? l = void 0 : (l = new h(n), l._$AT(n, e, i)), i !== void 0 ? ((o = (a = e)._$Co) !== null && o !== void 0 ? o : a._$Co = [])[i] = l : e._$Cl = l), l !== void 0 && (t = Qi(n, l._$AS(n, t.values), l, i)), t; +} +class ku { + constructor(t, e) { + this.u = [], this._$AN = void 0, this._$AD = t, this._$AM = e; + } + get parentNode() { + return this._$AM.parentNode; + } + get _$AU() { + return this._$AM._$AU; + } + v(t) { + var e; + const { el: { content: i }, parts: s } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : Un).importNode(i, !0); + $n.currentNode = r; + let o = $n.nextNode(), a = 0, l = 0, h = s[0]; + for (; h !== void 0; ) { + if (a === h.index) { + let c; + h.type === 2 ? c = new ns(o, o.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(o, h.name, h.strings, this, t) : h.type === 6 && (c = new zu(o, this, t)), this.u.push(c), h = s[++l]; + } + a !== (h == null ? void 0 : h.index) && (o = $n.nextNode(), a++); + } + return r; + } + p(t) { + let e = 0; + for (const i of this.u) + i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++; + } +} +class ns { + constructor(t, e, i, s) { + var r; + this.type = 2, this._$AH = bt, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cm = (r = s == null ? void 0 : s.isConnected) === null || r === void 0 || r; + } + get _$AU() { + var t, e; + return (e = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && e !== void 0 ? e : this._$Cm; + } + get parentNode() { + let t = this._$AA.parentNode; + const e = this._$AM; + return e !== void 0 && t.nodeType === 11 && (t = e.parentNode), t; + } + get startNode() { + return this._$AA; + } + get endNode() { + return this._$AB; + } + _$AI(t, e = this) { + t = Qi(this, t, e), As(t) ? t === bt || t == null || t === "" ? (this._$AH !== bt && this._$AR(), this._$AH = bt) : t !== this._$AH && t !== bi && this.g(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Fu(t) ? this.k(t) : this.g(t); + } + O(t, e = this._$AB) { + return this._$AA.parentNode.insertBefore(t, e); + } + T(t) { + this._$AH !== t && (this._$AR(), this._$AH = this.O(t)); + } + g(t) { + this._$AH !== bt && As(this._$AH) ? this._$AA.nextSibling.data = t : this.T(Un.createTextNode(t)), this._$AH = t; + } + $(t) { + var e; + const { values: i, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = Os.createElement(s.h, this.options)), s); + if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === r) + this._$AH.p(i); + else { + const o = new ku(r, this), a = o.v(this.options); + o.p(i), this.T(a), this._$AH = o; + } + } + _$AC(t) { + let e = Fh.get(t.strings); + return e === void 0 && Fh.set(t.strings, e = new Os(t)), e; + } + k(t) { + Ou(this._$AH) || (this._$AH = [], this._$AR()); + const e = this._$AH; + let i, s = 0; + for (const r of t) + s === e.length ? e.push(i = new ns(this.O(Ps()), this.O(Ps()), this, this.options)) : i = e[s], i._$AI(r), s++; + s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s); + } + _$AR(t = this._$AA.nextSibling, e) { + var i; + for ((i = this._$AP) === null || i === void 0 || i.call(this, !1, !0, e); t && t !== this._$AB; ) { + const s = t.nextSibling; + t.remove(), t = s; + } + } + setConnected(t) { + var e; + this._$AM === void 0 && (this._$Cm = t, (e = this._$AP) === null || e === void 0 || e.call(this, t)); + } +} +class qs { + constructor(t, e, i, s, r) { + this.type = 1, this._$AH = bt, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = bt; + } + get tagName() { + return this.element.tagName; + } + get _$AU() { + return this._$AM._$AU; + } + _$AI(t, e = this, i, s) { + const r = this.strings; + let o = !1; + if (r === void 0) + t = Qi(this, t, e, 0), o = !As(t) || t !== this._$AH && t !== bi, o && (this._$AH = t); + else { + const a = t; + let l, h; + for (t = r[0], l = 0; l < r.length - 1; l++) + h = Qi(this, a[i + l], e, l), h === bi && (h = this._$AH[l]), o || (o = !As(h) || h !== this._$AH[l]), h === bt ? t = bt : t !== bt && (t += (h != null ? h : "") + r[l + 1]), this._$AH[l] = h; + } + o && !s && this.j(t); + } + j(t) { + t === bt ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t != null ? t : ""); + } +} +class Gu extends qs { + constructor() { + super(...arguments), this.type = 3; + } + j(t) { + this.element[this.name] = t === bt ? void 0 : t; + } +} +const Eg = Vn ? Vn.emptyScript : ""; +class $u extends qs { + constructor() { + super(...arguments), this.type = 4; + } + j(t) { + t && t !== bt ? this.element.setAttribute(this.name, Eg) : this.element.removeAttribute(this.name); + } +} +class Bu extends qs { + constructor(t, e, i, s, r) { + super(t, e, i, s, r), this.type = 5; + } + _$AI(t, e = this) { + var i; + if ((t = (i = Qi(this, t, e, 0)) !== null && i !== void 0 ? i : bt) === bi) + return; + const s = this._$AH, r = t === bt && s !== bt || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== bt && (s === bt || r); + r && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t; + } + handleEvent(t) { + var e, i; + typeof this._$AH == "function" ? this._$AH.call((i = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && i !== void 0 ? i : this.element, t) : this._$AH.handleEvent(t); + } +} +class zu { + constructor(t, e, i) { + this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i; + } + get _$AU() { + return this._$AM._$AU; + } + _$AI(t) { + Qi(this, t); + } +} +const wg = { P: "$lit$", A: ni, M: dl, C: 1, L: Du, R: ku, D: Fu, V: Qi, I: ns, H: qs, N: $u, U: Bu, B: Gu, F: zu }, Nh = Kr.litHtmlPolyfillSupport; +Nh == null || Nh(Os, ns), ((ta = Kr.litHtmlVersions) !== null && ta !== void 0 ? ta : Kr.litHtmlVersions = []).push("2.5.0"); +const Zu = (n, t, e) => { + var i, s; + const r = (i = e == null ? void 0 : e.renderBefore) !== null && i !== void 0 ? i : t; + let o = r._$litPart$; + if (o === void 0) { + const a = (s = e == null ? void 0 : e.renderBefore) !== null && s !== void 0 ? s : null; + r._$litPart$ = o = new ns(t.insertBefore(Ps(), a), a, void 0, e != null ? e : {}); + } + return o._$AI(n), o; +}; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +var ea, ia; +class kt extends Sn { + constructor() { + super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; + } + createRenderRoot() { + var t, e; + const i = super.createRenderRoot(); + return (t = (e = this.renderOptions).renderBefore) !== null && t !== void 0 || (e.renderBefore = i.firstChild), i; + } + update(t) { + const e = this.render(); + this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Zu(e, this.renderRoot, this.renderOptions); + } + connectedCallback() { + var t; + super.connectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!0); + } + disconnectedCallback() { + var t; + super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1); + } + render() { + return bi; + } +} +kt.finalized = !0, kt._$litElement$ = !0, (ea = globalThis.litElementHydrateSupport) === null || ea === void 0 || ea.call(globalThis, { LitElement: kt }); +const Dh = globalThis.litElementPolyfillSupport; +Dh == null || Dh({ LitElement: kt }); +((ia = globalThis.litElementVersions) !== null && ia !== void 0 ? ia : globalThis.litElementVersions = []).push("3.2.2"); +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const oe = (n) => (t) => typeof t == "function" ? ((e, i) => (customElements.define(e, i), i))(n, t) : ((e, i) => { + const { kind: s, elements: r } = i; + return { kind: s, elements: r, finisher(o) { + customElements.define(e, o); + } }; +})(n, t); +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const Sg = (n, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) { + e.createProperty(t.key, n); +} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() { + typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this)); +}, finisher(e) { + e.createProperty(t.key, n); +} }; +function cn(n) { + return (t, e) => e !== void 0 ? ((i, s, r) => { + s.constructor.createProperty(r, i); + })(n, t, e) : Sg(n, t); +} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +function ae(n) { + return cn({ ...n, state: !0 }); +} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const Rg = ({ finisher: n, descriptor: t }) => (e, i) => { + var s; + if (i === void 0) { + const r = (s = e.originalKey) !== null && s !== void 0 ? s : e.key, o = t != null ? { kind: "method", placement: "prototype", key: r, descriptor: t(e.key) } : { ...e, key: r }; + return n != null && (o.finisher = function(a) { + n(a, r); + }), o; + } + { + const r = e.constructor; + t !== void 0 && Object.defineProperty(e, i, t(i)), n == null || n(r, i); + } +}; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +function Vu(n, t) { + return Rg({ descriptor: (e) => { + const i = { get() { + var s, r; + return (r = (s = this.renderRoot) === null || s === void 0 ? void 0 : s.querySelector(n)) !== null && r !== void 0 ? r : null; + }, enumerable: !0, configurable: !0 }; + if (t) { + const s = typeof e == "symbol" ? Symbol() : "__" + e; + i.get = function() { + var r, o; + return this[s] === void 0 && (this[s] = (o = (r = this.renderRoot) === null || r === void 0 ? void 0 : r.querySelector(n)) !== null && o !== void 0 ? o : null), this[s]; + }; + } + return i; + } }); +} +/** + * @license + * Copyright 2021 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +var na; +((na = window.HTMLSlotElement) === null || na === void 0 ? void 0 : na.prototype.assignedElements) != null; +class Tg { + constructor(t) { + this.propagationStopped, this.defaultPrevented, this.type = t, this.target = null; + } + preventDefault() { + this.defaultPrevented = !0; + } + stopPropagation() { + this.propagationStopped = !0; + } +} +const Re = Tg, Wn = { + PROPERTYCHANGE: "propertychange" +}; +class bg { + constructor() { + this.disposed = !1; + } + dispose() { + this.disposed || (this.disposed = !0, this.disposeInternal()); + } + disposeInternal() { + } +} +const fl = bg; +function Lg(n, t, e) { + let i, s; + e = e || tn; + let r = 0, o = n.length, a = !1; + for (; r < o; ) + i = r + (o - r >> 1), s = +e(n[i], t), s < 0 ? r = i + 1 : (o = i, a = !s); + return a ? r : ~r; +} +function tn(n, t) { + return n > t ? 1 : n < t ? -1 : 0; +} +function gl(n, t, e) { + const i = n.length; + if (n[0] <= t) + return 0; + if (t <= n[i - 1]) + return i - 1; + { + let s; + if (e > 0) { + for (s = 1; s < i; ++s) + if (n[s] < t) + return s - 1; + } else if (e < 0) { + for (s = 1; s < i; ++s) + if (n[s] <= t) + return s; + } else + for (s = 1; s < i; ++s) { + if (n[s] == t) + return s; + if (n[s] < t) + return typeof e == "function" ? e(t, n[s - 1], n[s]) > 0 ? s - 1 : s : n[s - 1] - t < t - n[s] ? s - 1 : s; + } + return i - 1; + } +} +function Ig(n, t, e) { + for (; t < e; ) { + const i = n[t]; + n[t] = n[e], n[e] = i, ++t, --e; + } +} +function Qt(n, t) { + const e = Array.isArray(t) ? t : [t], i = e.length; + for (let s = 0; s < i; s++) + n[n.length] = e[s]; +} +function Ni(n, t) { + const e = n.length; + if (e !== t.length) + return !1; + for (let i = 0; i < e; i++) + if (n[i] !== t[i]) + return !1; + return !0; +} +function Pg(n, t, e) { + const i = t || tn; + return n.every(function(s, r) { + if (r === 0) + return !0; + const o = i(n[r - 1], s); + return !(o > 0 || e && o === 0); + }); +} +function en() { + return !0; +} +function un() { + return !1; +} +function nn() { +} +function Ag(n) { + let t = !1, e, i, s; + return function() { + const r = Array.prototype.slice.call(arguments); + return (!t || this !== s || !Ni(r, i)) && (t = !0, s = this, i = r, e = n.apply(this, arguments)), e; + }; +} +function Ks(n) { + for (const t in n) + delete n[t]; +} +function Hn(n) { + let t; + for (t in n) + return !1; + return !t; +} +class Og extends fl { + constructor(t) { + super(), this.eventTarget_ = t, this.pendingRemovals_ = null, this.dispatching_ = null, this.listeners_ = null; + } + addEventListener(t, e) { + if (!t || !e) + return; + const i = this.listeners_ || (this.listeners_ = {}), s = i[t] || (i[t] = []); + s.includes(e) || s.push(e); + } + dispatchEvent(t) { + const e = typeof t == "string", i = e ? t : t.type, s = this.listeners_ && this.listeners_[i]; + if (!s) + return; + const r = e ? new Re(t) : t; + r.target || (r.target = this.eventTarget_ || this); + const o = this.dispatching_ || (this.dispatching_ = {}), a = this.pendingRemovals_ || (this.pendingRemovals_ = {}); + i in o || (o[i] = 0, a[i] = 0), ++o[i]; + let l; + for (let h = 0, c = s.length; h < c; ++h) + if ("handleEvent" in s[h] ? l = s[h].handleEvent(r) : l = s[h].call(this, r), l === !1 || r.propagationStopped) { + l = !1; + break; + } + if (--o[i] === 0) { + let h = a[i]; + for (delete a[i]; h--; ) + this.removeEventListener(i, nn); + delete o[i]; + } + return l; + } + disposeInternal() { + this.listeners_ && Ks(this.listeners_); + } + getListeners(t) { + return this.listeners_ && this.listeners_[t] || void 0; + } + hasListener(t) { + return this.listeners_ ? t ? t in this.listeners_ : Object.keys(this.listeners_).length > 0 : !1; + } + removeEventListener(t, e) { + const i = this.listeners_ && this.listeners_[t]; + if (i) { + const s = i.indexOf(e); + s !== -1 && (this.pendingRemovals_ && t in this.pendingRemovals_ ? (i[s] = nn, ++this.pendingRemovals_[t]) : (i.splice(s, 1), i.length === 0 && delete this.listeners_[t])); + } + } +} +const So = Og, U = { + CHANGE: "change", + ERROR: "error", + BLUR: "blur", + CLEAR: "clear", + CONTEXTMENU: "contextmenu", + CLICK: "click", + DBLCLICK: "dblclick", + DRAGENTER: "dragenter", + DRAGOVER: "dragover", + DROP: "drop", + FOCUS: "focus", + KEYDOWN: "keydown", + KEYPRESS: "keypress", + LOAD: "load", + RESIZE: "resize", + TOUCHMOVE: "touchmove", + WHEEL: "wheel" +}; +function et(n, t, e, i, s) { + if (i && i !== n && (e = e.bind(i)), s) { + const o = e; + e = function() { + n.removeEventListener(t, e), o.apply(this, arguments); + }; + } + const r = { + target: n, + type: t, + listener: e + }; + return n.addEventListener(t, e), r; +} +function Jr(n, t, e, i) { + return et(n, t, e, i, !0); +} +function mt(n) { + n && n.target && (n.target.removeEventListener(n.type, n.listener), Ks(n)); +} +class Ro extends So { + constructor() { + super(), this.on = this.onInternal, this.once = this.onceInternal, this.un = this.unInternal, this.revision_ = 0; + } + changed() { + ++this.revision_, this.dispatchEvent(U.CHANGE); + } + getRevision() { + return this.revision_; + } + onInternal(t, e) { + if (Array.isArray(t)) { + const i = t.length, s = new Array(i); + for (let r = 0; r < i; ++r) + s[r] = et(this, t[r], e); + return s; + } else + return et(this, t, e); + } + onceInternal(t, e) { + let i; + if (Array.isArray(t)) { + const s = t.length; + i = new Array(s); + for (let r = 0; r < s; ++r) + i[r] = Jr(this, t[r], e); + } else + i = Jr(this, t, e); + return e.ol_key = i, i; + } + unInternal(t, e) { + const i = e.ol_key; + if (i) + Fg(i); + else if (Array.isArray(t)) + for (let s = 0, r = t.length; s < r; ++s) + this.removeEventListener(t[s], e); + else + this.removeEventListener(t, e); + } +} +Ro.prototype.on; +Ro.prototype.once; +Ro.prototype.un; +function Fg(n) { + if (Array.isArray(n)) + for (let t = 0, e = n.length; t < e; ++t) + mt(n[t]); + else + mt(n); +} +const Uu = Ro; +function H() { + throw new Error("Unimplemented abstract method."); +} +let Ng = 0; +function q(n) { + return n.ol_uid || (n.ol_uid = String(++Ng)); +} +class kh extends Re { + constructor(t, e, i) { + super(t), this.key = e, this.oldValue = i; + } +} +class Dg extends Uu { + constructor(t) { + super(), this.on, this.once, this.un, q(this), this.values_ = null, t !== void 0 && this.setProperties(t); + } + get(t) { + let e; + return this.values_ && this.values_.hasOwnProperty(t) && (e = this.values_[t]), e; + } + getKeys() { + return this.values_ && Object.keys(this.values_) || []; + } + getProperties() { + return this.values_ && Object.assign({}, this.values_) || {}; + } + hasProperties() { + return !!this.values_; + } + notify(t, e) { + let i; + i = `change:${t}`, this.hasListener(i) && this.dispatchEvent(new kh(i, t, e)), i = Wn.PROPERTYCHANGE, this.hasListener(i) && this.dispatchEvent(new kh(i, t, e)); + } + addChangeListener(t, e) { + this.addEventListener(`change:${t}`, e); + } + removeChangeListener(t, e) { + this.removeEventListener(`change:${t}`, e); + } + set(t, e, i) { + const s = this.values_ || (this.values_ = {}); + if (i) + s[t] = e; + else { + const r = s[t]; + s[t] = e, r !== e && this.notify(t, r); + } + } + setProperties(t, e) { + for (const i in t) + this.set(i, t[i], e); + } + applyProperties(t) { + !t.values_ || Object.assign(this.values_ || (this.values_ = {}), t.values_); + } + unset(t, e) { + if (this.values_ && t in this.values_) { + const i = this.values_[t]; + delete this.values_[t], Hn(this.values_) && (this.values_ = null), e || this.notify(t, i); + } + } +} +const Oe = Dg, kg = { + 1: "The view center is not defined", + 2: "The view resolution is not defined", + 3: "The view rotation is not defined", + 4: "`image` and `src` cannot be provided at the same time", + 5: "`imgSize` must be set when `image` is provided", + 7: "`format` must be set when `url` is set", + 8: "Unknown `serverType` configured", + 9: "`url` must be configured or set using `#setUrl()`", + 10: "The default `geometryFunction` can only handle `Point` geometries", + 11: "`options.featureTypes` must be an Array", + 12: "`options.geometryName` must also be provided when `options.bbox` is set", + 13: "Invalid corner", + 14: "Invalid color", + 15: "Tried to get a value for a key that does not exist in the cache", + 16: "Tried to set a value for a key that is used already", + 17: "`resolutions` must be sorted in descending order", + 18: "Either `origin` or `origins` must be configured, never both", + 19: "Number of `tileSizes` and `resolutions` must be equal", + 20: "Number of `origins` and `resolutions` must be equal", + 22: "Either `tileSize` or `tileSizes` must be configured, never both", + 24: "Invalid extent or geometry provided as `geometry`", + 25: "Cannot fit empty extent provided as `geometry`", + 26: "Features must have an id set", + 27: "Features must have an id set", + 28: '`renderMode` must be `"hybrid"` or `"vector"`', + 30: "The passed `feature` was already added to the source", + 31: "Tried to enqueue an `element` that was already added to the queue", + 32: "Transformation matrix cannot be inverted", + 33: "Invalid units", + 34: "Invalid geometry layout", + 36: "Unknown SRS type", + 37: "Unknown geometry type found", + 38: "`styleMapValue` has an unknown type", + 39: "Unknown geometry type", + 40: "Expected `feature` to have a geometry", + 41: "Expected an `ol/style/Style` or an array of `ol/style/Style.js`", + 42: "Question unknown, the answer is 42", + 43: "Expected `layers` to be an array or a `Collection`", + 47: "Expected `controls` to be an array or an `ol/Collection`", + 48: "Expected `interactions` to be an array or an `ol/Collection`", + 49: "Expected `overlays` to be an array or an `ol/Collection`", + 50: "`options.featureTypes` should be an Array", + 51: "Either `url` or `tileJSON` options must be provided", + 52: "Unknown `serverType` configured", + 53: "Unknown `tierSizeCalculation` configured", + 55: "The {-y} placeholder requires a tile grid with extent", + 56: "mapBrowserEvent must originate from a pointer event", + 57: "At least 2 conditions are required", + 59: "Invalid command found in the PBF", + 60: "Missing or invalid `size`", + 61: "Cannot determine IIIF Image API version from provided image information JSON", + 62: "A `WebGLArrayBuffer` must either be of type `ELEMENT_ARRAY_BUFFER` or `ARRAY_BUFFER`", + 64: "Layer opacity must be a number", + 66: "`forEachFeatureAtCoordinate` cannot be used on a WebGL layer if the hit detection logic has not been enabled. This is done by providing adequate shaders using the `hitVertexShader` and `hitFragmentShader` properties of `WebGLPointsLayerRenderer`", + 67: "A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both", + 68: "A VectorTile source can only be rendered if it has a projection compatible with the view projection" +}; +class Gg extends Error { + constructor(t) { + const e = kg[t]; + super(e), this.code = t, this.name = "AssertionError", this.message = e; + } +} +const Wu = Gg, Dt = { + ADD: "add", + REMOVE: "remove" +}, Gh = { + LENGTH: "length" +}; +class Er extends Re { + constructor(t, e, i) { + super(t), this.element = e, this.index = i; + } +} +class $g extends Oe { + constructor(t, e) { + if (super(), this.on, this.once, this.un, e = e || {}, this.unique_ = !!e.unique, this.array_ = t || [], this.unique_) + for (let i = 0, s = this.array_.length; i < s; ++i) + this.assertUnique_(this.array_[i], i); + this.updateLength_(); + } + clear() { + for (; this.getLength() > 0; ) + this.pop(); + } + extend(t) { + for (let e = 0, i = t.length; e < i; ++e) + this.push(t[e]); + return this; + } + forEach(t) { + const e = this.array_; + for (let i = 0, s = e.length; i < s; ++i) + t(e[i], i, e); + } + getArray() { + return this.array_; + } + item(t) { + return this.array_[t]; + } + getLength() { + return this.get(Gh.LENGTH); + } + insertAt(t, e) { + if (t < 0 || t > this.getLength()) + throw new Error("Index out of bounds: " + t); + this.unique_ && this.assertUnique_(e), this.array_.splice(t, 0, e), this.updateLength_(), this.dispatchEvent( + new Er(Dt.ADD, e, t) + ); + } + pop() { + return this.removeAt(this.getLength() - 1); + } + push(t) { + this.unique_ && this.assertUnique_(t); + const e = this.getLength(); + return this.insertAt(e, t), this.getLength(); + } + remove(t) { + const e = this.array_; + for (let i = 0, s = e.length; i < s; ++i) + if (e[i] === t) + return this.removeAt(i); + } + removeAt(t) { + if (t < 0 || t >= this.getLength()) + return; + const e = this.array_[t]; + return this.array_.splice(t, 1), this.updateLength_(), this.dispatchEvent( + new Er(Dt.REMOVE, e, t) + ), e; + } + setAt(t, e) { + const i = this.getLength(); + if (t >= i) { + this.insertAt(t, e); + return; + } + if (t < 0) + throw new Error("Index out of bounds: " + t); + this.unique_ && this.assertUnique_(e, t); + const s = this.array_[t]; + this.array_[t] = e, this.dispatchEvent( + new Er(Dt.REMOVE, s, t) + ), this.dispatchEvent( + new Er(Dt.ADD, e, t) + ); + } + updateLength_() { + this.set(Gh.LENGTH, this.array_.length); + } + assertUnique_(t, e) { + for (let i = 0, s = this.array_.length; i < s; ++i) + if (this.array_[i] === t && i !== e) + throw new Wu(58); + } +} +const Ee = $g, Li = typeof navigator < "u" && typeof navigator.userAgent < "u" ? navigator.userAgent.toLowerCase() : "", Bg = Li.includes("firefox"), zg = Li.includes("safari") && !Li.includes("chrom"); +zg && (Li.includes("version/15.4") || /cpu (os|iphone os) 15_4 like mac os x/.test(Li)); +const Zg = Li.includes("webkit") && !Li.includes("edge"), Vg = Li.includes("macintosh"), Hu = typeof devicePixelRatio < "u" ? devicePixelRatio : 1, ml = typeof WorkerGlobalScope < "u" && typeof OffscreenCanvas < "u" && self instanceof WorkerGlobalScope, Ug = typeof Image < "u" && Image.prototype.decode, Xu = function() { + let n = !1; + try { + const t = Object.defineProperty({}, "passive", { + get: function() { + n = !0; + } + }); + window.addEventListener("_", null, t), window.removeEventListener("_", null, t); + } catch { + } + return n; +}(); +function Y(n, t) { + if (!n) + throw new Wu(t); +} +new Array(6); +function $e() { + return [1, 0, 0, 1, 0, 0]; +} +function Wg(n, t, e, i, s, r, o) { + return n[0] = t, n[1] = e, n[2] = i, n[3] = s, n[4] = r, n[5] = o, n; +} +function Hg(n, t) { + return n[0] = t[0], n[1] = t[1], n[2] = t[2], n[3] = t[3], n[4] = t[4], n[5] = t[5], n; +} +function Nt(n, t) { + const e = t[0], i = t[1]; + return t[0] = n[0] * e + n[2] * i + n[4], t[1] = n[1] * e + n[3] * i + n[5], t; +} +function Xg(n, t, e) { + return Wg(n, t, 0, 0, e, 0, 0); +} +function Ii(n, t, e, i, s, r, o, a) { + const l = Math.sin(r), h = Math.cos(r); + return n[0] = i * h, n[1] = s * l, n[2] = -i * l, n[3] = s * h, n[4] = o * i * h - a * i * l + t, n[5] = o * s * l + a * s * h + e, n; +} +function _l(n, t) { + const e = Yg(t); + Y(e !== 0, 32); + const i = t[0], s = t[1], r = t[2], o = t[3], a = t[4], l = t[5]; + return n[0] = o / e, n[1] = -s / e, n[2] = -r / e, n[3] = i / e, n[4] = (r * l - o * a) / e, n[5] = -(i * l - s * a) / e, n; +} +function Yg(n) { + return n[0] * n[3] - n[1] * n[2]; +} +let $h; +function Yu(n) { + const t = "matrix(" + n.join(", ") + ")"; + if (ml) + return t; + const e = $h || ($h = document.createElement("div")); + return e.style.transform = t, e.style.transform; +} +const Ft = { + UNKNOWN: 0, + INTERSECTING: 1, + ABOVE: 2, + RIGHT: 4, + BELOW: 8, + LEFT: 16 +}; +function Ut(n) { + const t = se(); + for (let e = 0, i = n.length; e < i; ++e) + Ss(t, n[e]); + return t; +} +function jg(n, t, e) { + const i = Math.min.apply(null, n), s = Math.min.apply(null, t), r = Math.max.apply(null, n), o = Math.max.apply(null, t); + return _e(i, s, r, o, e); +} +function Js(n, t, e) { + return e ? (e[0] = n[0] - t, e[1] = n[1] - t, e[2] = n[2] + t, e[3] = n[3] + t, e) : [ + n[0] - t, + n[1] - t, + n[2] + t, + n[3] + t + ]; +} +function ju(n, t) { + return t ? (t[0] = n[0], t[1] = n[1], t[2] = n[2], t[3] = n[3], t) : n.slice(); +} +function dn(n, t, e) { + let i, s; + return t < n[0] ? i = n[0] - t : n[2] < t ? i = t - n[2] : i = 0, e < n[1] ? s = n[1] - e : n[3] < e ? s = e - n[3] : s = 0, i * i + s * s; +} +function To(n, t) { + return pl(n, t[0], t[1]); +} +function Vi(n, t) { + return n[0] <= t[0] && t[2] <= n[2] && n[1] <= t[1] && t[3] <= n[3]; +} +function pl(n, t, e) { + return n[0] <= t && t <= n[2] && n[1] <= e && e <= n[3]; +} +function ba(n, t) { + const e = n[0], i = n[1], s = n[2], r = n[3], o = t[0], a = t[1]; + let l = Ft.UNKNOWN; + return o < e ? l = l | Ft.LEFT : o > s && (l = l | Ft.RIGHT), a < i ? l = l | Ft.BELOW : a > r && (l = l | Ft.ABOVE), l === Ft.UNKNOWN && (l = Ft.INTERSECTING), l; +} +function se() { + return [1 / 0, 1 / 0, -1 / 0, -1 / 0]; +} +function _e(n, t, e, i, s) { + return s ? (s[0] = n, s[1] = t, s[2] = e, s[3] = i, s) : [n, t, e, i]; +} +function Qs(n) { + return _e(1 / 0, 1 / 0, -1 / 0, -1 / 0, n); +} +function ws(n, t) { + const e = n[0], i = n[1]; + return _e(e, i, e, i, t); +} +function qu(n, t, e, i, s) { + const r = Qs(s); + return Ju(r, n, t, e, i); +} +function Fs(n, t) { + return n[0] == t[0] && n[2] == t[2] && n[1] == t[1] && n[3] == t[3]; +} +function Ku(n, t) { + return t[0] < n[0] && (n[0] = t[0]), t[2] > n[2] && (n[2] = t[2]), t[1] < n[1] && (n[1] = t[1]), t[3] > n[3] && (n[3] = t[3]), n; +} +function Ss(n, t) { + t[0] < n[0] && (n[0] = t[0]), t[0] > n[2] && (n[2] = t[0]), t[1] < n[1] && (n[1] = t[1]), t[1] > n[3] && (n[3] = t[1]); +} +function Ju(n, t, e, i, s) { + for (; e < i; e += s) + qg(n, t[e], t[e + 1]); + return n; +} +function qg(n, t, e) { + n[0] = Math.min(n[0], t), n[1] = Math.min(n[1], e), n[2] = Math.max(n[2], t), n[3] = Math.max(n[3], e); +} +function yl(n, t) { + let e; + return e = t(bo(n)), e || (e = t(Lo(n)), e) || (e = t(Io(n)), e) || (e = t(fn(n)), e) ? e : !1; +} +function La(n) { + let t = 0; + return vl(n) || (t = pt(n) * ze(n)), t; +} +function bo(n) { + return [n[0], n[1]]; +} +function Lo(n) { + return [n[2], n[1]]; +} +function Pi(n) { + return [(n[0] + n[2]) / 2, (n[1] + n[3]) / 2]; +} +function Kg(n, t) { + let e; + return t === "bottom-left" ? e = bo(n) : t === "bottom-right" ? e = Lo(n) : t === "top-left" ? e = fn(n) : t === "top-right" ? e = Io(n) : Y(!1, 13), e; +} +function Ia(n, t, e, i, s) { + const [r, o, a, l, h, c, u, d] = Pa( + n, + t, + e, + i + ); + return _e( + Math.min(r, a, h, u), + Math.min(o, l, c, d), + Math.max(r, a, h, u), + Math.max(o, l, c, d), + s + ); +} +function Pa(n, t, e, i) { + const s = t * i[0] / 2, r = t * i[1] / 2, o = Math.cos(e), a = Math.sin(e), l = s * o, h = s * a, c = r * o, u = r * a, d = n[0], f = n[1]; + return [ + d - l + u, + f - h - c, + d - l - u, + f - h + c, + d + l - u, + f + h + c, + d + l + u, + f + h - c, + d - l + u, + f - h - c + ]; +} +function ze(n) { + return n[3] - n[1]; +} +function Rs(n, t, e) { + const i = e || se(); + return Kt(n, t) ? (n[0] > t[0] ? i[0] = n[0] : i[0] = t[0], n[1] > t[1] ? i[1] = n[1] : i[1] = t[1], n[2] < t[2] ? i[2] = n[2] : i[2] = t[2], n[3] < t[3] ? i[3] = n[3] : i[3] = t[3]) : Qs(i), i; +} +function fn(n) { + return [n[0], n[3]]; +} +function Io(n) { + return [n[2], n[3]]; +} +function pt(n) { + return n[2] - n[0]; +} +function Kt(n, t) { + return n[0] <= t[2] && n[2] >= t[0] && n[1] <= t[3] && n[3] >= t[1]; +} +function vl(n) { + return n[2] < n[0] || n[3] < n[1]; +} +function Jg(n, t) { + return t ? (t[0] = n[0], t[1] = n[1], t[2] = n[2], t[3] = n[3], t) : n; +} +function Qg(n, t, e) { + let i = !1; + const s = ba(n, t), r = ba(n, e); + if (s === Ft.INTERSECTING || r === Ft.INTERSECTING) + i = !0; + else { + const o = n[0], a = n[1], l = n[2], h = n[3], c = t[0], u = t[1], d = e[0], f = e[1], g = (f - u) / (d - c); + let m, _; + !!(r & Ft.ABOVE) && !(s & Ft.ABOVE) && (m = d - (f - h) / g, i = m >= o && m <= l), !i && !!(r & Ft.RIGHT) && !(s & Ft.RIGHT) && (_ = f - (d - l) * g, i = _ >= a && _ <= h), !i && !!(r & Ft.BELOW) && !(s & Ft.BELOW) && (m = d - (f - a) / g, i = m >= o && m <= l), !i && !!(r & Ft.LEFT) && !(s & Ft.LEFT) && (_ = f - (d - o) * g, i = _ >= a && _ <= h); + } + return i; +} +function t0(n, t, e, i) { + let s = []; + if (i > 1) { + const a = n[2] - n[0], l = n[3] - n[1]; + for (let h = 0; h < i; ++h) + s.push( + n[0] + a * h / i, + n[1], + n[2], + n[1] + l * h / i, + n[2] - a * h / i, + n[3], + n[0], + n[3] - l * h / i + ); + } else + s = [ + n[0], + n[1], + n[2], + n[1], + n[2], + n[3], + n[0], + n[3] + ]; + t(s, s, 2); + const r = [], o = []; + for (let a = 0, l = s.length; a < l; a += 2) + r.push(s[a]), o.push(s[a + 1]); + return jg(r, o, e); +} +function Qu(n, t) { + const e = t.getExtent(), i = Pi(n); + if (t.canWrapX() && (i[0] < e[0] || i[0] >= e[2])) { + const s = pt(e), o = Math.floor( + (i[0] - e[0]) / s + ) * s; + n[0] -= o, n[2] -= o; + } + return n; +} +function e0(n, t) { + if (t.canWrapX()) { + const e = t.getExtent(); + if (!isFinite(n[0]) || !isFinite(n[2])) + return [[e[0], n[1], e[2], n[3]]]; + Qu(n, t); + const i = pt(e); + if (pt(n) > i) + return [[e[0], n[1], e[2], n[3]]]; + if (n[0] < e[0]) + return [ + [n[0] + i, n[1], e[2], n[3]], + [e[0], n[1], n[2], n[3]] + ]; + if (n[2] > e[2]) + return [ + [n[0], n[1], e[2], n[3]], + [e[0], n[1], n[2] - i, n[3]] + ]; + } + return [n]; +} +function Et(n, t, e) { + return Math.min(Math.max(n, t), e); +} +function i0(n, t, e, i, s, r) { + const o = s - e, a = r - i; + if (o !== 0 || a !== 0) { + const l = ((n - e) * o + (t - i) * a) / (o * o + a * a); + l > 1 ? (e = s, i = r) : l > 0 && (e += o * l, i += a * l); + } + return ri(n, t, e, i); +} +function ri(n, t, e, i) { + const s = e - n, r = i - t; + return s * s + r * r; +} +function n0(n) { + const t = n.length; + for (let i = 0; i < t; i++) { + let s = i, r = Math.abs(n[i][i]); + for (let a = i + 1; a < t; a++) { + const l = Math.abs(n[a][i]); + l > r && (r = l, s = a); + } + if (r === 0) + return null; + const o = n[s]; + n[s] = n[i], n[i] = o; + for (let a = i + 1; a < t; a++) { + const l = -n[a][i] / n[i][i]; + for (let h = i; h < t + 1; h++) + i == h ? n[a][h] = 0 : n[a][h] += l * n[i][h]; + } + } + const e = new Array(t); + for (let i = t - 1; i >= 0; i--) { + e[i] = n[i][t] / n[i][i]; + for (let s = i - 1; s >= 0; s--) + n[s][t] -= n[s][i] * e[i]; + } + return e; +} +function Bh(n) { + return n * 180 / Math.PI; +} +function ji(n) { + return n * Math.PI / 180; +} +function qi(n, t) { + const e = n % t; + return e * t < 0 ? e + t : e; +} +function ii(n, t, e) { + return n + e * (t - n); +} +function xl(n, t) { + const e = Math.pow(10, t); + return Math.round(n * e) / e; +} +function wr(n, t) { + return Math.floor(xl(n, t)); +} +function Sr(n, t) { + return Math.ceil(xl(n, t)); +} +const s0 = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i, r0 = /^([a-z]*)$|^hsla?\(.*\)$/i; +function td(n) { + return typeof n == "string" ? n : ed(n); +} +function o0(n) { + const t = document.createElement("div"); + if (t.style.color = n, t.style.color !== "") { + document.body.appendChild(t); + const e = getComputedStyle(t).color; + return document.body.removeChild(t), e; + } else + return ""; +} +const a0 = function() { + const t = {}; + let e = 0; + return function(i) { + let s; + if (t.hasOwnProperty(i)) + s = t[i]; + else { + if (e >= 1024) { + let r = 0; + for (const o in t) + (r++ & 3) === 0 && (delete t[o], --e); + } + s = l0(i), t[i] = s, ++e; + } + return s; + }; +}(); +function Qr(n) { + return Array.isArray(n) ? n : a0(n); +} +function l0(n) { + let t, e, i, s, r; + if (r0.exec(n) && (n = o0(n)), s0.exec(n)) { + const o = n.length - 1; + let a; + o <= 4 ? a = 1 : a = 2; + const l = o === 4 || o === 8; + t = parseInt(n.substr(1 + 0 * a, a), 16), e = parseInt(n.substr(1 + 1 * a, a), 16), i = parseInt(n.substr(1 + 2 * a, a), 16), l ? s = parseInt(n.substr(1 + 3 * a, a), 16) : s = 255, a == 1 && (t = (t << 4) + t, e = (e << 4) + e, i = (i << 4) + i, l && (s = (s << 4) + s)), r = [t, e, i, s / 255]; + } else + n.startsWith("rgba(") ? (r = n.slice(5, -1).split(",").map(Number), zh(r)) : n.startsWith("rgb(") ? (r = n.slice(4, -1).split(",").map(Number), r.push(1), zh(r)) : Y(!1, 14); + return r; +} +function zh(n) { + return n[0] = Et(n[0] + 0.5 | 0, 0, 255), n[1] = Et(n[1] + 0.5 | 0, 0, 255), n[2] = Et(n[2] + 0.5 | 0, 0, 255), n[3] = Et(n[3], 0, 1), n; +} +function ed(n) { + let t = n[0]; + t != (t | 0) && (t = t + 0.5 | 0); + let e = n[1]; + e != (e | 0) && (e = e + 0.5 | 0); + let i = n[2]; + i != (i | 0) && (i = i + 0.5 | 0); + const s = n[3] === void 0 ? 1 : Math.round(n[3] * 100) / 100; + return "rgba(" + t + "," + e + "," + i + "," + s + ")"; +} +class h0 { + constructor() { + this.cache_ = {}, this.cacheSize_ = 0, this.maxCacheSize_ = 32; + } + clear() { + this.cache_ = {}, this.cacheSize_ = 0; + } + canExpireCache() { + return this.cacheSize_ > this.maxCacheSize_; + } + expire() { + if (this.canExpireCache()) { + let t = 0; + for (const e in this.cache_) { + const i = this.cache_[e]; + (t++ & 3) === 0 && !i.hasListener() && (delete this.cache_[e], --this.cacheSize_); + } + } + } + get(t, e, i) { + const s = Zh(t, e, i); + return s in this.cache_ ? this.cache_[s] : null; + } + set(t, e, i, s) { + const r = Zh(t, e, i); + this.cache_[r] = s, ++this.cacheSize_; + } + setSize(t) { + this.maxCacheSize_ = t, this.expire(); + } +} +function Zh(n, t, e) { + const i = e ? td(e) : "null"; + return t + ":" + n + ":" + i; +} +const to = new h0(), ft = { + OPACITY: "opacity", + VISIBLE: "visible", + EXTENT: "extent", + Z_INDEX: "zIndex", + MAX_RESOLUTION: "maxResolution", + MIN_RESOLUTION: "minResolution", + MAX_ZOOM: "maxZoom", + MIN_ZOOM: "minZoom", + SOURCE: "source", + MAP: "map" +}; +class c0 extends Oe { + constructor(t) { + super(), this.on, this.once, this.un, this.background_ = t.background; + const e = Object.assign({}, t); + typeof t.properties == "object" && (delete e.properties, Object.assign(e, t.properties)), e[ft.OPACITY] = t.opacity !== void 0 ? t.opacity : 1, Y(typeof e[ft.OPACITY] == "number", 64), e[ft.VISIBLE] = t.visible !== void 0 ? t.visible : !0, e[ft.Z_INDEX] = t.zIndex, e[ft.MAX_RESOLUTION] = t.maxResolution !== void 0 ? t.maxResolution : 1 / 0, e[ft.MIN_RESOLUTION] = t.minResolution !== void 0 ? t.minResolution : 0, e[ft.MIN_ZOOM] = t.minZoom !== void 0 ? t.minZoom : -1 / 0, e[ft.MAX_ZOOM] = t.maxZoom !== void 0 ? t.maxZoom : 1 / 0, this.className_ = e.className !== void 0 ? e.className : "ol-layer", delete e.className, this.setProperties(e), this.state_ = null; + } + getBackground() { + return this.background_; + } + getClassName() { + return this.className_; + } + getLayerState(t) { + const e = this.state_ || { + layer: this, + managed: t === void 0 ? !0 : t + }, i = this.getZIndex(); + return e.opacity = Et(Math.round(this.getOpacity() * 100) / 100, 0, 1), e.visible = this.getVisible(), e.extent = this.getExtent(), e.zIndex = i === void 0 && !e.managed ? 1 / 0 : i, e.maxResolution = this.getMaxResolution(), e.minResolution = Math.max(this.getMinResolution(), 0), e.minZoom = this.getMinZoom(), e.maxZoom = this.getMaxZoom(), this.state_ = e, e; + } + getLayersArray(t) { + return H(); + } + getLayerStatesArray(t) { + return H(); + } + getExtent() { + return this.get(ft.EXTENT); + } + getMaxResolution() { + return this.get(ft.MAX_RESOLUTION); + } + getMinResolution() { + return this.get(ft.MIN_RESOLUTION); + } + getMinZoom() { + return this.get(ft.MIN_ZOOM); + } + getMaxZoom() { + return this.get(ft.MAX_ZOOM); + } + getOpacity() { + return this.get(ft.OPACITY); + } + getSourceState() { + return H(); + } + getVisible() { + return this.get(ft.VISIBLE); + } + getZIndex() { + return this.get(ft.Z_INDEX); + } + setBackground(t) { + this.background_ = t, this.changed(); + } + setExtent(t) { + this.set(ft.EXTENT, t); + } + setMaxResolution(t) { + this.set(ft.MAX_RESOLUTION, t); + } + setMinResolution(t) { + this.set(ft.MIN_RESOLUTION, t); + } + setMaxZoom(t) { + this.set(ft.MAX_ZOOM, t); + } + setMinZoom(t) { + this.set(ft.MIN_ZOOM, t); + } + setOpacity(t) { + Y(typeof t == "number", 64), this.set(ft.OPACITY, t); + } + setVisible(t) { + this.set(ft.VISIBLE, t); + } + setZIndex(t) { + this.set(ft.Z_INDEX, t); + } + disposeInternal() { + this.state_ && (this.state_.layer = null, this.state_ = null), super.disposeInternal(); + } +} +const id = c0, Ri = { + PRERENDER: "prerender", + POSTRENDER: "postrender", + PRECOMPOSE: "precompose", + POSTCOMPOSE: "postcompose", + RENDERCOMPLETE: "rendercomplete" +}; +class u0 extends id { + constructor(t) { + const e = Object.assign({}, t); + delete e.source, super(e), this.on, this.once, this.un, this.mapPrecomposeKey_ = null, this.mapRenderKey_ = null, this.sourceChangeKey_ = null, this.renderer_ = null, this.rendered = !1, t.render && (this.render = t.render), t.map && this.setMap(t.map), this.addChangeListener( + ft.SOURCE, + this.handleSourcePropertyChange_ + ); + const i = t.source ? t.source : null; + this.setSource(i); + } + getLayersArray(t) { + return t = t || [], t.push(this), t; + } + getLayerStatesArray(t) { + return t = t || [], t.push(this.getLayerState()), t; + } + getSource() { + return this.get(ft.SOURCE) || null; + } + getRenderSource() { + return this.getSource(); + } + getSourceState() { + const t = this.getSource(); + return t ? t.getState() : "undefined"; + } + handleSourceChange_() { + this.changed(); + } + handleSourcePropertyChange_() { + this.sourceChangeKey_ && (mt(this.sourceChangeKey_), this.sourceChangeKey_ = null); + const t = this.getSource(); + t && (this.sourceChangeKey_ = et( + t, + U.CHANGE, + this.handleSourceChange_, + this + )), this.changed(); + } + getFeatures(t) { + return this.renderer_ ? this.renderer_.getFeatures(t) : new Promise((e) => e([])); + } + getData(t) { + return !this.renderer_ || !this.rendered ? null : this.renderer_.getData(t); + } + render(t, e) { + const i = this.getRenderer(); + if (i.prepareFrame(t)) + return this.rendered = !0, i.renderFrame(t, e); + } + unrender() { + this.rendered = !1; + } + setMapInternal(t) { + t || this.unrender(), this.set(ft.MAP, t); + } + getMapInternal() { + return this.get(ft.MAP); + } + setMap(t) { + this.mapPrecomposeKey_ && (mt(this.mapPrecomposeKey_), this.mapPrecomposeKey_ = null), t || this.changed(), this.mapRenderKey_ && (mt(this.mapRenderKey_), this.mapRenderKey_ = null), t && (this.mapPrecomposeKey_ = et( + t, + Ri.PRECOMPOSE, + function(e) { + const s = e.frameState.layerStatesArray, r = this.getLayerState(!1); + Y( + !s.some(function(o) { + return o.layer === r.layer; + }), + 67 + ), s.push(r); + }, + this + ), this.mapRenderKey_ = et(this, U.CHANGE, t.render, t), this.changed()); + } + setSource(t) { + this.set(ft.SOURCE, t); + } + getRenderer() { + return this.renderer_ || (this.renderer_ = this.createRenderer()), this.renderer_; + } + hasRenderer() { + return !!this.renderer_; + } + createRenderer() { + return null; + } + disposeInternal() { + this.renderer_ && (this.renderer_.dispose(), delete this.renderer_), this.setSource(null), super.disposeInternal(); + } +} +function Cl(n, t) { + if (!n.visible) + return !1; + const e = t.resolution; + if (e < n.minResolution || e >= n.maxResolution) + return !1; + const i = t.zoom; + return i > n.minZoom && i <= n.maxZoom; +} +const Po = u0; +function nd(n, t) { + return n[0] += +t[0], n[1] += +t[1], n; +} +function d0(n, t) { + const e = t.getRadius(), i = t.getCenter(), s = i[0], r = i[1], o = n[0], a = n[1]; + let l = o - s; + const h = a - r; + l === 0 && h === 0 && (l = 1); + const c = Math.sqrt(l * l + h * h), u = s + e * l / c, d = r + e * h / c; + return [u, d]; +} +function Ml(n, t) { + const e = n[0], i = n[1], s = t[0], r = t[1], o = s[0], a = s[1], l = r[0], h = r[1], c = l - o, u = h - a, d = c === 0 && u === 0 ? 0 : (c * (e - o) + u * (i - a)) / (c * c + u * u || 0); + let f, g; + return d <= 0 ? (f = o, g = a) : d >= 1 ? (f = l, g = h) : (f = o + d * c, g = a + d * u), [f, g]; +} +function Le(n, t) { + let e = !0; + for (let i = n.length - 1; i >= 0; --i) + if (n[i] != t[i]) { + e = !1; + break; + } + return e; +} +function El(n, t) { + const e = Math.cos(t), i = Math.sin(t), s = n[0] * e - n[1] * i, r = n[1] * e + n[0] * i; + return n[0] = s, n[1] = r, n; +} +function sd(n, t) { + return n[0] *= t, n[1] *= t, n; +} +function oi(n, t) { + const e = n[0] - t[0], i = n[1] - t[1]; + return e * e + i * i; +} +function eo(n, t) { + return Math.sqrt(oi(n, t)); +} +function f0(n, t) { + return oi(n, Ml(n, t)); +} +function rd(n, t) { + if (t.canWrapX()) { + const e = pt(t.getExtent()), i = od(n, t, e); + i && (n[0] -= i * e); + } + return n; +} +function od(n, t, e) { + const i = t.getExtent(); + let s = 0; + return t.canWrapX() && (n[0] < i[0] || n[0] > i[2]) && (e = e || pt(i), s = Math.floor( + (n[0] - i[0]) / e + )), s; +} +class g0 extends fl { + constructor(t) { + super(), this.map_ = t; + } + dispatchRenderEvent(t, e) { + H(); + } + calculateMatrices2D(t) { + const e = t.viewState, i = t.coordinateToPixelTransform, s = t.pixelToCoordinateTransform; + Ii( + i, + t.size[0] / 2, + t.size[1] / 2, + 1 / e.resolution, + -1 / e.resolution, + -e.rotation, + -e.center[0], + -e.center[1] + ), _l(s, i); + } + forEachFeatureAtCoordinate(t, e, i, s, r, o, a, l) { + let h; + const c = e.viewState; + function u(x, C, E, R) { + return r.call(o, C, x ? E : null, R); + } + const d = c.projection, f = rd(t.slice(), d), g = [[0, 0]]; + if (d.canWrapX() && s) { + const x = d.getExtent(), C = pt(x); + g.push([-C, 0], [C, 0]); + } + const m = e.layerStatesArray, _ = m.length, y = [], p = []; + for (let x = 0; x < g.length; x++) + for (let C = _ - 1; C >= 0; --C) { + const E = m[C], R = E.layer; + if (R.hasRenderer() && Cl(E, c) && a.call(l, R)) { + const b = R.getRenderer(), F = R.getSource(); + if (b && F) { + const G = F.getWrapX() ? f : t, V = u.bind( + null, + E.managed + ); + p[0] = G[0] + g[x][0], p[1] = G[1] + g[x][1], h = b.forEachFeatureAtCoordinate( + p, + e, + i, + V, + y + ); + } + if (h) + return h; + } + } + if (y.length === 0) + return; + const v = 1 / y.length; + return y.forEach((x, C) => x.distanceSq += C * v), y.sort((x, C) => x.distanceSq - C.distanceSq), y.some((x) => h = x.callback(x.feature, x.layer, x.geometry)), h; + } + hasFeatureAtCoordinate(t, e, i, s, r, o) { + return this.forEachFeatureAtCoordinate( + t, + e, + i, + s, + en, + this, + r, + o + ) !== void 0; + } + getMap() { + return this.map_; + } + renderFrame(t) { + H(); + } + scheduleExpireIconCache(t) { + to.canExpireCache() && t.postRenderFunctions.push(m0); + } +} +function m0(n, t) { + to.expire(); +} +const _0 = g0; +class p0 extends Re { + constructor(t, e, i, s) { + super(t), this.inversePixelTransform = e, this.frameState = i, this.context = s; + } +} +const ad = p0, Rr = "ol-hidden", ss = "ol-unselectable", Vh = "ol-unsupported", Ao = "ol-control", Uh = "ol-collapsed", y0 = new RegExp( + [ + "^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)", + "(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)", + "(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)", + "(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?", + "(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))", + "(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))", + `?\\s*([-,\\"\\'\\sa-z]+?)\\s*$` + ].join(""), + "i" +), Wh = [ + "style", + "variant", + "weight", + "size", + "lineHeight", + "family" +], ld = function(n) { + const t = n.match(y0); + if (!t) + return null; + const e = { + lineHeight: "normal", + size: "1.2em", + style: "normal", + weight: "normal", + variant: "normal" + }; + for (let i = 0, s = Wh.length; i < s; ++i) { + const r = t[i + 1]; + r !== void 0 && (e[Wh[i]] = r); + } + return e.families = e.family.split(/,\s?/), e; +}; +function pe(n, t, e, i) { + let s; + return e && e.length ? s = e.shift() : ml ? s = new OffscreenCanvas(n || 300, t || 300) : s = document.createElement("canvas"), n && (s.width = n), t && (s.height = t), s.getContext("2d", i); +} +function hd(n) { + const t = n.canvas; + t.width = 1, t.height = 1, n.clearRect(0, 0, 1, 1); +} +function io(n, t) { + const e = t.parentNode; + e && e.replaceChild(n, t); +} +function Aa(n) { + return n && n.parentNode ? n.parentNode.removeChild(n) : null; +} +function v0(n) { + for (; n.lastChild; ) + n.removeChild(n.lastChild); +} +function x0(n, t) { + const e = n.childNodes; + for (let i = 0; ; ++i) { + const s = e[i], r = t[i]; + if (!s && !r) + break; + if (s !== r) { + if (!s) { + n.appendChild(r); + continue; + } + if (!r) { + n.removeChild(s), --i; + continue; + } + n.insertBefore(r, s); + } + } +} +const cd = "10px sans-serif", ai = "#000", no = "round", Ns = [], Ds = 0, Xn = "round", ks = 10, Gs = "#000", $s = "center", so = "middle", Ui = [0, 0, 0, 0], Bs = 1, ti = new Oe(); +let Rn = null, Oa; +const Fa = {}, C0 = function() { + const t = "32px ", e = ["monospace", "serif"], i = e.length, s = "wmytzilWMYTZIL@#/&?$%10\uF013"; + let r, o; + function a(h, c, u) { + let d = !0; + for (let f = 0; f < i; ++f) { + const g = e[f]; + if (o = ro( + h + " " + c + " " + t + g, + s + ), u != g) { + const m = ro( + h + " " + c + " " + t + u + "," + g, + s + ); + d = d && m != o; + } + } + return !!d; + } + function l() { + let h = !0; + const c = ti.getKeys(); + for (let u = 0, d = c.length; u < d; ++u) { + const f = c[u]; + ti.get(f) < 100 && (a.apply(this, f.split(` +`)) ? (Ks(Fa), Rn = null, Oa = void 0, ti.set(f, 100)) : (ti.set(f, ti.get(f) + 1, !0), h = !1)); + } + h && (clearInterval(r), r = void 0); + } + return function(h) { + const c = ld(h); + if (!c) + return; + const u = c.families; + for (let d = 0, f = u.length; d < f; ++d) { + const g = u[d], m = c.style + ` +` + c.weight + ` +` + g; + ti.get(m) === void 0 && (ti.set(m, 100, !0), a(c.style, c.weight, g) || (ti.set(m, 0, !0), r === void 0 && (r = setInterval(l, 32)))); + } + }; +}(), M0 = function() { + let n; + return function(t) { + let e = Fa[t]; + if (e == null) { + if (ml) { + const i = ld(t), s = ud(t, "\u017Dg"); + e = (isNaN(Number(i.lineHeight)) ? 1.2 : Number(i.lineHeight)) * (s.actualBoundingBoxAscent + s.actualBoundingBoxDescent); + } else + n || (n = document.createElement("div"), n.innerHTML = "M", n.style.minHeight = "0", n.style.maxHeight = "none", n.style.height = "auto", n.style.padding = "0", n.style.border = "none", n.style.position = "absolute", n.style.display = "block", n.style.left = "-99999px"), n.style.font = t, document.body.appendChild(n), e = n.offsetHeight, document.body.removeChild(n); + Fa[t] = e; + } + return e; + }; +}(); +function ud(n, t) { + return Rn || (Rn = pe(1, 1)), n != Oa && (Rn.font = n, Oa = Rn.font), Rn.measureText(t); +} +function ro(n, t) { + return ud(n, t).width; +} +function Hh(n, t, e) { + if (t in e) + return e[t]; + const i = t.split(` +`).reduce((s, r) => Math.max(s, ro(n, r)), 0); + return e[t] = i, i; +} +function E0(n, t) { + const e = [], i = [], s = []; + let r = 0, o = 0, a = 0, l = 0; + for (let h = 0, c = t.length; h <= c; h += 2) { + const u = t[h]; + if (u === ` +` || h === c) { + r = Math.max(r, o), s.push(o), o = 0, a += l; + continue; + } + const d = t[h + 1] || n.font, f = ro(d, u); + e.push(f), o += f; + const g = M0(d); + i.push(g), l = Math.max(l, g); + } + return { width: r, height: a, widths: e, heights: i, lineWidths: s }; +} +function w0(n, t, e, i, s, r, o, a, l, h, c) { + n.save(), e !== 1 && (n.globalAlpha *= e), t && n.setTransform.apply(n, t), i.contextInstructions ? (n.translate(l, h), n.scale(c[0], c[1]), S0(i, n)) : c[0] < 0 || c[1] < 0 ? (n.translate(l, h), n.scale(c[0], c[1]), n.drawImage( + i, + s, + r, + o, + a, + 0, + 0, + o, + a + )) : n.drawImage( + i, + s, + r, + o, + a, + l, + h, + o * c[0], + a * c[1] + ), n.restore(); +} +function S0(n, t) { + const e = n.contextInstructions; + for (let i = 0, s = e.length; i < s; i += 2) + Array.isArray(e[i + 1]) ? t[e[i]].apply( + t, + e[i + 1] + ) : t[e[i]] = e[i + 1]; +} +class R0 extends _0 { + constructor(t) { + super(t), this.fontChangeListenerKey_ = et( + ti, + Wn.PROPERTYCHANGE, + t.redrawText.bind(t) + ), this.element_ = document.createElement("div"); + const e = this.element_.style; + e.position = "absolute", e.width = "100%", e.height = "100%", e.zIndex = "0", this.element_.className = ss + " ol-layers"; + const i = t.getViewport(); + i.insertBefore(this.element_, i.firstChild || null), this.children_ = [], this.renderedVisible_ = !0; + } + dispatchRenderEvent(t, e) { + const i = this.getMap(); + if (i.hasListener(t)) { + const s = new ad(t, void 0, e); + i.dispatchEvent(s); + } + } + disposeInternal() { + mt(this.fontChangeListenerKey_), this.element_.parentNode.removeChild(this.element_), super.disposeInternal(); + } + renderFrame(t) { + if (!t) { + this.renderedVisible_ && (this.element_.style.display = "none", this.renderedVisible_ = !1); + return; + } + this.calculateMatrices2D(t), this.dispatchRenderEvent(Ri.PRECOMPOSE, t); + const e = t.layerStatesArray.sort(function(o, a) { + return o.zIndex - a.zIndex; + }), i = t.viewState; + this.children_.length = 0; + const s = []; + let r = null; + for (let o = 0, a = e.length; o < a; ++o) { + const l = e[o]; + t.layerIndex = o; + const h = l.layer, c = h.getSourceState(); + if (!Cl(l, i) || c != "ready" && c != "undefined") { + h.unrender(); + continue; + } + const u = h.render(t, r); + !u || (u !== r && (this.children_.push(u), r = u), "getDeclutter" in h && s.push( + h + )); + } + for (let o = s.length - 1; o >= 0; --o) + s[o].renderDeclutter(t); + x0(this.element_, this.children_), this.dispatchRenderEvent(Ri.POSTCOMPOSE, t), this.renderedVisible_ || (this.element_.style.display = "", this.renderedVisible_ = !0), this.scheduleExpireIconCache(t); + } +} +const T0 = R0; +class Ci extends Re { + constructor(t, e) { + super(t), this.layer = e; + } +} +const sa = { + LAYERS: "layers" +}; +class wl extends id { + constructor(t) { + t = t || {}; + const e = Object.assign({}, t); + delete e.layers; + let i = t.layers; + super(e), this.on, this.once, this.un, this.layersListenerKeys_ = [], this.listenerKeys_ = {}, this.addChangeListener(sa.LAYERS, this.handleLayersChanged_), i ? Array.isArray(i) ? i = new Ee(i.slice(), { unique: !0 }) : Y(typeof i.getArray == "function", 43) : i = new Ee(void 0, { unique: !0 }), this.setLayers(i); + } + handleLayerChange_() { + this.changed(); + } + handleLayersChanged_() { + this.layersListenerKeys_.forEach(mt), this.layersListenerKeys_.length = 0; + const t = this.getLayers(); + this.layersListenerKeys_.push( + et(t, Dt.ADD, this.handleLayersAdd_, this), + et(t, Dt.REMOVE, this.handleLayersRemove_, this) + ); + for (const i in this.listenerKeys_) + this.listenerKeys_[i].forEach(mt); + Ks(this.listenerKeys_); + const e = t.getArray(); + for (let i = 0, s = e.length; i < s; i++) { + const r = e[i]; + this.registerLayerListeners_(r), this.dispatchEvent(new Ci("addlayer", r)); + } + this.changed(); + } + registerLayerListeners_(t) { + const e = [ + et( + t, + Wn.PROPERTYCHANGE, + this.handleLayerChange_, + this + ), + et(t, U.CHANGE, this.handleLayerChange_, this) + ]; + t instanceof wl && e.push( + et(t, "addlayer", this.handleLayerGroupAdd_, this), + et(t, "removelayer", this.handleLayerGroupRemove_, this) + ), this.listenerKeys_[q(t)] = e; + } + handleLayerGroupAdd_(t) { + this.dispatchEvent(new Ci("addlayer", t.layer)); + } + handleLayerGroupRemove_(t) { + this.dispatchEvent(new Ci("removelayer", t.layer)); + } + handleLayersAdd_(t) { + const e = t.element; + this.registerLayerListeners_(e), this.dispatchEvent(new Ci("addlayer", e)), this.changed(); + } + handleLayersRemove_(t) { + const e = t.element, i = q(e); + this.listenerKeys_[i].forEach(mt), delete this.listenerKeys_[i], this.dispatchEvent(new Ci("removelayer", e)), this.changed(); + } + getLayers() { + return this.get(sa.LAYERS); + } + setLayers(t) { + const e = this.getLayers(); + if (e) { + const i = e.getArray(); + for (let s = 0, r = i.length; s < r; ++s) + this.dispatchEvent(new Ci("removelayer", i[s])); + } + this.set(sa.LAYERS, t); + } + getLayersArray(t) { + return t = t !== void 0 ? t : [], this.getLayers().forEach(function(e) { + e.getLayersArray(t); + }), t; + } + getLayerStatesArray(t) { + const e = t !== void 0 ? t : [], i = e.length; + this.getLayers().forEach(function(o) { + o.getLayerStatesArray(e); + }); + const s = this.getLayerState(); + let r = s.zIndex; + !t && s.zIndex === void 0 && (r = 0); + for (let o = i, a = e.length; o < a; o++) { + const l = e[o]; + l.opacity *= s.opacity, l.visible = l.visible && s.visible, l.maxResolution = Math.min( + l.maxResolution, + s.maxResolution + ), l.minResolution = Math.max( + l.minResolution, + s.minResolution + ), l.minZoom = Math.max(l.minZoom, s.minZoom), l.maxZoom = Math.min(l.maxZoom, s.maxZoom), s.extent !== void 0 && (l.extent !== void 0 ? l.extent = Rs( + l.extent, + s.extent + ) : l.extent = s.extent), l.zIndex === void 0 && (l.zIndex = r); + } + return e; + } + getSourceState() { + return "ready"; + } +} +const Oo = wl; +class b0 extends Re { + constructor(t, e, i) { + super(t), this.map = e, this.frameState = i !== void 0 ? i : null; + } +} +const Tn = b0; +class L0 extends Tn { + constructor(t, e, i, s, r, o) { + super(t, e, r), this.originalEvent = i, this.pixel_ = null, this.coordinate_ = null, this.dragging = s !== void 0 ? s : !1, this.activePointers = o; + } + get pixel() { + return this.pixel_ || (this.pixel_ = this.map.getEventPixel(this.originalEvent)), this.pixel_; + } + set pixel(t) { + this.pixel_ = t; + } + get coordinate() { + return this.coordinate_ || (this.coordinate_ = this.map.getCoordinateFromPixel(this.pixel)), this.coordinate_; + } + set coordinate(t) { + this.coordinate_ = t; + } + preventDefault() { + super.preventDefault(), "preventDefault" in this.originalEvent && this.originalEvent.preventDefault(); + } + stopPropagation() { + super.stopPropagation(), "stopPropagation" in this.originalEvent && this.originalEvent.stopPropagation(); + } +} +const ei = L0, nt = { + SINGLECLICK: "singleclick", + CLICK: U.CLICK, + DBLCLICK: U.DBLCLICK, + POINTERDRAG: "pointerdrag", + POINTERMOVE: "pointermove", + POINTERDOWN: "pointerdown", + POINTERUP: "pointerup", + POINTEROVER: "pointerover", + POINTEROUT: "pointerout", + POINTERENTER: "pointerenter", + POINTERLEAVE: "pointerleave", + POINTERCANCEL: "pointercancel" +}, Na = { + POINTERMOVE: "pointermove", + POINTERDOWN: "pointerdown", + POINTERUP: "pointerup", + POINTEROVER: "pointerover", + POINTEROUT: "pointerout", + POINTERENTER: "pointerenter", + POINTERLEAVE: "pointerleave", + POINTERCANCEL: "pointercancel" +}; +class I0 extends So { + constructor(t, e) { + super(t), this.map_ = t, this.clickTimeoutId_, this.emulateClicks_ = !1, this.dragging_ = !1, this.dragListenerKeys_ = [], this.moveTolerance_ = e === void 0 ? 1 : e, this.down_ = null; + const i = this.map_.getViewport(); + this.activePointers_ = [], this.trackedTouches_ = {}, this.element_ = i, this.pointerdownListenerKey_ = et( + i, + Na.POINTERDOWN, + this.handlePointerDown_, + this + ), this.originalPointerMoveEvent_, this.relayedListenerKey_ = et( + i, + Na.POINTERMOVE, + this.relayMoveEvent_, + this + ), this.boundHandleTouchMove_ = this.handleTouchMove_.bind(this), this.element_.addEventListener( + U.TOUCHMOVE, + this.boundHandleTouchMove_, + Xu ? { passive: !1 } : !1 + ); + } + emulateClick_(t) { + let e = new ei( + nt.CLICK, + this.map_, + t + ); + this.dispatchEvent(e), this.clickTimeoutId_ !== void 0 ? (clearTimeout(this.clickTimeoutId_), this.clickTimeoutId_ = void 0, e = new ei( + nt.DBLCLICK, + this.map_, + t + ), this.dispatchEvent(e)) : this.clickTimeoutId_ = setTimeout( + function() { + this.clickTimeoutId_ = void 0; + const i = new ei( + nt.SINGLECLICK, + this.map_, + t + ); + this.dispatchEvent(i); + }.bind(this), + 250 + ); + } + updateActivePointers_(t) { + const e = t, i = e.pointerId; + if (e.type == nt.POINTERUP || e.type == nt.POINTERCANCEL) { + delete this.trackedTouches_[i]; + for (const s in this.trackedTouches_) + if (this.trackedTouches_[s].target !== e.target) { + delete this.trackedTouches_[s]; + break; + } + } else + (e.type == nt.POINTERDOWN || e.type == nt.POINTERMOVE) && (this.trackedTouches_[i] = e); + this.activePointers_ = Object.values(this.trackedTouches_); + } + handlePointerUp_(t) { + this.updateActivePointers_(t); + const e = new ei( + nt.POINTERUP, + this.map_, + t, + void 0, + void 0, + this.activePointers_ + ); + this.dispatchEvent(e), this.emulateClicks_ && !e.defaultPrevented && !this.dragging_ && this.isMouseActionButton_(t) && this.emulateClick_(this.down_), this.activePointers_.length === 0 && (this.dragListenerKeys_.forEach(mt), this.dragListenerKeys_.length = 0, this.dragging_ = !1, this.down_ = null); + } + isMouseActionButton_(t) { + return t.button === 0; + } + handlePointerDown_(t) { + this.emulateClicks_ = this.activePointers_.length === 0, this.updateActivePointers_(t); + const e = new ei( + nt.POINTERDOWN, + this.map_, + t, + void 0, + void 0, + this.activePointers_ + ); + this.dispatchEvent(e), this.down_ = {}; + for (const i in t) { + const s = t[i]; + this.down_[i] = typeof s == "function" ? nn : s; + } + if (this.dragListenerKeys_.length === 0) { + const i = this.map_.getOwnerDocument(); + this.dragListenerKeys_.push( + et( + i, + nt.POINTERMOVE, + this.handlePointerMove_, + this + ), + et(i, nt.POINTERUP, this.handlePointerUp_, this), + et( + this.element_, + nt.POINTERCANCEL, + this.handlePointerUp_, + this + ) + ), this.element_.getRootNode && this.element_.getRootNode() !== i && this.dragListenerKeys_.push( + et( + this.element_.getRootNode(), + nt.POINTERUP, + this.handlePointerUp_, + this + ) + ); + } + } + handlePointerMove_(t) { + if (this.isMoving_(t)) { + this.updateActivePointers_(t), this.dragging_ = !0; + const e = new ei( + nt.POINTERDRAG, + this.map_, + t, + this.dragging_, + void 0, + this.activePointers_ + ); + this.dispatchEvent(e); + } + } + relayMoveEvent_(t) { + this.originalPointerMoveEvent_ = t; + const e = !!(this.down_ && this.isMoving_(t)); + this.dispatchEvent( + new ei( + nt.POINTERMOVE, + this.map_, + t, + e + ) + ); + } + handleTouchMove_(t) { + const e = this.originalPointerMoveEvent_; + (!e || e.defaultPrevented) && (typeof t.cancelable != "boolean" || t.cancelable === !0) && t.preventDefault(); + } + isMoving_(t) { + return this.dragging_ || Math.abs(t.clientX - this.down_.clientX) > this.moveTolerance_ || Math.abs(t.clientY - this.down_.clientY) > this.moveTolerance_; + } + disposeInternal() { + this.relayedListenerKey_ && (mt(this.relayedListenerKey_), this.relayedListenerKey_ = null), this.element_.removeEventListener( + U.TOUCHMOVE, + this.boundHandleTouchMove_ + ), this.pointerdownListenerKey_ && (mt(this.pointerdownListenerKey_), this.pointerdownListenerKey_ = null), this.dragListenerKeys_.forEach(mt), this.dragListenerKeys_.length = 0, this.element_ = null, super.disposeInternal(); + } +} +const P0 = I0, vi = { + POSTRENDER: "postrender", + MOVESTART: "movestart", + MOVEEND: "moveend", + LOADSTART: "loadstart", + LOADEND: "loadend" +}, Ot = { + LAYERGROUP: "layergroup", + SIZE: "size", + TARGET: "target", + VIEW: "view" +}, oo = 1 / 0; +class A0 { + constructor(t, e) { + this.priorityFunction_ = t, this.keyFunction_ = e, this.elements_ = [], this.priorities_ = [], this.queuedElements_ = {}; + } + clear() { + this.elements_.length = 0, this.priorities_.length = 0, Ks(this.queuedElements_); + } + dequeue() { + const t = this.elements_, e = this.priorities_, i = t[0]; + t.length == 1 ? (t.length = 0, e.length = 0) : (t[0] = t.pop(), e[0] = e.pop(), this.siftUp_(0)); + const s = this.keyFunction_(i); + return delete this.queuedElements_[s], i; + } + enqueue(t) { + Y(!(this.keyFunction_(t) in this.queuedElements_), 31); + const e = this.priorityFunction_(t); + return e != oo ? (this.elements_.push(t), this.priorities_.push(e), this.queuedElements_[this.keyFunction_(t)] = !0, this.siftDown_(0, this.elements_.length - 1), !0) : !1; + } + getCount() { + return this.elements_.length; + } + getLeftChildIndex_(t) { + return t * 2 + 1; + } + getRightChildIndex_(t) { + return t * 2 + 2; + } + getParentIndex_(t) { + return t - 1 >> 1; + } + heapify_() { + let t; + for (t = (this.elements_.length >> 1) - 1; t >= 0; t--) + this.siftUp_(t); + } + isEmpty() { + return this.elements_.length === 0; + } + isKeyQueued(t) { + return t in this.queuedElements_; + } + isQueued(t) { + return this.isKeyQueued(this.keyFunction_(t)); + } + siftUp_(t) { + const e = this.elements_, i = this.priorities_, s = e.length, r = e[t], o = i[t], a = t; + for (; t < s >> 1; ) { + const l = this.getLeftChildIndex_(t), h = this.getRightChildIndex_(t), c = h < s && i[h] < i[l] ? h : l; + e[t] = e[c], i[t] = i[c], t = c; + } + e[t] = r, i[t] = o, this.siftDown_(a, t); + } + siftDown_(t, e) { + const i = this.elements_, s = this.priorities_, r = i[e], o = s[e]; + for (; e > t; ) { + const a = this.getParentIndex_(e); + if (s[a] > o) + i[e] = i[a], s[e] = s[a], e = a; + else + break; + } + i[e] = r, s[e] = o; + } + reprioritize() { + const t = this.priorityFunction_, e = this.elements_, i = this.priorities_; + let s = 0; + const r = e.length; + let o, a, l; + for (a = 0; a < r; ++a) + o = e[a], l = t(o), l == oo ? delete this.queuedElements_[this.keyFunction_(o)] : (i[s] = l, e[s++] = o); + e.length = s, i.length = s, this.heapify_(); + } +} +const O0 = A0, z = { + IDLE: 0, + LOADING: 1, + LOADED: 2, + ERROR: 3, + EMPTY: 4 +}; +class F0 extends O0 { + constructor(t, e) { + super( + function(i) { + return t.apply(null, i); + }, + function(i) { + return i[0].getKey(); + } + ), this.boundHandleTileChange_ = this.handleTileChange.bind(this), this.tileChangeCallback_ = e, this.tilesLoading_ = 0, this.tilesLoadingKeys_ = {}; + } + enqueue(t) { + const e = super.enqueue(t); + return e && t[0].addEventListener(U.CHANGE, this.boundHandleTileChange_), e; + } + getTilesLoading() { + return this.tilesLoading_; + } + handleTileChange(t) { + const e = t.target, i = e.getState(); + if (i === z.LOADED || i === z.ERROR || i === z.EMPTY) { + i !== z.ERROR && e.removeEventListener(U.CHANGE, this.boundHandleTileChange_); + const s = e.getKey(); + s in this.tilesLoadingKeys_ && (delete this.tilesLoadingKeys_[s], --this.tilesLoading_), this.tileChangeCallback_(); + } + } + loadMoreTiles(t, e) { + let i = 0, s, r, o; + for (; this.tilesLoading_ < t && i < e && this.getCount() > 0; ) + r = this.dequeue()[0], o = r.getKey(), s = r.getState(), s === z.IDLE && !(o in this.tilesLoadingKeys_) && (this.tilesLoadingKeys_[o] = !0, ++this.tilesLoading_, ++i, r.load()); + } +} +const N0 = F0; +function D0(n, t, e, i, s) { + if (!n || !(e in n.wantedTiles) || !n.wantedTiles[e][t.getKey()]) + return oo; + const r = n.viewState.center, o = i[0] - r[0], a = i[1] - r[1]; + return 65536 * Math.log(s) + Math.sqrt(o * o + a * a) / s; +} +const Wt = { + ANIMATING: 0, + INTERACTING: 1 +}, be = { + CENTER: "center", + RESOLUTION: "resolution", + ROTATION: "rotation" +}, k0 = 42, Sl = 256, Yn = { + radians: 6370997 / (2 * Math.PI), + degrees: 2 * Math.PI * 6370997 / 360, + ft: 0.3048, + m: 1, + "us-ft": 1200 / 3937 +}; +class G0 { + constructor(t) { + this.code_ = t.code, this.units_ = t.units, this.extent_ = t.extent !== void 0 ? t.extent : null, this.worldExtent_ = t.worldExtent !== void 0 ? t.worldExtent : null, this.axisOrientation_ = t.axisOrientation !== void 0 ? t.axisOrientation : "enu", this.global_ = t.global !== void 0 ? t.global : !1, this.canWrapX_ = !!(this.global_ && this.extent_), this.getPointResolutionFunc_ = t.getPointResolution, this.defaultTileGrid_ = null, this.metersPerUnit_ = t.metersPerUnit; + } + canWrapX() { + return this.canWrapX_; + } + getCode() { + return this.code_; + } + getExtent() { + return this.extent_; + } + getUnits() { + return this.units_; + } + getMetersPerUnit() { + return this.metersPerUnit_ || Yn[this.units_]; + } + getWorldExtent() { + return this.worldExtent_; + } + getAxisOrientation() { + return this.axisOrientation_; + } + isGlobal() { + return this.global_; + } + setGlobal(t) { + this.global_ = t, this.canWrapX_ = !!(t && this.extent_); + } + getDefaultTileGrid() { + return this.defaultTileGrid_; + } + setDefaultTileGrid(t) { + this.defaultTileGrid_ = t; + } + setExtent(t) { + this.extent_ = t, this.canWrapX_ = !!(this.global_ && t); + } + setWorldExtent(t) { + this.worldExtent_ = t; + } + setGetPointResolution(t) { + this.getPointResolutionFunc_ = t; + } + getPointResolutionFunc() { + return this.getPointResolutionFunc_; + } +} +const Rl = G0, tr = 6378137, Pn = Math.PI * tr, $0 = [-Pn, -Pn, Pn, Pn], B0 = [-180, -85, 180, 85], Tr = tr * Math.log(Math.tan(Math.PI / 2)); +class Cn extends Rl { + constructor(t) { + super({ + code: t, + units: "m", + extent: $0, + global: !0, + worldExtent: B0, + getPointResolution: function(e, i) { + return e / Math.cosh(i[1] / tr); + } + }); + } +} +const Xh = [ + new Cn("EPSG:3857"), + new Cn("EPSG:102100"), + new Cn("EPSG:102113"), + new Cn("EPSG:900913"), + new Cn("http://www.opengis.net/def/crs/EPSG/0/3857"), + new Cn("http://www.opengis.net/gml/srs/epsg.xml#3857") +]; +function z0(n, t, e) { + const i = n.length; + e = e > 1 ? e : 2, t === void 0 && (e > 2 ? t = n.slice() : t = new Array(i)); + for (let s = 0; s < i; s += e) { + t[s] = Pn * n[s] / 180; + let r = tr * Math.log(Math.tan(Math.PI * (+n[s + 1] + 90) / 360)); + r > Tr ? r = Tr : r < -Tr && (r = -Tr), t[s + 1] = r; + } + return t; +} +function Z0(n, t, e) { + const i = n.length; + e = e > 1 ? e : 2, t === void 0 && (e > 2 ? t = n.slice() : t = new Array(i)); + for (let s = 0; s < i; s += e) + t[s] = 180 * n[s] / Pn, t[s + 1] = 360 * Math.atan(Math.exp(n[s + 1] / tr)) / Math.PI - 90; + return t; +} +const V0 = 6378137, Yh = [-180, -90, 180, 90], U0 = Math.PI * V0 / 180; +class Bi extends Rl { + constructor(t, e) { + super({ + code: t, + units: "degrees", + extent: Yh, + axisOrientation: e, + global: !0, + metersPerUnit: U0, + worldExtent: Yh + }); + } +} +const jh = [ + new Bi("CRS:84"), + new Bi("EPSG:4326", "neu"), + new Bi("urn:ogc:def:crs:OGC:1.3:CRS84"), + new Bi("urn:ogc:def:crs:OGC:2:84"), + new Bi("http://www.opengis.net/def/crs/OGC/1.3/CRS84"), + new Bi("http://www.opengis.net/gml/srs/epsg.xml#4326", "neu"), + new Bi("http://www.opengis.net/def/crs/EPSG/0/4326", "neu") +]; +let Da = {}; +function W0(n) { + return Da[n] || Da[n.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null; +} +function H0(n, t) { + Da[n] = t; +} +let Bn = {}; +function jn(n, t, e) { + const i = n.getCode(), s = t.getCode(); + i in Bn || (Bn[i] = {}), Bn[i][s] = e; +} +function dd(n, t) { + let e; + return n in Bn && t in Bn[n] && (e = Bn[n][t]), e; +} +const fd = 63710088e-1; +function qh(n, t, e) { + e = e || fd; + const i = ji(n[1]), s = ji(t[1]), r = (s - i) / 2, o = ji(t[0] - n[0]) / 2, a = Math.sin(r) * Math.sin(r) + Math.sin(o) * Math.sin(o) * Math.cos(i) * Math.cos(s); + return 2 * e * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); +} +function X0(n, t, e, i) { + i = i || fd; + const s = ji(n[1]), r = ji(n[0]), o = t / i, a = Math.asin( + Math.sin(s) * Math.cos(o) + Math.cos(s) * Math.sin(o) * Math.cos(e) + ), l = r + Math.atan2( + Math.sin(e) * Math.sin(o) * Math.cos(s), + Math.cos(o) - Math.sin(s) * Math.sin(a) + ); + return [Bh(l), Bh(a)]; +} +let ka = !0; +function gd(n) { + ka = !(n === void 0 ? !0 : n); +} +function Tl(n, t, e) { + if (t !== void 0) { + for (let i = 0, s = n.length; i < s; ++i) + t[i] = n[i]; + t = t; + } else + t = n.slice(); + return t; +} +function bl(n, t, e) { + if (t !== void 0 && n !== t) { + for (let i = 0, s = n.length; i < s; ++i) + t[i] = n[i]; + n = t; + } + return n; +} +function md(n) { + H0(n.getCode(), n), jn(n, n, Tl); +} +function Y0(n) { + n.forEach(md); +} +function Q(n) { + return typeof n == "string" ? W0(n) : n || null; +} +function ao(n, t, e, i) { + n = Q(n); + let s; + const r = n.getPointResolutionFunc(); + if (r) { + if (s = r(t, e), i && i !== n.getUnits()) { + const o = n.getMetersPerUnit(); + o && (s = s * o / Yn[i]); + } + } else { + const o = n.getUnits(); + if (o == "degrees" && !i || i == "degrees") + s = t; + else { + const a = Fo( + n, + Q("EPSG:4326") + ); + if (a === bl && o !== "degrees") + s = t * n.getMetersPerUnit(); + else { + let h = [ + e[0] - t / 2, + e[1], + e[0] + t / 2, + e[1], + e[0], + e[1] - t / 2, + e[0], + e[1] + t / 2 + ]; + h = a(h, h, 2); + const c = qh(h.slice(0, 2), h.slice(2, 4)), u = qh(h.slice(4, 6), h.slice(6, 8)); + s = (c + u) / 2; + } + const l = i ? Yn[i] : n.getMetersPerUnit(); + l !== void 0 && (s /= l); + } + } + return s; +} +function Ga(n) { + Y0(n), n.forEach(function(t) { + n.forEach(function(e) { + t !== e && jn(t, e, Tl); + }); + }); +} +function j0(n, t, e, i) { + n.forEach(function(s) { + t.forEach(function(r) { + jn(s, r, e), jn(r, s, i); + }); + }); +} +function Ll(n, t) { + return n ? typeof n == "string" ? Q(n) : n : Q(t); +} +function Kh(n) { + return function(t, e, i) { + const s = t.length; + i = i !== void 0 ? i : 2, e = e !== void 0 ? e : new Array(s); + for (let r = 0; r < s; r += i) { + const o = n(t.slice(r, r + i)), a = o.length; + for (let l = 0, h = i; l < h; ++l) + e[r + l] = l >= a ? t[r + l] : o[l]; + } + return e; + }; +} +function q0(n, t, e, i) { + const s = Q(n), r = Q(t); + jn( + s, + r, + Kh(e) + ), jn( + r, + s, + Kh(i) + ); +} +function K0(n, t) { + return gd(), _d( + n, + "EPSG:4326", + t !== void 0 ? t : "EPSG:3857" + ); +} +function Ne(n, t) { + if (n === t) + return !0; + const e = n.getUnits() === t.getUnits(); + return (n.getCode() === t.getCode() || Fo(n, t) === Tl) && e; +} +function Fo(n, t) { + const e = n.getCode(), i = t.getCode(); + let s = dd(e, i); + return s || (s = bl), s; +} +function zs(n, t) { + const e = Q(n), i = Q(t); + return Fo(e, i); +} +function _d(n, t, e) { + return zs(t, e)(n, void 0, n.length); +} +function pd(n, t, e, i) { + const s = zs(t, e); + return t0(n, s, void 0, i); +} +function qn(n, t) { + return n; +} +function vt(n, t) { + return ka && !Le(n, [0, 0]) && n[0] >= -180 && n[0] <= 180 && n[1] >= -90 && n[1] <= 90 && (ka = !1, console.warn( + "Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates." + )), n; +} +function Il(n, t) { + return n; +} +function Mi(n, t) { + return n; +} +function Jh(n, t, e) { + return function(i) { + let s, r; + if (n.canWrapX()) { + const o = n.getExtent(), a = pt(o); + i = i.slice(0), r = od(i, n, a), r && (i[0] = i[0] - r * a), i[0] = Et(i[0], o[0], o[2]), i[1] = Et(i[1], o[1], o[3]), s = e(i); + } else + s = e(i); + return r && t.canWrapX() && (s[0] += r * pt(t.getExtent())), s; + }; +} +function J0() { + Ga(Xh), Ga(jh), j0( + jh, + Xh, + z0, + Z0 + ); +} +J0(); +function Qh(n, t, e) { + return function(i, s, r, o, a) { + if (!i) + return; + if (!s && !t) + return i; + const l = t ? 0 : r[0] * s, h = t ? 0 : r[1] * s, c = a ? a[0] : 0, u = a ? a[1] : 0; + let d = n[0] + l / 2 + c, f = n[2] - l / 2 + c, g = n[1] + h / 2 + u, m = n[3] - h / 2 + u; + d > f && (d = (f + d) / 2, f = d), g > m && (g = (m + g) / 2, m = g); + let _ = Et(i[0], d, f), y = Et(i[1], g, m); + if (o && e && s) { + const p = 30 * s; + _ += -p * Math.log(1 + Math.max(0, d - i[0]) / p) + p * Math.log(1 + Math.max(0, i[0] - f) / p), y += -p * Math.log(1 + Math.max(0, g - i[1]) / p) + p * Math.log(1 + Math.max(0, i[1] - m) / p); + } + return [_, y]; + }; +} +function Q0(n) { + return n; +} +function Pl(n, t, e, i) { + const s = pt(t) / e[0], r = ze(t) / e[1]; + return i ? Math.min(n, Math.max(s, r)) : Math.min(n, Math.min(s, r)); +} +function Al(n, t, e) { + let i = Math.min(n, t); + const s = 50; + return i *= Math.log(1 + s * Math.max(0, n / t - 1)) / s + 1, e && (i = Math.max(i, e), i /= Math.log(1 + s * Math.max(0, e / n - 1)) / s + 1), Et(i, e / 2, t * 2); +} +function t1(n, t, e, i) { + return t = t !== void 0 ? t : !0, function(s, r, o, a) { + if (s !== void 0) { + const l = n[0], h = n[n.length - 1], c = e ? Pl( + l, + e, + o, + i + ) : l; + if (a) + return t ? Al( + s, + c, + h + ) : Et(s, h, c); + const u = Math.min(c, s), d = Math.floor(gl(n, u, r)); + return n[d] > c && d < n.length - 1 ? n[d + 1] : n[d]; + } else + return; + }; +} +function e1(n, t, e, i, s, r) { + return i = i !== void 0 ? i : !0, e = e !== void 0 ? e : 0, function(o, a, l, h) { + if (o !== void 0) { + const c = s ? Pl( + t, + s, + l, + r + ) : t; + if (h) + return i ? Al( + o, + c, + e + ) : Et(o, e, c); + const u = 1e-9, d = Math.ceil( + Math.log(t / c) / Math.log(n) - u + ), f = -a * (0.5 - u) + 0.5, g = Math.min(c, o), m = Math.floor( + Math.log(t / g) / Math.log(n) + f + ), _ = Math.max(d, m), y = t / Math.pow(n, _); + return Et(y, e, c); + } else + return; + }; +} +function tc(n, t, e, i, s) { + return e = e !== void 0 ? e : !0, function(r, o, a, l) { + if (r !== void 0) { + const h = i ? Pl( + n, + i, + a, + s + ) : n; + return !e || !l ? Et(r, t, h) : Al( + r, + h, + t + ); + } else + return; + }; +} +function Ol(n) { + if (n !== void 0) + return 0; +} +function ec(n) { + if (n !== void 0) + return n; +} +function i1(n) { + const t = 2 * Math.PI / n; + return function(e, i) { + if (i) + return e; + if (e !== void 0) + return e = Math.floor(e / t + 0.5) * t, e; + }; +} +function n1(n) { + return n = n || ji(5), function(t, e) { + if (e) + return t; + if (t !== void 0) + return Math.abs(t) <= n ? 0 : t; + }; +} +function yd(n) { + return Math.pow(n, 3); +} +function rs(n) { + return 1 - yd(1 - n); +} +function s1(n) { + return 3 * n * n - 2 * n * n * n; +} +function r1(n) { + return n; +} +function Ki(n, t, e, i, s, r) { + r = r || []; + let o = 0; + for (let a = t; a < e; a += i) { + const l = n[a], h = n[a + 1]; + r[o++] = s[0] * l + s[2] * h + s[4], r[o++] = s[1] * l + s[3] * h + s[5]; + } + return r && r.length != o && (r.length = o), r; +} +function Fl(n, t, e, i, s, r, o) { + o = o || []; + const a = Math.cos(s), l = Math.sin(s), h = r[0], c = r[1]; + let u = 0; + for (let d = t; d < e; d += i) { + const f = n[d] - h, g = n[d + 1] - c; + o[u++] = h + f * a - g * l, o[u++] = c + f * l + g * a; + for (let m = d + 2; m < d + i; ++m) + o[u++] = n[m]; + } + return o && o.length != u && (o.length = u), o; +} +function o1(n, t, e, i, s, r, o, a) { + a = a || []; + const l = o[0], h = o[1]; + let c = 0; + for (let u = t; u < e; u += i) { + const d = n[u] - l, f = n[u + 1] - h; + a[c++] = l + s * d, a[c++] = h + r * f; + for (let g = u + 2; g < u + i; ++g) + a[c++] = n[g]; + } + return a && a.length != c && (a.length = c), a; +} +function vd(n, t, e, i, s, r, o) { + o = o || []; + let a = 0; + for (let l = t; l < e; l += i) { + o[a++] = n[l] + s, o[a++] = n[l + 1] + r; + for (let h = l + 2; h < l + i; ++h) + o[a++] = n[h]; + } + return o && o.length != a && (o.length = a), o; +} +const ic = $e(); +class a1 extends Oe { + constructor() { + super(), this.extent_ = se(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = Ag(function(t, e, i) { + if (!i) + return this.getSimplifiedGeometry(e); + const s = this.clone(); + return s.applyTransform(i), s.getSimplifiedGeometry(e); + }); + } + simplifyTransformed(t, e) { + return this.simplifyTransformedInternal( + this.getRevision(), + t, + e + ); + } + clone() { + return H(); + } + closestPointXY(t, e, i, s) { + return H(); + } + containsXY(t, e) { + const i = this.getClosestPoint([t, e]); + return i[0] === t && i[1] === e; + } + getClosestPoint(t, e) { + return e = e || [NaN, NaN], this.closestPointXY(t[0], t[1], e, 1 / 0), e; + } + intersectsCoordinate(t) { + return this.containsXY(t[0], t[1]); + } + computeExtent(t) { + return H(); + } + getExtent(t) { + if (this.extentRevision_ != this.getRevision()) { + const e = this.computeExtent(this.extent_); + (isNaN(e[0]) || isNaN(e[1])) && Qs(e), this.extentRevision_ = this.getRevision(); + } + return Jg(this.extent_, t); + } + rotate(t, e) { + H(); + } + scale(t, e, i) { + H(); + } + simplify(t) { + return this.getSimplifiedGeometry(t * t); + } + getSimplifiedGeometry(t) { + return H(); + } + getType() { + return H(); + } + applyTransform(t) { + H(); + } + intersectsExtent(t) { + return H(); + } + translate(t, e) { + H(); + } + transform(t, e) { + const i = Q(t), s = i.getUnits() == "tile-pixels" ? function(r, o, a) { + const l = i.getExtent(), h = i.getWorldExtent(), c = ze(h) / ze(l); + return Ii( + ic, + h[0], + h[3], + c, + -c, + 0, + 0, + 0 + ), Ki( + r, + 0, + r.length, + a, + ic, + o + ), zs(i, e)( + r, + o, + a + ); + } : zs(i, e); + return this.applyTransform(s), this; + } +} +const xd = a1; +class l1 extends xd { + constructor() { + super(), this.layout = "XY", this.stride = 2, this.flatCoordinates = null; + } + computeExtent(t) { + return qu( + this.flatCoordinates, + 0, + this.flatCoordinates.length, + this.stride, + t + ); + } + getCoordinates() { + return H(); + } + getFirstCoordinate() { + return this.flatCoordinates.slice(0, this.stride); + } + getFlatCoordinates() { + return this.flatCoordinates; + } + getLastCoordinate() { + return this.flatCoordinates.slice( + this.flatCoordinates.length - this.stride + ); + } + getLayout() { + return this.layout; + } + getSimplifiedGeometry(t) { + if (this.simplifiedGeometryRevision !== this.getRevision() && (this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = this.getRevision()), t < 0 || this.simplifiedGeometryMaxMinSquaredTolerance !== 0 && t <= this.simplifiedGeometryMaxMinSquaredTolerance) + return this; + const e = this.getSimplifiedGeometryInternal(t); + return e.getFlatCoordinates().length < this.flatCoordinates.length ? e : (this.simplifiedGeometryMaxMinSquaredTolerance = t, this); + } + getSimplifiedGeometryInternal(t) { + return this; + } + getStride() { + return this.stride; + } + setFlatCoordinates(t, e) { + this.stride = lo(t), this.layout = t, this.flatCoordinates = e; + } + setCoordinates(t, e) { + H(); + } + setLayout(t, e, i) { + let s; + if (t) + s = lo(t); + else { + for (let r = 0; r < i; ++r) + if (e.length === 0) { + this.layout = "XY", this.stride = 2; + return; + } else + e = e[0]; + s = e.length, t = h1(s); + } + this.layout = t, this.stride = s; + } + applyTransform(t) { + this.flatCoordinates && (t(this.flatCoordinates, this.flatCoordinates, this.stride), this.changed()); + } + rotate(t, e) { + const i = this.getFlatCoordinates(); + if (i) { + const s = this.getStride(); + Fl( + i, + 0, + i.length, + s, + t, + e, + i + ), this.changed(); + } + } + scale(t, e, i) { + e === void 0 && (e = t), i || (i = Pi(this.getExtent())); + const s = this.getFlatCoordinates(); + if (s) { + const r = this.getStride(); + o1( + s, + 0, + s.length, + r, + t, + e, + i, + s + ), this.changed(); + } + } + translate(t, e) { + const i = this.getFlatCoordinates(); + if (i) { + const s = this.getStride(); + vd( + i, + 0, + i.length, + s, + t, + e, + i + ), this.changed(); + } + } +} +function h1(n) { + let t; + return n == 2 ? t = "XY" : n == 3 ? t = "XYZ" : n == 4 && (t = "XYZM"), t; +} +function lo(n) { + let t; + return n == "XY" ? t = 2 : n == "XYZ" || n == "XYM" ? t = 3 : n == "XYZM" && (t = 4), t; +} +function c1(n, t, e) { + const i = n.getFlatCoordinates(); + if (i) { + const s = n.getStride(); + return Ki( + i, + 0, + i.length, + s, + t, + e + ); + } else + return null; +} +const Di = l1; +function nc(n, t, e, i, s, r, o) { + const a = n[t], l = n[t + 1], h = n[e] - a, c = n[e + 1] - l; + let u; + if (h === 0 && c === 0) + u = t; + else { + const d = ((s - a) * h + (r - l) * c) / (h * h + c * c); + if (d > 1) + u = e; + else if (d > 0) { + for (let f = 0; f < i; ++f) + o[f] = ii( + n[t + f], + n[e + f], + d + ); + o.length = i; + return; + } else + u = t; + } + for (let d = 0; d < i; ++d) + o[d] = n[u + d]; + o.length = i; +} +function Nl(n, t, e, i, s) { + let r = n[t], o = n[t + 1]; + for (t += i; t < e; t += i) { + const a = n[t], l = n[t + 1], h = ri(r, o, a, l); + h > s && (s = h), r = a, o = l; + } + return s; +} +function Dl(n, t, e, i, s) { + for (let r = 0, o = e.length; r < o; ++r) { + const a = e[r]; + s = Nl(n, t, a, i, s), t = a; + } + return s; +} +function u1(n, t, e, i, s) { + for (let r = 0, o = e.length; r < o; ++r) { + const a = e[r]; + s = Dl(n, t, a, i, s), t = a[a.length - 1]; + } + return s; +} +function kl(n, t, e, i, s, r, o, a, l, h, c) { + if (t == e) + return h; + let u, d; + if (s === 0) + if (d = ri( + o, + a, + n[t], + n[t + 1] + ), d < h) { + for (u = 0; u < i; ++u) + l[u] = n[t + u]; + return l.length = i, d; + } else + return h; + c = c || [NaN, NaN]; + let f = t + i; + for (; f < e; ) + if (nc( + n, + f - i, + f, + i, + o, + a, + c + ), d = ri(o, a, c[0], c[1]), d < h) { + for (h = d, u = 0; u < i; ++u) + l[u] = c[u]; + l.length = i, f += i; + } else + f += i * Math.max( + (Math.sqrt(d) - Math.sqrt(h)) / s | 0, + 1 + ); + if (r && (nc( + n, + e - i, + t, + i, + o, + a, + c + ), d = ri(o, a, c[0], c[1]), d < h)) { + for (h = d, u = 0; u < i; ++u) + l[u] = c[u]; + l.length = i; + } + return h; +} +function Gl(n, t, e, i, s, r, o, a, l, h, c) { + c = c || [NaN, NaN]; + for (let u = 0, d = e.length; u < d; ++u) { + const f = e[u]; + h = kl( + n, + t, + f, + i, + s, + r, + o, + a, + l, + h, + c + ), t = f; + } + return h; +} +function d1(n, t, e, i, s, r, o, a, l, h, c) { + c = c || [NaN, NaN]; + for (let u = 0, d = e.length; u < d; ++u) { + const f = e[u]; + h = Gl( + n, + t, + f, + i, + s, + r, + o, + a, + l, + h, + c + ), t = f[f.length - 1]; + } + return h; +} +function Cd(n, t, e, i) { + for (let s = 0, r = e.length; s < r; ++s) + n[t++] = e[s]; + return t; +} +function No(n, t, e, i) { + for (let s = 0, r = e.length; s < r; ++s) { + const o = e[s]; + for (let a = 0; a < i; ++a) + n[t++] = o[a]; + } + return t; +} +function $l(n, t, e, i, s) { + s = s || []; + let r = 0; + for (let o = 0, a = e.length; o < a; ++o) { + const l = No( + n, + t, + e[o], + i + ); + s[r++] = l, t = l; + } + return s.length = r, s; +} +function f1(n, t, e, i, s) { + s = s || []; + let r = 0; + for (let o = 0, a = e.length; o < a; ++o) { + const l = $l( + n, + t, + e[o], + i, + s[r] + ); + l.length === 0 && (l[0] = t), s[r++] = l, t = l[l.length - 1]; + } + return s.length = r, s; +} +function Bl(n, t, e, i, s, r, o) { + const a = (e - t) / i; + if (a < 3) { + for (; t < e; t += i) + r[o++] = n[t], r[o++] = n[t + 1]; + return o; + } + const l = new Array(a); + l[0] = 1, l[a - 1] = 1; + const h = [t, e - i]; + let c = 0; + for (; h.length > 0; ) { + const u = h.pop(), d = h.pop(); + let f = 0; + const g = n[d], m = n[d + 1], _ = n[u], y = n[u + 1]; + for (let p = d + i; p < u; p += i) { + const v = n[p], x = n[p + 1], C = i0(v, x, g, m, _, y); + C > f && (c = p, f = C); + } + f > s && (l[(c - t) / i] = 1, d + i < c && h.push(d, c), c + i < u && h.push(c, u)); + } + for (let u = 0; u < a; ++u) + l[u] && (r[o++] = n[t + u * i], r[o++] = n[t + u * i + 1]); + return o; +} +function g1(n, t, e, i, s, r, o, a) { + for (let l = 0, h = e.length; l < h; ++l) { + const c = e[l]; + o = Bl( + n, + t, + c, + i, + s, + r, + o + ), a.push(o), t = c; + } + return o; +} +function Zi(n, t) { + return t * Math.round(n / t); +} +function m1(n, t, e, i, s, r, o) { + if (t == e) + return o; + let a = Zi(n[t], s), l = Zi(n[t + 1], s); + t += i, r[o++] = a, r[o++] = l; + let h, c; + do + if (h = Zi(n[t], s), c = Zi(n[t + 1], s), t += i, t == e) + return r[o++] = h, r[o++] = c, o; + while (h == a && c == l); + for (; t < e; ) { + const u = Zi(n[t], s), d = Zi(n[t + 1], s); + if (t += i, u == h && d == c) + continue; + const f = h - a, g = c - l, m = u - a, _ = d - l; + if (f * _ == g * m && (f < 0 && m < f || f == m || f > 0 && m > f) && (g < 0 && _ < g || g == _ || g > 0 && _ > g)) { + h = u, c = d; + continue; + } + r[o++] = h, r[o++] = c, a = h, l = c, h = u, c = d; + } + return r[o++] = h, r[o++] = c, o; +} +function Md(n, t, e, i, s, r, o, a) { + for (let l = 0, h = e.length; l < h; ++l) { + const c = e[l]; + o = m1( + n, + t, + c, + i, + s, + r, + o + ), a.push(o), t = c; + } + return o; +} +function _1(n, t, e, i, s, r, o, a) { + for (let l = 0, h = e.length; l < h; ++l) { + const c = e[l], u = []; + o = Md( + n, + t, + c, + i, + s, + r, + o, + u + ), a.push(u), t = c[c.length - 1]; + } + return o; +} +function Ei(n, t, e, i, s) { + s = s !== void 0 ? s : []; + let r = 0; + for (let o = t; o < e; o += i) + s[r++] = n.slice(o, o + i); + return s.length = r, s; +} +function Zs(n, t, e, i, s) { + s = s !== void 0 ? s : []; + let r = 0; + for (let o = 0, a = e.length; o < a; ++o) { + const l = e[o]; + s[r++] = Ei( + n, + t, + l, + i, + s[r] + ), t = l; + } + return s.length = r, s; +} +function $a(n, t, e, i, s) { + s = s !== void 0 ? s : []; + let r = 0; + for (let o = 0, a = e.length; o < a; ++o) { + const l = e[o]; + s[r++] = l.length === 1 && l[0] === t ? [] : Zs( + n, + t, + l, + i, + s[r] + ), t = l[l.length - 1]; + } + return s.length = r, s; +} +function Ed(n, t, e, i) { + let s = 0, r = n[e - i], o = n[e - i + 1]; + for (; t < e; t += i) { + const a = n[t], l = n[t + 1]; + s += o * a - r * l, r = a, o = l; + } + return s / 2; +} +function wd(n, t, e, i) { + let s = 0; + for (let r = 0, o = e.length; r < o; ++r) { + const a = e[r]; + s += Ed(n, t, a, i), t = a; + } + return s; +} +function p1(n, t, e, i) { + let s = 0; + for (let r = 0, o = e.length; r < o; ++r) { + const a = e[r]; + s += wd(n, t, a, i), t = a[a.length - 1]; + } + return s; +} +class ho extends Di { + constructor(t, e) { + super(), this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, e !== void 0 && !Array.isArray(t[0]) ? this.setFlatCoordinates( + e, + t + ) : this.setCoordinates( + t, + e + ); + } + clone() { + return new ho(this.flatCoordinates.slice(), this.layout); + } + closestPointXY(t, e, i, s) { + return s < dn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( + Nl( + this.flatCoordinates, + 0, + this.flatCoordinates.length, + this.stride, + 0 + ) + ), this.maxDeltaRevision_ = this.getRevision()), kl( + this.flatCoordinates, + 0, + this.flatCoordinates.length, + this.stride, + this.maxDelta_, + !0, + t, + e, + i, + s + )); + } + getArea() { + return Ed( + this.flatCoordinates, + 0, + this.flatCoordinates.length, + this.stride + ); + } + getCoordinates() { + return Ei( + this.flatCoordinates, + 0, + this.flatCoordinates.length, + this.stride + ); + } + getSimplifiedGeometryInternal(t) { + const e = []; + return e.length = Bl( + this.flatCoordinates, + 0, + this.flatCoordinates.length, + this.stride, + t, + e, + 0 + ), new ho(e, "XY"); + } + getType() { + return "LinearRing"; + } + intersectsExtent(t) { + return !1; + } + setCoordinates(t, e) { + this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = No( + this.flatCoordinates, + 0, + t, + this.stride + ), this.changed(); + } +} +const Ba = ho; +class zl extends Di { + constructor(t, e) { + super(), this.setCoordinates(t, e); + } + clone() { + const t = new zl(this.flatCoordinates.slice(), this.layout); + return t.applyProperties(this), t; + } + closestPointXY(t, e, i, s) { + const r = this.flatCoordinates, o = ri( + t, + e, + r[0], + r[1] + ); + if (o < s) { + const a = this.stride; + for (let l = 0; l < a; ++l) + i[l] = r[l]; + return i.length = a, o; + } else + return s; + } + getCoordinates() { + return this.flatCoordinates ? this.flatCoordinates.slice() : []; + } + computeExtent(t) { + return ws(this.flatCoordinates, t); + } + getType() { + return "Point"; + } + intersectsExtent(t) { + return pl(t, this.flatCoordinates[0], this.flatCoordinates[1]); + } + setCoordinates(t, e) { + this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Cd( + this.flatCoordinates, + 0, + t, + this.stride + ), this.changed(); + } +} +const Se = zl; +function y1(n, t, e, i, s) { + return !yl( + s, + function(o) { + return !Wi( + n, + t, + e, + i, + o[0], + o[1] + ); + } + ); +} +function Wi(n, t, e, i, s, r) { + let o = 0, a = n[e - i], l = n[e - i + 1]; + for (; t < e; t += i) { + const h = n[t], c = n[t + 1]; + l <= r ? c > r && (h - a) * (r - l) - (s - a) * (c - l) > 0 && o++ : c <= r && (h - a) * (r - l) - (s - a) * (c - l) < 0 && o--, a = h, l = c; + } + return o !== 0; +} +function Zl(n, t, e, i, s, r) { + if (e.length === 0 || !Wi(n, t, e[0], i, s, r)) + return !1; + for (let o = 1, a = e.length; o < a; ++o) + if (Wi(n, e[o - 1], e[o], i, s, r)) + return !1; + return !0; +} +function v1(n, t, e, i, s, r) { + if (e.length === 0) + return !1; + for (let o = 0, a = e.length; o < a; ++o) { + const l = e[o]; + if (Zl(n, t, l, i, s, r)) + return !0; + t = l[l.length - 1]; + } + return !1; +} +function Sd(n, t, e, i, s, r, o) { + let a, l, h, c, u, d, f; + const g = s[r + 1], m = []; + for (let p = 0, v = e.length; p < v; ++p) { + const x = e[p]; + for (c = n[x - i], d = n[x - i + 1], a = t; a < x; a += i) + u = n[a], f = n[a + 1], (g <= d && f <= g || d <= g && g <= f) && (h = (g - d) / (f - d) * (u - c) + c, m.push(h)), c = u, d = f; + } + let _ = NaN, y = -1 / 0; + for (m.sort(tn), c = m[0], a = 1, l = m.length; a < l; ++a) { + u = m[a]; + const p = Math.abs(u - c); + p > y && (h = (c + u) / 2, Zl(n, t, e, i, h, g) && (_ = h, y = p)), c = u; + } + return isNaN(_) && (_ = s[r]), o ? (o.push(_, g, y), o) : [_, g, y]; +} +function x1(n, t, e, i, s) { + let r = []; + for (let o = 0, a = e.length; o < a; ++o) { + const l = e[o]; + r = Sd( + n, + t, + l, + i, + s, + 2 * o, + r + ), t = l[l.length - 1]; + } + return r; +} +function Rd(n, t, e, i, s) { + let r; + for (t += i; t < e; t += i) + if (r = s( + n.slice(t - i, t), + n.slice(t, t + i) + ), r) + return r; + return !1; +} +function Do(n, t, e, i, s) { + const r = Ju( + se(), + n, + t, + e, + i + ); + return Kt(s, r) ? Vi(s, r) || r[0] >= s[0] && r[2] <= s[2] || r[1] >= s[1] && r[3] <= s[3] ? !0 : Rd( + n, + t, + e, + i, + function(o, a) { + return Qg(s, o, a); + } + ) : !1; +} +function C1(n, t, e, i, s) { + for (let r = 0, o = e.length; r < o; ++r) { + if (Do(n, t, e[r], i, s)) + return !0; + t = e[r]; + } + return !1; +} +function Td(n, t, e, i, s) { + return !!(Do(n, t, e, i, s) || Wi( + n, + t, + e, + i, + s[0], + s[1] + ) || Wi( + n, + t, + e, + i, + s[0], + s[3] + ) || Wi( + n, + t, + e, + i, + s[2], + s[1] + ) || Wi( + n, + t, + e, + i, + s[2], + s[3] + )); +} +function bd(n, t, e, i, s) { + if (!Td(n, t, e[0], i, s)) + return !1; + if (e.length === 1) + return !0; + for (let r = 1, o = e.length; r < o; ++r) + if (y1( + n, + e[r - 1], + e[r], + i, + s + ) && !Do( + n, + e[r - 1], + e[r], + i, + s + )) + return !1; + return !0; +} +function M1(n, t, e, i, s) { + for (let r = 0, o = e.length; r < o; ++r) { + const a = e[r]; + if (bd(n, t, a, i, s)) + return !0; + t = a[a.length - 1]; + } + return !1; +} +function E1(n, t, e, i) { + for (; t < e - i; ) { + for (let s = 0; s < i; ++s) { + const r = n[t + s]; + n[t + s] = n[e - i + s], n[e - i + s] = r; + } + t += i, e -= i; + } +} +function Ld(n, t, e, i) { + let s = 0, r = n[e - i], o = n[e - i + 1]; + for (; t < e; t += i) { + const a = n[t], l = n[t + 1]; + s += (a - r) * (l + o), r = a, o = l; + } + return s === 0 ? void 0 : s > 0; +} +function Id(n, t, e, i, s) { + s = s !== void 0 ? s : !1; + for (let r = 0, o = e.length; r < o; ++r) { + const a = e[r], l = Ld( + n, + t, + a, + i + ); + if (r === 0) { + if (s && l || !s && !l) + return !1; + } else if (s && !l || !s && l) + return !1; + t = a; + } + return !0; +} +function w1(n, t, e, i, s) { + for (let r = 0, o = e.length; r < o; ++r) { + const a = e[r]; + if (!Id(n, t, a, i, s)) + return !1; + a.length && (t = a[a.length - 1]); + } + return !0; +} +function za(n, t, e, i, s) { + s = s !== void 0 ? s : !1; + for (let r = 0, o = e.length; r < o; ++r) { + const a = e[r], l = Ld( + n, + t, + a, + i + ); + (r === 0 ? s && l || !s && !l : s && !l || !s && l) && E1(n, t, a, i), t = a; + } + return t; +} +function sc(n, t, e, i, s) { + for (let r = 0, o = e.length; r < o; ++r) + t = za( + n, + t, + e[r], + i, + s + ); + return t; +} +class sn extends Di { + constructor(t, e, i) { + super(), this.ends_ = [], this.flatInteriorPointRevision_ = -1, this.flatInteriorPoint_ = null, this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, this.orientedRevision_ = -1, this.orientedFlatCoordinates_ = null, e !== void 0 && i ? (this.setFlatCoordinates( + e, + t + ), this.ends_ = i) : this.setCoordinates( + t, + e + ); + } + appendLinearRing(t) { + this.flatCoordinates ? Qt(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed(); + } + clone() { + const t = new sn( + this.flatCoordinates.slice(), + this.layout, + this.ends_.slice() + ); + return t.applyProperties(this), t; + } + closestPointXY(t, e, i, s) { + return s < dn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( + Dl( + this.flatCoordinates, + 0, + this.ends_, + this.stride, + 0 + ) + ), this.maxDeltaRevision_ = this.getRevision()), Gl( + this.flatCoordinates, + 0, + this.ends_, + this.stride, + this.maxDelta_, + !0, + t, + e, + i, + s + )); + } + containsXY(t, e) { + return Zl( + this.getOrientedFlatCoordinates(), + 0, + this.ends_, + this.stride, + t, + e + ); + } + getArea() { + return wd( + this.getOrientedFlatCoordinates(), + 0, + this.ends_, + this.stride + ); + } + getCoordinates(t) { + let e; + return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), za(e, 0, this.ends_, this.stride, t)) : e = this.flatCoordinates, Zs(e, 0, this.ends_, this.stride); + } + getEnds() { + return this.ends_; + } + getFlatInteriorPoint() { + if (this.flatInteriorPointRevision_ != this.getRevision()) { + const t = Pi(this.getExtent()); + this.flatInteriorPoint_ = Sd( + this.getOrientedFlatCoordinates(), + 0, + this.ends_, + this.stride, + t, + 0 + ), this.flatInteriorPointRevision_ = this.getRevision(); + } + return this.flatInteriorPoint_; + } + getInteriorPoint() { + return new Se(this.getFlatInteriorPoint(), "XYM"); + } + getLinearRingCount() { + return this.ends_.length; + } + getLinearRing(t) { + return t < 0 || this.ends_.length <= t ? null : new Ba( + this.flatCoordinates.slice( + t === 0 ? 0 : this.ends_[t - 1], + this.ends_[t] + ), + this.layout + ); + } + getLinearRings() { + const t = this.layout, e = this.flatCoordinates, i = this.ends_, s = []; + let r = 0; + for (let o = 0, a = i.length; o < a; ++o) { + const l = i[o], h = new Ba( + e.slice(r, l), + t + ); + s.push(h), r = l; + } + return s; + } + getOrientedFlatCoordinates() { + if (this.orientedRevision_ != this.getRevision()) { + const t = this.flatCoordinates; + Id(t, 0, this.ends_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = za( + this.orientedFlatCoordinates_, + 0, + this.ends_, + this.stride + )), this.orientedRevision_ = this.getRevision(); + } + return this.orientedFlatCoordinates_; + } + getSimplifiedGeometryInternal(t) { + const e = [], i = []; + return e.length = Md( + this.flatCoordinates, + 0, + this.ends_, + this.stride, + Math.sqrt(t), + e, + 0, + i + ), new sn(e, "XY", i); + } + getType() { + return "Polygon"; + } + intersectsExtent(t) { + return bd( + this.getOrientedFlatCoordinates(), + 0, + this.ends_, + this.stride, + t + ); + } + setCoordinates(t, e) { + this.setLayout(e, t, 2), this.flatCoordinates || (this.flatCoordinates = []); + const i = $l( + this.flatCoordinates, + 0, + t, + this.stride, + this.ends_ + ); + this.flatCoordinates.length = i.length === 0 ? 0 : i[i.length - 1], this.changed(); + } +} +const Ai = sn; +function S1(n, t, e, i) { + e = e || 32; + const s = []; + for (let r = 0; r < e; ++r) + Qt( + s, + X0(n, t, 2 * Math.PI * r / e, i) + ); + return s.push(s[0], s[1]), new sn(s, "XY", [s.length]); +} +function rc(n) { + const t = n[0], e = n[1], i = n[2], s = n[3], r = [ + t, + e, + t, + s, + i, + s, + i, + e, + t, + e + ]; + return new sn(r, "XY", [r.length]); +} +function R1(n, t, e) { + t = t || 32; + const i = n.getStride(), s = n.getLayout(), r = n.getCenter(), o = i * (t + 1), a = new Array(o); + for (let c = 0; c < o; c += i) { + a[c] = 0, a[c + 1] = 0; + for (let u = 2; u < i; u++) + a[c + u] = r[u]; + } + const l = [a.length], h = new sn(a, s, l); + return T1(h, r, n.getRadius(), e), h; +} +function T1(n, t, e, i) { + const s = n.getFlatCoordinates(), r = n.getStride(), o = s.length / r - 1, a = i || 0; + for (let l = 0; l <= o; ++l) { + const h = l * r, c = a + qi(l, o) * 2 * Math.PI / o; + s[h] = t[0] + e * Math.cos(c), s[h + 1] = t[1] + e * Math.sin(c); + } + n.changed(); +} +const ra = 0; +class b1 extends Oe { + constructor(t) { + super(), this.on, this.once, this.un, t = Object.assign({}, t), this.hints_ = [0, 0], this.animations_ = [], this.updateAnimationKey_, this.projection_ = Ll(t.projection, "EPSG:3857"), this.viewportSize_ = [100, 100], this.targetCenter_ = null, this.targetResolution_, this.targetRotation_, this.nextCenter_ = null, this.nextResolution_, this.nextRotation_, this.cancelAnchor_ = void 0, t.projection && gd(), t.center && (t.center = vt(t.center, this.projection_)), t.extent && (t.extent = Mi(t.extent, this.projection_)), this.applyOptions_(t); + } + applyOptions_(t) { + const e = Object.assign({}, t); + for (const a in be) + delete e[a]; + this.setProperties(e, !0); + const i = I1(t); + this.maxResolution_ = i.maxResolution, this.minResolution_ = i.minResolution, this.zoomFactor_ = i.zoomFactor, this.resolutions_ = t.resolutions, this.padding_ = t.padding, this.minZoom_ = i.minZoom; + const s = L1(t), r = i.constraint, o = P1(t); + this.constraints_ = { + center: s, + resolution: r, + rotation: o + }, this.setRotation(t.rotation !== void 0 ? t.rotation : 0), this.setCenterInternal( + t.center !== void 0 ? t.center : null + ), t.resolution !== void 0 ? this.setResolution(t.resolution) : t.zoom !== void 0 && this.setZoom(t.zoom); + } + get padding() { + return this.padding_; + } + set padding(t) { + let e = this.padding_; + this.padding_ = t; + const i = this.getCenter(); + if (i) { + const s = t || [0, 0, 0, 0]; + e = e || [0, 0, 0, 0]; + const r = this.getResolution(), o = r / 2 * (s[3] - e[3] + e[1] - s[1]), a = r / 2 * (s[0] - e[0] + e[2] - s[2]); + this.setCenterInternal([i[0] + o, i[1] - a]); + } + } + getUpdatedOptions_(t) { + const e = this.getProperties(); + return e.resolution !== void 0 ? e.resolution = this.getResolution() : e.zoom = this.getZoom(), e.center = this.getCenterInternal(), e.rotation = this.getRotation(), Object.assign({}, e, t); + } + animate(t) { + this.isDef() && !this.getAnimating() && this.resolveConstraints(0); + const e = new Array(arguments.length); + for (let i = 0; i < e.length; ++i) { + let s = arguments[i]; + s.center && (s = Object.assign({}, s), s.center = vt( + s.center, + this.getProjection() + )), s.anchor && (s = Object.assign({}, s), s.anchor = vt( + s.anchor, + this.getProjection() + )), e[i] = s; + } + this.animateInternal.apply(this, e); + } + animateInternal(t) { + let e = arguments.length, i; + e > 1 && typeof arguments[e - 1] == "function" && (i = arguments[e - 1], --e); + let s = 0; + for (; s < e && !this.isDef(); ++s) { + const c = arguments[s]; + c.center && this.setCenterInternal(c.center), c.zoom !== void 0 ? this.setZoom(c.zoom) : c.resolution && this.setResolution(c.resolution), c.rotation !== void 0 && this.setRotation(c.rotation); + } + if (s === e) { + i && br(i, !0); + return; + } + let r = Date.now(), o = this.targetCenter_.slice(), a = this.targetResolution_, l = this.targetRotation_; + const h = []; + for (; s < e; ++s) { + const c = arguments[s], u = { + start: r, + complete: !1, + anchor: c.anchor, + duration: c.duration !== void 0 ? c.duration : 1e3, + easing: c.easing || s1, + callback: i + }; + if (c.center && (u.sourceCenter = o, u.targetCenter = c.center.slice(), o = u.targetCenter), c.zoom !== void 0 ? (u.sourceResolution = a, u.targetResolution = this.getResolutionForZoom(c.zoom), a = u.targetResolution) : c.resolution && (u.sourceResolution = a, u.targetResolution = c.resolution, a = u.targetResolution), c.rotation !== void 0) { + u.sourceRotation = l; + const d = qi(c.rotation - l + Math.PI, 2 * Math.PI) - Math.PI; + u.targetRotation = l + d, l = u.targetRotation; + } + A1(u) ? u.complete = !0 : r += u.duration, h.push(u); + } + this.animations_.push(h), this.setHint(Wt.ANIMATING, 1), this.updateAnimations_(); + } + getAnimating() { + return this.hints_[Wt.ANIMATING] > 0; + } + getInteracting() { + return this.hints_[Wt.INTERACTING] > 0; + } + cancelAnimations() { + this.setHint(Wt.ANIMATING, -this.hints_[Wt.ANIMATING]); + let t; + for (let e = 0, i = this.animations_.length; e < i; ++e) { + const s = this.animations_[e]; + if (s[0].callback && br(s[0].callback, !1), !t) + for (let r = 0, o = s.length; r < o; ++r) { + const a = s[r]; + if (!a.complete) { + t = a.anchor; + break; + } + } + } + this.animations_.length = 0, this.cancelAnchor_ = t, this.nextCenter_ = null, this.nextResolution_ = NaN, this.nextRotation_ = NaN; + } + updateAnimations_() { + if (this.updateAnimationKey_ !== void 0 && (cancelAnimationFrame(this.updateAnimationKey_), this.updateAnimationKey_ = void 0), !this.getAnimating()) + return; + const t = Date.now(); + let e = !1; + for (let i = this.animations_.length - 1; i >= 0; --i) { + const s = this.animations_[i]; + let r = !0; + for (let o = 0, a = s.length; o < a; ++o) { + const l = s[o]; + if (l.complete) + continue; + const h = t - l.start; + let c = l.duration > 0 ? h / l.duration : 1; + c >= 1 ? (l.complete = !0, c = 1) : r = !1; + const u = l.easing(c); + if (l.sourceCenter) { + const d = l.sourceCenter[0], f = l.sourceCenter[1], g = l.targetCenter[0], m = l.targetCenter[1]; + this.nextCenter_ = l.targetCenter; + const _ = d + u * (g - d), y = f + u * (m - f); + this.targetCenter_ = [_, y]; + } + if (l.sourceResolution && l.targetResolution) { + const d = u === 1 ? l.targetResolution : l.sourceResolution + u * (l.targetResolution - l.sourceResolution); + if (l.anchor) { + const f = this.getViewportSize_(this.getRotation()), g = this.constraints_.resolution( + d, + 0, + f, + !0 + ); + this.targetCenter_ = this.calculateCenterZoom( + g, + l.anchor + ); + } + this.nextResolution_ = l.targetResolution, this.targetResolution_ = d, this.applyTargetState_(!0); + } + if (l.sourceRotation !== void 0 && l.targetRotation !== void 0) { + const d = u === 1 ? qi(l.targetRotation + Math.PI, 2 * Math.PI) - Math.PI : l.sourceRotation + u * (l.targetRotation - l.sourceRotation); + if (l.anchor) { + const f = this.constraints_.rotation( + d, + !0 + ); + this.targetCenter_ = this.calculateCenterRotate( + f, + l.anchor + ); + } + this.nextRotation_ = l.targetRotation, this.targetRotation_ = d; + } + if (this.applyTargetState_(!0), e = !0, !l.complete) + break; + } + if (r) { + this.animations_[i] = null, this.setHint(Wt.ANIMATING, -1), this.nextCenter_ = null, this.nextResolution_ = NaN, this.nextRotation_ = NaN; + const o = s[0].callback; + o && br(o, !0); + } + } + this.animations_ = this.animations_.filter(Boolean), e && this.updateAnimationKey_ === void 0 && (this.updateAnimationKey_ = requestAnimationFrame( + this.updateAnimations_.bind(this) + )); + } + calculateCenterRotate(t, e) { + let i; + const s = this.getCenterInternal(); + return s !== void 0 && (i = [s[0] - e[0], s[1] - e[1]], El(i, t - this.getRotation()), nd(i, e)), i; + } + calculateCenterZoom(t, e) { + let i; + const s = this.getCenterInternal(), r = this.getResolution(); + if (s !== void 0 && r !== void 0) { + const o = e[0] - t * (e[0] - s[0]) / r, a = e[1] - t * (e[1] - s[1]) / r; + i = [o, a]; + } + return i; + } + getViewportSize_(t) { + const e = this.viewportSize_; + if (t) { + const i = e[0], s = e[1]; + return [ + Math.abs(i * Math.cos(t)) + Math.abs(s * Math.sin(t)), + Math.abs(i * Math.sin(t)) + Math.abs(s * Math.cos(t)) + ]; + } else + return e; + } + setViewportSize(t) { + this.viewportSize_ = Array.isArray(t) ? t.slice() : [100, 100], this.getAnimating() || this.resolveConstraints(0); + } + getCenter() { + const t = this.getCenterInternal(); + return t && qn(t, this.getProjection()); + } + getCenterInternal() { + return this.get(be.CENTER); + } + getConstraints() { + return this.constraints_; + } + getConstrainResolution() { + return this.get("constrainResolution"); + } + getHints(t) { + return t !== void 0 ? (t[0] = this.hints_[0], t[1] = this.hints_[1], t) : this.hints_.slice(); + } + calculateExtent(t) { + const e = this.calculateExtentInternal(t); + return Il(e, this.getProjection()); + } + calculateExtentInternal(t) { + t = t || this.getViewportSizeMinusPadding_(); + const e = this.getCenterInternal(); + Y(e, 1); + const i = this.getResolution(); + Y(i !== void 0, 2); + const s = this.getRotation(); + return Y(s !== void 0, 3), Ia(e, i, s, t); + } + getMaxResolution() { + return this.maxResolution_; + } + getMinResolution() { + return this.minResolution_; + } + getMaxZoom() { + return this.getZoomForResolution(this.minResolution_); + } + setMaxZoom(t) { + this.applyOptions_(this.getUpdatedOptions_({ maxZoom: t })); + } + getMinZoom() { + return this.getZoomForResolution(this.maxResolution_); + } + setMinZoom(t) { + this.applyOptions_(this.getUpdatedOptions_({ minZoom: t })); + } + setConstrainResolution(t) { + this.applyOptions_(this.getUpdatedOptions_({ constrainResolution: t })); + } + getProjection() { + return this.projection_; + } + getResolution() { + return this.get(be.RESOLUTION); + } + getResolutions() { + return this.resolutions_; + } + getResolutionForExtent(t, e) { + return this.getResolutionForExtentInternal( + Mi(t, this.getProjection()), + e + ); + } + getResolutionForExtentInternal(t, e) { + e = e || this.getViewportSizeMinusPadding_(); + const i = pt(t) / e[0], s = ze(t) / e[1]; + return Math.max(i, s); + } + getResolutionForValueFunction(t) { + t = t || 2; + const e = this.getConstrainedResolution(this.maxResolution_), i = this.minResolution_, s = Math.log(e / i) / Math.log(t); + return function(r) { + return e / Math.pow(t, r * s); + }; + } + getRotation() { + return this.get(be.ROTATION); + } + getValueForResolutionFunction(t) { + const e = Math.log(t || 2), i = this.getConstrainedResolution(this.maxResolution_), s = this.minResolution_, r = Math.log(i / s) / e; + return function(o) { + return Math.log(i / o) / e / r; + }; + } + getViewportSizeMinusPadding_(t) { + let e = this.getViewportSize_(t); + const i = this.padding_; + return i && (e = [ + e[0] - i[1] - i[3], + e[1] - i[0] - i[2] + ]), e; + } + getState() { + const t = this.getProjection(), e = this.getResolution(), i = this.getRotation(); + let s = this.getCenterInternal(); + const r = this.padding_; + if (r) { + const o = this.getViewportSizeMinusPadding_(); + s = oa( + s, + this.getViewportSize_(), + [o[0] / 2 + r[3], o[1] / 2 + r[0]], + e, + i + ); + } + return { + center: s.slice(0), + projection: t !== void 0 ? t : null, + resolution: e, + nextCenter: this.nextCenter_, + nextResolution: this.nextResolution_, + nextRotation: this.nextRotation_, + rotation: i, + zoom: this.getZoom() + }; + } + getZoom() { + let t; + const e = this.getResolution(); + return e !== void 0 && (t = this.getZoomForResolution(e)), t; + } + getZoomForResolution(t) { + let e = this.minZoom_ || 0, i, s; + if (this.resolutions_) { + const r = gl(this.resolutions_, t, 1); + e = r, i = this.resolutions_[r], r == this.resolutions_.length - 1 ? s = 2 : s = i / this.resolutions_[r + 1]; + } else + i = this.maxResolution_, s = this.zoomFactor_; + return e + Math.log(i / t) / Math.log(s); + } + getResolutionForZoom(t) { + if (this.resolutions_) { + if (this.resolutions_.length <= 1) + return 0; + const e = Et( + Math.floor(t), + 0, + this.resolutions_.length - 2 + ), i = this.resolutions_[e] / this.resolutions_[e + 1]; + return this.resolutions_[e] / Math.pow(i, Et(t - e, 0, 1)); + } else + return this.maxResolution_ / Math.pow(this.zoomFactor_, t - this.minZoom_); + } + fit(t, e) { + let i; + if (Y( + Array.isArray(t) || typeof t.getSimplifiedGeometry == "function", + 24 + ), Array.isArray(t)) { + Y(!vl(t), 25); + const s = Mi(t, this.getProjection()); + i = rc(s); + } else if (t.getType() === "Circle") { + const s = Mi( + t.getExtent(), + this.getProjection() + ); + i = rc(s), i.rotate(this.getRotation(), Pi(s)); + } else + i = t; + this.fitInternal(i, e); + } + rotatedExtentForGeometry(t) { + const e = this.getRotation(), i = Math.cos(e), s = Math.sin(-e), r = t.getFlatCoordinates(), o = t.getStride(); + let a = 1 / 0, l = 1 / 0, h = -1 / 0, c = -1 / 0; + for (let u = 0, d = r.length; u < d; u += o) { + const f = r[u] * i - r[u + 1] * s, g = r[u] * s + r[u + 1] * i; + a = Math.min(a, f), l = Math.min(l, g), h = Math.max(h, f), c = Math.max(c, g); + } + return [a, l, h, c]; + } + fitInternal(t, e) { + e = e || {}; + let i = e.size; + i || (i = this.getViewportSizeMinusPadding_()); + const s = e.padding !== void 0 ? e.padding : [0, 0, 0, 0], r = e.nearest !== void 0 ? e.nearest : !1; + let o; + e.minResolution !== void 0 ? o = e.minResolution : e.maxZoom !== void 0 ? o = this.getResolutionForZoom(e.maxZoom) : o = 0; + const a = this.rotatedExtentForGeometry(t); + let l = this.getResolutionForExtentInternal(a, [ + i[0] - s[1] - s[3], + i[1] - s[0] - s[2] + ]); + l = isNaN(l) ? o : Math.max(l, o), l = this.getConstrainedResolution(l, r ? 0 : 1); + const h = this.getRotation(), c = Math.sin(h), u = Math.cos(h), d = Pi(a); + d[0] += (s[1] - s[3]) / 2 * l, d[1] += (s[0] - s[2]) / 2 * l; + const f = d[0] * u - d[1] * c, g = d[1] * u + d[0] * c, m = this.getConstrainedCenter([f, g], l), _ = e.callback ? e.callback : nn; + e.duration !== void 0 ? this.animateInternal( + { + resolution: l, + center: m, + duration: e.duration, + easing: e.easing + }, + _ + ) : (this.targetResolution_ = l, this.targetCenter_ = m, this.applyTargetState_(!1, !0), br(_, !0)); + } + centerOn(t, e, i) { + this.centerOnInternal( + vt(t, this.getProjection()), + e, + i + ); + } + centerOnInternal(t, e, i) { + this.setCenterInternal( + oa( + t, + e, + i, + this.getResolution(), + this.getRotation() + ) + ); + } + calculateCenterShift(t, e, i, s) { + let r; + const o = this.padding_; + if (o && t) { + const a = this.getViewportSizeMinusPadding_(-i), l = oa( + t, + s, + [a[0] / 2 + o[3], a[1] / 2 + o[0]], + e, + i + ); + r = [ + t[0] - l[0], + t[1] - l[1] + ]; + } + return r; + } + isDef() { + return !!this.getCenterInternal() && this.getResolution() !== void 0; + } + adjustCenter(t) { + const e = qn(this.targetCenter_, this.getProjection()); + this.setCenter([ + e[0] + t[0], + e[1] + t[1] + ]); + } + adjustCenterInternal(t) { + const e = this.targetCenter_; + this.setCenterInternal([ + e[0] + t[0], + e[1] + t[1] + ]); + } + adjustResolution(t, e) { + e = e && vt(e, this.getProjection()), this.adjustResolutionInternal(t, e); + } + adjustResolutionInternal(t, e) { + const i = this.getAnimating() || this.getInteracting(), s = this.getViewportSize_(this.getRotation()), r = this.constraints_.resolution( + this.targetResolution_ * t, + 0, + s, + i + ); + e && (this.targetCenter_ = this.calculateCenterZoom(r, e)), this.targetResolution_ *= t, this.applyTargetState_(); + } + adjustZoom(t, e) { + this.adjustResolution(Math.pow(this.zoomFactor_, -t), e); + } + adjustRotation(t, e) { + e && (e = vt(e, this.getProjection())), this.adjustRotationInternal(t, e); + } + adjustRotationInternal(t, e) { + const i = this.getAnimating() || this.getInteracting(), s = this.constraints_.rotation( + this.targetRotation_ + t, + i + ); + e && (this.targetCenter_ = this.calculateCenterRotate(s, e)), this.targetRotation_ += t, this.applyTargetState_(); + } + setCenter(t) { + this.setCenterInternal( + t && vt(t, this.getProjection()) + ); + } + setCenterInternal(t) { + this.targetCenter_ = t, this.applyTargetState_(); + } + setHint(t, e) { + return this.hints_[t] += e, this.changed(), this.hints_[t]; + } + setResolution(t) { + this.targetResolution_ = t, this.applyTargetState_(); + } + setRotation(t) { + this.targetRotation_ = t, this.applyTargetState_(); + } + setZoom(t) { + this.setResolution(this.getResolutionForZoom(t)); + } + applyTargetState_(t, e) { + const i = this.getAnimating() || this.getInteracting() || e, s = this.constraints_.rotation( + this.targetRotation_, + i + ), r = this.getViewportSize_(s), o = this.constraints_.resolution( + this.targetResolution_, + 0, + r, + i + ), a = this.constraints_.center( + this.targetCenter_, + o, + r, + i, + this.calculateCenterShift( + this.targetCenter_, + o, + s, + r + ) + ); + this.get(be.ROTATION) !== s && this.set(be.ROTATION, s), this.get(be.RESOLUTION) !== o && (this.set(be.RESOLUTION, o), this.set("zoom", this.getZoom(), !0)), (!a || !this.get(be.CENTER) || !Le(this.get(be.CENTER), a)) && this.set(be.CENTER, a), this.getAnimating() && !t && this.cancelAnimations(), this.cancelAnchor_ = void 0; + } + resolveConstraints(t, e, i) { + t = t !== void 0 ? t : 200; + const s = e || 0, r = this.constraints_.rotation(this.targetRotation_), o = this.getViewportSize_(r), a = this.constraints_.resolution( + this.targetResolution_, + s, + o + ), l = this.constraints_.center( + this.targetCenter_, + a, + o, + !1, + this.calculateCenterShift( + this.targetCenter_, + a, + r, + o + ) + ); + if (t === 0 && !this.cancelAnchor_) { + this.targetResolution_ = a, this.targetRotation_ = r, this.targetCenter_ = l, this.applyTargetState_(); + return; + } + i = i || (t === 0 ? this.cancelAnchor_ : void 0), this.cancelAnchor_ = void 0, (this.getResolution() !== a || this.getRotation() !== r || !this.getCenterInternal() || !Le(this.getCenterInternal(), l)) && (this.getAnimating() && this.cancelAnimations(), this.animateInternal({ + rotation: r, + center: l, + resolution: a, + duration: t, + easing: rs, + anchor: i + })); + } + beginInteraction() { + this.resolveConstraints(0), this.setHint(Wt.INTERACTING, 1); + } + endInteraction(t, e, i) { + i = i && vt(i, this.getProjection()), this.endInteractionInternal(t, e, i); + } + endInteractionInternal(t, e, i) { + this.setHint(Wt.INTERACTING, -1), this.resolveConstraints(t, e, i); + } + getConstrainedCenter(t, e) { + const i = this.getViewportSize_(this.getRotation()); + return this.constraints_.center( + t, + e || this.getResolution(), + i + ); + } + getConstrainedZoom(t, e) { + const i = this.getResolutionForZoom(t); + return this.getZoomForResolution( + this.getConstrainedResolution(i, e) + ); + } + getConstrainedResolution(t, e) { + e = e || 0; + const i = this.getViewportSize_(this.getRotation()); + return this.constraints_.resolution(t, e, i); + } +} +function br(n, t) { + setTimeout(function() { + n(t); + }, 0); +} +function L1(n) { + if (n.extent !== void 0) { + const e = n.smoothExtentConstraint !== void 0 ? n.smoothExtentConstraint : !0; + return Qh(n.extent, n.constrainOnlyCenter, e); + } + const t = Ll(n.projection, "EPSG:3857"); + if (n.multiWorld !== !0 && t.isGlobal()) { + const e = t.getExtent().slice(); + return e[0] = -1 / 0, e[2] = 1 / 0, Qh(e, !1, !1); + } + return Q0; +} +function I1(n) { + let t, e, i, o = n.minZoom !== void 0 ? n.minZoom : ra, a = n.maxZoom !== void 0 ? n.maxZoom : 28; + const l = n.zoomFactor !== void 0 ? n.zoomFactor : 2, h = n.multiWorld !== void 0 ? n.multiWorld : !1, c = n.smoothResolutionConstraint !== void 0 ? n.smoothResolutionConstraint : !0, u = n.showFullExtent !== void 0 ? n.showFullExtent : !1, d = Ll(n.projection, "EPSG:3857"), f = d.getExtent(); + let g = n.constrainOnlyCenter, m = n.extent; + if (!h && !m && d.isGlobal() && (g = !1, m = f), n.resolutions !== void 0) { + const _ = n.resolutions; + e = _[o], i = _[a] !== void 0 ? _[a] : _[_.length - 1], n.constrainResolution ? t = t1( + _, + c, + !g && m, + u + ) : t = tc( + e, + i, + c, + !g && m, + u + ); + } else { + const y = (f ? Math.max(pt(f), ze(f)) : 360 * Yn.degrees / d.getMetersPerUnit()) / Sl / Math.pow(2, ra), p = y / Math.pow(2, 28 - ra); + e = n.maxResolution, e !== void 0 ? o = 0 : e = y / Math.pow(l, o), i = n.minResolution, i === void 0 && (n.maxZoom !== void 0 ? n.maxResolution !== void 0 ? i = e / Math.pow(l, a) : i = y / Math.pow(l, a) : i = p), a = o + Math.floor( + Math.log(e / i) / Math.log(l) + ), i = e / Math.pow(l, a - o), n.constrainResolution ? t = e1( + l, + e, + i, + c, + !g && m, + u + ) : t = tc( + e, + i, + c, + !g && m, + u + ); + } + return { + constraint: t, + maxResolution: e, + minResolution: i, + minZoom: o, + zoomFactor: l + }; +} +function P1(n) { + if (n.enableRotation !== void 0 ? n.enableRotation : !0) { + const e = n.constrainRotation; + return e === void 0 || e === !0 ? n1() : e === !1 ? ec : typeof e == "number" ? i1(e) : ec; + } else + return Ol; +} +function A1(n) { + return !(n.sourceCenter && n.targetCenter && !Le(n.sourceCenter, n.targetCenter) || n.sourceResolution !== n.targetResolution || n.sourceRotation !== n.targetRotation); +} +function oa(n, t, e, i, s) { + const r = Math.cos(-s); + let o = Math.sin(-s), a = n[0] * r - n[1] * o, l = n[1] * r + n[0] * o; + a += (t[0] / 2 - e[0]) * i, l += (e[1] - t[1] / 2) * i, o = -o; + const h = a * r - l * o, c = l * r + a * o; + return [h, c]; +} +const si = b1; +class O1 extends Oe { + constructor(t) { + super(); + const e = t.element; + e && !t.target && !e.style.pointerEvents && (e.style.pointerEvents = "auto"), this.element = e || null, this.target_ = null, this.map_ = null, this.listenerKeys = [], t.render && (this.render = t.render), t.target && this.setTarget(t.target); + } + disposeInternal() { + Aa(this.element), super.disposeInternal(); + } + getMap() { + return this.map_; + } + setMap(t) { + this.map_ && Aa(this.element); + for (let e = 0, i = this.listenerKeys.length; e < i; ++e) + mt(this.listenerKeys[e]); + this.listenerKeys.length = 0, this.map_ = t, t && ((this.target_ ? this.target_ : t.getOverlayContainerStopEvent()).appendChild(this.element), this.render !== nn && this.listenerKeys.push( + et(t, vi.POSTRENDER, this.render, this) + ), t.render()); + } + render(t) { + } + setTarget(t) { + this.target_ = typeof t == "string" ? document.getElementById(t) : t; + } +} +const Gt = O1; +class F1 extends Gt { + constructor(t) { + t = t || {}, super({ + element: document.createElement("div"), + render: t.render, + target: t.target + }), this.ulElement_ = document.createElement("ul"), this.collapsed_ = t.collapsed !== void 0 ? t.collapsed : !0, this.userCollapsed_ = this.collapsed_, this.overrideCollapsible_ = t.collapsible !== void 0, this.collapsible_ = t.collapsible !== void 0 ? t.collapsible : !0, this.collapsible_ || (this.collapsed_ = !1); + const e = t.className !== void 0 ? t.className : "ol-attribution", i = t.tipLabel !== void 0 ? t.tipLabel : "Attributions", s = t.expandClassName !== void 0 ? t.expandClassName : e + "-expand", r = t.collapseLabel !== void 0 ? t.collapseLabel : "\u203A", o = t.collapseClassName !== void 0 ? t.collapseClassName : e + "-collapse"; + typeof r == "string" ? (this.collapseLabel_ = document.createElement("span"), this.collapseLabel_.textContent = r, this.collapseLabel_.className = o) : this.collapseLabel_ = r; + const a = t.label !== void 0 ? t.label : "i"; + typeof a == "string" ? (this.label_ = document.createElement("span"), this.label_.textContent = a, this.label_.className = s) : this.label_ = a; + const l = this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_; + this.toggleButton_ = document.createElement("button"), this.toggleButton_.setAttribute("type", "button"), this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_)), this.toggleButton_.title = i, this.toggleButton_.appendChild(l), this.toggleButton_.addEventListener( + U.CLICK, + this.handleClick_.bind(this), + !1 + ); + const h = e + " " + ss + " " + Ao + (this.collapsed_ && this.collapsible_ ? " " + Uh : "") + (this.collapsible_ ? "" : " ol-uncollapsible"), c = this.element; + c.className = h, c.appendChild(this.toggleButton_), c.appendChild(this.ulElement_), this.renderedAttributions_ = [], this.renderedVisible_ = !0; + } + collectSourceAttributions_(t) { + const e = {}, i = []; + let s = !0; + const r = t.layerStatesArray; + for (let o = 0, a = r.length; o < a; ++o) { + const l = r[o]; + if (!Cl(l, t.viewState)) + continue; + const h = l.layer.getSource(); + if (!h) + continue; + const c = h.getAttributions(); + if (!c) + continue; + const u = c(t); + if (!!u) + if (s = s && h.getAttributionsCollapsible() !== !1, Array.isArray(u)) + for (let d = 0, f = u.length; d < f; ++d) + u[d] in e || (i.push(u[d]), e[u[d]] = !0); + else + u in e || (i.push(u), e[u] = !0); + } + return this.overrideCollapsible_ || this.setCollapsible(s), i; + } + updateElement_(t) { + if (!t) { + this.renderedVisible_ && (this.element.style.display = "none", this.renderedVisible_ = !1); + return; + } + const e = this.collectSourceAttributions_(t), i = e.length > 0; + if (this.renderedVisible_ != i && (this.element.style.display = i ? "" : "none", this.renderedVisible_ = i), !Ni(e, this.renderedAttributions_)) { + v0(this.ulElement_); + for (let s = 0, r = e.length; s < r; ++s) { + const o = document.createElement("li"); + o.innerHTML = e[s], this.ulElement_.appendChild(o); + } + this.renderedAttributions_ = e; + } + } + handleClick_(t) { + t.preventDefault(), this.handleToggle_(), this.userCollapsed_ = this.collapsed_; + } + handleToggle_() { + this.element.classList.toggle(Uh), this.collapsed_ ? io(this.collapseLabel_, this.label_) : io(this.label_, this.collapseLabel_), this.collapsed_ = !this.collapsed_, this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_)); + } + getCollapsible() { + return this.collapsible_; + } + setCollapsible(t) { + this.collapsible_ !== t && (this.collapsible_ = t, this.element.classList.toggle("ol-uncollapsible"), this.userCollapsed_ && this.handleToggle_()); + } + setCollapsed(t) { + this.userCollapsed_ = t, !(!this.collapsible_ || this.collapsed_ === t) && this.handleToggle_(); + } + getCollapsed() { + return this.collapsed_; + } + render(t) { + this.updateElement_(t.frameState); + } +} +const N1 = F1; +class D1 extends Gt { + constructor(t) { + t = t || {}, super({ + element: document.createElement("div"), + render: t.render, + target: t.target + }); + const e = t.className !== void 0 ? t.className : "ol-rotate", i = t.label !== void 0 ? t.label : "\u21E7", s = t.compassClassName !== void 0 ? t.compassClassName : "ol-compass"; + this.label_ = null, typeof i == "string" ? (this.label_ = document.createElement("span"), this.label_.className = s, this.label_.textContent = i) : (this.label_ = i, this.label_.classList.add(s)); + const r = t.tipLabel ? t.tipLabel : "Reset rotation", o = document.createElement("button"); + o.className = e + "-reset", o.setAttribute("type", "button"), o.title = r, o.appendChild(this.label_), o.addEventListener( + U.CLICK, + this.handleClick_.bind(this), + !1 + ); + const a = e + " " + ss + " " + Ao, l = this.element; + l.className = a, l.appendChild(o), this.callResetNorth_ = t.resetNorth ? t.resetNorth : void 0, this.duration_ = t.duration !== void 0 ? t.duration : 250, this.autoHide_ = t.autoHide !== void 0 ? t.autoHide : !0, this.rotation_ = void 0, this.autoHide_ && this.element.classList.add(Rr); + } + handleClick_(t) { + t.preventDefault(), this.callResetNorth_ !== void 0 ? this.callResetNorth_() : this.resetNorth_(); + } + resetNorth_() { + const e = this.getMap().getView(); + if (!e) + return; + const i = e.getRotation(); + i !== void 0 && (this.duration_ > 0 && i % (2 * Math.PI) !== 0 ? e.animate({ + rotation: 0, + duration: this.duration_, + easing: rs + }) : e.setRotation(0)); + } + render(t) { + const e = t.frameState; + if (!e) + return; + const i = e.viewState.rotation; + if (i != this.rotation_) { + const s = "rotate(" + i + "rad)"; + if (this.autoHide_) { + const r = this.element.classList.contains(Rr); + !r && i === 0 ? this.element.classList.add(Rr) : r && i !== 0 && this.element.classList.remove(Rr); + } + this.label_.style.transform = s; + } + this.rotation_ = i; + } +} +const k1 = D1; +class G1 extends Gt { + constructor(t) { + t = t || {}, super({ + element: document.createElement("div"), + target: t.target + }); + const e = t.className !== void 0 ? t.className : "ol-zoom", i = t.delta !== void 0 ? t.delta : 1, s = t.zoomInClassName !== void 0 ? t.zoomInClassName : e + "-in", r = t.zoomOutClassName !== void 0 ? t.zoomOutClassName : e + "-out", o = t.zoomInLabel !== void 0 ? t.zoomInLabel : "+", a = t.zoomOutLabel !== void 0 ? t.zoomOutLabel : "\u2013", l = t.zoomInTipLabel !== void 0 ? t.zoomInTipLabel : "Zoom in", h = t.zoomOutTipLabel !== void 0 ? t.zoomOutTipLabel : "Zoom out", c = document.createElement("button"); + c.className = s, c.setAttribute("type", "button"), c.title = l, c.appendChild( + typeof o == "string" ? document.createTextNode(o) : o + ), c.addEventListener( + U.CLICK, + this.handleClick_.bind(this, i), + !1 + ); + const u = document.createElement("button"); + u.className = r, u.setAttribute("type", "button"), u.title = h, u.appendChild( + typeof a == "string" ? document.createTextNode(a) : a + ), u.addEventListener( + U.CLICK, + this.handleClick_.bind(this, -i), + !1 + ); + const d = e + " " + ss + " " + Ao, f = this.element; + f.className = d, f.appendChild(c), f.appendChild(u), this.duration_ = t.duration !== void 0 ? t.duration : 250; + } + handleClick_(t, e) { + e.preventDefault(), this.zoomByDelta_(t); + } + zoomByDelta_(t) { + const i = this.getMap().getView(); + if (!i) + return; + const s = i.getZoom(); + if (s !== void 0) { + const r = i.getConstrainedZoom(s + t); + this.duration_ > 0 ? (i.getAnimating() && i.cancelAnimations(), i.animate({ + zoom: r, + duration: this.duration_, + easing: rs + })) : i.setZoom(r); + } + } +} +const Pd = G1; +function $1(n) { + n = n || {}; + const t = new Ee(); + return (n.zoom !== void 0 ? n.zoom : !0) && t.push(new Pd(n.zoomOptions)), (n.rotate !== void 0 ? n.rotate : !0) && t.push(new k1(n.rotateOptions)), (n.attribution !== void 0 ? n.attribution : !0) && t.push(new N1(n.attributionOptions)), t; +} +const Za = { + ACTIVE: "active" +}; +class B1 extends Oe { + constructor(t) { + super(), this.on, this.once, this.un, t && t.handleEvent && (this.handleEvent = t.handleEvent), this.map_ = null, this.setActive(!0); + } + getActive() { + return this.get(Za.ACTIVE); + } + getMap() { + return this.map_; + } + handleEvent(t) { + return !0; + } + setActive(t) { + this.set(Za.ACTIVE, t); + } + setMap(t) { + this.map_ = t; + } +} +function z1(n, t, e) { + const i = n.getCenterInternal(); + if (i) { + const s = [i[0] + t[0], i[1] + t[1]]; + n.animateInternal({ + duration: e !== void 0 ? e : 250, + easing: r1, + center: n.getConstrainedCenter(s) + }); + } +} +function Vl(n, t, e, i) { + const s = n.getZoom(); + if (s === void 0) + return; + const r = n.getConstrainedZoom(s + t), o = n.getResolutionForZoom(r); + n.getAnimating() && n.cancelAnimations(), n.animate({ + resolution: o, + anchor: e, + duration: i !== void 0 ? i : 250, + easing: rs + }); +} +const er = B1; +class Z1 extends er { + constructor(t) { + super(), t = t || {}, this.delta_ = t.delta ? t.delta : 1, this.duration_ = t.duration !== void 0 ? t.duration : 250; + } + handleEvent(t) { + let e = !1; + if (t.type == nt.DBLCLICK) { + const i = t.originalEvent, s = t.map, r = t.coordinate, o = i.shiftKey ? -this.delta_ : this.delta_, a = s.getView(); + Vl(a, o, r, this.duration_), i.preventDefault(), e = !0; + } + return !e; + } +} +const V1 = Z1; +class U1 extends er { + constructor(t) { + t = t || {}, super( + t + ), t.handleDownEvent && (this.handleDownEvent = t.handleDownEvent), t.handleDragEvent && (this.handleDragEvent = t.handleDragEvent), t.handleMoveEvent && (this.handleMoveEvent = t.handleMoveEvent), t.handleUpEvent && (this.handleUpEvent = t.handleUpEvent), t.stopDown && (this.stopDown = t.stopDown), this.handlingDownUpSequence = !1, this.targetPointers = []; + } + getPointerCount() { + return this.targetPointers.length; + } + handleDownEvent(t) { + return !1; + } + handleDragEvent(t) { + } + handleEvent(t) { + if (!t.originalEvent) + return !0; + let e = !1; + if (this.updateTrackedPointers_(t), this.handlingDownUpSequence) { + if (t.type == nt.POINTERDRAG) + this.handleDragEvent(t), t.originalEvent.preventDefault(); + else if (t.type == nt.POINTERUP) { + const i = this.handleUpEvent(t); + this.handlingDownUpSequence = i && this.targetPointers.length > 0; + } + } else if (t.type == nt.POINTERDOWN) { + const i = this.handleDownEvent(t); + this.handlingDownUpSequence = i, e = this.stopDown(i); + } else + t.type == nt.POINTERMOVE && this.handleMoveEvent(t); + return !e; + } + handleMoveEvent(t) { + } + handleUpEvent(t) { + return !1; + } + stopDown(t) { + return t; + } + updateTrackedPointers_(t) { + t.activePointers && (this.targetPointers = t.activePointers); + } +} +function Ul(n) { + const t = n.length; + let e = 0, i = 0; + for (let s = 0; s < t; s++) + e += n[s].clientX, i += n[s].clientY; + return [e / t, i / t]; +} +const ki = U1; +function Va(n) { + const t = arguments; + return function(e) { + let i = !0; + for (let s = 0, r = t.length; s < r && (i = i && t[s](e), !!i); ++s) + ; + return i; + }; +} +const W1 = function(n) { + const t = n.originalEvent; + return t.altKey && !(t.metaKey || t.ctrlKey) && !t.shiftKey; +}, H1 = function(n) { + const t = n.originalEvent; + return t.altKey && !(t.metaKey || t.ctrlKey) && t.shiftKey; +}, X1 = function(n) { + const t = n.map.getTargetElement(), e = n.map.getOwnerDocument().activeElement; + return t.contains(e); +}, Ad = function(n) { + return n.map.getTargetElement().hasAttribute("tabindex") ? X1(n) : !0; +}, co = en, Od = function(n) { + const t = n.originalEvent; + return t.button == 0 && !(Zg && Vg && t.ctrlKey); +}, Y1 = un, j1 = function(n) { + return n.type == nt.SINGLECLICK; +}, Wl = function(n) { + const t = n.originalEvent; + return !t.altKey && !(t.metaKey || t.ctrlKey) && !t.shiftKey; +}, Fd = function(n) { + const t = n.originalEvent; + return !t.altKey && !(t.metaKey || t.ctrlKey) && t.shiftKey; +}, Nd = function(n) { + const t = n.originalEvent, e = t.target.tagName; + return e !== "INPUT" && e !== "SELECT" && e !== "TEXTAREA" && !t.target.isContentEditable; +}, aa = function(n) { + const t = n.originalEvent; + return Y(t !== void 0, 56), t.pointerType == "mouse"; +}, Dd = function(n) { + const t = n.originalEvent; + return Y(t !== void 0, 56), t.isPrimary && t.button === 0; +}; +class q1 extends ki { + constructor(t) { + super({ + stopDown: un + }), t = t || {}, this.kinetic_ = t.kinetic, this.lastCentroid = null, this.lastPointersCount_, this.panning_ = !1; + const e = t.condition ? t.condition : Va(Wl, Dd); + this.condition_ = t.onFocusOnly ? Va(Ad, e) : e, this.noKinetic_ = !1; + } + handleDragEvent(t) { + this.panning_ || (this.panning_ = !0, this.getMap().getView().beginInteraction()); + const e = this.targetPointers, i = Ul(e); + if (e.length == this.lastPointersCount_) { + if (this.kinetic_ && this.kinetic_.update(i[0], i[1]), this.lastCentroid) { + const s = [ + this.lastCentroid[0] - i[0], + i[1] - this.lastCentroid[1] + ], o = t.map.getView(); + sd(s, o.getResolution()), El(s, o.getRotation()), o.adjustCenterInternal(s); + } + } else + this.kinetic_ && this.kinetic_.begin(); + this.lastCentroid = i, this.lastPointersCount_ = e.length, t.originalEvent.preventDefault(); + } + handleUpEvent(t) { + const e = t.map, i = e.getView(); + if (this.targetPointers.length === 0) { + if (!this.noKinetic_ && this.kinetic_ && this.kinetic_.end()) { + const s = this.kinetic_.getDistance(), r = this.kinetic_.getAngle(), o = i.getCenterInternal(), a = e.getPixelFromCoordinateInternal(o), l = e.getCoordinateFromPixelInternal([ + a[0] - s * Math.cos(r), + a[1] - s * Math.sin(r) + ]); + i.animateInternal({ + center: i.getConstrainedCenter(l), + duration: 500, + easing: rs + }); + } + return this.panning_ && (this.panning_ = !1, i.endInteraction()), !1; + } else + return this.kinetic_ && this.kinetic_.begin(), this.lastCentroid = null, !0; + } + handleDownEvent(t) { + if (this.targetPointers.length > 0 && this.condition_(t)) { + const i = t.map.getView(); + return this.lastCentroid = null, i.getAnimating() && i.cancelAnimations(), this.kinetic_ && this.kinetic_.begin(), this.noKinetic_ = this.targetPointers.length > 1, !0; + } else + return !1; + } +} +const K1 = q1; +class J1 extends ki { + constructor(t) { + t = t || {}, super({ + stopDown: un + }), this.condition_ = t.condition ? t.condition : H1, this.lastAngle_ = void 0, this.duration_ = t.duration !== void 0 ? t.duration : 250; + } + handleDragEvent(t) { + if (!aa(t)) + return; + const e = t.map, i = e.getView(); + if (i.getConstraints().rotation === Ol) + return; + const s = e.getSize(), r = t.pixel, o = Math.atan2(s[1] / 2 - r[1], r[0] - s[0] / 2); + if (this.lastAngle_ !== void 0) { + const a = o - this.lastAngle_; + i.adjustRotationInternal(-a); + } + this.lastAngle_ = o; + } + handleUpEvent(t) { + return aa(t) ? (t.map.getView().endInteraction(this.duration_), !1) : !0; + } + handleDownEvent(t) { + return aa(t) && Od(t) && this.condition_(t) ? (t.map.getView().beginInteraction(), this.lastAngle_ = void 0, !0) : !1; + } +} +const Q1 = J1; +class tm extends fl { + constructor(t) { + super(), this.geometry_ = null, this.element_ = document.createElement("div"), this.element_.style.position = "absolute", this.element_.style.pointerEvents = "auto", this.element_.className = "ol-box " + t, this.map_ = null, this.startPixel_ = null, this.endPixel_ = null; + } + disposeInternal() { + this.setMap(null); + } + render_() { + const t = this.startPixel_, e = this.endPixel_, i = "px", s = this.element_.style; + s.left = Math.min(t[0], e[0]) + i, s.top = Math.min(t[1], e[1]) + i, s.width = Math.abs(e[0] - t[0]) + i, s.height = Math.abs(e[1] - t[1]) + i; + } + setMap(t) { + if (this.map_) { + this.map_.getOverlayContainer().removeChild(this.element_); + const e = this.element_.style; + e.left = "inherit", e.top = "inherit", e.width = "inherit", e.height = "inherit"; + } + this.map_ = t, this.map_ && this.map_.getOverlayContainer().appendChild(this.element_); + } + setPixels(t, e) { + this.startPixel_ = t, this.endPixel_ = e, this.createOrUpdateGeometry(), this.render_(); + } + createOrUpdateGeometry() { + const t = this.startPixel_, e = this.endPixel_, s = [ + t, + [t[0], e[1]], + e, + [e[0], t[1]] + ].map( + this.map_.getCoordinateFromPixelInternal, + this.map_ + ); + s[4] = s[0].slice(), this.geometry_ ? this.geometry_.setCoordinates([s]) : this.geometry_ = new Ai([s]); + } + getGeometry() { + return this.geometry_; + } +} +const em = tm, Lr = { + BOXSTART: "boxstart", + BOXDRAG: "boxdrag", + BOXEND: "boxend", + BOXCANCEL: "boxcancel" +}; +class la extends Re { + constructor(t, e, i) { + super(t), this.coordinate = e, this.mapBrowserEvent = i; + } +} +class im extends ki { + constructor(t) { + super(), this.on, this.once, this.un, t = t || {}, this.box_ = new em(t.className || "ol-dragbox"), this.minArea_ = t.minArea !== void 0 ? t.minArea : 64, t.onBoxEnd && (this.onBoxEnd = t.onBoxEnd), this.startPixel_ = null, this.condition_ = t.condition ? t.condition : Od, this.boxEndCondition_ = t.boxEndCondition ? t.boxEndCondition : this.defaultBoxEndCondition; + } + defaultBoxEndCondition(t, e, i) { + const s = i[0] - e[0], r = i[1] - e[1]; + return s * s + r * r >= this.minArea_; + } + getGeometry() { + return this.box_.getGeometry(); + } + handleDragEvent(t) { + this.box_.setPixels(this.startPixel_, t.pixel), this.dispatchEvent( + new la( + Lr.BOXDRAG, + t.coordinate, + t + ) + ); + } + handleUpEvent(t) { + this.box_.setMap(null); + const e = this.boxEndCondition_( + t, + this.startPixel_, + t.pixel + ); + return e && this.onBoxEnd(t), this.dispatchEvent( + new la( + e ? Lr.BOXEND : Lr.BOXCANCEL, + t.coordinate, + t + ) + ), !1; + } + handleDownEvent(t) { + return this.condition_(t) ? (this.startPixel_ = t.pixel, this.box_.setMap(t.map), this.box_.setPixels(this.startPixel_, this.startPixel_), this.dispatchEvent( + new la( + Lr.BOXSTART, + t.coordinate, + t + ) + ), !0) : !1; + } + onBoxEnd(t) { + } +} +const nm = im; +class sm extends nm { + constructor(t) { + t = t || {}; + const e = t.condition ? t.condition : Fd; + super({ + condition: e, + className: t.className || "ol-dragzoom", + minArea: t.minArea + }), this.duration_ = t.duration !== void 0 ? t.duration : 200, this.out_ = t.out !== void 0 ? t.out : !1; + } + onBoxEnd(t) { + const i = this.getMap().getView(); + let s = this.getGeometry(); + if (this.out_) { + const r = i.rotatedExtentForGeometry(s), o = i.getResolutionForExtentInternal(r), a = i.getResolution() / o; + s = s.clone(), s.scale(a * a); + } + i.fitInternal(s, { + duration: this.duration_, + easing: rs + }); + } +} +const rm = sm, zi = { + LEFT: 37, + UP: 38, + RIGHT: 39, + DOWN: 40 +}; +class om extends er { + constructor(t) { + super(), t = t || {}, this.defaultCondition_ = function(e) { + return Wl(e) && Nd(e); + }, this.condition_ = t.condition !== void 0 ? t.condition : this.defaultCondition_, this.duration_ = t.duration !== void 0 ? t.duration : 100, this.pixelDelta_ = t.pixelDelta !== void 0 ? t.pixelDelta : 128; + } + handleEvent(t) { + let e = !1; + if (t.type == U.KEYDOWN) { + const i = t.originalEvent, s = i.keyCode; + if (this.condition_(t) && (s == zi.DOWN || s == zi.LEFT || s == zi.RIGHT || s == zi.UP)) { + const o = t.map.getView(), a = o.getResolution() * this.pixelDelta_; + let l = 0, h = 0; + s == zi.DOWN ? h = -a : s == zi.LEFT ? l = -a : s == zi.RIGHT ? l = a : h = a; + const c = [l, h]; + El(c, o.getRotation()), z1(o, c, this.duration_), i.preventDefault(), e = !0; + } + } + return !e; + } +} +const am = om; +class lm extends er { + constructor(t) { + super(), t = t || {}, this.condition_ = t.condition ? t.condition : Nd, this.delta_ = t.delta ? t.delta : 1, this.duration_ = t.duration !== void 0 ? t.duration : 100; + } + handleEvent(t) { + let e = !1; + if (t.type == U.KEYDOWN || t.type == U.KEYPRESS) { + const i = t.originalEvent, s = i.charCode; + if (this.condition_(t) && (s == "+".charCodeAt(0) || s == "-".charCodeAt(0))) { + const r = t.map, o = s == "+".charCodeAt(0) ? this.delta_ : -this.delta_, a = r.getView(); + Vl(a, o, void 0, this.duration_), i.preventDefault(), e = !0; + } + } + return !e; + } +} +const hm = lm; +class cm { + constructor(t, e, i) { + this.decay_ = t, this.minVelocity_ = e, this.delay_ = i, this.points_ = [], this.angle_ = 0, this.initialVelocity_ = 0; + } + begin() { + this.points_.length = 0, this.angle_ = 0, this.initialVelocity_ = 0; + } + update(t, e) { + this.points_.push(t, e, Date.now()); + } + end() { + if (this.points_.length < 6) + return !1; + const t = Date.now() - this.delay_, e = this.points_.length - 3; + if (this.points_[e + 2] < t) + return !1; + let i = e - 3; + for (; i > 0 && this.points_[i + 2] > t; ) + i -= 3; + const s = this.points_[e + 2] - this.points_[i + 2]; + if (s < 1e3 / 60) + return !1; + const r = this.points_[e] - this.points_[i], o = this.points_[e + 1] - this.points_[i + 1]; + return this.angle_ = Math.atan2(o, r), this.initialVelocity_ = Math.sqrt(r * r + o * o) / s, this.initialVelocity_ > this.minVelocity_; + } + getDistance() { + return (this.minVelocity_ - this.initialVelocity_) / this.decay_; + } + getAngle() { + return this.angle_; + } +} +const um = cm; +class dm extends er { + constructor(t) { + t = t || {}, super( + t + ), this.totalDelta_ = 0, this.lastDelta_ = 0, this.maxDelta_ = t.maxDelta !== void 0 ? t.maxDelta : 1, this.duration_ = t.duration !== void 0 ? t.duration : 250, this.timeout_ = t.timeout !== void 0 ? t.timeout : 80, this.useAnchor_ = t.useAnchor !== void 0 ? t.useAnchor : !0, this.constrainResolution_ = t.constrainResolution !== void 0 ? t.constrainResolution : !1; + const e = t.condition ? t.condition : co; + this.condition_ = t.onFocusOnly ? Va(Ad, e) : e, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_, this.mode_ = void 0, this.trackpadEventGap_ = 400, this.trackpadTimeoutId_, this.deltaPerZoom_ = 300; + } + endInteraction_() { + this.trackpadTimeoutId_ = void 0; + const t = this.getMap(); + if (!t) + return; + t.getView().endInteraction( + void 0, + this.lastDelta_ ? this.lastDelta_ > 0 ? 1 : -1 : 0, + this.lastAnchor_ + ); + } + handleEvent(t) { + if (!this.condition_(t) || t.type !== U.WHEEL) + return !0; + const i = t.map, s = t.originalEvent; + s.preventDefault(), this.useAnchor_ && (this.lastAnchor_ = t.coordinate); + let r; + if (t.type == U.WHEEL && (r = s.deltaY, Bg && s.deltaMode === WheelEvent.DOM_DELTA_PIXEL && (r /= Hu), s.deltaMode === WheelEvent.DOM_DELTA_LINE && (r *= 40)), r === 0) + return !1; + this.lastDelta_ = r; + const o = Date.now(); + this.startTime_ === void 0 && (this.startTime_ = o), (!this.mode_ || o - this.startTime_ > this.trackpadEventGap_) && (this.mode_ = Math.abs(r) < 4 ? "trackpad" : "wheel"); + const a = i.getView(); + if (this.mode_ === "trackpad" && !(a.getConstrainResolution() || this.constrainResolution_)) + return this.trackpadTimeoutId_ ? clearTimeout(this.trackpadTimeoutId_) : (a.getAnimating() && a.cancelAnimations(), a.beginInteraction()), this.trackpadTimeoutId_ = setTimeout( + this.endInteraction_.bind(this), + this.timeout_ + ), a.adjustZoom(-r / this.deltaPerZoom_, this.lastAnchor_), this.startTime_ = o, !1; + this.totalDelta_ += r; + const l = Math.max(this.timeout_ - (o - this.startTime_), 0); + return clearTimeout(this.timeoutId_), this.timeoutId_ = setTimeout( + this.handleWheelZoom_.bind(this, i), + l + ), !1; + } + handleWheelZoom_(t) { + const e = t.getView(); + e.getAnimating() && e.cancelAnimations(); + let i = -Et( + this.totalDelta_, + -this.maxDelta_ * this.deltaPerZoom_, + this.maxDelta_ * this.deltaPerZoom_ + ) / this.deltaPerZoom_; + (e.getConstrainResolution() || this.constrainResolution_) && (i = i ? i > 0 ? 1 : -1 : 0), Vl(e, i, this.lastAnchor_, this.duration_), this.mode_ = void 0, this.totalDelta_ = 0, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_ = void 0; + } + setMouseAnchor(t) { + this.useAnchor_ = t, t || (this.lastAnchor_ = null); + } +} +const fm = dm; +class gm extends ki { + constructor(t) { + t = t || {}; + const e = t; + e.stopDown || (e.stopDown = un), super(e), this.anchor_ = null, this.lastAngle_ = void 0, this.rotating_ = !1, this.rotationDelta_ = 0, this.threshold_ = t.threshold !== void 0 ? t.threshold : 0.3, this.duration_ = t.duration !== void 0 ? t.duration : 250; + } + handleDragEvent(t) { + let e = 0; + const i = this.targetPointers[0], s = this.targetPointers[1], r = Math.atan2( + s.clientY - i.clientY, + s.clientX - i.clientX + ); + if (this.lastAngle_ !== void 0) { + const c = r - this.lastAngle_; + this.rotationDelta_ += c, !this.rotating_ && Math.abs(this.rotationDelta_) > this.threshold_ && (this.rotating_ = !0), e = c; + } + this.lastAngle_ = r; + const o = t.map, a = o.getView(); + if (a.getConstraints().rotation === Ol) + return; + const l = o.getViewport().getBoundingClientRect(), h = Ul(this.targetPointers); + h[0] -= l.left, h[1] -= l.top, this.anchor_ = o.getCoordinateFromPixelInternal(h), this.rotating_ && (o.render(), a.adjustRotationInternal(e, this.anchor_)); + } + handleUpEvent(t) { + return this.targetPointers.length < 2 ? (t.map.getView().endInteraction(this.duration_), !1) : !0; + } + handleDownEvent(t) { + if (this.targetPointers.length >= 2) { + const e = t.map; + return this.anchor_ = null, this.lastAngle_ = void 0, this.rotating_ = !1, this.rotationDelta_ = 0, this.handlingDownUpSequence || e.getView().beginInteraction(), !0; + } else + return !1; + } +} +const mm = gm; +class _m extends ki { + constructor(t) { + t = t || {}; + const e = t; + e.stopDown || (e.stopDown = un), super(e), this.anchor_ = null, this.duration_ = t.duration !== void 0 ? t.duration : 400, this.lastDistance_ = void 0, this.lastScaleDelta_ = 1; + } + handleDragEvent(t) { + let e = 1; + const i = this.targetPointers[0], s = this.targetPointers[1], r = i.clientX - s.clientX, o = i.clientY - s.clientY, a = Math.sqrt(r * r + o * o); + this.lastDistance_ !== void 0 && (e = this.lastDistance_ / a), this.lastDistance_ = a; + const l = t.map, h = l.getView(); + e != 1 && (this.lastScaleDelta_ = e); + const c = l.getViewport().getBoundingClientRect(), u = Ul(this.targetPointers); + u[0] -= c.left, u[1] -= c.top, this.anchor_ = l.getCoordinateFromPixelInternal(u), l.render(), h.adjustResolutionInternal(e, this.anchor_); + } + handleUpEvent(t) { + if (this.targetPointers.length < 2) { + const i = t.map.getView(), s = this.lastScaleDelta_ > 1 ? 1 : -1; + return i.endInteraction(this.duration_, s), !1; + } else + return !0; + } + handleDownEvent(t) { + if (this.targetPointers.length >= 2) { + const e = t.map; + return this.anchor_ = null, this.lastDistance_ = void 0, this.lastScaleDelta_ = 1, this.handlingDownUpSequence || e.getView().beginInteraction(), !0; + } else + return !1; + } +} +const pm = _m; +function ym(n) { + n = n || {}; + const t = new Ee(), e = new um(-5e-3, 0.05, 100); + return (n.altShiftDragRotate !== void 0 ? n.altShiftDragRotate : !0) && t.push(new Q1()), (n.doubleClickZoom !== void 0 ? n.doubleClickZoom : !0) && t.push( + new V1({ + delta: n.zoomDelta, + duration: n.zoomDuration + }) + ), (n.dragPan !== void 0 ? n.dragPan : !0) && t.push( + new K1({ + onFocusOnly: n.onFocusOnly, + kinetic: e + }) + ), (n.pinchRotate !== void 0 ? n.pinchRotate : !0) && t.push(new mm()), (n.pinchZoom !== void 0 ? n.pinchZoom : !0) && t.push( + new pm({ + duration: n.zoomDuration + }) + ), (n.keyboard !== void 0 ? n.keyboard : !0) && (t.push(new am()), t.push( + new hm({ + delta: n.zoomDelta, + duration: n.zoomDuration + }) + )), (n.mouseWheelZoom !== void 0 ? n.mouseWheelZoom : !0) && t.push( + new fm({ + onFocusOnly: n.onFocusOnly, + duration: n.zoomDuration + }) + ), (n.shiftDragZoom !== void 0 ? n.shiftDragZoom : !0) && t.push( + new rm({ + duration: n.zoomDuration + }) + ), t; +} +function oc(n) { + return n[0] > 0 && n[1] > 0; +} +function vm(n, t, e) { + return e === void 0 && (e = [0, 0]), e[0] = n[0] * t + 0.5 | 0, e[1] = n[1] * t + 0.5 | 0, e; +} +function fe(n, t) { + return Array.isArray(n) ? n : (t === void 0 ? t = [n, n] : (t[0] = n, t[1] = n), t); +} +function kd(n) { + if (n instanceof Po) { + n.setMapInternal(null); + return; + } + n instanceof Oo && n.getLayers().forEach(kd); +} +function Gd(n, t) { + if (n instanceof Po) { + n.setMapInternal(t); + return; + } + if (n instanceof Oo) { + const e = n.getLayers().getArray(); + for (let i = 0, s = e.length; i < s; ++i) + Gd(e[i], t); + } +} +class xm extends Oe { + constructor(t) { + super(), t = t || {}, this.on, this.once, this.un; + const e = Cm(t); + this.renderComplete_, this.loaded_ = !0, this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this), this.maxTilesLoading_ = t.maxTilesLoading !== void 0 ? t.maxTilesLoading : 16, this.pixelRatio_ = t.pixelRatio !== void 0 ? t.pixelRatio : Hu, this.postRenderTimeoutHandle_, this.animationDelayKey_, this.animationDelay_ = this.animationDelay_.bind(this), this.coordinateToPixelTransform_ = $e(), this.pixelToCoordinateTransform_ = $e(), this.frameIndex_ = 0, this.frameState_ = null, this.previousExtent_ = null, this.viewPropertyListenerKey_ = null, this.viewChangeListenerKey_ = null, this.layerGroupPropertyListenerKeys_ = null, this.viewport_ = document.createElement("div"), this.viewport_.className = "ol-viewport" + ("ontouchstart" in window ? " ol-touch" : ""), this.viewport_.style.position = "relative", this.viewport_.style.overflow = "hidden", this.viewport_.style.width = "100%", this.viewport_.style.height = "100%", this.overlayContainer_ = document.createElement("div"), this.overlayContainer_.style.position = "absolute", this.overlayContainer_.style.zIndex = "0", this.overlayContainer_.style.width = "100%", this.overlayContainer_.style.height = "100%", this.overlayContainer_.style.pointerEvents = "none", this.overlayContainer_.className = "ol-overlaycontainer", this.viewport_.appendChild(this.overlayContainer_), this.overlayContainerStopEvent_ = document.createElement("div"), this.overlayContainerStopEvent_.style.position = "absolute", this.overlayContainerStopEvent_.style.zIndex = "0", this.overlayContainerStopEvent_.style.width = "100%", this.overlayContainerStopEvent_.style.height = "100%", this.overlayContainerStopEvent_.style.pointerEvents = "none", this.overlayContainerStopEvent_.className = "ol-overlaycontainer-stopevent", this.viewport_.appendChild(this.overlayContainerStopEvent_), this.mapBrowserEventHandler_ = null, this.moveTolerance_ = t.moveTolerance, this.keyboardEventTarget_ = e.keyboardEventTarget, this.targetChangeHandlerKeys_ = null, this.controls = e.controls || $1(), this.interactions = e.interactions || ym({ + onFocusOnly: !0 + }), this.overlays_ = e.overlays, this.overlayIdIndex_ = {}, this.renderer_ = null, this.postRenderFunctions_ = [], this.tileQueue_ = new N0( + this.getTilePriority.bind(this), + this.handleTileChange_.bind(this) + ), this.addChangeListener( + Ot.LAYERGROUP, + this.handleLayerGroupChanged_ + ), this.addChangeListener(Ot.VIEW, this.handleViewChanged_), this.addChangeListener(Ot.SIZE, this.handleSizeChanged_), this.addChangeListener(Ot.TARGET, this.handleTargetChanged_), this.setProperties(e.values); + const i = this; + t.view && !(t.view instanceof si) && t.view.then(function(s) { + i.setView(new si(s)); + }), this.controls.addEventListener( + Dt.ADD, + function(s) { + s.element.setMap(this); + }.bind(this) + ), this.controls.addEventListener( + Dt.REMOVE, + function(s) { + s.element.setMap(null); + }.bind(this) + ), this.interactions.addEventListener( + Dt.ADD, + function(s) { + s.element.setMap(this); + }.bind(this) + ), this.interactions.addEventListener( + Dt.REMOVE, + function(s) { + s.element.setMap(null); + }.bind(this) + ), this.overlays_.addEventListener( + Dt.ADD, + function(s) { + this.addOverlayInternal_(s.element); + }.bind(this) + ), this.overlays_.addEventListener( + Dt.REMOVE, + function(s) { + const r = s.element.getId(); + r !== void 0 && delete this.overlayIdIndex_[r.toString()], s.element.setMap(null); + }.bind(this) + ), this.controls.forEach( + function(s) { + s.setMap(this); + }.bind(this) + ), this.interactions.forEach( + function(s) { + s.setMap(this); + }.bind(this) + ), this.overlays_.forEach(this.addOverlayInternal_.bind(this)); + } + addControl(t) { + this.getControls().push(t); + } + addInteraction(t) { + this.getInteractions().push(t); + } + addLayer(t) { + this.getLayerGroup().getLayers().push(t); + } + handleLayerAdd_(t) { + Gd(t.layer, this); + } + addOverlay(t) { + this.getOverlays().push(t); + } + addOverlayInternal_(t) { + const e = t.getId(); + e !== void 0 && (this.overlayIdIndex_[e.toString()] = t), t.setMap(this); + } + disposeInternal() { + this.controls.clear(), this.interactions.clear(), this.overlays_.clear(), this.setTarget(null), super.disposeInternal(); + } + forEachFeatureAtPixel(t, e, i) { + if (!this.frameState_ || !this.renderer_) + return; + const s = this.getCoordinateFromPixelInternal(t); + i = i !== void 0 ? i : {}; + const r = i.hitTolerance !== void 0 ? i.hitTolerance : 0, o = i.layerFilter !== void 0 ? i.layerFilter : en, a = i.checkWrapped !== !1; + return this.renderer_.forEachFeatureAtCoordinate( + s, + this.frameState_, + r, + a, + e, + null, + o, + null + ); + } + getFeaturesAtPixel(t, e) { + const i = []; + return this.forEachFeatureAtPixel( + t, + function(s) { + i.push(s); + }, + e + ), i; + } + getAllLayers() { + const t = []; + function e(i) { + i.forEach(function(s) { + s instanceof Oo ? e(s.getLayers()) : t.push(s); + }); + } + return e(this.getLayers()), t; + } + hasFeatureAtPixel(t, e) { + if (!this.frameState_ || !this.renderer_) + return !1; + const i = this.getCoordinateFromPixelInternal(t); + e = e !== void 0 ? e : {}; + const s = e.layerFilter !== void 0 ? e.layerFilter : en, r = e.hitTolerance !== void 0 ? e.hitTolerance : 0, o = e.checkWrapped !== !1; + return this.renderer_.hasFeatureAtCoordinate( + i, + this.frameState_, + r, + o, + s, + null + ); + } + getEventCoordinate(t) { + return this.getCoordinateFromPixel(this.getEventPixel(t)); + } + getEventCoordinateInternal(t) { + return this.getCoordinateFromPixelInternal(this.getEventPixel(t)); + } + getEventPixel(t) { + const e = this.viewport_.getBoundingClientRect(), i = "changedTouches" in t ? t.changedTouches[0] : t; + return [ + i.clientX - e.left, + i.clientY - e.top + ]; + } + getTarget() { + return this.get(Ot.TARGET); + } + getTargetElement() { + const t = this.getTarget(); + return t !== void 0 ? typeof t == "string" ? document.getElementById(t) : t : null; + } + getCoordinateFromPixel(t) { + return qn( + this.getCoordinateFromPixelInternal(t), + this.getView().getProjection() + ); + } + getCoordinateFromPixelInternal(t) { + const e = this.frameState_; + return e ? Nt( + e.pixelToCoordinateTransform, + t.slice() + ) : null; + } + getControls() { + return this.controls; + } + getOverlays() { + return this.overlays_; + } + getOverlayById(t) { + const e = this.overlayIdIndex_[t.toString()]; + return e !== void 0 ? e : null; + } + getInteractions() { + return this.interactions; + } + getLayerGroup() { + return this.get(Ot.LAYERGROUP); + } + setLayers(t) { + const e = this.getLayerGroup(); + if (t instanceof Ee) { + e.setLayers(t); + return; + } + const i = e.getLayers(); + i.clear(), i.extend(t); + } + getLayers() { + return this.getLayerGroup().getLayers(); + } + getLoadingOrNotReady() { + const t = this.getLayerGroup().getLayerStatesArray(); + for (let e = 0, i = t.length; e < i; ++e) { + const s = t[e]; + if (!s.visible) + continue; + const r = s.layer.getRenderer(); + if (r && !r.ready) + return !0; + const o = s.layer.getSource(); + if (o && o.loading) + return !0; + } + return !1; + } + getPixelFromCoordinate(t) { + const e = vt( + t, + this.getView().getProjection() + ); + return this.getPixelFromCoordinateInternal(e); + } + getPixelFromCoordinateInternal(t) { + const e = this.frameState_; + return e ? Nt( + e.coordinateToPixelTransform, + t.slice(0, 2) + ) : null; + } + getRenderer() { + return this.renderer_; + } + getSize() { + return this.get(Ot.SIZE); + } + getView() { + return this.get(Ot.VIEW); + } + getViewport() { + return this.viewport_; + } + getOverlayContainer() { + return this.overlayContainer_; + } + getOverlayContainerStopEvent() { + return this.overlayContainerStopEvent_; + } + getOwnerDocument() { + const t = this.getTargetElement(); + return t ? t.ownerDocument : document; + } + getTilePriority(t, e, i, s) { + return D0( + this.frameState_, + t, + e, + i, + s + ); + } + handleBrowserEvent(t, e) { + e = e || t.type; + const i = new ei(e, this, t); + this.handleMapBrowserEvent(i); + } + handleMapBrowserEvent(t) { + if (!this.frameState_) + return; + const e = t.originalEvent, i = e.type; + if (i === Na.POINTERDOWN || i === U.WHEEL || i === U.KEYDOWN) { + const s = this.getOwnerDocument(), r = this.viewport_.getRootNode ? this.viewport_.getRootNode() : s, o = e.target; + if (this.overlayContainerStopEvent_.contains(o) || !(r === s ? s.documentElement : r).contains(o)) + return; + } + if (t.frameState = this.frameState_, this.dispatchEvent(t) !== !1) { + const s = this.getInteractions().getArray().slice(); + for (let r = s.length - 1; r >= 0; r--) { + const o = s[r]; + if (o.getMap() !== this || !o.getActive() || !this.getTargetElement()) + continue; + if (!o.handleEvent(t) || t.propagationStopped) + break; + } + } + } + handlePostRender() { + const t = this.frameState_, e = this.tileQueue_; + if (!e.isEmpty()) { + let s = this.maxTilesLoading_, r = s; + if (t) { + const o = t.viewHints; + if (o[Wt.ANIMATING] || o[Wt.INTERACTING]) { + const a = Date.now() - t.time > 8; + s = a ? 0 : 8, r = a ? 0 : 2; + } + } + e.getTilesLoading() < s && (e.reprioritize(), e.loadMoreTiles(s, r)); + } + t && this.renderer_ && !t.animate && (this.renderComplete_ === !0 ? (this.hasListener(Ri.RENDERCOMPLETE) && this.renderer_.dispatchRenderEvent( + Ri.RENDERCOMPLETE, + t + ), this.loaded_ === !1 && (this.loaded_ = !0, this.dispatchEvent( + new Tn(vi.LOADEND, this, t) + ))) : this.loaded_ === !0 && (this.loaded_ = !1, this.dispatchEvent( + new Tn(vi.LOADSTART, this, t) + ))); + const i = this.postRenderFunctions_; + for (let s = 0, r = i.length; s < r; ++s) + i[s](this, t); + i.length = 0; + } + handleSizeChanged_() { + this.getView() && !this.getView().getAnimating() && this.getView().resolveConstraints(0), this.render(); + } + handleTargetChanged_() { + if (this.mapBrowserEventHandler_) { + for (let e = 0, i = this.targetChangeHandlerKeys_.length; e < i; ++e) + mt(this.targetChangeHandlerKeys_[e]); + this.targetChangeHandlerKeys_ = null, this.viewport_.removeEventListener( + U.CONTEXTMENU, + this.boundHandleBrowserEvent_ + ), this.viewport_.removeEventListener( + U.WHEEL, + this.boundHandleBrowserEvent_ + ), this.mapBrowserEventHandler_.dispose(), this.mapBrowserEventHandler_ = null, Aa(this.viewport_); + } + const t = this.getTargetElement(); + if (!t) + this.renderer_ && (clearTimeout(this.postRenderTimeoutHandle_), this.postRenderTimeoutHandle_ = void 0, this.postRenderFunctions_.length = 0, this.renderer_.dispose(), this.renderer_ = null), this.animationDelayKey_ && (cancelAnimationFrame(this.animationDelayKey_), this.animationDelayKey_ = void 0); + else { + t.appendChild(this.viewport_), this.renderer_ || (this.renderer_ = new T0(this)), this.mapBrowserEventHandler_ = new P0( + this, + this.moveTolerance_ + ); + for (const s in nt) + this.mapBrowserEventHandler_.addEventListener( + nt[s], + this.handleMapBrowserEvent.bind(this) + ); + this.viewport_.addEventListener( + U.CONTEXTMENU, + this.boundHandleBrowserEvent_, + !1 + ), this.viewport_.addEventListener( + U.WHEEL, + this.boundHandleBrowserEvent_, + Xu ? { passive: !1 } : !1 + ); + const e = this.getOwnerDocument().defaultView, i = this.keyboardEventTarget_ ? this.keyboardEventTarget_ : t; + this.targetChangeHandlerKeys_ = [ + et( + i, + U.KEYDOWN, + this.handleBrowserEvent, + this + ), + et( + i, + U.KEYPRESS, + this.handleBrowserEvent, + this + ), + et(e, U.RESIZE, this.updateSize, this) + ]; + } + this.updateSize(); + } + handleTileChange_() { + this.render(); + } + handleViewPropertyChanged_() { + this.render(); + } + handleViewChanged_() { + this.viewPropertyListenerKey_ && (mt(this.viewPropertyListenerKey_), this.viewPropertyListenerKey_ = null), this.viewChangeListenerKey_ && (mt(this.viewChangeListenerKey_), this.viewChangeListenerKey_ = null); + const t = this.getView(); + t && (this.updateViewportSize_(), this.viewPropertyListenerKey_ = et( + t, + Wn.PROPERTYCHANGE, + this.handleViewPropertyChanged_, + this + ), this.viewChangeListenerKey_ = et( + t, + U.CHANGE, + this.handleViewPropertyChanged_, + this + ), t.resolveConstraints(0)), this.render(); + } + handleLayerGroupChanged_() { + this.layerGroupPropertyListenerKeys_ && (this.layerGroupPropertyListenerKeys_.forEach(mt), this.layerGroupPropertyListenerKeys_ = null); + const t = this.getLayerGroup(); + t && (this.handleLayerAdd_(new Ci("addlayer", t)), this.layerGroupPropertyListenerKeys_ = [ + et(t, Wn.PROPERTYCHANGE, this.render, this), + et(t, U.CHANGE, this.render, this), + et(t, "addlayer", this.handleLayerAdd_, this), + et(t, "removelayer", this.handleLayerRemove_, this) + ]), this.render(); + } + isRendered() { + return !!this.frameState_; + } + animationDelay_() { + this.animationDelayKey_ = void 0, this.renderFrame_(Date.now()); + } + renderSync() { + this.animationDelayKey_ && cancelAnimationFrame(this.animationDelayKey_), this.animationDelay_(); + } + redrawText() { + const t = this.getLayerGroup().getLayerStatesArray(); + for (let e = 0, i = t.length; e < i; ++e) { + const s = t[e].layer; + s.hasRenderer() && s.getRenderer().handleFontsChanged(); + } + } + render() { + this.renderer_ && this.animationDelayKey_ === void 0 && (this.animationDelayKey_ = requestAnimationFrame(this.animationDelay_)); + } + removeControl(t) { + return this.getControls().remove(t); + } + removeInteraction(t) { + return this.getInteractions().remove(t); + } + removeLayer(t) { + return this.getLayerGroup().getLayers().remove(t); + } + handleLayerRemove_(t) { + kd(t.layer); + } + removeOverlay(t) { + return this.getOverlays().remove(t); + } + renderFrame_(t) { + const e = this.getSize(), i = this.getView(), s = this.frameState_; + let r = null; + if (e !== void 0 && oc(e) && i && i.isDef()) { + const o = i.getHints( + this.frameState_ ? this.frameState_.viewHints : void 0 + ), a = i.getState(); + if (r = { + animate: !1, + coordinateToPixelTransform: this.coordinateToPixelTransform_, + declutterTree: null, + extent: Ia( + a.center, + a.resolution, + a.rotation, + e + ), + index: this.frameIndex_++, + layerIndex: 0, + layerStatesArray: this.getLayerGroup().getLayerStatesArray(), + pixelRatio: this.pixelRatio_, + pixelToCoordinateTransform: this.pixelToCoordinateTransform_, + postRenderFunctions: [], + size: e, + tileQueue: this.tileQueue_, + time: t, + usedTiles: {}, + viewState: a, + viewHints: o, + wantedTiles: {}, + mapId: q(this), + renderTargets: {} + }, a.nextCenter && a.nextResolution) { + const l = isNaN(a.nextRotation) ? a.rotation : a.nextRotation; + r.nextExtent = Ia( + a.nextCenter, + a.nextResolution, + l, + e + ); + } + } + this.frameState_ = r, this.renderer_.renderFrame(r), r && (r.animate && this.render(), Array.prototype.push.apply( + this.postRenderFunctions_, + r.postRenderFunctions + ), s && (!this.previousExtent_ || !vl(this.previousExtent_) && !Fs(r.extent, this.previousExtent_)) && (this.dispatchEvent( + new Tn(vi.MOVESTART, this, s) + ), this.previousExtent_ = Qs(this.previousExtent_)), this.previousExtent_ && !r.viewHints[Wt.ANIMATING] && !r.viewHints[Wt.INTERACTING] && !Fs(r.extent, this.previousExtent_) && (this.dispatchEvent( + new Tn(vi.MOVEEND, this, r) + ), ju(r.extent, this.previousExtent_))), this.dispatchEvent(new Tn(vi.POSTRENDER, this, r)), this.renderComplete_ = this.hasListener(vi.LOADSTART) || this.hasListener(vi.LOADEND) || this.hasListener(Ri.RENDERCOMPLETE) ? !this.tileQueue_.getTilesLoading() && !this.tileQueue_.getCount() && !this.getLoadingOrNotReady() : void 0, this.postRenderTimeoutHandle_ || (this.postRenderTimeoutHandle_ = setTimeout(() => { + this.postRenderTimeoutHandle_ = void 0, this.handlePostRender(); + }, 0)); + } + setLayerGroup(t) { + const e = this.getLayerGroup(); + e && this.handleLayerRemove_(new Ci("removelayer", e)), this.set(Ot.LAYERGROUP, t); + } + setSize(t) { + this.set(Ot.SIZE, t); + } + setTarget(t) { + this.set(Ot.TARGET, t); + } + setView(t) { + if (!t || t instanceof si) { + this.set(Ot.VIEW, t); + return; + } + this.set(Ot.VIEW, new si()); + const e = this; + t.then(function(i) { + e.setView(new si(i)); + }); + } + updateSize() { + const t = this.getTargetElement(); + let e; + if (t) { + const i = getComputedStyle(t), s = t.offsetWidth - parseFloat(i.borderLeftWidth) - parseFloat(i.paddingLeft) - parseFloat(i.paddingRight) - parseFloat(i.borderRightWidth), r = t.offsetHeight - parseFloat(i.borderTopWidth) - parseFloat(i.paddingTop) - parseFloat(i.paddingBottom) - parseFloat(i.borderBottomWidth); + !isNaN(s) && !isNaN(r) && (e = [s, r], !oc(e) && !!(t.offsetWidth || t.offsetHeight || t.getClientRects().length) && console.warn( + "No map visible because the map container's width or height are 0." + )); + } + this.setSize(e), this.updateViewportSize_(); + } + updateViewportSize_() { + const t = this.getView(); + if (t) { + let e; + const i = getComputedStyle(this.viewport_); + i.width && i.height && (e = [ + parseInt(i.width, 10), + parseInt(i.height, 10) + ]), t.setViewportSize(e); + } + } +} +function Cm(n) { + let t = null; + n.keyboardEventTarget !== void 0 && (t = typeof n.keyboardEventTarget == "string" ? document.getElementById(n.keyboardEventTarget) : n.keyboardEventTarget); + const e = {}, i = n.layers && typeof n.layers.getLayers == "function" ? n.layers : new Oo({ + layers: n.layers + }); + e[Ot.LAYERGROUP] = i, e[Ot.TARGET] = n.target, e[Ot.VIEW] = n.view instanceof si ? n.view : new si(); + let s; + n.controls !== void 0 && (Array.isArray(n.controls) ? s = new Ee(n.controls.slice()) : (Y( + typeof n.controls.getArray == "function", + 47 + ), s = n.controls)); + let r; + n.interactions !== void 0 && (Array.isArray(n.interactions) ? r = new Ee(n.interactions.slice()) : (Y( + typeof n.interactions.getArray == "function", + 48 + ), r = n.interactions)); + let o; + return n.overlays !== void 0 ? Array.isArray(n.overlays) ? o = new Ee(n.overlays.slice()) : (Y( + typeof n.overlays.getArray == "function", + 49 + ), o = n.overlays) : o = new Ee(), { + controls: s, + interactions: r, + keyboardEventTarget: t, + overlays: o, + values: e + }; +} +const Mm = xm; +class Hl extends Oe { + constructor(t) { + if (super(), this.on, this.once, this.un, this.id_ = void 0, this.geometryName_ = "geometry", this.style_ = null, this.styleFunction_ = void 0, this.geometryChangeKey_ = null, this.addChangeListener(this.geometryName_, this.handleGeometryChanged_), t) + if (typeof t.getSimplifiedGeometry == "function") { + const e = t; + this.setGeometry(e); + } else { + const e = t; + this.setProperties(e); + } + } + clone() { + const t = new Hl(this.hasProperties() ? this.getProperties() : null); + t.setGeometryName(this.getGeometryName()); + const e = this.getGeometry(); + e && t.setGeometry(e.clone()); + const i = this.getStyle(); + return i && t.setStyle(i), t; + } + getGeometry() { + return this.get(this.geometryName_); + } + getId() { + return this.id_; + } + getGeometryName() { + return this.geometryName_; + } + getStyle() { + return this.style_; + } + getStyleFunction() { + return this.styleFunction_; + } + handleGeometryChange_() { + this.changed(); + } + handleGeometryChanged_() { + this.geometryChangeKey_ && (mt(this.geometryChangeKey_), this.geometryChangeKey_ = null); + const t = this.getGeometry(); + t && (this.geometryChangeKey_ = et( + t, + U.CHANGE, + this.handleGeometryChange_, + this + )), this.changed(); + } + setGeometry(t) { + this.set(this.geometryName_, t); + } + setStyle(t) { + this.style_ = t, this.styleFunction_ = t ? Em(t) : void 0, this.changed(); + } + setId(t) { + this.id_ = t, this.changed(); + } + setGeometryName(t) { + this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_), this.geometryName_ = t, this.addChangeListener(this.geometryName_, this.handleGeometryChanged_), this.handleGeometryChanged_(); + } +} +function Em(n) { + if (typeof n == "function") + return n; + { + let t; + return Array.isArray(n) ? t = n : (Y(typeof n.getZIndex == "function", 41), t = [n]), function() { + return t; + }; + } +} +const Ie = Hl, xt = { + ACCURACY: "accuracy", + ACCURACY_GEOMETRY: "accuracyGeometry", + ALTITUDE: "altitude", + ALTITUDE_ACCURACY: "altitudeAccuracy", + HEADING: "heading", + POSITION: "position", + PROJECTION: "projection", + SPEED: "speed", + TRACKING: "tracking", + TRACKING_OPTIONS: "trackingOptions" +}; +class wm extends Re { + constructor(t) { + super(U.ERROR), this.code = t.code, this.message = t.message; + } +} +class Sm extends Oe { + constructor(t) { + super(), this.on, this.once, this.un, t = t || {}, this.position_ = null, this.transform_ = bl, this.watchId_ = void 0, this.addChangeListener(xt.PROJECTION, this.handleProjectionChanged_), this.addChangeListener(xt.TRACKING, this.handleTrackingChanged_), t.projection !== void 0 && this.setProjection(t.projection), t.trackingOptions !== void 0 && this.setTrackingOptions(t.trackingOptions), this.setTracking(t.tracking !== void 0 ? t.tracking : !1); + } + disposeInternal() { + this.setTracking(!1), super.disposeInternal(); + } + handleProjectionChanged_() { + const t = this.getProjection(); + t && (this.transform_ = Fo( + Q("EPSG:4326"), + t + ), this.position_ && this.set(xt.POSITION, this.transform_(this.position_))); + } + handleTrackingChanged_() { + if ("geolocation" in navigator) { + const t = this.getTracking(); + t && this.watchId_ === void 0 ? this.watchId_ = navigator.geolocation.watchPosition( + this.positionChange_.bind(this), + this.positionError_.bind(this), + this.getTrackingOptions() + ) : !t && this.watchId_ !== void 0 && (navigator.geolocation.clearWatch(this.watchId_), this.watchId_ = void 0); + } + } + positionChange_(t) { + const e = t.coords; + this.set(xt.ACCURACY, e.accuracy), this.set( + xt.ALTITUDE, + e.altitude === null ? void 0 : e.altitude + ), this.set( + xt.ALTITUDE_ACCURACY, + e.altitudeAccuracy === null ? void 0 : e.altitudeAccuracy + ), this.set( + xt.HEADING, + e.heading === null ? void 0 : ji(e.heading) + ), this.position_ ? (this.position_[0] = e.longitude, this.position_[1] = e.latitude) : this.position_ = [e.longitude, e.latitude]; + const i = this.transform_(this.position_); + this.set(xt.POSITION, i), this.set(xt.SPEED, e.speed === null ? void 0 : e.speed); + const s = S1(this.position_, e.accuracy); + s.applyTransform(this.transform_), this.set(xt.ACCURACY_GEOMETRY, s), this.changed(); + } + positionError_(t) { + this.dispatchEvent(new wm(t)); + } + getAccuracy() { + return this.get(xt.ACCURACY); + } + getAccuracyGeometry() { + return this.get(xt.ACCURACY_GEOMETRY) || null; + } + getAltitude() { + return this.get(xt.ALTITUDE); + } + getAltitudeAccuracy() { + return this.get(xt.ALTITUDE_ACCURACY); + } + getHeading() { + return this.get(xt.HEADING); + } + getPosition() { + return this.get(xt.POSITION); + } + getProjection() { + return this.get(xt.PROJECTION); + } + getSpeed() { + return this.get(xt.SPEED); + } + getTracking() { + return this.get(xt.TRACKING); + } + getTrackingOptions() { + return this.get(xt.TRACKING_OPTIONS); + } + setProjection(t) { + this.set(xt.PROJECTION, Q(t)); + } + setTracking(t) { + this.set(xt.TRACKING, t); + } + setTrackingOptions(t) { + this.set(xt.TRACKING_OPTIONS, t); + } +} +const Rm = Sm; +class Xl { + constructor(t) { + t = t || {}, this.color_ = t.color !== void 0 ? t.color : null; + } + clone() { + const t = this.getColor(); + return new Xl({ + color: Array.isArray(t) ? t.slice() : t || void 0 + }); + } + getColor() { + return this.color_; + } + setColor(t) { + this.color_ = t; + } +} +const Vt = Xl; +function $d(n, t, e, i, s, r, o) { + let a, l; + const h = (e - t) / i; + if (h === 1) + a = t; + else if (h === 2) + a = t, l = s; + else if (h !== 0) { + let c = n[t], u = n[t + 1], d = 0; + const f = [0]; + for (let _ = t + i; _ < e; _ += i) { + const y = n[_], p = n[_ + 1]; + d += Math.sqrt((y - c) * (y - c) + (p - u) * (p - u)), f.push(d), c = y, u = p; + } + const g = s * d, m = Lg(f, g); + m < 0 ? (l = (g - f[-m - 2]) / (f[-m - 1] - f[-m - 2]), a = t + (-m - 2) * i) : a = t + m * i; + } + o = o > 1 ? o : 2, r = r || new Array(o); + for (let c = 0; c < o; ++c) + r[c] = a === void 0 ? NaN : l === void 0 ? n[a + c] : ii(n[a + c], n[a + i + c], l); + return r; +} +function Ua(n, t, e, i, s, r) { + if (e == t) + return null; + let o; + if (s < n[t + i - 1]) + return r ? (o = n.slice(t, t + i), o[i - 1] = s, o) : null; + if (n[e - 1] < s) + return r ? (o = n.slice(e - i, e), o[i - 1] = s, o) : null; + if (s == n[t + i - 1]) + return n.slice(t, t + i); + let a = t / i, l = e / i; + for (; a < l; ) { + const d = a + l >> 1; + s < n[(d + 1) * i - 1] ? l = d : a = d + 1; + } + const h = n[a * i - 1]; + if (s == h) + return n.slice((a - 1) * i, (a - 1) * i + i); + const c = n[(a + 1) * i - 1], u = (s - h) / (c - h); + o = []; + for (let d = 0; d < i - 1; ++d) + o.push( + ii( + n[(a - 1) * i + d], + n[a * i + d], + u + ) + ); + return o.push(s), o; +} +function Tm(n, t, e, i, s, r, o) { + if (o) + return Ua( + n, + t, + e[e.length - 1], + i, + s, + r + ); + let a; + if (s < n[i - 1]) + return r ? (a = n.slice(0, i), a[i - 1] = s, a) : null; + if (n[n.length - 1] < s) + return r ? (a = n.slice(n.length - i), a[i - 1] = s, a) : null; + for (let l = 0, h = e.length; l < h; ++l) { + const c = e[l]; + if (t != c) { + if (s < n[t + i - 1]) + return null; + if (s <= n[c - 1]) + return Ua( + n, + t, + c, + i, + s, + !1 + ); + t = c; + } + } + return null; +} +function Bd(n, t, e, i) { + let s = n[t], r = n[t + 1], o = 0; + for (let a = t + i; a < e; a += i) { + const l = n[a], h = n[a + 1]; + o += Math.sqrt((l - s) * (l - s) + (h - r) * (h - r)), s = l, r = h; + } + return o; +} +class uo extends Di { + constructor(t, e) { + super(), this.flatMidpoint_ = null, this.flatMidpointRevision_ = -1, this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, e !== void 0 && !Array.isArray(t[0]) ? this.setFlatCoordinates( + e, + t + ) : this.setCoordinates( + t, + e + ); + } + appendCoordinate(t) { + this.flatCoordinates ? Qt(this.flatCoordinates, t) : this.flatCoordinates = t.slice(), this.changed(); + } + clone() { + const t = new uo( + this.flatCoordinates.slice(), + this.layout + ); + return t.applyProperties(this), t; + } + closestPointXY(t, e, i, s) { + return s < dn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( + Nl( + this.flatCoordinates, + 0, + this.flatCoordinates.length, + this.stride, + 0 + ) + ), this.maxDeltaRevision_ = this.getRevision()), kl( + this.flatCoordinates, + 0, + this.flatCoordinates.length, + this.stride, + this.maxDelta_, + !1, + t, + e, + i, + s + )); + } + forEachSegment(t) { + return Rd( + this.flatCoordinates, + 0, + this.flatCoordinates.length, + this.stride, + t + ); + } + getCoordinateAtM(t, e) { + return this.layout != "XYM" && this.layout != "XYZM" ? null : (e = e !== void 0 ? e : !1, Ua( + this.flatCoordinates, + 0, + this.flatCoordinates.length, + this.stride, + t, + e + )); + } + getCoordinates() { + return Ei( + this.flatCoordinates, + 0, + this.flatCoordinates.length, + this.stride + ); + } + getCoordinateAt(t, e) { + return $d( + this.flatCoordinates, + 0, + this.flatCoordinates.length, + this.stride, + t, + e, + this.stride + ); + } + getLength() { + return Bd( + this.flatCoordinates, + 0, + this.flatCoordinates.length, + this.stride + ); + } + getFlatMidpoint() { + return this.flatMidpointRevision_ != this.getRevision() && (this.flatMidpoint_ = this.getCoordinateAt(0.5, this.flatMidpoint_), this.flatMidpointRevision_ = this.getRevision()), this.flatMidpoint_; + } + getSimplifiedGeometryInternal(t) { + const e = []; + return e.length = Bl( + this.flatCoordinates, + 0, + this.flatCoordinates.length, + this.stride, + t, + e, + 0 + ), new uo(e, "XY"); + } + getType() { + return "LineString"; + } + intersectsExtent(t) { + return Do( + this.flatCoordinates, + 0, + this.flatCoordinates.length, + this.stride, + t + ); + } + setCoordinates(t, e) { + this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = No( + this.flatCoordinates, + 0, + t, + this.stride + ), this.changed(); + } +} +const li = uo; +class Yl { + constructor(t) { + t = t || {}, this.color_ = t.color !== void 0 ? t.color : null, this.lineCap_ = t.lineCap, this.lineDash_ = t.lineDash !== void 0 ? t.lineDash : null, this.lineDashOffset_ = t.lineDashOffset, this.lineJoin_ = t.lineJoin, this.miterLimit_ = t.miterLimit, this.width_ = t.width; + } + clone() { + const t = this.getColor(); + return new Yl({ + color: Array.isArray(t) ? t.slice() : t || void 0, + lineCap: this.getLineCap(), + lineDash: this.getLineDash() ? this.getLineDash().slice() : void 0, + lineDashOffset: this.getLineDashOffset(), + lineJoin: this.getLineJoin(), + miterLimit: this.getMiterLimit(), + width: this.getWidth() + }); + } + getColor() { + return this.color_; + } + getLineCap() { + return this.lineCap_; + } + getLineDash() { + return this.lineDash_; + } + getLineDashOffset() { + return this.lineDashOffset_; + } + getLineJoin() { + return this.lineJoin_; + } + getMiterLimit() { + return this.miterLimit_; + } + getWidth() { + return this.width_; + } + setColor(t) { + this.color_ = t; + } + setLineCap(t) { + this.lineCap_ = t; + } + setLineDash(t) { + this.lineDash_ = t; + } + setLineDashOffset(t) { + this.lineDashOffset_ = t; + } + setLineJoin(t) { + this.lineJoin_ = t; + } + setMiterLimit(t) { + this.miterLimit_ = t; + } + setWidth(t) { + this.width_ = t; + } +} +const Xt = Yl, Pt = { + IDLE: 0, + LOADING: 1, + LOADED: 2, + ERROR: 3, + EMPTY: 4 +}; +class jl { + constructor(t) { + this.opacity_ = t.opacity, this.rotateWithView_ = t.rotateWithView, this.rotation_ = t.rotation, this.scale_ = t.scale, this.scaleArray_ = fe(t.scale), this.displacement_ = t.displacement, this.declutterMode_ = t.declutterMode; + } + clone() { + const t = this.getScale(); + return new jl({ + opacity: this.getOpacity(), + scale: Array.isArray(t) ? t.slice() : t, + rotation: this.getRotation(), + rotateWithView: this.getRotateWithView(), + displacement: this.getDisplacement().slice(), + declutterMode: this.getDeclutterMode() + }); + } + getOpacity() { + return this.opacity_; + } + getRotateWithView() { + return this.rotateWithView_; + } + getRotation() { + return this.rotation_; + } + getScale() { + return this.scale_; + } + getScaleArray() { + return this.scaleArray_; + } + getDisplacement() { + return this.displacement_; + } + getDeclutterMode() { + return this.declutterMode_; + } + getAnchor() { + return H(); + } + getImage(t) { + return H(); + } + getHitDetectionImage() { + return H(); + } + getPixelRatio(t) { + return 1; + } + getImageState() { + return H(); + } + getImageSize() { + return H(); + } + getOrigin() { + return H(); + } + getSize() { + return H(); + } + setDisplacement(t) { + this.displacement_ = t; + } + setOpacity(t) { + this.opacity_ = t; + } + setRotateWithView(t) { + this.rotateWithView_ = t; + } + setRotation(t) { + this.rotation_ = t; + } + setScale(t) { + this.scale_ = t, this.scaleArray_ = fe(t); + } + listenImageChange(t) { + H(); + } + load() { + H(); + } + unlistenImageChange(t) { + H(); + } +} +const zd = jl; +function ke(n) { + return Array.isArray(n) ? ed(n) : n; +} +class ql extends zd { + constructor(t) { + const e = t.rotateWithView !== void 0 ? t.rotateWithView : !1; + super({ + opacity: 1, + rotateWithView: e, + rotation: t.rotation !== void 0 ? t.rotation : 0, + scale: t.scale !== void 0 ? t.scale : 1, + displacement: t.displacement !== void 0 ? t.displacement : [0, 0], + declutterMode: t.declutterMode + }), this.canvas_ = void 0, this.hitDetectionCanvas_ = null, this.fill_ = t.fill !== void 0 ? t.fill : null, this.origin_ = [0, 0], this.points_ = t.points, this.radius_ = t.radius !== void 0 ? t.radius : t.radius1, this.radius2_ = t.radius2, this.angle_ = t.angle !== void 0 ? t.angle : 0, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.size_ = null, this.renderOptions_ = null, this.render(); + } + clone() { + const t = this.getScale(), e = new ql({ + fill: this.getFill() ? this.getFill().clone() : void 0, + points: this.getPoints(), + radius: this.getRadius(), + radius2: this.getRadius2(), + angle: this.getAngle(), + stroke: this.getStroke() ? this.getStroke().clone() : void 0, + rotation: this.getRotation(), + rotateWithView: this.getRotateWithView(), + scale: Array.isArray(t) ? t.slice() : t, + displacement: this.getDisplacement().slice(), + declutterMode: this.getDeclutterMode() + }); + return e.setOpacity(this.getOpacity()), e; + } + getAnchor() { + const t = this.size_; + if (!t) + return null; + const e = this.getDisplacement(), i = this.getScaleArray(); + return [ + t[0] / 2 - e[0] / i[0], + t[1] / 2 + e[1] / i[1] + ]; + } + getAngle() { + return this.angle_; + } + getFill() { + return this.fill_; + } + setFill(t) { + this.fill_ = t, this.render(); + } + getHitDetectionImage() { + return this.hitDetectionCanvas_ || this.createHitDetectionCanvas_(this.renderOptions_), this.hitDetectionCanvas_; + } + getImage(t) { + let e = this.canvas_[t]; + if (!e) { + const i = this.renderOptions_, s = pe( + i.size * t, + i.size * t + ); + this.draw_(i, s, t), e = s.canvas, this.canvas_[t] = e; + } + return e; + } + getPixelRatio(t) { + return t; + } + getImageSize() { + return this.size_; + } + getImageState() { + return Pt.LOADED; + } + getOrigin() { + return this.origin_; + } + getPoints() { + return this.points_; + } + getRadius() { + return this.radius_; + } + getRadius2() { + return this.radius2_; + } + getSize() { + return this.size_; + } + getStroke() { + return this.stroke_; + } + setStroke(t) { + this.stroke_ = t, this.render(); + } + listenImageChange(t) { + } + load() { + } + unlistenImageChange(t) { + } + calculateLineJoinSize_(t, e, i) { + if (e === 0 || this.points_ === 1 / 0 || t !== "bevel" && t !== "miter") + return e; + let s = this.radius_, r = this.radius2_ === void 0 ? s : this.radius2_; + if (s < r) { + const E = s; + s = r, r = E; + } + const o = this.radius2_ === void 0 ? this.points_ : this.points_ * 2, a = 2 * Math.PI / o, l = r * Math.sin(a), h = Math.sqrt(r * r - l * l), c = s - h, u = Math.sqrt(l * l + c * c), d = u / l; + if (t === "miter" && d <= i) + return d * e; + const f = e / 2 / d, g = e / 2 * (c / u), _ = Math.sqrt((s + f) * (s + f) + g * g) - s; + if (this.radius2_ === void 0 || t === "bevel") + return _ * 2; + const y = s * Math.sin(a), p = Math.sqrt(s * s - y * y), v = r - p, C = Math.sqrt(y * y + v * v) / y; + if (C <= i) { + const E = C * e / 2 - r - s; + return 2 * Math.max(_, E); + } + return _ * 2; + } + createRenderOptions() { + let t = Xn, e = 0, i = null, s = 0, r, o = 0; + this.stroke_ && (r = this.stroke_.getColor(), r === null && (r = Gs), r = ke(r), o = this.stroke_.getWidth(), o === void 0 && (o = Bs), i = this.stroke_.getLineDash(), s = this.stroke_.getLineDashOffset(), t = this.stroke_.getLineJoin(), t === void 0 && (t = Xn), e = this.stroke_.getMiterLimit(), e === void 0 && (e = ks)); + const a = this.calculateLineJoinSize_(t, o, e), l = Math.max(this.radius_, this.radius2_ || 0), h = Math.ceil(2 * l + a); + return { + strokeStyle: r, + strokeWidth: o, + size: h, + lineDash: i, + lineDashOffset: s, + lineJoin: t, + miterLimit: e + }; + } + render() { + this.renderOptions_ = this.createRenderOptions(); + const t = this.renderOptions_.size; + this.canvas_ = {}, this.size_ = [t, t]; + } + draw_(t, e, i) { + if (e.scale(i, i), e.translate(t.size / 2, t.size / 2), this.createPath_(e), this.fill_) { + let s = this.fill_.getColor(); + s === null && (s = ai), e.fillStyle = ke(s), e.fill(); + } + this.stroke_ && (e.strokeStyle = t.strokeStyle, e.lineWidth = t.strokeWidth, t.lineDash && (e.setLineDash(t.lineDash), e.lineDashOffset = t.lineDashOffset), e.lineJoin = t.lineJoin, e.miterLimit = t.miterLimit, e.stroke()); + } + createHitDetectionCanvas_(t) { + if (this.fill_) { + let e = this.fill_.getColor(), i = 0; + if (typeof e == "string" && (e = Qr(e)), e === null ? i = 1 : Array.isArray(e) && (i = e.length === 4 ? e[3] : 1), i === 0) { + const s = pe( + t.size, + t.size + ); + this.hitDetectionCanvas_ = s.canvas, this.drawHitDetectionCanvas_(t, s); + } + } + this.hitDetectionCanvas_ || (this.hitDetectionCanvas_ = this.getImage(1)); + } + createPath_(t) { + let e = this.points_; + const i = this.radius_; + if (e === 1 / 0) + t.arc(0, 0, i, 0, 2 * Math.PI); + else { + const s = this.radius2_ === void 0 ? i : this.radius2_; + this.radius2_ !== void 0 && (e *= 2); + const r = this.angle_ - Math.PI / 2, o = 2 * Math.PI / e; + for (let a = 0; a < e; a++) { + const l = r + a * o, h = a % 2 === 0 ? i : s; + t.lineTo(h * Math.cos(l), h * Math.sin(l)); + } + t.closePath(); + } + } + drawHitDetectionCanvas_(t, e) { + e.translate(t.size / 2, t.size / 2), this.createPath_(e), e.fillStyle = ai, e.fill(), this.stroke_ && (e.strokeStyle = t.strokeStyle, e.lineWidth = t.strokeWidth, t.lineDash && (e.setLineDash(t.lineDash), e.lineDashOffset = t.lineDashOffset), e.lineJoin = t.lineJoin, e.miterLimit = t.miterLimit, e.stroke()); + } +} +const Zd = ql; +class Kl extends Zd { + constructor(t) { + t = t || { radius: 5 }, super({ + points: 1 / 0, + fill: t.fill, + radius: t.radius, + stroke: t.stroke, + scale: t.scale !== void 0 ? t.scale : 1, + rotation: t.rotation !== void 0 ? t.rotation : 0, + rotateWithView: t.rotateWithView !== void 0 ? t.rotateWithView : !1, + displacement: t.displacement !== void 0 ? t.displacement : [0, 0], + declutterMode: t.declutterMode + }); + } + clone() { + const t = this.getScale(), e = new Kl({ + fill: this.getFill() ? this.getFill().clone() : void 0, + stroke: this.getStroke() ? this.getStroke().clone() : void 0, + radius: this.getRadius(), + scale: Array.isArray(t) ? t.slice() : t, + rotation: this.getRotation(), + rotateWithView: this.getRotateWithView(), + displacement: this.getDisplacement().slice(), + declutterMode: this.getDeclutterMode() + }); + return e.setOpacity(this.getOpacity()), e; + } + setRadius(t) { + this.radius_ = t, this.render(); + } +} +const we = Kl; +class wi { + constructor(t) { + t = t || {}, this.geometry_ = null, this.geometryFunction_ = ac, t.geometry !== void 0 && this.setGeometry(t.geometry), this.fill_ = t.fill !== void 0 ? t.fill : null, this.image_ = t.image !== void 0 ? t.image : null, this.renderer_ = t.renderer !== void 0 ? t.renderer : null, this.hitDetectionRenderer_ = t.hitDetectionRenderer !== void 0 ? t.hitDetectionRenderer : null, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.text_ = t.text !== void 0 ? t.text : null, this.zIndex_ = t.zIndex; + } + clone() { + let t = this.getGeometry(); + return t && typeof t == "object" && (t = t.clone()), new wi({ + geometry: t, + fill: this.getFill() ? this.getFill().clone() : void 0, + image: this.getImage() ? this.getImage().clone() : void 0, + renderer: this.getRenderer(), + stroke: this.getStroke() ? this.getStroke().clone() : void 0, + text: this.getText() ? this.getText().clone() : void 0, + zIndex: this.getZIndex() + }); + } + getRenderer() { + return this.renderer_; + } + setRenderer(t) { + this.renderer_ = t; + } + setHitDetectionRenderer(t) { + this.hitDetectionRenderer_ = t; + } + getHitDetectionRenderer() { + return this.hitDetectionRenderer_; + } + getGeometry() { + return this.geometry_; + } + getGeometryFunction() { + return this.geometryFunction_; + } + getFill() { + return this.fill_; + } + setFill(t) { + this.fill_ = t; + } + getImage() { + return this.image_; + } + setImage(t) { + this.image_ = t; + } + getStroke() { + return this.stroke_; + } + setStroke(t) { + this.stroke_ = t; + } + getText() { + return this.text_; + } + setText(t) { + this.text_ = t; + } + getZIndex() { + return this.zIndex_; + } + setGeometry(t) { + typeof t == "function" ? this.geometryFunction_ = t : typeof t == "string" ? this.geometryFunction_ = function(e) { + return e.get(t); + } : t ? t !== void 0 && (this.geometryFunction_ = function() { + return t; + }) : this.geometryFunction_ = ac, this.geometry_ = t; + } + setZIndex(t) { + this.zIndex_ = t; + } +} +function bm(n) { + let t; + if (typeof n == "function") + t = n; + else { + let e; + Array.isArray(n) ? e = n : (Y(typeof n.getZIndex == "function", 41), e = [n]), t = function() { + return e; + }; + } + return t; +} +let ha = null; +function Lm(n, t) { + if (!ha) { + const e = new Vt({ + color: "rgba(255,255,255,0.4)" + }), i = new Xt({ + color: "#3399CC", + width: 1.25 + }); + ha = [ + new wi({ + image: new we({ + fill: e, + stroke: i, + radius: 5 + }), + fill: e, + stroke: i + }) + ]; + } + return ha; +} +function Vd() { + const n = {}, t = [255, 255, 255, 1], e = [0, 153, 255, 1], i = 3; + return n.Polygon = [ + new wi({ + fill: new Vt({ + color: [255, 255, 255, 0.5] + }) + }) + ], n.MultiPolygon = n.Polygon, n.LineString = [ + new wi({ + stroke: new Xt({ + color: t, + width: i + 2 + }) + }), + new wi({ + stroke: new Xt({ + color: e, + width: i + }) + }) + ], n.MultiLineString = n.LineString, n.Circle = n.Polygon.concat(n.LineString), n.Point = [ + new wi({ + image: new we({ + radius: i * 2, + fill: new Vt({ + color: e + }), + stroke: new Xt({ + color: t, + width: i / 2 + }) + }), + zIndex: 1 / 0 + }) + ], n.MultiPoint = n.Point, n.GeometryCollection = n.Polygon.concat( + n.LineString, + n.Point + ), n; +} +function ac(n) { + return n.getGeometry(); +} +const Zt = wi, Im = "#333"; +class Jl { + constructor(t) { + t = t || {}, this.font_ = t.font, this.rotation_ = t.rotation, this.rotateWithView_ = t.rotateWithView, this.scale_ = t.scale, this.scaleArray_ = fe(t.scale !== void 0 ? t.scale : 1), this.text_ = t.text, this.textAlign_ = t.textAlign, this.justify_ = t.justify, this.textBaseline_ = t.textBaseline, this.fill_ = t.fill !== void 0 ? t.fill : new Vt({ color: Im }), this.maxAngle_ = t.maxAngle !== void 0 ? t.maxAngle : Math.PI / 4, this.placement_ = t.placement !== void 0 ? t.placement : "point", this.overflow_ = !!t.overflow, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.offsetX_ = t.offsetX !== void 0 ? t.offsetX : 0, this.offsetY_ = t.offsetY !== void 0 ? t.offsetY : 0, this.backgroundFill_ = t.backgroundFill ? t.backgroundFill : null, this.backgroundStroke_ = t.backgroundStroke ? t.backgroundStroke : null, this.padding_ = t.padding === void 0 ? null : t.padding; + } + clone() { + const t = this.getScale(); + return new Jl({ + font: this.getFont(), + placement: this.getPlacement(), + maxAngle: this.getMaxAngle(), + overflow: this.getOverflow(), + rotation: this.getRotation(), + rotateWithView: this.getRotateWithView(), + scale: Array.isArray(t) ? t.slice() : t, + text: this.getText(), + textAlign: this.getTextAlign(), + justify: this.getJustify(), + textBaseline: this.getTextBaseline(), + fill: this.getFill() ? this.getFill().clone() : void 0, + stroke: this.getStroke() ? this.getStroke().clone() : void 0, + offsetX: this.getOffsetX(), + offsetY: this.getOffsetY(), + backgroundFill: this.getBackgroundFill() ? this.getBackgroundFill().clone() : void 0, + backgroundStroke: this.getBackgroundStroke() ? this.getBackgroundStroke().clone() : void 0, + padding: this.getPadding() || void 0 + }); + } + getOverflow() { + return this.overflow_; + } + getFont() { + return this.font_; + } + getMaxAngle() { + return this.maxAngle_; + } + getPlacement() { + return this.placement_; + } + getOffsetX() { + return this.offsetX_; + } + getOffsetY() { + return this.offsetY_; + } + getFill() { + return this.fill_; + } + getRotateWithView() { + return this.rotateWithView_; + } + getRotation() { + return this.rotation_; + } + getScale() { + return this.scale_; + } + getScaleArray() { + return this.scaleArray_; + } + getStroke() { + return this.stroke_; + } + getText() { + return this.text_; + } + getTextAlign() { + return this.textAlign_; + } + getJustify() { + return this.justify_; + } + getTextBaseline() { + return this.textBaseline_; + } + getBackgroundFill() { + return this.backgroundFill_; + } + getBackgroundStroke() { + return this.backgroundStroke_; + } + getPadding() { + return this.padding_; + } + setOverflow(t) { + this.overflow_ = t; + } + setFont(t) { + this.font_ = t; + } + setMaxAngle(t) { + this.maxAngle_ = t; + } + setOffsetX(t) { + this.offsetX_ = t; + } + setOffsetY(t) { + this.offsetY_ = t; + } + setPlacement(t) { + this.placement_ = t; + } + setRotateWithView(t) { + this.rotateWithView_ = t; + } + setFill(t) { + this.fill_ = t; + } + setRotation(t) { + this.rotation_ = t; + } + setScale(t) { + this.scale_ = t, this.scaleArray_ = fe(t !== void 0 ? t : 1); + } + setStroke(t) { + this.stroke_ = t; + } + setText(t) { + this.text_ = t; + } + setTextAlign(t) { + this.textAlign_ = t; + } + setJustify(t) { + this.justify_ = t; + } + setTextBaseline(t) { + this.textBaseline_ = t; + } + setBackgroundFill(t) { + this.backgroundFill_ = t; + } + setBackgroundStroke(t) { + this.backgroundStroke_ = t; + } + setPadding(t) { + this.padding_ = t; + } +} +const Wa = Jl; +function Pm(n, t, e, i, s) { + Ud(n, t, e || 0, i || n.length - 1, s || Am); +} +function Ud(n, t, e, i, s) { + for (; i > e; ) { + if (i - e > 600) { + var r = i - e + 1, o = t - e + 1, a = Math.log(r), l = 0.5 * Math.exp(2 * a / 3), h = 0.5 * Math.sqrt(a * l * (r - l) / r) * (o - r / 2 < 0 ? -1 : 1), c = Math.max(e, Math.floor(t - o * l / r + h)), u = Math.min(i, Math.floor(t + (r - o) * l / r + h)); + Ud(n, t, c, u, s); + } + var d = n[t], f = e, g = i; + for (gs(n, e, t), s(n[i], d) > 0 && gs(n, e, i); f < g; ) { + for (gs(n, f, g), f++, g--; s(n[f], d) < 0; ) + f++; + for (; s(n[g], d) > 0; ) + g--; + } + s(n[e], d) === 0 ? gs(n, e, g) : (g++, gs(n, g, i)), g <= t && (e = g + 1), t <= g && (i = g - 1); + } +} +function gs(n, t, e) { + var i = n[t]; + n[t] = n[e], n[e] = i; +} +function Am(n, t) { + return n < t ? -1 : n > t ? 1 : 0; +} +class Wd { + constructor(t = 9) { + this._maxEntries = Math.max(4, t), this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4)), this.clear(); + } + all() { + return this._all(this.data, []); + } + search(t) { + let e = this.data; + const i = []; + if (!Pr(t, e)) + return i; + const s = this.toBBox, r = []; + for (; e; ) { + for (let o = 0; o < e.children.length; o++) { + const a = e.children[o], l = e.leaf ? s(a) : a; + Pr(t, l) && (e.leaf ? i.push(a) : ua(t, l) ? this._all(a, i) : r.push(a)); + } + e = r.pop(); + } + return i; + } + collides(t) { + let e = this.data; + if (!Pr(t, e)) + return !1; + const i = []; + for (; e; ) { + for (let s = 0; s < e.children.length; s++) { + const r = e.children[s], o = e.leaf ? this.toBBox(r) : r; + if (Pr(t, o)) { + if (e.leaf || ua(t, o)) + return !0; + i.push(r); + } + } + e = i.pop(); + } + return !1; + } + load(t) { + if (!(t && t.length)) + return this; + if (t.length < this._minEntries) { + for (let i = 0; i < t.length; i++) + this.insert(t[i]); + return this; + } + let e = this._build(t.slice(), 0, t.length - 1, 0); + if (!this.data.children.length) + this.data = e; + else if (this.data.height === e.height) + this._splitRoot(this.data, e); + else { + if (this.data.height < e.height) { + const i = this.data; + this.data = e, e = i; + } + this._insert(e, this.data.height - e.height - 1, !0); + } + return this; + } + insert(t) { + return t && this._insert(t, this.data.height - 1), this; + } + clear() { + return this.data = bn([]), this; + } + remove(t, e) { + if (!t) + return this; + let i = this.data; + const s = this.toBBox(t), r = [], o = []; + let a, l, h; + for (; i || r.length; ) { + if (i || (i = r.pop(), l = r[r.length - 1], a = o.pop(), h = !0), i.leaf) { + const c = Om(t, i.children, e); + if (c !== -1) + return i.children.splice(c, 1), r.push(i), this._condense(r), this; + } + !h && !i.leaf && ua(i, s) ? (r.push(i), o.push(a), a = 0, l = i, i = i.children[0]) : l ? (a++, i = l.children[a], h = !1) : i = null; + } + return this; + } + toBBox(t) { + return t; + } + compareMinX(t, e) { + return t.minX - e.minX; + } + compareMinY(t, e) { + return t.minY - e.minY; + } + toJSON() { + return this.data; + } + fromJSON(t) { + return this.data = t, this; + } + _all(t, e) { + const i = []; + for (; t; ) + t.leaf ? e.push(...t.children) : i.push(...t.children), t = i.pop(); + return e; + } + _build(t, e, i, s) { + const r = i - e + 1; + let o = this._maxEntries, a; + if (r <= o) + return a = bn(t.slice(e, i + 1)), Mn(a, this.toBBox), a; + s || (s = Math.ceil(Math.log(r) / Math.log(o)), o = Math.ceil(r / Math.pow(o, s - 1))), a = bn([]), a.leaf = !1, a.height = s; + const l = Math.ceil(r / o), h = l * Math.ceil(Math.sqrt(o)); + lc(t, e, i, h, this.compareMinX); + for (let c = e; c <= i; c += h) { + const u = Math.min(c + h - 1, i); + lc(t, c, u, l, this.compareMinY); + for (let d = c; d <= u; d += l) { + const f = Math.min(d + l - 1, u); + a.children.push(this._build(t, d, f, s - 1)); + } + } + return Mn(a, this.toBBox), a; + } + _chooseSubtree(t, e, i, s) { + for (; s.push(e), !(e.leaf || s.length - 1 === i); ) { + let r = 1 / 0, o = 1 / 0, a; + for (let l = 0; l < e.children.length; l++) { + const h = e.children[l], c = ca(h), u = Dm(t, h) - c; + u < o ? (o = u, r = c < r ? c : r, a = h) : u === o && c < r && (r = c, a = h); + } + e = a || e.children[0]; + } + return e; + } + _insert(t, e, i) { + const s = i ? t : this.toBBox(t), r = [], o = this._chooseSubtree(s, this.data, e, r); + for (o.children.push(t), xs(o, s); e >= 0 && r[e].children.length > this._maxEntries; ) + this._split(r, e), e--; + this._adjustParentBBoxes(s, r, e); + } + _split(t, e) { + const i = t[e], s = i.children.length, r = this._minEntries; + this._chooseSplitAxis(i, r, s); + const o = this._chooseSplitIndex(i, r, s), a = bn(i.children.splice(o, i.children.length - o)); + a.height = i.height, a.leaf = i.leaf, Mn(i, this.toBBox), Mn(a, this.toBBox), e ? t[e - 1].children.push(a) : this._splitRoot(i, a); + } + _splitRoot(t, e) { + this.data = bn([t, e]), this.data.height = t.height + 1, this.data.leaf = !1, Mn(this.data, this.toBBox); + } + _chooseSplitIndex(t, e, i) { + let s, r = 1 / 0, o = 1 / 0; + for (let a = e; a <= i - e; a++) { + const l = vs(t, 0, a, this.toBBox), h = vs(t, a, i, this.toBBox), c = km(l, h), u = ca(l) + ca(h); + c < r ? (r = c, s = a, o = u < o ? u : o) : c === r && u < o && (o = u, s = a); + } + return s || i - e; + } + _chooseSplitAxis(t, e, i) { + const s = t.leaf ? this.compareMinX : Fm, r = t.leaf ? this.compareMinY : Nm, o = this._allDistMargin(t, e, i, s), a = this._allDistMargin(t, e, i, r); + o < a && t.children.sort(s); + } + _allDistMargin(t, e, i, s) { + t.children.sort(s); + const r = this.toBBox, o = vs(t, 0, e, r), a = vs(t, i - e, i, r); + let l = Ir(o) + Ir(a); + for (let h = e; h < i - e; h++) { + const c = t.children[h]; + xs(o, t.leaf ? r(c) : c), l += Ir(o); + } + for (let h = i - e - 1; h >= e; h--) { + const c = t.children[h]; + xs(a, t.leaf ? r(c) : c), l += Ir(a); + } + return l; + } + _adjustParentBBoxes(t, e, i) { + for (let s = i; s >= 0; s--) + xs(e[s], t); + } + _condense(t) { + for (let e = t.length - 1, i; e >= 0; e--) + t[e].children.length === 0 ? e > 0 ? (i = t[e - 1].children, i.splice(i.indexOf(t[e]), 1)) : this.clear() : Mn(t[e], this.toBBox); + } +} +function Om(n, t, e) { + if (!e) + return t.indexOf(n); + for (let i = 0; i < t.length; i++) + if (e(n, t[i])) + return i; + return -1; +} +function Mn(n, t) { + vs(n, 0, n.children.length, t, n); +} +function vs(n, t, e, i, s) { + s || (s = bn(null)), s.minX = 1 / 0, s.minY = 1 / 0, s.maxX = -1 / 0, s.maxY = -1 / 0; + for (let r = t; r < e; r++) { + const o = n.children[r]; + xs(s, n.leaf ? i(o) : o); + } + return s; +} +function xs(n, t) { + return n.minX = Math.min(n.minX, t.minX), n.minY = Math.min(n.minY, t.minY), n.maxX = Math.max(n.maxX, t.maxX), n.maxY = Math.max(n.maxY, t.maxY), n; +} +function Fm(n, t) { + return n.minX - t.minX; +} +function Nm(n, t) { + return n.minY - t.minY; +} +function ca(n) { + return (n.maxX - n.minX) * (n.maxY - n.minY); +} +function Ir(n) { + return n.maxX - n.minX + (n.maxY - n.minY); +} +function Dm(n, t) { + return (Math.max(t.maxX, n.maxX) - Math.min(t.minX, n.minX)) * (Math.max(t.maxY, n.maxY) - Math.min(t.minY, n.minY)); +} +function km(n, t) { + const e = Math.max(n.minX, t.minX), i = Math.max(n.minY, t.minY), s = Math.min(n.maxX, t.maxX), r = Math.min(n.maxY, t.maxY); + return Math.max(0, s - e) * Math.max(0, r - i); +} +function ua(n, t) { + return n.minX <= t.minX && n.minY <= t.minY && t.maxX <= n.maxX && t.maxY <= n.maxY; +} +function Pr(n, t) { + return t.minX <= n.maxX && t.minY <= n.maxY && t.maxX >= n.minX && t.maxY >= n.minY; +} +function bn(n) { + return { + children: n, + height: 1, + leaf: !0, + minX: 1 / 0, + minY: 1 / 0, + maxX: -1 / 0, + maxY: -1 / 0 + }; +} +function lc(n, t, e, i, s) { + const r = [t, e]; + for (; r.length; ) { + if (e = r.pop(), t = r.pop(), e - t <= i) + continue; + const o = t + Math.ceil((e - t) / i / 2) * i; + Pm(n, o, t, e, s), r.push(t, o, o, e); + } +} +function Hd(n, t, e) { + const i = n; + let s = !0, r = !1, o = !1; + const a = [ + Jr(i, U.LOAD, function() { + o = !0, r || t(); + }) + ]; + return i.src && Ug ? (r = !0, i.decode().then(function() { + s && t(); + }).catch(function(l) { + s && (o ? t() : e()); + })) : a.push(Jr(i, U.ERROR, e)), function() { + s = !1, a.forEach(mt); + }; +} +let ms = null; +class Gm extends So { + constructor(t, e, i, s, r, o) { + super(), this.hitDetectionImage_ = null, this.image_ = t, this.crossOrigin_ = s, this.canvas_ = {}, this.color_ = o, this.unlisten_ = null, this.imageState_ = r, this.size_ = i, this.src_ = e, this.tainted_; + } + initializeImage_() { + this.image_ = new Image(), this.crossOrigin_ !== null && (this.image_.crossOrigin = this.crossOrigin_); + } + isTainted_() { + if (this.tainted_ === void 0 && this.imageState_ === Pt.LOADED) { + ms || (ms = pe(1, 1)), ms.drawImage(this.image_, 0, 0); + try { + ms.getImageData(0, 0, 1, 1), this.tainted_ = !1; + } catch { + ms = null, this.tainted_ = !0; + } + } + return this.tainted_ === !0; + } + dispatchChangeEvent_() { + this.dispatchEvent(U.CHANGE); + } + handleImageError_() { + this.imageState_ = Pt.ERROR, this.unlistenImage_(), this.dispatchChangeEvent_(); + } + handleImageLoad_() { + this.imageState_ = Pt.LOADED, this.size_ ? (this.image_.width = this.size_[0], this.image_.height = this.size_[1]) : this.size_ = [this.image_.width, this.image_.height], this.unlistenImage_(), this.dispatchChangeEvent_(); + } + getImage(t) { + return this.image_ || this.initializeImage_(), this.replaceColor_(t), this.canvas_[t] ? this.canvas_[t] : this.image_; + } + getPixelRatio(t) { + return this.replaceColor_(t), this.canvas_[t] ? t : 1; + } + getImageState() { + return this.imageState_; + } + getHitDetectionImage() { + if (this.image_ || this.initializeImage_(), !this.hitDetectionImage_) + if (this.isTainted_()) { + const t = this.size_[0], e = this.size_[1], i = pe(t, e); + i.fillRect(0, 0, t, e), this.hitDetectionImage_ = i.canvas; + } else + this.hitDetectionImage_ = this.image_; + return this.hitDetectionImage_; + } + getSize() { + return this.size_; + } + getSrc() { + return this.src_; + } + load() { + if (this.imageState_ === Pt.IDLE) { + this.image_ || this.initializeImage_(), this.imageState_ = Pt.LOADING; + try { + this.image_.src = this.src_; + } catch { + this.handleImageError_(); + } + this.unlisten_ = Hd( + this.image_, + this.handleImageLoad_.bind(this), + this.handleImageError_.bind(this) + ); + } + } + replaceColor_(t) { + if (!this.color_ || this.canvas_[t] || this.imageState_ !== Pt.LOADED) + return; + const e = this.image_, i = document.createElement("canvas"); + i.width = Math.ceil(e.width * t), i.height = Math.ceil(e.height * t); + const s = i.getContext("2d"); + s.scale(t, t), s.drawImage(e, 0, 0), s.globalCompositeOperation = "multiply", s.fillStyle = td(this.color_), s.fillRect(0, 0, i.width / t, i.height / t), s.globalCompositeOperation = "destination-in", s.drawImage(e, 0, 0), this.canvas_[t] = i; + } + unlistenImage_() { + this.unlisten_ && (this.unlisten_(), this.unlisten_ = null); + } +} +function $m(n, t, e, i, s, r) { + let o = to.get(t, i, r); + return o || (o = new Gm(n, t, e, i, s, r), to.set(t, i, r, o)), o; +} +class Ql extends zd { + constructor(t) { + t = t || {}; + const e = t.opacity !== void 0 ? t.opacity : 1, i = t.rotation !== void 0 ? t.rotation : 0, s = t.scale !== void 0 ? t.scale : 1, r = t.rotateWithView !== void 0 ? t.rotateWithView : !1; + super({ + opacity: e, + rotation: i, + scale: s, + displacement: t.displacement !== void 0 ? t.displacement : [0, 0], + rotateWithView: r, + declutterMode: t.declutterMode + }), this.anchor_ = t.anchor !== void 0 ? t.anchor : [0.5, 0.5], this.normalizedAnchor_ = null, this.anchorOrigin_ = t.anchorOrigin !== void 0 ? t.anchorOrigin : "top-left", this.anchorXUnits_ = t.anchorXUnits !== void 0 ? t.anchorXUnits : "fraction", this.anchorYUnits_ = t.anchorYUnits !== void 0 ? t.anchorYUnits : "fraction", this.crossOrigin_ = t.crossOrigin !== void 0 ? t.crossOrigin : null; + const o = t.img !== void 0 ? t.img : null; + this.imgSize_ = t.imgSize; + let a = t.src; + Y(!(a !== void 0 && o), 4), Y(!o || o && this.imgSize_, 5), (a === void 0 || a.length === 0) && o && (a = o.src || q(o)), Y(a !== void 0 && a.length > 0, 6); + const l = t.src !== void 0 ? Pt.IDLE : Pt.LOADED; + this.color_ = t.color !== void 0 ? Qr(t.color) : null, this.iconImage_ = $m( + o, + a, + this.imgSize_ !== void 0 ? this.imgSize_ : null, + this.crossOrigin_, + l, + this.color_ + ), this.offset_ = t.offset !== void 0 ? t.offset : [0, 0], this.offsetOrigin_ = t.offsetOrigin !== void 0 ? t.offsetOrigin : "top-left", this.origin_ = null, this.size_ = t.size !== void 0 ? t.size : null; + } + clone() { + const t = this.getScale(); + return new Ql({ + anchor: this.anchor_.slice(), + anchorOrigin: this.anchorOrigin_, + anchorXUnits: this.anchorXUnits_, + anchorYUnits: this.anchorYUnits_, + color: this.color_ && this.color_.slice ? this.color_.slice() : this.color_ || void 0, + crossOrigin: this.crossOrigin_, + imgSize: this.imgSize_, + offset: this.offset_.slice(), + offsetOrigin: this.offsetOrigin_, + opacity: this.getOpacity(), + rotateWithView: this.getRotateWithView(), + rotation: this.getRotation(), + scale: Array.isArray(t) ? t.slice() : t, + size: this.size_ !== null ? this.size_.slice() : void 0, + src: this.getSrc(), + displacement: this.getDisplacement().slice(), + declutterMode: this.getDeclutterMode() + }); + } + getAnchor() { + let t = this.normalizedAnchor_; + if (!t) { + t = this.anchor_; + const s = this.getSize(); + if (this.anchorXUnits_ == "fraction" || this.anchorYUnits_ == "fraction") { + if (!s) + return null; + t = this.anchor_.slice(), this.anchorXUnits_ == "fraction" && (t[0] *= s[0]), this.anchorYUnits_ == "fraction" && (t[1] *= s[1]); + } + if (this.anchorOrigin_ != "top-left") { + if (!s) + return null; + t === this.anchor_ && (t = this.anchor_.slice()), (this.anchorOrigin_ == "top-right" || this.anchorOrigin_ == "bottom-right") && (t[0] = -t[0] + s[0]), (this.anchorOrigin_ == "bottom-left" || this.anchorOrigin_ == "bottom-right") && (t[1] = -t[1] + s[1]); + } + this.normalizedAnchor_ = t; + } + const e = this.getDisplacement(), i = this.getScaleArray(); + return [ + t[0] - e[0] / i[0], + t[1] + e[1] / i[1] + ]; + } + setAnchor(t) { + this.anchor_ = t, this.normalizedAnchor_ = null; + } + getColor() { + return this.color_; + } + getImage(t) { + return this.iconImage_.getImage(t); + } + getPixelRatio(t) { + return this.iconImage_.getPixelRatio(t); + } + getImageSize() { + return this.iconImage_.getSize(); + } + getImageState() { + return this.iconImage_.getImageState(); + } + getHitDetectionImage() { + return this.iconImage_.getHitDetectionImage(); + } + getOrigin() { + if (this.origin_) + return this.origin_; + let t = this.offset_; + if (this.offsetOrigin_ != "top-left") { + const e = this.getSize(), i = this.iconImage_.getSize(); + if (!e || !i) + return null; + t = t.slice(), (this.offsetOrigin_ == "top-right" || this.offsetOrigin_ == "bottom-right") && (t[0] = i[0] - e[0] - t[0]), (this.offsetOrigin_ == "bottom-left" || this.offsetOrigin_ == "bottom-right") && (t[1] = i[1] - e[1] - t[1]); + } + return this.origin_ = t, this.origin_; + } + getSrc() { + return this.iconImage_.getSrc(); + } + getSize() { + return this.size_ ? this.size_ : this.iconImage_.getSize(); + } + listenImageChange(t) { + this.iconImage_.addEventListener(U.CHANGE, t); + } + load() { + this.iconImage_.load(); + } + unlistenImageChange(t) { + this.iconImage_.removeEventListener(U.CHANGE, t); + } +} +const Ts = Ql; +function hc(n) { + return new Zt({ + fill: Vs(n, ""), + stroke: Us(n, ""), + text: Bm(n), + image: zm(n) + }); +} +function Vs(n, t) { + const e = n[t + "fill-color"]; + if (!!e) + return new Vt({ color: e }); +} +function Us(n, t) { + const e = n[t + "stroke-width"], i = n[t + "stroke-color"]; + if (!(!e && !i)) + return new Xt({ + width: e, + color: i, + lineCap: n[t + "stroke-line-cap"], + lineJoin: n[t + "stroke-line-join"], + lineDash: n[t + "stroke-line-dash"], + lineDashOffset: n[t + "stroke-line-dash-offset"], + miterLimit: n[t + "stroke-miter-limit"] + }); +} +function Bm(n) { + const t = n["text-value"]; + return t ? new Wa({ + text: t, + font: n["text-font"], + maxAngle: n["text-max-angle"], + offsetX: n["text-offset-x"], + offsetY: n["text-offset-y"], + overflow: n["text-overflow"], + placement: n["text-placement"], + scale: n["text-scale"], + rotateWithView: n["text-rotate-with-view"], + rotation: n["text-rotation"], + textAlign: n["text-align"], + justify: n["text-justify"], + textBaseline: n["text-baseline"], + padding: n["text-padding"], + fill: Vs(n, "text-"), + backgroundFill: Vs(n, "text-background-"), + stroke: Us(n, "text-"), + backgroundStroke: Us(n, "text-background-") + }) : void 0; +} +function zm(n) { + const t = n["icon-src"], e = n["icon-img"]; + if (t || e) + return new Ts({ + src: t, + img: e, + imgSize: n["icon-img-size"], + anchor: n["icon-anchor"], + anchorOrigin: n["icon-anchor-origin"], + anchorXUnits: n["icon-anchor-x-units"], + anchorYUnits: n["icon-anchor-y-units"], + color: n["icon-color"], + crossOrigin: n["icon-cross-origin"], + offset: n["icon-offset"], + displacement: n["icon-displacement"], + opacity: n["icon-opacity"], + scale: n["icon-scale"], + rotation: n["icon-rotation"], + rotateWithView: n["icon-rotate-with-view"], + size: n["icon-size"], + declutterMode: n["icon-declutter-mode"] + }); + const i = n["shape-points"]; + if (i) { + const r = "shape-"; + return new Zd({ + points: i, + fill: Vs(n, r), + stroke: Us(n, r), + radius: n["shape-radius"], + radius1: n["shape-radius1"], + radius2: n["shape-radius2"], + angle: n["shape-angle"], + displacement: n["shape-displacement"], + rotation: n["shape-rotation"], + rotateWithView: n["shape-rotate-with-view"], + scale: n["shape-scale"], + declutterMode: n["shape-declutter-mode"] + }); + } + const s = n["circle-radius"]; + if (s) { + const r = "circle-"; + return new we({ + radius: s, + fill: Vs(n, r), + stroke: Us(n, r), + displacement: n["circle-displacement"], + scale: n["circle-scale"], + rotation: n["circle-rotation"], + rotateWithView: n["circle-rotate-with-view"], + declutterMode: n["circle-declutter-mode"] + }); + } +} +const cc = { + RENDER_ORDER: "renderOrder" +}; +class Zm extends Po { + constructor(t) { + t = t || {}; + const e = Object.assign({}, t); + delete e.style, delete e.renderBuffer, delete e.updateWhileAnimating, delete e.updateWhileInteracting, super(e), this.declutter_ = t.declutter !== void 0 ? t.declutter : !1, this.renderBuffer_ = t.renderBuffer !== void 0 ? t.renderBuffer : 100, this.style_ = null, this.styleFunction_ = void 0, this.setStyle(t.style), this.updateWhileAnimating_ = t.updateWhileAnimating !== void 0 ? t.updateWhileAnimating : !1, this.updateWhileInteracting_ = t.updateWhileInteracting !== void 0 ? t.updateWhileInteracting : !1; + } + getDeclutter() { + return this.declutter_; + } + getFeatures(t) { + return super.getFeatures(t); + } + getRenderBuffer() { + return this.renderBuffer_; + } + getRenderOrder() { + return this.get(cc.RENDER_ORDER); + } + getStyle() { + return this.style_; + } + getStyleFunction() { + return this.styleFunction_; + } + getUpdateWhileAnimating() { + return this.updateWhileAnimating_; + } + getUpdateWhileInteracting() { + return this.updateWhileInteracting_; + } + renderDeclutter(t) { + t.declutterTree || (t.declutterTree = new Wd(9)), this.getRenderer().renderDeclutter(t); + } + setRenderOrder(t) { + this.set(cc.RENDER_ORDER, t); + } + setStyle(t) { + let e; + if (t === void 0) + e = Lm; + else if (t === null) + e = null; + else if (typeof t == "function") + e = t; + else if (t instanceof Zt) + e = t; + else if (Array.isArray(t)) { + const i = t.length, s = new Array(i); + for (let r = 0; r < i; ++r) { + const o = t[r]; + o instanceof Zt ? s[r] = o : s[r] = hc(o); + } + e = s; + } else + e = hc(t); + this.style_ = e, this.styleFunction_ = t === null ? void 0 : bm(this.style_), this.changed(); + } +} +const Vm = Zm, ir = { + BEGIN_GEOMETRY: 0, + BEGIN_PATH: 1, + CIRCLE: 2, + CLOSE_PATH: 3, + CUSTOM: 4, + DRAW_CHARS: 5, + DRAW_IMAGE: 6, + END_GEOMETRY: 7, + FILL: 8, + MOVE_TO_LINE_TO: 9, + SET_FILL_STYLE: 10, + SET_STROKE_STYLE: 11, + STROKE: 12 +}, Ar = [ir.FILL], Si = [ir.STROKE], Hi = [ir.BEGIN_PATH], uc = [ir.CLOSE_PATH], W = ir; +class Um { + drawCustom(t, e, i, s) { + } + drawGeometry(t) { + } + setStyle(t) { + } + drawCircle(t, e) { + } + drawFeature(t, e) { + } + drawGeometryCollection(t, e) { + } + drawLineString(t, e) { + } + drawMultiLineString(t, e) { + } + drawMultiPoint(t, e) { + } + drawMultiPolygon(t, e) { + } + drawPoint(t, e) { + } + drawPolygon(t, e) { + } + drawText(t, e) { + } + setFillStrokeStyle(t, e) { + } + setImageStyle(t, e) { + } + setTextStyle(t, e) { + } +} +const Xd = Um; +class Wm extends Xd { + constructor(t, e, i, s) { + super(), this.tolerance = t, this.maxExtent = e, this.pixelRatio = s, this.maxLineWidth = 0, this.resolution = i, this.beginGeometryInstruction1_ = null, this.beginGeometryInstruction2_ = null, this.bufferedMaxExtent_ = null, this.instructions = [], this.coordinates = [], this.tmpCoordinate_ = [], this.hitDetectionInstructions = [], this.state = {}; + } + applyPixelRatio(t) { + const e = this.pixelRatio; + return e == 1 ? t : t.map(function(i) { + return i * e; + }); + } + appendFlatPointCoordinates(t, e) { + const i = this.getBufferedMaxExtent(), s = this.tmpCoordinate_, r = this.coordinates; + let o = r.length; + for (let a = 0, l = t.length; a < l; a += e) + s[0] = t[a], s[1] = t[a + 1], To(i, s) && (r[o++] = s[0], r[o++] = s[1]); + return o; + } + appendFlatLineCoordinates(t, e, i, s, r, o) { + const a = this.coordinates; + let l = a.length; + const h = this.getBufferedMaxExtent(); + o && (e += s); + let c = t[e], u = t[e + 1]; + const d = this.tmpCoordinate_; + let f = !0, g, m, _; + for (g = e + s; g < i; g += s) + d[0] = t[g], d[1] = t[g + 1], _ = ba(h, d), _ !== m ? (f && (a[l++] = c, a[l++] = u, f = !1), a[l++] = d[0], a[l++] = d[1]) : _ === Ft.INTERSECTING ? (a[l++] = d[0], a[l++] = d[1], f = !1) : f = !0, c = d[0], u = d[1], m = _; + return (r && f || g === e + s) && (a[l++] = c, a[l++] = u), l; + } + drawCustomCoordinates_(t, e, i, s, r) { + for (let o = 0, a = i.length; o < a; ++o) { + const l = i[o], h = this.appendFlatLineCoordinates( + t, + e, + l, + s, + !1, + !1 + ); + r.push(h), e = l; + } + return e; + } + drawCustom(t, e, i, s) { + this.beginGeometry(t, e); + const r = t.getType(), o = t.getStride(), a = this.coordinates.length; + let l, h, c, u, d; + switch (r) { + case "MultiPolygon": + l = t.getOrientedFlatCoordinates(), u = []; + const f = t.getEndss(); + d = 0; + for (let g = 0, m = f.length; g < m; ++g) { + const _ = []; + d = this.drawCustomCoordinates_( + l, + d, + f[g], + o, + _ + ), u.push(_); + } + this.instructions.push([ + W.CUSTOM, + a, + u, + t, + i, + $a + ]), this.hitDetectionInstructions.push([ + W.CUSTOM, + a, + u, + t, + s || i, + $a + ]); + break; + case "Polygon": + case "MultiLineString": + c = [], l = r == "Polygon" ? t.getOrientedFlatCoordinates() : t.getFlatCoordinates(), d = this.drawCustomCoordinates_( + l, + 0, + t.getEnds(), + o, + c + ), this.instructions.push([ + W.CUSTOM, + a, + c, + t, + i, + Zs + ]), this.hitDetectionInstructions.push([ + W.CUSTOM, + a, + c, + t, + s || i, + Zs + ]); + break; + case "LineString": + case "Circle": + l = t.getFlatCoordinates(), h = this.appendFlatLineCoordinates( + l, + 0, + l.length, + o, + !1, + !1 + ), this.instructions.push([ + W.CUSTOM, + a, + h, + t, + i, + Ei + ]), this.hitDetectionInstructions.push([ + W.CUSTOM, + a, + h, + t, + s || i, + Ei + ]); + break; + case "MultiPoint": + l = t.getFlatCoordinates(), h = this.appendFlatPointCoordinates(l, o), h > a && (this.instructions.push([ + W.CUSTOM, + a, + h, + t, + i, + Ei + ]), this.hitDetectionInstructions.push([ + W.CUSTOM, + a, + h, + t, + s || i, + Ei + ])); + break; + case "Point": + l = t.getFlatCoordinates(), this.coordinates.push(l[0], l[1]), h = this.coordinates.length, this.instructions.push([ + W.CUSTOM, + a, + h, + t, + i + ]), this.hitDetectionInstructions.push([ + W.CUSTOM, + a, + h, + t, + s || i + ]); + break; + } + this.endGeometry(e); + } + beginGeometry(t, e) { + this.beginGeometryInstruction1_ = [ + W.BEGIN_GEOMETRY, + e, + 0, + t + ], this.instructions.push(this.beginGeometryInstruction1_), this.beginGeometryInstruction2_ = [ + W.BEGIN_GEOMETRY, + e, + 0, + t + ], this.hitDetectionInstructions.push(this.beginGeometryInstruction2_); + } + finish() { + return { + instructions: this.instructions, + hitDetectionInstructions: this.hitDetectionInstructions, + coordinates: this.coordinates + }; + } + reverseHitDetectionInstructions() { + const t = this.hitDetectionInstructions; + t.reverse(); + let e; + const i = t.length; + let s, r, o = -1; + for (e = 0; e < i; ++e) + s = t[e], r = s[0], r == W.END_GEOMETRY ? o = e : r == W.BEGIN_GEOMETRY && (s[2] = e, Ig(this.hitDetectionInstructions, o, e), o = -1); + } + setFillStrokeStyle(t, e) { + const i = this.state; + if (t) { + const s = t.getColor(); + i.fillStyle = ke( + s || ai + ); + } else + i.fillStyle = void 0; + if (e) { + const s = e.getColor(); + i.strokeStyle = ke( + s || Gs + ); + const r = e.getLineCap(); + i.lineCap = r !== void 0 ? r : no; + const o = e.getLineDash(); + i.lineDash = o ? o.slice() : Ns; + const a = e.getLineDashOffset(); + i.lineDashOffset = a || Ds; + const l = e.getLineJoin(); + i.lineJoin = l !== void 0 ? l : Xn; + const h = e.getWidth(); + i.lineWidth = h !== void 0 ? h : Bs; + const c = e.getMiterLimit(); + i.miterLimit = c !== void 0 ? c : ks, i.lineWidth > this.maxLineWidth && (this.maxLineWidth = i.lineWidth, this.bufferedMaxExtent_ = null); + } else + i.strokeStyle = void 0, i.lineCap = void 0, i.lineDash = null, i.lineDashOffset = void 0, i.lineJoin = void 0, i.lineWidth = void 0, i.miterLimit = void 0; + } + createFill(t) { + const e = t.fillStyle, i = [W.SET_FILL_STYLE, e]; + return typeof e != "string" && i.push(!0), i; + } + applyStroke(t) { + this.instructions.push(this.createStroke(t)); + } + createStroke(t) { + return [ + W.SET_STROKE_STYLE, + t.strokeStyle, + t.lineWidth * this.pixelRatio, + t.lineCap, + t.lineJoin, + t.miterLimit, + this.applyPixelRatio(t.lineDash), + t.lineDashOffset * this.pixelRatio + ]; + } + updateFillStyle(t, e) { + const i = t.fillStyle; + (typeof i != "string" || t.currentFillStyle != i) && (i !== void 0 && this.instructions.push(e.call(this, t)), t.currentFillStyle = i); + } + updateStrokeStyle(t, e) { + const i = t.strokeStyle, s = t.lineCap, r = t.lineDash, o = t.lineDashOffset, a = t.lineJoin, l = t.lineWidth, h = t.miterLimit; + (t.currentStrokeStyle != i || t.currentLineCap != s || r != t.currentLineDash && !Ni(t.currentLineDash, r) || t.currentLineDashOffset != o || t.currentLineJoin != a || t.currentLineWidth != l || t.currentMiterLimit != h) && (i !== void 0 && e.call(this, t), t.currentStrokeStyle = i, t.currentLineCap = s, t.currentLineDash = r, t.currentLineDashOffset = o, t.currentLineJoin = a, t.currentLineWidth = l, t.currentMiterLimit = h); + } + endGeometry(t) { + this.beginGeometryInstruction1_[2] = this.instructions.length, this.beginGeometryInstruction1_ = null, this.beginGeometryInstruction2_[2] = this.hitDetectionInstructions.length, this.beginGeometryInstruction2_ = null; + const e = [W.END_GEOMETRY, t]; + this.instructions.push(e), this.hitDetectionInstructions.push(e); + } + getBufferedMaxExtent() { + if (!this.bufferedMaxExtent_ && (this.bufferedMaxExtent_ = ju(this.maxExtent), this.maxLineWidth > 0)) { + const t = this.resolution * (this.maxLineWidth + 1) / 2; + Js(this.bufferedMaxExtent_, t, this.bufferedMaxExtent_); + } + return this.bufferedMaxExtent_; + } +} +const nr = Wm; +class Hm extends nr { + constructor(t, e, i, s) { + super(t, e, i, s), this.hitDetectionImage_ = null, this.image_ = null, this.imagePixelRatio_ = void 0, this.anchorX_ = void 0, this.anchorY_ = void 0, this.height_ = void 0, this.opacity_ = void 0, this.originX_ = void 0, this.originY_ = void 0, this.rotateWithView_ = void 0, this.rotation_ = void 0, this.scale_ = void 0, this.width_ = void 0, this.declutterMode_ = void 0, this.declutterImageWithText_ = void 0; + } + drawPoint(t, e) { + if (!this.image_) + return; + this.beginGeometry(t, e); + const i = t.getFlatCoordinates(), s = t.getStride(), r = this.coordinates.length, o = this.appendFlatPointCoordinates(i, s); + this.instructions.push([ + W.DRAW_IMAGE, + r, + o, + this.image_, + this.anchorX_ * this.imagePixelRatio_, + this.anchorY_ * this.imagePixelRatio_, + Math.ceil(this.height_ * this.imagePixelRatio_), + this.opacity_, + this.originX_ * this.imagePixelRatio_, + this.originY_ * this.imagePixelRatio_, + this.rotateWithView_, + this.rotation_, + [ + this.scale_[0] * this.pixelRatio / this.imagePixelRatio_, + this.scale_[1] * this.pixelRatio / this.imagePixelRatio_ + ], + Math.ceil(this.width_ * this.imagePixelRatio_), + this.declutterMode_, + this.declutterImageWithText_ + ]), this.hitDetectionInstructions.push([ + W.DRAW_IMAGE, + r, + o, + this.hitDetectionImage_, + this.anchorX_, + this.anchorY_, + this.height_, + this.opacity_, + this.originX_, + this.originY_, + this.rotateWithView_, + this.rotation_, + this.scale_, + this.width_, + this.declutterMode_, + this.declutterImageWithText_ + ]), this.endGeometry(e); + } + drawMultiPoint(t, e) { + if (!this.image_) + return; + this.beginGeometry(t, e); + const i = t.getFlatCoordinates(), s = t.getStride(), r = this.coordinates.length, o = this.appendFlatPointCoordinates(i, s); + this.instructions.push([ + W.DRAW_IMAGE, + r, + o, + this.image_, + this.anchorX_ * this.imagePixelRatio_, + this.anchorY_ * this.imagePixelRatio_, + Math.ceil(this.height_ * this.imagePixelRatio_), + this.opacity_, + this.originX_ * this.imagePixelRatio_, + this.originY_ * this.imagePixelRatio_, + this.rotateWithView_, + this.rotation_, + [ + this.scale_[0] * this.pixelRatio / this.imagePixelRatio_, + this.scale_[1] * this.pixelRatio / this.imagePixelRatio_ + ], + Math.ceil(this.width_ * this.imagePixelRatio_), + this.declutterMode_, + this.declutterImageWithText_ + ]), this.hitDetectionInstructions.push([ + W.DRAW_IMAGE, + r, + o, + this.hitDetectionImage_, + this.anchorX_, + this.anchorY_, + this.height_, + this.opacity_, + this.originX_, + this.originY_, + this.rotateWithView_, + this.rotation_, + this.scale_, + this.width_, + this.declutterMode_, + this.declutterImageWithText_ + ]), this.endGeometry(e); + } + finish() { + return this.reverseHitDetectionInstructions(), this.anchorX_ = void 0, this.anchorY_ = void 0, this.hitDetectionImage_ = null, this.image_ = null, this.imagePixelRatio_ = void 0, this.height_ = void 0, this.scale_ = void 0, this.opacity_ = void 0, this.originX_ = void 0, this.originY_ = void 0, this.rotateWithView_ = void 0, this.rotation_ = void 0, this.width_ = void 0, super.finish(); + } + setImageStyle(t, e) { + const i = t.getAnchor(), s = t.getSize(), r = t.getOrigin(); + this.imagePixelRatio_ = t.getPixelRatio(this.pixelRatio), this.anchorX_ = i[0], this.anchorY_ = i[1], this.hitDetectionImage_ = t.getHitDetectionImage(), this.image_ = t.getImage(this.pixelRatio), this.height_ = s[1], this.opacity_ = t.getOpacity(), this.originX_ = r[0], this.originY_ = r[1], this.rotateWithView_ = t.getRotateWithView(), this.rotation_ = t.getRotation(), this.scale_ = t.getScaleArray(), this.width_ = s[0], this.declutterMode_ = t.getDeclutterMode(), this.declutterImageWithText_ = e; + } +} +const Xm = Hm; +class Ym extends nr { + constructor(t, e, i, s) { + super(t, e, i, s); + } + drawFlatCoordinates_(t, e, i, s) { + const r = this.coordinates.length, o = this.appendFlatLineCoordinates( + t, + e, + i, + s, + !1, + !1 + ), a = [ + W.MOVE_TO_LINE_TO, + r, + o + ]; + return this.instructions.push(a), this.hitDetectionInstructions.push(a), i; + } + drawLineString(t, e) { + const i = this.state, s = i.strokeStyle, r = i.lineWidth; + if (s === void 0 || r === void 0) + return; + this.updateStrokeStyle(i, this.applyStroke), this.beginGeometry(t, e), this.hitDetectionInstructions.push( + [ + W.SET_STROKE_STYLE, + i.strokeStyle, + i.lineWidth, + i.lineCap, + i.lineJoin, + i.miterLimit, + Ns, + Ds + ], + Hi + ); + const o = t.getFlatCoordinates(), a = t.getStride(); + this.drawFlatCoordinates_( + o, + 0, + o.length, + a + ), this.hitDetectionInstructions.push(Si), this.endGeometry(e); + } + drawMultiLineString(t, e) { + const i = this.state, s = i.strokeStyle, r = i.lineWidth; + if (s === void 0 || r === void 0) + return; + this.updateStrokeStyle(i, this.applyStroke), this.beginGeometry(t, e), this.hitDetectionInstructions.push( + [ + W.SET_STROKE_STYLE, + i.strokeStyle, + i.lineWidth, + i.lineCap, + i.lineJoin, + i.miterLimit, + i.lineDash, + i.lineDashOffset + ], + Hi + ); + const o = t.getEnds(), a = t.getFlatCoordinates(), l = t.getStride(); + let h = 0; + for (let c = 0, u = o.length; c < u; ++c) + h = this.drawFlatCoordinates_( + a, + h, + o[c], + l + ); + this.hitDetectionInstructions.push(Si), this.endGeometry(e); + } + finish() { + const t = this.state; + return t.lastStroke != null && t.lastStroke != this.coordinates.length && this.instructions.push(Si), this.reverseHitDetectionInstructions(), this.state = null, super.finish(); + } + applyStroke(t) { + t.lastStroke != null && t.lastStroke != this.coordinates.length && (this.instructions.push(Si), t.lastStroke = this.coordinates.length), t.lastStroke = 0, super.applyStroke(t), this.instructions.push(Hi); + } +} +const jm = Ym; +class qm extends nr { + constructor(t, e, i, s) { + super(t, e, i, s); + } + drawFlatCoordinatess_(t, e, i, s) { + const r = this.state, o = r.fillStyle !== void 0, a = r.strokeStyle !== void 0, l = i.length; + this.instructions.push(Hi), this.hitDetectionInstructions.push(Hi); + for (let h = 0; h < l; ++h) { + const c = i[h], u = this.coordinates.length, d = this.appendFlatLineCoordinates( + t, + e, + c, + s, + !0, + !a + ), f = [ + W.MOVE_TO_LINE_TO, + u, + d + ]; + this.instructions.push(f), this.hitDetectionInstructions.push(f), a && (this.instructions.push(uc), this.hitDetectionInstructions.push(uc)), e = c; + } + return o && (this.instructions.push(Ar), this.hitDetectionInstructions.push(Ar)), a && (this.instructions.push(Si), this.hitDetectionInstructions.push(Si)), e; + } + drawCircle(t, e) { + const i = this.state, s = i.fillStyle, r = i.strokeStyle; + if (s === void 0 && r === void 0) + return; + this.setFillStrokeStyles_(), this.beginGeometry(t, e), i.fillStyle !== void 0 && this.hitDetectionInstructions.push([ + W.SET_FILL_STYLE, + ai + ]), i.strokeStyle !== void 0 && this.hitDetectionInstructions.push([ + W.SET_STROKE_STYLE, + i.strokeStyle, + i.lineWidth, + i.lineCap, + i.lineJoin, + i.miterLimit, + i.lineDash, + i.lineDashOffset + ]); + const o = t.getFlatCoordinates(), a = t.getStride(), l = this.coordinates.length; + this.appendFlatLineCoordinates( + o, + 0, + o.length, + a, + !1, + !1 + ); + const h = [W.CIRCLE, l]; + this.instructions.push(Hi, h), this.hitDetectionInstructions.push(Hi, h), i.fillStyle !== void 0 && (this.instructions.push(Ar), this.hitDetectionInstructions.push(Ar)), i.strokeStyle !== void 0 && (this.instructions.push(Si), this.hitDetectionInstructions.push(Si)), this.endGeometry(e); + } + drawPolygon(t, e) { + const i = this.state, s = i.fillStyle, r = i.strokeStyle; + if (s === void 0 && r === void 0) + return; + this.setFillStrokeStyles_(), this.beginGeometry(t, e), i.fillStyle !== void 0 && this.hitDetectionInstructions.push([ + W.SET_FILL_STYLE, + ai + ]), i.strokeStyle !== void 0 && this.hitDetectionInstructions.push([ + W.SET_STROKE_STYLE, + i.strokeStyle, + i.lineWidth, + i.lineCap, + i.lineJoin, + i.miterLimit, + i.lineDash, + i.lineDashOffset + ]); + const o = t.getEnds(), a = t.getOrientedFlatCoordinates(), l = t.getStride(); + this.drawFlatCoordinatess_( + a, + 0, + o, + l + ), this.endGeometry(e); + } + drawMultiPolygon(t, e) { + const i = this.state, s = i.fillStyle, r = i.strokeStyle; + if (s === void 0 && r === void 0) + return; + this.setFillStrokeStyles_(), this.beginGeometry(t, e), i.fillStyle !== void 0 && this.hitDetectionInstructions.push([ + W.SET_FILL_STYLE, + ai + ]), i.strokeStyle !== void 0 && this.hitDetectionInstructions.push([ + W.SET_STROKE_STYLE, + i.strokeStyle, + i.lineWidth, + i.lineCap, + i.lineJoin, + i.miterLimit, + i.lineDash, + i.lineDashOffset + ]); + const o = t.getEndss(), a = t.getOrientedFlatCoordinates(), l = t.getStride(); + let h = 0; + for (let c = 0, u = o.length; c < u; ++c) + h = this.drawFlatCoordinatess_( + a, + h, + o[c], + l + ); + this.endGeometry(e); + } + finish() { + this.reverseHitDetectionInstructions(), this.state = null; + const t = this.tolerance; + if (t !== 0) { + const e = this.coordinates; + for (let i = 0, s = e.length; i < s; ++i) + e[i] = Zi(e[i], t); + } + return super.finish(); + } + setFillStrokeStyles_() { + const t = this.state; + t.fillStyle !== void 0 && this.updateFillStyle(t, this.createFill), t.strokeStyle !== void 0 && this.updateStrokeStyle(t, this.applyStroke); + } +} +const dc = qm; +function Km(n, t, e, i, s) { + let r = e, o = e, a = 0, l = 0, h = e, c, u, d, f, g, m, _, y, p, v; + for (u = e; u < i; u += s) { + const x = t[u], C = t[u + 1]; + g !== void 0 && (p = x - g, v = C - m, f = Math.sqrt(p * p + v * v), _ !== void 0 && (l += d, c = Math.acos((_ * p + y * v) / (d * f)), c > n && (l > a && (a = l, r = h, o = u), l = 0, h = u - s)), d = f, _ = p, y = v), g = x, m = C; + } + return l += f, l > a ? [h, u] : [r, o]; +} +const bs = { + left: 0, + end: 0, + center: 0.5, + right: 1, + start: 1, + top: 0, + middle: 0.5, + hanging: 0.2, + alphabetic: 0.8, + ideographic: 0.8, + bottom: 1 +}; +class Jm extends nr { + constructor(t, e, i, s) { + super(t, e, i, s), this.labels_ = null, this.text_ = "", this.textOffsetX_ = 0, this.textOffsetY_ = 0, this.textRotateWithView_ = void 0, this.textRotation_ = 0, this.textFillState_ = null, this.fillStates = {}, this.textStrokeState_ = null, this.strokeStates = {}, this.textState_ = {}, this.textStates = {}, this.textKey_ = "", this.fillKey_ = "", this.strokeKey_ = "", this.declutterImageWithText_ = void 0; + } + finish() { + const t = super.finish(); + return t.textStates = this.textStates, t.fillStates = this.fillStates, t.strokeStates = this.strokeStates, t; + } + drawText(t, e) { + const i = this.textFillState_, s = this.textStrokeState_, r = this.textState_; + if (this.text_ === "" || !r || !i && !s) + return; + const o = this.coordinates; + let a = o.length; + const l = t.getType(); + let h = null, c = t.getStride(); + if (r.placement === "line" && (l == "LineString" || l == "MultiLineString" || l == "Polygon" || l == "MultiPolygon")) { + if (!Kt(this.getBufferedMaxExtent(), t.getExtent())) + return; + let u; + if (h = t.getFlatCoordinates(), l == "LineString") + u = [h.length]; + else if (l == "MultiLineString") + u = t.getEnds(); + else if (l == "Polygon") + u = t.getEnds().slice(0, 1); + else if (l == "MultiPolygon") { + const m = t.getEndss(); + u = []; + for (let _ = 0, y = m.length; _ < y; ++_) + u.push(m[_][0]); + } + this.beginGeometry(t, e); + const d = r.textAlign; + let f = 0, g; + for (let m = 0, _ = u.length; m < _; ++m) { + if (d == null) { + const p = Km( + r.maxAngle, + h, + f, + u[m], + c + ); + f = p[0], g = p[1]; + } else + g = u[m]; + for (let p = f; p < g; p += c) + o.push(h[p], h[p + 1]); + const y = o.length; + f = u[m], this.drawChars_(a, y), a = y; + } + this.endGeometry(e); + } else { + let u = r.overflow ? null : []; + switch (l) { + case "Point": + case "MultiPoint": + h = t.getFlatCoordinates(); + break; + case "LineString": + h = t.getFlatMidpoint(); + break; + case "Circle": + h = t.getCenter(); + break; + case "MultiLineString": + h = t.getFlatMidpoints(), c = 2; + break; + case "Polygon": + h = t.getFlatInteriorPoint(), r.overflow || u.push(h[2] / this.resolution), c = 3; + break; + case "MultiPolygon": + const _ = t.getFlatInteriorPoints(); + h = []; + for (let y = 0, p = _.length; y < p; y += 3) + r.overflow || u.push(_[y + 2] / this.resolution), h.push(_[y], _[y + 1]); + if (h.length === 0) + return; + c = 2; + break; + } + const d = this.appendFlatPointCoordinates(h, c); + if (d === a) + return; + if (u && (d - a) / 2 !== h.length / c) { + let _ = a / 2; + u = u.filter((y, p) => { + const v = o[(_ + p) * 2] === h[p * c] && o[(_ + p) * 2 + 1] === h[p * c + 1]; + return v || --_, v; + }); + } + this.saveTextStates_(), (r.backgroundFill || r.backgroundStroke) && (this.setFillStrokeStyle( + r.backgroundFill, + r.backgroundStroke + ), r.backgroundFill && (this.updateFillStyle(this.state, this.createFill), this.hitDetectionInstructions.push(this.createFill(this.state))), r.backgroundStroke && (this.updateStrokeStyle(this.state, this.applyStroke), this.hitDetectionInstructions.push(this.createStroke(this.state)))), this.beginGeometry(t, e); + let f = r.padding; + if (f != Ui && (r.scale[0] < 0 || r.scale[1] < 0)) { + let _ = r.padding[0], y = r.padding[1], p = r.padding[2], v = r.padding[3]; + r.scale[0] < 0 && (y = -y, v = -v), r.scale[1] < 0 && (_ = -_, p = -p), f = [_, y, p, v]; + } + const g = this.pixelRatio; + this.instructions.push([ + W.DRAW_IMAGE, + a, + d, + null, + NaN, + NaN, + NaN, + 1, + 0, + 0, + this.textRotateWithView_, + this.textRotation_, + [1, 1], + NaN, + void 0, + this.declutterImageWithText_, + f == Ui ? Ui : f.map(function(_) { + return _ * g; + }), + !!r.backgroundFill, + !!r.backgroundStroke, + this.text_, + this.textKey_, + this.strokeKey_, + this.fillKey_, + this.textOffsetX_, + this.textOffsetY_, + u + ]); + const m = 1 / g; + this.hitDetectionInstructions.push([ + W.DRAW_IMAGE, + a, + d, + null, + NaN, + NaN, + NaN, + 1, + 0, + 0, + this.textRotateWithView_, + this.textRotation_, + [m, m], + NaN, + void 0, + this.declutterImageWithText_, + f, + !!r.backgroundFill, + !!r.backgroundStroke, + this.text_, + this.textKey_, + this.strokeKey_, + this.fillKey_, + this.textOffsetX_, + this.textOffsetY_, + u + ]), this.endGeometry(e); + } + } + saveTextStates_() { + const t = this.textStrokeState_, e = this.textState_, i = this.textFillState_, s = this.strokeKey_; + t && (s in this.strokeStates || (this.strokeStates[s] = { + strokeStyle: t.strokeStyle, + lineCap: t.lineCap, + lineDashOffset: t.lineDashOffset, + lineWidth: t.lineWidth, + lineJoin: t.lineJoin, + miterLimit: t.miterLimit, + lineDash: t.lineDash + })); + const r = this.textKey_; + r in this.textStates || (this.textStates[r] = { + font: e.font, + textAlign: e.textAlign || $s, + justify: e.justify, + textBaseline: e.textBaseline || so, + scale: e.scale + }); + const o = this.fillKey_; + i && (o in this.fillStates || (this.fillStates[o] = { + fillStyle: i.fillStyle + })); + } + drawChars_(t, e) { + const i = this.textStrokeState_, s = this.textState_, r = this.strokeKey_, o = this.textKey_, a = this.fillKey_; + this.saveTextStates_(); + const l = this.pixelRatio, h = bs[s.textBaseline], c = this.textOffsetY_ * l, u = this.text_, d = i ? i.lineWidth * Math.abs(s.scale[0]) / 2 : 0; + this.instructions.push([ + W.DRAW_CHARS, + t, + e, + h, + s.overflow, + a, + s.maxAngle, + l, + c, + r, + d * l, + u, + o, + 1 + ]), this.hitDetectionInstructions.push([ + W.DRAW_CHARS, + t, + e, + h, + s.overflow, + a, + s.maxAngle, + 1, + c, + r, + d, + u, + o, + 1 / l + ]); + } + setTextStyle(t, e) { + let i, s, r; + if (!t) + this.text_ = ""; + else { + const o = t.getFill(); + o ? (s = this.textFillState_, s || (s = {}, this.textFillState_ = s), s.fillStyle = ke( + o.getColor() || ai + )) : (s = null, this.textFillState_ = s); + const a = t.getStroke(); + if (!a) + r = null, this.textStrokeState_ = r; + else { + r = this.textStrokeState_, r || (r = {}, this.textStrokeState_ = r); + const g = a.getLineDash(), m = a.getLineDashOffset(), _ = a.getWidth(), y = a.getMiterLimit(); + r.lineCap = a.getLineCap() || no, r.lineDash = g ? g.slice() : Ns, r.lineDashOffset = m === void 0 ? Ds : m, r.lineJoin = a.getLineJoin() || Xn, r.lineWidth = _ === void 0 ? Bs : _, r.miterLimit = y === void 0 ? ks : y, r.strokeStyle = ke( + a.getColor() || Gs + ); + } + i = this.textState_; + const l = t.getFont() || cd; + C0(l); + const h = t.getScaleArray(); + i.overflow = t.getOverflow(), i.font = l, i.maxAngle = t.getMaxAngle(), i.placement = t.getPlacement(), i.textAlign = t.getTextAlign(), i.justify = t.getJustify(), i.textBaseline = t.getTextBaseline() || so, i.backgroundFill = t.getBackgroundFill(), i.backgroundStroke = t.getBackgroundStroke(), i.padding = t.getPadding() || Ui, i.scale = h === void 0 ? [1, 1] : h; + const c = t.getOffsetX(), u = t.getOffsetY(), d = t.getRotateWithView(), f = t.getRotation(); + this.text_ = t.getText() || "", this.textOffsetX_ = c === void 0 ? 0 : c, this.textOffsetY_ = u === void 0 ? 0 : u, this.textRotateWithView_ = d === void 0 ? !1 : d, this.textRotation_ = f === void 0 ? 0 : f, this.strokeKey_ = r ? (typeof r.strokeStyle == "string" ? r.strokeStyle : q(r.strokeStyle)) + r.lineCap + r.lineDashOffset + "|" + r.lineWidth + r.lineJoin + r.miterLimit + "[" + r.lineDash.join() + "]" : "", this.textKey_ = i.font + i.scale + (i.textAlign || "?") + (i.justify || "?") + (i.textBaseline || "?"), this.fillKey_ = s ? typeof s.fillStyle == "string" ? s.fillStyle : "|" + q(s.fillStyle) : ""; + } + this.declutterImageWithText_ = e; + } +} +const Qm = { + Circle: dc, + Default: nr, + Image: Xm, + LineString: jm, + Polygon: dc, + Text: Jm +}; +class t_ { + constructor(t, e, i, s) { + this.tolerance_ = t, this.maxExtent_ = e, this.pixelRatio_ = s, this.resolution_ = i, this.buildersByZIndex_ = {}; + } + finish() { + const t = {}; + for (const e in this.buildersByZIndex_) { + t[e] = t[e] || {}; + const i = this.buildersByZIndex_[e]; + for (const s in i) { + const r = i[s].finish(); + t[e][s] = r; + } + } + return t; + } + getBuilder(t, e) { + const i = t !== void 0 ? t.toString() : "0"; + let s = this.buildersByZIndex_[i]; + s === void 0 && (s = {}, this.buildersByZIndex_[i] = s); + let r = s[e]; + if (r === void 0) { + const o = Qm[e]; + r = new o( + this.tolerance_, + this.maxExtent_, + this.resolution_, + this.pixelRatio_ + ), s[e] = r; + } + return r; + } +} +const fc = t_; +class e_ extends Uu { + constructor(t) { + super(), this.ready = !0, this.boundHandleImageChange_ = this.handleImageChange_.bind(this), this.layer_ = t, this.declutterExecutorGroup = null; + } + getFeatures(t) { + return H(); + } + getData(t) { + return null; + } + prepareFrame(t) { + return H(); + } + renderFrame(t, e) { + return H(); + } + loadedTileCallback(t, e, i) { + t[e] || (t[e] = {}), t[e][i.tileCoord.toString()] = i; + } + createLoadedTileFinder(t, e, i) { + return function(s, r) { + const o = this.loadedTileCallback.bind(this, i, s); + return t.forEachLoadedTile(e, s, r, o); + }.bind(this); + } + forEachFeatureAtCoordinate(t, e, i, s, r) { + } + getLayer() { + return this.layer_; + } + handleFontsChanged() { + } + handleImageChange_(t) { + t.target.getState() === Pt.LOADED && this.renderIfReadyAndVisible(); + } + loadImage(t) { + let e = t.getState(); + return e != Pt.LOADED && e != Pt.ERROR && t.addEventListener(U.CHANGE, this.boundHandleImageChange_), e == Pt.IDLE && (t.load(), e = t.getState()), e == Pt.LOADED; + } + renderIfReadyAndVisible() { + const t = this.getLayer(); + t && t.getVisible() && t.getSourceState() === "ready" && t.changed(); + } + disposeInternal() { + delete this.layer_, super.disposeInternal(); + } +} +const i_ = e_, gc = []; +let Ln = null; +function n_() { + const n = document.createElement("canvas"); + n.width = 1, n.height = 1, Ln = n.getContext("2d"); +} +class s_ extends i_ { + constructor(t) { + super(t), this.container = null, this.renderedResolution, this.tempTransform = $e(), this.pixelTransform = $e(), this.inversePixelTransform = $e(), this.context = null, this.containerReused = !1, this.pixelContext_ = null, this.frameState = null; + } + getImageData(t, e, i) { + Ln || n_(), Ln.clearRect(0, 0, 1, 1); + let s; + try { + Ln.drawImage(t, e, i, 1, 1, 0, 0, 1, 1), s = Ln.getImageData(0, 0, 1, 1).data; + } catch { + return Ln = null, null; + } + return s; + } + getBackground(t) { + let i = this.getLayer().getBackground(); + return typeof i == "function" && (i = i(t.viewState.resolution)), i || void 0; + } + useContainer(t, e, i) { + const s = this.getLayer().getClassName(); + let r, o; + if (t && t.className === s && (!i || t && t.style.backgroundColor && Ni( + Qr(t.style.backgroundColor), + Qr(i) + ))) { + const a = t.firstElementChild; + a instanceof HTMLCanvasElement && (o = a.getContext("2d")); + } + if (o && o.canvas.style.transform === e ? (this.container = t, this.context = o, this.containerReused = !0) : this.containerReused && (this.container = null, this.context = null, this.containerReused = !1), !this.container) { + r = document.createElement("div"), r.className = s; + let a = r.style; + a.position = "absolute", a.width = "100%", a.height = "100%", o = pe(); + const l = o.canvas; + r.appendChild(l), a = l.style, a.position = "absolute", a.left = "0", a.transformOrigin = "top left", this.container = r, this.context = o; + } + !this.containerReused && i && !this.container.style.backgroundColor && (this.container.style.backgroundColor = i); + } + clipUnrotated(t, e, i) { + const s = fn(i), r = Io(i), o = Lo(i), a = bo(i); + Nt(e.coordinateToPixelTransform, s), Nt(e.coordinateToPixelTransform, r), Nt(e.coordinateToPixelTransform, o), Nt(e.coordinateToPixelTransform, a); + const l = this.inversePixelTransform; + Nt(l, s), Nt(l, r), Nt(l, o), Nt(l, a), t.save(), t.beginPath(), t.moveTo(Math.round(s[0]), Math.round(s[1])), t.lineTo(Math.round(r[0]), Math.round(r[1])), t.lineTo(Math.round(o[0]), Math.round(o[1])), t.lineTo(Math.round(a[0]), Math.round(a[1])), t.clip(); + } + dispatchRenderEvent_(t, e, i) { + const s = this.getLayer(); + if (s.hasListener(t)) { + const r = new ad( + t, + this.inversePixelTransform, + i, + e + ); + s.dispatchEvent(r); + } + } + preRender(t, e) { + this.frameState = e, this.dispatchRenderEvent_(Ri.PRERENDER, t, e); + } + postRender(t, e) { + this.dispatchRenderEvent_(Ri.POSTRENDER, t, e); + } + getRenderTransform(t, e, i, s, r, o, a) { + const l = r / 2, h = o / 2, c = s / e, u = -c, d = -t[0] + a, f = -t[1]; + return Ii( + this.tempTransform, + l, + h, + c, + u, + -i, + d, + f + ); + } + disposeInternal() { + delete this.frameState, super.disposeInternal(); + } +} +const Yd = s_; +function r_(n, t, e, i, s, r, o, a, l, h, c, u) { + let d = n[t], f = n[t + 1], g = 0, m = 0, _ = 0, y = 0; + function p() { + g = d, m = f, t += i, d = n[t], f = n[t + 1], y += _, _ = Math.sqrt((d - g) * (d - g) + (f - m) * (f - m)); + } + do + p(); + while (t < e - i && y + _ < r); + let v = _ === 0 ? 0 : (r - y) / _; + const x = ii(g, d, v), C = ii(m, f, v), E = t - i, R = y, b = r + a * l(h, s, c); + for (; t < e - i && y + _ < b; ) + p(); + v = _ === 0 ? 0 : (b - y) / _; + const F = ii(g, d, v), G = ii(m, f, v); + let V; + if (u) { + const k = [x, C, F, G]; + Fl(k, 0, 4, 2, u, k, k), V = k[0] > k[2]; + } else + V = x > F; + const L = Math.PI, $ = [], gt = E + i === t; + t = E, _ = 0, y = R, d = n[t], f = n[t + 1]; + let N; + if (gt) { + p(), N = Math.atan2(f - m, d - g), V && (N += N > 0 ? -L : L); + const k = (F + x) / 2, P = (G + C) / 2; + return $[0] = [k, P, (b - r) / 2, N, s], $; + } + s = s.replace(/\n/g, " "); + for (let k = 0, P = s.length; k < P; ) { + p(); + let it = Math.atan2(f - m, d - g); + if (V && (it += it > 0 ? -L : L), N !== void 0) { + let ht = it - N; + if (ht += ht > L ? -2 * L : ht < -L ? 2 * L : 0, Math.abs(ht) > o) + return null; + } + N = it; + const wt = k; + let yt = 0; + for (; k < P; ++k) { + const ht = V ? P - k - 1 : k, _t = a * l(h, s[ht], c); + if (t + i < e && y + _ < r + yt + _t / 2) + break; + yt += _t; + } + if (k === wt) + continue; + const At = V ? s.substring(P - wt, P - k) : s.substring(wt, k); + v = _ === 0 ? 0 : (r + yt / 2 - y) / _; + const T = ii(g, d, v), ce = ii(m, f, v); + $.push([T, ce, yt / 2, it, At]), r += yt; + } + return $; +} +const En = se(), mi = [], Ke = [], Je = [], _i = []; +function mc(n) { + return n[3].declutterBox; +} +const o_ = new RegExp( + "[" + String.fromCharCode(1425) + "-" + String.fromCharCode(2303) + String.fromCharCode(64285) + "-" + String.fromCharCode(65023) + String.fromCharCode(65136) + "-" + String.fromCharCode(65276) + String.fromCharCode(67584) + "-" + String.fromCharCode(69631) + String.fromCharCode(124928) + "-" + String.fromCharCode(126975) + "]" +); +function _c(n, t) { + return (t === "start" || t === "end") && !o_.test(n) && (t = t === "start" ? "left" : "right"), bs[t]; +} +function a_(n, t, e) { + return e > 0 && n.push(` +`, ""), n.push(t, ""), n; +} +class l_ { + constructor(t, e, i, s) { + this.overlaps = i, this.pixelRatio = e, this.resolution = t, this.alignFill_, this.instructions = s.instructions, this.coordinates = s.coordinates, this.coordinateCache_ = {}, this.renderedTransform_ = $e(), this.hitDetectionInstructions = s.hitDetectionInstructions, this.pixelCoordinates_ = null, this.viewRotation_ = 0, this.fillStates = s.fillStates || {}, this.strokeStates = s.strokeStates || {}, this.textStates = s.textStates || {}, this.widths_ = {}, this.labels_ = {}; + } + createLabel(t, e, i, s) { + const r = t + e + i + s; + if (this.labels_[r]) + return this.labels_[r]; + const o = s ? this.strokeStates[s] : null, a = i ? this.fillStates[i] : null, l = this.textStates[e], h = this.pixelRatio, c = [ + l.scale[0] * h, + l.scale[1] * h + ], u = Array.isArray(t), d = l.justify ? bs[l.justify] : _c( + Array.isArray(t) ? t[0] : t, + l.textAlign || $s + ), f = s && o.lineWidth ? o.lineWidth : 0, g = u ? t : t.split(` +`).reduce(a_, []), { width: m, height: _, widths: y, heights: p, lineWidths: v } = E0( + l, + g + ), x = m + f, C = [], E = (x + 2) * c[0], R = (_ + f) * c[1], b = { + width: E < 0 ? Math.floor(E) : Math.ceil(E), + height: R < 0 ? Math.floor(R) : Math.ceil(R), + contextInstructions: C + }; + (c[0] != 1 || c[1] != 1) && C.push("scale", c), s && (C.push("strokeStyle", o.strokeStyle), C.push("lineWidth", f), C.push("lineCap", o.lineCap), C.push("lineJoin", o.lineJoin), C.push("miterLimit", o.miterLimit), C.push("setLineDash", [o.lineDash]), C.push("lineDashOffset", o.lineDashOffset)), i && C.push("fillStyle", a.fillStyle), C.push("textBaseline", "middle"), C.push("textAlign", "center"); + const F = 0.5 - d; + let G = d * x + F * f; + const V = [], L = []; + let $ = 0, gt = 0, N = 0, k = 0, P; + for (let it = 0, wt = g.length; it < wt; it += 2) { + const yt = g[it]; + if (yt === ` +`) { + gt += $, $ = 0, G = d * x + F * f, ++k; + continue; + } + const At = g[it + 1] || l.font; + At !== P && (s && V.push("font", At), i && L.push("font", At), P = At), $ = Math.max($, p[N]); + const T = [ + yt, + G + F * y[N] + d * (y[N] - v[k]), + 0.5 * (f + $) + gt + ]; + G += y[N], s && V.push("strokeText", T), i && L.push("fillText", T), ++N; + } + return Array.prototype.push.apply(C, V), Array.prototype.push.apply(C, L), this.labels_[r] = b, b; + } + replayTextBackground_(t, e, i, s, r, o, a) { + t.beginPath(), t.moveTo.apply(t, e), t.lineTo.apply(t, i), t.lineTo.apply(t, s), t.lineTo.apply(t, r), t.lineTo.apply(t, e), o && (this.alignFill_ = o[2], this.fill_(t)), a && (this.setStrokeStyle_( + t, + a + ), t.stroke()); + } + calculateImageOrLabelDimensions_(t, e, i, s, r, o, a, l, h, c, u, d, f, g, m, _) { + a *= d[0], l *= d[1]; + let y = i - a, p = s - l; + const v = r + h > t ? t - h : r, x = o + c > e ? e - c : o, C = g[3] + v * d[0] + g[1], E = g[0] + x * d[1] + g[2], R = y - g[3], b = p - g[0]; + (m || u !== 0) && (mi[0] = R, _i[0] = R, mi[1] = b, Ke[1] = b, Ke[0] = R + C, Je[0] = Ke[0], Je[1] = b + E, _i[1] = Je[1]); + let F; + return u !== 0 ? (F = Ii( + $e(), + i, + s, + 1, + 1, + u, + -i, + -s + ), Nt(F, mi), Nt(F, Ke), Nt(F, Je), Nt(F, _i), _e( + Math.min(mi[0], Ke[0], Je[0], _i[0]), + Math.min(mi[1], Ke[1], Je[1], _i[1]), + Math.max(mi[0], Ke[0], Je[0], _i[0]), + Math.max(mi[1], Ke[1], Je[1], _i[1]), + En + )) : _e( + Math.min(R, R + C), + Math.min(b, b + E), + Math.max(R, R + C), + Math.max(b, b + E), + En + ), f && (y = Math.round(y), p = Math.round(p)), { + drawImageX: y, + drawImageY: p, + drawImageW: v, + drawImageH: x, + originX: h, + originY: c, + declutterBox: { + minX: En[0], + minY: En[1], + maxX: En[2], + maxY: En[3], + value: _ + }, + canvasTransform: F, + scale: d + }; + } + replayImageOrLabel_(t, e, i, s, r, o, a) { + const l = !!(o || a), h = s.declutterBox, c = t.canvas, u = a ? a[2] * s.scale[0] / 2 : 0; + return h.minX - u <= c.width / e && h.maxX + u >= 0 && h.minY - u <= c.height / e && h.maxY + u >= 0 && (l && this.replayTextBackground_( + t, + mi, + Ke, + Je, + _i, + o, + a + ), w0( + t, + s.canvasTransform, + r, + i, + s.originX, + s.originY, + s.drawImageW, + s.drawImageH, + s.drawImageX, + s.drawImageY, + s.scale + )), !0; + } + fill_(t) { + if (this.alignFill_) { + const e = Nt(this.renderedTransform_, [0, 0]), i = 512 * this.pixelRatio; + t.save(), t.translate(e[0] % i, e[1] % i), t.rotate(this.viewRotation_); + } + t.fill(), this.alignFill_ && t.restore(); + } + setStrokeStyle_(t, e) { + t.strokeStyle = e[1], t.lineWidth = e[2], t.lineCap = e[3], t.lineJoin = e[4], t.miterLimit = e[5], t.lineDashOffset = e[7], t.setLineDash(e[6]); + } + drawLabelWithPointPlacement_(t, e, i, s) { + const r = this.textStates[e], o = this.createLabel(t, e, s, i), a = this.strokeStates[i], l = this.pixelRatio, h = _c( + Array.isArray(t) ? t[0] : t, + r.textAlign || $s + ), c = bs[r.textBaseline || so], u = a && a.lineWidth ? a.lineWidth : 0, d = o.width / l - 2 * r.scale[0], f = h * d + 2 * (0.5 - h) * u, g = c * o.height / l + 2 * (0.5 - c) * u; + return { + label: o, + anchorX: f, + anchorY: g + }; + } + execute_(t, e, i, s, r, o, a, l) { + let h; + this.pixelCoordinates_ && Ni(i, this.renderedTransform_) ? h = this.pixelCoordinates_ : (this.pixelCoordinates_ || (this.pixelCoordinates_ = []), h = Ki( + this.coordinates, + 0, + this.coordinates.length, + 2, + i, + this.pixelCoordinates_ + ), Hg(this.renderedTransform_, i)); + let c = 0; + const u = s.length; + let d = 0, f, g, m, _, y, p, v, x, C, E, R, b, F = 0, G = 0, V = null, L = null; + const $ = this.coordinateCache_, gt = this.viewRotation_, N = Math.round(Math.atan2(-i[1], i[0]) * 1e12) / 1e12, k = { + context: t, + pixelRatio: this.pixelRatio, + resolution: this.resolution, + rotation: gt + }, P = this.instructions != s || this.overlaps ? 0 : 200; + let it, wt, yt, At; + for (; c < u; ) { + const T = s[c]; + switch (T[0]) { + case W.BEGIN_GEOMETRY: + it = T[1], At = T[3], it.getGeometry() ? a !== void 0 && !Kt(a, At.getExtent()) ? c = T[2] + 1 : ++c : c = T[2]; + break; + case W.BEGIN_PATH: + F > P && (this.fill_(t), F = 0), G > P && (t.stroke(), G = 0), !F && !G && (t.beginPath(), _ = NaN, y = NaN), ++c; + break; + case W.CIRCLE: + d = T[1]; + const ht = h[d], _t = h[d + 1], ui = h[d + 2], Fe = h[d + 3], Bt = ui - ht, Xe = Fe - _t, mn = Math.sqrt(Bt * Bt + Xe * Xe); + t.moveTo(ht + mn, _t), t.arc(ht, _t, mn, 0, 2 * Math.PI, !0), ++c; + break; + case W.CLOSE_PATH: + t.closePath(), ++c; + break; + case W.CUSTOM: + d = T[1], f = T[2]; + const mr = T[3], _n = T[4], _r = T.length == 6 ? T[5] : void 0; + k.geometry = mr, k.feature = it, c in $ || ($[c] = []); + const di = $[c]; + _r ? _r(h, d, f, 2, di) : (di[0] = h[d], di[1] = h[d + 1], di.length = 2), _n(di, k), ++c; + break; + case W.DRAW_IMAGE: + d = T[1], f = T[2], x = T[3], g = T[4], m = T[5]; + let hs = T[6]; + const fi = T[7], pr = T[8], yr = T[9], vr = T[10]; + let pn = T[11]; + const Yo = T[12]; + let te = T[13]; + const ye = T[14], Te = T[15]; + if (!x && T.length >= 20) { + C = T[19], E = T[20], R = T[21], b = T[22]; + const ue = this.drawLabelWithPointPlacement_( + C, + E, + R, + b + ); + x = ue.label, T[3] = x; + const xn = T[23]; + g = (ue.anchorX - xn) * this.pixelRatio, T[4] = g; + const ve = T[24]; + m = (ue.anchorY - ve) * this.pixelRatio, T[5] = m, hs = x.height, T[6] = hs, te = x.width, T[13] = te; + } + let Ye; + T.length > 25 && (Ye = T[25]); + let yn, Gi, gi; + T.length > 17 ? (yn = T[16], Gi = T[17], gi = T[18]) : (yn = Ui, Gi = !1, gi = !1), vr && N ? pn += gt : !vr && !N && (pn -= gt); + let vn = 0; + for (; d < f; d += 2) { + if (Ye && Ye[vn++] < te / this.pixelRatio) + continue; + const ue = this.calculateImageOrLabelDimensions_( + x.width, + x.height, + h[d], + h[d + 1], + te, + hs, + g, + m, + pr, + yr, + pn, + Yo, + r, + yn, + Gi || gi, + it + ), xn = [ + t, + e, + x, + ue, + fi, + Gi ? V : null, + gi ? L : null + ]; + if (l) { + if (ye === "none") + continue; + if (ye === "obstacle") { + l.insert(ue.declutterBox); + continue; + } else { + let ve, je; + if (Te) { + const de = f - d; + if (!Te[de]) { + Te[de] = xn; + continue; + } + if (ve = Te[de], delete Te[de], je = mc(ve), l.collides(je)) + continue; + } + if (l.collides(ue.declutterBox)) + continue; + ve && (l.insert(je), this.replayImageOrLabel_.apply(this, ve)), l.insert(ue.declutterBox); + } + } + this.replayImageOrLabel_.apply(this, xn); + } + ++c; + break; + case W.DRAW_CHARS: + const xr = T[1], Yt = T[2], jo = T[3], mg = T[4]; + b = T[5]; + const _g = T[6], xh = T[7], Ch = T[8]; + R = T[9]; + const qo = T[10]; + C = T[11], E = T[12]; + const Mh = [ + T[13], + T[13] + ], Ko = this.textStates[E], cs = Ko.font, us = [ + Ko.scale[0] * xh, + Ko.scale[1] * xh + ]; + let ds; + cs in this.widths_ ? ds = this.widths_[cs] : (ds = {}, this.widths_[cs] = ds); + const Eh = Bd(h, xr, Yt, 2), wh = Math.abs(us[0]) * Hh(cs, C, ds); + if (mg || wh <= Eh) { + const ue = this.textStates[E].textAlign, xn = (Eh - wh) * bs[ue], ve = r_( + h, + xr, + Yt, + 2, + C, + xn, + _g, + Math.abs(us[0]), + Hh, + cs, + ds, + N ? 0 : this.viewRotation_ + ); + t: + if (ve) { + const je = []; + let de, Cr, Mr, ee, xe; + if (R) + for (de = 0, Cr = ve.length; de < Cr; ++de) { + xe = ve[de], Mr = xe[4], ee = this.createLabel(Mr, E, "", R), g = xe[2] + (us[0] < 0 ? -qo : qo), m = jo * ee.height + (0.5 - jo) * 2 * qo * us[1] / us[0] - Ch; + const qe = this.calculateImageOrLabelDimensions_( + ee.width, + ee.height, + xe[0], + xe[1], + ee.width, + ee.height, + g, + m, + 0, + 0, + xe[3], + Mh, + !1, + Ui, + !1, + it + ); + if (l && l.collides(qe.declutterBox)) + break t; + je.push([ + t, + e, + ee, + qe, + 1, + null, + null + ]); + } + if (b) + for (de = 0, Cr = ve.length; de < Cr; ++de) { + xe = ve[de], Mr = xe[4], ee = this.createLabel(Mr, E, b, ""), g = xe[2], m = jo * ee.height - Ch; + const qe = this.calculateImageOrLabelDimensions_( + ee.width, + ee.height, + xe[0], + xe[1], + ee.width, + ee.height, + g, + m, + 0, + 0, + xe[3], + Mh, + !1, + Ui, + !1, + it + ); + if (l && l.collides(qe.declutterBox)) + break t; + je.push([ + t, + e, + ee, + qe, + 1, + null, + null + ]); + } + l && l.load(je.map(mc)); + for (let qe = 0, pg = je.length; qe < pg; ++qe) + this.replayImageOrLabel_.apply(this, je[qe]); + } + } + ++c; + break; + case W.END_GEOMETRY: + if (o !== void 0) { + it = T[1]; + const ue = o(it, At); + if (ue) + return ue; + } + ++c; + break; + case W.FILL: + P ? F++ : this.fill_(t), ++c; + break; + case W.MOVE_TO_LINE_TO: + for (d = T[1], f = T[2], wt = h[d], yt = h[d + 1], p = wt + 0.5 | 0, v = yt + 0.5 | 0, (p !== _ || v !== y) && (t.moveTo(wt, yt), _ = p, y = v), d += 2; d < f; d += 2) + wt = h[d], yt = h[d + 1], p = wt + 0.5 | 0, v = yt + 0.5 | 0, (d == f - 2 || p !== _ || v !== y) && (t.lineTo(wt, yt), _ = p, y = v); + ++c; + break; + case W.SET_FILL_STYLE: + V = T, this.alignFill_ = T[2], F && (this.fill_(t), F = 0, G && (t.stroke(), G = 0)), t.fillStyle = T[1], ++c; + break; + case W.SET_STROKE_STYLE: + L = T, G && (t.stroke(), G = 0), this.setStrokeStyle_(t, T), ++c; + break; + case W.STROKE: + P ? G++ : t.stroke(), ++c; + break; + default: + ++c; + break; + } + } + F && this.fill_(t), G && t.stroke(); + } + execute(t, e, i, s, r, o) { + this.viewRotation_ = s, this.execute_( + t, + e, + i, + this.instructions, + r, + void 0, + void 0, + o + ); + } + executeHitDetection(t, e, i, s, r) { + return this.viewRotation_ = i, this.execute_( + t, + 1, + e, + this.hitDetectionInstructions, + !0, + s, + r + ); + } +} +const h_ = l_, da = ["Polygon", "Circle", "LineString", "Image", "Text", "Default"]; +class c_ { + constructor(t, e, i, s, r, o) { + this.maxExtent_ = t, this.overlaps_ = s, this.pixelRatio_ = i, this.resolution_ = e, this.renderBuffer_ = o, this.executorsByZIndex_ = {}, this.hitDetectionContext_ = null, this.hitDetectionTransform_ = $e(), this.createExecutors_(r); + } + clip(t, e) { + const i = this.getClipCoords(e); + t.beginPath(), t.moveTo(i[0], i[1]), t.lineTo(i[2], i[3]), t.lineTo(i[4], i[5]), t.lineTo(i[6], i[7]), t.clip(); + } + createExecutors_(t) { + for (const e in t) { + let i = this.executorsByZIndex_[e]; + i === void 0 && (i = {}, this.executorsByZIndex_[e] = i); + const s = t[e]; + for (const r in s) { + const o = s[r]; + i[r] = new h_( + this.resolution_, + this.pixelRatio_, + this.overlaps_, + o + ); + } + } + } + hasExecutors(t) { + for (const e in this.executorsByZIndex_) { + const i = this.executorsByZIndex_[e]; + for (let s = 0, r = t.length; s < r; ++s) + if (t[s] in i) + return !0; + } + return !1; + } + forEachFeatureAtCoordinate(t, e, i, s, r, o) { + s = Math.round(s); + const a = s * 2 + 1, l = Ii( + this.hitDetectionTransform_, + s + 0.5, + s + 0.5, + 1 / e, + -1 / e, + -i, + -t[0], + -t[1] + ), h = !this.hitDetectionContext_; + h && (this.hitDetectionContext_ = pe( + a, + a + )); + const c = this.hitDetectionContext_; + c.canvas.width !== a || c.canvas.height !== a ? (c.canvas.width = a, c.canvas.height = a) : h || c.clearRect(0, 0, a, a); + let u; + this.renderBuffer_ !== void 0 && (u = se(), Ss(u, t), Js( + u, + e * (this.renderBuffer_ + s), + u + )); + const d = u_(s); + let f; + function g(C, E) { + const R = c.getImageData( + 0, + 0, + a, + a + ).data; + for (let b = 0, F = d.length; b < F; b++) + if (R[d[b]] > 0) { + if (!o || f !== "Image" && f !== "Text" || o.includes(C)) { + const G = (d[b] - 3) / 4, V = s - G % a, L = s - (G / a | 0), $ = r(C, E, V * V + L * L); + if ($) + return $; + } + c.clearRect(0, 0, a, a); + break; + } + } + const m = Object.keys(this.executorsByZIndex_).map(Number); + m.sort(tn); + let _, y, p, v, x; + for (_ = m.length - 1; _ >= 0; --_) { + const C = m[_].toString(); + for (p = this.executorsByZIndex_[C], y = da.length - 1; y >= 0; --y) + if (f = da[y], v = p[f], v !== void 0 && (x = v.executeHitDetection( + c, + l, + i, + g, + u + ), x)) + return x; + } + } + getClipCoords(t) { + const e = this.maxExtent_; + if (!e) + return null; + const i = e[0], s = e[1], r = e[2], o = e[3], a = [i, s, i, o, r, o, r, s]; + return Ki(a, 0, 8, 2, t, a), a; + } + isEmpty() { + return Hn(this.executorsByZIndex_); + } + execute(t, e, i, s, r, o, a) { + const l = Object.keys(this.executorsByZIndex_).map(Number); + l.sort(tn), this.maxExtent_ && (t.save(), this.clip(t, i)), o = o || da; + let h, c, u, d, f, g; + for (a && l.reverse(), h = 0, c = l.length; h < c; ++h) { + const m = l[h].toString(); + for (f = this.executorsByZIndex_[m], u = 0, d = o.length; u < d; ++u) { + const _ = o[u]; + g = f[_], g !== void 0 && g.execute( + t, + e, + i, + s, + r, + a + ); + } + } + this.maxExtent_ && t.restore(); + } +} +const fa = {}; +function u_(n) { + if (fa[n] !== void 0) + return fa[n]; + const t = n * 2 + 1, e = n * n, i = new Array(e + 1); + for (let r = 0; r <= n; ++r) + for (let o = 0; o <= n; ++o) { + const a = r * r + o * o; + if (a > e) + break; + let l = i[a]; + l || (l = [], i[a] = l), l.push(((n + r) * t + (n + o)) * 4 + 3), r > 0 && l.push(((n - r) * t + (n + o)) * 4 + 3), o > 0 && (l.push(((n + r) * t + (n - o)) * 4 + 3), r > 0 && l.push(((n - r) * t + (n - o)) * 4 + 3)); + } + const s = []; + for (let r = 0, o = i.length; r < o; ++r) + i[r] && s.push(...i[r]); + return fa[n] = s, s; +} +const pc = c_; +class d_ extends Xd { + constructor(t, e, i, s, r, o, a) { + super(), this.context_ = t, this.pixelRatio_ = e, this.extent_ = i, this.transform_ = s, this.viewRotation_ = r, this.squaredTolerance_ = o, this.userTransform_ = a, this.contextFillState_ = null, this.contextStrokeState_ = null, this.contextTextState_ = null, this.fillState_ = null, this.strokeState_ = null, this.image_ = null, this.imageAnchorX_ = 0, this.imageAnchorY_ = 0, this.imageHeight_ = 0, this.imageOpacity_ = 0, this.imageOriginX_ = 0, this.imageOriginY_ = 0, this.imageRotateWithView_ = !1, this.imageRotation_ = 0, this.imageScale_ = [0, 0], this.imageWidth_ = 0, this.text_ = "", this.textOffsetX_ = 0, this.textOffsetY_ = 0, this.textRotateWithView_ = !1, this.textRotation_ = 0, this.textScale_ = [0, 0], this.textFillState_ = null, this.textStrokeState_ = null, this.textState_ = null, this.pixelCoordinates_ = [], this.tmpLocalTransform_ = $e(); + } + drawImages_(t, e, i, s) { + if (!this.image_) + return; + const r = Ki( + t, + e, + i, + s, + this.transform_, + this.pixelCoordinates_ + ), o = this.context_, a = this.tmpLocalTransform_, l = o.globalAlpha; + this.imageOpacity_ != 1 && (o.globalAlpha = l * this.imageOpacity_); + let h = this.imageRotation_; + this.imageRotateWithView_ && (h += this.viewRotation_); + for (let c = 0, u = r.length; c < u; c += 2) { + const d = r[c] - this.imageAnchorX_, f = r[c + 1] - this.imageAnchorY_; + if (h !== 0 || this.imageScale_[0] != 1 || this.imageScale_[1] != 1) { + const g = d + this.imageAnchorX_, m = f + this.imageAnchorY_; + Ii( + a, + g, + m, + 1, + 1, + h, + -g, + -m + ), o.setTransform.apply(o, a), o.translate(g, m), o.scale(this.imageScale_[0], this.imageScale_[1]), o.drawImage( + this.image_, + this.imageOriginX_, + this.imageOriginY_, + this.imageWidth_, + this.imageHeight_, + -this.imageAnchorX_, + -this.imageAnchorY_, + this.imageWidth_, + this.imageHeight_ + ), o.setTransform(1, 0, 0, 1, 0, 0); + } else + o.drawImage( + this.image_, + this.imageOriginX_, + this.imageOriginY_, + this.imageWidth_, + this.imageHeight_, + d, + f, + this.imageWidth_, + this.imageHeight_ + ); + } + this.imageOpacity_ != 1 && (o.globalAlpha = l); + } + drawText_(t, e, i, s) { + if (!this.textState_ || this.text_ === "") + return; + this.textFillState_ && this.setContextFillState_(this.textFillState_), this.textStrokeState_ && this.setContextStrokeState_(this.textStrokeState_), this.setContextTextState_(this.textState_); + const r = Ki( + t, + e, + i, + s, + this.transform_, + this.pixelCoordinates_ + ), o = this.context_; + let a = this.textRotation_; + for (this.textRotateWithView_ && (a += this.viewRotation_); e < i; e += s) { + const l = r[e] + this.textOffsetX_, h = r[e + 1] + this.textOffsetY_; + a !== 0 || this.textScale_[0] != 1 || this.textScale_[1] != 1 ? (o.translate(l - this.textOffsetX_, h - this.textOffsetY_), o.rotate(a), o.translate(this.textOffsetX_, this.textOffsetY_), o.scale(this.textScale_[0], this.textScale_[1]), this.textStrokeState_ && o.strokeText(this.text_, 0, 0), this.textFillState_ && o.fillText(this.text_, 0, 0), o.setTransform(1, 0, 0, 1, 0, 0)) : (this.textStrokeState_ && o.strokeText(this.text_, l, h), this.textFillState_ && o.fillText(this.text_, l, h)); + } + } + moveToLineTo_(t, e, i, s, r) { + const o = this.context_, a = Ki( + t, + e, + i, + s, + this.transform_, + this.pixelCoordinates_ + ); + o.moveTo(a[0], a[1]); + let l = a.length; + r && (l -= 2); + for (let h = 2; h < l; h += 2) + o.lineTo(a[h], a[h + 1]); + return r && o.closePath(), i; + } + drawRings_(t, e, i, s) { + for (let r = 0, o = i.length; r < o; ++r) + e = this.moveToLineTo_( + t, + e, + i[r], + s, + !0 + ); + return e; + } + drawCircle(t) { + if (!!Kt(this.extent_, t.getExtent())) { + if (this.fillState_ || this.strokeState_) { + this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_); + const e = c1( + t, + this.transform_, + this.pixelCoordinates_ + ), i = e[2] - e[0], s = e[3] - e[1], r = Math.sqrt(i * i + s * s), o = this.context_; + o.beginPath(), o.arc( + e[0], + e[1], + r, + 0, + 2 * Math.PI + ), this.fillState_ && o.fill(), this.strokeState_ && o.stroke(); + } + this.text_ !== "" && this.drawText_(t.getCenter(), 0, 2, 2); + } + } + setStyle(t) { + this.setFillStrokeStyle(t.getFill(), t.getStroke()), this.setImageStyle(t.getImage()), this.setTextStyle(t.getText()); + } + setTransform(t) { + this.transform_ = t; + } + drawGeometry(t) { + switch (t.getType()) { + case "Point": + this.drawPoint( + t + ); + break; + case "LineString": + this.drawLineString( + t + ); + break; + case "Polygon": + this.drawPolygon( + t + ); + break; + case "MultiPoint": + this.drawMultiPoint( + t + ); + break; + case "MultiLineString": + this.drawMultiLineString( + t + ); + break; + case "MultiPolygon": + this.drawMultiPolygon( + t + ); + break; + case "GeometryCollection": + this.drawGeometryCollection( + t + ); + break; + case "Circle": + this.drawCircle( + t + ); + break; + } + } + drawFeature(t, e) { + const i = e.getGeometryFunction()(t); + !i || !Kt(this.extent_, i.getExtent()) || (this.setStyle(e), this.drawGeometry(i)); + } + drawGeometryCollection(t) { + const e = t.getGeometriesArray(); + for (let i = 0, s = e.length; i < s; ++i) + this.drawGeometry(e[i]); + } + drawPoint(t) { + this.squaredTolerance_ && (t = t.simplifyTransformed( + this.squaredTolerance_, + this.userTransform_ + )); + const e = t.getFlatCoordinates(), i = t.getStride(); + this.image_ && this.drawImages_(e, 0, e.length, i), this.text_ !== "" && this.drawText_(e, 0, e.length, i); + } + drawMultiPoint(t) { + this.squaredTolerance_ && (t = t.simplifyTransformed( + this.squaredTolerance_, + this.userTransform_ + )); + const e = t.getFlatCoordinates(), i = t.getStride(); + this.image_ && this.drawImages_(e, 0, e.length, i), this.text_ !== "" && this.drawText_(e, 0, e.length, i); + } + drawLineString(t) { + if (this.squaredTolerance_ && (t = t.simplifyTransformed( + this.squaredTolerance_, + this.userTransform_ + )), !!Kt(this.extent_, t.getExtent())) { + if (this.strokeState_) { + this.setContextStrokeState_(this.strokeState_); + const e = this.context_, i = t.getFlatCoordinates(); + e.beginPath(), this.moveToLineTo_( + i, + 0, + i.length, + t.getStride(), + !1 + ), e.stroke(); + } + if (this.text_ !== "") { + const e = t.getFlatMidpoint(); + this.drawText_(e, 0, 2, 2); + } + } + } + drawMultiLineString(t) { + this.squaredTolerance_ && (t = t.simplifyTransformed( + this.squaredTolerance_, + this.userTransform_ + )); + const e = t.getExtent(); + if (!!Kt(this.extent_, e)) { + if (this.strokeState_) { + this.setContextStrokeState_(this.strokeState_); + const i = this.context_, s = t.getFlatCoordinates(); + let r = 0; + const o = t.getEnds(), a = t.getStride(); + i.beginPath(); + for (let l = 0, h = o.length; l < h; ++l) + r = this.moveToLineTo_( + s, + r, + o[l], + a, + !1 + ); + i.stroke(); + } + if (this.text_ !== "") { + const i = t.getFlatMidpoints(); + this.drawText_(i, 0, i.length, 2); + } + } + } + drawPolygon(t) { + if (this.squaredTolerance_ && (t = t.simplifyTransformed( + this.squaredTolerance_, + this.userTransform_ + )), !!Kt(this.extent_, t.getExtent())) { + if (this.strokeState_ || this.fillState_) { + this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_); + const e = this.context_; + e.beginPath(), this.drawRings_( + t.getOrientedFlatCoordinates(), + 0, + t.getEnds(), + t.getStride() + ), this.fillState_ && e.fill(), this.strokeState_ && e.stroke(); + } + if (this.text_ !== "") { + const e = t.getFlatInteriorPoint(); + this.drawText_(e, 0, 2, 2); + } + } + } + drawMultiPolygon(t) { + if (this.squaredTolerance_ && (t = t.simplifyTransformed( + this.squaredTolerance_, + this.userTransform_ + )), !!Kt(this.extent_, t.getExtent())) { + if (this.strokeState_ || this.fillState_) { + this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_); + const e = this.context_, i = t.getOrientedFlatCoordinates(); + let s = 0; + const r = t.getEndss(), o = t.getStride(); + e.beginPath(); + for (let a = 0, l = r.length; a < l; ++a) { + const h = r[a]; + s = this.drawRings_(i, s, h, o); + } + this.fillState_ && e.fill(), this.strokeState_ && e.stroke(); + } + if (this.text_ !== "") { + const e = t.getFlatInteriorPoints(); + this.drawText_(e, 0, e.length, 2); + } + } + } + setContextFillState_(t) { + const e = this.context_, i = this.contextFillState_; + i ? i.fillStyle != t.fillStyle && (i.fillStyle = t.fillStyle, e.fillStyle = t.fillStyle) : (e.fillStyle = t.fillStyle, this.contextFillState_ = { + fillStyle: t.fillStyle + }); + } + setContextStrokeState_(t) { + const e = this.context_, i = this.contextStrokeState_; + i ? (i.lineCap != t.lineCap && (i.lineCap = t.lineCap, e.lineCap = t.lineCap), Ni(i.lineDash, t.lineDash) || e.setLineDash( + i.lineDash = t.lineDash + ), i.lineDashOffset != t.lineDashOffset && (i.lineDashOffset = t.lineDashOffset, e.lineDashOffset = t.lineDashOffset), i.lineJoin != t.lineJoin && (i.lineJoin = t.lineJoin, e.lineJoin = t.lineJoin), i.lineWidth != t.lineWidth && (i.lineWidth = t.lineWidth, e.lineWidth = t.lineWidth), i.miterLimit != t.miterLimit && (i.miterLimit = t.miterLimit, e.miterLimit = t.miterLimit), i.strokeStyle != t.strokeStyle && (i.strokeStyle = t.strokeStyle, e.strokeStyle = t.strokeStyle)) : (e.lineCap = t.lineCap, e.setLineDash(t.lineDash), e.lineDashOffset = t.lineDashOffset, e.lineJoin = t.lineJoin, e.lineWidth = t.lineWidth, e.miterLimit = t.miterLimit, e.strokeStyle = t.strokeStyle, this.contextStrokeState_ = { + lineCap: t.lineCap, + lineDash: t.lineDash, + lineDashOffset: t.lineDashOffset, + lineJoin: t.lineJoin, + lineWidth: t.lineWidth, + miterLimit: t.miterLimit, + strokeStyle: t.strokeStyle + }); + } + setContextTextState_(t) { + const e = this.context_, i = this.contextTextState_, s = t.textAlign ? t.textAlign : $s; + i ? (i.font != t.font && (i.font = t.font, e.font = t.font), i.textAlign != s && (i.textAlign = s, e.textAlign = s), i.textBaseline != t.textBaseline && (i.textBaseline = t.textBaseline, e.textBaseline = t.textBaseline)) : (e.font = t.font, e.textAlign = s, e.textBaseline = t.textBaseline, this.contextTextState_ = { + font: t.font, + textAlign: s, + textBaseline: t.textBaseline + }); + } + setFillStrokeStyle(t, e) { + if (!t) + this.fillState_ = null; + else { + const i = t.getColor(); + this.fillState_ = { + fillStyle: ke( + i || ai + ) + }; + } + if (!e) + this.strokeState_ = null; + else { + const i = e.getColor(), s = e.getLineCap(), r = e.getLineDash(), o = e.getLineDashOffset(), a = e.getLineJoin(), l = e.getWidth(), h = e.getMiterLimit(), c = r || Ns; + this.strokeState_ = { + lineCap: s !== void 0 ? s : no, + lineDash: this.pixelRatio_ === 1 ? c : c.map((u) => u * this.pixelRatio_), + lineDashOffset: (o || Ds) * this.pixelRatio_, + lineJoin: a !== void 0 ? a : Xn, + lineWidth: (l !== void 0 ? l : Bs) * this.pixelRatio_, + miterLimit: h !== void 0 ? h : ks, + strokeStyle: ke( + i || Gs + ) + }; + } + } + setImageStyle(t) { + let e; + if (!t || !(e = t.getSize())) { + this.image_ = null; + return; + } + const i = t.getPixelRatio(this.pixelRatio_), s = t.getAnchor(), r = t.getOrigin(); + this.image_ = t.getImage(this.pixelRatio_), this.imageAnchorX_ = s[0] * i, this.imageAnchorY_ = s[1] * i, this.imageHeight_ = e[1] * i, this.imageOpacity_ = t.getOpacity(), this.imageOriginX_ = r[0], this.imageOriginY_ = r[1], this.imageRotateWithView_ = t.getRotateWithView(), this.imageRotation_ = t.getRotation(); + const o = t.getScaleArray(); + this.imageScale_ = [ + o[0] * this.pixelRatio_ / i, + o[1] * this.pixelRatio_ / i + ], this.imageWidth_ = e[0] * i; + } + setTextStyle(t) { + if (!t) + this.text_ = ""; + else { + const e = t.getFill(); + if (!e) + this.textFillState_ = null; + else { + const f = e.getColor(); + this.textFillState_ = { + fillStyle: ke( + f || ai + ) + }; + } + const i = t.getStroke(); + if (!i) + this.textStrokeState_ = null; + else { + const f = i.getColor(), g = i.getLineCap(), m = i.getLineDash(), _ = i.getLineDashOffset(), y = i.getLineJoin(), p = i.getWidth(), v = i.getMiterLimit(); + this.textStrokeState_ = { + lineCap: g !== void 0 ? g : no, + lineDash: m || Ns, + lineDashOffset: _ || Ds, + lineJoin: y !== void 0 ? y : Xn, + lineWidth: p !== void 0 ? p : Bs, + miterLimit: v !== void 0 ? v : ks, + strokeStyle: ke( + f || Gs + ) + }; + } + const s = t.getFont(), r = t.getOffsetX(), o = t.getOffsetY(), a = t.getRotateWithView(), l = t.getRotation(), h = t.getScaleArray(), c = t.getText(), u = t.getTextAlign(), d = t.getTextBaseline(); + this.textState_ = { + font: s !== void 0 ? s : cd, + textAlign: u !== void 0 ? u : $s, + textBaseline: d !== void 0 ? d : so + }, this.text_ = c !== void 0 ? Array.isArray(c) ? c.reduce((f, g, m) => f += m % 2 ? " " : g, "") : c : "", this.textOffsetX_ = r !== void 0 ? this.pixelRatio_ * r : 0, this.textOffsetY_ = o !== void 0 ? this.pixelRatio_ * o : 0, this.textRotateWithView_ = a !== void 0 ? a : !1, this.textRotation_ = l !== void 0 ? l : 0, this.textScale_ = [ + this.pixelRatio_ * h[0], + this.pixelRatio_ * h[1] + ]; + } + } +} +const f_ = d_, De = 0.5; +function g_(n, t, e, i, s, r, o) { + const a = n[0] * De, l = n[1] * De, h = pe(a, l); + h.imageSmoothingEnabled = !1; + const c = h.canvas, u = new f_( + h, + De, + s, + null, + o + ), d = e.length, f = Math.floor((256 * 256 * 256 - 1) / d), g = {}; + for (let _ = 1; _ <= d; ++_) { + const y = e[_ - 1], p = y.getStyleFunction() || i; + if (!i) + continue; + let v = p(y, r); + if (!v) + continue; + Array.isArray(v) || (v = [v]); + const C = "#" + ("000000" + (_ * f).toString(16)).slice(-6); + for (let E = 0, R = v.length; E < R; ++E) { + const b = v[E], F = b.getGeometryFunction()(y); + if (!F || !Kt(s, F.getExtent())) + continue; + const G = b.clone(), V = G.getFill(); + V && V.setColor(C); + const L = G.getStroke(); + L && (L.setColor(C), L.setLineDash(null)), G.setText(void 0); + const $ = b.getImage(); + if ($ && $.getOpacity() !== 0) { + const k = $.getImageSize(); + if (!k) + continue; + const P = pe( + k[0], + k[1], + void 0, + { alpha: !1 } + ), it = P.canvas; + P.fillStyle = C, P.fillRect(0, 0, it.width, it.height), G.setImage( + new Ts({ + img: it, + imgSize: k, + anchor: $.getAnchor(), + anchorXUnits: "pixels", + anchorYUnits: "pixels", + offset: $.getOrigin(), + opacity: 1, + size: $.getSize(), + scale: $.getScale(), + rotation: $.getRotation(), + rotateWithView: $.getRotateWithView() + }) + ); + } + const gt = G.getZIndex() || 0; + let N = g[gt]; + N || (N = {}, g[gt] = N, N.Polygon = [], N.Circle = [], N.LineString = [], N.Point = []), N[F.getType().replace("Multi", "")].push( + F, + G + ); + } + } + const m = Object.keys(g).map(Number).sort(tn); + for (let _ = 0, y = m.length; _ < y; ++_) { + const p = g[m[_]]; + for (const v in p) { + const x = p[v]; + for (let C = 0, E = x.length; C < E; C += 2) { + u.setStyle(x[C + 1]); + for (let R = 0, b = t.length; R < b; ++R) + u.setTransform(t[R]), u.drawGeometry(x[C]); + } + } + } + return h.getImageData(0, 0, c.width, c.height); +} +function m_(n, t, e) { + const i = []; + if (e) { + const s = Math.floor(Math.round(n[0]) * De), r = Math.floor(Math.round(n[1]) * De), o = (Et(s, 0, e.width - 1) + Et(r, 0, e.height - 1) * e.width) * 4, a = e.data[o], l = e.data[o + 1], c = e.data[o + 2] + 256 * (l + 256 * a), u = Math.floor((256 * 256 * 256 - 1) / t.length); + c && c % u === 0 && i.push(t[c / u - 1]); + } + return i; +} +const __ = 0.5, jd = { + Point: S_, + LineString: M_, + Polygon: T_, + MultiPoint: R_, + MultiLineString: E_, + MultiPolygon: w_, + GeometryCollection: C_, + Circle: v_ +}; +function p_(n, t) { + return parseInt(q(n), 10) - parseInt(q(t), 10); +} +function y_(n, t) { + const e = Ha(n, t); + return e * e; +} +function Ha(n, t) { + return __ * n / t; +} +function v_(n, t, e, i, s) { + const r = e.getFill(), o = e.getStroke(); + if (r || o) { + const l = n.getBuilder(e.getZIndex(), "Circle"); + l.setFillStrokeStyle(r, o), l.drawCircle(t, i); + } + const a = e.getText(); + if (a && a.getText()) { + const l = (s || n).getBuilder( + e.getZIndex(), + "Text" + ); + l.setTextStyle(a), l.drawText(t, i); + } +} +function yc(n, t, e, i, s, r, o) { + let a = !1; + const l = e.getImage(); + if (l) { + const h = l.getImageState(); + h == Pt.LOADED || h == Pt.ERROR ? l.unlistenImageChange(s) : (h == Pt.IDLE && l.load(), l.listenImageChange(s), a = !0); + } + return x_( + n, + t, + e, + i, + r, + o + ), a; +} +function x_(n, t, e, i, s, r) { + const o = e.getGeometryFunction()(t); + if (!o) + return; + const a = o.simplifyTransformed( + i, + s + ); + if (e.getRenderer()) + qd(n, a, e, t); + else { + const h = jd[a.getType()]; + h( + n, + a, + e, + t, + r + ); + } +} +function qd(n, t, e, i) { + if (t.getType() == "GeometryCollection") { + const r = t.getGeometries(); + for (let o = 0, a = r.length; o < a; ++o) + qd(n, r[o], e, i); + return; + } + n.getBuilder(e.getZIndex(), "Default").drawCustom( + t, + i, + e.getRenderer(), + e.getHitDetectionRenderer() + ); +} +function C_(n, t, e, i, s) { + const r = t.getGeometriesArray(); + let o, a; + for (o = 0, a = r.length; o < a; ++o) { + const l = jd[r[o].getType()]; + l( + n, + r[o], + e, + i, + s + ); + } +} +function M_(n, t, e, i, s) { + const r = e.getStroke(); + if (r) { + const a = n.getBuilder( + e.getZIndex(), + "LineString" + ); + a.setFillStrokeStyle(null, r), a.drawLineString(t, i); + } + const o = e.getText(); + if (o && o.getText()) { + const a = (s || n).getBuilder( + e.getZIndex(), + "Text" + ); + a.setTextStyle(o), a.drawText(t, i); + } +} +function E_(n, t, e, i, s) { + const r = e.getStroke(); + if (r) { + const a = n.getBuilder( + e.getZIndex(), + "LineString" + ); + a.setFillStrokeStyle(null, r), a.drawMultiLineString(t, i); + } + const o = e.getText(); + if (o && o.getText()) { + const a = (s || n).getBuilder( + e.getZIndex(), + "Text" + ); + a.setTextStyle(o), a.drawText(t, i); + } +} +function w_(n, t, e, i, s) { + const r = e.getFill(), o = e.getStroke(); + if (o || r) { + const l = n.getBuilder(e.getZIndex(), "Polygon"); + l.setFillStrokeStyle(r, o), l.drawMultiPolygon(t, i); + } + const a = e.getText(); + if (a && a.getText()) { + const l = (s || n).getBuilder( + e.getZIndex(), + "Text" + ); + l.setTextStyle(a), l.drawText(t, i); + } +} +function S_(n, t, e, i, s) { + const r = e.getImage(), o = e.getText(); + let a; + if (r) { + if (r.getImageState() != Pt.LOADED) + return; + let l = n; + if (s) { + const c = r.getDeclutterMode(); + if (c !== "none") + if (l = s, c === "obstacle") { + const u = n.getBuilder( + e.getZIndex(), + "Image" + ); + u.setImageStyle(r, a), u.drawPoint(t, i); + } else + o && o.getText() && (a = {}); + } + const h = l.getBuilder( + e.getZIndex(), + "Image" + ); + h.setImageStyle(r, a), h.drawPoint(t, i); + } + if (o && o.getText()) { + let l = n; + s && (l = s); + const h = l.getBuilder(e.getZIndex(), "Text"); + h.setTextStyle(o, a), h.drawText(t, i); + } +} +function R_(n, t, e, i, s) { + const r = e.getImage(), o = e.getText(); + let a; + if (r) { + if (r.getImageState() != Pt.LOADED) + return; + let l = n; + if (s) { + const c = r.getDeclutterMode(); + if (c !== "none") + if (l = s, c === "obstacle") { + const u = n.getBuilder( + e.getZIndex(), + "Image" + ); + u.setImageStyle(r, a), u.drawMultiPoint(t, i); + } else + o && o.getText() && (a = {}); + } + const h = l.getBuilder( + e.getZIndex(), + "Image" + ); + h.setImageStyle(r, a), h.drawMultiPoint(t, i); + } + if (o && o.getText()) { + let l = n; + s && (l = s); + const h = l.getBuilder(e.getZIndex(), "Text"); + h.setTextStyle(o, a), h.drawText(t, i); + } +} +function T_(n, t, e, i, s) { + const r = e.getFill(), o = e.getStroke(); + if (r || o) { + const l = n.getBuilder(e.getZIndex(), "Polygon"); + l.setFillStrokeStyle(r, o), l.drawPolygon(t, i); + } + const a = e.getText(); + if (a && a.getText()) { + const l = (s || n).getBuilder( + e.getZIndex(), + "Text" + ); + l.setTextStyle(a), l.drawText(t, i); + } +} +class b_ extends Yd { + constructor(t) { + super(t), this.boundHandleStyleImageChange_ = this.handleStyleImageChange_.bind(this), this.animatingOrInteracting_, this.hitDetectionImageData_ = null, this.renderedFeatures_ = null, this.renderedRevision_ = -1, this.renderedResolution_ = NaN, this.renderedExtent_ = se(), this.wrappedRenderedExtent_ = se(), this.renderedRotation_, this.renderedCenter_ = null, this.renderedProjection_ = null, this.renderedRenderOrder_ = null, this.replayGroup_ = null, this.replayGroupChanged = !0, this.declutterExecutorGroup = null, this.clipping = !0, this.compositionContext_ = null, this.opacity_ = 1; + } + renderWorlds(t, e, i) { + const s = e.extent, r = e.viewState, o = r.center, a = r.resolution, l = r.projection, h = r.rotation, c = l.getExtent(), u = this.getLayer().getSource(), d = e.pixelRatio, f = e.viewHints, g = !(f[Wt.ANIMATING] || f[Wt.INTERACTING]), m = this.compositionContext_, _ = Math.round(e.size[0] * d), y = Math.round(e.size[1] * d), p = u.getWrapX() && l.canWrapX(), v = p ? pt(c) : null, x = p ? Math.ceil((s[2] - c[2]) / v) + 1 : 1; + let C = p ? Math.floor((s[0] - c[0]) / v) : 0; + do { + const E = this.getRenderTransform( + o, + a, + h, + d, + _, + y, + C * v + ); + t.execute( + m, + 1, + E, + h, + g, + void 0, + i + ); + } while (++C < x); + } + setupCompositionContext_() { + if (this.opacity_ !== 1) { + const t = pe( + this.context.canvas.width, + this.context.canvas.height, + gc + ); + this.compositionContext_ = t; + } else + this.compositionContext_ = this.context; + } + releaseCompositionContext_() { + if (this.opacity_ !== 1) { + const t = this.context.globalAlpha; + this.context.globalAlpha = this.opacity_, this.context.drawImage(this.compositionContext_.canvas, 0, 0), this.context.globalAlpha = t, hd(this.compositionContext_), gc.push(this.compositionContext_.canvas), this.compositionContext_ = null; + } + } + renderDeclutter(t) { + this.declutterExecutorGroup && (this.setupCompositionContext_(), this.renderWorlds( + this.declutterExecutorGroup, + t, + t.declutterTree + ), this.releaseCompositionContext_()); + } + renderFrame(t, e) { + const i = t.pixelRatio, s = t.layerStatesArray[t.layerIndex]; + Xg(this.pixelTransform, 1 / i, 1 / i), _l(this.inversePixelTransform, this.pixelTransform); + const r = Yu(this.pixelTransform); + this.useContainer(e, r, this.getBackground(t)); + const o = this.context, a = o.canvas, l = this.replayGroup_, h = this.declutterExecutorGroup; + if ((!l || l.isEmpty()) && (!h || h.isEmpty())) + return null; + const c = Math.round(t.size[0] * i), u = Math.round(t.size[1] * i); + a.width != c || a.height != u ? (a.width = c, a.height = u, a.style.transform !== r && (a.style.transform = r)) : this.containerReused || o.clearRect(0, 0, c, u), this.preRender(o, t); + const d = t.viewState; + d.projection, this.opacity_ = s.opacity, this.setupCompositionContext_(); + let f = !1, g = !0; + if (s.extent && this.clipping) { + const m = Mi(s.extent); + g = Kt(m, t.extent), f = g && !Vi(m, t.extent), f && this.clipUnrotated(this.compositionContext_, t, m); + } + return g && this.renderWorlds(l, t), f && this.compositionContext_.restore(), this.releaseCompositionContext_(), this.postRender(o, t), this.renderedRotation_ !== d.rotation && (this.renderedRotation_ = d.rotation, this.hitDetectionImageData_ = null), this.container; + } + getFeatures(t) { + return new Promise( + function(e) { + if (!this.hitDetectionImageData_ && !this.animatingOrInteracting_) { + const i = [this.context.canvas.width, this.context.canvas.height]; + Nt(this.pixelTransform, i); + const s = this.renderedCenter_, r = this.renderedResolution_, o = this.renderedRotation_, a = this.renderedProjection_, l = this.wrappedRenderedExtent_, h = this.getLayer(), c = [], u = i[0] * De, d = i[1] * De; + c.push( + this.getRenderTransform( + s, + r, + o, + De, + u, + d, + 0 + ).slice() + ); + const f = h.getSource(), g = a.getExtent(); + if (f.getWrapX() && a.canWrapX() && !Vi(g, l)) { + let m = l[0]; + const _ = pt(g); + let y = 0, p; + for (; m < g[0]; ) + --y, p = _ * y, c.push( + this.getRenderTransform( + s, + r, + o, + De, + u, + d, + p + ).slice() + ), m += _; + for (y = 0, m = l[2]; m > g[2]; ) + ++y, p = _ * y, c.push( + this.getRenderTransform( + s, + r, + o, + De, + u, + d, + p + ).slice() + ), m -= _; + } + this.hitDetectionImageData_ = g_( + i, + c, + this.renderedFeatures_, + h.getStyleFunction(), + l, + r, + o + ); + } + e( + m_(t, this.renderedFeatures_, this.hitDetectionImageData_) + ); + }.bind(this) + ); + } + forEachFeatureAtCoordinate(t, e, i, s, r) { + if (!this.replayGroup_) + return; + const o = e.viewState.resolution, a = e.viewState.rotation, l = this.getLayer(), h = {}, c = function(f, g, m) { + const _ = q(f), y = h[_]; + if (y) { + if (y !== !0 && m < y.distanceSq) { + if (m === 0) + return h[_] = !0, r.splice(r.lastIndexOf(y), 1), s(f, l, g); + y.geometry = g, y.distanceSq = m; + } + } else { + if (m === 0) + return h[_] = !0, s(f, l, g); + r.push( + h[_] = { + feature: f, + layer: l, + geometry: g, + distanceSq: m, + callback: s + } + ); + } + }; + let u; + const d = [this.replayGroup_]; + return this.declutterExecutorGroup && d.push(this.declutterExecutorGroup), d.some((f) => u = f.forEachFeatureAtCoordinate( + t, + o, + a, + i, + c, + f === this.declutterExecutorGroup && e.declutterTree ? e.declutterTree.all().map((g) => g.value) : null + )), u; + } + handleFontsChanged() { + const t = this.getLayer(); + t.getVisible() && this.replayGroup_ && t.changed(); + } + handleStyleImageChange_(t) { + this.renderIfReadyAndVisible(); + } + prepareFrame(t) { + const e = this.getLayer(), i = e.getSource(); + if (!i) + return !1; + const s = t.viewHints[Wt.ANIMATING], r = t.viewHints[Wt.INTERACTING], o = e.getUpdateWhileAnimating(), a = e.getUpdateWhileInteracting(); + if (this.ready && !o && s || !a && r) + return this.animatingOrInteracting_ = !0, !0; + this.animatingOrInteracting_ = !1; + const l = t.extent, h = t.viewState, c = h.projection, u = h.resolution, d = t.pixelRatio, f = e.getRevision(), g = e.getRenderBuffer(); + let m = e.getRenderOrder(); + m === void 0 && (m = p_); + const _ = h.center.slice(), y = Js( + l, + g * u + ), p = y.slice(), v = [y.slice()], x = c.getExtent(); + if (i.getWrapX() && c.canWrapX() && !Vi(x, t.extent)) { + const N = pt(x), k = Math.max(pt(y) / 2, N); + y[0] = x[0] - k, y[2] = x[2] + k, rd(_, c); + const P = Qu(v[0], c); + P[0] < x[0] && P[2] < x[2] ? v.push([ + P[0] + N, + P[1], + P[2] + N, + P[3] + ]) : P[0] > x[0] && P[2] > x[2] && v.push([ + P[0] - N, + P[1], + P[2] - N, + P[3] + ]); + } + if (this.ready && this.renderedResolution_ == u && this.renderedRevision_ == f && this.renderedRenderOrder_ == m && Vi(this.wrappedRenderedExtent_, y)) + return Ni(this.renderedExtent_, p) || (this.hitDetectionImageData_ = null, this.renderedExtent_ = p), this.renderedCenter_ = _, this.replayGroupChanged = !1, !0; + this.replayGroup_ = null; + const C = new fc( + Ha(u, d), + y, + u, + d + ); + let E; + this.getLayer().getDeclutter() && (E = new fc( + Ha(u, d), + y, + u, + d + )); + let R; + for (let N = 0, k = v.length; N < k; ++N) + i.loadFeatures(v[N], u, c); + const b = y_(u, d); + let F = !0; + const G = function(N) { + let k; + const P = N.getStyleFunction() || e.getStyleFunction(); + if (P && (k = P(N, u)), k) { + const it = this.renderFeature( + N, + b, + k, + C, + R, + E + ); + F = F && !it; + } + }.bind(this), V = Il(y), L = i.getFeaturesInExtent(V); + m && L.sort(m); + for (let N = 0, k = L.length; N < k; ++N) + G(L[N]); + this.renderedFeatures_ = L, this.ready = F; + const $ = C.finish(), gt = new pc( + y, + u, + d, + i.getOverlaps(), + $, + e.getRenderBuffer() + ); + return E && (this.declutterExecutorGroup = new pc( + y, + u, + d, + i.getOverlaps(), + E.finish(), + e.getRenderBuffer() + )), this.renderedResolution_ = u, this.renderedRevision_ = f, this.renderedRenderOrder_ = m, this.renderedExtent_ = p, this.wrappedRenderedExtent_ = y, this.renderedCenter_ = _, this.renderedProjection_ = c, this.replayGroup_ = gt, this.hitDetectionImageData_ = null, this.replayGroupChanged = !0, !0; + } + renderFeature(t, e, i, s, r, o) { + if (!i) + return !1; + let a = !1; + if (Array.isArray(i)) + for (let l = 0, h = i.length; l < h; ++l) + a = yc( + s, + t, + i[l], + e, + this.boundHandleStyleImageChange_, + r, + o + ) || a; + else + a = yc( + s, + t, + i, + e, + this.boundHandleStyleImageChange_, + r, + o + ); + return a; + } +} +const L_ = b_; +class I_ extends Vm { + constructor(t) { + super(t); + } + createRenderer() { + return new L_(this); + } +} +const Ze = I_; +class P_ { + constructor(t) { + this.rbush_ = new Wd(t), this.items_ = {}; + } + insert(t, e) { + const i = { + minX: t[0], + minY: t[1], + maxX: t[2], + maxY: t[3], + value: e + }; + this.rbush_.insert(i), this.items_[q(e)] = i; + } + load(t, e) { + const i = new Array(e.length); + for (let s = 0, r = e.length; s < r; s++) { + const o = t[s], a = e[s], l = { + minX: o[0], + minY: o[1], + maxX: o[2], + maxY: o[3], + value: a + }; + i[s] = l, this.items_[q(a)] = l; + } + this.rbush_.load(i); + } + remove(t) { + const e = q(t), i = this.items_[e]; + return delete this.items_[e], this.rbush_.remove(i) !== null; + } + update(t, e) { + const i = this.items_[q(e)], s = [i.minX, i.minY, i.maxX, i.maxY]; + Fs(s, t) || (this.remove(e), this.insert(t, e)); + } + getAll() { + return this.rbush_.all().map(function(e) { + return e.value; + }); + } + getInExtent(t) { + const e = { + minX: t[0], + minY: t[1], + maxX: t[2], + maxY: t[3] + }; + return this.rbush_.search(e).map(function(s) { + return s.value; + }); + } + forEach(t) { + return this.forEach_(this.getAll(), t); + } + forEachInExtent(t, e) { + return this.forEach_(this.getInExtent(t), e); + } + forEach_(t, e) { + let i; + for (let s = 0, r = t.length; s < r; s++) + if (i = e(t[s]), i) + return i; + return i; + } + isEmpty() { + return Hn(this.items_); + } + clear() { + this.rbush_.clear(), this.items_ = {}; + } + getExtent(t) { + const e = this.rbush_.toJSON(); + return _e(e.minX, e.minY, e.maxX, e.maxY, t); + } + concat(t) { + this.rbush_.load(t.rbush_.all()); + for (const e in t.items_) + this.items_[e] = t.items_[e]; + } +} +const fo = P_; +class A_ extends Oe { + constructor(t) { + super(), this.projection = Q(t.projection), this.attributions_ = vc(t.attributions), this.attributionsCollapsible_ = t.attributionsCollapsible !== void 0 ? t.attributionsCollapsible : !0, this.loading = !1, this.state_ = t.state !== void 0 ? t.state : "ready", this.wrapX_ = t.wrapX !== void 0 ? t.wrapX : !1, this.interpolate_ = !!t.interpolate, this.viewResolver = null, this.viewRejector = null; + const e = this; + this.viewPromise_ = new Promise(function(i, s) { + e.viewResolver = i, e.viewRejector = s; + }); + } + getAttributions() { + return this.attributions_; + } + getAttributionsCollapsible() { + return this.attributionsCollapsible_; + } + getProjection() { + return this.projection; + } + getResolutions() { + return H(); + } + getView() { + return this.viewPromise_; + } + getState() { + return this.state_; + } + getWrapX() { + return this.wrapX_; + } + getInterpolate() { + return this.interpolate_; + } + refresh() { + this.changed(); + } + setAttributions(t) { + this.attributions_ = vc(t), this.changed(); + } + setState(t) { + this.state_ = t, this.changed(); + } +} +function vc(n) { + return n ? Array.isArray(n) ? function(t) { + return n; + } : typeof n == "function" ? n : function(t) { + return [n]; + } : null; +} +const Kd = A_, jt = { + ADDFEATURE: "addfeature", + CHANGEFEATURE: "changefeature", + CLEAR: "clear", + REMOVEFEATURE: "removefeature", + FEATURESLOADSTART: "featuresloadstart", + FEATURESLOADEND: "featuresloadend", + FEATURESLOADERROR: "featuresloaderror" +}; +function O_(n, t) { + return [[-1 / 0, -1 / 0, 1 / 0, 1 / 0]]; +} +function F_(n, t) { + return [n]; +} +let N_ = !1; +function D_(n, t, e, i, s, r, o) { + const a = new XMLHttpRequest(); + a.open( + "GET", + typeof n == "function" ? n(e, i, s) : n, + !0 + ), t.getType() == "arraybuffer" && (a.responseType = "arraybuffer"), a.withCredentials = N_, a.onload = function(l) { + if (!a.status || a.status >= 200 && a.status < 300) { + const h = t.getType(); + let c; + h == "json" || h == "text" ? c = a.responseText : h == "xml" ? (c = a.responseXML, c || (c = new DOMParser().parseFromString( + a.responseText, + "application/xml" + ))) : h == "arraybuffer" && (c = a.response), c ? r( + t.readFeatures(c, { + extent: e, + featureProjection: s + }), + t.readProjection(c) + ) : o(); + } else + o(); + }, a.onerror = o, a.send(); +} +function xc(n, t) { + return function(e, i, s, r, o) { + const a = this; + D_( + n, + t, + e, + i, + s, + function(l, h) { + a.addFeatures(l), r !== void 0 && r(l); + }, + o || nn + ); + }; +} +class pi extends Re { + constructor(t, e, i) { + super(t), this.feature = e, this.features = i; + } +} +class k_ extends Kd { + constructor(t) { + t = t || {}, super({ + attributions: t.attributions, + interpolate: !0, + projection: void 0, + state: "ready", + wrapX: t.wrapX !== void 0 ? t.wrapX : !0 + }), this.on, this.once, this.un, this.loader_ = nn, this.format_ = t.format, this.overlaps_ = t.overlaps === void 0 ? !0 : t.overlaps, this.url_ = t.url, t.loader !== void 0 ? this.loader_ = t.loader : this.url_ !== void 0 && (Y(this.format_, 7), this.loader_ = xc( + this.url_, + this.format_ + )), this.strategy_ = t.strategy !== void 0 ? t.strategy : O_; + const e = t.useSpatialIndex !== void 0 ? t.useSpatialIndex : !0; + this.featuresRtree_ = e ? new fo() : null, this.loadedExtentsRtree_ = new fo(), this.loadingExtentsCount_ = 0, this.nullGeometryFeatures_ = {}, this.idIndex_ = {}, this.uidIndex_ = {}, this.featureChangeKeys_ = {}, this.featuresCollection_ = null; + let i, s; + Array.isArray(t.features) ? s = t.features : t.features && (i = t.features, s = i.getArray()), !e && i === void 0 && (i = new Ee(s)), s !== void 0 && this.addFeaturesInternal(s), i !== void 0 && this.bindFeaturesCollection_(i); + } + addFeature(t) { + this.addFeatureInternal(t), this.changed(); + } + addFeatureInternal(t) { + const e = q(t); + if (!this.addToIndex_(e, t)) { + this.featuresCollection_ && this.featuresCollection_.remove(t); + return; + } + this.setupChangeEvents_(e, t); + const i = t.getGeometry(); + if (i) { + const s = i.getExtent(); + this.featuresRtree_ && this.featuresRtree_.insert(s, t); + } else + this.nullGeometryFeatures_[e] = t; + this.dispatchEvent( + new pi(jt.ADDFEATURE, t) + ); + } + setupChangeEvents_(t, e) { + this.featureChangeKeys_[t] = [ + et(e, U.CHANGE, this.handleFeatureChange_, this), + et( + e, + Wn.PROPERTYCHANGE, + this.handleFeatureChange_, + this + ) + ]; + } + addToIndex_(t, e) { + let i = !0; + const s = e.getId(); + return s !== void 0 && (s.toString() in this.idIndex_ ? i = !1 : this.idIndex_[s.toString()] = e), i && (Y(!(t in this.uidIndex_), 30), this.uidIndex_[t] = e), i; + } + addFeatures(t) { + this.addFeaturesInternal(t), this.changed(); + } + addFeaturesInternal(t) { + const e = [], i = [], s = []; + for (let r = 0, o = t.length; r < o; r++) { + const a = t[r], l = q(a); + this.addToIndex_(l, a) && i.push(a); + } + for (let r = 0, o = i.length; r < o; r++) { + const a = i[r], l = q(a); + this.setupChangeEvents_(l, a); + const h = a.getGeometry(); + if (h) { + const c = h.getExtent(); + e.push(c), s.push(a); + } else + this.nullGeometryFeatures_[l] = a; + } + if (this.featuresRtree_ && this.featuresRtree_.load(e, s), this.hasListener(jt.ADDFEATURE)) + for (let r = 0, o = i.length; r < o; r++) + this.dispatchEvent( + new pi(jt.ADDFEATURE, i[r]) + ); + } + bindFeaturesCollection_(t) { + let e = !1; + this.addEventListener( + jt.ADDFEATURE, + function(i) { + e || (e = !0, t.push(i.feature), e = !1); + } + ), this.addEventListener( + jt.REMOVEFEATURE, + function(i) { + e || (e = !0, t.remove(i.feature), e = !1); + } + ), t.addEventListener( + Dt.ADD, + function(i) { + e || (e = !0, this.addFeature(i.element), e = !1); + }.bind(this) + ), t.addEventListener( + Dt.REMOVE, + function(i) { + e || (e = !0, this.removeFeature(i.element), e = !1); + }.bind(this) + ), this.featuresCollection_ = t; + } + clear(t) { + if (t) { + for (const i in this.featureChangeKeys_) + this.featureChangeKeys_[i].forEach(mt); + this.featuresCollection_ || (this.featureChangeKeys_ = {}, this.idIndex_ = {}, this.uidIndex_ = {}); + } else if (this.featuresRtree_) { + const i = function(s) { + this.removeFeatureInternal(s); + }.bind(this); + this.featuresRtree_.forEach(i); + for (const s in this.nullGeometryFeatures_) + this.removeFeatureInternal(this.nullGeometryFeatures_[s]); + } + this.featuresCollection_ && this.featuresCollection_.clear(), this.featuresRtree_ && this.featuresRtree_.clear(), this.nullGeometryFeatures_ = {}; + const e = new pi(jt.CLEAR); + this.dispatchEvent(e), this.changed(); + } + forEachFeature(t) { + if (this.featuresRtree_) + return this.featuresRtree_.forEach(t); + this.featuresCollection_ && this.featuresCollection_.forEach(t); + } + forEachFeatureAtCoordinateDirect(t, e) { + const i = [t[0], t[1], t[0], t[1]]; + return this.forEachFeatureInExtent(i, function(s) { + if (s.getGeometry().intersectsCoordinate(t)) + return e(s); + }); + } + forEachFeatureInExtent(t, e) { + if (this.featuresRtree_) + return this.featuresRtree_.forEachInExtent(t, e); + this.featuresCollection_ && this.featuresCollection_.forEach(e); + } + forEachFeatureIntersectingExtent(t, e) { + return this.forEachFeatureInExtent( + t, + function(i) { + if (i.getGeometry().intersectsExtent(t)) { + const r = e(i); + if (r) + return r; + } + } + ); + } + getFeaturesCollection() { + return this.featuresCollection_; + } + getFeatures() { + let t; + return this.featuresCollection_ ? t = this.featuresCollection_.getArray().slice(0) : this.featuresRtree_ && (t = this.featuresRtree_.getAll(), Hn(this.nullGeometryFeatures_) || Qt(t, Object.values(this.nullGeometryFeatures_))), t; + } + getFeaturesAtCoordinate(t) { + const e = []; + return this.forEachFeatureAtCoordinateDirect(t, function(i) { + e.push(i); + }), e; + } + getFeaturesInExtent(t, e) { + if (this.featuresRtree_) { + if (!(e && e.canWrapX() && this.getWrapX())) + return this.featuresRtree_.getInExtent(t); + const s = e0(t, e); + return [].concat( + ...s.map((r) => this.featuresRtree_.getInExtent(r)) + ); + } else + return this.featuresCollection_ ? this.featuresCollection_.getArray().slice(0) : []; + } + getClosestFeatureToCoordinate(t, e) { + const i = t[0], s = t[1]; + let r = null; + const o = [NaN, NaN]; + let a = 1 / 0; + const l = [-1 / 0, -1 / 0, 1 / 0, 1 / 0]; + return e = e || en, this.featuresRtree_.forEachInExtent( + l, + function(h) { + if (e(h)) { + const c = h.getGeometry(), u = a; + if (a = c.closestPointXY( + i, + s, + o, + a + ), a < u) { + r = h; + const d = Math.sqrt(a); + l[0] = i - d, l[1] = s - d, l[2] = i + d, l[3] = s + d; + } + } + } + ), r; + } + getExtent(t) { + return this.featuresRtree_.getExtent(t); + } + getFeatureById(t) { + const e = this.idIndex_[t.toString()]; + return e !== void 0 ? e : null; + } + getFeatureByUid(t) { + const e = this.uidIndex_[t]; + return e !== void 0 ? e : null; + } + getFormat() { + return this.format_; + } + getOverlaps() { + return this.overlaps_; + } + getUrl() { + return this.url_; + } + handleFeatureChange_(t) { + const e = t.target, i = q(e), s = e.getGeometry(); + if (!s) + i in this.nullGeometryFeatures_ || (this.featuresRtree_ && this.featuresRtree_.remove(e), this.nullGeometryFeatures_[i] = e); + else { + const o = s.getExtent(); + i in this.nullGeometryFeatures_ ? (delete this.nullGeometryFeatures_[i], this.featuresRtree_ && this.featuresRtree_.insert(o, e)) : this.featuresRtree_ && this.featuresRtree_.update(o, e); + } + const r = e.getId(); + if (r !== void 0) { + const o = r.toString(); + this.idIndex_[o] !== e && (this.removeFromIdIndex_(e), this.idIndex_[o] = e); + } else + this.removeFromIdIndex_(e), this.uidIndex_[i] = e; + this.changed(), this.dispatchEvent( + new pi(jt.CHANGEFEATURE, e) + ); + } + hasFeature(t) { + const e = t.getId(); + return e !== void 0 ? e in this.idIndex_ : q(t) in this.uidIndex_; + } + isEmpty() { + return this.featuresRtree_ ? this.featuresRtree_.isEmpty() && Hn(this.nullGeometryFeatures_) : this.featuresCollection_ ? this.featuresCollection_.getLength() === 0 : !0; + } + loadFeatures(t, e, i) { + const s = this.loadedExtentsRtree_, r = this.strategy_(t, e, i); + for (let o = 0, a = r.length; o < a; ++o) { + const l = r[o]; + s.forEachInExtent( + l, + function(c) { + return Vi(c.extent, l); + } + ) || (++this.loadingExtentsCount_, this.dispatchEvent( + new pi(jt.FEATURESLOADSTART) + ), this.loader_.call( + this, + l, + e, + i, + function(c) { + --this.loadingExtentsCount_, this.dispatchEvent( + new pi( + jt.FEATURESLOADEND, + void 0, + c + ) + ); + }.bind(this), + function() { + --this.loadingExtentsCount_, this.dispatchEvent( + new pi(jt.FEATURESLOADERROR) + ); + }.bind(this) + ), s.insert(l, { extent: l.slice() })); + } + this.loading = this.loader_.length < 4 ? !1 : this.loadingExtentsCount_ > 0; + } + refresh() { + this.clear(!0), this.loadedExtentsRtree_.clear(), super.refresh(); + } + removeLoadedExtent(t) { + const e = this.loadedExtentsRtree_; + let i; + e.forEachInExtent(t, function(s) { + if (Fs(s.extent, t)) + return i = s, !0; + }), i && e.remove(i); + } + removeFeature(t) { + if (!t) + return; + const e = q(t); + e in this.nullGeometryFeatures_ ? delete this.nullGeometryFeatures_[e] : this.featuresRtree_ && this.featuresRtree_.remove(t), this.removeFeatureInternal(t) && this.changed(); + } + removeFeatureInternal(t) { + const e = q(t), i = this.featureChangeKeys_[e]; + if (!i) + return; + i.forEach(mt), delete this.featureChangeKeys_[e]; + const s = t.getId(); + return s !== void 0 && delete this.idIndex_[s.toString()], delete this.uidIndex_[e], this.dispatchEvent( + new pi(jt.REMOVEFEATURE, t) + ), t; + } + removeFromIdIndex_(t) { + let e = !1; + for (const i in this.idIndex_) + if (this.idIndex_[i] === t) { + delete this.idIndex_[i], e = !0; + break; + } + return e; + } + setLoader(t) { + this.loader_ = t; + } + setUrl(t) { + Y(this.format_, 7), this.url_ = t, this.setLoader(xc(t, this.format_)); + } +} +const Ve = k_; +class G_ extends So { + constructor(t, e, i) { + super(), i = i || {}, this.tileCoord = t, this.state = e, this.interimTile = null, this.key = "", this.transition_ = i.transition === void 0 ? 250 : i.transition, this.transitionStarts_ = {}, this.interpolate = !!i.interpolate; + } + changed() { + this.dispatchEvent(U.CHANGE); + } + release() { + this.state === z.ERROR && this.setState(z.EMPTY); + } + getKey() { + return this.key + "/" + this.tileCoord; + } + getInterimTile() { + if (!this.interimTile) + return this; + let t = this.interimTile; + do { + if (t.getState() == z.LOADED) + return this.transition_ = 0, t; + t = t.interimTile; + } while (t); + return this; + } + refreshInterimChain() { + if (!this.interimTile) + return; + let t = this.interimTile, e = this; + do { + if (t.getState() == z.LOADED) { + t.interimTile = null; + break; + } else + t.getState() == z.LOADING ? e = t : t.getState() == z.IDLE ? e.interimTile = t.interimTile : e = t; + t = e.interimTile; + } while (t); + } + getTileCoord() { + return this.tileCoord; + } + getState() { + return this.state; + } + setState(t) { + if (this.state !== z.ERROR && this.state > t) + throw new Error("Tile load sequence violation"); + this.state = t, this.changed(); + } + load() { + H(); + } + getAlpha(t, e) { + if (!this.transition_) + return 1; + let i = this.transitionStarts_[t]; + if (!i) + i = e, this.transitionStarts_[t] = i; + else if (i === -1) + return 1; + const s = e - i + 1e3 / 60; + return s >= this.transition_ ? 1 : yd(s / this.transition_); + } + inTransition(t) { + return this.transition_ ? this.transitionStarts_[t] !== -1 : !1; + } + endTransition(t) { + this.transition_ && (this.transitionStarts_[t] = -1); + } +} +const Jd = G_; +class $_ extends Jd { + constructor(t, e, i, s, r, o) { + super(t, e, o), this.crossOrigin_ = s, this.src_ = i, this.key = i, this.image_ = new Image(), s !== null && (this.image_.crossOrigin = s), this.unlisten_ = null, this.tileLoadFunction_ = r; + } + getImage() { + return this.image_; + } + setImage(t) { + this.image_ = t, this.state = z.LOADED, this.unlistenImage_(), this.changed(); + } + handleImageError_() { + this.state = z.ERROR, this.unlistenImage_(), this.image_ = B_(), this.changed(); + } + handleImageLoad_() { + const t = this.image_; + t.naturalWidth && t.naturalHeight ? this.state = z.LOADED : this.state = z.EMPTY, this.unlistenImage_(), this.changed(); + } + load() { + this.state == z.ERROR && (this.state = z.IDLE, this.image_ = new Image(), this.crossOrigin_ !== null && (this.image_.crossOrigin = this.crossOrigin_)), this.state == z.IDLE && (this.state = z.LOADING, this.changed(), this.tileLoadFunction_(this, this.src_), this.unlisten_ = Hd( + this.image_, + this.handleImageLoad_.bind(this), + this.handleImageError_.bind(this) + )); + } + unlistenImage_() { + this.unlisten_ && (this.unlisten_(), this.unlisten_ = null); + } +} +function B_() { + const n = pe(1, 1); + return n.fillStyle = "rgba(0,0,0,0)", n.fillRect(0, 0, 1, 1), n.canvas; +} +const Qd = $_; +class z_ { + constructor(t) { + this.highWaterMark = t !== void 0 ? t : 2048, this.count_ = 0, this.entries_ = {}, this.oldest_ = null, this.newest_ = null; + } + canExpireCache() { + return this.highWaterMark > 0 && this.getCount() > this.highWaterMark; + } + expireCache(t) { + for (; this.canExpireCache(); ) + this.pop(); + } + clear() { + this.count_ = 0, this.entries_ = {}, this.oldest_ = null, this.newest_ = null; + } + containsKey(t) { + return this.entries_.hasOwnProperty(t); + } + forEach(t) { + let e = this.oldest_; + for (; e; ) + t(e.value_, e.key_, this), e = e.newer; + } + get(t, e) { + const i = this.entries_[t]; + return Y(i !== void 0, 15), i === this.newest_ || (i === this.oldest_ ? (this.oldest_ = this.oldest_.newer, this.oldest_.older = null) : (i.newer.older = i.older, i.older.newer = i.newer), i.newer = null, i.older = this.newest_, this.newest_.newer = i, this.newest_ = i), i.value_; + } + remove(t) { + const e = this.entries_[t]; + return Y(e !== void 0, 15), e === this.newest_ ? (this.newest_ = e.older, this.newest_ && (this.newest_.newer = null)) : e === this.oldest_ ? (this.oldest_ = e.newer, this.oldest_ && (this.oldest_.older = null)) : (e.newer.older = e.older, e.older.newer = e.newer), delete this.entries_[t], --this.count_, e.value_; + } + getCount() { + return this.count_; + } + getKeys() { + const t = new Array(this.count_); + let e = 0, i; + for (i = this.newest_; i; i = i.older) + t[e++] = i.key_; + return t; + } + getValues() { + const t = new Array(this.count_); + let e = 0, i; + for (i = this.newest_; i; i = i.older) + t[e++] = i.value_; + return t; + } + peekLast() { + return this.oldest_.value_; + } + peekLastKey() { + return this.oldest_.key_; + } + peekFirstKey() { + return this.newest_.key_; + } + peek(t) { + if (!!this.containsKey(t)) + return this.entries_[t].value_; + } + pop() { + const t = this.oldest_; + return delete this.entries_[t.key_], t.newer && (t.newer.older = null), this.oldest_ = t.newer, this.oldest_ || (this.newest_ = null), --this.count_, t.value_; + } + replace(t, e) { + this.get(t), this.entries_[t].value_ = e; + } + set(t, e) { + Y(!(t in this.entries_), 16); + const i = { + key_: t, + newer: null, + older: this.newest_, + value_: e + }; + this.newest_ ? this.newest_.newer = i : this.oldest_ = i, this.newest_ = i, this.entries_[t] = i, ++this.count_; + } + setSize(t) { + this.highWaterMark = t; + } +} +const Z_ = z_; +function Cc(n, t, e, i) { + return i !== void 0 ? (i[0] = n, i[1] = t, i[2] = e, i) : [n, t, e]; +} +function ko(n, t, e) { + return n + "/" + t + "/" + e; +} +function tf(n) { + return ko(n[0], n[1], n[2]); +} +function V_(n) { + return n.split("/").map(Number); +} +function U_(n) { + return (n[1] << n[0]) + n[2]; +} +function W_(n, t) { + const e = n[0], i = n[1], s = n[2]; + if (t.getMinZoom() > e || e > t.getMaxZoom()) + return !1; + const r = t.getFullTileRange(e); + return r ? r.containsXY(i, s) : !0; +} +class H_ extends Z_ { + clear() { + for (; this.getCount() > 0; ) + this.pop().release(); + super.clear(); + } + expireCache(t) { + for (; this.canExpireCache() && !(this.peekLast().getKey() in t); ) + this.pop().release(); + } + pruneExceptNewestZ() { + if (this.getCount() === 0) + return; + const t = this.peekFirstKey(), i = V_(t)[0]; + this.forEach( + function(s) { + s.tileCoord[0] !== i && (this.remove(tf(s.tileCoord)), s.release()); + }.bind(this) + ); + } +} +const ef = H_; +class nf { + constructor(t, e, i, s) { + this.minX = t, this.maxX = e, this.minY = i, this.maxY = s; + } + contains(t) { + return this.containsXY(t[1], t[2]); + } + containsTileRange(t) { + return this.minX <= t.minX && t.maxX <= this.maxX && this.minY <= t.minY && t.maxY <= this.maxY; + } + containsXY(t, e) { + return this.minX <= t && t <= this.maxX && this.minY <= e && e <= this.maxY; + } + equals(t) { + return this.minX == t.minX && this.minY == t.minY && this.maxX == t.maxX && this.maxY == t.maxY; + } + extend(t) { + t.minX < this.minX && (this.minX = t.minX), t.maxX > this.maxX && (this.maxX = t.maxX), t.minY < this.minY && (this.minY = t.minY), t.maxY > this.maxY && (this.maxY = t.maxY); + } + getHeight() { + return this.maxY - this.minY + 1; + } + getSize() { + return [this.getWidth(), this.getHeight()]; + } + getWidth() { + return this.maxX - this.minX + 1; + } + intersects(t) { + return this.minX <= t.maxX && this.maxX >= t.minX && this.minY <= t.maxY && this.maxY >= t.minY; + } +} +function wn(n, t, e, i, s) { + return s !== void 0 ? (s.minX = n, s.maxX = t, s.minY = e, s.maxY = i, s) : new nf(n, t, e, i); +} +const sf = nf, Mc = [ + "fullscreenchange", + "webkitfullscreenchange", + "MSFullscreenChange" +], Ec = { + ENTERFULLSCREEN: "enterfullscreen", + LEAVEFULLSCREEN: "leavefullscreen" +}; +class X_ extends Gt { + constructor(t) { + t = t || {}, super({ + element: document.createElement("div"), + target: t.target + }), this.on, this.once, this.un, this.keys_ = t.keys !== void 0 ? t.keys : !1, this.source_ = t.source, this.isInFullscreen_ = !1, this.boundHandleMapTargetChange_ = this.handleMapTargetChange_.bind(this), this.cssClassName_ = t.className !== void 0 ? t.className : "ol-full-screen", this.documentListeners_ = [], this.activeClassName_ = t.activeClassName !== void 0 ? t.activeClassName.split(" ") : [this.cssClassName_ + "-true"], this.inactiveClassName_ = t.inactiveClassName !== void 0 ? t.inactiveClassName.split(" ") : [this.cssClassName_ + "-false"]; + const e = t.label !== void 0 ? t.label : "\u2922"; + this.labelNode_ = typeof e == "string" ? document.createTextNode(e) : e; + const i = t.labelActive !== void 0 ? t.labelActive : "\xD7"; + this.labelActiveNode_ = typeof i == "string" ? document.createTextNode(i) : i; + const s = t.tipLabel ? t.tipLabel : "Toggle full-screen"; + this.button_ = document.createElement("button"), this.button_.title = s, this.button_.setAttribute("type", "button"), this.button_.appendChild(this.labelNode_), this.button_.addEventListener( + U.CLICK, + this.handleClick_.bind(this), + !1 + ), this.setClassName_(this.button_, this.isInFullscreen_), this.element.className = `${this.cssClassName_} ${ss} ${Ao}`, this.element.appendChild(this.button_); + } + handleClick_(t) { + t.preventDefault(), this.handleFullScreen_(); + } + handleFullScreen_() { + const t = this.getMap(); + if (!t) + return; + const e = t.getOwnerDocument(); + if (!!wc(e)) + if (Sc(e)) + j_(e); + else { + let i; + this.source_ ? i = typeof this.source_ == "string" ? e.getElementById(this.source_) : this.source_ : i = t.getTargetElement(), this.keys_ ? Y_(i) : rf(i); + } + } + handleFullScreenChange_() { + const t = this.getMap(); + if (!t) + return; + const e = this.isInFullscreen_; + this.isInFullscreen_ = Sc(t.getOwnerDocument()), e !== this.isInFullscreen_ && (this.setClassName_(this.button_, this.isInFullscreen_), this.isInFullscreen_ ? (io(this.labelActiveNode_, this.labelNode_), this.dispatchEvent(Ec.ENTERFULLSCREEN)) : (io(this.labelNode_, this.labelActiveNode_), this.dispatchEvent(Ec.LEAVEFULLSCREEN)), t.updateSize()); + } + setClassName_(t, e) { + e ? (t.classList.remove(...this.inactiveClassName_), t.classList.add(...this.activeClassName_)) : (t.classList.remove(...this.activeClassName_), t.classList.add(...this.inactiveClassName_)); + } + setMap(t) { + const e = this.getMap(); + e && e.removeChangeListener( + Ot.TARGET, + this.boundHandleMapTargetChange_ + ), super.setMap(t), this.handleMapTargetChange_(), t && t.addChangeListener( + Ot.TARGET, + this.boundHandleMapTargetChange_ + ); + } + handleMapTargetChange_() { + const t = this.documentListeners_; + for (let i = 0, s = t.length; i < s; ++i) + mt(t[i]); + t.length = 0; + const e = this.getMap(); + if (e) { + const i = e.getOwnerDocument(); + wc(i) ? this.element.classList.remove(Vh) : this.element.classList.add(Vh); + for (let s = 0, r = Mc.length; s < r; ++s) + t.push( + et(i, Mc[s], this.handleFullScreenChange_, this) + ); + this.handleFullScreenChange_(); + } + } +} +function wc(n) { + const t = n.body; + return !!(t.webkitRequestFullscreen || t.requestFullscreen && n.fullscreenEnabled); +} +function Sc(n) { + return !!(n.webkitIsFullScreen || n.fullscreenElement); +} +function rf(n) { + n.requestFullscreen ? n.requestFullscreen() : n.webkitRequestFullscreen && n.webkitRequestFullscreen(); +} +function Y_(n) { + n.webkitRequestFullscreen ? n.webkitRequestFullscreen() : rf(n); +} +function j_(n) { + n.exitFullscreen ? n.exitFullscreen() : n.webkitExitFullscreen && n.webkitExitFullscreen(); +} +const q_ = X_, ga = "units", K_ = [1, 2, 5], _s = 25.4 / 0.28; +class J_ extends Gt { + constructor(t) { + t = t || {}; + const e = document.createElement("div"); + e.style.pointerEvents = "none", super({ + element: e, + render: t.render, + target: t.target + }), this.on, this.once, this.un; + const i = t.className !== void 0 ? t.className : t.bar ? "ol-scale-bar" : "ol-scale-line"; + this.innerElement_ = document.createElement("div"), this.innerElement_.className = i + "-inner", this.element.className = i + " " + ss, this.element.appendChild(this.innerElement_), this.viewState_ = null, this.minWidth_ = t.minWidth !== void 0 ? t.minWidth : 64, this.maxWidth_ = t.maxWidth, this.renderedVisible_ = !1, this.renderedWidth_ = void 0, this.renderedHTML_ = "", this.addChangeListener(ga, this.handleUnitsChanged_), this.setUnits(t.units || "metric"), this.scaleBar_ = t.bar || !1, this.scaleBarSteps_ = t.steps || 4, this.scaleBarText_ = t.text || !1, this.dpi_ = t.dpi || void 0; + } + getUnits() { + return this.get(ga); + } + handleUnitsChanged_() { + this.updateElement_(); + } + setUnits(t) { + this.set(ga, t); + } + setDpi(t) { + this.dpi_ = t; + } + updateElement_() { + const t = this.viewState_; + if (!t) { + this.renderedVisible_ && (this.element.style.display = "none", this.renderedVisible_ = !1); + return; + } + const e = t.center, i = t.projection, s = this.getUnits(), r = s == "degrees" ? "degrees" : "m"; + let o = ao( + i, + t.resolution, + e, + r + ); + const a = this.minWidth_ * (this.dpi_ || _s) / _s, l = this.maxWidth_ !== void 0 ? this.maxWidth_ * (this.dpi_ || _s) / _s : void 0; + let h = a * o, c = ""; + if (s == "degrees") { + const v = Yn.degrees; + h *= v, h < v / 60 ? (c = "\u2033", o *= 3600) : h < v ? (c = "\u2032", o *= 60) : c = "\xB0"; + } else + s == "imperial" ? h < 0.9144 ? (c = "in", o /= 0.0254) : h < 1609.344 ? (c = "ft", o /= 0.3048) : (c = "mi", o /= 1609.344) : s == "nautical" ? (o /= 1852, c = "NM") : s == "metric" ? h < 1e-3 ? (c = "\u03BCm", o *= 1e6) : h < 1 ? (c = "mm", o *= 1e3) : h < 1e3 ? c = "m" : (c = "km", o /= 1e3) : s == "us" ? h < 0.9144 ? (c = "in", o *= 39.37) : h < 1609.344 ? (c = "ft", o /= 0.30480061) : (c = "mi", o /= 1609.3472) : Y(!1, 33); + let u = 3 * Math.floor(Math.log(a * o) / Math.log(10)), d, f, g, m, _, y; + for (; ; ) { + g = Math.floor(u / 3); + const v = Math.pow(10, g); + if (d = K_[(u % 3 + 3) % 3] * v, f = Math.round(d / o), isNaN(f)) { + this.element.style.display = "none", this.renderedVisible_ = !1; + return; + } + if (l !== void 0 && f >= l) { + d = m, f = _, g = y; + break; + } else if (f >= a) + break; + m = d, _ = f, y = g, ++u; + } + const p = this.scaleBar_ ? this.createScaleBar(f, d, c) : d.toFixed(g < 0 ? -g : 0) + " " + c; + this.renderedHTML_ != p && (this.innerElement_.innerHTML = p, this.renderedHTML_ = p), this.renderedWidth_ != f && (this.innerElement_.style.width = f + "px", this.renderedWidth_ = f), this.renderedVisible_ || (this.element.style.display = "", this.renderedVisible_ = !0); + } + createScaleBar(t, e, i) { + const s = this.getScaleForResolution(), r = s < 1 ? Math.round(1 / s).toLocaleString() + " : 1" : "1 : " + Math.round(s).toLocaleString(), o = this.scaleBarSteps_, a = t / o, l = [this.createMarker("absolute")]; + for (let c = 0; c < o; ++c) { + const u = c % 2 === 0 ? "ol-scale-singlebar-odd" : "ol-scale-singlebar-even"; + l.push( + `
` + this.createMarker("relative") + (c % 2 === 0 || o === 2 ? this.createStepText(c, t, !1, e, i) : "") + "
" + ); + } + return l.push(this.createStepText(o, t, !0, e, i)), (this.scaleBarText_ ? `
` + r + "
" : "") + l.join(""); + } + createMarker(t) { + return `
`; + } + createStepText(t, e, i, s, r) { + const a = (t === 0 ? 0 : Math.round(s / this.scaleBarSteps_ * t * 100) / 100) + (t === 0 ? "" : " " + r), l = t === 0 ? -3 : e / this.scaleBarSteps_ * -1, h = t === 0 ? 0 : e / this.scaleBarSteps_ * 2; + return `
` + a + "
"; + } + getScaleForResolution() { + const t = ao( + this.viewState_.projection, + this.viewState_.resolution, + this.viewState_.center, + "m" + ), e = this.dpi_ || _s, i = 1e3 / 25.4; + return t * i * e; + } + render(t) { + const e = t.frameState; + e ? this.viewState_ = e.viewState : this.viewState_ = null, this.updateElement_(); + } +} +const Q_ = J_; +class Go extends Di { + constructor(t, e, i) { + super(), i !== void 0 && e === void 0 ? this.setFlatCoordinates(i, t) : (e = e || 0, this.setCenterAndRadius(t, e, i)); + } + clone() { + const t = new Go( + this.flatCoordinates.slice(), + void 0, + this.layout + ); + return t.applyProperties(this), t; + } + closestPointXY(t, e, i, s) { + const r = this.flatCoordinates, o = t - r[0], a = e - r[1], l = o * o + a * a; + if (l < s) { + if (l === 0) + for (let h = 0; h < this.stride; ++h) + i[h] = r[h]; + else { + const h = this.getRadius() / Math.sqrt(l); + i[0] = r[0] + h * o, i[1] = r[1] + h * a; + for (let c = 2; c < this.stride; ++c) + i[c] = r[c]; + } + return i.length = this.stride, l; + } else + return s; + } + containsXY(t, e) { + const i = this.flatCoordinates, s = t - i[0], r = e - i[1]; + return s * s + r * r <= this.getRadiusSquared_(); + } + getCenter() { + return this.flatCoordinates.slice(0, this.stride); + } + computeExtent(t) { + const e = this.flatCoordinates, i = e[this.stride] - e[0]; + return _e( + e[0] - i, + e[1] - i, + e[0] + i, + e[1] + i, + t + ); + } + getRadius() { + return Math.sqrt(this.getRadiusSquared_()); + } + getRadiusSquared_() { + const t = this.flatCoordinates[this.stride] - this.flatCoordinates[0], e = this.flatCoordinates[this.stride + 1] - this.flatCoordinates[1]; + return t * t + e * e; + } + getType() { + return "Circle"; + } + intersectsExtent(t) { + const e = this.getExtent(); + if (Kt(t, e)) { + const i = this.getCenter(); + return t[0] <= i[0] && t[2] >= i[0] || t[1] <= i[1] && t[3] >= i[1] ? !0 : yl(t, this.intersectsCoordinate.bind(this)); + } + return !1; + } + setCenter(t) { + const e = this.stride, i = this.flatCoordinates[e] - this.flatCoordinates[0], s = t.slice(); + s[e] = s[0] + i; + for (let r = 1; r < e; ++r) + s[e + r] = t[r]; + this.setFlatCoordinates(this.layout, s), this.changed(); + } + setCenterAndRadius(t, e, i) { + this.setLayout(i, t, 0), this.flatCoordinates || (this.flatCoordinates = []); + const s = this.flatCoordinates; + let r = Cd(s, 0, t, this.stride); + s[r++] = s[0] + e; + for (let o = 1, a = this.stride; o < a; ++o) + s[r++] = s[o]; + s.length = r, this.changed(); + } + getCoordinates() { + return null; + } + setCoordinates(t, e) { + } + setRadius(t) { + this.flatCoordinates[this.stride] = this.flatCoordinates[0] + t, this.changed(); + } + rotate(t, e) { + const i = this.getCenter(), s = this.getStride(); + this.setCenter( + Fl(i, 0, i.length, s, t, e, i) + ), this.changed(); + } + translate(t, e) { + const i = this.getCenter(), s = this.getStride(); + this.setCenter( + vd(i, 0, i.length, s, t, e, i) + ), this.changed(); + } +} +Go.prototype.transform; +const t2 = Go; +class go extends xd { + constructor(t) { + super(), this.geometries_ = t || null, this.changeEventsKeys_ = [], this.listenGeometriesChange_(); + } + unlistenGeometriesChange_() { + this.changeEventsKeys_.forEach(mt), this.changeEventsKeys_.length = 0; + } + listenGeometriesChange_() { + if (!!this.geometries_) + for (let t = 0, e = this.geometries_.length; t < e; ++t) + this.changeEventsKeys_.push( + et(this.geometries_[t], U.CHANGE, this.changed, this) + ); + } + clone() { + const t = new go(null); + return t.setGeometries(this.geometries_), t.applyProperties(this), t; + } + closestPointXY(t, e, i, s) { + if (s < dn(this.getExtent(), t, e)) + return s; + const r = this.geometries_; + for (let o = 0, a = r.length; o < a; ++o) + s = r[o].closestPointXY( + t, + e, + i, + s + ); + return s; + } + containsXY(t, e) { + const i = this.geometries_; + for (let s = 0, r = i.length; s < r; ++s) + if (i[s].containsXY(t, e)) + return !0; + return !1; + } + computeExtent(t) { + Qs(t); + const e = this.geometries_; + for (let i = 0, s = e.length; i < s; ++i) + Ku(t, e[i].getExtent()); + return t; + } + getGeometries() { + return Rc(this.geometries_); + } + getGeometriesArray() { + return this.geometries_; + } + getGeometriesArrayRecursive() { + let t = []; + const e = this.geometries_; + for (let i = 0, s = e.length; i < s; ++i) + e[i].getType() === this.getType() ? t = t.concat( + e[i].getGeometriesArrayRecursive() + ) : t.push(e[i]); + return t; + } + getSimplifiedGeometry(t) { + if (this.simplifiedGeometryRevision !== this.getRevision() && (this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = this.getRevision()), t < 0 || this.simplifiedGeometryMaxMinSquaredTolerance !== 0 && t < this.simplifiedGeometryMaxMinSquaredTolerance) + return this; + const e = [], i = this.geometries_; + let s = !1; + for (let r = 0, o = i.length; r < o; ++r) { + const a = i[r], l = a.getSimplifiedGeometry(t); + e.push(l), l !== a && (s = !0); + } + if (s) { + const r = new go(null); + return r.setGeometriesArray(e), r; + } else + return this.simplifiedGeometryMaxMinSquaredTolerance = t, this; + } + getType() { + return "GeometryCollection"; + } + intersectsExtent(t) { + const e = this.geometries_; + for (let i = 0, s = e.length; i < s; ++i) + if (e[i].intersectsExtent(t)) + return !0; + return !1; + } + isEmpty() { + return this.geometries_.length === 0; + } + rotate(t, e) { + const i = this.geometries_; + for (let s = 0, r = i.length; s < r; ++s) + i[s].rotate(t, e); + this.changed(); + } + scale(t, e, i) { + i || (i = Pi(this.getExtent())); + const s = this.geometries_; + for (let r = 0, o = s.length; r < o; ++r) + s[r].scale(t, e, i); + this.changed(); + } + setGeometries(t) { + this.setGeometriesArray(Rc(t)); + } + setGeometriesArray(t) { + this.unlistenGeometriesChange_(), this.geometries_ = t, this.listenGeometriesChange_(), this.changed(); + } + applyTransform(t) { + const e = this.geometries_; + for (let i = 0, s = e.length; i < s; ++i) + e[i].applyTransform(t); + this.changed(); + } + translate(t, e) { + const i = this.geometries_; + for (let s = 0, r = i.length; s < r; ++s) + i[s].translate(t, e); + this.changed(); + } + disposeInternal() { + this.unlistenGeometriesChange_(), super.disposeInternal(); + } +} +function Rc(n) { + const t = []; + for (let e = 0, i = n.length; e < i; ++e) + t.push(n[e].clone()); + return t; +} +const of = go; +class mo extends Di { + constructor(t, e, i) { + if (super(), this.ends_ = [], this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, Array.isArray(t[0])) + this.setCoordinates( + t, + e + ); + else if (e !== void 0 && i) + this.setFlatCoordinates( + e, + t + ), this.ends_ = i; + else { + let s = this.getLayout(); + const r = t, o = [], a = []; + for (let l = 0, h = r.length; l < h; ++l) { + const c = r[l]; + l === 0 && (s = c.getLayout()), Qt(o, c.getFlatCoordinates()), a.push(o.length); + } + this.setFlatCoordinates(s, o), this.ends_ = a; + } + } + appendLineString(t) { + this.flatCoordinates ? Qt(this.flatCoordinates, t.getFlatCoordinates().slice()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed(); + } + clone() { + const t = new mo( + this.flatCoordinates.slice(), + this.layout, + this.ends_.slice() + ); + return t.applyProperties(this), t; + } + closestPointXY(t, e, i, s) { + return s < dn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( + Dl( + this.flatCoordinates, + 0, + this.ends_, + this.stride, + 0 + ) + ), this.maxDeltaRevision_ = this.getRevision()), Gl( + this.flatCoordinates, + 0, + this.ends_, + this.stride, + this.maxDelta_, + !1, + t, + e, + i, + s + )); + } + getCoordinateAtM(t, e, i) { + return this.layout != "XYM" && this.layout != "XYZM" || this.flatCoordinates.length === 0 ? null : (e = e !== void 0 ? e : !1, i = i !== void 0 ? i : !1, Tm( + this.flatCoordinates, + 0, + this.ends_, + this.stride, + t, + e, + i + )); + } + getCoordinates() { + return Zs( + this.flatCoordinates, + 0, + this.ends_, + this.stride + ); + } + getEnds() { + return this.ends_; + } + getLineString(t) { + return t < 0 || this.ends_.length <= t ? null : new li( + this.flatCoordinates.slice( + t === 0 ? 0 : this.ends_[t - 1], + this.ends_[t] + ), + this.layout + ); + } + getLineStrings() { + const t = this.flatCoordinates, e = this.ends_, i = this.layout, s = []; + let r = 0; + for (let o = 0, a = e.length; o < a; ++o) { + const l = e[o], h = new li( + t.slice(r, l), + i + ); + s.push(h), r = l; + } + return s; + } + getFlatMidpoints() { + const t = [], e = this.flatCoordinates; + let i = 0; + const s = this.ends_, r = this.stride; + for (let o = 0, a = s.length; o < a; ++o) { + const l = s[o], h = $d( + e, + i, + l, + r, + 0.5 + ); + Qt(t, h), i = l; + } + return t; + } + getSimplifiedGeometryInternal(t) { + const e = [], i = []; + return e.length = g1( + this.flatCoordinates, + 0, + this.ends_, + this.stride, + t, + e, + 0, + i + ), new mo(e, "XY", i); + } + getType() { + return "MultiLineString"; + } + intersectsExtent(t) { + return C1( + this.flatCoordinates, + 0, + this.ends_, + this.stride, + t + ); + } + setCoordinates(t, e) { + this.setLayout(e, t, 2), this.flatCoordinates || (this.flatCoordinates = []); + const i = $l( + this.flatCoordinates, + 0, + t, + this.stride, + this.ends_ + ); + this.flatCoordinates.length = i.length === 0 ? 0 : i[i.length - 1], this.changed(); + } +} +const sr = mo; +class th extends Di { + constructor(t, e) { + super(), e && !Array.isArray(t[0]) ? this.setFlatCoordinates( + e, + t + ) : this.setCoordinates( + t, + e + ); + } + appendPoint(t) { + this.flatCoordinates ? Qt(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.changed(); + } + clone() { + const t = new th( + this.flatCoordinates.slice(), + this.layout + ); + return t.applyProperties(this), t; + } + closestPointXY(t, e, i, s) { + if (s < dn(this.getExtent(), t, e)) + return s; + const r = this.flatCoordinates, o = this.stride; + for (let a = 0, l = r.length; a < l; a += o) { + const h = ri( + t, + e, + r[a], + r[a + 1] + ); + if (h < s) { + s = h; + for (let c = 0; c < o; ++c) + i[c] = r[a + c]; + i.length = o; + } + } + return s; + } + getCoordinates() { + return Ei( + this.flatCoordinates, + 0, + this.flatCoordinates.length, + this.stride + ); + } + getPoint(t) { + const e = this.flatCoordinates ? this.flatCoordinates.length / this.stride : 0; + return t < 0 || e <= t ? null : new Se( + this.flatCoordinates.slice( + t * this.stride, + (t + 1) * this.stride + ), + this.layout + ); + } + getPoints() { + const t = this.flatCoordinates, e = this.layout, i = this.stride, s = []; + for (let r = 0, o = t.length; r < o; r += i) { + const a = new Se(t.slice(r, r + i), e); + s.push(a); + } + return s; + } + getType() { + return "MultiPoint"; + } + intersectsExtent(t) { + const e = this.flatCoordinates, i = this.stride; + for (let s = 0, r = e.length; s < r; s += i) { + const o = e[s], a = e[s + 1]; + if (pl(t, o, a)) + return !0; + } + return !1; + } + setCoordinates(t, e) { + this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = No( + this.flatCoordinates, + 0, + t, + this.stride + ), this.changed(); + } +} +const $o = th; +function e2(n, t, e, i) { + const s = []; + let r = se(); + for (let o = 0, a = e.length; o < a; ++o) { + const l = e[o]; + r = qu( + n, + t, + l[0], + i + ), s.push((r[0] + r[2]) / 2, (r[1] + r[3]) / 2), t = l[l.length - 1]; + } + return s; +} +class _o extends Di { + constructor(t, e, i) { + if (super(), this.endss_ = [], this.flatInteriorPointsRevision_ = -1, this.flatInteriorPoints_ = null, this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, this.orientedRevision_ = -1, this.orientedFlatCoordinates_ = null, !i && !Array.isArray(t[0])) { + let s = this.getLayout(); + const r = t, o = [], a = []; + for (let l = 0, h = r.length; l < h; ++l) { + const c = r[l]; + l === 0 && (s = c.getLayout()); + const u = o.length, d = c.getEnds(); + for (let f = 0, g = d.length; f < g; ++f) + d[f] += u; + Qt(o, c.getFlatCoordinates()), a.push(d); + } + e = s, t = o, i = a; + } + e !== void 0 && i ? (this.setFlatCoordinates( + e, + t + ), this.endss_ = i) : this.setCoordinates( + t, + e + ); + } + appendPolygon(t) { + let e; + if (!this.flatCoordinates) + this.flatCoordinates = t.getFlatCoordinates().slice(), e = t.getEnds().slice(), this.endss_.push(); + else { + const i = this.flatCoordinates.length; + Qt(this.flatCoordinates, t.getFlatCoordinates()), e = t.getEnds().slice(); + for (let s = 0, r = e.length; s < r; ++s) + e[s] += i; + } + this.endss_.push(e), this.changed(); + } + clone() { + const t = this.endss_.length, e = new Array(t); + for (let s = 0; s < t; ++s) + e[s] = this.endss_[s].slice(); + const i = new _o( + this.flatCoordinates.slice(), + this.layout, + e + ); + return i.applyProperties(this), i; + } + closestPointXY(t, e, i, s) { + return s < dn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( + u1( + this.flatCoordinates, + 0, + this.endss_, + this.stride, + 0 + ) + ), this.maxDeltaRevision_ = this.getRevision()), d1( + this.getOrientedFlatCoordinates(), + 0, + this.endss_, + this.stride, + this.maxDelta_, + !0, + t, + e, + i, + s + )); + } + containsXY(t, e) { + return v1( + this.getOrientedFlatCoordinates(), + 0, + this.endss_, + this.stride, + t, + e + ); + } + getArea() { + return p1( + this.getOrientedFlatCoordinates(), + 0, + this.endss_, + this.stride + ); + } + getCoordinates(t) { + let e; + return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), sc( + e, + 0, + this.endss_, + this.stride, + t + )) : e = this.flatCoordinates, $a( + e, + 0, + this.endss_, + this.stride + ); + } + getEndss() { + return this.endss_; + } + getFlatInteriorPoints() { + if (this.flatInteriorPointsRevision_ != this.getRevision()) { + const t = e2( + this.flatCoordinates, + 0, + this.endss_, + this.stride + ); + this.flatInteriorPoints_ = x1( + this.getOrientedFlatCoordinates(), + 0, + this.endss_, + this.stride, + t + ), this.flatInteriorPointsRevision_ = this.getRevision(); + } + return this.flatInteriorPoints_; + } + getInteriorPoints() { + return new $o(this.getFlatInteriorPoints().slice(), "XYM"); + } + getOrientedFlatCoordinates() { + if (this.orientedRevision_ != this.getRevision()) { + const t = this.flatCoordinates; + w1(t, 0, this.endss_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = sc( + this.orientedFlatCoordinates_, + 0, + this.endss_, + this.stride + )), this.orientedRevision_ = this.getRevision(); + } + return this.orientedFlatCoordinates_; + } + getSimplifiedGeometryInternal(t) { + const e = [], i = []; + return e.length = _1( + this.flatCoordinates, + 0, + this.endss_, + this.stride, + Math.sqrt(t), + e, + 0, + i + ), new _o(e, "XY", i); + } + getPolygon(t) { + if (t < 0 || this.endss_.length <= t) + return null; + let e; + if (t === 0) + e = 0; + else { + const r = this.endss_[t - 1]; + e = r[r.length - 1]; + } + const i = this.endss_[t].slice(), s = i[i.length - 1]; + if (e !== 0) + for (let r = 0, o = i.length; r < o; ++r) + i[r] -= e; + return new Ai( + this.flatCoordinates.slice(e, s), + this.layout, + i + ); + } + getPolygons() { + const t = this.layout, e = this.flatCoordinates, i = this.endss_, s = []; + let r = 0; + for (let o = 0, a = i.length; o < a; ++o) { + const l = i[o].slice(), h = l[l.length - 1]; + if (r !== 0) + for (let u = 0, d = l.length; u < d; ++u) + l[u] -= r; + const c = new Ai( + e.slice(r, h), + t, + l + ); + s.push(c), r = h; + } + return s; + } + getType() { + return "MultiPolygon"; + } + intersectsExtent(t) { + return M1( + this.getOrientedFlatCoordinates(), + 0, + this.endss_, + this.stride, + t + ); + } + setCoordinates(t, e) { + this.setLayout(e, t, 3), this.flatCoordinates || (this.flatCoordinates = []); + const i = f1( + this.flatCoordinates, + 0, + t, + this.stride, + this.endss_ + ); + if (i.length === 0) + this.flatCoordinates.length = 0; + else { + const s = i[i.length - 1]; + this.flatCoordinates.length = s.length === 0 ? 0 : s[s.length - 1]; + } + this.changed(); + } +} +const rr = _o, Or = { + DRAWSTART: "drawstart", + DRAWEND: "drawend", + DRAWABORT: "drawabort" +}; +class Fr extends Re { + constructor(t, e) { + super(t), this.feature = e; + } +} +function i2(n, t) { + const e = []; + for (let i = 0; i < t.length; ++i) { + const r = t[i].getGeometry(); + af(n, r, e); + } + return e; +} +function Nr(n, t) { + return ri(n[0], n[1], t[0], t[1]); +} +function An(n, t) { + const e = n.length; + return t < 0 ? n[t + e] : t >= e ? n[t - e] : n[t]; +} +function Dr(n, t, e) { + let i, s; + t < e ? (i = t, s = e) : (i = e, s = t); + const r = Math.ceil(i), o = Math.floor(s); + if (r > o) { + const l = On(n, i), h = On(n, s); + return Nr(l, h); + } + let a = 0; + if (i < r) { + const l = On(n, i), h = An(n, r); + a += Nr(l, h); + } + if (o < s) { + const l = An(n, o), h = On(n, s); + a += Nr(l, h); + } + for (let l = r; l < o - 1; ++l) { + const h = An(n, l), c = An(n, l + 1); + a += Nr(h, c); + } + return a; +} +function af(n, t, e) { + if (t instanceof li) { + kr(n, t.getCoordinates(), !1, e); + return; + } + if (t instanceof sr) { + const i = t.getCoordinates(); + for (let s = 0, r = i.length; s < r; ++s) + kr(n, i[s], !1, e); + return; + } + if (t instanceof Ai) { + const i = t.getCoordinates(); + for (let s = 0, r = i.length; s < r; ++s) + kr(n, i[s], !0, e); + return; + } + if (t instanceof rr) { + const i = t.getCoordinates(); + for (let s = 0, r = i.length; s < r; ++s) { + const o = i[s]; + for (let a = 0, l = o.length; a < l; ++a) + kr(n, o[a], !0, e); + } + return; + } + if (t instanceof of) { + const i = t.getGeometries(); + for (let s = 0; s < i.length; ++s) + af(n, i[s], e); + return; + } +} +const ma = { index: -1, endIndex: NaN }; +function n2(n, t, e, i) { + const s = n[0], r = n[1]; + let o = 1 / 0, a = -1, l = NaN; + for (let u = 0; u < t.targets.length; ++u) { + const d = t.targets[u], f = d.coordinates; + let g = 1 / 0, m; + for (let _ = 0; _ < f.length - 1; ++_) { + const y = f[_], p = f[_ + 1], v = lf(s, r, y, p); + v.squaredDistance < g && (g = v.squaredDistance, m = _ + v.along); + } + g < o && (o = g, d.ring && t.targetIndex === u && (d.endIndex > d.startIndex ? m < d.startIndex && (m += f.length) : d.endIndex < d.startIndex && m > d.startIndex && (m -= f.length)), l = m, a = u); + } + const h = t.targets[a]; + let c = h.ring; + if (t.targetIndex === a && c) { + const u = On( + h.coordinates, + l + ), d = e.getPixelFromCoordinate(u); + eo(d, t.startPx) > i && (c = !1); + } + if (c) { + const u = h.coordinates, d = u.length, f = h.startIndex, g = l; + if (f < g) { + const m = Dr( + u, + f, + g + ); + Dr( + u, + f, + g - d + ) < m && (l -= d); + } else { + const m = Dr( + u, + f, + g + ); + Dr( + u, + f, + g + d + ) < m && (l += d); + } + } + return ma.index = a, ma.endIndex = l, ma; +} +function kr(n, t, e, i) { + const s = n[0], r = n[1]; + for (let o = 0, a = t.length - 1; o < a; ++o) { + const l = t[o], h = t[o + 1], c = lf(s, r, l, h); + if (c.squaredDistance === 0) { + const u = o + c.along; + i.push({ + coordinates: t, + ring: e, + startIndex: u, + endIndex: u + }); + return; + } + } +} +const _a = { along: 0, squaredDistance: 0 }; +function lf(n, t, e, i) { + const s = e[0], r = e[1], o = i[0], a = i[1], l = o - s, h = a - r; + let c = 0, u = s, d = r; + return (l !== 0 || h !== 0) && (c = Et(((n - s) * l + (t - r) * h) / (l * l + h * h), 0, 1), u += l * c, d += h * c), _a.along = c, _a.squaredDistance = xl(ri(n, t, u, d), 10), _a; +} +function On(n, t) { + const e = n.length; + let i = Math.floor(t); + const s = t - i; + i >= e ? i -= e : i < 0 && (i += e); + let r = i + 1; + r >= e && (r -= e); + const o = n[i], a = o[0], l = o[1], h = n[r], c = h[0] - a, u = h[1] - l; + return [a + c * s, l + u * s]; +} +class s2 extends ki { + constructor(t) { + const e = t; + e.stopDown || (e.stopDown = un), super(e), this.on, this.once, this.un, this.shouldHandle_ = !1, this.downPx_ = null, this.downTimeout_, this.lastDragTime_, this.pointerType_, this.freehand_ = !1, this.source_ = t.source ? t.source : null, this.features_ = t.features ? t.features : null, this.snapTolerance_ = t.snapTolerance ? t.snapTolerance : 12, this.type_ = t.type, this.mode_ = o2(this.type_), this.stopClick_ = !!t.stopClick, this.minPoints_ = t.minPoints ? t.minPoints : this.mode_ === "Polygon" ? 3 : 2, this.maxPoints_ = this.mode_ === "Circle" ? 2 : t.maxPoints ? t.maxPoints : 1 / 0, this.finishCondition_ = t.finishCondition ? t.finishCondition : en, this.geometryLayout_ = t.geometryLayout ? t.geometryLayout : "XY"; + let i = t.geometryFunction; + if (!i) { + const s = this.mode_; + if (s === "Circle") + i = function(r, o, a) { + const l = o || new t2([NaN, NaN]), h = vt(r[0]), c = oi( + h, + vt(r[r.length - 1]) + ); + return l.setCenterAndRadius( + h, + Math.sqrt(c), + this.geometryLayout_ + ), l; + }; + else { + let r; + s === "Point" ? r = Se : s === "LineString" ? r = li : s === "Polygon" && (r = Ai), i = function(o, a, l) { + return a ? s === "Polygon" ? o[0].length ? a.setCoordinates( + [o[0].concat([o[0][0]])], + this.geometryLayout_ + ) : a.setCoordinates([], this.geometryLayout_) : a.setCoordinates(o, this.geometryLayout_) : a = new r(o, this.geometryLayout_), a; + }; + } + } + this.geometryFunction_ = i, this.dragVertexDelay_ = t.dragVertexDelay !== void 0 ? t.dragVertexDelay : 500, this.finishCoordinate_ = null, this.sketchFeature_ = null, this.sketchPoint_ = null, this.sketchCoords_ = null, this.sketchLine_ = null, this.sketchLineCoords_ = null, this.squaredClickTolerance_ = t.clickTolerance ? t.clickTolerance * t.clickTolerance : 36, this.overlay_ = new Ze({ + source: new Ve({ + useSpatialIndex: !1, + wrapX: t.wrapX ? t.wrapX : !1 + }), + style: t.style ? t.style : r2(), + updateWhileInteracting: !0 + }), this.geometryName_ = t.geometryName, this.condition_ = t.condition ? t.condition : Wl, this.freehandCondition_, t.freehand ? this.freehandCondition_ = co : this.freehandCondition_ = t.freehandCondition ? t.freehandCondition : Fd, this.traceCondition_, this.setTrace(t.trace || !1), this.traceState_ = { active: !1 }, this.traceSource_ = t.traceSource || t.source || null, this.addChangeListener(Za.ACTIVE, this.updateState_); + } + setTrace(t) { + let e; + t ? t === !0 ? e = co : e = t : e = Y1, this.traceCondition_ = e; + } + setMap(t) { + super.setMap(t), this.updateState_(); + } + getOverlay() { + return this.overlay_; + } + handleEvent(t) { + t.originalEvent.type === U.CONTEXTMENU && t.originalEvent.preventDefault(), this.freehand_ = this.mode_ !== "Point" && this.freehandCondition_(t); + let e = t.type === nt.POINTERMOVE, i = !0; + return !this.freehand_ && this.lastDragTime_ && t.type === nt.POINTERDRAG && (Date.now() - this.lastDragTime_ >= this.dragVertexDelay_ ? (this.downPx_ = t.pixel, this.shouldHandle_ = !this.freehand_, e = !0) : this.lastDragTime_ = void 0, this.shouldHandle_ && this.downTimeout_ !== void 0 && (clearTimeout(this.downTimeout_), this.downTimeout_ = void 0)), this.freehand_ && t.type === nt.POINTERDRAG && this.sketchFeature_ !== null ? (this.addToDrawing_(t.coordinate), i = !1) : this.freehand_ && t.type === nt.POINTERDOWN ? i = !1 : e && this.getPointerCount() < 2 ? (i = t.type === nt.POINTERMOVE, i && this.freehand_ ? (this.handlePointerMove_(t), this.shouldHandle_ && t.originalEvent.preventDefault()) : (t.originalEvent.pointerType === "mouse" || t.type === nt.POINTERDRAG && this.downTimeout_ === void 0) && this.handlePointerMove_(t)) : t.type === nt.DBLCLICK && (i = !1), super.handleEvent(t) && i; + } + handleDownEvent(t) { + return this.shouldHandle_ = !this.freehand_, this.freehand_ ? (this.downPx_ = t.pixel, this.finishCoordinate_ || this.startDrawing_(t.coordinate), !0) : this.condition_(t) ? (this.lastDragTime_ = Date.now(), this.downTimeout_ = setTimeout( + function() { + this.handlePointerMove_( + new ei( + nt.POINTERMOVE, + t.map, + t.originalEvent, + !1, + t.frameState + ) + ); + }.bind(this), + this.dragVertexDelay_ + ), this.downPx_ = t.pixel, !0) : (this.lastDragTime_ = void 0, !1); + } + deactivateTrace_() { + this.traceState_ = { active: !1 }; + } + toggleTraceState_(t) { + if (!this.traceSource_ || !this.traceCondition_(t)) + return; + if (this.traceState_.active) { + this.deactivateTrace_(); + return; + } + const e = this.getMap(), i = e.getCoordinateFromPixel([ + t.pixel[0] - this.snapTolerance_, + t.pixel[1] + this.snapTolerance_ + ]), s = e.getCoordinateFromPixel([ + t.pixel[0] + this.snapTolerance_, + t.pixel[1] - this.snapTolerance_ + ]), r = Ut([i, s]), o = this.traceSource_.getFeaturesInExtent(r); + if (o.length === 0) + return; + const a = i2(t.coordinate, o); + a.length && (this.traceState_ = { + active: !0, + startPx: t.pixel.slice(), + targets: a, + targetIndex: -1 + }); + } + addOrRemoveTracedCoordinates_(t, e) { + const i = t.startIndex <= t.endIndex, s = t.startIndex <= e; + i === s ? i && e > t.endIndex || !i && e < t.endIndex ? this.addTracedCoordinates_(t, t.endIndex, e) : (i && e < t.endIndex || !i && e > t.endIndex) && this.removeTracedCoordinates_(e, t.endIndex) : (this.removeTracedCoordinates_(t.startIndex, t.endIndex), this.addTracedCoordinates_(t, t.startIndex, e)); + } + removeTracedCoordinates_(t, e) { + if (t === e) + return; + let i = 0; + if (t < e) { + const s = Math.ceil(t); + let r = Math.floor(e); + r === e && (r -= 1), i = r - s + 1; + } else { + const s = Math.floor(t); + let r = Math.ceil(e); + r === e && (r += 1), i = s - r + 1; + } + i > 0 && this.removeLastPoints_(i); + } + addTracedCoordinates_(t, e, i) { + if (e === i) + return; + const s = []; + if (e < i) { + const r = Math.ceil(e); + let o = Math.floor(i); + o === i && (o -= 1); + for (let a = r; a <= o; ++a) + s.push(An(t.coordinates, a)); + } else { + const r = Math.floor(e); + let o = Math.ceil(i); + o === i && (o += 1); + for (let a = r; a >= o; --a) + s.push(An(t.coordinates, a)); + } + s.length && this.appendCoordinates(s); + } + updateTrace_(t) { + const e = this.traceState_; + if (!e.active || e.targetIndex === -1 && eo(e.startPx, t.pixel) < this.snapTolerance_) + return; + const i = n2( + t.coordinate, + e, + this.getMap(), + this.snapTolerance_ + ); + if (e.targetIndex !== i.index) { + if (e.targetIndex !== -1) { + const l = e.targets[e.targetIndex]; + this.removeTracedCoordinates_(l.startIndex, l.endIndex); + } + const a = e.targets[i.index]; + this.addTracedCoordinates_( + a, + a.startIndex, + i.endIndex + ); + } else { + const a = e.targets[e.targetIndex]; + this.addOrRemoveTracedCoordinates_(a, i.endIndex); + } + e.targetIndex = i.index; + const s = e.targets[e.targetIndex]; + s.endIndex = i.endIndex; + const r = On( + s.coordinates, + s.endIndex + ), o = this.getMap().getPixelFromCoordinate(r); + t.coordinate = r, t.pixel = [Math.round(o[0]), Math.round(o[1])]; + } + handleUpEvent(t) { + let e = !0; + if (this.getPointerCount() === 0) { + this.downTimeout_ && (clearTimeout(this.downTimeout_), this.downTimeout_ = void 0), this.handlePointerMove_(t); + const i = this.traceState_.active; + if (this.toggleTraceState_(t), this.shouldHandle_) { + const s = !this.finishCoordinate_; + s && this.startDrawing_(t.coordinate), !s && this.freehand_ ? this.finishDrawing() : !this.freehand_ && (!s || this.mode_ === "Point") && (this.atFinish_(t.pixel, i) ? this.finishCondition_(t) && this.finishDrawing() : this.addToDrawing_(t.coordinate)), e = !1; + } else + this.freehand_ && this.abortDrawing(); + } + return !e && this.stopClick_ && t.preventDefault(), e; + } + handlePointerMove_(t) { + if (this.pointerType_ = t.originalEvent.pointerType, this.downPx_ && (!this.freehand_ && this.shouldHandle_ || this.freehand_ && !this.shouldHandle_)) { + const e = this.downPx_, i = t.pixel, s = e[0] - i[0], r = e[1] - i[1], o = s * s + r * r; + if (this.shouldHandle_ = this.freehand_ ? o > this.squaredClickTolerance_ : o <= this.squaredClickTolerance_, !this.shouldHandle_) + return; + } + if (!this.finishCoordinate_) { + this.createOrUpdateSketchPoint_(t.coordinate.slice()); + return; + } + this.updateTrace_(t), this.modifyDrawing_(t.coordinate); + } + atFinish_(t, e) { + let i = !1; + if (this.sketchFeature_) { + let s = !1, r = [this.finishCoordinate_]; + const o = this.mode_; + if (o === "Point") + i = !0; + else if (o === "Circle") + i = this.sketchCoords_.length === 2; + else if (o === "LineString") + s = !e && this.sketchCoords_.length > this.minPoints_; + else if (o === "Polygon") { + const a = this.sketchCoords_; + s = a[0].length > this.minPoints_, r = [ + a[0][0], + a[0][a[0].length - 2] + ], e ? r = [a[0][0]] : r = [ + a[0][0], + a[0][a[0].length - 2] + ]; + } + if (s) { + const a = this.getMap(); + for (let l = 0, h = r.length; l < h; l++) { + const c = r[l], u = a.getPixelFromCoordinate(c), d = t[0] - u[0], f = t[1] - u[1], g = this.freehand_ ? 1 : this.snapTolerance_; + if (i = Math.sqrt(d * d + f * f) <= g, i) { + this.finishCoordinate_ = c; + break; + } + } + } + } + return i; + } + createOrUpdateSketchPoint_(t) { + this.sketchPoint_ ? this.sketchPoint_.getGeometry().setCoordinates(t) : (this.sketchPoint_ = new Ie(new Se(t)), this.updateSketchFeatures_()); + } + createOrUpdateCustomSketchLine_(t) { + this.sketchLine_ || (this.sketchLine_ = new Ie()); + const e = t.getLinearRing(0); + let i = this.sketchLine_.getGeometry(); + i ? (i.setFlatCoordinates( + e.getLayout(), + e.getFlatCoordinates() + ), i.changed()) : (i = new li( + e.getFlatCoordinates(), + e.getLayout() + ), this.sketchLine_.setGeometry(i)); + } + startDrawing_(t) { + const e = this.getMap().getView().getProjection(), i = lo(this.geometryLayout_); + for (; t.length < i; ) + t.push(0); + this.finishCoordinate_ = t, this.mode_ === "Point" ? this.sketchCoords_ = t.slice() : this.mode_ === "Polygon" ? (this.sketchCoords_ = [[t.slice(), t.slice()]], this.sketchLineCoords_ = this.sketchCoords_[0]) : this.sketchCoords_ = [t.slice(), t.slice()], this.sketchLineCoords_ && (this.sketchLine_ = new Ie(new li(this.sketchLineCoords_))); + const s = this.geometryFunction_( + this.sketchCoords_, + void 0, + e + ); + this.sketchFeature_ = new Ie(), this.geometryName_ && this.sketchFeature_.setGeometryName(this.geometryName_), this.sketchFeature_.setGeometry(s), this.updateSketchFeatures_(), this.dispatchEvent( + new Fr(Or.DRAWSTART, this.sketchFeature_) + ); + } + modifyDrawing_(t) { + const e = this.getMap(), i = this.sketchFeature_.getGeometry(), s = e.getView().getProjection(), r = lo(this.geometryLayout_); + let o, a; + for (; t.length < r; ) + t.push(0); + this.mode_ === "Point" ? a = this.sketchCoords_ : this.mode_ === "Polygon" ? (o = this.sketchCoords_[0], a = o[o.length - 1], this.atFinish_(e.getPixelFromCoordinate(t)) && (t = this.finishCoordinate_.slice())) : (o = this.sketchCoords_, a = o[o.length - 1]), a[0] = t[0], a[1] = t[1], this.geometryFunction_( + this.sketchCoords_, + i, + s + ), this.sketchPoint_ && this.sketchPoint_.getGeometry().setCoordinates(t), i.getType() === "Polygon" && this.mode_ !== "Polygon" ? this.createOrUpdateCustomSketchLine_(i) : this.sketchLineCoords_ && this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_), this.updateSketchFeatures_(); + } + addToDrawing_(t) { + const e = this.sketchFeature_.getGeometry(), i = this.getMap().getView().getProjection(); + let s, r; + const o = this.mode_; + o === "LineString" || o === "Circle" ? (this.finishCoordinate_ = t.slice(), r = this.sketchCoords_, r.length >= this.maxPoints_ && (this.freehand_ ? r.pop() : s = !0), r.push(t.slice()), this.geometryFunction_(r, e, i)) : o === "Polygon" && (r = this.sketchCoords_[0], r.length >= this.maxPoints_ && (this.freehand_ ? r.pop() : s = !0), r.push(t.slice()), s && (this.finishCoordinate_ = r[0]), this.geometryFunction_(this.sketchCoords_, e, i)), this.createOrUpdateSketchPoint_(t.slice()), this.updateSketchFeatures_(), s && this.finishDrawing(); + } + removeLastPoints_(t) { + if (!this.sketchFeature_) + return; + const e = this.sketchFeature_.getGeometry(), i = this.getMap().getView().getProjection(), s = this.mode_; + for (let r = 0; r < t; ++r) { + let o; + if (s === "LineString" || s === "Circle") { + if (o = this.sketchCoords_, o.splice(-2, 1), o.length >= 2) { + this.finishCoordinate_ = o[o.length - 2].slice(); + const a = this.finishCoordinate_.slice(); + o[o.length - 1] = a, this.createOrUpdateSketchPoint_(a); + } + this.geometryFunction_(o, e, i), e.getType() === "Polygon" && this.sketchLine_ && this.createOrUpdateCustomSketchLine_( + e + ); + } else if (s === "Polygon") { + o = this.sketchCoords_[0], o.splice(-2, 1); + const a = this.sketchLine_.getGeometry(); + if (o.length >= 2) { + const l = o[o.length - 2].slice(); + o[o.length - 1] = l, this.createOrUpdateSketchPoint_(l); + } + a.setCoordinates(o), this.geometryFunction_(this.sketchCoords_, e, i); + } + if (o.length === 1) { + this.abortDrawing(); + break; + } + } + this.updateSketchFeatures_(); + } + removeLastPoint() { + this.removeLastPoints_(1); + } + finishDrawing() { + const t = this.abortDrawing_(); + if (!t) + return; + let e = this.sketchCoords_; + const i = t.getGeometry(), s = this.getMap().getView().getProjection(); + this.mode_ === "LineString" ? (e.pop(), this.geometryFunction_(e, i, s)) : this.mode_ === "Polygon" && (e[0].pop(), this.geometryFunction_(e, i, s), e = i.getCoordinates()), this.type_ === "MultiPoint" ? t.setGeometry( + new $o([e]) + ) : this.type_ === "MultiLineString" ? t.setGeometry( + new sr([e]) + ) : this.type_ === "MultiPolygon" && t.setGeometry( + new rr([e]) + ), this.dispatchEvent(new Fr(Or.DRAWEND, t)), this.features_ && this.features_.push(t), this.source_ && this.source_.addFeature(t); + } + abortDrawing_() { + this.finishCoordinate_ = null; + const t = this.sketchFeature_; + return this.sketchFeature_ = null, this.sketchPoint_ = null, this.sketchLine_ = null, this.overlay_.getSource().clear(!0), this.deactivateTrace_(), t; + } + abortDrawing() { + const t = this.abortDrawing_(); + t && this.dispatchEvent(new Fr(Or.DRAWABORT, t)); + } + appendCoordinates(t) { + const e = this.mode_, i = !this.sketchFeature_; + i && this.startDrawing_(t[0]); + let s; + if (e === "LineString" || e === "Circle") + s = this.sketchCoords_; + else if (e === "Polygon") + s = this.sketchCoords_ && this.sketchCoords_.length ? this.sketchCoords_[0] : []; + else + return; + i && s.shift(), s.pop(); + for (let o = 0; o < t.length; o++) + this.addToDrawing_(t[o]); + const r = t[t.length - 1]; + this.addToDrawing_(r), this.modifyDrawing_(r); + } + extend(t) { + const i = t.getGeometry(); + this.sketchFeature_ = t, this.sketchCoords_ = i.getCoordinates(); + const s = this.sketchCoords_[this.sketchCoords_.length - 1]; + this.finishCoordinate_ = s.slice(), this.sketchCoords_.push(s.slice()), this.sketchPoint_ = new Ie(new Se(s)), this.updateSketchFeatures_(), this.dispatchEvent( + new Fr(Or.DRAWSTART, this.sketchFeature_) + ); + } + updateSketchFeatures_() { + const t = []; + this.sketchFeature_ && t.push(this.sketchFeature_), this.sketchLine_ && t.push(this.sketchLine_), this.sketchPoint_ && t.push(this.sketchPoint_); + const e = this.overlay_.getSource(); + e.clear(!0), e.addFeatures(t); + } + updateState_() { + const t = this.getMap(), e = this.getActive(); + (!t || !e) && this.abortDrawing(), this.overlay_.setMap(e ? t : null); + } +} +function r2() { + const n = Vd(); + return function(t, e) { + return n[t.getGeometry().getType()]; + }; +} +function o2(n) { + switch (n) { + case "Point": + case "MultiPoint": + return "Point"; + case "LineString": + case "MultiLineString": + return "LineString"; + case "Polygon": + case "MultiPolygon": + return "Polygon"; + case "Circle": + return "Circle"; + default: + throw new Error("Invalid type: " + n); + } +} +const a2 = s2, Tc = 0, Ls = 1, bc = [0, 0, 0, 0], zn = [], pa = { + MODIFYSTART: "modifystart", + MODIFYEND: "modifyend" +}; +class ya extends Re { + constructor(t, e, i) { + super(t), this.features = e, this.mapBrowserEvent = i; + } +} +class l2 extends ki { + constructor(t) { + super(t), this.on, this.once, this.un, this.boundHandleFeatureChange_ = this.handleFeatureChange_.bind(this), this.condition_ = t.condition ? t.condition : Dd, this.defaultDeleteCondition_ = function(i) { + return W1(i) && j1(i); + }, this.deleteCondition_ = t.deleteCondition ? t.deleteCondition : this.defaultDeleteCondition_, this.insertVertexCondition_ = t.insertVertexCondition ? t.insertVertexCondition : co, this.vertexFeature_ = null, this.vertexSegments_ = null, this.lastPixel_ = [0, 0], this.ignoreNextSingleClick_ = !1, this.featuresBeingModified_ = null, this.rBush_ = new fo(), this.pixelTolerance_ = t.pixelTolerance !== void 0 ? t.pixelTolerance : 10, this.snappedToVertex_ = !1, this.changingFeature_ = !1, this.dragSegments_ = [], this.overlay_ = new Ze({ + source: new Ve({ + useSpatialIndex: !1, + wrapX: !!t.wrapX + }), + style: t.style ? t.style : c2(), + updateWhileAnimating: !0, + updateWhileInteracting: !0 + }), this.SEGMENT_WRITERS_ = { + Point: this.writePointGeometry_.bind(this), + LineString: this.writeLineStringGeometry_.bind(this), + LinearRing: this.writeLineStringGeometry_.bind(this), + Polygon: this.writePolygonGeometry_.bind(this), + MultiPoint: this.writeMultiPointGeometry_.bind(this), + MultiLineString: this.writeMultiLineStringGeometry_.bind(this), + MultiPolygon: this.writeMultiPolygonGeometry_.bind(this), + Circle: this.writeCircleGeometry_.bind(this), + GeometryCollection: this.writeGeometryCollectionGeometry_.bind(this) + }, this.source_ = null, this.hitDetection_ = null; + let e; + if (t.features ? e = t.features : t.source && (this.source_ = t.source, e = new Ee(this.source_.getFeatures()), this.source_.addEventListener( + jt.ADDFEATURE, + this.handleSourceAdd_.bind(this) + ), this.source_.addEventListener( + jt.REMOVEFEATURE, + this.handleSourceRemove_.bind(this) + )), !e) + throw new Error( + "The modify interaction requires features, a source or a layer" + ); + t.hitDetection && (this.hitDetection_ = t.hitDetection), this.features_ = e, this.features_.forEach(this.addFeature_.bind(this)), this.features_.addEventListener( + Dt.ADD, + this.handleFeatureAdd_.bind(this) + ), this.features_.addEventListener( + Dt.REMOVE, + this.handleFeatureRemove_.bind(this) + ), this.lastPointerEvent_ = null, this.delta_ = [0, 0], this.snapToPointer_ = t.snapToPointer === void 0 ? !this.hitDetection_ : t.snapToPointer; + } + addFeature_(t) { + const e = t.getGeometry(); + if (e) { + const s = this.SEGMENT_WRITERS_[e.getType()]; + s && s(t, e); + } + const i = this.getMap(); + i && i.isRendered() && this.getActive() && this.handlePointerAtPixel_(this.lastPixel_, i), t.addEventListener(U.CHANGE, this.boundHandleFeatureChange_); + } + willModifyFeatures_(t, e) { + if (!this.featuresBeingModified_) { + this.featuresBeingModified_ = new Ee(); + const i = this.featuresBeingModified_.getArray(); + for (let s = 0, r = e.length; s < r; ++s) { + const o = e[s]; + for (let a = 0, l = o.length; a < l; ++a) { + const h = o[a].feature; + h && !i.includes(h) && this.featuresBeingModified_.push(h); + } + } + this.featuresBeingModified_.getLength() === 0 ? this.featuresBeingModified_ = null : this.dispatchEvent( + new ya( + pa.MODIFYSTART, + this.featuresBeingModified_, + t + ) + ); + } + } + removeFeature_(t) { + this.removeFeatureSegmentData_(t), this.vertexFeature_ && this.features_.getLength() === 0 && (this.overlay_.getSource().removeFeature(this.vertexFeature_), this.vertexFeature_ = null), t.removeEventListener( + U.CHANGE, + this.boundHandleFeatureChange_ + ); + } + removeFeatureSegmentData_(t) { + const e = this.rBush_, i = []; + e.forEach( + function(s) { + t === s.feature && i.push(s); + } + ); + for (let s = i.length - 1; s >= 0; --s) { + const r = i[s]; + for (let o = this.dragSegments_.length - 1; o >= 0; --o) + this.dragSegments_[o][0] === r && this.dragSegments_.splice(o, 1); + e.remove(r); + } + } + setActive(t) { + this.vertexFeature_ && !t && (this.overlay_.getSource().removeFeature(this.vertexFeature_), this.vertexFeature_ = null), super.setActive(t); + } + setMap(t) { + this.overlay_.setMap(t), super.setMap(t); + } + getOverlay() { + return this.overlay_; + } + handleSourceAdd_(t) { + t.feature && this.features_.push(t.feature); + } + handleSourceRemove_(t) { + t.feature && this.features_.remove(t.feature); + } + handleFeatureAdd_(t) { + this.addFeature_(t.element); + } + handleFeatureChange_(t) { + if (!this.changingFeature_) { + const e = t.target; + this.removeFeature_(e), this.addFeature_(e); + } + } + handleFeatureRemove_(t) { + this.removeFeature_(t.element); + } + writePointGeometry_(t, e) { + const i = e.getCoordinates(), s = { + feature: t, + geometry: e, + segment: [i, i] + }; + this.rBush_.insert(e.getExtent(), s); + } + writeMultiPointGeometry_(t, e) { + const i = e.getCoordinates(); + for (let s = 0, r = i.length; s < r; ++s) { + const o = i[s], a = { + feature: t, + geometry: e, + depth: [s], + index: s, + segment: [o, o] + }; + this.rBush_.insert(e.getExtent(), a); + } + } + writeLineStringGeometry_(t, e) { + const i = e.getCoordinates(); + for (let s = 0, r = i.length - 1; s < r; ++s) { + const o = i.slice(s, s + 2), a = { + feature: t, + geometry: e, + index: s, + segment: o + }; + this.rBush_.insert(Ut(o), a); + } + } + writeMultiLineStringGeometry_(t, e) { + const i = e.getCoordinates(); + for (let s = 0, r = i.length; s < r; ++s) { + const o = i[s]; + for (let a = 0, l = o.length - 1; a < l; ++a) { + const h = o.slice(a, a + 2), c = { + feature: t, + geometry: e, + depth: [s], + index: a, + segment: h + }; + this.rBush_.insert(Ut(h), c); + } + } + } + writePolygonGeometry_(t, e) { + const i = e.getCoordinates(); + for (let s = 0, r = i.length; s < r; ++s) { + const o = i[s]; + for (let a = 0, l = o.length - 1; a < l; ++a) { + const h = o.slice(a, a + 2), c = { + feature: t, + geometry: e, + depth: [s], + index: a, + segment: h + }; + this.rBush_.insert(Ut(h), c); + } + } + } + writeMultiPolygonGeometry_(t, e) { + const i = e.getCoordinates(); + for (let s = 0, r = i.length; s < r; ++s) { + const o = i[s]; + for (let a = 0, l = o.length; a < l; ++a) { + const h = o[a]; + for (let c = 0, u = h.length - 1; c < u; ++c) { + const d = h.slice(c, c + 2), f = { + feature: t, + geometry: e, + depth: [a, s], + index: c, + segment: d + }; + this.rBush_.insert(Ut(d), f); + } + } + } + } + writeCircleGeometry_(t, e) { + const i = e.getCenter(), s = { + feature: t, + geometry: e, + index: Tc, + segment: [i, i] + }, r = { + feature: t, + geometry: e, + index: Ls, + segment: [i, i] + }, o = [s, r]; + s.featureSegments = o, r.featureSegments = o, this.rBush_.insert(ws(i), s); + let a = e; + this.rBush_.insert(a.getExtent(), r); + } + writeGeometryCollectionGeometry_(t, e) { + const i = e.getGeometriesArray(); + for (let s = 0; s < i.length; ++s) { + const r = i[s], o = this.SEGMENT_WRITERS_[r.getType()]; + o(t, r); + } + } + createOrUpdateVertexFeature_(t, e, i) { + let s = this.vertexFeature_; + return s ? s.getGeometry().setCoordinates(t) : (s = new Ie(new Se(t)), this.vertexFeature_ = s, this.overlay_.getSource().addFeature(s)), s.set("features", e), s.set("geometries", i), s; + } + handleEvent(t) { + if (!t.originalEvent) + return !0; + this.lastPointerEvent_ = t; + let e; + return !t.map.getView().getInteracting() && t.type == nt.POINTERMOVE && !this.handlingDownUpSequence && this.handlePointerMove_(t), this.vertexFeature_ && this.deleteCondition_(t) && (t.type != nt.SINGLECLICK || !this.ignoreNextSingleClick_ ? e = this.removePoint() : e = !0), t.type == nt.SINGLECLICK && (this.ignoreNextSingleClick_ = !1), super.handleEvent(t) && !e; + } + handleDragEvent(t) { + this.ignoreNextSingleClick_ = !1, this.willModifyFeatures_(t, this.dragSegments_); + const e = [ + t.coordinate[0] + this.delta_[0], + t.coordinate[1] + this.delta_[1] + ], i = [], s = []; + for (let r = 0, o = this.dragSegments_.length; r < o; ++r) { + const a = this.dragSegments_[r], l = a[0], h = l.feature; + i.includes(h) || i.push(h); + const c = l.geometry; + s.includes(c) || s.push(c); + const u = l.depth; + let d; + const f = l.segment, g = a[1]; + for (; e.length < c.getStride(); ) + e.push(f[g][e.length]); + switch (c.getType()) { + case "Point": + d = e, f[0] = e, f[1] = e; + break; + case "MultiPoint": + d = c.getCoordinates(), d[l.index] = e, f[0] = e, f[1] = e; + break; + case "LineString": + d = c.getCoordinates(), d[l.index + g] = e, f[g] = e; + break; + case "MultiLineString": + d = c.getCoordinates(), d[u[0]][l.index + g] = e, f[g] = e; + break; + case "Polygon": + d = c.getCoordinates(), d[u[0]][l.index + g] = e, f[g] = e; + break; + case "MultiPolygon": + d = c.getCoordinates(), d[u[1]][u[0]][l.index + g] = e, f[g] = e; + break; + case "Circle": + if (f[0] = e, f[1] = e, l.index === Tc) + this.changingFeature_ = !0, c.setCenter(e), this.changingFeature_ = !1; + else { + this.changingFeature_ = !0, t.map.getView().getProjection(); + let m = eo( + vt(c.getCenter()), + vt(e) + ); + c.setRadius(m), this.changingFeature_ = !1; + } + break; + } + d && this.setGeometryCoordinates_(c, d); + } + this.createOrUpdateVertexFeature_(e, i, s); + } + handleDownEvent(t) { + if (!this.condition_(t)) + return !1; + const e = t.coordinate; + this.handlePointerAtPixel_(t.pixel, t.map, e), this.dragSegments_.length = 0, this.featuresBeingModified_ = null; + const i = this.vertexFeature_; + if (i) { + t.map.getView().getProjection(); + const s = [], r = i.getGeometry().getCoordinates(), o = Ut([r]), a = this.rBush_.getInExtent(o), l = {}; + a.sort(h2); + for (let h = 0, c = a.length; h < c; ++h) { + const u = a[h], d = u.segment; + let f = q(u.geometry); + const g = u.depth; + if (g && (f += "-" + g.join("-")), l[f] || (l[f] = new Array(2)), u.geometry.getType() === "Circle" && u.index === Ls) { + const m = Ic( + e, + u + ); + Le(m, r) && !l[f][0] && (this.dragSegments_.push([u, 0]), l[f][0] = u); + continue; + } + if (Le(d[0], r) && !l[f][0]) { + this.dragSegments_.push([u, 0]), l[f][0] = u; + continue; + } + if (Le(d[1], r) && !l[f][1]) { + if (l[f][0] && l[f][0].index === 0) { + let m = u.geometry.getCoordinates(); + switch (u.geometry.getType()) { + case "LineString": + case "MultiLineString": + continue; + case "MultiPolygon": + m = m[g[1]]; + case "Polygon": + if (u.index !== m[g[0]].length - 2) + continue; + break; + } + } + this.dragSegments_.push([u, 1]), l[f][1] = u; + continue; + } + q(d) in this.vertexSegments_ && !l[f][0] && !l[f][1] && this.insertVertexCondition_(t) && s.push(u); + } + s.length && this.willModifyFeatures_(t, [s]); + for (let h = s.length - 1; h >= 0; --h) + this.insertVertex_(s[h], r); + } + return !!this.vertexFeature_; + } + handleUpEvent(t) { + for (let e = this.dragSegments_.length - 1; e >= 0; --e) { + const i = this.dragSegments_[e][0], s = i.geometry; + if (s.getType() === "Circle") { + const r = s.getCenter(), o = i.featureSegments[0], a = i.featureSegments[1]; + o.segment[0] = r, o.segment[1] = r, a.segment[0] = r, a.segment[1] = r, this.rBush_.update(ws(r), o); + let l = s; + this.rBush_.update( + l.getExtent(), + a + ); + } else + this.rBush_.update(Ut(i.segment), i); + } + return this.featuresBeingModified_ && (this.dispatchEvent( + new ya( + pa.MODIFYEND, + this.featuresBeingModified_, + t + ) + ), this.featuresBeingModified_ = null), !1; + } + handlePointerMove_(t) { + this.lastPixel_ = t.pixel, this.handlePointerAtPixel_(t.pixel, t.map, t.coordinate); + } + handlePointerAtPixel_(t, e, i) { + const s = i || e.getCoordinateFromPixel(t); + e.getView().getProjection(); + const r = function(l, h) { + return Lc(s, l) - Lc(s, h); + }; + let o, a; + if (this.hitDetection_) { + const l = typeof this.hitDetection_ == "object" ? (h) => h === this.hitDetection_ : void 0; + e.forEachFeatureAtPixel( + t, + (h, c, u) => { + if (u = u || h.getGeometry(), u.getType() === "Point" && this.features_.getArray().includes(h)) { + a = u; + const d = u.getFlatCoordinates().slice(0, 2); + o = [ + { + feature: h, + geometry: u, + segment: [d, d] + } + ]; + } + return !0; + }, + { layerFilter: l } + ); + } + if (!o) { + const l = Mi( + ws(s, bc) + ), h = e.getView().getResolution() * this.pixelTolerance_, c = Il( + Js(l, h, bc) + ); + o = this.rBush_.getInExtent(c); + } + if (o && o.length > 0) { + const l = o.sort(r)[0], h = l.segment; + let c = Ic(s, l); + const u = e.getPixelFromCoordinate(c); + let d = eo(t, u); + if (a || d <= this.pixelTolerance_) { + const f = {}; + if (f[q(h)] = !0, this.snapToPointer_ || (this.delta_[0] = c[0] - s[0], this.delta_[1] = c[1] - s[1]), l.geometry.getType() === "Circle" && l.index === Ls) + this.snappedToVertex_ = !0, this.createOrUpdateVertexFeature_( + c, + [l.feature], + [l.geometry] + ); + else { + const g = e.getPixelFromCoordinate(h[0]), m = e.getPixelFromCoordinate(h[1]), _ = oi(u, g), y = oi(u, m); + d = Math.sqrt(Math.min(_, y)), this.snappedToVertex_ = d <= this.pixelTolerance_, this.snappedToVertex_ && (c = _ > y ? h[1] : h[0]), this.createOrUpdateVertexFeature_( + c, + [l.feature], + [l.geometry] + ); + const p = {}; + p[q(l.geometry)] = !0; + for (let v = 1, x = o.length; v < x; ++v) { + const C = o[v].segment; + if (Le(h[0], C[0]) && Le(h[1], C[1]) || Le(h[0], C[1]) && Le(h[1], C[0])) { + const E = q(o[v].geometry); + E in p || (p[E] = !0, f[q(C)] = !0); + } else + break; + } + } + this.vertexSegments_ = f; + return; + } + } + this.vertexFeature_ && (this.overlay_.getSource().removeFeature(this.vertexFeature_), this.vertexFeature_ = null); + } + insertVertex_(t, e) { + const i = t.segment, s = t.feature, r = t.geometry, o = t.depth, a = t.index; + let l; + for (; e.length < r.getStride(); ) + e.push(0); + switch (r.getType()) { + case "MultiLineString": + l = r.getCoordinates(), l[o[0]].splice(a + 1, 0, e); + break; + case "Polygon": + l = r.getCoordinates(), l[o[0]].splice(a + 1, 0, e); + break; + case "MultiPolygon": + l = r.getCoordinates(), l[o[1]][o[0]].splice(a + 1, 0, e); + break; + case "LineString": + l = r.getCoordinates(), l.splice(a + 1, 0, e); + break; + default: + return; + } + this.setGeometryCoordinates_(r, l); + const h = this.rBush_; + h.remove(t), this.updateSegmentIndices_(r, a, o, 1); + const c = { + segment: [i[0], e], + feature: s, + geometry: r, + depth: o, + index: a + }; + h.insert(Ut(c.segment), c), this.dragSegments_.push([c, 1]); + const u = { + segment: [e, i[1]], + feature: s, + geometry: r, + depth: o, + index: a + 1 + }; + h.insert(Ut(u.segment), u), this.dragSegments_.push([u, 0]), this.ignoreNextSingleClick_ = !0; + } + removePoint() { + if (this.lastPointerEvent_ && this.lastPointerEvent_.type != nt.POINTERDRAG) { + const t = this.lastPointerEvent_; + this.willModifyFeatures_(t, this.dragSegments_); + const e = this.removeVertex_(); + return this.featuresBeingModified_ && this.dispatchEvent( + new ya( + pa.MODIFYEND, + this.featuresBeingModified_, + t + ) + ), this.featuresBeingModified_ = null, e; + } + return !1; + } + removeVertex_() { + const t = this.dragSegments_, e = {}; + let i = !1, s, r, o, a, l, h, c, u, d, f, g; + for (l = t.length - 1; l >= 0; --l) + o = t[l], f = o[0], g = q(f.feature), f.depth && (g += "-" + f.depth.join("-")), g in e || (e[g] = {}), o[1] === 0 ? (e[g].right = f, e[g].index = f.index) : o[1] == 1 && (e[g].left = f, e[g].index = f.index + 1); + for (g in e) { + switch (d = e[g].right, c = e[g].left, h = e[g].index, u = h - 1, c !== void 0 ? f = c : f = d, u < 0 && (u = 0), a = f.geometry, r = a.getCoordinates(), s = r, i = !1, a.getType()) { + case "MultiLineString": + r[f.depth[0]].length > 2 && (r[f.depth[0]].splice(h, 1), i = !0); + break; + case "LineString": + r.length > 2 && (r.splice(h, 1), i = !0); + break; + case "MultiPolygon": + s = s[f.depth[1]]; + case "Polygon": + s = s[f.depth[0]], s.length > 4 && (h == s.length - 1 && (h = 0), s.splice(h, 1), i = !0, h === 0 && (s.pop(), s.push(s[0]), u = s.length - 1)); + break; + } + if (i) { + this.setGeometryCoordinates_(a, r); + const m = []; + if (c !== void 0 && (this.rBush_.remove(c), m.push(c.segment[0])), d !== void 0 && (this.rBush_.remove(d), m.push(d.segment[1])), c !== void 0 && d !== void 0) { + const _ = { + depth: f.depth, + feature: f.feature, + geometry: f.geometry, + index: u, + segment: m + }; + this.rBush_.insert( + Ut(_.segment), + _ + ); + } + this.updateSegmentIndices_(a, h, f.depth, -1), this.vertexFeature_ && (this.overlay_.getSource().removeFeature(this.vertexFeature_), this.vertexFeature_ = null), t.length = 0; + } + } + return i; + } + setGeometryCoordinates_(t, e) { + this.changingFeature_ = !0, t.setCoordinates(e), this.changingFeature_ = !1; + } + updateSegmentIndices_(t, e, i, s) { + this.rBush_.forEachInExtent( + t.getExtent(), + function(r) { + r.geometry === t && (i === void 0 || r.depth === void 0 || Ni(r.depth, i)) && r.index > e && (r.index += s); + } + ); + } +} +function h2(n, t) { + return n.index - t.index; +} +function Lc(n, t, e) { + const i = t.geometry; + if (i.getType() === "Circle") { + let r = i; + if (t.index === Ls) { + const o = oi( + r.getCenter(), + vt(n) + ), a = Math.sqrt(o) - r.getRadius(); + return a * a; + } + } + const s = vt(n); + return zn[0] = vt(t.segment[0]), zn[1] = vt(t.segment[1]), f0(s, zn); +} +function Ic(n, t, e) { + const i = t.geometry; + if (i.getType() === "Circle" && t.index === Ls) + return qn( + i.getClosestPoint( + vt(n) + ) + ); + const s = vt(n); + return zn[0] = vt(t.segment[0]), zn[1] = vt(t.segment[1]), qn( + Ml(s, zn) + ); +} +function c2() { + const n = Vd(); + return function(t, e) { + return n.Point; + }; +} +const u2 = l2; +function Pc(n) { + if (n.feature) + return n.feature; + if (n.element) + return n.element; +} +const va = []; +class d2 extends ki { + constructor(t) { + t = t || {}; + const e = t; + e.handleDownEvent || (e.handleDownEvent = en), e.stopDown || (e.stopDown = un), super(e), this.source_ = t.source ? t.source : null, this.vertex_ = t.vertex !== void 0 ? t.vertex : !0, this.edge_ = t.edge !== void 0 ? t.edge : !0, this.features_ = t.features ? t.features : null, this.featuresListenerKeys_ = [], this.featureChangeListenerKeys_ = {}, this.indexedFeaturesExtents_ = {}, this.pendingFeatures_ = {}, this.pixelTolerance_ = t.pixelTolerance !== void 0 ? t.pixelTolerance : 10, this.rBush_ = new fo(), this.GEOMETRY_SEGMENTERS_ = { + Point: this.segmentPointGeometry_.bind(this), + LineString: this.segmentLineStringGeometry_.bind(this), + LinearRing: this.segmentLineStringGeometry_.bind(this), + Polygon: this.segmentPolygonGeometry_.bind(this), + MultiPoint: this.segmentMultiPointGeometry_.bind(this), + MultiLineString: this.segmentMultiLineStringGeometry_.bind(this), + MultiPolygon: this.segmentMultiPolygonGeometry_.bind(this), + GeometryCollection: this.segmentGeometryCollectionGeometry_.bind(this), + Circle: this.segmentCircleGeometry_.bind(this) + }; + } + addFeature(t, e) { + e = e !== void 0 ? e : !0; + const i = q(t), s = t.getGeometry(); + if (s) { + const r = this.GEOMETRY_SEGMENTERS_[s.getType()]; + if (r) { + this.indexedFeaturesExtents_[i] = s.getExtent( + se() + ); + const o = []; + if (r(o, s), o.length === 1) + this.rBush_.insert(Ut(o[0]), { + feature: t, + segment: o[0] + }); + else if (o.length > 1) { + const a = o.map((h) => Ut(h)), l = o.map((h) => ({ + feature: t, + segment: h + })); + this.rBush_.load(a, l); + } + } + } + e && (this.featureChangeListenerKeys_[i] = et( + t, + U.CHANGE, + this.handleFeatureChange_, + this + )); + } + forEachFeatureAdd_(t) { + this.addFeature(t); + } + forEachFeatureRemove_(t) { + this.removeFeature(t); + } + getFeatures_() { + let t; + return this.features_ ? t = this.features_ : this.source_ && (t = this.source_.getFeatures()), t; + } + handleEvent(t) { + const e = this.snapTo(t.pixel, t.coordinate, t.map); + return e && (t.coordinate = e.vertex.slice(0, 2), t.pixel = e.vertexPixel), super.handleEvent(t); + } + handleFeatureAdd_(t) { + const e = Pc(t); + this.addFeature(e); + } + handleFeatureRemove_(t) { + const e = Pc(t); + this.removeFeature(e); + } + handleFeatureChange_(t) { + const e = t.target; + if (this.handlingDownUpSequence) { + const i = q(e); + i in this.pendingFeatures_ || (this.pendingFeatures_[i] = e); + } else + this.updateFeature_(e); + } + handleUpEvent(t) { + const e = Object.values(this.pendingFeatures_); + return e.length && (e.forEach(this.updateFeature_.bind(this)), this.pendingFeatures_ = {}), !1; + } + removeFeature(t, e) { + const i = e !== void 0 ? e : !0, s = q(t), r = this.indexedFeaturesExtents_[s]; + if (r) { + const o = this.rBush_, a = []; + o.forEachInExtent(r, function(l) { + t === l.feature && a.push(l); + }); + for (let l = a.length - 1; l >= 0; --l) + o.remove(a[l]); + } + i && (mt(this.featureChangeListenerKeys_[s]), delete this.featureChangeListenerKeys_[s]); + } + setMap(t) { + const e = this.getMap(), i = this.featuresListenerKeys_, s = this.getFeatures_(); + e && (i.forEach(mt), i.length = 0, s.forEach(this.forEachFeatureRemove_.bind(this))), super.setMap(t), t && (this.features_ ? i.push( + et( + this.features_, + Dt.ADD, + this.handleFeatureAdd_, + this + ), + et( + this.features_, + Dt.REMOVE, + this.handleFeatureRemove_, + this + ) + ) : this.source_ && i.push( + et( + this.source_, + jt.ADDFEATURE, + this.handleFeatureAdd_, + this + ), + et( + this.source_, + jt.REMOVEFEATURE, + this.handleFeatureRemove_, + this + ) + ), s.forEach(this.forEachFeatureAdd_.bind(this))); + } + snapTo(t, e, i) { + const s = i.getCoordinateFromPixel([ + t[0] - this.pixelTolerance_, + t[1] + this.pixelTolerance_ + ]), r = i.getCoordinateFromPixel([ + t[0] + this.pixelTolerance_, + t[1] - this.pixelTolerance_ + ]), o = Ut([s, r]), a = this.rBush_.getInExtent(o), l = a.length; + if (l === 0) + return null; + i.getView().getProjection(); + const h = vt(e); + let c, u = 1 / 0; + const d = this.pixelTolerance_ * this.pixelTolerance_, f = () => { + if (c) { + const g = i.getPixelFromCoordinate(c); + if (oi(t, g) <= d) + return { + vertex: c, + vertexPixel: [ + Math.round(g[0]), + Math.round(g[1]) + ] + }; + } + return null; + }; + if (this.vertex_) { + for (let m = 0; m < l; ++m) { + const _ = a[m]; + _.feature.getGeometry().getType() !== "Circle" && _.segment.forEach((y) => { + const p = vt(y), v = oi(h, p); + v < u && (c = y, u = v); + }); + } + const g = f(); + if (g) + return g; + } + if (this.edge_) { + for (let m = 0; m < l; ++m) { + let _ = null; + const y = a[m]; + if (y.feature.getGeometry().getType() === "Circle") { + let p = y.feature.getGeometry(); + _ = qn( + d0( + h, + p + ) + ); + } else { + const [p, v] = y.segment; + v && (va[0] = vt(p), va[1] = vt(v), _ = Ml(h, va)); + } + if (_) { + const p = oi(h, _); + p < u && (c = _, u = p); + } + } + const g = f(); + if (g) + return g; + } + return null; + } + updateFeature_(t) { + this.removeFeature(t, !1), this.addFeature(t, !1); + } + segmentCircleGeometry_(t, e) { + this.getMap().getView().getProjection(); + const r = R1(e).getCoordinates()[0]; + for (let o = 0, a = r.length - 1; o < a; ++o) + t.push(r.slice(o, o + 2)); + } + segmentGeometryCollectionGeometry_(t, e) { + const i = e.getGeometriesArray(); + for (let s = 0; s < i.length; ++s) { + const r = this.GEOMETRY_SEGMENTERS_[i[s].getType()]; + r && r(t, i[s]); + } + } + segmentLineStringGeometry_(t, e) { + const i = e.getCoordinates(); + for (let s = 0, r = i.length - 1; s < r; ++s) + t.push(i.slice(s, s + 2)); + } + segmentMultiLineStringGeometry_(t, e) { + const i = e.getCoordinates(); + for (let s = 0, r = i.length; s < r; ++s) { + const o = i[s]; + for (let a = 0, l = o.length - 1; a < l; ++a) + t.push(o.slice(a, a + 2)); + } + } + segmentMultiPointGeometry_(t, e) { + e.getCoordinates().forEach((i) => { + t.push([i]); + }); + } + segmentMultiPolygonGeometry_(t, e) { + const i = e.getCoordinates(); + for (let s = 0, r = i.length; s < r; ++s) { + const o = i[s]; + for (let a = 0, l = o.length; a < l; ++a) { + const h = o[a]; + for (let c = 0, u = h.length - 1; c < u; ++c) + t.push(h.slice(c, c + 2)); + } + } + } + segmentPointGeometry_(t, e) { + t.push([e.getCoordinates()]); + } + segmentPolygonGeometry_(t, e) { + const i = e.getCoordinates(); + for (let s = 0, r = i.length; s < r; ++s) { + const o = i[s]; + for (let a = 0, l = o.length - 1; a < l; ++a) + t.push(o.slice(a, a + 2)); + } + } +} +const f2 = d2, g2 = 0.5, m2 = 10, Ac = 0.25; +class _2 { + constructor(t, e, i, s, r, o) { + this.sourceProj_ = t, this.targetProj_ = e; + let a = {}; + const l = zs(this.targetProj_, this.sourceProj_); + this.transformInv_ = function(p) { + const v = p[0] + "/" + p[1]; + return a[v] || (a[v] = l(p)), a[v]; + }, this.maxSourceExtent_ = s, this.errorThresholdSquared_ = r * r, this.triangles_ = [], this.wrapsXInSource_ = !1, this.canWrapXInSource_ = this.sourceProj_.canWrapX() && !!s && !!this.sourceProj_.getExtent() && pt(s) == pt(this.sourceProj_.getExtent()), this.sourceWorldWidth_ = this.sourceProj_.getExtent() ? pt(this.sourceProj_.getExtent()) : null, this.targetWorldWidth_ = this.targetProj_.getExtent() ? pt(this.targetProj_.getExtent()) : null; + const h = fn(i), c = Io(i), u = Lo(i), d = bo(i), f = this.transformInv_(h), g = this.transformInv_(c), m = this.transformInv_(u), _ = this.transformInv_(d), y = m2 + (o ? Math.max( + 0, + Math.ceil( + Math.log2( + La(i) / (o * o * 256 * 256) + ) + ) + ) : 0); + if (this.addQuad_( + h, + c, + u, + d, + f, + g, + m, + _, + y + ), this.wrapsXInSource_) { + let p = 1 / 0; + this.triangles_.forEach(function(v, x, C) { + p = Math.min( + p, + v.source[0][0], + v.source[1][0], + v.source[2][0] + ); + }), this.triangles_.forEach( + function(v) { + if (Math.max( + v.source[0][0], + v.source[1][0], + v.source[2][0] + ) - p > this.sourceWorldWidth_ / 2) { + const x = [ + [v.source[0][0], v.source[0][1]], + [v.source[1][0], v.source[1][1]], + [v.source[2][0], v.source[2][1]] + ]; + x[0][0] - p > this.sourceWorldWidth_ / 2 && (x[0][0] -= this.sourceWorldWidth_), x[1][0] - p > this.sourceWorldWidth_ / 2 && (x[1][0] -= this.sourceWorldWidth_), x[2][0] - p > this.sourceWorldWidth_ / 2 && (x[2][0] -= this.sourceWorldWidth_); + const C = Math.min( + x[0][0], + x[1][0], + x[2][0] + ); + Math.max( + x[0][0], + x[1][0], + x[2][0] + ) - C < this.sourceWorldWidth_ / 2 && (v.source = x); + } + }.bind(this) + ); + } + a = {}; + } + addTriangle_(t, e, i, s, r, o) { + this.triangles_.push({ + source: [s, r, o], + target: [t, e, i] + }); + } + addQuad_(t, e, i, s, r, o, a, l, h) { + const c = Ut([r, o, a, l]), u = this.sourceWorldWidth_ ? pt(c) / this.sourceWorldWidth_ : null, d = this.sourceWorldWidth_, f = this.sourceProj_.canWrapX() && u > 0.5 && u < 1; + let g = !1; + if (h > 0) { + if (this.targetProj_.isGlobal() && this.targetWorldWidth_) { + const _ = Ut([t, e, i, s]); + g = pt(_) / this.targetWorldWidth_ > Ac || g; + } + !f && this.sourceProj_.isGlobal() && u && (g = u > Ac || g); + } + if (!g && this.maxSourceExtent_ && isFinite(c[0]) && isFinite(c[1]) && isFinite(c[2]) && isFinite(c[3]) && !Kt(c, this.maxSourceExtent_)) + return; + let m = 0; + if (!g && (!isFinite(r[0]) || !isFinite(r[1]) || !isFinite(o[0]) || !isFinite(o[1]) || !isFinite(a[0]) || !isFinite(a[1]) || !isFinite(l[0]) || !isFinite(l[1]))) { + if (h > 0) + g = !0; + else if (m = (!isFinite(r[0]) || !isFinite(r[1]) ? 8 : 0) + (!isFinite(o[0]) || !isFinite(o[1]) ? 4 : 0) + (!isFinite(a[0]) || !isFinite(a[1]) ? 2 : 0) + (!isFinite(l[0]) || !isFinite(l[1]) ? 1 : 0), m != 1 && m != 2 && m != 4 && m != 8) + return; + } + if (h > 0) { + if (!g) { + const _ = [(t[0] + i[0]) / 2, (t[1] + i[1]) / 2], y = this.transformInv_(_); + let p; + f ? p = (qi(r[0], d) + qi(a[0], d)) / 2 - qi(y[0], d) : p = (r[0] + a[0]) / 2 - y[0]; + const v = (r[1] + a[1]) / 2 - y[1]; + g = p * p + v * v > this.errorThresholdSquared_; + } + if (g) { + if (Math.abs(t[0] - i[0]) <= Math.abs(t[1] - i[1])) { + const _ = [(e[0] + i[0]) / 2, (e[1] + i[1]) / 2], y = this.transformInv_(_), p = [(s[0] + t[0]) / 2, (s[1] + t[1]) / 2], v = this.transformInv_(p); + this.addQuad_( + t, + e, + _, + p, + r, + o, + y, + v, + h - 1 + ), this.addQuad_( + p, + _, + i, + s, + v, + y, + a, + l, + h - 1 + ); + } else { + const _ = [(t[0] + e[0]) / 2, (t[1] + e[1]) / 2], y = this.transformInv_(_), p = [(i[0] + s[0]) / 2, (i[1] + s[1]) / 2], v = this.transformInv_(p); + this.addQuad_( + t, + _, + p, + s, + r, + y, + v, + l, + h - 1 + ), this.addQuad_( + _, + e, + i, + p, + y, + o, + a, + v, + h - 1 + ); + } + return; + } + } + if (f) { + if (!this.canWrapXInSource_) + return; + this.wrapsXInSource_ = !0; + } + (m & 11) == 0 && this.addTriangle_(t, i, s, r, a, l), (m & 14) == 0 && this.addTriangle_(t, i, e, r, a, o), m && ((m & 13) == 0 && this.addTriangle_(e, s, t, o, l, r), (m & 7) == 0 && this.addTriangle_(e, s, i, o, l, a)); + } + calculateSourceExtent() { + const t = se(); + return this.triangles_.forEach(function(e, i, s) { + const r = e.source; + Ss(t, r[0]), Ss(t, r[1]), Ss(t, r[2]); + }), t; + } + getTriangles() { + return this.triangles_; + } +} +const p2 = _2; +let xa; +const hf = []; +function Oc(n, t, e, i, s) { + n.beginPath(), n.moveTo(0, 0), n.lineTo(t, e), n.lineTo(i, s), n.closePath(), n.save(), n.clip(), n.fillRect(0, 0, Math.max(t, i) + 1, Math.max(e, s)), n.restore(); +} +function Ca(n, t) { + return Math.abs(n[t * 4] - 210) > 2 || Math.abs(n[t * 4 + 3] - 0.75 * 255) > 2; +} +function y2() { + if (xa === void 0) { + const n = document.createElement("canvas").getContext("2d"); + n.globalCompositeOperation = "lighter", n.fillStyle = "rgba(210, 0, 0, 0.75)", Oc(n, 4, 5, 4, 0), Oc(n, 4, 5, 0, 5); + const t = n.getImageData(0, 0, 3, 3).data; + xa = Ca(t, 0) || Ca(t, 4) || Ca(t, 8); + } + return xa; +} +function Fc(n, t, e, i) { + const s = _d(e, t, n); + let r = ao( + t, + i, + e + ); + const o = t.getMetersPerUnit(); + o !== void 0 && (r *= o); + const a = n.getMetersPerUnit(); + a !== void 0 && (r /= a); + const l = n.getExtent(); + if (!l || To(l, s)) { + const h = ao(n, r, s) / r; + isFinite(h) && h > 0 && (r /= h); + } + return r; +} +function v2(n, t, e, i) { + const s = Pi(e); + let r = Fc( + n, + t, + s, + i + ); + return (!isFinite(r) || r <= 0) && yl(e, function(o) { + return r = Fc( + n, + t, + o, + i + ), isFinite(r) && r > 0; + }), r; +} +function x2(n, t, e, i, s, r, o, a, l, h, c, u) { + const d = pe( + Math.round(e * n), + Math.round(e * t), + hf + ); + if (u || (d.imageSmoothingEnabled = !1), l.length === 0) + return d.canvas; + d.scale(e, e); + function f(x) { + return Math.round(x * e) / e; + } + d.globalCompositeOperation = "lighter"; + const g = se(); + l.forEach(function(x, C, E) { + Ku(g, x.extent); + }); + const m = pt(g), _ = ze(g), y = pe( + Math.round(e * m / i), + Math.round(e * _ / i) + ); + u || (y.imageSmoothingEnabled = !1); + const p = e / i; + l.forEach(function(x, C, E) { + const R = x.extent[0] - g[0], b = -(x.extent[3] - g[3]), F = pt(x.extent), G = ze(x.extent); + x.image.width > 0 && x.image.height > 0 && y.drawImage( + x.image, + h, + h, + x.image.width - 2 * h, + x.image.height - 2 * h, + R * p, + b * p, + F * p, + G * p + ); + }); + const v = fn(o); + return a.getTriangles().forEach(function(x, C, E) { + const R = x.source, b = x.target; + let F = R[0][0], G = R[0][1], V = R[1][0], L = R[1][1], $ = R[2][0], gt = R[2][1]; + const N = f((b[0][0] - v[0]) / r), k = f( + -(b[0][1] - v[1]) / r + ), P = f((b[1][0] - v[0]) / r), it = f( + -(b[1][1] - v[1]) / r + ), wt = f((b[2][0] - v[0]) / r), yt = f( + -(b[2][1] - v[1]) / r + ), At = F, T = G; + F = 0, G = 0, V -= At, L -= T, $ -= At, gt -= T; + const ce = [ + [V, L, 0, 0, P - N], + [$, gt, 0, 0, wt - N], + [0, 0, V, L, it - k], + [0, 0, $, gt, yt - k] + ], ht = n0(ce); + if (!!ht) { + if (d.save(), d.beginPath(), y2() || !u) { + d.moveTo(P, it); + const _t = 4, ui = N - P, Fe = k - it; + for (let Bt = 0; Bt < _t; Bt++) + d.lineTo( + P + f((Bt + 1) * ui / _t), + it + f(Bt * Fe / (_t - 1)) + ), Bt != _t - 1 && d.lineTo( + P + f((Bt + 1) * ui / _t), + it + f((Bt + 1) * Fe / (_t - 1)) + ); + d.lineTo(wt, yt); + } else + d.moveTo(P, it), d.lineTo(N, k), d.lineTo(wt, yt); + d.clip(), d.transform( + ht[0], + ht[2], + ht[1], + ht[3], + N, + k + ), d.translate( + g[0] - At, + g[3] - T + ), d.scale( + i / e, + -i / e + ), d.drawImage(y.canvas, 0, 0), d.restore(); + } + }), c && (d.save(), d.globalCompositeOperation = "source-over", d.strokeStyle = "black", d.lineWidth = 1, a.getTriangles().forEach(function(x, C, E) { + const R = x.target, b = (R[0][0] - v[0]) / r, F = -(R[0][1] - v[1]) / r, G = (R[1][0] - v[0]) / r, V = -(R[1][1] - v[1]) / r, L = (R[2][0] - v[0]) / r, $ = -(R[2][1] - v[1]) / r; + d.beginPath(), d.moveTo(G, V), d.lineTo(b, F), d.lineTo(L, $), d.closePath(), d.stroke(); + }), d.restore()), d.canvas; +} +class C2 extends Jd { + constructor(t, e, i, s, r, o, a, l, h, c, u, d) { + super(r, z.IDLE, { interpolate: !!d }), this.renderEdges_ = u !== void 0 ? u : !1, this.pixelRatio_ = a, this.gutter_ = l, this.canvas_ = null, this.sourceTileGrid_ = e, this.targetTileGrid_ = s, this.wrappedTileCoord_ = o || r, this.sourceTiles_ = [], this.sourcesListenerKeys_ = null, this.sourceZ_ = 0; + const f = s.getTileCoordExtent( + this.wrappedTileCoord_ + ), g = this.targetTileGrid_.getExtent(); + let m = this.sourceTileGrid_.getExtent(); + const _ = g ? Rs(f, g) : f; + if (La(_) === 0) { + this.state = z.EMPTY; + return; + } + const y = t.getExtent(); + y && (m ? m = Rs(m, y) : m = y); + const p = s.getResolution( + this.wrappedTileCoord_[0] + ), v = v2( + t, + i, + _, + p + ); + if (!isFinite(v) || v <= 0) { + this.state = z.EMPTY; + return; + } + const x = c !== void 0 ? c : g2; + if (this.triangulation_ = new p2( + t, + i, + _, + m, + v * x, + p + ), this.triangulation_.getTriangles().length === 0) { + this.state = z.EMPTY; + return; + } + this.sourceZ_ = e.getZForResolution(v); + let C = this.triangulation_.calculateSourceExtent(); + if (m && (t.canWrapX() ? (C[1] = Et( + C[1], + m[1], + m[3] + ), C[3] = Et( + C[3], + m[1], + m[3] + )) : C = Rs(C, m)), !La(C)) + this.state = z.EMPTY; + else { + const E = e.getTileRangeForExtentAndZ( + C, + this.sourceZ_ + ); + for (let R = E.minX; R <= E.maxX; R++) + for (let b = E.minY; b <= E.maxY; b++) { + const F = h(this.sourceZ_, R, b, a); + F && this.sourceTiles_.push(F); + } + this.sourceTiles_.length === 0 && (this.state = z.EMPTY); + } + } + getImage() { + return this.canvas_; + } + reproject_() { + const t = []; + if (this.sourceTiles_.forEach( + function(e, i, s) { + e && e.getState() == z.LOADED && t.push({ + extent: this.sourceTileGrid_.getTileCoordExtent(e.tileCoord), + image: e.getImage() + }); + }.bind(this) + ), this.sourceTiles_.length = 0, t.length === 0) + this.state = z.ERROR; + else { + const e = this.wrappedTileCoord_[0], i = this.targetTileGrid_.getTileSize(e), s = typeof i == "number" ? i : i[0], r = typeof i == "number" ? i : i[1], o = this.targetTileGrid_.getResolution(e), a = this.sourceTileGrid_.getResolution( + this.sourceZ_ + ), l = this.targetTileGrid_.getTileCoordExtent( + this.wrappedTileCoord_ + ); + this.canvas_ = x2( + s, + r, + this.pixelRatio_, + a, + this.sourceTileGrid_.getExtent(), + o, + l, + this.triangulation_, + t, + this.gutter_, + this.renderEdges_, + this.interpolate + ), this.state = z.LOADED; + } + this.changed(); + } + load() { + if (this.state == z.IDLE) { + this.state = z.LOADING, this.changed(); + let t = 0; + this.sourcesListenerKeys_ = [], this.sourceTiles_.forEach( + function(e, i, s) { + const r = e.getState(); + if (r == z.IDLE || r == z.LOADING) { + t++; + const o = et( + e, + U.CHANGE, + function(a) { + const l = e.getState(); + (l == z.LOADED || l == z.ERROR || l == z.EMPTY) && (mt(o), t--, t === 0 && (this.unlistenSources_(), this.reproject_())); + }, + this + ); + this.sourcesListenerKeys_.push(o); + } + }.bind(this) + ), t === 0 ? setTimeout(this.reproject_.bind(this), 0) : this.sourceTiles_.forEach(function(e, i, s) { + e.getState() == z.IDLE && e.load(); + }); + } + } + unlistenSources_() { + this.sourcesListenerKeys_.forEach(mt), this.sourcesListenerKeys_ = null; + } + release() { + this.canvas_ && (hd(this.canvas_.getContext("2d")), hf.push(this.canvas_), this.canvas_ = null), super.release(); + } +} +const Xa = C2, Ma = { + TILELOADSTART: "tileloadstart", + TILELOADEND: "tileloadend", + TILELOADERROR: "tileloaderror" +}, M2 = [0, 0, 0], yi = 5; +class E2 { + constructor(t) { + this.minZoom = t.minZoom !== void 0 ? t.minZoom : 0, this.resolutions_ = t.resolutions, Y( + Pg( + this.resolutions_, + function(s, r) { + return r - s; + }, + !0 + ), + 17 + ); + let e; + if (!t.origins) { + for (let s = 0, r = this.resolutions_.length - 1; s < r; ++s) + if (!e) + e = this.resolutions_[s] / this.resolutions_[s + 1]; + else if (this.resolutions_[s] / this.resolutions_[s + 1] !== e) { + e = void 0; + break; + } + } + this.zoomFactor_ = e, this.maxZoom = this.resolutions_.length - 1, this.origin_ = t.origin !== void 0 ? t.origin : null, this.origins_ = null, t.origins !== void 0 && (this.origins_ = t.origins, Y(this.origins_.length == this.resolutions_.length, 20)); + const i = t.extent; + i !== void 0 && !this.origin_ && !this.origins_ && (this.origin_ = fn(i)), Y( + !this.origin_ && this.origins_ || this.origin_ && !this.origins_, + 18 + ), this.tileSizes_ = null, t.tileSizes !== void 0 && (this.tileSizes_ = t.tileSizes, Y(this.tileSizes_.length == this.resolutions_.length, 19)), this.tileSize_ = t.tileSize !== void 0 ? t.tileSize : this.tileSizes_ ? null : Sl, Y( + !this.tileSize_ && this.tileSizes_ || this.tileSize_ && !this.tileSizes_, + 22 + ), this.extent_ = i !== void 0 ? i : null, this.fullTileRanges_ = null, this.tmpSize_ = [0, 0], this.tmpExtent_ = [0, 0, 0, 0], t.sizes !== void 0 ? this.fullTileRanges_ = t.sizes.map(function(s, r) { + const o = new sf( + Math.min(0, s[0]), + Math.max(s[0] - 1, -1), + Math.min(0, s[1]), + Math.max(s[1] - 1, -1) + ); + if (i) { + const a = this.getTileRangeForExtentAndZ(i, r); + o.minX = Math.max(a.minX, o.minX), o.maxX = Math.min(a.maxX, o.maxX), o.minY = Math.max(a.minY, o.minY), o.maxY = Math.min(a.maxY, o.maxY); + } + return o; + }, this) : i && this.calculateTileRanges_(i); + } + forEachTileCoord(t, e, i) { + const s = this.getTileRangeForExtentAndZ(t, e); + for (let r = s.minX, o = s.maxX; r <= o; ++r) + for (let a = s.minY, l = s.maxY; a <= l; ++a) + i([e, r, a]); + } + forEachTileCoordParentTileRange(t, e, i, s) { + let r, o, a, l = null, h = t[0] - 1; + for (this.zoomFactor_ === 2 ? (o = t[1], a = t[2]) : l = this.getTileCoordExtent(t, s); h >= this.minZoom; ) { + if (this.zoomFactor_ === 2 ? (o = Math.floor(o / 2), a = Math.floor(a / 2), r = wn(o, o, a, a, i)) : r = this.getTileRangeForExtentAndZ( + l, + h, + i + ), e(h, r)) + return !0; + --h; + } + return !1; + } + getExtent() { + return this.extent_; + } + getMaxZoom() { + return this.maxZoom; + } + getMinZoom() { + return this.minZoom; + } + getOrigin(t) { + return this.origin_ ? this.origin_ : this.origins_[t]; + } + getResolution(t) { + return this.resolutions_[t]; + } + getResolutions() { + return this.resolutions_; + } + getTileCoordChildTileRange(t, e, i) { + if (t[0] < this.maxZoom) { + if (this.zoomFactor_ === 2) { + const r = t[1] * 2, o = t[2] * 2; + return wn( + r, + r + 1, + o, + o + 1, + e + ); + } + const s = this.getTileCoordExtent( + t, + i || this.tmpExtent_ + ); + return this.getTileRangeForExtentAndZ( + s, + t[0] + 1, + e + ); + } + return null; + } + getTileRangeForTileCoordAndZ(t, e, i) { + if (e > this.maxZoom || e < this.minZoom) + return null; + const s = t[0], r = t[1], o = t[2]; + if (e === s) + return wn( + r, + o, + r, + o, + i + ); + if (this.zoomFactor_) { + const l = Math.pow(this.zoomFactor_, e - s), h = Math.floor(r * l), c = Math.floor(o * l); + if (e < s) + return wn(h, h, c, c, i); + const u = Math.floor(l * (r + 1)) - 1, d = Math.floor(l * (o + 1)) - 1; + return wn(h, u, c, d, i); + } + const a = this.getTileCoordExtent(t, this.tmpExtent_); + return this.getTileRangeForExtentAndZ(a, e, i); + } + getTileRangeExtent(t, e, i) { + const s = this.getOrigin(t), r = this.getResolution(t), o = fe(this.getTileSize(t), this.tmpSize_), a = s[0] + e.minX * o[0] * r, l = s[0] + (e.maxX + 1) * o[0] * r, h = s[1] + e.minY * o[1] * r, c = s[1] + (e.maxY + 1) * o[1] * r; + return _e(a, h, l, c, i); + } + getTileRangeForExtentAndZ(t, e, i) { + const s = M2; + this.getTileCoordForXYAndZ_(t[0], t[3], e, !1, s); + const r = s[1], o = s[2]; + return this.getTileCoordForXYAndZ_(t[2], t[1], e, !0, s), wn( + r, + s[1], + o, + s[2], + i + ); + } + getTileCoordCenter(t) { + const e = this.getOrigin(t[0]), i = this.getResolution(t[0]), s = fe(this.getTileSize(t[0]), this.tmpSize_); + return [ + e[0] + (t[1] + 0.5) * s[0] * i, + e[1] - (t[2] + 0.5) * s[1] * i + ]; + } + getTileCoordExtent(t, e) { + const i = this.getOrigin(t[0]), s = this.getResolution(t[0]), r = fe(this.getTileSize(t[0]), this.tmpSize_), o = i[0] + t[1] * r[0] * s, a = i[1] - (t[2] + 1) * r[1] * s, l = o + r[0] * s, h = a + r[1] * s; + return _e(o, a, l, h, e); + } + getTileCoordForCoordAndResolution(t, e, i) { + return this.getTileCoordForXYAndResolution_( + t[0], + t[1], + e, + !1, + i + ); + } + getTileCoordForXYAndResolution_(t, e, i, s, r) { + const o = this.getZForResolution(i), a = i / this.getResolution(o), l = this.getOrigin(o), h = fe(this.getTileSize(o), this.tmpSize_); + let c = a * (t - l[0]) / i / h[0], u = a * (l[1] - e) / i / h[1]; + return s ? (c = Sr(c, yi) - 1, u = Sr(u, yi) - 1) : (c = wr(c, yi), u = wr(u, yi)), Cc(o, c, u, r); + } + getTileCoordForXYAndZ_(t, e, i, s, r) { + const o = this.getOrigin(i), a = this.getResolution(i), l = fe(this.getTileSize(i), this.tmpSize_); + let h = (t - o[0]) / a / l[0], c = (o[1] - e) / a / l[1]; + return s ? (h = Sr(h, yi) - 1, c = Sr(c, yi) - 1) : (h = wr(h, yi), c = wr(c, yi)), Cc(i, h, c, r); + } + getTileCoordForCoordAndZ(t, e, i) { + return this.getTileCoordForXYAndZ_( + t[0], + t[1], + e, + !1, + i + ); + } + getTileCoordResolution(t) { + return this.resolutions_[t[0]]; + } + getTileSize(t) { + return this.tileSize_ ? this.tileSize_ : this.tileSizes_[t]; + } + getFullTileRange(t) { + return this.fullTileRanges_ ? this.fullTileRanges_[t] : this.extent_ ? this.getTileRangeForExtentAndZ(this.extent_, t) : null; + } + getZForResolution(t, e) { + const i = gl( + this.resolutions_, + t, + e || 0 + ); + return Et(i, this.minZoom, this.maxZoom); + } + tileCoordIntersectsViewport(t, e) { + return Td( + e, + 0, + e.length, + 2, + this.getTileCoordExtent(t) + ); + } + calculateTileRanges_(t) { + const e = this.resolutions_.length, i = new Array(e); + for (let s = this.minZoom; s < e; ++s) + i[s] = this.getTileRangeForExtentAndZ(t, s); + this.fullTileRanges_ = i; + } +} +const cf = E2; +function uf(n) { + let t = n.getDefaultTileGrid(); + return t || (t = T2(n), n.setDefaultTileGrid(t)), t; +} +function w2(n, t, e) { + const i = t[0], s = n.getTileCoordCenter(t), r = df(e); + if (To(r, s)) + return t; + { + const o = pt(r), a = Math.ceil( + (r[0] - s[0]) / o + ); + return s[0] += o * a, n.getTileCoordForCoordAndZ(s, i); + } +} +function S2(n, t, e, i) { + i = i !== void 0 ? i : "top-left"; + const s = R2(n, t, e); + return new cf({ + extent: n, + origin: Kg(n, i), + resolutions: s, + tileSize: e + }); +} +function R2(n, t, e, i) { + t = t !== void 0 ? t : k0, e = fe(e !== void 0 ? e : Sl); + const s = ze(n), r = pt(n); + i = i > 0 ? i : Math.max(r / e[0], s / e[1]); + const o = t + 1, a = new Array(o); + for (let l = 0; l < o; ++l) + a[l] = i / Math.pow(2, l); + return a; +} +function T2(n, t, e, i) { + const s = df(n); + return S2(s, t, e, i); +} +function df(n) { + n = Q(n); + let t = n.getExtent(); + if (!t) { + const e = 180 * Yn.degrees / n.getMetersPerUnit(); + t = _e(-e, -e, e, e); + } + return t; +} +class b2 extends Kd { + constructor(t) { + super({ + attributions: t.attributions, + attributionsCollapsible: t.attributionsCollapsible, + projection: t.projection, + state: t.state, + wrapX: t.wrapX, + interpolate: t.interpolate + }), this.on, this.once, this.un, this.opaque_ = t.opaque !== void 0 ? t.opaque : !1, this.tilePixelRatio_ = t.tilePixelRatio !== void 0 ? t.tilePixelRatio : 1, this.tileGrid = t.tileGrid !== void 0 ? t.tileGrid : null; + const e = [256, 256]; + this.tileGrid && fe(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()), e), this.tileCache = new ef(t.cacheSize || 0), this.tmpSize = [0, 0], this.key_ = t.key || "", this.tileOptions = { + transition: t.transition, + interpolate: t.interpolate + }, this.zDirection = t.zDirection ? t.zDirection : 0; + } + canExpireCache() { + return this.tileCache.canExpireCache(); + } + expireCache(t, e) { + const i = this.getTileCacheForProjection(t); + i && i.expireCache(e); + } + forEachLoadedTile(t, e, i, s) { + const r = this.getTileCacheForProjection(t); + if (!r) + return !1; + let o = !0, a, l, h; + for (let c = i.minX; c <= i.maxX; ++c) + for (let u = i.minY; u <= i.maxY; ++u) + l = ko(e, c, u), h = !1, r.containsKey(l) && (a = r.get(l), h = a.getState() === z.LOADED, h && (h = s(a) !== !1)), h || (o = !1); + return o; + } + getGutterForProjection(t) { + return 0; + } + getKey() { + return this.key_; + } + setKey(t) { + this.key_ !== t && (this.key_ = t, this.changed()); + } + getOpaque(t) { + return this.opaque_; + } + getResolutions() { + return this.tileGrid ? this.tileGrid.getResolutions() : null; + } + getTile(t, e, i, s, r) { + return H(); + } + getTileGrid() { + return this.tileGrid; + } + getTileGridForProjection(t) { + return this.tileGrid ? this.tileGrid : uf(t); + } + getTileCacheForProjection(t) { + const e = this.getProjection(); + return Y( + e === null || Ne(e, t), + 68 + ), this.tileCache; + } + getTilePixelRatio(t) { + return this.tilePixelRatio_; + } + getTilePixelSize(t, e, i) { + const s = this.getTileGridForProjection(i), r = this.getTilePixelRatio(e), o = fe(s.getTileSize(t), this.tmpSize); + return r == 1 ? o : vm(o, r, this.tmpSize); + } + getTileCoordForTileUrlFunction(t, e) { + e = e !== void 0 ? e : this.getProjection(); + const i = this.getTileGridForProjection(e); + return this.getWrapX() && e.isGlobal() && (t = w2(i, t, e)), W_(t, i) ? t : null; + } + clear() { + this.tileCache.clear(); + } + refresh() { + this.clear(), super.refresh(); + } + updateCacheSize(t, e) { + const i = this.getTileCacheForProjection(e); + t > i.highWaterMark && (i.highWaterMark = t); + } + useTile(t, e, i, s) { + } +} +class L2 extends Re { + constructor(t, e) { + super(t), this.tile = e; + } +} +const I2 = b2; +function P2(n, t) { + const e = /\{z\}/g, i = /\{x\}/g, s = /\{y\}/g, r = /\{-y\}/g; + return function(o, a, l) { + if (o) + return n.replace(e, o[0].toString()).replace(i, o[1].toString()).replace(s, o[2].toString()).replace(r, function() { + const h = o[0], c = t.getFullTileRange(h); + return Y(c, 55), (c.getHeight() - o[2] - 1).toString(); + }); + }; +} +function A2(n, t) { + const e = n.length, i = new Array(e); + for (let s = 0; s < e; ++s) + i[s] = P2(n[s], t); + return Ya(i); +} +function Ya(n) { + return n.length === 1 ? n[0] : function(t, e, i) { + if (t) { + const s = U_(t), r = qi(s, n.length); + return n[r](t, e, i); + } else + return; + }; +} +function ff(n) { + const t = []; + let e = /\{([a-z])-([a-z])\}/.exec(n); + if (e) { + const i = e[1].charCodeAt(0), s = e[2].charCodeAt(0); + let r; + for (r = i; r <= s; ++r) + t.push(n.replace(e[0], String.fromCharCode(r))); + return t; + } + if (e = /\{(\d+)-(\d+)\}/.exec(n), e) { + const i = parseInt(e[2], 10); + for (let s = parseInt(e[1], 10); s <= i; s++) + t.push(n.replace(e[0], s.toString())); + return t; + } + return t.push(n), t; +} +class eh extends I2 { + constructor(t) { + super({ + attributions: t.attributions, + cacheSize: t.cacheSize, + opaque: t.opaque, + projection: t.projection, + state: t.state, + tileGrid: t.tileGrid, + tilePixelRatio: t.tilePixelRatio, + wrapX: t.wrapX, + transition: t.transition, + interpolate: t.interpolate, + key: t.key, + attributionsCollapsible: t.attributionsCollapsible, + zDirection: t.zDirection + }), this.generateTileUrlFunction_ = this.tileUrlFunction === eh.prototype.tileUrlFunction, this.tileLoadFunction = t.tileLoadFunction, t.tileUrlFunction && (this.tileUrlFunction = t.tileUrlFunction), this.urls = null, t.urls ? this.setUrls(t.urls) : t.url && this.setUrl(t.url), this.tileLoadingKeys_ = {}; + } + getTileLoadFunction() { + return this.tileLoadFunction; + } + getTileUrlFunction() { + return Object.getPrototypeOf(this).tileUrlFunction === this.tileUrlFunction ? this.tileUrlFunction.bind(this) : this.tileUrlFunction; + } + getUrls() { + return this.urls; + } + handleTileChange(t) { + const e = t.target, i = q(e), s = e.getState(); + let r; + s == z.LOADING ? (this.tileLoadingKeys_[i] = !0, r = Ma.TILELOADSTART) : i in this.tileLoadingKeys_ && (delete this.tileLoadingKeys_[i], r = s == z.ERROR ? Ma.TILELOADERROR : s == z.LOADED ? Ma.TILELOADEND : void 0), r != null && this.dispatchEvent(new L2(r, e)); + } + setTileLoadFunction(t) { + this.tileCache.clear(), this.tileLoadFunction = t, this.changed(); + } + setTileUrlFunction(t, e) { + this.tileUrlFunction = t, this.tileCache.pruneExceptNewestZ(), typeof e < "u" ? this.setKey(e) : this.changed(); + } + setUrl(t) { + const e = ff(t); + this.urls = e, this.setUrls(e); + } + setUrls(t) { + this.urls = t; + const e = t.join(` +`); + this.generateTileUrlFunction_ ? this.setTileUrlFunction(A2(t, this.tileGrid), e) : this.setKey(e); + } + tileUrlFunction(t, e, i) { + } + useTile(t, e, i) { + const s = ko(t, e, i); + this.tileCache.containsKey(s) && this.tileCache.get(s); + } +} +const O2 = eh; +class F2 extends O2 { + constructor(t) { + super({ + attributions: t.attributions, + cacheSize: t.cacheSize, + opaque: t.opaque, + projection: t.projection, + state: t.state, + tileGrid: t.tileGrid, + tileLoadFunction: t.tileLoadFunction ? t.tileLoadFunction : N2, + tilePixelRatio: t.tilePixelRatio, + tileUrlFunction: t.tileUrlFunction, + url: t.url, + urls: t.urls, + wrapX: t.wrapX, + transition: t.transition, + interpolate: t.interpolate !== void 0 ? t.interpolate : !0, + key: t.key, + attributionsCollapsible: t.attributionsCollapsible, + zDirection: t.zDirection + }), this.crossOrigin = t.crossOrigin !== void 0 ? t.crossOrigin : null, this.tileClass = t.tileClass !== void 0 ? t.tileClass : Qd, this.tileCacheForProjection = {}, this.tileGridForProjection = {}, this.reprojectionErrorThreshold_ = t.reprojectionErrorThreshold, this.renderReprojectionEdges_ = !1; + } + canExpireCache() { + if (this.tileCache.canExpireCache()) + return !0; + for (const t in this.tileCacheForProjection) + if (this.tileCacheForProjection[t].canExpireCache()) + return !0; + return !1; + } + expireCache(t, e) { + const i = this.getTileCacheForProjection(t); + this.tileCache.expireCache( + this.tileCache == i ? e : {} + ); + for (const s in this.tileCacheForProjection) { + const r = this.tileCacheForProjection[s]; + r.expireCache(r == i ? e : {}); + } + } + getGutterForProjection(t) { + return this.getProjection() && t && !Ne(this.getProjection(), t) ? 0 : this.getGutter(); + } + getGutter() { + return 0; + } + getKey() { + let t = super.getKey(); + return this.getInterpolate() || (t += ":disable-interpolation"), t; + } + getOpaque(t) { + return this.getProjection() && t && !Ne(this.getProjection(), t) ? !1 : super.getOpaque(t); + } + getTileGridForProjection(t) { + const e = this.getProjection(); + if (this.tileGrid && (!e || Ne(e, t))) + return this.tileGrid; + { + const i = q(t); + return i in this.tileGridForProjection || (this.tileGridForProjection[i] = uf(t)), this.tileGridForProjection[i]; + } + } + getTileCacheForProjection(t) { + const e = this.getProjection(); + if (!e || Ne(e, t)) + return this.tileCache; + { + const i = q(t); + return i in this.tileCacheForProjection || (this.tileCacheForProjection[i] = new ef( + this.tileCache.highWaterMark + )), this.tileCacheForProjection[i]; + } + } + createTile_(t, e, i, s, r, o) { + const a = [t, e, i], l = this.getTileCoordForTileUrlFunction( + a, + r + ), h = l ? this.tileUrlFunction(l, s, r) : void 0, c = new this.tileClass( + a, + h !== void 0 ? z.IDLE : z.EMPTY, + h !== void 0 ? h : "", + this.crossOrigin, + this.tileLoadFunction, + this.tileOptions + ); + return c.key = o, c.addEventListener(U.CHANGE, this.handleTileChange.bind(this)), c; + } + getTile(t, e, i, s, r) { + const o = this.getProjection(); + if (!o || !r || Ne(o, r)) + return this.getTileInternal( + t, + e, + i, + s, + o || r + ); + { + const a = this.getTileCacheForProjection(r), l = [t, e, i]; + let h; + const c = tf(l); + a.containsKey(c) && (h = a.get(c)); + const u = this.getKey(); + if (h && h.key == u) + return h; + { + const d = this.getTileGridForProjection(o), f = this.getTileGridForProjection(r), g = this.getTileCoordForTileUrlFunction( + l, + r + ), m = new Xa( + o, + d, + r, + f, + l, + g, + this.getTilePixelRatio(s), + this.getGutter(), + function(_, y, p, v) { + return this.getTileInternal(_, y, p, v, o); + }.bind(this), + this.reprojectionErrorThreshold_, + this.renderReprojectionEdges_, + this.getInterpolate() + ); + return m.key = u, h ? (m.interimTile = h, m.refreshInterimChain(), a.replace(c, m)) : a.set(c, m), m; + } + } + } + getTileInternal(t, e, i, s, r) { + let o = null; + const a = ko(t, e, i), l = this.getKey(); + if (!this.tileCache.containsKey(a)) + o = this.createTile_(t, e, i, s, r, l), this.tileCache.set(a, o); + else if (o = this.tileCache.get(a), o.key != l) { + const h = o; + o = this.createTile_(t, e, i, s, r, l), h.getState() == z.IDLE ? o.interimTile = h.interimTile : o.interimTile = h, o.refreshInterimChain(), this.tileCache.replace(a, o); + } + return o; + } + setRenderReprojectionEdges(t) { + if (this.renderReprojectionEdges_ != t) { + this.renderReprojectionEdges_ = t; + for (const e in this.tileCacheForProjection) + this.tileCacheForProjection[e].clear(); + this.changed(); + } + } + setTileGridForProjection(t, e) { + const i = Q(t); + if (i) { + const s = q(i); + s in this.tileGridForProjection || (this.tileGridForProjection[s] = e); + } + } + clear() { + super.clear(); + for (const t in this.tileCacheForProjection) + this.tileCacheForProjection[t].clear(); + } +} +function N2(n, t) { + n.getImage().src = t; +} +const D2 = F2; +class k2 extends Ve { + constructor(t) { + super({ + attributions: t.attributions, + wrapX: t.wrapX + }), this.resolution = void 0, this.distance = t.distance !== void 0 ? t.distance : 20, this.minDistance = t.minDistance || 0, this.interpolationRatio = 0, this.features = [], this.geometryFunction = t.geometryFunction || function(e) { + const i = e.getGeometry(); + return Y(i.getType() == "Point", 10), i; + }, this.createCustomCluster_ = t.createCluster, this.source = null, this.boundRefresh_ = this.refresh.bind(this), this.updateDistance(this.distance, this.minDistance), this.setSource(t.source || null); + } + clear(t) { + this.features.length = 0, super.clear(t); + } + getDistance() { + return this.distance; + } + getSource() { + return this.source; + } + loadFeatures(t, e, i) { + this.source.loadFeatures(t, e, i), e !== this.resolution && (this.resolution = e, this.refresh()); + } + setDistance(t) { + this.updateDistance(t, this.minDistance); + } + setMinDistance(t) { + this.updateDistance(this.distance, t); + } + getMinDistance() { + return this.minDistance; + } + setSource(t) { + this.source && this.source.removeEventListener(U.CHANGE, this.boundRefresh_), this.source = t, t && t.addEventListener(U.CHANGE, this.boundRefresh_), this.refresh(); + } + refresh() { + this.clear(), this.cluster(), this.addFeatures(this.features); + } + updateDistance(t, e) { + const i = t === 0 ? 0 : Math.min(e, t) / t, s = t !== this.distance || this.interpolationRatio !== i; + this.distance = t, this.minDistance = e, this.interpolationRatio = i, s && this.refresh(); + } + cluster() { + if (this.resolution === void 0 || !this.source) + return; + const t = se(), e = this.distance * this.resolution, i = this.source.getFeatures(), s = {}; + for (let r = 0, o = i.length; r < o; r++) { + const a = i[r]; + if (!(q(a) in s)) { + const l = this.geometryFunction(a); + if (l) { + const h = l.getCoordinates(); + ws(h, t), Js(t, e, t); + const c = this.source.getFeaturesInExtent(t).filter(function(u) { + const d = q(u); + return d in s ? !1 : (s[d] = !0, !0); + }); + this.features.push(this.createCluster(c, t)); + } + } + } + } + createCluster(t, e) { + const i = [0, 0]; + for (let a = t.length - 1; a >= 0; --a) { + const l = this.geometryFunction(t[a]); + l ? nd(i, l.getCoordinates()) : t.splice(a, 1); + } + sd(i, 1 / t.length); + const s = Pi(e), r = this.interpolationRatio, o = new Se([ + i[0] * (1 - r) + s[0] * r, + i[1] * (1 - r) + s[1] * r + ]); + return this.createCustomCluster_ ? this.createCustomCluster_(o, t) : new Ie({ + geometry: o, + features: t + }); + } +} +const G2 = k2; +function Nc(n, t) { + const e = []; + Object.keys(t).forEach(function(s) { + t[s] !== null && t[s] !== void 0 && e.push(s + "=" + encodeURIComponent(t[s])); + }); + const i = e.join("&"); + return n = n.replace(/[?&]$/, ""), n += n.includes("?") ? "&" : "?", n + i; +} +const Gr = { + PRELOAD: "preload", + USE_INTERIM_TILES_ON_ERROR: "useInterimTilesOnError" +}; +class $2 extends Po { + constructor(t) { + t = t || {}; + const e = Object.assign({}, t); + delete e.preload, delete e.useInterimTilesOnError, super(e), this.on, this.once, this.un, this.setPreload(t.preload !== void 0 ? t.preload : 0), this.setUseInterimTilesOnError( + t.useInterimTilesOnError !== void 0 ? t.useInterimTilesOnError : !0 + ); + } + getPreload() { + return this.get(Gr.PRELOAD); + } + setPreload(t) { + this.set(Gr.PRELOAD, t); + } + getUseInterimTilesOnError() { + return this.get(Gr.USE_INTERIM_TILES_ON_ERROR); + } + setUseInterimTilesOnError(t) { + this.set(Gr.USE_INTERIM_TILES_ON_ERROR, t); + } + getData(t) { + return super.getData(t); + } +} +const B2 = $2; +class z2 extends Yd { + constructor(t) { + super(t), this.extentChanged = !0, this.renderedExtent_ = null, this.renderedPixelRatio, this.renderedProjection = null, this.renderedRevision, this.renderedTiles = [], this.newTiles_ = !1, this.tmpExtent = se(), this.tmpTileRange_ = new sf(0, 0, 0, 0); + } + isDrawableTile(t) { + const e = this.getLayer(), i = t.getState(), s = e.getUseInterimTilesOnError(); + return i == z.LOADED || i == z.EMPTY || i == z.ERROR && !s; + } + getTile(t, e, i, s) { + const r = s.pixelRatio, o = s.viewState.projection, a = this.getLayer(); + let h = a.getSource().getTile(t, e, i, r, o); + return h.getState() == z.ERROR && a.getUseInterimTilesOnError() && a.getPreload() > 0 && (this.newTiles_ = !0), this.isDrawableTile(h) || (h = h.getInterimTile()), h; + } + getData(t) { + const e = this.frameState; + if (!e) + return null; + const i = this.getLayer(), s = Nt( + e.pixelToCoordinateTransform, + t.slice() + ), r = i.getExtent(); + if (r && !To(r, s)) + return null; + const o = e.pixelRatio, a = e.viewState.projection, l = e.viewState, h = i.getRenderSource(), c = h.getTileGridForProjection(l.projection), u = h.getTilePixelRatio(e.pixelRatio); + for (let d = c.getZForResolution(l.resolution); d >= c.getMinZoom(); --d) { + const f = c.getTileCoordForCoordAndZ(s, d), g = h.getTile( + d, + f[1], + f[2], + o, + a + ); + if (!(g instanceof Qd || g instanceof Xa) || g instanceof Xa && g.getState() === z.EMPTY) + return null; + if (g.getState() !== z.LOADED) + continue; + const m = c.getOrigin(d), _ = fe(c.getTileSize(d)), y = c.getResolution(d), p = Math.floor( + u * ((s[0] - m[0]) / y - f[1] * _[0]) + ), v = Math.floor( + u * ((m[1] - s[1]) / y - f[2] * _[1]) + ), x = Math.round( + u * h.getGutterForProjection(l.projection) + ); + return this.getImageData(g.getImage(), p + x, v + x); + } + return null; + } + loadedTileCallback(t, e, i) { + return this.isDrawableTile(i) ? super.loadedTileCallback(t, e, i) : !1; + } + prepareFrame(t) { + return !!this.getLayer().getSource(); + } + renderFrame(t, e) { + const i = t.layerStatesArray[t.layerIndex], s = t.viewState, r = s.projection, o = s.resolution, a = s.center, l = s.rotation, h = t.pixelRatio, c = this.getLayer(), u = c.getSource(), d = u.getRevision(), f = u.getTileGridForProjection(r), g = f.getZForResolution(o, u.zDirection), m = f.getResolution(g); + let _ = t.extent; + const y = t.viewState.resolution, p = u.getTilePixelRatio(h), v = Math.round(pt(_) / y * h), x = Math.round(ze(_) / y * h), C = i.extent && Mi(i.extent); + C && (_ = Rs( + _, + Mi(i.extent) + )); + const E = m * v / 2 / p, R = m * x / 2 / p, b = [ + a[0] - E, + a[1] - R, + a[0] + E, + a[1] + R + ], F = f.getTileRangeForExtentAndZ(_, g), G = {}; + G[g] = {}; + const V = this.createLoadedTileFinder( + u, + r, + G + ), L = this.tmpExtent, $ = this.tmpTileRange_; + this.newTiles_ = !1; + const gt = l ? Pa( + s.center, + y, + l, + t.size + ) : void 0; + for (let ce = F.minX; ce <= F.maxX; ++ce) + for (let ht = F.minY; ht <= F.maxY; ++ht) { + if (l && !f.tileCoordIntersectsViewport([g, ce, ht], gt)) + continue; + const _t = this.getTile(g, ce, ht, t); + if (this.isDrawableTile(_t)) { + const Bt = q(this); + if (_t.getState() == z.LOADED) { + G[g][_t.tileCoord.toString()] = _t; + let Xe = _t.inTransition(Bt); + Xe && i.opacity !== 1 && (_t.endTransition(Bt), Xe = !1), !this.newTiles_ && (Xe || !this.renderedTiles.includes(_t)) && (this.newTiles_ = !0); + } + if (_t.getAlpha(Bt, t.time) === 1) + continue; + } + const ui = f.getTileCoordChildTileRange( + _t.tileCoord, + $, + L + ); + let Fe = !1; + ui && (Fe = V(g + 1, ui)), Fe || f.forEachTileCoordParentTileRange( + _t.tileCoord, + V, + $, + L + ); + } + const N = m / o * h / p; + Ii( + this.pixelTransform, + t.size[0] / 2, + t.size[1] / 2, + 1 / h, + 1 / h, + l, + -v / 2, + -x / 2 + ); + const k = Yu(this.pixelTransform); + this.useContainer(e, k, this.getBackground(t)); + const P = this.context, it = P.canvas; + _l(this.inversePixelTransform, this.pixelTransform), Ii( + this.tempTransform, + v / 2, + x / 2, + N, + N, + 0, + -v / 2, + -x / 2 + ), it.width != v || it.height != x ? (it.width = v, it.height = x) : this.containerReused || P.clearRect(0, 0, v, x), C && this.clipUnrotated(P, t, C), u.getInterpolate() || (P.imageSmoothingEnabled = !1), this.preRender(P, t), this.renderedTiles.length = 0; + let wt = Object.keys(G).map(Number); + wt.sort(tn); + let yt, At, T; + i.opacity === 1 && (!this.containerReused || u.getOpaque(t.viewState.projection)) ? wt = wt.reverse() : (yt = [], At = []); + for (let ce = wt.length - 1; ce >= 0; --ce) { + const ht = wt[ce], _t = u.getTilePixelSize( + ht, + h, + r + ), Fe = f.getResolution(ht) / m, Bt = _t[0] * Fe * N, Xe = _t[1] * Fe * N, mn = f.getTileCoordForCoordAndZ( + fn(b), + ht + ), mr = f.getTileCoordExtent(mn), _n = Nt(this.tempTransform, [ + p * (mr[0] - b[0]) / m, + p * (b[3] - mr[3]) / m + ]), _r = p * u.getGutterForProjection(r), di = G[ht]; + for (const hs in di) { + const fi = di[hs], pr = fi.tileCoord, yr = mn[1] - pr[1], vr = Math.round(_n[0] - (yr - 1) * Bt), pn = mn[2] - pr[2], Yo = Math.round(_n[1] - (pn - 1) * Xe), te = Math.round(_n[0] - yr * Bt), ye = Math.round(_n[1] - pn * Xe), Te = vr - te, Ye = Yo - ye, yn = g === ht, Gi = yn && fi.getAlpha(q(this), t.time) !== 1; + let gi = !1; + if (!Gi) + if (yt) { + T = [te, ye, te + Te, ye, te + Te, ye + Ye, te, ye + Ye]; + for (let vn = 0, xr = yt.length; vn < xr; ++vn) + if (g !== ht && ht < At[vn]) { + const Yt = yt[vn]; + Kt( + [te, ye, te + Te, ye + Ye], + [Yt[0], Yt[3], Yt[4], Yt[7]] + ) && (gi || (P.save(), gi = !0), P.beginPath(), P.moveTo(T[0], T[1]), P.lineTo(T[2], T[3]), P.lineTo(T[4], T[5]), P.lineTo(T[6], T[7]), P.moveTo(Yt[6], Yt[7]), P.lineTo(Yt[4], Yt[5]), P.lineTo(Yt[2], Yt[3]), P.lineTo(Yt[0], Yt[1]), P.clip()); + } + yt.push(T), At.push(ht); + } else + P.clearRect(te, ye, Te, Ye); + this.drawTileImage( + fi, + t, + te, + ye, + Te, + Ye, + _r, + yn + ), yt && !Gi ? (gi && P.restore(), this.renderedTiles.unshift(fi)) : this.renderedTiles.push(fi), this.updateUsedTiles(t.usedTiles, u, fi); + } + } + return this.renderedRevision = d, this.renderedResolution = m, this.extentChanged = !this.renderedExtent_ || !Fs(this.renderedExtent_, b), this.renderedExtent_ = b, this.renderedPixelRatio = h, this.renderedProjection = r, this.manageTilePyramid( + t, + u, + f, + h, + r, + _, + g, + c.getPreload() + ), this.scheduleExpireCache(t, u), this.postRender(P, t), i.extent && P.restore(), P.imageSmoothingEnabled = !0, k !== it.style.transform && (it.style.transform = k), this.container; + } + drawTileImage(t, e, i, s, r, o, a, l) { + const h = this.getTileImage(t); + if (!h) + return; + const c = q(this), u = e.layerStatesArray[e.layerIndex], d = u.opacity * (l ? t.getAlpha(c, e.time) : 1), f = d !== this.context.globalAlpha; + f && (this.context.save(), this.context.globalAlpha = d), this.context.drawImage( + h, + a, + a, + h.width - 2 * a, + h.height - 2 * a, + i, + s, + r, + o + ), f && this.context.restore(), d !== u.opacity ? e.animate = !0 : l && t.endTransition(c); + } + getImage() { + const t = this.context; + return t ? t.canvas : null; + } + getTileImage(t) { + return t.getImage(); + } + scheduleExpireCache(t, e) { + if (e.canExpireCache()) { + const i = function(s, r, o) { + const a = q(s); + a in o.usedTiles && s.expireCache( + o.viewState.projection, + o.usedTiles[a] + ); + }.bind(null, e); + t.postRenderFunctions.push( + i + ); + } + } + updateUsedTiles(t, e, i) { + const s = q(e); + s in t || (t[s] = {}), t[s][i.getKey()] = !0; + } + manageTilePyramid(t, e, i, s, r, o, a, l, h) { + const c = q(e); + c in t.wantedTiles || (t.wantedTiles[c] = {}); + const u = t.wantedTiles[c], d = t.tileQueue, f = i.getMinZoom(), g = t.viewState.rotation, m = g ? Pa( + t.viewState.center, + t.viewState.resolution, + g, + t.size + ) : void 0; + let _ = 0, y, p, v, x, C, E; + for (E = f; E <= a; ++E) + for (p = i.getTileRangeForExtentAndZ(o, E, p), v = i.getResolution(E), x = p.minX; x <= p.maxX; ++x) + for (C = p.minY; C <= p.maxY; ++C) + g && !i.tileCoordIntersectsViewport([E, x, C], m) || (a - E <= l ? (++_, y = e.getTile(E, x, C, s, r), y.getState() == z.IDLE && (u[y.getKey()] = !0, d.isKeyQueued(y.getKey()) || d.enqueue([ + y, + c, + i.getTileCoordCenter(y.tileCoord), + v + ])), h !== void 0 && h(y)) : e.useTile(E, x, C, r)); + e.updateCacheSize(_, r); + } +} +const Z2 = z2; +class V2 extends B2 { + constructor(t) { + super(t); + } + createRenderer() { + return new Z2(this); + } +} +const U2 = V2; +class W2 extends cf { + constructor(t) { + super({ + extent: t.extent, + origin: t.origin, + origins: t.origins, + resolutions: t.resolutions, + tileSize: t.tileSize, + tileSizes: t.tileSizes, + sizes: t.sizes + }), this.matrixIds_ = t.matrixIds; + } + getMatrixId(t) { + return this.matrixIds_[t]; + } + getMatrixIds() { + return this.matrixIds_; + } +} +function H2(n, t, e) { + const i = [], s = [], r = [], o = [], a = []; + e = e !== void 0 ? e : []; + const l = "SupportedCRS", h = "TileMatrix", c = "Identifier", u = "ScaleDenominator", d = "TopLeftCorner", f = "TileWidth", g = "TileHeight", m = n[l], _ = Q(m), y = _.getMetersPerUnit(), p = _.getAxisOrientation().substr(0, 2) == "ne"; + return n[h].sort(function(v, x) { + return x[u] - v[u]; + }), n[h].forEach(function(v) { + let x; + if (e.length > 0 ? x = e.find(function(C) { + return v[c] == C[h] ? !0 : v[c].includes(":") ? !1 : n[c] + ":" + v[c] === C[h]; + }) : x = !0, x) { + s.push(v[c]); + const C = v[u] * 28e-5 / y, E = v[f], R = v[g]; + p ? r.push([ + v[d][1], + v[d][0] + ]) : r.push(v[d]), i.push(C), o.push( + E == R ? E : [E, R] + ), a.push([v.MatrixWidth, v.MatrixHeight]); + } + }), new W2({ + extent: t, + origins: r, + resolutions: i, + matrixIds: s, + tileSizes: o, + sizes: a + }); +} +class X2 extends D2 { + constructor(t) { + const e = t.requestEncoding !== void 0 ? t.requestEncoding : "KVP", i = t.tileGrid; + let s = t.urls; + s === void 0 && t.url !== void 0 && (s = ff(t.url)), super({ + attributions: t.attributions, + attributionsCollapsible: t.attributionsCollapsible, + cacheSize: t.cacheSize, + crossOrigin: t.crossOrigin, + interpolate: t.interpolate, + projection: t.projection, + reprojectionErrorThreshold: t.reprojectionErrorThreshold, + tileClass: t.tileClass, + tileGrid: i, + tileLoadFunction: t.tileLoadFunction, + tilePixelRatio: t.tilePixelRatio, + urls: s, + wrapX: t.wrapX !== void 0 ? t.wrapX : !1, + transition: t.transition, + zDirection: t.zDirection + }), this.version_ = t.version !== void 0 ? t.version : "1.0.0", this.format_ = t.format !== void 0 ? t.format : "image/jpeg", this.dimensions_ = t.dimensions !== void 0 ? t.dimensions : {}, this.layer_ = t.layer, this.matrixSet_ = t.matrixSet, this.style_ = t.style, this.requestEncoding_ = e, this.setKey(this.getKeyForDimensions_()), s && s.length > 0 && (this.tileUrlFunction = Ya( + s.map(this.createFromWMTSTemplate.bind(this)) + )); + } + setUrls(t) { + this.urls = t; + const e = t.join(` +`); + this.setTileUrlFunction( + Ya( + t.map(this.createFromWMTSTemplate.bind(this)) + ), + e + ); + } + getDimensions() { + return this.dimensions_; + } + getFormat() { + return this.format_; + } + getLayer() { + return this.layer_; + } + getMatrixSet() { + return this.matrixSet_; + } + getRequestEncoding() { + return this.requestEncoding_; + } + getStyle() { + return this.style_; + } + getVersion() { + return this.version_; + } + getKeyForDimensions_() { + let t = 0; + const e = []; + for (const i in this.dimensions_) + e[t++] = i + "-" + this.dimensions_[i]; + return e.join("/"); + } + updateDimensions(t) { + Object.assign(this.dimensions_, t), this.setKey(this.getKeyForDimensions_()); + } + createFromWMTSTemplate(t) { + const e = this.requestEncoding_, i = { + layer: this.layer_, + style: this.style_, + tilematrixset: this.matrixSet_ + }; + e == "KVP" && Object.assign(i, { + Service: "WMTS", + Request: "GetTile", + Version: this.version_, + Format: this.format_ + }), t = e == "KVP" ? Nc(t, i) : t.replace(/\{(\w+?)\}/g, function(o, a) { + return a.toLowerCase() in i ? i[a.toLowerCase()] : o; + }); + const s = this.tileGrid, r = this.dimensions_; + return function(o, a, l) { + if (o) { + const h = { + TileMatrix: s.getMatrixId(o[0]), + TileCol: o[1], + TileRow: o[2] + }; + Object.assign(h, r); + let c = t; + return e == "KVP" ? c = Nc(c, h) : c = c.replace(/\{(\w+?)\}/g, function(u, d) { + return h[d]; + }), c; + } else + return; + }; + } +} +const Y2 = X2; +function j2(n, t) { + const i = n.Contents.Layer.find(function(L) { + return L.Identifier == t.layer; + }); + if (!i) + return null; + const s = n.Contents.TileMatrixSet; + let r; + i.TileMatrixSetLink.length > 1 ? "projection" in t ? r = i.TileMatrixSetLink.findIndex(function(L) { + const gt = s.find(function(P) { + return P.Identifier == L.TileMatrixSet; + }).SupportedCRS, N = Q(gt), k = Q(t.projection); + return N && k ? Ne(N, k) : gt == t.projection; + }) : r = i.TileMatrixSetLink.findIndex(function(L) { + return L.TileMatrixSet == t.matrixSet; + }) : r = 0, r < 0 && (r = 0); + const o = i.TileMatrixSetLink[r].TileMatrixSet, a = i.TileMatrixSetLink[r].TileMatrixSetLimits; + let l = i.Format[0]; + "format" in t && (l = t.format), r = i.Style.findIndex(function(L) { + return "style" in t ? L.Title == t.style : L.isDefault; + }), r < 0 && (r = 0); + const h = i.Style[r].Identifier, c = {}; + "Dimension" in i && i.Dimension.forEach(function(L, $, gt) { + const N = L.Identifier; + let k = L.Default; + k === void 0 && (k = L.Value[0]), c[N] = k; + }); + const d = n.Contents.TileMatrixSet.find(function(L) { + return L.Identifier == o; + }); + let f; + const g = d.SupportedCRS; + if (g && (f = Q(g)), "projection" in t) { + const L = Q(t.projection); + L && (!f || Ne(L, f)) && (f = L); + } + let m = !1; + const _ = f.getAxisOrientation().substr(0, 2) == "ne"; + let y = d.TileMatrix[0], p = { + MinTileCol: 0, + MinTileRow: 0, + MaxTileCol: y.MatrixWidth - 1, + MaxTileRow: y.MatrixHeight - 1 + }; + if (a) { + p = a[a.length - 1]; + const L = d.TileMatrix.find( + ($) => $.Identifier === p.TileMatrix || d.Identifier + ":" + $.Identifier === p.TileMatrix + ); + L && (y = L); + } + const v = y.ScaleDenominator * 28e-5 / f.getMetersPerUnit(), x = _ ? [y.TopLeftCorner[1], y.TopLeftCorner[0]] : y.TopLeftCorner, C = y.TileWidth * v, E = y.TileHeight * v; + let R = d.BoundingBox; + R && _ && (R = [ + R[1], + R[0], + R[3], + R[2] + ]); + let b = [ + x[0] + C * p.MinTileCol, + x[1] - E * (1 + p.MaxTileRow), + x[0] + C * (1 + p.MaxTileCol), + x[1] - E * p.MinTileRow + ]; + if (R !== void 0 && !Vi(R, b)) { + const L = i.WGS84BoundingBox, $ = Q("EPSG:4326").getExtent(); + if (b = R, L) + m = L[0] === $[0] && L[2] === $[2]; + else { + const gt = pd( + R, + d.SupportedCRS, + "EPSG:4326" + ); + m = gt[0] - 1e-10 <= $[0] && gt[2] + 1e-10 >= $[2]; + } + } + const F = H2( + d, + b, + a + ), G = []; + let V = t.requestEncoding; + if (V = V !== void 0 ? V : "", "OperationsMetadata" in n && "GetTile" in n.OperationsMetadata) { + const L = n.OperationsMetadata.GetTile.DCP.HTTP.Get; + for (let $ = 0, gt = L.length; $ < gt; ++$) + if (L[$].Constraint) { + const k = L[$].Constraint.find(function(P) { + return P.name == "GetEncoding"; + }).AllowedValues.Value; + if (V === "" && (V = k[0]), V === "KVP") + k.includes("KVP") && G.push(L[$].href); + else + break; + } else + L[$].href && (V = "KVP", G.push(L[$].href)); + } + return G.length === 0 && (V = "REST", i.ResourceURL.forEach(function(L) { + L.resourceType === "tile" && (l = L.format, G.push(L.template)); + })), { + urls: G, + layer: t.layer, + matrixSet: o, + format: l, + projection: f, + requestEncoding: V, + tileGrid: F, + style: h, + dimensions: c, + wrapX: m, + crossOrigin: t.crossOrigin + }; +} +class gf { + constructor() { + this.dataProjection = void 0, this.defaultFeatureProjection = void 0, this.supportedMediaTypes = null; + } + getReadOptions(t, e) { + if (e) { + let i = e.dataProjection ? Q(e.dataProjection) : this.readProjection(t); + e.extent && i && i.getUnits() === "tile-pixels" && (i = Q(i), i.setWorldExtent(e.extent)), e = { + dataProjection: i, + featureProjection: e.featureProjection + }; + } + return this.adaptOptions(e); + } + adaptOptions(t) { + return Object.assign( + { + dataProjection: this.dataProjection, + featureProjection: this.defaultFeatureProjection + }, + t + ); + } + getType() { + return H(); + } + readFeature(t, e) { + return H(); + } + readFeatures(t, e) { + return H(); + } + readGeometry(t, e) { + return H(); + } + readProjection(t) { + return H(); + } + writeFeature(t, e) { + return H(); + } + writeFeatures(t, e) { + return H(); + } + writeGeometry(t, e) { + return H(); + } +} +function or(n, t, e) { + const i = e ? Q(e.featureProjection) : null, s = e ? Q(e.dataProjection) : null; + let r; + if (i && s && !Ne(i, s) ? r = (t ? n.clone() : n).transform( + t ? i : s, + t ? s : i + ) : r = n, t && e && e.decimals !== void 0) { + const o = Math.pow(10, e.decimals), a = function(l) { + for (let h = 0, c = l.length; h < c; ++h) + l[h] = Math.round(l[h] * o) / o; + return l; + }; + r === n && (r = n.clone()), r.applyTransform(a); + } + return r; +} +function ih(n, t) { + const e = t ? Q(t.featureProjection) : null, i = t ? Q(t.dataProjection) : null; + return e && i && !Ne(e, i) ? pd(n, i, e) : n; +} +class q2 extends gf { + constructor() { + super(); + } + getType() { + return "json"; + } + readFeature(t, e) { + return this.readFeatureFromObject( + $r(t), + this.getReadOptions(t, e) + ); + } + readFeatures(t, e) { + return this.readFeaturesFromObject( + $r(t), + this.getReadOptions(t, e) + ); + } + readFeatureFromObject(t, e) { + return H(); + } + readFeaturesFromObject(t, e) { + return H(); + } + readGeometry(t, e) { + return this.readGeometryFromObject( + $r(t), + this.getReadOptions(t, e) + ); + } + readGeometryFromObject(t, e) { + return H(); + } + readProjection(t) { + return this.readProjectionFromObject($r(t)); + } + readProjectionFromObject(t) { + return H(); + } + writeFeature(t, e) { + return JSON.stringify(this.writeFeatureObject(t, e)); + } + writeFeatureObject(t, e) { + return H(); + } + writeFeatures(t, e) { + return JSON.stringify(this.writeFeaturesObject(t, e)); + } + writeFeaturesObject(t, e) { + return H(); + } + writeGeometry(t, e) { + return JSON.stringify(this.writeGeometryObject(t, e)); + } + writeGeometryObject(t, e) { + return H(); + } +} +function $r(n) { + if (typeof n == "string") { + const t = JSON.parse(n); + return t || null; + } else + return n !== null ? n : null; +} +const K2 = q2; +class J2 extends K2 { + constructor(t) { + t = t || {}, super(), this.dataProjection = Q( + t.dataProjection ? t.dataProjection : "EPSG:4326" + ), t.featureProjection && (this.defaultFeatureProjection = Q(t.featureProjection)), this.geometryName_ = t.geometryName, this.extractGeometryName_ = t.extractGeometryName, this.supportedMediaTypes = [ + "application/geo+json", + "application/vnd.geo+json" + ]; + } + readFeatureFromObject(t, e) { + let i = null; + t.type === "Feature" ? i = t : i = { + type: "Feature", + geometry: t, + properties: null + }; + const s = ja(i.geometry, e), r = new Ie(); + return this.geometryName_ ? r.setGeometryName(this.geometryName_) : this.extractGeometryName_ && "geometry_name" in i !== void 0 && r.setGeometryName(i.geometry_name), r.setGeometry(s), "id" in i && r.setId(i.id), i.properties && r.setProperties(i.properties, !0), r; + } + readFeaturesFromObject(t, e) { + const i = t; + let s = null; + if (i.type === "FeatureCollection") { + const r = t; + s = []; + const o = r.features; + for (let a = 0, l = o.length; a < l; ++a) + s.push(this.readFeatureFromObject(o[a], e)); + } else + s = [this.readFeatureFromObject(t, e)]; + return s; + } + readGeometryFromObject(t, e) { + return ja(t, e); + } + readProjectionFromObject(t) { + const e = t.crs; + let i; + return e ? e.type == "name" ? i = Q(e.properties.name) : e.type === "EPSG" ? i = Q("EPSG:" + e.properties.code) : Y(!1, 36) : i = this.dataProjection, i; + } + writeFeatureObject(t, e) { + e = this.adaptOptions(e); + const i = { + type: "Feature", + geometry: null, + properties: null + }, s = t.getId(); + if (s !== void 0 && (i.id = s), !t.hasProperties()) + return i; + const r = t.getProperties(), o = t.getGeometry(); + return o && (i.geometry = qa(o, e), delete r[t.getGeometryName()]), Hn(r) || (i.properties = r), i; + } + writeFeaturesObject(t, e) { + e = this.adaptOptions(e); + const i = []; + for (let s = 0, r = t.length; s < r; ++s) + i.push(this.writeFeatureObject(t[s], e)); + return { + type: "FeatureCollection", + features: i + }; + } + writeGeometryObject(t, e) { + return qa(t, this.adaptOptions(e)); + } +} +function ja(n, t) { + if (!n) + return null; + let e; + switch (n.type) { + case "Point": { + e = tp(n); + break; + } + case "LineString": { + e = ep( + n + ); + break; + } + case "Polygon": { + e = rp(n); + break; + } + case "MultiPoint": { + e = np( + n + ); + break; + } + case "MultiLineString": { + e = ip( + n + ); + break; + } + case "MultiPolygon": { + e = sp( + n + ); + break; + } + case "GeometryCollection": { + e = Q2( + n + ); + break; + } + default: + throw new Error("Unsupported GeoJSON type: " + n.type); + } + return or(e, !1, t); +} +function Q2(n, t) { + const e = n.geometries.map( + function(i) { + return ja(i, t); + } + ); + return new of(e); +} +function tp(n) { + return new Se(n.coordinates); +} +function ep(n) { + return new li(n.coordinates); +} +function ip(n) { + return new sr(n.coordinates); +} +function np(n) { + return new $o(n.coordinates); +} +function sp(n) { + return new rr(n.coordinates); +} +function rp(n) { + return new Ai(n.coordinates); +} +function qa(n, t) { + n = or(n, !0, t); + const e = n.getType(); + let i; + switch (e) { + case "Point": { + i = up(n); + break; + } + case "LineString": { + i = ap( + n + ); + break; + } + case "Polygon": { + i = dp( + n, + t + ); + break; + } + case "MultiPoint": { + i = hp( + n + ); + break; + } + case "MultiLineString": { + i = lp( + n + ); + break; + } + case "MultiPolygon": { + i = cp( + n, + t + ); + break; + } + case "GeometryCollection": { + i = op( + n, + t + ); + break; + } + case "Circle": { + i = { + type: "GeometryCollection", + geometries: [] + }; + break; + } + default: + throw new Error("Unsupported geometry type: " + e); + } + return i; +} +function op(n, t) { + return t = Object.assign({}, t), delete t.featureProjection, { + type: "GeometryCollection", + geometries: n.getGeometriesArray().map(function(i) { + return qa(i, t); + }) + }; +} +function ap(n, t) { + return { + type: "LineString", + coordinates: n.getCoordinates() + }; +} +function lp(n, t) { + return { + type: "MultiLineString", + coordinates: n.getCoordinates() + }; +} +function hp(n, t) { + return { + type: "MultiPoint", + coordinates: n.getCoordinates() + }; +} +function cp(n, t) { + let e; + return t && (e = t.rightHanded), { + type: "MultiPolygon", + coordinates: n.getCoordinates(e) + }; +} +function up(n, t) { + return { + type: "Point", + coordinates: n.getCoordinates() + }; +} +function dp(n, t) { + let e; + return t && (e = t.rightHanded), { + type: "Polygon", + coordinates: n.getCoordinates(e) + }; +} +const mf = J2; +let _f = "", pf = !1, yf = "", vf, xf, Cf, Kn = [], Mf, Ef = -1, wf = -1; +function fp(n) { + _f = n; +} +function gp() { + return _f; +} +function mp(n) { + pf = n; +} +function _p() { + return pf; +} +function pp(n) { + yf = n; +} +function yp() { + return yf; +} +function vp(n) { + vf = n; +} +function xp() { + return vf; +} +function Cp(n) { + xf = n; +} +function Mp() { + return xf; +} +function Ep(n) { + Cf = n; +} +function wp() { + return Cf; +} +function Sp(n) { + Kn.push(n); +} +function Rp(n, t) { + const e = Kn.findIndex((i) => i.get(t) === n); + e !== -1 && Kn.splice(e, 1); +} +function Tp(n, t) { + const e = Kn.findIndex((i) => i.get(t) === n); + return e !== -1 ? Kn[e] : void 0; +} +function bp() { + return Kn; +} +function Lp(n) { + Mf = n; +} +function Ip() { + return Mf; +} +function Pp(n) { + Ef = n; +} +function Ap() { + return Ef; +} +function Op(n) { + wf = n; +} +function Fp() { + return wf; +} +function w() { + return { + setTheme: fp, + getTheme: gp, + setCustomDisplay: mp, + isCustomDisplay: _p, + setTargetBoxSize: pp, + getTargetBoxSize: yp, + setGeolocation: vp, + getGeolocation: xp, + setOptions: Cp, + getOptions: Mp, + setMap: Ep, + getMap: wp, + addSelectedFeature: Sp, + removeSelectedFeature: Rp, + getSelectedFeature: Tp, + getSelectedFeatures: bp, + setBorderConstraint: Lp, + getBorderConstraint: Ip, + setCurrentItemId: Pp, + getCurrentItemId: Ap, + setMaxElement: Op, + getMaxElement: Fp + }; +} +class Np { + constructor() { + this.nbDraw = 0, this.source = new Ve(), this.vector = new Ze({ + source: this.source, + style: new Zt({ + fill: new Vt({ + color: "rgba(255, 255, 255, 0.2)" + }), + stroke: new Xt({ + color: "#ffcc33", + width: 2 + }), + image: new we({ + radius: 7, + fill: new Vt({ + color: "#ffcc33" + }) + }) + }) + }), w().getMap().addLayer(this.vector), this.modify = new u2({ source: this.source }), w().getMap().addInteraction(this.modify), this.addInteraction(); + } + removeInteraction() { + this.draw && w().getMap().removeInteraction(this.draw), this.snap && w().getMap().removeInteraction(this.snap); + } + couldContinueToDraw() { + w().getOptions().maxNbDraw != -1 && (this.nbDraw += 1, this.nbDraw >= w().getOptions().maxNbDraw && this.draw && this.draw.addEventListener("drawend", this.removeInteraction.bind(this))); + } + addInteraction() { + this.draw = new a2({ + source: this.source, + type: w().getOptions().drawElement + }), w().getMap().addInteraction(this.draw), this.snap = new f2({ source: this.source }), w().getMap().addInteraction(this.snap), this.draw.addEventListener("drawstart", this.couldContinueToDraw.bind(this)); + } +} +class Dp { + constructor() { + this.data = {}, this.vectorSource = new Ve(), this.vectorLayer = new Ze(), fetch(w().getOptions().geojson.url).then((t) => t.json()).then((t) => { + this.vectorSource = new Ve({ + features: new mf().readFeatures(t) + }), this.vectorLayer = new Ze({ + source: this.vectorSource, + style: this.styleFunction + }), w().getMap().addLayer(this.vectorLayer); + }); + } + styleFunction() { + return new Zt({ + image: new we({ + radius: 5, + fill: void 0, + stroke: new Xt({ color: "red", width: 1 }) + }) + }); + } +} +class ot { + static sendEvent(t, e) { + dispatchEvent(new CustomEvent(t, { detail: e })); + } +} +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const Sf = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, nh = (n) => (...t) => ({ _$litDirective$: n, values: t }); +class sh { + constructor(t) { + } + get _$AU() { + return this._$AM._$AU; + } + _$AT(t, e, i) { + this._$Ct = t, this._$AM = e, this._$Ci = i; + } + _$AS(t, e) { + return this.update(t, e); + } + update(t, e) { + return this.render(...e); + } +} +/** + * @license + * Copyright 2020 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const { I: kp } = wg, Br = (n, t) => t === void 0 ? (n == null ? void 0 : n._$litType$) !== void 0 : (n == null ? void 0 : n._$litType$) === t, Dc = () => document.createComment(""), kc = (n, t, e) => { + var i; + const s = n._$AA.parentNode, r = t === void 0 ? n._$AB : t._$AA; + if (e === void 0) { + const o = s.insertBefore(Dc(), r), a = s.insertBefore(Dc(), r); + e = new kp(o, a, n, n.options); + } else { + const o = e._$AB.nextSibling, a = e._$AM, l = a !== n; + if (l) { + let h; + (i = e._$AQ) === null || i === void 0 || i.call(e, n), e._$AM = n, e._$AP !== void 0 && (h = n._$AU) !== a._$AU && e._$AP(h); + } + if (o !== r || l) { + let h = e._$AA; + for (; h !== o; ) { + const c = h.nextSibling; + s.insertBefore(h, r), h = c; + } + } + } + return e; +}, Gp = {}, Gc = (n, t = Gp) => n._$AH = t, $c = (n) => n._$AH, $p = (n) => { + n._$AR(); +}; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const Rf = nh(class extends sh { + constructor(n) { + super(n), this.et = /* @__PURE__ */ new WeakMap(); + } + render(n) { + return [n]; + } + update(n, [t]) { + if (Br(this.it) && (!Br(t) || this.it.strings !== t.strings)) { + const e = $c(n).pop(); + let i = this.et.get(this.it.strings); + if (i === void 0) { + const s = document.createDocumentFragment(); + i = Zu(bt, s), i.setConnected(!1), this.et.set(this.it.strings, i); + } + Gc(i, [e]), kc(i, void 0, e); + } + if (Br(t)) { + if (!Br(this.it) || this.it.strings !== t.strings) { + const e = this.et.get(t.strings); + if (e !== void 0) { + const i = $c(e).pop(); + $p(n), kc(n, void 0, i), Gc(n, [i]); + } + } + this.it = t; + } else + this.it = void 0; + return this.render(t); + } +}); +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +class Ka extends sh { + constructor(t) { + if (super(t), this.it = bt, t.type !== Sf.CHILD) + throw Error(this.constructor.directiveName + "() can only be used in child bindings"); + } + render(t) { + if (t === bt || t == null) + return this._t = void 0, this.it = t; + if (t === bi) + return t; + if (typeof t != "string") + throw Error(this.constructor.directiveName + "() called with a non-string value"); + if (t === this.it) + return this._t; + this.it = t; + const e = [t]; + return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] }; + } +} +Ka.directiveName = "unsafeHTML", Ka.resultType = 1; +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +class Ja extends Ka { +} +Ja.directiveName = "unsafeSVG", Ja.resultType = 2; +const Ue = nh(Ja), Bp = `.box-element{position:absolute;top:10px;background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);border:1px solid var(--information-box-background-color);margin-left:5px;margin-right:5px;max-width:302px;width:100%;left:calc(50% - 172px);font-family:sans-serif;display:flex;z-index:5}.box-text-container{width:70%}.box-icon-container{width:30%;display:flex}.box-element-title{display:flex}.box-element-title-text{width:900%;font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color)}.box-element-content{font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color);width:90%}.position-icon{display:flex;justify-content:center;width:50%}.icon-container{width:36px;height:36px;background-color:var(--select-icon-background);border-radius:var(--icon-border-radius)}.icon-container>svg{display:block;margin-left:calc((var(--icon-width) - var(--svg-icon-size)) / 2);margin-top:calc((var(--icon-height) - var(--svg-icon-size)) / 2);width:var(--svg-icon-size)!important;height:var(--svg-icon-size)!important}.icon-container>svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round} +`; +class Tf { + static getAddressFromCoordinate(t) { + return fetch(`https://api3.geo.admin.ch/rest/services/api/MapServer/identify?mapExtent=0,0,100,100&imageDisplay=100,100,100&tolerance=20&geometryType=esriGeometryPoint&geometry=${t[0]},${t[1]}&layers=all:ch.bfs.gebaeude_wohnungs_register&returnGeometry=false&sr=2056`).then((e) => e.json()); + } +} +class at { + static zoomInLabel() { + const t = document.createElement("div"), e = document.createElementNS("http://www.w3.org/2000/svg", "svg"); + return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` + + + + + + + + + + + `, t.appendChild(e), t; + } + static zoomOutLabel() { + const t = document.createElement("div"), e = document.createElementNS("http://www.w3.org/2000/svg", "svg"); + return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` + + + + + + + + + + + `, t.appendChild(e), t; + } + static fullScreenLabel() { + const t = document.createElement("div"), e = document.createElementNS("http://www.w3.org/2000/svg", "svg"); + return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` + + + + + + + + + + + `, t.appendChild(e), t; + } + static fullScreenLabelActive() { + const t = document.createElement("div"), e = document.createElementNS("http://www.w3.org/2000/svg", "svg"); + return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` + + + + + + + + + + + `, t.appendChild(e), t; + } +} +at.info = ` + + + + + + + + + + + + + + `; +at.warning = ` + + + + + + + + + + + + + + `; +at.error = ` + + + + + + + + + + + + + + + `; +at.mapPin = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + + `; +at.mapPinClick = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + `; +at.mapPinSelect = ` + + + + + + + + + + + + + + + + + + + + + + + + + + + + `; +at.information = ` + + + + + + + + + + + + + + `; +at.geolocation = ` + + + + + + + + + + + + + `; +at.rotation = ` + + + + + + + + + `; +at.iconRecenter = ` + + + + + + + + + + + + + `; +at.iconRemoveSelection = ` + + + + + + + + `; +at.search = ` + + + + + + + + + + + + + `; +at.cross = ` + + + + + + + + + + + + + `; +at.stack = ` + + + + + + + + + + + + + + + `; +var zp = Object.defineProperty, Zp = Object.getOwnPropertyDescriptor, Bo = (n, t, e, i) => { + for (var s = i > 1 ? void 0 : i ? Zp(t, e) : t, r = n.length - 1, o; r >= 0; r--) + (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); + return i && s && zp(t, e, s), s; +}; +let Jn = class extends kt { + constructor() { + super(), this.currentPosition = [0, 0], this._isRecenterButton = !0, this._currentPosition = "", w().getMap().getView().on("change:center", () => { + const n = w().getSelectedFeature(w().getCurrentItemId(), w().getOptions().mode.type === "select" ? "objectid" : "id"); + if (n) { + const t = n.get("geom"); + this._isRecenterButton = t.intersectsExtent(w().getMap().getView().calculateExtent(w().getMap().getSize())); + } + }), window.addEventListener("open-select-create-box", (n) => { + Tf.getAddressFromCoordinate(n.detail).then((t) => { + this._currentPosition = t.results.length > 0 ? `proche de ${t.results[0].attributes.strname_deinr}` : "Aucune adresse proche reconnue"; + }); + }); + } + connectedCallback() { + super.connectedCallback(); + } + render() { + return Lt` +
+
+
+
${w().getOptions().selectionTargetBoxMessage}
+
+
${this._currentPosition}
+
+
+
+ ${Rf( + this._isRecenterButton ? Lt`` : Lt`
+ ${Ue(at.iconRecenter)} +
` + )} +
+
+
+ ${Ue(at.iconRemoveSelection)} +
+
+
+
+ `; + } + recenter() { + ot.sendEvent("recenter-selected-element", void 0); + } + unselect() { + const n = w().getOptions(); + n.mode.type === "select" && ot.sendEvent("icon-clicked", w().getCurrentItemId()), n.mode.type === "create" && ot.sendEvent("icon-removed", void 0); + } +}; +Jn.styles = [Mt(Bp)]; +Bo([ + cn() +], Jn.prototype, "currentPosition", 2); +Bo([ + ae() +], Jn.prototype, "_isRecenterButton", 2); +Bo([ + ae() +], Jn.prototype, "_currentPosition", 2); +Jn = Bo([ + oe("select-information-box-element") +], Jn); +class bf extends Gt { + constructor() { + const t = document.createElement("select-information-box-element"); + super({ element: t }), this.div = t; + } + disable() { + this.div.classList.add("disabled"); + } + show() { + this.div.classList.remove("fade-out"), this.div.classList.remove("disabled"), this.div.classList.add("fade-in"); + } + hide() { + this.div.classList.remove("fade-in"), this.div.classList.add("fade-out"); + } +} +class Vp { + static clusterWithIcon(t) { + const e = t.get("features").length; + let i; + return e === 1 && t.get("features")[0].get("isSelected") ? i = new Zt({ + zIndex: 1, + image: new Ts({ + src: "data:image/svg+xml;charset=utf-8," + encodeURIComponent(at.mapPinSelect), + anchor: [0.5, 54], + anchorXUnits: "fraction", + anchorYUnits: "pixels" + }) + }) : e === 1 && t.get("features")[0].get("isClick") ? i = new Zt({ + zIndex: 1, + image: new Ts({ + src: "data:image/svg+xml;charset=utf-8," + encodeURIComponent(at.mapPinClick), + anchor: [0.5, 54], + anchorXUnits: "fraction", + anchorYUnits: "pixels" + }) + }) : e === 1 && !t.get("features")[0].get("isClick") ? i = new Zt({ + zIndex: 1, + image: new Ts({ + src: "data:image/svg+xml;charset=utf-8," + encodeURIComponent(at.mapPin), + anchor: [0.5, 54], + anchorXUnits: "fraction", + anchorYUnits: "pixels" + }) + }) : t.get("features").find((s) => s.get("isClick")) ? i = new Zt({ + image: new we({ + radius: 15, + stroke: new Xt({ + color: "#fff" + }), + fill: new Vt({ + color: "#EF4444" + }) + }), + text: new Wa({ + text: e.toString(), + font: "14px sans-serif", + fill: new Vt({ + color: "#fff" + }) + }) + }) : i = new Zt({ + image: new we({ + radius: 15, + stroke: new Xt({ + color: "#fff" + }), + fill: new Vt({ + color: "#334155" + }) + }), + text: new Wa({ + text: e.toString(), + font: "14px sans-serif", + fill: new Vt({ + color: "#fff" + }) + }) + }), i; + } +} +class Lf { + static setCustomStyleWithouInfoBox() { + const t = w().getOptions(); + w().setCustomDisplay(t.search.displaySearch); + const e = t.search.displaySearch ? "small" : "no-box"; + w().setTargetBoxSize(e); + } +} +const Qa = "http://www.w3.org/2001/XMLSchema-instance"; +function K(n, t) { + return Of().createElementNS(n, t); +} +function rn(n, t) { + return If(n, t, []).join(""); +} +function If(n, t, e) { + if (n.nodeType == Node.CDATA_SECTION_NODE || n.nodeType == Node.TEXT_NODE) + t ? e.push(String(n.nodeValue).replace(/(\r\n|\r|\n)/g, "")) : e.push(n.nodeValue); + else { + let i; + for (i = n.firstChild; i; i = i.nextSibling) + If(i, t, e); + } + return e; +} +function Xi(n) { + return "documentElement" in n; +} +function Up(n, t, e) { + return n.getAttributeNS(t, e) || ""; +} +function Yi(n) { + return new DOMParser().parseFromString(n, "application/xml"); +} +function Pf(n, t) { + return function(e, i) { + const s = n.call( + t !== void 0 ? t : this, + e, + i + ); + if (s !== void 0) { + const r = i[i.length - 1]; + Qt(r, s); + } + }; +} +function X(n, t) { + return function(e, i) { + const s = n.call( + t !== void 0 ? t : this, + e, + i + ); + s !== void 0 && i[i.length - 1].push(s); + }; +} +function Z(n, t) { + return function(e, i) { + const s = n.call( + t !== void 0 ? t : this, + e, + i + ); + s !== void 0 && (i[i.length - 1] = s); + }; +} +function ge(n, t, e) { + return function(i, s) { + const r = n.call( + e !== void 0 ? e : this, + i, + s + ); + if (r !== void 0) { + const o = s[s.length - 1], a = t !== void 0 ? t : i.localName; + let l; + a in o ? l = o[a] : (l = [], o[a] = l), l.push(r); + } + }; +} +function O(n, t, e) { + return function(i, s) { + const r = n.call( + e !== void 0 ? e : this, + i, + s + ); + if (r !== void 0) { + const o = s[s.length - 1], a = t !== void 0 ? t : i.localName; + o[a] = r; + } + }; +} +function M(n, t) { + return function(e, i, s) { + n.call( + t !== void 0 ? t : this, + e, + i, + s + ), s[s.length - 1].node.appendChild(e); + }; +} +function me(n, t) { + return function(e, i, s) { + const o = i[i.length - 1].node; + let a = n; + a === void 0 && (a = s); + const l = t !== void 0 ? t : o.namespaceURI; + return K(l, a); + }; +} +const Af = me(); +function dt(n, t, e) { + e = e !== void 0 ? e : {}; + let i, s; + for (i = 0, s = n.length; i < s; ++i) + e[n[i]] = t; + return e; +} +function Ji(n, t, e, i) { + let s; + for (s = t.firstElementChild; s; s = s.nextElementSibling) { + const r = n[s.namespaceURI]; + if (r !== void 0) { + const o = r[s.localName]; + o !== void 0 && o.call(i, s, e); + } + } +} +function B(n, t, e, i, s) { + return i.push(n), Ji(t, e, i, s), i.pop(); +} +function Wp(n, t, e, i, s, r) { + const o = (s !== void 0 ? s : e).length; + let a, l; + for (let h = 0; h < o; ++h) + a = e[h], a !== void 0 && (l = t.call( + r !== void 0 ? r : this, + a, + i, + s !== void 0 ? s[h] : void 0 + ), l !== void 0 && n[l.namespaceURI][l.localName].call( + r, + l, + a, + i + )); +} +function St(n, t, e, i, s, r, o) { + return s.push(n), Wp(t, e, i, s, r, o), s.pop(); +} +let Ea; +function Hp() { + return Ea === void 0 && typeof XMLSerializer < "u" && (Ea = new XMLSerializer()), Ea; +} +let wa; +function Of() { + return wa === void 0 && typeof document < "u" && (wa = document.implementation.createDocument("", "", null)), wa; +} +class Xp extends gf { + constructor() { + super(), this.xmlSerializer_ = Hp(); + } + getType() { + return "xml"; + } + readFeature(t, e) { + if (t) + if (typeof t == "string") { + const i = Yi(t); + return this.readFeatureFromDocument(i, e); + } else + return Xi(t) ? this.readFeatureFromDocument( + t, + e + ) : this.readFeatureFromNode(t, e); + else + return null; + } + readFeatureFromDocument(t, e) { + const i = this.readFeaturesFromDocument(t, e); + return i.length > 0 ? i[0] : null; + } + readFeatureFromNode(t, e) { + return null; + } + readFeatures(t, e) { + if (t) + if (typeof t == "string") { + const i = Yi(t); + return this.readFeaturesFromDocument(i, e); + } else + return Xi(t) ? this.readFeaturesFromDocument( + t, + e + ) : this.readFeaturesFromNode( + t, + e + ); + else + return []; + } + readFeaturesFromDocument(t, e) { + const i = []; + for (let s = t.firstChild; s; s = s.nextSibling) + s.nodeType == Node.ELEMENT_NODE && Qt( + i, + this.readFeaturesFromNode(s, e) + ); + return i; + } + readFeaturesFromNode(t, e) { + return H(); + } + readGeometry(t, e) { + if (t) + if (typeof t == "string") { + const i = Yi(t); + return this.readGeometryFromDocument(i, e); + } else + return Xi(t) ? this.readGeometryFromDocument( + t, + e + ) : this.readGeometryFromNode( + t, + e + ); + else + return null; + } + readGeometryFromDocument(t, e) { + return null; + } + readGeometryFromNode(t, e) { + return null; + } + readProjection(t) { + if (t) + if (typeof t == "string") { + const e = Yi(t); + return this.readProjectionFromDocument(e); + } else + return Xi(t) ? this.readProjectionFromDocument(t) : this.readProjectionFromNode(t); + else + return null; + } + readProjectionFromDocument(t) { + return this.dataProjection; + } + readProjectionFromNode(t) { + return this.dataProjection; + } + writeFeature(t, e) { + const i = this.writeFeatureNode(t, e); + return this.xmlSerializer_.serializeToString(i); + } + writeFeatureNode(t, e) { + return null; + } + writeFeatures(t, e) { + const i = this.writeFeaturesNode(t, e); + return this.xmlSerializer_.serializeToString(i); + } + writeFeaturesNode(t, e) { + return null; + } + writeGeometry(t, e) { + const i = this.writeGeometryNode(t, e); + return this.xmlSerializer_.serializeToString(i); + } + writeGeometryNode(t, e) { + return null; + } +} +const Ff = Xp, hi = "http://www.opengis.net/gml", Yp = /^\s*$/; +class Rt extends Ff { + constructor(t) { + super(), t = t || {}, this.featureType = t.featureType, this.featureNS = t.featureNS, this.srsName = t.srsName, this.schemaLocation = "", this.FEATURE_COLLECTION_PARSERS = {}, this.FEATURE_COLLECTION_PARSERS[this.namespace] = { + featureMember: X(this.readFeaturesInternal), + featureMembers: Z(this.readFeaturesInternal) + }, this.supportedMediaTypes = ["application/gml+xml"]; + } + readFeaturesInternal(t, e) { + const i = t.localName; + let s = null; + if (i == "FeatureCollection") + s = B( + [], + this.FEATURE_COLLECTION_PARSERS, + t, + e, + this + ); + else if (i == "featureMembers" || i == "featureMember" || i == "member") { + const r = e[0]; + let o = r.featureType, a = r.featureNS; + const l = "p", h = "p0"; + if (!o && t.childNodes) { + o = [], a = {}; + for (let d = 0, f = t.childNodes.length; d < f; ++d) { + const g = t.childNodes[d]; + if (g.nodeType === 1) { + const m = g.nodeName.split(":").pop(); + if (!o.includes(m)) { + let _ = "", y = 0; + const p = g.namespaceURI; + for (const v in a) { + if (a[v] === p) { + _ = v; + break; + } + ++y; + } + _ || (_ = l + y, a[_] = p), o.push(_ + ":" + m); + } + } + } + i != "featureMember" && (r.featureType = o, r.featureNS = a); + } + if (typeof a == "string") { + const d = a; + a = {}, a[h] = d; + } + const c = {}, u = Array.isArray(o) ? o : [o]; + for (const d in a) { + const f = {}; + for (let g = 0, m = u.length; g < m; ++g) + (u[g].includes(":") ? u[g].split(":")[0] : h) === d && (f[u[g].split(":").pop()] = i == "featureMembers" ? X(this.readFeatureElement, this) : Z(this.readFeatureElement, this)); + c[a[d]] = f; + } + i == "featureMember" || i == "member" ? s = B(void 0, c, t, e) : s = B([], c, t, e); + } + return s === null && (s = []), s; + } + readGeometryOrExtent(t, e) { + const i = e[0]; + return i.srsName = t.firstElementChild.getAttribute("srsName"), i.srsDimension = t.firstElementChild.getAttribute("srsDimension"), B( + null, + this.GEOMETRY_PARSERS, + t, + e, + this + ); + } + readExtentElement(t, e) { + const i = e[0], s = this.readGeometryOrExtent(t, e); + return s ? ih(s, i) : void 0; + } + readGeometryElement(t, e) { + const i = e[0], s = this.readGeometryOrExtent(t, e); + return s ? or(s, !1, i) : void 0; + } + readFeatureElementInternal(t, e, i) { + let s; + const r = {}; + for (let o = t.firstElementChild; o; o = o.nextElementSibling) { + let a; + const l = o.localName; + o.childNodes.length === 0 || o.childNodes.length === 1 && (o.firstChild.nodeType === 3 || o.firstChild.nodeType === 4) ? (a = rn(o, !1), Yp.test(a) && (a = void 0)) : (i && (a = l === "boundedBy" ? this.readExtentElement(o, e) : this.readGeometryElement(o, e)), a ? l !== "boundedBy" && (s = l) : a = this.readFeatureElementInternal(o, e, !1)); + const h = o.attributes.length; + if (h > 0) { + a = { _content_: a }; + for (let c = 0; c < h; c++) { + const u = o.attributes[c].name; + a[u] = o.attributes[c].value; + } + } + r[l] ? (r[l] instanceof Array || (r[l] = [r[l]]), r[l].push(a)) : r[l] = a; + } + if (i) { + const o = new Ie(r); + s && o.setGeometryName(s); + const a = t.getAttribute("fid") || Up(t, this.namespace, "id"); + return a && o.setId(a), o; + } else + return r; + } + readFeatureElement(t, e) { + return this.readFeatureElementInternal(t, e, !0); + } + readPoint(t, e) { + const i = this.readFlatCoordinatesFromNode(t, e); + if (i) + return new Se(i, "XYZ"); + } + readMultiPoint(t, e) { + const i = B( + [], + this.MULTIPOINT_PARSERS, + t, + e, + this + ); + if (i) + return new $o(i); + } + readMultiLineString(t, e) { + const i = B( + [], + this.MULTILINESTRING_PARSERS, + t, + e, + this + ); + if (i) + return new sr(i); + } + readMultiPolygon(t, e) { + const i = B( + [], + this.MULTIPOLYGON_PARSERS, + t, + e, + this + ); + if (i) + return new rr(i); + } + pointMemberParser(t, e) { + Ji(this.POINTMEMBER_PARSERS, t, e, this); + } + lineStringMemberParser(t, e) { + Ji(this.LINESTRINGMEMBER_PARSERS, t, e, this); + } + polygonMemberParser(t, e) { + Ji(this.POLYGONMEMBER_PARSERS, t, e, this); + } + readLineString(t, e) { + const i = this.readFlatCoordinatesFromNode(t, e); + if (i) + return new li(i, "XYZ"); + } + readFlatLinearRing(t, e) { + const i = B( + null, + this.GEOMETRY_FLAT_COORDINATES_PARSERS, + t, + e, + this + ); + if (i) + return i; + } + readLinearRing(t, e) { + const i = this.readFlatCoordinatesFromNode(t, e); + if (i) + return new Ba(i, "XYZ"); + } + readPolygon(t, e) { + const i = B( + [null], + this.FLAT_LINEAR_RINGS_PARSERS, + t, + e, + this + ); + if (i && i[0]) { + const s = i[0], r = [s.length]; + let o, a; + for (o = 1, a = i.length; o < a; ++o) + Qt(s, i[o]), r.push(s.length); + return new Ai(s, "XYZ", r); + } else + return; + } + readFlatCoordinatesFromNode(t, e) { + return B( + null, + this.GEOMETRY_FLAT_COORDINATES_PARSERS, + t, + e, + this + ); + } + readGeometryFromNode(t, e) { + const i = this.readGeometryElement(t, [ + this.getReadOptions(t, e || {}) + ]); + return i || null; + } + readFeaturesFromNode(t, e) { + const i = { + featureType: this.featureType, + featureNS: this.featureNS + }; + return i && Object.assign(i, this.getReadOptions(t, e)), this.readFeaturesInternal(t, [i]) || []; + } + readProjectionFromNode(t) { + return Q( + this.srsName ? this.srsName : t.firstElementChild.getAttribute("srsName") + ); + } +} +Rt.prototype.namespace = hi; +Rt.prototype.FLAT_LINEAR_RINGS_PARSERS = { + "http://www.opengis.net/gml": {} +}; +Rt.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { + "http://www.opengis.net/gml": {} +}; +Rt.prototype.GEOMETRY_PARSERS = { + "http://www.opengis.net/gml": {} +}; +Rt.prototype.MULTIPOINT_PARSERS = { + "http://www.opengis.net/gml": { + pointMember: X(Rt.prototype.pointMemberParser), + pointMembers: X(Rt.prototype.pointMemberParser) + } +}; +Rt.prototype.MULTILINESTRING_PARSERS = { + "http://www.opengis.net/gml": { + lineStringMember: X( + Rt.prototype.lineStringMemberParser + ), + lineStringMembers: X( + Rt.prototype.lineStringMemberParser + ) + } +}; +Rt.prototype.MULTIPOLYGON_PARSERS = { + "http://www.opengis.net/gml": { + polygonMember: X(Rt.prototype.polygonMemberParser), + polygonMembers: X(Rt.prototype.polygonMemberParser) + } +}; +Rt.prototype.POINTMEMBER_PARSERS = { + "http://www.opengis.net/gml": { + Point: X(Rt.prototype.readFlatCoordinatesFromNode) + } +}; +Rt.prototype.LINESTRINGMEMBER_PARSERS = { + "http://www.opengis.net/gml": { + LineString: X(Rt.prototype.readLineString) + } +}; +Rt.prototype.POLYGONMEMBER_PARSERS = { + "http://www.opengis.net/gml": { + Polygon: X(Rt.prototype.readPolygon) + } +}; +Rt.prototype.RING_PARSERS = { + "http://www.opengis.net/gml": { + LinearRing: Z(Rt.prototype.readFlatLinearRing) + } +}; +const J = Rt; +function jp(n) { + const t = rn(n, !1); + return qp(t); +} +function qp(n) { + const t = /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(n); + if (t) + return parseFloat(t[1]); +} +function ne(n) { + const t = rn(n, !1); + return Fn(t); +} +function Fn(n) { + const t = /^\s*(\d+)\s*$/.exec(n); + if (t) + return parseInt(t[1], 10); +} +function rt(n) { + return rn(n, !1).trim(); +} +function It(n, t) { + n.appendChild(Of().createTextNode(t)); +} +const Kp = hi + " http://schemas.opengis.net/gml/2.1.2/feature.xsd", Jp = { + MultiLineString: "lineStringMember", + MultiCurve: "curveMember", + MultiPolygon: "polygonMember", + MultiSurface: "surfaceMember" +}; +class st extends J { + constructor(t) { + t = t || {}, super(t), this.FEATURE_COLLECTION_PARSERS[hi].featureMember = X( + this.readFeaturesInternal + ), this.schemaLocation = t.schemaLocation ? t.schemaLocation : Kp; + } + readFlatCoordinates(t, e) { + const i = rn(t, !1).replace(/^\s*|\s*$/g, ""), r = e[0].srsName; + let o = "enu"; + if (r) { + const h = Q(r); + h && (o = h.getAxisOrientation()); + } + const a = i.trim().split(/\s+/), l = []; + for (let h = 0, c = a.length; h < c; h++) { + const u = a[h].split(/,+/), d = parseFloat(u[0]), f = parseFloat(u[1]), g = u.length === 3 ? parseFloat(u[2]) : 0; + o.substr(0, 2) === "en" ? l.push(d, f, g) : l.push(f, d, g); + } + return l; + } + readBox(t, e) { + const i = B( + [null], + this.BOX_PARSERS_, + t, + e, + this + ); + return _e( + i[1][0], + i[1][1], + i[1][3], + i[1][4] + ); + } + innerBoundaryIsParser(t, e) { + const i = B( + void 0, + this.RING_PARSERS, + t, + e, + this + ); + i && e[e.length - 1].push(i); + } + outerBoundaryIsParser(t, e) { + const i = B( + void 0, + this.RING_PARSERS, + t, + e, + this + ); + if (i) { + const s = e[e.length - 1]; + s[0] = i; + } + } + GEOMETRY_NODE_FACTORY_(t, e, i) { + const s = e[e.length - 1], r = s.multiSurface, o = s.surface, a = s.multiCurve; + return Array.isArray(t) ? i = "Envelope" : (i = t.getType(), i === "MultiPolygon" && r === !0 ? i = "MultiSurface" : i === "Polygon" && o === !0 ? i = "Surface" : i === "MultiLineString" && a === !0 && (i = "MultiCurve")), K("http://www.opengis.net/gml", i); + } + writeFeatureElement(t, e, i) { + const s = e.getId(); + s && t.setAttribute("fid", s); + const r = i[i.length - 1], o = r.featureNS, a = e.getGeometryName(); + r.serializers || (r.serializers = {}, r.serializers[o] = {}); + const l = [], h = []; + if (e.hasProperties()) { + const u = e.getProperties(); + for (const d in u) { + const f = u[d]; + f !== null && (l.push(d), h.push(f), d == a || typeof f.getSimplifiedGeometry == "function" ? d in r.serializers[o] || (r.serializers[o][d] = M( + this.writeGeometryElement, + this + )) : d in r.serializers[o] || (r.serializers[o][d] = M(It))); + } + } + const c = Object.assign({}, r); + c.node = t, St( + c, + r.serializers, + me(void 0, o), + h, + i, + l + ); + } + writeCurveOrLineString(t, e, i) { + const r = i[i.length - 1].srsName; + if (t.nodeName !== "LineStringSegment" && r && t.setAttribute("srsName", r), t.nodeName === "LineString" || t.nodeName === "LineStringSegment") { + const o = this.createCoordinatesNode_(t.namespaceURI); + t.appendChild(o), this.writeCoordinates_(o, e, i); + } else if (t.nodeName === "Curve") { + const o = K(t.namespaceURI, "segments"); + t.appendChild(o), this.writeCurveSegments_(o, e, i); + } + } + writeLineStringOrCurveMember(t, e, i) { + const s = this.GEOMETRY_NODE_FACTORY_(e, i); + s && (t.appendChild(s), this.writeCurveOrLineString(s, e, i)); + } + writeMultiCurveOrLineString(t, e, i) { + const s = i[i.length - 1], r = s.hasZ, o = s.srsName, a = s.curve; + o && t.setAttribute("srsName", o); + const l = e.getLineStrings(); + St( + { node: t, hasZ: r, srsName: o, curve: a }, + this.LINESTRINGORCURVEMEMBER_SERIALIZERS, + this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, + l, + i, + void 0, + this + ); + } + writeGeometryElement(t, e, i) { + const s = i[i.length - 1], r = Object.assign({}, s); + r.node = t; + let o; + Array.isArray(e) ? o = ih( + e, + s + ) : o = or( + e, + !0, + s + ), St( + r, + this.GEOMETRY_SERIALIZERS, + this.GEOMETRY_NODE_FACTORY_, + [o], + i, + void 0, + this + ); + } + createCoordinatesNode_(t) { + const e = K(t, "coordinates"); + return e.setAttribute("decimal", "."), e.setAttribute("cs", ","), e.setAttribute("ts", " "), e; + } + writeCoordinates_(t, e, i) { + const s = i[i.length - 1], r = s.hasZ, o = s.srsName, a = e.getCoordinates(), l = a.length, h = new Array(l); + for (let c = 0; c < l; ++c) { + const u = a[c]; + h[c] = this.getCoords_(u, o, r); + } + It(t, h.join(" ")); + } + writeCurveSegments_(t, e, i) { + const s = K(t.namespaceURI, "LineStringSegment"); + t.appendChild(s), this.writeCurveOrLineString(s, e, i); + } + writeSurfaceOrPolygon(t, e, i) { + const s = i[i.length - 1], r = s.hasZ, o = s.srsName; + if (t.nodeName !== "PolygonPatch" && o && t.setAttribute("srsName", o), t.nodeName === "Polygon" || t.nodeName === "PolygonPatch") { + const a = e.getLinearRings(); + St( + { node: t, hasZ: r, srsName: o }, + this.RING_SERIALIZERS, + this.RING_NODE_FACTORY_, + a, + i, + void 0, + this + ); + } else if (t.nodeName === "Surface") { + const a = K(t.namespaceURI, "patches"); + t.appendChild(a), this.writeSurfacePatches_(a, e, i); + } + } + RING_NODE_FACTORY_(t, e, i) { + const s = e[e.length - 1], r = s.node, o = s.exteriorWritten; + return o === void 0 && (s.exteriorWritten = !0), K( + r.namespaceURI, + o !== void 0 ? "innerBoundaryIs" : "outerBoundaryIs" + ); + } + writeSurfacePatches_(t, e, i) { + const s = K(t.namespaceURI, "PolygonPatch"); + t.appendChild(s), this.writeSurfaceOrPolygon(s, e, i); + } + writeRing(t, e, i) { + const s = K(t.namespaceURI, "LinearRing"); + t.appendChild(s), this.writeLinearRing(s, e, i); + } + getCoords_(t, e, i) { + let s = "enu"; + e && (s = Q(e).getAxisOrientation()); + let r = s.substr(0, 2) === "en" ? t[0] + "," + t[1] : t[1] + "," + t[0]; + if (i) { + const o = t[2] || 0; + r += "," + o; + } + return r; + } + writePoint(t, e, i) { + const s = i[i.length - 1], r = s.hasZ, o = s.srsName; + o && t.setAttribute("srsName", o); + const a = this.createCoordinatesNode_(t.namespaceURI); + t.appendChild(a); + const l = e.getCoordinates(), h = this.getCoords_(l, o, r); + It(a, h); + } + writeMultiPoint(t, e, i) { + const s = i[i.length - 1], r = s.hasZ, o = s.srsName; + o && t.setAttribute("srsName", o); + const a = e.getPoints(); + St( + { node: t, hasZ: r, srsName: o }, + this.POINTMEMBER_SERIALIZERS, + me("pointMember"), + a, + i, + void 0, + this + ); + } + writePointMember(t, e, i) { + const s = K(t.namespaceURI, "Point"); + t.appendChild(s), this.writePoint(s, e, i); + } + writeLinearRing(t, e, i) { + const r = i[i.length - 1].srsName; + r && t.setAttribute("srsName", r); + const o = this.createCoordinatesNode_(t.namespaceURI); + t.appendChild(o), this.writeCoordinates_(o, e, i); + } + writeMultiSurfaceOrPolygon(t, e, i) { + const s = i[i.length - 1], r = s.hasZ, o = s.srsName, a = s.surface; + o && t.setAttribute("srsName", o); + const l = e.getPolygons(); + St( + { node: t, hasZ: r, srsName: o, surface: a }, + this.SURFACEORPOLYGONMEMBER_SERIALIZERS, + this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, + l, + i, + void 0, + this + ); + } + writeSurfaceOrPolygonMember(t, e, i) { + const s = this.GEOMETRY_NODE_FACTORY_(e, i); + s && (t.appendChild(s), this.writeSurfaceOrPolygon(s, e, i)); + } + writeEnvelope(t, e, i) { + const r = i[i.length - 1].srsName; + r && t.setAttribute("srsName", r); + const o = ["lowerCorner", "upperCorner"], a = [e[0] + " " + e[1], e[2] + " " + e[3]]; + St( + { node: t }, + this.ENVELOPE_SERIALIZERS, + Af, + a, + i, + o, + this + ); + } + MULTIGEOMETRY_MEMBER_NODE_FACTORY_(t, e, i) { + const s = e[e.length - 1].node; + return K( + "http://www.opengis.net/gml", + Jp[s.nodeName] + ); + } +} +st.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { + "http://www.opengis.net/gml": { + coordinates: Z(st.prototype.readFlatCoordinates) + } +}; +st.prototype.FLAT_LINEAR_RINGS_PARSERS = { + "http://www.opengis.net/gml": { + innerBoundaryIs: st.prototype.innerBoundaryIsParser, + outerBoundaryIs: st.prototype.outerBoundaryIsParser + } +}; +st.prototype.BOX_PARSERS_ = { + "http://www.opengis.net/gml": { + coordinates: X(st.prototype.readFlatCoordinates) + } +}; +st.prototype.GEOMETRY_PARSERS = { + "http://www.opengis.net/gml": { + Point: Z(J.prototype.readPoint), + MultiPoint: Z(J.prototype.readMultiPoint), + LineString: Z(J.prototype.readLineString), + MultiLineString: Z(J.prototype.readMultiLineString), + LinearRing: Z(J.prototype.readLinearRing), + Polygon: Z(J.prototype.readPolygon), + MultiPolygon: Z(J.prototype.readMultiPolygon), + Box: Z(st.prototype.readBox) + } +}; +st.prototype.GEOMETRY_SERIALIZERS = { + "http://www.opengis.net/gml": { + Curve: M(st.prototype.writeCurveOrLineString), + MultiCurve: M(st.prototype.writeMultiCurveOrLineString), + Point: M(st.prototype.writePoint), + MultiPoint: M(st.prototype.writeMultiPoint), + LineString: M(st.prototype.writeCurveOrLineString), + MultiLineString: M( + st.prototype.writeMultiCurveOrLineString + ), + LinearRing: M(st.prototype.writeLinearRing), + Polygon: M(st.prototype.writeSurfaceOrPolygon), + MultiPolygon: M( + st.prototype.writeMultiSurfaceOrPolygon + ), + Surface: M(st.prototype.writeSurfaceOrPolygon), + MultiSurface: M( + st.prototype.writeMultiSurfaceOrPolygon + ), + Envelope: M(st.prototype.writeEnvelope) + } +}; +st.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = { + "http://www.opengis.net/gml": { + lineStringMember: M( + st.prototype.writeLineStringOrCurveMember + ), + curveMember: M( + st.prototype.writeLineStringOrCurveMember + ) + } +}; +st.prototype.RING_SERIALIZERS = { + "http://www.opengis.net/gml": { + outerBoundaryIs: M(st.prototype.writeRing), + innerBoundaryIs: M(st.prototype.writeRing) + } +}; +st.prototype.POINTMEMBER_SERIALIZERS = { + "http://www.opengis.net/gml": { + pointMember: M(st.prototype.writePointMember) + } +}; +st.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = { + "http://www.opengis.net/gml": { + surfaceMember: M( + st.prototype.writeSurfaceOrPolygonMember + ), + polygonMember: M( + st.prototype.writeSurfaceOrPolygonMember + ) + } +}; +st.prototype.ENVELOPE_SERIALIZERS = { + "http://www.opengis.net/gml": { + lowerCorner: M(It), + upperCorner: M(It) + } +}; +const ar = st, Qp = hi + " http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd", ty = { + MultiLineString: "lineStringMember", + MultiCurve: "curveMember", + MultiPolygon: "polygonMember", + MultiSurface: "surfaceMember" +}; +class D extends J { + constructor(t) { + t = t || {}, super(t), this.surface_ = t.surface !== void 0 ? t.surface : !1, this.curve_ = t.curve !== void 0 ? t.curve : !1, this.multiCurve_ = t.multiCurve !== void 0 ? t.multiCurve : !0, this.multiSurface_ = t.multiSurface !== void 0 ? t.multiSurface : !0, this.schemaLocation = t.schemaLocation ? t.schemaLocation : Qp, this.hasZ = t.hasZ !== void 0 ? t.hasZ : !1; + } + readMultiCurve(t, e) { + const i = B( + [], + this.MULTICURVE_PARSERS, + t, + e, + this + ); + if (i) + return new sr(i); + } + readFlatCurveRing(t, e) { + const i = B( + [], + this.MULTICURVE_PARSERS, + t, + e, + this + ), s = []; + for (let r = 0, o = i.length; r < o; ++r) + Qt(s, i[r].getFlatCoordinates()); + return s; + } + readMultiSurface(t, e) { + const i = B( + [], + this.MULTISURFACE_PARSERS, + t, + e, + this + ); + if (i) + return new rr(i); + } + curveMemberParser(t, e) { + Ji(this.CURVEMEMBER_PARSERS, t, e, this); + } + surfaceMemberParser(t, e) { + Ji(this.SURFACEMEMBER_PARSERS, t, e, this); + } + readPatch(t, e) { + return B( + [null], + this.PATCHES_PARSERS, + t, + e, + this + ); + } + readSegment(t, e) { + return B([], this.SEGMENTS_PARSERS, t, e, this); + } + readPolygonPatch(t, e) { + return B( + [null], + this.FLAT_LINEAR_RINGS_PARSERS, + t, + e, + this + ); + } + readLineStringSegment(t, e) { + return B( + [null], + this.GEOMETRY_FLAT_COORDINATES_PARSERS, + t, + e, + this + ); + } + interiorParser(t, e) { + const i = B( + void 0, + this.RING_PARSERS, + t, + e, + this + ); + i && e[e.length - 1].push(i); + } + exteriorParser(t, e) { + const i = B( + void 0, + this.RING_PARSERS, + t, + e, + this + ); + if (i) { + const s = e[e.length - 1]; + s[0] = i; + } + } + readSurface(t, e) { + const i = B( + [null], + this.SURFACE_PARSERS, + t, + e, + this + ); + if (i && i[0]) { + const s = i[0], r = [s.length]; + let o, a; + for (o = 1, a = i.length; o < a; ++o) + Qt(s, i[o]), r.push(s.length); + return new Ai(s, "XYZ", r); + } else + return; + } + readCurve(t, e) { + const i = B( + [null], + this.CURVE_PARSERS, + t, + e, + this + ); + if (i) + return new li(i, "XYZ"); + } + readEnvelope(t, e) { + const i = B( + [null], + this.ENVELOPE_PARSERS, + t, + e, + this + ); + return _e( + i[1][0], + i[1][1], + i[2][0], + i[2][1] + ); + } + readFlatPos(t, e) { + let i = rn(t, !1); + const s = /^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/, r = []; + let o; + for (; o = s.exec(i); ) + r.push(parseFloat(o[1])), i = i.substr(o[0].length); + if (i !== "") + return; + const l = e[0].srsName; + let h = "enu"; + if (l && (h = Q(l).getAxisOrientation()), h === "neu") { + let u, d; + for (u = 0, d = r.length; u < d; u += 3) { + const f = r[u], g = r[u + 1]; + r[u] = g, r[u + 1] = f; + } + } + const c = r.length; + if (c == 2 && r.push(0), c !== 0) + return r; + } + readFlatPosList(t, e) { + const i = rn(t, !1).replace(/^\s*|\s*$/g, ""), s = e[0], r = s.srsName, o = s.srsDimension; + let a = "enu"; + r && (a = Q(r).getAxisOrientation()); + const l = i.split(/\s+/); + let h = 2; + t.getAttribute("srsDimension") ? h = Fn(t.getAttribute("srsDimension")) : t.getAttribute("dimension") ? h = Fn(t.getAttribute("dimension")) : t.parentNode.getAttribute("srsDimension") ? h = Fn( + t.parentNode.getAttribute("srsDimension") + ) : o && (h = Fn(o)); + let c, u, d; + const f = []; + for (let g = 0, m = l.length; g < m; g += h) + c = parseFloat(l[g]), u = parseFloat(l[g + 1]), d = h === 3 ? parseFloat(l[g + 2]) : 0, a.substr(0, 2) === "en" ? f.push(c, u, d) : f.push(u, c, d); + return f; + } + writePos_(t, e, i) { + const s = i[i.length - 1], r = s.hasZ, o = r ? "3" : "2"; + t.setAttribute("srsDimension", o); + const a = s.srsName; + let l = "enu"; + a && (l = Q(a).getAxisOrientation()); + const h = e.getCoordinates(); + let c; + if (l.substr(0, 2) === "en" ? c = h[0] + " " + h[1] : c = h[1] + " " + h[0], r) { + const u = h[2] || 0; + c += " " + u; + } + It(t, c); + } + getCoords_(t, e, i) { + let s = "enu"; + e && (s = Q(e).getAxisOrientation()); + let r = s.substr(0, 2) === "en" ? t[0] + " " + t[1] : t[1] + " " + t[0]; + if (i) { + const o = t[2] || 0; + r += " " + o; + } + return r; + } + writePosList_(t, e, i) { + const s = i[i.length - 1], r = s.hasZ, o = r ? "3" : "2"; + t.setAttribute("srsDimension", o); + const a = s.srsName, l = e.getCoordinates(), h = l.length, c = new Array(h); + let u; + for (let d = 0; d < h; ++d) + u = l[d], c[d] = this.getCoords_(u, a, r); + It(t, c.join(" ")); + } + writePoint(t, e, i) { + const r = i[i.length - 1].srsName; + r && t.setAttribute("srsName", r); + const o = K(t.namespaceURI, "pos"); + t.appendChild(o), this.writePos_(o, e, i); + } + writeEnvelope(t, e, i) { + const r = i[i.length - 1].srsName; + r && t.setAttribute("srsName", r); + const o = ["lowerCorner", "upperCorner"], a = [e[0] + " " + e[1], e[2] + " " + e[3]]; + St( + { node: t }, + this.ENVELOPE_SERIALIZERS, + Af, + a, + i, + o, + this + ); + } + writeLinearRing(t, e, i) { + const r = i[i.length - 1].srsName; + r && t.setAttribute("srsName", r); + const o = K(t.namespaceURI, "posList"); + t.appendChild(o), this.writePosList_(o, e, i); + } + RING_NODE_FACTORY_(t, e, i) { + const s = e[e.length - 1], r = s.node, o = s.exteriorWritten; + return o === void 0 && (s.exteriorWritten = !0), K( + r.namespaceURI, + o !== void 0 ? "interior" : "exterior" + ); + } + writeSurfaceOrPolygon(t, e, i) { + const s = i[i.length - 1], r = s.hasZ, o = s.srsName; + if (t.nodeName !== "PolygonPatch" && o && t.setAttribute("srsName", o), t.nodeName === "Polygon" || t.nodeName === "PolygonPatch") { + const a = e.getLinearRings(); + St( + { node: t, hasZ: r, srsName: o }, + this.RING_SERIALIZERS, + this.RING_NODE_FACTORY_, + a, + i, + void 0, + this + ); + } else if (t.nodeName === "Surface") { + const a = K(t.namespaceURI, "patches"); + t.appendChild(a), this.writeSurfacePatches_(a, e, i); + } + } + writeCurveOrLineString(t, e, i) { + const r = i[i.length - 1].srsName; + if (t.nodeName !== "LineStringSegment" && r && t.setAttribute("srsName", r), t.nodeName === "LineString" || t.nodeName === "LineStringSegment") { + const o = K(t.namespaceURI, "posList"); + t.appendChild(o), this.writePosList_(o, e, i); + } else if (t.nodeName === "Curve") { + const o = K(t.namespaceURI, "segments"); + t.appendChild(o), this.writeCurveSegments_(o, e, i); + } + } + writeMultiSurfaceOrPolygon(t, e, i) { + const s = i[i.length - 1], r = s.hasZ, o = s.srsName, a = s.surface; + o && t.setAttribute("srsName", o); + const l = e.getPolygons(); + St( + { node: t, hasZ: r, srsName: o, surface: a }, + this.SURFACEORPOLYGONMEMBER_SERIALIZERS, + this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, + l, + i, + void 0, + this + ); + } + writeMultiPoint(t, e, i) { + const s = i[i.length - 1], r = s.srsName, o = s.hasZ; + r && t.setAttribute("srsName", r); + const a = e.getPoints(); + St( + { node: t, hasZ: o, srsName: r }, + this.POINTMEMBER_SERIALIZERS, + me("pointMember"), + a, + i, + void 0, + this + ); + } + writeMultiCurveOrLineString(t, e, i) { + const s = i[i.length - 1], r = s.hasZ, o = s.srsName, a = s.curve; + o && t.setAttribute("srsName", o); + const l = e.getLineStrings(); + St( + { node: t, hasZ: r, srsName: o, curve: a }, + this.LINESTRINGORCURVEMEMBER_SERIALIZERS, + this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, + l, + i, + void 0, + this + ); + } + writeRing(t, e, i) { + const s = K(t.namespaceURI, "LinearRing"); + t.appendChild(s), this.writeLinearRing(s, e, i); + } + writeSurfaceOrPolygonMember(t, e, i) { + const s = this.GEOMETRY_NODE_FACTORY_(e, i); + s && (t.appendChild(s), this.writeSurfaceOrPolygon(s, e, i)); + } + writePointMember(t, e, i) { + const s = K(t.namespaceURI, "Point"); + t.appendChild(s), this.writePoint(s, e, i); + } + writeLineStringOrCurveMember(t, e, i) { + const s = this.GEOMETRY_NODE_FACTORY_(e, i); + s && (t.appendChild(s), this.writeCurveOrLineString(s, e, i)); + } + writeSurfacePatches_(t, e, i) { + const s = K(t.namespaceURI, "PolygonPatch"); + t.appendChild(s), this.writeSurfaceOrPolygon(s, e, i); + } + writeCurveSegments_(t, e, i) { + const s = K(t.namespaceURI, "LineStringSegment"); + t.appendChild(s), this.writeCurveOrLineString(s, e, i); + } + writeGeometryElement(t, e, i) { + const s = i[i.length - 1], r = Object.assign({}, s); + r.node = t; + let o; + Array.isArray(e) ? o = ih( + e, + s + ) : o = or( + e, + !0, + s + ), St( + r, + this.GEOMETRY_SERIALIZERS, + this.GEOMETRY_NODE_FACTORY_, + [o], + i, + void 0, + this + ); + } + writeFeatureElement(t, e, i) { + const s = e.getId(); + s && t.setAttribute("fid", s); + const r = i[i.length - 1], o = r.featureNS, a = e.getGeometryName(); + r.serializers || (r.serializers = {}, r.serializers[o] = {}); + const l = [], h = []; + if (e.hasProperties()) { + const u = e.getProperties(); + for (const d in u) { + const f = u[d]; + f !== null && (l.push(d), h.push(f), d == a || typeof f.getSimplifiedGeometry == "function" ? d in r.serializers[o] || (r.serializers[o][d] = M( + this.writeGeometryElement, + this + )) : d in r.serializers[o] || (r.serializers[o][d] = M(It))); + } + } + const c = Object.assign({}, r); + c.node = t, St( + c, + r.serializers, + me(void 0, o), + h, + i, + l + ); + } + writeFeatureMembers_(t, e, i) { + const s = i[i.length - 1], r = s.featureType, o = s.featureNS, a = {}; + a[o] = {}, a[o][r] = M( + this.writeFeatureElement, + this + ); + const l = Object.assign({}, s); + l.node = t, St( + l, + a, + me(r, o), + e, + i + ); + } + MULTIGEOMETRY_MEMBER_NODE_FACTORY_(t, e, i) { + const s = e[e.length - 1].node; + return K( + this.namespace, + ty[s.nodeName] + ); + } + GEOMETRY_NODE_FACTORY_(t, e, i) { + const s = e[e.length - 1], r = s.multiSurface, o = s.surface, a = s.curve, l = s.multiCurve; + return Array.isArray(t) ? i = "Envelope" : (i = t.getType(), i === "MultiPolygon" && r === !0 ? i = "MultiSurface" : i === "Polygon" && o === !0 ? i = "Surface" : i === "LineString" && a === !0 ? i = "Curve" : i === "MultiLineString" && l === !0 && (i = "MultiCurve")), K(this.namespace, i); + } + writeGeometryNode(t, e) { + e = this.adaptOptions(e); + const i = K(this.namespace, "geom"), s = { + node: i, + hasZ: this.hasZ, + srsName: this.srsName, + curve: this.curve_, + surface: this.surface_, + multiSurface: this.multiSurface_, + multiCurve: this.multiCurve_ + }; + return e && Object.assign(s, e), this.writeGeometryElement(i, t, [s]), i; + } + writeFeaturesNode(t, e) { + e = this.adaptOptions(e); + const i = K(this.namespace, "featureMembers"); + i.setAttributeNS( + Qa, + "xsi:schemaLocation", + this.schemaLocation + ); + const s = { + srsName: this.srsName, + hasZ: this.hasZ, + curve: this.curve_, + surface: this.surface_, + multiSurface: this.multiSurface_, + multiCurve: this.multiCurve_, + featureNS: this.featureNS, + featureType: this.featureType + }; + return e && Object.assign(s, e), this.writeFeatureMembers_(i, t, [s]), i; + } +} +D.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { + "http://www.opengis.net/gml": { + pos: Z(D.prototype.readFlatPos), + posList: Z(D.prototype.readFlatPosList), + coordinates: Z(ar.prototype.readFlatCoordinates) + } +}; +D.prototype.FLAT_LINEAR_RINGS_PARSERS = { + "http://www.opengis.net/gml": { + interior: D.prototype.interiorParser, + exterior: D.prototype.exteriorParser + } +}; +D.prototype.GEOMETRY_PARSERS = { + "http://www.opengis.net/gml": { + Point: Z(J.prototype.readPoint), + MultiPoint: Z(J.prototype.readMultiPoint), + LineString: Z(J.prototype.readLineString), + MultiLineString: Z(J.prototype.readMultiLineString), + LinearRing: Z(J.prototype.readLinearRing), + Polygon: Z(J.prototype.readPolygon), + MultiPolygon: Z(J.prototype.readMultiPolygon), + Surface: Z(D.prototype.readSurface), + MultiSurface: Z(D.prototype.readMultiSurface), + Curve: Z(D.prototype.readCurve), + MultiCurve: Z(D.prototype.readMultiCurve), + Envelope: Z(D.prototype.readEnvelope) + } +}; +D.prototype.MULTICURVE_PARSERS = { + "http://www.opengis.net/gml": { + curveMember: X(D.prototype.curveMemberParser), + curveMembers: X(D.prototype.curveMemberParser) + } +}; +D.prototype.MULTISURFACE_PARSERS = { + "http://www.opengis.net/gml": { + surfaceMember: X(D.prototype.surfaceMemberParser), + surfaceMembers: X(D.prototype.surfaceMemberParser) + } +}; +D.prototype.CURVEMEMBER_PARSERS = { + "http://www.opengis.net/gml": { + LineString: X(J.prototype.readLineString), + Curve: X(D.prototype.readCurve) + } +}; +D.prototype.SURFACEMEMBER_PARSERS = { + "http://www.opengis.net/gml": { + Polygon: X(J.prototype.readPolygon), + Surface: X(D.prototype.readSurface) + } +}; +D.prototype.SURFACE_PARSERS = { + "http://www.opengis.net/gml": { + patches: Z(D.prototype.readPatch) + } +}; +D.prototype.CURVE_PARSERS = { + "http://www.opengis.net/gml": { + segments: Z(D.prototype.readSegment) + } +}; +D.prototype.ENVELOPE_PARSERS = { + "http://www.opengis.net/gml": { + lowerCorner: X(D.prototype.readFlatPosList), + upperCorner: X(D.prototype.readFlatPosList) + } +}; +D.prototype.PATCHES_PARSERS = { + "http://www.opengis.net/gml": { + PolygonPatch: Z(D.prototype.readPolygonPatch) + } +}; +D.prototype.SEGMENTS_PARSERS = { + "http://www.opengis.net/gml": { + LineStringSegment: Pf( + D.prototype.readLineStringSegment + ) + } +}; +J.prototype.RING_PARSERS = { + "http://www.opengis.net/gml": { + LinearRing: Z(J.prototype.readFlatLinearRing), + Ring: Z(D.prototype.readFlatCurveRing) + } +}; +D.prototype.writeFeatures; +D.prototype.RING_SERIALIZERS = { + "http://www.opengis.net/gml": { + exterior: M(D.prototype.writeRing), + interior: M(D.prototype.writeRing) + } +}; +D.prototype.ENVELOPE_SERIALIZERS = { + "http://www.opengis.net/gml": { + lowerCorner: M(It), + upperCorner: M(It) + } +}; +D.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = { + "http://www.opengis.net/gml": { + surfaceMember: M( + D.prototype.writeSurfaceOrPolygonMember + ), + polygonMember: M( + D.prototype.writeSurfaceOrPolygonMember + ) + } +}; +D.prototype.POINTMEMBER_SERIALIZERS = { + "http://www.opengis.net/gml": { + pointMember: M(D.prototype.writePointMember) + } +}; +D.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = { + "http://www.opengis.net/gml": { + lineStringMember: M( + D.prototype.writeLineStringOrCurveMember + ), + curveMember: M( + D.prototype.writeLineStringOrCurveMember + ) + } +}; +D.prototype.GEOMETRY_SERIALIZERS = { + "http://www.opengis.net/gml": { + Curve: M(D.prototype.writeCurveOrLineString), + MultiCurve: M(D.prototype.writeMultiCurveOrLineString), + Point: M(D.prototype.writePoint), + MultiPoint: M(D.prototype.writeMultiPoint), + LineString: M(D.prototype.writeCurveOrLineString), + MultiLineString: M( + D.prototype.writeMultiCurveOrLineString + ), + LinearRing: M(D.prototype.writeLinearRing), + Polygon: M(D.prototype.writeSurfaceOrPolygon), + MultiPolygon: M( + D.prototype.writeMultiSurfaceOrPolygon + ), + Surface: M(D.prototype.writeSurfaceOrPolygon), + MultiSurface: M( + D.prototype.writeMultiSurfaceOrPolygon + ), + Envelope: M(D.prototype.writeEnvelope) + } +}; +const tt = D; +class lt extends tt { + constructor(t) { + t = t || {}, super(t), this.schemaLocation = t.schemaLocation ? t.schemaLocation : this.namespace + " http://schemas.opengis.net/gml/3.2.1/gml.xsd"; + } +} +lt.prototype.namespace = "http://www.opengis.net/gml/3.2"; +lt.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { + "http://www.opengis.net/gml/3.2": { + pos: Z(tt.prototype.readFlatPos), + posList: Z(tt.prototype.readFlatPosList), + coordinates: Z(ar.prototype.readFlatCoordinates) + } +}; +lt.prototype.FLAT_LINEAR_RINGS_PARSERS = { + "http://www.opengis.net/gml/3.2": { + interior: tt.prototype.interiorParser, + exterior: tt.prototype.exteriorParser + } +}; +lt.prototype.GEOMETRY_PARSERS = { + "http://www.opengis.net/gml/3.2": { + Point: Z(J.prototype.readPoint), + MultiPoint: Z(J.prototype.readMultiPoint), + LineString: Z(J.prototype.readLineString), + MultiLineString: Z(J.prototype.readMultiLineString), + LinearRing: Z(J.prototype.readLinearRing), + Polygon: Z(J.prototype.readPolygon), + MultiPolygon: Z(J.prototype.readMultiPolygon), + Surface: Z(lt.prototype.readSurface), + MultiSurface: Z(tt.prototype.readMultiSurface), + Curve: Z(lt.prototype.readCurve), + MultiCurve: Z(tt.prototype.readMultiCurve), + Envelope: Z(lt.prototype.readEnvelope) + } +}; +lt.prototype.MULTICURVE_PARSERS = { + "http://www.opengis.net/gml/3.2": { + curveMember: X(tt.prototype.curveMemberParser), + curveMembers: X(tt.prototype.curveMemberParser) + } +}; +lt.prototype.MULTISURFACE_PARSERS = { + "http://www.opengis.net/gml/3.2": { + surfaceMember: X(tt.prototype.surfaceMemberParser), + surfaceMembers: X(tt.prototype.surfaceMemberParser) + } +}; +lt.prototype.CURVEMEMBER_PARSERS = { + "http://www.opengis.net/gml/3.2": { + LineString: X(J.prototype.readLineString), + Curve: X(tt.prototype.readCurve) + } +}; +lt.prototype.SURFACEMEMBER_PARSERS = { + "http://www.opengis.net/gml/3.2": { + Polygon: X(J.prototype.readPolygon), + Surface: X(tt.prototype.readSurface) + } +}; +lt.prototype.SURFACE_PARSERS = { + "http://www.opengis.net/gml/3.2": { + patches: Z(tt.prototype.readPatch) + } +}; +lt.prototype.CURVE_PARSERS = { + "http://www.opengis.net/gml/3.2": { + segments: Z(tt.prototype.readSegment) + } +}; +lt.prototype.ENVELOPE_PARSERS = { + "http://www.opengis.net/gml/3.2": { + lowerCorner: X(tt.prototype.readFlatPosList), + upperCorner: X(tt.prototype.readFlatPosList) + } +}; +lt.prototype.PATCHES_PARSERS = { + "http://www.opengis.net/gml/3.2": { + PolygonPatch: Z(tt.prototype.readPolygonPatch) + } +}; +lt.prototype.SEGMENTS_PARSERS = { + "http://www.opengis.net/gml/3.2": { + LineStringSegment: Pf( + tt.prototype.readLineStringSegment + ) + } +}; +lt.prototype.MULTIPOINT_PARSERS = { + "http://www.opengis.net/gml/3.2": { + pointMember: X(J.prototype.pointMemberParser), + pointMembers: X(J.prototype.pointMemberParser) + } +}; +lt.prototype.MULTILINESTRING_PARSERS = { + "http://www.opengis.net/gml/3.2": { + lineStringMember: X( + J.prototype.lineStringMemberParser + ), + lineStringMembers: X( + J.prototype.lineStringMemberParser + ) + } +}; +lt.prototype.MULTIPOLYGON_PARSERS = { + "http://www.opengis.net/gml/3.2": { + polygonMember: X(J.prototype.polygonMemberParser), + polygonMembers: X(J.prototype.polygonMemberParser) + } +}; +lt.prototype.POINTMEMBER_PARSERS = { + "http://www.opengis.net/gml/3.2": { + Point: X(J.prototype.readFlatCoordinatesFromNode) + } +}; +lt.prototype.LINESTRINGMEMBER_PARSERS = { + "http://www.opengis.net/gml/3.2": { + LineString: X(J.prototype.readLineString) + } +}; +lt.prototype.POLYGONMEMBER_PARSERS = { + "http://www.opengis.net/gml/3.2": { + Polygon: X(J.prototype.readPolygon) + } +}; +lt.prototype.RING_PARSERS = { + "http://www.opengis.net/gml/3.2": { + LinearRing: Z(J.prototype.readFlatLinearRing), + Ring: Z(lt.prototype.readFlatCurveRing) + } +}; +lt.prototype.RING_SERIALIZERS = { + "http://www.opengis.net/gml/3.2": { + exterior: M(tt.prototype.writeRing), + interior: M(tt.prototype.writeRing) + } +}; +lt.prototype.ENVELOPE_SERIALIZERS = { + "http://www.opengis.net/gml/3.2": { + lowerCorner: M(It), + upperCorner: M(It) + } +}; +lt.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = { + "http://www.opengis.net/gml/3.2": { + surfaceMember: M( + tt.prototype.writeSurfaceOrPolygonMember + ), + polygonMember: M( + tt.prototype.writeSurfaceOrPolygonMember + ) + } +}; +lt.prototype.POINTMEMBER_SERIALIZERS = { + "http://www.opengis.net/gml/3.2": { + pointMember: M(tt.prototype.writePointMember) + } +}; +lt.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = { + "http://www.opengis.net/gml/3.2": { + lineStringMember: M( + tt.prototype.writeLineStringOrCurveMember + ), + curveMember: M( + tt.prototype.writeLineStringOrCurveMember + ) + } +}; +lt.prototype.GEOMETRY_SERIALIZERS = { + "http://www.opengis.net/gml/3.2": { + Curve: M(tt.prototype.writeCurveOrLineString), + MultiCurve: M(tt.prototype.writeMultiCurveOrLineString), + Point: M(lt.prototype.writePoint), + MultiPoint: M(tt.prototype.writeMultiPoint), + LineString: M(tt.prototype.writeCurveOrLineString), + MultiLineString: M( + tt.prototype.writeMultiCurveOrLineString + ), + LinearRing: M(tt.prototype.writeLinearRing), + Polygon: M(tt.prototype.writeSurfaceOrPolygon), + MultiPolygon: M( + tt.prototype.writeMultiSurfaceOrPolygon + ), + Surface: M(tt.prototype.writeSurfaceOrPolygon), + MultiSurface: M( + tt.prototype.writeMultiSurfaceOrPolygon + ), + Envelope: M(tt.prototype.writeEnvelope) + } +}; +const rh = lt; +class ey { + constructor(t) { + this.tagName_ = t; + } + getTagName() { + return this.tagName_; + } +} +const Nf = ey; +class iy extends Nf { + constructor(t, e) { + super(t), this.conditions = e, Y(this.conditions.length >= 2, 57); + } +} +const ny = iy; +class sy extends ny { + constructor(t) { + super("And", Array.prototype.slice.call(arguments)); + } +} +const ry = sy; +class oy extends Nf { + constructor(t, e, i) { + if (super("BBOX"), this.geometryName = t, this.extent = e, e.length !== 4) + throw new Error( + "Expected an extent with four values ([minX, minY, maxX, maxY])" + ); + this.srsName = i; + } +} +const ay = oy; +function ly(n) { + const t = [null].concat(Array.prototype.slice.call(arguments)); + return new (Function.prototype.bind.apply(ry, t))(); +} +function hy(n, t, e) { + return new ay(n, t, e); +} +const Bc = { + "http://www.opengis.net/gml": { + boundedBy: O( + J.prototype.readExtentElement, + "bounds" + ) + }, + "http://www.opengis.net/wfs/2.0": { + member: X(J.prototype.readFeaturesInternal) + } +}, cy = { + "http://www.opengis.net/wfs": { + totalInserted: O(ne), + totalUpdated: O(ne), + totalDeleted: O(ne) + }, + "http://www.opengis.net/wfs/2.0": { + totalInserted: O(ne), + totalUpdated: O(ne), + totalDeleted: O(ne) + } +}, uy = { + "http://www.opengis.net/wfs": { + TransactionSummary: O( + Zc, + "transactionSummary" + ), + InsertResults: O(Uc, "insertIds") + }, + "http://www.opengis.net/wfs/2.0": { + TransactionSummary: O( + Zc, + "transactionSummary" + ), + InsertResults: O(Uc, "insertIds") + } +}, dy = { + "http://www.opengis.net/wfs": { + PropertyName: M(It) + }, + "http://www.opengis.net/wfs/2.0": { + PropertyName: M(It) + } +}, Df = { + "http://www.opengis.net/wfs": { + Insert: M(Wc), + Update: M(Xc), + Delete: M(Hc), + Property: M(Yc), + Native: M(jc) + }, + "http://www.opengis.net/wfs/2.0": { + Insert: M(Wc), + Update: M(Xc), + Delete: M(Hc), + Property: M(Yc), + Native: M(jc) + } +}, kf = "feature", oh = "http://www.w3.org/2000/xmlns/", ah = { + "2.0.0": "http://www.opengis.net/ogc/1.1", + "1.1.0": "http://www.opengis.net/ogc", + "1.0.0": "http://www.opengis.net/ogc" +}, tl = { + "2.0.0": "http://www.opengis.net/wfs/2.0", + "1.1.0": "http://www.opengis.net/wfs", + "1.0.0": "http://www.opengis.net/wfs" +}, lh = { + "2.0.0": "http://www.opengis.net/fes/2.0", + "1.1.0": "http://www.opengis.net/fes", + "1.0.0": "http://www.opengis.net/fes" +}, zc = { + "2.0.0": "http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd", + "1.1.0": "http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd", + "1.0.0": "http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd" +}, hh = { + "2.0.0": rh, + "1.1.0": tt, + "1.0.0": ar +}, fy = "1.1.0"; +class gy extends Ff { + constructor(t) { + super(), t = t || {}, this.version_ = t.version ? t.version : fy, this.featureType_ = t.featureType, this.featureNS_ = t.featureNS, this.gmlFormat_ = t.gmlFormat ? t.gmlFormat : new hh[this.version_](), this.schemaLocation_ = t.schemaLocation ? t.schemaLocation : zc[this.version_]; + } + getFeatureType() { + return this.featureType_; + } + setFeatureType(t) { + this.featureType_ = t; + } + readFeaturesFromNode(t, e) { + const i = { + node: t + }; + Object.assign(i, { + featureType: this.featureType_, + featureNS: this.featureNS_ + }), Object.assign(i, this.getReadOptions(t, e || {})); + const s = [i]; + let r; + this.version_ === "2.0.0" ? r = Bc : r = this.gmlFormat_.FEATURE_COLLECTION_PARSERS; + let o = B( + [], + r, + t, + s, + this.gmlFormat_ + ); + return o || (o = []), o; + } + readTransactionResponse(t) { + if (t) + if (typeof t == "string") { + const e = Yi(t); + return this.readTransactionResponseFromDocument(e); + } else + return Xi(t) ? this.readTransactionResponseFromDocument( + t + ) : this.readTransactionResponseFromNode( + t + ); + else + return; + } + readFeatureCollectionMetadata(t) { + if (t) + if (typeof t == "string") { + const e = Yi(t); + return this.readFeatureCollectionMetadataFromDocument(e); + } else + return Xi(t) ? this.readFeatureCollectionMetadataFromDocument( + t + ) : this.readFeatureCollectionMetadataFromNode( + t + ); + else + return; + } + readFeatureCollectionMetadataFromDocument(t) { + for (let e = t.firstChild; e; e = e.nextSibling) + if (e.nodeType == Node.ELEMENT_NODE) + return this.readFeatureCollectionMetadataFromNode( + e + ); + } + readFeatureCollectionMetadataFromNode(t) { + const e = {}, i = Fn( + t.getAttribute("numberOfFeatures") + ); + return e.numberOfFeatures = i, B( + e, + Bc, + t, + [], + this.gmlFormat_ + ); + } + readTransactionResponseFromDocument(t) { + for (let e = t.firstChild; e; e = e.nextSibling) + if (e.nodeType == Node.ELEMENT_NODE) + return this.readTransactionResponseFromNode(e); + } + readTransactionResponseFromNode(t) { + return B( + {}, + uy, + t, + [] + ); + } + writeGetFeature(t) { + const e = K(tl[this.version_], "GetFeature"); + e.setAttribute("service", "WFS"), e.setAttribute("version", this.version_), t.handle && e.setAttribute("handle", t.handle), t.outputFormat && e.setAttribute("outputFormat", t.outputFormat), t.maxFeatures !== void 0 && e.setAttribute("maxFeatures", String(t.maxFeatures)), t.resultType && e.setAttribute("resultType", t.resultType), t.startIndex !== void 0 && e.setAttribute("startIndex", String(t.startIndex)), t.count !== void 0 && e.setAttribute("count", String(t.count)), t.viewParams !== void 0 && e.setAttribute("viewParams", t.viewParams), e.setAttributeNS( + Qa, + "xsi:schemaLocation", + this.schemaLocation_ + ); + const i = { + node: e + }; + if (Object.assign(i, { + version: this.version_, + srsName: t.srsName, + featureNS: t.featureNS ? t.featureNS : this.featureNS_, + featurePrefix: t.featurePrefix, + propertyNames: t.propertyNames ? t.propertyNames : [] + }), Y(Array.isArray(t.featureTypes), 11), typeof t.featureTypes[0] == "string") { + let s = t.filter; + t.bbox && (Y(t.geometryName, 12), s = this.combineBboxAndFilter( + t.geometryName, + t.bbox, + t.srsName, + s + )), Object.assign(i, { + geometryName: t.geometryName, + filter: s + }), ru( + e, + t.featureTypes, + [i] + ); + } else + t.featureTypes.forEach((s) => { + const r = this.combineBboxAndFilter( + s.geometryName, + s.bbox, + t.srsName, + t.filter + ); + Object.assign(i, { + geometryName: s.geometryName, + filter: r + }), ru(e, [s.name], [i]); + }); + return e; + } + combineBboxAndFilter(t, e, i, s) { + const r = hy(t, e, i); + return s ? ly(s, r) : r; + } + writeTransaction(t, e, i, s) { + const r = [], o = s.version ? s.version : this.version_, a = K(tl[o], "Transaction"); + a.setAttribute("service", "WFS"), a.setAttribute("version", o); + let l; + s && (l = s.gmlOptions ? s.gmlOptions : {}, s.handle && a.setAttribute("handle", s.handle)), a.setAttributeNS( + Qa, + "xsi:schemaLocation", + zc[o] + ); + const h = my(a, l, o, s); + return t && zr("Insert", t, r, h), e && zr("Update", e, r, h), i && zr("Delete", i, r, h), s.nativeElements && zr( + "Native", + s.nativeElements, + r, + h + ), a; + } + readProjectionFromDocument(t) { + for (let e = t.firstChild; e; e = e.nextSibling) + if (e.nodeType == Node.ELEMENT_NODE) + return this.readProjectionFromNode(e); + return null; + } + readProjectionFromNode(t) { + if (t.firstElementChild && t.firstElementChild.firstElementChild) { + t = t.firstElementChild.firstElementChild; + for (let e = t.firstElementChild; e; e = e.nextElementSibling) + if (!(e.childNodes.length === 0 || e.childNodes.length === 1 && e.firstChild.nodeType === 3)) { + const i = [{}]; + return this.gmlFormat_.readGeometryElement(e, i), Q(i.pop().srsName); + } + } + return null; + } +} +function my(n, t, e, i) { + const s = i.featurePrefix ? i.featurePrefix : kf; + let r; + return e === "1.0.0" ? r = 2 : e === "1.1.0" ? r = 3 : e === "2.0.0" && (r = 3.2), Object.assign( + { node: n }, + { + version: e, + featureNS: i.featureNS, + featureType: i.featureType, + featurePrefix: s, + gmlVersion: r, + hasZ: i.hasZ, + srsName: i.srsName + }, + t + ); +} +function zr(n, t, e, i) { + St( + i, + Df, + me(n), + t, + e + ); +} +function Zc(n, t) { + return B({}, cy, n, t); +} +const _y = { + "http://www.opengis.net/ogc": { + FeatureId: X(function(n, t) { + return n.getAttribute("fid"); + }) + }, + "http://www.opengis.net/ogc/1.1": { + FeatureId: X(function(n, t) { + return n.getAttribute("fid"); + }) + } +}; +function Vc(n, t) { + Ji(_y, n, t); +} +const py = { + "http://www.opengis.net/wfs": { + Feature: Vc + }, + "http://www.opengis.net/wfs/2.0": { + Feature: Vc + } +}; +function Uc(n, t) { + return B([], py, n, t); +} +function Wc(n, t, e) { + const i = e[e.length - 1], s = i.featureType, r = i.featureNS, o = i.gmlVersion, a = K(r, s); + n.appendChild(a), o === 2 ? ar.prototype.writeFeatureElement(a, t, e) : o === 3 ? tt.prototype.writeFeatureElement(a, t, e) : rh.prototype.writeFeatureElement(a, t, e); +} +function Gf(n, t, e) { + const s = e[e.length - 1].version, r = ah[s], o = K(r, "Filter"), a = K(r, "FeatureId"); + o.appendChild(a), a.setAttribute("fid", t), n.appendChild(o); +} +function ch(n, t) { + n = n || kf; + const e = n + ":"; + return t.startsWith(e) ? t : e + t; +} +function Hc(n, t, e) { + const i = e[e.length - 1]; + Y(t.getId() !== void 0, 26); + const s = i.featureType, r = i.featurePrefix, o = i.featureNS, a = ch(r, s); + n.setAttribute("typeName", a), n.setAttributeNS(oh, "xmlns:" + r, o); + const l = t.getId(); + l !== void 0 && Gf(n, l, e); +} +function Xc(n, t, e) { + const i = e[e.length - 1]; + Y(t.getId() !== void 0, 27); + const s = i.version, r = i.featureType, o = i.featurePrefix, a = i.featureNS, l = ch(o, r), h = t.getGeometryName(); + n.setAttribute("typeName", l), n.setAttributeNS(oh, "xmlns:" + o, a); + const c = t.getId(); + if (c !== void 0) { + const u = t.getKeys(), d = []; + for (let f = 0, g = u.length; f < g; f++) { + const m = t.get(u[f]); + if (m !== void 0) { + let _ = u[f]; + m && typeof m.getSimplifiedGeometry == "function" && (_ = h), d.push({ name: _, value: m }); + } + } + St( + { + version: s, + gmlVersion: i.gmlVersion, + node: n, + hasZ: i.hasZ, + srsName: i.srsName + }, + Df, + me("Property"), + d, + e + ), Gf(n, c, e); + } +} +function Yc(n, t, e) { + const i = e[e.length - 1], s = i.version, r = tl[s], o = K(r, "Name"), a = i.gmlVersion; + if (n.appendChild(o), It(o, t.name), t.value !== void 0 && t.value !== null) { + const l = K(r, "Value"); + n.appendChild(l), t.value && typeof t.value.getSimplifiedGeometry == "function" ? a === 2 ? ar.prototype.writeGeometryElement(l, t.value, e) : a === 3 ? tt.prototype.writeGeometryElement(l, t.value, e) : rh.prototype.writeGeometryElement(l, t.value, e) : It(l, t.value); + } +} +function jc(n, t, e) { + t.vendorId && n.setAttribute("vendorId", t.vendorId), t.safeToIgnore !== void 0 && n.setAttribute("safeToIgnore", String(t.safeToIgnore)), t.value !== void 0 && It(n, t.value); +} +const zo = { + "http://www.opengis.net/wfs": { + Query: M(qc) + }, + "http://www.opengis.net/wfs/2.0": { + Query: M(qc) + }, + "http://www.opengis.net/ogc": { + During: M(Qc), + And: M(Zr), + Or: M(Zr), + Not: M(tu), + BBOX: M(Kc), + Contains: M(xi), + Intersects: M(xi), + Within: M(xi), + DWithin: M(Jc), + PropertyIsEqualTo: M(Ce), + PropertyIsNotEqualTo: M(Ce), + PropertyIsLessThan: M(Ce), + PropertyIsLessThanOrEqualTo: M(Ce), + PropertyIsGreaterThan: M(Ce), + PropertyIsGreaterThanOrEqualTo: M(Ce), + PropertyIsNull: M(eu), + PropertyIsBetween: M(iu), + PropertyIsLike: M(nu) + }, + "http://www.opengis.net/fes/2.0": { + During: M(Qc), + And: M(Zr), + Or: M(Zr), + Not: M(tu), + BBOX: M(Kc), + Contains: M(xi), + Disjoint: M(xi), + Intersects: M(xi), + ResourceId: M(vy), + Within: M(xi), + DWithin: M(Jc), + PropertyIsEqualTo: M(Ce), + PropertyIsNotEqualTo: M(Ce), + PropertyIsLessThan: M(Ce), + PropertyIsLessThanOrEqualTo: M(Ce), + PropertyIsGreaterThan: M(Ce), + PropertyIsGreaterThanOrEqualTo: M(Ce), + PropertyIsNull: M(eu), + PropertyIsBetween: M(iu), + PropertyIsLike: M(nu) + } +}; +function qc(n, t, e) { + const i = e[e.length - 1], s = i.version, r = i.featurePrefix, o = i.featureNS, a = i.propertyNames, l = i.srsName; + let h; + r ? h = ch(r, t) : h = t; + let c; + s === "2.0.0" ? c = "typeNames" : c = "typeName", n.setAttribute(c, h), l && n.setAttribute("srsName", l), o && n.setAttributeNS(oh, "xmlns:" + r, o); + const u = Object.assign({}, i); + u.node = n, St( + u, + dy, + me("PropertyName"), + a, + e + ); + const d = i.filter; + if (d) { + const f = K(Zo(s), "Filter"); + n.appendChild(f), yy(f, d, e); + } +} +function yy(n, t, e) { + const i = e[e.length - 1], s = { node: n }; + Object.assign(s, { context: i }), St( + s, + zo, + me(t.getTagName()), + [t], + e + ); +} +function Kc(n, t, e) { + const i = e[e.length - 1], r = i.context.version; + i.srsName = t.srsName; + const o = hh[r]; + os(r, n, t.geometryName), o.prototype.writeGeometryElement(n, t.extent, e); +} +function vy(n, t, e) { + n.setAttribute("rid", t.rid); +} +function xi(n, t, e) { + const i = e[e.length - 1], r = i.context.version; + i.srsName = t.srsName; + const o = hh[r]; + os(r, n, t.geometryName), o.prototype.writeGeometryElement(n, t.geometry, e); +} +function Jc(n, t, e) { + const r = e[e.length - 1].context.version; + xi(n, t, e); + const o = K(Zo(r), "Distance"); + It(o, t.distance.toString()), r === "2.0.0" ? o.setAttribute("uom", t.unit) : o.setAttribute("units", t.unit), n.appendChild(o); +} +function Qc(n, t, e) { + const r = e[e.length - 1].context.version; + po(lh[r], "ValueReference", n, t.propertyName); + const o = K(hi, "TimePeriod"); + n.appendChild(o); + const a = K(hi, "begin"); + o.appendChild(a), su(a, t.begin); + const l = K(hi, "end"); + o.appendChild(l), su(l, t.end); +} +function Zr(n, t, e) { + const s = e[e.length - 1].context, r = { node: n }; + Object.assign(r, { context: s }); + const o = t.conditions; + for (let a = 0, l = o.length; a < l; ++a) { + const h = o[a]; + St( + r, + zo, + me(h.getTagName()), + [h], + e + ); + } +} +function tu(n, t, e) { + const s = e[e.length - 1].context, r = { node: n }; + Object.assign(r, { context: s }); + const o = t.condition; + St( + r, + zo, + me(o.getTagName()), + [o], + e + ); +} +function Ce(n, t, e) { + const r = e[e.length - 1].context.version; + t.matchCase !== void 0 && n.setAttribute("matchCase", t.matchCase.toString()), os(r, n, t.propertyName), yo(r, n, "" + t.expression); +} +function eu(n, t, e) { + const r = e[e.length - 1].context.version; + os(r, n, t.propertyName); +} +function iu(n, t, e) { + const r = e[e.length - 1].context.version, o = Zo(r); + os(r, n, t.propertyName); + const a = K(o, "LowerBoundary"); + n.appendChild(a), yo(r, a, "" + t.lowerBoundary); + const l = K(o, "UpperBoundary"); + n.appendChild(l), yo(r, l, "" + t.upperBoundary); +} +function nu(n, t, e) { + const r = e[e.length - 1].context.version; + n.setAttribute("wildCard", t.wildCard), n.setAttribute("singleChar", t.singleChar), n.setAttribute("escapeChar", t.escapeChar), t.matchCase !== void 0 && n.setAttribute("matchCase", t.matchCase.toString()), os(r, n, t.propertyName), yo(r, n, "" + t.pattern); +} +function po(n, t, e, i) { + const s = K(n, t); + It(s, i), e.appendChild(s); +} +function yo(n, t, e) { + po(Zo(n), "Literal", t, e); +} +function os(n, t, e) { + n === "2.0.0" ? po(lh[n], "ValueReference", t, e) : po(ah[n], "PropertyName", t, e); +} +function su(n, t) { + const e = K(hi, "TimeInstant"); + n.appendChild(e); + const i = K(hi, "timePosition"); + e.appendChild(i), It(i, t); +} +function ru(n, t, e) { + const i = e[e.length - 1], s = Object.assign({}, i); + s.node = n, St( + s, + zo, + me("Query"), + t, + e + ); +} +function Zo(n) { + let t; + return n === "2.0.0" ? t = lh[n] : t = ah[n], t; +} +const xy = gy; +class $f { + static getSource(t, e) { + return new Ve({ + format: new xy({ + version: "2.0.0" + }), + url: function(i) { + if (e === "") + t + "" + i.join(","); + else if (e.includes("")) { + const s = `geometry${i[0]} ${i[1]}${i[2]} ${i[3]}`; + t = `${t}&${e}`.replace("", s); + } else + console.error("The replacement string cannot be found. You lose the BBOX optimization."), t = `${t}&${e}`; + return t; + }, + strategy: F_ + }); + } +} +class Cy { + constructor() { + this.control = new bf(), this.store = w(); + const t = this.store.getMap(), e = this.store.getOptions(), i = new Ze(), s = $f.getSource(this.store.getOptions().wfs.url, ""); + this.displayDataOnMap(t, i, e, s), t.on("click", (r) => { + t.forEachFeatureAtPixel(r.pixel, (o) => { + var a; + o && ((a = o.getGeometry()) == null ? void 0 : a.getType()) === "Point" && o.getProperties().features.length === 1 && (this.store.getSelectedFeature(o.getProperties().features[0].get("objectid"), "objectid") === void 0 && this.store.addSelectedFeature(o.getProperties().features[0]), ot.sendEvent("icon-clicked", o.getProperties().features[0].get("objectid"))); + }); + }), window.addEventListener("recenter-selected-element", () => { + var a; + const r = this.store.getCurrentItemId(), o = (a = this.store.getSelectedFeature(r, "objectid")) == null ? void 0 : a.get("geom").getCoordinates(); + t.getView().setCenter(o); + }); + } + displayDataOnMap(t, e, i, s) { + const r = new G2({ + distance: i.cluster.distance, + minDistance: i.cluster.minDistance, + source: s + }); + e.setSource(r), e.setStyle(function(o) { + return Vp.clusterWithIcon(o); + }), t.addLayer(e), this.control.disable(), t.addControl(this.control), this.toogleDataSelection(e); + } + setCurrentElement(t) { + var e; + (e = this.store.getSelectedFeature(this.store.getCurrentItemId(), "objectid")) == null || e.set("isSelected", void 0), this.store.setCurrentItemId(t.get("objectid")); + } + setIconToDisplay(t, e) { + t.set("isClick", e), t.set("isSelected", e); + } + removeSelectedItem(t) { + this.removeItem(t), this.control.hide(), ot.sendEvent("rule-validation", void 0), Lf.setCustomStyleWithouInfoBox(); + } + removeItem(t) { + this.setIconToDisplay(t, void 0), this.store.removeSelectedFeature(t.get("objectid"), "objectid"); + } + setInformationBox(t) { + this.setIconToDisplay(t, !0), this.control.show(), ot.sendEvent("open-select-create-box", t.get("geom").getCoordinates()), this.store.setCustomDisplay(!0), this.store.setTargetBoxSize("select"); + } + toogleDataSelection(t) { + window.addEventListener("authorize-clicked", (e) => { + var s; + const i = this.store.getSelectedFeature(e.detail, "objectid"); + i && (i.get("isClick") ? this.store.getMaxElement() === 1 || this.store.getCurrentItemId() === i.get("objectid") ? this.removeSelectedItem(i) : (this.setCurrentElement(i), i.set("isSelected", !0), ot.sendEvent("open-select-create-box", i.get("geom").getCoordinates()), this.control.show()) : this.store.getMaxElement() === 1 ? ((s = t.getSource()) == null || s.getFeatures().forEach((o) => { + o.get("features").forEach((a) => { + a.get("isClick") && (this.setIconToDisplay(a, void 0), this.store.removeSelectedFeature(a.get("objectid"), "objectid")); + }); + }), this.store.setCurrentItemId(i.get("objectid")), ot.sendEvent("rule-validation", void 0), this.setInformationBox(i)) : this.store.getMaxElement() === -1 || this.store.getSelectedFeatures().length <= this.store.getMaxElement() ? (this.setCurrentElement(i), this.setInformationBox(i)) : this.removeItem(i)), this.store.getMap().get("target").className = `${this.store.getTargetBoxSize()} ${this.store.getTheme()}`; + }); + } +} +class My { + constructor() { + var e; + this.vectorLayer = new Ze(), this.vectorSource = new Ve(); + const t = w().getGeolocation(); + if (t) { + const i = new Ie(); + i.setStyle( + new Zt({ + image: new we({ + radius: 6, + fill: new Vt({ + color: "#3399CC" + }), + stroke: new Xt({ + color: "#fff", + width: 2 + }) + }) + }) + ), t.on("change:position", function() { + const s = t.getPosition(); + i.setGeometry(s ? new Se(s) : void 0); + }), (e = this.vectorSource) == null || e.addFeature(i), this.vectorLayer.setSource(this.vectorSource), w().getMap().addLayer(this.vectorLayer); + } + } +} +class Ey { + read(t) { + if (t) + if (typeof t == "string") { + const e = Yi(t); + return this.readFromDocument(e); + } else + return Xi(t) ? this.readFromDocument(t) : this.readFromNode(t); + else + return null; + } + readFromDocument(t) { + for (let e = t.firstChild; e; e = e.nextSibling) + if (e.nodeType == Node.ELEMENT_NODE) + return this.readFromNode(e); + return null; + } + readFromNode(t) { + } +} +const Bf = Ey, wy = "http://www.w3.org/1999/xlink"; +function uh(n) { + return n.getAttributeNS(wy, "href"); +} +const le = [null, "http://www.opengis.net/ows/1.1"], Sy = dt(le, { + ServiceIdentification: O(qy), + ServiceProvider: O(Jy), + OperationsMetadata: O(Yy) +}); +class Ry extends Bf { + constructor() { + super(); + } + readFromNode(t) { + const e = B({}, Sy, t, []); + return e || null; + } +} +const Ty = dt(le, { + DeliveryPoint: O(rt), + City: O(rt), + AdministrativeArea: O(rt), + PostalCode: O(rt), + Country: O(rt), + ElectronicMailAddress: O(rt) +}), by = dt(le, { + Value: ge(Qy) +}), Ly = dt(le, { + AllowedValues: O(zy) +}), Iy = dt(le, { + Phone: O(jy), + Address: O(By) +}), Py = dt(le, { + HTTP: O(Hy) +}), Ay = dt(le, { + Get: ge(Wy), + Post: void 0 +}), Oy = dt(le, { + DCP: O(Uy) +}), Fy = dt(le, { + Operation: Xy +}), Ny = dt(le, { + Voice: O(rt), + Facsimile: O(rt) +}), Dy = dt(le, { + Constraint: ge(Zy) +}), ky = dt(le, { + IndividualName: O(rt), + PositionName: O(rt), + ContactInfo: O(Vy) +}), Gy = dt(le, { + Abstract: O(rt), + AccessConstraints: O(rt), + Fees: O(rt), + Title: O(rt), + ServiceTypeVersion: O(rt), + ServiceType: O(rt) +}), $y = dt(le, { + ProviderName: O(rt), + ProviderSite: O(uh), + ServiceContact: O(Ky) +}); +function By(n, t) { + return B({}, Ty, n, t); +} +function zy(n, t) { + return B({}, by, n, t); +} +function Zy(n, t) { + const e = n.getAttribute("name"); + if (!!e) + return B({ name: e }, Ly, n, t); +} +function Vy(n, t) { + return B({}, Iy, n, t); +} +function Uy(n, t) { + return B({}, Py, n, t); +} +function Wy(n, t) { + const e = uh(n); + if (!!e) + return B( + { href: e }, + Dy, + n, + t + ); +} +function Hy(n, t) { + return B({}, Ay, n, t); +} +function Xy(n, t) { + const e = n.getAttribute("name"), i = B({}, Oy, n, t); + if (!i) + return; + const s = t[t.length - 1]; + s[e] = i; +} +function Yy(n, t) { + return B({}, Fy, n, t); +} +function jy(n, t) { + return B({}, Ny, n, t); +} +function qy(n, t) { + return B({}, Gy, n, t); +} +function Ky(n, t) { + return B({}, ky, n, t); +} +function Jy(n, t) { + return B({}, $y, n, t); +} +function Qy(n, t) { + return rt(n); +} +const tv = Ry, He = [null, "http://www.opengis.net/wmts/1.0"], as = [null, "http://www.opengis.net/ows/1.1"], ev = dt(He, { + Contents: O(fv) +}); +class iv extends Bf { + constructor() { + super(), this.owsParser_ = new tv(); + } + readFromNode(t) { + let e = t.getAttribute("version"); + e && (e = e.trim()); + let i = this.owsParser_.readFromNode(t); + return i ? (i.version = e, i = B( + i, + ev, + t, + [] + ), i || null) : null; + } +} +const nv = dt(He, { + Layer: ge(gv), + TileMatrixSet: ge(mv) +}), sv = dt( + He, + { + Style: ge(_v), + Format: ge(rt), + TileMatrixSetLink: ge(pv), + Dimension: ge(yv), + ResourceURL: ge(vv) + }, + dt(as, { + Title: O(rt), + Abstract: O(rt), + WGS84BoundingBox: O(zf), + Identifier: O(rt) + }) +), rv = dt( + He, + { + LegendURL: ge(xv) + }, + dt(as, { + Title: O(rt), + Identifier: O(rt) + }) +), ov = dt(He, { + TileMatrixSet: O(rt), + TileMatrixSetLimits: O(Mv) +}), av = dt(He, { + TileMatrixLimits: X(Ev) +}), lv = dt(He, { + TileMatrix: O(rt), + MinTileRow: O(ne), + MaxTileRow: O(ne), + MinTileCol: O(ne), + MaxTileCol: O(ne) +}), hv = dt( + He, + { + Default: O(rt), + Value: ge(rt) + }, + dt(as, { + Identifier: O(rt) + }) +), cv = dt(as, { + LowerCorner: X(el), + UpperCorner: X(el) +}), uv = dt( + He, + { + WellKnownScaleSet: O(rt), + TileMatrix: ge(Cv) + }, + dt(as, { + SupportedCRS: O(rt), + Identifier: O(rt), + BoundingBox: O(zf) + }) +), dv = dt( + He, + { + TopLeftCorner: O(el), + ScaleDenominator: O(jp), + TileWidth: O(ne), + TileHeight: O(ne), + MatrixWidth: O(ne), + MatrixHeight: O(ne) + }, + dt(as, { + Identifier: O(rt) + }) +); +function fv(n, t) { + return B({}, nv, n, t); +} +function gv(n, t) { + return B({}, sv, n, t); +} +function mv(n, t) { + return B({}, uv, n, t); +} +function _v(n, t) { + const e = B({}, rv, n, t); + if (!e) + return; + const i = n.getAttribute("isDefault") === "true"; + return e.isDefault = i, e; +} +function pv(n, t) { + return B({}, ov, n, t); +} +function yv(n, t) { + return B({}, hv, n, t); +} +function vv(n, t) { + const e = n.getAttribute("format"), i = n.getAttribute("template"), s = n.getAttribute("resourceType"), r = {}; + return e && (r.format = e), i && (r.template = i), s && (r.resourceType = s), r; +} +function zf(n, t) { + const e = B( + [], + cv, + n, + t + ); + if (e.length == 2) + return Ut(e); +} +function xv(n, t) { + const e = {}; + return e.format = n.getAttribute("format"), e.href = uh(n), e; +} +function el(n, t) { + const e = rt(n).split(/\s+/); + if (!e || e.length != 2) + return; + const i = +e[0], s = +e[1]; + if (!(isNaN(i) || isNaN(s))) + return [i, s]; +} +function Cv(n, t) { + return B({}, dv, n, t); +} +function Mv(n, t) { + return B([], av, n, t); +} +function Ev(n, t) { + return B({}, lv, n, t); +} +const wv = iv; +class Sv { + constructor() { + const t = new wv(), e = w().getOptions(); + let i = !0; + const s = []; + Promise.all(e.wmts.map((r) => { + fetch(r.capability).then((o) => o.text()).then(function(o) { + const a = new U2({ + opacity: 1 + }), l = t.read(o), h = j2(l, { + layer: r.layer, + matrixSet: r.projection + }); + h && (a.setSource(new Y2(h)), a.setVisible(i), s.push(a), w().getMap().getLayers().insertAt(0, a), i = !1, w().getBorderConstraint() && a.setExtent(w().getBorderConstraint())); + }); + })), e.borderUrl !== "" && window.addEventListener("border-contraint-enabled", () => { + s.forEach((r) => r.setExtent(w().getBorderConstraint())); + }), window.addEventListener("layer-selected", (r) => { + var o; + s.forEach((a) => a.setVisible(!1)), (o = s.find((a) => { + const l = a.getSource(); + return l && l.getLayer() === r.detail.layer ? a : void 0; + })) == null || o.setVisible(!0); + }); + } +} +const Rv = `:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move} +`, Tv = `#map{width:100%;height:100%}.ol-layer{background-color:#80808020} +`, Vo = `.left-buttons-control-container{display:flex;position:absolute;width:var(--icon-width);flex-direction:column;left:var(--side-distance)}.right-buttons-control-container{display:flex;position:absolute;right:var(--side-distance);width:var(--icon-width);flex-direction:column}.ol-zoom{position:relative;width:var(--icon-width)!important;top:0px;left:0px;background-color:var(--control-background-color)!important}.ol-full-screen{position:relative;width:var(--icon-width)!important;top:0px;right:0px;margin-top:var(--top-distance);background-color:var(--control-background-color)!important}.center-control,.rotation-control{margin-top:var(--top-distance)}.ol-zoom>button{margin:0}.ol-full-screen>button,.ol-full-screen-custom-small>button,.ol-full-screen-custom-medium>button,.ol-full-screen-custom-large>button{border-radius:var(--icon-border-radius);margin:0;cursor:pointer}.ol-zoom-in,.ol-zoom-out,.information-control,.center-control,.rotation-control,.ol-full-screen-true,.ol-full-screen-false{width:var(--icon-width)!important;height:var(--icon-height)!important;background-color:var(--control-background-color)!important;border-radius:var(--icon-border-radius);cursor:pointer}.ol-zoom-in:hover,.ol-zoom-out:hover,.information-control:hover,.center-control:hover,.rotation-control:hover,.ol-full-screen-true:hover,.ol-full-screen-false:hover{background-color:var(--control-background-color-hover)!important;outline:none!important}.ol-zoom-in{border-radius:0!important;border-top-right-radius:var(--icon-border-radius)!important;border-top-left-radius:var(--icon-border-radius)!important}.ol-zoom-out{border-radius:0!important;border-bottom-right-radius:var(--icon-border-radius)!important;border-bottom-left-radius:var(--icon-border-radius)!important}.ol-zoom-in>div>svg,.ol-zoom-out>div>svg,.ol-full-screen-true>div>svg,.ol-full-screen-false>div>svg{width:var(--svg-icon-size)!important;height:var(--svg-icon-size)!important}.ol-zoom-in>div>svg>g>.icon,.ol-zoom-out>div>svg>g>.icon,.ol-full-screen-true>div>svg>g>.icon,.ol-full-screen-false>div>svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}@media only screen and (min-width: 420px){.left-buttons-control-container,.right-buttons-control-container{top:var(--top-distance)}}@media only screen and (max-width: 419px){.left-buttons-control-container,.right-buttons-control-container{top:calc(calc(var(--top-distance) * 2) + var(--box-height))}} +`, dh = `.notification-element-info-light{--notification-background-color: #DBEAFE;--notification-stroke-color: #1D4ED8;--notification-text-color: #1D4ED8}.notification-element-info-dark{--notification-background-color: #2563EB;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}.notification-element-warning-light{--notification-background-color: #FEF3C7;--notification-stroke-color: #B45309;--notification-text-color: #B45309}.notification-element-warning-dark{--notification-background-color: #D97706;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}.notification-element-error-light{--notification-background-color: #FEE2E2;--notification-stroke-color: #B91C1C;--notification-text-color: #B91C1C}.notification-element-error-dark{--notification-background-color: #DC2626;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}.control-notification-manager{position:absolute;bottom:10px;left:calc((100% - 334px)/2);max-width:302px;width:100%;height:62px;display:grid}.notification-box{position:relative;grid-area:1 / 1 / 2 / 2}.notification-element{font-family:sans-serif;--icon-size: 32px;background-color:var(--notification-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);z-index:10;margin-left:5px;margin-right:5px;max-width:302px;width:100%;grid-template-columns:100%;grid-template-rows:100%}.notification-title>div>svg{display:block;width:var(--icon-size);height:var(--icon-size);padding-right:10px}.notification-icon-container{height:100%}.notification-title>div>svg>g>.icon{fill:none;stroke:var(--notification-stroke-color);stroke-width:2px;stroke-linejoin:round;stroke-linecap:round}.notification-title{display:flex}.notification-title-text{font-weight:400;font-size:12px;line-height:15px;color:var(--notification-text-color)} +`; +var bv = Object.defineProperty, Lv = Object.getOwnPropertyDescriptor, lr = (n, t, e, i) => { + for (var s = i > 1 ? void 0 : i ? Lv(t, e) : t, r = n.length - 1, o; r >= 0; r--) + (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); + return i && s && bv(t, e, s), s; +}; +let on = class extends kt { + constructor() { + super(), this.type = "info", this.message = "", this.icon = "", this.theme = ""; + } + firstUpdated() { + switch (this.type) { + case "info": + this.icon = at.info, this.theme = `notification-element-info-${w().getTheme()}`; + break; + case "warning": + this.icon = at.warning, this.theme = `notification-element-warning-${w().getTheme()}`; + break; + case "error": + this.icon = at.error, this.theme = `notification-element-error-${w().getTheme()}`; + break; + } + } + render() { + return Lt` +
+
+
+ ${Ue(this.icon)} +
+
${this.message}
+
+
+ `; + } +}; +on.styles = [Mt(dh)]; +lr([ + cn() +], on.prototype, "type", 2); +lr([ + cn() +], on.prototype, "message", 2); +lr([ + ae() +], on.prototype, "icon", 2); +lr([ + ae() +], on.prototype, "theme", 2); +on = lr([ + oe("notification-box") +], on); +class ps extends Gt { + constructor(t, e, i) { + const s = document.createElement( + "notification-box" + ); + s.type = e.type, s.message = e.message, super({ element: s }), this.ruleType = e.rule.type, this.div = s, this.div.classList.add("notification-box"), this.div.style.zIndex = `${i}`, this.setTarget(t); + } + disable() { + this.div.classList.add("disabled"); + } + show() { + this.div.classList.remove("fade-out"), this.div.classList.remove("disabled"), this.div.classList.add("fade-in"); + } + hide() { + this.div.classList.remove("fade-in"), this.div.classList.add("fade-out"); + } +} +let ou = /[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/, au = new RegExp("^" + ou.source + "(\\s" + ou.source + "){1,}"); +const Iv = (n) => { + let t = n.split(";"), e = t.pop(), i = (t.shift() || "").split("=").pop(), s = 0; + function r(p) { + let v = e.substring(s).match(p); + return v ? (s += v[0].length, v[0]) : null; + } + function o(p) { + return p && i.match(/\d+/) && (p.crs = { + type: "name", + properties: { + name: "urn:ogc:def:crs:EPSG::" + i + } + }), p; + } + function a() { + r(/^\s*/); + } + function l() { + a(); + let p = 0, v = [], x = [v], C = v, E; + for (; E = r(/^(\()/) || r(/^(\))/) || r(/^(,)/) || r(au); ) { + if (E === "(") + x.push(C), C = [], x[x.length - 1].push(C), p++; + else if (E === ")") { + if (C.length === 0 || (C = x.pop(), !C)) + return null; + if (p--, p === 0) + break; + } else if (E === ",") + C = [], x[x.length - 1].push(C); + else if (!E.split(/\s/g).some(isNaN)) + Array.prototype.push.apply(C, E.split(/\s/g).map(parseFloat)); + else + return null; + a(); + } + return p !== 0 ? null : v; + } + function h() { + let p = [], v, x; + for (; x = r(au) || r(/^(,)/); ) + x === "," ? (p.push(v), v = []) : x.split(/\s/g).some(isNaN) || (v || (v = []), Array.prototype.push.apply(v, x.split(/\s/g).map(parseFloat))), a(); + if (v) + p.push(v); + else + return null; + return p.length ? p : null; + } + function c() { + if (!r(/^(point(\sz)?)/i) || (a(), !r(/^(\()/))) + return null; + let p = h(); + return !p || (a(), !r(/^(\))/)) ? null : { + type: "Point", + coordinates: p[0] + }; + } + function u() { + if (!r(/^(multipoint(\sz)?)/i)) + return null; + a(), e = "MULTIPOINT (" + e.substring(e.indexOf("(") + 1, e.length - 1).replace(/\(/g, "").replace(/\)/g, "") + ")"; + let v = l(); + return v ? (a(), { + type: "MultiPoint", + coordinates: v + }) : null; + } + function d() { + if (!r(/^(multilinestring(\sz)?)/i)) + return null; + a(); + let p = l(); + return p ? (a(), { + type: "MultiLineString", + coordinates: p + }) : null; + } + function f() { + if (!r(/^(linestring(\sz)?)/i) || (a(), !r(/^(\()/))) + return null; + let p = h(); + return !p || !r(/^(\))/) ? null : { + type: "LineString", + coordinates: p + }; + } + function g() { + if (!r(/^(polygon(\sz)?)/i)) + return null; + a(); + let p = l(); + return p ? { + type: "Polygon", + coordinates: p + } : null; + } + function m() { + if (!r(/^(multipolygon(\sz)?)/i)) + return null; + a(); + let p = l(); + return p ? { + type: "MultiPolygon", + coordinates: p + } : null; + } + function _() { + let p = [], v; + if (!r(/^(geometrycollection)/i) || (a(), !r(/^(\()/))) + return null; + for (; v = y(); ) + p.push(v), a(), r(/^(,)/), a(); + return r(/^(\))/) ? { + type: "GeometryCollection", + geometries: p + } : null; + } + function y() { + return c() || f() || g() || u() || d() || m() || _(); + } + return o(y()); +}, Zf = (n) => { + n.type === "Feature" && (n = n.geometry); + function t(a) { + return a.join(" "); + } + function e(a) { + return a.map(t).join(", "); + } + function i(a) { + return a.map(e).map(r).join(", "); + } + function s(a) { + return a.map(i).map(r).join(", "); + } + function r(a) { + return "(" + a + ")"; + } + let o = n; + switch (o.type) { + case "Point": + return o.coordinates && o.coordinates.length === 3 ? "POINT Z (" + t(o.coordinates) + ")" : "POINT (" + t(o.coordinates) + ")"; + case "LineString": + return o.coordinates && o.coordinates[0] && o.coordinates[0].length === 3 ? "LINESTRING Z (" + e(o.coordinates) + ")" : "LINESTRING (" + e(o.coordinates) + ")"; + case "Polygon": + return o.coordinates && o.coordinates[0] && o.coordinates[0][0] && o.coordinates[0][0].length === 3 ? "POLYGON Z (" + i(o.coordinates) + ")" : "POLYGON (" + i(o.coordinates) + ")"; + case "MultiPoint": + return o.coordinates && o.coordinates[0] && o.coordinates[0].length === 3 ? "MULTIPOINT Z (" + e(o.coordinates) + ")" : "MULTIPOINT (" + e(o.coordinates) + ")"; + case "MultiLineString": + return o.coordinates && o.coordinates[0] && o.coordinates[0][0] && o.coordinates[0][0].length === 3 ? "MULTILINESTRING Z (" + i(o.coordinates) + ")" : "MULTILINESTRING (" + i(o.coordinates) + ")"; + case "MultiPolygon": + return o.coordinates && o.coordinates[0] && o.coordinates[0][0] && o.coordinates[0][0] && o.coordinates[0][0][0].length === 3 ? "MULTIPOLYGON Z (" + s(o.coordinates) + ")" : "MULTIPOLYGON (" + s(o.coordinates) + ")"; + case "GeometryCollection": + return "GEOMETRYCOLLECTION (" + o.geometries.map(Zf).join(", ") + ")"; + default: + throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input"); + } +}; +var lu = { + parse: Iv, + stringify: Zf +}; +class Vf extends Gt { + constructor() { + const t = document.createElement("div"); + t.classList.add("control-notification-manager"), super({ + element: t + }), this.div = t; + } +} +Vf.style = [Mt(dh)]; +class Pv { + constructor() { + this.validZoomConstraint = !0, this.validAreaConstraint = !0, this.validMaxElementConstraint = !0, this.notificationControl = new Vf(); + const t = w().getOptions(); + switch (t.mode.type) { + case "target": + this.setupTargetMode(); + break; + case "select": + this.setupSelectMode(); + break; + case "create": + this.setupCreateMode(); + break; + default: + w().getMap().addControl(new ps(this.notificationControl.div, { + type: "error", + message: "Veuillez s\xE9lectionner un mode de fonctionnement valide.", + rule: { + type: "NOT_VALID_MODE" + } + }, 5)); + } + w().getMap().addControl(this.notificationControl), this.setup(t.notifications); + } + setupTargetMode() { + window.addEventListener("current-center-position", (t) => { + if (this.validZoomConstraint && this.validAreaConstraint) { + const e = { + type: "Point", + coordinates: t.detail + }; + ot.sendEvent("position-selected", [{ geometry: lu.stringify(e) }]); + } + }); + } + setupSelectMode() { + window.addEventListener("icon-clicked", (t) => { + const e = w().getSelectedFeatures(); + this.validZoomConstraint && e.length > 0 && (this.checkMaxElementContraint(e), this.validMaxElementConstraint && ot.sendEvent("position-selected", this.generateExportData(e)), ot.sendEvent("authorize-clicked", t.detail)); + }), window.addEventListener("rule-validation", () => { + const t = w().getSelectedFeatures(); + this.checkMaxElementContraint(t), this.validZoomConstraint && this.validMaxElementConstraint && t.length > 0 && ot.sendEvent("position-selected", this.generateExportData(t)); + }); + } + setupCreateMode() { + window.addEventListener("icon-created", () => { + const t = w().getSelectedFeatures(); + this.checkMaxElementContraint(t), this.validZoomConstraint && this.validMaxElementConstraint && t.length > 0 && ot.sendEvent("position-selected", this.generateExportData(t)), ot.sendEvent("authorize-created", void 0); + }), window.addEventListener("rule-validation", () => { + const t = w().getSelectedFeatures(); + this.checkMaxElementContraint(t), this.validZoomConstraint && this.validMaxElementConstraint && t.length > 0 && ot.sendEvent("position-selected", this.generateExportData(t)); + }), window.addEventListener("icon-removed", () => { + ot.sendEvent("position-selected", void 0), ot.sendEvent("remove-created-icon", void 0); + }); + } + setup(t) { + t.forEach((e) => { + e.rule.type === "ZOOM_CONSTRAINT" && this.setupZoomContraint(e), e.rule.type === "AREA_CONSTRAINT" && this.setupInclusionAreaConstraint(e), e.rule.type === "MAX_SELECTION" && this.setupMaxSelectionConstraint(e), e.type === "info" && (this.infosNotificationControl = new ps(this.notificationControl.div, e, 1), w().getMap().addControl(this.infosNotificationControl)); + }); + } + setupZoomContraint(t) { + this.zoomNotificationControl = new ps(this.notificationControl.div, t, 4), this.zoomNotificationControl.disable(), w().getMap().addControl(this.zoomNotificationControl), this.hasValidZoom(t) && (this.validZoomConstraint = !1, this.zoomNotificationControl.show()), w().getMap().getView().on("change:resolution", () => { + this.checkZoomConstraint(t); + }); + } + setupInclusionAreaConstraint(t) { + this.inclusionNotificationControl = new ps(this.notificationControl.div, t, 2), this.inclusionNotificationControl.disable(), w().getMap().addControl(this.inclusionNotificationControl), window.addEventListener("inclusion-area-included", (e) => { + this.checkInclusionAreaConstraint(e.detail, t.rule.couldBypass); + }); + } + setupMaxSelectionConstraint(t) { + const e = t.rule.maxElement; + e !== void 0 && w().setMaxElement(e), t.message = t.message.replace("{x}", `${e}`), this.maxElementNotificationControl = new ps(this.notificationControl.div, t, 3), this.maxElementNotificationControl.disable(), w().getMap().addControl(this.maxElementNotificationControl); + } + hasValidZoom(t) { + const e = w().getMap().getView().getZoom(); + return e && t.rule.minZoom && e < t.rule.minZoom; + } + checkZoomConstraint(t) { + var e, i; + this.hasValidZoom(t) ? ((i = this.zoomNotificationControl) == null || i.show(), this.validZoomConstraint = !1, ot.sendEvent("position-selected", void 0)) : ((e = this.zoomNotificationControl) == null || e.hide(), this.validZoomConstraint = !0, ot.sendEvent("rule-validation", void 0)); + } + checkInclusionAreaConstraint(t, e) { + var i, s; + t ? ((i = this.inclusionNotificationControl) == null || i.hide(), this.validAreaConstraint = !0) : ((s = this.inclusionNotificationControl) == null || s.show(), e ? this.validAreaConstraint = !0 : (this.validAreaConstraint = !1, ot.sendEvent("position-selected", void 0))); + } + checkMaxElementContraint(t) { + var e, i; + w().getMaxElement() >= 0 && (t.length >= w().getMaxElement() ? t.length > w().getMaxElement() && (this.validMaxElementConstraint = !1, (e = this.maxElementNotificationControl) == null || e.show()) : (this.validMaxElementConstraint = !0, (i = this.maxElementNotificationControl) == null || i.hide())); + } + generateExportData(t) { + const e = []; + return t.forEach((i) => { + e.push({ + id: i.get("objectid"), + geometry: lu.stringify({ + type: "Point", + coordinates: i.get("geom").getCoordinates() + }) + }); + }), e; + } +} +const Av = `:host>.no-box{--box-height: 0px;--top-distance: 10px}:host>.select{--box-height: 68px;--top-distance: 10px}:host>.large{--box-height: 79px;--top-distance: 10px}:host>.medium{--box-height: 64px;--top-distance: 10px}:host>.small{--box-height: 49px;--top-distance: 10px}:host>.light{--control-background-color: rgb(30 41 59 / 75%);--control-background-color-hover: rgb(30 41 59 / 100%);--control-icon-color: white;--information-box-background-color: white;--information-box-title-color: #1E293B;--information-cross-hover-color: rgb(30 41 59 / 75%);--information-box-text-color: #334155;--select-icon-background: #1E293B;--icon-border-color: #CBD5E1}:host>.dark{--control-background-color: rgb(255 255 255 / 75%);--control-background-color-hover: rgb(255 255 255 / 100%);--control-icon-color: #1E293B;--information-box-background-color: #1F2937;--information-box-title-color: #F3F4F6;--information-cross-hover-color: rgb(255 255 255 / 75%);--information-box-text-color: #9CA3AF;--select-icon-background: rgb(255,255,255, .75);--icon-border-color: #334155}:host>#map{--icon-width: 36px;--icon-height: 36px;--side-distance: 10px;--icon-border-radius: 4px;--box-border-radius: 4px;--svg-icon-size: 26px;--icon-stroke-width: 2px} +`, Ov = `@keyframes fadeIn{0%{opacity:0;visibility:inherit}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0;visibility:hidden}}.fade-in{animation:fadeIn .3s forwards}.fade-out{animation:fadeOut .3s forwards}.disabled{visibility:hidden} +`; +class Fv { + static getOptions(t) { + const e = { + zoom: 15, + minZoom: 1, + maxZoom: 20, + displayZoom: !0, + displayScaleLine: !1, + fullscreen: !0, + defaultCenter: [2539057, 1181111], + enableGeolocation: !1, + enableCenterButton: !0, + enableDraw: !0, + maxNbDraw: 0, + drawElement: "Point", + onlyOneDraw: !1, + enableRotation: !0, + information: { + duration: 5e3, + title: "This is a title", + content: "This is a content" + }, + mode: { + type: "" + }, + cluster: { + distance: 40, + minDistance: 30 + }, + geojson: { + url: "" + }, + geolocationInformation: { + displayBox: !0, + reverseLocation: !1, + currentLocation: !1 + }, + notifications: [], + wfs: { + url: "" + }, + wmts: [{ + capability: "https://wmts.geo.admin.ch/EPSG/2056/1.0.0/WMTSCapabilities.xml", + layer: "ch.swisstopo.pixelkarte-grau", + projection: "EPSG:2056", + name: "", + thumbnail: "" + }], + inclusionArea: { + url: "", + filter: "" + }, + selectionTargetBoxMessage: "", + search: { + displaySearch: !0, + requestWithoutCustomValue: "https://api3.geo.admin.ch/rest/services/api/SearchServer?limit=5&&type=locations&sr=2056&lang=fr&origins=address%2Cparcel", + bboxRestiction: "2523099.818000,1167985.282000,2549752.141000,1192697.773000" + }, + borderUrl: "" + }; + t.zoom !== void 0 && (e.zoom = t.zoom), t.minZoom !== void 0 && (e.minZoom = t.minZoom), t.maxZoom !== void 0 && (e.maxZoom = t.maxZoom), t.displayZoom !== void 0 && (e.displayZoom = t.displayZoom), t.search !== void 0 && (e.search = t.search), t.displayScaleLine !== void 0 && (e.displayScaleLine = t.displayScaleLine), t.fullscreen !== void 0 && (e.fullscreen = t.fullscreen), t.defaultCenter !== void 0 && (e.defaultCenter = t.defaultCenter), t.enableGeolocation !== void 0 && (e.enableGeolocation = t.enableGeolocation), t.enableCenterButton !== void 0 && (e.enableCenterButton = t.enableCenterButton), t.enableDraw !== void 0 && (e.enableDraw = t.enableDraw), t.maxNbDraw !== void 0 && (e.maxNbDraw = t.maxNbDraw), t.drawElement !== void 0 && (e.drawElement = t.drawElement), t.onlyOneDraw !== void 0 && (e.onlyOneDraw = t.onlyOneDraw), t.enableRotation !== void 0 && (e.enableRotation = t.enableRotation), t.information !== void 0 && (e.information = t.information), t.notifications !== void 0 && t.notifications.length > 0 && (e.notifications = t.notifications), t.mode !== void 0 && (e.mode = t.mode), t.cluster !== void 0 && (e.cluster = t.cluster), t.geojson !== void 0 && (e.geojson = t.geojson), t.geolocationInformation !== void 0 && (e.geolocationInformation = t.geolocationInformation), t.wfs !== void 0 && (e.wfs = t.wfs), t.wmts !== void 0 && (e.wmts = t.wmts), t.inclusionArea !== void 0 && (e.inclusionArea = t.inclusionArea), t.selectionTargetBoxMessage !== void 0 && (e.selectionTargetBoxMessage = t.selectionTargetBoxMessage), t.borderUrl !== void 0 && (e.borderUrl = t.borderUrl), w().setOptions(e); + } +} +class Nv { + constructor() { + const t = $f.getSource(w().getOptions().inclusionArea.url, w().getOptions().inclusionArea.filter), e = new Ze({ + source: t, + style: new Zt({ + stroke: new Xt({ + color: "red", + width: 1 + }) + }) + }); + w().getMap().addLayer(e), window.addEventListener("current-center-position", (i) => { + var r; + const s = t.getClosestFeatureToCoordinate( + i.detail + ); + if (((r = s.getGeometry()) == null ? void 0 : r.getType()) === "Polygon") { + const o = s.getGeometry(); + ot.sendEvent("inclusion-area-included", o == null ? void 0 : o.intersectsCoordinate(i.detail)); + } + }); + } +} +const Uo = `svg{margin-left:calc((var(--icon-width) - var(--svg-icon-size)) / 2);margin-top:calc((var(--icon-height) - var(--svg-icon-size)) / 2);width:var(--svg-icon-size);height:var(--svg-icon-size)}svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round} +`; +var Dv = Object.defineProperty, kv = Object.getOwnPropertyDescriptor, Gv = (n, t, e, i) => { + for (var s = i > 1 ? void 0 : i ? kv(t, e) : t, r = n.length - 1, o; r >= 0; r--) + (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); + return i && s && Dv(t, e, s), s; +}; +let il = class extends kt { + constructor() { + super(); + } + render() { + return Lt`
+
+
+ ${Ue(at.geolocation)} +
+
+
+ `; + } +}; +il.styles = [Mt(Uo), Mt(Vo)]; +il = Gv([ + oe("geolocation-control-button") +], il); +class $v extends Gt { + constructor(t) { + const e = document.createElement("geolocation-control-button"); + super({ + element: e + }), e.addEventListener("click", this.centerMap.bind(this), !1), this.setTarget(t); + } + centerMap() { + const t = w().getGeolocation(); + if (t) { + const e = t.getPosition(), i = this.getMap(); + if (i) { + const s = i.getSize(), r = i.getView(); + e && s && r.centerOn(e, s, [570, 500]); + } + } + } +} +var Bv = Object.defineProperty, zv = Object.getOwnPropertyDescriptor, Zv = (n, t, e, i) => { + for (var s = i > 1 ? void 0 : i ? zv(t, e) : t, r = n.length - 1, o; r >= 0; r--) + (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); + return i && s && Bv(t, e, s), s; +}; +let nl = class extends kt { + render() { + return Lt`
${Ue(at.rotation)}
`; + } +}; +nl.styles = [Mt(Uo)]; +nl = Zv([ + oe("rotation-control-button") +], nl); +class hu extends Gt { + constructor(t) { + const e = document.createElement("div"), i = document.createElement("rotation-control-button"); + e.appendChild(i); + const s = document.createElement("div"); + s.className = "rotation-control ", s.appendChild(e), super({ + element: s + }), e.addEventListener("click", this.resetRotation.bind(this), !1), this.setTarget(t); + } + resetRotation() { + w().getMap().getView().setRotation(0); + } +} +const Vv = `@media only screen and (min-width: 420px){.custom-popup-element{right:calc(.5em + 40px)}}@media only screen and (max-width: 419px){.custom-popup-element{left:calc(50% - 172px)}}.custom-popup-element{font-family:sans-serif;position:absolute;top:10px;background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);border:1px solid var(--information-box-background-color);z-index:10;margin-left:5px;margin-right:5px;max-width:302px;width:100%}.custom-popup-element:after{content:"";width:var(--progress-width);height:4px;background:#008C6F;position:absolute;bottom:-1px;left:0;border-bottom-left-radius:4px;border-bottom-right-radius:var(--border-radius-right)}.custom-popup-title{display:flex}.custom-popup-title-text{width:90%;font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color)}.custom-popup-title-svg{width:10%;justify-content:flex-end;display:flex;fill:none;stroke:var(--information-box-title-color);stroke-width:2px;stroke-linejoin:round;stroke-linecap:round;cursor:pointer}.custom-popup-title-svg:hover{stroke:var(--information-cross-hover-color)}.custom-popup-content{font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color)} +`; +var Uv = Object.defineProperty, Wv = Object.getOwnPropertyDescriptor, fh = (n, t, e, i) => { + for (var s = i > 1 ? void 0 : i ? Wv(t, e) : t, r = n.length - 1, o; r >= 0; r--) + (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); + return i && s && Uv(t, e, s), s; +}; +let Ws = class extends kt { + constructor() { + super(), this._width = 100, this._borderRadiusRight = 0, window.addEventListener("clear-information-box-interval", this.clear.bind(this), !0), window.addEventListener("open-information-box", () => { + this._width = 100; + const n = w().getOptions().information.duration / 100; + this.interval = setInterval(() => { + this._width > 0 ? (this._width < 100 && (this._borderRadiusRight = 0), this._width--) : this.closeBox(); + }, n); + }); + } + render() { + return Lt` +
+
+
${w().getOptions().information.title}
+ + + + +
+
${w().getOptions().information.content}
+
+
`; + } + clear() { + clearInterval(this.interval); + } + closeBox() { + clearInterval(this.interval), ot.sendEvent("close-information-box", {}); + } +}; +Ws.styles = [Mt(Vv)]; +fh([ + ae() +], Ws.prototype, "_width", 2); +fh([ + ae() +], Ws.prototype, "_borderRadiusRight", 2); +Ws = fh([ + oe("information-box") +], Ws); +class Hv extends Gt { + constructor() { + const t = document.createElement("information-box"); + super({ element: t }), this.div = t; + } + show() { + this.div.classList.remove("fade-out"), this.div.classList.add("fade-in"); + } + hide() { + this.div.classList.remove("fade-in"), this.div.classList.add("fade-out"); + } +} +var Xv = Object.defineProperty, Yv = Object.getOwnPropertyDescriptor, jv = (n, t, e, i) => { + for (var s = i > 1 ? void 0 : i ? Yv(t, e) : t, r = n.length - 1, o; r >= 0; r--) + (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); + return i && s && Xv(t, e, s), s; +}; +let sl = class extends kt { + constructor() { + super(); + } + render() { + return Lt`
+
+
+ ${Ue(at.information)} +
+
+
+ `; + } +}; +sl.styles = [Mt(Uo), Mt(Vo)]; +sl = jv([ + oe("information-control-button") +], sl); +class qv extends Gt { + constructor(t) { + const e = document.createElement("information-control-button"); + super({ + element: e + }), this.informationIsOpen = !0, e.addEventListener("click", this.toogleInformationBox.bind(this), !1), window.addEventListener("close-information-box", this.closeInformationBox.bind(this), !1), this.control = new Hv(), w().getMap().addControl(this.control), this.openInformationBox(), this.setTarget(t); + } + closeInformationBox() { + ot.sendEvent("clear-information-box-interval", {}), this.control.hide(), this.informationIsOpen = !1; + } + openInformationBox() { + this.control.show(), ot.sendEvent("open-information-box", {}), this.informationIsOpen = !0; + } + toogleInformationBox() { + this.informationIsOpen ? this.closeInformationBox() : this.openInformationBox(); + } +} +/** + * @license + * Copyright 2018 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +const Kv = nh(class extends sh { + constructor(n) { + var t; + if (super(n), n.type !== Sf.ATTRIBUTE || n.name !== "class" || ((t = n.strings) === null || t === void 0 ? void 0 : t.length) > 2) + throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute."); + } + render(n) { + return " " + Object.keys(n).filter((t) => n[t]).join(" ") + " "; + } + update(n, [t]) { + var e, i; + if (this.nt === void 0) { + this.nt = /* @__PURE__ */ new Set(), n.strings !== void 0 && (this.st = new Set(n.strings.join(" ").split(/\s/).filter((r) => r !== ""))); + for (const r in t) + t[r] && !(!((e = this.st) === null || e === void 0) && e.has(r)) && this.nt.add(r); + return this.render(t); + } + const s = n.element.classList; + this.nt.forEach((r) => { + r in t || (s.remove(r), this.nt.delete(r)); + }); + for (const r in t) { + const o = !!t[r]; + o === this.nt.has(r) || ((i = this.st) === null || i === void 0 ? void 0 : i.has(r)) || (o ? (s.add(r), this.nt.add(r)) : (s.remove(r), this.nt.delete(r))); + } + return bi; + } +}), Uf = `.layer-container{left:calc(50% - 151px);position:absolute;max-width:302px;width:100%;top:var(--top-distance);z-index:0}.layer-title-container{border-radius:var(--icon-border-radius);border:1px solid var(--icon-border-color);display:flex;background-color:var(--information-box-background-color)}.layer-text{width:calc(100% - 13px);height:36px;padding:0 0 0 11px;font-size:14px;line-height:17px;font-weight:400;background-color:var(--information-box-background-color);color:var(--information-box-text-color);margin:0;align-items:center;display:flex}.layer-svg-container{width:29px;height:36px;margin-right:11px;display:flex;align-items:center}ul{margin-top:0;list-style-type:none;background-color:var(--information-box-background-color);padding-left:0;border-radius:var(--icon-border-radius)}li{height:64px;border-bottom:1px solid var(--icon-border-color);padding-left:11px;font-size:12px;display:flex;align-items:center;justify-content:start;color:var(--information-box-text-color)}li>.image-container{width:56px;display:flex;align-items:center;justify-content:center;height:inherit}li>.image-container>img{width:46px;height:46px;border-radius:var(--icon-border-radius);border:1px solid var(--icon-border-color)}.selected-layer{border:2px solid #DC2626!important;border-radius:var(--icon-border-radius)}ul>:last-child{border-bottom-right-radius:var(--icon-border-radius);border-bottom-left-radius:var(--icon-border-radius)}li:hover,li:focus{background-color:var(--icon-border-color)}svg{width:var(--svg-icon-size);height:var(--svg-icon-size);stroke:var(--information-box-title-color)}svg:hover{stroke:var(--information-cross-hover-color)}svg>g>.icon{fill:none;stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}.cross-div{width:var(--svg-icon-size);height:var(--svg-icon-size);cursor:pointer} +`; +var Jv = Object.defineProperty, Qv = Object.getOwnPropertyDescriptor, gh = (n, t, e, i) => { + for (var s = i > 1 ? void 0 : i ? Qv(t, e) : t, r = n.length - 1, o; r >= 0; r--) + (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); + return i && s && Jv(t, e, s), s; +}; +let vo = class extends kt { + constructor() { + super(...arguments), this._currentSelectedIndex = 0; + } + selectLayer(n, t) { + ot.sendEvent("layer-selected", n), this._currentSelectedIndex = t; + } + render() { + return Lt` +
    + ${w().getOptions().wmts.map( + (n, t) => Lt`
  • this.selectLayer(n, t)}> +
    + +
    +

    ${n.name}

    +
  • ` + )} +
+ `; + } +}; +vo.styles = [Mt(Uf)]; +gh([ + ae() +], vo.prototype, "_currentSelectedIndex", 2); +vo = gh([ + oe("layer-list") +], vo); +let rl = class extends kt { + render() { + return Lt`
+
+

Affichage de la carte

+
+
+ ${Ue(at.cross)} +
+
+
+ +
`; + } + closeBox() { + ot.sendEvent("layer-selection-closed", void 0); + } +}; +rl.styles = [Mt(Uf)]; +rl = gh([ + oe("layer-selection") +], rl); +class tx extends Gt { + constructor() { + const t = document.createElement("layer-selection"); + super({ element: t }); + } + disable() { + this.element.classList.add("disabled"); + } + show() { + this.element.classList.remove("fade-out"), this.element.classList.remove("disabled"), this.element.classList.add("fade-in"); + } + hide() { + this.element.classList.remove("fade-in"), this.element.classList.add("fade-out"); + } +} +var ex = Object.defineProperty, ix = Object.getOwnPropertyDescriptor, nx = (n, t, e, i) => { + for (var s = i > 1 ? void 0 : i ? ix(t, e) : t, r = n.length - 1, o; r >= 0; r--) + (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); + return i && s && ex(t, e, s), s; +}; +let ol = class extends kt { + render() { + return Lt`
+
+
+ ${Ue(at.stack)} +
+
+
`; + } +}; +ol.styles = [Mt(Uo), Mt(Vo)]; +ol = nx([ + oe("geo-layer-control-button") +], ol); +class sx extends Gt { + constructor(t) { + const e = document.createElement( + "geo-layer-control-button" + ); + super({ + element: e + }), this.isOpen = !1, this.layerSelection = new tx(), this.layerSelection.disable(), w().getMap().addControl(this.layerSelection), e.addEventListener("click", () => { + this.toogleSelection(); + }), window.addEventListener("layer-selection-closed", () => this.close()), this.setTarget(t); + } + toogleSelection() { + this.isOpen = !this.isOpen, this.isOpen ? this.layerSelection.show() : this.layerSelection.hide(); + } + close() { + this.isOpen = !1, this.layerSelection.hide(); + } +} +class cu extends Gt { + constructor(t) { + const e = document.createElement("div"); + e.className = t, super({ + element: e + }), this.div = e; + } +} +class rx { + static setupIcon() { + const t = w().getOptions(), e = w().getMap(), i = new cu("left-buttons-control-container"); + e.addControl(i); + const s = new cu("right-buttons-control-container"); + e.addControl(s), e.addControl(new qv(s.div)), t.fullscreen && e.addControl( + new q_({ + label: at.fullScreenLabel(), + labelActive: at.fullScreenLabelActive(), + className: "ol-full-screen", + target: s.div + }) + ), e.addControl(new sx(s.div)), t.displayZoom && e.addControl( + new Pd({ + zoomInLabel: at.zoomInLabel(), + zoomOutLabel: at.zoomOutLabel(), + className: "ol-zoom", + target: i.div + }) + ), t.enableCenterButton && e.addControl(new $v(i.div)), t.enableRotation && e.getView().on("change:rotation", (r) => { + e.getControls().forEach((o) => { + o instanceof hu && e.removeControl(o); + }), r.target.getRotation() !== 0 && e.addControl(new hu(i.div)); + }); + } +} +var ox = Object.defineProperty, ax = Object.getOwnPropertyDescriptor, lx = (n, t, e, i) => { + for (var s = i > 1 ? void 0 : i ? ax(t, e) : t, r = n.length - 1, o; r >= 0; r--) + (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); + return i && s && ox(t, e, s), s; +}; +class hx { + constructor() { + w().getMap().getView().on("change:center", (t) => { + ot.sendEvent("current-center-position", t.target.getCenter()); + }); + } +} +let uu = class extends kt { + constructor() { + super(); + } + render() { + return Lt` +
+ + + + + + + + + + + + + + + + + + + + + + + +
+ `; + } +}; +uu = lx([ + oe("target-element") +], uu); +class cx extends Gt { + constructor() { + const t = document.createElement("target-element"); + super({ element: t }), new hx(); + } +} +const ux = `.box-element{left:calc(50% - 172px);font-family:sans-serif}.box-element{position:absolute;top:10px;background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);border:1px solid var(--information-box-background-color);margin-left:5px;margin-right:5px;max-width:302px;width:100%}.box-element-title{display:flex}.box-element-title-text{width:90%;font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color)}.box-element-content{font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color)} +`; +var dx = Object.defineProperty, fx = Object.getOwnPropertyDescriptor, hr = (n, t, e, i) => { + for (var s = i > 1 ? void 0 : i ? fx(t, e) : t, r = n.length - 1, o; r >= 0; r--) + (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); + return i && s && dx(t, e, s), s; +}; +let an = class extends kt { + constructor() { + super(), this.defaultPosition = [0, 0], this._currentPosition = "", this._reversePosition = "", this._lastPosition = this.defaultPosition; + const n = 20; + window.addEventListener("current-center-position", (t) => { + w().getOptions().geolocationInformation.reverseLocation ? (Math.abs(this._lastPosition[0] - t.detail[0]) > n || Math.abs(this._lastPosition[1] - t.detail[1]) > n) && (this._lastPosition = t.detail, this.searchAddress(t.detail)) : this._reversePosition = "", this._currentPosition = w().getOptions().geolocationInformation.currentLocation ? `${t.detail[0].toFixed(6)}, ${t.detail[1].toFixed(6)}` : ""; + }); + } + connectedCallback() { + super.connectedCallback(); + } + searchAddress(n) { + Tf.getAddressFromCoordinate(n).then((t) => { + this._reversePosition = t.results.length > 0 ? `proche de ${t.results[0].attributes.strname_deinr}` : "Aucune adresse proche reconnue"; + }); + } + firstUpdated() { + w().getOptions().geolocationInformation.reverseLocation ? this.searchAddress(this.defaultPosition) : this._reversePosition = "", this._currentPosition = w().getOptions().geolocationInformation.currentLocation ? `${this.defaultPosition[0].toFixed(6)}, ${this.defaultPosition[1].toFixed(6)}` : ""; + } + render() { + return Lt` +
+
+
${w().getOptions().selectionTargetBoxMessage}
+
+
${this._reversePosition}
+
${this._currentPosition}
+
+ `; + } +}; +an.styles = [Mt(ux)]; +hr([ + cn() +], an.prototype, "defaultPosition", 2); +hr([ + ae() +], an.prototype, "_currentPosition", 2); +hr([ + ae() +], an.prototype, "_reversePosition", 2); +hr([ + ae() +], an.prototype, "_lastPosition", 2); +an = hr([ + oe("target-information-box-element") +], an); +class gx extends Gt { + constructor() { + const t = document.createElement("target-information-box-element"); + t.defaultPosition = w().getOptions().defaultCenter, super({ element: t }); + } +} +function mx(n) { + n("EPSG:4326", "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"), n("EPSG:4269", "+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"), n("EPSG:3857", "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"), n.WGS84 = n["EPSG:4326"], n["EPSG:3785"] = n["EPSG:3857"], n.GOOGLE = n["EPSG:3857"], n["EPSG:900913"] = n["EPSG:3857"], n["EPSG:102113"] = n["EPSG:3857"]; +} +var ln = 1, hn = 2, Hr = 3, _x = 4, al = 5, du = 6378137, px = 6356752314e-3, fu = 0.0066943799901413165, Is = 484813681109536e-20, S = Math.PI / 2, yx = 0.16666666666666666, vx = 0.04722222222222222, xx = 0.022156084656084655, I = 1e-10, zt = 0.017453292519943295, Ge = 57.29577951308232, ct = Math.PI / 4, Hs = Math.PI * 2, Tt = 3.14159265359, he = {}; +he.greenwich = 0; +he.lisbon = -9.131906111111; +he.paris = 2.337229166667; +he.bogota = -74.080916666667; +he.madrid = -3.687938888889; +he.rome = 12.452333333333; +he.bern = 7.439583333333; +he.jakarta = 106.807719444444; +he.ferro = -17.666666666667; +he.brussels = 4.367975; +he.stockholm = 18.058277777778; +he.athens = 23.7163375; +he.oslo = 10.722916666667; +const Cx = { + ft: { to_meter: 0.3048 }, + "us-ft": { to_meter: 1200 / 3937 } +}; +var gu = /[\s_\-\/\(\)]/g; +function Oi(n, t) { + if (n[t]) + return n[t]; + for (var e = Object.keys(n), i = t.toLowerCase().replace(gu, ""), s = -1, r, o; ++s < e.length; ) + if (r = e[s], o = r.toLowerCase().replace(gu, ""), o === i) + return n[r]; +} +function ll(n) { + var t = {}, e = n.split("+").map(function(a) { + return a.trim(); + }).filter(function(a) { + return a; + }).reduce(function(a, l) { + var h = l.split("="); + return h.push(!0), a[h[0].toLowerCase()] = h[1], a; + }, {}), i, s, r, o = { + proj: "projName", + datum: "datumCode", + rf: function(a) { + t.rf = parseFloat(a); + }, + lat_0: function(a) { + t.lat0 = a * zt; + }, + lat_1: function(a) { + t.lat1 = a * zt; + }, + lat_2: function(a) { + t.lat2 = a * zt; + }, + lat_ts: function(a) { + t.lat_ts = a * zt; + }, + lon_0: function(a) { + t.long0 = a * zt; + }, + lon_1: function(a) { + t.long1 = a * zt; + }, + lon_2: function(a) { + t.long2 = a * zt; + }, + alpha: function(a) { + t.alpha = parseFloat(a) * zt; + }, + gamma: function(a) { + t.rectified_grid_angle = parseFloat(a); + }, + lonc: function(a) { + t.longc = a * zt; + }, + x_0: function(a) { + t.x0 = parseFloat(a); + }, + y_0: function(a) { + t.y0 = parseFloat(a); + }, + k_0: function(a) { + t.k0 = parseFloat(a); + }, + k: function(a) { + t.k0 = parseFloat(a); + }, + a: function(a) { + t.a = parseFloat(a); + }, + b: function(a) { + t.b = parseFloat(a); + }, + r_a: function() { + t.R_A = !0; + }, + zone: function(a) { + t.zone = parseInt(a, 10); + }, + south: function() { + t.utmSouth = !0; + }, + towgs84: function(a) { + t.datum_params = a.split(",").map(function(l) { + return parseFloat(l); + }); + }, + to_meter: function(a) { + t.to_meter = parseFloat(a); + }, + units: function(a) { + t.units = a; + var l = Oi(Cx, a); + l && (t.to_meter = l.to_meter); + }, + from_greenwich: function(a) { + t.from_greenwich = a * zt; + }, + pm: function(a) { + var l = Oi(he, a); + t.from_greenwich = (l || parseFloat(a)) * zt; + }, + nadgrids: function(a) { + a === "@null" ? t.datumCode = "none" : t.nadgrids = a; + }, + axis: function(a) { + var l = "ewnsud"; + a.length === 3 && l.indexOf(a.substr(0, 1)) !== -1 && l.indexOf(a.substr(1, 1)) !== -1 && l.indexOf(a.substr(2, 1)) !== -1 && (t.axis = a); + }, + approx: function() { + t.approx = !0; + } + }; + for (i in e) + s = e[i], i in o ? (r = o[i], typeof r == "function" ? r(s) : t[r] = s) : t[i] = s; + return typeof t.datumCode == "string" && t.datumCode !== "WGS84" && (t.datumCode = t.datumCode.toLowerCase()), t; +} +var Xs = 1, Wf = 2, Hf = 3, xo = 4, Xf = 5, mh = -1, Mx = /\s/, Ex = /[A-Za-z]/, wx = /[A-Za-z84_]/, Wo = /[,\]]/, Yf = /[\d\.E\-\+]/; +function ci(n) { + if (typeof n != "string") + throw new Error("not a string"); + this.text = n.trim(), this.level = 0, this.place = 0, this.root = null, this.stack = [], this.currentObject = null, this.state = Xs; +} +ci.prototype.readCharicter = function() { + var n = this.text[this.place++]; + if (this.state !== xo) + for (; Mx.test(n); ) { + if (this.place >= this.text.length) + return; + n = this.text[this.place++]; + } + switch (this.state) { + case Xs: + return this.neutral(n); + case Wf: + return this.keyword(n); + case xo: + return this.quoted(n); + case Xf: + return this.afterquote(n); + case Hf: + return this.number(n); + case mh: + return; + } +}; +ci.prototype.afterquote = function(n) { + if (n === '"') { + this.word += '"', this.state = xo; + return; + } + if (Wo.test(n)) { + this.word = this.word.trim(), this.afterItem(n); + return; + } + throw new Error(`havn't handled "` + n + '" in afterquote yet, index ' + this.place); +}; +ci.prototype.afterItem = function(n) { + if (n === ",") { + this.word !== null && this.currentObject.push(this.word), this.word = null, this.state = Xs; + return; + } + if (n === "]") { + this.level--, this.word !== null && (this.currentObject.push(this.word), this.word = null), this.state = Xs, this.currentObject = this.stack.pop(), this.currentObject || (this.state = mh); + return; + } +}; +ci.prototype.number = function(n) { + if (Yf.test(n)) { + this.word += n; + return; + } + if (Wo.test(n)) { + this.word = parseFloat(this.word), this.afterItem(n); + return; + } + throw new Error(`havn't handled "` + n + '" in number yet, index ' + this.place); +}; +ci.prototype.quoted = function(n) { + if (n === '"') { + this.state = Xf; + return; + } + this.word += n; +}; +ci.prototype.keyword = function(n) { + if (wx.test(n)) { + this.word += n; + return; + } + if (n === "[") { + var t = []; + t.push(this.word), this.level++, this.root === null ? this.root = t : this.currentObject.push(t), this.stack.push(this.currentObject), this.currentObject = t, this.state = Xs; + return; + } + if (Wo.test(n)) { + this.afterItem(n); + return; + } + throw new Error(`havn't handled "` + n + '" in keyword yet, index ' + this.place); +}; +ci.prototype.neutral = function(n) { + if (Ex.test(n)) { + this.word = n, this.state = Wf; + return; + } + if (n === '"') { + this.word = "", this.state = xo; + return; + } + if (Yf.test(n)) { + this.word = n, this.state = Hf; + return; + } + if (Wo.test(n)) { + this.afterItem(n); + return; + } + throw new Error(`havn't handled "` + n + '" in neutral yet, index ' + this.place); +}; +ci.prototype.output = function() { + for (; this.place < this.text.length; ) + this.readCharicter(); + if (this.state === mh) + return this.root; + throw new Error('unable to parse string "' + this.text + '". State is ' + this.state); +}; +function Sx(n) { + var t = new ci(n); + return t.output(); +} +function mu(n, t, e) { + Array.isArray(t) && (e.unshift(t), t = null); + var i = t ? {} : n, s = e.reduce(function(r, o) { + return Nn(o, r), r; + }, i); + t && (n[t] = s); +} +function Nn(n, t) { + if (!Array.isArray(n)) { + t[n] = !0; + return; + } + var e = n.shift(); + if (e === "PARAMETER" && (e = n.shift()), n.length === 1) { + if (Array.isArray(n[0])) { + t[e] = {}, Nn(n[0], t[e]); + return; + } + t[e] = n[0]; + return; + } + if (!n.length) { + t[e] = !0; + return; + } + if (e === "TOWGS84") { + t[e] = n; + return; + } + if (e === "AXIS") { + e in t || (t[e] = []), t[e].push(n); + return; + } + Array.isArray(e) || (t[e] = {}); + var i; + switch (e) { + case "UNIT": + case "PRIMEM": + case "VERT_DATUM": + t[e] = { + name: n[0].toLowerCase(), + convert: n[1] + }, n.length === 3 && Nn(n[2], t[e]); + return; + case "SPHEROID": + case "ELLIPSOID": + t[e] = { + name: n[0], + a: n[1], + rf: n[2] + }, n.length === 4 && Nn(n[3], t[e]); + return; + case "PROJECTEDCRS": + case "PROJCRS": + case "GEOGCS": + case "GEOCCS": + case "PROJCS": + case "LOCAL_CS": + case "GEODCRS": + case "GEODETICCRS": + case "GEODETICDATUM": + case "EDATUM": + case "ENGINEERINGDATUM": + case "VERT_CS": + case "VERTCRS": + case "VERTICALCRS": + case "COMPD_CS": + case "COMPOUNDCRS": + case "ENGINEERINGCRS": + case "ENGCRS": + case "FITTED_CS": + case "LOCAL_DATUM": + case "DATUM": + n[0] = ["name", n[0]], mu(t, e, n); + return; + default: + for (i = -1; ++i < n.length; ) + if (!Array.isArray(n[i])) + return Nn(n, t[e]); + return mu(t, e, n); + } +} +var Rx = 0.017453292519943295; +function Tx(n, t) { + var e = t[0], i = t[1]; + !(e in n) && i in n && (n[e] = n[i], t.length === 3 && (n[e] = t[2](n[e]))); +} +function Qe(n) { + return n * Rx; +} +function bx(n) { + if (n.type === "GEOGCS" ? n.projName = "longlat" : n.type === "LOCAL_CS" ? (n.projName = "identity", n.local = !0) : typeof n.PROJECTION == "object" ? n.projName = Object.keys(n.PROJECTION)[0] : n.projName = n.PROJECTION, n.AXIS) { + for (var t = "", e = 0, i = n.AXIS.length; e < i; ++e) { + var s = [n.AXIS[e][0].toLowerCase(), n.AXIS[e][1].toLowerCase()]; + s[0].indexOf("north") !== -1 || (s[0] === "y" || s[0] === "lat") && s[1] === "north" ? t += "n" : s[0].indexOf("south") !== -1 || (s[0] === "y" || s[0] === "lat") && s[1] === "south" ? t += "s" : s[0].indexOf("east") !== -1 || (s[0] === "x" || s[0] === "lon") && s[1] === "east" ? t += "e" : (s[0].indexOf("west") !== -1 || (s[0] === "x" || s[0] === "lon") && s[1] === "west") && (t += "w"); + } + t.length === 2 && (t += "u"), t.length === 3 && (n.axis = t); + } + n.UNIT && (n.units = n.UNIT.name.toLowerCase(), n.units === "metre" && (n.units = "meter"), n.UNIT.convert && (n.type === "GEOGCS" ? n.DATUM && n.DATUM.SPHEROID && (n.to_meter = n.UNIT.convert * n.DATUM.SPHEROID.a) : n.to_meter = n.UNIT.convert)); + var r = n.GEOGCS; + n.type === "GEOGCS" && (r = n), r && (r.DATUM ? n.datumCode = r.DATUM.name.toLowerCase() : n.datumCode = r.name.toLowerCase(), n.datumCode.slice(0, 2) === "d_" && (n.datumCode = n.datumCode.slice(2)), (n.datumCode === "new_zealand_geodetic_datum_1949" || n.datumCode === "new_zealand_1949") && (n.datumCode = "nzgd49"), (n.datumCode === "wgs_1984" || n.datumCode === "world_geodetic_system_1984") && (n.PROJECTION === "Mercator_Auxiliary_Sphere" && (n.sphere = !0), n.datumCode = "wgs84"), n.datumCode.slice(-6) === "_ferro" && (n.datumCode = n.datumCode.slice(0, -6)), n.datumCode.slice(-8) === "_jakarta" && (n.datumCode = n.datumCode.slice(0, -8)), ~n.datumCode.indexOf("belge") && (n.datumCode = "rnb72"), r.DATUM && r.DATUM.SPHEROID && (n.ellps = r.DATUM.SPHEROID.name.replace("_19", "").replace(/[Cc]larke\_18/, "clrk"), n.ellps.toLowerCase().slice(0, 13) === "international" && (n.ellps = "intl"), n.a = r.DATUM.SPHEROID.a, n.rf = parseFloat(r.DATUM.SPHEROID.rf, 10)), r.DATUM && r.DATUM.TOWGS84 && (n.datum_params = r.DATUM.TOWGS84), ~n.datumCode.indexOf("osgb_1936") && (n.datumCode = "osgb36"), ~n.datumCode.indexOf("osni_1952") && (n.datumCode = "osni52"), (~n.datumCode.indexOf("tm65") || ~n.datumCode.indexOf("geodetic_datum_of_1965")) && (n.datumCode = "ire65"), n.datumCode === "ch1903+" && (n.datumCode = "ch1903"), ~n.datumCode.indexOf("israel") && (n.datumCode = "isr93")), n.b && !isFinite(n.b) && (n.b = n.a); + function o(h) { + var c = n.to_meter || 1; + return h * c; + } + var a = function(h) { + return Tx(n, h); + }, l = [ + ["standard_parallel_1", "Standard_Parallel_1"], + ["standard_parallel_1", "Latitude of 1st standard parallel"], + ["standard_parallel_2", "Standard_Parallel_2"], + ["standard_parallel_2", "Latitude of 2nd standard parallel"], + ["false_easting", "False_Easting"], + ["false_easting", "False easting"], + ["false-easting", "Easting at false origin"], + ["false_northing", "False_Northing"], + ["false_northing", "False northing"], + ["false_northing", "Northing at false origin"], + ["central_meridian", "Central_Meridian"], + ["central_meridian", "Longitude of natural origin"], + ["central_meridian", "Longitude of false origin"], + ["latitude_of_origin", "Latitude_Of_Origin"], + ["latitude_of_origin", "Central_Parallel"], + ["latitude_of_origin", "Latitude of natural origin"], + ["latitude_of_origin", "Latitude of false origin"], + ["scale_factor", "Scale_Factor"], + ["k0", "scale_factor"], + ["latitude_of_center", "Latitude_Of_Center"], + ["latitude_of_center", "Latitude_of_center"], + ["lat0", "latitude_of_center", Qe], + ["longitude_of_center", "Longitude_Of_Center"], + ["longitude_of_center", "Longitude_of_center"], + ["longc", "longitude_of_center", Qe], + ["x0", "false_easting", o], + ["y0", "false_northing", o], + ["long0", "central_meridian", Qe], + ["lat0", "latitude_of_origin", Qe], + ["lat0", "standard_parallel_1", Qe], + ["lat1", "standard_parallel_1", Qe], + ["lat2", "standard_parallel_2", Qe], + ["azimuth", "Azimuth"], + ["alpha", "azimuth", Qe], + ["srsCode", "name"] + ]; + l.forEach(a), !n.long0 && n.longc && (n.projName === "Albers_Conic_Equal_Area" || n.projName === "Lambert_Azimuthal_Equal_Area") && (n.long0 = n.longc), !n.lat_ts && n.lat1 && (n.projName === "Stereographic_South_Pole" || n.projName === "Polar Stereographic (variant B)") && (n.lat0 = Qe(n.lat1 > 0 ? 90 : -90), n.lat_ts = n.lat1); +} +function jf(n) { + var t = Sx(n), e = t.shift(), i = t.shift(); + t.unshift(["name", i]), t.unshift(["type", e]); + var s = {}; + return Nn(t, s), bx(s), s; +} +function qt(n) { + var t = this; + if (arguments.length === 2) { + var e = arguments[1]; + typeof e == "string" ? e.charAt(0) === "+" ? qt[n] = ll(arguments[1]) : qt[n] = jf(arguments[1]) : qt[n] = e; + } else if (arguments.length === 1) { + if (Array.isArray(n)) + return n.map(function(i) { + Array.isArray(i) ? qt.apply(t, i) : qt(i); + }); + if (typeof n == "string") { + if (n in qt) + return qt[n]; + } else + "EPSG" in n ? qt["EPSG:" + n.EPSG] = n : "ESRI" in n ? qt["ESRI:" + n.ESRI] = n : "IAU2000" in n ? qt["IAU2000:" + n.IAU2000] = n : console.log(n); + return; + } +} +mx(qt); +function Lx(n) { + return typeof n == "string"; +} +function Ix(n) { + return n in qt; +} +var Px = ["PROJECTEDCRS", "PROJCRS", "GEOGCS", "GEOCCS", "PROJCS", "LOCAL_CS", "GEODCRS", "GEODETICCRS", "GEODETICDATUM", "ENGCRS", "ENGINEERINGCRS"]; +function Ax(n) { + return Px.some(function(t) { + return n.indexOf(t) > -1; + }); +} +var Ox = ["3857", "900913", "3785", "102113"]; +function Fx(n) { + var t = Oi(n, "authority"); + if (!!t) { + var e = Oi(t, "epsg"); + return e && Ox.indexOf(e) > -1; + } +} +function Nx(n) { + var t = Oi(n, "extension"); + if (!!t) + return Oi(t, "proj4"); +} +function Dx(n) { + return n[0] === "+"; +} +function kx(n) { + if (Lx(n)) { + if (Ix(n)) + return qt[n]; + if (Ax(n)) { + var t = jf(n); + if (Fx(t)) + return qt["EPSG:3857"]; + var e = Nx(t); + return e ? ll(e) : t; + } + if (Dx(n)) + return ll(n); + } else + return n; +} +function _u(n, t) { + n = n || {}; + var e, i; + if (!t) + return n; + for (i in t) + e = t[i], e !== void 0 && (n[i] = e); + return n; +} +function We(n, t, e) { + var i = n * t; + return e / Math.sqrt(1 - i * i); +} +function cr(n) { + return n < 0 ? -1 : 1; +} +function A(n) { + return Math.abs(n) <= Tt ? n : n - cr(n) * Hs; +} +function Ae(n, t, e) { + var i = n * e, s = 0.5 * n; + return i = Math.pow((1 - i) / (1 + i), s), Math.tan(0.5 * (S - t)) / i; +} +function Ys(n, t) { + for (var e = 0.5 * n, i, s, r = S - 2 * Math.atan(t), o = 0; o <= 15; o++) + if (i = n * Math.sin(r), s = S - 2 * Math.atan(t * Math.pow((1 - i) / (1 + i), e)) - r, r += s, Math.abs(s) <= 1e-10) + return r; + return -9999; +} +function Gx() { + var n = this.b / this.a; + this.es = 1 - n * n, "x0" in this || (this.x0 = 0), "y0" in this || (this.y0 = 0), this.e = Math.sqrt(this.es), this.lat_ts ? this.sphere ? this.k0 = Math.cos(this.lat_ts) : this.k0 = We(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) : this.k0 || (this.k ? this.k0 = this.k : this.k0 = 1); +} +function $x(n) { + var t = n.x, e = n.y; + if (e * Ge > 90 && e * Ge < -90 && t * Ge > 180 && t * Ge < -180) + return null; + var i, s; + if (Math.abs(Math.abs(e) - S) <= I) + return null; + if (this.sphere) + i = this.x0 + this.a * this.k0 * A(t - this.long0), s = this.y0 + this.a * this.k0 * Math.log(Math.tan(ct + 0.5 * e)); + else { + var r = Math.sin(e), o = Ae(this.e, e, r); + i = this.x0 + this.a * this.k0 * A(t - this.long0), s = this.y0 - this.a * this.k0 * Math.log(o); + } + return n.x = i, n.y = s, n; +} +function Bx(n) { + var t = n.x - this.x0, e = n.y - this.y0, i, s; + if (this.sphere) + s = S - 2 * Math.atan(Math.exp(-e / (this.a * this.k0))); + else { + var r = Math.exp(-e / (this.a * this.k0)); + if (s = Ys(this.e, r), s === -9999) + return null; + } + return i = A(this.long0 + t / (this.a * this.k0)), n.x = i, n.y = s, n; +} +var zx = ["Mercator", "Popular Visualisation Pseudo Mercator", "Mercator_1SP", "Mercator_Auxiliary_Sphere", "merc"]; +const Zx = { + init: Gx, + forward: $x, + inverse: Bx, + names: zx +}; +function Vx() { +} +function pu(n) { + return n; +} +var Ux = ["longlat", "identity"]; +const Wx = { + init: Vx, + forward: pu, + inverse: pu, + names: Ux +}; +var Hx = [Zx, Wx], Xr = {}, Co = []; +function qf(n, t) { + var e = Co.length; + return n.names ? (Co[e] = n, n.names.forEach(function(i) { + Xr[i.toLowerCase()] = e; + }), this) : (console.log(t), !0); +} +function Xx(n) { + if (!n) + return !1; + var t = n.toLowerCase(); + if (typeof Xr[t] < "u" && Co[Xr[t]]) + return Co[Xr[t]]; +} +function Yx() { + Hx.forEach(qf); +} +const jx = { + start: Yx, + add: qf, + get: Xx +}; +var j = {}; +j.MERIT = { + a: 6378137, + rf: 298.257, + ellipseName: "MERIT 1983" +}; +j.SGS85 = { + a: 6378136, + rf: 298.257, + ellipseName: "Soviet Geodetic System 85" +}; +j.GRS80 = { + a: 6378137, + rf: 298.257222101, + ellipseName: "GRS 1980(IUGG, 1980)" +}; +j.IAU76 = { + a: 6378140, + rf: 298.257, + ellipseName: "IAU 1976" +}; +j.airy = { + a: 6377563396e-3, + b: 635625691e-2, + ellipseName: "Airy 1830" +}; +j.APL4 = { + a: 6378137, + rf: 298.25, + ellipseName: "Appl. Physics. 1965" +}; +j.NWL9D = { + a: 6378145, + rf: 298.25, + ellipseName: "Naval Weapons Lab., 1965" +}; +j.mod_airy = { + a: 6377340189e-3, + b: 6356034446e-3, + ellipseName: "Modified Airy" +}; +j.andrae = { + a: 637710443e-2, + rf: 300, + ellipseName: "Andrae 1876 (Den., Iclnd.)" +}; +j.aust_SA = { + a: 6378160, + rf: 298.25, + ellipseName: "Australian Natl & S. Amer. 1969" +}; +j.GRS67 = { + a: 6378160, + rf: 298.247167427, + ellipseName: "GRS 67(IUGG 1967)" +}; +j.bessel = { + a: 6377397155e-3, + rf: 299.1528128, + ellipseName: "Bessel 1841" +}; +j.bess_nam = { + a: 6377483865e-3, + rf: 299.1528128, + ellipseName: "Bessel 1841 (Namibia)" +}; +j.clrk66 = { + a: 63782064e-1, + b: 63565838e-1, + ellipseName: "Clarke 1866" +}; +j.clrk80 = { + a: 6378249145e-3, + rf: 293.4663, + ellipseName: "Clarke 1880 mod." +}; +j.clrk58 = { + a: 6378293645208759e-9, + rf: 294.2606763692654, + ellipseName: "Clarke 1858" +}; +j.CPM = { + a: 63757387e-1, + rf: 334.29, + ellipseName: "Comm. des Poids et Mesures 1799" +}; +j.delmbr = { + a: 6376428, + rf: 311.5, + ellipseName: "Delambre 1810 (Belgium)" +}; +j.engelis = { + a: 637813605e-2, + rf: 298.2566, + ellipseName: "Engelis 1985" +}; +j.evrst30 = { + a: 6377276345e-3, + rf: 300.8017, + ellipseName: "Everest 1830" +}; +j.evrst48 = { + a: 6377304063e-3, + rf: 300.8017, + ellipseName: "Everest 1948" +}; +j.evrst56 = { + a: 6377301243e-3, + rf: 300.8017, + ellipseName: "Everest 1956" +}; +j.evrst69 = { + a: 6377295664e-3, + rf: 300.8017, + ellipseName: "Everest 1969" +}; +j.evrstSS = { + a: 6377298556e-3, + rf: 300.8017, + ellipseName: "Everest (Sabah & Sarawak)" +}; +j.fschr60 = { + a: 6378166, + rf: 298.3, + ellipseName: "Fischer (Mercury Datum) 1960" +}; +j.fschr60m = { + a: 6378155, + rf: 298.3, + ellipseName: "Fischer 1960" +}; +j.fschr68 = { + a: 6378150, + rf: 298.3, + ellipseName: "Fischer 1968" +}; +j.helmert = { + a: 6378200, + rf: 298.3, + ellipseName: "Helmert 1906" +}; +j.hough = { + a: 6378270, + rf: 297, + ellipseName: "Hough" +}; +j.intl = { + a: 6378388, + rf: 297, + ellipseName: "International 1909 (Hayford)" +}; +j.kaula = { + a: 6378163, + rf: 298.24, + ellipseName: "Kaula 1961" +}; +j.lerch = { + a: 6378139, + rf: 298.257, + ellipseName: "Lerch 1979" +}; +j.mprts = { + a: 6397300, + rf: 191, + ellipseName: "Maupertius 1738" +}; +j.new_intl = { + a: 63781575e-1, + b: 63567722e-1, + ellipseName: "New International 1967" +}; +j.plessis = { + a: 6376523, + rf: 6355863, + ellipseName: "Plessis 1817 (France)" +}; +j.krass = { + a: 6378245, + rf: 298.3, + ellipseName: "Krassovsky, 1942" +}; +j.SEasia = { + a: 6378155, + b: 63567733205e-4, + ellipseName: "Southeast Asia" +}; +j.walbeck = { + a: 6376896, + b: 63558348467e-4, + ellipseName: "Walbeck" +}; +j.WGS60 = { + a: 6378165, + rf: 298.3, + ellipseName: "WGS 60" +}; +j.WGS66 = { + a: 6378145, + rf: 298.25, + ellipseName: "WGS 66" +}; +j.WGS7 = { + a: 6378135, + rf: 298.26, + ellipseName: "WGS 72" +}; +var qx = j.WGS84 = { + a: 6378137, + rf: 298.257223563, + ellipseName: "WGS 84" +}; +j.sphere = { + a: 6370997, + b: 6370997, + ellipseName: "Normal Sphere (r=6370997)" +}; +function Kx(n, t, e, i) { + var s = n * n, r = t * t, o = (s - r) / s, a = 0; + i ? (n *= 1 - o * (yx + o * (vx + o * xx)), s = n * n, o = 0) : a = Math.sqrt(o); + var l = (s - r) / r; + return { + es: o, + e: a, + ep2: l + }; +} +function Jx(n, t, e, i, s) { + if (!n) { + var r = Oi(j, i); + r || (r = qx), n = r.a, t = r.b, e = r.rf; + } + return e && !t && (t = (1 - 1 / e) * n), (e === 0 || Math.abs(n - t) < I) && (s = !0, t = n), { + a: n, + b: t, + rf: e, + sphere: s + }; +} +var $t = {}; +$t.wgs84 = { + towgs84: "0,0,0", + ellipse: "WGS84", + datumName: "WGS84" +}; +$t.ch1903 = { + towgs84: "674.374,15.056,405.346", + ellipse: "bessel", + datumName: "swiss" +}; +$t.ggrs87 = { + towgs84: "-199.87,74.79,246.62", + ellipse: "GRS80", + datumName: "Greek_Geodetic_Reference_System_1987" +}; +$t.nad83 = { + towgs84: "0,0,0", + ellipse: "GRS80", + datumName: "North_American_Datum_1983" +}; +$t.nad27 = { + nadgrids: "@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat", + ellipse: "clrk66", + datumName: "North_American_Datum_1927" +}; +$t.potsdam = { + towgs84: "598.1,73.7,418.2,0.202,0.045,-2.455,6.7", + ellipse: "bessel", + datumName: "Potsdam Rauenberg 1950 DHDN" +}; +$t.carthage = { + towgs84: "-263.0,6.0,431.0", + ellipse: "clark80", + datumName: "Carthage 1934 Tunisia" +}; +$t.hermannskogel = { + towgs84: "577.326,90.129,463.919,5.137,1.474,5.297,2.4232", + ellipse: "bessel", + datumName: "Hermannskogel" +}; +$t.osni52 = { + towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15", + ellipse: "airy", + datumName: "Irish National" +}; +$t.ire65 = { + towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15", + ellipse: "mod_airy", + datumName: "Ireland 1965" +}; +$t.rassadiran = { + towgs84: "-133.63,-157.5,-158.62", + ellipse: "intl", + datumName: "Rassadiran" +}; +$t.nzgd49 = { + towgs84: "59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993", + ellipse: "intl", + datumName: "New Zealand Geodetic Datum 1949" +}; +$t.osgb36 = { + towgs84: "446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894", + ellipse: "airy", + datumName: "Airy 1830" +}; +$t.s_jtsk = { + towgs84: "589,76,480", + ellipse: "bessel", + datumName: "S-JTSK (Ferro)" +}; +$t.beduaram = { + towgs84: "-106,-87,188", + ellipse: "clrk80", + datumName: "Beduaram" +}; +$t.gunung_segara = { + towgs84: "-403,684,41", + ellipse: "bessel", + datumName: "Gunung Segara Jakarta" +}; +$t.rnb72 = { + towgs84: "106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1", + ellipse: "intl", + datumName: "Reseau National Belge 1972" +}; +function Qx(n, t, e, i, s, r, o) { + var a = {}; + return n === void 0 || n === "none" ? a.datum_type = al : a.datum_type = _x, t && (a.datum_params = t.map(parseFloat), (a.datum_params[0] !== 0 || a.datum_params[1] !== 0 || a.datum_params[2] !== 0) && (a.datum_type = ln), a.datum_params.length > 3 && (a.datum_params[3] !== 0 || a.datum_params[4] !== 0 || a.datum_params[5] !== 0 || a.datum_params[6] !== 0) && (a.datum_type = hn, a.datum_params[3] *= Is, a.datum_params[4] *= Is, a.datum_params[5] *= Is, a.datum_params[6] = a.datum_params[6] / 1e6 + 1)), o && (a.datum_type = Hr, a.grids = o), a.a = e, a.b = i, a.es = s, a.ep2 = r, a; +} +var Kf = {}; +function t3(n, t) { + var e = new DataView(t), i = n3(e), s = s3(e, i); + s.nSubgrids > 1 && console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored"); + var r = r3(e, s, i), o = { header: s, subgrids: r }; + return Kf[n] = o, o; +} +function e3(n) { + if (n === void 0) + return null; + var t = n.split(","); + return t.map(i3); +} +function i3(n) { + if (n.length === 0) + return null; + var t = n[0] === "@"; + return t && (n = n.slice(1)), n === "null" ? { name: "null", mandatory: !t, grid: null, isNull: !0 } : { + name: n, + mandatory: !t, + grid: Kf[n] || null, + isNull: !1 + }; +} +function Dn(n) { + return n / 3600 * Math.PI / 180; +} +function n3(n) { + var t = n.getInt32(8, !1); + return t === 11 ? !1 : (t = n.getInt32(8, !0), t !== 11 && console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"), !0); +} +function s3(n, t) { + return { + nFields: n.getInt32(8, t), + nSubgridFields: n.getInt32(24, t), + nSubgrids: n.getInt32(40, t), + shiftType: hl(n, 56, 56 + 8).trim(), + fromSemiMajorAxis: n.getFloat64(120, t), + fromSemiMinorAxis: n.getFloat64(136, t), + toSemiMajorAxis: n.getFloat64(152, t), + toSemiMinorAxis: n.getFloat64(168, t) + }; +} +function hl(n, t, e) { + return String.fromCharCode.apply(null, new Uint8Array(n.buffer.slice(t, e))); +} +function r3(n, t, e) { + for (var i = 176, s = [], r = 0; r < t.nSubgrids; r++) { + var o = a3(n, i, e), a = l3(n, i, o, e), l = Math.round( + 1 + (o.upperLongitude - o.lowerLongitude) / o.longitudeInterval + ), h = Math.round( + 1 + (o.upperLatitude - o.lowerLatitude) / o.latitudeInterval + ); + s.push({ + ll: [Dn(o.lowerLongitude), Dn(o.lowerLatitude)], + del: [Dn(o.longitudeInterval), Dn(o.latitudeInterval)], + lim: [l, h], + count: o.gridNodeCount, + cvs: o3(a) + }); + } + return s; +} +function o3(n) { + return n.map(function(t) { + return [Dn(t.longitudeShift), Dn(t.latitudeShift)]; + }); +} +function a3(n, t, e) { + return { + name: hl(n, t + 8, t + 16).trim(), + parent: hl(n, t + 24, t + 24 + 8).trim(), + lowerLatitude: n.getFloat64(t + 72, e), + upperLatitude: n.getFloat64(t + 88, e), + lowerLongitude: n.getFloat64(t + 104, e), + upperLongitude: n.getFloat64(t + 120, e), + latitudeInterval: n.getFloat64(t + 136, e), + longitudeInterval: n.getFloat64(t + 152, e), + gridNodeCount: n.getInt32(t + 168, e) + }; +} +function l3(n, t, e, i) { + for (var s = t + 176, r = 16, o = [], a = 0; a < e.gridNodeCount; a++) { + var l = { + latitudeShift: n.getFloat32(s + a * r, i), + longitudeShift: n.getFloat32(s + a * r + 4, i), + latitudeAccuracy: n.getFloat32(s + a * r + 8, i), + longitudeAccuracy: n.getFloat32(s + a * r + 12, i) + }; + o.push(l); + } + return o; +} +function Be(n, t) { + if (!(this instanceof Be)) + return new Be(n); + t = t || function(h) { + if (h) + throw h; + }; + var e = kx(n); + if (typeof e != "object") { + t(n); + return; + } + var i = Be.projections.get(e.projName); + if (!i) { + t(n); + return; + } + if (e.datumCode && e.datumCode !== "none") { + var s = Oi($t, e.datumCode); + s && (e.datum_params = e.datum_params || (s.towgs84 ? s.towgs84.split(",") : null), e.ellps = s.ellipse, e.datumName = s.datumName ? s.datumName : e.datumCode); + } + e.k0 = e.k0 || 1, e.axis = e.axis || "enu", e.ellps = e.ellps || "wgs84", e.lat1 = e.lat1 || e.lat0; + var r = Jx(e.a, e.b, e.rf, e.ellps, e.sphere), o = Kx(r.a, r.b, r.rf, e.R_A), a = e3(e.nadgrids), l = e.datum || Qx( + e.datumCode, + e.datum_params, + r.a, + r.b, + o.es, + o.ep2, + a + ); + _u(this, e), _u(this, i), this.a = r.a, this.b = r.b, this.rf = r.rf, this.sphere = r.sphere, this.es = o.es, this.e = o.e, this.ep2 = o.ep2, this.datum = l, this.init(), t(null, this); +} +Be.projections = jx; +Be.projections.start(); +function h3(n, t) { + return n.datum_type !== t.datum_type || n.a !== t.a || Math.abs(n.es - t.es) > 5e-11 ? !1 : n.datum_type === ln ? n.datum_params[0] === t.datum_params[0] && n.datum_params[1] === t.datum_params[1] && n.datum_params[2] === t.datum_params[2] : n.datum_type === hn ? n.datum_params[0] === t.datum_params[0] && n.datum_params[1] === t.datum_params[1] && n.datum_params[2] === t.datum_params[2] && n.datum_params[3] === t.datum_params[3] && n.datum_params[4] === t.datum_params[4] && n.datum_params[5] === t.datum_params[5] && n.datum_params[6] === t.datum_params[6] : !0; +} +function Jf(n, t, e) { + var i = n.x, s = n.y, r = n.z ? n.z : 0, o, a, l, h; + if (s < -S && s > -1.001 * S) + s = -S; + else if (s > S && s < 1.001 * S) + s = S; + else { + if (s < -S) + return { x: -1 / 0, y: -1 / 0, z: n.z }; + if (s > S) + return { x: 1 / 0, y: 1 / 0, z: n.z }; + } + return i > Math.PI && (i -= 2 * Math.PI), a = Math.sin(s), h = Math.cos(s), l = a * a, o = e / Math.sqrt(1 - t * l), { + x: (o + r) * h * Math.cos(i), + y: (o + r) * h * Math.sin(i), + z: (o * (1 - t) + r) * a + }; +} +function Qf(n, t, e, i) { + var s = 1e-12, r = s * s, o = 30, a, l, h, c, u, d, f, g, m, _, y, p, v, x = n.x, C = n.y, E = n.z ? n.z : 0, R, b, F; + if (a = Math.sqrt(x * x + C * C), l = Math.sqrt(x * x + C * C + E * E), a / e < s) { + if (R = 0, l / e < s) + return b = S, F = -i, { + x: n.x, + y: n.y, + z: n.z + }; + } else + R = Math.atan2(C, x); + h = E / l, c = a / l, u = 1 / Math.sqrt(1 - t * (2 - t) * c * c), g = c * (1 - t) * u, m = h * u, v = 0; + do + v++, f = e / Math.sqrt(1 - t * m * m), F = a * g + E * m - f * (1 - t * m * m), d = t * f / (f + F), u = 1 / Math.sqrt(1 - d * (2 - d) * c * c), _ = c * (1 - d) * u, y = h * u, p = y * g - _ * m, g = _, m = y; + while (p * p > r && v < o); + return b = Math.atan(y / Math.abs(_)), { + x: R, + y: b, + z: F + }; +} +function c3(n, t, e) { + if (t === ln) + return { + x: n.x + e[0], + y: n.y + e[1], + z: n.z + e[2] + }; + if (t === hn) { + var i = e[0], s = e[1], r = e[2], o = e[3], a = e[4], l = e[5], h = e[6]; + return { + x: h * (n.x - l * n.y + a * n.z) + i, + y: h * (l * n.x + n.y - o * n.z) + s, + z: h * (-a * n.x + o * n.y + n.z) + r + }; + } +} +function u3(n, t, e) { + if (t === ln) + return { + x: n.x - e[0], + y: n.y - e[1], + z: n.z - e[2] + }; + if (t === hn) { + var i = e[0], s = e[1], r = e[2], o = e[3], a = e[4], l = e[5], h = e[6], c = (n.x - i) / h, u = (n.y - s) / h, d = (n.z - r) / h; + return { + x: c + l * u - a * d, + y: -l * c + u + o * d, + z: a * c - o * u + d + }; + } +} +function Vr(n) { + return n === ln || n === hn; +} +function d3(n, t, e) { + if (h3(n, t) || n.datum_type === al || t.datum_type === al) + return e; + var i = n.a, s = n.es; + if (n.datum_type === Hr) { + var r = yu(n, !1, e); + if (r !== 0) + return; + i = du, s = fu; + } + var o = t.a, a = t.b, l = t.es; + if (t.datum_type === Hr && (o = du, a = px, l = fu), s === l && i === o && !Vr(n.datum_type) && !Vr(t.datum_type)) + return e; + if (e = Jf(e, s, i), Vr(n.datum_type) && (e = c3(e, n.datum_type, n.datum_params)), Vr(t.datum_type) && (e = u3(e, t.datum_type, t.datum_params)), e = Qf(e, l, o, a), t.datum_type === Hr) { + var h = yu(t, !0, e); + if (h !== 0) + return; + } + return e; +} +function yu(n, t, e) { + if (n.grids === null || n.grids.length === 0) + return console.log("Grid shift grids not found"), -1; + for (var i = { x: -e.x, y: e.y }, s = { x: Number.NaN, y: Number.NaN }, r = [], o = 0; o < n.grids.length; o++) { + var a = n.grids[o]; + if (r.push(a.name), a.isNull) { + s = i; + break; + } + if (a.mandatory, a.grid === null) { + if (a.mandatory) + return console.log("Unable to find mandatory grid '" + a.name + "'"), -1; + continue; + } + var l = a.grid.subgrids[0], h = (Math.abs(l.del[1]) + Math.abs(l.del[0])) / 1e4, c = l.ll[0] - h, u = l.ll[1] - h, d = l.ll[0] + (l.lim[0] - 1) * l.del[0] + h, f = l.ll[1] + (l.lim[1] - 1) * l.del[1] + h; + if (!(u > i.y || c > i.x || f < i.y || d < i.x) && (s = f3(i, t, l), !isNaN(s.x))) + break; + } + return isNaN(s.x) ? (console.log("Failed to find a grid shift table for location '" + -i.x * Ge + " " + i.y * Ge + " tried: '" + r + "'"), -1) : (e.x = -s.x, e.y = s.y, 0); +} +function f3(n, t, e) { + var i = { x: Number.NaN, y: Number.NaN }; + if (isNaN(n.x)) + return i; + var s = { x: n.x, y: n.y }; + s.x -= e.ll[0], s.y -= e.ll[1], s.x = A(s.x - Math.PI) + Math.PI; + var r = vu(s, e); + if (t) { + if (isNaN(r.x)) + return i; + r.x = s.x - r.x, r.y = s.y - r.y; + var o = 9, a = 1e-12, l, h; + do { + if (h = vu(r, e), isNaN(h.x)) { + console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation."); + break; + } + l = { x: s.x - (h.x + r.x), y: s.y - (h.y + r.y) }, r.x += l.x, r.y += l.y; + } while (o-- && Math.abs(l.x) > a && Math.abs(l.y) > a); + if (o < 0) + return console.log("Inverse grid shift iterator failed to converge."), i; + i.x = A(r.x + e.ll[0]), i.y = r.y + e.ll[1]; + } else + isNaN(r.x) || (i.x = n.x + r.x, i.y = n.y + r.y); + return i; +} +function vu(n, t) { + var e = { x: n.x / t.del[0], y: n.y / t.del[1] }, i = { x: Math.floor(e.x), y: Math.floor(e.y) }, s = { x: e.x - 1 * i.x, y: e.y - 1 * i.y }, r = { x: Number.NaN, y: Number.NaN }, o; + if (i.x < 0 || i.x >= t.lim[0] || i.y < 0 || i.y >= t.lim[1]) + return r; + o = i.y * t.lim[0] + i.x; + var a = { x: t.cvs[o][0], y: t.cvs[o][1] }; + o++; + var l = { x: t.cvs[o][0], y: t.cvs[o][1] }; + o += t.lim[0]; + var h = { x: t.cvs[o][0], y: t.cvs[o][1] }; + o--; + var c = { x: t.cvs[o][0], y: t.cvs[o][1] }, u = s.x * s.y, d = s.x * (1 - s.y), f = (1 - s.x) * (1 - s.y), g = (1 - s.x) * s.y; + return r.x = f * a.x + d * l.x + g * c.x + u * h.x, r.y = f * a.y + d * l.y + g * c.y + u * h.y, r; +} +function xu(n, t, e) { + var i = e.x, s = e.y, r = e.z || 0, o, a, l, h = {}; + for (l = 0; l < 3; l++) + if (!(t && l === 2 && e.z === void 0)) + switch (l === 0 ? (o = i, "ew".indexOf(n.axis[l]) !== -1 ? a = "x" : a = "y") : l === 1 ? (o = s, "ns".indexOf(n.axis[l]) !== -1 ? a = "y" : a = "x") : (o = r, a = "z"), n.axis[l]) { + case "e": + h[a] = o; + break; + case "w": + h[a] = -o; + break; + case "n": + h[a] = o; + break; + case "s": + h[a] = -o; + break; + case "u": + e[a] !== void 0 && (h.z = o); + break; + case "d": + e[a] !== void 0 && (h.z = -o); + break; + default: + return null; + } + return h; +} +function tg(n) { + var t = { + x: n[0], + y: n[1] + }; + return n.length > 2 && (t.z = n[2]), n.length > 3 && (t.m = n[3]), t; +} +function g3(n) { + Cu(n.x), Cu(n.y); +} +function Cu(n) { + if (typeof Number.isFinite == "function") { + if (Number.isFinite(n)) + return; + throw new TypeError("coordinates must be finite numbers"); + } + if (typeof n != "number" || n !== n || !isFinite(n)) + throw new TypeError("coordinates must be finite numbers"); +} +function m3(n, t) { + return (n.datum.datum_type === ln || n.datum.datum_type === hn) && t.datumCode !== "WGS84" || (t.datum.datum_type === ln || t.datum.datum_type === hn) && n.datumCode !== "WGS84"; +} +function Mo(n, t, e, i) { + var s; + if (Array.isArray(e) && (e = tg(e)), g3(e), n.datum && t.datum && m3(n, t) && (s = new Be("WGS84"), e = Mo(n, s, e, i), n = s), i && n.axis !== "enu" && (e = xu(n, !1, e)), n.projName === "longlat") + e = { + x: e.x * zt, + y: e.y * zt, + z: e.z || 0 + }; + else if (n.to_meter && (e = { + x: e.x * n.to_meter, + y: e.y * n.to_meter, + z: e.z || 0 + }), e = n.inverse(e), !e) + return; + if (n.from_greenwich && (e.x += n.from_greenwich), e = d3(n.datum, t.datum, e), !!e) + return t.from_greenwich && (e = { + x: e.x - t.from_greenwich, + y: e.y, + z: e.z || 0 + }), t.projName === "longlat" ? e = { + x: e.x * Ge, + y: e.y * Ge, + z: e.z || 0 + } : (e = t.forward(e), t.to_meter && (e = { + x: e.x / t.to_meter, + y: e.y / t.to_meter, + z: e.z || 0 + })), i && t.axis !== "enu" ? xu(t, !0, e) : e; +} +var Mu = Be("WGS84"); +function Sa(n, t, e, i) { + var s, r, o; + return Array.isArray(e) ? (s = Mo(n, t, e, i) || { x: NaN, y: NaN }, e.length > 2 ? typeof n.name < "u" && n.name === "geocent" || typeof t.name < "u" && t.name === "geocent" ? typeof s.z == "number" ? [s.x, s.y, s.z].concat(e.splice(3)) : [s.x, s.y, e[2]].concat(e.splice(3)) : [s.x, s.y].concat(e.splice(2)) : [s.x, s.y]) : (r = Mo(n, t, e, i), o = Object.keys(e), o.length === 2 || o.forEach(function(a) { + if (typeof n.name < "u" && n.name === "geocent" || typeof t.name < "u" && t.name === "geocent") { + if (a === "x" || a === "y" || a === "z") + return; + } else if (a === "x" || a === "y") + return; + r[a] = e[a]; + }), r); +} +function Eu(n) { + return n instanceof Be ? n : n.oProj ? n.oProj : Be(n); +} +function re(n, t, e) { + n = Eu(n); + var i = !1, s; + return typeof t > "u" ? (t = n, n = Mu, i = !0) : (typeof t.x < "u" || Array.isArray(t)) && (e = t, t = n, n = Mu, i = !0), t = Eu(t), e ? Sa(n, t, e) : (s = { + forward: function(r, o) { + return Sa(n, t, r, o); + }, + inverse: function(r, o) { + return Sa(t, n, r, o); + } + }, i && (s.oProj = t), s); +} +var wu = 6, eg = "AJSAJS", ig = "AFAFAF", kn = 65, ie = 73, Me = 79, Cs = 86, Ms = 90; +const _3 = { + forward: ng, + inverse: p3, + toPoint: sg +}; +function ng(n, t) { + return t = t || 5, x3(y3({ + lat: n[1], + lon: n[0] + }), t); +} +function p3(n) { + var t = _h(og(n.toUpperCase())); + return t.lat && t.lon ? [t.lon, t.lat, t.lon, t.lat] : [t.left, t.bottom, t.right, t.top]; +} +function sg(n) { + var t = _h(og(n.toUpperCase())); + return t.lat && t.lon ? [t.lon, t.lat] : [(t.left + t.right) / 2, (t.top + t.bottom) / 2]; +} +function Ra(n) { + return n * (Math.PI / 180); +} +function Su(n) { + return 180 * (n / Math.PI); +} +function y3(n) { + var t = n.lat, e = n.lon, i = 6378137, s = 669438e-8, r = 0.9996, o, a, l, h, c, u, d, f = Ra(t), g = Ra(e), m, _; + _ = Math.floor((e + 180) / 6) + 1, e === 180 && (_ = 60), t >= 56 && t < 64 && e >= 3 && e < 12 && (_ = 32), t >= 72 && t < 84 && (e >= 0 && e < 9 ? _ = 31 : e >= 9 && e < 21 ? _ = 33 : e >= 21 && e < 33 ? _ = 35 : e >= 33 && e < 42 && (_ = 37)), o = (_ - 1) * 6 - 180 + 3, m = Ra(o), a = s / (1 - s), l = i / Math.sqrt(1 - s * Math.sin(f) * Math.sin(f)), h = Math.tan(f) * Math.tan(f), c = a * Math.cos(f) * Math.cos(f), u = Math.cos(f) * (g - m), d = i * ((1 - s / 4 - 3 * s * s / 64 - 5 * s * s * s / 256) * f - (3 * s / 8 + 3 * s * s / 32 + 45 * s * s * s / 1024) * Math.sin(2 * f) + (15 * s * s / 256 + 45 * s * s * s / 1024) * Math.sin(4 * f) - 35 * s * s * s / 3072 * Math.sin(6 * f)); + var y = r * l * (u + (1 - h + c) * u * u * u / 6 + (5 - 18 * h + h * h + 72 * c - 58 * a) * u * u * u * u * u / 120) + 5e5, p = r * (d + l * Math.tan(f) * (u * u / 2 + (5 - h + 9 * c + 4 * c * c) * u * u * u * u / 24 + (61 - 58 * h + h * h + 600 * c - 330 * a) * u * u * u * u * u * u / 720)); + return t < 0 && (p += 1e7), { + northing: Math.round(p), + easting: Math.round(y), + zoneNumber: _, + zoneLetter: v3(t) + }; +} +function _h(n) { + var t = n.northing, e = n.easting, i = n.zoneLetter, s = n.zoneNumber; + if (s < 0 || s > 60) + return null; + var r = 0.9996, o = 6378137, a = 669438e-8, l, h = (1 - Math.sqrt(1 - a)) / (1 + Math.sqrt(1 - a)), c, u, d, f, g, m, _, y, p, v = e - 5e5, x = t; + i < "N" && (x -= 1e7), _ = (s - 1) * 6 - 180 + 3, l = a / (1 - a), m = x / r, y = m / (o * (1 - a / 4 - 3 * a * a / 64 - 5 * a * a * a / 256)), p = y + (3 * h / 2 - 27 * h * h * h / 32) * Math.sin(2 * y) + (21 * h * h / 16 - 55 * h * h * h * h / 32) * Math.sin(4 * y) + 151 * h * h * h / 96 * Math.sin(6 * y), c = o / Math.sqrt(1 - a * Math.sin(p) * Math.sin(p)), u = Math.tan(p) * Math.tan(p), d = l * Math.cos(p) * Math.cos(p), f = o * (1 - a) / Math.pow(1 - a * Math.sin(p) * Math.sin(p), 1.5), g = v / (c * r); + var C = p - c * Math.tan(p) / f * (g * g / 2 - (5 + 3 * u + 10 * d - 4 * d * d - 9 * l) * g * g * g * g / 24 + (61 + 90 * u + 298 * d + 45 * u * u - 252 * l - 3 * d * d) * g * g * g * g * g * g / 720); + C = Su(C); + var E = (g - (1 + 2 * u + d) * g * g * g / 6 + (5 - 2 * d + 28 * u - 3 * d * d + 8 * l + 24 * u * u) * g * g * g * g * g / 120) / Math.cos(p); + E = _ + Su(E); + var R; + if (n.accuracy) { + var b = _h({ + northing: n.northing + n.accuracy, + easting: n.easting + n.accuracy, + zoneLetter: n.zoneLetter, + zoneNumber: n.zoneNumber + }); + R = { + top: b.lat, + right: b.lon, + bottom: C, + left: E + }; + } else + R = { + lat: C, + lon: E + }; + return R; +} +function v3(n) { + var t = "Z"; + return 84 >= n && n >= 72 ? t = "X" : 72 > n && n >= 64 ? t = "W" : 64 > n && n >= 56 ? t = "V" : 56 > n && n >= 48 ? t = "U" : 48 > n && n >= 40 ? t = "T" : 40 > n && n >= 32 ? t = "S" : 32 > n && n >= 24 ? t = "R" : 24 > n && n >= 16 ? t = "Q" : 16 > n && n >= 8 ? t = "P" : 8 > n && n >= 0 ? t = "N" : 0 > n && n >= -8 ? t = "M" : -8 > n && n >= -16 ? t = "L" : -16 > n && n >= -24 ? t = "K" : -24 > n && n >= -32 ? t = "J" : -32 > n && n >= -40 ? t = "H" : -40 > n && n >= -48 ? t = "G" : -48 > n && n >= -56 ? t = "F" : -56 > n && n >= -64 ? t = "E" : -64 > n && n >= -72 ? t = "D" : -72 > n && n >= -80 && (t = "C"), t; +} +function x3(n, t) { + var e = "00000" + n.easting, i = "00000" + n.northing; + return n.zoneNumber + n.zoneLetter + C3(n.easting, n.northing, n.zoneNumber) + e.substr(e.length - 5, t) + i.substr(i.length - 5, t); +} +function C3(n, t, e) { + var i = rg(e), s = Math.floor(n / 1e5), r = Math.floor(t / 1e5) % 20; + return M3(s, r, i); +} +function rg(n) { + var t = n % wu; + return t === 0 && (t = wu), t; +} +function M3(n, t, e) { + var i = e - 1, s = eg.charCodeAt(i), r = ig.charCodeAt(i), o = s + n - 1, a = r + t, l = !1; + o > Ms && (o = o - Ms + kn - 1, l = !0), (o === ie || s < ie && o > ie || (o > ie || s < ie) && l) && o++, (o === Me || s < Me && o > Me || (o > Me || s < Me) && l) && (o++, o === ie && o++), o > Ms && (o = o - Ms + kn - 1), a > Cs ? (a = a - Cs + kn - 1, l = !0) : l = !1, (a === ie || r < ie && a > ie || (a > ie || r < ie) && l) && a++, (a === Me || r < Me && a > Me || (a > Me || r < Me) && l) && (a++, a === ie && a++), a > Cs && (a = a - Cs + kn - 1); + var h = String.fromCharCode(o) + String.fromCharCode(a); + return h; +} +function og(n) { + if (n && n.length === 0) + throw "MGRSPoint coverting from nothing"; + for (var t = n.length, e = null, i = "", s, r = 0; !/[A-Z]/.test(s = n.charAt(r)); ) { + if (r >= 2) + throw "MGRSPoint bad conversion from: " + n; + i += s, r++; + } + var o = parseInt(i, 10); + if (r === 0 || r + 3 > t) + throw "MGRSPoint bad conversion from: " + n; + var a = n.charAt(r++); + if (a <= "A" || a === "B" || a === "Y" || a >= "Z" || a === "I" || a === "O") + throw "MGRSPoint zone letter " + a + " not handled: " + n; + e = n.substring(r, r += 2); + for (var l = rg(o), h = E3(e.charAt(0), l), c = w3(e.charAt(1), l); c < S3(a); ) + c += 2e6; + var u = t - r; + if (u % 2 !== 0) + throw `MGRSPoint has to have an even number +of digits after the zone letter and two 100km letters - front +half for easting meters, second half for +northing meters` + n; + var d = u / 2, f = 0, g = 0, m, _, y, p, v; + return d > 0 && (m = 1e5 / Math.pow(10, d), _ = n.substring(r, r + d), f = parseFloat(_) * m, y = n.substring(r + d), g = parseFloat(y) * m), p = f + h, v = g + c, { + easting: p, + northing: v, + zoneLetter: a, + zoneNumber: o, + accuracy: m + }; +} +function E3(n, t) { + for (var e = eg.charCodeAt(t - 1), i = 1e5, s = !1; e !== n.charCodeAt(0); ) { + if (e++, e === ie && e++, e === Me && e++, e > Ms) { + if (s) + throw "Bad character: " + n; + e = kn, s = !0; + } + i += 1e5; + } + return i; +} +function w3(n, t) { + if (n > "V") + throw "MGRSPoint given invalid Northing " + n; + for (var e = ig.charCodeAt(t - 1), i = 0, s = !1; e !== n.charCodeAt(0); ) { + if (e++, e === ie && e++, e === Me && e++, e > Cs) { + if (s) + throw "Bad character: " + n; + e = kn, s = !0; + } + i += 1e5; + } + return i; +} +function S3(n) { + var t; + switch (n) { + case "C": + t = 11e5; + break; + case "D": + t = 2e6; + break; + case "E": + t = 28e5; + break; + case "F": + t = 37e5; + break; + case "G": + t = 46e5; + break; + case "H": + t = 55e5; + break; + case "J": + t = 64e5; + break; + case "K": + t = 73e5; + break; + case "L": + t = 82e5; + break; + case "M": + t = 91e5; + break; + case "N": + t = 0; + break; + case "P": + t = 8e5; + break; + case "Q": + t = 17e5; + break; + case "R": + t = 26e5; + break; + case "S": + t = 35e5; + break; + case "T": + t = 44e5; + break; + case "U": + t = 53e5; + break; + case "V": + t = 62e5; + break; + case "W": + t = 7e6; + break; + case "X": + t = 79e5; + break; + default: + t = -1; + } + if (t >= 0) + return t; + throw "Invalid zone letter: " + n; +} +function Qn(n, t, e) { + if (!(this instanceof Qn)) + return new Qn(n, t, e); + if (Array.isArray(n)) + this.x = n[0], this.y = n[1], this.z = n[2] || 0; + else if (typeof n == "object") + this.x = n.x, this.y = n.y, this.z = n.z || 0; + else if (typeof n == "string" && typeof t > "u") { + var i = n.split(","); + this.x = parseFloat(i[0], 10), this.y = parseFloat(i[1], 10), this.z = parseFloat(i[2], 10) || 0; + } else + this.x = n, this.y = t, this.z = e || 0; + console.warn("proj4.Point will be removed in version 3, use proj4.toPoint"); +} +Qn.fromMGRS = function(n) { + return new Qn(sg(n)); +}; +Qn.prototype.toMGRS = function(n) { + return ng([this.x, this.y], n); +}; +var R3 = 1, T3 = 0.25, Ru = 0.046875, Tu = 0.01953125, bu = 0.01068115234375, b3 = 0.75, L3 = 0.46875, I3 = 0.013020833333333334, P3 = 0.007120768229166667, A3 = 0.3645833333333333, O3 = 0.005696614583333333, F3 = 0.3076171875; +function ag(n) { + var t = []; + t[0] = R3 - n * (T3 + n * (Ru + n * (Tu + n * bu))), t[1] = n * (b3 - n * (Ru + n * (Tu + n * bu))); + var e = n * n; + return t[2] = e * (L3 - n * (I3 + n * P3)), e *= n, t[3] = e * (A3 - n * O3), t[4] = e * n * F3, t; +} +function Ho(n, t, e, i) { + return e *= t, t *= t, i[0] * n - e * (i[1] + t * (i[2] + t * (i[3] + t * i[4]))); +} +var N3 = 20; +function lg(n, t, e) { + for (var i = 1 / (1 - t), s = n, r = N3; r; --r) { + var o = Math.sin(s), a = 1 - t * o * o; + if (a = (Ho(s, o, Math.cos(s), e) - n) * (a * Math.sqrt(a)) * i, s -= a, Math.abs(a) < I) + return s; + } + return s; +} +function D3() { + this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.es && (this.en = ag(this.es), this.ml0 = Ho(this.lat0, Math.sin(this.lat0), Math.cos(this.lat0), this.en)); +} +function k3(n) { + var t = n.x, e = n.y, i = A(t - this.long0), s, r, o, a = Math.sin(e), l = Math.cos(e); + if (this.es) { + var c = l * i, u = Math.pow(c, 2), d = this.ep2 * Math.pow(l, 2), f = Math.pow(d, 2), g = Math.abs(l) > I ? Math.tan(e) : 0, m = Math.pow(g, 2), _ = Math.pow(m, 2); + s = 1 - this.es * Math.pow(a, 2), c = c / Math.sqrt(s); + var y = Ho(e, a, l, this.en); + r = this.a * (this.k0 * c * (1 + u / 6 * (1 - m + d + u / 20 * (5 - 18 * m + _ + 14 * d - 58 * m * d + u / 42 * (61 + 179 * _ - _ * m - 479 * m))))) + this.x0, o = this.a * (this.k0 * (y - this.ml0 + a * i * c / 2 * (1 + u / 12 * (5 - m + 9 * d + 4 * f + u / 30 * (61 + _ - 58 * m + 270 * d - 330 * m * d + u / 56 * (1385 + 543 * _ - _ * m - 3111 * m)))))) + this.y0; + } else { + var h = l * Math.sin(i); + if (Math.abs(Math.abs(h) - 1) < I) + return 93; + if (r = 0.5 * this.a * this.k0 * Math.log((1 + h) / (1 - h)) + this.x0, o = l * Math.cos(i) / Math.sqrt(1 - Math.pow(h, 2)), h = Math.abs(o), h >= 1) { + if (h - 1 > I) + return 93; + o = 0; + } else + o = Math.acos(o); + e < 0 && (o = -o), o = this.a * this.k0 * (o - this.lat0) + this.y0; + } + return n.x = r, n.y = o, n; +} +function G3(n) { + var t, e, i, s, r = (n.x - this.x0) * (1 / this.a), o = (n.y - this.y0) * (1 / this.a); + if (this.es) + if (t = this.ml0 + o / this.k0, e = lg(t, this.es, this.en), Math.abs(e) < S) { + var u = Math.sin(e), d = Math.cos(e), f = Math.abs(d) > I ? Math.tan(e) : 0, g = this.ep2 * Math.pow(d, 2), m = Math.pow(g, 2), _ = Math.pow(f, 2), y = Math.pow(_, 2); + t = 1 - this.es * Math.pow(u, 2); + var p = r * Math.sqrt(t) / this.k0, v = Math.pow(p, 2); + t = t * f, i = e - t * v / (1 - this.es) * 0.5 * (1 - v / 12 * (5 + 3 * _ - 9 * g * _ + g - 4 * m - v / 30 * (61 + 90 * _ - 252 * g * _ + 45 * y + 46 * g - v / 56 * (1385 + 3633 * _ + 4095 * y + 1574 * y * _)))), s = A(this.long0 + p * (1 - v / 6 * (1 + 2 * _ + g - v / 20 * (5 + 28 * _ + 24 * y + 8 * g * _ + 6 * g - v / 42 * (61 + 662 * _ + 1320 * y + 720 * y * _)))) / d); + } else + i = S * cr(o), s = 0; + else { + var a = Math.exp(r / this.k0), l = 0.5 * (a - 1 / a), h = this.lat0 + o / this.k0, c = Math.cos(h); + t = Math.sqrt((1 - Math.pow(c, 2)) / (1 + Math.pow(l, 2))), i = Math.asin(t), o < 0 && (i = -i), l === 0 && c === 0 ? s = 0 : s = A(Math.atan2(l, c) + this.long0); + } + return n.x = s, n.y = i, n; +} +var $3 = ["Fast_Transverse_Mercator", "Fast Transverse Mercator"]; +const Yr = { + init: D3, + forward: k3, + inverse: G3, + names: $3 +}; +function hg(n) { + var t = Math.exp(n); + return t = (t - 1 / t) / 2, t; +} +function Pe(n, t) { + n = Math.abs(n), t = Math.abs(t); + var e = Math.max(n, t), i = Math.min(n, t) / (e || 1); + return e * Math.sqrt(1 + Math.pow(i, 2)); +} +function B3(n) { + var t = 1 + n, e = t - 1; + return e === 0 ? n : n * Math.log(t) / e; +} +function z3(n) { + var t = Math.abs(n); + return t = B3(t * (1 + t / (Pe(1, t) + 1))), n < 0 ? -t : t; +} +function ph(n, t) { + for (var e = 2 * Math.cos(2 * t), i = n.length - 1, s = n[i], r = 0, o; --i >= 0; ) + o = -r + e * s + n[i], r = s, s = o; + return t + o * Math.sin(2 * t); +} +function Z3(n, t) { + for (var e = 2 * Math.cos(t), i = n.length - 1, s = n[i], r = 0, o; --i >= 0; ) + o = -r + e * s + n[i], r = s, s = o; + return Math.sin(t) * o; +} +function V3(n) { + var t = Math.exp(n); + return t = (t + 1 / t) / 2, t; +} +function cg(n, t, e) { + for (var i = Math.sin(t), s = Math.cos(t), r = hg(e), o = V3(e), a = 2 * s * o, l = -2 * i * r, h = n.length - 1, c = n[h], u = 0, d = 0, f = 0, g, m; --h >= 0; ) + g = d, m = u, d = c, u = f, c = -g + a * d - l * u + n[h], f = -m + l * d + a * u; + return a = i * o, l = s * r, [a * c - l * f, a * f + l * c]; +} +function U3() { + if (!this.approx && (isNaN(this.es) || this.es <= 0)) + throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.'); + this.approx && (Yr.init.apply(this), this.forward = Yr.forward, this.inverse = Yr.inverse), this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.cgb = [], this.cbg = [], this.utg = [], this.gtu = []; + var n = this.es / (1 + Math.sqrt(1 - this.es)), t = n / (2 - n), e = t; + this.cgb[0] = t * (2 + t * (-2 / 3 + t * (-2 + t * (116 / 45 + t * (26 / 45 + t * (-2854 / 675)))))), this.cbg[0] = t * (-2 + t * (2 / 3 + t * (4 / 3 + t * (-82 / 45 + t * (32 / 45 + t * (4642 / 4725)))))), e = e * t, this.cgb[1] = e * (7 / 3 + t * (-8 / 5 + t * (-227 / 45 + t * (2704 / 315 + t * (2323 / 945))))), this.cbg[1] = e * (5 / 3 + t * (-16 / 15 + t * (-13 / 9 + t * (904 / 315 + t * (-1522 / 945))))), e = e * t, this.cgb[2] = e * (56 / 15 + t * (-136 / 35 + t * (-1262 / 105 + t * (73814 / 2835)))), this.cbg[2] = e * (-26 / 15 + t * (34 / 21 + t * (8 / 5 + t * (-12686 / 2835)))), e = e * t, this.cgb[3] = e * (4279 / 630 + t * (-332 / 35 + t * (-399572 / 14175))), this.cbg[3] = e * (1237 / 630 + t * (-12 / 5 + t * (-24832 / 14175))), e = e * t, this.cgb[4] = e * (4174 / 315 + t * (-144838 / 6237)), this.cbg[4] = e * (-734 / 315 + t * (109598 / 31185)), e = e * t, this.cgb[5] = e * (601676 / 22275), this.cbg[5] = e * (444337 / 155925), e = Math.pow(t, 2), this.Qn = this.k0 / (1 + t) * (1 + e * (1 / 4 + e * (1 / 64 + e / 256))), this.utg[0] = t * (-0.5 + t * (2 / 3 + t * (-37 / 96 + t * (1 / 360 + t * (81 / 512 + t * (-96199 / 604800)))))), this.gtu[0] = t * (0.5 + t * (-2 / 3 + t * (5 / 16 + t * (41 / 180 + t * (-127 / 288 + t * (7891 / 37800)))))), this.utg[1] = e * (-1 / 48 + t * (-1 / 15 + t * (437 / 1440 + t * (-46 / 105 + t * (1118711 / 3870720))))), this.gtu[1] = e * (13 / 48 + t * (-3 / 5 + t * (557 / 1440 + t * (281 / 630 + t * (-1983433 / 1935360))))), e = e * t, this.utg[2] = e * (-17 / 480 + t * (37 / 840 + t * (209 / 4480 + t * (-5569 / 90720)))), this.gtu[2] = e * (61 / 240 + t * (-103 / 140 + t * (15061 / 26880 + t * (167603 / 181440)))), e = e * t, this.utg[3] = e * (-4397 / 161280 + t * (11 / 504 + t * (830251 / 7257600))), this.gtu[3] = e * (49561 / 161280 + t * (-179 / 168 + t * (6601661 / 7257600))), e = e * t, this.utg[4] = e * (-4583 / 161280 + t * (108847 / 3991680)), this.gtu[4] = e * (34729 / 80640 + t * (-3418889 / 1995840)), e = e * t, this.utg[5] = e * (-20648693 / 638668800), this.gtu[5] = e * (212378941 / 319334400); + var i = ph(this.cbg, this.lat0); + this.Zb = -this.Qn * (i + Z3(this.gtu, 2 * i)); +} +function W3(n) { + var t = A(n.x - this.long0), e = n.y; + e = ph(this.cbg, e); + var i = Math.sin(e), s = Math.cos(e), r = Math.sin(t), o = Math.cos(t); + e = Math.atan2(i, o * s), t = Math.atan2(r * s, Pe(i, s * o)), t = z3(Math.tan(t)); + var a = cg(this.gtu, 2 * e, 2 * t); + e = e + a[0], t = t + a[1]; + var l, h; + return Math.abs(t) <= 2.623395162778 ? (l = this.a * (this.Qn * t) + this.x0, h = this.a * (this.Qn * e + this.Zb) + this.y0) : (l = 1 / 0, h = 1 / 0), n.x = l, n.y = h, n; +} +function H3(n) { + var t = (n.x - this.x0) * (1 / this.a), e = (n.y - this.y0) * (1 / this.a); + e = (e - this.Zb) / this.Qn, t = t / this.Qn; + var i, s; + if (Math.abs(t) <= 2.623395162778) { + var r = cg(this.utg, 2 * e, 2 * t); + e = e + r[0], t = t + r[1], t = Math.atan(hg(t)); + var o = Math.sin(e), a = Math.cos(e), l = Math.sin(t), h = Math.cos(t); + e = Math.atan2(o * h, Pe(l, h * a)), t = Math.atan2(l, h * a), i = A(t + this.long0), s = ph(this.cgb, e); + } else + i = 1 / 0, s = 1 / 0; + return n.x = i, n.y = s, n; +} +var X3 = ["Extended_Transverse_Mercator", "Extended Transverse Mercator", "etmerc", "Transverse_Mercator", "Transverse Mercator", "tmerc"]; +const jr = { + init: U3, + forward: W3, + inverse: H3, + names: X3 +}; +function Y3(n, t) { + if (n === void 0) { + if (n = Math.floor((A(t) + Math.PI) * 30 / Math.PI) + 1, n < 0) + return 0; + if (n > 60) + return 60; + } + return n; +} +var j3 = "etmerc"; +function q3() { + var n = Y3(this.zone, this.long0); + if (n === void 0) + throw new Error("unknown utm zone"); + this.lat0 = 0, this.long0 = (6 * Math.abs(n) - 183) * zt, this.x0 = 5e5, this.y0 = this.utmSouth ? 1e7 : 0, this.k0 = 0.9996, jr.init.apply(this), this.forward = jr.forward, this.inverse = jr.inverse; +} +var K3 = ["Universal Transverse Mercator System", "utm"]; +const J3 = { + init: q3, + names: K3, + dependsOn: j3 +}; +function yh(n, t) { + return Math.pow((1 - n) / (1 + n), t); +} +var Q3 = 20; +function tC() { + var n = Math.sin(this.lat0), t = Math.cos(this.lat0); + t *= t, this.rc = Math.sqrt(1 - this.es) / (1 - this.es * n * n), this.C = Math.sqrt(1 + this.es * t * t / (1 - this.es)), this.phic0 = Math.asin(n / this.C), this.ratexp = 0.5 * this.C * this.e, this.K = Math.tan(0.5 * this.phic0 + ct) / (Math.pow(Math.tan(0.5 * this.lat0 + ct), this.C) * yh(this.e * n, this.ratexp)); +} +function eC(n) { + var t = n.x, e = n.y; + return n.y = 2 * Math.atan(this.K * Math.pow(Math.tan(0.5 * e + ct), this.C) * yh(this.e * Math.sin(e), this.ratexp)) - S, n.x = this.C * t, n; +} +function iC(n) { + for (var t = 1e-14, e = n.x / this.C, i = n.y, s = Math.pow(Math.tan(0.5 * i + ct) / this.K, 1 / this.C), r = Q3; r > 0 && (i = 2 * Math.atan(s * yh(this.e * Math.sin(n.y), -0.5 * this.e)) - S, !(Math.abs(i - n.y) < t)); --r) + n.y = i; + return r ? (n.x = e, n.y = i, n) : null; +} +var nC = ["gauss"]; +const vh = { + init: tC, + forward: eC, + inverse: iC, + names: nC +}; +function sC() { + vh.init.apply(this), this.rc && (this.sinc0 = Math.sin(this.phic0), this.cosc0 = Math.cos(this.phic0), this.R2 = 2 * this.rc, this.title || (this.title = "Oblique Stereographic Alternative")); +} +function rC(n) { + var t, e, i, s; + return n.x = A(n.x - this.long0), vh.forward.apply(this, [n]), t = Math.sin(n.y), e = Math.cos(n.y), i = Math.cos(n.x), s = this.k0 * this.R2 / (1 + this.sinc0 * t + this.cosc0 * e * i), n.x = s * e * Math.sin(n.x), n.y = s * (this.cosc0 * t - this.sinc0 * e * i), n.x = this.a * n.x + this.x0, n.y = this.a * n.y + this.y0, n; +} +function oC(n) { + var t, e, i, s, r; + if (n.x = (n.x - this.x0) / this.a, n.y = (n.y - this.y0) / this.a, n.x /= this.k0, n.y /= this.k0, r = Math.sqrt(n.x * n.x + n.y * n.y)) { + var o = 2 * Math.atan2(r, this.R2); + t = Math.sin(o), e = Math.cos(o), s = Math.asin(e * this.sinc0 + n.y * t * this.cosc0 / r), i = Math.atan2(n.x * t, r * this.cosc0 * e - n.y * this.sinc0 * t); + } else + s = this.phic0, i = 0; + return n.x = i, n.y = s, vh.inverse.apply(this, [n]), n.x = A(n.x + this.long0), n; +} +var aC = ["Stereographic_North_Pole", "Oblique_Stereographic", "Polar_Stereographic", "sterea", "Oblique Stereographic Alternative", "Double_Stereographic"]; +const lC = { + init: sC, + forward: rC, + inverse: oC, + names: aC +}; +function hC(n, t, e) { + return t *= e, Math.tan(0.5 * (S + n)) * Math.pow((1 - t) / (1 + t), 0.5 * e); +} +function cC() { + this.coslat0 = Math.cos(this.lat0), this.sinlat0 = Math.sin(this.lat0), this.sphere ? this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= I && (this.k0 = 0.5 * (1 + cr(this.lat0) * Math.sin(this.lat_ts))) : (Math.abs(this.coslat0) <= I && (this.lat0 > 0 ? this.con = 1 : this.con = -1), this.cons = Math.sqrt(Math.pow(1 + this.e, 1 + this.e) * Math.pow(1 - this.e, 1 - this.e)), this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= I && (this.k0 = 0.5 * this.cons * We(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) / Ae(this.e, this.con * this.lat_ts, this.con * Math.sin(this.lat_ts))), this.ms1 = We(this.e, this.sinlat0, this.coslat0), this.X0 = 2 * Math.atan(this.ssfn_(this.lat0, this.sinlat0, this.e)) - S, this.cosX0 = Math.cos(this.X0), this.sinX0 = Math.sin(this.X0)); +} +function uC(n) { + var t = n.x, e = n.y, i = Math.sin(e), s = Math.cos(e), r, o, a, l, h, c, u = A(t - this.long0); + return Math.abs(Math.abs(t - this.long0) - Math.PI) <= I && Math.abs(e + this.lat0) <= I ? (n.x = NaN, n.y = NaN, n) : this.sphere ? (r = 2 * this.k0 / (1 + this.sinlat0 * i + this.coslat0 * s * Math.cos(u)), n.x = this.a * r * s * Math.sin(u) + this.x0, n.y = this.a * r * (this.coslat0 * i - this.sinlat0 * s * Math.cos(u)) + this.y0, n) : (o = 2 * Math.atan(this.ssfn_(e, i, this.e)) - S, l = Math.cos(o), a = Math.sin(o), Math.abs(this.coslat0) <= I ? (h = Ae(this.e, e * this.con, this.con * i), c = 2 * this.a * this.k0 * h / this.cons, n.x = this.x0 + c * Math.sin(t - this.long0), n.y = this.y0 - this.con * c * Math.cos(t - this.long0), n) : (Math.abs(this.sinlat0) < I ? (r = 2 * this.a * this.k0 / (1 + l * Math.cos(u)), n.y = r * a) : (r = 2 * this.a * this.k0 * this.ms1 / (this.cosX0 * (1 + this.sinX0 * a + this.cosX0 * l * Math.cos(u))), n.y = r * (this.cosX0 * a - this.sinX0 * l * Math.cos(u)) + this.y0), n.x = r * l * Math.sin(u) + this.x0, n)); +} +function dC(n) { + n.x -= this.x0, n.y -= this.y0; + var t, e, i, s, r, o = Math.sqrt(n.x * n.x + n.y * n.y); + if (this.sphere) { + var a = 2 * Math.atan(o / (2 * this.a * this.k0)); + return t = this.long0, e = this.lat0, o <= I ? (n.x = t, n.y = e, n) : (e = Math.asin(Math.cos(a) * this.sinlat0 + n.y * Math.sin(a) * this.coslat0 / o), Math.abs(this.coslat0) < I ? this.lat0 > 0 ? t = A(this.long0 + Math.atan2(n.x, -1 * n.y)) : t = A(this.long0 + Math.atan2(n.x, n.y)) : t = A(this.long0 + Math.atan2(n.x * Math.sin(a), o * this.coslat0 * Math.cos(a) - n.y * this.sinlat0 * Math.sin(a))), n.x = t, n.y = e, n); + } else if (Math.abs(this.coslat0) <= I) { + if (o <= I) + return e = this.lat0, t = this.long0, n.x = t, n.y = e, n; + n.x *= this.con, n.y *= this.con, i = o * this.cons / (2 * this.a * this.k0), e = this.con * Ys(this.e, i), t = this.con * A(this.con * this.long0 + Math.atan2(n.x, -1 * n.y)); + } else + s = 2 * Math.atan(o * this.cosX0 / (2 * this.a * this.k0 * this.ms1)), t = this.long0, o <= I ? r = this.X0 : (r = Math.asin(Math.cos(s) * this.sinX0 + n.y * Math.sin(s) * this.cosX0 / o), t = A(this.long0 + Math.atan2(n.x * Math.sin(s), o * this.cosX0 * Math.cos(s) - n.y * this.sinX0 * Math.sin(s)))), e = -1 * Ys(this.e, Math.tan(0.5 * (S + r))); + return n.x = t, n.y = e, n; +} +var fC = ["stere", "Stereographic_South_Pole", "Polar Stereographic (variant B)"]; +const gC = { + init: cC, + forward: uC, + inverse: dC, + names: fC, + ssfn_: hC +}; +function mC() { + var n = this.lat0; + this.lambda0 = this.long0; + var t = Math.sin(n), e = this.a, i = this.rf, s = 1 / i, r = 2 * s - Math.pow(s, 2), o = this.e = Math.sqrt(r); + this.R = this.k0 * e * Math.sqrt(1 - r) / (1 - r * Math.pow(t, 2)), this.alpha = Math.sqrt(1 + r / (1 - r) * Math.pow(Math.cos(n), 4)), this.b0 = Math.asin(t / this.alpha); + var a = Math.log(Math.tan(Math.PI / 4 + this.b0 / 2)), l = Math.log(Math.tan(Math.PI / 4 + n / 2)), h = Math.log((1 + o * t) / (1 - o * t)); + this.K = a - this.alpha * l + this.alpha * o / 2 * h; +} +function _C(n) { + var t = Math.log(Math.tan(Math.PI / 4 - n.y / 2)), e = this.e / 2 * Math.log((1 + this.e * Math.sin(n.y)) / (1 - this.e * Math.sin(n.y))), i = -this.alpha * (t + e) + this.K, s = 2 * (Math.atan(Math.exp(i)) - Math.PI / 4), r = this.alpha * (n.x - this.lambda0), o = Math.atan(Math.sin(r) / (Math.sin(this.b0) * Math.tan(s) + Math.cos(this.b0) * Math.cos(r))), a = Math.asin(Math.cos(this.b0) * Math.sin(s) - Math.sin(this.b0) * Math.cos(s) * Math.cos(r)); + return n.y = this.R / 2 * Math.log((1 + Math.sin(a)) / (1 - Math.sin(a))) + this.y0, n.x = this.R * o + this.x0, n; +} +function pC(n) { + for (var t = n.x - this.x0, e = n.y - this.y0, i = t / this.R, s = 2 * (Math.atan(Math.exp(e / this.R)) - Math.PI / 4), r = Math.asin(Math.cos(this.b0) * Math.sin(s) + Math.sin(this.b0) * Math.cos(s) * Math.cos(i)), o = Math.atan(Math.sin(i) / (Math.cos(this.b0) * Math.cos(i) - Math.sin(this.b0) * Math.tan(s))), a = this.lambda0 + o / this.alpha, l = 0, h = r, c = -1e3, u = 0; Math.abs(h - c) > 1e-7; ) { + if (++u > 20) + return; + l = 1 / this.alpha * (Math.log(Math.tan(Math.PI / 4 + r / 2)) - this.K) + this.e * Math.log(Math.tan(Math.PI / 4 + Math.asin(this.e * Math.sin(h)) / 2)), c = h, h = 2 * Math.atan(Math.exp(l)) - Math.PI / 2; + } + return n.x = a, n.y = h, n; +} +var yC = ["somerc"]; +const vC = { + init: mC, + forward: _C, + inverse: pC, + names: yC +}; +var In = 1e-7; +function xC(n) { + var t = ["Hotine_Oblique_Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin"], e = typeof n.PROJECTION == "object" ? Object.keys(n.PROJECTION)[0] : n.PROJECTION; + return "no_uoff" in n || "no_off" in n || t.indexOf(e) !== -1; +} +function CC() { + var n, t, e, i, s, r, o, a, l, h, c = 0, u, d = 0, f = 0, g = 0, m = 0, _ = 0, y = 0; + this.no_off = xC(this), this.no_rot = "no_rot" in this; + var p = !1; + "alpha" in this && (p = !0); + var v = !1; + if ("rectified_grid_angle" in this && (v = !0), p && (y = this.alpha), v && (c = this.rectified_grid_angle * zt), p || v) + d = this.longc; + else if (f = this.long1, m = this.lat1, g = this.long2, _ = this.lat2, Math.abs(m - _) <= In || (n = Math.abs(m)) <= In || Math.abs(n - S) <= In || Math.abs(Math.abs(this.lat0) - S) <= In || Math.abs(Math.abs(_) - S) <= In) + throw new Error(); + var x = 1 - this.es; + t = Math.sqrt(x), Math.abs(this.lat0) > I ? (a = Math.sin(this.lat0), e = Math.cos(this.lat0), n = 1 - this.es * a * a, this.B = e * e, this.B = Math.sqrt(1 + this.es * this.B * this.B / x), this.A = this.B * this.k0 * t / n, i = this.B * t / (e * Math.sqrt(n)), s = i * i - 1, s <= 0 ? s = 0 : (s = Math.sqrt(s), this.lat0 < 0 && (s = -s)), this.E = s += i, this.E *= Math.pow(Ae(this.e, this.lat0, a), this.B)) : (this.B = 1 / t, this.A = this.k0, this.E = i = s = 1), p || v ? (p ? (u = Math.asin(Math.sin(y) / i), v || (c = y)) : (u = c, y = Math.asin(i * Math.sin(u))), this.lam0 = d - Math.asin(0.5 * (s - 1 / s) * Math.tan(u)) / this.B) : (r = Math.pow(Ae(this.e, m, Math.sin(m)), this.B), o = Math.pow(Ae(this.e, _, Math.sin(_)), this.B), s = this.E / r, l = (o - r) / (o + r), h = this.E * this.E, h = (h - o * r) / (h + o * r), n = f - g, n < -Math.pi ? g -= Hs : n > Math.pi && (g += Hs), this.lam0 = A(0.5 * (f + g) - Math.atan(h * Math.tan(0.5 * this.B * (f - g)) / l) / this.B), u = Math.atan(2 * Math.sin(this.B * A(f - this.lam0)) / (s - 1 / s)), c = y = Math.asin(i * Math.sin(u))), this.singam = Math.sin(u), this.cosgam = Math.cos(u), this.sinrot = Math.sin(c), this.cosrot = Math.cos(c), this.rB = 1 / this.B, this.ArB = this.A * this.rB, this.BrA = 1 / this.ArB, this.A * this.B, this.no_off ? this.u_0 = 0 : (this.u_0 = Math.abs(this.ArB * Math.atan(Math.sqrt(i * i - 1) / Math.cos(y))), this.lat0 < 0 && (this.u_0 = -this.u_0)), s = 0.5 * u, this.v_pole_n = this.ArB * Math.log(Math.tan(ct - s)), this.v_pole_s = this.ArB * Math.log(Math.tan(ct + s)); +} +function MC(n) { + var t = {}, e, i, s, r, o, a, l, h; + if (n.x = n.x - this.lam0, Math.abs(Math.abs(n.y) - S) > I) { + if (o = this.E / Math.pow(Ae(this.e, n.y, Math.sin(n.y)), this.B), a = 1 / o, e = 0.5 * (o - a), i = 0.5 * (o + a), r = Math.sin(this.B * n.x), s = (e * this.singam - r * this.cosgam) / i, Math.abs(Math.abs(s) - 1) < I) + throw new Error(); + h = 0.5 * this.ArB * Math.log((1 - s) / (1 + s)), a = Math.cos(this.B * n.x), Math.abs(a) < In ? l = this.A * n.x : l = this.ArB * Math.atan2(e * this.cosgam + r * this.singam, a); + } else + h = n.y > 0 ? this.v_pole_n : this.v_pole_s, l = this.ArB * n.y; + return this.no_rot ? (t.x = l, t.y = h) : (l -= this.u_0, t.x = h * this.cosrot + l * this.sinrot, t.y = l * this.cosrot - h * this.sinrot), t.x = this.a * t.x + this.x0, t.y = this.a * t.y + this.y0, t; +} +function EC(n) { + var t, e, i, s, r, o, a, l = {}; + if (n.x = (n.x - this.x0) * (1 / this.a), n.y = (n.y - this.y0) * (1 / this.a), this.no_rot ? (e = n.y, t = n.x) : (e = n.x * this.cosrot - n.y * this.sinrot, t = n.y * this.cosrot + n.x * this.sinrot + this.u_0), i = Math.exp(-this.BrA * e), s = 0.5 * (i - 1 / i), r = 0.5 * (i + 1 / i), o = Math.sin(this.BrA * t), a = (o * this.cosgam + s * this.singam) / r, Math.abs(Math.abs(a) - 1) < I) + l.x = 0, l.y = a < 0 ? -S : S; + else { + if (l.y = this.E / Math.sqrt((1 + a) / (1 - a)), l.y = Ys(this.e, Math.pow(l.y, 1 / this.B)), l.y === 1 / 0) + throw new Error(); + l.x = -this.rB * Math.atan2(s * this.cosgam - o * this.singam, Math.cos(this.BrA * t)); + } + return l.x += this.lam0, l; +} +var wC = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Two_Point_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "Oblique_Mercator", "omerc"]; +const SC = { + init: CC, + forward: MC, + inverse: EC, + names: wC +}; +function RC() { + if (this.lat2 || (this.lat2 = this.lat1), this.k0 || (this.k0 = 1), this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, !(Math.abs(this.lat1 + this.lat2) < I)) { + var n = this.b / this.a; + this.e = Math.sqrt(1 - n * n); + var t = Math.sin(this.lat1), e = Math.cos(this.lat1), i = We(this.e, t, e), s = Ae(this.e, this.lat1, t), r = Math.sin(this.lat2), o = Math.cos(this.lat2), a = We(this.e, r, o), l = Ae(this.e, this.lat2, r), h = Ae(this.e, this.lat0, Math.sin(this.lat0)); + Math.abs(this.lat1 - this.lat2) > I ? this.ns = Math.log(i / a) / Math.log(s / l) : this.ns = t, isNaN(this.ns) && (this.ns = t), this.f0 = i / (this.ns * Math.pow(s, this.ns)), this.rh = this.a * this.f0 * Math.pow(h, this.ns), this.title || (this.title = "Lambert Conformal Conic"); + } +} +function TC(n) { + var t = n.x, e = n.y; + Math.abs(2 * Math.abs(e) - Math.PI) <= I && (e = cr(e) * (S - 2 * I)); + var i = Math.abs(Math.abs(e) - S), s, r; + if (i > I) + s = Ae(this.e, e, Math.sin(e)), r = this.a * this.f0 * Math.pow(s, this.ns); + else { + if (i = e * this.ns, i <= 0) + return null; + r = 0; + } + var o = this.ns * A(t - this.long0); + return n.x = this.k0 * (r * Math.sin(o)) + this.x0, n.y = this.k0 * (this.rh - r * Math.cos(o)) + this.y0, n; +} +function bC(n) { + var t, e, i, s, r, o = (n.x - this.x0) / this.k0, a = this.rh - (n.y - this.y0) / this.k0; + this.ns > 0 ? (t = Math.sqrt(o * o + a * a), e = 1) : (t = -Math.sqrt(o * o + a * a), e = -1); + var l = 0; + if (t !== 0 && (l = Math.atan2(e * o, e * a)), t !== 0 || this.ns > 0) { + if (e = 1 / this.ns, i = Math.pow(t / (this.a * this.f0), e), s = Ys(this.e, i), s === -9999) + return null; + } else + s = -S; + return r = A(l / this.ns + this.long0), n.x = r, n.y = s, n; +} +var LC = [ + "Lambert Tangential Conformal Conic Projection", + "Lambert_Conformal_Conic", + "Lambert_Conformal_Conic_1SP", + "Lambert_Conformal_Conic_2SP", + "lcc", + "Lambert Conic Conformal (1SP)", + "Lambert Conic Conformal (2SP)" +]; +const IC = { + init: RC, + forward: TC, + inverse: bC, + names: LC +}; +function PC() { + this.a = 6377397155e-3, this.es = 0.006674372230614, this.e = Math.sqrt(this.es), this.lat0 || (this.lat0 = 0.863937979737193), this.long0 || (this.long0 = 0.7417649320975901 - 0.308341501185665), this.k0 || (this.k0 = 0.9999), this.s45 = 0.785398163397448, this.s90 = 2 * this.s45, this.fi0 = this.lat0, this.e2 = this.es, this.e = Math.sqrt(this.e2), this.alfa = Math.sqrt(1 + this.e2 * Math.pow(Math.cos(this.fi0), 4) / (1 - this.e2)), this.uq = 1.04216856380474, this.u0 = Math.asin(Math.sin(this.fi0) / this.alfa), this.g = Math.pow((1 + this.e * Math.sin(this.fi0)) / (1 - this.e * Math.sin(this.fi0)), this.alfa * this.e / 2), this.k = Math.tan(this.u0 / 2 + this.s45) / Math.pow(Math.tan(this.fi0 / 2 + this.s45), this.alfa) * this.g, this.k1 = this.k0, this.n0 = this.a * Math.sqrt(1 - this.e2) / (1 - this.e2 * Math.pow(Math.sin(this.fi0), 2)), this.s0 = 1.37008346281555, this.n = Math.sin(this.s0), this.ro0 = this.k1 * this.n0 / Math.tan(this.s0), this.ad = this.s90 - this.uq; +} +function AC(n) { + var t, e, i, s, r, o, a, l = n.x, h = n.y, c = A(l - this.long0); + return t = Math.pow((1 + this.e * Math.sin(h)) / (1 - this.e * Math.sin(h)), this.alfa * this.e / 2), e = 2 * (Math.atan(this.k * Math.pow(Math.tan(h / 2 + this.s45), this.alfa) / t) - this.s45), i = -c * this.alfa, s = Math.asin(Math.cos(this.ad) * Math.sin(e) + Math.sin(this.ad) * Math.cos(e) * Math.cos(i)), r = Math.asin(Math.cos(e) * Math.sin(i) / Math.cos(s)), o = this.n * r, a = this.ro0 * Math.pow(Math.tan(this.s0 / 2 + this.s45), this.n) / Math.pow(Math.tan(s / 2 + this.s45), this.n), n.y = a * Math.cos(o) / 1, n.x = a * Math.sin(o) / 1, this.czech || (n.y *= -1, n.x *= -1), n; +} +function OC(n) { + var t, e, i, s, r, o, a, l, h = n.x; + n.x = n.y, n.y = h, this.czech || (n.y *= -1, n.x *= -1), o = Math.sqrt(n.x * n.x + n.y * n.y), r = Math.atan2(n.y, n.x), s = r / Math.sin(this.s0), i = 2 * (Math.atan(Math.pow(this.ro0 / o, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45), t = Math.asin(Math.cos(this.ad) * Math.sin(i) - Math.sin(this.ad) * Math.cos(i) * Math.cos(s)), e = Math.asin(Math.cos(i) * Math.sin(s) / Math.cos(t)), n.x = this.long0 - e / this.alfa, a = t, l = 0; + var c = 0; + do + n.y = 2 * (Math.atan(Math.pow(this.k, -1 / this.alfa) * Math.pow(Math.tan(t / 2 + this.s45), 1 / this.alfa) * Math.pow((1 + this.e * Math.sin(a)) / (1 - this.e * Math.sin(a)), this.e / 2)) - this.s45), Math.abs(a - n.y) < 1e-10 && (l = 1), a = n.y, c += 1; + while (l === 0 && c < 15); + return c >= 15 ? null : n; +} +var FC = ["Krovak", "krovak"]; +const NC = { + init: PC, + forward: AC, + inverse: OC, + names: FC +}; +function Jt(n, t, e, i, s) { + return n * s - t * Math.sin(2 * s) + e * Math.sin(4 * s) - i * Math.sin(6 * s); +} +function ur(n) { + return 1 - 0.25 * n * (1 + n / 16 * (3 + 1.25 * n)); +} +function dr(n) { + return 0.375 * n * (1 + 0.25 * n * (1 + 0.46875 * n)); +} +function fr(n) { + return 0.05859375 * n * n * (1 + 0.75 * n); +} +function gr(n) { + return n * n * n * (35 / 3072); +} +function ts(n, t, e) { + var i = t * e; + return n / Math.sqrt(1 - i * i); +} +function ls(n) { + return Math.abs(n) < S ? n : n - cr(n) * Math.PI; +} +function Eo(n, t, e, i, s) { + var r, o; + r = n / t; + for (var a = 0; a < 15; a++) + if (o = (n - (t * r - e * Math.sin(2 * r) + i * Math.sin(4 * r) - s * Math.sin(6 * r))) / (t - 2 * e * Math.cos(2 * r) + 4 * i * Math.cos(4 * r) - 6 * s * Math.cos(6 * r)), r += o, Math.abs(o) <= 1e-10) + return r; + return NaN; +} +function DC() { + this.sphere || (this.e0 = ur(this.es), this.e1 = dr(this.es), this.e2 = fr(this.es), this.e3 = gr(this.es), this.ml0 = this.a * Jt(this.e0, this.e1, this.e2, this.e3, this.lat0)); +} +function kC(n) { + var t, e, i = n.x, s = n.y; + if (i = A(i - this.long0), this.sphere) + t = this.a * Math.asin(Math.cos(s) * Math.sin(i)), e = this.a * (Math.atan2(Math.tan(s), Math.cos(i)) - this.lat0); + else { + var r = Math.sin(s), o = Math.cos(s), a = ts(this.a, this.e, r), l = Math.tan(s) * Math.tan(s), h = i * Math.cos(s), c = h * h, u = this.es * o * o / (1 - this.es), d = this.a * Jt(this.e0, this.e1, this.e2, this.e3, s); + t = a * h * (1 - c * l * (1 / 6 - (8 - l + 8 * u) * c / 120)), e = d - this.ml0 + a * r / o * c * (0.5 + (5 - l + 6 * u) * c / 24); + } + return n.x = t + this.x0, n.y = e + this.y0, n; +} +function GC(n) { + n.x -= this.x0, n.y -= this.y0; + var t = n.x / this.a, e = n.y / this.a, i, s; + if (this.sphere) { + var r = e + this.lat0; + i = Math.asin(Math.sin(r) * Math.cos(t)), s = Math.atan2(Math.tan(t), Math.cos(r)); + } else { + var o = this.ml0 / this.a + e, a = Eo(o, this.e0, this.e1, this.e2, this.e3); + if (Math.abs(Math.abs(a) - S) <= I) + return n.x = this.long0, n.y = S, e < 0 && (n.y *= -1), n; + var l = ts(this.a, this.e, Math.sin(a)), h = l * l * l / this.a / this.a * (1 - this.es), c = Math.pow(Math.tan(a), 2), u = t * this.a / l, d = u * u; + i = a - l * Math.tan(a) / h * u * u * (0.5 - (1 + 3 * c) * u * u / 24), s = u * (1 - d * (c / 3 + (1 + 3 * c) * c * d / 15)) / Math.cos(a); + } + return n.x = A(s + this.long0), n.y = ls(i), n; +} +var $C = ["Cassini", "Cassini_Soldner", "cass"]; +const BC = { + init: DC, + forward: kC, + inverse: GC, + names: $C +}; +function Ti(n, t) { + var e; + return n > 1e-7 ? (e = n * t, (1 - n * n) * (t / (1 - e * e) - 0.5 / n * Math.log((1 - e) / (1 + e)))) : 2 * t; +} +var zC = 1, ZC = 2, VC = 3, UC = 4; +function WC() { + var n = Math.abs(this.lat0); + if (Math.abs(n - S) < I ? this.mode = this.lat0 < 0 ? this.S_POLE : this.N_POLE : Math.abs(n) < I ? this.mode = this.EQUIT : this.mode = this.OBLIQ, this.es > 0) { + var t; + switch (this.qp = Ti(this.e, 1), this.mmf = 0.5 / (1 - this.es), this.apa = tM(this.es), this.mode) { + case this.N_POLE: + this.dd = 1; + break; + case this.S_POLE: + this.dd = 1; + break; + case this.EQUIT: + this.rq = Math.sqrt(0.5 * this.qp), this.dd = 1 / this.rq, this.xmf = 1, this.ymf = 0.5 * this.qp; + break; + case this.OBLIQ: + this.rq = Math.sqrt(0.5 * this.qp), t = Math.sin(this.lat0), this.sinb1 = Ti(this.e, t) / this.qp, this.cosb1 = Math.sqrt(1 - this.sinb1 * this.sinb1), this.dd = Math.cos(this.lat0) / (Math.sqrt(1 - this.es * t * t) * this.rq * this.cosb1), this.ymf = (this.xmf = this.rq) / this.dd, this.xmf *= this.dd; + break; + } + } else + this.mode === this.OBLIQ && (this.sinph0 = Math.sin(this.lat0), this.cosph0 = Math.cos(this.lat0)); +} +function HC(n) { + var t, e, i, s, r, o, a, l, h, c, u = n.x, d = n.y; + if (u = A(u - this.long0), this.sphere) { + if (r = Math.sin(d), c = Math.cos(d), i = Math.cos(u), this.mode === this.OBLIQ || this.mode === this.EQUIT) { + if (e = this.mode === this.EQUIT ? 1 + c * i : 1 + this.sinph0 * r + this.cosph0 * c * i, e <= I) + return null; + e = Math.sqrt(2 / e), t = e * c * Math.sin(u), e *= this.mode === this.EQUIT ? r : this.cosph0 * r - this.sinph0 * c * i; + } else if (this.mode === this.N_POLE || this.mode === this.S_POLE) { + if (this.mode === this.N_POLE && (i = -i), Math.abs(d + this.lat0) < I) + return null; + e = ct - d * 0.5, e = 2 * (this.mode === this.S_POLE ? Math.cos(e) : Math.sin(e)), t = e * Math.sin(u), e *= i; + } + } else { + switch (a = 0, l = 0, h = 0, i = Math.cos(u), s = Math.sin(u), r = Math.sin(d), o = Ti(this.e, r), (this.mode === this.OBLIQ || this.mode === this.EQUIT) && (a = o / this.qp, l = Math.sqrt(1 - a * a)), this.mode) { + case this.OBLIQ: + h = 1 + this.sinb1 * a + this.cosb1 * l * i; + break; + case this.EQUIT: + h = 1 + l * i; + break; + case this.N_POLE: + h = S + d, o = this.qp - o; + break; + case this.S_POLE: + h = d - S, o = this.qp + o; + break; + } + if (Math.abs(h) < I) + return null; + switch (this.mode) { + case this.OBLIQ: + case this.EQUIT: + h = Math.sqrt(2 / h), this.mode === this.OBLIQ ? e = this.ymf * h * (this.cosb1 * a - this.sinb1 * l * i) : e = (h = Math.sqrt(2 / (1 + l * i))) * a * this.ymf, t = this.xmf * h * l * s; + break; + case this.N_POLE: + case this.S_POLE: + o >= 0 ? (t = (h = Math.sqrt(o)) * s, e = i * (this.mode === this.S_POLE ? h : -h)) : t = e = 0; + break; + } + } + return n.x = this.a * t + this.x0, n.y = this.a * e + this.y0, n; +} +function XC(n) { + n.x -= this.x0, n.y -= this.y0; + var t = n.x / this.a, e = n.y / this.a, i, s, r, o, a, l, h; + if (this.sphere) { + var c = 0, u, d = 0; + if (u = Math.sqrt(t * t + e * e), s = u * 0.5, s > 1) + return null; + switch (s = 2 * Math.asin(s), (this.mode === this.OBLIQ || this.mode === this.EQUIT) && (d = Math.sin(s), c = Math.cos(s)), this.mode) { + case this.EQUIT: + s = Math.abs(u) <= I ? 0 : Math.asin(e * d / u), t *= d, e = c * u; + break; + case this.OBLIQ: + s = Math.abs(u) <= I ? this.lat0 : Math.asin(c * this.sinph0 + e * d * this.cosph0 / u), t *= d * this.cosph0, e = (c - Math.sin(s) * this.sinph0) * u; + break; + case this.N_POLE: + e = -e, s = S - s; + break; + case this.S_POLE: + s -= S; + break; + } + i = e === 0 && (this.mode === this.EQUIT || this.mode === this.OBLIQ) ? 0 : Math.atan2(t, e); + } else { + if (h = 0, this.mode === this.OBLIQ || this.mode === this.EQUIT) { + if (t /= this.dd, e *= this.dd, l = Math.sqrt(t * t + e * e), l < I) + return n.x = this.long0, n.y = this.lat0, n; + o = 2 * Math.asin(0.5 * l / this.rq), r = Math.cos(o), t *= o = Math.sin(o), this.mode === this.OBLIQ ? (h = r * this.sinb1 + e * o * this.cosb1 / l, a = this.qp * h, e = l * this.cosb1 * r - e * this.sinb1 * o) : (h = e * o / l, a = this.qp * h, e = l * r); + } else if (this.mode === this.N_POLE || this.mode === this.S_POLE) { + if (this.mode === this.N_POLE && (e = -e), a = t * t + e * e, !a) + return n.x = this.long0, n.y = this.lat0, n; + h = 1 - a / this.qp, this.mode === this.S_POLE && (h = -h); + } + i = Math.atan2(t, e), s = eM(Math.asin(h), this.apa); + } + return n.x = A(this.long0 + i), n.y = s, n; +} +var YC = 0.3333333333333333, jC = 0.17222222222222222, qC = 0.10257936507936508, KC = 0.06388888888888888, JC = 0.0664021164021164, QC = 0.016415012942191543; +function tM(n) { + var t, e = []; + return e[0] = n * YC, t = n * n, e[0] += t * jC, e[1] = t * KC, t *= n, e[0] += t * qC, e[1] += t * JC, e[2] = t * QC, e; +} +function eM(n, t) { + var e = n + n; + return n + t[0] * Math.sin(e) + t[1] * Math.sin(e + e) + t[2] * Math.sin(e + e + e); +} +var iM = ["Lambert Azimuthal Equal Area", "Lambert_Azimuthal_Equal_Area", "laea"]; +const nM = { + init: WC, + forward: HC, + inverse: XC, + names: iM, + S_POLE: zC, + N_POLE: ZC, + EQUIT: VC, + OBLIQ: UC +}; +function Fi(n) { + return Math.abs(n) > 1 && (n = n > 1 ? 1 : -1), Math.asin(n); +} +function sM() { + Math.abs(this.lat1 + this.lat2) < I || (this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e3 = Math.sqrt(this.es), this.sin_po = Math.sin(this.lat1), this.cos_po = Math.cos(this.lat1), this.t1 = this.sin_po, this.con = this.sin_po, this.ms1 = We(this.e3, this.sin_po, this.cos_po), this.qs1 = Ti(this.e3, this.sin_po, this.cos_po), this.sin_po = Math.sin(this.lat2), this.cos_po = Math.cos(this.lat2), this.t2 = this.sin_po, this.ms2 = We(this.e3, this.sin_po, this.cos_po), this.qs2 = Ti(this.e3, this.sin_po, this.cos_po), this.sin_po = Math.sin(this.lat0), this.cos_po = Math.cos(this.lat0), this.t3 = this.sin_po, this.qs0 = Ti(this.e3, this.sin_po, this.cos_po), Math.abs(this.lat1 - this.lat2) > I ? this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1) : this.ns0 = this.con, this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1, this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0); +} +function rM(n) { + var t = n.x, e = n.y; + this.sin_phi = Math.sin(e), this.cos_phi = Math.cos(e); + var i = Ti(this.e3, this.sin_phi, this.cos_phi), s = this.a * Math.sqrt(this.c - this.ns0 * i) / this.ns0, r = this.ns0 * A(t - this.long0), o = s * Math.sin(r) + this.x0, a = this.rh - s * Math.cos(r) + this.y0; + return n.x = o, n.y = a, n; +} +function oM(n) { + var t, e, i, s, r, o; + return n.x -= this.x0, n.y = this.rh - n.y + this.y0, this.ns0 >= 0 ? (t = Math.sqrt(n.x * n.x + n.y * n.y), i = 1) : (t = -Math.sqrt(n.x * n.x + n.y * n.y), i = -1), s = 0, t !== 0 && (s = Math.atan2(i * n.x, i * n.y)), i = t * this.ns0 / this.a, this.sphere ? o = Math.asin((this.c - i * i) / (2 * this.ns0)) : (e = (this.c - i * i) / this.ns0, o = this.phi1z(this.e3, e)), r = A(s / this.ns0 + this.long0), n.x = r, n.y = o, n; +} +function aM(n, t) { + var e, i, s, r, o, a = Fi(0.5 * t); + if (n < I) + return a; + for (var l = n * n, h = 1; h <= 25; h++) + if (e = Math.sin(a), i = Math.cos(a), s = n * e, r = 1 - s * s, o = 0.5 * r * r / i * (t / (1 - l) - e / r + 0.5 / n * Math.log((1 - s) / (1 + s))), a = a + o, Math.abs(o) <= 1e-7) + return a; + return null; +} +var lM = ["Albers_Conic_Equal_Area", "Albers", "aea"]; +const hM = { + init: sM, + forward: rM, + inverse: oM, + names: lM, + phi1z: aM +}; +function cM() { + this.sin_p14 = Math.sin(this.lat0), this.cos_p14 = Math.cos(this.lat0), this.infinity_dist = 1e3 * this.a, this.rc = 1; +} +function uM(n) { + var t, e, i, s, r, o, a, l, h = n.x, c = n.y; + return i = A(h - this.long0), t = Math.sin(c), e = Math.cos(c), s = Math.cos(i), o = this.sin_p14 * t + this.cos_p14 * e * s, r = 1, o > 0 || Math.abs(o) <= I ? (a = this.x0 + this.a * r * e * Math.sin(i) / o, l = this.y0 + this.a * r * (this.cos_p14 * t - this.sin_p14 * e * s) / o) : (a = this.x0 + this.infinity_dist * e * Math.sin(i), l = this.y0 + this.infinity_dist * (this.cos_p14 * t - this.sin_p14 * e * s)), n.x = a, n.y = l, n; +} +function dM(n) { + var t, e, i, s, r, o; + return n.x = (n.x - this.x0) / this.a, n.y = (n.y - this.y0) / this.a, n.x /= this.k0, n.y /= this.k0, (t = Math.sqrt(n.x * n.x + n.y * n.y)) ? (s = Math.atan2(t, this.rc), e = Math.sin(s), i = Math.cos(s), o = Fi(i * this.sin_p14 + n.y * e * this.cos_p14 / t), r = Math.atan2(n.x * e, t * this.cos_p14 * i - n.y * this.sin_p14 * e), r = A(this.long0 + r)) : (o = this.phic0, r = 0), n.x = r, n.y = o, n; +} +var fM = ["gnom"]; +const gM = { + init: cM, + forward: uM, + inverse: dM, + names: fM +}; +function mM(n, t) { + var e = 1 - (1 - n * n) / (2 * n) * Math.log((1 - n) / (1 + n)); + if (Math.abs(Math.abs(t) - e) < 1e-6) + return t < 0 ? -1 * S : S; + for (var i = Math.asin(0.5 * t), s, r, o, a, l = 0; l < 30; l++) + if (r = Math.sin(i), o = Math.cos(i), a = n * r, s = Math.pow(1 - a * a, 2) / (2 * o) * (t / (1 - n * n) - r / (1 - a * a) + 0.5 / n * Math.log((1 - a) / (1 + a))), i += s, Math.abs(s) <= 1e-10) + return i; + return NaN; +} +function _M() { + this.sphere || (this.k0 = We(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts))); +} +function pM(n) { + var t = n.x, e = n.y, i, s, r = A(t - this.long0); + if (this.sphere) + i = this.x0 + this.a * r * Math.cos(this.lat_ts), s = this.y0 + this.a * Math.sin(e) / Math.cos(this.lat_ts); + else { + var o = Ti(this.e, Math.sin(e)); + i = this.x0 + this.a * this.k0 * r, s = this.y0 + this.a * o * 0.5 / this.k0; + } + return n.x = i, n.y = s, n; +} +function yM(n) { + n.x -= this.x0, n.y -= this.y0; + var t, e; + return this.sphere ? (t = A(this.long0 + n.x / this.a / Math.cos(this.lat_ts)), e = Math.asin(n.y / this.a * Math.cos(this.lat_ts))) : (e = mM(this.e, 2 * n.y * this.k0 / this.a), t = A(this.long0 + n.x / (this.a * this.k0))), n.x = t, n.y = e, n; +} +var vM = ["cea"]; +const xM = { + init: _M, + forward: pM, + inverse: yM, + names: vM +}; +function CM() { + this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.lat_ts = this.lat_ts || 0, this.title = this.title || "Equidistant Cylindrical (Plate Carre)", this.rc = Math.cos(this.lat_ts); +} +function MM(n) { + var t = n.x, e = n.y, i = A(t - this.long0), s = ls(e - this.lat0); + return n.x = this.x0 + this.a * i * this.rc, n.y = this.y0 + this.a * s, n; +} +function EM(n) { + var t = n.x, e = n.y; + return n.x = A(this.long0 + (t - this.x0) / (this.a * this.rc)), n.y = ls(this.lat0 + (e - this.y0) / this.a), n; +} +var wM = ["Equirectangular", "Equidistant_Cylindrical", "eqc"]; +const SM = { + init: CM, + forward: MM, + inverse: EM, + names: wM +}; +var Lu = 20; +function RM() { + this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = ur(this.es), this.e1 = dr(this.es), this.e2 = fr(this.es), this.e3 = gr(this.es), this.ml0 = this.a * Jt(this.e0, this.e1, this.e2, this.e3, this.lat0); +} +function TM(n) { + var t = n.x, e = n.y, i, s, r, o = A(t - this.long0); + if (r = o * Math.sin(e), this.sphere) + Math.abs(e) <= I ? (i = this.a * o, s = -1 * this.a * this.lat0) : (i = this.a * Math.sin(r) / Math.tan(e), s = this.a * (ls(e - this.lat0) + (1 - Math.cos(r)) / Math.tan(e))); + else if (Math.abs(e) <= I) + i = this.a * o, s = -1 * this.ml0; + else { + var a = ts(this.a, this.e, Math.sin(e)) / Math.tan(e); + i = a * Math.sin(r), s = this.a * Jt(this.e0, this.e1, this.e2, this.e3, e) - this.ml0 + a * (1 - Math.cos(r)); + } + return n.x = i + this.x0, n.y = s + this.y0, n; +} +function bM(n) { + var t, e, i, s, r, o, a, l, h; + if (i = n.x - this.x0, s = n.y - this.y0, this.sphere) + if (Math.abs(s + this.a * this.lat0) <= I) + t = A(i / this.a + this.long0), e = 0; + else { + o = this.lat0 + s / this.a, a = i * i / this.a / this.a + o * o, l = o; + var c; + for (r = Lu; r; --r) + if (c = Math.tan(l), h = -1 * (o * (l * c + 1) - l - 0.5 * (l * l + a) * c) / ((l - o) / c - 1), l += h, Math.abs(h) <= I) { + e = l; + break; + } + t = A(this.long0 + Math.asin(i * Math.tan(l) / this.a) / Math.sin(e)); + } + else if (Math.abs(s + this.ml0) <= I) + e = 0, t = A(this.long0 + i / this.a); + else { + o = (this.ml0 + s) / this.a, a = i * i / this.a / this.a + o * o, l = o; + var u, d, f, g, m; + for (r = Lu; r; --r) + if (m = this.e * Math.sin(l), u = Math.sqrt(1 - m * m) * Math.tan(l), d = this.a * Jt(this.e0, this.e1, this.e2, this.e3, l), f = this.e0 - 2 * this.e1 * Math.cos(2 * l) + 4 * this.e2 * Math.cos(4 * l) - 6 * this.e3 * Math.cos(6 * l), g = d / this.a, h = (o * (u * g + 1) - g - 0.5 * u * (g * g + a)) / (this.es * Math.sin(2 * l) * (g * g + a - 2 * o * g) / (4 * u) + (o - g) * (u * f - 2 / Math.sin(2 * l)) - f), l -= h, Math.abs(h) <= I) { + e = l; + break; + } + u = Math.sqrt(1 - this.es * Math.pow(Math.sin(e), 2)) * Math.tan(e), t = A(this.long0 + Math.asin(i * u / this.a) / Math.sin(e)); + } + return n.x = t, n.y = e, n; +} +var LM = ["Polyconic", "poly"]; +const IM = { + init: RM, + forward: TM, + inverse: bM, + names: LM +}; +function PM() { + this.A = [], this.A[1] = 0.6399175073, this.A[2] = -0.1358797613, this.A[3] = 0.063294409, this.A[4] = -0.02526853, this.A[5] = 0.0117879, this.A[6] = -55161e-7, this.A[7] = 26906e-7, this.A[8] = -1333e-6, this.A[9] = 67e-5, this.A[10] = -34e-5, this.B_re = [], this.B_im = [], this.B_re[1] = 0.7557853228, this.B_im[1] = 0, this.B_re[2] = 0.249204646, this.B_im[2] = 3371507e-9, this.B_re[3] = -1541739e-9, this.B_im[3] = 0.04105856, this.B_re[4] = -0.10162907, this.B_im[4] = 0.01727609, this.B_re[5] = -0.26623489, this.B_im[5] = -0.36249218, this.B_re[6] = -0.6870983, this.B_im[6] = -1.1651967, this.C_re = [], this.C_im = [], this.C_re[1] = 1.3231270439, this.C_im[1] = 0, this.C_re[2] = -0.577245789, this.C_im[2] = -7809598e-9, this.C_re[3] = 0.508307513, this.C_im[3] = -0.112208952, this.C_re[4] = -0.15094762, this.C_im[4] = 0.18200602, this.C_re[5] = 1.01418179, this.C_im[5] = 1.64497696, this.C_re[6] = 1.9660549, this.C_im[6] = 2.5127645, this.D = [], this.D[1] = 1.5627014243, this.D[2] = 0.5185406398, this.D[3] = -0.03333098, this.D[4] = -0.1052906, this.D[5] = -0.0368594, this.D[6] = 7317e-6, this.D[7] = 0.0122, this.D[8] = 394e-5, this.D[9] = -13e-4; +} +function AM(n) { + var t, e = n.x, i = n.y, s = i - this.lat0, r = e - this.long0, o = s / Is * 1e-5, a = r, l = 1, h = 0; + for (t = 1; t <= 10; t++) + l = l * o, h = h + this.A[t] * l; + var c = h, u = a, d = 1, f = 0, g, m, _ = 0, y = 0; + for (t = 1; t <= 6; t++) + g = d * c - f * u, m = f * c + d * u, d = g, f = m, _ = _ + this.B_re[t] * d - this.B_im[t] * f, y = y + this.B_im[t] * d + this.B_re[t] * f; + return n.x = y * this.a + this.x0, n.y = _ * this.a + this.y0, n; +} +function OM(n) { + var t, e = n.x, i = n.y, s = e - this.x0, r = i - this.y0, o = r / this.a, a = s / this.a, l = 1, h = 0, c, u, d = 0, f = 0; + for (t = 1; t <= 6; t++) + c = l * o - h * a, u = h * o + l * a, l = c, h = u, d = d + this.C_re[t] * l - this.C_im[t] * h, f = f + this.C_im[t] * l + this.C_re[t] * h; + for (var g = 0; g < this.iterations; g++) { + var m = d, _ = f, y, p, v = o, x = a; + for (t = 2; t <= 6; t++) + y = m * d - _ * f, p = _ * d + m * f, m = y, _ = p, v = v + (t - 1) * (this.B_re[t] * m - this.B_im[t] * _), x = x + (t - 1) * (this.B_im[t] * m + this.B_re[t] * _); + m = 1, _ = 0; + var C = this.B_re[1], E = this.B_im[1]; + for (t = 2; t <= 6; t++) + y = m * d - _ * f, p = _ * d + m * f, m = y, _ = p, C = C + t * (this.B_re[t] * m - this.B_im[t] * _), E = E + t * (this.B_im[t] * m + this.B_re[t] * _); + var R = C * C + E * E; + d = (v * C + x * E) / R, f = (x * C - v * E) / R; + } + var b = d, F = f, G = 1, V = 0; + for (t = 1; t <= 9; t++) + G = G * b, V = V + this.D[t] * G; + var L = this.lat0 + V * Is * 1e5, $ = this.long0 + F; + return n.x = $, n.y = L, n; +} +var FM = ["New_Zealand_Map_Grid", "nzmg"]; +const NM = { + init: PM, + forward: AM, + inverse: OM, + names: FM +}; +function DM() { +} +function kM(n) { + var t = n.x, e = n.y, i = A(t - this.long0), s = this.x0 + this.a * i, r = this.y0 + this.a * Math.log(Math.tan(Math.PI / 4 + e / 2.5)) * 1.25; + return n.x = s, n.y = r, n; +} +function GM(n) { + n.x -= this.x0, n.y -= this.y0; + var t = A(this.long0 + n.x / this.a), e = 2.5 * (Math.atan(Math.exp(0.8 * n.y / this.a)) - Math.PI / 4); + return n.x = t, n.y = e, n; +} +var $M = ["Miller_Cylindrical", "mill"]; +const BM = { + init: DM, + forward: kM, + inverse: GM, + names: $M +}; +var zM = 20; +function ZM() { + this.sphere ? (this.n = 1, this.m = 0, this.es = 0, this.C_y = Math.sqrt((this.m + 1) / this.n), this.C_x = this.C_y / (this.m + 1)) : this.en = ag(this.es); +} +function VM(n) { + var t, e, i = n.x, s = n.y; + if (i = A(i - this.long0), this.sphere) { + if (!this.m) + s = this.n !== 1 ? Math.asin(this.n * Math.sin(s)) : s; + else + for (var r = this.n * Math.sin(s), o = zM; o; --o) { + var a = (this.m * s + Math.sin(s) - r) / (this.m + Math.cos(s)); + if (s -= a, Math.abs(a) < I) + break; + } + t = this.a * this.C_x * i * (this.m + Math.cos(s)), e = this.a * this.C_y * s; + } else { + var l = Math.sin(s), h = Math.cos(s); + e = this.a * Ho(s, l, h, this.en), t = this.a * i * h / Math.sqrt(1 - this.es * l * l); + } + return n.x = t, n.y = e, n; +} +function UM(n) { + var t, e, i, s; + return n.x -= this.x0, i = n.x / this.a, n.y -= this.y0, t = n.y / this.a, this.sphere ? (t /= this.C_y, i = i / (this.C_x * (this.m + Math.cos(t))), this.m ? t = Fi((this.m * t + Math.sin(t)) / this.n) : this.n !== 1 && (t = Fi(Math.sin(t) / this.n)), i = A(i + this.long0), t = ls(t)) : (t = lg(n.y / this.a, this.es, this.en), s = Math.abs(t), s < S ? (s = Math.sin(t), e = this.long0 + n.x * Math.sqrt(1 - this.es * s * s) / (this.a * Math.cos(t)), i = A(e)) : s - I < S && (i = this.long0)), n.x = i, n.y = t, n; +} +var WM = ["Sinusoidal", "sinu"]; +const HM = { + init: ZM, + forward: VM, + inverse: UM, + names: WM +}; +function XM() { +} +function YM(n) { + for (var t = n.x, e = n.y, i = A(t - this.long0), s = e, r = Math.PI * Math.sin(e); ; ) { + var o = -(s + Math.sin(s) - r) / (1 + Math.cos(s)); + if (s += o, Math.abs(o) < I) + break; + } + s /= 2, Math.PI / 2 - Math.abs(e) < I && (i = 0); + var a = 0.900316316158 * this.a * i * Math.cos(s) + this.x0, l = 1.4142135623731 * this.a * Math.sin(s) + this.y0; + return n.x = a, n.y = l, n; +} +function jM(n) { + var t, e; + n.x -= this.x0, n.y -= this.y0, e = n.y / (1.4142135623731 * this.a), Math.abs(e) > 0.999999999999 && (e = 0.999999999999), t = Math.asin(e); + var i = A(this.long0 + n.x / (0.900316316158 * this.a * Math.cos(t))); + i < -Math.PI && (i = -Math.PI), i > Math.PI && (i = Math.PI), e = (2 * t + Math.sin(2 * t)) / Math.PI, Math.abs(e) > 1 && (e = 1); + var s = Math.asin(e); + return n.x = i, n.y = s, n; +} +var qM = ["Mollweide", "moll"]; +const KM = { + init: XM, + forward: YM, + inverse: jM, + names: qM +}; +function JM() { + Math.abs(this.lat1 + this.lat2) < I || (this.lat2 = this.lat2 || this.lat1, this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = ur(this.es), this.e1 = dr(this.es), this.e2 = fr(this.es), this.e3 = gr(this.es), this.sinphi = Math.sin(this.lat1), this.cosphi = Math.cos(this.lat1), this.ms1 = We(this.e, this.sinphi, this.cosphi), this.ml1 = Jt(this.e0, this.e1, this.e2, this.e3, this.lat1), Math.abs(this.lat1 - this.lat2) < I ? this.ns = this.sinphi : (this.sinphi = Math.sin(this.lat2), this.cosphi = Math.cos(this.lat2), this.ms2 = We(this.e, this.sinphi, this.cosphi), this.ml2 = Jt(this.e0, this.e1, this.e2, this.e3, this.lat2), this.ns = (this.ms1 - this.ms2) / (this.ml2 - this.ml1)), this.g = this.ml1 + this.ms1 / this.ns, this.ml0 = Jt(this.e0, this.e1, this.e2, this.e3, this.lat0), this.rh = this.a * (this.g - this.ml0)); +} +function QM(n) { + var t = n.x, e = n.y, i; + if (this.sphere) + i = this.a * (this.g - e); + else { + var s = Jt(this.e0, this.e1, this.e2, this.e3, e); + i = this.a * (this.g - s); + } + var r = this.ns * A(t - this.long0), o = this.x0 + i * Math.sin(r), a = this.y0 + this.rh - i * Math.cos(r); + return n.x = o, n.y = a, n; +} +function tE(n) { + n.x -= this.x0, n.y = this.rh - n.y + this.y0; + var t, e, i, s; + this.ns >= 0 ? (e = Math.sqrt(n.x * n.x + n.y * n.y), t = 1) : (e = -Math.sqrt(n.x * n.x + n.y * n.y), t = -1); + var r = 0; + if (e !== 0 && (r = Math.atan2(t * n.x, t * n.y)), this.sphere) + return s = A(this.long0 + r / this.ns), i = ls(this.g - e / this.a), n.x = s, n.y = i, n; + var o = this.g - e / this.a; + return i = Eo(o, this.e0, this.e1, this.e2, this.e3), s = A(this.long0 + r / this.ns), n.x = s, n.y = i, n; +} +var eE = ["Equidistant_Conic", "eqdc"]; +const iE = { + init: JM, + forward: QM, + inverse: tE, + names: eE +}; +function nE() { + this.R = this.a; +} +function sE(n) { + var t = n.x, e = n.y, i = A(t - this.long0), s, r; + Math.abs(e) <= I && (s = this.x0 + this.R * i, r = this.y0); + var o = Fi(2 * Math.abs(e / Math.PI)); + (Math.abs(i) <= I || Math.abs(Math.abs(e) - S) <= I) && (s = this.x0, e >= 0 ? r = this.y0 + Math.PI * this.R * Math.tan(0.5 * o) : r = this.y0 + Math.PI * this.R * -Math.tan(0.5 * o)); + var a = 0.5 * Math.abs(Math.PI / i - i / Math.PI), l = a * a, h = Math.sin(o), c = Math.cos(o), u = c / (h + c - 1), d = u * u, f = u * (2 / h - 1), g = f * f, m = Math.PI * this.R * (a * (u - g) + Math.sqrt(l * (u - g) * (u - g) - (g + l) * (d - g))) / (g + l); + i < 0 && (m = -m), s = this.x0 + m; + var _ = l + u; + return m = Math.PI * this.R * (f * _ - a * Math.sqrt((g + l) * (l + 1) - _ * _)) / (g + l), e >= 0 ? r = this.y0 + m : r = this.y0 - m, n.x = s, n.y = r, n; +} +function rE(n) { + var t, e, i, s, r, o, a, l, h, c, u, d, f; + return n.x -= this.x0, n.y -= this.y0, u = Math.PI * this.R, i = n.x / u, s = n.y / u, r = i * i + s * s, o = -Math.abs(s) * (1 + r), a = o - 2 * s * s + i * i, l = -2 * o + 1 + 2 * s * s + r * r, f = s * s / l + (2 * a * a * a / l / l / l - 9 * o * a / l / l) / 27, h = (o - a * a / 3 / l) / l, c = 2 * Math.sqrt(-h / 3), u = 3 * f / h / c, Math.abs(u) > 1 && (u >= 0 ? u = 1 : u = -1), d = Math.acos(u) / 3, n.y >= 0 ? e = (-c * Math.cos(d + Math.PI / 3) - a / 3 / l) * Math.PI : e = -(-c * Math.cos(d + Math.PI / 3) - a / 3 / l) * Math.PI, Math.abs(i) < I ? t = this.long0 : t = A(this.long0 + Math.PI * (r - 1 + Math.sqrt(1 + 2 * (i * i - s * s) + r * r)) / 2 / i), n.x = t, n.y = e, n; +} +var oE = ["Van_der_Grinten_I", "VanDerGrinten", "vandg"]; +const aE = { + init: nE, + forward: sE, + inverse: rE, + names: oE +}; +function lE() { + this.sin_p12 = Math.sin(this.lat0), this.cos_p12 = Math.cos(this.lat0); +} +function hE(n) { + var t = n.x, e = n.y, i = Math.sin(n.y), s = Math.cos(n.y), r = A(t - this.long0), o, a, l, h, c, u, d, f, g, m, _, y, p, v, x, C, E, R, b, F, G, V, L; + return this.sphere ? Math.abs(this.sin_p12 - 1) <= I ? (n.x = this.x0 + this.a * (S - e) * Math.sin(r), n.y = this.y0 - this.a * (S - e) * Math.cos(r), n) : Math.abs(this.sin_p12 + 1) <= I ? (n.x = this.x0 + this.a * (S + e) * Math.sin(r), n.y = this.y0 + this.a * (S + e) * Math.cos(r), n) : (R = this.sin_p12 * i + this.cos_p12 * s * Math.cos(r), C = Math.acos(R), E = C ? C / Math.sin(C) : 1, n.x = this.x0 + this.a * E * s * Math.sin(r), n.y = this.y0 + this.a * E * (this.cos_p12 * i - this.sin_p12 * s * Math.cos(r)), n) : (o = ur(this.es), a = dr(this.es), l = fr(this.es), h = gr(this.es), Math.abs(this.sin_p12 - 1) <= I ? (c = this.a * Jt(o, a, l, h, S), u = this.a * Jt(o, a, l, h, e), n.x = this.x0 + (c - u) * Math.sin(r), n.y = this.y0 - (c - u) * Math.cos(r), n) : Math.abs(this.sin_p12 + 1) <= I ? (c = this.a * Jt(o, a, l, h, S), u = this.a * Jt(o, a, l, h, e), n.x = this.x0 + (c + u) * Math.sin(r), n.y = this.y0 + (c + u) * Math.cos(r), n) : (d = i / s, f = ts(this.a, this.e, this.sin_p12), g = ts(this.a, this.e, i), m = Math.atan((1 - this.es) * d + this.es * f * this.sin_p12 / (g * s)), _ = Math.atan2(Math.sin(r), this.cos_p12 * Math.tan(m) - this.sin_p12 * Math.cos(r)), _ === 0 ? b = Math.asin(this.cos_p12 * Math.sin(m) - this.sin_p12 * Math.cos(m)) : Math.abs(Math.abs(_) - Math.PI) <= I ? b = -Math.asin(this.cos_p12 * Math.sin(m) - this.sin_p12 * Math.cos(m)) : b = Math.asin(Math.sin(r) * Math.cos(m) / Math.sin(_)), y = this.e * this.sin_p12 / Math.sqrt(1 - this.es), p = this.e * this.cos_p12 * Math.cos(_) / Math.sqrt(1 - this.es), v = y * p, x = p * p, F = b * b, G = F * b, V = G * b, L = V * b, C = f * b * (1 - F * x * (1 - x) / 6 + G / 8 * v * (1 - 2 * x) + V / 120 * (x * (4 - 7 * x) - 3 * y * y * (1 - 7 * x)) - L / 48 * v), n.x = this.x0 + C * Math.sin(_), n.y = this.y0 + C * Math.cos(_), n)); +} +function cE(n) { + n.x -= this.x0, n.y -= this.y0; + var t, e, i, s, r, o, a, l, h, c, u, d, f, g, m, _, y, p, v, x, C, E, R, b; + return this.sphere ? (t = Math.sqrt(n.x * n.x + n.y * n.y), t > 2 * S * this.a ? void 0 : (e = t / this.a, i = Math.sin(e), s = Math.cos(e), r = this.long0, Math.abs(t) <= I ? o = this.lat0 : (o = Fi(s * this.sin_p12 + n.y * i * this.cos_p12 / t), a = Math.abs(this.lat0) - S, Math.abs(a) <= I ? this.lat0 >= 0 ? r = A(this.long0 + Math.atan2(n.x, -n.y)) : r = A(this.long0 - Math.atan2(-n.x, n.y)) : r = A(this.long0 + Math.atan2(n.x * i, t * this.cos_p12 * s - n.y * this.sin_p12 * i))), n.x = r, n.y = o, n)) : (l = ur(this.es), h = dr(this.es), c = fr(this.es), u = gr(this.es), Math.abs(this.sin_p12 - 1) <= I ? (d = this.a * Jt(l, h, c, u, S), t = Math.sqrt(n.x * n.x + n.y * n.y), f = d - t, o = Eo(f / this.a, l, h, c, u), r = A(this.long0 + Math.atan2(n.x, -1 * n.y)), n.x = r, n.y = o, n) : Math.abs(this.sin_p12 + 1) <= I ? (d = this.a * Jt(l, h, c, u, S), t = Math.sqrt(n.x * n.x + n.y * n.y), f = t - d, o = Eo(f / this.a, l, h, c, u), r = A(this.long0 + Math.atan2(n.x, n.y)), n.x = r, n.y = o, n) : (t = Math.sqrt(n.x * n.x + n.y * n.y), _ = Math.atan2(n.x, n.y), g = ts(this.a, this.e, this.sin_p12), y = Math.cos(_), p = this.e * this.cos_p12 * y, v = -p * p / (1 - this.es), x = 3 * this.es * (1 - v) * this.sin_p12 * this.cos_p12 * y / (1 - this.es), C = t / g, E = C - v * (1 + v) * Math.pow(C, 3) / 6 - x * (1 + 3 * v) * Math.pow(C, 4) / 24, R = 1 - v * E * E / 2 - C * E * E * E / 6, m = Math.asin(this.sin_p12 * Math.cos(E) + this.cos_p12 * Math.sin(E) * y), r = A(this.long0 + Math.asin(Math.sin(_) * Math.sin(E) / Math.cos(m))), b = Math.sin(m), o = Math.atan2((b - this.es * R * this.sin_p12) * Math.tan(m), b * (1 - this.es)), n.x = r, n.y = o, n)); +} +var uE = ["Azimuthal_Equidistant", "aeqd"]; +const dE = { + init: lE, + forward: hE, + inverse: cE, + names: uE +}; +function fE() { + this.sin_p14 = Math.sin(this.lat0), this.cos_p14 = Math.cos(this.lat0); +} +function gE(n) { + var t, e, i, s, r, o, a, l, h = n.x, c = n.y; + return i = A(h - this.long0), t = Math.sin(c), e = Math.cos(c), s = Math.cos(i), o = this.sin_p14 * t + this.cos_p14 * e * s, r = 1, (o > 0 || Math.abs(o) <= I) && (a = this.a * r * e * Math.sin(i), l = this.y0 + this.a * r * (this.cos_p14 * t - this.sin_p14 * e * s)), n.x = a, n.y = l, n; +} +function mE(n) { + var t, e, i, s, r, o, a; + return n.x -= this.x0, n.y -= this.y0, t = Math.sqrt(n.x * n.x + n.y * n.y), e = Fi(t / this.a), i = Math.sin(e), s = Math.cos(e), o = this.long0, Math.abs(t) <= I ? (a = this.lat0, n.x = o, n.y = a, n) : (a = Fi(s * this.sin_p14 + n.y * i * this.cos_p14 / t), r = Math.abs(this.lat0) - S, Math.abs(r) <= I ? (this.lat0 >= 0 ? o = A(this.long0 + Math.atan2(n.x, -n.y)) : o = A(this.long0 - Math.atan2(-n.x, n.y)), n.x = o, n.y = a, n) : (o = A(this.long0 + Math.atan2(n.x * i, t * this.cos_p14 * s - n.y * this.sin_p14 * i)), n.x = o, n.y = a, n)); +} +var _E = ["ortho"]; +const pE = { + init: fE, + forward: gE, + inverse: mE, + names: _E +}; +var Ct = { + FRONT: 1, + RIGHT: 2, + BACK: 3, + LEFT: 4, + TOP: 5, + BOTTOM: 6 +}, ut = { + AREA_0: 1, + AREA_1: 2, + AREA_2: 3, + AREA_3: 4 +}; +function yE() { + this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.lat_ts = this.lat_ts || 0, this.title = this.title || "Quadrilateralized Spherical Cube", this.lat0 >= S - ct / 2 ? this.face = Ct.TOP : this.lat0 <= -(S - ct / 2) ? this.face = Ct.BOTTOM : Math.abs(this.long0) <= ct ? this.face = Ct.FRONT : Math.abs(this.long0) <= S + ct ? this.face = this.long0 > 0 ? Ct.RIGHT : Ct.LEFT : this.face = Ct.BACK, this.es !== 0 && (this.one_minus_f = 1 - (this.a - this.b) / this.a, this.one_minus_f_squared = this.one_minus_f * this.one_minus_f); +} +function vE(n) { + var t = { x: 0, y: 0 }, e, i, s, r, o, a, l = { value: 0 }; + if (n.x -= this.long0, this.es !== 0 ? e = Math.atan(this.one_minus_f_squared * Math.tan(n.y)) : e = n.y, i = n.x, this.face === Ct.TOP) + r = S - e, i >= ct && i <= S + ct ? (l.value = ut.AREA_0, s = i - S) : i > S + ct || i <= -(S + ct) ? (l.value = ut.AREA_1, s = i > 0 ? i - Tt : i + Tt) : i > -(S + ct) && i <= -ct ? (l.value = ut.AREA_2, s = i + S) : (l.value = ut.AREA_3, s = i); + else if (this.face === Ct.BOTTOM) + r = S + e, i >= ct && i <= S + ct ? (l.value = ut.AREA_0, s = -i + S) : i < ct && i >= -ct ? (l.value = ut.AREA_1, s = -i) : i < -ct && i >= -(S + ct) ? (l.value = ut.AREA_2, s = -i - S) : (l.value = ut.AREA_3, s = i > 0 ? -i + Tt : -i - Tt); + else { + var h, c, u, d, f, g, m; + this.face === Ct.RIGHT ? i = Zn(i, +S) : this.face === Ct.BACK ? i = Zn(i, +Tt) : this.face === Ct.LEFT && (i = Zn(i, -S)), d = Math.sin(e), f = Math.cos(e), g = Math.sin(i), m = Math.cos(i), h = f * m, c = f * g, u = d, this.face === Ct.FRONT ? (r = Math.acos(h), s = Ur(r, u, c, l)) : this.face === Ct.RIGHT ? (r = Math.acos(c), s = Ur(r, u, -h, l)) : this.face === Ct.BACK ? (r = Math.acos(-h), s = Ur(r, u, -c, l)) : this.face === Ct.LEFT ? (r = Math.acos(-c), s = Ur(r, u, h, l)) : (r = s = 0, l.value = ut.AREA_0); + } + return a = Math.atan(12 / Tt * (s + Math.acos(Math.sin(s) * Math.cos(ct)) - S)), o = Math.sqrt((1 - Math.cos(r)) / (Math.cos(a) * Math.cos(a)) / (1 - Math.cos(Math.atan(1 / Math.cos(s))))), l.value === ut.AREA_1 ? a += S : l.value === ut.AREA_2 ? a += Tt : l.value === ut.AREA_3 && (a += 1.5 * Tt), t.x = o * Math.cos(a), t.y = o * Math.sin(a), t.x = t.x * this.a + this.x0, t.y = t.y * this.a + this.y0, n.x = t.x, n.y = t.y, n; +} +function xE(n) { + var t = { lam: 0, phi: 0 }, e, i, s, r, o, a, l, h, c, u = { value: 0 }; + if (n.x = (n.x - this.x0) / this.a, n.y = (n.y - this.y0) / this.a, i = Math.atan(Math.sqrt(n.x * n.x + n.y * n.y)), e = Math.atan2(n.y, n.x), n.x >= 0 && n.x >= Math.abs(n.y) ? u.value = ut.AREA_0 : n.y >= 0 && n.y >= Math.abs(n.x) ? (u.value = ut.AREA_1, e -= S) : n.x < 0 && -n.x >= Math.abs(n.y) ? (u.value = ut.AREA_2, e = e < 0 ? e + Tt : e - Tt) : (u.value = ut.AREA_3, e += S), c = Tt / 12 * Math.tan(e), o = Math.sin(c) / (Math.cos(c) - 1 / Math.sqrt(2)), a = Math.atan(o), s = Math.cos(e), r = Math.tan(i), l = 1 - s * s * r * r * (1 - Math.cos(Math.atan(1 / Math.cos(a)))), l < -1 ? l = -1 : l > 1 && (l = 1), this.face === Ct.TOP) + h = Math.acos(l), t.phi = S - h, u.value === ut.AREA_0 ? t.lam = a + S : u.value === ut.AREA_1 ? t.lam = a < 0 ? a + Tt : a - Tt : u.value === ut.AREA_2 ? t.lam = a - S : t.lam = a; + else if (this.face === Ct.BOTTOM) + h = Math.acos(l), t.phi = h - S, u.value === ut.AREA_0 ? t.lam = -a + S : u.value === ut.AREA_1 ? t.lam = -a : u.value === ut.AREA_2 ? t.lam = -a - S : t.lam = a < 0 ? -a - Tt : -a + Tt; + else { + var d, f, g; + d = l, c = d * d, c >= 1 ? g = 0 : g = Math.sqrt(1 - c) * Math.sin(a), c += g * g, c >= 1 ? f = 0 : f = Math.sqrt(1 - c), u.value === ut.AREA_1 ? (c = f, f = -g, g = c) : u.value === ut.AREA_2 ? (f = -f, g = -g) : u.value === ut.AREA_3 && (c = f, f = g, g = -c), this.face === Ct.RIGHT ? (c = d, d = -f, f = c) : this.face === Ct.BACK ? (d = -d, f = -f) : this.face === Ct.LEFT && (c = d, d = f, f = -c), t.phi = Math.acos(-g) - S, t.lam = Math.atan2(f, d), this.face === Ct.RIGHT ? t.lam = Zn(t.lam, -S) : this.face === Ct.BACK ? t.lam = Zn(t.lam, -Tt) : this.face === Ct.LEFT && (t.lam = Zn(t.lam, +S)); + } + if (this.es !== 0) { + var m, _, y; + m = t.phi < 0 ? 1 : 0, _ = Math.tan(t.phi), y = this.b / Math.sqrt(_ * _ + this.one_minus_f_squared), t.phi = Math.atan(Math.sqrt(this.a * this.a - y * y) / (this.one_minus_f * y)), m && (t.phi = -t.phi); + } + return t.lam += this.long0, n.x = t.lam, n.y = t.phi, n; +} +function Ur(n, t, e, i) { + var s; + return n < I ? (i.value = ut.AREA_0, s = 0) : (s = Math.atan2(t, e), Math.abs(s) <= ct ? i.value = ut.AREA_0 : s > ct && s <= S + ct ? (i.value = ut.AREA_1, s -= S) : s > S + ct || s <= -(S + ct) ? (i.value = ut.AREA_2, s = s >= 0 ? s - Tt : s + Tt) : (i.value = ut.AREA_3, s += S)), s; +} +function Zn(n, t) { + var e = n + t; + return e < -Tt ? e += Hs : e > +Tt && (e -= Hs), e; +} +var CE = ["Quadrilateralized Spherical Cube", "Quadrilateralized_Spherical_Cube", "qsc"]; +const ME = { + init: yE, + forward: vE, + inverse: xE, + names: CE +}; +var cl = [ + [1, 22199e-21, -715515e-10, 31103e-10], + [0.9986, -482243e-9, -24897e-9, -13309e-10], + [0.9954, -83103e-8, -448605e-10, -986701e-12], + [0.99, -135364e-8, -59661e-9, 36777e-10], + [0.9822, -167442e-8, -449547e-11, -572411e-11], + [0.973, -214868e-8, -903571e-10, 18736e-12], + [0.96, -305085e-8, -900761e-10, 164917e-11], + [0.9427, -382792e-8, -653386e-10, -26154e-10], + [0.9216, -467746e-8, -10457e-8, 481243e-11], + [0.8962, -536223e-8, -323831e-10, -543432e-11], + [0.8679, -609363e-8, -113898e-9, 332484e-11], + [0.835, -698325e-8, -640253e-10, 934959e-12], + [0.7986, -755338e-8, -500009e-10, 935324e-12], + [0.7597, -798324e-8, -35971e-9, -227626e-11], + [0.7186, -851367e-8, -701149e-10, -86303e-10], + [0.6732, -986209e-8, -199569e-9, 191974e-10], + [0.6213, -0.010418, 883923e-10, 624051e-11], + [0.5722, -906601e-8, 182e-6, 624051e-11], + [0.5322, -677797e-8, 275608e-9, 624051e-11] +], Es = [ + [-520417e-23, 0.0124, 121431e-23, -845284e-16], + [0.062, 0.0124, -126793e-14, 422642e-15], + [0.124, 0.0124, 507171e-14, -160604e-14], + [0.186, 0.0123999, -190189e-13, 600152e-14], + [0.248, 0.0124002, 710039e-13, -224e-10], + [0.31, 0.0123992, -264997e-12, 835986e-13], + [0.372, 0.0124029, 988983e-12, -311994e-12], + [0.434, 0.0123893, -369093e-11, -435621e-12], + [0.4958, 0.0123198, -102252e-10, -345523e-12], + [0.5571, 0.0121916, -154081e-10, -582288e-12], + [0.6176, 0.0119938, -241424e-10, -525327e-12], + [0.6769, 0.011713, -320223e-10, -516405e-12], + [0.7346, 0.0113541, -397684e-10, -609052e-12], + [0.7903, 0.0109107, -489042e-10, -104739e-11], + [0.8435, 0.0103431, -64615e-9, -140374e-14], + [0.8936, 969686e-8, -64636e-9, -8547e-9], + [0.9394, 840947e-8, -192841e-9, -42106e-10], + [0.9761, 616527e-8, -256e-6, -42106e-10], + [1, 328947e-8, -319159e-9, -42106e-10] +], ug = 0.8487, dg = 1.3523, fg = Ge / 5, EE = 1 / fg, Gn = 18, wo = function(n, t) { + return n[0] + t * (n[1] + t * (n[2] + t * n[3])); +}, wE = function(n, t) { + return n[1] + t * (2 * n[2] + t * 3 * n[3]); +}; +function SE(n, t, e, i) { + for (var s = t; i; --i) { + var r = n(s); + if (s -= r, Math.abs(r) < e) + break; + } + return s; +} +function RE() { + this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.long0 = this.long0 || 0, this.es = 0, this.title = this.title || "Robinson"; +} +function TE(n) { + var t = A(n.x - this.long0), e = Math.abs(n.y), i = Math.floor(e * fg); + i < 0 ? i = 0 : i >= Gn && (i = Gn - 1), e = Ge * (e - EE * i); + var s = { + x: wo(cl[i], e) * t, + y: wo(Es[i], e) + }; + return n.y < 0 && (s.y = -s.y), s.x = s.x * this.a * ug + this.x0, s.y = s.y * this.a * dg + this.y0, s; +} +function bE(n) { + var t = { + x: (n.x - this.x0) / (this.a * ug), + y: Math.abs(n.y - this.y0) / (this.a * dg) + }; + if (t.y >= 1) + t.x /= cl[Gn][0], t.y = n.y < 0 ? -S : S; + else { + var e = Math.floor(t.y * Gn); + for (e < 0 ? e = 0 : e >= Gn && (e = Gn - 1); ; ) + if (Es[e][0] > t.y) + --e; + else if (Es[e + 1][0] <= t.y) + ++e; + else + break; + var i = Es[e], s = 5 * (t.y - i[0]) / (Es[e + 1][0] - i[0]); + s = SE(function(r) { + return (wo(i, r) - t.y) / wE(i, r); + }, s, I, 100), t.x /= wo(cl[e], s), t.y = (5 * e + s) * zt, n.y < 0 && (t.y = -t.y); + } + return t.x = A(t.x + this.long0), t; +} +var LE = ["Robinson", "robin"]; +const IE = { + init: RE, + forward: TE, + inverse: bE, + names: LE +}; +function PE() { + this.name = "geocent"; +} +function AE(n) { + var t = Jf(n, this.es, this.a); + return t; +} +function OE(n) { + var t = Qf(n, this.es, this.a, this.b); + return t; +} +var FE = ["Geocentric", "geocentric", "geocent", "Geocent"]; +const NE = { + init: PE, + forward: AE, + inverse: OE, + names: FE +}; +var Ht = { + N_POLE: 0, + S_POLE: 1, + EQUIT: 2, + OBLIQ: 3 +}, ys = { + h: { def: 1e5, num: !0 }, + azi: { def: 0, num: !0, degrees: !0 }, + tilt: { def: 0, num: !0, degrees: !0 }, + long0: { def: 0, num: !0 }, + lat0: { def: 0, num: !0 } +}; +function DE() { + if (Object.keys(ys).forEach(function(e) { + if (typeof this[e] > "u") + this[e] = ys[e].def; + else { + if (ys[e].num && isNaN(this[e])) + throw new Error("Invalid parameter value, must be numeric " + e + " = " + this[e]); + ys[e].num && (this[e] = parseFloat(this[e])); + } + ys[e].degrees && (this[e] = this[e] * zt); + }.bind(this)), Math.abs(Math.abs(this.lat0) - S) < I ? this.mode = this.lat0 < 0 ? Ht.S_POLE : Ht.N_POLE : Math.abs(this.lat0) < I ? this.mode = Ht.EQUIT : (this.mode = Ht.OBLIQ, this.sinph0 = Math.sin(this.lat0), this.cosph0 = Math.cos(this.lat0)), this.pn1 = this.h / this.a, this.pn1 <= 0 || this.pn1 > 1e10) + throw new Error("Invalid height"); + this.p = 1 + this.pn1, this.rp = 1 / this.p, this.h1 = 1 / this.pn1, this.pfact = (this.p + 1) * this.h1, this.es = 0; + var n = this.tilt, t = this.azi; + this.cg = Math.cos(t), this.sg = Math.sin(t), this.cw = Math.cos(n), this.sw = Math.sin(n); +} +function kE(n) { + n.x -= this.long0; + var t = Math.sin(n.y), e = Math.cos(n.y), i = Math.cos(n.x), s, r; + switch (this.mode) { + case Ht.OBLIQ: + r = this.sinph0 * t + this.cosph0 * e * i; + break; + case Ht.EQUIT: + r = e * i; + break; + case Ht.S_POLE: + r = -t; + break; + case Ht.N_POLE: + r = t; + break; + } + switch (r = this.pn1 / (this.p - r), s = r * e * Math.sin(n.x), this.mode) { + case Ht.OBLIQ: + r *= this.cosph0 * t - this.sinph0 * e * i; + break; + case Ht.EQUIT: + r *= t; + break; + case Ht.N_POLE: + r *= -(e * i); + break; + case Ht.S_POLE: + r *= e * i; + break; + } + var o, a; + return o = r * this.cg + s * this.sg, a = 1 / (o * this.sw * this.h1 + this.cw), s = (s * this.cg - r * this.sg) * this.cw * a, r = o * a, n.x = s * this.a, n.y = r * this.a, n; +} +function GE(n) { + n.x /= this.a, n.y /= this.a; + var t = { x: n.x, y: n.y }, e, i, s; + s = 1 / (this.pn1 - n.y * this.sw), e = this.pn1 * n.x * s, i = this.pn1 * n.y * this.cw * s, n.x = e * this.cg + i * this.sg, n.y = i * this.cg - e * this.sg; + var r = Pe(n.x, n.y); + if (Math.abs(r) < I) + t.x = 0, t.y = n.y; + else { + var o, a; + switch (a = 1 - r * r * this.pfact, a = (this.p - Math.sqrt(a)) / (this.pn1 / r + r / this.pn1), o = Math.sqrt(1 - a * a), this.mode) { + case Ht.OBLIQ: + t.y = Math.asin(o * this.sinph0 + n.y * a * this.cosph0 / r), n.y = (o - this.sinph0 * Math.sin(t.y)) * r, n.x *= a * this.cosph0; + break; + case Ht.EQUIT: + t.y = Math.asin(n.y * a / r), n.y = o * r, n.x *= a; + break; + case Ht.N_POLE: + t.y = Math.asin(o), n.y = -n.y; + break; + case Ht.S_POLE: + t.y = -Math.asin(o); + break; + } + t.x = Math.atan2(n.x, n.y); + } + return n.x = t.x + this.long0, n.y = t.y, n; +} +var $E = ["Tilted_Perspective", "tpers"]; +const BE = { + init: DE, + forward: kE, + inverse: GE, + names: $E +}; +function zE() { + if (this.flip_axis = this.sweep === "x" ? 1 : 0, this.h = Number(this.h), this.radius_g_1 = this.h / this.a, this.radius_g_1 <= 0 || this.radius_g_1 > 1e10) + throw new Error(); + if (this.radius_g = 1 + this.radius_g_1, this.C = this.radius_g * this.radius_g - 1, this.es !== 0) { + var n = 1 - this.es, t = 1 / n; + this.radius_p = Math.sqrt(n), this.radius_p2 = n, this.radius_p_inv2 = t, this.shape = "ellipse"; + } else + this.radius_p = 1, this.radius_p2 = 1, this.radius_p_inv2 = 1, this.shape = "sphere"; + this.title || (this.title = "Geostationary Satellite View"); +} +function ZE(n) { + var t = n.x, e = n.y, i, s, r, o; + if (t = t - this.long0, this.shape === "ellipse") { + e = Math.atan(this.radius_p2 * Math.tan(e)); + var a = this.radius_p / Pe(this.radius_p * Math.cos(e), Math.sin(e)); + if (s = a * Math.cos(t) * Math.cos(e), r = a * Math.sin(t) * Math.cos(e), o = a * Math.sin(e), (this.radius_g - s) * s - r * r - o * o * this.radius_p_inv2 < 0) + return n.x = Number.NaN, n.y = Number.NaN, n; + i = this.radius_g - s, this.flip_axis ? (n.x = this.radius_g_1 * Math.atan(r / Pe(o, i)), n.y = this.radius_g_1 * Math.atan(o / i)) : (n.x = this.radius_g_1 * Math.atan(r / i), n.y = this.radius_g_1 * Math.atan(o / Pe(r, i))); + } else + this.shape === "sphere" && (i = Math.cos(e), s = Math.cos(t) * i, r = Math.sin(t) * i, o = Math.sin(e), i = this.radius_g - s, this.flip_axis ? (n.x = this.radius_g_1 * Math.atan(r / Pe(o, i)), n.y = this.radius_g_1 * Math.atan(o / i)) : (n.x = this.radius_g_1 * Math.atan(r / i), n.y = this.radius_g_1 * Math.atan(o / Pe(r, i)))); + return n.x = n.x * this.a, n.y = n.y * this.a, n; +} +function VE(n) { + var t = -1, e = 0, i = 0, s, r, o, a; + if (n.x = n.x / this.a, n.y = n.y / this.a, this.shape === "ellipse") { + this.flip_axis ? (i = Math.tan(n.y / this.radius_g_1), e = Math.tan(n.x / this.radius_g_1) * Pe(1, i)) : (e = Math.tan(n.x / this.radius_g_1), i = Math.tan(n.y / this.radius_g_1) * Pe(1, e)); + var l = i / this.radius_p; + if (s = e * e + l * l + t * t, r = 2 * this.radius_g * t, o = r * r - 4 * s * this.C, o < 0) + return n.x = Number.NaN, n.y = Number.NaN, n; + a = (-r - Math.sqrt(o)) / (2 * s), t = this.radius_g + a * t, e *= a, i *= a, n.x = Math.atan2(e, t), n.y = Math.atan(i * Math.cos(n.x) / t), n.y = Math.atan(this.radius_p_inv2 * Math.tan(n.y)); + } else if (this.shape === "sphere") { + if (this.flip_axis ? (i = Math.tan(n.y / this.radius_g_1), e = Math.tan(n.x / this.radius_g_1) * Math.sqrt(1 + i * i)) : (e = Math.tan(n.x / this.radius_g_1), i = Math.tan(n.y / this.radius_g_1) * Math.sqrt(1 + e * e)), s = e * e + i * i + t * t, r = 2 * this.radius_g * t, o = r * r - 4 * s * this.C, o < 0) + return n.x = Number.NaN, n.y = Number.NaN, n; + a = (-r - Math.sqrt(o)) / (2 * s), t = this.radius_g + a * t, e *= a, i *= a, n.x = Math.atan2(e, t), n.y = Math.atan(i * Math.cos(n.x) / t); + } + return n.x = n.x + this.long0, n; +} +var UE = ["Geostationary Satellite View", "Geostationary_Satellite", "geos"]; +const WE = { + init: zE, + forward: ZE, + inverse: VE, + names: UE +}; +function HE(n) { + n.Proj.projections.add(Yr), n.Proj.projections.add(jr), n.Proj.projections.add(J3), n.Proj.projections.add(lC), n.Proj.projections.add(gC), n.Proj.projections.add(vC), n.Proj.projections.add(SC), n.Proj.projections.add(IC), n.Proj.projections.add(NC), n.Proj.projections.add(BC), n.Proj.projections.add(nM), n.Proj.projections.add(hM), n.Proj.projections.add(gM), n.Proj.projections.add(xM), n.Proj.projections.add(SM), n.Proj.projections.add(IM), n.Proj.projections.add(NM), n.Proj.projections.add(BM), n.Proj.projections.add(HM), n.Proj.projections.add(KM), n.Proj.projections.add(iE), n.Proj.projections.add(aE), n.Proj.projections.add(dE), n.Proj.projections.add(pE), n.Proj.projections.add(ME), n.Proj.projections.add(IE), n.Proj.projections.add(NE), n.Proj.projections.add(BE), n.Proj.projections.add(WE); +} +re.defaultDatum = "WGS84"; +re.Proj = Be; +re.WGS84 = new re.Proj("WGS84"); +re.Point = Qn; +re.toPoint = tg; +re.defs = qt; +re.nadgrid = t3; +re.transform = Mo; +re.mgrs = _3; +re.version = "__VERSION__"; +HE(re); +function XE(n) { + const t = Object.keys(n.defs), e = t.length; + let i, s; + for (i = 0; i < e; ++i) { + const r = t[i]; + if (!Q(r)) { + const o = n.defs(r); + let a = o.units; + !a && o.projName === "longlat" && (a = "degrees"), md( + new Rl({ + code: r, + axisOrientation: o.axis, + metersPerUnit: o.to_meter, + units: a + }) + ); + } + } + for (i = 0; i < e; ++i) { + const r = t[i], o = Q(r); + for (s = 0; s < e; ++s) { + const a = t[s], l = Q(a); + if (!dd(r, a)) + if (n.defs[r] === n.defs[a]) + Ga([o, l]); + else { + const h = n(r, a); + q0( + o, + l, + Jh(o, l, h.forward), + Jh(l, o, h.inverse) + ); + } + } + } +} +class Iu { + static setupCircles(t, e) { + let i = []; + return t.get("isSelected") ? i = [ + new Zt({ + zIndex: 1, + image: new we({ + radius: 2 * e, + stroke: new Xt({ + color: "#FFFFFF", + width: 3 + }), + fill: new Vt({ + color: "rgb(239, 68, 68, 0.75)" + }) + }) + }), + new Zt({ + zIndex: 2, + image: new we({ + radius: 0.2 * e, + stroke: new Xt({ + color: "#FFFFFF", + width: 3 + }), + fill: new Vt({ + color: "#DC2626" + }) + }) + }) + ] : i = [ + new Zt({ + zIndex: 1, + image: new we({ + radius: 2 * e, + stroke: new Xt({ + color: "#FFFFFF", + width: 1 + }), + fill: new Vt({ + color: "rgb(239, 68, 68, 0.75)" + }) + }) + }), + new Zt({ + zIndex: 2, + image: new we({ + radius: 0.2 * e, + stroke: new Xt({ + color: "#FFFFFF", + width: 1 + }), + fill: new Vt({ + color: "#DC2626" + }) + }) + }) + ], i; + } +} +class YE { + constructor(t) { + this.control = new bf(), this.store = w(); + const e = this.store.getMap(), i = new Ve(); + this.setupMapForCreation(e, i), window.addEventListener("authorize-created", () => { + this.createElement(i); + }), window.addEventListener("remove-created-icon", () => { + this.deleteElement(i); + }), window.addEventListener("recenter-selected-element", () => { + var o; + const s = this.store.getCurrentItemId(), r = (o = this.store.getSelectedFeature(s, "id")) == null ? void 0 : o.get("geom").getCoordinates(); + e.getView().setCenter(r); + }), this.addLongClickEvent(t, e), e.on("click", (s) => { + e.forEachFeatureAtPixel(s.pixel, (r) => { + var o, a; + r && ((o = r.getGeometry()) == null ? void 0 : o.getType()) === "Point" && (i.getFeatures().forEach((l) => { + l.set("isSelected", void 0); + }), this.store.setCurrentItemId(r.get("id")), (a = this.store.getSelectedFeature(r.get("id"), "id")) == null || a.set("isSelected", !0), ot.sendEvent("open-select-create-box", r.get("geom").getCoordinates()), this.control.show()); + }); + }); + } + setupMapForCreation(t, e) { + var o; + const i = this.store.getOptions(), s = ((o = i.notifications.find((a) => a.rule.type === "ZOOM_CONSTRAINT")) == null ? void 0 : o.rule.minZoom) || i.zoom, r = new Ze({ + source: e, + visible: !0 + }); + r.setStyle(function(a) { + return Iu.setupCircles(a, 1); + }), t.addLayer(r), t.getView().on("change:resolution", () => { + const a = t.getView().getZoom(), l = t.getView().getResolution(); + a && l && a > s && r.setStyle(function(h) { + return Iu.setupCircles(h, a / l); + }); + }), this.control.disable(), t.addControl(this.control); + } + createElement(t) { + if (this.store.getSelectedFeatures().length > this.store.getMaxElement()) { + this.store.removeSelectedFeature(this.store.getCurrentItemId(), "id"); + return; + } + const i = this.store.getSelectedFeature(this.store.getCurrentItemId(), "id"); + i && (this.store.getMaxElement() === 1 ? (t.getFeatures().forEach((s) => t.removeFeature(s)), this.control.hide()) : t.getFeatures().forEach((s) => { + s.get("id") !== this.store.getCurrentItemId() && s.set("isSelected", void 0); + }), t.addFeature(i), this.control.show(), ot.sendEvent("open-select-create-box", i.get("geom").getCoordinates()), this.store.setCustomDisplay(!0), this.store.setTargetBoxSize("select")), this.store.getMap().get("target").className = `${this.store.getTargetBoxSize()} ${this.store.getTheme()}`; + } + deleteElement(t) { + const e = this.store.getSelectedFeature(this.store.getCurrentItemId(), "id"); + e && (t.removeFeature(e), this.control.hide(), this.store.removeSelectedFeature(this.store.getCurrentItemId(), "id"), ot.sendEvent("rule-validation", void 0), Lf.setCustomStyleWithouInfoBox()), this.store.getMap().get("target").className = `${this.store.getTargetBoxSize()} ${this.store.getTheme()}`; + } + addLongClickEvent(t, e) { + let s, r = [0, 0]; + t.addEventListener("mousedown", (o) => { + r = [o.pageX, o.pageY], this.clearCreationTimeout(s), s = setTimeout(() => { + this.requestElementCreation(o.pageX, o.pageY, e, t); + }, 800); + }), t.addEventListener("mousemove", (o) => { + this.moveAnalyzer(r, o.pageX, o.pageY) && this.clearCreationTimeout(s); + }), t.addEventListener("mouseup", () => { + this.clearCreationTimeout(s); + }), t.addEventListener("touchstart", (o) => { + r = [o.changedTouches[0].pageX, o.changedTouches[0].pageY], this.clearCreationTimeout(s), s = setTimeout(() => { + this.requestElementCreation(o.changedTouches[0].pageX, o.changedTouches[0].pageY, e, t); + }, 800); + }), t.addEventListener("touchmove", (o) => { + this.moveAnalyzer(r, o.changedTouches[0].pageX, o.changedTouches[0].pageY) && this.clearCreationTimeout(s); + }), t.addEventListener("touchend", () => { + this.clearCreationTimeout(s); + }); + } + requestElementCreation(t, e, i, s) { + const r = i.getCoordinateFromPixel([t - s.offsetLeft, e - s.offsetTop]), o = new Se(r), a = new Ie({ + geom: o, + id: Number(`${Math.round(r[0])}${Math.round(r[1])}`), + isSelected: !0 + }); + a.setGeometryName("geom"), this.store.getMaxElement() === 1 && this.store.removeSelectedFeature(this.store.getCurrentItemId(), "id"), (this.store.getMaxElement() === -1 || this.store.getSelectedFeatures().length <= this.store.getMaxElement()) && (this.store.setCurrentItemId(a.get("id")), this.store.addSelectedFeature(a), ot.sendEvent("icon-created", void 0)); + } + moveAnalyzer(t, e, i) { + return Math.abs(e - t[0]) > 10 || Math.abs(i - t[1]) > 10; + } + clearCreationTimeout(t) { + clearTimeout(t), t = void 0; + } +} +const gg = `.search-container{left:calc(50% - 151px);position:absolute;max-width:302px;width:100%;top:var(--top-distance);z-index:-1}.search-input-container{border-radius:var(--icon-border-radius);border:1px solid var(--icon-border-color);display:flex;background-color:var(--information-box-background-color)}.search-input{width:calc(100% - 13px);height:44px;border:none;outline:none;padding:0 0 0 11px;font-size:14px;background-color:var(--information-box-background-color);color:var(--information-box-text-color)}.search-svg-container{width:29px;height:44px;margin-right:11px;display:flex;align-items:center}ul{margin-top:0;list-style-type:none;background-color:var(--information-box-background-color);padding-left:0;border-radius:var(--icon-border-radius)}ul>:first-child{border-top-right-radius:var(--icon-border-radius);border-top-left-radius:var(--icon-border-radius)}li{height:40px;border-bottom:1px solid var(--icon-border-color);padding-left:11px;font-size:12px;display:flex;align-items:center;justify-content:start;color:var(--information-box-text-color)}ul>:last-child{border-bottom-right-radius:var(--icon-border-radius);border-bottom-left-radius:var(--icon-border-radius)}li:hover,li:focus{background-color:var(--icon-border-color)}svg{width:var(--svg-icon-size);height:var(--svg-icon-size);stroke:var(--information-box-title-color)}svg:hover{stroke:var(--information-cross-hover-color)}svg>g>.icon{fill:none;stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}.cross-div{width:var(--svg-icon-size);height:var(--svg-icon-size);cursor:pointer} +`; +var jE = Object.defineProperty, qE = Object.getOwnPropertyDescriptor, gn = (n, t, e, i) => { + for (var s = i > 1 ? void 0 : i ? qE(t, e) : t, r = n.length - 1, o; r >= 0; r--) + (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); + return i && s && jE(t, e, s), s; +}; +let js = class extends kt { + constructor() { + super(), this._results = [], w().getMap().addEventListener("click", () => { + this._results = []; + }); + } + updated(n) { + if (n.has("locations")) + if (this.locations && this.locations.results && this.locations.results.length > 0) { + const t = this.locations.results.length > 5 ? 5 : this.locations.results.length; + this._results = []; + for (let e = 0; e < t; e++) { + let i = ""; + if (this.locations.results[e].attrs.origin == "address") { + if (this.locations.results[e].attrs.label.trim().startsWith("")) + continue; + i = this.locations.results[e].attrs.label.replace("", " - ").replace("", ""); + } else + this.locations.results[e].attrs.origin == "parcel" && (i = "Parcelle: " + this.locations.results[e].attrs.label.replace("", "").replace("", "").split("(CH")[0]); + this._results.push({ coordinate: [this.locations.results[e].attrs.lon, this.locations.results[e].attrs.lat], address: i }); + } + } else + this._results = []; + } + selectAddress(n, t) { + w().getMap().getView().setCenter(K0([n[0], n[1]], "EPSG:2056")), this._results = [], ot.sendEvent("address_selected", t); + } + render() { + return Lt` +
    + ${this._results.map( + (n) => Lt`
  • this.selectAddress(n.coordinate, n.address)}>${n.address}
  • ` + )} +
+ `; + } +}; +js.styles = [Mt(gg)]; +gn([ + cn({ type: Object }) +], js.prototype, "locations", 2); +gn([ + ae() +], js.prototype, "_results", 2); +js = gn([ + oe("location-list") +], js); +let es = class extends kt { + constructor() { + super(), this.results = {}, this._hasSearch = !1, window.addEventListener("address_selected", (n) => { + this.inputElement.value = n.detail, this._hasSearch = !1; + }); + } + firstUpdated() { + this.inputElement.oninput = () => { + if (this.inputElement.value.length > 1) { + this._hasSearch = !0; + const n = w().getOptions(); + let t = `${n.search.requestWithoutCustomValue}&searchText=${this.inputElement.value}`; + n.search.bboxRestiction !== "" && (t += `&bbox=${n.search.bboxRestiction}`), fetch(t).then((e) => e.json()).then((e) => { + this.results = e; + }); + } else + this._hasSearch = !1, this.results = {}; + }; + } + clear() { + this.inputElement.value = "", this.results = {}, this._hasSearch = !1; + } + render() { + return Lt`
+
+ +
+ ${Rf( + this._hasSearch ? Lt`
+ ${Ue(at.cross)} +
` : Lt`${Ue(at.search)}` + )} +
+
+ +
`; + } +}; +es.styles = [Mt(gg)]; +gn([ + Vu("#search") +], es.prototype, "inputElement", 2); +gn([ + ae() +], es.prototype, "results", 2); +gn([ + ae() +], es.prototype, "_hasSearch", 2); +es = gn([ + oe("search-location") +], es); +class KE extends Gt { + constructor() { + const t = document.createElement("search-location"); + super({ element: t }), this.div = t; + } +} +class JE { + constructor() { + const t = new Zt({ + fill: new Vt({ + color: "#ffffff00" + }), + stroke: new Xt({ + color: "#dddddd", + width: 5 + }) + }), e = new Ze({ + source: new Ve({ + url: () => w().getOptions().borderUrl, + format: new mf() + }), + zIndex: 9999, + style: t, + opacity: 0.9 + }); + e.on("change", () => { + var s, r; + const i = (s = e.getSource()) == null ? void 0 : s.getExtent(); + if (i) { + const o = w().getOptions(); + w().getMap().setView(new si({ + extent: i, + projection: "EPSG:2056", + center: o.defaultCenter, + zoom: o.zoom, + minZoom: o.minZoom, + maxZoom: o.maxZoom, + enableRotation: o.enableRotation, + constrainOnlyCenter: !0 + })); + } + w().setBorderConstraint((r = e.getSource()) == null ? void 0 : r.getExtent()), ot.sendEvent("border-contraint-enabled", void 0); + }), w().getMap().addLayer(e); + } +} +var QE = Object.defineProperty, tw = Object.getOwnPropertyDescriptor, Xo = (n, t, e, i) => { + for (var s = i > 1 ? void 0 : i ? tw(t, e) : t, r = n.length - 1, o; r >= 0; r--) + (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); + return i && s && QE(t, e, s), s; +}; +let is = class extends kt { + constructor() { + super(), this.options = {}; + } + connectedCallback() { + super.connectedCallback(); + } + setupTheme(n) { + n.darkMode ? w().setTheme("dark") : n.lightMode || window.matchMedia("(prefers-color-scheme: light)").matches ? w().setTheme("light") : window.matchMedia("(prefers-color-scheme: dark)").matches ? w().setTheme("dark") : w().setTheme("light"); + } + setupCustomDisplay(n) { + n.mode.type === "target" ? (w().setCustomDisplay(n.geolocationInformation.displayBox), this.setupTargetBoxSize(n.geolocationInformation)) : n.search.displaySearch ? (w().setTargetBoxSize("small"), w().setCustomDisplay(!0)) : (w().setTargetBoxSize("no-box"), w().setCustomDisplay(!1)); + } + setupTargetBoxSize(n) { + n.currentLocation && n.reverseLocation ? w().setTargetBoxSize("large") : n.currentLocation || n.reverseLocation ? w().setTargetBoxSize("medium") : w().setTargetBoxSize("small"); + } + firstUpdated() { + var t; + Fv.getOptions(this.options); + const n = w().getOptions(); + this.setupTheme(n), this.setupCustomDisplay(n), re.defs("EPSG:2056", "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs"), XE(re), this.view = new si({ + projection: "EPSG:2056", + center: n.defaultCenter, + zoom: n.zoom, + minZoom: n.minZoom, + maxZoom: n.maxZoom, + enableRotation: n.enableRotation + }), w().setMap(new Mm({ + target: this.mapElement, + controls: [], + layers: [], + view: this.view + })), n.enableGeolocation && (w().setGeolocation(new Rm({ + trackingOptions: { + enableHighAccuracy: !0 + }, + projection: this.view.getProjection() + })), (t = w().getGeolocation()) == null || t.setTracking(!0), new My()), n.mode.type === "target" && (w().getMap().addControl(new cx()), n.geolocationInformation.displayBox && w().getMap().addControl( + new gx() + )), n.wmts.length > 0 && new Sv(), n.displayScaleLine && w().getMap().addControl(new Q_({ units: "metric" })), n.geojson.url != "" && new Dp(), n.borderUrl !== "" && new JE(), n.mode.type === "select" && n.wfs.url != "" && new Cy(), n.enableDraw && new Np(), n.inclusionArea.url !== "" && new Nv(), n.mode.type === "create" && new YE(this.mapElement), new Pv(), rx.setupIcon(), n.search.displaySearch && n.mode.type !== "target" && w().getMap().addControl(new KE()); + } + render() { + return Lt` +
+
+ `; + } +}; +is.styles = [Mt(Rv), Mt(Tv), Mt(Vo), Mt(dh), Mt(Av), Mt(Ov)]; +Xo([ + Vu("#map") +], is.prototype, "mapElement", 2); +Xo([ + ae() +], is.prototype, "view", 2); +Xo([ + cn({ type: Object, attribute: "options" }) +], is.prototype, "options", 2); +is = Xo([ + oe("openlayers-element") +], is); +export { + is as OpenLayersElement +}; diff --git a/geocity/apps/submissions/forms.py b/geocity/apps/submissions/forms.py index 1a3ab2fbc..3462432e6 100644 --- a/geocity/apps/submissions/forms.py +++ b/geocity/apps/submissions/forms.py @@ -30,7 +30,7 @@ AdministrativeEntity, PermitDepartment, ) -from geocity.fields import AddressWidget +from geocity.fields import AddressWidget, AdvancedGeometryWidget from ..forms.models import Price from ..reports.services import generate_report_pdf_as_response @@ -1160,7 +1160,7 @@ class Meta: "ends_at": "Date de fin du chantier ou d'occupation du territoire. Si l'heure n'est pas pertinente, insérer 23:59.", } widgets = { - "geom": GeometryWidget(), + "geom": AdvancedGeometryWidget(), "comment": forms.Textarea(attrs={"rows": 2}), } diff --git a/geocity/apps/submissions/templates/advancedgeometrywidget/advancedgeometrywidget.html b/geocity/apps/submissions/templates/advancedgeometrywidget/advancedgeometrywidget.html new file mode 100644 index 000000000..499c0907f --- /dev/null +++ b/geocity/apps/submissions/templates/advancedgeometrywidget/advancedgeometrywidget.html @@ -0,0 +1,94 @@ +{% load i18n l10n %} +{% load static %} +{% load submissions_extras %} + +
+ +
+
+ +
+
+ +
+ + \ No newline at end of file diff --git a/geocity/fields.py b/geocity/fields.py index d1f56bc67..12bb567b8 100644 --- a/geocity/fields.py +++ b/geocity/fields.py @@ -75,3 +75,39 @@ def __init__(self, attrs=None, autocomplete_options=None): "data_remote_autocomplete": json.dumps(autocomplete_options), } ) + + +class AdvancedGeometryWidget(forms.TextInput): + template_name = 'advancedgeometrywidget/advancedgeometrywidget.html' + @property + def media(self): + return forms.Media( + # css={ + # "all": ( + # "customWidgets/RemoteAutocomplete/remoteautocomplete.css", + # "libs/js/jquery-ui-custom/jquery-ui.min.css", + # ) + # }, + js=( + "libs/js/advanced-geometry-edition/geocity-wc-map.js", + ), + ) + + def __init__(self, attrs=None, autocomplete_options=None): + autocomplete_options = { + "apiurl": settings.LOCATIONS_SEARCH_API, + "apiurl_detail": settings.LOCATIONS_SEARCH_API_DETAILS, + "origins": "address", + "zipcode_field": "zipcode", + "city_field": "city", + "placeholder": gettext("ex: Place Pestalozzi 2, 1400 Yverdon"), + "single_contact": True, + "single_address_field": False, + **(autocomplete_options or {}), + } + super().__init__( + { + **(attrs or {}), + "data_remote_autocomplete": json.dumps(autocomplete_options), + } + ) \ No newline at end of file From e5b4f8037f25718d12d2e18271b44761f8cffc97 Mon Sep 17 00:00:00 2001 From: Monod Olivier Date: Tue, 28 Feb 2023 17:11:07 +0100 Subject: [PATCH 02/17] remove unecessary code --- geocity/apps/submissions/forms.py | 14 ++++---- .../advancedgeometrywidget.html | 10 ++---- geocity/fields.py | 32 ++----------------- 3 files changed, 13 insertions(+), 43 deletions(-) diff --git a/geocity/apps/submissions/forms.py b/geocity/apps/submissions/forms.py index 3462432e6..32e2688f7 100644 --- a/geocity/apps/submissions/forms.py +++ b/geocity/apps/submissions/forms.py @@ -1193,13 +1193,13 @@ def __init__(self, *args, **kwargs): ): del self.fields["geom"] - else: - self.fields["geom"].widget.attrs["options"] = self.get_widget_options( - self.submission - ) - self.fields["geom"].widget.attrs["options"][ - "edit_geom" - ] = not disable_fields + # else: + # self.fields["geom"].widget.attrs["options"] = self.get_widget_options( + # self.submission + # ) + # self.fields["geom"].widget.attrs["options"][ + # "edit_geom" + # ] = not disable_fields if ( not config.ENABLE_GEOCALENDAR or self.instance.comes_from_automatic_geocoding diff --git a/geocity/apps/submissions/templates/advancedgeometrywidget/advancedgeometrywidget.html b/geocity/apps/submissions/templates/advancedgeometrywidget/advancedgeometrywidget.html index 499c0907f..e4f6c18f8 100644 --- a/geocity/apps/submissions/templates/advancedgeometrywidget/advancedgeometrywidget.html +++ b/geocity/apps/submissions/templates/advancedgeometrywidget/advancedgeometrywidget.html @@ -1,9 +1,5 @@ -{% load i18n l10n %} -{% load static %} -{% load submissions_extras %} -
- \ No newline at end of file + diff --git a/geocity/fields.py b/geocity/fields.py index 12bb567b8..b0ed65b5b 100644 --- a/geocity/fields.py +++ b/geocity/fields.py @@ -78,36 +78,10 @@ def __init__(self, attrs=None, autocomplete_options=None): class AdvancedGeometryWidget(forms.TextInput): - template_name = 'advancedgeometrywidget/advancedgeometrywidget.html' + template_name = "advancedgeometrywidget/advancedgeometrywidget.html" + @property def media(self): return forms.Media( - # css={ - # "all": ( - # "customWidgets/RemoteAutocomplete/remoteautocomplete.css", - # "libs/js/jquery-ui-custom/jquery-ui.min.css", - # ) - # }, - js=( - "libs/js/advanced-geometry-edition/geocity-wc-map.js", - ), + js=("libs/js/advanced-geometry-edition/geocity-wc-map.js",), ) - - def __init__(self, attrs=None, autocomplete_options=None): - autocomplete_options = { - "apiurl": settings.LOCATIONS_SEARCH_API, - "apiurl_detail": settings.LOCATIONS_SEARCH_API_DETAILS, - "origins": "address", - "zipcode_field": "zipcode", - "city_field": "city", - "placeholder": gettext("ex: Place Pestalozzi 2, 1400 Yverdon"), - "single_contact": True, - "single_address_field": False, - **(autocomplete_options or {}), - } - super().__init__( - { - **(attrs or {}), - "data_remote_autocomplete": json.dumps(autocomplete_options), - } - ) \ No newline at end of file From 1226577db83dfdb653b7c3ee5cdae35b5feed406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Dozot?= Date: Wed, 1 Mar 2023 14:15:41 +0100 Subject: [PATCH 03/17] Remove Media mode --- geocity/fields.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/geocity/fields.py b/geocity/fields.py index b0ed65b5b..cd36f4ce3 100644 --- a/geocity/fields.py +++ b/geocity/fields.py @@ -79,9 +79,3 @@ def __init__(self, attrs=None, autocomplete_options=None): class AdvancedGeometryWidget(forms.TextInput): template_name = "advancedgeometrywidget/advancedgeometrywidget.html" - - @property - def media(self): - return forms.Media( - js=("libs/js/advanced-geometry-edition/geocity-wc-map.js",), - ) From f87d69102696f08b679ee7111ab97a4dcce75ac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Dozot?= Date: Wed, 1 Mar 2023 14:21:44 +0100 Subject: [PATCH 04/17] Fix syntax and map problems --- .../aerial.svg | 0 .../base.svg | 0 .../geocity-wc-map.js | 19614 +++++++--------- .../advancedgeometrywidget.html | 163 +- .../submissions/submission_geo_time.html | 1 - 5 files changed, 9131 insertions(+), 10647 deletions(-) rename geocity/apps/core/static/{libs/js/advanced-geometry-edition => images}/aerial.svg (100%) rename geocity/apps/core/static/{libs/js/advanced-geometry-edition => images}/base.svg (100%) diff --git a/geocity/apps/core/static/libs/js/advanced-geometry-edition/aerial.svg b/geocity/apps/core/static/images/aerial.svg similarity index 100% rename from geocity/apps/core/static/libs/js/advanced-geometry-edition/aerial.svg rename to geocity/apps/core/static/images/aerial.svg diff --git a/geocity/apps/core/static/libs/js/advanced-geometry-edition/base.svg b/geocity/apps/core/static/images/base.svg similarity index 100% rename from geocity/apps/core/static/libs/js/advanced-geometry-edition/base.svg rename to geocity/apps/core/static/images/base.svg diff --git a/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js b/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js index 06bbd619f..1d6c5b979 100644 --- a/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js +++ b/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js @@ -3,19 +3,19 @@ * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Wr = window, ul = Wr.ShadowRoot && (Wr.ShadyCSS === void 0 || Wr.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Pu = Symbol(), Sh = /* @__PURE__ */ new WeakMap(); -class yg { - constructor(t, e, i) { - if (this._$cssResult$ = !0, i !== Pu) +const Rr = window, Za = Rr.ShadowRoot && (Rr.ShadyCSS === void 0 || Rr.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, nu = Symbol(), Jl = /* @__PURE__ */ new WeakMap(); +class Uf { + constructor(t, e, n) { + if (this._$cssResult$ = !0, n !== nu) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); this.cssText = t, this.t = e; } get styleSheet() { let t = this.o; const e = this.t; - if (ul && t === void 0) { - const i = e !== void 0 && e.length === 1; - i && (t = Sh.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && Sh.set(e, t)); + if (Za && t === void 0) { + const n = e !== void 0 && e.length === 1; + n && (t = Jl.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && Jl.set(e, t)); } return t; } @@ -23,53 +23,53 @@ class yg { return this.cssText; } } -const Mt = (n) => new yg(typeof n == "string" ? n : n + "", void 0, Pu), vg = (n, t) => { - ul ? n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => { - const i = document.createElement("style"), s = Wr.litNonce; - s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, n.appendChild(i); +const xt = (i) => new Uf(typeof i == "string" ? i : i + "", void 0, nu), Vf = (i, t) => { + Za ? i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => { + const n = document.createElement("style"), s = Rr.litNonce; + s !== void 0 && n.setAttribute("nonce", s), n.textContent = e.cssText, i.appendChild(n); }); -}, Rh = ul ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => { +}, Ql = Za ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => { let e = ""; - for (const i of t.cssRules) - e += i.cssText; - return Mt(e); -})(n) : n; + for (const n of t.cssRules) + e += n.cssText; + return xt(e); +})(i) : i; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var Jo; -const qr = window, Th = qr.trustedTypes, xg = Th ? Th.emptyScript : "", bh = qr.reactiveElementPolyfillSupport, Ta = { toAttribute(n, t) { +var Po; +const Ar = window, th = Ar.trustedTypes, Wf = th ? th.emptyScript : "", eh = Ar.reactiveElementPolyfillSupport, na = { toAttribute(i, t) { switch (t) { case Boolean: - n = n ? xg : null; + i = i ? Wf : null; break; case Object: case Array: - n = n == null ? n : JSON.stringify(n); + i = i == null ? i : JSON.stringify(i); } - return n; -}, fromAttribute(n, t) { - let e = n; + return i; +}, fromAttribute(i, t) { + let e = i; switch (t) { case Boolean: - e = n !== null; + e = i !== null; break; case Number: - e = n === null ? null : Number(n); + e = i === null ? null : Number(i); break; case Object: case Array: try { - e = JSON.parse(n); + e = JSON.parse(i); } catch { e = null; } } return e; -} }, Au = (n, t) => t !== n && (t == t || n == n), Qo = { attribute: !0, type: String, converter: Ta, reflect: !1, hasChanged: Au }; -class Sn extends HTMLElement { +} }, su = (i, t) => t !== i && (t == t || i == i), Oo = { attribute: !0, type: String, converter: na, reflect: !1, hasChanged: su }; +class dn extends HTMLElement { constructor() { super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u(); } @@ -80,27 +80,27 @@ class Sn extends HTMLElement { static get observedAttributes() { this.finalize(); const t = []; - return this.elementProperties.forEach((e, i) => { - const s = this._$Ep(i, e); - s !== void 0 && (this._$Ev.set(s, i), t.push(s)); + return this.elementProperties.forEach((e, n) => { + const s = this._$Ep(n, e); + s !== void 0 && (this._$Ev.set(s, n), t.push(s)); }), t; } - static createProperty(t, e = Qo) { + static createProperty(t, e = Oo) { if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) { - const i = typeof t == "symbol" ? Symbol() : "__" + t, s = this.getPropertyDescriptor(t, i, e); + const n = typeof t == "symbol" ? Symbol() : "__" + t, s = this.getPropertyDescriptor(t, n, e); s !== void 0 && Object.defineProperty(this.prototype, t, s); } } - static getPropertyDescriptor(t, e, i) { + static getPropertyDescriptor(t, e, n) { return { get() { return this[e]; }, set(s) { const r = this[t]; - this[e] = s, this.requestUpdate(t, r, i); + this[e] = s, this.requestUpdate(t, r, n); }, configurable: !0, enumerable: !0 }; } static getPropertyOptions(t) { - return this.elementProperties.get(t) || Qo; + return this.elementProperties.get(t) || Oo; } static finalize() { if (this.hasOwnProperty("finalized")) @@ -108,8 +108,8 @@ class Sn extends HTMLElement { this.finalized = !0; const t = Object.getPrototypeOf(this); if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) { - const e = this.properties, i = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)]; - for (const s of i) + const e = this.properties, n = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)]; + for (const s of n) this.createProperty(s, e[s]); } return this.elementStyles = this.finalizeStyles(this.styles), !0; @@ -117,24 +117,24 @@ class Sn extends HTMLElement { static finalizeStyles(t) { const e = []; if (Array.isArray(t)) { - const i = new Set(t.flat(1 / 0).reverse()); - for (const s of i) - e.unshift(Rh(s)); + const n = new Set(t.flat(1 / 0).reverse()); + for (const s of n) + e.unshift(Ql(s)); } else - t !== void 0 && e.push(Rh(t)); + t !== void 0 && e.push(Ql(t)); return e; } static _$Ep(t, e) { - const i = e.attribute; - return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0; + const n = e.attribute; + return n === !1 ? void 0 : typeof n == "string" ? n : typeof t == "string" ? t.toLowerCase() : void 0; } u() { var t; this._$E_ = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach((e) => e(this)); } addController(t) { - var e, i; - ((e = this._$ES) !== null && e !== void 0 ? e : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((i = t.hostConnected) === null || i === void 0 || i.call(t)); + var e, n; + ((e = this._$ES) !== null && e !== void 0 ? e : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((n = t.hostConnected) === null || n === void 0 || n.call(t)); } removeController(t) { var e; @@ -148,13 +148,13 @@ class Sn extends HTMLElement { createRenderRoot() { var t; const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions); - return vg(e, this.constructor.elementStyles), e; + return Vf(e, this.constructor.elementStyles), e; } connectedCallback() { var t; this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach((e) => { - var i; - return (i = e.hostConnected) === null || i === void 0 ? void 0 : i.call(e); + var n; + return (n = e.hostConnected) === null || n === void 0 ? void 0 : n.call(e); }); } enableUpdating(t) { @@ -162,32 +162,32 @@ class Sn extends HTMLElement { disconnectedCallback() { var t; (t = this._$ES) === null || t === void 0 || t.forEach((e) => { - var i; - return (i = e.hostDisconnected) === null || i === void 0 ? void 0 : i.call(e); + var n; + return (n = e.hostDisconnected) === null || n === void 0 ? void 0 : n.call(e); }); } - attributeChangedCallback(t, e, i) { - this._$AK(t, i); + attributeChangedCallback(t, e, n) { + this._$AK(t, n); } - _$EO(t, e, i = Qo) { + _$EO(t, e, n = Oo) { var s; - const r = this.constructor._$Ep(t, i); - if (r !== void 0 && i.reflect === !0) { - const o = (((s = i.converter) === null || s === void 0 ? void 0 : s.toAttribute) !== void 0 ? i.converter : Ta).toAttribute(e, i.type); + const r = this.constructor._$Ep(t, n); + if (r !== void 0 && n.reflect === !0) { + const o = (((s = n.converter) === null || s === void 0 ? void 0 : s.toAttribute) !== void 0 ? n.converter : na).toAttribute(e, n.type); this._$El = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$El = null; } } _$AK(t, e) { - var i; + var n; const s = this.constructor, r = s._$Ev.get(t); if (r !== void 0 && this._$El !== r) { - const o = s.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((i = o.converter) === null || i === void 0 ? void 0 : i.fromAttribute) !== void 0 ? o.converter : Ta; + const o = s.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) === null || n === void 0 ? void 0 : n.fromAttribute) !== void 0 ? o.converter : na; this._$El = r, this[r] = a.fromAttribute(e, o.type), this._$El = null; } } - requestUpdate(t, e, i) { + requestUpdate(t, e, n) { let s = !0; - t !== void 0 && (((i = i || this.constructor.getPropertyOptions(t)).hasChanged || Au)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, i))) : s = !1), !this.isUpdatePending && s && (this._$E_ = this._$Ej()); + t !== void 0 && (((n = n || this.constructor.getPropertyOptions(t)).hasChanged || su)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), n.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, n))) : s = !1), !this.isUpdatePending && s && (this._$E_ = this._$Ej()); } async _$Ej() { this.isUpdatePending = !0; @@ -208,24 +208,24 @@ class Sn extends HTMLElement { return; this.hasUpdated, this._$Ei && (this._$Ei.forEach((s, r) => this[r] = s), this._$Ei = void 0); let e = !1; - const i = this._$AL; + const n = this._$AL; try { - e = this.shouldUpdate(i), e ? (this.willUpdate(i), (t = this._$ES) === null || t === void 0 || t.forEach((s) => { + e = this.shouldUpdate(n), e ? (this.willUpdate(n), (t = this._$ES) === null || t === void 0 || t.forEach((s) => { var r; return (r = s.hostUpdate) === null || r === void 0 ? void 0 : r.call(s); - }), this.update(i)) : this._$Ek(); + }), this.update(n)) : this._$Ek(); } catch (s) { throw e = !1, this._$Ek(), s; } - e && this._$AE(i); + e && this._$AE(n); } willUpdate(t) { } _$AE(t) { var e; - (e = this._$ES) === null || e === void 0 || e.forEach((i) => { + (e = this._$ES) === null || e === void 0 || e.forEach((n) => { var s; - return (s = i.hostUpdated) === null || s === void 0 ? void 0 : s.call(i); + return (s = n.hostUpdated) === null || s === void 0 ? void 0 : s.call(n); }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t); } _$Ek() { @@ -241,100 +241,100 @@ class Sn extends HTMLElement { return !0; } update(t) { - this._$EC !== void 0 && (this._$EC.forEach((e, i) => this._$EO(i, this[i], e)), this._$EC = void 0), this._$Ek(); + this._$EC !== void 0 && (this._$EC.forEach((e, n) => this._$EO(n, this[n], e)), this._$EC = void 0), this._$Ek(); } updated(t) { } firstUpdated(t) { } } -Sn.finalized = !0, Sn.elementProperties = /* @__PURE__ */ new Map(), Sn.elementStyles = [], Sn.shadowRootOptions = { mode: "open" }, bh == null || bh({ ReactiveElement: Sn }), ((Jo = qr.reactiveElementVersions) !== null && Jo !== void 0 ? Jo : qr.reactiveElementVersions = []).push("1.5.0"); +dn.finalized = !0, dn.elementProperties = /* @__PURE__ */ new Map(), dn.elementStyles = [], dn.shadowRootOptions = { mode: "open" }, eh == null || eh({ ReactiveElement: dn }), ((Po = Ar.reactiveElementVersions) !== null && Po !== void 0 ? Po : Ar.reactiveElementVersions = []).push("1.5.0"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var ta; -const Kr = window, Vn = Kr.trustedTypes, Lh = Vn ? Vn.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, ni = `lit$${(Math.random() + "").slice(9)}$`, dl = "?" + ni, Cg = `<${dl}>`, Un = document, Ps = (n = "") => Un.createComment(n), As = (n) => n === null || typeof n != "object" && typeof n != "function", Ou = Array.isArray, Fu = (n) => Ou(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", fs = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ih = /-->/g, Ph = />/g, $i = RegExp(`>|[ +var No; +const Pr = window, Ln = Pr.trustedTypes, ih = Ln ? Ln.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, je = `lit$${(Math.random() + "").slice(9)}$`, Ua = "?" + je, Hf = `<${Ua}>`, Tn = document, gs = (i = "") => Tn.createComment(i), ms = (i) => i === null || typeof i != "object" && typeof i != "function", ru = Array.isArray, ou = (i) => ru(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Jn = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, nh = /-->/g, sh = />/g, Ri = RegExp(`>|[ \f\r](?:([^\\s"'>=/]+)([ \f\r]*=[ \f\r]*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`, "g"), Ah = /'/g, Oh = /"/g, Nu = /^(?:script|style|textarea|title)$/i, Mg = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), Lt = Mg(1), bi = Symbol.for("lit-noChange"), bt = Symbol.for("lit-nothing"), Fh = /* @__PURE__ */ new WeakMap(), $n = Un.createTreeWalker(Un, 129, null, !1), Du = (n, t) => { - const e = n.length - 1, i = []; - let s, r = t === 2 ? "" : "", o = fs; +\f\r"'\`<>=]|("|')|))|$)`, "g"), rh = /'/g, oh = /"/g, au = /^(?:script|style|textarea|title)$/i, Xf = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), Lt = Xf(1), yi = Symbol.for("lit-noChange"), bt = Symbol.for("lit-nothing"), ah = /* @__PURE__ */ new WeakMap(), wn = Tn.createTreeWalker(Tn, 129, null, !1), lu = (i, t) => { + const e = i.length - 1, n = []; + let s, r = t === 2 ? "" : "", o = Jn; for (let l = 0; l < e; l++) { - const h = n[l]; + const h = i[l]; let c, u, d = -1, f = 0; for (; f < h.length && (o.lastIndex = f, u = o.exec(h), u !== null); ) - f = o.lastIndex, o === fs ? u[1] === "!--" ? o = Ih : u[1] !== void 0 ? o = Ph : u[2] !== void 0 ? (Nu.test(u[2]) && (s = RegExp("" ? (o = s != null ? s : fs, d = -1) : u[1] === void 0 ? d = -2 : (d = o.lastIndex - u[2].length, c = u[1], o = u[3] === void 0 ? $i : u[3] === '"' ? Oh : Ah) : o === Oh || o === Ah ? o = $i : o === Ih || o === Ph ? o = fs : (o = $i, s = void 0); - const g = o === $i && n[l + 1].startsWith("/>") ? " " : ""; - r += o === fs ? h + Cg : d >= 0 ? (i.push(c), h.slice(0, d) + "$lit$" + h.slice(d) + ni + g) : h + ni + (d === -2 ? (i.push(void 0), l) : g); + f = o.lastIndex, o === Jn ? u[1] === "!--" ? o = nh : u[1] !== void 0 ? o = sh : u[2] !== void 0 ? (au.test(u[2]) && (s = RegExp("" ? (o = s != null ? s : Jn, d = -1) : u[1] === void 0 ? d = -2 : (d = o.lastIndex - u[2].length, c = u[1], o = u[3] === void 0 ? Ri : u[3] === '"' ? oh : rh) : o === oh || o === rh ? o = Ri : o === nh || o === sh ? o = Jn : (o = Ri, s = void 0); + const g = o === Ri && i[l + 1].startsWith("/>") ? " " : ""; + r += o === Jn ? h + Hf : d >= 0 ? (n.push(c), h.slice(0, d) + "$lit$" + h.slice(d) + je + g) : h + je + (d === -2 ? (n.push(void 0), l) : g); } - const a = r + (n[e] || "") + (t === 2 ? "" : ""); - if (!Array.isArray(n) || !n.hasOwnProperty("raw")) + const a = r + (i[e] || "") + (t === 2 ? "" : ""); + if (!Array.isArray(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array"); - return [Lh !== void 0 ? Lh.createHTML(a) : a, i]; + return [ih !== void 0 ? ih.createHTML(a) : a, n]; }; -class Os { - constructor({ strings: t, _$litType$: e }, i) { +class _s { + constructor({ strings: t, _$litType$: e }, n) { let s; this.parts = []; let r = 0, o = 0; - const a = t.length - 1, l = this.parts, [h, c] = Du(t, e); - if (this.el = Os.createElement(h, i), $n.currentNode = this.el.content, e === 2) { + const a = t.length - 1, l = this.parts, [h, c] = lu(t, e); + if (this.el = _s.createElement(h, n), wn.currentNode = this.el.content, e === 2) { const u = this.el.content, d = u.firstChild; d.remove(), u.append(...d.childNodes); } - for (; (s = $n.nextNode()) !== null && l.length < a; ) { + for (; (s = wn.nextNode()) !== null && l.length < a; ) { if (s.nodeType === 1) { if (s.hasAttributes()) { const u = []; for (const d of s.getAttributeNames()) - if (d.endsWith("$lit$") || d.startsWith(ni)) { + if (d.endsWith("$lit$") || d.startsWith(je)) { const f = c[o++]; if (u.push(d), f !== void 0) { - const g = s.getAttribute(f.toLowerCase() + "$lit$").split(ni), m = /([.?@])?(.*)/.exec(f); - l.push({ type: 1, index: r, name: m[2], strings: g, ctor: m[1] === "." ? Gu : m[1] === "?" ? $u : m[1] === "@" ? Bu : qs }); + const g = s.getAttribute(f.toLowerCase() + "$lit$").split(je), m = /([.?@])?(.*)/.exec(f); + l.push({ type: 1, index: r, name: m[2], strings: g, ctor: m[1] === "." ? cu : m[1] === "?" ? uu : m[1] === "@" ? du : Fs }); } else l.push({ type: 6, index: r }); } for (const d of u) s.removeAttribute(d); } - if (Nu.test(s.tagName)) { - const u = s.textContent.split(ni), d = u.length - 1; + if (au.test(s.tagName)) { + const u = s.textContent.split(je), d = u.length - 1; if (d > 0) { - s.textContent = Vn ? Vn.emptyScript : ""; + s.textContent = Ln ? Ln.emptyScript : ""; for (let f = 0; f < d; f++) - s.append(u[f], Ps()), $n.nextNode(), l.push({ type: 2, index: ++r }); - s.append(u[d], Ps()); + s.append(u[f], gs()), wn.nextNode(), l.push({ type: 2, index: ++r }); + s.append(u[d], gs()); } } } else if (s.nodeType === 8) - if (s.data === dl) + if (s.data === Ua) l.push({ type: 2, index: r }); else { let u = -1; - for (; (u = s.data.indexOf(ni, u + 1)) !== -1; ) - l.push({ type: 7, index: r }), u += ni.length - 1; + for (; (u = s.data.indexOf(je, u + 1)) !== -1; ) + l.push({ type: 7, index: r }), u += je.length - 1; } r++; } } static createElement(t, e) { - const i = Un.createElement("template"); - return i.innerHTML = t, i; + const n = Tn.createElement("template"); + return n.innerHTML = t, n; } } -function Qi(n, t, e = n, i) { +function zi(i, t, e = i, n) { var s, r, o, a; - if (t === bi) + if (t === yi) return t; - let l = i !== void 0 ? (s = e._$Co) === null || s === void 0 ? void 0 : s[i] : e._$Cl; - const h = As(t) ? void 0 : t._$litDirective$; - return (l == null ? void 0 : l.constructor) !== h && ((r = l == null ? void 0 : l._$AO) === null || r === void 0 || r.call(l, !1), h === void 0 ? l = void 0 : (l = new h(n), l._$AT(n, e, i)), i !== void 0 ? ((o = (a = e)._$Co) !== null && o !== void 0 ? o : a._$Co = [])[i] = l : e._$Cl = l), l !== void 0 && (t = Qi(n, l._$AS(n, t.values), l, i)), t; + let l = n !== void 0 ? (s = e._$Co) === null || s === void 0 ? void 0 : s[n] : e._$Cl; + const h = ms(t) ? void 0 : t._$litDirective$; + return (l == null ? void 0 : l.constructor) !== h && ((r = l == null ? void 0 : l._$AO) === null || r === void 0 || r.call(l, !1), h === void 0 ? l = void 0 : (l = new h(i), l._$AT(i, e, n)), n !== void 0 ? ((o = (a = e)._$Co) !== null && o !== void 0 ? o : a._$Co = [])[n] = l : e._$Cl = l), l !== void 0 && (t = zi(i, l._$AS(i, t.values), l, n)), t; } -class ku { +class hu { constructor(t, e) { this.u = [], this._$AN = void 0, this._$AD = t, this._$AM = e; } @@ -346,28 +346,28 @@ class ku { } v(t) { var e; - const { el: { content: i }, parts: s } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : Un).importNode(i, !0); - $n.currentNode = r; - let o = $n.nextNode(), a = 0, l = 0, h = s[0]; + const { el: { content: n }, parts: s } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : Tn).importNode(n, !0); + wn.currentNode = r; + let o = wn.nextNode(), a = 0, l = 0, h = s[0]; for (; h !== void 0; ) { if (a === h.index) { let c; - h.type === 2 ? c = new ns(o, o.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(o, h.name, h.strings, this, t) : h.type === 6 && (c = new zu(o, this, t)), this.u.push(c), h = s[++l]; + h.type === 2 ? c = new Zn(o, o.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(o, h.name, h.strings, this, t) : h.type === 6 && (c = new fu(o, this, t)), this.u.push(c), h = s[++l]; } - a !== (h == null ? void 0 : h.index) && (o = $n.nextNode(), a++); + a !== (h == null ? void 0 : h.index) && (o = wn.nextNode(), a++); } return r; } p(t) { let e = 0; - for (const i of this.u) - i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++; + for (const n of this.u) + n !== void 0 && (n.strings !== void 0 ? (n._$AI(t, n, e), e += n.strings.length - 2) : n._$AI(t[e])), e++; } } -class ns { - constructor(t, e, i, s) { +class Zn { + constructor(t, e, n, s) { var r; - this.type = 2, this._$AH = bt, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = s, this._$Cm = (r = s == null ? void 0 : s.isConnected) === null || r === void 0 || r; + this.type = 2, this._$AH = bt, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = n, this.options = s, this._$Cm = (r = s == null ? void 0 : s.isConnected) === null || r === void 0 || r; } get _$AU() { var t, e; @@ -385,7 +385,7 @@ class ns { return this._$AB; } _$AI(t, e = this) { - t = Qi(this, t, e), As(t) ? t === bt || t == null || t === "" ? (this._$AH !== bt && this._$AR(), this._$AH = bt) : t !== this._$AH && t !== bi && this.g(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Fu(t) ? this.k(t) : this.g(t); + t = zi(this, t, e), ms(t) ? t === bt || t == null || t === "" ? (this._$AH !== bt && this._$AR(), this._$AH = bt) : t !== this._$AH && t !== yi && this.g(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : ou(t) ? this.k(t) : this.g(t); } O(t, e = this._$AB) { return this._$AA.parentNode.insertBefore(t, e); @@ -394,33 +394,33 @@ class ns { this._$AH !== t && (this._$AR(), this._$AH = this.O(t)); } g(t) { - this._$AH !== bt && As(this._$AH) ? this._$AA.nextSibling.data = t : this.T(Un.createTextNode(t)), this._$AH = t; + this._$AH !== bt && ms(this._$AH) ? this._$AA.nextSibling.data = t : this.T(Tn.createTextNode(t)), this._$AH = t; } $(t) { var e; - const { values: i, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = Os.createElement(s.h, this.options)), s); + const { values: n, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = _s.createElement(s.h, this.options)), s); if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === r) - this._$AH.p(i); + this._$AH.p(n); else { - const o = new ku(r, this), a = o.v(this.options); - o.p(i), this.T(a), this._$AH = o; + const o = new hu(r, this), a = o.v(this.options); + o.p(n), this.T(a), this._$AH = o; } } _$AC(t) { - let e = Fh.get(t.strings); - return e === void 0 && Fh.set(t.strings, e = new Os(t)), e; + let e = ah.get(t.strings); + return e === void 0 && ah.set(t.strings, e = new _s(t)), e; } k(t) { - Ou(this._$AH) || (this._$AH = [], this._$AR()); + ru(this._$AH) || (this._$AH = [], this._$AR()); const e = this._$AH; - let i, s = 0; + let n, s = 0; for (const r of t) - s === e.length ? e.push(i = new ns(this.O(Ps()), this.O(Ps()), this, this.options)) : i = e[s], i._$AI(r), s++; - s < e.length && (this._$AR(i && i._$AB.nextSibling, s), e.length = s); + s === e.length ? e.push(n = new Zn(this.O(gs()), this.O(gs()), this, this.options)) : n = e[s], n._$AI(r), s++; + s < e.length && (this._$AR(n && n._$AB.nextSibling, s), e.length = s); } _$AR(t = this._$AA.nextSibling, e) { - var i; - for ((i = this._$AP) === null || i === void 0 || i.call(this, !1, !0, e); t && t !== this._$AB; ) { + var n; + for ((n = this._$AP) === null || n === void 0 || n.call(this, !1, !0, e); t && t !== this._$AB; ) { const s = t.nextSibling; t.remove(), t = s; } @@ -430,9 +430,9 @@ class ns { this._$AM === void 0 && (this._$Cm = t, (e = this._$AP) === null || e === void 0 || e.call(this, t)); } } -class qs { - constructor(t, e, i, s, r) { - this.type = 1, this._$AH = bt, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = bt; +class Fs { + constructor(t, e, n, s, r) { + this.type = 1, this._$AH = bt, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = r, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(new String()), this.strings = n) : this._$AH = bt; } get tagName() { return this.element.tagName; @@ -440,16 +440,16 @@ class qs { get _$AU() { return this._$AM._$AU; } - _$AI(t, e = this, i, s) { + _$AI(t, e = this, n, s) { const r = this.strings; let o = !1; if (r === void 0) - t = Qi(this, t, e, 0), o = !As(t) || t !== this._$AH && t !== bi, o && (this._$AH = t); + t = zi(this, t, e, 0), o = !ms(t) || t !== this._$AH && t !== yi, o && (this._$AH = t); else { const a = t; let l, h; for (t = r[0], l = 0; l < r.length - 1; l++) - h = Qi(this, a[i + l], e, l), h === bi && (h = this._$AH[l]), o || (o = !As(h) || h !== this._$AH[l]), h === bt ? t = bt : t !== bt && (t += (h != null ? h : "") + r[l + 1]), this._$AH[l] = h; + h = zi(this, a[n + l], e, l), h === yi && (h = this._$AH[l]), o || (o = !ms(h) || h !== this._$AH[l]), h === bt ? t = bt : t !== bt && (t += (h != null ? h : "") + r[l + 1]), this._$AH[l] = h; } o && !s && this.j(t); } @@ -457,7 +457,7 @@ class qs { t === bt ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t != null ? t : ""); } } -class Gu extends qs { +class cu extends Fs { constructor() { super(...arguments), this.type = 3; } @@ -465,72 +465,72 @@ class Gu extends qs { this.element[this.name] = t === bt ? void 0 : t; } } -const Eg = Vn ? Vn.emptyScript : ""; -class $u extends qs { +const Yf = Ln ? Ln.emptyScript : ""; +class uu extends Fs { constructor() { super(...arguments), this.type = 4; } j(t) { - t && t !== bt ? this.element.setAttribute(this.name, Eg) : this.element.removeAttribute(this.name); + t && t !== bt ? this.element.setAttribute(this.name, Yf) : this.element.removeAttribute(this.name); } } -class Bu extends qs { - constructor(t, e, i, s, r) { - super(t, e, i, s, r), this.type = 5; +class du extends Fs { + constructor(t, e, n, s, r) { + super(t, e, n, s, r), this.type = 5; } _$AI(t, e = this) { - var i; - if ((t = (i = Qi(this, t, e, 0)) !== null && i !== void 0 ? i : bt) === bi) + var n; + if ((t = (n = zi(this, t, e, 0)) !== null && n !== void 0 ? n : bt) === yi) return; const s = this._$AH, r = t === bt && s !== bt || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== bt && (s === bt || r); r && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t; } handleEvent(t) { - var e, i; - typeof this._$AH == "function" ? this._$AH.call((i = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && i !== void 0 ? i : this.element, t) : this._$AH.handleEvent(t); + var e, n; + typeof this._$AH == "function" ? this._$AH.call((n = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && n !== void 0 ? n : this.element, t) : this._$AH.handleEvent(t); } } -class zu { - constructor(t, e, i) { - this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i; +class fu { + constructor(t, e, n) { + this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = n; } get _$AU() { return this._$AM._$AU; } _$AI(t) { - Qi(this, t); + zi(this, t); } } -const wg = { P: "$lit$", A: ni, M: dl, C: 1, L: Du, R: ku, D: Fu, V: Qi, I: ns, H: qs, N: $u, U: Bu, B: Gu, F: zu }, Nh = Kr.litHtmlPolyfillSupport; -Nh == null || Nh(Os, ns), ((ta = Kr.litHtmlVersions) !== null && ta !== void 0 ? ta : Kr.litHtmlVersions = []).push("2.5.0"); -const Zu = (n, t, e) => { - var i, s; - const r = (i = e == null ? void 0 : e.renderBefore) !== null && i !== void 0 ? i : t; +const jf = { P: "$lit$", A: je, M: Ua, C: 1, L: lu, R: hu, D: ou, V: zi, I: Zn, H: Fs, N: uu, U: du, B: cu, F: fu }, lh = Pr.litHtmlPolyfillSupport; +lh == null || lh(_s, Zn), ((No = Pr.litHtmlVersions) !== null && No !== void 0 ? No : Pr.litHtmlVersions = []).push("2.5.0"); +const gu = (i, t, e) => { + var n, s; + const r = (n = e == null ? void 0 : e.renderBefore) !== null && n !== void 0 ? n : t; let o = r._$litPart$; if (o === void 0) { const a = (s = e == null ? void 0 : e.renderBefore) !== null && s !== void 0 ? s : null; - r._$litPart$ = o = new ns(t.insertBefore(Ps(), a), a, void 0, e != null ? e : {}); + r._$litPart$ = o = new Zn(t.insertBefore(gs(), a), a, void 0, e != null ? e : {}); } - return o._$AI(n), o; + return o._$AI(i), o; }; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var ea, ia; -class kt extends Sn { +var Fo, Do; +class At extends dn { constructor() { super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; } createRenderRoot() { var t, e; - const i = super.createRenderRoot(); - return (t = (e = this.renderOptions).renderBefore) !== null && t !== void 0 || (e.renderBefore = i.firstChild), i; + const n = super.createRenderRoot(); + return (t = (e = this.renderOptions).renderBefore) !== null && t !== void 0 || (e.renderBefore = n.firstChild), n; } update(t) { const e = this.render(); - this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Zu(e, this.renderRoot, this.renderOptions); + this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = gu(e, this.renderRoot, this.renderOptions); } connectedCallback() { var t; @@ -541,65 +541,65 @@ class kt extends Sn { super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1); } render() { - return bi; + return yi; } } -kt.finalized = !0, kt._$litElement$ = !0, (ea = globalThis.litElementHydrateSupport) === null || ea === void 0 || ea.call(globalThis, { LitElement: kt }); -const Dh = globalThis.litElementPolyfillSupport; -Dh == null || Dh({ LitElement: kt }); -((ia = globalThis.litElementVersions) !== null && ia !== void 0 ? ia : globalThis.litElementVersions = []).push("3.2.2"); +At.finalized = !0, At._$litElement$ = !0, (Fo = globalThis.litElementHydrateSupport) === null || Fo === void 0 || Fo.call(globalThis, { LitElement: At }); +const hh = globalThis.litElementPolyfillSupport; +hh == null || hh({ LitElement: At }); +((Do = globalThis.litElementVersions) !== null && Do !== void 0 ? Do : globalThis.litElementVersions = []).push("3.2.2"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const oe = (n) => (t) => typeof t == "function" ? ((e, i) => (customElements.define(e, i), i))(n, t) : ((e, i) => { - const { kind: s, elements: r } = i; +const Xt = (i) => (t) => typeof t == "function" ? ((e, n) => (customElements.define(e, n), n))(i, t) : ((e, n) => { + const { kind: s, elements: r } = n; return { kind: s, elements: r, finisher(o) { customElements.define(e, o); } }; -})(n, t); +})(i, t); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Sg = (n, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) { - e.createProperty(t.key, n); +const Kf = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) { + e.createProperty(t.key, i); } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() { typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this)); }, finisher(e) { - e.createProperty(t.key, n); + e.createProperty(t.key, i); } }; -function cn(n) { - return (t, e) => e !== void 0 ? ((i, s, r) => { - s.constructor.createProperty(r, i); - })(n, t, e) : Sg(n, t); +function ji(i) { + return (t, e) => e !== void 0 ? ((n, s, r) => { + s.constructor.createProperty(r, n); + })(i, t, e) : Kf(i, t); } /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -function ae(n) { - return cn({ ...n, state: !0 }); +function Yt(i) { + return ji({ ...i, state: !0 }); } /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Rg = ({ finisher: n, descriptor: t }) => (e, i) => { +const qf = ({ finisher: i, descriptor: t }) => (e, n) => { var s; - if (i === void 0) { + if (n === void 0) { const r = (s = e.originalKey) !== null && s !== void 0 ? s : e.key, o = t != null ? { kind: "method", placement: "prototype", key: r, descriptor: t(e.key) } : { ...e, key: r }; - return n != null && (o.finisher = function(a) { - n(a, r); + return i != null && (o.finisher = function(a) { + i(a, r); }), o; } { const r = e.constructor; - t !== void 0 && Object.defineProperty(e, i, t(i)), n == null || n(r, i); + t !== void 0 && Object.defineProperty(e, n, t(n)), i == null || i(r, n); } }; /** @@ -607,20 +607,20 @@ const Rg = ({ finisher: n, descriptor: t }) => (e, i) => { * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -function Vu(n, t) { - return Rg({ descriptor: (e) => { - const i = { get() { +function mu(i, t) { + return qf({ descriptor: (e) => { + const n = { get() { var s, r; - return (r = (s = this.renderRoot) === null || s === void 0 ? void 0 : s.querySelector(n)) !== null && r !== void 0 ? r : null; + return (r = (s = this.renderRoot) === null || s === void 0 ? void 0 : s.querySelector(i)) !== null && r !== void 0 ? r : null; }, enumerable: !0, configurable: !0 }; if (t) { const s = typeof e == "symbol" ? Symbol() : "__" + e; - i.get = function() { + n.get = function() { var r, o; - return this[s] === void 0 && (this[s] = (o = (r = this.renderRoot) === null || r === void 0 ? void 0 : r.querySelector(n)) !== null && o !== void 0 ? o : null), this[s]; + return this[s] === void 0 && (this[s] = (o = (r = this.renderRoot) === null || r === void 0 ? void 0 : r.querySelector(i)) !== null && o !== void 0 ? o : null), this[s]; }; } - return i; + return n; } }); } /** @@ -628,9 +628,9 @@ function Vu(n, t) { * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var na; -((na = window.HTMLSlotElement) === null || na === void 0 ? void 0 : na.prototype.assignedElements) != null; -class Tg { +var ko; +((ko = window.HTMLSlotElement) === null || ko === void 0 ? void 0 : ko.prototype.assignedElements) != null; +class Jf { constructor(t) { this.propagationStopped, this.defaultPrevented, this.type = t, this.target = null; } @@ -641,10 +641,10 @@ class Tg { this.propagationStopped = !0; } } -const Re = Tg, Wn = { +const ke = Jf, In = { PROPERTYCHANGE: "propertychange" }; -class bg { +class Qf { constructor() { this.disposed = !1; } @@ -654,132 +654,132 @@ class bg { disposeInternal() { } } -const fl = bg; -function Lg(n, t, e) { - let i, s; - e = e || tn; - let r = 0, o = n.length, a = !1; +const Va = Qf; +function t0(i, t, e) { + let n, s; + e = e || Zi; + let r = 0, o = i.length, a = !1; for (; r < o; ) - i = r + (o - r >> 1), s = +e(n[i], t), s < 0 ? r = i + 1 : (o = i, a = !s); + n = r + (o - r >> 1), s = +e(i[n], t), s < 0 ? r = n + 1 : (o = n, a = !s); return a ? r : ~r; } -function tn(n, t) { - return n > t ? 1 : n < t ? -1 : 0; +function Zi(i, t) { + return i > t ? 1 : i < t ? -1 : 0; } -function gl(n, t, e) { - const i = n.length; - if (n[0] <= t) +function Wa(i, t, e) { + const n = i.length; + if (i[0] <= t) return 0; - if (t <= n[i - 1]) - return i - 1; + if (t <= i[n - 1]) + return n - 1; { let s; if (e > 0) { - for (s = 1; s < i; ++s) - if (n[s] < t) + for (s = 1; s < n; ++s) + if (i[s] < t) return s - 1; } else if (e < 0) { - for (s = 1; s < i; ++s) - if (n[s] <= t) + for (s = 1; s < n; ++s) + if (i[s] <= t) return s; } else - for (s = 1; s < i; ++s) { - if (n[s] == t) + for (s = 1; s < n; ++s) { + if (i[s] == t) return s; - if (n[s] < t) - return typeof e == "function" ? e(t, n[s - 1], n[s]) > 0 ? s - 1 : s : n[s - 1] - t < t - n[s] ? s - 1 : s; + if (i[s] < t) + return typeof e == "function" ? e(t, i[s - 1], i[s]) > 0 ? s - 1 : s : i[s - 1] - t < t - i[s] ? s - 1 : s; } - return i - 1; + return n - 1; } } -function Ig(n, t, e) { +function e0(i, t, e) { for (; t < e; ) { - const i = n[t]; - n[t] = n[e], n[e] = i, ++t, --e; + const n = i[t]; + i[t] = i[e], i[e] = n, ++t, --e; } } -function Qt(n, t) { - const e = Array.isArray(t) ? t : [t], i = e.length; - for (let s = 0; s < i; s++) - n[n.length] = e[s]; +function Ht(i, t) { + const e = Array.isArray(t) ? t : [t], n = e.length; + for (let s = 0; s < n; s++) + i[i.length] = e[s]; } -function Ni(n, t) { - const e = n.length; +function Ki(i, t) { + const e = i.length; if (e !== t.length) return !1; - for (let i = 0; i < e; i++) - if (n[i] !== t[i]) + for (let n = 0; n < e; n++) + if (i[n] !== t[n]) return !1; return !0; } -function Pg(n, t, e) { - const i = t || tn; - return n.every(function(s, r) { +function i0(i, t, e) { + const n = t || Zi; + return i.every(function(s, r) { if (r === 0) return !0; - const o = i(n[r - 1], s); + const o = n(i[r - 1], s); return !(o > 0 || e && o === 0); }); } -function en() { +function ps() { return !0; } -function un() { +function no() { return !1; } -function nn() { +function Ui() { } -function Ag(n) { - let t = !1, e, i, s; +function n0(i) { + let t = !1, e, n, s; return function() { const r = Array.prototype.slice.call(arguments); - return (!t || this !== s || !Ni(r, i)) && (t = !0, s = this, i = r, e = n.apply(this, arguments)), e; + return (!t || this !== s || !Ki(r, n)) && (t = !0, s = this, n = r, e = i.apply(this, arguments)), e; }; } -function Ks(n) { - for (const t in n) - delete n[t]; +function Ds(i) { + for (const t in i) + delete i[t]; } -function Hn(n) { +function An(i) { let t; - for (t in n) + for (t in i) return !1; return !t; } -class Og extends fl { +class s0 extends Va { constructor(t) { super(), this.eventTarget_ = t, this.pendingRemovals_ = null, this.dispatching_ = null, this.listeners_ = null; } addEventListener(t, e) { if (!t || !e) return; - const i = this.listeners_ || (this.listeners_ = {}), s = i[t] || (i[t] = []); + const n = this.listeners_ || (this.listeners_ = {}), s = n[t] || (n[t] = []); s.includes(e) || s.push(e); } dispatchEvent(t) { - const e = typeof t == "string", i = e ? t : t.type, s = this.listeners_ && this.listeners_[i]; + const e = typeof t == "string", n = e ? t : t.type, s = this.listeners_ && this.listeners_[n]; if (!s) return; - const r = e ? new Re(t) : t; + const r = e ? new ke(t) : t; r.target || (r.target = this.eventTarget_ || this); const o = this.dispatching_ || (this.dispatching_ = {}), a = this.pendingRemovals_ || (this.pendingRemovals_ = {}); - i in o || (o[i] = 0, a[i] = 0), ++o[i]; + n in o || (o[n] = 0, a[n] = 0), ++o[n]; let l; for (let h = 0, c = s.length; h < c; ++h) if ("handleEvent" in s[h] ? l = s[h].handleEvent(r) : l = s[h].call(this, r), l === !1 || r.propagationStopped) { l = !1; break; } - if (--o[i] === 0) { - let h = a[i]; - for (delete a[i]; h--; ) - this.removeEventListener(i, nn); - delete o[i]; + if (--o[n] === 0) { + let h = a[n]; + for (delete a[n]; h--; ) + this.removeEventListener(n, Ui); + delete o[n]; } return l; } disposeInternal() { - this.listeners_ && Ks(this.listeners_); + this.listeners_ && Ds(this.listeners_); } getListeners(t) { return this.listeners_ && this.listeners_[t] || void 0; @@ -788,14 +788,14 @@ class Og extends fl { return this.listeners_ ? t ? t in this.listeners_ : Object.keys(this.listeners_).length > 0 : !1; } removeEventListener(t, e) { - const i = this.listeners_ && this.listeners_[t]; - if (i) { - const s = i.indexOf(e); - s !== -1 && (this.pendingRemovals_ && t in this.pendingRemovals_ ? (i[s] = nn, ++this.pendingRemovals_[t]) : (i.splice(s, 1), i.length === 0 && delete this.listeners_[t])); + const n = this.listeners_ && this.listeners_[t]; + if (n) { + const s = n.indexOf(e); + s !== -1 && (this.pendingRemovals_ && t in this.pendingRemovals_ ? (n[s] = Ui, ++this.pendingRemovals_[t]) : (n.splice(s, 1), n.length === 0 && delete this.listeners_[t])); } } } -const So = Og, U = { +const so = s0, X = { CHANGE: "change", ERROR: "error", BLUR: "blur", @@ -814,60 +814,60 @@ const So = Og, U = { TOUCHMOVE: "touchmove", WHEEL: "wheel" }; -function et(n, t, e, i, s) { - if (i && i !== n && (e = e.bind(i)), s) { +function it(i, t, e, n, s) { + if (n && n !== i && (e = e.bind(n)), s) { const o = e; e = function() { - n.removeEventListener(t, e), o.apply(this, arguments); + i.removeEventListener(t, e), o.apply(this, arguments); }; } const r = { - target: n, + target: i, type: t, listener: e }; - return n.addEventListener(t, e), r; + return i.addEventListener(t, e), r; } -function Jr(n, t, e, i) { - return et(n, t, e, i, !0); +function Or(i, t, e, n) { + return it(i, t, e, n, !0); } -function mt(n) { - n && n.target && (n.target.removeEventListener(n.type, n.listener), Ks(n)); +function pt(i) { + i && i.target && (i.target.removeEventListener(i.type, i.listener), Ds(i)); } -class Ro extends So { +class ro extends so { constructor() { super(), this.on = this.onInternal, this.once = this.onceInternal, this.un = this.unInternal, this.revision_ = 0; } changed() { - ++this.revision_, this.dispatchEvent(U.CHANGE); + ++this.revision_, this.dispatchEvent(X.CHANGE); } getRevision() { return this.revision_; } onInternal(t, e) { if (Array.isArray(t)) { - const i = t.length, s = new Array(i); - for (let r = 0; r < i; ++r) - s[r] = et(this, t[r], e); + const n = t.length, s = new Array(n); + for (let r = 0; r < n; ++r) + s[r] = it(this, t[r], e); return s; } else - return et(this, t, e); + return it(this, t, e); } onceInternal(t, e) { - let i; + let n; if (Array.isArray(t)) { const s = t.length; - i = new Array(s); + n = new Array(s); for (let r = 0; r < s; ++r) - i[r] = Jr(this, t[r], e); + n[r] = Or(this, t[r], e); } else - i = Jr(this, t, e); - return e.ol_key = i, i; + n = Or(this, t, e); + return e.ol_key = n, n; } unInternal(t, e) { - const i = e.ol_key; - if (i) - Fg(i); + const n = e.ol_key; + if (n) + r0(n); else if (Array.isArray(t)) for (let s = 0, r = t.length; s < r; ++s) this.removeEventListener(t[s], e); @@ -875,32 +875,32 @@ class Ro extends So { this.removeEventListener(t, e); } } -Ro.prototype.on; -Ro.prototype.once; -Ro.prototype.un; -function Fg(n) { - if (Array.isArray(n)) - for (let t = 0, e = n.length; t < e; ++t) - mt(n[t]); +ro.prototype.on; +ro.prototype.once; +ro.prototype.un; +function r0(i) { + if (Array.isArray(i)) + for (let t = 0, e = i.length; t < e; ++t) + pt(i[t]); else - mt(n); + pt(i); } -const Uu = Ro; -function H() { +const _u = ro; +function W() { throw new Error("Unimplemented abstract method."); } -let Ng = 0; -function q(n) { - return n.ol_uid || (n.ol_uid = String(++Ng)); +let o0 = 0; +function rt(i) { + return i.ol_uid || (i.ol_uid = String(++o0)); } -class kh extends Re { - constructor(t, e, i) { - super(t), this.key = e, this.oldValue = i; +class ch extends ke { + constructor(t, e, n) { + super(t), this.key = e, this.oldValue = n; } } -class Dg extends Uu { +class a0 extends _u { constructor(t) { - super(), this.on, this.once, this.un, q(this), this.values_ = null, t !== void 0 && this.setProperties(t); + super(), this.on, this.once, this.un, rt(this), this.values_ = null, t !== void 0 && this.setProperties(t); } get(t) { let e; @@ -916,8 +916,8 @@ class Dg extends Uu { return !!this.values_; } notify(t, e) { - let i; - i = `change:${t}`, this.hasListener(i) && this.dispatchEvent(new kh(i, t, e)), i = Wn.PROPERTYCHANGE, this.hasListener(i) && this.dispatchEvent(new kh(i, t, e)); + let n; + n = `change:${t}`, this.hasListener(n) && this.dispatchEvent(new ch(n, t, e)), n = In.PROPERTYCHANGE, this.hasListener(n) && this.dispatchEvent(new ch(n, t, e)); } addChangeListener(t, e) { this.addEventListener(`change:${t}`, e); @@ -925,9 +925,9 @@ class Dg extends Uu { removeChangeListener(t, e) { this.removeEventListener(`change:${t}`, e); } - set(t, e, i) { + set(t, e, n) { const s = this.values_ || (this.values_ = {}); - if (i) + if (n) s[t] = e; else { const r = s[t]; @@ -935,20 +935,20 @@ class Dg extends Uu { } } setProperties(t, e) { - for (const i in t) - this.set(i, t[i], e); + for (const n in t) + this.set(n, t[n], e); } applyProperties(t) { !t.values_ || Object.assign(this.values_ || (this.values_ = {}), t.values_); } unset(t, e) { if (this.values_ && t in this.values_) { - const i = this.values_[t]; - delete this.values_[t], Hn(this.values_) && (this.values_ = null), e || this.notify(t, i); + const n = this.values_[t]; + delete this.values_[t], An(this.values_) && (this.values_ = null), e || this.notify(t, n); } } } -const Oe = Dg, kg = { +const Se = a0, l0 = { 1: "The view center is not defined", 2: "The view resolution is not defined", 3: "The view rotation is not defined", @@ -1006,28 +1006,28 @@ const Oe = Dg, kg = { 67: "A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both", 68: "A VectorTile source can only be rendered if it has a projection compatible with the view projection" }; -class Gg extends Error { +class h0 extends Error { constructor(t) { - const e = kg[t]; + const e = l0[t]; super(e), this.code = t, this.name = "AssertionError", this.message = e; } } -const Wu = Gg, Dt = { +const pu = h0, Jt = { ADD: "add", REMOVE: "remove" -}, Gh = { +}, uh = { LENGTH: "length" }; -class Er extends Re { - constructor(t, e, i) { - super(t), this.element = e, this.index = i; +class hr extends ke { + constructor(t, e, n) { + super(t), this.element = e, this.index = n; } } -class $g extends Oe { +class c0 extends Se { constructor(t, e) { if (super(), this.on, this.once, this.un, e = e || {}, this.unique_ = !!e.unique, this.array_ = t || [], this.unique_) - for (let i = 0, s = this.array_.length; i < s; ++i) - this.assertUnique_(this.array_[i], i); + for (let n = 0, s = this.array_.length; n < s; ++n) + this.assertUnique_(this.array_[n], n); this.updateLength_(); } clear() { @@ -1035,14 +1035,14 @@ class $g extends Oe { this.pop(); } extend(t) { - for (let e = 0, i = t.length; e < i; ++e) + for (let e = 0, n = t.length; e < n; ++e) this.push(t[e]); return this; } forEach(t) { const e = this.array_; - for (let i = 0, s = e.length; i < s; ++i) - t(e[i], i, e); + for (let n = 0, s = e.length; n < s; ++n) + t(e[n], n, e); } getArray() { return this.array_; @@ -1051,13 +1051,13 @@ class $g extends Oe { return this.array_[t]; } getLength() { - return this.get(Gh.LENGTH); + return this.get(uh.LENGTH); } insertAt(t, e) { if (t < 0 || t > this.getLength()) throw new Error("Index out of bounds: " + t); this.unique_ && this.assertUnique_(e), this.array_.splice(t, 0, e), this.updateLength_(), this.dispatchEvent( - new Er(Dt.ADD, e, t) + new hr(Jt.ADD, e, t) ); } pop() { @@ -1070,21 +1070,21 @@ class $g extends Oe { } remove(t) { const e = this.array_; - for (let i = 0, s = e.length; i < s; ++i) - if (e[i] === t) - return this.removeAt(i); + for (let n = 0, s = e.length; n < s; ++n) + if (e[n] === t) + return this.removeAt(n); } removeAt(t) { if (t < 0 || t >= this.getLength()) return; const e = this.array_[t]; return this.array_.splice(t, 1), this.updateLength_(), this.dispatchEvent( - new Er(Dt.REMOVE, e, t) + new hr(Jt.REMOVE, e, t) ), e; } setAt(t, e) { - const i = this.getLength(); - if (t >= i) { + const n = this.getLength(); + if (t >= n) { this.insertAt(t, e); return; } @@ -1093,78 +1093,78 @@ class $g extends Oe { this.unique_ && this.assertUnique_(e, t); const s = this.array_[t]; this.array_[t] = e, this.dispatchEvent( - new Er(Dt.REMOVE, s, t) + new hr(Jt.REMOVE, s, t) ), this.dispatchEvent( - new Er(Dt.ADD, e, t) + new hr(Jt.ADD, e, t) ); } updateLength_() { - this.set(Gh.LENGTH, this.array_.length); + this.set(uh.LENGTH, this.array_.length); } assertUnique_(t, e) { - for (let i = 0, s = this.array_.length; i < s; ++i) - if (this.array_[i] === t && i !== e) - throw new Wu(58); + for (let n = 0, s = this.array_.length; n < s; ++n) + if (this.array_[n] === t && n !== e) + throw new pu(58); } } -const Ee = $g, Li = typeof navigator < "u" && typeof navigator.userAgent < "u" ? navigator.userAgent.toLowerCase() : "", Bg = Li.includes("firefox"), zg = Li.includes("safari") && !Li.includes("chrom"); -zg && (Li.includes("version/15.4") || /cpu (os|iphone os) 15_4 like mac os x/.test(Li)); -const Zg = Li.includes("webkit") && !Li.includes("edge"), Vg = Li.includes("macintosh"), Hu = typeof devicePixelRatio < "u" ? devicePixelRatio : 1, ml = typeof WorkerGlobalScope < "u" && typeof OffscreenCanvas < "u" && self instanceof WorkerGlobalScope, Ug = typeof Image < "u" && Image.prototype.decode, Xu = function() { - let n = !1; +const Te = c0, vi = typeof navigator < "u" && typeof navigator.userAgent < "u" ? navigator.userAgent.toLowerCase() : "", u0 = vi.includes("firefox"), d0 = vi.includes("safari") && !vi.includes("chrom"); +d0 && (vi.includes("version/15.4") || /cpu (os|iphone os) 15_4 like mac os x/.test(vi)); +const f0 = vi.includes("webkit") && !vi.includes("edge"), g0 = vi.includes("macintosh"), yu = typeof devicePixelRatio < "u" ? devicePixelRatio : 1, Ha = typeof WorkerGlobalScope < "u" && typeof OffscreenCanvas < "u" && self instanceof WorkerGlobalScope, m0 = typeof Image < "u" && Image.prototype.decode, vu = function() { + let i = !1; try { const t = Object.defineProperty({}, "passive", { get: function() { - n = !0; + i = !0; } }); window.addEventListener("_", null, t), window.removeEventListener("_", null, t); } catch { } - return n; + return i; }(); -function Y(n, t) { - if (!n) - throw new Wu(t); +function Y(i, t) { + if (!i) + throw new pu(t); } new Array(6); -function $e() { +function Pe() { return [1, 0, 0, 1, 0, 0]; } -function Wg(n, t, e, i, s, r, o) { - return n[0] = t, n[1] = e, n[2] = i, n[3] = s, n[4] = r, n[5] = o, n; +function _0(i, t, e, n, s, r, o) { + return i[0] = t, i[1] = e, i[2] = n, i[3] = s, i[4] = r, i[5] = o, i; } -function Hg(n, t) { - return n[0] = t[0], n[1] = t[1], n[2] = t[2], n[3] = t[3], n[4] = t[4], n[5] = t[5], n; +function p0(i, t) { + return i[0] = t[0], i[1] = t[1], i[2] = t[2], i[3] = t[3], i[4] = t[4], i[5] = t[5], i; } -function Nt(n, t) { - const e = t[0], i = t[1]; - return t[0] = n[0] * e + n[2] * i + n[4], t[1] = n[1] * e + n[3] * i + n[5], t; +function Ft(i, t) { + const e = t[0], n = t[1]; + return t[0] = i[0] * e + i[2] * n + i[4], t[1] = i[1] * e + i[3] * n + i[5], t; } -function Xg(n, t, e) { - return Wg(n, t, 0, 0, e, 0, 0); +function y0(i, t, e) { + return _0(i, t, 0, 0, e, 0, 0); } -function Ii(n, t, e, i, s, r, o, a) { +function xi(i, t, e, n, s, r, o, a) { const l = Math.sin(r), h = Math.cos(r); - return n[0] = i * h, n[1] = s * l, n[2] = -i * l, n[3] = s * h, n[4] = o * i * h - a * i * l + t, n[5] = o * s * l + a * s * h + e, n; + return i[0] = n * h, i[1] = s * l, i[2] = -n * l, i[3] = s * h, i[4] = o * n * h - a * n * l + t, i[5] = o * s * l + a * s * h + e, i; } -function _l(n, t) { - const e = Yg(t); +function Xa(i, t) { + const e = v0(t); Y(e !== 0, 32); - const i = t[0], s = t[1], r = t[2], o = t[3], a = t[4], l = t[5]; - return n[0] = o / e, n[1] = -s / e, n[2] = -r / e, n[3] = i / e, n[4] = (r * l - o * a) / e, n[5] = -(i * l - s * a) / e, n; + const n = t[0], s = t[1], r = t[2], o = t[3], a = t[4], l = t[5]; + return i[0] = o / e, i[1] = -s / e, i[2] = -r / e, i[3] = n / e, i[4] = (r * l - o * a) / e, i[5] = -(n * l - s * a) / e, i; } -function Yg(n) { - return n[0] * n[3] - n[1] * n[2]; +function v0(i) { + return i[0] * i[3] - i[1] * i[2]; } -let $h; -function Yu(n) { - const t = "matrix(" + n.join(", ") + ")"; - if (ml) +let dh; +function xu(i) { + const t = "matrix(" + i.join(", ") + ")"; + if (Ha) return t; - const e = $h || ($h = document.createElement("div")); + const e = dh || (dh = document.createElement("div")); return e.style.transform = t, e.style.transform; } -const Ft = { +const Nt = { UNKNOWN: 0, INTERSECTING: 1, ABOVE: 2, @@ -1172,108 +1172,108 @@ const Ft = { BELOW: 8, LEFT: 16 }; -function Ut(n) { - const t = se(); - for (let e = 0, i = n.length; e < i; ++e) - Ss(t, n[e]); +function sa(i) { + const t = ue(); + for (let e = 0, n = i.length; e < n; ++e) + hs(t, i[e]); return t; } -function jg(n, t, e) { - const i = Math.min.apply(null, n), s = Math.min.apply(null, t), r = Math.max.apply(null, n), o = Math.max.apply(null, t); - return _e(i, s, r, o, e); +function x0(i, t, e) { + const n = Math.min.apply(null, i), s = Math.min.apply(null, t), r = Math.max.apply(null, i), o = Math.max.apply(null, t); + return ye(n, s, r, o, e); } -function Js(n, t, e) { - return e ? (e[0] = n[0] - t, e[1] = n[1] - t, e[2] = n[2] + t, e[3] = n[3] + t, e) : [ - n[0] - t, - n[1] - t, - n[2] + t, - n[3] + t +function oo(i, t, e) { + return e ? (e[0] = i[0] - t, e[1] = i[1] - t, e[2] = i[2] + t, e[3] = i[3] + t, e) : [ + i[0] - t, + i[1] - t, + i[2] + t, + i[3] + t ]; } -function ju(n, t) { - return t ? (t[0] = n[0], t[1] = n[1], t[2] = n[2], t[3] = n[3], t) : n.slice(); +function Mu(i, t) { + return t ? (t[0] = i[0], t[1] = i[1], t[2] = i[2], t[3] = i[3], t) : i.slice(); } -function dn(n, t, e) { - let i, s; - return t < n[0] ? i = n[0] - t : n[2] < t ? i = t - n[2] : i = 0, e < n[1] ? s = n[1] - e : n[3] < e ? s = e - n[3] : s = 0, i * i + s * s; +function qi(i, t, e) { + let n, s; + return t < i[0] ? n = i[0] - t : i[2] < t ? n = t - i[2] : n = 0, e < i[1] ? s = i[1] - e : i[3] < e ? s = e - i[3] : s = 0, n * n + s * s; } -function To(n, t) { - return pl(n, t[0], t[1]); +function ao(i, t) { + return Ya(i, t[0], t[1]); } -function Vi(n, t) { - return n[0] <= t[0] && t[2] <= n[2] && n[1] <= t[1] && t[3] <= n[3]; +function Ii(i, t) { + return i[0] <= t[0] && t[2] <= i[2] && i[1] <= t[1] && t[3] <= i[3]; } -function pl(n, t, e) { - return n[0] <= t && t <= n[2] && n[1] <= e && e <= n[3]; +function Ya(i, t, e) { + return i[0] <= t && t <= i[2] && i[1] <= e && e <= i[3]; } -function ba(n, t) { - const e = n[0], i = n[1], s = n[2], r = n[3], o = t[0], a = t[1]; - let l = Ft.UNKNOWN; - return o < e ? l = l | Ft.LEFT : o > s && (l = l | Ft.RIGHT), a < i ? l = l | Ft.BELOW : a > r && (l = l | Ft.ABOVE), l === Ft.UNKNOWN && (l = Ft.INTERSECTING), l; +function ra(i, t) { + const e = i[0], n = i[1], s = i[2], r = i[3], o = t[0], a = t[1]; + let l = Nt.UNKNOWN; + return o < e ? l = l | Nt.LEFT : o > s && (l = l | Nt.RIGHT), a < n ? l = l | Nt.BELOW : a > r && (l = l | Nt.ABOVE), l === Nt.UNKNOWN && (l = Nt.INTERSECTING), l; } -function se() { +function ue() { return [1 / 0, 1 / 0, -1 / 0, -1 / 0]; } -function _e(n, t, e, i, s) { - return s ? (s[0] = n, s[1] = t, s[2] = e, s[3] = i, s) : [n, t, e, i]; +function ye(i, t, e, n, s) { + return s ? (s[0] = i, s[1] = t, s[2] = e, s[3] = n, s) : [i, t, e, n]; } -function Qs(n) { - return _e(1 / 0, 1 / 0, -1 / 0, -1 / 0, n); +function ks(i) { + return ye(1 / 0, 1 / 0, -1 / 0, -1 / 0, i); } -function ws(n, t) { - const e = n[0], i = n[1]; - return _e(e, i, e, i, t); +function Cu(i, t) { + const e = i[0], n = i[1]; + return ye(e, n, e, n, t); } -function qu(n, t, e, i, s) { - const r = Qs(s); - return Ju(r, n, t, e, i); +function Eu(i, t, e, n, s) { + const r = ks(s); + return Su(r, i, t, e, n); } -function Fs(n, t) { - return n[0] == t[0] && n[2] == t[2] && n[1] == t[1] && n[3] == t[3]; +function ys(i, t) { + return i[0] == t[0] && i[2] == t[2] && i[1] == t[1] && i[3] == t[3]; } -function Ku(n, t) { - return t[0] < n[0] && (n[0] = t[0]), t[2] > n[2] && (n[2] = t[2]), t[1] < n[1] && (n[1] = t[1]), t[3] > n[3] && (n[3] = t[3]), n; +function wu(i, t) { + return t[0] < i[0] && (i[0] = t[0]), t[2] > i[2] && (i[2] = t[2]), t[1] < i[1] && (i[1] = t[1]), t[3] > i[3] && (i[3] = t[3]), i; } -function Ss(n, t) { - t[0] < n[0] && (n[0] = t[0]), t[0] > n[2] && (n[2] = t[0]), t[1] < n[1] && (n[1] = t[1]), t[1] > n[3] && (n[3] = t[1]); +function hs(i, t) { + t[0] < i[0] && (i[0] = t[0]), t[0] > i[2] && (i[2] = t[0]), t[1] < i[1] && (i[1] = t[1]), t[1] > i[3] && (i[3] = t[1]); } -function Ju(n, t, e, i, s) { - for (; e < i; e += s) - qg(n, t[e], t[e + 1]); - return n; +function Su(i, t, e, n, s) { + for (; e < n; e += s) + M0(i, t[e], t[e + 1]); + return i; } -function qg(n, t, e) { - n[0] = Math.min(n[0], t), n[1] = Math.min(n[1], e), n[2] = Math.max(n[2], t), n[3] = Math.max(n[3], e); +function M0(i, t, e) { + i[0] = Math.min(i[0], t), i[1] = Math.min(i[1], e), i[2] = Math.max(i[2], t), i[3] = Math.max(i[3], e); } -function yl(n, t) { +function Ru(i, t) { let e; - return e = t(bo(n)), e || (e = t(Lo(n)), e) || (e = t(Io(n)), e) || (e = t(fn(n)), e) ? e : !1; + return e = t(lo(i)), e || (e = t(ho(i)), e) || (e = t(co(i)), e) || (e = t(Ji(i)), e) ? e : !1; } -function La(n) { +function oa(i) { let t = 0; - return vl(n) || (t = pt(n) * ze(n)), t; + return ja(i) || (t = mt(i) * Ne(i)), t; } -function bo(n) { - return [n[0], n[1]]; +function lo(i) { + return [i[0], i[1]]; } -function Lo(n) { - return [n[2], n[1]]; +function ho(i) { + return [i[2], i[1]]; } -function Pi(n) { - return [(n[0] + n[2]) / 2, (n[1] + n[3]) / 2]; +function Mi(i) { + return [(i[0] + i[2]) / 2, (i[1] + i[3]) / 2]; } -function Kg(n, t) { +function C0(i, t) { let e; - return t === "bottom-left" ? e = bo(n) : t === "bottom-right" ? e = Lo(n) : t === "top-left" ? e = fn(n) : t === "top-right" ? e = Io(n) : Y(!1, 13), e; + return t === "bottom-left" ? e = lo(i) : t === "bottom-right" ? e = ho(i) : t === "top-left" ? e = Ji(i) : t === "top-right" ? e = co(i) : Y(!1, 13), e; } -function Ia(n, t, e, i, s) { - const [r, o, a, l, h, c, u, d] = Pa( - n, +function aa(i, t, e, n, s) { + const [r, o, a, l, h, c, u, d] = la( + i, t, e, - i + n ); - return _e( + return ye( Math.min(r, a, h, u), Math.min(o, l, c, d), Math.max(r, a, h, u), @@ -1281,8 +1281,8 @@ function Ia(n, t, e, i, s) { s ); } -function Pa(n, t, e, i) { - const s = t * i[0] / 2, r = t * i[1] / 2, o = Math.cos(e), a = Math.sin(e), l = s * o, h = s * a, c = r * o, u = r * a, d = n[0], f = n[1]; +function la(i, t, e, n) { + const s = t * n[0] / 2, r = t * n[1] / 2, o = Math.cos(e), a = Math.sin(e), l = s * o, h = s * a, c = r * o, u = r * a, d = i[0], f = i[1]; return [ d - l + u, f - h - c, @@ -1296,231 +1296,231 @@ function Pa(n, t, e, i) { f - h - c ]; } -function ze(n) { - return n[3] - n[1]; +function Ne(i) { + return i[3] - i[1]; } -function Rs(n, t, e) { - const i = e || se(); - return Kt(n, t) ? (n[0] > t[0] ? i[0] = n[0] : i[0] = t[0], n[1] > t[1] ? i[1] = n[1] : i[1] = t[1], n[2] < t[2] ? i[2] = n[2] : i[2] = t[2], n[3] < t[3] ? i[3] = n[3] : i[3] = t[3]) : Qs(i), i; +function cs(i, t, e) { + const n = e || ue(); + return Qt(i, t) ? (i[0] > t[0] ? n[0] = i[0] : n[0] = t[0], i[1] > t[1] ? n[1] = i[1] : n[1] = t[1], i[2] < t[2] ? n[2] = i[2] : n[2] = t[2], i[3] < t[3] ? n[3] = i[3] : n[3] = t[3]) : ks(n), n; } -function fn(n) { - return [n[0], n[3]]; +function Ji(i) { + return [i[0], i[3]]; } -function Io(n) { - return [n[2], n[3]]; +function co(i) { + return [i[2], i[3]]; } -function pt(n) { - return n[2] - n[0]; +function mt(i) { + return i[2] - i[0]; } -function Kt(n, t) { - return n[0] <= t[2] && n[2] >= t[0] && n[1] <= t[3] && n[3] >= t[1]; +function Qt(i, t) { + return i[0] <= t[2] && i[2] >= t[0] && i[1] <= t[3] && i[3] >= t[1]; } -function vl(n) { - return n[2] < n[0] || n[3] < n[1]; +function ja(i) { + return i[2] < i[0] || i[3] < i[1]; } -function Jg(n, t) { - return t ? (t[0] = n[0], t[1] = n[1], t[2] = n[2], t[3] = n[3], t) : n; +function E0(i, t) { + return t ? (t[0] = i[0], t[1] = i[1], t[2] = i[2], t[3] = i[3], t) : i; } -function Qg(n, t, e) { - let i = !1; - const s = ba(n, t), r = ba(n, e); - if (s === Ft.INTERSECTING || r === Ft.INTERSECTING) - i = !0; +function w0(i, t, e) { + let n = !1; + const s = ra(i, t), r = ra(i, e); + if (s === Nt.INTERSECTING || r === Nt.INTERSECTING) + n = !0; else { - const o = n[0], a = n[1], l = n[2], h = n[3], c = t[0], u = t[1], d = e[0], f = e[1], g = (f - u) / (d - c); + const o = i[0], a = i[1], l = i[2], h = i[3], c = t[0], u = t[1], d = e[0], f = e[1], g = (f - u) / (d - c); let m, _; - !!(r & Ft.ABOVE) && !(s & Ft.ABOVE) && (m = d - (f - h) / g, i = m >= o && m <= l), !i && !!(r & Ft.RIGHT) && !(s & Ft.RIGHT) && (_ = f - (d - l) * g, i = _ >= a && _ <= h), !i && !!(r & Ft.BELOW) && !(s & Ft.BELOW) && (m = d - (f - a) / g, i = m >= o && m <= l), !i && !!(r & Ft.LEFT) && !(s & Ft.LEFT) && (_ = f - (d - o) * g, i = _ >= a && _ <= h); + !!(r & Nt.ABOVE) && !(s & Nt.ABOVE) && (m = d - (f - h) / g, n = m >= o && m <= l), !n && !!(r & Nt.RIGHT) && !(s & Nt.RIGHT) && (_ = f - (d - l) * g, n = _ >= a && _ <= h), !n && !!(r & Nt.BELOW) && !(s & Nt.BELOW) && (m = d - (f - a) / g, n = m >= o && m <= l), !n && !!(r & Nt.LEFT) && !(s & Nt.LEFT) && (_ = f - (d - o) * g, n = _ >= a && _ <= h); } - return i; + return n; } -function t0(n, t, e, i) { +function S0(i, t, e, n) { let s = []; - if (i > 1) { - const a = n[2] - n[0], l = n[3] - n[1]; - for (let h = 0; h < i; ++h) + if (n > 1) { + const a = i[2] - i[0], l = i[3] - i[1]; + for (let h = 0; h < n; ++h) s.push( - n[0] + a * h / i, - n[1], - n[2], - n[1] + l * h / i, - n[2] - a * h / i, - n[3], - n[0], - n[3] - l * h / i + i[0] + a * h / n, + i[1], + i[2], + i[1] + l * h / n, + i[2] - a * h / n, + i[3], + i[0], + i[3] - l * h / n ); } else s = [ - n[0], - n[1], - n[2], - n[1], - n[2], - n[3], - n[0], - n[3] + i[0], + i[1], + i[2], + i[1], + i[2], + i[3], + i[0], + i[3] ]; t(s, s, 2); const r = [], o = []; for (let a = 0, l = s.length; a < l; a += 2) r.push(s[a]), o.push(s[a + 1]); - return jg(r, o, e); + return x0(r, o, e); } -function Qu(n, t) { - const e = t.getExtent(), i = Pi(n); - if (t.canWrapX() && (i[0] < e[0] || i[0] >= e[2])) { - const s = pt(e), o = Math.floor( - (i[0] - e[0]) / s +function bu(i, t) { + const e = t.getExtent(), n = Mi(i); + if (t.canWrapX() && (n[0] < e[0] || n[0] >= e[2])) { + const s = mt(e), o = Math.floor( + (n[0] - e[0]) / s ) * s; - n[0] -= o, n[2] -= o; + i[0] -= o, i[2] -= o; } - return n; + return i; } -function e0(n, t) { +function R0(i, t) { if (t.canWrapX()) { const e = t.getExtent(); - if (!isFinite(n[0]) || !isFinite(n[2])) - return [[e[0], n[1], e[2], n[3]]]; - Qu(n, t); - const i = pt(e); - if (pt(n) > i) - return [[e[0], n[1], e[2], n[3]]]; - if (n[0] < e[0]) + if (!isFinite(i[0]) || !isFinite(i[2])) + return [[e[0], i[1], e[2], i[3]]]; + bu(i, t); + const n = mt(e); + if (mt(i) > n) + return [[e[0], i[1], e[2], i[3]]]; + if (i[0] < e[0]) return [ - [n[0] + i, n[1], e[2], n[3]], - [e[0], n[1], n[2], n[3]] + [i[0] + n, i[1], e[2], i[3]], + [e[0], i[1], i[2], i[3]] ]; - if (n[2] > e[2]) + if (i[2] > e[2]) return [ - [n[0], n[1], e[2], n[3]], - [e[0], n[1], n[2] - i, n[3]] + [i[0], i[1], e[2], i[3]], + [e[0], i[1], i[2] - n, i[3]] ]; } - return [n]; + return [i]; } -function Et(n, t, e) { - return Math.min(Math.max(n, t), e); +function wt(i, t, e) { + return Math.min(Math.max(i, t), e); } -function i0(n, t, e, i, s, r) { - const o = s - e, a = r - i; +function b0(i, t, e, n, s, r) { + const o = s - e, a = r - n; if (o !== 0 || a !== 0) { - const l = ((n - e) * o + (t - i) * a) / (o * o + a * a); - l > 1 ? (e = s, i = r) : l > 0 && (e += o * l, i += a * l); + const l = ((i - e) * o + (t - n) * a) / (o * o + a * a); + l > 1 ? (e = s, n = r) : l > 0 && (e += o * l, n += a * l); } - return ri(n, t, e, i); + return ki(i, t, e, n); } -function ri(n, t, e, i) { - const s = e - n, r = i - t; +function ki(i, t, e, n) { + const s = e - i, r = n - t; return s * s + r * r; } -function n0(n) { - const t = n.length; - for (let i = 0; i < t; i++) { - let s = i, r = Math.abs(n[i][i]); - for (let a = i + 1; a < t; a++) { - const l = Math.abs(n[a][i]); +function L0(i) { + const t = i.length; + for (let n = 0; n < t; n++) { + let s = n, r = Math.abs(i[n][n]); + for (let a = n + 1; a < t; a++) { + const l = Math.abs(i[a][n]); l > r && (r = l, s = a); } if (r === 0) return null; - const o = n[s]; - n[s] = n[i], n[i] = o; - for (let a = i + 1; a < t; a++) { - const l = -n[a][i] / n[i][i]; - for (let h = i; h < t + 1; h++) - i == h ? n[a][h] = 0 : n[a][h] += l * n[i][h]; + const o = i[s]; + i[s] = i[n], i[n] = o; + for (let a = n + 1; a < t; a++) { + const l = -i[a][n] / i[n][n]; + for (let h = n; h < t + 1; h++) + n == h ? i[a][h] = 0 : i[a][h] += l * i[n][h]; } } const e = new Array(t); - for (let i = t - 1; i >= 0; i--) { - e[i] = n[i][t] / n[i][i]; - for (let s = i - 1; s >= 0; s--) - n[s][t] -= n[s][i] * e[i]; + for (let n = t - 1; n >= 0; n--) { + e[n] = i[n][t] / i[n][n]; + for (let s = n - 1; s >= 0; s--) + i[s][t] -= i[s][n] * e[n]; } return e; } -function Bh(n) { - return n * 180 / Math.PI; +function fh(i) { + return i * 180 / Math.PI; } -function ji(n) { - return n * Math.PI / 180; +function Gi(i) { + return i * Math.PI / 180; } -function qi(n, t) { - const e = n % t; +function Sn(i, t) { + const e = i % t; return e * t < 0 ? e + t : e; } -function ii(n, t, e) { - return n + e * (t - n); +function Ye(i, t, e) { + return i + e * (t - i); } -function xl(n, t) { +function Lu(i, t) { const e = Math.pow(10, t); - return Math.round(n * e) / e; + return Math.round(i * e) / e; } -function wr(n, t) { - return Math.floor(xl(n, t)); +function cr(i, t) { + return Math.floor(Lu(i, t)); } -function Sr(n, t) { - return Math.ceil(xl(n, t)); +function ur(i, t) { + return Math.ceil(Lu(i, t)); } -const s0 = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i, r0 = /^([a-z]*)$|^hsla?\(.*\)$/i; -function td(n) { - return typeof n == "string" ? n : ed(n); +const T0 = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i, I0 = /^([a-z]*)$|^hsla?\(.*\)$/i; +function Tu(i) { + return typeof i == "string" ? i : Iu(i); } -function o0(n) { +function A0(i) { const t = document.createElement("div"); - if (t.style.color = n, t.style.color !== "") { + if (t.style.color = i, t.style.color !== "") { document.body.appendChild(t); const e = getComputedStyle(t).color; return document.body.removeChild(t), e; } else return ""; } -const a0 = function() { +const P0 = function() { const t = {}; let e = 0; - return function(i) { + return function(n) { let s; - if (t.hasOwnProperty(i)) - s = t[i]; + if (t.hasOwnProperty(n)) + s = t[n]; else { if (e >= 1024) { let r = 0; for (const o in t) (r++ & 3) === 0 && (delete t[o], --e); } - s = l0(i), t[i] = s, ++e; + s = O0(n), t[n] = s, ++e; } return s; }; }(); -function Qr(n) { - return Array.isArray(n) ? n : a0(n); +function Nr(i) { + return Array.isArray(i) ? i : P0(i); } -function l0(n) { - let t, e, i, s, r; - if (r0.exec(n) && (n = o0(n)), s0.exec(n)) { - const o = n.length - 1; +function O0(i) { + let t, e, n, s, r; + if (I0.exec(i) && (i = A0(i)), T0.exec(i)) { + const o = i.length - 1; let a; o <= 4 ? a = 1 : a = 2; const l = o === 4 || o === 8; - t = parseInt(n.substr(1 + 0 * a, a), 16), e = parseInt(n.substr(1 + 1 * a, a), 16), i = parseInt(n.substr(1 + 2 * a, a), 16), l ? s = parseInt(n.substr(1 + 3 * a, a), 16) : s = 255, a == 1 && (t = (t << 4) + t, e = (e << 4) + e, i = (i << 4) + i, l && (s = (s << 4) + s)), r = [t, e, i, s / 255]; + t = parseInt(i.substr(1 + 0 * a, a), 16), e = parseInt(i.substr(1 + 1 * a, a), 16), n = parseInt(i.substr(1 + 2 * a, a), 16), l ? s = parseInt(i.substr(1 + 3 * a, a), 16) : s = 255, a == 1 && (t = (t << 4) + t, e = (e << 4) + e, n = (n << 4) + n, l && (s = (s << 4) + s)), r = [t, e, n, s / 255]; } else - n.startsWith("rgba(") ? (r = n.slice(5, -1).split(",").map(Number), zh(r)) : n.startsWith("rgb(") ? (r = n.slice(4, -1).split(",").map(Number), r.push(1), zh(r)) : Y(!1, 14); + i.startsWith("rgba(") ? (r = i.slice(5, -1).split(",").map(Number), gh(r)) : i.startsWith("rgb(") ? (r = i.slice(4, -1).split(",").map(Number), r.push(1), gh(r)) : Y(!1, 14); return r; } -function zh(n) { - return n[0] = Et(n[0] + 0.5 | 0, 0, 255), n[1] = Et(n[1] + 0.5 | 0, 0, 255), n[2] = Et(n[2] + 0.5 | 0, 0, 255), n[3] = Et(n[3], 0, 1), n; +function gh(i) { + return i[0] = wt(i[0] + 0.5 | 0, 0, 255), i[1] = wt(i[1] + 0.5 | 0, 0, 255), i[2] = wt(i[2] + 0.5 | 0, 0, 255), i[3] = wt(i[3], 0, 1), i; } -function ed(n) { - let t = n[0]; +function Iu(i) { + let t = i[0]; t != (t | 0) && (t = t + 0.5 | 0); - let e = n[1]; + let e = i[1]; e != (e | 0) && (e = e + 0.5 | 0); - let i = n[2]; - i != (i | 0) && (i = i + 0.5 | 0); - const s = n[3] === void 0 ? 1 : Math.round(n[3] * 100) / 100; - return "rgba(" + t + "," + e + "," + i + "," + s + ")"; + let n = i[2]; + n != (n | 0) && (n = n + 0.5 | 0); + const s = i[3] === void 0 ? 1 : Math.round(i[3] * 100) / 100; + return "rgba(" + t + "," + e + "," + n + "," + s + ")"; } -class h0 { +class N0 { constructor() { this.cache_ = {}, this.cacheSize_ = 0, this.maxCacheSize_ = 32; } @@ -1534,28 +1534,28 @@ class h0 { if (this.canExpireCache()) { let t = 0; for (const e in this.cache_) { - const i = this.cache_[e]; - (t++ & 3) === 0 && !i.hasListener() && (delete this.cache_[e], --this.cacheSize_); + const n = this.cache_[e]; + (t++ & 3) === 0 && !n.hasListener() && (delete this.cache_[e], --this.cacheSize_); } } } - get(t, e, i) { - const s = Zh(t, e, i); + get(t, e, n) { + const s = mh(t, e, n); return s in this.cache_ ? this.cache_[s] : null; } - set(t, e, i, s) { - const r = Zh(t, e, i); + set(t, e, n, s) { + const r = mh(t, e, n); this.cache_[r] = s, ++this.cacheSize_; } setSize(t) { this.maxCacheSize_ = t, this.expire(); } } -function Zh(n, t, e) { - const i = e ? td(e) : "null"; - return t + ":" + n + ":" + i; +function mh(i, t, e) { + const n = e ? Tu(e) : "null"; + return t + ":" + i + ":" + n; } -const to = new h0(), ft = { +const Fr = new N0(), dt = { OPACITY: "opacity", VISIBLE: "visible", EXTENT: "extent", @@ -1567,11 +1567,11 @@ const to = new h0(), ft = { SOURCE: "source", MAP: "map" }; -class c0 extends Oe { +class F0 extends Se { constructor(t) { super(), this.on, this.once, this.un, this.background_ = t.background; const e = Object.assign({}, t); - typeof t.properties == "object" && (delete e.properties, Object.assign(e, t.properties)), e[ft.OPACITY] = t.opacity !== void 0 ? t.opacity : 1, Y(typeof e[ft.OPACITY] == "number", 64), e[ft.VISIBLE] = t.visible !== void 0 ? t.visible : !0, e[ft.Z_INDEX] = t.zIndex, e[ft.MAX_RESOLUTION] = t.maxResolution !== void 0 ? t.maxResolution : 1 / 0, e[ft.MIN_RESOLUTION] = t.minResolution !== void 0 ? t.minResolution : 0, e[ft.MIN_ZOOM] = t.minZoom !== void 0 ? t.minZoom : -1 / 0, e[ft.MAX_ZOOM] = t.maxZoom !== void 0 ? t.maxZoom : 1 / 0, this.className_ = e.className !== void 0 ? e.className : "ol-layer", delete e.className, this.setProperties(e), this.state_ = null; + typeof t.properties == "object" && (delete e.properties, Object.assign(e, t.properties)), e[dt.OPACITY] = t.opacity !== void 0 ? t.opacity : 1, Y(typeof e[dt.OPACITY] == "number", 64), e[dt.VISIBLE] = t.visible !== void 0 ? t.visible : !0, e[dt.Z_INDEX] = t.zIndex, e[dt.MAX_RESOLUTION] = t.maxResolution !== void 0 ? t.maxResolution : 1 / 0, e[dt.MIN_RESOLUTION] = t.minResolution !== void 0 ? t.minResolution : 0, e[dt.MIN_ZOOM] = t.minZoom !== void 0 ? t.minZoom : -1 / 0, e[dt.MAX_ZOOM] = t.maxZoom !== void 0 ? t.maxZoom : 1 / 0, this.className_ = e.className !== void 0 ? e.className : "ol-layer", delete e.className, this.setProperties(e), this.state_ = null; } getBackground() { return this.background_; @@ -1583,89 +1583,89 @@ class c0 extends Oe { const e = this.state_ || { layer: this, managed: t === void 0 ? !0 : t - }, i = this.getZIndex(); - return e.opacity = Et(Math.round(this.getOpacity() * 100) / 100, 0, 1), e.visible = this.getVisible(), e.extent = this.getExtent(), e.zIndex = i === void 0 && !e.managed ? 1 / 0 : i, e.maxResolution = this.getMaxResolution(), e.minResolution = Math.max(this.getMinResolution(), 0), e.minZoom = this.getMinZoom(), e.maxZoom = this.getMaxZoom(), this.state_ = e, e; + }, n = this.getZIndex(); + return e.opacity = wt(Math.round(this.getOpacity() * 100) / 100, 0, 1), e.visible = this.getVisible(), e.extent = this.getExtent(), e.zIndex = n === void 0 && !e.managed ? 1 / 0 : n, e.maxResolution = this.getMaxResolution(), e.minResolution = Math.max(this.getMinResolution(), 0), e.minZoom = this.getMinZoom(), e.maxZoom = this.getMaxZoom(), this.state_ = e, e; } getLayersArray(t) { - return H(); + return W(); } getLayerStatesArray(t) { - return H(); + return W(); } getExtent() { - return this.get(ft.EXTENT); + return this.get(dt.EXTENT); } getMaxResolution() { - return this.get(ft.MAX_RESOLUTION); + return this.get(dt.MAX_RESOLUTION); } getMinResolution() { - return this.get(ft.MIN_RESOLUTION); + return this.get(dt.MIN_RESOLUTION); } getMinZoom() { - return this.get(ft.MIN_ZOOM); + return this.get(dt.MIN_ZOOM); } getMaxZoom() { - return this.get(ft.MAX_ZOOM); + return this.get(dt.MAX_ZOOM); } getOpacity() { - return this.get(ft.OPACITY); + return this.get(dt.OPACITY); } getSourceState() { - return H(); + return W(); } getVisible() { - return this.get(ft.VISIBLE); + return this.get(dt.VISIBLE); } getZIndex() { - return this.get(ft.Z_INDEX); + return this.get(dt.Z_INDEX); } setBackground(t) { this.background_ = t, this.changed(); } setExtent(t) { - this.set(ft.EXTENT, t); + this.set(dt.EXTENT, t); } setMaxResolution(t) { - this.set(ft.MAX_RESOLUTION, t); + this.set(dt.MAX_RESOLUTION, t); } setMinResolution(t) { - this.set(ft.MIN_RESOLUTION, t); + this.set(dt.MIN_RESOLUTION, t); } setMaxZoom(t) { - this.set(ft.MAX_ZOOM, t); + this.set(dt.MAX_ZOOM, t); } setMinZoom(t) { - this.set(ft.MIN_ZOOM, t); + this.set(dt.MIN_ZOOM, t); } setOpacity(t) { - Y(typeof t == "number", 64), this.set(ft.OPACITY, t); + Y(typeof t == "number", 64), this.set(dt.OPACITY, t); } setVisible(t) { - this.set(ft.VISIBLE, t); + this.set(dt.VISIBLE, t); } setZIndex(t) { - this.set(ft.Z_INDEX, t); + this.set(dt.Z_INDEX, t); } disposeInternal() { this.state_ && (this.state_.layer = null, this.state_ = null), super.disposeInternal(); } } -const id = c0, Ri = { +const Au = F0, _i = { PRERENDER: "prerender", POSTRENDER: "postrender", PRECOMPOSE: "precompose", POSTCOMPOSE: "postcompose", RENDERCOMPLETE: "rendercomplete" }; -class u0 extends id { +class D0 extends Au { constructor(t) { const e = Object.assign({}, t); delete e.source, super(e), this.on, this.once, this.un, this.mapPrecomposeKey_ = null, this.mapRenderKey_ = null, this.sourceChangeKey_ = null, this.renderer_ = null, this.rendered = !1, t.render && (this.render = t.render), t.map && this.setMap(t.map), this.addChangeListener( - ft.SOURCE, + dt.SOURCE, this.handleSourcePropertyChange_ ); - const i = t.source ? t.source : null; - this.setSource(i); + const n = t.source ? t.source : null; + this.setSource(n); } getLayersArray(t) { return t = t || [], t.push(this), t; @@ -1674,7 +1674,7 @@ class u0 extends id { return t = t || [], t.push(this.getLayerState()), t; } getSource() { - return this.get(ft.SOURCE) || null; + return this.get(dt.SOURCE) || null; } getRenderSource() { return this.getSource(); @@ -1687,11 +1687,11 @@ class u0 extends id { this.changed(); } handleSourcePropertyChange_() { - this.sourceChangeKey_ && (mt(this.sourceChangeKey_), this.sourceChangeKey_ = null); + this.sourceChangeKey_ && (pt(this.sourceChangeKey_), this.sourceChangeKey_ = null); const t = this.getSource(); - t && (this.sourceChangeKey_ = et( + t && (this.sourceChangeKey_ = it( t, - U.CHANGE, + X.CHANGE, this.handleSourceChange_, this )), this.changed(); @@ -1703,23 +1703,23 @@ class u0 extends id { return !this.renderer_ || !this.rendered ? null : this.renderer_.getData(t); } render(t, e) { - const i = this.getRenderer(); - if (i.prepareFrame(t)) - return this.rendered = !0, i.renderFrame(t, e); + const n = this.getRenderer(); + if (n.prepareFrame(t)) + return this.rendered = !0, n.renderFrame(t, e); } unrender() { this.rendered = !1; } setMapInternal(t) { - t || this.unrender(), this.set(ft.MAP, t); + t || this.unrender(), this.set(dt.MAP, t); } getMapInternal() { - return this.get(ft.MAP); + return this.get(dt.MAP); } setMap(t) { - this.mapPrecomposeKey_ && (mt(this.mapPrecomposeKey_), this.mapPrecomposeKey_ = null), t || this.changed(), this.mapRenderKey_ && (mt(this.mapRenderKey_), this.mapRenderKey_ = null), t && (this.mapPrecomposeKey_ = et( + this.mapPrecomposeKey_ && (pt(this.mapPrecomposeKey_), this.mapPrecomposeKey_ = null), t || this.changed(), this.mapRenderKey_ && (pt(this.mapRenderKey_), this.mapRenderKey_ = null), t && (this.mapPrecomposeKey_ = it( t, - Ri.PRECOMPOSE, + _i.PRECOMPOSE, function(e) { const s = e.frameState.layerStatesArray, r = this.getLayerState(!1); Y( @@ -1730,10 +1730,10 @@ class u0 extends id { ), s.push(r); }, this - ), this.mapRenderKey_ = et(this, U.CHANGE, t.render, t), this.changed()); + ), this.mapRenderKey_ = it(this, X.CHANGE, t.render, t), this.changed()); } setSource(t) { - this.set(ft.SOURCE, t); + this.set(dt.SOURCE, t); } getRenderer() { return this.renderer_ || (this.renderer_ = this.createRenderer()), this.renderer_; @@ -1748,83 +1748,60 @@ class u0 extends id { this.renderer_ && (this.renderer_.dispose(), delete this.renderer_), this.setSource(null), super.disposeInternal(); } } -function Cl(n, t) { - if (!n.visible) +function Ka(i, t) { + if (!i.visible) return !1; const e = t.resolution; - if (e < n.minResolution || e >= n.maxResolution) + if (e < i.minResolution || e >= i.maxResolution) return !1; - const i = t.zoom; - return i > n.minZoom && i <= n.maxZoom; -} -const Po = u0; -function nd(n, t) { - return n[0] += +t[0], n[1] += +t[1], n; -} -function d0(n, t) { - const e = t.getRadius(), i = t.getCenter(), s = i[0], r = i[1], o = n[0], a = n[1]; - let l = o - s; - const h = a - r; - l === 0 && h === 0 && (l = 1); - const c = Math.sqrt(l * l + h * h), u = s + e * l / c, d = r + e * h / c; - return [u, d]; -} -function Ml(n, t) { - const e = n[0], i = n[1], s = t[0], r = t[1], o = s[0], a = s[1], l = r[0], h = r[1], c = l - o, u = h - a, d = c === 0 && u === 0 ? 0 : (c * (e - o) + u * (i - a)) / (c * c + u * u || 0); - let f, g; - return d <= 0 ? (f = o, g = a) : d >= 1 ? (f = l, g = h) : (f = o + d * c, g = a + d * u), [f, g]; -} -function Le(n, t) { + const n = t.zoom; + return n > i.minZoom && n <= i.maxZoom; +} +const uo = D0; +function Pu(i, t) { + return i[0] += +t[0], i[1] += +t[1], i; +} +function Dr(i, t) { let e = !0; - for (let i = n.length - 1; i >= 0; --i) - if (n[i] != t[i]) { + for (let n = i.length - 1; n >= 0; --n) + if (i[n] != t[n]) { e = !1; break; } return e; } -function El(n, t) { - const e = Math.cos(t), i = Math.sin(t), s = n[0] * e - n[1] * i, r = n[1] * e + n[0] * i; - return n[0] = s, n[1] = r, n; -} -function sd(n, t) { - return n[0] *= t, n[1] *= t, n; -} -function oi(n, t) { - const e = n[0] - t[0], i = n[1] - t[1]; - return e * e + i * i; -} -function eo(n, t) { - return Math.sqrt(oi(n, t)); +function qa(i, t) { + const e = Math.cos(t), n = Math.sin(t), s = i[0] * e - i[1] * n, r = i[1] * e + i[0] * n; + return i[0] = s, i[1] = r, i; } -function f0(n, t) { - return oi(n, Ml(n, t)); +function Ou(i, t) { + return i[0] *= t, i[1] *= t, i; } -function rd(n, t) { +function Nu(i, t) { if (t.canWrapX()) { - const e = pt(t.getExtent()), i = od(n, t, e); - i && (n[0] -= i * e); + const e = mt(t.getExtent()), n = Fu(i, t, e); + n && (i[0] -= n * e); } - return n; + return i; } -function od(n, t, e) { - const i = t.getExtent(); +function Fu(i, t, e) { + const n = t.getExtent(); let s = 0; - return t.canWrapX() && (n[0] < i[0] || n[0] > i[2]) && (e = e || pt(i), s = Math.floor( - (n[0] - i[0]) / e + return t.canWrapX() && (i[0] < n[0] || i[0] > n[2]) && (e = e || mt(n), s = Math.floor( + (i[0] - n[0]) / e )), s; } -class g0 extends fl { +class k0 extends Va { constructor(t) { super(), this.map_ = t; } dispatchRenderEvent(t, e) { - H(); + W(); } calculateMatrices2D(t) { - const e = t.viewState, i = t.coordinateToPixelTransform, s = t.pixelToCoordinateTransform; - Ii( - i, + const e = t.viewState, n = t.coordinateToPixelTransform, s = t.pixelToCoordinateTransform; + xi( + n, t.size[0] / 2, t.size[1] / 2, 1 / e.resolution, @@ -1832,35 +1809,35 @@ class g0 extends fl { -e.rotation, -e.center[0], -e.center[1] - ), _l(s, i); + ), Xa(s, n); } - forEachFeatureAtCoordinate(t, e, i, s, r, o, a, l) { + forEachFeatureAtCoordinate(t, e, n, s, r, o, a, l) { let h; const c = e.viewState; - function u(x, C, E, R) { - return r.call(o, C, x ? E : null, R); + function u(x, M, E, R) { + return r.call(o, M, x ? E : null, R); } - const d = c.projection, f = rd(t.slice(), d), g = [[0, 0]]; + const d = c.projection, f = Nu(t.slice(), d), g = [[0, 0]]; if (d.canWrapX() && s) { - const x = d.getExtent(), C = pt(x); - g.push([-C, 0], [C, 0]); + const x = d.getExtent(), M = mt(x); + g.push([-M, 0], [M, 0]); } const m = e.layerStatesArray, _ = m.length, y = [], p = []; for (let x = 0; x < g.length; x++) - for (let C = _ - 1; C >= 0; --C) { - const E = m[C], R = E.layer; - if (R.hasRenderer() && Cl(E, c) && a.call(l, R)) { - const b = R.getRenderer(), F = R.getSource(); - if (b && F) { - const G = F.getWrapX() ? f : t, V = u.bind( + for (let M = _ - 1; M >= 0; --M) { + const E = m[M], R = E.layer; + if (R.hasRenderer() && Ka(E, c) && a.call(l, R)) { + const L = R.getRenderer(), N = R.getSource(); + if (L && N) { + const G = N.getWrapX() ? f : t, U = u.bind( null, E.managed ); - p[0] = G[0] + g[x][0], p[1] = G[1] + g[x][1], h = b.forEachFeatureAtCoordinate( + p[0] = G[0] + g[x][0], p[1] = G[1] + g[x][1], h = L.forEachFeatureAtCoordinate( p, e, - i, - V, + n, + U, y ); } @@ -1871,15 +1848,15 @@ class g0 extends fl { if (y.length === 0) return; const v = 1 / y.length; - return y.forEach((x, C) => x.distanceSq += C * v), y.sort((x, C) => x.distanceSq - C.distanceSq), y.some((x) => h = x.callback(x.feature, x.layer, x.geometry)), h; + return y.forEach((x, M) => x.distanceSq += M * v), y.sort((x, M) => x.distanceSq - M.distanceSq), y.some((x) => h = x.callback(x.feature, x.layer, x.geometry)), h; } - hasFeatureAtCoordinate(t, e, i, s, r, o) { + hasFeatureAtCoordinate(t, e, n, s, r, o) { return this.forEachFeatureAtCoordinate( t, e, - i, + n, s, - en, + ps, this, r, o @@ -1889,22 +1866,22 @@ class g0 extends fl { return this.map_; } renderFrame(t) { - H(); + W(); } scheduleExpireIconCache(t) { - to.canExpireCache() && t.postRenderFunctions.push(m0); + Fr.canExpireCache() && t.postRenderFunctions.push(G0); } } -function m0(n, t) { - to.expire(); +function G0(i, t) { + Fr.expire(); } -const _0 = g0; -class p0 extends Re { - constructor(t, e, i, s) { - super(t), this.inversePixelTransform = e, this.frameState = i, this.context = s; +const $0 = k0; +class B0 extends ke { + constructor(t, e, n, s) { + super(t), this.inversePixelTransform = e, this.frameState = n, this.context = s; } } -const ad = p0, Rr = "ol-hidden", ss = "ol-unselectable", Vh = "ol-unsupported", Ao = "ol-control", Uh = "ol-collapsed", y0 = new RegExp( +const Du = B0, dr = "ol-hidden", Un = "ol-unselectable", _h = "ol-unsupported", fo = "ol-control", ph = "ol-collapsed", z0 = new RegExp( [ "^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)", "(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)", @@ -1915,15 +1892,15 @@ const ad = p0, Rr = "ol-hidden", ss = "ol-unselectable", Vh = "ol-unsupported", `?\\s*([-,\\"\\'\\sa-z]+?)\\s*$` ].join(""), "i" -), Wh = [ +), yh = [ "style", "variant", "weight", "size", "lineHeight", "family" -], ld = function(n) { - const t = n.match(y0); +], ku = function(i) { + const t = i.match(z0); if (!t) return null; const e = { @@ -1933,64 +1910,64 @@ const ad = p0, Rr = "ol-hidden", ss = "ol-unselectable", Vh = "ol-unsupported", weight: "normal", variant: "normal" }; - for (let i = 0, s = Wh.length; i < s; ++i) { - const r = t[i + 1]; - r !== void 0 && (e[Wh[i]] = r); + for (let n = 0, s = yh.length; n < s; ++n) { + const r = t[n + 1]; + r !== void 0 && (e[yh[n]] = r); } return e.families = e.family.split(/,\s?/), e; }; -function pe(n, t, e, i) { +function de(i, t, e, n) { let s; - return e && e.length ? s = e.shift() : ml ? s = new OffscreenCanvas(n || 300, t || 300) : s = document.createElement("canvas"), n && (s.width = n), t && (s.height = t), s.getContext("2d", i); + return e && e.length ? s = e.shift() : Ha ? s = new OffscreenCanvas(i || 300, t || 300) : s = document.createElement("canvas"), i && (s.width = i), t && (s.height = t), s.getContext("2d", n); } -function hd(n) { - const t = n.canvas; - t.width = 1, t.height = 1, n.clearRect(0, 0, 1, 1); +function Gu(i) { + const t = i.canvas; + t.width = 1, t.height = 1, i.clearRect(0, 0, 1, 1); } -function io(n, t) { +function kr(i, t) { const e = t.parentNode; - e && e.replaceChild(n, t); + e && e.replaceChild(i, t); } -function Aa(n) { - return n && n.parentNode ? n.parentNode.removeChild(n) : null; +function ha(i) { + return i && i.parentNode ? i.parentNode.removeChild(i) : null; } -function v0(n) { - for (; n.lastChild; ) - n.removeChild(n.lastChild); +function Z0(i) { + for (; i.lastChild; ) + i.removeChild(i.lastChild); } -function x0(n, t) { - const e = n.childNodes; - for (let i = 0; ; ++i) { - const s = e[i], r = t[i]; +function U0(i, t) { + const e = i.childNodes; + for (let n = 0; ; ++n) { + const s = e[n], r = t[n]; if (!s && !r) break; if (s !== r) { if (!s) { - n.appendChild(r); + i.appendChild(r); continue; } if (!r) { - n.removeChild(s), --i; + i.removeChild(s), --n; continue; } - n.insertBefore(r, s); + i.insertBefore(r, s); } } } -const cd = "10px sans-serif", ai = "#000", no = "round", Ns = [], Ds = 0, Xn = "round", ks = 10, Gs = "#000", $s = "center", so = "middle", Ui = [0, 0, 0, 0], Bs = 1, ti = new Oe(); -let Rn = null, Oa; -const Fa = {}, C0 = function() { - const t = "32px ", e = ["monospace", "serif"], i = e.length, s = "wmytzilWMYTZIL@#/&?$%10\uF013"; +const $u = "10px sans-serif", Je = "#000", Gr = "round", vs = [], xs = 0, Pn = "round", Ms = 10, Cs = "#000", Es = "center", $r = "middle", Ai = [0, 0, 0, 0], ws = 1, He = new Se(); +let fn = null, ca; +const ua = {}, V0 = function() { + const t = "32px ", e = ["monospace", "serif"], n = e.length, s = "wmytzilWMYTZIL@#/&?$%10\uF013"; let r, o; function a(h, c, u) { let d = !0; - for (let f = 0; f < i; ++f) { + for (let f = 0; f < n; ++f) { const g = e[f]; - if (o = ro( + if (o = Br( h + " " + c + " " + t + g, s ), u != g) { - const m = ro( + const m = Br( h + " " + c + " " + t + u + "," + g, s ); @@ -2001,16 +1978,16 @@ const Fa = {}, C0 = function() { } function l() { let h = !0; - const c = ti.getKeys(); + const c = He.getKeys(); for (let u = 0, d = c.length; u < d; ++u) { const f = c[u]; - ti.get(f) < 100 && (a.apply(this, f.split(` -`)) ? (Ks(Fa), Rn = null, Oa = void 0, ti.set(f, 100)) : (ti.set(f, ti.get(f) + 1, !0), h = !1)); + He.get(f) < 100 && (a.apply(this, f.split(` +`)) ? (Ds(ua), fn = null, ca = void 0, He.set(f, 100)) : (He.set(f, He.get(f) + 1, !0), h = !1)); } h && (clearInterval(r), r = void 0); } return function(h) { - const c = ld(h); + const c = ku(h); if (!c) return; const u = c.families; @@ -2018,39 +1995,39 @@ const Fa = {}, C0 = function() { const g = u[d], m = c.style + ` ` + c.weight + ` ` + g; - ti.get(m) === void 0 && (ti.set(m, 100, !0), a(c.style, c.weight, g) || (ti.set(m, 0, !0), r === void 0 && (r = setInterval(l, 32)))); + He.get(m) === void 0 && (He.set(m, 100, !0), a(c.style, c.weight, g) || (He.set(m, 0, !0), r === void 0 && (r = setInterval(l, 32)))); } }; -}(), M0 = function() { - let n; +}(), W0 = function() { + let i; return function(t) { - let e = Fa[t]; + let e = ua[t]; if (e == null) { - if (ml) { - const i = ld(t), s = ud(t, "\u017Dg"); - e = (isNaN(Number(i.lineHeight)) ? 1.2 : Number(i.lineHeight)) * (s.actualBoundingBoxAscent + s.actualBoundingBoxDescent); + if (Ha) { + const n = ku(t), s = Bu(t, "\u017Dg"); + e = (isNaN(Number(n.lineHeight)) ? 1.2 : Number(n.lineHeight)) * (s.actualBoundingBoxAscent + s.actualBoundingBoxDescent); } else - n || (n = document.createElement("div"), n.innerHTML = "M", n.style.minHeight = "0", n.style.maxHeight = "none", n.style.height = "auto", n.style.padding = "0", n.style.border = "none", n.style.position = "absolute", n.style.display = "block", n.style.left = "-99999px"), n.style.font = t, document.body.appendChild(n), e = n.offsetHeight, document.body.removeChild(n); - Fa[t] = e; + i || (i = document.createElement("div"), i.innerHTML = "M", i.style.minHeight = "0", i.style.maxHeight = "none", i.style.height = "auto", i.style.padding = "0", i.style.border = "none", i.style.position = "absolute", i.style.display = "block", i.style.left = "-99999px"), i.style.font = t, document.body.appendChild(i), e = i.offsetHeight, document.body.removeChild(i); + ua[t] = e; } return e; }; }(); -function ud(n, t) { - return Rn || (Rn = pe(1, 1)), n != Oa && (Rn.font = n, Oa = Rn.font), Rn.measureText(t); +function Bu(i, t) { + return fn || (fn = de(1, 1)), i != ca && (fn.font = i, ca = fn.font), fn.measureText(t); } -function ro(n, t) { - return ud(n, t).width; +function Br(i, t) { + return Bu(i, t).width; } -function Hh(n, t, e) { +function vh(i, t, e) { if (t in e) return e[t]; - const i = t.split(` -`).reduce((s, r) => Math.max(s, ro(n, r)), 0); - return e[t] = i, i; + const n = t.split(` +`).reduce((s, r) => Math.max(s, Br(i, r)), 0); + return e[t] = n, n; } -function E0(n, t) { - const e = [], i = [], s = []; +function H0(i, t) { + const e = [], n = [], s = []; let r = 0, o = 0, a = 0, l = 0; for (let h = 0, c = t.length; h <= c; h += 2) { const u = t[h]; @@ -2059,16 +2036,16 @@ function E0(n, t) { r = Math.max(r, o), s.push(o), o = 0, a += l; continue; } - const d = t[h + 1] || n.font, f = ro(d, u); + const d = t[h + 1] || i.font, f = Br(d, u); e.push(f), o += f; - const g = M0(d); - i.push(g), l = Math.max(l, g); + const g = W0(d); + n.push(g), l = Math.max(l, g); } - return { width: r, height: a, widths: e, heights: i, lineWidths: s }; + return { width: r, height: a, widths: e, heights: n, lineWidths: s }; } -function w0(n, t, e, i, s, r, o, a, l, h, c) { - n.save(), e !== 1 && (n.globalAlpha *= e), t && n.setTransform.apply(n, t), i.contextInstructions ? (n.translate(l, h), n.scale(c[0], c[1]), S0(i, n)) : c[0] < 0 || c[1] < 0 ? (n.translate(l, h), n.scale(c[0], c[1]), n.drawImage( - i, +function X0(i, t, e, n, s, r, o, a, l, h, c) { + i.save(), e !== 1 && (i.globalAlpha *= e), t && i.setTransform.apply(i, t), n.contextInstructions ? (i.translate(l, h), i.scale(c[0], c[1]), Y0(n, i)) : c[0] < 0 || c[1] < 0 ? (i.translate(l, h), i.scale(c[0], c[1]), i.drawImage( + n, s, r, o, @@ -2077,8 +2054,8 @@ function w0(n, t, e, i, s, r, o, a, l, h, c) { 0, o, a - )) : n.drawImage( - i, + )) : i.drawImage( + n, s, r, o, @@ -2087,47 +2064,47 @@ function w0(n, t, e, i, s, r, o, a, l, h, c) { h, o * c[0], a * c[1] - ), n.restore(); + ), i.restore(); } -function S0(n, t) { - const e = n.contextInstructions; - for (let i = 0, s = e.length; i < s; i += 2) - Array.isArray(e[i + 1]) ? t[e[i]].apply( +function Y0(i, t) { + const e = i.contextInstructions; + for (let n = 0, s = e.length; n < s; n += 2) + Array.isArray(e[n + 1]) ? t[e[n]].apply( t, - e[i + 1] - ) : t[e[i]] = e[i + 1]; + e[n + 1] + ) : t[e[n]] = e[n + 1]; } -class R0 extends _0 { +class j0 extends $0 { constructor(t) { - super(t), this.fontChangeListenerKey_ = et( - ti, - Wn.PROPERTYCHANGE, + super(t), this.fontChangeListenerKey_ = it( + He, + In.PROPERTYCHANGE, t.redrawText.bind(t) ), this.element_ = document.createElement("div"); const e = this.element_.style; - e.position = "absolute", e.width = "100%", e.height = "100%", e.zIndex = "0", this.element_.className = ss + " ol-layers"; - const i = t.getViewport(); - i.insertBefore(this.element_, i.firstChild || null), this.children_ = [], this.renderedVisible_ = !0; + e.position = "absolute", e.width = "100%", e.height = "100%", e.zIndex = "0", this.element_.className = Un + " ol-layers"; + const n = t.getViewport(); + n.insertBefore(this.element_, n.firstChild || null), this.children_ = [], this.renderedVisible_ = !0; } dispatchRenderEvent(t, e) { - const i = this.getMap(); - if (i.hasListener(t)) { - const s = new ad(t, void 0, e); - i.dispatchEvent(s); + const n = this.getMap(); + if (n.hasListener(t)) { + const s = new Du(t, void 0, e); + n.dispatchEvent(s); } } disposeInternal() { - mt(this.fontChangeListenerKey_), this.element_.parentNode.removeChild(this.element_), super.disposeInternal(); + pt(this.fontChangeListenerKey_), this.element_.parentNode.removeChild(this.element_), super.disposeInternal(); } renderFrame(t) { if (!t) { this.renderedVisible_ && (this.element_.style.display = "none", this.renderedVisible_ = !1); return; } - this.calculateMatrices2D(t), this.dispatchRenderEvent(Ri.PRECOMPOSE, t); + this.calculateMatrices2D(t), this.dispatchRenderEvent(_i.PRECOMPOSE, t); const e = t.layerStatesArray.sort(function(o, a) { return o.zIndex - a.zIndex; - }), i = t.viewState; + }), n = t.viewState; this.children_.length = 0; const s = []; let r = null; @@ -2135,7 +2112,7 @@ class R0 extends _0 { const l = e[o]; t.layerIndex = o; const h = l.layer, c = h.getSourceState(); - if (!Cl(l, i) || c != "ready" && c != "undefined") { + if (!Ka(l, n) || c != "ready" && c != "undefined") { h.unrender(); continue; } @@ -2146,86 +2123,86 @@ class R0 extends _0 { } for (let o = s.length - 1; o >= 0; --o) s[o].renderDeclutter(t); - x0(this.element_, this.children_), this.dispatchRenderEvent(Ri.POSTCOMPOSE, t), this.renderedVisible_ || (this.element_.style.display = "", this.renderedVisible_ = !0), this.scheduleExpireIconCache(t); + U0(this.element_, this.children_), this.dispatchRenderEvent(_i.POSTCOMPOSE, t), this.renderedVisible_ || (this.element_.style.display = "", this.renderedVisible_ = !0), this.scheduleExpireIconCache(t); } } -const T0 = R0; -class Ci extends Re { +const K0 = j0; +class fi extends ke { constructor(t, e) { super(t), this.layer = e; } } -const sa = { +const Go = { LAYERS: "layers" }; -class wl extends id { +class Ja extends Au { constructor(t) { t = t || {}; const e = Object.assign({}, t); delete e.layers; - let i = t.layers; - super(e), this.on, this.once, this.un, this.layersListenerKeys_ = [], this.listenerKeys_ = {}, this.addChangeListener(sa.LAYERS, this.handleLayersChanged_), i ? Array.isArray(i) ? i = new Ee(i.slice(), { unique: !0 }) : Y(typeof i.getArray == "function", 43) : i = new Ee(void 0, { unique: !0 }), this.setLayers(i); + let n = t.layers; + super(e), this.on, this.once, this.un, this.layersListenerKeys_ = [], this.listenerKeys_ = {}, this.addChangeListener(Go.LAYERS, this.handleLayersChanged_), n ? Array.isArray(n) ? n = new Te(n.slice(), { unique: !0 }) : Y(typeof n.getArray == "function", 43) : n = new Te(void 0, { unique: !0 }), this.setLayers(n); } handleLayerChange_() { this.changed(); } handleLayersChanged_() { - this.layersListenerKeys_.forEach(mt), this.layersListenerKeys_.length = 0; + this.layersListenerKeys_.forEach(pt), this.layersListenerKeys_.length = 0; const t = this.getLayers(); this.layersListenerKeys_.push( - et(t, Dt.ADD, this.handleLayersAdd_, this), - et(t, Dt.REMOVE, this.handleLayersRemove_, this) + it(t, Jt.ADD, this.handleLayersAdd_, this), + it(t, Jt.REMOVE, this.handleLayersRemove_, this) ); - for (const i in this.listenerKeys_) - this.listenerKeys_[i].forEach(mt); - Ks(this.listenerKeys_); + for (const n in this.listenerKeys_) + this.listenerKeys_[n].forEach(pt); + Ds(this.listenerKeys_); const e = t.getArray(); - for (let i = 0, s = e.length; i < s; i++) { - const r = e[i]; - this.registerLayerListeners_(r), this.dispatchEvent(new Ci("addlayer", r)); + for (let n = 0, s = e.length; n < s; n++) { + const r = e[n]; + this.registerLayerListeners_(r), this.dispatchEvent(new fi("addlayer", r)); } this.changed(); } registerLayerListeners_(t) { const e = [ - et( + it( t, - Wn.PROPERTYCHANGE, + In.PROPERTYCHANGE, this.handleLayerChange_, this ), - et(t, U.CHANGE, this.handleLayerChange_, this) + it(t, X.CHANGE, this.handleLayerChange_, this) ]; - t instanceof wl && e.push( - et(t, "addlayer", this.handleLayerGroupAdd_, this), - et(t, "removelayer", this.handleLayerGroupRemove_, this) - ), this.listenerKeys_[q(t)] = e; + t instanceof Ja && e.push( + it(t, "addlayer", this.handleLayerGroupAdd_, this), + it(t, "removelayer", this.handleLayerGroupRemove_, this) + ), this.listenerKeys_[rt(t)] = e; } handleLayerGroupAdd_(t) { - this.dispatchEvent(new Ci("addlayer", t.layer)); + this.dispatchEvent(new fi("addlayer", t.layer)); } handleLayerGroupRemove_(t) { - this.dispatchEvent(new Ci("removelayer", t.layer)); + this.dispatchEvent(new fi("removelayer", t.layer)); } handleLayersAdd_(t) { const e = t.element; - this.registerLayerListeners_(e), this.dispatchEvent(new Ci("addlayer", e)), this.changed(); + this.registerLayerListeners_(e), this.dispatchEvent(new fi("addlayer", e)), this.changed(); } handleLayersRemove_(t) { - const e = t.element, i = q(e); - this.listenerKeys_[i].forEach(mt), delete this.listenerKeys_[i], this.dispatchEvent(new Ci("removelayer", e)), this.changed(); + const e = t.element, n = rt(e); + this.listenerKeys_[n].forEach(pt), delete this.listenerKeys_[n], this.dispatchEvent(new fi("removelayer", e)), this.changed(); } getLayers() { - return this.get(sa.LAYERS); + return this.get(Go.LAYERS); } setLayers(t) { const e = this.getLayers(); if (e) { - const i = e.getArray(); - for (let s = 0, r = i.length; s < r; ++s) - this.dispatchEvent(new Ci("removelayer", i[s])); + const n = e.getArray(); + for (let s = 0, r = n.length; s < r; ++s) + this.dispatchEvent(new fi("removelayer", n[s])); } - this.set(sa.LAYERS, t); + this.set(Go.LAYERS, t); } getLayersArray(t) { return t = t !== void 0 ? t : [], this.getLayers().forEach(function(e) { @@ -2233,14 +2210,14 @@ class wl extends id { }), t; } getLayerStatesArray(t) { - const e = t !== void 0 ? t : [], i = e.length; + const e = t !== void 0 ? t : [], n = e.length; this.getLayers().forEach(function(o) { o.getLayerStatesArray(e); }); const s = this.getLayerState(); let r = s.zIndex; !t && s.zIndex === void 0 && (r = 0); - for (let o = i, a = e.length; o < a; o++) { + for (let o = n, a = e.length; o < a; o++) { const l = e[o]; l.opacity *= s.opacity, l.visible = l.visible && s.visible, l.maxResolution = Math.min( l.maxResolution, @@ -2248,7 +2225,7 @@ class wl extends id { ), l.minResolution = Math.max( l.minResolution, s.minResolution - ), l.minZoom = Math.max(l.minZoom, s.minZoom), l.maxZoom = Math.min(l.maxZoom, s.maxZoom), s.extent !== void 0 && (l.extent !== void 0 ? l.extent = Rs( + ), l.minZoom = Math.max(l.minZoom, s.minZoom), l.maxZoom = Math.min(l.maxZoom, s.maxZoom), s.extent !== void 0 && (l.extent !== void 0 ? l.extent = cs( l.extent, s.extent ) : l.extent = s.extent), l.zIndex === void 0 && (l.zIndex = r); @@ -2259,16 +2236,16 @@ class wl extends id { return "ready"; } } -const Oo = wl; -class b0 extends Re { - constructor(t, e, i) { - super(t), this.map = e, this.frameState = i !== void 0 ? i : null; +const go = Ja; +class q0 extends ke { + constructor(t, e, n) { + super(t), this.map = e, this.frameState = n !== void 0 ? n : null; } } -const Tn = b0; -class L0 extends Tn { - constructor(t, e, i, s, r, o) { - super(t, e, r), this.originalEvent = i, this.pixel_ = null, this.coordinate_ = null, this.dragging = s !== void 0 ? s : !1, this.activePointers = o; +const gn = q0; +class J0 extends gn { + constructor(t, e, n, s, r, o) { + super(t, e, r), this.originalEvent = n, this.pixel_ = null, this.coordinate_ = null, this.dragging = s !== void 0 ? s : !1, this.activePointers = o; } get pixel() { return this.pixel_ || (this.pixel_ = this.map.getEventPixel(this.originalEvent)), this.pixel_; @@ -2289,10 +2266,10 @@ class L0 extends Tn { super.stopPropagation(), "stopPropagation" in this.originalEvent && this.originalEvent.stopPropagation(); } } -const ei = L0, nt = { +const ci = J0, Ct = { SINGLECLICK: "singleclick", - CLICK: U.CLICK, - DBLCLICK: U.DBLCLICK, + CLICK: X.CLICK, + DBLCLICK: X.DBLCLICK, POINTERDRAG: "pointerdrag", POINTERMOVE: "pointermove", POINTERDOWN: "pointerdown", @@ -2302,7 +2279,7 @@ const ei = L0, nt = { POINTERENTER: "pointerenter", POINTERLEAVE: "pointerleave", POINTERCANCEL: "pointercancel" -}, Na = { +}, da = { POINTERMOVE: "pointermove", POINTERDOWN: "pointerdown", POINTERUP: "pointerup", @@ -2312,81 +2289,81 @@ const ei = L0, nt = { POINTERLEAVE: "pointerleave", POINTERCANCEL: "pointercancel" }; -class I0 extends So { +class Q0 extends so { constructor(t, e) { super(t), this.map_ = t, this.clickTimeoutId_, this.emulateClicks_ = !1, this.dragging_ = !1, this.dragListenerKeys_ = [], this.moveTolerance_ = e === void 0 ? 1 : e, this.down_ = null; - const i = this.map_.getViewport(); - this.activePointers_ = [], this.trackedTouches_ = {}, this.element_ = i, this.pointerdownListenerKey_ = et( - i, - Na.POINTERDOWN, + const n = this.map_.getViewport(); + this.activePointers_ = [], this.trackedTouches_ = {}, this.element_ = n, this.pointerdownListenerKey_ = it( + n, + da.POINTERDOWN, this.handlePointerDown_, this - ), this.originalPointerMoveEvent_, this.relayedListenerKey_ = et( - i, - Na.POINTERMOVE, + ), this.originalPointerMoveEvent_, this.relayedListenerKey_ = it( + n, + da.POINTERMOVE, this.relayMoveEvent_, this ), this.boundHandleTouchMove_ = this.handleTouchMove_.bind(this), this.element_.addEventListener( - U.TOUCHMOVE, + X.TOUCHMOVE, this.boundHandleTouchMove_, - Xu ? { passive: !1 } : !1 + vu ? { passive: !1 } : !1 ); } emulateClick_(t) { - let e = new ei( - nt.CLICK, + let e = new ci( + Ct.CLICK, this.map_, t ); - this.dispatchEvent(e), this.clickTimeoutId_ !== void 0 ? (clearTimeout(this.clickTimeoutId_), this.clickTimeoutId_ = void 0, e = new ei( - nt.DBLCLICK, + this.dispatchEvent(e), this.clickTimeoutId_ !== void 0 ? (clearTimeout(this.clickTimeoutId_), this.clickTimeoutId_ = void 0, e = new ci( + Ct.DBLCLICK, this.map_, t ), this.dispatchEvent(e)) : this.clickTimeoutId_ = setTimeout( function() { this.clickTimeoutId_ = void 0; - const i = new ei( - nt.SINGLECLICK, + const n = new ci( + Ct.SINGLECLICK, this.map_, t ); - this.dispatchEvent(i); + this.dispatchEvent(n); }.bind(this), 250 ); } updateActivePointers_(t) { - const e = t, i = e.pointerId; - if (e.type == nt.POINTERUP || e.type == nt.POINTERCANCEL) { - delete this.trackedTouches_[i]; + const e = t, n = e.pointerId; + if (e.type == Ct.POINTERUP || e.type == Ct.POINTERCANCEL) { + delete this.trackedTouches_[n]; for (const s in this.trackedTouches_) if (this.trackedTouches_[s].target !== e.target) { delete this.trackedTouches_[s]; break; } } else - (e.type == nt.POINTERDOWN || e.type == nt.POINTERMOVE) && (this.trackedTouches_[i] = e); + (e.type == Ct.POINTERDOWN || e.type == Ct.POINTERMOVE) && (this.trackedTouches_[n] = e); this.activePointers_ = Object.values(this.trackedTouches_); } handlePointerUp_(t) { this.updateActivePointers_(t); - const e = new ei( - nt.POINTERUP, + const e = new ci( + Ct.POINTERUP, this.map_, t, void 0, void 0, this.activePointers_ ); - this.dispatchEvent(e), this.emulateClicks_ && !e.defaultPrevented && !this.dragging_ && this.isMouseActionButton_(t) && this.emulateClick_(this.down_), this.activePointers_.length === 0 && (this.dragListenerKeys_.forEach(mt), this.dragListenerKeys_.length = 0, this.dragging_ = !1, this.down_ = null); + this.dispatchEvent(e), this.emulateClicks_ && !e.defaultPrevented && !this.dragging_ && this.isMouseActionButton_(t) && this.emulateClick_(this.down_), this.activePointers_.length === 0 && (this.dragListenerKeys_.forEach(pt), this.dragListenerKeys_.length = 0, this.dragging_ = !1, this.down_ = null); } isMouseActionButton_(t) { return t.button === 0; } handlePointerDown_(t) { this.emulateClicks_ = this.activePointers_.length === 0, this.updateActivePointers_(t); - const e = new ei( - nt.POINTERDOWN, + const e = new ci( + Ct.POINTERDOWN, this.map_, t, void 0, @@ -2394,30 +2371,30 @@ class I0 extends So { this.activePointers_ ); this.dispatchEvent(e), this.down_ = {}; - for (const i in t) { - const s = t[i]; - this.down_[i] = typeof s == "function" ? nn : s; + for (const n in t) { + const s = t[n]; + this.down_[n] = typeof s == "function" ? Ui : s; } if (this.dragListenerKeys_.length === 0) { - const i = this.map_.getOwnerDocument(); + const n = this.map_.getOwnerDocument(); this.dragListenerKeys_.push( - et( - i, - nt.POINTERMOVE, + it( + n, + Ct.POINTERMOVE, this.handlePointerMove_, this ), - et(i, nt.POINTERUP, this.handlePointerUp_, this), - et( + it(n, Ct.POINTERUP, this.handlePointerUp_, this), + it( this.element_, - nt.POINTERCANCEL, + Ct.POINTERCANCEL, this.handlePointerUp_, this ) - ), this.element_.getRootNode && this.element_.getRootNode() !== i && this.dragListenerKeys_.push( - et( + ), this.element_.getRootNode && this.element_.getRootNode() !== n && this.dragListenerKeys_.push( + it( this.element_.getRootNode(), - nt.POINTERUP, + Ct.POINTERUP, this.handlePointerUp_, this ) @@ -2427,8 +2404,8 @@ class I0 extends So { handlePointerMove_(t) { if (this.isMoving_(t)) { this.updateActivePointers_(t), this.dragging_ = !0; - const e = new ei( - nt.POINTERDRAG, + const e = new ci( + Ct.POINTERDRAG, this.map_, t, this.dragging_, @@ -2442,8 +2419,8 @@ class I0 extends So { this.originalPointerMoveEvent_ = t; const e = !!(this.down_ && this.isMoving_(t)); this.dispatchEvent( - new ei( - nt.POINTERMOVE, + new ci( + Ct.POINTERMOVE, this.map_, t, e @@ -2458,13 +2435,13 @@ class I0 extends So { return this.dragging_ || Math.abs(t.clientX - this.down_.clientX) > this.moveTolerance_ || Math.abs(t.clientY - this.down_.clientY) > this.moveTolerance_; } disposeInternal() { - this.relayedListenerKey_ && (mt(this.relayedListenerKey_), this.relayedListenerKey_ = null), this.element_.removeEventListener( - U.TOUCHMOVE, + this.relayedListenerKey_ && (pt(this.relayedListenerKey_), this.relayedListenerKey_ = null), this.element_.removeEventListener( + X.TOUCHMOVE, this.boundHandleTouchMove_ - ), this.pointerdownListenerKey_ && (mt(this.pointerdownListenerKey_), this.pointerdownListenerKey_ = null), this.dragListenerKeys_.forEach(mt), this.dragListenerKeys_.length = 0, this.element_ = null, super.disposeInternal(); + ), this.pointerdownListenerKey_ && (pt(this.pointerdownListenerKey_), this.pointerdownListenerKey_ = null), this.dragListenerKeys_.forEach(pt), this.dragListenerKeys_.length = 0, this.element_ = null, super.disposeInternal(); } } -const P0 = I0, vi = { +const tg = Q0, ui = { POSTRENDER: "postrender", MOVESTART: "movestart", MOVEEND: "moveend", @@ -2475,24 +2452,24 @@ const P0 = I0, vi = { SIZE: "size", TARGET: "target", VIEW: "view" -}, oo = 1 / 0; -class A0 { +}, zr = 1 / 0; +class eg { constructor(t, e) { this.priorityFunction_ = t, this.keyFunction_ = e, this.elements_ = [], this.priorities_ = [], this.queuedElements_ = {}; } clear() { - this.elements_.length = 0, this.priorities_.length = 0, Ks(this.queuedElements_); + this.elements_.length = 0, this.priorities_.length = 0, Ds(this.queuedElements_); } dequeue() { - const t = this.elements_, e = this.priorities_, i = t[0]; + const t = this.elements_, e = this.priorities_, n = t[0]; t.length == 1 ? (t.length = 0, e.length = 0) : (t[0] = t.pop(), e[0] = e.pop(), this.siftUp_(0)); - const s = this.keyFunction_(i); - return delete this.queuedElements_[s], i; + const s = this.keyFunction_(n); + return delete this.queuedElements_[s], n; } enqueue(t) { Y(!(this.keyFunction_(t) in this.queuedElements_), 31); const e = this.priorityFunction_(t); - return e != oo ? (this.elements_.push(t), this.priorities_.push(e), this.queuedElements_[this.keyFunction_(t)] = !0, this.siftDown_(0, this.elements_.length - 1), !0) : !1; + return e != zr ? (this.elements_.push(t), this.priorities_.push(e), this.queuedElements_[this.keyFunction_(t)] = !0, this.siftDown_(0, this.elements_.length - 1), !0) : !1; } getCount() { return this.elements_.length; @@ -2521,95 +2498,95 @@ class A0 { return this.isKeyQueued(this.keyFunction_(t)); } siftUp_(t) { - const e = this.elements_, i = this.priorities_, s = e.length, r = e[t], o = i[t], a = t; + const e = this.elements_, n = this.priorities_, s = e.length, r = e[t], o = n[t], a = t; for (; t < s >> 1; ) { - const l = this.getLeftChildIndex_(t), h = this.getRightChildIndex_(t), c = h < s && i[h] < i[l] ? h : l; - e[t] = e[c], i[t] = i[c], t = c; + const l = this.getLeftChildIndex_(t), h = this.getRightChildIndex_(t), c = h < s && n[h] < n[l] ? h : l; + e[t] = e[c], n[t] = n[c], t = c; } - e[t] = r, i[t] = o, this.siftDown_(a, t); + e[t] = r, n[t] = o, this.siftDown_(a, t); } siftDown_(t, e) { - const i = this.elements_, s = this.priorities_, r = i[e], o = s[e]; + const n = this.elements_, s = this.priorities_, r = n[e], o = s[e]; for (; e > t; ) { const a = this.getParentIndex_(e); if (s[a] > o) - i[e] = i[a], s[e] = s[a], e = a; + n[e] = n[a], s[e] = s[a], e = a; else break; } - i[e] = r, s[e] = o; + n[e] = r, s[e] = o; } reprioritize() { - const t = this.priorityFunction_, e = this.elements_, i = this.priorities_; + const t = this.priorityFunction_, e = this.elements_, n = this.priorities_; let s = 0; const r = e.length; let o, a, l; for (a = 0; a < r; ++a) - o = e[a], l = t(o), l == oo ? delete this.queuedElements_[this.keyFunction_(o)] : (i[s] = l, e[s++] = o); - e.length = s, i.length = s, this.heapify_(); + o = e[a], l = t(o), l == zr ? delete this.queuedElements_[this.keyFunction_(o)] : (n[s] = l, e[s++] = o); + e.length = s, n.length = s, this.heapify_(); } } -const O0 = A0, z = { +const ig = eg, z = { IDLE: 0, LOADING: 1, LOADED: 2, ERROR: 3, EMPTY: 4 }; -class F0 extends O0 { +class ng extends ig { constructor(t, e) { super( - function(i) { - return t.apply(null, i); + function(n) { + return t.apply(null, n); }, - function(i) { - return i[0].getKey(); + function(n) { + return n[0].getKey(); } ), this.boundHandleTileChange_ = this.handleTileChange.bind(this), this.tileChangeCallback_ = e, this.tilesLoading_ = 0, this.tilesLoadingKeys_ = {}; } enqueue(t) { const e = super.enqueue(t); - return e && t[0].addEventListener(U.CHANGE, this.boundHandleTileChange_), e; + return e && t[0].addEventListener(X.CHANGE, this.boundHandleTileChange_), e; } getTilesLoading() { return this.tilesLoading_; } handleTileChange(t) { - const e = t.target, i = e.getState(); - if (i === z.LOADED || i === z.ERROR || i === z.EMPTY) { - i !== z.ERROR && e.removeEventListener(U.CHANGE, this.boundHandleTileChange_); + const e = t.target, n = e.getState(); + if (n === z.LOADED || n === z.ERROR || n === z.EMPTY) { + n !== z.ERROR && e.removeEventListener(X.CHANGE, this.boundHandleTileChange_); const s = e.getKey(); s in this.tilesLoadingKeys_ && (delete this.tilesLoadingKeys_[s], --this.tilesLoading_), this.tileChangeCallback_(); } } loadMoreTiles(t, e) { - let i = 0, s, r, o; - for (; this.tilesLoading_ < t && i < e && this.getCount() > 0; ) - r = this.dequeue()[0], o = r.getKey(), s = r.getState(), s === z.IDLE && !(o in this.tilesLoadingKeys_) && (this.tilesLoadingKeys_[o] = !0, ++this.tilesLoading_, ++i, r.load()); + let n = 0, s, r, o; + for (; this.tilesLoading_ < t && n < e && this.getCount() > 0; ) + r = this.dequeue()[0], o = r.getKey(), s = r.getState(), s === z.IDLE && !(o in this.tilesLoadingKeys_) && (this.tilesLoadingKeys_[o] = !0, ++this.tilesLoading_, ++n, r.load()); } } -const N0 = F0; -function D0(n, t, e, i, s) { - if (!n || !(e in n.wantedTiles) || !n.wantedTiles[e][t.getKey()]) - return oo; - const r = n.viewState.center, o = i[0] - r[0], a = i[1] - r[1]; +const sg = ng; +function rg(i, t, e, n, s) { + if (!i || !(e in i.wantedTiles) || !i.wantedTiles[e][t.getKey()]) + return zr; + const r = i.viewState.center, o = n[0] - r[0], a = n[1] - r[1]; return 65536 * Math.log(s) + Math.sqrt(o * o + a * a) / s; } -const Wt = { +const Bt = { ANIMATING: 0, INTERACTING: 1 -}, be = { +}, xe = { CENTER: "center", RESOLUTION: "resolution", ROTATION: "rotation" -}, k0 = 42, Sl = 256, Yn = { +}, og = 42, Qa = 256, On = { radians: 6370997 / (2 * Math.PI), degrees: 2 * Math.PI * 6370997 / 360, ft: 0.3048, m: 1, "us-ft": 1200 / 3937 }; -class G0 { +class ag { constructor(t) { this.code_ = t.code, this.units_ = t.units, this.extent_ = t.extent !== void 0 ? t.extent : null, this.worldExtent_ = t.worldExtent !== void 0 ? t.worldExtent : null, this.axisOrientation_ = t.axisOrientation !== void 0 ? t.axisOrientation : "enu", this.global_ = t.global !== void 0 ? t.global : !1, this.canWrapX_ = !!(this.global_ && this.extent_), this.getPointResolutionFunc_ = t.getPointResolution, this.defaultTileGrid_ = null, this.metersPerUnit_ = t.metersPerUnit; } @@ -2626,7 +2603,7 @@ class G0 { return this.units_; } getMetersPerUnit() { - return this.metersPerUnit_ || Yn[this.units_]; + return this.metersPerUnit_ || On[this.units_]; } getWorldExtent() { return this.worldExtent_; @@ -2659,151 +2636,151 @@ class G0 { return this.getPointResolutionFunc_; } } -const Rl = G0, tr = 6378137, Pn = Math.PI * tr, $0 = [-Pn, -Pn, Pn, Pn], B0 = [-180, -85, 180, 85], Tr = tr * Math.log(Math.tan(Math.PI / 2)); -class Cn extends Rl { +const tl = ag, Gs = 6378137, yn = Math.PI * Gs, lg = [-yn, -yn, yn, yn], hg = [-180, -85, 180, 85], fr = Gs * Math.log(Math.tan(Math.PI / 2)); +class ln extends tl { constructor(t) { super({ code: t, units: "m", - extent: $0, + extent: lg, global: !0, - worldExtent: B0, - getPointResolution: function(e, i) { - return e / Math.cosh(i[1] / tr); + worldExtent: hg, + getPointResolution: function(e, n) { + return e / Math.cosh(n[1] / Gs); } }); } } -const Xh = [ - new Cn("EPSG:3857"), - new Cn("EPSG:102100"), - new Cn("EPSG:102113"), - new Cn("EPSG:900913"), - new Cn("http://www.opengis.net/def/crs/EPSG/0/3857"), - new Cn("http://www.opengis.net/gml/srs/epsg.xml#3857") +const xh = [ + new ln("EPSG:3857"), + new ln("EPSG:102100"), + new ln("EPSG:102113"), + new ln("EPSG:900913"), + new ln("http://www.opengis.net/def/crs/EPSG/0/3857"), + new ln("http://www.opengis.net/gml/srs/epsg.xml#3857") ]; -function z0(n, t, e) { - const i = n.length; - e = e > 1 ? e : 2, t === void 0 && (e > 2 ? t = n.slice() : t = new Array(i)); - for (let s = 0; s < i; s += e) { - t[s] = Pn * n[s] / 180; - let r = tr * Math.log(Math.tan(Math.PI * (+n[s + 1] + 90) / 360)); - r > Tr ? r = Tr : r < -Tr && (r = -Tr), t[s + 1] = r; +function cg(i, t, e) { + const n = i.length; + e = e > 1 ? e : 2, t === void 0 && (e > 2 ? t = i.slice() : t = new Array(n)); + for (let s = 0; s < n; s += e) { + t[s] = yn * i[s] / 180; + let r = Gs * Math.log(Math.tan(Math.PI * (+i[s + 1] + 90) / 360)); + r > fr ? r = fr : r < -fr && (r = -fr), t[s + 1] = r; } return t; } -function Z0(n, t, e) { - const i = n.length; - e = e > 1 ? e : 2, t === void 0 && (e > 2 ? t = n.slice() : t = new Array(i)); - for (let s = 0; s < i; s += e) - t[s] = 180 * n[s] / Pn, t[s + 1] = 360 * Math.atan(Math.exp(n[s + 1] / tr)) / Math.PI - 90; +function ug(i, t, e) { + const n = i.length; + e = e > 1 ? e : 2, t === void 0 && (e > 2 ? t = i.slice() : t = new Array(n)); + for (let s = 0; s < n; s += e) + t[s] = 180 * i[s] / yn, t[s + 1] = 360 * Math.atan(Math.exp(i[s + 1] / Gs)) / Math.PI - 90; return t; } -const V0 = 6378137, Yh = [-180, -90, 180, 90], U0 = Math.PI * V0 / 180; -class Bi extends Rl { +const dg = 6378137, Mh = [-180, -90, 180, 90], fg = Math.PI * dg / 180; +class bi extends tl { constructor(t, e) { super({ code: t, units: "degrees", - extent: Yh, + extent: Mh, axisOrientation: e, global: !0, - metersPerUnit: U0, - worldExtent: Yh + metersPerUnit: fg, + worldExtent: Mh }); } } -const jh = [ - new Bi("CRS:84"), - new Bi("EPSG:4326", "neu"), - new Bi("urn:ogc:def:crs:OGC:1.3:CRS84"), - new Bi("urn:ogc:def:crs:OGC:2:84"), - new Bi("http://www.opengis.net/def/crs/OGC/1.3/CRS84"), - new Bi("http://www.opengis.net/gml/srs/epsg.xml#4326", "neu"), - new Bi("http://www.opengis.net/def/crs/EPSG/0/4326", "neu") +const Ch = [ + new bi("CRS:84"), + new bi("EPSG:4326", "neu"), + new bi("urn:ogc:def:crs:OGC:1.3:CRS84"), + new bi("urn:ogc:def:crs:OGC:2:84"), + new bi("http://www.opengis.net/def/crs/OGC/1.3/CRS84"), + new bi("http://www.opengis.net/gml/srs/epsg.xml#4326", "neu"), + new bi("http://www.opengis.net/def/crs/EPSG/0/4326", "neu") ]; -let Da = {}; -function W0(n) { - return Da[n] || Da[n.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null; +let fa = {}; +function gg(i) { + return fa[i] || fa[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null; } -function H0(n, t) { - Da[n] = t; +function mg(i, t) { + fa[i] = t; } -let Bn = {}; -function jn(n, t, e) { - const i = n.getCode(), s = t.getCode(); - i in Bn || (Bn[i] = {}), Bn[i][s] = e; +let Rn = {}; +function Nn(i, t, e) { + const n = i.getCode(), s = t.getCode(); + n in Rn || (Rn[n] = {}), Rn[n][s] = e; } -function dd(n, t) { +function zu(i, t) { let e; - return n in Bn && t in Bn[n] && (e = Bn[n][t]), e; + return i in Rn && t in Rn[i] && (e = Rn[i][t]), e; } -const fd = 63710088e-1; -function qh(n, t, e) { - e = e || fd; - const i = ji(n[1]), s = ji(t[1]), r = (s - i) / 2, o = ji(t[0] - n[0]) / 2, a = Math.sin(r) * Math.sin(r) + Math.sin(o) * Math.sin(o) * Math.cos(i) * Math.cos(s); +const Zu = 63710088e-1; +function Eh(i, t, e) { + e = e || Zu; + const n = Gi(i[1]), s = Gi(t[1]), r = (s - n) / 2, o = Gi(t[0] - i[0]) / 2, a = Math.sin(r) * Math.sin(r) + Math.sin(o) * Math.sin(o) * Math.cos(n) * Math.cos(s); return 2 * e * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); } -function X0(n, t, e, i) { - i = i || fd; - const s = ji(n[1]), r = ji(n[0]), o = t / i, a = Math.asin( +function _g(i, t, e, n) { + n = n || Zu; + const s = Gi(i[1]), r = Gi(i[0]), o = t / n, a = Math.asin( Math.sin(s) * Math.cos(o) + Math.cos(s) * Math.sin(o) * Math.cos(e) ), l = r + Math.atan2( Math.sin(e) * Math.sin(o) * Math.cos(s), Math.cos(o) - Math.sin(s) * Math.sin(a) ); - return [Bh(l), Bh(a)]; + return [fh(l), fh(a)]; } -let ka = !0; -function gd(n) { - ka = !(n === void 0 ? !0 : n); +let ga = !0; +function Uu(i) { + ga = !(i === void 0 ? !0 : i); } -function Tl(n, t, e) { +function el(i, t, e) { if (t !== void 0) { - for (let i = 0, s = n.length; i < s; ++i) - t[i] = n[i]; + for (let n = 0, s = i.length; n < s; ++n) + t[n] = i[n]; t = t; } else - t = n.slice(); + t = i.slice(); return t; } -function bl(n, t, e) { - if (t !== void 0 && n !== t) { - for (let i = 0, s = n.length; i < s; ++i) - t[i] = n[i]; - n = t; +function il(i, t, e) { + if (t !== void 0 && i !== t) { + for (let n = 0, s = i.length; n < s; ++n) + t[n] = i[n]; + i = t; } - return n; + return i; } -function md(n) { - H0(n.getCode(), n), jn(n, n, Tl); +function Vu(i) { + mg(i.getCode(), i), Nn(i, i, el); } -function Y0(n) { - n.forEach(md); +function pg(i) { + i.forEach(Vu); } -function Q(n) { - return typeof n == "string" ? W0(n) : n || null; +function J(i) { + return typeof i == "string" ? gg(i) : i || null; } -function ao(n, t, e, i) { - n = Q(n); +function Zr(i, t, e, n) { + i = J(i); let s; - const r = n.getPointResolutionFunc(); + const r = i.getPointResolutionFunc(); if (r) { - if (s = r(t, e), i && i !== n.getUnits()) { - const o = n.getMetersPerUnit(); - o && (s = s * o / Yn[i]); + if (s = r(t, e), n && n !== i.getUnits()) { + const o = i.getMetersPerUnit(); + o && (s = s * o / On[n]); } } else { - const o = n.getUnits(); - if (o == "degrees" && !i || i == "degrees") + const o = i.getUnits(); + if (o == "degrees" && !n || n == "degrees") s = t; else { - const a = Fo( - n, - Q("EPSG:4326") + const a = mo( + i, + J("EPSG:4326") ); - if (a === bl && o !== "degrees") - s = t * n.getMetersPerUnit(); + if (a === il && o !== "degrees") + s = t * i.getMetersPerUnit(); else { let h = [ e[0] - t / 2, @@ -2816,204 +2793,204 @@ function ao(n, t, e, i) { e[1] + t / 2 ]; h = a(h, h, 2); - const c = qh(h.slice(0, 2), h.slice(2, 4)), u = qh(h.slice(4, 6), h.slice(6, 8)); + const c = Eh(h.slice(0, 2), h.slice(2, 4)), u = Eh(h.slice(4, 6), h.slice(6, 8)); s = (c + u) / 2; } - const l = i ? Yn[i] : n.getMetersPerUnit(); + const l = n ? On[n] : i.getMetersPerUnit(); l !== void 0 && (s /= l); } } return s; } -function Ga(n) { - Y0(n), n.forEach(function(t) { - n.forEach(function(e) { - t !== e && jn(t, e, Tl); +function ma(i) { + pg(i), i.forEach(function(t) { + i.forEach(function(e) { + t !== e && Nn(t, e, el); }); }); } -function j0(n, t, e, i) { - n.forEach(function(s) { +function yg(i, t, e, n) { + i.forEach(function(s) { t.forEach(function(r) { - jn(s, r, e), jn(r, s, i); + Nn(s, r, e), Nn(r, s, n); }); }); } -function Ll(n, t) { - return n ? typeof n == "string" ? Q(n) : n : Q(t); +function nl(i, t) { + return i ? typeof i == "string" ? J(i) : i : J(t); } -function Kh(n) { - return function(t, e, i) { +function wh(i) { + return function(t, e, n) { const s = t.length; - i = i !== void 0 ? i : 2, e = e !== void 0 ? e : new Array(s); - for (let r = 0; r < s; r += i) { - const o = n(t.slice(r, r + i)), a = o.length; - for (let l = 0, h = i; l < h; ++l) + n = n !== void 0 ? n : 2, e = e !== void 0 ? e : new Array(s); + for (let r = 0; r < s; r += n) { + const o = i(t.slice(r, r + n)), a = o.length; + for (let l = 0, h = n; l < h; ++l) e[r + l] = l >= a ? t[r + l] : o[l]; } return e; }; } -function q0(n, t, e, i) { - const s = Q(n), r = Q(t); - jn( +function vg(i, t, e, n) { + const s = J(i), r = J(t); + Nn( s, r, - Kh(e) - ), jn( + wh(e) + ), Nn( r, s, - Kh(i) + wh(n) ); } -function K0(n, t) { - return gd(), _d( - n, +function xg(i, t) { + return Uu(), Wu( + i, "EPSG:4326", t !== void 0 ? t : "EPSG:3857" ); } -function Ne(n, t) { - if (n === t) +function be(i, t) { + if (i === t) return !0; - const e = n.getUnits() === t.getUnits(); - return (n.getCode() === t.getCode() || Fo(n, t) === Tl) && e; + const e = i.getUnits() === t.getUnits(); + return (i.getCode() === t.getCode() || mo(i, t) === el) && e; } -function Fo(n, t) { - const e = n.getCode(), i = t.getCode(); - let s = dd(e, i); - return s || (s = bl), s; +function mo(i, t) { + const e = i.getCode(), n = t.getCode(); + let s = zu(e, n); + return s || (s = il), s; } -function zs(n, t) { - const e = Q(n), i = Q(t); - return Fo(e, i); +function Ss(i, t) { + const e = J(i), n = J(t); + return mo(e, n); } -function _d(n, t, e) { - return zs(t, e)(n, void 0, n.length); +function Wu(i, t, e) { + return Ss(t, e)(i, void 0, i.length); } -function pd(n, t, e, i) { - const s = zs(t, e); - return t0(n, s, void 0, i); +function Hu(i, t, e, n) { + const s = Ss(t, e); + return S0(i, s, void 0, n); } -function qn(n, t) { - return n; +function _a(i, t) { + return i; } -function vt(n, t) { - return ka && !Le(n, [0, 0]) && n[0] >= -180 && n[0] <= 180 && n[1] >= -90 && n[1] <= 90 && (ka = !1, console.warn( +function Xe(i, t) { + return ga && !Dr(i, [0, 0]) && i[0] >= -180 && i[0] <= 180 && i[1] >= -90 && i[1] <= 90 && (ga = !1, console.warn( "Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates." - )), n; + )), i; } -function Il(n, t) { - return n; +function Xu(i, t) { + return i; } -function Mi(n, t) { - return n; +function Pi(i, t) { + return i; } -function Jh(n, t, e) { - return function(i) { +function Sh(i, t, e) { + return function(n) { let s, r; - if (n.canWrapX()) { - const o = n.getExtent(), a = pt(o); - i = i.slice(0), r = od(i, n, a), r && (i[0] = i[0] - r * a), i[0] = Et(i[0], o[0], o[2]), i[1] = Et(i[1], o[1], o[3]), s = e(i); + if (i.canWrapX()) { + const o = i.getExtent(), a = mt(o); + n = n.slice(0), r = Fu(n, i, a), r && (n[0] = n[0] - r * a), n[0] = wt(n[0], o[0], o[2]), n[1] = wt(n[1], o[1], o[3]), s = e(n); } else - s = e(i); - return r && t.canWrapX() && (s[0] += r * pt(t.getExtent())), s; + s = e(n); + return r && t.canWrapX() && (s[0] += r * mt(t.getExtent())), s; }; } -function J0() { - Ga(Xh), Ga(jh), j0( - jh, - Xh, - z0, - Z0 +function Mg() { + ma(xh), ma(Ch), yg( + Ch, + xh, + cg, + ug ); } -J0(); -function Qh(n, t, e) { - return function(i, s, r, o, a) { - if (!i) +Mg(); +function Rh(i, t, e) { + return function(n, s, r, o, a) { + if (!n) return; if (!s && !t) - return i; + return n; const l = t ? 0 : r[0] * s, h = t ? 0 : r[1] * s, c = a ? a[0] : 0, u = a ? a[1] : 0; - let d = n[0] + l / 2 + c, f = n[2] - l / 2 + c, g = n[1] + h / 2 + u, m = n[3] - h / 2 + u; + let d = i[0] + l / 2 + c, f = i[2] - l / 2 + c, g = i[1] + h / 2 + u, m = i[3] - h / 2 + u; d > f && (d = (f + d) / 2, f = d), g > m && (g = (m + g) / 2, m = g); - let _ = Et(i[0], d, f), y = Et(i[1], g, m); + let _ = wt(n[0], d, f), y = wt(n[1], g, m); if (o && e && s) { const p = 30 * s; - _ += -p * Math.log(1 + Math.max(0, d - i[0]) / p) + p * Math.log(1 + Math.max(0, i[0] - f) / p), y += -p * Math.log(1 + Math.max(0, g - i[1]) / p) + p * Math.log(1 + Math.max(0, i[1] - m) / p); + _ += -p * Math.log(1 + Math.max(0, d - n[0]) / p) + p * Math.log(1 + Math.max(0, n[0] - f) / p), y += -p * Math.log(1 + Math.max(0, g - n[1]) / p) + p * Math.log(1 + Math.max(0, n[1] - m) / p); } return [_, y]; }; } -function Q0(n) { - return n; +function Cg(i) { + return i; } -function Pl(n, t, e, i) { - const s = pt(t) / e[0], r = ze(t) / e[1]; - return i ? Math.min(n, Math.max(s, r)) : Math.min(n, Math.min(s, r)); +function sl(i, t, e, n) { + const s = mt(t) / e[0], r = Ne(t) / e[1]; + return n ? Math.min(i, Math.max(s, r)) : Math.min(i, Math.min(s, r)); } -function Al(n, t, e) { - let i = Math.min(n, t); +function rl(i, t, e) { + let n = Math.min(i, t); const s = 50; - return i *= Math.log(1 + s * Math.max(0, n / t - 1)) / s + 1, e && (i = Math.max(i, e), i /= Math.log(1 + s * Math.max(0, e / n - 1)) / s + 1), Et(i, e / 2, t * 2); + return n *= Math.log(1 + s * Math.max(0, i / t - 1)) / s + 1, e && (n = Math.max(n, e), n /= Math.log(1 + s * Math.max(0, e / i - 1)) / s + 1), wt(n, e / 2, t * 2); } -function t1(n, t, e, i) { +function Eg(i, t, e, n) { return t = t !== void 0 ? t : !0, function(s, r, o, a) { if (s !== void 0) { - const l = n[0], h = n[n.length - 1], c = e ? Pl( + const l = i[0], h = i[i.length - 1], c = e ? sl( l, e, o, - i + n ) : l; if (a) - return t ? Al( + return t ? rl( s, c, h - ) : Et(s, h, c); - const u = Math.min(c, s), d = Math.floor(gl(n, u, r)); - return n[d] > c && d < n.length - 1 ? n[d + 1] : n[d]; + ) : wt(s, h, c); + const u = Math.min(c, s), d = Math.floor(Wa(i, u, r)); + return i[d] > c && d < i.length - 1 ? i[d + 1] : i[d]; } else return; }; } -function e1(n, t, e, i, s, r) { - return i = i !== void 0 ? i : !0, e = e !== void 0 ? e : 0, function(o, a, l, h) { +function wg(i, t, e, n, s, r) { + return n = n !== void 0 ? n : !0, e = e !== void 0 ? e : 0, function(o, a, l, h) { if (o !== void 0) { - const c = s ? Pl( + const c = s ? sl( t, s, l, r ) : t; if (h) - return i ? Al( + return n ? rl( o, c, e - ) : Et(o, e, c); + ) : wt(o, e, c); const u = 1e-9, d = Math.ceil( - Math.log(t / c) / Math.log(n) - u + Math.log(t / c) / Math.log(i) - u ), f = -a * (0.5 - u) + 0.5, g = Math.min(c, o), m = Math.floor( - Math.log(t / g) / Math.log(n) + f - ), _ = Math.max(d, m), y = t / Math.pow(n, _); - return Et(y, e, c); + Math.log(t / g) / Math.log(i) + f + ), _ = Math.max(d, m), y = t / Math.pow(i, _); + return wt(y, e, c); } else return; }; } -function tc(n, t, e, i, s) { +function bh(i, t, e, n, s) { return e = e !== void 0 ? e : !0, function(r, o, a, l) { if (r !== void 0) { - const h = i ? Pl( - n, + const h = n ? sl( i, + n, a, s - ) : n; - return !e || !l ? Et(r, t, h) : Al( + ) : i; + return !e || !l ? wt(r, t, h) : rl( r, h, t @@ -3022,94 +2999,94 @@ function tc(n, t, e, i, s) { return; }; } -function Ol(n) { - if (n !== void 0) +function ol(i) { + if (i !== void 0) return 0; } -function ec(n) { - if (n !== void 0) - return n; +function Lh(i) { + if (i !== void 0) + return i; } -function i1(n) { - const t = 2 * Math.PI / n; - return function(e, i) { - if (i) +function Sg(i) { + const t = 2 * Math.PI / i; + return function(e, n) { + if (n) return e; if (e !== void 0) return e = Math.floor(e / t + 0.5) * t, e; }; } -function n1(n) { - return n = n || ji(5), function(t, e) { +function Rg(i) { + return i = i || Gi(5), function(t, e) { if (e) return t; if (t !== void 0) - return Math.abs(t) <= n ? 0 : t; + return Math.abs(t) <= i ? 0 : t; }; } -function yd(n) { - return Math.pow(n, 3); +function Yu(i) { + return Math.pow(i, 3); } -function rs(n) { - return 1 - yd(1 - n); +function Vn(i) { + return 1 - Yu(1 - i); } -function s1(n) { - return 3 * n * n - 2 * n * n * n; +function bg(i) { + return 3 * i * i - 2 * i * i * i; } -function r1(n) { - return n; +function Lg(i) { + return i; } -function Ki(n, t, e, i, s, r) { +function $i(i, t, e, n, s, r) { r = r || []; let o = 0; - for (let a = t; a < e; a += i) { - const l = n[a], h = n[a + 1]; + for (let a = t; a < e; a += n) { + const l = i[a], h = i[a + 1]; r[o++] = s[0] * l + s[2] * h + s[4], r[o++] = s[1] * l + s[3] * h + s[5]; } return r && r.length != o && (r.length = o), r; } -function Fl(n, t, e, i, s, r, o) { +function ju(i, t, e, n, s, r, o) { o = o || []; const a = Math.cos(s), l = Math.sin(s), h = r[0], c = r[1]; let u = 0; - for (let d = t; d < e; d += i) { - const f = n[d] - h, g = n[d + 1] - c; + for (let d = t; d < e; d += n) { + const f = i[d] - h, g = i[d + 1] - c; o[u++] = h + f * a - g * l, o[u++] = c + f * l + g * a; - for (let m = d + 2; m < d + i; ++m) - o[u++] = n[m]; + for (let m = d + 2; m < d + n; ++m) + o[u++] = i[m]; } return o && o.length != u && (o.length = u), o; } -function o1(n, t, e, i, s, r, o, a) { +function Tg(i, t, e, n, s, r, o, a) { a = a || []; const l = o[0], h = o[1]; let c = 0; - for (let u = t; u < e; u += i) { - const d = n[u] - l, f = n[u + 1] - h; + for (let u = t; u < e; u += n) { + const d = i[u] - l, f = i[u + 1] - h; a[c++] = l + s * d, a[c++] = h + r * f; - for (let g = u + 2; g < u + i; ++g) - a[c++] = n[g]; + for (let g = u + 2; g < u + n; ++g) + a[c++] = i[g]; } return a && a.length != c && (a.length = c), a; } -function vd(n, t, e, i, s, r, o) { +function Ig(i, t, e, n, s, r, o) { o = o || []; let a = 0; - for (let l = t; l < e; l += i) { - o[a++] = n[l] + s, o[a++] = n[l + 1] + r; - for (let h = l + 2; h < l + i; ++h) - o[a++] = n[h]; + for (let l = t; l < e; l += n) { + o[a++] = i[l] + s, o[a++] = i[l + 1] + r; + for (let h = l + 2; h < l + n; ++h) + o[a++] = i[h]; } return o && o.length != a && (o.length = a), o; } -const ic = $e(); -class a1 extends Oe { +const Th = Pe(); +class Ag extends Se { constructor() { - super(), this.extent_ = se(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = Ag(function(t, e, i) { - if (!i) + super(), this.extent_ = ue(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = n0(function(t, e, n) { + if (!n) return this.getSimplifiedGeometry(e); const s = this.clone(); - return s.applyTransform(i), s.getSimplifiedGeometry(e); + return s.applyTransform(n), s.getSimplifiedGeometry(e); }); } simplifyTransformed(t, e) { @@ -3120,14 +3097,14 @@ class a1 extends Oe { ); } clone() { - return H(); + return W(); } - closestPointXY(t, e, i, s) { - return H(); + closestPointXY(t, e, n, s) { + return W(); } containsXY(t, e) { - const i = this.getClosestPoint([t, e]); - return i[0] === t && i[1] === e; + const n = this.getClosestPoint([t, e]); + return n[0] === t && n[1] === e; } getClosestPoint(t, e) { return e = e || [NaN, NaN], this.closestPointXY(t[0], t[1], e, 1 / 0), e; @@ -3136,44 +3113,44 @@ class a1 extends Oe { return this.containsXY(t[0], t[1]); } computeExtent(t) { - return H(); + return W(); } getExtent(t) { if (this.extentRevision_ != this.getRevision()) { const e = this.computeExtent(this.extent_); - (isNaN(e[0]) || isNaN(e[1])) && Qs(e), this.extentRevision_ = this.getRevision(); + (isNaN(e[0]) || isNaN(e[1])) && ks(e), this.extentRevision_ = this.getRevision(); } - return Jg(this.extent_, t); + return E0(this.extent_, t); } rotate(t, e) { - H(); + W(); } - scale(t, e, i) { - H(); + scale(t, e, n) { + W(); } simplify(t) { return this.getSimplifiedGeometry(t * t); } getSimplifiedGeometry(t) { - return H(); + return W(); } getType() { - return H(); + return W(); } applyTransform(t) { - H(); + W(); } intersectsExtent(t) { - return H(); + return W(); } translate(t, e) { - H(); + W(); } transform(t, e) { - const i = Q(t), s = i.getUnits() == "tile-pixels" ? function(r, o, a) { - const l = i.getExtent(), h = i.getWorldExtent(), c = ze(h) / ze(l); - return Ii( - ic, + const n = J(t), s = n.getUnits() == "tile-pixels" ? function(r, o, a) { + const l = n.getExtent(), h = n.getWorldExtent(), c = Ne(h) / Ne(l); + return xi( + Th, h[0], h[3], c, @@ -3181,29 +3158,29 @@ class a1 extends Oe { 0, 0, 0 - ), Ki( + ), $i( r, 0, r.length, a, - ic, + Th, o - ), zs(i, e)( + ), Ss(n, e)( r, o, a ); - } : zs(i, e); + } : Ss(n, e); return this.applyTransform(s), this; } } -const xd = a1; -class l1 extends xd { +const Ku = Ag; +class Pg extends Ku { constructor() { super(), this.layout = "XY", this.stride = 2, this.flatCoordinates = null; } computeExtent(t) { - return qu( + return Eu( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -3212,7 +3189,7 @@ class l1 extends xd { ); } getCoordinates() { - return H(); + return W(); } getFirstCoordinate() { return this.flatCoordinates.slice(0, this.stride); @@ -3241,23 +3218,23 @@ class l1 extends xd { return this.stride; } setFlatCoordinates(t, e) { - this.stride = lo(t), this.layout = t, this.flatCoordinates = e; + this.stride = Ih(t), this.layout = t, this.flatCoordinates = e; } setCoordinates(t, e) { - H(); + W(); } - setLayout(t, e, i) { + setLayout(t, e, n) { let s; if (t) - s = lo(t); + s = Ih(t); else { - for (let r = 0; r < i; ++r) + for (let r = 0; r < n; ++r) if (e.length === 0) { this.layout = "XY", this.stride = 2; return; } else e = e[0]; - s = e.length, t = h1(s); + s = e.length, t = Og(s); } this.layout = t, this.stride = s; } @@ -3265,69 +3242,69 @@ class l1 extends xd { this.flatCoordinates && (t(this.flatCoordinates, this.flatCoordinates, this.stride), this.changed()); } rotate(t, e) { - const i = this.getFlatCoordinates(); - if (i) { + const n = this.getFlatCoordinates(); + if (n) { const s = this.getStride(); - Fl( - i, + ju( + n, 0, - i.length, + n.length, s, t, e, - i + n ), this.changed(); } } - scale(t, e, i) { - e === void 0 && (e = t), i || (i = Pi(this.getExtent())); + scale(t, e, n) { + e === void 0 && (e = t), n || (n = Mi(this.getExtent())); const s = this.getFlatCoordinates(); if (s) { const r = this.getStride(); - o1( + Tg( s, 0, s.length, r, t, e, - i, + n, s ), this.changed(); } } translate(t, e) { - const i = this.getFlatCoordinates(); - if (i) { + const n = this.getFlatCoordinates(); + if (n) { const s = this.getStride(); - vd( - i, + Ig( + n, 0, - i.length, + n.length, s, t, e, - i + n ), this.changed(); } } } -function h1(n) { +function Og(i) { let t; - return n == 2 ? t = "XY" : n == 3 ? t = "XYZ" : n == 4 && (t = "XYZM"), t; + return i == 2 ? t = "XY" : i == 3 ? t = "XYZ" : i == 4 && (t = "XYZM"), t; } -function lo(n) { +function Ih(i) { let t; - return n == "XY" ? t = 2 : n == "XYZ" || n == "XYM" ? t = 3 : n == "XYZM" && (t = 4), t; + return i == "XY" ? t = 2 : i == "XYZ" || i == "XYM" ? t = 3 : i == "XYZM" && (t = 4), t; } -function c1(n, t, e) { - const i = n.getFlatCoordinates(); - if (i) { - const s = n.getStride(); - return Ki( - i, +function Ng(i, t, e) { + const n = i.getFlatCoordinates(); + if (n) { + const s = i.getStride(); + return $i( + n, 0, - i.length, + n.length, s, t, e @@ -3335,9 +3312,9 @@ function c1(n, t, e) { } else return null; } -const Di = l1; -function nc(n, t, e, i, s, r, o) { - const a = n[t], l = n[t + 1], h = n[e] - a, c = n[e + 1] - l; +const Qi = Pg; +function Ah(i, t, e, n, s, r, o) { + const a = i[t], l = i[t + 1], h = i[e] - a, c = i[e + 1] - l; let u; if (h === 0 && c === 0) u = t; @@ -3346,103 +3323,103 @@ function nc(n, t, e, i, s, r, o) { if (d > 1) u = e; else if (d > 0) { - for (let f = 0; f < i; ++f) - o[f] = ii( - n[t + f], - n[e + f], + for (let f = 0; f < n; ++f) + o[f] = Ye( + i[t + f], + i[e + f], d ); - o.length = i; + o.length = n; return; } else u = t; } - for (let d = 0; d < i; ++d) - o[d] = n[u + d]; - o.length = i; + for (let d = 0; d < n; ++d) + o[d] = i[u + d]; + o.length = n; } -function Nl(n, t, e, i, s) { - let r = n[t], o = n[t + 1]; - for (t += i; t < e; t += i) { - const a = n[t], l = n[t + 1], h = ri(r, o, a, l); +function al(i, t, e, n, s) { + let r = i[t], o = i[t + 1]; + for (t += n; t < e; t += n) { + const a = i[t], l = i[t + 1], h = ki(r, o, a, l); h > s && (s = h), r = a, o = l; } return s; } -function Dl(n, t, e, i, s) { +function ll(i, t, e, n, s) { for (let r = 0, o = e.length; r < o; ++r) { const a = e[r]; - s = Nl(n, t, a, i, s), t = a; + s = al(i, t, a, n, s), t = a; } return s; } -function u1(n, t, e, i, s) { +function Fg(i, t, e, n, s) { for (let r = 0, o = e.length; r < o; ++r) { const a = e[r]; - s = Dl(n, t, a, i, s), t = a[a.length - 1]; + s = ll(i, t, a, n, s), t = a[a.length - 1]; } return s; } -function kl(n, t, e, i, s, r, o, a, l, h, c) { +function hl(i, t, e, n, s, r, o, a, l, h, c) { if (t == e) return h; let u, d; if (s === 0) - if (d = ri( + if (d = ki( o, a, - n[t], - n[t + 1] + i[t], + i[t + 1] ), d < h) { - for (u = 0; u < i; ++u) - l[u] = n[t + u]; - return l.length = i, d; + for (u = 0; u < n; ++u) + l[u] = i[t + u]; + return l.length = n, d; } else return h; c = c || [NaN, NaN]; - let f = t + i; + let f = t + n; for (; f < e; ) - if (nc( - n, - f - i, - f, + if (Ah( i, + f - n, + f, + n, o, a, c - ), d = ri(o, a, c[0], c[1]), d < h) { - for (h = d, u = 0; u < i; ++u) + ), d = ki(o, a, c[0], c[1]), d < h) { + for (h = d, u = 0; u < n; ++u) l[u] = c[u]; - l.length = i, f += i; + l.length = n, f += n; } else - f += i * Math.max( + f += n * Math.max( (Math.sqrt(d) - Math.sqrt(h)) / s | 0, 1 ); - if (r && (nc( - n, - e - i, - t, + if (r && (Ah( i, + e - n, + t, + n, o, a, c - ), d = ri(o, a, c[0], c[1]), d < h)) { - for (h = d, u = 0; u < i; ++u) + ), d = ki(o, a, c[0], c[1]), d < h)) { + for (h = d, u = 0; u < n; ++u) l[u] = c[u]; - l.length = i; + l.length = n; } return h; } -function Gl(n, t, e, i, s, r, o, a, l, h, c) { +function cl(i, t, e, n, s, r, o, a, l, h, c) { c = c || [NaN, NaN]; for (let u = 0, d = e.length; u < d; ++u) { const f = e[u]; - h = kl( - n, + h = hl( + i, t, f, - i, + n, s, r, o, @@ -3454,15 +3431,15 @@ function Gl(n, t, e, i, s, r, o, a, l, h, c) { } return h; } -function d1(n, t, e, i, s, r, o, a, l, h, c) { +function Dg(i, t, e, n, s, r, o, a, l, h, c) { c = c || [NaN, NaN]; for (let u = 0, d = e.length; u < d; ++u) { const f = e[u]; - h = Gl( - n, + h = cl( + i, t, f, - i, + n, s, r, o, @@ -3474,81 +3451,81 @@ function d1(n, t, e, i, s, r, o, a, l, h, c) { } return h; } -function Cd(n, t, e, i) { +function kg(i, t, e, n) { for (let s = 0, r = e.length; s < r; ++s) - n[t++] = e[s]; + i[t++] = e[s]; return t; } -function No(n, t, e, i) { +function _o(i, t, e, n) { for (let s = 0, r = e.length; s < r; ++s) { const o = e[s]; - for (let a = 0; a < i; ++a) - n[t++] = o[a]; + for (let a = 0; a < n; ++a) + i[t++] = o[a]; } return t; } -function $l(n, t, e, i, s) { +function ul(i, t, e, n, s) { s = s || []; let r = 0; for (let o = 0, a = e.length; o < a; ++o) { - const l = No( - n, + const l = _o( + i, t, e[o], - i + n ); s[r++] = l, t = l; } return s.length = r, s; } -function f1(n, t, e, i, s) { +function Gg(i, t, e, n, s) { s = s || []; let r = 0; for (let o = 0, a = e.length; o < a; ++o) { - const l = $l( - n, + const l = ul( + i, t, e[o], - i, + n, s[r] ); l.length === 0 && (l[0] = t), s[r++] = l, t = l[l.length - 1]; } return s.length = r, s; } -function Bl(n, t, e, i, s, r, o) { - const a = (e - t) / i; +function dl(i, t, e, n, s, r, o) { + const a = (e - t) / n; if (a < 3) { - for (; t < e; t += i) - r[o++] = n[t], r[o++] = n[t + 1]; + for (; t < e; t += n) + r[o++] = i[t], r[o++] = i[t + 1]; return o; } const l = new Array(a); l[0] = 1, l[a - 1] = 1; - const h = [t, e - i]; + const h = [t, e - n]; let c = 0; for (; h.length > 0; ) { const u = h.pop(), d = h.pop(); let f = 0; - const g = n[d], m = n[d + 1], _ = n[u], y = n[u + 1]; - for (let p = d + i; p < u; p += i) { - const v = n[p], x = n[p + 1], C = i0(v, x, g, m, _, y); - C > f && (c = p, f = C); + const g = i[d], m = i[d + 1], _ = i[u], y = i[u + 1]; + for (let p = d + n; p < u; p += n) { + const v = i[p], x = i[p + 1], M = b0(v, x, g, m, _, y); + M > f && (c = p, f = M); } - f > s && (l[(c - t) / i] = 1, d + i < c && h.push(d, c), c + i < u && h.push(c, u)); + f > s && (l[(c - t) / n] = 1, d + n < c && h.push(d, c), c + n < u && h.push(c, u)); } for (let u = 0; u < a; ++u) - l[u] && (r[o++] = n[t + u * i], r[o++] = n[t + u * i + 1]); + l[u] && (r[o++] = i[t + u * n], r[o++] = i[t + u * n + 1]); return o; } -function g1(n, t, e, i, s, r, o, a) { +function $g(i, t, e, n, s, r, o, a) { for (let l = 0, h = e.length; l < h; ++l) { const c = e[l]; - o = Bl( - n, + o = dl( + i, t, c, - i, + n, s, r, o @@ -3556,22 +3533,22 @@ function g1(n, t, e, i, s, r, o, a) { } return o; } -function Zi(n, t) { - return t * Math.round(n / t); +function Ti(i, t) { + return t * Math.round(i / t); } -function m1(n, t, e, i, s, r, o) { +function Bg(i, t, e, n, s, r, o) { if (t == e) return o; - let a = Zi(n[t], s), l = Zi(n[t + 1], s); - t += i, r[o++] = a, r[o++] = l; + let a = Ti(i[t], s), l = Ti(i[t + 1], s); + t += n, r[o++] = a, r[o++] = l; let h, c; do - if (h = Zi(n[t], s), c = Zi(n[t + 1], s), t += i, t == e) + if (h = Ti(i[t], s), c = Ti(i[t + 1], s), t += n, t == e) return r[o++] = h, r[o++] = c, o; while (h == a && c == l); for (; t < e; ) { - const u = Zi(n[t], s), d = Zi(n[t + 1], s); - if (t += i, u == h && d == c) + const u = Ti(i[t], s), d = Ti(i[t + 1], s); + if (t += n, u == h && d == c) continue; const f = h - a, g = c - l, m = u - a, _ = d - l; if (f * _ == g * m && (f < 0 && m < f || f == m || f > 0 && m > f) && (g < 0 && _ < g || g == _ || g > 0 && _ > g)) { @@ -3582,14 +3559,14 @@ function m1(n, t, e, i, s, r, o) { } return r[o++] = h, r[o++] = c, o; } -function Md(n, t, e, i, s, r, o, a) { +function qu(i, t, e, n, s, r, o, a) { for (let l = 0, h = e.length; l < h; ++l) { const c = e[l]; - o = m1( - n, + o = Bg( + i, t, c, - i, + n, s, r, o @@ -3597,14 +3574,14 @@ function Md(n, t, e, i, s, r, o, a) { } return o; } -function _1(n, t, e, i, s, r, o, a) { +function zg(i, t, e, n, s, r, o, a) { for (let l = 0, h = e.length; l < h; ++l) { const c = e[l], u = []; - o = Md( - n, + o = qu( + i, t, c, - i, + n, s, r, o, @@ -3613,68 +3590,68 @@ function _1(n, t, e, i, s, r, o, a) { } return o; } -function Ei(n, t, e, i, s) { +function gi(i, t, e, n, s) { s = s !== void 0 ? s : []; let r = 0; - for (let o = t; o < e; o += i) - s[r++] = n.slice(o, o + i); + for (let o = t; o < e; o += n) + s[r++] = i.slice(o, o + n); return s.length = r, s; } -function Zs(n, t, e, i, s) { +function Rs(i, t, e, n, s) { s = s !== void 0 ? s : []; let r = 0; for (let o = 0, a = e.length; o < a; ++o) { const l = e[o]; - s[r++] = Ei( - n, + s[r++] = gi( + i, t, l, - i, + n, s[r] ), t = l; } return s.length = r, s; } -function $a(n, t, e, i, s) { +function pa(i, t, e, n, s) { s = s !== void 0 ? s : []; let r = 0; for (let o = 0, a = e.length; o < a; ++o) { const l = e[o]; - s[r++] = l.length === 1 && l[0] === t ? [] : Zs( - n, + s[r++] = l.length === 1 && l[0] === t ? [] : Rs( + i, t, l, - i, + n, s[r] ), t = l[l.length - 1]; } return s.length = r, s; } -function Ed(n, t, e, i) { - let s = 0, r = n[e - i], o = n[e - i + 1]; - for (; t < e; t += i) { - const a = n[t], l = n[t + 1]; +function Ju(i, t, e, n) { + let s = 0, r = i[e - n], o = i[e - n + 1]; + for (; t < e; t += n) { + const a = i[t], l = i[t + 1]; s += o * a - r * l, r = a, o = l; } return s / 2; } -function wd(n, t, e, i) { +function Qu(i, t, e, n) { let s = 0; for (let r = 0, o = e.length; r < o; ++r) { const a = e[r]; - s += Ed(n, t, a, i), t = a; + s += Ju(i, t, a, n), t = a; } return s; } -function p1(n, t, e, i) { +function Zg(i, t, e, n) { let s = 0; for (let r = 0, o = e.length; r < o; ++r) { const a = e[r]; - s += wd(n, t, a, i), t = a[a.length - 1]; + s += Qu(i, t, a, n), t = a[a.length - 1]; } return s; } -class ho extends Di { +class Ur extends Qi { constructor(t, e) { super(), this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, e !== void 0 && !Array.isArray(t[0]) ? this.setFlatCoordinates( e, @@ -3685,18 +3662,18 @@ class ho extends Di { ); } clone() { - return new ho(this.flatCoordinates.slice(), this.layout); + return new Ur(this.flatCoordinates.slice(), this.layout); } - closestPointXY(t, e, i, s) { - return s < dn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( - Nl( + closestPointXY(t, e, n, s) { + return s < qi(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( + al( this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0 ) - ), this.maxDeltaRevision_ = this.getRevision()), kl( + ), this.maxDeltaRevision_ = this.getRevision()), hl( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -3705,12 +3682,12 @@ class ho extends Di { !0, t, e, - i, + n, s )); } getArea() { - return Ed( + return Ju( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -3718,7 +3695,7 @@ class ho extends Di { ); } getCoordinates() { - return Ei( + return gi( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -3727,7 +3704,7 @@ class ho extends Di { } getSimplifiedGeometryInternal(t) { const e = []; - return e.length = Bl( + return e.length = dl( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -3735,7 +3712,7 @@ class ho extends Di { t, e, 0 - ), new ho(e, "XY"); + ), new Ur(e, "XY"); } getType() { return "LinearRing"; @@ -3744,7 +3721,7 @@ class ho extends Di { return !1; } setCoordinates(t, e) { - this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = No( + this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = _o( this.flatCoordinates, 0, t, @@ -3752,17 +3729,17 @@ class ho extends Di { ), this.changed(); } } -const Ba = ho; -class zl extends Di { +const ya = Ur; +class fl extends Qi { constructor(t, e) { super(), this.setCoordinates(t, e); } clone() { - const t = new zl(this.flatCoordinates.slice(), this.layout); + const t = new fl(this.flatCoordinates.slice(), this.layout); return t.applyProperties(this), t; } - closestPointXY(t, e, i, s) { - const r = this.flatCoordinates, o = ri( + closestPointXY(t, e, n, s) { + const r = this.flatCoordinates, o = ki( t, e, r[0], @@ -3771,8 +3748,8 @@ class zl extends Di { if (o < s) { const a = this.stride; for (let l = 0; l < a; ++l) - i[l] = r[l]; - return i.length = a, o; + n[l] = r[l]; + return n.length = a, o; } else return s; } @@ -3780,16 +3757,16 @@ class zl extends Di { return this.flatCoordinates ? this.flatCoordinates.slice() : []; } computeExtent(t) { - return ws(this.flatCoordinates, t); + return Cu(this.flatCoordinates, t); } getType() { return "Point"; } intersectsExtent(t) { - return pl(t, this.flatCoordinates[0], this.flatCoordinates[1]); + return Ya(t, this.flatCoordinates[0], this.flatCoordinates[1]); } setCoordinates(t, e) { - this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Cd( + this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = kg( this.flatCoordinates, 0, t, @@ -3797,74 +3774,74 @@ class zl extends Di { ), this.changed(); } } -const Se = zl; -function y1(n, t, e, i, s) { - return !yl( +const Ci = fl; +function Ug(i, t, e, n, s) { + return !Ru( s, function(o) { - return !Wi( - n, + return !Oi( + i, t, e, - i, + n, o[0], o[1] ); } ); } -function Wi(n, t, e, i, s, r) { - let o = 0, a = n[e - i], l = n[e - i + 1]; - for (; t < e; t += i) { - const h = n[t], c = n[t + 1]; +function Oi(i, t, e, n, s, r) { + let o = 0, a = i[e - n], l = i[e - n + 1]; + for (; t < e; t += n) { + const h = i[t], c = i[t + 1]; l <= r ? c > r && (h - a) * (r - l) - (s - a) * (c - l) > 0 && o++ : c <= r && (h - a) * (r - l) - (s - a) * (c - l) < 0 && o--, a = h, l = c; } return o !== 0; } -function Zl(n, t, e, i, s, r) { - if (e.length === 0 || !Wi(n, t, e[0], i, s, r)) +function gl(i, t, e, n, s, r) { + if (e.length === 0 || !Oi(i, t, e[0], n, s, r)) return !1; for (let o = 1, a = e.length; o < a; ++o) - if (Wi(n, e[o - 1], e[o], i, s, r)) + if (Oi(i, e[o - 1], e[o], n, s, r)) return !1; return !0; } -function v1(n, t, e, i, s, r) { +function Vg(i, t, e, n, s, r) { if (e.length === 0) return !1; for (let o = 0, a = e.length; o < a; ++o) { const l = e[o]; - if (Zl(n, t, l, i, s, r)) + if (gl(i, t, l, n, s, r)) return !0; t = l[l.length - 1]; } return !1; } -function Sd(n, t, e, i, s, r, o) { +function td(i, t, e, n, s, r, o) { let a, l, h, c, u, d, f; const g = s[r + 1], m = []; for (let p = 0, v = e.length; p < v; ++p) { const x = e[p]; - for (c = n[x - i], d = n[x - i + 1], a = t; a < x; a += i) - u = n[a], f = n[a + 1], (g <= d && f <= g || d <= g && g <= f) && (h = (g - d) / (f - d) * (u - c) + c, m.push(h)), c = u, d = f; + for (c = i[x - n], d = i[x - n + 1], a = t; a < x; a += n) + u = i[a], f = i[a + 1], (g <= d && f <= g || d <= g && g <= f) && (h = (g - d) / (f - d) * (u - c) + c, m.push(h)), c = u, d = f; } let _ = NaN, y = -1 / 0; - for (m.sort(tn), c = m[0], a = 1, l = m.length; a < l; ++a) { + for (m.sort(Zi), c = m[0], a = 1, l = m.length; a < l; ++a) { u = m[a]; const p = Math.abs(u - c); - p > y && (h = (c + u) / 2, Zl(n, t, e, i, h, g) && (_ = h, y = p)), c = u; + p > y && (h = (c + u) / 2, gl(i, t, e, n, h, g) && (_ = h, y = p)), c = u; } return isNaN(_) && (_ = s[r]), o ? (o.push(_, g, y), o) : [_, g, y]; } -function x1(n, t, e, i, s) { +function Wg(i, t, e, n, s) { let r = []; for (let o = 0, a = e.length; o < a; ++o) { const l = e[o]; - r = Sd( - n, + r = td( + i, t, l, - i, + n, s, 2 * o, r @@ -3872,129 +3849,129 @@ function x1(n, t, e, i, s) { } return r; } -function Rd(n, t, e, i, s) { +function ed(i, t, e, n, s) { let r; - for (t += i; t < e; t += i) + for (t += n; t < e; t += n) if (r = s( - n.slice(t - i, t), - n.slice(t, t + i) + i.slice(t - n, t), + i.slice(t, t + n) ), r) return r; return !1; } -function Do(n, t, e, i, s) { - const r = Ju( - se(), - n, +function po(i, t, e, n, s) { + const r = Su( + ue(), + i, t, e, - i + n ); - return Kt(s, r) ? Vi(s, r) || r[0] >= s[0] && r[2] <= s[2] || r[1] >= s[1] && r[3] <= s[3] ? !0 : Rd( - n, + return Qt(s, r) ? Ii(s, r) || r[0] >= s[0] && r[2] <= s[2] || r[1] >= s[1] && r[3] <= s[3] ? !0 : ed( + i, t, e, - i, + n, function(o, a) { - return Qg(s, o, a); + return w0(s, o, a); } ) : !1; } -function C1(n, t, e, i, s) { +function Hg(i, t, e, n, s) { for (let r = 0, o = e.length; r < o; ++r) { - if (Do(n, t, e[r], i, s)) + if (po(i, t, e[r], n, s)) return !0; t = e[r]; } return !1; } -function Td(n, t, e, i, s) { - return !!(Do(n, t, e, i, s) || Wi( - n, +function id(i, t, e, n, s) { + return !!(po(i, t, e, n, s) || Oi( + i, t, e, - i, + n, s[0], s[1] - ) || Wi( - n, + ) || Oi( + i, t, e, - i, + n, s[0], s[3] - ) || Wi( - n, + ) || Oi( + i, t, e, - i, + n, s[2], s[1] - ) || Wi( - n, + ) || Oi( + i, t, e, - i, + n, s[2], s[3] )); } -function bd(n, t, e, i, s) { - if (!Td(n, t, e[0], i, s)) +function nd(i, t, e, n, s) { + if (!id(i, t, e[0], n, s)) return !1; if (e.length === 1) return !0; for (let r = 1, o = e.length; r < o; ++r) - if (y1( - n, + if (Ug( + i, e[r - 1], e[r], - i, - s - ) && !Do( n, + s + ) && !po( + i, e[r - 1], e[r], - i, + n, s )) return !1; return !0; } -function M1(n, t, e, i, s) { +function Xg(i, t, e, n, s) { for (let r = 0, o = e.length; r < o; ++r) { const a = e[r]; - if (bd(n, t, a, i, s)) + if (nd(i, t, a, n, s)) return !0; t = a[a.length - 1]; } return !1; } -function E1(n, t, e, i) { - for (; t < e - i; ) { - for (let s = 0; s < i; ++s) { - const r = n[t + s]; - n[t + s] = n[e - i + s], n[e - i + s] = r; +function Yg(i, t, e, n) { + for (; t < e - n; ) { + for (let s = 0; s < n; ++s) { + const r = i[t + s]; + i[t + s] = i[e - n + s], i[e - n + s] = r; } - t += i, e -= i; + t += n, e -= n; } } -function Ld(n, t, e, i) { - let s = 0, r = n[e - i], o = n[e - i + 1]; - for (; t < e; t += i) { - const a = n[t], l = n[t + 1]; +function sd(i, t, e, n) { + let s = 0, r = i[e - n], o = i[e - n + 1]; + for (; t < e; t += n) { + const a = i[t], l = i[t + 1]; s += (a - r) * (l + o), r = a, o = l; } return s === 0 ? void 0 : s > 0; } -function Id(n, t, e, i, s) { +function rd(i, t, e, n, s) { s = s !== void 0 ? s : !1; for (let r = 0, o = e.length; r < o; ++r) { - const a = e[r], l = Ld( - n, + const a = e[r], l = sd( + i, t, a, - i + n ); if (r === 0) { if (s && l || !s && !l) @@ -4005,70 +3982,70 @@ function Id(n, t, e, i, s) { } return !0; } -function w1(n, t, e, i, s) { +function jg(i, t, e, n, s) { for (let r = 0, o = e.length; r < o; ++r) { const a = e[r]; - if (!Id(n, t, a, i, s)) + if (!rd(i, t, a, n, s)) return !1; a.length && (t = a[a.length - 1]); } return !0; } -function za(n, t, e, i, s) { +function va(i, t, e, n, s) { s = s !== void 0 ? s : !1; for (let r = 0, o = e.length; r < o; ++r) { - const a = e[r], l = Ld( - n, + const a = e[r], l = sd( + i, t, a, - i + n ); - (r === 0 ? s && l || !s && !l : s && !l || !s && l) && E1(n, t, a, i), t = a; + (r === 0 ? s && l || !s && !l : s && !l || !s && l) && Yg(i, t, a, n), t = a; } return t; } -function sc(n, t, e, i, s) { +function Ph(i, t, e, n, s) { for (let r = 0, o = e.length; r < o; ++r) - t = za( - n, + t = va( + i, t, e[r], - i, + n, s ); return t; } -class sn extends Di { - constructor(t, e, i) { - super(), this.ends_ = [], this.flatInteriorPointRevision_ = -1, this.flatInteriorPoint_ = null, this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, this.orientedRevision_ = -1, this.orientedFlatCoordinates_ = null, e !== void 0 && i ? (this.setFlatCoordinates( +class Fn extends Qi { + constructor(t, e, n) { + super(), this.ends_ = [], this.flatInteriorPointRevision_ = -1, this.flatInteriorPoint_ = null, this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, this.orientedRevision_ = -1, this.orientedFlatCoordinates_ = null, e !== void 0 && n ? (this.setFlatCoordinates( e, t - ), this.ends_ = i) : this.setCoordinates( + ), this.ends_ = n) : this.setCoordinates( t, e ); } appendLinearRing(t) { - this.flatCoordinates ? Qt(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed(); + this.flatCoordinates ? Ht(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed(); } clone() { - const t = new sn( + const t = new Fn( this.flatCoordinates.slice(), this.layout, this.ends_.slice() ); return t.applyProperties(this), t; } - closestPointXY(t, e, i, s) { - return s < dn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( - Dl( + closestPointXY(t, e, n, s) { + return s < qi(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( + ll( this.flatCoordinates, 0, this.ends_, this.stride, 0 ) - ), this.maxDeltaRevision_ = this.getRevision()), Gl( + ), this.maxDeltaRevision_ = this.getRevision()), cl( this.flatCoordinates, 0, this.ends_, @@ -4077,12 +4054,12 @@ class sn extends Di { !0, t, e, - i, + n, s )); } containsXY(t, e) { - return Zl( + return gl( this.getOrientedFlatCoordinates(), 0, this.ends_, @@ -4092,7 +4069,7 @@ class sn extends Di { ); } getArea() { - return wd( + return Qu( this.getOrientedFlatCoordinates(), 0, this.ends_, @@ -4101,15 +4078,15 @@ class sn extends Di { } getCoordinates(t) { let e; - return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), za(e, 0, this.ends_, this.stride, t)) : e = this.flatCoordinates, Zs(e, 0, this.ends_, this.stride); + return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), va(e, 0, this.ends_, this.stride, t)) : e = this.flatCoordinates, Rs(e, 0, this.ends_, this.stride); } getEnds() { return this.ends_; } getFlatInteriorPoint() { if (this.flatInteriorPointRevision_ != this.getRevision()) { - const t = Pi(this.getExtent()); - this.flatInteriorPoint_ = Sd( + const t = Mi(this.getExtent()); + this.flatInteriorPoint_ = td( this.getOrientedFlatCoordinates(), 0, this.ends_, @@ -4121,13 +4098,13 @@ class sn extends Di { return this.flatInteriorPoint_; } getInteriorPoint() { - return new Se(this.getFlatInteriorPoint(), "XYM"); + return new Ci(this.getFlatInteriorPoint(), "XYM"); } getLinearRingCount() { return this.ends_.length; } getLinearRing(t) { - return t < 0 || this.ends_.length <= t ? null : new Ba( + return t < 0 || this.ends_.length <= t ? null : new ya( this.flatCoordinates.slice( t === 0 ? 0 : this.ends_[t - 1], this.ends_[t] @@ -4136,10 +4113,10 @@ class sn extends Di { ); } getLinearRings() { - const t = this.layout, e = this.flatCoordinates, i = this.ends_, s = []; + const t = this.layout, e = this.flatCoordinates, n = this.ends_, s = []; let r = 0; - for (let o = 0, a = i.length; o < a; ++o) { - const l = i[o], h = new Ba( + for (let o = 0, a = n.length; o < a; ++o) { + const l = n[o], h = new ya( e.slice(r, l), t ); @@ -4150,7 +4127,7 @@ class sn extends Di { getOrientedFlatCoordinates() { if (this.orientedRevision_ != this.getRevision()) { const t = this.flatCoordinates; - Id(t, 0, this.ends_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = za( + rd(t, 0, this.ends_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = va( this.orientedFlatCoordinates_, 0, this.ends_, @@ -4160,8 +4137,8 @@ class sn extends Di { return this.orientedFlatCoordinates_; } getSimplifiedGeometryInternal(t) { - const e = [], i = []; - return e.length = Md( + const e = [], n = []; + return e.length = qu( this.flatCoordinates, 0, this.ends_, @@ -4169,14 +4146,14 @@ class sn extends Di { Math.sqrt(t), e, 0, - i - ), new sn(e, "XY", i); + n + ), new Fn(e, "XY", n); } getType() { return "Polygon"; } intersectsExtent(t) { - return bd( + return nd( this.getOrientedFlatCoordinates(), 0, this.ends_, @@ -4186,74 +4163,55 @@ class sn extends Di { } setCoordinates(t, e) { this.setLayout(e, t, 2), this.flatCoordinates || (this.flatCoordinates = []); - const i = $l( + const n = ul( this.flatCoordinates, 0, t, this.stride, this.ends_ ); - this.flatCoordinates.length = i.length === 0 ? 0 : i[i.length - 1], this.changed(); + this.flatCoordinates.length = n.length === 0 ? 0 : n[n.length - 1], this.changed(); } } -const Ai = sn; -function S1(n, t, e, i) { +const Dn = Fn; +function Kg(i, t, e, n) { e = e || 32; const s = []; for (let r = 0; r < e; ++r) - Qt( + Ht( s, - X0(n, t, 2 * Math.PI * r / e, i) + _g(i, t, 2 * Math.PI * r / e, n) ); - return s.push(s[0], s[1]), new sn(s, "XY", [s.length]); + return s.push(s[0], s[1]), new Fn(s, "XY", [s.length]); } -function rc(n) { - const t = n[0], e = n[1], i = n[2], s = n[3], r = [ +function Oh(i) { + const t = i[0], e = i[1], n = i[2], s = i[3], r = [ t, e, t, s, - i, + n, s, - i, + n, e, t, e ]; - return new sn(r, "XY", [r.length]); + return new Fn(r, "XY", [r.length]); } -function R1(n, t, e) { - t = t || 32; - const i = n.getStride(), s = n.getLayout(), r = n.getCenter(), o = i * (t + 1), a = new Array(o); - for (let c = 0; c < o; c += i) { - a[c] = 0, a[c + 1] = 0; - for (let u = 2; u < i; u++) - a[c + u] = r[u]; - } - const l = [a.length], h = new sn(a, s, l); - return T1(h, r, n.getRadius(), e), h; -} -function T1(n, t, e, i) { - const s = n.getFlatCoordinates(), r = n.getStride(), o = s.length / r - 1, a = i || 0; - for (let l = 0; l <= o; ++l) { - const h = l * r, c = a + qi(l, o) * 2 * Math.PI / o; - s[h] = t[0] + e * Math.cos(c), s[h + 1] = t[1] + e * Math.sin(c); - } - n.changed(); -} -const ra = 0; -class b1 extends Oe { +const $o = 0; +class qg extends Se { constructor(t) { - super(), this.on, this.once, this.un, t = Object.assign({}, t), this.hints_ = [0, 0], this.animations_ = [], this.updateAnimationKey_, this.projection_ = Ll(t.projection, "EPSG:3857"), this.viewportSize_ = [100, 100], this.targetCenter_ = null, this.targetResolution_, this.targetRotation_, this.nextCenter_ = null, this.nextResolution_, this.nextRotation_, this.cancelAnchor_ = void 0, t.projection && gd(), t.center && (t.center = vt(t.center, this.projection_)), t.extent && (t.extent = Mi(t.extent, this.projection_)), this.applyOptions_(t); + super(), this.on, this.once, this.un, t = Object.assign({}, t), this.hints_ = [0, 0], this.animations_ = [], this.updateAnimationKey_, this.projection_ = nl(t.projection, "EPSG:3857"), this.viewportSize_ = [100, 100], this.targetCenter_ = null, this.targetResolution_, this.targetRotation_, this.nextCenter_ = null, this.nextResolution_, this.nextRotation_, this.cancelAnchor_ = void 0, t.projection && Uu(), t.center && (t.center = Xe(t.center, this.projection_)), t.extent && (t.extent = Pi(t.extent, this.projection_)), this.applyOptions_(t); } applyOptions_(t) { const e = Object.assign({}, t); - for (const a in be) + for (const a in xe) delete e[a]; this.setProperties(e, !0); - const i = I1(t); - this.maxResolution_ = i.maxResolution, this.minResolution_ = i.minResolution, this.zoomFactor_ = i.zoomFactor, this.resolutions_ = t.resolutions, this.padding_ = t.padding, this.minZoom_ = i.minZoom; - const s = L1(t), r = i.constraint, o = P1(t); + const n = Qg(t); + this.maxResolution_ = n.maxResolution, this.minResolution_ = n.minResolution, this.zoomFactor_ = n.zoomFactor, this.resolutions_ = t.resolutions, this.padding_ = t.padding, this.minZoom_ = n.minZoom; + const s = Jg(t), r = n.constraint, o = t1(t); this.constraints_ = { center: s, resolution: r, @@ -4268,12 +4226,12 @@ class b1 extends Oe { set padding(t) { let e = this.padding_; this.padding_ = t; - const i = this.getCenter(); - if (i) { + const n = this.getCenter(); + if (n) { const s = t || [0, 0, 0, 0]; e = e || [0, 0, 0, 0]; const r = this.getResolution(), o = r / 2 * (s[3] - e[3] + e[1] - s[1]), a = r / 2 * (s[0] - e[0] + e[2] - s[2]); - this.setCenterInternal([i[0] + o, i[1] - a]); + this.setCenterInternal([n[0] + o, n[1] - a]); } } getUpdatedOptions_(t) { @@ -4283,28 +4241,28 @@ class b1 extends Oe { animate(t) { this.isDef() && !this.getAnimating() && this.resolveConstraints(0); const e = new Array(arguments.length); - for (let i = 0; i < e.length; ++i) { - let s = arguments[i]; - s.center && (s = Object.assign({}, s), s.center = vt( + for (let n = 0; n < e.length; ++n) { + let s = arguments[n]; + s.center && (s = Object.assign({}, s), s.center = Xe( s.center, this.getProjection() - )), s.anchor && (s = Object.assign({}, s), s.anchor = vt( + )), s.anchor && (s = Object.assign({}, s), s.anchor = Xe( s.anchor, this.getProjection() - )), e[i] = s; + )), e[n] = s; } this.animateInternal.apply(this, e); } animateInternal(t) { - let e = arguments.length, i; - e > 1 && typeof arguments[e - 1] == "function" && (i = arguments[e - 1], --e); + let e = arguments.length, n; + e > 1 && typeof arguments[e - 1] == "function" && (n = arguments[e - 1], --e); let s = 0; for (; s < e && !this.isDef(); ++s) { const c = arguments[s]; c.center && this.setCenterInternal(c.center), c.zoom !== void 0 ? this.setZoom(c.zoom) : c.resolution && this.setResolution(c.resolution), c.rotation !== void 0 && this.setRotation(c.rotation); } if (s === e) { - i && br(i, !0); + n && gr(n, !0); return; } let r = Date.now(), o = this.targetCenter_.slice(), a = this.targetResolution_, l = this.targetRotation_; @@ -4315,30 +4273,30 @@ class b1 extends Oe { complete: !1, anchor: c.anchor, duration: c.duration !== void 0 ? c.duration : 1e3, - easing: c.easing || s1, - callback: i + easing: c.easing || bg, + callback: n }; if (c.center && (u.sourceCenter = o, u.targetCenter = c.center.slice(), o = u.targetCenter), c.zoom !== void 0 ? (u.sourceResolution = a, u.targetResolution = this.getResolutionForZoom(c.zoom), a = u.targetResolution) : c.resolution && (u.sourceResolution = a, u.targetResolution = c.resolution, a = u.targetResolution), c.rotation !== void 0) { u.sourceRotation = l; - const d = qi(c.rotation - l + Math.PI, 2 * Math.PI) - Math.PI; + const d = Sn(c.rotation - l + Math.PI, 2 * Math.PI) - Math.PI; u.targetRotation = l + d, l = u.targetRotation; } - A1(u) ? u.complete = !0 : r += u.duration, h.push(u); + e1(u) ? u.complete = !0 : r += u.duration, h.push(u); } - this.animations_.push(h), this.setHint(Wt.ANIMATING, 1), this.updateAnimations_(); + this.animations_.push(h), this.setHint(Bt.ANIMATING, 1), this.updateAnimations_(); } getAnimating() { - return this.hints_[Wt.ANIMATING] > 0; + return this.hints_[Bt.ANIMATING] > 0; } getInteracting() { - return this.hints_[Wt.INTERACTING] > 0; + return this.hints_[Bt.INTERACTING] > 0; } cancelAnimations() { - this.setHint(Wt.ANIMATING, -this.hints_[Wt.ANIMATING]); + this.setHint(Bt.ANIMATING, -this.hints_[Bt.ANIMATING]); let t; - for (let e = 0, i = this.animations_.length; e < i; ++e) { + for (let e = 0, n = this.animations_.length; e < n; ++e) { const s = this.animations_[e]; - if (s[0].callback && br(s[0].callback, !1), !t) + if (s[0].callback && gr(s[0].callback, !1), !t) for (let r = 0, o = s.length; r < o; ++r) { const a = s[r]; if (!a.complete) { @@ -4354,8 +4312,8 @@ class b1 extends Oe { return; const t = Date.now(); let e = !1; - for (let i = this.animations_.length - 1; i >= 0; --i) { - const s = this.animations_[i]; + for (let n = this.animations_.length - 1; n >= 0; --n) { + const s = this.animations_[n]; let r = !0; for (let o = 0, a = s.length; o < a; ++o) { const l = s[o]; @@ -4388,7 +4346,7 @@ class b1 extends Oe { this.nextResolution_ = l.targetResolution, this.targetResolution_ = d, this.applyTargetState_(!0); } if (l.sourceRotation !== void 0 && l.targetRotation !== void 0) { - const d = u === 1 ? qi(l.targetRotation + Math.PI, 2 * Math.PI) - Math.PI : l.sourceRotation + u * (l.targetRotation - l.sourceRotation); + const d = u === 1 ? Sn(l.targetRotation + Math.PI, 2 * Math.PI) - Math.PI : l.sourceRotation + u * (l.targetRotation - l.sourceRotation); if (l.anchor) { const f = this.constraints_.rotation( d, @@ -4405,9 +4363,9 @@ class b1 extends Oe { break; } if (r) { - this.animations_[i] = null, this.setHint(Wt.ANIMATING, -1), this.nextCenter_ = null, this.nextResolution_ = NaN, this.nextRotation_ = NaN; + this.animations_[n] = null, this.setHint(Bt.ANIMATING, -1), this.nextCenter_ = null, this.nextResolution_ = NaN, this.nextRotation_ = NaN; const o = s[0].callback; - o && br(o, !0); + o && gr(o, !0); } } this.animations_ = this.animations_.filter(Boolean), e && this.updateAnimationKey_ === void 0 && (this.updateAnimationKey_ = requestAnimationFrame( @@ -4415,26 +4373,26 @@ class b1 extends Oe { )); } calculateCenterRotate(t, e) { - let i; + let n; const s = this.getCenterInternal(); - return s !== void 0 && (i = [s[0] - e[0], s[1] - e[1]], El(i, t - this.getRotation()), nd(i, e)), i; + return s !== void 0 && (n = [s[0] - e[0], s[1] - e[1]], qa(n, t - this.getRotation()), Pu(n, e)), n; } calculateCenterZoom(t, e) { - let i; + let n; const s = this.getCenterInternal(), r = this.getResolution(); if (s !== void 0 && r !== void 0) { const o = e[0] - t * (e[0] - s[0]) / r, a = e[1] - t * (e[1] - s[1]) / r; - i = [o, a]; + n = [o, a]; } - return i; + return n; } getViewportSize_(t) { const e = this.viewportSize_; if (t) { - const i = e[0], s = e[1]; + const n = e[0], s = e[1]; return [ - Math.abs(i * Math.cos(t)) + Math.abs(s * Math.sin(t)), - Math.abs(i * Math.sin(t)) + Math.abs(s * Math.cos(t)) + Math.abs(n * Math.cos(t)) + Math.abs(s * Math.sin(t)), + Math.abs(n * Math.sin(t)) + Math.abs(s * Math.cos(t)) ]; } else return e; @@ -4444,10 +4402,10 @@ class b1 extends Oe { } getCenter() { const t = this.getCenterInternal(); - return t && qn(t, this.getProjection()); + return t && _a(t, this.getProjection()); } getCenterInternal() { - return this.get(be.CENTER); + return this.get(xe.CENTER); } getConstraints() { return this.constraints_; @@ -4460,16 +4418,16 @@ class b1 extends Oe { } calculateExtent(t) { const e = this.calculateExtentInternal(t); - return Il(e, this.getProjection()); + return Xu(e, this.getProjection()); } calculateExtentInternal(t) { t = t || this.getViewportSizeMinusPadding_(); const e = this.getCenterInternal(); Y(e, 1); - const i = this.getResolution(); - Y(i !== void 0, 2); + const n = this.getResolution(); + Y(n !== void 0, 2); const s = this.getRotation(); - return Y(s !== void 0, 3), Ia(e, i, s, t); + return Y(s !== void 0, 3), aa(e, n, s, t); } getMaxResolution() { return this.maxResolution_; @@ -4496,58 +4454,58 @@ class b1 extends Oe { return this.projection_; } getResolution() { - return this.get(be.RESOLUTION); + return this.get(xe.RESOLUTION); } getResolutions() { return this.resolutions_; } getResolutionForExtent(t, e) { return this.getResolutionForExtentInternal( - Mi(t, this.getProjection()), + Pi(t, this.getProjection()), e ); } getResolutionForExtentInternal(t, e) { e = e || this.getViewportSizeMinusPadding_(); - const i = pt(t) / e[0], s = ze(t) / e[1]; - return Math.max(i, s); + const n = mt(t) / e[0], s = Ne(t) / e[1]; + return Math.max(n, s); } getResolutionForValueFunction(t) { t = t || 2; - const e = this.getConstrainedResolution(this.maxResolution_), i = this.minResolution_, s = Math.log(e / i) / Math.log(t); + const e = this.getConstrainedResolution(this.maxResolution_), n = this.minResolution_, s = Math.log(e / n) / Math.log(t); return function(r) { return e / Math.pow(t, r * s); }; } getRotation() { - return this.get(be.ROTATION); + return this.get(xe.ROTATION); } getValueForResolutionFunction(t) { - const e = Math.log(t || 2), i = this.getConstrainedResolution(this.maxResolution_), s = this.minResolution_, r = Math.log(i / s) / e; + const e = Math.log(t || 2), n = this.getConstrainedResolution(this.maxResolution_), s = this.minResolution_, r = Math.log(n / s) / e; return function(o) { - return Math.log(i / o) / e / r; + return Math.log(n / o) / e / r; }; } getViewportSizeMinusPadding_(t) { let e = this.getViewportSize_(t); - const i = this.padding_; - return i && (e = [ - e[0] - i[1] - i[3], - e[1] - i[0] - i[2] + const n = this.padding_; + return n && (e = [ + e[0] - n[1] - n[3], + e[1] - n[0] - n[2] ]), e; } getState() { - const t = this.getProjection(), e = this.getResolution(), i = this.getRotation(); + const t = this.getProjection(), e = this.getResolution(), n = this.getRotation(); let s = this.getCenterInternal(); const r = this.padding_; if (r) { const o = this.getViewportSizeMinusPadding_(); - s = oa( + s = Bo( s, this.getViewportSize_(), [o[0] / 2 + r[3], o[1] / 2 + r[0]], e, - i + n ); } return { @@ -4557,7 +4515,7 @@ class b1 extends Oe { nextCenter: this.nextCenter_, nextResolution: this.nextResolution_, nextRotation: this.nextRotation_, - rotation: i, + rotation: n, zoom: this.getZoom() }; } @@ -4567,71 +4525,71 @@ class b1 extends Oe { return e !== void 0 && (t = this.getZoomForResolution(e)), t; } getZoomForResolution(t) { - let e = this.minZoom_ || 0, i, s; + let e = this.minZoom_ || 0, n, s; if (this.resolutions_) { - const r = gl(this.resolutions_, t, 1); - e = r, i = this.resolutions_[r], r == this.resolutions_.length - 1 ? s = 2 : s = i / this.resolutions_[r + 1]; + const r = Wa(this.resolutions_, t, 1); + e = r, n = this.resolutions_[r], r == this.resolutions_.length - 1 ? s = 2 : s = n / this.resolutions_[r + 1]; } else - i = this.maxResolution_, s = this.zoomFactor_; - return e + Math.log(i / t) / Math.log(s); + n = this.maxResolution_, s = this.zoomFactor_; + return e + Math.log(n / t) / Math.log(s); } getResolutionForZoom(t) { if (this.resolutions_) { if (this.resolutions_.length <= 1) return 0; - const e = Et( + const e = wt( Math.floor(t), 0, this.resolutions_.length - 2 - ), i = this.resolutions_[e] / this.resolutions_[e + 1]; - return this.resolutions_[e] / Math.pow(i, Et(t - e, 0, 1)); + ), n = this.resolutions_[e] / this.resolutions_[e + 1]; + return this.resolutions_[e] / Math.pow(n, wt(t - e, 0, 1)); } else return this.maxResolution_ / Math.pow(this.zoomFactor_, t - this.minZoom_); } fit(t, e) { - let i; + let n; if (Y( Array.isArray(t) || typeof t.getSimplifiedGeometry == "function", 24 ), Array.isArray(t)) { - Y(!vl(t), 25); - const s = Mi(t, this.getProjection()); - i = rc(s); + Y(!ja(t), 25); + const s = Pi(t, this.getProjection()); + n = Oh(s); } else if (t.getType() === "Circle") { - const s = Mi( + const s = Pi( t.getExtent(), this.getProjection() ); - i = rc(s), i.rotate(this.getRotation(), Pi(s)); + n = Oh(s), n.rotate(this.getRotation(), Mi(s)); } else - i = t; - this.fitInternal(i, e); + n = t; + this.fitInternal(n, e); } rotatedExtentForGeometry(t) { - const e = this.getRotation(), i = Math.cos(e), s = Math.sin(-e), r = t.getFlatCoordinates(), o = t.getStride(); + const e = this.getRotation(), n = Math.cos(e), s = Math.sin(-e), r = t.getFlatCoordinates(), o = t.getStride(); let a = 1 / 0, l = 1 / 0, h = -1 / 0, c = -1 / 0; for (let u = 0, d = r.length; u < d; u += o) { - const f = r[u] * i - r[u + 1] * s, g = r[u] * s + r[u + 1] * i; + const f = r[u] * n - r[u + 1] * s, g = r[u] * s + r[u + 1] * n; a = Math.min(a, f), l = Math.min(l, g), h = Math.max(h, f), c = Math.max(c, g); } return [a, l, h, c]; } fitInternal(t, e) { e = e || {}; - let i = e.size; - i || (i = this.getViewportSizeMinusPadding_()); + let n = e.size; + n || (n = this.getViewportSizeMinusPadding_()); const s = e.padding !== void 0 ? e.padding : [0, 0, 0, 0], r = e.nearest !== void 0 ? e.nearest : !1; let o; e.minResolution !== void 0 ? o = e.minResolution : e.maxZoom !== void 0 ? o = this.getResolutionForZoom(e.maxZoom) : o = 0; const a = this.rotatedExtentForGeometry(t); let l = this.getResolutionForExtentInternal(a, [ - i[0] - s[1] - s[3], - i[1] - s[0] - s[2] + n[0] - s[1] - s[3], + n[1] - s[0] - s[2] ]); l = isNaN(l) ? o : Math.max(l, o), l = this.getConstrainedResolution(l, r ? 0 : 1); - const h = this.getRotation(), c = Math.sin(h), u = Math.cos(h), d = Pi(a); + const h = this.getRotation(), c = Math.sin(h), u = Math.cos(h), d = Mi(a); d[0] += (s[1] - s[3]) / 2 * l, d[1] += (s[0] - s[2]) / 2 * l; - const f = d[0] * u - d[1] * c, g = d[1] * u + d[0] * c, m = this.getConstrainedCenter([f, g], l), _ = e.callback ? e.callback : nn; + const f = d[0] * u - d[1] * c, g = d[1] * u + d[0] * c, m = this.getConstrainedCenter([f, g], l), _ = e.callback ? e.callback : Ui; e.duration !== void 0 ? this.animateInternal( { resolution: l, @@ -4640,36 +4598,36 @@ class b1 extends Oe { easing: e.easing }, _ - ) : (this.targetResolution_ = l, this.targetCenter_ = m, this.applyTargetState_(!1, !0), br(_, !0)); + ) : (this.targetResolution_ = l, this.targetCenter_ = m, this.applyTargetState_(!1, !0), gr(_, !0)); } - centerOn(t, e, i) { + centerOn(t, e, n) { this.centerOnInternal( - vt(t, this.getProjection()), + Xe(t, this.getProjection()), e, - i + n ); } - centerOnInternal(t, e, i) { + centerOnInternal(t, e, n) { this.setCenterInternal( - oa( + Bo( t, e, - i, + n, this.getResolution(), this.getRotation() ) ); } - calculateCenterShift(t, e, i, s) { + calculateCenterShift(t, e, n, s) { let r; const o = this.padding_; if (o && t) { - const a = this.getViewportSizeMinusPadding_(-i), l = oa( + const a = this.getViewportSizeMinusPadding_(-n), l = Bo( t, s, [a[0] / 2 + o[3], a[1] / 2 + o[0]], e, - i + n ); r = [ t[0] - l[0], @@ -4682,7 +4640,7 @@ class b1 extends Oe { return !!this.getCenterInternal() && this.getResolution() !== void 0; } adjustCenter(t) { - const e = qn(this.targetCenter_, this.getProjection()); + const e = _a(this.targetCenter_, this.getProjection()); this.setCenter([ e[0] + t[0], e[1] + t[1] @@ -4696,14 +4654,14 @@ class b1 extends Oe { ]); } adjustResolution(t, e) { - e = e && vt(e, this.getProjection()), this.adjustResolutionInternal(t, e); + e = e && Xe(e, this.getProjection()), this.adjustResolutionInternal(t, e); } adjustResolutionInternal(t, e) { - const i = this.getAnimating() || this.getInteracting(), s = this.getViewportSize_(this.getRotation()), r = this.constraints_.resolution( + const n = this.getAnimating() || this.getInteracting(), s = this.getViewportSize_(this.getRotation()), r = this.constraints_.resolution( this.targetResolution_ * t, 0, s, - i + n ); e && (this.targetCenter_ = this.calculateCenterZoom(r, e)), this.targetResolution_ *= t, this.applyTargetState_(); } @@ -4711,18 +4669,18 @@ class b1 extends Oe { this.adjustResolution(Math.pow(this.zoomFactor_, -t), e); } adjustRotation(t, e) { - e && (e = vt(e, this.getProjection())), this.adjustRotationInternal(t, e); + e && (e = Xe(e, this.getProjection())), this.adjustRotationInternal(t, e); } adjustRotationInternal(t, e) { - const i = this.getAnimating() || this.getInteracting(), s = this.constraints_.rotation( + const n = this.getAnimating() || this.getInteracting(), s = this.constraints_.rotation( this.targetRotation_ + t, - i + n ); e && (this.targetCenter_ = this.calculateCenterRotate(s, e)), this.targetRotation_ += t, this.applyTargetState_(); } setCenter(t) { this.setCenterInternal( - t && vt(t, this.getProjection()) + t && Xe(t, this.getProjection()) ); } setCenterInternal(t) { @@ -4741,19 +4699,19 @@ class b1 extends Oe { this.setResolution(this.getResolutionForZoom(t)); } applyTargetState_(t, e) { - const i = this.getAnimating() || this.getInteracting() || e, s = this.constraints_.rotation( + const n = this.getAnimating() || this.getInteracting() || e, s = this.constraints_.rotation( this.targetRotation_, - i + n ), r = this.getViewportSize_(s), o = this.constraints_.resolution( this.targetResolution_, 0, r, - i + n ), a = this.constraints_.center( this.targetCenter_, o, r, - i, + n, this.calculateCenterShift( this.targetCenter_, o, @@ -4761,9 +4719,9 @@ class b1 extends Oe { r ) ); - this.get(be.ROTATION) !== s && this.set(be.ROTATION, s), this.get(be.RESOLUTION) !== o && (this.set(be.RESOLUTION, o), this.set("zoom", this.getZoom(), !0)), (!a || !this.get(be.CENTER) || !Le(this.get(be.CENTER), a)) && this.set(be.CENTER, a), this.getAnimating() && !t && this.cancelAnimations(), this.cancelAnchor_ = void 0; + this.get(xe.ROTATION) !== s && this.set(xe.ROTATION, s), this.get(xe.RESOLUTION) !== o && (this.set(xe.RESOLUTION, o), this.set("zoom", this.getZoom(), !0)), (!a || !this.get(xe.CENTER) || !Dr(this.get(xe.CENTER), a)) && this.set(xe.CENTER, a), this.getAnimating() && !t && this.cancelAnimations(), this.cancelAnchor_ = void 0; } - resolveConstraints(t, e, i) { + resolveConstraints(t, e, n) { t = t !== void 0 ? t : 200; const s = e || 0, r = this.constraints_.rotation(this.targetRotation_), o = this.getViewportSize_(r), a = this.constraints_.resolution( this.targetResolution_, @@ -4785,93 +4743,93 @@ class b1 extends Oe { this.targetResolution_ = a, this.targetRotation_ = r, this.targetCenter_ = l, this.applyTargetState_(); return; } - i = i || (t === 0 ? this.cancelAnchor_ : void 0), this.cancelAnchor_ = void 0, (this.getResolution() !== a || this.getRotation() !== r || !this.getCenterInternal() || !Le(this.getCenterInternal(), l)) && (this.getAnimating() && this.cancelAnimations(), this.animateInternal({ + n = n || (t === 0 ? this.cancelAnchor_ : void 0), this.cancelAnchor_ = void 0, (this.getResolution() !== a || this.getRotation() !== r || !this.getCenterInternal() || !Dr(this.getCenterInternal(), l)) && (this.getAnimating() && this.cancelAnimations(), this.animateInternal({ rotation: r, center: l, resolution: a, duration: t, - easing: rs, - anchor: i + easing: Vn, + anchor: n })); } beginInteraction() { - this.resolveConstraints(0), this.setHint(Wt.INTERACTING, 1); + this.resolveConstraints(0), this.setHint(Bt.INTERACTING, 1); } - endInteraction(t, e, i) { - i = i && vt(i, this.getProjection()), this.endInteractionInternal(t, e, i); + endInteraction(t, e, n) { + n = n && Xe(n, this.getProjection()), this.endInteractionInternal(t, e, n); } - endInteractionInternal(t, e, i) { - this.setHint(Wt.INTERACTING, -1), this.resolveConstraints(t, e, i); + endInteractionInternal(t, e, n) { + this.setHint(Bt.INTERACTING, -1), this.resolveConstraints(t, e, n); } getConstrainedCenter(t, e) { - const i = this.getViewportSize_(this.getRotation()); + const n = this.getViewportSize_(this.getRotation()); return this.constraints_.center( t, e || this.getResolution(), - i + n ); } getConstrainedZoom(t, e) { - const i = this.getResolutionForZoom(t); + const n = this.getResolutionForZoom(t); return this.getZoomForResolution( - this.getConstrainedResolution(i, e) + this.getConstrainedResolution(n, e) ); } getConstrainedResolution(t, e) { e = e || 0; - const i = this.getViewportSize_(this.getRotation()); - return this.constraints_.resolution(t, e, i); + const n = this.getViewportSize_(this.getRotation()); + return this.constraints_.resolution(t, e, n); } } -function br(n, t) { +function gr(i, t) { setTimeout(function() { - n(t); + i(t); }, 0); } -function L1(n) { - if (n.extent !== void 0) { - const e = n.smoothExtentConstraint !== void 0 ? n.smoothExtentConstraint : !0; - return Qh(n.extent, n.constrainOnlyCenter, e); +function Jg(i) { + if (i.extent !== void 0) { + const e = i.smoothExtentConstraint !== void 0 ? i.smoothExtentConstraint : !0; + return Rh(i.extent, i.constrainOnlyCenter, e); } - const t = Ll(n.projection, "EPSG:3857"); - if (n.multiWorld !== !0 && t.isGlobal()) { + const t = nl(i.projection, "EPSG:3857"); + if (i.multiWorld !== !0 && t.isGlobal()) { const e = t.getExtent().slice(); - return e[0] = -1 / 0, e[2] = 1 / 0, Qh(e, !1, !1); + return e[0] = -1 / 0, e[2] = 1 / 0, Rh(e, !1, !1); } - return Q0; + return Cg; } -function I1(n) { - let t, e, i, o = n.minZoom !== void 0 ? n.minZoom : ra, a = n.maxZoom !== void 0 ? n.maxZoom : 28; - const l = n.zoomFactor !== void 0 ? n.zoomFactor : 2, h = n.multiWorld !== void 0 ? n.multiWorld : !1, c = n.smoothResolutionConstraint !== void 0 ? n.smoothResolutionConstraint : !0, u = n.showFullExtent !== void 0 ? n.showFullExtent : !1, d = Ll(n.projection, "EPSG:3857"), f = d.getExtent(); - let g = n.constrainOnlyCenter, m = n.extent; - if (!h && !m && d.isGlobal() && (g = !1, m = f), n.resolutions !== void 0) { - const _ = n.resolutions; - e = _[o], i = _[a] !== void 0 ? _[a] : _[_.length - 1], n.constrainResolution ? t = t1( +function Qg(i) { + let t, e, n, o = i.minZoom !== void 0 ? i.minZoom : $o, a = i.maxZoom !== void 0 ? i.maxZoom : 28; + const l = i.zoomFactor !== void 0 ? i.zoomFactor : 2, h = i.multiWorld !== void 0 ? i.multiWorld : !1, c = i.smoothResolutionConstraint !== void 0 ? i.smoothResolutionConstraint : !0, u = i.showFullExtent !== void 0 ? i.showFullExtent : !1, d = nl(i.projection, "EPSG:3857"), f = d.getExtent(); + let g = i.constrainOnlyCenter, m = i.extent; + if (!h && !m && d.isGlobal() && (g = !1, m = f), i.resolutions !== void 0) { + const _ = i.resolutions; + e = _[o], n = _[a] !== void 0 ? _[a] : _[_.length - 1], i.constrainResolution ? t = Eg( _, c, !g && m, u - ) : t = tc( + ) : t = bh( e, - i, + n, c, !g && m, u ); } else { - const y = (f ? Math.max(pt(f), ze(f)) : 360 * Yn.degrees / d.getMetersPerUnit()) / Sl / Math.pow(2, ra), p = y / Math.pow(2, 28 - ra); - e = n.maxResolution, e !== void 0 ? o = 0 : e = y / Math.pow(l, o), i = n.minResolution, i === void 0 && (n.maxZoom !== void 0 ? n.maxResolution !== void 0 ? i = e / Math.pow(l, a) : i = y / Math.pow(l, a) : i = p), a = o + Math.floor( - Math.log(e / i) / Math.log(l) - ), i = e / Math.pow(l, a - o), n.constrainResolution ? t = e1( + const y = (f ? Math.max(mt(f), Ne(f)) : 360 * On.degrees / d.getMetersPerUnit()) / Qa / Math.pow(2, $o), p = y / Math.pow(2, 28 - $o); + e = i.maxResolution, e !== void 0 ? o = 0 : e = y / Math.pow(l, o), n = i.minResolution, n === void 0 && (i.maxZoom !== void 0 ? i.maxResolution !== void 0 ? n = e / Math.pow(l, a) : n = y / Math.pow(l, a) : n = p), a = o + Math.floor( + Math.log(e / n) / Math.log(l) + ), n = e / Math.pow(l, a - o), i.constrainResolution ? t = wg( l, e, - i, + n, c, !g && m, u - ) : t = tc( + ) : t = bh( e, - i, + n, c, !g && m, u @@ -4880,47 +4838,47 @@ function I1(n) { return { constraint: t, maxResolution: e, - minResolution: i, + minResolution: n, minZoom: o, zoomFactor: l }; } -function P1(n) { - if (n.enableRotation !== void 0 ? n.enableRotation : !0) { - const e = n.constrainRotation; - return e === void 0 || e === !0 ? n1() : e === !1 ? ec : typeof e == "number" ? i1(e) : ec; +function t1(i) { + if (i.enableRotation !== void 0 ? i.enableRotation : !0) { + const e = i.constrainRotation; + return e === void 0 || e === !0 ? Rg() : e === !1 ? Lh : typeof e == "number" ? Sg(e) : Lh; } else - return Ol; + return ol; } -function A1(n) { - return !(n.sourceCenter && n.targetCenter && !Le(n.sourceCenter, n.targetCenter) || n.sourceResolution !== n.targetResolution || n.sourceRotation !== n.targetRotation); +function e1(i) { + return !(i.sourceCenter && i.targetCenter && !Dr(i.sourceCenter, i.targetCenter) || i.sourceResolution !== i.targetResolution || i.sourceRotation !== i.targetRotation); } -function oa(n, t, e, i, s) { +function Bo(i, t, e, n, s) { const r = Math.cos(-s); - let o = Math.sin(-s), a = n[0] * r - n[1] * o, l = n[1] * r + n[0] * o; - a += (t[0] / 2 - e[0]) * i, l += (e[1] - t[1] / 2) * i, o = -o; + let o = Math.sin(-s), a = i[0] * r - i[1] * o, l = i[1] * r + i[0] * o; + a += (t[0] / 2 - e[0]) * n, l += (e[1] - t[1] / 2) * n, o = -o; const h = a * r - l * o, c = l * r + a * o; return [h, c]; } -const si = b1; -class O1 extends Oe { +const Ke = qg; +class i1 extends Se { constructor(t) { super(); const e = t.element; e && !t.target && !e.style.pointerEvents && (e.style.pointerEvents = "auto"), this.element = e || null, this.target_ = null, this.map_ = null, this.listenerKeys = [], t.render && (this.render = t.render), t.target && this.setTarget(t.target); } disposeInternal() { - Aa(this.element), super.disposeInternal(); + ha(this.element), super.disposeInternal(); } getMap() { return this.map_; } setMap(t) { - this.map_ && Aa(this.element); - for (let e = 0, i = this.listenerKeys.length; e < i; ++e) - mt(this.listenerKeys[e]); - this.listenerKeys.length = 0, this.map_ = t, t && ((this.target_ ? this.target_ : t.getOverlayContainerStopEvent()).appendChild(this.element), this.render !== nn && this.listenerKeys.push( - et(t, vi.POSTRENDER, this.render, this) + this.map_ && ha(this.element); + for (let e = 0, n = this.listenerKeys.length; e < n; ++e) + pt(this.listenerKeys[e]); + this.listenerKeys.length = 0, this.map_ = t, t && ((this.target_ ? this.target_ : t.getOverlayContainerStopEvent()).appendChild(this.element), this.render !== Ui && this.listenerKeys.push( + it(t, ui.POSTRENDER, this.render, this) ), t.render()); } render(t) { @@ -4929,34 +4887,34 @@ class O1 extends Oe { this.target_ = typeof t == "string" ? document.getElementById(t) : t; } } -const Gt = O1; -class F1 extends Gt { +const Dt = i1; +class n1 extends Dt { constructor(t) { t = t || {}, super({ element: document.createElement("div"), render: t.render, target: t.target }), this.ulElement_ = document.createElement("ul"), this.collapsed_ = t.collapsed !== void 0 ? t.collapsed : !0, this.userCollapsed_ = this.collapsed_, this.overrideCollapsible_ = t.collapsible !== void 0, this.collapsible_ = t.collapsible !== void 0 ? t.collapsible : !0, this.collapsible_ || (this.collapsed_ = !1); - const e = t.className !== void 0 ? t.className : "ol-attribution", i = t.tipLabel !== void 0 ? t.tipLabel : "Attributions", s = t.expandClassName !== void 0 ? t.expandClassName : e + "-expand", r = t.collapseLabel !== void 0 ? t.collapseLabel : "\u203A", o = t.collapseClassName !== void 0 ? t.collapseClassName : e + "-collapse"; + const e = t.className !== void 0 ? t.className : "ol-attribution", n = t.tipLabel !== void 0 ? t.tipLabel : "Attributions", s = t.expandClassName !== void 0 ? t.expandClassName : e + "-expand", r = t.collapseLabel !== void 0 ? t.collapseLabel : "\u203A", o = t.collapseClassName !== void 0 ? t.collapseClassName : e + "-collapse"; typeof r == "string" ? (this.collapseLabel_ = document.createElement("span"), this.collapseLabel_.textContent = r, this.collapseLabel_.className = o) : this.collapseLabel_ = r; const a = t.label !== void 0 ? t.label : "i"; typeof a == "string" ? (this.label_ = document.createElement("span"), this.label_.textContent = a, this.label_.className = s) : this.label_ = a; const l = this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_; - this.toggleButton_ = document.createElement("button"), this.toggleButton_.setAttribute("type", "button"), this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_)), this.toggleButton_.title = i, this.toggleButton_.appendChild(l), this.toggleButton_.addEventListener( - U.CLICK, + this.toggleButton_ = document.createElement("button"), this.toggleButton_.setAttribute("type", "button"), this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_)), this.toggleButton_.title = n, this.toggleButton_.appendChild(l), this.toggleButton_.addEventListener( + X.CLICK, this.handleClick_.bind(this), !1 ); - const h = e + " " + ss + " " + Ao + (this.collapsed_ && this.collapsible_ ? " " + Uh : "") + (this.collapsible_ ? "" : " ol-uncollapsible"), c = this.element; + const h = e + " " + Un + " " + fo + (this.collapsed_ && this.collapsible_ ? " " + ph : "") + (this.collapsible_ ? "" : " ol-uncollapsible"), c = this.element; c.className = h, c.appendChild(this.toggleButton_), c.appendChild(this.ulElement_), this.renderedAttributions_ = [], this.renderedVisible_ = !0; } collectSourceAttributions_(t) { - const e = {}, i = []; + const e = {}, n = []; let s = !0; const r = t.layerStatesArray; for (let o = 0, a = r.length; o < a; ++o) { const l = r[o]; - if (!Cl(l, t.viewState)) + if (!Ka(l, t.viewState)) continue; const h = l.layer.getSource(); if (!h) @@ -4968,20 +4926,20 @@ class F1 extends Gt { if (!!u) if (s = s && h.getAttributionsCollapsible() !== !1, Array.isArray(u)) for (let d = 0, f = u.length; d < f; ++d) - u[d] in e || (i.push(u[d]), e[u[d]] = !0); + u[d] in e || (n.push(u[d]), e[u[d]] = !0); else - u in e || (i.push(u), e[u] = !0); + u in e || (n.push(u), e[u] = !0); } - return this.overrideCollapsible_ || this.setCollapsible(s), i; + return this.overrideCollapsible_ || this.setCollapsible(s), n; } updateElement_(t) { if (!t) { this.renderedVisible_ && (this.element.style.display = "none", this.renderedVisible_ = !1); return; } - const e = this.collectSourceAttributions_(t), i = e.length > 0; - if (this.renderedVisible_ != i && (this.element.style.display = i ? "" : "none", this.renderedVisible_ = i), !Ni(e, this.renderedAttributions_)) { - v0(this.ulElement_); + const e = this.collectSourceAttributions_(t), n = e.length > 0; + if (this.renderedVisible_ != n && (this.element.style.display = n ? "" : "none", this.renderedVisible_ = n), !Ki(e, this.renderedAttributions_)) { + Z0(this.ulElement_); for (let s = 0, r = e.length; s < r; ++s) { const o = document.createElement("li"); o.innerHTML = e[s], this.ulElement_.appendChild(o); @@ -4993,7 +4951,7 @@ class F1 extends Gt { t.preventDefault(), this.handleToggle_(), this.userCollapsed_ = this.collapsed_; } handleToggle_() { - this.element.classList.toggle(Uh), this.collapsed_ ? io(this.collapseLabel_, this.label_) : io(this.label_, this.collapseLabel_), this.collapsed_ = !this.collapsed_, this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_)); + this.element.classList.toggle(ph), this.collapsed_ ? kr(this.collapseLabel_, this.label_) : kr(this.label_, this.collapseLabel_), this.collapsed_ = !this.collapsed_, this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_)); } getCollapsible() { return this.collapsible_; @@ -5011,24 +4969,24 @@ class F1 extends Gt { this.updateElement_(t.frameState); } } -const N1 = F1; -class D1 extends Gt { +const s1 = n1; +class r1 extends Dt { constructor(t) { t = t || {}, super({ element: document.createElement("div"), render: t.render, target: t.target }); - const e = t.className !== void 0 ? t.className : "ol-rotate", i = t.label !== void 0 ? t.label : "\u21E7", s = t.compassClassName !== void 0 ? t.compassClassName : "ol-compass"; - this.label_ = null, typeof i == "string" ? (this.label_ = document.createElement("span"), this.label_.className = s, this.label_.textContent = i) : (this.label_ = i, this.label_.classList.add(s)); + const e = t.className !== void 0 ? t.className : "ol-rotate", n = t.label !== void 0 ? t.label : "\u21E7", s = t.compassClassName !== void 0 ? t.compassClassName : "ol-compass"; + this.label_ = null, typeof n == "string" ? (this.label_ = document.createElement("span"), this.label_.className = s, this.label_.textContent = n) : (this.label_ = n, this.label_.classList.add(s)); const r = t.tipLabel ? t.tipLabel : "Reset rotation", o = document.createElement("button"); o.className = e + "-reset", o.setAttribute("type", "button"), o.title = r, o.appendChild(this.label_), o.addEventListener( - U.CLICK, + X.CLICK, this.handleClick_.bind(this), !1 ); - const a = e + " " + ss + " " + Ao, l = this.element; - l.className = a, l.appendChild(o), this.callResetNorth_ = t.resetNorth ? t.resetNorth : void 0, this.duration_ = t.duration !== void 0 ? t.duration : 250, this.autoHide_ = t.autoHide !== void 0 ? t.autoHide : !0, this.rotation_ = void 0, this.autoHide_ && this.element.classList.add(Rr); + const a = e + " " + Un + " " + fo, l = this.element; + l.className = a, l.appendChild(o), this.callResetNorth_ = t.resetNorth ? t.resetNorth : void 0, this.duration_ = t.duration !== void 0 ? t.duration : 250, this.autoHide_ = t.autoHide !== void 0 ? t.autoHide : !0, this.rotation_ = void 0, this.autoHide_ && this.element.classList.add(dr); } handleClick_(t) { t.preventDefault(), this.callResetNorth_ !== void 0 ? this.callResetNorth_() : this.resetNorth_(); @@ -5037,88 +4995,88 @@ class D1 extends Gt { const e = this.getMap().getView(); if (!e) return; - const i = e.getRotation(); - i !== void 0 && (this.duration_ > 0 && i % (2 * Math.PI) !== 0 ? e.animate({ + const n = e.getRotation(); + n !== void 0 && (this.duration_ > 0 && n % (2 * Math.PI) !== 0 ? e.animate({ rotation: 0, duration: this.duration_, - easing: rs + easing: Vn }) : e.setRotation(0)); } render(t) { const e = t.frameState; if (!e) return; - const i = e.viewState.rotation; - if (i != this.rotation_) { - const s = "rotate(" + i + "rad)"; + const n = e.viewState.rotation; + if (n != this.rotation_) { + const s = "rotate(" + n + "rad)"; if (this.autoHide_) { - const r = this.element.classList.contains(Rr); - !r && i === 0 ? this.element.classList.add(Rr) : r && i !== 0 && this.element.classList.remove(Rr); + const r = this.element.classList.contains(dr); + !r && n === 0 ? this.element.classList.add(dr) : r && n !== 0 && this.element.classList.remove(dr); } this.label_.style.transform = s; } - this.rotation_ = i; + this.rotation_ = n; } } -const k1 = D1; -class G1 extends Gt { +const o1 = r1; +class a1 extends Dt { constructor(t) { t = t || {}, super({ element: document.createElement("div"), target: t.target }); - const e = t.className !== void 0 ? t.className : "ol-zoom", i = t.delta !== void 0 ? t.delta : 1, s = t.zoomInClassName !== void 0 ? t.zoomInClassName : e + "-in", r = t.zoomOutClassName !== void 0 ? t.zoomOutClassName : e + "-out", o = t.zoomInLabel !== void 0 ? t.zoomInLabel : "+", a = t.zoomOutLabel !== void 0 ? t.zoomOutLabel : "\u2013", l = t.zoomInTipLabel !== void 0 ? t.zoomInTipLabel : "Zoom in", h = t.zoomOutTipLabel !== void 0 ? t.zoomOutTipLabel : "Zoom out", c = document.createElement("button"); + const e = t.className !== void 0 ? t.className : "ol-zoom", n = t.delta !== void 0 ? t.delta : 1, s = t.zoomInClassName !== void 0 ? t.zoomInClassName : e + "-in", r = t.zoomOutClassName !== void 0 ? t.zoomOutClassName : e + "-out", o = t.zoomInLabel !== void 0 ? t.zoomInLabel : "+", a = t.zoomOutLabel !== void 0 ? t.zoomOutLabel : "\u2013", l = t.zoomInTipLabel !== void 0 ? t.zoomInTipLabel : "Zoom in", h = t.zoomOutTipLabel !== void 0 ? t.zoomOutTipLabel : "Zoom out", c = document.createElement("button"); c.className = s, c.setAttribute("type", "button"), c.title = l, c.appendChild( typeof o == "string" ? document.createTextNode(o) : o ), c.addEventListener( - U.CLICK, - this.handleClick_.bind(this, i), + X.CLICK, + this.handleClick_.bind(this, n), !1 ); const u = document.createElement("button"); u.className = r, u.setAttribute("type", "button"), u.title = h, u.appendChild( typeof a == "string" ? document.createTextNode(a) : a ), u.addEventListener( - U.CLICK, - this.handleClick_.bind(this, -i), + X.CLICK, + this.handleClick_.bind(this, -n), !1 ); - const d = e + " " + ss + " " + Ao, f = this.element; + const d = e + " " + Un + " " + fo, f = this.element; f.className = d, f.appendChild(c), f.appendChild(u), this.duration_ = t.duration !== void 0 ? t.duration : 250; } handleClick_(t, e) { e.preventDefault(), this.zoomByDelta_(t); } zoomByDelta_(t) { - const i = this.getMap().getView(); - if (!i) + const n = this.getMap().getView(); + if (!n) return; - const s = i.getZoom(); + const s = n.getZoom(); if (s !== void 0) { - const r = i.getConstrainedZoom(s + t); - this.duration_ > 0 ? (i.getAnimating() && i.cancelAnimations(), i.animate({ + const r = n.getConstrainedZoom(s + t); + this.duration_ > 0 ? (n.getAnimating() && n.cancelAnimations(), n.animate({ zoom: r, duration: this.duration_, - easing: rs - })) : i.setZoom(r); + easing: Vn + })) : n.setZoom(r); } } } -const Pd = G1; -function $1(n) { - n = n || {}; - const t = new Ee(); - return (n.zoom !== void 0 ? n.zoom : !0) && t.push(new Pd(n.zoomOptions)), (n.rotate !== void 0 ? n.rotate : !0) && t.push(new k1(n.rotateOptions)), (n.attribution !== void 0 ? n.attribution : !0) && t.push(new N1(n.attributionOptions)), t; +const od = a1; +function l1(i) { + i = i || {}; + const t = new Te(); + return (i.zoom !== void 0 ? i.zoom : !0) && t.push(new od(i.zoomOptions)), (i.rotate !== void 0 ? i.rotate : !0) && t.push(new o1(i.rotateOptions)), (i.attribution !== void 0 ? i.attribution : !0) && t.push(new s1(i.attributionOptions)), t; } -const Za = { +const Nh = { ACTIVE: "active" }; -class B1 extends Oe { +class h1 extends Se { constructor(t) { super(), this.on, this.once, this.un, t && t.handleEvent && (this.handleEvent = t.handleEvent), this.map_ = null, this.setActive(!0); } getActive() { - return this.get(Za.ACTIVE); + return this.get(Nh.ACTIVE); } getMap() { return this.map_; @@ -5127,51 +5085,51 @@ class B1 extends Oe { return !0; } setActive(t) { - this.set(Za.ACTIVE, t); + this.set(Nh.ACTIVE, t); } setMap(t) { this.map_ = t; } } -function z1(n, t, e) { - const i = n.getCenterInternal(); - if (i) { - const s = [i[0] + t[0], i[1] + t[1]]; - n.animateInternal({ +function c1(i, t, e) { + const n = i.getCenterInternal(); + if (n) { + const s = [n[0] + t[0], n[1] + t[1]]; + i.animateInternal({ duration: e !== void 0 ? e : 250, - easing: r1, - center: n.getConstrainedCenter(s) + easing: Lg, + center: i.getConstrainedCenter(s) }); } } -function Vl(n, t, e, i) { - const s = n.getZoom(); +function ml(i, t, e, n) { + const s = i.getZoom(); if (s === void 0) return; - const r = n.getConstrainedZoom(s + t), o = n.getResolutionForZoom(r); - n.getAnimating() && n.cancelAnimations(), n.animate({ + const r = i.getConstrainedZoom(s + t), o = i.getResolutionForZoom(r); + i.getAnimating() && i.cancelAnimations(), i.animate({ resolution: o, anchor: e, - duration: i !== void 0 ? i : 250, - easing: rs + duration: n !== void 0 ? n : 250, + easing: Vn }); } -const er = B1; -class Z1 extends er { +const $s = h1; +class u1 extends $s { constructor(t) { super(), t = t || {}, this.delta_ = t.delta ? t.delta : 1, this.duration_ = t.duration !== void 0 ? t.duration : 250; } handleEvent(t) { let e = !1; - if (t.type == nt.DBLCLICK) { - const i = t.originalEvent, s = t.map, r = t.coordinate, o = i.shiftKey ? -this.delta_ : this.delta_, a = s.getView(); - Vl(a, o, r, this.duration_), i.preventDefault(), e = !0; + if (t.type == Ct.DBLCLICK) { + const n = t.originalEvent, s = t.map, r = t.coordinate, o = n.shiftKey ? -this.delta_ : this.delta_, a = s.getView(); + ml(a, o, r, this.duration_), n.preventDefault(), e = !0; } return !e; } } -const V1 = Z1; -class U1 extends er { +const d1 = u1; +class f1 extends $s { constructor(t) { t = t || {}, super( t @@ -5190,17 +5148,17 @@ class U1 extends er { return !0; let e = !1; if (this.updateTrackedPointers_(t), this.handlingDownUpSequence) { - if (t.type == nt.POINTERDRAG) + if (t.type == Ct.POINTERDRAG) this.handleDragEvent(t), t.originalEvent.preventDefault(); - else if (t.type == nt.POINTERUP) { - const i = this.handleUpEvent(t); - this.handlingDownUpSequence = i && this.targetPointers.length > 0; + else if (t.type == Ct.POINTERUP) { + const n = this.handleUpEvent(t); + this.handlingDownUpSequence = n && this.targetPointers.length > 0; } - } else if (t.type == nt.POINTERDOWN) { - const i = this.handleDownEvent(t); - this.handlingDownUpSequence = i, e = this.stopDown(i); + } else if (t.type == Ct.POINTERDOWN) { + const n = this.handleDownEvent(t); + this.handlingDownUpSequence = n, e = this.stopDown(n); } else - t.type == nt.POINTERMOVE && this.handleMoveEvent(t); + t.type == Ct.POINTERMOVE && this.handleMoveEvent(t); return !e; } handleMoveEvent(t) { @@ -5215,133 +5173,128 @@ class U1 extends er { t.activePointers && (this.targetPointers = t.activePointers); } } -function Ul(n) { - const t = n.length; - let e = 0, i = 0; +function _l(i) { + const t = i.length; + let e = 0, n = 0; for (let s = 0; s < t; s++) - e += n[s].clientX, i += n[s].clientY; - return [e / t, i / t]; + e += i[s].clientX, n += i[s].clientY; + return [e / t, n / t]; } -const ki = U1; -function Va(n) { +const Bs = f1; +function xa(i) { const t = arguments; return function(e) { - let i = !0; - for (let s = 0, r = t.length; s < r && (i = i && t[s](e), !!i); ++s) + let n = !0; + for (let s = 0, r = t.length; s < r && (n = n && t[s](e), !!n); ++s) ; - return i; + return n; }; } -const W1 = function(n) { - const t = n.originalEvent; - return t.altKey && !(t.metaKey || t.ctrlKey) && !t.shiftKey; -}, H1 = function(n) { - const t = n.originalEvent; +const g1 = function(i) { + const t = i.originalEvent; return t.altKey && !(t.metaKey || t.ctrlKey) && t.shiftKey; -}, X1 = function(n) { - const t = n.map.getTargetElement(), e = n.map.getOwnerDocument().activeElement; +}, m1 = function(i) { + const t = i.map.getTargetElement(), e = i.map.getOwnerDocument().activeElement; return t.contains(e); -}, Ad = function(n) { - return n.map.getTargetElement().hasAttribute("tabindex") ? X1(n) : !0; -}, co = en, Od = function(n) { - const t = n.originalEvent; - return t.button == 0 && !(Zg && Vg && t.ctrlKey); -}, Y1 = un, j1 = function(n) { - return n.type == nt.SINGLECLICK; -}, Wl = function(n) { - const t = n.originalEvent; +}, ad = function(i) { + return i.map.getTargetElement().hasAttribute("tabindex") ? m1(i) : !0; +}, _1 = ps, ld = function(i) { + const t = i.originalEvent; + return t.button == 0 && !(f0 && g0 && t.ctrlKey); +}, hd = function(i) { + const t = i.originalEvent; return !t.altKey && !(t.metaKey || t.ctrlKey) && !t.shiftKey; -}, Fd = function(n) { - const t = n.originalEvent; +}, p1 = function(i) { + const t = i.originalEvent; return !t.altKey && !(t.metaKey || t.ctrlKey) && t.shiftKey; -}, Nd = function(n) { - const t = n.originalEvent, e = t.target.tagName; +}, cd = function(i) { + const t = i.originalEvent, e = t.target.tagName; return e !== "INPUT" && e !== "SELECT" && e !== "TEXTAREA" && !t.target.isContentEditable; -}, aa = function(n) { - const t = n.originalEvent; +}, zo = function(i) { + const t = i.originalEvent; return Y(t !== void 0, 56), t.pointerType == "mouse"; -}, Dd = function(n) { - const t = n.originalEvent; +}, y1 = function(i) { + const t = i.originalEvent; return Y(t !== void 0, 56), t.isPrimary && t.button === 0; }; -class q1 extends ki { +class v1 extends Bs { constructor(t) { super({ - stopDown: un + stopDown: no }), t = t || {}, this.kinetic_ = t.kinetic, this.lastCentroid = null, this.lastPointersCount_, this.panning_ = !1; - const e = t.condition ? t.condition : Va(Wl, Dd); - this.condition_ = t.onFocusOnly ? Va(Ad, e) : e, this.noKinetic_ = !1; + const e = t.condition ? t.condition : xa(hd, y1); + this.condition_ = t.onFocusOnly ? xa(ad, e) : e, this.noKinetic_ = !1; } handleDragEvent(t) { this.panning_ || (this.panning_ = !0, this.getMap().getView().beginInteraction()); - const e = this.targetPointers, i = Ul(e); + const e = this.targetPointers, n = _l(e); if (e.length == this.lastPointersCount_) { - if (this.kinetic_ && this.kinetic_.update(i[0], i[1]), this.lastCentroid) { + if (this.kinetic_ && this.kinetic_.update(n[0], n[1]), this.lastCentroid) { const s = [ - this.lastCentroid[0] - i[0], - i[1] - this.lastCentroid[1] + this.lastCentroid[0] - n[0], + n[1] - this.lastCentroid[1] ], o = t.map.getView(); - sd(s, o.getResolution()), El(s, o.getRotation()), o.adjustCenterInternal(s); + Ou(s, o.getResolution()), qa(s, o.getRotation()), o.adjustCenterInternal(s); } } else this.kinetic_ && this.kinetic_.begin(); - this.lastCentroid = i, this.lastPointersCount_ = e.length, t.originalEvent.preventDefault(); + this.lastCentroid = n, this.lastPointersCount_ = e.length, t.originalEvent.preventDefault(); } handleUpEvent(t) { - const e = t.map, i = e.getView(); + const e = t.map, n = e.getView(); if (this.targetPointers.length === 0) { if (!this.noKinetic_ && this.kinetic_ && this.kinetic_.end()) { - const s = this.kinetic_.getDistance(), r = this.kinetic_.getAngle(), o = i.getCenterInternal(), a = e.getPixelFromCoordinateInternal(o), l = e.getCoordinateFromPixelInternal([ + const s = this.kinetic_.getDistance(), r = this.kinetic_.getAngle(), o = n.getCenterInternal(), a = e.getPixelFromCoordinateInternal(o), l = e.getCoordinateFromPixelInternal([ a[0] - s * Math.cos(r), a[1] - s * Math.sin(r) ]); - i.animateInternal({ - center: i.getConstrainedCenter(l), + n.animateInternal({ + center: n.getConstrainedCenter(l), duration: 500, - easing: rs + easing: Vn }); } - return this.panning_ && (this.panning_ = !1, i.endInteraction()), !1; + return this.panning_ && (this.panning_ = !1, n.endInteraction()), !1; } else return this.kinetic_ && this.kinetic_.begin(), this.lastCentroid = null, !0; } handleDownEvent(t) { if (this.targetPointers.length > 0 && this.condition_(t)) { - const i = t.map.getView(); - return this.lastCentroid = null, i.getAnimating() && i.cancelAnimations(), this.kinetic_ && this.kinetic_.begin(), this.noKinetic_ = this.targetPointers.length > 1, !0; + const n = t.map.getView(); + return this.lastCentroid = null, n.getAnimating() && n.cancelAnimations(), this.kinetic_ && this.kinetic_.begin(), this.noKinetic_ = this.targetPointers.length > 1, !0; } else return !1; } } -const K1 = q1; -class J1 extends ki { +const x1 = v1; +class M1 extends Bs { constructor(t) { t = t || {}, super({ - stopDown: un - }), this.condition_ = t.condition ? t.condition : H1, this.lastAngle_ = void 0, this.duration_ = t.duration !== void 0 ? t.duration : 250; + stopDown: no + }), this.condition_ = t.condition ? t.condition : g1, this.lastAngle_ = void 0, this.duration_ = t.duration !== void 0 ? t.duration : 250; } handleDragEvent(t) { - if (!aa(t)) + if (!zo(t)) return; - const e = t.map, i = e.getView(); - if (i.getConstraints().rotation === Ol) + const e = t.map, n = e.getView(); + if (n.getConstraints().rotation === ol) return; const s = e.getSize(), r = t.pixel, o = Math.atan2(s[1] / 2 - r[1], r[0] - s[0] / 2); if (this.lastAngle_ !== void 0) { const a = o - this.lastAngle_; - i.adjustRotationInternal(-a); + n.adjustRotationInternal(-a); } this.lastAngle_ = o; } handleUpEvent(t) { - return aa(t) ? (t.map.getView().endInteraction(this.duration_), !1) : !0; + return zo(t) ? (t.map.getView().endInteraction(this.duration_), !1) : !0; } handleDownEvent(t) { - return aa(t) && Od(t) && this.condition_(t) ? (t.map.getView().beginInteraction(), this.lastAngle_ = void 0, !0) : !1; + return zo(t) && ld(t) && this.condition_(t) ? (t.map.getView().beginInteraction(), this.lastAngle_ = void 0, !0) : !1; } } -const Q1 = J1; -class tm extends fl { +const C1 = M1; +class E1 extends Va { constructor(t) { super(), this.geometry_ = null, this.element_ = document.createElement("div"), this.element_.style.position = "absolute", this.element_.style.pointerEvents = "auto", this.element_.className = "ol-box " + t, this.map_ = null, this.startPixel_ = null, this.endPixel_ = null; } @@ -5349,8 +5302,8 @@ class tm extends fl { this.setMap(null); } render_() { - const t = this.startPixel_, e = this.endPixel_, i = "px", s = this.element_.style; - s.left = Math.min(t[0], e[0]) + i, s.top = Math.min(t[1], e[1]) + i, s.width = Math.abs(e[0] - t[0]) + i, s.height = Math.abs(e[1] - t[1]) + i; + const t = this.startPixel_, e = this.endPixel_, n = "px", s = this.element_.style; + s.left = Math.min(t[0], e[0]) + n, s.top = Math.min(t[1], e[1]) + n, s.width = Math.abs(e[0] - t[0]) + n, s.height = Math.abs(e[1] - t[1]) + n; } setMap(t) { if (this.map_) { @@ -5373,29 +5326,29 @@ class tm extends fl { this.map_.getCoordinateFromPixelInternal, this.map_ ); - s[4] = s[0].slice(), this.geometry_ ? this.geometry_.setCoordinates([s]) : this.geometry_ = new Ai([s]); + s[4] = s[0].slice(), this.geometry_ ? this.geometry_.setCoordinates([s]) : this.geometry_ = new Dn([s]); } getGeometry() { return this.geometry_; } } -const em = tm, Lr = { +const w1 = E1, mr = { BOXSTART: "boxstart", BOXDRAG: "boxdrag", BOXEND: "boxend", BOXCANCEL: "boxcancel" }; -class la extends Re { - constructor(t, e, i) { - super(t), this.coordinate = e, this.mapBrowserEvent = i; +class Zo extends ke { + constructor(t, e, n) { + super(t), this.coordinate = e, this.mapBrowserEvent = n; } } -class im extends ki { +class S1 extends Bs { constructor(t) { - super(), this.on, this.once, this.un, t = t || {}, this.box_ = new em(t.className || "ol-dragbox"), this.minArea_ = t.minArea !== void 0 ? t.minArea : 64, t.onBoxEnd && (this.onBoxEnd = t.onBoxEnd), this.startPixel_ = null, this.condition_ = t.condition ? t.condition : Od, this.boxEndCondition_ = t.boxEndCondition ? t.boxEndCondition : this.defaultBoxEndCondition; + super(), this.on, this.once, this.un, t = t || {}, this.box_ = new w1(t.className || "ol-dragbox"), this.minArea_ = t.minArea !== void 0 ? t.minArea : 64, t.onBoxEnd && (this.onBoxEnd = t.onBoxEnd), this.startPixel_ = null, this.condition_ = t.condition ? t.condition : ld, this.boxEndCondition_ = t.boxEndCondition ? t.boxEndCondition : this.defaultBoxEndCondition; } - defaultBoxEndCondition(t, e, i) { - const s = i[0] - e[0], r = i[1] - e[1]; + defaultBoxEndCondition(t, e, n) { + const s = n[0] - e[0], r = n[1] - e[1]; return s * s + r * r >= this.minArea_; } getGeometry() { @@ -5403,8 +5356,8 @@ class im extends ki { } handleDragEvent(t) { this.box_.setPixels(this.startPixel_, t.pixel), this.dispatchEvent( - new la( - Lr.BOXDRAG, + new Zo( + mr.BOXDRAG, t.coordinate, t ) @@ -5418,8 +5371,8 @@ class im extends ki { t.pixel ); return e && this.onBoxEnd(t), this.dispatchEvent( - new la( - e ? Lr.BOXEND : Lr.BOXCANCEL, + new Zo( + e ? mr.BOXEND : mr.BOXCANCEL, t.coordinate, t ) @@ -5427,8 +5380,8 @@ class im extends ki { } handleDownEvent(t) { return this.condition_(t) ? (this.startPixel_ = t.pixel, this.box_.setMap(t.map), this.box_.setPixels(this.startPixel_, this.startPixel_), this.dispatchEvent( - new la( - Lr.BOXSTART, + new Zo( + mr.BOXSTART, t.coordinate, t ) @@ -5437,11 +5390,11 @@ class im extends ki { onBoxEnd(t) { } } -const nm = im; -class sm extends nm { +const R1 = S1; +class b1 extends R1 { constructor(t) { t = t || {}; - const e = t.condition ? t.condition : Fd; + const e = t.condition ? t.condition : p1; super({ condition: e, className: t.className || "ol-dragzoom", @@ -5449,66 +5402,66 @@ class sm extends nm { }), this.duration_ = t.duration !== void 0 ? t.duration : 200, this.out_ = t.out !== void 0 ? t.out : !1; } onBoxEnd(t) { - const i = this.getMap().getView(); + const n = this.getMap().getView(); let s = this.getGeometry(); if (this.out_) { - const r = i.rotatedExtentForGeometry(s), o = i.getResolutionForExtentInternal(r), a = i.getResolution() / o; + const r = n.rotatedExtentForGeometry(s), o = n.getResolutionForExtentInternal(r), a = n.getResolution() / o; s = s.clone(), s.scale(a * a); } - i.fitInternal(s, { + n.fitInternal(s, { duration: this.duration_, - easing: rs + easing: Vn }); } } -const rm = sm, zi = { +const L1 = b1, Li = { LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40 }; -class om extends er { +class T1 extends $s { constructor(t) { super(), t = t || {}, this.defaultCondition_ = function(e) { - return Wl(e) && Nd(e); + return hd(e) && cd(e); }, this.condition_ = t.condition !== void 0 ? t.condition : this.defaultCondition_, this.duration_ = t.duration !== void 0 ? t.duration : 100, this.pixelDelta_ = t.pixelDelta !== void 0 ? t.pixelDelta : 128; } handleEvent(t) { let e = !1; - if (t.type == U.KEYDOWN) { - const i = t.originalEvent, s = i.keyCode; - if (this.condition_(t) && (s == zi.DOWN || s == zi.LEFT || s == zi.RIGHT || s == zi.UP)) { + if (t.type == X.KEYDOWN) { + const n = t.originalEvent, s = n.keyCode; + if (this.condition_(t) && (s == Li.DOWN || s == Li.LEFT || s == Li.RIGHT || s == Li.UP)) { const o = t.map.getView(), a = o.getResolution() * this.pixelDelta_; let l = 0, h = 0; - s == zi.DOWN ? h = -a : s == zi.LEFT ? l = -a : s == zi.RIGHT ? l = a : h = a; + s == Li.DOWN ? h = -a : s == Li.LEFT ? l = -a : s == Li.RIGHT ? l = a : h = a; const c = [l, h]; - El(c, o.getRotation()), z1(o, c, this.duration_), i.preventDefault(), e = !0; + qa(c, o.getRotation()), c1(o, c, this.duration_), n.preventDefault(), e = !0; } } return !e; } } -const am = om; -class lm extends er { +const I1 = T1; +class A1 extends $s { constructor(t) { - super(), t = t || {}, this.condition_ = t.condition ? t.condition : Nd, this.delta_ = t.delta ? t.delta : 1, this.duration_ = t.duration !== void 0 ? t.duration : 100; + super(), t = t || {}, this.condition_ = t.condition ? t.condition : cd, this.delta_ = t.delta ? t.delta : 1, this.duration_ = t.duration !== void 0 ? t.duration : 100; } handleEvent(t) { let e = !1; - if (t.type == U.KEYDOWN || t.type == U.KEYPRESS) { - const i = t.originalEvent, s = i.charCode; + if (t.type == X.KEYDOWN || t.type == X.KEYPRESS) { + const n = t.originalEvent, s = n.charCode; if (this.condition_(t) && (s == "+".charCodeAt(0) || s == "-".charCodeAt(0))) { const r = t.map, o = s == "+".charCodeAt(0) ? this.delta_ : -this.delta_, a = r.getView(); - Vl(a, o, void 0, this.duration_), i.preventDefault(), e = !0; + ml(a, o, void 0, this.duration_), n.preventDefault(), e = !0; } } return !e; } } -const hm = lm; -class cm { - constructor(t, e, i) { - this.decay_ = t, this.minVelocity_ = e, this.delay_ = i, this.points_ = [], this.angle_ = 0, this.initialVelocity_ = 0; +const P1 = A1; +class O1 { + constructor(t, e, n) { + this.decay_ = t, this.minVelocity_ = e, this.delay_ = n, this.points_ = [], this.angle_ = 0, this.initialVelocity_ = 0; } begin() { this.points_.length = 0, this.angle_ = 0, this.initialVelocity_ = 0; @@ -5522,13 +5475,13 @@ class cm { const t = Date.now() - this.delay_, e = this.points_.length - 3; if (this.points_[e + 2] < t) return !1; - let i = e - 3; - for (; i > 0 && this.points_[i + 2] > t; ) - i -= 3; - const s = this.points_[e + 2] - this.points_[i + 2]; + let n = e - 3; + for (; n > 0 && this.points_[n + 2] > t; ) + n -= 3; + const s = this.points_[e + 2] - this.points_[n + 2]; if (s < 1e3 / 60) return !1; - const r = this.points_[e] - this.points_[i], o = this.points_[e + 1] - this.points_[i + 1]; + const r = this.points_[e] - this.points_[n], o = this.points_[e + 1] - this.points_[n + 1]; return this.angle_ = Math.atan2(o, r), this.initialVelocity_ = Math.sqrt(r * r + o * o) / s, this.initialVelocity_ > this.minVelocity_; } getDistance() { @@ -5538,14 +5491,14 @@ class cm { return this.angle_; } } -const um = cm; -class dm extends er { +const N1 = O1; +class F1 extends $s { constructor(t) { t = t || {}, super( t ), this.totalDelta_ = 0, this.lastDelta_ = 0, this.maxDelta_ = t.maxDelta !== void 0 ? t.maxDelta : 1, this.duration_ = t.duration !== void 0 ? t.duration : 250, this.timeout_ = t.timeout !== void 0 ? t.timeout : 80, this.useAnchor_ = t.useAnchor !== void 0 ? t.useAnchor : !0, this.constrainResolution_ = t.constrainResolution !== void 0 ? t.constrainResolution : !1; - const e = t.condition ? t.condition : co; - this.condition_ = t.onFocusOnly ? Va(Ad, e) : e, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_, this.mode_ = void 0, this.trackpadEventGap_ = 400, this.trackpadTimeoutId_, this.deltaPerZoom_ = 300; + const e = t.condition ? t.condition : _1; + this.condition_ = t.onFocusOnly ? xa(ad, e) : e, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_, this.mode_ = void 0, this.trackpadEventGap_ = 400, this.trackpadTimeoutId_, this.deltaPerZoom_ = 300; } endInteraction_() { this.trackpadTimeoutId_ = void 0; @@ -5559,17 +5512,17 @@ class dm extends er { ); } handleEvent(t) { - if (!this.condition_(t) || t.type !== U.WHEEL) + if (!this.condition_(t) || t.type !== X.WHEEL) return !0; - const i = t.map, s = t.originalEvent; + const n = t.map, s = t.originalEvent; s.preventDefault(), this.useAnchor_ && (this.lastAnchor_ = t.coordinate); let r; - if (t.type == U.WHEEL && (r = s.deltaY, Bg && s.deltaMode === WheelEvent.DOM_DELTA_PIXEL && (r /= Hu), s.deltaMode === WheelEvent.DOM_DELTA_LINE && (r *= 40)), r === 0) + if (t.type == X.WHEEL && (r = s.deltaY, u0 && s.deltaMode === WheelEvent.DOM_DELTA_PIXEL && (r /= yu), s.deltaMode === WheelEvent.DOM_DELTA_LINE && (r *= 40)), r === 0) return !1; this.lastDelta_ = r; const o = Date.now(); this.startTime_ === void 0 && (this.startTime_ = o), (!this.mode_ || o - this.startTime_ > this.trackpadEventGap_) && (this.mode_ = Math.abs(r) < 4 ? "trackpad" : "wheel"); - const a = i.getView(); + const a = n.getView(); if (this.mode_ === "trackpad" && !(a.getConstrainResolution() || this.constrainResolution_)) return this.trackpadTimeoutId_ ? clearTimeout(this.trackpadTimeoutId_) : (a.getAnimating() && a.cancelAnimations(), a.beginInteraction()), this.trackpadTimeoutId_ = setTimeout( this.endInteraction_.bind(this), @@ -5578,36 +5531,36 @@ class dm extends er { this.totalDelta_ += r; const l = Math.max(this.timeout_ - (o - this.startTime_), 0); return clearTimeout(this.timeoutId_), this.timeoutId_ = setTimeout( - this.handleWheelZoom_.bind(this, i), + this.handleWheelZoom_.bind(this, n), l ), !1; } handleWheelZoom_(t) { const e = t.getView(); e.getAnimating() && e.cancelAnimations(); - let i = -Et( + let n = -wt( this.totalDelta_, -this.maxDelta_ * this.deltaPerZoom_, this.maxDelta_ * this.deltaPerZoom_ ) / this.deltaPerZoom_; - (e.getConstrainResolution() || this.constrainResolution_) && (i = i ? i > 0 ? 1 : -1 : 0), Vl(e, i, this.lastAnchor_, this.duration_), this.mode_ = void 0, this.totalDelta_ = 0, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_ = void 0; + (e.getConstrainResolution() || this.constrainResolution_) && (n = n ? n > 0 ? 1 : -1 : 0), ml(e, n, this.lastAnchor_, this.duration_), this.mode_ = void 0, this.totalDelta_ = 0, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_ = void 0; } setMouseAnchor(t) { this.useAnchor_ = t, t || (this.lastAnchor_ = null); } } -const fm = dm; -class gm extends ki { +const D1 = F1; +class k1 extends Bs { constructor(t) { t = t || {}; const e = t; - e.stopDown || (e.stopDown = un), super(e), this.anchor_ = null, this.lastAngle_ = void 0, this.rotating_ = !1, this.rotationDelta_ = 0, this.threshold_ = t.threshold !== void 0 ? t.threshold : 0.3, this.duration_ = t.duration !== void 0 ? t.duration : 250; + e.stopDown || (e.stopDown = no), super(e), this.anchor_ = null, this.lastAngle_ = void 0, this.rotating_ = !1, this.rotationDelta_ = 0, this.threshold_ = t.threshold !== void 0 ? t.threshold : 0.3, this.duration_ = t.duration !== void 0 ? t.duration : 250; } handleDragEvent(t) { let e = 0; - const i = this.targetPointers[0], s = this.targetPointers[1], r = Math.atan2( - s.clientY - i.clientY, - s.clientX - i.clientX + const n = this.targetPointers[0], s = this.targetPointers[1], r = Math.atan2( + s.clientY - n.clientY, + s.clientX - n.clientX ); if (this.lastAngle_ !== void 0) { const c = r - this.lastAngle_; @@ -5615,9 +5568,9 @@ class gm extends ki { } this.lastAngle_ = r; const o = t.map, a = o.getView(); - if (a.getConstraints().rotation === Ol) + if (a.getConstraints().rotation === ol) return; - const l = o.getViewport().getBoundingClientRect(), h = Ul(this.targetPointers); + const l = o.getViewport().getBoundingClientRect(), h = _l(this.targetPointers); h[0] -= l.left, h[1] -= l.top, this.anchor_ = o.getCoordinateFromPixelInternal(h), this.rotating_ && (o.render(), a.adjustRotationInternal(e, this.anchor_)); } handleUpEvent(t) { @@ -5631,26 +5584,26 @@ class gm extends ki { return !1; } } -const mm = gm; -class _m extends ki { +const G1 = k1; +class $1 extends Bs { constructor(t) { t = t || {}; const e = t; - e.stopDown || (e.stopDown = un), super(e), this.anchor_ = null, this.duration_ = t.duration !== void 0 ? t.duration : 400, this.lastDistance_ = void 0, this.lastScaleDelta_ = 1; + e.stopDown || (e.stopDown = no), super(e), this.anchor_ = null, this.duration_ = t.duration !== void 0 ? t.duration : 400, this.lastDistance_ = void 0, this.lastScaleDelta_ = 1; } handleDragEvent(t) { let e = 1; - const i = this.targetPointers[0], s = this.targetPointers[1], r = i.clientX - s.clientX, o = i.clientY - s.clientY, a = Math.sqrt(r * r + o * o); + const n = this.targetPointers[0], s = this.targetPointers[1], r = n.clientX - s.clientX, o = n.clientY - s.clientY, a = Math.sqrt(r * r + o * o); this.lastDistance_ !== void 0 && (e = this.lastDistance_ / a), this.lastDistance_ = a; const l = t.map, h = l.getView(); e != 1 && (this.lastScaleDelta_ = e); - const c = l.getViewport().getBoundingClientRect(), u = Ul(this.targetPointers); + const c = l.getViewport().getBoundingClientRect(), u = _l(this.targetPointers); u[0] -= c.left, u[1] -= c.top, this.anchor_ = l.getCoordinateFromPixelInternal(u), l.render(), h.adjustResolutionInternal(e, this.anchor_); } handleUpEvent(t) { if (this.targetPointers.length < 2) { - const i = t.map.getView(), s = this.lastScaleDelta_ > 1 ? 1 : -1; - return i.endInteraction(this.duration_, s), !1; + const n = t.map.getView(), s = this.lastScaleDelta_ > 1 ? 1 : -1; + return n.endInteraction(this.duration_, s), !1; } else return !0; } @@ -5662,110 +5615,110 @@ class _m extends ki { return !1; } } -const pm = _m; -function ym(n) { - n = n || {}; - const t = new Ee(), e = new um(-5e-3, 0.05, 100); - return (n.altShiftDragRotate !== void 0 ? n.altShiftDragRotate : !0) && t.push(new Q1()), (n.doubleClickZoom !== void 0 ? n.doubleClickZoom : !0) && t.push( - new V1({ - delta: n.zoomDelta, - duration: n.zoomDuration +const B1 = $1; +function z1(i) { + i = i || {}; + const t = new Te(), e = new N1(-5e-3, 0.05, 100); + return (i.altShiftDragRotate !== void 0 ? i.altShiftDragRotate : !0) && t.push(new C1()), (i.doubleClickZoom !== void 0 ? i.doubleClickZoom : !0) && t.push( + new d1({ + delta: i.zoomDelta, + duration: i.zoomDuration }) - ), (n.dragPan !== void 0 ? n.dragPan : !0) && t.push( - new K1({ - onFocusOnly: n.onFocusOnly, + ), (i.dragPan !== void 0 ? i.dragPan : !0) && t.push( + new x1({ + onFocusOnly: i.onFocusOnly, kinetic: e }) - ), (n.pinchRotate !== void 0 ? n.pinchRotate : !0) && t.push(new mm()), (n.pinchZoom !== void 0 ? n.pinchZoom : !0) && t.push( - new pm({ - duration: n.zoomDuration + ), (i.pinchRotate !== void 0 ? i.pinchRotate : !0) && t.push(new G1()), (i.pinchZoom !== void 0 ? i.pinchZoom : !0) && t.push( + new B1({ + duration: i.zoomDuration }) - ), (n.keyboard !== void 0 ? n.keyboard : !0) && (t.push(new am()), t.push( - new hm({ - delta: n.zoomDelta, - duration: n.zoomDuration + ), (i.keyboard !== void 0 ? i.keyboard : !0) && (t.push(new I1()), t.push( + new P1({ + delta: i.zoomDelta, + duration: i.zoomDuration }) - )), (n.mouseWheelZoom !== void 0 ? n.mouseWheelZoom : !0) && t.push( - new fm({ - onFocusOnly: n.onFocusOnly, - duration: n.zoomDuration + )), (i.mouseWheelZoom !== void 0 ? i.mouseWheelZoom : !0) && t.push( + new D1({ + onFocusOnly: i.onFocusOnly, + duration: i.zoomDuration }) - ), (n.shiftDragZoom !== void 0 ? n.shiftDragZoom : !0) && t.push( - new rm({ - duration: n.zoomDuration + ), (i.shiftDragZoom !== void 0 ? i.shiftDragZoom : !0) && t.push( + new L1({ + duration: i.zoomDuration }) ), t; } -function oc(n) { - return n[0] > 0 && n[1] > 0; +function Fh(i) { + return i[0] > 0 && i[1] > 0; } -function vm(n, t, e) { - return e === void 0 && (e = [0, 0]), e[0] = n[0] * t + 0.5 | 0, e[1] = n[1] * t + 0.5 | 0, e; +function Z1(i, t, e) { + return e === void 0 && (e = [0, 0]), e[0] = i[0] * t + 0.5 | 0, e[1] = i[1] * t + 0.5 | 0, e; } -function fe(n, t) { - return Array.isArray(n) ? n : (t === void 0 ? t = [n, n] : (t[0] = n, t[1] = n), t); +function ae(i, t) { + return Array.isArray(i) ? i : (t === void 0 ? t = [i, i] : (t[0] = i, t[1] = i), t); } -function kd(n) { - if (n instanceof Po) { - n.setMapInternal(null); +function ud(i) { + if (i instanceof uo) { + i.setMapInternal(null); return; } - n instanceof Oo && n.getLayers().forEach(kd); + i instanceof go && i.getLayers().forEach(ud); } -function Gd(n, t) { - if (n instanceof Po) { - n.setMapInternal(t); +function dd(i, t) { + if (i instanceof uo) { + i.setMapInternal(t); return; } - if (n instanceof Oo) { - const e = n.getLayers().getArray(); - for (let i = 0, s = e.length; i < s; ++i) - Gd(e[i], t); + if (i instanceof go) { + const e = i.getLayers().getArray(); + for (let n = 0, s = e.length; n < s; ++n) + dd(e[n], t); } } -class xm extends Oe { +class U1 extends Se { constructor(t) { super(), t = t || {}, this.on, this.once, this.un; - const e = Cm(t); - this.renderComplete_, this.loaded_ = !0, this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this), this.maxTilesLoading_ = t.maxTilesLoading !== void 0 ? t.maxTilesLoading : 16, this.pixelRatio_ = t.pixelRatio !== void 0 ? t.pixelRatio : Hu, this.postRenderTimeoutHandle_, this.animationDelayKey_, this.animationDelay_ = this.animationDelay_.bind(this), this.coordinateToPixelTransform_ = $e(), this.pixelToCoordinateTransform_ = $e(), this.frameIndex_ = 0, this.frameState_ = null, this.previousExtent_ = null, this.viewPropertyListenerKey_ = null, this.viewChangeListenerKey_ = null, this.layerGroupPropertyListenerKeys_ = null, this.viewport_ = document.createElement("div"), this.viewport_.className = "ol-viewport" + ("ontouchstart" in window ? " ol-touch" : ""), this.viewport_.style.position = "relative", this.viewport_.style.overflow = "hidden", this.viewport_.style.width = "100%", this.viewport_.style.height = "100%", this.overlayContainer_ = document.createElement("div"), this.overlayContainer_.style.position = "absolute", this.overlayContainer_.style.zIndex = "0", this.overlayContainer_.style.width = "100%", this.overlayContainer_.style.height = "100%", this.overlayContainer_.style.pointerEvents = "none", this.overlayContainer_.className = "ol-overlaycontainer", this.viewport_.appendChild(this.overlayContainer_), this.overlayContainerStopEvent_ = document.createElement("div"), this.overlayContainerStopEvent_.style.position = "absolute", this.overlayContainerStopEvent_.style.zIndex = "0", this.overlayContainerStopEvent_.style.width = "100%", this.overlayContainerStopEvent_.style.height = "100%", this.overlayContainerStopEvent_.style.pointerEvents = "none", this.overlayContainerStopEvent_.className = "ol-overlaycontainer-stopevent", this.viewport_.appendChild(this.overlayContainerStopEvent_), this.mapBrowserEventHandler_ = null, this.moveTolerance_ = t.moveTolerance, this.keyboardEventTarget_ = e.keyboardEventTarget, this.targetChangeHandlerKeys_ = null, this.controls = e.controls || $1(), this.interactions = e.interactions || ym({ + const e = V1(t); + this.renderComplete_, this.loaded_ = !0, this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this), this.maxTilesLoading_ = t.maxTilesLoading !== void 0 ? t.maxTilesLoading : 16, this.pixelRatio_ = t.pixelRatio !== void 0 ? t.pixelRatio : yu, this.postRenderTimeoutHandle_, this.animationDelayKey_, this.animationDelay_ = this.animationDelay_.bind(this), this.coordinateToPixelTransform_ = Pe(), this.pixelToCoordinateTransform_ = Pe(), this.frameIndex_ = 0, this.frameState_ = null, this.previousExtent_ = null, this.viewPropertyListenerKey_ = null, this.viewChangeListenerKey_ = null, this.layerGroupPropertyListenerKeys_ = null, this.viewport_ = document.createElement("div"), this.viewport_.className = "ol-viewport" + ("ontouchstart" in window ? " ol-touch" : ""), this.viewport_.style.position = "relative", this.viewport_.style.overflow = "hidden", this.viewport_.style.width = "100%", this.viewport_.style.height = "100%", this.overlayContainer_ = document.createElement("div"), this.overlayContainer_.style.position = "absolute", this.overlayContainer_.style.zIndex = "0", this.overlayContainer_.style.width = "100%", this.overlayContainer_.style.height = "100%", this.overlayContainer_.style.pointerEvents = "none", this.overlayContainer_.className = "ol-overlaycontainer", this.viewport_.appendChild(this.overlayContainer_), this.overlayContainerStopEvent_ = document.createElement("div"), this.overlayContainerStopEvent_.style.position = "absolute", this.overlayContainerStopEvent_.style.zIndex = "0", this.overlayContainerStopEvent_.style.width = "100%", this.overlayContainerStopEvent_.style.height = "100%", this.overlayContainerStopEvent_.style.pointerEvents = "none", this.overlayContainerStopEvent_.className = "ol-overlaycontainer-stopevent", this.viewport_.appendChild(this.overlayContainerStopEvent_), this.mapBrowserEventHandler_ = null, this.moveTolerance_ = t.moveTolerance, this.keyboardEventTarget_ = e.keyboardEventTarget, this.targetChangeHandlerKeys_ = null, this.controls = e.controls || l1(), this.interactions = e.interactions || z1({ onFocusOnly: !0 - }), this.overlays_ = e.overlays, this.overlayIdIndex_ = {}, this.renderer_ = null, this.postRenderFunctions_ = [], this.tileQueue_ = new N0( + }), this.overlays_ = e.overlays, this.overlayIdIndex_ = {}, this.renderer_ = null, this.postRenderFunctions_ = [], this.tileQueue_ = new sg( this.getTilePriority.bind(this), this.handleTileChange_.bind(this) ), this.addChangeListener( Ot.LAYERGROUP, this.handleLayerGroupChanged_ ), this.addChangeListener(Ot.VIEW, this.handleViewChanged_), this.addChangeListener(Ot.SIZE, this.handleSizeChanged_), this.addChangeListener(Ot.TARGET, this.handleTargetChanged_), this.setProperties(e.values); - const i = this; - t.view && !(t.view instanceof si) && t.view.then(function(s) { - i.setView(new si(s)); + const n = this; + t.view && !(t.view instanceof Ke) && t.view.then(function(s) { + n.setView(new Ke(s)); }), this.controls.addEventListener( - Dt.ADD, + Jt.ADD, function(s) { s.element.setMap(this); }.bind(this) ), this.controls.addEventListener( - Dt.REMOVE, + Jt.REMOVE, function(s) { s.element.setMap(null); }.bind(this) ), this.interactions.addEventListener( - Dt.ADD, + Jt.ADD, function(s) { s.element.setMap(this); }.bind(this) ), this.interactions.addEventListener( - Dt.REMOVE, + Jt.REMOVE, function(s) { s.element.setMap(null); }.bind(this) ), this.overlays_.addEventListener( - Dt.ADD, + Jt.ADD, function(s) { this.addOverlayInternal_(s.element); }.bind(this) ), this.overlays_.addEventListener( - Dt.REMOVE, + Jt.REMOVE, function(s) { const r = s.element.getId(); r !== void 0 && delete this.overlayIdIndex_[r.toString()], s.element.setMap(null); @@ -5790,7 +5743,7 @@ class xm extends Oe { this.getLayerGroup().getLayers().push(t); } handleLayerAdd_(t) { - Gd(t.layer, this); + dd(t.layer, this); } addOverlay(t) { this.getOverlays().push(t); @@ -5802,12 +5755,12 @@ class xm extends Oe { disposeInternal() { this.controls.clear(), this.interactions.clear(), this.overlays_.clear(), this.setTarget(null), super.disposeInternal(); } - forEachFeatureAtPixel(t, e, i) { + forEachFeatureAtPixel(t, e, n) { if (!this.frameState_ || !this.renderer_) return; const s = this.getCoordinateFromPixelInternal(t); - i = i !== void 0 ? i : {}; - const r = i.hitTolerance !== void 0 ? i.hitTolerance : 0, o = i.layerFilter !== void 0 ? i.layerFilter : en, a = i.checkWrapped !== !1; + n = n !== void 0 ? n : {}; + const r = n.hitTolerance !== void 0 ? n.hitTolerance : 0, o = n.layerFilter !== void 0 ? n.layerFilter : ps, a = n.checkWrapped !== !1; return this.renderer_.forEachFeatureAtCoordinate( s, this.frameState_, @@ -5820,20 +5773,20 @@ class xm extends Oe { ); } getFeaturesAtPixel(t, e) { - const i = []; + const n = []; return this.forEachFeatureAtPixel( t, function(s) { - i.push(s); + n.push(s); }, e - ), i; + ), n; } getAllLayers() { const t = []; - function e(i) { - i.forEach(function(s) { - s instanceof Oo ? e(s.getLayers()) : t.push(s); + function e(n) { + n.forEach(function(s) { + s instanceof go ? e(s.getLayers()) : t.push(s); }); } return e(this.getLayers()), t; @@ -5841,11 +5794,11 @@ class xm extends Oe { hasFeatureAtPixel(t, e) { if (!this.frameState_ || !this.renderer_) return !1; - const i = this.getCoordinateFromPixelInternal(t); + const n = this.getCoordinateFromPixelInternal(t); e = e !== void 0 ? e : {}; - const s = e.layerFilter !== void 0 ? e.layerFilter : en, r = e.hitTolerance !== void 0 ? e.hitTolerance : 0, o = e.checkWrapped !== !1; + const s = e.layerFilter !== void 0 ? e.layerFilter : ps, r = e.hitTolerance !== void 0 ? e.hitTolerance : 0, o = e.checkWrapped !== !1; return this.renderer_.hasFeatureAtCoordinate( - i, + n, this.frameState_, r, o, @@ -5860,10 +5813,10 @@ class xm extends Oe { return this.getCoordinateFromPixelInternal(this.getEventPixel(t)); } getEventPixel(t) { - const e = this.viewport_.getBoundingClientRect(), i = "changedTouches" in t ? t.changedTouches[0] : t; + const e = this.viewport_.getBoundingClientRect(), n = "changedTouches" in t ? t.changedTouches[0] : t; return [ - i.clientX - e.left, - i.clientY - e.top + n.clientX - e.left, + n.clientY - e.top ]; } getTarget() { @@ -5874,14 +5827,14 @@ class xm extends Oe { return t !== void 0 ? typeof t == "string" ? document.getElementById(t) : t : null; } getCoordinateFromPixel(t) { - return qn( + return _a( this.getCoordinateFromPixelInternal(t), this.getView().getProjection() ); } getCoordinateFromPixelInternal(t) { const e = this.frameState_; - return e ? Nt( + return e ? Ft( e.pixelToCoordinateTransform, t.slice() ) : null; @@ -5904,19 +5857,19 @@ class xm extends Oe { } setLayers(t) { const e = this.getLayerGroup(); - if (t instanceof Ee) { + if (t instanceof Te) { e.setLayers(t); return; } - const i = e.getLayers(); - i.clear(), i.extend(t); + const n = e.getLayers(); + n.clear(), n.extend(t); } getLayers() { return this.getLayerGroup().getLayers(); } getLoadingOrNotReady() { const t = this.getLayerGroup().getLayerStatesArray(); - for (let e = 0, i = t.length; e < i; ++e) { + for (let e = 0, n = t.length; e < n; ++e) { const s = t[e]; if (!s.visible) continue; @@ -5930,7 +5883,7 @@ class xm extends Oe { return !1; } getPixelFromCoordinate(t) { - const e = vt( + const e = Xe( t, this.getView().getProjection() ); @@ -5938,7 +5891,7 @@ class xm extends Oe { } getPixelFromCoordinateInternal(t) { const e = this.frameState_; - return e ? Nt( + return e ? Ft( e.coordinateToPixelTransform, t.slice(0, 2) ) : null; @@ -5965,25 +5918,25 @@ class xm extends Oe { const t = this.getTargetElement(); return t ? t.ownerDocument : document; } - getTilePriority(t, e, i, s) { - return D0( + getTilePriority(t, e, n, s) { + return rg( this.frameState_, t, e, - i, + n, s ); } handleBrowserEvent(t, e) { e = e || t.type; - const i = new ei(e, this, t); - this.handleMapBrowserEvent(i); + const n = new ci(e, this, t); + this.handleMapBrowserEvent(n); } handleMapBrowserEvent(t) { if (!this.frameState_) return; - const e = t.originalEvent, i = e.type; - if (i === Na.POINTERDOWN || i === U.WHEEL || i === U.KEYDOWN) { + const e = t.originalEvent, n = e.type; + if (n === da.POINTERDOWN || n === X.WHEEL || n === X.KEYDOWN) { const s = this.getOwnerDocument(), r = this.viewport_.getRootNode ? this.viewport_.getRootNode() : s, o = e.target; if (this.overlayContainerStopEvent_.contains(o) || !(r === s ? s.documentElement : r).contains(o)) return; @@ -6005,78 +5958,78 @@ class xm extends Oe { let s = this.maxTilesLoading_, r = s; if (t) { const o = t.viewHints; - if (o[Wt.ANIMATING] || o[Wt.INTERACTING]) { + if (o[Bt.ANIMATING] || o[Bt.INTERACTING]) { const a = Date.now() - t.time > 8; s = a ? 0 : 8, r = a ? 0 : 2; } } e.getTilesLoading() < s && (e.reprioritize(), e.loadMoreTiles(s, r)); } - t && this.renderer_ && !t.animate && (this.renderComplete_ === !0 ? (this.hasListener(Ri.RENDERCOMPLETE) && this.renderer_.dispatchRenderEvent( - Ri.RENDERCOMPLETE, + t && this.renderer_ && !t.animate && (this.renderComplete_ === !0 ? (this.hasListener(_i.RENDERCOMPLETE) && this.renderer_.dispatchRenderEvent( + _i.RENDERCOMPLETE, t ), this.loaded_ === !1 && (this.loaded_ = !0, this.dispatchEvent( - new Tn(vi.LOADEND, this, t) + new gn(ui.LOADEND, this, t) ))) : this.loaded_ === !0 && (this.loaded_ = !1, this.dispatchEvent( - new Tn(vi.LOADSTART, this, t) + new gn(ui.LOADSTART, this, t) ))); - const i = this.postRenderFunctions_; - for (let s = 0, r = i.length; s < r; ++s) - i[s](this, t); - i.length = 0; + const n = this.postRenderFunctions_; + for (let s = 0, r = n.length; s < r; ++s) + n[s](this, t); + n.length = 0; } handleSizeChanged_() { this.getView() && !this.getView().getAnimating() && this.getView().resolveConstraints(0), this.render(); } handleTargetChanged_() { if (this.mapBrowserEventHandler_) { - for (let e = 0, i = this.targetChangeHandlerKeys_.length; e < i; ++e) - mt(this.targetChangeHandlerKeys_[e]); + for (let e = 0, n = this.targetChangeHandlerKeys_.length; e < n; ++e) + pt(this.targetChangeHandlerKeys_[e]); this.targetChangeHandlerKeys_ = null, this.viewport_.removeEventListener( - U.CONTEXTMENU, + X.CONTEXTMENU, this.boundHandleBrowserEvent_ ), this.viewport_.removeEventListener( - U.WHEEL, + X.WHEEL, this.boundHandleBrowserEvent_ - ), this.mapBrowserEventHandler_.dispose(), this.mapBrowserEventHandler_ = null, Aa(this.viewport_); + ), this.mapBrowserEventHandler_.dispose(), this.mapBrowserEventHandler_ = null, ha(this.viewport_); } const t = this.getTargetElement(); if (!t) this.renderer_ && (clearTimeout(this.postRenderTimeoutHandle_), this.postRenderTimeoutHandle_ = void 0, this.postRenderFunctions_.length = 0, this.renderer_.dispose(), this.renderer_ = null), this.animationDelayKey_ && (cancelAnimationFrame(this.animationDelayKey_), this.animationDelayKey_ = void 0); else { - t.appendChild(this.viewport_), this.renderer_ || (this.renderer_ = new T0(this)), this.mapBrowserEventHandler_ = new P0( + t.appendChild(this.viewport_), this.renderer_ || (this.renderer_ = new K0(this)), this.mapBrowserEventHandler_ = new tg( this, this.moveTolerance_ ); - for (const s in nt) + for (const s in Ct) this.mapBrowserEventHandler_.addEventListener( - nt[s], + Ct[s], this.handleMapBrowserEvent.bind(this) ); this.viewport_.addEventListener( - U.CONTEXTMENU, + X.CONTEXTMENU, this.boundHandleBrowserEvent_, !1 ), this.viewport_.addEventListener( - U.WHEEL, + X.WHEEL, this.boundHandleBrowserEvent_, - Xu ? { passive: !1 } : !1 + vu ? { passive: !1 } : !1 ); - const e = this.getOwnerDocument().defaultView, i = this.keyboardEventTarget_ ? this.keyboardEventTarget_ : t; + const e = this.getOwnerDocument().defaultView, n = this.keyboardEventTarget_ ? this.keyboardEventTarget_ : t; this.targetChangeHandlerKeys_ = [ - et( - i, - U.KEYDOWN, + it( + n, + X.KEYDOWN, this.handleBrowserEvent, this ), - et( - i, - U.KEYPRESS, + it( + n, + X.KEYPRESS, this.handleBrowserEvent, this ), - et(e, U.RESIZE, this.updateSize, this) + it(e, X.RESIZE, this.updateSize, this) ]; } this.updateSize(); @@ -6088,28 +6041,28 @@ class xm extends Oe { this.render(); } handleViewChanged_() { - this.viewPropertyListenerKey_ && (mt(this.viewPropertyListenerKey_), this.viewPropertyListenerKey_ = null), this.viewChangeListenerKey_ && (mt(this.viewChangeListenerKey_), this.viewChangeListenerKey_ = null); + this.viewPropertyListenerKey_ && (pt(this.viewPropertyListenerKey_), this.viewPropertyListenerKey_ = null), this.viewChangeListenerKey_ && (pt(this.viewChangeListenerKey_), this.viewChangeListenerKey_ = null); const t = this.getView(); - t && (this.updateViewportSize_(), this.viewPropertyListenerKey_ = et( + t && (this.updateViewportSize_(), this.viewPropertyListenerKey_ = it( t, - Wn.PROPERTYCHANGE, + In.PROPERTYCHANGE, this.handleViewPropertyChanged_, this - ), this.viewChangeListenerKey_ = et( + ), this.viewChangeListenerKey_ = it( t, - U.CHANGE, + X.CHANGE, this.handleViewPropertyChanged_, this ), t.resolveConstraints(0)), this.render(); } handleLayerGroupChanged_() { - this.layerGroupPropertyListenerKeys_ && (this.layerGroupPropertyListenerKeys_.forEach(mt), this.layerGroupPropertyListenerKeys_ = null); + this.layerGroupPropertyListenerKeys_ && (this.layerGroupPropertyListenerKeys_.forEach(pt), this.layerGroupPropertyListenerKeys_ = null); const t = this.getLayerGroup(); - t && (this.handleLayerAdd_(new Ci("addlayer", t)), this.layerGroupPropertyListenerKeys_ = [ - et(t, Wn.PROPERTYCHANGE, this.render, this), - et(t, U.CHANGE, this.render, this), - et(t, "addlayer", this.handleLayerAdd_, this), - et(t, "removelayer", this.handleLayerRemove_, this) + t && (this.handleLayerAdd_(new fi("addlayer", t)), this.layerGroupPropertyListenerKeys_ = [ + it(t, In.PROPERTYCHANGE, this.render, this), + it(t, X.CHANGE, this.render, this), + it(t, "addlayer", this.handleLayerAdd_, this), + it(t, "removelayer", this.handleLayerRemove_, this) ]), this.render(); } isRendered() { @@ -6123,7 +6076,7 @@ class xm extends Oe { } redrawText() { const t = this.getLayerGroup().getLayerStatesArray(); - for (let e = 0, i = t.length; e < i; ++e) { + for (let e = 0, n = t.length; e < n; ++e) { const s = t[e].layer; s.hasRenderer() && s.getRenderer().handleFontsChanged(); } @@ -6141,23 +6094,23 @@ class xm extends Oe { return this.getLayerGroup().getLayers().remove(t); } handleLayerRemove_(t) { - kd(t.layer); + ud(t.layer); } removeOverlay(t) { return this.getOverlays().remove(t); } renderFrame_(t) { - const e = this.getSize(), i = this.getView(), s = this.frameState_; + const e = this.getSize(), n = this.getView(), s = this.frameState_; let r = null; - if (e !== void 0 && oc(e) && i && i.isDef()) { - const o = i.getHints( + if (e !== void 0 && Fh(e) && n && n.isDef()) { + const o = n.getHints( this.frameState_ ? this.frameState_.viewHints : void 0 - ), a = i.getState(); + ), a = n.getState(); if (r = { animate: !1, coordinateToPixelTransform: this.coordinateToPixelTransform_, declutterTree: null, - extent: Ia( + extent: aa( a.center, a.resolution, a.rotation, @@ -6176,11 +6129,11 @@ class xm extends Oe { viewState: a, viewHints: o, wantedTiles: {}, - mapId: q(this), + mapId: rt(this), renderTargets: {} }, a.nextCenter && a.nextResolution) { const l = isNaN(a.nextRotation) ? a.rotation : a.nextRotation; - r.nextExtent = Ia( + r.nextExtent = aa( a.nextCenter, a.nextResolution, l, @@ -6191,17 +6144,17 @@ class xm extends Oe { this.frameState_ = r, this.renderer_.renderFrame(r), r && (r.animate && this.render(), Array.prototype.push.apply( this.postRenderFunctions_, r.postRenderFunctions - ), s && (!this.previousExtent_ || !vl(this.previousExtent_) && !Fs(r.extent, this.previousExtent_)) && (this.dispatchEvent( - new Tn(vi.MOVESTART, this, s) - ), this.previousExtent_ = Qs(this.previousExtent_)), this.previousExtent_ && !r.viewHints[Wt.ANIMATING] && !r.viewHints[Wt.INTERACTING] && !Fs(r.extent, this.previousExtent_) && (this.dispatchEvent( - new Tn(vi.MOVEEND, this, r) - ), ju(r.extent, this.previousExtent_))), this.dispatchEvent(new Tn(vi.POSTRENDER, this, r)), this.renderComplete_ = this.hasListener(vi.LOADSTART) || this.hasListener(vi.LOADEND) || this.hasListener(Ri.RENDERCOMPLETE) ? !this.tileQueue_.getTilesLoading() && !this.tileQueue_.getCount() && !this.getLoadingOrNotReady() : void 0, this.postRenderTimeoutHandle_ || (this.postRenderTimeoutHandle_ = setTimeout(() => { + ), s && (!this.previousExtent_ || !ja(this.previousExtent_) && !ys(r.extent, this.previousExtent_)) && (this.dispatchEvent( + new gn(ui.MOVESTART, this, s) + ), this.previousExtent_ = ks(this.previousExtent_)), this.previousExtent_ && !r.viewHints[Bt.ANIMATING] && !r.viewHints[Bt.INTERACTING] && !ys(r.extent, this.previousExtent_) && (this.dispatchEvent( + new gn(ui.MOVEEND, this, r) + ), Mu(r.extent, this.previousExtent_))), this.dispatchEvent(new gn(ui.POSTRENDER, this, r)), this.renderComplete_ = this.hasListener(ui.LOADSTART) || this.hasListener(ui.LOADEND) || this.hasListener(_i.RENDERCOMPLETE) ? !this.tileQueue_.getTilesLoading() && !this.tileQueue_.getCount() && !this.getLoadingOrNotReady() : void 0, this.postRenderTimeoutHandle_ || (this.postRenderTimeoutHandle_ = setTimeout(() => { this.postRenderTimeoutHandle_ = void 0, this.handlePostRender(); }, 0)); } setLayerGroup(t) { const e = this.getLayerGroup(); - e && this.handleLayerRemove_(new Ci("removelayer", e)), this.set(Ot.LAYERGROUP, t); + e && this.handleLayerRemove_(new fi("removelayer", e)), this.set(Ot.LAYERGROUP, t); } setSize(t) { this.set(Ot.SIZE, t); @@ -6210,22 +6163,22 @@ class xm extends Oe { this.set(Ot.TARGET, t); } setView(t) { - if (!t || t instanceof si) { + if (!t || t instanceof Ke) { this.set(Ot.VIEW, t); return; } - this.set(Ot.VIEW, new si()); + this.set(Ot.VIEW, new Ke()); const e = this; - t.then(function(i) { - e.setView(new si(i)); + t.then(function(n) { + e.setView(new Ke(n)); }); } updateSize() { const t = this.getTargetElement(); let e; if (t) { - const i = getComputedStyle(t), s = t.offsetWidth - parseFloat(i.borderLeftWidth) - parseFloat(i.paddingLeft) - parseFloat(i.paddingRight) - parseFloat(i.borderRightWidth), r = t.offsetHeight - parseFloat(i.borderTopWidth) - parseFloat(i.paddingTop) - parseFloat(i.paddingBottom) - parseFloat(i.borderBottomWidth); - !isNaN(s) && !isNaN(r) && (e = [s, r], !oc(e) && !!(t.offsetWidth || t.offsetHeight || t.getClientRects().length) && console.warn( + const n = getComputedStyle(t), s = t.offsetWidth - parseFloat(n.borderLeftWidth) - parseFloat(n.paddingLeft) - parseFloat(n.paddingRight) - parseFloat(n.borderRightWidth), r = t.offsetHeight - parseFloat(n.borderTopWidth) - parseFloat(n.paddingTop) - parseFloat(n.paddingBottom) - parseFloat(n.borderBottomWidth); + !isNaN(s) && !isNaN(r) && (e = [s, r], !Fh(e) && !!(t.offsetWidth || t.offsetHeight || t.getClientRects().length) && console.warn( "No map visible because the map container's width or height are 0." )); } @@ -6235,36 +6188,36 @@ class xm extends Oe { const t = this.getView(); if (t) { let e; - const i = getComputedStyle(this.viewport_); - i.width && i.height && (e = [ - parseInt(i.width, 10), - parseInt(i.height, 10) + const n = getComputedStyle(this.viewport_); + n.width && n.height && (e = [ + parseInt(n.width, 10), + parseInt(n.height, 10) ]), t.setViewportSize(e); } } } -function Cm(n) { +function V1(i) { let t = null; - n.keyboardEventTarget !== void 0 && (t = typeof n.keyboardEventTarget == "string" ? document.getElementById(n.keyboardEventTarget) : n.keyboardEventTarget); - const e = {}, i = n.layers && typeof n.layers.getLayers == "function" ? n.layers : new Oo({ - layers: n.layers + i.keyboardEventTarget !== void 0 && (t = typeof i.keyboardEventTarget == "string" ? document.getElementById(i.keyboardEventTarget) : i.keyboardEventTarget); + const e = {}, n = i.layers && typeof i.layers.getLayers == "function" ? i.layers : new go({ + layers: i.layers }); - e[Ot.LAYERGROUP] = i, e[Ot.TARGET] = n.target, e[Ot.VIEW] = n.view instanceof si ? n.view : new si(); + e[Ot.LAYERGROUP] = n, e[Ot.TARGET] = i.target, e[Ot.VIEW] = i.view instanceof Ke ? i.view : new Ke(); let s; - n.controls !== void 0 && (Array.isArray(n.controls) ? s = new Ee(n.controls.slice()) : (Y( - typeof n.controls.getArray == "function", + i.controls !== void 0 && (Array.isArray(i.controls) ? s = new Te(i.controls.slice()) : (Y( + typeof i.controls.getArray == "function", 47 - ), s = n.controls)); + ), s = i.controls)); let r; - n.interactions !== void 0 && (Array.isArray(n.interactions) ? r = new Ee(n.interactions.slice()) : (Y( - typeof n.interactions.getArray == "function", + i.interactions !== void 0 && (Array.isArray(i.interactions) ? r = new Te(i.interactions.slice()) : (Y( + typeof i.interactions.getArray == "function", 48 - ), r = n.interactions)); + ), r = i.interactions)); let o; - return n.overlays !== void 0 ? Array.isArray(n.overlays) ? o = new Ee(n.overlays.slice()) : (Y( - typeof n.overlays.getArray == "function", + return i.overlays !== void 0 ? Array.isArray(i.overlays) ? o = new Te(i.overlays.slice()) : (Y( + typeof i.overlays.getArray == "function", 49 - ), o = n.overlays) : o = new Ee(), { + ), o = i.overlays) : o = new Te(), { controls: s, interactions: r, keyboardEventTarget: t, @@ -6272,8 +6225,8 @@ function Cm(n) { values: e }; } -const Mm = xm; -class Hl extends Oe { +const W1 = U1; +class pl extends Se { constructor(t) { if (super(), this.on, this.once, this.un, this.id_ = void 0, this.geometryName_ = "geometry", this.style_ = null, this.styleFunction_ = void 0, this.geometryChangeKey_ = null, this.addChangeListener(this.geometryName_, this.handleGeometryChanged_), t) if (typeof t.getSimplifiedGeometry == "function") { @@ -6285,12 +6238,12 @@ class Hl extends Oe { } } clone() { - const t = new Hl(this.hasProperties() ? this.getProperties() : null); + const t = new pl(this.hasProperties() ? this.getProperties() : null); t.setGeometryName(this.getGeometryName()); const e = this.getGeometry(); e && t.setGeometry(e.clone()); - const i = this.getStyle(); - return i && t.setStyle(i), t; + const n = this.getStyle(); + return n && t.setStyle(n), t; } getGeometry() { return this.get(this.geometryName_); @@ -6311,11 +6264,11 @@ class Hl extends Oe { this.changed(); } handleGeometryChanged_() { - this.geometryChangeKey_ && (mt(this.geometryChangeKey_), this.geometryChangeKey_ = null); + this.geometryChangeKey_ && (pt(this.geometryChangeKey_), this.geometryChangeKey_ = null); const t = this.getGeometry(); - t && (this.geometryChangeKey_ = et( + t && (this.geometryChangeKey_ = it( t, - U.CHANGE, + X.CHANGE, this.handleGeometryChange_, this )), this.changed(); @@ -6324,7 +6277,7 @@ class Hl extends Oe { this.set(this.geometryName_, t); } setStyle(t) { - this.style_ = t, this.styleFunction_ = t ? Em(t) : void 0, this.changed(); + this.style_ = t, this.styleFunction_ = t ? H1(t) : void 0, this.changed(); } setId(t) { this.id_ = t, this.changed(); @@ -6333,17 +6286,17 @@ class Hl extends Oe { this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_), this.geometryName_ = t, this.addChangeListener(this.geometryName_, this.handleGeometryChanged_), this.handleGeometryChanged_(); } } -function Em(n) { - if (typeof n == "function") - return n; +function H1(i) { + if (typeof i == "function") + return i; { let t; - return Array.isArray(n) ? t = n : (Y(typeof n.getZIndex == "function", 41), t = [n]), function() { + return Array.isArray(i) ? t = i : (Y(typeof i.getZIndex == "function", 41), t = [i]), function() { return t; }; } } -const Ie = Hl, xt = { +const zs = pl, yt = { ACCURACY: "accuracy", ACCURACY_GEOMETRY: "accuracyGeometry", ALTITUDE: "altitude", @@ -6355,24 +6308,24 @@ const Ie = Hl, xt = { TRACKING: "tracking", TRACKING_OPTIONS: "trackingOptions" }; -class wm extends Re { +class X1 extends ke { constructor(t) { - super(U.ERROR), this.code = t.code, this.message = t.message; + super(X.ERROR), this.code = t.code, this.message = t.message; } } -class Sm extends Oe { +class Y1 extends Se { constructor(t) { - super(), this.on, this.once, this.un, t = t || {}, this.position_ = null, this.transform_ = bl, this.watchId_ = void 0, this.addChangeListener(xt.PROJECTION, this.handleProjectionChanged_), this.addChangeListener(xt.TRACKING, this.handleTrackingChanged_), t.projection !== void 0 && this.setProjection(t.projection), t.trackingOptions !== void 0 && this.setTrackingOptions(t.trackingOptions), this.setTracking(t.tracking !== void 0 ? t.tracking : !1); + super(), this.on, this.once, this.un, t = t || {}, this.position_ = null, this.transform_ = il, this.watchId_ = void 0, this.addChangeListener(yt.PROJECTION, this.handleProjectionChanged_), this.addChangeListener(yt.TRACKING, this.handleTrackingChanged_), t.projection !== void 0 && this.setProjection(t.projection), t.trackingOptions !== void 0 && this.setTrackingOptions(t.trackingOptions), this.setTracking(t.tracking !== void 0 ? t.tracking : !1); } disposeInternal() { this.setTracking(!1), super.disposeInternal(); } handleProjectionChanged_() { const t = this.getProjection(); - t && (this.transform_ = Fo( - Q("EPSG:4326"), + t && (this.transform_ = mo( + J("EPSG:4326"), t - ), this.position_ && this.set(xt.POSITION, this.transform_(this.position_))); + ), this.position_ && this.set(yt.POSITION, this.transform_(this.position_))); } handleTrackingChanged_() { if ("geolocation" in navigator) { @@ -6386,72 +6339,72 @@ class Sm extends Oe { } positionChange_(t) { const e = t.coords; - this.set(xt.ACCURACY, e.accuracy), this.set( - xt.ALTITUDE, + this.set(yt.ACCURACY, e.accuracy), this.set( + yt.ALTITUDE, e.altitude === null ? void 0 : e.altitude ), this.set( - xt.ALTITUDE_ACCURACY, + yt.ALTITUDE_ACCURACY, e.altitudeAccuracy === null ? void 0 : e.altitudeAccuracy ), this.set( - xt.HEADING, - e.heading === null ? void 0 : ji(e.heading) + yt.HEADING, + e.heading === null ? void 0 : Gi(e.heading) ), this.position_ ? (this.position_[0] = e.longitude, this.position_[1] = e.latitude) : this.position_ = [e.longitude, e.latitude]; - const i = this.transform_(this.position_); - this.set(xt.POSITION, i), this.set(xt.SPEED, e.speed === null ? void 0 : e.speed); - const s = S1(this.position_, e.accuracy); - s.applyTransform(this.transform_), this.set(xt.ACCURACY_GEOMETRY, s), this.changed(); + const n = this.transform_(this.position_); + this.set(yt.POSITION, n), this.set(yt.SPEED, e.speed === null ? void 0 : e.speed); + const s = Kg(this.position_, e.accuracy); + s.applyTransform(this.transform_), this.set(yt.ACCURACY_GEOMETRY, s), this.changed(); } positionError_(t) { - this.dispatchEvent(new wm(t)); + this.dispatchEvent(new X1(t)); } getAccuracy() { - return this.get(xt.ACCURACY); + return this.get(yt.ACCURACY); } getAccuracyGeometry() { - return this.get(xt.ACCURACY_GEOMETRY) || null; + return this.get(yt.ACCURACY_GEOMETRY) || null; } getAltitude() { - return this.get(xt.ALTITUDE); + return this.get(yt.ALTITUDE); } getAltitudeAccuracy() { - return this.get(xt.ALTITUDE_ACCURACY); + return this.get(yt.ALTITUDE_ACCURACY); } getHeading() { - return this.get(xt.HEADING); + return this.get(yt.HEADING); } getPosition() { - return this.get(xt.POSITION); + return this.get(yt.POSITION); } getProjection() { - return this.get(xt.PROJECTION); + return this.get(yt.PROJECTION); } getSpeed() { - return this.get(xt.SPEED); + return this.get(yt.SPEED); } getTracking() { - return this.get(xt.TRACKING); + return this.get(yt.TRACKING); } getTrackingOptions() { - return this.get(xt.TRACKING_OPTIONS); + return this.get(yt.TRACKING_OPTIONS); } setProjection(t) { - this.set(xt.PROJECTION, Q(t)); + this.set(yt.PROJECTION, J(t)); } setTracking(t) { - this.set(xt.TRACKING, t); + this.set(yt.TRACKING, t); } setTrackingOptions(t) { - this.set(xt.TRACKING_OPTIONS, t); + this.set(yt.TRACKING_OPTIONS, t); } } -const Rm = Sm; -class Xl { +const j1 = Y1; +class yl { constructor(t) { t = t || {}, this.color_ = t.color !== void 0 ? t.color : null; } clone() { const t = this.getColor(); - return new Xl({ + return new yl({ color: Array.isArray(t) ? t.slice() : t || void 0 }); } @@ -6462,85 +6415,85 @@ class Xl { this.color_ = t; } } -const Vt = Xl; -function $d(n, t, e, i, s, r, o) { +const he = yl; +function fd(i, t, e, n, s, r, o) { let a, l; - const h = (e - t) / i; + const h = (e - t) / n; if (h === 1) a = t; else if (h === 2) a = t, l = s; else if (h !== 0) { - let c = n[t], u = n[t + 1], d = 0; + let c = i[t], u = i[t + 1], d = 0; const f = [0]; - for (let _ = t + i; _ < e; _ += i) { - const y = n[_], p = n[_ + 1]; + for (let _ = t + n; _ < e; _ += n) { + const y = i[_], p = i[_ + 1]; d += Math.sqrt((y - c) * (y - c) + (p - u) * (p - u)), f.push(d), c = y, u = p; } - const g = s * d, m = Lg(f, g); - m < 0 ? (l = (g - f[-m - 2]) / (f[-m - 1] - f[-m - 2]), a = t + (-m - 2) * i) : a = t + m * i; + const g = s * d, m = t0(f, g); + m < 0 ? (l = (g - f[-m - 2]) / (f[-m - 1] - f[-m - 2]), a = t + (-m - 2) * n) : a = t + m * n; } o = o > 1 ? o : 2, r = r || new Array(o); for (let c = 0; c < o; ++c) - r[c] = a === void 0 ? NaN : l === void 0 ? n[a + c] : ii(n[a + c], n[a + i + c], l); + r[c] = a === void 0 ? NaN : l === void 0 ? i[a + c] : Ye(i[a + c], i[a + n + c], l); return r; } -function Ua(n, t, e, i, s, r) { +function Ma(i, t, e, n, s, r) { if (e == t) return null; let o; - if (s < n[t + i - 1]) - return r ? (o = n.slice(t, t + i), o[i - 1] = s, o) : null; - if (n[e - 1] < s) - return r ? (o = n.slice(e - i, e), o[i - 1] = s, o) : null; - if (s == n[t + i - 1]) - return n.slice(t, t + i); - let a = t / i, l = e / i; + if (s < i[t + n - 1]) + return r ? (o = i.slice(t, t + n), o[n - 1] = s, o) : null; + if (i[e - 1] < s) + return r ? (o = i.slice(e - n, e), o[n - 1] = s, o) : null; + if (s == i[t + n - 1]) + return i.slice(t, t + n); + let a = t / n, l = e / n; for (; a < l; ) { const d = a + l >> 1; - s < n[(d + 1) * i - 1] ? l = d : a = d + 1; + s < i[(d + 1) * n - 1] ? l = d : a = d + 1; } - const h = n[a * i - 1]; + const h = i[a * n - 1]; if (s == h) - return n.slice((a - 1) * i, (a - 1) * i + i); - const c = n[(a + 1) * i - 1], u = (s - h) / (c - h); + return i.slice((a - 1) * n, (a - 1) * n + n); + const c = i[(a + 1) * n - 1], u = (s - h) / (c - h); o = []; - for (let d = 0; d < i - 1; ++d) + for (let d = 0; d < n - 1; ++d) o.push( - ii( - n[(a - 1) * i + d], - n[a * i + d], + Ye( + i[(a - 1) * n + d], + i[a * n + d], u ) ); return o.push(s), o; } -function Tm(n, t, e, i, s, r, o) { +function K1(i, t, e, n, s, r, o) { if (o) - return Ua( - n, + return Ma( + i, t, e[e.length - 1], - i, + n, s, r ); let a; - if (s < n[i - 1]) - return r ? (a = n.slice(0, i), a[i - 1] = s, a) : null; - if (n[n.length - 1] < s) - return r ? (a = n.slice(n.length - i), a[i - 1] = s, a) : null; + if (s < i[n - 1]) + return r ? (a = i.slice(0, n), a[n - 1] = s, a) : null; + if (i[i.length - 1] < s) + return r ? (a = i.slice(i.length - n), a[n - 1] = s, a) : null; for (let l = 0, h = e.length; l < h; ++l) { const c = e[l]; if (t != c) { - if (s < n[t + i - 1]) + if (s < i[t + n - 1]) return null; - if (s <= n[c - 1]) - return Ua( - n, + if (s <= i[c - 1]) + return Ma( + i, t, c, - i, + n, s, !1 ); @@ -6549,15 +6502,15 @@ function Tm(n, t, e, i, s, r, o) { } return null; } -function Bd(n, t, e, i) { - let s = n[t], r = n[t + 1], o = 0; - for (let a = t + i; a < e; a += i) { - const l = n[a], h = n[a + 1]; +function gd(i, t, e, n) { + let s = i[t], r = i[t + 1], o = 0; + for (let a = t + n; a < e; a += n) { + const l = i[a], h = i[a + 1]; o += Math.sqrt((l - s) * (l - s) + (h - r) * (h - r)), s = l, r = h; } return o; } -class uo extends Di { +class Vr extends Qi { constructor(t, e) { super(), this.flatMidpoint_ = null, this.flatMidpointRevision_ = -1, this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, e !== void 0 && !Array.isArray(t[0]) ? this.setFlatCoordinates( e, @@ -6568,25 +6521,25 @@ class uo extends Di { ); } appendCoordinate(t) { - this.flatCoordinates ? Qt(this.flatCoordinates, t) : this.flatCoordinates = t.slice(), this.changed(); + this.flatCoordinates ? Ht(this.flatCoordinates, t) : this.flatCoordinates = t.slice(), this.changed(); } clone() { - const t = new uo( + const t = new Vr( this.flatCoordinates.slice(), this.layout ); return t.applyProperties(this), t; } - closestPointXY(t, e, i, s) { - return s < dn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( - Nl( + closestPointXY(t, e, n, s) { + return s < qi(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( + al( this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0 ) - ), this.maxDeltaRevision_ = this.getRevision()), kl( + ), this.maxDeltaRevision_ = this.getRevision()), hl( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6595,12 +6548,12 @@ class uo extends Di { !1, t, e, - i, + n, s )); } forEachSegment(t) { - return Rd( + return ed( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6609,7 +6562,7 @@ class uo extends Di { ); } getCoordinateAtM(t, e) { - return this.layout != "XYM" && this.layout != "XYZM" ? null : (e = e !== void 0 ? e : !1, Ua( + return this.layout != "XYM" && this.layout != "XYZM" ? null : (e = e !== void 0 ? e : !1, Ma( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6619,7 +6572,7 @@ class uo extends Di { )); } getCoordinates() { - return Ei( + return gi( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6627,7 +6580,7 @@ class uo extends Di { ); } getCoordinateAt(t, e) { - return $d( + return fd( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6638,7 +6591,7 @@ class uo extends Di { ); } getLength() { - return Bd( + return gd( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6650,7 +6603,7 @@ class uo extends Di { } getSimplifiedGeometryInternal(t) { const e = []; - return e.length = Bl( + return e.length = dl( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6658,13 +6611,13 @@ class uo extends Di { t, e, 0 - ), new uo(e, "XY"); + ), new Vr(e, "XY"); } getType() { return "LineString"; } intersectsExtent(t) { - return Do( + return po( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6673,7 +6626,7 @@ class uo extends Di { ); } setCoordinates(t, e) { - this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = No( + this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = _o( this.flatCoordinates, 0, t, @@ -6681,14 +6634,14 @@ class uo extends Di { ), this.changed(); } } -const li = uo; -class Yl { +const bs = Vr; +class vl { constructor(t) { t = t || {}, this.color_ = t.color !== void 0 ? t.color : null, this.lineCap_ = t.lineCap, this.lineDash_ = t.lineDash !== void 0 ? t.lineDash : null, this.lineDashOffset_ = t.lineDashOffset, this.lineJoin_ = t.lineJoin, this.miterLimit_ = t.miterLimit, this.width_ = t.width; } clone() { const t = this.getColor(); - return new Yl({ + return new vl({ color: Array.isArray(t) ? t.slice() : t || void 0, lineCap: this.getLineCap(), lineDash: this.getLineDash() ? this.getLineDash().slice() : void 0, @@ -6741,20 +6694,20 @@ class Yl { this.width_ = t; } } -const Xt = Yl, Pt = { +const Ee = vl, It = { IDLE: 0, LOADING: 1, LOADED: 2, ERROR: 3, EMPTY: 4 }; -class jl { +class xl { constructor(t) { - this.opacity_ = t.opacity, this.rotateWithView_ = t.rotateWithView, this.rotation_ = t.rotation, this.scale_ = t.scale, this.scaleArray_ = fe(t.scale), this.displacement_ = t.displacement, this.declutterMode_ = t.declutterMode; + this.opacity_ = t.opacity, this.rotateWithView_ = t.rotateWithView, this.rotation_ = t.rotation, this.scale_ = t.scale, this.scaleArray_ = ae(t.scale), this.displacement_ = t.displacement, this.declutterMode_ = t.declutterMode; } clone() { const t = this.getScale(); - return new jl({ + return new xl({ opacity: this.getOpacity(), scale: Array.isArray(t) ? t.slice() : t, rotation: this.getRotation(), @@ -6785,28 +6738,28 @@ class jl { return this.declutterMode_; } getAnchor() { - return H(); + return W(); } getImage(t) { - return H(); + return W(); } getHitDetectionImage() { - return H(); + return W(); } getPixelRatio(t) { return 1; } getImageState() { - return H(); + return W(); } getImageSize() { - return H(); + return W(); } getOrigin() { - return H(); + return W(); } getSize() { - return H(); + return W(); } setDisplacement(t) { this.displacement_ = t; @@ -6821,23 +6774,23 @@ class jl { this.rotation_ = t; } setScale(t) { - this.scale_ = t, this.scaleArray_ = fe(t); + this.scale_ = t, this.scaleArray_ = ae(t); } listenImageChange(t) { - H(); + W(); } load() { - H(); + W(); } unlistenImageChange(t) { - H(); + W(); } } -const zd = jl; -function ke(n) { - return Array.isArray(n) ? ed(n) : n; +const md = xl; +function Ie(i) { + return Array.isArray(i) ? Iu(i) : i; } -class ql extends zd { +class Ml extends md { constructor(t) { const e = t.rotateWithView !== void 0 ? t.rotateWithView : !1; super({ @@ -6850,7 +6803,7 @@ class ql extends zd { }), this.canvas_ = void 0, this.hitDetectionCanvas_ = null, this.fill_ = t.fill !== void 0 ? t.fill : null, this.origin_ = [0, 0], this.points_ = t.points, this.radius_ = t.radius !== void 0 ? t.radius : t.radius1, this.radius2_ = t.radius2, this.angle_ = t.angle !== void 0 ? t.angle : 0, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.size_ = null, this.renderOptions_ = null, this.render(); } clone() { - const t = this.getScale(), e = new ql({ + const t = this.getScale(), e = new Ml({ fill: this.getFill() ? this.getFill().clone() : void 0, points: this.getPoints(), radius: this.getRadius(), @@ -6869,10 +6822,10 @@ class ql extends zd { const t = this.size_; if (!t) return null; - const e = this.getDisplacement(), i = this.getScaleArray(); + const e = this.getDisplacement(), n = this.getScaleArray(); return [ - t[0] / 2 - e[0] / i[0], - t[1] / 2 + e[1] / i[1] + t[0] / 2 - e[0] / n[0], + t[1] / 2 + e[1] / n[1] ]; } getAngle() { @@ -6890,11 +6843,11 @@ class ql extends zd { getImage(t) { let e = this.canvas_[t]; if (!e) { - const i = this.renderOptions_, s = pe( - i.size * t, - i.size * t + const n = this.renderOptions_, s = de( + n.size * t, + n.size * t ); - this.draw_(i, s, t), e = s.canvas, this.canvas_[t] = e; + this.draw_(n, s, t), e = s.canvas, this.canvas_[t] = e; } return e; } @@ -6905,7 +6858,7 @@ class ql extends zd { return this.size_; } getImageState() { - return Pt.LOADED; + return It.LOADED; } getOrigin() { return this.origin_; @@ -6934,7 +6887,7 @@ class ql extends zd { } unlistenImageChange(t) { } - calculateLineJoinSize_(t, e, i) { + calculateLineJoinSize_(t, e, n) { if (e === 0 || this.points_ === 1 / 0 || t !== "bevel" && t !== "miter") return e; let s = this.radius_, r = this.radius2_ === void 0 ? s : this.radius2_; @@ -6943,27 +6896,27 @@ class ql extends zd { s = r, r = E; } const o = this.radius2_ === void 0 ? this.points_ : this.points_ * 2, a = 2 * Math.PI / o, l = r * Math.sin(a), h = Math.sqrt(r * r - l * l), c = s - h, u = Math.sqrt(l * l + c * c), d = u / l; - if (t === "miter" && d <= i) + if (t === "miter" && d <= n) return d * e; const f = e / 2 / d, g = e / 2 * (c / u), _ = Math.sqrt((s + f) * (s + f) + g * g) - s; if (this.radius2_ === void 0 || t === "bevel") return _ * 2; - const y = s * Math.sin(a), p = Math.sqrt(s * s - y * y), v = r - p, C = Math.sqrt(y * y + v * v) / y; - if (C <= i) { - const E = C * e / 2 - r - s; + const y = s * Math.sin(a), p = Math.sqrt(s * s - y * y), v = r - p, M = Math.sqrt(y * y + v * v) / y; + if (M <= n) { + const E = M * e / 2 - r - s; return 2 * Math.max(_, E); } return _ * 2; } createRenderOptions() { - let t = Xn, e = 0, i = null, s = 0, r, o = 0; - this.stroke_ && (r = this.stroke_.getColor(), r === null && (r = Gs), r = ke(r), o = this.stroke_.getWidth(), o === void 0 && (o = Bs), i = this.stroke_.getLineDash(), s = this.stroke_.getLineDashOffset(), t = this.stroke_.getLineJoin(), t === void 0 && (t = Xn), e = this.stroke_.getMiterLimit(), e === void 0 && (e = ks)); + let t = Pn, e = 0, n = null, s = 0, r, o = 0; + this.stroke_ && (r = this.stroke_.getColor(), r === null && (r = Cs), r = Ie(r), o = this.stroke_.getWidth(), o === void 0 && (o = ws), n = this.stroke_.getLineDash(), s = this.stroke_.getLineDashOffset(), t = this.stroke_.getLineJoin(), t === void 0 && (t = Pn), e = this.stroke_.getMiterLimit(), e === void 0 && (e = Ms)); const a = this.calculateLineJoinSize_(t, o, e), l = Math.max(this.radius_, this.radius2_ || 0), h = Math.ceil(2 * l + a); return { strokeStyle: r, strokeWidth: o, size: h, - lineDash: i, + lineDash: n, lineDashOffset: s, lineJoin: t, miterLimit: e @@ -6974,18 +6927,18 @@ class ql extends zd { const t = this.renderOptions_.size; this.canvas_ = {}, this.size_ = [t, t]; } - draw_(t, e, i) { - if (e.scale(i, i), e.translate(t.size / 2, t.size / 2), this.createPath_(e), this.fill_) { + draw_(t, e, n) { + if (e.scale(n, n), e.translate(t.size / 2, t.size / 2), this.createPath_(e), this.fill_) { let s = this.fill_.getColor(); - s === null && (s = ai), e.fillStyle = ke(s), e.fill(); + s === null && (s = Je), e.fillStyle = Ie(s), e.fill(); } this.stroke_ && (e.strokeStyle = t.strokeStyle, e.lineWidth = t.strokeWidth, t.lineDash && (e.setLineDash(t.lineDash), e.lineDashOffset = t.lineDashOffset), e.lineJoin = t.lineJoin, e.miterLimit = t.miterLimit, e.stroke()); } createHitDetectionCanvas_(t) { if (this.fill_) { - let e = this.fill_.getColor(), i = 0; - if (typeof e == "string" && (e = Qr(e)), e === null ? i = 1 : Array.isArray(e) && (i = e.length === 4 ? e[3] : 1), i === 0) { - const s = pe( + let e = this.fill_.getColor(), n = 0; + if (typeof e == "string" && (e = Nr(e)), e === null ? n = 1 : Array.isArray(e) && (n = e.length === 4 ? e[3] : 1), n === 0) { + const s = de( t.size, t.size ); @@ -6996,26 +6949,26 @@ class ql extends zd { } createPath_(t) { let e = this.points_; - const i = this.radius_; + const n = this.radius_; if (e === 1 / 0) - t.arc(0, 0, i, 0, 2 * Math.PI); + t.arc(0, 0, n, 0, 2 * Math.PI); else { - const s = this.radius2_ === void 0 ? i : this.radius2_; + const s = this.radius2_ === void 0 ? n : this.radius2_; this.radius2_ !== void 0 && (e *= 2); const r = this.angle_ - Math.PI / 2, o = 2 * Math.PI / e; for (let a = 0; a < e; a++) { - const l = r + a * o, h = a % 2 === 0 ? i : s; + const l = r + a * o, h = a % 2 === 0 ? n : s; t.lineTo(h * Math.cos(l), h * Math.sin(l)); } t.closePath(); } } drawHitDetectionCanvas_(t, e) { - e.translate(t.size / 2, t.size / 2), this.createPath_(e), e.fillStyle = ai, e.fill(), this.stroke_ && (e.strokeStyle = t.strokeStyle, e.lineWidth = t.strokeWidth, t.lineDash && (e.setLineDash(t.lineDash), e.lineDashOffset = t.lineDashOffset), e.lineJoin = t.lineJoin, e.miterLimit = t.miterLimit, e.stroke()); + e.translate(t.size / 2, t.size / 2), this.createPath_(e), e.fillStyle = Je, e.fill(), this.stroke_ && (e.strokeStyle = t.strokeStyle, e.lineWidth = t.strokeWidth, t.lineDash && (e.setLineDash(t.lineDash), e.lineDashOffset = t.lineDashOffset), e.lineJoin = t.lineJoin, e.miterLimit = t.miterLimit, e.stroke()); } } -const Zd = ql; -class Kl extends Zd { +const _d = Ml; +class Cl extends _d { constructor(t) { t = t || { radius: 5 }, super({ points: 1 / 0, @@ -7030,7 +6983,7 @@ class Kl extends Zd { }); } clone() { - const t = this.getScale(), e = new Kl({ + const t = this.getScale(), e = new Cl({ fill: this.getFill() ? this.getFill().clone() : void 0, stroke: this.getStroke() ? this.getStroke().clone() : void 0, radius: this.getRadius(), @@ -7046,14 +6999,14 @@ class Kl extends Zd { this.radius_ = t, this.render(); } } -const we = Kl; -class wi { +const qe = Cl; +class yo { constructor(t) { - t = t || {}, this.geometry_ = null, this.geometryFunction_ = ac, t.geometry !== void 0 && this.setGeometry(t.geometry), this.fill_ = t.fill !== void 0 ? t.fill : null, this.image_ = t.image !== void 0 ? t.image : null, this.renderer_ = t.renderer !== void 0 ? t.renderer : null, this.hitDetectionRenderer_ = t.hitDetectionRenderer !== void 0 ? t.hitDetectionRenderer : null, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.text_ = t.text !== void 0 ? t.text : null, this.zIndex_ = t.zIndex; + t = t || {}, this.geometry_ = null, this.geometryFunction_ = Dh, t.geometry !== void 0 && this.setGeometry(t.geometry), this.fill_ = t.fill !== void 0 ? t.fill : null, this.image_ = t.image !== void 0 ? t.image : null, this.renderer_ = t.renderer !== void 0 ? t.renderer : null, this.hitDetectionRenderer_ = t.hitDetectionRenderer !== void 0 ? t.hitDetectionRenderer : null, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.text_ = t.text !== void 0 ? t.text : null, this.zIndex_ = t.zIndex; } clone() { let t = this.getGeometry(); - return t && typeof t == "object" && (t = t.clone()), new wi({ + return t && typeof t == "object" && (t = t.clone()), new yo({ geometry: t, fill: this.getFill() ? this.getFill().clone() : void 0, image: this.getImage() ? this.getImage().clone() : void 0, @@ -7113,98 +7066,58 @@ class wi { return e.get(t); } : t ? t !== void 0 && (this.geometryFunction_ = function() { return t; - }) : this.geometryFunction_ = ac, this.geometry_ = t; + }) : this.geometryFunction_ = Dh, this.geometry_ = t; } setZIndex(t) { this.zIndex_ = t; } } -function bm(n) { +function q1(i) { let t; - if (typeof n == "function") - t = n; + if (typeof i == "function") + t = i; else { let e; - Array.isArray(n) ? e = n : (Y(typeof n.getZIndex == "function", 41), e = [n]), t = function() { + Array.isArray(i) ? e = i : (Y(typeof i.getZIndex == "function", 41), e = [i]), t = function() { return e; }; } return t; } -let ha = null; -function Lm(n, t) { - if (!ha) { - const e = new Vt({ +let Uo = null; +function J1(i, t) { + if (!Uo) { + const e = new he({ color: "rgba(255,255,255,0.4)" - }), i = new Xt({ + }), n = new Ee({ color: "#3399CC", width: 1.25 }); - ha = [ - new wi({ - image: new we({ + Uo = [ + new yo({ + image: new qe({ fill: e, - stroke: i, + stroke: n, radius: 5 }), fill: e, - stroke: i + stroke: n }) ]; } - return ha; -} -function Vd() { - const n = {}, t = [255, 255, 255, 1], e = [0, 153, 255, 1], i = 3; - return n.Polygon = [ - new wi({ - fill: new Vt({ - color: [255, 255, 255, 0.5] - }) - }) - ], n.MultiPolygon = n.Polygon, n.LineString = [ - new wi({ - stroke: new Xt({ - color: t, - width: i + 2 - }) - }), - new wi({ - stroke: new Xt({ - color: e, - width: i - }) - }) - ], n.MultiLineString = n.LineString, n.Circle = n.Polygon.concat(n.LineString), n.Point = [ - new wi({ - image: new we({ - radius: i * 2, - fill: new Vt({ - color: e - }), - stroke: new Xt({ - color: t, - width: i / 2 - }) - }), - zIndex: 1 / 0 - }) - ], n.MultiPoint = n.Point, n.GeometryCollection = n.Polygon.concat( - n.LineString, - n.Point - ), n; + return Uo; } -function ac(n) { - return n.getGeometry(); +function Dh(i) { + return i.getGeometry(); } -const Zt = wi, Im = "#333"; -class Jl { +const Vt = yo, Q1 = "#333"; +class El { constructor(t) { - t = t || {}, this.font_ = t.font, this.rotation_ = t.rotation, this.rotateWithView_ = t.rotateWithView, this.scale_ = t.scale, this.scaleArray_ = fe(t.scale !== void 0 ? t.scale : 1), this.text_ = t.text, this.textAlign_ = t.textAlign, this.justify_ = t.justify, this.textBaseline_ = t.textBaseline, this.fill_ = t.fill !== void 0 ? t.fill : new Vt({ color: Im }), this.maxAngle_ = t.maxAngle !== void 0 ? t.maxAngle : Math.PI / 4, this.placement_ = t.placement !== void 0 ? t.placement : "point", this.overflow_ = !!t.overflow, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.offsetX_ = t.offsetX !== void 0 ? t.offsetX : 0, this.offsetY_ = t.offsetY !== void 0 ? t.offsetY : 0, this.backgroundFill_ = t.backgroundFill ? t.backgroundFill : null, this.backgroundStroke_ = t.backgroundStroke ? t.backgroundStroke : null, this.padding_ = t.padding === void 0 ? null : t.padding; + t = t || {}, this.font_ = t.font, this.rotation_ = t.rotation, this.rotateWithView_ = t.rotateWithView, this.scale_ = t.scale, this.scaleArray_ = ae(t.scale !== void 0 ? t.scale : 1), this.text_ = t.text, this.textAlign_ = t.textAlign, this.justify_ = t.justify, this.textBaseline_ = t.textBaseline, this.fill_ = t.fill !== void 0 ? t.fill : new he({ color: Q1 }), this.maxAngle_ = t.maxAngle !== void 0 ? t.maxAngle : Math.PI / 4, this.placement_ = t.placement !== void 0 ? t.placement : "point", this.overflow_ = !!t.overflow, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.offsetX_ = t.offsetX !== void 0 ? t.offsetX : 0, this.offsetY_ = t.offsetY !== void 0 ? t.offsetY : 0, this.backgroundFill_ = t.backgroundFill ? t.backgroundFill : null, this.backgroundStroke_ = t.backgroundStroke ? t.backgroundStroke : null, this.padding_ = t.padding === void 0 ? null : t.padding; } clone() { const t = this.getScale(); - return new Jl({ + return new El({ font: this.getFont(), placement: this.getPlacement(), maxAngle: this.getMaxAngle(), @@ -7310,7 +7223,7 @@ class Jl { this.rotation_ = t; } setScale(t) { - this.scale_ = t, this.scaleArray_ = fe(t !== void 0 ? t : 1); + this.scale_ = t, this.scaleArray_ = ae(t !== void 0 ? t : 1); } setStroke(t) { this.stroke_ = t; @@ -7337,34 +7250,34 @@ class Jl { this.padding_ = t; } } -const Wa = Jl; -function Pm(n, t, e, i, s) { - Ud(n, t, e || 0, i || n.length - 1, s || Am); +const Ca = El; +function tm(i, t, e, n, s) { + pd(i, t, e || 0, n || i.length - 1, s || em); } -function Ud(n, t, e, i, s) { - for (; i > e; ) { - if (i - e > 600) { - var r = i - e + 1, o = t - e + 1, a = Math.log(r), l = 0.5 * Math.exp(2 * a / 3), h = 0.5 * Math.sqrt(a * l * (r - l) / r) * (o - r / 2 < 0 ? -1 : 1), c = Math.max(e, Math.floor(t - o * l / r + h)), u = Math.min(i, Math.floor(t + (r - o) * l / r + h)); - Ud(n, t, c, u, s); +function pd(i, t, e, n, s) { + for (; n > e; ) { + if (n - e > 600) { + var r = n - e + 1, o = t - e + 1, a = Math.log(r), l = 0.5 * Math.exp(2 * a / 3), h = 0.5 * Math.sqrt(a * l * (r - l) / r) * (o - r / 2 < 0 ? -1 : 1), c = Math.max(e, Math.floor(t - o * l / r + h)), u = Math.min(n, Math.floor(t + (r - o) * l / r + h)); + pd(i, t, c, u, s); } - var d = n[t], f = e, g = i; - for (gs(n, e, t), s(n[i], d) > 0 && gs(n, e, i); f < g; ) { - for (gs(n, f, g), f++, g--; s(n[f], d) < 0; ) + var d = i[t], f = e, g = n; + for (Qn(i, e, t), s(i[n], d) > 0 && Qn(i, e, n); f < g; ) { + for (Qn(i, f, g), f++, g--; s(i[f], d) < 0; ) f++; - for (; s(n[g], d) > 0; ) + for (; s(i[g], d) > 0; ) g--; } - s(n[e], d) === 0 ? gs(n, e, g) : (g++, gs(n, g, i)), g <= t && (e = g + 1), t <= g && (i = g - 1); + s(i[e], d) === 0 ? Qn(i, e, g) : (g++, Qn(i, g, n)), g <= t && (e = g + 1), t <= g && (n = g - 1); } } -function gs(n, t, e) { - var i = n[t]; - n[t] = n[e], n[e] = i; +function Qn(i, t, e) { + var n = i[t]; + i[t] = i[e], i[e] = n; } -function Am(n, t) { - return n < t ? -1 : n > t ? 1 : 0; +function em(i, t) { + return i < t ? -1 : i > t ? 1 : 0; } -class Wd { +class yd { constructor(t = 9) { this._maxEntries = Math.max(4, t), this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4)), this.clear(); } @@ -7373,34 +7286,34 @@ class Wd { } search(t) { let e = this.data; - const i = []; - if (!Pr(t, e)) - return i; + const n = []; + if (!pr(t, e)) + return n; const s = this.toBBox, r = []; for (; e; ) { for (let o = 0; o < e.children.length; o++) { const a = e.children[o], l = e.leaf ? s(a) : a; - Pr(t, l) && (e.leaf ? i.push(a) : ua(t, l) ? this._all(a, i) : r.push(a)); + pr(t, l) && (e.leaf ? n.push(a) : Wo(t, l) ? this._all(a, n) : r.push(a)); } e = r.pop(); } - return i; + return n; } collides(t) { let e = this.data; - if (!Pr(t, e)) + if (!pr(t, e)) return !1; - const i = []; + const n = []; for (; e; ) { for (let s = 0; s < e.children.length; s++) { const r = e.children[s], o = e.leaf ? this.toBBox(r) : r; - if (Pr(t, o)) { - if (e.leaf || ua(t, o)) + if (pr(t, o)) { + if (e.leaf || Wo(t, o)) return !0; - i.push(r); + n.push(r); } } - e = i.pop(); + e = n.pop(); } return !1; } @@ -7408,8 +7321,8 @@ class Wd { if (!(t && t.length)) return this; if (t.length < this._minEntries) { - for (let i = 0; i < t.length; i++) - this.insert(t[i]); + for (let n = 0; n < t.length; n++) + this.insert(t[n]); return this; } let e = this._build(t.slice(), 0, t.length - 1, 0); @@ -7419,8 +7332,8 @@ class Wd { this._splitRoot(this.data, e); else { if (this.data.height < e.height) { - const i = this.data; - this.data = e, e = i; + const n = this.data; + this.data = e, e = n; } this._insert(e, this.data.height - e.height - 1, !0); } @@ -7430,21 +7343,21 @@ class Wd { return t && this._insert(t, this.data.height - 1), this; } clear() { - return this.data = bn([]), this; + return this.data = mn([]), this; } remove(t, e) { if (!t) return this; - let i = this.data; + let n = this.data; const s = this.toBBox(t), r = [], o = []; let a, l, h; - for (; i || r.length; ) { - if (i || (i = r.pop(), l = r[r.length - 1], a = o.pop(), h = !0), i.leaf) { - const c = Om(t, i.children, e); + for (; n || r.length; ) { + if (n || (n = r.pop(), l = r[r.length - 1], a = o.pop(), h = !0), n.leaf) { + const c = im(t, n.children, e); if (c !== -1) - return i.children.splice(c, 1), r.push(i), this._condense(r), this; + return n.children.splice(c, 1), r.push(n), this._condense(r), this; } - !h && !i.leaf && ua(i, s) ? (r.push(i), o.push(a), a = 0, l = i, i = i.children[0]) : l ? (a++, i = l.children[a], h = !1) : i = null; + !h && !n.leaf && Wo(n, s) ? (r.push(n), o.push(a), a = 0, l = n, n = n.children[0]) : l ? (a++, n = l.children[a], h = !1) : n = null; } return this; } @@ -7464,140 +7377,140 @@ class Wd { return this.data = t, this; } _all(t, e) { - const i = []; + const n = []; for (; t; ) - t.leaf ? e.push(...t.children) : i.push(...t.children), t = i.pop(); + t.leaf ? e.push(...t.children) : n.push(...t.children), t = n.pop(); return e; } - _build(t, e, i, s) { - const r = i - e + 1; + _build(t, e, n, s) { + const r = n - e + 1; let o = this._maxEntries, a; if (r <= o) - return a = bn(t.slice(e, i + 1)), Mn(a, this.toBBox), a; - s || (s = Math.ceil(Math.log(r) / Math.log(o)), o = Math.ceil(r / Math.pow(o, s - 1))), a = bn([]), a.leaf = !1, a.height = s; + return a = mn(t.slice(e, n + 1)), hn(a, this.toBBox), a; + s || (s = Math.ceil(Math.log(r) / Math.log(o)), o = Math.ceil(r / Math.pow(o, s - 1))), a = mn([]), a.leaf = !1, a.height = s; const l = Math.ceil(r / o), h = l * Math.ceil(Math.sqrt(o)); - lc(t, e, i, h, this.compareMinX); - for (let c = e; c <= i; c += h) { - const u = Math.min(c + h - 1, i); - lc(t, c, u, l, this.compareMinY); + kh(t, e, n, h, this.compareMinX); + for (let c = e; c <= n; c += h) { + const u = Math.min(c + h - 1, n); + kh(t, c, u, l, this.compareMinY); for (let d = c; d <= u; d += l) { const f = Math.min(d + l - 1, u); a.children.push(this._build(t, d, f, s - 1)); } } - return Mn(a, this.toBBox), a; + return hn(a, this.toBBox), a; } - _chooseSubtree(t, e, i, s) { - for (; s.push(e), !(e.leaf || s.length - 1 === i); ) { + _chooseSubtree(t, e, n, s) { + for (; s.push(e), !(e.leaf || s.length - 1 === n); ) { let r = 1 / 0, o = 1 / 0, a; for (let l = 0; l < e.children.length; l++) { - const h = e.children[l], c = ca(h), u = Dm(t, h) - c; + const h = e.children[l], c = Vo(h), u = rm(t, h) - c; u < o ? (o = u, r = c < r ? c : r, a = h) : u === o && c < r && (r = c, a = h); } e = a || e.children[0]; } return e; } - _insert(t, e, i) { - const s = i ? t : this.toBBox(t), r = [], o = this._chooseSubtree(s, this.data, e, r); - for (o.children.push(t), xs(o, s); e >= 0 && r[e].children.length > this._maxEntries; ) + _insert(t, e, n) { + const s = n ? t : this.toBBox(t), r = [], o = this._chooseSubtree(s, this.data, e, r); + for (o.children.push(t), rs(o, s); e >= 0 && r[e].children.length > this._maxEntries; ) this._split(r, e), e--; this._adjustParentBBoxes(s, r, e); } _split(t, e) { - const i = t[e], s = i.children.length, r = this._minEntries; - this._chooseSplitAxis(i, r, s); - const o = this._chooseSplitIndex(i, r, s), a = bn(i.children.splice(o, i.children.length - o)); - a.height = i.height, a.leaf = i.leaf, Mn(i, this.toBBox), Mn(a, this.toBBox), e ? t[e - 1].children.push(a) : this._splitRoot(i, a); + const n = t[e], s = n.children.length, r = this._minEntries; + this._chooseSplitAxis(n, r, s); + const o = this._chooseSplitIndex(n, r, s), a = mn(n.children.splice(o, n.children.length - o)); + a.height = n.height, a.leaf = n.leaf, hn(n, this.toBBox), hn(a, this.toBBox), e ? t[e - 1].children.push(a) : this._splitRoot(n, a); } _splitRoot(t, e) { - this.data = bn([t, e]), this.data.height = t.height + 1, this.data.leaf = !1, Mn(this.data, this.toBBox); + this.data = mn([t, e]), this.data.height = t.height + 1, this.data.leaf = !1, hn(this.data, this.toBBox); } - _chooseSplitIndex(t, e, i) { + _chooseSplitIndex(t, e, n) { let s, r = 1 / 0, o = 1 / 0; - for (let a = e; a <= i - e; a++) { - const l = vs(t, 0, a, this.toBBox), h = vs(t, a, i, this.toBBox), c = km(l, h), u = ca(l) + ca(h); + for (let a = e; a <= n - e; a++) { + const l = ss(t, 0, a, this.toBBox), h = ss(t, a, n, this.toBBox), c = om(l, h), u = Vo(l) + Vo(h); c < r ? (r = c, s = a, o = u < o ? u : o) : c === r && u < o && (o = u, s = a); } - return s || i - e; + return s || n - e; } - _chooseSplitAxis(t, e, i) { - const s = t.leaf ? this.compareMinX : Fm, r = t.leaf ? this.compareMinY : Nm, o = this._allDistMargin(t, e, i, s), a = this._allDistMargin(t, e, i, r); + _chooseSplitAxis(t, e, n) { + const s = t.leaf ? this.compareMinX : nm, r = t.leaf ? this.compareMinY : sm, o = this._allDistMargin(t, e, n, s), a = this._allDistMargin(t, e, n, r); o < a && t.children.sort(s); } - _allDistMargin(t, e, i, s) { + _allDistMargin(t, e, n, s) { t.children.sort(s); - const r = this.toBBox, o = vs(t, 0, e, r), a = vs(t, i - e, i, r); - let l = Ir(o) + Ir(a); - for (let h = e; h < i - e; h++) { + const r = this.toBBox, o = ss(t, 0, e, r), a = ss(t, n - e, n, r); + let l = _r(o) + _r(a); + for (let h = e; h < n - e; h++) { const c = t.children[h]; - xs(o, t.leaf ? r(c) : c), l += Ir(o); + rs(o, t.leaf ? r(c) : c), l += _r(o); } - for (let h = i - e - 1; h >= e; h--) { + for (let h = n - e - 1; h >= e; h--) { const c = t.children[h]; - xs(a, t.leaf ? r(c) : c), l += Ir(a); + rs(a, t.leaf ? r(c) : c), l += _r(a); } return l; } - _adjustParentBBoxes(t, e, i) { - for (let s = i; s >= 0; s--) - xs(e[s], t); + _adjustParentBBoxes(t, e, n) { + for (let s = n; s >= 0; s--) + rs(e[s], t); } _condense(t) { - for (let e = t.length - 1, i; e >= 0; e--) - t[e].children.length === 0 ? e > 0 ? (i = t[e - 1].children, i.splice(i.indexOf(t[e]), 1)) : this.clear() : Mn(t[e], this.toBBox); + for (let e = t.length - 1, n; e >= 0; e--) + t[e].children.length === 0 ? e > 0 ? (n = t[e - 1].children, n.splice(n.indexOf(t[e]), 1)) : this.clear() : hn(t[e], this.toBBox); } } -function Om(n, t, e) { +function im(i, t, e) { if (!e) - return t.indexOf(n); - for (let i = 0; i < t.length; i++) - if (e(n, t[i])) - return i; + return t.indexOf(i); + for (let n = 0; n < t.length; n++) + if (e(i, t[n])) + return n; return -1; } -function Mn(n, t) { - vs(n, 0, n.children.length, t, n); +function hn(i, t) { + ss(i, 0, i.children.length, t, i); } -function vs(n, t, e, i, s) { - s || (s = bn(null)), s.minX = 1 / 0, s.minY = 1 / 0, s.maxX = -1 / 0, s.maxY = -1 / 0; +function ss(i, t, e, n, s) { + s || (s = mn(null)), s.minX = 1 / 0, s.minY = 1 / 0, s.maxX = -1 / 0, s.maxY = -1 / 0; for (let r = t; r < e; r++) { - const o = n.children[r]; - xs(s, n.leaf ? i(o) : o); + const o = i.children[r]; + rs(s, i.leaf ? n(o) : o); } return s; } -function xs(n, t) { - return n.minX = Math.min(n.minX, t.minX), n.minY = Math.min(n.minY, t.minY), n.maxX = Math.max(n.maxX, t.maxX), n.maxY = Math.max(n.maxY, t.maxY), n; +function rs(i, t) { + return i.minX = Math.min(i.minX, t.minX), i.minY = Math.min(i.minY, t.minY), i.maxX = Math.max(i.maxX, t.maxX), i.maxY = Math.max(i.maxY, t.maxY), i; } -function Fm(n, t) { - return n.minX - t.minX; +function nm(i, t) { + return i.minX - t.minX; } -function Nm(n, t) { - return n.minY - t.minY; +function sm(i, t) { + return i.minY - t.minY; } -function ca(n) { - return (n.maxX - n.minX) * (n.maxY - n.minY); +function Vo(i) { + return (i.maxX - i.minX) * (i.maxY - i.minY); } -function Ir(n) { - return n.maxX - n.minX + (n.maxY - n.minY); +function _r(i) { + return i.maxX - i.minX + (i.maxY - i.minY); } -function Dm(n, t) { - return (Math.max(t.maxX, n.maxX) - Math.min(t.minX, n.minX)) * (Math.max(t.maxY, n.maxY) - Math.min(t.minY, n.minY)); +function rm(i, t) { + return (Math.max(t.maxX, i.maxX) - Math.min(t.minX, i.minX)) * (Math.max(t.maxY, i.maxY) - Math.min(t.minY, i.minY)); } -function km(n, t) { - const e = Math.max(n.minX, t.minX), i = Math.max(n.minY, t.minY), s = Math.min(n.maxX, t.maxX), r = Math.min(n.maxY, t.maxY); - return Math.max(0, s - e) * Math.max(0, r - i); +function om(i, t) { + const e = Math.max(i.minX, t.minX), n = Math.max(i.minY, t.minY), s = Math.min(i.maxX, t.maxX), r = Math.min(i.maxY, t.maxY); + return Math.max(0, s - e) * Math.max(0, r - n); } -function ua(n, t) { - return n.minX <= t.minX && n.minY <= t.minY && t.maxX <= n.maxX && t.maxY <= n.maxY; +function Wo(i, t) { + return i.minX <= t.minX && i.minY <= t.minY && t.maxX <= i.maxX && t.maxY <= i.maxY; } -function Pr(n, t) { - return t.minX <= n.maxX && t.minY <= n.maxY && t.maxX >= n.minX && t.maxY >= n.minY; +function pr(i, t) { + return t.minX <= i.maxX && t.minY <= i.maxY && t.maxX >= i.minX && t.maxY >= i.minY; } -function bn(n) { +function mn(i) { return { - children: n, + children: i, height: 1, leaf: !0, minX: 1 / 0, @@ -7606,58 +7519,58 @@ function bn(n) { maxY: -1 / 0 }; } -function lc(n, t, e, i, s) { +function kh(i, t, e, n, s) { const r = [t, e]; for (; r.length; ) { - if (e = r.pop(), t = r.pop(), e - t <= i) + if (e = r.pop(), t = r.pop(), e - t <= n) continue; - const o = t + Math.ceil((e - t) / i / 2) * i; - Pm(n, o, t, e, s), r.push(t, o, o, e); + const o = t + Math.ceil((e - t) / n / 2) * n; + tm(i, o, t, e, s), r.push(t, o, o, e); } } -function Hd(n, t, e) { - const i = n; +function vd(i, t, e) { + const n = i; let s = !0, r = !1, o = !1; const a = [ - Jr(i, U.LOAD, function() { + Or(n, X.LOAD, function() { o = !0, r || t(); }) ]; - return i.src && Ug ? (r = !0, i.decode().then(function() { + return n.src && m0 ? (r = !0, n.decode().then(function() { s && t(); }).catch(function(l) { s && (o ? t() : e()); - })) : a.push(Jr(i, U.ERROR, e)), function() { - s = !1, a.forEach(mt); + })) : a.push(Or(n, X.ERROR, e)), function() { + s = !1, a.forEach(pt); }; } -let ms = null; -class Gm extends So { - constructor(t, e, i, s, r, o) { - super(), this.hitDetectionImage_ = null, this.image_ = t, this.crossOrigin_ = s, this.canvas_ = {}, this.color_ = o, this.unlisten_ = null, this.imageState_ = r, this.size_ = i, this.src_ = e, this.tainted_; +let ts = null; +class am extends so { + constructor(t, e, n, s, r, o) { + super(), this.hitDetectionImage_ = null, this.image_ = t, this.crossOrigin_ = s, this.canvas_ = {}, this.color_ = o, this.unlisten_ = null, this.imageState_ = r, this.size_ = n, this.src_ = e, this.tainted_; } initializeImage_() { this.image_ = new Image(), this.crossOrigin_ !== null && (this.image_.crossOrigin = this.crossOrigin_); } isTainted_() { - if (this.tainted_ === void 0 && this.imageState_ === Pt.LOADED) { - ms || (ms = pe(1, 1)), ms.drawImage(this.image_, 0, 0); + if (this.tainted_ === void 0 && this.imageState_ === It.LOADED) { + ts || (ts = de(1, 1)), ts.drawImage(this.image_, 0, 0); try { - ms.getImageData(0, 0, 1, 1), this.tainted_ = !1; + ts.getImageData(0, 0, 1, 1), this.tainted_ = !1; } catch { - ms = null, this.tainted_ = !0; + ts = null, this.tainted_ = !0; } } return this.tainted_ === !0; } dispatchChangeEvent_() { - this.dispatchEvent(U.CHANGE); + this.dispatchEvent(X.CHANGE); } handleImageError_() { - this.imageState_ = Pt.ERROR, this.unlistenImage_(), this.dispatchChangeEvent_(); + this.imageState_ = It.ERROR, this.unlistenImage_(), this.dispatchChangeEvent_(); } handleImageLoad_() { - this.imageState_ = Pt.LOADED, this.size_ ? (this.image_.width = this.size_[0], this.image_.height = this.size_[1]) : this.size_ = [this.image_.width, this.image_.height], this.unlistenImage_(), this.dispatchChangeEvent_(); + this.imageState_ = It.LOADED, this.size_ ? (this.image_.width = this.size_[0], this.image_.height = this.size_[1]) : this.size_ = [this.image_.width, this.image_.height], this.unlistenImage_(), this.dispatchChangeEvent_(); } getImage(t) { return this.image_ || this.initializeImage_(), this.replaceColor_(t), this.canvas_[t] ? this.canvas_[t] : this.image_; @@ -7671,8 +7584,8 @@ class Gm extends So { getHitDetectionImage() { if (this.image_ || this.initializeImage_(), !this.hitDetectionImage_) if (this.isTainted_()) { - const t = this.size_[0], e = this.size_[1], i = pe(t, e); - i.fillRect(0, 0, t, e), this.hitDetectionImage_ = i.canvas; + const t = this.size_[0], e = this.size_[1], n = de(t, e); + n.fillRect(0, 0, t, e), this.hitDetectionImage_ = n.canvas; } else this.hitDetectionImage_ = this.image_; return this.hitDetectionImage_; @@ -7684,14 +7597,14 @@ class Gm extends So { return this.src_; } load() { - if (this.imageState_ === Pt.IDLE) { - this.image_ || this.initializeImage_(), this.imageState_ = Pt.LOADING; + if (this.imageState_ === It.IDLE) { + this.image_ || this.initializeImage_(), this.imageState_ = It.LOADING; try { this.image_.src = this.src_; } catch { this.handleImageError_(); } - this.unlisten_ = Hd( + this.unlisten_ = vd( this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this) @@ -7699,28 +7612,28 @@ class Gm extends So { } } replaceColor_(t) { - if (!this.color_ || this.canvas_[t] || this.imageState_ !== Pt.LOADED) + if (!this.color_ || this.canvas_[t] || this.imageState_ !== It.LOADED) return; - const e = this.image_, i = document.createElement("canvas"); - i.width = Math.ceil(e.width * t), i.height = Math.ceil(e.height * t); - const s = i.getContext("2d"); - s.scale(t, t), s.drawImage(e, 0, 0), s.globalCompositeOperation = "multiply", s.fillStyle = td(this.color_), s.fillRect(0, 0, i.width / t, i.height / t), s.globalCompositeOperation = "destination-in", s.drawImage(e, 0, 0), this.canvas_[t] = i; + const e = this.image_, n = document.createElement("canvas"); + n.width = Math.ceil(e.width * t), n.height = Math.ceil(e.height * t); + const s = n.getContext("2d"); + s.scale(t, t), s.drawImage(e, 0, 0), s.globalCompositeOperation = "multiply", s.fillStyle = Tu(this.color_), s.fillRect(0, 0, n.width / t, n.height / t), s.globalCompositeOperation = "destination-in", s.drawImage(e, 0, 0), this.canvas_[t] = n; } unlistenImage_() { this.unlisten_ && (this.unlisten_(), this.unlisten_ = null); } } -function $m(n, t, e, i, s, r) { - let o = to.get(t, i, r); - return o || (o = new Gm(n, t, e, i, s, r), to.set(t, i, r, o)), o; +function lm(i, t, e, n, s, r) { + let o = Fr.get(t, n, r); + return o || (o = new am(i, t, e, n, s, r), Fr.set(t, n, r, o)), o; } -class Ql extends zd { +class wl extends md { constructor(t) { t = t || {}; - const e = t.opacity !== void 0 ? t.opacity : 1, i = t.rotation !== void 0 ? t.rotation : 0, s = t.scale !== void 0 ? t.scale : 1, r = t.rotateWithView !== void 0 ? t.rotateWithView : !1; + const e = t.opacity !== void 0 ? t.opacity : 1, n = t.rotation !== void 0 ? t.rotation : 0, s = t.scale !== void 0 ? t.scale : 1, r = t.rotateWithView !== void 0 ? t.rotateWithView : !1; super({ opacity: e, - rotation: i, + rotation: n, scale: s, displacement: t.displacement !== void 0 ? t.displacement : [0, 0], rotateWithView: r, @@ -7729,9 +7642,9 @@ class Ql extends zd { const o = t.img !== void 0 ? t.img : null; this.imgSize_ = t.imgSize; let a = t.src; - Y(!(a !== void 0 && o), 4), Y(!o || o && this.imgSize_, 5), (a === void 0 || a.length === 0) && o && (a = o.src || q(o)), Y(a !== void 0 && a.length > 0, 6); - const l = t.src !== void 0 ? Pt.IDLE : Pt.LOADED; - this.color_ = t.color !== void 0 ? Qr(t.color) : null, this.iconImage_ = $m( + Y(!(a !== void 0 && o), 4), Y(!o || o && this.imgSize_, 5), (a === void 0 || a.length === 0) && o && (a = o.src || rt(o)), Y(a !== void 0 && a.length > 0, 6); + const l = t.src !== void 0 ? It.IDLE : It.LOADED; + this.color_ = t.color !== void 0 ? Nr(t.color) : null, this.iconImage_ = lm( o, a, this.imgSize_ !== void 0 ? this.imgSize_ : null, @@ -7742,7 +7655,7 @@ class Ql extends zd { } clone() { const t = this.getScale(); - return new Ql({ + return new wl({ anchor: this.anchor_.slice(), anchorOrigin: this.anchorOrigin_, anchorXUnits: this.anchorXUnits_, @@ -7779,10 +7692,10 @@ class Ql extends zd { } this.normalizedAnchor_ = t; } - const e = this.getDisplacement(), i = this.getScaleArray(); + const e = this.getDisplacement(), n = this.getScaleArray(); return [ - t[0] - e[0] / i[0], - t[1] + e[1] / i[1] + t[0] - e[0] / n[0], + t[1] + e[1] / n[1] ]; } setAnchor(t) { @@ -7811,10 +7724,10 @@ class Ql extends zd { return this.origin_; let t = this.offset_; if (this.offsetOrigin_ != "top-left") { - const e = this.getSize(), i = this.iconImage_.getSize(); - if (!e || !i) + const e = this.getSize(), n = this.iconImage_.getSize(); + if (!e || !n) return null; - t = t.slice(), (this.offsetOrigin_ == "top-right" || this.offsetOrigin_ == "bottom-right") && (t[0] = i[0] - e[0] - t[0]), (this.offsetOrigin_ == "bottom-left" || this.offsetOrigin_ == "bottom-right") && (t[1] = i[1] - e[1] - t[1]); + t = t.slice(), (this.offsetOrigin_ == "top-right" || this.offsetOrigin_ == "bottom-right") && (t[0] = n[0] - e[0] - t[0]), (this.offsetOrigin_ == "bottom-left" || this.offsetOrigin_ == "bottom-right") && (t[1] = n[1] - e[1] - t[1]); } return this.origin_ = t, this.origin_; } @@ -7825,124 +7738,124 @@ class Ql extends zd { return this.size_ ? this.size_ : this.iconImage_.getSize(); } listenImageChange(t) { - this.iconImage_.addEventListener(U.CHANGE, t); + this.iconImage_.addEventListener(X.CHANGE, t); } load() { this.iconImage_.load(); } unlistenImageChange(t) { - this.iconImage_.removeEventListener(U.CHANGE, t); + this.iconImage_.removeEventListener(X.CHANGE, t); } } -const Ts = Ql; -function hc(n) { - return new Zt({ - fill: Vs(n, ""), - stroke: Us(n, ""), - text: Bm(n), - image: zm(n) +const us = wl; +function Gh(i) { + return new Vt({ + fill: Ls(i, ""), + stroke: Ts(i, ""), + text: hm(i), + image: cm(i) }); } -function Vs(n, t) { - const e = n[t + "fill-color"]; +function Ls(i, t) { + const e = i[t + "fill-color"]; if (!!e) - return new Vt({ color: e }); + return new he({ color: e }); } -function Us(n, t) { - const e = n[t + "stroke-width"], i = n[t + "stroke-color"]; - if (!(!e && !i)) - return new Xt({ +function Ts(i, t) { + const e = i[t + "stroke-width"], n = i[t + "stroke-color"]; + if (!(!e && !n)) + return new Ee({ width: e, - color: i, - lineCap: n[t + "stroke-line-cap"], - lineJoin: n[t + "stroke-line-join"], - lineDash: n[t + "stroke-line-dash"], - lineDashOffset: n[t + "stroke-line-dash-offset"], - miterLimit: n[t + "stroke-miter-limit"] + color: n, + lineCap: i[t + "stroke-line-cap"], + lineJoin: i[t + "stroke-line-join"], + lineDash: i[t + "stroke-line-dash"], + lineDashOffset: i[t + "stroke-line-dash-offset"], + miterLimit: i[t + "stroke-miter-limit"] }); } -function Bm(n) { - const t = n["text-value"]; - return t ? new Wa({ +function hm(i) { + const t = i["text-value"]; + return t ? new Ca({ text: t, - font: n["text-font"], - maxAngle: n["text-max-angle"], - offsetX: n["text-offset-x"], - offsetY: n["text-offset-y"], - overflow: n["text-overflow"], - placement: n["text-placement"], - scale: n["text-scale"], - rotateWithView: n["text-rotate-with-view"], - rotation: n["text-rotation"], - textAlign: n["text-align"], - justify: n["text-justify"], - textBaseline: n["text-baseline"], - padding: n["text-padding"], - fill: Vs(n, "text-"), - backgroundFill: Vs(n, "text-background-"), - stroke: Us(n, "text-"), - backgroundStroke: Us(n, "text-background-") + font: i["text-font"], + maxAngle: i["text-max-angle"], + offsetX: i["text-offset-x"], + offsetY: i["text-offset-y"], + overflow: i["text-overflow"], + placement: i["text-placement"], + scale: i["text-scale"], + rotateWithView: i["text-rotate-with-view"], + rotation: i["text-rotation"], + textAlign: i["text-align"], + justify: i["text-justify"], + textBaseline: i["text-baseline"], + padding: i["text-padding"], + fill: Ls(i, "text-"), + backgroundFill: Ls(i, "text-background-"), + stroke: Ts(i, "text-"), + backgroundStroke: Ts(i, "text-background-") }) : void 0; } -function zm(n) { - const t = n["icon-src"], e = n["icon-img"]; +function cm(i) { + const t = i["icon-src"], e = i["icon-img"]; if (t || e) - return new Ts({ + return new us({ src: t, img: e, - imgSize: n["icon-img-size"], - anchor: n["icon-anchor"], - anchorOrigin: n["icon-anchor-origin"], - anchorXUnits: n["icon-anchor-x-units"], - anchorYUnits: n["icon-anchor-y-units"], - color: n["icon-color"], - crossOrigin: n["icon-cross-origin"], - offset: n["icon-offset"], - displacement: n["icon-displacement"], - opacity: n["icon-opacity"], - scale: n["icon-scale"], - rotation: n["icon-rotation"], - rotateWithView: n["icon-rotate-with-view"], - size: n["icon-size"], - declutterMode: n["icon-declutter-mode"] + imgSize: i["icon-img-size"], + anchor: i["icon-anchor"], + anchorOrigin: i["icon-anchor-origin"], + anchorXUnits: i["icon-anchor-x-units"], + anchorYUnits: i["icon-anchor-y-units"], + color: i["icon-color"], + crossOrigin: i["icon-cross-origin"], + offset: i["icon-offset"], + displacement: i["icon-displacement"], + opacity: i["icon-opacity"], + scale: i["icon-scale"], + rotation: i["icon-rotation"], + rotateWithView: i["icon-rotate-with-view"], + size: i["icon-size"], + declutterMode: i["icon-declutter-mode"] }); - const i = n["shape-points"]; - if (i) { + const n = i["shape-points"]; + if (n) { const r = "shape-"; - return new Zd({ - points: i, - fill: Vs(n, r), - stroke: Us(n, r), - radius: n["shape-radius"], - radius1: n["shape-radius1"], - radius2: n["shape-radius2"], - angle: n["shape-angle"], - displacement: n["shape-displacement"], - rotation: n["shape-rotation"], - rotateWithView: n["shape-rotate-with-view"], - scale: n["shape-scale"], - declutterMode: n["shape-declutter-mode"] + return new _d({ + points: n, + fill: Ls(i, r), + stroke: Ts(i, r), + radius: i["shape-radius"], + radius1: i["shape-radius1"], + radius2: i["shape-radius2"], + angle: i["shape-angle"], + displacement: i["shape-displacement"], + rotation: i["shape-rotation"], + rotateWithView: i["shape-rotate-with-view"], + scale: i["shape-scale"], + declutterMode: i["shape-declutter-mode"] }); } - const s = n["circle-radius"]; + const s = i["circle-radius"]; if (s) { const r = "circle-"; - return new we({ + return new qe({ radius: s, - fill: Vs(n, r), - stroke: Us(n, r), - displacement: n["circle-displacement"], - scale: n["circle-scale"], - rotation: n["circle-rotation"], - rotateWithView: n["circle-rotate-with-view"], - declutterMode: n["circle-declutter-mode"] + fill: Ls(i, r), + stroke: Ts(i, r), + displacement: i["circle-displacement"], + scale: i["circle-scale"], + rotation: i["circle-rotation"], + rotateWithView: i["circle-rotate-with-view"], + declutterMode: i["circle-declutter-mode"] }); } } -const cc = { +const $h = { RENDER_ORDER: "renderOrder" }; -class Zm extends Po { +class um extends uo { constructor(t) { t = t || {}; const e = Object.assign({}, t); @@ -7958,7 +7871,7 @@ class Zm extends Po { return this.renderBuffer_; } getRenderOrder() { - return this.get(cc.RENDER_ORDER); + return this.get($h.RENDER_ORDER); } getStyle() { return this.style_; @@ -7973,34 +7886,34 @@ class Zm extends Po { return this.updateWhileInteracting_; } renderDeclutter(t) { - t.declutterTree || (t.declutterTree = new Wd(9)), this.getRenderer().renderDeclutter(t); + t.declutterTree || (t.declutterTree = new yd(9)), this.getRenderer().renderDeclutter(t); } setRenderOrder(t) { - this.set(cc.RENDER_ORDER, t); + this.set($h.RENDER_ORDER, t); } setStyle(t) { let e; if (t === void 0) - e = Lm; + e = J1; else if (t === null) e = null; else if (typeof t == "function") e = t; - else if (t instanceof Zt) + else if (t instanceof Vt) e = t; else if (Array.isArray(t)) { - const i = t.length, s = new Array(i); - for (let r = 0; r < i; ++r) { + const n = t.length, s = new Array(n); + for (let r = 0; r < n; ++r) { const o = t[r]; - o instanceof Zt ? s[r] = o : s[r] = hc(o); + o instanceof Vt ? s[r] = o : s[r] = Gh(o); } e = s; } else - e = hc(t); - this.style_ = e, this.styleFunction_ = t === null ? void 0 : bm(this.style_), this.changed(); + e = Gh(t); + this.style_ = e, this.styleFunction_ = t === null ? void 0 : q1(this.style_), this.changed(); } } -const Vm = Zm, ir = { +const dm = um, Zs = { BEGIN_GEOMETRY: 0, BEGIN_PATH: 1, CIRCLE: 2, @@ -8014,9 +7927,9 @@ const Vm = Zm, ir = { SET_FILL_STYLE: 10, SET_STROKE_STYLE: 11, STROKE: 12 -}, Ar = [ir.FILL], Si = [ir.STROKE], Hi = [ir.BEGIN_PATH], uc = [ir.CLOSE_PATH], W = ir; -class Um { - drawCustom(t, e, i, s) { +}, yr = [Zs.FILL], mi = [Zs.STROKE], Ni = [Zs.BEGIN_PATH], Bh = [Zs.CLOSE_PATH], V = Zs; +class fm { + drawCustom(t, e, n, s) { } drawGeometry(t) { } @@ -8049,25 +7962,25 @@ class Um { setTextStyle(t, e) { } } -const Xd = Um; -class Wm extends Xd { - constructor(t, e, i, s) { - super(), this.tolerance = t, this.maxExtent = e, this.pixelRatio = s, this.maxLineWidth = 0, this.resolution = i, this.beginGeometryInstruction1_ = null, this.beginGeometryInstruction2_ = null, this.bufferedMaxExtent_ = null, this.instructions = [], this.coordinates = [], this.tmpCoordinate_ = [], this.hitDetectionInstructions = [], this.state = {}; +const xd = fm; +class gm extends xd { + constructor(t, e, n, s) { + super(), this.tolerance = t, this.maxExtent = e, this.pixelRatio = s, this.maxLineWidth = 0, this.resolution = n, this.beginGeometryInstruction1_ = null, this.beginGeometryInstruction2_ = null, this.bufferedMaxExtent_ = null, this.instructions = [], this.coordinates = [], this.tmpCoordinate_ = [], this.hitDetectionInstructions = [], this.state = {}; } applyPixelRatio(t) { const e = this.pixelRatio; - return e == 1 ? t : t.map(function(i) { - return i * e; + return e == 1 ? t : t.map(function(n) { + return n * e; }); } appendFlatPointCoordinates(t, e) { - const i = this.getBufferedMaxExtent(), s = this.tmpCoordinate_, r = this.coordinates; + const n = this.getBufferedMaxExtent(), s = this.tmpCoordinate_, r = this.coordinates; let o = r.length; for (let a = 0, l = t.length; a < l; a += e) - s[0] = t[a], s[1] = t[a + 1], To(i, s) && (r[o++] = s[0], r[o++] = s[1]); + s[0] = t[a], s[1] = t[a + 1], ao(n, s) && (r[o++] = s[0], r[o++] = s[1]); return o; } - appendFlatLineCoordinates(t, e, i, s, r, o) { + appendFlatLineCoordinates(t, e, n, s, r, o) { const a = this.coordinates; let l = a.length; const h = this.getBufferedMaxExtent(); @@ -8075,13 +7988,13 @@ class Wm extends Xd { let c = t[e], u = t[e + 1]; const d = this.tmpCoordinate_; let f = !0, g, m, _; - for (g = e + s; g < i; g += s) - d[0] = t[g], d[1] = t[g + 1], _ = ba(h, d), _ !== m ? (f && (a[l++] = c, a[l++] = u, f = !1), a[l++] = d[0], a[l++] = d[1]) : _ === Ft.INTERSECTING ? (a[l++] = d[0], a[l++] = d[1], f = !1) : f = !0, c = d[0], u = d[1], m = _; + for (g = e + s; g < n; g += s) + d[0] = t[g], d[1] = t[g + 1], _ = ra(h, d), _ !== m ? (f && (a[l++] = c, a[l++] = u, f = !1), a[l++] = d[0], a[l++] = d[1]) : _ === Nt.INTERSECTING ? (a[l++] = d[0], a[l++] = d[1], f = !1) : f = !0, c = d[0], u = d[1], m = _; return (r && f || g === e + s) && (a[l++] = c, a[l++] = u), l; } - drawCustomCoordinates_(t, e, i, s, r) { - for (let o = 0, a = i.length; o < a; ++o) { - const l = i[o], h = this.appendFlatLineCoordinates( + drawCustomCoordinates_(t, e, n, s, r) { + for (let o = 0, a = n.length; o < a; ++o) { + const l = n[o], h = this.appendFlatLineCoordinates( t, e, l, @@ -8093,7 +8006,7 @@ class Wm extends Xd { } return e; } - drawCustom(t, e, i, s) { + drawCustom(t, e, n, s) { this.beginGeometry(t, e); const r = t.getType(), o = t.getStride(), a = this.coordinates.length; let l, h, c, u, d; @@ -8113,19 +8026,19 @@ class Wm extends Xd { ), u.push(_); } this.instructions.push([ - W.CUSTOM, + V.CUSTOM, a, u, t, - i, - $a + n, + pa ]), this.hitDetectionInstructions.push([ - W.CUSTOM, + V.CUSTOM, a, u, t, - s || i, - $a + s || n, + pa ]); break; case "Polygon": @@ -8137,19 +8050,19 @@ class Wm extends Xd { o, c ), this.instructions.push([ - W.CUSTOM, + V.CUSTOM, a, c, t, - i, - Zs + n, + Rs ]), this.hitDetectionInstructions.push([ - W.CUSTOM, + V.CUSTOM, a, c, t, - s || i, - Zs + s || n, + Rs ]); break; case "LineString": @@ -8162,51 +8075,51 @@ class Wm extends Xd { !1, !1 ), this.instructions.push([ - W.CUSTOM, + V.CUSTOM, a, h, t, - i, - Ei + n, + gi ]), this.hitDetectionInstructions.push([ - W.CUSTOM, + V.CUSTOM, a, h, t, - s || i, - Ei + s || n, + gi ]); break; case "MultiPoint": l = t.getFlatCoordinates(), h = this.appendFlatPointCoordinates(l, o), h > a && (this.instructions.push([ - W.CUSTOM, + V.CUSTOM, a, h, t, - i, - Ei + n, + gi ]), this.hitDetectionInstructions.push([ - W.CUSTOM, + V.CUSTOM, a, h, t, - s || i, - Ei + s || n, + gi ])); break; case "Point": l = t.getFlatCoordinates(), this.coordinates.push(l[0], l[1]), h = this.coordinates.length, this.instructions.push([ - W.CUSTOM, + V.CUSTOM, a, h, t, - i + n ]), this.hitDetectionInstructions.push([ - W.CUSTOM, + V.CUSTOM, a, h, t, - s || i + s || n ]); break; } @@ -8214,12 +8127,12 @@ class Wm extends Xd { } beginGeometry(t, e) { this.beginGeometryInstruction1_ = [ - W.BEGIN_GEOMETRY, + V.BEGIN_GEOMETRY, e, 0, t ], this.instructions.push(this.beginGeometryInstruction1_), this.beginGeometryInstruction2_ = [ - W.BEGIN_GEOMETRY, + V.BEGIN_GEOMETRY, e, 0, t @@ -8236,50 +8149,50 @@ class Wm extends Xd { const t = this.hitDetectionInstructions; t.reverse(); let e; - const i = t.length; + const n = t.length; let s, r, o = -1; - for (e = 0; e < i; ++e) - s = t[e], r = s[0], r == W.END_GEOMETRY ? o = e : r == W.BEGIN_GEOMETRY && (s[2] = e, Ig(this.hitDetectionInstructions, o, e), o = -1); + for (e = 0; e < n; ++e) + s = t[e], r = s[0], r == V.END_GEOMETRY ? o = e : r == V.BEGIN_GEOMETRY && (s[2] = e, e0(this.hitDetectionInstructions, o, e), o = -1); } setFillStrokeStyle(t, e) { - const i = this.state; + const n = this.state; if (t) { const s = t.getColor(); - i.fillStyle = ke( - s || ai + n.fillStyle = Ie( + s || Je ); } else - i.fillStyle = void 0; + n.fillStyle = void 0; if (e) { const s = e.getColor(); - i.strokeStyle = ke( - s || Gs + n.strokeStyle = Ie( + s || Cs ); const r = e.getLineCap(); - i.lineCap = r !== void 0 ? r : no; + n.lineCap = r !== void 0 ? r : Gr; const o = e.getLineDash(); - i.lineDash = o ? o.slice() : Ns; + n.lineDash = o ? o.slice() : vs; const a = e.getLineDashOffset(); - i.lineDashOffset = a || Ds; + n.lineDashOffset = a || xs; const l = e.getLineJoin(); - i.lineJoin = l !== void 0 ? l : Xn; + n.lineJoin = l !== void 0 ? l : Pn; const h = e.getWidth(); - i.lineWidth = h !== void 0 ? h : Bs; + n.lineWidth = h !== void 0 ? h : ws; const c = e.getMiterLimit(); - i.miterLimit = c !== void 0 ? c : ks, i.lineWidth > this.maxLineWidth && (this.maxLineWidth = i.lineWidth, this.bufferedMaxExtent_ = null); + n.miterLimit = c !== void 0 ? c : Ms, n.lineWidth > this.maxLineWidth && (this.maxLineWidth = n.lineWidth, this.bufferedMaxExtent_ = null); } else - i.strokeStyle = void 0, i.lineCap = void 0, i.lineDash = null, i.lineDashOffset = void 0, i.lineJoin = void 0, i.lineWidth = void 0, i.miterLimit = void 0; + n.strokeStyle = void 0, n.lineCap = void 0, n.lineDash = null, n.lineDashOffset = void 0, n.lineJoin = void 0, n.lineWidth = void 0, n.miterLimit = void 0; } createFill(t) { - const e = t.fillStyle, i = [W.SET_FILL_STYLE, e]; - return typeof e != "string" && i.push(!0), i; + const e = t.fillStyle, n = [V.SET_FILL_STYLE, e]; + return typeof e != "string" && n.push(!0), n; } applyStroke(t) { this.instructions.push(this.createStroke(t)); } createStroke(t) { return [ - W.SET_STROKE_STYLE, + V.SET_STROKE_STYLE, t.strokeStyle, t.lineWidth * this.pixelRatio, t.lineCap, @@ -8290,38 +8203,38 @@ class Wm extends Xd { ]; } updateFillStyle(t, e) { - const i = t.fillStyle; - (typeof i != "string" || t.currentFillStyle != i) && (i !== void 0 && this.instructions.push(e.call(this, t)), t.currentFillStyle = i); + const n = t.fillStyle; + (typeof n != "string" || t.currentFillStyle != n) && (n !== void 0 && this.instructions.push(e.call(this, t)), t.currentFillStyle = n); } updateStrokeStyle(t, e) { - const i = t.strokeStyle, s = t.lineCap, r = t.lineDash, o = t.lineDashOffset, a = t.lineJoin, l = t.lineWidth, h = t.miterLimit; - (t.currentStrokeStyle != i || t.currentLineCap != s || r != t.currentLineDash && !Ni(t.currentLineDash, r) || t.currentLineDashOffset != o || t.currentLineJoin != a || t.currentLineWidth != l || t.currentMiterLimit != h) && (i !== void 0 && e.call(this, t), t.currentStrokeStyle = i, t.currentLineCap = s, t.currentLineDash = r, t.currentLineDashOffset = o, t.currentLineJoin = a, t.currentLineWidth = l, t.currentMiterLimit = h); + const n = t.strokeStyle, s = t.lineCap, r = t.lineDash, o = t.lineDashOffset, a = t.lineJoin, l = t.lineWidth, h = t.miterLimit; + (t.currentStrokeStyle != n || t.currentLineCap != s || r != t.currentLineDash && !Ki(t.currentLineDash, r) || t.currentLineDashOffset != o || t.currentLineJoin != a || t.currentLineWidth != l || t.currentMiterLimit != h) && (n !== void 0 && e.call(this, t), t.currentStrokeStyle = n, t.currentLineCap = s, t.currentLineDash = r, t.currentLineDashOffset = o, t.currentLineJoin = a, t.currentLineWidth = l, t.currentMiterLimit = h); } endGeometry(t) { this.beginGeometryInstruction1_[2] = this.instructions.length, this.beginGeometryInstruction1_ = null, this.beginGeometryInstruction2_[2] = this.hitDetectionInstructions.length, this.beginGeometryInstruction2_ = null; - const e = [W.END_GEOMETRY, t]; + const e = [V.END_GEOMETRY, t]; this.instructions.push(e), this.hitDetectionInstructions.push(e); } getBufferedMaxExtent() { - if (!this.bufferedMaxExtent_ && (this.bufferedMaxExtent_ = ju(this.maxExtent), this.maxLineWidth > 0)) { + if (!this.bufferedMaxExtent_ && (this.bufferedMaxExtent_ = Mu(this.maxExtent), this.maxLineWidth > 0)) { const t = this.resolution * (this.maxLineWidth + 1) / 2; - Js(this.bufferedMaxExtent_, t, this.bufferedMaxExtent_); + oo(this.bufferedMaxExtent_, t, this.bufferedMaxExtent_); } return this.bufferedMaxExtent_; } } -const nr = Wm; -class Hm extends nr { - constructor(t, e, i, s) { - super(t, e, i, s), this.hitDetectionImage_ = null, this.image_ = null, this.imagePixelRatio_ = void 0, this.anchorX_ = void 0, this.anchorY_ = void 0, this.height_ = void 0, this.opacity_ = void 0, this.originX_ = void 0, this.originY_ = void 0, this.rotateWithView_ = void 0, this.rotation_ = void 0, this.scale_ = void 0, this.width_ = void 0, this.declutterMode_ = void 0, this.declutterImageWithText_ = void 0; +const Us = gm; +class mm extends Us { + constructor(t, e, n, s) { + super(t, e, n, s), this.hitDetectionImage_ = null, this.image_ = null, this.imagePixelRatio_ = void 0, this.anchorX_ = void 0, this.anchorY_ = void 0, this.height_ = void 0, this.opacity_ = void 0, this.originX_ = void 0, this.originY_ = void 0, this.rotateWithView_ = void 0, this.rotation_ = void 0, this.scale_ = void 0, this.width_ = void 0, this.declutterMode_ = void 0, this.declutterImageWithText_ = void 0; } drawPoint(t, e) { if (!this.image_) return; this.beginGeometry(t, e); - const i = t.getFlatCoordinates(), s = t.getStride(), r = this.coordinates.length, o = this.appendFlatPointCoordinates(i, s); + const n = t.getFlatCoordinates(), s = t.getStride(), r = this.coordinates.length, o = this.appendFlatPointCoordinates(n, s); this.instructions.push([ - W.DRAW_IMAGE, + V.DRAW_IMAGE, r, o, this.image_, @@ -8341,7 +8254,7 @@ class Hm extends nr { this.declutterMode_, this.declutterImageWithText_ ]), this.hitDetectionInstructions.push([ - W.DRAW_IMAGE, + V.DRAW_IMAGE, r, o, this.hitDetectionImage_, @@ -8363,9 +8276,9 @@ class Hm extends nr { if (!this.image_) return; this.beginGeometry(t, e); - const i = t.getFlatCoordinates(), s = t.getStride(), r = this.coordinates.length, o = this.appendFlatPointCoordinates(i, s); + const n = t.getFlatCoordinates(), s = t.getStride(), r = this.coordinates.length, o = this.appendFlatPointCoordinates(n, s); this.instructions.push([ - W.DRAW_IMAGE, + V.DRAW_IMAGE, r, o, this.image_, @@ -8385,7 +8298,7 @@ class Hm extends nr { this.declutterMode_, this.declutterImageWithText_ ]), this.hitDetectionInstructions.push([ - W.DRAW_IMAGE, + V.DRAW_IMAGE, r, o, this.hitDetectionImage_, @@ -8407,46 +8320,46 @@ class Hm extends nr { return this.reverseHitDetectionInstructions(), this.anchorX_ = void 0, this.anchorY_ = void 0, this.hitDetectionImage_ = null, this.image_ = null, this.imagePixelRatio_ = void 0, this.height_ = void 0, this.scale_ = void 0, this.opacity_ = void 0, this.originX_ = void 0, this.originY_ = void 0, this.rotateWithView_ = void 0, this.rotation_ = void 0, this.width_ = void 0, super.finish(); } setImageStyle(t, e) { - const i = t.getAnchor(), s = t.getSize(), r = t.getOrigin(); - this.imagePixelRatio_ = t.getPixelRatio(this.pixelRatio), this.anchorX_ = i[0], this.anchorY_ = i[1], this.hitDetectionImage_ = t.getHitDetectionImage(), this.image_ = t.getImage(this.pixelRatio), this.height_ = s[1], this.opacity_ = t.getOpacity(), this.originX_ = r[0], this.originY_ = r[1], this.rotateWithView_ = t.getRotateWithView(), this.rotation_ = t.getRotation(), this.scale_ = t.getScaleArray(), this.width_ = s[0], this.declutterMode_ = t.getDeclutterMode(), this.declutterImageWithText_ = e; + const n = t.getAnchor(), s = t.getSize(), r = t.getOrigin(); + this.imagePixelRatio_ = t.getPixelRatio(this.pixelRatio), this.anchorX_ = n[0], this.anchorY_ = n[1], this.hitDetectionImage_ = t.getHitDetectionImage(), this.image_ = t.getImage(this.pixelRatio), this.height_ = s[1], this.opacity_ = t.getOpacity(), this.originX_ = r[0], this.originY_ = r[1], this.rotateWithView_ = t.getRotateWithView(), this.rotation_ = t.getRotation(), this.scale_ = t.getScaleArray(), this.width_ = s[0], this.declutterMode_ = t.getDeclutterMode(), this.declutterImageWithText_ = e; } } -const Xm = Hm; -class Ym extends nr { - constructor(t, e, i, s) { - super(t, e, i, s); +const _m = mm; +class pm extends Us { + constructor(t, e, n, s) { + super(t, e, n, s); } - drawFlatCoordinates_(t, e, i, s) { + drawFlatCoordinates_(t, e, n, s) { const r = this.coordinates.length, o = this.appendFlatLineCoordinates( t, e, - i, + n, s, !1, !1 ), a = [ - W.MOVE_TO_LINE_TO, + V.MOVE_TO_LINE_TO, r, o ]; - return this.instructions.push(a), this.hitDetectionInstructions.push(a), i; + return this.instructions.push(a), this.hitDetectionInstructions.push(a), n; } drawLineString(t, e) { - const i = this.state, s = i.strokeStyle, r = i.lineWidth; + const n = this.state, s = n.strokeStyle, r = n.lineWidth; if (s === void 0 || r === void 0) return; - this.updateStrokeStyle(i, this.applyStroke), this.beginGeometry(t, e), this.hitDetectionInstructions.push( + this.updateStrokeStyle(n, this.applyStroke), this.beginGeometry(t, e), this.hitDetectionInstructions.push( [ - W.SET_STROKE_STYLE, - i.strokeStyle, - i.lineWidth, - i.lineCap, - i.lineJoin, - i.miterLimit, - Ns, - Ds + V.SET_STROKE_STYLE, + n.strokeStyle, + n.lineWidth, + n.lineCap, + n.lineJoin, + n.miterLimit, + vs, + xs ], - Hi + Ni ); const o = t.getFlatCoordinates(), a = t.getStride(); this.drawFlatCoordinates_( @@ -8454,24 +8367,24 @@ class Ym extends nr { 0, o.length, a - ), this.hitDetectionInstructions.push(Si), this.endGeometry(e); + ), this.hitDetectionInstructions.push(mi), this.endGeometry(e); } drawMultiLineString(t, e) { - const i = this.state, s = i.strokeStyle, r = i.lineWidth; + const n = this.state, s = n.strokeStyle, r = n.lineWidth; if (s === void 0 || r === void 0) return; - this.updateStrokeStyle(i, this.applyStroke), this.beginGeometry(t, e), this.hitDetectionInstructions.push( + this.updateStrokeStyle(n, this.applyStroke), this.beginGeometry(t, e), this.hitDetectionInstructions.push( [ - W.SET_STROKE_STYLE, - i.strokeStyle, - i.lineWidth, - i.lineCap, - i.lineJoin, - i.miterLimit, - i.lineDash, - i.lineDashOffset + V.SET_STROKE_STYLE, + n.strokeStyle, + n.lineWidth, + n.lineCap, + n.lineJoin, + n.miterLimit, + n.lineDash, + n.lineDashOffset ], - Hi + Ni ); const o = t.getEnds(), a = t.getFlatCoordinates(), l = t.getStride(); let h = 0; @@ -8482,26 +8395,26 @@ class Ym extends nr { o[c], l ); - this.hitDetectionInstructions.push(Si), this.endGeometry(e); + this.hitDetectionInstructions.push(mi), this.endGeometry(e); } finish() { const t = this.state; - return t.lastStroke != null && t.lastStroke != this.coordinates.length && this.instructions.push(Si), this.reverseHitDetectionInstructions(), this.state = null, super.finish(); + return t.lastStroke != null && t.lastStroke != this.coordinates.length && this.instructions.push(mi), this.reverseHitDetectionInstructions(), this.state = null, super.finish(); } applyStroke(t) { - t.lastStroke != null && t.lastStroke != this.coordinates.length && (this.instructions.push(Si), t.lastStroke = this.coordinates.length), t.lastStroke = 0, super.applyStroke(t), this.instructions.push(Hi); + t.lastStroke != null && t.lastStroke != this.coordinates.length && (this.instructions.push(mi), t.lastStroke = this.coordinates.length), t.lastStroke = 0, super.applyStroke(t), this.instructions.push(Ni); } } -const jm = Ym; -class qm extends nr { - constructor(t, e, i, s) { - super(t, e, i, s); +const ym = pm; +class vm extends Us { + constructor(t, e, n, s) { + super(t, e, n, s); } - drawFlatCoordinatess_(t, e, i, s) { - const r = this.state, o = r.fillStyle !== void 0, a = r.strokeStyle !== void 0, l = i.length; - this.instructions.push(Hi), this.hitDetectionInstructions.push(Hi); + drawFlatCoordinatess_(t, e, n, s) { + const r = this.state, o = r.fillStyle !== void 0, a = r.strokeStyle !== void 0, l = n.length; + this.instructions.push(Ni), this.hitDetectionInstructions.push(Ni); for (let h = 0; h < l; ++h) { - const c = i[h], u = this.coordinates.length, d = this.appendFlatLineCoordinates( + const c = n[h], u = this.coordinates.length, d = this.appendFlatLineCoordinates( t, e, c, @@ -8509,30 +8422,30 @@ class qm extends nr { !0, !a ), f = [ - W.MOVE_TO_LINE_TO, + V.MOVE_TO_LINE_TO, u, d ]; - this.instructions.push(f), this.hitDetectionInstructions.push(f), a && (this.instructions.push(uc), this.hitDetectionInstructions.push(uc)), e = c; + this.instructions.push(f), this.hitDetectionInstructions.push(f), a && (this.instructions.push(Bh), this.hitDetectionInstructions.push(Bh)), e = c; } - return o && (this.instructions.push(Ar), this.hitDetectionInstructions.push(Ar)), a && (this.instructions.push(Si), this.hitDetectionInstructions.push(Si)), e; + return o && (this.instructions.push(yr), this.hitDetectionInstructions.push(yr)), a && (this.instructions.push(mi), this.hitDetectionInstructions.push(mi)), e; } drawCircle(t, e) { - const i = this.state, s = i.fillStyle, r = i.strokeStyle; + const n = this.state, s = n.fillStyle, r = n.strokeStyle; if (s === void 0 && r === void 0) return; - this.setFillStrokeStyles_(), this.beginGeometry(t, e), i.fillStyle !== void 0 && this.hitDetectionInstructions.push([ - W.SET_FILL_STYLE, - ai - ]), i.strokeStyle !== void 0 && this.hitDetectionInstructions.push([ - W.SET_STROKE_STYLE, - i.strokeStyle, - i.lineWidth, - i.lineCap, - i.lineJoin, - i.miterLimit, - i.lineDash, - i.lineDashOffset + this.setFillStrokeStyles_(), this.beginGeometry(t, e), n.fillStyle !== void 0 && this.hitDetectionInstructions.push([ + V.SET_FILL_STYLE, + Je + ]), n.strokeStyle !== void 0 && this.hitDetectionInstructions.push([ + V.SET_STROKE_STYLE, + n.strokeStyle, + n.lineWidth, + n.lineCap, + n.lineJoin, + n.miterLimit, + n.lineDash, + n.lineDashOffset ]); const o = t.getFlatCoordinates(), a = t.getStride(), l = this.coordinates.length; this.appendFlatLineCoordinates( @@ -8543,25 +8456,25 @@ class qm extends nr { !1, !1 ); - const h = [W.CIRCLE, l]; - this.instructions.push(Hi, h), this.hitDetectionInstructions.push(Hi, h), i.fillStyle !== void 0 && (this.instructions.push(Ar), this.hitDetectionInstructions.push(Ar)), i.strokeStyle !== void 0 && (this.instructions.push(Si), this.hitDetectionInstructions.push(Si)), this.endGeometry(e); + const h = [V.CIRCLE, l]; + this.instructions.push(Ni, h), this.hitDetectionInstructions.push(Ni, h), n.fillStyle !== void 0 && (this.instructions.push(yr), this.hitDetectionInstructions.push(yr)), n.strokeStyle !== void 0 && (this.instructions.push(mi), this.hitDetectionInstructions.push(mi)), this.endGeometry(e); } drawPolygon(t, e) { - const i = this.state, s = i.fillStyle, r = i.strokeStyle; + const n = this.state, s = n.fillStyle, r = n.strokeStyle; if (s === void 0 && r === void 0) return; - this.setFillStrokeStyles_(), this.beginGeometry(t, e), i.fillStyle !== void 0 && this.hitDetectionInstructions.push([ - W.SET_FILL_STYLE, - ai - ]), i.strokeStyle !== void 0 && this.hitDetectionInstructions.push([ - W.SET_STROKE_STYLE, - i.strokeStyle, - i.lineWidth, - i.lineCap, - i.lineJoin, - i.miterLimit, - i.lineDash, - i.lineDashOffset + this.setFillStrokeStyles_(), this.beginGeometry(t, e), n.fillStyle !== void 0 && this.hitDetectionInstructions.push([ + V.SET_FILL_STYLE, + Je + ]), n.strokeStyle !== void 0 && this.hitDetectionInstructions.push([ + V.SET_STROKE_STYLE, + n.strokeStyle, + n.lineWidth, + n.lineCap, + n.lineJoin, + n.miterLimit, + n.lineDash, + n.lineDashOffset ]); const o = t.getEnds(), a = t.getOrientedFlatCoordinates(), l = t.getStride(); this.drawFlatCoordinatess_( @@ -8572,21 +8485,21 @@ class qm extends nr { ), this.endGeometry(e); } drawMultiPolygon(t, e) { - const i = this.state, s = i.fillStyle, r = i.strokeStyle; + const n = this.state, s = n.fillStyle, r = n.strokeStyle; if (s === void 0 && r === void 0) return; - this.setFillStrokeStyles_(), this.beginGeometry(t, e), i.fillStyle !== void 0 && this.hitDetectionInstructions.push([ - W.SET_FILL_STYLE, - ai - ]), i.strokeStyle !== void 0 && this.hitDetectionInstructions.push([ - W.SET_STROKE_STYLE, - i.strokeStyle, - i.lineWidth, - i.lineCap, - i.lineJoin, - i.miterLimit, - i.lineDash, - i.lineDashOffset + this.setFillStrokeStyles_(), this.beginGeometry(t, e), n.fillStyle !== void 0 && this.hitDetectionInstructions.push([ + V.SET_FILL_STYLE, + Je + ]), n.strokeStyle !== void 0 && this.hitDetectionInstructions.push([ + V.SET_STROKE_STYLE, + n.strokeStyle, + n.lineWidth, + n.lineCap, + n.lineJoin, + n.miterLimit, + n.lineDash, + n.lineDashOffset ]); const o = t.getEndss(), a = t.getOrientedFlatCoordinates(), l = t.getStride(); let h = 0; @@ -8604,8 +8517,8 @@ class qm extends nr { const t = this.tolerance; if (t !== 0) { const e = this.coordinates; - for (let i = 0, s = e.length; i < s; ++i) - e[i] = Zi(e[i], t); + for (let n = 0, s = e.length; n < s; ++n) + e[n] = Ti(e[n], t); } return super.finish(); } @@ -8614,16 +8527,16 @@ class qm extends nr { t.fillStyle !== void 0 && this.updateFillStyle(t, this.createFill), t.strokeStyle !== void 0 && this.updateStrokeStyle(t, this.applyStroke); } } -const dc = qm; -function Km(n, t, e, i, s) { +const zh = vm; +function xm(i, t, e, n, s) { let r = e, o = e, a = 0, l = 0, h = e, c, u, d, f, g, m, _, y, p, v; - for (u = e; u < i; u += s) { - const x = t[u], C = t[u + 1]; - g !== void 0 && (p = x - g, v = C - m, f = Math.sqrt(p * p + v * v), _ !== void 0 && (l += d, c = Math.acos((_ * p + y * v) / (d * f)), c > n && (l > a && (a = l, r = h, o = u), l = 0, h = u - s)), d = f, _ = p, y = v), g = x, m = C; + for (u = e; u < n; u += s) { + const x = t[u], M = t[u + 1]; + g !== void 0 && (p = x - g, v = M - m, f = Math.sqrt(p * p + v * v), _ !== void 0 && (l += d, c = Math.acos((_ * p + y * v) / (d * f)), c > i && (l > a && (a = l, r = h, o = u), l = 0, h = u - s)), d = f, _ = p, y = v), g = x, m = M; } return l += f, l > a ? [h, u] : [r, o]; } -const bs = { +const ds = { left: 0, end: 0, center: 0.5, @@ -8636,24 +8549,24 @@ const bs = { ideographic: 0.8, bottom: 1 }; -class Jm extends nr { - constructor(t, e, i, s) { - super(t, e, i, s), this.labels_ = null, this.text_ = "", this.textOffsetX_ = 0, this.textOffsetY_ = 0, this.textRotateWithView_ = void 0, this.textRotation_ = 0, this.textFillState_ = null, this.fillStates = {}, this.textStrokeState_ = null, this.strokeStates = {}, this.textState_ = {}, this.textStates = {}, this.textKey_ = "", this.fillKey_ = "", this.strokeKey_ = "", this.declutterImageWithText_ = void 0; +class Mm extends Us { + constructor(t, e, n, s) { + super(t, e, n, s), this.labels_ = null, this.text_ = "", this.textOffsetX_ = 0, this.textOffsetY_ = 0, this.textRotateWithView_ = void 0, this.textRotation_ = 0, this.textFillState_ = null, this.fillStates = {}, this.textStrokeState_ = null, this.strokeStates = {}, this.textState_ = {}, this.textStates = {}, this.textKey_ = "", this.fillKey_ = "", this.strokeKey_ = "", this.declutterImageWithText_ = void 0; } finish() { const t = super.finish(); return t.textStates = this.textStates, t.fillStates = this.fillStates, t.strokeStates = this.strokeStates, t; } drawText(t, e) { - const i = this.textFillState_, s = this.textStrokeState_, r = this.textState_; - if (this.text_ === "" || !r || !i && !s) + const n = this.textFillState_, s = this.textStrokeState_, r = this.textState_; + if (this.text_ === "" || !r || !n && !s) return; const o = this.coordinates; let a = o.length; const l = t.getType(); let h = null, c = t.getStride(); if (r.placement === "line" && (l == "LineString" || l == "MultiLineString" || l == "Polygon" || l == "MultiPolygon")) { - if (!Kt(this.getBufferedMaxExtent(), t.getExtent())) + if (!Qt(this.getBufferedMaxExtent(), t.getExtent())) return; let u; if (h = t.getFlatCoordinates(), l == "LineString") @@ -8673,7 +8586,7 @@ class Jm extends nr { let f = 0, g; for (let m = 0, _ = u.length; m < _; ++m) { if (d == null) { - const p = Km( + const p = xm( r.maxAngle, h, f, @@ -8733,13 +8646,13 @@ class Jm extends nr { r.backgroundStroke ), r.backgroundFill && (this.updateFillStyle(this.state, this.createFill), this.hitDetectionInstructions.push(this.createFill(this.state))), r.backgroundStroke && (this.updateStrokeStyle(this.state, this.applyStroke), this.hitDetectionInstructions.push(this.createStroke(this.state)))), this.beginGeometry(t, e); let f = r.padding; - if (f != Ui && (r.scale[0] < 0 || r.scale[1] < 0)) { + if (f != Ai && (r.scale[0] < 0 || r.scale[1] < 0)) { let _ = r.padding[0], y = r.padding[1], p = r.padding[2], v = r.padding[3]; r.scale[0] < 0 && (y = -y, v = -v), r.scale[1] < 0 && (_ = -_, p = -p), f = [_, y, p, v]; } const g = this.pixelRatio; this.instructions.push([ - W.DRAW_IMAGE, + V.DRAW_IMAGE, a, d, null, @@ -8755,7 +8668,7 @@ class Jm extends nr { NaN, void 0, this.declutterImageWithText_, - f == Ui ? Ui : f.map(function(_) { + f == Ai ? Ai : f.map(function(_) { return _ * g; }), !!r.backgroundFill, @@ -8770,7 +8683,7 @@ class Jm extends nr { ]); const m = 1 / g; this.hitDetectionInstructions.push([ - W.DRAW_IMAGE, + V.DRAW_IMAGE, a, d, null, @@ -8800,7 +8713,7 @@ class Jm extends nr { } } saveTextStates_() { - const t = this.textStrokeState_, e = this.textState_, i = this.textFillState_, s = this.strokeKey_; + const t = this.textStrokeState_, e = this.textState_, n = this.textFillState_, s = this.strokeKey_; t && (s in this.strokeStates || (this.strokeStates[s] = { strokeStyle: t.strokeStyle, lineCap: t.lineCap, @@ -8813,22 +8726,22 @@ class Jm extends nr { const r = this.textKey_; r in this.textStates || (this.textStates[r] = { font: e.font, - textAlign: e.textAlign || $s, + textAlign: e.textAlign || Es, justify: e.justify, - textBaseline: e.textBaseline || so, + textBaseline: e.textBaseline || $r, scale: e.scale }); const o = this.fillKey_; - i && (o in this.fillStates || (this.fillStates[o] = { - fillStyle: i.fillStyle + n && (o in this.fillStates || (this.fillStates[o] = { + fillStyle: n.fillStyle })); } drawChars_(t, e) { - const i = this.textStrokeState_, s = this.textState_, r = this.strokeKey_, o = this.textKey_, a = this.fillKey_; + const n = this.textStrokeState_, s = this.textState_, r = this.strokeKey_, o = this.textKey_, a = this.fillKey_; this.saveTextStates_(); - const l = this.pixelRatio, h = bs[s.textBaseline], c = this.textOffsetY_ * l, u = this.text_, d = i ? i.lineWidth * Math.abs(s.scale[0]) / 2 : 0; + const l = this.pixelRatio, h = ds[s.textBaseline], c = this.textOffsetY_ * l, u = this.text_, d = n ? n.lineWidth * Math.abs(s.scale[0]) / 2 : 0; this.instructions.push([ - W.DRAW_CHARS, + V.DRAW_CHARS, t, e, h, @@ -8843,7 +8756,7 @@ class Jm extends nr { o, 1 ]), this.hitDetectionInstructions.push([ - W.DRAW_CHARS, + V.DRAW_CHARS, t, e, h, @@ -8860,13 +8773,13 @@ class Jm extends nr { ]); } setTextStyle(t, e) { - let i, s, r; + let n, s, r; if (!t) this.text_ = ""; else { const o = t.getFill(); - o ? (s = this.textFillState_, s || (s = {}, this.textFillState_ = s), s.fillStyle = ke( - o.getColor() || ai + o ? (s = this.textFillState_, s || (s = {}, this.textFillState_ = s), s.fillStyle = Ie( + o.getColor() || Je )) : (s = null, this.textFillState_ = s); const a = t.getStroke(); if (!a) @@ -8874,52 +8787,52 @@ class Jm extends nr { else { r = this.textStrokeState_, r || (r = {}, this.textStrokeState_ = r); const g = a.getLineDash(), m = a.getLineDashOffset(), _ = a.getWidth(), y = a.getMiterLimit(); - r.lineCap = a.getLineCap() || no, r.lineDash = g ? g.slice() : Ns, r.lineDashOffset = m === void 0 ? Ds : m, r.lineJoin = a.getLineJoin() || Xn, r.lineWidth = _ === void 0 ? Bs : _, r.miterLimit = y === void 0 ? ks : y, r.strokeStyle = ke( - a.getColor() || Gs + r.lineCap = a.getLineCap() || Gr, r.lineDash = g ? g.slice() : vs, r.lineDashOffset = m === void 0 ? xs : m, r.lineJoin = a.getLineJoin() || Pn, r.lineWidth = _ === void 0 ? ws : _, r.miterLimit = y === void 0 ? Ms : y, r.strokeStyle = Ie( + a.getColor() || Cs ); } - i = this.textState_; - const l = t.getFont() || cd; - C0(l); + n = this.textState_; + const l = t.getFont() || $u; + V0(l); const h = t.getScaleArray(); - i.overflow = t.getOverflow(), i.font = l, i.maxAngle = t.getMaxAngle(), i.placement = t.getPlacement(), i.textAlign = t.getTextAlign(), i.justify = t.getJustify(), i.textBaseline = t.getTextBaseline() || so, i.backgroundFill = t.getBackgroundFill(), i.backgroundStroke = t.getBackgroundStroke(), i.padding = t.getPadding() || Ui, i.scale = h === void 0 ? [1, 1] : h; + n.overflow = t.getOverflow(), n.font = l, n.maxAngle = t.getMaxAngle(), n.placement = t.getPlacement(), n.textAlign = t.getTextAlign(), n.justify = t.getJustify(), n.textBaseline = t.getTextBaseline() || $r, n.backgroundFill = t.getBackgroundFill(), n.backgroundStroke = t.getBackgroundStroke(), n.padding = t.getPadding() || Ai, n.scale = h === void 0 ? [1, 1] : h; const c = t.getOffsetX(), u = t.getOffsetY(), d = t.getRotateWithView(), f = t.getRotation(); - this.text_ = t.getText() || "", this.textOffsetX_ = c === void 0 ? 0 : c, this.textOffsetY_ = u === void 0 ? 0 : u, this.textRotateWithView_ = d === void 0 ? !1 : d, this.textRotation_ = f === void 0 ? 0 : f, this.strokeKey_ = r ? (typeof r.strokeStyle == "string" ? r.strokeStyle : q(r.strokeStyle)) + r.lineCap + r.lineDashOffset + "|" + r.lineWidth + r.lineJoin + r.miterLimit + "[" + r.lineDash.join() + "]" : "", this.textKey_ = i.font + i.scale + (i.textAlign || "?") + (i.justify || "?") + (i.textBaseline || "?"), this.fillKey_ = s ? typeof s.fillStyle == "string" ? s.fillStyle : "|" + q(s.fillStyle) : ""; + this.text_ = t.getText() || "", this.textOffsetX_ = c === void 0 ? 0 : c, this.textOffsetY_ = u === void 0 ? 0 : u, this.textRotateWithView_ = d === void 0 ? !1 : d, this.textRotation_ = f === void 0 ? 0 : f, this.strokeKey_ = r ? (typeof r.strokeStyle == "string" ? r.strokeStyle : rt(r.strokeStyle)) + r.lineCap + r.lineDashOffset + "|" + r.lineWidth + r.lineJoin + r.miterLimit + "[" + r.lineDash.join() + "]" : "", this.textKey_ = n.font + n.scale + (n.textAlign || "?") + (n.justify || "?") + (n.textBaseline || "?"), this.fillKey_ = s ? typeof s.fillStyle == "string" ? s.fillStyle : "|" + rt(s.fillStyle) : ""; } this.declutterImageWithText_ = e; } } -const Qm = { - Circle: dc, - Default: nr, - Image: Xm, - LineString: jm, - Polygon: dc, - Text: Jm +const Cm = { + Circle: zh, + Default: Us, + Image: _m, + LineString: ym, + Polygon: zh, + Text: Mm }; -class t_ { - constructor(t, e, i, s) { - this.tolerance_ = t, this.maxExtent_ = e, this.pixelRatio_ = s, this.resolution_ = i, this.buildersByZIndex_ = {}; +class Em { + constructor(t, e, n, s) { + this.tolerance_ = t, this.maxExtent_ = e, this.pixelRatio_ = s, this.resolution_ = n, this.buildersByZIndex_ = {}; } finish() { const t = {}; for (const e in this.buildersByZIndex_) { t[e] = t[e] || {}; - const i = this.buildersByZIndex_[e]; - for (const s in i) { - const r = i[s].finish(); + const n = this.buildersByZIndex_[e]; + for (const s in n) { + const r = n[s].finish(); t[e][s] = r; } } return t; } getBuilder(t, e) { - const i = t !== void 0 ? t.toString() : "0"; - let s = this.buildersByZIndex_[i]; - s === void 0 && (s = {}, this.buildersByZIndex_[i] = s); + const n = t !== void 0 ? t.toString() : "0"; + let s = this.buildersByZIndex_[n]; + s === void 0 && (s = {}, this.buildersByZIndex_[n] = s); let r = s[e]; if (r === void 0) { - const o = Qm[e]; + const o = Cm[e]; r = new o( this.tolerance_, this.maxExtent_, @@ -8930,33 +8843,33 @@ class t_ { return r; } } -const fc = t_; -class e_ extends Uu { +const Zh = Em; +class wm extends _u { constructor(t) { super(), this.ready = !0, this.boundHandleImageChange_ = this.handleImageChange_.bind(this), this.layer_ = t, this.declutterExecutorGroup = null; } getFeatures(t) { - return H(); + return W(); } getData(t) { return null; } prepareFrame(t) { - return H(); + return W(); } renderFrame(t, e) { - return H(); + return W(); } - loadedTileCallback(t, e, i) { - t[e] || (t[e] = {}), t[e][i.tileCoord.toString()] = i; + loadedTileCallback(t, e, n) { + t[e] || (t[e] = {}), t[e][n.tileCoord.toString()] = n; } - createLoadedTileFinder(t, e, i) { + createLoadedTileFinder(t, e, n) { return function(s, r) { - const o = this.loadedTileCallback.bind(this, i, s); + const o = this.loadedTileCallback.bind(this, n, s); return t.forEachLoadedTile(e, s, r, o); }.bind(this); } - forEachFeatureAtCoordinate(t, e, i, s, r) { + forEachFeatureAtCoordinate(t, e, n, s, r) { } getLayer() { return this.layer_; @@ -8964,11 +8877,11 @@ class e_ extends Uu { handleFontsChanged() { } handleImageChange_(t) { - t.target.getState() === Pt.LOADED && this.renderIfReadyAndVisible(); + t.target.getState() === It.LOADED && this.renderIfReadyAndVisible(); } loadImage(t) { let e = t.getState(); - return e != Pt.LOADED && e != Pt.ERROR && t.addEventListener(U.CHANGE, this.boundHandleImageChange_), e == Pt.IDLE && (t.load(), e = t.getState()), e == Pt.LOADED; + return e != It.LOADED && e != It.ERROR && t.addEventListener(X.CHANGE, this.boundHandleImageChange_), e == It.IDLE && (t.load(), e = t.getState()), e == It.LOADED; } renderIfReadyAndVisible() { const t = this.getLayer(); @@ -8978,36 +8891,36 @@ class e_ extends Uu { delete this.layer_, super.disposeInternal(); } } -const i_ = e_, gc = []; -let Ln = null; -function n_() { - const n = document.createElement("canvas"); - n.width = 1, n.height = 1, Ln = n.getContext("2d"); +const Sm = wm, Uh = []; +let _n = null; +function Rm() { + const i = document.createElement("canvas"); + i.width = 1, i.height = 1, _n = i.getContext("2d"); } -class s_ extends i_ { +class bm extends Sm { constructor(t) { - super(t), this.container = null, this.renderedResolution, this.tempTransform = $e(), this.pixelTransform = $e(), this.inversePixelTransform = $e(), this.context = null, this.containerReused = !1, this.pixelContext_ = null, this.frameState = null; + super(t), this.container = null, this.renderedResolution, this.tempTransform = Pe(), this.pixelTransform = Pe(), this.inversePixelTransform = Pe(), this.context = null, this.containerReused = !1, this.pixelContext_ = null, this.frameState = null; } - getImageData(t, e, i) { - Ln || n_(), Ln.clearRect(0, 0, 1, 1); + getImageData(t, e, n) { + _n || Rm(), _n.clearRect(0, 0, 1, 1); let s; try { - Ln.drawImage(t, e, i, 1, 1, 0, 0, 1, 1), s = Ln.getImageData(0, 0, 1, 1).data; + _n.drawImage(t, e, n, 1, 1, 0, 0, 1, 1), s = _n.getImageData(0, 0, 1, 1).data; } catch { - return Ln = null, null; + return _n = null, null; } return s; } getBackground(t) { - let i = this.getLayer().getBackground(); - return typeof i == "function" && (i = i(t.viewState.resolution)), i || void 0; + let n = this.getLayer().getBackground(); + return typeof n == "function" && (n = n(t.viewState.resolution)), n || void 0; } - useContainer(t, e, i) { + useContainer(t, e, n) { const s = this.getLayer().getClassName(); let r, o; - if (t && t.className === s && (!i || t && t.style.backgroundColor && Ni( - Qr(t.style.backgroundColor), - Qr(i) + if (t && t.className === s && (!n || t && t.style.backgroundColor && Ki( + Nr(t.style.backgroundColor), + Nr(n) ))) { const a = t.firstElementChild; a instanceof HTMLCanvasElement && (o = a.getContext("2d")); @@ -9015,45 +8928,45 @@ class s_ extends i_ { if (o && o.canvas.style.transform === e ? (this.container = t, this.context = o, this.containerReused = !0) : this.containerReused && (this.container = null, this.context = null, this.containerReused = !1), !this.container) { r = document.createElement("div"), r.className = s; let a = r.style; - a.position = "absolute", a.width = "100%", a.height = "100%", o = pe(); + a.position = "absolute", a.width = "100%", a.height = "100%", o = de(); const l = o.canvas; r.appendChild(l), a = l.style, a.position = "absolute", a.left = "0", a.transformOrigin = "top left", this.container = r, this.context = o; } - !this.containerReused && i && !this.container.style.backgroundColor && (this.container.style.backgroundColor = i); + !this.containerReused && n && !this.container.style.backgroundColor && (this.container.style.backgroundColor = n); } - clipUnrotated(t, e, i) { - const s = fn(i), r = Io(i), o = Lo(i), a = bo(i); - Nt(e.coordinateToPixelTransform, s), Nt(e.coordinateToPixelTransform, r), Nt(e.coordinateToPixelTransform, o), Nt(e.coordinateToPixelTransform, a); + clipUnrotated(t, e, n) { + const s = Ji(n), r = co(n), o = ho(n), a = lo(n); + Ft(e.coordinateToPixelTransform, s), Ft(e.coordinateToPixelTransform, r), Ft(e.coordinateToPixelTransform, o), Ft(e.coordinateToPixelTransform, a); const l = this.inversePixelTransform; - Nt(l, s), Nt(l, r), Nt(l, o), Nt(l, a), t.save(), t.beginPath(), t.moveTo(Math.round(s[0]), Math.round(s[1])), t.lineTo(Math.round(r[0]), Math.round(r[1])), t.lineTo(Math.round(o[0]), Math.round(o[1])), t.lineTo(Math.round(a[0]), Math.round(a[1])), t.clip(); + Ft(l, s), Ft(l, r), Ft(l, o), Ft(l, a), t.save(), t.beginPath(), t.moveTo(Math.round(s[0]), Math.round(s[1])), t.lineTo(Math.round(r[0]), Math.round(r[1])), t.lineTo(Math.round(o[0]), Math.round(o[1])), t.lineTo(Math.round(a[0]), Math.round(a[1])), t.clip(); } - dispatchRenderEvent_(t, e, i) { + dispatchRenderEvent_(t, e, n) { const s = this.getLayer(); if (s.hasListener(t)) { - const r = new ad( + const r = new Du( t, this.inversePixelTransform, - i, + n, e ); s.dispatchEvent(r); } } preRender(t, e) { - this.frameState = e, this.dispatchRenderEvent_(Ri.PRERENDER, t, e); + this.frameState = e, this.dispatchRenderEvent_(_i.PRERENDER, t, e); } postRender(t, e) { - this.dispatchRenderEvent_(Ri.POSTRENDER, t, e); + this.dispatchRenderEvent_(_i.POSTRENDER, t, e); } - getRenderTransform(t, e, i, s, r, o, a) { + getRenderTransform(t, e, n, s, r, o, a) { const l = r / 2, h = o / 2, c = s / e, u = -c, d = -t[0] + a, f = -t[1]; - return Ii( + return xi( this.tempTransform, l, h, c, u, - -i, + -n, d, f ); @@ -9062,155 +8975,155 @@ class s_ extends i_ { delete this.frameState, super.disposeInternal(); } } -const Yd = s_; -function r_(n, t, e, i, s, r, o, a, l, h, c, u) { - let d = n[t], f = n[t + 1], g = 0, m = 0, _ = 0, y = 0; +const Md = bm; +function Lm(i, t, e, n, s, r, o, a, l, h, c, u) { + let d = i[t], f = i[t + 1], g = 0, m = 0, _ = 0, y = 0; function p() { - g = d, m = f, t += i, d = n[t], f = n[t + 1], y += _, _ = Math.sqrt((d - g) * (d - g) + (f - m) * (f - m)); + g = d, m = f, t += n, d = i[t], f = i[t + 1], y += _, _ = Math.sqrt((d - g) * (d - g) + (f - m) * (f - m)); } do p(); - while (t < e - i && y + _ < r); + while (t < e - n && y + _ < r); let v = _ === 0 ? 0 : (r - y) / _; - const x = ii(g, d, v), C = ii(m, f, v), E = t - i, R = y, b = r + a * l(h, s, c); - for (; t < e - i && y + _ < b; ) + const x = Ye(g, d, v), M = Ye(m, f, v), E = t - n, R = y, L = r + a * l(h, s, c); + for (; t < e - n && y + _ < L; ) p(); - v = _ === 0 ? 0 : (b - y) / _; - const F = ii(g, d, v), G = ii(m, f, v); - let V; + v = _ === 0 ? 0 : (L - y) / _; + const N = Ye(g, d, v), G = Ye(m, f, v); + let U; if (u) { - const k = [x, C, F, G]; - Fl(k, 0, 4, 2, u, k, k), V = k[0] > k[2]; + const k = [x, M, N, G]; + ju(k, 0, 4, 2, u, k, k), U = k[0] > k[2]; } else - V = x > F; - const L = Math.PI, $ = [], gt = E + i === t; - t = E, _ = 0, y = R, d = n[t], f = n[t + 1]; - let N; - if (gt) { - p(), N = Math.atan2(f - m, d - g), V && (N += N > 0 ? -L : L); - const k = (F + x) / 2, P = (G + C) / 2; - return $[0] = [k, P, (b - r) / 2, N, s], $; + U = x > N; + const T = Math.PI, $ = [], ft = E + n === t; + t = E, _ = 0, y = R, d = i[t], f = i[t + 1]; + let F; + if (ft) { + p(), F = Math.atan2(f - m, d - g), U && (F += F > 0 ? -T : T); + const k = (N + x) / 2, A = (G + M) / 2; + return $[0] = [k, A, (L - r) / 2, F, s], $; } s = s.replace(/\n/g, " "); - for (let k = 0, P = s.length; k < P; ) { + for (let k = 0, A = s.length; k < A; ) { p(); - let it = Math.atan2(f - m, d - g); - if (V && (it += it > 0 ? -L : L), N !== void 0) { - let ht = it - N; - if (ht += ht > L ? -2 * L : ht < -L ? 2 * L : 0, Math.abs(ht) > o) + let tt = Math.atan2(f - m, d - g); + if (U && (tt += tt > 0 ? -T : T), F !== void 0) { + let lt = tt - F; + if (lt += lt > T ? -2 * T : lt < -T ? 2 * T : 0, Math.abs(lt) > o) return null; } - N = it; - const wt = k; - let yt = 0; - for (; k < P; ++k) { - const ht = V ? P - k - 1 : k, _t = a * l(h, s[ht], c); - if (t + i < e && y + _ < r + yt + _t / 2) + F = tt; + const Mt = k; + let _t = 0; + for (; k < A; ++k) { + const lt = U ? A - k - 1 : k, gt = a * l(h, s[lt], c); + if (t + n < e && y + _ < r + _t + gt / 2) break; - yt += _t; + _t += gt; } - if (k === wt) + if (k === Mt) continue; - const At = V ? s.substring(P - wt, P - k) : s.substring(wt, k); - v = _ === 0 ? 0 : (r + yt / 2 - y) / _; - const T = ii(g, d, v), ce = ii(m, f, v); - $.push([T, ce, yt / 2, it, At]), r += yt; + const Pt = U ? s.substring(A - Mt, A - k) : s.substring(Mt, k); + v = _ === 0 ? 0 : (r + _t / 2 - y) / _; + const b = Ye(g, d, v), se = Ye(m, f, v); + $.push([b, se, _t / 2, tt, Pt]), r += _t; } return $; } -const En = se(), mi = [], Ke = [], Je = [], _i = []; -function mc(n) { - return n[3].declutterBox; +const cn = ue(), oi = [], Ue = [], Ve = [], ai = []; +function Vh(i) { + return i[3].declutterBox; } -const o_ = new RegExp( +const Tm = new RegExp( "[" + String.fromCharCode(1425) + "-" + String.fromCharCode(2303) + String.fromCharCode(64285) + "-" + String.fromCharCode(65023) + String.fromCharCode(65136) + "-" + String.fromCharCode(65276) + String.fromCharCode(67584) + "-" + String.fromCharCode(69631) + String.fromCharCode(124928) + "-" + String.fromCharCode(126975) + "]" ); -function _c(n, t) { - return (t === "start" || t === "end") && !o_.test(n) && (t = t === "start" ? "left" : "right"), bs[t]; +function Wh(i, t) { + return (t === "start" || t === "end") && !Tm.test(i) && (t = t === "start" ? "left" : "right"), ds[t]; } -function a_(n, t, e) { - return e > 0 && n.push(` -`, ""), n.push(t, ""), n; +function Im(i, t, e) { + return e > 0 && i.push(` +`, ""), i.push(t, ""), i; } -class l_ { - constructor(t, e, i, s) { - this.overlaps = i, this.pixelRatio = e, this.resolution = t, this.alignFill_, this.instructions = s.instructions, this.coordinates = s.coordinates, this.coordinateCache_ = {}, this.renderedTransform_ = $e(), this.hitDetectionInstructions = s.hitDetectionInstructions, this.pixelCoordinates_ = null, this.viewRotation_ = 0, this.fillStates = s.fillStates || {}, this.strokeStates = s.strokeStates || {}, this.textStates = s.textStates || {}, this.widths_ = {}, this.labels_ = {}; +class Am { + constructor(t, e, n, s) { + this.overlaps = n, this.pixelRatio = e, this.resolution = t, this.alignFill_, this.instructions = s.instructions, this.coordinates = s.coordinates, this.coordinateCache_ = {}, this.renderedTransform_ = Pe(), this.hitDetectionInstructions = s.hitDetectionInstructions, this.pixelCoordinates_ = null, this.viewRotation_ = 0, this.fillStates = s.fillStates || {}, this.strokeStates = s.strokeStates || {}, this.textStates = s.textStates || {}, this.widths_ = {}, this.labels_ = {}; } - createLabel(t, e, i, s) { - const r = t + e + i + s; + createLabel(t, e, n, s) { + const r = t + e + n + s; if (this.labels_[r]) return this.labels_[r]; - const o = s ? this.strokeStates[s] : null, a = i ? this.fillStates[i] : null, l = this.textStates[e], h = this.pixelRatio, c = [ + const o = s ? this.strokeStates[s] : null, a = n ? this.fillStates[n] : null, l = this.textStates[e], h = this.pixelRatio, c = [ l.scale[0] * h, l.scale[1] * h - ], u = Array.isArray(t), d = l.justify ? bs[l.justify] : _c( + ], u = Array.isArray(t), d = l.justify ? ds[l.justify] : Wh( Array.isArray(t) ? t[0] : t, - l.textAlign || $s + l.textAlign || Es ), f = s && o.lineWidth ? o.lineWidth : 0, g = u ? t : t.split(` -`).reduce(a_, []), { width: m, height: _, widths: y, heights: p, lineWidths: v } = E0( +`).reduce(Im, []), { width: m, height: _, widths: y, heights: p, lineWidths: v } = H0( l, g - ), x = m + f, C = [], E = (x + 2) * c[0], R = (_ + f) * c[1], b = { + ), x = m + f, M = [], E = (x + 2) * c[0], R = (_ + f) * c[1], L = { width: E < 0 ? Math.floor(E) : Math.ceil(E), height: R < 0 ? Math.floor(R) : Math.ceil(R), - contextInstructions: C + contextInstructions: M }; - (c[0] != 1 || c[1] != 1) && C.push("scale", c), s && (C.push("strokeStyle", o.strokeStyle), C.push("lineWidth", f), C.push("lineCap", o.lineCap), C.push("lineJoin", o.lineJoin), C.push("miterLimit", o.miterLimit), C.push("setLineDash", [o.lineDash]), C.push("lineDashOffset", o.lineDashOffset)), i && C.push("fillStyle", a.fillStyle), C.push("textBaseline", "middle"), C.push("textAlign", "center"); - const F = 0.5 - d; - let G = d * x + F * f; - const V = [], L = []; - let $ = 0, gt = 0, N = 0, k = 0, P; - for (let it = 0, wt = g.length; it < wt; it += 2) { - const yt = g[it]; - if (yt === ` + (c[0] != 1 || c[1] != 1) && M.push("scale", c), s && (M.push("strokeStyle", o.strokeStyle), M.push("lineWidth", f), M.push("lineCap", o.lineCap), M.push("lineJoin", o.lineJoin), M.push("miterLimit", o.miterLimit), M.push("setLineDash", [o.lineDash]), M.push("lineDashOffset", o.lineDashOffset)), n && M.push("fillStyle", a.fillStyle), M.push("textBaseline", "middle"), M.push("textAlign", "center"); + const N = 0.5 - d; + let G = d * x + N * f; + const U = [], T = []; + let $ = 0, ft = 0, F = 0, k = 0, A; + for (let tt = 0, Mt = g.length; tt < Mt; tt += 2) { + const _t = g[tt]; + if (_t === ` `) { - gt += $, $ = 0, G = d * x + F * f, ++k; + ft += $, $ = 0, G = d * x + N * f, ++k; continue; } - const At = g[it + 1] || l.font; - At !== P && (s && V.push("font", At), i && L.push("font", At), P = At), $ = Math.max($, p[N]); - const T = [ - yt, - G + F * y[N] + d * (y[N] - v[k]), - 0.5 * (f + $) + gt + const Pt = g[tt + 1] || l.font; + Pt !== A && (s && U.push("font", Pt), n && T.push("font", Pt), A = Pt), $ = Math.max($, p[F]); + const b = [ + _t, + G + N * y[F] + d * (y[F] - v[k]), + 0.5 * (f + $) + ft ]; - G += y[N], s && V.push("strokeText", T), i && L.push("fillText", T), ++N; + G += y[F], s && U.push("strokeText", b), n && T.push("fillText", b), ++F; } - return Array.prototype.push.apply(C, V), Array.prototype.push.apply(C, L), this.labels_[r] = b, b; + return Array.prototype.push.apply(M, U), Array.prototype.push.apply(M, T), this.labels_[r] = L, L; } - replayTextBackground_(t, e, i, s, r, o, a) { - t.beginPath(), t.moveTo.apply(t, e), t.lineTo.apply(t, i), t.lineTo.apply(t, s), t.lineTo.apply(t, r), t.lineTo.apply(t, e), o && (this.alignFill_ = o[2], this.fill_(t)), a && (this.setStrokeStyle_( + replayTextBackground_(t, e, n, s, r, o, a) { + t.beginPath(), t.moveTo.apply(t, e), t.lineTo.apply(t, n), t.lineTo.apply(t, s), t.lineTo.apply(t, r), t.lineTo.apply(t, e), o && (this.alignFill_ = o[2], this.fill_(t)), a && (this.setStrokeStyle_( t, a ), t.stroke()); } - calculateImageOrLabelDimensions_(t, e, i, s, r, o, a, l, h, c, u, d, f, g, m, _) { + calculateImageOrLabelDimensions_(t, e, n, s, r, o, a, l, h, c, u, d, f, g, m, _) { a *= d[0], l *= d[1]; - let y = i - a, p = s - l; - const v = r + h > t ? t - h : r, x = o + c > e ? e - c : o, C = g[3] + v * d[0] + g[1], E = g[0] + x * d[1] + g[2], R = y - g[3], b = p - g[0]; - (m || u !== 0) && (mi[0] = R, _i[0] = R, mi[1] = b, Ke[1] = b, Ke[0] = R + C, Je[0] = Ke[0], Je[1] = b + E, _i[1] = Je[1]); - let F; - return u !== 0 ? (F = Ii( - $e(), - i, + let y = n - a, p = s - l; + const v = r + h > t ? t - h : r, x = o + c > e ? e - c : o, M = g[3] + v * d[0] + g[1], E = g[0] + x * d[1] + g[2], R = y - g[3], L = p - g[0]; + (m || u !== 0) && (oi[0] = R, ai[0] = R, oi[1] = L, Ue[1] = L, Ue[0] = R + M, Ve[0] = Ue[0], Ve[1] = L + E, ai[1] = Ve[1]); + let N; + return u !== 0 ? (N = xi( + Pe(), + n, s, 1, 1, u, - -i, + -n, -s - ), Nt(F, mi), Nt(F, Ke), Nt(F, Je), Nt(F, _i), _e( - Math.min(mi[0], Ke[0], Je[0], _i[0]), - Math.min(mi[1], Ke[1], Je[1], _i[1]), - Math.max(mi[0], Ke[0], Je[0], _i[0]), - Math.max(mi[1], Ke[1], Je[1], _i[1]), - En - )) : _e( - Math.min(R, R + C), - Math.min(b, b + E), - Math.max(R, R + C), - Math.max(b, b + E), - En + ), Ft(N, oi), Ft(N, Ue), Ft(N, Ve), Ft(N, ai), ye( + Math.min(oi[0], Ue[0], Ve[0], ai[0]), + Math.min(oi[1], Ue[1], Ve[1], ai[1]), + Math.max(oi[0], Ue[0], Ve[0], ai[0]), + Math.max(oi[1], Ue[1], Ve[1], ai[1]), + cn + )) : ye( + Math.min(R, R + M), + Math.min(L, L + E), + Math.max(R, R + M), + Math.max(L, L + E), + cn ), f && (y = Math.round(y), p = Math.round(p)), { drawImageX: y, drawImageY: p, @@ -9219,31 +9132,31 @@ class l_ { originX: h, originY: c, declutterBox: { - minX: En[0], - minY: En[1], - maxX: En[2], - maxY: En[3], + minX: cn[0], + minY: cn[1], + maxX: cn[2], + maxY: cn[3], value: _ }, - canvasTransform: F, + canvasTransform: N, scale: d }; } - replayImageOrLabel_(t, e, i, s, r, o, a) { + replayImageOrLabel_(t, e, n, s, r, o, a) { const l = !!(o || a), h = s.declutterBox, c = t.canvas, u = a ? a[2] * s.scale[0] / 2 : 0; return h.minX - u <= c.width / e && h.maxX + u >= 0 && h.minY - u <= c.height / e && h.maxY + u >= 0 && (l && this.replayTextBackground_( t, - mi, - Ke, - Je, - _i, + oi, + Ue, + Ve, + ai, o, a - ), w0( + ), X0( t, s.canvasTransform, r, - i, + n, s.originX, s.originY, s.drawImageW, @@ -9255,298 +9168,298 @@ class l_ { } fill_(t) { if (this.alignFill_) { - const e = Nt(this.renderedTransform_, [0, 0]), i = 512 * this.pixelRatio; - t.save(), t.translate(e[0] % i, e[1] % i), t.rotate(this.viewRotation_); + const e = Ft(this.renderedTransform_, [0, 0]), n = 512 * this.pixelRatio; + t.save(), t.translate(e[0] % n, e[1] % n), t.rotate(this.viewRotation_); } t.fill(), this.alignFill_ && t.restore(); } setStrokeStyle_(t, e) { t.strokeStyle = e[1], t.lineWidth = e[2], t.lineCap = e[3], t.lineJoin = e[4], t.miterLimit = e[5], t.lineDashOffset = e[7], t.setLineDash(e[6]); } - drawLabelWithPointPlacement_(t, e, i, s) { - const r = this.textStates[e], o = this.createLabel(t, e, s, i), a = this.strokeStates[i], l = this.pixelRatio, h = _c( + drawLabelWithPointPlacement_(t, e, n, s) { + const r = this.textStates[e], o = this.createLabel(t, e, s, n), a = this.strokeStates[n], l = this.pixelRatio, h = Wh( Array.isArray(t) ? t[0] : t, - r.textAlign || $s - ), c = bs[r.textBaseline || so], u = a && a.lineWidth ? a.lineWidth : 0, d = o.width / l - 2 * r.scale[0], f = h * d + 2 * (0.5 - h) * u, g = c * o.height / l + 2 * (0.5 - c) * u; + r.textAlign || Es + ), c = ds[r.textBaseline || $r], u = a && a.lineWidth ? a.lineWidth : 0, d = o.width / l - 2 * r.scale[0], f = h * d + 2 * (0.5 - h) * u, g = c * o.height / l + 2 * (0.5 - c) * u; return { label: o, anchorX: f, anchorY: g }; } - execute_(t, e, i, s, r, o, a, l) { + execute_(t, e, n, s, r, o, a, l) { let h; - this.pixelCoordinates_ && Ni(i, this.renderedTransform_) ? h = this.pixelCoordinates_ : (this.pixelCoordinates_ || (this.pixelCoordinates_ = []), h = Ki( + this.pixelCoordinates_ && Ki(n, this.renderedTransform_) ? h = this.pixelCoordinates_ : (this.pixelCoordinates_ || (this.pixelCoordinates_ = []), h = $i( this.coordinates, 0, this.coordinates.length, 2, - i, + n, this.pixelCoordinates_ - ), Hg(this.renderedTransform_, i)); + ), p0(this.renderedTransform_, n)); let c = 0; const u = s.length; - let d = 0, f, g, m, _, y, p, v, x, C, E, R, b, F = 0, G = 0, V = null, L = null; - const $ = this.coordinateCache_, gt = this.viewRotation_, N = Math.round(Math.atan2(-i[1], i[0]) * 1e12) / 1e12, k = { + let d = 0, f, g, m, _, y, p, v, x, M, E, R, L, N = 0, G = 0, U = null, T = null; + const $ = this.coordinateCache_, ft = this.viewRotation_, F = Math.round(Math.atan2(-n[1], n[0]) * 1e12) / 1e12, k = { context: t, pixelRatio: this.pixelRatio, resolution: this.resolution, - rotation: gt - }, P = this.instructions != s || this.overlaps ? 0 : 200; - let it, wt, yt, At; + rotation: ft + }, A = this.instructions != s || this.overlaps ? 0 : 200; + let tt, Mt, _t, Pt; for (; c < u; ) { - const T = s[c]; - switch (T[0]) { - case W.BEGIN_GEOMETRY: - it = T[1], At = T[3], it.getGeometry() ? a !== void 0 && !Kt(a, At.getExtent()) ? c = T[2] + 1 : ++c : c = T[2]; + const b = s[c]; + switch (b[0]) { + case V.BEGIN_GEOMETRY: + tt = b[1], Pt = b[3], tt.getGeometry() ? a !== void 0 && !Qt(a, Pt.getExtent()) ? c = b[2] + 1 : ++c : c = b[2]; break; - case W.BEGIN_PATH: - F > P && (this.fill_(t), F = 0), G > P && (t.stroke(), G = 0), !F && !G && (t.beginPath(), _ = NaN, y = NaN), ++c; + case V.BEGIN_PATH: + N > A && (this.fill_(t), N = 0), G > A && (t.stroke(), G = 0), !N && !G && (t.beginPath(), _ = NaN, y = NaN), ++c; break; - case W.CIRCLE: - d = T[1]; - const ht = h[d], _t = h[d + 1], ui = h[d + 2], Fe = h[d + 3], Bt = ui - ht, Xe = Fe - _t, mn = Math.sqrt(Bt * Bt + Xe * Xe); - t.moveTo(ht + mn, _t), t.arc(ht, _t, mn, 0, 2 * Math.PI, !0), ++c; + case V.CIRCLE: + d = b[1]; + const lt = h[d], gt = h[d + 1], ii = h[d + 2], Re = h[d + 3], Gt = ii - lt, $e = Re - gt, en = Math.sqrt(Gt * Gt + $e * $e); + t.moveTo(lt + en, gt), t.arc(lt, gt, en, 0, 2 * Math.PI, !0), ++c; break; - case W.CLOSE_PATH: + case V.CLOSE_PATH: t.closePath(), ++c; break; - case W.CUSTOM: - d = T[1], f = T[2]; - const mr = T[3], _n = T[4], _r = T.length == 6 ? T[5] : void 0; - k.geometry = mr, k.feature = it, c in $ || ($[c] = []); - const di = $[c]; - _r ? _r(h, d, f, 2, di) : (di[0] = h[d], di[1] = h[d + 1], di.length = 2), _n(di, k), ++c; + case V.CUSTOM: + d = b[1], f = b[2]; + const er = b[3], nn = b[4], ir = b.length == 6 ? b[5] : void 0; + k.geometry = er, k.feature = tt, c in $ || ($[c] = []); + const ni = $[c]; + ir ? ir(h, d, f, 2, ni) : (ni[0] = h[d], ni[1] = h[d + 1], ni.length = 2), nn(ni, k), ++c; break; - case W.DRAW_IMAGE: - d = T[1], f = T[2], x = T[3], g = T[4], m = T[5]; - let hs = T[6]; - const fi = T[7], pr = T[8], yr = T[9], vr = T[10]; - let pn = T[11]; - const Yo = T[12]; - let te = T[13]; - const ye = T[14], Te = T[15]; - if (!x && T.length >= 20) { - C = T[19], E = T[20], R = T[21], b = T[22]; - const ue = this.drawLabelWithPointPlacement_( - C, + case V.DRAW_IMAGE: + d = b[1], f = b[2], x = b[3], g = b[4], m = b[5]; + let Yn = b[6]; + const si = b[7], nr = b[8], sr = b[9], rr = b[10]; + let sn = b[11]; + const Lo = b[12]; + let jt = b[13]; + const fe = b[14], ve = b[15]; + if (!x && b.length >= 20) { + M = b[19], E = b[20], R = b[21], L = b[22]; + const re = this.drawLabelWithPointPlacement_( + M, E, R, - b + L ); - x = ue.label, T[3] = x; - const xn = T[23]; - g = (ue.anchorX - xn) * this.pixelRatio, T[4] = g; - const ve = T[24]; - m = (ue.anchorY - ve) * this.pixelRatio, T[5] = m, hs = x.height, T[6] = hs, te = x.width, T[13] = te; + x = re.label, b[3] = x; + const an = b[23]; + g = (re.anchorX - an) * this.pixelRatio, b[4] = g; + const ge = b[24]; + m = (re.anchorY - ge) * this.pixelRatio, b[5] = m, Yn = x.height, b[6] = Yn, jt = x.width, b[13] = jt; } - let Ye; - T.length > 25 && (Ye = T[25]); - let yn, Gi, gi; - T.length > 17 ? (yn = T[16], Gi = T[17], gi = T[18]) : (yn = Ui, Gi = !1, gi = !1), vr && N ? pn += gt : !vr && !N && (pn -= gt); - let vn = 0; + let Be; + b.length > 25 && (Be = b[25]); + let rn, Si, ri; + b.length > 17 ? (rn = b[16], Si = b[17], ri = b[18]) : (rn = Ai, Si = !1, ri = !1), rr && F ? sn += ft : !rr && !F && (sn -= ft); + let on = 0; for (; d < f; d += 2) { - if (Ye && Ye[vn++] < te / this.pixelRatio) + if (Be && Be[on++] < jt / this.pixelRatio) continue; - const ue = this.calculateImageOrLabelDimensions_( + const re = this.calculateImageOrLabelDimensions_( x.width, x.height, h[d], h[d + 1], - te, - hs, + jt, + Yn, g, m, - pr, - yr, - pn, - Yo, + nr, + sr, + sn, + Lo, r, - yn, - Gi || gi, - it - ), xn = [ + rn, + Si || ri, + tt + ), an = [ t, e, x, - ue, - fi, - Gi ? V : null, - gi ? L : null + re, + si, + Si ? U : null, + ri ? T : null ]; if (l) { - if (ye === "none") + if (fe === "none") continue; - if (ye === "obstacle") { - l.insert(ue.declutterBox); + if (fe === "obstacle") { + l.insert(re.declutterBox); continue; } else { - let ve, je; - if (Te) { - const de = f - d; - if (!Te[de]) { - Te[de] = xn; + let ge, ze; + if (ve) { + const oe = f - d; + if (!ve[oe]) { + ve[oe] = an; continue; } - if (ve = Te[de], delete Te[de], je = mc(ve), l.collides(je)) + if (ge = ve[oe], delete ve[oe], ze = Vh(ge), l.collides(ze)) continue; } - if (l.collides(ue.declutterBox)) + if (l.collides(re.declutterBox)) continue; - ve && (l.insert(je), this.replayImageOrLabel_.apply(this, ve)), l.insert(ue.declutterBox); + ge && (l.insert(ze), this.replayImageOrLabel_.apply(this, ge)), l.insert(re.declutterBox); } } - this.replayImageOrLabel_.apply(this, xn); + this.replayImageOrLabel_.apply(this, an); } ++c; break; - case W.DRAW_CHARS: - const xr = T[1], Yt = T[2], jo = T[3], mg = T[4]; - b = T[5]; - const _g = T[6], xh = T[7], Ch = T[8]; - R = T[9]; - const qo = T[10]; - C = T[11], E = T[12]; - const Mh = [ - T[13], - T[13] - ], Ko = this.textStates[E], cs = Ko.font, us = [ - Ko.scale[0] * xh, - Ko.scale[1] * xh + case V.DRAW_CHARS: + const or = b[1], Zt = b[2], To = b[3], Bf = b[4]; + L = b[5]; + const zf = b[6], Xl = b[7], Yl = b[8]; + R = b[9]; + const Io = b[10]; + M = b[11], E = b[12]; + const jl = [ + b[13], + b[13] + ], Ao = this.textStates[E], jn = Ao.font, Kn = [ + Ao.scale[0] * Xl, + Ao.scale[1] * Xl ]; - let ds; - cs in this.widths_ ? ds = this.widths_[cs] : (ds = {}, this.widths_[cs] = ds); - const Eh = Bd(h, xr, Yt, 2), wh = Math.abs(us[0]) * Hh(cs, C, ds); - if (mg || wh <= Eh) { - const ue = this.textStates[E].textAlign, xn = (Eh - wh) * bs[ue], ve = r_( + let qn; + jn in this.widths_ ? qn = this.widths_[jn] : (qn = {}, this.widths_[jn] = qn); + const Kl = gd(h, or, Zt, 2), ql = Math.abs(Kn[0]) * vh(jn, M, qn); + if (Bf || ql <= Kl) { + const re = this.textStates[E].textAlign, an = (Kl - ql) * ds[re], ge = Lm( h, - xr, - Yt, + or, + Zt, 2, - C, - xn, - _g, - Math.abs(us[0]), - Hh, - cs, - ds, - N ? 0 : this.viewRotation_ + M, + an, + zf, + Math.abs(Kn[0]), + vh, + jn, + qn, + F ? 0 : this.viewRotation_ ); t: - if (ve) { - const je = []; - let de, Cr, Mr, ee, xe; + if (ge) { + const ze = []; + let oe, ar, lr, Kt, me; if (R) - for (de = 0, Cr = ve.length; de < Cr; ++de) { - xe = ve[de], Mr = xe[4], ee = this.createLabel(Mr, E, "", R), g = xe[2] + (us[0] < 0 ? -qo : qo), m = jo * ee.height + (0.5 - jo) * 2 * qo * us[1] / us[0] - Ch; - const qe = this.calculateImageOrLabelDimensions_( - ee.width, - ee.height, - xe[0], - xe[1], - ee.width, - ee.height, + for (oe = 0, ar = ge.length; oe < ar; ++oe) { + me = ge[oe], lr = me[4], Kt = this.createLabel(lr, E, "", R), g = me[2] + (Kn[0] < 0 ? -Io : Io), m = To * Kt.height + (0.5 - To) * 2 * Io * Kn[1] / Kn[0] - Yl; + const Ze = this.calculateImageOrLabelDimensions_( + Kt.width, + Kt.height, + me[0], + me[1], + Kt.width, + Kt.height, g, m, 0, 0, - xe[3], - Mh, + me[3], + jl, !1, - Ui, + Ai, !1, - it + tt ); - if (l && l.collides(qe.declutterBox)) + if (l && l.collides(Ze.declutterBox)) break t; - je.push([ + ze.push([ t, e, - ee, - qe, + Kt, + Ze, 1, null, null ]); } - if (b) - for (de = 0, Cr = ve.length; de < Cr; ++de) { - xe = ve[de], Mr = xe[4], ee = this.createLabel(Mr, E, b, ""), g = xe[2], m = jo * ee.height - Ch; - const qe = this.calculateImageOrLabelDimensions_( - ee.width, - ee.height, - xe[0], - xe[1], - ee.width, - ee.height, + if (L) + for (oe = 0, ar = ge.length; oe < ar; ++oe) { + me = ge[oe], lr = me[4], Kt = this.createLabel(lr, E, L, ""), g = me[2], m = To * Kt.height - Yl; + const Ze = this.calculateImageOrLabelDimensions_( + Kt.width, + Kt.height, + me[0], + me[1], + Kt.width, + Kt.height, g, m, 0, 0, - xe[3], - Mh, + me[3], + jl, !1, - Ui, + Ai, !1, - it + tt ); - if (l && l.collides(qe.declutterBox)) + if (l && l.collides(Ze.declutterBox)) break t; - je.push([ + ze.push([ t, e, - ee, - qe, + Kt, + Ze, 1, null, null ]); } - l && l.load(je.map(mc)); - for (let qe = 0, pg = je.length; qe < pg; ++qe) - this.replayImageOrLabel_.apply(this, je[qe]); + l && l.load(ze.map(Vh)); + for (let Ze = 0, Zf = ze.length; Ze < Zf; ++Ze) + this.replayImageOrLabel_.apply(this, ze[Ze]); } } ++c; break; - case W.END_GEOMETRY: + case V.END_GEOMETRY: if (o !== void 0) { - it = T[1]; - const ue = o(it, At); - if (ue) - return ue; + tt = b[1]; + const re = o(tt, Pt); + if (re) + return re; } ++c; break; - case W.FILL: - P ? F++ : this.fill_(t), ++c; + case V.FILL: + A ? N++ : this.fill_(t), ++c; break; - case W.MOVE_TO_LINE_TO: - for (d = T[1], f = T[2], wt = h[d], yt = h[d + 1], p = wt + 0.5 | 0, v = yt + 0.5 | 0, (p !== _ || v !== y) && (t.moveTo(wt, yt), _ = p, y = v), d += 2; d < f; d += 2) - wt = h[d], yt = h[d + 1], p = wt + 0.5 | 0, v = yt + 0.5 | 0, (d == f - 2 || p !== _ || v !== y) && (t.lineTo(wt, yt), _ = p, y = v); + case V.MOVE_TO_LINE_TO: + for (d = b[1], f = b[2], Mt = h[d], _t = h[d + 1], p = Mt + 0.5 | 0, v = _t + 0.5 | 0, (p !== _ || v !== y) && (t.moveTo(Mt, _t), _ = p, y = v), d += 2; d < f; d += 2) + Mt = h[d], _t = h[d + 1], p = Mt + 0.5 | 0, v = _t + 0.5 | 0, (d == f - 2 || p !== _ || v !== y) && (t.lineTo(Mt, _t), _ = p, y = v); ++c; break; - case W.SET_FILL_STYLE: - V = T, this.alignFill_ = T[2], F && (this.fill_(t), F = 0, G && (t.stroke(), G = 0)), t.fillStyle = T[1], ++c; + case V.SET_FILL_STYLE: + U = b, this.alignFill_ = b[2], N && (this.fill_(t), N = 0, G && (t.stroke(), G = 0)), t.fillStyle = b[1], ++c; break; - case W.SET_STROKE_STYLE: - L = T, G && (t.stroke(), G = 0), this.setStrokeStyle_(t, T), ++c; + case V.SET_STROKE_STYLE: + T = b, G && (t.stroke(), G = 0), this.setStrokeStyle_(t, b), ++c; break; - case W.STROKE: - P ? G++ : t.stroke(), ++c; + case V.STROKE: + A ? G++ : t.stroke(), ++c; break; default: ++c; break; } } - F && this.fill_(t), G && t.stroke(); + N && this.fill_(t), G && t.stroke(); } - execute(t, e, i, s, r, o) { + execute(t, e, n, s, r, o) { this.viewRotation_ = s, this.execute_( t, e, - i, + n, this.instructions, r, void 0, @@ -9554,8 +9467,8 @@ class l_ { o ); } - executeHitDetection(t, e, i, s, r) { - return this.viewRotation_ = i, this.execute_( + executeHitDetection(t, e, n, s, r) { + return this.viewRotation_ = n, this.execute_( t, 1, e, @@ -9566,23 +9479,23 @@ class l_ { ); } } -const h_ = l_, da = ["Polygon", "Circle", "LineString", "Image", "Text", "Default"]; -class c_ { - constructor(t, e, i, s, r, o) { - this.maxExtent_ = t, this.overlaps_ = s, this.pixelRatio_ = i, this.resolution_ = e, this.renderBuffer_ = o, this.executorsByZIndex_ = {}, this.hitDetectionContext_ = null, this.hitDetectionTransform_ = $e(), this.createExecutors_(r); +const Pm = Am, Ho = ["Polygon", "Circle", "LineString", "Image", "Text", "Default"]; +class Om { + constructor(t, e, n, s, r, o) { + this.maxExtent_ = t, this.overlaps_ = s, this.pixelRatio_ = n, this.resolution_ = e, this.renderBuffer_ = o, this.executorsByZIndex_ = {}, this.hitDetectionContext_ = null, this.hitDetectionTransform_ = Pe(), this.createExecutors_(r); } clip(t, e) { - const i = this.getClipCoords(e); - t.beginPath(), t.moveTo(i[0], i[1]), t.lineTo(i[2], i[3]), t.lineTo(i[4], i[5]), t.lineTo(i[6], i[7]), t.clip(); + const n = this.getClipCoords(e); + t.beginPath(), t.moveTo(n[0], n[1]), t.lineTo(n[2], n[3]), t.lineTo(n[4], n[5]), t.lineTo(n[6], n[7]), t.clip(); } createExecutors_(t) { for (const e in t) { - let i = this.executorsByZIndex_[e]; - i === void 0 && (i = {}, this.executorsByZIndex_[e] = i); + let n = this.executorsByZIndex_[e]; + n === void 0 && (n = {}, this.executorsByZIndex_[e] = n); const s = t[e]; for (const r in s) { const o = s[r]; - i[r] = new h_( + n[r] = new Pm( this.resolution_, this.pixelRatio_, this.overlaps_, @@ -9593,50 +9506,50 @@ class c_ { } hasExecutors(t) { for (const e in this.executorsByZIndex_) { - const i = this.executorsByZIndex_[e]; + const n = this.executorsByZIndex_[e]; for (let s = 0, r = t.length; s < r; ++s) - if (t[s] in i) + if (t[s] in n) return !0; } return !1; } - forEachFeatureAtCoordinate(t, e, i, s, r, o) { + forEachFeatureAtCoordinate(t, e, n, s, r, o) { s = Math.round(s); - const a = s * 2 + 1, l = Ii( + const a = s * 2 + 1, l = xi( this.hitDetectionTransform_, s + 0.5, s + 0.5, 1 / e, -1 / e, - -i, + -n, -t[0], -t[1] ), h = !this.hitDetectionContext_; - h && (this.hitDetectionContext_ = pe( + h && (this.hitDetectionContext_ = de( a, a )); const c = this.hitDetectionContext_; c.canvas.width !== a || c.canvas.height !== a ? (c.canvas.width = a, c.canvas.height = a) : h || c.clearRect(0, 0, a, a); let u; - this.renderBuffer_ !== void 0 && (u = se(), Ss(u, t), Js( + this.renderBuffer_ !== void 0 && (u = ue(), hs(u, t), oo( u, e * (this.renderBuffer_ + s), u )); - const d = u_(s); + const d = Nm(s); let f; - function g(C, E) { + function g(M, E) { const R = c.getImageData( 0, 0, a, a ).data; - for (let b = 0, F = d.length; b < F; b++) - if (R[d[b]] > 0) { - if (!o || f !== "Image" && f !== "Text" || o.includes(C)) { - const G = (d[b] - 3) / 4, V = s - G % a, L = s - (G / a | 0), $ = r(C, E, V * V + L * L); + for (let L = 0, N = d.length; L < N; L++) + if (R[d[L]] > 0) { + if (!o || f !== "Image" && f !== "Text" || o.includes(M)) { + const G = (d[L] - 3) / 4, U = s - G % a, T = s - (G / a | 0), $ = r(M, E, U * U + T * T); if ($) return $; } @@ -9645,15 +9558,15 @@ class c_ { } } const m = Object.keys(this.executorsByZIndex_).map(Number); - m.sort(tn); + m.sort(Zi); let _, y, p, v, x; for (_ = m.length - 1; _ >= 0; --_) { - const C = m[_].toString(); - for (p = this.executorsByZIndex_[C], y = da.length - 1; y >= 0; --y) - if (f = da[y], v = p[f], v !== void 0 && (x = v.executeHitDetection( + const M = m[_].toString(); + for (p = this.executorsByZIndex_[M], y = Ho.length - 1; y >= 0; --y) + if (f = Ho[y], v = p[f], v !== void 0 && (x = v.executeHitDetection( c, l, - i, + n, g, u ), x)) @@ -9664,15 +9577,15 @@ class c_ { const e = this.maxExtent_; if (!e) return null; - const i = e[0], s = e[1], r = e[2], o = e[3], a = [i, s, i, o, r, o, r, s]; - return Ki(a, 0, 8, 2, t, a), a; + const n = e[0], s = e[1], r = e[2], o = e[3], a = [n, s, n, o, r, o, r, s]; + return $i(a, 0, 8, 2, t, a), a; } isEmpty() { - return Hn(this.executorsByZIndex_); + return An(this.executorsByZIndex_); } - execute(t, e, i, s, r, o, a) { + execute(t, e, n, s, r, o, a) { const l = Object.keys(this.executorsByZIndex_).map(Number); - l.sort(tn), this.maxExtent_ && (t.save(), this.clip(t, i)), o = o || da; + l.sort(Zi), this.maxExtent_ && (t.save(), this.clip(t, n)), o = o || Ho; let h, c, u, d, f, g; for (a && l.reverse(), h = 0, c = l.length; h < c; ++h) { const m = l[h].toString(); @@ -9681,7 +9594,7 @@ class c_ { g = f[_], g !== void 0 && g.execute( t, e, - i, + n, s, r, a @@ -9691,36 +9604,36 @@ class c_ { this.maxExtent_ && t.restore(); } } -const fa = {}; -function u_(n) { - if (fa[n] !== void 0) - return fa[n]; - const t = n * 2 + 1, e = n * n, i = new Array(e + 1); - for (let r = 0; r <= n; ++r) - for (let o = 0; o <= n; ++o) { +const Xo = {}; +function Nm(i) { + if (Xo[i] !== void 0) + return Xo[i]; + const t = i * 2 + 1, e = i * i, n = new Array(e + 1); + for (let r = 0; r <= i; ++r) + for (let o = 0; o <= i; ++o) { const a = r * r + o * o; if (a > e) break; - let l = i[a]; - l || (l = [], i[a] = l), l.push(((n + r) * t + (n + o)) * 4 + 3), r > 0 && l.push(((n - r) * t + (n + o)) * 4 + 3), o > 0 && (l.push(((n + r) * t + (n - o)) * 4 + 3), r > 0 && l.push(((n - r) * t + (n - o)) * 4 + 3)); + let l = n[a]; + l || (l = [], n[a] = l), l.push(((i + r) * t + (i + o)) * 4 + 3), r > 0 && l.push(((i - r) * t + (i + o)) * 4 + 3), o > 0 && (l.push(((i + r) * t + (i - o)) * 4 + 3), r > 0 && l.push(((i - r) * t + (i - o)) * 4 + 3)); } const s = []; - for (let r = 0, o = i.length; r < o; ++r) - i[r] && s.push(...i[r]); - return fa[n] = s, s; + for (let r = 0, o = n.length; r < o; ++r) + n[r] && s.push(...n[r]); + return Xo[i] = s, s; } -const pc = c_; -class d_ extends Xd { - constructor(t, e, i, s, r, o, a) { - super(), this.context_ = t, this.pixelRatio_ = e, this.extent_ = i, this.transform_ = s, this.viewRotation_ = r, this.squaredTolerance_ = o, this.userTransform_ = a, this.contextFillState_ = null, this.contextStrokeState_ = null, this.contextTextState_ = null, this.fillState_ = null, this.strokeState_ = null, this.image_ = null, this.imageAnchorX_ = 0, this.imageAnchorY_ = 0, this.imageHeight_ = 0, this.imageOpacity_ = 0, this.imageOriginX_ = 0, this.imageOriginY_ = 0, this.imageRotateWithView_ = !1, this.imageRotation_ = 0, this.imageScale_ = [0, 0], this.imageWidth_ = 0, this.text_ = "", this.textOffsetX_ = 0, this.textOffsetY_ = 0, this.textRotateWithView_ = !1, this.textRotation_ = 0, this.textScale_ = [0, 0], this.textFillState_ = null, this.textStrokeState_ = null, this.textState_ = null, this.pixelCoordinates_ = [], this.tmpLocalTransform_ = $e(); +const Hh = Om; +class Fm extends xd { + constructor(t, e, n, s, r, o, a) { + super(), this.context_ = t, this.pixelRatio_ = e, this.extent_ = n, this.transform_ = s, this.viewRotation_ = r, this.squaredTolerance_ = o, this.userTransform_ = a, this.contextFillState_ = null, this.contextStrokeState_ = null, this.contextTextState_ = null, this.fillState_ = null, this.strokeState_ = null, this.image_ = null, this.imageAnchorX_ = 0, this.imageAnchorY_ = 0, this.imageHeight_ = 0, this.imageOpacity_ = 0, this.imageOriginX_ = 0, this.imageOriginY_ = 0, this.imageRotateWithView_ = !1, this.imageRotation_ = 0, this.imageScale_ = [0, 0], this.imageWidth_ = 0, this.text_ = "", this.textOffsetX_ = 0, this.textOffsetY_ = 0, this.textRotateWithView_ = !1, this.textRotation_ = 0, this.textScale_ = [0, 0], this.textFillState_ = null, this.textStrokeState_ = null, this.textState_ = null, this.pixelCoordinates_ = [], this.tmpLocalTransform_ = Pe(); } - drawImages_(t, e, i, s) { + drawImages_(t, e, n, s) { if (!this.image_) return; - const r = Ki( + const r = $i( t, e, - i, + n, s, this.transform_, this.pixelCoordinates_ @@ -9732,7 +9645,7 @@ class d_ extends Xd { const d = r[c] - this.imageAnchorX_, f = r[c + 1] - this.imageAnchorY_; if (h !== 0 || this.imageScale_[0] != 1 || this.imageScale_[1] != 1) { const g = d + this.imageAnchorX_, m = f + this.imageAnchorY_; - Ii( + xi( a, g, m, @@ -9767,29 +9680,29 @@ class d_ extends Xd { } this.imageOpacity_ != 1 && (o.globalAlpha = l); } - drawText_(t, e, i, s) { + drawText_(t, e, n, s) { if (!this.textState_ || this.text_ === "") return; this.textFillState_ && this.setContextFillState_(this.textFillState_), this.textStrokeState_ && this.setContextStrokeState_(this.textStrokeState_), this.setContextTextState_(this.textState_); - const r = Ki( + const r = $i( t, e, - i, + n, s, this.transform_, this.pixelCoordinates_ ), o = this.context_; let a = this.textRotation_; - for (this.textRotateWithView_ && (a += this.viewRotation_); e < i; e += s) { + for (this.textRotateWithView_ && (a += this.viewRotation_); e < n; e += s) { const l = r[e] + this.textOffsetX_, h = r[e + 1] + this.textOffsetY_; a !== 0 || this.textScale_[0] != 1 || this.textScale_[1] != 1 ? (o.translate(l - this.textOffsetX_, h - this.textOffsetY_), o.rotate(a), o.translate(this.textOffsetX_, this.textOffsetY_), o.scale(this.textScale_[0], this.textScale_[1]), this.textStrokeState_ && o.strokeText(this.text_, 0, 0), this.textFillState_ && o.fillText(this.text_, 0, 0), o.setTransform(1, 0, 0, 1, 0, 0)) : (this.textStrokeState_ && o.strokeText(this.text_, l, h), this.textFillState_ && o.fillText(this.text_, l, h)); } } - moveToLineTo_(t, e, i, s, r) { - const o = this.context_, a = Ki( + moveToLineTo_(t, e, n, s, r) { + const o = this.context_, a = $i( t, e, - i, + n, s, this.transform_, this.pixelCoordinates_ @@ -9799,28 +9712,28 @@ class d_ extends Xd { r && (l -= 2); for (let h = 2; h < l; h += 2) o.lineTo(a[h], a[h + 1]); - return r && o.closePath(), i; + return r && o.closePath(), n; } - drawRings_(t, e, i, s) { - for (let r = 0, o = i.length; r < o; ++r) + drawRings_(t, e, n, s) { + for (let r = 0, o = n.length; r < o; ++r) e = this.moveToLineTo_( t, e, - i[r], + n[r], s, !0 ); return e; } drawCircle(t) { - if (!!Kt(this.extent_, t.getExtent())) { + if (!!Qt(this.extent_, t.getExtent())) { if (this.fillState_ || this.strokeState_) { this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_); - const e = c1( + const e = Ng( t, this.transform_, this.pixelCoordinates_ - ), i = e[2] - e[0], s = e[3] - e[1], r = Math.sqrt(i * i + s * s), o = this.context_; + ), n = e[2] - e[0], s = e[3] - e[1], r = Math.sqrt(n * n + s * s), o = this.context_; o.beginPath(), o.arc( e[0], e[1], @@ -9883,42 +9796,42 @@ class d_ extends Xd { } } drawFeature(t, e) { - const i = e.getGeometryFunction()(t); - !i || !Kt(this.extent_, i.getExtent()) || (this.setStyle(e), this.drawGeometry(i)); + const n = e.getGeometryFunction()(t); + !n || !Qt(this.extent_, n.getExtent()) || (this.setStyle(e), this.drawGeometry(n)); } drawGeometryCollection(t) { const e = t.getGeometriesArray(); - for (let i = 0, s = e.length; i < s; ++i) - this.drawGeometry(e[i]); + for (let n = 0, s = e.length; n < s; ++n) + this.drawGeometry(e[n]); } drawPoint(t) { this.squaredTolerance_ && (t = t.simplifyTransformed( this.squaredTolerance_, this.userTransform_ )); - const e = t.getFlatCoordinates(), i = t.getStride(); - this.image_ && this.drawImages_(e, 0, e.length, i), this.text_ !== "" && this.drawText_(e, 0, e.length, i); + const e = t.getFlatCoordinates(), n = t.getStride(); + this.image_ && this.drawImages_(e, 0, e.length, n), this.text_ !== "" && this.drawText_(e, 0, e.length, n); } drawMultiPoint(t) { this.squaredTolerance_ && (t = t.simplifyTransformed( this.squaredTolerance_, this.userTransform_ )); - const e = t.getFlatCoordinates(), i = t.getStride(); - this.image_ && this.drawImages_(e, 0, e.length, i), this.text_ !== "" && this.drawText_(e, 0, e.length, i); + const e = t.getFlatCoordinates(), n = t.getStride(); + this.image_ && this.drawImages_(e, 0, e.length, n), this.text_ !== "" && this.drawText_(e, 0, e.length, n); } drawLineString(t) { if (this.squaredTolerance_ && (t = t.simplifyTransformed( this.squaredTolerance_, this.userTransform_ - )), !!Kt(this.extent_, t.getExtent())) { + )), !!Qt(this.extent_, t.getExtent())) { if (this.strokeState_) { this.setContextStrokeState_(this.strokeState_); - const e = this.context_, i = t.getFlatCoordinates(); + const e = this.context_, n = t.getFlatCoordinates(); e.beginPath(), this.moveToLineTo_( - i, + n, 0, - i.length, + n.length, t.getStride(), !1 ), e.stroke(); @@ -9935,13 +9848,13 @@ class d_ extends Xd { this.userTransform_ )); const e = t.getExtent(); - if (!!Kt(this.extent_, e)) { + if (!!Qt(this.extent_, e)) { if (this.strokeState_) { this.setContextStrokeState_(this.strokeState_); - const i = this.context_, s = t.getFlatCoordinates(); + const n = this.context_, s = t.getFlatCoordinates(); let r = 0; const o = t.getEnds(), a = t.getStride(); - i.beginPath(); + n.beginPath(); for (let l = 0, h = o.length; l < h; ++l) r = this.moveToLineTo_( s, @@ -9950,11 +9863,11 @@ class d_ extends Xd { a, !1 ); - i.stroke(); + n.stroke(); } if (this.text_ !== "") { - const i = t.getFlatMidpoints(); - this.drawText_(i, 0, i.length, 2); + const n = t.getFlatMidpoints(); + this.drawText_(n, 0, n.length, 2); } } } @@ -9962,7 +9875,7 @@ class d_ extends Xd { if (this.squaredTolerance_ && (t = t.simplifyTransformed( this.squaredTolerance_, this.userTransform_ - )), !!Kt(this.extent_, t.getExtent())) { + )), !!Qt(this.extent_, t.getExtent())) { if (this.strokeState_ || this.fillState_) { this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_); const e = this.context_; @@ -9983,16 +9896,16 @@ class d_ extends Xd { if (this.squaredTolerance_ && (t = t.simplifyTransformed( this.squaredTolerance_, this.userTransform_ - )), !!Kt(this.extent_, t.getExtent())) { + )), !!Qt(this.extent_, t.getExtent())) { if (this.strokeState_ || this.fillState_) { this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_); - const e = this.context_, i = t.getOrientedFlatCoordinates(); + const e = this.context_, n = t.getOrientedFlatCoordinates(); let s = 0; const r = t.getEndss(), o = t.getStride(); e.beginPath(); for (let a = 0, l = r.length; a < l; ++a) { const h = r[a]; - s = this.drawRings_(i, s, h, o); + s = this.drawRings_(n, s, h, o); } this.fillState_ && e.fill(), this.strokeState_ && e.stroke(); } @@ -10003,16 +9916,16 @@ class d_ extends Xd { } } setContextFillState_(t) { - const e = this.context_, i = this.contextFillState_; - i ? i.fillStyle != t.fillStyle && (i.fillStyle = t.fillStyle, e.fillStyle = t.fillStyle) : (e.fillStyle = t.fillStyle, this.contextFillState_ = { + const e = this.context_, n = this.contextFillState_; + n ? n.fillStyle != t.fillStyle && (n.fillStyle = t.fillStyle, e.fillStyle = t.fillStyle) : (e.fillStyle = t.fillStyle, this.contextFillState_ = { fillStyle: t.fillStyle }); } setContextStrokeState_(t) { - const e = this.context_, i = this.contextStrokeState_; - i ? (i.lineCap != t.lineCap && (i.lineCap = t.lineCap, e.lineCap = t.lineCap), Ni(i.lineDash, t.lineDash) || e.setLineDash( - i.lineDash = t.lineDash - ), i.lineDashOffset != t.lineDashOffset && (i.lineDashOffset = t.lineDashOffset, e.lineDashOffset = t.lineDashOffset), i.lineJoin != t.lineJoin && (i.lineJoin = t.lineJoin, e.lineJoin = t.lineJoin), i.lineWidth != t.lineWidth && (i.lineWidth = t.lineWidth, e.lineWidth = t.lineWidth), i.miterLimit != t.miterLimit && (i.miterLimit = t.miterLimit, e.miterLimit = t.miterLimit), i.strokeStyle != t.strokeStyle && (i.strokeStyle = t.strokeStyle, e.strokeStyle = t.strokeStyle)) : (e.lineCap = t.lineCap, e.setLineDash(t.lineDash), e.lineDashOffset = t.lineDashOffset, e.lineJoin = t.lineJoin, e.lineWidth = t.lineWidth, e.miterLimit = t.miterLimit, e.strokeStyle = t.strokeStyle, this.contextStrokeState_ = { + const e = this.context_, n = this.contextStrokeState_; + n ? (n.lineCap != t.lineCap && (n.lineCap = t.lineCap, e.lineCap = t.lineCap), Ki(n.lineDash, t.lineDash) || e.setLineDash( + n.lineDash = t.lineDash + ), n.lineDashOffset != t.lineDashOffset && (n.lineDashOffset = t.lineDashOffset, e.lineDashOffset = t.lineDashOffset), n.lineJoin != t.lineJoin && (n.lineJoin = t.lineJoin, e.lineJoin = t.lineJoin), n.lineWidth != t.lineWidth && (n.lineWidth = t.lineWidth, e.lineWidth = t.lineWidth), n.miterLimit != t.miterLimit && (n.miterLimit = t.miterLimit, e.miterLimit = t.miterLimit), n.strokeStyle != t.strokeStyle && (n.strokeStyle = t.strokeStyle, e.strokeStyle = t.strokeStyle)) : (e.lineCap = t.lineCap, e.setLineDash(t.lineDash), e.lineDashOffset = t.lineDashOffset, e.lineJoin = t.lineJoin, e.lineWidth = t.lineWidth, e.miterLimit = t.miterLimit, e.strokeStyle = t.strokeStyle, this.contextStrokeState_ = { lineCap: t.lineCap, lineDash: t.lineDash, lineDashOffset: t.lineDashOffset, @@ -10023,8 +9936,8 @@ class d_ extends Xd { }); } setContextTextState_(t) { - const e = this.context_, i = this.contextTextState_, s = t.textAlign ? t.textAlign : $s; - i ? (i.font != t.font && (i.font = t.font, e.font = t.font), i.textAlign != s && (i.textAlign = s, e.textAlign = s), i.textBaseline != t.textBaseline && (i.textBaseline = t.textBaseline, e.textBaseline = t.textBaseline)) : (e.font = t.font, e.textAlign = s, e.textBaseline = t.textBaseline, this.contextTextState_ = { + const e = this.context_, n = this.contextTextState_, s = t.textAlign ? t.textAlign : Es; + n ? (n.font != t.font && (n.font = t.font, e.font = t.font), n.textAlign != s && (n.textAlign = s, e.textAlign = s), n.textBaseline != t.textBaseline && (n.textBaseline = t.textBaseline, e.textBaseline = t.textBaseline)) : (e.font = t.font, e.textAlign = s, e.textBaseline = t.textBaseline, this.contextTextState_ = { font: t.font, textAlign: s, textBaseline: t.textBaseline @@ -10034,26 +9947,26 @@ class d_ extends Xd { if (!t) this.fillState_ = null; else { - const i = t.getColor(); + const n = t.getColor(); this.fillState_ = { - fillStyle: ke( - i || ai + fillStyle: Ie( + n || Je ) }; } if (!e) this.strokeState_ = null; else { - const i = e.getColor(), s = e.getLineCap(), r = e.getLineDash(), o = e.getLineDashOffset(), a = e.getLineJoin(), l = e.getWidth(), h = e.getMiterLimit(), c = r || Ns; + const n = e.getColor(), s = e.getLineCap(), r = e.getLineDash(), o = e.getLineDashOffset(), a = e.getLineJoin(), l = e.getWidth(), h = e.getMiterLimit(), c = r || vs; this.strokeState_ = { - lineCap: s !== void 0 ? s : no, + lineCap: s !== void 0 ? s : Gr, lineDash: this.pixelRatio_ === 1 ? c : c.map((u) => u * this.pixelRatio_), - lineDashOffset: (o || Ds) * this.pixelRatio_, - lineJoin: a !== void 0 ? a : Xn, - lineWidth: (l !== void 0 ? l : Bs) * this.pixelRatio_, - miterLimit: h !== void 0 ? h : ks, - strokeStyle: ke( - i || Gs + lineDashOffset: (o || xs) * this.pixelRatio_, + lineJoin: a !== void 0 ? a : Pn, + lineWidth: (l !== void 0 ? l : ws) * this.pixelRatio_, + miterLimit: h !== void 0 ? h : Ms, + strokeStyle: Ie( + n || Cs ) }; } @@ -10064,13 +9977,13 @@ class d_ extends Xd { this.image_ = null; return; } - const i = t.getPixelRatio(this.pixelRatio_), s = t.getAnchor(), r = t.getOrigin(); - this.image_ = t.getImage(this.pixelRatio_), this.imageAnchorX_ = s[0] * i, this.imageAnchorY_ = s[1] * i, this.imageHeight_ = e[1] * i, this.imageOpacity_ = t.getOpacity(), this.imageOriginX_ = r[0], this.imageOriginY_ = r[1], this.imageRotateWithView_ = t.getRotateWithView(), this.imageRotation_ = t.getRotation(); + const n = t.getPixelRatio(this.pixelRatio_), s = t.getAnchor(), r = t.getOrigin(); + this.image_ = t.getImage(this.pixelRatio_), this.imageAnchorX_ = s[0] * n, this.imageAnchorY_ = s[1] * n, this.imageHeight_ = e[1] * n, this.imageOpacity_ = t.getOpacity(), this.imageOriginX_ = r[0], this.imageOriginY_ = r[1], this.imageRotateWithView_ = t.getRotateWithView(), this.imageRotation_ = t.getRotation(); const o = t.getScaleArray(); this.imageScale_ = [ - o[0] * this.pixelRatio_ / i, - o[1] * this.pixelRatio_ / i - ], this.imageWidth_ = e[0] * i; + o[0] * this.pixelRatio_ / n, + o[1] * this.pixelRatio_ / n + ], this.imageWidth_ = e[0] * n; } setTextStyle(t) { if (!t) @@ -10082,33 +9995,33 @@ class d_ extends Xd { else { const f = e.getColor(); this.textFillState_ = { - fillStyle: ke( - f || ai + fillStyle: Ie( + f || Je ) }; } - const i = t.getStroke(); - if (!i) + const n = t.getStroke(); + if (!n) this.textStrokeState_ = null; else { - const f = i.getColor(), g = i.getLineCap(), m = i.getLineDash(), _ = i.getLineDashOffset(), y = i.getLineJoin(), p = i.getWidth(), v = i.getMiterLimit(); + const f = n.getColor(), g = n.getLineCap(), m = n.getLineDash(), _ = n.getLineDashOffset(), y = n.getLineJoin(), p = n.getWidth(), v = n.getMiterLimit(); this.textStrokeState_ = { - lineCap: g !== void 0 ? g : no, - lineDash: m || Ns, - lineDashOffset: _ || Ds, - lineJoin: y !== void 0 ? y : Xn, - lineWidth: p !== void 0 ? p : Bs, - miterLimit: v !== void 0 ? v : ks, - strokeStyle: ke( - f || Gs + lineCap: g !== void 0 ? g : Gr, + lineDash: m || vs, + lineDashOffset: _ || xs, + lineJoin: y !== void 0 ? y : Pn, + lineWidth: p !== void 0 ? p : ws, + miterLimit: v !== void 0 ? v : Ms, + strokeStyle: Ie( + f || Cs ) }; } const s = t.getFont(), r = t.getOffsetX(), o = t.getOffsetY(), a = t.getRotateWithView(), l = t.getRotation(), h = t.getScaleArray(), c = t.getText(), u = t.getTextAlign(), d = t.getTextBaseline(); this.textState_ = { - font: s !== void 0 ? s : cd, - textAlign: u !== void 0 ? u : $s, - textBaseline: d !== void 0 ? d : so + font: s !== void 0 ? s : $u, + textAlign: u !== void 0 ? u : Es, + textBaseline: d !== void 0 ? d : $r }, this.text_ = c !== void 0 ? Array.isArray(c) ? c.reduce((f, g, m) => f += m % 2 ? " " : g, "") : c : "", this.textOffsetX_ = r !== void 0 ? this.pixelRatio_ * r : 0, this.textOffsetY_ = o !== void 0 ? this.pixelRatio_ * o : 0, this.textRotateWithView_ = a !== void 0 ? a : !1, this.textRotation_ = l !== void 0 ? l : 0, this.textScale_ = [ this.pixelRatio_ * h[0], this.pixelRatio_ * h[1] @@ -10116,48 +10029,48 @@ class d_ extends Xd { } } } -const f_ = d_, De = 0.5; -function g_(n, t, e, i, s, r, o) { - const a = n[0] * De, l = n[1] * De, h = pe(a, l); +const Dm = Fm, Le = 0.5; +function km(i, t, e, n, s, r, o) { + const a = i[0] * Le, l = i[1] * Le, h = de(a, l); h.imageSmoothingEnabled = !1; - const c = h.canvas, u = new f_( + const c = h.canvas, u = new Dm( h, - De, + Le, s, null, o ), d = e.length, f = Math.floor((256 * 256 * 256 - 1) / d), g = {}; for (let _ = 1; _ <= d; ++_) { - const y = e[_ - 1], p = y.getStyleFunction() || i; - if (!i) + const y = e[_ - 1], p = y.getStyleFunction() || n; + if (!n) continue; let v = p(y, r); if (!v) continue; Array.isArray(v) || (v = [v]); - const C = "#" + ("000000" + (_ * f).toString(16)).slice(-6); + const M = "#" + ("000000" + (_ * f).toString(16)).slice(-6); for (let E = 0, R = v.length; E < R; ++E) { - const b = v[E], F = b.getGeometryFunction()(y); - if (!F || !Kt(s, F.getExtent())) + const L = v[E], N = L.getGeometryFunction()(y); + if (!N || !Qt(s, N.getExtent())) continue; - const G = b.clone(), V = G.getFill(); - V && V.setColor(C); - const L = G.getStroke(); - L && (L.setColor(C), L.setLineDash(null)), G.setText(void 0); - const $ = b.getImage(); + const G = L.clone(), U = G.getFill(); + U && U.setColor(M); + const T = G.getStroke(); + T && (T.setColor(M), T.setLineDash(null)), G.setText(void 0); + const $ = L.getImage(); if ($ && $.getOpacity() !== 0) { const k = $.getImageSize(); if (!k) continue; - const P = pe( + const A = de( k[0], k[1], void 0, { alpha: !1 } - ), it = P.canvas; - P.fillStyle = C, P.fillRect(0, 0, it.width, it.height), G.setImage( - new Ts({ - img: it, + ), tt = A.canvas; + A.fillStyle = M, A.fillRect(0, 0, tt.width, tt.height), G.setImage( + new us({ + img: tt, imgSize: k, anchor: $.getAnchor(), anchorXUnits: "pixels", @@ -10171,101 +10084,101 @@ function g_(n, t, e, i, s, r, o) { }) ); } - const gt = G.getZIndex() || 0; - let N = g[gt]; - N || (N = {}, g[gt] = N, N.Polygon = [], N.Circle = [], N.LineString = [], N.Point = []), N[F.getType().replace("Multi", "")].push( - F, + const ft = G.getZIndex() || 0; + let F = g[ft]; + F || (F = {}, g[ft] = F, F.Polygon = [], F.Circle = [], F.LineString = [], F.Point = []), F[N.getType().replace("Multi", "")].push( + N, G ); } } - const m = Object.keys(g).map(Number).sort(tn); + const m = Object.keys(g).map(Number).sort(Zi); for (let _ = 0, y = m.length; _ < y; ++_) { const p = g[m[_]]; for (const v in p) { const x = p[v]; - for (let C = 0, E = x.length; C < E; C += 2) { - u.setStyle(x[C + 1]); - for (let R = 0, b = t.length; R < b; ++R) - u.setTransform(t[R]), u.drawGeometry(x[C]); + for (let M = 0, E = x.length; M < E; M += 2) { + u.setStyle(x[M + 1]); + for (let R = 0, L = t.length; R < L; ++R) + u.setTransform(t[R]), u.drawGeometry(x[M]); } } } return h.getImageData(0, 0, c.width, c.height); } -function m_(n, t, e) { - const i = []; +function Gm(i, t, e) { + const n = []; if (e) { - const s = Math.floor(Math.round(n[0]) * De), r = Math.floor(Math.round(n[1]) * De), o = (Et(s, 0, e.width - 1) + Et(r, 0, e.height - 1) * e.width) * 4, a = e.data[o], l = e.data[o + 1], c = e.data[o + 2] + 256 * (l + 256 * a), u = Math.floor((256 * 256 * 256 - 1) / t.length); - c && c % u === 0 && i.push(t[c / u - 1]); + const s = Math.floor(Math.round(i[0]) * Le), r = Math.floor(Math.round(i[1]) * Le), o = (wt(s, 0, e.width - 1) + wt(r, 0, e.height - 1) * e.width) * 4, a = e.data[o], l = e.data[o + 1], c = e.data[o + 2] + 256 * (l + 256 * a), u = Math.floor((256 * 256 * 256 - 1) / t.length); + c && c % u === 0 && n.push(t[c / u - 1]); } - return i; + return n; } -const __ = 0.5, jd = { - Point: S_, - LineString: M_, - Polygon: T_, - MultiPoint: R_, - MultiLineString: E_, - MultiPolygon: w_, - GeometryCollection: C_, - Circle: v_ +const $m = 0.5, Cd = { + Point: Ym, + LineString: Wm, + Polygon: Km, + MultiPoint: jm, + MultiLineString: Hm, + MultiPolygon: Xm, + GeometryCollection: Vm, + Circle: Zm }; -function p_(n, t) { - return parseInt(q(n), 10) - parseInt(q(t), 10); +function Bm(i, t) { + return parseInt(rt(i), 10) - parseInt(rt(t), 10); } -function y_(n, t) { - const e = Ha(n, t); +function zm(i, t) { + const e = Ea(i, t); return e * e; } -function Ha(n, t) { - return __ * n / t; +function Ea(i, t) { + return $m * i / t; } -function v_(n, t, e, i, s) { +function Zm(i, t, e, n, s) { const r = e.getFill(), o = e.getStroke(); if (r || o) { - const l = n.getBuilder(e.getZIndex(), "Circle"); - l.setFillStrokeStyle(r, o), l.drawCircle(t, i); + const l = i.getBuilder(e.getZIndex(), "Circle"); + l.setFillStrokeStyle(r, o), l.drawCircle(t, n); } const a = e.getText(); if (a && a.getText()) { - const l = (s || n).getBuilder( + const l = (s || i).getBuilder( e.getZIndex(), "Text" ); - l.setTextStyle(a), l.drawText(t, i); + l.setTextStyle(a), l.drawText(t, n); } } -function yc(n, t, e, i, s, r, o) { +function Xh(i, t, e, n, s, r, o) { let a = !1; const l = e.getImage(); if (l) { const h = l.getImageState(); - h == Pt.LOADED || h == Pt.ERROR ? l.unlistenImageChange(s) : (h == Pt.IDLE && l.load(), l.listenImageChange(s), a = !0); + h == It.LOADED || h == It.ERROR ? l.unlistenImageChange(s) : (h == It.IDLE && l.load(), l.listenImageChange(s), a = !0); } - return x_( - n, + return Um( + i, t, e, - i, + n, r, o ), a; } -function x_(n, t, e, i, s, r) { +function Um(i, t, e, n, s, r) { const o = e.getGeometryFunction()(t); if (!o) return; const a = o.simplifyTransformed( - i, + n, s ); if (e.getRenderer()) - qd(n, a, e, t); + Ed(i, a, e, t); else { - const h = jd[a.getType()]; + const h = Cd[a.getType()]; h( - n, + i, a, e, t, @@ -10273,101 +10186,101 @@ function x_(n, t, e, i, s, r) { ); } } -function qd(n, t, e, i) { +function Ed(i, t, e, n) { if (t.getType() == "GeometryCollection") { const r = t.getGeometries(); for (let o = 0, a = r.length; o < a; ++o) - qd(n, r[o], e, i); + Ed(i, r[o], e, n); return; } - n.getBuilder(e.getZIndex(), "Default").drawCustom( + i.getBuilder(e.getZIndex(), "Default").drawCustom( t, - i, + n, e.getRenderer(), e.getHitDetectionRenderer() ); } -function C_(n, t, e, i, s) { +function Vm(i, t, e, n, s) { const r = t.getGeometriesArray(); let o, a; for (o = 0, a = r.length; o < a; ++o) { - const l = jd[r[o].getType()]; + const l = Cd[r[o].getType()]; l( - n, + i, r[o], e, - i, + n, s ); } } -function M_(n, t, e, i, s) { +function Wm(i, t, e, n, s) { const r = e.getStroke(); if (r) { - const a = n.getBuilder( + const a = i.getBuilder( e.getZIndex(), "LineString" ); - a.setFillStrokeStyle(null, r), a.drawLineString(t, i); + a.setFillStrokeStyle(null, r), a.drawLineString(t, n); } const o = e.getText(); if (o && o.getText()) { - const a = (s || n).getBuilder( + const a = (s || i).getBuilder( e.getZIndex(), "Text" ); - a.setTextStyle(o), a.drawText(t, i); + a.setTextStyle(o), a.drawText(t, n); } } -function E_(n, t, e, i, s) { +function Hm(i, t, e, n, s) { const r = e.getStroke(); if (r) { - const a = n.getBuilder( + const a = i.getBuilder( e.getZIndex(), "LineString" ); - a.setFillStrokeStyle(null, r), a.drawMultiLineString(t, i); + a.setFillStrokeStyle(null, r), a.drawMultiLineString(t, n); } const o = e.getText(); if (o && o.getText()) { - const a = (s || n).getBuilder( + const a = (s || i).getBuilder( e.getZIndex(), "Text" ); - a.setTextStyle(o), a.drawText(t, i); + a.setTextStyle(o), a.drawText(t, n); } } -function w_(n, t, e, i, s) { +function Xm(i, t, e, n, s) { const r = e.getFill(), o = e.getStroke(); if (o || r) { - const l = n.getBuilder(e.getZIndex(), "Polygon"); - l.setFillStrokeStyle(r, o), l.drawMultiPolygon(t, i); + const l = i.getBuilder(e.getZIndex(), "Polygon"); + l.setFillStrokeStyle(r, o), l.drawMultiPolygon(t, n); } const a = e.getText(); if (a && a.getText()) { - const l = (s || n).getBuilder( + const l = (s || i).getBuilder( e.getZIndex(), "Text" ); - l.setTextStyle(a), l.drawText(t, i); + l.setTextStyle(a), l.drawText(t, n); } } -function S_(n, t, e, i, s) { +function Ym(i, t, e, n, s) { const r = e.getImage(), o = e.getText(); let a; if (r) { - if (r.getImageState() != Pt.LOADED) + if (r.getImageState() != It.LOADED) return; - let l = n; + let l = i; if (s) { const c = r.getDeclutterMode(); if (c !== "none") if (l = s, c === "obstacle") { - const u = n.getBuilder( + const u = i.getBuilder( e.getZIndex(), "Image" ); - u.setImageStyle(r, a), u.drawPoint(t, i); + u.setImageStyle(r, a), u.drawPoint(t, n); } else o && o.getText() && (a = {}); } @@ -10375,31 +10288,31 @@ function S_(n, t, e, i, s) { e.getZIndex(), "Image" ); - h.setImageStyle(r, a), h.drawPoint(t, i); + h.setImageStyle(r, a), h.drawPoint(t, n); } if (o && o.getText()) { - let l = n; + let l = i; s && (l = s); const h = l.getBuilder(e.getZIndex(), "Text"); - h.setTextStyle(o, a), h.drawText(t, i); + h.setTextStyle(o, a), h.drawText(t, n); } } -function R_(n, t, e, i, s) { +function jm(i, t, e, n, s) { const r = e.getImage(), o = e.getText(); let a; if (r) { - if (r.getImageState() != Pt.LOADED) + if (r.getImageState() != It.LOADED) return; - let l = n; + let l = i; if (s) { const c = r.getDeclutterMode(); if (c !== "none") if (l = s, c === "obstacle") { - const u = n.getBuilder( + const u = i.getBuilder( e.getZIndex(), "Image" ); - u.setImageStyle(r, a), u.drawMultiPoint(t, i); + u.setImageStyle(r, a), u.drawMultiPoint(t, n); } else o && o.getText() && (a = {}); } @@ -10407,37 +10320,37 @@ function R_(n, t, e, i, s) { e.getZIndex(), "Image" ); - h.setImageStyle(r, a), h.drawMultiPoint(t, i); + h.setImageStyle(r, a), h.drawMultiPoint(t, n); } if (o && o.getText()) { - let l = n; + let l = i; s && (l = s); const h = l.getBuilder(e.getZIndex(), "Text"); - h.setTextStyle(o, a), h.drawText(t, i); + h.setTextStyle(o, a), h.drawText(t, n); } } -function T_(n, t, e, i, s) { +function Km(i, t, e, n, s) { const r = e.getFill(), o = e.getStroke(); if (r || o) { - const l = n.getBuilder(e.getZIndex(), "Polygon"); - l.setFillStrokeStyle(r, o), l.drawPolygon(t, i); + const l = i.getBuilder(e.getZIndex(), "Polygon"); + l.setFillStrokeStyle(r, o), l.drawPolygon(t, n); } const a = e.getText(); if (a && a.getText()) { - const l = (s || n).getBuilder( + const l = (s || i).getBuilder( e.getZIndex(), "Text" ); - l.setTextStyle(a), l.drawText(t, i); + l.setTextStyle(a), l.drawText(t, n); } } -class b_ extends Yd { +class qm extends Md { constructor(t) { - super(t), this.boundHandleStyleImageChange_ = this.handleStyleImageChange_.bind(this), this.animatingOrInteracting_, this.hitDetectionImageData_ = null, this.renderedFeatures_ = null, this.renderedRevision_ = -1, this.renderedResolution_ = NaN, this.renderedExtent_ = se(), this.wrappedRenderedExtent_ = se(), this.renderedRotation_, this.renderedCenter_ = null, this.renderedProjection_ = null, this.renderedRenderOrder_ = null, this.replayGroup_ = null, this.replayGroupChanged = !0, this.declutterExecutorGroup = null, this.clipping = !0, this.compositionContext_ = null, this.opacity_ = 1; + super(t), this.boundHandleStyleImageChange_ = this.handleStyleImageChange_.bind(this), this.animatingOrInteracting_, this.hitDetectionImageData_ = null, this.renderedFeatures_ = null, this.renderedRevision_ = -1, this.renderedResolution_ = NaN, this.renderedExtent_ = ue(), this.wrappedRenderedExtent_ = ue(), this.renderedRotation_, this.renderedCenter_ = null, this.renderedProjection_ = null, this.renderedRenderOrder_ = null, this.replayGroup_ = null, this.replayGroupChanged = !0, this.declutterExecutorGroup = null, this.clipping = !0, this.compositionContext_ = null, this.opacity_ = 1; } - renderWorlds(t, e, i) { - const s = e.extent, r = e.viewState, o = r.center, a = r.resolution, l = r.projection, h = r.rotation, c = l.getExtent(), u = this.getLayer().getSource(), d = e.pixelRatio, f = e.viewHints, g = !(f[Wt.ANIMATING] || f[Wt.INTERACTING]), m = this.compositionContext_, _ = Math.round(e.size[0] * d), y = Math.round(e.size[1] * d), p = u.getWrapX() && l.canWrapX(), v = p ? pt(c) : null, x = p ? Math.ceil((s[2] - c[2]) / v) + 1 : 1; - let C = p ? Math.floor((s[0] - c[0]) / v) : 0; + renderWorlds(t, e, n) { + const s = e.extent, r = e.viewState, o = r.center, a = r.resolution, l = r.projection, h = r.rotation, c = l.getExtent(), u = this.getLayer().getSource(), d = e.pixelRatio, f = e.viewHints, g = !(f[Bt.ANIMATING] || f[Bt.INTERACTING]), m = this.compositionContext_, _ = Math.round(e.size[0] * d), y = Math.round(e.size[1] * d), p = u.getWrapX() && l.canWrapX(), v = p ? mt(c) : null, x = p ? Math.ceil((s[2] - c[2]) / v) + 1 : 1; + let M = p ? Math.floor((s[0] - c[0]) / v) : 0; do { const E = this.getRenderTransform( o, @@ -10446,7 +10359,7 @@ class b_ extends Yd { d, _, y, - C * v + M * v ); t.execute( m, @@ -10455,16 +10368,16 @@ class b_ extends Yd { h, g, void 0, - i + n ); - } while (++C < x); + } while (++M < x); } setupCompositionContext_() { if (this.opacity_ !== 1) { - const t = pe( + const t = de( this.context.canvas.width, this.context.canvas.height, - gc + Uh ); this.compositionContext_ = t; } else @@ -10473,7 +10386,7 @@ class b_ extends Yd { releaseCompositionContext_() { if (this.opacity_ !== 1) { const t = this.context.globalAlpha; - this.context.globalAlpha = this.opacity_, this.context.drawImage(this.compositionContext_.canvas, 0, 0), this.context.globalAlpha = t, hd(this.compositionContext_), gc.push(this.compositionContext_.canvas), this.compositionContext_ = null; + this.context.globalAlpha = this.opacity_, this.context.drawImage(this.compositionContext_.canvas, 0, 0), this.context.globalAlpha = t, Gu(this.compositionContext_), Uh.push(this.compositionContext_.canvas), this.compositionContext_ = null; } } renderDeclutter(t) { @@ -10484,21 +10397,21 @@ class b_ extends Yd { ), this.releaseCompositionContext_()); } renderFrame(t, e) { - const i = t.pixelRatio, s = t.layerStatesArray[t.layerIndex]; - Xg(this.pixelTransform, 1 / i, 1 / i), _l(this.inversePixelTransform, this.pixelTransform); - const r = Yu(this.pixelTransform); + const n = t.pixelRatio, s = t.layerStatesArray[t.layerIndex]; + y0(this.pixelTransform, 1 / n, 1 / n), Xa(this.inversePixelTransform, this.pixelTransform); + const r = xu(this.pixelTransform); this.useContainer(e, r, this.getBackground(t)); const o = this.context, a = o.canvas, l = this.replayGroup_, h = this.declutterExecutorGroup; if ((!l || l.isEmpty()) && (!h || h.isEmpty())) return null; - const c = Math.round(t.size[0] * i), u = Math.round(t.size[1] * i); + const c = Math.round(t.size[0] * n), u = Math.round(t.size[1] * n); a.width != c || a.height != u ? (a.width = c, a.height = u, a.style.transform !== r && (a.style.transform = r)) : this.containerReused || o.clearRect(0, 0, c, u), this.preRender(o, t); const d = t.viewState; d.projection, this.opacity_ = s.opacity, this.setupCompositionContext_(); let f = !1, g = !0; if (s.extent && this.clipping) { - const m = Mi(s.extent); - g = Kt(m, t.extent), f = g && !Vi(m, t.extent), f && this.clipUnrotated(this.compositionContext_, t, m); + const m = Pi(s.extent); + g = Qt(m, t.extent), f = g && !Ii(m, t.extent), f && this.clipUnrotated(this.compositionContext_, t, m); } return g && this.renderWorlds(l, t), f && this.compositionContext_.restore(), this.releaseCompositionContext_(), this.postRender(o, t), this.renderedRotation_ !== d.rotation && (this.renderedRotation_ = d.rotation, this.hitDetectionImageData_ = null), this.container; } @@ -10506,24 +10419,24 @@ class b_ extends Yd { return new Promise( function(e) { if (!this.hitDetectionImageData_ && !this.animatingOrInteracting_) { - const i = [this.context.canvas.width, this.context.canvas.height]; - Nt(this.pixelTransform, i); - const s = this.renderedCenter_, r = this.renderedResolution_, o = this.renderedRotation_, a = this.renderedProjection_, l = this.wrappedRenderedExtent_, h = this.getLayer(), c = [], u = i[0] * De, d = i[1] * De; + const n = [this.context.canvas.width, this.context.canvas.height]; + Ft(this.pixelTransform, n); + const s = this.renderedCenter_, r = this.renderedResolution_, o = this.renderedRotation_, a = this.renderedProjection_, l = this.wrappedRenderedExtent_, h = this.getLayer(), c = [], u = n[0] * Le, d = n[1] * Le; c.push( this.getRenderTransform( s, r, o, - De, + Le, u, d, 0 ).slice() ); const f = h.getSource(), g = a.getExtent(); - if (f.getWrapX() && a.canWrapX() && !Vi(g, l)) { + if (f.getWrapX() && a.canWrapX() && !Ii(g, l)) { let m = l[0]; - const _ = pt(g); + const _ = mt(g); let y = 0, p; for (; m < g[0]; ) --y, p = _ * y, c.push( @@ -10531,7 +10444,7 @@ class b_ extends Yd { s, r, o, - De, + Le, u, d, p @@ -10543,15 +10456,15 @@ class b_ extends Yd { s, r, o, - De, + Le, u, d, p ).slice() ), m -= _; } - this.hitDetectionImageData_ = g_( - i, + this.hitDetectionImageData_ = km( + n, c, this.renderedFeatures_, h.getStyleFunction(), @@ -10561,16 +10474,16 @@ class b_ extends Yd { ); } e( - m_(t, this.renderedFeatures_, this.hitDetectionImageData_) + Gm(t, this.renderedFeatures_, this.hitDetectionImageData_) ); }.bind(this) ); } - forEachFeatureAtCoordinate(t, e, i, s, r) { + forEachFeatureAtCoordinate(t, e, n, s, r) { if (!this.replayGroup_) return; const o = e.viewState.resolution, a = e.viewState.rotation, l = this.getLayer(), h = {}, c = function(f, g, m) { - const _ = q(f), y = h[_]; + const _ = rt(f), y = h[_]; if (y) { if (y !== !0 && m < y.distanceSq) { if (m === 0) @@ -10597,7 +10510,7 @@ class b_ extends Yd { t, o, a, - i, + n, c, f === this.declutterExecutorGroup && e.declutterTree ? e.declutterTree.all().map((g) => g.value) : null )), u; @@ -10610,113 +10523,113 @@ class b_ extends Yd { this.renderIfReadyAndVisible(); } prepareFrame(t) { - const e = this.getLayer(), i = e.getSource(); - if (!i) + const e = this.getLayer(), n = e.getSource(); + if (!n) return !1; - const s = t.viewHints[Wt.ANIMATING], r = t.viewHints[Wt.INTERACTING], o = e.getUpdateWhileAnimating(), a = e.getUpdateWhileInteracting(); + const s = t.viewHints[Bt.ANIMATING], r = t.viewHints[Bt.INTERACTING], o = e.getUpdateWhileAnimating(), a = e.getUpdateWhileInteracting(); if (this.ready && !o && s || !a && r) return this.animatingOrInteracting_ = !0, !0; this.animatingOrInteracting_ = !1; const l = t.extent, h = t.viewState, c = h.projection, u = h.resolution, d = t.pixelRatio, f = e.getRevision(), g = e.getRenderBuffer(); let m = e.getRenderOrder(); - m === void 0 && (m = p_); - const _ = h.center.slice(), y = Js( + m === void 0 && (m = Bm); + const _ = h.center.slice(), y = oo( l, g * u ), p = y.slice(), v = [y.slice()], x = c.getExtent(); - if (i.getWrapX() && c.canWrapX() && !Vi(x, t.extent)) { - const N = pt(x), k = Math.max(pt(y) / 2, N); - y[0] = x[0] - k, y[2] = x[2] + k, rd(_, c); - const P = Qu(v[0], c); - P[0] < x[0] && P[2] < x[2] ? v.push([ - P[0] + N, - P[1], - P[2] + N, - P[3] - ]) : P[0] > x[0] && P[2] > x[2] && v.push([ - P[0] - N, - P[1], - P[2] - N, - P[3] + if (n.getWrapX() && c.canWrapX() && !Ii(x, t.extent)) { + const F = mt(x), k = Math.max(mt(y) / 2, F); + y[0] = x[0] - k, y[2] = x[2] + k, Nu(_, c); + const A = bu(v[0], c); + A[0] < x[0] && A[2] < x[2] ? v.push([ + A[0] + F, + A[1], + A[2] + F, + A[3] + ]) : A[0] > x[0] && A[2] > x[2] && v.push([ + A[0] - F, + A[1], + A[2] - F, + A[3] ]); } - if (this.ready && this.renderedResolution_ == u && this.renderedRevision_ == f && this.renderedRenderOrder_ == m && Vi(this.wrappedRenderedExtent_, y)) - return Ni(this.renderedExtent_, p) || (this.hitDetectionImageData_ = null, this.renderedExtent_ = p), this.renderedCenter_ = _, this.replayGroupChanged = !1, !0; + if (this.ready && this.renderedResolution_ == u && this.renderedRevision_ == f && this.renderedRenderOrder_ == m && Ii(this.wrappedRenderedExtent_, y)) + return Ki(this.renderedExtent_, p) || (this.hitDetectionImageData_ = null, this.renderedExtent_ = p), this.renderedCenter_ = _, this.replayGroupChanged = !1, !0; this.replayGroup_ = null; - const C = new fc( - Ha(u, d), + const M = new Zh( + Ea(u, d), y, u, d ); let E; - this.getLayer().getDeclutter() && (E = new fc( - Ha(u, d), + this.getLayer().getDeclutter() && (E = new Zh( + Ea(u, d), y, u, d )); let R; - for (let N = 0, k = v.length; N < k; ++N) - i.loadFeatures(v[N], u, c); - const b = y_(u, d); - let F = !0; - const G = function(N) { + for (let F = 0, k = v.length; F < k; ++F) + n.loadFeatures(v[F], u, c); + const L = zm(u, d); + let N = !0; + const G = function(F) { let k; - const P = N.getStyleFunction() || e.getStyleFunction(); - if (P && (k = P(N, u)), k) { - const it = this.renderFeature( - N, - b, + const A = F.getStyleFunction() || e.getStyleFunction(); + if (A && (k = A(F, u)), k) { + const tt = this.renderFeature( + F, + L, k, - C, + M, R, E ); - F = F && !it; + N = N && !tt; } - }.bind(this), V = Il(y), L = i.getFeaturesInExtent(V); - m && L.sort(m); - for (let N = 0, k = L.length; N < k; ++N) - G(L[N]); - this.renderedFeatures_ = L, this.ready = F; - const $ = C.finish(), gt = new pc( + }.bind(this), U = Xu(y), T = n.getFeaturesInExtent(U); + m && T.sort(m); + for (let F = 0, k = T.length; F < k; ++F) + G(T[F]); + this.renderedFeatures_ = T, this.ready = N; + const $ = M.finish(), ft = new Hh( y, u, d, - i.getOverlaps(), + n.getOverlaps(), $, e.getRenderBuffer() ); - return E && (this.declutterExecutorGroup = new pc( + return E && (this.declutterExecutorGroup = new Hh( y, u, d, - i.getOverlaps(), + n.getOverlaps(), E.finish(), e.getRenderBuffer() - )), this.renderedResolution_ = u, this.renderedRevision_ = f, this.renderedRenderOrder_ = m, this.renderedExtent_ = p, this.wrappedRenderedExtent_ = y, this.renderedCenter_ = _, this.renderedProjection_ = c, this.replayGroup_ = gt, this.hitDetectionImageData_ = null, this.replayGroupChanged = !0, !0; + )), this.renderedResolution_ = u, this.renderedRevision_ = f, this.renderedRenderOrder_ = m, this.renderedExtent_ = p, this.wrappedRenderedExtent_ = y, this.renderedCenter_ = _, this.renderedProjection_ = c, this.replayGroup_ = ft, this.hitDetectionImageData_ = null, this.replayGroupChanged = !0, !0; } - renderFeature(t, e, i, s, r, o) { - if (!i) + renderFeature(t, e, n, s, r, o) { + if (!n) return !1; let a = !1; - if (Array.isArray(i)) - for (let l = 0, h = i.length; l < h; ++l) - a = yc( + if (Array.isArray(n)) + for (let l = 0, h = n.length; l < h; ++l) + a = Xh( s, t, - i[l], + n[l], e, this.boundHandleStyleImageChange_, r, o ) || a; else - a = yc( + a = Xh( s, t, - i, + n, e, this.boundHandleStyleImageChange_, r, @@ -10725,32 +10638,32 @@ class b_ extends Yd { return a; } } -const L_ = b_; -class I_ extends Vm { +const Jm = qm; +class Qm extends dm { constructor(t) { super(t); } createRenderer() { - return new L_(this); + return new Jm(this); } } -const Ze = I_; -class P_ { +const Vs = Qm; +class t2 { constructor(t) { - this.rbush_ = new Wd(t), this.items_ = {}; + this.rbush_ = new yd(t), this.items_ = {}; } insert(t, e) { - const i = { + const n = { minX: t[0], minY: t[1], maxX: t[2], maxY: t[3], value: e }; - this.rbush_.insert(i), this.items_[q(e)] = i; + this.rbush_.insert(n), this.items_[rt(e)] = n; } load(t, e) { - const i = new Array(e.length); + const n = new Array(e.length); for (let s = 0, r = e.length; s < r; s++) { const o = t[s], a = e[s], l = { minX: o[0], @@ -10759,17 +10672,17 @@ class P_ { maxY: o[3], value: a }; - i[s] = l, this.items_[q(a)] = l; + n[s] = l, this.items_[rt(a)] = l; } - this.rbush_.load(i); + this.rbush_.load(n); } remove(t) { - const e = q(t), i = this.items_[e]; - return delete this.items_[e], this.rbush_.remove(i) !== null; + const e = rt(t), n = this.items_[e]; + return delete this.items_[e], this.rbush_.remove(n) !== null; } update(t, e) { - const i = this.items_[q(e)], s = [i.minX, i.minY, i.maxX, i.maxY]; - Fs(s, t) || (this.remove(e), this.insert(t, e)); + const n = this.items_[rt(e)], s = [n.minX, n.minY, n.maxX, n.maxY]; + ys(s, t) || (this.remove(e), this.insert(t, e)); } getAll() { return this.rbush_.all().map(function(e) { @@ -10794,21 +10707,21 @@ class P_ { return this.forEach_(this.getInExtent(t), e); } forEach_(t, e) { - let i; + let n; for (let s = 0, r = t.length; s < r; s++) - if (i = e(t[s]), i) - return i; - return i; + if (n = e(t[s]), n) + return n; + return n; } isEmpty() { - return Hn(this.items_); + return An(this.items_); } clear() { this.rbush_.clear(), this.items_ = {}; } getExtent(t) { const e = this.rbush_.toJSON(); - return _e(e.minX, e.minY, e.maxX, e.maxY, t); + return ye(e.minX, e.minY, e.maxX, e.maxY, t); } concat(t) { this.rbush_.load(t.rbush_.all()); @@ -10816,13 +10729,13 @@ class P_ { this.items_[e] = t.items_[e]; } } -const fo = P_; -class A_ extends Oe { +const Yh = t2; +class e2 extends Se { constructor(t) { - super(), this.projection = Q(t.projection), this.attributions_ = vc(t.attributions), this.attributionsCollapsible_ = t.attributionsCollapsible !== void 0 ? t.attributionsCollapsible : !0, this.loading = !1, this.state_ = t.state !== void 0 ? t.state : "ready", this.wrapX_ = t.wrapX !== void 0 ? t.wrapX : !1, this.interpolate_ = !!t.interpolate, this.viewResolver = null, this.viewRejector = null; + super(), this.projection = J(t.projection), this.attributions_ = jh(t.attributions), this.attributionsCollapsible_ = t.attributionsCollapsible !== void 0 ? t.attributionsCollapsible : !0, this.loading = !1, this.state_ = t.state !== void 0 ? t.state : "ready", this.wrapX_ = t.wrapX !== void 0 ? t.wrapX : !1, this.interpolate_ = !!t.interpolate, this.viewResolver = null, this.viewRejector = null; const e = this; - this.viewPromise_ = new Promise(function(i, s) { - e.viewResolver = i, e.viewRejector = s; + this.viewPromise_ = new Promise(function(n, s) { + e.viewResolver = n, e.viewRejector = s; }); } getAttributions() { @@ -10835,7 +10748,7 @@ class A_ extends Oe { return this.projection; } getResolutions() { - return H(); + return W(); } getView() { return this.viewPromise_; @@ -10853,20 +10766,20 @@ class A_ extends Oe { this.changed(); } setAttributions(t) { - this.attributions_ = vc(t), this.changed(); + this.attributions_ = jh(t), this.changed(); } setState(t) { this.state_ = t, this.changed(); } } -function vc(n) { - return n ? Array.isArray(n) ? function(t) { - return n; - } : typeof n == "function" ? n : function(t) { - return [n]; +function jh(i) { + return i ? Array.isArray(i) ? function(t) { + return i; + } : typeof i == "function" ? i : function(t) { + return [i]; } : null; } -const Kd = A_, jt = { +const wd = e2, Me = { ADDFEATURE: "addfeature", CHANGEFEATURE: "changefeature", CLEAR: "clear", @@ -10875,20 +10788,20 @@ const Kd = A_, jt = { FEATURESLOADEND: "featuresloadend", FEATURESLOADERROR: "featuresloaderror" }; -function O_(n, t) { +function Sd(i, t) { return [[-1 / 0, -1 / 0, 1 / 0, 1 / 0]]; } -function F_(n, t) { - return [n]; +function i2(i, t) { + return [i]; } -let N_ = !1; -function D_(n, t, e, i, s, r, o) { +let n2 = !1; +function s2(i, t, e, n, s, r, o) { const a = new XMLHttpRequest(); a.open( "GET", - typeof n == "function" ? n(e, i, s) : n, + typeof i == "function" ? i(e, n, s) : i, !0 - ), t.getType() == "arraybuffer" && (a.responseType = "arraybuffer"), a.withCredentials = N_, a.onload = function(l) { + ), t.getType() == "arraybuffer" && (a.responseType = "arraybuffer"), a.withCredentials = n2, a.onload = function(l) { if (!a.status || a.status >= 200 && a.status < 300) { const h = t.getType(); let c; @@ -10906,28 +10819,28 @@ function D_(n, t, e, i, s, r, o) { o(); }, a.onerror = o, a.send(); } -function xc(n, t) { - return function(e, i, s, r, o) { +function Kh(i, t) { + return function(e, n, s, r, o) { const a = this; - D_( - n, + s2( + i, t, e, - i, + n, s, function(l, h) { a.addFeatures(l), r !== void 0 && r(l); }, - o || nn + o || Ui ); }; } -class pi extends Re { - constructor(t, e, i) { - super(t), this.feature = e, this.features = i; +class li extends ke { + constructor(t, e, n) { + super(t), this.feature = e, this.features = n; } } -class k_ extends Kd { +class r2 extends wd { constructor(t) { t = t || {}, super({ attributions: t.attributions, @@ -10935,62 +10848,62 @@ class k_ extends Kd { projection: void 0, state: "ready", wrapX: t.wrapX !== void 0 ? t.wrapX : !0 - }), this.on, this.once, this.un, this.loader_ = nn, this.format_ = t.format, this.overlaps_ = t.overlaps === void 0 ? !0 : t.overlaps, this.url_ = t.url, t.loader !== void 0 ? this.loader_ = t.loader : this.url_ !== void 0 && (Y(this.format_, 7), this.loader_ = xc( + }), this.on, this.once, this.un, this.loader_ = Ui, this.format_ = t.format, this.overlaps_ = t.overlaps === void 0 ? !0 : t.overlaps, this.url_ = t.url, t.loader !== void 0 ? this.loader_ = t.loader : this.url_ !== void 0 && (Y(this.format_, 7), this.loader_ = Kh( this.url_, this.format_ - )), this.strategy_ = t.strategy !== void 0 ? t.strategy : O_; + )), this.strategy_ = t.strategy !== void 0 ? t.strategy : Sd; const e = t.useSpatialIndex !== void 0 ? t.useSpatialIndex : !0; - this.featuresRtree_ = e ? new fo() : null, this.loadedExtentsRtree_ = new fo(), this.loadingExtentsCount_ = 0, this.nullGeometryFeatures_ = {}, this.idIndex_ = {}, this.uidIndex_ = {}, this.featureChangeKeys_ = {}, this.featuresCollection_ = null; - let i, s; - Array.isArray(t.features) ? s = t.features : t.features && (i = t.features, s = i.getArray()), !e && i === void 0 && (i = new Ee(s)), s !== void 0 && this.addFeaturesInternal(s), i !== void 0 && this.bindFeaturesCollection_(i); + this.featuresRtree_ = e ? new Yh() : null, this.loadedExtentsRtree_ = new Yh(), this.loadingExtentsCount_ = 0, this.nullGeometryFeatures_ = {}, this.idIndex_ = {}, this.uidIndex_ = {}, this.featureChangeKeys_ = {}, this.featuresCollection_ = null; + let n, s; + Array.isArray(t.features) ? s = t.features : t.features && (n = t.features, s = n.getArray()), !e && n === void 0 && (n = new Te(s)), s !== void 0 && this.addFeaturesInternal(s), n !== void 0 && this.bindFeaturesCollection_(n); } addFeature(t) { this.addFeatureInternal(t), this.changed(); } addFeatureInternal(t) { - const e = q(t); + const e = rt(t); if (!this.addToIndex_(e, t)) { this.featuresCollection_ && this.featuresCollection_.remove(t); return; } this.setupChangeEvents_(e, t); - const i = t.getGeometry(); - if (i) { - const s = i.getExtent(); + const n = t.getGeometry(); + if (n) { + const s = n.getExtent(); this.featuresRtree_ && this.featuresRtree_.insert(s, t); } else this.nullGeometryFeatures_[e] = t; this.dispatchEvent( - new pi(jt.ADDFEATURE, t) + new li(Me.ADDFEATURE, t) ); } setupChangeEvents_(t, e) { this.featureChangeKeys_[t] = [ - et(e, U.CHANGE, this.handleFeatureChange_, this), - et( + it(e, X.CHANGE, this.handleFeatureChange_, this), + it( e, - Wn.PROPERTYCHANGE, + In.PROPERTYCHANGE, this.handleFeatureChange_, this ) ]; } addToIndex_(t, e) { - let i = !0; + let n = !0; const s = e.getId(); - return s !== void 0 && (s.toString() in this.idIndex_ ? i = !1 : this.idIndex_[s.toString()] = e), i && (Y(!(t in this.uidIndex_), 30), this.uidIndex_[t] = e), i; + return s !== void 0 && (s.toString() in this.idIndex_ ? n = !1 : this.idIndex_[s.toString()] = e), n && (Y(!(t in this.uidIndex_), 30), this.uidIndex_[t] = e), n; } addFeatures(t) { this.addFeaturesInternal(t), this.changed(); } addFeaturesInternal(t) { - const e = [], i = [], s = []; + const e = [], n = [], s = []; for (let r = 0, o = t.length; r < o; r++) { - const a = t[r], l = q(a); - this.addToIndex_(l, a) && i.push(a); + const a = t[r], l = rt(a); + this.addToIndex_(l, a) && n.push(a); } - for (let r = 0, o = i.length; r < o; r++) { - const a = i[r], l = q(a); + for (let r = 0, o = n.length; r < o; r++) { + const a = n[r], l = rt(a); this.setupChangeEvents_(l, a); const h = a.getGeometry(); if (h) { @@ -10999,51 +10912,51 @@ class k_ extends Kd { } else this.nullGeometryFeatures_[l] = a; } - if (this.featuresRtree_ && this.featuresRtree_.load(e, s), this.hasListener(jt.ADDFEATURE)) - for (let r = 0, o = i.length; r < o; r++) + if (this.featuresRtree_ && this.featuresRtree_.load(e, s), this.hasListener(Me.ADDFEATURE)) + for (let r = 0, o = n.length; r < o; r++) this.dispatchEvent( - new pi(jt.ADDFEATURE, i[r]) + new li(Me.ADDFEATURE, n[r]) ); } bindFeaturesCollection_(t) { let e = !1; this.addEventListener( - jt.ADDFEATURE, - function(i) { - e || (e = !0, t.push(i.feature), e = !1); + Me.ADDFEATURE, + function(n) { + e || (e = !0, t.push(n.feature), e = !1); } ), this.addEventListener( - jt.REMOVEFEATURE, - function(i) { - e || (e = !0, t.remove(i.feature), e = !1); + Me.REMOVEFEATURE, + function(n) { + e || (e = !0, t.remove(n.feature), e = !1); } ), t.addEventListener( - Dt.ADD, - function(i) { - e || (e = !0, this.addFeature(i.element), e = !1); + Jt.ADD, + function(n) { + e || (e = !0, this.addFeature(n.element), e = !1); }.bind(this) ), t.addEventListener( - Dt.REMOVE, - function(i) { - e || (e = !0, this.removeFeature(i.element), e = !1); + Jt.REMOVE, + function(n) { + e || (e = !0, this.removeFeature(n.element), e = !1); }.bind(this) ), this.featuresCollection_ = t; } clear(t) { if (t) { - for (const i in this.featureChangeKeys_) - this.featureChangeKeys_[i].forEach(mt); + for (const n in this.featureChangeKeys_) + this.featureChangeKeys_[n].forEach(pt); this.featuresCollection_ || (this.featureChangeKeys_ = {}, this.idIndex_ = {}, this.uidIndex_ = {}); } else if (this.featuresRtree_) { - const i = function(s) { + const n = function(s) { this.removeFeatureInternal(s); }.bind(this); - this.featuresRtree_.forEach(i); + this.featuresRtree_.forEach(n); for (const s in this.nullGeometryFeatures_) this.removeFeatureInternal(this.nullGeometryFeatures_[s]); } this.featuresCollection_ && this.featuresCollection_.clear(), this.featuresRtree_ && this.featuresRtree_.clear(), this.nullGeometryFeatures_ = {}; - const e = new pi(jt.CLEAR); + const e = new li(Me.CLEAR); this.dispatchEvent(e), this.changed(); } forEachFeature(t) { @@ -11052,8 +10965,8 @@ class k_ extends Kd { this.featuresCollection_ && this.featuresCollection_.forEach(t); } forEachFeatureAtCoordinateDirect(t, e) { - const i = [t[0], t[1], t[0], t[1]]; - return this.forEachFeatureInExtent(i, function(s) { + const n = [t[0], t[1], t[0], t[1]]; + return this.forEachFeatureInExtent(n, function(s) { if (s.getGeometry().intersectsCoordinate(t)) return e(s); }); @@ -11066,9 +10979,9 @@ class k_ extends Kd { forEachFeatureIntersectingExtent(t, e) { return this.forEachFeatureInExtent( t, - function(i) { - if (i.getGeometry().intersectsExtent(t)) { - const r = e(i); + function(n) { + if (n.getGeometry().intersectsExtent(t)) { + const r = e(n); if (r) return r; } @@ -11080,19 +10993,19 @@ class k_ extends Kd { } getFeatures() { let t; - return this.featuresCollection_ ? t = this.featuresCollection_.getArray().slice(0) : this.featuresRtree_ && (t = this.featuresRtree_.getAll(), Hn(this.nullGeometryFeatures_) || Qt(t, Object.values(this.nullGeometryFeatures_))), t; + return this.featuresCollection_ ? t = this.featuresCollection_.getArray().slice(0) : this.featuresRtree_ && (t = this.featuresRtree_.getAll(), An(this.nullGeometryFeatures_) || Ht(t, Object.values(this.nullGeometryFeatures_))), t; } getFeaturesAtCoordinate(t) { const e = []; - return this.forEachFeatureAtCoordinateDirect(t, function(i) { - e.push(i); + return this.forEachFeatureAtCoordinateDirect(t, function(n) { + e.push(n); }), e; } getFeaturesInExtent(t, e) { if (this.featuresRtree_) { if (!(e && e.canWrapX() && this.getWrapX())) return this.featuresRtree_.getInExtent(t); - const s = e0(t, e); + const s = R0(t, e); return [].concat( ...s.map((r) => this.featuresRtree_.getInExtent(r)) ); @@ -11100,25 +11013,25 @@ class k_ extends Kd { return this.featuresCollection_ ? this.featuresCollection_.getArray().slice(0) : []; } getClosestFeatureToCoordinate(t, e) { - const i = t[0], s = t[1]; + const n = t[0], s = t[1]; let r = null; const o = [NaN, NaN]; let a = 1 / 0; const l = [-1 / 0, -1 / 0, 1 / 0, 1 / 0]; - return e = e || en, this.featuresRtree_.forEachInExtent( + return e = e || ps, this.featuresRtree_.forEachInExtent( l, function(h) { if (e(h)) { const c = h.getGeometry(), u = a; if (a = c.closestPointXY( - i, + n, s, o, a ), a < u) { r = h; const d = Math.sqrt(a); - l[0] = i - d, l[1] = s - d, l[2] = i + d, l[3] = s + d; + l[0] = n - d, l[1] = s - d, l[2] = n + d, l[3] = s + d; } } } @@ -11145,50 +11058,50 @@ class k_ extends Kd { return this.url_; } handleFeatureChange_(t) { - const e = t.target, i = q(e), s = e.getGeometry(); + const e = t.target, n = rt(e), s = e.getGeometry(); if (!s) - i in this.nullGeometryFeatures_ || (this.featuresRtree_ && this.featuresRtree_.remove(e), this.nullGeometryFeatures_[i] = e); + n in this.nullGeometryFeatures_ || (this.featuresRtree_ && this.featuresRtree_.remove(e), this.nullGeometryFeatures_[n] = e); else { const o = s.getExtent(); - i in this.nullGeometryFeatures_ ? (delete this.nullGeometryFeatures_[i], this.featuresRtree_ && this.featuresRtree_.insert(o, e)) : this.featuresRtree_ && this.featuresRtree_.update(o, e); + n in this.nullGeometryFeatures_ ? (delete this.nullGeometryFeatures_[n], this.featuresRtree_ && this.featuresRtree_.insert(o, e)) : this.featuresRtree_ && this.featuresRtree_.update(o, e); } const r = e.getId(); if (r !== void 0) { const o = r.toString(); this.idIndex_[o] !== e && (this.removeFromIdIndex_(e), this.idIndex_[o] = e); } else - this.removeFromIdIndex_(e), this.uidIndex_[i] = e; + this.removeFromIdIndex_(e), this.uidIndex_[n] = e; this.changed(), this.dispatchEvent( - new pi(jt.CHANGEFEATURE, e) + new li(Me.CHANGEFEATURE, e) ); } hasFeature(t) { const e = t.getId(); - return e !== void 0 ? e in this.idIndex_ : q(t) in this.uidIndex_; + return e !== void 0 ? e in this.idIndex_ : rt(t) in this.uidIndex_; } isEmpty() { - return this.featuresRtree_ ? this.featuresRtree_.isEmpty() && Hn(this.nullGeometryFeatures_) : this.featuresCollection_ ? this.featuresCollection_.getLength() === 0 : !0; + return this.featuresRtree_ ? this.featuresRtree_.isEmpty() && An(this.nullGeometryFeatures_) : this.featuresCollection_ ? this.featuresCollection_.getLength() === 0 : !0; } - loadFeatures(t, e, i) { - const s = this.loadedExtentsRtree_, r = this.strategy_(t, e, i); + loadFeatures(t, e, n) { + const s = this.loadedExtentsRtree_, r = this.strategy_(t, e, n); for (let o = 0, a = r.length; o < a; ++o) { const l = r[o]; s.forEachInExtent( l, function(c) { - return Vi(c.extent, l); + return Ii(c.extent, l); } ) || (++this.loadingExtentsCount_, this.dispatchEvent( - new pi(jt.FEATURESLOADSTART) + new li(Me.FEATURESLOADSTART) ), this.loader_.call( this, l, e, - i, + n, function(c) { --this.loadingExtentsCount_, this.dispatchEvent( - new pi( - jt.FEATURESLOADEND, + new li( + Me.FEATURESLOADEND, void 0, c ) @@ -11196,7 +11109,7 @@ class k_ extends Kd { }.bind(this), function() { --this.loadingExtentsCount_, this.dispatchEvent( - new pi(jt.FEATURESLOADERROR) + new li(Me.FEATURESLOADERROR) ); }.bind(this) ), s.insert(l, { extent: l.slice() })); @@ -11208,33 +11121,33 @@ class k_ extends Kd { } removeLoadedExtent(t) { const e = this.loadedExtentsRtree_; - let i; + let n; e.forEachInExtent(t, function(s) { - if (Fs(s.extent, t)) - return i = s, !0; - }), i && e.remove(i); + if (ys(s.extent, t)) + return n = s, !0; + }), n && e.remove(n); } removeFeature(t) { if (!t) return; - const e = q(t); + const e = rt(t); e in this.nullGeometryFeatures_ ? delete this.nullGeometryFeatures_[e] : this.featuresRtree_ && this.featuresRtree_.remove(t), this.removeFeatureInternal(t) && this.changed(); } removeFeatureInternal(t) { - const e = q(t), i = this.featureChangeKeys_[e]; - if (!i) + const e = rt(t), n = this.featureChangeKeys_[e]; + if (!n) return; - i.forEach(mt), delete this.featureChangeKeys_[e]; + n.forEach(pt), delete this.featureChangeKeys_[e]; const s = t.getId(); return s !== void 0 && delete this.idIndex_[s.toString()], delete this.uidIndex_[e], this.dispatchEvent( - new pi(jt.REMOVEFEATURE, t) + new li(Me.REMOVEFEATURE, t) ), t; } removeFromIdIndex_(t) { let e = !1; - for (const i in this.idIndex_) - if (this.idIndex_[i] === t) { - delete this.idIndex_[i], e = !0; + for (const n in this.idIndex_) + if (this.idIndex_[n] === t) { + delete this.idIndex_[n], e = !0; break; } return e; @@ -11243,16 +11156,16 @@ class k_ extends Kd { this.loader_ = t; } setUrl(t) { - Y(this.format_, 7), this.url_ = t, this.setLoader(xc(t, this.format_)); + Y(this.format_, 7), this.url_ = t, this.setLoader(Kh(t, this.format_)); } } -const Ve = k_; -class G_ extends So { - constructor(t, e, i) { - super(), i = i || {}, this.tileCoord = t, this.state = e, this.interimTile = null, this.key = "", this.transition_ = i.transition === void 0 ? 250 : i.transition, this.transitionStarts_ = {}, this.interpolate = !!i.interpolate; +const Ws = r2; +class o2 extends so { + constructor(t, e, n) { + super(), n = n || {}, this.tileCoord = t, this.state = e, this.interimTile = null, this.key = "", this.transition_ = n.transition === void 0 ? 250 : n.transition, this.transitionStarts_ = {}, this.interpolate = !!n.interpolate; } changed() { - this.dispatchEvent(U.CHANGE); + this.dispatchEvent(X.CHANGE); } release() { this.state === z.ERROR && this.setState(z.EMPTY); @@ -11296,18 +11209,18 @@ class G_ extends So { this.state = t, this.changed(); } load() { - H(); + W(); } getAlpha(t, e) { if (!this.transition_) return 1; - let i = this.transitionStarts_[t]; - if (!i) - i = e, this.transitionStarts_[t] = i; - else if (i === -1) + let n = this.transitionStarts_[t]; + if (!n) + n = e, this.transitionStarts_[t] = n; + else if (n === -1) return 1; - const s = e - i + 1e3 / 60; - return s >= this.transition_ ? 1 : yd(s / this.transition_); + const s = e - n + 1e3 / 60; + return s >= this.transition_ ? 1 : Yu(s / this.transition_); } inTransition(t) { return this.transition_ ? this.transitionStarts_[t] !== -1 : !1; @@ -11316,10 +11229,10 @@ class G_ extends So { this.transition_ && (this.transitionStarts_[t] = -1); } } -const Jd = G_; -class $_ extends Jd { - constructor(t, e, i, s, r, o) { - super(t, e, o), this.crossOrigin_ = s, this.src_ = i, this.key = i, this.image_ = new Image(), s !== null && (this.image_.crossOrigin = s), this.unlisten_ = null, this.tileLoadFunction_ = r; +const Rd = o2; +class a2 extends Rd { + constructor(t, e, n, s, r, o) { + super(t, e, o), this.crossOrigin_ = s, this.src_ = n, this.key = n, this.image_ = new Image(), s !== null && (this.image_.crossOrigin = s), this.unlisten_ = null, this.tileLoadFunction_ = r; } getImage() { return this.image_; @@ -11328,14 +11241,14 @@ class $_ extends Jd { this.image_ = t, this.state = z.LOADED, this.unlistenImage_(), this.changed(); } handleImageError_() { - this.state = z.ERROR, this.unlistenImage_(), this.image_ = B_(), this.changed(); + this.state = z.ERROR, this.unlistenImage_(), this.image_ = l2(), this.changed(); } handleImageLoad_() { const t = this.image_; t.naturalWidth && t.naturalHeight ? this.state = z.LOADED : this.state = z.EMPTY, this.unlistenImage_(), this.changed(); } load() { - this.state == z.ERROR && (this.state = z.IDLE, this.image_ = new Image(), this.crossOrigin_ !== null && (this.image_.crossOrigin = this.crossOrigin_)), this.state == z.IDLE && (this.state = z.LOADING, this.changed(), this.tileLoadFunction_(this, this.src_), this.unlisten_ = Hd( + this.state == z.ERROR && (this.state = z.IDLE, this.image_ = new Image(), this.crossOrigin_ !== null && (this.image_.crossOrigin = this.crossOrigin_)), this.state == z.IDLE && (this.state = z.LOADING, this.changed(), this.tileLoadFunction_(this, this.src_), this.unlisten_ = vd( this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this) @@ -11345,12 +11258,12 @@ class $_ extends Jd { this.unlisten_ && (this.unlisten_(), this.unlisten_ = null); } } -function B_() { - const n = pe(1, 1); - return n.fillStyle = "rgba(0,0,0,0)", n.fillRect(0, 0, 1, 1), n.canvas; +function l2() { + const i = de(1, 1); + return i.fillStyle = "rgba(0,0,0,0)", i.fillRect(0, 0, 1, 1), i.canvas; } -const Qd = $_; -class z_ { +const bd = a2; +class h2 { constructor(t) { this.highWaterMark = t !== void 0 ? t : 2048, this.count_ = 0, this.entries_ = {}, this.oldest_ = null, this.newest_ = null; } @@ -11373,8 +11286,8 @@ class z_ { t(e.value_, e.key_, this), e = e.newer; } get(t, e) { - const i = this.entries_[t]; - return Y(i !== void 0, 15), i === this.newest_ || (i === this.oldest_ ? (this.oldest_ = this.oldest_.newer, this.oldest_.older = null) : (i.newer.older = i.older, i.older.newer = i.newer), i.newer = null, i.older = this.newest_, this.newest_.newer = i, this.newest_ = i), i.value_; + const n = this.entries_[t]; + return Y(n !== void 0, 15), n === this.newest_ || (n === this.oldest_ ? (this.oldest_ = this.oldest_.newer, this.oldest_.older = null) : (n.newer.older = n.older, n.older.newer = n.newer), n.newer = null, n.older = this.newest_, this.newest_.newer = n, this.newest_ = n), n.value_; } remove(t) { const e = this.entries_[t]; @@ -11385,16 +11298,16 @@ class z_ { } getKeys() { const t = new Array(this.count_); - let e = 0, i; - for (i = this.newest_; i; i = i.older) - t[e++] = i.key_; + let e = 0, n; + for (n = this.newest_; n; n = n.older) + t[e++] = n.key_; return t; } getValues() { const t = new Array(this.count_); - let e = 0, i; - for (i = this.newest_; i; i = i.older) - t[e++] = i.value_; + let e = 0, n; + for (n = this.newest_; n; n = n.older) + t[e++] = n.value_; return t; } peekLast() { @@ -11419,42 +11332,42 @@ class z_ { } set(t, e) { Y(!(t in this.entries_), 16); - const i = { + const n = { key_: t, newer: null, older: this.newest_, value_: e }; - this.newest_ ? this.newest_.newer = i : this.oldest_ = i, this.newest_ = i, this.entries_[t] = i, ++this.count_; + this.newest_ ? this.newest_.newer = n : this.oldest_ = n, this.newest_ = n, this.entries_[t] = n, ++this.count_; } setSize(t) { this.highWaterMark = t; } } -const Z_ = z_; -function Cc(n, t, e, i) { - return i !== void 0 ? (i[0] = n, i[1] = t, i[2] = e, i) : [n, t, e]; +const c2 = h2; +function qh(i, t, e, n) { + return n !== void 0 ? (n[0] = i, n[1] = t, n[2] = e, n) : [i, t, e]; } -function ko(n, t, e) { - return n + "/" + t + "/" + e; +function vo(i, t, e) { + return i + "/" + t + "/" + e; } -function tf(n) { - return ko(n[0], n[1], n[2]); +function Ld(i) { + return vo(i[0], i[1], i[2]); } -function V_(n) { - return n.split("/").map(Number); +function u2(i) { + return i.split("/").map(Number); } -function U_(n) { - return (n[1] << n[0]) + n[2]; +function d2(i) { + return (i[1] << i[0]) + i[2]; } -function W_(n, t) { - const e = n[0], i = n[1], s = n[2]; +function f2(i, t) { + const e = i[0], n = i[1], s = i[2]; if (t.getMinZoom() > e || e > t.getMaxZoom()) return !1; const r = t.getFullTileRange(e); - return r ? r.containsXY(i, s) : !0; + return r ? r.containsXY(n, s) : !0; } -class H_ extends Z_ { +class g2 extends c2 { clear() { for (; this.getCount() > 0; ) this.pop().release(); @@ -11467,18 +11380,18 @@ class H_ extends Z_ { pruneExceptNewestZ() { if (this.getCount() === 0) return; - const t = this.peekFirstKey(), i = V_(t)[0]; + const t = this.peekFirstKey(), n = u2(t)[0]; this.forEach( function(s) { - s.tileCoord[0] !== i && (this.remove(tf(s.tileCoord)), s.release()); + s.tileCoord[0] !== n && (this.remove(Ld(s.tileCoord)), s.release()); }.bind(this) ); } } -const ef = H_; -class nf { - constructor(t, e, i, s) { - this.minX = t, this.maxX = e, this.minY = i, this.maxY = s; +const Td = g2; +class Id { + constructor(t, e, n, s) { + this.minX = t, this.maxX = e, this.minY = n, this.maxY = s; } contains(t) { return this.containsXY(t[1], t[2]); @@ -11508,18 +11421,18 @@ class nf { return this.minX <= t.maxX && this.maxX >= t.minX && this.minY <= t.maxY && this.maxY >= t.minY; } } -function wn(n, t, e, i, s) { - return s !== void 0 ? (s.minX = n, s.maxX = t, s.minY = e, s.maxY = i, s) : new nf(n, t, e, i); +function un(i, t, e, n, s) { + return s !== void 0 ? (s.minX = i, s.maxX = t, s.minY = e, s.maxY = n, s) : new Id(i, t, e, n); } -const sf = nf, Mc = [ +const Ad = Id, Jh = [ "fullscreenchange", "webkitfullscreenchange", "MSFullscreenChange" -], Ec = { +], Qh = { ENTERFULLSCREEN: "enterfullscreen", LEAVEFULLSCREEN: "leavefullscreen" }; -class X_ extends Gt { +class m2 extends Dt { constructor(t) { t = t || {}, super({ element: document.createElement("div"), @@ -11527,14 +11440,14 @@ class X_ extends Gt { }), this.on, this.once, this.un, this.keys_ = t.keys !== void 0 ? t.keys : !1, this.source_ = t.source, this.isInFullscreen_ = !1, this.boundHandleMapTargetChange_ = this.handleMapTargetChange_.bind(this), this.cssClassName_ = t.className !== void 0 ? t.className : "ol-full-screen", this.documentListeners_ = [], this.activeClassName_ = t.activeClassName !== void 0 ? t.activeClassName.split(" ") : [this.cssClassName_ + "-true"], this.inactiveClassName_ = t.inactiveClassName !== void 0 ? t.inactiveClassName.split(" ") : [this.cssClassName_ + "-false"]; const e = t.label !== void 0 ? t.label : "\u2922"; this.labelNode_ = typeof e == "string" ? document.createTextNode(e) : e; - const i = t.labelActive !== void 0 ? t.labelActive : "\xD7"; - this.labelActiveNode_ = typeof i == "string" ? document.createTextNode(i) : i; + const n = t.labelActive !== void 0 ? t.labelActive : "\xD7"; + this.labelActiveNode_ = typeof n == "string" ? document.createTextNode(n) : n; const s = t.tipLabel ? t.tipLabel : "Toggle full-screen"; this.button_ = document.createElement("button"), this.button_.title = s, this.button_.setAttribute("type", "button"), this.button_.appendChild(this.labelNode_), this.button_.addEventListener( - U.CLICK, + X.CLICK, this.handleClick_.bind(this), !1 - ), this.setClassName_(this.button_, this.isInFullscreen_), this.element.className = `${this.cssClassName_} ${ss} ${Ao}`, this.element.appendChild(this.button_); + ), this.setClassName_(this.button_, this.isInFullscreen_), this.element.className = `${this.cssClassName_} ${Un} ${fo}`, this.element.appendChild(this.button_); } handleClick_(t) { t.preventDefault(), this.handleFullScreen_(); @@ -11544,12 +11457,12 @@ class X_ extends Gt { if (!t) return; const e = t.getOwnerDocument(); - if (!!wc(e)) - if (Sc(e)) - j_(e); + if (!!tc(e)) + if (ec(e)) + p2(e); else { - let i; - this.source_ ? i = typeof this.source_ == "string" ? e.getElementById(this.source_) : this.source_ : i = t.getTargetElement(), this.keys_ ? Y_(i) : rf(i); + let n; + this.source_ ? n = typeof this.source_ == "string" ? e.getElementById(this.source_) : this.source_ : n = t.getTargetElement(), this.keys_ ? _2(n) : Pd(n); } } handleFullScreenChange_() { @@ -11557,7 +11470,7 @@ class X_ extends Gt { if (!t) return; const e = this.isInFullscreen_; - this.isInFullscreen_ = Sc(t.getOwnerDocument()), e !== this.isInFullscreen_ && (this.setClassName_(this.button_, this.isInFullscreen_), this.isInFullscreen_ ? (io(this.labelActiveNode_, this.labelNode_), this.dispatchEvent(Ec.ENTERFULLSCREEN)) : (io(this.labelNode_, this.labelActiveNode_), this.dispatchEvent(Ec.LEAVEFULLSCREEN)), t.updateSize()); + this.isInFullscreen_ = ec(t.getOwnerDocument()), e !== this.isInFullscreen_ && (this.setClassName_(this.button_, this.isInFullscreen_), this.isInFullscreen_ ? (kr(this.labelActiveNode_, this.labelNode_), this.dispatchEvent(Qh.ENTERFULLSCREEN)) : (kr(this.labelNode_, this.labelActiveNode_), this.dispatchEvent(Qh.LEAVEFULLSCREEN)), t.updateSize()); } setClassName_(t, e) { e ? (t.classList.remove(...this.inactiveClassName_), t.classList.add(...this.activeClassName_)) : (t.classList.remove(...this.activeClassName_), t.classList.add(...this.inactiveClassName_)); @@ -11574,39 +11487,39 @@ class X_ extends Gt { } handleMapTargetChange_() { const t = this.documentListeners_; - for (let i = 0, s = t.length; i < s; ++i) - mt(t[i]); + for (let n = 0, s = t.length; n < s; ++n) + pt(t[n]); t.length = 0; const e = this.getMap(); if (e) { - const i = e.getOwnerDocument(); - wc(i) ? this.element.classList.remove(Vh) : this.element.classList.add(Vh); - for (let s = 0, r = Mc.length; s < r; ++s) + const n = e.getOwnerDocument(); + tc(n) ? this.element.classList.remove(_h) : this.element.classList.add(_h); + for (let s = 0, r = Jh.length; s < r; ++s) t.push( - et(i, Mc[s], this.handleFullScreenChange_, this) + it(n, Jh[s], this.handleFullScreenChange_, this) ); this.handleFullScreenChange_(); } } } -function wc(n) { - const t = n.body; - return !!(t.webkitRequestFullscreen || t.requestFullscreen && n.fullscreenEnabled); +function tc(i) { + const t = i.body; + return !!(t.webkitRequestFullscreen || t.requestFullscreen && i.fullscreenEnabled); } -function Sc(n) { - return !!(n.webkitIsFullScreen || n.fullscreenElement); +function ec(i) { + return !!(i.webkitIsFullScreen || i.fullscreenElement); } -function rf(n) { - n.requestFullscreen ? n.requestFullscreen() : n.webkitRequestFullscreen && n.webkitRequestFullscreen(); +function Pd(i) { + i.requestFullscreen ? i.requestFullscreen() : i.webkitRequestFullscreen && i.webkitRequestFullscreen(); } -function Y_(n) { - n.webkitRequestFullscreen ? n.webkitRequestFullscreen() : rf(n); +function _2(i) { + i.webkitRequestFullscreen ? i.webkitRequestFullscreen() : Pd(i); } -function j_(n) { - n.exitFullscreen ? n.exitFullscreen() : n.webkitExitFullscreen && n.webkitExitFullscreen(); +function p2(i) { + i.exitFullscreen ? i.exitFullscreen() : i.webkitExitFullscreen && i.webkitExitFullscreen(); } -const q_ = X_, ga = "units", K_ = [1, 2, 5], _s = 25.4 / 0.28; -class J_ extends Gt { +const y2 = m2, Yo = "units", v2 = [1, 2, 5], es = 25.4 / 0.28; +class x2 extends Dt { constructor(t) { t = t || {}; const e = document.createElement("div"); @@ -11615,17 +11528,17 @@ class J_ extends Gt { render: t.render, target: t.target }), this.on, this.once, this.un; - const i = t.className !== void 0 ? t.className : t.bar ? "ol-scale-bar" : "ol-scale-line"; - this.innerElement_ = document.createElement("div"), this.innerElement_.className = i + "-inner", this.element.className = i + " " + ss, this.element.appendChild(this.innerElement_), this.viewState_ = null, this.minWidth_ = t.minWidth !== void 0 ? t.minWidth : 64, this.maxWidth_ = t.maxWidth, this.renderedVisible_ = !1, this.renderedWidth_ = void 0, this.renderedHTML_ = "", this.addChangeListener(ga, this.handleUnitsChanged_), this.setUnits(t.units || "metric"), this.scaleBar_ = t.bar || !1, this.scaleBarSteps_ = t.steps || 4, this.scaleBarText_ = t.text || !1, this.dpi_ = t.dpi || void 0; + const n = t.className !== void 0 ? t.className : t.bar ? "ol-scale-bar" : "ol-scale-line"; + this.innerElement_ = document.createElement("div"), this.innerElement_.className = n + "-inner", this.element.className = n + " " + Un, this.element.appendChild(this.innerElement_), this.viewState_ = null, this.minWidth_ = t.minWidth !== void 0 ? t.minWidth : 64, this.maxWidth_ = t.maxWidth, this.renderedVisible_ = !1, this.renderedWidth_ = void 0, this.renderedHTML_ = "", this.addChangeListener(Yo, this.handleUnitsChanged_), this.setUnits(t.units || "metric"), this.scaleBar_ = t.bar || !1, this.scaleBarSteps_ = t.steps || 4, this.scaleBarText_ = t.text || !1, this.dpi_ = t.dpi || void 0; } getUnits() { - return this.get(ga); + return this.get(Yo); } handleUnitsChanged_() { this.updateElement_(); } setUnits(t) { - this.set(ga, t); + this.set(Yo, t); } setDpi(t) { this.dpi_ = t; @@ -11636,17 +11549,17 @@ class J_ extends Gt { this.renderedVisible_ && (this.element.style.display = "none", this.renderedVisible_ = !1); return; } - const e = t.center, i = t.projection, s = this.getUnits(), r = s == "degrees" ? "degrees" : "m"; - let o = ao( - i, + const e = t.center, n = t.projection, s = this.getUnits(), r = s == "degrees" ? "degrees" : "m"; + let o = Zr( + n, t.resolution, e, r ); - const a = this.minWidth_ * (this.dpi_ || _s) / _s, l = this.maxWidth_ !== void 0 ? this.maxWidth_ * (this.dpi_ || _s) / _s : void 0; + const a = this.minWidth_ * (this.dpi_ || es) / es, l = this.maxWidth_ !== void 0 ? this.maxWidth_ * (this.dpi_ || es) / es : void 0; let h = a * o, c = ""; if (s == "degrees") { - const v = Yn.degrees; + const v = On.degrees; h *= v, h < v / 60 ? (c = "\u2033", o *= 3600) : h < v ? (c = "\u2032", o *= 60) : c = "\xB0"; } else s == "imperial" ? h < 0.9144 ? (c = "in", o /= 0.0254) : h < 1609.344 ? (c = "ft", o /= 0.3048) : (c = "mi", o /= 1609.344) : s == "nautical" ? (o /= 1852, c = "NM") : s == "metric" ? h < 1e-3 ? (c = "\u03BCm", o *= 1e6) : h < 1 ? (c = "mm", o *= 1e3) : h < 1e3 ? c = "m" : (c = "km", o /= 1e3) : s == "us" ? h < 0.9144 ? (c = "in", o *= 39.37) : h < 1609.344 ? (c = "ft", o /= 0.30480061) : (c = "mi", o /= 1609.3472) : Y(!1, 33); @@ -11654,7 +11567,7 @@ class J_ extends Gt { for (; ; ) { g = Math.floor(u / 3); const v = Math.pow(10, g); - if (d = K_[(u % 3 + 3) % 3] * v, f = Math.round(d / o), isNaN(f)) { + if (d = v2[(u % 3 + 3) % 3] * v, f = Math.round(d / o), isNaN(f)) { this.element.style.display = "none", this.renderedVisible_ = !1; return; } @@ -11668,3917 +11581,2418 @@ class J_ extends Gt { const p = this.scaleBar_ ? this.createScaleBar(f, d, c) : d.toFixed(g < 0 ? -g : 0) + " " + c; this.renderedHTML_ != p && (this.innerElement_.innerHTML = p, this.renderedHTML_ = p), this.renderedWidth_ != f && (this.innerElement_.style.width = f + "px", this.renderedWidth_ = f), this.renderedVisible_ || (this.element.style.display = "", this.renderedVisible_ = !0); } - createScaleBar(t, e, i) { + createScaleBar(t, e, n) { const s = this.getScaleForResolution(), r = s < 1 ? Math.round(1 / s).toLocaleString() + " : 1" : "1 : " + Math.round(s).toLocaleString(), o = this.scaleBarSteps_, a = t / o, l = [this.createMarker("absolute")]; for (let c = 0; c < o; ++c) { const u = c % 2 === 0 ? "ol-scale-singlebar-odd" : "ol-scale-singlebar-even"; l.push( - `
` + this.createMarker("relative") + (c % 2 === 0 || o === 2 ? this.createStepText(c, t, !1, e, i) : "") + "
" + `
` + this.createMarker("relative") + (c % 2 === 0 || o === 2 ? this.createStepText(c, t, !1, e, n) : "") + "
" ); } - return l.push(this.createStepText(o, t, !0, e, i)), (this.scaleBarText_ ? `
` + r + "
" : "") + l.join(""); + return l.push(this.createStepText(o, t, !0, e, n)), (this.scaleBarText_ ? `
` + r + "
" : "") + l.join(""); } createMarker(t) { return `
`; } - createStepText(t, e, i, s, r) { + createStepText(t, e, n, s, r) { const a = (t === 0 ? 0 : Math.round(s / this.scaleBarSteps_ * t * 100) / 100) + (t === 0 ? "" : " " + r), l = t === 0 ? -3 : e / this.scaleBarSteps_ * -1, h = t === 0 ? 0 : e / this.scaleBarSteps_ * 2; - return `
` + a + "
"; + return `
` + a + "
"; } getScaleForResolution() { - const t = ao( + const t = Zr( this.viewState_.projection, this.viewState_.resolution, this.viewState_.center, "m" - ), e = this.dpi_ || _s, i = 1e3 / 25.4; - return t * i * e; + ), e = this.dpi_ || es, n = 1e3 / 25.4; + return t * n * e; } render(t) { const e = t.frameState; e ? this.viewState_ = e.viewState : this.viewState_ = null, this.updateElement_(); } } -const Q_ = J_; -class Go extends Di { - constructor(t, e, i) { - super(), i !== void 0 && e === void 0 ? this.setFlatCoordinates(i, t) : (e = e || 0, this.setCenterAndRadius(t, e, i)); +const M2 = x2, C2 = 0.5, E2 = 10, ic = 0.25; +class w2 { + constructor(t, e, n, s, r, o) { + this.sourceProj_ = t, this.targetProj_ = e; + let a = {}; + const l = Ss(this.targetProj_, this.sourceProj_); + this.transformInv_ = function(p) { + const v = p[0] + "/" + p[1]; + return a[v] || (a[v] = l(p)), a[v]; + }, this.maxSourceExtent_ = s, this.errorThresholdSquared_ = r * r, this.triangles_ = [], this.wrapsXInSource_ = !1, this.canWrapXInSource_ = this.sourceProj_.canWrapX() && !!s && !!this.sourceProj_.getExtent() && mt(s) == mt(this.sourceProj_.getExtent()), this.sourceWorldWidth_ = this.sourceProj_.getExtent() ? mt(this.sourceProj_.getExtent()) : null, this.targetWorldWidth_ = this.targetProj_.getExtent() ? mt(this.targetProj_.getExtent()) : null; + const h = Ji(n), c = co(n), u = ho(n), d = lo(n), f = this.transformInv_(h), g = this.transformInv_(c), m = this.transformInv_(u), _ = this.transformInv_(d), y = E2 + (o ? Math.max( + 0, + Math.ceil( + Math.log2( + oa(n) / (o * o * 256 * 256) + ) + ) + ) : 0); + if (this.addQuad_( + h, + c, + u, + d, + f, + g, + m, + _, + y + ), this.wrapsXInSource_) { + let p = 1 / 0; + this.triangles_.forEach(function(v, x, M) { + p = Math.min( + p, + v.source[0][0], + v.source[1][0], + v.source[2][0] + ); + }), this.triangles_.forEach( + function(v) { + if (Math.max( + v.source[0][0], + v.source[1][0], + v.source[2][0] + ) - p > this.sourceWorldWidth_ / 2) { + const x = [ + [v.source[0][0], v.source[0][1]], + [v.source[1][0], v.source[1][1]], + [v.source[2][0], v.source[2][1]] + ]; + x[0][0] - p > this.sourceWorldWidth_ / 2 && (x[0][0] -= this.sourceWorldWidth_), x[1][0] - p > this.sourceWorldWidth_ / 2 && (x[1][0] -= this.sourceWorldWidth_), x[2][0] - p > this.sourceWorldWidth_ / 2 && (x[2][0] -= this.sourceWorldWidth_); + const M = Math.min( + x[0][0], + x[1][0], + x[2][0] + ); + Math.max( + x[0][0], + x[1][0], + x[2][0] + ) - M < this.sourceWorldWidth_ / 2 && (v.source = x); + } + }.bind(this) + ); + } + a = {}; } - clone() { - const t = new Go( - this.flatCoordinates.slice(), - void 0, - this.layout - ); - return t.applyProperties(this), t; + addTriangle_(t, e, n, s, r, o) { + this.triangles_.push({ + source: [s, r, o], + target: [t, e, n] + }); } - closestPointXY(t, e, i, s) { - const r = this.flatCoordinates, o = t - r[0], a = e - r[1], l = o * o + a * a; - if (l < s) { - if (l === 0) - for (let h = 0; h < this.stride; ++h) - i[h] = r[h]; - else { - const h = this.getRadius() / Math.sqrt(l); - i[0] = r[0] + h * o, i[1] = r[1] + h * a; - for (let c = 2; c < this.stride; ++c) - i[c] = r[c]; + addQuad_(t, e, n, s, r, o, a, l, h) { + const c = sa([r, o, a, l]), u = this.sourceWorldWidth_ ? mt(c) / this.sourceWorldWidth_ : null, d = this.sourceWorldWidth_, f = this.sourceProj_.canWrapX() && u > 0.5 && u < 1; + let g = !1; + if (h > 0) { + if (this.targetProj_.isGlobal() && this.targetWorldWidth_) { + const _ = sa([t, e, n, s]); + g = mt(_) / this.targetWorldWidth_ > ic || g; } - return i.length = this.stride, l; - } else - return s; - } - containsXY(t, e) { - const i = this.flatCoordinates, s = t - i[0], r = e - i[1]; - return s * s + r * r <= this.getRadiusSquared_(); - } - getCenter() { - return this.flatCoordinates.slice(0, this.stride); - } - computeExtent(t) { - const e = this.flatCoordinates, i = e[this.stride] - e[0]; - return _e( - e[0] - i, - e[1] - i, - e[0] + i, - e[1] + i, - t - ); - } - getRadius() { - return Math.sqrt(this.getRadiusSquared_()); - } - getRadiusSquared_() { - const t = this.flatCoordinates[this.stride] - this.flatCoordinates[0], e = this.flatCoordinates[this.stride + 1] - this.flatCoordinates[1]; - return t * t + e * e; - } - getType() { - return "Circle"; - } - intersectsExtent(t) { - const e = this.getExtent(); - if (Kt(t, e)) { - const i = this.getCenter(); - return t[0] <= i[0] && t[2] >= i[0] || t[1] <= i[1] && t[3] >= i[1] ? !0 : yl(t, this.intersectsCoordinate.bind(this)); + !f && this.sourceProj_.isGlobal() && u && (g = u > ic || g); } - return !1; - } - setCenter(t) { - const e = this.stride, i = this.flatCoordinates[e] - this.flatCoordinates[0], s = t.slice(); - s[e] = s[0] + i; - for (let r = 1; r < e; ++r) - s[e + r] = t[r]; - this.setFlatCoordinates(this.layout, s), this.changed(); - } - setCenterAndRadius(t, e, i) { - this.setLayout(i, t, 0), this.flatCoordinates || (this.flatCoordinates = []); - const s = this.flatCoordinates; - let r = Cd(s, 0, t, this.stride); - s[r++] = s[0] + e; - for (let o = 1, a = this.stride; o < a; ++o) - s[r++] = s[o]; - s.length = r, this.changed(); - } - getCoordinates() { - return null; - } - setCoordinates(t, e) { - } - setRadius(t) { - this.flatCoordinates[this.stride] = this.flatCoordinates[0] + t, this.changed(); + if (!g && this.maxSourceExtent_ && isFinite(c[0]) && isFinite(c[1]) && isFinite(c[2]) && isFinite(c[3]) && !Qt(c, this.maxSourceExtent_)) + return; + let m = 0; + if (!g && (!isFinite(r[0]) || !isFinite(r[1]) || !isFinite(o[0]) || !isFinite(o[1]) || !isFinite(a[0]) || !isFinite(a[1]) || !isFinite(l[0]) || !isFinite(l[1]))) { + if (h > 0) + g = !0; + else if (m = (!isFinite(r[0]) || !isFinite(r[1]) ? 8 : 0) + (!isFinite(o[0]) || !isFinite(o[1]) ? 4 : 0) + (!isFinite(a[0]) || !isFinite(a[1]) ? 2 : 0) + (!isFinite(l[0]) || !isFinite(l[1]) ? 1 : 0), m != 1 && m != 2 && m != 4 && m != 8) + return; + } + if (h > 0) { + if (!g) { + const _ = [(t[0] + n[0]) / 2, (t[1] + n[1]) / 2], y = this.transformInv_(_); + let p; + f ? p = (Sn(r[0], d) + Sn(a[0], d)) / 2 - Sn(y[0], d) : p = (r[0] + a[0]) / 2 - y[0]; + const v = (r[1] + a[1]) / 2 - y[1]; + g = p * p + v * v > this.errorThresholdSquared_; + } + if (g) { + if (Math.abs(t[0] - n[0]) <= Math.abs(t[1] - n[1])) { + const _ = [(e[0] + n[0]) / 2, (e[1] + n[1]) / 2], y = this.transformInv_(_), p = [(s[0] + t[0]) / 2, (s[1] + t[1]) / 2], v = this.transformInv_(p); + this.addQuad_( + t, + e, + _, + p, + r, + o, + y, + v, + h - 1 + ), this.addQuad_( + p, + _, + n, + s, + v, + y, + a, + l, + h - 1 + ); + } else { + const _ = [(t[0] + e[0]) / 2, (t[1] + e[1]) / 2], y = this.transformInv_(_), p = [(n[0] + s[0]) / 2, (n[1] + s[1]) / 2], v = this.transformInv_(p); + this.addQuad_( + t, + _, + p, + s, + r, + y, + v, + l, + h - 1 + ), this.addQuad_( + _, + e, + n, + p, + y, + o, + a, + v, + h - 1 + ); + } + return; + } + } + if (f) { + if (!this.canWrapXInSource_) + return; + this.wrapsXInSource_ = !0; + } + (m & 11) == 0 && this.addTriangle_(t, n, s, r, a, l), (m & 14) == 0 && this.addTriangle_(t, n, e, r, a, o), m && ((m & 13) == 0 && this.addTriangle_(e, s, t, o, l, r), (m & 7) == 0 && this.addTriangle_(e, s, n, o, l, a)); } - rotate(t, e) { - const i = this.getCenter(), s = this.getStride(); - this.setCenter( - Fl(i, 0, i.length, s, t, e, i) - ), this.changed(); + calculateSourceExtent() { + const t = ue(); + return this.triangles_.forEach(function(e, n, s) { + const r = e.source; + hs(t, r[0]), hs(t, r[1]), hs(t, r[2]); + }), t; } - translate(t, e) { - const i = this.getCenter(), s = this.getStride(); - this.setCenter( - vd(i, 0, i.length, s, t, e, i) - ), this.changed(); + getTriangles() { + return this.triangles_; } } -Go.prototype.transform; -const t2 = Go; -class go extends xd { - constructor(t) { - super(), this.geometries_ = t || null, this.changeEventsKeys_ = [], this.listenGeometriesChange_(); - } - unlistenGeometriesChange_() { - this.changeEventsKeys_.forEach(mt), this.changeEventsKeys_.length = 0; +const S2 = w2; +let jo; +const Od = []; +function nc(i, t, e, n, s) { + i.beginPath(), i.moveTo(0, 0), i.lineTo(t, e), i.lineTo(n, s), i.closePath(), i.save(), i.clip(), i.fillRect(0, 0, Math.max(t, n) + 1, Math.max(e, s)), i.restore(); +} +function Ko(i, t) { + return Math.abs(i[t * 4] - 210) > 2 || Math.abs(i[t * 4 + 3] - 0.75 * 255) > 2; +} +function R2() { + if (jo === void 0) { + const i = document.createElement("canvas").getContext("2d"); + i.globalCompositeOperation = "lighter", i.fillStyle = "rgba(210, 0, 0, 0.75)", nc(i, 4, 5, 4, 0), nc(i, 4, 5, 0, 5); + const t = i.getImageData(0, 0, 3, 3).data; + jo = Ko(t, 0) || Ko(t, 4) || Ko(t, 8); } - listenGeometriesChange_() { - if (!!this.geometries_) - for (let t = 0, e = this.geometries_.length; t < e; ++t) - this.changeEventsKeys_.push( - et(this.geometries_[t], U.CHANGE, this.changed, this) - ); + return jo; +} +function sc(i, t, e, n) { + const s = Wu(e, t, i); + let r = Zr( + t, + n, + e + ); + const o = t.getMetersPerUnit(); + o !== void 0 && (r *= o); + const a = i.getMetersPerUnit(); + a !== void 0 && (r /= a); + const l = i.getExtent(); + if (!l || ao(l, s)) { + const h = Zr(i, r, s) / r; + isFinite(h) && h > 0 && (r /= h); } - clone() { - const t = new go(null); - return t.setGeometries(this.geometries_), t.applyProperties(this), t; + return r; +} +function b2(i, t, e, n) { + const s = Mi(e); + let r = sc( + i, + t, + s, + n + ); + return (!isFinite(r) || r <= 0) && Ru(e, function(o) { + return r = sc( + i, + t, + o, + n + ), isFinite(r) && r > 0; + }), r; +} +function L2(i, t, e, n, s, r, o, a, l, h, c, u) { + const d = de( + Math.round(e * i), + Math.round(e * t), + Od + ); + if (u || (d.imageSmoothingEnabled = !1), l.length === 0) + return d.canvas; + d.scale(e, e); + function f(x) { + return Math.round(x * e) / e; } - closestPointXY(t, e, i, s) { - if (s < dn(this.getExtent(), t, e)) - return s; - const r = this.geometries_; - for (let o = 0, a = r.length; o < a; ++o) - s = r[o].closestPointXY( - t, - e, - i, - s + d.globalCompositeOperation = "lighter"; + const g = ue(); + l.forEach(function(x, M, E) { + wu(g, x.extent); + }); + const m = mt(g), _ = Ne(g), y = de( + Math.round(e * m / n), + Math.round(e * _ / n) + ); + u || (y.imageSmoothingEnabled = !1); + const p = e / n; + l.forEach(function(x, M, E) { + const R = x.extent[0] - g[0], L = -(x.extent[3] - g[3]), N = mt(x.extent), G = Ne(x.extent); + x.image.width > 0 && x.image.height > 0 && y.drawImage( + x.image, + h, + h, + x.image.width - 2 * h, + x.image.height - 2 * h, + R * p, + L * p, + N * p, + G * p + ); + }); + const v = Ji(o); + return a.getTriangles().forEach(function(x, M, E) { + const R = x.source, L = x.target; + let N = R[0][0], G = R[0][1], U = R[1][0], T = R[1][1], $ = R[2][0], ft = R[2][1]; + const F = f((L[0][0] - v[0]) / r), k = f( + -(L[0][1] - v[1]) / r + ), A = f((L[1][0] - v[0]) / r), tt = f( + -(L[1][1] - v[1]) / r + ), Mt = f((L[2][0] - v[0]) / r), _t = f( + -(L[2][1] - v[1]) / r + ), Pt = N, b = G; + N = 0, G = 0, U -= Pt, T -= b, $ -= Pt, ft -= b; + const se = [ + [U, T, 0, 0, A - F], + [$, ft, 0, 0, Mt - F], + [0, 0, U, T, tt - k], + [0, 0, $, ft, _t - k] + ], lt = L0(se); + if (!!lt) { + if (d.save(), d.beginPath(), R2() || !u) { + d.moveTo(A, tt); + const gt = 4, ii = F - A, Re = k - tt; + for (let Gt = 0; Gt < gt; Gt++) + d.lineTo( + A + f((Gt + 1) * ii / gt), + tt + f(Gt * Re / (gt - 1)) + ), Gt != gt - 1 && d.lineTo( + A + f((Gt + 1) * ii / gt), + tt + f((Gt + 1) * Re / (gt - 1)) + ); + d.lineTo(Mt, _t); + } else + d.moveTo(A, tt), d.lineTo(F, k), d.lineTo(Mt, _t); + d.clip(), d.transform( + lt[0], + lt[2], + lt[1], + lt[3], + F, + k + ), d.translate( + g[0] - Pt, + g[3] - b + ), d.scale( + n / e, + -n / e + ), d.drawImage(y.canvas, 0, 0), d.restore(); + } + }), c && (d.save(), d.globalCompositeOperation = "source-over", d.strokeStyle = "black", d.lineWidth = 1, a.getTriangles().forEach(function(x, M, E) { + const R = x.target, L = (R[0][0] - v[0]) / r, N = -(R[0][1] - v[1]) / r, G = (R[1][0] - v[0]) / r, U = -(R[1][1] - v[1]) / r, T = (R[2][0] - v[0]) / r, $ = -(R[2][1] - v[1]) / r; + d.beginPath(), d.moveTo(G, U), d.lineTo(L, N), d.lineTo(T, $), d.closePath(), d.stroke(); + }), d.restore()), d.canvas; +} +class T2 extends Rd { + constructor(t, e, n, s, r, o, a, l, h, c, u, d) { + super(r, z.IDLE, { interpolate: !!d }), this.renderEdges_ = u !== void 0 ? u : !1, this.pixelRatio_ = a, this.gutter_ = l, this.canvas_ = null, this.sourceTileGrid_ = e, this.targetTileGrid_ = s, this.wrappedTileCoord_ = o || r, this.sourceTiles_ = [], this.sourcesListenerKeys_ = null, this.sourceZ_ = 0; + const f = s.getTileCoordExtent( + this.wrappedTileCoord_ + ), g = this.targetTileGrid_.getExtent(); + let m = this.sourceTileGrid_.getExtent(); + const _ = g ? cs(f, g) : f; + if (oa(_) === 0) { + this.state = z.EMPTY; + return; + } + const y = t.getExtent(); + y && (m ? m = cs(m, y) : m = y); + const p = s.getResolution( + this.wrappedTileCoord_[0] + ), v = b2( + t, + n, + _, + p + ); + if (!isFinite(v) || v <= 0) { + this.state = z.EMPTY; + return; + } + const x = c !== void 0 ? c : C2; + if (this.triangulation_ = new S2( + t, + n, + _, + m, + v * x, + p + ), this.triangulation_.getTriangles().length === 0) { + this.state = z.EMPTY; + return; + } + this.sourceZ_ = e.getZForResolution(v); + let M = this.triangulation_.calculateSourceExtent(); + if (m && (t.canWrapX() ? (M[1] = wt( + M[1], + m[1], + m[3] + ), M[3] = wt( + M[3], + m[1], + m[3] + )) : M = cs(M, m)), !oa(M)) + this.state = z.EMPTY; + else { + const E = e.getTileRangeForExtentAndZ( + M, + this.sourceZ_ ); - return s; + for (let R = E.minX; R <= E.maxX; R++) + for (let L = E.minY; L <= E.maxY; L++) { + const N = h(this.sourceZ_, R, L, a); + N && this.sourceTiles_.push(N); + } + this.sourceTiles_.length === 0 && (this.state = z.EMPTY); + } } - containsXY(t, e) { - const i = this.geometries_; - for (let s = 0, r = i.length; s < r; ++s) - if (i[s].containsXY(t, e)) - return !0; - return !1; + getImage() { + return this.canvas_; } - computeExtent(t) { - Qs(t); - const e = this.geometries_; - for (let i = 0, s = e.length; i < s; ++i) - Ku(t, e[i].getExtent()); - return t; + reproject_() { + const t = []; + if (this.sourceTiles_.forEach( + function(e, n, s) { + e && e.getState() == z.LOADED && t.push({ + extent: this.sourceTileGrid_.getTileCoordExtent(e.tileCoord), + image: e.getImage() + }); + }.bind(this) + ), this.sourceTiles_.length = 0, t.length === 0) + this.state = z.ERROR; + else { + const e = this.wrappedTileCoord_[0], n = this.targetTileGrid_.getTileSize(e), s = typeof n == "number" ? n : n[0], r = typeof n == "number" ? n : n[1], o = this.targetTileGrid_.getResolution(e), a = this.sourceTileGrid_.getResolution( + this.sourceZ_ + ), l = this.targetTileGrid_.getTileCoordExtent( + this.wrappedTileCoord_ + ); + this.canvas_ = L2( + s, + r, + this.pixelRatio_, + a, + this.sourceTileGrid_.getExtent(), + o, + l, + this.triangulation_, + t, + this.gutter_, + this.renderEdges_, + this.interpolate + ), this.state = z.LOADED; + } + this.changed(); } - getGeometries() { - return Rc(this.geometries_); + load() { + if (this.state == z.IDLE) { + this.state = z.LOADING, this.changed(); + let t = 0; + this.sourcesListenerKeys_ = [], this.sourceTiles_.forEach( + function(e, n, s) { + const r = e.getState(); + if (r == z.IDLE || r == z.LOADING) { + t++; + const o = it( + e, + X.CHANGE, + function(a) { + const l = e.getState(); + (l == z.LOADED || l == z.ERROR || l == z.EMPTY) && (pt(o), t--, t === 0 && (this.unlistenSources_(), this.reproject_())); + }, + this + ); + this.sourcesListenerKeys_.push(o); + } + }.bind(this) + ), t === 0 ? setTimeout(this.reproject_.bind(this), 0) : this.sourceTiles_.forEach(function(e, n, s) { + e.getState() == z.IDLE && e.load(); + }); + } } - getGeometriesArray() { - return this.geometries_; + unlistenSources_() { + this.sourcesListenerKeys_.forEach(pt), this.sourcesListenerKeys_ = null; } - getGeometriesArrayRecursive() { - let t = []; - const e = this.geometries_; - for (let i = 0, s = e.length; i < s; ++i) - e[i].getType() === this.getType() ? t = t.concat( - e[i].getGeometriesArrayRecursive() - ) : t.push(e[i]); - return t; + release() { + this.canvas_ && (Gu(this.canvas_.getContext("2d")), Od.push(this.canvas_), this.canvas_ = null), super.release(); } - getSimplifiedGeometry(t) { - if (this.simplifiedGeometryRevision !== this.getRevision() && (this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = this.getRevision()), t < 0 || this.simplifiedGeometryMaxMinSquaredTolerance !== 0 && t < this.simplifiedGeometryMaxMinSquaredTolerance) - return this; - const e = [], i = this.geometries_; - let s = !1; - for (let r = 0, o = i.length; r < o; ++r) { - const a = i[r], l = a.getSimplifiedGeometry(t); - e.push(l), l !== a && (s = !0); +} +const wa = T2, qo = { + TILELOADSTART: "tileloadstart", + TILELOADEND: "tileloadend", + TILELOADERROR: "tileloaderror" +}, I2 = [0, 0, 0], hi = 5; +class A2 { + constructor(t) { + this.minZoom = t.minZoom !== void 0 ? t.minZoom : 0, this.resolutions_ = t.resolutions, Y( + i0( + this.resolutions_, + function(s, r) { + return r - s; + }, + !0 + ), + 17 + ); + let e; + if (!t.origins) { + for (let s = 0, r = this.resolutions_.length - 1; s < r; ++s) + if (!e) + e = this.resolutions_[s] / this.resolutions_[s + 1]; + else if (this.resolutions_[s] / this.resolutions_[s + 1] !== e) { + e = void 0; + break; + } } - if (s) { - const r = new go(null); - return r.setGeometriesArray(e), r; - } else - return this.simplifiedGeometryMaxMinSquaredTolerance = t, this; + this.zoomFactor_ = e, this.maxZoom = this.resolutions_.length - 1, this.origin_ = t.origin !== void 0 ? t.origin : null, this.origins_ = null, t.origins !== void 0 && (this.origins_ = t.origins, Y(this.origins_.length == this.resolutions_.length, 20)); + const n = t.extent; + n !== void 0 && !this.origin_ && !this.origins_ && (this.origin_ = Ji(n)), Y( + !this.origin_ && this.origins_ || this.origin_ && !this.origins_, + 18 + ), this.tileSizes_ = null, t.tileSizes !== void 0 && (this.tileSizes_ = t.tileSizes, Y(this.tileSizes_.length == this.resolutions_.length, 19)), this.tileSize_ = t.tileSize !== void 0 ? t.tileSize : this.tileSizes_ ? null : Qa, Y( + !this.tileSize_ && this.tileSizes_ || this.tileSize_ && !this.tileSizes_, + 22 + ), this.extent_ = n !== void 0 ? n : null, this.fullTileRanges_ = null, this.tmpSize_ = [0, 0], this.tmpExtent_ = [0, 0, 0, 0], t.sizes !== void 0 ? this.fullTileRanges_ = t.sizes.map(function(s, r) { + const o = new Ad( + Math.min(0, s[0]), + Math.max(s[0] - 1, -1), + Math.min(0, s[1]), + Math.max(s[1] - 1, -1) + ); + if (n) { + const a = this.getTileRangeForExtentAndZ(n, r); + o.minX = Math.max(a.minX, o.minX), o.maxX = Math.min(a.maxX, o.maxX), o.minY = Math.max(a.minY, o.minY), o.maxY = Math.min(a.maxY, o.maxY); + } + return o; + }, this) : n && this.calculateTileRanges_(n); } - getType() { - return "GeometryCollection"; + forEachTileCoord(t, e, n) { + const s = this.getTileRangeForExtentAndZ(t, e); + for (let r = s.minX, o = s.maxX; r <= o; ++r) + for (let a = s.minY, l = s.maxY; a <= l; ++a) + n([e, r, a]); } - intersectsExtent(t) { - const e = this.geometries_; - for (let i = 0, s = e.length; i < s; ++i) - if (e[i].intersectsExtent(t)) + forEachTileCoordParentTileRange(t, e, n, s) { + let r, o, a, l = null, h = t[0] - 1; + for (this.zoomFactor_ === 2 ? (o = t[1], a = t[2]) : l = this.getTileCoordExtent(t, s); h >= this.minZoom; ) { + if (this.zoomFactor_ === 2 ? (o = Math.floor(o / 2), a = Math.floor(a / 2), r = un(o, o, a, a, n)) : r = this.getTileRangeForExtentAndZ( + l, + h, + n + ), e(h, r)) return !0; + --h; + } return !1; } - isEmpty() { - return this.geometries_.length === 0; - } - rotate(t, e) { - const i = this.geometries_; - for (let s = 0, r = i.length; s < r; ++s) - i[s].rotate(t, e); - this.changed(); - } - scale(t, e, i) { - i || (i = Pi(this.getExtent())); - const s = this.geometries_; - for (let r = 0, o = s.length; r < o; ++r) - s[r].scale(t, e, i); - this.changed(); + getExtent() { + return this.extent_; } - setGeometries(t) { - this.setGeometriesArray(Rc(t)); + getMaxZoom() { + return this.maxZoom; } - setGeometriesArray(t) { - this.unlistenGeometriesChange_(), this.geometries_ = t, this.listenGeometriesChange_(), this.changed(); + getMinZoom() { + return this.minZoom; } - applyTransform(t) { - const e = this.geometries_; - for (let i = 0, s = e.length; i < s; ++i) - e[i].applyTransform(t); - this.changed(); + getOrigin(t) { + return this.origin_ ? this.origin_ : this.origins_[t]; } - translate(t, e) { - const i = this.geometries_; - for (let s = 0, r = i.length; s < r; ++s) - i[s].translate(t, e); - this.changed(); + getResolution(t) { + return this.resolutions_[t]; } - disposeInternal() { - this.unlistenGeometriesChange_(), super.disposeInternal(); + getResolutions() { + return this.resolutions_; } -} -function Rc(n) { - const t = []; - for (let e = 0, i = n.length; e < i; ++e) - t.push(n[e].clone()); - return t; -} -const of = go; -class mo extends Di { - constructor(t, e, i) { - if (super(), this.ends_ = [], this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, Array.isArray(t[0])) - this.setCoordinates( + getTileCoordChildTileRange(t, e, n) { + if (t[0] < this.maxZoom) { + if (this.zoomFactor_ === 2) { + const r = t[1] * 2, o = t[2] * 2; + return un( + r, + r + 1, + o, + o + 1, + e + ); + } + const s = this.getTileCoordExtent( t, - e + n || this.tmpExtent_ + ); + return this.getTileRangeForExtentAndZ( + s, + t[0] + 1, + e ); - else if (e !== void 0 && i) - this.setFlatCoordinates( - e, - t - ), this.ends_ = i; - else { - let s = this.getLayout(); - const r = t, o = [], a = []; - for (let l = 0, h = r.length; l < h; ++l) { - const c = r[l]; - l === 0 && (s = c.getLayout()), Qt(o, c.getFlatCoordinates()), a.push(o.length); - } - this.setFlatCoordinates(s, o), this.ends_ = a; } + return null; } - appendLineString(t) { - this.flatCoordinates ? Qt(this.flatCoordinates, t.getFlatCoordinates().slice()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed(); + getTileRangeForTileCoordAndZ(t, e, n) { + if (e > this.maxZoom || e < this.minZoom) + return null; + const s = t[0], r = t[1], o = t[2]; + if (e === s) + return un( + r, + o, + r, + o, + n + ); + if (this.zoomFactor_) { + const l = Math.pow(this.zoomFactor_, e - s), h = Math.floor(r * l), c = Math.floor(o * l); + if (e < s) + return un(h, h, c, c, n); + const u = Math.floor(l * (r + 1)) - 1, d = Math.floor(l * (o + 1)) - 1; + return un(h, u, c, d, n); + } + const a = this.getTileCoordExtent(t, this.tmpExtent_); + return this.getTileRangeForExtentAndZ(a, e, n); } - clone() { - const t = new mo( - this.flatCoordinates.slice(), - this.layout, - this.ends_.slice() + getTileRangeExtent(t, e, n) { + const s = this.getOrigin(t), r = this.getResolution(t), o = ae(this.getTileSize(t), this.tmpSize_), a = s[0] + e.minX * o[0] * r, l = s[0] + (e.maxX + 1) * o[0] * r, h = s[1] + e.minY * o[1] * r, c = s[1] + (e.maxY + 1) * o[1] * r; + return ye(a, h, l, c, n); + } + getTileRangeForExtentAndZ(t, e, n) { + const s = I2; + this.getTileCoordForXYAndZ_(t[0], t[3], e, !1, s); + const r = s[1], o = s[2]; + return this.getTileCoordForXYAndZ_(t[2], t[1], e, !0, s), un( + r, + s[1], + o, + s[2], + n ); - return t.applyProperties(this), t; } - closestPointXY(t, e, i, s) { - return s < dn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( - Dl( - this.flatCoordinates, - 0, - this.ends_, - this.stride, - 0 - ) - ), this.maxDeltaRevision_ = this.getRevision()), Gl( - this.flatCoordinates, - 0, - this.ends_, - this.stride, - this.maxDelta_, - !1, - t, - e, - i, - s - )); + getTileCoordCenter(t) { + const e = this.getOrigin(t[0]), n = this.getResolution(t[0]), s = ae(this.getTileSize(t[0]), this.tmpSize_); + return [ + e[0] + (t[1] + 0.5) * s[0] * n, + e[1] - (t[2] + 0.5) * s[1] * n + ]; } - getCoordinateAtM(t, e, i) { - return this.layout != "XYM" && this.layout != "XYZM" || this.flatCoordinates.length === 0 ? null : (e = e !== void 0 ? e : !1, i = i !== void 0 ? i : !1, Tm( - this.flatCoordinates, - 0, - this.ends_, - this.stride, - t, - e, - i - )); + getTileCoordExtent(t, e) { + const n = this.getOrigin(t[0]), s = this.getResolution(t[0]), r = ae(this.getTileSize(t[0]), this.tmpSize_), o = n[0] + t[1] * r[0] * s, a = n[1] - (t[2] + 1) * r[1] * s, l = o + r[0] * s, h = a + r[1] * s; + return ye(o, a, l, h, e); } - getCoordinates() { - return Zs( - this.flatCoordinates, - 0, - this.ends_, - this.stride + getTileCoordForCoordAndResolution(t, e, n) { + return this.getTileCoordForXYAndResolution_( + t[0], + t[1], + e, + !1, + n ); } - getEnds() { - return this.ends_; + getTileCoordForXYAndResolution_(t, e, n, s, r) { + const o = this.getZForResolution(n), a = n / this.getResolution(o), l = this.getOrigin(o), h = ae(this.getTileSize(o), this.tmpSize_); + let c = a * (t - l[0]) / n / h[0], u = a * (l[1] - e) / n / h[1]; + return s ? (c = ur(c, hi) - 1, u = ur(u, hi) - 1) : (c = cr(c, hi), u = cr(u, hi)), qh(o, c, u, r); } - getLineString(t) { - return t < 0 || this.ends_.length <= t ? null : new li( - this.flatCoordinates.slice( - t === 0 ? 0 : this.ends_[t - 1], - this.ends_[t] - ), - this.layout - ); + getTileCoordForXYAndZ_(t, e, n, s, r) { + const o = this.getOrigin(n), a = this.getResolution(n), l = ae(this.getTileSize(n), this.tmpSize_); + let h = (t - o[0]) / a / l[0], c = (o[1] - e) / a / l[1]; + return s ? (h = ur(h, hi) - 1, c = ur(c, hi) - 1) : (h = cr(h, hi), c = cr(c, hi)), qh(n, h, c, r); } - getLineStrings() { - const t = this.flatCoordinates, e = this.ends_, i = this.layout, s = []; - let r = 0; - for (let o = 0, a = e.length; o < a; ++o) { - const l = e[o], h = new li( - t.slice(r, l), - i - ); - s.push(h), r = l; - } - return s; + getTileCoordForCoordAndZ(t, e, n) { + return this.getTileCoordForXYAndZ_( + t[0], + t[1], + e, + !1, + n + ); } - getFlatMidpoints() { - const t = [], e = this.flatCoordinates; - let i = 0; - const s = this.ends_, r = this.stride; - for (let o = 0, a = s.length; o < a; ++o) { - const l = s[o], h = $d( - e, - i, - l, - r, - 0.5 - ); - Qt(t, h), i = l; - } - return t; + getTileCoordResolution(t) { + return this.resolutions_[t[0]]; } - getSimplifiedGeometryInternal(t) { - const e = [], i = []; - return e.length = g1( - this.flatCoordinates, - 0, - this.ends_, - this.stride, - t, - e, - 0, - i - ), new mo(e, "XY", i); + getTileSize(t) { + return this.tileSize_ ? this.tileSize_ : this.tileSizes_[t]; } - getType() { - return "MultiLineString"; + getFullTileRange(t) { + return this.fullTileRanges_ ? this.fullTileRanges_[t] : this.extent_ ? this.getTileRangeForExtentAndZ(this.extent_, t) : null; } - intersectsExtent(t) { - return C1( - this.flatCoordinates, - 0, - this.ends_, - this.stride, - t + getZForResolution(t, e) { + const n = Wa( + this.resolutions_, + t, + e || 0 ); + return wt(n, this.minZoom, this.maxZoom); } - setCoordinates(t, e) { - this.setLayout(e, t, 2), this.flatCoordinates || (this.flatCoordinates = []); - const i = $l( - this.flatCoordinates, + tileCoordIntersectsViewport(t, e) { + return id( + e, 0, - t, - this.stride, - this.ends_ + e.length, + 2, + this.getTileCoordExtent(t) ); - this.flatCoordinates.length = i.length === 0 ? 0 : i[i.length - 1], this.changed(); + } + calculateTileRanges_(t) { + const e = this.resolutions_.length, n = new Array(e); + for (let s = this.minZoom; s < e; ++s) + n[s] = this.getTileRangeForExtentAndZ(t, s); + this.fullTileRanges_ = n; } } -const sr = mo; -class th extends Di { - constructor(t, e) { - super(), e && !Array.isArray(t[0]) ? this.setFlatCoordinates( - e, - t - ) : this.setCoordinates( - t, - e +const Nd = A2; +function Fd(i) { + let t = i.getDefaultTileGrid(); + return t || (t = F2(i), i.setDefaultTileGrid(t)), t; +} +function P2(i, t, e) { + const n = t[0], s = i.getTileCoordCenter(t), r = Dd(e); + if (ao(r, s)) + return t; + { + const o = mt(r), a = Math.ceil( + (r[0] - s[0]) / o ); + return s[0] += o * a, i.getTileCoordForCoordAndZ(s, n); } - appendPoint(t) { - this.flatCoordinates ? Qt(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.changed(); +} +function O2(i, t, e, n) { + n = n !== void 0 ? n : "top-left"; + const s = N2(i, t, e); + return new Nd({ + extent: i, + origin: C0(i, n), + resolutions: s, + tileSize: e + }); +} +function N2(i, t, e, n) { + t = t !== void 0 ? t : og, e = ae(e !== void 0 ? e : Qa); + const s = Ne(i), r = mt(i); + n = n > 0 ? n : Math.max(r / e[0], s / e[1]); + const o = t + 1, a = new Array(o); + for (let l = 0; l < o; ++l) + a[l] = n / Math.pow(2, l); + return a; +} +function F2(i, t, e, n) { + const s = Dd(i); + return O2(s, t, e, n); +} +function Dd(i) { + i = J(i); + let t = i.getExtent(); + if (!t) { + const e = 180 * On.degrees / i.getMetersPerUnit(); + t = ye(-e, -e, e, e); } - clone() { - const t = new th( - this.flatCoordinates.slice(), - this.layout - ); - return t.applyProperties(this), t; + return t; +} +class D2 extends wd { + constructor(t) { + super({ + attributions: t.attributions, + attributionsCollapsible: t.attributionsCollapsible, + projection: t.projection, + state: t.state, + wrapX: t.wrapX, + interpolate: t.interpolate + }), this.on, this.once, this.un, this.opaque_ = t.opaque !== void 0 ? t.opaque : !1, this.tilePixelRatio_ = t.tilePixelRatio !== void 0 ? t.tilePixelRatio : 1, this.tileGrid = t.tileGrid !== void 0 ? t.tileGrid : null; + const e = [256, 256]; + this.tileGrid && ae(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()), e), this.tileCache = new Td(t.cacheSize || 0), this.tmpSize = [0, 0], this.key_ = t.key || "", this.tileOptions = { + transition: t.transition, + interpolate: t.interpolate + }, this.zDirection = t.zDirection ? t.zDirection : 0; } - closestPointXY(t, e, i, s) { - if (s < dn(this.getExtent(), t, e)) - return s; - const r = this.flatCoordinates, o = this.stride; - for (let a = 0, l = r.length; a < l; a += o) { - const h = ri( - t, - e, - r[a], - r[a + 1] - ); - if (h < s) { - s = h; - for (let c = 0; c < o; ++c) - i[c] = r[a + c]; - i.length = o; - } - } - return s; + canExpireCache() { + return this.tileCache.canExpireCache(); } - getCoordinates() { - return Ei( - this.flatCoordinates, - 0, - this.flatCoordinates.length, - this.stride - ); + expireCache(t, e) { + const n = this.getTileCacheForProjection(t); + n && n.expireCache(e); } - getPoint(t) { - const e = this.flatCoordinates ? this.flatCoordinates.length / this.stride : 0; - return t < 0 || e <= t ? null : new Se( - this.flatCoordinates.slice( - t * this.stride, - (t + 1) * this.stride - ), - this.layout - ); + forEachLoadedTile(t, e, n, s) { + const r = this.getTileCacheForProjection(t); + if (!r) + return !1; + let o = !0, a, l, h; + for (let c = n.minX; c <= n.maxX; ++c) + for (let u = n.minY; u <= n.maxY; ++u) + l = vo(e, c, u), h = !1, r.containsKey(l) && (a = r.get(l), h = a.getState() === z.LOADED, h && (h = s(a) !== !1)), h || (o = !1); + return o; } - getPoints() { - const t = this.flatCoordinates, e = this.layout, i = this.stride, s = []; - for (let r = 0, o = t.length; r < o; r += i) { - const a = new Se(t.slice(r, r + i), e); - s.push(a); - } - return s; + getGutterForProjection(t) { + return 0; } - getType() { - return "MultiPoint"; + getKey() { + return this.key_; } - intersectsExtent(t) { - const e = this.flatCoordinates, i = this.stride; - for (let s = 0, r = e.length; s < r; s += i) { - const o = e[s], a = e[s + 1]; - if (pl(t, o, a)) - return !0; - } - return !1; + setKey(t) { + this.key_ !== t && (this.key_ = t, this.changed()); } - setCoordinates(t, e) { - this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = No( - this.flatCoordinates, - 0, - t, - this.stride - ), this.changed(); - } -} -const $o = th; -function e2(n, t, e, i) { - const s = []; - let r = se(); - for (let o = 0, a = e.length; o < a; ++o) { - const l = e[o]; - r = qu( - n, - t, - l[0], - i - ), s.push((r[0] + r[2]) / 2, (r[1] + r[3]) / 2), t = l[l.length - 1]; - } - return s; -} -class _o extends Di { - constructor(t, e, i) { - if (super(), this.endss_ = [], this.flatInteriorPointsRevision_ = -1, this.flatInteriorPoints_ = null, this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, this.orientedRevision_ = -1, this.orientedFlatCoordinates_ = null, !i && !Array.isArray(t[0])) { - let s = this.getLayout(); - const r = t, o = [], a = []; - for (let l = 0, h = r.length; l < h; ++l) { - const c = r[l]; - l === 0 && (s = c.getLayout()); - const u = o.length, d = c.getEnds(); - for (let f = 0, g = d.length; f < g; ++f) - d[f] += u; - Qt(o, c.getFlatCoordinates()), a.push(d); - } - e = s, t = o, i = a; - } - e !== void 0 && i ? (this.setFlatCoordinates( - e, - t - ), this.endss_ = i) : this.setCoordinates( - t, - e - ); - } - appendPolygon(t) { - let e; - if (!this.flatCoordinates) - this.flatCoordinates = t.getFlatCoordinates().slice(), e = t.getEnds().slice(), this.endss_.push(); - else { - const i = this.flatCoordinates.length; - Qt(this.flatCoordinates, t.getFlatCoordinates()), e = t.getEnds().slice(); - for (let s = 0, r = e.length; s < r; ++s) - e[s] += i; - } - this.endss_.push(e), this.changed(); - } - clone() { - const t = this.endss_.length, e = new Array(t); - for (let s = 0; s < t; ++s) - e[s] = this.endss_[s].slice(); - const i = new _o( - this.flatCoordinates.slice(), - this.layout, - e - ); - return i.applyProperties(this), i; - } - closestPointXY(t, e, i, s) { - return s < dn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( - u1( - this.flatCoordinates, - 0, - this.endss_, - this.stride, - 0 - ) - ), this.maxDeltaRevision_ = this.getRevision()), d1( - this.getOrientedFlatCoordinates(), - 0, - this.endss_, - this.stride, - this.maxDelta_, - !0, - t, - e, - i, - s - )); - } - containsXY(t, e) { - return v1( - this.getOrientedFlatCoordinates(), - 0, - this.endss_, - this.stride, - t, - e - ); + getOpaque(t) { + return this.opaque_; } - getArea() { - return p1( - this.getOrientedFlatCoordinates(), - 0, - this.endss_, - this.stride - ); + getResolutions() { + return this.tileGrid ? this.tileGrid.getResolutions() : null; } - getCoordinates(t) { - let e; - return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), sc( - e, - 0, - this.endss_, - this.stride, - t - )) : e = this.flatCoordinates, $a( - e, - 0, - this.endss_, - this.stride - ); + getTile(t, e, n, s, r) { + return W(); } - getEndss() { - return this.endss_; + getTileGrid() { + return this.tileGrid; } - getFlatInteriorPoints() { - if (this.flatInteriorPointsRevision_ != this.getRevision()) { - const t = e2( - this.flatCoordinates, - 0, - this.endss_, - this.stride - ); - this.flatInteriorPoints_ = x1( - this.getOrientedFlatCoordinates(), - 0, - this.endss_, - this.stride, - t - ), this.flatInteriorPointsRevision_ = this.getRevision(); - } - return this.flatInteriorPoints_; + getTileGridForProjection(t) { + return this.tileGrid ? this.tileGrid : Fd(t); } - getInteriorPoints() { - return new $o(this.getFlatInteriorPoints().slice(), "XYM"); + getTileCacheForProjection(t) { + const e = this.getProjection(); + return Y( + e === null || be(e, t), + 68 + ), this.tileCache; } - getOrientedFlatCoordinates() { - if (this.orientedRevision_ != this.getRevision()) { - const t = this.flatCoordinates; - w1(t, 0, this.endss_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = sc( - this.orientedFlatCoordinates_, - 0, - this.endss_, - this.stride - )), this.orientedRevision_ = this.getRevision(); - } - return this.orientedFlatCoordinates_; + getTilePixelRatio(t) { + return this.tilePixelRatio_; } - getSimplifiedGeometryInternal(t) { - const e = [], i = []; - return e.length = _1( - this.flatCoordinates, - 0, - this.endss_, - this.stride, - Math.sqrt(t), - e, - 0, - i - ), new _o(e, "XY", i); + getTilePixelSize(t, e, n) { + const s = this.getTileGridForProjection(n), r = this.getTilePixelRatio(e), o = ae(s.getTileSize(t), this.tmpSize); + return r == 1 ? o : Z1(o, r, this.tmpSize); } - getPolygon(t) { - if (t < 0 || this.endss_.length <= t) - return null; - let e; - if (t === 0) - e = 0; - else { - const r = this.endss_[t - 1]; - e = r[r.length - 1]; - } - const i = this.endss_[t].slice(), s = i[i.length - 1]; - if (e !== 0) - for (let r = 0, o = i.length; r < o; ++r) - i[r] -= e; - return new Ai( - this.flatCoordinates.slice(e, s), - this.layout, - i - ); + getTileCoordForTileUrlFunction(t, e) { + e = e !== void 0 ? e : this.getProjection(); + const n = this.getTileGridForProjection(e); + return this.getWrapX() && e.isGlobal() && (t = P2(n, t, e)), f2(t, n) ? t : null; } - getPolygons() { - const t = this.layout, e = this.flatCoordinates, i = this.endss_, s = []; - let r = 0; - for (let o = 0, a = i.length; o < a; ++o) { - const l = i[o].slice(), h = l[l.length - 1]; - if (r !== 0) - for (let u = 0, d = l.length; u < d; ++u) - l[u] -= r; - const c = new Ai( - e.slice(r, h), - t, - l - ); - s.push(c), r = h; - } - return s; + clear() { + this.tileCache.clear(); } - getType() { - return "MultiPolygon"; + refresh() { + this.clear(), super.refresh(); } - intersectsExtent(t) { - return M1( - this.getOrientedFlatCoordinates(), - 0, - this.endss_, - this.stride, - t - ); + updateCacheSize(t, e) { + const n = this.getTileCacheForProjection(e); + t > n.highWaterMark && (n.highWaterMark = t); } - setCoordinates(t, e) { - this.setLayout(e, t, 3), this.flatCoordinates || (this.flatCoordinates = []); - const i = f1( - this.flatCoordinates, - 0, - t, - this.stride, - this.endss_ - ); - if (i.length === 0) - this.flatCoordinates.length = 0; - else { - const s = i[i.length - 1]; - this.flatCoordinates.length = s.length === 0 ? 0 : s[s.length - 1]; - } - this.changed(); + useTile(t, e, n, s) { } } -const rr = _o, Or = { - DRAWSTART: "drawstart", - DRAWEND: "drawend", - DRAWABORT: "drawabort" -}; -class Fr extends Re { +class k2 extends ke { constructor(t, e) { - super(t), this.feature = e; + super(t), this.tile = e; } } -function i2(n, t) { - const e = []; - for (let i = 0; i < t.length; ++i) { - const r = t[i].getGeometry(); - af(n, r, e); - } - return e; +const G2 = D2; +function $2(i, t) { + const e = /\{z\}/g, n = /\{x\}/g, s = /\{y\}/g, r = /\{-y\}/g; + return function(o, a, l) { + if (o) + return i.replace(e, o[0].toString()).replace(n, o[1].toString()).replace(s, o[2].toString()).replace(r, function() { + const h = o[0], c = t.getFullTileRange(h); + return Y(c, 55), (c.getHeight() - o[2] - 1).toString(); + }); + }; } -function Nr(n, t) { - return ri(n[0], n[1], t[0], t[1]); +function B2(i, t) { + const e = i.length, n = new Array(e); + for (let s = 0; s < e; ++s) + n[s] = $2(i[s], t); + return Sa(n); } -function An(n, t) { - const e = n.length; - return t < 0 ? n[t + e] : t >= e ? n[t - e] : n[t]; +function Sa(i) { + return i.length === 1 ? i[0] : function(t, e, n) { + if (t) { + const s = d2(t), r = Sn(s, i.length); + return i[r](t, e, n); + } else + return; + }; } -function Dr(n, t, e) { - let i, s; - t < e ? (i = t, s = e) : (i = e, s = t); - const r = Math.ceil(i), o = Math.floor(s); - if (r > o) { - const l = On(n, i), h = On(n, s); - return Nr(l, h); - } - let a = 0; - if (i < r) { - const l = On(n, i), h = An(n, r); - a += Nr(l, h); - } - if (o < s) { - const l = An(n, o), h = On(n, s); - a += Nr(l, h); +function kd(i) { + const t = []; + let e = /\{([a-z])-([a-z])\}/.exec(i); + if (e) { + const n = e[1].charCodeAt(0), s = e[2].charCodeAt(0); + let r; + for (r = n; r <= s; ++r) + t.push(i.replace(e[0], String.fromCharCode(r))); + return t; } - for (let l = r; l < o - 1; ++l) { - const h = An(n, l), c = An(n, l + 1); - a += Nr(h, c); + if (e = /\{(\d+)-(\d+)\}/.exec(i), e) { + const n = parseInt(e[2], 10); + for (let s = parseInt(e[1], 10); s <= n; s++) + t.push(i.replace(e[0], s.toString())); + return t; } - return a; + return t.push(i), t; } -function af(n, t, e) { - if (t instanceof li) { - kr(n, t.getCoordinates(), !1, e); - return; +class Sl extends G2 { + constructor(t) { + super({ + attributions: t.attributions, + cacheSize: t.cacheSize, + opaque: t.opaque, + projection: t.projection, + state: t.state, + tileGrid: t.tileGrid, + tilePixelRatio: t.tilePixelRatio, + wrapX: t.wrapX, + transition: t.transition, + interpolate: t.interpolate, + key: t.key, + attributionsCollapsible: t.attributionsCollapsible, + zDirection: t.zDirection + }), this.generateTileUrlFunction_ = this.tileUrlFunction === Sl.prototype.tileUrlFunction, this.tileLoadFunction = t.tileLoadFunction, t.tileUrlFunction && (this.tileUrlFunction = t.tileUrlFunction), this.urls = null, t.urls ? this.setUrls(t.urls) : t.url && this.setUrl(t.url), this.tileLoadingKeys_ = {}; } - if (t instanceof sr) { - const i = t.getCoordinates(); - for (let s = 0, r = i.length; s < r; ++s) - kr(n, i[s], !1, e); - return; + getTileLoadFunction() { + return this.tileLoadFunction; } - if (t instanceof Ai) { - const i = t.getCoordinates(); - for (let s = 0, r = i.length; s < r; ++s) - kr(n, i[s], !0, e); - return; + getTileUrlFunction() { + return Object.getPrototypeOf(this).tileUrlFunction === this.tileUrlFunction ? this.tileUrlFunction.bind(this) : this.tileUrlFunction; } - if (t instanceof rr) { - const i = t.getCoordinates(); - for (let s = 0, r = i.length; s < r; ++s) { - const o = i[s]; - for (let a = 0, l = o.length; a < l; ++a) - kr(n, o[a], !0, e); - } - return; + getUrls() { + return this.urls; } - if (t instanceof of) { - const i = t.getGeometries(); - for (let s = 0; s < i.length; ++s) - af(n, i[s], e); - return; + handleTileChange(t) { + const e = t.target, n = rt(e), s = e.getState(); + let r; + s == z.LOADING ? (this.tileLoadingKeys_[n] = !0, r = qo.TILELOADSTART) : n in this.tileLoadingKeys_ && (delete this.tileLoadingKeys_[n], r = s == z.ERROR ? qo.TILELOADERROR : s == z.LOADED ? qo.TILELOADEND : void 0), r != null && this.dispatchEvent(new k2(r, e)); } -} -const ma = { index: -1, endIndex: NaN }; -function n2(n, t, e, i) { - const s = n[0], r = n[1]; - let o = 1 / 0, a = -1, l = NaN; - for (let u = 0; u < t.targets.length; ++u) { - const d = t.targets[u], f = d.coordinates; - let g = 1 / 0, m; - for (let _ = 0; _ < f.length - 1; ++_) { - const y = f[_], p = f[_ + 1], v = lf(s, r, y, p); - v.squaredDistance < g && (g = v.squaredDistance, m = _ + v.along); - } - g < o && (o = g, d.ring && t.targetIndex === u && (d.endIndex > d.startIndex ? m < d.startIndex && (m += f.length) : d.endIndex < d.startIndex && m > d.startIndex && (m -= f.length)), l = m, a = u); - } - const h = t.targets[a]; - let c = h.ring; - if (t.targetIndex === a && c) { - const u = On( - h.coordinates, - l - ), d = e.getPixelFromCoordinate(u); - eo(d, t.startPx) > i && (c = !1); - } - if (c) { - const u = h.coordinates, d = u.length, f = h.startIndex, g = l; - if (f < g) { - const m = Dr( - u, - f, - g - ); - Dr( - u, - f, - g - d - ) < m && (l -= d); - } else { - const m = Dr( - u, - f, - g - ); - Dr( - u, - f, - g + d - ) < m && (l += d); - } - } - return ma.index = a, ma.endIndex = l, ma; -} -function kr(n, t, e, i) { - const s = n[0], r = n[1]; - for (let o = 0, a = t.length - 1; o < a; ++o) { - const l = t[o], h = t[o + 1], c = lf(s, r, l, h); - if (c.squaredDistance === 0) { - const u = o + c.along; - i.push({ - coordinates: t, - ring: e, - startIndex: u, - endIndex: u - }); - return; - } + setTileLoadFunction(t) { + this.tileCache.clear(), this.tileLoadFunction = t, this.changed(); } -} -const _a = { along: 0, squaredDistance: 0 }; -function lf(n, t, e, i) { - const s = e[0], r = e[1], o = i[0], a = i[1], l = o - s, h = a - r; - let c = 0, u = s, d = r; - return (l !== 0 || h !== 0) && (c = Et(((n - s) * l + (t - r) * h) / (l * l + h * h), 0, 1), u += l * c, d += h * c), _a.along = c, _a.squaredDistance = xl(ri(n, t, u, d), 10), _a; -} -function On(n, t) { - const e = n.length; - let i = Math.floor(t); - const s = t - i; - i >= e ? i -= e : i < 0 && (i += e); - let r = i + 1; - r >= e && (r -= e); - const o = n[i], a = o[0], l = o[1], h = n[r], c = h[0] - a, u = h[1] - l; - return [a + c * s, l + u * s]; -} -class s2 extends ki { - constructor(t) { - const e = t; - e.stopDown || (e.stopDown = un), super(e), this.on, this.once, this.un, this.shouldHandle_ = !1, this.downPx_ = null, this.downTimeout_, this.lastDragTime_, this.pointerType_, this.freehand_ = !1, this.source_ = t.source ? t.source : null, this.features_ = t.features ? t.features : null, this.snapTolerance_ = t.snapTolerance ? t.snapTolerance : 12, this.type_ = t.type, this.mode_ = o2(this.type_), this.stopClick_ = !!t.stopClick, this.minPoints_ = t.minPoints ? t.minPoints : this.mode_ === "Polygon" ? 3 : 2, this.maxPoints_ = this.mode_ === "Circle" ? 2 : t.maxPoints ? t.maxPoints : 1 / 0, this.finishCondition_ = t.finishCondition ? t.finishCondition : en, this.geometryLayout_ = t.geometryLayout ? t.geometryLayout : "XY"; - let i = t.geometryFunction; - if (!i) { - const s = this.mode_; - if (s === "Circle") - i = function(r, o, a) { - const l = o || new t2([NaN, NaN]), h = vt(r[0]), c = oi( - h, - vt(r[r.length - 1]) - ); - return l.setCenterAndRadius( - h, - Math.sqrt(c), - this.geometryLayout_ - ), l; - }; - else { - let r; - s === "Point" ? r = Se : s === "LineString" ? r = li : s === "Polygon" && (r = Ai), i = function(o, a, l) { - return a ? s === "Polygon" ? o[0].length ? a.setCoordinates( - [o[0].concat([o[0][0]])], - this.geometryLayout_ - ) : a.setCoordinates([], this.geometryLayout_) : a.setCoordinates(o, this.geometryLayout_) : a = new r(o, this.geometryLayout_), a; - }; - } - } - this.geometryFunction_ = i, this.dragVertexDelay_ = t.dragVertexDelay !== void 0 ? t.dragVertexDelay : 500, this.finishCoordinate_ = null, this.sketchFeature_ = null, this.sketchPoint_ = null, this.sketchCoords_ = null, this.sketchLine_ = null, this.sketchLineCoords_ = null, this.squaredClickTolerance_ = t.clickTolerance ? t.clickTolerance * t.clickTolerance : 36, this.overlay_ = new Ze({ - source: new Ve({ - useSpatialIndex: !1, - wrapX: t.wrapX ? t.wrapX : !1 - }), - style: t.style ? t.style : r2(), - updateWhileInteracting: !0 - }), this.geometryName_ = t.geometryName, this.condition_ = t.condition ? t.condition : Wl, this.freehandCondition_, t.freehand ? this.freehandCondition_ = co : this.freehandCondition_ = t.freehandCondition ? t.freehandCondition : Fd, this.traceCondition_, this.setTrace(t.trace || !1), this.traceState_ = { active: !1 }, this.traceSource_ = t.traceSource || t.source || null, this.addChangeListener(Za.ACTIVE, this.updateState_); + setTileUrlFunction(t, e) { + this.tileUrlFunction = t, this.tileCache.pruneExceptNewestZ(), typeof e < "u" ? this.setKey(e) : this.changed(); } - setTrace(t) { - let e; - t ? t === !0 ? e = co : e = t : e = Y1, this.traceCondition_ = e; + setUrl(t) { + const e = kd(t); + this.urls = e, this.setUrls(e); } - setMap(t) { - super.setMap(t), this.updateState_(); + setUrls(t) { + this.urls = t; + const e = t.join(` +`); + this.generateTileUrlFunction_ ? this.setTileUrlFunction(B2(t, this.tileGrid), e) : this.setKey(e); } - getOverlay() { - return this.overlay_; + tileUrlFunction(t, e, n) { } - handleEvent(t) { - t.originalEvent.type === U.CONTEXTMENU && t.originalEvent.preventDefault(), this.freehand_ = this.mode_ !== "Point" && this.freehandCondition_(t); - let e = t.type === nt.POINTERMOVE, i = !0; - return !this.freehand_ && this.lastDragTime_ && t.type === nt.POINTERDRAG && (Date.now() - this.lastDragTime_ >= this.dragVertexDelay_ ? (this.downPx_ = t.pixel, this.shouldHandle_ = !this.freehand_, e = !0) : this.lastDragTime_ = void 0, this.shouldHandle_ && this.downTimeout_ !== void 0 && (clearTimeout(this.downTimeout_), this.downTimeout_ = void 0)), this.freehand_ && t.type === nt.POINTERDRAG && this.sketchFeature_ !== null ? (this.addToDrawing_(t.coordinate), i = !1) : this.freehand_ && t.type === nt.POINTERDOWN ? i = !1 : e && this.getPointerCount() < 2 ? (i = t.type === nt.POINTERMOVE, i && this.freehand_ ? (this.handlePointerMove_(t), this.shouldHandle_ && t.originalEvent.preventDefault()) : (t.originalEvent.pointerType === "mouse" || t.type === nt.POINTERDRAG && this.downTimeout_ === void 0) && this.handlePointerMove_(t)) : t.type === nt.DBLCLICK && (i = !1), super.handleEvent(t) && i; + useTile(t, e, n) { + const s = vo(t, e, n); + this.tileCache.containsKey(s) && this.tileCache.get(s); } - handleDownEvent(t) { - return this.shouldHandle_ = !this.freehand_, this.freehand_ ? (this.downPx_ = t.pixel, this.finishCoordinate_ || this.startDrawing_(t.coordinate), !0) : this.condition_(t) ? (this.lastDragTime_ = Date.now(), this.downTimeout_ = setTimeout( - function() { - this.handlePointerMove_( - new ei( - nt.POINTERMOVE, - t.map, - t.originalEvent, - !1, - t.frameState - ) - ); - }.bind(this), - this.dragVertexDelay_ - ), this.downPx_ = t.pixel, !0) : (this.lastDragTime_ = void 0, !1); +} +const z2 = Sl; +class Z2 extends z2 { + constructor(t) { + super({ + attributions: t.attributions, + cacheSize: t.cacheSize, + opaque: t.opaque, + projection: t.projection, + state: t.state, + tileGrid: t.tileGrid, + tileLoadFunction: t.tileLoadFunction ? t.tileLoadFunction : U2, + tilePixelRatio: t.tilePixelRatio, + tileUrlFunction: t.tileUrlFunction, + url: t.url, + urls: t.urls, + wrapX: t.wrapX, + transition: t.transition, + interpolate: t.interpolate !== void 0 ? t.interpolate : !0, + key: t.key, + attributionsCollapsible: t.attributionsCollapsible, + zDirection: t.zDirection + }), this.crossOrigin = t.crossOrigin !== void 0 ? t.crossOrigin : null, this.tileClass = t.tileClass !== void 0 ? t.tileClass : bd, this.tileCacheForProjection = {}, this.tileGridForProjection = {}, this.reprojectionErrorThreshold_ = t.reprojectionErrorThreshold, this.renderReprojectionEdges_ = !1; } - deactivateTrace_() { - this.traceState_ = { active: !1 }; + canExpireCache() { + if (this.tileCache.canExpireCache()) + return !0; + for (const t in this.tileCacheForProjection) + if (this.tileCacheForProjection[t].canExpireCache()) + return !0; + return !1; } - toggleTraceState_(t) { - if (!this.traceSource_ || !this.traceCondition_(t)) - return; - if (this.traceState_.active) { - this.deactivateTrace_(); - return; + expireCache(t, e) { + const n = this.getTileCacheForProjection(t); + this.tileCache.expireCache( + this.tileCache == n ? e : {} + ); + for (const s in this.tileCacheForProjection) { + const r = this.tileCacheForProjection[s]; + r.expireCache(r == n ? e : {}); } - const e = this.getMap(), i = e.getCoordinateFromPixel([ - t.pixel[0] - this.snapTolerance_, - t.pixel[1] + this.snapTolerance_ - ]), s = e.getCoordinateFromPixel([ - t.pixel[0] + this.snapTolerance_, - t.pixel[1] - this.snapTolerance_ - ]), r = Ut([i, s]), o = this.traceSource_.getFeaturesInExtent(r); - if (o.length === 0) - return; - const a = i2(t.coordinate, o); - a.length && (this.traceState_ = { - active: !0, - startPx: t.pixel.slice(), - targets: a, - targetIndex: -1 - }); } - addOrRemoveTracedCoordinates_(t, e) { - const i = t.startIndex <= t.endIndex, s = t.startIndex <= e; - i === s ? i && e > t.endIndex || !i && e < t.endIndex ? this.addTracedCoordinates_(t, t.endIndex, e) : (i && e < t.endIndex || !i && e > t.endIndex) && this.removeTracedCoordinates_(e, t.endIndex) : (this.removeTracedCoordinates_(t.startIndex, t.endIndex), this.addTracedCoordinates_(t, t.startIndex, e)); + getGutterForProjection(t) { + return this.getProjection() && t && !be(this.getProjection(), t) ? 0 : this.getGutter(); } - removeTracedCoordinates_(t, e) { - if (t === e) - return; - let i = 0; - if (t < e) { - const s = Math.ceil(t); - let r = Math.floor(e); - r === e && (r -= 1), i = r - s + 1; - } else { - const s = Math.floor(t); - let r = Math.ceil(e); - r === e && (r += 1), i = s - r + 1; + getGutter() { + return 0; + } + getKey() { + let t = super.getKey(); + return this.getInterpolate() || (t += ":disable-interpolation"), t; + } + getOpaque(t) { + return this.getProjection() && t && !be(this.getProjection(), t) ? !1 : super.getOpaque(t); + } + getTileGridForProjection(t) { + const e = this.getProjection(); + if (this.tileGrid && (!e || be(e, t))) + return this.tileGrid; + { + const n = rt(t); + return n in this.tileGridForProjection || (this.tileGridForProjection[n] = Fd(t)), this.tileGridForProjection[n]; } - i > 0 && this.removeLastPoints_(i); } - addTracedCoordinates_(t, e, i) { - if (e === i) - return; - const s = []; - if (e < i) { - const r = Math.ceil(e); - let o = Math.floor(i); - o === i && (o -= 1); - for (let a = r; a <= o; ++a) - s.push(An(t.coordinates, a)); - } else { - const r = Math.floor(e); - let o = Math.ceil(i); - o === i && (o += 1); - for (let a = r; a >= o; --a) - s.push(An(t.coordinates, a)); + getTileCacheForProjection(t) { + const e = this.getProjection(); + if (!e || be(e, t)) + return this.tileCache; + { + const n = rt(t); + return n in this.tileCacheForProjection || (this.tileCacheForProjection[n] = new Td( + this.tileCache.highWaterMark + )), this.tileCacheForProjection[n]; } - s.length && this.appendCoordinates(s); } - updateTrace_(t) { - const e = this.traceState_; - if (!e.active || e.targetIndex === -1 && eo(e.startPx, t.pixel) < this.snapTolerance_) - return; - const i = n2( - t.coordinate, - e, - this.getMap(), - this.snapTolerance_ + createTile_(t, e, n, s, r, o) { + const a = [t, e, n], l = this.getTileCoordForTileUrlFunction( + a, + r + ), h = l ? this.tileUrlFunction(l, s, r) : void 0, c = new this.tileClass( + a, + h !== void 0 ? z.IDLE : z.EMPTY, + h !== void 0 ? h : "", + this.crossOrigin, + this.tileLoadFunction, + this.tileOptions ); - if (e.targetIndex !== i.index) { - if (e.targetIndex !== -1) { - const l = e.targets[e.targetIndex]; - this.removeTracedCoordinates_(l.startIndex, l.endIndex); - } - const a = e.targets[i.index]; - this.addTracedCoordinates_( - a, - a.startIndex, - i.endIndex - ); - } else { - const a = e.targets[e.targetIndex]; - this.addOrRemoveTracedCoordinates_(a, i.endIndex); - } - e.targetIndex = i.index; - const s = e.targets[e.targetIndex]; - s.endIndex = i.endIndex; - const r = On( - s.coordinates, - s.endIndex - ), o = this.getMap().getPixelFromCoordinate(r); - t.coordinate = r, t.pixel = [Math.round(o[0]), Math.round(o[1])]; + return c.key = o, c.addEventListener(X.CHANGE, this.handleTileChange.bind(this)), c; } - handleUpEvent(t) { - let e = !0; - if (this.getPointerCount() === 0) { - this.downTimeout_ && (clearTimeout(this.downTimeout_), this.downTimeout_ = void 0), this.handlePointerMove_(t); - const i = this.traceState_.active; - if (this.toggleTraceState_(t), this.shouldHandle_) { - const s = !this.finishCoordinate_; - s && this.startDrawing_(t.coordinate), !s && this.freehand_ ? this.finishDrawing() : !this.freehand_ && (!s || this.mode_ === "Point") && (this.atFinish_(t.pixel, i) ? this.finishCondition_(t) && this.finishDrawing() : this.addToDrawing_(t.coordinate)), e = !1; - } else - this.freehand_ && this.abortDrawing(); + getTile(t, e, n, s, r) { + const o = this.getProjection(); + if (!o || !r || be(o, r)) + return this.getTileInternal( + t, + e, + n, + s, + o || r + ); + { + const a = this.getTileCacheForProjection(r), l = [t, e, n]; + let h; + const c = Ld(l); + a.containsKey(c) && (h = a.get(c)); + const u = this.getKey(); + if (h && h.key == u) + return h; + { + const d = this.getTileGridForProjection(o), f = this.getTileGridForProjection(r), g = this.getTileCoordForTileUrlFunction( + l, + r + ), m = new wa( + o, + d, + r, + f, + l, + g, + this.getTilePixelRatio(s), + this.getGutter(), + function(_, y, p, v) { + return this.getTileInternal(_, y, p, v, o); + }.bind(this), + this.reprojectionErrorThreshold_, + this.renderReprojectionEdges_, + this.getInterpolate() + ); + return m.key = u, h ? (m.interimTile = h, m.refreshInterimChain(), a.replace(c, m)) : a.set(c, m), m; + } } - return !e && this.stopClick_ && t.preventDefault(), e; } - handlePointerMove_(t) { - if (this.pointerType_ = t.originalEvent.pointerType, this.downPx_ && (!this.freehand_ && this.shouldHandle_ || this.freehand_ && !this.shouldHandle_)) { - const e = this.downPx_, i = t.pixel, s = e[0] - i[0], r = e[1] - i[1], o = s * s + r * r; - if (this.shouldHandle_ = this.freehand_ ? o > this.squaredClickTolerance_ : o <= this.squaredClickTolerance_, !this.shouldHandle_) - return; + getTileInternal(t, e, n, s, r) { + let o = null; + const a = vo(t, e, n), l = this.getKey(); + if (!this.tileCache.containsKey(a)) + o = this.createTile_(t, e, n, s, r, l), this.tileCache.set(a, o); + else if (o = this.tileCache.get(a), o.key != l) { + const h = o; + o = this.createTile_(t, e, n, s, r, l), h.getState() == z.IDLE ? o.interimTile = h.interimTile : o.interimTile = h, o.refreshInterimChain(), this.tileCache.replace(a, o); } - if (!this.finishCoordinate_) { - this.createOrUpdateSketchPoint_(t.coordinate.slice()); - return; + return o; + } + setRenderReprojectionEdges(t) { + if (this.renderReprojectionEdges_ != t) { + this.renderReprojectionEdges_ = t; + for (const e in this.tileCacheForProjection) + this.tileCacheForProjection[e].clear(); + this.changed(); } - this.updateTrace_(t), this.modifyDrawing_(t.coordinate); } - atFinish_(t, e) { - let i = !1; - if (this.sketchFeature_) { - let s = !1, r = [this.finishCoordinate_]; - const o = this.mode_; - if (o === "Point") - i = !0; - else if (o === "Circle") - i = this.sketchCoords_.length === 2; - else if (o === "LineString") - s = !e && this.sketchCoords_.length > this.minPoints_; - else if (o === "Polygon") { - const a = this.sketchCoords_; - s = a[0].length > this.minPoints_, r = [ - a[0][0], - a[0][a[0].length - 2] - ], e ? r = [a[0][0]] : r = [ - a[0][0], - a[0][a[0].length - 2] - ]; - } - if (s) { - const a = this.getMap(); - for (let l = 0, h = r.length; l < h; l++) { - const c = r[l], u = a.getPixelFromCoordinate(c), d = t[0] - u[0], f = t[1] - u[1], g = this.freehand_ ? 1 : this.snapTolerance_; - if (i = Math.sqrt(d * d + f * f) <= g, i) { - this.finishCoordinate_ = c; - break; - } - } - } + setTileGridForProjection(t, e) { + const n = J(t); + if (n) { + const s = rt(n); + s in this.tileGridForProjection || (this.tileGridForProjection[s] = e); } - return i; } - createOrUpdateSketchPoint_(t) { - this.sketchPoint_ ? this.sketchPoint_.getGeometry().setCoordinates(t) : (this.sketchPoint_ = new Ie(new Se(t)), this.updateSketchFeatures_()); - } - createOrUpdateCustomSketchLine_(t) { - this.sketchLine_ || (this.sketchLine_ = new Ie()); - const e = t.getLinearRing(0); - let i = this.sketchLine_.getGeometry(); - i ? (i.setFlatCoordinates( - e.getLayout(), - e.getFlatCoordinates() - ), i.changed()) : (i = new li( - e.getFlatCoordinates(), - e.getLayout() - ), this.sketchLine_.setGeometry(i)); - } - startDrawing_(t) { - const e = this.getMap().getView().getProjection(), i = lo(this.geometryLayout_); - for (; t.length < i; ) - t.push(0); - this.finishCoordinate_ = t, this.mode_ === "Point" ? this.sketchCoords_ = t.slice() : this.mode_ === "Polygon" ? (this.sketchCoords_ = [[t.slice(), t.slice()]], this.sketchLineCoords_ = this.sketchCoords_[0]) : this.sketchCoords_ = [t.slice(), t.slice()], this.sketchLineCoords_ && (this.sketchLine_ = new Ie(new li(this.sketchLineCoords_))); - const s = this.geometryFunction_( - this.sketchCoords_, - void 0, - e - ); - this.sketchFeature_ = new Ie(), this.geometryName_ && this.sketchFeature_.setGeometryName(this.geometryName_), this.sketchFeature_.setGeometry(s), this.updateSketchFeatures_(), this.dispatchEvent( - new Fr(Or.DRAWSTART, this.sketchFeature_) - ); + clear() { + super.clear(); + for (const t in this.tileCacheForProjection) + this.tileCacheForProjection[t].clear(); } - modifyDrawing_(t) { - const e = this.getMap(), i = this.sketchFeature_.getGeometry(), s = e.getView().getProjection(), r = lo(this.geometryLayout_); - let o, a; - for (; t.length < r; ) - t.push(0); - this.mode_ === "Point" ? a = this.sketchCoords_ : this.mode_ === "Polygon" ? (o = this.sketchCoords_[0], a = o[o.length - 1], this.atFinish_(e.getPixelFromCoordinate(t)) && (t = this.finishCoordinate_.slice())) : (o = this.sketchCoords_, a = o[o.length - 1]), a[0] = t[0], a[1] = t[1], this.geometryFunction_( - this.sketchCoords_, - i, - s - ), this.sketchPoint_ && this.sketchPoint_.getGeometry().setCoordinates(t), i.getType() === "Polygon" && this.mode_ !== "Polygon" ? this.createOrUpdateCustomSketchLine_(i) : this.sketchLineCoords_ && this.sketchLine_.getGeometry().setCoordinates(this.sketchLineCoords_), this.updateSketchFeatures_(); +} +function U2(i, t) { + i.getImage().src = t; +} +const V2 = Z2; +class W2 extends Ws { + constructor(t) { + super({ + attributions: t.attributions, + wrapX: t.wrapX + }), this.resolution = void 0, this.distance = t.distance !== void 0 ? t.distance : 20, this.minDistance = t.minDistance || 0, this.interpolationRatio = 0, this.features = [], this.geometryFunction = t.geometryFunction || function(e) { + const n = e.getGeometry(); + return Y(n.getType() == "Point", 10), n; + }, this.createCustomCluster_ = t.createCluster, this.source = null, this.boundRefresh_ = this.refresh.bind(this), this.updateDistance(this.distance, this.minDistance), this.setSource(t.source || null); } - addToDrawing_(t) { - const e = this.sketchFeature_.getGeometry(), i = this.getMap().getView().getProjection(); - let s, r; - const o = this.mode_; - o === "LineString" || o === "Circle" ? (this.finishCoordinate_ = t.slice(), r = this.sketchCoords_, r.length >= this.maxPoints_ && (this.freehand_ ? r.pop() : s = !0), r.push(t.slice()), this.geometryFunction_(r, e, i)) : o === "Polygon" && (r = this.sketchCoords_[0], r.length >= this.maxPoints_ && (this.freehand_ ? r.pop() : s = !0), r.push(t.slice()), s && (this.finishCoordinate_ = r[0]), this.geometryFunction_(this.sketchCoords_, e, i)), this.createOrUpdateSketchPoint_(t.slice()), this.updateSketchFeatures_(), s && this.finishDrawing(); + clear(t) { + this.features.length = 0, super.clear(t); } - removeLastPoints_(t) { - if (!this.sketchFeature_) - return; - const e = this.sketchFeature_.getGeometry(), i = this.getMap().getView().getProjection(), s = this.mode_; - for (let r = 0; r < t; ++r) { - let o; - if (s === "LineString" || s === "Circle") { - if (o = this.sketchCoords_, o.splice(-2, 1), o.length >= 2) { - this.finishCoordinate_ = o[o.length - 2].slice(); - const a = this.finishCoordinate_.slice(); - o[o.length - 1] = a, this.createOrUpdateSketchPoint_(a); - } - this.geometryFunction_(o, e, i), e.getType() === "Polygon" && this.sketchLine_ && this.createOrUpdateCustomSketchLine_( - e - ); - } else if (s === "Polygon") { - o = this.sketchCoords_[0], o.splice(-2, 1); - const a = this.sketchLine_.getGeometry(); - if (o.length >= 2) { - const l = o[o.length - 2].slice(); - o[o.length - 1] = l, this.createOrUpdateSketchPoint_(l); - } - a.setCoordinates(o), this.geometryFunction_(this.sketchCoords_, e, i); - } - if (o.length === 1) { - this.abortDrawing(); - break; - } - } - this.updateSketchFeatures_(); + getDistance() { + return this.distance; } - removeLastPoint() { - this.removeLastPoints_(1); + getSource() { + return this.source; } - finishDrawing() { - const t = this.abortDrawing_(); - if (!t) - return; - let e = this.sketchCoords_; - const i = t.getGeometry(), s = this.getMap().getView().getProjection(); - this.mode_ === "LineString" ? (e.pop(), this.geometryFunction_(e, i, s)) : this.mode_ === "Polygon" && (e[0].pop(), this.geometryFunction_(e, i, s), e = i.getCoordinates()), this.type_ === "MultiPoint" ? t.setGeometry( - new $o([e]) - ) : this.type_ === "MultiLineString" ? t.setGeometry( - new sr([e]) - ) : this.type_ === "MultiPolygon" && t.setGeometry( - new rr([e]) - ), this.dispatchEvent(new Fr(Or.DRAWEND, t)), this.features_ && this.features_.push(t), this.source_ && this.source_.addFeature(t); - } - abortDrawing_() { - this.finishCoordinate_ = null; - const t = this.sketchFeature_; - return this.sketchFeature_ = null, this.sketchPoint_ = null, this.sketchLine_ = null, this.overlay_.getSource().clear(!0), this.deactivateTrace_(), t; - } - abortDrawing() { - const t = this.abortDrawing_(); - t && this.dispatchEvent(new Fr(Or.DRAWABORT, t)); - } - appendCoordinates(t) { - const e = this.mode_, i = !this.sketchFeature_; - i && this.startDrawing_(t[0]); - let s; - if (e === "LineString" || e === "Circle") - s = this.sketchCoords_; - else if (e === "Polygon") - s = this.sketchCoords_ && this.sketchCoords_.length ? this.sketchCoords_[0] : []; - else - return; - i && s.shift(), s.pop(); - for (let o = 0; o < t.length; o++) - this.addToDrawing_(t[o]); - const r = t[t.length - 1]; - this.addToDrawing_(r), this.modifyDrawing_(r); + loadFeatures(t, e, n) { + this.source.loadFeatures(t, e, n), e !== this.resolution && (this.resolution = e, this.refresh()); } - extend(t) { - const i = t.getGeometry(); - this.sketchFeature_ = t, this.sketchCoords_ = i.getCoordinates(); - const s = this.sketchCoords_[this.sketchCoords_.length - 1]; - this.finishCoordinate_ = s.slice(), this.sketchCoords_.push(s.slice()), this.sketchPoint_ = new Ie(new Se(s)), this.updateSketchFeatures_(), this.dispatchEvent( - new Fr(Or.DRAWSTART, this.sketchFeature_) - ); + setDistance(t) { + this.updateDistance(t, this.minDistance); } - updateSketchFeatures_() { - const t = []; - this.sketchFeature_ && t.push(this.sketchFeature_), this.sketchLine_ && t.push(this.sketchLine_), this.sketchPoint_ && t.push(this.sketchPoint_); - const e = this.overlay_.getSource(); - e.clear(!0), e.addFeatures(t); + setMinDistance(t) { + this.updateDistance(this.distance, t); } - updateState_() { - const t = this.getMap(), e = this.getActive(); - (!t || !e) && this.abortDrawing(), this.overlay_.setMap(e ? t : null); + getMinDistance() { + return this.minDistance; } -} -function r2() { - const n = Vd(); - return function(t, e) { - return n[t.getGeometry().getType()]; - }; -} -function o2(n) { - switch (n) { - case "Point": - case "MultiPoint": - return "Point"; - case "LineString": - case "MultiLineString": - return "LineString"; - case "Polygon": - case "MultiPolygon": - return "Polygon"; - case "Circle": - return "Circle"; - default: - throw new Error("Invalid type: " + n); + setSource(t) { + this.source && this.source.removeEventListener(X.CHANGE, this.boundRefresh_), this.source = t, t && t.addEventListener(X.CHANGE, this.boundRefresh_), this.refresh(); } -} -const a2 = s2, Tc = 0, Ls = 1, bc = [0, 0, 0, 0], zn = [], pa = { - MODIFYSTART: "modifystart", - MODIFYEND: "modifyend" -}; -class ya extends Re { - constructor(t, e, i) { - super(t), this.features = e, this.mapBrowserEvent = i; + refresh() { + this.clear(), this.cluster(), this.addFeatures(this.features); } -} -class l2 extends ki { - constructor(t) { - super(t), this.on, this.once, this.un, this.boundHandleFeatureChange_ = this.handleFeatureChange_.bind(this), this.condition_ = t.condition ? t.condition : Dd, this.defaultDeleteCondition_ = function(i) { - return W1(i) && j1(i); - }, this.deleteCondition_ = t.deleteCondition ? t.deleteCondition : this.defaultDeleteCondition_, this.insertVertexCondition_ = t.insertVertexCondition ? t.insertVertexCondition : co, this.vertexFeature_ = null, this.vertexSegments_ = null, this.lastPixel_ = [0, 0], this.ignoreNextSingleClick_ = !1, this.featuresBeingModified_ = null, this.rBush_ = new fo(), this.pixelTolerance_ = t.pixelTolerance !== void 0 ? t.pixelTolerance : 10, this.snappedToVertex_ = !1, this.changingFeature_ = !1, this.dragSegments_ = [], this.overlay_ = new Ze({ - source: new Ve({ - useSpatialIndex: !1, - wrapX: !!t.wrapX - }), - style: t.style ? t.style : c2(), - updateWhileAnimating: !0, - updateWhileInteracting: !0 - }), this.SEGMENT_WRITERS_ = { - Point: this.writePointGeometry_.bind(this), - LineString: this.writeLineStringGeometry_.bind(this), - LinearRing: this.writeLineStringGeometry_.bind(this), - Polygon: this.writePolygonGeometry_.bind(this), - MultiPoint: this.writeMultiPointGeometry_.bind(this), - MultiLineString: this.writeMultiLineStringGeometry_.bind(this), - MultiPolygon: this.writeMultiPolygonGeometry_.bind(this), - Circle: this.writeCircleGeometry_.bind(this), - GeometryCollection: this.writeGeometryCollectionGeometry_.bind(this) - }, this.source_ = null, this.hitDetection_ = null; - let e; - if (t.features ? e = t.features : t.source && (this.source_ = t.source, e = new Ee(this.source_.getFeatures()), this.source_.addEventListener( - jt.ADDFEATURE, - this.handleSourceAdd_.bind(this) - ), this.source_.addEventListener( - jt.REMOVEFEATURE, - this.handleSourceRemove_.bind(this) - )), !e) - throw new Error( - "The modify interaction requires features, a source or a layer" - ); - t.hitDetection && (this.hitDetection_ = t.hitDetection), this.features_ = e, this.features_.forEach(this.addFeature_.bind(this)), this.features_.addEventListener( - Dt.ADD, - this.handleFeatureAdd_.bind(this) - ), this.features_.addEventListener( - Dt.REMOVE, - this.handleFeatureRemove_.bind(this) - ), this.lastPointerEvent_ = null, this.delta_ = [0, 0], this.snapToPointer_ = t.snapToPointer === void 0 ? !this.hitDetection_ : t.snapToPointer; - } - addFeature_(t) { - const e = t.getGeometry(); - if (e) { - const s = this.SEGMENT_WRITERS_[e.getType()]; - s && s(t, e); - } - const i = this.getMap(); - i && i.isRendered() && this.getActive() && this.handlePointerAtPixel_(this.lastPixel_, i), t.addEventListener(U.CHANGE, this.boundHandleFeatureChange_); + updateDistance(t, e) { + const n = t === 0 ? 0 : Math.min(e, t) / t, s = t !== this.distance || this.interpolationRatio !== n; + this.distance = t, this.minDistance = e, this.interpolationRatio = n, s && this.refresh(); } - willModifyFeatures_(t, e) { - if (!this.featuresBeingModified_) { - this.featuresBeingModified_ = new Ee(); - const i = this.featuresBeingModified_.getArray(); - for (let s = 0, r = e.length; s < r; ++s) { - const o = e[s]; - for (let a = 0, l = o.length; a < l; ++a) { - const h = o[a].feature; - h && !i.includes(h) && this.featuresBeingModified_.push(h); + cluster() { + if (this.resolution === void 0 || !this.source) + return; + const t = ue(), e = this.distance * this.resolution, n = this.source.getFeatures(), s = {}; + for (let r = 0, o = n.length; r < o; r++) { + const a = n[r]; + if (!(rt(a) in s)) { + const l = this.geometryFunction(a); + if (l) { + const h = l.getCoordinates(); + Cu(h, t), oo(t, e, t); + const c = this.source.getFeaturesInExtent(t).filter(function(u) { + const d = rt(u); + return d in s ? !1 : (s[d] = !0, !0); + }); + this.features.push(this.createCluster(c, t)); } } - this.featuresBeingModified_.getLength() === 0 ? this.featuresBeingModified_ = null : this.dispatchEvent( - new ya( - pa.MODIFYSTART, - this.featuresBeingModified_, - t - ) - ); } } - removeFeature_(t) { - this.removeFeatureSegmentData_(t), this.vertexFeature_ && this.features_.getLength() === 0 && (this.overlay_.getSource().removeFeature(this.vertexFeature_), this.vertexFeature_ = null), t.removeEventListener( - U.CHANGE, - this.boundHandleFeatureChange_ - ); + createCluster(t, e) { + const n = [0, 0]; + for (let a = t.length - 1; a >= 0; --a) { + const l = this.geometryFunction(t[a]); + l ? Pu(n, l.getCoordinates()) : t.splice(a, 1); + } + Ou(n, 1 / t.length); + const s = Mi(e), r = this.interpolationRatio, o = new Ci([ + n[0] * (1 - r) + s[0] * r, + n[1] * (1 - r) + s[1] * r + ]); + return this.createCustomCluster_ ? this.createCustomCluster_(o, t) : new zs({ + geometry: o, + features: t + }); } - removeFeatureSegmentData_(t) { - const e = this.rBush_, i = []; - e.forEach( - function(s) { - t === s.feature && i.push(s); - } +} +const H2 = W2; +function rc(i, t) { + const e = []; + Object.keys(t).forEach(function(s) { + t[s] !== null && t[s] !== void 0 && e.push(s + "=" + encodeURIComponent(t[s])); + }); + const n = e.join("&"); + return i = i.replace(/[?&]$/, ""), i += i.includes("?") ? "&" : "?", i + n; +} +const vr = { + PRELOAD: "preload", + USE_INTERIM_TILES_ON_ERROR: "useInterimTilesOnError" +}; +class X2 extends uo { + constructor(t) { + t = t || {}; + const e = Object.assign({}, t); + delete e.preload, delete e.useInterimTilesOnError, super(e), this.on, this.once, this.un, this.setPreload(t.preload !== void 0 ? t.preload : 0), this.setUseInterimTilesOnError( + t.useInterimTilesOnError !== void 0 ? t.useInterimTilesOnError : !0 ); - for (let s = i.length - 1; s >= 0; --s) { - const r = i[s]; - for (let o = this.dragSegments_.length - 1; o >= 0; --o) - this.dragSegments_[o][0] === r && this.dragSegments_.splice(o, 1); - e.remove(r); - } } - setActive(t) { - this.vertexFeature_ && !t && (this.overlay_.getSource().removeFeature(this.vertexFeature_), this.vertexFeature_ = null), super.setActive(t); + getPreload() { + return this.get(vr.PRELOAD); } - setMap(t) { - this.overlay_.setMap(t), super.setMap(t); + setPreload(t) { + this.set(vr.PRELOAD, t); } - getOverlay() { - return this.overlay_; + getUseInterimTilesOnError() { + return this.get(vr.USE_INTERIM_TILES_ON_ERROR); } - handleSourceAdd_(t) { - t.feature && this.features_.push(t.feature); + setUseInterimTilesOnError(t) { + this.set(vr.USE_INTERIM_TILES_ON_ERROR, t); } - handleSourceRemove_(t) { - t.feature && this.features_.remove(t.feature); + getData(t) { + return super.getData(t); } - handleFeatureAdd_(t) { - this.addFeature_(t.element); +} +const Y2 = X2; +class j2 extends Md { + constructor(t) { + super(t), this.extentChanged = !0, this.renderedExtent_ = null, this.renderedPixelRatio, this.renderedProjection = null, this.renderedRevision, this.renderedTiles = [], this.newTiles_ = !1, this.tmpExtent = ue(), this.tmpTileRange_ = new Ad(0, 0, 0, 0); } - handleFeatureChange_(t) { - if (!this.changingFeature_) { - const e = t.target; - this.removeFeature_(e), this.addFeature_(e); - } + isDrawableTile(t) { + const e = this.getLayer(), n = t.getState(), s = e.getUseInterimTilesOnError(); + return n == z.LOADED || n == z.EMPTY || n == z.ERROR && !s; } - handleFeatureRemove_(t) { - this.removeFeature_(t.element); + getTile(t, e, n, s) { + const r = s.pixelRatio, o = s.viewState.projection, a = this.getLayer(); + let h = a.getSource().getTile(t, e, n, r, o); + return h.getState() == z.ERROR && a.getUseInterimTilesOnError() && a.getPreload() > 0 && (this.newTiles_ = !0), this.isDrawableTile(h) || (h = h.getInterimTile()), h; } - writePointGeometry_(t, e) { - const i = e.getCoordinates(), s = { - feature: t, - geometry: e, - segment: [i, i] - }; - this.rBush_.insert(e.getExtent(), s); - } - writeMultiPointGeometry_(t, e) { - const i = e.getCoordinates(); - for (let s = 0, r = i.length; s < r; ++s) { - const o = i[s], a = { - feature: t, - geometry: e, - depth: [s], - index: s, - segment: [o, o] - }; - this.rBush_.insert(e.getExtent(), a); + getData(t) { + const e = this.frameState; + if (!e) + return null; + const n = this.getLayer(), s = Ft( + e.pixelToCoordinateTransform, + t.slice() + ), r = n.getExtent(); + if (r && !ao(r, s)) + return null; + const o = e.pixelRatio, a = e.viewState.projection, l = e.viewState, h = n.getRenderSource(), c = h.getTileGridForProjection(l.projection), u = h.getTilePixelRatio(e.pixelRatio); + for (let d = c.getZForResolution(l.resolution); d >= c.getMinZoom(); --d) { + const f = c.getTileCoordForCoordAndZ(s, d), g = h.getTile( + d, + f[1], + f[2], + o, + a + ); + if (!(g instanceof bd || g instanceof wa) || g instanceof wa && g.getState() === z.EMPTY) + return null; + if (g.getState() !== z.LOADED) + continue; + const m = c.getOrigin(d), _ = ae(c.getTileSize(d)), y = c.getResolution(d), p = Math.floor( + u * ((s[0] - m[0]) / y - f[1] * _[0]) + ), v = Math.floor( + u * ((m[1] - s[1]) / y - f[2] * _[1]) + ), x = Math.round( + u * h.getGutterForProjection(l.projection) + ); + return this.getImageData(g.getImage(), p + x, v + x); } + return null; } - writeLineStringGeometry_(t, e) { - const i = e.getCoordinates(); - for (let s = 0, r = i.length - 1; s < r; ++s) { - const o = i.slice(s, s + 2), a = { - feature: t, - geometry: e, - index: s, - segment: o - }; - this.rBush_.insert(Ut(o), a); - } - } - writeMultiLineStringGeometry_(t, e) { - const i = e.getCoordinates(); - for (let s = 0, r = i.length; s < r; ++s) { - const o = i[s]; - for (let a = 0, l = o.length - 1; a < l; ++a) { - const h = o.slice(a, a + 2), c = { - feature: t, - geometry: e, - depth: [s], - index: a, - segment: h - }; - this.rBush_.insert(Ut(h), c); - } - } + loadedTileCallback(t, e, n) { + return this.isDrawableTile(n) ? super.loadedTileCallback(t, e, n) : !1; } - writePolygonGeometry_(t, e) { - const i = e.getCoordinates(); - for (let s = 0, r = i.length; s < r; ++s) { - const o = i[s]; - for (let a = 0, l = o.length - 1; a < l; ++a) { - const h = o.slice(a, a + 2), c = { - feature: t, - geometry: e, - depth: [s], - index: a, - segment: h - }; - this.rBush_.insert(Ut(h), c); - } - } + prepareFrame(t) { + return !!this.getLayer().getSource(); } - writeMultiPolygonGeometry_(t, e) { - const i = e.getCoordinates(); - for (let s = 0, r = i.length; s < r; ++s) { - const o = i[s]; - for (let a = 0, l = o.length; a < l; ++a) { - const h = o[a]; - for (let c = 0, u = h.length - 1; c < u; ++c) { - const d = h.slice(c, c + 2), f = { - feature: t, - geometry: e, - depth: [a, s], - index: c, - segment: d - }; - this.rBush_.insert(Ut(d), f); + renderFrame(t, e) { + const n = t.layerStatesArray[t.layerIndex], s = t.viewState, r = s.projection, o = s.resolution, a = s.center, l = s.rotation, h = t.pixelRatio, c = this.getLayer(), u = c.getSource(), d = u.getRevision(), f = u.getTileGridForProjection(r), g = f.getZForResolution(o, u.zDirection), m = f.getResolution(g); + let _ = t.extent; + const y = t.viewState.resolution, p = u.getTilePixelRatio(h), v = Math.round(mt(_) / y * h), x = Math.round(Ne(_) / y * h), M = n.extent && Pi(n.extent); + M && (_ = cs( + _, + Pi(n.extent) + )); + const E = m * v / 2 / p, R = m * x / 2 / p, L = [ + a[0] - E, + a[1] - R, + a[0] + E, + a[1] + R + ], N = f.getTileRangeForExtentAndZ(_, g), G = {}; + G[g] = {}; + const U = this.createLoadedTileFinder( + u, + r, + G + ), T = this.tmpExtent, $ = this.tmpTileRange_; + this.newTiles_ = !1; + const ft = l ? la( + s.center, + y, + l, + t.size + ) : void 0; + for (let se = N.minX; se <= N.maxX; ++se) + for (let lt = N.minY; lt <= N.maxY; ++lt) { + if (l && !f.tileCoordIntersectsViewport([g, se, lt], ft)) + continue; + const gt = this.getTile(g, se, lt, t); + if (this.isDrawableTile(gt)) { + const Gt = rt(this); + if (gt.getState() == z.LOADED) { + G[g][gt.tileCoord.toString()] = gt; + let $e = gt.inTransition(Gt); + $e && n.opacity !== 1 && (gt.endTransition(Gt), $e = !1), !this.newTiles_ && ($e || !this.renderedTiles.includes(gt)) && (this.newTiles_ = !0); + } + if (gt.getAlpha(Gt, t.time) === 1) + continue; } + const ii = f.getTileCoordChildTileRange( + gt.tileCoord, + $, + T + ); + let Re = !1; + ii && (Re = U(g + 1, ii)), Re || f.forEachTileCoordParentTileRange( + gt.tileCoord, + U, + $, + T + ); + } + const F = m / o * h / p; + xi( + this.pixelTransform, + t.size[0] / 2, + t.size[1] / 2, + 1 / h, + 1 / h, + l, + -v / 2, + -x / 2 + ); + const k = xu(this.pixelTransform); + this.useContainer(e, k, this.getBackground(t)); + const A = this.context, tt = A.canvas; + Xa(this.inversePixelTransform, this.pixelTransform), xi( + this.tempTransform, + v / 2, + x / 2, + F, + F, + 0, + -v / 2, + -x / 2 + ), tt.width != v || tt.height != x ? (tt.width = v, tt.height = x) : this.containerReused || A.clearRect(0, 0, v, x), M && this.clipUnrotated(A, t, M), u.getInterpolate() || (A.imageSmoothingEnabled = !1), this.preRender(A, t), this.renderedTiles.length = 0; + let Mt = Object.keys(G).map(Number); + Mt.sort(Zi); + let _t, Pt, b; + n.opacity === 1 && (!this.containerReused || u.getOpaque(t.viewState.projection)) ? Mt = Mt.reverse() : (_t = [], Pt = []); + for (let se = Mt.length - 1; se >= 0; --se) { + const lt = Mt[se], gt = u.getTilePixelSize( + lt, + h, + r + ), Re = f.getResolution(lt) / m, Gt = gt[0] * Re * F, $e = gt[1] * Re * F, en = f.getTileCoordForCoordAndZ( + Ji(L), + lt + ), er = f.getTileCoordExtent(en), nn = Ft(this.tempTransform, [ + p * (er[0] - L[0]) / m, + p * (L[3] - er[3]) / m + ]), ir = p * u.getGutterForProjection(r), ni = G[lt]; + for (const Yn in ni) { + const si = ni[Yn], nr = si.tileCoord, sr = en[1] - nr[1], rr = Math.round(nn[0] - (sr - 1) * Gt), sn = en[2] - nr[2], Lo = Math.round(nn[1] - (sn - 1) * $e), jt = Math.round(nn[0] - sr * Gt), fe = Math.round(nn[1] - sn * $e), ve = rr - jt, Be = Lo - fe, rn = g === lt, Si = rn && si.getAlpha(rt(this), t.time) !== 1; + let ri = !1; + if (!Si) + if (_t) { + b = [jt, fe, jt + ve, fe, jt + ve, fe + Be, jt, fe + Be]; + for (let on = 0, or = _t.length; on < or; ++on) + if (g !== lt && lt < Pt[on]) { + const Zt = _t[on]; + Qt( + [jt, fe, jt + ve, fe + Be], + [Zt[0], Zt[3], Zt[4], Zt[7]] + ) && (ri || (A.save(), ri = !0), A.beginPath(), A.moveTo(b[0], b[1]), A.lineTo(b[2], b[3]), A.lineTo(b[4], b[5]), A.lineTo(b[6], b[7]), A.moveTo(Zt[6], Zt[7]), A.lineTo(Zt[4], Zt[5]), A.lineTo(Zt[2], Zt[3]), A.lineTo(Zt[0], Zt[1]), A.clip()); + } + _t.push(b), Pt.push(lt); + } else + A.clearRect(jt, fe, ve, Be); + this.drawTileImage( + si, + t, + jt, + fe, + ve, + Be, + ir, + rn + ), _t && !Si ? (ri && A.restore(), this.renderedTiles.unshift(si)) : this.renderedTiles.push(si), this.updateUsedTiles(t.usedTiles, u, si); } } + return this.renderedRevision = d, this.renderedResolution = m, this.extentChanged = !this.renderedExtent_ || !ys(this.renderedExtent_, L), this.renderedExtent_ = L, this.renderedPixelRatio = h, this.renderedProjection = r, this.manageTilePyramid( + t, + u, + f, + h, + r, + _, + g, + c.getPreload() + ), this.scheduleExpireCache(t, u), this.postRender(A, t), n.extent && A.restore(), A.imageSmoothingEnabled = !0, k !== tt.style.transform && (tt.style.transform = k), this.container; } - writeCircleGeometry_(t, e) { - const i = e.getCenter(), s = { - feature: t, - geometry: e, - index: Tc, - segment: [i, i] - }, r = { - feature: t, - geometry: e, - index: Ls, - segment: [i, i] - }, o = [s, r]; - s.featureSegments = o, r.featureSegments = o, this.rBush_.insert(ws(i), s); - let a = e; - this.rBush_.insert(a.getExtent(), r); - } - writeGeometryCollectionGeometry_(t, e) { - const i = e.getGeometriesArray(); - for (let s = 0; s < i.length; ++s) { - const r = i[s], o = this.SEGMENT_WRITERS_[r.getType()]; - o(t, r); - } - } - createOrUpdateVertexFeature_(t, e, i) { - let s = this.vertexFeature_; - return s ? s.getGeometry().setCoordinates(t) : (s = new Ie(new Se(t)), this.vertexFeature_ = s, this.overlay_.getSource().addFeature(s)), s.set("features", e), s.set("geometries", i), s; - } - handleEvent(t) { - if (!t.originalEvent) - return !0; - this.lastPointerEvent_ = t; - let e; - return !t.map.getView().getInteracting() && t.type == nt.POINTERMOVE && !this.handlingDownUpSequence && this.handlePointerMove_(t), this.vertexFeature_ && this.deleteCondition_(t) && (t.type != nt.SINGLECLICK || !this.ignoreNextSingleClick_ ? e = this.removePoint() : e = !0), t.type == nt.SINGLECLICK && (this.ignoreNextSingleClick_ = !1), super.handleEvent(t) && !e; + drawTileImage(t, e, n, s, r, o, a, l) { + const h = this.getTileImage(t); + if (!h) + return; + const c = rt(this), u = e.layerStatesArray[e.layerIndex], d = u.opacity * (l ? t.getAlpha(c, e.time) : 1), f = d !== this.context.globalAlpha; + f && (this.context.save(), this.context.globalAlpha = d), this.context.drawImage( + h, + a, + a, + h.width - 2 * a, + h.height - 2 * a, + n, + s, + r, + o + ), f && this.context.restore(), d !== u.opacity ? e.animate = !0 : l && t.endTransition(c); } - handleDragEvent(t) { - this.ignoreNextSingleClick_ = !1, this.willModifyFeatures_(t, this.dragSegments_); - const e = [ - t.coordinate[0] + this.delta_[0], - t.coordinate[1] + this.delta_[1] - ], i = [], s = []; - for (let r = 0, o = this.dragSegments_.length; r < o; ++r) { - const a = this.dragSegments_[r], l = a[0], h = l.feature; - i.includes(h) || i.push(h); - const c = l.geometry; - s.includes(c) || s.push(c); - const u = l.depth; - let d; - const f = l.segment, g = a[1]; - for (; e.length < c.getStride(); ) - e.push(f[g][e.length]); - switch (c.getType()) { - case "Point": - d = e, f[0] = e, f[1] = e; - break; - case "MultiPoint": - d = c.getCoordinates(), d[l.index] = e, f[0] = e, f[1] = e; - break; - case "LineString": - d = c.getCoordinates(), d[l.index + g] = e, f[g] = e; - break; - case "MultiLineString": - d = c.getCoordinates(), d[u[0]][l.index + g] = e, f[g] = e; - break; - case "Polygon": - d = c.getCoordinates(), d[u[0]][l.index + g] = e, f[g] = e; - break; - case "MultiPolygon": - d = c.getCoordinates(), d[u[1]][u[0]][l.index + g] = e, f[g] = e; - break; - case "Circle": - if (f[0] = e, f[1] = e, l.index === Tc) - this.changingFeature_ = !0, c.setCenter(e), this.changingFeature_ = !1; - else { - this.changingFeature_ = !0, t.map.getView().getProjection(); - let m = eo( - vt(c.getCenter()), - vt(e) - ); - c.setRadius(m), this.changingFeature_ = !1; - } - break; - } - d && this.setGeometryCoordinates_(c, d); - } - this.createOrUpdateVertexFeature_(e, i, s); + getImage() { + const t = this.context; + return t ? t.canvas : null; } - handleDownEvent(t) { - if (!this.condition_(t)) - return !1; - const e = t.coordinate; - this.handlePointerAtPixel_(t.pixel, t.map, e), this.dragSegments_.length = 0, this.featuresBeingModified_ = null; - const i = this.vertexFeature_; - if (i) { - t.map.getView().getProjection(); - const s = [], r = i.getGeometry().getCoordinates(), o = Ut([r]), a = this.rBush_.getInExtent(o), l = {}; - a.sort(h2); - for (let h = 0, c = a.length; h < c; ++h) { - const u = a[h], d = u.segment; - let f = q(u.geometry); - const g = u.depth; - if (g && (f += "-" + g.join("-")), l[f] || (l[f] = new Array(2)), u.geometry.getType() === "Circle" && u.index === Ls) { - const m = Ic( - e, - u - ); - Le(m, r) && !l[f][0] && (this.dragSegments_.push([u, 0]), l[f][0] = u); - continue; - } - if (Le(d[0], r) && !l[f][0]) { - this.dragSegments_.push([u, 0]), l[f][0] = u; - continue; - } - if (Le(d[1], r) && !l[f][1]) { - if (l[f][0] && l[f][0].index === 0) { - let m = u.geometry.getCoordinates(); - switch (u.geometry.getType()) { - case "LineString": - case "MultiLineString": - continue; - case "MultiPolygon": - m = m[g[1]]; - case "Polygon": - if (u.index !== m[g[0]].length - 2) - continue; - break; - } - } - this.dragSegments_.push([u, 1]), l[f][1] = u; - continue; - } - q(d) in this.vertexSegments_ && !l[f][0] && !l[f][1] && this.insertVertexCondition_(t) && s.push(u); - } - s.length && this.willModifyFeatures_(t, [s]); - for (let h = s.length - 1; h >= 0; --h) - this.insertVertex_(s[h], r); - } - return !!this.vertexFeature_; + getTileImage(t) { + return t.getImage(); } - handleUpEvent(t) { - for (let e = this.dragSegments_.length - 1; e >= 0; --e) { - const i = this.dragSegments_[e][0], s = i.geometry; - if (s.getType() === "Circle") { - const r = s.getCenter(), o = i.featureSegments[0], a = i.featureSegments[1]; - o.segment[0] = r, o.segment[1] = r, a.segment[0] = r, a.segment[1] = r, this.rBush_.update(ws(r), o); - let l = s; - this.rBush_.update( - l.getExtent(), - a + scheduleExpireCache(t, e) { + if (e.canExpireCache()) { + const n = function(s, r, o) { + const a = rt(s); + a in o.usedTiles && s.expireCache( + o.viewState.projection, + o.usedTiles[a] ); - } else - this.rBush_.update(Ut(i.segment), i); + }.bind(null, e); + t.postRenderFunctions.push( + n + ); } - return this.featuresBeingModified_ && (this.dispatchEvent( - new ya( - pa.MODIFYEND, - this.featuresBeingModified_, - t - ) - ), this.featuresBeingModified_ = null), !1; } - handlePointerMove_(t) { - this.lastPixel_ = t.pixel, this.handlePointerAtPixel_(t.pixel, t.map, t.coordinate); + updateUsedTiles(t, e, n) { + const s = rt(e); + s in t || (t[s] = {}), t[s][n.getKey()] = !0; } - handlePointerAtPixel_(t, e, i) { - const s = i || e.getCoordinateFromPixel(t); - e.getView().getProjection(); - const r = function(l, h) { - return Lc(s, l) - Lc(s, h); - }; - let o, a; - if (this.hitDetection_) { - const l = typeof this.hitDetection_ == "object" ? (h) => h === this.hitDetection_ : void 0; - e.forEachFeatureAtPixel( - t, - (h, c, u) => { - if (u = u || h.getGeometry(), u.getType() === "Point" && this.features_.getArray().includes(h)) { - a = u; - const d = u.getFlatCoordinates().slice(0, 2); - o = [ - { - feature: h, - geometry: u, - segment: [d, d] - } - ]; - } - return !0; - }, - { layerFilter: l } - ); - } - if (!o) { - const l = Mi( - ws(s, bc) - ), h = e.getView().getResolution() * this.pixelTolerance_, c = Il( - Js(l, h, bc) - ); - o = this.rBush_.getInExtent(c); - } - if (o && o.length > 0) { - const l = o.sort(r)[0], h = l.segment; - let c = Ic(s, l); - const u = e.getPixelFromCoordinate(c); - let d = eo(t, u); - if (a || d <= this.pixelTolerance_) { - const f = {}; - if (f[q(h)] = !0, this.snapToPointer_ || (this.delta_[0] = c[0] - s[0], this.delta_[1] = c[1] - s[1]), l.geometry.getType() === "Circle" && l.index === Ls) - this.snappedToVertex_ = !0, this.createOrUpdateVertexFeature_( - c, - [l.feature], - [l.geometry] - ); - else { - const g = e.getPixelFromCoordinate(h[0]), m = e.getPixelFromCoordinate(h[1]), _ = oi(u, g), y = oi(u, m); - d = Math.sqrt(Math.min(_, y)), this.snappedToVertex_ = d <= this.pixelTolerance_, this.snappedToVertex_ && (c = _ > y ? h[1] : h[0]), this.createOrUpdateVertexFeature_( + manageTilePyramid(t, e, n, s, r, o, a, l, h) { + const c = rt(e); + c in t.wantedTiles || (t.wantedTiles[c] = {}); + const u = t.wantedTiles[c], d = t.tileQueue, f = n.getMinZoom(), g = t.viewState.rotation, m = g ? la( + t.viewState.center, + t.viewState.resolution, + g, + t.size + ) : void 0; + let _ = 0, y, p, v, x, M, E; + for (E = f; E <= a; ++E) + for (p = n.getTileRangeForExtentAndZ(o, E, p), v = n.getResolution(E), x = p.minX; x <= p.maxX; ++x) + for (M = p.minY; M <= p.maxY; ++M) + g && !n.tileCoordIntersectsViewport([E, x, M], m) || (a - E <= l ? (++_, y = e.getTile(E, x, M, s, r), y.getState() == z.IDLE && (u[y.getKey()] = !0, d.isKeyQueued(y.getKey()) || d.enqueue([ + y, c, - [l.feature], - [l.geometry] - ); - const p = {}; - p[q(l.geometry)] = !0; - for (let v = 1, x = o.length; v < x; ++v) { - const C = o[v].segment; - if (Le(h[0], C[0]) && Le(h[1], C[1]) || Le(h[0], C[1]) && Le(h[1], C[0])) { - const E = q(o[v].geometry); - E in p || (p[E] = !0, f[q(C)] = !0); - } else - break; - } - } - this.vertexSegments_ = f; - return; - } - } - this.vertexFeature_ && (this.overlay_.getSource().removeFeature(this.vertexFeature_), this.vertexFeature_ = null); + n.getTileCoordCenter(y.tileCoord), + v + ])), h !== void 0 && h(y)) : e.useTile(E, x, M, r)); + e.updateCacheSize(_, r); } - insertVertex_(t, e) { - const i = t.segment, s = t.feature, r = t.geometry, o = t.depth, a = t.index; - let l; - for (; e.length < r.getStride(); ) - e.push(0); - switch (r.getType()) { - case "MultiLineString": - l = r.getCoordinates(), l[o[0]].splice(a + 1, 0, e); - break; - case "Polygon": - l = r.getCoordinates(), l[o[0]].splice(a + 1, 0, e); - break; - case "MultiPolygon": - l = r.getCoordinates(), l[o[1]][o[0]].splice(a + 1, 0, e); - break; - case "LineString": - l = r.getCoordinates(), l.splice(a + 1, 0, e); - break; - default: - return; - } - this.setGeometryCoordinates_(r, l); - const h = this.rBush_; - h.remove(t), this.updateSegmentIndices_(r, a, o, 1); - const c = { - segment: [i[0], e], - feature: s, - geometry: r, - depth: o, - index: a - }; - h.insert(Ut(c.segment), c), this.dragSegments_.push([c, 1]); - const u = { - segment: [e, i[1]], - feature: s, - geometry: r, - depth: o, - index: a + 1 - }; - h.insert(Ut(u.segment), u), this.dragSegments_.push([u, 0]), this.ignoreNextSingleClick_ = !0; - } - removePoint() { - if (this.lastPointerEvent_ && this.lastPointerEvent_.type != nt.POINTERDRAG) { - const t = this.lastPointerEvent_; - this.willModifyFeatures_(t, this.dragSegments_); - const e = this.removeVertex_(); - return this.featuresBeingModified_ && this.dispatchEvent( - new ya( - pa.MODIFYEND, - this.featuresBeingModified_, - t - ) - ), this.featuresBeingModified_ = null, e; - } - return !1; +} +const K2 = j2; +class q2 extends Y2 { + constructor(t) { + super(t); } - removeVertex_() { - const t = this.dragSegments_, e = {}; - let i = !1, s, r, o, a, l, h, c, u, d, f, g; - for (l = t.length - 1; l >= 0; --l) - o = t[l], f = o[0], g = q(f.feature), f.depth && (g += "-" + f.depth.join("-")), g in e || (e[g] = {}), o[1] === 0 ? (e[g].right = f, e[g].index = f.index) : o[1] == 1 && (e[g].left = f, e[g].index = f.index + 1); - for (g in e) { - switch (d = e[g].right, c = e[g].left, h = e[g].index, u = h - 1, c !== void 0 ? f = c : f = d, u < 0 && (u = 0), a = f.geometry, r = a.getCoordinates(), s = r, i = !1, a.getType()) { - case "MultiLineString": - r[f.depth[0]].length > 2 && (r[f.depth[0]].splice(h, 1), i = !0); - break; - case "LineString": - r.length > 2 && (r.splice(h, 1), i = !0); - break; - case "MultiPolygon": - s = s[f.depth[1]]; - case "Polygon": - s = s[f.depth[0]], s.length > 4 && (h == s.length - 1 && (h = 0), s.splice(h, 1), i = !0, h === 0 && (s.pop(), s.push(s[0]), u = s.length - 1)); - break; - } - if (i) { - this.setGeometryCoordinates_(a, r); - const m = []; - if (c !== void 0 && (this.rBush_.remove(c), m.push(c.segment[0])), d !== void 0 && (this.rBush_.remove(d), m.push(d.segment[1])), c !== void 0 && d !== void 0) { - const _ = { - depth: f.depth, - feature: f.feature, - geometry: f.geometry, - index: u, - segment: m - }; - this.rBush_.insert( - Ut(_.segment), - _ - ); - } - this.updateSegmentIndices_(a, h, f.depth, -1), this.vertexFeature_ && (this.overlay_.getSource().removeFeature(this.vertexFeature_), this.vertexFeature_ = null), t.length = 0; - } - } - return i; + createRenderer() { + return new K2(this); } - setGeometryCoordinates_(t, e) { - this.changingFeature_ = !0, t.setCoordinates(e), this.changingFeature_ = !1; +} +const J2 = q2; +class Q2 extends Nd { + constructor(t) { + super({ + extent: t.extent, + origin: t.origin, + origins: t.origins, + resolutions: t.resolutions, + tileSize: t.tileSize, + tileSizes: t.tileSizes, + sizes: t.sizes + }), this.matrixIds_ = t.matrixIds; } - updateSegmentIndices_(t, e, i, s) { - this.rBush_.forEachInExtent( - t.getExtent(), - function(r) { - r.geometry === t && (i === void 0 || r.depth === void 0 || Ni(r.depth, i)) && r.index > e && (r.index += s); - } - ); + getMatrixId(t) { + return this.matrixIds_[t]; } -} -function h2(n, t) { - return n.index - t.index; -} -function Lc(n, t, e) { - const i = t.geometry; - if (i.getType() === "Circle") { - let r = i; - if (t.index === Ls) { - const o = oi( - r.getCenter(), - vt(n) - ), a = Math.sqrt(o) - r.getRadius(); - return a * a; - } + getMatrixIds() { + return this.matrixIds_; } - const s = vt(n); - return zn[0] = vt(t.segment[0]), zn[1] = vt(t.segment[1]), f0(s, zn); -} -function Ic(n, t, e) { - const i = t.geometry; - if (i.getType() === "Circle" && t.index === Ls) - return qn( - i.getClosestPoint( - vt(n) - ) - ); - const s = vt(n); - return zn[0] = vt(t.segment[0]), zn[1] = vt(t.segment[1]), qn( - Ml(s, zn) - ); -} -function c2() { - const n = Vd(); - return function(t, e) { - return n.Point; - }; } -const u2 = l2; -function Pc(n) { - if (n.feature) - return n.feature; - if (n.element) - return n.element; +function t_(i, t, e) { + const n = [], s = [], r = [], o = [], a = []; + e = e !== void 0 ? e : []; + const l = "SupportedCRS", h = "TileMatrix", c = "Identifier", u = "ScaleDenominator", d = "TopLeftCorner", f = "TileWidth", g = "TileHeight", m = i[l], _ = J(m), y = _.getMetersPerUnit(), p = _.getAxisOrientation().substr(0, 2) == "ne"; + return i[h].sort(function(v, x) { + return x[u] - v[u]; + }), i[h].forEach(function(v) { + let x; + if (e.length > 0 ? x = e.find(function(M) { + return v[c] == M[h] ? !0 : v[c].includes(":") ? !1 : i[c] + ":" + v[c] === M[h]; + }) : x = !0, x) { + s.push(v[c]); + const M = v[u] * 28e-5 / y, E = v[f], R = v[g]; + p ? r.push([ + v[d][1], + v[d][0] + ]) : r.push(v[d]), n.push(M), o.push( + E == R ? E : [E, R] + ), a.push([v.MatrixWidth, v.MatrixHeight]); + } + }), new Q2({ + extent: t, + origins: r, + resolutions: n, + matrixIds: s, + tileSizes: o, + sizes: a + }); } -const va = []; -class d2 extends ki { +class e_ extends V2 { constructor(t) { - t = t || {}; - const e = t; - e.handleDownEvent || (e.handleDownEvent = en), e.stopDown || (e.stopDown = un), super(e), this.source_ = t.source ? t.source : null, this.vertex_ = t.vertex !== void 0 ? t.vertex : !0, this.edge_ = t.edge !== void 0 ? t.edge : !0, this.features_ = t.features ? t.features : null, this.featuresListenerKeys_ = [], this.featureChangeListenerKeys_ = {}, this.indexedFeaturesExtents_ = {}, this.pendingFeatures_ = {}, this.pixelTolerance_ = t.pixelTolerance !== void 0 ? t.pixelTolerance : 10, this.rBush_ = new fo(), this.GEOMETRY_SEGMENTERS_ = { - Point: this.segmentPointGeometry_.bind(this), - LineString: this.segmentLineStringGeometry_.bind(this), - LinearRing: this.segmentLineStringGeometry_.bind(this), - Polygon: this.segmentPolygonGeometry_.bind(this), - MultiPoint: this.segmentMultiPointGeometry_.bind(this), - MultiLineString: this.segmentMultiLineStringGeometry_.bind(this), - MultiPolygon: this.segmentMultiPolygonGeometry_.bind(this), - GeometryCollection: this.segmentGeometryCollectionGeometry_.bind(this), - Circle: this.segmentCircleGeometry_.bind(this) - }; - } - addFeature(t, e) { - e = e !== void 0 ? e : !0; - const i = q(t), s = t.getGeometry(); - if (s) { - const r = this.GEOMETRY_SEGMENTERS_[s.getType()]; - if (r) { - this.indexedFeaturesExtents_[i] = s.getExtent( - se() - ); - const o = []; - if (r(o, s), o.length === 1) - this.rBush_.insert(Ut(o[0]), { - feature: t, - segment: o[0] - }); - else if (o.length > 1) { - const a = o.map((h) => Ut(h)), l = o.map((h) => ({ - feature: t, - segment: h - })); - this.rBush_.load(a, l); - } - } - } - e && (this.featureChangeListenerKeys_[i] = et( - t, - U.CHANGE, - this.handleFeatureChange_, - this + const e = t.requestEncoding !== void 0 ? t.requestEncoding : "KVP", n = t.tileGrid; + let s = t.urls; + s === void 0 && t.url !== void 0 && (s = kd(t.url)), super({ + attributions: t.attributions, + attributionsCollapsible: t.attributionsCollapsible, + cacheSize: t.cacheSize, + crossOrigin: t.crossOrigin, + interpolate: t.interpolate, + projection: t.projection, + reprojectionErrorThreshold: t.reprojectionErrorThreshold, + tileClass: t.tileClass, + tileGrid: n, + tileLoadFunction: t.tileLoadFunction, + tilePixelRatio: t.tilePixelRatio, + urls: s, + wrapX: t.wrapX !== void 0 ? t.wrapX : !1, + transition: t.transition, + zDirection: t.zDirection + }), this.version_ = t.version !== void 0 ? t.version : "1.0.0", this.format_ = t.format !== void 0 ? t.format : "image/jpeg", this.dimensions_ = t.dimensions !== void 0 ? t.dimensions : {}, this.layer_ = t.layer, this.matrixSet_ = t.matrixSet, this.style_ = t.style, this.requestEncoding_ = e, this.setKey(this.getKeyForDimensions_()), s && s.length > 0 && (this.tileUrlFunction = Sa( + s.map(this.createFromWMTSTemplate.bind(this)) )); } - forEachFeatureAdd_(t) { - this.addFeature(t); + setUrls(t) { + this.urls = t; + const e = t.join(` +`); + this.setTileUrlFunction( + Sa( + t.map(this.createFromWMTSTemplate.bind(this)) + ), + e + ); + } + getDimensions() { + return this.dimensions_; } - forEachFeatureRemove_(t) { - this.removeFeature(t); + getFormat() { + return this.format_; } - getFeatures_() { - let t; - return this.features_ ? t = this.features_ : this.source_ && (t = this.source_.getFeatures()), t; + getLayer() { + return this.layer_; } - handleEvent(t) { - const e = this.snapTo(t.pixel, t.coordinate, t.map); - return e && (t.coordinate = e.vertex.slice(0, 2), t.pixel = e.vertexPixel), super.handleEvent(t); + getMatrixSet() { + return this.matrixSet_; } - handleFeatureAdd_(t) { - const e = Pc(t); - this.addFeature(e); + getRequestEncoding() { + return this.requestEncoding_; } - handleFeatureRemove_(t) { - const e = Pc(t); - this.removeFeature(e); + getStyle() { + return this.style_; } - handleFeatureChange_(t) { - const e = t.target; - if (this.handlingDownUpSequence) { - const i = q(e); - i in this.pendingFeatures_ || (this.pendingFeatures_[i] = e); - } else - this.updateFeature_(e); + getVersion() { + return this.version_; } - handleUpEvent(t) { - const e = Object.values(this.pendingFeatures_); - return e.length && (e.forEach(this.updateFeature_.bind(this)), this.pendingFeatures_ = {}), !1; + getKeyForDimensions_() { + let t = 0; + const e = []; + for (const n in this.dimensions_) + e[t++] = n + "-" + this.dimensions_[n]; + return e.join("/"); } - removeFeature(t, e) { - const i = e !== void 0 ? e : !0, s = q(t), r = this.indexedFeaturesExtents_[s]; - if (r) { - const o = this.rBush_, a = []; - o.forEachInExtent(r, function(l) { - t === l.feature && a.push(l); - }); - for (let l = a.length - 1; l >= 0; --l) - o.remove(a[l]); - } - i && (mt(this.featureChangeListenerKeys_[s]), delete this.featureChangeListenerKeys_[s]); + updateDimensions(t) { + Object.assign(this.dimensions_, t), this.setKey(this.getKeyForDimensions_()); } - setMap(t) { - const e = this.getMap(), i = this.featuresListenerKeys_, s = this.getFeatures_(); - e && (i.forEach(mt), i.length = 0, s.forEach(this.forEachFeatureRemove_.bind(this))), super.setMap(t), t && (this.features_ ? i.push( - et( - this.features_, - Dt.ADD, - this.handleFeatureAdd_, - this - ), - et( - this.features_, - Dt.REMOVE, - this.handleFeatureRemove_, - this - ) - ) : this.source_ && i.push( - et( - this.source_, - jt.ADDFEATURE, - this.handleFeatureAdd_, - this - ), - et( - this.source_, - jt.REMOVEFEATURE, - this.handleFeatureRemove_, - this - ) - ), s.forEach(this.forEachFeatureAdd_.bind(this))); - } - snapTo(t, e, i) { - const s = i.getCoordinateFromPixel([ - t[0] - this.pixelTolerance_, - t[1] + this.pixelTolerance_ - ]), r = i.getCoordinateFromPixel([ - t[0] + this.pixelTolerance_, - t[1] - this.pixelTolerance_ - ]), o = Ut([s, r]), a = this.rBush_.getInExtent(o), l = a.length; - if (l === 0) - return null; - i.getView().getProjection(); - const h = vt(e); - let c, u = 1 / 0; - const d = this.pixelTolerance_ * this.pixelTolerance_, f = () => { - if (c) { - const g = i.getPixelFromCoordinate(c); - if (oi(t, g) <= d) - return { - vertex: c, - vertexPixel: [ - Math.round(g[0]), - Math.round(g[1]) - ] - }; - } - return null; + createFromWMTSTemplate(t) { + const e = this.requestEncoding_, n = { + layer: this.layer_, + style: this.style_, + tilematrixset: this.matrixSet_ + }; + e == "KVP" && Object.assign(n, { + Service: "WMTS", + Request: "GetTile", + Version: this.version_, + Format: this.format_ + }), t = e == "KVP" ? rc(t, n) : t.replace(/\{(\w+?)\}/g, function(o, a) { + return a.toLowerCase() in n ? n[a.toLowerCase()] : o; + }); + const s = this.tileGrid, r = this.dimensions_; + return function(o, a, l) { + if (o) { + const h = { + TileMatrix: s.getMatrixId(o[0]), + TileCol: o[1], + TileRow: o[2] + }; + Object.assign(h, r); + let c = t; + return e == "KVP" ? c = rc(c, h) : c = c.replace(/\{(\w+?)\}/g, function(u, d) { + return h[d]; + }), c; + } else + return; }; - if (this.vertex_) { - for (let m = 0; m < l; ++m) { - const _ = a[m]; - _.feature.getGeometry().getType() !== "Circle" && _.segment.forEach((y) => { - const p = vt(y), v = oi(h, p); - v < u && (c = y, u = v); - }); - } - const g = f(); - if (g) - return g; - } - if (this.edge_) { - for (let m = 0; m < l; ++m) { - let _ = null; - const y = a[m]; - if (y.feature.getGeometry().getType() === "Circle") { - let p = y.feature.getGeometry(); - _ = qn( - d0( - h, - p - ) - ); - } else { - const [p, v] = y.segment; - v && (va[0] = vt(p), va[1] = vt(v), _ = Ml(h, va)); - } - if (_) { - const p = oi(h, _); - p < u && (c = _, u = p); - } - } - const g = f(); - if (g) - return g; - } - return null; } - updateFeature_(t) { - this.removeFeature(t, !1), this.addFeature(t, !1); +} +const i_ = e_; +function n_(i, t) { + const n = i.Contents.Layer.find(function(T) { + return T.Identifier == t.layer; + }); + if (!n) + return null; + const s = i.Contents.TileMatrixSet; + let r; + n.TileMatrixSetLink.length > 1 ? "projection" in t ? r = n.TileMatrixSetLink.findIndex(function(T) { + const ft = s.find(function(A) { + return A.Identifier == T.TileMatrixSet; + }).SupportedCRS, F = J(ft), k = J(t.projection); + return F && k ? be(F, k) : ft == t.projection; + }) : r = n.TileMatrixSetLink.findIndex(function(T) { + return T.TileMatrixSet == t.matrixSet; + }) : r = 0, r < 0 && (r = 0); + const o = n.TileMatrixSetLink[r].TileMatrixSet, a = n.TileMatrixSetLink[r].TileMatrixSetLimits; + let l = n.Format[0]; + "format" in t && (l = t.format), r = n.Style.findIndex(function(T) { + return "style" in t ? T.Title == t.style : T.isDefault; + }), r < 0 && (r = 0); + const h = n.Style[r].Identifier, c = {}; + "Dimension" in n && n.Dimension.forEach(function(T, $, ft) { + const F = T.Identifier; + let k = T.Default; + k === void 0 && (k = T.Value[0]), c[F] = k; + }); + const d = i.Contents.TileMatrixSet.find(function(T) { + return T.Identifier == o; + }); + let f; + const g = d.SupportedCRS; + if (g && (f = J(g)), "projection" in t) { + const T = J(t.projection); + T && (!f || be(T, f)) && (f = T); } - segmentCircleGeometry_(t, e) { - this.getMap().getView().getProjection(); - const r = R1(e).getCoordinates()[0]; - for (let o = 0, a = r.length - 1; o < a; ++o) - t.push(r.slice(o, o + 2)); + let m = !1; + const _ = f.getAxisOrientation().substr(0, 2) == "ne"; + let y = d.TileMatrix[0], p = { + MinTileCol: 0, + MinTileRow: 0, + MaxTileCol: y.MatrixWidth - 1, + MaxTileRow: y.MatrixHeight - 1 + }; + if (a) { + p = a[a.length - 1]; + const T = d.TileMatrix.find( + ($) => $.Identifier === p.TileMatrix || d.Identifier + ":" + $.Identifier === p.TileMatrix + ); + T && (y = T); } - segmentGeometryCollectionGeometry_(t, e) { - const i = e.getGeometriesArray(); - for (let s = 0; s < i.length; ++s) { - const r = this.GEOMETRY_SEGMENTERS_[i[s].getType()]; - r && r(t, i[s]); + const v = y.ScaleDenominator * 28e-5 / f.getMetersPerUnit(), x = _ ? [y.TopLeftCorner[1], y.TopLeftCorner[0]] : y.TopLeftCorner, M = y.TileWidth * v, E = y.TileHeight * v; + let R = d.BoundingBox; + R && _ && (R = [ + R[1], + R[0], + R[3], + R[2] + ]); + let L = [ + x[0] + M * p.MinTileCol, + x[1] - E * (1 + p.MaxTileRow), + x[0] + M * (1 + p.MaxTileCol), + x[1] - E * p.MinTileRow + ]; + if (R !== void 0 && !Ii(R, L)) { + const T = n.WGS84BoundingBox, $ = J("EPSG:4326").getExtent(); + if (L = R, T) + m = T[0] === $[0] && T[2] === $[2]; + else { + const ft = Hu( + R, + d.SupportedCRS, + "EPSG:4326" + ); + m = ft[0] - 1e-10 <= $[0] && ft[2] + 1e-10 >= $[2]; } } - segmentLineStringGeometry_(t, e) { - const i = e.getCoordinates(); - for (let s = 0, r = i.length - 1; s < r; ++s) - t.push(i.slice(s, s + 2)); - } - segmentMultiLineStringGeometry_(t, e) { - const i = e.getCoordinates(); - for (let s = 0, r = i.length; s < r; ++s) { - const o = i[s]; - for (let a = 0, l = o.length - 1; a < l; ++a) - t.push(o.slice(a, a + 2)); - } + const N = t_( + d, + L, + a + ), G = []; + let U = t.requestEncoding; + if (U = U !== void 0 ? U : "", "OperationsMetadata" in i && "GetTile" in i.OperationsMetadata) { + const T = i.OperationsMetadata.GetTile.DCP.HTTP.Get; + for (let $ = 0, ft = T.length; $ < ft; ++$) + if (T[$].Constraint) { + const k = T[$].Constraint.find(function(A) { + return A.name == "GetEncoding"; + }).AllowedValues.Value; + if (U === "" && (U = k[0]), U === "KVP") + k.includes("KVP") && G.push(T[$].href); + else + break; + } else + T[$].href && (U = "KVP", G.push(T[$].href)); } - segmentMultiPointGeometry_(t, e) { - e.getCoordinates().forEach((i) => { - t.push([i]); - }); + return G.length === 0 && (U = "REST", n.ResourceURL.forEach(function(T) { + T.resourceType === "tile" && (l = T.format, G.push(T.template)); + })), { + urls: G, + layer: t.layer, + matrixSet: o, + format: l, + projection: f, + requestEncoding: U, + tileGrid: N, + style: h, + dimensions: c, + wrapX: m, + crossOrigin: t.crossOrigin + }; +} +class Gd { + constructor() { + this.dataProjection = void 0, this.defaultFeatureProjection = void 0, this.supportedMediaTypes = null; } - segmentMultiPolygonGeometry_(t, e) { - const i = e.getCoordinates(); - for (let s = 0, r = i.length; s < r; ++s) { - const o = i[s]; - for (let a = 0, l = o.length; a < l; ++a) { - const h = o[a]; - for (let c = 0, u = h.length - 1; c < u; ++c) - t.push(h.slice(c, c + 2)); - } - } - } - segmentPointGeometry_(t, e) { - t.push([e.getCoordinates()]); - } - segmentPolygonGeometry_(t, e) { - const i = e.getCoordinates(); - for (let s = 0, r = i.length; s < r; ++s) { - const o = i[s]; - for (let a = 0, l = o.length - 1; a < l; ++a) - t.push(o.slice(a, a + 2)); - } - } -} -const f2 = d2, g2 = 0.5, m2 = 10, Ac = 0.25; -class _2 { - constructor(t, e, i, s, r, o) { - this.sourceProj_ = t, this.targetProj_ = e; - let a = {}; - const l = zs(this.targetProj_, this.sourceProj_); - this.transformInv_ = function(p) { - const v = p[0] + "/" + p[1]; - return a[v] || (a[v] = l(p)), a[v]; - }, this.maxSourceExtent_ = s, this.errorThresholdSquared_ = r * r, this.triangles_ = [], this.wrapsXInSource_ = !1, this.canWrapXInSource_ = this.sourceProj_.canWrapX() && !!s && !!this.sourceProj_.getExtent() && pt(s) == pt(this.sourceProj_.getExtent()), this.sourceWorldWidth_ = this.sourceProj_.getExtent() ? pt(this.sourceProj_.getExtent()) : null, this.targetWorldWidth_ = this.targetProj_.getExtent() ? pt(this.targetProj_.getExtent()) : null; - const h = fn(i), c = Io(i), u = Lo(i), d = bo(i), f = this.transformInv_(h), g = this.transformInv_(c), m = this.transformInv_(u), _ = this.transformInv_(d), y = m2 + (o ? Math.max( - 0, - Math.ceil( - Math.log2( - La(i) / (o * o * 256 * 256) - ) - ) - ) : 0); - if (this.addQuad_( - h, - c, - u, - d, - f, - g, - m, - _, - y - ), this.wrapsXInSource_) { - let p = 1 / 0; - this.triangles_.forEach(function(v, x, C) { - p = Math.min( - p, - v.source[0][0], - v.source[1][0], - v.source[2][0] - ); - }), this.triangles_.forEach( - function(v) { - if (Math.max( - v.source[0][0], - v.source[1][0], - v.source[2][0] - ) - p > this.sourceWorldWidth_ / 2) { - const x = [ - [v.source[0][0], v.source[0][1]], - [v.source[1][0], v.source[1][1]], - [v.source[2][0], v.source[2][1]] - ]; - x[0][0] - p > this.sourceWorldWidth_ / 2 && (x[0][0] -= this.sourceWorldWidth_), x[1][0] - p > this.sourceWorldWidth_ / 2 && (x[1][0] -= this.sourceWorldWidth_), x[2][0] - p > this.sourceWorldWidth_ / 2 && (x[2][0] -= this.sourceWorldWidth_); - const C = Math.min( - x[0][0], - x[1][0], - x[2][0] - ); - Math.max( - x[0][0], - x[1][0], - x[2][0] - ) - C < this.sourceWorldWidth_ / 2 && (v.source = x); - } - }.bind(this) - ); - } - a = {}; - } - addTriangle_(t, e, i, s, r, o) { - this.triangles_.push({ - source: [s, r, o], - target: [t, e, i] - }); - } - addQuad_(t, e, i, s, r, o, a, l, h) { - const c = Ut([r, o, a, l]), u = this.sourceWorldWidth_ ? pt(c) / this.sourceWorldWidth_ : null, d = this.sourceWorldWidth_, f = this.sourceProj_.canWrapX() && u > 0.5 && u < 1; - let g = !1; - if (h > 0) { - if (this.targetProj_.isGlobal() && this.targetWorldWidth_) { - const _ = Ut([t, e, i, s]); - g = pt(_) / this.targetWorldWidth_ > Ac || g; - } - !f && this.sourceProj_.isGlobal() && u && (g = u > Ac || g); - } - if (!g && this.maxSourceExtent_ && isFinite(c[0]) && isFinite(c[1]) && isFinite(c[2]) && isFinite(c[3]) && !Kt(c, this.maxSourceExtent_)) - return; - let m = 0; - if (!g && (!isFinite(r[0]) || !isFinite(r[1]) || !isFinite(o[0]) || !isFinite(o[1]) || !isFinite(a[0]) || !isFinite(a[1]) || !isFinite(l[0]) || !isFinite(l[1]))) { - if (h > 0) - g = !0; - else if (m = (!isFinite(r[0]) || !isFinite(r[1]) ? 8 : 0) + (!isFinite(o[0]) || !isFinite(o[1]) ? 4 : 0) + (!isFinite(a[0]) || !isFinite(a[1]) ? 2 : 0) + (!isFinite(l[0]) || !isFinite(l[1]) ? 1 : 0), m != 1 && m != 2 && m != 4 && m != 8) - return; - } - if (h > 0) { - if (!g) { - const _ = [(t[0] + i[0]) / 2, (t[1] + i[1]) / 2], y = this.transformInv_(_); - let p; - f ? p = (qi(r[0], d) + qi(a[0], d)) / 2 - qi(y[0], d) : p = (r[0] + a[0]) / 2 - y[0]; - const v = (r[1] + a[1]) / 2 - y[1]; - g = p * p + v * v > this.errorThresholdSquared_; - } - if (g) { - if (Math.abs(t[0] - i[0]) <= Math.abs(t[1] - i[1])) { - const _ = [(e[0] + i[0]) / 2, (e[1] + i[1]) / 2], y = this.transformInv_(_), p = [(s[0] + t[0]) / 2, (s[1] + t[1]) / 2], v = this.transformInv_(p); - this.addQuad_( - t, - e, - _, - p, - r, - o, - y, - v, - h - 1 - ), this.addQuad_( - p, - _, - i, - s, - v, - y, - a, - l, - h - 1 - ); - } else { - const _ = [(t[0] + e[0]) / 2, (t[1] + e[1]) / 2], y = this.transformInv_(_), p = [(i[0] + s[0]) / 2, (i[1] + s[1]) / 2], v = this.transformInv_(p); - this.addQuad_( - t, - _, - p, - s, - r, - y, - v, - l, - h - 1 - ), this.addQuad_( - _, - e, - i, - p, - y, - o, - a, - v, - h - 1 - ); - } - return; - } - } - if (f) { - if (!this.canWrapXInSource_) - return; - this.wrapsXInSource_ = !0; - } - (m & 11) == 0 && this.addTriangle_(t, i, s, r, a, l), (m & 14) == 0 && this.addTriangle_(t, i, e, r, a, o), m && ((m & 13) == 0 && this.addTriangle_(e, s, t, o, l, r), (m & 7) == 0 && this.addTriangle_(e, s, i, o, l, a)); - } - calculateSourceExtent() { - const t = se(); - return this.triangles_.forEach(function(e, i, s) { - const r = e.source; - Ss(t, r[0]), Ss(t, r[1]), Ss(t, r[2]); - }), t; - } - getTriangles() { - return this.triangles_; - } -} -const p2 = _2; -let xa; -const hf = []; -function Oc(n, t, e, i, s) { - n.beginPath(), n.moveTo(0, 0), n.lineTo(t, e), n.lineTo(i, s), n.closePath(), n.save(), n.clip(), n.fillRect(0, 0, Math.max(t, i) + 1, Math.max(e, s)), n.restore(); -} -function Ca(n, t) { - return Math.abs(n[t * 4] - 210) > 2 || Math.abs(n[t * 4 + 3] - 0.75 * 255) > 2; -} -function y2() { - if (xa === void 0) { - const n = document.createElement("canvas").getContext("2d"); - n.globalCompositeOperation = "lighter", n.fillStyle = "rgba(210, 0, 0, 0.75)", Oc(n, 4, 5, 4, 0), Oc(n, 4, 5, 0, 5); - const t = n.getImageData(0, 0, 3, 3).data; - xa = Ca(t, 0) || Ca(t, 4) || Ca(t, 8); - } - return xa; -} -function Fc(n, t, e, i) { - const s = _d(e, t, n); - let r = ao( - t, - i, - e - ); - const o = t.getMetersPerUnit(); - o !== void 0 && (r *= o); - const a = n.getMetersPerUnit(); - a !== void 0 && (r /= a); - const l = n.getExtent(); - if (!l || To(l, s)) { - const h = ao(n, r, s) / r; - isFinite(h) && h > 0 && (r /= h); - } - return r; -} -function v2(n, t, e, i) { - const s = Pi(e); - let r = Fc( - n, - t, - s, - i - ); - return (!isFinite(r) || r <= 0) && yl(e, function(o) { - return r = Fc( - n, - t, - o, - i - ), isFinite(r) && r > 0; - }), r; -} -function x2(n, t, e, i, s, r, o, a, l, h, c, u) { - const d = pe( - Math.round(e * n), - Math.round(e * t), - hf - ); - if (u || (d.imageSmoothingEnabled = !1), l.length === 0) - return d.canvas; - d.scale(e, e); - function f(x) { - return Math.round(x * e) / e; - } - d.globalCompositeOperation = "lighter"; - const g = se(); - l.forEach(function(x, C, E) { - Ku(g, x.extent); - }); - const m = pt(g), _ = ze(g), y = pe( - Math.round(e * m / i), - Math.round(e * _ / i) - ); - u || (y.imageSmoothingEnabled = !1); - const p = e / i; - l.forEach(function(x, C, E) { - const R = x.extent[0] - g[0], b = -(x.extent[3] - g[3]), F = pt(x.extent), G = ze(x.extent); - x.image.width > 0 && x.image.height > 0 && y.drawImage( - x.image, - h, - h, - x.image.width - 2 * h, - x.image.height - 2 * h, - R * p, - b * p, - F * p, - G * p - ); - }); - const v = fn(o); - return a.getTriangles().forEach(function(x, C, E) { - const R = x.source, b = x.target; - let F = R[0][0], G = R[0][1], V = R[1][0], L = R[1][1], $ = R[2][0], gt = R[2][1]; - const N = f((b[0][0] - v[0]) / r), k = f( - -(b[0][1] - v[1]) / r - ), P = f((b[1][0] - v[0]) / r), it = f( - -(b[1][1] - v[1]) / r - ), wt = f((b[2][0] - v[0]) / r), yt = f( - -(b[2][1] - v[1]) / r - ), At = F, T = G; - F = 0, G = 0, V -= At, L -= T, $ -= At, gt -= T; - const ce = [ - [V, L, 0, 0, P - N], - [$, gt, 0, 0, wt - N], - [0, 0, V, L, it - k], - [0, 0, $, gt, yt - k] - ], ht = n0(ce); - if (!!ht) { - if (d.save(), d.beginPath(), y2() || !u) { - d.moveTo(P, it); - const _t = 4, ui = N - P, Fe = k - it; - for (let Bt = 0; Bt < _t; Bt++) - d.lineTo( - P + f((Bt + 1) * ui / _t), - it + f(Bt * Fe / (_t - 1)) - ), Bt != _t - 1 && d.lineTo( - P + f((Bt + 1) * ui / _t), - it + f((Bt + 1) * Fe / (_t - 1)) - ); - d.lineTo(wt, yt); - } else - d.moveTo(P, it), d.lineTo(N, k), d.lineTo(wt, yt); - d.clip(), d.transform( - ht[0], - ht[2], - ht[1], - ht[3], - N, - k - ), d.translate( - g[0] - At, - g[3] - T - ), d.scale( - i / e, - -i / e - ), d.drawImage(y.canvas, 0, 0), d.restore(); - } - }), c && (d.save(), d.globalCompositeOperation = "source-over", d.strokeStyle = "black", d.lineWidth = 1, a.getTriangles().forEach(function(x, C, E) { - const R = x.target, b = (R[0][0] - v[0]) / r, F = -(R[0][1] - v[1]) / r, G = (R[1][0] - v[0]) / r, V = -(R[1][1] - v[1]) / r, L = (R[2][0] - v[0]) / r, $ = -(R[2][1] - v[1]) / r; - d.beginPath(), d.moveTo(G, V), d.lineTo(b, F), d.lineTo(L, $), d.closePath(), d.stroke(); - }), d.restore()), d.canvas; -} -class C2 extends Jd { - constructor(t, e, i, s, r, o, a, l, h, c, u, d) { - super(r, z.IDLE, { interpolate: !!d }), this.renderEdges_ = u !== void 0 ? u : !1, this.pixelRatio_ = a, this.gutter_ = l, this.canvas_ = null, this.sourceTileGrid_ = e, this.targetTileGrid_ = s, this.wrappedTileCoord_ = o || r, this.sourceTiles_ = [], this.sourcesListenerKeys_ = null, this.sourceZ_ = 0; - const f = s.getTileCoordExtent( - this.wrappedTileCoord_ - ), g = this.targetTileGrid_.getExtent(); - let m = this.sourceTileGrid_.getExtent(); - const _ = g ? Rs(f, g) : f; - if (La(_) === 0) { - this.state = z.EMPTY; - return; - } - const y = t.getExtent(); - y && (m ? m = Rs(m, y) : m = y); - const p = s.getResolution( - this.wrappedTileCoord_[0] - ), v = v2( - t, - i, - _, - p - ); - if (!isFinite(v) || v <= 0) { - this.state = z.EMPTY; - return; - } - const x = c !== void 0 ? c : g2; - if (this.triangulation_ = new p2( - t, - i, - _, - m, - v * x, - p - ), this.triangulation_.getTriangles().length === 0) { - this.state = z.EMPTY; - return; - } - this.sourceZ_ = e.getZForResolution(v); - let C = this.triangulation_.calculateSourceExtent(); - if (m && (t.canWrapX() ? (C[1] = Et( - C[1], - m[1], - m[3] - ), C[3] = Et( - C[3], - m[1], - m[3] - )) : C = Rs(C, m)), !La(C)) - this.state = z.EMPTY; - else { - const E = e.getTileRangeForExtentAndZ( - C, - this.sourceZ_ - ); - for (let R = E.minX; R <= E.maxX; R++) - for (let b = E.minY; b <= E.maxY; b++) { - const F = h(this.sourceZ_, R, b, a); - F && this.sourceTiles_.push(F); - } - this.sourceTiles_.length === 0 && (this.state = z.EMPTY); - } - } - getImage() { - return this.canvas_; - } - reproject_() { - const t = []; - if (this.sourceTiles_.forEach( - function(e, i, s) { - e && e.getState() == z.LOADED && t.push({ - extent: this.sourceTileGrid_.getTileCoordExtent(e.tileCoord), - image: e.getImage() - }); - }.bind(this) - ), this.sourceTiles_.length = 0, t.length === 0) - this.state = z.ERROR; - else { - const e = this.wrappedTileCoord_[0], i = this.targetTileGrid_.getTileSize(e), s = typeof i == "number" ? i : i[0], r = typeof i == "number" ? i : i[1], o = this.targetTileGrid_.getResolution(e), a = this.sourceTileGrid_.getResolution( - this.sourceZ_ - ), l = this.targetTileGrid_.getTileCoordExtent( - this.wrappedTileCoord_ - ); - this.canvas_ = x2( - s, - r, - this.pixelRatio_, - a, - this.sourceTileGrid_.getExtent(), - o, - l, - this.triangulation_, - t, - this.gutter_, - this.renderEdges_, - this.interpolate - ), this.state = z.LOADED; - } - this.changed(); - } - load() { - if (this.state == z.IDLE) { - this.state = z.LOADING, this.changed(); - let t = 0; - this.sourcesListenerKeys_ = [], this.sourceTiles_.forEach( - function(e, i, s) { - const r = e.getState(); - if (r == z.IDLE || r == z.LOADING) { - t++; - const o = et( - e, - U.CHANGE, - function(a) { - const l = e.getState(); - (l == z.LOADED || l == z.ERROR || l == z.EMPTY) && (mt(o), t--, t === 0 && (this.unlistenSources_(), this.reproject_())); - }, - this - ); - this.sourcesListenerKeys_.push(o); - } - }.bind(this) - ), t === 0 ? setTimeout(this.reproject_.bind(this), 0) : this.sourceTiles_.forEach(function(e, i, s) { - e.getState() == z.IDLE && e.load(); - }); - } - } - unlistenSources_() { - this.sourcesListenerKeys_.forEach(mt), this.sourcesListenerKeys_ = null; - } - release() { - this.canvas_ && (hd(this.canvas_.getContext("2d")), hf.push(this.canvas_), this.canvas_ = null), super.release(); - } -} -const Xa = C2, Ma = { - TILELOADSTART: "tileloadstart", - TILELOADEND: "tileloadend", - TILELOADERROR: "tileloaderror" -}, M2 = [0, 0, 0], yi = 5; -class E2 { - constructor(t) { - this.minZoom = t.minZoom !== void 0 ? t.minZoom : 0, this.resolutions_ = t.resolutions, Y( - Pg( - this.resolutions_, - function(s, r) { - return r - s; - }, - !0 - ), - 17 - ); - let e; - if (!t.origins) { - for (let s = 0, r = this.resolutions_.length - 1; s < r; ++s) - if (!e) - e = this.resolutions_[s] / this.resolutions_[s + 1]; - else if (this.resolutions_[s] / this.resolutions_[s + 1] !== e) { - e = void 0; - break; - } - } - this.zoomFactor_ = e, this.maxZoom = this.resolutions_.length - 1, this.origin_ = t.origin !== void 0 ? t.origin : null, this.origins_ = null, t.origins !== void 0 && (this.origins_ = t.origins, Y(this.origins_.length == this.resolutions_.length, 20)); - const i = t.extent; - i !== void 0 && !this.origin_ && !this.origins_ && (this.origin_ = fn(i)), Y( - !this.origin_ && this.origins_ || this.origin_ && !this.origins_, - 18 - ), this.tileSizes_ = null, t.tileSizes !== void 0 && (this.tileSizes_ = t.tileSizes, Y(this.tileSizes_.length == this.resolutions_.length, 19)), this.tileSize_ = t.tileSize !== void 0 ? t.tileSize : this.tileSizes_ ? null : Sl, Y( - !this.tileSize_ && this.tileSizes_ || this.tileSize_ && !this.tileSizes_, - 22 - ), this.extent_ = i !== void 0 ? i : null, this.fullTileRanges_ = null, this.tmpSize_ = [0, 0], this.tmpExtent_ = [0, 0, 0, 0], t.sizes !== void 0 ? this.fullTileRanges_ = t.sizes.map(function(s, r) { - const o = new sf( - Math.min(0, s[0]), - Math.max(s[0] - 1, -1), - Math.min(0, s[1]), - Math.max(s[1] - 1, -1) - ); - if (i) { - const a = this.getTileRangeForExtentAndZ(i, r); - o.minX = Math.max(a.minX, o.minX), o.maxX = Math.min(a.maxX, o.maxX), o.minY = Math.max(a.minY, o.minY), o.maxY = Math.min(a.maxY, o.maxY); - } - return o; - }, this) : i && this.calculateTileRanges_(i); - } - forEachTileCoord(t, e, i) { - const s = this.getTileRangeForExtentAndZ(t, e); - for (let r = s.minX, o = s.maxX; r <= o; ++r) - for (let a = s.minY, l = s.maxY; a <= l; ++a) - i([e, r, a]); - } - forEachTileCoordParentTileRange(t, e, i, s) { - let r, o, a, l = null, h = t[0] - 1; - for (this.zoomFactor_ === 2 ? (o = t[1], a = t[2]) : l = this.getTileCoordExtent(t, s); h >= this.minZoom; ) { - if (this.zoomFactor_ === 2 ? (o = Math.floor(o / 2), a = Math.floor(a / 2), r = wn(o, o, a, a, i)) : r = this.getTileRangeForExtentAndZ( - l, - h, - i - ), e(h, r)) - return !0; - --h; - } - return !1; - } - getExtent() { - return this.extent_; - } - getMaxZoom() { - return this.maxZoom; - } - getMinZoom() { - return this.minZoom; - } - getOrigin(t) { - return this.origin_ ? this.origin_ : this.origins_[t]; - } - getResolution(t) { - return this.resolutions_[t]; - } - getResolutions() { - return this.resolutions_; - } - getTileCoordChildTileRange(t, e, i) { - if (t[0] < this.maxZoom) { - if (this.zoomFactor_ === 2) { - const r = t[1] * 2, o = t[2] * 2; - return wn( - r, - r + 1, - o, - o + 1, - e - ); - } - const s = this.getTileCoordExtent( - t, - i || this.tmpExtent_ - ); - return this.getTileRangeForExtentAndZ( - s, - t[0] + 1, - e - ); - } - return null; - } - getTileRangeForTileCoordAndZ(t, e, i) { - if (e > this.maxZoom || e < this.minZoom) - return null; - const s = t[0], r = t[1], o = t[2]; - if (e === s) - return wn( - r, - o, - r, - o, - i - ); - if (this.zoomFactor_) { - const l = Math.pow(this.zoomFactor_, e - s), h = Math.floor(r * l), c = Math.floor(o * l); - if (e < s) - return wn(h, h, c, c, i); - const u = Math.floor(l * (r + 1)) - 1, d = Math.floor(l * (o + 1)) - 1; - return wn(h, u, c, d, i); - } - const a = this.getTileCoordExtent(t, this.tmpExtent_); - return this.getTileRangeForExtentAndZ(a, e, i); - } - getTileRangeExtent(t, e, i) { - const s = this.getOrigin(t), r = this.getResolution(t), o = fe(this.getTileSize(t), this.tmpSize_), a = s[0] + e.minX * o[0] * r, l = s[0] + (e.maxX + 1) * o[0] * r, h = s[1] + e.minY * o[1] * r, c = s[1] + (e.maxY + 1) * o[1] * r; - return _e(a, h, l, c, i); - } - getTileRangeForExtentAndZ(t, e, i) { - const s = M2; - this.getTileCoordForXYAndZ_(t[0], t[3], e, !1, s); - const r = s[1], o = s[2]; - return this.getTileCoordForXYAndZ_(t[2], t[1], e, !0, s), wn( - r, - s[1], - o, - s[2], - i - ); - } - getTileCoordCenter(t) { - const e = this.getOrigin(t[0]), i = this.getResolution(t[0]), s = fe(this.getTileSize(t[0]), this.tmpSize_); - return [ - e[0] + (t[1] + 0.5) * s[0] * i, - e[1] - (t[2] + 0.5) * s[1] * i - ]; - } - getTileCoordExtent(t, e) { - const i = this.getOrigin(t[0]), s = this.getResolution(t[0]), r = fe(this.getTileSize(t[0]), this.tmpSize_), o = i[0] + t[1] * r[0] * s, a = i[1] - (t[2] + 1) * r[1] * s, l = o + r[0] * s, h = a + r[1] * s; - return _e(o, a, l, h, e); - } - getTileCoordForCoordAndResolution(t, e, i) { - return this.getTileCoordForXYAndResolution_( - t[0], - t[1], - e, - !1, - i - ); - } - getTileCoordForXYAndResolution_(t, e, i, s, r) { - const o = this.getZForResolution(i), a = i / this.getResolution(o), l = this.getOrigin(o), h = fe(this.getTileSize(o), this.tmpSize_); - let c = a * (t - l[0]) / i / h[0], u = a * (l[1] - e) / i / h[1]; - return s ? (c = Sr(c, yi) - 1, u = Sr(u, yi) - 1) : (c = wr(c, yi), u = wr(u, yi)), Cc(o, c, u, r); - } - getTileCoordForXYAndZ_(t, e, i, s, r) { - const o = this.getOrigin(i), a = this.getResolution(i), l = fe(this.getTileSize(i), this.tmpSize_); - let h = (t - o[0]) / a / l[0], c = (o[1] - e) / a / l[1]; - return s ? (h = Sr(h, yi) - 1, c = Sr(c, yi) - 1) : (h = wr(h, yi), c = wr(c, yi)), Cc(i, h, c, r); - } - getTileCoordForCoordAndZ(t, e, i) { - return this.getTileCoordForXYAndZ_( - t[0], - t[1], - e, - !1, - i - ); - } - getTileCoordResolution(t) { - return this.resolutions_[t[0]]; - } - getTileSize(t) { - return this.tileSize_ ? this.tileSize_ : this.tileSizes_[t]; - } - getFullTileRange(t) { - return this.fullTileRanges_ ? this.fullTileRanges_[t] : this.extent_ ? this.getTileRangeForExtentAndZ(this.extent_, t) : null; - } - getZForResolution(t, e) { - const i = gl( - this.resolutions_, - t, - e || 0 - ); - return Et(i, this.minZoom, this.maxZoom); - } - tileCoordIntersectsViewport(t, e) { - return Td( - e, - 0, - e.length, - 2, - this.getTileCoordExtent(t) - ); - } - calculateTileRanges_(t) { - const e = this.resolutions_.length, i = new Array(e); - for (let s = this.minZoom; s < e; ++s) - i[s] = this.getTileRangeForExtentAndZ(t, s); - this.fullTileRanges_ = i; - } -} -const cf = E2; -function uf(n) { - let t = n.getDefaultTileGrid(); - return t || (t = T2(n), n.setDefaultTileGrid(t)), t; -} -function w2(n, t, e) { - const i = t[0], s = n.getTileCoordCenter(t), r = df(e); - if (To(r, s)) - return t; - { - const o = pt(r), a = Math.ceil( - (r[0] - s[0]) / o - ); - return s[0] += o * a, n.getTileCoordForCoordAndZ(s, i); - } -} -function S2(n, t, e, i) { - i = i !== void 0 ? i : "top-left"; - const s = R2(n, t, e); - return new cf({ - extent: n, - origin: Kg(n, i), - resolutions: s, - tileSize: e - }); -} -function R2(n, t, e, i) { - t = t !== void 0 ? t : k0, e = fe(e !== void 0 ? e : Sl); - const s = ze(n), r = pt(n); - i = i > 0 ? i : Math.max(r / e[0], s / e[1]); - const o = t + 1, a = new Array(o); - for (let l = 0; l < o; ++l) - a[l] = i / Math.pow(2, l); - return a; -} -function T2(n, t, e, i) { - const s = df(n); - return S2(s, t, e, i); -} -function df(n) { - n = Q(n); - let t = n.getExtent(); - if (!t) { - const e = 180 * Yn.degrees / n.getMetersPerUnit(); - t = _e(-e, -e, e, e); - } - return t; -} -class b2 extends Kd { - constructor(t) { - super({ - attributions: t.attributions, - attributionsCollapsible: t.attributionsCollapsible, - projection: t.projection, - state: t.state, - wrapX: t.wrapX, - interpolate: t.interpolate - }), this.on, this.once, this.un, this.opaque_ = t.opaque !== void 0 ? t.opaque : !1, this.tilePixelRatio_ = t.tilePixelRatio !== void 0 ? t.tilePixelRatio : 1, this.tileGrid = t.tileGrid !== void 0 ? t.tileGrid : null; - const e = [256, 256]; - this.tileGrid && fe(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()), e), this.tileCache = new ef(t.cacheSize || 0), this.tmpSize = [0, 0], this.key_ = t.key || "", this.tileOptions = { - transition: t.transition, - interpolate: t.interpolate - }, this.zDirection = t.zDirection ? t.zDirection : 0; - } - canExpireCache() { - return this.tileCache.canExpireCache(); - } - expireCache(t, e) { - const i = this.getTileCacheForProjection(t); - i && i.expireCache(e); - } - forEachLoadedTile(t, e, i, s) { - const r = this.getTileCacheForProjection(t); - if (!r) - return !1; - let o = !0, a, l, h; - for (let c = i.minX; c <= i.maxX; ++c) - for (let u = i.minY; u <= i.maxY; ++u) - l = ko(e, c, u), h = !1, r.containsKey(l) && (a = r.get(l), h = a.getState() === z.LOADED, h && (h = s(a) !== !1)), h || (o = !1); - return o; - } - getGutterForProjection(t) { - return 0; - } - getKey() { - return this.key_; - } - setKey(t) { - this.key_ !== t && (this.key_ = t, this.changed()); - } - getOpaque(t) { - return this.opaque_; - } - getResolutions() { - return this.tileGrid ? this.tileGrid.getResolutions() : null; - } - getTile(t, e, i, s, r) { - return H(); - } - getTileGrid() { - return this.tileGrid; - } - getTileGridForProjection(t) { - return this.tileGrid ? this.tileGrid : uf(t); - } - getTileCacheForProjection(t) { - const e = this.getProjection(); - return Y( - e === null || Ne(e, t), - 68 - ), this.tileCache; - } - getTilePixelRatio(t) { - return this.tilePixelRatio_; - } - getTilePixelSize(t, e, i) { - const s = this.getTileGridForProjection(i), r = this.getTilePixelRatio(e), o = fe(s.getTileSize(t), this.tmpSize); - return r == 1 ? o : vm(o, r, this.tmpSize); - } - getTileCoordForTileUrlFunction(t, e) { - e = e !== void 0 ? e : this.getProjection(); - const i = this.getTileGridForProjection(e); - return this.getWrapX() && e.isGlobal() && (t = w2(i, t, e)), W_(t, i) ? t : null; - } - clear() { - this.tileCache.clear(); - } - refresh() { - this.clear(), super.refresh(); - } - updateCacheSize(t, e) { - const i = this.getTileCacheForProjection(e); - t > i.highWaterMark && (i.highWaterMark = t); - } - useTile(t, e, i, s) { - } -} -class L2 extends Re { - constructor(t, e) { - super(t), this.tile = e; - } -} -const I2 = b2; -function P2(n, t) { - const e = /\{z\}/g, i = /\{x\}/g, s = /\{y\}/g, r = /\{-y\}/g; - return function(o, a, l) { - if (o) - return n.replace(e, o[0].toString()).replace(i, o[1].toString()).replace(s, o[2].toString()).replace(r, function() { - const h = o[0], c = t.getFullTileRange(h); - return Y(c, 55), (c.getHeight() - o[2] - 1).toString(); - }); - }; -} -function A2(n, t) { - const e = n.length, i = new Array(e); - for (let s = 0; s < e; ++s) - i[s] = P2(n[s], t); - return Ya(i); -} -function Ya(n) { - return n.length === 1 ? n[0] : function(t, e, i) { - if (t) { - const s = U_(t), r = qi(s, n.length); - return n[r](t, e, i); - } else - return; - }; -} -function ff(n) { - const t = []; - let e = /\{([a-z])-([a-z])\}/.exec(n); - if (e) { - const i = e[1].charCodeAt(0), s = e[2].charCodeAt(0); - let r; - for (r = i; r <= s; ++r) - t.push(n.replace(e[0], String.fromCharCode(r))); - return t; - } - if (e = /\{(\d+)-(\d+)\}/.exec(n), e) { - const i = parseInt(e[2], 10); - for (let s = parseInt(e[1], 10); s <= i; s++) - t.push(n.replace(e[0], s.toString())); - return t; - } - return t.push(n), t; -} -class eh extends I2 { - constructor(t) { - super({ - attributions: t.attributions, - cacheSize: t.cacheSize, - opaque: t.opaque, - projection: t.projection, - state: t.state, - tileGrid: t.tileGrid, - tilePixelRatio: t.tilePixelRatio, - wrapX: t.wrapX, - transition: t.transition, - interpolate: t.interpolate, - key: t.key, - attributionsCollapsible: t.attributionsCollapsible, - zDirection: t.zDirection - }), this.generateTileUrlFunction_ = this.tileUrlFunction === eh.prototype.tileUrlFunction, this.tileLoadFunction = t.tileLoadFunction, t.tileUrlFunction && (this.tileUrlFunction = t.tileUrlFunction), this.urls = null, t.urls ? this.setUrls(t.urls) : t.url && this.setUrl(t.url), this.tileLoadingKeys_ = {}; - } - getTileLoadFunction() { - return this.tileLoadFunction; - } - getTileUrlFunction() { - return Object.getPrototypeOf(this).tileUrlFunction === this.tileUrlFunction ? this.tileUrlFunction.bind(this) : this.tileUrlFunction; - } - getUrls() { - return this.urls; - } - handleTileChange(t) { - const e = t.target, i = q(e), s = e.getState(); - let r; - s == z.LOADING ? (this.tileLoadingKeys_[i] = !0, r = Ma.TILELOADSTART) : i in this.tileLoadingKeys_ && (delete this.tileLoadingKeys_[i], r = s == z.ERROR ? Ma.TILELOADERROR : s == z.LOADED ? Ma.TILELOADEND : void 0), r != null && this.dispatchEvent(new L2(r, e)); - } - setTileLoadFunction(t) { - this.tileCache.clear(), this.tileLoadFunction = t, this.changed(); - } - setTileUrlFunction(t, e) { - this.tileUrlFunction = t, this.tileCache.pruneExceptNewestZ(), typeof e < "u" ? this.setKey(e) : this.changed(); - } - setUrl(t) { - const e = ff(t); - this.urls = e, this.setUrls(e); - } - setUrls(t) { - this.urls = t; - const e = t.join(` -`); - this.generateTileUrlFunction_ ? this.setTileUrlFunction(A2(t, this.tileGrid), e) : this.setKey(e); - } - tileUrlFunction(t, e, i) { - } - useTile(t, e, i) { - const s = ko(t, e, i); - this.tileCache.containsKey(s) && this.tileCache.get(s); - } -} -const O2 = eh; -class F2 extends O2 { - constructor(t) { - super({ - attributions: t.attributions, - cacheSize: t.cacheSize, - opaque: t.opaque, - projection: t.projection, - state: t.state, - tileGrid: t.tileGrid, - tileLoadFunction: t.tileLoadFunction ? t.tileLoadFunction : N2, - tilePixelRatio: t.tilePixelRatio, - tileUrlFunction: t.tileUrlFunction, - url: t.url, - urls: t.urls, - wrapX: t.wrapX, - transition: t.transition, - interpolate: t.interpolate !== void 0 ? t.interpolate : !0, - key: t.key, - attributionsCollapsible: t.attributionsCollapsible, - zDirection: t.zDirection - }), this.crossOrigin = t.crossOrigin !== void 0 ? t.crossOrigin : null, this.tileClass = t.tileClass !== void 0 ? t.tileClass : Qd, this.tileCacheForProjection = {}, this.tileGridForProjection = {}, this.reprojectionErrorThreshold_ = t.reprojectionErrorThreshold, this.renderReprojectionEdges_ = !1; - } - canExpireCache() { - if (this.tileCache.canExpireCache()) - return !0; - for (const t in this.tileCacheForProjection) - if (this.tileCacheForProjection[t].canExpireCache()) - return !0; - return !1; - } - expireCache(t, e) { - const i = this.getTileCacheForProjection(t); - this.tileCache.expireCache( - this.tileCache == i ? e : {} - ); - for (const s in this.tileCacheForProjection) { - const r = this.tileCacheForProjection[s]; - r.expireCache(r == i ? e : {}); + getReadOptions(t, e) { + if (e) { + let n = e.dataProjection ? J(e.dataProjection) : this.readProjection(t); + e.extent && n && n.getUnits() === "tile-pixels" && (n = J(n), n.setWorldExtent(e.extent)), e = { + dataProjection: n, + featureProjection: e.featureProjection + }; } + return this.adaptOptions(e); } - getGutterForProjection(t) { - return this.getProjection() && t && !Ne(this.getProjection(), t) ? 0 : this.getGutter(); - } - getGutter() { - return 0; - } - getKey() { - let t = super.getKey(); - return this.getInterpolate() || (t += ":disable-interpolation"), t; + adaptOptions(t) { + return Object.assign( + { + dataProjection: this.dataProjection, + featureProjection: this.defaultFeatureProjection + }, + t + ); } - getOpaque(t) { - return this.getProjection() && t && !Ne(this.getProjection(), t) ? !1 : super.getOpaque(t); + getType() { + return W(); } - getTileGridForProjection(t) { - const e = this.getProjection(); - if (this.tileGrid && (!e || Ne(e, t))) - return this.tileGrid; - { - const i = q(t); - return i in this.tileGridForProjection || (this.tileGridForProjection[i] = uf(t)), this.tileGridForProjection[i]; - } + readFeature(t, e) { + return W(); } - getTileCacheForProjection(t) { - const e = this.getProjection(); - if (!e || Ne(e, t)) - return this.tileCache; - { - const i = q(t); - return i in this.tileCacheForProjection || (this.tileCacheForProjection[i] = new ef( - this.tileCache.highWaterMark - )), this.tileCacheForProjection[i]; - } + readFeatures(t, e) { + return W(); } - createTile_(t, e, i, s, r, o) { - const a = [t, e, i], l = this.getTileCoordForTileUrlFunction( - a, - r - ), h = l ? this.tileUrlFunction(l, s, r) : void 0, c = new this.tileClass( - a, - h !== void 0 ? z.IDLE : z.EMPTY, - h !== void 0 ? h : "", - this.crossOrigin, - this.tileLoadFunction, - this.tileOptions - ); - return c.key = o, c.addEventListener(U.CHANGE, this.handleTileChange.bind(this)), c; + readGeometry(t, e) { + return W(); } - getTile(t, e, i, s, r) { - const o = this.getProjection(); - if (!o || !r || Ne(o, r)) - return this.getTileInternal( - t, - e, - i, - s, - o || r - ); - { - const a = this.getTileCacheForProjection(r), l = [t, e, i]; - let h; - const c = tf(l); - a.containsKey(c) && (h = a.get(c)); - const u = this.getKey(); - if (h && h.key == u) - return h; - { - const d = this.getTileGridForProjection(o), f = this.getTileGridForProjection(r), g = this.getTileCoordForTileUrlFunction( - l, - r - ), m = new Xa( - o, - d, - r, - f, - l, - g, - this.getTilePixelRatio(s), - this.getGutter(), - function(_, y, p, v) { - return this.getTileInternal(_, y, p, v, o); - }.bind(this), - this.reprojectionErrorThreshold_, - this.renderReprojectionEdges_, - this.getInterpolate() - ); - return m.key = u, h ? (m.interimTile = h, m.refreshInterimChain(), a.replace(c, m)) : a.set(c, m), m; - } - } + readProjection(t) { + return W(); } - getTileInternal(t, e, i, s, r) { - let o = null; - const a = ko(t, e, i), l = this.getKey(); - if (!this.tileCache.containsKey(a)) - o = this.createTile_(t, e, i, s, r, l), this.tileCache.set(a, o); - else if (o = this.tileCache.get(a), o.key != l) { - const h = o; - o = this.createTile_(t, e, i, s, r, l), h.getState() == z.IDLE ? o.interimTile = h.interimTile : o.interimTile = h, o.refreshInterimChain(), this.tileCache.replace(a, o); - } - return o; + writeFeature(t, e) { + return W(); } - setRenderReprojectionEdges(t) { - if (this.renderReprojectionEdges_ != t) { - this.renderReprojectionEdges_ = t; - for (const e in this.tileCacheForProjection) - this.tileCacheForProjection[e].clear(); - this.changed(); - } + writeFeatures(t, e) { + return W(); } - setTileGridForProjection(t, e) { - const i = Q(t); - if (i) { - const s = q(i); - s in this.tileGridForProjection || (this.tileGridForProjection[s] = e); - } + writeGeometry(t, e) { + return W(); } - clear() { - super.clear(); - for (const t in this.tileCacheForProjection) - this.tileCacheForProjection[t].clear(); +} +function Hs(i, t, e) { + const n = e ? J(e.featureProjection) : null, s = e ? J(e.dataProjection) : null; + let r; + if (n && s && !be(n, s) ? r = (t ? i.clone() : i).transform( + t ? n : s, + t ? s : n + ) : r = i, t && e && e.decimals !== void 0) { + const o = Math.pow(10, e.decimals), a = function(l) { + for (let h = 0, c = l.length; h < c; ++h) + l[h] = Math.round(l[h] * o) / o; + return l; + }; + r === i && (r = i.clone()), r.applyTransform(a); } + return r; } -function N2(n, t) { - n.getImage().src = t; +function Rl(i, t) { + const e = t ? J(t.featureProjection) : null, n = t ? J(t.dataProjection) : null; + return e && n && !be(e, n) ? Hu(i, n, e) : i; } -const D2 = F2; -class k2 extends Ve { - constructor(t) { - super({ - attributions: t.attributions, - wrapX: t.wrapX - }), this.resolution = void 0, this.distance = t.distance !== void 0 ? t.distance : 20, this.minDistance = t.minDistance || 0, this.interpolationRatio = 0, this.features = [], this.geometryFunction = t.geometryFunction || function(e) { - const i = e.getGeometry(); - return Y(i.getType() == "Point", 10), i; - }, this.createCustomCluster_ = t.createCluster, this.source = null, this.boundRefresh_ = this.refresh.bind(this), this.updateDistance(this.distance, this.minDistance), this.setSource(t.source || null); - } - clear(t) { - this.features.length = 0, super.clear(t); - } - getDistance() { - return this.distance; - } - getSource() { - return this.source; - } - loadFeatures(t, e, i) { - this.source.loadFeatures(t, e, i), e !== this.resolution && (this.resolution = e, this.refresh()); - } - setDistance(t) { - this.updateDistance(t, this.minDistance); - } - setMinDistance(t) { - this.updateDistance(this.distance, t); - } - getMinDistance() { - return this.minDistance; - } - setSource(t) { - this.source && this.source.removeEventListener(U.CHANGE, this.boundRefresh_), this.source = t, t && t.addEventListener(U.CHANGE, this.boundRefresh_), this.refresh(); - } - refresh() { - this.clear(), this.cluster(), this.addFeatures(this.features); - } - updateDistance(t, e) { - const i = t === 0 ? 0 : Math.min(e, t) / t, s = t !== this.distance || this.interpolationRatio !== i; - this.distance = t, this.minDistance = e, this.interpolationRatio = i, s && this.refresh(); - } - cluster() { - if (this.resolution === void 0 || !this.source) - return; - const t = se(), e = this.distance * this.resolution, i = this.source.getFeatures(), s = {}; - for (let r = 0, o = i.length; r < o; r++) { - const a = i[r]; - if (!(q(a) in s)) { - const l = this.geometryFunction(a); - if (l) { - const h = l.getCoordinates(); - ws(h, t), Js(t, e, t); - const c = this.source.getFeaturesInExtent(t).filter(function(u) { - const d = q(u); - return d in s ? !1 : (s[d] = !0, !0); - }); - this.features.push(this.createCluster(c, t)); - } +class Wr extends Qi { + constructor(t, e, n) { + if (super(), this.ends_ = [], this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, Array.isArray(t[0])) + this.setCoordinates( + t, + e + ); + else if (e !== void 0 && n) + this.setFlatCoordinates( + e, + t + ), this.ends_ = n; + else { + let s = this.getLayout(); + const r = t, o = [], a = []; + for (let l = 0, h = r.length; l < h; ++l) { + const c = r[l]; + l === 0 && (s = c.getLayout()), Ht(o, c.getFlatCoordinates()), a.push(o.length); } + this.setFlatCoordinates(s, o), this.ends_ = a; } } - createCluster(t, e) { - const i = [0, 0]; - for (let a = t.length - 1; a >= 0; --a) { - const l = this.geometryFunction(t[a]); - l ? nd(i, l.getCoordinates()) : t.splice(a, 1); - } - sd(i, 1 / t.length); - const s = Pi(e), r = this.interpolationRatio, o = new Se([ - i[0] * (1 - r) + s[0] * r, - i[1] * (1 - r) + s[1] * r - ]); - return this.createCustomCluster_ ? this.createCustomCluster_(o, t) : new Ie({ - geometry: o, - features: t - }); + appendLineString(t) { + this.flatCoordinates ? Ht(this.flatCoordinates, t.getFlatCoordinates().slice()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed(); } -} -const G2 = k2; -function Nc(n, t) { - const e = []; - Object.keys(t).forEach(function(s) { - t[s] !== null && t[s] !== void 0 && e.push(s + "=" + encodeURIComponent(t[s])); - }); - const i = e.join("&"); - return n = n.replace(/[?&]$/, ""), n += n.includes("?") ? "&" : "?", n + i; -} -const Gr = { - PRELOAD: "preload", - USE_INTERIM_TILES_ON_ERROR: "useInterimTilesOnError" -}; -class $2 extends Po { - constructor(t) { - t = t || {}; - const e = Object.assign({}, t); - delete e.preload, delete e.useInterimTilesOnError, super(e), this.on, this.once, this.un, this.setPreload(t.preload !== void 0 ? t.preload : 0), this.setUseInterimTilesOnError( - t.useInterimTilesOnError !== void 0 ? t.useInterimTilesOnError : !0 + clone() { + const t = new Wr( + this.flatCoordinates.slice(), + this.layout, + this.ends_.slice() ); + return t.applyProperties(this), t; } - getPreload() { - return this.get(Gr.PRELOAD); - } - setPreload(t) { - this.set(Gr.PRELOAD, t); - } - getUseInterimTilesOnError() { - return this.get(Gr.USE_INTERIM_TILES_ON_ERROR); - } - setUseInterimTilesOnError(t) { - this.set(Gr.USE_INTERIM_TILES_ON_ERROR, t); + closestPointXY(t, e, n, s) { + return s < qi(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( + ll( + this.flatCoordinates, + 0, + this.ends_, + this.stride, + 0 + ) + ), this.maxDeltaRevision_ = this.getRevision()), cl( + this.flatCoordinates, + 0, + this.ends_, + this.stride, + this.maxDelta_, + !1, + t, + e, + n, + s + )); } - getData(t) { - return super.getData(t); + getCoordinateAtM(t, e, n) { + return this.layout != "XYM" && this.layout != "XYZM" || this.flatCoordinates.length === 0 ? null : (e = e !== void 0 ? e : !1, n = n !== void 0 ? n : !1, K1( + this.flatCoordinates, + 0, + this.ends_, + this.stride, + t, + e, + n + )); } -} -const B2 = $2; -class z2 extends Yd { - constructor(t) { - super(t), this.extentChanged = !0, this.renderedExtent_ = null, this.renderedPixelRatio, this.renderedProjection = null, this.renderedRevision, this.renderedTiles = [], this.newTiles_ = !1, this.tmpExtent = se(), this.tmpTileRange_ = new sf(0, 0, 0, 0); + getCoordinates() { + return Rs( + this.flatCoordinates, + 0, + this.ends_, + this.stride + ); } - isDrawableTile(t) { - const e = this.getLayer(), i = t.getState(), s = e.getUseInterimTilesOnError(); - return i == z.LOADED || i == z.EMPTY || i == z.ERROR && !s; + getEnds() { + return this.ends_; } - getTile(t, e, i, s) { - const r = s.pixelRatio, o = s.viewState.projection, a = this.getLayer(); - let h = a.getSource().getTile(t, e, i, r, o); - return h.getState() == z.ERROR && a.getUseInterimTilesOnError() && a.getPreload() > 0 && (this.newTiles_ = !0), this.isDrawableTile(h) || (h = h.getInterimTile()), h; + getLineString(t) { + return t < 0 || this.ends_.length <= t ? null : new bs( + this.flatCoordinates.slice( + t === 0 ? 0 : this.ends_[t - 1], + this.ends_[t] + ), + this.layout + ); } - getData(t) { - const e = this.frameState; - if (!e) - return null; - const i = this.getLayer(), s = Nt( - e.pixelToCoordinateTransform, - t.slice() - ), r = i.getExtent(); - if (r && !To(r, s)) - return null; - const o = e.pixelRatio, a = e.viewState.projection, l = e.viewState, h = i.getRenderSource(), c = h.getTileGridForProjection(l.projection), u = h.getTilePixelRatio(e.pixelRatio); - for (let d = c.getZForResolution(l.resolution); d >= c.getMinZoom(); --d) { - const f = c.getTileCoordForCoordAndZ(s, d), g = h.getTile( - d, - f[1], - f[2], - o, - a + getLineStrings() { + const t = this.flatCoordinates, e = this.ends_, n = this.layout, s = []; + let r = 0; + for (let o = 0, a = e.length; o < a; ++o) { + const l = e[o], h = new bs( + t.slice(r, l), + n ); - if (!(g instanceof Qd || g instanceof Xa) || g instanceof Xa && g.getState() === z.EMPTY) - return null; - if (g.getState() !== z.LOADED) - continue; - const m = c.getOrigin(d), _ = fe(c.getTileSize(d)), y = c.getResolution(d), p = Math.floor( - u * ((s[0] - m[0]) / y - f[1] * _[0]) - ), v = Math.floor( - u * ((m[1] - s[1]) / y - f[2] * _[1]) - ), x = Math.round( - u * h.getGutterForProjection(l.projection) + s.push(h), r = l; + } + return s; + } + getFlatMidpoints() { + const t = [], e = this.flatCoordinates; + let n = 0; + const s = this.ends_, r = this.stride; + for (let o = 0, a = s.length; o < a; ++o) { + const l = s[o], h = fd( + e, + n, + l, + r, + 0.5 ); - return this.getImageData(g.getImage(), p + x, v + x); + Ht(t, h), n = l; } - return null; + return t; } - loadedTileCallback(t, e, i) { - return this.isDrawableTile(i) ? super.loadedTileCallback(t, e, i) : !1; + getSimplifiedGeometryInternal(t) { + const e = [], n = []; + return e.length = $g( + this.flatCoordinates, + 0, + this.ends_, + this.stride, + t, + e, + 0, + n + ), new Wr(e, "XY", n); } - prepareFrame(t) { - return !!this.getLayer().getSource(); + getType() { + return "MultiLineString"; } - renderFrame(t, e) { - const i = t.layerStatesArray[t.layerIndex], s = t.viewState, r = s.projection, o = s.resolution, a = s.center, l = s.rotation, h = t.pixelRatio, c = this.getLayer(), u = c.getSource(), d = u.getRevision(), f = u.getTileGridForProjection(r), g = f.getZForResolution(o, u.zDirection), m = f.getResolution(g); - let _ = t.extent; - const y = t.viewState.resolution, p = u.getTilePixelRatio(h), v = Math.round(pt(_) / y * h), x = Math.round(ze(_) / y * h), C = i.extent && Mi(i.extent); - C && (_ = Rs( - _, - Mi(i.extent) - )); - const E = m * v / 2 / p, R = m * x / 2 / p, b = [ - a[0] - E, - a[1] - R, - a[0] + E, - a[1] + R - ], F = f.getTileRangeForExtentAndZ(_, g), G = {}; - G[g] = {}; - const V = this.createLoadedTileFinder( - u, - r, - G - ), L = this.tmpExtent, $ = this.tmpTileRange_; - this.newTiles_ = !1; - const gt = l ? Pa( - s.center, - y, - l, - t.size - ) : void 0; - for (let ce = F.minX; ce <= F.maxX; ++ce) - for (let ht = F.minY; ht <= F.maxY; ++ht) { - if (l && !f.tileCoordIntersectsViewport([g, ce, ht], gt)) - continue; - const _t = this.getTile(g, ce, ht, t); - if (this.isDrawableTile(_t)) { - const Bt = q(this); - if (_t.getState() == z.LOADED) { - G[g][_t.tileCoord.toString()] = _t; - let Xe = _t.inTransition(Bt); - Xe && i.opacity !== 1 && (_t.endTransition(Bt), Xe = !1), !this.newTiles_ && (Xe || !this.renderedTiles.includes(_t)) && (this.newTiles_ = !0); - } - if (_t.getAlpha(Bt, t.time) === 1) - continue; - } - const ui = f.getTileCoordChildTileRange( - _t.tileCoord, - $, - L - ); - let Fe = !1; - ui && (Fe = V(g + 1, ui)), Fe || f.forEachTileCoordParentTileRange( - _t.tileCoord, - V, - $, - L - ); - } - const N = m / o * h / p; - Ii( - this.pixelTransform, - t.size[0] / 2, - t.size[1] / 2, - 1 / h, - 1 / h, - l, - -v / 2, - -x / 2 + intersectsExtent(t) { + return Hg( + this.flatCoordinates, + 0, + this.ends_, + this.stride, + t ); - const k = Yu(this.pixelTransform); - this.useContainer(e, k, this.getBackground(t)); - const P = this.context, it = P.canvas; - _l(this.inversePixelTransform, this.pixelTransform), Ii( - this.tempTransform, - v / 2, - x / 2, - N, - N, + } + setCoordinates(t, e) { + this.setLayout(e, t, 2), this.flatCoordinates || (this.flatCoordinates = []); + const n = ul( + this.flatCoordinates, 0, - -v / 2, - -x / 2 - ), it.width != v || it.height != x ? (it.width = v, it.height = x) : this.containerReused || P.clearRect(0, 0, v, x), C && this.clipUnrotated(P, t, C), u.getInterpolate() || (P.imageSmoothingEnabled = !1), this.preRender(P, t), this.renderedTiles.length = 0; - let wt = Object.keys(G).map(Number); - wt.sort(tn); - let yt, At, T; - i.opacity === 1 && (!this.containerReused || u.getOpaque(t.viewState.projection)) ? wt = wt.reverse() : (yt = [], At = []); - for (let ce = wt.length - 1; ce >= 0; --ce) { - const ht = wt[ce], _t = u.getTilePixelSize( - ht, - h, - r - ), Fe = f.getResolution(ht) / m, Bt = _t[0] * Fe * N, Xe = _t[1] * Fe * N, mn = f.getTileCoordForCoordAndZ( - fn(b), - ht - ), mr = f.getTileCoordExtent(mn), _n = Nt(this.tempTransform, [ - p * (mr[0] - b[0]) / m, - p * (b[3] - mr[3]) / m - ]), _r = p * u.getGutterForProjection(r), di = G[ht]; - for (const hs in di) { - const fi = di[hs], pr = fi.tileCoord, yr = mn[1] - pr[1], vr = Math.round(_n[0] - (yr - 1) * Bt), pn = mn[2] - pr[2], Yo = Math.round(_n[1] - (pn - 1) * Xe), te = Math.round(_n[0] - yr * Bt), ye = Math.round(_n[1] - pn * Xe), Te = vr - te, Ye = Yo - ye, yn = g === ht, Gi = yn && fi.getAlpha(q(this), t.time) !== 1; - let gi = !1; - if (!Gi) - if (yt) { - T = [te, ye, te + Te, ye, te + Te, ye + Ye, te, ye + Ye]; - for (let vn = 0, xr = yt.length; vn < xr; ++vn) - if (g !== ht && ht < At[vn]) { - const Yt = yt[vn]; - Kt( - [te, ye, te + Te, ye + Ye], - [Yt[0], Yt[3], Yt[4], Yt[7]] - ) && (gi || (P.save(), gi = !0), P.beginPath(), P.moveTo(T[0], T[1]), P.lineTo(T[2], T[3]), P.lineTo(T[4], T[5]), P.lineTo(T[6], T[7]), P.moveTo(Yt[6], Yt[7]), P.lineTo(Yt[4], Yt[5]), P.lineTo(Yt[2], Yt[3]), P.lineTo(Yt[0], Yt[1]), P.clip()); - } - yt.push(T), At.push(ht); - } else - P.clearRect(te, ye, Te, Ye); - this.drawTileImage( - fi, - t, - te, - ye, - Te, - Ye, - _r, - yn - ), yt && !Gi ? (gi && P.restore(), this.renderedTiles.unshift(fi)) : this.renderedTiles.push(fi), this.updateUsedTiles(t.usedTiles, u, fi); - } - } - return this.renderedRevision = d, this.renderedResolution = m, this.extentChanged = !this.renderedExtent_ || !Fs(this.renderedExtent_, b), this.renderedExtent_ = b, this.renderedPixelRatio = h, this.renderedProjection = r, this.manageTilePyramid( t, - u, - f, - h, - r, - _, - g, - c.getPreload() - ), this.scheduleExpireCache(t, u), this.postRender(P, t), i.extent && P.restore(), P.imageSmoothingEnabled = !0, k !== it.style.transform && (it.style.transform = k), this.container; + this.stride, + this.ends_ + ); + this.flatCoordinates.length = n.length === 0 ? 0 : n[n.length - 1], this.changed(); } - drawTileImage(t, e, i, s, r, o, a, l) { - const h = this.getTileImage(t); - if (!h) - return; - const c = q(this), u = e.layerStatesArray[e.layerIndex], d = u.opacity * (l ? t.getAlpha(c, e.time) : 1), f = d !== this.context.globalAlpha; - f && (this.context.save(), this.context.globalAlpha = d), this.context.drawImage( - h, - a, - a, - h.width - 2 * a, - h.height - 2 * a, - i, - s, - r, - o - ), f && this.context.restore(), d !== u.opacity ? e.animate = !0 : l && t.endTransition(c); +} +const bl = Wr; +class Ll extends Qi { + constructor(t, e) { + super(), e && !Array.isArray(t[0]) ? this.setFlatCoordinates( + e, + t + ) : this.setCoordinates( + t, + e + ); } - getImage() { - const t = this.context; - return t ? t.canvas : null; + appendPoint(t) { + this.flatCoordinates ? Ht(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.changed(); } - getTileImage(t) { - return t.getImage(); + clone() { + const t = new Ll( + this.flatCoordinates.slice(), + this.layout + ); + return t.applyProperties(this), t; } - scheduleExpireCache(t, e) { - if (e.canExpireCache()) { - const i = function(s, r, o) { - const a = q(s); - a in o.usedTiles && s.expireCache( - o.viewState.projection, - o.usedTiles[a] - ); - }.bind(null, e); - t.postRenderFunctions.push( - i + closestPointXY(t, e, n, s) { + if (s < qi(this.getExtent(), t, e)) + return s; + const r = this.flatCoordinates, o = this.stride; + for (let a = 0, l = r.length; a < l; a += o) { + const h = ki( + t, + e, + r[a], + r[a + 1] ); + if (h < s) { + s = h; + for (let c = 0; c < o; ++c) + n[c] = r[a + c]; + n.length = o; + } } + return s; } - updateUsedTiles(t, e, i) { - const s = q(e); - s in t || (t[s] = {}), t[s][i.getKey()] = !0; - } - manageTilePyramid(t, e, i, s, r, o, a, l, h) { - const c = q(e); - c in t.wantedTiles || (t.wantedTiles[c] = {}); - const u = t.wantedTiles[c], d = t.tileQueue, f = i.getMinZoom(), g = t.viewState.rotation, m = g ? Pa( - t.viewState.center, - t.viewState.resolution, - g, - t.size - ) : void 0; - let _ = 0, y, p, v, x, C, E; - for (E = f; E <= a; ++E) - for (p = i.getTileRangeForExtentAndZ(o, E, p), v = i.getResolution(E), x = p.minX; x <= p.maxX; ++x) - for (C = p.minY; C <= p.maxY; ++C) - g && !i.tileCoordIntersectsViewport([E, x, C], m) || (a - E <= l ? (++_, y = e.getTile(E, x, C, s, r), y.getState() == z.IDLE && (u[y.getKey()] = !0, d.isKeyQueued(y.getKey()) || d.enqueue([ - y, - c, - i.getTileCoordCenter(y.tileCoord), - v - ])), h !== void 0 && h(y)) : e.useTile(E, x, C, r)); - e.updateCacheSize(_, r); - } -} -const Z2 = z2; -class V2 extends B2 { - constructor(t) { - super(t); - } - createRenderer() { - return new Z2(this); - } -} -const U2 = V2; -class W2 extends cf { - constructor(t) { - super({ - extent: t.extent, - origin: t.origin, - origins: t.origins, - resolutions: t.resolutions, - tileSize: t.tileSize, - tileSizes: t.tileSizes, - sizes: t.sizes - }), this.matrixIds_ = t.matrixIds; + getCoordinates() { + return gi( + this.flatCoordinates, + 0, + this.flatCoordinates.length, + this.stride + ); } - getMatrixId(t) { - return this.matrixIds_[t]; + getPoint(t) { + const e = this.flatCoordinates ? this.flatCoordinates.length / this.stride : 0; + return t < 0 || e <= t ? null : new Ci( + this.flatCoordinates.slice( + t * this.stride, + (t + 1) * this.stride + ), + this.layout + ); } - getMatrixIds() { - return this.matrixIds_; + getPoints() { + const t = this.flatCoordinates, e = this.layout, n = this.stride, s = []; + for (let r = 0, o = t.length; r < o; r += n) { + const a = new Ci(t.slice(r, r + n), e); + s.push(a); + } + return s; } -} -function H2(n, t, e) { - const i = [], s = [], r = [], o = [], a = []; - e = e !== void 0 ? e : []; - const l = "SupportedCRS", h = "TileMatrix", c = "Identifier", u = "ScaleDenominator", d = "TopLeftCorner", f = "TileWidth", g = "TileHeight", m = n[l], _ = Q(m), y = _.getMetersPerUnit(), p = _.getAxisOrientation().substr(0, 2) == "ne"; - return n[h].sort(function(v, x) { - return x[u] - v[u]; - }), n[h].forEach(function(v) { - let x; - if (e.length > 0 ? x = e.find(function(C) { - return v[c] == C[h] ? !0 : v[c].includes(":") ? !1 : n[c] + ":" + v[c] === C[h]; - }) : x = !0, x) { - s.push(v[c]); - const C = v[u] * 28e-5 / y, E = v[f], R = v[g]; - p ? r.push([ - v[d][1], - v[d][0] - ]) : r.push(v[d]), i.push(C), o.push( - E == R ? E : [E, R] - ), a.push([v.MatrixWidth, v.MatrixHeight]); + getType() { + return "MultiPoint"; + } + intersectsExtent(t) { + const e = this.flatCoordinates, n = this.stride; + for (let s = 0, r = e.length; s < r; s += n) { + const o = e[s], a = e[s + 1]; + if (Ya(t, o, a)) + return !0; } - }), new W2({ - extent: t, - origins: r, - resolutions: i, - matrixIds: s, - tileSizes: o, - sizes: a - }); + return !1; + } + setCoordinates(t, e) { + this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = _o( + this.flatCoordinates, + 0, + t, + this.stride + ), this.changed(); + } } -class X2 extends D2 { - constructor(t) { - const e = t.requestEncoding !== void 0 ? t.requestEncoding : "KVP", i = t.tileGrid; - let s = t.urls; - s === void 0 && t.url !== void 0 && (s = ff(t.url)), super({ - attributions: t.attributions, - attributionsCollapsible: t.attributionsCollapsible, - cacheSize: t.cacheSize, - crossOrigin: t.crossOrigin, - interpolate: t.interpolate, - projection: t.projection, - reprojectionErrorThreshold: t.reprojectionErrorThreshold, - tileClass: t.tileClass, - tileGrid: i, - tileLoadFunction: t.tileLoadFunction, - tilePixelRatio: t.tilePixelRatio, - urls: s, - wrapX: t.wrapX !== void 0 ? t.wrapX : !1, - transition: t.transition, - zDirection: t.zDirection - }), this.version_ = t.version !== void 0 ? t.version : "1.0.0", this.format_ = t.format !== void 0 ? t.format : "image/jpeg", this.dimensions_ = t.dimensions !== void 0 ? t.dimensions : {}, this.layer_ = t.layer, this.matrixSet_ = t.matrixSet, this.style_ = t.style, this.requestEncoding_ = e, this.setKey(this.getKeyForDimensions_()), s && s.length > 0 && (this.tileUrlFunction = Ya( - s.map(this.createFromWMTSTemplate.bind(this)) - )); +const Tl = Ll; +function s_(i, t, e, n) { + const s = []; + let r = ue(); + for (let o = 0, a = e.length; o < a; ++o) { + const l = e[o]; + r = Eu( + i, + t, + l[0], + n + ), s.push((r[0] + r[2]) / 2, (r[1] + r[3]) / 2), t = l[l.length - 1]; } - setUrls(t) { - this.urls = t; - const e = t.join(` -`); - this.setTileUrlFunction( - Ya( - t.map(this.createFromWMTSTemplate.bind(this)) - ), + return s; +} +class Hr extends Qi { + constructor(t, e, n) { + if (super(), this.endss_ = [], this.flatInteriorPointsRevision_ = -1, this.flatInteriorPoints_ = null, this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, this.orientedRevision_ = -1, this.orientedFlatCoordinates_ = null, !n && !Array.isArray(t[0])) { + let s = this.getLayout(); + const r = t, o = [], a = []; + for (let l = 0, h = r.length; l < h; ++l) { + const c = r[l]; + l === 0 && (s = c.getLayout()); + const u = o.length, d = c.getEnds(); + for (let f = 0, g = d.length; f < g; ++f) + d[f] += u; + Ht(o, c.getFlatCoordinates()), a.push(d); + } + e = s, t = o, n = a; + } + e !== void 0 && n ? (this.setFlatCoordinates( + e, + t + ), this.endss_ = n) : this.setCoordinates( + t, e ); } - getDimensions() { - return this.dimensions_; + appendPolygon(t) { + let e; + if (!this.flatCoordinates) + this.flatCoordinates = t.getFlatCoordinates().slice(), e = t.getEnds().slice(), this.endss_.push(); + else { + const n = this.flatCoordinates.length; + Ht(this.flatCoordinates, t.getFlatCoordinates()), e = t.getEnds().slice(); + for (let s = 0, r = e.length; s < r; ++s) + e[s] += n; + } + this.endss_.push(e), this.changed(); } - getFormat() { - return this.format_; + clone() { + const t = this.endss_.length, e = new Array(t); + for (let s = 0; s < t; ++s) + e[s] = this.endss_[s].slice(); + const n = new Hr( + this.flatCoordinates.slice(), + this.layout, + e + ); + return n.applyProperties(this), n; } - getLayer() { - return this.layer_; + closestPointXY(t, e, n, s) { + return s < qi(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( + Fg( + this.flatCoordinates, + 0, + this.endss_, + this.stride, + 0 + ) + ), this.maxDeltaRevision_ = this.getRevision()), Dg( + this.getOrientedFlatCoordinates(), + 0, + this.endss_, + this.stride, + this.maxDelta_, + !0, + t, + e, + n, + s + )); } - getMatrixSet() { - return this.matrixSet_; + containsXY(t, e) { + return Vg( + this.getOrientedFlatCoordinates(), + 0, + this.endss_, + this.stride, + t, + e + ); } - getRequestEncoding() { - return this.requestEncoding_; + getArea() { + return Zg( + this.getOrientedFlatCoordinates(), + 0, + this.endss_, + this.stride + ); } - getStyle() { - return this.style_; + getCoordinates(t) { + let e; + return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), Ph( + e, + 0, + this.endss_, + this.stride, + t + )) : e = this.flatCoordinates, pa( + e, + 0, + this.endss_, + this.stride + ); } - getVersion() { - return this.version_; + getEndss() { + return this.endss_; } - getKeyForDimensions_() { - let t = 0; - const e = []; - for (const i in this.dimensions_) - e[t++] = i + "-" + this.dimensions_[i]; - return e.join("/"); + getFlatInteriorPoints() { + if (this.flatInteriorPointsRevision_ != this.getRevision()) { + const t = s_( + this.flatCoordinates, + 0, + this.endss_, + this.stride + ); + this.flatInteriorPoints_ = Wg( + this.getOrientedFlatCoordinates(), + 0, + this.endss_, + this.stride, + t + ), this.flatInteriorPointsRevision_ = this.getRevision(); + } + return this.flatInteriorPoints_; } - updateDimensions(t) { - Object.assign(this.dimensions_, t), this.setKey(this.getKeyForDimensions_()); + getInteriorPoints() { + return new Tl(this.getFlatInteriorPoints().slice(), "XYM"); } - createFromWMTSTemplate(t) { - const e = this.requestEncoding_, i = { - layer: this.layer_, - style: this.style_, - tilematrixset: this.matrixSet_ - }; - e == "KVP" && Object.assign(i, { - Service: "WMTS", - Request: "GetTile", - Version: this.version_, - Format: this.format_ - }), t = e == "KVP" ? Nc(t, i) : t.replace(/\{(\w+?)\}/g, function(o, a) { - return a.toLowerCase() in i ? i[a.toLowerCase()] : o; - }); - const s = this.tileGrid, r = this.dimensions_; - return function(o, a, l) { - if (o) { - const h = { - TileMatrix: s.getMatrixId(o[0]), - TileCol: o[1], - TileRow: o[2] - }; - Object.assign(h, r); - let c = t; - return e == "KVP" ? c = Nc(c, h) : c = c.replace(/\{(\w+?)\}/g, function(u, d) { - return h[d]; - }), c; - } else - return; - }; + getOrientedFlatCoordinates() { + if (this.orientedRevision_ != this.getRevision()) { + const t = this.flatCoordinates; + jg(t, 0, this.endss_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = Ph( + this.orientedFlatCoordinates_, + 0, + this.endss_, + this.stride + )), this.orientedRevision_ = this.getRevision(); + } + return this.orientedFlatCoordinates_; } -} -const Y2 = X2; -function j2(n, t) { - const i = n.Contents.Layer.find(function(L) { - return L.Identifier == t.layer; - }); - if (!i) - return null; - const s = n.Contents.TileMatrixSet; - let r; - i.TileMatrixSetLink.length > 1 ? "projection" in t ? r = i.TileMatrixSetLink.findIndex(function(L) { - const gt = s.find(function(P) { - return P.Identifier == L.TileMatrixSet; - }).SupportedCRS, N = Q(gt), k = Q(t.projection); - return N && k ? Ne(N, k) : gt == t.projection; - }) : r = i.TileMatrixSetLink.findIndex(function(L) { - return L.TileMatrixSet == t.matrixSet; - }) : r = 0, r < 0 && (r = 0); - const o = i.TileMatrixSetLink[r].TileMatrixSet, a = i.TileMatrixSetLink[r].TileMatrixSetLimits; - let l = i.Format[0]; - "format" in t && (l = t.format), r = i.Style.findIndex(function(L) { - return "style" in t ? L.Title == t.style : L.isDefault; - }), r < 0 && (r = 0); - const h = i.Style[r].Identifier, c = {}; - "Dimension" in i && i.Dimension.forEach(function(L, $, gt) { - const N = L.Identifier; - let k = L.Default; - k === void 0 && (k = L.Value[0]), c[N] = k; - }); - const d = n.Contents.TileMatrixSet.find(function(L) { - return L.Identifier == o; - }); - let f; - const g = d.SupportedCRS; - if (g && (f = Q(g)), "projection" in t) { - const L = Q(t.projection); - L && (!f || Ne(L, f)) && (f = L); + getSimplifiedGeometryInternal(t) { + const e = [], n = []; + return e.length = zg( + this.flatCoordinates, + 0, + this.endss_, + this.stride, + Math.sqrt(t), + e, + 0, + n + ), new Hr(e, "XY", n); } - let m = !1; - const _ = f.getAxisOrientation().substr(0, 2) == "ne"; - let y = d.TileMatrix[0], p = { - MinTileCol: 0, - MinTileRow: 0, - MaxTileCol: y.MatrixWidth - 1, - MaxTileRow: y.MatrixHeight - 1 - }; - if (a) { - p = a[a.length - 1]; - const L = d.TileMatrix.find( - ($) => $.Identifier === p.TileMatrix || d.Identifier + ":" + $.Identifier === p.TileMatrix + getPolygon(t) { + if (t < 0 || this.endss_.length <= t) + return null; + let e; + if (t === 0) + e = 0; + else { + const r = this.endss_[t - 1]; + e = r[r.length - 1]; + } + const n = this.endss_[t].slice(), s = n[n.length - 1]; + if (e !== 0) + for (let r = 0, o = n.length; r < o; ++r) + n[r] -= e; + return new Dn( + this.flatCoordinates.slice(e, s), + this.layout, + n ); - L && (y = L); } - const v = y.ScaleDenominator * 28e-5 / f.getMetersPerUnit(), x = _ ? [y.TopLeftCorner[1], y.TopLeftCorner[0]] : y.TopLeftCorner, C = y.TileWidth * v, E = y.TileHeight * v; - let R = d.BoundingBox; - R && _ && (R = [ - R[1], - R[0], - R[3], - R[2] - ]); - let b = [ - x[0] + C * p.MinTileCol, - x[1] - E * (1 + p.MaxTileRow), - x[0] + C * (1 + p.MaxTileCol), - x[1] - E * p.MinTileRow - ]; - if (R !== void 0 && !Vi(R, b)) { - const L = i.WGS84BoundingBox, $ = Q("EPSG:4326").getExtent(); - if (b = R, L) - m = L[0] === $[0] && L[2] === $[2]; - else { - const gt = pd( - R, - d.SupportedCRS, - "EPSG:4326" + getPolygons() { + const t = this.layout, e = this.flatCoordinates, n = this.endss_, s = []; + let r = 0; + for (let o = 0, a = n.length; o < a; ++o) { + const l = n[o].slice(), h = l[l.length - 1]; + if (r !== 0) + for (let u = 0, d = l.length; u < d; ++u) + l[u] -= r; + const c = new Dn( + e.slice(r, h), + t, + l ); - m = gt[0] - 1e-10 <= $[0] && gt[2] + 1e-10 >= $[2]; + s.push(c), r = h; } + return s; } - const F = H2( - d, - b, - a - ), G = []; - let V = t.requestEncoding; - if (V = V !== void 0 ? V : "", "OperationsMetadata" in n && "GetTile" in n.OperationsMetadata) { - const L = n.OperationsMetadata.GetTile.DCP.HTTP.Get; - for (let $ = 0, gt = L.length; $ < gt; ++$) - if (L[$].Constraint) { - const k = L[$].Constraint.find(function(P) { - return P.name == "GetEncoding"; - }).AllowedValues.Value; - if (V === "" && (V = k[0]), V === "KVP") - k.includes("KVP") && G.push(L[$].href); - else - break; - } else - L[$].href && (V = "KVP", G.push(L[$].href)); + getType() { + return "MultiPolygon"; } - return G.length === 0 && (V = "REST", i.ResourceURL.forEach(function(L) { - L.resourceType === "tile" && (l = L.format, G.push(L.template)); - })), { - urls: G, - layer: t.layer, - matrixSet: o, - format: l, - projection: f, - requestEncoding: V, - tileGrid: F, - style: h, - dimensions: c, - wrapX: m, - crossOrigin: t.crossOrigin - }; -} -class gf { - constructor() { - this.dataProjection = void 0, this.defaultFeatureProjection = void 0, this.supportedMediaTypes = null; + intersectsExtent(t) { + return Xg( + this.getOrientedFlatCoordinates(), + 0, + this.endss_, + this.stride, + t + ); } - getReadOptions(t, e) { - if (e) { - let i = e.dataProjection ? Q(e.dataProjection) : this.readProjection(t); - e.extent && i && i.getUnits() === "tile-pixels" && (i = Q(i), i.setWorldExtent(e.extent)), e = { - dataProjection: i, - featureProjection: e.featureProjection - }; + setCoordinates(t, e) { + this.setLayout(e, t, 3), this.flatCoordinates || (this.flatCoordinates = []); + const n = Gg( + this.flatCoordinates, + 0, + t, + this.stride, + this.endss_ + ); + if (n.length === 0) + this.flatCoordinates.length = 0; + else { + const s = n[n.length - 1]; + this.flatCoordinates.length = s.length === 0 ? 0 : s[s.length - 1]; } - return this.adaptOptions(e); + this.changed(); } - adaptOptions(t) { - return Object.assign( - { - dataProjection: this.dataProjection, - featureProjection: this.defaultFeatureProjection - }, - t - ); +} +const Il = Hr; +class Xr extends Ku { + constructor(t) { + super(), this.geometries_ = t || null, this.changeEventsKeys_ = [], this.listenGeometriesChange_(); + } + unlistenGeometriesChange_() { + this.changeEventsKeys_.forEach(pt), this.changeEventsKeys_.length = 0; + } + listenGeometriesChange_() { + if (!!this.geometries_) + for (let t = 0, e = this.geometries_.length; t < e; ++t) + this.changeEventsKeys_.push( + it(this.geometries_[t], X.CHANGE, this.changed, this) + ); + } + clone() { + const t = new Xr(null); + return t.setGeometries(this.geometries_), t.applyProperties(this), t; + } + closestPointXY(t, e, n, s) { + if (s < qi(this.getExtent(), t, e)) + return s; + const r = this.geometries_; + for (let o = 0, a = r.length; o < a; ++o) + s = r[o].closestPointXY( + t, + e, + n, + s + ); + return s; + } + containsXY(t, e) { + const n = this.geometries_; + for (let s = 0, r = n.length; s < r; ++s) + if (n[s].containsXY(t, e)) + return !0; + return !1; + } + computeExtent(t) { + ks(t); + const e = this.geometries_; + for (let n = 0, s = e.length; n < s; ++n) + wu(t, e[n].getExtent()); + return t; + } + getGeometries() { + return oc(this.geometries_); + } + getGeometriesArray() { + return this.geometries_; + } + getGeometriesArrayRecursive() { + let t = []; + const e = this.geometries_; + for (let n = 0, s = e.length; n < s; ++n) + e[n].getType() === this.getType() ? t = t.concat( + e[n].getGeometriesArrayRecursive() + ) : t.push(e[n]); + return t; + } + getSimplifiedGeometry(t) { + if (this.simplifiedGeometryRevision !== this.getRevision() && (this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = this.getRevision()), t < 0 || this.simplifiedGeometryMaxMinSquaredTolerance !== 0 && t < this.simplifiedGeometryMaxMinSquaredTolerance) + return this; + const e = [], n = this.geometries_; + let s = !1; + for (let r = 0, o = n.length; r < o; ++r) { + const a = n[r], l = a.getSimplifiedGeometry(t); + e.push(l), l !== a && (s = !0); + } + if (s) { + const r = new Xr(null); + return r.setGeometriesArray(e), r; + } else + return this.simplifiedGeometryMaxMinSquaredTolerance = t, this; } getType() { - return H(); + return "GeometryCollection"; } - readFeature(t, e) { - return H(); + intersectsExtent(t) { + const e = this.geometries_; + for (let n = 0, s = e.length; n < s; ++n) + if (e[n].intersectsExtent(t)) + return !0; + return !1; } - readFeatures(t, e) { - return H(); + isEmpty() { + return this.geometries_.length === 0; } - readGeometry(t, e) { - return H(); + rotate(t, e) { + const n = this.geometries_; + for (let s = 0, r = n.length; s < r; ++s) + n[s].rotate(t, e); + this.changed(); } - readProjection(t) { - return H(); + scale(t, e, n) { + n || (n = Mi(this.getExtent())); + const s = this.geometries_; + for (let r = 0, o = s.length; r < o; ++r) + s[r].scale(t, e, n); + this.changed(); } - writeFeature(t, e) { - return H(); + setGeometries(t) { + this.setGeometriesArray(oc(t)); } - writeFeatures(t, e) { - return H(); + setGeometriesArray(t) { + this.unlistenGeometriesChange_(), this.geometries_ = t, this.listenGeometriesChange_(), this.changed(); } - writeGeometry(t, e) { - return H(); + applyTransform(t) { + const e = this.geometries_; + for (let n = 0, s = e.length; n < s; ++n) + e[n].applyTransform(t); + this.changed(); } -} -function or(n, t, e) { - const i = e ? Q(e.featureProjection) : null, s = e ? Q(e.dataProjection) : null; - let r; - if (i && s && !Ne(i, s) ? r = (t ? n.clone() : n).transform( - t ? i : s, - t ? s : i - ) : r = n, t && e && e.decimals !== void 0) { - const o = Math.pow(10, e.decimals), a = function(l) { - for (let h = 0, c = l.length; h < c; ++h) - l[h] = Math.round(l[h] * o) / o; - return l; - }; - r === n && (r = n.clone()), r.applyTransform(a); + translate(t, e) { + const n = this.geometries_; + for (let s = 0, r = n.length; s < r; ++s) + n[s].translate(t, e); + this.changed(); + } + disposeInternal() { + this.unlistenGeometriesChange_(), super.disposeInternal(); } - return r; } -function ih(n, t) { - const e = t ? Q(t.featureProjection) : null, i = t ? Q(t.dataProjection) : null; - return e && i && !Ne(e, i) ? pd(n, i, e) : n; +function oc(i) { + const t = []; + for (let e = 0, n = i.length; e < n; ++e) + t.push(i[e].clone()); + return t; } -class q2 extends gf { +const r_ = Xr; +class o_ extends Gd { constructor() { super(); } @@ -15587,87 +14001,87 @@ class q2 extends gf { } readFeature(t, e) { return this.readFeatureFromObject( - $r(t), + xr(t), this.getReadOptions(t, e) ); } readFeatures(t, e) { return this.readFeaturesFromObject( - $r(t), + xr(t), this.getReadOptions(t, e) ); } readFeatureFromObject(t, e) { - return H(); + return W(); } readFeaturesFromObject(t, e) { - return H(); + return W(); } readGeometry(t, e) { return this.readGeometryFromObject( - $r(t), + xr(t), this.getReadOptions(t, e) ); } readGeometryFromObject(t, e) { - return H(); + return W(); } readProjection(t) { - return this.readProjectionFromObject($r(t)); + return this.readProjectionFromObject(xr(t)); } readProjectionFromObject(t) { - return H(); + return W(); } writeFeature(t, e) { return JSON.stringify(this.writeFeatureObject(t, e)); } writeFeatureObject(t, e) { - return H(); + return W(); } writeFeatures(t, e) { return JSON.stringify(this.writeFeaturesObject(t, e)); } writeFeaturesObject(t, e) { - return H(); + return W(); } writeGeometry(t, e) { return JSON.stringify(this.writeGeometryObject(t, e)); } writeGeometryObject(t, e) { - return H(); + return W(); } } -function $r(n) { - if (typeof n == "string") { - const t = JSON.parse(n); +function xr(i) { + if (typeof i == "string") { + const t = JSON.parse(i); return t || null; } else - return n !== null ? n : null; + return i !== null ? i : null; } -const K2 = q2; -class J2 extends K2 { +const a_ = o_; +class l_ extends a_ { constructor(t) { - t = t || {}, super(), this.dataProjection = Q( + t = t || {}, super(), this.dataProjection = J( t.dataProjection ? t.dataProjection : "EPSG:4326" - ), t.featureProjection && (this.defaultFeatureProjection = Q(t.featureProjection)), this.geometryName_ = t.geometryName, this.extractGeometryName_ = t.extractGeometryName, this.supportedMediaTypes = [ + ), t.featureProjection && (this.defaultFeatureProjection = J(t.featureProjection)), this.geometryName_ = t.geometryName, this.extractGeometryName_ = t.extractGeometryName, this.supportedMediaTypes = [ "application/geo+json", "application/vnd.geo+json" ]; } readFeatureFromObject(t, e) { - let i = null; - t.type === "Feature" ? i = t : i = { + let n = null; + t.type === "Feature" ? n = t : n = { type: "Feature", geometry: t, properties: null }; - const s = ja(i.geometry, e), r = new Ie(); - return this.geometryName_ ? r.setGeometryName(this.geometryName_) : this.extractGeometryName_ && "geometry_name" in i !== void 0 && r.setGeometryName(i.geometry_name), r.setGeometry(s), "id" in i && r.setId(i.id), i.properties && r.setProperties(i.properties, !0), r; + const s = Ra(n.geometry, e), r = new zs(); + return this.geometryName_ ? r.setGeometryName(this.geometryName_) : this.extractGeometryName_ && "geometry_name" in n !== void 0 && r.setGeometryName(n.geometry_name), r.setGeometry(s), "id" in n && r.setId(n.id), n.properties && r.setProperties(n.properties, !0), r; } readFeaturesFromObject(t, e) { - const i = t; + const n = t; let s = null; - if (i.type === "FeatureCollection") { + if (n.type === "FeatureCollection") { const r = t; s = []; const o = r.features; @@ -15678,163 +14092,163 @@ class J2 extends K2 { return s; } readGeometryFromObject(t, e) { - return ja(t, e); + return Ra(t, e); } readProjectionFromObject(t) { const e = t.crs; - let i; - return e ? e.type == "name" ? i = Q(e.properties.name) : e.type === "EPSG" ? i = Q("EPSG:" + e.properties.code) : Y(!1, 36) : i = this.dataProjection, i; + let n; + return e ? e.type == "name" ? n = J(e.properties.name) : e.type === "EPSG" ? n = J("EPSG:" + e.properties.code) : Y(!1, 36) : n = this.dataProjection, n; } writeFeatureObject(t, e) { e = this.adaptOptions(e); - const i = { + const n = { type: "Feature", geometry: null, properties: null }, s = t.getId(); - if (s !== void 0 && (i.id = s), !t.hasProperties()) - return i; + if (s !== void 0 && (n.id = s), !t.hasProperties()) + return n; const r = t.getProperties(), o = t.getGeometry(); - return o && (i.geometry = qa(o, e), delete r[t.getGeometryName()]), Hn(r) || (i.properties = r), i; + return o && (n.geometry = ba(o, e), delete r[t.getGeometryName()]), An(r) || (n.properties = r), n; } writeFeaturesObject(t, e) { e = this.adaptOptions(e); - const i = []; + const n = []; for (let s = 0, r = t.length; s < r; ++s) - i.push(this.writeFeatureObject(t[s], e)); + n.push(this.writeFeatureObject(t[s], e)); return { type: "FeatureCollection", - features: i + features: n }; } writeGeometryObject(t, e) { - return qa(t, this.adaptOptions(e)); + return ba(t, this.adaptOptions(e)); } } -function ja(n, t) { - if (!n) +function Ra(i, t) { + if (!i) return null; let e; - switch (n.type) { + switch (i.type) { case "Point": { - e = tp(n); + e = c_(i); break; } case "LineString": { - e = ep( - n + e = u_( + i ); break; } case "Polygon": { - e = rp(n); + e = m_(i); break; } case "MultiPoint": { - e = np( - n + e = f_( + i ); break; } case "MultiLineString": { - e = ip( - n + e = d_( + i ); break; } case "MultiPolygon": { - e = sp( - n + e = g_( + i ); break; } case "GeometryCollection": { - e = Q2( - n + e = h_( + i ); break; } default: - throw new Error("Unsupported GeoJSON type: " + n.type); + throw new Error("Unsupported GeoJSON type: " + i.type); } - return or(e, !1, t); + return Hs(e, !1, t); } -function Q2(n, t) { - const e = n.geometries.map( - function(i) { - return ja(i, t); +function h_(i, t) { + const e = i.geometries.map( + function(n) { + return Ra(n, t); } ); - return new of(e); + return new r_(e); } -function tp(n) { - return new Se(n.coordinates); +function c_(i) { + return new Ci(i.coordinates); } -function ep(n) { - return new li(n.coordinates); +function u_(i) { + return new bs(i.coordinates); } -function ip(n) { - return new sr(n.coordinates); +function d_(i) { + return new bl(i.coordinates); } -function np(n) { - return new $o(n.coordinates); +function f_(i) { + return new Tl(i.coordinates); } -function sp(n) { - return new rr(n.coordinates); +function g_(i) { + return new Il(i.coordinates); } -function rp(n) { - return new Ai(n.coordinates); +function m_(i) { + return new Dn(i.coordinates); } -function qa(n, t) { - n = or(n, !0, t); - const e = n.getType(); - let i; +function ba(i, t) { + i = Hs(i, !0, t); + const e = i.getType(); + let n; switch (e) { case "Point": { - i = up(n); + n = M_(i); break; } case "LineString": { - i = ap( - n + n = p_( + i ); break; } case "Polygon": { - i = dp( - n, + n = C_( + i, t ); break; } case "MultiPoint": { - i = hp( - n + n = v_( + i ); break; } case "MultiLineString": { - i = lp( - n + n = y_( + i ); break; } case "MultiPolygon": { - i = cp( - n, + n = x_( + i, t ); break; } case "GeometryCollection": { - i = op( - n, + n = __( + i, t ); break; } case "Circle": { - i = { + n = { type: "GeometryCollection", geometries: [] }; @@ -15843,206 +14257,56 @@ function qa(n, t) { default: throw new Error("Unsupported geometry type: " + e); } - return i; + return n; } -function op(n, t) { +function __(i, t) { return t = Object.assign({}, t), delete t.featureProjection, { type: "GeometryCollection", - geometries: n.getGeometriesArray().map(function(i) { - return qa(i, t); + geometries: i.getGeometriesArray().map(function(n) { + return ba(n, t); }) }; } -function ap(n, t) { +function p_(i, t) { return { type: "LineString", - coordinates: n.getCoordinates() + coordinates: i.getCoordinates() }; } -function lp(n, t) { +function y_(i, t) { return { type: "MultiLineString", - coordinates: n.getCoordinates() + coordinates: i.getCoordinates() }; } -function hp(n, t) { +function v_(i, t) { return { type: "MultiPoint", - coordinates: n.getCoordinates() + coordinates: i.getCoordinates() }; } -function cp(n, t) { +function x_(i, t) { let e; return t && (e = t.rightHanded), { type: "MultiPolygon", - coordinates: n.getCoordinates(e) + coordinates: i.getCoordinates(e) }; } -function up(n, t) { +function M_(i, t) { return { type: "Point", - coordinates: n.getCoordinates() - }; -} -function dp(n, t) { - let e; - return t && (e = t.rightHanded), { - type: "Polygon", - coordinates: n.getCoordinates(e) - }; -} -const mf = J2; -let _f = "", pf = !1, yf = "", vf, xf, Cf, Kn = [], Mf, Ef = -1, wf = -1; -function fp(n) { - _f = n; -} -function gp() { - return _f; -} -function mp(n) { - pf = n; -} -function _p() { - return pf; -} -function pp(n) { - yf = n; -} -function yp() { - return yf; -} -function vp(n) { - vf = n; -} -function xp() { - return vf; -} -function Cp(n) { - xf = n; -} -function Mp() { - return xf; -} -function Ep(n) { - Cf = n; -} -function wp() { - return Cf; -} -function Sp(n) { - Kn.push(n); -} -function Rp(n, t) { - const e = Kn.findIndex((i) => i.get(t) === n); - e !== -1 && Kn.splice(e, 1); -} -function Tp(n, t) { - const e = Kn.findIndex((i) => i.get(t) === n); - return e !== -1 ? Kn[e] : void 0; -} -function bp() { - return Kn; -} -function Lp(n) { - Mf = n; -} -function Ip() { - return Mf; -} -function Pp(n) { - Ef = n; -} -function Ap() { - return Ef; -} -function Op(n) { - wf = n; -} -function Fp() { - return wf; -} -function w() { - return { - setTheme: fp, - getTheme: gp, - setCustomDisplay: mp, - isCustomDisplay: _p, - setTargetBoxSize: pp, - getTargetBoxSize: yp, - setGeolocation: vp, - getGeolocation: xp, - setOptions: Cp, - getOptions: Mp, - setMap: Ep, - getMap: wp, - addSelectedFeature: Sp, - removeSelectedFeature: Rp, - getSelectedFeature: Tp, - getSelectedFeatures: bp, - setBorderConstraint: Lp, - getBorderConstraint: Ip, - setCurrentItemId: Pp, - getCurrentItemId: Ap, - setMaxElement: Op, - getMaxElement: Fp - }; -} -class Np { - constructor() { - this.nbDraw = 0, this.source = new Ve(), this.vector = new Ze({ - source: this.source, - style: new Zt({ - fill: new Vt({ - color: "rgba(255, 255, 255, 0.2)" - }), - stroke: new Xt({ - color: "#ffcc33", - width: 2 - }), - image: new we({ - radius: 7, - fill: new Vt({ - color: "#ffcc33" - }) - }) - }) - }), w().getMap().addLayer(this.vector), this.modify = new u2({ source: this.source }), w().getMap().addInteraction(this.modify), this.addInteraction(); - } - removeInteraction() { - this.draw && w().getMap().removeInteraction(this.draw), this.snap && w().getMap().removeInteraction(this.snap); - } - couldContinueToDraw() { - w().getOptions().maxNbDraw != -1 && (this.nbDraw += 1, this.nbDraw >= w().getOptions().maxNbDraw && this.draw && this.draw.addEventListener("drawend", this.removeInteraction.bind(this))); - } - addInteraction() { - this.draw = new a2({ - source: this.source, - type: w().getOptions().drawElement - }), w().getMap().addInteraction(this.draw), this.snap = new f2({ source: this.source }), w().getMap().addInteraction(this.snap), this.draw.addEventListener("drawstart", this.couldContinueToDraw.bind(this)); - } -} -class Dp { - constructor() { - this.data = {}, this.vectorSource = new Ve(), this.vectorLayer = new Ze(), fetch(w().getOptions().geojson.url).then((t) => t.json()).then((t) => { - this.vectorSource = new Ve({ - features: new mf().readFeatures(t) - }), this.vectorLayer = new Ze({ - source: this.vectorSource, - style: this.styleFunction - }), w().getMap().addLayer(this.vectorLayer); - }); - } - styleFunction() { - return new Zt({ - image: new we({ - radius: 5, - fill: void 0, - stroke: new Xt({ color: "red", width: 1 }) - }) - }); - } + coordinates: i.getCoordinates() + }; } -class ot { +function C_(i, t) { + let e; + return t && (e = t.rightHanded), { + type: "Polygon", + coordinates: i.getCoordinates(e) + }; +} +const E_ = l_; +class st { static sendEvent(t, e) { dispatchEvent(new CustomEvent(t, { detail: e })); } @@ -16052,15 +14316,15 @@ class ot { * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Sf = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, nh = (n) => (...t) => ({ _$litDirective$: n, values: t }); -class sh { +const $d = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Al = (i) => (...t) => ({ _$litDirective$: i, values: t }); +class Pl { constructor(t) { } get _$AU() { return this._$AM._$AU; } - _$AT(t, e, i) { - this._$Ct = t, this._$AM = e, this._$Ci = i; + _$AT(t, e, n) { + this._$Ct = t, this._$AM = e, this._$Ci = n; } _$AS(t, e) { return this.update(t, e); @@ -16074,17 +14338,17 @@ class sh { * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const { I: kp } = wg, Br = (n, t) => t === void 0 ? (n == null ? void 0 : n._$litType$) !== void 0 : (n == null ? void 0 : n._$litType$) === t, Dc = () => document.createComment(""), kc = (n, t, e) => { - var i; - const s = n._$AA.parentNode, r = t === void 0 ? n._$AB : t._$AA; +const { I: w_ } = jf, Mr = (i, t) => t === void 0 ? (i == null ? void 0 : i._$litType$) !== void 0 : (i == null ? void 0 : i._$litType$) === t, ac = () => document.createComment(""), lc = (i, t, e) => { + var n; + const s = i._$AA.parentNode, r = t === void 0 ? i._$AB : t._$AA; if (e === void 0) { - const o = s.insertBefore(Dc(), r), a = s.insertBefore(Dc(), r); - e = new kp(o, a, n, n.options); + const o = s.insertBefore(ac(), r), a = s.insertBefore(ac(), r); + e = new w_(o, a, i, i.options); } else { - const o = e._$AB.nextSibling, a = e._$AM, l = a !== n; + const o = e._$AB.nextSibling, a = e._$AM, l = a !== i; if (l) { let h; - (i = e._$AQ) === null || i === void 0 || i.call(e, n), e._$AM = n, e._$AP !== void 0 && (h = n._$AU) !== a._$AU && e._$AP(h); + (n = e._$AQ) === null || n === void 0 || n.call(e, i), e._$AM = i, e._$AP !== void 0 && (h = i._$AU) !== a._$AU && e._$AP(h); } if (o !== r || l) { let h = e._$AA; @@ -16095,37 +14359,37 @@ const { I: kp } = wg, Br = (n, t) => t === void 0 ? (n == null ? void 0 : n._$li } } return e; -}, Gp = {}, Gc = (n, t = Gp) => n._$AH = t, $c = (n) => n._$AH, $p = (n) => { - n._$AR(); +}, S_ = {}, hc = (i, t = S_) => i._$AH = t, cc = (i) => i._$AH, R_ = (i) => { + i._$AR(); }; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Rf = nh(class extends sh { - constructor(n) { - super(n), this.et = /* @__PURE__ */ new WeakMap(); - } - render(n) { - return [n]; - } - update(n, [t]) { - if (Br(this.it) && (!Br(t) || this.it.strings !== t.strings)) { - const e = $c(n).pop(); - let i = this.et.get(this.it.strings); - if (i === void 0) { +const Bd = Al(class extends Pl { + constructor(i) { + super(i), this.et = /* @__PURE__ */ new WeakMap(); + } + render(i) { + return [i]; + } + update(i, [t]) { + if (Mr(this.it) && (!Mr(t) || this.it.strings !== t.strings)) { + const e = cc(i).pop(); + let n = this.et.get(this.it.strings); + if (n === void 0) { const s = document.createDocumentFragment(); - i = Zu(bt, s), i.setConnected(!1), this.et.set(this.it.strings, i); + n = gu(bt, s), n.setConnected(!1), this.et.set(this.it.strings, n); } - Gc(i, [e]), kc(i, void 0, e); + hc(n, [e]), lc(n, void 0, e); } - if (Br(t)) { - if (!Br(this.it) || this.it.strings !== t.strings) { + if (Mr(t)) { + if (!Mr(this.it) || this.it.strings !== t.strings) { const e = this.et.get(t.strings); if (e !== void 0) { - const i = $c(e).pop(); - $p(n), kc(n, void 0, i), Gc(n, [i]); + const n = cc(e).pop(); + R_(i), lc(i, void 0, n), hc(i, [n]); } } this.it = t; @@ -16139,15 +14403,15 @@ const Rf = nh(class extends sh { * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -class Ka extends sh { +class La extends Pl { constructor(t) { - if (super(t), this.it = bt, t.type !== Sf.CHILD) + if (super(t), this.it = bt, t.type !== $d.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings"); } render(t) { if (t === bt || t == null) return this._t = void 0, this.it = t; - if (t === bi) + if (t === yi) return t; if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value"); @@ -16158,23 +14422,133 @@ class Ka extends sh { return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] }; } } -Ka.directiveName = "unsafeHTML", Ka.resultType = 1; +La.directiveName = "unsafeHTML", La.resultType = 1; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -class Ja extends Ka { +class Ta extends La { +} +Ta.directiveName = "unsafeSVG", Ta.resultType = 2; +const Fe = Al(Ta); +let zd = "", Zd = !1, Ud = "", Vd, Wd, Hd, ti = [], Xd, Yd = -1, jd = -1; +function b_(i) { + zd = i; +} +function L_() { + return zd; +} +function T_(i) { + Zd = i; +} +function I_() { + return Zd; +} +function A_(i) { + Ud = i; +} +function P_() { + return Ud; +} +function O_(i) { + Vd = i; +} +function N_() { + return Vd; +} +function F_(i) { + Wd = i; +} +function D_() { + return Wd; +} +function k_(i) { + Hd = i; +} +function G_() { + return Hd; +} +function $_(i, t, e) { + ti.push({ + id: t, + type: e, + feature: i + }); +} +function B_(i) { + const t = ti.findIndex((e) => e.id === i); + t !== -1 && ti.splice(t, 1); +} +function z_(i) { + const t = ti.findIndex((e) => e.id === i); + return t !== -1 ? ti[t].feature : void 0; +} +function Z_(i) { + const t = ti.findIndex((e) => e.id === i); + return t !== -1 ? ti[t].type : ""; +} +function U_() { + var i; + (i = ti.find((t) => t.feature.get("isSelected"))) == null || i.feature.set("isSelected", void 0); +} +function V_() { + return ti.map((i) => i.feature); +} +function W_(i) { + Xd = i; +} +function H_() { + return Xd; +} +function X_(i) { + Yd = i; +} +function Y_() { + return Yd; } -Ja.directiveName = "unsafeSVG", Ja.resultType = 2; -const Ue = nh(Ja), Bp = `.box-element{position:absolute;top:10px;background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);border:1px solid var(--information-box-background-color);margin-left:5px;margin-right:5px;max-width:302px;width:100%;left:calc(50% - 172px);font-family:sans-serif;display:flex;z-index:5}.box-text-container{width:70%}.box-icon-container{width:30%;display:flex}.box-element-title{display:flex}.box-element-title-text{width:900%;font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color)}.box-element-content{font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color);width:90%}.position-icon{display:flex;justify-content:center;width:50%}.icon-container{width:36px;height:36px;background-color:var(--select-icon-background);border-radius:var(--icon-border-radius)}.icon-container>svg{display:block;margin-left:calc((var(--icon-width) - var(--svg-icon-size)) / 2);margin-top:calc((var(--icon-height) - var(--svg-icon-size)) / 2);width:var(--svg-icon-size)!important;height:var(--svg-icon-size)!important}.icon-container>svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round} +function j_(i) { + jd = i; +} +function K_() { + return jd; +} +function w() { + return { + setTheme: b_, + getTheme: L_, + setCustomDisplay: T_, + isCustomDisplay: I_, + setTargetBoxSize: A_, + getTargetBoxSize: P_, + setGeolocation: O_, + getGeolocation: N_, + setOptions: F_, + getOptions: D_, + setMap: k_, + getMap: G_, + addSelectedFeature: $_, + removeSelectedFeature: B_, + getSelectedFeature: z_, + getCurrentFeatureType: Z_, + getSelectedFeatures: V_, + unselectFeatures: U_, + setBorderConstraint: W_, + getBorderConstraint: H_, + setCurrentItemId: X_, + getCurrentItemId: Y_, + setMaxElement: j_, + getMaxElement: K_ + }; +} +const q_ = `.box-element{position:absolute;top:10px;background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);border:1px solid var(--information-box-background-color);margin-left:5px;margin-right:5px;max-width:302px;width:100%;left:calc(50% - 172px);font-family:sans-serif;display:flex;z-index:5}.box-text-container{width:70%}.box-icon-container{width:30%;display:flex}.box-element-title{display:flex}.box-element-title-text{width:900%;font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color)}.box-element-content{font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color);width:90%}.position-icon{display:flex;justify-content:center;width:50%}.icon-container{width:36px;height:36px;background-color:var(--select-icon-background);border-radius:var(--icon-border-radius)}.icon-container>svg{display:block;margin-left:calc((var(--icon-width) - var(--svg-icon-size)) / 2);margin-top:calc((var(--icon-height) - var(--svg-icon-size)) / 2);width:var(--svg-icon-size)!important;height:var(--svg-icon-size)!important}.icon-container>svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round} `; -class Tf { +class Kd { static getAddressFromCoordinate(t) { return fetch(`https://api3.geo.admin.ch/rest/services/api/MapServer/identify?mapExtent=0,0,100,100&imageDisplay=100,100,100&tolerance=20&geometryType=esriGeometryPoint&geometry=${t[0]},${t[1]}&layers=all:ch.bfs.gebaeude_wohnungs_register&returnGeometry=false&sr=2056`).then((e) => e.json()); } } -class at { +class ot { static zoomInLabel() { const t = document.createElement("div"), e = document.createElementNS("http://www.w3.org/2000/svg", "svg"); return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` @@ -16236,7 +14610,7 @@ class at { `, t.appendChild(e), t; } } -at.info = ` +ot.info = ` @@ -16251,7 +14625,7 @@ at.info = ` `; -at.warning = ` +ot.warning = ` @@ -16266,7 +14640,7 @@ at.warning = ` `; -at.error = ` +ot.error = ` @@ -16282,7 +14656,7 @@ at.error = ` `; -at.mapPin = ` +ot.mapPin = ` @@ -16312,7 +14686,7 @@ at.mapPin = ` `; -at.mapPinClick = ` +ot.mapPinClick = ` @@ -16341,7 +14715,7 @@ at.mapPinClick = ` `; -at.mapPinSelect = ` +ot.mapPinSelect = ` @@ -16370,7 +14744,7 @@ at.mapPinSelect = ` `; -at.information = ` +ot.information = ` @@ -16385,7 +14759,7 @@ at.information = ` `; -at.geolocation = ` +ot.geolocation = ` @@ -16399,7 +14773,7 @@ at.geolocation = ` `; -at.rotation = ` +ot.rotation = ` @@ -16409,7 +14783,7 @@ at.rotation = ` `; -at.iconRecenter = ` +ot.iconRecenter = ` @@ -16423,7 +14797,7 @@ at.iconRecenter = ` `; -at.iconRemoveSelection = ` +ot.iconRemoveSelection = ` @@ -16432,7 +14806,7 @@ at.iconRemoveSelection = ` `; -at.search = ` +ot.search = ` @@ -16446,7 +14820,7 @@ at.search = ` `; -at.cross = ` +ot.cross = ` @@ -16460,7 +14834,7 @@ at.cross = ` `; -at.stack = ` +ot.stack = ` @@ -16476,21 +14850,21 @@ at.stack = ` `; -var zp = Object.defineProperty, Zp = Object.getOwnPropertyDescriptor, Bo = (n, t, e, i) => { - for (var s = i > 1 ? void 0 : i ? Zp(t, e) : t, r = n.length - 1, o; r >= 0; r--) - (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); - return i && s && zp(t, e, s), s; +var J_ = Object.defineProperty, Q_ = Object.getOwnPropertyDescriptor, xo = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? Q_(t, e) : t, r = i.length - 1, o; r >= 0; r--) + (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); + return n && s && J_(t, e, s), s; }; -let Jn = class extends kt { +let kn = class extends At { constructor() { super(), this.currentPosition = [0, 0], this._isRecenterButton = !0, this._currentPosition = "", w().getMap().getView().on("change:center", () => { - const n = w().getSelectedFeature(w().getCurrentItemId(), w().getOptions().mode.type === "select" ? "objectid" : "id"); - if (n) { - const t = n.get("geom"); + const i = w().getSelectedFeature(w().getCurrentItemId()); + if (i) { + const t = i.get("geom"); this._isRecenterButton = t.intersectsExtent(w().getMap().getView().calculateExtent(w().getMap().getSize())); } - }), window.addEventListener("open-select-create-box", (n) => { - Tf.getAddressFromCoordinate(n.detail).then((t) => { + }), window.addEventListener("open-select-create-box", (i) => { + Kd.getAddressFromCoordinate(i.detail).then((t) => { this._currentPosition = t.results.length > 0 ? `proche de ${t.results[0].attributes.strname_deinr}` : "Aucune adresse proche reconnue"; }); }); @@ -16509,15 +14883,15 @@ let Jn = class extends kt {
- ${Rf( + ${Bd( this._isRecenterButton ? Lt`` : Lt`
- ${Ue(at.iconRecenter)} + ${Fe(ot.iconRecenter)}
` )}
- ${Ue(at.iconRemoveSelection)} + ${Fe(ot.iconRemoveSelection)}
@@ -16525,27 +14899,35 @@ let Jn = class extends kt { `; } recenter() { - ot.sendEvent("recenter-selected-element", void 0); + st.sendEvent("recenter-selected-element", void 0); } unselect() { - const n = w().getOptions(); - n.mode.type === "select" && ot.sendEvent("icon-clicked", w().getCurrentItemId()), n.mode.type === "create" && ot.sendEvent("icon-removed", void 0); + const i = w().getOptions(); + let t = ""; + switch (i.mode.type === "mix" ? t = w().getCurrentFeatureType(w().getCurrentItemId()) : t = i.mode.type, t) { + case "select": + st.sendEvent("icon-clicked", w().getCurrentItemId()); + break; + case "create": + st.sendEvent("icon-removed", void 0); + break; + } } }; -Jn.styles = [Mt(Bp)]; -Bo([ - cn() -], Jn.prototype, "currentPosition", 2); -Bo([ - ae() -], Jn.prototype, "_isRecenterButton", 2); -Bo([ - ae() -], Jn.prototype, "_currentPosition", 2); -Jn = Bo([ - oe("select-information-box-element") -], Jn); -class bf extends Gt { +kn.styles = [xt(q_)]; +xo([ + ji() +], kn.prototype, "currentPosition", 2); +xo([ + Yt() +], kn.prototype, "_isRecenterButton", 2); +xo([ + Yt() +], kn.prototype, "_currentPosition", 2); +kn = xo([ + Xt("select-information-box-element") +], kn); +class qd extends Dt { constructor() { const t = document.createElement("select-information-box-element"); super({ element: t }), this.div = t; @@ -16560,72 +14942,77 @@ class bf extends Gt { this.div.classList.remove("fade-in"), this.div.classList.add("fade-out"); } } -class Vp { - static clusterWithIcon(t) { +class tp { + constructor() { + this.clickImage = document.createElement("img"), this.clickImage.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(ot.mapPinClick), this.selectImage = document.createElement("img"), this.selectImage.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(ot.mapPinSelect); + } + clusterWithIcon(t) { const e = t.get("features").length; - let i; - return e === 1 && t.get("features")[0].get("isSelected") ? i = new Zt({ + let n; + return e === 1 && t.get("features")[0].get("isSelected") ? n = new Vt({ zIndex: 1, - image: new Ts({ - src: "data:image/svg+xml;charset=utf-8," + encodeURIComponent(at.mapPinSelect), + image: new us({ + img: this.selectImage, + imgSize: [42, 54], anchor: [0.5, 54], anchorXUnits: "fraction", anchorYUnits: "pixels" }) - }) : e === 1 && t.get("features")[0].get("isClick") ? i = new Zt({ + }) : e === 1 && t.get("features")[0].get("isClick") ? n = new Vt({ zIndex: 1, - image: new Ts({ - src: "data:image/svg+xml;charset=utf-8," + encodeURIComponent(at.mapPinClick), + image: new us({ + img: this.clickImage, + imgSize: [42, 54], anchor: [0.5, 54], anchorXUnits: "fraction", anchorYUnits: "pixels" }) - }) : e === 1 && !t.get("features")[0].get("isClick") ? i = new Zt({ + }) : e === 1 && !t.get("features")[0].get("isClick") ? n = new Vt({ zIndex: 1, - image: new Ts({ - src: "data:image/svg+xml;charset=utf-8," + encodeURIComponent(at.mapPin), + image: new us({ + src: "data:image/svg+xml;charset=utf-8," + encodeURIComponent(ot.mapPin), anchor: [0.5, 54], anchorXUnits: "fraction", anchorYUnits: "pixels" }) - }) : t.get("features").find((s) => s.get("isClick")) ? i = new Zt({ - image: new we({ + }) : t.get("features").find((s) => s.get("isClick")) ? n = new Vt({ + image: new qe({ radius: 15, - stroke: new Xt({ + stroke: new Ee({ color: "#fff" }), - fill: new Vt({ + fill: new he({ color: "#EF4444" }) }), - text: new Wa({ + text: new Ca({ text: e.toString(), font: "14px sans-serif", - fill: new Vt({ + fill: new he({ color: "#fff" }) }) - }) : i = new Zt({ - image: new we({ + }) : n = new Vt({ + image: new qe({ radius: 15, - stroke: new Xt({ + stroke: new Ee({ color: "#fff" }), - fill: new Vt({ + fill: new he({ color: "#334155" }) }), - text: new Wa({ + text: new Ca({ text: e.toString(), font: "14px sans-serif", - fill: new Vt({ + fill: new he({ color: "#fff" }) }) - }), i; + }), n; } } -class Lf { +class Jd { static setCustomStyleWithouInfoBox() { const t = w().getOptions(); w().setCustomDisplay(t.search.displaySearch); @@ -16633,162 +15020,162 @@ class Lf { w().setTargetBoxSize(e); } } -const Qa = "http://www.w3.org/2001/XMLSchema-instance"; -function K(n, t) { - return Of().createElementNS(n, t); +const Ia = "http://www.w3.org/2001/XMLSchema-instance"; +function K(i, t) { + return nf().createElementNS(i, t); } -function rn(n, t) { - return If(n, t, []).join(""); +function Vi(i, t) { + return Qd(i, t, []).join(""); } -function If(n, t, e) { - if (n.nodeType == Node.CDATA_SECTION_NODE || n.nodeType == Node.TEXT_NODE) - t ? e.push(String(n.nodeValue).replace(/(\r\n|\r|\n)/g, "")) : e.push(n.nodeValue); +function Qd(i, t, e) { + if (i.nodeType == Node.CDATA_SECTION_NODE || i.nodeType == Node.TEXT_NODE) + t ? e.push(String(i.nodeValue).replace(/(\r\n|\r|\n)/g, "")) : e.push(i.nodeValue); else { - let i; - for (i = n.firstChild; i; i = i.nextSibling) - If(i, t, e); + let n; + for (n = i.firstChild; n; n = n.nextSibling) + Qd(n, t, e); } return e; } -function Xi(n) { - return "documentElement" in n; +function Fi(i) { + return "documentElement" in i; } -function Up(n, t, e) { - return n.getAttributeNS(t, e) || ""; +function ep(i, t, e) { + return i.getAttributeNS(t, e) || ""; } -function Yi(n) { - return new DOMParser().parseFromString(n, "application/xml"); +function Di(i) { + return new DOMParser().parseFromString(i, "application/xml"); } -function Pf(n, t) { - return function(e, i) { - const s = n.call( +function tf(i, t) { + return function(e, n) { + const s = i.call( t !== void 0 ? t : this, e, - i + n ); if (s !== void 0) { - const r = i[i.length - 1]; - Qt(r, s); + const r = n[n.length - 1]; + Ht(r, s); } }; } -function X(n, t) { - return function(e, i) { - const s = n.call( +function H(i, t) { + return function(e, n) { + const s = i.call( t !== void 0 ? t : this, e, - i + n ); - s !== void 0 && i[i.length - 1].push(s); + s !== void 0 && n[n.length - 1].push(s); }; } -function Z(n, t) { - return function(e, i) { - const s = n.call( +function Z(i, t) { + return function(e, n) { + const s = i.call( t !== void 0 ? t : this, e, - i + n ); - s !== void 0 && (i[i.length - 1] = s); + s !== void 0 && (n[n.length - 1] = s); }; } -function ge(n, t, e) { - return function(i, s) { - const r = n.call( +function le(i, t, e) { + return function(n, s) { + const r = i.call( e !== void 0 ? e : this, - i, + n, s ); if (r !== void 0) { - const o = s[s.length - 1], a = t !== void 0 ? t : i.localName; + const o = s[s.length - 1], a = t !== void 0 ? t : n.localName; let l; a in o ? l = o[a] : (l = [], o[a] = l), l.push(r); } }; } -function O(n, t, e) { - return function(i, s) { - const r = n.call( +function O(i, t, e) { + return function(n, s) { + const r = i.call( e !== void 0 ? e : this, - i, + n, s ); if (r !== void 0) { - const o = s[s.length - 1], a = t !== void 0 ? t : i.localName; + const o = s[s.length - 1], a = t !== void 0 ? t : n.localName; o[a] = r; } }; } -function M(n, t) { - return function(e, i, s) { - n.call( +function C(i, t) { + return function(e, n, s) { + i.call( t !== void 0 ? t : this, e, - i, + n, s ), s[s.length - 1].node.appendChild(e); }; } -function me(n, t) { - return function(e, i, s) { - const o = i[i.length - 1].node; - let a = n; +function ce(i, t) { + return function(e, n, s) { + const o = n[n.length - 1].node; + let a = i; a === void 0 && (a = s); const l = t !== void 0 ? t : o.namespaceURI; return K(l, a); }; } -const Af = me(); -function dt(n, t, e) { +const ef = ce(); +function ut(i, t, e) { e = e !== void 0 ? e : {}; - let i, s; - for (i = 0, s = n.length; i < s; ++i) - e[n[i]] = t; + let n, s; + for (n = 0, s = i.length; n < s; ++n) + e[i[n]] = t; return e; } -function Ji(n, t, e, i) { +function Bi(i, t, e, n) { let s; for (s = t.firstElementChild; s; s = s.nextElementSibling) { - const r = n[s.namespaceURI]; + const r = i[s.namespaceURI]; if (r !== void 0) { const o = r[s.localName]; - o !== void 0 && o.call(i, s, e); + o !== void 0 && o.call(n, s, e); } } } -function B(n, t, e, i, s) { - return i.push(n), Ji(t, e, i, s), i.pop(); +function B(i, t, e, n, s) { + return n.push(i), Bi(t, e, n, s), n.pop(); } -function Wp(n, t, e, i, s, r) { +function ip(i, t, e, n, s, r) { const o = (s !== void 0 ? s : e).length; let a, l; for (let h = 0; h < o; ++h) a = e[h], a !== void 0 && (l = t.call( r !== void 0 ? r : this, a, - i, + n, s !== void 0 ? s[h] : void 0 - ), l !== void 0 && n[l.namespaceURI][l.localName].call( + ), l !== void 0 && i[l.namespaceURI][l.localName].call( r, l, a, - i + n )); } -function St(n, t, e, i, s, r, o) { - return s.push(n), Wp(t, e, i, s, r, o), s.pop(); +function Et(i, t, e, n, s, r, o) { + return s.push(i), ip(t, e, n, s, r, o), s.pop(); } -let Ea; -function Hp() { - return Ea === void 0 && typeof XMLSerializer < "u" && (Ea = new XMLSerializer()), Ea; +let Jo; +function np() { + return Jo === void 0 && typeof XMLSerializer < "u" && (Jo = new XMLSerializer()), Jo; } -let wa; -function Of() { - return wa === void 0 && typeof document < "u" && (wa = document.implementation.createDocument("", "", null)), wa; +let Qo; +function nf() { + return Qo === void 0 && typeof document < "u" && (Qo = document.implementation.createDocument("", "", null)), Qo; } -class Xp extends gf { +class sp extends Gd { constructor() { - super(), this.xmlSerializer_ = Hp(); + super(), this.xmlSerializer_ = np(); } getType() { return "xml"; @@ -16796,10 +15183,10 @@ class Xp extends gf { readFeature(t, e) { if (t) if (typeof t == "string") { - const i = Yi(t); - return this.readFeatureFromDocument(i, e); + const n = Di(t); + return this.readFeatureFromDocument(n, e); } else - return Xi(t) ? this.readFeatureFromDocument( + return Fi(t) ? this.readFeatureFromDocument( t, e ) : this.readFeatureFromNode(t, e); @@ -16807,8 +15194,8 @@ class Xp extends gf { return null; } readFeatureFromDocument(t, e) { - const i = this.readFeaturesFromDocument(t, e); - return i.length > 0 ? i[0] : null; + const n = this.readFeaturesFromDocument(t, e); + return n.length > 0 ? n[0] : null; } readFeatureFromNode(t, e) { return null; @@ -16816,10 +15203,10 @@ class Xp extends gf { readFeatures(t, e) { if (t) if (typeof t == "string") { - const i = Yi(t); - return this.readFeaturesFromDocument(i, e); + const n = Di(t); + return this.readFeaturesFromDocument(n, e); } else - return Xi(t) ? this.readFeaturesFromDocument( + return Fi(t) ? this.readFeaturesFromDocument( t, e ) : this.readFeaturesFromNode( @@ -16830,24 +15217,24 @@ class Xp extends gf { return []; } readFeaturesFromDocument(t, e) { - const i = []; + const n = []; for (let s = t.firstChild; s; s = s.nextSibling) - s.nodeType == Node.ELEMENT_NODE && Qt( - i, + s.nodeType == Node.ELEMENT_NODE && Ht( + n, this.readFeaturesFromNode(s, e) ); - return i; + return n; } readFeaturesFromNode(t, e) { - return H(); + return W(); } readGeometry(t, e) { if (t) if (typeof t == "string") { - const i = Yi(t); - return this.readGeometryFromDocument(i, e); + const n = Di(t); + return this.readGeometryFromDocument(n, e); } else - return Xi(t) ? this.readGeometryFromDocument( + return Fi(t) ? this.readGeometryFromDocument( t, e ) : this.readGeometryFromNode( @@ -16866,10 +15253,10 @@ class Xp extends gf { readProjection(t) { if (t) if (typeof t == "string") { - const e = Yi(t); + const e = Di(t); return this.readProjectionFromDocument(e); } else - return Xi(t) ? this.readProjectionFromDocument(t) : this.readProjectionFromNode(t); + return Fi(t) ? this.readProjectionFromDocument(t) : this.readProjectionFromNode(t); else return null; } @@ -16880,39 +15267,39 @@ class Xp extends gf { return this.dataProjection; } writeFeature(t, e) { - const i = this.writeFeatureNode(t, e); - return this.xmlSerializer_.serializeToString(i); + const n = this.writeFeatureNode(t, e); + return this.xmlSerializer_.serializeToString(n); } writeFeatureNode(t, e) { return null; } writeFeatures(t, e) { - const i = this.writeFeaturesNode(t, e); - return this.xmlSerializer_.serializeToString(i); + const n = this.writeFeaturesNode(t, e); + return this.xmlSerializer_.serializeToString(n); } writeFeaturesNode(t, e) { return null; } writeGeometry(t, e) { - const i = this.writeGeometryNode(t, e); - return this.xmlSerializer_.serializeToString(i); + const n = this.writeGeometryNode(t, e); + return this.xmlSerializer_.serializeToString(n); } writeGeometryNode(t, e) { return null; } } -const Ff = Xp, hi = "http://www.opengis.net/gml", Yp = /^\s*$/; -class Rt extends Ff { +const sf = sp, Qe = "http://www.opengis.net/gml", rp = /^\s*$/; +class St extends sf { constructor(t) { super(), t = t || {}, this.featureType = t.featureType, this.featureNS = t.featureNS, this.srsName = t.srsName, this.schemaLocation = "", this.FEATURE_COLLECTION_PARSERS = {}, this.FEATURE_COLLECTION_PARSERS[this.namespace] = { - featureMember: X(this.readFeaturesInternal), + featureMember: H(this.readFeaturesInternal), featureMembers: Z(this.readFeaturesInternal) }, this.supportedMediaTypes = ["application/gml+xml"]; } readFeaturesInternal(t, e) { - const i = t.localName; + const n = t.localName; let s = null; - if (i == "FeatureCollection") + if (n == "FeatureCollection") s = B( [], this.FEATURE_COLLECTION_PARSERS, @@ -16920,7 +15307,7 @@ class Rt extends Ff { e, this ); - else if (i == "featureMembers" || i == "featureMember" || i == "member") { + else if (n == "featureMembers" || n == "featureMember" || n == "member") { const r = e[0]; let o = r.featureType, a = r.featureNS; const l = "p", h = "p0"; @@ -16944,7 +15331,7 @@ class Rt extends Ff { } } } - i != "featureMember" && (r.featureType = o, r.featureNS = a); + n != "featureMember" && (r.featureType = o, r.featureNS = a); } if (typeof a == "string") { const d = a; @@ -16954,16 +15341,16 @@ class Rt extends Ff { for (const d in a) { const f = {}; for (let g = 0, m = u.length; g < m; ++g) - (u[g].includes(":") ? u[g].split(":")[0] : h) === d && (f[u[g].split(":").pop()] = i == "featureMembers" ? X(this.readFeatureElement, this) : Z(this.readFeatureElement, this)); + (u[g].includes(":") ? u[g].split(":")[0] : h) === d && (f[u[g].split(":").pop()] = n == "featureMembers" ? H(this.readFeatureElement, this) : Z(this.readFeatureElement, this)); c[a[d]] = f; } - i == "featureMember" || i == "member" ? s = B(void 0, c, t, e) : s = B([], c, t, e); + n == "featureMember" || n == "member" ? s = B(void 0, c, t, e) : s = B([], c, t, e); } return s === null && (s = []), s; } readGeometryOrExtent(t, e) { - const i = e[0]; - return i.srsName = t.firstElementChild.getAttribute("srsName"), i.srsDimension = t.firstElementChild.getAttribute("srsDimension"), B( + const n = e[0]; + return n.srsName = t.firstElementChild.getAttribute("srsName"), n.srsDimension = t.firstElementChild.getAttribute("srsDimension"), B( null, this.GEOMETRY_PARSERS, t, @@ -16972,20 +15359,20 @@ class Rt extends Ff { ); } readExtentElement(t, e) { - const i = e[0], s = this.readGeometryOrExtent(t, e); - return s ? ih(s, i) : void 0; + const n = e[0], s = this.readGeometryOrExtent(t, e); + return s ? Rl(s, n) : void 0; } readGeometryElement(t, e) { - const i = e[0], s = this.readGeometryOrExtent(t, e); - return s ? or(s, !1, i) : void 0; + const n = e[0], s = this.readGeometryOrExtent(t, e); + return s ? Hs(s, !1, n) : void 0; } - readFeatureElementInternal(t, e, i) { + readFeatureElementInternal(t, e, n) { let s; const r = {}; for (let o = t.firstElementChild; o; o = o.nextElementSibling) { let a; const l = o.localName; - o.childNodes.length === 0 || o.childNodes.length === 1 && (o.firstChild.nodeType === 3 || o.firstChild.nodeType === 4) ? (a = rn(o, !1), Yp.test(a) && (a = void 0)) : (i && (a = l === "boundedBy" ? this.readExtentElement(o, e) : this.readGeometryElement(o, e)), a ? l !== "boundedBy" && (s = l) : a = this.readFeatureElementInternal(o, e, !1)); + o.childNodes.length === 0 || o.childNodes.length === 1 && (o.firstChild.nodeType === 3 || o.firstChild.nodeType === 4) ? (a = Vi(o, !1), rp.test(a) && (a = void 0)) : (n && (a = l === "boundedBy" ? this.readExtentElement(o, e) : this.readGeometryElement(o, e)), a ? l !== "boundedBy" && (s = l) : a = this.readFeatureElementInternal(o, e, !1)); const h = o.attributes.length; if (h > 0) { a = { _content_: a }; @@ -16996,10 +15383,10 @@ class Rt extends Ff { } r[l] ? (r[l] instanceof Array || (r[l] = [r[l]]), r[l].push(a)) : r[l] = a; } - if (i) { - const o = new Ie(r); + if (n) { + const o = new zs(r); s && o.setGeometryName(s); - const a = t.getAttribute("fid") || Up(t, this.namespace, "id"); + const a = t.getAttribute("fid") || ep(t, this.namespace, "id"); return a && o.setId(a), o; } else return r; @@ -17008,87 +15395,87 @@ class Rt extends Ff { return this.readFeatureElementInternal(t, e, !0); } readPoint(t, e) { - const i = this.readFlatCoordinatesFromNode(t, e); - if (i) - return new Se(i, "XYZ"); + const n = this.readFlatCoordinatesFromNode(t, e); + if (n) + return new Ci(n, "XYZ"); } readMultiPoint(t, e) { - const i = B( + const n = B( [], this.MULTIPOINT_PARSERS, t, e, this ); - if (i) - return new $o(i); + if (n) + return new Tl(n); } readMultiLineString(t, e) { - const i = B( + const n = B( [], this.MULTILINESTRING_PARSERS, t, e, this ); - if (i) - return new sr(i); + if (n) + return new bl(n); } readMultiPolygon(t, e) { - const i = B( + const n = B( [], this.MULTIPOLYGON_PARSERS, t, e, this ); - if (i) - return new rr(i); + if (n) + return new Il(n); } pointMemberParser(t, e) { - Ji(this.POINTMEMBER_PARSERS, t, e, this); + Bi(this.POINTMEMBER_PARSERS, t, e, this); } lineStringMemberParser(t, e) { - Ji(this.LINESTRINGMEMBER_PARSERS, t, e, this); + Bi(this.LINESTRINGMEMBER_PARSERS, t, e, this); } polygonMemberParser(t, e) { - Ji(this.POLYGONMEMBER_PARSERS, t, e, this); + Bi(this.POLYGONMEMBER_PARSERS, t, e, this); } readLineString(t, e) { - const i = this.readFlatCoordinatesFromNode(t, e); - if (i) - return new li(i, "XYZ"); + const n = this.readFlatCoordinatesFromNode(t, e); + if (n) + return new bs(n, "XYZ"); } readFlatLinearRing(t, e) { - const i = B( + const n = B( null, this.GEOMETRY_FLAT_COORDINATES_PARSERS, t, e, this ); - if (i) - return i; + if (n) + return n; } readLinearRing(t, e) { - const i = this.readFlatCoordinatesFromNode(t, e); - if (i) - return new Ba(i, "XYZ"); + const n = this.readFlatCoordinatesFromNode(t, e); + if (n) + return new ya(n, "XYZ"); } readPolygon(t, e) { - const i = B( + const n = B( [null], this.FLAT_LINEAR_RINGS_PARSERS, t, e, this ); - if (i && i[0]) { - const s = i[0], r = [s.length]; + if (n && n[0]) { + const s = n[0], r = [s.length]; let o, a; - for (o = 1, a = i.length; o < a; ++o) - Qt(s, i[o]), r.push(s.length); - return new Ai(s, "XYZ", r); + for (o = 1, a = n.length; o < a; ++o) + Ht(s, n[o]), r.push(s.length); + return new Dn(s, "XYZ", r); } else return; } @@ -17102,121 +15489,121 @@ class Rt extends Ff { ); } readGeometryFromNode(t, e) { - const i = this.readGeometryElement(t, [ + const n = this.readGeometryElement(t, [ this.getReadOptions(t, e || {}) ]); - return i || null; + return n || null; } readFeaturesFromNode(t, e) { - const i = { + const n = { featureType: this.featureType, featureNS: this.featureNS }; - return i && Object.assign(i, this.getReadOptions(t, e)), this.readFeaturesInternal(t, [i]) || []; + return n && Object.assign(n, this.getReadOptions(t, e)), this.readFeaturesInternal(t, [n]) || []; } readProjectionFromNode(t) { - return Q( + return J( this.srsName ? this.srsName : t.firstElementChild.getAttribute("srsName") ); } } -Rt.prototype.namespace = hi; -Rt.prototype.FLAT_LINEAR_RINGS_PARSERS = { +St.prototype.namespace = Qe; +St.prototype.FLAT_LINEAR_RINGS_PARSERS = { "http://www.opengis.net/gml": {} }; -Rt.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { +St.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { "http://www.opengis.net/gml": {} }; -Rt.prototype.GEOMETRY_PARSERS = { +St.prototype.GEOMETRY_PARSERS = { "http://www.opengis.net/gml": {} }; -Rt.prototype.MULTIPOINT_PARSERS = { +St.prototype.MULTIPOINT_PARSERS = { "http://www.opengis.net/gml": { - pointMember: X(Rt.prototype.pointMemberParser), - pointMembers: X(Rt.prototype.pointMemberParser) + pointMember: H(St.prototype.pointMemberParser), + pointMembers: H(St.prototype.pointMemberParser) } }; -Rt.prototype.MULTILINESTRING_PARSERS = { +St.prototype.MULTILINESTRING_PARSERS = { "http://www.opengis.net/gml": { - lineStringMember: X( - Rt.prototype.lineStringMemberParser + lineStringMember: H( + St.prototype.lineStringMemberParser ), - lineStringMembers: X( - Rt.prototype.lineStringMemberParser + lineStringMembers: H( + St.prototype.lineStringMemberParser ) } }; -Rt.prototype.MULTIPOLYGON_PARSERS = { +St.prototype.MULTIPOLYGON_PARSERS = { "http://www.opengis.net/gml": { - polygonMember: X(Rt.prototype.polygonMemberParser), - polygonMembers: X(Rt.prototype.polygonMemberParser) + polygonMember: H(St.prototype.polygonMemberParser), + polygonMembers: H(St.prototype.polygonMemberParser) } }; -Rt.prototype.POINTMEMBER_PARSERS = { +St.prototype.POINTMEMBER_PARSERS = { "http://www.opengis.net/gml": { - Point: X(Rt.prototype.readFlatCoordinatesFromNode) + Point: H(St.prototype.readFlatCoordinatesFromNode) } }; -Rt.prototype.LINESTRINGMEMBER_PARSERS = { +St.prototype.LINESTRINGMEMBER_PARSERS = { "http://www.opengis.net/gml": { - LineString: X(Rt.prototype.readLineString) + LineString: H(St.prototype.readLineString) } }; -Rt.prototype.POLYGONMEMBER_PARSERS = { +St.prototype.POLYGONMEMBER_PARSERS = { "http://www.opengis.net/gml": { - Polygon: X(Rt.prototype.readPolygon) + Polygon: H(St.prototype.readPolygon) } }; -Rt.prototype.RING_PARSERS = { +St.prototype.RING_PARSERS = { "http://www.opengis.net/gml": { - LinearRing: Z(Rt.prototype.readFlatLinearRing) + LinearRing: Z(St.prototype.readFlatLinearRing) } }; -const J = Rt; -function jp(n) { - const t = rn(n, !1); - return qp(t); +const q = St; +function op(i) { + const t = Vi(i, !1); + return ap(t); } -function qp(n) { - const t = /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(n); +function ap(i) { + const t = /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(i); if (t) return parseFloat(t[1]); } -function ne(n) { - const t = rn(n, !1); - return Fn(t); +function te(i) { + const t = Vi(i, !1); + return vn(t); } -function Fn(n) { - const t = /^\s*(\d+)\s*$/.exec(n); +function vn(i) { + const t = /^\s*(\d+)\s*$/.exec(i); if (t) return parseInt(t[1], 10); } -function rt(n) { - return rn(n, !1).trim(); +function nt(i) { + return Vi(i, !1).trim(); } -function It(n, t) { - n.appendChild(Of().createTextNode(t)); +function Tt(i, t) { + i.appendChild(nf().createTextNode(t)); } -const Kp = hi + " http://schemas.opengis.net/gml/2.1.2/feature.xsd", Jp = { +const lp = Qe + " http://schemas.opengis.net/gml/2.1.2/feature.xsd", hp = { MultiLineString: "lineStringMember", MultiCurve: "curveMember", MultiPolygon: "polygonMember", MultiSurface: "surfaceMember" }; -class st extends J { +class et extends q { constructor(t) { - t = t || {}, super(t), this.FEATURE_COLLECTION_PARSERS[hi].featureMember = X( + t = t || {}, super(t), this.FEATURE_COLLECTION_PARSERS[Qe].featureMember = H( this.readFeaturesInternal - ), this.schemaLocation = t.schemaLocation ? t.schemaLocation : Kp; + ), this.schemaLocation = t.schemaLocation ? t.schemaLocation : lp; } readFlatCoordinates(t, e) { - const i = rn(t, !1).replace(/^\s*|\s*$/g, ""), r = e[0].srsName; + const n = Vi(t, !1).replace(/^\s*|\s*$/g, ""), r = e[0].srsName; let o = "enu"; if (r) { - const h = Q(r); + const h = J(r); h && (o = h.getAxisOrientation()); } - const a = i.trim().split(/\s+/), l = []; + const a = n.trim().split(/\s+/), l = []; for (let h = 0, c = a.length; h < c; h++) { const u = a[h].split(/,+/), d = parseFloat(u[0]), f = parseFloat(u[1]), g = u.length === 3 ? parseFloat(u[2]) : 0; o.substr(0, 2) === "en" ? l.push(d, f, g) : l.push(f, d, g); @@ -17224,118 +15611,118 @@ class st extends J { return l; } readBox(t, e) { - const i = B( + const n = B( [null], this.BOX_PARSERS_, t, e, this ); - return _e( - i[1][0], - i[1][1], - i[1][3], - i[1][4] + return ye( + n[1][0], + n[1][1], + n[1][3], + n[1][4] ); } innerBoundaryIsParser(t, e) { - const i = B( + const n = B( void 0, this.RING_PARSERS, t, e, this ); - i && e[e.length - 1].push(i); + n && e[e.length - 1].push(n); } outerBoundaryIsParser(t, e) { - const i = B( + const n = B( void 0, this.RING_PARSERS, t, e, this ); - if (i) { + if (n) { const s = e[e.length - 1]; - s[0] = i; + s[0] = n; } } - GEOMETRY_NODE_FACTORY_(t, e, i) { + GEOMETRY_NODE_FACTORY_(t, e, n) { const s = e[e.length - 1], r = s.multiSurface, o = s.surface, a = s.multiCurve; - return Array.isArray(t) ? i = "Envelope" : (i = t.getType(), i === "MultiPolygon" && r === !0 ? i = "MultiSurface" : i === "Polygon" && o === !0 ? i = "Surface" : i === "MultiLineString" && a === !0 && (i = "MultiCurve")), K("http://www.opengis.net/gml", i); + return Array.isArray(t) ? n = "Envelope" : (n = t.getType(), n === "MultiPolygon" && r === !0 ? n = "MultiSurface" : n === "Polygon" && o === !0 ? n = "Surface" : n === "MultiLineString" && a === !0 && (n = "MultiCurve")), K("http://www.opengis.net/gml", n); } - writeFeatureElement(t, e, i) { + writeFeatureElement(t, e, n) { const s = e.getId(); s && t.setAttribute("fid", s); - const r = i[i.length - 1], o = r.featureNS, a = e.getGeometryName(); + const r = n[n.length - 1], o = r.featureNS, a = e.getGeometryName(); r.serializers || (r.serializers = {}, r.serializers[o] = {}); const l = [], h = []; if (e.hasProperties()) { const u = e.getProperties(); for (const d in u) { const f = u[d]; - f !== null && (l.push(d), h.push(f), d == a || typeof f.getSimplifiedGeometry == "function" ? d in r.serializers[o] || (r.serializers[o][d] = M( + f !== null && (l.push(d), h.push(f), d == a || typeof f.getSimplifiedGeometry == "function" ? d in r.serializers[o] || (r.serializers[o][d] = C( this.writeGeometryElement, this - )) : d in r.serializers[o] || (r.serializers[o][d] = M(It))); + )) : d in r.serializers[o] || (r.serializers[o][d] = C(Tt))); } } const c = Object.assign({}, r); - c.node = t, St( + c.node = t, Et( c, r.serializers, - me(void 0, o), + ce(void 0, o), h, - i, + n, l ); } - writeCurveOrLineString(t, e, i) { - const r = i[i.length - 1].srsName; + writeCurveOrLineString(t, e, n) { + const r = n[n.length - 1].srsName; if (t.nodeName !== "LineStringSegment" && r && t.setAttribute("srsName", r), t.nodeName === "LineString" || t.nodeName === "LineStringSegment") { const o = this.createCoordinatesNode_(t.namespaceURI); - t.appendChild(o), this.writeCoordinates_(o, e, i); + t.appendChild(o), this.writeCoordinates_(o, e, n); } else if (t.nodeName === "Curve") { const o = K(t.namespaceURI, "segments"); - t.appendChild(o), this.writeCurveSegments_(o, e, i); + t.appendChild(o), this.writeCurveSegments_(o, e, n); } } - writeLineStringOrCurveMember(t, e, i) { - const s = this.GEOMETRY_NODE_FACTORY_(e, i); - s && (t.appendChild(s), this.writeCurveOrLineString(s, e, i)); + writeLineStringOrCurveMember(t, e, n) { + const s = this.GEOMETRY_NODE_FACTORY_(e, n); + s && (t.appendChild(s), this.writeCurveOrLineString(s, e, n)); } - writeMultiCurveOrLineString(t, e, i) { - const s = i[i.length - 1], r = s.hasZ, o = s.srsName, a = s.curve; + writeMultiCurveOrLineString(t, e, n) { + const s = n[n.length - 1], r = s.hasZ, o = s.srsName, a = s.curve; o && t.setAttribute("srsName", o); const l = e.getLineStrings(); - St( + Et( { node: t, hasZ: r, srsName: o, curve: a }, this.LINESTRINGORCURVEMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, l, - i, + n, void 0, this ); } - writeGeometryElement(t, e, i) { - const s = i[i.length - 1], r = Object.assign({}, s); + writeGeometryElement(t, e, n) { + const s = n[n.length - 1], r = Object.assign({}, s); r.node = t; let o; - Array.isArray(e) ? o = ih( + Array.isArray(e) ? o = Rl( e, s - ) : o = or( + ) : o = Hs( e, !0, s - ), St( + ), Et( r, this.GEOMETRY_SERIALIZERS, this.GEOMETRY_NODE_FACTORY_, [o], - i, + n, void 0, this ); @@ -17344,269 +15731,269 @@ class st extends J { const e = K(t, "coordinates"); return e.setAttribute("decimal", "."), e.setAttribute("cs", ","), e.setAttribute("ts", " "), e; } - writeCoordinates_(t, e, i) { - const s = i[i.length - 1], r = s.hasZ, o = s.srsName, a = e.getCoordinates(), l = a.length, h = new Array(l); + writeCoordinates_(t, e, n) { + const s = n[n.length - 1], r = s.hasZ, o = s.srsName, a = e.getCoordinates(), l = a.length, h = new Array(l); for (let c = 0; c < l; ++c) { const u = a[c]; h[c] = this.getCoords_(u, o, r); } - It(t, h.join(" ")); + Tt(t, h.join(" ")); } - writeCurveSegments_(t, e, i) { + writeCurveSegments_(t, e, n) { const s = K(t.namespaceURI, "LineStringSegment"); - t.appendChild(s), this.writeCurveOrLineString(s, e, i); + t.appendChild(s), this.writeCurveOrLineString(s, e, n); } - writeSurfaceOrPolygon(t, e, i) { - const s = i[i.length - 1], r = s.hasZ, o = s.srsName; + writeSurfaceOrPolygon(t, e, n) { + const s = n[n.length - 1], r = s.hasZ, o = s.srsName; if (t.nodeName !== "PolygonPatch" && o && t.setAttribute("srsName", o), t.nodeName === "Polygon" || t.nodeName === "PolygonPatch") { const a = e.getLinearRings(); - St( + Et( { node: t, hasZ: r, srsName: o }, this.RING_SERIALIZERS, this.RING_NODE_FACTORY_, a, - i, + n, void 0, this ); } else if (t.nodeName === "Surface") { const a = K(t.namespaceURI, "patches"); - t.appendChild(a), this.writeSurfacePatches_(a, e, i); + t.appendChild(a), this.writeSurfacePatches_(a, e, n); } } - RING_NODE_FACTORY_(t, e, i) { + RING_NODE_FACTORY_(t, e, n) { const s = e[e.length - 1], r = s.node, o = s.exteriorWritten; return o === void 0 && (s.exteriorWritten = !0), K( r.namespaceURI, o !== void 0 ? "innerBoundaryIs" : "outerBoundaryIs" ); } - writeSurfacePatches_(t, e, i) { + writeSurfacePatches_(t, e, n) { const s = K(t.namespaceURI, "PolygonPatch"); - t.appendChild(s), this.writeSurfaceOrPolygon(s, e, i); + t.appendChild(s), this.writeSurfaceOrPolygon(s, e, n); } - writeRing(t, e, i) { + writeRing(t, e, n) { const s = K(t.namespaceURI, "LinearRing"); - t.appendChild(s), this.writeLinearRing(s, e, i); + t.appendChild(s), this.writeLinearRing(s, e, n); } - getCoords_(t, e, i) { + getCoords_(t, e, n) { let s = "enu"; - e && (s = Q(e).getAxisOrientation()); + e && (s = J(e).getAxisOrientation()); let r = s.substr(0, 2) === "en" ? t[0] + "," + t[1] : t[1] + "," + t[0]; - if (i) { + if (n) { const o = t[2] || 0; r += "," + o; } return r; } - writePoint(t, e, i) { - const s = i[i.length - 1], r = s.hasZ, o = s.srsName; + writePoint(t, e, n) { + const s = n[n.length - 1], r = s.hasZ, o = s.srsName; o && t.setAttribute("srsName", o); const a = this.createCoordinatesNode_(t.namespaceURI); t.appendChild(a); const l = e.getCoordinates(), h = this.getCoords_(l, o, r); - It(a, h); + Tt(a, h); } - writeMultiPoint(t, e, i) { - const s = i[i.length - 1], r = s.hasZ, o = s.srsName; + writeMultiPoint(t, e, n) { + const s = n[n.length - 1], r = s.hasZ, o = s.srsName; o && t.setAttribute("srsName", o); const a = e.getPoints(); - St( + Et( { node: t, hasZ: r, srsName: o }, this.POINTMEMBER_SERIALIZERS, - me("pointMember"), + ce("pointMember"), a, - i, + n, void 0, this ); } - writePointMember(t, e, i) { + writePointMember(t, e, n) { const s = K(t.namespaceURI, "Point"); - t.appendChild(s), this.writePoint(s, e, i); + t.appendChild(s), this.writePoint(s, e, n); } - writeLinearRing(t, e, i) { - const r = i[i.length - 1].srsName; + writeLinearRing(t, e, n) { + const r = n[n.length - 1].srsName; r && t.setAttribute("srsName", r); const o = this.createCoordinatesNode_(t.namespaceURI); - t.appendChild(o), this.writeCoordinates_(o, e, i); + t.appendChild(o), this.writeCoordinates_(o, e, n); } - writeMultiSurfaceOrPolygon(t, e, i) { - const s = i[i.length - 1], r = s.hasZ, o = s.srsName, a = s.surface; + writeMultiSurfaceOrPolygon(t, e, n) { + const s = n[n.length - 1], r = s.hasZ, o = s.srsName, a = s.surface; o && t.setAttribute("srsName", o); const l = e.getPolygons(); - St( + Et( { node: t, hasZ: r, srsName: o, surface: a }, this.SURFACEORPOLYGONMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, l, - i, + n, void 0, this ); } - writeSurfaceOrPolygonMember(t, e, i) { - const s = this.GEOMETRY_NODE_FACTORY_(e, i); - s && (t.appendChild(s), this.writeSurfaceOrPolygon(s, e, i)); + writeSurfaceOrPolygonMember(t, e, n) { + const s = this.GEOMETRY_NODE_FACTORY_(e, n); + s && (t.appendChild(s), this.writeSurfaceOrPolygon(s, e, n)); } - writeEnvelope(t, e, i) { - const r = i[i.length - 1].srsName; + writeEnvelope(t, e, n) { + const r = n[n.length - 1].srsName; r && t.setAttribute("srsName", r); const o = ["lowerCorner", "upperCorner"], a = [e[0] + " " + e[1], e[2] + " " + e[3]]; - St( + Et( { node: t }, this.ENVELOPE_SERIALIZERS, - Af, + ef, a, - i, + n, o, this ); } - MULTIGEOMETRY_MEMBER_NODE_FACTORY_(t, e, i) { + MULTIGEOMETRY_MEMBER_NODE_FACTORY_(t, e, n) { const s = e[e.length - 1].node; return K( "http://www.opengis.net/gml", - Jp[s.nodeName] + hp[s.nodeName] ); } } -st.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { +et.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { "http://www.opengis.net/gml": { - coordinates: Z(st.prototype.readFlatCoordinates) + coordinates: Z(et.prototype.readFlatCoordinates) } }; -st.prototype.FLAT_LINEAR_RINGS_PARSERS = { +et.prototype.FLAT_LINEAR_RINGS_PARSERS = { "http://www.opengis.net/gml": { - innerBoundaryIs: st.prototype.innerBoundaryIsParser, - outerBoundaryIs: st.prototype.outerBoundaryIsParser + innerBoundaryIs: et.prototype.innerBoundaryIsParser, + outerBoundaryIs: et.prototype.outerBoundaryIsParser } }; -st.prototype.BOX_PARSERS_ = { +et.prototype.BOX_PARSERS_ = { "http://www.opengis.net/gml": { - coordinates: X(st.prototype.readFlatCoordinates) + coordinates: H(et.prototype.readFlatCoordinates) } }; -st.prototype.GEOMETRY_PARSERS = { +et.prototype.GEOMETRY_PARSERS = { "http://www.opengis.net/gml": { - Point: Z(J.prototype.readPoint), - MultiPoint: Z(J.prototype.readMultiPoint), - LineString: Z(J.prototype.readLineString), - MultiLineString: Z(J.prototype.readMultiLineString), - LinearRing: Z(J.prototype.readLinearRing), - Polygon: Z(J.prototype.readPolygon), - MultiPolygon: Z(J.prototype.readMultiPolygon), - Box: Z(st.prototype.readBox) + Point: Z(q.prototype.readPoint), + MultiPoint: Z(q.prototype.readMultiPoint), + LineString: Z(q.prototype.readLineString), + MultiLineString: Z(q.prototype.readMultiLineString), + LinearRing: Z(q.prototype.readLinearRing), + Polygon: Z(q.prototype.readPolygon), + MultiPolygon: Z(q.prototype.readMultiPolygon), + Box: Z(et.prototype.readBox) } }; -st.prototype.GEOMETRY_SERIALIZERS = { +et.prototype.GEOMETRY_SERIALIZERS = { "http://www.opengis.net/gml": { - Curve: M(st.prototype.writeCurveOrLineString), - MultiCurve: M(st.prototype.writeMultiCurveOrLineString), - Point: M(st.prototype.writePoint), - MultiPoint: M(st.prototype.writeMultiPoint), - LineString: M(st.prototype.writeCurveOrLineString), - MultiLineString: M( - st.prototype.writeMultiCurveOrLineString + Curve: C(et.prototype.writeCurveOrLineString), + MultiCurve: C(et.prototype.writeMultiCurveOrLineString), + Point: C(et.prototype.writePoint), + MultiPoint: C(et.prototype.writeMultiPoint), + LineString: C(et.prototype.writeCurveOrLineString), + MultiLineString: C( + et.prototype.writeMultiCurveOrLineString ), - LinearRing: M(st.prototype.writeLinearRing), - Polygon: M(st.prototype.writeSurfaceOrPolygon), - MultiPolygon: M( - st.prototype.writeMultiSurfaceOrPolygon + LinearRing: C(et.prototype.writeLinearRing), + Polygon: C(et.prototype.writeSurfaceOrPolygon), + MultiPolygon: C( + et.prototype.writeMultiSurfaceOrPolygon ), - Surface: M(st.prototype.writeSurfaceOrPolygon), - MultiSurface: M( - st.prototype.writeMultiSurfaceOrPolygon + Surface: C(et.prototype.writeSurfaceOrPolygon), + MultiSurface: C( + et.prototype.writeMultiSurfaceOrPolygon ), - Envelope: M(st.prototype.writeEnvelope) + Envelope: C(et.prototype.writeEnvelope) } }; -st.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = { +et.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = { "http://www.opengis.net/gml": { - lineStringMember: M( - st.prototype.writeLineStringOrCurveMember + lineStringMember: C( + et.prototype.writeLineStringOrCurveMember ), - curveMember: M( - st.prototype.writeLineStringOrCurveMember + curveMember: C( + et.prototype.writeLineStringOrCurveMember ) } }; -st.prototype.RING_SERIALIZERS = { +et.prototype.RING_SERIALIZERS = { "http://www.opengis.net/gml": { - outerBoundaryIs: M(st.prototype.writeRing), - innerBoundaryIs: M(st.prototype.writeRing) + outerBoundaryIs: C(et.prototype.writeRing), + innerBoundaryIs: C(et.prototype.writeRing) } }; -st.prototype.POINTMEMBER_SERIALIZERS = { +et.prototype.POINTMEMBER_SERIALIZERS = { "http://www.opengis.net/gml": { - pointMember: M(st.prototype.writePointMember) + pointMember: C(et.prototype.writePointMember) } }; -st.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = { +et.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = { "http://www.opengis.net/gml": { - surfaceMember: M( - st.prototype.writeSurfaceOrPolygonMember + surfaceMember: C( + et.prototype.writeSurfaceOrPolygonMember ), - polygonMember: M( - st.prototype.writeSurfaceOrPolygonMember + polygonMember: C( + et.prototype.writeSurfaceOrPolygonMember ) } }; -st.prototype.ENVELOPE_SERIALIZERS = { +et.prototype.ENVELOPE_SERIALIZERS = { "http://www.opengis.net/gml": { - lowerCorner: M(It), - upperCorner: M(It) + lowerCorner: C(Tt), + upperCorner: C(Tt) } }; -const ar = st, Qp = hi + " http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd", ty = { +const Xs = et, cp = Qe + " http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd", up = { MultiLineString: "lineStringMember", MultiCurve: "curveMember", MultiPolygon: "polygonMember", MultiSurface: "surfaceMember" }; -class D extends J { +class D extends q { constructor(t) { - t = t || {}, super(t), this.surface_ = t.surface !== void 0 ? t.surface : !1, this.curve_ = t.curve !== void 0 ? t.curve : !1, this.multiCurve_ = t.multiCurve !== void 0 ? t.multiCurve : !0, this.multiSurface_ = t.multiSurface !== void 0 ? t.multiSurface : !0, this.schemaLocation = t.schemaLocation ? t.schemaLocation : Qp, this.hasZ = t.hasZ !== void 0 ? t.hasZ : !1; + t = t || {}, super(t), this.surface_ = t.surface !== void 0 ? t.surface : !1, this.curve_ = t.curve !== void 0 ? t.curve : !1, this.multiCurve_ = t.multiCurve !== void 0 ? t.multiCurve : !0, this.multiSurface_ = t.multiSurface !== void 0 ? t.multiSurface : !0, this.schemaLocation = t.schemaLocation ? t.schemaLocation : cp, this.hasZ = t.hasZ !== void 0 ? t.hasZ : !1; } readMultiCurve(t, e) { - const i = B( + const n = B( [], this.MULTICURVE_PARSERS, t, e, this ); - if (i) - return new sr(i); + if (n) + return new bl(n); } readFlatCurveRing(t, e) { - const i = B( + const n = B( [], this.MULTICURVE_PARSERS, t, e, this ), s = []; - for (let r = 0, o = i.length; r < o; ++r) - Qt(s, i[r].getFlatCoordinates()); + for (let r = 0, o = n.length; r < o; ++r) + Ht(s, n[r].getFlatCoordinates()); return s; } readMultiSurface(t, e) { - const i = B( + const n = B( [], this.MULTISURFACE_PARSERS, t, e, this ); - if (i) - return new rr(i); + if (n) + return new Il(n); } curveMemberParser(t, e) { - Ji(this.CURVEMEMBER_PARSERS, t, e, this); + Bi(this.CURVEMEMBER_PARSERS, t, e, this); } surfaceMemberParser(t, e) { - Ji(this.SURFACEMEMBER_PARSERS, t, e, this); + Bi(this.SURFACEMEMBER_PARSERS, t, e, this); } readPatch(t, e) { return B( @@ -17639,82 +16026,82 @@ class D extends J { ); } interiorParser(t, e) { - const i = B( + const n = B( void 0, this.RING_PARSERS, t, e, this ); - i && e[e.length - 1].push(i); + n && e[e.length - 1].push(n); } exteriorParser(t, e) { - const i = B( + const n = B( void 0, this.RING_PARSERS, t, e, this ); - if (i) { + if (n) { const s = e[e.length - 1]; - s[0] = i; + s[0] = n; } } readSurface(t, e) { - const i = B( + const n = B( [null], this.SURFACE_PARSERS, t, e, this ); - if (i && i[0]) { - const s = i[0], r = [s.length]; + if (n && n[0]) { + const s = n[0], r = [s.length]; let o, a; - for (o = 1, a = i.length; o < a; ++o) - Qt(s, i[o]), r.push(s.length); - return new Ai(s, "XYZ", r); + for (o = 1, a = n.length; o < a; ++o) + Ht(s, n[o]), r.push(s.length); + return new Dn(s, "XYZ", r); } else return; } readCurve(t, e) { - const i = B( + const n = B( [null], this.CURVE_PARSERS, t, e, this ); - if (i) - return new li(i, "XYZ"); + if (n) + return new bs(n, "XYZ"); } readEnvelope(t, e) { - const i = B( + const n = B( [null], this.ENVELOPE_PARSERS, t, e, this ); - return _e( - i[1][0], - i[1][1], - i[2][0], - i[2][1] + return ye( + n[1][0], + n[1][1], + n[2][0], + n[2][1] ); } readFlatPos(t, e) { - let i = rn(t, !1); + let n = Vi(t, !1); const s = /^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/, r = []; let o; - for (; o = s.exec(i); ) - r.push(parseFloat(o[1])), i = i.substr(o[0].length); - if (i !== "") + for (; o = s.exec(n); ) + r.push(parseFloat(o[1])), n = n.substr(o[0].length); + if (n !== "") return; const l = e[0].srsName; let h = "enu"; - if (l && (h = Q(l).getAxisOrientation()), h === "neu") { + if (l && (h = J(l).getAxisOrientation()), h === "neu") { let u, d; for (u = 0, d = r.length; u < d; u += 3) { const f = r[u], g = r[u + 1]; @@ -17726,257 +16113,257 @@ class D extends J { return r; } readFlatPosList(t, e) { - const i = rn(t, !1).replace(/^\s*|\s*$/g, ""), s = e[0], r = s.srsName, o = s.srsDimension; + const n = Vi(t, !1).replace(/^\s*|\s*$/g, ""), s = e[0], r = s.srsName, o = s.srsDimension; let a = "enu"; - r && (a = Q(r).getAxisOrientation()); - const l = i.split(/\s+/); + r && (a = J(r).getAxisOrientation()); + const l = n.split(/\s+/); let h = 2; - t.getAttribute("srsDimension") ? h = Fn(t.getAttribute("srsDimension")) : t.getAttribute("dimension") ? h = Fn(t.getAttribute("dimension")) : t.parentNode.getAttribute("srsDimension") ? h = Fn( + t.getAttribute("srsDimension") ? h = vn(t.getAttribute("srsDimension")) : t.getAttribute("dimension") ? h = vn(t.getAttribute("dimension")) : t.parentNode.getAttribute("srsDimension") ? h = vn( t.parentNode.getAttribute("srsDimension") - ) : o && (h = Fn(o)); + ) : o && (h = vn(o)); let c, u, d; const f = []; for (let g = 0, m = l.length; g < m; g += h) c = parseFloat(l[g]), u = parseFloat(l[g + 1]), d = h === 3 ? parseFloat(l[g + 2]) : 0, a.substr(0, 2) === "en" ? f.push(c, u, d) : f.push(u, c, d); return f; } - writePos_(t, e, i) { - const s = i[i.length - 1], r = s.hasZ, o = r ? "3" : "2"; + writePos_(t, e, n) { + const s = n[n.length - 1], r = s.hasZ, o = r ? "3" : "2"; t.setAttribute("srsDimension", o); const a = s.srsName; let l = "enu"; - a && (l = Q(a).getAxisOrientation()); + a && (l = J(a).getAxisOrientation()); const h = e.getCoordinates(); let c; if (l.substr(0, 2) === "en" ? c = h[0] + " " + h[1] : c = h[1] + " " + h[0], r) { const u = h[2] || 0; c += " " + u; } - It(t, c); + Tt(t, c); } - getCoords_(t, e, i) { + getCoords_(t, e, n) { let s = "enu"; - e && (s = Q(e).getAxisOrientation()); + e && (s = J(e).getAxisOrientation()); let r = s.substr(0, 2) === "en" ? t[0] + " " + t[1] : t[1] + " " + t[0]; - if (i) { + if (n) { const o = t[2] || 0; r += " " + o; } return r; } - writePosList_(t, e, i) { - const s = i[i.length - 1], r = s.hasZ, o = r ? "3" : "2"; + writePosList_(t, e, n) { + const s = n[n.length - 1], r = s.hasZ, o = r ? "3" : "2"; t.setAttribute("srsDimension", o); const a = s.srsName, l = e.getCoordinates(), h = l.length, c = new Array(h); let u; for (let d = 0; d < h; ++d) u = l[d], c[d] = this.getCoords_(u, a, r); - It(t, c.join(" ")); + Tt(t, c.join(" ")); } - writePoint(t, e, i) { - const r = i[i.length - 1].srsName; + writePoint(t, e, n) { + const r = n[n.length - 1].srsName; r && t.setAttribute("srsName", r); const o = K(t.namespaceURI, "pos"); - t.appendChild(o), this.writePos_(o, e, i); + t.appendChild(o), this.writePos_(o, e, n); } - writeEnvelope(t, e, i) { - const r = i[i.length - 1].srsName; + writeEnvelope(t, e, n) { + const r = n[n.length - 1].srsName; r && t.setAttribute("srsName", r); const o = ["lowerCorner", "upperCorner"], a = [e[0] + " " + e[1], e[2] + " " + e[3]]; - St( + Et( { node: t }, this.ENVELOPE_SERIALIZERS, - Af, + ef, a, - i, + n, o, this ); } - writeLinearRing(t, e, i) { - const r = i[i.length - 1].srsName; + writeLinearRing(t, e, n) { + const r = n[n.length - 1].srsName; r && t.setAttribute("srsName", r); const o = K(t.namespaceURI, "posList"); - t.appendChild(o), this.writePosList_(o, e, i); + t.appendChild(o), this.writePosList_(o, e, n); } - RING_NODE_FACTORY_(t, e, i) { + RING_NODE_FACTORY_(t, e, n) { const s = e[e.length - 1], r = s.node, o = s.exteriorWritten; return o === void 0 && (s.exteriorWritten = !0), K( r.namespaceURI, o !== void 0 ? "interior" : "exterior" ); } - writeSurfaceOrPolygon(t, e, i) { - const s = i[i.length - 1], r = s.hasZ, o = s.srsName; + writeSurfaceOrPolygon(t, e, n) { + const s = n[n.length - 1], r = s.hasZ, o = s.srsName; if (t.nodeName !== "PolygonPatch" && o && t.setAttribute("srsName", o), t.nodeName === "Polygon" || t.nodeName === "PolygonPatch") { const a = e.getLinearRings(); - St( + Et( { node: t, hasZ: r, srsName: o }, this.RING_SERIALIZERS, this.RING_NODE_FACTORY_, a, - i, + n, void 0, this ); } else if (t.nodeName === "Surface") { const a = K(t.namespaceURI, "patches"); - t.appendChild(a), this.writeSurfacePatches_(a, e, i); + t.appendChild(a), this.writeSurfacePatches_(a, e, n); } } - writeCurveOrLineString(t, e, i) { - const r = i[i.length - 1].srsName; + writeCurveOrLineString(t, e, n) { + const r = n[n.length - 1].srsName; if (t.nodeName !== "LineStringSegment" && r && t.setAttribute("srsName", r), t.nodeName === "LineString" || t.nodeName === "LineStringSegment") { const o = K(t.namespaceURI, "posList"); - t.appendChild(o), this.writePosList_(o, e, i); + t.appendChild(o), this.writePosList_(o, e, n); } else if (t.nodeName === "Curve") { const o = K(t.namespaceURI, "segments"); - t.appendChild(o), this.writeCurveSegments_(o, e, i); + t.appendChild(o), this.writeCurveSegments_(o, e, n); } } - writeMultiSurfaceOrPolygon(t, e, i) { - const s = i[i.length - 1], r = s.hasZ, o = s.srsName, a = s.surface; + writeMultiSurfaceOrPolygon(t, e, n) { + const s = n[n.length - 1], r = s.hasZ, o = s.srsName, a = s.surface; o && t.setAttribute("srsName", o); const l = e.getPolygons(); - St( + Et( { node: t, hasZ: r, srsName: o, surface: a }, this.SURFACEORPOLYGONMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, l, - i, + n, void 0, this ); } - writeMultiPoint(t, e, i) { - const s = i[i.length - 1], r = s.srsName, o = s.hasZ; + writeMultiPoint(t, e, n) { + const s = n[n.length - 1], r = s.srsName, o = s.hasZ; r && t.setAttribute("srsName", r); const a = e.getPoints(); - St( + Et( { node: t, hasZ: o, srsName: r }, this.POINTMEMBER_SERIALIZERS, - me("pointMember"), + ce("pointMember"), a, - i, + n, void 0, this ); } - writeMultiCurveOrLineString(t, e, i) { - const s = i[i.length - 1], r = s.hasZ, o = s.srsName, a = s.curve; + writeMultiCurveOrLineString(t, e, n) { + const s = n[n.length - 1], r = s.hasZ, o = s.srsName, a = s.curve; o && t.setAttribute("srsName", o); const l = e.getLineStrings(); - St( + Et( { node: t, hasZ: r, srsName: o, curve: a }, this.LINESTRINGORCURVEMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, l, - i, + n, void 0, this ); } - writeRing(t, e, i) { + writeRing(t, e, n) { const s = K(t.namespaceURI, "LinearRing"); - t.appendChild(s), this.writeLinearRing(s, e, i); + t.appendChild(s), this.writeLinearRing(s, e, n); } - writeSurfaceOrPolygonMember(t, e, i) { - const s = this.GEOMETRY_NODE_FACTORY_(e, i); - s && (t.appendChild(s), this.writeSurfaceOrPolygon(s, e, i)); + writeSurfaceOrPolygonMember(t, e, n) { + const s = this.GEOMETRY_NODE_FACTORY_(e, n); + s && (t.appendChild(s), this.writeSurfaceOrPolygon(s, e, n)); } - writePointMember(t, e, i) { + writePointMember(t, e, n) { const s = K(t.namespaceURI, "Point"); - t.appendChild(s), this.writePoint(s, e, i); + t.appendChild(s), this.writePoint(s, e, n); } - writeLineStringOrCurveMember(t, e, i) { - const s = this.GEOMETRY_NODE_FACTORY_(e, i); - s && (t.appendChild(s), this.writeCurveOrLineString(s, e, i)); + writeLineStringOrCurveMember(t, e, n) { + const s = this.GEOMETRY_NODE_FACTORY_(e, n); + s && (t.appendChild(s), this.writeCurveOrLineString(s, e, n)); } - writeSurfacePatches_(t, e, i) { + writeSurfacePatches_(t, e, n) { const s = K(t.namespaceURI, "PolygonPatch"); - t.appendChild(s), this.writeSurfaceOrPolygon(s, e, i); + t.appendChild(s), this.writeSurfaceOrPolygon(s, e, n); } - writeCurveSegments_(t, e, i) { + writeCurveSegments_(t, e, n) { const s = K(t.namespaceURI, "LineStringSegment"); - t.appendChild(s), this.writeCurveOrLineString(s, e, i); + t.appendChild(s), this.writeCurveOrLineString(s, e, n); } - writeGeometryElement(t, e, i) { - const s = i[i.length - 1], r = Object.assign({}, s); + writeGeometryElement(t, e, n) { + const s = n[n.length - 1], r = Object.assign({}, s); r.node = t; let o; - Array.isArray(e) ? o = ih( + Array.isArray(e) ? o = Rl( e, s - ) : o = or( + ) : o = Hs( e, !0, s - ), St( + ), Et( r, this.GEOMETRY_SERIALIZERS, this.GEOMETRY_NODE_FACTORY_, [o], - i, + n, void 0, this ); } - writeFeatureElement(t, e, i) { + writeFeatureElement(t, e, n) { const s = e.getId(); s && t.setAttribute("fid", s); - const r = i[i.length - 1], o = r.featureNS, a = e.getGeometryName(); + const r = n[n.length - 1], o = r.featureNS, a = e.getGeometryName(); r.serializers || (r.serializers = {}, r.serializers[o] = {}); const l = [], h = []; if (e.hasProperties()) { const u = e.getProperties(); for (const d in u) { const f = u[d]; - f !== null && (l.push(d), h.push(f), d == a || typeof f.getSimplifiedGeometry == "function" ? d in r.serializers[o] || (r.serializers[o][d] = M( + f !== null && (l.push(d), h.push(f), d == a || typeof f.getSimplifiedGeometry == "function" ? d in r.serializers[o] || (r.serializers[o][d] = C( this.writeGeometryElement, this - )) : d in r.serializers[o] || (r.serializers[o][d] = M(It))); + )) : d in r.serializers[o] || (r.serializers[o][d] = C(Tt))); } } const c = Object.assign({}, r); - c.node = t, St( + c.node = t, Et( c, r.serializers, - me(void 0, o), + ce(void 0, o), h, - i, + n, l ); } - writeFeatureMembers_(t, e, i) { - const s = i[i.length - 1], r = s.featureType, o = s.featureNS, a = {}; - a[o] = {}, a[o][r] = M( + writeFeatureMembers_(t, e, n) { + const s = n[n.length - 1], r = s.featureType, o = s.featureNS, a = {}; + a[o] = {}, a[o][r] = C( this.writeFeatureElement, this ); const l = Object.assign({}, s); - l.node = t, St( + l.node = t, Et( l, a, - me(r, o), + ce(r, o), e, - i + n ); } - MULTIGEOMETRY_MEMBER_NODE_FACTORY_(t, e, i) { + MULTIGEOMETRY_MEMBER_NODE_FACTORY_(t, e, n) { const s = e[e.length - 1].node; return K( this.namespace, - ty[s.nodeName] + up[s.nodeName] ); } - GEOMETRY_NODE_FACTORY_(t, e, i) { + GEOMETRY_NODE_FACTORY_(t, e, n) { const s = e[e.length - 1], r = s.multiSurface, o = s.surface, a = s.curve, l = s.multiCurve; - return Array.isArray(t) ? i = "Envelope" : (i = t.getType(), i === "MultiPolygon" && r === !0 ? i = "MultiSurface" : i === "Polygon" && o === !0 ? i = "Surface" : i === "LineString" && a === !0 ? i = "Curve" : i === "MultiLineString" && l === !0 && (i = "MultiCurve")), K(this.namespace, i); + return Array.isArray(t) ? n = "Envelope" : (n = t.getType(), n === "MultiPolygon" && r === !0 ? n = "MultiSurface" : n === "Polygon" && o === !0 ? n = "Surface" : n === "LineString" && a === !0 ? n = "Curve" : n === "MultiLineString" && l === !0 && (n = "MultiCurve")), K(this.namespace, n); } writeGeometryNode(t, e) { e = this.adaptOptions(e); - const i = K(this.namespace, "geom"), s = { - node: i, + const n = K(this.namespace, "geom"), s = { + node: n, hasZ: this.hasZ, srsName: this.srsName, curve: this.curve_, @@ -17984,13 +16371,13 @@ class D extends J { multiSurface: this.multiSurface_, multiCurve: this.multiCurve_ }; - return e && Object.assign(s, e), this.writeGeometryElement(i, t, [s]), i; + return e && Object.assign(s, e), this.writeGeometryElement(n, t, [s]), n; } writeFeaturesNode(t, e) { e = this.adaptOptions(e); - const i = K(this.namespace, "featureMembers"); - i.setAttributeNS( - Qa, + const n = K(this.namespace, "featureMembers"); + n.setAttributeNS( + Ia, "xsi:schemaLocation", this.schemaLocation ); @@ -18004,14 +16391,14 @@ class D extends J { featureNS: this.featureNS, featureType: this.featureType }; - return e && Object.assign(s, e), this.writeFeatureMembers_(i, t, [s]), i; + return e && Object.assign(s, e), this.writeFeatureMembers_(n, t, [s]), n; } } D.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { "http://www.opengis.net/gml": { pos: Z(D.prototype.readFlatPos), posList: Z(D.prototype.readFlatPosList), - coordinates: Z(ar.prototype.readFlatCoordinates) + coordinates: Z(Xs.prototype.readFlatCoordinates) } }; D.prototype.FLAT_LINEAR_RINGS_PARSERS = { @@ -18022,13 +16409,13 @@ D.prototype.FLAT_LINEAR_RINGS_PARSERS = { }; D.prototype.GEOMETRY_PARSERS = { "http://www.opengis.net/gml": { - Point: Z(J.prototype.readPoint), - MultiPoint: Z(J.prototype.readMultiPoint), - LineString: Z(J.prototype.readLineString), - MultiLineString: Z(J.prototype.readMultiLineString), - LinearRing: Z(J.prototype.readLinearRing), - Polygon: Z(J.prototype.readPolygon), - MultiPolygon: Z(J.prototype.readMultiPolygon), + Point: Z(q.prototype.readPoint), + MultiPoint: Z(q.prototype.readMultiPoint), + LineString: Z(q.prototype.readLineString), + MultiLineString: Z(q.prototype.readMultiLineString), + LinearRing: Z(q.prototype.readLinearRing), + Polygon: Z(q.prototype.readPolygon), + MultiPolygon: Z(q.prototype.readMultiPolygon), Surface: Z(D.prototype.readSurface), MultiSurface: Z(D.prototype.readMultiSurface), Curve: Z(D.prototype.readCurve), @@ -18038,26 +16425,26 @@ D.prototype.GEOMETRY_PARSERS = { }; D.prototype.MULTICURVE_PARSERS = { "http://www.opengis.net/gml": { - curveMember: X(D.prototype.curveMemberParser), - curveMembers: X(D.prototype.curveMemberParser) + curveMember: H(D.prototype.curveMemberParser), + curveMembers: H(D.prototype.curveMemberParser) } }; D.prototype.MULTISURFACE_PARSERS = { "http://www.opengis.net/gml": { - surfaceMember: X(D.prototype.surfaceMemberParser), - surfaceMembers: X(D.prototype.surfaceMemberParser) + surfaceMember: H(D.prototype.surfaceMemberParser), + surfaceMembers: H(D.prototype.surfaceMemberParser) } }; D.prototype.CURVEMEMBER_PARSERS = { "http://www.opengis.net/gml": { - LineString: X(J.prototype.readLineString), - Curve: X(D.prototype.readCurve) + LineString: H(q.prototype.readLineString), + Curve: H(D.prototype.readCurve) } }; D.prototype.SURFACEMEMBER_PARSERS = { "http://www.opengis.net/gml": { - Polygon: X(J.prototype.readPolygon), - Surface: X(D.prototype.readSurface) + Polygon: H(q.prototype.readPolygon), + Surface: H(D.prototype.readSurface) } }; D.prototype.SURFACE_PARSERS = { @@ -18072,8 +16459,8 @@ D.prototype.CURVE_PARSERS = { }; D.prototype.ENVELOPE_PARSERS = { "http://www.opengis.net/gml": { - lowerCorner: X(D.prototype.readFlatPosList), - upperCorner: X(D.prototype.readFlatPosList) + lowerCorner: H(D.prototype.readFlatPosList), + upperCorner: H(D.prototype.readFlatPosList) } }; D.prototype.PATCHES_PARSERS = { @@ -18083,269 +16470,269 @@ D.prototype.PATCHES_PARSERS = { }; D.prototype.SEGMENTS_PARSERS = { "http://www.opengis.net/gml": { - LineStringSegment: Pf( + LineStringSegment: tf( D.prototype.readLineStringSegment ) } }; -J.prototype.RING_PARSERS = { +q.prototype.RING_PARSERS = { "http://www.opengis.net/gml": { - LinearRing: Z(J.prototype.readFlatLinearRing), + LinearRing: Z(q.prototype.readFlatLinearRing), Ring: Z(D.prototype.readFlatCurveRing) } }; D.prototype.writeFeatures; D.prototype.RING_SERIALIZERS = { "http://www.opengis.net/gml": { - exterior: M(D.prototype.writeRing), - interior: M(D.prototype.writeRing) + exterior: C(D.prototype.writeRing), + interior: C(D.prototype.writeRing) } }; D.prototype.ENVELOPE_SERIALIZERS = { "http://www.opengis.net/gml": { - lowerCorner: M(It), - upperCorner: M(It) + lowerCorner: C(Tt), + upperCorner: C(Tt) } }; D.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = { "http://www.opengis.net/gml": { - surfaceMember: M( + surfaceMember: C( D.prototype.writeSurfaceOrPolygonMember ), - polygonMember: M( + polygonMember: C( D.prototype.writeSurfaceOrPolygonMember ) } }; D.prototype.POINTMEMBER_SERIALIZERS = { "http://www.opengis.net/gml": { - pointMember: M(D.prototype.writePointMember) + pointMember: C(D.prototype.writePointMember) } }; D.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = { "http://www.opengis.net/gml": { - lineStringMember: M( + lineStringMember: C( D.prototype.writeLineStringOrCurveMember ), - curveMember: M( + curveMember: C( D.prototype.writeLineStringOrCurveMember ) } }; D.prototype.GEOMETRY_SERIALIZERS = { "http://www.opengis.net/gml": { - Curve: M(D.prototype.writeCurveOrLineString), - MultiCurve: M(D.prototype.writeMultiCurveOrLineString), - Point: M(D.prototype.writePoint), - MultiPoint: M(D.prototype.writeMultiPoint), - LineString: M(D.prototype.writeCurveOrLineString), - MultiLineString: M( + Curve: C(D.prototype.writeCurveOrLineString), + MultiCurve: C(D.prototype.writeMultiCurveOrLineString), + Point: C(D.prototype.writePoint), + MultiPoint: C(D.prototype.writeMultiPoint), + LineString: C(D.prototype.writeCurveOrLineString), + MultiLineString: C( D.prototype.writeMultiCurveOrLineString ), - LinearRing: M(D.prototype.writeLinearRing), - Polygon: M(D.prototype.writeSurfaceOrPolygon), - MultiPolygon: M( + LinearRing: C(D.prototype.writeLinearRing), + Polygon: C(D.prototype.writeSurfaceOrPolygon), + MultiPolygon: C( D.prototype.writeMultiSurfaceOrPolygon ), - Surface: M(D.prototype.writeSurfaceOrPolygon), - MultiSurface: M( + Surface: C(D.prototype.writeSurfaceOrPolygon), + MultiSurface: C( D.prototype.writeMultiSurfaceOrPolygon ), - Envelope: M(D.prototype.writeEnvelope) + Envelope: C(D.prototype.writeEnvelope) } }; -const tt = D; -class lt extends tt { +const Q = D; +class at extends Q { constructor(t) { t = t || {}, super(t), this.schemaLocation = t.schemaLocation ? t.schemaLocation : this.namespace + " http://schemas.opengis.net/gml/3.2.1/gml.xsd"; } } -lt.prototype.namespace = "http://www.opengis.net/gml/3.2"; -lt.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { +at.prototype.namespace = "http://www.opengis.net/gml/3.2"; +at.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { "http://www.opengis.net/gml/3.2": { - pos: Z(tt.prototype.readFlatPos), - posList: Z(tt.prototype.readFlatPosList), - coordinates: Z(ar.prototype.readFlatCoordinates) + pos: Z(Q.prototype.readFlatPos), + posList: Z(Q.prototype.readFlatPosList), + coordinates: Z(Xs.prototype.readFlatCoordinates) } }; -lt.prototype.FLAT_LINEAR_RINGS_PARSERS = { +at.prototype.FLAT_LINEAR_RINGS_PARSERS = { "http://www.opengis.net/gml/3.2": { - interior: tt.prototype.interiorParser, - exterior: tt.prototype.exteriorParser + interior: Q.prototype.interiorParser, + exterior: Q.prototype.exteriorParser } }; -lt.prototype.GEOMETRY_PARSERS = { +at.prototype.GEOMETRY_PARSERS = { "http://www.opengis.net/gml/3.2": { - Point: Z(J.prototype.readPoint), - MultiPoint: Z(J.prototype.readMultiPoint), - LineString: Z(J.prototype.readLineString), - MultiLineString: Z(J.prototype.readMultiLineString), - LinearRing: Z(J.prototype.readLinearRing), - Polygon: Z(J.prototype.readPolygon), - MultiPolygon: Z(J.prototype.readMultiPolygon), - Surface: Z(lt.prototype.readSurface), - MultiSurface: Z(tt.prototype.readMultiSurface), - Curve: Z(lt.prototype.readCurve), - MultiCurve: Z(tt.prototype.readMultiCurve), - Envelope: Z(lt.prototype.readEnvelope) + Point: Z(q.prototype.readPoint), + MultiPoint: Z(q.prototype.readMultiPoint), + LineString: Z(q.prototype.readLineString), + MultiLineString: Z(q.prototype.readMultiLineString), + LinearRing: Z(q.prototype.readLinearRing), + Polygon: Z(q.prototype.readPolygon), + MultiPolygon: Z(q.prototype.readMultiPolygon), + Surface: Z(at.prototype.readSurface), + MultiSurface: Z(Q.prototype.readMultiSurface), + Curve: Z(at.prototype.readCurve), + MultiCurve: Z(Q.prototype.readMultiCurve), + Envelope: Z(at.prototype.readEnvelope) } }; -lt.prototype.MULTICURVE_PARSERS = { +at.prototype.MULTICURVE_PARSERS = { "http://www.opengis.net/gml/3.2": { - curveMember: X(tt.prototype.curveMemberParser), - curveMembers: X(tt.prototype.curveMemberParser) + curveMember: H(Q.prototype.curveMemberParser), + curveMembers: H(Q.prototype.curveMemberParser) } }; -lt.prototype.MULTISURFACE_PARSERS = { +at.prototype.MULTISURFACE_PARSERS = { "http://www.opengis.net/gml/3.2": { - surfaceMember: X(tt.prototype.surfaceMemberParser), - surfaceMembers: X(tt.prototype.surfaceMemberParser) + surfaceMember: H(Q.prototype.surfaceMemberParser), + surfaceMembers: H(Q.prototype.surfaceMemberParser) } }; -lt.prototype.CURVEMEMBER_PARSERS = { +at.prototype.CURVEMEMBER_PARSERS = { "http://www.opengis.net/gml/3.2": { - LineString: X(J.prototype.readLineString), - Curve: X(tt.prototype.readCurve) + LineString: H(q.prototype.readLineString), + Curve: H(Q.prototype.readCurve) } }; -lt.prototype.SURFACEMEMBER_PARSERS = { +at.prototype.SURFACEMEMBER_PARSERS = { "http://www.opengis.net/gml/3.2": { - Polygon: X(J.prototype.readPolygon), - Surface: X(tt.prototype.readSurface) + Polygon: H(q.prototype.readPolygon), + Surface: H(Q.prototype.readSurface) } }; -lt.prototype.SURFACE_PARSERS = { +at.prototype.SURFACE_PARSERS = { "http://www.opengis.net/gml/3.2": { - patches: Z(tt.prototype.readPatch) + patches: Z(Q.prototype.readPatch) } }; -lt.prototype.CURVE_PARSERS = { +at.prototype.CURVE_PARSERS = { "http://www.opengis.net/gml/3.2": { - segments: Z(tt.prototype.readSegment) + segments: Z(Q.prototype.readSegment) } }; -lt.prototype.ENVELOPE_PARSERS = { +at.prototype.ENVELOPE_PARSERS = { "http://www.opengis.net/gml/3.2": { - lowerCorner: X(tt.prototype.readFlatPosList), - upperCorner: X(tt.prototype.readFlatPosList) + lowerCorner: H(Q.prototype.readFlatPosList), + upperCorner: H(Q.prototype.readFlatPosList) } }; -lt.prototype.PATCHES_PARSERS = { +at.prototype.PATCHES_PARSERS = { "http://www.opengis.net/gml/3.2": { - PolygonPatch: Z(tt.prototype.readPolygonPatch) + PolygonPatch: Z(Q.prototype.readPolygonPatch) } }; -lt.prototype.SEGMENTS_PARSERS = { +at.prototype.SEGMENTS_PARSERS = { "http://www.opengis.net/gml/3.2": { - LineStringSegment: Pf( - tt.prototype.readLineStringSegment + LineStringSegment: tf( + Q.prototype.readLineStringSegment ) } }; -lt.prototype.MULTIPOINT_PARSERS = { +at.prototype.MULTIPOINT_PARSERS = { "http://www.opengis.net/gml/3.2": { - pointMember: X(J.prototype.pointMemberParser), - pointMembers: X(J.prototype.pointMemberParser) + pointMember: H(q.prototype.pointMemberParser), + pointMembers: H(q.prototype.pointMemberParser) } }; -lt.prototype.MULTILINESTRING_PARSERS = { +at.prototype.MULTILINESTRING_PARSERS = { "http://www.opengis.net/gml/3.2": { - lineStringMember: X( - J.prototype.lineStringMemberParser + lineStringMember: H( + q.prototype.lineStringMemberParser ), - lineStringMembers: X( - J.prototype.lineStringMemberParser + lineStringMembers: H( + q.prototype.lineStringMemberParser ) } }; -lt.prototype.MULTIPOLYGON_PARSERS = { +at.prototype.MULTIPOLYGON_PARSERS = { "http://www.opengis.net/gml/3.2": { - polygonMember: X(J.prototype.polygonMemberParser), - polygonMembers: X(J.prototype.polygonMemberParser) + polygonMember: H(q.prototype.polygonMemberParser), + polygonMembers: H(q.prototype.polygonMemberParser) } }; -lt.prototype.POINTMEMBER_PARSERS = { +at.prototype.POINTMEMBER_PARSERS = { "http://www.opengis.net/gml/3.2": { - Point: X(J.prototype.readFlatCoordinatesFromNode) + Point: H(q.prototype.readFlatCoordinatesFromNode) } }; -lt.prototype.LINESTRINGMEMBER_PARSERS = { +at.prototype.LINESTRINGMEMBER_PARSERS = { "http://www.opengis.net/gml/3.2": { - LineString: X(J.prototype.readLineString) + LineString: H(q.prototype.readLineString) } }; -lt.prototype.POLYGONMEMBER_PARSERS = { +at.prototype.POLYGONMEMBER_PARSERS = { "http://www.opengis.net/gml/3.2": { - Polygon: X(J.prototype.readPolygon) + Polygon: H(q.prototype.readPolygon) } }; -lt.prototype.RING_PARSERS = { +at.prototype.RING_PARSERS = { "http://www.opengis.net/gml/3.2": { - LinearRing: Z(J.prototype.readFlatLinearRing), - Ring: Z(lt.prototype.readFlatCurveRing) + LinearRing: Z(q.prototype.readFlatLinearRing), + Ring: Z(at.prototype.readFlatCurveRing) } }; -lt.prototype.RING_SERIALIZERS = { +at.prototype.RING_SERIALIZERS = { "http://www.opengis.net/gml/3.2": { - exterior: M(tt.prototype.writeRing), - interior: M(tt.prototype.writeRing) + exterior: C(Q.prototype.writeRing), + interior: C(Q.prototype.writeRing) } }; -lt.prototype.ENVELOPE_SERIALIZERS = { +at.prototype.ENVELOPE_SERIALIZERS = { "http://www.opengis.net/gml/3.2": { - lowerCorner: M(It), - upperCorner: M(It) + lowerCorner: C(Tt), + upperCorner: C(Tt) } }; -lt.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = { +at.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = { "http://www.opengis.net/gml/3.2": { - surfaceMember: M( - tt.prototype.writeSurfaceOrPolygonMember + surfaceMember: C( + Q.prototype.writeSurfaceOrPolygonMember ), - polygonMember: M( - tt.prototype.writeSurfaceOrPolygonMember + polygonMember: C( + Q.prototype.writeSurfaceOrPolygonMember ) } }; -lt.prototype.POINTMEMBER_SERIALIZERS = { +at.prototype.POINTMEMBER_SERIALIZERS = { "http://www.opengis.net/gml/3.2": { - pointMember: M(tt.prototype.writePointMember) + pointMember: C(Q.prototype.writePointMember) } }; -lt.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = { +at.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = { "http://www.opengis.net/gml/3.2": { - lineStringMember: M( - tt.prototype.writeLineStringOrCurveMember + lineStringMember: C( + Q.prototype.writeLineStringOrCurveMember ), - curveMember: M( - tt.prototype.writeLineStringOrCurveMember + curveMember: C( + Q.prototype.writeLineStringOrCurveMember ) } }; -lt.prototype.GEOMETRY_SERIALIZERS = { +at.prototype.GEOMETRY_SERIALIZERS = { "http://www.opengis.net/gml/3.2": { - Curve: M(tt.prototype.writeCurveOrLineString), - MultiCurve: M(tt.prototype.writeMultiCurveOrLineString), - Point: M(lt.prototype.writePoint), - MultiPoint: M(tt.prototype.writeMultiPoint), - LineString: M(tt.prototype.writeCurveOrLineString), - MultiLineString: M( - tt.prototype.writeMultiCurveOrLineString + Curve: C(Q.prototype.writeCurveOrLineString), + MultiCurve: C(Q.prototype.writeMultiCurveOrLineString), + Point: C(at.prototype.writePoint), + MultiPoint: C(Q.prototype.writeMultiPoint), + LineString: C(Q.prototype.writeCurveOrLineString), + MultiLineString: C( + Q.prototype.writeMultiCurveOrLineString ), - LinearRing: M(tt.prototype.writeLinearRing), - Polygon: M(tt.prototype.writeSurfaceOrPolygon), - MultiPolygon: M( - tt.prototype.writeMultiSurfaceOrPolygon + LinearRing: C(Q.prototype.writeLinearRing), + Polygon: C(Q.prototype.writeSurfaceOrPolygon), + MultiPolygon: C( + Q.prototype.writeMultiSurfaceOrPolygon ), - Surface: M(tt.prototype.writeSurfaceOrPolygon), - MultiSurface: M( - tt.prototype.writeMultiSurfaceOrPolygon + Surface: C(Q.prototype.writeSurfaceOrPolygon), + MultiSurface: C( + Q.prototype.writeMultiSurfaceOrPolygon ), - Envelope: M(tt.prototype.writeEnvelope) + Envelope: C(Q.prototype.writeEnvelope) } }; -const rh = lt; -class ey { +const Ol = at; +class dp { constructor(t) { this.tagName_ = t; } @@ -18353,118 +16740,118 @@ class ey { return this.tagName_; } } -const Nf = ey; -class iy extends Nf { +const rf = dp; +class fp extends rf { constructor(t, e) { super(t), this.conditions = e, Y(this.conditions.length >= 2, 57); } } -const ny = iy; -class sy extends ny { +const gp = fp; +class mp extends gp { constructor(t) { super("And", Array.prototype.slice.call(arguments)); } } -const ry = sy; -class oy extends Nf { - constructor(t, e, i) { +const _p = mp; +class pp extends rf { + constructor(t, e, n) { if (super("BBOX"), this.geometryName = t, this.extent = e, e.length !== 4) throw new Error( "Expected an extent with four values ([minX, minY, maxX, maxY])" ); - this.srsName = i; + this.srsName = n; } } -const ay = oy; -function ly(n) { +const yp = pp; +function vp(i) { const t = [null].concat(Array.prototype.slice.call(arguments)); - return new (Function.prototype.bind.apply(ry, t))(); + return new (Function.prototype.bind.apply(_p, t))(); } -function hy(n, t, e) { - return new ay(n, t, e); +function xp(i, t, e) { + return new yp(i, t, e); } -const Bc = { +const uc = { "http://www.opengis.net/gml": { boundedBy: O( - J.prototype.readExtentElement, + q.prototype.readExtentElement, "bounds" ) }, "http://www.opengis.net/wfs/2.0": { - member: X(J.prototype.readFeaturesInternal) + member: H(q.prototype.readFeaturesInternal) } -}, cy = { +}, Mp = { "http://www.opengis.net/wfs": { - totalInserted: O(ne), - totalUpdated: O(ne), - totalDeleted: O(ne) + totalInserted: O(te), + totalUpdated: O(te), + totalDeleted: O(te) }, "http://www.opengis.net/wfs/2.0": { - totalInserted: O(ne), - totalUpdated: O(ne), - totalDeleted: O(ne) + totalInserted: O(te), + totalUpdated: O(te), + totalDeleted: O(te) } -}, uy = { +}, Cp = { "http://www.opengis.net/wfs": { TransactionSummary: O( - Zc, + fc, "transactionSummary" ), - InsertResults: O(Uc, "insertIds") + InsertResults: O(mc, "insertIds") }, "http://www.opengis.net/wfs/2.0": { TransactionSummary: O( - Zc, + fc, "transactionSummary" ), - InsertResults: O(Uc, "insertIds") + InsertResults: O(mc, "insertIds") } -}, dy = { +}, Ep = { "http://www.opengis.net/wfs": { - PropertyName: M(It) + PropertyName: C(Tt) }, "http://www.opengis.net/wfs/2.0": { - PropertyName: M(It) + PropertyName: C(Tt) } -}, Df = { +}, of = { "http://www.opengis.net/wfs": { - Insert: M(Wc), - Update: M(Xc), - Delete: M(Hc), - Property: M(Yc), - Native: M(jc) + Insert: C(_c), + Update: C(yc), + Delete: C(pc), + Property: C(vc), + Native: C(xc) }, "http://www.opengis.net/wfs/2.0": { - Insert: M(Wc), - Update: M(Xc), - Delete: M(Hc), - Property: M(Yc), - Native: M(jc) + Insert: C(_c), + Update: C(yc), + Delete: C(pc), + Property: C(vc), + Native: C(xc) } -}, kf = "feature", oh = "http://www.w3.org/2000/xmlns/", ah = { +}, af = "feature", Nl = "http://www.w3.org/2000/xmlns/", Fl = { "2.0.0": "http://www.opengis.net/ogc/1.1", "1.1.0": "http://www.opengis.net/ogc", "1.0.0": "http://www.opengis.net/ogc" -}, tl = { +}, Aa = { "2.0.0": "http://www.opengis.net/wfs/2.0", "1.1.0": "http://www.opengis.net/wfs", "1.0.0": "http://www.opengis.net/wfs" -}, lh = { +}, Dl = { "2.0.0": "http://www.opengis.net/fes/2.0", "1.1.0": "http://www.opengis.net/fes", "1.0.0": "http://www.opengis.net/fes" -}, zc = { +}, dc = { "2.0.0": "http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd", "1.1.0": "http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd", "1.0.0": "http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd" -}, hh = { - "2.0.0": rh, - "1.1.0": tt, - "1.0.0": ar -}, fy = "1.1.0"; -class gy extends Ff { +}, kl = { + "2.0.0": Ol, + "1.1.0": Q, + "1.0.0": Xs +}, wp = "1.1.0"; +class Sp extends sf { constructor(t) { - super(), t = t || {}, this.version_ = t.version ? t.version : fy, this.featureType_ = t.featureType, this.featureNS_ = t.featureNS, this.gmlFormat_ = t.gmlFormat ? t.gmlFormat : new hh[this.version_](), this.schemaLocation_ = t.schemaLocation ? t.schemaLocation : zc[this.version_]; + super(), t = t || {}, this.version_ = t.version ? t.version : wp, this.featureType_ = t.featureType, this.featureNS_ = t.featureNS, this.gmlFormat_ = t.gmlFormat ? t.gmlFormat : new kl[this.version_](), this.schemaLocation_ = t.schemaLocation ? t.schemaLocation : dc[this.version_]; } getFeatureType() { return this.featureType_; @@ -18473,16 +16860,16 @@ class gy extends Ff { this.featureType_ = t; } readFeaturesFromNode(t, e) { - const i = { + const n = { node: t }; - Object.assign(i, { + Object.assign(n, { featureType: this.featureType_, featureNS: this.featureNS_ - }), Object.assign(i, this.getReadOptions(t, e || {})); - const s = [i]; + }), Object.assign(n, this.getReadOptions(t, e || {})); + const s = [n]; let r; - this.version_ === "2.0.0" ? r = Bc : r = this.gmlFormat_.FEATURE_COLLECTION_PARSERS; + this.version_ === "2.0.0" ? r = uc : r = this.gmlFormat_.FEATURE_COLLECTION_PARSERS; let o = B( [], r, @@ -18495,10 +16882,10 @@ class gy extends Ff { readTransactionResponse(t) { if (t) if (typeof t == "string") { - const e = Yi(t); + const e = Di(t); return this.readTransactionResponseFromDocument(e); } else - return Xi(t) ? this.readTransactionResponseFromDocument( + return Fi(t) ? this.readTransactionResponseFromDocument( t ) : this.readTransactionResponseFromNode( t @@ -18509,10 +16896,10 @@ class gy extends Ff { readFeatureCollectionMetadata(t) { if (t) if (typeof t == "string") { - const e = Yi(t); + const e = Di(t); return this.readFeatureCollectionMetadataFromDocument(e); } else - return Xi(t) ? this.readFeatureCollectionMetadataFromDocument( + return Fi(t) ? this.readFeatureCollectionMetadataFromDocument( t ) : this.readFeatureCollectionMetadataFromNode( t @@ -18528,12 +16915,12 @@ class gy extends Ff { ); } readFeatureCollectionMetadataFromNode(t) { - const e = {}, i = Fn( + const e = {}, n = vn( t.getAttribute("numberOfFeatures") ); - return e.numberOfFeatures = i, B( + return e.numberOfFeatures = n, B( e, - Bc, + uc, t, [], this.gmlFormat_ @@ -18547,22 +16934,22 @@ class gy extends Ff { readTransactionResponseFromNode(t) { return B( {}, - uy, + Cp, t, [] ); } writeGetFeature(t) { - const e = K(tl[this.version_], "GetFeature"); + const e = K(Aa[this.version_], "GetFeature"); e.setAttribute("service", "WFS"), e.setAttribute("version", this.version_), t.handle && e.setAttribute("handle", t.handle), t.outputFormat && e.setAttribute("outputFormat", t.outputFormat), t.maxFeatures !== void 0 && e.setAttribute("maxFeatures", String(t.maxFeatures)), t.resultType && e.setAttribute("resultType", t.resultType), t.startIndex !== void 0 && e.setAttribute("startIndex", String(t.startIndex)), t.count !== void 0 && e.setAttribute("count", String(t.count)), t.viewParams !== void 0 && e.setAttribute("viewParams", t.viewParams), e.setAttributeNS( - Qa, + Ia, "xsi:schemaLocation", this.schemaLocation_ ); - const i = { + const n = { node: e }; - if (Object.assign(i, { + if (Object.assign(n, { version: this.version_, srsName: t.srsName, featureNS: t.featureNS ? t.featureNS : this.featureNS_, @@ -18575,13 +16962,13 @@ class gy extends Ff { t.bbox, t.srsName, s - )), Object.assign(i, { + )), Object.assign(n, { geometryName: t.geometryName, filter: s - }), ru( + }), Ic( e, t.featureTypes, - [i] + [n] ); } else t.featureTypes.forEach((s) => { @@ -18591,28 +16978,28 @@ class gy extends Ff { t.srsName, t.filter ); - Object.assign(i, { + Object.assign(n, { geometryName: s.geometryName, filter: r - }), ru(e, [s.name], [i]); + }), Ic(e, [s.name], [n]); }); return e; } - combineBboxAndFilter(t, e, i, s) { - const r = hy(t, e, i); - return s ? ly(s, r) : r; + combineBboxAndFilter(t, e, n, s) { + const r = xp(t, e, n); + return s ? vp(s, r) : r; } - writeTransaction(t, e, i, s) { - const r = [], o = s.version ? s.version : this.version_, a = K(tl[o], "Transaction"); + writeTransaction(t, e, n, s) { + const r = [], o = s.version ? s.version : this.version_, a = K(Aa[o], "Transaction"); a.setAttribute("service", "WFS"), a.setAttribute("version", o); let l; s && (l = s.gmlOptions ? s.gmlOptions : {}, s.handle && a.setAttribute("handle", s.handle)), a.setAttributeNS( - Qa, + Ia, "xsi:schemaLocation", - zc[o] + dc[o] ); - const h = my(a, l, o, s); - return t && zr("Insert", t, r, h), e && zr("Update", e, r, h), i && zr("Delete", i, r, h), s.nativeElements && zr( + const h = Rp(a, l, o, s); + return t && Cr("Insert", t, r, h), e && Cr("Update", e, r, h), n && Cr("Delete", n, r, h), s.nativeElements && Cr( "Native", s.nativeElements, r, @@ -18630,94 +17017,94 @@ class gy extends Ff { t = t.firstElementChild.firstElementChild; for (let e = t.firstElementChild; e; e = e.nextElementSibling) if (!(e.childNodes.length === 0 || e.childNodes.length === 1 && e.firstChild.nodeType === 3)) { - const i = [{}]; - return this.gmlFormat_.readGeometryElement(e, i), Q(i.pop().srsName); + const n = [{}]; + return this.gmlFormat_.readGeometryElement(e, n), J(n.pop().srsName); } } return null; } } -function my(n, t, e, i) { - const s = i.featurePrefix ? i.featurePrefix : kf; +function Rp(i, t, e, n) { + const s = n.featurePrefix ? n.featurePrefix : af; let r; return e === "1.0.0" ? r = 2 : e === "1.1.0" ? r = 3 : e === "2.0.0" && (r = 3.2), Object.assign( - { node: n }, + { node: i }, { version: e, - featureNS: i.featureNS, - featureType: i.featureType, + featureNS: n.featureNS, + featureType: n.featureType, featurePrefix: s, gmlVersion: r, - hasZ: i.hasZ, - srsName: i.srsName + hasZ: n.hasZ, + srsName: n.srsName }, t ); } -function zr(n, t, e, i) { - St( - i, - Df, - me(n), +function Cr(i, t, e, n) { + Et( + n, + of, + ce(i), t, e ); } -function Zc(n, t) { - return B({}, cy, n, t); +function fc(i, t) { + return B({}, Mp, i, t); } -const _y = { +const bp = { "http://www.opengis.net/ogc": { - FeatureId: X(function(n, t) { - return n.getAttribute("fid"); + FeatureId: H(function(i, t) { + return i.getAttribute("fid"); }) }, "http://www.opengis.net/ogc/1.1": { - FeatureId: X(function(n, t) { - return n.getAttribute("fid"); + FeatureId: H(function(i, t) { + return i.getAttribute("fid"); }) } }; -function Vc(n, t) { - Ji(_y, n, t); +function gc(i, t) { + Bi(bp, i, t); } -const py = { +const Lp = { "http://www.opengis.net/wfs": { - Feature: Vc + Feature: gc }, "http://www.opengis.net/wfs/2.0": { - Feature: Vc + Feature: gc } }; -function Uc(n, t) { - return B([], py, n, t); +function mc(i, t) { + return B([], Lp, i, t); } -function Wc(n, t, e) { - const i = e[e.length - 1], s = i.featureType, r = i.featureNS, o = i.gmlVersion, a = K(r, s); - n.appendChild(a), o === 2 ? ar.prototype.writeFeatureElement(a, t, e) : o === 3 ? tt.prototype.writeFeatureElement(a, t, e) : rh.prototype.writeFeatureElement(a, t, e); +function _c(i, t, e) { + const n = e[e.length - 1], s = n.featureType, r = n.featureNS, o = n.gmlVersion, a = K(r, s); + i.appendChild(a), o === 2 ? Xs.prototype.writeFeatureElement(a, t, e) : o === 3 ? Q.prototype.writeFeatureElement(a, t, e) : Ol.prototype.writeFeatureElement(a, t, e); } -function Gf(n, t, e) { - const s = e[e.length - 1].version, r = ah[s], o = K(r, "Filter"), a = K(r, "FeatureId"); - o.appendChild(a), a.setAttribute("fid", t), n.appendChild(o); +function lf(i, t, e) { + const s = e[e.length - 1].version, r = Fl[s], o = K(r, "Filter"), a = K(r, "FeatureId"); + o.appendChild(a), a.setAttribute("fid", t), i.appendChild(o); } -function ch(n, t) { - n = n || kf; - const e = n + ":"; +function Gl(i, t) { + i = i || af; + const e = i + ":"; return t.startsWith(e) ? t : e + t; } -function Hc(n, t, e) { - const i = e[e.length - 1]; +function pc(i, t, e) { + const n = e[e.length - 1]; Y(t.getId() !== void 0, 26); - const s = i.featureType, r = i.featurePrefix, o = i.featureNS, a = ch(r, s); - n.setAttribute("typeName", a), n.setAttributeNS(oh, "xmlns:" + r, o); + const s = n.featureType, r = n.featurePrefix, o = n.featureNS, a = Gl(r, s); + i.setAttribute("typeName", a), i.setAttributeNS(Nl, "xmlns:" + r, o); const l = t.getId(); - l !== void 0 && Gf(n, l, e); + l !== void 0 && lf(i, l, e); } -function Xc(n, t, e) { - const i = e[e.length - 1]; +function yc(i, t, e) { + const n = e[e.length - 1]; Y(t.getId() !== void 0, 27); - const s = i.version, r = i.featureType, o = i.featurePrefix, a = i.featureNS, l = ch(o, r), h = t.getGeometryName(); - n.setAttribute("typeName", l), n.setAttributeNS(oh, "xmlns:" + o, a); + const s = n.version, r = n.featureType, o = n.featurePrefix, a = n.featureNS, l = Gl(o, r), h = t.getGeometryName(); + i.setAttribute("typeName", l), i.setAttributeNS(Nl, "xmlns:" + o, a); const c = t.getId(); if (c !== void 0) { const u = t.getKeys(), d = []; @@ -18728,328 +17115,302 @@ function Xc(n, t, e) { m && typeof m.getSimplifiedGeometry == "function" && (_ = h), d.push({ name: _, value: m }); } } - St( + Et( { version: s, - gmlVersion: i.gmlVersion, - node: n, - hasZ: i.hasZ, - srsName: i.srsName + gmlVersion: n.gmlVersion, + node: i, + hasZ: n.hasZ, + srsName: n.srsName }, - Df, - me("Property"), + of, + ce("Property"), d, e - ), Gf(n, c, e); + ), lf(i, c, e); } } -function Yc(n, t, e) { - const i = e[e.length - 1], s = i.version, r = tl[s], o = K(r, "Name"), a = i.gmlVersion; - if (n.appendChild(o), It(o, t.name), t.value !== void 0 && t.value !== null) { +function vc(i, t, e) { + const n = e[e.length - 1], s = n.version, r = Aa[s], o = K(r, "Name"), a = n.gmlVersion; + if (i.appendChild(o), Tt(o, t.name), t.value !== void 0 && t.value !== null) { const l = K(r, "Value"); - n.appendChild(l), t.value && typeof t.value.getSimplifiedGeometry == "function" ? a === 2 ? ar.prototype.writeGeometryElement(l, t.value, e) : a === 3 ? tt.prototype.writeGeometryElement(l, t.value, e) : rh.prototype.writeGeometryElement(l, t.value, e) : It(l, t.value); + i.appendChild(l), t.value && typeof t.value.getSimplifiedGeometry == "function" ? a === 2 ? Xs.prototype.writeGeometryElement(l, t.value, e) : a === 3 ? Q.prototype.writeGeometryElement(l, t.value, e) : Ol.prototype.writeGeometryElement(l, t.value, e) : Tt(l, t.value); } } -function jc(n, t, e) { - t.vendorId && n.setAttribute("vendorId", t.vendorId), t.safeToIgnore !== void 0 && n.setAttribute("safeToIgnore", String(t.safeToIgnore)), t.value !== void 0 && It(n, t.value); +function xc(i, t, e) { + t.vendorId && i.setAttribute("vendorId", t.vendorId), t.safeToIgnore !== void 0 && i.setAttribute("safeToIgnore", String(t.safeToIgnore)), t.value !== void 0 && Tt(i, t.value); } -const zo = { +const Mo = { "http://www.opengis.net/wfs": { - Query: M(qc) + Query: C(Mc) }, "http://www.opengis.net/wfs/2.0": { - Query: M(qc) + Query: C(Mc) }, "http://www.opengis.net/ogc": { - During: M(Qc), - And: M(Zr), - Or: M(Zr), - Not: M(tu), - BBOX: M(Kc), - Contains: M(xi), - Intersects: M(xi), - Within: M(xi), - DWithin: M(Jc), - PropertyIsEqualTo: M(Ce), - PropertyIsNotEqualTo: M(Ce), - PropertyIsLessThan: M(Ce), - PropertyIsLessThanOrEqualTo: M(Ce), - PropertyIsGreaterThan: M(Ce), - PropertyIsGreaterThanOrEqualTo: M(Ce), - PropertyIsNull: M(eu), - PropertyIsBetween: M(iu), - PropertyIsLike: M(nu) + During: C(wc), + And: C(Er), + Or: C(Er), + Not: C(Sc), + BBOX: C(Cc), + Contains: C(di), + Intersects: C(di), + Within: C(di), + DWithin: C(Ec), + PropertyIsEqualTo: C(_e), + PropertyIsNotEqualTo: C(_e), + PropertyIsLessThan: C(_e), + PropertyIsLessThanOrEqualTo: C(_e), + PropertyIsGreaterThan: C(_e), + PropertyIsGreaterThanOrEqualTo: C(_e), + PropertyIsNull: C(Rc), + PropertyIsBetween: C(bc), + PropertyIsLike: C(Lc) }, "http://www.opengis.net/fes/2.0": { - During: M(Qc), - And: M(Zr), - Or: M(Zr), - Not: M(tu), - BBOX: M(Kc), - Contains: M(xi), - Disjoint: M(xi), - Intersects: M(xi), - ResourceId: M(vy), - Within: M(xi), - DWithin: M(Jc), - PropertyIsEqualTo: M(Ce), - PropertyIsNotEqualTo: M(Ce), - PropertyIsLessThan: M(Ce), - PropertyIsLessThanOrEqualTo: M(Ce), - PropertyIsGreaterThan: M(Ce), - PropertyIsGreaterThanOrEqualTo: M(Ce), - PropertyIsNull: M(eu), - PropertyIsBetween: M(iu), - PropertyIsLike: M(nu) + During: C(wc), + And: C(Er), + Or: C(Er), + Not: C(Sc), + BBOX: C(Cc), + Contains: C(di), + Disjoint: C(di), + Intersects: C(di), + ResourceId: C(Ip), + Within: C(di), + DWithin: C(Ec), + PropertyIsEqualTo: C(_e), + PropertyIsNotEqualTo: C(_e), + PropertyIsLessThan: C(_e), + PropertyIsLessThanOrEqualTo: C(_e), + PropertyIsGreaterThan: C(_e), + PropertyIsGreaterThanOrEqualTo: C(_e), + PropertyIsNull: C(Rc), + PropertyIsBetween: C(bc), + PropertyIsLike: C(Lc) } }; -function qc(n, t, e) { - const i = e[e.length - 1], s = i.version, r = i.featurePrefix, o = i.featureNS, a = i.propertyNames, l = i.srsName; +function Mc(i, t, e) { + const n = e[e.length - 1], s = n.version, r = n.featurePrefix, o = n.featureNS, a = n.propertyNames, l = n.srsName; let h; - r ? h = ch(r, t) : h = t; + r ? h = Gl(r, t) : h = t; let c; - s === "2.0.0" ? c = "typeNames" : c = "typeName", n.setAttribute(c, h), l && n.setAttribute("srsName", l), o && n.setAttributeNS(oh, "xmlns:" + r, o); - const u = Object.assign({}, i); - u.node = n, St( + s === "2.0.0" ? c = "typeNames" : c = "typeName", i.setAttribute(c, h), l && i.setAttribute("srsName", l), o && i.setAttributeNS(Nl, "xmlns:" + r, o); + const u = Object.assign({}, n); + u.node = i, Et( u, - dy, - me("PropertyName"), + Ep, + ce("PropertyName"), a, e ); - const d = i.filter; + const d = n.filter; if (d) { - const f = K(Zo(s), "Filter"); - n.appendChild(f), yy(f, d, e); + const f = K(Co(s), "Filter"); + i.appendChild(f), Tp(f, d, e); } } -function yy(n, t, e) { - const i = e[e.length - 1], s = { node: n }; - Object.assign(s, { context: i }), St( +function Tp(i, t, e) { + const n = e[e.length - 1], s = { node: i }; + Object.assign(s, { context: n }), Et( s, - zo, - me(t.getTagName()), + Mo, + ce(t.getTagName()), [t], e ); } -function Kc(n, t, e) { - const i = e[e.length - 1], r = i.context.version; - i.srsName = t.srsName; - const o = hh[r]; - os(r, n, t.geometryName), o.prototype.writeGeometryElement(n, t.extent, e); +function Cc(i, t, e) { + const n = e[e.length - 1], r = n.context.version; + n.srsName = t.srsName; + const o = kl[r]; + Wn(r, i, t.geometryName), o.prototype.writeGeometryElement(i, t.extent, e); } -function vy(n, t, e) { - n.setAttribute("rid", t.rid); +function Ip(i, t, e) { + i.setAttribute("rid", t.rid); } -function xi(n, t, e) { - const i = e[e.length - 1], r = i.context.version; - i.srsName = t.srsName; - const o = hh[r]; - os(r, n, t.geometryName), o.prototype.writeGeometryElement(n, t.geometry, e); +function di(i, t, e) { + const n = e[e.length - 1], r = n.context.version; + n.srsName = t.srsName; + const o = kl[r]; + Wn(r, i, t.geometryName), o.prototype.writeGeometryElement(i, t.geometry, e); } -function Jc(n, t, e) { +function Ec(i, t, e) { const r = e[e.length - 1].context.version; - xi(n, t, e); - const o = K(Zo(r), "Distance"); - It(o, t.distance.toString()), r === "2.0.0" ? o.setAttribute("uom", t.unit) : o.setAttribute("units", t.unit), n.appendChild(o); + di(i, t, e); + const o = K(Co(r), "Distance"); + Tt(o, t.distance.toString()), r === "2.0.0" ? o.setAttribute("uom", t.unit) : o.setAttribute("units", t.unit), i.appendChild(o); } -function Qc(n, t, e) { +function wc(i, t, e) { const r = e[e.length - 1].context.version; - po(lh[r], "ValueReference", n, t.propertyName); - const o = K(hi, "TimePeriod"); - n.appendChild(o); - const a = K(hi, "begin"); - o.appendChild(a), su(a, t.begin); - const l = K(hi, "end"); - o.appendChild(l), su(l, t.end); -} -function Zr(n, t, e) { - const s = e[e.length - 1].context, r = { node: n }; + Yr(Dl[r], "ValueReference", i, t.propertyName); + const o = K(Qe, "TimePeriod"); + i.appendChild(o); + const a = K(Qe, "begin"); + o.appendChild(a), Tc(a, t.begin); + const l = K(Qe, "end"); + o.appendChild(l), Tc(l, t.end); +} +function Er(i, t, e) { + const s = e[e.length - 1].context, r = { node: i }; Object.assign(r, { context: s }); const o = t.conditions; for (let a = 0, l = o.length; a < l; ++a) { const h = o[a]; - St( + Et( r, - zo, - me(h.getTagName()), + Mo, + ce(h.getTagName()), [h], e ); } } -function tu(n, t, e) { - const s = e[e.length - 1].context, r = { node: n }; +function Sc(i, t, e) { + const s = e[e.length - 1].context, r = { node: i }; Object.assign(r, { context: s }); const o = t.condition; - St( + Et( r, - zo, - me(o.getTagName()), + Mo, + ce(o.getTagName()), [o], e ); } -function Ce(n, t, e) { +function _e(i, t, e) { const r = e[e.length - 1].context.version; - t.matchCase !== void 0 && n.setAttribute("matchCase", t.matchCase.toString()), os(r, n, t.propertyName), yo(r, n, "" + t.expression); + t.matchCase !== void 0 && i.setAttribute("matchCase", t.matchCase.toString()), Wn(r, i, t.propertyName), jr(r, i, "" + t.expression); } -function eu(n, t, e) { +function Rc(i, t, e) { const r = e[e.length - 1].context.version; - os(r, n, t.propertyName); + Wn(r, i, t.propertyName); } -function iu(n, t, e) { - const r = e[e.length - 1].context.version, o = Zo(r); - os(r, n, t.propertyName); +function bc(i, t, e) { + const r = e[e.length - 1].context.version, o = Co(r); + Wn(r, i, t.propertyName); const a = K(o, "LowerBoundary"); - n.appendChild(a), yo(r, a, "" + t.lowerBoundary); + i.appendChild(a), jr(r, a, "" + t.lowerBoundary); const l = K(o, "UpperBoundary"); - n.appendChild(l), yo(r, l, "" + t.upperBoundary); + i.appendChild(l), jr(r, l, "" + t.upperBoundary); } -function nu(n, t, e) { +function Lc(i, t, e) { const r = e[e.length - 1].context.version; - n.setAttribute("wildCard", t.wildCard), n.setAttribute("singleChar", t.singleChar), n.setAttribute("escapeChar", t.escapeChar), t.matchCase !== void 0 && n.setAttribute("matchCase", t.matchCase.toString()), os(r, n, t.propertyName), yo(r, n, "" + t.pattern); + i.setAttribute("wildCard", t.wildCard), i.setAttribute("singleChar", t.singleChar), i.setAttribute("escapeChar", t.escapeChar), t.matchCase !== void 0 && i.setAttribute("matchCase", t.matchCase.toString()), Wn(r, i, t.propertyName), jr(r, i, "" + t.pattern); } -function po(n, t, e, i) { - const s = K(n, t); - It(s, i), e.appendChild(s); +function Yr(i, t, e, n) { + const s = K(i, t); + Tt(s, n), e.appendChild(s); } -function yo(n, t, e) { - po(Zo(n), "Literal", t, e); +function jr(i, t, e) { + Yr(Co(i), "Literal", t, e); } -function os(n, t, e) { - n === "2.0.0" ? po(lh[n], "ValueReference", t, e) : po(ah[n], "PropertyName", t, e); +function Wn(i, t, e) { + i === "2.0.0" ? Yr(Dl[i], "ValueReference", t, e) : Yr(Fl[i], "PropertyName", t, e); } -function su(n, t) { - const e = K(hi, "TimeInstant"); - n.appendChild(e); - const i = K(hi, "timePosition"); - e.appendChild(i), It(i, t); +function Tc(i, t) { + const e = K(Qe, "TimeInstant"); + i.appendChild(e); + const n = K(Qe, "timePosition"); + e.appendChild(n), Tt(n, t); } -function ru(n, t, e) { - const i = e[e.length - 1], s = Object.assign({}, i); - s.node = n, St( +function Ic(i, t, e) { + const n = e[e.length - 1], s = Object.assign({}, n); + s.node = i, Et( s, - zo, - me("Query"), + Mo, + ce("Query"), t, e ); } -function Zo(n) { +function Co(i) { let t; - return n === "2.0.0" ? t = lh[n] : t = ah[n], t; + return i === "2.0.0" ? t = Dl[i] : t = Fl[i], t; } -const xy = gy; -class $f { - static getSource(t, e) { - return new Ve({ - format: new xy({ +const Ap = Sp; +class hf { + static getSource(t, e, n) { + return new Ws({ + format: new Ap({ version: "2.0.0" }), - url: function(i) { + url: (s) => { + let r = t; if (e === "") - t + "" + i.join(","); + r + "" + s.join(","); else if (e.includes("")) { - const s = `geometry${i[0]} ${i[1]}${i[2]} ${i[3]}`; - t = `${t}&${e}`.replace("", s); + const o = `geometry${s[0]} ${s[1]}${s[2]} ${s[3]}`; + r = `${r}&${e}`.replace("", o); } else - console.error("The replacement string cannot be found. You lose the BBOX optimization."), t = `${t}&${e}`; - return t; + console.error("The replacement string cannot be found. You lose the BBOX optimization."), r = `${r}&${e}`; + return r; }, - strategy: F_ + strategy: n ? i2 : Sd }); } } -class Cy { +class Ac { constructor() { - this.control = new bf(), this.store = w(); - const t = this.store.getMap(), e = this.store.getOptions(), i = new Ze(), s = $f.getSource(this.store.getOptions().wfs.url, ""); - this.displayDataOnMap(t, i, e, s), t.on("click", (r) => { + this.control = new qd(), this.store = w(); + const t = this.store.getMap(), e = this.store.getOptions(), n = new Vs(), s = hf.getSource(w().getOptions().wfs.url, "", !1); + this.displayDataOnMap(t, n, e, s), t.on("click", (r) => { t.forEachFeatureAtPixel(r.pixel, (o) => { var a; - o && ((a = o.getGeometry()) == null ? void 0 : a.getType()) === "Point" && o.getProperties().features.length === 1 && (this.store.getSelectedFeature(o.getProperties().features[0].get("objectid"), "objectid") === void 0 && this.store.addSelectedFeature(o.getProperties().features[0]), ot.sendEvent("icon-clicked", o.getProperties().features[0].get("objectid"))); + o && ((a = o.getGeometry()) == null ? void 0 : a.getType()) === "Point" && (o.getProperties().features && o.getProperties().features.length === 1 ? (this.store.getSelectedFeature(o.getProperties().features[0].get("objectid")) === void 0 && this.store.addSelectedFeature(o.getProperties().features[0], o.getProperties().features[0].get("objectid"), "select"), st.sendEvent("icon-clicked", o.getProperties().features[0].get("objectid"))) : this.control.hide()); }); }), window.addEventListener("recenter-selected-element", () => { var a; - const r = this.store.getCurrentItemId(), o = (a = this.store.getSelectedFeature(r, "objectid")) == null ? void 0 : a.get("geom").getCoordinates(); + const r = this.store.getCurrentItemId(), o = (a = this.store.getSelectedFeature(r)) == null ? void 0 : a.get("geom").getCoordinates(); t.getView().setCenter(o); }); } - displayDataOnMap(t, e, i, s) { - const r = new G2({ - distance: i.cluster.distance, - minDistance: i.cluster.minDistance, + displayDataOnMap(t, e, n, s) { + const r = new H2({ + distance: n.cluster.distance, + minDistance: n.cluster.minDistance, source: s - }); - e.setSource(r), e.setStyle(function(o) { - return Vp.clusterWithIcon(o); + }), o = new tp(); + e.setSource(r), e.setStyle(function(a) { + return o.clusterWithIcon(a); }), t.addLayer(e), this.control.disable(), t.addControl(this.control), this.toogleDataSelection(e); } setCurrentElement(t) { var e; - (e = this.store.getSelectedFeature(this.store.getCurrentItemId(), "objectid")) == null || e.set("isSelected", void 0), this.store.setCurrentItemId(t.get("objectid")); + (e = this.store.getSelectedFeature(this.store.getCurrentItemId())) == null || e.set("isSelected", void 0), this.store.setCurrentItemId(t.get("objectid")); } setIconToDisplay(t, e) { t.set("isClick", e), t.set("isSelected", e); } removeSelectedItem(t) { - this.removeItem(t), this.control.hide(), ot.sendEvent("rule-validation", void 0), Lf.setCustomStyleWithouInfoBox(); + this.removeItem(t), this.control.hide(), st.sendEvent("rule-validation", void 0), Jd.setCustomStyleWithouInfoBox(); } removeItem(t) { - this.setIconToDisplay(t, void 0), this.store.removeSelectedFeature(t.get("objectid"), "objectid"); + this.setIconToDisplay(t, void 0), this.store.removeSelectedFeature(t.get("objectid")); } setInformationBox(t) { - this.setIconToDisplay(t, !0), this.control.show(), ot.sendEvent("open-select-create-box", t.get("geom").getCoordinates()), this.store.setCustomDisplay(!0), this.store.setTargetBoxSize("select"); + this.setIconToDisplay(t, !0), this.control.show(), st.sendEvent("open-select-create-box", t.get("geom").getCoordinates()), this.store.setCustomDisplay(!0), this.store.setTargetBoxSize("select"); } toogleDataSelection(t) { window.addEventListener("authorize-clicked", (e) => { var s; - const i = this.store.getSelectedFeature(e.detail, "objectid"); - i && (i.get("isClick") ? this.store.getMaxElement() === 1 || this.store.getCurrentItemId() === i.get("objectid") ? this.removeSelectedItem(i) : (this.setCurrentElement(i), i.set("isSelected", !0), ot.sendEvent("open-select-create-box", i.get("geom").getCoordinates()), this.control.show()) : this.store.getMaxElement() === 1 ? ((s = t.getSource()) == null || s.getFeatures().forEach((o) => { + const n = this.store.getSelectedFeature(e.detail); + n && (n.get("isClick") ? this.store.getMaxElement() === 1 || this.store.getCurrentItemId() === n.get("objectid") ? this.removeSelectedItem(n) : (this.setCurrentElement(n), n.set("isSelected", !0), st.sendEvent("open-select-create-box", n.get("geom").getCoordinates()), this.control.show()) : this.store.getMaxElement() === 1 ? ((s = t.getSource()) == null || s.getFeatures().forEach((o) => { o.get("features").forEach((a) => { - a.get("isClick") && (this.setIconToDisplay(a, void 0), this.store.removeSelectedFeature(a.get("objectid"), "objectid")); + a.get("isClick") && (this.setIconToDisplay(a, void 0), this.store.removeSelectedFeature(a.get("objectid"))); }); - }), this.store.setCurrentItemId(i.get("objectid")), ot.sendEvent("rule-validation", void 0), this.setInformationBox(i)) : this.store.getMaxElement() === -1 || this.store.getSelectedFeatures().length <= this.store.getMaxElement() ? (this.setCurrentElement(i), this.setInformationBox(i)) : this.removeItem(i)), this.store.getMap().get("target").className = `${this.store.getTargetBoxSize()} ${this.store.getTheme()}`; + }), this.store.setCurrentItemId(n.get("objectid")), st.sendEvent("rule-validation", void 0), this.setInformationBox(n)) : this.store.getMaxElement() === -1 || this.store.getSelectedFeatures().length <= this.store.getMaxElement() ? (this.setCurrentElement(n), this.setInformationBox(n)) : this.removeItem(n)), this.store.getMap().get("target").className = `${this.store.getTargetBoxSize()} ${this.store.getTheme()}`; }); } } -class My { - constructor() { - var e; - this.vectorLayer = new Ze(), this.vectorSource = new Ve(); - const t = w().getGeolocation(); - if (t) { - const i = new Ie(); - i.setStyle( - new Zt({ - image: new we({ - radius: 6, - fill: new Vt({ - color: "#3399CC" - }), - stroke: new Xt({ - color: "#fff", - width: 2 - }) - }) - }) - ), t.on("change:position", function() { - const s = t.getPosition(); - i.setGeometry(s ? new Se(s) : void 0); - }), (e = this.vectorSource) == null || e.addFeature(i), this.vectorLayer.setSource(this.vectorSource), w().getMap().addLayer(this.vectorLayer); - } - } -} -class Ey { +class Pp { read(t) { if (t) if (typeof t == "string") { - const e = Yi(t); + const e = Di(t); return this.readFromDocument(e); } else - return Xi(t) ? this.readFromDocument(t) : this.readFromNode(t); + return Fi(t) ? this.readFromDocument(t) : this.readFromNode(t); else return null; } @@ -19062,289 +17423,289 @@ class Ey { readFromNode(t) { } } -const Bf = Ey, wy = "http://www.w3.org/1999/xlink"; -function uh(n) { - return n.getAttributeNS(wy, "href"); +const cf = Pp, Op = "http://www.w3.org/1999/xlink"; +function $l(i) { + return i.getAttributeNS(Op, "href"); } -const le = [null, "http://www.opengis.net/ows/1.1"], Sy = dt(le, { - ServiceIdentification: O(qy), - ServiceProvider: O(Jy), - OperationsMetadata: O(Yy) +const ie = [null, "http://www.opengis.net/ows/1.1"], Np = ut(ie, { + ServiceIdentification: O(ry), + ServiceProvider: O(ay), + OperationsMetadata: O(ny) }); -class Ry extends Bf { +class Fp extends cf { constructor() { super(); } readFromNode(t) { - const e = B({}, Sy, t, []); + const e = B({}, Np, t, []); return e || null; } } -const Ty = dt(le, { - DeliveryPoint: O(rt), - City: O(rt), - AdministrativeArea: O(rt), - PostalCode: O(rt), - Country: O(rt), - ElectronicMailAddress: O(rt) -}), by = dt(le, { - Value: ge(Qy) -}), Ly = dt(le, { - AllowedValues: O(zy) -}), Iy = dt(le, { - Phone: O(jy), - Address: O(By) -}), Py = dt(le, { - HTTP: O(Hy) -}), Ay = dt(le, { - Get: ge(Wy), +const Dp = ut(ie, { + DeliveryPoint: O(nt), + City: O(nt), + AdministrativeArea: O(nt), + PostalCode: O(nt), + Country: O(nt), + ElectronicMailAddress: O(nt) +}), kp = ut(ie, { + Value: le(ly) +}), Gp = ut(ie, { + AllowedValues: O(Kp) +}), $p = ut(ie, { + Phone: O(sy), + Address: O(jp) +}), Bp = ut(ie, { + HTTP: O(ey) +}), zp = ut(ie, { + Get: le(ty), Post: void 0 -}), Oy = dt(le, { - DCP: O(Uy) -}), Fy = dt(le, { - Operation: Xy -}), Ny = dt(le, { - Voice: O(rt), - Facsimile: O(rt) -}), Dy = dt(le, { - Constraint: ge(Zy) -}), ky = dt(le, { - IndividualName: O(rt), - PositionName: O(rt), - ContactInfo: O(Vy) -}), Gy = dt(le, { - Abstract: O(rt), - AccessConstraints: O(rt), - Fees: O(rt), - Title: O(rt), - ServiceTypeVersion: O(rt), - ServiceType: O(rt) -}), $y = dt(le, { - ProviderName: O(rt), - ProviderSite: O(uh), - ServiceContact: O(Ky) +}), Zp = ut(ie, { + DCP: O(Qp) +}), Up = ut(ie, { + Operation: iy +}), Vp = ut(ie, { + Voice: O(nt), + Facsimile: O(nt) +}), Wp = ut(ie, { + Constraint: le(qp) +}), Hp = ut(ie, { + IndividualName: O(nt), + PositionName: O(nt), + ContactInfo: O(Jp) +}), Xp = ut(ie, { + Abstract: O(nt), + AccessConstraints: O(nt), + Fees: O(nt), + Title: O(nt), + ServiceTypeVersion: O(nt), + ServiceType: O(nt) +}), Yp = ut(ie, { + ProviderName: O(nt), + ProviderSite: O($l), + ServiceContact: O(oy) }); -function By(n, t) { - return B({}, Ty, n, t); +function jp(i, t) { + return B({}, Dp, i, t); } -function zy(n, t) { - return B({}, by, n, t); +function Kp(i, t) { + return B({}, kp, i, t); } -function Zy(n, t) { - const e = n.getAttribute("name"); +function qp(i, t) { + const e = i.getAttribute("name"); if (!!e) - return B({ name: e }, Ly, n, t); + return B({ name: e }, Gp, i, t); } -function Vy(n, t) { - return B({}, Iy, n, t); +function Jp(i, t) { + return B({}, $p, i, t); } -function Uy(n, t) { - return B({}, Py, n, t); +function Qp(i, t) { + return B({}, Bp, i, t); } -function Wy(n, t) { - const e = uh(n); +function ty(i, t) { + const e = $l(i); if (!!e) return B( { href: e }, - Dy, - n, + Wp, + i, t ); } -function Hy(n, t) { - return B({}, Ay, n, t); +function ey(i, t) { + return B({}, zp, i, t); } -function Xy(n, t) { - const e = n.getAttribute("name"), i = B({}, Oy, n, t); - if (!i) +function iy(i, t) { + const e = i.getAttribute("name"), n = B({}, Zp, i, t); + if (!n) return; const s = t[t.length - 1]; - s[e] = i; + s[e] = n; } -function Yy(n, t) { - return B({}, Fy, n, t); +function ny(i, t) { + return B({}, Up, i, t); } -function jy(n, t) { - return B({}, Ny, n, t); +function sy(i, t) { + return B({}, Vp, i, t); } -function qy(n, t) { - return B({}, Gy, n, t); +function ry(i, t) { + return B({}, Xp, i, t); } -function Ky(n, t) { - return B({}, ky, n, t); +function oy(i, t) { + return B({}, Hp, i, t); } -function Jy(n, t) { - return B({}, $y, n, t); +function ay(i, t) { + return B({}, Yp, i, t); } -function Qy(n, t) { - return rt(n); +function ly(i, t) { + return nt(i); } -const tv = Ry, He = [null, "http://www.opengis.net/wmts/1.0"], as = [null, "http://www.opengis.net/ows/1.1"], ev = dt(He, { - Contents: O(fv) +const hy = Fp, Ge = [null, "http://www.opengis.net/wmts/1.0"], Hn = [null, "http://www.opengis.net/ows/1.1"], cy = ut(Ge, { + Contents: O(Cy) }); -class iv extends Bf { +class uy extends cf { constructor() { - super(), this.owsParser_ = new tv(); + super(), this.owsParser_ = new hy(); } readFromNode(t) { let e = t.getAttribute("version"); e && (e = e.trim()); - let i = this.owsParser_.readFromNode(t); - return i ? (i.version = e, i = B( - i, - ev, + let n = this.owsParser_.readFromNode(t); + return n ? (n.version = e, n = B( + n, + cy, t, [] - ), i || null) : null; + ), n || null) : null; } } -const nv = dt(He, { - Layer: ge(gv), - TileMatrixSet: ge(mv) -}), sv = dt( - He, +const dy = ut(Ge, { + Layer: le(Ey), + TileMatrixSet: le(wy) +}), fy = ut( + Ge, { - Style: ge(_v), - Format: ge(rt), - TileMatrixSetLink: ge(pv), - Dimension: ge(yv), - ResourceURL: ge(vv) + Style: le(Sy), + Format: le(nt), + TileMatrixSetLink: le(Ry), + Dimension: le(by), + ResourceURL: le(Ly) }, - dt(as, { - Title: O(rt), - Abstract: O(rt), - WGS84BoundingBox: O(zf), - Identifier: O(rt) + ut(Hn, { + Title: O(nt), + Abstract: O(nt), + WGS84BoundingBox: O(uf), + Identifier: O(nt) }) -), rv = dt( - He, +), gy = ut( + Ge, { - LegendURL: ge(xv) + LegendURL: le(Ty) }, - dt(as, { - Title: O(rt), - Identifier: O(rt) + ut(Hn, { + Title: O(nt), + Identifier: O(nt) }) -), ov = dt(He, { - TileMatrixSet: O(rt), - TileMatrixSetLimits: O(Mv) -}), av = dt(He, { - TileMatrixLimits: X(Ev) -}), lv = dt(He, { - TileMatrix: O(rt), - MinTileRow: O(ne), - MaxTileRow: O(ne), - MinTileCol: O(ne), - MaxTileCol: O(ne) -}), hv = dt( - He, +), my = ut(Ge, { + TileMatrixSet: O(nt), + TileMatrixSetLimits: O(Ay) +}), _y = ut(Ge, { + TileMatrixLimits: H(Py) +}), py = ut(Ge, { + TileMatrix: O(nt), + MinTileRow: O(te), + MaxTileRow: O(te), + MinTileCol: O(te), + MaxTileCol: O(te) +}), yy = ut( + Ge, { - Default: O(rt), - Value: ge(rt) + Default: O(nt), + Value: le(nt) }, - dt(as, { - Identifier: O(rt) + ut(Hn, { + Identifier: O(nt) }) -), cv = dt(as, { - LowerCorner: X(el), - UpperCorner: X(el) -}), uv = dt( - He, +), vy = ut(Hn, { + LowerCorner: H(Pa), + UpperCorner: H(Pa) +}), xy = ut( + Ge, { - WellKnownScaleSet: O(rt), - TileMatrix: ge(Cv) + WellKnownScaleSet: O(nt), + TileMatrix: le(Iy) }, - dt(as, { - SupportedCRS: O(rt), - Identifier: O(rt), - BoundingBox: O(zf) + ut(Hn, { + SupportedCRS: O(nt), + Identifier: O(nt), + BoundingBox: O(uf) }) -), dv = dt( - He, +), My = ut( + Ge, { - TopLeftCorner: O(el), - ScaleDenominator: O(jp), - TileWidth: O(ne), - TileHeight: O(ne), - MatrixWidth: O(ne), - MatrixHeight: O(ne) + TopLeftCorner: O(Pa), + ScaleDenominator: O(op), + TileWidth: O(te), + TileHeight: O(te), + MatrixWidth: O(te), + MatrixHeight: O(te) }, - dt(as, { - Identifier: O(rt) + ut(Hn, { + Identifier: O(nt) }) ); -function fv(n, t) { - return B({}, nv, n, t); +function Cy(i, t) { + return B({}, dy, i, t); } -function gv(n, t) { - return B({}, sv, n, t); +function Ey(i, t) { + return B({}, fy, i, t); } -function mv(n, t) { - return B({}, uv, n, t); +function wy(i, t) { + return B({}, xy, i, t); } -function _v(n, t) { - const e = B({}, rv, n, t); +function Sy(i, t) { + const e = B({}, gy, i, t); if (!e) return; - const i = n.getAttribute("isDefault") === "true"; - return e.isDefault = i, e; + const n = i.getAttribute("isDefault") === "true"; + return e.isDefault = n, e; } -function pv(n, t) { - return B({}, ov, n, t); +function Ry(i, t) { + return B({}, my, i, t); } -function yv(n, t) { - return B({}, hv, n, t); +function by(i, t) { + return B({}, yy, i, t); } -function vv(n, t) { - const e = n.getAttribute("format"), i = n.getAttribute("template"), s = n.getAttribute("resourceType"), r = {}; - return e && (r.format = e), i && (r.template = i), s && (r.resourceType = s), r; +function Ly(i, t) { + const e = i.getAttribute("format"), n = i.getAttribute("template"), s = i.getAttribute("resourceType"), r = {}; + return e && (r.format = e), n && (r.template = n), s && (r.resourceType = s), r; } -function zf(n, t) { +function uf(i, t) { const e = B( [], - cv, - n, + vy, + i, t ); if (e.length == 2) - return Ut(e); + return sa(e); } -function xv(n, t) { +function Ty(i, t) { const e = {}; - return e.format = n.getAttribute("format"), e.href = uh(n), e; + return e.format = i.getAttribute("format"), e.href = $l(i), e; } -function el(n, t) { - const e = rt(n).split(/\s+/); +function Pa(i, t) { + const e = nt(i).split(/\s+/); if (!e || e.length != 2) return; - const i = +e[0], s = +e[1]; - if (!(isNaN(i) || isNaN(s))) - return [i, s]; + const n = +e[0], s = +e[1]; + if (!(isNaN(n) || isNaN(s))) + return [n, s]; } -function Cv(n, t) { - return B({}, dv, n, t); +function Iy(i, t) { + return B({}, My, i, t); } -function Mv(n, t) { - return B([], av, n, t); +function Ay(i, t) { + return B([], _y, i, t); } -function Ev(n, t) { - return B({}, lv, n, t); +function Py(i, t) { + return B({}, py, i, t); } -const wv = iv; -class Sv { +const Oy = uy; +class Ny { constructor() { - const t = new wv(), e = w().getOptions(); - let i = !0; + const t = new Oy(), e = w().getOptions(); + let n = !0; const s = []; Promise.all(e.wmts.map((r) => { fetch(r.capability).then((o) => o.text()).then(function(o) { - const a = new U2({ + const a = new J2({ opacity: 1 - }), l = t.read(o), h = j2(l, { + }), l = t.read(o), h = n_(l, { layer: r.layer, matrixSet: r.projection }); - h && (a.setSource(new Y2(h)), a.setVisible(i), s.push(a), w().getMap().getLayers().insertAt(0, a), i = !1, w().getBorderConstraint() && a.setExtent(w().getBorderConstraint())); + h && (a.setSource(new i_(h)), a.setVisible(n), s.push(a), w().getMap().getLayers().insertAt(0, a), n = !1, w().getBorderConstraint() && a.setExtent(w().getBorderConstraint())); }); })), e.borderUrl !== "" && window.addEventListener("border-contraint-enabled", () => { s.forEach((r) => r.setExtent(w().getBorderConstraint())); @@ -19357,30 +17718,30 @@ class Sv { }); } } -const Rv = `:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move} -`, Tv = `#map{width:100%;height:100%}.ol-layer{background-color:#80808020} -`, Vo = `.left-buttons-control-container{display:flex;position:absolute;width:var(--icon-width);flex-direction:column;left:var(--side-distance)}.right-buttons-control-container{display:flex;position:absolute;right:var(--side-distance);width:var(--icon-width);flex-direction:column}.ol-zoom{position:relative;width:var(--icon-width)!important;top:0px;left:0px;background-color:var(--control-background-color)!important}.ol-full-screen{position:relative;width:var(--icon-width)!important;top:0px;right:0px;margin-top:var(--top-distance);background-color:var(--control-background-color)!important}.center-control,.rotation-control{margin-top:var(--top-distance)}.ol-zoom>button{margin:0}.ol-full-screen>button,.ol-full-screen-custom-small>button,.ol-full-screen-custom-medium>button,.ol-full-screen-custom-large>button{border-radius:var(--icon-border-radius);margin:0;cursor:pointer}.ol-zoom-in,.ol-zoom-out,.information-control,.center-control,.rotation-control,.ol-full-screen-true,.ol-full-screen-false{width:var(--icon-width)!important;height:var(--icon-height)!important;background-color:var(--control-background-color)!important;border-radius:var(--icon-border-radius);cursor:pointer}.ol-zoom-in:hover,.ol-zoom-out:hover,.information-control:hover,.center-control:hover,.rotation-control:hover,.ol-full-screen-true:hover,.ol-full-screen-false:hover{background-color:var(--control-background-color-hover)!important;outline:none!important}.ol-zoom-in{border-radius:0!important;border-top-right-radius:var(--icon-border-radius)!important;border-top-left-radius:var(--icon-border-radius)!important}.ol-zoom-out{border-radius:0!important;border-bottom-right-radius:var(--icon-border-radius)!important;border-bottom-left-radius:var(--icon-border-radius)!important}.ol-zoom-in>div>svg,.ol-zoom-out>div>svg,.ol-full-screen-true>div>svg,.ol-full-screen-false>div>svg{width:var(--svg-icon-size)!important;height:var(--svg-icon-size)!important}.ol-zoom-in>div>svg>g>.icon,.ol-zoom-out>div>svg>g>.icon,.ol-full-screen-true>div>svg>g>.icon,.ol-full-screen-false>div>svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}@media only screen and (min-width: 420px){.left-buttons-control-container,.right-buttons-control-container{top:var(--top-distance)}}@media only screen and (max-width: 419px){.left-buttons-control-container,.right-buttons-control-container{top:calc(calc(var(--top-distance) * 2) + var(--box-height))}} -`, dh = `.notification-element-info-light{--notification-background-color: #DBEAFE;--notification-stroke-color: #1D4ED8;--notification-text-color: #1D4ED8}.notification-element-info-dark{--notification-background-color: #2563EB;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}.notification-element-warning-light{--notification-background-color: #FEF3C7;--notification-stroke-color: #B45309;--notification-text-color: #B45309}.notification-element-warning-dark{--notification-background-color: #D97706;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}.notification-element-error-light{--notification-background-color: #FEE2E2;--notification-stroke-color: #B91C1C;--notification-text-color: #B91C1C}.notification-element-error-dark{--notification-background-color: #DC2626;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}.control-notification-manager{position:absolute;bottom:10px;left:calc((100% - 334px)/2);max-width:302px;width:100%;height:62px;display:grid}.notification-box{position:relative;grid-area:1 / 1 / 2 / 2}.notification-element{font-family:sans-serif;--icon-size: 32px;background-color:var(--notification-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);z-index:10;margin-left:5px;margin-right:5px;max-width:302px;width:100%;grid-template-columns:100%;grid-template-rows:100%}.notification-title>div>svg{display:block;width:var(--icon-size);height:var(--icon-size);padding-right:10px}.notification-icon-container{height:100%}.notification-title>div>svg>g>.icon{fill:none;stroke:var(--notification-stroke-color);stroke-width:2px;stroke-linejoin:round;stroke-linecap:round}.notification-title{display:flex}.notification-title-text{font-weight:400;font-size:12px;line-height:15px;color:var(--notification-text-color)} +const Fy = `:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move} +`, Dy = `#map{width:100%;height:100%}.ol-layer{background-color:#80808020} +`, Eo = `.left-buttons-control-container{display:flex;position:absolute;width:var(--icon-width);flex-direction:column;left:var(--side-distance)}.right-buttons-control-container{display:flex;position:absolute;right:var(--side-distance);width:var(--icon-width);flex-direction:column}.ol-zoom{position:relative;width:var(--icon-width)!important;top:0px;left:0px}.ol-full-screen{position:relative;width:var(--icon-width)!important;top:0px;right:0px;margin-top:var(--top-distance)}.center-control,.rotation-control{margin-top:var(--top-distance)}.ol-zoom>button{margin:0}.ol-full-screen>button,.ol-full-screen-custom-small>button,.ol-full-screen-custom-medium>button,.ol-full-screen-custom-large>button{border-radius:var(--icon-border-radius);margin:0;cursor:pointer}.ol-zoom-in,.ol-zoom-out,.information-control,.center-control,.rotation-control,.ol-full-screen-true,.ol-full-screen-false{width:var(--icon-width)!important;height:var(--icon-height)!important;background-color:var(--control-background-color)!important;border-radius:var(--icon-border-radius);cursor:pointer}.ol-zoom-in:hover,.ol-zoom-out:hover,.information-control:hover,.center-control:hover,.rotation-control:hover,.ol-full-screen-true:hover,.ol-full-screen-false:hover{background-color:var(--control-background-color-hover)!important;outline:none!important}.ol-zoom-in{border-radius:0!important;border-top-right-radius:var(--icon-border-radius)!important;border-top-left-radius:var(--icon-border-radius)!important}.ol-zoom-out{border-radius:0!important;border-bottom-right-radius:var(--icon-border-radius)!important;border-bottom-left-radius:var(--icon-border-radius)!important}.ol-zoom-in>div>svg,.ol-zoom-out>div>svg,.ol-full-screen-true>div>svg,.ol-full-screen-false>div>svg{width:var(--svg-icon-size)!important;height:var(--svg-icon-size)!important}.ol-zoom-in>div>svg>g>.icon,.ol-zoom-out>div>svg>g>.icon,.ol-full-screen-true>div>svg>g>.icon,.ol-full-screen-false>div>svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}@media only screen and (min-width: 420px){.left-buttons-control-container,.right-buttons-control-container{top:var(--top-distance)}}@media only screen and (max-width: 419px){.left-buttons-control-container,.right-buttons-control-container{top:calc(calc(var(--top-distance) * 2) + var(--box-height))}} +`, df = `.notification-element-info-light{--notification-background-color: #DBEAFE;--notification-stroke-color: #1D4ED8;--notification-text-color: #1D4ED8}.notification-element-info-dark{--notification-background-color: #2563EB;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}.notification-element-warning-light{--notification-background-color: #FEF3C7;--notification-stroke-color: #B45309;--notification-text-color: #B45309}.notification-element-warning-dark{--notification-background-color: #D97706;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}.notification-element-error-light{--notification-background-color: #FEE2E2;--notification-stroke-color: #B91C1C;--notification-text-color: #B91C1C}.notification-element-error-dark{--notification-background-color: #DC2626;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}@media only screen and (max-width: 995px){.notification-box{left:calc((100% - 334px)/2);max-width:302px}}@media only screen and (min-width: 996px){.notification-box{left:calc((100% - (var(--notification-width) + 30px)) / 2);width:var(--notification-width)}}.notification-box{position:absolute;bottom:10px}.notification-element{display:block;font-family:sans-serif;--icon-size: 32px;background-color:var(--notification-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);z-index:10;width:100%;grid-template-columns:100%;grid-template-rows:100%}.notification-title>div>svg{display:block;width:var(--icon-size);height:var(--icon-size);padding-right:10px}.notification-icon-container{height:100%}.notification-title>div>svg>g>.icon{fill:none;stroke:var(--notification-stroke-color);stroke-width:2px;stroke-linejoin:round;stroke-linecap:round}.notification-title{display:flex}.notification-title-text{font-weight:400;font-size:12px;line-height:15px;color:var(--notification-text-color)} `; -var bv = Object.defineProperty, Lv = Object.getOwnPropertyDescriptor, lr = (n, t, e, i) => { - for (var s = i > 1 ? void 0 : i ? Lv(t, e) : t, r = n.length - 1, o; r >= 0; r--) - (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); - return i && s && bv(t, e, s), s; +var ky = Object.defineProperty, Gy = Object.getOwnPropertyDescriptor, Ys = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? Gy(t, e) : t, r = i.length - 1, o; r >= 0; r--) + (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); + return n && s && ky(t, e, s), s; }; -let on = class extends kt { +let Wi = class extends At { constructor() { super(), this.type = "info", this.message = "", this.icon = "", this.theme = ""; } firstUpdated() { switch (this.type) { case "info": - this.icon = at.info, this.theme = `notification-element-info-${w().getTheme()}`; + this.icon = ot.info, this.theme = `notification-element-info-${w().getTheme()}`; break; case "warning": - this.icon = at.warning, this.theme = `notification-element-warning-${w().getTheme()}`; + this.icon = ot.warning, this.theme = `notification-element-warning-${w().getTheme()}`; break; case "error": - this.icon = at.error, this.theme = `notification-element-error-${w().getTheme()}`; + this.icon = ot.error, this.theme = `notification-element-error-${w().getTheme()}`; break; } } @@ -19389,7 +17750,7 @@ let on = class extends kt {
- ${Ue(this.icon)} + ${Fe(this.icon)}
${this.message}
@@ -19397,28 +17758,33 @@ let on = class extends kt { `; } }; -on.styles = [Mt(dh)]; -lr([ - cn() -], on.prototype, "type", 2); -lr([ - cn() -], on.prototype, "message", 2); -lr([ - ae() -], on.prototype, "icon", 2); -lr([ - ae() -], on.prototype, "theme", 2); -on = lr([ - oe("notification-box") -], on); -class ps extends Gt { - constructor(t, e, i) { - const s = document.createElement( +Wi.styles = [xt(df)]; +Ys([ + ji() +], Wi.prototype, "type", 2); +Ys([ + ji() +], Wi.prototype, "message", 2); +Ys([ + Yt() +], Wi.prototype, "icon", 2); +Ys([ + Yt() +], Wi.prototype, "theme", 2); +Wi = Ys([ + Xt("notification-box") +], Wi); +class is extends Dt { + constructor(t) { + const e = document.createElement( "notification-box" ); - s.type = e.type, s.message = e.message, super({ element: s }), this.ruleType = e.rule.type, this.div = s, this.div.classList.add("notification-box"), this.div.style.zIndex = `${i}`, this.setTarget(t); + e.type = t.type, e.message = t.message, super({ element: e }), this.ruleType = t.rule.type, this.div = e, this.div.classList.add("notification-box"); + const n = w().getMap().getSize(); + n && this.div.style.setProperty("--notification-width", n[0] * 0.33 + "px"), window.addEventListener("resize", () => { + const s = w().getMap().getSize(); + s && this.div.style.setProperty("--notification-width", s[0] * 0.33 + "px"); + }); } disable() { this.div.classList.add("disabled"); @@ -19430,18 +17796,18 @@ class ps extends Gt { this.div.classList.remove("fade-in"), this.div.classList.add("fade-out"); } } -let ou = /[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/, au = new RegExp("^" + ou.source + "(\\s" + ou.source + "){1,}"); -const Iv = (n) => { - let t = n.split(";"), e = t.pop(), i = (t.shift() || "").split("=").pop(), s = 0; +let Pc = /[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/, Oc = new RegExp("^" + Pc.source + "(\\s" + Pc.source + "){1,}"); +const $y = (i) => { + let t = i.split(";"), e = t.pop(), n = (t.shift() || "").split("=").pop(), s = 0; function r(p) { let v = e.substring(s).match(p); return v ? (s += v[0].length, v[0]) : null; } function o(p) { - return p && i.match(/\d+/) && (p.crs = { + return p && n.match(/\d+/) && (p.crs = { type: "name", properties: { - name: "urn:ogc:def:crs:EPSG::" + i + name: "urn:ogc:def:crs:EPSG::" + n } }), p; } @@ -19450,19 +17816,19 @@ const Iv = (n) => { } function l() { a(); - let p = 0, v = [], x = [v], C = v, E; - for (; E = r(/^(\()/) || r(/^(\))/) || r(/^(,)/) || r(au); ) { + let p = 0, v = [], x = [v], M = v, E; + for (; E = r(/^(\()/) || r(/^(\))/) || r(/^(,)/) || r(Oc); ) { if (E === "(") - x.push(C), C = [], x[x.length - 1].push(C), p++; + x.push(M), M = [], x[x.length - 1].push(M), p++; else if (E === ")") { - if (C.length === 0 || (C = x.pop(), !C)) + if (M.length === 0 || (M = x.pop(), !M)) return null; if (p--, p === 0) break; } else if (E === ",") - C = [], x[x.length - 1].push(C); + M = [], x[x.length - 1].push(M); else if (!E.split(/\s/g).some(isNaN)) - Array.prototype.push.apply(C, E.split(/\s/g).map(parseFloat)); + Array.prototype.push.apply(M, E.split(/\s/g).map(parseFloat)); else return null; a(); @@ -19471,7 +17837,7 @@ const Iv = (n) => { } function h() { let p = [], v, x; - for (; x = r(au) || r(/^(,)/); ) + for (; x = r(Oc) || r(/^(,)/); ) x === "," ? (p.push(v), v = []) : x.split(/\s/g).some(isNaN) || (v || (v = []), Array.prototype.push.apply(v, x.split(/\s/g).map(parseFloat))), a(); if (v) p.push(v); @@ -19552,59 +17918,50 @@ const Iv = (n) => { return c() || f() || g() || u() || d() || m() || _(); } return o(y()); -}, Zf = (n) => { - n.type === "Feature" && (n = n.geometry); +}, ff = (i) => { + i.type === "Feature" && (i = i.geometry); function t(a) { return a.join(" "); } function e(a) { return a.map(t).join(", "); } - function i(a) { + function n(a) { return a.map(e).map(r).join(", "); } function s(a) { - return a.map(i).map(r).join(", "); + return a.map(n).map(r).join(", "); } function r(a) { return "(" + a + ")"; } - let o = n; + let o = i; switch (o.type) { case "Point": return o.coordinates && o.coordinates.length === 3 ? "POINT Z (" + t(o.coordinates) + ")" : "POINT (" + t(o.coordinates) + ")"; case "LineString": return o.coordinates && o.coordinates[0] && o.coordinates[0].length === 3 ? "LINESTRING Z (" + e(o.coordinates) + ")" : "LINESTRING (" + e(o.coordinates) + ")"; case "Polygon": - return o.coordinates && o.coordinates[0] && o.coordinates[0][0] && o.coordinates[0][0].length === 3 ? "POLYGON Z (" + i(o.coordinates) + ")" : "POLYGON (" + i(o.coordinates) + ")"; + return o.coordinates && o.coordinates[0] && o.coordinates[0][0] && o.coordinates[0][0].length === 3 ? "POLYGON Z (" + n(o.coordinates) + ")" : "POLYGON (" + n(o.coordinates) + ")"; case "MultiPoint": return o.coordinates && o.coordinates[0] && o.coordinates[0].length === 3 ? "MULTIPOINT Z (" + e(o.coordinates) + ")" : "MULTIPOINT (" + e(o.coordinates) + ")"; case "MultiLineString": - return o.coordinates && o.coordinates[0] && o.coordinates[0][0] && o.coordinates[0][0].length === 3 ? "MULTILINESTRING Z (" + i(o.coordinates) + ")" : "MULTILINESTRING (" + i(o.coordinates) + ")"; + return o.coordinates && o.coordinates[0] && o.coordinates[0][0] && o.coordinates[0][0].length === 3 ? "MULTILINESTRING Z (" + n(o.coordinates) + ")" : "MULTILINESTRING (" + n(o.coordinates) + ")"; case "MultiPolygon": return o.coordinates && o.coordinates[0] && o.coordinates[0][0] && o.coordinates[0][0] && o.coordinates[0][0][0].length === 3 ? "MULTIPOLYGON Z (" + s(o.coordinates) + ")" : "MULTIPOLYGON (" + s(o.coordinates) + ")"; case "GeometryCollection": - return "GEOMETRYCOLLECTION (" + o.geometries.map(Zf).join(", ") + ")"; + return "GEOMETRYCOLLECTION (" + o.geometries.map(ff).join(", ") + ")"; default: throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input"); } }; -var lu = { - parse: Iv, - stringify: Zf +var Nc = { + parse: $y, + stringify: ff }; -class Vf extends Gt { - constructor() { - const t = document.createElement("div"); - t.classList.add("control-notification-manager"), super({ - element: t - }), this.div = t; - } -} -Vf.style = [Mt(dh)]; -class Pv { +class By { constructor() { - this.validZoomConstraint = !0, this.validAreaConstraint = !0, this.validMaxElementConstraint = !0, this.notificationControl = new Vf(); + this.validZoomConstraint = !0, this.validAreaConstraint = !0, this.validMaxElementConstraint = !0, this.displayMaxElementConstraint = !1; const t = w().getOptions(); switch (t.mode.type) { case "target": @@ -19616,16 +17973,23 @@ class Pv { case "create": this.setupCreateMode(); break; + case "mix": + this.setupMixMode(); + break; default: - w().getMap().addControl(new ps(this.notificationControl.div, { + w().getMap().addControl(new is({ type: "error", message: "Veuillez s\xE9lectionner un mode de fonctionnement valide.", rule: { type: "NOT_VALID_MODE" } - }, 5)); + })); } - w().getMap().addControl(this.notificationControl), this.setup(t.notifications); + this.setup(t.notifications), this.displayRightNotification(); + } + displayRightNotification() { + var t, e, n, s, r, o, a, l, h, c, u, d, f, g, m, _; + this.validZoomConstraint ? this.validAreaConstraint ? this.displayMaxElementConstraint ? ((h = this.zoomNotificationControl) == null || h.hide(), (c = this.inclusionNotificationControl) == null || c.hide(), (u = this.maxElementNotificationControl) == null || u.show(), (d = this.infosNotificationControl) == null || d.hide()) : ((f = this.zoomNotificationControl) == null || f.hide(), (g = this.inclusionNotificationControl) == null || g.hide(), (m = this.maxElementNotificationControl) == null || m.hide(), (_ = this.infosNotificationControl) == null || _.show()) : ((r = this.zoomNotificationControl) == null || r.hide(), (o = this.inclusionNotificationControl) == null || o.show(), (a = this.maxElementNotificationControl) == null || a.hide(), (l = this.infosNotificationControl) == null || l.hide()) : ((t = this.zoomNotificationControl) == null || t.show(), (e = this.inclusionNotificationControl) == null || e.hide(), (n = this.maxElementNotificationControl) == null || n.hide(), (s = this.infosNotificationControl) == null || s.hide()); } setupTargetMode() { window.addEventListener("current-center-position", (t) => { @@ -19634,82 +17998,88 @@ class Pv { type: "Point", coordinates: t.detail }; - ot.sendEvent("position-selected", [{ geometry: lu.stringify(e) }]); + st.sendEvent("position-selected", [{ geometry: Nc.stringify(e) }]); } }); } - setupSelectMode() { + iconClickedListener() { window.addEventListener("icon-clicked", (t) => { const e = w().getSelectedFeatures(); - this.validZoomConstraint && e.length > 0 && (this.checkMaxElementContraint(e), this.validMaxElementConstraint && ot.sendEvent("position-selected", this.generateExportData(e)), ot.sendEvent("authorize-clicked", t.detail)); - }), window.addEventListener("rule-validation", () => { - const t = w().getSelectedFeatures(); - this.checkMaxElementContraint(t), this.validZoomConstraint && this.validMaxElementConstraint && t.length > 0 && ot.sendEvent("position-selected", this.generateExportData(t)); + this.validZoomConstraint && e.length > 0 && (this.checkMaxElementContraint(e), this.validMaxElementConstraint && st.sendEvent("position-selected", this.generateExportData(e)), st.sendEvent("authorize-clicked", t.detail)), this.displayRightNotification(); + }); + } + setupSelectMode() { + this.iconClickedListener(), this.ruleValidationListener(); + } + iconCreatedListener() { + window.addEventListener("icon-created", (t) => { + const e = w().getSelectedFeatures(); + this.checkMaxElementContraint(e), this.validZoomConstraint && this.validMaxElementConstraint && e.length > 0 && st.sendEvent("position-selected", this.generateExportData(e)), st.sendEvent("authorize-created", t.detail), this.displayRightNotification(); + }), window.addEventListener("icon-removed", () => { + st.sendEvent("position-selected", void 0), st.sendEvent("remove-created-icon", void 0); }); } setupCreateMode() { - window.addEventListener("icon-created", () => { - const t = w().getSelectedFeatures(); - this.checkMaxElementContraint(t), this.validZoomConstraint && this.validMaxElementConstraint && t.length > 0 && ot.sendEvent("position-selected", this.generateExportData(t)), ot.sendEvent("authorize-created", void 0); - }), window.addEventListener("rule-validation", () => { + this.iconCreatedListener(), this.ruleValidationListener(); + } + ruleValidationListener() { + window.addEventListener("rule-validation", () => { const t = w().getSelectedFeatures(); - this.checkMaxElementContraint(t), this.validZoomConstraint && this.validMaxElementConstraint && t.length > 0 && ot.sendEvent("position-selected", this.generateExportData(t)); - }), window.addEventListener("icon-removed", () => { - ot.sendEvent("position-selected", void 0), ot.sendEvent("remove-created-icon", void 0); + this.checkMaxElementContraint(t), this.validZoomConstraint && this.validMaxElementConstraint && t.length > 0 ? st.sendEvent("position-selected", this.generateExportData(t)) : st.sendEvent("position-selected", void 0), this.displayRightNotification(); }); } + setupMixMode() { + this.iconClickedListener(), this.iconCreatedListener(), this.ruleValidationListener(); + } setup(t) { t.forEach((e) => { - e.rule.type === "ZOOM_CONSTRAINT" && this.setupZoomContraint(e), e.rule.type === "AREA_CONSTRAINT" && this.setupInclusionAreaConstraint(e), e.rule.type === "MAX_SELECTION" && this.setupMaxSelectionConstraint(e), e.type === "info" && (this.infosNotificationControl = new ps(this.notificationControl.div, e, 1), w().getMap().addControl(this.infosNotificationControl)); + e.rule.type === "ZOOM_CONSTRAINT" && this.setupZoomContraint(e), e.rule.type === "AREA_CONSTRAINT" && this.setupInclusionAreaConstraint(e), e.rule.type === "MAX_SELECTION" && this.setupMaxSelectionConstraint(e), e.type === "info" && (this.infosNotificationControl = new is(e), w().getMap().addControl(this.infosNotificationControl)); }); } setupZoomContraint(t) { - this.zoomNotificationControl = new ps(this.notificationControl.div, t, 4), this.zoomNotificationControl.disable(), w().getMap().addControl(this.zoomNotificationControl), this.hasValidZoom(t) && (this.validZoomConstraint = !1, this.zoomNotificationControl.show()), w().getMap().getView().on("change:resolution", () => { - this.checkZoomConstraint(t); + this.zoomNotificationControl = new is(t), this.zoomNotificationControl.disable(), w().getMap().addControl(this.zoomNotificationControl), this.hasValidZoom(t) && (this.validZoomConstraint = !1), w().getMap().getView().on("change:resolution", () => { + this.checkZoomConstraint(t), this.displayRightNotification(); }); } setupInclusionAreaConstraint(t) { - this.inclusionNotificationControl = new ps(this.notificationControl.div, t, 2), this.inclusionNotificationControl.disable(), w().getMap().addControl(this.inclusionNotificationControl), window.addEventListener("inclusion-area-included", (e) => { - this.checkInclusionAreaConstraint(e.detail, t.rule.couldBypass); + this.inclusionNotificationControl = new is(t), this.inclusionNotificationControl.disable(), w().getMap().addControl(this.inclusionNotificationControl), window.addEventListener("inclusion-area-included", (e) => { + this.checkInclusionAreaConstraint(e.detail, t.rule.couldBypass), this.displayRightNotification(); }); } setupMaxSelectionConstraint(t) { const e = t.rule.maxElement; - e !== void 0 && w().setMaxElement(e), t.message = t.message.replace("{x}", `${e}`), this.maxElementNotificationControl = new ps(this.notificationControl.div, t, 3), this.maxElementNotificationControl.disable(), w().getMap().addControl(this.maxElementNotificationControl); + e !== void 0 && w().setMaxElement(e), t.message = t.message.replace("{x}", `${e}`), this.maxElementNotificationControl = new is(t), this.maxElementNotificationControl.disable(), w().getMap().addControl(this.maxElementNotificationControl); } hasValidZoom(t) { const e = w().getMap().getView().getZoom(); return e && t.rule.minZoom && e < t.rule.minZoom; } checkZoomConstraint(t) { - var e, i; - this.hasValidZoom(t) ? ((i = this.zoomNotificationControl) == null || i.show(), this.validZoomConstraint = !1, ot.sendEvent("position-selected", void 0)) : ((e = this.zoomNotificationControl) == null || e.hide(), this.validZoomConstraint = !0, ot.sendEvent("rule-validation", void 0)); + this.hasValidZoom(t) ? (this.validZoomConstraint = !1, st.sendEvent("position-selected", void 0)) : (this.validZoomConstraint = !0, st.sendEvent("rule-validation", void 0)); } checkInclusionAreaConstraint(t, e) { - var i, s; - t ? ((i = this.inclusionNotificationControl) == null || i.hide(), this.validAreaConstraint = !0) : ((s = this.inclusionNotificationControl) == null || s.show(), e ? this.validAreaConstraint = !0 : (this.validAreaConstraint = !1, ot.sendEvent("position-selected", void 0))); + t ? this.validAreaConstraint = !0 : e ? this.validAreaConstraint = !0 : (this.validAreaConstraint = !1, st.sendEvent("position-selected", void 0)); } checkMaxElementContraint(t) { - var e, i; - w().getMaxElement() >= 0 && (t.length >= w().getMaxElement() ? t.length > w().getMaxElement() && (this.validMaxElementConstraint = !1, (e = this.maxElementNotificationControl) == null || e.show()) : (this.validMaxElementConstraint = !0, (i = this.maxElementNotificationControl) == null || i.hide())); + w().getMaxElement() >= 0 && (t.length >= w().getMaxElement() ? w().getMaxElement() === 1 && t.length === w().getMaxElement() ? (this.validMaxElementConstraint = !0, this.displayMaxElementConstraint = !1) : t.length > w().getMaxElement() && (this.validMaxElementConstraint = !1, this.displayMaxElementConstraint = !0) : (this.validMaxElementConstraint = !0, this.displayMaxElementConstraint = !1)); } generateExportData(t) { const e = []; - return t.forEach((i) => { + return t.forEach((n) => { e.push({ - id: i.get("objectid"), - geometry: lu.stringify({ + id: n.get("objectid"), + geometry: Nc.stringify({ type: "Point", - coordinates: i.get("geom").getCoordinates() + coordinates: n.get("geom").getCoordinates() }) }); }), e; } } -const Av = `:host>.no-box{--box-height: 0px;--top-distance: 10px}:host>.select{--box-height: 68px;--top-distance: 10px}:host>.large{--box-height: 79px;--top-distance: 10px}:host>.medium{--box-height: 64px;--top-distance: 10px}:host>.small{--box-height: 49px;--top-distance: 10px}:host>.light{--control-background-color: rgb(30 41 59 / 75%);--control-background-color-hover: rgb(30 41 59 / 100%);--control-icon-color: white;--information-box-background-color: white;--information-box-title-color: #1E293B;--information-cross-hover-color: rgb(30 41 59 / 75%);--information-box-text-color: #334155;--select-icon-background: #1E293B;--icon-border-color: #CBD5E1}:host>.dark{--control-background-color: rgb(255 255 255 / 75%);--control-background-color-hover: rgb(255 255 255 / 100%);--control-icon-color: #1E293B;--information-box-background-color: #1F2937;--information-box-title-color: #F3F4F6;--information-cross-hover-color: rgb(255 255 255 / 75%);--information-box-text-color: #9CA3AF;--select-icon-background: rgb(255,255,255, .75);--icon-border-color: #334155}:host>#map{--icon-width: 36px;--icon-height: 36px;--side-distance: 10px;--icon-border-radius: 4px;--box-border-radius: 4px;--svg-icon-size: 26px;--icon-stroke-width: 2px} -`, Ov = `@keyframes fadeIn{0%{opacity:0;visibility:inherit}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0;visibility:hidden}}.fade-in{animation:fadeIn .3s forwards}.fade-out{animation:fadeOut .3s forwards}.disabled{visibility:hidden} +const zy = `:host>.no-box{--box-height: 0px;--top-distance: 10px}:host>.select{--box-height: 68px;--top-distance: 10px}:host>.large{--box-height: 79px;--top-distance: 10px}:host>.medium{--box-height: 64px;--top-distance: 10px}:host>.small{--box-height: 49px;--top-distance: 10px}:host>.light{--control-background-color: rgb(30 41 59 / 75%);--control-background-color-hover: rgb(30 41 59 / 100%);--control-icon-color: white;--information-box-background-color: white;--information-box-title-color: #1E293B;--information-cross-hover-color: rgb(30 41 59 / 75%);--information-box-text-color: #334155;--select-icon-background: #1E293B;--icon-border-color: #CBD5E1}:host>.dark{--control-background-color: rgb(255 255 255 / 75%);--control-background-color-hover: rgb(255 255 255 / 100%);--control-icon-color: #1E293B;--information-box-background-color: #1F2937;--information-box-title-color: #F3F4F6;--information-cross-hover-color: rgb(255 255 255 / 75%);--information-box-text-color: #9CA3AF;--select-icon-background: rgb(255,255,255, .75);--icon-border-color: #334155}:host>#map{--icon-width: 36px;--icon-height: 36px;--side-distance: 10px;--icon-border-radius: 4px;--box-border-radius: 4px;--svg-icon-size: 26px;--icon-stroke-width: 2px} +`, Zy = `@keyframes fadeIn{0%{opacity:0;visibility:inherit}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0;visibility:hidden}}.fade-in{animation:fadeIn .3s forwards}.fade-out{animation:fadeOut .3s forwards}.disabled{visibility:hidden} `; -class Fv { +class Uy { static getOptions(t) { const e = { zoom: 15, @@ -19721,10 +18091,6 @@ class Fv { defaultCenter: [2539057, 1181111], enableGeolocation: !1, enableCenterButton: !0, - enableDraw: !0, - maxNbDraw: 0, - drawElement: "Point", - onlyOneDraw: !1, enableRotation: !0, information: { duration: 5e3, @@ -19738,9 +18104,6 @@ class Fv { distance: 40, minDistance: 30 }, - geojson: { - url: "" - }, geolocationInformation: { displayBox: !0, reverseLocation: !1, @@ -19769,40 +18132,40 @@ class Fv { }, borderUrl: "" }; - t.zoom !== void 0 && (e.zoom = t.zoom), t.minZoom !== void 0 && (e.minZoom = t.minZoom), t.maxZoom !== void 0 && (e.maxZoom = t.maxZoom), t.displayZoom !== void 0 && (e.displayZoom = t.displayZoom), t.search !== void 0 && (e.search = t.search), t.displayScaleLine !== void 0 && (e.displayScaleLine = t.displayScaleLine), t.fullscreen !== void 0 && (e.fullscreen = t.fullscreen), t.defaultCenter !== void 0 && (e.defaultCenter = t.defaultCenter), t.enableGeolocation !== void 0 && (e.enableGeolocation = t.enableGeolocation), t.enableCenterButton !== void 0 && (e.enableCenterButton = t.enableCenterButton), t.enableDraw !== void 0 && (e.enableDraw = t.enableDraw), t.maxNbDraw !== void 0 && (e.maxNbDraw = t.maxNbDraw), t.drawElement !== void 0 && (e.drawElement = t.drawElement), t.onlyOneDraw !== void 0 && (e.onlyOneDraw = t.onlyOneDraw), t.enableRotation !== void 0 && (e.enableRotation = t.enableRotation), t.information !== void 0 && (e.information = t.information), t.notifications !== void 0 && t.notifications.length > 0 && (e.notifications = t.notifications), t.mode !== void 0 && (e.mode = t.mode), t.cluster !== void 0 && (e.cluster = t.cluster), t.geojson !== void 0 && (e.geojson = t.geojson), t.geolocationInformation !== void 0 && (e.geolocationInformation = t.geolocationInformation), t.wfs !== void 0 && (e.wfs = t.wfs), t.wmts !== void 0 && (e.wmts = t.wmts), t.inclusionArea !== void 0 && (e.inclusionArea = t.inclusionArea), t.selectionTargetBoxMessage !== void 0 && (e.selectionTargetBoxMessage = t.selectionTargetBoxMessage), t.borderUrl !== void 0 && (e.borderUrl = t.borderUrl), w().setOptions(e); + t.zoom !== void 0 && (e.zoom = t.zoom), t.minZoom !== void 0 && (e.minZoom = t.minZoom), t.maxZoom !== void 0 && (e.maxZoom = t.maxZoom), t.displayZoom !== void 0 && (e.displayZoom = t.displayZoom), t.search !== void 0 && (e.search = t.search), t.displayScaleLine !== void 0 && (e.displayScaleLine = t.displayScaleLine), t.fullscreen !== void 0 && (e.fullscreen = t.fullscreen), t.defaultCenter !== void 0 && (e.defaultCenter = t.defaultCenter), t.enableGeolocation !== void 0 && (e.enableGeolocation = t.enableGeolocation), t.enableCenterButton !== void 0 && (e.enableCenterButton = t.enableCenterButton), t.enableRotation !== void 0 && (e.enableRotation = t.enableRotation), t.information !== void 0 && (e.information = t.information), t.notifications !== void 0 && t.notifications.length > 0 && (e.notifications = t.notifications), t.mode !== void 0 && (e.mode = t.mode), t.cluster !== void 0 && (e.cluster = t.cluster), t.geolocationInformation !== void 0 && (e.geolocationInformation = t.geolocationInformation), t.wfs !== void 0 && (e.wfs = t.wfs), t.wmts !== void 0 && (e.wmts = t.wmts), t.inclusionArea !== void 0 && (e.inclusionArea = t.inclusionArea), t.selectionTargetBoxMessage !== void 0 && (e.selectionTargetBoxMessage = t.selectionTargetBoxMessage), t.borderUrl !== void 0 && (e.borderUrl = t.borderUrl), w().setOptions(e); } } -class Nv { +class Vy { constructor() { - const t = $f.getSource(w().getOptions().inclusionArea.url, w().getOptions().inclusionArea.filter), e = new Ze({ + const t = hf.getSource(w().getOptions().inclusionArea.url, w().getOptions().inclusionArea.filter, !0), e = new Vs({ source: t, - style: new Zt({ - stroke: new Xt({ + style: new Vt({ + stroke: new Ee({ color: "red", width: 1 }) }) }); - w().getMap().addLayer(e), window.addEventListener("current-center-position", (i) => { + w().getMap().addLayer(e), window.addEventListener("current-center-position", (n) => { var r; const s = t.getClosestFeatureToCoordinate( - i.detail + n.detail ); if (((r = s.getGeometry()) == null ? void 0 : r.getType()) === "Polygon") { const o = s.getGeometry(); - ot.sendEvent("inclusion-area-included", o == null ? void 0 : o.intersectsCoordinate(i.detail)); + st.sendEvent("inclusion-area-included", o == null ? void 0 : o.intersectsCoordinate(n.detail)); } }); } } -const Uo = `svg{margin-left:calc((var(--icon-width) - var(--svg-icon-size)) / 2);margin-top:calc((var(--icon-height) - var(--svg-icon-size)) / 2);width:var(--svg-icon-size);height:var(--svg-icon-size)}svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round} +const wo = `svg{margin-left:calc((var(--icon-width) - var(--svg-icon-size)) / 2);margin-top:calc((var(--icon-height) - var(--svg-icon-size)) / 2);width:var(--svg-icon-size);height:var(--svg-icon-size)}svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round} `; -var Dv = Object.defineProperty, kv = Object.getOwnPropertyDescriptor, Gv = (n, t, e, i) => { - for (var s = i > 1 ? void 0 : i ? kv(t, e) : t, r = n.length - 1, o; r >= 0; r--) - (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); - return i && s && Dv(t, e, s), s; +var Wy = Object.defineProperty, Hy = Object.getOwnPropertyDescriptor, Xy = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? Hy(t, e) : t, r = i.length - 1, o; r >= 0; r--) + (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); + return n && s && Wy(t, e, s), s; }; -let il = class extends kt { +let Oa = class extends At { constructor() { super(); } @@ -19810,18 +18173,18 @@ let il = class extends kt { return Lt`
- ${Ue(at.geolocation)} + ${Fe(ot.geolocation)}
`; } }; -il.styles = [Mt(Uo), Mt(Vo)]; -il = Gv([ - oe("geolocation-control-button") -], il); -class $v extends Gt { +Oa.styles = [xt(wo), xt(Eo)]; +Oa = Xy([ + Xt("geolocation-control-button") +], Oa); +class Yy extends Dt { constructor(t) { const e = document.createElement("geolocation-control-button"); super({ @@ -19831,32 +18194,32 @@ class $v extends Gt { centerMap() { const t = w().getGeolocation(); if (t) { - const e = t.getPosition(), i = this.getMap(); - if (i) { - const s = i.getSize(), r = i.getView(); - e && s && r.centerOn(e, s, [570, 500]); + const e = t.getPosition(), n = this.getMap(); + if (n) { + const s = n.getView(); + e && s.setCenter(e); } } } } -var Bv = Object.defineProperty, zv = Object.getOwnPropertyDescriptor, Zv = (n, t, e, i) => { - for (var s = i > 1 ? void 0 : i ? zv(t, e) : t, r = n.length - 1, o; r >= 0; r--) - (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); - return i && s && Bv(t, e, s), s; +var jy = Object.defineProperty, Ky = Object.getOwnPropertyDescriptor, qy = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? Ky(t, e) : t, r = i.length - 1, o; r >= 0; r--) + (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); + return n && s && jy(t, e, s), s; }; -let nl = class extends kt { +let Na = class extends At { render() { - return Lt`
${Ue(at.rotation)}
`; + return Lt`
${Fe(ot.rotation)}
`; } }; -nl.styles = [Mt(Uo)]; -nl = Zv([ - oe("rotation-control-button") -], nl); -class hu extends Gt { +Na.styles = [xt(wo)]; +Na = qy([ + Xt("rotation-control-button") +], Na); +class Fc extends Dt { constructor(t) { - const e = document.createElement("div"), i = document.createElement("rotation-control-button"); - e.appendChild(i); + const e = document.createElement("div"), n = document.createElement("rotation-control-button"); + e.appendChild(n); const s = document.createElement("div"); s.className = "rotation-control ", s.appendChild(e), super({ element: s @@ -19866,21 +18229,21 @@ class hu extends Gt { w().getMap().getView().setRotation(0); } } -const Vv = `@media only screen and (min-width: 420px){.custom-popup-element{right:calc(.5em + 40px)}}@media only screen and (max-width: 419px){.custom-popup-element{left:calc(50% - 172px)}}.custom-popup-element{font-family:sans-serif;position:absolute;top:10px;background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);border:1px solid var(--information-box-background-color);z-index:10;margin-left:5px;margin-right:5px;max-width:302px;width:100%}.custom-popup-element:after{content:"";width:var(--progress-width);height:4px;background:#008C6F;position:absolute;bottom:-1px;left:0;border-bottom-left-radius:4px;border-bottom-right-radius:var(--border-radius-right)}.custom-popup-title{display:flex}.custom-popup-title-text{width:90%;font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color)}.custom-popup-title-svg{width:10%;justify-content:flex-end;display:flex;fill:none;stroke:var(--information-box-title-color);stroke-width:2px;stroke-linejoin:round;stroke-linecap:round;cursor:pointer}.custom-popup-title-svg:hover{stroke:var(--information-cross-hover-color)}.custom-popup-content{font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color)} +const Jy = `@media only screen and (min-width: 420px){.custom-popup-element{right:calc(.5em + 40px)}}@media only screen and (max-width: 419px){.custom-popup-element{left:calc(50% - 172px)}}.custom-popup-element{font-family:sans-serif;position:absolute;top:10px;background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);border:1px solid var(--information-box-background-color);z-index:10;margin-left:5px;margin-right:5px;max-width:302px;width:100%}.custom-popup-element:after{content:"";width:var(--progress-width);height:4px;background:#008C6F;position:absolute;bottom:-1px;left:0;border-bottom-left-radius:4px;border-bottom-right-radius:var(--border-radius-right)}.custom-popup-title{display:flex}.custom-popup-title-text{width:90%;font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color)}.custom-popup-title-svg{width:10%;justify-content:flex-end;display:flex;fill:none;stroke:var(--information-box-title-color);stroke-width:2px;stroke-linejoin:round;stroke-linecap:round;cursor:pointer}.custom-popup-title-svg:hover{stroke:var(--information-cross-hover-color)}.custom-popup-content{font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color)} `; -var Uv = Object.defineProperty, Wv = Object.getOwnPropertyDescriptor, fh = (n, t, e, i) => { - for (var s = i > 1 ? void 0 : i ? Wv(t, e) : t, r = n.length - 1, o; r >= 0; r--) - (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); - return i && s && Uv(t, e, s), s; +var Qy = Object.defineProperty, tv = Object.getOwnPropertyDescriptor, Bl = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? tv(t, e) : t, r = i.length - 1, o; r >= 0; r--) + (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); + return n && s && Qy(t, e, s), s; }; -let Ws = class extends kt { +let Is = class extends At { constructor() { super(), this._width = 100, this._borderRadiusRight = 0, window.addEventListener("clear-information-box-interval", this.clear.bind(this), !0), window.addEventListener("open-information-box", () => { this._width = 100; - const n = w().getOptions().information.duration / 100; + const i = w().getOptions().information.duration / 100; this.interval = setInterval(() => { this._width > 0 ? (this._width < 100 && (this._borderRadiusRight = 0), this._width--) : this.closeBox(); - }, n); + }, i); }); } render() { @@ -19901,20 +18264,20 @@ let Ws = class extends kt { clearInterval(this.interval); } closeBox() { - clearInterval(this.interval), ot.sendEvent("close-information-box", {}); + clearInterval(this.interval), st.sendEvent("close-information-box", {}); } }; -Ws.styles = [Mt(Vv)]; -fh([ - ae() -], Ws.prototype, "_width", 2); -fh([ - ae() -], Ws.prototype, "_borderRadiusRight", 2); -Ws = fh([ - oe("information-box") -], Ws); -class Hv extends Gt { +Is.styles = [xt(Jy)]; +Bl([ + Yt() +], Is.prototype, "_width", 2); +Bl([ + Yt() +], Is.prototype, "_borderRadiusRight", 2); +Is = Bl([ + Xt("information-box") +], Is); +class ev extends Dt { constructor() { const t = document.createElement("information-box"); super({ element: t }), this.div = t; @@ -19926,12 +18289,12 @@ class Hv extends Gt { this.div.classList.remove("fade-in"), this.div.classList.add("fade-out"); } } -var Xv = Object.defineProperty, Yv = Object.getOwnPropertyDescriptor, jv = (n, t, e, i) => { - for (var s = i > 1 ? void 0 : i ? Yv(t, e) : t, r = n.length - 1, o; r >= 0; r--) - (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); - return i && s && Xv(t, e, s), s; +var iv = Object.defineProperty, nv = Object.getOwnPropertyDescriptor, sv = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? nv(t, e) : t, r = i.length - 1, o; r >= 0; r--) + (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); + return n && s && iv(t, e, s), s; }; -let sl = class extends kt { +let Fa = class extends At { constructor() { super(); } @@ -19939,29 +18302,29 @@ let sl = class extends kt { return Lt`
- ${Ue(at.information)} + ${Fe(ot.information)}
`; } }; -sl.styles = [Mt(Uo), Mt(Vo)]; -sl = jv([ - oe("information-control-button") -], sl); -class qv extends Gt { +Fa.styles = [xt(wo), xt(Eo)]; +Fa = sv([ + Xt("information-control-button") +], Fa); +class rv extends Dt { constructor(t) { const e = document.createElement("information-control-button"); super({ element: e - }), this.informationIsOpen = !0, e.addEventListener("click", this.toogleInformationBox.bind(this), !1), window.addEventListener("close-information-box", this.closeInformationBox.bind(this), !1), this.control = new Hv(), w().getMap().addControl(this.control), this.openInformationBox(), this.setTarget(t); + }), this.informationIsOpen = !0, e.addEventListener("click", this.toogleInformationBox.bind(this), !1), window.addEventListener("close-information-box", this.closeInformationBox.bind(this), !1), this.control = new ev(), w().getMap().addControl(this.control), this.openInformationBox(), this.setTarget(t); } closeInformationBox() { - ot.sendEvent("clear-information-box-interval", {}), this.control.hide(), this.informationIsOpen = !1; + st.sendEvent("clear-information-box-interval", {}), this.control.hide(), this.informationIsOpen = !1; } openInformationBox() { - this.control.show(), ot.sendEvent("open-information-box", {}), this.informationIsOpen = !0; + this.control.show(), st.sendEvent("open-information-box", {}), this.informationIsOpen = !0; } toogleInformationBox() { this.informationIsOpen ? this.closeInformationBox() : this.openInformationBox(); @@ -19972,77 +18335,77 @@ class qv extends Gt { * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Kv = nh(class extends sh { - constructor(n) { +const ov = Al(class extends Pl { + constructor(i) { var t; - if (super(n), n.type !== Sf.ATTRIBUTE || n.name !== "class" || ((t = n.strings) === null || t === void 0 ? void 0 : t.length) > 2) + if (super(i), i.type !== $d.ATTRIBUTE || i.name !== "class" || ((t = i.strings) === null || t === void 0 ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute."); } - render(n) { - return " " + Object.keys(n).filter((t) => n[t]).join(" ") + " "; + render(i) { + return " " + Object.keys(i).filter((t) => i[t]).join(" ") + " "; } - update(n, [t]) { - var e, i; + update(i, [t]) { + var e, n; if (this.nt === void 0) { - this.nt = /* @__PURE__ */ new Set(), n.strings !== void 0 && (this.st = new Set(n.strings.join(" ").split(/\s/).filter((r) => r !== ""))); + this.nt = /* @__PURE__ */ new Set(), i.strings !== void 0 && (this.st = new Set(i.strings.join(" ").split(/\s/).filter((r) => r !== ""))); for (const r in t) t[r] && !(!((e = this.st) === null || e === void 0) && e.has(r)) && this.nt.add(r); return this.render(t); } - const s = n.element.classList; + const s = i.element.classList; this.nt.forEach((r) => { r in t || (s.remove(r), this.nt.delete(r)); }); for (const r in t) { const o = !!t[r]; - o === this.nt.has(r) || ((i = this.st) === null || i === void 0 ? void 0 : i.has(r)) || (o ? (s.add(r), this.nt.add(r)) : (s.remove(r), this.nt.delete(r))); + o === this.nt.has(r) || ((n = this.st) === null || n === void 0 ? void 0 : n.has(r)) || (o ? (s.add(r), this.nt.add(r)) : (s.remove(r), this.nt.delete(r))); } - return bi; + return yi; } -}), Uf = `.layer-container{left:calc(50% - 151px);position:absolute;max-width:302px;width:100%;top:var(--top-distance);z-index:0}.layer-title-container{border-radius:var(--icon-border-radius);border:1px solid var(--icon-border-color);display:flex;background-color:var(--information-box-background-color)}.layer-text{width:calc(100% - 13px);height:36px;padding:0 0 0 11px;font-size:14px;line-height:17px;font-weight:400;background-color:var(--information-box-background-color);color:var(--information-box-text-color);margin:0;align-items:center;display:flex}.layer-svg-container{width:29px;height:36px;margin-right:11px;display:flex;align-items:center}ul{margin-top:0;list-style-type:none;background-color:var(--information-box-background-color);padding-left:0;border-radius:var(--icon-border-radius)}li{height:64px;border-bottom:1px solid var(--icon-border-color);padding-left:11px;font-size:12px;display:flex;align-items:center;justify-content:start;color:var(--information-box-text-color)}li>.image-container{width:56px;display:flex;align-items:center;justify-content:center;height:inherit}li>.image-container>img{width:46px;height:46px;border-radius:var(--icon-border-radius);border:1px solid var(--icon-border-color)}.selected-layer{border:2px solid #DC2626!important;border-radius:var(--icon-border-radius)}ul>:last-child{border-bottom-right-radius:var(--icon-border-radius);border-bottom-left-radius:var(--icon-border-radius)}li:hover,li:focus{background-color:var(--icon-border-color)}svg{width:var(--svg-icon-size);height:var(--svg-icon-size);stroke:var(--information-box-title-color)}svg:hover{stroke:var(--information-cross-hover-color)}svg>g>.icon{fill:none;stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}.cross-div{width:var(--svg-icon-size);height:var(--svg-icon-size);cursor:pointer} +}), gf = `@media only screen and (min-width: 420px){.layer-container{right:calc(.5em + 40px)}}@media only screen and (max-width: 419px){.layer-container{left:calc(50% - 151px)}}.layer-container{position:absolute;max-width:302px;width:100%;top:var(--top-distance);z-index:0;font-family:sans-serif}.layer-title-container{border-top-left-radius:var(--icon-border-radius);border-top-right-radius:var(--icon-border-radius);border-bottom:1px solid var(--icon-border-color);display:flex;background-color:var(--information-box-background-color)}.layer-text{width:calc(100% - 13px);height:36px;padding:0 0 0 11px;font-size:14px;line-height:17px;font-weight:400;background-color:var(--information-box-background-color);color:var(--information-box-text-color);margin:0;align-items:center;display:flex}.layer-svg-container{width:29px;height:36px;margin-right:11px;display:flex;align-items:center}ul{margin-top:0;list-style-type:none;background-color:var(--information-box-background-color);padding-left:0;border-bottom-left-radius:var(--icon-border-radius);border-bottom-right-radius:var(--icon-border-radius)}li{height:64px;border-bottom:1px solid var(--icon-border-color);padding-left:11px;font-size:12px;display:flex;align-items:center;justify-content:start;color:var(--information-box-text-color)}li>.image-container{width:56px;display:flex;align-items:center;justify-content:center;height:inherit;padding-right:9px}li>.image-container>img{width:46px;height:46px;border-radius:var(--icon-border-radius);border:1px solid var(--icon-border-color)}.selected-layer{border:2px solid #dc2626!important;border-radius:var(--icon-border-radius)}ul>:last-child{border-bottom-right-radius:var(--icon-border-radius);border-bottom-left-radius:var(--icon-border-radius)}li:hover,li:focus{background-color:var(--icon-border-color)}svg{width:var(--svg-icon-size);height:var(--svg-icon-size);stroke:var(--information-box-title-color)}svg:hover{stroke:var(--information-cross-hover-color)}svg>g>.icon{fill:none;stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}.cross-div{width:var(--svg-icon-size);height:var(--svg-icon-size);cursor:pointer} `; -var Jv = Object.defineProperty, Qv = Object.getOwnPropertyDescriptor, gh = (n, t, e, i) => { - for (var s = i > 1 ? void 0 : i ? Qv(t, e) : t, r = n.length - 1, o; r >= 0; r--) - (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); - return i && s && Jv(t, e, s), s; +var av = Object.defineProperty, lv = Object.getOwnPropertyDescriptor, zl = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? lv(t, e) : t, r = i.length - 1, o; r >= 0; r--) + (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); + return n && s && av(t, e, s), s; }; -let vo = class extends kt { +let Kr = class extends At { constructor() { super(...arguments), this._currentSelectedIndex = 0; } - selectLayer(n, t) { - ot.sendEvent("layer-selected", n), this._currentSelectedIndex = t; + selectLayer(i, t) { + st.sendEvent("layer-selected", i), this._currentSelectedIndex = t; } render() { return Lt`
    ${w().getOptions().wmts.map( - (n, t) => Lt`
  • this.selectLayer(n, t)}> + (i, t) => Lt`
  • this.selectLayer(i, t)}>
    - +
    -

    ${n.name}

    +

    ${i.name}

  • ` )}
`; } }; -vo.styles = [Mt(Uf)]; -gh([ - ae() -], vo.prototype, "_currentSelectedIndex", 2); -vo = gh([ - oe("layer-list") -], vo); -let rl = class extends kt { +Kr.styles = [xt(gf)]; +zl([ + Yt() +], Kr.prototype, "_currentSelectedIndex", 2); +Kr = zl([ + Xt("layer-list") +], Kr); +let Da = class extends At { render() { return Lt`

Affichage de la carte

- ${Ue(at.cross)} + ${Fe(ot.cross)}
@@ -20050,14 +18413,14 @@ let rl = class extends kt {
`; } closeBox() { - ot.sendEvent("layer-selection-closed", void 0); + st.sendEvent("layer-selection-closed", void 0); } }; -rl.styles = [Mt(Uf)]; -rl = gh([ - oe("layer-selection") -], rl); -class tx extends Gt { +Da.styles = [xt(gf)]; +Da = zl([ + Xt("layer-selection") +], Da); +class hv extends Dt { constructor() { const t = document.createElement("layer-selection"); super({ element: t }); @@ -20072,34 +18435,34 @@ class tx extends Gt { this.element.classList.remove("fade-in"), this.element.classList.add("fade-out"); } } -var ex = Object.defineProperty, ix = Object.getOwnPropertyDescriptor, nx = (n, t, e, i) => { - for (var s = i > 1 ? void 0 : i ? ix(t, e) : t, r = n.length - 1, o; r >= 0; r--) - (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); - return i && s && ex(t, e, s), s; +var cv = Object.defineProperty, uv = Object.getOwnPropertyDescriptor, dv = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? uv(t, e) : t, r = i.length - 1, o; r >= 0; r--) + (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); + return n && s && cv(t, e, s), s; }; -let ol = class extends kt { +let ka = class extends At { render() { return Lt`
- ${Ue(at.stack)} + ${Fe(ot.stack)}
`; } }; -ol.styles = [Mt(Uo), Mt(Vo)]; -ol = nx([ - oe("geo-layer-control-button") -], ol); -class sx extends Gt { +ka.styles = [xt(wo), xt(Eo)]; +ka = dv([ + Xt("geo-layer-control-button") +], ka); +class fv extends Dt { constructor(t) { const e = document.createElement( "geo-layer-control-button" ); super({ element: e - }), this.isOpen = !1, this.layerSelection = new tx(), this.layerSelection.disable(), w().getMap().addControl(this.layerSelection), e.addEventListener("click", () => { + }), this.isOpen = !1, this.layerSelection = new hv(), this.layerSelection.disable(), w().getMap().addControl(this.layerSelection), e.addEventListener("click", () => { this.toogleSelection(); }), window.addEventListener("layer-selection-closed", () => this.close()), this.setTarget(t); } @@ -20110,7 +18473,7 @@ class sx extends Gt { this.isOpen = !1, this.layerSelection.hide(); } } -class cu extends Gt { +class Dc extends Dt { constructor(t) { const e = document.createElement("div"); e.className = t, super({ @@ -20118,45 +18481,45 @@ class cu extends Gt { }), this.div = e; } } -class rx { +class gv { static setupIcon() { - const t = w().getOptions(), e = w().getMap(), i = new cu("left-buttons-control-container"); - e.addControl(i); - const s = new cu("right-buttons-control-container"); - e.addControl(s), e.addControl(new qv(s.div)), t.fullscreen && e.addControl( - new q_({ - label: at.fullScreenLabel(), - labelActive: at.fullScreenLabelActive(), + const t = w().getOptions(), e = w().getMap(), n = new Dc("left-buttons-control-container"); + e.addControl(n); + const s = new Dc("right-buttons-control-container"); + e.addControl(s), e.addControl(new rv(s.div)), t.fullscreen && e.addControl( + new y2({ + label: ot.fullScreenLabel(), + labelActive: ot.fullScreenLabelActive(), className: "ol-full-screen", target: s.div }) - ), e.addControl(new sx(s.div)), t.displayZoom && e.addControl( - new Pd({ - zoomInLabel: at.zoomInLabel(), - zoomOutLabel: at.zoomOutLabel(), + ), e.addControl(new fv(s.div)), t.displayZoom && e.addControl( + new od({ + zoomInLabel: ot.zoomInLabel(), + zoomOutLabel: ot.zoomOutLabel(), className: "ol-zoom", - target: i.div + target: n.div }) - ), t.enableCenterButton && e.addControl(new $v(i.div)), t.enableRotation && e.getView().on("change:rotation", (r) => { + ), t.enableCenterButton && e.addControl(new Yy(n.div)), t.enableRotation && e.getView().on("change:rotation", (r) => { e.getControls().forEach((o) => { - o instanceof hu && e.removeControl(o); - }), r.target.getRotation() !== 0 && e.addControl(new hu(i.div)); + o instanceof Fc && e.removeControl(o); + }), r.target.getRotation() !== 0 && e.addControl(new Fc(n.div)); }); } } -var ox = Object.defineProperty, ax = Object.getOwnPropertyDescriptor, lx = (n, t, e, i) => { - for (var s = i > 1 ? void 0 : i ? ax(t, e) : t, r = n.length - 1, o; r >= 0; r--) - (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); - return i && s && ox(t, e, s), s; +var mv = Object.defineProperty, _v = Object.getOwnPropertyDescriptor, pv = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? _v(t, e) : t, r = i.length - 1, o; r >= 0; r--) + (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); + return n && s && mv(t, e, s), s; }; -class hx { +class yv { constructor() { w().getMap().getView().on("change:center", (t) => { - ot.sendEvent("current-center-position", t.target.getCenter()); + st.sendEvent("current-center-position", t.target.getCenter()); }); } } -let uu = class extends kt { +let kc = class extends At { constructor() { super(); } @@ -20190,35 +18553,35 @@ let uu = class extends kt { `; } }; -uu = lx([ - oe("target-element") -], uu); -class cx extends Gt { +kc = pv([ + Xt("target-element") +], kc); +class vv extends Dt { constructor() { const t = document.createElement("target-element"); - super({ element: t }), new hx(); + super({ element: t }), new yv(); } } -const ux = `.box-element{left:calc(50% - 172px);font-family:sans-serif}.box-element{position:absolute;top:10px;background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);border:1px solid var(--information-box-background-color);margin-left:5px;margin-right:5px;max-width:302px;width:100%}.box-element-title{display:flex}.box-element-title-text{width:90%;font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color)}.box-element-content{font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color)} +const xv = `.box-element{left:calc(50% - 172px);font-family:sans-serif}.box-element{position:absolute;top:10px;background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);border:1px solid var(--information-box-background-color);margin-left:5px;margin-right:5px;max-width:302px;width:100%}.box-element-title{display:flex}.box-element-title-text{width:90%;font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color)}.box-element-content{font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color)} `; -var dx = Object.defineProperty, fx = Object.getOwnPropertyDescriptor, hr = (n, t, e, i) => { - for (var s = i > 1 ? void 0 : i ? fx(t, e) : t, r = n.length - 1, o; r >= 0; r--) - (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); - return i && s && dx(t, e, s), s; +var Mv = Object.defineProperty, Cv = Object.getOwnPropertyDescriptor, js = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? Cv(t, e) : t, r = i.length - 1, o; r >= 0; r--) + (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); + return n && s && Mv(t, e, s), s; }; -let an = class extends kt { +let Hi = class extends At { constructor() { super(), this.defaultPosition = [0, 0], this._currentPosition = "", this._reversePosition = "", this._lastPosition = this.defaultPosition; - const n = 20; + const i = 20; window.addEventListener("current-center-position", (t) => { - w().getOptions().geolocationInformation.reverseLocation ? (Math.abs(this._lastPosition[0] - t.detail[0]) > n || Math.abs(this._lastPosition[1] - t.detail[1]) > n) && (this._lastPosition = t.detail, this.searchAddress(t.detail)) : this._reversePosition = "", this._currentPosition = w().getOptions().geolocationInformation.currentLocation ? `${t.detail[0].toFixed(6)}, ${t.detail[1].toFixed(6)}` : ""; + w().getOptions().geolocationInformation.reverseLocation ? (Math.abs(this._lastPosition[0] - t.detail[0]) > i || Math.abs(this._lastPosition[1] - t.detail[1]) > i) && (this._lastPosition = t.detail, this.searchAddress(t.detail)) : this._reversePosition = "", this._currentPosition = w().getOptions().geolocationInformation.currentLocation ? `${t.detail[0].toFixed(6)}, ${t.detail[1].toFixed(6)}` : ""; }); } connectedCallback() { super.connectedCallback(); } - searchAddress(n) { - Tf.getAddressFromCoordinate(n).then((t) => { + searchAddress(i) { + Kd.getAddressFromCoordinate(i).then((t) => { this._reversePosition = t.results.length > 0 ? `proche de ${t.results[0].attributes.strname_deinr}` : "Aucune adresse proche reconnue"; }); } @@ -20237,100 +18600,100 @@ let an = class extends kt { `; } }; -an.styles = [Mt(ux)]; -hr([ - cn() -], an.prototype, "defaultPosition", 2); -hr([ - ae() -], an.prototype, "_currentPosition", 2); -hr([ - ae() -], an.prototype, "_reversePosition", 2); -hr([ - ae() -], an.prototype, "_lastPosition", 2); -an = hr([ - oe("target-information-box-element") -], an); -class gx extends Gt { +Hi.styles = [xt(xv)]; +js([ + ji() +], Hi.prototype, "defaultPosition", 2); +js([ + Yt() +], Hi.prototype, "_currentPosition", 2); +js([ + Yt() +], Hi.prototype, "_reversePosition", 2); +js([ + Yt() +], Hi.prototype, "_lastPosition", 2); +Hi = js([ + Xt("target-information-box-element") +], Hi); +class Ev extends Dt { constructor() { const t = document.createElement("target-information-box-element"); t.defaultPosition = w().getOptions().defaultCenter, super({ element: t }); } } -function mx(n) { - n("EPSG:4326", "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"), n("EPSG:4269", "+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"), n("EPSG:3857", "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"), n.WGS84 = n["EPSG:4326"], n["EPSG:3785"] = n["EPSG:3857"], n.GOOGLE = n["EPSG:3857"], n["EPSG:900913"] = n["EPSG:3857"], n["EPSG:102113"] = n["EPSG:3857"]; -} -var ln = 1, hn = 2, Hr = 3, _x = 4, al = 5, du = 6378137, px = 6356752314e-3, fu = 0.0066943799901413165, Is = 484813681109536e-20, S = Math.PI / 2, yx = 0.16666666666666666, vx = 0.04722222222222222, xx = 0.022156084656084655, I = 1e-10, zt = 0.017453292519943295, Ge = 57.29577951308232, ct = Math.PI / 4, Hs = Math.PI * 2, Tt = 3.14159265359, he = {}; -he.greenwich = 0; -he.lisbon = -9.131906111111; -he.paris = 2.337229166667; -he.bogota = -74.080916666667; -he.madrid = -3.687938888889; -he.rome = 12.452333333333; -he.bern = 7.439583333333; -he.jakarta = 106.807719444444; -he.ferro = -17.666666666667; -he.brussels = 4.367975; -he.stockholm = 18.058277777778; -he.athens = 23.7163375; -he.oslo = 10.722916666667; -const Cx = { +function wv(i) { + i("EPSG:4326", "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"), i("EPSG:4269", "+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"), i("EPSG:3857", "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"), i.WGS84 = i["EPSG:4326"], i["EPSG:3785"] = i["EPSG:3857"], i.GOOGLE = i["EPSG:3857"], i["EPSG:900913"] = i["EPSG:3857"], i["EPSG:102113"] = i["EPSG:3857"]; +} +var Xi = 1, Yi = 2, br = 3, Sv = 4, Ga = 5, Gc = 6378137, Rv = 6356752314e-3, $c = 0.0066943799901413165, fs = 484813681109536e-20, S = Math.PI / 2, bv = 0.16666666666666666, Lv = 0.04722222222222222, Tv = 0.022156084656084655, I = 1e-10, $t = 0.017453292519943295, Ae = 57.29577951308232, ht = Math.PI / 4, As = Math.PI * 2, Rt = 3.14159265359, ne = {}; +ne.greenwich = 0; +ne.lisbon = -9.131906111111; +ne.paris = 2.337229166667; +ne.bogota = -74.080916666667; +ne.madrid = -3.687938888889; +ne.rome = 12.452333333333; +ne.bern = 7.439583333333; +ne.jakarta = 106.807719444444; +ne.ferro = -17.666666666667; +ne.brussels = 4.367975; +ne.stockholm = 18.058277777778; +ne.athens = 23.7163375; +ne.oslo = 10.722916666667; +const Iv = { ft: { to_meter: 0.3048 }, "us-ft": { to_meter: 1200 / 3937 } }; -var gu = /[\s_\-\/\(\)]/g; -function Oi(n, t) { - if (n[t]) - return n[t]; - for (var e = Object.keys(n), i = t.toLowerCase().replace(gu, ""), s = -1, r, o; ++s < e.length; ) - if (r = e[s], o = r.toLowerCase().replace(gu, ""), o === i) - return n[r]; -} -function ll(n) { - var t = {}, e = n.split("+").map(function(a) { +var Bc = /[\s_\-\/\(\)]/g; +function Ei(i, t) { + if (i[t]) + return i[t]; + for (var e = Object.keys(i), n = t.toLowerCase().replace(Bc, ""), s = -1, r, o; ++s < e.length; ) + if (r = e[s], o = r.toLowerCase().replace(Bc, ""), o === n) + return i[r]; +} +function $a(i) { + var t = {}, e = i.split("+").map(function(a) { return a.trim(); }).filter(function(a) { return a; }).reduce(function(a, l) { var h = l.split("="); return h.push(!0), a[h[0].toLowerCase()] = h[1], a; - }, {}), i, s, r, o = { + }, {}), n, s, r, o = { proj: "projName", datum: "datumCode", rf: function(a) { t.rf = parseFloat(a); }, lat_0: function(a) { - t.lat0 = a * zt; + t.lat0 = a * $t; }, lat_1: function(a) { - t.lat1 = a * zt; + t.lat1 = a * $t; }, lat_2: function(a) { - t.lat2 = a * zt; + t.lat2 = a * $t; }, lat_ts: function(a) { - t.lat_ts = a * zt; + t.lat_ts = a * $t; }, lon_0: function(a) { - t.long0 = a * zt; + t.long0 = a * $t; }, lon_1: function(a) { - t.long1 = a * zt; + t.long1 = a * $t; }, lon_2: function(a) { - t.long2 = a * zt; + t.long2 = a * $t; }, alpha: function(a) { - t.alpha = parseFloat(a) * zt; + t.alpha = parseFloat(a) * $t; }, gamma: function(a) { t.rectified_grid_angle = parseFloat(a); }, lonc: function(a) { - t.longc = a * zt; + t.longc = a * $t; }, x_0: function(a) { t.x0 = parseFloat(a); @@ -20369,15 +18732,15 @@ function ll(n) { }, units: function(a) { t.units = a; - var l = Oi(Cx, a); + var l = Ei(Iv, a); l && (t.to_meter = l.to_meter); }, from_greenwich: function(a) { - t.from_greenwich = a * zt; + t.from_greenwich = a * $t; }, pm: function(a) { - var l = Oi(he, a); - t.from_greenwich = (l || parseFloat(a)) * zt; + var l = Ei(ne, a); + t.from_greenwich = (l || parseFloat(a)) * $t; }, nadgrids: function(a) { a === "@null" ? t.datumCode = "none" : t.nadgrids = a; @@ -20390,175 +18753,175 @@ function ll(n) { t.approx = !0; } }; - for (i in e) - s = e[i], i in o ? (r = o[i], typeof r == "function" ? r(s) : t[r] = s) : t[i] = s; + for (n in e) + s = e[n], n in o ? (r = o[n], typeof r == "function" ? r(s) : t[r] = s) : t[n] = s; return typeof t.datumCode == "string" && t.datumCode !== "WGS84" && (t.datumCode = t.datumCode.toLowerCase()), t; } -var Xs = 1, Wf = 2, Hf = 3, xo = 4, Xf = 5, mh = -1, Mx = /\s/, Ex = /[A-Za-z]/, wx = /[A-Za-z84_]/, Wo = /[,\]]/, Yf = /[\d\.E\-\+]/; -function ci(n) { - if (typeof n != "string") +var Ps = 1, mf = 2, _f = 3, qr = 4, pf = 5, Zl = -1, Av = /\s/, Pv = /[A-Za-z]/, Ov = /[A-Za-z84_]/, So = /[,\]]/, yf = /[\d\.E\-\+]/; +function ei(i) { + if (typeof i != "string") throw new Error("not a string"); - this.text = n.trim(), this.level = 0, this.place = 0, this.root = null, this.stack = [], this.currentObject = null, this.state = Xs; + this.text = i.trim(), this.level = 0, this.place = 0, this.root = null, this.stack = [], this.currentObject = null, this.state = Ps; } -ci.prototype.readCharicter = function() { - var n = this.text[this.place++]; - if (this.state !== xo) - for (; Mx.test(n); ) { +ei.prototype.readCharicter = function() { + var i = this.text[this.place++]; + if (this.state !== qr) + for (; Av.test(i); ) { if (this.place >= this.text.length) return; - n = this.text[this.place++]; + i = this.text[this.place++]; } switch (this.state) { - case Xs: - return this.neutral(n); - case Wf: - return this.keyword(n); - case xo: - return this.quoted(n); - case Xf: - return this.afterquote(n); - case Hf: - return this.number(n); - case mh: + case Ps: + return this.neutral(i); + case mf: + return this.keyword(i); + case qr: + return this.quoted(i); + case pf: + return this.afterquote(i); + case _f: + return this.number(i); + case Zl: return; } }; -ci.prototype.afterquote = function(n) { - if (n === '"') { - this.word += '"', this.state = xo; +ei.prototype.afterquote = function(i) { + if (i === '"') { + this.word += '"', this.state = qr; return; } - if (Wo.test(n)) { - this.word = this.word.trim(), this.afterItem(n); + if (So.test(i)) { + this.word = this.word.trim(), this.afterItem(i); return; } - throw new Error(`havn't handled "` + n + '" in afterquote yet, index ' + this.place); + throw new Error(`havn't handled "` + i + '" in afterquote yet, index ' + this.place); }; -ci.prototype.afterItem = function(n) { - if (n === ",") { - this.word !== null && this.currentObject.push(this.word), this.word = null, this.state = Xs; +ei.prototype.afterItem = function(i) { + if (i === ",") { + this.word !== null && this.currentObject.push(this.word), this.word = null, this.state = Ps; return; } - if (n === "]") { - this.level--, this.word !== null && (this.currentObject.push(this.word), this.word = null), this.state = Xs, this.currentObject = this.stack.pop(), this.currentObject || (this.state = mh); + if (i === "]") { + this.level--, this.word !== null && (this.currentObject.push(this.word), this.word = null), this.state = Ps, this.currentObject = this.stack.pop(), this.currentObject || (this.state = Zl); return; } }; -ci.prototype.number = function(n) { - if (Yf.test(n)) { - this.word += n; +ei.prototype.number = function(i) { + if (yf.test(i)) { + this.word += i; return; } - if (Wo.test(n)) { - this.word = parseFloat(this.word), this.afterItem(n); + if (So.test(i)) { + this.word = parseFloat(this.word), this.afterItem(i); return; } - throw new Error(`havn't handled "` + n + '" in number yet, index ' + this.place); + throw new Error(`havn't handled "` + i + '" in number yet, index ' + this.place); }; -ci.prototype.quoted = function(n) { - if (n === '"') { - this.state = Xf; +ei.prototype.quoted = function(i) { + if (i === '"') { + this.state = pf; return; } - this.word += n; + this.word += i; }; -ci.prototype.keyword = function(n) { - if (wx.test(n)) { - this.word += n; +ei.prototype.keyword = function(i) { + if (Ov.test(i)) { + this.word += i; return; } - if (n === "[") { + if (i === "[") { var t = []; - t.push(this.word), this.level++, this.root === null ? this.root = t : this.currentObject.push(t), this.stack.push(this.currentObject), this.currentObject = t, this.state = Xs; + t.push(this.word), this.level++, this.root === null ? this.root = t : this.currentObject.push(t), this.stack.push(this.currentObject), this.currentObject = t, this.state = Ps; return; } - if (Wo.test(n)) { - this.afterItem(n); + if (So.test(i)) { + this.afterItem(i); return; } - throw new Error(`havn't handled "` + n + '" in keyword yet, index ' + this.place); + throw new Error(`havn't handled "` + i + '" in keyword yet, index ' + this.place); }; -ci.prototype.neutral = function(n) { - if (Ex.test(n)) { - this.word = n, this.state = Wf; +ei.prototype.neutral = function(i) { + if (Pv.test(i)) { + this.word = i, this.state = mf; return; } - if (n === '"') { - this.word = "", this.state = xo; + if (i === '"') { + this.word = "", this.state = qr; return; } - if (Yf.test(n)) { - this.word = n, this.state = Hf; + if (yf.test(i)) { + this.word = i, this.state = _f; return; } - if (Wo.test(n)) { - this.afterItem(n); + if (So.test(i)) { + this.afterItem(i); return; } - throw new Error(`havn't handled "` + n + '" in neutral yet, index ' + this.place); + throw new Error(`havn't handled "` + i + '" in neutral yet, index ' + this.place); }; -ci.prototype.output = function() { +ei.prototype.output = function() { for (; this.place < this.text.length; ) this.readCharicter(); - if (this.state === mh) + if (this.state === Zl) return this.root; throw new Error('unable to parse string "' + this.text + '". State is ' + this.state); }; -function Sx(n) { - var t = new ci(n); +function Nv(i) { + var t = new ei(i); return t.output(); } -function mu(n, t, e) { +function zc(i, t, e) { Array.isArray(t) && (e.unshift(t), t = null); - var i = t ? {} : n, s = e.reduce(function(r, o) { - return Nn(o, r), r; - }, i); - t && (n[t] = s); -} -function Nn(n, t) { - if (!Array.isArray(n)) { - t[n] = !0; + var n = t ? {} : i, s = e.reduce(function(r, o) { + return xn(o, r), r; + }, n); + t && (i[t] = s); +} +function xn(i, t) { + if (!Array.isArray(i)) { + t[i] = !0; return; } - var e = n.shift(); - if (e === "PARAMETER" && (e = n.shift()), n.length === 1) { - if (Array.isArray(n[0])) { - t[e] = {}, Nn(n[0], t[e]); + var e = i.shift(); + if (e === "PARAMETER" && (e = i.shift()), i.length === 1) { + if (Array.isArray(i[0])) { + t[e] = {}, xn(i[0], t[e]); return; } - t[e] = n[0]; + t[e] = i[0]; return; } - if (!n.length) { + if (!i.length) { t[e] = !0; return; } if (e === "TOWGS84") { - t[e] = n; + t[e] = i; return; } if (e === "AXIS") { - e in t || (t[e] = []), t[e].push(n); + e in t || (t[e] = []), t[e].push(i); return; } Array.isArray(e) || (t[e] = {}); - var i; + var n; switch (e) { case "UNIT": case "PRIMEM": case "VERT_DATUM": t[e] = { - name: n[0].toLowerCase(), - convert: n[1] - }, n.length === 3 && Nn(n[2], t[e]); + name: i[0].toLowerCase(), + convert: i[1] + }, i.length === 3 && xn(i[2], t[e]); return; case "SPHEROID": case "ELLIPSOID": t[e] = { - name: n[0], - a: n[1], - rf: n[2] - }, n.length === 4 && Nn(n[3], t[e]); + name: i[0], + a: i[1], + rf: i[2] + }, i.length === 4 && xn(i[3], t[e]); return; case "PROJECTEDCRS": case "PROJCRS": @@ -20581,40 +18944,40 @@ function Nn(n, t) { case "FITTED_CS": case "LOCAL_DATUM": case "DATUM": - n[0] = ["name", n[0]], mu(t, e, n); + i[0] = ["name", i[0]], zc(t, e, i); return; default: - for (i = -1; ++i < n.length; ) - if (!Array.isArray(n[i])) - return Nn(n, t[e]); - return mu(t, e, n); + for (n = -1; ++n < i.length; ) + if (!Array.isArray(i[n])) + return xn(i, t[e]); + return zc(t, e, i); } } -var Rx = 0.017453292519943295; -function Tx(n, t) { - var e = t[0], i = t[1]; - !(e in n) && i in n && (n[e] = n[i], t.length === 3 && (n[e] = t[2](n[e]))); +var Fv = 0.017453292519943295; +function Dv(i, t) { + var e = t[0], n = t[1]; + !(e in i) && n in i && (i[e] = i[n], t.length === 3 && (i[e] = t[2](i[e]))); } -function Qe(n) { - return n * Rx; +function We(i) { + return i * Fv; } -function bx(n) { - if (n.type === "GEOGCS" ? n.projName = "longlat" : n.type === "LOCAL_CS" ? (n.projName = "identity", n.local = !0) : typeof n.PROJECTION == "object" ? n.projName = Object.keys(n.PROJECTION)[0] : n.projName = n.PROJECTION, n.AXIS) { - for (var t = "", e = 0, i = n.AXIS.length; e < i; ++e) { - var s = [n.AXIS[e][0].toLowerCase(), n.AXIS[e][1].toLowerCase()]; +function kv(i) { + if (i.type === "GEOGCS" ? i.projName = "longlat" : i.type === "LOCAL_CS" ? (i.projName = "identity", i.local = !0) : typeof i.PROJECTION == "object" ? i.projName = Object.keys(i.PROJECTION)[0] : i.projName = i.PROJECTION, i.AXIS) { + for (var t = "", e = 0, n = i.AXIS.length; e < n; ++e) { + var s = [i.AXIS[e][0].toLowerCase(), i.AXIS[e][1].toLowerCase()]; s[0].indexOf("north") !== -1 || (s[0] === "y" || s[0] === "lat") && s[1] === "north" ? t += "n" : s[0].indexOf("south") !== -1 || (s[0] === "y" || s[0] === "lat") && s[1] === "south" ? t += "s" : s[0].indexOf("east") !== -1 || (s[0] === "x" || s[0] === "lon") && s[1] === "east" ? t += "e" : (s[0].indexOf("west") !== -1 || (s[0] === "x" || s[0] === "lon") && s[1] === "west") && (t += "w"); } - t.length === 2 && (t += "u"), t.length === 3 && (n.axis = t); + t.length === 2 && (t += "u"), t.length === 3 && (i.axis = t); } - n.UNIT && (n.units = n.UNIT.name.toLowerCase(), n.units === "metre" && (n.units = "meter"), n.UNIT.convert && (n.type === "GEOGCS" ? n.DATUM && n.DATUM.SPHEROID && (n.to_meter = n.UNIT.convert * n.DATUM.SPHEROID.a) : n.to_meter = n.UNIT.convert)); - var r = n.GEOGCS; - n.type === "GEOGCS" && (r = n), r && (r.DATUM ? n.datumCode = r.DATUM.name.toLowerCase() : n.datumCode = r.name.toLowerCase(), n.datumCode.slice(0, 2) === "d_" && (n.datumCode = n.datumCode.slice(2)), (n.datumCode === "new_zealand_geodetic_datum_1949" || n.datumCode === "new_zealand_1949") && (n.datumCode = "nzgd49"), (n.datumCode === "wgs_1984" || n.datumCode === "world_geodetic_system_1984") && (n.PROJECTION === "Mercator_Auxiliary_Sphere" && (n.sphere = !0), n.datumCode = "wgs84"), n.datumCode.slice(-6) === "_ferro" && (n.datumCode = n.datumCode.slice(0, -6)), n.datumCode.slice(-8) === "_jakarta" && (n.datumCode = n.datumCode.slice(0, -8)), ~n.datumCode.indexOf("belge") && (n.datumCode = "rnb72"), r.DATUM && r.DATUM.SPHEROID && (n.ellps = r.DATUM.SPHEROID.name.replace("_19", "").replace(/[Cc]larke\_18/, "clrk"), n.ellps.toLowerCase().slice(0, 13) === "international" && (n.ellps = "intl"), n.a = r.DATUM.SPHEROID.a, n.rf = parseFloat(r.DATUM.SPHEROID.rf, 10)), r.DATUM && r.DATUM.TOWGS84 && (n.datum_params = r.DATUM.TOWGS84), ~n.datumCode.indexOf("osgb_1936") && (n.datumCode = "osgb36"), ~n.datumCode.indexOf("osni_1952") && (n.datumCode = "osni52"), (~n.datumCode.indexOf("tm65") || ~n.datumCode.indexOf("geodetic_datum_of_1965")) && (n.datumCode = "ire65"), n.datumCode === "ch1903+" && (n.datumCode = "ch1903"), ~n.datumCode.indexOf("israel") && (n.datumCode = "isr93")), n.b && !isFinite(n.b) && (n.b = n.a); + i.UNIT && (i.units = i.UNIT.name.toLowerCase(), i.units === "metre" && (i.units = "meter"), i.UNIT.convert && (i.type === "GEOGCS" ? i.DATUM && i.DATUM.SPHEROID && (i.to_meter = i.UNIT.convert * i.DATUM.SPHEROID.a) : i.to_meter = i.UNIT.convert)); + var r = i.GEOGCS; + i.type === "GEOGCS" && (r = i), r && (r.DATUM ? i.datumCode = r.DATUM.name.toLowerCase() : i.datumCode = r.name.toLowerCase(), i.datumCode.slice(0, 2) === "d_" && (i.datumCode = i.datumCode.slice(2)), (i.datumCode === "new_zealand_geodetic_datum_1949" || i.datumCode === "new_zealand_1949") && (i.datumCode = "nzgd49"), (i.datumCode === "wgs_1984" || i.datumCode === "world_geodetic_system_1984") && (i.PROJECTION === "Mercator_Auxiliary_Sphere" && (i.sphere = !0), i.datumCode = "wgs84"), i.datumCode.slice(-6) === "_ferro" && (i.datumCode = i.datumCode.slice(0, -6)), i.datumCode.slice(-8) === "_jakarta" && (i.datumCode = i.datumCode.slice(0, -8)), ~i.datumCode.indexOf("belge") && (i.datumCode = "rnb72"), r.DATUM && r.DATUM.SPHEROID && (i.ellps = r.DATUM.SPHEROID.name.replace("_19", "").replace(/[Cc]larke\_18/, "clrk"), i.ellps.toLowerCase().slice(0, 13) === "international" && (i.ellps = "intl"), i.a = r.DATUM.SPHEROID.a, i.rf = parseFloat(r.DATUM.SPHEROID.rf, 10)), r.DATUM && r.DATUM.TOWGS84 && (i.datum_params = r.DATUM.TOWGS84), ~i.datumCode.indexOf("osgb_1936") && (i.datumCode = "osgb36"), ~i.datumCode.indexOf("osni_1952") && (i.datumCode = "osni52"), (~i.datumCode.indexOf("tm65") || ~i.datumCode.indexOf("geodetic_datum_of_1965")) && (i.datumCode = "ire65"), i.datumCode === "ch1903+" && (i.datumCode = "ch1903"), ~i.datumCode.indexOf("israel") && (i.datumCode = "isr93")), i.b && !isFinite(i.b) && (i.b = i.a); function o(h) { - var c = n.to_meter || 1; + var c = i.to_meter || 1; return h * c; } var a = function(h) { - return Tx(n, h); + return Dv(i, h); }, l = [ ["standard_parallel_1", "Standard_Parallel_1"], ["standard_parallel_1", "Latitude of 1st standard parallel"], @@ -20637,191 +19000,191 @@ function bx(n) { ["k0", "scale_factor"], ["latitude_of_center", "Latitude_Of_Center"], ["latitude_of_center", "Latitude_of_center"], - ["lat0", "latitude_of_center", Qe], + ["lat0", "latitude_of_center", We], ["longitude_of_center", "Longitude_Of_Center"], ["longitude_of_center", "Longitude_of_center"], - ["longc", "longitude_of_center", Qe], + ["longc", "longitude_of_center", We], ["x0", "false_easting", o], ["y0", "false_northing", o], - ["long0", "central_meridian", Qe], - ["lat0", "latitude_of_origin", Qe], - ["lat0", "standard_parallel_1", Qe], - ["lat1", "standard_parallel_1", Qe], - ["lat2", "standard_parallel_2", Qe], + ["long0", "central_meridian", We], + ["lat0", "latitude_of_origin", We], + ["lat0", "standard_parallel_1", We], + ["lat1", "standard_parallel_1", We], + ["lat2", "standard_parallel_2", We], ["azimuth", "Azimuth"], - ["alpha", "azimuth", Qe], + ["alpha", "azimuth", We], ["srsCode", "name"] ]; - l.forEach(a), !n.long0 && n.longc && (n.projName === "Albers_Conic_Equal_Area" || n.projName === "Lambert_Azimuthal_Equal_Area") && (n.long0 = n.longc), !n.lat_ts && n.lat1 && (n.projName === "Stereographic_South_Pole" || n.projName === "Polar Stereographic (variant B)") && (n.lat0 = Qe(n.lat1 > 0 ? 90 : -90), n.lat_ts = n.lat1); + l.forEach(a), !i.long0 && i.longc && (i.projName === "Albers_Conic_Equal_Area" || i.projName === "Lambert_Azimuthal_Equal_Area") && (i.long0 = i.longc), !i.lat_ts && i.lat1 && (i.projName === "Stereographic_South_Pole" || i.projName === "Polar Stereographic (variant B)") && (i.lat0 = We(i.lat1 > 0 ? 90 : -90), i.lat_ts = i.lat1); } -function jf(n) { - var t = Sx(n), e = t.shift(), i = t.shift(); - t.unshift(["name", i]), t.unshift(["type", e]); +function vf(i) { + var t = Nv(i), e = t.shift(), n = t.shift(); + t.unshift(["name", n]), t.unshift(["type", e]); var s = {}; - return Nn(t, s), bx(s), s; + return xn(t, s), kv(s), s; } -function qt(n) { +function Ut(i) { var t = this; if (arguments.length === 2) { var e = arguments[1]; - typeof e == "string" ? e.charAt(0) === "+" ? qt[n] = ll(arguments[1]) : qt[n] = jf(arguments[1]) : qt[n] = e; + typeof e == "string" ? e.charAt(0) === "+" ? Ut[i] = $a(arguments[1]) : Ut[i] = vf(arguments[1]) : Ut[i] = e; } else if (arguments.length === 1) { - if (Array.isArray(n)) - return n.map(function(i) { - Array.isArray(i) ? qt.apply(t, i) : qt(i); + if (Array.isArray(i)) + return i.map(function(n) { + Array.isArray(n) ? Ut.apply(t, n) : Ut(n); }); - if (typeof n == "string") { - if (n in qt) - return qt[n]; + if (typeof i == "string") { + if (i in Ut) + return Ut[i]; } else - "EPSG" in n ? qt["EPSG:" + n.EPSG] = n : "ESRI" in n ? qt["ESRI:" + n.ESRI] = n : "IAU2000" in n ? qt["IAU2000:" + n.IAU2000] = n : console.log(n); + "EPSG" in i ? Ut["EPSG:" + i.EPSG] = i : "ESRI" in i ? Ut["ESRI:" + i.ESRI] = i : "IAU2000" in i ? Ut["IAU2000:" + i.IAU2000] = i : console.log(i); return; } } -mx(qt); -function Lx(n) { - return typeof n == "string"; +wv(Ut); +function Gv(i) { + return typeof i == "string"; } -function Ix(n) { - return n in qt; +function $v(i) { + return i in Ut; } -var Px = ["PROJECTEDCRS", "PROJCRS", "GEOGCS", "GEOCCS", "PROJCS", "LOCAL_CS", "GEODCRS", "GEODETICCRS", "GEODETICDATUM", "ENGCRS", "ENGINEERINGCRS"]; -function Ax(n) { - return Px.some(function(t) { - return n.indexOf(t) > -1; +var Bv = ["PROJECTEDCRS", "PROJCRS", "GEOGCS", "GEOCCS", "PROJCS", "LOCAL_CS", "GEODCRS", "GEODETICCRS", "GEODETICDATUM", "ENGCRS", "ENGINEERINGCRS"]; +function zv(i) { + return Bv.some(function(t) { + return i.indexOf(t) > -1; }); } -var Ox = ["3857", "900913", "3785", "102113"]; -function Fx(n) { - var t = Oi(n, "authority"); +var Zv = ["3857", "900913", "3785", "102113"]; +function Uv(i) { + var t = Ei(i, "authority"); if (!!t) { - var e = Oi(t, "epsg"); - return e && Ox.indexOf(e) > -1; + var e = Ei(t, "epsg"); + return e && Zv.indexOf(e) > -1; } } -function Nx(n) { - var t = Oi(n, "extension"); +function Vv(i) { + var t = Ei(i, "extension"); if (!!t) - return Oi(t, "proj4"); -} -function Dx(n) { - return n[0] === "+"; -} -function kx(n) { - if (Lx(n)) { - if (Ix(n)) - return qt[n]; - if (Ax(n)) { - var t = jf(n); - if (Fx(t)) - return qt["EPSG:3857"]; - var e = Nx(t); - return e ? ll(e) : t; - } - if (Dx(n)) - return ll(n); + return Ei(t, "proj4"); +} +function Wv(i) { + return i[0] === "+"; +} +function Hv(i) { + if (Gv(i)) { + if ($v(i)) + return Ut[i]; + if (zv(i)) { + var t = vf(i); + if (Uv(t)) + return Ut["EPSG:3857"]; + var e = Vv(t); + return e ? $a(e) : t; + } + if (Wv(i)) + return $a(i); } else - return n; + return i; } -function _u(n, t) { - n = n || {}; - var e, i; +function Zc(i, t) { + i = i || {}; + var e, n; if (!t) - return n; - for (i in t) - e = t[i], e !== void 0 && (n[i] = e); - return n; + return i; + for (n in t) + e = t[n], e !== void 0 && (i[n] = e); + return i; } -function We(n, t, e) { - var i = n * t; - return e / Math.sqrt(1 - i * i); +function De(i, t, e) { + var n = i * t; + return e / Math.sqrt(1 - n * n); } -function cr(n) { - return n < 0 ? -1 : 1; +function Ks(i) { + return i < 0 ? -1 : 1; } -function A(n) { - return Math.abs(n) <= Tt ? n : n - cr(n) * Hs; +function P(i) { + return Math.abs(i) <= Rt ? i : i - Ks(i) * As; } -function Ae(n, t, e) { - var i = n * e, s = 0.5 * n; - return i = Math.pow((1 - i) / (1 + i), s), Math.tan(0.5 * (S - t)) / i; +function we(i, t, e) { + var n = i * e, s = 0.5 * i; + return n = Math.pow((1 - n) / (1 + n), s), Math.tan(0.5 * (S - t)) / n; } -function Ys(n, t) { - for (var e = 0.5 * n, i, s, r = S - 2 * Math.atan(t), o = 0; o <= 15; o++) - if (i = n * Math.sin(r), s = S - 2 * Math.atan(t * Math.pow((1 - i) / (1 + i), e)) - r, r += s, Math.abs(s) <= 1e-10) +function Os(i, t) { + for (var e = 0.5 * i, n, s, r = S - 2 * Math.atan(t), o = 0; o <= 15; o++) + if (n = i * Math.sin(r), s = S - 2 * Math.atan(t * Math.pow((1 - n) / (1 + n), e)) - r, r += s, Math.abs(s) <= 1e-10) return r; return -9999; } -function Gx() { - var n = this.b / this.a; - this.es = 1 - n * n, "x0" in this || (this.x0 = 0), "y0" in this || (this.y0 = 0), this.e = Math.sqrt(this.es), this.lat_ts ? this.sphere ? this.k0 = Math.cos(this.lat_ts) : this.k0 = We(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) : this.k0 || (this.k ? this.k0 = this.k : this.k0 = 1); +function Xv() { + var i = this.b / this.a; + this.es = 1 - i * i, "x0" in this || (this.x0 = 0), "y0" in this || (this.y0 = 0), this.e = Math.sqrt(this.es), this.lat_ts ? this.sphere ? this.k0 = Math.cos(this.lat_ts) : this.k0 = De(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) : this.k0 || (this.k ? this.k0 = this.k : this.k0 = 1); } -function $x(n) { - var t = n.x, e = n.y; - if (e * Ge > 90 && e * Ge < -90 && t * Ge > 180 && t * Ge < -180) +function Yv(i) { + var t = i.x, e = i.y; + if (e * Ae > 90 && e * Ae < -90 && t * Ae > 180 && t * Ae < -180) return null; - var i, s; + var n, s; if (Math.abs(Math.abs(e) - S) <= I) return null; if (this.sphere) - i = this.x0 + this.a * this.k0 * A(t - this.long0), s = this.y0 + this.a * this.k0 * Math.log(Math.tan(ct + 0.5 * e)); + n = this.x0 + this.a * this.k0 * P(t - this.long0), s = this.y0 + this.a * this.k0 * Math.log(Math.tan(ht + 0.5 * e)); else { - var r = Math.sin(e), o = Ae(this.e, e, r); - i = this.x0 + this.a * this.k0 * A(t - this.long0), s = this.y0 - this.a * this.k0 * Math.log(o); + var r = Math.sin(e), o = we(this.e, e, r); + n = this.x0 + this.a * this.k0 * P(t - this.long0), s = this.y0 - this.a * this.k0 * Math.log(o); } - return n.x = i, n.y = s, n; + return i.x = n, i.y = s, i; } -function Bx(n) { - var t = n.x - this.x0, e = n.y - this.y0, i, s; +function jv(i) { + var t = i.x - this.x0, e = i.y - this.y0, n, s; if (this.sphere) s = S - 2 * Math.atan(Math.exp(-e / (this.a * this.k0))); else { var r = Math.exp(-e / (this.a * this.k0)); - if (s = Ys(this.e, r), s === -9999) + if (s = Os(this.e, r), s === -9999) return null; } - return i = A(this.long0 + t / (this.a * this.k0)), n.x = i, n.y = s, n; + return n = P(this.long0 + t / (this.a * this.k0)), i.x = n, i.y = s, i; } -var zx = ["Mercator", "Popular Visualisation Pseudo Mercator", "Mercator_1SP", "Mercator_Auxiliary_Sphere", "merc"]; -const Zx = { - init: Gx, - forward: $x, - inverse: Bx, - names: zx +var Kv = ["Mercator", "Popular Visualisation Pseudo Mercator", "Mercator_1SP", "Mercator_Auxiliary_Sphere", "merc"]; +const qv = { + init: Xv, + forward: Yv, + inverse: jv, + names: Kv }; -function Vx() { +function Jv() { } -function pu(n) { - return n; +function Uc(i) { + return i; } -var Ux = ["longlat", "identity"]; -const Wx = { - init: Vx, - forward: pu, - inverse: pu, - names: Ux +var Qv = ["longlat", "identity"]; +const tx = { + init: Jv, + forward: Uc, + inverse: Uc, + names: Qv }; -var Hx = [Zx, Wx], Xr = {}, Co = []; -function qf(n, t) { - var e = Co.length; - return n.names ? (Co[e] = n, n.names.forEach(function(i) { - Xr[i.toLowerCase()] = e; +var ex = [qv, tx], Lr = {}, Jr = []; +function xf(i, t) { + var e = Jr.length; + return i.names ? (Jr[e] = i, i.names.forEach(function(n) { + Lr[n.toLowerCase()] = e; }), this) : (console.log(t), !0); } -function Xx(n) { - if (!n) +function ix(i) { + if (!i) return !1; - var t = n.toLowerCase(); - if (typeof Xr[t] < "u" && Co[Xr[t]]) - return Co[Xr[t]]; + var t = i.toLowerCase(); + if (typeof Lr[t] < "u" && Jr[Lr[t]]) + return Jr[Lr[t]]; } -function Yx() { - Hx.forEach(qf); +function nx() { + ex.forEach(xf); } -const jx = { - start: Yx, - add: qf, - get: Xx +const sx = { + start: nx, + add: xf, + get: ix }; var j = {}; j.MERIT = { @@ -21029,7 +19392,7 @@ j.WGS7 = { rf: 298.26, ellipseName: "WGS 72" }; -var qx = j.WGS84 = { +var rx = j.WGS84 = { a: 6378137, rf: 298.257223563, ellipseName: "WGS 84" @@ -21039,9 +19402,9 @@ j.sphere = { b: 6370997, ellipseName: "Normal Sphere (r=6370997)" }; -function Kx(n, t, e, i) { - var s = n * n, r = t * t, o = (s - r) / s, a = 0; - i ? (n *= 1 - o * (yx + o * (vx + o * xx)), s = n * n, o = 0) : a = Math.sqrt(o); +function ox(i, t, e, n) { + var s = i * i, r = t * t, o = (s - r) / s, a = 0; + n ? (i *= 1 - o * (bv + o * (Lv + o * Tv)), s = i * i, o = 0) : a = Math.sqrt(o); var l = (s - r) / r; return { es: o, @@ -21049,224 +19412,224 @@ function Kx(n, t, e, i) { ep2: l }; } -function Jx(n, t, e, i, s) { - if (!n) { - var r = Oi(j, i); - r || (r = qx), n = r.a, t = r.b, e = r.rf; +function ax(i, t, e, n, s) { + if (!i) { + var r = Ei(j, n); + r || (r = rx), i = r.a, t = r.b, e = r.rf; } - return e && !t && (t = (1 - 1 / e) * n), (e === 0 || Math.abs(n - t) < I) && (s = !0, t = n), { - a: n, + return e && !t && (t = (1 - 1 / e) * i), (e === 0 || Math.abs(i - t) < I) && (s = !0, t = i), { + a: i, b: t, rf: e, sphere: s }; } -var $t = {}; -$t.wgs84 = { +var kt = {}; +kt.wgs84 = { towgs84: "0,0,0", ellipse: "WGS84", datumName: "WGS84" }; -$t.ch1903 = { +kt.ch1903 = { towgs84: "674.374,15.056,405.346", ellipse: "bessel", datumName: "swiss" }; -$t.ggrs87 = { +kt.ggrs87 = { towgs84: "-199.87,74.79,246.62", ellipse: "GRS80", datumName: "Greek_Geodetic_Reference_System_1987" }; -$t.nad83 = { +kt.nad83 = { towgs84: "0,0,0", ellipse: "GRS80", datumName: "North_American_Datum_1983" }; -$t.nad27 = { +kt.nad27 = { nadgrids: "@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat", ellipse: "clrk66", datumName: "North_American_Datum_1927" }; -$t.potsdam = { +kt.potsdam = { towgs84: "598.1,73.7,418.2,0.202,0.045,-2.455,6.7", ellipse: "bessel", datumName: "Potsdam Rauenberg 1950 DHDN" }; -$t.carthage = { +kt.carthage = { towgs84: "-263.0,6.0,431.0", ellipse: "clark80", datumName: "Carthage 1934 Tunisia" }; -$t.hermannskogel = { +kt.hermannskogel = { towgs84: "577.326,90.129,463.919,5.137,1.474,5.297,2.4232", ellipse: "bessel", datumName: "Hermannskogel" }; -$t.osni52 = { +kt.osni52 = { towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15", ellipse: "airy", datumName: "Irish National" }; -$t.ire65 = { +kt.ire65 = { towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15", ellipse: "mod_airy", datumName: "Ireland 1965" }; -$t.rassadiran = { +kt.rassadiran = { towgs84: "-133.63,-157.5,-158.62", ellipse: "intl", datumName: "Rassadiran" }; -$t.nzgd49 = { +kt.nzgd49 = { towgs84: "59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993", ellipse: "intl", datumName: "New Zealand Geodetic Datum 1949" }; -$t.osgb36 = { +kt.osgb36 = { towgs84: "446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894", ellipse: "airy", datumName: "Airy 1830" }; -$t.s_jtsk = { +kt.s_jtsk = { towgs84: "589,76,480", ellipse: "bessel", datumName: "S-JTSK (Ferro)" }; -$t.beduaram = { +kt.beduaram = { towgs84: "-106,-87,188", ellipse: "clrk80", datumName: "Beduaram" }; -$t.gunung_segara = { +kt.gunung_segara = { towgs84: "-403,684,41", ellipse: "bessel", datumName: "Gunung Segara Jakarta" }; -$t.rnb72 = { +kt.rnb72 = { towgs84: "106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1", ellipse: "intl", datumName: "Reseau National Belge 1972" }; -function Qx(n, t, e, i, s, r, o) { +function lx(i, t, e, n, s, r, o) { var a = {}; - return n === void 0 || n === "none" ? a.datum_type = al : a.datum_type = _x, t && (a.datum_params = t.map(parseFloat), (a.datum_params[0] !== 0 || a.datum_params[1] !== 0 || a.datum_params[2] !== 0) && (a.datum_type = ln), a.datum_params.length > 3 && (a.datum_params[3] !== 0 || a.datum_params[4] !== 0 || a.datum_params[5] !== 0 || a.datum_params[6] !== 0) && (a.datum_type = hn, a.datum_params[3] *= Is, a.datum_params[4] *= Is, a.datum_params[5] *= Is, a.datum_params[6] = a.datum_params[6] / 1e6 + 1)), o && (a.datum_type = Hr, a.grids = o), a.a = e, a.b = i, a.es = s, a.ep2 = r, a; + return i === void 0 || i === "none" ? a.datum_type = Ga : a.datum_type = Sv, t && (a.datum_params = t.map(parseFloat), (a.datum_params[0] !== 0 || a.datum_params[1] !== 0 || a.datum_params[2] !== 0) && (a.datum_type = Xi), a.datum_params.length > 3 && (a.datum_params[3] !== 0 || a.datum_params[4] !== 0 || a.datum_params[5] !== 0 || a.datum_params[6] !== 0) && (a.datum_type = Yi, a.datum_params[3] *= fs, a.datum_params[4] *= fs, a.datum_params[5] *= fs, a.datum_params[6] = a.datum_params[6] / 1e6 + 1)), o && (a.datum_type = br, a.grids = o), a.a = e, a.b = n, a.es = s, a.ep2 = r, a; } -var Kf = {}; -function t3(n, t) { - var e = new DataView(t), i = n3(e), s = s3(e, i); +var Mf = {}; +function hx(i, t) { + var e = new DataView(t), n = dx(e), s = fx(e, n); s.nSubgrids > 1 && console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored"); - var r = r3(e, s, i), o = { header: s, subgrids: r }; - return Kf[n] = o, o; + var r = gx(e, s, n), o = { header: s, subgrids: r }; + return Mf[i] = o, o; } -function e3(n) { - if (n === void 0) +function cx(i) { + if (i === void 0) return null; - var t = n.split(","); - return t.map(i3); + var t = i.split(","); + return t.map(ux); } -function i3(n) { - if (n.length === 0) +function ux(i) { + if (i.length === 0) return null; - var t = n[0] === "@"; - return t && (n = n.slice(1)), n === "null" ? { name: "null", mandatory: !t, grid: null, isNull: !0 } : { - name: n, + var t = i[0] === "@"; + return t && (i = i.slice(1)), i === "null" ? { name: "null", mandatory: !t, grid: null, isNull: !0 } : { + name: i, mandatory: !t, - grid: Kf[n] || null, + grid: Mf[i] || null, isNull: !1 }; } -function Dn(n) { - return n / 3600 * Math.PI / 180; +function Mn(i) { + return i / 3600 * Math.PI / 180; } -function n3(n) { - var t = n.getInt32(8, !1); - return t === 11 ? !1 : (t = n.getInt32(8, !0), t !== 11 && console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"), !0); +function dx(i) { + var t = i.getInt32(8, !1); + return t === 11 ? !1 : (t = i.getInt32(8, !0), t !== 11 && console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"), !0); } -function s3(n, t) { +function fx(i, t) { return { - nFields: n.getInt32(8, t), - nSubgridFields: n.getInt32(24, t), - nSubgrids: n.getInt32(40, t), - shiftType: hl(n, 56, 56 + 8).trim(), - fromSemiMajorAxis: n.getFloat64(120, t), - fromSemiMinorAxis: n.getFloat64(136, t), - toSemiMajorAxis: n.getFloat64(152, t), - toSemiMinorAxis: n.getFloat64(168, t) + nFields: i.getInt32(8, t), + nSubgridFields: i.getInt32(24, t), + nSubgrids: i.getInt32(40, t), + shiftType: Ba(i, 56, 56 + 8).trim(), + fromSemiMajorAxis: i.getFloat64(120, t), + fromSemiMinorAxis: i.getFloat64(136, t), + toSemiMajorAxis: i.getFloat64(152, t), + toSemiMinorAxis: i.getFloat64(168, t) }; } -function hl(n, t, e) { - return String.fromCharCode.apply(null, new Uint8Array(n.buffer.slice(t, e))); +function Ba(i, t, e) { + return String.fromCharCode.apply(null, new Uint8Array(i.buffer.slice(t, e))); } -function r3(n, t, e) { - for (var i = 176, s = [], r = 0; r < t.nSubgrids; r++) { - var o = a3(n, i, e), a = l3(n, i, o, e), l = Math.round( +function gx(i, t, e) { + for (var n = 176, s = [], r = 0; r < t.nSubgrids; r++) { + var o = _x(i, n, e), a = px(i, n, o, e), l = Math.round( 1 + (o.upperLongitude - o.lowerLongitude) / o.longitudeInterval ), h = Math.round( 1 + (o.upperLatitude - o.lowerLatitude) / o.latitudeInterval ); s.push({ - ll: [Dn(o.lowerLongitude), Dn(o.lowerLatitude)], - del: [Dn(o.longitudeInterval), Dn(o.latitudeInterval)], + ll: [Mn(o.lowerLongitude), Mn(o.lowerLatitude)], + del: [Mn(o.longitudeInterval), Mn(o.latitudeInterval)], lim: [l, h], count: o.gridNodeCount, - cvs: o3(a) + cvs: mx(a) }); } return s; } -function o3(n) { - return n.map(function(t) { - return [Dn(t.longitudeShift), Dn(t.latitudeShift)]; +function mx(i) { + return i.map(function(t) { + return [Mn(t.longitudeShift), Mn(t.latitudeShift)]; }); } -function a3(n, t, e) { +function _x(i, t, e) { return { - name: hl(n, t + 8, t + 16).trim(), - parent: hl(n, t + 24, t + 24 + 8).trim(), - lowerLatitude: n.getFloat64(t + 72, e), - upperLatitude: n.getFloat64(t + 88, e), - lowerLongitude: n.getFloat64(t + 104, e), - upperLongitude: n.getFloat64(t + 120, e), - latitudeInterval: n.getFloat64(t + 136, e), - longitudeInterval: n.getFloat64(t + 152, e), - gridNodeCount: n.getInt32(t + 168, e) + name: Ba(i, t + 8, t + 16).trim(), + parent: Ba(i, t + 24, t + 24 + 8).trim(), + lowerLatitude: i.getFloat64(t + 72, e), + upperLatitude: i.getFloat64(t + 88, e), + lowerLongitude: i.getFloat64(t + 104, e), + upperLongitude: i.getFloat64(t + 120, e), + latitudeInterval: i.getFloat64(t + 136, e), + longitudeInterval: i.getFloat64(t + 152, e), + gridNodeCount: i.getInt32(t + 168, e) }; } -function l3(n, t, e, i) { +function px(i, t, e, n) { for (var s = t + 176, r = 16, o = [], a = 0; a < e.gridNodeCount; a++) { var l = { - latitudeShift: n.getFloat32(s + a * r, i), - longitudeShift: n.getFloat32(s + a * r + 4, i), - latitudeAccuracy: n.getFloat32(s + a * r + 8, i), - longitudeAccuracy: n.getFloat32(s + a * r + 12, i) + latitudeShift: i.getFloat32(s + a * r, n), + longitudeShift: i.getFloat32(s + a * r + 4, n), + latitudeAccuracy: i.getFloat32(s + a * r + 8, n), + longitudeAccuracy: i.getFloat32(s + a * r + 12, n) }; o.push(l); } return o; } -function Be(n, t) { - if (!(this instanceof Be)) - return new Be(n); +function Oe(i, t) { + if (!(this instanceof Oe)) + return new Oe(i); t = t || function(h) { if (h) throw h; }; - var e = kx(n); + var e = Hv(i); if (typeof e != "object") { - t(n); + t(i); return; } - var i = Be.projections.get(e.projName); - if (!i) { - t(n); + var n = Oe.projections.get(e.projName); + if (!n) { + t(i); return; } if (e.datumCode && e.datumCode !== "none") { - var s = Oi($t, e.datumCode); + var s = Ei(kt, e.datumCode); s && (e.datum_params = e.datum_params || (s.towgs84 ? s.towgs84.split(",") : null), e.ellps = s.ellipse, e.datumName = s.datumName ? s.datumName : e.datumCode); } e.k0 = e.k0 || 1, e.axis = e.axis || "enu", e.ellps = e.ellps || "wgs84", e.lat1 = e.lat1 || e.lat0; - var r = Jx(e.a, e.b, e.rf, e.ellps, e.sphere), o = Kx(r.a, r.b, r.rf, e.R_A), a = e3(e.nadgrids), l = e.datum || Qx( + var r = ax(e.a, e.b, e.rf, e.ellps, e.sphere), o = ox(r.a, r.b, r.rf, e.R_A), a = cx(e.nadgrids), l = e.datum || lx( e.datumCode, e.datum_params, r.a, @@ -21275,77 +19638,77 @@ function Be(n, t) { o.ep2, a ); - _u(this, e), _u(this, i), this.a = r.a, this.b = r.b, this.rf = r.rf, this.sphere = r.sphere, this.es = o.es, this.e = o.e, this.ep2 = o.ep2, this.datum = l, this.init(), t(null, this); + Zc(this, e), Zc(this, n), this.a = r.a, this.b = r.b, this.rf = r.rf, this.sphere = r.sphere, this.es = o.es, this.e = o.e, this.ep2 = o.ep2, this.datum = l, this.init(), t(null, this); } -Be.projections = jx; -Be.projections.start(); -function h3(n, t) { - return n.datum_type !== t.datum_type || n.a !== t.a || Math.abs(n.es - t.es) > 5e-11 ? !1 : n.datum_type === ln ? n.datum_params[0] === t.datum_params[0] && n.datum_params[1] === t.datum_params[1] && n.datum_params[2] === t.datum_params[2] : n.datum_type === hn ? n.datum_params[0] === t.datum_params[0] && n.datum_params[1] === t.datum_params[1] && n.datum_params[2] === t.datum_params[2] && n.datum_params[3] === t.datum_params[3] && n.datum_params[4] === t.datum_params[4] && n.datum_params[5] === t.datum_params[5] && n.datum_params[6] === t.datum_params[6] : !0; +Oe.projections = sx; +Oe.projections.start(); +function yx(i, t) { + return i.datum_type !== t.datum_type || i.a !== t.a || Math.abs(i.es - t.es) > 5e-11 ? !1 : i.datum_type === Xi ? i.datum_params[0] === t.datum_params[0] && i.datum_params[1] === t.datum_params[1] && i.datum_params[2] === t.datum_params[2] : i.datum_type === Yi ? i.datum_params[0] === t.datum_params[0] && i.datum_params[1] === t.datum_params[1] && i.datum_params[2] === t.datum_params[2] && i.datum_params[3] === t.datum_params[3] && i.datum_params[4] === t.datum_params[4] && i.datum_params[5] === t.datum_params[5] && i.datum_params[6] === t.datum_params[6] : !0; } -function Jf(n, t, e) { - var i = n.x, s = n.y, r = n.z ? n.z : 0, o, a, l, h; +function Cf(i, t, e) { + var n = i.x, s = i.y, r = i.z ? i.z : 0, o, a, l, h; if (s < -S && s > -1.001 * S) s = -S; else if (s > S && s < 1.001 * S) s = S; else { if (s < -S) - return { x: -1 / 0, y: -1 / 0, z: n.z }; + return { x: -1 / 0, y: -1 / 0, z: i.z }; if (s > S) - return { x: 1 / 0, y: 1 / 0, z: n.z }; + return { x: 1 / 0, y: 1 / 0, z: i.z }; } - return i > Math.PI && (i -= 2 * Math.PI), a = Math.sin(s), h = Math.cos(s), l = a * a, o = e / Math.sqrt(1 - t * l), { - x: (o + r) * h * Math.cos(i), - y: (o + r) * h * Math.sin(i), + return n > Math.PI && (n -= 2 * Math.PI), a = Math.sin(s), h = Math.cos(s), l = a * a, o = e / Math.sqrt(1 - t * l), { + x: (o + r) * h * Math.cos(n), + y: (o + r) * h * Math.sin(n), z: (o * (1 - t) + r) * a }; } -function Qf(n, t, e, i) { - var s = 1e-12, r = s * s, o = 30, a, l, h, c, u, d, f, g, m, _, y, p, v, x = n.x, C = n.y, E = n.z ? n.z : 0, R, b, F; - if (a = Math.sqrt(x * x + C * C), l = Math.sqrt(x * x + C * C + E * E), a / e < s) { +function Ef(i, t, e, n) { + var s = 1e-12, r = s * s, o = 30, a, l, h, c, u, d, f, g, m, _, y, p, v, x = i.x, M = i.y, E = i.z ? i.z : 0, R, L, N; + if (a = Math.sqrt(x * x + M * M), l = Math.sqrt(x * x + M * M + E * E), a / e < s) { if (R = 0, l / e < s) - return b = S, F = -i, { - x: n.x, - y: n.y, - z: n.z + return L = S, N = -n, { + x: i.x, + y: i.y, + z: i.z }; } else - R = Math.atan2(C, x); + R = Math.atan2(M, x); h = E / l, c = a / l, u = 1 / Math.sqrt(1 - t * (2 - t) * c * c), g = c * (1 - t) * u, m = h * u, v = 0; do - v++, f = e / Math.sqrt(1 - t * m * m), F = a * g + E * m - f * (1 - t * m * m), d = t * f / (f + F), u = 1 / Math.sqrt(1 - d * (2 - d) * c * c), _ = c * (1 - d) * u, y = h * u, p = y * g - _ * m, g = _, m = y; + v++, f = e / Math.sqrt(1 - t * m * m), N = a * g + E * m - f * (1 - t * m * m), d = t * f / (f + N), u = 1 / Math.sqrt(1 - d * (2 - d) * c * c), _ = c * (1 - d) * u, y = h * u, p = y * g - _ * m, g = _, m = y; while (p * p > r && v < o); - return b = Math.atan(y / Math.abs(_)), { + return L = Math.atan(y / Math.abs(_)), { x: R, - y: b, - z: F + y: L, + z: N }; } -function c3(n, t, e) { - if (t === ln) +function vx(i, t, e) { + if (t === Xi) return { - x: n.x + e[0], - y: n.y + e[1], - z: n.z + e[2] + x: i.x + e[0], + y: i.y + e[1], + z: i.z + e[2] }; - if (t === hn) { - var i = e[0], s = e[1], r = e[2], o = e[3], a = e[4], l = e[5], h = e[6]; + if (t === Yi) { + var n = e[0], s = e[1], r = e[2], o = e[3], a = e[4], l = e[5], h = e[6]; return { - x: h * (n.x - l * n.y + a * n.z) + i, - y: h * (l * n.x + n.y - o * n.z) + s, - z: h * (-a * n.x + o * n.y + n.z) + r + x: h * (i.x - l * i.y + a * i.z) + n, + y: h * (l * i.x + i.y - o * i.z) + s, + z: h * (-a * i.x + o * i.y + i.z) + r }; } } -function u3(n, t, e) { - if (t === ln) +function xx(i, t, e) { + if (t === Xi) return { - x: n.x - e[0], - y: n.y - e[1], - z: n.z - e[2] + x: i.x - e[0], + y: i.y - e[1], + z: i.z - e[2] }; - if (t === hn) { - var i = e[0], s = e[1], r = e[2], o = e[3], a = e[4], l = e[5], h = e[6], c = (n.x - i) / h, u = (n.y - s) / h, d = (n.z - r) / h; + if (t === Yi) { + var n = e[0], s = e[1], r = e[2], o = e[3], a = e[4], l = e[5], h = e[6], c = (i.x - n) / h, u = (i.y - s) / h, d = (i.z - r) / h; return { x: c + l * u - a * d, y: -l * c + u + o * d, @@ -21353,36 +19716,36 @@ function u3(n, t, e) { }; } } -function Vr(n) { - return n === ln || n === hn; +function wr(i) { + return i === Xi || i === Yi; } -function d3(n, t, e) { - if (h3(n, t) || n.datum_type === al || t.datum_type === al) +function Mx(i, t, e) { + if (yx(i, t) || i.datum_type === Ga || t.datum_type === Ga) return e; - var i = n.a, s = n.es; - if (n.datum_type === Hr) { - var r = yu(n, !1, e); + var n = i.a, s = i.es; + if (i.datum_type === br) { + var r = Vc(i, !1, e); if (r !== 0) return; - i = du, s = fu; + n = Gc, s = $c; } var o = t.a, a = t.b, l = t.es; - if (t.datum_type === Hr && (o = du, a = px, l = fu), s === l && i === o && !Vr(n.datum_type) && !Vr(t.datum_type)) + if (t.datum_type === br && (o = Gc, a = Rv, l = $c), s === l && n === o && !wr(i.datum_type) && !wr(t.datum_type)) return e; - if (e = Jf(e, s, i), Vr(n.datum_type) && (e = c3(e, n.datum_type, n.datum_params)), Vr(t.datum_type) && (e = u3(e, t.datum_type, t.datum_params)), e = Qf(e, l, o, a), t.datum_type === Hr) { - var h = yu(t, !0, e); + if (e = Cf(e, s, n), wr(i.datum_type) && (e = vx(e, i.datum_type, i.datum_params)), wr(t.datum_type) && (e = xx(e, t.datum_type, t.datum_params)), e = Ef(e, l, o, a), t.datum_type === br) { + var h = Vc(t, !0, e); if (h !== 0) return; } return e; } -function yu(n, t, e) { - if (n.grids === null || n.grids.length === 0) +function Vc(i, t, e) { + if (i.grids === null || i.grids.length === 0) return console.log("Grid shift grids not found"), -1; - for (var i = { x: -e.x, y: e.y }, s = { x: Number.NaN, y: Number.NaN }, r = [], o = 0; o < n.grids.length; o++) { - var a = n.grids[o]; + for (var n = { x: -e.x, y: e.y }, s = { x: Number.NaN, y: Number.NaN }, r = [], o = 0; o < i.grids.length; o++) { + var a = i.grids[o]; if (r.push(a.name), a.isNull) { - s = i; + s = n; break; } if (a.mandatory, a.grid === null) { @@ -21391,42 +19754,42 @@ function yu(n, t, e) { continue; } var l = a.grid.subgrids[0], h = (Math.abs(l.del[1]) + Math.abs(l.del[0])) / 1e4, c = l.ll[0] - h, u = l.ll[1] - h, d = l.ll[0] + (l.lim[0] - 1) * l.del[0] + h, f = l.ll[1] + (l.lim[1] - 1) * l.del[1] + h; - if (!(u > i.y || c > i.x || f < i.y || d < i.x) && (s = f3(i, t, l), !isNaN(s.x))) + if (!(u > n.y || c > n.x || f < n.y || d < n.x) && (s = Cx(n, t, l), !isNaN(s.x))) break; } - return isNaN(s.x) ? (console.log("Failed to find a grid shift table for location '" + -i.x * Ge + " " + i.y * Ge + " tried: '" + r + "'"), -1) : (e.x = -s.x, e.y = s.y, 0); + return isNaN(s.x) ? (console.log("Failed to find a grid shift table for location '" + -n.x * Ae + " " + n.y * Ae + " tried: '" + r + "'"), -1) : (e.x = -s.x, e.y = s.y, 0); } -function f3(n, t, e) { - var i = { x: Number.NaN, y: Number.NaN }; - if (isNaN(n.x)) - return i; - var s = { x: n.x, y: n.y }; - s.x -= e.ll[0], s.y -= e.ll[1], s.x = A(s.x - Math.PI) + Math.PI; - var r = vu(s, e); +function Cx(i, t, e) { + var n = { x: Number.NaN, y: Number.NaN }; + if (isNaN(i.x)) + return n; + var s = { x: i.x, y: i.y }; + s.x -= e.ll[0], s.y -= e.ll[1], s.x = P(s.x - Math.PI) + Math.PI; + var r = Wc(s, e); if (t) { if (isNaN(r.x)) - return i; + return n; r.x = s.x - r.x, r.y = s.y - r.y; var o = 9, a = 1e-12, l, h; do { - if (h = vu(r, e), isNaN(h.x)) { + if (h = Wc(r, e), isNaN(h.x)) { console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation."); break; } l = { x: s.x - (h.x + r.x), y: s.y - (h.y + r.y) }, r.x += l.x, r.y += l.y; } while (o-- && Math.abs(l.x) > a && Math.abs(l.y) > a); if (o < 0) - return console.log("Inverse grid shift iterator failed to converge."), i; - i.x = A(r.x + e.ll[0]), i.y = r.y + e.ll[1]; + return console.log("Inverse grid shift iterator failed to converge."), n; + n.x = P(r.x + e.ll[0]), n.y = r.y + e.ll[1]; } else - isNaN(r.x) || (i.x = n.x + r.x, i.y = n.y + r.y); - return i; + isNaN(r.x) || (n.x = i.x + r.x, n.y = i.y + r.y); + return n; } -function vu(n, t) { - var e = { x: n.x / t.del[0], y: n.y / t.del[1] }, i = { x: Math.floor(e.x), y: Math.floor(e.y) }, s = { x: e.x - 1 * i.x, y: e.y - 1 * i.y }, r = { x: Number.NaN, y: Number.NaN }, o; - if (i.x < 0 || i.x >= t.lim[0] || i.y < 0 || i.y >= t.lim[1]) +function Wc(i, t) { + var e = { x: i.x / t.del[0], y: i.y / t.del[1] }, n = { x: Math.floor(e.x), y: Math.floor(e.y) }, s = { x: e.x - 1 * n.x, y: e.y - 1 * n.y }, r = { x: Number.NaN, y: Number.NaN }, o; + if (n.x < 0 || n.x >= t.lim[0] || n.y < 0 || n.y >= t.lim[1]) return r; - o = i.y * t.lim[0] + i.x; + o = n.y * t.lim[0] + n.x; var a = { x: t.cvs[o][0], y: t.cvs[o][1] }; o++; var l = { x: t.cvs[o][0], y: t.cvs[o][1] }; @@ -21436,11 +19799,11 @@ function vu(n, t) { var c = { x: t.cvs[o][0], y: t.cvs[o][1] }, u = s.x * s.y, d = s.x * (1 - s.y), f = (1 - s.x) * (1 - s.y), g = (1 - s.x) * s.y; return r.x = f * a.x + d * l.x + g * c.x + u * h.x, r.y = f * a.y + d * l.y + g * c.y + u * h.y, r; } -function xu(n, t, e) { - var i = e.x, s = e.y, r = e.z || 0, o, a, l, h = {}; +function Hc(i, t, e) { + var n = e.x, s = e.y, r = e.z || 0, o, a, l, h = {}; for (l = 0; l < 3; l++) if (!(t && l === 2 && e.z === void 0)) - switch (l === 0 ? (o = i, "ew".indexOf(n.axis[l]) !== -1 ? a = "x" : a = "y") : l === 1 ? (o = s, "ns".indexOf(n.axis[l]) !== -1 ? a = "y" : a = "x") : (o = r, a = "z"), n.axis[l]) { + switch (l === 0 ? (o = n, "ew".indexOf(i.axis[l]) !== -1 ? a = "x" : a = "y") : l === 1 ? (o = s, "ns".indexOf(i.axis[l]) !== -1 ? a = "y" : a = "x") : (o = r, a = "z"), i.axis[l]) { case "e": h[a] = o; break; @@ -21464,62 +19827,62 @@ function xu(n, t, e) { } return h; } -function tg(n) { +function wf(i) { var t = { - x: n[0], - y: n[1] + x: i[0], + y: i[1] }; - return n.length > 2 && (t.z = n[2]), n.length > 3 && (t.m = n[3]), t; + return i.length > 2 && (t.z = i[2]), i.length > 3 && (t.m = i[3]), t; } -function g3(n) { - Cu(n.x), Cu(n.y); +function Ex(i) { + Xc(i.x), Xc(i.y); } -function Cu(n) { +function Xc(i) { if (typeof Number.isFinite == "function") { - if (Number.isFinite(n)) + if (Number.isFinite(i)) return; throw new TypeError("coordinates must be finite numbers"); } - if (typeof n != "number" || n !== n || !isFinite(n)) + if (typeof i != "number" || i !== i || !isFinite(i)) throw new TypeError("coordinates must be finite numbers"); } -function m3(n, t) { - return (n.datum.datum_type === ln || n.datum.datum_type === hn) && t.datumCode !== "WGS84" || (t.datum.datum_type === ln || t.datum.datum_type === hn) && n.datumCode !== "WGS84"; +function wx(i, t) { + return (i.datum.datum_type === Xi || i.datum.datum_type === Yi) && t.datumCode !== "WGS84" || (t.datum.datum_type === Xi || t.datum.datum_type === Yi) && i.datumCode !== "WGS84"; } -function Mo(n, t, e, i) { +function Qr(i, t, e, n) { var s; - if (Array.isArray(e) && (e = tg(e)), g3(e), n.datum && t.datum && m3(n, t) && (s = new Be("WGS84"), e = Mo(n, s, e, i), n = s), i && n.axis !== "enu" && (e = xu(n, !1, e)), n.projName === "longlat") + if (Array.isArray(e) && (e = wf(e)), Ex(e), i.datum && t.datum && wx(i, t) && (s = new Oe("WGS84"), e = Qr(i, s, e, n), i = s), n && i.axis !== "enu" && (e = Hc(i, !1, e)), i.projName === "longlat") e = { - x: e.x * zt, - y: e.y * zt, + x: e.x * $t, + y: e.y * $t, z: e.z || 0 }; - else if (n.to_meter && (e = { - x: e.x * n.to_meter, - y: e.y * n.to_meter, + else if (i.to_meter && (e = { + x: e.x * i.to_meter, + y: e.y * i.to_meter, z: e.z || 0 - }), e = n.inverse(e), !e) + }), e = i.inverse(e), !e) return; - if (n.from_greenwich && (e.x += n.from_greenwich), e = d3(n.datum, t.datum, e), !!e) + if (i.from_greenwich && (e.x += i.from_greenwich), e = Mx(i.datum, t.datum, e), !!e) return t.from_greenwich && (e = { x: e.x - t.from_greenwich, y: e.y, z: e.z || 0 }), t.projName === "longlat" ? e = { - x: e.x * Ge, - y: e.y * Ge, + x: e.x * Ae, + y: e.y * Ae, z: e.z || 0 } : (e = t.forward(e), t.to_meter && (e = { x: e.x / t.to_meter, y: e.y / t.to_meter, z: e.z || 0 - })), i && t.axis !== "enu" ? xu(t, !0, e) : e; + })), n && t.axis !== "enu" ? Hc(t, !0, e) : e; } -var Mu = Be("WGS84"); -function Sa(n, t, e, i) { +var Yc = Oe("WGS84"); +function ta(i, t, e, n) { var s, r, o; - return Array.isArray(e) ? (s = Mo(n, t, e, i) || { x: NaN, y: NaN }, e.length > 2 ? typeof n.name < "u" && n.name === "geocent" || typeof t.name < "u" && t.name === "geocent" ? typeof s.z == "number" ? [s.x, s.y, s.z].concat(e.splice(3)) : [s.x, s.y, e[2]].concat(e.splice(3)) : [s.x, s.y].concat(e.splice(2)) : [s.x, s.y]) : (r = Mo(n, t, e, i), o = Object.keys(e), o.length === 2 || o.forEach(function(a) { - if (typeof n.name < "u" && n.name === "geocent" || typeof t.name < "u" && t.name === "geocent") { + return Array.isArray(e) ? (s = Qr(i, t, e, n) || { x: NaN, y: NaN }, e.length > 2 ? typeof i.name < "u" && i.name === "geocent" || typeof t.name < "u" && t.name === "geocent" ? typeof s.z == "number" ? [s.x, s.y, s.z].concat(e.splice(3)) : [s.x, s.y, e[2]].concat(e.splice(3)) : [s.x, s.y].concat(e.splice(2)) : [s.x, s.y]) : (r = Qr(i, t, e, n), o = Object.keys(e), o.length === 2 || o.forEach(function(a) { + if (typeof i.name < "u" && i.name === "geocent" || typeof t.name < "u" && t.name === "geocent") { if (a === "x" || a === "y" || a === "z") return; } else if (a === "x" || a === "y") @@ -21527,136 +19890,136 @@ function Sa(n, t, e, i) { r[a] = e[a]; }), r); } -function Eu(n) { - return n instanceof Be ? n : n.oProj ? n.oProj : Be(n); +function jc(i) { + return i instanceof Oe ? i : i.oProj ? i.oProj : Oe(i); } -function re(n, t, e) { - n = Eu(n); - var i = !1, s; - return typeof t > "u" ? (t = n, n = Mu, i = !0) : (typeof t.x < "u" || Array.isArray(t)) && (e = t, t = n, n = Mu, i = !0), t = Eu(t), e ? Sa(n, t, e) : (s = { +function ee(i, t, e) { + i = jc(i); + var n = !1, s; + return typeof t > "u" ? (t = i, i = Yc, n = !0) : (typeof t.x < "u" || Array.isArray(t)) && (e = t, t = i, i = Yc, n = !0), t = jc(t), e ? ta(i, t, e) : (s = { forward: function(r, o) { - return Sa(n, t, r, o); + return ta(i, t, r, o); }, inverse: function(r, o) { - return Sa(t, n, r, o); + return ta(t, i, r, o); } - }, i && (s.oProj = t), s); + }, n && (s.oProj = t), s); } -var wu = 6, eg = "AJSAJS", ig = "AFAFAF", kn = 65, ie = 73, Me = 79, Cs = 86, Ms = 90; -const _3 = { - forward: ng, - inverse: p3, - toPoint: sg +var Kc = 6, Sf = "AJSAJS", Rf = "AFAFAF", Cn = 65, qt = 73, pe = 79, os = 86, as = 90; +const Sx = { + forward: bf, + inverse: Rx, + toPoint: Lf }; -function ng(n, t) { - return t = t || 5, x3(y3({ - lat: n[1], - lon: n[0] +function bf(i, t) { + return t = t || 5, Tx(bx({ + lat: i[1], + lon: i[0] }), t); } -function p3(n) { - var t = _h(og(n.toUpperCase())); +function Rx(i) { + var t = Ul(If(i.toUpperCase())); return t.lat && t.lon ? [t.lon, t.lat, t.lon, t.lat] : [t.left, t.bottom, t.right, t.top]; } -function sg(n) { - var t = _h(og(n.toUpperCase())); +function Lf(i) { + var t = Ul(If(i.toUpperCase())); return t.lat && t.lon ? [t.lon, t.lat] : [(t.left + t.right) / 2, (t.top + t.bottom) / 2]; } -function Ra(n) { - return n * (Math.PI / 180); +function ea(i) { + return i * (Math.PI / 180); } -function Su(n) { - return 180 * (n / Math.PI); +function qc(i) { + return 180 * (i / Math.PI); } -function y3(n) { - var t = n.lat, e = n.lon, i = 6378137, s = 669438e-8, r = 0.9996, o, a, l, h, c, u, d, f = Ra(t), g = Ra(e), m, _; - _ = Math.floor((e + 180) / 6) + 1, e === 180 && (_ = 60), t >= 56 && t < 64 && e >= 3 && e < 12 && (_ = 32), t >= 72 && t < 84 && (e >= 0 && e < 9 ? _ = 31 : e >= 9 && e < 21 ? _ = 33 : e >= 21 && e < 33 ? _ = 35 : e >= 33 && e < 42 && (_ = 37)), o = (_ - 1) * 6 - 180 + 3, m = Ra(o), a = s / (1 - s), l = i / Math.sqrt(1 - s * Math.sin(f) * Math.sin(f)), h = Math.tan(f) * Math.tan(f), c = a * Math.cos(f) * Math.cos(f), u = Math.cos(f) * (g - m), d = i * ((1 - s / 4 - 3 * s * s / 64 - 5 * s * s * s / 256) * f - (3 * s / 8 + 3 * s * s / 32 + 45 * s * s * s / 1024) * Math.sin(2 * f) + (15 * s * s / 256 + 45 * s * s * s / 1024) * Math.sin(4 * f) - 35 * s * s * s / 3072 * Math.sin(6 * f)); +function bx(i) { + var t = i.lat, e = i.lon, n = 6378137, s = 669438e-8, r = 0.9996, o, a, l, h, c, u, d, f = ea(t), g = ea(e), m, _; + _ = Math.floor((e + 180) / 6) + 1, e === 180 && (_ = 60), t >= 56 && t < 64 && e >= 3 && e < 12 && (_ = 32), t >= 72 && t < 84 && (e >= 0 && e < 9 ? _ = 31 : e >= 9 && e < 21 ? _ = 33 : e >= 21 && e < 33 ? _ = 35 : e >= 33 && e < 42 && (_ = 37)), o = (_ - 1) * 6 - 180 + 3, m = ea(o), a = s / (1 - s), l = n / Math.sqrt(1 - s * Math.sin(f) * Math.sin(f)), h = Math.tan(f) * Math.tan(f), c = a * Math.cos(f) * Math.cos(f), u = Math.cos(f) * (g - m), d = n * ((1 - s / 4 - 3 * s * s / 64 - 5 * s * s * s / 256) * f - (3 * s / 8 + 3 * s * s / 32 + 45 * s * s * s / 1024) * Math.sin(2 * f) + (15 * s * s / 256 + 45 * s * s * s / 1024) * Math.sin(4 * f) - 35 * s * s * s / 3072 * Math.sin(6 * f)); var y = r * l * (u + (1 - h + c) * u * u * u / 6 + (5 - 18 * h + h * h + 72 * c - 58 * a) * u * u * u * u * u / 120) + 5e5, p = r * (d + l * Math.tan(f) * (u * u / 2 + (5 - h + 9 * c + 4 * c * c) * u * u * u * u / 24 + (61 - 58 * h + h * h + 600 * c - 330 * a) * u * u * u * u * u * u / 720)); return t < 0 && (p += 1e7), { northing: Math.round(p), easting: Math.round(y), zoneNumber: _, - zoneLetter: v3(t) + zoneLetter: Lx(t) }; } -function _h(n) { - var t = n.northing, e = n.easting, i = n.zoneLetter, s = n.zoneNumber; +function Ul(i) { + var t = i.northing, e = i.easting, n = i.zoneLetter, s = i.zoneNumber; if (s < 0 || s > 60) return null; var r = 0.9996, o = 6378137, a = 669438e-8, l, h = (1 - Math.sqrt(1 - a)) / (1 + Math.sqrt(1 - a)), c, u, d, f, g, m, _, y, p, v = e - 5e5, x = t; - i < "N" && (x -= 1e7), _ = (s - 1) * 6 - 180 + 3, l = a / (1 - a), m = x / r, y = m / (o * (1 - a / 4 - 3 * a * a / 64 - 5 * a * a * a / 256)), p = y + (3 * h / 2 - 27 * h * h * h / 32) * Math.sin(2 * y) + (21 * h * h / 16 - 55 * h * h * h * h / 32) * Math.sin(4 * y) + 151 * h * h * h / 96 * Math.sin(6 * y), c = o / Math.sqrt(1 - a * Math.sin(p) * Math.sin(p)), u = Math.tan(p) * Math.tan(p), d = l * Math.cos(p) * Math.cos(p), f = o * (1 - a) / Math.pow(1 - a * Math.sin(p) * Math.sin(p), 1.5), g = v / (c * r); - var C = p - c * Math.tan(p) / f * (g * g / 2 - (5 + 3 * u + 10 * d - 4 * d * d - 9 * l) * g * g * g * g / 24 + (61 + 90 * u + 298 * d + 45 * u * u - 252 * l - 3 * d * d) * g * g * g * g * g * g / 720); - C = Su(C); + n < "N" && (x -= 1e7), _ = (s - 1) * 6 - 180 + 3, l = a / (1 - a), m = x / r, y = m / (o * (1 - a / 4 - 3 * a * a / 64 - 5 * a * a * a / 256)), p = y + (3 * h / 2 - 27 * h * h * h / 32) * Math.sin(2 * y) + (21 * h * h / 16 - 55 * h * h * h * h / 32) * Math.sin(4 * y) + 151 * h * h * h / 96 * Math.sin(6 * y), c = o / Math.sqrt(1 - a * Math.sin(p) * Math.sin(p)), u = Math.tan(p) * Math.tan(p), d = l * Math.cos(p) * Math.cos(p), f = o * (1 - a) / Math.pow(1 - a * Math.sin(p) * Math.sin(p), 1.5), g = v / (c * r); + var M = p - c * Math.tan(p) / f * (g * g / 2 - (5 + 3 * u + 10 * d - 4 * d * d - 9 * l) * g * g * g * g / 24 + (61 + 90 * u + 298 * d + 45 * u * u - 252 * l - 3 * d * d) * g * g * g * g * g * g / 720); + M = qc(M); var E = (g - (1 + 2 * u + d) * g * g * g / 6 + (5 - 2 * d + 28 * u - 3 * d * d + 8 * l + 24 * u * u) * g * g * g * g * g / 120) / Math.cos(p); - E = _ + Su(E); + E = _ + qc(E); var R; - if (n.accuracy) { - var b = _h({ - northing: n.northing + n.accuracy, - easting: n.easting + n.accuracy, - zoneLetter: n.zoneLetter, - zoneNumber: n.zoneNumber + if (i.accuracy) { + var L = Ul({ + northing: i.northing + i.accuracy, + easting: i.easting + i.accuracy, + zoneLetter: i.zoneLetter, + zoneNumber: i.zoneNumber }); R = { - top: b.lat, - right: b.lon, - bottom: C, + top: L.lat, + right: L.lon, + bottom: M, left: E }; } else R = { - lat: C, + lat: M, lon: E }; return R; } -function v3(n) { +function Lx(i) { var t = "Z"; - return 84 >= n && n >= 72 ? t = "X" : 72 > n && n >= 64 ? t = "W" : 64 > n && n >= 56 ? t = "V" : 56 > n && n >= 48 ? t = "U" : 48 > n && n >= 40 ? t = "T" : 40 > n && n >= 32 ? t = "S" : 32 > n && n >= 24 ? t = "R" : 24 > n && n >= 16 ? t = "Q" : 16 > n && n >= 8 ? t = "P" : 8 > n && n >= 0 ? t = "N" : 0 > n && n >= -8 ? t = "M" : -8 > n && n >= -16 ? t = "L" : -16 > n && n >= -24 ? t = "K" : -24 > n && n >= -32 ? t = "J" : -32 > n && n >= -40 ? t = "H" : -40 > n && n >= -48 ? t = "G" : -48 > n && n >= -56 ? t = "F" : -56 > n && n >= -64 ? t = "E" : -64 > n && n >= -72 ? t = "D" : -72 > n && n >= -80 && (t = "C"), t; + return 84 >= i && i >= 72 ? t = "X" : 72 > i && i >= 64 ? t = "W" : 64 > i && i >= 56 ? t = "V" : 56 > i && i >= 48 ? t = "U" : 48 > i && i >= 40 ? t = "T" : 40 > i && i >= 32 ? t = "S" : 32 > i && i >= 24 ? t = "R" : 24 > i && i >= 16 ? t = "Q" : 16 > i && i >= 8 ? t = "P" : 8 > i && i >= 0 ? t = "N" : 0 > i && i >= -8 ? t = "M" : -8 > i && i >= -16 ? t = "L" : -16 > i && i >= -24 ? t = "K" : -24 > i && i >= -32 ? t = "J" : -32 > i && i >= -40 ? t = "H" : -40 > i && i >= -48 ? t = "G" : -48 > i && i >= -56 ? t = "F" : -56 > i && i >= -64 ? t = "E" : -64 > i && i >= -72 ? t = "D" : -72 > i && i >= -80 && (t = "C"), t; } -function x3(n, t) { - var e = "00000" + n.easting, i = "00000" + n.northing; - return n.zoneNumber + n.zoneLetter + C3(n.easting, n.northing, n.zoneNumber) + e.substr(e.length - 5, t) + i.substr(i.length - 5, t); +function Tx(i, t) { + var e = "00000" + i.easting, n = "00000" + i.northing; + return i.zoneNumber + i.zoneLetter + Ix(i.easting, i.northing, i.zoneNumber) + e.substr(e.length - 5, t) + n.substr(n.length - 5, t); } -function C3(n, t, e) { - var i = rg(e), s = Math.floor(n / 1e5), r = Math.floor(t / 1e5) % 20; - return M3(s, r, i); +function Ix(i, t, e) { + var n = Tf(e), s = Math.floor(i / 1e5), r = Math.floor(t / 1e5) % 20; + return Ax(s, r, n); } -function rg(n) { - var t = n % wu; - return t === 0 && (t = wu), t; +function Tf(i) { + var t = i % Kc; + return t === 0 && (t = Kc), t; } -function M3(n, t, e) { - var i = e - 1, s = eg.charCodeAt(i), r = ig.charCodeAt(i), o = s + n - 1, a = r + t, l = !1; - o > Ms && (o = o - Ms + kn - 1, l = !0), (o === ie || s < ie && o > ie || (o > ie || s < ie) && l) && o++, (o === Me || s < Me && o > Me || (o > Me || s < Me) && l) && (o++, o === ie && o++), o > Ms && (o = o - Ms + kn - 1), a > Cs ? (a = a - Cs + kn - 1, l = !0) : l = !1, (a === ie || r < ie && a > ie || (a > ie || r < ie) && l) && a++, (a === Me || r < Me && a > Me || (a > Me || r < Me) && l) && (a++, a === ie && a++), a > Cs && (a = a - Cs + kn - 1); +function Ax(i, t, e) { + var n = e - 1, s = Sf.charCodeAt(n), r = Rf.charCodeAt(n), o = s + i - 1, a = r + t, l = !1; + o > as && (o = o - as + Cn - 1, l = !0), (o === qt || s < qt && o > qt || (o > qt || s < qt) && l) && o++, (o === pe || s < pe && o > pe || (o > pe || s < pe) && l) && (o++, o === qt && o++), o > as && (o = o - as + Cn - 1), a > os ? (a = a - os + Cn - 1, l = !0) : l = !1, (a === qt || r < qt && a > qt || (a > qt || r < qt) && l) && a++, (a === pe || r < pe && a > pe || (a > pe || r < pe) && l) && (a++, a === qt && a++), a > os && (a = a - os + Cn - 1); var h = String.fromCharCode(o) + String.fromCharCode(a); return h; } -function og(n) { - if (n && n.length === 0) +function If(i) { + if (i && i.length === 0) throw "MGRSPoint coverting from nothing"; - for (var t = n.length, e = null, i = "", s, r = 0; !/[A-Z]/.test(s = n.charAt(r)); ) { + for (var t = i.length, e = null, n = "", s, r = 0; !/[A-Z]/.test(s = i.charAt(r)); ) { if (r >= 2) - throw "MGRSPoint bad conversion from: " + n; - i += s, r++; + throw "MGRSPoint bad conversion from: " + i; + n += s, r++; } - var o = parseInt(i, 10); + var o = parseInt(n, 10); if (r === 0 || r + 3 > t) - throw "MGRSPoint bad conversion from: " + n; - var a = n.charAt(r++); + throw "MGRSPoint bad conversion from: " + i; + var a = i.charAt(r++); if (a <= "A" || a === "B" || a === "Y" || a >= "Z" || a === "I" || a === "O") - throw "MGRSPoint zone letter " + a + " not handled: " + n; - e = n.substring(r, r += 2); - for (var l = rg(o), h = E3(e.charAt(0), l), c = w3(e.charAt(1), l); c < S3(a); ) + throw "MGRSPoint zone letter " + a + " not handled: " + i; + e = i.substring(r, r += 2); + for (var l = Tf(o), h = Px(e.charAt(0), l), c = Ox(e.charAt(1), l); c < Nx(a); ) c += 2e6; var u = t - r; if (u % 2 !== 0) throw `MGRSPoint has to have an even number of digits after the zone letter and two 100km letters - front half for easting meters, second half for -northing meters` + n; +northing meters` + i; var d = u / 2, f = 0, g = 0, m, _, y, p, v; - return d > 0 && (m = 1e5 / Math.pow(10, d), _ = n.substring(r, r + d), f = parseFloat(_) * m, y = n.substring(r + d), g = parseFloat(y) * m), p = f + h, v = g + c, { + return d > 0 && (m = 1e5 / Math.pow(10, d), _ = i.substring(r, r + d), f = parseFloat(_) * m, y = i.substring(r + d), g = parseFloat(y) * m), p = f + h, v = g + c, { easting: p, northing: v, zoneLetter: a, @@ -21664,33 +20027,33 @@ northing meters` + n; accuracy: m }; } -function E3(n, t) { - for (var e = eg.charCodeAt(t - 1), i = 1e5, s = !1; e !== n.charCodeAt(0); ) { - if (e++, e === ie && e++, e === Me && e++, e > Ms) { +function Px(i, t) { + for (var e = Sf.charCodeAt(t - 1), n = 1e5, s = !1; e !== i.charCodeAt(0); ) { + if (e++, e === qt && e++, e === pe && e++, e > as) { if (s) - throw "Bad character: " + n; - e = kn, s = !0; + throw "Bad character: " + i; + e = Cn, s = !0; } - i += 1e5; + n += 1e5; } - return i; + return n; } -function w3(n, t) { - if (n > "V") - throw "MGRSPoint given invalid Northing " + n; - for (var e = ig.charCodeAt(t - 1), i = 0, s = !1; e !== n.charCodeAt(0); ) { - if (e++, e === ie && e++, e === Me && e++, e > Cs) { +function Ox(i, t) { + if (i > "V") + throw "MGRSPoint given invalid Northing " + i; + for (var e = Rf.charCodeAt(t - 1), n = 0, s = !1; e !== i.charCodeAt(0); ) { + if (e++, e === qt && e++, e === pe && e++, e > os) { if (s) - throw "Bad character: " + n; - e = kn, s = !0; + throw "Bad character: " + i; + e = Cn, s = !0; } - i += 1e5; + n += 1e5; } - return i; + return n; } -function S3(n) { +function Nx(i) { var t; - switch (n) { + switch (i) { case "C": t = 11e5; break; @@ -21756,62 +20119,62 @@ function S3(n) { } if (t >= 0) return t; - throw "Invalid zone letter: " + n; -} -function Qn(n, t, e) { - if (!(this instanceof Qn)) - return new Qn(n, t, e); - if (Array.isArray(n)) - this.x = n[0], this.y = n[1], this.z = n[2] || 0; - else if (typeof n == "object") - this.x = n.x, this.y = n.y, this.z = n.z || 0; - else if (typeof n == "string" && typeof t > "u") { - var i = n.split(","); - this.x = parseFloat(i[0], 10), this.y = parseFloat(i[1], 10), this.z = parseFloat(i[2], 10) || 0; + throw "Invalid zone letter: " + i; +} +function Gn(i, t, e) { + if (!(this instanceof Gn)) + return new Gn(i, t, e); + if (Array.isArray(i)) + this.x = i[0], this.y = i[1], this.z = i[2] || 0; + else if (typeof i == "object") + this.x = i.x, this.y = i.y, this.z = i.z || 0; + else if (typeof i == "string" && typeof t > "u") { + var n = i.split(","); + this.x = parseFloat(n[0], 10), this.y = parseFloat(n[1], 10), this.z = parseFloat(n[2], 10) || 0; } else - this.x = n, this.y = t, this.z = e || 0; + this.x = i, this.y = t, this.z = e || 0; console.warn("proj4.Point will be removed in version 3, use proj4.toPoint"); } -Qn.fromMGRS = function(n) { - return new Qn(sg(n)); +Gn.fromMGRS = function(i) { + return new Gn(Lf(i)); }; -Qn.prototype.toMGRS = function(n) { - return ng([this.x, this.y], n); +Gn.prototype.toMGRS = function(i) { + return bf([this.x, this.y], i); }; -var R3 = 1, T3 = 0.25, Ru = 0.046875, Tu = 0.01953125, bu = 0.01068115234375, b3 = 0.75, L3 = 0.46875, I3 = 0.013020833333333334, P3 = 0.007120768229166667, A3 = 0.3645833333333333, O3 = 0.005696614583333333, F3 = 0.3076171875; -function ag(n) { +var Fx = 1, Dx = 0.25, Jc = 0.046875, Qc = 0.01953125, tu = 0.01068115234375, kx = 0.75, Gx = 0.46875, $x = 0.013020833333333334, Bx = 0.007120768229166667, zx = 0.3645833333333333, Zx = 0.005696614583333333, Ux = 0.3076171875; +function Af(i) { var t = []; - t[0] = R3 - n * (T3 + n * (Ru + n * (Tu + n * bu))), t[1] = n * (b3 - n * (Ru + n * (Tu + n * bu))); - var e = n * n; - return t[2] = e * (L3 - n * (I3 + n * P3)), e *= n, t[3] = e * (A3 - n * O3), t[4] = e * n * F3, t; + t[0] = Fx - i * (Dx + i * (Jc + i * (Qc + i * tu))), t[1] = i * (kx - i * (Jc + i * (Qc + i * tu))); + var e = i * i; + return t[2] = e * (Gx - i * ($x + i * Bx)), e *= i, t[3] = e * (zx - i * Zx), t[4] = e * i * Ux, t; } -function Ho(n, t, e, i) { - return e *= t, t *= t, i[0] * n - e * (i[1] + t * (i[2] + t * (i[3] + t * i[4]))); +function Ro(i, t, e, n) { + return e *= t, t *= t, n[0] * i - e * (n[1] + t * (n[2] + t * (n[3] + t * n[4]))); } -var N3 = 20; -function lg(n, t, e) { - for (var i = 1 / (1 - t), s = n, r = N3; r; --r) { +var Vx = 20; +function Pf(i, t, e) { + for (var n = 1 / (1 - t), s = i, r = Vx; r; --r) { var o = Math.sin(s), a = 1 - t * o * o; - if (a = (Ho(s, o, Math.cos(s), e) - n) * (a * Math.sqrt(a)) * i, s -= a, Math.abs(a) < I) + if (a = (Ro(s, o, Math.cos(s), e) - i) * (a * Math.sqrt(a)) * n, s -= a, Math.abs(a) < I) return s; } return s; } -function D3() { - this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.es && (this.en = ag(this.es), this.ml0 = Ho(this.lat0, Math.sin(this.lat0), Math.cos(this.lat0), this.en)); +function Wx() { + this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.es && (this.en = Af(this.es), this.ml0 = Ro(this.lat0, Math.sin(this.lat0), Math.cos(this.lat0), this.en)); } -function k3(n) { - var t = n.x, e = n.y, i = A(t - this.long0), s, r, o, a = Math.sin(e), l = Math.cos(e); +function Hx(i) { + var t = i.x, e = i.y, n = P(t - this.long0), s, r, o, a = Math.sin(e), l = Math.cos(e); if (this.es) { - var c = l * i, u = Math.pow(c, 2), d = this.ep2 * Math.pow(l, 2), f = Math.pow(d, 2), g = Math.abs(l) > I ? Math.tan(e) : 0, m = Math.pow(g, 2), _ = Math.pow(m, 2); + var c = l * n, u = Math.pow(c, 2), d = this.ep2 * Math.pow(l, 2), f = Math.pow(d, 2), g = Math.abs(l) > I ? Math.tan(e) : 0, m = Math.pow(g, 2), _ = Math.pow(m, 2); s = 1 - this.es * Math.pow(a, 2), c = c / Math.sqrt(s); - var y = Ho(e, a, l, this.en); - r = this.a * (this.k0 * c * (1 + u / 6 * (1 - m + d + u / 20 * (5 - 18 * m + _ + 14 * d - 58 * m * d + u / 42 * (61 + 179 * _ - _ * m - 479 * m))))) + this.x0, o = this.a * (this.k0 * (y - this.ml0 + a * i * c / 2 * (1 + u / 12 * (5 - m + 9 * d + 4 * f + u / 30 * (61 + _ - 58 * m + 270 * d - 330 * m * d + u / 56 * (1385 + 543 * _ - _ * m - 3111 * m)))))) + this.y0; + var y = Ro(e, a, l, this.en); + r = this.a * (this.k0 * c * (1 + u / 6 * (1 - m + d + u / 20 * (5 - 18 * m + _ + 14 * d - 58 * m * d + u / 42 * (61 + 179 * _ - _ * m - 479 * m))))) + this.x0, o = this.a * (this.k0 * (y - this.ml0 + a * n * c / 2 * (1 + u / 12 * (5 - m + 9 * d + 4 * f + u / 30 * (61 + _ - 58 * m + 270 * d - 330 * m * d + u / 56 * (1385 + 543 * _ - _ * m - 3111 * m)))))) + this.y0; } else { - var h = l * Math.sin(i); + var h = l * Math.sin(n); if (Math.abs(Math.abs(h) - 1) < I) return 93; - if (r = 0.5 * this.a * this.k0 * Math.log((1 + h) / (1 - h)) + this.x0, o = l * Math.cos(i) / Math.sqrt(1 - Math.pow(h, 2)), h = Math.abs(o), h >= 1) { + if (r = 0.5 * this.a * this.k0 * Math.log((1 + h) / (1 - h)) + this.x0, o = l * Math.cos(n) / Math.sqrt(1 - Math.pow(h, 2)), h = Math.abs(o), h >= 1) { if (h - 1 > I) return 93; o = 0; @@ -21819,314 +20182,314 @@ function k3(n) { o = Math.acos(o); e < 0 && (o = -o), o = this.a * this.k0 * (o - this.lat0) + this.y0; } - return n.x = r, n.y = o, n; + return i.x = r, i.y = o, i; } -function G3(n) { - var t, e, i, s, r = (n.x - this.x0) * (1 / this.a), o = (n.y - this.y0) * (1 / this.a); +function Xx(i) { + var t, e, n, s, r = (i.x - this.x0) * (1 / this.a), o = (i.y - this.y0) * (1 / this.a); if (this.es) - if (t = this.ml0 + o / this.k0, e = lg(t, this.es, this.en), Math.abs(e) < S) { + if (t = this.ml0 + o / this.k0, e = Pf(t, this.es, this.en), Math.abs(e) < S) { var u = Math.sin(e), d = Math.cos(e), f = Math.abs(d) > I ? Math.tan(e) : 0, g = this.ep2 * Math.pow(d, 2), m = Math.pow(g, 2), _ = Math.pow(f, 2), y = Math.pow(_, 2); t = 1 - this.es * Math.pow(u, 2); var p = r * Math.sqrt(t) / this.k0, v = Math.pow(p, 2); - t = t * f, i = e - t * v / (1 - this.es) * 0.5 * (1 - v / 12 * (5 + 3 * _ - 9 * g * _ + g - 4 * m - v / 30 * (61 + 90 * _ - 252 * g * _ + 45 * y + 46 * g - v / 56 * (1385 + 3633 * _ + 4095 * y + 1574 * y * _)))), s = A(this.long0 + p * (1 - v / 6 * (1 + 2 * _ + g - v / 20 * (5 + 28 * _ + 24 * y + 8 * g * _ + 6 * g - v / 42 * (61 + 662 * _ + 1320 * y + 720 * y * _)))) / d); + t = t * f, n = e - t * v / (1 - this.es) * 0.5 * (1 - v / 12 * (5 + 3 * _ - 9 * g * _ + g - 4 * m - v / 30 * (61 + 90 * _ - 252 * g * _ + 45 * y + 46 * g - v / 56 * (1385 + 3633 * _ + 4095 * y + 1574 * y * _)))), s = P(this.long0 + p * (1 - v / 6 * (1 + 2 * _ + g - v / 20 * (5 + 28 * _ + 24 * y + 8 * g * _ + 6 * g - v / 42 * (61 + 662 * _ + 1320 * y + 720 * y * _)))) / d); } else - i = S * cr(o), s = 0; + n = S * Ks(o), s = 0; else { var a = Math.exp(r / this.k0), l = 0.5 * (a - 1 / a), h = this.lat0 + o / this.k0, c = Math.cos(h); - t = Math.sqrt((1 - Math.pow(c, 2)) / (1 + Math.pow(l, 2))), i = Math.asin(t), o < 0 && (i = -i), l === 0 && c === 0 ? s = 0 : s = A(Math.atan2(l, c) + this.long0); + t = Math.sqrt((1 - Math.pow(c, 2)) / (1 + Math.pow(l, 2))), n = Math.asin(t), o < 0 && (n = -n), l === 0 && c === 0 ? s = 0 : s = P(Math.atan2(l, c) + this.long0); } - return n.x = s, n.y = i, n; + return i.x = s, i.y = n, i; } -var $3 = ["Fast_Transverse_Mercator", "Fast Transverse Mercator"]; -const Yr = { - init: D3, - forward: k3, - inverse: G3, - names: $3 +var Yx = ["Fast_Transverse_Mercator", "Fast Transverse Mercator"]; +const Tr = { + init: Wx, + forward: Hx, + inverse: Xx, + names: Yx }; -function hg(n) { - var t = Math.exp(n); +function Of(i) { + var t = Math.exp(i); return t = (t - 1 / t) / 2, t; } -function Pe(n, t) { - n = Math.abs(n), t = Math.abs(t); - var e = Math.max(n, t), i = Math.min(n, t) / (e || 1); - return e * Math.sqrt(1 + Math.pow(i, 2)); +function Ce(i, t) { + i = Math.abs(i), t = Math.abs(t); + var e = Math.max(i, t), n = Math.min(i, t) / (e || 1); + return e * Math.sqrt(1 + Math.pow(n, 2)); } -function B3(n) { - var t = 1 + n, e = t - 1; - return e === 0 ? n : n * Math.log(t) / e; +function jx(i) { + var t = 1 + i, e = t - 1; + return e === 0 ? i : i * Math.log(t) / e; } -function z3(n) { - var t = Math.abs(n); - return t = B3(t * (1 + t / (Pe(1, t) + 1))), n < 0 ? -t : t; +function Kx(i) { + var t = Math.abs(i); + return t = jx(t * (1 + t / (Ce(1, t) + 1))), i < 0 ? -t : t; } -function ph(n, t) { - for (var e = 2 * Math.cos(2 * t), i = n.length - 1, s = n[i], r = 0, o; --i >= 0; ) - o = -r + e * s + n[i], r = s, s = o; +function Vl(i, t) { + for (var e = 2 * Math.cos(2 * t), n = i.length - 1, s = i[n], r = 0, o; --n >= 0; ) + o = -r + e * s + i[n], r = s, s = o; return t + o * Math.sin(2 * t); } -function Z3(n, t) { - for (var e = 2 * Math.cos(t), i = n.length - 1, s = n[i], r = 0, o; --i >= 0; ) - o = -r + e * s + n[i], r = s, s = o; +function qx(i, t) { + for (var e = 2 * Math.cos(t), n = i.length - 1, s = i[n], r = 0, o; --n >= 0; ) + o = -r + e * s + i[n], r = s, s = o; return Math.sin(t) * o; } -function V3(n) { - var t = Math.exp(n); +function Jx(i) { + var t = Math.exp(i); return t = (t + 1 / t) / 2, t; } -function cg(n, t, e) { - for (var i = Math.sin(t), s = Math.cos(t), r = hg(e), o = V3(e), a = 2 * s * o, l = -2 * i * r, h = n.length - 1, c = n[h], u = 0, d = 0, f = 0, g, m; --h >= 0; ) - g = d, m = u, d = c, u = f, c = -g + a * d - l * u + n[h], f = -m + l * d + a * u; - return a = i * o, l = s * r, [a * c - l * f, a * f + l * c]; +function Nf(i, t, e) { + for (var n = Math.sin(t), s = Math.cos(t), r = Of(e), o = Jx(e), a = 2 * s * o, l = -2 * n * r, h = i.length - 1, c = i[h], u = 0, d = 0, f = 0, g, m; --h >= 0; ) + g = d, m = u, d = c, u = f, c = -g + a * d - l * u + i[h], f = -m + l * d + a * u; + return a = n * o, l = s * r, [a * c - l * f, a * f + l * c]; } -function U3() { +function Qx() { if (!this.approx && (isNaN(this.es) || this.es <= 0)) throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.'); - this.approx && (Yr.init.apply(this), this.forward = Yr.forward, this.inverse = Yr.inverse), this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.cgb = [], this.cbg = [], this.utg = [], this.gtu = []; - var n = this.es / (1 + Math.sqrt(1 - this.es)), t = n / (2 - n), e = t; + this.approx && (Tr.init.apply(this), this.forward = Tr.forward, this.inverse = Tr.inverse), this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.cgb = [], this.cbg = [], this.utg = [], this.gtu = []; + var i = this.es / (1 + Math.sqrt(1 - this.es)), t = i / (2 - i), e = t; this.cgb[0] = t * (2 + t * (-2 / 3 + t * (-2 + t * (116 / 45 + t * (26 / 45 + t * (-2854 / 675)))))), this.cbg[0] = t * (-2 + t * (2 / 3 + t * (4 / 3 + t * (-82 / 45 + t * (32 / 45 + t * (4642 / 4725)))))), e = e * t, this.cgb[1] = e * (7 / 3 + t * (-8 / 5 + t * (-227 / 45 + t * (2704 / 315 + t * (2323 / 945))))), this.cbg[1] = e * (5 / 3 + t * (-16 / 15 + t * (-13 / 9 + t * (904 / 315 + t * (-1522 / 945))))), e = e * t, this.cgb[2] = e * (56 / 15 + t * (-136 / 35 + t * (-1262 / 105 + t * (73814 / 2835)))), this.cbg[2] = e * (-26 / 15 + t * (34 / 21 + t * (8 / 5 + t * (-12686 / 2835)))), e = e * t, this.cgb[3] = e * (4279 / 630 + t * (-332 / 35 + t * (-399572 / 14175))), this.cbg[3] = e * (1237 / 630 + t * (-12 / 5 + t * (-24832 / 14175))), e = e * t, this.cgb[4] = e * (4174 / 315 + t * (-144838 / 6237)), this.cbg[4] = e * (-734 / 315 + t * (109598 / 31185)), e = e * t, this.cgb[5] = e * (601676 / 22275), this.cbg[5] = e * (444337 / 155925), e = Math.pow(t, 2), this.Qn = this.k0 / (1 + t) * (1 + e * (1 / 4 + e * (1 / 64 + e / 256))), this.utg[0] = t * (-0.5 + t * (2 / 3 + t * (-37 / 96 + t * (1 / 360 + t * (81 / 512 + t * (-96199 / 604800)))))), this.gtu[0] = t * (0.5 + t * (-2 / 3 + t * (5 / 16 + t * (41 / 180 + t * (-127 / 288 + t * (7891 / 37800)))))), this.utg[1] = e * (-1 / 48 + t * (-1 / 15 + t * (437 / 1440 + t * (-46 / 105 + t * (1118711 / 3870720))))), this.gtu[1] = e * (13 / 48 + t * (-3 / 5 + t * (557 / 1440 + t * (281 / 630 + t * (-1983433 / 1935360))))), e = e * t, this.utg[2] = e * (-17 / 480 + t * (37 / 840 + t * (209 / 4480 + t * (-5569 / 90720)))), this.gtu[2] = e * (61 / 240 + t * (-103 / 140 + t * (15061 / 26880 + t * (167603 / 181440)))), e = e * t, this.utg[3] = e * (-4397 / 161280 + t * (11 / 504 + t * (830251 / 7257600))), this.gtu[3] = e * (49561 / 161280 + t * (-179 / 168 + t * (6601661 / 7257600))), e = e * t, this.utg[4] = e * (-4583 / 161280 + t * (108847 / 3991680)), this.gtu[4] = e * (34729 / 80640 + t * (-3418889 / 1995840)), e = e * t, this.utg[5] = e * (-20648693 / 638668800), this.gtu[5] = e * (212378941 / 319334400); - var i = ph(this.cbg, this.lat0); - this.Zb = -this.Qn * (i + Z3(this.gtu, 2 * i)); -} -function W3(n) { - var t = A(n.x - this.long0), e = n.y; - e = ph(this.cbg, e); - var i = Math.sin(e), s = Math.cos(e), r = Math.sin(t), o = Math.cos(t); - e = Math.atan2(i, o * s), t = Math.atan2(r * s, Pe(i, s * o)), t = z3(Math.tan(t)); - var a = cg(this.gtu, 2 * e, 2 * t); + var n = Vl(this.cbg, this.lat0); + this.Zb = -this.Qn * (n + qx(this.gtu, 2 * n)); +} +function t3(i) { + var t = P(i.x - this.long0), e = i.y; + e = Vl(this.cbg, e); + var n = Math.sin(e), s = Math.cos(e), r = Math.sin(t), o = Math.cos(t); + e = Math.atan2(n, o * s), t = Math.atan2(r * s, Ce(n, s * o)), t = Kx(Math.tan(t)); + var a = Nf(this.gtu, 2 * e, 2 * t); e = e + a[0], t = t + a[1]; var l, h; - return Math.abs(t) <= 2.623395162778 ? (l = this.a * (this.Qn * t) + this.x0, h = this.a * (this.Qn * e + this.Zb) + this.y0) : (l = 1 / 0, h = 1 / 0), n.x = l, n.y = h, n; + return Math.abs(t) <= 2.623395162778 ? (l = this.a * (this.Qn * t) + this.x0, h = this.a * (this.Qn * e + this.Zb) + this.y0) : (l = 1 / 0, h = 1 / 0), i.x = l, i.y = h, i; } -function H3(n) { - var t = (n.x - this.x0) * (1 / this.a), e = (n.y - this.y0) * (1 / this.a); +function e3(i) { + var t = (i.x - this.x0) * (1 / this.a), e = (i.y - this.y0) * (1 / this.a); e = (e - this.Zb) / this.Qn, t = t / this.Qn; - var i, s; + var n, s; if (Math.abs(t) <= 2.623395162778) { - var r = cg(this.utg, 2 * e, 2 * t); - e = e + r[0], t = t + r[1], t = Math.atan(hg(t)); + var r = Nf(this.utg, 2 * e, 2 * t); + e = e + r[0], t = t + r[1], t = Math.atan(Of(t)); var o = Math.sin(e), a = Math.cos(e), l = Math.sin(t), h = Math.cos(t); - e = Math.atan2(o * h, Pe(l, h * a)), t = Math.atan2(l, h * a), i = A(t + this.long0), s = ph(this.cgb, e); + e = Math.atan2(o * h, Ce(l, h * a)), t = Math.atan2(l, h * a), n = P(t + this.long0), s = Vl(this.cgb, e); } else - i = 1 / 0, s = 1 / 0; - return n.x = i, n.y = s, n; -} -var X3 = ["Extended_Transverse_Mercator", "Extended Transverse Mercator", "etmerc", "Transverse_Mercator", "Transverse Mercator", "tmerc"]; -const jr = { - init: U3, - forward: W3, - inverse: H3, - names: X3 + n = 1 / 0, s = 1 / 0; + return i.x = n, i.y = s, i; +} +var i3 = ["Extended_Transverse_Mercator", "Extended Transverse Mercator", "etmerc", "Transverse_Mercator", "Transverse Mercator", "tmerc"]; +const Ir = { + init: Qx, + forward: t3, + inverse: e3, + names: i3 }; -function Y3(n, t) { - if (n === void 0) { - if (n = Math.floor((A(t) + Math.PI) * 30 / Math.PI) + 1, n < 0) +function n3(i, t) { + if (i === void 0) { + if (i = Math.floor((P(t) + Math.PI) * 30 / Math.PI) + 1, i < 0) return 0; - if (n > 60) + if (i > 60) return 60; } - return n; + return i; } -var j3 = "etmerc"; -function q3() { - var n = Y3(this.zone, this.long0); - if (n === void 0) +var s3 = "etmerc"; +function r3() { + var i = n3(this.zone, this.long0); + if (i === void 0) throw new Error("unknown utm zone"); - this.lat0 = 0, this.long0 = (6 * Math.abs(n) - 183) * zt, this.x0 = 5e5, this.y0 = this.utmSouth ? 1e7 : 0, this.k0 = 0.9996, jr.init.apply(this), this.forward = jr.forward, this.inverse = jr.inverse; + this.lat0 = 0, this.long0 = (6 * Math.abs(i) - 183) * $t, this.x0 = 5e5, this.y0 = this.utmSouth ? 1e7 : 0, this.k0 = 0.9996, Ir.init.apply(this), this.forward = Ir.forward, this.inverse = Ir.inverse; } -var K3 = ["Universal Transverse Mercator System", "utm"]; -const J3 = { - init: q3, - names: K3, - dependsOn: j3 +var o3 = ["Universal Transverse Mercator System", "utm"]; +const a3 = { + init: r3, + names: o3, + dependsOn: s3 }; -function yh(n, t) { - return Math.pow((1 - n) / (1 + n), t); -} -var Q3 = 20; -function tC() { - var n = Math.sin(this.lat0), t = Math.cos(this.lat0); - t *= t, this.rc = Math.sqrt(1 - this.es) / (1 - this.es * n * n), this.C = Math.sqrt(1 + this.es * t * t / (1 - this.es)), this.phic0 = Math.asin(n / this.C), this.ratexp = 0.5 * this.C * this.e, this.K = Math.tan(0.5 * this.phic0 + ct) / (Math.pow(Math.tan(0.5 * this.lat0 + ct), this.C) * yh(this.e * n, this.ratexp)); -} -function eC(n) { - var t = n.x, e = n.y; - return n.y = 2 * Math.atan(this.K * Math.pow(Math.tan(0.5 * e + ct), this.C) * yh(this.e * Math.sin(e), this.ratexp)) - S, n.x = this.C * t, n; -} -function iC(n) { - for (var t = 1e-14, e = n.x / this.C, i = n.y, s = Math.pow(Math.tan(0.5 * i + ct) / this.K, 1 / this.C), r = Q3; r > 0 && (i = 2 * Math.atan(s * yh(this.e * Math.sin(n.y), -0.5 * this.e)) - S, !(Math.abs(i - n.y) < t)); --r) - n.y = i; - return r ? (n.x = e, n.y = i, n) : null; -} -var nC = ["gauss"]; -const vh = { - init: tC, - forward: eC, - inverse: iC, - names: nC +function Wl(i, t) { + return Math.pow((1 - i) / (1 + i), t); +} +var l3 = 20; +function h3() { + var i = Math.sin(this.lat0), t = Math.cos(this.lat0); + t *= t, this.rc = Math.sqrt(1 - this.es) / (1 - this.es * i * i), this.C = Math.sqrt(1 + this.es * t * t / (1 - this.es)), this.phic0 = Math.asin(i / this.C), this.ratexp = 0.5 * this.C * this.e, this.K = Math.tan(0.5 * this.phic0 + ht) / (Math.pow(Math.tan(0.5 * this.lat0 + ht), this.C) * Wl(this.e * i, this.ratexp)); +} +function c3(i) { + var t = i.x, e = i.y; + return i.y = 2 * Math.atan(this.K * Math.pow(Math.tan(0.5 * e + ht), this.C) * Wl(this.e * Math.sin(e), this.ratexp)) - S, i.x = this.C * t, i; +} +function u3(i) { + for (var t = 1e-14, e = i.x / this.C, n = i.y, s = Math.pow(Math.tan(0.5 * n + ht) / this.K, 1 / this.C), r = l3; r > 0 && (n = 2 * Math.atan(s * Wl(this.e * Math.sin(i.y), -0.5 * this.e)) - S, !(Math.abs(n - i.y) < t)); --r) + i.y = n; + return r ? (i.x = e, i.y = n, i) : null; +} +var d3 = ["gauss"]; +const Hl = { + init: h3, + forward: c3, + inverse: u3, + names: d3 }; -function sC() { - vh.init.apply(this), this.rc && (this.sinc0 = Math.sin(this.phic0), this.cosc0 = Math.cos(this.phic0), this.R2 = 2 * this.rc, this.title || (this.title = "Oblique Stereographic Alternative")); +function f3() { + Hl.init.apply(this), this.rc && (this.sinc0 = Math.sin(this.phic0), this.cosc0 = Math.cos(this.phic0), this.R2 = 2 * this.rc, this.title || (this.title = "Oblique Stereographic Alternative")); } -function rC(n) { - var t, e, i, s; - return n.x = A(n.x - this.long0), vh.forward.apply(this, [n]), t = Math.sin(n.y), e = Math.cos(n.y), i = Math.cos(n.x), s = this.k0 * this.R2 / (1 + this.sinc0 * t + this.cosc0 * e * i), n.x = s * e * Math.sin(n.x), n.y = s * (this.cosc0 * t - this.sinc0 * e * i), n.x = this.a * n.x + this.x0, n.y = this.a * n.y + this.y0, n; +function g3(i) { + var t, e, n, s; + return i.x = P(i.x - this.long0), Hl.forward.apply(this, [i]), t = Math.sin(i.y), e = Math.cos(i.y), n = Math.cos(i.x), s = this.k0 * this.R2 / (1 + this.sinc0 * t + this.cosc0 * e * n), i.x = s * e * Math.sin(i.x), i.y = s * (this.cosc0 * t - this.sinc0 * e * n), i.x = this.a * i.x + this.x0, i.y = this.a * i.y + this.y0, i; } -function oC(n) { - var t, e, i, s, r; - if (n.x = (n.x - this.x0) / this.a, n.y = (n.y - this.y0) / this.a, n.x /= this.k0, n.y /= this.k0, r = Math.sqrt(n.x * n.x + n.y * n.y)) { +function m3(i) { + var t, e, n, s, r; + if (i.x = (i.x - this.x0) / this.a, i.y = (i.y - this.y0) / this.a, i.x /= this.k0, i.y /= this.k0, r = Math.sqrt(i.x * i.x + i.y * i.y)) { var o = 2 * Math.atan2(r, this.R2); - t = Math.sin(o), e = Math.cos(o), s = Math.asin(e * this.sinc0 + n.y * t * this.cosc0 / r), i = Math.atan2(n.x * t, r * this.cosc0 * e - n.y * this.sinc0 * t); + t = Math.sin(o), e = Math.cos(o), s = Math.asin(e * this.sinc0 + i.y * t * this.cosc0 / r), n = Math.atan2(i.x * t, r * this.cosc0 * e - i.y * this.sinc0 * t); } else - s = this.phic0, i = 0; - return n.x = i, n.y = s, vh.inverse.apply(this, [n]), n.x = A(n.x + this.long0), n; -} -var aC = ["Stereographic_North_Pole", "Oblique_Stereographic", "Polar_Stereographic", "sterea", "Oblique Stereographic Alternative", "Double_Stereographic"]; -const lC = { - init: sC, - forward: rC, - inverse: oC, - names: aC + s = this.phic0, n = 0; + return i.x = n, i.y = s, Hl.inverse.apply(this, [i]), i.x = P(i.x + this.long0), i; +} +var _3 = ["Stereographic_North_Pole", "Oblique_Stereographic", "Polar_Stereographic", "sterea", "Oblique Stereographic Alternative", "Double_Stereographic"]; +const p3 = { + init: f3, + forward: g3, + inverse: m3, + names: _3 }; -function hC(n, t, e) { - return t *= e, Math.tan(0.5 * (S + n)) * Math.pow((1 - t) / (1 + t), 0.5 * e); +function y3(i, t, e) { + return t *= e, Math.tan(0.5 * (S + i)) * Math.pow((1 - t) / (1 + t), 0.5 * e); } -function cC() { - this.coslat0 = Math.cos(this.lat0), this.sinlat0 = Math.sin(this.lat0), this.sphere ? this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= I && (this.k0 = 0.5 * (1 + cr(this.lat0) * Math.sin(this.lat_ts))) : (Math.abs(this.coslat0) <= I && (this.lat0 > 0 ? this.con = 1 : this.con = -1), this.cons = Math.sqrt(Math.pow(1 + this.e, 1 + this.e) * Math.pow(1 - this.e, 1 - this.e)), this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= I && (this.k0 = 0.5 * this.cons * We(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) / Ae(this.e, this.con * this.lat_ts, this.con * Math.sin(this.lat_ts))), this.ms1 = We(this.e, this.sinlat0, this.coslat0), this.X0 = 2 * Math.atan(this.ssfn_(this.lat0, this.sinlat0, this.e)) - S, this.cosX0 = Math.cos(this.X0), this.sinX0 = Math.sin(this.X0)); +function v3() { + this.coslat0 = Math.cos(this.lat0), this.sinlat0 = Math.sin(this.lat0), this.sphere ? this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= I && (this.k0 = 0.5 * (1 + Ks(this.lat0) * Math.sin(this.lat_ts))) : (Math.abs(this.coslat0) <= I && (this.lat0 > 0 ? this.con = 1 : this.con = -1), this.cons = Math.sqrt(Math.pow(1 + this.e, 1 + this.e) * Math.pow(1 - this.e, 1 - this.e)), this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= I && (this.k0 = 0.5 * this.cons * De(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) / we(this.e, this.con * this.lat_ts, this.con * Math.sin(this.lat_ts))), this.ms1 = De(this.e, this.sinlat0, this.coslat0), this.X0 = 2 * Math.atan(this.ssfn_(this.lat0, this.sinlat0, this.e)) - S, this.cosX0 = Math.cos(this.X0), this.sinX0 = Math.sin(this.X0)); } -function uC(n) { - var t = n.x, e = n.y, i = Math.sin(e), s = Math.cos(e), r, o, a, l, h, c, u = A(t - this.long0); - return Math.abs(Math.abs(t - this.long0) - Math.PI) <= I && Math.abs(e + this.lat0) <= I ? (n.x = NaN, n.y = NaN, n) : this.sphere ? (r = 2 * this.k0 / (1 + this.sinlat0 * i + this.coslat0 * s * Math.cos(u)), n.x = this.a * r * s * Math.sin(u) + this.x0, n.y = this.a * r * (this.coslat0 * i - this.sinlat0 * s * Math.cos(u)) + this.y0, n) : (o = 2 * Math.atan(this.ssfn_(e, i, this.e)) - S, l = Math.cos(o), a = Math.sin(o), Math.abs(this.coslat0) <= I ? (h = Ae(this.e, e * this.con, this.con * i), c = 2 * this.a * this.k0 * h / this.cons, n.x = this.x0 + c * Math.sin(t - this.long0), n.y = this.y0 - this.con * c * Math.cos(t - this.long0), n) : (Math.abs(this.sinlat0) < I ? (r = 2 * this.a * this.k0 / (1 + l * Math.cos(u)), n.y = r * a) : (r = 2 * this.a * this.k0 * this.ms1 / (this.cosX0 * (1 + this.sinX0 * a + this.cosX0 * l * Math.cos(u))), n.y = r * (this.cosX0 * a - this.sinX0 * l * Math.cos(u)) + this.y0), n.x = r * l * Math.sin(u) + this.x0, n)); +function x3(i) { + var t = i.x, e = i.y, n = Math.sin(e), s = Math.cos(e), r, o, a, l, h, c, u = P(t - this.long0); + return Math.abs(Math.abs(t - this.long0) - Math.PI) <= I && Math.abs(e + this.lat0) <= I ? (i.x = NaN, i.y = NaN, i) : this.sphere ? (r = 2 * this.k0 / (1 + this.sinlat0 * n + this.coslat0 * s * Math.cos(u)), i.x = this.a * r * s * Math.sin(u) + this.x0, i.y = this.a * r * (this.coslat0 * n - this.sinlat0 * s * Math.cos(u)) + this.y0, i) : (o = 2 * Math.atan(this.ssfn_(e, n, this.e)) - S, l = Math.cos(o), a = Math.sin(o), Math.abs(this.coslat0) <= I ? (h = we(this.e, e * this.con, this.con * n), c = 2 * this.a * this.k0 * h / this.cons, i.x = this.x0 + c * Math.sin(t - this.long0), i.y = this.y0 - this.con * c * Math.cos(t - this.long0), i) : (Math.abs(this.sinlat0) < I ? (r = 2 * this.a * this.k0 / (1 + l * Math.cos(u)), i.y = r * a) : (r = 2 * this.a * this.k0 * this.ms1 / (this.cosX0 * (1 + this.sinX0 * a + this.cosX0 * l * Math.cos(u))), i.y = r * (this.cosX0 * a - this.sinX0 * l * Math.cos(u)) + this.y0), i.x = r * l * Math.sin(u) + this.x0, i)); } -function dC(n) { - n.x -= this.x0, n.y -= this.y0; - var t, e, i, s, r, o = Math.sqrt(n.x * n.x + n.y * n.y); +function M3(i) { + i.x -= this.x0, i.y -= this.y0; + var t, e, n, s, r, o = Math.sqrt(i.x * i.x + i.y * i.y); if (this.sphere) { var a = 2 * Math.atan(o / (2 * this.a * this.k0)); - return t = this.long0, e = this.lat0, o <= I ? (n.x = t, n.y = e, n) : (e = Math.asin(Math.cos(a) * this.sinlat0 + n.y * Math.sin(a) * this.coslat0 / o), Math.abs(this.coslat0) < I ? this.lat0 > 0 ? t = A(this.long0 + Math.atan2(n.x, -1 * n.y)) : t = A(this.long0 + Math.atan2(n.x, n.y)) : t = A(this.long0 + Math.atan2(n.x * Math.sin(a), o * this.coslat0 * Math.cos(a) - n.y * this.sinlat0 * Math.sin(a))), n.x = t, n.y = e, n); + return t = this.long0, e = this.lat0, o <= I ? (i.x = t, i.y = e, i) : (e = Math.asin(Math.cos(a) * this.sinlat0 + i.y * Math.sin(a) * this.coslat0 / o), Math.abs(this.coslat0) < I ? this.lat0 > 0 ? t = P(this.long0 + Math.atan2(i.x, -1 * i.y)) : t = P(this.long0 + Math.atan2(i.x, i.y)) : t = P(this.long0 + Math.atan2(i.x * Math.sin(a), o * this.coslat0 * Math.cos(a) - i.y * this.sinlat0 * Math.sin(a))), i.x = t, i.y = e, i); } else if (Math.abs(this.coslat0) <= I) { if (o <= I) - return e = this.lat0, t = this.long0, n.x = t, n.y = e, n; - n.x *= this.con, n.y *= this.con, i = o * this.cons / (2 * this.a * this.k0), e = this.con * Ys(this.e, i), t = this.con * A(this.con * this.long0 + Math.atan2(n.x, -1 * n.y)); + return e = this.lat0, t = this.long0, i.x = t, i.y = e, i; + i.x *= this.con, i.y *= this.con, n = o * this.cons / (2 * this.a * this.k0), e = this.con * Os(this.e, n), t = this.con * P(this.con * this.long0 + Math.atan2(i.x, -1 * i.y)); } else - s = 2 * Math.atan(o * this.cosX0 / (2 * this.a * this.k0 * this.ms1)), t = this.long0, o <= I ? r = this.X0 : (r = Math.asin(Math.cos(s) * this.sinX0 + n.y * Math.sin(s) * this.cosX0 / o), t = A(this.long0 + Math.atan2(n.x * Math.sin(s), o * this.cosX0 * Math.cos(s) - n.y * this.sinX0 * Math.sin(s)))), e = -1 * Ys(this.e, Math.tan(0.5 * (S + r))); - return n.x = t, n.y = e, n; -} -var fC = ["stere", "Stereographic_South_Pole", "Polar Stereographic (variant B)"]; -const gC = { - init: cC, - forward: uC, - inverse: dC, - names: fC, - ssfn_: hC + s = 2 * Math.atan(o * this.cosX0 / (2 * this.a * this.k0 * this.ms1)), t = this.long0, o <= I ? r = this.X0 : (r = Math.asin(Math.cos(s) * this.sinX0 + i.y * Math.sin(s) * this.cosX0 / o), t = P(this.long0 + Math.atan2(i.x * Math.sin(s), o * this.cosX0 * Math.cos(s) - i.y * this.sinX0 * Math.sin(s)))), e = -1 * Os(this.e, Math.tan(0.5 * (S + r))); + return i.x = t, i.y = e, i; +} +var C3 = ["stere", "Stereographic_South_Pole", "Polar Stereographic (variant B)"]; +const E3 = { + init: v3, + forward: x3, + inverse: M3, + names: C3, + ssfn_: y3 }; -function mC() { - var n = this.lat0; +function w3() { + var i = this.lat0; this.lambda0 = this.long0; - var t = Math.sin(n), e = this.a, i = this.rf, s = 1 / i, r = 2 * s - Math.pow(s, 2), o = this.e = Math.sqrt(r); - this.R = this.k0 * e * Math.sqrt(1 - r) / (1 - r * Math.pow(t, 2)), this.alpha = Math.sqrt(1 + r / (1 - r) * Math.pow(Math.cos(n), 4)), this.b0 = Math.asin(t / this.alpha); - var a = Math.log(Math.tan(Math.PI / 4 + this.b0 / 2)), l = Math.log(Math.tan(Math.PI / 4 + n / 2)), h = Math.log((1 + o * t) / (1 - o * t)); + var t = Math.sin(i), e = this.a, n = this.rf, s = 1 / n, r = 2 * s - Math.pow(s, 2), o = this.e = Math.sqrt(r); + this.R = this.k0 * e * Math.sqrt(1 - r) / (1 - r * Math.pow(t, 2)), this.alpha = Math.sqrt(1 + r / (1 - r) * Math.pow(Math.cos(i), 4)), this.b0 = Math.asin(t / this.alpha); + var a = Math.log(Math.tan(Math.PI / 4 + this.b0 / 2)), l = Math.log(Math.tan(Math.PI / 4 + i / 2)), h = Math.log((1 + o * t) / (1 - o * t)); this.K = a - this.alpha * l + this.alpha * o / 2 * h; } -function _C(n) { - var t = Math.log(Math.tan(Math.PI / 4 - n.y / 2)), e = this.e / 2 * Math.log((1 + this.e * Math.sin(n.y)) / (1 - this.e * Math.sin(n.y))), i = -this.alpha * (t + e) + this.K, s = 2 * (Math.atan(Math.exp(i)) - Math.PI / 4), r = this.alpha * (n.x - this.lambda0), o = Math.atan(Math.sin(r) / (Math.sin(this.b0) * Math.tan(s) + Math.cos(this.b0) * Math.cos(r))), a = Math.asin(Math.cos(this.b0) * Math.sin(s) - Math.sin(this.b0) * Math.cos(s) * Math.cos(r)); - return n.y = this.R / 2 * Math.log((1 + Math.sin(a)) / (1 - Math.sin(a))) + this.y0, n.x = this.R * o + this.x0, n; +function S3(i) { + var t = Math.log(Math.tan(Math.PI / 4 - i.y / 2)), e = this.e / 2 * Math.log((1 + this.e * Math.sin(i.y)) / (1 - this.e * Math.sin(i.y))), n = -this.alpha * (t + e) + this.K, s = 2 * (Math.atan(Math.exp(n)) - Math.PI / 4), r = this.alpha * (i.x - this.lambda0), o = Math.atan(Math.sin(r) / (Math.sin(this.b0) * Math.tan(s) + Math.cos(this.b0) * Math.cos(r))), a = Math.asin(Math.cos(this.b0) * Math.sin(s) - Math.sin(this.b0) * Math.cos(s) * Math.cos(r)); + return i.y = this.R / 2 * Math.log((1 + Math.sin(a)) / (1 - Math.sin(a))) + this.y0, i.x = this.R * o + this.x0, i; } -function pC(n) { - for (var t = n.x - this.x0, e = n.y - this.y0, i = t / this.R, s = 2 * (Math.atan(Math.exp(e / this.R)) - Math.PI / 4), r = Math.asin(Math.cos(this.b0) * Math.sin(s) + Math.sin(this.b0) * Math.cos(s) * Math.cos(i)), o = Math.atan(Math.sin(i) / (Math.cos(this.b0) * Math.cos(i) - Math.sin(this.b0) * Math.tan(s))), a = this.lambda0 + o / this.alpha, l = 0, h = r, c = -1e3, u = 0; Math.abs(h - c) > 1e-7; ) { +function R3(i) { + for (var t = i.x - this.x0, e = i.y - this.y0, n = t / this.R, s = 2 * (Math.atan(Math.exp(e / this.R)) - Math.PI / 4), r = Math.asin(Math.cos(this.b0) * Math.sin(s) + Math.sin(this.b0) * Math.cos(s) * Math.cos(n)), o = Math.atan(Math.sin(n) / (Math.cos(this.b0) * Math.cos(n) - Math.sin(this.b0) * Math.tan(s))), a = this.lambda0 + o / this.alpha, l = 0, h = r, c = -1e3, u = 0; Math.abs(h - c) > 1e-7; ) { if (++u > 20) return; l = 1 / this.alpha * (Math.log(Math.tan(Math.PI / 4 + r / 2)) - this.K) + this.e * Math.log(Math.tan(Math.PI / 4 + Math.asin(this.e * Math.sin(h)) / 2)), c = h, h = 2 * Math.atan(Math.exp(l)) - Math.PI / 2; } - return n.x = a, n.y = h, n; + return i.x = a, i.y = h, i; } -var yC = ["somerc"]; -const vC = { - init: mC, - forward: _C, - inverse: pC, - names: yC +var b3 = ["somerc"]; +const L3 = { + init: w3, + forward: S3, + inverse: R3, + names: b3 }; -var In = 1e-7; -function xC(n) { - var t = ["Hotine_Oblique_Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin"], e = typeof n.PROJECTION == "object" ? Object.keys(n.PROJECTION)[0] : n.PROJECTION; - return "no_uoff" in n || "no_off" in n || t.indexOf(e) !== -1; -} -function CC() { - var n, t, e, i, s, r, o, a, l, h, c = 0, u, d = 0, f = 0, g = 0, m = 0, _ = 0, y = 0; - this.no_off = xC(this), this.no_rot = "no_rot" in this; +var pn = 1e-7; +function T3(i) { + var t = ["Hotine_Oblique_Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin"], e = typeof i.PROJECTION == "object" ? Object.keys(i.PROJECTION)[0] : i.PROJECTION; + return "no_uoff" in i || "no_off" in i || t.indexOf(e) !== -1; +} +function I3() { + var i, t, e, n, s, r, o, a, l, h, c = 0, u, d = 0, f = 0, g = 0, m = 0, _ = 0, y = 0; + this.no_off = T3(this), this.no_rot = "no_rot" in this; var p = !1; "alpha" in this && (p = !0); var v = !1; - if ("rectified_grid_angle" in this && (v = !0), p && (y = this.alpha), v && (c = this.rectified_grid_angle * zt), p || v) + if ("rectified_grid_angle" in this && (v = !0), p && (y = this.alpha), v && (c = this.rectified_grid_angle * $t), p || v) d = this.longc; - else if (f = this.long1, m = this.lat1, g = this.long2, _ = this.lat2, Math.abs(m - _) <= In || (n = Math.abs(m)) <= In || Math.abs(n - S) <= In || Math.abs(Math.abs(this.lat0) - S) <= In || Math.abs(Math.abs(_) - S) <= In) + else if (f = this.long1, m = this.lat1, g = this.long2, _ = this.lat2, Math.abs(m - _) <= pn || (i = Math.abs(m)) <= pn || Math.abs(i - S) <= pn || Math.abs(Math.abs(this.lat0) - S) <= pn || Math.abs(Math.abs(_) - S) <= pn) throw new Error(); var x = 1 - this.es; - t = Math.sqrt(x), Math.abs(this.lat0) > I ? (a = Math.sin(this.lat0), e = Math.cos(this.lat0), n = 1 - this.es * a * a, this.B = e * e, this.B = Math.sqrt(1 + this.es * this.B * this.B / x), this.A = this.B * this.k0 * t / n, i = this.B * t / (e * Math.sqrt(n)), s = i * i - 1, s <= 0 ? s = 0 : (s = Math.sqrt(s), this.lat0 < 0 && (s = -s)), this.E = s += i, this.E *= Math.pow(Ae(this.e, this.lat0, a), this.B)) : (this.B = 1 / t, this.A = this.k0, this.E = i = s = 1), p || v ? (p ? (u = Math.asin(Math.sin(y) / i), v || (c = y)) : (u = c, y = Math.asin(i * Math.sin(u))), this.lam0 = d - Math.asin(0.5 * (s - 1 / s) * Math.tan(u)) / this.B) : (r = Math.pow(Ae(this.e, m, Math.sin(m)), this.B), o = Math.pow(Ae(this.e, _, Math.sin(_)), this.B), s = this.E / r, l = (o - r) / (o + r), h = this.E * this.E, h = (h - o * r) / (h + o * r), n = f - g, n < -Math.pi ? g -= Hs : n > Math.pi && (g += Hs), this.lam0 = A(0.5 * (f + g) - Math.atan(h * Math.tan(0.5 * this.B * (f - g)) / l) / this.B), u = Math.atan(2 * Math.sin(this.B * A(f - this.lam0)) / (s - 1 / s)), c = y = Math.asin(i * Math.sin(u))), this.singam = Math.sin(u), this.cosgam = Math.cos(u), this.sinrot = Math.sin(c), this.cosrot = Math.cos(c), this.rB = 1 / this.B, this.ArB = this.A * this.rB, this.BrA = 1 / this.ArB, this.A * this.B, this.no_off ? this.u_0 = 0 : (this.u_0 = Math.abs(this.ArB * Math.atan(Math.sqrt(i * i - 1) / Math.cos(y))), this.lat0 < 0 && (this.u_0 = -this.u_0)), s = 0.5 * u, this.v_pole_n = this.ArB * Math.log(Math.tan(ct - s)), this.v_pole_s = this.ArB * Math.log(Math.tan(ct + s)); + t = Math.sqrt(x), Math.abs(this.lat0) > I ? (a = Math.sin(this.lat0), e = Math.cos(this.lat0), i = 1 - this.es * a * a, this.B = e * e, this.B = Math.sqrt(1 + this.es * this.B * this.B / x), this.A = this.B * this.k0 * t / i, n = this.B * t / (e * Math.sqrt(i)), s = n * n - 1, s <= 0 ? s = 0 : (s = Math.sqrt(s), this.lat0 < 0 && (s = -s)), this.E = s += n, this.E *= Math.pow(we(this.e, this.lat0, a), this.B)) : (this.B = 1 / t, this.A = this.k0, this.E = n = s = 1), p || v ? (p ? (u = Math.asin(Math.sin(y) / n), v || (c = y)) : (u = c, y = Math.asin(n * Math.sin(u))), this.lam0 = d - Math.asin(0.5 * (s - 1 / s) * Math.tan(u)) / this.B) : (r = Math.pow(we(this.e, m, Math.sin(m)), this.B), o = Math.pow(we(this.e, _, Math.sin(_)), this.B), s = this.E / r, l = (o - r) / (o + r), h = this.E * this.E, h = (h - o * r) / (h + o * r), i = f - g, i < -Math.pi ? g -= As : i > Math.pi && (g += As), this.lam0 = P(0.5 * (f + g) - Math.atan(h * Math.tan(0.5 * this.B * (f - g)) / l) / this.B), u = Math.atan(2 * Math.sin(this.B * P(f - this.lam0)) / (s - 1 / s)), c = y = Math.asin(n * Math.sin(u))), this.singam = Math.sin(u), this.cosgam = Math.cos(u), this.sinrot = Math.sin(c), this.cosrot = Math.cos(c), this.rB = 1 / this.B, this.ArB = this.A * this.rB, this.BrA = 1 / this.ArB, this.A * this.B, this.no_off ? this.u_0 = 0 : (this.u_0 = Math.abs(this.ArB * Math.atan(Math.sqrt(n * n - 1) / Math.cos(y))), this.lat0 < 0 && (this.u_0 = -this.u_0)), s = 0.5 * u, this.v_pole_n = this.ArB * Math.log(Math.tan(ht - s)), this.v_pole_s = this.ArB * Math.log(Math.tan(ht + s)); } -function MC(n) { - var t = {}, e, i, s, r, o, a, l, h; - if (n.x = n.x - this.lam0, Math.abs(Math.abs(n.y) - S) > I) { - if (o = this.E / Math.pow(Ae(this.e, n.y, Math.sin(n.y)), this.B), a = 1 / o, e = 0.5 * (o - a), i = 0.5 * (o + a), r = Math.sin(this.B * n.x), s = (e * this.singam - r * this.cosgam) / i, Math.abs(Math.abs(s) - 1) < I) +function A3(i) { + var t = {}, e, n, s, r, o, a, l, h; + if (i.x = i.x - this.lam0, Math.abs(Math.abs(i.y) - S) > I) { + if (o = this.E / Math.pow(we(this.e, i.y, Math.sin(i.y)), this.B), a = 1 / o, e = 0.5 * (o - a), n = 0.5 * (o + a), r = Math.sin(this.B * i.x), s = (e * this.singam - r * this.cosgam) / n, Math.abs(Math.abs(s) - 1) < I) throw new Error(); - h = 0.5 * this.ArB * Math.log((1 - s) / (1 + s)), a = Math.cos(this.B * n.x), Math.abs(a) < In ? l = this.A * n.x : l = this.ArB * Math.atan2(e * this.cosgam + r * this.singam, a); + h = 0.5 * this.ArB * Math.log((1 - s) / (1 + s)), a = Math.cos(this.B * i.x), Math.abs(a) < pn ? l = this.A * i.x : l = this.ArB * Math.atan2(e * this.cosgam + r * this.singam, a); } else - h = n.y > 0 ? this.v_pole_n : this.v_pole_s, l = this.ArB * n.y; + h = i.y > 0 ? this.v_pole_n : this.v_pole_s, l = this.ArB * i.y; return this.no_rot ? (t.x = l, t.y = h) : (l -= this.u_0, t.x = h * this.cosrot + l * this.sinrot, t.y = l * this.cosrot - h * this.sinrot), t.x = this.a * t.x + this.x0, t.y = this.a * t.y + this.y0, t; } -function EC(n) { - var t, e, i, s, r, o, a, l = {}; - if (n.x = (n.x - this.x0) * (1 / this.a), n.y = (n.y - this.y0) * (1 / this.a), this.no_rot ? (e = n.y, t = n.x) : (e = n.x * this.cosrot - n.y * this.sinrot, t = n.y * this.cosrot + n.x * this.sinrot + this.u_0), i = Math.exp(-this.BrA * e), s = 0.5 * (i - 1 / i), r = 0.5 * (i + 1 / i), o = Math.sin(this.BrA * t), a = (o * this.cosgam + s * this.singam) / r, Math.abs(Math.abs(a) - 1) < I) +function P3(i) { + var t, e, n, s, r, o, a, l = {}; + if (i.x = (i.x - this.x0) * (1 / this.a), i.y = (i.y - this.y0) * (1 / this.a), this.no_rot ? (e = i.y, t = i.x) : (e = i.x * this.cosrot - i.y * this.sinrot, t = i.y * this.cosrot + i.x * this.sinrot + this.u_0), n = Math.exp(-this.BrA * e), s = 0.5 * (n - 1 / n), r = 0.5 * (n + 1 / n), o = Math.sin(this.BrA * t), a = (o * this.cosgam + s * this.singam) / r, Math.abs(Math.abs(a) - 1) < I) l.x = 0, l.y = a < 0 ? -S : S; else { - if (l.y = this.E / Math.sqrt((1 + a) / (1 - a)), l.y = Ys(this.e, Math.pow(l.y, 1 / this.B)), l.y === 1 / 0) + if (l.y = this.E / Math.sqrt((1 + a) / (1 - a)), l.y = Os(this.e, Math.pow(l.y, 1 / this.B)), l.y === 1 / 0) throw new Error(); l.x = -this.rB * Math.atan2(s * this.cosgam - o * this.singam, Math.cos(this.BrA * t)); } return l.x += this.lam0, l; } -var wC = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Two_Point_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "Oblique_Mercator", "omerc"]; -const SC = { - init: CC, - forward: MC, - inverse: EC, - names: wC +var O3 = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Two_Point_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "Oblique_Mercator", "omerc"]; +const N3 = { + init: I3, + forward: A3, + inverse: P3, + names: O3 }; -function RC() { +function F3() { if (this.lat2 || (this.lat2 = this.lat1), this.k0 || (this.k0 = 1), this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, !(Math.abs(this.lat1 + this.lat2) < I)) { - var n = this.b / this.a; - this.e = Math.sqrt(1 - n * n); - var t = Math.sin(this.lat1), e = Math.cos(this.lat1), i = We(this.e, t, e), s = Ae(this.e, this.lat1, t), r = Math.sin(this.lat2), o = Math.cos(this.lat2), a = We(this.e, r, o), l = Ae(this.e, this.lat2, r), h = Ae(this.e, this.lat0, Math.sin(this.lat0)); - Math.abs(this.lat1 - this.lat2) > I ? this.ns = Math.log(i / a) / Math.log(s / l) : this.ns = t, isNaN(this.ns) && (this.ns = t), this.f0 = i / (this.ns * Math.pow(s, this.ns)), this.rh = this.a * this.f0 * Math.pow(h, this.ns), this.title || (this.title = "Lambert Conformal Conic"); - } -} -function TC(n) { - var t = n.x, e = n.y; - Math.abs(2 * Math.abs(e) - Math.PI) <= I && (e = cr(e) * (S - 2 * I)); - var i = Math.abs(Math.abs(e) - S), s, r; - if (i > I) - s = Ae(this.e, e, Math.sin(e)), r = this.a * this.f0 * Math.pow(s, this.ns); + var i = this.b / this.a; + this.e = Math.sqrt(1 - i * i); + var t = Math.sin(this.lat1), e = Math.cos(this.lat1), n = De(this.e, t, e), s = we(this.e, this.lat1, t), r = Math.sin(this.lat2), o = Math.cos(this.lat2), a = De(this.e, r, o), l = we(this.e, this.lat2, r), h = we(this.e, this.lat0, Math.sin(this.lat0)); + Math.abs(this.lat1 - this.lat2) > I ? this.ns = Math.log(n / a) / Math.log(s / l) : this.ns = t, isNaN(this.ns) && (this.ns = t), this.f0 = n / (this.ns * Math.pow(s, this.ns)), this.rh = this.a * this.f0 * Math.pow(h, this.ns), this.title || (this.title = "Lambert Conformal Conic"); + } +} +function D3(i) { + var t = i.x, e = i.y; + Math.abs(2 * Math.abs(e) - Math.PI) <= I && (e = Ks(e) * (S - 2 * I)); + var n = Math.abs(Math.abs(e) - S), s, r; + if (n > I) + s = we(this.e, e, Math.sin(e)), r = this.a * this.f0 * Math.pow(s, this.ns); else { - if (i = e * this.ns, i <= 0) + if (n = e * this.ns, n <= 0) return null; r = 0; } - var o = this.ns * A(t - this.long0); - return n.x = this.k0 * (r * Math.sin(o)) + this.x0, n.y = this.k0 * (this.rh - r * Math.cos(o)) + this.y0, n; + var o = this.ns * P(t - this.long0); + return i.x = this.k0 * (r * Math.sin(o)) + this.x0, i.y = this.k0 * (this.rh - r * Math.cos(o)) + this.y0, i; } -function bC(n) { - var t, e, i, s, r, o = (n.x - this.x0) / this.k0, a = this.rh - (n.y - this.y0) / this.k0; +function k3(i) { + var t, e, n, s, r, o = (i.x - this.x0) / this.k0, a = this.rh - (i.y - this.y0) / this.k0; this.ns > 0 ? (t = Math.sqrt(o * o + a * a), e = 1) : (t = -Math.sqrt(o * o + a * a), e = -1); var l = 0; if (t !== 0 && (l = Math.atan2(e * o, e * a)), t !== 0 || this.ns > 0) { - if (e = 1 / this.ns, i = Math.pow(t / (this.a * this.f0), e), s = Ys(this.e, i), s === -9999) + if (e = 1 / this.ns, n = Math.pow(t / (this.a * this.f0), e), s = Os(this.e, n), s === -9999) return null; } else s = -S; - return r = A(l / this.ns + this.long0), n.x = r, n.y = s, n; + return r = P(l / this.ns + this.long0), i.x = r, i.y = s, i; } -var LC = [ +var G3 = [ "Lambert Tangential Conformal Conic Projection", "Lambert_Conformal_Conic", "Lambert_Conformal_Conic_1SP", @@ -22135,110 +20498,110 @@ var LC = [ "Lambert Conic Conformal (1SP)", "Lambert Conic Conformal (2SP)" ]; -const IC = { - init: RC, - forward: TC, - inverse: bC, - names: LC +const $3 = { + init: F3, + forward: D3, + inverse: k3, + names: G3 }; -function PC() { +function B3() { this.a = 6377397155e-3, this.es = 0.006674372230614, this.e = Math.sqrt(this.es), this.lat0 || (this.lat0 = 0.863937979737193), this.long0 || (this.long0 = 0.7417649320975901 - 0.308341501185665), this.k0 || (this.k0 = 0.9999), this.s45 = 0.785398163397448, this.s90 = 2 * this.s45, this.fi0 = this.lat0, this.e2 = this.es, this.e = Math.sqrt(this.e2), this.alfa = Math.sqrt(1 + this.e2 * Math.pow(Math.cos(this.fi0), 4) / (1 - this.e2)), this.uq = 1.04216856380474, this.u0 = Math.asin(Math.sin(this.fi0) / this.alfa), this.g = Math.pow((1 + this.e * Math.sin(this.fi0)) / (1 - this.e * Math.sin(this.fi0)), this.alfa * this.e / 2), this.k = Math.tan(this.u0 / 2 + this.s45) / Math.pow(Math.tan(this.fi0 / 2 + this.s45), this.alfa) * this.g, this.k1 = this.k0, this.n0 = this.a * Math.sqrt(1 - this.e2) / (1 - this.e2 * Math.pow(Math.sin(this.fi0), 2)), this.s0 = 1.37008346281555, this.n = Math.sin(this.s0), this.ro0 = this.k1 * this.n0 / Math.tan(this.s0), this.ad = this.s90 - this.uq; } -function AC(n) { - var t, e, i, s, r, o, a, l = n.x, h = n.y, c = A(l - this.long0); - return t = Math.pow((1 + this.e * Math.sin(h)) / (1 - this.e * Math.sin(h)), this.alfa * this.e / 2), e = 2 * (Math.atan(this.k * Math.pow(Math.tan(h / 2 + this.s45), this.alfa) / t) - this.s45), i = -c * this.alfa, s = Math.asin(Math.cos(this.ad) * Math.sin(e) + Math.sin(this.ad) * Math.cos(e) * Math.cos(i)), r = Math.asin(Math.cos(e) * Math.sin(i) / Math.cos(s)), o = this.n * r, a = this.ro0 * Math.pow(Math.tan(this.s0 / 2 + this.s45), this.n) / Math.pow(Math.tan(s / 2 + this.s45), this.n), n.y = a * Math.cos(o) / 1, n.x = a * Math.sin(o) / 1, this.czech || (n.y *= -1, n.x *= -1), n; +function z3(i) { + var t, e, n, s, r, o, a, l = i.x, h = i.y, c = P(l - this.long0); + return t = Math.pow((1 + this.e * Math.sin(h)) / (1 - this.e * Math.sin(h)), this.alfa * this.e / 2), e = 2 * (Math.atan(this.k * Math.pow(Math.tan(h / 2 + this.s45), this.alfa) / t) - this.s45), n = -c * this.alfa, s = Math.asin(Math.cos(this.ad) * Math.sin(e) + Math.sin(this.ad) * Math.cos(e) * Math.cos(n)), r = Math.asin(Math.cos(e) * Math.sin(n) / Math.cos(s)), o = this.n * r, a = this.ro0 * Math.pow(Math.tan(this.s0 / 2 + this.s45), this.n) / Math.pow(Math.tan(s / 2 + this.s45), this.n), i.y = a * Math.cos(o) / 1, i.x = a * Math.sin(o) / 1, this.czech || (i.y *= -1, i.x *= -1), i; } -function OC(n) { - var t, e, i, s, r, o, a, l, h = n.x; - n.x = n.y, n.y = h, this.czech || (n.y *= -1, n.x *= -1), o = Math.sqrt(n.x * n.x + n.y * n.y), r = Math.atan2(n.y, n.x), s = r / Math.sin(this.s0), i = 2 * (Math.atan(Math.pow(this.ro0 / o, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45), t = Math.asin(Math.cos(this.ad) * Math.sin(i) - Math.sin(this.ad) * Math.cos(i) * Math.cos(s)), e = Math.asin(Math.cos(i) * Math.sin(s) / Math.cos(t)), n.x = this.long0 - e / this.alfa, a = t, l = 0; +function Z3(i) { + var t, e, n, s, r, o, a, l, h = i.x; + i.x = i.y, i.y = h, this.czech || (i.y *= -1, i.x *= -1), o = Math.sqrt(i.x * i.x + i.y * i.y), r = Math.atan2(i.y, i.x), s = r / Math.sin(this.s0), n = 2 * (Math.atan(Math.pow(this.ro0 / o, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45), t = Math.asin(Math.cos(this.ad) * Math.sin(n) - Math.sin(this.ad) * Math.cos(n) * Math.cos(s)), e = Math.asin(Math.cos(n) * Math.sin(s) / Math.cos(t)), i.x = this.long0 - e / this.alfa, a = t, l = 0; var c = 0; do - n.y = 2 * (Math.atan(Math.pow(this.k, -1 / this.alfa) * Math.pow(Math.tan(t / 2 + this.s45), 1 / this.alfa) * Math.pow((1 + this.e * Math.sin(a)) / (1 - this.e * Math.sin(a)), this.e / 2)) - this.s45), Math.abs(a - n.y) < 1e-10 && (l = 1), a = n.y, c += 1; + i.y = 2 * (Math.atan(Math.pow(this.k, -1 / this.alfa) * Math.pow(Math.tan(t / 2 + this.s45), 1 / this.alfa) * Math.pow((1 + this.e * Math.sin(a)) / (1 - this.e * Math.sin(a)), this.e / 2)) - this.s45), Math.abs(a - i.y) < 1e-10 && (l = 1), a = i.y, c += 1; while (l === 0 && c < 15); - return c >= 15 ? null : n; -} -var FC = ["Krovak", "krovak"]; -const NC = { - init: PC, - forward: AC, - inverse: OC, - names: FC + return c >= 15 ? null : i; +} +var U3 = ["Krovak", "krovak"]; +const V3 = { + init: B3, + forward: z3, + inverse: Z3, + names: U3 }; -function Jt(n, t, e, i, s) { - return n * s - t * Math.sin(2 * s) + e * Math.sin(4 * s) - i * Math.sin(6 * s); +function Wt(i, t, e, n, s) { + return i * s - t * Math.sin(2 * s) + e * Math.sin(4 * s) - n * Math.sin(6 * s); } -function ur(n) { - return 1 - 0.25 * n * (1 + n / 16 * (3 + 1.25 * n)); +function qs(i) { + return 1 - 0.25 * i * (1 + i / 16 * (3 + 1.25 * i)); } -function dr(n) { - return 0.375 * n * (1 + 0.25 * n * (1 + 0.46875 * n)); +function Js(i) { + return 0.375 * i * (1 + 0.25 * i * (1 + 0.46875 * i)); } -function fr(n) { - return 0.05859375 * n * n * (1 + 0.75 * n); +function Qs(i) { + return 0.05859375 * i * i * (1 + 0.75 * i); } -function gr(n) { - return n * n * n * (35 / 3072); +function tr(i) { + return i * i * i * (35 / 3072); } -function ts(n, t, e) { - var i = t * e; - return n / Math.sqrt(1 - i * i); +function $n(i, t, e) { + var n = t * e; + return i / Math.sqrt(1 - n * n); } -function ls(n) { - return Math.abs(n) < S ? n : n - cr(n) * Math.PI; +function Xn(i) { + return Math.abs(i) < S ? i : i - Ks(i) * Math.PI; } -function Eo(n, t, e, i, s) { +function to(i, t, e, n, s) { var r, o; - r = n / t; + r = i / t; for (var a = 0; a < 15; a++) - if (o = (n - (t * r - e * Math.sin(2 * r) + i * Math.sin(4 * r) - s * Math.sin(6 * r))) / (t - 2 * e * Math.cos(2 * r) + 4 * i * Math.cos(4 * r) - 6 * s * Math.cos(6 * r)), r += o, Math.abs(o) <= 1e-10) + if (o = (i - (t * r - e * Math.sin(2 * r) + n * Math.sin(4 * r) - s * Math.sin(6 * r))) / (t - 2 * e * Math.cos(2 * r) + 4 * n * Math.cos(4 * r) - 6 * s * Math.cos(6 * r)), r += o, Math.abs(o) <= 1e-10) return r; return NaN; } -function DC() { - this.sphere || (this.e0 = ur(this.es), this.e1 = dr(this.es), this.e2 = fr(this.es), this.e3 = gr(this.es), this.ml0 = this.a * Jt(this.e0, this.e1, this.e2, this.e3, this.lat0)); +function W3() { + this.sphere || (this.e0 = qs(this.es), this.e1 = Js(this.es), this.e2 = Qs(this.es), this.e3 = tr(this.es), this.ml0 = this.a * Wt(this.e0, this.e1, this.e2, this.e3, this.lat0)); } -function kC(n) { - var t, e, i = n.x, s = n.y; - if (i = A(i - this.long0), this.sphere) - t = this.a * Math.asin(Math.cos(s) * Math.sin(i)), e = this.a * (Math.atan2(Math.tan(s), Math.cos(i)) - this.lat0); +function H3(i) { + var t, e, n = i.x, s = i.y; + if (n = P(n - this.long0), this.sphere) + t = this.a * Math.asin(Math.cos(s) * Math.sin(n)), e = this.a * (Math.atan2(Math.tan(s), Math.cos(n)) - this.lat0); else { - var r = Math.sin(s), o = Math.cos(s), a = ts(this.a, this.e, r), l = Math.tan(s) * Math.tan(s), h = i * Math.cos(s), c = h * h, u = this.es * o * o / (1 - this.es), d = this.a * Jt(this.e0, this.e1, this.e2, this.e3, s); + var r = Math.sin(s), o = Math.cos(s), a = $n(this.a, this.e, r), l = Math.tan(s) * Math.tan(s), h = n * Math.cos(s), c = h * h, u = this.es * o * o / (1 - this.es), d = this.a * Wt(this.e0, this.e1, this.e2, this.e3, s); t = a * h * (1 - c * l * (1 / 6 - (8 - l + 8 * u) * c / 120)), e = d - this.ml0 + a * r / o * c * (0.5 + (5 - l + 6 * u) * c / 24); } - return n.x = t + this.x0, n.y = e + this.y0, n; + return i.x = t + this.x0, i.y = e + this.y0, i; } -function GC(n) { - n.x -= this.x0, n.y -= this.y0; - var t = n.x / this.a, e = n.y / this.a, i, s; +function X3(i) { + i.x -= this.x0, i.y -= this.y0; + var t = i.x / this.a, e = i.y / this.a, n, s; if (this.sphere) { var r = e + this.lat0; - i = Math.asin(Math.sin(r) * Math.cos(t)), s = Math.atan2(Math.tan(t), Math.cos(r)); + n = Math.asin(Math.sin(r) * Math.cos(t)), s = Math.atan2(Math.tan(t), Math.cos(r)); } else { - var o = this.ml0 / this.a + e, a = Eo(o, this.e0, this.e1, this.e2, this.e3); + var o = this.ml0 / this.a + e, a = to(o, this.e0, this.e1, this.e2, this.e3); if (Math.abs(Math.abs(a) - S) <= I) - return n.x = this.long0, n.y = S, e < 0 && (n.y *= -1), n; - var l = ts(this.a, this.e, Math.sin(a)), h = l * l * l / this.a / this.a * (1 - this.es), c = Math.pow(Math.tan(a), 2), u = t * this.a / l, d = u * u; - i = a - l * Math.tan(a) / h * u * u * (0.5 - (1 + 3 * c) * u * u / 24), s = u * (1 - d * (c / 3 + (1 + 3 * c) * c * d / 15)) / Math.cos(a); - } - return n.x = A(s + this.long0), n.y = ls(i), n; -} -var $C = ["Cassini", "Cassini_Soldner", "cass"]; -const BC = { - init: DC, - forward: kC, - inverse: GC, - names: $C + return i.x = this.long0, i.y = S, e < 0 && (i.y *= -1), i; + var l = $n(this.a, this.e, Math.sin(a)), h = l * l * l / this.a / this.a * (1 - this.es), c = Math.pow(Math.tan(a), 2), u = t * this.a / l, d = u * u; + n = a - l * Math.tan(a) / h * u * u * (0.5 - (1 + 3 * c) * u * u / 24), s = u * (1 - d * (c / 3 + (1 + 3 * c) * c * d / 15)) / Math.cos(a); + } + return i.x = P(s + this.long0), i.y = Xn(n), i; +} +var Y3 = ["Cassini", "Cassini_Soldner", "cass"]; +const j3 = { + init: W3, + forward: H3, + inverse: X3, + names: Y3 }; -function Ti(n, t) { +function pi(i, t) { var e; - return n > 1e-7 ? (e = n * t, (1 - n * n) * (t / (1 - e * e) - 0.5 / n * Math.log((1 - e) / (1 + e)))) : 2 * t; + return i > 1e-7 ? (e = i * t, (1 - i * i) * (t / (1 - e * e) - 0.5 / i * Math.log((1 - e) / (1 + e)))) : 2 * t; } -var zC = 1, ZC = 2, VC = 3, UC = 4; -function WC() { - var n = Math.abs(this.lat0); - if (Math.abs(n - S) < I ? this.mode = this.lat0 < 0 ? this.S_POLE : this.N_POLE : Math.abs(n) < I ? this.mode = this.EQUIT : this.mode = this.OBLIQ, this.es > 0) { +var K3 = 1, q3 = 2, J3 = 3, Q3 = 4; +function tM() { + var i = Math.abs(this.lat0); + if (Math.abs(i - S) < I ? this.mode = this.lat0 < 0 ? this.S_POLE : this.N_POLE : Math.abs(i) < I ? this.mode = this.EQUIT : this.mode = this.OBLIQ, this.es > 0) { var t; - switch (this.qp = Ti(this.e, 1), this.mmf = 0.5 / (1 - this.es), this.apa = tM(this.es), this.mode) { + switch (this.qp = pi(this.e, 1), this.mmf = 0.5 / (1 - this.es), this.apa = hM(this.es), this.mode) { case this.N_POLE: this.dd = 1; break; @@ -22249,31 +20612,31 @@ function WC() { this.rq = Math.sqrt(0.5 * this.qp), this.dd = 1 / this.rq, this.xmf = 1, this.ymf = 0.5 * this.qp; break; case this.OBLIQ: - this.rq = Math.sqrt(0.5 * this.qp), t = Math.sin(this.lat0), this.sinb1 = Ti(this.e, t) / this.qp, this.cosb1 = Math.sqrt(1 - this.sinb1 * this.sinb1), this.dd = Math.cos(this.lat0) / (Math.sqrt(1 - this.es * t * t) * this.rq * this.cosb1), this.ymf = (this.xmf = this.rq) / this.dd, this.xmf *= this.dd; + this.rq = Math.sqrt(0.5 * this.qp), t = Math.sin(this.lat0), this.sinb1 = pi(this.e, t) / this.qp, this.cosb1 = Math.sqrt(1 - this.sinb1 * this.sinb1), this.dd = Math.cos(this.lat0) / (Math.sqrt(1 - this.es * t * t) * this.rq * this.cosb1), this.ymf = (this.xmf = this.rq) / this.dd, this.xmf *= this.dd; break; } } else this.mode === this.OBLIQ && (this.sinph0 = Math.sin(this.lat0), this.cosph0 = Math.cos(this.lat0)); } -function HC(n) { - var t, e, i, s, r, o, a, l, h, c, u = n.x, d = n.y; - if (u = A(u - this.long0), this.sphere) { - if (r = Math.sin(d), c = Math.cos(d), i = Math.cos(u), this.mode === this.OBLIQ || this.mode === this.EQUIT) { - if (e = this.mode === this.EQUIT ? 1 + c * i : 1 + this.sinph0 * r + this.cosph0 * c * i, e <= I) +function eM(i) { + var t, e, n, s, r, o, a, l, h, c, u = i.x, d = i.y; + if (u = P(u - this.long0), this.sphere) { + if (r = Math.sin(d), c = Math.cos(d), n = Math.cos(u), this.mode === this.OBLIQ || this.mode === this.EQUIT) { + if (e = this.mode === this.EQUIT ? 1 + c * n : 1 + this.sinph0 * r + this.cosph0 * c * n, e <= I) return null; - e = Math.sqrt(2 / e), t = e * c * Math.sin(u), e *= this.mode === this.EQUIT ? r : this.cosph0 * r - this.sinph0 * c * i; + e = Math.sqrt(2 / e), t = e * c * Math.sin(u), e *= this.mode === this.EQUIT ? r : this.cosph0 * r - this.sinph0 * c * n; } else if (this.mode === this.N_POLE || this.mode === this.S_POLE) { - if (this.mode === this.N_POLE && (i = -i), Math.abs(d + this.lat0) < I) + if (this.mode === this.N_POLE && (n = -n), Math.abs(d + this.lat0) < I) return null; - e = ct - d * 0.5, e = 2 * (this.mode === this.S_POLE ? Math.cos(e) : Math.sin(e)), t = e * Math.sin(u), e *= i; + e = ht - d * 0.5, e = 2 * (this.mode === this.S_POLE ? Math.cos(e) : Math.sin(e)), t = e * Math.sin(u), e *= n; } } else { - switch (a = 0, l = 0, h = 0, i = Math.cos(u), s = Math.sin(u), r = Math.sin(d), o = Ti(this.e, r), (this.mode === this.OBLIQ || this.mode === this.EQUIT) && (a = o / this.qp, l = Math.sqrt(1 - a * a)), this.mode) { + switch (a = 0, l = 0, h = 0, n = Math.cos(u), s = Math.sin(u), r = Math.sin(d), o = pi(this.e, r), (this.mode === this.OBLIQ || this.mode === this.EQUIT) && (a = o / this.qp, l = Math.sqrt(1 - a * a)), this.mode) { case this.OBLIQ: - h = 1 + this.sinb1 * a + this.cosb1 * l * i; + h = 1 + this.sinb1 * a + this.cosb1 * l * n; break; case this.EQUIT: - h = 1 + l * i; + h = 1 + l * n; break; case this.N_POLE: h = S + d, o = this.qp - o; @@ -22287,19 +20650,19 @@ function HC(n) { switch (this.mode) { case this.OBLIQ: case this.EQUIT: - h = Math.sqrt(2 / h), this.mode === this.OBLIQ ? e = this.ymf * h * (this.cosb1 * a - this.sinb1 * l * i) : e = (h = Math.sqrt(2 / (1 + l * i))) * a * this.ymf, t = this.xmf * h * l * s; + h = Math.sqrt(2 / h), this.mode === this.OBLIQ ? e = this.ymf * h * (this.cosb1 * a - this.sinb1 * l * n) : e = (h = Math.sqrt(2 / (1 + l * n))) * a * this.ymf, t = this.xmf * h * l * s; break; case this.N_POLE: case this.S_POLE: - o >= 0 ? (t = (h = Math.sqrt(o)) * s, e = i * (this.mode === this.S_POLE ? h : -h)) : t = e = 0; + o >= 0 ? (t = (h = Math.sqrt(o)) * s, e = n * (this.mode === this.S_POLE ? h : -h)) : t = e = 0; break; } } - return n.x = this.a * t + this.x0, n.y = this.a * e + this.y0, n; + return i.x = this.a * t + this.x0, i.y = this.a * e + this.y0, i; } -function XC(n) { - n.x -= this.x0, n.y -= this.y0; - var t = n.x / this.a, e = n.y / this.a, i, s, r, o, a, l, h; +function iM(i) { + i.x -= this.x0, i.y -= this.y0; + var t = i.x / this.a, e = i.y / this.a, n, s, r, o, a, l, h; if (this.sphere) { var c = 0, u, d = 0; if (u = Math.sqrt(t * t + e * e), s = u * 0.5, s > 1) @@ -22318,210 +20681,210 @@ function XC(n) { s -= S; break; } - i = e === 0 && (this.mode === this.EQUIT || this.mode === this.OBLIQ) ? 0 : Math.atan2(t, e); + n = e === 0 && (this.mode === this.EQUIT || this.mode === this.OBLIQ) ? 0 : Math.atan2(t, e); } else { if (h = 0, this.mode === this.OBLIQ || this.mode === this.EQUIT) { if (t /= this.dd, e *= this.dd, l = Math.sqrt(t * t + e * e), l < I) - return n.x = this.long0, n.y = this.lat0, n; + return i.x = this.long0, i.y = this.lat0, i; o = 2 * Math.asin(0.5 * l / this.rq), r = Math.cos(o), t *= o = Math.sin(o), this.mode === this.OBLIQ ? (h = r * this.sinb1 + e * o * this.cosb1 / l, a = this.qp * h, e = l * this.cosb1 * r - e * this.sinb1 * o) : (h = e * o / l, a = this.qp * h, e = l * r); } else if (this.mode === this.N_POLE || this.mode === this.S_POLE) { if (this.mode === this.N_POLE && (e = -e), a = t * t + e * e, !a) - return n.x = this.long0, n.y = this.lat0, n; + return i.x = this.long0, i.y = this.lat0, i; h = 1 - a / this.qp, this.mode === this.S_POLE && (h = -h); } - i = Math.atan2(t, e), s = eM(Math.asin(h), this.apa); + n = Math.atan2(t, e), s = cM(Math.asin(h), this.apa); } - return n.x = A(this.long0 + i), n.y = s, n; + return i.x = P(this.long0 + n), i.y = s, i; } -var YC = 0.3333333333333333, jC = 0.17222222222222222, qC = 0.10257936507936508, KC = 0.06388888888888888, JC = 0.0664021164021164, QC = 0.016415012942191543; -function tM(n) { +var nM = 0.3333333333333333, sM = 0.17222222222222222, rM = 0.10257936507936508, oM = 0.06388888888888888, aM = 0.0664021164021164, lM = 0.016415012942191543; +function hM(i) { var t, e = []; - return e[0] = n * YC, t = n * n, e[0] += t * jC, e[1] = t * KC, t *= n, e[0] += t * qC, e[1] += t * JC, e[2] = t * QC, e; -} -function eM(n, t) { - var e = n + n; - return n + t[0] * Math.sin(e) + t[1] * Math.sin(e + e) + t[2] * Math.sin(e + e + e); -} -var iM = ["Lambert Azimuthal Equal Area", "Lambert_Azimuthal_Equal_Area", "laea"]; -const nM = { - init: WC, - forward: HC, - inverse: XC, - names: iM, - S_POLE: zC, - N_POLE: ZC, - EQUIT: VC, - OBLIQ: UC + return e[0] = i * nM, t = i * i, e[0] += t * sM, e[1] = t * oM, t *= i, e[0] += t * rM, e[1] += t * aM, e[2] = t * lM, e; +} +function cM(i, t) { + var e = i + i; + return i + t[0] * Math.sin(e) + t[1] * Math.sin(e + e) + t[2] * Math.sin(e + e + e); +} +var uM = ["Lambert Azimuthal Equal Area", "Lambert_Azimuthal_Equal_Area", "laea"]; +const dM = { + init: tM, + forward: eM, + inverse: iM, + names: uM, + S_POLE: K3, + N_POLE: q3, + EQUIT: J3, + OBLIQ: Q3 }; -function Fi(n) { - return Math.abs(n) > 1 && (n = n > 1 ? 1 : -1), Math.asin(n); +function wi(i) { + return Math.abs(i) > 1 && (i = i > 1 ? 1 : -1), Math.asin(i); } -function sM() { - Math.abs(this.lat1 + this.lat2) < I || (this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e3 = Math.sqrt(this.es), this.sin_po = Math.sin(this.lat1), this.cos_po = Math.cos(this.lat1), this.t1 = this.sin_po, this.con = this.sin_po, this.ms1 = We(this.e3, this.sin_po, this.cos_po), this.qs1 = Ti(this.e3, this.sin_po, this.cos_po), this.sin_po = Math.sin(this.lat2), this.cos_po = Math.cos(this.lat2), this.t2 = this.sin_po, this.ms2 = We(this.e3, this.sin_po, this.cos_po), this.qs2 = Ti(this.e3, this.sin_po, this.cos_po), this.sin_po = Math.sin(this.lat0), this.cos_po = Math.cos(this.lat0), this.t3 = this.sin_po, this.qs0 = Ti(this.e3, this.sin_po, this.cos_po), Math.abs(this.lat1 - this.lat2) > I ? this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1) : this.ns0 = this.con, this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1, this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0); +function fM() { + Math.abs(this.lat1 + this.lat2) < I || (this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e3 = Math.sqrt(this.es), this.sin_po = Math.sin(this.lat1), this.cos_po = Math.cos(this.lat1), this.t1 = this.sin_po, this.con = this.sin_po, this.ms1 = De(this.e3, this.sin_po, this.cos_po), this.qs1 = pi(this.e3, this.sin_po, this.cos_po), this.sin_po = Math.sin(this.lat2), this.cos_po = Math.cos(this.lat2), this.t2 = this.sin_po, this.ms2 = De(this.e3, this.sin_po, this.cos_po), this.qs2 = pi(this.e3, this.sin_po, this.cos_po), this.sin_po = Math.sin(this.lat0), this.cos_po = Math.cos(this.lat0), this.t3 = this.sin_po, this.qs0 = pi(this.e3, this.sin_po, this.cos_po), Math.abs(this.lat1 - this.lat2) > I ? this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1) : this.ns0 = this.con, this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1, this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0); } -function rM(n) { - var t = n.x, e = n.y; +function gM(i) { + var t = i.x, e = i.y; this.sin_phi = Math.sin(e), this.cos_phi = Math.cos(e); - var i = Ti(this.e3, this.sin_phi, this.cos_phi), s = this.a * Math.sqrt(this.c - this.ns0 * i) / this.ns0, r = this.ns0 * A(t - this.long0), o = s * Math.sin(r) + this.x0, a = this.rh - s * Math.cos(r) + this.y0; - return n.x = o, n.y = a, n; + var n = pi(this.e3, this.sin_phi, this.cos_phi), s = this.a * Math.sqrt(this.c - this.ns0 * n) / this.ns0, r = this.ns0 * P(t - this.long0), o = s * Math.sin(r) + this.x0, a = this.rh - s * Math.cos(r) + this.y0; + return i.x = o, i.y = a, i; } -function oM(n) { - var t, e, i, s, r, o; - return n.x -= this.x0, n.y = this.rh - n.y + this.y0, this.ns0 >= 0 ? (t = Math.sqrt(n.x * n.x + n.y * n.y), i = 1) : (t = -Math.sqrt(n.x * n.x + n.y * n.y), i = -1), s = 0, t !== 0 && (s = Math.atan2(i * n.x, i * n.y)), i = t * this.ns0 / this.a, this.sphere ? o = Math.asin((this.c - i * i) / (2 * this.ns0)) : (e = (this.c - i * i) / this.ns0, o = this.phi1z(this.e3, e)), r = A(s / this.ns0 + this.long0), n.x = r, n.y = o, n; +function mM(i) { + var t, e, n, s, r, o; + return i.x -= this.x0, i.y = this.rh - i.y + this.y0, this.ns0 >= 0 ? (t = Math.sqrt(i.x * i.x + i.y * i.y), n = 1) : (t = -Math.sqrt(i.x * i.x + i.y * i.y), n = -1), s = 0, t !== 0 && (s = Math.atan2(n * i.x, n * i.y)), n = t * this.ns0 / this.a, this.sphere ? o = Math.asin((this.c - n * n) / (2 * this.ns0)) : (e = (this.c - n * n) / this.ns0, o = this.phi1z(this.e3, e)), r = P(s / this.ns0 + this.long0), i.x = r, i.y = o, i; } -function aM(n, t) { - var e, i, s, r, o, a = Fi(0.5 * t); - if (n < I) +function _M(i, t) { + var e, n, s, r, o, a = wi(0.5 * t); + if (i < I) return a; - for (var l = n * n, h = 1; h <= 25; h++) - if (e = Math.sin(a), i = Math.cos(a), s = n * e, r = 1 - s * s, o = 0.5 * r * r / i * (t / (1 - l) - e / r + 0.5 / n * Math.log((1 - s) / (1 + s))), a = a + o, Math.abs(o) <= 1e-7) + for (var l = i * i, h = 1; h <= 25; h++) + if (e = Math.sin(a), n = Math.cos(a), s = i * e, r = 1 - s * s, o = 0.5 * r * r / n * (t / (1 - l) - e / r + 0.5 / i * Math.log((1 - s) / (1 + s))), a = a + o, Math.abs(o) <= 1e-7) return a; return null; } -var lM = ["Albers_Conic_Equal_Area", "Albers", "aea"]; -const hM = { - init: sM, - forward: rM, - inverse: oM, - names: lM, - phi1z: aM +var pM = ["Albers_Conic_Equal_Area", "Albers", "aea"]; +const yM = { + init: fM, + forward: gM, + inverse: mM, + names: pM, + phi1z: _M }; -function cM() { +function vM() { this.sin_p14 = Math.sin(this.lat0), this.cos_p14 = Math.cos(this.lat0), this.infinity_dist = 1e3 * this.a, this.rc = 1; } -function uM(n) { - var t, e, i, s, r, o, a, l, h = n.x, c = n.y; - return i = A(h - this.long0), t = Math.sin(c), e = Math.cos(c), s = Math.cos(i), o = this.sin_p14 * t + this.cos_p14 * e * s, r = 1, o > 0 || Math.abs(o) <= I ? (a = this.x0 + this.a * r * e * Math.sin(i) / o, l = this.y0 + this.a * r * (this.cos_p14 * t - this.sin_p14 * e * s) / o) : (a = this.x0 + this.infinity_dist * e * Math.sin(i), l = this.y0 + this.infinity_dist * (this.cos_p14 * t - this.sin_p14 * e * s)), n.x = a, n.y = l, n; +function xM(i) { + var t, e, n, s, r, o, a, l, h = i.x, c = i.y; + return n = P(h - this.long0), t = Math.sin(c), e = Math.cos(c), s = Math.cos(n), o = this.sin_p14 * t + this.cos_p14 * e * s, r = 1, o > 0 || Math.abs(o) <= I ? (a = this.x0 + this.a * r * e * Math.sin(n) / o, l = this.y0 + this.a * r * (this.cos_p14 * t - this.sin_p14 * e * s) / o) : (a = this.x0 + this.infinity_dist * e * Math.sin(n), l = this.y0 + this.infinity_dist * (this.cos_p14 * t - this.sin_p14 * e * s)), i.x = a, i.y = l, i; } -function dM(n) { - var t, e, i, s, r, o; - return n.x = (n.x - this.x0) / this.a, n.y = (n.y - this.y0) / this.a, n.x /= this.k0, n.y /= this.k0, (t = Math.sqrt(n.x * n.x + n.y * n.y)) ? (s = Math.atan2(t, this.rc), e = Math.sin(s), i = Math.cos(s), o = Fi(i * this.sin_p14 + n.y * e * this.cos_p14 / t), r = Math.atan2(n.x * e, t * this.cos_p14 * i - n.y * this.sin_p14 * e), r = A(this.long0 + r)) : (o = this.phic0, r = 0), n.x = r, n.y = o, n; +function MM(i) { + var t, e, n, s, r, o; + return i.x = (i.x - this.x0) / this.a, i.y = (i.y - this.y0) / this.a, i.x /= this.k0, i.y /= this.k0, (t = Math.sqrt(i.x * i.x + i.y * i.y)) ? (s = Math.atan2(t, this.rc), e = Math.sin(s), n = Math.cos(s), o = wi(n * this.sin_p14 + i.y * e * this.cos_p14 / t), r = Math.atan2(i.x * e, t * this.cos_p14 * n - i.y * this.sin_p14 * e), r = P(this.long0 + r)) : (o = this.phic0, r = 0), i.x = r, i.y = o, i; } -var fM = ["gnom"]; -const gM = { - init: cM, - forward: uM, - inverse: dM, - names: fM +var CM = ["gnom"]; +const EM = { + init: vM, + forward: xM, + inverse: MM, + names: CM }; -function mM(n, t) { - var e = 1 - (1 - n * n) / (2 * n) * Math.log((1 - n) / (1 + n)); +function wM(i, t) { + var e = 1 - (1 - i * i) / (2 * i) * Math.log((1 - i) / (1 + i)); if (Math.abs(Math.abs(t) - e) < 1e-6) return t < 0 ? -1 * S : S; - for (var i = Math.asin(0.5 * t), s, r, o, a, l = 0; l < 30; l++) - if (r = Math.sin(i), o = Math.cos(i), a = n * r, s = Math.pow(1 - a * a, 2) / (2 * o) * (t / (1 - n * n) - r / (1 - a * a) + 0.5 / n * Math.log((1 - a) / (1 + a))), i += s, Math.abs(s) <= 1e-10) - return i; + for (var n = Math.asin(0.5 * t), s, r, o, a, l = 0; l < 30; l++) + if (r = Math.sin(n), o = Math.cos(n), a = i * r, s = Math.pow(1 - a * a, 2) / (2 * o) * (t / (1 - i * i) - r / (1 - a * a) + 0.5 / i * Math.log((1 - a) / (1 + a))), n += s, Math.abs(s) <= 1e-10) + return n; return NaN; } -function _M() { - this.sphere || (this.k0 = We(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts))); +function SM() { + this.sphere || (this.k0 = De(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts))); } -function pM(n) { - var t = n.x, e = n.y, i, s, r = A(t - this.long0); +function RM(i) { + var t = i.x, e = i.y, n, s, r = P(t - this.long0); if (this.sphere) - i = this.x0 + this.a * r * Math.cos(this.lat_ts), s = this.y0 + this.a * Math.sin(e) / Math.cos(this.lat_ts); + n = this.x0 + this.a * r * Math.cos(this.lat_ts), s = this.y0 + this.a * Math.sin(e) / Math.cos(this.lat_ts); else { - var o = Ti(this.e, Math.sin(e)); - i = this.x0 + this.a * this.k0 * r, s = this.y0 + this.a * o * 0.5 / this.k0; + var o = pi(this.e, Math.sin(e)); + n = this.x0 + this.a * this.k0 * r, s = this.y0 + this.a * o * 0.5 / this.k0; } - return n.x = i, n.y = s, n; + return i.x = n, i.y = s, i; } -function yM(n) { - n.x -= this.x0, n.y -= this.y0; +function bM(i) { + i.x -= this.x0, i.y -= this.y0; var t, e; - return this.sphere ? (t = A(this.long0 + n.x / this.a / Math.cos(this.lat_ts)), e = Math.asin(n.y / this.a * Math.cos(this.lat_ts))) : (e = mM(this.e, 2 * n.y * this.k0 / this.a), t = A(this.long0 + n.x / (this.a * this.k0))), n.x = t, n.y = e, n; -} -var vM = ["cea"]; -const xM = { - init: _M, - forward: pM, - inverse: yM, - names: vM + return this.sphere ? (t = P(this.long0 + i.x / this.a / Math.cos(this.lat_ts)), e = Math.asin(i.y / this.a * Math.cos(this.lat_ts))) : (e = wM(this.e, 2 * i.y * this.k0 / this.a), t = P(this.long0 + i.x / (this.a * this.k0))), i.x = t, i.y = e, i; +} +var LM = ["cea"]; +const TM = { + init: SM, + forward: RM, + inverse: bM, + names: LM }; -function CM() { +function IM() { this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.lat_ts = this.lat_ts || 0, this.title = this.title || "Equidistant Cylindrical (Plate Carre)", this.rc = Math.cos(this.lat_ts); } -function MM(n) { - var t = n.x, e = n.y, i = A(t - this.long0), s = ls(e - this.lat0); - return n.x = this.x0 + this.a * i * this.rc, n.y = this.y0 + this.a * s, n; +function AM(i) { + var t = i.x, e = i.y, n = P(t - this.long0), s = Xn(e - this.lat0); + return i.x = this.x0 + this.a * n * this.rc, i.y = this.y0 + this.a * s, i; } -function EM(n) { - var t = n.x, e = n.y; - return n.x = A(this.long0 + (t - this.x0) / (this.a * this.rc)), n.y = ls(this.lat0 + (e - this.y0) / this.a), n; +function PM(i) { + var t = i.x, e = i.y; + return i.x = P(this.long0 + (t - this.x0) / (this.a * this.rc)), i.y = Xn(this.lat0 + (e - this.y0) / this.a), i; } -var wM = ["Equirectangular", "Equidistant_Cylindrical", "eqc"]; -const SM = { - init: CM, - forward: MM, - inverse: EM, - names: wM +var OM = ["Equirectangular", "Equidistant_Cylindrical", "eqc"]; +const NM = { + init: IM, + forward: AM, + inverse: PM, + names: OM }; -var Lu = 20; -function RM() { - this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = ur(this.es), this.e1 = dr(this.es), this.e2 = fr(this.es), this.e3 = gr(this.es), this.ml0 = this.a * Jt(this.e0, this.e1, this.e2, this.e3, this.lat0); +var eu = 20; +function FM() { + this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = qs(this.es), this.e1 = Js(this.es), this.e2 = Qs(this.es), this.e3 = tr(this.es), this.ml0 = this.a * Wt(this.e0, this.e1, this.e2, this.e3, this.lat0); } -function TM(n) { - var t = n.x, e = n.y, i, s, r, o = A(t - this.long0); +function DM(i) { + var t = i.x, e = i.y, n, s, r, o = P(t - this.long0); if (r = o * Math.sin(e), this.sphere) - Math.abs(e) <= I ? (i = this.a * o, s = -1 * this.a * this.lat0) : (i = this.a * Math.sin(r) / Math.tan(e), s = this.a * (ls(e - this.lat0) + (1 - Math.cos(r)) / Math.tan(e))); + Math.abs(e) <= I ? (n = this.a * o, s = -1 * this.a * this.lat0) : (n = this.a * Math.sin(r) / Math.tan(e), s = this.a * (Xn(e - this.lat0) + (1 - Math.cos(r)) / Math.tan(e))); else if (Math.abs(e) <= I) - i = this.a * o, s = -1 * this.ml0; + n = this.a * o, s = -1 * this.ml0; else { - var a = ts(this.a, this.e, Math.sin(e)) / Math.tan(e); - i = a * Math.sin(r), s = this.a * Jt(this.e0, this.e1, this.e2, this.e3, e) - this.ml0 + a * (1 - Math.cos(r)); + var a = $n(this.a, this.e, Math.sin(e)) / Math.tan(e); + n = a * Math.sin(r), s = this.a * Wt(this.e0, this.e1, this.e2, this.e3, e) - this.ml0 + a * (1 - Math.cos(r)); } - return n.x = i + this.x0, n.y = s + this.y0, n; + return i.x = n + this.x0, i.y = s + this.y0, i; } -function bM(n) { - var t, e, i, s, r, o, a, l, h; - if (i = n.x - this.x0, s = n.y - this.y0, this.sphere) +function kM(i) { + var t, e, n, s, r, o, a, l, h; + if (n = i.x - this.x0, s = i.y - this.y0, this.sphere) if (Math.abs(s + this.a * this.lat0) <= I) - t = A(i / this.a + this.long0), e = 0; + t = P(n / this.a + this.long0), e = 0; else { - o = this.lat0 + s / this.a, a = i * i / this.a / this.a + o * o, l = o; + o = this.lat0 + s / this.a, a = n * n / this.a / this.a + o * o, l = o; var c; - for (r = Lu; r; --r) + for (r = eu; r; --r) if (c = Math.tan(l), h = -1 * (o * (l * c + 1) - l - 0.5 * (l * l + a) * c) / ((l - o) / c - 1), l += h, Math.abs(h) <= I) { e = l; break; } - t = A(this.long0 + Math.asin(i * Math.tan(l) / this.a) / Math.sin(e)); + t = P(this.long0 + Math.asin(n * Math.tan(l) / this.a) / Math.sin(e)); } else if (Math.abs(s + this.ml0) <= I) - e = 0, t = A(this.long0 + i / this.a); + e = 0, t = P(this.long0 + n / this.a); else { - o = (this.ml0 + s) / this.a, a = i * i / this.a / this.a + o * o, l = o; + o = (this.ml0 + s) / this.a, a = n * n / this.a / this.a + o * o, l = o; var u, d, f, g, m; - for (r = Lu; r; --r) - if (m = this.e * Math.sin(l), u = Math.sqrt(1 - m * m) * Math.tan(l), d = this.a * Jt(this.e0, this.e1, this.e2, this.e3, l), f = this.e0 - 2 * this.e1 * Math.cos(2 * l) + 4 * this.e2 * Math.cos(4 * l) - 6 * this.e3 * Math.cos(6 * l), g = d / this.a, h = (o * (u * g + 1) - g - 0.5 * u * (g * g + a)) / (this.es * Math.sin(2 * l) * (g * g + a - 2 * o * g) / (4 * u) + (o - g) * (u * f - 2 / Math.sin(2 * l)) - f), l -= h, Math.abs(h) <= I) { + for (r = eu; r; --r) + if (m = this.e * Math.sin(l), u = Math.sqrt(1 - m * m) * Math.tan(l), d = this.a * Wt(this.e0, this.e1, this.e2, this.e3, l), f = this.e0 - 2 * this.e1 * Math.cos(2 * l) + 4 * this.e2 * Math.cos(4 * l) - 6 * this.e3 * Math.cos(6 * l), g = d / this.a, h = (o * (u * g + 1) - g - 0.5 * u * (g * g + a)) / (this.es * Math.sin(2 * l) * (g * g + a - 2 * o * g) / (4 * u) + (o - g) * (u * f - 2 / Math.sin(2 * l)) - f), l -= h, Math.abs(h) <= I) { e = l; break; } - u = Math.sqrt(1 - this.es * Math.pow(Math.sin(e), 2)) * Math.tan(e), t = A(this.long0 + Math.asin(i * u / this.a) / Math.sin(e)); + u = Math.sqrt(1 - this.es * Math.pow(Math.sin(e), 2)) * Math.tan(e), t = P(this.long0 + Math.asin(n * u / this.a) / Math.sin(e)); } - return n.x = t, n.y = e, n; + return i.x = t, i.y = e, i; } -var LM = ["Polyconic", "poly"]; -const IM = { - init: RM, - forward: TM, - inverse: bM, - names: LM +var GM = ["Polyconic", "poly"]; +const $M = { + init: FM, + forward: DM, + inverse: kM, + names: GM }; -function PM() { +function BM() { this.A = [], this.A[1] = 0.6399175073, this.A[2] = -0.1358797613, this.A[3] = 0.063294409, this.A[4] = -0.02526853, this.A[5] = 0.0117879, this.A[6] = -55161e-7, this.A[7] = 26906e-7, this.A[8] = -1333e-6, this.A[9] = 67e-5, this.A[10] = -34e-5, this.B_re = [], this.B_im = [], this.B_re[1] = 0.7557853228, this.B_im[1] = 0, this.B_re[2] = 0.249204646, this.B_im[2] = 3371507e-9, this.B_re[3] = -1541739e-9, this.B_im[3] = 0.04105856, this.B_re[4] = -0.10162907, this.B_im[4] = 0.01727609, this.B_re[5] = -0.26623489, this.B_im[5] = -0.36249218, this.B_re[6] = -0.6870983, this.B_im[6] = -1.1651967, this.C_re = [], this.C_im = [], this.C_re[1] = 1.3231270439, this.C_im[1] = 0, this.C_re[2] = -0.577245789, this.C_im[2] = -7809598e-9, this.C_re[3] = 0.508307513, this.C_im[3] = -0.112208952, this.C_re[4] = -0.15094762, this.C_im[4] = 0.18200602, this.C_re[5] = 1.01418179, this.C_im[5] = 1.64497696, this.C_re[6] = 1.9660549, this.C_im[6] = 2.5127645, this.D = [], this.D[1] = 1.5627014243, this.D[2] = 0.5185406398, this.D[3] = -0.03333098, this.D[4] = -0.1052906, this.D[5] = -0.0368594, this.D[6] = 7317e-6, this.D[7] = 0.0122, this.D[8] = 394e-5, this.D[9] = -13e-4; } -function AM(n) { - var t, e = n.x, i = n.y, s = i - this.lat0, r = e - this.long0, o = s / Is * 1e-5, a = r, l = 1, h = 0; +function zM(i) { + var t, e = i.x, n = i.y, s = n - this.lat0, r = e - this.long0, o = s / fs * 1e-5, a = r, l = 1, h = 0; for (t = 1; t <= 10; t++) l = l * o, h = h + this.A[t] * l; var c = h, u = a, d = 1, f = 0, g, m, _ = 0, y = 0; for (t = 1; t <= 6; t++) g = d * c - f * u, m = f * c + d * u, d = g, f = m, _ = _ + this.B_re[t] * d - this.B_im[t] * f, y = y + this.B_im[t] * d + this.B_re[t] * f; - return n.x = y * this.a + this.x0, n.y = _ * this.a + this.y0, n; + return i.x = y * this.a + this.x0, i.y = _ * this.a + this.y0, i; } -function OM(n) { - var t, e = n.x, i = n.y, s = e - this.x0, r = i - this.y0, o = r / this.a, a = s / this.a, l = 1, h = 0, c, u, d = 0, f = 0; +function ZM(i) { + var t, e = i.x, n = i.y, s = e - this.x0, r = n - this.y0, o = r / this.a, a = s / this.a, l = 1, h = 0, c, u, d = 0, f = 0; for (t = 1; t <= 6; t++) c = l * o - h * a, u = h * o + l * a, l = c, h = u, d = d + this.C_re[t] * l - this.C_im[t] * h, f = f + this.C_im[t] * l + this.C_re[t] * h; for (var g = 0; g < this.iterations; g++) { @@ -22529,255 +20892,255 @@ function OM(n) { for (t = 2; t <= 6; t++) y = m * d - _ * f, p = _ * d + m * f, m = y, _ = p, v = v + (t - 1) * (this.B_re[t] * m - this.B_im[t] * _), x = x + (t - 1) * (this.B_im[t] * m + this.B_re[t] * _); m = 1, _ = 0; - var C = this.B_re[1], E = this.B_im[1]; + var M = this.B_re[1], E = this.B_im[1]; for (t = 2; t <= 6; t++) - y = m * d - _ * f, p = _ * d + m * f, m = y, _ = p, C = C + t * (this.B_re[t] * m - this.B_im[t] * _), E = E + t * (this.B_im[t] * m + this.B_re[t] * _); - var R = C * C + E * E; - d = (v * C + x * E) / R, f = (x * C - v * E) / R; + y = m * d - _ * f, p = _ * d + m * f, m = y, _ = p, M = M + t * (this.B_re[t] * m - this.B_im[t] * _), E = E + t * (this.B_im[t] * m + this.B_re[t] * _); + var R = M * M + E * E; + d = (v * M + x * E) / R, f = (x * M - v * E) / R; } - var b = d, F = f, G = 1, V = 0; + var L = d, N = f, G = 1, U = 0; for (t = 1; t <= 9; t++) - G = G * b, V = V + this.D[t] * G; - var L = this.lat0 + V * Is * 1e5, $ = this.long0 + F; - return n.x = $, n.y = L, n; -} -var FM = ["New_Zealand_Map_Grid", "nzmg"]; -const NM = { - init: PM, - forward: AM, - inverse: OM, - names: FM + G = G * L, U = U + this.D[t] * G; + var T = this.lat0 + U * fs * 1e5, $ = this.long0 + N; + return i.x = $, i.y = T, i; +} +var UM = ["New_Zealand_Map_Grid", "nzmg"]; +const VM = { + init: BM, + forward: zM, + inverse: ZM, + names: UM }; -function DM() { -} -function kM(n) { - var t = n.x, e = n.y, i = A(t - this.long0), s = this.x0 + this.a * i, r = this.y0 + this.a * Math.log(Math.tan(Math.PI / 4 + e / 2.5)) * 1.25; - return n.x = s, n.y = r, n; -} -function GM(n) { - n.x -= this.x0, n.y -= this.y0; - var t = A(this.long0 + n.x / this.a), e = 2.5 * (Math.atan(Math.exp(0.8 * n.y / this.a)) - Math.PI / 4); - return n.x = t, n.y = e, n; -} -var $M = ["Miller_Cylindrical", "mill"]; -const BM = { - init: DM, - forward: kM, - inverse: GM, - names: $M +function WM() { +} +function HM(i) { + var t = i.x, e = i.y, n = P(t - this.long0), s = this.x0 + this.a * n, r = this.y0 + this.a * Math.log(Math.tan(Math.PI / 4 + e / 2.5)) * 1.25; + return i.x = s, i.y = r, i; +} +function XM(i) { + i.x -= this.x0, i.y -= this.y0; + var t = P(this.long0 + i.x / this.a), e = 2.5 * (Math.atan(Math.exp(0.8 * i.y / this.a)) - Math.PI / 4); + return i.x = t, i.y = e, i; +} +var YM = ["Miller_Cylindrical", "mill"]; +const jM = { + init: WM, + forward: HM, + inverse: XM, + names: YM }; -var zM = 20; -function ZM() { - this.sphere ? (this.n = 1, this.m = 0, this.es = 0, this.C_y = Math.sqrt((this.m + 1) / this.n), this.C_x = this.C_y / (this.m + 1)) : this.en = ag(this.es); +var KM = 20; +function qM() { + this.sphere ? (this.n = 1, this.m = 0, this.es = 0, this.C_y = Math.sqrt((this.m + 1) / this.n), this.C_x = this.C_y / (this.m + 1)) : this.en = Af(this.es); } -function VM(n) { - var t, e, i = n.x, s = n.y; - if (i = A(i - this.long0), this.sphere) { +function JM(i) { + var t, e, n = i.x, s = i.y; + if (n = P(n - this.long0), this.sphere) { if (!this.m) s = this.n !== 1 ? Math.asin(this.n * Math.sin(s)) : s; else - for (var r = this.n * Math.sin(s), o = zM; o; --o) { + for (var r = this.n * Math.sin(s), o = KM; o; --o) { var a = (this.m * s + Math.sin(s) - r) / (this.m + Math.cos(s)); if (s -= a, Math.abs(a) < I) break; } - t = this.a * this.C_x * i * (this.m + Math.cos(s)), e = this.a * this.C_y * s; + t = this.a * this.C_x * n * (this.m + Math.cos(s)), e = this.a * this.C_y * s; } else { var l = Math.sin(s), h = Math.cos(s); - e = this.a * Ho(s, l, h, this.en), t = this.a * i * h / Math.sqrt(1 - this.es * l * l); + e = this.a * Ro(s, l, h, this.en), t = this.a * n * h / Math.sqrt(1 - this.es * l * l); } - return n.x = t, n.y = e, n; + return i.x = t, i.y = e, i; } -function UM(n) { - var t, e, i, s; - return n.x -= this.x0, i = n.x / this.a, n.y -= this.y0, t = n.y / this.a, this.sphere ? (t /= this.C_y, i = i / (this.C_x * (this.m + Math.cos(t))), this.m ? t = Fi((this.m * t + Math.sin(t)) / this.n) : this.n !== 1 && (t = Fi(Math.sin(t) / this.n)), i = A(i + this.long0), t = ls(t)) : (t = lg(n.y / this.a, this.es, this.en), s = Math.abs(t), s < S ? (s = Math.sin(t), e = this.long0 + n.x * Math.sqrt(1 - this.es * s * s) / (this.a * Math.cos(t)), i = A(e)) : s - I < S && (i = this.long0)), n.x = i, n.y = t, n; +function QM(i) { + var t, e, n, s; + return i.x -= this.x0, n = i.x / this.a, i.y -= this.y0, t = i.y / this.a, this.sphere ? (t /= this.C_y, n = n / (this.C_x * (this.m + Math.cos(t))), this.m ? t = wi((this.m * t + Math.sin(t)) / this.n) : this.n !== 1 && (t = wi(Math.sin(t) / this.n)), n = P(n + this.long0), t = Xn(t)) : (t = Pf(i.y / this.a, this.es, this.en), s = Math.abs(t), s < S ? (s = Math.sin(t), e = this.long0 + i.x * Math.sqrt(1 - this.es * s * s) / (this.a * Math.cos(t)), n = P(e)) : s - I < S && (n = this.long0)), i.x = n, i.y = t, i; } -var WM = ["Sinusoidal", "sinu"]; -const HM = { - init: ZM, - forward: VM, - inverse: UM, - names: WM +var tC = ["Sinusoidal", "sinu"]; +const eC = { + init: qM, + forward: JM, + inverse: QM, + names: tC }; -function XM() { +function iC() { } -function YM(n) { - for (var t = n.x, e = n.y, i = A(t - this.long0), s = e, r = Math.PI * Math.sin(e); ; ) { +function nC(i) { + for (var t = i.x, e = i.y, n = P(t - this.long0), s = e, r = Math.PI * Math.sin(e); ; ) { var o = -(s + Math.sin(s) - r) / (1 + Math.cos(s)); if (s += o, Math.abs(o) < I) break; } - s /= 2, Math.PI / 2 - Math.abs(e) < I && (i = 0); - var a = 0.900316316158 * this.a * i * Math.cos(s) + this.x0, l = 1.4142135623731 * this.a * Math.sin(s) + this.y0; - return n.x = a, n.y = l, n; + s /= 2, Math.PI / 2 - Math.abs(e) < I && (n = 0); + var a = 0.900316316158 * this.a * n * Math.cos(s) + this.x0, l = 1.4142135623731 * this.a * Math.sin(s) + this.y0; + return i.x = a, i.y = l, i; } -function jM(n) { +function sC(i) { var t, e; - n.x -= this.x0, n.y -= this.y0, e = n.y / (1.4142135623731 * this.a), Math.abs(e) > 0.999999999999 && (e = 0.999999999999), t = Math.asin(e); - var i = A(this.long0 + n.x / (0.900316316158 * this.a * Math.cos(t))); - i < -Math.PI && (i = -Math.PI), i > Math.PI && (i = Math.PI), e = (2 * t + Math.sin(2 * t)) / Math.PI, Math.abs(e) > 1 && (e = 1); + i.x -= this.x0, i.y -= this.y0, e = i.y / (1.4142135623731 * this.a), Math.abs(e) > 0.999999999999 && (e = 0.999999999999), t = Math.asin(e); + var n = P(this.long0 + i.x / (0.900316316158 * this.a * Math.cos(t))); + n < -Math.PI && (n = -Math.PI), n > Math.PI && (n = Math.PI), e = (2 * t + Math.sin(2 * t)) / Math.PI, Math.abs(e) > 1 && (e = 1); var s = Math.asin(e); - return n.x = i, n.y = s, n; -} -var qM = ["Mollweide", "moll"]; -const KM = { - init: XM, - forward: YM, - inverse: jM, - names: qM + return i.x = n, i.y = s, i; +} +var rC = ["Mollweide", "moll"]; +const oC = { + init: iC, + forward: nC, + inverse: sC, + names: rC }; -function JM() { - Math.abs(this.lat1 + this.lat2) < I || (this.lat2 = this.lat2 || this.lat1, this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = ur(this.es), this.e1 = dr(this.es), this.e2 = fr(this.es), this.e3 = gr(this.es), this.sinphi = Math.sin(this.lat1), this.cosphi = Math.cos(this.lat1), this.ms1 = We(this.e, this.sinphi, this.cosphi), this.ml1 = Jt(this.e0, this.e1, this.e2, this.e3, this.lat1), Math.abs(this.lat1 - this.lat2) < I ? this.ns = this.sinphi : (this.sinphi = Math.sin(this.lat2), this.cosphi = Math.cos(this.lat2), this.ms2 = We(this.e, this.sinphi, this.cosphi), this.ml2 = Jt(this.e0, this.e1, this.e2, this.e3, this.lat2), this.ns = (this.ms1 - this.ms2) / (this.ml2 - this.ml1)), this.g = this.ml1 + this.ms1 / this.ns, this.ml0 = Jt(this.e0, this.e1, this.e2, this.e3, this.lat0), this.rh = this.a * (this.g - this.ml0)); +function aC() { + Math.abs(this.lat1 + this.lat2) < I || (this.lat2 = this.lat2 || this.lat1, this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = qs(this.es), this.e1 = Js(this.es), this.e2 = Qs(this.es), this.e3 = tr(this.es), this.sinphi = Math.sin(this.lat1), this.cosphi = Math.cos(this.lat1), this.ms1 = De(this.e, this.sinphi, this.cosphi), this.ml1 = Wt(this.e0, this.e1, this.e2, this.e3, this.lat1), Math.abs(this.lat1 - this.lat2) < I ? this.ns = this.sinphi : (this.sinphi = Math.sin(this.lat2), this.cosphi = Math.cos(this.lat2), this.ms2 = De(this.e, this.sinphi, this.cosphi), this.ml2 = Wt(this.e0, this.e1, this.e2, this.e3, this.lat2), this.ns = (this.ms1 - this.ms2) / (this.ml2 - this.ml1)), this.g = this.ml1 + this.ms1 / this.ns, this.ml0 = Wt(this.e0, this.e1, this.e2, this.e3, this.lat0), this.rh = this.a * (this.g - this.ml0)); } -function QM(n) { - var t = n.x, e = n.y, i; +function lC(i) { + var t = i.x, e = i.y, n; if (this.sphere) - i = this.a * (this.g - e); + n = this.a * (this.g - e); else { - var s = Jt(this.e0, this.e1, this.e2, this.e3, e); - i = this.a * (this.g - s); + var s = Wt(this.e0, this.e1, this.e2, this.e3, e); + n = this.a * (this.g - s); } - var r = this.ns * A(t - this.long0), o = this.x0 + i * Math.sin(r), a = this.y0 + this.rh - i * Math.cos(r); - return n.x = o, n.y = a, n; + var r = this.ns * P(t - this.long0), o = this.x0 + n * Math.sin(r), a = this.y0 + this.rh - n * Math.cos(r); + return i.x = o, i.y = a, i; } -function tE(n) { - n.x -= this.x0, n.y = this.rh - n.y + this.y0; - var t, e, i, s; - this.ns >= 0 ? (e = Math.sqrt(n.x * n.x + n.y * n.y), t = 1) : (e = -Math.sqrt(n.x * n.x + n.y * n.y), t = -1); +function hC(i) { + i.x -= this.x0, i.y = this.rh - i.y + this.y0; + var t, e, n, s; + this.ns >= 0 ? (e = Math.sqrt(i.x * i.x + i.y * i.y), t = 1) : (e = -Math.sqrt(i.x * i.x + i.y * i.y), t = -1); var r = 0; - if (e !== 0 && (r = Math.atan2(t * n.x, t * n.y)), this.sphere) - return s = A(this.long0 + r / this.ns), i = ls(this.g - e / this.a), n.x = s, n.y = i, n; + if (e !== 0 && (r = Math.atan2(t * i.x, t * i.y)), this.sphere) + return s = P(this.long0 + r / this.ns), n = Xn(this.g - e / this.a), i.x = s, i.y = n, i; var o = this.g - e / this.a; - return i = Eo(o, this.e0, this.e1, this.e2, this.e3), s = A(this.long0 + r / this.ns), n.x = s, n.y = i, n; -} -var eE = ["Equidistant_Conic", "eqdc"]; -const iE = { - init: JM, - forward: QM, - inverse: tE, - names: eE + return n = to(o, this.e0, this.e1, this.e2, this.e3), s = P(this.long0 + r / this.ns), i.x = s, i.y = n, i; +} +var cC = ["Equidistant_Conic", "eqdc"]; +const uC = { + init: aC, + forward: lC, + inverse: hC, + names: cC }; -function nE() { +function dC() { this.R = this.a; } -function sE(n) { - var t = n.x, e = n.y, i = A(t - this.long0), s, r; - Math.abs(e) <= I && (s = this.x0 + this.R * i, r = this.y0); - var o = Fi(2 * Math.abs(e / Math.PI)); - (Math.abs(i) <= I || Math.abs(Math.abs(e) - S) <= I) && (s = this.x0, e >= 0 ? r = this.y0 + Math.PI * this.R * Math.tan(0.5 * o) : r = this.y0 + Math.PI * this.R * -Math.tan(0.5 * o)); - var a = 0.5 * Math.abs(Math.PI / i - i / Math.PI), l = a * a, h = Math.sin(o), c = Math.cos(o), u = c / (h + c - 1), d = u * u, f = u * (2 / h - 1), g = f * f, m = Math.PI * this.R * (a * (u - g) + Math.sqrt(l * (u - g) * (u - g) - (g + l) * (d - g))) / (g + l); - i < 0 && (m = -m), s = this.x0 + m; +function fC(i) { + var t = i.x, e = i.y, n = P(t - this.long0), s, r; + Math.abs(e) <= I && (s = this.x0 + this.R * n, r = this.y0); + var o = wi(2 * Math.abs(e / Math.PI)); + (Math.abs(n) <= I || Math.abs(Math.abs(e) - S) <= I) && (s = this.x0, e >= 0 ? r = this.y0 + Math.PI * this.R * Math.tan(0.5 * o) : r = this.y0 + Math.PI * this.R * -Math.tan(0.5 * o)); + var a = 0.5 * Math.abs(Math.PI / n - n / Math.PI), l = a * a, h = Math.sin(o), c = Math.cos(o), u = c / (h + c - 1), d = u * u, f = u * (2 / h - 1), g = f * f, m = Math.PI * this.R * (a * (u - g) + Math.sqrt(l * (u - g) * (u - g) - (g + l) * (d - g))) / (g + l); + n < 0 && (m = -m), s = this.x0 + m; var _ = l + u; - return m = Math.PI * this.R * (f * _ - a * Math.sqrt((g + l) * (l + 1) - _ * _)) / (g + l), e >= 0 ? r = this.y0 + m : r = this.y0 - m, n.x = s, n.y = r, n; -} -function rE(n) { - var t, e, i, s, r, o, a, l, h, c, u, d, f; - return n.x -= this.x0, n.y -= this.y0, u = Math.PI * this.R, i = n.x / u, s = n.y / u, r = i * i + s * s, o = -Math.abs(s) * (1 + r), a = o - 2 * s * s + i * i, l = -2 * o + 1 + 2 * s * s + r * r, f = s * s / l + (2 * a * a * a / l / l / l - 9 * o * a / l / l) / 27, h = (o - a * a / 3 / l) / l, c = 2 * Math.sqrt(-h / 3), u = 3 * f / h / c, Math.abs(u) > 1 && (u >= 0 ? u = 1 : u = -1), d = Math.acos(u) / 3, n.y >= 0 ? e = (-c * Math.cos(d + Math.PI / 3) - a / 3 / l) * Math.PI : e = -(-c * Math.cos(d + Math.PI / 3) - a / 3 / l) * Math.PI, Math.abs(i) < I ? t = this.long0 : t = A(this.long0 + Math.PI * (r - 1 + Math.sqrt(1 + 2 * (i * i - s * s) + r * r)) / 2 / i), n.x = t, n.y = e, n; -} -var oE = ["Van_der_Grinten_I", "VanDerGrinten", "vandg"]; -const aE = { - init: nE, - forward: sE, - inverse: rE, - names: oE + return m = Math.PI * this.R * (f * _ - a * Math.sqrt((g + l) * (l + 1) - _ * _)) / (g + l), e >= 0 ? r = this.y0 + m : r = this.y0 - m, i.x = s, i.y = r, i; +} +function gC(i) { + var t, e, n, s, r, o, a, l, h, c, u, d, f; + return i.x -= this.x0, i.y -= this.y0, u = Math.PI * this.R, n = i.x / u, s = i.y / u, r = n * n + s * s, o = -Math.abs(s) * (1 + r), a = o - 2 * s * s + n * n, l = -2 * o + 1 + 2 * s * s + r * r, f = s * s / l + (2 * a * a * a / l / l / l - 9 * o * a / l / l) / 27, h = (o - a * a / 3 / l) / l, c = 2 * Math.sqrt(-h / 3), u = 3 * f / h / c, Math.abs(u) > 1 && (u >= 0 ? u = 1 : u = -1), d = Math.acos(u) / 3, i.y >= 0 ? e = (-c * Math.cos(d + Math.PI / 3) - a / 3 / l) * Math.PI : e = -(-c * Math.cos(d + Math.PI / 3) - a / 3 / l) * Math.PI, Math.abs(n) < I ? t = this.long0 : t = P(this.long0 + Math.PI * (r - 1 + Math.sqrt(1 + 2 * (n * n - s * s) + r * r)) / 2 / n), i.x = t, i.y = e, i; +} +var mC = ["Van_der_Grinten_I", "VanDerGrinten", "vandg"]; +const _C = { + init: dC, + forward: fC, + inverse: gC, + names: mC }; -function lE() { +function pC() { this.sin_p12 = Math.sin(this.lat0), this.cos_p12 = Math.cos(this.lat0); } -function hE(n) { - var t = n.x, e = n.y, i = Math.sin(n.y), s = Math.cos(n.y), r = A(t - this.long0), o, a, l, h, c, u, d, f, g, m, _, y, p, v, x, C, E, R, b, F, G, V, L; - return this.sphere ? Math.abs(this.sin_p12 - 1) <= I ? (n.x = this.x0 + this.a * (S - e) * Math.sin(r), n.y = this.y0 - this.a * (S - e) * Math.cos(r), n) : Math.abs(this.sin_p12 + 1) <= I ? (n.x = this.x0 + this.a * (S + e) * Math.sin(r), n.y = this.y0 + this.a * (S + e) * Math.cos(r), n) : (R = this.sin_p12 * i + this.cos_p12 * s * Math.cos(r), C = Math.acos(R), E = C ? C / Math.sin(C) : 1, n.x = this.x0 + this.a * E * s * Math.sin(r), n.y = this.y0 + this.a * E * (this.cos_p12 * i - this.sin_p12 * s * Math.cos(r)), n) : (o = ur(this.es), a = dr(this.es), l = fr(this.es), h = gr(this.es), Math.abs(this.sin_p12 - 1) <= I ? (c = this.a * Jt(o, a, l, h, S), u = this.a * Jt(o, a, l, h, e), n.x = this.x0 + (c - u) * Math.sin(r), n.y = this.y0 - (c - u) * Math.cos(r), n) : Math.abs(this.sin_p12 + 1) <= I ? (c = this.a * Jt(o, a, l, h, S), u = this.a * Jt(o, a, l, h, e), n.x = this.x0 + (c + u) * Math.sin(r), n.y = this.y0 + (c + u) * Math.cos(r), n) : (d = i / s, f = ts(this.a, this.e, this.sin_p12), g = ts(this.a, this.e, i), m = Math.atan((1 - this.es) * d + this.es * f * this.sin_p12 / (g * s)), _ = Math.atan2(Math.sin(r), this.cos_p12 * Math.tan(m) - this.sin_p12 * Math.cos(r)), _ === 0 ? b = Math.asin(this.cos_p12 * Math.sin(m) - this.sin_p12 * Math.cos(m)) : Math.abs(Math.abs(_) - Math.PI) <= I ? b = -Math.asin(this.cos_p12 * Math.sin(m) - this.sin_p12 * Math.cos(m)) : b = Math.asin(Math.sin(r) * Math.cos(m) / Math.sin(_)), y = this.e * this.sin_p12 / Math.sqrt(1 - this.es), p = this.e * this.cos_p12 * Math.cos(_) / Math.sqrt(1 - this.es), v = y * p, x = p * p, F = b * b, G = F * b, V = G * b, L = V * b, C = f * b * (1 - F * x * (1 - x) / 6 + G / 8 * v * (1 - 2 * x) + V / 120 * (x * (4 - 7 * x) - 3 * y * y * (1 - 7 * x)) - L / 48 * v), n.x = this.x0 + C * Math.sin(_), n.y = this.y0 + C * Math.cos(_), n)); -} -function cE(n) { - n.x -= this.x0, n.y -= this.y0; - var t, e, i, s, r, o, a, l, h, c, u, d, f, g, m, _, y, p, v, x, C, E, R, b; - return this.sphere ? (t = Math.sqrt(n.x * n.x + n.y * n.y), t > 2 * S * this.a ? void 0 : (e = t / this.a, i = Math.sin(e), s = Math.cos(e), r = this.long0, Math.abs(t) <= I ? o = this.lat0 : (o = Fi(s * this.sin_p12 + n.y * i * this.cos_p12 / t), a = Math.abs(this.lat0) - S, Math.abs(a) <= I ? this.lat0 >= 0 ? r = A(this.long0 + Math.atan2(n.x, -n.y)) : r = A(this.long0 - Math.atan2(-n.x, n.y)) : r = A(this.long0 + Math.atan2(n.x * i, t * this.cos_p12 * s - n.y * this.sin_p12 * i))), n.x = r, n.y = o, n)) : (l = ur(this.es), h = dr(this.es), c = fr(this.es), u = gr(this.es), Math.abs(this.sin_p12 - 1) <= I ? (d = this.a * Jt(l, h, c, u, S), t = Math.sqrt(n.x * n.x + n.y * n.y), f = d - t, o = Eo(f / this.a, l, h, c, u), r = A(this.long0 + Math.atan2(n.x, -1 * n.y)), n.x = r, n.y = o, n) : Math.abs(this.sin_p12 + 1) <= I ? (d = this.a * Jt(l, h, c, u, S), t = Math.sqrt(n.x * n.x + n.y * n.y), f = t - d, o = Eo(f / this.a, l, h, c, u), r = A(this.long0 + Math.atan2(n.x, n.y)), n.x = r, n.y = o, n) : (t = Math.sqrt(n.x * n.x + n.y * n.y), _ = Math.atan2(n.x, n.y), g = ts(this.a, this.e, this.sin_p12), y = Math.cos(_), p = this.e * this.cos_p12 * y, v = -p * p / (1 - this.es), x = 3 * this.es * (1 - v) * this.sin_p12 * this.cos_p12 * y / (1 - this.es), C = t / g, E = C - v * (1 + v) * Math.pow(C, 3) / 6 - x * (1 + 3 * v) * Math.pow(C, 4) / 24, R = 1 - v * E * E / 2 - C * E * E * E / 6, m = Math.asin(this.sin_p12 * Math.cos(E) + this.cos_p12 * Math.sin(E) * y), r = A(this.long0 + Math.asin(Math.sin(_) * Math.sin(E) / Math.cos(m))), b = Math.sin(m), o = Math.atan2((b - this.es * R * this.sin_p12) * Math.tan(m), b * (1 - this.es)), n.x = r, n.y = o, n)); -} -var uE = ["Azimuthal_Equidistant", "aeqd"]; -const dE = { - init: lE, - forward: hE, - inverse: cE, - names: uE +function yC(i) { + var t = i.x, e = i.y, n = Math.sin(i.y), s = Math.cos(i.y), r = P(t - this.long0), o, a, l, h, c, u, d, f, g, m, _, y, p, v, x, M, E, R, L, N, G, U, T; + return this.sphere ? Math.abs(this.sin_p12 - 1) <= I ? (i.x = this.x0 + this.a * (S - e) * Math.sin(r), i.y = this.y0 - this.a * (S - e) * Math.cos(r), i) : Math.abs(this.sin_p12 + 1) <= I ? (i.x = this.x0 + this.a * (S + e) * Math.sin(r), i.y = this.y0 + this.a * (S + e) * Math.cos(r), i) : (R = this.sin_p12 * n + this.cos_p12 * s * Math.cos(r), M = Math.acos(R), E = M ? M / Math.sin(M) : 1, i.x = this.x0 + this.a * E * s * Math.sin(r), i.y = this.y0 + this.a * E * (this.cos_p12 * n - this.sin_p12 * s * Math.cos(r)), i) : (o = qs(this.es), a = Js(this.es), l = Qs(this.es), h = tr(this.es), Math.abs(this.sin_p12 - 1) <= I ? (c = this.a * Wt(o, a, l, h, S), u = this.a * Wt(o, a, l, h, e), i.x = this.x0 + (c - u) * Math.sin(r), i.y = this.y0 - (c - u) * Math.cos(r), i) : Math.abs(this.sin_p12 + 1) <= I ? (c = this.a * Wt(o, a, l, h, S), u = this.a * Wt(o, a, l, h, e), i.x = this.x0 + (c + u) * Math.sin(r), i.y = this.y0 + (c + u) * Math.cos(r), i) : (d = n / s, f = $n(this.a, this.e, this.sin_p12), g = $n(this.a, this.e, n), m = Math.atan((1 - this.es) * d + this.es * f * this.sin_p12 / (g * s)), _ = Math.atan2(Math.sin(r), this.cos_p12 * Math.tan(m) - this.sin_p12 * Math.cos(r)), _ === 0 ? L = Math.asin(this.cos_p12 * Math.sin(m) - this.sin_p12 * Math.cos(m)) : Math.abs(Math.abs(_) - Math.PI) <= I ? L = -Math.asin(this.cos_p12 * Math.sin(m) - this.sin_p12 * Math.cos(m)) : L = Math.asin(Math.sin(r) * Math.cos(m) / Math.sin(_)), y = this.e * this.sin_p12 / Math.sqrt(1 - this.es), p = this.e * this.cos_p12 * Math.cos(_) / Math.sqrt(1 - this.es), v = y * p, x = p * p, N = L * L, G = N * L, U = G * L, T = U * L, M = f * L * (1 - N * x * (1 - x) / 6 + G / 8 * v * (1 - 2 * x) + U / 120 * (x * (4 - 7 * x) - 3 * y * y * (1 - 7 * x)) - T / 48 * v), i.x = this.x0 + M * Math.sin(_), i.y = this.y0 + M * Math.cos(_), i)); +} +function vC(i) { + i.x -= this.x0, i.y -= this.y0; + var t, e, n, s, r, o, a, l, h, c, u, d, f, g, m, _, y, p, v, x, M, E, R, L; + return this.sphere ? (t = Math.sqrt(i.x * i.x + i.y * i.y), t > 2 * S * this.a ? void 0 : (e = t / this.a, n = Math.sin(e), s = Math.cos(e), r = this.long0, Math.abs(t) <= I ? o = this.lat0 : (o = wi(s * this.sin_p12 + i.y * n * this.cos_p12 / t), a = Math.abs(this.lat0) - S, Math.abs(a) <= I ? this.lat0 >= 0 ? r = P(this.long0 + Math.atan2(i.x, -i.y)) : r = P(this.long0 - Math.atan2(-i.x, i.y)) : r = P(this.long0 + Math.atan2(i.x * n, t * this.cos_p12 * s - i.y * this.sin_p12 * n))), i.x = r, i.y = o, i)) : (l = qs(this.es), h = Js(this.es), c = Qs(this.es), u = tr(this.es), Math.abs(this.sin_p12 - 1) <= I ? (d = this.a * Wt(l, h, c, u, S), t = Math.sqrt(i.x * i.x + i.y * i.y), f = d - t, o = to(f / this.a, l, h, c, u), r = P(this.long0 + Math.atan2(i.x, -1 * i.y)), i.x = r, i.y = o, i) : Math.abs(this.sin_p12 + 1) <= I ? (d = this.a * Wt(l, h, c, u, S), t = Math.sqrt(i.x * i.x + i.y * i.y), f = t - d, o = to(f / this.a, l, h, c, u), r = P(this.long0 + Math.atan2(i.x, i.y)), i.x = r, i.y = o, i) : (t = Math.sqrt(i.x * i.x + i.y * i.y), _ = Math.atan2(i.x, i.y), g = $n(this.a, this.e, this.sin_p12), y = Math.cos(_), p = this.e * this.cos_p12 * y, v = -p * p / (1 - this.es), x = 3 * this.es * (1 - v) * this.sin_p12 * this.cos_p12 * y / (1 - this.es), M = t / g, E = M - v * (1 + v) * Math.pow(M, 3) / 6 - x * (1 + 3 * v) * Math.pow(M, 4) / 24, R = 1 - v * E * E / 2 - M * E * E * E / 6, m = Math.asin(this.sin_p12 * Math.cos(E) + this.cos_p12 * Math.sin(E) * y), r = P(this.long0 + Math.asin(Math.sin(_) * Math.sin(E) / Math.cos(m))), L = Math.sin(m), o = Math.atan2((L - this.es * R * this.sin_p12) * Math.tan(m), L * (1 - this.es)), i.x = r, i.y = o, i)); +} +var xC = ["Azimuthal_Equidistant", "aeqd"]; +const MC = { + init: pC, + forward: yC, + inverse: vC, + names: xC }; -function fE() { +function CC() { this.sin_p14 = Math.sin(this.lat0), this.cos_p14 = Math.cos(this.lat0); } -function gE(n) { - var t, e, i, s, r, o, a, l, h = n.x, c = n.y; - return i = A(h - this.long0), t = Math.sin(c), e = Math.cos(c), s = Math.cos(i), o = this.sin_p14 * t + this.cos_p14 * e * s, r = 1, (o > 0 || Math.abs(o) <= I) && (a = this.a * r * e * Math.sin(i), l = this.y0 + this.a * r * (this.cos_p14 * t - this.sin_p14 * e * s)), n.x = a, n.y = l, n; +function EC(i) { + var t, e, n, s, r, o, a, l, h = i.x, c = i.y; + return n = P(h - this.long0), t = Math.sin(c), e = Math.cos(c), s = Math.cos(n), o = this.sin_p14 * t + this.cos_p14 * e * s, r = 1, (o > 0 || Math.abs(o) <= I) && (a = this.a * r * e * Math.sin(n), l = this.y0 + this.a * r * (this.cos_p14 * t - this.sin_p14 * e * s)), i.x = a, i.y = l, i; } -function mE(n) { - var t, e, i, s, r, o, a; - return n.x -= this.x0, n.y -= this.y0, t = Math.sqrt(n.x * n.x + n.y * n.y), e = Fi(t / this.a), i = Math.sin(e), s = Math.cos(e), o = this.long0, Math.abs(t) <= I ? (a = this.lat0, n.x = o, n.y = a, n) : (a = Fi(s * this.sin_p14 + n.y * i * this.cos_p14 / t), r = Math.abs(this.lat0) - S, Math.abs(r) <= I ? (this.lat0 >= 0 ? o = A(this.long0 + Math.atan2(n.x, -n.y)) : o = A(this.long0 - Math.atan2(-n.x, n.y)), n.x = o, n.y = a, n) : (o = A(this.long0 + Math.atan2(n.x * i, t * this.cos_p14 * s - n.y * this.sin_p14 * i)), n.x = o, n.y = a, n)); +function wC(i) { + var t, e, n, s, r, o, a; + return i.x -= this.x0, i.y -= this.y0, t = Math.sqrt(i.x * i.x + i.y * i.y), e = wi(t / this.a), n = Math.sin(e), s = Math.cos(e), o = this.long0, Math.abs(t) <= I ? (a = this.lat0, i.x = o, i.y = a, i) : (a = wi(s * this.sin_p14 + i.y * n * this.cos_p14 / t), r = Math.abs(this.lat0) - S, Math.abs(r) <= I ? (this.lat0 >= 0 ? o = P(this.long0 + Math.atan2(i.x, -i.y)) : o = P(this.long0 - Math.atan2(-i.x, i.y)), i.x = o, i.y = a, i) : (o = P(this.long0 + Math.atan2(i.x * n, t * this.cos_p14 * s - i.y * this.sin_p14 * n)), i.x = o, i.y = a, i)); } -var _E = ["ortho"]; -const pE = { - init: fE, - forward: gE, - inverse: mE, - names: _E +var SC = ["ortho"]; +const RC = { + init: CC, + forward: EC, + inverse: wC, + names: SC }; -var Ct = { +var vt = { FRONT: 1, RIGHT: 2, BACK: 3, LEFT: 4, TOP: 5, BOTTOM: 6 -}, ut = { +}, ct = { AREA_0: 1, AREA_1: 2, AREA_2: 3, AREA_3: 4 }; -function yE() { - this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.lat_ts = this.lat_ts || 0, this.title = this.title || "Quadrilateralized Spherical Cube", this.lat0 >= S - ct / 2 ? this.face = Ct.TOP : this.lat0 <= -(S - ct / 2) ? this.face = Ct.BOTTOM : Math.abs(this.long0) <= ct ? this.face = Ct.FRONT : Math.abs(this.long0) <= S + ct ? this.face = this.long0 > 0 ? Ct.RIGHT : Ct.LEFT : this.face = Ct.BACK, this.es !== 0 && (this.one_minus_f = 1 - (this.a - this.b) / this.a, this.one_minus_f_squared = this.one_minus_f * this.one_minus_f); -} -function vE(n) { - var t = { x: 0, y: 0 }, e, i, s, r, o, a, l = { value: 0 }; - if (n.x -= this.long0, this.es !== 0 ? e = Math.atan(this.one_minus_f_squared * Math.tan(n.y)) : e = n.y, i = n.x, this.face === Ct.TOP) - r = S - e, i >= ct && i <= S + ct ? (l.value = ut.AREA_0, s = i - S) : i > S + ct || i <= -(S + ct) ? (l.value = ut.AREA_1, s = i > 0 ? i - Tt : i + Tt) : i > -(S + ct) && i <= -ct ? (l.value = ut.AREA_2, s = i + S) : (l.value = ut.AREA_3, s = i); - else if (this.face === Ct.BOTTOM) - r = S + e, i >= ct && i <= S + ct ? (l.value = ut.AREA_0, s = -i + S) : i < ct && i >= -ct ? (l.value = ut.AREA_1, s = -i) : i < -ct && i >= -(S + ct) ? (l.value = ut.AREA_2, s = -i - S) : (l.value = ut.AREA_3, s = i > 0 ? -i + Tt : -i - Tt); +function bC() { + this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.lat_ts = this.lat_ts || 0, this.title = this.title || "Quadrilateralized Spherical Cube", this.lat0 >= S - ht / 2 ? this.face = vt.TOP : this.lat0 <= -(S - ht / 2) ? this.face = vt.BOTTOM : Math.abs(this.long0) <= ht ? this.face = vt.FRONT : Math.abs(this.long0) <= S + ht ? this.face = this.long0 > 0 ? vt.RIGHT : vt.LEFT : this.face = vt.BACK, this.es !== 0 && (this.one_minus_f = 1 - (this.a - this.b) / this.a, this.one_minus_f_squared = this.one_minus_f * this.one_minus_f); +} +function LC(i) { + var t = { x: 0, y: 0 }, e, n, s, r, o, a, l = { value: 0 }; + if (i.x -= this.long0, this.es !== 0 ? e = Math.atan(this.one_minus_f_squared * Math.tan(i.y)) : e = i.y, n = i.x, this.face === vt.TOP) + r = S - e, n >= ht && n <= S + ht ? (l.value = ct.AREA_0, s = n - S) : n > S + ht || n <= -(S + ht) ? (l.value = ct.AREA_1, s = n > 0 ? n - Rt : n + Rt) : n > -(S + ht) && n <= -ht ? (l.value = ct.AREA_2, s = n + S) : (l.value = ct.AREA_3, s = n); + else if (this.face === vt.BOTTOM) + r = S + e, n >= ht && n <= S + ht ? (l.value = ct.AREA_0, s = -n + S) : n < ht && n >= -ht ? (l.value = ct.AREA_1, s = -n) : n < -ht && n >= -(S + ht) ? (l.value = ct.AREA_2, s = -n - S) : (l.value = ct.AREA_3, s = n > 0 ? -n + Rt : -n - Rt); else { var h, c, u, d, f, g, m; - this.face === Ct.RIGHT ? i = Zn(i, +S) : this.face === Ct.BACK ? i = Zn(i, +Tt) : this.face === Ct.LEFT && (i = Zn(i, -S)), d = Math.sin(e), f = Math.cos(e), g = Math.sin(i), m = Math.cos(i), h = f * m, c = f * g, u = d, this.face === Ct.FRONT ? (r = Math.acos(h), s = Ur(r, u, c, l)) : this.face === Ct.RIGHT ? (r = Math.acos(c), s = Ur(r, u, -h, l)) : this.face === Ct.BACK ? (r = Math.acos(-h), s = Ur(r, u, -c, l)) : this.face === Ct.LEFT ? (r = Math.acos(-c), s = Ur(r, u, h, l)) : (r = s = 0, l.value = ut.AREA_0); + this.face === vt.RIGHT ? n = bn(n, +S) : this.face === vt.BACK ? n = bn(n, +Rt) : this.face === vt.LEFT && (n = bn(n, -S)), d = Math.sin(e), f = Math.cos(e), g = Math.sin(n), m = Math.cos(n), h = f * m, c = f * g, u = d, this.face === vt.FRONT ? (r = Math.acos(h), s = Sr(r, u, c, l)) : this.face === vt.RIGHT ? (r = Math.acos(c), s = Sr(r, u, -h, l)) : this.face === vt.BACK ? (r = Math.acos(-h), s = Sr(r, u, -c, l)) : this.face === vt.LEFT ? (r = Math.acos(-c), s = Sr(r, u, h, l)) : (r = s = 0, l.value = ct.AREA_0); } - return a = Math.atan(12 / Tt * (s + Math.acos(Math.sin(s) * Math.cos(ct)) - S)), o = Math.sqrt((1 - Math.cos(r)) / (Math.cos(a) * Math.cos(a)) / (1 - Math.cos(Math.atan(1 / Math.cos(s))))), l.value === ut.AREA_1 ? a += S : l.value === ut.AREA_2 ? a += Tt : l.value === ut.AREA_3 && (a += 1.5 * Tt), t.x = o * Math.cos(a), t.y = o * Math.sin(a), t.x = t.x * this.a + this.x0, t.y = t.y * this.a + this.y0, n.x = t.x, n.y = t.y, n; + return a = Math.atan(12 / Rt * (s + Math.acos(Math.sin(s) * Math.cos(ht)) - S)), o = Math.sqrt((1 - Math.cos(r)) / (Math.cos(a) * Math.cos(a)) / (1 - Math.cos(Math.atan(1 / Math.cos(s))))), l.value === ct.AREA_1 ? a += S : l.value === ct.AREA_2 ? a += Rt : l.value === ct.AREA_3 && (a += 1.5 * Rt), t.x = o * Math.cos(a), t.y = o * Math.sin(a), t.x = t.x * this.a + this.x0, t.y = t.y * this.a + this.y0, i.x = t.x, i.y = t.y, i; } -function xE(n) { - var t = { lam: 0, phi: 0 }, e, i, s, r, o, a, l, h, c, u = { value: 0 }; - if (n.x = (n.x - this.x0) / this.a, n.y = (n.y - this.y0) / this.a, i = Math.atan(Math.sqrt(n.x * n.x + n.y * n.y)), e = Math.atan2(n.y, n.x), n.x >= 0 && n.x >= Math.abs(n.y) ? u.value = ut.AREA_0 : n.y >= 0 && n.y >= Math.abs(n.x) ? (u.value = ut.AREA_1, e -= S) : n.x < 0 && -n.x >= Math.abs(n.y) ? (u.value = ut.AREA_2, e = e < 0 ? e + Tt : e - Tt) : (u.value = ut.AREA_3, e += S), c = Tt / 12 * Math.tan(e), o = Math.sin(c) / (Math.cos(c) - 1 / Math.sqrt(2)), a = Math.atan(o), s = Math.cos(e), r = Math.tan(i), l = 1 - s * s * r * r * (1 - Math.cos(Math.atan(1 / Math.cos(a)))), l < -1 ? l = -1 : l > 1 && (l = 1), this.face === Ct.TOP) - h = Math.acos(l), t.phi = S - h, u.value === ut.AREA_0 ? t.lam = a + S : u.value === ut.AREA_1 ? t.lam = a < 0 ? a + Tt : a - Tt : u.value === ut.AREA_2 ? t.lam = a - S : t.lam = a; - else if (this.face === Ct.BOTTOM) - h = Math.acos(l), t.phi = h - S, u.value === ut.AREA_0 ? t.lam = -a + S : u.value === ut.AREA_1 ? t.lam = -a : u.value === ut.AREA_2 ? t.lam = -a - S : t.lam = a < 0 ? -a - Tt : -a + Tt; +function TC(i) { + var t = { lam: 0, phi: 0 }, e, n, s, r, o, a, l, h, c, u = { value: 0 }; + if (i.x = (i.x - this.x0) / this.a, i.y = (i.y - this.y0) / this.a, n = Math.atan(Math.sqrt(i.x * i.x + i.y * i.y)), e = Math.atan2(i.y, i.x), i.x >= 0 && i.x >= Math.abs(i.y) ? u.value = ct.AREA_0 : i.y >= 0 && i.y >= Math.abs(i.x) ? (u.value = ct.AREA_1, e -= S) : i.x < 0 && -i.x >= Math.abs(i.y) ? (u.value = ct.AREA_2, e = e < 0 ? e + Rt : e - Rt) : (u.value = ct.AREA_3, e += S), c = Rt / 12 * Math.tan(e), o = Math.sin(c) / (Math.cos(c) - 1 / Math.sqrt(2)), a = Math.atan(o), s = Math.cos(e), r = Math.tan(n), l = 1 - s * s * r * r * (1 - Math.cos(Math.atan(1 / Math.cos(a)))), l < -1 ? l = -1 : l > 1 && (l = 1), this.face === vt.TOP) + h = Math.acos(l), t.phi = S - h, u.value === ct.AREA_0 ? t.lam = a + S : u.value === ct.AREA_1 ? t.lam = a < 0 ? a + Rt : a - Rt : u.value === ct.AREA_2 ? t.lam = a - S : t.lam = a; + else if (this.face === vt.BOTTOM) + h = Math.acos(l), t.phi = h - S, u.value === ct.AREA_0 ? t.lam = -a + S : u.value === ct.AREA_1 ? t.lam = -a : u.value === ct.AREA_2 ? t.lam = -a - S : t.lam = a < 0 ? -a - Rt : -a + Rt; else { var d, f, g; - d = l, c = d * d, c >= 1 ? g = 0 : g = Math.sqrt(1 - c) * Math.sin(a), c += g * g, c >= 1 ? f = 0 : f = Math.sqrt(1 - c), u.value === ut.AREA_1 ? (c = f, f = -g, g = c) : u.value === ut.AREA_2 ? (f = -f, g = -g) : u.value === ut.AREA_3 && (c = f, f = g, g = -c), this.face === Ct.RIGHT ? (c = d, d = -f, f = c) : this.face === Ct.BACK ? (d = -d, f = -f) : this.face === Ct.LEFT && (c = d, d = f, f = -c), t.phi = Math.acos(-g) - S, t.lam = Math.atan2(f, d), this.face === Ct.RIGHT ? t.lam = Zn(t.lam, -S) : this.face === Ct.BACK ? t.lam = Zn(t.lam, -Tt) : this.face === Ct.LEFT && (t.lam = Zn(t.lam, +S)); + d = l, c = d * d, c >= 1 ? g = 0 : g = Math.sqrt(1 - c) * Math.sin(a), c += g * g, c >= 1 ? f = 0 : f = Math.sqrt(1 - c), u.value === ct.AREA_1 ? (c = f, f = -g, g = c) : u.value === ct.AREA_2 ? (f = -f, g = -g) : u.value === ct.AREA_3 && (c = f, f = g, g = -c), this.face === vt.RIGHT ? (c = d, d = -f, f = c) : this.face === vt.BACK ? (d = -d, f = -f) : this.face === vt.LEFT && (c = d, d = f, f = -c), t.phi = Math.acos(-g) - S, t.lam = Math.atan2(f, d), this.face === vt.RIGHT ? t.lam = bn(t.lam, -S) : this.face === vt.BACK ? t.lam = bn(t.lam, -Rt) : this.face === vt.LEFT && (t.lam = bn(t.lam, +S)); } if (this.es !== 0) { var m, _, y; m = t.phi < 0 ? 1 : 0, _ = Math.tan(t.phi), y = this.b / Math.sqrt(_ * _ + this.one_minus_f_squared), t.phi = Math.atan(Math.sqrt(this.a * this.a - y * y) / (this.one_minus_f * y)), m && (t.phi = -t.phi); } - return t.lam += this.long0, n.x = t.lam, n.y = t.phi, n; + return t.lam += this.long0, i.x = t.lam, i.y = t.phi, i; } -function Ur(n, t, e, i) { +function Sr(i, t, e, n) { var s; - return n < I ? (i.value = ut.AREA_0, s = 0) : (s = Math.atan2(t, e), Math.abs(s) <= ct ? i.value = ut.AREA_0 : s > ct && s <= S + ct ? (i.value = ut.AREA_1, s -= S) : s > S + ct || s <= -(S + ct) ? (i.value = ut.AREA_2, s = s >= 0 ? s - Tt : s + Tt) : (i.value = ut.AREA_3, s += S)), s; -} -function Zn(n, t) { - var e = n + t; - return e < -Tt ? e += Hs : e > +Tt && (e -= Hs), e; -} -var CE = ["Quadrilateralized Spherical Cube", "Quadrilateralized_Spherical_Cube", "qsc"]; -const ME = { - init: yE, - forward: vE, - inverse: xE, - names: CE + return i < I ? (n.value = ct.AREA_0, s = 0) : (s = Math.atan2(t, e), Math.abs(s) <= ht ? n.value = ct.AREA_0 : s > ht && s <= S + ht ? (n.value = ct.AREA_1, s -= S) : s > S + ht || s <= -(S + ht) ? (n.value = ct.AREA_2, s = s >= 0 ? s - Rt : s + Rt) : (n.value = ct.AREA_3, s += S)), s; +} +function bn(i, t) { + var e = i + t; + return e < -Rt ? e += As : e > +Rt && (e -= As), e; +} +var IC = ["Quadrilateralized Spherical Cube", "Quadrilateralized_Spherical_Cube", "qsc"]; +const AC = { + init: bC, + forward: LC, + inverse: TC, + names: IC }; -var cl = [ +var za = [ [1, 22199e-21, -715515e-10, 31103e-10], [0.9986, -482243e-9, -24897e-9, -13309e-10], [0.9954, -83103e-8, -448605e-10, -986701e-12], @@ -22797,7 +21160,7 @@ var cl = [ [0.6213, -0.010418, 883923e-10, 624051e-11], [0.5722, -906601e-8, 182e-6, 624051e-11], [0.5322, -677797e-8, 275608e-9, 624051e-11] -], Es = [ +], ls = [ [-520417e-23, 0.0124, 121431e-23, -845284e-16], [0.062, 0.0124, -126793e-14, 422642e-15], [0.124, 0.0124, 507171e-14, -160604e-14], @@ -22817,243 +21180,243 @@ var cl = [ [0.9394, 840947e-8, -192841e-9, -42106e-10], [0.9761, 616527e-8, -256e-6, -42106e-10], [1, 328947e-8, -319159e-9, -42106e-10] -], ug = 0.8487, dg = 1.3523, fg = Ge / 5, EE = 1 / fg, Gn = 18, wo = function(n, t) { - return n[0] + t * (n[1] + t * (n[2] + t * n[3])); -}, wE = function(n, t) { - return n[1] + t * (2 * n[2] + t * 3 * n[3]); +], Ff = 0.8487, Df = 1.3523, kf = Ae / 5, PC = 1 / kf, En = 18, eo = function(i, t) { + return i[0] + t * (i[1] + t * (i[2] + t * i[3])); +}, OC = function(i, t) { + return i[1] + t * (2 * i[2] + t * 3 * i[3]); }; -function SE(n, t, e, i) { - for (var s = t; i; --i) { - var r = n(s); +function NC(i, t, e, n) { + for (var s = t; n; --n) { + var r = i(s); if (s -= r, Math.abs(r) < e) break; } return s; } -function RE() { +function FC() { this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.long0 = this.long0 || 0, this.es = 0, this.title = this.title || "Robinson"; } -function TE(n) { - var t = A(n.x - this.long0), e = Math.abs(n.y), i = Math.floor(e * fg); - i < 0 ? i = 0 : i >= Gn && (i = Gn - 1), e = Ge * (e - EE * i); +function DC(i) { + var t = P(i.x - this.long0), e = Math.abs(i.y), n = Math.floor(e * kf); + n < 0 ? n = 0 : n >= En && (n = En - 1), e = Ae * (e - PC * n); var s = { - x: wo(cl[i], e) * t, - y: wo(Es[i], e) + x: eo(za[n], e) * t, + y: eo(ls[n], e) }; - return n.y < 0 && (s.y = -s.y), s.x = s.x * this.a * ug + this.x0, s.y = s.y * this.a * dg + this.y0, s; + return i.y < 0 && (s.y = -s.y), s.x = s.x * this.a * Ff + this.x0, s.y = s.y * this.a * Df + this.y0, s; } -function bE(n) { +function kC(i) { var t = { - x: (n.x - this.x0) / (this.a * ug), - y: Math.abs(n.y - this.y0) / (this.a * dg) + x: (i.x - this.x0) / (this.a * Ff), + y: Math.abs(i.y - this.y0) / (this.a * Df) }; if (t.y >= 1) - t.x /= cl[Gn][0], t.y = n.y < 0 ? -S : S; + t.x /= za[En][0], t.y = i.y < 0 ? -S : S; else { - var e = Math.floor(t.y * Gn); - for (e < 0 ? e = 0 : e >= Gn && (e = Gn - 1); ; ) - if (Es[e][0] > t.y) + var e = Math.floor(t.y * En); + for (e < 0 ? e = 0 : e >= En && (e = En - 1); ; ) + if (ls[e][0] > t.y) --e; - else if (Es[e + 1][0] <= t.y) + else if (ls[e + 1][0] <= t.y) ++e; else break; - var i = Es[e], s = 5 * (t.y - i[0]) / (Es[e + 1][0] - i[0]); - s = SE(function(r) { - return (wo(i, r) - t.y) / wE(i, r); - }, s, I, 100), t.x /= wo(cl[e], s), t.y = (5 * e + s) * zt, n.y < 0 && (t.y = -t.y); - } - return t.x = A(t.x + this.long0), t; -} -var LE = ["Robinson", "robin"]; -const IE = { - init: RE, - forward: TE, - inverse: bE, - names: LE + var n = ls[e], s = 5 * (t.y - n[0]) / (ls[e + 1][0] - n[0]); + s = NC(function(r) { + return (eo(n, r) - t.y) / OC(n, r); + }, s, I, 100), t.x /= eo(za[e], s), t.y = (5 * e + s) * $t, i.y < 0 && (t.y = -t.y); + } + return t.x = P(t.x + this.long0), t; +} +var GC = ["Robinson", "robin"]; +const $C = { + init: FC, + forward: DC, + inverse: kC, + names: GC }; -function PE() { +function BC() { this.name = "geocent"; } -function AE(n) { - var t = Jf(n, this.es, this.a); +function zC(i) { + var t = Cf(i, this.es, this.a); return t; } -function OE(n) { - var t = Qf(n, this.es, this.a, this.b); +function ZC(i) { + var t = Ef(i, this.es, this.a, this.b); return t; } -var FE = ["Geocentric", "geocentric", "geocent", "Geocent"]; -const NE = { - init: PE, - forward: AE, - inverse: OE, - names: FE +var UC = ["Geocentric", "geocentric", "geocent", "Geocent"]; +const VC = { + init: BC, + forward: zC, + inverse: ZC, + names: UC }; -var Ht = { +var zt = { N_POLE: 0, S_POLE: 1, EQUIT: 2, OBLIQ: 3 -}, ys = { +}, ns = { h: { def: 1e5, num: !0 }, azi: { def: 0, num: !0, degrees: !0 }, tilt: { def: 0, num: !0, degrees: !0 }, long0: { def: 0, num: !0 }, lat0: { def: 0, num: !0 } }; -function DE() { - if (Object.keys(ys).forEach(function(e) { +function WC() { + if (Object.keys(ns).forEach(function(e) { if (typeof this[e] > "u") - this[e] = ys[e].def; + this[e] = ns[e].def; else { - if (ys[e].num && isNaN(this[e])) + if (ns[e].num && isNaN(this[e])) throw new Error("Invalid parameter value, must be numeric " + e + " = " + this[e]); - ys[e].num && (this[e] = parseFloat(this[e])); + ns[e].num && (this[e] = parseFloat(this[e])); } - ys[e].degrees && (this[e] = this[e] * zt); - }.bind(this)), Math.abs(Math.abs(this.lat0) - S) < I ? this.mode = this.lat0 < 0 ? Ht.S_POLE : Ht.N_POLE : Math.abs(this.lat0) < I ? this.mode = Ht.EQUIT : (this.mode = Ht.OBLIQ, this.sinph0 = Math.sin(this.lat0), this.cosph0 = Math.cos(this.lat0)), this.pn1 = this.h / this.a, this.pn1 <= 0 || this.pn1 > 1e10) + ns[e].degrees && (this[e] = this[e] * $t); + }.bind(this)), Math.abs(Math.abs(this.lat0) - S) < I ? this.mode = this.lat0 < 0 ? zt.S_POLE : zt.N_POLE : Math.abs(this.lat0) < I ? this.mode = zt.EQUIT : (this.mode = zt.OBLIQ, this.sinph0 = Math.sin(this.lat0), this.cosph0 = Math.cos(this.lat0)), this.pn1 = this.h / this.a, this.pn1 <= 0 || this.pn1 > 1e10) throw new Error("Invalid height"); this.p = 1 + this.pn1, this.rp = 1 / this.p, this.h1 = 1 / this.pn1, this.pfact = (this.p + 1) * this.h1, this.es = 0; - var n = this.tilt, t = this.azi; - this.cg = Math.cos(t), this.sg = Math.sin(t), this.cw = Math.cos(n), this.sw = Math.sin(n); + var i = this.tilt, t = this.azi; + this.cg = Math.cos(t), this.sg = Math.sin(t), this.cw = Math.cos(i), this.sw = Math.sin(i); } -function kE(n) { - n.x -= this.long0; - var t = Math.sin(n.y), e = Math.cos(n.y), i = Math.cos(n.x), s, r; +function HC(i) { + i.x -= this.long0; + var t = Math.sin(i.y), e = Math.cos(i.y), n = Math.cos(i.x), s, r; switch (this.mode) { - case Ht.OBLIQ: - r = this.sinph0 * t + this.cosph0 * e * i; + case zt.OBLIQ: + r = this.sinph0 * t + this.cosph0 * e * n; break; - case Ht.EQUIT: - r = e * i; + case zt.EQUIT: + r = e * n; break; - case Ht.S_POLE: + case zt.S_POLE: r = -t; break; - case Ht.N_POLE: + case zt.N_POLE: r = t; break; } - switch (r = this.pn1 / (this.p - r), s = r * e * Math.sin(n.x), this.mode) { - case Ht.OBLIQ: - r *= this.cosph0 * t - this.sinph0 * e * i; + switch (r = this.pn1 / (this.p - r), s = r * e * Math.sin(i.x), this.mode) { + case zt.OBLIQ: + r *= this.cosph0 * t - this.sinph0 * e * n; break; - case Ht.EQUIT: + case zt.EQUIT: r *= t; break; - case Ht.N_POLE: - r *= -(e * i); + case zt.N_POLE: + r *= -(e * n); break; - case Ht.S_POLE: - r *= e * i; + case zt.S_POLE: + r *= e * n; break; } var o, a; - return o = r * this.cg + s * this.sg, a = 1 / (o * this.sw * this.h1 + this.cw), s = (s * this.cg - r * this.sg) * this.cw * a, r = o * a, n.x = s * this.a, n.y = r * this.a, n; + return o = r * this.cg + s * this.sg, a = 1 / (o * this.sw * this.h1 + this.cw), s = (s * this.cg - r * this.sg) * this.cw * a, r = o * a, i.x = s * this.a, i.y = r * this.a, i; } -function GE(n) { - n.x /= this.a, n.y /= this.a; - var t = { x: n.x, y: n.y }, e, i, s; - s = 1 / (this.pn1 - n.y * this.sw), e = this.pn1 * n.x * s, i = this.pn1 * n.y * this.cw * s, n.x = e * this.cg + i * this.sg, n.y = i * this.cg - e * this.sg; - var r = Pe(n.x, n.y); +function XC(i) { + i.x /= this.a, i.y /= this.a; + var t = { x: i.x, y: i.y }, e, n, s; + s = 1 / (this.pn1 - i.y * this.sw), e = this.pn1 * i.x * s, n = this.pn1 * i.y * this.cw * s, i.x = e * this.cg + n * this.sg, i.y = n * this.cg - e * this.sg; + var r = Ce(i.x, i.y); if (Math.abs(r) < I) - t.x = 0, t.y = n.y; + t.x = 0, t.y = i.y; else { var o, a; switch (a = 1 - r * r * this.pfact, a = (this.p - Math.sqrt(a)) / (this.pn1 / r + r / this.pn1), o = Math.sqrt(1 - a * a), this.mode) { - case Ht.OBLIQ: - t.y = Math.asin(o * this.sinph0 + n.y * a * this.cosph0 / r), n.y = (o - this.sinph0 * Math.sin(t.y)) * r, n.x *= a * this.cosph0; + case zt.OBLIQ: + t.y = Math.asin(o * this.sinph0 + i.y * a * this.cosph0 / r), i.y = (o - this.sinph0 * Math.sin(t.y)) * r, i.x *= a * this.cosph0; break; - case Ht.EQUIT: - t.y = Math.asin(n.y * a / r), n.y = o * r, n.x *= a; + case zt.EQUIT: + t.y = Math.asin(i.y * a / r), i.y = o * r, i.x *= a; break; - case Ht.N_POLE: - t.y = Math.asin(o), n.y = -n.y; + case zt.N_POLE: + t.y = Math.asin(o), i.y = -i.y; break; - case Ht.S_POLE: + case zt.S_POLE: t.y = -Math.asin(o); break; } - t.x = Math.atan2(n.x, n.y); + t.x = Math.atan2(i.x, i.y); } - return n.x = t.x + this.long0, n.y = t.y, n; + return i.x = t.x + this.long0, i.y = t.y, i; } -var $E = ["Tilted_Perspective", "tpers"]; -const BE = { - init: DE, - forward: kE, - inverse: GE, - names: $E +var YC = ["Tilted_Perspective", "tpers"]; +const jC = { + init: WC, + forward: HC, + inverse: XC, + names: YC }; -function zE() { +function KC() { if (this.flip_axis = this.sweep === "x" ? 1 : 0, this.h = Number(this.h), this.radius_g_1 = this.h / this.a, this.radius_g_1 <= 0 || this.radius_g_1 > 1e10) throw new Error(); if (this.radius_g = 1 + this.radius_g_1, this.C = this.radius_g * this.radius_g - 1, this.es !== 0) { - var n = 1 - this.es, t = 1 / n; - this.radius_p = Math.sqrt(n), this.radius_p2 = n, this.radius_p_inv2 = t, this.shape = "ellipse"; + var i = 1 - this.es, t = 1 / i; + this.radius_p = Math.sqrt(i), this.radius_p2 = i, this.radius_p_inv2 = t, this.shape = "ellipse"; } else this.radius_p = 1, this.radius_p2 = 1, this.radius_p_inv2 = 1, this.shape = "sphere"; this.title || (this.title = "Geostationary Satellite View"); } -function ZE(n) { - var t = n.x, e = n.y, i, s, r, o; +function qC(i) { + var t = i.x, e = i.y, n, s, r, o; if (t = t - this.long0, this.shape === "ellipse") { e = Math.atan(this.radius_p2 * Math.tan(e)); - var a = this.radius_p / Pe(this.radius_p * Math.cos(e), Math.sin(e)); + var a = this.radius_p / Ce(this.radius_p * Math.cos(e), Math.sin(e)); if (s = a * Math.cos(t) * Math.cos(e), r = a * Math.sin(t) * Math.cos(e), o = a * Math.sin(e), (this.radius_g - s) * s - r * r - o * o * this.radius_p_inv2 < 0) - return n.x = Number.NaN, n.y = Number.NaN, n; - i = this.radius_g - s, this.flip_axis ? (n.x = this.radius_g_1 * Math.atan(r / Pe(o, i)), n.y = this.radius_g_1 * Math.atan(o / i)) : (n.x = this.radius_g_1 * Math.atan(r / i), n.y = this.radius_g_1 * Math.atan(o / Pe(r, i))); + return i.x = Number.NaN, i.y = Number.NaN, i; + n = this.radius_g - s, this.flip_axis ? (i.x = this.radius_g_1 * Math.atan(r / Ce(o, n)), i.y = this.radius_g_1 * Math.atan(o / n)) : (i.x = this.radius_g_1 * Math.atan(r / n), i.y = this.radius_g_1 * Math.atan(o / Ce(r, n))); } else - this.shape === "sphere" && (i = Math.cos(e), s = Math.cos(t) * i, r = Math.sin(t) * i, o = Math.sin(e), i = this.radius_g - s, this.flip_axis ? (n.x = this.radius_g_1 * Math.atan(r / Pe(o, i)), n.y = this.radius_g_1 * Math.atan(o / i)) : (n.x = this.radius_g_1 * Math.atan(r / i), n.y = this.radius_g_1 * Math.atan(o / Pe(r, i)))); - return n.x = n.x * this.a, n.y = n.y * this.a, n; -} -function VE(n) { - var t = -1, e = 0, i = 0, s, r, o, a; - if (n.x = n.x / this.a, n.y = n.y / this.a, this.shape === "ellipse") { - this.flip_axis ? (i = Math.tan(n.y / this.radius_g_1), e = Math.tan(n.x / this.radius_g_1) * Pe(1, i)) : (e = Math.tan(n.x / this.radius_g_1), i = Math.tan(n.y / this.radius_g_1) * Pe(1, e)); - var l = i / this.radius_p; + this.shape === "sphere" && (n = Math.cos(e), s = Math.cos(t) * n, r = Math.sin(t) * n, o = Math.sin(e), n = this.radius_g - s, this.flip_axis ? (i.x = this.radius_g_1 * Math.atan(r / Ce(o, n)), i.y = this.radius_g_1 * Math.atan(o / n)) : (i.x = this.radius_g_1 * Math.atan(r / n), i.y = this.radius_g_1 * Math.atan(o / Ce(r, n)))); + return i.x = i.x * this.a, i.y = i.y * this.a, i; +} +function JC(i) { + var t = -1, e = 0, n = 0, s, r, o, a; + if (i.x = i.x / this.a, i.y = i.y / this.a, this.shape === "ellipse") { + this.flip_axis ? (n = Math.tan(i.y / this.radius_g_1), e = Math.tan(i.x / this.radius_g_1) * Ce(1, n)) : (e = Math.tan(i.x / this.radius_g_1), n = Math.tan(i.y / this.radius_g_1) * Ce(1, e)); + var l = n / this.radius_p; if (s = e * e + l * l + t * t, r = 2 * this.radius_g * t, o = r * r - 4 * s * this.C, o < 0) - return n.x = Number.NaN, n.y = Number.NaN, n; - a = (-r - Math.sqrt(o)) / (2 * s), t = this.radius_g + a * t, e *= a, i *= a, n.x = Math.atan2(e, t), n.y = Math.atan(i * Math.cos(n.x) / t), n.y = Math.atan(this.radius_p_inv2 * Math.tan(n.y)); + return i.x = Number.NaN, i.y = Number.NaN, i; + a = (-r - Math.sqrt(o)) / (2 * s), t = this.radius_g + a * t, e *= a, n *= a, i.x = Math.atan2(e, t), i.y = Math.atan(n * Math.cos(i.x) / t), i.y = Math.atan(this.radius_p_inv2 * Math.tan(i.y)); } else if (this.shape === "sphere") { - if (this.flip_axis ? (i = Math.tan(n.y / this.radius_g_1), e = Math.tan(n.x / this.radius_g_1) * Math.sqrt(1 + i * i)) : (e = Math.tan(n.x / this.radius_g_1), i = Math.tan(n.y / this.radius_g_1) * Math.sqrt(1 + e * e)), s = e * e + i * i + t * t, r = 2 * this.radius_g * t, o = r * r - 4 * s * this.C, o < 0) - return n.x = Number.NaN, n.y = Number.NaN, n; - a = (-r - Math.sqrt(o)) / (2 * s), t = this.radius_g + a * t, e *= a, i *= a, n.x = Math.atan2(e, t), n.y = Math.atan(i * Math.cos(n.x) / t); - } - return n.x = n.x + this.long0, n; -} -var UE = ["Geostationary Satellite View", "Geostationary_Satellite", "geos"]; -const WE = { - init: zE, - forward: ZE, - inverse: VE, - names: UE + if (this.flip_axis ? (n = Math.tan(i.y / this.radius_g_1), e = Math.tan(i.x / this.radius_g_1) * Math.sqrt(1 + n * n)) : (e = Math.tan(i.x / this.radius_g_1), n = Math.tan(i.y / this.radius_g_1) * Math.sqrt(1 + e * e)), s = e * e + n * n + t * t, r = 2 * this.radius_g * t, o = r * r - 4 * s * this.C, o < 0) + return i.x = Number.NaN, i.y = Number.NaN, i; + a = (-r - Math.sqrt(o)) / (2 * s), t = this.radius_g + a * t, e *= a, n *= a, i.x = Math.atan2(e, t), i.y = Math.atan(n * Math.cos(i.x) / t); + } + return i.x = i.x + this.long0, i; +} +var QC = ["Geostationary Satellite View", "Geostationary_Satellite", "geos"]; +const tE = { + init: KC, + forward: qC, + inverse: JC, + names: QC }; -function HE(n) { - n.Proj.projections.add(Yr), n.Proj.projections.add(jr), n.Proj.projections.add(J3), n.Proj.projections.add(lC), n.Proj.projections.add(gC), n.Proj.projections.add(vC), n.Proj.projections.add(SC), n.Proj.projections.add(IC), n.Proj.projections.add(NC), n.Proj.projections.add(BC), n.Proj.projections.add(nM), n.Proj.projections.add(hM), n.Proj.projections.add(gM), n.Proj.projections.add(xM), n.Proj.projections.add(SM), n.Proj.projections.add(IM), n.Proj.projections.add(NM), n.Proj.projections.add(BM), n.Proj.projections.add(HM), n.Proj.projections.add(KM), n.Proj.projections.add(iE), n.Proj.projections.add(aE), n.Proj.projections.add(dE), n.Proj.projections.add(pE), n.Proj.projections.add(ME), n.Proj.projections.add(IE), n.Proj.projections.add(NE), n.Proj.projections.add(BE), n.Proj.projections.add(WE); -} -re.defaultDatum = "WGS84"; -re.Proj = Be; -re.WGS84 = new re.Proj("WGS84"); -re.Point = Qn; -re.toPoint = tg; -re.defs = qt; -re.nadgrid = t3; -re.transform = Mo; -re.mgrs = _3; -re.version = "__VERSION__"; -HE(re); -function XE(n) { - const t = Object.keys(n.defs), e = t.length; - let i, s; - for (i = 0; i < e; ++i) { - const r = t[i]; - if (!Q(r)) { - const o = n.defs(r); +function eE(i) { + i.Proj.projections.add(Tr), i.Proj.projections.add(Ir), i.Proj.projections.add(a3), i.Proj.projections.add(p3), i.Proj.projections.add(E3), i.Proj.projections.add(L3), i.Proj.projections.add(N3), i.Proj.projections.add($3), i.Proj.projections.add(V3), i.Proj.projections.add(j3), i.Proj.projections.add(dM), i.Proj.projections.add(yM), i.Proj.projections.add(EM), i.Proj.projections.add(TM), i.Proj.projections.add(NM), i.Proj.projections.add($M), i.Proj.projections.add(VM), i.Proj.projections.add(jM), i.Proj.projections.add(eC), i.Proj.projections.add(oC), i.Proj.projections.add(uC), i.Proj.projections.add(_C), i.Proj.projections.add(MC), i.Proj.projections.add(RC), i.Proj.projections.add(AC), i.Proj.projections.add($C), i.Proj.projections.add(VC), i.Proj.projections.add(jC), i.Proj.projections.add(tE); +} +ee.defaultDatum = "WGS84"; +ee.Proj = Oe; +ee.WGS84 = new ee.Proj("WGS84"); +ee.Point = Gn; +ee.toPoint = wf; +ee.defs = Ut; +ee.nadgrid = hx; +ee.transform = Qr; +ee.mgrs = Sx; +ee.version = "__VERSION__"; +eE(ee); +function iE(i) { + const t = Object.keys(i.defs), e = t.length; + let n, s; + for (n = 0; n < e; ++n) { + const r = t[n]; + if (!J(r)) { + const o = i.defs(r); let a = o.units; - !a && o.projName === "longlat" && (a = "degrees"), md( - new Rl({ + !a && o.projName === "longlat" && (a = "degrees"), Vu( + new tl({ code: r, axisOrientation: o.axis, metersPerUnit: o.to_meter, @@ -23062,134 +21425,133 @@ function XE(n) { ); } } - for (i = 0; i < e; ++i) { - const r = t[i], o = Q(r); + for (n = 0; n < e; ++n) { + const r = t[n], o = J(r); for (s = 0; s < e; ++s) { - const a = t[s], l = Q(a); - if (!dd(r, a)) - if (n.defs[r] === n.defs[a]) - Ga([o, l]); + const a = t[s], l = J(a); + if (!zu(r, a)) + if (i.defs[r] === i.defs[a]) + ma([o, l]); else { - const h = n(r, a); - q0( + const h = i(r, a); + vg( o, l, - Jh(o, l, h.forward), - Jh(l, o, h.inverse) + Sh(o, l, h.forward), + Sh(l, o, h.inverse) ); } } } } -class Iu { +class iu { static setupCircles(t, e) { - let i = []; - return t.get("isSelected") ? i = [ - new Zt({ + let n = []; + return t.get("isSelected") ? n = [ + new Vt({ zIndex: 1, - image: new we({ + image: new qe({ radius: 2 * e, - stroke: new Xt({ + stroke: new Ee({ color: "#FFFFFF", width: 3 }), - fill: new Vt({ + fill: new he({ color: "rgb(239, 68, 68, 0.75)" }) }) }), - new Zt({ + new Vt({ zIndex: 2, - image: new we({ + image: new qe({ radius: 0.2 * e, - stroke: new Xt({ + stroke: new Ee({ color: "#FFFFFF", width: 3 }), - fill: new Vt({ + fill: new he({ color: "#DC2626" }) }) }) - ] : i = [ - new Zt({ + ] : n = [ + new Vt({ zIndex: 1, - image: new we({ + image: new qe({ radius: 2 * e, - stroke: new Xt({ + stroke: new Ee({ color: "#FFFFFF", width: 1 }), - fill: new Vt({ + fill: new he({ color: "rgb(239, 68, 68, 0.75)" }) }) }), - new Zt({ + new Vt({ zIndex: 2, - image: new we({ + image: new qe({ radius: 0.2 * e, - stroke: new Xt({ + stroke: new Ee({ color: "#FFFFFF", width: 1 }), - fill: new Vt({ + fill: new he({ color: "#DC2626" }) }) }) - ], i; + ], n; } } -class YE { +class ia { constructor(t) { - this.control = new bf(), this.store = w(); - const e = this.store.getMap(), i = new Ve(); - this.setupMapForCreation(e, i), window.addEventListener("authorize-created", () => { - this.createElement(i); + this.control = new qd(), this.store = w(); + const e = this.store.getMap(), n = new Ws(); + this.setupMapForCreation(e, n), window.addEventListener("authorize-created", (s) => { + this.createElement(n, s); }), window.addEventListener("remove-created-icon", () => { - this.deleteElement(i); + this.deleteElement(n); }), window.addEventListener("recenter-selected-element", () => { var o; - const s = this.store.getCurrentItemId(), r = (o = this.store.getSelectedFeature(s, "id")) == null ? void 0 : o.get("geom").getCoordinates(); + const s = this.store.getCurrentItemId(), r = (o = this.store.getSelectedFeature(s)) == null ? void 0 : o.get("geom").getCoordinates(); e.getView().setCenter(r); }), this.addLongClickEvent(t, e), e.on("click", (s) => { e.forEachFeatureAtPixel(s.pixel, (r) => { var o, a; - r && ((o = r.getGeometry()) == null ? void 0 : o.getType()) === "Point" && (i.getFeatures().forEach((l) => { - l.set("isSelected", void 0); - }), this.store.setCurrentItemId(r.get("id")), (a = this.store.getSelectedFeature(r.get("id"), "id")) == null || a.set("isSelected", !0), ot.sendEvent("open-select-create-box", r.get("geom").getCoordinates()), this.control.show()); + r && ((o = r.getGeometry()) == null ? void 0 : o.getType()) === "Point" && r.get("id") && (this.store.unselectFeatures(), this.store.setCurrentItemId(r.get("id")), (a = this.store.getSelectedFeature(r.get("id"))) == null || a.set("isSelected", !0), st.sendEvent("open-select-create-box", r.get("geom").getCoordinates()), this.control.show()); }); }); } setupMapForCreation(t, e) { var o; - const i = this.store.getOptions(), s = ((o = i.notifications.find((a) => a.rule.type === "ZOOM_CONSTRAINT")) == null ? void 0 : o.rule.minZoom) || i.zoom, r = new Ze({ + const n = this.store.getOptions(), s = ((o = n.notifications.find((a) => a.rule.type === "ZOOM_CONSTRAINT")) == null ? void 0 : o.rule.minZoom) || n.zoom, r = new Vs({ source: e, visible: !0 }); r.setStyle(function(a) { - return Iu.setupCircles(a, 1); + return iu.setupCircles(a, 1); }), t.addLayer(r), t.getView().on("change:resolution", () => { const a = t.getView().getZoom(), l = t.getView().getResolution(); a && l && a > s && r.setStyle(function(h) { - return Iu.setupCircles(h, a / l); + return iu.setupCircles(h, a / l); }); }), this.control.disable(), t.addControl(this.control); } - createElement(t) { + createElement(t, e) { if (this.store.getSelectedFeatures().length > this.store.getMaxElement()) { - this.store.removeSelectedFeature(this.store.getCurrentItemId(), "id"); + this.store.removeSelectedFeature(e.detail); return; } - const i = this.store.getSelectedFeature(this.store.getCurrentItemId(), "id"); - i && (this.store.getMaxElement() === 1 ? (t.getFeatures().forEach((s) => t.removeFeature(s)), this.control.hide()) : t.getFeatures().forEach((s) => { - s.get("id") !== this.store.getCurrentItemId() && s.set("isSelected", void 0); - }), t.addFeature(i), this.control.show(), ot.sendEvent("open-select-create-box", i.get("geom").getCoordinates()), this.store.setCustomDisplay(!0), this.store.setTargetBoxSize("select")), this.store.getMap().get("target").className = `${this.store.getTargetBoxSize()} ${this.store.getTheme()}`; + this.store.setCurrentItemId(e.detail); + const s = this.store.getSelectedFeature(this.store.getCurrentItemId()); + s && (this.store.getMaxElement() === 1 ? (t.getFeatures().forEach((r) => t.removeFeature(r)), this.control.hide()) : t.getFeatures().forEach((r) => { + r.get("id") !== this.store.getCurrentItemId() && r.set("isSelected", void 0); + }), t.addFeature(s), this.control.show(), st.sendEvent("open-select-create-box", s.get("geom").getCoordinates()), this.store.setCustomDisplay(!0), this.store.setTargetBoxSize("select")), this.store.getMap().get("target").className = `${this.store.getTargetBoxSize()} ${this.store.getTheme()}`; } deleteElement(t) { - const e = this.store.getSelectedFeature(this.store.getCurrentItemId(), "id"); - e && (t.removeFeature(e), this.control.hide(), this.store.removeSelectedFeature(this.store.getCurrentItemId(), "id"), ot.sendEvent("rule-validation", void 0), Lf.setCustomStyleWithouInfoBox()), this.store.getMap().get("target").className = `${this.store.getTargetBoxSize()} ${this.store.getTheme()}`; + const e = this.store.getSelectedFeature(this.store.getCurrentItemId()); + e && (t.removeFeature(e), this.control.hide(), this.store.removeSelectedFeature(this.store.getCurrentItemId()), st.sendEvent("rule-validation", void 0), Jd.setCustomStyleWithouInfoBox()), this.store.getMap().get("target").className = `${this.store.getTargetBoxSize()} ${this.store.getTheme()}`; } addLongClickEvent(t, e) { let s, r = [0, 0]; @@ -23211,88 +21573,90 @@ class YE { this.clearCreationTimeout(s); }); } - requestElementCreation(t, e, i, s) { - const r = i.getCoordinateFromPixel([t - s.offsetLeft, e - s.offsetTop]), o = new Se(r), a = new Ie({ - geom: o, - id: Number(`${Math.round(r[0])}${Math.round(r[1])}`), + requestElementCreation(t, e, n, s) { + const r = s.getBoundingClientRect(); + console.log(r); + const o = n.getCoordinateFromPixel([t - r.left - document.documentElement.scrollLeft, e - r.top - document.documentElement.scrollTop]), a = new Ci(o), l = new zs({ + geom: a, + id: Number(`${Math.round(o[0])}${Math.round(o[1])}`), isSelected: !0 }); - a.setGeometryName("geom"), this.store.getMaxElement() === 1 && this.store.removeSelectedFeature(this.store.getCurrentItemId(), "id"), (this.store.getMaxElement() === -1 || this.store.getSelectedFeatures().length <= this.store.getMaxElement()) && (this.store.setCurrentItemId(a.get("id")), this.store.addSelectedFeature(a), ot.sendEvent("icon-created", void 0)); + l.setGeometryName("geom"), this.store.getMaxElement() === 1 && this.store.removeSelectedFeature(this.store.getCurrentItemId()), (this.store.getMaxElement() === -1 || this.store.getSelectedFeatures().length <= this.store.getMaxElement()) && (this.store.addSelectedFeature(l, l.get("id"), "create"), st.sendEvent("icon-created", l.get("id"))); } - moveAnalyzer(t, e, i) { - return Math.abs(e - t[0]) > 10 || Math.abs(i - t[1]) > 10; + moveAnalyzer(t, e, n) { + return Math.abs(e - t[0]) > 10 || Math.abs(n - t[1]) > 10; } clearCreationTimeout(t) { clearTimeout(t), t = void 0; } } -const gg = `.search-container{left:calc(50% - 151px);position:absolute;max-width:302px;width:100%;top:var(--top-distance);z-index:-1}.search-input-container{border-radius:var(--icon-border-radius);border:1px solid var(--icon-border-color);display:flex;background-color:var(--information-box-background-color)}.search-input{width:calc(100% - 13px);height:44px;border:none;outline:none;padding:0 0 0 11px;font-size:14px;background-color:var(--information-box-background-color);color:var(--information-box-text-color)}.search-svg-container{width:29px;height:44px;margin-right:11px;display:flex;align-items:center}ul{margin-top:0;list-style-type:none;background-color:var(--information-box-background-color);padding-left:0;border-radius:var(--icon-border-radius)}ul>:first-child{border-top-right-radius:var(--icon-border-radius);border-top-left-radius:var(--icon-border-radius)}li{height:40px;border-bottom:1px solid var(--icon-border-color);padding-left:11px;font-size:12px;display:flex;align-items:center;justify-content:start;color:var(--information-box-text-color)}ul>:last-child{border-bottom-right-radius:var(--icon-border-radius);border-bottom-left-radius:var(--icon-border-radius)}li:hover,li:focus{background-color:var(--icon-border-color)}svg{width:var(--svg-icon-size);height:var(--svg-icon-size);stroke:var(--information-box-title-color)}svg:hover{stroke:var(--information-cross-hover-color)}svg>g>.icon{fill:none;stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}.cross-div{width:var(--svg-icon-size);height:var(--svg-icon-size);cursor:pointer} +const Gf = `.search-container{left:calc(50% - 151px);position:absolute;max-width:302px;width:100%;top:var(--top-distance);z-index:-1}.search-input-container{border-radius:var(--icon-border-radius);border:1px solid var(--icon-border-color);display:flex;background-color:var(--information-box-background-color)}.search-input{width:calc(100% - 13px);height:44px;border:none;outline:none;padding:0 0 0 11px;font-size:14px;background-color:var(--information-box-background-color);color:var(--information-box-text-color)}.search-svg-container{width:29px;height:44px;margin-right:11px;display:flex;align-items:center}ul{margin-top:0;list-style-type:none;background-color:var(--information-box-background-color);padding-left:0;border-radius:var(--icon-border-radius)}ul>:first-child{border-top-right-radius:var(--icon-border-radius);border-top-left-radius:var(--icon-border-radius)}li{height:40px;border-bottom:1px solid var(--icon-border-color);padding-left:11px;font-size:12px;display:flex;align-items:center;justify-content:start;color:var(--information-box-text-color)}ul>:last-child{border-bottom-right-radius:var(--icon-border-radius);border-bottom-left-radius:var(--icon-border-radius)}li:hover,li:focus{background-color:var(--icon-border-color)}svg{width:var(--svg-icon-size);height:var(--svg-icon-size);stroke:var(--information-box-title-color)}svg:hover{stroke:var(--information-cross-hover-color)}svg>g>.icon{fill:none;stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}.cross-div{width:var(--svg-icon-size);height:var(--svg-icon-size);cursor:pointer} `; -var jE = Object.defineProperty, qE = Object.getOwnPropertyDescriptor, gn = (n, t, e, i) => { - for (var s = i > 1 ? void 0 : i ? qE(t, e) : t, r = n.length - 1, o; r >= 0; r--) - (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); - return i && s && jE(t, e, s), s; +var nE = Object.defineProperty, sE = Object.getOwnPropertyDescriptor, tn = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? sE(t, e) : t, r = i.length - 1, o; r >= 0; r--) + (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); + return n && s && nE(t, e, s), s; }; -let js = class extends kt { +let Ns = class extends At { constructor() { super(), this._results = [], w().getMap().addEventListener("click", () => { this._results = []; }); } - updated(n) { - if (n.has("locations")) + updated(i) { + if (i.has("locations")) if (this.locations && this.locations.results && this.locations.results.length > 0) { const t = this.locations.results.length > 5 ? 5 : this.locations.results.length; this._results = []; for (let e = 0; e < t; e++) { - let i = ""; + let n = ""; if (this.locations.results[e].attrs.origin == "address") { if (this.locations.results[e].attrs.label.trim().startsWith("")) continue; - i = this.locations.results[e].attrs.label.replace("", " - ").replace("", ""); + n = this.locations.results[e].attrs.label.replace("", " - ").replace("", ""); } else - this.locations.results[e].attrs.origin == "parcel" && (i = "Parcelle: " + this.locations.results[e].attrs.label.replace("", "").replace("", "").split("(CH")[0]); - this._results.push({ coordinate: [this.locations.results[e].attrs.lon, this.locations.results[e].attrs.lat], address: i }); + this.locations.results[e].attrs.origin == "parcel" && (n = "Parcelle: " + this.locations.results[e].attrs.label.replace("", "").replace("", "").split("(CH")[0]); + this._results.push({ coordinate: [this.locations.results[e].attrs.lon, this.locations.results[e].attrs.lat], address: n }); } } else this._results = []; } - selectAddress(n, t) { - w().getMap().getView().setCenter(K0([n[0], n[1]], "EPSG:2056")), this._results = [], ot.sendEvent("address_selected", t); + selectAddress(i, t) { + w().getMap().getView().setCenter(xg([i[0], i[1]], "EPSG:2056")), this._results = [], st.sendEvent("address_selected", t); } render() { return Lt`
    ${this._results.map( - (n) => Lt`
  • this.selectAddress(n.coordinate, n.address)}>${n.address}
  • ` + (i) => Lt`
  • this.selectAddress(i.coordinate, i.address)}>${i.address}
  • ` )}
`; } }; -js.styles = [Mt(gg)]; -gn([ - cn({ type: Object }) -], js.prototype, "locations", 2); -gn([ - ae() -], js.prototype, "_results", 2); -js = gn([ - oe("location-list") -], js); -let es = class extends kt { +Ns.styles = [xt(Gf)]; +tn([ + ji({ type: Object }) +], Ns.prototype, "locations", 2); +tn([ + Yt() +], Ns.prototype, "_results", 2); +Ns = tn([ + Xt("location-list") +], Ns); +let Bn = class extends At { constructor() { - super(), this.results = {}, this._hasSearch = !1, window.addEventListener("address_selected", (n) => { - this.inputElement.value = n.detail, this._hasSearch = !1; + super(), this.results = {}, this._hasSearch = !1, window.addEventListener("address_selected", (i) => { + this.inputElement.value = i.detail, this._hasSearch = !1; }); } firstUpdated() { this.inputElement.oninput = () => { if (this.inputElement.value.length > 1) { this._hasSearch = !0; - const n = w().getOptions(); - let t = `${n.search.requestWithoutCustomValue}&searchText=${this.inputElement.value}`; - n.search.bboxRestiction !== "" && (t += `&bbox=${n.search.bboxRestiction}`), fetch(t).then((e) => e.json()).then((e) => { + const i = w().getOptions(); + let t = `${i.search.requestWithoutCustomValue}&searchText=${this.inputElement.value}`; + i.search.bboxRestiction !== "" && (t += `&bbox=${i.search.bboxRestiction}`), fetch(t).then((e) => e.json()).then((e) => { this.results = e; }); } else @@ -23307,10 +21671,10 @@ let es = class extends kt {
- ${Rf( + ${Bd( this._hasSearch ? Lt`
- ${Ue(at.cross)} -
` : Lt`${Ue(at.search)}` + ${Fe(ot.cross)} +
` : Lt`${Fe(ot.search)}` )}
@@ -23318,39 +21682,39 @@ let es = class extends kt { `; } }; -es.styles = [Mt(gg)]; -gn([ - Vu("#search") -], es.prototype, "inputElement", 2); -gn([ - ae() -], es.prototype, "results", 2); -gn([ - ae() -], es.prototype, "_hasSearch", 2); -es = gn([ - oe("search-location") -], es); -class KE extends Gt { +Bn.styles = [xt(Gf)]; +tn([ + mu("#search") +], Bn.prototype, "inputElement", 2); +tn([ + Yt() +], Bn.prototype, "results", 2); +tn([ + Yt() +], Bn.prototype, "_hasSearch", 2); +Bn = tn([ + Xt("search-location") +], Bn); +class rE extends Dt { constructor() { const t = document.createElement("search-location"); super({ element: t }), this.div = t; } } -class JE { +class oE { constructor() { - const t = new Zt({ - fill: new Vt({ + const t = new Vt({ + fill: new he({ color: "#ffffff00" }), - stroke: new Xt({ + stroke: new Ee({ color: "#dddddd", width: 5 }) - }), e = new Ze({ - source: new Ve({ + }), e = new Vs({ + source: new Ws({ url: () => w().getOptions().borderUrl, - format: new mf() + format: new E_() }), zIndex: 9999, style: t, @@ -23358,11 +21722,11 @@ class JE { }); e.on("change", () => { var s, r; - const i = (s = e.getSource()) == null ? void 0 : s.getExtent(); - if (i) { + const n = (s = e.getSource()) == null ? void 0 : s.getExtent(); + if (n) { const o = w().getOptions(); - w().getMap().setView(new si({ - extent: i, + w().getMap().setView(new Ke({ + extent: n, projection: "EPSG:2056", center: o.defaultCenter, zoom: o.zoom, @@ -23372,55 +21736,167 @@ class JE { constrainOnlyCenter: !0 })); } - w().setBorderConstraint((r = e.getSource()) == null ? void 0 : r.getExtent()), ot.sendEvent("border-contraint-enabled", void 0); + w().setBorderConstraint((r = e.getSource()) == null ? void 0 : r.getExtent()), st.sendEvent("border-contraint-enabled", void 0); }), w().getMap().addLayer(e); } } -var QE = Object.defineProperty, tw = Object.getOwnPropertyDescriptor, Xo = (n, t, e, i) => { - for (var s = i > 1 ? void 0 : i ? tw(t, e) : t, r = n.length - 1, o; r >= 0; r--) - (o = n[r]) && (s = (i ? o(t, e, s) : o(s)) || s); - return i && s && QE(t, e, s), s; +class aE { + constructor() { + var e; + this.vectorLayer = new Vs(), this.vectorSource = new Ws(); + const t = w().getGeolocation(); + if (t) { + const n = new zs(); + n.setStyle( + new Vt({ + image: new qe({ + radius: 6, + fill: new he({ + color: "#3399CC" + }), + stroke: new Ee({ + color: "#fff", + width: 2 + }) + }) + }) + ), t.on("change:position", function() { + const s = t.getPosition(); + n.setGeometry( + s ? new Ci(s) : void 0 + ); + }), (e = this.vectorSource) == null || e.addFeature(n), this.vectorLayer.setSource(this.vectorSource), w().getMap().addLayer(this.vectorLayer); + } + } + removeMarker() { + w().getMap().removeLayer(this.vectorLayer); + } +} +const lE = `.loader-element{position:absolute;top:calc(50% - 52px);background-color:var(--information-box-background-color);box-shadow:#0003 0 1px 4px;padding:15px;border-radius:10px;border:1px solid var(--information-box-background-color);z-index:10;max-width:302px;width:100%;left:calc(50% - 167px)}.loader-text{display:flex;justify-content:center;margin-top:10px;color:var(--information-box-title-color)}.loader-container{display:flex;justify-content:center}.loader{width:48px;height:48px;border:4px solid #008c6f;border-bottom-color:transparent;border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}} +`; +var hE = Object.defineProperty, cE = Object.getOwnPropertyDescriptor, $f = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? cE(t, e) : t, r = i.length - 1, o; r >= 0; r--) + (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); + return n && s && hE(t, e, s), s; +}; +let io = class extends At { + constructor(i) { + super(), this.message = "", this.message = i; + } + render() { + return Lt` +
+
+ +
+
${this.message}
+
+ `; + } +}; +io.styles = [xt(lE)]; +$f([ + Yt() +], io.prototype, "message", 2); +io = $f([ + Xt("loader-box") +], io); +class uE extends Dt { + constructor(t) { + const e = document.createElement("loader-box"); + e.message = t, super({ + element: e + }); + } + disable() { + this.element.classList.add("disabled"); + } + show() { + this.element.classList.remove("fade-out"), this.element.classList.remove("disabled"), this.element.classList.add("fade-in"); + } + hide() { + this.element.classList.remove("fade-in"), this.element.classList.add("fade-out"); + } +} +class dE { + removeLoaderBox() { + this.loaderBox.hide(); + } + chromeBasePermissionAnalyzer() { + const t = w().getGeolocation(); + navigator.permissions.query({ name: "geolocation" }).then((e) => { + e.state === "denied" && (t == null || t.setTracking(!1), this.denied()), e.state === "prompt" && this.loaderBox.show(), e.state === "granted" && this.granted(), e.onchange = () => { + var n; + e.state === "denied" && (t == null || t.setTracking(!1), this.denied()), e.state === "prompt" && (this.loaderBox.show(), t == null || t.setTracking(!0), (n = this.marker) == null || n.removeMarker()), e.state === "granted" && (t == null || t.setTracking(!0), this.granted()); + }; + }); + } + granted() { + this.removeLoaderBox(), this.marker = new aE(); + } + denied() { + var t; + this.removeLoaderBox(), (t = this.marker) == null || t.removeMarker(); + } + checkGeolocation() { + const t = w().getGeolocation(); + navigator.userAgent.match(/Chrome\/\d+/) !== null ? this.chromeBasePermissionAnalyzer() : (navigator.permissions.query({ name: "geolocation" }).then((e) => { + e.state === "denied" && this.denied(), e.state === "prompt" && this.loaderBox.show(), e.state === "granted" && this.granted(); + }), t == null || t.on("error", () => { + this.denied(); + }), t == null || t.on("change:position", () => { + this.granted(); + })); + } + constructor() { + const t = w().getGeolocation(); + t == null || t.setTracking(!0), this.loaderBox = new uE("Chargement des donn\xE9es GPS"), w().getMap().addControl(this.loaderBox), this.loaderBox.disable(), this.checkGeolocation(); + } +} +var fE = Object.defineProperty, gE = Object.getOwnPropertyDescriptor, bo = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? gE(t, e) : t, r = i.length - 1, o; r >= 0; r--) + (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); + return n && s && fE(t, e, s), s; }; -let is = class extends kt { +let zn = class extends At { constructor() { super(), this.options = {}; } connectedCallback() { super.connectedCallback(); } - setupTheme(n) { - n.darkMode ? w().setTheme("dark") : n.lightMode || window.matchMedia("(prefers-color-scheme: light)").matches ? w().setTheme("light") : window.matchMedia("(prefers-color-scheme: dark)").matches ? w().setTheme("dark") : w().setTheme("light"); + setupTheme(i) { + i.darkMode ? w().setTheme("dark") : i.lightMode || window.matchMedia("(prefers-color-scheme: light)").matches ? w().setTheme("light") : window.matchMedia("(prefers-color-scheme: dark)").matches ? w().setTheme("dark") : w().setTheme("light"); } - setupCustomDisplay(n) { - n.mode.type === "target" ? (w().setCustomDisplay(n.geolocationInformation.displayBox), this.setupTargetBoxSize(n.geolocationInformation)) : n.search.displaySearch ? (w().setTargetBoxSize("small"), w().setCustomDisplay(!0)) : (w().setTargetBoxSize("no-box"), w().setCustomDisplay(!1)); + setupCustomDisplay(i) { + i.mode.type === "target" ? (w().setCustomDisplay(i.geolocationInformation.displayBox), this.setupTargetBoxSize(i.geolocationInformation)) : i.search.displaySearch ? (w().setTargetBoxSize("small"), w().setCustomDisplay(!0)) : (w().setTargetBoxSize("no-box"), w().setCustomDisplay(!1)); } - setupTargetBoxSize(n) { - n.currentLocation && n.reverseLocation ? w().setTargetBoxSize("large") : n.currentLocation || n.reverseLocation ? w().setTargetBoxSize("medium") : w().setTargetBoxSize("small"); + setupTargetBoxSize(i) { + i.currentLocation && i.reverseLocation ? w().setTargetBoxSize("large") : i.currentLocation || i.reverseLocation ? w().setTargetBoxSize("medium") : w().setTargetBoxSize("small"); } firstUpdated() { - var t; - Fv.getOptions(this.options); - const n = w().getOptions(); - this.setupTheme(n), this.setupCustomDisplay(n), re.defs("EPSG:2056", "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs"), XE(re), this.view = new si({ + Uy.getOptions(this.options); + const i = w().getOptions(); + this.setupTheme(i), this.setupCustomDisplay(i), ee.defs("EPSG:2056", "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs"), iE(ee), this.view = new Ke({ projection: "EPSG:2056", - center: n.defaultCenter, - zoom: n.zoom, - minZoom: n.minZoom, - maxZoom: n.maxZoom, - enableRotation: n.enableRotation - }), w().setMap(new Mm({ + center: i.defaultCenter, + zoom: i.zoom, + minZoom: i.minZoom, + maxZoom: i.maxZoom, + enableRotation: i.enableRotation + }), w().setMap(new W1({ target: this.mapElement, controls: [], layers: [], view: this.view - })), n.enableGeolocation && (w().setGeolocation(new Rm({ + })), i.enableGeolocation && (w().setGeolocation(new j1({ trackingOptions: { enableHighAccuracy: !0 }, projection: this.view.getProjection() - })), (t = w().getGeolocation()) == null || t.setTracking(!0), new My()), n.mode.type === "target" && (w().getMap().addControl(new cx()), n.geolocationInformation.displayBox && w().getMap().addControl( - new gx() - )), n.wmts.length > 0 && new Sv(), n.displayScaleLine && w().getMap().addControl(new Q_({ units: "metric" })), n.geojson.url != "" && new Dp(), n.borderUrl !== "" && new JE(), n.mode.type === "select" && n.wfs.url != "" && new Cy(), n.enableDraw && new Np(), n.inclusionArea.url !== "" && new Nv(), n.mode.type === "create" && new YE(this.mapElement), new Pv(), rx.setupIcon(), n.search.displaySearch && n.mode.type !== "target" && w().getMap().addControl(new KE()); + })), new dE()), i.mode.type === "target" && (w().getMap().addControl(new vv()), i.geolocationInformation.displayBox && w().getMap().addControl( + new Ev() + )), i.wmts.length > 0 && new Ny(), i.displayScaleLine && w().getMap().addControl(new M2({ units: "metric" })), i.borderUrl !== "" && new oE(), i.inclusionArea.url !== "" && new Vy(), i.mode.type === "select" && i.wfs.url != "" && new Ac(), i.mode.type === "create" && new ia(this.mapElement), i.mode.type === "mix" && i.wfs.url != "" ? (new ia(this.mapElement), new Ac()) : i.mode.type === "mix" && new ia(this.mapElement), new By(), gv.setupIcon(), i.search.displaySearch && i.mode.type !== "target" && w().getMap().addControl(new rE()); } render() { return Lt` @@ -23429,19 +21905,19 @@ let is = class extends kt { `; } }; -is.styles = [Mt(Rv), Mt(Tv), Mt(Vo), Mt(dh), Mt(Av), Mt(Ov)]; -Xo([ - Vu("#map") -], is.prototype, "mapElement", 2); -Xo([ - ae() -], is.prototype, "view", 2); -Xo([ - cn({ type: Object, attribute: "options" }) -], is.prototype, "options", 2); -is = Xo([ - oe("openlayers-element") -], is); +zn.styles = [xt(Fy), xt(Dy), xt(Eo), xt(df), xt(zy), xt(Zy)]; +bo([ + mu("#map") +], zn.prototype, "mapElement", 2); +bo([ + Yt() +], zn.prototype, "view", 2); +bo([ + ji({ type: Object, attribute: "options" }) +], zn.prototype, "options", 2); +zn = bo([ + Xt("openlayers-element") +], zn); export { - is as OpenLayersElement + zn as OpenLayersElement }; diff --git a/geocity/apps/submissions/templates/advancedgeometrywidget/advancedgeometrywidget.html b/geocity/apps/submissions/templates/advancedgeometrywidget/advancedgeometrywidget.html index e4f6c18f8..8b29b8612 100644 --- a/geocity/apps/submissions/templates/advancedgeometrywidget/advancedgeometrywidget.html +++ b/geocity/apps/submissions/templates/advancedgeometrywidget/advancedgeometrywidget.html @@ -1,90 +1,99 @@ +{% load static %} + +{% block scripts %} + +{% endblock %} +
- communeYverdon-les-BainsgenreParcelle privée" + }, + "selectionTargetBoxMessage": "Emplacement du banc" +}' />
- +
Valider
- diff --git a/geocity/apps/submissions/templates/submissions/submission_geo_time.html b/geocity/apps/submissions/templates/submissions/submission_geo_time.html index 677c0a172..6f373ac09 100644 --- a/geocity/apps/submissions/templates/submissions/submission_geo_time.html +++ b/geocity/apps/submissions/templates/submissions/submission_geo_time.html @@ -38,7 +38,6 @@

{{ geo_title }}

- {% include "submissions/_geo_time_form.html" with form=formset.empty_form form_id="__prefix__" form_number="__prefix__" open=False %}
From 3c3912f5e740639b34ed98496e9cdf911d7179b9 Mon Sep 17 00:00:00 2001 From: Monod Olivier Date: Fri, 10 Mar 2023 11:22:50 +0100 Subject: [PATCH 05/17] wip: add model for map widget config with django jsoneditor widget in admin --- geocity/admin_jazzmin_settings.py | 1 + geocity/apps/accounts/admin.py | 2 ++ ...2_create_map_widget_configuration_model.py | 20 +++++++++++ geocity/apps/accounts/models.py | 6 ++++ .../geocity-wc-map.js | 30 ++++++++--------- geocity/apps/forms/admin.py | 33 +++++++++++++++++++ ...8_create_map_widget_configuration_model.py | 29 ++++++++++++++++ geocity/apps/forms/models.py | 18 ++++++++++ geocity/settings.py | 1 + requirements.in | 1 + requirements.txt | 3 ++ 11 files changed, 129 insertions(+), 15 deletions(-) create mode 100644 geocity/apps/accounts/migrations/0012_create_map_widget_configuration_model.py create mode 100644 geocity/apps/forms/migrations/0018_create_map_widget_configuration_model.py diff --git a/geocity/admin_jazzmin_settings.py b/geocity/admin_jazzmin_settings.py index 7ccf8ffc5..f54bc9bb6 100644 --- a/geocity/admin_jazzmin_settings.py +++ b/geocity/admin_jazzmin_settings.py @@ -95,6 +95,7 @@ "forms.Field": "fas fa-list-ol", "forms.Form": "fas fa-book", "forms.FormCategory": "fas fa-object-ungroup", + "forms.MapWidgetConfiguration": "fa fa-map", "knox.AuthToken": "fas fa-user-secret", "reports.Report": "fas fa-print", "reports.ReportLayout": "fas fa-file-alt", diff --git a/geocity/apps/accounts/admin.py b/geocity/apps/accounts/admin.py index c2f69a6f2..40a58dc76 100644 --- a/geocity/apps/accounts/admin.py +++ b/geocity/apps/accounts/admin.py @@ -577,6 +577,7 @@ class Meta: "signature_sheet", "signature_sheet_description", "additional_searchtext_for_address_field", + "map_widget_configuration", # TODO: filter for integrator "geom", "integrator", ] @@ -662,6 +663,7 @@ class AdministrativeEntityAdmin(IntegratorFilterMixin, admin.ModelAdmin): "general_informations", "phone", "additional_searchtext_for_address_field", + "map_widget_configuration", "geom", "integrator", ) diff --git a/geocity/apps/accounts/migrations/0012_create_map_widget_configuration_model.py b/geocity/apps/accounts/migrations/0012_create_map_widget_configuration_model.py new file mode 100644 index 000000000..8f41a7733 --- /dev/null +++ b/geocity/apps/accounts/migrations/0012_create_map_widget_configuration_model.py @@ -0,0 +1,20 @@ +# Generated by Django 4.1.7 on 2023-03-10 09:43 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('forms', '0018_create_map_widget_configuration_model'), + ('accounts', '0011_add_signature_sheet_to_administrative_entity'), + ] + + operations = [ + migrations.AddField( + model_name='administrativeentity', + name='map_widget_configuration', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='forms.mapwidgetconfiguration', verbose_name='Configuration de la carte avancée'), + ), + ] diff --git a/geocity/apps/accounts/models.py b/geocity/apps/accounts/models.py index d4597563b..a52c8bbb8 100644 --- a/geocity/apps/accounts/models.py +++ b/geocity/apps/accounts/models.py @@ -263,6 +263,12 @@ class AdministrativeEntity(models.Model): ), ) geom = geomodels.MultiPolygonField(_("geom"), null=True, srid=2056) + map_widget_configuration = models.ForeignKey( + "forms.MapWidgetConfiguration", + null=True, + on_delete=models.SET_NULL, + verbose_name=_("Configuration de la carte avancée"), + ) tags = TaggableManager( blank=True, verbose_name=_("Mots-clés"), diff --git a/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js b/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js index 1d6c5b979..5294624e1 100644 --- a/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js +++ b/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js @@ -255,10 +255,10 @@ dn.finalized = !0, dn.elementProperties = /* @__PURE__ */ new Map(), dn.elementS * SPDX-License-Identifier: BSD-3-Clause */ var No; -const Pr = window, Ln = Pr.trustedTypes, ih = Ln ? Ln.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, je = `lit$${(Math.random() + "").slice(9)}$`, Ua = "?" + je, Hf = `<${Ua}>`, Tn = document, gs = (i = "") => Tn.createComment(i), ms = (i) => i === null || typeof i != "object" && typeof i != "function", ru = Array.isArray, ou = (i) => ru(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Jn = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, nh = /-->/g, sh = />/g, Ri = RegExp(`>|[ -\f\r](?:([^\\s"'>=/]+)([ -\f\r]*=[ -\f\r]*(?:[^ +const Pr = window, Ln = Pr.trustedTypes, ih = Ln ? Ln.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, je = `lit$${(Math.random() + "").slice(9)}$`, Ua = "?" + je, Hf = `<${Ua}>`, Tn = document, gs = (i = "") => Tn.createComment(i), ms = (i) => i === null || typeof i != "object" && typeof i != "function", ru = Array.isArray, ou = (i) => ru(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Jn = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, nh = /-->/g, sh = />/g, Ri = RegExp(`>|[ +\f\r](?:([^\\s"'>=/]+)([ +\f\r]*=[ +\f\r]*(?:[^ \f\r"'\`<>=]|("|')|))|$)`, "g"), rh = /'/g, oh = /"/g, au = /^(?:script|style|textarea|title)$/i, Xf = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), Lt = Xf(1), yi = Symbol.for("lit-noChange"), bt = Symbol.for("lit-nothing"), ah = /* @__PURE__ */ new WeakMap(), wn = Tn.createTreeWalker(Tn, 129, null, !1), lu = (i, t) => { const e = i.length - 1, n = []; let s, r = t === 2 ? "" : "", o = Jn; @@ -14551,7 +14551,7 @@ class Kd { class ot { static zoomInLabel() { const t = document.createElement("div"), e = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` + return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` @@ -14566,7 +14566,7 @@ class ot { } static zoomOutLabel() { const t = document.createElement("div"), e = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` + return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` @@ -14581,7 +14581,7 @@ class ot { } static fullScreenLabel() { const t = document.createElement("div"), e = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` + return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` @@ -14596,7 +14596,7 @@ class ot { } static fullScreenLabelActive() { const t = document.createElement("div"), e = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` + return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` @@ -14832,7 +14832,7 @@ ot.cross = ` - + `; ot.stack = ` @@ -17753,7 +17753,7 @@ let Wi = class extends At { ${Fe(this.icon)}
${this.message}
- + `; } @@ -18548,7 +18548,7 @@ let kc = class extends At { - + `; } @@ -20014,9 +20014,9 @@ function If(i) { c += 2e6; var u = t - r; if (u % 2 !== 0) - throw `MGRSPoint has to have an even number -of digits after the zone letter and two 100km letters - front -half for easting meters, second half for + throw `MGRSPoint has to have an even number +of digits after the zone letter and two 100km letters - front +half for easting meters, second half for northing meters` + i; var d = u / 2, f = 0, g = 0, m, _, y, p, v; return d > 0 && (m = 1e5 / Math.pow(10, d), _ = i.substring(r, r + d), f = parseFloat(_) * m, y = i.substring(r + d), g = parseFloat(y) * m), p = f + h, v = g + c, { @@ -21901,7 +21901,7 @@ let zn = class extends At { render() { return Lt`
-
+ `; } }; diff --git a/geocity/apps/forms/admin.py b/geocity/apps/forms/admin.py index 970f1fa8b..e0214c0e7 100644 --- a/geocity/apps/forms/admin.py +++ b/geocity/apps/forms/admin.py @@ -2,7 +2,9 @@ from adminsortable2.admin import SortableAdminMixin, SortableInlineAdminMixin from django import forms from django.contrib import admin +from django.db.models.fields.json import JSONField from django.utils.translation import gettext_lazy as _ +from jsoneditor.forms import JSONEditor from geocity.apps.accounts.admin import IntegratorFilterMixin, filter_for_user from geocity.apps.accounts.models import PUBLIC_TYPE_CHOICES, AdministrativeEntity @@ -237,6 +239,7 @@ class FormAdmin(SortableAdminMixin, IntegratorFilterMixin, admin.ModelAdmin): _("Planning et localisation"), { "fields": ( + "map_widget_configuration", # TODO: hide below field if a config is selected here + filter for integrator "can_have_multiple_ranges", "needs_date", "start_delay", @@ -509,3 +512,33 @@ def get__tags(self, obj): return list(obj.tags.all()) get__tags.short_description = _("Mots-clés") + + +""" +TODO: + - Define initial values + - Validate JSON: https://github.com/nnseva/django-jsoneditor#jsonschema + +""" + + +@admin.register(models.MapWidgetConfiguration) +class FormMapWidgetConfigurationAdmin(IntegratorFilterMixin, admin.ModelAdmin): + list_display = [ + "name", + "configuration", + "integrator", + ] + formfield_overrides = { + JSONField: { + "widget": JSONEditor( + init_options={"mode": "view", "modes": ["view", "code", "tree"]}, + ace_options={"readOnly": True}, + attrs={"style": "height: 1000px;"}, + ), + }, + } + + class Meta: + model = models.MapWidgetConfiguration + fields = "__all__" diff --git a/geocity/apps/forms/migrations/0018_create_map_widget_configuration_model.py b/geocity/apps/forms/migrations/0018_create_map_widget_configuration_model.py new file mode 100644 index 000000000..b04424c7f --- /dev/null +++ b/geocity/apps/forms/migrations/0018_create_map_widget_configuration_model.py @@ -0,0 +1,29 @@ +# Generated by Django 4.1.7 on 2023-03-10 09:43 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('auth', '0012_alter_user_first_name_max_length'), + ('forms', '0017_field_message_for_notified_services_and_more'), + ] + + operations = [ + migrations.CreateModel( + name='MapWidgetConfiguration', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255, verbose_name='Nom de la configuration')), + ('configuration', models.JSONField(verbose_name='Configuration du Widget cartographique')), + ('integrator', models.ForeignKey(limit_choices_to={'permit_department__is_integrator_admin': True}, null=True, on_delete=django.db.models.deletion.SET_NULL, to='auth.group', verbose_name='Groupe des administrateurs')), + ], + ), + migrations.AddField( + model_name='form', + name='map_widget_configuration', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='forms.mapwidgetconfiguration', verbose_name='Configuration de la carte avancée'), + ), + ] diff --git a/geocity/apps/forms/models.py b/geocity/apps/forms/models.py index 58f9bbb03..a9ea470c4 100644 --- a/geocity/apps/forms/models.py +++ b/geocity/apps/forms/models.py @@ -296,6 +296,18 @@ class Meta: ordering = ("order", "price") +class MapWidgetConfiguration(models.Model): + name = models.CharField(_("Nom de la configuration"), max_length=255) + configuration = models.JSONField("Configuration du Widget cartographique") + integrator = models.ForeignKey( + Group, + null=True, + on_delete=models.SET_NULL, + verbose_name=_("Groupe des administrateurs"), + limit_choices_to={"permit_department__is_integrator_admin": True}, + ) + + class Form(models.Model): """ Represents a Form configuration object. @@ -441,6 +453,12 @@ class Form(models.Model): null=True, blank=True, ) + map_widget_configuration = models.ForeignKey( + MapWidgetConfiguration, + null=True, + on_delete=models.SET_NULL, + verbose_name=_("Configuration de la carte avancée"), + ) # All objects objects = FormQuerySet().as_manager() diff --git a/geocity/settings.py b/geocity/settings.py index df19f74aa..7cbb34f59 100644 --- a/geocity/settings.py +++ b/geocity/settings.py @@ -161,6 +161,7 @@ "captcha", "ckeditor", "jazzmin", + "jsoneditor", # django contrib apps "django.contrib.admin", "django.contrib.auth", diff --git a/requirements.in b/requirements.in index d8a532e1b..e95a959f1 100644 --- a/requirements.in +++ b/requirements.in @@ -46,3 +46,4 @@ Jinja2 docker django-polymorphic postfinancecheckout +django_admin_json_editor diff --git a/requirements.txt b/requirements.txt index 6d8d7a246..5c50d0d82 100644 --- a/requirements.txt +++ b/requirements.txt @@ -32,6 +32,7 @@ deprecated==1.2.13 django==4.1.7 # via # -r requirements.in + # django-admin-json-editor # django-admin-sortable2 # django-allauth # django-axes @@ -57,6 +58,8 @@ django==4.1.7 # django-taggit # django-two-factor-auth # djangorestframework +django-admin-json-editor==0.2.3 + # via -r requirements.in django-admin-sortable2==2.1.4 # via -r requirements.in django-allauth==0.51.0 From 0b831e18427e0b9431c4a47035634f9d4e86b7ac Mon Sep 17 00:00:00 2001 From: Monod Olivier Date: Fri, 10 Mar 2023 11:30:29 +0100 Subject: [PATCH 06/17] lint --- .../geocity-wc-map.js | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js b/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js index 1d6c5b979..5294624e1 100644 --- a/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js +++ b/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js @@ -255,10 +255,10 @@ dn.finalized = !0, dn.elementProperties = /* @__PURE__ */ new Map(), dn.elementS * SPDX-License-Identifier: BSD-3-Clause */ var No; -const Pr = window, Ln = Pr.trustedTypes, ih = Ln ? Ln.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, je = `lit$${(Math.random() + "").slice(9)}$`, Ua = "?" + je, Hf = `<${Ua}>`, Tn = document, gs = (i = "") => Tn.createComment(i), ms = (i) => i === null || typeof i != "object" && typeof i != "function", ru = Array.isArray, ou = (i) => ru(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Jn = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, nh = /-->/g, sh = />/g, Ri = RegExp(`>|[ -\f\r](?:([^\\s"'>=/]+)([ -\f\r]*=[ -\f\r]*(?:[^ +const Pr = window, Ln = Pr.trustedTypes, ih = Ln ? Ln.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, je = `lit$${(Math.random() + "").slice(9)}$`, Ua = "?" + je, Hf = `<${Ua}>`, Tn = document, gs = (i = "") => Tn.createComment(i), ms = (i) => i === null || typeof i != "object" && typeof i != "function", ru = Array.isArray, ou = (i) => ru(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Jn = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, nh = /-->/g, sh = />/g, Ri = RegExp(`>|[ +\f\r](?:([^\\s"'>=/]+)([ +\f\r]*=[ +\f\r]*(?:[^ \f\r"'\`<>=]|("|')|))|$)`, "g"), rh = /'/g, oh = /"/g, au = /^(?:script|style|textarea|title)$/i, Xf = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), Lt = Xf(1), yi = Symbol.for("lit-noChange"), bt = Symbol.for("lit-nothing"), ah = /* @__PURE__ */ new WeakMap(), wn = Tn.createTreeWalker(Tn, 129, null, !1), lu = (i, t) => { const e = i.length - 1, n = []; let s, r = t === 2 ? "" : "", o = Jn; @@ -14551,7 +14551,7 @@ class Kd { class ot { static zoomInLabel() { const t = document.createElement("div"), e = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` + return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` @@ -14566,7 +14566,7 @@ class ot { } static zoomOutLabel() { const t = document.createElement("div"), e = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` + return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` @@ -14581,7 +14581,7 @@ class ot { } static fullScreenLabel() { const t = document.createElement("div"), e = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` + return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` @@ -14596,7 +14596,7 @@ class ot { } static fullScreenLabelActive() { const t = document.createElement("div"), e = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` + return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` @@ -14832,7 +14832,7 @@ ot.cross = ` - + `; ot.stack = ` @@ -17753,7 +17753,7 @@ let Wi = class extends At { ${Fe(this.icon)}
${this.message}
- + `; } @@ -18548,7 +18548,7 @@ let kc = class extends At { - + `; } @@ -20014,9 +20014,9 @@ function If(i) { c += 2e6; var u = t - r; if (u % 2 !== 0) - throw `MGRSPoint has to have an even number -of digits after the zone letter and two 100km letters - front -half for easting meters, second half for + throw `MGRSPoint has to have an even number +of digits after the zone letter and two 100km letters - front +half for easting meters, second half for northing meters` + i; var d = u / 2, f = 0, g = 0, m, _, y, p, v; return d > 0 && (m = 1e5 / Math.pow(10, d), _ = i.substring(r, r + d), f = parseFloat(_) * m, y = i.substring(r + d), g = parseFloat(y) * m), p = f + h, v = g + c, { @@ -21901,7 +21901,7 @@ let zn = class extends At { render() { return Lt`
-
+ `; } }; From c49dd7ce1a5dc2b8241d422c7d5788a904450023 Mon Sep 17 00:00:00 2001 From: Monod Olivier Date: Fri, 10 Mar 2023 11:31:03 +0100 Subject: [PATCH 07/17] lint --- ...2_create_map_widget_configuration_model.py | 17 ++++-- ...8_create_map_widget_configuration_model.py | 56 +++++++++++++++---- 2 files changed, 56 insertions(+), 17 deletions(-) diff --git a/geocity/apps/accounts/migrations/0012_create_map_widget_configuration_model.py b/geocity/apps/accounts/migrations/0012_create_map_widget_configuration_model.py index 8f41a7733..78d3fde01 100644 --- a/geocity/apps/accounts/migrations/0012_create_map_widget_configuration_model.py +++ b/geocity/apps/accounts/migrations/0012_create_map_widget_configuration_model.py @@ -1,20 +1,25 @@ # Generated by Django 4.1.7 on 2023-03-10 09:43 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('forms', '0018_create_map_widget_configuration_model'), - ('accounts', '0011_add_signature_sheet_to_administrative_entity'), + ("forms", "0018_create_map_widget_configuration_model"), + ("accounts", "0011_add_signature_sheet_to_administrative_entity"), ] operations = [ migrations.AddField( - model_name='administrativeentity', - name='map_widget_configuration', - field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='forms.mapwidgetconfiguration', verbose_name='Configuration de la carte avancée'), + model_name="administrativeentity", + name="map_widget_configuration", + field=models.ForeignKey( + null=True, + on_delete=django.db.models.deletion.SET_NULL, + to="forms.mapwidgetconfiguration", + verbose_name="Configuration de la carte avancée", + ), ), ] diff --git a/geocity/apps/forms/migrations/0018_create_map_widget_configuration_model.py b/geocity/apps/forms/migrations/0018_create_map_widget_configuration_model.py index b04424c7f..cb7aa4317 100644 --- a/geocity/apps/forms/migrations/0018_create_map_widget_configuration_model.py +++ b/geocity/apps/forms/migrations/0018_create_map_widget_configuration_model.py @@ -1,29 +1,63 @@ # Generated by Django 4.1.7 on 2023-03-10 09:43 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('auth', '0012_alter_user_first_name_max_length'), - ('forms', '0017_field_message_for_notified_services_and_more'), + ("auth", "0012_alter_user_first_name_max_length"), + ("forms", "0017_field_message_for_notified_services_and_more"), ] operations = [ migrations.CreateModel( - name='MapWidgetConfiguration', + name="MapWidgetConfiguration", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=255, verbose_name='Nom de la configuration')), - ('configuration', models.JSONField(verbose_name='Configuration du Widget cartographique')), - ('integrator', models.ForeignKey(limit_choices_to={'permit_department__is_integrator_admin': True}, null=True, on_delete=django.db.models.deletion.SET_NULL, to='auth.group', verbose_name='Groupe des administrateurs')), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ( + "name", + models.CharField( + max_length=255, verbose_name="Nom de la configuration" + ), + ), + ( + "configuration", + models.JSONField( + verbose_name="Configuration du Widget cartographique" + ), + ), + ( + "integrator", + models.ForeignKey( + limit_choices_to={ + "permit_department__is_integrator_admin": True + }, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + to="auth.group", + verbose_name="Groupe des administrateurs", + ), + ), ], ), migrations.AddField( - model_name='form', - name='map_widget_configuration', - field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='forms.mapwidgetconfiguration', verbose_name='Configuration de la carte avancée'), + model_name="form", + name="map_widget_configuration", + field=models.ForeignKey( + null=True, + on_delete=django.db.models.deletion.SET_NULL, + to="forms.mapwidgetconfiguration", + verbose_name="Configuration de la carte avancée", + ), ), ] From 0f638edb4a7f0ce907080992699aa8341b9979f9 Mon Sep 17 00:00:00 2001 From: Monod Olivier Date: Fri, 10 Mar 2023 12:06:18 +0100 Subject: [PATCH 08/17] add missing dep --- requirements.in | 2 +- requirements.txt | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/requirements.in b/requirements.in index e95a959f1..bb7e2f427 100644 --- a/requirements.in +++ b/requirements.in @@ -46,4 +46,4 @@ Jinja2 docker django-polymorphic postfinancecheckout -django_admin_json_editor +django-jsoneditor \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 5c50d0d82..be1eb6589 100644 --- a/requirements.txt +++ b/requirements.txt @@ -32,7 +32,6 @@ deprecated==1.2.13 django==4.1.7 # via # -r requirements.in - # django-admin-json-editor # django-admin-sortable2 # django-allauth # django-axes @@ -58,8 +57,6 @@ django==4.1.7 # django-taggit # django-two-factor-auth # djangorestframework -django-admin-json-editor==0.2.3 - # via -r requirements.in django-admin-sortable2==2.1.4 # via -r requirements.in django-allauth==0.51.0 @@ -90,6 +87,8 @@ django-jazzmin==2.6.0 # via -r requirements.in django-js-asset==2.0.0 # via django-ckeditor +django-jsoneditor==0.2.4 + # via -r requirements.in django-oauth-toolkit==2.2.0 # via -r requirements.in django-otp==1.1.4 @@ -154,7 +153,9 @@ oauthlib==3.2.2 openpyxl==3.0.10 # via tablib packaging==21.3 - # via docker + # via + # django-jsoneditor + # docker pdf2image==1.16.0 # via -r requirements.in phonenumbers==8.13.1 From 54c50b70564ed81f2c850633a0eadf0c5351fffa Mon Sep 17 00:00:00 2001 From: Monod Olivier Date: Fri, 10 Mar 2023 12:55:39 +0100 Subject: [PATCH 09/17] dev requirements --- requirements.in | 2 +- requirements_dev.txt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/requirements.in b/requirements.in index bb7e2f427..a1eaf9d86 100644 --- a/requirements.in +++ b/requirements.in @@ -18,6 +18,7 @@ requests # Required by django-tables2, which doesn't list it in their requirements tablib[xlsx] whitenoise +django-jsoneditor django-admin-sortable2 django-simple-history djangorestframework @@ -46,4 +47,3 @@ Jinja2 docker django-polymorphic postfinancecheckout -django-jsoneditor \ No newline at end of file diff --git a/requirements_dev.txt b/requirements_dev.txt index bbb6d7068..3f6fc9ac7 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -133,6 +133,8 @@ django-js-asset==2.0.0 # via # -r requirements.txt # django-ckeditor +django-jsoneditor==0.2.4 + # via -r requirements.txt django-oauth-toolkit==2.2.0 # via -r requirements.txt django-otp==1.1.4 @@ -243,6 +245,7 @@ packaging==21.3 # via # -r requirements.txt # build + # django-jsoneditor # docker parso==0.8.3 # via jedi From 64045433fc5ae827723a6970535b5fad72913135 Mon Sep 17 00:00:00 2001 From: Monod Olivier Date: Fri, 10 Mar 2023 13:04:58 +0100 Subject: [PATCH 10/17] finalize multi-tenant configuration (integrator) --- geocity/apps/accounts/admin.py | 8 +++++++- geocity/apps/accounts/permissions_groups.py | 1 + geocity/apps/forms/admin.py | 7 ++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/geocity/apps/accounts/admin.py b/geocity/apps/accounts/admin.py index 40a58dc76..3012e5239 100644 --- a/geocity/apps/accounts/admin.py +++ b/geocity/apps/accounts/admin.py @@ -19,6 +19,7 @@ from geocity.fields import GeometryWidget from . import models, permissions_groups +from geocity.apps.forms.models import MapWidgetConfiguration from .users import get_integrator_permissions, get_users_list_for_integrator_admin MULTIPLE_INTEGRATOR_ERROR_MESSAGE = _( @@ -577,7 +578,7 @@ class Meta: "signature_sheet", "signature_sheet_description", "additional_searchtext_for_address_field", - "map_widget_configuration", # TODO: filter for integrator + "map_widget_configuration", "geom", "integrator", ] @@ -762,8 +763,13 @@ def formfield_for_foreignkey(self, db_field, request, **kwargs): kwargs["queryset"] = Group.objects.filter( permit_department__is_integrator_admin=True, ) + if db_field.name == "map_widget_configuration": + kwargs["queryset"] = filter_for_user( + request.user, MapWidgetConfiguration.objects.all() + ) return super().formfield_for_foreignkey(db_field, request, **kwargs) + def save_model(self, request, obj, form, change): if not request.user.is_superuser: diff --git a/geocity/apps/accounts/permissions_groups.py b/geocity/apps/accounts/permissions_groups.py index 81477d859..2decdee40 100644 --- a/geocity/apps/accounts/permissions_groups.py +++ b/geocity/apps/accounts/permissions_groups.py @@ -15,6 +15,7 @@ "paymentsettings", "price", "formprice", + "mapwidgetconfiguration", ], "submissions": [ "submissionamendfield", diff --git a/geocity/apps/forms/admin.py b/geocity/apps/forms/admin.py index e0214c0e7..d0b8c339b 100644 --- a/geocity/apps/forms/admin.py +++ b/geocity/apps/forms/admin.py @@ -239,7 +239,7 @@ class FormAdmin(SortableAdminMixin, IntegratorFilterMixin, admin.ModelAdmin): _("Planning et localisation"), { "fields": ( - "map_widget_configuration", # TODO: hide below field if a config is selected here + filter for integrator + "map_widget_configuration", # TODO: hide below field if a config is selected here "can_have_multiple_ranges", "needs_date", "start_delay", @@ -321,6 +321,11 @@ def formfield_for_foreignkey(self, db_field, request, **kwargs): if db_field.name == "category": qs = models.FormCategory.objects.all() kwargs["queryset"] = filter_for_user(user, qs) + + if db_field.name == "map_widget_configuration": + kwargs["queryset"] = filter_for_user( + request.user, models.MapWidgetConfiguration.objects.all() + ) return super().formfield_for_foreignkey(db_field, request, **kwargs) From b50bba605a525979278ca1e7def9b56737c46098 Mon Sep 17 00:00:00 2001 From: Monod Olivier Date: Fri, 10 Mar 2023 13:56:24 +0100 Subject: [PATCH 11/17] add a field to let the admin choose explicitely which widget to use --- .../0012_add_fields_for_new_map_widget.py | 20 ++++++ ...2_create_map_widget_configuration_model.py | 25 -------- geocity/apps/forms/admin.py | 10 ++- .../0018_add_fields_for_new_map_widget.py | 34 ++++++++++ ...8_create_map_widget_configuration_model.py | 63 ------------------- geocity/apps/forms/models.py | 12 ++++ 6 files changed, 75 insertions(+), 89 deletions(-) create mode 100644 geocity/apps/accounts/migrations/0012_add_fields_for_new_map_widget.py delete mode 100644 geocity/apps/accounts/migrations/0012_create_map_widget_configuration_model.py create mode 100644 geocity/apps/forms/migrations/0018_add_fields_for_new_map_widget.py delete mode 100644 geocity/apps/forms/migrations/0018_create_map_widget_configuration_model.py diff --git a/geocity/apps/accounts/migrations/0012_add_fields_for_new_map_widget.py b/geocity/apps/accounts/migrations/0012_add_fields_for_new_map_widget.py new file mode 100644 index 000000000..5faa09b03 --- /dev/null +++ b/geocity/apps/accounts/migrations/0012_add_fields_for_new_map_widget.py @@ -0,0 +1,20 @@ +# Generated by Django 4.1.7 on 2023-03-10 12:54 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('forms', '0018_add_fields_for_new_map_widget'), + ('accounts', '0011_add_signature_sheet_to_administrative_entity'), + ] + + operations = [ + migrations.AddField( + model_name='administrativeentity', + name='map_widget_configuration', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='forms.mapwidgetconfiguration', verbose_name='Configuration de la carte avancée'), + ), + ] diff --git a/geocity/apps/accounts/migrations/0012_create_map_widget_configuration_model.py b/geocity/apps/accounts/migrations/0012_create_map_widget_configuration_model.py deleted file mode 100644 index 78d3fde01..000000000 --- a/geocity/apps/accounts/migrations/0012_create_map_widget_configuration_model.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 4.1.7 on 2023-03-10 09:43 - -import django.db.models.deletion -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ("forms", "0018_create_map_widget_configuration_model"), - ("accounts", "0011_add_signature_sheet_to_administrative_entity"), - ] - - operations = [ - migrations.AddField( - model_name="administrativeentity", - name="map_widget_configuration", - field=models.ForeignKey( - null=True, - on_delete=django.db.models.deletion.SET_NULL, - to="forms.mapwidgetconfiguration", - verbose_name="Configuration de la carte avancée", - ), - ), - ] diff --git a/geocity/apps/forms/admin.py b/geocity/apps/forms/admin.py index d0b8c339b..53daa61fa 100644 --- a/geocity/apps/forms/admin.py +++ b/geocity/apps/forms/admin.py @@ -60,6 +60,13 @@ class GeometryTypes(django.db.models.TextChoices): label=_("Types de géométrie autorisés"), required=False, ) + geo_widget_option = forms.ChoiceField( + choices=models.Form.GEO_WIDGET_CHOICES, + widget=forms.Select, + label=_("Choix de l'interface de saisie cartographique"), + required=False, + # default=models.Form.GEO_WIDGET_GENERIC, + ) class Meta: model = models.Form @@ -239,13 +246,14 @@ class FormAdmin(SortableAdminMixin, IntegratorFilterMixin, admin.ModelAdmin): _("Planning et localisation"), { "fields": ( - "map_widget_configuration", # TODO: hide below field if a config is selected here "can_have_multiple_ranges", "needs_date", "start_delay", "permit_duration", "expiration_reminder", "days_before_reminder", + "geo_widget_option", + "map_widget_configuration", # TODO: hide below field if a config is selected here "geometry_types", "wms_layers", "wms_layers_order", diff --git a/geocity/apps/forms/migrations/0018_add_fields_for_new_map_widget.py b/geocity/apps/forms/migrations/0018_add_fields_for_new_map_widget.py new file mode 100644 index 000000000..e8f2a5496 --- /dev/null +++ b/geocity/apps/forms/migrations/0018_add_fields_for_new_map_widget.py @@ -0,0 +1,34 @@ +# Generated by Django 4.1.7 on 2023-03-10 12:54 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('auth', '0012_alter_user_first_name_max_length'), + ('forms', '0017_field_message_for_notified_services_and_more'), + ] + + operations = [ + migrations.AddField( + model_name='form', + name='geo_widget_option', + field=models.IntegerField(choices=[(1, 'Générique'), (2, 'Avancée')], default=1, verbose_name="Choix de l'interface de saisie cartographique"), + ), + migrations.CreateModel( + name='MapWidgetConfiguration', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255, verbose_name='Nom de la configuration')), + ('configuration', models.JSONField(verbose_name='Configuration du Widget cartographique')), + ('integrator', models.ForeignKey(limit_choices_to={'permit_department__is_integrator_admin': True}, null=True, on_delete=django.db.models.deletion.SET_NULL, to='auth.group', verbose_name='Groupe des administrateurs')), + ], + ), + migrations.AddField( + model_name='form', + name='map_widget_configuration', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='forms.mapwidgetconfiguration', verbose_name='Configuration de la carte avancée'), + ), + ] diff --git a/geocity/apps/forms/migrations/0018_create_map_widget_configuration_model.py b/geocity/apps/forms/migrations/0018_create_map_widget_configuration_model.py deleted file mode 100644 index cb7aa4317..000000000 --- a/geocity/apps/forms/migrations/0018_create_map_widget_configuration_model.py +++ /dev/null @@ -1,63 +0,0 @@ -# Generated by Django 4.1.7 on 2023-03-10 09:43 - -import django.db.models.deletion -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ("auth", "0012_alter_user_first_name_max_length"), - ("forms", "0017_field_message_for_notified_services_and_more"), - ] - - operations = [ - migrations.CreateModel( - name="MapWidgetConfiguration", - fields=[ - ( - "id", - models.AutoField( - auto_created=True, - primary_key=True, - serialize=False, - verbose_name="ID", - ), - ), - ( - "name", - models.CharField( - max_length=255, verbose_name="Nom de la configuration" - ), - ), - ( - "configuration", - models.JSONField( - verbose_name="Configuration du Widget cartographique" - ), - ), - ( - "integrator", - models.ForeignKey( - limit_choices_to={ - "permit_department__is_integrator_admin": True - }, - null=True, - on_delete=django.db.models.deletion.SET_NULL, - to="auth.group", - verbose_name="Groupe des administrateurs", - ), - ), - ], - ), - migrations.AddField( - model_name="form", - name="map_widget_configuration", - field=models.ForeignKey( - null=True, - on_delete=django.db.models.deletion.SET_NULL, - to="forms.mapwidgetconfiguration", - verbose_name="Configuration de la carte avancée", - ), - ), - ] diff --git a/geocity/apps/forms/models.py b/geocity/apps/forms/models.py index a9ea470c4..374f5e7db 100644 --- a/geocity/apps/forms/models.py +++ b/geocity/apps/forms/models.py @@ -9,6 +9,7 @@ MinValueValidator, ) from django.db import models +from django import forms from django.db.models import Q from django.utils.safestring import mark_safe from django.utils.timezone import now @@ -453,9 +454,20 @@ class Form(models.Model): null=True, blank=True, ) + GEO_WIDGET_GENERIC = 1 + GEO_WIDGET_ADVANCED = 2 + GEO_WIDGET_CHOICES = ( + (GEO_WIDGET_GENERIC, _("Générique")), + (GEO_WIDGET_ADVANCED, _("Avancée")), + ) + # TODO: show/hide depending fields depending on admin choice + geo_widget_option = models.IntegerField( + _("Choix de l'interface de saisie cartographique"), choices=GEO_WIDGET_CHOICES, default=GEO_WIDGET_GENERIC + ) map_widget_configuration = models.ForeignKey( MapWidgetConfiguration, null=True, + blank=True, on_delete=models.SET_NULL, verbose_name=_("Configuration de la carte avancée"), ) From 8548cea9556f9b2f98014ef054e325d5f71dd6f8 Mon Sep 17 00:00:00 2001 From: Monod Olivier Date: Fri, 10 Mar 2023 13:58:01 +0100 Subject: [PATCH 12/17] lint --- geocity/apps/accounts/admin.py | 3 +- .../0012_add_fields_for_new_map_widget.py | 17 +++-- geocity/apps/forms/admin.py | 2 +- .../0018_add_fields_for_new_map_widget.py | 67 +++++++++++++++---- geocity/apps/forms/models.py | 5 +- 5 files changed, 69 insertions(+), 25 deletions(-) diff --git a/geocity/apps/accounts/admin.py b/geocity/apps/accounts/admin.py index 3012e5239..b093a7c0f 100644 --- a/geocity/apps/accounts/admin.py +++ b/geocity/apps/accounts/admin.py @@ -14,12 +14,12 @@ from knox.models import AuthToken from geocity.apps.accounts.models import AdministrativeEntity, UserProfile +from geocity.apps.forms.models import MapWidgetConfiguration from geocity.apps.reports.models import Report from geocity.apps.submissions.models import Submission, SubmissionWorkflowStatus from geocity.fields import GeometryWidget from . import models, permissions_groups -from geocity.apps.forms.models import MapWidgetConfiguration from .users import get_integrator_permissions, get_users_list_for_integrator_admin MULTIPLE_INTEGRATOR_ERROR_MESSAGE = _( @@ -769,7 +769,6 @@ def formfield_for_foreignkey(self, db_field, request, **kwargs): ) return super().formfield_for_foreignkey(db_field, request, **kwargs) - def save_model(self, request, obj, form, change): if not request.user.is_superuser: diff --git a/geocity/apps/accounts/migrations/0012_add_fields_for_new_map_widget.py b/geocity/apps/accounts/migrations/0012_add_fields_for_new_map_widget.py index 5faa09b03..ee3b396fa 100644 --- a/geocity/apps/accounts/migrations/0012_add_fields_for_new_map_widget.py +++ b/geocity/apps/accounts/migrations/0012_add_fields_for_new_map_widget.py @@ -1,20 +1,25 @@ # Generated by Django 4.1.7 on 2023-03-10 12:54 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('forms', '0018_add_fields_for_new_map_widget'), - ('accounts', '0011_add_signature_sheet_to_administrative_entity'), + ("forms", "0018_add_fields_for_new_map_widget"), + ("accounts", "0011_add_signature_sheet_to_administrative_entity"), ] operations = [ migrations.AddField( - model_name='administrativeentity', - name='map_widget_configuration', - field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='forms.mapwidgetconfiguration', verbose_name='Configuration de la carte avancée'), + model_name="administrativeentity", + name="map_widget_configuration", + field=models.ForeignKey( + null=True, + on_delete=django.db.models.deletion.SET_NULL, + to="forms.mapwidgetconfiguration", + verbose_name="Configuration de la carte avancée", + ), ), ] diff --git a/geocity/apps/forms/admin.py b/geocity/apps/forms/admin.py index 53daa61fa..c633def9d 100644 --- a/geocity/apps/forms/admin.py +++ b/geocity/apps/forms/admin.py @@ -329,7 +329,7 @@ def formfield_for_foreignkey(self, db_field, request, **kwargs): if db_field.name == "category": qs = models.FormCategory.objects.all() kwargs["queryset"] = filter_for_user(user, qs) - + if db_field.name == "map_widget_configuration": kwargs["queryset"] = filter_for_user( request.user, models.MapWidgetConfiguration.objects.all() diff --git a/geocity/apps/forms/migrations/0018_add_fields_for_new_map_widget.py b/geocity/apps/forms/migrations/0018_add_fields_for_new_map_widget.py index e8f2a5496..f10d2dbb6 100644 --- a/geocity/apps/forms/migrations/0018_add_fields_for_new_map_widget.py +++ b/geocity/apps/forms/migrations/0018_add_fields_for_new_map_widget.py @@ -1,34 +1,73 @@ # Generated by Django 4.1.7 on 2023-03-10 12:54 -from django.db import migrations, models import django.db.models.deletion +from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('auth', '0012_alter_user_first_name_max_length'), - ('forms', '0017_field_message_for_notified_services_and_more'), + ("auth", "0012_alter_user_first_name_max_length"), + ("forms", "0017_field_message_for_notified_services_and_more"), ] operations = [ migrations.AddField( - model_name='form', - name='geo_widget_option', - field=models.IntegerField(choices=[(1, 'Générique'), (2, 'Avancée')], default=1, verbose_name="Choix de l'interface de saisie cartographique"), + model_name="form", + name="geo_widget_option", + field=models.IntegerField( + choices=[(1, "Générique"), (2, "Avancée")], + default=1, + verbose_name="Choix de l'interface de saisie cartographique", + ), ), migrations.CreateModel( - name='MapWidgetConfiguration', + name="MapWidgetConfiguration", fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=255, verbose_name='Nom de la configuration')), - ('configuration', models.JSONField(verbose_name='Configuration du Widget cartographique')), - ('integrator', models.ForeignKey(limit_choices_to={'permit_department__is_integrator_admin': True}, null=True, on_delete=django.db.models.deletion.SET_NULL, to='auth.group', verbose_name='Groupe des administrateurs')), + ( + "id", + models.AutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ( + "name", + models.CharField( + max_length=255, verbose_name="Nom de la configuration" + ), + ), + ( + "configuration", + models.JSONField( + verbose_name="Configuration du Widget cartographique" + ), + ), + ( + "integrator", + models.ForeignKey( + limit_choices_to={ + "permit_department__is_integrator_admin": True + }, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + to="auth.group", + verbose_name="Groupe des administrateurs", + ), + ), ], ), migrations.AddField( - model_name='form', - name='map_widget_configuration', - field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='forms.mapwidgetconfiguration', verbose_name='Configuration de la carte avancée'), + model_name="form", + name="map_widget_configuration", + field=models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + to="forms.mapwidgetconfiguration", + verbose_name="Configuration de la carte avancée", + ), ), ] diff --git a/geocity/apps/forms/models.py b/geocity/apps/forms/models.py index 374f5e7db..9c94e291f 100644 --- a/geocity/apps/forms/models.py +++ b/geocity/apps/forms/models.py @@ -9,7 +9,6 @@ MinValueValidator, ) from django.db import models -from django import forms from django.db.models import Q from django.utils.safestring import mark_safe from django.utils.timezone import now @@ -462,7 +461,9 @@ class Form(models.Model): ) # TODO: show/hide depending fields depending on admin choice geo_widget_option = models.IntegerField( - _("Choix de l'interface de saisie cartographique"), choices=GEO_WIDGET_CHOICES, default=GEO_WIDGET_GENERIC + _("Choix de l'interface de saisie cartographique"), + choices=GEO_WIDGET_CHOICES, + default=GEO_WIDGET_GENERIC, ) map_widget_configuration = models.ForeignKey( MapWidgetConfiguration, From 1d84a4d8cccccc28c32c743ba24df400d1b48225 Mon Sep 17 00:00:00 2001 From: Monod Olivier Date: Fri, 10 Mar 2023 14:25:36 +0100 Subject: [PATCH 13/17] add endpoint for map widget configuration --- .../0013_add_related_name_for_fk.py | 26 +++++++++++++++++++ geocity/apps/accounts/models.py | 1 + .../0019_add_related_name_for_fk.py | 26 +++++++++++++++++++ geocity/apps/forms/models.py | 1 + geocity/apps/forms/urls.py | 13 ++++++++++ geocity/apps/forms/views.py | 16 ++++++++++++ geocity/urls.py | 1 + 7 files changed, 84 insertions(+) create mode 100644 geocity/apps/accounts/migrations/0013_add_related_name_for_fk.py create mode 100644 geocity/apps/forms/migrations/0019_add_related_name_for_fk.py create mode 100644 geocity/apps/forms/urls.py create mode 100644 geocity/apps/forms/views.py diff --git a/geocity/apps/accounts/migrations/0013_add_related_name_for_fk.py b/geocity/apps/accounts/migrations/0013_add_related_name_for_fk.py new file mode 100644 index 000000000..21a667c15 --- /dev/null +++ b/geocity/apps/accounts/migrations/0013_add_related_name_for_fk.py @@ -0,0 +1,26 @@ +# Generated by Django 4.1.7 on 2023-03-10 13:17 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("forms", "0019_add_related_name_for_fk"), + ("accounts", "0012_add_fields_for_new_map_widget"), + ] + + operations = [ + migrations.AlterField( + model_name="administrativeentity", + name="map_widget_configuration", + field=models.ForeignKey( + null=True, + on_delete=django.db.models.deletion.SET_NULL, + related_name="map_widget_configuration_administrative_entity", + to="forms.mapwidgetconfiguration", + verbose_name="Configuration de la carte avancée", + ), + ), + ] diff --git a/geocity/apps/accounts/models.py b/geocity/apps/accounts/models.py index a52c8bbb8..7d5518a10 100644 --- a/geocity/apps/accounts/models.py +++ b/geocity/apps/accounts/models.py @@ -268,6 +268,7 @@ class AdministrativeEntity(models.Model): null=True, on_delete=models.SET_NULL, verbose_name=_("Configuration de la carte avancée"), + related_name="map_widget_configuration_administrative_entity", ) tags = TaggableManager( blank=True, diff --git a/geocity/apps/forms/migrations/0019_add_related_name_for_fk.py b/geocity/apps/forms/migrations/0019_add_related_name_for_fk.py new file mode 100644 index 000000000..09378a462 --- /dev/null +++ b/geocity/apps/forms/migrations/0019_add_related_name_for_fk.py @@ -0,0 +1,26 @@ +# Generated by Django 4.1.7 on 2023-03-10 13:16 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("forms", "0018_add_fields_for_new_map_widget"), + ] + + operations = [ + migrations.AlterField( + model_name="form", + name="map_widget_configuration", + field=models.ForeignKey( + blank=True, + null=True, + on_delete=django.db.models.deletion.SET_NULL, + related_name="map_widget_configuration_form", + to="forms.mapwidgetconfiguration", + verbose_name="Configuration de la carte avancée", + ), + ), + ] diff --git a/geocity/apps/forms/models.py b/geocity/apps/forms/models.py index 9c94e291f..20e830f83 100644 --- a/geocity/apps/forms/models.py +++ b/geocity/apps/forms/models.py @@ -470,6 +470,7 @@ class Form(models.Model): null=True, blank=True, on_delete=models.SET_NULL, + related_name="map_widget_configuration_form", verbose_name=_("Configuration de la carte avancée"), ) # All objects diff --git a/geocity/apps/forms/urls.py b/geocity/apps/forms/urls.py new file mode 100644 index 000000000..78427389b --- /dev/null +++ b/geocity/apps/forms/urls.py @@ -0,0 +1,13 @@ +from django.urls import path + +from . import views + +app_name = "forms" + +urlpatterns = [ + path( + "mapwidgetconfiguration//", + views.map_widget_configuration, + name="map_widget_configuration", + ), +] diff --git a/geocity/apps/forms/views.py b/geocity/apps/forms/views.py new file mode 100644 index 000000000..98ccd7b65 --- /dev/null +++ b/geocity/apps/forms/views.py @@ -0,0 +1,16 @@ +from django.contrib.auth.decorators import login_required +from django.http import JsonResponse + +from .models import MapWidgetConfiguration + + +@login_required +def map_widget_configuration(request, form_id): + + form_map_widget_configuration = MapWidgetConfiguration.objects.get( + map_widget_configuration_form__pk=form_id + ) + + # TODO: get existing configuration for administrative entity and override JSON with specific keys + + return JsonResponse(form_map_widget_configuration.configuration, safe=False) diff --git a/geocity/urls.py b/geocity/urls.py index 721429916..6833f7a84 100644 --- a/geocity/urls.py +++ b/geocity/urls.py @@ -27,6 +27,7 @@ [ path("", submissions_views.submission_select_administrative_entity), path("submissions/", include("geocity.apps.submissions.urls")), + path("forms/", include("geocity.apps.forms.urls")), path("reports/", include("geocity.apps.reports.urls")), # Backward compatibility for Geocity < 2.1, will be deprecated in 3.0 re_path(r"permit-requests/.*", legacy_urls_redirect), From ac51437fdc21e6ac847a509c69facf27e512484f Mon Sep 17 00:00:00 2001 From: gdozot2 <86657909+gdozot2@users.noreply.github.com> Date: Wed, 29 Mar 2023 20:33:17 +0200 Subject: [PATCH 14/17] Integrate advanced map plugin (#763) * Revert unecessary change + integrate data from WC in form * Implement admin options into wc * Use right widget based on admin settings * Fix display of advance map config in administration part * Display only needed configuration * Setup new UI * Update to enable read only and redisplay map * Update lib + Fix invalid * Replace lib + Reinsert info when page is loaded * Add map readonly to display selection * Update lib * Setup admin component creation view * Finalize entries and display admin part * Remove unused file * Improve admin view * Fix CSS + update texte * Improve admin display * Update lib + code display map + admin name layer * Fix typo and inprove css * Final lib update * Lint fix * Fix lint issue on lib --- geocity/apps/accounts/admin.py | 16 + .../apps/core/static/css/admin/display.css | 3 + .../css/admin/map_widget_configurator.css | 53 + .../advancegeometrywidget/geometrywidget.css | 97 + geocity/apps/core/static/css/main.css | 24 + geocity/apps/core/static/js/admin/display.js | 21 + .../js/admin/map_widget_configurator.js | 534 + .../advancegeometrywidget/geometrywidget.js | 158 + .../js/advanced-geometry-edition/border.json | 34 - .../geocity-wc-map.js | 11431 ++++++++-------- geocity/apps/forms/admin.py | 44 +- geocity/apps/forms/models.py | 27 +- geocity/apps/submissions/forms.py | 31 +- .../advancedgeometrywidget.html | 99 - .../geometrywidget.html | 45 + .../submissions/submission_geo_time.html | 1 + geocity/fields.py | 13 +- geocity/settings.py | 1 + requirements.in | 1 + requirements.txt | 1 + requirements_dev.txt | 2 + 21 files changed, 6987 insertions(+), 5649 deletions(-) create mode 100644 geocity/apps/core/static/css/admin/display.css create mode 100644 geocity/apps/core/static/css/admin/map_widget_configurator.css create mode 100644 geocity/apps/core/static/css/advancegeometrywidget/geometrywidget.css create mode 100644 geocity/apps/core/static/js/admin/display.js create mode 100644 geocity/apps/core/static/js/admin/map_widget_configurator.js create mode 100644 geocity/apps/core/static/js/advancegeometrywidget/geometrywidget.js delete mode 100644 geocity/apps/core/static/libs/js/advanced-geometry-edition/border.json delete mode 100644 geocity/apps/submissions/templates/advancedgeometrywidget/advancedgeometrywidget.html create mode 100644 geocity/apps/submissions/templates/advancedgeometrywidget/geometrywidget.html diff --git a/geocity/apps/accounts/admin.py b/geocity/apps/accounts/admin.py index b093a7c0f..017a8bce6 100644 --- a/geocity/apps/accounts/admin.py +++ b/geocity/apps/accounts/admin.py @@ -549,6 +549,21 @@ def get_sites_field(user): ) +class MapCustomChoiceField(forms.ModelChoiceField): + def label_from_instance(self, obj): + return obj.name + + +def get_map_config(): + qs = MapWidgetConfiguration.objects.all() + + return MapCustomChoiceField( + queryset=qs, + widget=forms.Select, + label=_("Configuration de la carte avancée"), + ) + + class AdministrativeEntityAdminForm(forms.ModelForm): """Form class to configure an administrative entity (commune, organisation)""" @@ -556,6 +571,7 @@ def __init__(self, *args, **kwargs): user = kwargs.pop("user") super().__init__(*args, **kwargs) self.fields["sites"] = get_sites_field(user) + self.fields["map_widget_configuration"] = get_map_config() class Meta: model = models.AdministrativeEntityForAdminSite diff --git a/geocity/apps/core/static/css/admin/display.css b/geocity/apps/core/static/css/admin/display.css new file mode 100644 index 000000000..aaa3d95c7 --- /dev/null +++ b/geocity/apps/core/static/css/admin/display.css @@ -0,0 +1,3 @@ +.hide { + display: none; +} diff --git a/geocity/apps/core/static/css/admin/map_widget_configurator.css b/geocity/apps/core/static/css/admin/map_widget_configurator.css new file mode 100644 index 000000000..f9d8c49a2 --- /dev/null +++ b/geocity/apps/core/static/css/admin/map_widget_configurator.css @@ -0,0 +1,53 @@ +@media (min-width: 768px) { + +.rjf-form-row > .rjf-form-row-controls + .rjf-form-row-inner { + padding-right: 0px; +} + +.rjf-form-row > .rjf-form-row-controls + .rjf-form-row-inner > div > label { + width: 100%; +} + +.rjf-form-row > .rjf-form-row-inner > div > .rjf-input-group { + width: 100%; +} + +.rjf-form-row > .rjf-form-row-inner > div > .rjf-input-group > input { + max-width: none; +} + +.rjf-form-group-inner > .rjf-form-group-wrapper { + max-width: none; +} + +.rjf-form-wrapper > .module > .rjf-form-group { + max-width: none; +} + +.rjf-form-wrapper > .module > .rjf-form-group > .rjf-form-group-inner > .rjf-form-group { + max-width: none; +} + +.rjf-form-group-inner > .rjf-form-group-wrapper > .rjf-form-group > .rjf-form-group-inner > .rjf-form-group-wrapper > .rjf-form-group > .rjf-form-group-inner > .rjf-form-group { + max-width: none; +} + +} + +.rjf-check-input > label > input[name="rjf§mode§type"], +.rjf-check-input > label > input[name="rjf§outputFormat"] { + max-width: 12px; + margin: 10px; +} + +.rjf-form-row > .rjf-form-row-controls { + display: none; +} + +.rjf-form-row label input[type="checkbox"] { + margin-right: 8px; +} + +input[type="text"]::placeholder { + color: lightgray; +} diff --git a/geocity/apps/core/static/css/advancegeometrywidget/geometrywidget.css b/geocity/apps/core/static/css/advancegeometrywidget/geometrywidget.css new file mode 100644 index 000000000..f4db40185 --- /dev/null +++ b/geocity/apps/core/static/css/advancegeometrywidget/geometrywidget.css @@ -0,0 +1,97 @@ +#map-ro-result { + width: 100%; + height: 30vh; +} + +#map-custom-modal-button { + border: 1px solid #008c6f; + color: #008c6f; + width: 222px; + height: 38px; + justify-content: center; + align-items: center; + margin-top: 4px; +} + +#map-custom-modal-button > i { + padding-right: 7px; +} + +#geo-invalid-content { + color: #dc3545; + display: none; + width: 100%; + font-weight: bold; + font-size: 80%; +} + +#map-custom-modal { + position: fixed; + z-index: 1022; + background-color: white; +} + +#web-component-advanced { + margin-left: auto; + margin-right: auto; +} + +#map-custom-modal-overlay { + position: fixed; + z-index: 1021; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background-color: black; + opacity: 0.4; +} + +.map-modal-header { + width: calc(100% - 40px); + margin-left: 20px; + height: 48px; + display: flex; + align-items: center; +} + +.map-modal-header > p { + width: 80%; + margin: 0; + font-weight: bold; + font-size: 16px; + line-height: 19px; + display: flex; + justify-content: flex-start; + align-items: center; +} + +.map-modal-header > i { + width: 20%; + display: flex; + justify-content: flex-end; + align-items: center; +} + +.validate-layout { + width: 100%; + height: 48px; + display: flex; + justify-content: center; + align-items: center; +} + +#modal-validation-button { + width: 229px; + height: 36px; + color: white; + background-color: #008c6f; + display: flex; + align-items: center; + justify-content: center; + text-align: center; +} + +.cursor { + cursor: pointer; +} diff --git a/geocity/apps/core/static/css/main.css b/geocity/apps/core/static/css/main.css index 2b9fed268..83b3e3ceb 100644 --- a/geocity/apps/core/static/css/main.css +++ b/geocity/apps/core/static/css/main.css @@ -596,6 +596,18 @@ th.actions { h5 { font-size: 1.3rem; } + + #map-custom-modal { + top: 10vh; + left: 10vw; + width: 80vw; + height: 80vh; + } + + #web-component-advanced { + width: calc(100% - 40px); + height: calc(80vh - 96px); + } } @media (max-width: 768px) { @@ -653,6 +665,18 @@ th.actions { line-height: 15px; } + #map-custom-modal { + top: 0vh; + left: 0vw; + width: 100vw; + height: 100vh; + } + + #web-component-advanced { + width: 100%; + height: calc(100vh - 96px); + } + } .search-results { diff --git a/geocity/apps/core/static/js/admin/display.js b/geocity/apps/core/static/js/admin/display.js new file mode 100644 index 000000000..9bfa15101 --- /dev/null +++ b/geocity/apps/core/static/js/admin/display.js @@ -0,0 +1,21 @@ +document.addEventListener('DOMContentLoaded', () => { + function updateFields() { + const state = document.getElementById('id_geo_widget_option').value; + if (state == 1) { + document.getElementsByClassName('field-map_widget_configuration')[0].classList.add('hide') + document.getElementsByClassName('field-geometry_types')[0].classList.remove('hide') + document.getElementsByClassName('field-wms_layers')[0].classList.remove('hide') + document.getElementsByClassName('field-wms_layers_order')[0].classList.remove('hide') + } + + if (state == 2) { + document.getElementsByClassName('field-map_widget_configuration')[0].classList.remove('hide') + document.getElementsByClassName('field-geometry_types')[0].classList.add('hide') + document.getElementsByClassName('field-wms_layers')[0].classList.add('hide') + document.getElementsByClassName('field-wms_layers_order')[0].classList.add('hide') + } + } + + jQuery('#id_geo_widget_option').on("change", updateFields); + updateFields(); +}) diff --git a/geocity/apps/core/static/js/admin/map_widget_configurator.js b/geocity/apps/core/static/js/admin/map_widget_configurator.js new file mode 100644 index 000000000..1da26ab38 --- /dev/null +++ b/geocity/apps/core/static/js/admin/map_widget_configurator.js @@ -0,0 +1,534 @@ +// ------------------ SCHEMA DEFINITION ---------------------------- + +const baseSchema = { + "type": "object", + "keys": { + "mode": { + "type": "object", + "keys": { + "type": { + "type": "string", + "title": "Modes d’interaction avec la carte", + "choices": [ + { + "title": "Création", + "value": "create", + }, + { + "title": "Sélection", + "value": "select" + }, + { + "title": "Cible", + "value": "target" + }, + { + "title": "Mixte", + "value": "mix" + } + ], + "widget": "radio" + } + } + }, + "wmts": { + "type": "array", + "title": "WMTS", + "items": { + "type": "object", + "keys": { + "capability": { + "type": "string", + "title": "Lien vers la capability", + "placeholder": "https://wmts.asit-asso.ch/wmts?&Service=WMTS&Version=1.0.0&Request=GetCapabilities" + }, + "layer": { + "type": "string", + "title": "Identifiant de la couche WMTS", + "placeholder": "asitvd.fond_cadastral" + }, + "projection": { + "type": "string", + "title": "Projection", + "default": "EPSG:2056" + }, + "name": { + "type": "string", + "title": "Nom affiché lors de la sélection de la couche", + "placeholder": "Carte de base" + }, + "thumbnail": { + "type": "string", + "title": "Lien vers l'image qui sera affiché lors de la sélection de la couche" + } + } + } + }, + "zoom": { + "type": "integer", + "title": "Niveau de zoom par défaut à l’ouverture de la carte", + "default": 15 + }, + "minZoom": { + "type": "integer", + "title": "Niveau de zoom minimum possible", + "default": 1 + }, + "maxZoom": { + "type": "integer", + "title": "Niveau de zoom maximum possible", + "default": 20 + }, + "defaultCenter": { + "type": "array", + "title": "Position centrale de départ: (x, y au format EPSG:2056)", + "items": { + "type": "integer" + }, + "minItems": 2, + "maxItems": 2, + "default": [1111, 22222] + }, + "information": { + "type": "object", + "keys": { + "duration": { + "type": "integer", + "title": "Durée d’apparition de la boite d’information", + "default": 5000 + }, + "title": { + "type": "string", + "title": "Titre la boite d’information", + "default": "Signaler ..." + }, + "content": { + "title": "Texte de la boite d’information ", + "type": "string", + "placeholder": "Sélectionnez un ou plusieurs lampadaire(s) défectueux présent(s) dans l’espace public de la ville." + } + } + }, + "selectionTargetBoxMessage": { + "type": "string", + "title": "Message pour la boite informative de position", + "placeholder": "Éclairage signalé" + }, + "border": { + "type": "object", + "title": "Frontière", + "keys": { + "url": { + "type": "string", + "title": "Lien vers un GeoJSON contenant les informations sur la frontière", + "helpText": "La création ou sélection d’éléments ne sera autorisée que dans la géométrie indiquée", + "placeholder": " http://localhost:9095/submissions/adminentitiesgeojson/1/" + }, + "notification": { + "type": "string", + "title": "Message expliquant pourquoi on ne peut effectuer une action hors des frontières", + "default": "Veuillez placer votre élément dans les limites autorisées", + "placeholder": "Veuillez placer votre élément dans les limites autorisées" + } + } + }, + "inclusionArea": { + "type": "object", + "title": "Zone d’inclusion", + "keys": { + "url": { + "type": "string", + "title": "Lien vers une couche WFS contenant les informations sur la zone d’inclusion", + "placeholder": "https://mapnv.ch/mapserv_proxy?ogcserver=source+for+image%2Fpng&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&typeName=MO_bf_bien_fonds" + }, + "filter": { + "type": "string", + "title": "Filtre d’URL pour WFS permettant de filtrer les données de la zone d’inclusion", + "placeholder": "GeometryOperands=urn:ogc:def:crs:EPSG::2056&FILTER=communeYverdon-les-BainsgenreParcelle privée" + } + } + }, + "notifications": { + "type": "array", + "items": { + "type": "object", + "keys": { + "type": { + "type": "string", + "readonly": true + }, + "message": { + "type": "string" + }, + "rule": { + "type": "object", + "keys": { + "type": { + "type": "string" + }, + "minZoom": { + "type": "integer", + "minimum": 1 + }, + "couldBypass": { + "type": "boolean" + }, + "maxElement": { + "type": "integer", + "title": "Maximum d’éléments pouvant être créés/sélectionnés (-1 pour 'autant que l'on souhaite')", + "minimum": -1 + } + } + }, + } + }, + }, + "outputFormat": { + "type": "string", + "title": "Format des données en sortie du composant web", + "choices": [ + { + "title": "Collection de géométrie (GeometryCollection)", + "value": "GeometryCollection", + }, + { + "title": "Collection d’éléments (FeatureCollection)", + "value": "FeatureCollection" + } + ], + "widget": "radio", + "default": "GeometryCollection" + }, + "interaction": { + "type": "object", + "title": "Interactions avec la carte", + "keys": { + "displayZoom": { + "type": "boolean", + "title": "Voulez-vous afficher les boutons de zoom?", + "default": true + }, + "displayScaleLine": { + "type": "boolean", + "title": "Voulez-vous afficher la barre d’échelle?", + "default": false + }, + "fullscreen": { + "type": "boolean", + "title": "Voulez-vous permettre le mode pleine écran?", + "default": true + }, + "enableGeolocation": { + "type": "boolean", + "title": "Voulez-vous activer la géolocalisation du composant?", + "default": true + }, + "enableCenterButton": { + "type": "boolean", + "title": "Voulez-vous activer le bouton de recentrage?", + "default": true + }, + "enableRotation": { + "type": "boolean", + "title": "Voulez-vous permettre la rotation de la carte?", + "default": true + } + } + }, + "geolocationInformation": { + "type": "object", + "title": "Information concernant la géolocalisation des éléments créés/sélectionnés", + "keys": { + "displayBox": { + "type": "boolean", + "title": "Afficher le boite d'information sur la géolocalisation des éléments créés/sélectionnés", + "default": true + }, + "reverseLocation": { + "type": "boolean", + "title": "Rechercher et afficher l'adresse la plus proche", + "default": true + }, + "currentLocation": { + "type": "boolean", + "title": "Afficher les coordonnées", + "default": false + } + } + } + } +} + +const zoomConstraintNotification = { + "type": "warning", + "message": "Veuillez zoomer davantage avant de pouvoir sélectionner un emplacement.", + "rule": { + "type": "ZOOM_CONSTRAINT", + "minZoom": 16 + } +}; + +const maximumSelectionNotification = { + "type": "warning", + "message": "Le maximum de sélection est limité à {x}.", + "rule": { + "type": "MAX_SELECTION", + "maxElement": 1 + } +}; + +const areaConstraintNotification = { + "type": "warning", + "message": "L’emplacement sélectionné se situe en dehors des zones autorisées.", + "rule": { + "type": "AREA_CONSTRAINT", + "couldBypass": false + } +}; + +const infoNotificationTarget = { + "type": "info", + "message": "Déplacez la carte pour que l’endroit désiré soit au centre de la cible.", + "rule": { + "type": "INFORMATION" + } +}; + +const infoNotificationCreate = { + "type": "info", + "message": "Cliquez longuement sur la carte à l’endroit désiré pour qu’un élément soit créé.", + "rule": { + "type": "INFORMATION" + } +}; + +const infoNotificationSelect = { + "type": "info", + "message": "Sélectionnez un marqueur sur la carte.", + "rule": { + "type": "INFORMATION" + } +}; + +const infoNotificationMix = { + "type": "info", + "message": "Sélectionnez un marqueur ou cliquez longuement sur la carte pour qu’un élément soit créé.", + "rule": { + "type": "INFORMATION" + } +}; + +const searchFeature = { + "type": "object", + "title": "Configuration pour permettre la recherche d’adresse", + "keys": { + "displaySearch": { + "type": "boolean", + "title": "Afficher la boite permettant de faire une recherche", + "default": true + }, + "requestWithoutCustomValue": { + "type": "string", + "title": "URL pour exécuter la recherche", + "default": "https://api3.geo.admin.ch/rest/services/api/SearchServer?limit=5&&type=locations&sr=2056&lang=fr&origins=address%2Cparcel", + "placeholder": "https://api3.geo.admin.ch/rest/services/api/SearchServer?limit=5&&type=locations&sr=2056&lang=fr&origins=address%2Cparcel" + }, + "bboxRestiction": { + "type": "string", + "title": "Restriction de la zone de recherche basé sur la bbox", + "placeholder": "2523099.818000,1167985.282000,2549752.141000,1192697.773000" + } + } +} + +const wfsOption = { + "type": "object", + "keys": { + "url": { + "type": "string", + "title": "URL de la couche WFS", + "placeholder": "https://mapnv.ch/mapserv_proxy?ogcserver=source+for+image%2Fpng&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=ELE_tragwerk_gesco" + } + } +}; + +const clusterOption = { + "type": "object", + "keys": { + "distance": { + "type": "integer", + "title": "Distance en pixels à l'intérieur de laquelle les caractéristiques seront regroupées", + "default": 40, + }, + "minDistance": { + "type": "integer", + "title": "Distance minimale en pixels entre les clusters.", + "default": 35, + } + } +} + +const defaultCenter = { + "type": "array", + "title": "Position centrale de départ: (x, y au format EPSG:2056)", + "items": { + "type": "integer" + }, + "minItems": 2, + "maxItems": 2, + "default": [1111, 22222] +} + +const targetSchema = JSON.parse(JSON.stringify(baseSchema)); +targetSchema.keys["defaultCenter"] = defaultCenter; +const createSchema = JSON.parse(JSON.stringify(baseSchema)); +createSchema.keys["search"] = searchFeature; +createSchema.keys["defaultCenter"] = defaultCenter; +const selectSchema = JSON.parse(JSON.stringify(baseSchema)); +selectSchema.keys["search"] = searchFeature; +selectSchema.keys["wfs"] = wfsOption; +selectSchema.keys["cluster"] = clusterOption; +selectSchema.keys["defaultCenter"] = defaultCenter; +// ------------------ CODE PART ---------------------------- + +let form; +let schema = ''; + +function setupTargetMode(data, isSchemaChanged) { + schema = targetSchema; + if (!data.notifications || data.notifications.length == 0) { + data.notifications = [zoomConstraintNotification,infoNotificationTarget]; + } else if (isSchemaChanged) { + data.notifications = [zoomConstraintNotification,infoNotificationTarget]; + } +} + +function setupSelectionMode(data, isSchemaChanged) { + schema = selectSchema; + if (!data.notifications || data.notifications.length == 0) { + data.notifications = [zoomConstraintNotification,maximumSelectionNotification,infoNotificationSelect]; + } else if (isSchemaChanged) { + data.notifications = [zoomConstraintNotification,maximumSelectionNotification,infoNotificationSelect]; + } +} + +function setupCreateMode(data, isSchemaChanged) { + schema = createSchema; + if (!data.notifications || data.notifications.length == 0) { + data.notifications = [zoomConstraintNotification,maximumSelectionNotification,infoNotificationCreate]; + } else if (isSchemaChanged) { + data.notifications = [zoomConstraintNotification,maximumSelectionNotification,infoNotificationCreate]; + } +} + +function setupMixMode(data, isSchemaChanged) { + schema = selectSchema; + if (!data.notifications || data.notifications.length == 0) { + data.notifications = [zoomConstraintNotification,maximumSelectionNotification,infoNotificationMix]; + } else if (isSchemaChanged) { + data.notifications = [zoomConstraintNotification,maximumSelectionNotification,infoNotificationMix]; + } +} + +function changeSchema(data, isSchemaChange) { + switch(data.mode.type) { + case "target": setupTargetMode(data, isSchemaChange); break; + case "create": setupCreateMode(data, isSchemaChange); break; + case "select": setupSelectionMode(data, isSchemaChange); break; + case "mix": setupMixMode(data, isSchemaChange); break; + } + form.update({ + schema: schema, + data: data + }) +} + +function setupDisplay(data) { + if (data.notifications && data.notifications.length > 0) { + for (let i = 0; i < data.notifications.length; i++) { + const ruleType = document.getElementsByName(`rjf§notifications§${i}§rule§type`) + if (ruleType && ruleType.length > 0 ) { + if (ruleType[0].value !== "ZOOM_CONSTRAINT") { + const minZoom = document.getElementsByName(`rjf§notifications§${i}§rule§minZoom`) + if (minZoom) { + minZoom[0].parentElement.parentElement.parentElement.parentElement.style.display = 'none' + } + } + if (ruleType[0].value !== "AREA_CONSTRAINT") { + const couldBypass = document.getElementsByName(`rjf§notifications§${i}§rule§couldBypass`) + if (couldBypass) { + couldBypass[0].parentElement.parentElement.parentElement.parentElement.style.display = 'none' + } + } + if (ruleType[0].value !== "MAX_SELECTION") { + const maxElement = document.getElementsByName(`rjf§notifications§${i}§rule§maxElement`) + if (maxElement) { + maxElement[0].parentElement.parentElement.parentElement.parentElement.style.display = 'none' + } + } + } + } + } +} + +function setupPosition(data) { + let shouldUpdate = false; + if (data.defaultCenter && data.defaultCenter[0] == null) { + data.defaultCenter[0] = 2539057; + shouldUpdate = true; + } + if (data.defaultCenter && data.defaultCenter[1] == null) { + data.defaultCenter[1] = 1181111; + shouldUpdate = true; + } + if (shouldUpdate) { + form.update({ + schema: schema, + data: data + }); + } +} + +function onJsonFormChange(e) { + const data = e.data; + const prevData = e.prevData; + + if (prevData.inclusionArea && data.inclusionArea) { + if (prevData.inclusionArea.url == '' && data.inclusionArea.url != '') { + data.notifications.push(areaConstraintNotification); + form.update({ + schema: schema, + data: data + }); + } else if (prevData.inclusionArea.url != '' && data.inclusionArea.url == '') { + const index = data.notifications.findIndex((notification) => notification.rule.type == "AREA_CONSTRAINT"); + if (index != -1) { + data.notifications.splice(index, 1); + form.update({ + schema: schema, + data: data + }); + } + } + } + + + if (data.mode.type != prevData.mode.type) { + changeSchema(data, true); + } + + setupDisplay(data); + + setupPosition(data); +} + +window.addEventListener('load', function() { + if (window.reactJsonForm) { + form = reactJsonForm.getFormInstance('id_configuration_jsonform'); + if (form.data.mode.type != '') { + changeSchema(form.data, false) + setupDisplay(form.data) + } + form.addEventListener('change', onJsonFormChange); + } +}); diff --git a/geocity/apps/core/static/js/advancegeometrywidget/geometrywidget.js b/geocity/apps/core/static/js/advancegeometrywidget/geometrywidget.js new file mode 100644 index 000000000..05317109e --- /dev/null +++ b/geocity/apps/core/static/js/advancegeometrywidget/geometrywidget.js @@ -0,0 +1,158 @@ +const readOnlyMap = document.getElementById("map-ro-result"); +const editableMap = document.getElementById("web-component-advanced"); +const serialized = document.querySelector("[data-role='serialized']"); +const buttonModal = document.getElementById("map-custom-modal-button"); +const crossButton = document.getElementById("modal-close-button"); +const validationButton = document.getElementById("modal-validation-button"); +const optionsDiv = document.querySelectorAll( + "[data-geometry-widget]:not([data-initialize='0'])" +); +validationButton.style.opacity = 0.5; +const map = document.getElementById("map-custom-modal"); +const overlay = document.getElementById("map-custom-modal-overlay"); +let isModalOpen = false; +let mapIsCreated = false; +let selectedValues = ""; +let options = undefined; + +if ( + optionsDiv && + optionsDiv[0] && + optionsDiv[0].dataset && + optionsDiv[0].dataset.options +) { + options = JSON.parse(optionsDiv[0].dataset.options); +} + +parseCoordinates = (data) => { + const selections = []; + if (options.map_widget_configuration[0].outputFormat == 'GeometryCollection') { + data.geometries.forEach((geometry) => { + selections.push(geometry.coordinates[0]); + }); + } else { + data.features.forEach((feature) => { + selections.push(feature.geometry.coordinates[0]); + }) + } + return selections; +} + +setupMap = (container, options, readonly) => { + if (options && options.map_widget_configuration) { + const wc = document.createElement("openlayers-element"); + wc.options = options.map_widget_configuration[0]; + const states = { + readonly: readonly, + }; + if (serialized.value) { + const data = JSON.parse(serialized.value); + const selections = parseCoordinates(data); + states['currentSelections'] = selections; + } + wc.states = states; + container.appendChild(wc); + } +} + +updateReadOnlyMap = () => { + if (readOnlyMap) { + const states = { + readonly: true, + }; + if (serialized.value) { + const data = JSON.parse(serialized.value); + const selections = parseCoordinates(data); + states['currentSelections'] = selections; + } + readOnlyMap.lastChild.states = states; + } +} + +createMap = () => { + if (!mapIsCreated) { + if (editableMap) { + setupMap(editableMap, options, false) + mapIsCreated = true; + } + } else if (editableMap.lastChild) { + if (serialized.value) { + const states = { + readonly: false, + }; + const data = JSON.parse(serialized.value); + const selections = parseCoordinates(data); + states['currentSelections'] = selections; + editableMap.lastChild.states = states; + } + } +}; + +toogleModal = (state) => { + map.style.display = state; + overlay.style.display = state; + if (state == "block") document.body.style.overflow = "hidden"; + else { + document.body.style.overflow = "visible" + editableMap.lastChild.states = { + readonly: true, + currentSelections: [] + } + }; +}; + +buttonModal.addEventListener("click", () => { + if (isModalOpen) { + toogleModal("none"); + } else { + toogleModal("block"); + createMap(); + } +}); + +closeModal = () => { + toogleModal("none"); +}; + +crossButton.addEventListener("click", () => { + closeModal(); +}); + +overlay.addEventListener("click", () => { + closeModal(); +}); + +validationButton.addEventListener("click", () => { + if (selectedValues != "") + { + serialized.value = selectedValues; + toogleModal("none"); + updateReadOnlyMap(); + } + +}); + +window.addEventListener("position-selected", (event) => { + if (event.detail) { + validationButton.style.opacity = 1; + selectedValues = event.detail; + } else { + validationButton.style.opacity = 0.5; + selectedValues = ""; + } +}); + +const isInvalid = document + .querySelectorAll("[data-geometry-widget]:not([data-initialize='0'])")[0] + ?.parentNode?.parentNode?.classList.contains("is-invalid"); +if (isInvalid) { + document.getElementById("geo-invalid-content").style.display = "block"; +} + +setupMap(readOnlyMap, options, true); + +if (options && !options.edit_geom) { + buttonModal.style.display = 'none'; +} else { + buttonModal.style.display = 'flex'; +} diff --git a/geocity/apps/core/static/libs/js/advanced-geometry-edition/border.json b/geocity/apps/core/static/libs/js/advanced-geometry-edition/border.json deleted file mode 100644 index 81cd3c916..000000000 --- a/geocity/apps/core/static/libs/js/advanced-geometry-edition/border.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "type": "FeatureCollection", - "crs": { "type": "name", "properties": { "name": "EPSG:2056" } }, - "features": [ - { - "type": "Feature", - "properties": { "name": "Démo Yverdon" }, - "geometry": { - "type": "MultiPolygon", - "coordinates": [ - [ - [ - [2538391.0, 1176432.0], - [2538027.0, 1178201.0], - [2538485.0, 1178804.0], - [2537777.0, 1179199.0], - [2536748.0, 1178450.0], - [2536123.0, 1179647.0], - [2537382.0, 1180593.0], - [2537143.0, 1181623.0], - [2538651.0, 1183257.0], - [2540368.0, 1183236.0], - [2541252.0, 1181093.0], - [2541460.0, 1180458.0], - [2540160.0, 1179543.0], - [2540097.0, 1178877.0], - [2538391.0, 1176432.0] - ] - ] - ] - } - } - ] -} diff --git a/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js b/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js index 5294624e1..ac18503b2 100644 --- a/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js +++ b/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js @@ -3,19 +3,19 @@ * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Rr = window, Za = Rr.ShadowRoot && (Rr.ShadyCSS === void 0 || Rr.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, nu = Symbol(), Jl = /* @__PURE__ */ new WeakMap(); -class Uf { +const Ir = window, Ha = Ir.ShadowRoot && (Ir.ShadyCSS === void 0 || Ir.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ou = Symbol(), ih = /* @__PURE__ */ new WeakMap(); +class $f { constructor(t, e, n) { - if (this._$cssResult$ = !0, n !== nu) + if (this._$cssResult$ = !0, n !== ou) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); this.cssText = t, this.t = e; } get styleSheet() { let t = this.o; const e = this.t; - if (Za && t === void 0) { + if (Ha && t === void 0) { const n = e !== void 0 && e.length === 1; - n && (t = Jl.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && Jl.set(e, t)); + n && (t = ih.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && ih.set(e, t)); } return t; } @@ -23,27 +23,27 @@ class Uf { return this.cssText; } } -const xt = (i) => new Uf(typeof i == "string" ? i : i + "", void 0, nu), Vf = (i, t) => { - Za ? i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => { - const n = document.createElement("style"), s = Rr.litNonce; +const yt = (i) => new $f(typeof i == "string" ? i : i + "", void 0, ou), Bf = (i, t) => { + Ha ? i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => { + const n = document.createElement("style"), s = Ir.litNonce; s !== void 0 && n.setAttribute("nonce", s), n.textContent = e.cssText, i.appendChild(n); }); -}, Ql = Za ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => { +}, nh = Ha ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => { let e = ""; for (const n of t.cssRules) e += n.cssText; - return xt(e); + return yt(e); })(i) : i; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var Po; -const Ar = window, th = Ar.trustedTypes, Wf = th ? th.emptyScript : "", eh = Ar.reactiveElementPolyfillSupport, na = { toAttribute(i, t) { +var Go; +const Fr = window, sh = Fr.trustedTypes, zf = sh ? sh.emptyScript : "", rh = Fr.reactiveElementPolyfillSupport, ha = { toAttribute(i, t) { switch (t) { case Boolean: - i = i ? Wf : null; + i = i ? zf : null; break; case Object: case Array: @@ -68,8 +68,8 @@ const Ar = window, th = Ar.trustedTypes, Wf = th ? th.emptyScript : "", eh = Ar. } } return e; -} }, su = (i, t) => t !== i && (t == t || i == i), Oo = { attribute: !0, type: String, converter: na, reflect: !1, hasChanged: su }; -class dn extends HTMLElement { +} }, au = (i, t) => t !== i && (t == t || i == i), $o = { attribute: !0, type: String, converter: ha, reflect: !1, hasChanged: au }; +class vn extends HTMLElement { constructor() { super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u(); } @@ -85,7 +85,7 @@ class dn extends HTMLElement { s !== void 0 && (this._$Ev.set(s, n), t.push(s)); }), t; } - static createProperty(t, e = Oo) { + static createProperty(t, e = $o) { if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) { const n = typeof t == "symbol" ? Symbol() : "__" + t, s = this.getPropertyDescriptor(t, n, e); s !== void 0 && Object.defineProperty(this.prototype, t, s); @@ -100,7 +100,7 @@ class dn extends HTMLElement { }, configurable: !0, enumerable: !0 }; } static getPropertyOptions(t) { - return this.elementProperties.get(t) || Oo; + return this.elementProperties.get(t) || $o; } static finalize() { if (this.hasOwnProperty("finalized")) @@ -119,9 +119,9 @@ class dn extends HTMLElement { if (Array.isArray(t)) { const n = new Set(t.flat(1 / 0).reverse()); for (const s of n) - e.unshift(Ql(s)); + e.unshift(nh(s)); } else - t !== void 0 && e.push(Ql(t)); + t !== void 0 && e.push(nh(t)); return e; } static _$Ep(t, e) { @@ -148,7 +148,7 @@ class dn extends HTMLElement { createRenderRoot() { var t; const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions); - return Vf(e, this.constructor.elementStyles), e; + return Bf(e, this.constructor.elementStyles), e; } connectedCallback() { var t; @@ -169,11 +169,11 @@ class dn extends HTMLElement { attributeChangedCallback(t, e, n) { this._$AK(t, n); } - _$EO(t, e, n = Oo) { + _$EO(t, e, n = $o) { var s; const r = this.constructor._$Ep(t, n); if (r !== void 0 && n.reflect === !0) { - const o = (((s = n.converter) === null || s === void 0 ? void 0 : s.toAttribute) !== void 0 ? n.converter : na).toAttribute(e, n.type); + const o = (((s = n.converter) === null || s === void 0 ? void 0 : s.toAttribute) !== void 0 ? n.converter : ha).toAttribute(e, n.type); this._$El = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$El = null; } } @@ -181,13 +181,13 @@ class dn extends HTMLElement { var n; const s = this.constructor, r = s._$Ev.get(t); if (r !== void 0 && this._$El !== r) { - const o = s.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) === null || n === void 0 ? void 0 : n.fromAttribute) !== void 0 ? o.converter : na; + const o = s.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) === null || n === void 0 ? void 0 : n.fromAttribute) !== void 0 ? o.converter : ha; this._$El = r, this[r] = a.fromAttribute(e, o.type), this._$El = null; } } requestUpdate(t, e, n) { let s = !0; - t !== void 0 && (((n = n || this.constructor.getPropertyOptions(t)).hasChanged || su)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), n.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, n))) : s = !1), !this.isUpdatePending && s && (this._$E_ = this._$Ej()); + t !== void 0 && (((n = n || this.constructor.getPropertyOptions(t)).hasChanged || au)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), n.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, n))) : s = !1), !this.isUpdatePending && s && (this._$E_ = this._$Ej()); } async _$Ej() { this.isUpdatePending = !0; @@ -248,93 +248,89 @@ class dn extends HTMLElement { firstUpdated(t) { } } -dn.finalized = !0, dn.elementProperties = /* @__PURE__ */ new Map(), dn.elementStyles = [], dn.shadowRootOptions = { mode: "open" }, eh == null || eh({ ReactiveElement: dn }), ((Po = Ar.reactiveElementVersions) !== null && Po !== void 0 ? Po : Ar.reactiveElementVersions = []).push("1.5.0"); +vn.finalized = !0, vn.elementProperties = /* @__PURE__ */ new Map(), vn.elementStyles = [], vn.shadowRootOptions = { mode: "open" }, rh == null || rh({ ReactiveElement: vn }), ((Go = Fr.reactiveElementVersions) !== null && Go !== void 0 ? Go : Fr.reactiveElementVersions = []).push("1.6.1"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var No; -const Pr = window, Ln = Pr.trustedTypes, ih = Ln ? Ln.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, je = `lit$${(Math.random() + "").slice(9)}$`, Ua = "?" + je, Hf = `<${Ua}>`, Tn = document, gs = (i = "") => Tn.createComment(i), ms = (i) => i === null || typeof i != "object" && typeof i != "function", ru = Array.isArray, ou = (i) => ru(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Jn = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, nh = /-->/g, sh = />/g, Ri = RegExp(`>|[ -\f\r](?:([^\\s"'>=/]+)([ -\f\r]*=[ -\f\r]*(?:[^ -\f\r"'\`<>=]|("|')|))|$)`, "g"), rh = /'/g, oh = /"/g, au = /^(?:script|style|textarea|title)$/i, Xf = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), Lt = Xf(1), yi = Symbol.for("lit-noChange"), bt = Symbol.for("lit-nothing"), ah = /* @__PURE__ */ new WeakMap(), wn = Tn.createTreeWalker(Tn, 129, null, !1), lu = (i, t) => { +var Bo; +const Dr = window, Fn = Dr.trustedTypes, oh = Fn ? Fn.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, kr = "$lit$", ei = `lit$${(Math.random() + "").slice(9)}$`, Xa = "?" + ei, Zf = `<${Xa}>`, Dn = document, Es = () => Dn.createComment(""), ws = (i) => i === null || typeof i != "object" && typeof i != "function", lu = Array.isArray, hu = (i) => lu(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", zo = `[ \f\r]`, ls = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ah = /-->/g, lh = />/g, Fi = RegExp(`>|${zo}(?:([^\\s"'>=/]+)(${zo}*=${zo}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`, "g"), hh = /'/g, ch = /"/g, cu = /^(?:script|style|textarea|title)$/i, Uf = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), Lt = Uf(1), Si = Symbol.for("lit-noChange"), bt = Symbol.for("lit-nothing"), uh = /* @__PURE__ */ new WeakMap(), An = Dn.createTreeWalker(Dn, 129, null, !1), uu = (i, t) => { const e = i.length - 1, n = []; - let s, r = t === 2 ? "" : "", o = Jn; + let s, r = t === 2 ? "" : "", o = ls; for (let l = 0; l < e; l++) { const h = i[l]; let c, u, d = -1, f = 0; for (; f < h.length && (o.lastIndex = f, u = o.exec(h), u !== null); ) - f = o.lastIndex, o === Jn ? u[1] === "!--" ? o = nh : u[1] !== void 0 ? o = sh : u[2] !== void 0 ? (au.test(u[2]) && (s = RegExp("" ? (o = s != null ? s : Jn, d = -1) : u[1] === void 0 ? d = -2 : (d = o.lastIndex - u[2].length, c = u[1], o = u[3] === void 0 ? Ri : u[3] === '"' ? oh : rh) : o === oh || o === rh ? o = Ri : o === nh || o === sh ? o = Jn : (o = Ri, s = void 0); - const g = o === Ri && i[l + 1].startsWith("/>") ? " " : ""; - r += o === Jn ? h + Hf : d >= 0 ? (n.push(c), h.slice(0, d) + "$lit$" + h.slice(d) + je + g) : h + je + (d === -2 ? (n.push(void 0), l) : g); + f = o.lastIndex, o === ls ? u[1] === "!--" ? o = ah : u[1] !== void 0 ? o = lh : u[2] !== void 0 ? (cu.test(u[2]) && (s = RegExp("" ? (o = s != null ? s : ls, d = -1) : u[1] === void 0 ? d = -2 : (d = o.lastIndex - u[2].length, c = u[1], o = u[3] === void 0 ? Fi : u[3] === '"' ? ch : hh) : o === ch || o === hh ? o = Fi : o === ah || o === lh ? o = ls : (o = Fi, s = void 0); + const g = o === Fi && i[l + 1].startsWith("/>") ? " " : ""; + r += o === ls ? h + Zf : d >= 0 ? (n.push(c), h.slice(0, d) + kr + h.slice(d) + ei + g) : h + ei + (d === -2 ? (n.push(void 0), l) : g); } const a = r + (i[e] || "") + (t === 2 ? "" : ""); if (!Array.isArray(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array"); - return [ih !== void 0 ? ih.createHTML(a) : a, n]; + return [oh !== void 0 ? oh.createHTML(a) : a, n]; }; -class _s { +class Ss { constructor({ strings: t, _$litType$: e }, n) { let s; this.parts = []; let r = 0, o = 0; - const a = t.length - 1, l = this.parts, [h, c] = lu(t, e); - if (this.el = _s.createElement(h, n), wn.currentNode = this.el.content, e === 2) { + const a = t.length - 1, l = this.parts, [h, c] = uu(t, e); + if (this.el = Ss.createElement(h, n), An.currentNode = this.el.content, e === 2) { const u = this.el.content, d = u.firstChild; d.remove(), u.append(...d.childNodes); } - for (; (s = wn.nextNode()) !== null && l.length < a; ) { + for (; (s = An.nextNode()) !== null && l.length < a; ) { if (s.nodeType === 1) { if (s.hasAttributes()) { const u = []; for (const d of s.getAttributeNames()) - if (d.endsWith("$lit$") || d.startsWith(je)) { + if (d.endsWith(kr) || d.startsWith(ei)) { const f = c[o++]; if (u.push(d), f !== void 0) { - const g = s.getAttribute(f.toLowerCase() + "$lit$").split(je), m = /([.?@])?(.*)/.exec(f); - l.push({ type: 1, index: r, name: m[2], strings: g, ctor: m[1] === "." ? cu : m[1] === "?" ? uu : m[1] === "@" ? du : Fs }); + const g = s.getAttribute(f.toLowerCase() + kr).split(ei), m = /([.?@])?(.*)/.exec(f); + l.push({ type: 1, index: r, name: m[2], strings: g, ctor: m[1] === "." ? fu : m[1] === "?" ? gu : m[1] === "@" ? mu : Zs }); } else l.push({ type: 6, index: r }); } for (const d of u) s.removeAttribute(d); } - if (au.test(s.tagName)) { - const u = s.textContent.split(je), d = u.length - 1; + if (cu.test(s.tagName)) { + const u = s.textContent.split(ei), d = u.length - 1; if (d > 0) { - s.textContent = Ln ? Ln.emptyScript : ""; + s.textContent = Fn ? Fn.emptyScript : ""; for (let f = 0; f < d; f++) - s.append(u[f], gs()), wn.nextNode(), l.push({ type: 2, index: ++r }); - s.append(u[d], gs()); + s.append(u[f], Es()), An.nextNode(), l.push({ type: 2, index: ++r }); + s.append(u[d], Es()); } } } else if (s.nodeType === 8) - if (s.data === Ua) + if (s.data === Xa) l.push({ type: 2, index: r }); else { let u = -1; - for (; (u = s.data.indexOf(je, u + 1)) !== -1; ) - l.push({ type: 7, index: r }), u += je.length - 1; + for (; (u = s.data.indexOf(ei, u + 1)) !== -1; ) + l.push({ type: 7, index: r }), u += ei.length - 1; } r++; } } static createElement(t, e) { - const n = Tn.createElement("template"); + const n = Dn.createElement("template"); return n.innerHTML = t, n; } } -function zi(i, t, e = i, n) { +function ji(i, t, e = i, n) { var s, r, o, a; - if (t === yi) + if (t === Si) return t; let l = n !== void 0 ? (s = e._$Co) === null || s === void 0 ? void 0 : s[n] : e._$Cl; - const h = ms(t) ? void 0 : t._$litDirective$; - return (l == null ? void 0 : l.constructor) !== h && ((r = l == null ? void 0 : l._$AO) === null || r === void 0 || r.call(l, !1), h === void 0 ? l = void 0 : (l = new h(i), l._$AT(i, e, n)), n !== void 0 ? ((o = (a = e)._$Co) !== null && o !== void 0 ? o : a._$Co = [])[n] = l : e._$Cl = l), l !== void 0 && (t = zi(i, l._$AS(i, t.values), l, n)), t; + const h = ws(t) ? void 0 : t._$litDirective$; + return (l == null ? void 0 : l.constructor) !== h && ((r = l == null ? void 0 : l._$AO) === null || r === void 0 || r.call(l, !1), h === void 0 ? l = void 0 : (l = new h(i), l._$AT(i, e, n)), n !== void 0 ? ((o = (a = e)._$Co) !== null && o !== void 0 ? o : a._$Co = [])[n] = l : e._$Cl = l), l !== void 0 && (t = ji(i, l._$AS(i, t.values), l, n)), t; } -class hu { +class du { constructor(t, e) { this.u = [], this._$AN = void 0, this._$AD = t, this._$AM = e; } @@ -346,15 +342,15 @@ class hu { } v(t) { var e; - const { el: { content: n }, parts: s } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : Tn).importNode(n, !0); - wn.currentNode = r; - let o = wn.nextNode(), a = 0, l = 0, h = s[0]; + const { el: { content: n }, parts: s } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : Dn).importNode(n, !0); + An.currentNode = r; + let o = An.nextNode(), a = 0, l = 0, h = s[0]; for (; h !== void 0; ) { if (a === h.index) { let c; - h.type === 2 ? c = new Zn(o, o.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(o, h.name, h.strings, this, t) : h.type === 6 && (c = new fu(o, this, t)), this.u.push(c), h = s[++l]; + h.type === 2 ? c = new Kn(o, o.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(o, h.name, h.strings, this, t) : h.type === 6 && (c = new pu(o, this, t)), this.u.push(c), h = s[++l]; } - a !== (h == null ? void 0 : h.index) && (o = wn.nextNode(), a++); + a !== (h == null ? void 0 : h.index) && (o = An.nextNode(), a++); } return r; } @@ -364,7 +360,7 @@ class hu { n !== void 0 && (n.strings !== void 0 ? (n._$AI(t, n, e), e += n.strings.length - 2) : n._$AI(t[e])), e++; } } -class Zn { +class Kn { constructor(t, e, n, s) { var r; this.type = 2, this._$AH = bt, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = n, this.options = s, this._$Cm = (r = s == null ? void 0 : s.isConnected) === null || r === void 0 || r; @@ -376,7 +372,7 @@ class Zn { get parentNode() { let t = this._$AA.parentNode; const e = this._$AM; - return e !== void 0 && t.nodeType === 11 && (t = e.parentNode), t; + return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t; } get startNode() { return this._$AA; @@ -385,37 +381,37 @@ class Zn { return this._$AB; } _$AI(t, e = this) { - t = zi(this, t, e), ms(t) ? t === bt || t == null || t === "" ? (this._$AH !== bt && this._$AR(), this._$AH = bt) : t !== this._$AH && t !== yi && this.g(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : ou(t) ? this.k(t) : this.g(t); + t = ji(this, t, e), ws(t) ? t === bt || t == null || t === "" ? (this._$AH !== bt && this._$AR(), this._$AH = bt) : t !== this._$AH && t !== Si && this.g(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : hu(t) ? this.k(t) : this.g(t); } - O(t, e = this._$AB) { - return this._$AA.parentNode.insertBefore(t, e); + S(t) { + return this._$AA.parentNode.insertBefore(t, this._$AB); } T(t) { - this._$AH !== t && (this._$AR(), this._$AH = this.O(t)); + this._$AH !== t && (this._$AR(), this._$AH = this.S(t)); } g(t) { - this._$AH !== bt && ms(this._$AH) ? this._$AA.nextSibling.data = t : this.T(Tn.createTextNode(t)), this._$AH = t; + this._$AH !== bt && ws(this._$AH) ? this._$AA.nextSibling.data = t : this.T(Dn.createTextNode(t)), this._$AH = t; } $(t) { var e; - const { values: n, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = _s.createElement(s.h, this.options)), s); + const { values: n, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = Ss.createElement(s.h, this.options)), s); if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === r) this._$AH.p(n); else { - const o = new hu(r, this), a = o.v(this.options); + const o = new du(r, this), a = o.v(this.options); o.p(n), this.T(a), this._$AH = o; } } _$AC(t) { - let e = ah.get(t.strings); - return e === void 0 && ah.set(t.strings, e = new _s(t)), e; + let e = uh.get(t.strings); + return e === void 0 && uh.set(t.strings, e = new Ss(t)), e; } k(t) { - ru(this._$AH) || (this._$AH = [], this._$AR()); + lu(this._$AH) || (this._$AH = [], this._$AR()); const e = this._$AH; let n, s = 0; for (const r of t) - s === e.length ? e.push(n = new Zn(this.O(gs()), this.O(gs()), this, this.options)) : n = e[s], n._$AI(r), s++; + s === e.length ? e.push(n = new Kn(this.S(Es()), this.S(Es()), this, this.options)) : n = e[s], n._$AI(r), s++; s < e.length && (this._$AR(n && n._$AB.nextSibling, s), e.length = s); } _$AR(t = this._$AA.nextSibling, e) { @@ -430,7 +426,7 @@ class Zn { this._$AM === void 0 && (this._$Cm = t, (e = this._$AP) === null || e === void 0 || e.call(this, t)); } } -class Fs { +class Zs { constructor(t, e, n, s, r) { this.type = 1, this._$AH = bt, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = r, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(new String()), this.strings = n) : this._$AH = bt; } @@ -444,12 +440,12 @@ class Fs { const r = this.strings; let o = !1; if (r === void 0) - t = zi(this, t, e, 0), o = !ms(t) || t !== this._$AH && t !== yi, o && (this._$AH = t); + t = ji(this, t, e, 0), o = !ws(t) || t !== this._$AH && t !== Si, o && (this._$AH = t); else { const a = t; let l, h; for (t = r[0], l = 0; l < r.length - 1; l++) - h = zi(this, a[n + l], e, l), h === yi && (h = this._$AH[l]), o || (o = !ms(h) || h !== this._$AH[l]), h === bt ? t = bt : t !== bt && (t += (h != null ? h : "") + r[l + 1]), this._$AH[l] = h; + h = ji(this, a[n + l], e, l), h === Si && (h = this._$AH[l]), o || (o = !ws(h) || h !== this._$AH[l]), h === bt ? t = bt : t !== bt && (t += (h != null ? h : "") + r[l + 1]), this._$AH[l] = h; } o && !s && this.j(t); } @@ -457,7 +453,7 @@ class Fs { t === bt ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t != null ? t : ""); } } -class cu extends Fs { +class fu extends Zs { constructor() { super(...arguments), this.type = 3; } @@ -465,22 +461,22 @@ class cu extends Fs { this.element[this.name] = t === bt ? void 0 : t; } } -const Yf = Ln ? Ln.emptyScript : ""; -class uu extends Fs { +const Vf = Fn ? Fn.emptyScript : ""; +class gu extends Zs { constructor() { super(...arguments), this.type = 4; } j(t) { - t && t !== bt ? this.element.setAttribute(this.name, Yf) : this.element.removeAttribute(this.name); + t && t !== bt ? this.element.setAttribute(this.name, Vf) : this.element.removeAttribute(this.name); } } -class du extends Fs { +class mu extends Zs { constructor(t, e, n, s, r) { super(t, e, n, s, r), this.type = 5; } _$AI(t, e = this) { var n; - if ((t = (n = zi(this, t, e, 0)) !== null && n !== void 0 ? n : bt) === yi) + if ((t = (n = ji(this, t, e, 0)) !== null && n !== void 0 ? n : bt) === Si) return; const s = this._$AH, r = t === bt && s !== bt || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== bt && (s === bt || r); r && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t; @@ -490,7 +486,7 @@ class du extends Fs { typeof this._$AH == "function" ? this._$AH.call((n = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && n !== void 0 ? n : this.element, t) : this._$AH.handleEvent(t); } } -class fu { +class pu { constructor(t, e, n) { this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = n; } @@ -498,18 +494,18 @@ class fu { return this._$AM._$AU; } _$AI(t) { - zi(this, t); + ji(this, t); } } -const jf = { P: "$lit$", A: je, M: Ua, C: 1, L: lu, R: hu, D: ou, V: zi, I: Zn, H: Fs, N: uu, U: du, B: cu, F: fu }, lh = Pr.litHtmlPolyfillSupport; -lh == null || lh(_s, Zn), ((No = Pr.litHtmlVersions) !== null && No !== void 0 ? No : Pr.litHtmlVersions = []).push("2.5.0"); -const gu = (i, t, e) => { +const Wf = { P: kr, A: ei, M: Xa, C: 1, L: uu, D: du, R: hu, V: ji, I: Kn, H: Zs, N: gu, U: mu, F: fu, B: pu }, dh = Dr.litHtmlPolyfillSupport; +dh == null || dh(Ss, Kn), ((Bo = Dr.litHtmlVersions) !== null && Bo !== void 0 ? Bo : Dr.litHtmlVersions = []).push("2.7.0"); +const _u = (i, t, e) => { var n, s; const r = (n = e == null ? void 0 : e.renderBefore) !== null && n !== void 0 ? n : t; let o = r._$litPart$; if (o === void 0) { const a = (s = e == null ? void 0 : e.renderBefore) !== null && s !== void 0 ? s : null; - r._$litPart$ = o = new Zn(t.insertBefore(gs(), a), a, void 0, e != null ? e : {}); + r._$litPart$ = o = new Kn(t.insertBefore(Es(), a), a, void 0, e != null ? e : {}); } return o._$AI(i), o; }; @@ -518,8 +514,8 @@ const gu = (i, t, e) => { * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var Fo, Do; -class At extends dn { +var Zo, Uo; +class Pt extends vn { constructor() { super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; } @@ -530,7 +526,7 @@ class At extends dn { } update(t) { const e = this.render(); - this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = gu(e, this.renderRoot, this.renderOptions); + this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = _u(e, this.renderRoot, this.renderOptions); } connectedCallback() { var t; @@ -541,19 +537,19 @@ class At extends dn { super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1); } render() { - return yi; + return Si; } } -At.finalized = !0, At._$litElement$ = !0, (Fo = globalThis.litElementHydrateSupport) === null || Fo === void 0 || Fo.call(globalThis, { LitElement: At }); -const hh = globalThis.litElementPolyfillSupport; -hh == null || hh({ LitElement: At }); -((Do = globalThis.litElementVersions) !== null && Do !== void 0 ? Do : globalThis.litElementVersions = []).push("3.2.2"); +Pt.finalized = !0, Pt._$litElement$ = !0, (Zo = globalThis.litElementHydrateSupport) === null || Zo === void 0 || Zo.call(globalThis, { LitElement: Pt }); +const fh = globalThis.litElementPolyfillSupport; +fh == null || fh({ LitElement: Pt }); +((Uo = globalThis.litElementVersions) !== null && Uo !== void 0 ? Uo : globalThis.litElementVersions = []).push("3.3.0"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Xt = (i) => (t) => typeof t == "function" ? ((e, n) => (customElements.define(e, n), n))(i, t) : ((e, n) => { +const qt = (i) => (t) => typeof t == "function" ? ((e, n) => (customElements.define(e, n), n))(i, t) : ((e, n) => { const { kind: s, elements: r } = n; return { kind: s, elements: r, finisher(o) { customElements.define(e, o); @@ -564,32 +560,32 @@ const Xt = (i) => (t) => typeof t == "function" ? ((e, n) => (customElements.def * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Kf = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) { +const Hf = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) { e.createProperty(t.key, i); } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() { typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this)); }, finisher(e) { e.createProperty(t.key, i); } }; -function ji(i) { +function Te(i) { return (t, e) => e !== void 0 ? ((n, s, r) => { s.constructor.createProperty(r, n); - })(i, t, e) : Kf(i, t); + })(i, t, e) : Hf(i, t); } /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -function Yt(i) { - return ji({ ...i, state: !0 }); +function It(i) { + return Te({ ...i, state: !0 }); } /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const qf = ({ finisher: i, descriptor: t }) => (e, n) => { +const Xf = ({ finisher: i, descriptor: t }) => (e, n) => { var s; if (n === void 0) { const r = (s = e.originalKey) !== null && s !== void 0 ? s : e.key, o = t != null ? { kind: "method", placement: "prototype", key: r, descriptor: t(e.key) } : { ...e, key: r }; @@ -607,8 +603,8 @@ const qf = ({ finisher: i, descriptor: t }) => (e, n) => { * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -function mu(i, t) { - return qf({ descriptor: (e) => { +function Ya(i, t) { + return Xf({ descriptor: (e) => { const n = { get() { var s, r; return (r = (s = this.renderRoot) === null || s === void 0 ? void 0 : s.querySelector(i)) !== null && r !== void 0 ? r : null; @@ -628,9 +624,9 @@ function mu(i, t) { * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var ko; -((ko = window.HTMLSlotElement) === null || ko === void 0 ? void 0 : ko.prototype.assignedElements) != null; -class Jf { +var Vo; +((Vo = window.HTMLSlotElement) === null || Vo === void 0 ? void 0 : Vo.prototype.assignedElements) != null; +class Yf { constructor(t) { this.propagationStopped, this.defaultPrevented, this.type = t, this.target = null; } @@ -641,10 +637,10 @@ class Jf { this.propagationStopped = !0; } } -const ke = Jf, In = { +const ze = Yf, kn = { PROPERTYCHANGE: "propertychange" }; -class Qf { +class jf { constructor() { this.disposed = !1; } @@ -654,19 +650,19 @@ class Qf { disposeInternal() { } } -const Va = Qf; -function t0(i, t, e) { +const ja = jf; +function Kf(i, t, e) { let n, s; - e = e || Zi; + e = e || Ki; let r = 0, o = i.length, a = !1; for (; r < o; ) n = r + (o - r >> 1), s = +e(i[n], t), s < 0 ? r = n + 1 : (o = n, a = !s); return a ? r : ~r; } -function Zi(i, t) { +function Ki(i, t) { return i > t ? 1 : i < t ? -1 : 0; } -function Wa(i, t, e) { +function Ka(i, t, e) { const n = i.length; if (i[0] <= t) return 0; @@ -692,18 +688,18 @@ function Wa(i, t, e) { return n - 1; } } -function e0(i, t, e) { +function qf(i, t, e) { for (; t < e; ) { const n = i[t]; i[t] = i[e], i[e] = n, ++t, --e; } } -function Ht(i, t) { +function Kt(i, t) { const e = Array.isArray(t) ? t : [t], n = e.length; for (let s = 0; s < n; s++) i[i.length] = e[s]; } -function Ki(i, t) { +function sn(i, t) { const e = i.length; if (e !== t.length) return !1; @@ -712,8 +708,8 @@ function Ki(i, t) { return !1; return !0; } -function i0(i, t, e) { - const n = t || Zi; +function Jf(i, t, e) { + const n = t || Ki; return i.every(function(s, r) { if (r === 0) return !0; @@ -721,32 +717,32 @@ function i0(i, t, e) { return !(o > 0 || e && o === 0); }); } -function ps() { +function Rs() { return !0; } -function no() { +function ho() { return !1; } -function Ui() { +function qi() { } -function n0(i) { +function Qf(i) { let t = !1, e, n, s; return function() { const r = Array.prototype.slice.call(arguments); - return (!t || this !== s || !Ki(r, n)) && (t = !0, s = this, n = r, e = i.apply(this, arguments)), e; + return (!t || this !== s || !sn(r, n)) && (t = !0, s = this, n = r, e = i.apply(this, arguments)), e; }; } -function Ds(i) { +function Us(i) { for (const t in i) delete i[t]; } -function An(i) { +function Gn(i) { let t; for (t in i) return !1; return !t; } -class s0 extends Va { +class t0 extends ja { constructor(t) { super(), this.eventTarget_ = t, this.pendingRemovals_ = null, this.dispatching_ = null, this.listeners_ = null; } @@ -760,7 +756,7 @@ class s0 extends Va { const e = typeof t == "string", n = e ? t : t.type, s = this.listeners_ && this.listeners_[n]; if (!s) return; - const r = e ? new ke(t) : t; + const r = e ? new ze(t) : t; r.target || (r.target = this.eventTarget_ || this); const o = this.dispatching_ || (this.dispatching_ = {}), a = this.pendingRemovals_ || (this.pendingRemovals_ = {}); n in o || (o[n] = 0, a[n] = 0), ++o[n]; @@ -773,13 +769,13 @@ class s0 extends Va { if (--o[n] === 0) { let h = a[n]; for (delete a[n]; h--; ) - this.removeEventListener(n, Ui); + this.removeEventListener(n, qi); delete o[n]; } return l; } disposeInternal() { - this.listeners_ && Ds(this.listeners_); + this.listeners_ && Us(this.listeners_); } getListeners(t) { return this.listeners_ && this.listeners_[t] || void 0; @@ -791,11 +787,11 @@ class s0 extends Va { const n = this.listeners_ && this.listeners_[t]; if (n) { const s = n.indexOf(e); - s !== -1 && (this.pendingRemovals_ && t in this.pendingRemovals_ ? (n[s] = Ui, ++this.pendingRemovals_[t]) : (n.splice(s, 1), n.length === 0 && delete this.listeners_[t])); + s !== -1 && (this.pendingRemovals_ && t in this.pendingRemovals_ ? (n[s] = qi, ++this.pendingRemovals_[t]) : (n.splice(s, 1), n.length === 0 && delete this.listeners_[t])); } } } -const so = s0, X = { +const co = t0, H = { CHANGE: "change", ERROR: "error", BLUR: "blur", @@ -814,7 +810,7 @@ const so = s0, X = { TOUCHMOVE: "touchmove", WHEEL: "wheel" }; -function it(i, t, e, n, s) { +function et(i, t, e, n, s) { if (n && n !== i && (e = e.bind(n)), s) { const o = e; e = function() { @@ -828,18 +824,18 @@ function it(i, t, e, n, s) { }; return i.addEventListener(t, e), r; } -function Or(i, t, e, n) { - return it(i, t, e, n, !0); +function Gr(i, t, e, n) { + return et(i, t, e, n, !0); } function pt(i) { - i && i.target && (i.target.removeEventListener(i.type, i.listener), Ds(i)); + i && i.target && (i.target.removeEventListener(i.type, i.listener), Us(i)); } -class ro extends so { +class uo extends co { constructor() { super(), this.on = this.onInternal, this.once = this.onceInternal, this.un = this.unInternal, this.revision_ = 0; } changed() { - ++this.revision_, this.dispatchEvent(X.CHANGE); + ++this.revision_, this.dispatchEvent(H.CHANGE); } getRevision() { return this.revision_; @@ -848,10 +844,10 @@ class ro extends so { if (Array.isArray(t)) { const n = t.length, s = new Array(n); for (let r = 0; r < n; ++r) - s[r] = it(this, t[r], e); + s[r] = et(this, t[r], e); return s; } else - return it(this, t, e); + return et(this, t, e); } onceInternal(t, e) { let n; @@ -859,15 +855,15 @@ class ro extends so { const s = t.length; n = new Array(s); for (let r = 0; r < s; ++r) - n[r] = Or(this, t[r], e); + n[r] = Gr(this, t[r], e); } else - n = Or(this, t, e); + n = Gr(this, t, e); return e.ol_key = n, n; } unInternal(t, e) { const n = e.ol_key; if (n) - r0(n); + e0(n); else if (Array.isArray(t)) for (let s = 0, r = t.length; s < r; ++s) this.removeEventListener(t[s], e); @@ -875,30 +871,30 @@ class ro extends so { this.removeEventListener(t, e); } } -ro.prototype.on; -ro.prototype.once; -ro.prototype.un; -function r0(i) { +uo.prototype.on; +uo.prototype.once; +uo.prototype.un; +function e0(i) { if (Array.isArray(i)) for (let t = 0, e = i.length; t < e; ++t) pt(i[t]); else pt(i); } -const _u = ro; -function W() { +const yu = uo; +function V() { throw new Error("Unimplemented abstract method."); } -let o0 = 0; +let i0 = 0; function rt(i) { - return i.ol_uid || (i.ol_uid = String(++o0)); + return i.ol_uid || (i.ol_uid = String(++i0)); } -class ch extends ke { +class gh extends ze { constructor(t, e, n) { super(t), this.key = e, this.oldValue = n; } } -class a0 extends _u { +class n0 extends yu { constructor(t) { super(), this.on, this.once, this.un, rt(this), this.values_ = null, t !== void 0 && this.setProperties(t); } @@ -917,7 +913,7 @@ class a0 extends _u { } notify(t, e) { let n; - n = `change:${t}`, this.hasListener(n) && this.dispatchEvent(new ch(n, t, e)), n = In.PROPERTYCHANGE, this.hasListener(n) && this.dispatchEvent(new ch(n, t, e)); + n = `change:${t}`, this.hasListener(n) && this.dispatchEvent(new gh(n, t, e)), n = kn.PROPERTYCHANGE, this.hasListener(n) && this.dispatchEvent(new gh(n, t, e)); } addChangeListener(t, e) { this.addEventListener(`change:${t}`, e); @@ -944,11 +940,11 @@ class a0 extends _u { unset(t, e) { if (this.values_ && t in this.values_) { const n = this.values_[t]; - delete this.values_[t], An(this.values_) && (this.values_ = null), e || this.notify(t, n); + delete this.values_[t], Gn(this.values_) && (this.values_ = null), e || this.notify(t, n); } } } -const Se = a0, l0 = { +const Ce = n0, s0 = { 1: "The view center is not defined", 2: "The view resolution is not defined", 3: "The view rotation is not defined", @@ -1006,24 +1002,24 @@ const Se = a0, l0 = { 67: "A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both", 68: "A VectorTile source can only be rendered if it has a projection compatible with the view projection" }; -class h0 extends Error { +class r0 extends Error { constructor(t) { - const e = l0[t]; + const e = s0[t]; super(e), this.code = t, this.name = "AssertionError", this.message = e; } } -const pu = h0, Jt = { +const vu = r0, ee = { ADD: "add", REMOVE: "remove" -}, uh = { +}, mh = { LENGTH: "length" }; -class hr extends ke { +class fr extends ze { constructor(t, e, n) { super(t), this.element = e, this.index = n; } } -class c0 extends Se { +class o0 extends Ce { constructor(t, e) { if (super(), this.on, this.once, this.un, e = e || {}, this.unique_ = !!e.unique, this.array_ = t || [], this.unique_) for (let n = 0, s = this.array_.length; n < s; ++n) @@ -1051,13 +1047,13 @@ class c0 extends Se { return this.array_[t]; } getLength() { - return this.get(uh.LENGTH); + return this.get(mh.LENGTH); } insertAt(t, e) { if (t < 0 || t > this.getLength()) throw new Error("Index out of bounds: " + t); this.unique_ && this.assertUnique_(e), this.array_.splice(t, 0, e), this.updateLength_(), this.dispatchEvent( - new hr(Jt.ADD, e, t) + new fr(ee.ADD, e, t) ); } pop() { @@ -1079,7 +1075,7 @@ class c0 extends Se { return; const e = this.array_[t]; return this.array_.splice(t, 1), this.updateLength_(), this.dispatchEvent( - new hr(Jt.REMOVE, e, t) + new fr(ee.REMOVE, e, t) ), e; } setAt(t, e) { @@ -1093,23 +1089,23 @@ class c0 extends Se { this.unique_ && this.assertUnique_(e, t); const s = this.array_[t]; this.array_[t] = e, this.dispatchEvent( - new hr(Jt.REMOVE, s, t) + new fr(ee.REMOVE, s, t) ), this.dispatchEvent( - new hr(Jt.ADD, e, t) + new fr(ee.ADD, e, t) ); } updateLength_() { - this.set(uh.LENGTH, this.array_.length); + this.set(mh.LENGTH, this.array_.length); } assertUnique_(t, e) { for (let n = 0, s = this.array_.length; n < s; ++n) if (this.array_[n] === t && n !== e) - throw new pu(58); + throw new vu(58); } } -const Te = c0, vi = typeof navigator < "u" && typeof navigator.userAgent < "u" ? navigator.userAgent.toLowerCase() : "", u0 = vi.includes("firefox"), d0 = vi.includes("safari") && !vi.includes("chrom"); -d0 && (vi.includes("version/15.4") || /cpu (os|iphone os) 15_4 like mac os x/.test(vi)); -const f0 = vi.includes("webkit") && !vi.includes("edge"), g0 = vi.includes("macintosh"), yu = typeof devicePixelRatio < "u" ? devicePixelRatio : 1, Ha = typeof WorkerGlobalScope < "u" && typeof OffscreenCanvas < "u" && self instanceof WorkerGlobalScope, m0 = typeof Image < "u" && Image.prototype.decode, vu = function() { +const Oe = o0, Ri = typeof navigator < "u" && typeof navigator.userAgent < "u" ? navigator.userAgent.toLowerCase() : "", a0 = Ri.includes("firefox"), l0 = Ri.includes("safari") && !Ri.includes("chrom"); +l0 && (Ri.includes("version/15.4") || /cpu (os|iphone os) 15_4 like mac os x/.test(Ri)); +const h0 = Ri.includes("webkit") && !Ri.includes("edge"), c0 = Ri.includes("macintosh"), xu = typeof devicePixelRatio < "u" ? devicePixelRatio : 1, qa = typeof WorkerGlobalScope < "u" && typeof OffscreenCanvas < "u" && self instanceof WorkerGlobalScope, u0 = typeof Image < "u" && Image.prototype.decode, Cu = function() { let i = !1; try { const t = Object.defineProperty({}, "passive", { @@ -1122,49 +1118,53 @@ const f0 = vi.includes("webkit") && !vi.includes("edge"), g0 = vi.includes("maci } return i; }(); -function Y(i, t) { +function X(i, t) { if (!i) - throw new pu(t); + throw new vu(t); } new Array(6); -function Pe() { +function De() { return [1, 0, 0, 1, 0, 0]; } -function _0(i, t, e, n, s, r, o) { +function d0(i, t) { + const e = i[0], n = i[1], s = i[2], r = i[3], o = i[4], a = i[5], l = t[0], h = t[1], c = t[2], u = t[3], d = t[4], f = t[5]; + return i[0] = e * l + s * h, i[1] = n * l + r * h, i[2] = e * c + s * u, i[3] = n * c + r * u, i[4] = e * d + s * f + o, i[5] = n * d + r * f + a, i; +} +function f0(i, t, e, n, s, r, o) { return i[0] = t, i[1] = e, i[2] = n, i[3] = s, i[4] = r, i[5] = o, i; } -function p0(i, t) { +function g0(i, t) { return i[0] = t[0], i[1] = t[1], i[2] = t[2], i[3] = t[3], i[4] = t[4], i[5] = t[5], i; } -function Ft(i, t) { +function Dt(i, t) { const e = t[0], n = t[1]; return t[0] = i[0] * e + i[2] * n + i[4], t[1] = i[1] * e + i[3] * n + i[5], t; } -function y0(i, t, e) { - return _0(i, t, 0, 0, e, 0, 0); +function m0(i, t, e) { + return f0(i, t, 0, 0, e, 0, 0); } -function xi(i, t, e, n, s, r, o, a) { +function bi(i, t, e, n, s, r, o, a) { const l = Math.sin(r), h = Math.cos(r); return i[0] = n * h, i[1] = s * l, i[2] = -n * l, i[3] = s * h, i[4] = o * n * h - a * n * l + t, i[5] = o * s * l + a * s * h + e, i; } -function Xa(i, t) { - const e = v0(t); - Y(e !== 0, 32); +function Ja(i, t) { + const e = p0(t); + X(e !== 0, 32); const n = t[0], s = t[1], r = t[2], o = t[3], a = t[4], l = t[5]; return i[0] = o / e, i[1] = -s / e, i[2] = -r / e, i[3] = n / e, i[4] = (r * l - o * a) / e, i[5] = -(n * l - s * a) / e, i; } -function v0(i) { +function p0(i) { return i[0] * i[3] - i[1] * i[2]; } -let dh; -function xu(i) { +let ph; +function Mu(i) { const t = "matrix(" + i.join(", ") + ")"; - if (Ha) + if (qa) return t; - const e = dh || (dh = document.createElement("div")); + const e = ph || (ph = document.createElement("div")); return e.style.transform = t, e.style.transform; } -const Nt = { +const Ft = { UNKNOWN: 0, INTERSECTING: 1, ABOVE: 2, @@ -1172,17 +1172,17 @@ const Nt = { BELOW: 8, LEFT: 16 }; -function sa(i) { - const t = ue(); +function ca(i) { + const t = fe(); for (let e = 0, n = i.length; e < n; ++e) - hs(t, i[e]); + ys(t, i[e]); return t; } -function x0(i, t, e) { +function _0(i, t, e) { const n = Math.min.apply(null, i), s = Math.min.apply(null, t), r = Math.max.apply(null, i), o = Math.max.apply(null, t); - return ye(n, s, r, o, e); + return xe(n, s, r, o, e); } -function oo(i, t, e) { +function fo(i, t, e) { return e ? (e[0] = i[0] - t, e[1] = i[1] - t, e[2] = i[2] + t, e[3] = i[3] + t, e) : [ i[0] - t, i[1] - t, @@ -1190,90 +1190,90 @@ function oo(i, t, e) { i[3] + t ]; } -function Mu(i, t) { +function Eu(i, t) { return t ? (t[0] = i[0], t[1] = i[1], t[2] = i[2], t[3] = i[3], t) : i.slice(); } -function qi(i, t, e) { +function rn(i, t, e) { let n, s; return t < i[0] ? n = i[0] - t : i[2] < t ? n = t - i[2] : n = 0, e < i[1] ? s = i[1] - e : i[3] < e ? s = e - i[3] : s = 0, n * n + s * s; } -function ao(i, t) { - return Ya(i, t[0], t[1]); +function go(i, t) { + return Qa(i, t[0], t[1]); } -function Ii(i, t) { +function xi(i, t) { return i[0] <= t[0] && t[2] <= i[2] && i[1] <= t[1] && t[3] <= i[3]; } -function Ya(i, t, e) { +function Qa(i, t, e) { return i[0] <= t && t <= i[2] && i[1] <= e && e <= i[3]; } -function ra(i, t) { +function ua(i, t) { const e = i[0], n = i[1], s = i[2], r = i[3], o = t[0], a = t[1]; - let l = Nt.UNKNOWN; - return o < e ? l = l | Nt.LEFT : o > s && (l = l | Nt.RIGHT), a < n ? l = l | Nt.BELOW : a > r && (l = l | Nt.ABOVE), l === Nt.UNKNOWN && (l = Nt.INTERSECTING), l; + let l = Ft.UNKNOWN; + return o < e ? l = l | Ft.LEFT : o > s && (l = l | Ft.RIGHT), a < n ? l = l | Ft.BELOW : a > r && (l = l | Ft.ABOVE), l === Ft.UNKNOWN && (l = Ft.INTERSECTING), l; } -function ue() { +function fe() { return [1 / 0, 1 / 0, -1 / 0, -1 / 0]; } -function ye(i, t, e, n, s) { +function xe(i, t, e, n, s) { return s ? (s[0] = i, s[1] = t, s[2] = e, s[3] = n, s) : [i, t, e, n]; } -function ks(i) { - return ye(1 / 0, 1 / 0, -1 / 0, -1 / 0, i); +function Vs(i) { + return xe(1 / 0, 1 / 0, -1 / 0, -1 / 0, i); } -function Cu(i, t) { +function wu(i, t) { const e = i[0], n = i[1]; - return ye(e, n, e, n, t); + return xe(e, n, e, n, t); } -function Eu(i, t, e, n, s) { - const r = ks(s); - return Su(r, i, t, e, n); +function Su(i, t, e, n, s) { + const r = Vs(s); + return bu(r, i, t, e, n); } -function ys(i, t) { +function bs(i, t) { return i[0] == t[0] && i[2] == t[2] && i[1] == t[1] && i[3] == t[3]; } -function wu(i, t) { +function Ru(i, t) { return t[0] < i[0] && (i[0] = t[0]), t[2] > i[2] && (i[2] = t[2]), t[1] < i[1] && (i[1] = t[1]), t[3] > i[3] && (i[3] = t[3]), i; } -function hs(i, t) { +function ys(i, t) { t[0] < i[0] && (i[0] = t[0]), t[0] > i[2] && (i[2] = t[0]), t[1] < i[1] && (i[1] = t[1]), t[1] > i[3] && (i[3] = t[1]); } -function Su(i, t, e, n, s) { +function bu(i, t, e, n, s) { for (; e < n; e += s) - M0(i, t[e], t[e + 1]); + y0(i, t[e], t[e + 1]); return i; } -function M0(i, t, e) { +function y0(i, t, e) { i[0] = Math.min(i[0], t), i[1] = Math.min(i[1], e), i[2] = Math.max(i[2], t), i[3] = Math.max(i[3], e); } -function Ru(i, t) { +function Lu(i, t) { let e; - return e = t(lo(i)), e || (e = t(ho(i)), e) || (e = t(co(i)), e) || (e = t(Ji(i)), e) ? e : !1; + return e = t(mo(i)), e || (e = t(po(i)), e) || (e = t(_o(i)), e) || (e = t(Pi(i)), e) ? e : !1; } -function oa(i) { +function da(i) { let t = 0; - return ja(i) || (t = mt(i) * Ne(i)), t; + return tl(i) || (t = mt(i) * Ge(i)), t; } -function lo(i) { +function mo(i) { return [i[0], i[1]]; } -function ho(i) { +function po(i) { return [i[2], i[1]]; } -function Mi(i) { +function Li(i) { return [(i[0] + i[2]) / 2, (i[1] + i[3]) / 2]; } -function C0(i, t) { +function v0(i, t) { let e; - return t === "bottom-left" ? e = lo(i) : t === "bottom-right" ? e = ho(i) : t === "top-left" ? e = Ji(i) : t === "top-right" ? e = co(i) : Y(!1, 13), e; + return t === "bottom-left" ? e = mo(i) : t === "bottom-right" ? e = po(i) : t === "top-left" ? e = Pi(i) : t === "top-right" ? e = _o(i) : X(!1, 13), e; } -function aa(i, t, e, n, s) { - const [r, o, a, l, h, c, u, d] = la( +function fa(i, t, e, n, s) { + const [r, o, a, l, h, c, u, d] = ga( i, t, e, n ); - return ye( + return xe( Math.min(r, a, h, u), Math.min(o, l, c, d), Math.max(r, a, h, u), @@ -1281,7 +1281,7 @@ function aa(i, t, e, n, s) { s ); } -function la(i, t, e, n) { +function ga(i, t, e, n) { const s = t * n[0] / 2, r = t * n[1] / 2, o = Math.cos(e), a = Math.sin(e), l = s * o, h = s * a, c = r * o, u = r * a, d = i[0], f = i[1]; return [ d - l + u, @@ -1296,44 +1296,44 @@ function la(i, t, e, n) { f - h - c ]; } -function Ne(i) { +function Ge(i) { return i[3] - i[1]; } -function cs(i, t, e) { - const n = e || ue(); - return Qt(i, t) ? (i[0] > t[0] ? n[0] = i[0] : n[0] = t[0], i[1] > t[1] ? n[1] = i[1] : n[1] = t[1], i[2] < t[2] ? n[2] = i[2] : n[2] = t[2], i[3] < t[3] ? n[3] = i[3] : n[3] = t[3]) : ks(n), n; +function vs(i, t, e) { + const n = e || fe(); + return ie(i, t) ? (i[0] > t[0] ? n[0] = i[0] : n[0] = t[0], i[1] > t[1] ? n[1] = i[1] : n[1] = t[1], i[2] < t[2] ? n[2] = i[2] : n[2] = t[2], i[3] < t[3] ? n[3] = i[3] : n[3] = t[3]) : Vs(n), n; } -function Ji(i) { +function Pi(i) { return [i[0], i[3]]; } -function co(i) { +function _o(i) { return [i[2], i[3]]; } function mt(i) { return i[2] - i[0]; } -function Qt(i, t) { +function ie(i, t) { return i[0] <= t[2] && i[2] >= t[0] && i[1] <= t[3] && i[3] >= t[1]; } -function ja(i) { +function tl(i) { return i[2] < i[0] || i[3] < i[1]; } -function E0(i, t) { +function x0(i, t) { return t ? (t[0] = i[0], t[1] = i[1], t[2] = i[2], t[3] = i[3], t) : i; } -function w0(i, t, e) { +function C0(i, t, e) { let n = !1; - const s = ra(i, t), r = ra(i, e); - if (s === Nt.INTERSECTING || r === Nt.INTERSECTING) + const s = ua(i, t), r = ua(i, e); + if (s === Ft.INTERSECTING || r === Ft.INTERSECTING) n = !0; else { const o = i[0], a = i[1], l = i[2], h = i[3], c = t[0], u = t[1], d = e[0], f = e[1], g = (f - u) / (d - c); - let m, _; - !!(r & Nt.ABOVE) && !(s & Nt.ABOVE) && (m = d - (f - h) / g, n = m >= o && m <= l), !n && !!(r & Nt.RIGHT) && !(s & Nt.RIGHT) && (_ = f - (d - l) * g, n = _ >= a && _ <= h), !n && !!(r & Nt.BELOW) && !(s & Nt.BELOW) && (m = d - (f - a) / g, n = m >= o && m <= l), !n && !!(r & Nt.LEFT) && !(s & Nt.LEFT) && (_ = f - (d - o) * g, n = _ >= a && _ <= h); + let m, p; + !!(r & Ft.ABOVE) && !(s & Ft.ABOVE) && (m = d - (f - h) / g, n = m >= o && m <= l), !n && !!(r & Ft.RIGHT) && !(s & Ft.RIGHT) && (p = f - (d - l) * g, n = p >= a && p <= h), !n && !!(r & Ft.BELOW) && !(s & Ft.BELOW) && (m = d - (f - a) / g, n = m >= o && m <= l), !n && !!(r & Ft.LEFT) && !(s & Ft.LEFT) && (p = f - (d - o) * g, n = p >= a && p <= h); } return n; } -function S0(i, t, e, n) { +function M0(i, t, e, n) { let s = []; if (n > 1) { const a = i[2] - i[0], l = i[3] - i[1]; @@ -1363,10 +1363,10 @@ function S0(i, t, e, n) { const r = [], o = []; for (let a = 0, l = s.length; a < l; a += 2) r.push(s[a]), o.push(s[a + 1]); - return x0(r, o, e); + return _0(r, o, e); } -function bu(i, t) { - const e = t.getExtent(), n = Mi(i); +function Tu(i, t) { + const e = t.getExtent(), n = Li(i); if (t.canWrapX() && (n[0] < e[0] || n[0] >= e[2])) { const s = mt(e), o = Math.floor( (n[0] - e[0]) / s @@ -1375,12 +1375,12 @@ function bu(i, t) { } return i; } -function R0(i, t) { +function E0(i, t) { if (t.canWrapX()) { const e = t.getExtent(); if (!isFinite(i[0]) || !isFinite(i[2])) return [[e[0], i[1], e[2], i[3]]]; - bu(i, t); + Tu(i, t); const n = mt(e); if (mt(i) > n) return [[e[0], i[1], e[2], i[3]]]; @@ -1400,19 +1400,19 @@ function R0(i, t) { function wt(i, t, e) { return Math.min(Math.max(i, t), e); } -function b0(i, t, e, n, s, r) { +function w0(i, t, e, n, s, r) { const o = s - e, a = r - n; if (o !== 0 || a !== 0) { const l = ((i - e) * o + (t - n) * a) / (o * o + a * a); l > 1 ? (e = s, n = r) : l > 0 && (e += o * l, n += a * l); } - return ki(i, t, e, n); + return Wi(i, t, e, n); } -function ki(i, t, e, n) { +function Wi(i, t, e, n) { const s = e - i, r = n - t; return s * s + r * r; } -function L0(i) { +function S0(i) { const t = i.length; for (let n = 0; n < t; n++) { let s = n, r = Math.abs(i[n][n]); @@ -1438,34 +1438,34 @@ function L0(i) { } return e; } -function fh(i) { +function _h(i) { return i * 180 / Math.PI; } -function Gi(i) { +function Hi(i) { return i * Math.PI / 180; } -function Sn(i, t) { +function Pn(i, t) { const e = i % t; return e * t < 0 ? e + t : e; } -function Ye(i, t, e) { +function ti(i, t, e) { return i + e * (t - i); } -function Lu(i, t) { +function Iu(i, t) { const e = Math.pow(10, t); return Math.round(i * e) / e; } -function cr(i, t) { - return Math.floor(Lu(i, t)); +function gr(i, t) { + return Math.floor(Iu(i, t)); } -function ur(i, t) { - return Math.ceil(Lu(i, t)); +function mr(i, t) { + return Math.ceil(Iu(i, t)); } -const T0 = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i, I0 = /^([a-z]*)$|^hsla?\(.*\)$/i; -function Tu(i) { - return typeof i == "string" ? i : Iu(i); +const R0 = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i, b0 = /^([a-z]*)$|^hsla?\(.*\)$/i; +function Au(i) { + return typeof i == "string" ? i : Pu(i); } -function A0(i) { +function L0(i) { const t = document.createElement("div"); if (t.style.color = i, t.style.color !== "") { document.body.appendChild(t); @@ -1474,7 +1474,7 @@ function A0(i) { } else return ""; } -const P0 = function() { +const T0 = function() { const t = {}; let e = 0; return function(n) { @@ -1487,30 +1487,30 @@ const P0 = function() { for (const o in t) (r++ & 3) === 0 && (delete t[o], --e); } - s = O0(n), t[n] = s, ++e; + s = I0(n), t[n] = s, ++e; } return s; }; }(); -function Nr(i) { - return Array.isArray(i) ? i : P0(i); +function $r(i) { + return Array.isArray(i) ? i : T0(i); } -function O0(i) { +function I0(i) { let t, e, n, s, r; - if (I0.exec(i) && (i = A0(i)), T0.exec(i)) { + if (b0.exec(i) && (i = L0(i)), R0.exec(i)) { const o = i.length - 1; let a; o <= 4 ? a = 1 : a = 2; const l = o === 4 || o === 8; t = parseInt(i.substr(1 + 0 * a, a), 16), e = parseInt(i.substr(1 + 1 * a, a), 16), n = parseInt(i.substr(1 + 2 * a, a), 16), l ? s = parseInt(i.substr(1 + 3 * a, a), 16) : s = 255, a == 1 && (t = (t << 4) + t, e = (e << 4) + e, n = (n << 4) + n, l && (s = (s << 4) + s)), r = [t, e, n, s / 255]; } else - i.startsWith("rgba(") ? (r = i.slice(5, -1).split(",").map(Number), gh(r)) : i.startsWith("rgb(") ? (r = i.slice(4, -1).split(",").map(Number), r.push(1), gh(r)) : Y(!1, 14); + i.startsWith("rgba(") ? (r = i.slice(5, -1).split(",").map(Number), yh(r)) : i.startsWith("rgb(") ? (r = i.slice(4, -1).split(",").map(Number), r.push(1), yh(r)) : X(!1, 14); return r; } -function gh(i) { +function yh(i) { return i[0] = wt(i[0] + 0.5 | 0, 0, 255), i[1] = wt(i[1] + 0.5 | 0, 0, 255), i[2] = wt(i[2] + 0.5 | 0, 0, 255), i[3] = wt(i[3], 0, 1), i; } -function Iu(i) { +function Pu(i) { let t = i[0]; t != (t | 0) && (t = t + 0.5 | 0); let e = i[1]; @@ -1520,7 +1520,7 @@ function Iu(i) { const s = i[3] === void 0 ? 1 : Math.round(i[3] * 100) / 100; return "rgba(" + t + "," + e + "," + n + "," + s + ")"; } -class N0 { +class A0 { constructor() { this.cache_ = {}, this.cacheSize_ = 0, this.maxCacheSize_ = 32; } @@ -1540,22 +1540,22 @@ class N0 { } } get(t, e, n) { - const s = mh(t, e, n); + const s = vh(t, e, n); return s in this.cache_ ? this.cache_[s] : null; } set(t, e, n, s) { - const r = mh(t, e, n); + const r = vh(t, e, n); this.cache_[r] = s, ++this.cacheSize_; } setSize(t) { this.maxCacheSize_ = t, this.expire(); } } -function mh(i, t, e) { - const n = e ? Tu(e) : "null"; +function vh(i, t, e) { + const n = e ? Au(e) : "null"; return t + ":" + i + ":" + n; } -const Fr = new N0(), dt = { +const Br = new A0(), ut = { OPACITY: "opacity", VISIBLE: "visible", EXTENT: "extent", @@ -1567,11 +1567,11 @@ const Fr = new N0(), dt = { SOURCE: "source", MAP: "map" }; -class F0 extends Se { +class P0 extends Ce { constructor(t) { super(), this.on, this.once, this.un, this.background_ = t.background; const e = Object.assign({}, t); - typeof t.properties == "object" && (delete e.properties, Object.assign(e, t.properties)), e[dt.OPACITY] = t.opacity !== void 0 ? t.opacity : 1, Y(typeof e[dt.OPACITY] == "number", 64), e[dt.VISIBLE] = t.visible !== void 0 ? t.visible : !0, e[dt.Z_INDEX] = t.zIndex, e[dt.MAX_RESOLUTION] = t.maxResolution !== void 0 ? t.maxResolution : 1 / 0, e[dt.MIN_RESOLUTION] = t.minResolution !== void 0 ? t.minResolution : 0, e[dt.MIN_ZOOM] = t.minZoom !== void 0 ? t.minZoom : -1 / 0, e[dt.MAX_ZOOM] = t.maxZoom !== void 0 ? t.maxZoom : 1 / 0, this.className_ = e.className !== void 0 ? e.className : "ol-layer", delete e.className, this.setProperties(e), this.state_ = null; + typeof t.properties == "object" && (delete e.properties, Object.assign(e, t.properties)), e[ut.OPACITY] = t.opacity !== void 0 ? t.opacity : 1, X(typeof e[ut.OPACITY] == "number", 64), e[ut.VISIBLE] = t.visible !== void 0 ? t.visible : !0, e[ut.Z_INDEX] = t.zIndex, e[ut.MAX_RESOLUTION] = t.maxResolution !== void 0 ? t.maxResolution : 1 / 0, e[ut.MIN_RESOLUTION] = t.minResolution !== void 0 ? t.minResolution : 0, e[ut.MIN_ZOOM] = t.minZoom !== void 0 ? t.minZoom : -1 / 0, e[ut.MAX_ZOOM] = t.maxZoom !== void 0 ? t.maxZoom : 1 / 0, this.className_ = e.className !== void 0 ? e.className : "ol-layer", delete e.className, this.setProperties(e), this.state_ = null; } getBackground() { return this.background_; @@ -1587,81 +1587,81 @@ class F0 extends Se { return e.opacity = wt(Math.round(this.getOpacity() * 100) / 100, 0, 1), e.visible = this.getVisible(), e.extent = this.getExtent(), e.zIndex = n === void 0 && !e.managed ? 1 / 0 : n, e.maxResolution = this.getMaxResolution(), e.minResolution = Math.max(this.getMinResolution(), 0), e.minZoom = this.getMinZoom(), e.maxZoom = this.getMaxZoom(), this.state_ = e, e; } getLayersArray(t) { - return W(); + return V(); } getLayerStatesArray(t) { - return W(); + return V(); } getExtent() { - return this.get(dt.EXTENT); + return this.get(ut.EXTENT); } getMaxResolution() { - return this.get(dt.MAX_RESOLUTION); + return this.get(ut.MAX_RESOLUTION); } getMinResolution() { - return this.get(dt.MIN_RESOLUTION); + return this.get(ut.MIN_RESOLUTION); } getMinZoom() { - return this.get(dt.MIN_ZOOM); + return this.get(ut.MIN_ZOOM); } getMaxZoom() { - return this.get(dt.MAX_ZOOM); + return this.get(ut.MAX_ZOOM); } getOpacity() { - return this.get(dt.OPACITY); + return this.get(ut.OPACITY); } getSourceState() { - return W(); + return V(); } getVisible() { - return this.get(dt.VISIBLE); + return this.get(ut.VISIBLE); } getZIndex() { - return this.get(dt.Z_INDEX); + return this.get(ut.Z_INDEX); } setBackground(t) { this.background_ = t, this.changed(); } setExtent(t) { - this.set(dt.EXTENT, t); + this.set(ut.EXTENT, t); } setMaxResolution(t) { - this.set(dt.MAX_RESOLUTION, t); + this.set(ut.MAX_RESOLUTION, t); } setMinResolution(t) { - this.set(dt.MIN_RESOLUTION, t); + this.set(ut.MIN_RESOLUTION, t); } setMaxZoom(t) { - this.set(dt.MAX_ZOOM, t); + this.set(ut.MAX_ZOOM, t); } setMinZoom(t) { - this.set(dt.MIN_ZOOM, t); + this.set(ut.MIN_ZOOM, t); } setOpacity(t) { - Y(typeof t == "number", 64), this.set(dt.OPACITY, t); + X(typeof t == "number", 64), this.set(ut.OPACITY, t); } setVisible(t) { - this.set(dt.VISIBLE, t); + this.set(ut.VISIBLE, t); } setZIndex(t) { - this.set(dt.Z_INDEX, t); + this.set(ut.Z_INDEX, t); } disposeInternal() { this.state_ && (this.state_.layer = null, this.state_ = null), super.disposeInternal(); } } -const Au = F0, _i = { +const Ou = P0, Ei = { PRERENDER: "prerender", POSTRENDER: "postrender", PRECOMPOSE: "precompose", POSTCOMPOSE: "postcompose", RENDERCOMPLETE: "rendercomplete" }; -class D0 extends Au { +class O0 extends Ou { constructor(t) { const e = Object.assign({}, t); delete e.source, super(e), this.on, this.once, this.un, this.mapPrecomposeKey_ = null, this.mapRenderKey_ = null, this.sourceChangeKey_ = null, this.renderer_ = null, this.rendered = !1, t.render && (this.render = t.render), t.map && this.setMap(t.map), this.addChangeListener( - dt.SOURCE, + ut.SOURCE, this.handleSourcePropertyChange_ ); const n = t.source ? t.source : null; @@ -1674,7 +1674,7 @@ class D0 extends Au { return t = t || [], t.push(this.getLayerState()), t; } getSource() { - return this.get(dt.SOURCE) || null; + return this.get(ut.SOURCE) || null; } getRenderSource() { return this.getSource(); @@ -1689,9 +1689,9 @@ class D0 extends Au { handleSourcePropertyChange_() { this.sourceChangeKey_ && (pt(this.sourceChangeKey_), this.sourceChangeKey_ = null); const t = this.getSource(); - t && (this.sourceChangeKey_ = it( + t && (this.sourceChangeKey_ = et( t, - X.CHANGE, + H.CHANGE, this.handleSourceChange_, this )), this.changed(); @@ -1711,18 +1711,18 @@ class D0 extends Au { this.rendered = !1; } setMapInternal(t) { - t || this.unrender(), this.set(dt.MAP, t); + t || this.unrender(), this.set(ut.MAP, t); } getMapInternal() { - return this.get(dt.MAP); + return this.get(ut.MAP); } setMap(t) { - this.mapPrecomposeKey_ && (pt(this.mapPrecomposeKey_), this.mapPrecomposeKey_ = null), t || this.changed(), this.mapRenderKey_ && (pt(this.mapRenderKey_), this.mapRenderKey_ = null), t && (this.mapPrecomposeKey_ = it( + this.mapPrecomposeKey_ && (pt(this.mapPrecomposeKey_), this.mapPrecomposeKey_ = null), t || this.changed(), this.mapRenderKey_ && (pt(this.mapRenderKey_), this.mapRenderKey_ = null), t && (this.mapPrecomposeKey_ = et( t, - _i.PRECOMPOSE, + Ei.PRECOMPOSE, function(e) { const s = e.frameState.layerStatesArray, r = this.getLayerState(!1); - Y( + X( !s.some(function(o) { return o.layer === r.layer; }), @@ -1730,10 +1730,10 @@ class D0 extends Au { ), s.push(r); }, this - ), this.mapRenderKey_ = it(this, X.CHANGE, t.render, t), this.changed()); + ), this.mapRenderKey_ = et(this, H.CHANGE, t.render, t), this.changed()); } setSource(t) { - this.set(dt.SOURCE, t); + this.set(ut.SOURCE, t); } getRenderer() { return this.renderer_ || (this.renderer_ = this.createRenderer()), this.renderer_; @@ -1748,7 +1748,7 @@ class D0 extends Au { this.renderer_ && (this.renderer_.dispose(), delete this.renderer_), this.setSource(null), super.disposeInternal(); } } -function Ka(i, t) { +function el(i, t) { if (!i.visible) return !1; const e = t.resolution; @@ -1757,11 +1757,11 @@ function Ka(i, t) { const n = t.zoom; return n > i.minZoom && n <= i.maxZoom; } -const uo = D0; -function Pu(i, t) { +const yo = O0; +function Nu(i, t) { return i[0] += +t[0], i[1] += +t[1], i; } -function Dr(i, t) { +function zr(i, t) { let e = !0; for (let n = i.length - 1; n >= 0; --n) if (i[n] != t[n]) { @@ -1770,37 +1770,37 @@ function Dr(i, t) { } return e; } -function qa(i, t) { +function il(i, t) { const e = Math.cos(t), n = Math.sin(t), s = i[0] * e - i[1] * n, r = i[1] * e + i[0] * n; return i[0] = s, i[1] = r, i; } -function Ou(i, t) { +function Fu(i, t) { return i[0] *= t, i[1] *= t, i; } -function Nu(i, t) { +function Du(i, t) { if (t.canWrapX()) { - const e = mt(t.getExtent()), n = Fu(i, t, e); + const e = mt(t.getExtent()), n = ku(i, t, e); n && (i[0] -= n * e); } return i; } -function Fu(i, t, e) { +function ku(i, t, e) { const n = t.getExtent(); let s = 0; return t.canWrapX() && (i[0] < n[0] || i[0] > n[2]) && (e = e || mt(n), s = Math.floor( (i[0] - n[0]) / e )), s; } -class k0 extends Va { +class N0 extends ja { constructor(t) { super(), this.map_ = t; } dispatchRenderEvent(t, e) { - W(); + V(); } calculateMatrices2D(t) { const e = t.viewState, n = t.coordinateToPixelTransform, s = t.pixelToCoordinateTransform; - xi( + bi( n, t.size[0] / 2, t.size[1] / 2, @@ -1809,46 +1809,46 @@ class k0 extends Va { -e.rotation, -e.center[0], -e.center[1] - ), Xa(s, n); + ), Ja(s, n); } forEachFeatureAtCoordinate(t, e, n, s, r, o, a, l) { let h; const c = e.viewState; - function u(x, M, E, R) { - return r.call(o, M, x ? E : null, R); + function u(x, C, E, w) { + return r.call(o, C, x ? E : null, w); } - const d = c.projection, f = Nu(t.slice(), d), g = [[0, 0]]; + const d = c.projection, f = Du(t.slice(), d), g = [[0, 0]]; if (d.canWrapX() && s) { - const x = d.getExtent(), M = mt(x); - g.push([-M, 0], [M, 0]); + const x = d.getExtent(), C = mt(x); + g.push([-C, 0], [C, 0]); } - const m = e.layerStatesArray, _ = m.length, y = [], p = []; + const m = e.layerStatesArray, p = m.length, _ = [], y = []; for (let x = 0; x < g.length; x++) - for (let M = _ - 1; M >= 0; --M) { - const E = m[M], R = E.layer; - if (R.hasRenderer() && Ka(E, c) && a.call(l, R)) { - const L = R.getRenderer(), N = R.getSource(); - if (L && N) { - const G = N.getWrapX() ? f : t, U = u.bind( + for (let C = p - 1; C >= 0; --C) { + const E = m[C], w = E.layer; + if (w.hasRenderer() && el(E, c) && a.call(l, w)) { + const R = w.getRenderer(), A = w.getSource(); + if (R && A) { + const k = A.getWrapX() ? f : t, Z = u.bind( null, E.managed ); - p[0] = G[0] + g[x][0], p[1] = G[1] + g[x][1], h = L.forEachFeatureAtCoordinate( - p, + y[0] = k[0] + g[x][0], y[1] = k[1] + g[x][1], h = R.forEachFeatureAtCoordinate( + y, e, n, - U, - y + Z, + _ ); } if (h) return h; } } - if (y.length === 0) + if (_.length === 0) return; - const v = 1 / y.length; - return y.forEach((x, M) => x.distanceSq += M * v), y.sort((x, M) => x.distanceSq - M.distanceSq), y.some((x) => h = x.callback(x.feature, x.layer, x.geometry)), h; + const v = 1 / _.length; + return _.forEach((x, C) => x.distanceSq += C * v), _.sort((x, C) => x.distanceSq - C.distanceSq), _.some((x) => h = x.callback(x.feature, x.layer, x.geometry)), h; } hasFeatureAtCoordinate(t, e, n, s, r, o) { return this.forEachFeatureAtCoordinate( @@ -1856,7 +1856,7 @@ class k0 extends Va { e, n, s, - ps, + Rs, this, r, o @@ -1866,22 +1866,22 @@ class k0 extends Va { return this.map_; } renderFrame(t) { - W(); + V(); } scheduleExpireIconCache(t) { - Fr.canExpireCache() && t.postRenderFunctions.push(G0); + Br.canExpireCache() && t.postRenderFunctions.push(F0); } } -function G0(i, t) { - Fr.expire(); +function F0(i, t) { + Br.expire(); } -const $0 = k0; -class B0 extends ke { +const D0 = N0; +class k0 extends ze { constructor(t, e, n, s) { super(t), this.inversePixelTransform = e, this.frameState = n, this.context = s; } } -const Du = B0, dr = "ol-hidden", Un = "ol-unselectable", _h = "ol-unsupported", fo = "ol-control", ph = "ol-collapsed", z0 = new RegExp( +const Gu = k0, pr = "ol-hidden", G0 = "ol-selectable", qn = "ol-unselectable", xh = "ol-unsupported", vo = "ol-control", Ch = "ol-collapsed", $0 = new RegExp( [ "^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)", "(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)", @@ -1892,15 +1892,15 @@ const Du = B0, dr = "ol-hidden", Un = "ol-unselectable", _h = "ol-unsupported", `?\\s*([-,\\"\\'\\sa-z]+?)\\s*$` ].join(""), "i" -), yh = [ +), Mh = [ "style", "variant", "weight", "size", "lineHeight", "family" -], ku = function(i) { - const t = i.match(z0); +], $u = function(i) { + const t = i.match($0); if (!t) return null; const e = { @@ -1910,32 +1910,42 @@ const Du = B0, dr = "ol-hidden", Un = "ol-unselectable", _h = "ol-unsupported", weight: "normal", variant: "normal" }; - for (let n = 0, s = yh.length; n < s; ++n) { + for (let n = 0, s = Mh.length; n < s; ++n) { const r = t[n + 1]; - r !== void 0 && (e[yh[n]] = r); + r !== void 0 && (e[Mh[n]] = r); } return e.families = e.family.split(/,\s?/), e; }; -function de(i, t, e, n) { +function ge(i, t, e, n) { let s; - return e && e.length ? s = e.shift() : Ha ? s = new OffscreenCanvas(i || 300, t || 300) : s = document.createElement("canvas"), i && (s.width = i), t && (s.height = t), s.getContext("2d", n); + return e && e.length ? s = e.shift() : qa ? s = new OffscreenCanvas(i || 300, t || 300) : s = document.createElement("canvas"), i && (s.width = i), t && (s.height = t), s.getContext("2d", n); } -function Gu(i) { +function Bu(i) { const t = i.canvas; t.width = 1, t.height = 1, i.clearRect(0, 0, 1, 1); } -function kr(i, t) { +function B0(i) { + let t = i.offsetWidth; + const e = getComputedStyle(i); + return t += parseInt(e.marginLeft, 10) + parseInt(e.marginRight, 10), t; +} +function z0(i) { + let t = i.offsetHeight; + const e = getComputedStyle(i); + return t += parseInt(e.marginTop, 10) + parseInt(e.marginBottom, 10), t; +} +function Zr(i, t) { const e = t.parentNode; e && e.replaceChild(i, t); } -function ha(i) { +function Ur(i) { return i && i.parentNode ? i.parentNode.removeChild(i) : null; } -function Z0(i) { +function zu(i) { for (; i.lastChild; ) i.removeChild(i.lastChild); } -function U0(i, t) { +function Z0(i, t) { const e = i.childNodes; for (let n = 0; ; ++n) { const s = e[n], r = t[n]; @@ -1954,20 +1964,20 @@ function U0(i, t) { } } } -const $u = "10px sans-serif", Je = "#000", Gr = "round", vs = [], xs = 0, Pn = "round", Ms = 10, Cs = "#000", Es = "center", $r = "middle", Ai = [0, 0, 0, 0], ws = 1, He = new Se(); -let fn = null, ca; -const ua = {}, V0 = function() { +const Zu = "10px sans-serif", si = "#000", Vr = "round", Ls = [], Ts = 0, $n = "round", Is = 10, As = "#000", Ps = "center", Wr = "middle", $i = [0, 0, 0, 0], Os = 1, qe = new Ce(); +let xn = null, ma; +const pa = {}, U0 = function() { const t = "32px ", e = ["monospace", "serif"], n = e.length, s = "wmytzilWMYTZIL@#/&?$%10\uF013"; let r, o; function a(h, c, u) { let d = !0; for (let f = 0; f < n; ++f) { const g = e[f]; - if (o = Br( + if (o = Hr( h + " " + c + " " + t + g, s ), u != g) { - const m = Br( + const m = Hr( h + " " + c + " " + t + u + "," + g, s ); @@ -1978,16 +1988,16 @@ const ua = {}, V0 = function() { } function l() { let h = !0; - const c = He.getKeys(); + const c = qe.getKeys(); for (let u = 0, d = c.length; u < d; ++u) { const f = c[u]; - He.get(f) < 100 && (a.apply(this, f.split(` -`)) ? (Ds(ua), fn = null, ca = void 0, He.set(f, 100)) : (He.set(f, He.get(f) + 1, !0), h = !1)); + qe.get(f) < 100 && (a.apply(this, f.split(` +`)) ? (Us(pa), xn = null, ma = void 0, qe.set(f, 100)) : (qe.set(f, qe.get(f) + 1, !0), h = !1)); } h && (clearInterval(r), r = void 0); } return function(h) { - const c = ku(h); + const c = $u(h); if (!c) return; const u = c.families; @@ -1995,38 +2005,38 @@ const ua = {}, V0 = function() { const g = u[d], m = c.style + ` ` + c.weight + ` ` + g; - He.get(m) === void 0 && (He.set(m, 100, !0), a(c.style, c.weight, g) || (He.set(m, 0, !0), r === void 0 && (r = setInterval(l, 32)))); + qe.get(m) === void 0 && (qe.set(m, 100, !0), a(c.style, c.weight, g) || (qe.set(m, 0, !0), r === void 0 && (r = setInterval(l, 32)))); } }; -}(), W0 = function() { +}(), V0 = function() { let i; return function(t) { - let e = ua[t]; + let e = pa[t]; if (e == null) { - if (Ha) { - const n = ku(t), s = Bu(t, "\u017Dg"); + if (qa) { + const n = $u(t), s = Uu(t, "\u017Dg"); e = (isNaN(Number(n.lineHeight)) ? 1.2 : Number(n.lineHeight)) * (s.actualBoundingBoxAscent + s.actualBoundingBoxDescent); } else i || (i = document.createElement("div"), i.innerHTML = "M", i.style.minHeight = "0", i.style.maxHeight = "none", i.style.height = "auto", i.style.padding = "0", i.style.border = "none", i.style.position = "absolute", i.style.display = "block", i.style.left = "-99999px"), i.style.font = t, document.body.appendChild(i), e = i.offsetHeight, document.body.removeChild(i); - ua[t] = e; + pa[t] = e; } return e; }; }(); -function Bu(i, t) { - return fn || (fn = de(1, 1)), i != ca && (fn.font = i, ca = fn.font), fn.measureText(t); +function Uu(i, t) { + return xn || (xn = ge(1, 1)), i != ma && (xn.font = i, ma = xn.font), xn.measureText(t); } -function Br(i, t) { - return Bu(i, t).width; +function Hr(i, t) { + return Uu(i, t).width; } -function vh(i, t, e) { +function Eh(i, t, e) { if (t in e) return e[t]; const n = t.split(` -`).reduce((s, r) => Math.max(s, Br(i, r)), 0); +`).reduce((s, r) => Math.max(s, Hr(i, r)), 0); return e[t] = n, n; } -function H0(i, t) { +function W0(i, t) { const e = [], n = [], s = []; let r = 0, o = 0, a = 0, l = 0; for (let h = 0, c = t.length; h <= c; h += 2) { @@ -2036,15 +2046,15 @@ function H0(i, t) { r = Math.max(r, o), s.push(o), o = 0, a += l; continue; } - const d = t[h + 1] || i.font, f = Br(d, u); + const d = t[h + 1] || i.font, f = Hr(d, u); e.push(f), o += f; - const g = W0(d); + const g = V0(d); n.push(g), l = Math.max(l, g); } return { width: r, height: a, widths: e, heights: n, lineWidths: s }; } -function X0(i, t, e, n, s, r, o, a, l, h, c) { - i.save(), e !== 1 && (i.globalAlpha *= e), t && i.setTransform.apply(i, t), n.contextInstructions ? (i.translate(l, h), i.scale(c[0], c[1]), Y0(n, i)) : c[0] < 0 || c[1] < 0 ? (i.translate(l, h), i.scale(c[0], c[1]), i.drawImage( +function H0(i, t, e, n, s, r, o, a, l, h, c) { + i.save(), e !== 1 && (i.globalAlpha *= e), t && i.setTransform.apply(i, t), n.contextInstructions ? (i.translate(l, h), i.scale(c[0], c[1]), X0(n, i)) : c[0] < 0 || c[1] < 0 ? (i.translate(l, h), i.scale(c[0], c[1]), i.drawImage( n, s, r, @@ -2066,7 +2076,7 @@ function X0(i, t, e, n, s, r, o, a, l, h, c) { a * c[1] ), i.restore(); } -function Y0(i, t) { +function X0(i, t) { const e = i.contextInstructions; for (let n = 0, s = e.length; n < s; n += 2) Array.isArray(e[n + 1]) ? t[e[n]].apply( @@ -2074,22 +2084,22 @@ function Y0(i, t) { e[n + 1] ) : t[e[n]] = e[n + 1]; } -class j0 extends $0 { +class Y0 extends D0 { constructor(t) { - super(t), this.fontChangeListenerKey_ = it( - He, - In.PROPERTYCHANGE, + super(t), this.fontChangeListenerKey_ = et( + qe, + kn.PROPERTYCHANGE, t.redrawText.bind(t) ), this.element_ = document.createElement("div"); const e = this.element_.style; - e.position = "absolute", e.width = "100%", e.height = "100%", e.zIndex = "0", this.element_.className = Un + " ol-layers"; + e.position = "absolute", e.width = "100%", e.height = "100%", e.zIndex = "0", this.element_.className = qn + " ol-layers"; const n = t.getViewport(); n.insertBefore(this.element_, n.firstChild || null), this.children_ = [], this.renderedVisible_ = !0; } dispatchRenderEvent(t, e) { const n = this.getMap(); if (n.hasListener(t)) { - const s = new Du(t, void 0, e); + const s = new Gu(t, void 0, e); n.dispatchEvent(s); } } @@ -2101,7 +2111,7 @@ class j0 extends $0 { this.renderedVisible_ && (this.element_.style.display = "none", this.renderedVisible_ = !1); return; } - this.calculateMatrices2D(t), this.dispatchRenderEvent(_i.PRECOMPOSE, t); + this.calculateMatrices2D(t), this.dispatchRenderEvent(Ei.PRECOMPOSE, t); const e = t.layerStatesArray.sort(function(o, a) { return o.zIndex - a.zIndex; }), n = t.viewState; @@ -2112,7 +2122,7 @@ class j0 extends $0 { const l = e[o]; t.layerIndex = o; const h = l.layer, c = h.getSourceState(); - if (!Ka(l, n) || c != "ready" && c != "undefined") { + if (!el(l, n) || c != "ready" && c != "undefined") { h.unrender(); continue; } @@ -2123,25 +2133,25 @@ class j0 extends $0 { } for (let o = s.length - 1; o >= 0; --o) s[o].renderDeclutter(t); - U0(this.element_, this.children_), this.dispatchRenderEvent(_i.POSTCOMPOSE, t), this.renderedVisible_ || (this.element_.style.display = "", this.renderedVisible_ = !0), this.scheduleExpireIconCache(t); + Z0(this.element_, this.children_), this.dispatchRenderEvent(Ei.POSTCOMPOSE, t), this.renderedVisible_ || (this.element_.style.display = "", this.renderedVisible_ = !0), this.scheduleExpireIconCache(t); } } -const K0 = j0; -class fi extends ke { +const j0 = Y0; +class vi extends ze { constructor(t, e) { super(t), this.layer = e; } } -const Go = { +const Wo = { LAYERS: "layers" }; -class Ja extends Au { +class nl extends Ou { constructor(t) { t = t || {}; const e = Object.assign({}, t); delete e.layers; let n = t.layers; - super(e), this.on, this.once, this.un, this.layersListenerKeys_ = [], this.listenerKeys_ = {}, this.addChangeListener(Go.LAYERS, this.handleLayersChanged_), n ? Array.isArray(n) ? n = new Te(n.slice(), { unique: !0 }) : Y(typeof n.getArray == "function", 43) : n = new Te(void 0, { unique: !0 }), this.setLayers(n); + super(e), this.on, this.once, this.un, this.layersListenerKeys_ = [], this.listenerKeys_ = {}, this.addChangeListener(Wo.LAYERS, this.handleLayersChanged_), n ? Array.isArray(n) ? n = new Oe(n.slice(), { unique: !0 }) : X(typeof n.getArray == "function", 43) : n = new Oe(void 0, { unique: !0 }), this.setLayers(n); } handleLayerChange_() { this.changed(); @@ -2150,59 +2160,59 @@ class Ja extends Au { this.layersListenerKeys_.forEach(pt), this.layersListenerKeys_.length = 0; const t = this.getLayers(); this.layersListenerKeys_.push( - it(t, Jt.ADD, this.handleLayersAdd_, this), - it(t, Jt.REMOVE, this.handleLayersRemove_, this) + et(t, ee.ADD, this.handleLayersAdd_, this), + et(t, ee.REMOVE, this.handleLayersRemove_, this) ); for (const n in this.listenerKeys_) this.listenerKeys_[n].forEach(pt); - Ds(this.listenerKeys_); + Us(this.listenerKeys_); const e = t.getArray(); for (let n = 0, s = e.length; n < s; n++) { const r = e[n]; - this.registerLayerListeners_(r), this.dispatchEvent(new fi("addlayer", r)); + this.registerLayerListeners_(r), this.dispatchEvent(new vi("addlayer", r)); } this.changed(); } registerLayerListeners_(t) { const e = [ - it( + et( t, - In.PROPERTYCHANGE, + kn.PROPERTYCHANGE, this.handleLayerChange_, this ), - it(t, X.CHANGE, this.handleLayerChange_, this) + et(t, H.CHANGE, this.handleLayerChange_, this) ]; - t instanceof Ja && e.push( - it(t, "addlayer", this.handleLayerGroupAdd_, this), - it(t, "removelayer", this.handleLayerGroupRemove_, this) + t instanceof nl && e.push( + et(t, "addlayer", this.handleLayerGroupAdd_, this), + et(t, "removelayer", this.handleLayerGroupRemove_, this) ), this.listenerKeys_[rt(t)] = e; } handleLayerGroupAdd_(t) { - this.dispatchEvent(new fi("addlayer", t.layer)); + this.dispatchEvent(new vi("addlayer", t.layer)); } handleLayerGroupRemove_(t) { - this.dispatchEvent(new fi("removelayer", t.layer)); + this.dispatchEvent(new vi("removelayer", t.layer)); } handleLayersAdd_(t) { const e = t.element; - this.registerLayerListeners_(e), this.dispatchEvent(new fi("addlayer", e)), this.changed(); + this.registerLayerListeners_(e), this.dispatchEvent(new vi("addlayer", e)), this.changed(); } handleLayersRemove_(t) { const e = t.element, n = rt(e); - this.listenerKeys_[n].forEach(pt), delete this.listenerKeys_[n], this.dispatchEvent(new fi("removelayer", e)), this.changed(); + this.listenerKeys_[n].forEach(pt), delete this.listenerKeys_[n], this.dispatchEvent(new vi("removelayer", e)), this.changed(); } getLayers() { - return this.get(Go.LAYERS); + return this.get(Wo.LAYERS); } setLayers(t) { const e = this.getLayers(); if (e) { const n = e.getArray(); for (let s = 0, r = n.length; s < r; ++s) - this.dispatchEvent(new fi("removelayer", n[s])); + this.dispatchEvent(new vi("removelayer", n[s])); } - this.set(Go.LAYERS, t); + this.set(Wo.LAYERS, t); } getLayersArray(t) { return t = t !== void 0 ? t : [], this.getLayers().forEach(function(e) { @@ -2225,7 +2235,7 @@ class Ja extends Au { ), l.minResolution = Math.max( l.minResolution, s.minResolution - ), l.minZoom = Math.max(l.minZoom, s.minZoom), l.maxZoom = Math.min(l.maxZoom, s.maxZoom), s.extent !== void 0 && (l.extent !== void 0 ? l.extent = cs( + ), l.minZoom = Math.max(l.minZoom, s.minZoom), l.maxZoom = Math.min(l.maxZoom, s.maxZoom), s.extent !== void 0 && (l.extent !== void 0 ? l.extent = vs( l.extent, s.extent ) : l.extent = s.extent), l.zIndex === void 0 && (l.zIndex = r); @@ -2236,14 +2246,14 @@ class Ja extends Au { return "ready"; } } -const go = Ja; -class q0 extends ke { +const xo = nl; +class K0 extends ze { constructor(t, e, n) { super(t), this.map = e, this.frameState = n !== void 0 ? n : null; } } -const gn = q0; -class J0 extends gn { +const Cn = K0; +class q0 extends Cn { constructor(t, e, n, s, r, o) { super(t, e, r), this.originalEvent = n, this.pixel_ = null, this.coordinate_ = null, this.dragging = s !== void 0 ? s : !1, this.activePointers = o; } @@ -2266,10 +2276,10 @@ class J0 extends gn { super.stopPropagation(), "stopPropagation" in this.originalEvent && this.originalEvent.stopPropagation(); } } -const ci = J0, Ct = { +const _i = q0, Mt = { SINGLECLICK: "singleclick", - CLICK: X.CLICK, - DBLCLICK: X.DBLCLICK, + CLICK: H.CLICK, + DBLCLICK: H.DBLCLICK, POINTERDRAG: "pointerdrag", POINTERMOVE: "pointermove", POINTERDOWN: "pointerdown", @@ -2279,7 +2289,7 @@ const ci = J0, Ct = { POINTERENTER: "pointerenter", POINTERLEAVE: "pointerleave", POINTERCANCEL: "pointercancel" -}, da = { +}, _a = { POINTERMOVE: "pointermove", POINTERDOWN: "pointerdown", POINTERUP: "pointerup", @@ -2289,41 +2299,41 @@ const ci = J0, Ct = { POINTERLEAVE: "pointerleave", POINTERCANCEL: "pointercancel" }; -class Q0 extends so { +class J0 extends co { constructor(t, e) { super(t), this.map_ = t, this.clickTimeoutId_, this.emulateClicks_ = !1, this.dragging_ = !1, this.dragListenerKeys_ = [], this.moveTolerance_ = e === void 0 ? 1 : e, this.down_ = null; const n = this.map_.getViewport(); - this.activePointers_ = [], this.trackedTouches_ = {}, this.element_ = n, this.pointerdownListenerKey_ = it( + this.activePointers_ = [], this.trackedTouches_ = {}, this.element_ = n, this.pointerdownListenerKey_ = et( n, - da.POINTERDOWN, + _a.POINTERDOWN, this.handlePointerDown_, this - ), this.originalPointerMoveEvent_, this.relayedListenerKey_ = it( + ), this.originalPointerMoveEvent_, this.relayedListenerKey_ = et( n, - da.POINTERMOVE, + _a.POINTERMOVE, this.relayMoveEvent_, this ), this.boundHandleTouchMove_ = this.handleTouchMove_.bind(this), this.element_.addEventListener( - X.TOUCHMOVE, + H.TOUCHMOVE, this.boundHandleTouchMove_, - vu ? { passive: !1 } : !1 + Cu ? { passive: !1 } : !1 ); } emulateClick_(t) { - let e = new ci( - Ct.CLICK, + let e = new _i( + Mt.CLICK, this.map_, t ); - this.dispatchEvent(e), this.clickTimeoutId_ !== void 0 ? (clearTimeout(this.clickTimeoutId_), this.clickTimeoutId_ = void 0, e = new ci( - Ct.DBLCLICK, + this.dispatchEvent(e), this.clickTimeoutId_ !== void 0 ? (clearTimeout(this.clickTimeoutId_), this.clickTimeoutId_ = void 0, e = new _i( + Mt.DBLCLICK, this.map_, t ), this.dispatchEvent(e)) : this.clickTimeoutId_ = setTimeout( function() { this.clickTimeoutId_ = void 0; - const n = new ci( - Ct.SINGLECLICK, + const n = new _i( + Mt.SINGLECLICK, this.map_, t ); @@ -2334,7 +2344,7 @@ class Q0 extends so { } updateActivePointers_(t) { const e = t, n = e.pointerId; - if (e.type == Ct.POINTERUP || e.type == Ct.POINTERCANCEL) { + if (e.type == Mt.POINTERUP || e.type == Mt.POINTERCANCEL) { delete this.trackedTouches_[n]; for (const s in this.trackedTouches_) if (this.trackedTouches_[s].target !== e.target) { @@ -2342,13 +2352,13 @@ class Q0 extends so { break; } } else - (e.type == Ct.POINTERDOWN || e.type == Ct.POINTERMOVE) && (this.trackedTouches_[n] = e); + (e.type == Mt.POINTERDOWN || e.type == Mt.POINTERMOVE) && (this.trackedTouches_[n] = e); this.activePointers_ = Object.values(this.trackedTouches_); } handlePointerUp_(t) { this.updateActivePointers_(t); - const e = new ci( - Ct.POINTERUP, + const e = new _i( + Mt.POINTERUP, this.map_, t, void 0, @@ -2362,8 +2372,8 @@ class Q0 extends so { } handlePointerDown_(t) { this.emulateClicks_ = this.activePointers_.length === 0, this.updateActivePointers_(t); - const e = new ci( - Ct.POINTERDOWN, + const e = new _i( + Mt.POINTERDOWN, this.map_, t, void 0, @@ -2373,28 +2383,28 @@ class Q0 extends so { this.dispatchEvent(e), this.down_ = {}; for (const n in t) { const s = t[n]; - this.down_[n] = typeof s == "function" ? Ui : s; + this.down_[n] = typeof s == "function" ? qi : s; } if (this.dragListenerKeys_.length === 0) { const n = this.map_.getOwnerDocument(); this.dragListenerKeys_.push( - it( + et( n, - Ct.POINTERMOVE, + Mt.POINTERMOVE, this.handlePointerMove_, this ), - it(n, Ct.POINTERUP, this.handlePointerUp_, this), - it( + et(n, Mt.POINTERUP, this.handlePointerUp_, this), + et( this.element_, - Ct.POINTERCANCEL, + Mt.POINTERCANCEL, this.handlePointerUp_, this ) ), this.element_.getRootNode && this.element_.getRootNode() !== n && this.dragListenerKeys_.push( - it( + et( this.element_.getRootNode(), - Ct.POINTERUP, + Mt.POINTERUP, this.handlePointerUp_, this ) @@ -2404,8 +2414,8 @@ class Q0 extends so { handlePointerMove_(t) { if (this.isMoving_(t)) { this.updateActivePointers_(t), this.dragging_ = !0; - const e = new ci( - Ct.POINTERDRAG, + const e = new _i( + Mt.POINTERDRAG, this.map_, t, this.dragging_, @@ -2419,8 +2429,8 @@ class Q0 extends so { this.originalPointerMoveEvent_ = t; const e = !!(this.down_ && this.isMoving_(t)); this.dispatchEvent( - new ci( - Ct.POINTERMOVE, + new _i( + Mt.POINTERMOVE, this.map_, t, e @@ -2436,29 +2446,29 @@ class Q0 extends so { } disposeInternal() { this.relayedListenerKey_ && (pt(this.relayedListenerKey_), this.relayedListenerKey_ = null), this.element_.removeEventListener( - X.TOUCHMOVE, + H.TOUCHMOVE, this.boundHandleTouchMove_ ), this.pointerdownListenerKey_ && (pt(this.pointerdownListenerKey_), this.pointerdownListenerKey_ = null), this.dragListenerKeys_.forEach(pt), this.dragListenerKeys_.length = 0, this.element_ = null, super.disposeInternal(); } } -const tg = Q0, ui = { +const Q0 = J0, Qe = { POSTRENDER: "postrender", MOVESTART: "movestart", MOVEEND: "moveend", LOADSTART: "loadstart", LOADEND: "loadend" -}, Ot = { +}, Nt = { LAYERGROUP: "layergroup", SIZE: "size", TARGET: "target", VIEW: "view" -}, zr = 1 / 0; -class eg { +}, Xr = 1 / 0; +class tg { constructor(t, e) { this.priorityFunction_ = t, this.keyFunction_ = e, this.elements_ = [], this.priorities_ = [], this.queuedElements_ = {}; } clear() { - this.elements_.length = 0, this.priorities_.length = 0, Ds(this.queuedElements_); + this.elements_.length = 0, this.priorities_.length = 0, Us(this.queuedElements_); } dequeue() { const t = this.elements_, e = this.priorities_, n = t[0]; @@ -2467,9 +2477,9 @@ class eg { return delete this.queuedElements_[s], n; } enqueue(t) { - Y(!(this.keyFunction_(t) in this.queuedElements_), 31); + X(!(this.keyFunction_(t) in this.queuedElements_), 31); const e = this.priorityFunction_(t); - return e != zr ? (this.elements_.push(t), this.priorities_.push(e), this.queuedElements_[this.keyFunction_(t)] = !0, this.siftDown_(0, this.elements_.length - 1), !0) : !1; + return e != Xr ? (this.elements_.push(t), this.priorities_.push(e), this.queuedElements_[this.keyFunction_(t)] = !0, this.siftDown_(0, this.elements_.length - 1), !0) : !1; } getCount() { return this.elements_.length; @@ -2522,18 +2532,18 @@ class eg { const r = e.length; let o, a, l; for (a = 0; a < r; ++a) - o = e[a], l = t(o), l == zr ? delete this.queuedElements_[this.keyFunction_(o)] : (n[s] = l, e[s++] = o); + o = e[a], l = t(o), l == Xr ? delete this.queuedElements_[this.keyFunction_(o)] : (n[s] = l, e[s++] = o); e.length = s, n.length = s, this.heapify_(); } } -const ig = eg, z = { +const eg = tg, B = { IDLE: 0, LOADING: 1, LOADED: 2, ERROR: 3, EMPTY: 4 }; -class ng extends ig { +class ig extends eg { constructor(t, e) { super( function(n) { @@ -2546,15 +2556,15 @@ class ng extends ig { } enqueue(t) { const e = super.enqueue(t); - return e && t[0].addEventListener(X.CHANGE, this.boundHandleTileChange_), e; + return e && t[0].addEventListener(H.CHANGE, this.boundHandleTileChange_), e; } getTilesLoading() { return this.tilesLoading_; } handleTileChange(t) { const e = t.target, n = e.getState(); - if (n === z.LOADED || n === z.ERROR || n === z.EMPTY) { - n !== z.ERROR && e.removeEventListener(X.CHANGE, this.boundHandleTileChange_); + if (n === B.LOADED || n === B.ERROR || n === B.EMPTY) { + n !== B.ERROR && e.removeEventListener(H.CHANGE, this.boundHandleTileChange_); const s = e.getKey(); s in this.tilesLoadingKeys_ && (delete this.tilesLoadingKeys_[s], --this.tilesLoading_), this.tileChangeCallback_(); } @@ -2562,31 +2572,31 @@ class ng extends ig { loadMoreTiles(t, e) { let n = 0, s, r, o; for (; this.tilesLoading_ < t && n < e && this.getCount() > 0; ) - r = this.dequeue()[0], o = r.getKey(), s = r.getState(), s === z.IDLE && !(o in this.tilesLoadingKeys_) && (this.tilesLoadingKeys_[o] = !0, ++this.tilesLoading_, ++n, r.load()); + r = this.dequeue()[0], o = r.getKey(), s = r.getState(), s === B.IDLE && !(o in this.tilesLoadingKeys_) && (this.tilesLoadingKeys_[o] = !0, ++this.tilesLoading_, ++n, r.load()); } } -const sg = ng; -function rg(i, t, e, n, s) { +const ng = ig; +function sg(i, t, e, n, s) { if (!i || !(e in i.wantedTiles) || !i.wantedTiles[e][t.getKey()]) - return zr; + return Xr; const r = i.viewState.center, o = n[0] - r[0], a = n[1] - r[1]; return 65536 * Math.log(s) + Math.sqrt(o * o + a * a) / s; } -const Bt = { +const Zt = { ANIMATING: 0, INTERACTING: 1 -}, xe = { +}, Ee = { CENTER: "center", RESOLUTION: "resolution", ROTATION: "rotation" -}, og = 42, Qa = 256, On = { +}, rg = 42, sl = 256, Bn = { radians: 6370997 / (2 * Math.PI), degrees: 2 * Math.PI * 6370997 / 360, ft: 0.3048, m: 1, "us-ft": 1200 / 3937 }; -class ag { +class og { constructor(t) { this.code_ = t.code, this.units_ = t.units, this.extent_ = t.extent !== void 0 ? t.extent : null, this.worldExtent_ = t.worldExtent !== void 0 ? t.worldExtent : null, this.axisOrientation_ = t.axisOrientation !== void 0 ? t.axisOrientation : "enu", this.global_ = t.global !== void 0 ? t.global : !1, this.canWrapX_ = !!(this.global_ && this.extent_), this.getPointResolutionFunc_ = t.getPointResolution, this.defaultTileGrid_ = null, this.metersPerUnit_ = t.metersPerUnit; } @@ -2603,7 +2613,7 @@ class ag { return this.units_; } getMetersPerUnit() { - return this.metersPerUnit_ || On[this.units_]; + return this.metersPerUnit_ || Bn[this.units_]; } getWorldExtent() { return this.worldExtent_; @@ -2636,106 +2646,106 @@ class ag { return this.getPointResolutionFunc_; } } -const tl = ag, Gs = 6378137, yn = Math.PI * Gs, lg = [-yn, -yn, yn, yn], hg = [-180, -85, 180, 85], fr = Gs * Math.log(Math.tan(Math.PI / 2)); -class ln extends tl { +const rl = og, Ws = 6378137, Sn = Math.PI * Ws, ag = [-Sn, -Sn, Sn, Sn], lg = [-180, -85, 180, 85], _r = Ws * Math.log(Math.tan(Math.PI / 2)); +class gn extends rl { constructor(t) { super({ code: t, units: "m", - extent: lg, + extent: ag, global: !0, - worldExtent: hg, + worldExtent: lg, getPointResolution: function(e, n) { - return e / Math.cosh(n[1] / Gs); + return e / Math.cosh(n[1] / Ws); } }); } } -const xh = [ - new ln("EPSG:3857"), - new ln("EPSG:102100"), - new ln("EPSG:102113"), - new ln("EPSG:900913"), - new ln("http://www.opengis.net/def/crs/EPSG/0/3857"), - new ln("http://www.opengis.net/gml/srs/epsg.xml#3857") +const wh = [ + new gn("EPSG:3857"), + new gn("EPSG:102100"), + new gn("EPSG:102113"), + new gn("EPSG:900913"), + new gn("http://www.opengis.net/def/crs/EPSG/0/3857"), + new gn("http://www.opengis.net/gml/srs/epsg.xml#3857") ]; -function cg(i, t, e) { +function hg(i, t, e) { const n = i.length; e = e > 1 ? e : 2, t === void 0 && (e > 2 ? t = i.slice() : t = new Array(n)); for (let s = 0; s < n; s += e) { - t[s] = yn * i[s] / 180; - let r = Gs * Math.log(Math.tan(Math.PI * (+i[s + 1] + 90) / 360)); - r > fr ? r = fr : r < -fr && (r = -fr), t[s + 1] = r; + t[s] = Sn * i[s] / 180; + let r = Ws * Math.log(Math.tan(Math.PI * (+i[s + 1] + 90) / 360)); + r > _r ? r = _r : r < -_r && (r = -_r), t[s + 1] = r; } return t; } -function ug(i, t, e) { +function cg(i, t, e) { const n = i.length; e = e > 1 ? e : 2, t === void 0 && (e > 2 ? t = i.slice() : t = new Array(n)); for (let s = 0; s < n; s += e) - t[s] = 180 * i[s] / yn, t[s + 1] = 360 * Math.atan(Math.exp(i[s + 1] / Gs)) / Math.PI - 90; + t[s] = 180 * i[s] / Sn, t[s + 1] = 360 * Math.atan(Math.exp(i[s + 1] / Ws)) / Math.PI - 90; return t; } -const dg = 6378137, Mh = [-180, -90, 180, 90], fg = Math.PI * dg / 180; -class bi extends tl { +const ug = 6378137, Sh = [-180, -90, 180, 90], dg = Math.PI * ug / 180; +class Di extends rl { constructor(t, e) { super({ code: t, units: "degrees", - extent: Mh, + extent: Sh, axisOrientation: e, global: !0, - metersPerUnit: fg, - worldExtent: Mh + metersPerUnit: dg, + worldExtent: Sh }); } } -const Ch = [ - new bi("CRS:84"), - new bi("EPSG:4326", "neu"), - new bi("urn:ogc:def:crs:OGC:1.3:CRS84"), - new bi("urn:ogc:def:crs:OGC:2:84"), - new bi("http://www.opengis.net/def/crs/OGC/1.3/CRS84"), - new bi("http://www.opengis.net/gml/srs/epsg.xml#4326", "neu"), - new bi("http://www.opengis.net/def/crs/EPSG/0/4326", "neu") +const Rh = [ + new Di("CRS:84"), + new Di("EPSG:4326", "neu"), + new Di("urn:ogc:def:crs:OGC:1.3:CRS84"), + new Di("urn:ogc:def:crs:OGC:2:84"), + new Di("http://www.opengis.net/def/crs/OGC/1.3/CRS84"), + new Di("http://www.opengis.net/gml/srs/epsg.xml#4326", "neu"), + new Di("http://www.opengis.net/def/crs/EPSG/0/4326", "neu") ]; -let fa = {}; -function gg(i) { - return fa[i] || fa[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null; +let ya = {}; +function fg(i) { + return ya[i] || ya[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null; } -function mg(i, t) { - fa[i] = t; +function gg(i, t) { + ya[i] = t; } -let Rn = {}; -function Nn(i, t, e) { +let On = {}; +function zn(i, t, e) { const n = i.getCode(), s = t.getCode(); - n in Rn || (Rn[n] = {}), Rn[n][s] = e; + n in On || (On[n] = {}), On[n][s] = e; } -function zu(i, t) { +function Vu(i, t) { let e; - return i in Rn && t in Rn[i] && (e = Rn[i][t]), e; + return i in On && t in On[i] && (e = On[i][t]), e; } -const Zu = 63710088e-1; -function Eh(i, t, e) { - e = e || Zu; - const n = Gi(i[1]), s = Gi(t[1]), r = (s - n) / 2, o = Gi(t[0] - i[0]) / 2, a = Math.sin(r) * Math.sin(r) + Math.sin(o) * Math.sin(o) * Math.cos(n) * Math.cos(s); +const Wu = 63710088e-1; +function bh(i, t, e) { + e = e || Wu; + const n = Hi(i[1]), s = Hi(t[1]), r = (s - n) / 2, o = Hi(t[0] - i[0]) / 2, a = Math.sin(r) * Math.sin(r) + Math.sin(o) * Math.sin(o) * Math.cos(n) * Math.cos(s); return 2 * e * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); } -function _g(i, t, e, n) { - n = n || Zu; - const s = Gi(i[1]), r = Gi(i[0]), o = t / n, a = Math.asin( +function mg(i, t, e, n) { + n = n || Wu; + const s = Hi(i[1]), r = Hi(i[0]), o = t / n, a = Math.asin( Math.sin(s) * Math.cos(o) + Math.cos(s) * Math.sin(o) * Math.cos(e) ), l = r + Math.atan2( Math.sin(e) * Math.sin(o) * Math.cos(s), Math.cos(o) - Math.sin(s) * Math.sin(a) ); - return [fh(l), fh(a)]; + return [_h(l), _h(a)]; } -let ga = !0; -function Uu(i) { - ga = !(i === void 0 ? !0 : i); +let va = !0; +function Hu(i) { + va = !(i === void 0 ? !0 : i); } -function el(i, t, e) { +function ol(i, t, e) { if (t !== void 0) { for (let n = 0, s = i.length; n < s; ++n) t[n] = i[n]; @@ -2744,7 +2754,7 @@ function el(i, t, e) { t = i.slice(); return t; } -function il(i, t, e) { +function al(i, t, e) { if (t !== void 0 && i !== t) { for (let n = 0, s = i.length; n < s; ++n) t[n] = i[n]; @@ -2752,34 +2762,34 @@ function il(i, t, e) { } return i; } -function Vu(i) { - mg(i.getCode(), i), Nn(i, i, el); +function Xu(i) { + gg(i.getCode(), i), zn(i, i, ol); } function pg(i) { - i.forEach(Vu); + i.forEach(Xu); } -function J(i) { - return typeof i == "string" ? gg(i) : i || null; +function q(i) { + return typeof i == "string" ? fg(i) : i || null; } -function Zr(i, t, e, n) { - i = J(i); +function Yr(i, t, e, n) { + i = q(i); let s; const r = i.getPointResolutionFunc(); if (r) { if (s = r(t, e), n && n !== i.getUnits()) { const o = i.getMetersPerUnit(); - o && (s = s * o / On[n]); + o && (s = s * o / Bn[n]); } } else { const o = i.getUnits(); if (o == "degrees" && !n || n == "degrees") s = t; else { - const a = mo( + const a = Co( i, - J("EPSG:4326") + q("EPSG:4326") ); - if (a === il && o !== "degrees") + if (a === al && o !== "degrees") s = t * i.getMetersPerUnit(); else { let h = [ @@ -2793,33 +2803,33 @@ function Zr(i, t, e, n) { e[1] + t / 2 ]; h = a(h, h, 2); - const c = Eh(h.slice(0, 2), h.slice(2, 4)), u = Eh(h.slice(4, 6), h.slice(6, 8)); + const c = bh(h.slice(0, 2), h.slice(2, 4)), u = bh(h.slice(4, 6), h.slice(6, 8)); s = (c + u) / 2; } - const l = n ? On[n] : i.getMetersPerUnit(); + const l = n ? Bn[n] : i.getMetersPerUnit(); l !== void 0 && (s /= l); } } return s; } -function ma(i) { +function xa(i) { pg(i), i.forEach(function(t) { i.forEach(function(e) { - t !== e && Nn(t, e, el); + t !== e && zn(t, e, ol); }); }); } -function yg(i, t, e, n) { +function _g(i, t, e, n) { i.forEach(function(s) { t.forEach(function(r) { - Nn(s, r, e), Nn(r, s, n); + zn(s, r, e), zn(r, s, n); }); }); } -function nl(i, t) { - return i ? typeof i == "string" ? J(i) : i : J(t); +function ll(i, t) { + return i ? typeof i == "string" ? q(i) : i : q(t); } -function wh(i) { +function Lh(i) { return function(t, e, n) { const s = t.length; n = n !== void 0 ? n : 2, e = e !== void 0 ? e : new Array(s); @@ -2831,82 +2841,82 @@ function wh(i) { return e; }; } -function vg(i, t, e, n) { - const s = J(i), r = J(t); - Nn( +function yg(i, t, e, n) { + const s = q(i), r = q(t); + zn( s, r, - wh(e) - ), Nn( + Lh(e) + ), zn( r, s, - wh(n) + Lh(n) ); } -function xg(i, t) { - return Uu(), Wu( +function vg(i, t) { + return Hu(), Yu( i, "EPSG:4326", t !== void 0 ? t : "EPSG:3857" ); } -function be(i, t) { +function Ae(i, t) { if (i === t) return !0; const e = i.getUnits() === t.getUnits(); - return (i.getCode() === t.getCode() || mo(i, t) === el) && e; + return (i.getCode() === t.getCode() || Co(i, t) === ol) && e; } -function mo(i, t) { +function Co(i, t) { const e = i.getCode(), n = t.getCode(); - let s = zu(e, n); - return s || (s = il), s; + let s = Vu(e, n); + return s || (s = al), s; } -function Ss(i, t) { - const e = J(i), n = J(t); - return mo(e, n); +function Ns(i, t) { + const e = q(i), n = q(t); + return Co(e, n); } -function Wu(i, t, e) { - return Ss(t, e)(i, void 0, i.length); +function Yu(i, t, e) { + return Ns(t, e)(i, void 0, i.length); } -function Hu(i, t, e, n) { - const s = Ss(t, e); - return S0(i, s, void 0, n); +function ju(i, t, e, n) { + const s = Ns(t, e); + return M0(i, s, void 0, n); } -function _a(i, t) { +function Ca(i, t) { return i; } -function Xe(i, t) { - return ga && !Dr(i, [0, 0]) && i[0] >= -180 && i[0] <= 180 && i[1] >= -90 && i[1] <= 90 && (ga = !1, console.warn( +function Je(i, t) { + return va && !zr(i, [0, 0]) && i[0] >= -180 && i[0] <= 180 && i[1] >= -90 && i[1] <= 90 && (va = !1, console.warn( "Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates." )), i; } -function Xu(i, t) { +function Ku(i, t) { return i; } -function Pi(i, t) { +function Bi(i, t) { return i; } -function Sh(i, t, e) { +function Th(i, t, e) { return function(n) { let s, r; if (i.canWrapX()) { const o = i.getExtent(), a = mt(o); - n = n.slice(0), r = Fu(n, i, a), r && (n[0] = n[0] - r * a), n[0] = wt(n[0], o[0], o[2]), n[1] = wt(n[1], o[1], o[3]), s = e(n); + n = n.slice(0), r = ku(n, i, a), r && (n[0] = n[0] - r * a), n[0] = wt(n[0], o[0], o[2]), n[1] = wt(n[1], o[1], o[3]), s = e(n); } else s = e(n); return r && t.canWrapX() && (s[0] += r * mt(t.getExtent())), s; }; } -function Mg() { - ma(xh), ma(Ch), yg( - Ch, - xh, - cg, - ug +function xg() { + xa(wh), xa(Rh), _g( + Rh, + wh, + hg, + cg ); } -Mg(); -function Rh(i, t, e) { +xg(); +function Ih(i, t, e) { return function(n, s, r, o, a) { if (!n) return; @@ -2915,58 +2925,58 @@ function Rh(i, t, e) { const l = t ? 0 : r[0] * s, h = t ? 0 : r[1] * s, c = a ? a[0] : 0, u = a ? a[1] : 0; let d = i[0] + l / 2 + c, f = i[2] - l / 2 + c, g = i[1] + h / 2 + u, m = i[3] - h / 2 + u; d > f && (d = (f + d) / 2, f = d), g > m && (g = (m + g) / 2, m = g); - let _ = wt(n[0], d, f), y = wt(n[1], g, m); + let p = wt(n[0], d, f), _ = wt(n[1], g, m); if (o && e && s) { - const p = 30 * s; - _ += -p * Math.log(1 + Math.max(0, d - n[0]) / p) + p * Math.log(1 + Math.max(0, n[0] - f) / p), y += -p * Math.log(1 + Math.max(0, g - n[1]) / p) + p * Math.log(1 + Math.max(0, n[1] - m) / p); + const y = 30 * s; + p += -y * Math.log(1 + Math.max(0, d - n[0]) / y) + y * Math.log(1 + Math.max(0, n[0] - f) / y), _ += -y * Math.log(1 + Math.max(0, g - n[1]) / y) + y * Math.log(1 + Math.max(0, n[1] - m) / y); } - return [_, y]; + return [p, _]; }; } function Cg(i) { return i; } -function sl(i, t, e, n) { - const s = mt(t) / e[0], r = Ne(t) / e[1]; +function hl(i, t, e, n) { + const s = mt(t) / e[0], r = Ge(t) / e[1]; return n ? Math.min(i, Math.max(s, r)) : Math.min(i, Math.min(s, r)); } -function rl(i, t, e) { +function cl(i, t, e) { let n = Math.min(i, t); const s = 50; return n *= Math.log(1 + s * Math.max(0, i / t - 1)) / s + 1, e && (n = Math.max(n, e), n /= Math.log(1 + s * Math.max(0, e / i - 1)) / s + 1), wt(n, e / 2, t * 2); } -function Eg(i, t, e, n) { +function Mg(i, t, e, n) { return t = t !== void 0 ? t : !0, function(s, r, o, a) { if (s !== void 0) { - const l = i[0], h = i[i.length - 1], c = e ? sl( + const l = i[0], h = i[i.length - 1], c = e ? hl( l, e, o, n ) : l; if (a) - return t ? rl( + return t ? cl( s, c, h ) : wt(s, h, c); - const u = Math.min(c, s), d = Math.floor(Wa(i, u, r)); + const u = Math.min(c, s), d = Math.floor(Ka(i, u, r)); return i[d] > c && d < i.length - 1 ? i[d + 1] : i[d]; } else return; }; } -function wg(i, t, e, n, s, r) { +function Eg(i, t, e, n, s, r) { return n = n !== void 0 ? n : !0, e = e !== void 0 ? e : 0, function(o, a, l, h) { if (o !== void 0) { - const c = s ? sl( + const c = s ? hl( t, s, l, r ) : t; if (h) - return n ? rl( + return n ? cl( o, c, e @@ -2975,22 +2985,22 @@ function wg(i, t, e, n, s, r) { Math.log(t / c) / Math.log(i) - u ), f = -a * (0.5 - u) + 0.5, g = Math.min(c, o), m = Math.floor( Math.log(t / g) / Math.log(i) + f - ), _ = Math.max(d, m), y = t / Math.pow(i, _); - return wt(y, e, c); + ), p = Math.max(d, m), _ = t / Math.pow(i, p); + return wt(_, e, c); } else return; }; } -function bh(i, t, e, n, s) { +function Ah(i, t, e, n, s) { return e = e !== void 0 ? e : !0, function(r, o, a, l) { if (r !== void 0) { - const h = n ? sl( + const h = n ? hl( i, n, a, s ) : i; - return !e || !l ? wt(r, t, h) : rl( + return !e || !l ? wt(r, t, h) : cl( r, h, t @@ -2999,15 +3009,15 @@ function bh(i, t, e, n, s) { return; }; } -function ol(i) { +function ul(i) { if (i !== void 0) return 0; } -function Lh(i) { +function Ph(i) { if (i !== void 0) return i; } -function Sg(i) { +function wg(i) { const t = 2 * Math.PI / i; return function(e, n) { if (n) @@ -3016,27 +3026,27 @@ function Sg(i) { return e = Math.floor(e / t + 0.5) * t, e; }; } -function Rg(i) { - return i = i || Gi(5), function(t, e) { +function Sg(i) { + return i = i || Hi(5), function(t, e) { if (e) return t; if (t !== void 0) return Math.abs(t) <= i ? 0 : t; }; } -function Yu(i) { +function qu(i) { return Math.pow(i, 3); } -function Vn(i) { - return 1 - Yu(1 - i); +function Jn(i) { + return 1 - qu(1 - i); } -function bg(i) { +function Rg(i) { return 3 * i * i - 2 * i * i * i; } -function Lg(i) { +function bg(i) { return i; } -function $i(i, t, e, n, s, r) { +function Xi(i, t, e, n, s, r) { r = r || []; let o = 0; for (let a = t; a < e; a += n) { @@ -3045,7 +3055,7 @@ function $i(i, t, e, n, s, r) { } return r && r.length != o && (r.length = o), r; } -function ju(i, t, e, n, s, r, o) { +function Ju(i, t, e, n, s, r, o) { o = o || []; const a = Math.cos(s), l = Math.sin(s), h = r[0], c = r[1]; let u = 0; @@ -3057,7 +3067,7 @@ function ju(i, t, e, n, s, r, o) { } return o && o.length != u && (o.length = u), o; } -function Tg(i, t, e, n, s, r, o, a) { +function Lg(i, t, e, n, s, r, o, a) { a = a || []; const l = o[0], h = o[1]; let c = 0; @@ -3069,7 +3079,7 @@ function Tg(i, t, e, n, s, r, o, a) { } return a && a.length != c && (a.length = c), a; } -function Ig(i, t, e, n, s, r, o) { +function Tg(i, t, e, n, s, r, o) { o = o || []; let a = 0; for (let l = t; l < e; l += n) { @@ -3079,10 +3089,10 @@ function Ig(i, t, e, n, s, r, o) { } return o && o.length != a && (o.length = a), o; } -const Th = Pe(); -class Ag extends Se { +const Oh = De(); +class Ig extends Ce { constructor() { - super(), this.extent_ = ue(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = n0(function(t, e, n) { + super(), this.extent_ = fe(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = Qf(function(t, e, n) { if (!n) return this.getSimplifiedGeometry(e); const s = this.clone(); @@ -3097,10 +3107,10 @@ class Ag extends Se { ); } clone() { - return W(); + return V(); } closestPointXY(t, e, n, s) { - return W(); + return V(); } containsXY(t, e) { const n = this.getClosestPoint([t, e]); @@ -3113,44 +3123,44 @@ class Ag extends Se { return this.containsXY(t[0], t[1]); } computeExtent(t) { - return W(); + return V(); } getExtent(t) { if (this.extentRevision_ != this.getRevision()) { const e = this.computeExtent(this.extent_); - (isNaN(e[0]) || isNaN(e[1])) && ks(e), this.extentRevision_ = this.getRevision(); + (isNaN(e[0]) || isNaN(e[1])) && Vs(e), this.extentRevision_ = this.getRevision(); } - return E0(this.extent_, t); + return x0(this.extent_, t); } rotate(t, e) { - W(); + V(); } scale(t, e, n) { - W(); + V(); } simplify(t) { return this.getSimplifiedGeometry(t * t); } getSimplifiedGeometry(t) { - return W(); + return V(); } getType() { - return W(); + return V(); } applyTransform(t) { - W(); + V(); } intersectsExtent(t) { - return W(); + return V(); } translate(t, e) { - W(); + V(); } transform(t, e) { - const n = J(t), s = n.getUnits() == "tile-pixels" ? function(r, o, a) { - const l = n.getExtent(), h = n.getWorldExtent(), c = Ne(h) / Ne(l); - return xi( - Th, + const n = q(t), s = n.getUnits() == "tile-pixels" ? function(r, o, a) { + const l = n.getExtent(), h = n.getWorldExtent(), c = Ge(h) / Ge(l); + return bi( + Oh, h[0], h[3], c, @@ -3158,29 +3168,29 @@ class Ag extends Se { 0, 0, 0 - ), $i( + ), Xi( r, 0, r.length, a, - Th, + Oh, o - ), Ss(n, e)( + ), Ns(n, e)( r, o, a ); - } : Ss(n, e); + } : Ns(n, e); return this.applyTransform(s), this; } } -const Ku = Ag; -class Pg extends Ku { +const Qu = Ig; +class Ag extends Qu { constructor() { super(), this.layout = "XY", this.stride = 2, this.flatCoordinates = null; } computeExtent(t) { - return Eu( + return Su( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -3189,7 +3199,7 @@ class Pg extends Ku { ); } getCoordinates() { - return W(); + return V(); } getFirstCoordinate() { return this.flatCoordinates.slice(0, this.stride); @@ -3218,15 +3228,15 @@ class Pg extends Ku { return this.stride; } setFlatCoordinates(t, e) { - this.stride = Ih(t), this.layout = t, this.flatCoordinates = e; + this.stride = Nh(t), this.layout = t, this.flatCoordinates = e; } setCoordinates(t, e) { - W(); + V(); } setLayout(t, e, n) { let s; if (t) - s = Ih(t); + s = Nh(t); else { for (let r = 0; r < n; ++r) if (e.length === 0) { @@ -3234,7 +3244,7 @@ class Pg extends Ku { return; } else e = e[0]; - s = e.length, t = Og(s); + s = e.length, t = Pg(s); } this.layout = t, this.stride = s; } @@ -3245,7 +3255,7 @@ class Pg extends Ku { const n = this.getFlatCoordinates(); if (n) { const s = this.getStride(); - ju( + Ju( n, 0, n.length, @@ -3257,11 +3267,11 @@ class Pg extends Ku { } } scale(t, e, n) { - e === void 0 && (e = t), n || (n = Mi(this.getExtent())); + e === void 0 && (e = t), n || (n = Li(this.getExtent())); const s = this.getFlatCoordinates(); if (s) { const r = this.getStride(); - Tg( + Lg( s, 0, s.length, @@ -3277,7 +3287,7 @@ class Pg extends Ku { const n = this.getFlatCoordinates(); if (n) { const s = this.getStride(); - Ig( + Tg( n, 0, n.length, @@ -3289,19 +3299,19 @@ class Pg extends Ku { } } } -function Og(i) { +function Pg(i) { let t; return i == 2 ? t = "XY" : i == 3 ? t = "XYZ" : i == 4 && (t = "XYZM"), t; } -function Ih(i) { +function Nh(i) { let t; return i == "XY" ? t = 2 : i == "XYZ" || i == "XYM" ? t = 3 : i == "XYZM" && (t = 4), t; } -function Ng(i, t, e) { +function Og(i, t, e) { const n = i.getFlatCoordinates(); if (n) { const s = i.getStride(); - return $i( + return Xi( n, 0, n.length, @@ -3312,8 +3322,8 @@ function Ng(i, t, e) { } else return null; } -const Qi = Pg; -function Ah(i, t, e, n, s, r, o) { +const on = Ag; +function Fh(i, t, e, n, s, r, o) { const a = i[t], l = i[t + 1], h = i[e] - a, c = i[e + 1] - l; let u; if (h === 0 && c === 0) @@ -3324,7 +3334,7 @@ function Ah(i, t, e, n, s, r, o) { u = e; else if (d > 0) { for (let f = 0; f < n; ++f) - o[f] = Ye( + o[f] = ti( i[t + f], i[e + f], d @@ -3338,34 +3348,34 @@ function Ah(i, t, e, n, s, r, o) { o[d] = i[u + d]; o.length = n; } -function al(i, t, e, n, s) { +function dl(i, t, e, n, s) { let r = i[t], o = i[t + 1]; for (t += n; t < e; t += n) { - const a = i[t], l = i[t + 1], h = ki(r, o, a, l); + const a = i[t], l = i[t + 1], h = Wi(r, o, a, l); h > s && (s = h), r = a, o = l; } return s; } -function ll(i, t, e, n, s) { +function fl(i, t, e, n, s) { for (let r = 0, o = e.length; r < o; ++r) { const a = e[r]; - s = al(i, t, a, n, s), t = a; + s = dl(i, t, a, n, s), t = a; } return s; } -function Fg(i, t, e, n, s) { +function Ng(i, t, e, n, s) { for (let r = 0, o = e.length; r < o; ++r) { const a = e[r]; - s = ll(i, t, a, n, s), t = a[a.length - 1]; + s = fl(i, t, a, n, s), t = a[a.length - 1]; } return s; } -function hl(i, t, e, n, s, r, o, a, l, h, c) { +function gl(i, t, e, n, s, r, o, a, l, h, c) { if (t == e) return h; let u, d; if (s === 0) - if (d = ki( + if (d = Wi( o, a, i[t], @@ -3379,7 +3389,7 @@ function hl(i, t, e, n, s, r, o, a, l, h, c) { c = c || [NaN, NaN]; let f = t + n; for (; f < e; ) - if (Ah( + if (Fh( i, f - n, f, @@ -3387,7 +3397,7 @@ function hl(i, t, e, n, s, r, o, a, l, h, c) { o, a, c - ), d = ki(o, a, c[0], c[1]), d < h) { + ), d = Wi(o, a, c[0], c[1]), d < h) { for (h = d, u = 0; u < n; ++u) l[u] = c[u]; l.length = n, f += n; @@ -3396,7 +3406,7 @@ function hl(i, t, e, n, s, r, o, a, l, h, c) { (Math.sqrt(d) - Math.sqrt(h)) / s | 0, 1 ); - if (r && (Ah( + if (r && (Fh( i, e - n, t, @@ -3404,18 +3414,18 @@ function hl(i, t, e, n, s, r, o, a, l, h, c) { o, a, c - ), d = ki(o, a, c[0], c[1]), d < h)) { + ), d = Wi(o, a, c[0], c[1]), d < h)) { for (h = d, u = 0; u < n; ++u) l[u] = c[u]; l.length = n; } return h; } -function cl(i, t, e, n, s, r, o, a, l, h, c) { +function ml(i, t, e, n, s, r, o, a, l, h, c) { c = c || [NaN, NaN]; for (let u = 0, d = e.length; u < d; ++u) { const f = e[u]; - h = hl( + h = gl( i, t, f, @@ -3431,11 +3441,11 @@ function cl(i, t, e, n, s, r, o, a, l, h, c) { } return h; } -function Dg(i, t, e, n, s, r, o, a, l, h, c) { +function Fg(i, t, e, n, s, r, o, a, l, h, c) { c = c || [NaN, NaN]; for (let u = 0, d = e.length; u < d; ++u) { const f = e[u]; - h = cl( + h = ml( i, t, f, @@ -3451,12 +3461,12 @@ function Dg(i, t, e, n, s, r, o, a, l, h, c) { } return h; } -function kg(i, t, e, n) { +function Dg(i, t, e, n) { for (let s = 0, r = e.length; s < r; ++s) i[t++] = e[s]; return t; } -function _o(i, t, e, n) { +function Mo(i, t, e, n) { for (let s = 0, r = e.length; s < r; ++s) { const o = e[s]; for (let a = 0; a < n; ++a) @@ -3464,11 +3474,11 @@ function _o(i, t, e, n) { } return t; } -function ul(i, t, e, n, s) { +function pl(i, t, e, n, s) { s = s || []; let r = 0; for (let o = 0, a = e.length; o < a; ++o) { - const l = _o( + const l = Mo( i, t, e[o], @@ -3478,11 +3488,11 @@ function ul(i, t, e, n, s) { } return s.length = r, s; } -function Gg(i, t, e, n, s) { +function kg(i, t, e, n, s) { s = s || []; let r = 0; for (let o = 0, a = e.length; o < a; ++o) { - const l = ul( + const l = pl( i, t, e[o], @@ -3493,7 +3503,7 @@ function Gg(i, t, e, n, s) { } return s.length = r, s; } -function dl(i, t, e, n, s, r, o) { +function _l(i, t, e, n, s, r, o) { const a = (e - t) / n; if (a < 3) { for (; t < e; t += n) @@ -3507,10 +3517,10 @@ function dl(i, t, e, n, s, r, o) { for (; h.length > 0; ) { const u = h.pop(), d = h.pop(); let f = 0; - const g = i[d], m = i[d + 1], _ = i[u], y = i[u + 1]; - for (let p = d + n; p < u; p += n) { - const v = i[p], x = i[p + 1], M = b0(v, x, g, m, _, y); - M > f && (c = p, f = M); + const g = i[d], m = i[d + 1], p = i[u], _ = i[u + 1]; + for (let y = d + n; y < u; y += n) { + const v = i[y], x = i[y + 1], C = w0(v, x, g, m, p, _); + C > f && (c = y, f = C); } f > s && (l[(c - t) / n] = 1, d + n < c && h.push(d, c), c + n < u && h.push(c, u)); } @@ -3518,10 +3528,10 @@ function dl(i, t, e, n, s, r, o) { l[u] && (r[o++] = i[t + u * n], r[o++] = i[t + u * n + 1]); return o; } -function $g(i, t, e, n, s, r, o, a) { +function Gg(i, t, e, n, s, r, o, a) { for (let l = 0, h = e.length; l < h; ++l) { const c = e[l]; - o = dl( + o = _l( i, t, c, @@ -3533,25 +3543,25 @@ function $g(i, t, e, n, s, r, o, a) { } return o; } -function Ti(i, t) { +function Gi(i, t) { return t * Math.round(i / t); } -function Bg(i, t, e, n, s, r, o) { +function $g(i, t, e, n, s, r, o) { if (t == e) return o; - let a = Ti(i[t], s), l = Ti(i[t + 1], s); + let a = Gi(i[t], s), l = Gi(i[t + 1], s); t += n, r[o++] = a, r[o++] = l; let h, c; do - if (h = Ti(i[t], s), c = Ti(i[t + 1], s), t += n, t == e) + if (h = Gi(i[t], s), c = Gi(i[t + 1], s), t += n, t == e) return r[o++] = h, r[o++] = c, o; while (h == a && c == l); for (; t < e; ) { - const u = Ti(i[t], s), d = Ti(i[t + 1], s); + const u = Gi(i[t], s), d = Gi(i[t + 1], s); if (t += n, u == h && d == c) continue; - const f = h - a, g = c - l, m = u - a, _ = d - l; - if (f * _ == g * m && (f < 0 && m < f || f == m || f > 0 && m > f) && (g < 0 && _ < g || g == _ || g > 0 && _ > g)) { + const f = h - a, g = c - l, m = u - a, p = d - l; + if (f * p == g * m && (f < 0 && m < f || f == m || f > 0 && m > f) && (g < 0 && p < g || g == p || g > 0 && p > g)) { h = u, c = d; continue; } @@ -3559,10 +3569,10 @@ function Bg(i, t, e, n, s, r, o) { } return r[o++] = h, r[o++] = c, o; } -function qu(i, t, e, n, s, r, o, a) { +function td(i, t, e, n, s, r, o, a) { for (let l = 0, h = e.length; l < h; ++l) { const c = e[l]; - o = Bg( + o = $g( i, t, c, @@ -3574,10 +3584,10 @@ function qu(i, t, e, n, s, r, o, a) { } return o; } -function zg(i, t, e, n, s, r, o, a) { +function Bg(i, t, e, n, s, r, o, a) { for (let l = 0, h = e.length; l < h; ++l) { const c = e[l], u = []; - o = qu( + o = td( i, t, c, @@ -3590,19 +3600,19 @@ function zg(i, t, e, n, s, r, o, a) { } return o; } -function gi(i, t, e, n, s) { +function Ci(i, t, e, n, s) { s = s !== void 0 ? s : []; let r = 0; for (let o = t; o < e; o += n) s[r++] = i.slice(o, o + n); return s.length = r, s; } -function Rs(i, t, e, n, s) { +function Fs(i, t, e, n, s) { s = s !== void 0 ? s : []; let r = 0; for (let o = 0, a = e.length; o < a; ++o) { const l = e[o]; - s[r++] = gi( + s[r++] = Ci( i, t, l, @@ -3612,12 +3622,12 @@ function Rs(i, t, e, n, s) { } return s.length = r, s; } -function pa(i, t, e, n, s) { +function Ma(i, t, e, n, s) { s = s !== void 0 ? s : []; let r = 0; for (let o = 0, a = e.length; o < a; ++o) { const l = e[o]; - s[r++] = l.length === 1 && l[0] === t ? [] : Rs( + s[r++] = l.length === 1 && l[0] === t ? [] : Fs( i, t, l, @@ -3627,7 +3637,7 @@ function pa(i, t, e, n, s) { } return s.length = r, s; } -function Ju(i, t, e, n) { +function ed(i, t, e, n) { let s = 0, r = i[e - n], o = i[e - n + 1]; for (; t < e; t += n) { const a = i[t], l = i[t + 1]; @@ -3635,23 +3645,23 @@ function Ju(i, t, e, n) { } return s / 2; } -function Qu(i, t, e, n) { +function id(i, t, e, n) { let s = 0; for (let r = 0, o = e.length; r < o; ++r) { const a = e[r]; - s += Ju(i, t, a, n), t = a; + s += ed(i, t, a, n), t = a; } return s; } -function Zg(i, t, e, n) { +function zg(i, t, e, n) { let s = 0; for (let r = 0, o = e.length; r < o; ++r) { const a = e[r]; - s += Qu(i, t, a, n), t = a[a.length - 1]; + s += id(i, t, a, n), t = a[a.length - 1]; } return s; } -class Ur extends Qi { +class jr extends on { constructor(t, e) { super(), this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, e !== void 0 && !Array.isArray(t[0]) ? this.setFlatCoordinates( e, @@ -3662,18 +3672,18 @@ class Ur extends Qi { ); } clone() { - return new Ur(this.flatCoordinates.slice(), this.layout); + return new jr(this.flatCoordinates.slice(), this.layout); } closestPointXY(t, e, n, s) { - return s < qi(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( - al( + return s < rn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( + dl( this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0 ) - ), this.maxDeltaRevision_ = this.getRevision()), hl( + ), this.maxDeltaRevision_ = this.getRevision()), gl( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -3687,7 +3697,7 @@ class Ur extends Qi { )); } getArea() { - return Ju( + return ed( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -3695,7 +3705,7 @@ class Ur extends Qi { ); } getCoordinates() { - return gi( + return Ci( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -3704,7 +3714,7 @@ class Ur extends Qi { } getSimplifiedGeometryInternal(t) { const e = []; - return e.length = dl( + return e.length = _l( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -3712,7 +3722,7 @@ class Ur extends Qi { t, e, 0 - ), new Ur(e, "XY"); + ), new jr(e, "XY"); } getType() { return "LinearRing"; @@ -3721,7 +3731,7 @@ class Ur extends Qi { return !1; } setCoordinates(t, e) { - this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = _o( + this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Mo( this.flatCoordinates, 0, t, @@ -3729,17 +3739,17 @@ class Ur extends Qi { ), this.changed(); } } -const ya = Ur; -class fl extends Qi { +const Ea = jr; +class yl extends on { constructor(t, e) { super(), this.setCoordinates(t, e); } clone() { - const t = new fl(this.flatCoordinates.slice(), this.layout); + const t = new yl(this.flatCoordinates.slice(), this.layout); return t.applyProperties(this), t; } closestPointXY(t, e, n, s) { - const r = this.flatCoordinates, o = ki( + const r = this.flatCoordinates, o = Wi( t, e, r[0], @@ -3757,16 +3767,16 @@ class fl extends Qi { return this.flatCoordinates ? this.flatCoordinates.slice() : []; } computeExtent(t) { - return Cu(this.flatCoordinates, t); + return wu(this.flatCoordinates, t); } getType() { return "Point"; } intersectsExtent(t) { - return Ya(t, this.flatCoordinates[0], this.flatCoordinates[1]); + return Qa(t, this.flatCoordinates[0], this.flatCoordinates[1]); } setCoordinates(t, e) { - this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = kg( + this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Dg( this.flatCoordinates, 0, t, @@ -3774,12 +3784,12 @@ class fl extends Qi { ), this.changed(); } } -const Ci = fl; -function Ug(i, t, e, n, s) { - return !Ru( +const oi = yl; +function Zg(i, t, e, n, s) { + return !Lu( s, function(o) { - return !Oi( + return !zi( i, t, e, @@ -3790,7 +3800,7 @@ function Ug(i, t, e, n, s) { } ); } -function Oi(i, t, e, n, s, r) { +function zi(i, t, e, n, s, r) { let o = 0, a = i[e - n], l = i[e - n + 1]; for (; t < e; t += n) { const h = i[t], c = i[t + 1]; @@ -3798,46 +3808,46 @@ function Oi(i, t, e, n, s, r) { } return o !== 0; } -function gl(i, t, e, n, s, r) { - if (e.length === 0 || !Oi(i, t, e[0], n, s, r)) +function vl(i, t, e, n, s, r) { + if (e.length === 0 || !zi(i, t, e[0], n, s, r)) return !1; for (let o = 1, a = e.length; o < a; ++o) - if (Oi(i, e[o - 1], e[o], n, s, r)) + if (zi(i, e[o - 1], e[o], n, s, r)) return !1; return !0; } -function Vg(i, t, e, n, s, r) { +function Ug(i, t, e, n, s, r) { if (e.length === 0) return !1; for (let o = 0, a = e.length; o < a; ++o) { const l = e[o]; - if (gl(i, t, l, n, s, r)) + if (vl(i, t, l, n, s, r)) return !0; t = l[l.length - 1]; } return !1; } -function td(i, t, e, n, s, r, o) { +function nd(i, t, e, n, s, r, o) { let a, l, h, c, u, d, f; const g = s[r + 1], m = []; - for (let p = 0, v = e.length; p < v; ++p) { - const x = e[p]; + for (let y = 0, v = e.length; y < v; ++y) { + const x = e[y]; for (c = i[x - n], d = i[x - n + 1], a = t; a < x; a += n) u = i[a], f = i[a + 1], (g <= d && f <= g || d <= g && g <= f) && (h = (g - d) / (f - d) * (u - c) + c, m.push(h)), c = u, d = f; } - let _ = NaN, y = -1 / 0; - for (m.sort(Zi), c = m[0], a = 1, l = m.length; a < l; ++a) { + let p = NaN, _ = -1 / 0; + for (m.sort(Ki), c = m[0], a = 1, l = m.length; a < l; ++a) { u = m[a]; - const p = Math.abs(u - c); - p > y && (h = (c + u) / 2, gl(i, t, e, n, h, g) && (_ = h, y = p)), c = u; + const y = Math.abs(u - c); + y > _ && (h = (c + u) / 2, vl(i, t, e, n, h, g) && (p = h, _ = y)), c = u; } - return isNaN(_) && (_ = s[r]), o ? (o.push(_, g, y), o) : [_, g, y]; + return isNaN(p) && (p = s[r]), o ? (o.push(p, g, _), o) : [p, g, _]; } -function Wg(i, t, e, n, s) { +function Vg(i, t, e, n, s) { let r = []; for (let o = 0, a = e.length; o < a; ++o) { const l = e[o]; - r = td( + r = nd( i, t, l, @@ -3849,7 +3859,7 @@ function Wg(i, t, e, n, s) { } return r; } -function ed(i, t, e, n, s) { +function sd(i, t, e, n, s) { let r; for (t += n; t < e; t += n) if (r = s( @@ -3859,55 +3869,55 @@ function ed(i, t, e, n, s) { return r; return !1; } -function po(i, t, e, n, s) { - const r = Su( - ue(), +function Eo(i, t, e, n, s) { + const r = bu( + fe(), i, t, e, n ); - return Qt(s, r) ? Ii(s, r) || r[0] >= s[0] && r[2] <= s[2] || r[1] >= s[1] && r[3] <= s[3] ? !0 : ed( + return ie(s, r) ? xi(s, r) || r[0] >= s[0] && r[2] <= s[2] || r[1] >= s[1] && r[3] <= s[3] ? !0 : sd( i, t, e, n, function(o, a) { - return w0(s, o, a); + return C0(s, o, a); } ) : !1; } -function Hg(i, t, e, n, s) { +function Wg(i, t, e, n, s) { for (let r = 0, o = e.length; r < o; ++r) { - if (po(i, t, e[r], n, s)) + if (Eo(i, t, e[r], n, s)) return !0; t = e[r]; } return !1; } -function id(i, t, e, n, s) { - return !!(po(i, t, e, n, s) || Oi( +function rd(i, t, e, n, s) { + return !!(Eo(i, t, e, n, s) || zi( i, t, e, n, s[0], s[1] - ) || Oi( + ) || zi( i, t, e, n, s[0], s[3] - ) || Oi( + ) || zi( i, t, e, n, s[2], s[1] - ) || Oi( + ) || zi( i, t, e, @@ -3916,19 +3926,19 @@ function id(i, t, e, n, s) { s[3] )); } -function nd(i, t, e, n, s) { - if (!id(i, t, e[0], n, s)) +function od(i, t, e, n, s) { + if (!rd(i, t, e[0], n, s)) return !1; if (e.length === 1) return !0; for (let r = 1, o = e.length; r < o; ++r) - if (Ug( + if (Zg( i, e[r - 1], e[r], n, s - ) && !po( + ) && !Eo( i, e[r - 1], e[r], @@ -3938,16 +3948,16 @@ function nd(i, t, e, n, s) { return !1; return !0; } -function Xg(i, t, e, n, s) { +function Hg(i, t, e, n, s) { for (let r = 0, o = e.length; r < o; ++r) { const a = e[r]; - if (nd(i, t, a, n, s)) + if (od(i, t, a, n, s)) return !0; t = a[a.length - 1]; } return !1; } -function Yg(i, t, e, n) { +function Xg(i, t, e, n) { for (; t < e - n; ) { for (let s = 0; s < n; ++s) { const r = i[t + s]; @@ -3956,7 +3966,7 @@ function Yg(i, t, e, n) { t += n, e -= n; } } -function sd(i, t, e, n) { +function ad(i, t, e, n) { let s = 0, r = i[e - n], o = i[e - n + 1]; for (; t < e; t += n) { const a = i[t], l = i[t + 1]; @@ -3964,10 +3974,10 @@ function sd(i, t, e, n) { } return s === 0 ? void 0 : s > 0; } -function rd(i, t, e, n, s) { +function ld(i, t, e, n, s) { s = s !== void 0 ? s : !1; for (let r = 0, o = e.length; r < o; ++r) { - const a = e[r], l = sd( + const a = e[r], l = ad( i, t, a, @@ -3982,31 +3992,31 @@ function rd(i, t, e, n, s) { } return !0; } -function jg(i, t, e, n, s) { +function Yg(i, t, e, n, s) { for (let r = 0, o = e.length; r < o; ++r) { const a = e[r]; - if (!rd(i, t, a, n, s)) + if (!ld(i, t, a, n, s)) return !1; a.length && (t = a[a.length - 1]); } return !0; } -function va(i, t, e, n, s) { +function wa(i, t, e, n, s) { s = s !== void 0 ? s : !1; for (let r = 0, o = e.length; r < o; ++r) { - const a = e[r], l = sd( + const a = e[r], l = ad( i, t, a, n ); - (r === 0 ? s && l || !s && !l : s && !l || !s && l) && Yg(i, t, a, n), t = a; + (r === 0 ? s && l || !s && !l : s && !l || !s && l) && Xg(i, t, a, n), t = a; } return t; } -function Ph(i, t, e, n, s) { +function Dh(i, t, e, n, s) { for (let r = 0, o = e.length; r < o; ++r) - t = va( + t = wa( i, t, e[r], @@ -4015,7 +4025,7 @@ function Ph(i, t, e, n, s) { ); return t; } -class Fn extends Qi { +class Zn extends on { constructor(t, e, n) { super(), this.ends_ = [], this.flatInteriorPointRevision_ = -1, this.flatInteriorPoint_ = null, this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, this.orientedRevision_ = -1, this.orientedFlatCoordinates_ = null, e !== void 0 && n ? (this.setFlatCoordinates( e, @@ -4026,10 +4036,10 @@ class Fn extends Qi { ); } appendLinearRing(t) { - this.flatCoordinates ? Ht(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed(); + this.flatCoordinates ? Kt(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed(); } clone() { - const t = new Fn( + const t = new Zn( this.flatCoordinates.slice(), this.layout, this.ends_.slice() @@ -4037,15 +4047,15 @@ class Fn extends Qi { return t.applyProperties(this), t; } closestPointXY(t, e, n, s) { - return s < qi(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( - ll( + return s < rn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( + fl( this.flatCoordinates, 0, this.ends_, this.stride, 0 ) - ), this.maxDeltaRevision_ = this.getRevision()), cl( + ), this.maxDeltaRevision_ = this.getRevision()), ml( this.flatCoordinates, 0, this.ends_, @@ -4059,7 +4069,7 @@ class Fn extends Qi { )); } containsXY(t, e) { - return gl( + return vl( this.getOrientedFlatCoordinates(), 0, this.ends_, @@ -4069,7 +4079,7 @@ class Fn extends Qi { ); } getArea() { - return Qu( + return id( this.getOrientedFlatCoordinates(), 0, this.ends_, @@ -4078,15 +4088,15 @@ class Fn extends Qi { } getCoordinates(t) { let e; - return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), va(e, 0, this.ends_, this.stride, t)) : e = this.flatCoordinates, Rs(e, 0, this.ends_, this.stride); + return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), wa(e, 0, this.ends_, this.stride, t)) : e = this.flatCoordinates, Fs(e, 0, this.ends_, this.stride); } getEnds() { return this.ends_; } getFlatInteriorPoint() { if (this.flatInteriorPointRevision_ != this.getRevision()) { - const t = Mi(this.getExtent()); - this.flatInteriorPoint_ = td( + const t = Li(this.getExtent()); + this.flatInteriorPoint_ = nd( this.getOrientedFlatCoordinates(), 0, this.ends_, @@ -4098,13 +4108,13 @@ class Fn extends Qi { return this.flatInteriorPoint_; } getInteriorPoint() { - return new Ci(this.getFlatInteriorPoint(), "XYM"); + return new oi(this.getFlatInteriorPoint(), "XYM"); } getLinearRingCount() { return this.ends_.length; } getLinearRing(t) { - return t < 0 || this.ends_.length <= t ? null : new ya( + return t < 0 || this.ends_.length <= t ? null : new Ea( this.flatCoordinates.slice( t === 0 ? 0 : this.ends_[t - 1], this.ends_[t] @@ -4116,7 +4126,7 @@ class Fn extends Qi { const t = this.layout, e = this.flatCoordinates, n = this.ends_, s = []; let r = 0; for (let o = 0, a = n.length; o < a; ++o) { - const l = n[o], h = new ya( + const l = n[o], h = new Ea( e.slice(r, l), t ); @@ -4127,7 +4137,7 @@ class Fn extends Qi { getOrientedFlatCoordinates() { if (this.orientedRevision_ != this.getRevision()) { const t = this.flatCoordinates; - rd(t, 0, this.ends_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = va( + ld(t, 0, this.ends_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = wa( this.orientedFlatCoordinates_, 0, this.ends_, @@ -4138,7 +4148,7 @@ class Fn extends Qi { } getSimplifiedGeometryInternal(t) { const e = [], n = []; - return e.length = qu( + return e.length = td( this.flatCoordinates, 0, this.ends_, @@ -4147,13 +4157,13 @@ class Fn extends Qi { e, 0, n - ), new Fn(e, "XY", n); + ), new Zn(e, "XY", n); } getType() { return "Polygon"; } intersectsExtent(t) { - return nd( + return od( this.getOrientedFlatCoordinates(), 0, this.ends_, @@ -4163,7 +4173,7 @@ class Fn extends Qi { } setCoordinates(t, e) { this.setLayout(e, t, 2), this.flatCoordinates || (this.flatCoordinates = []); - const n = ul( + const n = pl( this.flatCoordinates, 0, t, @@ -4173,18 +4183,18 @@ class Fn extends Qi { this.flatCoordinates.length = n.length === 0 ? 0 : n[n.length - 1], this.changed(); } } -const Dn = Fn; -function Kg(i, t, e, n) { +const Un = Zn; +function jg(i, t, e, n) { e = e || 32; const s = []; for (let r = 0; r < e; ++r) - Ht( + Kt( s, - _g(i, t, 2 * Math.PI * r / e, n) + mg(i, t, 2 * Math.PI * r / e, n) ); - return s.push(s[0], s[1]), new Fn(s, "XY", [s.length]); + return s.push(s[0], s[1]), new Zn(s, "XY", [s.length]); } -function Oh(i) { +function kh(i) { const t = i[0], e = i[1], n = i[2], s = i[3], r = [ t, e, @@ -4197,21 +4207,21 @@ function Oh(i) { t, e ]; - return new Fn(r, "XY", [r.length]); + return new Zn(r, "XY", [r.length]); } -const $o = 0; -class qg extends Se { +const Ho = 0; +class Kg extends Ce { constructor(t) { - super(), this.on, this.once, this.un, t = Object.assign({}, t), this.hints_ = [0, 0], this.animations_ = [], this.updateAnimationKey_, this.projection_ = nl(t.projection, "EPSG:3857"), this.viewportSize_ = [100, 100], this.targetCenter_ = null, this.targetResolution_, this.targetRotation_, this.nextCenter_ = null, this.nextResolution_, this.nextRotation_, this.cancelAnchor_ = void 0, t.projection && Uu(), t.center && (t.center = Xe(t.center, this.projection_)), t.extent && (t.extent = Pi(t.extent, this.projection_)), this.applyOptions_(t); + super(), this.on, this.once, this.un, t = Object.assign({}, t), this.hints_ = [0, 0], this.animations_ = [], this.updateAnimationKey_, this.projection_ = ll(t.projection, "EPSG:3857"), this.viewportSize_ = [100, 100], this.targetCenter_ = null, this.targetResolution_, this.targetRotation_, this.nextCenter_ = null, this.nextResolution_, this.nextRotation_, this.cancelAnchor_ = void 0, t.projection && Hu(), t.center && (t.center = Je(t.center, this.projection_)), t.extent && (t.extent = Bi(t.extent, this.projection_)), this.applyOptions_(t); } applyOptions_(t) { const e = Object.assign({}, t); - for (const a in xe) + for (const a in Ee) delete e[a]; this.setProperties(e, !0); - const n = Qg(t); + const n = Jg(t); this.maxResolution_ = n.maxResolution, this.minResolution_ = n.minResolution, this.zoomFactor_ = n.zoomFactor, this.resolutions_ = t.resolutions, this.padding_ = t.padding, this.minZoom_ = n.minZoom; - const s = Jg(t), r = n.constraint, o = t1(t); + const s = qg(t), r = n.constraint, o = Qg(t); this.constraints_ = { center: s, resolution: r, @@ -4243,10 +4253,10 @@ class qg extends Se { const e = new Array(arguments.length); for (let n = 0; n < e.length; ++n) { let s = arguments[n]; - s.center && (s = Object.assign({}, s), s.center = Xe( + s.center && (s = Object.assign({}, s), s.center = Je( s.center, this.getProjection() - )), s.anchor && (s = Object.assign({}, s), s.anchor = Xe( + )), s.anchor && (s = Object.assign({}, s), s.anchor = Je( s.anchor, this.getProjection() )), e[n] = s; @@ -4262,7 +4272,7 @@ class qg extends Se { c.center && this.setCenterInternal(c.center), c.zoom !== void 0 ? this.setZoom(c.zoom) : c.resolution && this.setResolution(c.resolution), c.rotation !== void 0 && this.setRotation(c.rotation); } if (s === e) { - n && gr(n, !0); + n && yr(n, !0); return; } let r = Date.now(), o = this.targetCenter_.slice(), a = this.targetResolution_, l = this.targetRotation_; @@ -4273,30 +4283,30 @@ class qg extends Se { complete: !1, anchor: c.anchor, duration: c.duration !== void 0 ? c.duration : 1e3, - easing: c.easing || bg, + easing: c.easing || Rg, callback: n }; if (c.center && (u.sourceCenter = o, u.targetCenter = c.center.slice(), o = u.targetCenter), c.zoom !== void 0 ? (u.sourceResolution = a, u.targetResolution = this.getResolutionForZoom(c.zoom), a = u.targetResolution) : c.resolution && (u.sourceResolution = a, u.targetResolution = c.resolution, a = u.targetResolution), c.rotation !== void 0) { u.sourceRotation = l; - const d = Sn(c.rotation - l + Math.PI, 2 * Math.PI) - Math.PI; + const d = Pn(c.rotation - l + Math.PI, 2 * Math.PI) - Math.PI; u.targetRotation = l + d, l = u.targetRotation; } - e1(u) ? u.complete = !0 : r += u.duration, h.push(u); + t1(u) ? u.complete = !0 : r += u.duration, h.push(u); } - this.animations_.push(h), this.setHint(Bt.ANIMATING, 1), this.updateAnimations_(); + this.animations_.push(h), this.setHint(Zt.ANIMATING, 1), this.updateAnimations_(); } getAnimating() { - return this.hints_[Bt.ANIMATING] > 0; + return this.hints_[Zt.ANIMATING] > 0; } getInteracting() { - return this.hints_[Bt.INTERACTING] > 0; + return this.hints_[Zt.INTERACTING] > 0; } cancelAnimations() { - this.setHint(Bt.ANIMATING, -this.hints_[Bt.ANIMATING]); + this.setHint(Zt.ANIMATING, -this.hints_[Zt.ANIMATING]); let t; for (let e = 0, n = this.animations_.length; e < n; ++e) { const s = this.animations_[e]; - if (s[0].callback && gr(s[0].callback, !1), !t) + if (s[0].callback && yr(s[0].callback, !1), !t) for (let r = 0, o = s.length; r < o; ++r) { const a = s[r]; if (!a.complete) { @@ -4326,8 +4336,8 @@ class qg extends Se { if (l.sourceCenter) { const d = l.sourceCenter[0], f = l.sourceCenter[1], g = l.targetCenter[0], m = l.targetCenter[1]; this.nextCenter_ = l.targetCenter; - const _ = d + u * (g - d), y = f + u * (m - f); - this.targetCenter_ = [_, y]; + const p = d + u * (g - d), _ = f + u * (m - f); + this.targetCenter_ = [p, _]; } if (l.sourceResolution && l.targetResolution) { const d = u === 1 ? l.targetResolution : l.sourceResolution + u * (l.targetResolution - l.sourceResolution); @@ -4346,7 +4356,7 @@ class qg extends Se { this.nextResolution_ = l.targetResolution, this.targetResolution_ = d, this.applyTargetState_(!0); } if (l.sourceRotation !== void 0 && l.targetRotation !== void 0) { - const d = u === 1 ? Sn(l.targetRotation + Math.PI, 2 * Math.PI) - Math.PI : l.sourceRotation + u * (l.targetRotation - l.sourceRotation); + const d = u === 1 ? Pn(l.targetRotation + Math.PI, 2 * Math.PI) - Math.PI : l.sourceRotation + u * (l.targetRotation - l.sourceRotation); if (l.anchor) { const f = this.constraints_.rotation( d, @@ -4363,9 +4373,9 @@ class qg extends Se { break; } if (r) { - this.animations_[n] = null, this.setHint(Bt.ANIMATING, -1), this.nextCenter_ = null, this.nextResolution_ = NaN, this.nextRotation_ = NaN; + this.animations_[n] = null, this.setHint(Zt.ANIMATING, -1), this.nextCenter_ = null, this.nextResolution_ = NaN, this.nextRotation_ = NaN; const o = s[0].callback; - o && gr(o, !0); + o && yr(o, !0); } } this.animations_ = this.animations_.filter(Boolean), e && this.updateAnimationKey_ === void 0 && (this.updateAnimationKey_ = requestAnimationFrame( @@ -4375,7 +4385,7 @@ class qg extends Se { calculateCenterRotate(t, e) { let n; const s = this.getCenterInternal(); - return s !== void 0 && (n = [s[0] - e[0], s[1] - e[1]], qa(n, t - this.getRotation()), Pu(n, e)), n; + return s !== void 0 && (n = [s[0] - e[0], s[1] - e[1]], il(n, t - this.getRotation()), Nu(n, e)), n; } calculateCenterZoom(t, e) { let n; @@ -4402,10 +4412,10 @@ class qg extends Se { } getCenter() { const t = this.getCenterInternal(); - return t && _a(t, this.getProjection()); + return t && Ca(t, this.getProjection()); } getCenterInternal() { - return this.get(xe.CENTER); + return this.get(Ee.CENTER); } getConstraints() { return this.constraints_; @@ -4418,16 +4428,16 @@ class qg extends Se { } calculateExtent(t) { const e = this.calculateExtentInternal(t); - return Xu(e, this.getProjection()); + return Ku(e, this.getProjection()); } calculateExtentInternal(t) { t = t || this.getViewportSizeMinusPadding_(); const e = this.getCenterInternal(); - Y(e, 1); + X(e, 1); const n = this.getResolution(); - Y(n !== void 0, 2); + X(n !== void 0, 2); const s = this.getRotation(); - return Y(s !== void 0, 3), aa(e, n, s, t); + return X(s !== void 0, 3), fa(e, n, s, t); } getMaxResolution() { return this.maxResolution_; @@ -4454,20 +4464,20 @@ class qg extends Se { return this.projection_; } getResolution() { - return this.get(xe.RESOLUTION); + return this.get(Ee.RESOLUTION); } getResolutions() { return this.resolutions_; } getResolutionForExtent(t, e) { return this.getResolutionForExtentInternal( - Pi(t, this.getProjection()), + Bi(t, this.getProjection()), e ); } getResolutionForExtentInternal(t, e) { e = e || this.getViewportSizeMinusPadding_(); - const n = mt(t) / e[0], s = Ne(t) / e[1]; + const n = mt(t) / e[0], s = Ge(t) / e[1]; return Math.max(n, s); } getResolutionForValueFunction(t) { @@ -4478,7 +4488,7 @@ class qg extends Se { }; } getRotation() { - return this.get(xe.ROTATION); + return this.get(Ee.ROTATION); } getValueForResolutionFunction(t) { const e = Math.log(t || 2), n = this.getConstrainedResolution(this.maxResolution_), s = this.minResolution_, r = Math.log(n / s) / e; @@ -4500,7 +4510,7 @@ class qg extends Se { const r = this.padding_; if (r) { const o = this.getViewportSizeMinusPadding_(); - s = Bo( + s = Xo( s, this.getViewportSize_(), [o[0] / 2 + r[3], o[1] / 2 + r[0]], @@ -4527,7 +4537,7 @@ class qg extends Se { getZoomForResolution(t) { let e = this.minZoom_ || 0, n, s; if (this.resolutions_) { - const r = Wa(this.resolutions_, t, 1); + const r = Ka(this.resolutions_, t, 1); e = r, n = this.resolutions_[r], r == this.resolutions_.length - 1 ? s = 2 : s = n / this.resolutions_[r + 1]; } else n = this.maxResolution_, s = this.zoomFactor_; @@ -4548,19 +4558,19 @@ class qg extends Se { } fit(t, e) { let n; - if (Y( + if (X( Array.isArray(t) || typeof t.getSimplifiedGeometry == "function", 24 ), Array.isArray(t)) { - Y(!ja(t), 25); - const s = Pi(t, this.getProjection()); - n = Oh(s); + X(!tl(t), 25); + const s = Bi(t, this.getProjection()); + n = kh(s); } else if (t.getType() === "Circle") { - const s = Pi( + const s = Bi( t.getExtent(), this.getProjection() ); - n = Oh(s), n.rotate(this.getRotation(), Mi(s)); + n = kh(s), n.rotate(this.getRotation(), Li(s)); } else n = t; this.fitInternal(n, e); @@ -4587,9 +4597,9 @@ class qg extends Se { n[1] - s[0] - s[2] ]); l = isNaN(l) ? o : Math.max(l, o), l = this.getConstrainedResolution(l, r ? 0 : 1); - const h = this.getRotation(), c = Math.sin(h), u = Math.cos(h), d = Mi(a); + const h = this.getRotation(), c = Math.sin(h), u = Math.cos(h), d = Li(a); d[0] += (s[1] - s[3]) / 2 * l, d[1] += (s[0] - s[2]) / 2 * l; - const f = d[0] * u - d[1] * c, g = d[1] * u + d[0] * c, m = this.getConstrainedCenter([f, g], l), _ = e.callback ? e.callback : Ui; + const f = d[0] * u - d[1] * c, g = d[1] * u + d[0] * c, m = this.getConstrainedCenter([f, g], l), p = e.callback ? e.callback : qi; e.duration !== void 0 ? this.animateInternal( { resolution: l, @@ -4597,19 +4607,19 @@ class qg extends Se { duration: e.duration, easing: e.easing }, - _ - ) : (this.targetResolution_ = l, this.targetCenter_ = m, this.applyTargetState_(!1, !0), gr(_, !0)); + p + ) : (this.targetResolution_ = l, this.targetCenter_ = m, this.applyTargetState_(!1, !0), yr(p, !0)); } centerOn(t, e, n) { this.centerOnInternal( - Xe(t, this.getProjection()), + Je(t, this.getProjection()), e, n ); } centerOnInternal(t, e, n) { this.setCenterInternal( - Bo( + Xo( t, e, n, @@ -4622,7 +4632,7 @@ class qg extends Se { let r; const o = this.padding_; if (o && t) { - const a = this.getViewportSizeMinusPadding_(-n), l = Bo( + const a = this.getViewportSizeMinusPadding_(-n), l = Xo( t, s, [a[0] / 2 + o[3], a[1] / 2 + o[0]], @@ -4640,7 +4650,7 @@ class qg extends Se { return !!this.getCenterInternal() && this.getResolution() !== void 0; } adjustCenter(t) { - const e = _a(this.targetCenter_, this.getProjection()); + const e = Ca(this.targetCenter_, this.getProjection()); this.setCenter([ e[0] + t[0], e[1] + t[1] @@ -4654,7 +4664,7 @@ class qg extends Se { ]); } adjustResolution(t, e) { - e = e && Xe(e, this.getProjection()), this.adjustResolutionInternal(t, e); + e = e && Je(e, this.getProjection()), this.adjustResolutionInternal(t, e); } adjustResolutionInternal(t, e) { const n = this.getAnimating() || this.getInteracting(), s = this.getViewportSize_(this.getRotation()), r = this.constraints_.resolution( @@ -4669,7 +4679,7 @@ class qg extends Se { this.adjustResolution(Math.pow(this.zoomFactor_, -t), e); } adjustRotation(t, e) { - e && (e = Xe(e, this.getProjection())), this.adjustRotationInternal(t, e); + e && (e = Je(e, this.getProjection())), this.adjustRotationInternal(t, e); } adjustRotationInternal(t, e) { const n = this.getAnimating() || this.getInteracting(), s = this.constraints_.rotation( @@ -4680,7 +4690,7 @@ class qg extends Se { } setCenter(t) { this.setCenterInternal( - t && Xe(t, this.getProjection()) + t && Je(t, this.getProjection()) ); } setCenterInternal(t) { @@ -4719,7 +4729,7 @@ class qg extends Se { r ) ); - this.get(xe.ROTATION) !== s && this.set(xe.ROTATION, s), this.get(xe.RESOLUTION) !== o && (this.set(xe.RESOLUTION, o), this.set("zoom", this.getZoom(), !0)), (!a || !this.get(xe.CENTER) || !Dr(this.get(xe.CENTER), a)) && this.set(xe.CENTER, a), this.getAnimating() && !t && this.cancelAnimations(), this.cancelAnchor_ = void 0; + this.get(Ee.ROTATION) !== s && this.set(Ee.ROTATION, s), this.get(Ee.RESOLUTION) !== o && (this.set(Ee.RESOLUTION, o), this.set("zoom", this.getZoom(), !0)), (!a || !this.get(Ee.CENTER) || !zr(this.get(Ee.CENTER), a)) && this.set(Ee.CENTER, a), this.getAnimating() && !t && this.cancelAnimations(), this.cancelAnchor_ = void 0; } resolveConstraints(t, e, n) { t = t !== void 0 ? t : 200; @@ -4743,23 +4753,23 @@ class qg extends Se { this.targetResolution_ = a, this.targetRotation_ = r, this.targetCenter_ = l, this.applyTargetState_(); return; } - n = n || (t === 0 ? this.cancelAnchor_ : void 0), this.cancelAnchor_ = void 0, (this.getResolution() !== a || this.getRotation() !== r || !this.getCenterInternal() || !Dr(this.getCenterInternal(), l)) && (this.getAnimating() && this.cancelAnimations(), this.animateInternal({ + n = n || (t === 0 ? this.cancelAnchor_ : void 0), this.cancelAnchor_ = void 0, (this.getResolution() !== a || this.getRotation() !== r || !this.getCenterInternal() || !zr(this.getCenterInternal(), l)) && (this.getAnimating() && this.cancelAnimations(), this.animateInternal({ rotation: r, center: l, resolution: a, duration: t, - easing: Vn, + easing: Jn, anchor: n })); } beginInteraction() { - this.resolveConstraints(0), this.setHint(Bt.INTERACTING, 1); + this.resolveConstraints(0), this.setHint(Zt.INTERACTING, 1); } endInteraction(t, e, n) { - n = n && Xe(n, this.getProjection()), this.endInteractionInternal(t, e, n); + n = n && Je(n, this.getProjection()), this.endInteractionInternal(t, e, n); } endInteractionInternal(t, e, n) { - this.setHint(Bt.INTERACTING, -1), this.resolveConstraints(t, e, n); + this.setHint(Zt.INTERACTING, -1), this.resolveConstraints(t, e, n); } getConstrainedCenter(t, e) { const n = this.getViewportSize_(this.getRotation()); @@ -4781,35 +4791,35 @@ class qg extends Se { return this.constraints_.resolution(t, e, n); } } -function gr(i, t) { +function yr(i, t) { setTimeout(function() { i(t); }, 0); } -function Jg(i) { +function qg(i) { if (i.extent !== void 0) { const e = i.smoothExtentConstraint !== void 0 ? i.smoothExtentConstraint : !0; - return Rh(i.extent, i.constrainOnlyCenter, e); + return Ih(i.extent, i.constrainOnlyCenter, e); } - const t = nl(i.projection, "EPSG:3857"); + const t = ll(i.projection, "EPSG:3857"); if (i.multiWorld !== !0 && t.isGlobal()) { const e = t.getExtent().slice(); - return e[0] = -1 / 0, e[2] = 1 / 0, Rh(e, !1, !1); + return e[0] = -1 / 0, e[2] = 1 / 0, Ih(e, !1, !1); } return Cg; } -function Qg(i) { - let t, e, n, o = i.minZoom !== void 0 ? i.minZoom : $o, a = i.maxZoom !== void 0 ? i.maxZoom : 28; - const l = i.zoomFactor !== void 0 ? i.zoomFactor : 2, h = i.multiWorld !== void 0 ? i.multiWorld : !1, c = i.smoothResolutionConstraint !== void 0 ? i.smoothResolutionConstraint : !0, u = i.showFullExtent !== void 0 ? i.showFullExtent : !1, d = nl(i.projection, "EPSG:3857"), f = d.getExtent(); +function Jg(i) { + let t, e, n, o = i.minZoom !== void 0 ? i.minZoom : Ho, a = i.maxZoom !== void 0 ? i.maxZoom : 28; + const l = i.zoomFactor !== void 0 ? i.zoomFactor : 2, h = i.multiWorld !== void 0 ? i.multiWorld : !1, c = i.smoothResolutionConstraint !== void 0 ? i.smoothResolutionConstraint : !0, u = i.showFullExtent !== void 0 ? i.showFullExtent : !1, d = ll(i.projection, "EPSG:3857"), f = d.getExtent(); let g = i.constrainOnlyCenter, m = i.extent; if (!h && !m && d.isGlobal() && (g = !1, m = f), i.resolutions !== void 0) { - const _ = i.resolutions; - e = _[o], n = _[a] !== void 0 ? _[a] : _[_.length - 1], i.constrainResolution ? t = Eg( - _, + const p = i.resolutions; + e = p[o], n = p[a] !== void 0 ? p[a] : p[p.length - 1], i.constrainResolution ? t = Mg( + p, c, !g && m, u - ) : t = bh( + ) : t = Ah( e, n, c, @@ -4817,17 +4827,17 @@ function Qg(i) { u ); } else { - const y = (f ? Math.max(mt(f), Ne(f)) : 360 * On.degrees / d.getMetersPerUnit()) / Qa / Math.pow(2, $o), p = y / Math.pow(2, 28 - $o); - e = i.maxResolution, e !== void 0 ? o = 0 : e = y / Math.pow(l, o), n = i.minResolution, n === void 0 && (i.maxZoom !== void 0 ? i.maxResolution !== void 0 ? n = e / Math.pow(l, a) : n = y / Math.pow(l, a) : n = p), a = o + Math.floor( + const _ = (f ? Math.max(mt(f), Ge(f)) : 360 * Bn.degrees / d.getMetersPerUnit()) / sl / Math.pow(2, Ho), y = _ / Math.pow(2, 28 - Ho); + e = i.maxResolution, e !== void 0 ? o = 0 : e = _ / Math.pow(l, o), n = i.minResolution, n === void 0 && (i.maxZoom !== void 0 ? i.maxResolution !== void 0 ? n = e / Math.pow(l, a) : n = _ / Math.pow(l, a) : n = y), a = o + Math.floor( Math.log(e / n) / Math.log(l) - ), n = e / Math.pow(l, a - o), i.constrainResolution ? t = wg( + ), n = e / Math.pow(l, a - o), i.constrainResolution ? t = Eg( l, e, n, c, !g && m, u - ) : t = bh( + ) : t = Ah( e, n, c, @@ -4843,42 +4853,42 @@ function Qg(i) { zoomFactor: l }; } -function t1(i) { +function Qg(i) { if (i.enableRotation !== void 0 ? i.enableRotation : !0) { const e = i.constrainRotation; - return e === void 0 || e === !0 ? Rg() : e === !1 ? Lh : typeof e == "number" ? Sg(e) : Lh; + return e === void 0 || e === !0 ? Sg() : e === !1 ? Ph : typeof e == "number" ? wg(e) : Ph; } else - return ol; + return ul; } -function e1(i) { - return !(i.sourceCenter && i.targetCenter && !Dr(i.sourceCenter, i.targetCenter) || i.sourceResolution !== i.targetResolution || i.sourceRotation !== i.targetRotation); +function t1(i) { + return !(i.sourceCenter && i.targetCenter && !zr(i.sourceCenter, i.targetCenter) || i.sourceResolution !== i.targetResolution || i.sourceRotation !== i.targetRotation); } -function Bo(i, t, e, n, s) { +function Xo(i, t, e, n, s) { const r = Math.cos(-s); let o = Math.sin(-s), a = i[0] * r - i[1] * o, l = i[1] * r + i[0] * o; a += (t[0] / 2 - e[0]) * n, l += (e[1] - t[1] / 2) * n, o = -o; const h = a * r - l * o, c = l * r + a * o; return [h, c]; } -const Ke = qg; -class i1 extends Se { +const ii = Kg; +class e1 extends Ce { constructor(t) { super(); const e = t.element; e && !t.target && !e.style.pointerEvents && (e.style.pointerEvents = "auto"), this.element = e || null, this.target_ = null, this.map_ = null, this.listenerKeys = [], t.render && (this.render = t.render), t.target && this.setTarget(t.target); } disposeInternal() { - ha(this.element), super.disposeInternal(); + Ur(this.element), super.disposeInternal(); } getMap() { return this.map_; } setMap(t) { - this.map_ && ha(this.element); + this.map_ && Ur(this.element); for (let e = 0, n = this.listenerKeys.length; e < n; ++e) pt(this.listenerKeys[e]); - this.listenerKeys.length = 0, this.map_ = t, t && ((this.target_ ? this.target_ : t.getOverlayContainerStopEvent()).appendChild(this.element), this.render !== Ui && this.listenerKeys.push( - it(t, ui.POSTRENDER, this.render, this) + this.listenerKeys.length = 0, this.map_ = t, t && ((this.target_ ? this.target_ : t.getOverlayContainerStopEvent()).appendChild(this.element), this.render !== qi && this.listenerKeys.push( + et(t, Qe.POSTRENDER, this.render, this) ), t.render()); } render(t) { @@ -4887,8 +4897,8 @@ class i1 extends Se { this.target_ = typeof t == "string" ? document.getElementById(t) : t; } } -const Dt = i1; -class n1 extends Dt { +const kt = e1; +class i1 extends kt { constructor(t) { t = t || {}, super({ element: document.createElement("div"), @@ -4901,11 +4911,11 @@ class n1 extends Dt { typeof a == "string" ? (this.label_ = document.createElement("span"), this.label_.textContent = a, this.label_.className = s) : this.label_ = a; const l = this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_; this.toggleButton_ = document.createElement("button"), this.toggleButton_.setAttribute("type", "button"), this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_)), this.toggleButton_.title = n, this.toggleButton_.appendChild(l), this.toggleButton_.addEventListener( - X.CLICK, + H.CLICK, this.handleClick_.bind(this), !1 ); - const h = e + " " + Un + " " + fo + (this.collapsed_ && this.collapsible_ ? " " + ph : "") + (this.collapsible_ ? "" : " ol-uncollapsible"), c = this.element; + const h = e + " " + qn + " " + vo + (this.collapsed_ && this.collapsible_ ? " " + Ch : "") + (this.collapsible_ ? "" : " ol-uncollapsible"), c = this.element; c.className = h, c.appendChild(this.toggleButton_), c.appendChild(this.ulElement_), this.renderedAttributions_ = [], this.renderedVisible_ = !0; } collectSourceAttributions_(t) { @@ -4914,7 +4924,7 @@ class n1 extends Dt { const r = t.layerStatesArray; for (let o = 0, a = r.length; o < a; ++o) { const l = r[o]; - if (!Ka(l, t.viewState)) + if (!el(l, t.viewState)) continue; const h = l.layer.getSource(); if (!h) @@ -4938,8 +4948,8 @@ class n1 extends Dt { return; } const e = this.collectSourceAttributions_(t), n = e.length > 0; - if (this.renderedVisible_ != n && (this.element.style.display = n ? "" : "none", this.renderedVisible_ = n), !Ki(e, this.renderedAttributions_)) { - Z0(this.ulElement_); + if (this.renderedVisible_ != n && (this.element.style.display = n ? "" : "none", this.renderedVisible_ = n), !sn(e, this.renderedAttributions_)) { + zu(this.ulElement_); for (let s = 0, r = e.length; s < r; ++s) { const o = document.createElement("li"); o.innerHTML = e[s], this.ulElement_.appendChild(o); @@ -4951,7 +4961,7 @@ class n1 extends Dt { t.preventDefault(), this.handleToggle_(), this.userCollapsed_ = this.collapsed_; } handleToggle_() { - this.element.classList.toggle(ph), this.collapsed_ ? kr(this.collapseLabel_, this.label_) : kr(this.label_, this.collapseLabel_), this.collapsed_ = !this.collapsed_, this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_)); + this.element.classList.toggle(Ch), this.collapsed_ ? Zr(this.collapseLabel_, this.label_) : Zr(this.label_, this.collapseLabel_), this.collapsed_ = !this.collapsed_, this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_)); } getCollapsible() { return this.collapsible_; @@ -4969,8 +4979,8 @@ class n1 extends Dt { this.updateElement_(t.frameState); } } -const s1 = n1; -class r1 extends Dt { +const n1 = i1; +class s1 extends kt { constructor(t) { t = t || {}, super({ element: document.createElement("div"), @@ -4981,12 +4991,12 @@ class r1 extends Dt { this.label_ = null, typeof n == "string" ? (this.label_ = document.createElement("span"), this.label_.className = s, this.label_.textContent = n) : (this.label_ = n, this.label_.classList.add(s)); const r = t.tipLabel ? t.tipLabel : "Reset rotation", o = document.createElement("button"); o.className = e + "-reset", o.setAttribute("type", "button"), o.title = r, o.appendChild(this.label_), o.addEventListener( - X.CLICK, + H.CLICK, this.handleClick_.bind(this), !1 ); - const a = e + " " + Un + " " + fo, l = this.element; - l.className = a, l.appendChild(o), this.callResetNorth_ = t.resetNorth ? t.resetNorth : void 0, this.duration_ = t.duration !== void 0 ? t.duration : 250, this.autoHide_ = t.autoHide !== void 0 ? t.autoHide : !0, this.rotation_ = void 0, this.autoHide_ && this.element.classList.add(dr); + const a = e + " " + qn + " " + vo, l = this.element; + l.className = a, l.appendChild(o), this.callResetNorth_ = t.resetNorth ? t.resetNorth : void 0, this.duration_ = t.duration !== void 0 ? t.duration : 250, this.autoHide_ = t.autoHide !== void 0 ? t.autoHide : !0, this.rotation_ = void 0, this.autoHide_ && this.element.classList.add(pr); } handleClick_(t) { t.preventDefault(), this.callResetNorth_ !== void 0 ? this.callResetNorth_() : this.resetNorth_(); @@ -4999,7 +5009,7 @@ class r1 extends Dt { n !== void 0 && (this.duration_ > 0 && n % (2 * Math.PI) !== 0 ? e.animate({ rotation: 0, duration: this.duration_, - easing: Vn + easing: Jn }) : e.setRotation(0)); } render(t) { @@ -5010,16 +5020,16 @@ class r1 extends Dt { if (n != this.rotation_) { const s = "rotate(" + n + "rad)"; if (this.autoHide_) { - const r = this.element.classList.contains(dr); - !r && n === 0 ? this.element.classList.add(dr) : r && n !== 0 && this.element.classList.remove(dr); + const r = this.element.classList.contains(pr); + !r && n === 0 ? this.element.classList.add(pr) : r && n !== 0 && this.element.classList.remove(pr); } this.label_.style.transform = s; } this.rotation_ = n; } } -const o1 = r1; -class a1 extends Dt { +const r1 = s1; +class o1 extends kt { constructor(t) { t = t || {}, super({ element: document.createElement("div"), @@ -5029,7 +5039,7 @@ class a1 extends Dt { c.className = s, c.setAttribute("type", "button"), c.title = l, c.appendChild( typeof o == "string" ? document.createTextNode(o) : o ), c.addEventListener( - X.CLICK, + H.CLICK, this.handleClick_.bind(this, n), !1 ); @@ -5037,11 +5047,11 @@ class a1 extends Dt { u.className = r, u.setAttribute("type", "button"), u.title = h, u.appendChild( typeof a == "string" ? document.createTextNode(a) : a ), u.addEventListener( - X.CLICK, + H.CLICK, this.handleClick_.bind(this, -n), !1 ); - const d = e + " " + Un + " " + fo, f = this.element; + const d = e + " " + qn + " " + vo, f = this.element; f.className = d, f.appendChild(c), f.appendChild(u), this.duration_ = t.duration !== void 0 ? t.duration : 250; } handleClick_(t, e) { @@ -5057,26 +5067,26 @@ class a1 extends Dt { this.duration_ > 0 ? (n.getAnimating() && n.cancelAnimations(), n.animate({ zoom: r, duration: this.duration_, - easing: Vn + easing: Jn })) : n.setZoom(r); } } } -const od = a1; -function l1(i) { +const hd = o1; +function a1(i) { i = i || {}; - const t = new Te(); - return (i.zoom !== void 0 ? i.zoom : !0) && t.push(new od(i.zoomOptions)), (i.rotate !== void 0 ? i.rotate : !0) && t.push(new o1(i.rotateOptions)), (i.attribution !== void 0 ? i.attribution : !0) && t.push(new s1(i.attributionOptions)), t; + const t = new Oe(); + return (i.zoom !== void 0 ? i.zoom : !0) && t.push(new hd(i.zoomOptions)), (i.rotate !== void 0 ? i.rotate : !0) && t.push(new r1(i.rotateOptions)), (i.attribution !== void 0 ? i.attribution : !0) && t.push(new n1(i.attributionOptions)), t; } -const Nh = { +const Gh = { ACTIVE: "active" }; -class h1 extends Se { +class l1 extends Ce { constructor(t) { super(), this.on, this.once, this.un, t && t.handleEvent && (this.handleEvent = t.handleEvent), this.map_ = null, this.setActive(!0); } getActive() { - return this.get(Nh.ACTIVE); + return this.get(Gh.ACTIVE); } getMap() { return this.map_; @@ -5085,24 +5095,24 @@ class h1 extends Se { return !0; } setActive(t) { - this.set(Nh.ACTIVE, t); + this.set(Gh.ACTIVE, t); } setMap(t) { this.map_ = t; } } -function c1(i, t, e) { +function h1(i, t, e) { const n = i.getCenterInternal(); if (n) { const s = [n[0] + t[0], n[1] + t[1]]; i.animateInternal({ duration: e !== void 0 ? e : 250, - easing: Lg, + easing: bg, center: i.getConstrainedCenter(s) }); } } -function ml(i, t, e, n) { +function xl(i, t, e, n) { const s = i.getZoom(); if (s === void 0) return; @@ -5111,25 +5121,25 @@ function ml(i, t, e, n) { resolution: o, anchor: e, duration: n !== void 0 ? n : 250, - easing: Vn + easing: Jn }); } -const $s = h1; -class u1 extends $s { +const Hs = l1; +class c1 extends Hs { constructor(t) { super(), t = t || {}, this.delta_ = t.delta ? t.delta : 1, this.duration_ = t.duration !== void 0 ? t.duration : 250; } handleEvent(t) { let e = !1; - if (t.type == Ct.DBLCLICK) { + if (t.type == Mt.DBLCLICK) { const n = t.originalEvent, s = t.map, r = t.coordinate, o = n.shiftKey ? -this.delta_ : this.delta_, a = s.getView(); - ml(a, o, r, this.duration_), n.preventDefault(), e = !0; + xl(a, o, r, this.duration_), n.preventDefault(), e = !0; } return !e; } } -const d1 = u1; -class f1 extends $s { +const u1 = c1; +class d1 extends Hs { constructor(t) { t = t || {}, super( t @@ -5148,17 +5158,17 @@ class f1 extends $s { return !0; let e = !1; if (this.updateTrackedPointers_(t), this.handlingDownUpSequence) { - if (t.type == Ct.POINTERDRAG) + if (t.type == Mt.POINTERDRAG) this.handleDragEvent(t), t.originalEvent.preventDefault(); - else if (t.type == Ct.POINTERUP) { + else if (t.type == Mt.POINTERUP) { const n = this.handleUpEvent(t); this.handlingDownUpSequence = n && this.targetPointers.length > 0; } - } else if (t.type == Ct.POINTERDOWN) { + } else if (t.type == Mt.POINTERDOWN) { const n = this.handleDownEvent(t); this.handlingDownUpSequence = n, e = this.stopDown(n); } else - t.type == Ct.POINTERMOVE && this.handleMoveEvent(t); + t.type == Mt.POINTERMOVE && this.handleMoveEvent(t); return !e; } handleMoveEvent(t) { @@ -5173,15 +5183,15 @@ class f1 extends $s { t.activePointers && (this.targetPointers = t.activePointers); } } -function _l(i) { +function Cl(i) { const t = i.length; let e = 0, n = 0; for (let s = 0; s < t; s++) e += i[s].clientX, n += i[s].clientY; return [e / t, n / t]; } -const Bs = f1; -function xa(i) { +const Xs = d1; +function Sa(i) { const t = arguments; return function(e) { let n = !0; @@ -5190,51 +5200,51 @@ function xa(i) { return n; }; } -const g1 = function(i) { +const f1 = function(i) { const t = i.originalEvent; return t.altKey && !(t.metaKey || t.ctrlKey) && t.shiftKey; -}, m1 = function(i) { +}, g1 = function(i) { const t = i.map.getTargetElement(), e = i.map.getOwnerDocument().activeElement; return t.contains(e); -}, ad = function(i) { - return i.map.getTargetElement().hasAttribute("tabindex") ? m1(i) : !0; -}, _1 = ps, ld = function(i) { +}, cd = function(i) { + return i.map.getTargetElement().hasAttribute("tabindex") ? g1(i) : !0; +}, m1 = Rs, ud = function(i) { const t = i.originalEvent; - return t.button == 0 && !(f0 && g0 && t.ctrlKey); -}, hd = function(i) { + return t.button == 0 && !(h0 && c0 && t.ctrlKey); +}, dd = function(i) { const t = i.originalEvent; return !t.altKey && !(t.metaKey || t.ctrlKey) && !t.shiftKey; }, p1 = function(i) { const t = i.originalEvent; return !t.altKey && !(t.metaKey || t.ctrlKey) && t.shiftKey; -}, cd = function(i) { +}, fd = function(i) { const t = i.originalEvent, e = t.target.tagName; return e !== "INPUT" && e !== "SELECT" && e !== "TEXTAREA" && !t.target.isContentEditable; -}, zo = function(i) { +}, Yo = function(i) { const t = i.originalEvent; - return Y(t !== void 0, 56), t.pointerType == "mouse"; -}, y1 = function(i) { + return X(t !== void 0, 56), t.pointerType == "mouse"; +}, _1 = function(i) { const t = i.originalEvent; - return Y(t !== void 0, 56), t.isPrimary && t.button === 0; + return X(t !== void 0, 56), t.isPrimary && t.button === 0; }; -class v1 extends Bs { +class y1 extends Xs { constructor(t) { super({ - stopDown: no + stopDown: ho }), t = t || {}, this.kinetic_ = t.kinetic, this.lastCentroid = null, this.lastPointersCount_, this.panning_ = !1; - const e = t.condition ? t.condition : xa(hd, y1); - this.condition_ = t.onFocusOnly ? xa(ad, e) : e, this.noKinetic_ = !1; + const e = t.condition ? t.condition : Sa(dd, _1); + this.condition_ = t.onFocusOnly ? Sa(cd, e) : e, this.noKinetic_ = !1; } handleDragEvent(t) { this.panning_ || (this.panning_ = !0, this.getMap().getView().beginInteraction()); - const e = this.targetPointers, n = _l(e); + const e = this.targetPointers, n = Cl(e); if (e.length == this.lastPointersCount_) { if (this.kinetic_ && this.kinetic_.update(n[0], n[1]), this.lastCentroid) { const s = [ this.lastCentroid[0] - n[0], n[1] - this.lastCentroid[1] ], o = t.map.getView(); - Ou(s, o.getResolution()), qa(s, o.getRotation()), o.adjustCenterInternal(s); + Fu(s, o.getResolution()), il(s, o.getRotation()), o.adjustCenterInternal(s); } } else this.kinetic_ && this.kinetic_.begin(); @@ -5251,7 +5261,7 @@ class v1 extends Bs { n.animateInternal({ center: n.getConstrainedCenter(l), duration: 500, - easing: Vn + easing: Jn }); } return this.panning_ && (this.panning_ = !1, n.endInteraction()), !1; @@ -5266,18 +5276,18 @@ class v1 extends Bs { return !1; } } -const x1 = v1; -class M1 extends Bs { +const v1 = y1; +class x1 extends Xs { constructor(t) { t = t || {}, super({ - stopDown: no - }), this.condition_ = t.condition ? t.condition : g1, this.lastAngle_ = void 0, this.duration_ = t.duration !== void 0 ? t.duration : 250; + stopDown: ho + }), this.condition_ = t.condition ? t.condition : f1, this.lastAngle_ = void 0, this.duration_ = t.duration !== void 0 ? t.duration : 250; } handleDragEvent(t) { - if (!zo(t)) + if (!Yo(t)) return; const e = t.map, n = e.getView(); - if (n.getConstraints().rotation === ol) + if (n.getConstraints().rotation === ul) return; const s = e.getSize(), r = t.pixel, o = Math.atan2(s[1] / 2 - r[1], r[0] - s[0] / 2); if (this.lastAngle_ !== void 0) { @@ -5287,14 +5297,14 @@ class M1 extends Bs { this.lastAngle_ = o; } handleUpEvent(t) { - return zo(t) ? (t.map.getView().endInteraction(this.duration_), !1) : !0; + return Yo(t) ? (t.map.getView().endInteraction(this.duration_), !1) : !0; } handleDownEvent(t) { - return zo(t) && ld(t) && this.condition_(t) ? (t.map.getView().beginInteraction(), this.lastAngle_ = void 0, !0) : !1; + return Yo(t) && ud(t) && this.condition_(t) ? (t.map.getView().beginInteraction(), this.lastAngle_ = void 0, !0) : !1; } } -const C1 = M1; -class E1 extends Va { +const C1 = x1; +class M1 extends ja { constructor(t) { super(), this.geometry_ = null, this.element_ = document.createElement("div"), this.element_.style.position = "absolute", this.element_.style.pointerEvents = "auto", this.element_.className = "ol-box " + t, this.map_ = null, this.startPixel_ = null, this.endPixel_ = null; } @@ -5326,26 +5336,26 @@ class E1 extends Va { this.map_.getCoordinateFromPixelInternal, this.map_ ); - s[4] = s[0].slice(), this.geometry_ ? this.geometry_.setCoordinates([s]) : this.geometry_ = new Dn([s]); + s[4] = s[0].slice(), this.geometry_ ? this.geometry_.setCoordinates([s]) : this.geometry_ = new Un([s]); } getGeometry() { return this.geometry_; } } -const w1 = E1, mr = { +const E1 = M1, vr = { BOXSTART: "boxstart", BOXDRAG: "boxdrag", BOXEND: "boxend", BOXCANCEL: "boxcancel" }; -class Zo extends ke { +class jo extends ze { constructor(t, e, n) { super(t), this.coordinate = e, this.mapBrowserEvent = n; } } -class S1 extends Bs { +class w1 extends Xs { constructor(t) { - super(), this.on, this.once, this.un, t = t || {}, this.box_ = new w1(t.className || "ol-dragbox"), this.minArea_ = t.minArea !== void 0 ? t.minArea : 64, t.onBoxEnd && (this.onBoxEnd = t.onBoxEnd), this.startPixel_ = null, this.condition_ = t.condition ? t.condition : ld, this.boxEndCondition_ = t.boxEndCondition ? t.boxEndCondition : this.defaultBoxEndCondition; + super(), this.on, this.once, this.un, t = t || {}, this.box_ = new E1(t.className || "ol-dragbox"), this.minArea_ = t.minArea !== void 0 ? t.minArea : 64, t.onBoxEnd && (this.onBoxEnd = t.onBoxEnd), this.startPixel_ = null, this.condition_ = t.condition ? t.condition : ud, this.boxEndCondition_ = t.boxEndCondition ? t.boxEndCondition : this.defaultBoxEndCondition; } defaultBoxEndCondition(t, e, n) { const s = n[0] - e[0], r = n[1] - e[1]; @@ -5356,8 +5366,8 @@ class S1 extends Bs { } handleDragEvent(t) { this.box_.setPixels(this.startPixel_, t.pixel), this.dispatchEvent( - new Zo( - mr.BOXDRAG, + new jo( + vr.BOXDRAG, t.coordinate, t ) @@ -5371,8 +5381,8 @@ class S1 extends Bs { t.pixel ); return e && this.onBoxEnd(t), this.dispatchEvent( - new Zo( - e ? mr.BOXEND : mr.BOXCANCEL, + new jo( + e ? vr.BOXEND : vr.BOXCANCEL, t.coordinate, t ) @@ -5380,8 +5390,8 @@ class S1 extends Bs { } handleDownEvent(t) { return this.condition_(t) ? (this.startPixel_ = t.pixel, this.box_.setMap(t.map), this.box_.setPixels(this.startPixel_, this.startPixel_), this.dispatchEvent( - new Zo( - mr.BOXSTART, + new jo( + vr.BOXSTART, t.coordinate, t ) @@ -5390,8 +5400,8 @@ class S1 extends Bs { onBoxEnd(t) { } } -const R1 = S1; -class b1 extends R1 { +const S1 = w1; +class R1 extends S1 { constructor(t) { t = t || {}; const e = t.condition ? t.condition : p1; @@ -5410,56 +5420,56 @@ class b1 extends R1 { } n.fitInternal(s, { duration: this.duration_, - easing: Vn + easing: Jn }); } } -const L1 = b1, Li = { +const b1 = R1, ki = { LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40 }; -class T1 extends $s { +class L1 extends Hs { constructor(t) { super(), t = t || {}, this.defaultCondition_ = function(e) { - return hd(e) && cd(e); + return dd(e) && fd(e); }, this.condition_ = t.condition !== void 0 ? t.condition : this.defaultCondition_, this.duration_ = t.duration !== void 0 ? t.duration : 100, this.pixelDelta_ = t.pixelDelta !== void 0 ? t.pixelDelta : 128; } handleEvent(t) { let e = !1; - if (t.type == X.KEYDOWN) { + if (t.type == H.KEYDOWN) { const n = t.originalEvent, s = n.keyCode; - if (this.condition_(t) && (s == Li.DOWN || s == Li.LEFT || s == Li.RIGHT || s == Li.UP)) { + if (this.condition_(t) && (s == ki.DOWN || s == ki.LEFT || s == ki.RIGHT || s == ki.UP)) { const o = t.map.getView(), a = o.getResolution() * this.pixelDelta_; let l = 0, h = 0; - s == Li.DOWN ? h = -a : s == Li.LEFT ? l = -a : s == Li.RIGHT ? l = a : h = a; + s == ki.DOWN ? h = -a : s == ki.LEFT ? l = -a : s == ki.RIGHT ? l = a : h = a; const c = [l, h]; - qa(c, o.getRotation()), c1(o, c, this.duration_), n.preventDefault(), e = !0; + il(c, o.getRotation()), h1(o, c, this.duration_), n.preventDefault(), e = !0; } } return !e; } } -const I1 = T1; -class A1 extends $s { +const T1 = L1; +class I1 extends Hs { constructor(t) { - super(), t = t || {}, this.condition_ = t.condition ? t.condition : cd, this.delta_ = t.delta ? t.delta : 1, this.duration_ = t.duration !== void 0 ? t.duration : 100; + super(), t = t || {}, this.condition_ = t.condition ? t.condition : fd, this.delta_ = t.delta ? t.delta : 1, this.duration_ = t.duration !== void 0 ? t.duration : 100; } handleEvent(t) { let e = !1; - if (t.type == X.KEYDOWN || t.type == X.KEYPRESS) { + if (t.type == H.KEYDOWN || t.type == H.KEYPRESS) { const n = t.originalEvent, s = n.charCode; if (this.condition_(t) && (s == "+".charCodeAt(0) || s == "-".charCodeAt(0))) { const r = t.map, o = s == "+".charCodeAt(0) ? this.delta_ : -this.delta_, a = r.getView(); - ml(a, o, void 0, this.duration_), n.preventDefault(), e = !0; + xl(a, o, void 0, this.duration_), n.preventDefault(), e = !0; } } return !e; } } -const P1 = A1; -class O1 { +const A1 = I1; +class P1 { constructor(t, e, n) { this.decay_ = t, this.minVelocity_ = e, this.delay_ = n, this.points_ = [], this.angle_ = 0, this.initialVelocity_ = 0; } @@ -5491,14 +5501,14 @@ class O1 { return this.angle_; } } -const N1 = O1; -class F1 extends $s { +const O1 = P1; +class N1 extends Hs { constructor(t) { t = t || {}, super( t ), this.totalDelta_ = 0, this.lastDelta_ = 0, this.maxDelta_ = t.maxDelta !== void 0 ? t.maxDelta : 1, this.duration_ = t.duration !== void 0 ? t.duration : 250, this.timeout_ = t.timeout !== void 0 ? t.timeout : 80, this.useAnchor_ = t.useAnchor !== void 0 ? t.useAnchor : !0, this.constrainResolution_ = t.constrainResolution !== void 0 ? t.constrainResolution : !1; - const e = t.condition ? t.condition : _1; - this.condition_ = t.onFocusOnly ? xa(ad, e) : e, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_, this.mode_ = void 0, this.trackpadEventGap_ = 400, this.trackpadTimeoutId_, this.deltaPerZoom_ = 300; + const e = t.condition ? t.condition : m1; + this.condition_ = t.onFocusOnly ? Sa(cd, e) : e, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_, this.mode_ = void 0, this.trackpadEventGap_ = 400, this.trackpadTimeoutId_, this.deltaPerZoom_ = 300; } endInteraction_() { this.trackpadTimeoutId_ = void 0; @@ -5512,12 +5522,12 @@ class F1 extends $s { ); } handleEvent(t) { - if (!this.condition_(t) || t.type !== X.WHEEL) + if (!this.condition_(t) || t.type !== H.WHEEL) return !0; const n = t.map, s = t.originalEvent; s.preventDefault(), this.useAnchor_ && (this.lastAnchor_ = t.coordinate); let r; - if (t.type == X.WHEEL && (r = s.deltaY, u0 && s.deltaMode === WheelEvent.DOM_DELTA_PIXEL && (r /= yu), s.deltaMode === WheelEvent.DOM_DELTA_LINE && (r *= 40)), r === 0) + if (t.type == H.WHEEL && (r = s.deltaY, a0 && s.deltaMode === WheelEvent.DOM_DELTA_PIXEL && (r /= xu), s.deltaMode === WheelEvent.DOM_DELTA_LINE && (r *= 40)), r === 0) return !1; this.lastDelta_ = r; const o = Date.now(); @@ -5543,18 +5553,18 @@ class F1 extends $s { -this.maxDelta_ * this.deltaPerZoom_, this.maxDelta_ * this.deltaPerZoom_ ) / this.deltaPerZoom_; - (e.getConstrainResolution() || this.constrainResolution_) && (n = n ? n > 0 ? 1 : -1 : 0), ml(e, n, this.lastAnchor_, this.duration_), this.mode_ = void 0, this.totalDelta_ = 0, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_ = void 0; + (e.getConstrainResolution() || this.constrainResolution_) && (n = n ? n > 0 ? 1 : -1 : 0), xl(e, n, this.lastAnchor_, this.duration_), this.mode_ = void 0, this.totalDelta_ = 0, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_ = void 0; } setMouseAnchor(t) { this.useAnchor_ = t, t || (this.lastAnchor_ = null); } } -const D1 = F1; -class k1 extends Bs { +const F1 = N1; +class D1 extends Xs { constructor(t) { t = t || {}; const e = t; - e.stopDown || (e.stopDown = no), super(e), this.anchor_ = null, this.lastAngle_ = void 0, this.rotating_ = !1, this.rotationDelta_ = 0, this.threshold_ = t.threshold !== void 0 ? t.threshold : 0.3, this.duration_ = t.duration !== void 0 ? t.duration : 250; + e.stopDown || (e.stopDown = ho), super(e), this.anchor_ = null, this.lastAngle_ = void 0, this.rotating_ = !1, this.rotationDelta_ = 0, this.threshold_ = t.threshold !== void 0 ? t.threshold : 0.3, this.duration_ = t.duration !== void 0 ? t.duration : 250; } handleDragEvent(t) { let e = 0; @@ -5568,9 +5578,9 @@ class k1 extends Bs { } this.lastAngle_ = r; const o = t.map, a = o.getView(); - if (a.getConstraints().rotation === ol) + if (a.getConstraints().rotation === ul) return; - const l = o.getViewport().getBoundingClientRect(), h = _l(this.targetPointers); + const l = o.getViewport().getBoundingClientRect(), h = Cl(this.targetPointers); h[0] -= l.left, h[1] -= l.top, this.anchor_ = o.getCoordinateFromPixelInternal(h), this.rotating_ && (o.render(), a.adjustRotationInternal(e, this.anchor_)); } handleUpEvent(t) { @@ -5584,12 +5594,12 @@ class k1 extends Bs { return !1; } } -const G1 = k1; -class $1 extends Bs { +const k1 = D1; +class G1 extends Xs { constructor(t) { t = t || {}; const e = t; - e.stopDown || (e.stopDown = no), super(e), this.anchor_ = null, this.duration_ = t.duration !== void 0 ? t.duration : 400, this.lastDistance_ = void 0, this.lastScaleDelta_ = 1; + e.stopDown || (e.stopDown = ho), super(e), this.anchor_ = null, this.duration_ = t.duration !== void 0 ? t.duration : 400, this.lastDistance_ = void 0, this.lastScaleDelta_ = 1; } handleDragEvent(t) { let e = 1; @@ -5597,7 +5607,7 @@ class $1 extends Bs { this.lastDistance_ !== void 0 && (e = this.lastDistance_ / a), this.lastDistance_ = a; const l = t.map, h = l.getView(); e != 1 && (this.lastScaleDelta_ = e); - const c = l.getViewport().getBoundingClientRect(), u = _l(this.targetPointers); + const c = l.getViewport().getBoundingClientRect(), u = Cl(this.targetPointers); u[0] -= c.left, u[1] -= c.top, this.anchor_ = l.getCoordinateFromPixelInternal(u), l.render(), h.adjustResolutionInternal(e, this.anchor_); } handleUpEvent(t) { @@ -5615,110 +5625,110 @@ class $1 extends Bs { return !1; } } -const B1 = $1; -function z1(i) { +const $1 = G1; +function B1(i) { i = i || {}; - const t = new Te(), e = new N1(-5e-3, 0.05, 100); + const t = new Oe(), e = new O1(-5e-3, 0.05, 100); return (i.altShiftDragRotate !== void 0 ? i.altShiftDragRotate : !0) && t.push(new C1()), (i.doubleClickZoom !== void 0 ? i.doubleClickZoom : !0) && t.push( - new d1({ + new u1({ delta: i.zoomDelta, duration: i.zoomDuration }) ), (i.dragPan !== void 0 ? i.dragPan : !0) && t.push( - new x1({ + new v1({ onFocusOnly: i.onFocusOnly, kinetic: e }) - ), (i.pinchRotate !== void 0 ? i.pinchRotate : !0) && t.push(new G1()), (i.pinchZoom !== void 0 ? i.pinchZoom : !0) && t.push( - new B1({ + ), (i.pinchRotate !== void 0 ? i.pinchRotate : !0) && t.push(new k1()), (i.pinchZoom !== void 0 ? i.pinchZoom : !0) && t.push( + new $1({ duration: i.zoomDuration }) - ), (i.keyboard !== void 0 ? i.keyboard : !0) && (t.push(new I1()), t.push( - new P1({ + ), (i.keyboard !== void 0 ? i.keyboard : !0) && (t.push(new T1()), t.push( + new A1({ delta: i.zoomDelta, duration: i.zoomDuration }) )), (i.mouseWheelZoom !== void 0 ? i.mouseWheelZoom : !0) && t.push( - new D1({ + new F1({ onFocusOnly: i.onFocusOnly, duration: i.zoomDuration }) ), (i.shiftDragZoom !== void 0 ? i.shiftDragZoom : !0) && t.push( - new L1({ + new b1({ duration: i.zoomDuration }) ), t; } -function Fh(i) { +function $h(i) { return i[0] > 0 && i[1] > 0; } -function Z1(i, t, e) { +function z1(i, t, e) { return e === void 0 && (e = [0, 0]), e[0] = i[0] * t + 0.5 | 0, e[1] = i[1] * t + 0.5 | 0, e; } -function ae(i, t) { +function ce(i, t) { return Array.isArray(i) ? i : (t === void 0 ? t = [i, i] : (t[0] = i, t[1] = i), t); } -function ud(i) { - if (i instanceof uo) { +function gd(i) { + if (i instanceof yo) { i.setMapInternal(null); return; } - i instanceof go && i.getLayers().forEach(ud); + i instanceof xo && i.getLayers().forEach(gd); } -function dd(i, t) { - if (i instanceof uo) { +function md(i, t) { + if (i instanceof yo) { i.setMapInternal(t); return; } - if (i instanceof go) { + if (i instanceof xo) { const e = i.getLayers().getArray(); for (let n = 0, s = e.length; n < s; ++n) - dd(e[n], t); + md(e[n], t); } } -class U1 extends Se { +class Z1 extends Ce { constructor(t) { super(), t = t || {}, this.on, this.once, this.un; - const e = V1(t); - this.renderComplete_, this.loaded_ = !0, this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this), this.maxTilesLoading_ = t.maxTilesLoading !== void 0 ? t.maxTilesLoading : 16, this.pixelRatio_ = t.pixelRatio !== void 0 ? t.pixelRatio : yu, this.postRenderTimeoutHandle_, this.animationDelayKey_, this.animationDelay_ = this.animationDelay_.bind(this), this.coordinateToPixelTransform_ = Pe(), this.pixelToCoordinateTransform_ = Pe(), this.frameIndex_ = 0, this.frameState_ = null, this.previousExtent_ = null, this.viewPropertyListenerKey_ = null, this.viewChangeListenerKey_ = null, this.layerGroupPropertyListenerKeys_ = null, this.viewport_ = document.createElement("div"), this.viewport_.className = "ol-viewport" + ("ontouchstart" in window ? " ol-touch" : ""), this.viewport_.style.position = "relative", this.viewport_.style.overflow = "hidden", this.viewport_.style.width = "100%", this.viewport_.style.height = "100%", this.overlayContainer_ = document.createElement("div"), this.overlayContainer_.style.position = "absolute", this.overlayContainer_.style.zIndex = "0", this.overlayContainer_.style.width = "100%", this.overlayContainer_.style.height = "100%", this.overlayContainer_.style.pointerEvents = "none", this.overlayContainer_.className = "ol-overlaycontainer", this.viewport_.appendChild(this.overlayContainer_), this.overlayContainerStopEvent_ = document.createElement("div"), this.overlayContainerStopEvent_.style.position = "absolute", this.overlayContainerStopEvent_.style.zIndex = "0", this.overlayContainerStopEvent_.style.width = "100%", this.overlayContainerStopEvent_.style.height = "100%", this.overlayContainerStopEvent_.style.pointerEvents = "none", this.overlayContainerStopEvent_.className = "ol-overlaycontainer-stopevent", this.viewport_.appendChild(this.overlayContainerStopEvent_), this.mapBrowserEventHandler_ = null, this.moveTolerance_ = t.moveTolerance, this.keyboardEventTarget_ = e.keyboardEventTarget, this.targetChangeHandlerKeys_ = null, this.controls = e.controls || l1(), this.interactions = e.interactions || z1({ + const e = U1(t); + this.renderComplete_, this.loaded_ = !0, this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this), this.maxTilesLoading_ = t.maxTilesLoading !== void 0 ? t.maxTilesLoading : 16, this.pixelRatio_ = t.pixelRatio !== void 0 ? t.pixelRatio : xu, this.postRenderTimeoutHandle_, this.animationDelayKey_, this.animationDelay_ = this.animationDelay_.bind(this), this.coordinateToPixelTransform_ = De(), this.pixelToCoordinateTransform_ = De(), this.frameIndex_ = 0, this.frameState_ = null, this.previousExtent_ = null, this.viewPropertyListenerKey_ = null, this.viewChangeListenerKey_ = null, this.layerGroupPropertyListenerKeys_ = null, this.viewport_ = document.createElement("div"), this.viewport_.className = "ol-viewport" + ("ontouchstart" in window ? " ol-touch" : ""), this.viewport_.style.position = "relative", this.viewport_.style.overflow = "hidden", this.viewport_.style.width = "100%", this.viewport_.style.height = "100%", this.overlayContainer_ = document.createElement("div"), this.overlayContainer_.style.position = "absolute", this.overlayContainer_.style.zIndex = "0", this.overlayContainer_.style.width = "100%", this.overlayContainer_.style.height = "100%", this.overlayContainer_.style.pointerEvents = "none", this.overlayContainer_.className = "ol-overlaycontainer", this.viewport_.appendChild(this.overlayContainer_), this.overlayContainerStopEvent_ = document.createElement("div"), this.overlayContainerStopEvent_.style.position = "absolute", this.overlayContainerStopEvent_.style.zIndex = "0", this.overlayContainerStopEvent_.style.width = "100%", this.overlayContainerStopEvent_.style.height = "100%", this.overlayContainerStopEvent_.style.pointerEvents = "none", this.overlayContainerStopEvent_.className = "ol-overlaycontainer-stopevent", this.viewport_.appendChild(this.overlayContainerStopEvent_), this.mapBrowserEventHandler_ = null, this.moveTolerance_ = t.moveTolerance, this.keyboardEventTarget_ = e.keyboardEventTarget, this.targetChangeHandlerKeys_ = null, this.controls = e.controls || a1(), this.interactions = e.interactions || B1({ onFocusOnly: !0 - }), this.overlays_ = e.overlays, this.overlayIdIndex_ = {}, this.renderer_ = null, this.postRenderFunctions_ = [], this.tileQueue_ = new sg( + }), this.overlays_ = e.overlays, this.overlayIdIndex_ = {}, this.renderer_ = null, this.postRenderFunctions_ = [], this.tileQueue_ = new ng( this.getTilePriority.bind(this), this.handleTileChange_.bind(this) ), this.addChangeListener( - Ot.LAYERGROUP, + Nt.LAYERGROUP, this.handleLayerGroupChanged_ - ), this.addChangeListener(Ot.VIEW, this.handleViewChanged_), this.addChangeListener(Ot.SIZE, this.handleSizeChanged_), this.addChangeListener(Ot.TARGET, this.handleTargetChanged_), this.setProperties(e.values); + ), this.addChangeListener(Nt.VIEW, this.handleViewChanged_), this.addChangeListener(Nt.SIZE, this.handleSizeChanged_), this.addChangeListener(Nt.TARGET, this.handleTargetChanged_), this.setProperties(e.values); const n = this; - t.view && !(t.view instanceof Ke) && t.view.then(function(s) { - n.setView(new Ke(s)); + t.view && !(t.view instanceof ii) && t.view.then(function(s) { + n.setView(new ii(s)); }), this.controls.addEventListener( - Jt.ADD, + ee.ADD, function(s) { s.element.setMap(this); }.bind(this) ), this.controls.addEventListener( - Jt.REMOVE, + ee.REMOVE, function(s) { s.element.setMap(null); }.bind(this) ), this.interactions.addEventListener( - Jt.ADD, + ee.ADD, function(s) { s.element.setMap(this); }.bind(this) ), this.interactions.addEventListener( - Jt.REMOVE, + ee.REMOVE, function(s) { s.element.setMap(null); }.bind(this) ), this.overlays_.addEventListener( - Jt.ADD, + ee.ADD, function(s) { this.addOverlayInternal_(s.element); }.bind(this) ), this.overlays_.addEventListener( - Jt.REMOVE, + ee.REMOVE, function(s) { const r = s.element.getId(); r !== void 0 && delete this.overlayIdIndex_[r.toString()], s.element.setMap(null); @@ -5743,7 +5753,7 @@ class U1 extends Se { this.getLayerGroup().getLayers().push(t); } handleLayerAdd_(t) { - dd(t.layer, this); + md(t.layer, this); } addOverlay(t) { this.getOverlays().push(t); @@ -5760,7 +5770,7 @@ class U1 extends Se { return; const s = this.getCoordinateFromPixelInternal(t); n = n !== void 0 ? n : {}; - const r = n.hitTolerance !== void 0 ? n.hitTolerance : 0, o = n.layerFilter !== void 0 ? n.layerFilter : ps, a = n.checkWrapped !== !1; + const r = n.hitTolerance !== void 0 ? n.hitTolerance : 0, o = n.layerFilter !== void 0 ? n.layerFilter : Rs, a = n.checkWrapped !== !1; return this.renderer_.forEachFeatureAtCoordinate( s, this.frameState_, @@ -5786,7 +5796,7 @@ class U1 extends Se { const t = []; function e(n) { n.forEach(function(s) { - s instanceof go ? e(s.getLayers()) : t.push(s); + s instanceof xo ? e(s.getLayers()) : t.push(s); }); } return e(this.getLayers()), t; @@ -5796,7 +5806,7 @@ class U1 extends Se { return !1; const n = this.getCoordinateFromPixelInternal(t); e = e !== void 0 ? e : {}; - const s = e.layerFilter !== void 0 ? e.layerFilter : ps, r = e.hitTolerance !== void 0 ? e.hitTolerance : 0, o = e.checkWrapped !== !1; + const s = e.layerFilter !== void 0 ? e.layerFilter : Rs, r = e.hitTolerance !== void 0 ? e.hitTolerance : 0, o = e.checkWrapped !== !1; return this.renderer_.hasFeatureAtCoordinate( n, this.frameState_, @@ -5820,21 +5830,21 @@ class U1 extends Se { ]; } getTarget() { - return this.get(Ot.TARGET); + return this.get(Nt.TARGET); } getTargetElement() { const t = this.getTarget(); return t !== void 0 ? typeof t == "string" ? document.getElementById(t) : t : null; } getCoordinateFromPixel(t) { - return _a( + return Ca( this.getCoordinateFromPixelInternal(t), this.getView().getProjection() ); } getCoordinateFromPixelInternal(t) { const e = this.frameState_; - return e ? Ft( + return e ? Dt( e.pixelToCoordinateTransform, t.slice() ) : null; @@ -5853,11 +5863,11 @@ class U1 extends Se { return this.interactions; } getLayerGroup() { - return this.get(Ot.LAYERGROUP); + return this.get(Nt.LAYERGROUP); } setLayers(t) { const e = this.getLayerGroup(); - if (t instanceof Te) { + if (t instanceof Oe) { e.setLayers(t); return; } @@ -5883,7 +5893,7 @@ class U1 extends Se { return !1; } getPixelFromCoordinate(t) { - const e = Xe( + const e = Je( t, this.getView().getProjection() ); @@ -5891,7 +5901,7 @@ class U1 extends Se { } getPixelFromCoordinateInternal(t) { const e = this.frameState_; - return e ? Ft( + return e ? Dt( e.coordinateToPixelTransform, t.slice(0, 2) ) : null; @@ -5900,10 +5910,10 @@ class U1 extends Se { return this.renderer_; } getSize() { - return this.get(Ot.SIZE); + return this.get(Nt.SIZE); } getView() { - return this.get(Ot.VIEW); + return this.get(Nt.VIEW); } getViewport() { return this.viewport_; @@ -5919,7 +5929,7 @@ class U1 extends Se { return t ? t.ownerDocument : document; } getTilePriority(t, e, n, s) { - return rg( + return sg( this.frameState_, t, e, @@ -5929,14 +5939,14 @@ class U1 extends Se { } handleBrowserEvent(t, e) { e = e || t.type; - const n = new ci(e, this, t); + const n = new _i(e, this, t); this.handleMapBrowserEvent(n); } handleMapBrowserEvent(t) { if (!this.frameState_) return; const e = t.originalEvent, n = e.type; - if (n === da.POINTERDOWN || n === X.WHEEL || n === X.KEYDOWN) { + if (n === _a.POINTERDOWN || n === H.WHEEL || n === H.KEYDOWN) { const s = this.getOwnerDocument(), r = this.viewport_.getRootNode ? this.viewport_.getRootNode() : s, o = e.target; if (this.overlayContainerStopEvent_.contains(o) || !(r === s ? s.documentElement : r).contains(o)) return; @@ -5958,20 +5968,20 @@ class U1 extends Se { let s = this.maxTilesLoading_, r = s; if (t) { const o = t.viewHints; - if (o[Bt.ANIMATING] || o[Bt.INTERACTING]) { + if (o[Zt.ANIMATING] || o[Zt.INTERACTING]) { const a = Date.now() - t.time > 8; s = a ? 0 : 8, r = a ? 0 : 2; } } e.getTilesLoading() < s && (e.reprioritize(), e.loadMoreTiles(s, r)); } - t && this.renderer_ && !t.animate && (this.renderComplete_ === !0 ? (this.hasListener(_i.RENDERCOMPLETE) && this.renderer_.dispatchRenderEvent( - _i.RENDERCOMPLETE, + t && this.renderer_ && !t.animate && (this.renderComplete_ === !0 ? (this.hasListener(Ei.RENDERCOMPLETE) && this.renderer_.dispatchRenderEvent( + Ei.RENDERCOMPLETE, t ), this.loaded_ === !1 && (this.loaded_ = !0, this.dispatchEvent( - new gn(ui.LOADEND, this, t) + new Cn(Qe.LOADEND, this, t) ))) : this.loaded_ === !0 && (this.loaded_ = !1, this.dispatchEvent( - new gn(ui.LOADSTART, this, t) + new Cn(Qe.LOADSTART, this, t) ))); const n = this.postRenderFunctions_; for (let s = 0, r = n.length; s < r; ++s) @@ -5986,50 +5996,50 @@ class U1 extends Se { for (let e = 0, n = this.targetChangeHandlerKeys_.length; e < n; ++e) pt(this.targetChangeHandlerKeys_[e]); this.targetChangeHandlerKeys_ = null, this.viewport_.removeEventListener( - X.CONTEXTMENU, + H.CONTEXTMENU, this.boundHandleBrowserEvent_ ), this.viewport_.removeEventListener( - X.WHEEL, + H.WHEEL, this.boundHandleBrowserEvent_ - ), this.mapBrowserEventHandler_.dispose(), this.mapBrowserEventHandler_ = null, ha(this.viewport_); + ), this.mapBrowserEventHandler_.dispose(), this.mapBrowserEventHandler_ = null, Ur(this.viewport_); } const t = this.getTargetElement(); if (!t) this.renderer_ && (clearTimeout(this.postRenderTimeoutHandle_), this.postRenderTimeoutHandle_ = void 0, this.postRenderFunctions_.length = 0, this.renderer_.dispose(), this.renderer_ = null), this.animationDelayKey_ && (cancelAnimationFrame(this.animationDelayKey_), this.animationDelayKey_ = void 0); else { - t.appendChild(this.viewport_), this.renderer_ || (this.renderer_ = new K0(this)), this.mapBrowserEventHandler_ = new tg( + t.appendChild(this.viewport_), this.renderer_ || (this.renderer_ = new j0(this)), this.mapBrowserEventHandler_ = new Q0( this, this.moveTolerance_ ); - for (const s in Ct) + for (const s in Mt) this.mapBrowserEventHandler_.addEventListener( - Ct[s], + Mt[s], this.handleMapBrowserEvent.bind(this) ); this.viewport_.addEventListener( - X.CONTEXTMENU, + H.CONTEXTMENU, this.boundHandleBrowserEvent_, !1 ), this.viewport_.addEventListener( - X.WHEEL, + H.WHEEL, this.boundHandleBrowserEvent_, - vu ? { passive: !1 } : !1 + Cu ? { passive: !1 } : !1 ); const e = this.getOwnerDocument().defaultView, n = this.keyboardEventTarget_ ? this.keyboardEventTarget_ : t; this.targetChangeHandlerKeys_ = [ - it( + et( n, - X.KEYDOWN, + H.KEYDOWN, this.handleBrowserEvent, this ), - it( + et( n, - X.KEYPRESS, + H.KEYPRESS, this.handleBrowserEvent, this ), - it(e, X.RESIZE, this.updateSize, this) + et(e, H.RESIZE, this.updateSize, this) ]; } this.updateSize(); @@ -6043,14 +6053,14 @@ class U1 extends Se { handleViewChanged_() { this.viewPropertyListenerKey_ && (pt(this.viewPropertyListenerKey_), this.viewPropertyListenerKey_ = null), this.viewChangeListenerKey_ && (pt(this.viewChangeListenerKey_), this.viewChangeListenerKey_ = null); const t = this.getView(); - t && (this.updateViewportSize_(), this.viewPropertyListenerKey_ = it( + t && (this.updateViewportSize_(), this.viewPropertyListenerKey_ = et( t, - In.PROPERTYCHANGE, + kn.PROPERTYCHANGE, this.handleViewPropertyChanged_, this - ), this.viewChangeListenerKey_ = it( + ), this.viewChangeListenerKey_ = et( t, - X.CHANGE, + H.CHANGE, this.handleViewPropertyChanged_, this ), t.resolveConstraints(0)), this.render(); @@ -6058,11 +6068,11 @@ class U1 extends Se { handleLayerGroupChanged_() { this.layerGroupPropertyListenerKeys_ && (this.layerGroupPropertyListenerKeys_.forEach(pt), this.layerGroupPropertyListenerKeys_ = null); const t = this.getLayerGroup(); - t && (this.handleLayerAdd_(new fi("addlayer", t)), this.layerGroupPropertyListenerKeys_ = [ - it(t, In.PROPERTYCHANGE, this.render, this), - it(t, X.CHANGE, this.render, this), - it(t, "addlayer", this.handleLayerAdd_, this), - it(t, "removelayer", this.handleLayerRemove_, this) + t && (this.handleLayerAdd_(new vi("addlayer", t)), this.layerGroupPropertyListenerKeys_ = [ + et(t, kn.PROPERTYCHANGE, this.render, this), + et(t, H.CHANGE, this.render, this), + et(t, "addlayer", this.handleLayerAdd_, this), + et(t, "removelayer", this.handleLayerRemove_, this) ]), this.render(); } isRendered() { @@ -6094,7 +6104,7 @@ class U1 extends Se { return this.getLayerGroup().getLayers().remove(t); } handleLayerRemove_(t) { - ud(t.layer); + gd(t.layer); } removeOverlay(t) { return this.getOverlays().remove(t); @@ -6102,7 +6112,7 @@ class U1 extends Se { renderFrame_(t) { const e = this.getSize(), n = this.getView(), s = this.frameState_; let r = null; - if (e !== void 0 && Fh(e) && n && n.isDef()) { + if (e !== void 0 && $h(e) && n && n.isDef()) { const o = n.getHints( this.frameState_ ? this.frameState_.viewHints : void 0 ), a = n.getState(); @@ -6110,7 +6120,7 @@ class U1 extends Se { animate: !1, coordinateToPixelTransform: this.coordinateToPixelTransform_, declutterTree: null, - extent: aa( + extent: fa( a.center, a.resolution, a.rotation, @@ -6133,7 +6143,7 @@ class U1 extends Se { renderTargets: {} }, a.nextCenter && a.nextResolution) { const l = isNaN(a.nextRotation) ? a.rotation : a.nextRotation; - r.nextExtent = aa( + r.nextExtent = fa( a.nextCenter, a.nextResolution, l, @@ -6144,33 +6154,33 @@ class U1 extends Se { this.frameState_ = r, this.renderer_.renderFrame(r), r && (r.animate && this.render(), Array.prototype.push.apply( this.postRenderFunctions_, r.postRenderFunctions - ), s && (!this.previousExtent_ || !ja(this.previousExtent_) && !ys(r.extent, this.previousExtent_)) && (this.dispatchEvent( - new gn(ui.MOVESTART, this, s) - ), this.previousExtent_ = ks(this.previousExtent_)), this.previousExtent_ && !r.viewHints[Bt.ANIMATING] && !r.viewHints[Bt.INTERACTING] && !ys(r.extent, this.previousExtent_) && (this.dispatchEvent( - new gn(ui.MOVEEND, this, r) - ), Mu(r.extent, this.previousExtent_))), this.dispatchEvent(new gn(ui.POSTRENDER, this, r)), this.renderComplete_ = this.hasListener(ui.LOADSTART) || this.hasListener(ui.LOADEND) || this.hasListener(_i.RENDERCOMPLETE) ? !this.tileQueue_.getTilesLoading() && !this.tileQueue_.getCount() && !this.getLoadingOrNotReady() : void 0, this.postRenderTimeoutHandle_ || (this.postRenderTimeoutHandle_ = setTimeout(() => { + ), s && (!this.previousExtent_ || !tl(this.previousExtent_) && !bs(r.extent, this.previousExtent_)) && (this.dispatchEvent( + new Cn(Qe.MOVESTART, this, s) + ), this.previousExtent_ = Vs(this.previousExtent_)), this.previousExtent_ && !r.viewHints[Zt.ANIMATING] && !r.viewHints[Zt.INTERACTING] && !bs(r.extent, this.previousExtent_) && (this.dispatchEvent( + new Cn(Qe.MOVEEND, this, r) + ), Eu(r.extent, this.previousExtent_))), this.dispatchEvent(new Cn(Qe.POSTRENDER, this, r)), this.renderComplete_ = this.hasListener(Qe.LOADSTART) || this.hasListener(Qe.LOADEND) || this.hasListener(Ei.RENDERCOMPLETE) ? !this.tileQueue_.getTilesLoading() && !this.tileQueue_.getCount() && !this.getLoadingOrNotReady() : void 0, this.postRenderTimeoutHandle_ || (this.postRenderTimeoutHandle_ = setTimeout(() => { this.postRenderTimeoutHandle_ = void 0, this.handlePostRender(); }, 0)); } setLayerGroup(t) { const e = this.getLayerGroup(); - e && this.handleLayerRemove_(new fi("removelayer", e)), this.set(Ot.LAYERGROUP, t); + e && this.handleLayerRemove_(new vi("removelayer", e)), this.set(Nt.LAYERGROUP, t); } setSize(t) { - this.set(Ot.SIZE, t); + this.set(Nt.SIZE, t); } setTarget(t) { - this.set(Ot.TARGET, t); + this.set(Nt.TARGET, t); } setView(t) { - if (!t || t instanceof Ke) { - this.set(Ot.VIEW, t); + if (!t || t instanceof ii) { + this.set(Nt.VIEW, t); return; } - this.set(Ot.VIEW, new Ke()); + this.set(Nt.VIEW, new ii()); const e = this; t.then(function(n) { - e.setView(new Ke(n)); + e.setView(new ii(n)); }); } updateSize() { @@ -6178,7 +6188,7 @@ class U1 extends Se { let e; if (t) { const n = getComputedStyle(t), s = t.offsetWidth - parseFloat(n.borderLeftWidth) - parseFloat(n.paddingLeft) - parseFloat(n.paddingRight) - parseFloat(n.borderRightWidth), r = t.offsetHeight - parseFloat(n.borderTopWidth) - parseFloat(n.paddingTop) - parseFloat(n.paddingBottom) - parseFloat(n.borderBottomWidth); - !isNaN(s) && !isNaN(r) && (e = [s, r], !Fh(e) && !!(t.offsetWidth || t.offsetHeight || t.getClientRects().length) && console.warn( + !isNaN(s) && !isNaN(r) && (e = [s, r], !$h(e) && !!(t.offsetWidth || t.offsetHeight || t.getClientRects().length) && console.warn( "No map visible because the map container's width or height are 0." )); } @@ -6196,28 +6206,28 @@ class U1 extends Se { } } } -function V1(i) { +function U1(i) { let t = null; i.keyboardEventTarget !== void 0 && (t = typeof i.keyboardEventTarget == "string" ? document.getElementById(i.keyboardEventTarget) : i.keyboardEventTarget); - const e = {}, n = i.layers && typeof i.layers.getLayers == "function" ? i.layers : new go({ + const e = {}, n = i.layers && typeof i.layers.getLayers == "function" ? i.layers : new xo({ layers: i.layers }); - e[Ot.LAYERGROUP] = n, e[Ot.TARGET] = i.target, e[Ot.VIEW] = i.view instanceof Ke ? i.view : new Ke(); + e[Nt.LAYERGROUP] = n, e[Nt.TARGET] = i.target, e[Nt.VIEW] = i.view instanceof ii ? i.view : new ii(); let s; - i.controls !== void 0 && (Array.isArray(i.controls) ? s = new Te(i.controls.slice()) : (Y( + i.controls !== void 0 && (Array.isArray(i.controls) ? s = new Oe(i.controls.slice()) : (X( typeof i.controls.getArray == "function", 47 ), s = i.controls)); let r; - i.interactions !== void 0 && (Array.isArray(i.interactions) ? r = new Te(i.interactions.slice()) : (Y( + i.interactions !== void 0 && (Array.isArray(i.interactions) ? r = new Oe(i.interactions.slice()) : (X( typeof i.interactions.getArray == "function", 48 ), r = i.interactions)); let o; - return i.overlays !== void 0 ? Array.isArray(i.overlays) ? o = new Te(i.overlays.slice()) : (Y( + return i.overlays !== void 0 ? Array.isArray(i.overlays) ? o = new Oe(i.overlays.slice()) : (X( typeof i.overlays.getArray == "function", 49 - ), o = i.overlays) : o = new Te(), { + ), o = i.overlays) : o = new Oe(), { controls: s, interactions: r, keyboardEventTarget: t, @@ -6225,8 +6235,8 @@ function V1(i) { values: e }; } -const W1 = U1; -class pl extends Se { +const V1 = Z1; +class Ml extends Ce { constructor(t) { if (super(), this.on, this.once, this.un, this.id_ = void 0, this.geometryName_ = "geometry", this.style_ = null, this.styleFunction_ = void 0, this.geometryChangeKey_ = null, this.addChangeListener(this.geometryName_, this.handleGeometryChanged_), t) if (typeof t.getSimplifiedGeometry == "function") { @@ -6238,7 +6248,7 @@ class pl extends Se { } } clone() { - const t = new pl(this.hasProperties() ? this.getProperties() : null); + const t = new Ml(this.hasProperties() ? this.getProperties() : null); t.setGeometryName(this.getGeometryName()); const e = this.getGeometry(); e && t.setGeometry(e.clone()); @@ -6266,9 +6276,9 @@ class pl extends Se { handleGeometryChanged_() { this.geometryChangeKey_ && (pt(this.geometryChangeKey_), this.geometryChangeKey_ = null); const t = this.getGeometry(); - t && (this.geometryChangeKey_ = it( + t && (this.geometryChangeKey_ = et( t, - X.CHANGE, + H.CHANGE, this.handleGeometryChange_, this )), this.changed(); @@ -6277,7 +6287,7 @@ class pl extends Se { this.set(this.geometryName_, t); } setStyle(t) { - this.style_ = t, this.styleFunction_ = t ? H1(t) : void 0, this.changed(); + this.style_ = t, this.styleFunction_ = t ? W1(t) : void 0, this.changed(); } setId(t) { this.id_ = t, this.changed(); @@ -6286,17 +6296,17 @@ class pl extends Se { this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_), this.geometryName_ = t, this.addChangeListener(this.geometryName_, this.handleGeometryChanged_), this.handleGeometryChanged_(); } } -function H1(i) { +function W1(i) { if (typeof i == "function") return i; { let t; - return Array.isArray(i) ? t = i : (Y(typeof i.getZIndex == "function", 41), t = [i]), function() { + return Array.isArray(i) ? t = i : (X(typeof i.getZIndex == "function", 41), t = [i]), function() { return t; }; } } -const zs = pl, yt = { +const an = Ml, vt = { ACCURACY: "accuracy", ACCURACY_GEOMETRY: "accuracyGeometry", ALTITUDE: "altitude", @@ -6308,24 +6318,24 @@ const zs = pl, yt = { TRACKING: "tracking", TRACKING_OPTIONS: "trackingOptions" }; -class X1 extends ke { +class H1 extends ze { constructor(t) { - super(X.ERROR), this.code = t.code, this.message = t.message; + super(H.ERROR), this.code = t.code, this.message = t.message; } } -class Y1 extends Se { +class X1 extends Ce { constructor(t) { - super(), this.on, this.once, this.un, t = t || {}, this.position_ = null, this.transform_ = il, this.watchId_ = void 0, this.addChangeListener(yt.PROJECTION, this.handleProjectionChanged_), this.addChangeListener(yt.TRACKING, this.handleTrackingChanged_), t.projection !== void 0 && this.setProjection(t.projection), t.trackingOptions !== void 0 && this.setTrackingOptions(t.trackingOptions), this.setTracking(t.tracking !== void 0 ? t.tracking : !1); + super(), this.on, this.once, this.un, t = t || {}, this.position_ = null, this.transform_ = al, this.watchId_ = void 0, this.addChangeListener(vt.PROJECTION, this.handleProjectionChanged_), this.addChangeListener(vt.TRACKING, this.handleTrackingChanged_), t.projection !== void 0 && this.setProjection(t.projection), t.trackingOptions !== void 0 && this.setTrackingOptions(t.trackingOptions), this.setTracking(t.tracking !== void 0 ? t.tracking : !1); } disposeInternal() { this.setTracking(!1), super.disposeInternal(); } handleProjectionChanged_() { const t = this.getProjection(); - t && (this.transform_ = mo( - J("EPSG:4326"), + t && (this.transform_ = Co( + q("EPSG:4326"), t - ), this.position_ && this.set(yt.POSITION, this.transform_(this.position_))); + ), this.position_ && this.set(vt.POSITION, this.transform_(this.position_))); } handleTrackingChanged_() { if ("geolocation" in navigator) { @@ -6339,72 +6349,72 @@ class Y1 extends Se { } positionChange_(t) { const e = t.coords; - this.set(yt.ACCURACY, e.accuracy), this.set( - yt.ALTITUDE, + this.set(vt.ACCURACY, e.accuracy), this.set( + vt.ALTITUDE, e.altitude === null ? void 0 : e.altitude ), this.set( - yt.ALTITUDE_ACCURACY, + vt.ALTITUDE_ACCURACY, e.altitudeAccuracy === null ? void 0 : e.altitudeAccuracy ), this.set( - yt.HEADING, - e.heading === null ? void 0 : Gi(e.heading) + vt.HEADING, + e.heading === null ? void 0 : Hi(e.heading) ), this.position_ ? (this.position_[0] = e.longitude, this.position_[1] = e.latitude) : this.position_ = [e.longitude, e.latitude]; const n = this.transform_(this.position_); - this.set(yt.POSITION, n), this.set(yt.SPEED, e.speed === null ? void 0 : e.speed); - const s = Kg(this.position_, e.accuracy); - s.applyTransform(this.transform_), this.set(yt.ACCURACY_GEOMETRY, s), this.changed(); + this.set(vt.POSITION, n), this.set(vt.SPEED, e.speed === null ? void 0 : e.speed); + const s = jg(this.position_, e.accuracy); + s.applyTransform(this.transform_), this.set(vt.ACCURACY_GEOMETRY, s), this.changed(); } positionError_(t) { - this.dispatchEvent(new X1(t)); + this.dispatchEvent(new H1(t)); } getAccuracy() { - return this.get(yt.ACCURACY); + return this.get(vt.ACCURACY); } getAccuracyGeometry() { - return this.get(yt.ACCURACY_GEOMETRY) || null; + return this.get(vt.ACCURACY_GEOMETRY) || null; } getAltitude() { - return this.get(yt.ALTITUDE); + return this.get(vt.ALTITUDE); } getAltitudeAccuracy() { - return this.get(yt.ALTITUDE_ACCURACY); + return this.get(vt.ALTITUDE_ACCURACY); } getHeading() { - return this.get(yt.HEADING); + return this.get(vt.HEADING); } getPosition() { - return this.get(yt.POSITION); + return this.get(vt.POSITION); } getProjection() { - return this.get(yt.PROJECTION); + return this.get(vt.PROJECTION); } getSpeed() { - return this.get(yt.SPEED); + return this.get(vt.SPEED); } getTracking() { - return this.get(yt.TRACKING); + return this.get(vt.TRACKING); } getTrackingOptions() { - return this.get(yt.TRACKING_OPTIONS); + return this.get(vt.TRACKING_OPTIONS); } setProjection(t) { - this.set(yt.PROJECTION, J(t)); + this.set(vt.PROJECTION, q(t)); } setTracking(t) { - this.set(yt.TRACKING, t); + this.set(vt.TRACKING, t); } setTrackingOptions(t) { - this.set(yt.TRACKING_OPTIONS, t); + this.set(vt.TRACKING_OPTIONS, t); } } -const j1 = Y1; -class yl { +const Y1 = X1; +class El { constructor(t) { t = t || {}, this.color_ = t.color !== void 0 ? t.color : null; } clone() { const t = this.getColor(); - return new yl({ + return new El({ color: Array.isArray(t) ? t.slice() : t || void 0 }); } @@ -6415,8 +6425,8 @@ class yl { this.color_ = t; } } -const he = yl; -function fd(i, t, e, n, s, r, o) { +const Yt = El; +function pd(i, t, e, n, s, r, o) { let a, l; const h = (e - t) / n; if (h === 1) @@ -6426,19 +6436,19 @@ function fd(i, t, e, n, s, r, o) { else if (h !== 0) { let c = i[t], u = i[t + 1], d = 0; const f = [0]; - for (let _ = t + n; _ < e; _ += n) { - const y = i[_], p = i[_ + 1]; - d += Math.sqrt((y - c) * (y - c) + (p - u) * (p - u)), f.push(d), c = y, u = p; + for (let p = t + n; p < e; p += n) { + const _ = i[p], y = i[p + 1]; + d += Math.sqrt((_ - c) * (_ - c) + (y - u) * (y - u)), f.push(d), c = _, u = y; } - const g = s * d, m = t0(f, g); + const g = s * d, m = Kf(f, g); m < 0 ? (l = (g - f[-m - 2]) / (f[-m - 1] - f[-m - 2]), a = t + (-m - 2) * n) : a = t + m * n; } o = o > 1 ? o : 2, r = r || new Array(o); for (let c = 0; c < o; ++c) - r[c] = a === void 0 ? NaN : l === void 0 ? i[a + c] : Ye(i[a + c], i[a + n + c], l); + r[c] = a === void 0 ? NaN : l === void 0 ? i[a + c] : ti(i[a + c], i[a + n + c], l); return r; } -function Ma(i, t, e, n, s, r) { +function Ra(i, t, e, n, s, r) { if (e == t) return null; let o; @@ -6460,7 +6470,7 @@ function Ma(i, t, e, n, s, r) { o = []; for (let d = 0; d < n - 1; ++d) o.push( - Ye( + ti( i[(a - 1) * n + d], i[a * n + d], u @@ -6468,9 +6478,9 @@ function Ma(i, t, e, n, s, r) { ); return o.push(s), o; } -function K1(i, t, e, n, s, r, o) { +function j1(i, t, e, n, s, r, o) { if (o) - return Ma( + return Ra( i, t, e[e.length - 1], @@ -6489,7 +6499,7 @@ function K1(i, t, e, n, s, r, o) { if (s < i[t + n - 1]) return null; if (s <= i[c - 1]) - return Ma( + return Ra( i, t, c, @@ -6502,7 +6512,7 @@ function K1(i, t, e, n, s, r, o) { } return null; } -function gd(i, t, e, n) { +function _d(i, t, e, n) { let s = i[t], r = i[t + 1], o = 0; for (let a = t + n; a < e; a += n) { const l = i[a], h = i[a + 1]; @@ -6510,7 +6520,7 @@ function gd(i, t, e, n) { } return o; } -class Vr extends Qi { +class Kr extends on { constructor(t, e) { super(), this.flatMidpoint_ = null, this.flatMidpointRevision_ = -1, this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, e !== void 0 && !Array.isArray(t[0]) ? this.setFlatCoordinates( e, @@ -6521,25 +6531,25 @@ class Vr extends Qi { ); } appendCoordinate(t) { - this.flatCoordinates ? Ht(this.flatCoordinates, t) : this.flatCoordinates = t.slice(), this.changed(); + this.flatCoordinates ? Kt(this.flatCoordinates, t) : this.flatCoordinates = t.slice(), this.changed(); } clone() { - const t = new Vr( + const t = new Kr( this.flatCoordinates.slice(), this.layout ); return t.applyProperties(this), t; } closestPointXY(t, e, n, s) { - return s < qi(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( - al( + return s < rn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( + dl( this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0 ) - ), this.maxDeltaRevision_ = this.getRevision()), hl( + ), this.maxDeltaRevision_ = this.getRevision()), gl( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6553,7 +6563,7 @@ class Vr extends Qi { )); } forEachSegment(t) { - return ed( + return sd( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6562,7 +6572,7 @@ class Vr extends Qi { ); } getCoordinateAtM(t, e) { - return this.layout != "XYM" && this.layout != "XYZM" ? null : (e = e !== void 0 ? e : !1, Ma( + return this.layout != "XYM" && this.layout != "XYZM" ? null : (e = e !== void 0 ? e : !1, Ra( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6572,7 +6582,7 @@ class Vr extends Qi { )); } getCoordinates() { - return gi( + return Ci( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6580,7 +6590,7 @@ class Vr extends Qi { ); } getCoordinateAt(t, e) { - return fd( + return pd( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6591,7 +6601,7 @@ class Vr extends Qi { ); } getLength() { - return gd( + return _d( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6603,7 +6613,7 @@ class Vr extends Qi { } getSimplifiedGeometryInternal(t) { const e = []; - return e.length = dl( + return e.length = _l( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6611,13 +6621,13 @@ class Vr extends Qi { t, e, 0 - ), new Vr(e, "XY"); + ), new Kr(e, "XY"); } getType() { return "LineString"; } intersectsExtent(t) { - return po( + return Eo( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6626,7 +6636,7 @@ class Vr extends Qi { ); } setCoordinates(t, e) { - this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = _o( + this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Mo( this.flatCoordinates, 0, t, @@ -6634,14 +6644,14 @@ class Vr extends Qi { ), this.changed(); } } -const bs = Vr; -class vl { +const Ds = Kr; +class wl { constructor(t) { t = t || {}, this.color_ = t.color !== void 0 ? t.color : null, this.lineCap_ = t.lineCap, this.lineDash_ = t.lineDash !== void 0 ? t.lineDash : null, this.lineDashOffset_ = t.lineDashOffset, this.lineJoin_ = t.lineJoin, this.miterLimit_ = t.miterLimit, this.width_ = t.width; } clone() { const t = this.getColor(); - return new vl({ + return new wl({ color: Array.isArray(t) ? t.slice() : t || void 0, lineCap: this.getLineCap(), lineDash: this.getLineDash() ? this.getLineDash().slice() : void 0, @@ -6694,20 +6704,20 @@ class vl { this.width_ = t; } } -const Ee = vl, It = { +const Re = wl, At = { IDLE: 0, LOADING: 1, LOADED: 2, ERROR: 3, EMPTY: 4 }; -class xl { +class Sl { constructor(t) { - this.opacity_ = t.opacity, this.rotateWithView_ = t.rotateWithView, this.rotation_ = t.rotation, this.scale_ = t.scale, this.scaleArray_ = ae(t.scale), this.displacement_ = t.displacement, this.declutterMode_ = t.declutterMode; + this.opacity_ = t.opacity, this.rotateWithView_ = t.rotateWithView, this.rotation_ = t.rotation, this.scale_ = t.scale, this.scaleArray_ = ce(t.scale), this.displacement_ = t.displacement, this.declutterMode_ = t.declutterMode; } clone() { const t = this.getScale(); - return new xl({ + return new Sl({ opacity: this.getOpacity(), scale: Array.isArray(t) ? t.slice() : t, rotation: this.getRotation(), @@ -6738,28 +6748,28 @@ class xl { return this.declutterMode_; } getAnchor() { - return W(); + return V(); } getImage(t) { - return W(); + return V(); } getHitDetectionImage() { - return W(); + return V(); } getPixelRatio(t) { return 1; } getImageState() { - return W(); + return V(); } getImageSize() { - return W(); + return V(); } getOrigin() { - return W(); + return V(); } getSize() { - return W(); + return V(); } setDisplacement(t) { this.displacement_ = t; @@ -6774,23 +6784,23 @@ class xl { this.rotation_ = t; } setScale(t) { - this.scale_ = t, this.scaleArray_ = ae(t); + this.scale_ = t, this.scaleArray_ = ce(t); } listenImageChange(t) { - W(); + V(); } load() { - W(); + V(); } unlistenImageChange(t) { - W(); + V(); } } -const md = xl; -function Ie(i) { - return Array.isArray(i) ? Iu(i) : i; +const yd = Sl; +function Ne(i) { + return Array.isArray(i) ? Pu(i) : i; } -class Ml extends md { +class Rl extends yd { constructor(t) { const e = t.rotateWithView !== void 0 ? t.rotateWithView : !1; super({ @@ -6803,7 +6813,7 @@ class Ml extends md { }), this.canvas_ = void 0, this.hitDetectionCanvas_ = null, this.fill_ = t.fill !== void 0 ? t.fill : null, this.origin_ = [0, 0], this.points_ = t.points, this.radius_ = t.radius !== void 0 ? t.radius : t.radius1, this.radius2_ = t.radius2, this.angle_ = t.angle !== void 0 ? t.angle : 0, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.size_ = null, this.renderOptions_ = null, this.render(); } clone() { - const t = this.getScale(), e = new Ml({ + const t = this.getScale(), e = new Rl({ fill: this.getFill() ? this.getFill().clone() : void 0, points: this.getPoints(), radius: this.getRadius(), @@ -6843,7 +6853,7 @@ class Ml extends md { getImage(t) { let e = this.canvas_[t]; if (!e) { - const n = this.renderOptions_, s = de( + const n = this.renderOptions_, s = ge( n.size * t, n.size * t ); @@ -6858,7 +6868,7 @@ class Ml extends md { return this.size_; } getImageState() { - return It.LOADED; + return At.LOADED; } getOrigin() { return this.origin_; @@ -6898,19 +6908,19 @@ class Ml extends md { const o = this.radius2_ === void 0 ? this.points_ : this.points_ * 2, a = 2 * Math.PI / o, l = r * Math.sin(a), h = Math.sqrt(r * r - l * l), c = s - h, u = Math.sqrt(l * l + c * c), d = u / l; if (t === "miter" && d <= n) return d * e; - const f = e / 2 / d, g = e / 2 * (c / u), _ = Math.sqrt((s + f) * (s + f) + g * g) - s; + const f = e / 2 / d, g = e / 2 * (c / u), p = Math.sqrt((s + f) * (s + f) + g * g) - s; if (this.radius2_ === void 0 || t === "bevel") - return _ * 2; - const y = s * Math.sin(a), p = Math.sqrt(s * s - y * y), v = r - p, M = Math.sqrt(y * y + v * v) / y; - if (M <= n) { - const E = M * e / 2 - r - s; - return 2 * Math.max(_, E); + return p * 2; + const _ = s * Math.sin(a), y = Math.sqrt(s * s - _ * _), v = r - y, C = Math.sqrt(_ * _ + v * v) / _; + if (C <= n) { + const E = C * e / 2 - r - s; + return 2 * Math.max(p, E); } - return _ * 2; + return p * 2; } createRenderOptions() { - let t = Pn, e = 0, n = null, s = 0, r, o = 0; - this.stroke_ && (r = this.stroke_.getColor(), r === null && (r = Cs), r = Ie(r), o = this.stroke_.getWidth(), o === void 0 && (o = ws), n = this.stroke_.getLineDash(), s = this.stroke_.getLineDashOffset(), t = this.stroke_.getLineJoin(), t === void 0 && (t = Pn), e = this.stroke_.getMiterLimit(), e === void 0 && (e = Ms)); + let t = $n, e = 0, n = null, s = 0, r, o = 0; + this.stroke_ && (r = this.stroke_.getColor(), r === null && (r = As), r = Ne(r), o = this.stroke_.getWidth(), o === void 0 && (o = Os), n = this.stroke_.getLineDash(), s = this.stroke_.getLineDashOffset(), t = this.stroke_.getLineJoin(), t === void 0 && (t = $n), e = this.stroke_.getMiterLimit(), e === void 0 && (e = Is)); const a = this.calculateLineJoinSize_(t, o, e), l = Math.max(this.radius_, this.radius2_ || 0), h = Math.ceil(2 * l + a); return { strokeStyle: r, @@ -6930,15 +6940,15 @@ class Ml extends md { draw_(t, e, n) { if (e.scale(n, n), e.translate(t.size / 2, t.size / 2), this.createPath_(e), this.fill_) { let s = this.fill_.getColor(); - s === null && (s = Je), e.fillStyle = Ie(s), e.fill(); + s === null && (s = si), e.fillStyle = Ne(s), e.fill(); } this.stroke_ && (e.strokeStyle = t.strokeStyle, e.lineWidth = t.strokeWidth, t.lineDash && (e.setLineDash(t.lineDash), e.lineDashOffset = t.lineDashOffset), e.lineJoin = t.lineJoin, e.miterLimit = t.miterLimit, e.stroke()); } createHitDetectionCanvas_(t) { if (this.fill_) { let e = this.fill_.getColor(), n = 0; - if (typeof e == "string" && (e = Nr(e)), e === null ? n = 1 : Array.isArray(e) && (n = e.length === 4 ? e[3] : 1), n === 0) { - const s = de( + if (typeof e == "string" && (e = $r(e)), e === null ? n = 1 : Array.isArray(e) && (n = e.length === 4 ? e[3] : 1), n === 0) { + const s = ge( t.size, t.size ); @@ -6964,11 +6974,11 @@ class Ml extends md { } } drawHitDetectionCanvas_(t, e) { - e.translate(t.size / 2, t.size / 2), this.createPath_(e), e.fillStyle = Je, e.fill(), this.stroke_ && (e.strokeStyle = t.strokeStyle, e.lineWidth = t.strokeWidth, t.lineDash && (e.setLineDash(t.lineDash), e.lineDashOffset = t.lineDashOffset), e.lineJoin = t.lineJoin, e.miterLimit = t.miterLimit, e.stroke()); + e.translate(t.size / 2, t.size / 2), this.createPath_(e), e.fillStyle = si, e.fill(), this.stroke_ && (e.strokeStyle = t.strokeStyle, e.lineWidth = t.strokeWidth, t.lineDash && (e.setLineDash(t.lineDash), e.lineDashOffset = t.lineDashOffset), e.lineJoin = t.lineJoin, e.miterLimit = t.miterLimit, e.stroke()); } } -const _d = Ml; -class Cl extends _d { +const vd = Rl; +class bl extends vd { constructor(t) { t = t || { radius: 5 }, super({ points: 1 / 0, @@ -6983,7 +6993,7 @@ class Cl extends _d { }); } clone() { - const t = this.getScale(), e = new Cl({ + const t = this.getScale(), e = new bl({ fill: this.getFill() ? this.getFill().clone() : void 0, stroke: this.getStroke() ? this.getStroke().clone() : void 0, radius: this.getRadius(), @@ -6999,14 +7009,14 @@ class Cl extends _d { this.radius_ = t, this.render(); } } -const qe = Cl; -class yo { +const ni = bl; +class wo { constructor(t) { - t = t || {}, this.geometry_ = null, this.geometryFunction_ = Dh, t.geometry !== void 0 && this.setGeometry(t.geometry), this.fill_ = t.fill !== void 0 ? t.fill : null, this.image_ = t.image !== void 0 ? t.image : null, this.renderer_ = t.renderer !== void 0 ? t.renderer : null, this.hitDetectionRenderer_ = t.hitDetectionRenderer !== void 0 ? t.hitDetectionRenderer : null, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.text_ = t.text !== void 0 ? t.text : null, this.zIndex_ = t.zIndex; + t = t || {}, this.geometry_ = null, this.geometryFunction_ = Bh, t.geometry !== void 0 && this.setGeometry(t.geometry), this.fill_ = t.fill !== void 0 ? t.fill : null, this.image_ = t.image !== void 0 ? t.image : null, this.renderer_ = t.renderer !== void 0 ? t.renderer : null, this.hitDetectionRenderer_ = t.hitDetectionRenderer !== void 0 ? t.hitDetectionRenderer : null, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.text_ = t.text !== void 0 ? t.text : null, this.zIndex_ = t.zIndex; } clone() { let t = this.getGeometry(); - return t && typeof t == "object" && (t = t.clone()), new yo({ + return t && typeof t == "object" && (t = t.clone()), new wo({ geometry: t, fill: this.getFill() ? this.getFill().clone() : void 0, image: this.getImage() ? this.getImage().clone() : void 0, @@ -7066,36 +7076,36 @@ class yo { return e.get(t); } : t ? t !== void 0 && (this.geometryFunction_ = function() { return t; - }) : this.geometryFunction_ = Dh, this.geometry_ = t; + }) : this.geometryFunction_ = Bh, this.geometry_ = t; } setZIndex(t) { this.zIndex_ = t; } } -function q1(i) { +function K1(i) { let t; if (typeof i == "function") t = i; else { let e; - Array.isArray(i) ? e = i : (Y(typeof i.getZIndex == "function", 41), e = [i]), t = function() { + Array.isArray(i) ? e = i : (X(typeof i.getZIndex == "function", 41), e = [i]), t = function() { return e; }; } return t; } -let Uo = null; -function J1(i, t) { - if (!Uo) { - const e = new he({ +let Ko = null; +function q1(i, t) { + if (!Ko) { + const e = new Yt({ color: "rgba(255,255,255,0.4)" - }), n = new Ee({ + }), n = new Re({ color: "#3399CC", width: 1.25 }); - Uo = [ - new yo({ - image: new qe({ + Ko = [ + new wo({ + image: new ni({ fill: e, stroke: n, radius: 5 @@ -7105,19 +7115,19 @@ function J1(i, t) { }) ]; } - return Uo; + return Ko; } -function Dh(i) { +function Bh(i) { return i.getGeometry(); } -const Vt = yo, Q1 = "#333"; -class El { +const Vt = wo, J1 = "#333"; +class Ll { constructor(t) { - t = t || {}, this.font_ = t.font, this.rotation_ = t.rotation, this.rotateWithView_ = t.rotateWithView, this.scale_ = t.scale, this.scaleArray_ = ae(t.scale !== void 0 ? t.scale : 1), this.text_ = t.text, this.textAlign_ = t.textAlign, this.justify_ = t.justify, this.textBaseline_ = t.textBaseline, this.fill_ = t.fill !== void 0 ? t.fill : new he({ color: Q1 }), this.maxAngle_ = t.maxAngle !== void 0 ? t.maxAngle : Math.PI / 4, this.placement_ = t.placement !== void 0 ? t.placement : "point", this.overflow_ = !!t.overflow, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.offsetX_ = t.offsetX !== void 0 ? t.offsetX : 0, this.offsetY_ = t.offsetY !== void 0 ? t.offsetY : 0, this.backgroundFill_ = t.backgroundFill ? t.backgroundFill : null, this.backgroundStroke_ = t.backgroundStroke ? t.backgroundStroke : null, this.padding_ = t.padding === void 0 ? null : t.padding; + t = t || {}, this.font_ = t.font, this.rotation_ = t.rotation, this.rotateWithView_ = t.rotateWithView, this.scale_ = t.scale, this.scaleArray_ = ce(t.scale !== void 0 ? t.scale : 1), this.text_ = t.text, this.textAlign_ = t.textAlign, this.justify_ = t.justify, this.textBaseline_ = t.textBaseline, this.fill_ = t.fill !== void 0 ? t.fill : new Yt({ color: J1 }), this.maxAngle_ = t.maxAngle !== void 0 ? t.maxAngle : Math.PI / 4, this.placement_ = t.placement !== void 0 ? t.placement : "point", this.overflow_ = !!t.overflow, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.offsetX_ = t.offsetX !== void 0 ? t.offsetX : 0, this.offsetY_ = t.offsetY !== void 0 ? t.offsetY : 0, this.backgroundFill_ = t.backgroundFill ? t.backgroundFill : null, this.backgroundStroke_ = t.backgroundStroke ? t.backgroundStroke : null, this.padding_ = t.padding === void 0 ? null : t.padding; } clone() { const t = this.getScale(); - return new El({ + return new Ll({ font: this.getFont(), placement: this.getPlacement(), maxAngle: this.getMaxAngle(), @@ -7223,7 +7233,7 @@ class El { this.rotation_ = t; } setScale(t) { - this.scale_ = t, this.scaleArray_ = ae(t !== void 0 ? t : 1); + this.scale_ = t, this.scaleArray_ = ce(t !== void 0 ? t : 1); } setStroke(t) { this.stroke_ = t; @@ -7250,34 +7260,34 @@ class El { this.padding_ = t; } } -const Ca = El; -function tm(i, t, e, n, s) { - pd(i, t, e || 0, n || i.length - 1, s || em); +const ba = Ll; +function Q1(i, t, e, n, s) { + xd(i, t, e || 0, n || i.length - 1, s || tm); } -function pd(i, t, e, n, s) { +function xd(i, t, e, n, s) { for (; n > e; ) { if (n - e > 600) { var r = n - e + 1, o = t - e + 1, a = Math.log(r), l = 0.5 * Math.exp(2 * a / 3), h = 0.5 * Math.sqrt(a * l * (r - l) / r) * (o - r / 2 < 0 ? -1 : 1), c = Math.max(e, Math.floor(t - o * l / r + h)), u = Math.min(n, Math.floor(t + (r - o) * l / r + h)); - pd(i, t, c, u, s); + xd(i, t, c, u, s); } var d = i[t], f = e, g = n; - for (Qn(i, e, t), s(i[n], d) > 0 && Qn(i, e, n); f < g; ) { - for (Qn(i, f, g), f++, g--; s(i[f], d) < 0; ) + for (hs(i, e, t), s(i[n], d) > 0 && hs(i, e, n); f < g; ) { + for (hs(i, f, g), f++, g--; s(i[f], d) < 0; ) f++; for (; s(i[g], d) > 0; ) g--; } - s(i[e], d) === 0 ? Qn(i, e, g) : (g++, Qn(i, g, n)), g <= t && (e = g + 1), t <= g && (n = g - 1); + s(i[e], d) === 0 ? hs(i, e, g) : (g++, hs(i, g, n)), g <= t && (e = g + 1), t <= g && (n = g - 1); } } -function Qn(i, t, e) { +function hs(i, t, e) { var n = i[t]; i[t] = i[e], i[e] = n; } -function em(i, t) { +function tm(i, t) { return i < t ? -1 : i > t ? 1 : 0; } -class yd { +class Cd { constructor(t = 9) { this._maxEntries = Math.max(4, t), this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4)), this.clear(); } @@ -7287,13 +7297,13 @@ class yd { search(t) { let e = this.data; const n = []; - if (!pr(t, e)) + if (!Cr(t, e)) return n; const s = this.toBBox, r = []; for (; e; ) { for (let o = 0; o < e.children.length; o++) { const a = e.children[o], l = e.leaf ? s(a) : a; - pr(t, l) && (e.leaf ? n.push(a) : Wo(t, l) ? this._all(a, n) : r.push(a)); + Cr(t, l) && (e.leaf ? n.push(a) : Jo(t, l) ? this._all(a, n) : r.push(a)); } e = r.pop(); } @@ -7301,14 +7311,14 @@ class yd { } collides(t) { let e = this.data; - if (!pr(t, e)) + if (!Cr(t, e)) return !1; const n = []; for (; e; ) { for (let s = 0; s < e.children.length; s++) { const r = e.children[s], o = e.leaf ? this.toBBox(r) : r; - if (pr(t, o)) { - if (e.leaf || Wo(t, o)) + if (Cr(t, o)) { + if (e.leaf || Jo(t, o)) return !0; n.push(r); } @@ -7343,7 +7353,7 @@ class yd { return t && this._insert(t, this.data.height - 1), this; } clear() { - return this.data = mn([]), this; + return this.data = Mn([]), this; } remove(t, e) { if (!t) @@ -7353,11 +7363,11 @@ class yd { let a, l, h; for (; n || r.length; ) { if (n || (n = r.pop(), l = r[r.length - 1], a = o.pop(), h = !0), n.leaf) { - const c = im(t, n.children, e); + const c = em(t, n.children, e); if (c !== -1) return n.children.splice(c, 1), r.push(n), this._condense(r), this; } - !h && !n.leaf && Wo(n, s) ? (r.push(n), o.push(a), a = 0, l = n, n = n.children[0]) : l ? (a++, n = l.children[a], h = !1) : n = null; + !h && !n.leaf && Jo(n, s) ? (r.push(n), o.push(a), a = 0, l = n, n = n.children[0]) : l ? (a++, n = l.children[a], h = !1) : n = null; } return this; } @@ -7386,25 +7396,25 @@ class yd { const r = n - e + 1; let o = this._maxEntries, a; if (r <= o) - return a = mn(t.slice(e, n + 1)), hn(a, this.toBBox), a; - s || (s = Math.ceil(Math.log(r) / Math.log(o)), o = Math.ceil(r / Math.pow(o, s - 1))), a = mn([]), a.leaf = !1, a.height = s; + return a = Mn(t.slice(e, n + 1)), mn(a, this.toBBox), a; + s || (s = Math.ceil(Math.log(r) / Math.log(o)), o = Math.ceil(r / Math.pow(o, s - 1))), a = Mn([]), a.leaf = !1, a.height = s; const l = Math.ceil(r / o), h = l * Math.ceil(Math.sqrt(o)); - kh(t, e, n, h, this.compareMinX); + zh(t, e, n, h, this.compareMinX); for (let c = e; c <= n; c += h) { const u = Math.min(c + h - 1, n); - kh(t, c, u, l, this.compareMinY); + zh(t, c, u, l, this.compareMinY); for (let d = c; d <= u; d += l) { const f = Math.min(d + l - 1, u); a.children.push(this._build(t, d, f, s - 1)); } } - return hn(a, this.toBBox), a; + return mn(a, this.toBBox), a; } _chooseSubtree(t, e, n, s) { for (; s.push(e), !(e.leaf || s.length - 1 === n); ) { let r = 1 / 0, o = 1 / 0, a; for (let l = 0; l < e.children.length; l++) { - const h = e.children[l], c = Vo(h), u = rm(t, h) - c; + const h = e.children[l], c = qo(h), u = sm(t, h) - c; u < o ? (o = u, r = c < r ? c : r, a = h) : u === o && c < r && (r = c, a = h); } e = a || e.children[0]; @@ -7413,55 +7423,55 @@ class yd { } _insert(t, e, n) { const s = n ? t : this.toBBox(t), r = [], o = this._chooseSubtree(s, this.data, e, r); - for (o.children.push(t), rs(o, s); e >= 0 && r[e].children.length > this._maxEntries; ) + for (o.children.push(t), gs(o, s); e >= 0 && r[e].children.length > this._maxEntries; ) this._split(r, e), e--; this._adjustParentBBoxes(s, r, e); } _split(t, e) { const n = t[e], s = n.children.length, r = this._minEntries; this._chooseSplitAxis(n, r, s); - const o = this._chooseSplitIndex(n, r, s), a = mn(n.children.splice(o, n.children.length - o)); - a.height = n.height, a.leaf = n.leaf, hn(n, this.toBBox), hn(a, this.toBBox), e ? t[e - 1].children.push(a) : this._splitRoot(n, a); + const o = this._chooseSplitIndex(n, r, s), a = Mn(n.children.splice(o, n.children.length - o)); + a.height = n.height, a.leaf = n.leaf, mn(n, this.toBBox), mn(a, this.toBBox), e ? t[e - 1].children.push(a) : this._splitRoot(n, a); } _splitRoot(t, e) { - this.data = mn([t, e]), this.data.height = t.height + 1, this.data.leaf = !1, hn(this.data, this.toBBox); + this.data = Mn([t, e]), this.data.height = t.height + 1, this.data.leaf = !1, mn(this.data, this.toBBox); } _chooseSplitIndex(t, e, n) { let s, r = 1 / 0, o = 1 / 0; for (let a = e; a <= n - e; a++) { - const l = ss(t, 0, a, this.toBBox), h = ss(t, a, n, this.toBBox), c = om(l, h), u = Vo(l) + Vo(h); + const l = fs(t, 0, a, this.toBBox), h = fs(t, a, n, this.toBBox), c = rm(l, h), u = qo(l) + qo(h); c < r ? (r = c, s = a, o = u < o ? u : o) : c === r && u < o && (o = u, s = a); } return s || n - e; } _chooseSplitAxis(t, e, n) { - const s = t.leaf ? this.compareMinX : nm, r = t.leaf ? this.compareMinY : sm, o = this._allDistMargin(t, e, n, s), a = this._allDistMargin(t, e, n, r); + const s = t.leaf ? this.compareMinX : im, r = t.leaf ? this.compareMinY : nm, o = this._allDistMargin(t, e, n, s), a = this._allDistMargin(t, e, n, r); o < a && t.children.sort(s); } _allDistMargin(t, e, n, s) { t.children.sort(s); - const r = this.toBBox, o = ss(t, 0, e, r), a = ss(t, n - e, n, r); - let l = _r(o) + _r(a); + const r = this.toBBox, o = fs(t, 0, e, r), a = fs(t, n - e, n, r); + let l = xr(o) + xr(a); for (let h = e; h < n - e; h++) { const c = t.children[h]; - rs(o, t.leaf ? r(c) : c), l += _r(o); + gs(o, t.leaf ? r(c) : c), l += xr(o); } for (let h = n - e - 1; h >= e; h--) { const c = t.children[h]; - rs(a, t.leaf ? r(c) : c), l += _r(a); + gs(a, t.leaf ? r(c) : c), l += xr(a); } return l; } _adjustParentBBoxes(t, e, n) { for (let s = n; s >= 0; s--) - rs(e[s], t); + gs(e[s], t); } _condense(t) { for (let e = t.length - 1, n; e >= 0; e--) - t[e].children.length === 0 ? e > 0 ? (n = t[e - 1].children, n.splice(n.indexOf(t[e]), 1)) : this.clear() : hn(t[e], this.toBBox); + t[e].children.length === 0 ? e > 0 ? (n = t[e - 1].children, n.splice(n.indexOf(t[e]), 1)) : this.clear() : mn(t[e], this.toBBox); } } -function im(i, t, e) { +function em(i, t, e) { if (!e) return t.indexOf(i); for (let n = 0; n < t.length; n++) @@ -7469,46 +7479,46 @@ function im(i, t, e) { return n; return -1; } -function hn(i, t) { - ss(i, 0, i.children.length, t, i); +function mn(i, t) { + fs(i, 0, i.children.length, t, i); } -function ss(i, t, e, n, s) { - s || (s = mn(null)), s.minX = 1 / 0, s.minY = 1 / 0, s.maxX = -1 / 0, s.maxY = -1 / 0; +function fs(i, t, e, n, s) { + s || (s = Mn(null)), s.minX = 1 / 0, s.minY = 1 / 0, s.maxX = -1 / 0, s.maxY = -1 / 0; for (let r = t; r < e; r++) { const o = i.children[r]; - rs(s, i.leaf ? n(o) : o); + gs(s, i.leaf ? n(o) : o); } return s; } -function rs(i, t) { +function gs(i, t) { return i.minX = Math.min(i.minX, t.minX), i.minY = Math.min(i.minY, t.minY), i.maxX = Math.max(i.maxX, t.maxX), i.maxY = Math.max(i.maxY, t.maxY), i; } -function nm(i, t) { +function im(i, t) { return i.minX - t.minX; } -function sm(i, t) { +function nm(i, t) { return i.minY - t.minY; } -function Vo(i) { +function qo(i) { return (i.maxX - i.minX) * (i.maxY - i.minY); } -function _r(i) { +function xr(i) { return i.maxX - i.minX + (i.maxY - i.minY); } -function rm(i, t) { +function sm(i, t) { return (Math.max(t.maxX, i.maxX) - Math.min(t.minX, i.minX)) * (Math.max(t.maxY, i.maxY) - Math.min(t.minY, i.minY)); } -function om(i, t) { +function rm(i, t) { const e = Math.max(i.minX, t.minX), n = Math.max(i.minY, t.minY), s = Math.min(i.maxX, t.maxX), r = Math.min(i.maxY, t.maxY); return Math.max(0, s - e) * Math.max(0, r - n); } -function Wo(i, t) { +function Jo(i, t) { return i.minX <= t.minX && i.minY <= t.minY && t.maxX <= i.maxX && t.maxY <= i.maxY; } -function pr(i, t) { +function Cr(i, t) { return t.minX <= i.maxX && t.minY <= i.maxY && t.maxX >= i.minX && t.maxY >= i.minY; } -function mn(i) { +function Mn(i) { return { children: i, height: 1, @@ -7519,33 +7529,33 @@ function mn(i) { maxY: -1 / 0 }; } -function kh(i, t, e, n, s) { +function zh(i, t, e, n, s) { const r = [t, e]; for (; r.length; ) { if (e = r.pop(), t = r.pop(), e - t <= n) continue; const o = t + Math.ceil((e - t) / n / 2) * n; - tm(i, o, t, e, s), r.push(t, o, o, e); + Q1(i, o, t, e, s), r.push(t, o, o, e); } } -function vd(i, t, e) { +function Md(i, t, e) { const n = i; let s = !0, r = !1, o = !1; const a = [ - Or(n, X.LOAD, function() { + Gr(n, H.LOAD, function() { o = !0, r || t(); }) ]; - return n.src && m0 ? (r = !0, n.decode().then(function() { + return n.src && u0 ? (r = !0, n.decode().then(function() { s && t(); }).catch(function(l) { s && (o ? t() : e()); - })) : a.push(Or(n, X.ERROR, e)), function() { + })) : a.push(Gr(n, H.ERROR, e)), function() { s = !1, a.forEach(pt); }; } -let ts = null; -class am extends so { +let cs = null; +class om extends co { constructor(t, e, n, s, r, o) { super(), this.hitDetectionImage_ = null, this.image_ = t, this.crossOrigin_ = s, this.canvas_ = {}, this.color_ = o, this.unlisten_ = null, this.imageState_ = r, this.size_ = n, this.src_ = e, this.tainted_; } @@ -7553,24 +7563,24 @@ class am extends so { this.image_ = new Image(), this.crossOrigin_ !== null && (this.image_.crossOrigin = this.crossOrigin_); } isTainted_() { - if (this.tainted_ === void 0 && this.imageState_ === It.LOADED) { - ts || (ts = de(1, 1)), ts.drawImage(this.image_, 0, 0); + if (this.tainted_ === void 0 && this.imageState_ === At.LOADED) { + cs || (cs = ge(1, 1)), cs.drawImage(this.image_, 0, 0); try { - ts.getImageData(0, 0, 1, 1), this.tainted_ = !1; + cs.getImageData(0, 0, 1, 1), this.tainted_ = !1; } catch { - ts = null, this.tainted_ = !0; + cs = null, this.tainted_ = !0; } } return this.tainted_ === !0; } dispatchChangeEvent_() { - this.dispatchEvent(X.CHANGE); + this.dispatchEvent(H.CHANGE); } handleImageError_() { - this.imageState_ = It.ERROR, this.unlistenImage_(), this.dispatchChangeEvent_(); + this.imageState_ = At.ERROR, this.unlistenImage_(), this.dispatchChangeEvent_(); } handleImageLoad_() { - this.imageState_ = It.LOADED, this.size_ ? (this.image_.width = this.size_[0], this.image_.height = this.size_[1]) : this.size_ = [this.image_.width, this.image_.height], this.unlistenImage_(), this.dispatchChangeEvent_(); + this.imageState_ = At.LOADED, this.size_ ? (this.image_.width = this.size_[0], this.image_.height = this.size_[1]) : this.size_ = [this.image_.width, this.image_.height], this.unlistenImage_(), this.dispatchChangeEvent_(); } getImage(t) { return this.image_ || this.initializeImage_(), this.replaceColor_(t), this.canvas_[t] ? this.canvas_[t] : this.image_; @@ -7584,7 +7594,7 @@ class am extends so { getHitDetectionImage() { if (this.image_ || this.initializeImage_(), !this.hitDetectionImage_) if (this.isTainted_()) { - const t = this.size_[0], e = this.size_[1], n = de(t, e); + const t = this.size_[0], e = this.size_[1], n = ge(t, e); n.fillRect(0, 0, t, e), this.hitDetectionImage_ = n.canvas; } else this.hitDetectionImage_ = this.image_; @@ -7597,14 +7607,14 @@ class am extends so { return this.src_; } load() { - if (this.imageState_ === It.IDLE) { - this.image_ || this.initializeImage_(), this.imageState_ = It.LOADING; + if (this.imageState_ === At.IDLE) { + this.image_ || this.initializeImage_(), this.imageState_ = At.LOADING; try { this.image_.src = this.src_; } catch { this.handleImageError_(); } - this.unlisten_ = vd( + this.unlisten_ = Md( this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this) @@ -7612,22 +7622,22 @@ class am extends so { } } replaceColor_(t) { - if (!this.color_ || this.canvas_[t] || this.imageState_ !== It.LOADED) + if (!this.color_ || this.canvas_[t] || this.imageState_ !== At.LOADED) return; const e = this.image_, n = document.createElement("canvas"); n.width = Math.ceil(e.width * t), n.height = Math.ceil(e.height * t); const s = n.getContext("2d"); - s.scale(t, t), s.drawImage(e, 0, 0), s.globalCompositeOperation = "multiply", s.fillStyle = Tu(this.color_), s.fillRect(0, 0, n.width / t, n.height / t), s.globalCompositeOperation = "destination-in", s.drawImage(e, 0, 0), this.canvas_[t] = n; + s.scale(t, t), s.drawImage(e, 0, 0), s.globalCompositeOperation = "multiply", s.fillStyle = Au(this.color_), s.fillRect(0, 0, n.width / t, n.height / t), s.globalCompositeOperation = "destination-in", s.drawImage(e, 0, 0), this.canvas_[t] = n; } unlistenImage_() { this.unlisten_ && (this.unlisten_(), this.unlisten_ = null); } } -function lm(i, t, e, n, s, r) { - let o = Fr.get(t, n, r); - return o || (o = new am(i, t, e, n, s, r), Fr.set(t, n, r, o)), o; +function am(i, t, e, n, s, r) { + let o = Br.get(t, n, r); + return o || (o = new om(i, t, e, n, s, r), Br.set(t, n, r, o)), o; } -class wl extends md { +class Tl extends yd { constructor(t) { t = t || {}; const e = t.opacity !== void 0 ? t.opacity : 1, n = t.rotation !== void 0 ? t.rotation : 0, s = t.scale !== void 0 ? t.scale : 1, r = t.rotateWithView !== void 0 ? t.rotateWithView : !1; @@ -7642,9 +7652,9 @@ class wl extends md { const o = t.img !== void 0 ? t.img : null; this.imgSize_ = t.imgSize; let a = t.src; - Y(!(a !== void 0 && o), 4), Y(!o || o && this.imgSize_, 5), (a === void 0 || a.length === 0) && o && (a = o.src || rt(o)), Y(a !== void 0 && a.length > 0, 6); - const l = t.src !== void 0 ? It.IDLE : It.LOADED; - this.color_ = t.color !== void 0 ? Nr(t.color) : null, this.iconImage_ = lm( + X(!(a !== void 0 && o), 4), X(!o || o && this.imgSize_, 5), (a === void 0 || a.length === 0) && o && (a = o.src || rt(o)), X(a !== void 0 && a.length > 0, 6); + const l = t.src !== void 0 ? At.IDLE : At.LOADED; + this.color_ = t.color !== void 0 ? $r(t.color) : null, this.iconImage_ = am( o, a, this.imgSize_ !== void 0 ? this.imgSize_ : null, @@ -7655,7 +7665,7 @@ class wl extends md { } clone() { const t = this.getScale(); - return new wl({ + return new Tl({ anchor: this.anchor_.slice(), anchorOrigin: this.anchorOrigin_, anchorXUnits: this.anchorXUnits_, @@ -7738,33 +7748,33 @@ class wl extends md { return this.size_ ? this.size_ : this.iconImage_.getSize(); } listenImageChange(t) { - this.iconImage_.addEventListener(X.CHANGE, t); + this.iconImage_.addEventListener(H.CHANGE, t); } load() { this.iconImage_.load(); } unlistenImageChange(t) { - this.iconImage_.removeEventListener(X.CHANGE, t); + this.iconImage_.removeEventListener(H.CHANGE, t); } } -const us = wl; -function Gh(i) { +const xs = Tl; +function Zh(i) { return new Vt({ - fill: Ls(i, ""), - stroke: Ts(i, ""), - text: hm(i), - image: cm(i) + fill: ks(i, ""), + stroke: Gs(i, ""), + text: lm(i), + image: hm(i) }); } -function Ls(i, t) { +function ks(i, t) { const e = i[t + "fill-color"]; if (!!e) - return new he({ color: e }); + return new Yt({ color: e }); } -function Ts(i, t) { +function Gs(i, t) { const e = i[t + "stroke-width"], n = i[t + "stroke-color"]; if (!(!e && !n)) - return new Ee({ + return new Re({ width: e, color: n, lineCap: i[t + "stroke-line-cap"], @@ -7774,9 +7784,9 @@ function Ts(i, t) { miterLimit: i[t + "stroke-miter-limit"] }); } -function hm(i) { +function lm(i) { const t = i["text-value"]; - return t ? new Ca({ + return t ? new ba({ text: t, font: i["text-font"], maxAngle: i["text-max-angle"], @@ -7791,16 +7801,16 @@ function hm(i) { justify: i["text-justify"], textBaseline: i["text-baseline"], padding: i["text-padding"], - fill: Ls(i, "text-"), - backgroundFill: Ls(i, "text-background-"), - stroke: Ts(i, "text-"), - backgroundStroke: Ts(i, "text-background-") + fill: ks(i, "text-"), + backgroundFill: ks(i, "text-background-"), + stroke: Gs(i, "text-"), + backgroundStroke: Gs(i, "text-background-") }) : void 0; } -function cm(i) { +function hm(i) { const t = i["icon-src"], e = i["icon-img"]; if (t || e) - return new us({ + return new xs({ src: t, img: e, imgSize: i["icon-img-size"], @@ -7822,10 +7832,10 @@ function cm(i) { const n = i["shape-points"]; if (n) { const r = "shape-"; - return new _d({ + return new vd({ points: n, - fill: Ls(i, r), - stroke: Ts(i, r), + fill: ks(i, r), + stroke: Gs(i, r), radius: i["shape-radius"], radius1: i["shape-radius1"], radius2: i["shape-radius2"], @@ -7840,10 +7850,10 @@ function cm(i) { const s = i["circle-radius"]; if (s) { const r = "circle-"; - return new qe({ + return new ni({ radius: s, - fill: Ls(i, r), - stroke: Ts(i, r), + fill: ks(i, r), + stroke: Gs(i, r), displacement: i["circle-displacement"], scale: i["circle-scale"], rotation: i["circle-rotation"], @@ -7852,10 +7862,10 @@ function cm(i) { }); } } -const $h = { +const Uh = { RENDER_ORDER: "renderOrder" }; -class um extends uo { +class cm extends yo { constructor(t) { t = t || {}; const e = Object.assign({}, t); @@ -7871,7 +7881,7 @@ class um extends uo { return this.renderBuffer_; } getRenderOrder() { - return this.get($h.RENDER_ORDER); + return this.get(Uh.RENDER_ORDER); } getStyle() { return this.style_; @@ -7886,15 +7896,15 @@ class um extends uo { return this.updateWhileInteracting_; } renderDeclutter(t) { - t.declutterTree || (t.declutterTree = new yd(9)), this.getRenderer().renderDeclutter(t); + t.declutterTree || (t.declutterTree = new Cd(9)), this.getRenderer().renderDeclutter(t); } setRenderOrder(t) { - this.set($h.RENDER_ORDER, t); + this.set(Uh.RENDER_ORDER, t); } setStyle(t) { let e; if (t === void 0) - e = J1; + e = q1; else if (t === null) e = null; else if (typeof t == "function") @@ -7905,15 +7915,15 @@ class um extends uo { const n = t.length, s = new Array(n); for (let r = 0; r < n; ++r) { const o = t[r]; - o instanceof Vt ? s[r] = o : s[r] = Gh(o); + o instanceof Vt ? s[r] = o : s[r] = Zh(o); } e = s; } else - e = Gh(t); - this.style_ = e, this.styleFunction_ = t === null ? void 0 : q1(this.style_), this.changed(); + e = Zh(t); + this.style_ = e, this.styleFunction_ = t === null ? void 0 : K1(this.style_), this.changed(); } } -const dm = um, Zs = { +const um = cm, Ys = { BEGIN_GEOMETRY: 0, BEGIN_PATH: 1, CIRCLE: 2, @@ -7927,8 +7937,8 @@ const dm = um, Zs = { SET_FILL_STYLE: 10, SET_STROKE_STYLE: 11, STROKE: 12 -}, yr = [Zs.FILL], mi = [Zs.STROKE], Ni = [Zs.BEGIN_PATH], Bh = [Zs.CLOSE_PATH], V = Zs; -class fm { +}, Mr = [Ys.FILL], Mi = [Ys.STROKE], Zi = [Ys.BEGIN_PATH], Vh = [Ys.CLOSE_PATH], U = Ys; +class dm { drawCustom(t, e, n, s) { } drawGeometry(t) { @@ -7962,8 +7972,8 @@ class fm { setTextStyle(t, e) { } } -const xd = fm; -class gm extends xd { +const Ed = dm; +class fm extends Ed { constructor(t, e, n, s) { super(), this.tolerance = t, this.maxExtent = e, this.pixelRatio = s, this.maxLineWidth = 0, this.resolution = n, this.beginGeometryInstruction1_ = null, this.beginGeometryInstruction2_ = null, this.bufferedMaxExtent_ = null, this.instructions = [], this.coordinates = [], this.tmpCoordinate_ = [], this.hitDetectionInstructions = [], this.state = {}; } @@ -7977,7 +7987,7 @@ class gm extends xd { const n = this.getBufferedMaxExtent(), s = this.tmpCoordinate_, r = this.coordinates; let o = r.length; for (let a = 0, l = t.length; a < l; a += e) - s[0] = t[a], s[1] = t[a + 1], ao(n, s) && (r[o++] = s[0], r[o++] = s[1]); + s[0] = t[a], s[1] = t[a + 1], go(n, s) && (r[o++] = s[0], r[o++] = s[1]); return o; } appendFlatLineCoordinates(t, e, n, s, r, o) { @@ -7987,9 +7997,9 @@ class gm extends xd { o && (e += s); let c = t[e], u = t[e + 1]; const d = this.tmpCoordinate_; - let f = !0, g, m, _; + let f = !0, g, m, p; for (g = e + s; g < n; g += s) - d[0] = t[g], d[1] = t[g + 1], _ = ra(h, d), _ !== m ? (f && (a[l++] = c, a[l++] = u, f = !1), a[l++] = d[0], a[l++] = d[1]) : _ === Nt.INTERSECTING ? (a[l++] = d[0], a[l++] = d[1], f = !1) : f = !0, c = d[0], u = d[1], m = _; + d[0] = t[g], d[1] = t[g + 1], p = ua(h, d), p !== m ? (f && (a[l++] = c, a[l++] = u, f = !1), a[l++] = d[0], a[l++] = d[1]) : p === Ft.INTERSECTING ? (a[l++] = d[0], a[l++] = d[1], f = !1) : f = !0, c = d[0], u = d[1], m = p; return (r && f || g === e + s) && (a[l++] = c, a[l++] = u), l; } drawCustomCoordinates_(t, e, n, s, r) { @@ -8016,29 +8026,29 @@ class gm extends xd { const f = t.getEndss(); d = 0; for (let g = 0, m = f.length; g < m; ++g) { - const _ = []; + const p = []; d = this.drawCustomCoordinates_( l, d, f[g], o, - _ - ), u.push(_); + p + ), u.push(p); } this.instructions.push([ - V.CUSTOM, + U.CUSTOM, a, u, t, n, - pa + Ma ]), this.hitDetectionInstructions.push([ - V.CUSTOM, + U.CUSTOM, a, u, t, s || n, - pa + Ma ]); break; case "Polygon": @@ -8050,19 +8060,19 @@ class gm extends xd { o, c ), this.instructions.push([ - V.CUSTOM, + U.CUSTOM, a, c, t, n, - Rs + Fs ]), this.hitDetectionInstructions.push([ - V.CUSTOM, + U.CUSTOM, a, c, t, s || n, - Rs + Fs ]); break; case "LineString": @@ -8075,47 +8085,47 @@ class gm extends xd { !1, !1 ), this.instructions.push([ - V.CUSTOM, + U.CUSTOM, a, h, t, n, - gi + Ci ]), this.hitDetectionInstructions.push([ - V.CUSTOM, + U.CUSTOM, a, h, t, s || n, - gi + Ci ]); break; case "MultiPoint": l = t.getFlatCoordinates(), h = this.appendFlatPointCoordinates(l, o), h > a && (this.instructions.push([ - V.CUSTOM, + U.CUSTOM, a, h, t, n, - gi + Ci ]), this.hitDetectionInstructions.push([ - V.CUSTOM, + U.CUSTOM, a, h, t, s || n, - gi + Ci ])); break; case "Point": l = t.getFlatCoordinates(), this.coordinates.push(l[0], l[1]), h = this.coordinates.length, this.instructions.push([ - V.CUSTOM, + U.CUSTOM, a, h, t, n ]), this.hitDetectionInstructions.push([ - V.CUSTOM, + U.CUSTOM, a, h, t, @@ -8127,12 +8137,12 @@ class gm extends xd { } beginGeometry(t, e) { this.beginGeometryInstruction1_ = [ - V.BEGIN_GEOMETRY, + U.BEGIN_GEOMETRY, e, 0, t ], this.instructions.push(this.beginGeometryInstruction1_), this.beginGeometryInstruction2_ = [ - V.BEGIN_GEOMETRY, + U.BEGIN_GEOMETRY, e, 0, t @@ -8152,39 +8162,39 @@ class gm extends xd { const n = t.length; let s, r, o = -1; for (e = 0; e < n; ++e) - s = t[e], r = s[0], r == V.END_GEOMETRY ? o = e : r == V.BEGIN_GEOMETRY && (s[2] = e, e0(this.hitDetectionInstructions, o, e), o = -1); + s = t[e], r = s[0], r == U.END_GEOMETRY ? o = e : r == U.BEGIN_GEOMETRY && (s[2] = e, qf(this.hitDetectionInstructions, o, e), o = -1); } setFillStrokeStyle(t, e) { const n = this.state; if (t) { const s = t.getColor(); - n.fillStyle = Ie( - s || Je + n.fillStyle = Ne( + s || si ); } else n.fillStyle = void 0; if (e) { const s = e.getColor(); - n.strokeStyle = Ie( - s || Cs + n.strokeStyle = Ne( + s || As ); const r = e.getLineCap(); - n.lineCap = r !== void 0 ? r : Gr; + n.lineCap = r !== void 0 ? r : Vr; const o = e.getLineDash(); - n.lineDash = o ? o.slice() : vs; + n.lineDash = o ? o.slice() : Ls; const a = e.getLineDashOffset(); - n.lineDashOffset = a || xs; + n.lineDashOffset = a || Ts; const l = e.getLineJoin(); - n.lineJoin = l !== void 0 ? l : Pn; + n.lineJoin = l !== void 0 ? l : $n; const h = e.getWidth(); - n.lineWidth = h !== void 0 ? h : ws; + n.lineWidth = h !== void 0 ? h : Os; const c = e.getMiterLimit(); - n.miterLimit = c !== void 0 ? c : Ms, n.lineWidth > this.maxLineWidth && (this.maxLineWidth = n.lineWidth, this.bufferedMaxExtent_ = null); + n.miterLimit = c !== void 0 ? c : Is, n.lineWidth > this.maxLineWidth && (this.maxLineWidth = n.lineWidth, this.bufferedMaxExtent_ = null); } else n.strokeStyle = void 0, n.lineCap = void 0, n.lineDash = null, n.lineDashOffset = void 0, n.lineJoin = void 0, n.lineWidth = void 0, n.miterLimit = void 0; } createFill(t) { - const e = t.fillStyle, n = [V.SET_FILL_STYLE, e]; + const e = t.fillStyle, n = [U.SET_FILL_STYLE, e]; return typeof e != "string" && n.push(!0), n; } applyStroke(t) { @@ -8192,7 +8202,7 @@ class gm extends xd { } createStroke(t) { return [ - V.SET_STROKE_STYLE, + U.SET_STROKE_STYLE, t.strokeStyle, t.lineWidth * this.pixelRatio, t.lineCap, @@ -8208,23 +8218,23 @@ class gm extends xd { } updateStrokeStyle(t, e) { const n = t.strokeStyle, s = t.lineCap, r = t.lineDash, o = t.lineDashOffset, a = t.lineJoin, l = t.lineWidth, h = t.miterLimit; - (t.currentStrokeStyle != n || t.currentLineCap != s || r != t.currentLineDash && !Ki(t.currentLineDash, r) || t.currentLineDashOffset != o || t.currentLineJoin != a || t.currentLineWidth != l || t.currentMiterLimit != h) && (n !== void 0 && e.call(this, t), t.currentStrokeStyle = n, t.currentLineCap = s, t.currentLineDash = r, t.currentLineDashOffset = o, t.currentLineJoin = a, t.currentLineWidth = l, t.currentMiterLimit = h); + (t.currentStrokeStyle != n || t.currentLineCap != s || r != t.currentLineDash && !sn(t.currentLineDash, r) || t.currentLineDashOffset != o || t.currentLineJoin != a || t.currentLineWidth != l || t.currentMiterLimit != h) && (n !== void 0 && e.call(this, t), t.currentStrokeStyle = n, t.currentLineCap = s, t.currentLineDash = r, t.currentLineDashOffset = o, t.currentLineJoin = a, t.currentLineWidth = l, t.currentMiterLimit = h); } endGeometry(t) { this.beginGeometryInstruction1_[2] = this.instructions.length, this.beginGeometryInstruction1_ = null, this.beginGeometryInstruction2_[2] = this.hitDetectionInstructions.length, this.beginGeometryInstruction2_ = null; - const e = [V.END_GEOMETRY, t]; + const e = [U.END_GEOMETRY, t]; this.instructions.push(e), this.hitDetectionInstructions.push(e); } getBufferedMaxExtent() { - if (!this.bufferedMaxExtent_ && (this.bufferedMaxExtent_ = Mu(this.maxExtent), this.maxLineWidth > 0)) { + if (!this.bufferedMaxExtent_ && (this.bufferedMaxExtent_ = Eu(this.maxExtent), this.maxLineWidth > 0)) { const t = this.resolution * (this.maxLineWidth + 1) / 2; - oo(this.bufferedMaxExtent_, t, this.bufferedMaxExtent_); + fo(this.bufferedMaxExtent_, t, this.bufferedMaxExtent_); } return this.bufferedMaxExtent_; } } -const Us = gm; -class mm extends Us { +const js = fm; +class gm extends js { constructor(t, e, n, s) { super(t, e, n, s), this.hitDetectionImage_ = null, this.image_ = null, this.imagePixelRatio_ = void 0, this.anchorX_ = void 0, this.anchorY_ = void 0, this.height_ = void 0, this.opacity_ = void 0, this.originX_ = void 0, this.originY_ = void 0, this.rotateWithView_ = void 0, this.rotation_ = void 0, this.scale_ = void 0, this.width_ = void 0, this.declutterMode_ = void 0, this.declutterImageWithText_ = void 0; } @@ -8234,7 +8244,7 @@ class mm extends Us { this.beginGeometry(t, e); const n = t.getFlatCoordinates(), s = t.getStride(), r = this.coordinates.length, o = this.appendFlatPointCoordinates(n, s); this.instructions.push([ - V.DRAW_IMAGE, + U.DRAW_IMAGE, r, o, this.image_, @@ -8254,7 +8264,7 @@ class mm extends Us { this.declutterMode_, this.declutterImageWithText_ ]), this.hitDetectionInstructions.push([ - V.DRAW_IMAGE, + U.DRAW_IMAGE, r, o, this.hitDetectionImage_, @@ -8278,7 +8288,7 @@ class mm extends Us { this.beginGeometry(t, e); const n = t.getFlatCoordinates(), s = t.getStride(), r = this.coordinates.length, o = this.appendFlatPointCoordinates(n, s); this.instructions.push([ - V.DRAW_IMAGE, + U.DRAW_IMAGE, r, o, this.image_, @@ -8298,7 +8308,7 @@ class mm extends Us { this.declutterMode_, this.declutterImageWithText_ ]), this.hitDetectionInstructions.push([ - V.DRAW_IMAGE, + U.DRAW_IMAGE, r, o, this.hitDetectionImage_, @@ -8324,8 +8334,8 @@ class mm extends Us { this.imagePixelRatio_ = t.getPixelRatio(this.pixelRatio), this.anchorX_ = n[0], this.anchorY_ = n[1], this.hitDetectionImage_ = t.getHitDetectionImage(), this.image_ = t.getImage(this.pixelRatio), this.height_ = s[1], this.opacity_ = t.getOpacity(), this.originX_ = r[0], this.originY_ = r[1], this.rotateWithView_ = t.getRotateWithView(), this.rotation_ = t.getRotation(), this.scale_ = t.getScaleArray(), this.width_ = s[0], this.declutterMode_ = t.getDeclutterMode(), this.declutterImageWithText_ = e; } } -const _m = mm; -class pm extends Us { +const mm = gm; +class pm extends js { constructor(t, e, n, s) { super(t, e, n, s); } @@ -8338,7 +8348,7 @@ class pm extends Us { !1, !1 ), a = [ - V.MOVE_TO_LINE_TO, + U.MOVE_TO_LINE_TO, r, o ]; @@ -8350,16 +8360,16 @@ class pm extends Us { return; this.updateStrokeStyle(n, this.applyStroke), this.beginGeometry(t, e), this.hitDetectionInstructions.push( [ - V.SET_STROKE_STYLE, + U.SET_STROKE_STYLE, n.strokeStyle, n.lineWidth, n.lineCap, n.lineJoin, n.miterLimit, - vs, - xs + Ls, + Ts ], - Ni + Zi ); const o = t.getFlatCoordinates(), a = t.getStride(); this.drawFlatCoordinates_( @@ -8367,7 +8377,7 @@ class pm extends Us { 0, o.length, a - ), this.hitDetectionInstructions.push(mi), this.endGeometry(e); + ), this.hitDetectionInstructions.push(Mi), this.endGeometry(e); } drawMultiLineString(t, e) { const n = this.state, s = n.strokeStyle, r = n.lineWidth; @@ -8375,7 +8385,7 @@ class pm extends Us { return; this.updateStrokeStyle(n, this.applyStroke), this.beginGeometry(t, e), this.hitDetectionInstructions.push( [ - V.SET_STROKE_STYLE, + U.SET_STROKE_STYLE, n.strokeStyle, n.lineWidth, n.lineCap, @@ -8384,7 +8394,7 @@ class pm extends Us { n.lineDash, n.lineDashOffset ], - Ni + Zi ); const o = t.getEnds(), a = t.getFlatCoordinates(), l = t.getStride(); let h = 0; @@ -8395,24 +8405,24 @@ class pm extends Us { o[c], l ); - this.hitDetectionInstructions.push(mi), this.endGeometry(e); + this.hitDetectionInstructions.push(Mi), this.endGeometry(e); } finish() { const t = this.state; - return t.lastStroke != null && t.lastStroke != this.coordinates.length && this.instructions.push(mi), this.reverseHitDetectionInstructions(), this.state = null, super.finish(); + return t.lastStroke != null && t.lastStroke != this.coordinates.length && this.instructions.push(Mi), this.reverseHitDetectionInstructions(), this.state = null, super.finish(); } applyStroke(t) { - t.lastStroke != null && t.lastStroke != this.coordinates.length && (this.instructions.push(mi), t.lastStroke = this.coordinates.length), t.lastStroke = 0, super.applyStroke(t), this.instructions.push(Ni); + t.lastStroke != null && t.lastStroke != this.coordinates.length && (this.instructions.push(Mi), t.lastStroke = this.coordinates.length), t.lastStroke = 0, super.applyStroke(t), this.instructions.push(Zi); } } -const ym = pm; -class vm extends Us { +const _m = pm; +class ym extends js { constructor(t, e, n, s) { super(t, e, n, s); } drawFlatCoordinatess_(t, e, n, s) { const r = this.state, o = r.fillStyle !== void 0, a = r.strokeStyle !== void 0, l = n.length; - this.instructions.push(Ni), this.hitDetectionInstructions.push(Ni); + this.instructions.push(Zi), this.hitDetectionInstructions.push(Zi); for (let h = 0; h < l; ++h) { const c = n[h], u = this.coordinates.length, d = this.appendFlatLineCoordinates( t, @@ -8422,23 +8432,23 @@ class vm extends Us { !0, !a ), f = [ - V.MOVE_TO_LINE_TO, + U.MOVE_TO_LINE_TO, u, d ]; - this.instructions.push(f), this.hitDetectionInstructions.push(f), a && (this.instructions.push(Bh), this.hitDetectionInstructions.push(Bh)), e = c; + this.instructions.push(f), this.hitDetectionInstructions.push(f), a && (this.instructions.push(Vh), this.hitDetectionInstructions.push(Vh)), e = c; } - return o && (this.instructions.push(yr), this.hitDetectionInstructions.push(yr)), a && (this.instructions.push(mi), this.hitDetectionInstructions.push(mi)), e; + return o && (this.instructions.push(Mr), this.hitDetectionInstructions.push(Mr)), a && (this.instructions.push(Mi), this.hitDetectionInstructions.push(Mi)), e; } drawCircle(t, e) { const n = this.state, s = n.fillStyle, r = n.strokeStyle; if (s === void 0 && r === void 0) return; this.setFillStrokeStyles_(), this.beginGeometry(t, e), n.fillStyle !== void 0 && this.hitDetectionInstructions.push([ - V.SET_FILL_STYLE, - Je + U.SET_FILL_STYLE, + si ]), n.strokeStyle !== void 0 && this.hitDetectionInstructions.push([ - V.SET_STROKE_STYLE, + U.SET_STROKE_STYLE, n.strokeStyle, n.lineWidth, n.lineCap, @@ -8456,18 +8466,18 @@ class vm extends Us { !1, !1 ); - const h = [V.CIRCLE, l]; - this.instructions.push(Ni, h), this.hitDetectionInstructions.push(Ni, h), n.fillStyle !== void 0 && (this.instructions.push(yr), this.hitDetectionInstructions.push(yr)), n.strokeStyle !== void 0 && (this.instructions.push(mi), this.hitDetectionInstructions.push(mi)), this.endGeometry(e); + const h = [U.CIRCLE, l]; + this.instructions.push(Zi, h), this.hitDetectionInstructions.push(Zi, h), n.fillStyle !== void 0 && (this.instructions.push(Mr), this.hitDetectionInstructions.push(Mr)), n.strokeStyle !== void 0 && (this.instructions.push(Mi), this.hitDetectionInstructions.push(Mi)), this.endGeometry(e); } drawPolygon(t, e) { const n = this.state, s = n.fillStyle, r = n.strokeStyle; if (s === void 0 && r === void 0) return; this.setFillStrokeStyles_(), this.beginGeometry(t, e), n.fillStyle !== void 0 && this.hitDetectionInstructions.push([ - V.SET_FILL_STYLE, - Je + U.SET_FILL_STYLE, + si ]), n.strokeStyle !== void 0 && this.hitDetectionInstructions.push([ - V.SET_STROKE_STYLE, + U.SET_STROKE_STYLE, n.strokeStyle, n.lineWidth, n.lineCap, @@ -8489,10 +8499,10 @@ class vm extends Us { if (s === void 0 && r === void 0) return; this.setFillStrokeStyles_(), this.beginGeometry(t, e), n.fillStyle !== void 0 && this.hitDetectionInstructions.push([ - V.SET_FILL_STYLE, - Je + U.SET_FILL_STYLE, + si ]), n.strokeStyle !== void 0 && this.hitDetectionInstructions.push([ - V.SET_STROKE_STYLE, + U.SET_STROKE_STYLE, n.strokeStyle, n.lineWidth, n.lineCap, @@ -8518,7 +8528,7 @@ class vm extends Us { if (t !== 0) { const e = this.coordinates; for (let n = 0, s = e.length; n < s; ++n) - e[n] = Ti(e[n], t); + e[n] = Gi(e[n], t); } return super.finish(); } @@ -8527,16 +8537,16 @@ class vm extends Us { t.fillStyle !== void 0 && this.updateFillStyle(t, this.createFill), t.strokeStyle !== void 0 && this.updateStrokeStyle(t, this.applyStroke); } } -const zh = vm; -function xm(i, t, e, n, s) { - let r = e, o = e, a = 0, l = 0, h = e, c, u, d, f, g, m, _, y, p, v; +const Wh = ym; +function vm(i, t, e, n, s) { + let r = e, o = e, a = 0, l = 0, h = e, c, u, d, f, g, m, p, _, y, v; for (u = e; u < n; u += s) { - const x = t[u], M = t[u + 1]; - g !== void 0 && (p = x - g, v = M - m, f = Math.sqrt(p * p + v * v), _ !== void 0 && (l += d, c = Math.acos((_ * p + y * v) / (d * f)), c > i && (l > a && (a = l, r = h, o = u), l = 0, h = u - s)), d = f, _ = p, y = v), g = x, m = M; + const x = t[u], C = t[u + 1]; + g !== void 0 && (y = x - g, v = C - m, f = Math.sqrt(y * y + v * v), p !== void 0 && (l += d, c = Math.acos((p * y + _ * v) / (d * f)), c > i && (l > a && (a = l, r = h, o = u), l = 0, h = u - s)), d = f, p = y, _ = v), g = x, m = C; } return l += f, l > a ? [h, u] : [r, o]; } -const ds = { +const Cs = { left: 0, end: 0, center: 0.5, @@ -8549,7 +8559,7 @@ const ds = { ideographic: 0.8, bottom: 1 }; -class Mm extends Us { +class xm extends js { constructor(t, e, n, s) { super(t, e, n, s), this.labels_ = null, this.text_ = "", this.textOffsetX_ = 0, this.textOffsetY_ = 0, this.textRotateWithView_ = void 0, this.textRotation_ = 0, this.textFillState_ = null, this.fillStates = {}, this.textStrokeState_ = null, this.strokeStates = {}, this.textState_ = {}, this.textStates = {}, this.textKey_ = "", this.fillKey_ = "", this.strokeKey_ = "", this.declutterImageWithText_ = void 0; } @@ -8566,7 +8576,7 @@ class Mm extends Us { const l = t.getType(); let h = null, c = t.getStride(); if (r.placement === "line" && (l == "LineString" || l == "MultiLineString" || l == "Polygon" || l == "MultiPolygon")) { - if (!Qt(this.getBufferedMaxExtent(), t.getExtent())) + if (!ie(this.getBufferedMaxExtent(), t.getExtent())) return; let u; if (h = t.getFlatCoordinates(), l == "LineString") @@ -8578,28 +8588,28 @@ class Mm extends Us { else if (l == "MultiPolygon") { const m = t.getEndss(); u = []; - for (let _ = 0, y = m.length; _ < y; ++_) - u.push(m[_][0]); + for (let p = 0, _ = m.length; p < _; ++p) + u.push(m[p][0]); } this.beginGeometry(t, e); const d = r.textAlign; let f = 0, g; - for (let m = 0, _ = u.length; m < _; ++m) { + for (let m = 0, p = u.length; m < p; ++m) { if (d == null) { - const p = xm( + const y = vm( r.maxAngle, h, f, u[m], c ); - f = p[0], g = p[1]; + f = y[0], g = y[1]; } else g = u[m]; - for (let p = f; p < g; p += c) - o.push(h[p], h[p + 1]); - const y = o.length; - f = u[m], this.drawChars_(a, y), a = y; + for (let y = f; y < g; y += c) + o.push(h[y], h[y + 1]); + const _ = o.length; + f = u[m], this.drawChars_(a, _), a = _; } this.endGeometry(e); } else { @@ -8622,10 +8632,10 @@ class Mm extends Us { h = t.getFlatInteriorPoint(), r.overflow || u.push(h[2] / this.resolution), c = 3; break; case "MultiPolygon": - const _ = t.getFlatInteriorPoints(); + const p = t.getFlatInteriorPoints(); h = []; - for (let y = 0, p = _.length; y < p; y += 3) - r.overflow || u.push(_[y + 2] / this.resolution), h.push(_[y], _[y + 1]); + for (let _ = 0, y = p.length; _ < y; _ += 3) + r.overflow || u.push(p[_ + 2] / this.resolution), h.push(p[_], p[_ + 1]); if (h.length === 0) return; c = 2; @@ -8635,10 +8645,10 @@ class Mm extends Us { if (d === a) return; if (u && (d - a) / 2 !== h.length / c) { - let _ = a / 2; - u = u.filter((y, p) => { - const v = o[(_ + p) * 2] === h[p * c] && o[(_ + p) * 2 + 1] === h[p * c + 1]; - return v || --_, v; + let p = a / 2; + u = u.filter((_, y) => { + const v = o[(p + y) * 2] === h[y * c] && o[(p + y) * 2 + 1] === h[y * c + 1]; + return v || --p, v; }); } this.saveTextStates_(), (r.backgroundFill || r.backgroundStroke) && (this.setFillStrokeStyle( @@ -8646,13 +8656,13 @@ class Mm extends Us { r.backgroundStroke ), r.backgroundFill && (this.updateFillStyle(this.state, this.createFill), this.hitDetectionInstructions.push(this.createFill(this.state))), r.backgroundStroke && (this.updateStrokeStyle(this.state, this.applyStroke), this.hitDetectionInstructions.push(this.createStroke(this.state)))), this.beginGeometry(t, e); let f = r.padding; - if (f != Ai && (r.scale[0] < 0 || r.scale[1] < 0)) { - let _ = r.padding[0], y = r.padding[1], p = r.padding[2], v = r.padding[3]; - r.scale[0] < 0 && (y = -y, v = -v), r.scale[1] < 0 && (_ = -_, p = -p), f = [_, y, p, v]; + if (f != $i && (r.scale[0] < 0 || r.scale[1] < 0)) { + let p = r.padding[0], _ = r.padding[1], y = r.padding[2], v = r.padding[3]; + r.scale[0] < 0 && (_ = -_, v = -v), r.scale[1] < 0 && (p = -p, y = -y), f = [p, _, y, v]; } const g = this.pixelRatio; this.instructions.push([ - V.DRAW_IMAGE, + U.DRAW_IMAGE, a, d, null, @@ -8668,8 +8678,8 @@ class Mm extends Us { NaN, void 0, this.declutterImageWithText_, - f == Ai ? Ai : f.map(function(_) { - return _ * g; + f == $i ? $i : f.map(function(p) { + return p * g; }), !!r.backgroundFill, !!r.backgroundStroke, @@ -8683,7 +8693,7 @@ class Mm extends Us { ]); const m = 1 / g; this.hitDetectionInstructions.push([ - V.DRAW_IMAGE, + U.DRAW_IMAGE, a, d, null, @@ -8726,9 +8736,9 @@ class Mm extends Us { const r = this.textKey_; r in this.textStates || (this.textStates[r] = { font: e.font, - textAlign: e.textAlign || Es, + textAlign: e.textAlign || Ps, justify: e.justify, - textBaseline: e.textBaseline || $r, + textBaseline: e.textBaseline || Wr, scale: e.scale }); const o = this.fillKey_; @@ -8739,9 +8749,9 @@ class Mm extends Us { drawChars_(t, e) { const n = this.textStrokeState_, s = this.textState_, r = this.strokeKey_, o = this.textKey_, a = this.fillKey_; this.saveTextStates_(); - const l = this.pixelRatio, h = ds[s.textBaseline], c = this.textOffsetY_ * l, u = this.text_, d = n ? n.lineWidth * Math.abs(s.scale[0]) / 2 : 0; + const l = this.pixelRatio, h = Cs[s.textBaseline], c = this.textOffsetY_ * l, u = this.text_, d = n ? n.lineWidth * Math.abs(s.scale[0]) / 2 : 0; this.instructions.push([ - V.DRAW_CHARS, + U.DRAW_CHARS, t, e, h, @@ -8756,7 +8766,7 @@ class Mm extends Us { o, 1 ]), this.hitDetectionInstructions.push([ - V.DRAW_CHARS, + U.DRAW_CHARS, t, e, h, @@ -8778,24 +8788,24 @@ class Mm extends Us { this.text_ = ""; else { const o = t.getFill(); - o ? (s = this.textFillState_, s || (s = {}, this.textFillState_ = s), s.fillStyle = Ie( - o.getColor() || Je + o ? (s = this.textFillState_, s || (s = {}, this.textFillState_ = s), s.fillStyle = Ne( + o.getColor() || si )) : (s = null, this.textFillState_ = s); const a = t.getStroke(); if (!a) r = null, this.textStrokeState_ = r; else { r = this.textStrokeState_, r || (r = {}, this.textStrokeState_ = r); - const g = a.getLineDash(), m = a.getLineDashOffset(), _ = a.getWidth(), y = a.getMiterLimit(); - r.lineCap = a.getLineCap() || Gr, r.lineDash = g ? g.slice() : vs, r.lineDashOffset = m === void 0 ? xs : m, r.lineJoin = a.getLineJoin() || Pn, r.lineWidth = _ === void 0 ? ws : _, r.miterLimit = y === void 0 ? Ms : y, r.strokeStyle = Ie( - a.getColor() || Cs + const g = a.getLineDash(), m = a.getLineDashOffset(), p = a.getWidth(), _ = a.getMiterLimit(); + r.lineCap = a.getLineCap() || Vr, r.lineDash = g ? g.slice() : Ls, r.lineDashOffset = m === void 0 ? Ts : m, r.lineJoin = a.getLineJoin() || $n, r.lineWidth = p === void 0 ? Os : p, r.miterLimit = _ === void 0 ? Is : _, r.strokeStyle = Ne( + a.getColor() || As ); } n = this.textState_; - const l = t.getFont() || $u; - V0(l); + const l = t.getFont() || Zu; + U0(l); const h = t.getScaleArray(); - n.overflow = t.getOverflow(), n.font = l, n.maxAngle = t.getMaxAngle(), n.placement = t.getPlacement(), n.textAlign = t.getTextAlign(), n.justify = t.getJustify(), n.textBaseline = t.getTextBaseline() || $r, n.backgroundFill = t.getBackgroundFill(), n.backgroundStroke = t.getBackgroundStroke(), n.padding = t.getPadding() || Ai, n.scale = h === void 0 ? [1, 1] : h; + n.overflow = t.getOverflow(), n.font = l, n.maxAngle = t.getMaxAngle(), n.placement = t.getPlacement(), n.textAlign = t.getTextAlign(), n.justify = t.getJustify(), n.textBaseline = t.getTextBaseline() || Wr, n.backgroundFill = t.getBackgroundFill(), n.backgroundStroke = t.getBackgroundStroke(), n.padding = t.getPadding() || $i, n.scale = h === void 0 ? [1, 1] : h; const c = t.getOffsetX(), u = t.getOffsetY(), d = t.getRotateWithView(), f = t.getRotation(); this.text_ = t.getText() || "", this.textOffsetX_ = c === void 0 ? 0 : c, this.textOffsetY_ = u === void 0 ? 0 : u, this.textRotateWithView_ = d === void 0 ? !1 : d, this.textRotation_ = f === void 0 ? 0 : f, this.strokeKey_ = r ? (typeof r.strokeStyle == "string" ? r.strokeStyle : rt(r.strokeStyle)) + r.lineCap + r.lineDashOffset + "|" + r.lineWidth + r.lineJoin + r.miterLimit + "[" + r.lineDash.join() + "]" : "", this.textKey_ = n.font + n.scale + (n.textAlign || "?") + (n.justify || "?") + (n.textBaseline || "?"), this.fillKey_ = s ? typeof s.fillStyle == "string" ? s.fillStyle : "|" + rt(s.fillStyle) : ""; } @@ -8803,14 +8813,14 @@ class Mm extends Us { } } const Cm = { - Circle: zh, - Default: Us, - Image: _m, - LineString: ym, - Polygon: zh, - Text: Mm + Circle: Wh, + Default: js, + Image: mm, + LineString: _m, + Polygon: Wh, + Text: xm }; -class Em { +class Mm { constructor(t, e, n, s) { this.tolerance_ = t, this.maxExtent_ = e, this.pixelRatio_ = s, this.resolution_ = n, this.buildersByZIndex_ = {}; } @@ -8843,22 +8853,22 @@ class Em { return r; } } -const Zh = Em; -class wm extends _u { +const Hh = Mm; +class Em extends yu { constructor(t) { super(), this.ready = !0, this.boundHandleImageChange_ = this.handleImageChange_.bind(this), this.layer_ = t, this.declutterExecutorGroup = null; } getFeatures(t) { - return W(); + return V(); } getData(t) { return null; } prepareFrame(t) { - return W(); + return V(); } renderFrame(t, e) { - return W(); + return V(); } loadedTileCallback(t, e, n) { t[e] || (t[e] = {}), t[e][n.tileCoord.toString()] = n; @@ -8877,11 +8887,11 @@ class wm extends _u { handleFontsChanged() { } handleImageChange_(t) { - t.target.getState() === It.LOADED && this.renderIfReadyAndVisible(); + t.target.getState() === At.LOADED && this.renderIfReadyAndVisible(); } loadImage(t) { let e = t.getState(); - return e != It.LOADED && e != It.ERROR && t.addEventListener(X.CHANGE, this.boundHandleImageChange_), e == It.IDLE && (t.load(), e = t.getState()), e == It.LOADED; + return e != At.LOADED && e != At.ERROR && t.addEventListener(H.CHANGE, this.boundHandleImageChange_), e == At.IDLE && (t.load(), e = t.getState()), e == At.LOADED; } renderIfReadyAndVisible() { const t = this.getLayer(); @@ -8891,23 +8901,23 @@ class wm extends _u { delete this.layer_, super.disposeInternal(); } } -const Sm = wm, Uh = []; -let _n = null; -function Rm() { +const wm = Em, Xh = []; +let En = null; +function Sm() { const i = document.createElement("canvas"); - i.width = 1, i.height = 1, _n = i.getContext("2d"); + i.width = 1, i.height = 1, En = i.getContext("2d"); } -class bm extends Sm { +class Rm extends wm { constructor(t) { - super(t), this.container = null, this.renderedResolution, this.tempTransform = Pe(), this.pixelTransform = Pe(), this.inversePixelTransform = Pe(), this.context = null, this.containerReused = !1, this.pixelContext_ = null, this.frameState = null; + super(t), this.container = null, this.renderedResolution, this.tempTransform = De(), this.pixelTransform = De(), this.inversePixelTransform = De(), this.context = null, this.containerReused = !1, this.pixelContext_ = null, this.frameState = null; } getImageData(t, e, n) { - _n || Rm(), _n.clearRect(0, 0, 1, 1); + En || Sm(), En.clearRect(0, 0, 1, 1); let s; try { - _n.drawImage(t, e, n, 1, 1, 0, 0, 1, 1), s = _n.getImageData(0, 0, 1, 1).data; + En.drawImage(t, e, n, 1, 1, 0, 0, 1, 1), s = En.getImageData(0, 0, 1, 1).data; } catch { - return _n = null, null; + return En = null, null; } return s; } @@ -8918,9 +8928,9 @@ class bm extends Sm { useContainer(t, e, n) { const s = this.getLayer().getClassName(); let r, o; - if (t && t.className === s && (!n || t && t.style.backgroundColor && Ki( - Nr(t.style.backgroundColor), - Nr(n) + if (t && t.className === s && (!n || t && t.style.backgroundColor && sn( + $r(t.style.backgroundColor), + $r(n) ))) { const a = t.firstElementChild; a instanceof HTMLCanvasElement && (o = a.getContext("2d")); @@ -8928,22 +8938,22 @@ class bm extends Sm { if (o && o.canvas.style.transform === e ? (this.container = t, this.context = o, this.containerReused = !0) : this.containerReused && (this.container = null, this.context = null, this.containerReused = !1), !this.container) { r = document.createElement("div"), r.className = s; let a = r.style; - a.position = "absolute", a.width = "100%", a.height = "100%", o = de(); + a.position = "absolute", a.width = "100%", a.height = "100%", o = ge(); const l = o.canvas; r.appendChild(l), a = l.style, a.position = "absolute", a.left = "0", a.transformOrigin = "top left", this.container = r, this.context = o; } !this.containerReused && n && !this.container.style.backgroundColor && (this.container.style.backgroundColor = n); } clipUnrotated(t, e, n) { - const s = Ji(n), r = co(n), o = ho(n), a = lo(n); - Ft(e.coordinateToPixelTransform, s), Ft(e.coordinateToPixelTransform, r), Ft(e.coordinateToPixelTransform, o), Ft(e.coordinateToPixelTransform, a); + const s = Pi(n), r = _o(n), o = po(n), a = mo(n); + Dt(e.coordinateToPixelTransform, s), Dt(e.coordinateToPixelTransform, r), Dt(e.coordinateToPixelTransform, o), Dt(e.coordinateToPixelTransform, a); const l = this.inversePixelTransform; - Ft(l, s), Ft(l, r), Ft(l, o), Ft(l, a), t.save(), t.beginPath(), t.moveTo(Math.round(s[0]), Math.round(s[1])), t.lineTo(Math.round(r[0]), Math.round(r[1])), t.lineTo(Math.round(o[0]), Math.round(o[1])), t.lineTo(Math.round(a[0]), Math.round(a[1])), t.clip(); + Dt(l, s), Dt(l, r), Dt(l, o), Dt(l, a), t.save(), t.beginPath(), t.moveTo(Math.round(s[0]), Math.round(s[1])), t.lineTo(Math.round(r[0]), Math.round(r[1])), t.lineTo(Math.round(o[0]), Math.round(o[1])), t.lineTo(Math.round(a[0]), Math.round(a[1])), t.clip(); } dispatchRenderEvent_(t, e, n) { const s = this.getLayer(); if (s.hasListener(t)) { - const r = new Du( + const r = new Gu( t, this.inversePixelTransform, n, @@ -8953,14 +8963,14 @@ class bm extends Sm { } } preRender(t, e) { - this.frameState = e, this.dispatchRenderEvent_(_i.PRERENDER, t, e); + this.frameState = e, this.dispatchRenderEvent_(Ei.PRERENDER, t, e); } postRender(t, e) { - this.dispatchRenderEvent_(_i.POSTRENDER, t, e); + this.dispatchRenderEvent_(Ei.POSTRENDER, t, e); } getRenderTransform(t, e, n, s, r, o, a) { const l = r / 2, h = o / 2, c = s / e, u = -c, d = -t[0] + a, f = -t[1]; - return xi( + return bi( this.tempTransform, l, h, @@ -8975,79 +8985,79 @@ class bm extends Sm { delete this.frameState, super.disposeInternal(); } } -const Md = bm; -function Lm(i, t, e, n, s, r, o, a, l, h, c, u) { - let d = i[t], f = i[t + 1], g = 0, m = 0, _ = 0, y = 0; - function p() { - g = d, m = f, t += n, d = i[t], f = i[t + 1], y += _, _ = Math.sqrt((d - g) * (d - g) + (f - m) * (f - m)); +const wd = Rm; +function bm(i, t, e, n, s, r, o, a, l, h, c, u) { + let d = i[t], f = i[t + 1], g = 0, m = 0, p = 0, _ = 0; + function y() { + g = d, m = f, t += n, d = i[t], f = i[t + 1], _ += p, p = Math.sqrt((d - g) * (d - g) + (f - m) * (f - m)); } do - p(); - while (t < e - n && y + _ < r); - let v = _ === 0 ? 0 : (r - y) / _; - const x = Ye(g, d, v), M = Ye(m, f, v), E = t - n, R = y, L = r + a * l(h, s, c); - for (; t < e - n && y + _ < L; ) - p(); - v = _ === 0 ? 0 : (L - y) / _; - const N = Ye(g, d, v), G = Ye(m, f, v); - let U; + y(); + while (t < e - n && _ + p < r); + let v = p === 0 ? 0 : (r - _) / p; + const x = ti(g, d, v), C = ti(m, f, v), E = t - n, w = _, R = r + a * l(h, s, c); + for (; t < e - n && _ + p < R; ) + y(); + v = p === 0 ? 0 : (R - _) / p; + const A = ti(g, d, v), k = ti(m, f, v); + let Z; if (u) { - const k = [x, M, N, G]; - ju(k, 0, 4, 2, u, k, k), U = k[0] > k[2]; + const D = [x, C, A, k]; + Ju(D, 0, 4, 2, u, D, D), Z = D[0] > D[2]; } else - U = x > N; - const T = Math.PI, $ = [], ft = E + n === t; - t = E, _ = 0, y = R, d = i[t], f = i[t + 1]; - let F; - if (ft) { - p(), F = Math.atan2(f - m, d - g), U && (F += F > 0 ? -T : T); - const k = (N + x) / 2, A = (G + M) / 2; - return $[0] = [k, A, (L - r) / 2, F, s], $; + Z = x > A; + const L = Math.PI, G = [], dt = E + n === t; + t = E, p = 0, _ = w, d = i[t], f = i[t + 1]; + let N; + if (dt) { + y(), N = Math.atan2(f - m, d - g), Z && (N += N > 0 ? -L : L); + const D = (A + x) / 2, I = (k + C) / 2; + return G[0] = [D, I, (R - r) / 2, N, s], G; } s = s.replace(/\n/g, " "); - for (let k = 0, A = s.length; k < A; ) { - p(); - let tt = Math.atan2(f - m, d - g); - if (U && (tt += tt > 0 ? -T : T), F !== void 0) { - let lt = tt - F; - if (lt += lt > T ? -2 * T : lt < -T ? 2 * T : 0, Math.abs(lt) > o) + for (let D = 0, I = s.length; D < I; ) { + y(); + let Q = Math.atan2(f - m, d - g); + if (Z && (Q += Q > 0 ? -L : L), N !== void 0) { + let at = Q - N; + if (at += at > L ? -2 * L : at < -L ? 2 * L : 0, Math.abs(at) > o) return null; } - F = tt; - const Mt = k; + N = Q; + const Ct = D; let _t = 0; - for (; k < A; ++k) { - const lt = U ? A - k - 1 : k, gt = a * l(h, s[lt], c); - if (t + n < e && y + _ < r + _t + gt / 2) + for (; D < I; ++D) { + const at = Z ? I - D - 1 : D, ft = a * l(h, s[at], c); + if (t + n < e && _ + p < r + _t + ft / 2) break; - _t += gt; + _t += ft; } - if (k === Mt) + if (D === Ct) continue; - const Pt = U ? s.substring(A - Mt, A - k) : s.substring(Mt, k); - v = _ === 0 ? 0 : (r + _t / 2 - y) / _; - const b = Ye(g, d, v), se = Ye(m, f, v); - $.push([b, se, _t / 2, tt, Pt]), r += _t; + const Ot = Z ? s.substring(I - Ct, I - D) : s.substring(Ct, D); + v = p === 0 ? 0 : (r + _t / 2 - _) / p; + const b = ti(g, d, v), ae = ti(m, f, v); + G.push([b, ae, _t / 2, Q, Ot]), r += _t; } - return $; + return G; } -const cn = ue(), oi = [], Ue = [], Ve = [], ai = []; -function Vh(i) { +const pn = fe(), fi = [], Ye = [], je = [], gi = []; +function Yh(i) { return i[3].declutterBox; } -const Tm = new RegExp( +const Lm = new RegExp( "[" + String.fromCharCode(1425) + "-" + String.fromCharCode(2303) + String.fromCharCode(64285) + "-" + String.fromCharCode(65023) + String.fromCharCode(65136) + "-" + String.fromCharCode(65276) + String.fromCharCode(67584) + "-" + String.fromCharCode(69631) + String.fromCharCode(124928) + "-" + String.fromCharCode(126975) + "]" ); -function Wh(i, t) { - return (t === "start" || t === "end") && !Tm.test(i) && (t = t === "start" ? "left" : "right"), ds[t]; +function jh(i, t) { + return (t === "start" || t === "end") && !Lm.test(i) && (t = t === "start" ? "left" : "right"), Cs[t]; } -function Im(i, t, e) { +function Tm(i, t, e) { return e > 0 && i.push(` `, ""), i.push(t, ""), i; } -class Am { +class Im { constructor(t, e, n, s) { - this.overlaps = n, this.pixelRatio = e, this.resolution = t, this.alignFill_, this.instructions = s.instructions, this.coordinates = s.coordinates, this.coordinateCache_ = {}, this.renderedTransform_ = Pe(), this.hitDetectionInstructions = s.hitDetectionInstructions, this.pixelCoordinates_ = null, this.viewRotation_ = 0, this.fillStates = s.fillStates || {}, this.strokeStates = s.strokeStates || {}, this.textStates = s.textStates || {}, this.widths_ = {}, this.labels_ = {}; + this.overlaps = n, this.pixelRatio = e, this.resolution = t, this.alignFill_, this.instructions = s.instructions, this.coordinates = s.coordinates, this.coordinateCache_ = {}, this.renderedTransform_ = De(), this.hitDetectionInstructions = s.hitDetectionInstructions, this.pixelCoordinates_ = null, this.viewRotation_ = 0, this.fillStates = s.fillStates || {}, this.strokeStates = s.strokeStates || {}, this.textStates = s.textStates || {}, this.widths_ = {}, this.labels_ = {}; } createLabel(t, e, n, s) { const r = t + e + n + s; @@ -9056,40 +9066,40 @@ class Am { const o = s ? this.strokeStates[s] : null, a = n ? this.fillStates[n] : null, l = this.textStates[e], h = this.pixelRatio, c = [ l.scale[0] * h, l.scale[1] * h - ], u = Array.isArray(t), d = l.justify ? ds[l.justify] : Wh( + ], u = Array.isArray(t), d = l.justify ? Cs[l.justify] : jh( Array.isArray(t) ? t[0] : t, - l.textAlign || Es + l.textAlign || Ps ), f = s && o.lineWidth ? o.lineWidth : 0, g = u ? t : t.split(` -`).reduce(Im, []), { width: m, height: _, widths: y, heights: p, lineWidths: v } = H0( +`).reduce(Tm, []), { width: m, height: p, widths: _, heights: y, lineWidths: v } = W0( l, g - ), x = m + f, M = [], E = (x + 2) * c[0], R = (_ + f) * c[1], L = { + ), x = m + f, C = [], E = (x + 2) * c[0], w = (p + f) * c[1], R = { width: E < 0 ? Math.floor(E) : Math.ceil(E), - height: R < 0 ? Math.floor(R) : Math.ceil(R), - contextInstructions: M + height: w < 0 ? Math.floor(w) : Math.ceil(w), + contextInstructions: C }; - (c[0] != 1 || c[1] != 1) && M.push("scale", c), s && (M.push("strokeStyle", o.strokeStyle), M.push("lineWidth", f), M.push("lineCap", o.lineCap), M.push("lineJoin", o.lineJoin), M.push("miterLimit", o.miterLimit), M.push("setLineDash", [o.lineDash]), M.push("lineDashOffset", o.lineDashOffset)), n && M.push("fillStyle", a.fillStyle), M.push("textBaseline", "middle"), M.push("textAlign", "center"); - const N = 0.5 - d; - let G = d * x + N * f; - const U = [], T = []; - let $ = 0, ft = 0, F = 0, k = 0, A; - for (let tt = 0, Mt = g.length; tt < Mt; tt += 2) { - const _t = g[tt]; + (c[0] != 1 || c[1] != 1) && C.push("scale", c), s && (C.push("strokeStyle", o.strokeStyle), C.push("lineWidth", f), C.push("lineCap", o.lineCap), C.push("lineJoin", o.lineJoin), C.push("miterLimit", o.miterLimit), C.push("setLineDash", [o.lineDash]), C.push("lineDashOffset", o.lineDashOffset)), n && C.push("fillStyle", a.fillStyle), C.push("textBaseline", "middle"), C.push("textAlign", "center"); + const A = 0.5 - d; + let k = d * x + A * f; + const Z = [], L = []; + let G = 0, dt = 0, N = 0, D = 0, I; + for (let Q = 0, Ct = g.length; Q < Ct; Q += 2) { + const _t = g[Q]; if (_t === ` `) { - ft += $, $ = 0, G = d * x + N * f, ++k; + dt += G, G = 0, k = d * x + A * f, ++D; continue; } - const Pt = g[tt + 1] || l.font; - Pt !== A && (s && U.push("font", Pt), n && T.push("font", Pt), A = Pt), $ = Math.max($, p[F]); + const Ot = g[Q + 1] || l.font; + Ot !== I && (s && Z.push("font", Ot), n && L.push("font", Ot), I = Ot), G = Math.max(G, y[N]); const b = [ _t, - G + N * y[F] + d * (y[F] - v[k]), - 0.5 * (f + $) + ft + k + A * _[N] + d * (_[N] - v[D]), + 0.5 * (f + G) + dt ]; - G += y[F], s && U.push("strokeText", b), n && T.push("fillText", b), ++F; + k += _[N], s && Z.push("strokeText", b), n && L.push("fillText", b), ++N; } - return Array.prototype.push.apply(M, U), Array.prototype.push.apply(M, T), this.labels_[r] = L, L; + return Array.prototype.push.apply(C, Z), Array.prototype.push.apply(C, L), this.labels_[r] = R, R; } replayTextBackground_(t, e, n, s, r, o, a) { t.beginPath(), t.moveTo.apply(t, e), t.lineTo.apply(t, n), t.lineTo.apply(t, s), t.lineTo.apply(t, r), t.lineTo.apply(t, e), o && (this.alignFill_ = o[2], this.fill_(t)), a && (this.setStrokeStyle_( @@ -9097,14 +9107,14 @@ class Am { a ), t.stroke()); } - calculateImageOrLabelDimensions_(t, e, n, s, r, o, a, l, h, c, u, d, f, g, m, _) { + calculateImageOrLabelDimensions_(t, e, n, s, r, o, a, l, h, c, u, d, f, g, m, p) { a *= d[0], l *= d[1]; - let y = n - a, p = s - l; - const v = r + h > t ? t - h : r, x = o + c > e ? e - c : o, M = g[3] + v * d[0] + g[1], E = g[0] + x * d[1] + g[2], R = y - g[3], L = p - g[0]; - (m || u !== 0) && (oi[0] = R, ai[0] = R, oi[1] = L, Ue[1] = L, Ue[0] = R + M, Ve[0] = Ue[0], Ve[1] = L + E, ai[1] = Ve[1]); - let N; - return u !== 0 ? (N = xi( - Pe(), + let _ = n - a, y = s - l; + const v = r + h > t ? t - h : r, x = o + c > e ? e - c : o, C = g[3] + v * d[0] + g[1], E = g[0] + x * d[1] + g[2], w = _ - g[3], R = y - g[0]; + (m || u !== 0) && (fi[0] = w, gi[0] = w, fi[1] = R, Ye[1] = R, Ye[0] = w + C, je[0] = Ye[0], je[1] = R + E, gi[1] = je[1]); + let A; + return u !== 0 ? (A = bi( + De(), n, s, 1, @@ -9112,33 +9122,33 @@ class Am { u, -n, -s - ), Ft(N, oi), Ft(N, Ue), Ft(N, Ve), Ft(N, ai), ye( - Math.min(oi[0], Ue[0], Ve[0], ai[0]), - Math.min(oi[1], Ue[1], Ve[1], ai[1]), - Math.max(oi[0], Ue[0], Ve[0], ai[0]), - Math.max(oi[1], Ue[1], Ve[1], ai[1]), - cn - )) : ye( - Math.min(R, R + M), - Math.min(L, L + E), - Math.max(R, R + M), - Math.max(L, L + E), - cn - ), f && (y = Math.round(y), p = Math.round(p)), { - drawImageX: y, - drawImageY: p, + ), Dt(A, fi), Dt(A, Ye), Dt(A, je), Dt(A, gi), xe( + Math.min(fi[0], Ye[0], je[0], gi[0]), + Math.min(fi[1], Ye[1], je[1], gi[1]), + Math.max(fi[0], Ye[0], je[0], gi[0]), + Math.max(fi[1], Ye[1], je[1], gi[1]), + pn + )) : xe( + Math.min(w, w + C), + Math.min(R, R + E), + Math.max(w, w + C), + Math.max(R, R + E), + pn + ), f && (_ = Math.round(_), y = Math.round(y)), { + drawImageX: _, + drawImageY: y, drawImageW: v, drawImageH: x, originX: h, originY: c, declutterBox: { - minX: cn[0], - minY: cn[1], - maxX: cn[2], - maxY: cn[3], - value: _ + minX: pn[0], + minY: pn[1], + maxX: pn[2], + maxY: pn[3], + value: p }, - canvasTransform: N, + canvasTransform: A, scale: d }; } @@ -9146,13 +9156,13 @@ class Am { const l = !!(o || a), h = s.declutterBox, c = t.canvas, u = a ? a[2] * s.scale[0] / 2 : 0; return h.minX - u <= c.width / e && h.maxX + u >= 0 && h.minY - u <= c.height / e && h.maxY + u >= 0 && (l && this.replayTextBackground_( t, - oi, - Ue, - Ve, - ai, + fi, + Ye, + je, + gi, o, a - ), X0( + ), H0( t, s.canvasTransform, r, @@ -9168,7 +9178,7 @@ class Am { } fill_(t) { if (this.alignFill_) { - const e = Ft(this.renderedTransform_, [0, 0]), n = 512 * this.pixelRatio; + const e = Dt(this.renderedTransform_, [0, 0]), n = 512 * this.pixelRatio; t.save(), t.translate(e[0] % n, e[1] % n), t.rotate(this.viewRotation_); } t.fill(), this.alignFill_ && t.restore(); @@ -9177,10 +9187,10 @@ class Am { t.strokeStyle = e[1], t.lineWidth = e[2], t.lineCap = e[3], t.lineJoin = e[4], t.miterLimit = e[5], t.lineDashOffset = e[7], t.setLineDash(e[6]); } drawLabelWithPointPlacement_(t, e, n, s) { - const r = this.textStates[e], o = this.createLabel(t, e, s, n), a = this.strokeStates[n], l = this.pixelRatio, h = Wh( + const r = this.textStates[e], o = this.createLabel(t, e, s, n), a = this.strokeStates[n], l = this.pixelRatio, h = jh( Array.isArray(t) ? t[0] : t, - r.textAlign || Es - ), c = ds[r.textBaseline || $r], u = a && a.lineWidth ? a.lineWidth : 0, d = o.width / l - 2 * r.scale[0], f = h * d + 2 * (0.5 - h) * u, g = c * o.height / l + 2 * (0.5 - c) * u; + r.textAlign || Ps + ), c = Cs[r.textBaseline || Wr], u = a && a.lineWidth ? a.lineWidth : 0, d = o.width / l - 2 * r.scale[0], f = h * d + 2 * (0.5 - h) * u, g = c * o.height / l + 2 * (0.5 - c) * u; return { label: o, anchorX: f, @@ -9189,271 +9199,271 @@ class Am { } execute_(t, e, n, s, r, o, a, l) { let h; - this.pixelCoordinates_ && Ki(n, this.renderedTransform_) ? h = this.pixelCoordinates_ : (this.pixelCoordinates_ || (this.pixelCoordinates_ = []), h = $i( + this.pixelCoordinates_ && sn(n, this.renderedTransform_) ? h = this.pixelCoordinates_ : (this.pixelCoordinates_ || (this.pixelCoordinates_ = []), h = Xi( this.coordinates, 0, this.coordinates.length, 2, n, this.pixelCoordinates_ - ), p0(this.renderedTransform_, n)); + ), g0(this.renderedTransform_, n)); let c = 0; const u = s.length; - let d = 0, f, g, m, _, y, p, v, x, M, E, R, L, N = 0, G = 0, U = null, T = null; - const $ = this.coordinateCache_, ft = this.viewRotation_, F = Math.round(Math.atan2(-n[1], n[0]) * 1e12) / 1e12, k = { + let d = 0, f, g, m, p, _, y, v, x, C, E, w, R, A = 0, k = 0, Z = null, L = null; + const G = this.coordinateCache_, dt = this.viewRotation_, N = Math.round(Math.atan2(-n[1], n[0]) * 1e12) / 1e12, D = { context: t, pixelRatio: this.pixelRatio, resolution: this.resolution, - rotation: ft - }, A = this.instructions != s || this.overlaps ? 0 : 200; - let tt, Mt, _t, Pt; + rotation: dt + }, I = this.instructions != s || this.overlaps ? 0 : 200; + let Q, Ct, _t, Ot; for (; c < u; ) { const b = s[c]; switch (b[0]) { - case V.BEGIN_GEOMETRY: - tt = b[1], Pt = b[3], tt.getGeometry() ? a !== void 0 && !Qt(a, Pt.getExtent()) ? c = b[2] + 1 : ++c : c = b[2]; + case U.BEGIN_GEOMETRY: + Q = b[1], Ot = b[3], Q.getGeometry() ? a !== void 0 && !ie(a, Ot.getExtent()) ? c = b[2] + 1 : ++c : c = b[2]; break; - case V.BEGIN_PATH: - N > A && (this.fill_(t), N = 0), G > A && (t.stroke(), G = 0), !N && !G && (t.beginPath(), _ = NaN, y = NaN), ++c; + case U.BEGIN_PATH: + A > I && (this.fill_(t), A = 0), k > I && (t.stroke(), k = 0), !A && !k && (t.beginPath(), p = NaN, _ = NaN), ++c; break; - case V.CIRCLE: + case U.CIRCLE: d = b[1]; - const lt = h[d], gt = h[d + 1], ii = h[d + 2], Re = h[d + 3], Gt = ii - lt, $e = Re - gt, en = Math.sqrt(Gt * Gt + $e * $e); - t.moveTo(lt + en, gt), t.arc(lt, gt, en, 0, 2 * Math.PI, !0), ++c; + const at = h[d], ft = h[d + 1], hi = h[d + 2], Ie = h[d + 3], $t = hi - at, Ve = Ie - ft, ln = Math.sqrt($t * $t + Ve * Ve); + t.moveTo(at + ln, ft), t.arc(at, ft, ln, 0, 2 * Math.PI, !0), ++c; break; - case V.CLOSE_PATH: + case U.CLOSE_PATH: t.closePath(), ++c; break; - case V.CUSTOM: + case U.CUSTOM: d = b[1], f = b[2]; - const er = b[3], nn = b[4], ir = b.length == 6 ? b[5] : void 0; - k.geometry = er, k.feature = tt, c in $ || ($[c] = []); - const ni = $[c]; - ir ? ir(h, d, f, 2, ni) : (ni[0] = h[d], ni[1] = h[d + 1], ni.length = 2), nn(ni, k), ++c; + const rr = b[3], hn = b[4], or = b.length == 6 ? b[5] : void 0; + D.geometry = rr, D.feature = Q, c in G || (G[c] = []); + const ci = G[c]; + or ? or(h, d, f, 2, ci) : (ci[0] = h[d], ci[1] = h[d + 1], ci.length = 2), hn(ci, D), ++c; break; - case V.DRAW_IMAGE: + case U.DRAW_IMAGE: d = b[1], f = b[2], x = b[3], g = b[4], m = b[5]; - let Yn = b[6]; - const si = b[7], nr = b[8], sr = b[9], rr = b[10]; - let sn = b[11]; - const Lo = b[12]; - let jt = b[13]; - const fe = b[14], ve = b[15]; + let ss = b[6]; + const ui = b[7], ar = b[8], lr = b[9], hr = b[10]; + let cn = b[11]; + const No = b[12]; + let Jt = b[13]; + const me = b[14], Me = b[15]; if (!x && b.length >= 20) { - M = b[19], E = b[20], R = b[21], L = b[22]; - const re = this.drawLabelWithPointPlacement_( - M, + C = b[19], E = b[20], w = b[21], R = b[22]; + const le = this.drawLabelWithPointPlacement_( + C, E, - R, - L + w, + R ); - x = re.label, b[3] = x; - const an = b[23]; - g = (re.anchorX - an) * this.pixelRatio, b[4] = g; - const ge = b[24]; - m = (re.anchorY - ge) * this.pixelRatio, b[5] = m, Yn = x.height, b[6] = Yn, jt = x.width, b[13] = jt; + x = le.label, b[3] = x; + const fn = b[23]; + g = (le.anchorX - fn) * this.pixelRatio, b[4] = g; + const pe = b[24]; + m = (le.anchorY - pe) * this.pixelRatio, b[5] = m, ss = x.height, b[6] = ss, Jt = x.width, b[13] = Jt; } - let Be; - b.length > 25 && (Be = b[25]); - let rn, Si, ri; - b.length > 17 ? (rn = b[16], Si = b[17], ri = b[18]) : (rn = Ai, Si = !1, ri = !1), rr && F ? sn += ft : !rr && !F && (sn -= ft); - let on = 0; + let We; + b.length > 25 && (We = b[25]); + let un, Ni, di; + b.length > 17 ? (un = b[16], Ni = b[17], di = b[18]) : (un = $i, Ni = !1, di = !1), hr && N ? cn += dt : !hr && !N && (cn -= dt); + let dn = 0; for (; d < f; d += 2) { - if (Be && Be[on++] < jt / this.pixelRatio) + if (We && We[dn++] < Jt / this.pixelRatio) continue; - const re = this.calculateImageOrLabelDimensions_( + const le = this.calculateImageOrLabelDimensions_( x.width, x.height, h[d], h[d + 1], - jt, - Yn, + Jt, + ss, g, m, - nr, - sr, - sn, - Lo, + ar, + lr, + cn, + No, r, - rn, - Si || ri, - tt - ), an = [ + un, + Ni || di, + Q + ), fn = [ t, e, x, - re, - si, - Si ? U : null, - ri ? T : null + le, + ui, + Ni ? Z : null, + di ? L : null ]; if (l) { - if (fe === "none") + if (me === "none") continue; - if (fe === "obstacle") { - l.insert(re.declutterBox); + if (me === "obstacle") { + l.insert(le.declutterBox); continue; } else { - let ge, ze; - if (ve) { - const oe = f - d; - if (!ve[oe]) { - ve[oe] = an; + let pe, He; + if (Me) { + const he = f - d; + if (!Me[he]) { + Me[he] = fn; continue; } - if (ge = ve[oe], delete ve[oe], ze = Vh(ge), l.collides(ze)) + if (pe = Me[he], delete Me[he], He = Yh(pe), l.collides(He)) continue; } - if (l.collides(re.declutterBox)) + if (l.collides(le.declutterBox)) continue; - ge && (l.insert(ze), this.replayImageOrLabel_.apply(this, ge)), l.insert(re.declutterBox); + pe && (l.insert(He), this.replayImageOrLabel_.apply(this, pe)), l.insert(le.declutterBox); } } - this.replayImageOrLabel_.apply(this, an); + this.replayImageOrLabel_.apply(this, fn); } ++c; break; - case V.DRAW_CHARS: - const or = b[1], Zt = b[2], To = b[3], Bf = b[4]; - L = b[5]; - const zf = b[6], Xl = b[7], Yl = b[8]; - R = b[9]; - const Io = b[10]; - M = b[11], E = b[12]; - const jl = [ + case U.DRAW_CHARS: + const cr = b[1], Ht = b[2], Fo = b[3], Df = b[4]; + R = b[5]; + const kf = b[6], ql = b[7], Jl = b[8]; + w = b[9]; + const Do = b[10]; + C = b[11], E = b[12]; + const Ql = [ b[13], b[13] - ], Ao = this.textStates[E], jn = Ao.font, Kn = [ - Ao.scale[0] * Xl, - Ao.scale[1] * Xl + ], ko = this.textStates[E], rs = ko.font, os = [ + ko.scale[0] * ql, + ko.scale[1] * ql ]; - let qn; - jn in this.widths_ ? qn = this.widths_[jn] : (qn = {}, this.widths_[jn] = qn); - const Kl = gd(h, or, Zt, 2), ql = Math.abs(Kn[0]) * vh(jn, M, qn); - if (Bf || ql <= Kl) { - const re = this.textStates[E].textAlign, an = (Kl - ql) * ds[re], ge = Lm( + let as; + rs in this.widths_ ? as = this.widths_[rs] : (as = {}, this.widths_[rs] = as); + const th = _d(h, cr, Ht, 2), eh = Math.abs(os[0]) * Eh(rs, C, as); + if (Df || eh <= th) { + const le = this.textStates[E].textAlign, fn = (th - eh) * Cs[le], pe = bm( h, - or, - Zt, + cr, + Ht, 2, - M, - an, - zf, - Math.abs(Kn[0]), - vh, - jn, - qn, - F ? 0 : this.viewRotation_ + C, + fn, + kf, + Math.abs(os[0]), + Eh, + rs, + as, + N ? 0 : this.viewRotation_ ); t: - if (ge) { - const ze = []; - let oe, ar, lr, Kt, me; - if (R) - for (oe = 0, ar = ge.length; oe < ar; ++oe) { - me = ge[oe], lr = me[4], Kt = this.createLabel(lr, E, "", R), g = me[2] + (Kn[0] < 0 ? -Io : Io), m = To * Kt.height + (0.5 - To) * 2 * Io * Kn[1] / Kn[0] - Yl; - const Ze = this.calculateImageOrLabelDimensions_( - Kt.width, - Kt.height, - me[0], - me[1], - Kt.width, - Kt.height, + if (pe) { + const He = []; + let he, ur, dr, Qt, _e; + if (w) + for (he = 0, ur = pe.length; he < ur; ++he) { + _e = pe[he], dr = _e[4], Qt = this.createLabel(dr, E, "", w), g = _e[2] + (os[0] < 0 ? -Do : Do), m = Fo * Qt.height + (0.5 - Fo) * 2 * Do * os[1] / os[0] - Jl; + const Xe = this.calculateImageOrLabelDimensions_( + Qt.width, + Qt.height, + _e[0], + _e[1], + Qt.width, + Qt.height, g, m, 0, 0, - me[3], - jl, + _e[3], + Ql, !1, - Ai, + $i, !1, - tt + Q ); - if (l && l.collides(Ze.declutterBox)) + if (l && l.collides(Xe.declutterBox)) break t; - ze.push([ + He.push([ t, e, - Kt, - Ze, + Qt, + Xe, 1, null, null ]); } - if (L) - for (oe = 0, ar = ge.length; oe < ar; ++oe) { - me = ge[oe], lr = me[4], Kt = this.createLabel(lr, E, L, ""), g = me[2], m = To * Kt.height - Yl; - const Ze = this.calculateImageOrLabelDimensions_( - Kt.width, - Kt.height, - me[0], - me[1], - Kt.width, - Kt.height, + if (R) + for (he = 0, ur = pe.length; he < ur; ++he) { + _e = pe[he], dr = _e[4], Qt = this.createLabel(dr, E, R, ""), g = _e[2], m = Fo * Qt.height - Jl; + const Xe = this.calculateImageOrLabelDimensions_( + Qt.width, + Qt.height, + _e[0], + _e[1], + Qt.width, + Qt.height, g, m, 0, 0, - me[3], - jl, + _e[3], + Ql, !1, - Ai, + $i, !1, - tt + Q ); - if (l && l.collides(Ze.declutterBox)) + if (l && l.collides(Xe.declutterBox)) break t; - ze.push([ + He.push([ t, e, - Kt, - Ze, + Qt, + Xe, 1, null, null ]); } - l && l.load(ze.map(Vh)); - for (let Ze = 0, Zf = ze.length; Ze < Zf; ++Ze) - this.replayImageOrLabel_.apply(this, ze[Ze]); + l && l.load(He.map(Yh)); + for (let Xe = 0, Gf = He.length; Xe < Gf; ++Xe) + this.replayImageOrLabel_.apply(this, He[Xe]); } } ++c; break; - case V.END_GEOMETRY: + case U.END_GEOMETRY: if (o !== void 0) { - tt = b[1]; - const re = o(tt, Pt); - if (re) - return re; + Q = b[1]; + const le = o(Q, Ot); + if (le) + return le; } ++c; break; - case V.FILL: - A ? N++ : this.fill_(t), ++c; + case U.FILL: + I ? A++ : this.fill_(t), ++c; break; - case V.MOVE_TO_LINE_TO: - for (d = b[1], f = b[2], Mt = h[d], _t = h[d + 1], p = Mt + 0.5 | 0, v = _t + 0.5 | 0, (p !== _ || v !== y) && (t.moveTo(Mt, _t), _ = p, y = v), d += 2; d < f; d += 2) - Mt = h[d], _t = h[d + 1], p = Mt + 0.5 | 0, v = _t + 0.5 | 0, (d == f - 2 || p !== _ || v !== y) && (t.lineTo(Mt, _t), _ = p, y = v); + case U.MOVE_TO_LINE_TO: + for (d = b[1], f = b[2], Ct = h[d], _t = h[d + 1], y = Ct + 0.5 | 0, v = _t + 0.5 | 0, (y !== p || v !== _) && (t.moveTo(Ct, _t), p = y, _ = v), d += 2; d < f; d += 2) + Ct = h[d], _t = h[d + 1], y = Ct + 0.5 | 0, v = _t + 0.5 | 0, (d == f - 2 || y !== p || v !== _) && (t.lineTo(Ct, _t), p = y, _ = v); ++c; break; - case V.SET_FILL_STYLE: - U = b, this.alignFill_ = b[2], N && (this.fill_(t), N = 0, G && (t.stroke(), G = 0)), t.fillStyle = b[1], ++c; + case U.SET_FILL_STYLE: + Z = b, this.alignFill_ = b[2], A && (this.fill_(t), A = 0, k && (t.stroke(), k = 0)), t.fillStyle = b[1], ++c; break; - case V.SET_STROKE_STYLE: - T = b, G && (t.stroke(), G = 0), this.setStrokeStyle_(t, b), ++c; + case U.SET_STROKE_STYLE: + L = b, k && (t.stroke(), k = 0), this.setStrokeStyle_(t, b), ++c; break; - case V.STROKE: - A ? G++ : t.stroke(), ++c; + case U.STROKE: + I ? k++ : t.stroke(), ++c; break; default: ++c; break; } } - N && this.fill_(t), G && t.stroke(); + A && this.fill_(t), k && t.stroke(); } execute(t, e, n, s, r, o) { this.viewRotation_ = s, this.execute_( @@ -9479,10 +9489,10 @@ class Am { ); } } -const Pm = Am, Ho = ["Polygon", "Circle", "LineString", "Image", "Text", "Default"]; -class Om { +const Am = Im, Qo = ["Polygon", "Circle", "LineString", "Image", "Text", "Default"]; +class Pm { constructor(t, e, n, s, r, o) { - this.maxExtent_ = t, this.overlaps_ = s, this.pixelRatio_ = n, this.resolution_ = e, this.renderBuffer_ = o, this.executorsByZIndex_ = {}, this.hitDetectionContext_ = null, this.hitDetectionTransform_ = Pe(), this.createExecutors_(r); + this.maxExtent_ = t, this.overlaps_ = s, this.pixelRatio_ = n, this.resolution_ = e, this.renderBuffer_ = o, this.executorsByZIndex_ = {}, this.hitDetectionContext_ = null, this.hitDetectionTransform_ = De(), this.createExecutors_(r); } clip(t, e) { const n = this.getClipCoords(e); @@ -9495,7 +9505,7 @@ class Om { const s = t[e]; for (const r in s) { const o = s[r]; - n[r] = new Pm( + n[r] = new Am( this.resolution_, this.pixelRatio_, this.overlaps_, @@ -9515,7 +9525,7 @@ class Om { } forEachFeatureAtCoordinate(t, e, n, s, r, o) { s = Math.round(s); - const a = s * 2 + 1, l = xi( + const a = s * 2 + 1, l = bi( this.hitDetectionTransform_, s + 0.5, s + 0.5, @@ -9525,45 +9535,45 @@ class Om { -t[0], -t[1] ), h = !this.hitDetectionContext_; - h && (this.hitDetectionContext_ = de( + h && (this.hitDetectionContext_ = ge( a, a )); const c = this.hitDetectionContext_; c.canvas.width !== a || c.canvas.height !== a ? (c.canvas.width = a, c.canvas.height = a) : h || c.clearRect(0, 0, a, a); let u; - this.renderBuffer_ !== void 0 && (u = ue(), hs(u, t), oo( + this.renderBuffer_ !== void 0 && (u = fe(), ys(u, t), fo( u, e * (this.renderBuffer_ + s), u )); - const d = Nm(s); + const d = Om(s); let f; - function g(M, E) { - const R = c.getImageData( + function g(C, E) { + const w = c.getImageData( 0, 0, a, a ).data; - for (let L = 0, N = d.length; L < N; L++) - if (R[d[L]] > 0) { - if (!o || f !== "Image" && f !== "Text" || o.includes(M)) { - const G = (d[L] - 3) / 4, U = s - G % a, T = s - (G / a | 0), $ = r(M, E, U * U + T * T); - if ($) - return $; + for (let R = 0, A = d.length; R < A; R++) + if (w[d[R]] > 0) { + if (!o || f !== "Image" && f !== "Text" || o.includes(C)) { + const k = (d[R] - 3) / 4, Z = s - k % a, L = s - (k / a | 0), G = r(C, E, Z * Z + L * L); + if (G) + return G; } c.clearRect(0, 0, a, a); break; } } const m = Object.keys(this.executorsByZIndex_).map(Number); - m.sort(Zi); - let _, y, p, v, x; - for (_ = m.length - 1; _ >= 0; --_) { - const M = m[_].toString(); - for (p = this.executorsByZIndex_[M], y = Ho.length - 1; y >= 0; --y) - if (f = Ho[y], v = p[f], v !== void 0 && (x = v.executeHitDetection( + m.sort(Ki); + let p, _, y, v, x; + for (p = m.length - 1; p >= 0; --p) { + const C = m[p].toString(); + for (y = this.executorsByZIndex_[C], _ = Qo.length - 1; _ >= 0; --_) + if (f = Qo[_], v = y[f], v !== void 0 && (x = v.executeHitDetection( c, l, n, @@ -9578,20 +9588,20 @@ class Om { if (!e) return null; const n = e[0], s = e[1], r = e[2], o = e[3], a = [n, s, n, o, r, o, r, s]; - return $i(a, 0, 8, 2, t, a), a; + return Xi(a, 0, 8, 2, t, a), a; } isEmpty() { - return An(this.executorsByZIndex_); + return Gn(this.executorsByZIndex_); } execute(t, e, n, s, r, o, a) { const l = Object.keys(this.executorsByZIndex_).map(Number); - l.sort(Zi), this.maxExtent_ && (t.save(), this.clip(t, n)), o = o || Ho; + l.sort(Ki), this.maxExtent_ && (t.save(), this.clip(t, n)), o = o || Qo; let h, c, u, d, f, g; for (a && l.reverse(), h = 0, c = l.length; h < c; ++h) { const m = l[h].toString(); for (f = this.executorsByZIndex_[m], u = 0, d = o.length; u < d; ++u) { - const _ = o[u]; - g = f[_], g !== void 0 && g.execute( + const p = o[u]; + g = f[p], g !== void 0 && g.execute( t, e, n, @@ -9604,10 +9614,10 @@ class Om { this.maxExtent_ && t.restore(); } } -const Xo = {}; -function Nm(i) { - if (Xo[i] !== void 0) - return Xo[i]; +const ta = {}; +function Om(i) { + if (ta[i] !== void 0) + return ta[i]; const t = i * 2 + 1, e = i * i, n = new Array(e + 1); for (let r = 0; r <= i; ++r) for (let o = 0; o <= i; ++o) { @@ -9620,17 +9630,17 @@ function Nm(i) { const s = []; for (let r = 0, o = n.length; r < o; ++r) n[r] && s.push(...n[r]); - return Xo[i] = s, s; + return ta[i] = s, s; } -const Hh = Om; -class Fm extends xd { +const Kh = Pm; +class Nm extends Ed { constructor(t, e, n, s, r, o, a) { - super(), this.context_ = t, this.pixelRatio_ = e, this.extent_ = n, this.transform_ = s, this.viewRotation_ = r, this.squaredTolerance_ = o, this.userTransform_ = a, this.contextFillState_ = null, this.contextStrokeState_ = null, this.contextTextState_ = null, this.fillState_ = null, this.strokeState_ = null, this.image_ = null, this.imageAnchorX_ = 0, this.imageAnchorY_ = 0, this.imageHeight_ = 0, this.imageOpacity_ = 0, this.imageOriginX_ = 0, this.imageOriginY_ = 0, this.imageRotateWithView_ = !1, this.imageRotation_ = 0, this.imageScale_ = [0, 0], this.imageWidth_ = 0, this.text_ = "", this.textOffsetX_ = 0, this.textOffsetY_ = 0, this.textRotateWithView_ = !1, this.textRotation_ = 0, this.textScale_ = [0, 0], this.textFillState_ = null, this.textStrokeState_ = null, this.textState_ = null, this.pixelCoordinates_ = [], this.tmpLocalTransform_ = Pe(); + super(), this.context_ = t, this.pixelRatio_ = e, this.extent_ = n, this.transform_ = s, this.viewRotation_ = r, this.squaredTolerance_ = o, this.userTransform_ = a, this.contextFillState_ = null, this.contextStrokeState_ = null, this.contextTextState_ = null, this.fillState_ = null, this.strokeState_ = null, this.image_ = null, this.imageAnchorX_ = 0, this.imageAnchorY_ = 0, this.imageHeight_ = 0, this.imageOpacity_ = 0, this.imageOriginX_ = 0, this.imageOriginY_ = 0, this.imageRotateWithView_ = !1, this.imageRotation_ = 0, this.imageScale_ = [0, 0], this.imageWidth_ = 0, this.text_ = "", this.textOffsetX_ = 0, this.textOffsetY_ = 0, this.textRotateWithView_ = !1, this.textRotation_ = 0, this.textScale_ = [0, 0], this.textFillState_ = null, this.textStrokeState_ = null, this.textState_ = null, this.pixelCoordinates_ = [], this.tmpLocalTransform_ = De(); } drawImages_(t, e, n, s) { if (!this.image_) return; - const r = $i( + const r = Xi( t, e, n, @@ -9645,7 +9655,7 @@ class Fm extends xd { const d = r[c] - this.imageAnchorX_, f = r[c + 1] - this.imageAnchorY_; if (h !== 0 || this.imageScale_[0] != 1 || this.imageScale_[1] != 1) { const g = d + this.imageAnchorX_, m = f + this.imageAnchorY_; - xi( + bi( a, g, m, @@ -9684,7 +9694,7 @@ class Fm extends xd { if (!this.textState_ || this.text_ === "") return; this.textFillState_ && this.setContextFillState_(this.textFillState_), this.textStrokeState_ && this.setContextStrokeState_(this.textStrokeState_), this.setContextTextState_(this.textState_); - const r = $i( + const r = Xi( t, e, n, @@ -9699,7 +9709,7 @@ class Fm extends xd { } } moveToLineTo_(t, e, n, s, r) { - const o = this.context_, a = $i( + const o = this.context_, a = Xi( t, e, n, @@ -9726,10 +9736,10 @@ class Fm extends xd { return e; } drawCircle(t) { - if (!!Qt(this.extent_, t.getExtent())) { + if (!!ie(this.extent_, t.getExtent())) { if (this.fillState_ || this.strokeState_) { this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_); - const e = Ng( + const e = Og( t, this.transform_, this.pixelCoordinates_ @@ -9797,7 +9807,7 @@ class Fm extends xd { } drawFeature(t, e) { const n = e.getGeometryFunction()(t); - !n || !Qt(this.extent_, n.getExtent()) || (this.setStyle(e), this.drawGeometry(n)); + !n || !ie(this.extent_, n.getExtent()) || (this.setStyle(e), this.drawGeometry(n)); } drawGeometryCollection(t) { const e = t.getGeometriesArray(); @@ -9824,7 +9834,7 @@ class Fm extends xd { if (this.squaredTolerance_ && (t = t.simplifyTransformed( this.squaredTolerance_, this.userTransform_ - )), !!Qt(this.extent_, t.getExtent())) { + )), !!ie(this.extent_, t.getExtent())) { if (this.strokeState_) { this.setContextStrokeState_(this.strokeState_); const e = this.context_, n = t.getFlatCoordinates(); @@ -9848,7 +9858,7 @@ class Fm extends xd { this.userTransform_ )); const e = t.getExtent(); - if (!!Qt(this.extent_, e)) { + if (!!ie(this.extent_, e)) { if (this.strokeState_) { this.setContextStrokeState_(this.strokeState_); const n = this.context_, s = t.getFlatCoordinates(); @@ -9875,7 +9885,7 @@ class Fm extends xd { if (this.squaredTolerance_ && (t = t.simplifyTransformed( this.squaredTolerance_, this.userTransform_ - )), !!Qt(this.extent_, t.getExtent())) { + )), !!ie(this.extent_, t.getExtent())) { if (this.strokeState_ || this.fillState_) { this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_); const e = this.context_; @@ -9896,7 +9906,7 @@ class Fm extends xd { if (this.squaredTolerance_ && (t = t.simplifyTransformed( this.squaredTolerance_, this.userTransform_ - )), !!Qt(this.extent_, t.getExtent())) { + )), !!ie(this.extent_, t.getExtent())) { if (this.strokeState_ || this.fillState_) { this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_); const e = this.context_, n = t.getOrientedFlatCoordinates(); @@ -9923,7 +9933,7 @@ class Fm extends xd { } setContextStrokeState_(t) { const e = this.context_, n = this.contextStrokeState_; - n ? (n.lineCap != t.lineCap && (n.lineCap = t.lineCap, e.lineCap = t.lineCap), Ki(n.lineDash, t.lineDash) || e.setLineDash( + n ? (n.lineCap != t.lineCap && (n.lineCap = t.lineCap, e.lineCap = t.lineCap), sn(n.lineDash, t.lineDash) || e.setLineDash( n.lineDash = t.lineDash ), n.lineDashOffset != t.lineDashOffset && (n.lineDashOffset = t.lineDashOffset, e.lineDashOffset = t.lineDashOffset), n.lineJoin != t.lineJoin && (n.lineJoin = t.lineJoin, e.lineJoin = t.lineJoin), n.lineWidth != t.lineWidth && (n.lineWidth = t.lineWidth, e.lineWidth = t.lineWidth), n.miterLimit != t.miterLimit && (n.miterLimit = t.miterLimit, e.miterLimit = t.miterLimit), n.strokeStyle != t.strokeStyle && (n.strokeStyle = t.strokeStyle, e.strokeStyle = t.strokeStyle)) : (e.lineCap = t.lineCap, e.setLineDash(t.lineDash), e.lineDashOffset = t.lineDashOffset, e.lineJoin = t.lineJoin, e.lineWidth = t.lineWidth, e.miterLimit = t.miterLimit, e.strokeStyle = t.strokeStyle, this.contextStrokeState_ = { lineCap: t.lineCap, @@ -9936,7 +9946,7 @@ class Fm extends xd { }); } setContextTextState_(t) { - const e = this.context_, n = this.contextTextState_, s = t.textAlign ? t.textAlign : Es; + const e = this.context_, n = this.contextTextState_, s = t.textAlign ? t.textAlign : Ps; n ? (n.font != t.font && (n.font = t.font, e.font = t.font), n.textAlign != s && (n.textAlign = s, e.textAlign = s), n.textBaseline != t.textBaseline && (n.textBaseline = t.textBaseline, e.textBaseline = t.textBaseline)) : (e.font = t.font, e.textAlign = s, e.textBaseline = t.textBaseline, this.contextTextState_ = { font: t.font, textAlign: s, @@ -9949,24 +9959,24 @@ class Fm extends xd { else { const n = t.getColor(); this.fillState_ = { - fillStyle: Ie( - n || Je + fillStyle: Ne( + n || si ) }; } if (!e) this.strokeState_ = null; else { - const n = e.getColor(), s = e.getLineCap(), r = e.getLineDash(), o = e.getLineDashOffset(), a = e.getLineJoin(), l = e.getWidth(), h = e.getMiterLimit(), c = r || vs; + const n = e.getColor(), s = e.getLineCap(), r = e.getLineDash(), o = e.getLineDashOffset(), a = e.getLineJoin(), l = e.getWidth(), h = e.getMiterLimit(), c = r || Ls; this.strokeState_ = { - lineCap: s !== void 0 ? s : Gr, + lineCap: s !== void 0 ? s : Vr, lineDash: this.pixelRatio_ === 1 ? c : c.map((u) => u * this.pixelRatio_), - lineDashOffset: (o || xs) * this.pixelRatio_, - lineJoin: a !== void 0 ? a : Pn, - lineWidth: (l !== void 0 ? l : ws) * this.pixelRatio_, - miterLimit: h !== void 0 ? h : Ms, - strokeStyle: Ie( - n || Cs + lineDashOffset: (o || Ts) * this.pixelRatio_, + lineJoin: a !== void 0 ? a : $n, + lineWidth: (l !== void 0 ? l : Os) * this.pixelRatio_, + miterLimit: h !== void 0 ? h : Is, + strokeStyle: Ne( + n || As ) }; } @@ -9995,8 +10005,8 @@ class Fm extends xd { else { const f = e.getColor(); this.textFillState_ = { - fillStyle: Ie( - f || Je + fillStyle: Ne( + f || si ) }; } @@ -10004,24 +10014,24 @@ class Fm extends xd { if (!n) this.textStrokeState_ = null; else { - const f = n.getColor(), g = n.getLineCap(), m = n.getLineDash(), _ = n.getLineDashOffset(), y = n.getLineJoin(), p = n.getWidth(), v = n.getMiterLimit(); + const f = n.getColor(), g = n.getLineCap(), m = n.getLineDash(), p = n.getLineDashOffset(), _ = n.getLineJoin(), y = n.getWidth(), v = n.getMiterLimit(); this.textStrokeState_ = { - lineCap: g !== void 0 ? g : Gr, - lineDash: m || vs, - lineDashOffset: _ || xs, - lineJoin: y !== void 0 ? y : Pn, - lineWidth: p !== void 0 ? p : ws, - miterLimit: v !== void 0 ? v : Ms, - strokeStyle: Ie( - f || Cs + lineCap: g !== void 0 ? g : Vr, + lineDash: m || Ls, + lineDashOffset: p || Ts, + lineJoin: _ !== void 0 ? _ : $n, + lineWidth: y !== void 0 ? y : Os, + miterLimit: v !== void 0 ? v : Is, + strokeStyle: Ne( + f || As ) }; } const s = t.getFont(), r = t.getOffsetX(), o = t.getOffsetY(), a = t.getRotateWithView(), l = t.getRotation(), h = t.getScaleArray(), c = t.getText(), u = t.getTextAlign(), d = t.getTextBaseline(); this.textState_ = { - font: s !== void 0 ? s : $u, - textAlign: u !== void 0 ? u : Es, - textBaseline: d !== void 0 ? d : $r + font: s !== void 0 ? s : Zu, + textAlign: u !== void 0 ? u : Ps, + textBaseline: d !== void 0 ? d : Wr }, this.text_ = c !== void 0 ? Array.isArray(c) ? c.reduce((f, g, m) => f += m % 2 ? " " : g, "") : c : "", this.textOffsetX_ = r !== void 0 ? this.pixelRatio_ * r : 0, this.textOffsetY_ = o !== void 0 ? this.pixelRatio_ * o : 0, this.textRotateWithView_ = a !== void 0 ? a : !1, this.textRotation_ = l !== void 0 ? l : 0, this.textScale_ = [ this.pixelRatio_ * h[0], this.pixelRatio_ * h[1] @@ -10029,112 +10039,112 @@ class Fm extends xd { } } } -const Dm = Fm, Le = 0.5; -function km(i, t, e, n, s, r, o) { - const a = i[0] * Le, l = i[1] * Le, h = de(a, l); +const Sd = Nm, Pe = 0.5; +function Fm(i, t, e, n, s, r, o) { + const a = i[0] * Pe, l = i[1] * Pe, h = ge(a, l); h.imageSmoothingEnabled = !1; - const c = h.canvas, u = new Dm( + const c = h.canvas, u = new Sd( h, - Le, + Pe, s, null, o ), d = e.length, f = Math.floor((256 * 256 * 256 - 1) / d), g = {}; - for (let _ = 1; _ <= d; ++_) { - const y = e[_ - 1], p = y.getStyleFunction() || n; + for (let p = 1; p <= d; ++p) { + const _ = e[p - 1], y = _.getStyleFunction() || n; if (!n) continue; - let v = p(y, r); + let v = y(_, r); if (!v) continue; Array.isArray(v) || (v = [v]); - const M = "#" + ("000000" + (_ * f).toString(16)).slice(-6); - for (let E = 0, R = v.length; E < R; ++E) { - const L = v[E], N = L.getGeometryFunction()(y); - if (!N || !Qt(s, N.getExtent())) + const C = "#" + ("000000" + (p * f).toString(16)).slice(-6); + for (let E = 0, w = v.length; E < w; ++E) { + const R = v[E], A = R.getGeometryFunction()(_); + if (!A || !ie(s, A.getExtent())) continue; - const G = L.clone(), U = G.getFill(); - U && U.setColor(M); - const T = G.getStroke(); - T && (T.setColor(M), T.setLineDash(null)), G.setText(void 0); - const $ = L.getImage(); - if ($ && $.getOpacity() !== 0) { - const k = $.getImageSize(); - if (!k) + const k = R.clone(), Z = k.getFill(); + Z && Z.setColor(C); + const L = k.getStroke(); + L && (L.setColor(C), L.setLineDash(null)), k.setText(void 0); + const G = R.getImage(); + if (G && G.getOpacity() !== 0) { + const D = G.getImageSize(); + if (!D) continue; - const A = de( - k[0], - k[1], + const I = ge( + D[0], + D[1], void 0, { alpha: !1 } - ), tt = A.canvas; - A.fillStyle = M, A.fillRect(0, 0, tt.width, tt.height), G.setImage( - new us({ - img: tt, - imgSize: k, - anchor: $.getAnchor(), + ), Q = I.canvas; + I.fillStyle = C, I.fillRect(0, 0, Q.width, Q.height), k.setImage( + new xs({ + img: Q, + imgSize: D, + anchor: G.getAnchor(), anchorXUnits: "pixels", anchorYUnits: "pixels", - offset: $.getOrigin(), + offset: G.getOrigin(), opacity: 1, - size: $.getSize(), - scale: $.getScale(), - rotation: $.getRotation(), - rotateWithView: $.getRotateWithView() + size: G.getSize(), + scale: G.getScale(), + rotation: G.getRotation(), + rotateWithView: G.getRotateWithView() }) ); } - const ft = G.getZIndex() || 0; - let F = g[ft]; - F || (F = {}, g[ft] = F, F.Polygon = [], F.Circle = [], F.LineString = [], F.Point = []), F[N.getType().replace("Multi", "")].push( - N, - G + const dt = k.getZIndex() || 0; + let N = g[dt]; + N || (N = {}, g[dt] = N, N.Polygon = [], N.Circle = [], N.LineString = [], N.Point = []), N[A.getType().replace("Multi", "")].push( + A, + k ); } } - const m = Object.keys(g).map(Number).sort(Zi); - for (let _ = 0, y = m.length; _ < y; ++_) { - const p = g[m[_]]; - for (const v in p) { - const x = p[v]; - for (let M = 0, E = x.length; M < E; M += 2) { - u.setStyle(x[M + 1]); - for (let R = 0, L = t.length; R < L; ++R) - u.setTransform(t[R]), u.drawGeometry(x[M]); + const m = Object.keys(g).map(Number).sort(Ki); + for (let p = 0, _ = m.length; p < _; ++p) { + const y = g[m[p]]; + for (const v in y) { + const x = y[v]; + for (let C = 0, E = x.length; C < E; C += 2) { + u.setStyle(x[C + 1]); + for (let w = 0, R = t.length; w < R; ++w) + u.setTransform(t[w]), u.drawGeometry(x[C]); } } } return h.getImageData(0, 0, c.width, c.height); } -function Gm(i, t, e) { +function Dm(i, t, e) { const n = []; if (e) { - const s = Math.floor(Math.round(i[0]) * Le), r = Math.floor(Math.round(i[1]) * Le), o = (wt(s, 0, e.width - 1) + wt(r, 0, e.height - 1) * e.width) * 4, a = e.data[o], l = e.data[o + 1], c = e.data[o + 2] + 256 * (l + 256 * a), u = Math.floor((256 * 256 * 256 - 1) / t.length); + const s = Math.floor(Math.round(i[0]) * Pe), r = Math.floor(Math.round(i[1]) * Pe), o = (wt(s, 0, e.width - 1) + wt(r, 0, e.height - 1) * e.width) * 4, a = e.data[o], l = e.data[o + 1], c = e.data[o + 2] + 256 * (l + 256 * a), u = Math.floor((256 * 256 * 256 - 1) / t.length); c && c % u === 0 && n.push(t[c / u - 1]); } return n; } -const $m = 0.5, Cd = { - Point: Ym, - LineString: Wm, - Polygon: Km, - MultiPoint: jm, - MultiLineString: Hm, - MultiPolygon: Xm, - GeometryCollection: Vm, - Circle: Zm +const km = 0.5, Rd = { + Point: Wm, + LineString: Zm, + Polygon: Xm, + MultiPoint: Hm, + MultiLineString: Um, + MultiPolygon: Vm, + GeometryCollection: zm, + Circle: $m }; -function Bm(i, t) { +function Gm(i, t) { return parseInt(rt(i), 10) - parseInt(rt(t), 10); } -function zm(i, t) { - const e = Ea(i, t); +function bd(i, t) { + const e = La(i, t); return e * e; } -function Ea(i, t) { - return $m * i / t; +function La(i, t) { + return km * i / t; } -function Zm(i, t, e, n, s) { +function $m(i, t, e, n, s) { const r = e.getFill(), o = e.getStroke(); if (r || o) { const l = i.getBuilder(e.getZIndex(), "Circle"); @@ -10149,14 +10159,14 @@ function Zm(i, t, e, n, s) { l.setTextStyle(a), l.drawText(t, n); } } -function Xh(i, t, e, n, s, r, o) { +function qh(i, t, e, n, s, r, o) { let a = !1; const l = e.getImage(); if (l) { const h = l.getImageState(); - h == It.LOADED || h == It.ERROR ? l.unlistenImageChange(s) : (h == It.IDLE && l.load(), l.listenImageChange(s), a = !0); + h == At.LOADED || h == At.ERROR ? l.unlistenImageChange(s) : (h == At.IDLE && l.load(), l.listenImageChange(s), a = !0); } - return Um( + return Bm( i, t, e, @@ -10165,7 +10175,7 @@ function Xh(i, t, e, n, s, r, o) { o ), a; } -function Um(i, t, e, n, s, r) { +function Bm(i, t, e, n, s, r) { const o = e.getGeometryFunction()(t); if (!o) return; @@ -10174,9 +10184,9 @@ function Um(i, t, e, n, s, r) { s ); if (e.getRenderer()) - Ed(i, a, e, t); + Ld(i, a, e, t); else { - const h = Cd[a.getType()]; + const h = Rd[a.getType()]; h( i, a, @@ -10186,11 +10196,11 @@ function Um(i, t, e, n, s, r) { ); } } -function Ed(i, t, e, n) { +function Ld(i, t, e, n) { if (t.getType() == "GeometryCollection") { const r = t.getGeometries(); for (let o = 0, a = r.length; o < a; ++o) - Ed(i, r[o], e, n); + Ld(i, r[o], e, n); return; } i.getBuilder(e.getZIndex(), "Default").drawCustom( @@ -10200,11 +10210,11 @@ function Ed(i, t, e, n) { e.getHitDetectionRenderer() ); } -function Vm(i, t, e, n, s) { +function zm(i, t, e, n, s) { const r = t.getGeometriesArray(); let o, a; for (o = 0, a = r.length; o < a; ++o) { - const l = Cd[r[o].getType()]; + const l = Rd[r[o].getType()]; l( i, r[o], @@ -10214,7 +10224,7 @@ function Vm(i, t, e, n, s) { ); } } -function Wm(i, t, e, n, s) { +function Zm(i, t, e, n, s) { const r = e.getStroke(); if (r) { const a = i.getBuilder( @@ -10232,7 +10242,7 @@ function Wm(i, t, e, n, s) { a.setTextStyle(o), a.drawText(t, n); } } -function Hm(i, t, e, n, s) { +function Um(i, t, e, n, s) { const r = e.getStroke(); if (r) { const a = i.getBuilder( @@ -10250,7 +10260,7 @@ function Hm(i, t, e, n, s) { a.setTextStyle(o), a.drawText(t, n); } } -function Xm(i, t, e, n, s) { +function Vm(i, t, e, n, s) { const r = e.getFill(), o = e.getStroke(); if (o || r) { const l = i.getBuilder(e.getZIndex(), "Polygon"); @@ -10265,11 +10275,11 @@ function Xm(i, t, e, n, s) { l.setTextStyle(a), l.drawText(t, n); } } -function Ym(i, t, e, n, s) { +function Wm(i, t, e, n, s) { const r = e.getImage(), o = e.getText(); let a; if (r) { - if (r.getImageState() != It.LOADED) + if (r.getImageState() != At.LOADED) return; let l = i; if (s) { @@ -10297,11 +10307,11 @@ function Ym(i, t, e, n, s) { h.setTextStyle(o, a), h.drawText(t, n); } } -function jm(i, t, e, n, s) { +function Hm(i, t, e, n, s) { const r = e.getImage(), o = e.getText(); let a; if (r) { - if (r.getImageState() != It.LOADED) + if (r.getImageState() != At.LOADED) return; let l = i; if (s) { @@ -10329,7 +10339,7 @@ function jm(i, t, e, n, s) { h.setTextStyle(o, a), h.drawText(t, n); } } -function Km(i, t, e, n, s) { +function Xm(i, t, e, n, s) { const r = e.getFill(), o = e.getStroke(); if (r || o) { const l = i.getBuilder(e.getZIndex(), "Polygon"); @@ -10344,22 +10354,22 @@ function Km(i, t, e, n, s) { l.setTextStyle(a), l.drawText(t, n); } } -class qm extends Md { +class Ym extends wd { constructor(t) { - super(t), this.boundHandleStyleImageChange_ = this.handleStyleImageChange_.bind(this), this.animatingOrInteracting_, this.hitDetectionImageData_ = null, this.renderedFeatures_ = null, this.renderedRevision_ = -1, this.renderedResolution_ = NaN, this.renderedExtent_ = ue(), this.wrappedRenderedExtent_ = ue(), this.renderedRotation_, this.renderedCenter_ = null, this.renderedProjection_ = null, this.renderedRenderOrder_ = null, this.replayGroup_ = null, this.replayGroupChanged = !0, this.declutterExecutorGroup = null, this.clipping = !0, this.compositionContext_ = null, this.opacity_ = 1; + super(t), this.boundHandleStyleImageChange_ = this.handleStyleImageChange_.bind(this), this.animatingOrInteracting_, this.hitDetectionImageData_ = null, this.renderedFeatures_ = null, this.renderedRevision_ = -1, this.renderedResolution_ = NaN, this.renderedExtent_ = fe(), this.wrappedRenderedExtent_ = fe(), this.renderedRotation_, this.renderedCenter_ = null, this.renderedProjection_ = null, this.renderedRenderOrder_ = null, this.replayGroup_ = null, this.replayGroupChanged = !0, this.declutterExecutorGroup = null, this.clipping = !0, this.compositionContext_ = null, this.opacity_ = 1; } renderWorlds(t, e, n) { - const s = e.extent, r = e.viewState, o = r.center, a = r.resolution, l = r.projection, h = r.rotation, c = l.getExtent(), u = this.getLayer().getSource(), d = e.pixelRatio, f = e.viewHints, g = !(f[Bt.ANIMATING] || f[Bt.INTERACTING]), m = this.compositionContext_, _ = Math.round(e.size[0] * d), y = Math.round(e.size[1] * d), p = u.getWrapX() && l.canWrapX(), v = p ? mt(c) : null, x = p ? Math.ceil((s[2] - c[2]) / v) + 1 : 1; - let M = p ? Math.floor((s[0] - c[0]) / v) : 0; + const s = e.extent, r = e.viewState, o = r.center, a = r.resolution, l = r.projection, h = r.rotation, c = l.getExtent(), u = this.getLayer().getSource(), d = e.pixelRatio, f = e.viewHints, g = !(f[Zt.ANIMATING] || f[Zt.INTERACTING]), m = this.compositionContext_, p = Math.round(e.size[0] * d), _ = Math.round(e.size[1] * d), y = u.getWrapX() && l.canWrapX(), v = y ? mt(c) : null, x = y ? Math.ceil((s[2] - c[2]) / v) + 1 : 1; + let C = y ? Math.floor((s[0] - c[0]) / v) : 0; do { const E = this.getRenderTransform( o, a, h, d, + p, _, - y, - M * v + C * v ); t.execute( m, @@ -10370,14 +10380,14 @@ class qm extends Md { void 0, n ); - } while (++M < x); + } while (++C < x); } setupCompositionContext_() { if (this.opacity_ !== 1) { - const t = de( + const t = ge( this.context.canvas.width, this.context.canvas.height, - Uh + Xh ); this.compositionContext_ = t; } else @@ -10386,7 +10396,7 @@ class qm extends Md { releaseCompositionContext_() { if (this.opacity_ !== 1) { const t = this.context.globalAlpha; - this.context.globalAlpha = this.opacity_, this.context.drawImage(this.compositionContext_.canvas, 0, 0), this.context.globalAlpha = t, Gu(this.compositionContext_), Uh.push(this.compositionContext_.canvas), this.compositionContext_ = null; + this.context.globalAlpha = this.opacity_, this.context.drawImage(this.compositionContext_.canvas, 0, 0), this.context.globalAlpha = t, Bu(this.compositionContext_), Xh.push(this.compositionContext_.canvas), this.compositionContext_ = null; } } renderDeclutter(t) { @@ -10398,8 +10408,8 @@ class qm extends Md { } renderFrame(t, e) { const n = t.pixelRatio, s = t.layerStatesArray[t.layerIndex]; - y0(this.pixelTransform, 1 / n, 1 / n), Xa(this.inversePixelTransform, this.pixelTransform); - const r = xu(this.pixelTransform); + m0(this.pixelTransform, 1 / n, 1 / n), Ja(this.inversePixelTransform, this.pixelTransform); + const r = Mu(this.pixelTransform); this.useContainer(e, r, this.getBackground(t)); const o = this.context, a = o.canvas, l = this.replayGroup_, h = this.declutterExecutorGroup; if ((!l || l.isEmpty()) && (!h || h.isEmpty())) @@ -10410,8 +10420,8 @@ class qm extends Md { d.projection, this.opacity_ = s.opacity, this.setupCompositionContext_(); let f = !1, g = !0; if (s.extent && this.clipping) { - const m = Pi(s.extent); - g = Qt(m, t.extent), f = g && !Ii(m, t.extent), f && this.clipUnrotated(this.compositionContext_, t, m); + const m = Bi(s.extent); + g = ie(m, t.extent), f = g && !xi(m, t.extent), f && this.clipUnrotated(this.compositionContext_, t, m); } return g && this.renderWorlds(l, t), f && this.compositionContext_.restore(), this.releaseCompositionContext_(), this.postRender(o, t), this.renderedRotation_ !== d.rotation && (this.renderedRotation_ = d.rotation, this.hitDetectionImageData_ = null), this.container; } @@ -10420,50 +10430,50 @@ class qm extends Md { function(e) { if (!this.hitDetectionImageData_ && !this.animatingOrInteracting_) { const n = [this.context.canvas.width, this.context.canvas.height]; - Ft(this.pixelTransform, n); - const s = this.renderedCenter_, r = this.renderedResolution_, o = this.renderedRotation_, a = this.renderedProjection_, l = this.wrappedRenderedExtent_, h = this.getLayer(), c = [], u = n[0] * Le, d = n[1] * Le; + Dt(this.pixelTransform, n); + const s = this.renderedCenter_, r = this.renderedResolution_, o = this.renderedRotation_, a = this.renderedProjection_, l = this.wrappedRenderedExtent_, h = this.getLayer(), c = [], u = n[0] * Pe, d = n[1] * Pe; c.push( this.getRenderTransform( s, r, o, - Le, + Pe, u, d, 0 ).slice() ); const f = h.getSource(), g = a.getExtent(); - if (f.getWrapX() && a.canWrapX() && !Ii(g, l)) { + if (f.getWrapX() && a.canWrapX() && !xi(g, l)) { let m = l[0]; - const _ = mt(g); - let y = 0, p; + const p = mt(g); + let _ = 0, y; for (; m < g[0]; ) - --y, p = _ * y, c.push( + --_, y = p * _, c.push( this.getRenderTransform( s, r, o, - Le, + Pe, u, d, - p + y ).slice() - ), m += _; - for (y = 0, m = l[2]; m > g[2]; ) - ++y, p = _ * y, c.push( + ), m += p; + for (_ = 0, m = l[2]; m > g[2]; ) + ++_, y = p * _, c.push( this.getRenderTransform( s, r, o, - Le, + Pe, u, d, - p + y ).slice() - ), m -= _; + ), m -= p; } - this.hitDetectionImageData_ = km( + this.hitDetectionImageData_ = Fm( n, c, this.renderedFeatures_, @@ -10474,7 +10484,7 @@ class qm extends Md { ); } e( - Gm(t, this.renderedFeatures_, this.hitDetectionImageData_) + Dm(t, this.renderedFeatures_, this.hitDetectionImageData_) ); }.bind(this) ); @@ -10483,18 +10493,18 @@ class qm extends Md { if (!this.replayGroup_) return; const o = e.viewState.resolution, a = e.viewState.rotation, l = this.getLayer(), h = {}, c = function(f, g, m) { - const _ = rt(f), y = h[_]; - if (y) { - if (y !== !0 && m < y.distanceSq) { + const p = rt(f), _ = h[p]; + if (_) { + if (_ !== !0 && m < _.distanceSq) { if (m === 0) - return h[_] = !0, r.splice(r.lastIndexOf(y), 1), s(f, l, g); - y.geometry = g, y.distanceSq = m; + return h[p] = !0, r.splice(r.lastIndexOf(_), 1), s(f, l, g); + _.geometry = g, _.distanceSq = m; } } else { if (m === 0) - return h[_] = !0, s(f, l, g); + return h[p] = !0, s(f, l, g); r.push( - h[_] = { + h[p] = { feature: f, layer: l, geometry: g, @@ -10526,89 +10536,89 @@ class qm extends Md { const e = this.getLayer(), n = e.getSource(); if (!n) return !1; - const s = t.viewHints[Bt.ANIMATING], r = t.viewHints[Bt.INTERACTING], o = e.getUpdateWhileAnimating(), a = e.getUpdateWhileInteracting(); + const s = t.viewHints[Zt.ANIMATING], r = t.viewHints[Zt.INTERACTING], o = e.getUpdateWhileAnimating(), a = e.getUpdateWhileInteracting(); if (this.ready && !o && s || !a && r) return this.animatingOrInteracting_ = !0, !0; this.animatingOrInteracting_ = !1; const l = t.extent, h = t.viewState, c = h.projection, u = h.resolution, d = t.pixelRatio, f = e.getRevision(), g = e.getRenderBuffer(); let m = e.getRenderOrder(); - m === void 0 && (m = Bm); - const _ = h.center.slice(), y = oo( + m === void 0 && (m = Gm); + const p = h.center.slice(), _ = fo( l, g * u - ), p = y.slice(), v = [y.slice()], x = c.getExtent(); - if (n.getWrapX() && c.canWrapX() && !Ii(x, t.extent)) { - const F = mt(x), k = Math.max(mt(y) / 2, F); - y[0] = x[0] - k, y[2] = x[2] + k, Nu(_, c); - const A = bu(v[0], c); - A[0] < x[0] && A[2] < x[2] ? v.push([ - A[0] + F, - A[1], - A[2] + F, - A[3] - ]) : A[0] > x[0] && A[2] > x[2] && v.push([ - A[0] - F, - A[1], - A[2] - F, - A[3] + ), y = _.slice(), v = [_.slice()], x = c.getExtent(); + if (n.getWrapX() && c.canWrapX() && !xi(x, t.extent)) { + const N = mt(x), D = Math.max(mt(_) / 2, N); + _[0] = x[0] - D, _[2] = x[2] + D, Du(p, c); + const I = Tu(v[0], c); + I[0] < x[0] && I[2] < x[2] ? v.push([ + I[0] + N, + I[1], + I[2] + N, + I[3] + ]) : I[0] > x[0] && I[2] > x[2] && v.push([ + I[0] - N, + I[1], + I[2] - N, + I[3] ]); } - if (this.ready && this.renderedResolution_ == u && this.renderedRevision_ == f && this.renderedRenderOrder_ == m && Ii(this.wrappedRenderedExtent_, y)) - return Ki(this.renderedExtent_, p) || (this.hitDetectionImageData_ = null, this.renderedExtent_ = p), this.renderedCenter_ = _, this.replayGroupChanged = !1, !0; + if (this.ready && this.renderedResolution_ == u && this.renderedRevision_ == f && this.renderedRenderOrder_ == m && xi(this.wrappedRenderedExtent_, _)) + return sn(this.renderedExtent_, y) || (this.hitDetectionImageData_ = null, this.renderedExtent_ = y), this.renderedCenter_ = p, this.replayGroupChanged = !1, !0; this.replayGroup_ = null; - const M = new Zh( - Ea(u, d), - y, + const C = new Hh( + La(u, d), + _, u, d ); let E; - this.getLayer().getDeclutter() && (E = new Zh( - Ea(u, d), - y, + this.getLayer().getDeclutter() && (E = new Hh( + La(u, d), + _, u, d )); - let R; - for (let F = 0, k = v.length; F < k; ++F) - n.loadFeatures(v[F], u, c); - const L = zm(u, d); - let N = !0; - const G = function(F) { - let k; - const A = F.getStyleFunction() || e.getStyleFunction(); - if (A && (k = A(F, u)), k) { - const tt = this.renderFeature( - F, - L, - k, - M, + let w; + for (let N = 0, D = v.length; N < D; ++N) + n.loadFeatures(v[N], u, c); + const R = bd(u, d); + let A = !0; + const k = function(N) { + let D; + const I = N.getStyleFunction() || e.getStyleFunction(); + if (I && (D = I(N, u)), D) { + const Q = this.renderFeature( + N, R, + D, + C, + w, E ); - N = N && !tt; + A = A && !Q; } - }.bind(this), U = Xu(y), T = n.getFeaturesInExtent(U); - m && T.sort(m); - for (let F = 0, k = T.length; F < k; ++F) - G(T[F]); - this.renderedFeatures_ = T, this.ready = N; - const $ = M.finish(), ft = new Hh( - y, + }.bind(this), Z = Ku(_), L = n.getFeaturesInExtent(Z); + m && L.sort(m); + for (let N = 0, D = L.length; N < D; ++N) + k(L[N]); + this.renderedFeatures_ = L, this.ready = A; + const G = C.finish(), dt = new Kh( + _, u, d, n.getOverlaps(), - $, + G, e.getRenderBuffer() ); - return E && (this.declutterExecutorGroup = new Hh( - y, + return E && (this.declutterExecutorGroup = new Kh( + _, u, d, n.getOverlaps(), E.finish(), e.getRenderBuffer() - )), this.renderedResolution_ = u, this.renderedRevision_ = f, this.renderedRenderOrder_ = m, this.renderedExtent_ = p, this.wrappedRenderedExtent_ = y, this.renderedCenter_ = _, this.renderedProjection_ = c, this.replayGroup_ = ft, this.hitDetectionImageData_ = null, this.replayGroupChanged = !0, !0; + )), this.renderedResolution_ = u, this.renderedRevision_ = f, this.renderedRenderOrder_ = m, this.renderedExtent_ = y, this.wrappedRenderedExtent_ = _, this.renderedCenter_ = p, this.renderedProjection_ = c, this.replayGroup_ = dt, this.hitDetectionImageData_ = null, this.replayGroupChanged = !0, !0; } renderFeature(t, e, n, s, r, o) { if (!n) @@ -10616,7 +10626,7 @@ class qm extends Md { let a = !1; if (Array.isArray(n)) for (let l = 0, h = n.length; l < h; ++l) - a = Xh( + a = qh( s, t, n[l], @@ -10626,7 +10636,7 @@ class qm extends Md { o ) || a; else - a = Xh( + a = qh( s, t, n, @@ -10638,19 +10648,19 @@ class qm extends Md { return a; } } -const Jm = qm; -class Qm extends dm { +const jm = Ym; +class Km extends um { constructor(t) { super(t); } createRenderer() { - return new Jm(this); + return new jm(this); } } -const Vs = Qm; -class t2 { +const Vn = Km; +class qm { constructor(t) { - this.rbush_ = new yd(t), this.items_ = {}; + this.rbush_ = new Cd(t), this.items_ = {}; } insert(t, e) { const n = { @@ -10682,7 +10692,7 @@ class t2 { } update(t, e) { const n = this.items_[rt(e)], s = [n.minX, n.minY, n.maxX, n.maxY]; - ys(s, t) || (this.remove(e), this.insert(t, e)); + bs(s, t) || (this.remove(e), this.insert(t, e)); } getAll() { return this.rbush_.all().map(function(e) { @@ -10714,14 +10724,14 @@ class t2 { return n; } isEmpty() { - return An(this.items_); + return Gn(this.items_); } clear() { this.rbush_.clear(), this.items_ = {}; } getExtent(t) { const e = this.rbush_.toJSON(); - return ye(e.minX, e.minY, e.maxX, e.maxY, t); + return xe(e.minX, e.minY, e.maxX, e.maxY, t); } concat(t) { this.rbush_.load(t.rbush_.all()); @@ -10729,10 +10739,10 @@ class t2 { this.items_[e] = t.items_[e]; } } -const Yh = t2; -class e2 extends Se { +const Jh = qm; +class Jm extends Ce { constructor(t) { - super(), this.projection = J(t.projection), this.attributions_ = jh(t.attributions), this.attributionsCollapsible_ = t.attributionsCollapsible !== void 0 ? t.attributionsCollapsible : !0, this.loading = !1, this.state_ = t.state !== void 0 ? t.state : "ready", this.wrapX_ = t.wrapX !== void 0 ? t.wrapX : !1, this.interpolate_ = !!t.interpolate, this.viewResolver = null, this.viewRejector = null; + super(), this.projection = q(t.projection), this.attributions_ = Qh(t.attributions), this.attributionsCollapsible_ = t.attributionsCollapsible !== void 0 ? t.attributionsCollapsible : !0, this.loading = !1, this.state_ = t.state !== void 0 ? t.state : "ready", this.wrapX_ = t.wrapX !== void 0 ? t.wrapX : !1, this.interpolate_ = !!t.interpolate, this.viewResolver = null, this.viewRejector = null; const e = this; this.viewPromise_ = new Promise(function(n, s) { e.viewResolver = n, e.viewRejector = s; @@ -10748,7 +10758,7 @@ class e2 extends Se { return this.projection; } getResolutions() { - return W(); + return V(); } getView() { return this.viewPromise_; @@ -10766,20 +10776,20 @@ class e2 extends Se { this.changed(); } setAttributions(t) { - this.attributions_ = jh(t), this.changed(); + this.attributions_ = Qh(t), this.changed(); } setState(t) { this.state_ = t, this.changed(); } } -function jh(i) { +function Qh(i) { return i ? Array.isArray(i) ? function(t) { return i; } : typeof i == "function" ? i : function(t) { return [i]; } : null; } -const wd = e2, Me = { +const Td = Jm, we = { ADDFEATURE: "addfeature", CHANGEFEATURE: "changefeature", CLEAR: "clear", @@ -10788,20 +10798,20 @@ const wd = e2, Me = { FEATURESLOADEND: "featuresloadend", FEATURESLOADERROR: "featuresloaderror" }; -function Sd(i, t) { +function Id(i, t) { return [[-1 / 0, -1 / 0, 1 / 0, 1 / 0]]; } -function i2(i, t) { +function Qm(i, t) { return [i]; } -let n2 = !1; -function s2(i, t, e, n, s, r, o) { +let t2 = !1; +function e2(i, t, e, n, s, r, o) { const a = new XMLHttpRequest(); a.open( "GET", typeof i == "function" ? i(e, n, s) : i, !0 - ), t.getType() == "arraybuffer" && (a.responseType = "arraybuffer"), a.withCredentials = n2, a.onload = function(l) { + ), t.getType() == "arraybuffer" && (a.responseType = "arraybuffer"), a.withCredentials = t2, a.onload = function(l) { if (!a.status || a.status >= 200 && a.status < 300) { const h = t.getType(); let c; @@ -10819,10 +10829,10 @@ function s2(i, t, e, n, s, r, o) { o(); }, a.onerror = o, a.send(); } -function Kh(i, t) { +function tc(i, t) { return function(e, n, s, r, o) { const a = this; - s2( + e2( i, t, e, @@ -10831,16 +10841,16 @@ function Kh(i, t) { function(l, h) { a.addFeatures(l), r !== void 0 && r(l); }, - o || Ui + o || qi ); }; } -class li extends ke { +class mi extends ze { constructor(t, e, n) { super(t), this.feature = e, this.features = n; } } -class r2 extends wd { +class i2 extends Td { constructor(t) { t = t || {}, super({ attributions: t.attributions, @@ -10848,14 +10858,14 @@ class r2 extends wd { projection: void 0, state: "ready", wrapX: t.wrapX !== void 0 ? t.wrapX : !0 - }), this.on, this.once, this.un, this.loader_ = Ui, this.format_ = t.format, this.overlaps_ = t.overlaps === void 0 ? !0 : t.overlaps, this.url_ = t.url, t.loader !== void 0 ? this.loader_ = t.loader : this.url_ !== void 0 && (Y(this.format_, 7), this.loader_ = Kh( + }), this.on, this.once, this.un, this.loader_ = qi, this.format_ = t.format, this.overlaps_ = t.overlaps === void 0 ? !0 : t.overlaps, this.url_ = t.url, t.loader !== void 0 ? this.loader_ = t.loader : this.url_ !== void 0 && (X(this.format_, 7), this.loader_ = tc( this.url_, this.format_ - )), this.strategy_ = t.strategy !== void 0 ? t.strategy : Sd; + )), this.strategy_ = t.strategy !== void 0 ? t.strategy : Id; const e = t.useSpatialIndex !== void 0 ? t.useSpatialIndex : !0; - this.featuresRtree_ = e ? new Yh() : null, this.loadedExtentsRtree_ = new Yh(), this.loadingExtentsCount_ = 0, this.nullGeometryFeatures_ = {}, this.idIndex_ = {}, this.uidIndex_ = {}, this.featureChangeKeys_ = {}, this.featuresCollection_ = null; + this.featuresRtree_ = e ? new Jh() : null, this.loadedExtentsRtree_ = new Jh(), this.loadingExtentsCount_ = 0, this.nullGeometryFeatures_ = {}, this.idIndex_ = {}, this.uidIndex_ = {}, this.featureChangeKeys_ = {}, this.featuresCollection_ = null; let n, s; - Array.isArray(t.features) ? s = t.features : t.features && (n = t.features, s = n.getArray()), !e && n === void 0 && (n = new Te(s)), s !== void 0 && this.addFeaturesInternal(s), n !== void 0 && this.bindFeaturesCollection_(n); + Array.isArray(t.features) ? s = t.features : t.features && (n = t.features, s = n.getArray()), !e && n === void 0 && (n = new Oe(s)), s !== void 0 && this.addFeaturesInternal(s), n !== void 0 && this.bindFeaturesCollection_(n); } addFeature(t) { this.addFeatureInternal(t), this.changed(); @@ -10874,15 +10884,15 @@ class r2 extends wd { } else this.nullGeometryFeatures_[e] = t; this.dispatchEvent( - new li(Me.ADDFEATURE, t) + new mi(we.ADDFEATURE, t) ); } setupChangeEvents_(t, e) { this.featureChangeKeys_[t] = [ - it(e, X.CHANGE, this.handleFeatureChange_, this), - it( + et(e, H.CHANGE, this.handleFeatureChange_, this), + et( e, - In.PROPERTYCHANGE, + kn.PROPERTYCHANGE, this.handleFeatureChange_, this ) @@ -10891,7 +10901,7 @@ class r2 extends wd { addToIndex_(t, e) { let n = !0; const s = e.getId(); - return s !== void 0 && (s.toString() in this.idIndex_ ? n = !1 : this.idIndex_[s.toString()] = e), n && (Y(!(t in this.uidIndex_), 30), this.uidIndex_[t] = e), n; + return s !== void 0 && (s.toString() in this.idIndex_ ? n = !1 : this.idIndex_[s.toString()] = e), n && (X(!(t in this.uidIndex_), 30), this.uidIndex_[t] = e), n; } addFeatures(t) { this.addFeaturesInternal(t), this.changed(); @@ -10912,31 +10922,31 @@ class r2 extends wd { } else this.nullGeometryFeatures_[l] = a; } - if (this.featuresRtree_ && this.featuresRtree_.load(e, s), this.hasListener(Me.ADDFEATURE)) + if (this.featuresRtree_ && this.featuresRtree_.load(e, s), this.hasListener(we.ADDFEATURE)) for (let r = 0, o = n.length; r < o; r++) this.dispatchEvent( - new li(Me.ADDFEATURE, n[r]) + new mi(we.ADDFEATURE, n[r]) ); } bindFeaturesCollection_(t) { let e = !1; this.addEventListener( - Me.ADDFEATURE, + we.ADDFEATURE, function(n) { e || (e = !0, t.push(n.feature), e = !1); } ), this.addEventListener( - Me.REMOVEFEATURE, + we.REMOVEFEATURE, function(n) { e || (e = !0, t.remove(n.feature), e = !1); } ), t.addEventListener( - Jt.ADD, + ee.ADD, function(n) { e || (e = !0, this.addFeature(n.element), e = !1); }.bind(this) ), t.addEventListener( - Jt.REMOVE, + ee.REMOVE, function(n) { e || (e = !0, this.removeFeature(n.element), e = !1); }.bind(this) @@ -10956,7 +10966,7 @@ class r2 extends wd { this.removeFeatureInternal(this.nullGeometryFeatures_[s]); } this.featuresCollection_ && this.featuresCollection_.clear(), this.featuresRtree_ && this.featuresRtree_.clear(), this.nullGeometryFeatures_ = {}; - const e = new li(Me.CLEAR); + const e = new mi(we.CLEAR); this.dispatchEvent(e), this.changed(); } forEachFeature(t) { @@ -10993,7 +11003,7 @@ class r2 extends wd { } getFeatures() { let t; - return this.featuresCollection_ ? t = this.featuresCollection_.getArray().slice(0) : this.featuresRtree_ && (t = this.featuresRtree_.getAll(), An(this.nullGeometryFeatures_) || Ht(t, Object.values(this.nullGeometryFeatures_))), t; + return this.featuresCollection_ ? t = this.featuresCollection_.getArray().slice(0) : this.featuresRtree_ && (t = this.featuresRtree_.getAll(), Gn(this.nullGeometryFeatures_) || Kt(t, Object.values(this.nullGeometryFeatures_))), t; } getFeaturesAtCoordinate(t) { const e = []; @@ -11005,7 +11015,7 @@ class r2 extends wd { if (this.featuresRtree_) { if (!(e && e.canWrapX() && this.getWrapX())) return this.featuresRtree_.getInExtent(t); - const s = R0(t, e); + const s = E0(t, e); return [].concat( ...s.map((r) => this.featuresRtree_.getInExtent(r)) ); @@ -11018,7 +11028,7 @@ class r2 extends wd { const o = [NaN, NaN]; let a = 1 / 0; const l = [-1 / 0, -1 / 0, 1 / 0, 1 / 0]; - return e = e || ps, this.featuresRtree_.forEachInExtent( + return e = e || Rs, this.featuresRtree_.forEachInExtent( l, function(h) { if (e(h)) { @@ -11072,7 +11082,7 @@ class r2 extends wd { } else this.removeFromIdIndex_(e), this.uidIndex_[n] = e; this.changed(), this.dispatchEvent( - new li(Me.CHANGEFEATURE, e) + new mi(we.CHANGEFEATURE, e) ); } hasFeature(t) { @@ -11080,7 +11090,7 @@ class r2 extends wd { return e !== void 0 ? e in this.idIndex_ : rt(t) in this.uidIndex_; } isEmpty() { - return this.featuresRtree_ ? this.featuresRtree_.isEmpty() && An(this.nullGeometryFeatures_) : this.featuresCollection_ ? this.featuresCollection_.getLength() === 0 : !0; + return this.featuresRtree_ ? this.featuresRtree_.isEmpty() && Gn(this.nullGeometryFeatures_) : this.featuresCollection_ ? this.featuresCollection_.getLength() === 0 : !0; } loadFeatures(t, e, n) { const s = this.loadedExtentsRtree_, r = this.strategy_(t, e, n); @@ -11089,10 +11099,10 @@ class r2 extends wd { s.forEachInExtent( l, function(c) { - return Ii(c.extent, l); + return xi(c.extent, l); } ) || (++this.loadingExtentsCount_, this.dispatchEvent( - new li(Me.FEATURESLOADSTART) + new mi(we.FEATURESLOADSTART) ), this.loader_.call( this, l, @@ -11100,8 +11110,8 @@ class r2 extends wd { n, function(c) { --this.loadingExtentsCount_, this.dispatchEvent( - new li( - Me.FEATURESLOADEND, + new mi( + we.FEATURESLOADEND, void 0, c ) @@ -11109,7 +11119,7 @@ class r2 extends wd { }.bind(this), function() { --this.loadingExtentsCount_, this.dispatchEvent( - new li(Me.FEATURESLOADERROR) + new mi(we.FEATURESLOADERROR) ); }.bind(this) ), s.insert(l, { extent: l.slice() })); @@ -11123,7 +11133,7 @@ class r2 extends wd { const e = this.loadedExtentsRtree_; let n; e.forEachInExtent(t, function(s) { - if (ys(s.extent, t)) + if (bs(s.extent, t)) return n = s, !0; }), n && e.remove(n); } @@ -11140,7 +11150,7 @@ class r2 extends wd { n.forEach(pt), delete this.featureChangeKeys_[e]; const s = t.getId(); return s !== void 0 && delete this.idIndex_[s.toString()], delete this.uidIndex_[e], this.dispatchEvent( - new li(Me.REMOVEFEATURE, t) + new mi(we.REMOVEFEATURE, t) ), t; } removeFromIdIndex_(t) { @@ -11156,19 +11166,40 @@ class r2 extends wd { this.loader_ = t; } setUrl(t) { - Y(this.format_, 7), this.url_ = t, this.setLoader(Kh(t, this.format_)); - } + X(this.format_, 7), this.url_ = t, this.setLoader(tc(t, this.format_)); + } +} +const Qn = i2; +function n2(i) { + if (!(i.context instanceof CanvasRenderingContext2D)) + throw new Error("Only works for render events from Canvas 2D layers"); + const t = i.inversePixelTransform[0], e = i.frameState, n = d0( + i.inversePixelTransform.slice(), + e.coordinateToPixelTransform + ), s = bd( + e.viewState.resolution, + t + ); + let r; + return new Sd( + i.context, + t, + e.extent, + n, + e.viewState.rotation, + s, + r + ); } -const Ws = r2; -class o2 extends so { +class s2 extends co { constructor(t, e, n) { super(), n = n || {}, this.tileCoord = t, this.state = e, this.interimTile = null, this.key = "", this.transition_ = n.transition === void 0 ? 250 : n.transition, this.transitionStarts_ = {}, this.interpolate = !!n.interpolate; } changed() { - this.dispatchEvent(X.CHANGE); + this.dispatchEvent(H.CHANGE); } release() { - this.state === z.ERROR && this.setState(z.EMPTY); + this.state === B.ERROR && this.setState(B.EMPTY); } getKey() { return this.key + "/" + this.tileCoord; @@ -11178,7 +11209,7 @@ class o2 extends so { return this; let t = this.interimTile; do { - if (t.getState() == z.LOADED) + if (t.getState() == B.LOADED) return this.transition_ = 0, t; t = t.interimTile; } while (t); @@ -11189,11 +11220,11 @@ class o2 extends so { return; let t = this.interimTile, e = this; do { - if (t.getState() == z.LOADED) { + if (t.getState() == B.LOADED) { t.interimTile = null; break; } else - t.getState() == z.LOADING ? e = t : t.getState() == z.IDLE ? e.interimTile = t.interimTile : e = t; + t.getState() == B.LOADING ? e = t : t.getState() == B.IDLE ? e.interimTile = t.interimTile : e = t; t = e.interimTile; } while (t); } @@ -11204,12 +11235,12 @@ class o2 extends so { return this.state; } setState(t) { - if (this.state !== z.ERROR && this.state > t) + if (this.state !== B.ERROR && this.state > t) throw new Error("Tile load sequence violation"); this.state = t, this.changed(); } load() { - W(); + V(); } getAlpha(t, e) { if (!this.transition_) @@ -11220,7 +11251,7 @@ class o2 extends so { else if (n === -1) return 1; const s = e - n + 1e3 / 60; - return s >= this.transition_ ? 1 : Yu(s / this.transition_); + return s >= this.transition_ ? 1 : qu(s / this.transition_); } inTransition(t) { return this.transition_ ? this.transitionStarts_[t] !== -1 : !1; @@ -11229,8 +11260,8 @@ class o2 extends so { this.transition_ && (this.transitionStarts_[t] = -1); } } -const Rd = o2; -class a2 extends Rd { +const Ad = s2; +class r2 extends Ad { constructor(t, e, n, s, r, o) { super(t, e, o), this.crossOrigin_ = s, this.src_ = n, this.key = n, this.image_ = new Image(), s !== null && (this.image_.crossOrigin = s), this.unlisten_ = null, this.tileLoadFunction_ = r; } @@ -11238,17 +11269,17 @@ class a2 extends Rd { return this.image_; } setImage(t) { - this.image_ = t, this.state = z.LOADED, this.unlistenImage_(), this.changed(); + this.image_ = t, this.state = B.LOADED, this.unlistenImage_(), this.changed(); } handleImageError_() { - this.state = z.ERROR, this.unlistenImage_(), this.image_ = l2(), this.changed(); + this.state = B.ERROR, this.unlistenImage_(), this.image_ = o2(), this.changed(); } handleImageLoad_() { const t = this.image_; - t.naturalWidth && t.naturalHeight ? this.state = z.LOADED : this.state = z.EMPTY, this.unlistenImage_(), this.changed(); + t.naturalWidth && t.naturalHeight ? this.state = B.LOADED : this.state = B.EMPTY, this.unlistenImage_(), this.changed(); } load() { - this.state == z.ERROR && (this.state = z.IDLE, this.image_ = new Image(), this.crossOrigin_ !== null && (this.image_.crossOrigin = this.crossOrigin_)), this.state == z.IDLE && (this.state = z.LOADING, this.changed(), this.tileLoadFunction_(this, this.src_), this.unlisten_ = vd( + this.state == B.ERROR && (this.state = B.IDLE, this.image_ = new Image(), this.crossOrigin_ !== null && (this.image_.crossOrigin = this.crossOrigin_)), this.state == B.IDLE && (this.state = B.LOADING, this.changed(), this.tileLoadFunction_(this, this.src_), this.unlisten_ = Md( this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this) @@ -11258,11 +11289,146 @@ class a2 extends Rd { this.unlisten_ && (this.unlisten_(), this.unlisten_ = null); } } -function l2() { - const i = de(1, 1); +function o2() { + const i = ge(1, 1); return i.fillStyle = "rgba(0,0,0,0)", i.fillRect(0, 0, 1, 1), i.canvas; } -const bd = a2; +const Pd = r2, zt = { + ELEMENT: "element", + MAP: "map", + OFFSET: "offset", + POSITION: "position", + POSITIONING: "positioning" +}; +class a2 extends Ce { + constructor(t) { + super(), this.on, this.once, this.un, this.options = t, this.id = t.id, this.insertFirst = t.insertFirst !== void 0 ? t.insertFirst : !0, this.stopEvent = t.stopEvent !== void 0 ? t.stopEvent : !0, this.element = document.createElement("div"), this.element.className = t.className !== void 0 ? t.className : "ol-overlay-container " + G0, this.element.style.position = "absolute", this.element.style.pointerEvents = "auto", this.autoPan = t.autoPan === !0 ? {} : t.autoPan || void 0, this.rendered = { + transform_: "", + visible: !0 + }, this.mapPostrenderListenerKey = null, this.addChangeListener(zt.ELEMENT, this.handleElementChanged), this.addChangeListener(zt.MAP, this.handleMapChanged), this.addChangeListener(zt.OFFSET, this.handleOffsetChanged), this.addChangeListener(zt.POSITION, this.handlePositionChanged), this.addChangeListener(zt.POSITIONING, this.handlePositioningChanged), t.element !== void 0 && this.setElement(t.element), this.setOffset(t.offset !== void 0 ? t.offset : [0, 0]), this.setPositioning(t.positioning || "top-left"), t.position !== void 0 && this.setPosition(t.position); + } + getElement() { + return this.get(zt.ELEMENT); + } + getId() { + return this.id; + } + getMap() { + return this.get(zt.MAP) || null; + } + getOffset() { + return this.get(zt.OFFSET); + } + getPosition() { + return this.get(zt.POSITION); + } + getPositioning() { + return this.get(zt.POSITIONING); + } + handleElementChanged() { + zu(this.element); + const t = this.getElement(); + t && this.element.appendChild(t); + } + handleMapChanged() { + this.mapPostrenderListenerKey && (Ur(this.element), pt(this.mapPostrenderListenerKey), this.mapPostrenderListenerKey = null); + const t = this.getMap(); + if (t) { + this.mapPostrenderListenerKey = et( + t, + Qe.POSTRENDER, + this.render, + this + ), this.updatePixelPosition(); + const e = this.stopEvent ? t.getOverlayContainerStopEvent() : t.getOverlayContainer(); + this.insertFirst ? e.insertBefore(this.element, e.childNodes[0] || null) : e.appendChild(this.element), this.performAutoPan(); + } + } + render() { + this.updatePixelPosition(); + } + handleOffsetChanged() { + this.updatePixelPosition(); + } + handlePositionChanged() { + this.updatePixelPosition(), this.performAutoPan(); + } + handlePositioningChanged() { + this.updatePixelPosition(); + } + setElement(t) { + this.set(zt.ELEMENT, t); + } + setMap(t) { + this.set(zt.MAP, t); + } + setOffset(t) { + this.set(zt.OFFSET, t); + } + setPosition(t) { + this.set(zt.POSITION, t); + } + performAutoPan() { + this.autoPan && this.panIntoView(this.autoPan); + } + panIntoView(t) { + const e = this.getMap(); + if (!e || !e.getTargetElement() || !this.get(zt.POSITION)) + return; + const n = this.getRect(e.getTargetElement(), e.getSize()), s = this.getElement(), r = this.getRect(s, [ + B0(s), + z0(s) + ]); + t = t || {}; + const o = t.margin === void 0 ? 20 : t.margin; + if (!xi(n, r)) { + const a = r[0] - n[0], l = n[2] - r[2], h = r[1] - n[1], c = n[3] - r[3], u = [0, 0]; + if (a < 0 ? u[0] = a - o : l < 0 && (u[0] = Math.abs(l) + o), h < 0 ? u[1] = h - o : c < 0 && (u[1] = Math.abs(c) + o), u[0] !== 0 || u[1] !== 0) { + const d = e.getView().getCenterInternal(), f = e.getPixelFromCoordinateInternal(d); + if (!f) + return; + const g = [f[0] + u[0], f[1] + u[1]], m = t.animation || {}; + e.getView().animateInternal({ + center: e.getCoordinateFromPixelInternal(g), + duration: m.duration, + easing: m.easing + }); + } + } + } + getRect(t, e) { + const n = t.getBoundingClientRect(), s = n.left + window.pageXOffset, r = n.top + window.pageYOffset; + return [s, r, s + e[0], r + e[1]]; + } + setPositioning(t) { + this.set(zt.POSITIONING, t); + } + setVisible(t) { + this.rendered.visible !== t && (this.element.style.display = t ? "" : "none", this.rendered.visible = t); + } + updatePixelPosition() { + const t = this.getMap(), e = this.getPosition(); + if (!t || !t.isRendered() || !e) { + this.setVisible(!1); + return; + } + const n = t.getPixelFromCoordinate(e), s = t.getSize(); + this.updateRenderedPosition(n, s); + } + updateRenderedPosition(t, e) { + const n = this.element.style, s = this.getOffset(), r = this.getPositioning(); + this.setVisible(!0); + const o = Math.round(t[0] + s[0]) + "px", a = Math.round(t[1] + s[1]) + "px"; + let l = "0%", h = "0%"; + r == "bottom-right" || r == "center-right" || r == "top-right" ? l = "-100%" : (r == "bottom-center" || r == "center-center" || r == "top-center") && (l = "-50%"), r == "bottom-left" || r == "bottom-center" || r == "bottom-right" ? h = "-100%" : (r == "center-left" || r == "center-center" || r == "center-right") && (h = "-50%"); + const c = `translate(${l}, ${h}) translate(${o}, ${a})`; + this.rendered.transform_ != c && (this.rendered.transform_ = c, n.transform = c); + } + getOptions() { + return this.options; + } +} +const l2 = a2; class h2 { constructor(t) { this.highWaterMark = t !== void 0 ? t : 2048, this.count_ = 0, this.entries_ = {}, this.oldest_ = null, this.newest_ = null; @@ -11287,11 +11453,11 @@ class h2 { } get(t, e) { const n = this.entries_[t]; - return Y(n !== void 0, 15), n === this.newest_ || (n === this.oldest_ ? (this.oldest_ = this.oldest_.newer, this.oldest_.older = null) : (n.newer.older = n.older, n.older.newer = n.newer), n.newer = null, n.older = this.newest_, this.newest_.newer = n, this.newest_ = n), n.value_; + return X(n !== void 0, 15), n === this.newest_ || (n === this.oldest_ ? (this.oldest_ = this.oldest_.newer, this.oldest_.older = null) : (n.newer.older = n.older, n.older.newer = n.newer), n.newer = null, n.older = this.newest_, this.newest_.newer = n, this.newest_ = n), n.value_; } remove(t) { const e = this.entries_[t]; - return Y(e !== void 0, 15), e === this.newest_ ? (this.newest_ = e.older, this.newest_ && (this.newest_.newer = null)) : e === this.oldest_ ? (this.oldest_ = e.newer, this.oldest_ && (this.oldest_.older = null)) : (e.newer.older = e.older, e.older.newer = e.newer), delete this.entries_[t], --this.count_, e.value_; + return X(e !== void 0, 15), e === this.newest_ ? (this.newest_ = e.older, this.newest_ && (this.newest_.newer = null)) : e === this.oldest_ ? (this.oldest_ = e.newer, this.oldest_ && (this.oldest_.older = null)) : (e.newer.older = e.older, e.older.newer = e.newer), delete this.entries_[t], --this.count_, e.value_; } getCount() { return this.count_; @@ -11331,7 +11497,7 @@ class h2 { this.get(t), this.entries_[t].value_ = e; } set(t, e) { - Y(!(t in this.entries_), 16); + X(!(t in this.entries_), 16); const n = { key_: t, newer: null, @@ -11345,14 +11511,14 @@ class h2 { } } const c2 = h2; -function qh(i, t, e, n) { +function ec(i, t, e, n) { return n !== void 0 ? (n[0] = i, n[1] = t, n[2] = e, n) : [i, t, e]; } -function vo(i, t, e) { +function So(i, t, e) { return i + "/" + t + "/" + e; } -function Ld(i) { - return vo(i[0], i[1], i[2]); +function Od(i) { + return So(i[0], i[1], i[2]); } function u2(i) { return i.split("/").map(Number); @@ -11383,13 +11549,13 @@ class g2 extends c2 { const t = this.peekFirstKey(), n = u2(t)[0]; this.forEach( function(s) { - s.tileCoord[0] !== n && (this.remove(Ld(s.tileCoord)), s.release()); + s.tileCoord[0] !== n && (this.remove(Od(s.tileCoord)), s.release()); }.bind(this) ); } } -const Td = g2; -class Id { +const Nd = g2; +class Fd { constructor(t, e, n, s) { this.minX = t, this.maxX = e, this.minY = n, this.maxY = s; } @@ -11421,18 +11587,18 @@ class Id { return this.minX <= t.maxX && this.maxX >= t.minX && this.minY <= t.maxY && this.maxY >= t.minY; } } -function un(i, t, e, n, s) { - return s !== void 0 ? (s.minX = i, s.maxX = t, s.minY = e, s.maxY = n, s) : new Id(i, t, e, n); +function _n(i, t, e, n, s) { + return s !== void 0 ? (s.minX = i, s.maxX = t, s.minY = e, s.maxY = n, s) : new Fd(i, t, e, n); } -const Ad = Id, Jh = [ +const Dd = Fd, ic = [ "fullscreenchange", "webkitfullscreenchange", "MSFullscreenChange" -], Qh = { +], nc = { ENTERFULLSCREEN: "enterfullscreen", LEAVEFULLSCREEN: "leavefullscreen" }; -class m2 extends Dt { +class m2 extends kt { constructor(t) { t = t || {}, super({ element: document.createElement("div"), @@ -11444,10 +11610,10 @@ class m2 extends Dt { this.labelActiveNode_ = typeof n == "string" ? document.createTextNode(n) : n; const s = t.tipLabel ? t.tipLabel : "Toggle full-screen"; this.button_ = document.createElement("button"), this.button_.title = s, this.button_.setAttribute("type", "button"), this.button_.appendChild(this.labelNode_), this.button_.addEventListener( - X.CLICK, + H.CLICK, this.handleClick_.bind(this), !1 - ), this.setClassName_(this.button_, this.isInFullscreen_), this.element.className = `${this.cssClassName_} ${Un} ${fo}`, this.element.appendChild(this.button_); + ), this.setClassName_(this.button_, this.isInFullscreen_), this.element.className = `${this.cssClassName_} ${qn} ${vo}`, this.element.appendChild(this.button_); } handleClick_(t) { t.preventDefault(), this.handleFullScreen_(); @@ -11457,12 +11623,12 @@ class m2 extends Dt { if (!t) return; const e = t.getOwnerDocument(); - if (!!tc(e)) - if (ec(e)) - p2(e); + if (!!sc(e)) + if (rc(e)) + _2(e); else { let n; - this.source_ ? n = typeof this.source_ == "string" ? e.getElementById(this.source_) : this.source_ : n = t.getTargetElement(), this.keys_ ? _2(n) : Pd(n); + this.source_ ? n = typeof this.source_ == "string" ? e.getElementById(this.source_) : this.source_ : n = t.getTargetElement(), this.keys_ ? p2(n) : kd(n); } } handleFullScreenChange_() { @@ -11470,7 +11636,7 @@ class m2 extends Dt { if (!t) return; const e = this.isInFullscreen_; - this.isInFullscreen_ = ec(t.getOwnerDocument()), e !== this.isInFullscreen_ && (this.setClassName_(this.button_, this.isInFullscreen_), this.isInFullscreen_ ? (kr(this.labelActiveNode_, this.labelNode_), this.dispatchEvent(Qh.ENTERFULLSCREEN)) : (kr(this.labelNode_, this.labelActiveNode_), this.dispatchEvent(Qh.LEAVEFULLSCREEN)), t.updateSize()); + this.isInFullscreen_ = rc(t.getOwnerDocument()), e !== this.isInFullscreen_ && (this.setClassName_(this.button_, this.isInFullscreen_), this.isInFullscreen_ ? (Zr(this.labelActiveNode_, this.labelNode_), this.dispatchEvent(nc.ENTERFULLSCREEN)) : (Zr(this.labelNode_, this.labelActiveNode_), this.dispatchEvent(nc.LEAVEFULLSCREEN)), t.updateSize()); } setClassName_(t, e) { e ? (t.classList.remove(...this.inactiveClassName_), t.classList.add(...this.activeClassName_)) : (t.classList.remove(...this.activeClassName_), t.classList.add(...this.inactiveClassName_)); @@ -11478,10 +11644,10 @@ class m2 extends Dt { setMap(t) { const e = this.getMap(); e && e.removeChangeListener( - Ot.TARGET, + Nt.TARGET, this.boundHandleMapTargetChange_ ), super.setMap(t), this.handleMapTargetChange_(), t && t.addChangeListener( - Ot.TARGET, + Nt.TARGET, this.boundHandleMapTargetChange_ ); } @@ -11493,33 +11659,33 @@ class m2 extends Dt { const e = this.getMap(); if (e) { const n = e.getOwnerDocument(); - tc(n) ? this.element.classList.remove(_h) : this.element.classList.add(_h); - for (let s = 0, r = Jh.length; s < r; ++s) + sc(n) ? this.element.classList.remove(xh) : this.element.classList.add(xh); + for (let s = 0, r = ic.length; s < r; ++s) t.push( - it(n, Jh[s], this.handleFullScreenChange_, this) + et(n, ic[s], this.handleFullScreenChange_, this) ); this.handleFullScreenChange_(); } } } -function tc(i) { +function sc(i) { const t = i.body; return !!(t.webkitRequestFullscreen || t.requestFullscreen && i.fullscreenEnabled); } -function ec(i) { +function rc(i) { return !!(i.webkitIsFullScreen || i.fullscreenElement); } -function Pd(i) { +function kd(i) { i.requestFullscreen ? i.requestFullscreen() : i.webkitRequestFullscreen && i.webkitRequestFullscreen(); } -function _2(i) { - i.webkitRequestFullscreen ? i.webkitRequestFullscreen() : Pd(i); -} function p2(i) { + i.webkitRequestFullscreen ? i.webkitRequestFullscreen() : kd(i); +} +function _2(i) { i.exitFullscreen ? i.exitFullscreen() : i.webkitExitFullscreen && i.webkitExitFullscreen(); } -const y2 = m2, Yo = "units", v2 = [1, 2, 5], es = 25.4 / 0.28; -class x2 extends Dt { +const y2 = m2, ea = "units", v2 = [1, 2, 5], us = 25.4 / 0.28; +class x2 extends kt { constructor(t) { t = t || {}; const e = document.createElement("div"); @@ -11529,16 +11695,16 @@ class x2 extends Dt { target: t.target }), this.on, this.once, this.un; const n = t.className !== void 0 ? t.className : t.bar ? "ol-scale-bar" : "ol-scale-line"; - this.innerElement_ = document.createElement("div"), this.innerElement_.className = n + "-inner", this.element.className = n + " " + Un, this.element.appendChild(this.innerElement_), this.viewState_ = null, this.minWidth_ = t.minWidth !== void 0 ? t.minWidth : 64, this.maxWidth_ = t.maxWidth, this.renderedVisible_ = !1, this.renderedWidth_ = void 0, this.renderedHTML_ = "", this.addChangeListener(Yo, this.handleUnitsChanged_), this.setUnits(t.units || "metric"), this.scaleBar_ = t.bar || !1, this.scaleBarSteps_ = t.steps || 4, this.scaleBarText_ = t.text || !1, this.dpi_ = t.dpi || void 0; + this.innerElement_ = document.createElement("div"), this.innerElement_.className = n + "-inner", this.element.className = n + " " + qn, this.element.appendChild(this.innerElement_), this.viewState_ = null, this.minWidth_ = t.minWidth !== void 0 ? t.minWidth : 64, this.maxWidth_ = t.maxWidth, this.renderedVisible_ = !1, this.renderedWidth_ = void 0, this.renderedHTML_ = "", this.addChangeListener(ea, this.handleUnitsChanged_), this.setUnits(t.units || "metric"), this.scaleBar_ = t.bar || !1, this.scaleBarSteps_ = t.steps || 4, this.scaleBarText_ = t.text || !1, this.dpi_ = t.dpi || void 0; } getUnits() { - return this.get(Yo); + return this.get(ea); } handleUnitsChanged_() { this.updateElement_(); } setUnits(t) { - this.set(Yo, t); + this.set(ea, t); } setDpi(t) { this.dpi_ = t; @@ -11550,20 +11716,20 @@ class x2 extends Dt { return; } const e = t.center, n = t.projection, s = this.getUnits(), r = s == "degrees" ? "degrees" : "m"; - let o = Zr( + let o = Yr( n, t.resolution, e, r ); - const a = this.minWidth_ * (this.dpi_ || es) / es, l = this.maxWidth_ !== void 0 ? this.maxWidth_ * (this.dpi_ || es) / es : void 0; + const a = this.minWidth_ * (this.dpi_ || us) / us, l = this.maxWidth_ !== void 0 ? this.maxWidth_ * (this.dpi_ || us) / us : void 0; let h = a * o, c = ""; if (s == "degrees") { - const v = On.degrees; + const v = Bn.degrees; h *= v, h < v / 60 ? (c = "\u2033", o *= 3600) : h < v ? (c = "\u2032", o *= 60) : c = "\xB0"; } else - s == "imperial" ? h < 0.9144 ? (c = "in", o /= 0.0254) : h < 1609.344 ? (c = "ft", o /= 0.3048) : (c = "mi", o /= 1609.344) : s == "nautical" ? (o /= 1852, c = "NM") : s == "metric" ? h < 1e-3 ? (c = "\u03BCm", o *= 1e6) : h < 1 ? (c = "mm", o *= 1e3) : h < 1e3 ? c = "m" : (c = "km", o /= 1e3) : s == "us" ? h < 0.9144 ? (c = "in", o *= 39.37) : h < 1609.344 ? (c = "ft", o /= 0.30480061) : (c = "mi", o /= 1609.3472) : Y(!1, 33); - let u = 3 * Math.floor(Math.log(a * o) / Math.log(10)), d, f, g, m, _, y; + s == "imperial" ? h < 0.9144 ? (c = "in", o /= 0.0254) : h < 1609.344 ? (c = "ft", o /= 0.3048) : (c = "mi", o /= 1609.344) : s == "nautical" ? (o /= 1852, c = "NM") : s == "metric" ? h < 1e-3 ? (c = "\u03BCm", o *= 1e6) : h < 1 ? (c = "mm", o *= 1e3) : h < 1e3 ? c = "m" : (c = "km", o /= 1e3) : s == "us" ? h < 0.9144 ? (c = "in", o *= 39.37) : h < 1609.344 ? (c = "ft", o /= 0.30480061) : (c = "mi", o /= 1609.3472) : X(!1, 33); + let u = 3 * Math.floor(Math.log(a * o) / Math.log(10)), d, f, g, m, p, _; for (; ; ) { g = Math.floor(u / 3); const v = Math.pow(10, g); @@ -11572,14 +11738,14 @@ class x2 extends Dt { return; } if (l !== void 0 && f >= l) { - d = m, f = _, g = y; + d = m, f = p, g = _; break; } else if (f >= a) break; - m = d, _ = f, y = g, ++u; + m = d, p = f, _ = g, ++u; } - const p = this.scaleBar_ ? this.createScaleBar(f, d, c) : d.toFixed(g < 0 ? -g : 0) + " " + c; - this.renderedHTML_ != p && (this.innerElement_.innerHTML = p, this.renderedHTML_ = p), this.renderedWidth_ != f && (this.innerElement_.style.width = f + "px", this.renderedWidth_ = f), this.renderedVisible_ || (this.element.style.display = "", this.renderedVisible_ = !0); + const y = this.scaleBar_ ? this.createScaleBar(f, d, c) : d.toFixed(g < 0 ? -g : 0) + " " + c; + this.renderedHTML_ != y && (this.innerElement_.innerHTML = y, this.renderedHTML_ = y), this.renderedWidth_ != f && (this.innerElement_.style.width = f + "px", this.renderedWidth_ = f), this.renderedVisible_ || (this.element.style.display = "", this.renderedVisible_ = !0); } createScaleBar(t, e, n) { const s = this.getScaleForResolution(), r = s < 1 ? Math.round(1 / s).toLocaleString() + " : 1" : "1 : " + Math.round(s).toLocaleString(), o = this.scaleBarSteps_, a = t / o, l = [this.createMarker("absolute")]; @@ -11599,12 +11765,12 @@ class x2 extends Dt { return `
` + a + "
"; } getScaleForResolution() { - const t = Zr( + const t = Yr( this.viewState_.projection, this.viewState_.resolution, this.viewState_.center, "m" - ), e = this.dpi_ || es, n = 1e3 / 25.4; + ), e = this.dpi_ || us, n = 1e3 / 25.4; return t * n * e; } render(t) { @@ -11612,21 +11778,21 @@ class x2 extends Dt { e ? this.viewState_ = e.viewState : this.viewState_ = null, this.updateElement_(); } } -const M2 = x2, C2 = 0.5, E2 = 10, ic = 0.25; +const C2 = x2, M2 = 0.5, E2 = 10, oc = 0.25; class w2 { constructor(t, e, n, s, r, o) { this.sourceProj_ = t, this.targetProj_ = e; let a = {}; - const l = Ss(this.targetProj_, this.sourceProj_); - this.transformInv_ = function(p) { - const v = p[0] + "/" + p[1]; - return a[v] || (a[v] = l(p)), a[v]; + const l = Ns(this.targetProj_, this.sourceProj_); + this.transformInv_ = function(y) { + const v = y[0] + "/" + y[1]; + return a[v] || (a[v] = l(y)), a[v]; }, this.maxSourceExtent_ = s, this.errorThresholdSquared_ = r * r, this.triangles_ = [], this.wrapsXInSource_ = !1, this.canWrapXInSource_ = this.sourceProj_.canWrapX() && !!s && !!this.sourceProj_.getExtent() && mt(s) == mt(this.sourceProj_.getExtent()), this.sourceWorldWidth_ = this.sourceProj_.getExtent() ? mt(this.sourceProj_.getExtent()) : null, this.targetWorldWidth_ = this.targetProj_.getExtent() ? mt(this.targetProj_.getExtent()) : null; - const h = Ji(n), c = co(n), u = ho(n), d = lo(n), f = this.transformInv_(h), g = this.transformInv_(c), m = this.transformInv_(u), _ = this.transformInv_(d), y = E2 + (o ? Math.max( + const h = Pi(n), c = _o(n), u = po(n), d = mo(n), f = this.transformInv_(h), g = this.transformInv_(c), m = this.transformInv_(u), p = this.transformInv_(d), _ = E2 + (o ? Math.max( 0, Math.ceil( Math.log2( - oa(n) / (o * o * 256 * 256) + da(n) / (o * o * 256 * 256) ) ) ) : 0); @@ -11638,13 +11804,13 @@ class w2 { f, g, m, - _, - y + p, + _ ), this.wrapsXInSource_) { - let p = 1 / 0; - this.triangles_.forEach(function(v, x, M) { - p = Math.min( - p, + let y = 1 / 0; + this.triangles_.forEach(function(v, x, C) { + y = Math.min( + y, v.source[0][0], v.source[1][0], v.source[2][0] @@ -11655,14 +11821,14 @@ class w2 { v.source[0][0], v.source[1][0], v.source[2][0] - ) - p > this.sourceWorldWidth_ / 2) { + ) - y > this.sourceWorldWidth_ / 2) { const x = [ [v.source[0][0], v.source[0][1]], [v.source[1][0], v.source[1][1]], [v.source[2][0], v.source[2][1]] ]; - x[0][0] - p > this.sourceWorldWidth_ / 2 && (x[0][0] -= this.sourceWorldWidth_), x[1][0] - p > this.sourceWorldWidth_ / 2 && (x[1][0] -= this.sourceWorldWidth_), x[2][0] - p > this.sourceWorldWidth_ / 2 && (x[2][0] -= this.sourceWorldWidth_); - const M = Math.min( + x[0][0] - y > this.sourceWorldWidth_ / 2 && (x[0][0] -= this.sourceWorldWidth_), x[1][0] - y > this.sourceWorldWidth_ / 2 && (x[1][0] -= this.sourceWorldWidth_), x[2][0] - y > this.sourceWorldWidth_ / 2 && (x[2][0] -= this.sourceWorldWidth_); + const C = Math.min( x[0][0], x[1][0], x[2][0] @@ -11671,7 +11837,7 @@ class w2 { x[0][0], x[1][0], x[2][0] - ) - M < this.sourceWorldWidth_ / 2 && (v.source = x); + ) - C < this.sourceWorldWidth_ / 2 && (v.source = x); } }.bind(this) ); @@ -11685,16 +11851,16 @@ class w2 { }); } addQuad_(t, e, n, s, r, o, a, l, h) { - const c = sa([r, o, a, l]), u = this.sourceWorldWidth_ ? mt(c) / this.sourceWorldWidth_ : null, d = this.sourceWorldWidth_, f = this.sourceProj_.canWrapX() && u > 0.5 && u < 1; + const c = ca([r, o, a, l]), u = this.sourceWorldWidth_ ? mt(c) / this.sourceWorldWidth_ : null, d = this.sourceWorldWidth_, f = this.sourceProj_.canWrapX() && u > 0.5 && u < 1; let g = !1; if (h > 0) { if (this.targetProj_.isGlobal() && this.targetWorldWidth_) { - const _ = sa([t, e, n, s]); - g = mt(_) / this.targetWorldWidth_ > ic || g; + const p = ca([t, e, n, s]); + g = mt(p) / this.targetWorldWidth_ > oc || g; } - !f && this.sourceProj_.isGlobal() && u && (g = u > ic || g); + !f && this.sourceProj_.isGlobal() && u && (g = u > oc || g); } - if (!g && this.maxSourceExtent_ && isFinite(c[0]) && isFinite(c[1]) && isFinite(c[2]) && isFinite(c[3]) && !Qt(c, this.maxSourceExtent_)) + if (!g && this.maxSourceExtent_ && isFinite(c[0]) && isFinite(c[1]) && isFinite(c[2]) && isFinite(c[3]) && !ie(c, this.maxSourceExtent_)) return; let m = 0; if (!g && (!isFinite(r[0]) || !isFinite(r[1]) || !isFinite(o[0]) || !isFinite(o[1]) || !isFinite(a[0]) || !isFinite(a[1]) || !isFinite(l[0]) || !isFinite(l[1]))) { @@ -11705,54 +11871,54 @@ class w2 { } if (h > 0) { if (!g) { - const _ = [(t[0] + n[0]) / 2, (t[1] + n[1]) / 2], y = this.transformInv_(_); - let p; - f ? p = (Sn(r[0], d) + Sn(a[0], d)) / 2 - Sn(y[0], d) : p = (r[0] + a[0]) / 2 - y[0]; - const v = (r[1] + a[1]) / 2 - y[1]; - g = p * p + v * v > this.errorThresholdSquared_; + const p = [(t[0] + n[0]) / 2, (t[1] + n[1]) / 2], _ = this.transformInv_(p); + let y; + f ? y = (Pn(r[0], d) + Pn(a[0], d)) / 2 - Pn(_[0], d) : y = (r[0] + a[0]) / 2 - _[0]; + const v = (r[1] + a[1]) / 2 - _[1]; + g = y * y + v * v > this.errorThresholdSquared_; } if (g) { if (Math.abs(t[0] - n[0]) <= Math.abs(t[1] - n[1])) { - const _ = [(e[0] + n[0]) / 2, (e[1] + n[1]) / 2], y = this.transformInv_(_), p = [(s[0] + t[0]) / 2, (s[1] + t[1]) / 2], v = this.transformInv_(p); + const p = [(e[0] + n[0]) / 2, (e[1] + n[1]) / 2], _ = this.transformInv_(p), y = [(s[0] + t[0]) / 2, (s[1] + t[1]) / 2], v = this.transformInv_(y); this.addQuad_( t, e, - _, p, + y, r, o, - y, + _, v, h - 1 ), this.addQuad_( + y, p, - _, n, s, v, - y, + _, a, l, h - 1 ); } else { - const _ = [(t[0] + e[0]) / 2, (t[1] + e[1]) / 2], y = this.transformInv_(_), p = [(n[0] + s[0]) / 2, (n[1] + s[1]) / 2], v = this.transformInv_(p); + const p = [(t[0] + e[0]) / 2, (t[1] + e[1]) / 2], _ = this.transformInv_(p), y = [(n[0] + s[0]) / 2, (n[1] + s[1]) / 2], v = this.transformInv_(y); this.addQuad_( t, - _, p, + y, s, r, - y, + _, v, l, h - 1 ), this.addQuad_( - _, + p, e, n, - p, y, + _, o, a, v, @@ -11770,10 +11936,10 @@ class w2 { (m & 11) == 0 && this.addTriangle_(t, n, s, r, a, l), (m & 14) == 0 && this.addTriangle_(t, n, e, r, a, o), m && ((m & 13) == 0 && this.addTriangle_(e, s, t, o, l, r), (m & 7) == 0 && this.addTriangle_(e, s, n, o, l, a)); } calculateSourceExtent() { - const t = ue(); + const t = fe(); return this.triangles_.forEach(function(e, n, s) { const r = e.source; - hs(t, r[0]), hs(t, r[1]), hs(t, r[2]); + ys(t, r[0]), ys(t, r[1]), ys(t, r[2]); }), t; } getTriangles() { @@ -11781,26 +11947,26 @@ class w2 { } } const S2 = w2; -let jo; -const Od = []; -function nc(i, t, e, n, s) { +let ia; +const Gd = []; +function ac(i, t, e, n, s) { i.beginPath(), i.moveTo(0, 0), i.lineTo(t, e), i.lineTo(n, s), i.closePath(), i.save(), i.clip(), i.fillRect(0, 0, Math.max(t, n) + 1, Math.max(e, s)), i.restore(); } -function Ko(i, t) { +function na(i, t) { return Math.abs(i[t * 4] - 210) > 2 || Math.abs(i[t * 4 + 3] - 0.75 * 255) > 2; } function R2() { - if (jo === void 0) { + if (ia === void 0) { const i = document.createElement("canvas").getContext("2d"); - i.globalCompositeOperation = "lighter", i.fillStyle = "rgba(210, 0, 0, 0.75)", nc(i, 4, 5, 4, 0), nc(i, 4, 5, 0, 5); + i.globalCompositeOperation = "lighter", i.fillStyle = "rgba(210, 0, 0, 0.75)", ac(i, 4, 5, 4, 0), ac(i, 4, 5, 0, 5); const t = i.getImageData(0, 0, 3, 3).data; - jo = Ko(t, 0) || Ko(t, 4) || Ko(t, 8); + ia = na(t, 0) || na(t, 4) || na(t, 8); } - return jo; + return ia; } -function sc(i, t, e, n) { - const s = Wu(e, t, i); - let r = Zr( +function lc(i, t, e, n) { + const s = Yu(e, t, i); + let r = Yr( t, n, e @@ -11810,22 +11976,22 @@ function sc(i, t, e, n) { const a = i.getMetersPerUnit(); a !== void 0 && (r /= a); const l = i.getExtent(); - if (!l || ao(l, s)) { - const h = Zr(i, r, s) / r; + if (!l || go(l, s)) { + const h = Yr(i, r, s) / r; isFinite(h) && h > 0 && (r /= h); } return r; } function b2(i, t, e, n) { - const s = Mi(e); - let r = sc( + const s = Li(e); + let r = lc( i, t, s, n ); - return (!isFinite(r) || r <= 0) && Ru(e, function(o) { - return r = sc( + return (!isFinite(r) || r <= 0) && Lu(e, function(o) { + return r = lc( i, t, o, @@ -11834,10 +12000,10 @@ function b2(i, t, e, n) { }), r; } function L2(i, t, e, n, s, r, o, a, l, h, c, u) { - const d = de( + const d = ge( Math.round(e * i), Math.round(e * t), - Od + Gd ); if (u || (d.imageSmoothingEnabled = !1), l.length === 0) return d.canvas; @@ -11846,144 +12012,144 @@ function L2(i, t, e, n, s, r, o, a, l, h, c, u) { return Math.round(x * e) / e; } d.globalCompositeOperation = "lighter"; - const g = ue(); - l.forEach(function(x, M, E) { - wu(g, x.extent); + const g = fe(); + l.forEach(function(x, C, E) { + Ru(g, x.extent); }); - const m = mt(g), _ = Ne(g), y = de( + const m = mt(g), p = Ge(g), _ = ge( Math.round(e * m / n), - Math.round(e * _ / n) + Math.round(e * p / n) ); - u || (y.imageSmoothingEnabled = !1); - const p = e / n; - l.forEach(function(x, M, E) { - const R = x.extent[0] - g[0], L = -(x.extent[3] - g[3]), N = mt(x.extent), G = Ne(x.extent); - x.image.width > 0 && x.image.height > 0 && y.drawImage( + u || (_.imageSmoothingEnabled = !1); + const y = e / n; + l.forEach(function(x, C, E) { + const w = x.extent[0] - g[0], R = -(x.extent[3] - g[3]), A = mt(x.extent), k = Ge(x.extent); + x.image.width > 0 && x.image.height > 0 && _.drawImage( x.image, h, h, x.image.width - 2 * h, x.image.height - 2 * h, - R * p, - L * p, - N * p, - G * p + w * y, + R * y, + A * y, + k * y ); }); - const v = Ji(o); - return a.getTriangles().forEach(function(x, M, E) { - const R = x.source, L = x.target; - let N = R[0][0], G = R[0][1], U = R[1][0], T = R[1][1], $ = R[2][0], ft = R[2][1]; - const F = f((L[0][0] - v[0]) / r), k = f( - -(L[0][1] - v[1]) / r - ), A = f((L[1][0] - v[0]) / r), tt = f( - -(L[1][1] - v[1]) / r - ), Mt = f((L[2][0] - v[0]) / r), _t = f( - -(L[2][1] - v[1]) / r - ), Pt = N, b = G; - N = 0, G = 0, U -= Pt, T -= b, $ -= Pt, ft -= b; - const se = [ - [U, T, 0, 0, A - F], - [$, ft, 0, 0, Mt - F], - [0, 0, U, T, tt - k], - [0, 0, $, ft, _t - k] - ], lt = L0(se); - if (!!lt) { + const v = Pi(o); + return a.getTriangles().forEach(function(x, C, E) { + const w = x.source, R = x.target; + let A = w[0][0], k = w[0][1], Z = w[1][0], L = w[1][1], G = w[2][0], dt = w[2][1]; + const N = f((R[0][0] - v[0]) / r), D = f( + -(R[0][1] - v[1]) / r + ), I = f((R[1][0] - v[0]) / r), Q = f( + -(R[1][1] - v[1]) / r + ), Ct = f((R[2][0] - v[0]) / r), _t = f( + -(R[2][1] - v[1]) / r + ), Ot = A, b = k; + A = 0, k = 0, Z -= Ot, L -= b, G -= Ot, dt -= b; + const ae = [ + [Z, L, 0, 0, I - N], + [G, dt, 0, 0, Ct - N], + [0, 0, Z, L, Q - D], + [0, 0, G, dt, _t - D] + ], at = S0(ae); + if (!!at) { if (d.save(), d.beginPath(), R2() || !u) { - d.moveTo(A, tt); - const gt = 4, ii = F - A, Re = k - tt; - for (let Gt = 0; Gt < gt; Gt++) + d.moveTo(I, Q); + const ft = 4, hi = N - I, Ie = D - Q; + for (let $t = 0; $t < ft; $t++) d.lineTo( - A + f((Gt + 1) * ii / gt), - tt + f(Gt * Re / (gt - 1)) - ), Gt != gt - 1 && d.lineTo( - A + f((Gt + 1) * ii / gt), - tt + f((Gt + 1) * Re / (gt - 1)) + I + f(($t + 1) * hi / ft), + Q + f($t * Ie / (ft - 1)) + ), $t != ft - 1 && d.lineTo( + I + f(($t + 1) * hi / ft), + Q + f(($t + 1) * Ie / (ft - 1)) ); - d.lineTo(Mt, _t); + d.lineTo(Ct, _t); } else - d.moveTo(A, tt), d.lineTo(F, k), d.lineTo(Mt, _t); + d.moveTo(I, Q), d.lineTo(N, D), d.lineTo(Ct, _t); d.clip(), d.transform( - lt[0], - lt[2], - lt[1], - lt[3], - F, - k + at[0], + at[2], + at[1], + at[3], + N, + D ), d.translate( - g[0] - Pt, + g[0] - Ot, g[3] - b ), d.scale( n / e, -n / e - ), d.drawImage(y.canvas, 0, 0), d.restore(); + ), d.drawImage(_.canvas, 0, 0), d.restore(); } - }), c && (d.save(), d.globalCompositeOperation = "source-over", d.strokeStyle = "black", d.lineWidth = 1, a.getTriangles().forEach(function(x, M, E) { - const R = x.target, L = (R[0][0] - v[0]) / r, N = -(R[0][1] - v[1]) / r, G = (R[1][0] - v[0]) / r, U = -(R[1][1] - v[1]) / r, T = (R[2][0] - v[0]) / r, $ = -(R[2][1] - v[1]) / r; - d.beginPath(), d.moveTo(G, U), d.lineTo(L, N), d.lineTo(T, $), d.closePath(), d.stroke(); + }), c && (d.save(), d.globalCompositeOperation = "source-over", d.strokeStyle = "black", d.lineWidth = 1, a.getTriangles().forEach(function(x, C, E) { + const w = x.target, R = (w[0][0] - v[0]) / r, A = -(w[0][1] - v[1]) / r, k = (w[1][0] - v[0]) / r, Z = -(w[1][1] - v[1]) / r, L = (w[2][0] - v[0]) / r, G = -(w[2][1] - v[1]) / r; + d.beginPath(), d.moveTo(k, Z), d.lineTo(R, A), d.lineTo(L, G), d.closePath(), d.stroke(); }), d.restore()), d.canvas; } -class T2 extends Rd { +class T2 extends Ad { constructor(t, e, n, s, r, o, a, l, h, c, u, d) { - super(r, z.IDLE, { interpolate: !!d }), this.renderEdges_ = u !== void 0 ? u : !1, this.pixelRatio_ = a, this.gutter_ = l, this.canvas_ = null, this.sourceTileGrid_ = e, this.targetTileGrid_ = s, this.wrappedTileCoord_ = o || r, this.sourceTiles_ = [], this.sourcesListenerKeys_ = null, this.sourceZ_ = 0; + super(r, B.IDLE, { interpolate: !!d }), this.renderEdges_ = u !== void 0 ? u : !1, this.pixelRatio_ = a, this.gutter_ = l, this.canvas_ = null, this.sourceTileGrid_ = e, this.targetTileGrid_ = s, this.wrappedTileCoord_ = o || r, this.sourceTiles_ = [], this.sourcesListenerKeys_ = null, this.sourceZ_ = 0; const f = s.getTileCoordExtent( this.wrappedTileCoord_ ), g = this.targetTileGrid_.getExtent(); let m = this.sourceTileGrid_.getExtent(); - const _ = g ? cs(f, g) : f; - if (oa(_) === 0) { - this.state = z.EMPTY; + const p = g ? vs(f, g) : f; + if (da(p) === 0) { + this.state = B.EMPTY; return; } - const y = t.getExtent(); - y && (m ? m = cs(m, y) : m = y); - const p = s.getResolution( + const _ = t.getExtent(); + _ && (m ? m = vs(m, _) : m = _); + const y = s.getResolution( this.wrappedTileCoord_[0] ), v = b2( t, n, - _, - p + p, + y ); if (!isFinite(v) || v <= 0) { - this.state = z.EMPTY; + this.state = B.EMPTY; return; } - const x = c !== void 0 ? c : C2; + const x = c !== void 0 ? c : M2; if (this.triangulation_ = new S2( t, n, - _, + p, m, v * x, - p + y ), this.triangulation_.getTriangles().length === 0) { - this.state = z.EMPTY; + this.state = B.EMPTY; return; } this.sourceZ_ = e.getZForResolution(v); - let M = this.triangulation_.calculateSourceExtent(); - if (m && (t.canWrapX() ? (M[1] = wt( - M[1], + let C = this.triangulation_.calculateSourceExtent(); + if (m && (t.canWrapX() ? (C[1] = wt( + C[1], m[1], m[3] - ), M[3] = wt( - M[3], + ), C[3] = wt( + C[3], m[1], m[3] - )) : M = cs(M, m)), !oa(M)) - this.state = z.EMPTY; + )) : C = vs(C, m)), !da(C)) + this.state = B.EMPTY; else { const E = e.getTileRangeForExtentAndZ( - M, + C, this.sourceZ_ ); - for (let R = E.minX; R <= E.maxX; R++) - for (let L = E.minY; L <= E.maxY; L++) { - const N = h(this.sourceZ_, R, L, a); - N && this.sourceTiles_.push(N); + for (let w = E.minX; w <= E.maxX; w++) + for (let R = E.minY; R <= E.maxY; R++) { + const A = h(this.sourceZ_, w, R, a); + A && this.sourceTiles_.push(A); } - this.sourceTiles_.length === 0 && (this.state = z.EMPTY); + this.sourceTiles_.length === 0 && (this.state = B.EMPTY); } } getImage() { @@ -11993,13 +12159,13 @@ class T2 extends Rd { const t = []; if (this.sourceTiles_.forEach( function(e, n, s) { - e && e.getState() == z.LOADED && t.push({ + e && e.getState() == B.LOADED && t.push({ extent: this.sourceTileGrid_.getTileCoordExtent(e.tileCoord), image: e.getImage() }); }.bind(this) ), this.sourceTiles_.length = 0, t.length === 0) - this.state = z.ERROR; + this.state = B.ERROR; else { const e = this.wrappedTileCoord_[0], n = this.targetTileGrid_.getTileSize(e), s = typeof n == "number" ? n : n[0], r = typeof n == "number" ? n : n[1], o = this.targetTileGrid_.getResolution(e), a = this.sourceTileGrid_.getResolution( this.sourceZ_ @@ -12019,25 +12185,25 @@ class T2 extends Rd { this.gutter_, this.renderEdges_, this.interpolate - ), this.state = z.LOADED; + ), this.state = B.LOADED; } this.changed(); } load() { - if (this.state == z.IDLE) { - this.state = z.LOADING, this.changed(); + if (this.state == B.IDLE) { + this.state = B.LOADING, this.changed(); let t = 0; this.sourcesListenerKeys_ = [], this.sourceTiles_.forEach( function(e, n, s) { const r = e.getState(); - if (r == z.IDLE || r == z.LOADING) { + if (r == B.IDLE || r == B.LOADING) { t++; - const o = it( + const o = et( e, - X.CHANGE, + H.CHANGE, function(a) { const l = e.getState(); - (l == z.LOADED || l == z.ERROR || l == z.EMPTY) && (pt(o), t--, t === 0 && (this.unlistenSources_(), this.reproject_())); + (l == B.LOADED || l == B.ERROR || l == B.EMPTY) && (pt(o), t--, t === 0 && (this.unlistenSources_(), this.reproject_())); }, this ); @@ -12045,7 +12211,7 @@ class T2 extends Rd { } }.bind(this) ), t === 0 ? setTimeout(this.reproject_.bind(this), 0) : this.sourceTiles_.forEach(function(e, n, s) { - e.getState() == z.IDLE && e.load(); + e.getState() == B.IDLE && e.load(); }); } } @@ -12053,18 +12219,18 @@ class T2 extends Rd { this.sourcesListenerKeys_.forEach(pt), this.sourcesListenerKeys_ = null; } release() { - this.canvas_ && (Gu(this.canvas_.getContext("2d")), Od.push(this.canvas_), this.canvas_ = null), super.release(); + this.canvas_ && (Bu(this.canvas_.getContext("2d")), Gd.push(this.canvas_), this.canvas_ = null), super.release(); } } -const wa = T2, qo = { +const Ta = T2, sa = { TILELOADSTART: "tileloadstart", TILELOADEND: "tileloadend", TILELOADERROR: "tileloaderror" -}, I2 = [0, 0, 0], hi = 5; +}, I2 = [0, 0, 0], pi = 5; class A2 { constructor(t) { - this.minZoom = t.minZoom !== void 0 ? t.minZoom : 0, this.resolutions_ = t.resolutions, Y( - i0( + this.minZoom = t.minZoom !== void 0 ? t.minZoom : 0, this.resolutions_ = t.resolutions, X( + Jf( this.resolutions_, function(s, r) { return r - s; @@ -12083,16 +12249,16 @@ class A2 { break; } } - this.zoomFactor_ = e, this.maxZoom = this.resolutions_.length - 1, this.origin_ = t.origin !== void 0 ? t.origin : null, this.origins_ = null, t.origins !== void 0 && (this.origins_ = t.origins, Y(this.origins_.length == this.resolutions_.length, 20)); + this.zoomFactor_ = e, this.maxZoom = this.resolutions_.length - 1, this.origin_ = t.origin !== void 0 ? t.origin : null, this.origins_ = null, t.origins !== void 0 && (this.origins_ = t.origins, X(this.origins_.length == this.resolutions_.length, 20)); const n = t.extent; - n !== void 0 && !this.origin_ && !this.origins_ && (this.origin_ = Ji(n)), Y( + n !== void 0 && !this.origin_ && !this.origins_ && (this.origin_ = Pi(n)), X( !this.origin_ && this.origins_ || this.origin_ && !this.origins_, 18 - ), this.tileSizes_ = null, t.tileSizes !== void 0 && (this.tileSizes_ = t.tileSizes, Y(this.tileSizes_.length == this.resolutions_.length, 19)), this.tileSize_ = t.tileSize !== void 0 ? t.tileSize : this.tileSizes_ ? null : Qa, Y( + ), this.tileSizes_ = null, t.tileSizes !== void 0 && (this.tileSizes_ = t.tileSizes, X(this.tileSizes_.length == this.resolutions_.length, 19)), this.tileSize_ = t.tileSize !== void 0 ? t.tileSize : this.tileSizes_ ? null : sl, X( !this.tileSize_ && this.tileSizes_ || this.tileSize_ && !this.tileSizes_, 22 ), this.extent_ = n !== void 0 ? n : null, this.fullTileRanges_ = null, this.tmpSize_ = [0, 0], this.tmpExtent_ = [0, 0, 0, 0], t.sizes !== void 0 ? this.fullTileRanges_ = t.sizes.map(function(s, r) { - const o = new Ad( + const o = new Dd( Math.min(0, s[0]), Math.max(s[0] - 1, -1), Math.min(0, s[1]), @@ -12114,7 +12280,7 @@ class A2 { forEachTileCoordParentTileRange(t, e, n, s) { let r, o, a, l = null, h = t[0] - 1; for (this.zoomFactor_ === 2 ? (o = t[1], a = t[2]) : l = this.getTileCoordExtent(t, s); h >= this.minZoom; ) { - if (this.zoomFactor_ === 2 ? (o = Math.floor(o / 2), a = Math.floor(a / 2), r = un(o, o, a, a, n)) : r = this.getTileRangeForExtentAndZ( + if (this.zoomFactor_ === 2 ? (o = Math.floor(o / 2), a = Math.floor(a / 2), r = _n(o, o, a, a, n)) : r = this.getTileRangeForExtentAndZ( l, h, n @@ -12146,7 +12312,7 @@ class A2 { if (t[0] < this.maxZoom) { if (this.zoomFactor_ === 2) { const r = t[1] * 2, o = t[2] * 2; - return un( + return _n( r, r + 1, o, @@ -12171,7 +12337,7 @@ class A2 { return null; const s = t[0], r = t[1], o = t[2]; if (e === s) - return un( + return _n( r, o, r, @@ -12181,22 +12347,22 @@ class A2 { if (this.zoomFactor_) { const l = Math.pow(this.zoomFactor_, e - s), h = Math.floor(r * l), c = Math.floor(o * l); if (e < s) - return un(h, h, c, c, n); + return _n(h, h, c, c, n); const u = Math.floor(l * (r + 1)) - 1, d = Math.floor(l * (o + 1)) - 1; - return un(h, u, c, d, n); + return _n(h, u, c, d, n); } const a = this.getTileCoordExtent(t, this.tmpExtent_); return this.getTileRangeForExtentAndZ(a, e, n); } getTileRangeExtent(t, e, n) { - const s = this.getOrigin(t), r = this.getResolution(t), o = ae(this.getTileSize(t), this.tmpSize_), a = s[0] + e.minX * o[0] * r, l = s[0] + (e.maxX + 1) * o[0] * r, h = s[1] + e.minY * o[1] * r, c = s[1] + (e.maxY + 1) * o[1] * r; - return ye(a, h, l, c, n); + const s = this.getOrigin(t), r = this.getResolution(t), o = ce(this.getTileSize(t), this.tmpSize_), a = s[0] + e.minX * o[0] * r, l = s[0] + (e.maxX + 1) * o[0] * r, h = s[1] + e.minY * o[1] * r, c = s[1] + (e.maxY + 1) * o[1] * r; + return xe(a, h, l, c, n); } getTileRangeForExtentAndZ(t, e, n) { const s = I2; this.getTileCoordForXYAndZ_(t[0], t[3], e, !1, s); const r = s[1], o = s[2]; - return this.getTileCoordForXYAndZ_(t[2], t[1], e, !0, s), un( + return this.getTileCoordForXYAndZ_(t[2], t[1], e, !0, s), _n( r, s[1], o, @@ -12205,15 +12371,15 @@ class A2 { ); } getTileCoordCenter(t) { - const e = this.getOrigin(t[0]), n = this.getResolution(t[0]), s = ae(this.getTileSize(t[0]), this.tmpSize_); + const e = this.getOrigin(t[0]), n = this.getResolution(t[0]), s = ce(this.getTileSize(t[0]), this.tmpSize_); return [ e[0] + (t[1] + 0.5) * s[0] * n, e[1] - (t[2] + 0.5) * s[1] * n ]; } getTileCoordExtent(t, e) { - const n = this.getOrigin(t[0]), s = this.getResolution(t[0]), r = ae(this.getTileSize(t[0]), this.tmpSize_), o = n[0] + t[1] * r[0] * s, a = n[1] - (t[2] + 1) * r[1] * s, l = o + r[0] * s, h = a + r[1] * s; - return ye(o, a, l, h, e); + const n = this.getOrigin(t[0]), s = this.getResolution(t[0]), r = ce(this.getTileSize(t[0]), this.tmpSize_), o = n[0] + t[1] * r[0] * s, a = n[1] - (t[2] + 1) * r[1] * s, l = o + r[0] * s, h = a + r[1] * s; + return xe(o, a, l, h, e); } getTileCoordForCoordAndResolution(t, e, n) { return this.getTileCoordForXYAndResolution_( @@ -12225,14 +12391,14 @@ class A2 { ); } getTileCoordForXYAndResolution_(t, e, n, s, r) { - const o = this.getZForResolution(n), a = n / this.getResolution(o), l = this.getOrigin(o), h = ae(this.getTileSize(o), this.tmpSize_); + const o = this.getZForResolution(n), a = n / this.getResolution(o), l = this.getOrigin(o), h = ce(this.getTileSize(o), this.tmpSize_); let c = a * (t - l[0]) / n / h[0], u = a * (l[1] - e) / n / h[1]; - return s ? (c = ur(c, hi) - 1, u = ur(u, hi) - 1) : (c = cr(c, hi), u = cr(u, hi)), qh(o, c, u, r); + return s ? (c = mr(c, pi) - 1, u = mr(u, pi) - 1) : (c = gr(c, pi), u = gr(u, pi)), ec(o, c, u, r); } getTileCoordForXYAndZ_(t, e, n, s, r) { - const o = this.getOrigin(n), a = this.getResolution(n), l = ae(this.getTileSize(n), this.tmpSize_); + const o = this.getOrigin(n), a = this.getResolution(n), l = ce(this.getTileSize(n), this.tmpSize_); let h = (t - o[0]) / a / l[0], c = (o[1] - e) / a / l[1]; - return s ? (h = ur(h, hi) - 1, c = ur(c, hi) - 1) : (h = cr(h, hi), c = cr(c, hi)), qh(n, h, c, r); + return s ? (h = mr(h, pi) - 1, c = mr(c, pi) - 1) : (h = gr(h, pi), c = gr(c, pi)), ec(n, h, c, r); } getTileCoordForCoordAndZ(t, e, n) { return this.getTileCoordForXYAndZ_( @@ -12253,7 +12419,7 @@ class A2 { return this.fullTileRanges_ ? this.fullTileRanges_[t] : this.extent_ ? this.getTileRangeForExtentAndZ(this.extent_, t) : null; } getZForResolution(t, e) { - const n = Wa( + const n = Ka( this.resolutions_, t, e || 0 @@ -12261,7 +12427,7 @@ class A2 { return wt(n, this.minZoom, this.maxZoom); } tileCoordIntersectsViewport(t, e) { - return id( + return rd( e, 0, e.length, @@ -12276,14 +12442,14 @@ class A2 { this.fullTileRanges_ = n; } } -const Nd = A2; -function Fd(i) { +const $d = A2; +function Bd(i) { let t = i.getDefaultTileGrid(); return t || (t = F2(i), i.setDefaultTileGrid(t)), t; } function P2(i, t, e) { - const n = t[0], s = i.getTileCoordCenter(t), r = Dd(e); - if (ao(r, s)) + const n = t[0], s = i.getTileCoordCenter(t), r = zd(e); + if (go(r, s)) return t; { const o = mt(r), a = Math.ceil( @@ -12295,16 +12461,16 @@ function P2(i, t, e) { function O2(i, t, e, n) { n = n !== void 0 ? n : "top-left"; const s = N2(i, t, e); - return new Nd({ + return new $d({ extent: i, - origin: C0(i, n), + origin: v0(i, n), resolutions: s, tileSize: e }); } function N2(i, t, e, n) { - t = t !== void 0 ? t : og, e = ae(e !== void 0 ? e : Qa); - const s = Ne(i), r = mt(i); + t = t !== void 0 ? t : rg, e = ce(e !== void 0 ? e : sl); + const s = Ge(i), r = mt(i); n = n > 0 ? n : Math.max(r / e[0], s / e[1]); const o = t + 1, a = new Array(o); for (let l = 0; l < o; ++l) @@ -12312,19 +12478,19 @@ function N2(i, t, e, n) { return a; } function F2(i, t, e, n) { - const s = Dd(i); + const s = zd(i); return O2(s, t, e, n); } -function Dd(i) { - i = J(i); +function zd(i) { + i = q(i); let t = i.getExtent(); if (!t) { - const e = 180 * On.degrees / i.getMetersPerUnit(); - t = ye(-e, -e, e, e); + const e = 180 * Bn.degrees / i.getMetersPerUnit(); + t = xe(-e, -e, e, e); } return t; } -class D2 extends wd { +class D2 extends Td { constructor(t) { super({ attributions: t.attributions, @@ -12335,7 +12501,7 @@ class D2 extends wd { interpolate: t.interpolate }), this.on, this.once, this.un, this.opaque_ = t.opaque !== void 0 ? t.opaque : !1, this.tilePixelRatio_ = t.tilePixelRatio !== void 0 ? t.tilePixelRatio : 1, this.tileGrid = t.tileGrid !== void 0 ? t.tileGrid : null; const e = [256, 256]; - this.tileGrid && ae(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()), e), this.tileCache = new Td(t.cacheSize || 0), this.tmpSize = [0, 0], this.key_ = t.key || "", this.tileOptions = { + this.tileGrid && ce(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()), e), this.tileCache = new Nd(t.cacheSize || 0), this.tmpSize = [0, 0], this.key_ = t.key || "", this.tileOptions = { transition: t.transition, interpolate: t.interpolate }, this.zDirection = t.zDirection ? t.zDirection : 0; @@ -12354,7 +12520,7 @@ class D2 extends wd { let o = !0, a, l, h; for (let c = n.minX; c <= n.maxX; ++c) for (let u = n.minY; u <= n.maxY; ++u) - l = vo(e, c, u), h = !1, r.containsKey(l) && (a = r.get(l), h = a.getState() === z.LOADED, h && (h = s(a) !== !1)), h || (o = !1); + l = So(e, c, u), h = !1, r.containsKey(l) && (a = r.get(l), h = a.getState() === B.LOADED, h && (h = s(a) !== !1)), h || (o = !1); return o; } getGutterForProjection(t) { @@ -12373,18 +12539,18 @@ class D2 extends wd { return this.tileGrid ? this.tileGrid.getResolutions() : null; } getTile(t, e, n, s, r) { - return W(); + return V(); } getTileGrid() { return this.tileGrid; } getTileGridForProjection(t) { - return this.tileGrid ? this.tileGrid : Fd(t); + return this.tileGrid ? this.tileGrid : Bd(t); } getTileCacheForProjection(t) { const e = this.getProjection(); - return Y( - e === null || be(e, t), + return X( + e === null || Ae(e, t), 68 ), this.tileCache; } @@ -12392,8 +12558,8 @@ class D2 extends wd { return this.tilePixelRatio_; } getTilePixelSize(t, e, n) { - const s = this.getTileGridForProjection(n), r = this.getTilePixelRatio(e), o = ae(s.getTileSize(t), this.tmpSize); - return r == 1 ? o : Z1(o, r, this.tmpSize); + const s = this.getTileGridForProjection(n), r = this.getTilePixelRatio(e), o = ce(s.getTileSize(t), this.tmpSize); + return r == 1 ? o : z1(o, r, this.tmpSize); } getTileCoordForTileUrlFunction(t, e) { e = e !== void 0 ? e : this.getProjection(); @@ -12413,7 +12579,7 @@ class D2 extends wd { useTile(t, e, n, s) { } } -class k2 extends ke { +class k2 extends ze { constructor(t, e) { super(t), this.tile = e; } @@ -12425,7 +12591,7 @@ function $2(i, t) { if (o) return i.replace(e, o[0].toString()).replace(n, o[1].toString()).replace(s, o[2].toString()).replace(r, function() { const h = o[0], c = t.getFullTileRange(h); - return Y(c, 55), (c.getHeight() - o[2] - 1).toString(); + return X(c, 55), (c.getHeight() - o[2] - 1).toString(); }); }; } @@ -12433,18 +12599,18 @@ function B2(i, t) { const e = i.length, n = new Array(e); for (let s = 0; s < e; ++s) n[s] = $2(i[s], t); - return Sa(n); + return Ia(n); } -function Sa(i) { +function Ia(i) { return i.length === 1 ? i[0] : function(t, e, n) { if (t) { - const s = d2(t), r = Sn(s, i.length); + const s = d2(t), r = Pn(s, i.length); return i[r](t, e, n); } else return; }; } -function kd(i) { +function Zd(i) { const t = []; let e = /\{([a-z])-([a-z])\}/.exec(i); if (e) { @@ -12462,7 +12628,7 @@ function kd(i) { } return t.push(i), t; } -class Sl extends G2 { +class Il extends G2 { constructor(t) { super({ attributions: t.attributions, @@ -12478,7 +12644,7 @@ class Sl extends G2 { key: t.key, attributionsCollapsible: t.attributionsCollapsible, zDirection: t.zDirection - }), this.generateTileUrlFunction_ = this.tileUrlFunction === Sl.prototype.tileUrlFunction, this.tileLoadFunction = t.tileLoadFunction, t.tileUrlFunction && (this.tileUrlFunction = t.tileUrlFunction), this.urls = null, t.urls ? this.setUrls(t.urls) : t.url && this.setUrl(t.url), this.tileLoadingKeys_ = {}; + }), this.generateTileUrlFunction_ = this.tileUrlFunction === Il.prototype.tileUrlFunction, this.tileLoadFunction = t.tileLoadFunction, t.tileUrlFunction && (this.tileUrlFunction = t.tileUrlFunction), this.urls = null, t.urls ? this.setUrls(t.urls) : t.url && this.setUrl(t.url), this.tileLoadingKeys_ = {}; } getTileLoadFunction() { return this.tileLoadFunction; @@ -12492,7 +12658,7 @@ class Sl extends G2 { handleTileChange(t) { const e = t.target, n = rt(e), s = e.getState(); let r; - s == z.LOADING ? (this.tileLoadingKeys_[n] = !0, r = qo.TILELOADSTART) : n in this.tileLoadingKeys_ && (delete this.tileLoadingKeys_[n], r = s == z.ERROR ? qo.TILELOADERROR : s == z.LOADED ? qo.TILELOADEND : void 0), r != null && this.dispatchEvent(new k2(r, e)); + s == B.LOADING ? (this.tileLoadingKeys_[n] = !0, r = sa.TILELOADSTART) : n in this.tileLoadingKeys_ && (delete this.tileLoadingKeys_[n], r = s == B.ERROR ? sa.TILELOADERROR : s == B.LOADED ? sa.TILELOADEND : void 0), r != null && this.dispatchEvent(new k2(r, e)); } setTileLoadFunction(t) { this.tileCache.clear(), this.tileLoadFunction = t, this.changed(); @@ -12501,7 +12667,7 @@ class Sl extends G2 { this.tileUrlFunction = t, this.tileCache.pruneExceptNewestZ(), typeof e < "u" ? this.setKey(e) : this.changed(); } setUrl(t) { - const e = kd(t); + const e = Zd(t); this.urls = e, this.setUrls(e); } setUrls(t) { @@ -12513,11 +12679,11 @@ class Sl extends G2 { tileUrlFunction(t, e, n) { } useTile(t, e, n) { - const s = vo(t, e, n); + const s = So(t, e, n); this.tileCache.containsKey(s) && this.tileCache.get(s); } } -const z2 = Sl; +const z2 = Il; class Z2 extends z2 { constructor(t) { super({ @@ -12538,7 +12704,7 @@ class Z2 extends z2 { key: t.key, attributionsCollapsible: t.attributionsCollapsible, zDirection: t.zDirection - }), this.crossOrigin = t.crossOrigin !== void 0 ? t.crossOrigin : null, this.tileClass = t.tileClass !== void 0 ? t.tileClass : bd, this.tileCacheForProjection = {}, this.tileGridForProjection = {}, this.reprojectionErrorThreshold_ = t.reprojectionErrorThreshold, this.renderReprojectionEdges_ = !1; + }), this.crossOrigin = t.crossOrigin !== void 0 ? t.crossOrigin : null, this.tileClass = t.tileClass !== void 0 ? t.tileClass : Pd, this.tileCacheForProjection = {}, this.tileGridForProjection = {}, this.reprojectionErrorThreshold_ = t.reprojectionErrorThreshold, this.renderReprojectionEdges_ = !1; } canExpireCache() { if (this.tileCache.canExpireCache()) @@ -12559,7 +12725,7 @@ class Z2 extends z2 { } } getGutterForProjection(t) { - return this.getProjection() && t && !be(this.getProjection(), t) ? 0 : this.getGutter(); + return this.getProjection() && t && !Ae(this.getProjection(), t) ? 0 : this.getGutter(); } getGutter() { return 0; @@ -12569,24 +12735,24 @@ class Z2 extends z2 { return this.getInterpolate() || (t += ":disable-interpolation"), t; } getOpaque(t) { - return this.getProjection() && t && !be(this.getProjection(), t) ? !1 : super.getOpaque(t); + return this.getProjection() && t && !Ae(this.getProjection(), t) ? !1 : super.getOpaque(t); } getTileGridForProjection(t) { const e = this.getProjection(); - if (this.tileGrid && (!e || be(e, t))) + if (this.tileGrid && (!e || Ae(e, t))) return this.tileGrid; { const n = rt(t); - return n in this.tileGridForProjection || (this.tileGridForProjection[n] = Fd(t)), this.tileGridForProjection[n]; + return n in this.tileGridForProjection || (this.tileGridForProjection[n] = Bd(t)), this.tileGridForProjection[n]; } } getTileCacheForProjection(t) { const e = this.getProjection(); - if (!e || be(e, t)) + if (!e || Ae(e, t)) return this.tileCache; { const n = rt(t); - return n in this.tileCacheForProjection || (this.tileCacheForProjection[n] = new Td( + return n in this.tileCacheForProjection || (this.tileCacheForProjection[n] = new Nd( this.tileCache.highWaterMark )), this.tileCacheForProjection[n]; } @@ -12597,17 +12763,17 @@ class Z2 extends z2 { r ), h = l ? this.tileUrlFunction(l, s, r) : void 0, c = new this.tileClass( a, - h !== void 0 ? z.IDLE : z.EMPTY, + h !== void 0 ? B.IDLE : B.EMPTY, h !== void 0 ? h : "", this.crossOrigin, this.tileLoadFunction, this.tileOptions ); - return c.key = o, c.addEventListener(X.CHANGE, this.handleTileChange.bind(this)), c; + return c.key = o, c.addEventListener(H.CHANGE, this.handleTileChange.bind(this)), c; } getTile(t, e, n, s, r) { const o = this.getProjection(); - if (!o || !r || be(o, r)) + if (!o || !r || Ae(o, r)) return this.getTileInternal( t, e, @@ -12618,7 +12784,7 @@ class Z2 extends z2 { { const a = this.getTileCacheForProjection(r), l = [t, e, n]; let h; - const c = Ld(l); + const c = Od(l); a.containsKey(c) && (h = a.get(c)); const u = this.getKey(); if (h && h.key == u) @@ -12627,7 +12793,7 @@ class Z2 extends z2 { const d = this.getTileGridForProjection(o), f = this.getTileGridForProjection(r), g = this.getTileCoordForTileUrlFunction( l, r - ), m = new wa( + ), m = new Ta( o, d, r, @@ -12636,8 +12802,8 @@ class Z2 extends z2 { g, this.getTilePixelRatio(s), this.getGutter(), - function(_, y, p, v) { - return this.getTileInternal(_, y, p, v, o); + function(p, _, y, v) { + return this.getTileInternal(p, _, y, v, o); }.bind(this), this.reprojectionErrorThreshold_, this.renderReprojectionEdges_, @@ -12649,12 +12815,12 @@ class Z2 extends z2 { } getTileInternal(t, e, n, s, r) { let o = null; - const a = vo(t, e, n), l = this.getKey(); + const a = So(t, e, n), l = this.getKey(); if (!this.tileCache.containsKey(a)) o = this.createTile_(t, e, n, s, r, l), this.tileCache.set(a, o); else if (o = this.tileCache.get(a), o.key != l) { const h = o; - o = this.createTile_(t, e, n, s, r, l), h.getState() == z.IDLE ? o.interimTile = h.interimTile : o.interimTile = h, o.refreshInterimChain(), this.tileCache.replace(a, o); + o = this.createTile_(t, e, n, s, r, l), h.getState() == B.IDLE ? o.interimTile = h.interimTile : o.interimTile = h, o.refreshInterimChain(), this.tileCache.replace(a, o); } return o; } @@ -12667,7 +12833,7 @@ class Z2 extends z2 { } } setTileGridForProjection(t, e) { - const n = J(t); + const n = q(t); if (n) { const s = rt(n); s in this.tileGridForProjection || (this.tileGridForProjection[s] = e); @@ -12683,14 +12849,14 @@ function U2(i, t) { i.getImage().src = t; } const V2 = Z2; -class W2 extends Ws { +class W2 extends Qn { constructor(t) { super({ attributions: t.attributions, wrapX: t.wrapX }), this.resolution = void 0, this.distance = t.distance !== void 0 ? t.distance : 20, this.minDistance = t.minDistance || 0, this.interpolationRatio = 0, this.features = [], this.geometryFunction = t.geometryFunction || function(e) { const n = e.getGeometry(); - return Y(n.getType() == "Point", 10), n; + return X(n.getType() == "Point", 10), n; }, this.createCustomCluster_ = t.createCluster, this.source = null, this.boundRefresh_ = this.refresh.bind(this), this.updateDistance(this.distance, this.minDistance), this.setSource(t.source || null); } clear(t) { @@ -12715,7 +12881,7 @@ class W2 extends Ws { return this.minDistance; } setSource(t) { - this.source && this.source.removeEventListener(X.CHANGE, this.boundRefresh_), this.source = t, t && t.addEventListener(X.CHANGE, this.boundRefresh_), this.refresh(); + this.source && this.source.removeEventListener(H.CHANGE, this.boundRefresh_), this.source = t, t && t.addEventListener(H.CHANGE, this.boundRefresh_), this.refresh(); } refresh() { this.clear(), this.cluster(), this.addFeatures(this.features); @@ -12727,14 +12893,14 @@ class W2 extends Ws { cluster() { if (this.resolution === void 0 || !this.source) return; - const t = ue(), e = this.distance * this.resolution, n = this.source.getFeatures(), s = {}; + const t = fe(), e = this.distance * this.resolution, n = this.source.getFeatures(), s = {}; for (let r = 0, o = n.length; r < o; r++) { const a = n[r]; if (!(rt(a) in s)) { const l = this.geometryFunction(a); if (l) { const h = l.getCoordinates(); - Cu(h, t), oo(t, e, t); + wu(h, t), fo(t, e, t); const c = this.source.getFeaturesInExtent(t).filter(function(u) { const d = rt(u); return d in s ? !1 : (s[d] = !0, !0); @@ -12748,21 +12914,21 @@ class W2 extends Ws { const n = [0, 0]; for (let a = t.length - 1; a >= 0; --a) { const l = this.geometryFunction(t[a]); - l ? Pu(n, l.getCoordinates()) : t.splice(a, 1); + l ? Nu(n, l.getCoordinates()) : t.splice(a, 1); } - Ou(n, 1 / t.length); - const s = Mi(e), r = this.interpolationRatio, o = new Ci([ + Fu(n, 1 / t.length); + const s = Li(e), r = this.interpolationRatio, o = new oi([ n[0] * (1 - r) + s[0] * r, n[1] * (1 - r) + s[1] * r ]); - return this.createCustomCluster_ ? this.createCustomCluster_(o, t) : new zs({ + return this.createCustomCluster_ ? this.createCustomCluster_(o, t) : new an({ geometry: o, features: t }); } } const H2 = W2; -function rc(i, t) { +function hc(i, t) { const e = []; Object.keys(t).forEach(function(s) { t[s] !== null && t[s] !== void 0 && e.push(s + "=" + encodeURIComponent(t[s])); @@ -12770,11 +12936,11 @@ function rc(i, t) { const n = e.join("&"); return i = i.replace(/[?&]$/, ""), i += i.includes("?") ? "&" : "?", i + n; } -const vr = { +const Er = { PRELOAD: "preload", USE_INTERIM_TILES_ON_ERROR: "useInterimTilesOnError" }; -class X2 extends uo { +class X2 extends yo { constructor(t) { t = t || {}; const e = Object.assign({}, t); @@ -12783,44 +12949,44 @@ class X2 extends uo { ); } getPreload() { - return this.get(vr.PRELOAD); + return this.get(Er.PRELOAD); } setPreload(t) { - this.set(vr.PRELOAD, t); + this.set(Er.PRELOAD, t); } getUseInterimTilesOnError() { - return this.get(vr.USE_INTERIM_TILES_ON_ERROR); + return this.get(Er.USE_INTERIM_TILES_ON_ERROR); } setUseInterimTilesOnError(t) { - this.set(vr.USE_INTERIM_TILES_ON_ERROR, t); + this.set(Er.USE_INTERIM_TILES_ON_ERROR, t); } getData(t) { return super.getData(t); } } const Y2 = X2; -class j2 extends Md { +class j2 extends wd { constructor(t) { - super(t), this.extentChanged = !0, this.renderedExtent_ = null, this.renderedPixelRatio, this.renderedProjection = null, this.renderedRevision, this.renderedTiles = [], this.newTiles_ = !1, this.tmpExtent = ue(), this.tmpTileRange_ = new Ad(0, 0, 0, 0); + super(t), this.extentChanged = !0, this.renderedExtent_ = null, this.renderedPixelRatio, this.renderedProjection = null, this.renderedRevision, this.renderedTiles = [], this.newTiles_ = !1, this.tmpExtent = fe(), this.tmpTileRange_ = new Dd(0, 0, 0, 0); } isDrawableTile(t) { const e = this.getLayer(), n = t.getState(), s = e.getUseInterimTilesOnError(); - return n == z.LOADED || n == z.EMPTY || n == z.ERROR && !s; + return n == B.LOADED || n == B.EMPTY || n == B.ERROR && !s; } getTile(t, e, n, s) { const r = s.pixelRatio, o = s.viewState.projection, a = this.getLayer(); let h = a.getSource().getTile(t, e, n, r, o); - return h.getState() == z.ERROR && a.getUseInterimTilesOnError() && a.getPreload() > 0 && (this.newTiles_ = !0), this.isDrawableTile(h) || (h = h.getInterimTile()), h; + return h.getState() == B.ERROR && a.getUseInterimTilesOnError() && a.getPreload() > 0 && (this.newTiles_ = !0), this.isDrawableTile(h) || (h = h.getInterimTile()), h; } getData(t) { const e = this.frameState; if (!e) return null; - const n = this.getLayer(), s = Ft( + const n = this.getLayer(), s = Dt( e.pixelToCoordinateTransform, t.slice() ), r = n.getExtent(); - if (r && !ao(r, s)) + if (r && !go(r, s)) return null; const o = e.pixelRatio, a = e.viewState.projection, l = e.viewState, h = n.getRenderSource(), c = h.getTileGridForProjection(l.projection), u = h.getTilePixelRatio(e.pixelRatio); for (let d = c.getZForResolution(l.resolution); d >= c.getMinZoom(); --d) { @@ -12831,18 +12997,18 @@ class j2 extends Md { o, a ); - if (!(g instanceof bd || g instanceof wa) || g instanceof wa && g.getState() === z.EMPTY) + if (!(g instanceof Pd || g instanceof Ta) || g instanceof Ta && g.getState() === B.EMPTY) return null; - if (g.getState() !== z.LOADED) + if (g.getState() !== B.LOADED) continue; - const m = c.getOrigin(d), _ = ae(c.getTileSize(d)), y = c.getResolution(d), p = Math.floor( - u * ((s[0] - m[0]) / y - f[1] * _[0]) + const m = c.getOrigin(d), p = ce(c.getTileSize(d)), _ = c.getResolution(d), y = Math.floor( + u * ((s[0] - m[0]) / _ - f[1] * p[0]) ), v = Math.floor( - u * ((m[1] - s[1]) / y - f[2] * _[1]) + u * ((m[1] - s[1]) / _ - f[2] * p[1]) ), x = Math.round( u * h.getGutterForProjection(l.projection) ); - return this.getImageData(g.getImage(), p + x, v + x); + return this.getImageData(g.getImage(), y + x, v + x); } return null; } @@ -12854,61 +13020,61 @@ class j2 extends Md { } renderFrame(t, e) { const n = t.layerStatesArray[t.layerIndex], s = t.viewState, r = s.projection, o = s.resolution, a = s.center, l = s.rotation, h = t.pixelRatio, c = this.getLayer(), u = c.getSource(), d = u.getRevision(), f = u.getTileGridForProjection(r), g = f.getZForResolution(o, u.zDirection), m = f.getResolution(g); - let _ = t.extent; - const y = t.viewState.resolution, p = u.getTilePixelRatio(h), v = Math.round(mt(_) / y * h), x = Math.round(Ne(_) / y * h), M = n.extent && Pi(n.extent); - M && (_ = cs( - _, - Pi(n.extent) + let p = t.extent; + const _ = t.viewState.resolution, y = u.getTilePixelRatio(h), v = Math.round(mt(p) / _ * h), x = Math.round(Ge(p) / _ * h), C = n.extent && Bi(n.extent); + C && (p = vs( + p, + Bi(n.extent) )); - const E = m * v / 2 / p, R = m * x / 2 / p, L = [ + const E = m * v / 2 / y, w = m * x / 2 / y, R = [ a[0] - E, - a[1] - R, + a[1] - w, a[0] + E, - a[1] + R - ], N = f.getTileRangeForExtentAndZ(_, g), G = {}; - G[g] = {}; - const U = this.createLoadedTileFinder( + a[1] + w + ], A = f.getTileRangeForExtentAndZ(p, g), k = {}; + k[g] = {}; + const Z = this.createLoadedTileFinder( u, r, - G - ), T = this.tmpExtent, $ = this.tmpTileRange_; + k + ), L = this.tmpExtent, G = this.tmpTileRange_; this.newTiles_ = !1; - const ft = l ? la( + const dt = l ? ga( s.center, - y, + _, l, t.size ) : void 0; - for (let se = N.minX; se <= N.maxX; ++se) - for (let lt = N.minY; lt <= N.maxY; ++lt) { - if (l && !f.tileCoordIntersectsViewport([g, se, lt], ft)) + for (let ae = A.minX; ae <= A.maxX; ++ae) + for (let at = A.minY; at <= A.maxY; ++at) { + if (l && !f.tileCoordIntersectsViewport([g, ae, at], dt)) continue; - const gt = this.getTile(g, se, lt, t); - if (this.isDrawableTile(gt)) { - const Gt = rt(this); - if (gt.getState() == z.LOADED) { - G[g][gt.tileCoord.toString()] = gt; - let $e = gt.inTransition(Gt); - $e && n.opacity !== 1 && (gt.endTransition(Gt), $e = !1), !this.newTiles_ && ($e || !this.renderedTiles.includes(gt)) && (this.newTiles_ = !0); + const ft = this.getTile(g, ae, at, t); + if (this.isDrawableTile(ft)) { + const $t = rt(this); + if (ft.getState() == B.LOADED) { + k[g][ft.tileCoord.toString()] = ft; + let Ve = ft.inTransition($t); + Ve && n.opacity !== 1 && (ft.endTransition($t), Ve = !1), !this.newTiles_ && (Ve || !this.renderedTiles.includes(ft)) && (this.newTiles_ = !0); } - if (gt.getAlpha(Gt, t.time) === 1) + if (ft.getAlpha($t, t.time) === 1) continue; } - const ii = f.getTileCoordChildTileRange( - gt.tileCoord, - $, - T + const hi = f.getTileCoordChildTileRange( + ft.tileCoord, + G, + L ); - let Re = !1; - ii && (Re = U(g + 1, ii)), Re || f.forEachTileCoordParentTileRange( - gt.tileCoord, - U, - $, - T + let Ie = !1; + hi && (Ie = Z(g + 1, hi)), Ie || f.forEachTileCoordParentTileRange( + ft.tileCoord, + Z, + G, + L ); } - const F = m / o * h / p; - xi( + const N = m / o * h / y; + bi( this.pixelTransform, t.size[0] / 2, t.size[1] / 2, @@ -12918,74 +13084,74 @@ class j2 extends Md { -v / 2, -x / 2 ); - const k = xu(this.pixelTransform); - this.useContainer(e, k, this.getBackground(t)); - const A = this.context, tt = A.canvas; - Xa(this.inversePixelTransform, this.pixelTransform), xi( + const D = Mu(this.pixelTransform); + this.useContainer(e, D, this.getBackground(t)); + const I = this.context, Q = I.canvas; + Ja(this.inversePixelTransform, this.pixelTransform), bi( this.tempTransform, v / 2, x / 2, - F, - F, + N, + N, 0, -v / 2, -x / 2 - ), tt.width != v || tt.height != x ? (tt.width = v, tt.height = x) : this.containerReused || A.clearRect(0, 0, v, x), M && this.clipUnrotated(A, t, M), u.getInterpolate() || (A.imageSmoothingEnabled = !1), this.preRender(A, t), this.renderedTiles.length = 0; - let Mt = Object.keys(G).map(Number); - Mt.sort(Zi); - let _t, Pt, b; - n.opacity === 1 && (!this.containerReused || u.getOpaque(t.viewState.projection)) ? Mt = Mt.reverse() : (_t = [], Pt = []); - for (let se = Mt.length - 1; se >= 0; --se) { - const lt = Mt[se], gt = u.getTilePixelSize( - lt, + ), Q.width != v || Q.height != x ? (Q.width = v, Q.height = x) : this.containerReused || I.clearRect(0, 0, v, x), C && this.clipUnrotated(I, t, C), u.getInterpolate() || (I.imageSmoothingEnabled = !1), this.preRender(I, t), this.renderedTiles.length = 0; + let Ct = Object.keys(k).map(Number); + Ct.sort(Ki); + let _t, Ot, b; + n.opacity === 1 && (!this.containerReused || u.getOpaque(t.viewState.projection)) ? Ct = Ct.reverse() : (_t = [], Ot = []); + for (let ae = Ct.length - 1; ae >= 0; --ae) { + const at = Ct[ae], ft = u.getTilePixelSize( + at, h, r - ), Re = f.getResolution(lt) / m, Gt = gt[0] * Re * F, $e = gt[1] * Re * F, en = f.getTileCoordForCoordAndZ( - Ji(L), - lt - ), er = f.getTileCoordExtent(en), nn = Ft(this.tempTransform, [ - p * (er[0] - L[0]) / m, - p * (L[3] - er[3]) / m - ]), ir = p * u.getGutterForProjection(r), ni = G[lt]; - for (const Yn in ni) { - const si = ni[Yn], nr = si.tileCoord, sr = en[1] - nr[1], rr = Math.round(nn[0] - (sr - 1) * Gt), sn = en[2] - nr[2], Lo = Math.round(nn[1] - (sn - 1) * $e), jt = Math.round(nn[0] - sr * Gt), fe = Math.round(nn[1] - sn * $e), ve = rr - jt, Be = Lo - fe, rn = g === lt, Si = rn && si.getAlpha(rt(this), t.time) !== 1; - let ri = !1; - if (!Si) + ), Ie = f.getResolution(at) / m, $t = ft[0] * Ie * N, Ve = ft[1] * Ie * N, ln = f.getTileCoordForCoordAndZ( + Pi(R), + at + ), rr = f.getTileCoordExtent(ln), hn = Dt(this.tempTransform, [ + y * (rr[0] - R[0]) / m, + y * (R[3] - rr[3]) / m + ]), or = y * u.getGutterForProjection(r), ci = k[at]; + for (const ss in ci) { + const ui = ci[ss], ar = ui.tileCoord, lr = ln[1] - ar[1], hr = Math.round(hn[0] - (lr - 1) * $t), cn = ln[2] - ar[2], No = Math.round(hn[1] - (cn - 1) * Ve), Jt = Math.round(hn[0] - lr * $t), me = Math.round(hn[1] - cn * Ve), Me = hr - Jt, We = No - me, un = g === at, Ni = un && ui.getAlpha(rt(this), t.time) !== 1; + let di = !1; + if (!Ni) if (_t) { - b = [jt, fe, jt + ve, fe, jt + ve, fe + Be, jt, fe + Be]; - for (let on = 0, or = _t.length; on < or; ++on) - if (g !== lt && lt < Pt[on]) { - const Zt = _t[on]; - Qt( - [jt, fe, jt + ve, fe + Be], - [Zt[0], Zt[3], Zt[4], Zt[7]] - ) && (ri || (A.save(), ri = !0), A.beginPath(), A.moveTo(b[0], b[1]), A.lineTo(b[2], b[3]), A.lineTo(b[4], b[5]), A.lineTo(b[6], b[7]), A.moveTo(Zt[6], Zt[7]), A.lineTo(Zt[4], Zt[5]), A.lineTo(Zt[2], Zt[3]), A.lineTo(Zt[0], Zt[1]), A.clip()); + b = [Jt, me, Jt + Me, me, Jt + Me, me + We, Jt, me + We]; + for (let dn = 0, cr = _t.length; dn < cr; ++dn) + if (g !== at && at < Ot[dn]) { + const Ht = _t[dn]; + ie( + [Jt, me, Jt + Me, me + We], + [Ht[0], Ht[3], Ht[4], Ht[7]] + ) && (di || (I.save(), di = !0), I.beginPath(), I.moveTo(b[0], b[1]), I.lineTo(b[2], b[3]), I.lineTo(b[4], b[5]), I.lineTo(b[6], b[7]), I.moveTo(Ht[6], Ht[7]), I.lineTo(Ht[4], Ht[5]), I.lineTo(Ht[2], Ht[3]), I.lineTo(Ht[0], Ht[1]), I.clip()); } - _t.push(b), Pt.push(lt); + _t.push(b), Ot.push(at); } else - A.clearRect(jt, fe, ve, Be); + I.clearRect(Jt, me, Me, We); this.drawTileImage( - si, + ui, t, - jt, - fe, - ve, - Be, - ir, - rn - ), _t && !Si ? (ri && A.restore(), this.renderedTiles.unshift(si)) : this.renderedTiles.push(si), this.updateUsedTiles(t.usedTiles, u, si); + Jt, + me, + Me, + We, + or, + un + ), _t && !Ni ? (di && I.restore(), this.renderedTiles.unshift(ui)) : this.renderedTiles.push(ui), this.updateUsedTiles(t.usedTiles, u, ui); } } - return this.renderedRevision = d, this.renderedResolution = m, this.extentChanged = !this.renderedExtent_ || !ys(this.renderedExtent_, L), this.renderedExtent_ = L, this.renderedPixelRatio = h, this.renderedProjection = r, this.manageTilePyramid( + return this.renderedRevision = d, this.renderedResolution = m, this.extentChanged = !this.renderedExtent_ || !bs(this.renderedExtent_, R), this.renderedExtent_ = R, this.renderedPixelRatio = h, this.renderedProjection = r, this.manageTilePyramid( t, u, f, h, r, - _, + p, g, c.getPreload() - ), this.scheduleExpireCache(t, u), this.postRender(A, t), n.extent && A.restore(), A.imageSmoothingEnabled = !0, k !== tt.style.transform && (tt.style.transform = k), this.container; + ), this.scheduleExpireCache(t, u), this.postRender(I, t), n.extent && I.restore(), I.imageSmoothingEnabled = !0, D !== Q.style.transform && (Q.style.transform = D), this.container; } drawTileImage(t, e, n, s, r, o, a, l) { const h = this.getTileImage(t); @@ -13032,23 +13198,23 @@ class j2 extends Md { manageTilePyramid(t, e, n, s, r, o, a, l, h) { const c = rt(e); c in t.wantedTiles || (t.wantedTiles[c] = {}); - const u = t.wantedTiles[c], d = t.tileQueue, f = n.getMinZoom(), g = t.viewState.rotation, m = g ? la( + const u = t.wantedTiles[c], d = t.tileQueue, f = n.getMinZoom(), g = t.viewState.rotation, m = g ? ga( t.viewState.center, t.viewState.resolution, g, t.size ) : void 0; - let _ = 0, y, p, v, x, M, E; + let p = 0, _, y, v, x, C, E; for (E = f; E <= a; ++E) - for (p = n.getTileRangeForExtentAndZ(o, E, p), v = n.getResolution(E), x = p.minX; x <= p.maxX; ++x) - for (M = p.minY; M <= p.maxY; ++M) - g && !n.tileCoordIntersectsViewport([E, x, M], m) || (a - E <= l ? (++_, y = e.getTile(E, x, M, s, r), y.getState() == z.IDLE && (u[y.getKey()] = !0, d.isKeyQueued(y.getKey()) || d.enqueue([ - y, + for (y = n.getTileRangeForExtentAndZ(o, E, y), v = n.getResolution(E), x = y.minX; x <= y.maxX; ++x) + for (C = y.minY; C <= y.maxY; ++C) + g && !n.tileCoordIntersectsViewport([E, x, C], m) || (a - E <= l ? (++p, _ = e.getTile(E, x, C, s, r), _.getState() == B.IDLE && (u[_.getKey()] = !0, d.isKeyQueued(_.getKey()) || d.enqueue([ + _, c, - n.getTileCoordCenter(y.tileCoord), + n.getTileCoordCenter(_.tileCoord), v - ])), h !== void 0 && h(y)) : e.useTile(E, x, M, r)); - e.updateCacheSize(_, r); + ])), h !== void 0 && h(_)) : e.useTile(E, x, C, r)); + e.updateCacheSize(p, r); } } const K2 = j2; @@ -13061,7 +13227,7 @@ class q2 extends Y2 { } } const J2 = q2; -class Q2 extends Nd { +class Q2 extends $d { constructor(t) { super({ extent: t.extent, @@ -13080,24 +13246,24 @@ class Q2 extends Nd { return this.matrixIds_; } } -function t_(i, t, e) { +function tp(i, t, e) { const n = [], s = [], r = [], o = [], a = []; e = e !== void 0 ? e : []; - const l = "SupportedCRS", h = "TileMatrix", c = "Identifier", u = "ScaleDenominator", d = "TopLeftCorner", f = "TileWidth", g = "TileHeight", m = i[l], _ = J(m), y = _.getMetersPerUnit(), p = _.getAxisOrientation().substr(0, 2) == "ne"; + const l = "SupportedCRS", h = "TileMatrix", c = "Identifier", u = "ScaleDenominator", d = "TopLeftCorner", f = "TileWidth", g = "TileHeight", m = i[l], p = q(m), _ = p.getMetersPerUnit(), y = p.getAxisOrientation().substr(0, 2) == "ne"; return i[h].sort(function(v, x) { return x[u] - v[u]; }), i[h].forEach(function(v) { let x; - if (e.length > 0 ? x = e.find(function(M) { - return v[c] == M[h] ? !0 : v[c].includes(":") ? !1 : i[c] + ":" + v[c] === M[h]; + if (e.length > 0 ? x = e.find(function(C) { + return v[c] == C[h] ? !0 : v[c].includes(":") ? !1 : i[c] + ":" + v[c] === C[h]; }) : x = !0, x) { s.push(v[c]); - const M = v[u] * 28e-5 / y, E = v[f], R = v[g]; - p ? r.push([ + const C = v[u] * 28e-5 / _, E = v[f], w = v[g]; + y ? r.push([ v[d][1], v[d][0] - ]) : r.push(v[d]), n.push(M), o.push( - E == R ? E : [E, R] + ]) : r.push(v[d]), n.push(C), o.push( + E == w ? E : [E, w] ), a.push([v.MatrixWidth, v.MatrixHeight]); } }), new Q2({ @@ -13109,11 +13275,11 @@ function t_(i, t, e) { sizes: a }); } -class e_ extends V2 { +class ep extends V2 { constructor(t) { const e = t.requestEncoding !== void 0 ? t.requestEncoding : "KVP", n = t.tileGrid; let s = t.urls; - s === void 0 && t.url !== void 0 && (s = kd(t.url)), super({ + s === void 0 && t.url !== void 0 && (s = Zd(t.url)), super({ attributions: t.attributions, attributionsCollapsible: t.attributionsCollapsible, cacheSize: t.cacheSize, @@ -13129,7 +13295,7 @@ class e_ extends V2 { wrapX: t.wrapX !== void 0 ? t.wrapX : !1, transition: t.transition, zDirection: t.zDirection - }), this.version_ = t.version !== void 0 ? t.version : "1.0.0", this.format_ = t.format !== void 0 ? t.format : "image/jpeg", this.dimensions_ = t.dimensions !== void 0 ? t.dimensions : {}, this.layer_ = t.layer, this.matrixSet_ = t.matrixSet, this.style_ = t.style, this.requestEncoding_ = e, this.setKey(this.getKeyForDimensions_()), s && s.length > 0 && (this.tileUrlFunction = Sa( + }), this.version_ = t.version !== void 0 ? t.version : "1.0.0", this.format_ = t.format !== void 0 ? t.format : "image/jpeg", this.dimensions_ = t.dimensions !== void 0 ? t.dimensions : {}, this.layer_ = t.layer, this.matrixSet_ = t.matrixSet, this.style_ = t.style, this.requestEncoding_ = e, this.setKey(this.getKeyForDimensions_()), s && s.length > 0 && (this.tileUrlFunction = Ia( s.map(this.createFromWMTSTemplate.bind(this)) )); } @@ -13138,7 +13304,7 @@ class e_ extends V2 { const e = t.join(` `); this.setTileUrlFunction( - Sa( + Ia( t.map(this.createFromWMTSTemplate.bind(this)) ), e @@ -13186,7 +13352,7 @@ class e_ extends V2 { Request: "GetTile", Version: this.version_, Format: this.format_ - }), t = e == "KVP" ? rc(t, n) : t.replace(/\{(\w+?)\}/g, function(o, a) { + }), t = e == "KVP" ? hc(t, n) : t.replace(/\{(\w+?)\}/g, function(o, a) { return a.toLowerCase() in n ? n[a.toLowerCase()] : o; }); const s = this.tileGrid, r = this.dimensions_; @@ -13199,7 +13365,7 @@ class e_ extends V2 { }; Object.assign(h, r); let c = t; - return e == "KVP" ? c = rc(c, h) : c = c.replace(/\{(\w+?)\}/g, function(u, d) { + return e == "KVP" ? c = hc(c, h) : c = c.replace(/\{(\w+?)\}/g, function(u, d) { return h[d]; }), c; } else @@ -13207,129 +13373,129 @@ class e_ extends V2 { }; } } -const i_ = e_; -function n_(i, t) { - const n = i.Contents.Layer.find(function(T) { - return T.Identifier == t.layer; +const ip = ep; +function np(i, t) { + const n = i.Contents.Layer.find(function(L) { + return L.Identifier == t.layer; }); if (!n) return null; const s = i.Contents.TileMatrixSet; let r; - n.TileMatrixSetLink.length > 1 ? "projection" in t ? r = n.TileMatrixSetLink.findIndex(function(T) { - const ft = s.find(function(A) { - return A.Identifier == T.TileMatrixSet; - }).SupportedCRS, F = J(ft), k = J(t.projection); - return F && k ? be(F, k) : ft == t.projection; - }) : r = n.TileMatrixSetLink.findIndex(function(T) { - return T.TileMatrixSet == t.matrixSet; + n.TileMatrixSetLink.length > 1 ? "projection" in t ? r = n.TileMatrixSetLink.findIndex(function(L) { + const dt = s.find(function(I) { + return I.Identifier == L.TileMatrixSet; + }).SupportedCRS, N = q(dt), D = q(t.projection); + return N && D ? Ae(N, D) : dt == t.projection; + }) : r = n.TileMatrixSetLink.findIndex(function(L) { + return L.TileMatrixSet == t.matrixSet; }) : r = 0, r < 0 && (r = 0); const o = n.TileMatrixSetLink[r].TileMatrixSet, a = n.TileMatrixSetLink[r].TileMatrixSetLimits; let l = n.Format[0]; - "format" in t && (l = t.format), r = n.Style.findIndex(function(T) { - return "style" in t ? T.Title == t.style : T.isDefault; + "format" in t && (l = t.format), r = n.Style.findIndex(function(L) { + return "style" in t ? L.Title == t.style : L.isDefault; }), r < 0 && (r = 0); const h = n.Style[r].Identifier, c = {}; - "Dimension" in n && n.Dimension.forEach(function(T, $, ft) { - const F = T.Identifier; - let k = T.Default; - k === void 0 && (k = T.Value[0]), c[F] = k; + "Dimension" in n && n.Dimension.forEach(function(L, G, dt) { + const N = L.Identifier; + let D = L.Default; + D === void 0 && (D = L.Value[0]), c[N] = D; }); - const d = i.Contents.TileMatrixSet.find(function(T) { - return T.Identifier == o; + const d = i.Contents.TileMatrixSet.find(function(L) { + return L.Identifier == o; }); let f; const g = d.SupportedCRS; - if (g && (f = J(g)), "projection" in t) { - const T = J(t.projection); - T && (!f || be(T, f)) && (f = T); + if (g && (f = q(g)), "projection" in t) { + const L = q(t.projection); + L && (!f || Ae(L, f)) && (f = L); } let m = !1; - const _ = f.getAxisOrientation().substr(0, 2) == "ne"; - let y = d.TileMatrix[0], p = { + const p = f.getAxisOrientation().substr(0, 2) == "ne"; + let _ = d.TileMatrix[0], y = { MinTileCol: 0, MinTileRow: 0, - MaxTileCol: y.MatrixWidth - 1, - MaxTileRow: y.MatrixHeight - 1 + MaxTileCol: _.MatrixWidth - 1, + MaxTileRow: _.MatrixHeight - 1 }; if (a) { - p = a[a.length - 1]; - const T = d.TileMatrix.find( - ($) => $.Identifier === p.TileMatrix || d.Identifier + ":" + $.Identifier === p.TileMatrix + y = a[a.length - 1]; + const L = d.TileMatrix.find( + (G) => G.Identifier === y.TileMatrix || d.Identifier + ":" + G.Identifier === y.TileMatrix ); - T && (y = T); - } - const v = y.ScaleDenominator * 28e-5 / f.getMetersPerUnit(), x = _ ? [y.TopLeftCorner[1], y.TopLeftCorner[0]] : y.TopLeftCorner, M = y.TileWidth * v, E = y.TileHeight * v; - let R = d.BoundingBox; - R && _ && (R = [ - R[1], - R[0], - R[3], - R[2] + L && (_ = L); + } + const v = _.ScaleDenominator * 28e-5 / f.getMetersPerUnit(), x = p ? [_.TopLeftCorner[1], _.TopLeftCorner[0]] : _.TopLeftCorner, C = _.TileWidth * v, E = _.TileHeight * v; + let w = d.BoundingBox; + w && p && (w = [ + w[1], + w[0], + w[3], + w[2] ]); - let L = [ - x[0] + M * p.MinTileCol, - x[1] - E * (1 + p.MaxTileRow), - x[0] + M * (1 + p.MaxTileCol), - x[1] - E * p.MinTileRow + let R = [ + x[0] + C * y.MinTileCol, + x[1] - E * (1 + y.MaxTileRow), + x[0] + C * (1 + y.MaxTileCol), + x[1] - E * y.MinTileRow ]; - if (R !== void 0 && !Ii(R, L)) { - const T = n.WGS84BoundingBox, $ = J("EPSG:4326").getExtent(); - if (L = R, T) - m = T[0] === $[0] && T[2] === $[2]; + if (w !== void 0 && !xi(w, R)) { + const L = n.WGS84BoundingBox, G = q("EPSG:4326").getExtent(); + if (R = w, L) + m = L[0] === G[0] && L[2] === G[2]; else { - const ft = Hu( - R, + const dt = ju( + w, d.SupportedCRS, "EPSG:4326" ); - m = ft[0] - 1e-10 <= $[0] && ft[2] + 1e-10 >= $[2]; + m = dt[0] - 1e-10 <= G[0] && dt[2] + 1e-10 >= G[2]; } } - const N = t_( + const A = tp( d, - L, + R, a - ), G = []; - let U = t.requestEncoding; - if (U = U !== void 0 ? U : "", "OperationsMetadata" in i && "GetTile" in i.OperationsMetadata) { - const T = i.OperationsMetadata.GetTile.DCP.HTTP.Get; - for (let $ = 0, ft = T.length; $ < ft; ++$) - if (T[$].Constraint) { - const k = T[$].Constraint.find(function(A) { - return A.name == "GetEncoding"; + ), k = []; + let Z = t.requestEncoding; + if (Z = Z !== void 0 ? Z : "", "OperationsMetadata" in i && "GetTile" in i.OperationsMetadata) { + const L = i.OperationsMetadata.GetTile.DCP.HTTP.Get; + for (let G = 0, dt = L.length; G < dt; ++G) + if (L[G].Constraint) { + const D = L[G].Constraint.find(function(I) { + return I.name == "GetEncoding"; }).AllowedValues.Value; - if (U === "" && (U = k[0]), U === "KVP") - k.includes("KVP") && G.push(T[$].href); + if (Z === "" && (Z = D[0]), Z === "KVP") + D.includes("KVP") && k.push(L[G].href); else break; } else - T[$].href && (U = "KVP", G.push(T[$].href)); + L[G].href && (Z = "KVP", k.push(L[G].href)); } - return G.length === 0 && (U = "REST", n.ResourceURL.forEach(function(T) { - T.resourceType === "tile" && (l = T.format, G.push(T.template)); + return k.length === 0 && (Z = "REST", n.ResourceURL.forEach(function(L) { + L.resourceType === "tile" && (l = L.format, k.push(L.template)); })), { - urls: G, + urls: k, layer: t.layer, matrixSet: o, format: l, projection: f, - requestEncoding: U, - tileGrid: N, + requestEncoding: Z, + tileGrid: A, style: h, dimensions: c, wrapX: m, crossOrigin: t.crossOrigin }; } -class Gd { +class Ud { constructor() { this.dataProjection = void 0, this.defaultFeatureProjection = void 0, this.supportedMediaTypes = null; } getReadOptions(t, e) { if (e) { - let n = e.dataProjection ? J(e.dataProjection) : this.readProjection(t); - e.extent && n && n.getUnits() === "tile-pixels" && (n = J(n), n.setWorldExtent(e.extent)), e = { + let n = e.dataProjection ? q(e.dataProjection) : this.readProjection(t); + e.extent && n && n.getUnits() === "tile-pixels" && (n = q(n), n.setWorldExtent(e.extent)), e = { dataProjection: n, featureProjection: e.featureProjection }; @@ -13346,34 +13512,34 @@ class Gd { ); } getType() { - return W(); + return V(); } readFeature(t, e) { - return W(); + return V(); } readFeatures(t, e) { - return W(); + return V(); } readGeometry(t, e) { - return W(); + return V(); } readProjection(t) { - return W(); + return V(); } writeFeature(t, e) { - return W(); + return V(); } writeFeatures(t, e) { - return W(); + return V(); } writeGeometry(t, e) { - return W(); + return V(); } } -function Hs(i, t, e) { - const n = e ? J(e.featureProjection) : null, s = e ? J(e.dataProjection) : null; +function Ks(i, t, e) { + const n = e ? q(e.featureProjection) : null, s = e ? q(e.dataProjection) : null; let r; - if (n && s && !be(n, s) ? r = (t ? i.clone() : i).transform( + if (n && s && !Ae(n, s) ? r = (t ? i.clone() : i).transform( t ? n : s, t ? s : n ) : r = i, t && e && e.decimals !== void 0) { @@ -13386,11 +13552,11 @@ function Hs(i, t, e) { } return r; } -function Rl(i, t) { - const e = t ? J(t.featureProjection) : null, n = t ? J(t.dataProjection) : null; - return e && n && !be(e, n) ? Hu(i, n, e) : i; +function Al(i, t) { + const e = t ? q(t.featureProjection) : null, n = t ? q(t.dataProjection) : null; + return e && n && !Ae(e, n) ? ju(i, n, e) : i; } -class Wr extends Qi { +class qr extends on { constructor(t, e, n) { if (super(), this.ends_ = [], this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, Array.isArray(t[0])) this.setCoordinates( @@ -13407,16 +13573,16 @@ class Wr extends Qi { const r = t, o = [], a = []; for (let l = 0, h = r.length; l < h; ++l) { const c = r[l]; - l === 0 && (s = c.getLayout()), Ht(o, c.getFlatCoordinates()), a.push(o.length); + l === 0 && (s = c.getLayout()), Kt(o, c.getFlatCoordinates()), a.push(o.length); } this.setFlatCoordinates(s, o), this.ends_ = a; } } appendLineString(t) { - this.flatCoordinates ? Ht(this.flatCoordinates, t.getFlatCoordinates().slice()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed(); + this.flatCoordinates ? Kt(this.flatCoordinates, t.getFlatCoordinates().slice()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed(); } clone() { - const t = new Wr( + const t = new qr( this.flatCoordinates.slice(), this.layout, this.ends_.slice() @@ -13424,15 +13590,15 @@ class Wr extends Qi { return t.applyProperties(this), t; } closestPointXY(t, e, n, s) { - return s < qi(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( - ll( + return s < rn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( + fl( this.flatCoordinates, 0, this.ends_, this.stride, 0 ) - ), this.maxDeltaRevision_ = this.getRevision()), cl( + ), this.maxDeltaRevision_ = this.getRevision()), ml( this.flatCoordinates, 0, this.ends_, @@ -13446,7 +13612,7 @@ class Wr extends Qi { )); } getCoordinateAtM(t, e, n) { - return this.layout != "XYM" && this.layout != "XYZM" || this.flatCoordinates.length === 0 ? null : (e = e !== void 0 ? e : !1, n = n !== void 0 ? n : !1, K1( + return this.layout != "XYM" && this.layout != "XYZM" || this.flatCoordinates.length === 0 ? null : (e = e !== void 0 ? e : !1, n = n !== void 0 ? n : !1, j1( this.flatCoordinates, 0, this.ends_, @@ -13457,7 +13623,7 @@ class Wr extends Qi { )); } getCoordinates() { - return Rs( + return Fs( this.flatCoordinates, 0, this.ends_, @@ -13468,7 +13634,7 @@ class Wr extends Qi { return this.ends_; } getLineString(t) { - return t < 0 || this.ends_.length <= t ? null : new bs( + return t < 0 || this.ends_.length <= t ? null : new Ds( this.flatCoordinates.slice( t === 0 ? 0 : this.ends_[t - 1], this.ends_[t] @@ -13480,7 +13646,7 @@ class Wr extends Qi { const t = this.flatCoordinates, e = this.ends_, n = this.layout, s = []; let r = 0; for (let o = 0, a = e.length; o < a; ++o) { - const l = e[o], h = new bs( + const l = e[o], h = new Ds( t.slice(r, l), n ); @@ -13493,20 +13659,20 @@ class Wr extends Qi { let n = 0; const s = this.ends_, r = this.stride; for (let o = 0, a = s.length; o < a; ++o) { - const l = s[o], h = fd( + const l = s[o], h = pd( e, n, l, r, 0.5 ); - Ht(t, h), n = l; + Kt(t, h), n = l; } return t; } getSimplifiedGeometryInternal(t) { const e = [], n = []; - return e.length = $g( + return e.length = Gg( this.flatCoordinates, 0, this.ends_, @@ -13515,13 +13681,13 @@ class Wr extends Qi { e, 0, n - ), new Wr(e, "XY", n); + ), new qr(e, "XY", n); } getType() { return "MultiLineString"; } intersectsExtent(t) { - return Hg( + return Wg( this.flatCoordinates, 0, this.ends_, @@ -13531,7 +13697,7 @@ class Wr extends Qi { } setCoordinates(t, e) { this.setLayout(e, t, 2), this.flatCoordinates || (this.flatCoordinates = []); - const n = ul( + const n = pl( this.flatCoordinates, 0, t, @@ -13541,8 +13707,8 @@ class Wr extends Qi { this.flatCoordinates.length = n.length === 0 ? 0 : n[n.length - 1], this.changed(); } } -const bl = Wr; -class Ll extends Qi { +const Pl = qr; +class Ol extends on { constructor(t, e) { super(), e && !Array.isArray(t[0]) ? this.setFlatCoordinates( e, @@ -13553,21 +13719,21 @@ class Ll extends Qi { ); } appendPoint(t) { - this.flatCoordinates ? Ht(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.changed(); + this.flatCoordinates ? Kt(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.changed(); } clone() { - const t = new Ll( + const t = new Ol( this.flatCoordinates.slice(), this.layout ); return t.applyProperties(this), t; } closestPointXY(t, e, n, s) { - if (s < qi(this.getExtent(), t, e)) + if (s < rn(this.getExtent(), t, e)) return s; const r = this.flatCoordinates, o = this.stride; for (let a = 0, l = r.length; a < l; a += o) { - const h = ki( + const h = Wi( t, e, r[a], @@ -13583,7 +13749,7 @@ class Ll extends Qi { return s; } getCoordinates() { - return gi( + return Ci( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -13592,7 +13758,7 @@ class Ll extends Qi { } getPoint(t) { const e = this.flatCoordinates ? this.flatCoordinates.length / this.stride : 0; - return t < 0 || e <= t ? null : new Ci( + return t < 0 || e <= t ? null : new oi( this.flatCoordinates.slice( t * this.stride, (t + 1) * this.stride @@ -13603,7 +13769,7 @@ class Ll extends Qi { getPoints() { const t = this.flatCoordinates, e = this.layout, n = this.stride, s = []; for (let r = 0, o = t.length; r < o; r += n) { - const a = new Ci(t.slice(r, r + n), e); + const a = new oi(t.slice(r, r + n), e); s.push(a); } return s; @@ -13615,13 +13781,13 @@ class Ll extends Qi { const e = this.flatCoordinates, n = this.stride; for (let s = 0, r = e.length; s < r; s += n) { const o = e[s], a = e[s + 1]; - if (Ya(t, o, a)) + if (Qa(t, o, a)) return !0; } return !1; } setCoordinates(t, e) { - this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = _o( + this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Mo( this.flatCoordinates, 0, t, @@ -13629,13 +13795,13 @@ class Ll extends Qi { ), this.changed(); } } -const Tl = Ll; -function s_(i, t, e, n) { +const Ro = Ol; +function sp(i, t, e, n) { const s = []; - let r = ue(); + let r = fe(); for (let o = 0, a = e.length; o < a; ++o) { const l = e[o]; - r = Eu( + r = Su( i, t, l[0], @@ -13644,7 +13810,7 @@ function s_(i, t, e, n) { } return s; } -class Hr extends Qi { +class Jr extends on { constructor(t, e, n) { if (super(), this.endss_ = [], this.flatInteriorPointsRevision_ = -1, this.flatInteriorPoints_ = null, this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, this.orientedRevision_ = -1, this.orientedFlatCoordinates_ = null, !n && !Array.isArray(t[0])) { let s = this.getLayout(); @@ -13655,7 +13821,7 @@ class Hr extends Qi { const u = o.length, d = c.getEnds(); for (let f = 0, g = d.length; f < g; ++f) d[f] += u; - Ht(o, c.getFlatCoordinates()), a.push(d); + Kt(o, c.getFlatCoordinates()), a.push(d); } e = s, t = o, n = a; } @@ -13673,7 +13839,7 @@ class Hr extends Qi { this.flatCoordinates = t.getFlatCoordinates().slice(), e = t.getEnds().slice(), this.endss_.push(); else { const n = this.flatCoordinates.length; - Ht(this.flatCoordinates, t.getFlatCoordinates()), e = t.getEnds().slice(); + Kt(this.flatCoordinates, t.getFlatCoordinates()), e = t.getEnds().slice(); for (let s = 0, r = e.length; s < r; ++s) e[s] += n; } @@ -13683,7 +13849,7 @@ class Hr extends Qi { const t = this.endss_.length, e = new Array(t); for (let s = 0; s < t; ++s) e[s] = this.endss_[s].slice(); - const n = new Hr( + const n = new Jr( this.flatCoordinates.slice(), this.layout, e @@ -13691,15 +13857,15 @@ class Hr extends Qi { return n.applyProperties(this), n; } closestPointXY(t, e, n, s) { - return s < qi(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( - Fg( + return s < rn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( + Ng( this.flatCoordinates, 0, this.endss_, this.stride, 0 ) - ), this.maxDeltaRevision_ = this.getRevision()), Dg( + ), this.maxDeltaRevision_ = this.getRevision()), Fg( this.getOrientedFlatCoordinates(), 0, this.endss_, @@ -13713,7 +13879,7 @@ class Hr extends Qi { )); } containsXY(t, e) { - return Vg( + return Ug( this.getOrientedFlatCoordinates(), 0, this.endss_, @@ -13723,7 +13889,7 @@ class Hr extends Qi { ); } getArea() { - return Zg( + return zg( this.getOrientedFlatCoordinates(), 0, this.endss_, @@ -13732,13 +13898,13 @@ class Hr extends Qi { } getCoordinates(t) { let e; - return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), Ph( + return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), Dh( e, 0, this.endss_, this.stride, t - )) : e = this.flatCoordinates, pa( + )) : e = this.flatCoordinates, Ma( e, 0, this.endss_, @@ -13750,13 +13916,13 @@ class Hr extends Qi { } getFlatInteriorPoints() { if (this.flatInteriorPointsRevision_ != this.getRevision()) { - const t = s_( + const t = sp( this.flatCoordinates, 0, this.endss_, this.stride ); - this.flatInteriorPoints_ = Wg( + this.flatInteriorPoints_ = Vg( this.getOrientedFlatCoordinates(), 0, this.endss_, @@ -13767,12 +13933,12 @@ class Hr extends Qi { return this.flatInteriorPoints_; } getInteriorPoints() { - return new Tl(this.getFlatInteriorPoints().slice(), "XYM"); + return new Ro(this.getFlatInteriorPoints().slice(), "XYM"); } getOrientedFlatCoordinates() { if (this.orientedRevision_ != this.getRevision()) { const t = this.flatCoordinates; - jg(t, 0, this.endss_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = Ph( + Yg(t, 0, this.endss_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = Dh( this.orientedFlatCoordinates_, 0, this.endss_, @@ -13783,7 +13949,7 @@ class Hr extends Qi { } getSimplifiedGeometryInternal(t) { const e = [], n = []; - return e.length = zg( + return e.length = Bg( this.flatCoordinates, 0, this.endss_, @@ -13792,7 +13958,7 @@ class Hr extends Qi { e, 0, n - ), new Hr(e, "XY", n); + ), new Jr(e, "XY", n); } getPolygon(t) { if (t < 0 || this.endss_.length <= t) @@ -13808,7 +13974,7 @@ class Hr extends Qi { if (e !== 0) for (let r = 0, o = n.length; r < o; ++r) n[r] -= e; - return new Dn( + return new Un( this.flatCoordinates.slice(e, s), this.layout, n @@ -13822,7 +13988,7 @@ class Hr extends Qi { if (r !== 0) for (let u = 0, d = l.length; u < d; ++u) l[u] -= r; - const c = new Dn( + const c = new Un( e.slice(r, h), t, l @@ -13835,7 +14001,7 @@ class Hr extends Qi { return "MultiPolygon"; } intersectsExtent(t) { - return Xg( + return Hg( this.getOrientedFlatCoordinates(), 0, this.endss_, @@ -13845,7 +14011,7 @@ class Hr extends Qi { } setCoordinates(t, e) { this.setLayout(e, t, 3), this.flatCoordinates || (this.flatCoordinates = []); - const n = Gg( + const n = kg( this.flatCoordinates, 0, t, @@ -13861,8 +14027,8 @@ class Hr extends Qi { this.changed(); } } -const Il = Hr; -class Xr extends Ku { +const Nl = Jr; +class Qr extends Qu { constructor(t) { super(), this.geometries_ = t || null, this.changeEventsKeys_ = [], this.listenGeometriesChange_(); } @@ -13873,15 +14039,15 @@ class Xr extends Ku { if (!!this.geometries_) for (let t = 0, e = this.geometries_.length; t < e; ++t) this.changeEventsKeys_.push( - it(this.geometries_[t], X.CHANGE, this.changed, this) + et(this.geometries_[t], H.CHANGE, this.changed, this) ); } clone() { - const t = new Xr(null); + const t = new Qr(null); return t.setGeometries(this.geometries_), t.applyProperties(this), t; } closestPointXY(t, e, n, s) { - if (s < qi(this.getExtent(), t, e)) + if (s < rn(this.getExtent(), t, e)) return s; const r = this.geometries_; for (let o = 0, a = r.length; o < a; ++o) @@ -13901,14 +14067,14 @@ class Xr extends Ku { return !1; } computeExtent(t) { - ks(t); + Vs(t); const e = this.geometries_; for (let n = 0, s = e.length; n < s; ++n) - wu(t, e[n].getExtent()); + Ru(t, e[n].getExtent()); return t; } getGeometries() { - return oc(this.geometries_); + return cc(this.geometries_); } getGeometriesArray() { return this.geometries_; @@ -13932,7 +14098,7 @@ class Xr extends Ku { e.push(l), l !== a && (s = !0); } if (s) { - const r = new Xr(null); + const r = new Qr(null); return r.setGeometriesArray(e), r; } else return this.simplifiedGeometryMaxMinSquaredTolerance = t, this; @@ -13957,14 +14123,14 @@ class Xr extends Ku { this.changed(); } scale(t, e, n) { - n || (n = Mi(this.getExtent())); + n || (n = Li(this.getExtent())); const s = this.geometries_; for (let r = 0, o = s.length; r < o; ++r) s[r].scale(t, e, n); this.changed(); } setGeometries(t) { - this.setGeometriesArray(oc(t)); + this.setGeometriesArray(cc(t)); } setGeometriesArray(t) { this.unlistenGeometriesChange_(), this.geometries_ = t, this.listenGeometriesChange_(), this.changed(); @@ -13985,14 +14151,14 @@ class Xr extends Ku { this.unlistenGeometriesChange_(), super.disposeInternal(); } } -function oc(i) { +function cc(i) { const t = []; for (let e = 0, n = i.length; e < n; ++e) t.push(i[e].clone()); return t; } -const r_ = Xr; -class o_ extends Gd { +const Vd = Qr; +class rp extends Ud { constructor() { super(); } @@ -14001,69 +14167,69 @@ class o_ extends Gd { } readFeature(t, e) { return this.readFeatureFromObject( - xr(t), + wr(t), this.getReadOptions(t, e) ); } readFeatures(t, e) { return this.readFeaturesFromObject( - xr(t), + wr(t), this.getReadOptions(t, e) ); } readFeatureFromObject(t, e) { - return W(); + return V(); } readFeaturesFromObject(t, e) { - return W(); + return V(); } readGeometry(t, e) { return this.readGeometryFromObject( - xr(t), + wr(t), this.getReadOptions(t, e) ); } readGeometryFromObject(t, e) { - return W(); + return V(); } readProjection(t) { - return this.readProjectionFromObject(xr(t)); + return this.readProjectionFromObject(wr(t)); } readProjectionFromObject(t) { - return W(); + return V(); } writeFeature(t, e) { return JSON.stringify(this.writeFeatureObject(t, e)); } writeFeatureObject(t, e) { - return W(); + return V(); } writeFeatures(t, e) { return JSON.stringify(this.writeFeaturesObject(t, e)); } writeFeaturesObject(t, e) { - return W(); + return V(); } writeGeometry(t, e) { return JSON.stringify(this.writeGeometryObject(t, e)); } writeGeometryObject(t, e) { - return W(); + return V(); } } -function xr(i) { +function wr(i) { if (typeof i == "string") { const t = JSON.parse(i); return t || null; } else return i !== null ? i : null; } -const a_ = o_; -class l_ extends a_ { +const op = rp; +class ap extends op { constructor(t) { - t = t || {}, super(), this.dataProjection = J( + t = t || {}, super(), this.dataProjection = q( t.dataProjection ? t.dataProjection : "EPSG:4326" - ), t.featureProjection && (this.defaultFeatureProjection = J(t.featureProjection)), this.geometryName_ = t.geometryName, this.extractGeometryName_ = t.extractGeometryName, this.supportedMediaTypes = [ + ), t.featureProjection && (this.defaultFeatureProjection = q(t.featureProjection)), this.geometryName_ = t.geometryName, this.extractGeometryName_ = t.extractGeometryName, this.supportedMediaTypes = [ "application/geo+json", "application/vnd.geo+json" ]; @@ -14075,7 +14241,7 @@ class l_ extends a_ { geometry: t, properties: null }; - const s = Ra(n.geometry, e), r = new zs(); + const s = Aa(n.geometry, e), r = new an(); return this.geometryName_ ? r.setGeometryName(this.geometryName_) : this.extractGeometryName_ && "geometry_name" in n !== void 0 && r.setGeometryName(n.geometry_name), r.setGeometry(s), "id" in n && r.setId(n.id), n.properties && r.setProperties(n.properties, !0), r; } readFeaturesFromObject(t, e) { @@ -14092,12 +14258,12 @@ class l_ extends a_ { return s; } readGeometryFromObject(t, e) { - return Ra(t, e); + return Aa(t, e); } readProjectionFromObject(t) { const e = t.crs; let n; - return e ? e.type == "name" ? n = J(e.properties.name) : e.type === "EPSG" ? n = J("EPSG:" + e.properties.code) : Y(!1, 36) : n = this.dataProjection, n; + return e ? e.type == "name" ? n = q(e.properties.name) : e.type === "EPSG" ? n = q("EPSG:" + e.properties.code) : X(!1, 36) : n = this.dataProjection, n; } writeFeatureObject(t, e) { e = this.adaptOptions(e); @@ -14109,7 +14275,7 @@ class l_ extends a_ { if (s !== void 0 && (n.id = s), !t.hasProperties()) return n; const r = t.getProperties(), o = t.getGeometry(); - return o && (n.geometry = ba(o, e), delete r[t.getGeometryName()]), An(r) || (n.properties = r), n; + return o && (n.geometry = Pa(o, e), delete r[t.getGeometryName()]), Gn(r) || (n.properties = r), n; } writeFeaturesObject(t, e) { e = this.adaptOptions(e); @@ -14122,48 +14288,48 @@ class l_ extends a_ { }; } writeGeometryObject(t, e) { - return ba(t, this.adaptOptions(e)); + return Pa(t, this.adaptOptions(e)); } } -function Ra(i, t) { +function Aa(i, t) { if (!i) return null; let e; switch (i.type) { case "Point": { - e = c_(i); + e = hp(i); break; } case "LineString": { - e = u_( + e = cp( i ); break; } case "Polygon": { - e = m_(i); + e = gp(i); break; } case "MultiPoint": { - e = f_( + e = dp( i ); break; } case "MultiLineString": { - e = d_( + e = up( i ); break; } case "MultiPolygon": { - e = g_( + e = fp( i ); break; } case "GeometryCollection": { - e = h_( + e = lp( i ); break; @@ -14171,77 +14337,77 @@ function Ra(i, t) { default: throw new Error("Unsupported GeoJSON type: " + i.type); } - return Hs(e, !1, t); + return Ks(e, !1, t); } -function h_(i, t) { +function lp(i, t) { const e = i.geometries.map( function(n) { - return Ra(n, t); + return Aa(n, t); } ); - return new r_(e); + return new Vd(e); } -function c_(i) { - return new Ci(i.coordinates); +function hp(i) { + return new oi(i.coordinates); } -function u_(i) { - return new bs(i.coordinates); +function cp(i) { + return new Ds(i.coordinates); } -function d_(i) { - return new bl(i.coordinates); +function up(i) { + return new Pl(i.coordinates); } -function f_(i) { - return new Tl(i.coordinates); +function dp(i) { + return new Ro(i.coordinates); } -function g_(i) { - return new Il(i.coordinates); +function fp(i) { + return new Nl(i.coordinates); } -function m_(i) { - return new Dn(i.coordinates); +function gp(i) { + return new Un(i.coordinates); } -function ba(i, t) { - i = Hs(i, !0, t); +function Pa(i, t) { + i = Ks(i, !0, t); const e = i.getType(); let n; switch (e) { case "Point": { - n = M_(i); + n = xp(i); break; } case "LineString": { - n = p_( + n = pp( i ); break; } case "Polygon": { - n = C_( + n = Cp( i, t ); break; } case "MultiPoint": { - n = v_( + n = yp( i ); break; } case "MultiLineString": { - n = y_( + n = _p( i ); break; } case "MultiPolygon": { - n = x_( + n = vp( i, t ); break; } case "GeometryCollection": { - n = __( + n = mp( i, t ); @@ -14259,54 +14425,54 @@ function ba(i, t) { } return n; } -function __(i, t) { +function mp(i, t) { return t = Object.assign({}, t), delete t.featureProjection, { type: "GeometryCollection", geometries: i.getGeometriesArray().map(function(n) { - return ba(n, t); + return Pa(n, t); }) }; } -function p_(i, t) { +function pp(i, t) { return { type: "LineString", coordinates: i.getCoordinates() }; } -function y_(i, t) { +function _p(i, t) { return { type: "MultiLineString", coordinates: i.getCoordinates() }; } -function v_(i, t) { +function yp(i, t) { return { type: "MultiPoint", coordinates: i.getCoordinates() }; } -function x_(i, t) { +function vp(i, t) { let e; return t && (e = t.rightHanded), { type: "MultiPolygon", coordinates: i.getCoordinates(e) }; } -function M_(i, t) { +function xp(i, t) { return { type: "Point", coordinates: i.getCoordinates() }; } -function C_(i, t) { +function Cp(i, t) { let e; return t && (e = t.rightHanded), { type: "Polygon", coordinates: i.getCoordinates(e) }; } -const E_ = l_; -class st { +const Wd = ap; +class tt { static sendEvent(t, e) { dispatchEvent(new CustomEvent(t, { detail: e })); } @@ -14316,8 +14482,8 @@ class st { * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const $d = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Al = (i) => (...t) => ({ _$litDirective$: i, values: t }); -class Pl { +const Hd = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Fl = (i) => (...t) => ({ _$litDirective$: i, values: t }); +class Dl { constructor(t) { } get _$AU() { @@ -14338,12 +14504,12 @@ class Pl { * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const { I: w_ } = jf, Mr = (i, t) => t === void 0 ? (i == null ? void 0 : i._$litType$) !== void 0 : (i == null ? void 0 : i._$litType$) === t, ac = () => document.createComment(""), lc = (i, t, e) => { +const { I: Mp } = Wf, Sr = (i, t) => t === void 0 ? (i == null ? void 0 : i._$litType$) !== void 0 : (i == null ? void 0 : i._$litType$) === t, uc = () => document.createComment(""), dc = (i, t, e) => { var n; const s = i._$AA.parentNode, r = t === void 0 ? i._$AB : t._$AA; if (e === void 0) { - const o = s.insertBefore(ac(), r), a = s.insertBefore(ac(), r); - e = new w_(o, a, i, i.options); + const o = s.insertBefore(uc(), r), a = s.insertBefore(uc(), r); + e = new Mp(o, a, i, i.options); } else { const o = e._$AB.nextSibling, a = e._$AM, l = a !== i; if (l) { @@ -14359,7 +14525,7 @@ const { I: w_ } = jf, Mr = (i, t) => t === void 0 ? (i == null ? void 0 : i._$li } } return e; -}, S_ = {}, hc = (i, t = S_) => i._$AH = t, cc = (i) => i._$AH, R_ = (i) => { +}, Ep = {}, fc = (i, t = Ep) => i._$AH = t, gc = (i) => i._$AH, wp = (i) => { i._$AR(); }; /** @@ -14367,7 +14533,7 @@ const { I: w_ } = jf, Mr = (i, t) => t === void 0 ? (i == null ? void 0 : i._$li * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Bd = Al(class extends Pl { +const Xd = Fl(class extends Dl { constructor(i) { super(i), this.et = /* @__PURE__ */ new WeakMap(); } @@ -14375,21 +14541,21 @@ const Bd = Al(class extends Pl { return [i]; } update(i, [t]) { - if (Mr(this.it) && (!Mr(t) || this.it.strings !== t.strings)) { - const e = cc(i).pop(); + if (Sr(this.it) && (!Sr(t) || this.it.strings !== t.strings)) { + const e = gc(i).pop(); let n = this.et.get(this.it.strings); if (n === void 0) { const s = document.createDocumentFragment(); - n = gu(bt, s), n.setConnected(!1), this.et.set(this.it.strings, n); + n = _u(bt, s), n.setConnected(!1), this.et.set(this.it.strings, n); } - hc(n, [e]), lc(n, void 0, e); + fc(n, [e]), dc(n, void 0, e); } - if (Mr(t)) { - if (!Mr(this.it) || this.it.strings !== t.strings) { + if (Sr(t)) { + if (!Sr(this.it) || this.it.strings !== t.strings) { const e = this.et.get(t.strings); if (e !== void 0) { - const n = cc(e).pop(); - R_(i), lc(i, void 0, n), hc(i, [n]); + const n = gc(e).pop(); + wp(i), dc(i, void 0, n), fc(i, [n]); } } this.it = t; @@ -14403,15 +14569,15 @@ const Bd = Al(class extends Pl { * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -class La extends Pl { +class Oa extends Dl { constructor(t) { - if (super(t), this.it = bt, t.type !== $d.CHILD) + if (super(t), this.it = bt, t.type !== Hd.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings"); } render(t) { if (t === bt || t == null) return this._t = void 0, this.it = t; - if (t === yi) + if (t === Si) return t; if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value"); @@ -14422,143 +14588,161 @@ class La extends Pl { return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] }; } } -La.directiveName = "unsafeHTML", La.resultType = 1; +Oa.directiveName = "unsafeHTML", Oa.resultType = 1; /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -class Ta extends La { -} -Ta.directiveName = "unsafeSVG", Ta.resultType = 2; -const Fe = Al(Ta); -let zd = "", Zd = !1, Ud = "", Vd, Wd, Hd, ti = [], Xd, Yd = -1, jd = -1; -function b_(i) { - zd = i; -} -function L_() { - return zd; -} -function T_(i) { - Zd = i; -} -function I_() { - return Zd; -} -function A_(i) { - Ud = i; -} -function P_() { - return Ud; -} -function O_(i) { - Vd = i; -} -function N_() { - return Vd; -} -function F_(i) { - Wd = i; -} -function D_() { - return Wd; -} -function k_(i) { - Hd = i; +class Na extends Oa { } -function G_() { - return Hd; -} -function $_(i, t, e) { - ti.push({ - id: t, - type: e, - feature: i - }); -} -function B_(i) { - const t = ti.findIndex((e) => e.id === i); - t !== -1 && ti.splice(t, 1); -} -function z_(i) { - const t = ti.findIndex((e) => e.id === i); - return t !== -1 ? ti[t].feature : void 0; -} -function Z_(i) { - const t = ti.findIndex((e) => e.id === i); - return t !== -1 ? ti[t].type : ""; -} -function U_() { - var i; - (i = ti.find((t) => t.feature.get("isSelected"))) == null || i.feature.set("isSelected", void 0); -} -function V_() { - return ti.map((i) => i.feature); -} -function W_(i) { - Xd = i; -} -function H_() { - return Xd; -} -function X_(i) { - Yd = i; -} -function Y_() { - return Yd; -} -function j_(i) { - jd = i; -} -function K_() { - return jd; -} -function w() { - return { - setTheme: b_, - getTheme: L_, - setCustomDisplay: T_, - isCustomDisplay: I_, - setTargetBoxSize: A_, - getTargetBoxSize: P_, - setGeolocation: O_, - getGeolocation: N_, - setOptions: F_, - getOptions: D_, - setMap: k_, - getMap: G_, - addSelectedFeature: $_, - removeSelectedFeature: B_, - getSelectedFeature: z_, - getCurrentFeatureType: Z_, - getSelectedFeatures: V_, - unselectFeatures: U_, - setBorderConstraint: W_, - getBorderConstraint: H_, - setCurrentItemId: X_, - getCurrentItemId: Y_, - setMaxElement: j_, - getMaxElement: K_ - }; -} -const q_ = `.box-element{position:absolute;top:10px;background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);border:1px solid var(--information-box-background-color);margin-left:5px;margin-right:5px;max-width:302px;width:100%;left:calc(50% - 172px);font-family:sans-serif;display:flex;z-index:5}.box-text-container{width:70%}.box-icon-container{width:30%;display:flex}.box-element-title{display:flex}.box-element-title-text{width:900%;font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color)}.box-element-content{font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color);width:90%}.position-icon{display:flex;justify-content:center;width:50%}.icon-container{width:36px;height:36px;background-color:var(--select-icon-background);border-radius:var(--icon-border-radius)}.icon-container>svg{display:block;margin-left:calc((var(--icon-width) - var(--svg-icon-size)) / 2);margin-top:calc((var(--icon-height) - var(--svg-icon-size)) / 2);width:var(--svg-icon-size)!important;height:var(--svg-icon-size)!important}.icon-container>svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round} -`; -class Kd { - static getAddressFromCoordinate(t) { - return fetch(`https://api3.geo.admin.ch/rest/services/api/MapServer/identify?mapExtent=0,0,100,100&imageDisplay=100,100,100&tolerance=20&geometryType=esriGeometryPoint&geometry=${t[0]},${t[1]}&layers=all:ch.bfs.gebaeude_wohnungs_register&returnGeometry=false&sr=2056`).then((e) => e.json()); +Na.directiveName = "unsafeSVG", Na.resultType = 2; +const Le = Fl(Na); +class gt { + constructor() { + this.customDisplay = !1, this.targetBoxSize = "", this.selectedFeatures = [], this.currentItemId = -1, this.maxElement = -1; } -} -class ot { - static zoomInLabel() { - const t = document.createElement("div"), e = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` - - - - - - - + static setTheme(t) { + this.theme = t; + } + static getTheme() { + return this.theme; + } + static setGeolocation(t) { + this.geolocation = t; + } + static getGeolocation() { + return this.geolocation; + } + setCustomDisplay(t) { + this.customDisplay = t; + } + isCustomDisplay() { + return this.customDisplay; + } + setTargetBoxSize(t) { + this.targetBoxSize = t; + } + getTargetBoxSize() { + return this.targetBoxSize; + } + setOptions(t) { + this.options = t; + } + getOptions() { + return this.options; + } + setMap(t) { + this.map = t; + } + getMap() { + return this.map; + } + addSelectedFeature(t, e, n) { + this.selectedFeatures.push({ + id: e, + type: n, + feature: t + }); + } + removeSelectedFeature(t) { + const e = this.selectedFeatures.findIndex((n) => n.id === t); + e !== -1 && this.selectedFeatures.splice(e, 1); + } + removeLastSelectedFeature() { + this.selectedFeatures.splice(-1); + } + removeAllSelectedFeatures() { + this.selectedFeatures = []; + } + getSelectedFeature(t) { + const e = this.selectedFeatures.findIndex((n) => n.id === t); + return e !== -1 ? this.selectedFeatures[e].feature : void 0; + } + getCurrentFeatureType(t) { + const e = this.selectedFeatures.findIndex((n) => n.id === t); + return e !== -1 ? this.selectedFeatures[e].type : ""; + } + unselectFeatures() { + var t; + (t = this.selectedFeatures.find((e) => e.feature.get("isSelected"))) == null || t.feature.set("isSelected", void 0); + } + getSelectedFeatures() { + return this.selectedFeatures.map((t) => t.feature); + } + setBorderConstraint(t) { + this.borderConstraint = t; + } + getBorderConstraint() { + return this.borderConstraint; + } + setCurrentItemId(t) { + this.currentItemId = t; + } + getCurrentItemId() { + return this.currentItemId; + } + setMaxElement(t) { + this.maxElement = t; + } + getMaxElement() { + return this.maxElement; + } +} +gt.theme = ""; +const Sp = `@media only screen and (min-width: 351px) and (max-width: 995px){.box-element{left:calc(50% - 167px);width:calc(100% - 30px);max-width:302px}}@media only screen and (max-width: 350px){.box-element{left:10px;width:calc(100% - 50px);max-width:302px}}@media only screen and (min-width: 996px){.box-element{left:calc((100% - (var(--select-box-width) + 30px)) / 2);width:calc(var(--select-box-width))}}.box-element{position:absolute;top:10px;background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);border:1px solid var(--information-box-background-color);font-family:sans-serif;display:flex;z-index:5}.box-text-container{width:calc(100% - 80px)}.box-icon-container{width:80px;display:flex}.box-element-title{display:flex}.box-element-title-text{width:900%;font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color)}.box-element-content{font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color);width:90%}.position-icon{display:flex;justify-content:flex-end;width:50%}.icon-container{width:36px;height:36px;background-color:var(--select-icon-background);border-radius:var(--icon-border-radius)}.icon-container>svg{display:block;margin-left:calc((var(--icon-width) - var(--svg-icon-size)) / 2);margin-top:calc((var(--icon-height) - var(--svg-icon-size)) / 2);width:var(--svg-icon-size)!important;height:var(--svg-icon-size)!important}.icon-container>svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round} +`; +class Wt { + static setEvent(t, e, n) { + n.getView().on(t, e); + } + static unsetEvent(t, e, n) { + n.getView().on(t, e); + } + static registerWindowListener(t, e, n, s) { + window.addEventListener(t, () => { + Wt.unsetEvent(e, n, s), Wt.setEvent(e, n, s); + }); + } + static registerBorderConstaintMapEvent(t, e, n, s) { + s.border.url !== "" && Wt.registerWindowListener( + "border-contraint-enabled", + t, + e, + n + ), Wt.setEvent(t, e, n); + } + static setCursorEvent(t) { + t.on("movestart", () => { + t.getViewport().style.cursor = "all-scroll"; + }), t.on("moveend", () => { + t.getViewport().style.cursor = "default"; + }); + } + static setResizeEvent(t, e, n) { + const s = n.getSize(); + s && t.style.setProperty(e, s[0] * 0.33 + "px"), n.on("change:size", () => { + const r = n.getSize(); + r && t.style.setProperty(e, r[0] * 0.33 + "px"); + }); + } +} +class Yd { + static getAddressFromCoordinate(t) { + return fetch(`https://api3.geo.admin.ch/rest/services/api/MapServer/identify?mapExtent=0,0,100,100&imageDisplay=100,100,100&tolerance=20&geometryType=esriGeometryPoint&geometry=${t[0]},${t[1]}&layers=all:ch.bfs.gebaeude_wohnungs_register&returnGeometry=false&sr=2056`).then((e) => e.json()); + } +} +class st { + static zoomInLabel() { + const t = document.createElement("div"), e = document.createElementNS("http://www.w3.org/2000/svg", "svg"); + return e.setAttributeNS(null, "width", "32"), e.setAttributeNS(null, "height", "32"), e.setAttributeNS(null, "viewBox", "0 0 32 32"), e.innerHTML = ` + + + + + + + @@ -14610,7 +14794,7 @@ class ot { `, t.appendChild(e), t; } } -ot.info = ` +st.info = ` @@ -14625,7 +14809,7 @@ ot.info = ` `; -ot.warning = ` +st.warning = ` @@ -14640,7 +14824,7 @@ ot.warning = ` `; -ot.error = ` +st.error = ` @@ -14656,7 +14840,7 @@ ot.error = ` `; -ot.mapPin = ` +st.mapPin = ` @@ -14686,7 +14870,7 @@ ot.mapPin = ` `; -ot.mapPinClick = ` +st.mapPinClick = ` @@ -14715,7 +14899,7 @@ ot.mapPinClick = ` `; -ot.mapPinSelect = ` +st.mapPinSelect = ` @@ -14744,7 +14928,7 @@ ot.mapPinSelect = ` `; -ot.information = ` +st.information = ` @@ -14759,7 +14943,7 @@ ot.information = ` `; -ot.geolocation = ` +st.geolocation = ` @@ -14773,7 +14957,7 @@ ot.geolocation = ` `; -ot.rotation = ` +st.rotation = ` @@ -14783,7 +14967,7 @@ ot.rotation = ` `; -ot.iconRecenter = ` +st.iconRecenter = ` @@ -14797,7 +14981,7 @@ ot.iconRecenter = ` `; -ot.iconRemoveSelection = ` +st.iconRemoveSelection = ` @@ -14806,7 +14990,7 @@ ot.iconRemoveSelection = ` `; -ot.search = ` +st.search = ` @@ -14820,7 +15004,7 @@ ot.search = ` `; -ot.cross = ` +st.cross = ` @@ -14834,7 +15018,7 @@ ot.cross = ` `; -ot.stack = ` +st.stack = ` @@ -14850,48 +15034,55 @@ ot.stack = ` `; -var J_ = Object.defineProperty, Q_ = Object.getOwnPropertyDescriptor, xo = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? Q_(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var Rp = Object.defineProperty, bp = Object.getOwnPropertyDescriptor, bo = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? bp(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && J_(t, e, s), s; + return n && s && Rp(t, e, s), s; }; -let kn = class extends At { - constructor() { - super(), this.currentPosition = [0, 0], this._isRecenterButton = !0, this._currentPosition = "", w().getMap().getView().on("change:center", () => { - const i = w().getSelectedFeature(w().getCurrentItemId()); - if (i) { - const t = i.get("geom"); - this._isRecenterButton = t.intersectsExtent(w().getMap().getView().calculateExtent(w().getMap().getSize())); - } - }), window.addEventListener("open-select-create-box", (i) => { - Kd.getAddressFromCoordinate(i.detail).then((t) => { - this._currentPosition = t.results.length > 0 ? `proche de ${t.results[0].attributes.strname_deinr}` : "Aucune adresse proche reconnue"; - }); +let Ji = class extends Pt { + constructor(i) { + super(), this.currentPosition = [0, 0], this._isRecenterButton = !0, this._currentPosition = "", this.store = i; + const t = this.store.getMap(), e = this.store.getOptions(); + if (!t || !e) + throw new Error("invalid map or options"); + Wt.registerBorderConstaintMapEvent("change:center", () => this.setCenterChange(), t, e), window.addEventListener("open-select-create-box", (n) => { + Yd.getAddressFromCoordinate(n.detail).then((s) => { + this._currentPosition = s.results.length > 0 ? `\xC0 proximit\xE9 de ${s.results[0].attributes.strname_deinr}` : "Aucune adresse proche reconnue"; + }), this.setCenterChange(); }); } + setCenterChange() { + var t, e; + const i = this.store.getSelectedFeature(this.store.getCurrentItemId()); + if (i) { + const n = i.get("geom"); + this._isRecenterButton = n.intersectsExtent((e = this.store.getMap()) == null ? void 0 : e.getView().calculateExtent((t = this.store.getMap()) == null ? void 0 : t.getSize())); + } + } connectedCallback() { super.connectedCallback(); } render() { + var i; return Lt` -
+
-
${w().getOptions().selectionTargetBoxMessage}
+
${(i = this.store.getOptions()) == null ? void 0 : i.selectionTargetBoxMessage}
${this._currentPosition}
- ${Bd( + ${Xd( this._isRecenterButton ? Lt`` : Lt`
- ${Fe(ot.iconRecenter)} + ${Le(st.iconRecenter)}
` )}
- ${Fe(ot.iconRemoveSelection)} + ${Le(st.iconRemoveSelection)}
@@ -14899,38 +15090,43 @@ let kn = class extends At { `; } recenter() { - st.sendEvent("recenter-selected-element", void 0); + tt.sendEvent("recenter-selected-element", void 0); } unselect() { - const i = w().getOptions(); + var e; + const i = this.store.getOptions(); let t = ""; - switch (i.mode.type === "mix" ? t = w().getCurrentFeatureType(w().getCurrentItemId()) : t = i.mode.type, t) { + switch ((i == null ? void 0 : i.mode.type) === "mix" ? t = this.store.getCurrentFeatureType(this.store.getCurrentItemId()) : t = (e = i == null ? void 0 : i.mode.type) != null ? e : "", t) { case "select": - st.sendEvent("icon-clicked", w().getCurrentItemId()); + tt.sendEvent("icon-clicked", this.store.getCurrentItemId()); break; case "create": - st.sendEvent("icon-removed", void 0); + tt.sendEvent("icon-removed", void 0); break; } } }; -kn.styles = [xt(q_)]; -xo([ - ji() -], kn.prototype, "currentPosition", 2); -xo([ - Yt() -], kn.prototype, "_isRecenterButton", 2); -xo([ - Yt() -], kn.prototype, "_currentPosition", 2); -kn = xo([ - Xt("select-information-box-element") -], kn); -class qd extends Dt { - constructor() { - const t = document.createElement("select-information-box-element"); - super({ element: t }), this.div = t; +Ji.styles = [yt(Sp)]; +bo([ + Te() +], Ji.prototype, "currentPosition", 2); +bo([ + It() +], Ji.prototype, "_isRecenterButton", 2); +bo([ + It() +], Ji.prototype, "_currentPosition", 2); +Ji = bo([ + qt("select-information-box-element") +], Ji); +class kl extends kt { + constructor(t) { + const e = new Ji(t); + super({ element: e }), this.div = e; + const n = t.getMap(); + if (!n) + throw new Error("missing map"); + Wt.setResizeEvent(this.div, "--select-box-width", n); } disable() { this.div.classList.add("disabled"); @@ -14942,25 +15138,25 @@ class qd extends Dt { this.div.classList.remove("fade-in"), this.div.classList.add("fade-out"); } } -class tp { +class Lp { constructor() { - this.clickImage = document.createElement("img"), this.clickImage.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(ot.mapPinClick), this.selectImage = document.createElement("img"), this.selectImage.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(ot.mapPinSelect); + this.clickImage = document.createElement("img"), this.clickImage.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(st.mapPinClick), this.selectImage = document.createElement("img"), this.selectImage.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(st.mapPinSelect); } clusterWithIcon(t) { const e = t.get("features").length; let n; return e === 1 && t.get("features")[0].get("isSelected") ? n = new Vt({ zIndex: 1, - image: new us({ + image: new xs({ img: this.selectImage, imgSize: [42, 54], - anchor: [0.5, 54], + anchor: [0.52, 55], anchorXUnits: "fraction", anchorYUnits: "pixels" }) }) : e === 1 && t.get("features")[0].get("isClick") ? n = new Vt({ zIndex: 1, - image: new us({ + image: new xs({ img: this.clickImage, imgSize: [42, 54], anchor: [0.5, 54], @@ -14969,84 +15165,85 @@ class tp { }) }) : e === 1 && !t.get("features")[0].get("isClick") ? n = new Vt({ zIndex: 1, - image: new us({ - src: "data:image/svg+xml;charset=utf-8," + encodeURIComponent(ot.mapPin), + image: new xs({ + src: "data:image/svg+xml;charset=utf-8," + encodeURIComponent(st.mapPin), anchor: [0.5, 54], anchorXUnits: "fraction", anchorYUnits: "pixels" }) }) : t.get("features").find((s) => s.get("isClick")) ? n = new Vt({ - image: new qe({ + image: new ni({ radius: 15, - stroke: new Ee({ + stroke: new Re({ color: "#fff" }), - fill: new he({ + fill: new Yt({ color: "#EF4444" }) }), - text: new Ca({ + text: new ba({ text: e.toString(), font: "14px sans-serif", - fill: new he({ + fill: new Yt({ color: "#fff" }) }) }) : n = new Vt({ - image: new qe({ + image: new ni({ radius: 15, - stroke: new Ee({ + stroke: new Re({ color: "#fff" }), - fill: new he({ + fill: new Yt({ color: "#334155" }) }), - text: new Ca({ + text: new ba({ text: e.toString(), font: "14px sans-serif", - fill: new he({ + fill: new Yt({ color: "#fff" }) }) }), n; } } -class Jd { - static setCustomStyleWithouInfoBox() { - const t = w().getOptions(); - w().setCustomDisplay(t.search.displaySearch); - const e = t.search.displaySearch ? "small" : "no-box"; - w().setTargetBoxSize(e); +class jd { + static setCustomStyleWithouInfoBox(t) { + var s, r; + const e = t.getOptions(); + t.setCustomDisplay((r = (s = e == null ? void 0 : e.search) == null ? void 0 : s.displaySearch) != null ? r : !1); + const n = e != null && e.search.displaySearch ? "small" : "no-box"; + t.setTargetBoxSize(n); } } -const Ia = "http://www.w3.org/2001/XMLSchema-instance"; -function K(i, t) { - return nf().createElementNS(i, t); +const Fa = "http://www.w3.org/2001/XMLSchema-instance"; +function j(i, t) { + return Qd().createElementNS(i, t); } -function Vi(i, t) { - return Qd(i, t, []).join(""); +function Qi(i, t) { + return Kd(i, t, []).join(""); } -function Qd(i, t, e) { +function Kd(i, t, e) { if (i.nodeType == Node.CDATA_SECTION_NODE || i.nodeType == Node.TEXT_NODE) t ? e.push(String(i.nodeValue).replace(/(\r\n|\r|\n)/g, "")) : e.push(i.nodeValue); else { let n; for (n = i.firstChild; n; n = n.nextSibling) - Qd(n, t, e); + Kd(n, t, e); } return e; } -function Fi(i) { +function Ui(i) { return "documentElement" in i; } -function ep(i, t, e) { +function Tp(i, t, e) { return i.getAttributeNS(t, e) || ""; } -function Di(i) { +function Vi(i) { return new DOMParser().parseFromString(i, "application/xml"); } -function tf(i, t) { +function qd(i, t) { return function(e, n) { const s = i.call( t !== void 0 ? t : this, @@ -15055,11 +15252,11 @@ function tf(i, t) { ); if (s !== void 0) { const r = n[n.length - 1]; - Ht(r, s); + Kt(r, s); } }; } -function H(i, t) { +function W(i, t) { return function(e, n) { const s = i.call( t !== void 0 ? t : this, @@ -15069,7 +15266,7 @@ function H(i, t) { s !== void 0 && n[n.length - 1].push(s); }; } -function Z(i, t) { +function z(i, t) { return function(e, n) { const s = i.call( t !== void 0 ? t : this, @@ -15079,7 +15276,7 @@ function Z(i, t) { s !== void 0 && (n[n.length - 1] = s); }; } -function le(i, t, e) { +function ue(i, t, e) { return function(n, s) { const r = i.call( e !== void 0 ? e : this, @@ -15106,7 +15303,7 @@ function O(i, t, e) { } }; } -function C(i, t) { +function M(i, t) { return function(e, n, s) { i.call( t !== void 0 ? t : this, @@ -15116,24 +15313,24 @@ function C(i, t) { ), s[s.length - 1].node.appendChild(e); }; } -function ce(i, t) { +function de(i, t) { return function(e, n, s) { const o = n[n.length - 1].node; let a = i; a === void 0 && (a = s); const l = t !== void 0 ? t : o.namespaceURI; - return K(l, a); + return j(l, a); }; } -const ef = ce(); -function ut(i, t, e) { +const Jd = de(); +function ct(i, t, e) { e = e !== void 0 ? e : {}; let n, s; for (n = 0, s = i.length; n < s; ++n) e[i[n]] = t; return e; } -function Bi(i, t, e, n) { +function Yi(i, t, e, n) { let s; for (s = t.firstElementChild; s; s = s.nextElementSibling) { const r = i[s.namespaceURI]; @@ -15143,10 +15340,10 @@ function Bi(i, t, e, n) { } } } -function B(i, t, e, n, s) { - return n.push(i), Bi(t, e, n, s), n.pop(); +function $(i, t, e, n, s) { + return n.push(i), Yi(t, e, n, s), n.pop(); } -function ip(i, t, e, n, s, r) { +function Ip(i, t, e, n, s, r) { const o = (s !== void 0 ? s : e).length; let a, l; for (let h = 0; h < o; ++h) @@ -15163,19 +15360,19 @@ function ip(i, t, e, n, s, r) { )); } function Et(i, t, e, n, s, r, o) { - return s.push(i), ip(t, e, n, s, r, o), s.pop(); + return s.push(i), Ip(t, e, n, s, r, o), s.pop(); } -let Jo; -function np() { - return Jo === void 0 && typeof XMLSerializer < "u" && (Jo = new XMLSerializer()), Jo; +let ra; +function Ap() { + return ra === void 0 && typeof XMLSerializer < "u" && (ra = new XMLSerializer()), ra; } -let Qo; -function nf() { - return Qo === void 0 && typeof document < "u" && (Qo = document.implementation.createDocument("", "", null)), Qo; +let oa; +function Qd() { + return oa === void 0 && typeof document < "u" && (oa = document.implementation.createDocument("", "", null)), oa; } -class sp extends Gd { +class Pp extends Ud { constructor() { - super(), this.xmlSerializer_ = np(); + super(), this.xmlSerializer_ = Ap(); } getType() { return "xml"; @@ -15183,10 +15380,10 @@ class sp extends Gd { readFeature(t, e) { if (t) if (typeof t == "string") { - const n = Di(t); + const n = Vi(t); return this.readFeatureFromDocument(n, e); } else - return Fi(t) ? this.readFeatureFromDocument( + return Ui(t) ? this.readFeatureFromDocument( t, e ) : this.readFeatureFromNode(t, e); @@ -15203,10 +15400,10 @@ class sp extends Gd { readFeatures(t, e) { if (t) if (typeof t == "string") { - const n = Di(t); + const n = Vi(t); return this.readFeaturesFromDocument(n, e); } else - return Fi(t) ? this.readFeaturesFromDocument( + return Ui(t) ? this.readFeaturesFromDocument( t, e ) : this.readFeaturesFromNode( @@ -15219,22 +15416,22 @@ class sp extends Gd { readFeaturesFromDocument(t, e) { const n = []; for (let s = t.firstChild; s; s = s.nextSibling) - s.nodeType == Node.ELEMENT_NODE && Ht( + s.nodeType == Node.ELEMENT_NODE && Kt( n, this.readFeaturesFromNode(s, e) ); return n; } readFeaturesFromNode(t, e) { - return W(); + return V(); } readGeometry(t, e) { if (t) if (typeof t == "string") { - const n = Di(t); + const n = Vi(t); return this.readGeometryFromDocument(n, e); } else - return Fi(t) ? this.readGeometryFromDocument( + return Ui(t) ? this.readGeometryFromDocument( t, e ) : this.readGeometryFromNode( @@ -15253,10 +15450,10 @@ class sp extends Gd { readProjection(t) { if (t) if (typeof t == "string") { - const e = Di(t); + const e = Vi(t); return this.readProjectionFromDocument(e); } else - return Fi(t) ? this.readProjectionFromDocument(t) : this.readProjectionFromNode(t); + return Ui(t) ? this.readProjectionFromDocument(t) : this.readProjectionFromNode(t); else return null; } @@ -15288,19 +15485,19 @@ class sp extends Gd { return null; } } -const sf = sp, Qe = "http://www.opengis.net/gml", rp = /^\s*$/; -class St extends sf { +const tf = Pp, ri = "http://www.opengis.net/gml", Op = /^\s*$/; +class St extends tf { constructor(t) { super(), t = t || {}, this.featureType = t.featureType, this.featureNS = t.featureNS, this.srsName = t.srsName, this.schemaLocation = "", this.FEATURE_COLLECTION_PARSERS = {}, this.FEATURE_COLLECTION_PARSERS[this.namespace] = { - featureMember: H(this.readFeaturesInternal), - featureMembers: Z(this.readFeaturesInternal) + featureMember: W(this.readFeaturesInternal), + featureMembers: z(this.readFeaturesInternal) }, this.supportedMediaTypes = ["application/gml+xml"]; } readFeaturesInternal(t, e) { const n = t.localName; let s = null; if (n == "FeatureCollection") - s = B( + s = $( [], this.FEATURE_COLLECTION_PARSERS, t, @@ -15318,16 +15515,16 @@ class St extends sf { if (g.nodeType === 1) { const m = g.nodeName.split(":").pop(); if (!o.includes(m)) { - let _ = "", y = 0; - const p = g.namespaceURI; + let p = "", _ = 0; + const y = g.namespaceURI; for (const v in a) { - if (a[v] === p) { - _ = v; + if (a[v] === y) { + p = v; break; } - ++y; + ++_; } - _ || (_ = l + y, a[_] = p), o.push(_ + ":" + m); + p || (p = l + _, a[p] = y), o.push(p + ":" + m); } } } @@ -15341,16 +15538,16 @@ class St extends sf { for (const d in a) { const f = {}; for (let g = 0, m = u.length; g < m; ++g) - (u[g].includes(":") ? u[g].split(":")[0] : h) === d && (f[u[g].split(":").pop()] = n == "featureMembers" ? H(this.readFeatureElement, this) : Z(this.readFeatureElement, this)); + (u[g].includes(":") ? u[g].split(":")[0] : h) === d && (f[u[g].split(":").pop()] = n == "featureMembers" ? W(this.readFeatureElement, this) : z(this.readFeatureElement, this)); c[a[d]] = f; } - n == "featureMember" || n == "member" ? s = B(void 0, c, t, e) : s = B([], c, t, e); + n == "featureMember" || n == "member" ? s = $(void 0, c, t, e) : s = $([], c, t, e); } return s === null && (s = []), s; } readGeometryOrExtent(t, e) { const n = e[0]; - return n.srsName = t.firstElementChild.getAttribute("srsName"), n.srsDimension = t.firstElementChild.getAttribute("srsDimension"), B( + return n.srsName = t.firstElementChild.getAttribute("srsName"), n.srsDimension = t.firstElementChild.getAttribute("srsDimension"), $( null, this.GEOMETRY_PARSERS, t, @@ -15360,11 +15557,11 @@ class St extends sf { } readExtentElement(t, e) { const n = e[0], s = this.readGeometryOrExtent(t, e); - return s ? Rl(s, n) : void 0; + return s ? Al(s, n) : void 0; } readGeometryElement(t, e) { const n = e[0], s = this.readGeometryOrExtent(t, e); - return s ? Hs(s, !1, n) : void 0; + return s ? Ks(s, !1, n) : void 0; } readFeatureElementInternal(t, e, n) { let s; @@ -15372,7 +15569,7 @@ class St extends sf { for (let o = t.firstElementChild; o; o = o.nextElementSibling) { let a; const l = o.localName; - o.childNodes.length === 0 || o.childNodes.length === 1 && (o.firstChild.nodeType === 3 || o.firstChild.nodeType === 4) ? (a = Vi(o, !1), rp.test(a) && (a = void 0)) : (n && (a = l === "boundedBy" ? this.readExtentElement(o, e) : this.readGeometryElement(o, e)), a ? l !== "boundedBy" && (s = l) : a = this.readFeatureElementInternal(o, e, !1)); + o.childNodes.length === 0 || o.childNodes.length === 1 && (o.firstChild.nodeType === 3 || o.firstChild.nodeType === 4) ? (a = Qi(o, !1), Op.test(a) && (a = void 0)) : (n && (a = l === "boundedBy" ? this.readExtentElement(o, e) : this.readGeometryElement(o, e)), a ? l !== "boundedBy" && (s = l) : a = this.readFeatureElementInternal(o, e, !1)); const h = o.attributes.length; if (h > 0) { a = { _content_: a }; @@ -15384,9 +15581,9 @@ class St extends sf { r[l] ? (r[l] instanceof Array || (r[l] = [r[l]]), r[l].push(a)) : r[l] = a; } if (n) { - const o = new zs(r); + const o = new an(r); s && o.setGeometryName(s); - const a = t.getAttribute("fid") || ep(t, this.namespace, "id"); + const a = t.getAttribute("fid") || Tp(t, this.namespace, "id"); return a && o.setId(a), o; } else return r; @@ -15397,10 +15594,10 @@ class St extends sf { readPoint(t, e) { const n = this.readFlatCoordinatesFromNode(t, e); if (n) - return new Ci(n, "XYZ"); + return new oi(n, "XYZ"); } readMultiPoint(t, e) { - const n = B( + const n = $( [], this.MULTIPOINT_PARSERS, t, @@ -15408,10 +15605,10 @@ class St extends sf { this ); if (n) - return new Tl(n); + return new Ro(n); } readMultiLineString(t, e) { - const n = B( + const n = $( [], this.MULTILINESTRING_PARSERS, t, @@ -15419,10 +15616,10 @@ class St extends sf { this ); if (n) - return new bl(n); + return new Pl(n); } readMultiPolygon(t, e) { - const n = B( + const n = $( [], this.MULTIPOLYGON_PARSERS, t, @@ -15430,24 +15627,24 @@ class St extends sf { this ); if (n) - return new Il(n); + return new Nl(n); } pointMemberParser(t, e) { - Bi(this.POINTMEMBER_PARSERS, t, e, this); + Yi(this.POINTMEMBER_PARSERS, t, e, this); } lineStringMemberParser(t, e) { - Bi(this.LINESTRINGMEMBER_PARSERS, t, e, this); + Yi(this.LINESTRINGMEMBER_PARSERS, t, e, this); } polygonMemberParser(t, e) { - Bi(this.POLYGONMEMBER_PARSERS, t, e, this); + Yi(this.POLYGONMEMBER_PARSERS, t, e, this); } readLineString(t, e) { const n = this.readFlatCoordinatesFromNode(t, e); if (n) - return new bs(n, "XYZ"); + return new Ds(n, "XYZ"); } readFlatLinearRing(t, e) { - const n = B( + const n = $( null, this.GEOMETRY_FLAT_COORDINATES_PARSERS, t, @@ -15460,10 +15657,10 @@ class St extends sf { readLinearRing(t, e) { const n = this.readFlatCoordinatesFromNode(t, e); if (n) - return new ya(n, "XYZ"); + return new Ea(n, "XYZ"); } readPolygon(t, e) { - const n = B( + const n = $( [null], this.FLAT_LINEAR_RINGS_PARSERS, t, @@ -15474,13 +15671,13 @@ class St extends sf { const s = n[0], r = [s.length]; let o, a; for (o = 1, a = n.length; o < a; ++o) - Ht(s, n[o]), r.push(s.length); - return new Dn(s, "XYZ", r); + Kt(s, n[o]), r.push(s.length); + return new Un(s, "XYZ", r); } else return; } readFlatCoordinatesFromNode(t, e) { - return B( + return $( null, this.GEOMETRY_FLAT_COORDINATES_PARSERS, t, @@ -15502,12 +15699,12 @@ class St extends sf { return n && Object.assign(n, this.getReadOptions(t, e)), this.readFeaturesInternal(t, [n]) || []; } readProjectionFromNode(t) { - return J( + return q( this.srsName ? this.srsName : t.firstElementChild.getAttribute("srsName") ); } } -St.prototype.namespace = Qe; +St.prototype.namespace = ri; St.prototype.FLAT_LINEAR_RINGS_PARSERS = { "http://www.opengis.net/gml": {} }; @@ -15519,88 +15716,88 @@ St.prototype.GEOMETRY_PARSERS = { }; St.prototype.MULTIPOINT_PARSERS = { "http://www.opengis.net/gml": { - pointMember: H(St.prototype.pointMemberParser), - pointMembers: H(St.prototype.pointMemberParser) + pointMember: W(St.prototype.pointMemberParser), + pointMembers: W(St.prototype.pointMemberParser) } }; St.prototype.MULTILINESTRING_PARSERS = { "http://www.opengis.net/gml": { - lineStringMember: H( + lineStringMember: W( St.prototype.lineStringMemberParser ), - lineStringMembers: H( + lineStringMembers: W( St.prototype.lineStringMemberParser ) } }; St.prototype.MULTIPOLYGON_PARSERS = { "http://www.opengis.net/gml": { - polygonMember: H(St.prototype.polygonMemberParser), - polygonMembers: H(St.prototype.polygonMemberParser) + polygonMember: W(St.prototype.polygonMemberParser), + polygonMembers: W(St.prototype.polygonMemberParser) } }; St.prototype.POINTMEMBER_PARSERS = { "http://www.opengis.net/gml": { - Point: H(St.prototype.readFlatCoordinatesFromNode) + Point: W(St.prototype.readFlatCoordinatesFromNode) } }; St.prototype.LINESTRINGMEMBER_PARSERS = { "http://www.opengis.net/gml": { - LineString: H(St.prototype.readLineString) + LineString: W(St.prototype.readLineString) } }; St.prototype.POLYGONMEMBER_PARSERS = { "http://www.opengis.net/gml": { - Polygon: H(St.prototype.readPolygon) + Polygon: W(St.prototype.readPolygon) } }; St.prototype.RING_PARSERS = { "http://www.opengis.net/gml": { - LinearRing: Z(St.prototype.readFlatLinearRing) + LinearRing: z(St.prototype.readFlatLinearRing) } }; -const q = St; -function op(i) { - const t = Vi(i, !1); - return ap(t); +const K = St; +function Np(i) { + const t = Qi(i, !1); + return Fp(t); } -function ap(i) { +function Fp(i) { const t = /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(i); if (t) return parseFloat(t[1]); } -function te(i) { - const t = Vi(i, !1); - return vn(t); +function ne(i) { + const t = Qi(i, !1); + return Rn(t); } -function vn(i) { +function Rn(i) { const t = /^\s*(\d+)\s*$/.exec(i); if (t) return parseInt(t[1], 10); } function nt(i) { - return Vi(i, !1).trim(); + return Qi(i, !1).trim(); } function Tt(i, t) { - i.appendChild(nf().createTextNode(t)); + i.appendChild(Qd().createTextNode(t)); } -const lp = Qe + " http://schemas.opengis.net/gml/2.1.2/feature.xsd", hp = { +const Dp = ri + " http://schemas.opengis.net/gml/2.1.2/feature.xsd", kp = { MultiLineString: "lineStringMember", MultiCurve: "curveMember", MultiPolygon: "polygonMember", MultiSurface: "surfaceMember" }; -class et extends q { +class it extends K { constructor(t) { - t = t || {}, super(t), this.FEATURE_COLLECTION_PARSERS[Qe].featureMember = H( + t = t || {}, super(t), this.FEATURE_COLLECTION_PARSERS[ri].featureMember = W( this.readFeaturesInternal - ), this.schemaLocation = t.schemaLocation ? t.schemaLocation : lp; + ), this.schemaLocation = t.schemaLocation ? t.schemaLocation : Dp; } readFlatCoordinates(t, e) { - const n = Vi(t, !1).replace(/^\s*|\s*$/g, ""), r = e[0].srsName; + const n = Qi(t, !1).replace(/^\s*|\s*$/g, ""), r = e[0].srsName; let o = "enu"; if (r) { - const h = J(r); + const h = q(r); h && (o = h.getAxisOrientation()); } const a = n.trim().split(/\s+/), l = []; @@ -15611,14 +15808,14 @@ class et extends q { return l; } readBox(t, e) { - const n = B( + const n = $( [null], this.BOX_PARSERS_, t, e, this ); - return ye( + return xe( n[1][0], n[1][1], n[1][3], @@ -15626,7 +15823,7 @@ class et extends q { ); } innerBoundaryIsParser(t, e) { - const n = B( + const n = $( void 0, this.RING_PARSERS, t, @@ -15636,7 +15833,7 @@ class et extends q { n && e[e.length - 1].push(n); } outerBoundaryIsParser(t, e) { - const n = B( + const n = $( void 0, this.RING_PARSERS, t, @@ -15650,7 +15847,7 @@ class et extends q { } GEOMETRY_NODE_FACTORY_(t, e, n) { const s = e[e.length - 1], r = s.multiSurface, o = s.surface, a = s.multiCurve; - return Array.isArray(t) ? n = "Envelope" : (n = t.getType(), n === "MultiPolygon" && r === !0 ? n = "MultiSurface" : n === "Polygon" && o === !0 ? n = "Surface" : n === "MultiLineString" && a === !0 && (n = "MultiCurve")), K("http://www.opengis.net/gml", n); + return Array.isArray(t) ? n = "Envelope" : (n = t.getType(), n === "MultiPolygon" && r === !0 ? n = "MultiSurface" : n === "Polygon" && o === !0 ? n = "Surface" : n === "MultiLineString" && a === !0 && (n = "MultiCurve")), j("http://www.opengis.net/gml", n); } writeFeatureElement(t, e, n) { const s = e.getId(); @@ -15662,17 +15859,17 @@ class et extends q { const u = e.getProperties(); for (const d in u) { const f = u[d]; - f !== null && (l.push(d), h.push(f), d == a || typeof f.getSimplifiedGeometry == "function" ? d in r.serializers[o] || (r.serializers[o][d] = C( + f !== null && (l.push(d), h.push(f), d == a || typeof f.getSimplifiedGeometry == "function" ? d in r.serializers[o] || (r.serializers[o][d] = M( this.writeGeometryElement, this - )) : d in r.serializers[o] || (r.serializers[o][d] = C(Tt))); + )) : d in r.serializers[o] || (r.serializers[o][d] = M(Tt))); } } const c = Object.assign({}, r); c.node = t, Et( c, r.serializers, - ce(void 0, o), + de(void 0, o), h, n, l @@ -15684,7 +15881,7 @@ class et extends q { const o = this.createCoordinatesNode_(t.namespaceURI); t.appendChild(o), this.writeCoordinates_(o, e, n); } else if (t.nodeName === "Curve") { - const o = K(t.namespaceURI, "segments"); + const o = j(t.namespaceURI, "segments"); t.appendChild(o), this.writeCurveSegments_(o, e, n); } } @@ -15710,10 +15907,10 @@ class et extends q { const s = n[n.length - 1], r = Object.assign({}, s); r.node = t; let o; - Array.isArray(e) ? o = Rl( + Array.isArray(e) ? o = Al( e, s - ) : o = Hs( + ) : o = Ks( e, !0, s @@ -15728,7 +15925,7 @@ class et extends q { ); } createCoordinatesNode_(t) { - const e = K(t, "coordinates"); + const e = j(t, "coordinates"); return e.setAttribute("decimal", "."), e.setAttribute("cs", ","), e.setAttribute("ts", " "), e; } writeCoordinates_(t, e, n) { @@ -15740,7 +15937,7 @@ class et extends q { Tt(t, h.join(" ")); } writeCurveSegments_(t, e, n) { - const s = K(t.namespaceURI, "LineStringSegment"); + const s = j(t.namespaceURI, "LineStringSegment"); t.appendChild(s), this.writeCurveOrLineString(s, e, n); } writeSurfaceOrPolygon(t, e, n) { @@ -15757,28 +15954,28 @@ class et extends q { this ); } else if (t.nodeName === "Surface") { - const a = K(t.namespaceURI, "patches"); + const a = j(t.namespaceURI, "patches"); t.appendChild(a), this.writeSurfacePatches_(a, e, n); } } RING_NODE_FACTORY_(t, e, n) { const s = e[e.length - 1], r = s.node, o = s.exteriorWritten; - return o === void 0 && (s.exteriorWritten = !0), K( + return o === void 0 && (s.exteriorWritten = !0), j( r.namespaceURI, o !== void 0 ? "innerBoundaryIs" : "outerBoundaryIs" ); } writeSurfacePatches_(t, e, n) { - const s = K(t.namespaceURI, "PolygonPatch"); + const s = j(t.namespaceURI, "PolygonPatch"); t.appendChild(s), this.writeSurfaceOrPolygon(s, e, n); } writeRing(t, e, n) { - const s = K(t.namespaceURI, "LinearRing"); + const s = j(t.namespaceURI, "LinearRing"); t.appendChild(s), this.writeLinearRing(s, e, n); } getCoords_(t, e, n) { let s = "enu"; - e && (s = J(e).getAxisOrientation()); + e && (s = q(e).getAxisOrientation()); let r = s.substr(0, 2) === "en" ? t[0] + "," + t[1] : t[1] + "," + t[0]; if (n) { const o = t[2] || 0; @@ -15801,7 +15998,7 @@ class et extends q { Et( { node: t, hasZ: r, srsName: o }, this.POINTMEMBER_SERIALIZERS, - ce("pointMember"), + de("pointMember"), a, n, void 0, @@ -15809,7 +16006,7 @@ class et extends q { ); } writePointMember(t, e, n) { - const s = K(t.namespaceURI, "Point"); + const s = j(t.namespaceURI, "Point"); t.appendChild(s), this.writePoint(s, e, n); } writeLinearRing(t, e, n) { @@ -15843,7 +16040,7 @@ class et extends q { Et( { node: t }, this.ENVELOPE_SERIALIZERS, - ef, + Jd, a, n, o, @@ -15852,111 +16049,111 @@ class et extends q { } MULTIGEOMETRY_MEMBER_NODE_FACTORY_(t, e, n) { const s = e[e.length - 1].node; - return K( + return j( "http://www.opengis.net/gml", - hp[s.nodeName] + kp[s.nodeName] ); } } -et.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { +it.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { "http://www.opengis.net/gml": { - coordinates: Z(et.prototype.readFlatCoordinates) + coordinates: z(it.prototype.readFlatCoordinates) } }; -et.prototype.FLAT_LINEAR_RINGS_PARSERS = { +it.prototype.FLAT_LINEAR_RINGS_PARSERS = { "http://www.opengis.net/gml": { - innerBoundaryIs: et.prototype.innerBoundaryIsParser, - outerBoundaryIs: et.prototype.outerBoundaryIsParser + innerBoundaryIs: it.prototype.innerBoundaryIsParser, + outerBoundaryIs: it.prototype.outerBoundaryIsParser } }; -et.prototype.BOX_PARSERS_ = { +it.prototype.BOX_PARSERS_ = { "http://www.opengis.net/gml": { - coordinates: H(et.prototype.readFlatCoordinates) + coordinates: W(it.prototype.readFlatCoordinates) } }; -et.prototype.GEOMETRY_PARSERS = { +it.prototype.GEOMETRY_PARSERS = { "http://www.opengis.net/gml": { - Point: Z(q.prototype.readPoint), - MultiPoint: Z(q.prototype.readMultiPoint), - LineString: Z(q.prototype.readLineString), - MultiLineString: Z(q.prototype.readMultiLineString), - LinearRing: Z(q.prototype.readLinearRing), - Polygon: Z(q.prototype.readPolygon), - MultiPolygon: Z(q.prototype.readMultiPolygon), - Box: Z(et.prototype.readBox) + Point: z(K.prototype.readPoint), + MultiPoint: z(K.prototype.readMultiPoint), + LineString: z(K.prototype.readLineString), + MultiLineString: z(K.prototype.readMultiLineString), + LinearRing: z(K.prototype.readLinearRing), + Polygon: z(K.prototype.readPolygon), + MultiPolygon: z(K.prototype.readMultiPolygon), + Box: z(it.prototype.readBox) } }; -et.prototype.GEOMETRY_SERIALIZERS = { +it.prototype.GEOMETRY_SERIALIZERS = { "http://www.opengis.net/gml": { - Curve: C(et.prototype.writeCurveOrLineString), - MultiCurve: C(et.prototype.writeMultiCurveOrLineString), - Point: C(et.prototype.writePoint), - MultiPoint: C(et.prototype.writeMultiPoint), - LineString: C(et.prototype.writeCurveOrLineString), - MultiLineString: C( - et.prototype.writeMultiCurveOrLineString + Curve: M(it.prototype.writeCurveOrLineString), + MultiCurve: M(it.prototype.writeMultiCurveOrLineString), + Point: M(it.prototype.writePoint), + MultiPoint: M(it.prototype.writeMultiPoint), + LineString: M(it.prototype.writeCurveOrLineString), + MultiLineString: M( + it.prototype.writeMultiCurveOrLineString ), - LinearRing: C(et.prototype.writeLinearRing), - Polygon: C(et.prototype.writeSurfaceOrPolygon), - MultiPolygon: C( - et.prototype.writeMultiSurfaceOrPolygon + LinearRing: M(it.prototype.writeLinearRing), + Polygon: M(it.prototype.writeSurfaceOrPolygon), + MultiPolygon: M( + it.prototype.writeMultiSurfaceOrPolygon ), - Surface: C(et.prototype.writeSurfaceOrPolygon), - MultiSurface: C( - et.prototype.writeMultiSurfaceOrPolygon + Surface: M(it.prototype.writeSurfaceOrPolygon), + MultiSurface: M( + it.prototype.writeMultiSurfaceOrPolygon ), - Envelope: C(et.prototype.writeEnvelope) + Envelope: M(it.prototype.writeEnvelope) } }; -et.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = { +it.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = { "http://www.opengis.net/gml": { - lineStringMember: C( - et.prototype.writeLineStringOrCurveMember + lineStringMember: M( + it.prototype.writeLineStringOrCurveMember ), - curveMember: C( - et.prototype.writeLineStringOrCurveMember + curveMember: M( + it.prototype.writeLineStringOrCurveMember ) } }; -et.prototype.RING_SERIALIZERS = { +it.prototype.RING_SERIALIZERS = { "http://www.opengis.net/gml": { - outerBoundaryIs: C(et.prototype.writeRing), - innerBoundaryIs: C(et.prototype.writeRing) + outerBoundaryIs: M(it.prototype.writeRing), + innerBoundaryIs: M(it.prototype.writeRing) } }; -et.prototype.POINTMEMBER_SERIALIZERS = { +it.prototype.POINTMEMBER_SERIALIZERS = { "http://www.opengis.net/gml": { - pointMember: C(et.prototype.writePointMember) + pointMember: M(it.prototype.writePointMember) } }; -et.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = { +it.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = { "http://www.opengis.net/gml": { - surfaceMember: C( - et.prototype.writeSurfaceOrPolygonMember + surfaceMember: M( + it.prototype.writeSurfaceOrPolygonMember ), - polygonMember: C( - et.prototype.writeSurfaceOrPolygonMember + polygonMember: M( + it.prototype.writeSurfaceOrPolygonMember ) } }; -et.prototype.ENVELOPE_SERIALIZERS = { +it.prototype.ENVELOPE_SERIALIZERS = { "http://www.opengis.net/gml": { - lowerCorner: C(Tt), - upperCorner: C(Tt) + lowerCorner: M(Tt), + upperCorner: M(Tt) } }; -const Xs = et, cp = Qe + " http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd", up = { +const qs = it, Gp = ri + " http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd", $p = { MultiLineString: "lineStringMember", MultiCurve: "curveMember", MultiPolygon: "polygonMember", MultiSurface: "surfaceMember" }; -class D extends q { +class F extends K { constructor(t) { - t = t || {}, super(t), this.surface_ = t.surface !== void 0 ? t.surface : !1, this.curve_ = t.curve !== void 0 ? t.curve : !1, this.multiCurve_ = t.multiCurve !== void 0 ? t.multiCurve : !0, this.multiSurface_ = t.multiSurface !== void 0 ? t.multiSurface : !0, this.schemaLocation = t.schemaLocation ? t.schemaLocation : cp, this.hasZ = t.hasZ !== void 0 ? t.hasZ : !1; + t = t || {}, super(t), this.surface_ = t.surface !== void 0 ? t.surface : !1, this.curve_ = t.curve !== void 0 ? t.curve : !1, this.multiCurve_ = t.multiCurve !== void 0 ? t.multiCurve : !0, this.multiSurface_ = t.multiSurface !== void 0 ? t.multiSurface : !0, this.schemaLocation = t.schemaLocation ? t.schemaLocation : Gp, this.hasZ = t.hasZ !== void 0 ? t.hasZ : !1; } readMultiCurve(t, e) { - const n = B( + const n = $( [], this.MULTICURVE_PARSERS, t, @@ -15964,10 +16161,10 @@ class D extends q { this ); if (n) - return new bl(n); + return new Pl(n); } readFlatCurveRing(t, e) { - const n = B( + const n = $( [], this.MULTICURVE_PARSERS, t, @@ -15975,11 +16172,11 @@ class D extends q { this ), s = []; for (let r = 0, o = n.length; r < o; ++r) - Ht(s, n[r].getFlatCoordinates()); + Kt(s, n[r].getFlatCoordinates()); return s; } readMultiSurface(t, e) { - const n = B( + const n = $( [], this.MULTISURFACE_PARSERS, t, @@ -15987,16 +16184,16 @@ class D extends q { this ); if (n) - return new Il(n); + return new Nl(n); } curveMemberParser(t, e) { - Bi(this.CURVEMEMBER_PARSERS, t, e, this); + Yi(this.CURVEMEMBER_PARSERS, t, e, this); } surfaceMemberParser(t, e) { - Bi(this.SURFACEMEMBER_PARSERS, t, e, this); + Yi(this.SURFACEMEMBER_PARSERS, t, e, this); } readPatch(t, e) { - return B( + return $( [null], this.PATCHES_PARSERS, t, @@ -16005,10 +16202,10 @@ class D extends q { ); } readSegment(t, e) { - return B([], this.SEGMENTS_PARSERS, t, e, this); + return $([], this.SEGMENTS_PARSERS, t, e, this); } readPolygonPatch(t, e) { - return B( + return $( [null], this.FLAT_LINEAR_RINGS_PARSERS, t, @@ -16017,7 +16214,7 @@ class D extends q { ); } readLineStringSegment(t, e) { - return B( + return $( [null], this.GEOMETRY_FLAT_COORDINATES_PARSERS, t, @@ -16026,7 +16223,7 @@ class D extends q { ); } interiorParser(t, e) { - const n = B( + const n = $( void 0, this.RING_PARSERS, t, @@ -16036,7 +16233,7 @@ class D extends q { n && e[e.length - 1].push(n); } exteriorParser(t, e) { - const n = B( + const n = $( void 0, this.RING_PARSERS, t, @@ -16049,7 +16246,7 @@ class D extends q { } } readSurface(t, e) { - const n = B( + const n = $( [null], this.SURFACE_PARSERS, t, @@ -16060,13 +16257,13 @@ class D extends q { const s = n[0], r = [s.length]; let o, a; for (o = 1, a = n.length; o < a; ++o) - Ht(s, n[o]), r.push(s.length); - return new Dn(s, "XYZ", r); + Kt(s, n[o]), r.push(s.length); + return new Un(s, "XYZ", r); } else return; } readCurve(t, e) { - const n = B( + const n = $( [null], this.CURVE_PARSERS, t, @@ -16074,17 +16271,17 @@ class D extends q { this ); if (n) - return new bs(n, "XYZ"); + return new Ds(n, "XYZ"); } readEnvelope(t, e) { - const n = B( + const n = $( [null], this.ENVELOPE_PARSERS, t, e, this ); - return ye( + return xe( n[1][0], n[1][1], n[2][0], @@ -16092,7 +16289,7 @@ class D extends q { ); } readFlatPos(t, e) { - let n = Vi(t, !1); + let n = Qi(t, !1); const s = /^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/, r = []; let o; for (; o = s.exec(n); ) @@ -16101,7 +16298,7 @@ class D extends q { return; const l = e[0].srsName; let h = "enu"; - if (l && (h = J(l).getAxisOrientation()), h === "neu") { + if (l && (h = q(l).getAxisOrientation()), h === "neu") { let u, d; for (u = 0, d = r.length; u < d; u += 3) { const f = r[u], g = r[u + 1]; @@ -16113,14 +16310,14 @@ class D extends q { return r; } readFlatPosList(t, e) { - const n = Vi(t, !1).replace(/^\s*|\s*$/g, ""), s = e[0], r = s.srsName, o = s.srsDimension; + const n = Qi(t, !1).replace(/^\s*|\s*$/g, ""), s = e[0], r = s.srsName, o = s.srsDimension; let a = "enu"; - r && (a = J(r).getAxisOrientation()); + r && (a = q(r).getAxisOrientation()); const l = n.split(/\s+/); let h = 2; - t.getAttribute("srsDimension") ? h = vn(t.getAttribute("srsDimension")) : t.getAttribute("dimension") ? h = vn(t.getAttribute("dimension")) : t.parentNode.getAttribute("srsDimension") ? h = vn( + t.getAttribute("srsDimension") ? h = Rn(t.getAttribute("srsDimension")) : t.getAttribute("dimension") ? h = Rn(t.getAttribute("dimension")) : t.parentNode.getAttribute("srsDimension") ? h = Rn( t.parentNode.getAttribute("srsDimension") - ) : o && (h = vn(o)); + ) : o && (h = Rn(o)); let c, u, d; const f = []; for (let g = 0, m = l.length; g < m; g += h) @@ -16132,7 +16329,7 @@ class D extends q { t.setAttribute("srsDimension", o); const a = s.srsName; let l = "enu"; - a && (l = J(a).getAxisOrientation()); + a && (l = q(a).getAxisOrientation()); const h = e.getCoordinates(); let c; if (l.substr(0, 2) === "en" ? c = h[0] + " " + h[1] : c = h[1] + " " + h[0], r) { @@ -16143,7 +16340,7 @@ class D extends q { } getCoords_(t, e, n) { let s = "enu"; - e && (s = J(e).getAxisOrientation()); + e && (s = q(e).getAxisOrientation()); let r = s.substr(0, 2) === "en" ? t[0] + " " + t[1] : t[1] + " " + t[0]; if (n) { const o = t[2] || 0; @@ -16163,7 +16360,7 @@ class D extends q { writePoint(t, e, n) { const r = n[n.length - 1].srsName; r && t.setAttribute("srsName", r); - const o = K(t.namespaceURI, "pos"); + const o = j(t.namespaceURI, "pos"); t.appendChild(o), this.writePos_(o, e, n); } writeEnvelope(t, e, n) { @@ -16173,7 +16370,7 @@ class D extends q { Et( { node: t }, this.ENVELOPE_SERIALIZERS, - ef, + Jd, a, n, o, @@ -16183,12 +16380,12 @@ class D extends q { writeLinearRing(t, e, n) { const r = n[n.length - 1].srsName; r && t.setAttribute("srsName", r); - const o = K(t.namespaceURI, "posList"); + const o = j(t.namespaceURI, "posList"); t.appendChild(o), this.writePosList_(o, e, n); } RING_NODE_FACTORY_(t, e, n) { const s = e[e.length - 1], r = s.node, o = s.exteriorWritten; - return o === void 0 && (s.exteriorWritten = !0), K( + return o === void 0 && (s.exteriorWritten = !0), j( r.namespaceURI, o !== void 0 ? "interior" : "exterior" ); @@ -16207,17 +16404,17 @@ class D extends q { this ); } else if (t.nodeName === "Surface") { - const a = K(t.namespaceURI, "patches"); + const a = j(t.namespaceURI, "patches"); t.appendChild(a), this.writeSurfacePatches_(a, e, n); } } writeCurveOrLineString(t, e, n) { const r = n[n.length - 1].srsName; if (t.nodeName !== "LineStringSegment" && r && t.setAttribute("srsName", r), t.nodeName === "LineString" || t.nodeName === "LineStringSegment") { - const o = K(t.namespaceURI, "posList"); + const o = j(t.namespaceURI, "posList"); t.appendChild(o), this.writePosList_(o, e, n); } else if (t.nodeName === "Curve") { - const o = K(t.namespaceURI, "segments"); + const o = j(t.namespaceURI, "segments"); t.appendChild(o), this.writeCurveSegments_(o, e, n); } } @@ -16242,7 +16439,7 @@ class D extends q { Et( { node: t, hasZ: o, srsName: r }, this.POINTMEMBER_SERIALIZERS, - ce("pointMember"), + de("pointMember"), a, n, void 0, @@ -16264,7 +16461,7 @@ class D extends q { ); } writeRing(t, e, n) { - const s = K(t.namespaceURI, "LinearRing"); + const s = j(t.namespaceURI, "LinearRing"); t.appendChild(s), this.writeLinearRing(s, e, n); } writeSurfaceOrPolygonMember(t, e, n) { @@ -16272,7 +16469,7 @@ class D extends q { s && (t.appendChild(s), this.writeSurfaceOrPolygon(s, e, n)); } writePointMember(t, e, n) { - const s = K(t.namespaceURI, "Point"); + const s = j(t.namespaceURI, "Point"); t.appendChild(s), this.writePoint(s, e, n); } writeLineStringOrCurveMember(t, e, n) { @@ -16280,21 +16477,21 @@ class D extends q { s && (t.appendChild(s), this.writeCurveOrLineString(s, e, n)); } writeSurfacePatches_(t, e, n) { - const s = K(t.namespaceURI, "PolygonPatch"); + const s = j(t.namespaceURI, "PolygonPatch"); t.appendChild(s), this.writeSurfaceOrPolygon(s, e, n); } writeCurveSegments_(t, e, n) { - const s = K(t.namespaceURI, "LineStringSegment"); + const s = j(t.namespaceURI, "LineStringSegment"); t.appendChild(s), this.writeCurveOrLineString(s, e, n); } writeGeometryElement(t, e, n) { const s = n[n.length - 1], r = Object.assign({}, s); r.node = t; let o; - Array.isArray(e) ? o = Rl( + Array.isArray(e) ? o = Al( e, s - ) : o = Hs( + ) : o = Ks( e, !0, s @@ -16318,17 +16515,17 @@ class D extends q { const u = e.getProperties(); for (const d in u) { const f = u[d]; - f !== null && (l.push(d), h.push(f), d == a || typeof f.getSimplifiedGeometry == "function" ? d in r.serializers[o] || (r.serializers[o][d] = C( + f !== null && (l.push(d), h.push(f), d == a || typeof f.getSimplifiedGeometry == "function" ? d in r.serializers[o] || (r.serializers[o][d] = M( this.writeGeometryElement, this - )) : d in r.serializers[o] || (r.serializers[o][d] = C(Tt))); + )) : d in r.serializers[o] || (r.serializers[o][d] = M(Tt))); } } const c = Object.assign({}, r); c.node = t, Et( c, r.serializers, - ce(void 0, o), + de(void 0, o), h, n, l @@ -16336,7 +16533,7 @@ class D extends q { } writeFeatureMembers_(t, e, n) { const s = n[n.length - 1], r = s.featureType, o = s.featureNS, a = {}; - a[o] = {}, a[o][r] = C( + a[o] = {}, a[o][r] = M( this.writeFeatureElement, this ); @@ -16344,25 +16541,25 @@ class D extends q { l.node = t, Et( l, a, - ce(r, o), + de(r, o), e, n ); } MULTIGEOMETRY_MEMBER_NODE_FACTORY_(t, e, n) { const s = e[e.length - 1].node; - return K( + return j( this.namespace, - up[s.nodeName] + $p[s.nodeName] ); } GEOMETRY_NODE_FACTORY_(t, e, n) { const s = e[e.length - 1], r = s.multiSurface, o = s.surface, a = s.curve, l = s.multiCurve; - return Array.isArray(t) ? n = "Envelope" : (n = t.getType(), n === "MultiPolygon" && r === !0 ? n = "MultiSurface" : n === "Polygon" && o === !0 ? n = "Surface" : n === "LineString" && a === !0 ? n = "Curve" : n === "MultiLineString" && l === !0 && (n = "MultiCurve")), K(this.namespace, n); + return Array.isArray(t) ? n = "Envelope" : (n = t.getType(), n === "MultiPolygon" && r === !0 ? n = "MultiSurface" : n === "Polygon" && o === !0 ? n = "Surface" : n === "LineString" && a === !0 ? n = "Curve" : n === "MultiLineString" && l === !0 && (n = "MultiCurve")), j(this.namespace, n); } writeGeometryNode(t, e) { e = this.adaptOptions(e); - const n = K(this.namespace, "geom"), s = { + const n = j(this.namespace, "geom"), s = { node: n, hasZ: this.hasZ, srsName: this.srsName, @@ -16375,9 +16572,9 @@ class D extends q { } writeFeaturesNode(t, e) { e = this.adaptOptions(e); - const n = K(this.namespace, "featureMembers"); + const n = j(this.namespace, "featureMembers"); n.setAttributeNS( - Ia, + Fa, "xsi:schemaLocation", this.schemaLocation ); @@ -16394,345 +16591,345 @@ class D extends q { return e && Object.assign(s, e), this.writeFeatureMembers_(n, t, [s]), n; } } -D.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { +F.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { "http://www.opengis.net/gml": { - pos: Z(D.prototype.readFlatPos), - posList: Z(D.prototype.readFlatPosList), - coordinates: Z(Xs.prototype.readFlatCoordinates) + pos: z(F.prototype.readFlatPos), + posList: z(F.prototype.readFlatPosList), + coordinates: z(qs.prototype.readFlatCoordinates) } }; -D.prototype.FLAT_LINEAR_RINGS_PARSERS = { +F.prototype.FLAT_LINEAR_RINGS_PARSERS = { "http://www.opengis.net/gml": { - interior: D.prototype.interiorParser, - exterior: D.prototype.exteriorParser + interior: F.prototype.interiorParser, + exterior: F.prototype.exteriorParser } }; -D.prototype.GEOMETRY_PARSERS = { +F.prototype.GEOMETRY_PARSERS = { "http://www.opengis.net/gml": { - Point: Z(q.prototype.readPoint), - MultiPoint: Z(q.prototype.readMultiPoint), - LineString: Z(q.prototype.readLineString), - MultiLineString: Z(q.prototype.readMultiLineString), - LinearRing: Z(q.prototype.readLinearRing), - Polygon: Z(q.prototype.readPolygon), - MultiPolygon: Z(q.prototype.readMultiPolygon), - Surface: Z(D.prototype.readSurface), - MultiSurface: Z(D.prototype.readMultiSurface), - Curve: Z(D.prototype.readCurve), - MultiCurve: Z(D.prototype.readMultiCurve), - Envelope: Z(D.prototype.readEnvelope) + Point: z(K.prototype.readPoint), + MultiPoint: z(K.prototype.readMultiPoint), + LineString: z(K.prototype.readLineString), + MultiLineString: z(K.prototype.readMultiLineString), + LinearRing: z(K.prototype.readLinearRing), + Polygon: z(K.prototype.readPolygon), + MultiPolygon: z(K.prototype.readMultiPolygon), + Surface: z(F.prototype.readSurface), + MultiSurface: z(F.prototype.readMultiSurface), + Curve: z(F.prototype.readCurve), + MultiCurve: z(F.prototype.readMultiCurve), + Envelope: z(F.prototype.readEnvelope) } }; -D.prototype.MULTICURVE_PARSERS = { +F.prototype.MULTICURVE_PARSERS = { "http://www.opengis.net/gml": { - curveMember: H(D.prototype.curveMemberParser), - curveMembers: H(D.prototype.curveMemberParser) + curveMember: W(F.prototype.curveMemberParser), + curveMembers: W(F.prototype.curveMemberParser) } }; -D.prototype.MULTISURFACE_PARSERS = { +F.prototype.MULTISURFACE_PARSERS = { "http://www.opengis.net/gml": { - surfaceMember: H(D.prototype.surfaceMemberParser), - surfaceMembers: H(D.prototype.surfaceMemberParser) + surfaceMember: W(F.prototype.surfaceMemberParser), + surfaceMembers: W(F.prototype.surfaceMemberParser) } }; -D.prototype.CURVEMEMBER_PARSERS = { +F.prototype.CURVEMEMBER_PARSERS = { "http://www.opengis.net/gml": { - LineString: H(q.prototype.readLineString), - Curve: H(D.prototype.readCurve) + LineString: W(K.prototype.readLineString), + Curve: W(F.prototype.readCurve) } }; -D.prototype.SURFACEMEMBER_PARSERS = { +F.prototype.SURFACEMEMBER_PARSERS = { "http://www.opengis.net/gml": { - Polygon: H(q.prototype.readPolygon), - Surface: H(D.prototype.readSurface) + Polygon: W(K.prototype.readPolygon), + Surface: W(F.prototype.readSurface) } }; -D.prototype.SURFACE_PARSERS = { +F.prototype.SURFACE_PARSERS = { "http://www.opengis.net/gml": { - patches: Z(D.prototype.readPatch) + patches: z(F.prototype.readPatch) } }; -D.prototype.CURVE_PARSERS = { +F.prototype.CURVE_PARSERS = { "http://www.opengis.net/gml": { - segments: Z(D.prototype.readSegment) + segments: z(F.prototype.readSegment) } }; -D.prototype.ENVELOPE_PARSERS = { +F.prototype.ENVELOPE_PARSERS = { "http://www.opengis.net/gml": { - lowerCorner: H(D.prototype.readFlatPosList), - upperCorner: H(D.prototype.readFlatPosList) + lowerCorner: W(F.prototype.readFlatPosList), + upperCorner: W(F.prototype.readFlatPosList) } }; -D.prototype.PATCHES_PARSERS = { +F.prototype.PATCHES_PARSERS = { "http://www.opengis.net/gml": { - PolygonPatch: Z(D.prototype.readPolygonPatch) + PolygonPatch: z(F.prototype.readPolygonPatch) } }; -D.prototype.SEGMENTS_PARSERS = { +F.prototype.SEGMENTS_PARSERS = { "http://www.opengis.net/gml": { - LineStringSegment: tf( - D.prototype.readLineStringSegment + LineStringSegment: qd( + F.prototype.readLineStringSegment ) } }; -q.prototype.RING_PARSERS = { +K.prototype.RING_PARSERS = { "http://www.opengis.net/gml": { - LinearRing: Z(q.prototype.readFlatLinearRing), - Ring: Z(D.prototype.readFlatCurveRing) + LinearRing: z(K.prototype.readFlatLinearRing), + Ring: z(F.prototype.readFlatCurveRing) } }; -D.prototype.writeFeatures; -D.prototype.RING_SERIALIZERS = { +F.prototype.writeFeatures; +F.prototype.RING_SERIALIZERS = { "http://www.opengis.net/gml": { - exterior: C(D.prototype.writeRing), - interior: C(D.prototype.writeRing) + exterior: M(F.prototype.writeRing), + interior: M(F.prototype.writeRing) } }; -D.prototype.ENVELOPE_SERIALIZERS = { +F.prototype.ENVELOPE_SERIALIZERS = { "http://www.opengis.net/gml": { - lowerCorner: C(Tt), - upperCorner: C(Tt) + lowerCorner: M(Tt), + upperCorner: M(Tt) } }; -D.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = { +F.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = { "http://www.opengis.net/gml": { - surfaceMember: C( - D.prototype.writeSurfaceOrPolygonMember + surfaceMember: M( + F.prototype.writeSurfaceOrPolygonMember ), - polygonMember: C( - D.prototype.writeSurfaceOrPolygonMember + polygonMember: M( + F.prototype.writeSurfaceOrPolygonMember ) } }; -D.prototype.POINTMEMBER_SERIALIZERS = { +F.prototype.POINTMEMBER_SERIALIZERS = { "http://www.opengis.net/gml": { - pointMember: C(D.prototype.writePointMember) + pointMember: M(F.prototype.writePointMember) } }; -D.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = { +F.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = { "http://www.opengis.net/gml": { - lineStringMember: C( - D.prototype.writeLineStringOrCurveMember + lineStringMember: M( + F.prototype.writeLineStringOrCurveMember ), - curveMember: C( - D.prototype.writeLineStringOrCurveMember + curveMember: M( + F.prototype.writeLineStringOrCurveMember ) } }; -D.prototype.GEOMETRY_SERIALIZERS = { +F.prototype.GEOMETRY_SERIALIZERS = { "http://www.opengis.net/gml": { - Curve: C(D.prototype.writeCurveOrLineString), - MultiCurve: C(D.prototype.writeMultiCurveOrLineString), - Point: C(D.prototype.writePoint), - MultiPoint: C(D.prototype.writeMultiPoint), - LineString: C(D.prototype.writeCurveOrLineString), - MultiLineString: C( - D.prototype.writeMultiCurveOrLineString + Curve: M(F.prototype.writeCurveOrLineString), + MultiCurve: M(F.prototype.writeMultiCurveOrLineString), + Point: M(F.prototype.writePoint), + MultiPoint: M(F.prototype.writeMultiPoint), + LineString: M(F.prototype.writeCurveOrLineString), + MultiLineString: M( + F.prototype.writeMultiCurveOrLineString ), - LinearRing: C(D.prototype.writeLinearRing), - Polygon: C(D.prototype.writeSurfaceOrPolygon), - MultiPolygon: C( - D.prototype.writeMultiSurfaceOrPolygon + LinearRing: M(F.prototype.writeLinearRing), + Polygon: M(F.prototype.writeSurfaceOrPolygon), + MultiPolygon: M( + F.prototype.writeMultiSurfaceOrPolygon ), - Surface: C(D.prototype.writeSurfaceOrPolygon), - MultiSurface: C( - D.prototype.writeMultiSurfaceOrPolygon + Surface: M(F.prototype.writeSurfaceOrPolygon), + MultiSurface: M( + F.prototype.writeMultiSurfaceOrPolygon ), - Envelope: C(D.prototype.writeEnvelope) + Envelope: M(F.prototype.writeEnvelope) } }; -const Q = D; -class at extends Q { +const J = F; +class ot extends J { constructor(t) { t = t || {}, super(t), this.schemaLocation = t.schemaLocation ? t.schemaLocation : this.namespace + " http://schemas.opengis.net/gml/3.2.1/gml.xsd"; } } -at.prototype.namespace = "http://www.opengis.net/gml/3.2"; -at.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { +ot.prototype.namespace = "http://www.opengis.net/gml/3.2"; +ot.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { "http://www.opengis.net/gml/3.2": { - pos: Z(Q.prototype.readFlatPos), - posList: Z(Q.prototype.readFlatPosList), - coordinates: Z(Xs.prototype.readFlatCoordinates) + pos: z(J.prototype.readFlatPos), + posList: z(J.prototype.readFlatPosList), + coordinates: z(qs.prototype.readFlatCoordinates) } }; -at.prototype.FLAT_LINEAR_RINGS_PARSERS = { +ot.prototype.FLAT_LINEAR_RINGS_PARSERS = { "http://www.opengis.net/gml/3.2": { - interior: Q.prototype.interiorParser, - exterior: Q.prototype.exteriorParser + interior: J.prototype.interiorParser, + exterior: J.prototype.exteriorParser } }; -at.prototype.GEOMETRY_PARSERS = { +ot.prototype.GEOMETRY_PARSERS = { "http://www.opengis.net/gml/3.2": { - Point: Z(q.prototype.readPoint), - MultiPoint: Z(q.prototype.readMultiPoint), - LineString: Z(q.prototype.readLineString), - MultiLineString: Z(q.prototype.readMultiLineString), - LinearRing: Z(q.prototype.readLinearRing), - Polygon: Z(q.prototype.readPolygon), - MultiPolygon: Z(q.prototype.readMultiPolygon), - Surface: Z(at.prototype.readSurface), - MultiSurface: Z(Q.prototype.readMultiSurface), - Curve: Z(at.prototype.readCurve), - MultiCurve: Z(Q.prototype.readMultiCurve), - Envelope: Z(at.prototype.readEnvelope) + Point: z(K.prototype.readPoint), + MultiPoint: z(K.prototype.readMultiPoint), + LineString: z(K.prototype.readLineString), + MultiLineString: z(K.prototype.readMultiLineString), + LinearRing: z(K.prototype.readLinearRing), + Polygon: z(K.prototype.readPolygon), + MultiPolygon: z(K.prototype.readMultiPolygon), + Surface: z(ot.prototype.readSurface), + MultiSurface: z(J.prototype.readMultiSurface), + Curve: z(ot.prototype.readCurve), + MultiCurve: z(J.prototype.readMultiCurve), + Envelope: z(ot.prototype.readEnvelope) } }; -at.prototype.MULTICURVE_PARSERS = { +ot.prototype.MULTICURVE_PARSERS = { "http://www.opengis.net/gml/3.2": { - curveMember: H(Q.prototype.curveMemberParser), - curveMembers: H(Q.prototype.curveMemberParser) + curveMember: W(J.prototype.curveMemberParser), + curveMembers: W(J.prototype.curveMemberParser) } }; -at.prototype.MULTISURFACE_PARSERS = { +ot.prototype.MULTISURFACE_PARSERS = { "http://www.opengis.net/gml/3.2": { - surfaceMember: H(Q.prototype.surfaceMemberParser), - surfaceMembers: H(Q.prototype.surfaceMemberParser) + surfaceMember: W(J.prototype.surfaceMemberParser), + surfaceMembers: W(J.prototype.surfaceMemberParser) } }; -at.prototype.CURVEMEMBER_PARSERS = { +ot.prototype.CURVEMEMBER_PARSERS = { "http://www.opengis.net/gml/3.2": { - LineString: H(q.prototype.readLineString), - Curve: H(Q.prototype.readCurve) + LineString: W(K.prototype.readLineString), + Curve: W(J.prototype.readCurve) } }; -at.prototype.SURFACEMEMBER_PARSERS = { +ot.prototype.SURFACEMEMBER_PARSERS = { "http://www.opengis.net/gml/3.2": { - Polygon: H(q.prototype.readPolygon), - Surface: H(Q.prototype.readSurface) + Polygon: W(K.prototype.readPolygon), + Surface: W(J.prototype.readSurface) } }; -at.prototype.SURFACE_PARSERS = { +ot.prototype.SURFACE_PARSERS = { "http://www.opengis.net/gml/3.2": { - patches: Z(Q.prototype.readPatch) + patches: z(J.prototype.readPatch) } }; -at.prototype.CURVE_PARSERS = { +ot.prototype.CURVE_PARSERS = { "http://www.opengis.net/gml/3.2": { - segments: Z(Q.prototype.readSegment) + segments: z(J.prototype.readSegment) } }; -at.prototype.ENVELOPE_PARSERS = { +ot.prototype.ENVELOPE_PARSERS = { "http://www.opengis.net/gml/3.2": { - lowerCorner: H(Q.prototype.readFlatPosList), - upperCorner: H(Q.prototype.readFlatPosList) + lowerCorner: W(J.prototype.readFlatPosList), + upperCorner: W(J.prototype.readFlatPosList) } }; -at.prototype.PATCHES_PARSERS = { +ot.prototype.PATCHES_PARSERS = { "http://www.opengis.net/gml/3.2": { - PolygonPatch: Z(Q.prototype.readPolygonPatch) + PolygonPatch: z(J.prototype.readPolygonPatch) } }; -at.prototype.SEGMENTS_PARSERS = { +ot.prototype.SEGMENTS_PARSERS = { "http://www.opengis.net/gml/3.2": { - LineStringSegment: tf( - Q.prototype.readLineStringSegment + LineStringSegment: qd( + J.prototype.readLineStringSegment ) } }; -at.prototype.MULTIPOINT_PARSERS = { +ot.prototype.MULTIPOINT_PARSERS = { "http://www.opengis.net/gml/3.2": { - pointMember: H(q.prototype.pointMemberParser), - pointMembers: H(q.prototype.pointMemberParser) + pointMember: W(K.prototype.pointMemberParser), + pointMembers: W(K.prototype.pointMemberParser) } }; -at.prototype.MULTILINESTRING_PARSERS = { +ot.prototype.MULTILINESTRING_PARSERS = { "http://www.opengis.net/gml/3.2": { - lineStringMember: H( - q.prototype.lineStringMemberParser + lineStringMember: W( + K.prototype.lineStringMemberParser ), - lineStringMembers: H( - q.prototype.lineStringMemberParser + lineStringMembers: W( + K.prototype.lineStringMemberParser ) } }; -at.prototype.MULTIPOLYGON_PARSERS = { +ot.prototype.MULTIPOLYGON_PARSERS = { "http://www.opengis.net/gml/3.2": { - polygonMember: H(q.prototype.polygonMemberParser), - polygonMembers: H(q.prototype.polygonMemberParser) + polygonMember: W(K.prototype.polygonMemberParser), + polygonMembers: W(K.prototype.polygonMemberParser) } }; -at.prototype.POINTMEMBER_PARSERS = { +ot.prototype.POINTMEMBER_PARSERS = { "http://www.opengis.net/gml/3.2": { - Point: H(q.prototype.readFlatCoordinatesFromNode) + Point: W(K.prototype.readFlatCoordinatesFromNode) } }; -at.prototype.LINESTRINGMEMBER_PARSERS = { +ot.prototype.LINESTRINGMEMBER_PARSERS = { "http://www.opengis.net/gml/3.2": { - LineString: H(q.prototype.readLineString) + LineString: W(K.prototype.readLineString) } }; -at.prototype.POLYGONMEMBER_PARSERS = { +ot.prototype.POLYGONMEMBER_PARSERS = { "http://www.opengis.net/gml/3.2": { - Polygon: H(q.prototype.readPolygon) + Polygon: W(K.prototype.readPolygon) } }; -at.prototype.RING_PARSERS = { +ot.prototype.RING_PARSERS = { "http://www.opengis.net/gml/3.2": { - LinearRing: Z(q.prototype.readFlatLinearRing), - Ring: Z(at.prototype.readFlatCurveRing) + LinearRing: z(K.prototype.readFlatLinearRing), + Ring: z(ot.prototype.readFlatCurveRing) } }; -at.prototype.RING_SERIALIZERS = { +ot.prototype.RING_SERIALIZERS = { "http://www.opengis.net/gml/3.2": { - exterior: C(Q.prototype.writeRing), - interior: C(Q.prototype.writeRing) + exterior: M(J.prototype.writeRing), + interior: M(J.prototype.writeRing) } }; -at.prototype.ENVELOPE_SERIALIZERS = { +ot.prototype.ENVELOPE_SERIALIZERS = { "http://www.opengis.net/gml/3.2": { - lowerCorner: C(Tt), - upperCorner: C(Tt) + lowerCorner: M(Tt), + upperCorner: M(Tt) } }; -at.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = { +ot.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = { "http://www.opengis.net/gml/3.2": { - surfaceMember: C( - Q.prototype.writeSurfaceOrPolygonMember + surfaceMember: M( + J.prototype.writeSurfaceOrPolygonMember ), - polygonMember: C( - Q.prototype.writeSurfaceOrPolygonMember + polygonMember: M( + J.prototype.writeSurfaceOrPolygonMember ) } }; -at.prototype.POINTMEMBER_SERIALIZERS = { +ot.prototype.POINTMEMBER_SERIALIZERS = { "http://www.opengis.net/gml/3.2": { - pointMember: C(Q.prototype.writePointMember) + pointMember: M(J.prototype.writePointMember) } }; -at.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = { +ot.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = { "http://www.opengis.net/gml/3.2": { - lineStringMember: C( - Q.prototype.writeLineStringOrCurveMember + lineStringMember: M( + J.prototype.writeLineStringOrCurveMember ), - curveMember: C( - Q.prototype.writeLineStringOrCurveMember + curveMember: M( + J.prototype.writeLineStringOrCurveMember ) } }; -at.prototype.GEOMETRY_SERIALIZERS = { +ot.prototype.GEOMETRY_SERIALIZERS = { "http://www.opengis.net/gml/3.2": { - Curve: C(Q.prototype.writeCurveOrLineString), - MultiCurve: C(Q.prototype.writeMultiCurveOrLineString), - Point: C(at.prototype.writePoint), - MultiPoint: C(Q.prototype.writeMultiPoint), - LineString: C(Q.prototype.writeCurveOrLineString), - MultiLineString: C( - Q.prototype.writeMultiCurveOrLineString + Curve: M(J.prototype.writeCurveOrLineString), + MultiCurve: M(J.prototype.writeMultiCurveOrLineString), + Point: M(ot.prototype.writePoint), + MultiPoint: M(J.prototype.writeMultiPoint), + LineString: M(J.prototype.writeCurveOrLineString), + MultiLineString: M( + J.prototype.writeMultiCurveOrLineString ), - LinearRing: C(Q.prototype.writeLinearRing), - Polygon: C(Q.prototype.writeSurfaceOrPolygon), - MultiPolygon: C( - Q.prototype.writeMultiSurfaceOrPolygon + LinearRing: M(J.prototype.writeLinearRing), + Polygon: M(J.prototype.writeSurfaceOrPolygon), + MultiPolygon: M( + J.prototype.writeMultiSurfaceOrPolygon ), - Surface: C(Q.prototype.writeSurfaceOrPolygon), - MultiSurface: C( - Q.prototype.writeMultiSurfaceOrPolygon + Surface: M(J.prototype.writeSurfaceOrPolygon), + MultiSurface: M( + J.prototype.writeMultiSurfaceOrPolygon ), - Envelope: C(Q.prototype.writeEnvelope) + Envelope: M(J.prototype.writeEnvelope) } }; -const Ol = at; -class dp { +const Gl = ot; +class Bp { constructor(t) { this.tagName_ = t; } @@ -16740,20 +16937,20 @@ class dp { return this.tagName_; } } -const rf = dp; -class fp extends rf { +const ef = Bp; +class zp extends ef { constructor(t, e) { - super(t), this.conditions = e, Y(this.conditions.length >= 2, 57); + super(t), this.conditions = e, X(this.conditions.length >= 2, 57); } } -const gp = fp; -class mp extends gp { +const Zp = zp; +class Up extends Zp { constructor(t) { super("And", Array.prototype.slice.call(arguments)); } } -const _p = mp; -class pp extends rf { +const Vp = Up; +class Wp extends ef { constructor(t, e, n) { if (super("BBOX"), this.geometryName = t, this.extent = e, e.length !== 4) throw new Error( @@ -16762,96 +16959,96 @@ class pp extends rf { this.srsName = n; } } -const yp = pp; -function vp(i) { +const Hp = Wp; +function Xp(i) { const t = [null].concat(Array.prototype.slice.call(arguments)); - return new (Function.prototype.bind.apply(_p, t))(); + return new (Function.prototype.bind.apply(Vp, t))(); } -function xp(i, t, e) { - return new yp(i, t, e); +function Yp(i, t, e) { + return new Hp(i, t, e); } -const uc = { +const mc = { "http://www.opengis.net/gml": { boundedBy: O( - q.prototype.readExtentElement, + K.prototype.readExtentElement, "bounds" ) }, "http://www.opengis.net/wfs/2.0": { - member: H(q.prototype.readFeaturesInternal) + member: W(K.prototype.readFeaturesInternal) } -}, Mp = { +}, jp = { "http://www.opengis.net/wfs": { - totalInserted: O(te), - totalUpdated: O(te), - totalDeleted: O(te) + totalInserted: O(ne), + totalUpdated: O(ne), + totalDeleted: O(ne) }, "http://www.opengis.net/wfs/2.0": { - totalInserted: O(te), - totalUpdated: O(te), - totalDeleted: O(te) + totalInserted: O(ne), + totalUpdated: O(ne), + totalDeleted: O(ne) } -}, Cp = { +}, Kp = { "http://www.opengis.net/wfs": { TransactionSummary: O( - fc, + _c, "transactionSummary" ), - InsertResults: O(mc, "insertIds") + InsertResults: O(vc, "insertIds") }, "http://www.opengis.net/wfs/2.0": { TransactionSummary: O( - fc, + _c, "transactionSummary" ), - InsertResults: O(mc, "insertIds") + InsertResults: O(vc, "insertIds") } -}, Ep = { +}, qp = { "http://www.opengis.net/wfs": { - PropertyName: C(Tt) + PropertyName: M(Tt) }, "http://www.opengis.net/wfs/2.0": { - PropertyName: C(Tt) + PropertyName: M(Tt) } -}, of = { +}, nf = { "http://www.opengis.net/wfs": { - Insert: C(_c), - Update: C(yc), - Delete: C(pc), - Property: C(vc), - Native: C(xc) + Insert: M(xc), + Update: M(Mc), + Delete: M(Cc), + Property: M(Ec), + Native: M(wc) }, "http://www.opengis.net/wfs/2.0": { - Insert: C(_c), - Update: C(yc), - Delete: C(pc), - Property: C(vc), - Native: C(xc) + Insert: M(xc), + Update: M(Mc), + Delete: M(Cc), + Property: M(Ec), + Native: M(wc) } -}, af = "feature", Nl = "http://www.w3.org/2000/xmlns/", Fl = { +}, sf = "feature", $l = "http://www.w3.org/2000/xmlns/", Bl = { "2.0.0": "http://www.opengis.net/ogc/1.1", "1.1.0": "http://www.opengis.net/ogc", "1.0.0": "http://www.opengis.net/ogc" -}, Aa = { +}, Da = { "2.0.0": "http://www.opengis.net/wfs/2.0", "1.1.0": "http://www.opengis.net/wfs", "1.0.0": "http://www.opengis.net/wfs" -}, Dl = { +}, zl = { "2.0.0": "http://www.opengis.net/fes/2.0", "1.1.0": "http://www.opengis.net/fes", "1.0.0": "http://www.opengis.net/fes" -}, dc = { +}, pc = { "2.0.0": "http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd", "1.1.0": "http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd", "1.0.0": "http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd" -}, kl = { - "2.0.0": Ol, - "1.1.0": Q, - "1.0.0": Xs -}, wp = "1.1.0"; -class Sp extends sf { +}, Zl = { + "2.0.0": Gl, + "1.1.0": J, + "1.0.0": qs +}, Jp = "1.1.0"; +class Qp extends tf { constructor(t) { - super(), t = t || {}, this.version_ = t.version ? t.version : wp, this.featureType_ = t.featureType, this.featureNS_ = t.featureNS, this.gmlFormat_ = t.gmlFormat ? t.gmlFormat : new kl[this.version_](), this.schemaLocation_ = t.schemaLocation ? t.schemaLocation : dc[this.version_]; + super(), t = t || {}, this.version_ = t.version ? t.version : Jp, this.featureType_ = t.featureType, this.featureNS_ = t.featureNS, this.gmlFormat_ = t.gmlFormat ? t.gmlFormat : new Zl[this.version_](), this.schemaLocation_ = t.schemaLocation ? t.schemaLocation : pc[this.version_]; } getFeatureType() { return this.featureType_; @@ -16869,8 +17066,8 @@ class Sp extends sf { }), Object.assign(n, this.getReadOptions(t, e || {})); const s = [n]; let r; - this.version_ === "2.0.0" ? r = uc : r = this.gmlFormat_.FEATURE_COLLECTION_PARSERS; - let o = B( + this.version_ === "2.0.0" ? r = mc : r = this.gmlFormat_.FEATURE_COLLECTION_PARSERS; + let o = $( [], r, t, @@ -16882,10 +17079,10 @@ class Sp extends sf { readTransactionResponse(t) { if (t) if (typeof t == "string") { - const e = Di(t); + const e = Vi(t); return this.readTransactionResponseFromDocument(e); } else - return Fi(t) ? this.readTransactionResponseFromDocument( + return Ui(t) ? this.readTransactionResponseFromDocument( t ) : this.readTransactionResponseFromNode( t @@ -16896,10 +17093,10 @@ class Sp extends sf { readFeatureCollectionMetadata(t) { if (t) if (typeof t == "string") { - const e = Di(t); + const e = Vi(t); return this.readFeatureCollectionMetadataFromDocument(e); } else - return Fi(t) ? this.readFeatureCollectionMetadataFromDocument( + return Ui(t) ? this.readFeatureCollectionMetadataFromDocument( t ) : this.readFeatureCollectionMetadataFromNode( t @@ -16915,12 +17112,12 @@ class Sp extends sf { ); } readFeatureCollectionMetadataFromNode(t) { - const e = {}, n = vn( + const e = {}, n = Rn( t.getAttribute("numberOfFeatures") ); - return e.numberOfFeatures = n, B( + return e.numberOfFeatures = n, $( e, - uc, + mc, t, [], this.gmlFormat_ @@ -16932,17 +17129,17 @@ class Sp extends sf { return this.readTransactionResponseFromNode(e); } readTransactionResponseFromNode(t) { - return B( + return $( {}, - Cp, + Kp, t, [] ); } writeGetFeature(t) { - const e = K(Aa[this.version_], "GetFeature"); + const e = j(Da[this.version_], "GetFeature"); e.setAttribute("service", "WFS"), e.setAttribute("version", this.version_), t.handle && e.setAttribute("handle", t.handle), t.outputFormat && e.setAttribute("outputFormat", t.outputFormat), t.maxFeatures !== void 0 && e.setAttribute("maxFeatures", String(t.maxFeatures)), t.resultType && e.setAttribute("resultType", t.resultType), t.startIndex !== void 0 && e.setAttribute("startIndex", String(t.startIndex)), t.count !== void 0 && e.setAttribute("count", String(t.count)), t.viewParams !== void 0 && e.setAttribute("viewParams", t.viewParams), e.setAttributeNS( - Ia, + Fa, "xsi:schemaLocation", this.schemaLocation_ ); @@ -16955,9 +17152,9 @@ class Sp extends sf { featureNS: t.featureNS ? t.featureNS : this.featureNS_, featurePrefix: t.featurePrefix, propertyNames: t.propertyNames ? t.propertyNames : [] - }), Y(Array.isArray(t.featureTypes), 11), typeof t.featureTypes[0] == "string") { + }), X(Array.isArray(t.featureTypes), 11), typeof t.featureTypes[0] == "string") { let s = t.filter; - t.bbox && (Y(t.geometryName, 12), s = this.combineBboxAndFilter( + t.bbox && (X(t.geometryName, 12), s = this.combineBboxAndFilter( t.geometryName, t.bbox, t.srsName, @@ -16965,7 +17162,7 @@ class Sp extends sf { )), Object.assign(n, { geometryName: t.geometryName, filter: s - }), Ic( + }), Nc( e, t.featureTypes, [n] @@ -16981,25 +17178,25 @@ class Sp extends sf { Object.assign(n, { geometryName: s.geometryName, filter: r - }), Ic(e, [s.name], [n]); + }), Nc(e, [s.name], [n]); }); return e; } combineBboxAndFilter(t, e, n, s) { - const r = xp(t, e, n); - return s ? vp(s, r) : r; + const r = Yp(t, e, n); + return s ? Xp(s, r) : r; } writeTransaction(t, e, n, s) { - const r = [], o = s.version ? s.version : this.version_, a = K(Aa[o], "Transaction"); + const r = [], o = s.version ? s.version : this.version_, a = j(Da[o], "Transaction"); a.setAttribute("service", "WFS"), a.setAttribute("version", o); let l; s && (l = s.gmlOptions ? s.gmlOptions : {}, s.handle && a.setAttribute("handle", s.handle)), a.setAttributeNS( - Ia, + Fa, "xsi:schemaLocation", - dc[o] + pc[o] ); - const h = Rp(a, l, o, s); - return t && Cr("Insert", t, r, h), e && Cr("Update", e, r, h), n && Cr("Delete", n, r, h), s.nativeElements && Cr( + const h = t_(a, l, o, s); + return t && Rr("Insert", t, r, h), e && Rr("Update", e, r, h), n && Rr("Delete", n, r, h), s.nativeElements && Rr( "Native", s.nativeElements, r, @@ -17018,14 +17215,14 @@ class Sp extends sf { for (let e = t.firstElementChild; e; e = e.nextElementSibling) if (!(e.childNodes.length === 0 || e.childNodes.length === 1 && e.firstChild.nodeType === 3)) { const n = [{}]; - return this.gmlFormat_.readGeometryElement(e, n), J(n.pop().srsName); + return this.gmlFormat_.readGeometryElement(e, n), q(n.pop().srsName); } } return null; } } -function Rp(i, t, e, n) { - const s = n.featurePrefix ? n.featurePrefix : af; +function t_(i, t, e, n) { + const s = n.featurePrefix ? n.featurePrefix : sf; let r; return e === "1.0.0" ? r = 2 : e === "1.1.0" ? r = 3 : e === "2.0.0" && (r = 3.2), Object.assign( { node: i }, @@ -17041,78 +17238,78 @@ function Rp(i, t, e, n) { t ); } -function Cr(i, t, e, n) { +function Rr(i, t, e, n) { Et( n, - of, - ce(i), + nf, + de(i), t, e ); } -function fc(i, t) { - return B({}, Mp, i, t); +function _c(i, t) { + return $({}, jp, i, t); } -const bp = { +const e_ = { "http://www.opengis.net/ogc": { - FeatureId: H(function(i, t) { + FeatureId: W(function(i, t) { return i.getAttribute("fid"); }) }, "http://www.opengis.net/ogc/1.1": { - FeatureId: H(function(i, t) { + FeatureId: W(function(i, t) { return i.getAttribute("fid"); }) } }; -function gc(i, t) { - Bi(bp, i, t); +function yc(i, t) { + Yi(e_, i, t); } -const Lp = { +const i_ = { "http://www.opengis.net/wfs": { - Feature: gc + Feature: yc }, "http://www.opengis.net/wfs/2.0": { - Feature: gc + Feature: yc } }; -function mc(i, t) { - return B([], Lp, i, t); +function vc(i, t) { + return $([], i_, i, t); } -function _c(i, t, e) { - const n = e[e.length - 1], s = n.featureType, r = n.featureNS, o = n.gmlVersion, a = K(r, s); - i.appendChild(a), o === 2 ? Xs.prototype.writeFeatureElement(a, t, e) : o === 3 ? Q.prototype.writeFeatureElement(a, t, e) : Ol.prototype.writeFeatureElement(a, t, e); +function xc(i, t, e) { + const n = e[e.length - 1], s = n.featureType, r = n.featureNS, o = n.gmlVersion, a = j(r, s); + i.appendChild(a), o === 2 ? qs.prototype.writeFeatureElement(a, t, e) : o === 3 ? J.prototype.writeFeatureElement(a, t, e) : Gl.prototype.writeFeatureElement(a, t, e); } -function lf(i, t, e) { - const s = e[e.length - 1].version, r = Fl[s], o = K(r, "Filter"), a = K(r, "FeatureId"); +function rf(i, t, e) { + const s = e[e.length - 1].version, r = Bl[s], o = j(r, "Filter"), a = j(r, "FeatureId"); o.appendChild(a), a.setAttribute("fid", t), i.appendChild(o); } -function Gl(i, t) { - i = i || af; +function Ul(i, t) { + i = i || sf; const e = i + ":"; return t.startsWith(e) ? t : e + t; } -function pc(i, t, e) { +function Cc(i, t, e) { const n = e[e.length - 1]; - Y(t.getId() !== void 0, 26); - const s = n.featureType, r = n.featurePrefix, o = n.featureNS, a = Gl(r, s); - i.setAttribute("typeName", a), i.setAttributeNS(Nl, "xmlns:" + r, o); + X(t.getId() !== void 0, 26); + const s = n.featureType, r = n.featurePrefix, o = n.featureNS, a = Ul(r, s); + i.setAttribute("typeName", a), i.setAttributeNS($l, "xmlns:" + r, o); const l = t.getId(); - l !== void 0 && lf(i, l, e); + l !== void 0 && rf(i, l, e); } -function yc(i, t, e) { +function Mc(i, t, e) { const n = e[e.length - 1]; - Y(t.getId() !== void 0, 27); - const s = n.version, r = n.featureType, o = n.featurePrefix, a = n.featureNS, l = Gl(o, r), h = t.getGeometryName(); - i.setAttribute("typeName", l), i.setAttributeNS(Nl, "xmlns:" + o, a); + X(t.getId() !== void 0, 27); + const s = n.version, r = n.featureType, o = n.featurePrefix, a = n.featureNS, l = Ul(o, r), h = t.getGeometryName(); + i.setAttribute("typeName", l), i.setAttributeNS($l, "xmlns:" + o, a); const c = t.getId(); if (c !== void 0) { const u = t.getKeys(), d = []; for (let f = 0, g = u.length; f < g; f++) { const m = t.get(u[f]); if (m !== void 0) { - let _ = u[f]; - m && typeof m.getSimplifiedGeometry == "function" && (_ = h), d.push({ name: _, value: m }); + let p = u[f]; + m && typeof m.getSimplifiedGeometry == "function" && (p = h), d.push({ name: p, value: m }); } } Et( @@ -17123,135 +17320,135 @@ function yc(i, t, e) { hasZ: n.hasZ, srsName: n.srsName }, - of, - ce("Property"), + nf, + de("Property"), d, e - ), lf(i, c, e); + ), rf(i, c, e); } } -function vc(i, t, e) { - const n = e[e.length - 1], s = n.version, r = Aa[s], o = K(r, "Name"), a = n.gmlVersion; +function Ec(i, t, e) { + const n = e[e.length - 1], s = n.version, r = Da[s], o = j(r, "Name"), a = n.gmlVersion; if (i.appendChild(o), Tt(o, t.name), t.value !== void 0 && t.value !== null) { - const l = K(r, "Value"); - i.appendChild(l), t.value && typeof t.value.getSimplifiedGeometry == "function" ? a === 2 ? Xs.prototype.writeGeometryElement(l, t.value, e) : a === 3 ? Q.prototype.writeGeometryElement(l, t.value, e) : Ol.prototype.writeGeometryElement(l, t.value, e) : Tt(l, t.value); + const l = j(r, "Value"); + i.appendChild(l), t.value && typeof t.value.getSimplifiedGeometry == "function" ? a === 2 ? qs.prototype.writeGeometryElement(l, t.value, e) : a === 3 ? J.prototype.writeGeometryElement(l, t.value, e) : Gl.prototype.writeGeometryElement(l, t.value, e) : Tt(l, t.value); } } -function xc(i, t, e) { +function wc(i, t, e) { t.vendorId && i.setAttribute("vendorId", t.vendorId), t.safeToIgnore !== void 0 && i.setAttribute("safeToIgnore", String(t.safeToIgnore)), t.value !== void 0 && Tt(i, t.value); } -const Mo = { +const Lo = { "http://www.opengis.net/wfs": { - Query: C(Mc) + Query: M(Sc) }, "http://www.opengis.net/wfs/2.0": { - Query: C(Mc) + Query: M(Sc) }, "http://www.opengis.net/ogc": { - During: C(wc), - And: C(Er), - Or: C(Er), - Not: C(Sc), - BBOX: C(Cc), - Contains: C(di), - Intersects: C(di), - Within: C(di), - DWithin: C(Ec), - PropertyIsEqualTo: C(_e), - PropertyIsNotEqualTo: C(_e), - PropertyIsLessThan: C(_e), - PropertyIsLessThanOrEqualTo: C(_e), - PropertyIsGreaterThan: C(_e), - PropertyIsGreaterThanOrEqualTo: C(_e), - PropertyIsNull: C(Rc), - PropertyIsBetween: C(bc), - PropertyIsLike: C(Lc) + During: M(Lc), + And: M(br), + Or: M(br), + Not: M(Tc), + BBOX: M(Rc), + Contains: M(yi), + Intersects: M(yi), + Within: M(yi), + DWithin: M(bc), + PropertyIsEqualTo: M(ye), + PropertyIsNotEqualTo: M(ye), + PropertyIsLessThan: M(ye), + PropertyIsLessThanOrEqualTo: M(ye), + PropertyIsGreaterThan: M(ye), + PropertyIsGreaterThanOrEqualTo: M(ye), + PropertyIsNull: M(Ic), + PropertyIsBetween: M(Ac), + PropertyIsLike: M(Pc) }, "http://www.opengis.net/fes/2.0": { - During: C(wc), - And: C(Er), - Or: C(Er), - Not: C(Sc), - BBOX: C(Cc), - Contains: C(di), - Disjoint: C(di), - Intersects: C(di), - ResourceId: C(Ip), - Within: C(di), - DWithin: C(Ec), - PropertyIsEqualTo: C(_e), - PropertyIsNotEqualTo: C(_e), - PropertyIsLessThan: C(_e), - PropertyIsLessThanOrEqualTo: C(_e), - PropertyIsGreaterThan: C(_e), - PropertyIsGreaterThanOrEqualTo: C(_e), - PropertyIsNull: C(Rc), - PropertyIsBetween: C(bc), - PropertyIsLike: C(Lc) + During: M(Lc), + And: M(br), + Or: M(br), + Not: M(Tc), + BBOX: M(Rc), + Contains: M(yi), + Disjoint: M(yi), + Intersects: M(yi), + ResourceId: M(s_), + Within: M(yi), + DWithin: M(bc), + PropertyIsEqualTo: M(ye), + PropertyIsNotEqualTo: M(ye), + PropertyIsLessThan: M(ye), + PropertyIsLessThanOrEqualTo: M(ye), + PropertyIsGreaterThan: M(ye), + PropertyIsGreaterThanOrEqualTo: M(ye), + PropertyIsNull: M(Ic), + PropertyIsBetween: M(Ac), + PropertyIsLike: M(Pc) } }; -function Mc(i, t, e) { +function Sc(i, t, e) { const n = e[e.length - 1], s = n.version, r = n.featurePrefix, o = n.featureNS, a = n.propertyNames, l = n.srsName; let h; - r ? h = Gl(r, t) : h = t; + r ? h = Ul(r, t) : h = t; let c; - s === "2.0.0" ? c = "typeNames" : c = "typeName", i.setAttribute(c, h), l && i.setAttribute("srsName", l), o && i.setAttributeNS(Nl, "xmlns:" + r, o); + s === "2.0.0" ? c = "typeNames" : c = "typeName", i.setAttribute(c, h), l && i.setAttribute("srsName", l), o && i.setAttributeNS($l, "xmlns:" + r, o); const u = Object.assign({}, n); u.node = i, Et( u, - Ep, - ce("PropertyName"), + qp, + de("PropertyName"), a, e ); const d = n.filter; if (d) { - const f = K(Co(s), "Filter"); - i.appendChild(f), Tp(f, d, e); + const f = j(To(s), "Filter"); + i.appendChild(f), n_(f, d, e); } } -function Tp(i, t, e) { +function n_(i, t, e) { const n = e[e.length - 1], s = { node: i }; Object.assign(s, { context: n }), Et( s, - Mo, - ce(t.getTagName()), + Lo, + de(t.getTagName()), [t], e ); } -function Cc(i, t, e) { +function Rc(i, t, e) { const n = e[e.length - 1], r = n.context.version; n.srsName = t.srsName; - const o = kl[r]; - Wn(r, i, t.geometryName), o.prototype.writeGeometryElement(i, t.extent, e); + const o = Zl[r]; + ts(r, i, t.geometryName), o.prototype.writeGeometryElement(i, t.extent, e); } -function Ip(i, t, e) { +function s_(i, t, e) { i.setAttribute("rid", t.rid); } -function di(i, t, e) { +function yi(i, t, e) { const n = e[e.length - 1], r = n.context.version; n.srsName = t.srsName; - const o = kl[r]; - Wn(r, i, t.geometryName), o.prototype.writeGeometryElement(i, t.geometry, e); + const o = Zl[r]; + ts(r, i, t.geometryName), o.prototype.writeGeometryElement(i, t.geometry, e); } -function Ec(i, t, e) { +function bc(i, t, e) { const r = e[e.length - 1].context.version; - di(i, t, e); - const o = K(Co(r), "Distance"); + yi(i, t, e); + const o = j(To(r), "Distance"); Tt(o, t.distance.toString()), r === "2.0.0" ? o.setAttribute("uom", t.unit) : o.setAttribute("units", t.unit), i.appendChild(o); } -function wc(i, t, e) { +function Lc(i, t, e) { const r = e[e.length - 1].context.version; - Yr(Dl[r], "ValueReference", i, t.propertyName); - const o = K(Qe, "TimePeriod"); + to(zl[r], "ValueReference", i, t.propertyName); + const o = j(ri, "TimePeriod"); i.appendChild(o); - const a = K(Qe, "begin"); - o.appendChild(a), Tc(a, t.begin); - const l = K(Qe, "end"); - o.appendChild(l), Tc(l, t.end); + const a = j(ri, "begin"); + o.appendChild(a), Oc(a, t.begin); + const l = j(ri, "end"); + o.appendChild(l), Oc(l, t.end); } -function Er(i, t, e) { +function br(i, t, e) { const s = e[e.length - 1].context, r = { node: i }; Object.assign(r, { context: s }); const o = t.conditions; @@ -17259,80 +17456,80 @@ function Er(i, t, e) { const h = o[a]; Et( r, - Mo, - ce(h.getTagName()), + Lo, + de(h.getTagName()), [h], e ); } } -function Sc(i, t, e) { +function Tc(i, t, e) { const s = e[e.length - 1].context, r = { node: i }; Object.assign(r, { context: s }); const o = t.condition; Et( r, - Mo, - ce(o.getTagName()), + Lo, + de(o.getTagName()), [o], e ); } -function _e(i, t, e) { +function ye(i, t, e) { const r = e[e.length - 1].context.version; - t.matchCase !== void 0 && i.setAttribute("matchCase", t.matchCase.toString()), Wn(r, i, t.propertyName), jr(r, i, "" + t.expression); + t.matchCase !== void 0 && i.setAttribute("matchCase", t.matchCase.toString()), ts(r, i, t.propertyName), eo(r, i, "" + t.expression); } -function Rc(i, t, e) { +function Ic(i, t, e) { const r = e[e.length - 1].context.version; - Wn(r, i, t.propertyName); + ts(r, i, t.propertyName); } -function bc(i, t, e) { - const r = e[e.length - 1].context.version, o = Co(r); - Wn(r, i, t.propertyName); - const a = K(o, "LowerBoundary"); - i.appendChild(a), jr(r, a, "" + t.lowerBoundary); - const l = K(o, "UpperBoundary"); - i.appendChild(l), jr(r, l, "" + t.upperBoundary); +function Ac(i, t, e) { + const r = e[e.length - 1].context.version, o = To(r); + ts(r, i, t.propertyName); + const a = j(o, "LowerBoundary"); + i.appendChild(a), eo(r, a, "" + t.lowerBoundary); + const l = j(o, "UpperBoundary"); + i.appendChild(l), eo(r, l, "" + t.upperBoundary); } -function Lc(i, t, e) { +function Pc(i, t, e) { const r = e[e.length - 1].context.version; - i.setAttribute("wildCard", t.wildCard), i.setAttribute("singleChar", t.singleChar), i.setAttribute("escapeChar", t.escapeChar), t.matchCase !== void 0 && i.setAttribute("matchCase", t.matchCase.toString()), Wn(r, i, t.propertyName), jr(r, i, "" + t.pattern); + i.setAttribute("wildCard", t.wildCard), i.setAttribute("singleChar", t.singleChar), i.setAttribute("escapeChar", t.escapeChar), t.matchCase !== void 0 && i.setAttribute("matchCase", t.matchCase.toString()), ts(r, i, t.propertyName), eo(r, i, "" + t.pattern); } -function Yr(i, t, e, n) { - const s = K(i, t); +function to(i, t, e, n) { + const s = j(i, t); Tt(s, n), e.appendChild(s); } -function jr(i, t, e) { - Yr(Co(i), "Literal", t, e); +function eo(i, t, e) { + to(To(i), "Literal", t, e); } -function Wn(i, t, e) { - i === "2.0.0" ? Yr(Dl[i], "ValueReference", t, e) : Yr(Fl[i], "PropertyName", t, e); +function ts(i, t, e) { + i === "2.0.0" ? to(zl[i], "ValueReference", t, e) : to(Bl[i], "PropertyName", t, e); } -function Tc(i, t) { - const e = K(Qe, "TimeInstant"); +function Oc(i, t) { + const e = j(ri, "TimeInstant"); i.appendChild(e); - const n = K(Qe, "timePosition"); + const n = j(ri, "timePosition"); e.appendChild(n), Tt(n, t); } -function Ic(i, t, e) { +function Nc(i, t, e) { const n = e[e.length - 1], s = Object.assign({}, n); s.node = i, Et( s, - Mo, - ce("Query"), + Lo, + de("Query"), t, e ); } -function Co(i) { +function To(i) { let t; - return i === "2.0.0" ? t = Dl[i] : t = Fl[i], t; + return i === "2.0.0" ? t = zl[i] : t = Bl[i], t; } -const Ap = Sp; -class hf { +const r_ = Qp; +class of { static getSource(t, e, n) { - return new Ws({ - format: new Ap({ + return new Qn({ + format: new r_({ version: "2.0.0" }), url: (s) => { @@ -17346,34 +17543,65 @@ class hf { console.error("The replacement string cannot be found. You lose the BBOX optimization."), r = `${r}&${e}`; return r; }, - strategy: n ? i2 : Sd + strategy: n ? Qm : Id }); } } -class Ac { - constructor() { - this.control = new qd(), this.store = w(); - const t = this.store.getMap(), e = this.store.getOptions(), n = new Vs(), s = hf.getSource(w().getOptions().wfs.url, "", !1); - this.displayDataOnMap(t, n, e, s), t.on("click", (r) => { - t.forEachFeatureAtPixel(r.pixel, (o) => { - var a; - o && ((a = o.getGeometry()) == null ? void 0 : a.getType()) === "Point" && (o.getProperties().features && o.getProperties().features.length === 1 ? (this.store.getSelectedFeature(o.getProperties().features[0].get("objectid")) === void 0 && this.store.addSelectedFeature(o.getProperties().features[0], o.getProperties().features[0].get("objectid"), "select"), st.sendEvent("icon-clicked", o.getProperties().features[0].get("objectid"))) : this.control.hide()); +class Fc { + constructor(t, e, n) { + this.vectorLayer = new Vn(), this.store = n, this.states = e, this.renderUtils = t; + const s = this.store.getMap(), r = this.store.getOptions(); + if (!r || !s) + throw new Error("Missing map or options"); + this.options = r, this.map = s, this.control = new kl(this.store), this.vectorLayer = new Vn(), this.vectorSource = of.getSource(r.wfs.url, "", !1), this.vectorSource.on("featuresloadend", () => { + this.renderUtils.setIsLoaded(!0); + }), this.displayDataOnMap(s, this.vectorLayer, r, this.vectorSource), this.states.readonly || (s.on("click", (o) => { + s.forEachFeatureAtPixel(o.pixel, (a) => { + var l; + a && ((l = a.getGeometry()) == null ? void 0 : l.getType()) === "Point" && (a.getProperties().features && a.getProperties().features.length === 1 ? (this.store.getSelectedFeature(a.getProperties().features[0].get("objectid")) === void 0 && this.store.addSelectedFeature(a.getProperties().features[0], a.getProperties().features[0].get("objectid"), "select"), tt.sendEvent("icon-clicked", a.getProperties().features[0].get("objectid"))) : this.control.hide()); }); }), window.addEventListener("recenter-selected-element", () => { + var l; + const o = this.store.getCurrentItemId(), a = (l = this.store.getSelectedFeature(o)) == null ? void 0 : l.get("geom").getCoordinates(); + s.getView().setCenter(a); + })), r.mode.type === "mix" && window.addEventListener("remove-clicked", (o) => { var a; - const r = this.store.getCurrentItemId(), o = (a = this.store.getSelectedFeature(r)) == null ? void 0 : a.get("geom").getCoordinates(); - t.getView().setCenter(o); + (a = this.vectorLayer.getSource()) == null || a.getFeatures().forEach((l) => { + l.get("features").forEach((h) => { + h.get("objectid") === o.detail && (this.removeItem(h), this.control.hide()); + }); + }); }); } + renderCurrentSelection(t) { + this.renderUtils.displayCurrentElementSelectMode(this.vectorSource, t); + } + removeCurrentSelection() { + var t; + (t = this.vectorLayer.getSource()) == null || t.getFeatures().forEach((e) => { + e.get("features").forEach((n) => { + n.get("isClick") && this.setIconToDisplay(n, void 0); + }); + }); + } + setChangeResolution(t, e, n) { + const s = t.getView().getZoom(); + s && s >= n.maxZoom ? e.setDistance(0) : e.setDistance(n.cluster.distance); + } displayDataOnMap(t, e, n, s) { const r = new H2({ distance: n.cluster.distance, minDistance: n.cluster.minDistance, source: s - }), o = new tp(); + }), o = new Lp(); e.setSource(r), e.setStyle(function(a) { return o.clusterWithIcon(a); - }), t.addLayer(e), this.control.disable(), t.addControl(this.control), this.toogleDataSelection(e); + }), t.addLayer(e), this.control.disable(), this.states.readonly || (t.addControl(this.control), this.toogleDataSelection(e)), Wt.registerBorderConstaintMapEvent( + "change:resolution", + () => this.setChangeResolution(t, r, n), + this.map, + this.options + ); } setCurrentElement(t) { var e; @@ -17383,34 +17611,48 @@ class Ac { t.set("isClick", e), t.set("isSelected", e); } removeSelectedItem(t) { - this.removeItem(t), this.control.hide(), st.sendEvent("rule-validation", void 0), Jd.setCustomStyleWithouInfoBox(); + this.removeItem(t), this.control.hide(), tt.sendEvent("rule-validation", void 0), jd.setCustomStyleWithouInfoBox(this.store); } removeItem(t) { this.setIconToDisplay(t, void 0), this.store.removeSelectedFeature(t.get("objectid")); } setInformationBox(t) { - this.setIconToDisplay(t, !0), this.control.show(), st.sendEvent("open-select-create-box", t.get("geom").getCoordinates()), this.store.setCustomDisplay(!0), this.store.setTargetBoxSize("select"); + this.setIconToDisplay(t, !0), this.control.show(), tt.sendEvent("open-select-create-box", t.get("geom").getCoordinates()), this.store.setCustomDisplay(!0), this.store.setTargetBoxSize("select"); } toogleDataSelection(t) { window.addEventListener("authorize-clicked", (e) => { - var s; + var s, r; const n = this.store.getSelectedFeature(e.detail); - n && (n.get("isClick") ? this.store.getMaxElement() === 1 || this.store.getCurrentItemId() === n.get("objectid") ? this.removeSelectedItem(n) : (this.setCurrentElement(n), n.set("isSelected", !0), st.sendEvent("open-select-create-box", n.get("geom").getCoordinates()), this.control.show()) : this.store.getMaxElement() === 1 ? ((s = t.getSource()) == null || s.getFeatures().forEach((o) => { - o.get("features").forEach((a) => { - a.get("isClick") && (this.setIconToDisplay(a, void 0), this.store.removeSelectedFeature(a.get("objectid"))); - }); - }), this.store.setCurrentItemId(n.get("objectid")), st.sendEvent("rule-validation", void 0), this.setInformationBox(n)) : this.store.getMaxElement() === -1 || this.store.getSelectedFeatures().length <= this.store.getMaxElement() ? (this.setCurrentElement(n), this.setInformationBox(n)) : this.removeItem(n)), this.store.getMap().get("target").className = `${this.store.getTargetBoxSize()} ${this.store.getTheme()}`; + if (n) + if (n.get("isClick")) + this.store.getMaxElement() === 1 || this.store.getCurrentItemId() === n.get("objectid") ? this.removeSelectedItem(n) : (this.setCurrentElement(n), n.set("isSelected", !0), tt.sendEvent("open-select-create-box", n.get("geom").getCoordinates()), this.control.show()); + else if (this.store.getMaxElement() === 1) { + if (((s = this.store.getOptions()) == null ? void 0 : s.mode.type) === "mix") { + const a = this.store.getSelectedFeatures(); + if (a && a.length >= 1 && this.store.getCurrentFeatureType(a[0].get("id")) === "create") { + const h = a[0].get("id"); + tt.sendEvent("remove-created", h); + } + } + (r = t.getSource()) == null || r.getFeatures().forEach((a) => { + a.get("features").forEach((l) => { + l.get("isClick") && (this.setIconToDisplay(l, void 0), this.store.removeSelectedFeature(l.get("objectid"))); + }); + }), this.store.setCurrentItemId(n.get("objectid")), tt.sendEvent("rule-validation", void 0), this.setInformationBox(n); + } else + this.store.getMaxElement() === -1 || this.store.getSelectedFeatures().length <= this.store.getMaxElement() ? (this.setCurrentElement(n), this.setInformationBox(n)) : this.removeItem(n); + this.map.get("target").className = `${this.store.getTargetBoxSize()} ${gt.getTheme()}`; }); } } -class Pp { +class o_ { read(t) { if (t) if (typeof t == "string") { - const e = Di(t); + const e = Vi(t); return this.readFromDocument(e); } else - return Fi(t) ? this.readFromDocument(t) : this.readFromNode(t); + return Ui(t) ? this.readFromDocument(t) : this.readFromNode(t); else return null; } @@ -17423,258 +17665,258 @@ class Pp { readFromNode(t) { } } -const cf = Pp, Op = "http://www.w3.org/1999/xlink"; -function $l(i) { - return i.getAttributeNS(Op, "href"); +const af = o_, a_ = "http://www.w3.org/1999/xlink"; +function Vl(i) { + return i.getAttributeNS(a_, "href"); } -const ie = [null, "http://www.opengis.net/ows/1.1"], Np = ut(ie, { - ServiceIdentification: O(ry), - ServiceProvider: O(ay), - OperationsMetadata: O(ny) +const re = [null, "http://www.opengis.net/ows/1.1"], l_ = ct(re, { + ServiceIdentification: O(O_), + ServiceProvider: O(F_), + OperationsMetadata: O(A_) }); -class Fp extends cf { +class h_ extends af { constructor() { super(); } readFromNode(t) { - const e = B({}, Np, t, []); + const e = $({}, l_, t, []); return e || null; } } -const Dp = ut(ie, { +const c_ = ct(re, { DeliveryPoint: O(nt), City: O(nt), AdministrativeArea: O(nt), PostalCode: O(nt), Country: O(nt), ElectronicMailAddress: O(nt) -}), kp = ut(ie, { - Value: le(ly) -}), Gp = ut(ie, { - AllowedValues: O(Kp) -}), $p = ut(ie, { - Phone: O(sy), - Address: O(jp) -}), Bp = ut(ie, { - HTTP: O(ey) -}), zp = ut(ie, { - Get: le(ty), +}), u_ = ct(re, { + Value: ue(D_) +}), d_ = ct(re, { + AllowedValues: O(w_) +}), f_ = ct(re, { + Phone: O(P_), + Address: O(E_) +}), g_ = ct(re, { + HTTP: O(T_) +}), m_ = ct(re, { + Get: ue(L_), Post: void 0 -}), Zp = ut(ie, { - DCP: O(Qp) -}), Up = ut(ie, { - Operation: iy -}), Vp = ut(ie, { +}), p_ = ct(re, { + DCP: O(b_) +}), __ = ct(re, { + Operation: I_ +}), y_ = ct(re, { Voice: O(nt), Facsimile: O(nt) -}), Wp = ut(ie, { - Constraint: le(qp) -}), Hp = ut(ie, { +}), v_ = ct(re, { + Constraint: ue(S_) +}), x_ = ct(re, { IndividualName: O(nt), PositionName: O(nt), - ContactInfo: O(Jp) -}), Xp = ut(ie, { + ContactInfo: O(R_) +}), C_ = ct(re, { Abstract: O(nt), AccessConstraints: O(nt), Fees: O(nt), Title: O(nt), ServiceTypeVersion: O(nt), ServiceType: O(nt) -}), Yp = ut(ie, { +}), M_ = ct(re, { ProviderName: O(nt), - ProviderSite: O($l), - ServiceContact: O(oy) + ProviderSite: O(Vl), + ServiceContact: O(N_) }); -function jp(i, t) { - return B({}, Dp, i, t); +function E_(i, t) { + return $({}, c_, i, t); } -function Kp(i, t) { - return B({}, kp, i, t); +function w_(i, t) { + return $({}, u_, i, t); } -function qp(i, t) { +function S_(i, t) { const e = i.getAttribute("name"); if (!!e) - return B({ name: e }, Gp, i, t); + return $({ name: e }, d_, i, t); } -function Jp(i, t) { - return B({}, $p, i, t); +function R_(i, t) { + return $({}, f_, i, t); } -function Qp(i, t) { - return B({}, Bp, i, t); +function b_(i, t) { + return $({}, g_, i, t); } -function ty(i, t) { - const e = $l(i); +function L_(i, t) { + const e = Vl(i); if (!!e) - return B( + return $( { href: e }, - Wp, + v_, i, t ); } -function ey(i, t) { - return B({}, zp, i, t); +function T_(i, t) { + return $({}, m_, i, t); } -function iy(i, t) { - const e = i.getAttribute("name"), n = B({}, Zp, i, t); +function I_(i, t) { + const e = i.getAttribute("name"), n = $({}, p_, i, t); if (!n) return; const s = t[t.length - 1]; s[e] = n; } -function ny(i, t) { - return B({}, Up, i, t); +function A_(i, t) { + return $({}, __, i, t); } -function sy(i, t) { - return B({}, Vp, i, t); +function P_(i, t) { + return $({}, y_, i, t); } -function ry(i, t) { - return B({}, Xp, i, t); +function O_(i, t) { + return $({}, C_, i, t); } -function oy(i, t) { - return B({}, Hp, i, t); +function N_(i, t) { + return $({}, x_, i, t); } -function ay(i, t) { - return B({}, Yp, i, t); +function F_(i, t) { + return $({}, M_, i, t); } -function ly(i, t) { +function D_(i, t) { return nt(i); } -const hy = Fp, Ge = [null, "http://www.opengis.net/wmts/1.0"], Hn = [null, "http://www.opengis.net/ows/1.1"], cy = ut(Ge, { - Contents: O(Cy) +const k_ = h_, Ze = [null, "http://www.opengis.net/wmts/1.0"], es = [null, "http://www.opengis.net/ows/1.1"], G_ = ct(Ze, { + Contents: O(K_) }); -class uy extends cf { +class $_ extends af { constructor() { - super(), this.owsParser_ = new hy(); + super(), this.owsParser_ = new k_(); } readFromNode(t) { let e = t.getAttribute("version"); e && (e = e.trim()); let n = this.owsParser_.readFromNode(t); - return n ? (n.version = e, n = B( + return n ? (n.version = e, n = $( n, - cy, + G_, t, [] ), n || null) : null; } } -const dy = ut(Ge, { - Layer: le(Ey), - TileMatrixSet: le(wy) -}), fy = ut( - Ge, +const B_ = ct(Ze, { + Layer: ue(q_), + TileMatrixSet: ue(J_) +}), z_ = ct( + Ze, { - Style: le(Sy), - Format: le(nt), - TileMatrixSetLink: le(Ry), - Dimension: le(by), - ResourceURL: le(Ly) + Style: ue(Q_), + Format: ue(nt), + TileMatrixSetLink: ue(ty), + Dimension: ue(ey), + ResourceURL: ue(iy) }, - ut(Hn, { + ct(es, { Title: O(nt), Abstract: O(nt), - WGS84BoundingBox: O(uf), + WGS84BoundingBox: O(lf), Identifier: O(nt) }) -), gy = ut( - Ge, +), Z_ = ct( + Ze, { - LegendURL: le(Ty) + LegendURL: ue(ny) }, - ut(Hn, { + ct(es, { Title: O(nt), Identifier: O(nt) }) -), my = ut(Ge, { +), U_ = ct(Ze, { TileMatrixSet: O(nt), - TileMatrixSetLimits: O(Ay) -}), _y = ut(Ge, { - TileMatrixLimits: H(Py) -}), py = ut(Ge, { + TileMatrixSetLimits: O(ry) +}), V_ = ct(Ze, { + TileMatrixLimits: W(oy) +}), W_ = ct(Ze, { TileMatrix: O(nt), - MinTileRow: O(te), - MaxTileRow: O(te), - MinTileCol: O(te), - MaxTileCol: O(te) -}), yy = ut( - Ge, + MinTileRow: O(ne), + MaxTileRow: O(ne), + MinTileCol: O(ne), + MaxTileCol: O(ne) +}), H_ = ct( + Ze, { Default: O(nt), - Value: le(nt) + Value: ue(nt) }, - ut(Hn, { + ct(es, { Identifier: O(nt) }) -), vy = ut(Hn, { - LowerCorner: H(Pa), - UpperCorner: H(Pa) -}), xy = ut( - Ge, +), X_ = ct(es, { + LowerCorner: W(ka), + UpperCorner: W(ka) +}), Y_ = ct( + Ze, { WellKnownScaleSet: O(nt), - TileMatrix: le(Iy) + TileMatrix: ue(sy) }, - ut(Hn, { + ct(es, { SupportedCRS: O(nt), Identifier: O(nt), - BoundingBox: O(uf) + BoundingBox: O(lf) }) -), My = ut( - Ge, +), j_ = ct( + Ze, { - TopLeftCorner: O(Pa), - ScaleDenominator: O(op), - TileWidth: O(te), - TileHeight: O(te), - MatrixWidth: O(te), - MatrixHeight: O(te) + TopLeftCorner: O(ka), + ScaleDenominator: O(Np), + TileWidth: O(ne), + TileHeight: O(ne), + MatrixWidth: O(ne), + MatrixHeight: O(ne) }, - ut(Hn, { + ct(es, { Identifier: O(nt) }) ); -function Cy(i, t) { - return B({}, dy, i, t); +function K_(i, t) { + return $({}, B_, i, t); } -function Ey(i, t) { - return B({}, fy, i, t); +function q_(i, t) { + return $({}, z_, i, t); } -function wy(i, t) { - return B({}, xy, i, t); +function J_(i, t) { + return $({}, Y_, i, t); } -function Sy(i, t) { - const e = B({}, gy, i, t); +function Q_(i, t) { + const e = $({}, Z_, i, t); if (!e) return; const n = i.getAttribute("isDefault") === "true"; return e.isDefault = n, e; } -function Ry(i, t) { - return B({}, my, i, t); +function ty(i, t) { + return $({}, U_, i, t); } -function by(i, t) { - return B({}, yy, i, t); +function ey(i, t) { + return $({}, H_, i, t); } -function Ly(i, t) { +function iy(i, t) { const e = i.getAttribute("format"), n = i.getAttribute("template"), s = i.getAttribute("resourceType"), r = {}; return e && (r.format = e), n && (r.template = n), s && (r.resourceType = s), r; } -function uf(i, t) { - const e = B( +function lf(i, t) { + const e = $( [], - vy, + X_, i, t ); if (e.length == 2) - return sa(e); + return ca(e); } -function Ty(i, t) { +function ny(i, t) { const e = {}; - return e.format = i.getAttribute("format"), e.href = $l(i), e; + return e.format = i.getAttribute("format"), e.href = Vl(i), e; } -function Pa(i, t) { +function ka(i, t) { const e = nt(i).split(/\s+/); if (!e || e.length != 2) return; @@ -17682,33 +17924,49 @@ function Pa(i, t) { if (!(isNaN(n) || isNaN(s))) return [n, s]; } -function Iy(i, t) { - return B({}, My, i, t); +function sy(i, t) { + return $({}, j_, i, t); } -function Ay(i, t) { - return B([], _y, i, t); +function ry(i, t) { + return $([], V_, i, t); } -function Py(i, t) { - return B({}, py, i, t); +function oy(i, t) { + return $({}, W_, i, t); } -const Oy = uy; -class Ny { - constructor() { - const t = new Oy(), e = w().getOptions(); - let n = !0; +const ay = $_; +class ly { + constructor(t) { + const e = new ay(), n = t.getOptions(); + if (!n) + throw new Error("Missing options"); const s = []; - Promise.all(e.wmts.map((r) => { + Promise.all(n.wmts.map((r) => { fetch(r.capability).then((o) => o.text()).then(function(o) { + var c, u, d; const a = new J2({ opacity: 1 - }), l = t.read(o), h = n_(l, { + }), l = e.read(o), h = np(l, { layer: r.layer, matrixSet: r.projection }); - h && (a.setSource(new i_(h)), a.setVisible(n), s.push(a), w().getMap().getLayers().insertAt(0, a), n = !1, w().getBorderConstraint() && a.setExtent(w().getBorderConstraint())); + h && (a.setSource(new ip(h)), a.setVisible(r.layer == n.wmts[0].layer), s.push(a), (c = t.getMap()) == null || c.getLayers().insertAt(0, a), t.getBorderConstraint() && a.setExtent((d = (u = t.getBorderConstraint()) == null ? void 0 : u.getSource()) == null ? void 0 : d.getExtent()), a.on("postrender", function(f) { + var p, _; + const g = n2(f), m = f.context; + m && (m.globalCompositeOperation = "destination-in", (_ = (p = t.getBorderConstraint()) == null ? void 0 : p.getSource()) == null || _.forEachFeature(function(y) { + const v = new Vt({ + fill: new Yt({ + color: "white" + }) + }); + g.drawFeature(y, v); + }), m.globalCompositeOperation = "source-over"); + })); + }); + })), n.border.url !== "" && window.addEventListener("border-contraint-enabled", () => { + s.forEach((r) => { + var o, a; + return r.setExtent((a = (o = t.getBorderConstraint()) == null ? void 0 : o.getSource()) == null ? void 0 : a.getExtent()); }); - })), e.borderUrl !== "" && window.addEventListener("border-contraint-enabled", () => { - s.forEach((r) => r.setExtent(w().getBorderConstraint())); }), window.addEventListener("layer-selected", (r) => { var o; s.forEach((a) => a.setVisible(!1)), (o = s.find((a) => { @@ -17718,30 +17976,30 @@ class Ny { }); } } -const Fy = `:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move} -`, Dy = `#map{width:100%;height:100%}.ol-layer{background-color:#80808020} -`, Eo = `.left-buttons-control-container{display:flex;position:absolute;width:var(--icon-width);flex-direction:column;left:var(--side-distance)}.right-buttons-control-container{display:flex;position:absolute;right:var(--side-distance);width:var(--icon-width);flex-direction:column}.ol-zoom{position:relative;width:var(--icon-width)!important;top:0px;left:0px}.ol-full-screen{position:relative;width:var(--icon-width)!important;top:0px;right:0px;margin-top:var(--top-distance)}.center-control,.rotation-control{margin-top:var(--top-distance)}.ol-zoom>button{margin:0}.ol-full-screen>button,.ol-full-screen-custom-small>button,.ol-full-screen-custom-medium>button,.ol-full-screen-custom-large>button{border-radius:var(--icon-border-radius);margin:0;cursor:pointer}.ol-zoom-in,.ol-zoom-out,.information-control,.center-control,.rotation-control,.ol-full-screen-true,.ol-full-screen-false{width:var(--icon-width)!important;height:var(--icon-height)!important;background-color:var(--control-background-color)!important;border-radius:var(--icon-border-radius);cursor:pointer}.ol-zoom-in:hover,.ol-zoom-out:hover,.information-control:hover,.center-control:hover,.rotation-control:hover,.ol-full-screen-true:hover,.ol-full-screen-false:hover{background-color:var(--control-background-color-hover)!important;outline:none!important}.ol-zoom-in{border-radius:0!important;border-top-right-radius:var(--icon-border-radius)!important;border-top-left-radius:var(--icon-border-radius)!important}.ol-zoom-out{border-radius:0!important;border-bottom-right-radius:var(--icon-border-radius)!important;border-bottom-left-radius:var(--icon-border-radius)!important}.ol-zoom-in>div>svg,.ol-zoom-out>div>svg,.ol-full-screen-true>div>svg,.ol-full-screen-false>div>svg{width:var(--svg-icon-size)!important;height:var(--svg-icon-size)!important}.ol-zoom-in>div>svg>g>.icon,.ol-zoom-out>div>svg>g>.icon,.ol-full-screen-true>div>svg>g>.icon,.ol-full-screen-false>div>svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}@media only screen and (min-width: 420px){.left-buttons-control-container,.right-buttons-control-container{top:var(--top-distance)}}@media only screen and (max-width: 419px){.left-buttons-control-container,.right-buttons-control-container{top:calc(calc(var(--top-distance) * 2) + var(--box-height))}} -`, df = `.notification-element-info-light{--notification-background-color: #DBEAFE;--notification-stroke-color: #1D4ED8;--notification-text-color: #1D4ED8}.notification-element-info-dark{--notification-background-color: #2563EB;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}.notification-element-warning-light{--notification-background-color: #FEF3C7;--notification-stroke-color: #B45309;--notification-text-color: #B45309}.notification-element-warning-dark{--notification-background-color: #D97706;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}.notification-element-error-light{--notification-background-color: #FEE2E2;--notification-stroke-color: #B91C1C;--notification-text-color: #B91C1C}.notification-element-error-dark{--notification-background-color: #DC2626;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}@media only screen and (max-width: 995px){.notification-box{left:calc((100% - 334px)/2);max-width:302px}}@media only screen and (min-width: 996px){.notification-box{left:calc((100% - (var(--notification-width) + 30px)) / 2);width:var(--notification-width)}}.notification-box{position:absolute;bottom:10px}.notification-element{display:block;font-family:sans-serif;--icon-size: 32px;background-color:var(--notification-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);z-index:10;width:100%;grid-template-columns:100%;grid-template-rows:100%}.notification-title>div>svg{display:block;width:var(--icon-size);height:var(--icon-size);padding-right:10px}.notification-icon-container{height:100%}.notification-title>div>svg>g>.icon{fill:none;stroke:var(--notification-stroke-color);stroke-width:2px;stroke-linejoin:round;stroke-linecap:round}.notification-title{display:flex}.notification-title-text{font-weight:400;font-size:12px;line-height:15px;color:var(--notification-text-color)} +const hy = `:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move} +`, cy = `#map{width:100%;height:100%;background-color:#fff}.ol-layer{background-color:#80808020}.map-overlay{width:100vw;height:100vh;background-color:gray;opacity:.3}.overlay-index{z-index:10} +`, Io = `.left-buttons-control-container{display:flex;position:absolute;width:var(--icon-width);flex-direction:column;left:var(--side-distance)}.right-buttons-control-container{display:flex;position:absolute;right:var(--side-distance);width:var(--icon-width);flex-direction:column}.ol-control{background-color:transparent}.ol-control button:hover{background-color:var(--control-background-color-hover);outline:none}.ol-control button:focus{background-color:var(--control-background-color-hover);outline:none}.ol-zoom{position:relative;top:0px;left:0px;margin-bottom:var(--top-distance)}.ol-zoom>.ol-zoom-in{margin-bottom:1px}.ol-full-screen{position:relative;width:var(--icon-width);top:0px;right:0px;margin-bottom:var(--top-distance)}.center-control,.information-control{margin-bottom:var(--top-distance)}.ol-zoom>button{margin:0}.ol-full-screen>button,.ol-full-screen-custom-small>button,.ol-full-screen-custom-medium>button,.ol-full-screen-custom-large>button{border-radius:var(--icon-border-radius);margin:0;cursor:pointer}.ol-control button{background-color:var(--control-background-color);width:var(--icon-width);height:var(--icon-height)}.ol-zoom-in,.ol-zoom-out,.information-control,.center-control,.rotation-control,.ol-full-screen-true,.ol-full-screen-false{z-index:0;position:relative;width:var(--icon-width);height:var(--icon-height);background-color:var(--control-background-color);border-radius:var(--icon-border-radius);cursor:pointer}.ol-zoom-in:hover,.ol-zoom-out:hover,.information-control:hover,.center-control:hover,.rotation-control:hover,.ol-full-screen-true:hover,.ol-full-screen-false:hover,.information-control:focus,.center-control:focus,.rotation-control:focus{background-color:var(--control-background-color-hover);outline:none}.ol-zoom-in{border-top-right-radius:var(--icon-border-radius);border-top-left-radius:var(--icon-border-radius)}.ol-zoom-out{border-bottom-right-radius:var(--icon-border-radius);border-bottom-left-radius:var(--icon-border-radius)}.ol-zoom-in>div>svg,.ol-zoom-out>div>svg,.ol-full-screen-true>div>svg,.ol-full-screen-false>div>svg{width:var(--svg-icon-size);height:var(--svg-icon-size)}.ol-zoom-in>div>svg>g>.icon,.ol-zoom-out>div>svg>g>.icon,.ol-full-screen-true>div>svg>g>.icon,.ol-full-screen-false>div>svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}@media only screen and (min-width: 420px){.left-buttons-control-container,.right-buttons-control-container{top:var(--top-distance)}}@media only screen and (max-width: 419px){.left-buttons-control-container,.right-buttons-control-container{top:calc(calc(var(--top-distance) * 2) + var(--box-height))}} +`, hf = `.notification-element-info-light{--notification-background-color: #DBEAFE;--notification-stroke-color: #1D4ED8;--notification-text-color: #1D4ED8}.notification-element-info-dark{--notification-background-color: #2563EB;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}.notification-element-warning-light{--notification-background-color: #FEF3C7;--notification-stroke-color: #B45309;--notification-text-color: #B45309}.notification-element-warning-dark{--notification-background-color: #D97706;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}.notification-element-error-light{--notification-background-color: #FEE2E2;--notification-stroke-color: #B91C1C;--notification-text-color: #B91C1C}.notification-element-error-dark{--notification-background-color: #DC2626;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}@media only screen and (max-width: 350px){.notification-element{left:10px;width:calc(100% - 50px);max-width:302px}}@media only screen and (min-width: 351px) and (max-width: 995px){.notification-element{left:calc((100% - 334px)/2);width:100%;max-width:302px}}@media only screen and (min-width: 996px){.notification-element{left:calc((100% - (var(--notification-width) + 30px)) / 2);width:var(--notification-width)}}.notification-element{position:absolute;bottom:10px;display:block;font-family:sans-serif;--icon-size: 32px;background-color:var(--notification-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);z-index:5;grid-template-columns:100%;grid-template-rows:100%}.notification-title>div>svg{display:block;width:var(--icon-size);height:var(--icon-size);padding-right:10px}.notification-icon-container{height:100%}.notification-title>div>svg>g>.icon{fill:none;stroke:var(--notification-stroke-color);stroke-width:2px;stroke-linejoin:round;stroke-linecap:round}.notification-title{display:flex}.notification-title-text{font-weight:400;font-size:12px;line-height:15px;color:var(--notification-text-color)} `; -var ky = Object.defineProperty, Gy = Object.getOwnPropertyDescriptor, Ys = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? Gy(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var uy = Object.defineProperty, dy = Object.getOwnPropertyDescriptor, Js = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? dy(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && ky(t, e, s), s; + return n && s && uy(t, e, s), s; }; -let Wi = class extends At { +let tn = class extends Pt { constructor() { super(), this.type = "info", this.message = "", this.icon = "", this.theme = ""; } firstUpdated() { switch (this.type) { case "info": - this.icon = ot.info, this.theme = `notification-element-info-${w().getTheme()}`; + this.icon = st.info, this.theme = `notification-element-info-${gt.getTheme()}`; break; case "warning": - this.icon = ot.warning, this.theme = `notification-element-warning-${w().getTheme()}`; + this.icon = st.warning, this.theme = `notification-element-warning-${gt.getTheme()}`; break; case "error": - this.icon = ot.error, this.theme = `notification-element-error-${w().getTheme()}`; + this.icon = st.error, this.theme = `notification-element-error-${gt.getTheme()}`; break; } } @@ -17750,7 +18008,7 @@ let Wi = class extends At {
- ${Fe(this.icon)} + ${Le(this.icon)}
${this.message}
@@ -17758,33 +18016,28 @@ let Wi = class extends At { `; } }; -Wi.styles = [xt(df)]; -Ys([ - ji() -], Wi.prototype, "type", 2); -Ys([ - ji() -], Wi.prototype, "message", 2); -Ys([ - Yt() -], Wi.prototype, "icon", 2); -Ys([ - Yt() -], Wi.prototype, "theme", 2); -Wi = Ys([ - Xt("notification-box") -], Wi); -class is extends Dt { - constructor(t) { - const e = document.createElement( +tn.styles = [yt(hf)]; +Js([ + Te() +], tn.prototype, "type", 2); +Js([ + Te() +], tn.prototype, "message", 2); +Js([ + It() +], tn.prototype, "icon", 2); +Js([ + It() +], tn.prototype, "theme", 2); +tn = Js([ + qt("notification-box") +], tn); +class yn extends kt { + constructor(t, e) { + const n = document.createElement( "notification-box" ); - e.type = t.type, e.message = t.message, super({ element: e }), this.ruleType = t.rule.type, this.div = e, this.div.classList.add("notification-box"); - const n = w().getMap().getSize(); - n && this.div.style.setProperty("--notification-width", n[0] * 0.33 + "px"), window.addEventListener("resize", () => { - const s = w().getMap().getSize(); - s && this.div.style.setProperty("--notification-width", s[0] * 0.33 + "px"); - }); + n.type = t.type, n.message = t.message, super({ element: n }), this.ruleType = t.rule.type, this.div = n, Wt.setResizeEvent(this.div, "--notification-width", e); } disable() { this.div.classList.add("disabled"); @@ -17796,174 +18049,81 @@ class is extends Dt { this.div.classList.remove("fade-in"), this.div.classList.add("fade-out"); } } -let Pc = /[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/, Oc = new RegExp("^" + Pc.source + "(\\s" + Pc.source + "){1,}"); -const $y = (i) => { - let t = i.split(";"), e = t.pop(), n = (t.shift() || "").split("=").pop(), s = 0; - function r(p) { - let v = e.substring(s).match(p); - return v ? (s += v[0].length, v[0]) : null; - } - function o(p) { - return p && n.match(/\d+/) && (p.crs = { - type: "name", - properties: { - name: "urn:ogc:def:crs:EPSG::" + n - } - }), p; +class fy { + constructor() { + this.geojsonFormat = new Wd(); } - function a() { - r(/^\s*/); + convertToMultiPoint(t) { + return new an({ + geometry: new Ro([[t[0], t[1]]]) + }); } - function l() { - a(); - let p = 0, v = [], x = [v], M = v, E; - for (; E = r(/^(\()/) || r(/^(\))/) || r(/^(,)/) || r(Oc); ) { - if (E === "(") - x.push(M), M = [], x[x.length - 1].push(M), p++; - else if (E === ")") { - if (M.length === 0 || (M = x.pop(), !M)) - return null; - if (p--, p === 0) - break; - } else if (E === ",") - M = [], x[x.length - 1].push(M); - else if (!E.split(/\s/g).some(isNaN)) - Array.prototype.push.apply(M, E.split(/\s/g).map(parseFloat)); - else - return null; - a(); - } - return p !== 0 ? null : v; + formatGeometryCollection(t) { + const e = new Vd(t); + return this.geojsonFormat.writeGeometry(e, { + decimals: 2 + }); } - function h() { - let p = [], v, x; - for (; x = r(Oc) || r(/^(,)/); ) - x === "," ? (p.push(v), v = []) : x.split(/\s/g).some(isNaN) || (v || (v = []), Array.prototype.push.apply(v, x.split(/\s/g).map(parseFloat))), a(); - if (v) - p.push(v); - else - return null; - return p.length ? p : null; + formatFeatureCollection(t) { + return this.geojsonFormat.writeFeatures(t, { + decimals: 2 + }); } - function c() { - if (!r(/^(point(\sz)?)/i) || (a(), !r(/^(\()/))) - return null; - let p = h(); - return !p || (a(), !r(/^(\))/)) ? null : { - type: "Point", - coordinates: p[0] - }; + generateGeometryCollection(t) { + const e = []; + return t.forEach((n) => { + const s = n.getGeometry(); + if (s) { + const r = s, o = this.convertToMultiPoint( + r.getCoordinates() + ).getGeometry(); + o && e.push(o); + } + }), this.formatGeometryCollection(e); } - function u() { - if (!r(/^(multipoint(\sz)?)/i)) - return null; - a(), e = "MULTIPOINT (" + e.substring(e.indexOf("(") + 1, e.length - 1).replace(/\(/g, "").replace(/\)/g, "") + ")"; - let v = l(); - return v ? (a(), { - type: "MultiPoint", - coordinates: v - }) : null; - } - function d() { - if (!r(/^(multilinestring(\sz)?)/i)) - return null; - a(); - let p = l(); - return p ? (a(), { - type: "MultiLineString", - coordinates: p - }) : null; - } - function f() { - if (!r(/^(linestring(\sz)?)/i) || (a(), !r(/^(\()/))) - return null; - let p = h(); - return !p || !r(/^(\))/) ? null : { - type: "LineString", - coordinates: p - }; + generateFeatureCollection(t, e) { + const n = []; + return t.forEach((s) => { + const r = s.getGeometry(); + if (r) { + const o = r, a = this.convertToMultiPoint(o.getCoordinates()); + if (a) { + const l = s.get("objectid"); + l && e.getCurrentFeatureType(l) === "select" && a.set("objectid", l), n.push(a); + } + } + }), this.formatFeatureCollection(n); } - function g() { - if (!r(/^(polygon(\sz)?)/i)) - return null; - a(); - let p = l(); - return p ? { - type: "Polygon", - coordinates: p - } : null; - } - function m() { - if (!r(/^(multipolygon(\sz)?)/i)) - return null; - a(); - let p = l(); - return p ? { - type: "MultiPolygon", - coordinates: p - } : null; - } - function _() { - let p = [], v; - if (!r(/^(geometrycollection)/i) || (a(), !r(/^(\()/))) - return null; - for (; v = y(); ) - p.push(v), a(), r(/^(,)/), a(); - return r(/^(\))/) ? { - type: "GeometryCollection", - geometries: p - } : null; + generateTargetGeometry(t, e) { + var s; + const n = this.convertToMultiPoint(t); + if (n) { + if (((s = e.getOptions()) == null ? void 0 : s.outputFormat) === "GeometryCollection") { + const r = n.getGeometry(); + return r ? this.formatGeometryCollection([r]) : void 0; + } + return this.formatFeatureCollection([n]); + } } - function y() { - return c() || f() || g() || u() || d() || m() || _(); - } - return o(y()); -}, ff = (i) => { - i.type === "Feature" && (i = i.geometry); - function t(a) { - return a.join(" "); - } - function e(a) { - return a.map(t).join(", "); - } - function n(a) { - return a.map(e).map(r).join(", "); - } - function s(a) { - return a.map(n).map(r).join(", "); - } - function r(a) { - return "(" + a + ")"; - } - let o = i; - switch (o.type) { - case "Point": - return o.coordinates && o.coordinates.length === 3 ? "POINT Z (" + t(o.coordinates) + ")" : "POINT (" + t(o.coordinates) + ")"; - case "LineString": - return o.coordinates && o.coordinates[0] && o.coordinates[0].length === 3 ? "LINESTRING Z (" + e(o.coordinates) + ")" : "LINESTRING (" + e(o.coordinates) + ")"; - case "Polygon": - return o.coordinates && o.coordinates[0] && o.coordinates[0][0] && o.coordinates[0][0].length === 3 ? "POLYGON Z (" + n(o.coordinates) + ")" : "POLYGON (" + n(o.coordinates) + ")"; - case "MultiPoint": - return o.coordinates && o.coordinates[0] && o.coordinates[0].length === 3 ? "MULTIPOINT Z (" + e(o.coordinates) + ")" : "MULTIPOINT (" + e(o.coordinates) + ")"; - case "MultiLineString": - return o.coordinates && o.coordinates[0] && o.coordinates[0][0] && o.coordinates[0][0].length === 3 ? "MULTILINESTRING Z (" + n(o.coordinates) + ")" : "MULTILINESTRING (" + n(o.coordinates) + ")"; - case "MultiPolygon": - return o.coordinates && o.coordinates[0] && o.coordinates[0][0] && o.coordinates[0][0] && o.coordinates[0][0][0].length === 3 ? "MULTIPOLYGON Z (" + s(o.coordinates) + ")" : "MULTIPOLYGON (" + s(o.coordinates) + ")"; - case "GeometryCollection": - return "GEOMETRYCOLLECTION (" + o.geometries.map(ff).join(", ") + ")"; - default: - throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input"); + generateExportData(t, e) { + var n; + return ((n = e.getOptions()) == null ? void 0 : n.outputFormat) === "GeometryCollection" ? this.generateGeometryCollection(t) : this.generateFeatureCollection(t, e); } -}; -var Nc = { - parse: $y, - stringify: ff -}; -class By { - constructor() { - this.validZoomConstraint = !0, this.validAreaConstraint = !0, this.validMaxElementConstraint = !0, this.displayMaxElementConstraint = !1; - const t = w().getOptions(); - switch (t.mode.type) { +} +class gy { + constructor(t) { + var s; + if (this.validZoomConstraint = !0, this.validAreaConstraint = !0, this.validBorderContraint = !0, this.validMaxElementConstraint = !0, this.displayMaxElementConstraint = !1, this.outputFormat = new fy(), !t) + throw new Error("Missing store!"); + this.store = t; + const e = this.store.getOptions(); + if (!e) + throw new Error("Missing options!"); + this.options = e; + const n = this.store.getMap(); + if (!n) + throw new Error("Missing map!"); + switch (this.map = n, e.mode.type) { case "target": this.setupTargetMode(); break; @@ -17977,35 +18137,29 @@ class By { this.setupMixMode(); break; default: - w().getMap().addControl(new is({ + (s = this.map) == null || s.addControl(new yn({ type: "error", message: "Veuillez s\xE9lectionner un mode de fonctionnement valide.", rule: { type: "NOT_VALID_MODE" } - })); + }, this.map)); } - this.setup(t.notifications), this.displayRightNotification(); + this.setup(e.notifications), this.displayRightNotification(); } displayRightNotification() { - var t, e, n, s, r, o, a, l, h, c, u, d, f, g, m, _; - this.validZoomConstraint ? this.validAreaConstraint ? this.displayMaxElementConstraint ? ((h = this.zoomNotificationControl) == null || h.hide(), (c = this.inclusionNotificationControl) == null || c.hide(), (u = this.maxElementNotificationControl) == null || u.show(), (d = this.infosNotificationControl) == null || d.hide()) : ((f = this.zoomNotificationControl) == null || f.hide(), (g = this.inclusionNotificationControl) == null || g.hide(), (m = this.maxElementNotificationControl) == null || m.hide(), (_ = this.infosNotificationControl) == null || _.show()) : ((r = this.zoomNotificationControl) == null || r.hide(), (o = this.inclusionNotificationControl) == null || o.show(), (a = this.maxElementNotificationControl) == null || a.hide(), (l = this.infosNotificationControl) == null || l.hide()) : ((t = this.zoomNotificationControl) == null || t.show(), (e = this.inclusionNotificationControl) == null || e.hide(), (n = this.maxElementNotificationControl) == null || n.hide(), (s = this.infosNotificationControl) == null || s.hide()); + var t, e, n, s, r, o, a, l, h, c, u, d, f, g, m, p, _, y, v, x, C, E, w, R, A; + this.validZoomConstraint ? this.validBorderContraint ? this.validAreaConstraint ? this.displayMaxElementConstraint ? ((p = this.zoomNotificationControl) == null || p.hide(), (_ = this.inclusionNotificationControl) == null || _.hide(), (y = this.maxElementNotificationControl) == null || y.show(), (v = this.infosNotificationControl) == null || v.hide(), (x = this.borderContraintNotificationControl) == null || x.hide()) : ((C = this.zoomNotificationControl) == null || C.hide(), (E = this.inclusionNotificationControl) == null || E.hide(), (w = this.maxElementNotificationControl) == null || w.hide(), (R = this.infosNotificationControl) == null || R.show(), (A = this.borderContraintNotificationControl) == null || A.hide()) : ((u = this.zoomNotificationControl) == null || u.hide(), (d = this.inclusionNotificationControl) == null || d.show(), (f = this.maxElementNotificationControl) == null || f.hide(), (g = this.infosNotificationControl) == null || g.hide(), (m = this.borderContraintNotificationControl) == null || m.hide()) : ((o = this.zoomNotificationControl) == null || o.hide(), (a = this.inclusionNotificationControl) == null || a.hide(), (l = this.maxElementNotificationControl) == null || l.hide(), (h = this.infosNotificationControl) == null || h.hide(), (c = this.borderContraintNotificationControl) == null || c.show()) : ((t = this.zoomNotificationControl) == null || t.show(), (e = this.inclusionNotificationControl) == null || e.hide(), (n = this.maxElementNotificationControl) == null || n.hide(), (s = this.infosNotificationControl) == null || s.hide(), (r = this.borderContraintNotificationControl) == null || r.hide()); } setupTargetMode() { window.addEventListener("current-center-position", (t) => { - if (this.validZoomConstraint && this.validAreaConstraint) { - const e = { - type: "Point", - coordinates: t.detail - }; - st.sendEvent("position-selected", [{ geometry: Nc.stringify(e) }]); - } + this.validZoomConstraint && this.validAreaConstraint && tt.sendEvent("position-selected", this.outputFormat.generateTargetGeometry(t.detail, this.store)); }); } iconClickedListener() { window.addEventListener("icon-clicked", (t) => { - const e = w().getSelectedFeatures(); - this.validZoomConstraint && e.length > 0 && (this.checkMaxElementContraint(e), this.validMaxElementConstraint && st.sendEvent("position-selected", this.generateExportData(e)), st.sendEvent("authorize-clicked", t.detail)), this.displayRightNotification(); + const e = this.store.getSelectedFeatures(); + this.validZoomConstraint && e.length > 0 && (this.checkMaxElementContraint(e), this.validMaxElementConstraint && tt.sendEvent("position-selected", this.outputFormat.generateExportData(e, this.store)), tt.sendEvent("authorize-clicked", t.detail)), this.displayRightNotification(); }); } setupSelectMode() { @@ -18013,10 +18167,10 @@ class By { } iconCreatedListener() { window.addEventListener("icon-created", (t) => { - const e = w().getSelectedFeatures(); - this.checkMaxElementContraint(e), this.validZoomConstraint && this.validMaxElementConstraint && e.length > 0 && st.sendEvent("position-selected", this.generateExportData(e)), st.sendEvent("authorize-created", t.detail), this.displayRightNotification(); + const e = this.store.getSelectedFeatures(); + this.checkMaxElementContraint(e), this.checkIsInBorder(e), this.validZoomConstraint && this.validMaxElementConstraint && e.length > 0 && this.validBorderContraint ? (tt.sendEvent("position-selected", this.outputFormat.generateExportData(e, this.store)), tt.sendEvent("authorize-created", t.detail)) : tt.sendEvent("refused-created", t.detail), this.displayRightNotification(); }), window.addEventListener("icon-removed", () => { - st.sendEvent("position-selected", void 0), st.sendEvent("remove-created-icon", void 0); + tt.sendEvent("position-selected", void 0), tt.sendEvent("remove-created-icon", void 0); }); } setupCreateMode() { @@ -18024,8 +18178,8 @@ class By { } ruleValidationListener() { window.addEventListener("rule-validation", () => { - const t = w().getSelectedFeatures(); - this.checkMaxElementContraint(t), this.validZoomConstraint && this.validMaxElementConstraint && t.length > 0 ? st.sendEvent("position-selected", this.generateExportData(t)) : st.sendEvent("position-selected", void 0), this.displayRightNotification(); + const t = this.store.getSelectedFeatures(); + this.checkMaxElementContraint(t), this.validZoomConstraint && this.validMaxElementConstraint && t.length > 0 ? tt.sendEvent("position-selected", this.outputFormat.generateExportData(t, this.store)) : tt.sendEvent("position-selected", void 0), this.displayRightNotification(); }); } setupMixMode() { @@ -18033,65 +18187,79 @@ class By { } setup(t) { t.forEach((e) => { - e.rule.type === "ZOOM_CONSTRAINT" && this.setupZoomContraint(e), e.rule.type === "AREA_CONSTRAINT" && this.setupInclusionAreaConstraint(e), e.rule.type === "MAX_SELECTION" && this.setupMaxSelectionConstraint(e), e.type === "info" && (this.infosNotificationControl = new is(e), w().getMap().addControl(this.infosNotificationControl)); - }); + e.rule.type === "ZOOM_CONSTRAINT" && this.setupZoomContraint(e), e.rule.type === "AREA_CONSTRAINT" && this.setupInclusionAreaConstraint(e), e.rule.type === "MAX_SELECTION" && this.setupMaxSelectionConstraint(e), e.type === "info" && (this.infosNotificationControl = new yn(e, this.map), this.map.addControl(this.infosNotificationControl)); + }), this.options.border.url !== "" && (this.borderContraintNotificationControl = new yn({ + type: "warning", + message: this.options.border.notification, + rule: { + type: "BORDER_CONSTRAINT" + } + }, this.map), this.borderContraintNotificationControl.hide(), this.map.addControl(this.borderContraintNotificationControl)); } setupZoomContraint(t) { - this.zoomNotificationControl = new is(t), this.zoomNotificationControl.disable(), w().getMap().addControl(this.zoomNotificationControl), this.hasValidZoom(t) && (this.validZoomConstraint = !1), w().getMap().getView().on("change:resolution", () => { - this.checkZoomConstraint(t), this.displayRightNotification(); - }); + this.zoomNotificationControl = new yn(t, this.map), this.zoomNotificationControl.disable(), this.map.addControl(this.zoomNotificationControl), this.hasValidZoom(t) && (this.validZoomConstraint = !1), Wt.registerBorderConstaintMapEvent( + "change:resolution", + () => { + this.checkZoomConstraint(t), this.displayRightNotification(); + }, + this.map, + this.options + ); } setupInclusionAreaConstraint(t) { - this.inclusionNotificationControl = new is(t), this.inclusionNotificationControl.disable(), w().getMap().addControl(this.inclusionNotificationControl), window.addEventListener("inclusion-area-included", (e) => { + this.inclusionNotificationControl = new yn(t, this.map), this.inclusionNotificationControl.disable(), this.map.addControl(this.inclusionNotificationControl), window.addEventListener("inclusion-area-included", (e) => { this.checkInclusionAreaConstraint(e.detail, t.rule.couldBypass), this.displayRightNotification(); }); } setupMaxSelectionConstraint(t) { const e = t.rule.maxElement; - e !== void 0 && w().setMaxElement(e), t.message = t.message.replace("{x}", `${e}`), this.maxElementNotificationControl = new is(t), this.maxElementNotificationControl.disable(), w().getMap().addControl(this.maxElementNotificationControl); + e !== void 0 && this.store.setMaxElement(e), t.message = t.message.replace("{x}", `${e}`), this.maxElementNotificationControl = new yn(t, this.map), this.maxElementNotificationControl.disable(), this.map.addControl(this.maxElementNotificationControl); } hasValidZoom(t) { - const e = w().getMap().getView().getZoom(); + const e = this.map.getView().getZoom(); return e && t.rule.minZoom && e < t.rule.minZoom; } checkZoomConstraint(t) { - this.hasValidZoom(t) ? (this.validZoomConstraint = !1, st.sendEvent("position-selected", void 0)) : (this.validZoomConstraint = !0, st.sendEvent("rule-validation", void 0)); + this.hasValidZoom(t) ? (this.validZoomConstraint = !1, tt.sendEvent("position-selected", void 0)) : (this.validZoomConstraint = !0, tt.sendEvent("rule-validation", void 0)); } checkInclusionAreaConstraint(t, e) { - t ? this.validAreaConstraint = !0 : e ? this.validAreaConstraint = !0 : (this.validAreaConstraint = !1, st.sendEvent("position-selected", void 0)); + t ? this.validAreaConstraint = !0 : e ? this.validAreaConstraint = !0 : (this.validAreaConstraint = !1, this.options.mode.type === "target" ? tt.sendEvent("position-selected", void 0) : setTimeout(() => { + this.validAreaConstraint = !0, this.displayRightNotification(); + }, 2e3)); } checkMaxElementContraint(t) { - w().getMaxElement() >= 0 && (t.length >= w().getMaxElement() ? w().getMaxElement() === 1 && t.length === w().getMaxElement() ? (this.validMaxElementConstraint = !0, this.displayMaxElementConstraint = !1) : t.length > w().getMaxElement() && (this.validMaxElementConstraint = !1, this.displayMaxElementConstraint = !0) : (this.validMaxElementConstraint = !0, this.displayMaxElementConstraint = !1)); - } - generateExportData(t) { - const e = []; - return t.forEach((n) => { - e.push({ - id: n.get("objectid"), - geometry: Nc.stringify({ - type: "Point", - coordinates: n.get("geom").getCoordinates() - }) - }); - }), e; + this.store.getMaxElement() >= 0 && (t.length >= this.store.getMaxElement() ? this.store.getMaxElement() === 1 && t.length === this.store.getMaxElement() ? (this.validMaxElementConstraint = !0, this.displayMaxElementConstraint = !1) : t.length === this.store.getMaxElement() && !this.validMaxElementConstraint ? (this.validMaxElementConstraint = !0, this.displayMaxElementConstraint = !0) : t.length > this.store.getMaxElement() && (this.validMaxElementConstraint = !1, this.displayMaxElementConstraint = !0) : (this.validMaxElementConstraint = !0, this.displayMaxElementConstraint = !1)); + } + checkIsInBorder(t) { + var e, n, s; + if (this.options.border.url !== "") { + const o = t[t.length - 1].getGeometry(); + ((s = (n = (e = this.store.getBorderConstraint()) == null ? void 0 : e.getSource()) == null ? void 0 : n.getFeatures()[0].getGeometry()) == null ? void 0 : s.intersectsCoordinate(o.getCoordinates())) ? this.validBorderContraint = !0 : (this.validBorderContraint = !1, this.displayRightNotification(), setTimeout(() => { + this.validBorderContraint = !0, this.displayRightNotification(); + }, 2e3)); + } else + this.validBorderContraint = !0; } } -const zy = `:host>.no-box{--box-height: 0px;--top-distance: 10px}:host>.select{--box-height: 68px;--top-distance: 10px}:host>.large{--box-height: 79px;--top-distance: 10px}:host>.medium{--box-height: 64px;--top-distance: 10px}:host>.small{--box-height: 49px;--top-distance: 10px}:host>.light{--control-background-color: rgb(30 41 59 / 75%);--control-background-color-hover: rgb(30 41 59 / 100%);--control-icon-color: white;--information-box-background-color: white;--information-box-title-color: #1E293B;--information-cross-hover-color: rgb(30 41 59 / 75%);--information-box-text-color: #334155;--select-icon-background: #1E293B;--icon-border-color: #CBD5E1}:host>.dark{--control-background-color: rgb(255 255 255 / 75%);--control-background-color-hover: rgb(255 255 255 / 100%);--control-icon-color: #1E293B;--information-box-background-color: #1F2937;--information-box-title-color: #F3F4F6;--information-cross-hover-color: rgb(255 255 255 / 75%);--information-box-text-color: #9CA3AF;--select-icon-background: rgb(255,255,255, .75);--icon-border-color: #334155}:host>#map{--icon-width: 36px;--icon-height: 36px;--side-distance: 10px;--icon-border-radius: 4px;--box-border-radius: 4px;--svg-icon-size: 26px;--icon-stroke-width: 2px} -`, Zy = `@keyframes fadeIn{0%{opacity:0;visibility:inherit}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0;visibility:hidden}}.fade-in{animation:fadeIn .3s forwards}.fade-out{animation:fadeOut .3s forwards}.disabled{visibility:hidden} +const my = `:host>.no-box{--box-height: 0px;--top-distance: 10px}:host>.select{--box-height: 68px;--top-distance: 10px}:host>.large{--box-height: 79px;--top-distance: 10px}:host>.medium{--box-height: 64px;--top-distance: 10px}:host>.small{--box-height: 49px;--top-distance: 10px}:host>.light{--control-background-color: rgb(30 41 59 / 75%);--control-background-color-hover: rgb(30 41 59 / 100%);--control-icon-color: white;--information-box-background-color: white;--information-box-title-color: #1E293B;--information-cross-hover-color: rgb(30 41 59 / 75%);--information-box-text-color: #334155;--suggestion-box-text-color: #334155;--select-icon-background: #1E293B;--icon-border-color: #CBD5E1}:host>.dark{--control-background-color: rgb(255 255 255 / 75%);--control-background-color-hover: rgb(255 255 255 / 100%);--control-icon-color: #1E293B;--information-box-background-color: #1F2937;--information-box-title-color: #F3F4F6;--information-cross-hover-color: rgb(255 255 255 / 75%);--information-box-text-color: #9CA3AF;--suggestion-box-text-color: #F1F5F9;--select-icon-background: rgb(255,255,255, .75);--icon-border-color: #334155}:host>#map{--icon-width: 36px;--icon-height: 36px;--side-distance: 10px;--icon-border-radius: 4px;--box-border-radius: 4px;--svg-icon-size: 26px;--icon-stroke-width: 2px;font-family:sans-serif} +`, py = `@keyframes fadeIn{0%{opacity:0;visibility:inherit}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0;visibility:hidden}}.fade-in{animation:fadeIn .3s forwards}.fade-out{animation:fadeOut .3s forwards}.disabled{visibility:hidden} +`, _y = `@media only screen and (min-width: 513px){.layer-container-position{right:55px;width:100%}}@media only screen and (min-width: 350px) and (max-width: 512px){.layer-container-position{left:calc(50% - 166px);width:100%}}@media only screen and (max-width: 350px){.layer-container-position{left:10px;width:calc(100% - 20px)}}.layer-container-position{z-index:1;max-width:332px;top:var(--top-distance);position:absolute}@media only screen and (min-width: 513px){.custom-popup-element-position{right:55px;width:100%}}@media only screen and (min-width: 350px) and (max-width: 512px){.custom-popup-element-position{left:calc(50% - 166px);width:100%}}@media only screen and (max-width: 350px){.custom-popup-element-position{left:10px;width:calc(100% - 20px)}}.custom-popup-element-position{font-family:sans-serif;position:absolute;top:10px;z-index:2;max-width:332px} `; -class Uy { - static getOptions(t) { +class yy { + static webComponentOptions(t) { const e = { zoom: 15, minZoom: 1, maxZoom: 20, - displayZoom: !0, - displayScaleLine: !1, - fullscreen: !0, + interaction: { + displayZoom: !0, + displayScaleLine: !1, + fullscreen: !0, + enableGeolocation: !1, + enableCenterButton: !0, + enableRotation: !0 + }, defaultCenter: [2539057, 1181111], - enableGeolocation: !1, - enableCenterButton: !0, - enableRotation: !0, information: { duration: 5e3, title: "This is a title", @@ -18130,61 +18298,82 @@ class Uy { requestWithoutCustomValue: "https://api3.geo.admin.ch/rest/services/api/SearchServer?limit=5&&type=locations&sr=2056&lang=fr&origins=address%2Cparcel", bboxRestiction: "2523099.818000,1167985.282000,2549752.141000,1192697.773000" }, - borderUrl: "" + border: { + url: "", + notification: "" + }, + outputFormat: "GeometryCollection" }; - t.zoom !== void 0 && (e.zoom = t.zoom), t.minZoom !== void 0 && (e.minZoom = t.minZoom), t.maxZoom !== void 0 && (e.maxZoom = t.maxZoom), t.displayZoom !== void 0 && (e.displayZoom = t.displayZoom), t.search !== void 0 && (e.search = t.search), t.displayScaleLine !== void 0 && (e.displayScaleLine = t.displayScaleLine), t.fullscreen !== void 0 && (e.fullscreen = t.fullscreen), t.defaultCenter !== void 0 && (e.defaultCenter = t.defaultCenter), t.enableGeolocation !== void 0 && (e.enableGeolocation = t.enableGeolocation), t.enableCenterButton !== void 0 && (e.enableCenterButton = t.enableCenterButton), t.enableRotation !== void 0 && (e.enableRotation = t.enableRotation), t.information !== void 0 && (e.information = t.information), t.notifications !== void 0 && t.notifications.length > 0 && (e.notifications = t.notifications), t.mode !== void 0 && (e.mode = t.mode), t.cluster !== void 0 && (e.cluster = t.cluster), t.geolocationInformation !== void 0 && (e.geolocationInformation = t.geolocationInformation), t.wfs !== void 0 && (e.wfs = t.wfs), t.wmts !== void 0 && (e.wmts = t.wmts), t.inclusionArea !== void 0 && (e.inclusionArea = t.inclusionArea), t.selectionTargetBoxMessage !== void 0 && (e.selectionTargetBoxMessage = t.selectionTargetBoxMessage), t.borderUrl !== void 0 && (e.borderUrl = t.borderUrl), w().setOptions(e); + return t.zoom !== void 0 && (e.zoom = t.zoom), t.minZoom !== void 0 && (e.minZoom = t.minZoom), t.maxZoom !== void 0 && (e.maxZoom = t.maxZoom), t.interaction !== void 0 && (e.interaction = t.interaction), t.search !== void 0 && (e.search = t.search), t.defaultCenter !== void 0 && t.defaultCenter[0] !== null && (e.defaultCenter = t.defaultCenter), t.information !== void 0 && (e.information = t.information), t.notifications !== void 0 && t.notifications.length > 0 && (e.notifications = t.notifications), t.mode !== void 0 && (e.mode = t.mode), t.cluster !== void 0 && (e.cluster = t.cluster), t.geolocationInformation !== void 0 && (e.geolocationInformation = t.geolocationInformation), t.wfs !== void 0 && (e.wfs = t.wfs), t.wmts !== void 0 && (e.wmts = t.wmts), t.inclusionArea !== void 0 && (e.inclusionArea = t.inclusionArea), t.selectionTargetBoxMessage !== void 0 && (e.selectionTargetBoxMessage = t.selectionTargetBoxMessage), t.border !== void 0 && (e.border = t.border), t.outputFormat !== void 0 && (e.outputFormat = t.outputFormat), e; } } -class Vy { - constructor() { - const t = hf.getSource(w().getOptions().inclusionArea.url, w().getOptions().inclusionArea.filter, !0), e = new Vs({ - source: t, - style: new Vt({ - stroke: new Ee({ - color: "red", - width: 1 - }) +class vy { + static setupStyle() { + return new Vt({ + stroke: new Re({ + color: "#C026D3", + width: 1 + }), + fill: new Yt({ + color: "rgb(191, 38, 211, 0.10)" }) }); - w().getMap().addLayer(e), window.addEventListener("current-center-position", (n) => { - var r; - const s = t.getClosestFeatureToCoordinate( - n.detail - ); - if (((r = s.getGeometry()) == null ? void 0 : r.getType()) === "Polygon") { - const o = s.getGeometry(); - st.sendEvent("inclusion-area-included", o == null ? void 0 : o.intersectsCoordinate(n.detail)); - } + } +} +class xy { + constructor(t) { + var s; + const e = t.getOptions(); + if (!e) + throw new Error("Invalid store options"); + this.vectorSource = of.getSource(e.inclusionArea.url, e.inclusionArea.filter, !0); + const n = new Vn({ + source: this.vectorSource, + style: vy.setupStyle() + }); + (s = t.getMap()) == null || s.addLayer(n), e.mode.type === "target" && window.addEventListener("current-center-position", (r) => { + this.couldCreate(r.detail); }); } + couldCreate(t) { + var n; + const e = this.vectorSource.getClosestFeatureToCoordinate( + t + ); + if (e && ((n = e.getGeometry()) == null ? void 0 : n.getType()) === "Polygon") { + const s = e.getGeometry(), r = s == null ? void 0 : s.intersectsCoordinate(t); + return tt.sendEvent("inclusion-area-included", r), r; + } + return !1; + } } -const wo = `svg{margin-left:calc((var(--icon-width) - var(--svg-icon-size)) / 2);margin-top:calc((var(--icon-height) - var(--svg-icon-size)) / 2);width:var(--svg-icon-size);height:var(--svg-icon-size)}svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round} +const Ao = `svg{margin-left:calc((var(--icon-width) - var(--svg-icon-size)) / 2);margin-top:calc((var(--icon-height) - var(--svg-icon-size)) / 2);width:var(--svg-icon-size);height:var(--svg-icon-size)}svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round} `; -var Wy = Object.defineProperty, Hy = Object.getOwnPropertyDescriptor, Xy = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? Hy(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var Cy = Object.defineProperty, My = Object.getOwnPropertyDescriptor, Ey = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? My(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && Wy(t, e, s), s; + return n && s && Cy(t, e, s), s; }; -let Oa = class extends At { +let Ga = class extends Pt { constructor() { super(); } render() { - return Lt`
+ return Lt`
-
- ${Fe(ot.geolocation)} +
+ ${Le(st.geolocation)}
`; } }; -Oa.styles = [xt(wo), xt(Eo)]; -Oa = Xy([ - Xt("geolocation-control-button") -], Oa); -class Yy extends Dt { +Ga.styles = [yt(Ao), yt(Io)]; +Ga = Ey([ + qt("geolocation-control-button") +], Ga); +class wy extends kt { constructor(t) { const e = document.createElement("geolocation-control-button"); super({ @@ -18192,7 +18381,7 @@ class Yy extends Dt { }), e.addEventListener("click", this.centerMap.bind(this), !1), this.setTarget(t); } centerMap() { - const t = w().getGeolocation(); + const t = gt.getGeolocation(); if (t) { const e = t.getPosition(), n = this.getMap(); if (n) { @@ -18202,61 +18391,69 @@ class Yy extends Dt { } } } -var jy = Object.defineProperty, Ky = Object.getOwnPropertyDescriptor, qy = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? Ky(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var Sy = Object.defineProperty, Ry = Object.getOwnPropertyDescriptor, by = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? Ry(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && jy(t, e, s), s; + return n && s && Sy(t, e, s), s; }; -let Na = class extends At { +let $a = class extends Pt { render() { - return Lt`
${Fe(ot.rotation)}
`; + return Lt`
${Le(st.rotation)}
`; } }; -Na.styles = [xt(wo)]; -Na = qy([ - Xt("rotation-control-button") -], Na); -class Fc extends Dt { - constructor(t) { - const e = document.createElement("div"), n = document.createElement("rotation-control-button"); - e.appendChild(n); - const s = document.createElement("div"); - s.className = "rotation-control ", s.appendChild(e), super({ - element: s - }), e.addEventListener("click", this.resetRotation.bind(this), !1), this.setTarget(t); +$a.styles = [yt(Ao)]; +$a = by([ + qt("rotation-control-button") +], $a); +class Dc extends kt { + constructor(t, e) { + const n = document.createElement("div"), s = document.createElement("rotation-control-button"); + n.appendChild(s); + const r = document.createElement("div"); + if (r.className = "rotation-control ", r.appendChild(n), super({ + element: r + }), !e) + throw new Error("Missing map!"); + this.map = e, n.addEventListener("click", this.resetRotation.bind(this), !1), this.setTarget(t); } resetRotation() { - w().getMap().getView().setRotation(0); + this.map.getView().setRotation(0); } } -const Jy = `@media only screen and (min-width: 420px){.custom-popup-element{right:calc(.5em + 40px)}}@media only screen and (max-width: 419px){.custom-popup-element{left:calc(50% - 172px)}}.custom-popup-element{font-family:sans-serif;position:absolute;top:10px;background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);border:1px solid var(--information-box-background-color);z-index:10;margin-left:5px;margin-right:5px;max-width:302px;width:100%}.custom-popup-element:after{content:"";width:var(--progress-width);height:4px;background:#008C6F;position:absolute;bottom:-1px;left:0;border-bottom-left-radius:4px;border-bottom-right-radius:var(--border-radius-right)}.custom-popup-title{display:flex}.custom-popup-title-text{width:90%;font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color)}.custom-popup-title-svg{width:10%;justify-content:flex-end;display:flex;fill:none;stroke:var(--information-box-title-color);stroke-width:2px;stroke-linejoin:round;stroke-linecap:round;cursor:pointer}.custom-popup-title-svg:hover{stroke:var(--information-cross-hover-color)}.custom-popup-content{font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color)} +const Ly = `.custom-popup-element{background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:0 11px 11px;border-radius:var(--box-border-radius)}.custom-popup-element:after{content:"";width:var(--progress-width);height:4px;background:#008C6F;position:absolute;bottom:-1px;left:0;border-bottom-left-radius:4px;border-bottom-right-radius:var(--border-radius-right)}.custom-popup-title{display:flex;height:36px}.custom-popup-title-text{width:calc(100% - var(--svg-icon-size));font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color);align-items:center;display:flex}.custom-popup-title-svg-container{width:29px;height:36px;justify-content:flex-end;display:flex;align-items:center}.custom-popup-title-svg{width:10%;justify-content:flex-end;display:flex;fill:none;stroke:var(--information-box-title-color);stroke-width:2px;stroke-linejoin:round;stroke-linecap:round;cursor:pointer}.custom-popup-title-svg:hover{stroke:var(--information-cross-hover-color)}.custom-popup-content{width:calc(100% - var(--svg-icon-size));font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color)}svg{width:var(--svg-icon-size);height:var(--svg-icon-size);stroke:var(--information-box-title-color)}svg:hover{stroke:var(--information-cross-hover-color)}svg>g>.icon{fill:none;stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}.cross-div{width:var(--svg-icon-size);height:var(--svg-icon-size);cursor:pointer} `; -var Qy = Object.defineProperty, tv = Object.getOwnPropertyDescriptor, Bl = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? tv(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var Ty = Object.defineProperty, Iy = Object.getOwnPropertyDescriptor, Wl = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? Iy(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && Qy(t, e, s), s; + return n && s && Ty(t, e, s), s; }; -let Is = class extends At { - constructor() { - super(), this._width = 100, this._borderRadiusRight = 0, window.addEventListener("clear-information-box-interval", this.clear.bind(this), !0), window.addEventListener("open-information-box", () => { +let Wn = class extends Pt { + constructor(i) { + super(), this._width = 100, this._borderRadiusRight = 0, this.store = i; + const t = i.getOptions(); + if (!t) + throw new Error("Missing options"); + window.addEventListener("clear-information-box-interval", this.clear.bind(this), !0), window.addEventListener("open-information-box", () => { this._width = 100; - const i = w().getOptions().information.duration / 100; + const e = t.information.duration / 100; this.interval = setInterval(() => { this._width > 0 ? (this._width < 100 && (this._borderRadiusRight = 0), this._width--) : this.closeBox(); - }, i); + }, e); }); } render() { + var i, t; return Lt` -
+
-
${w().getOptions().information.title}
- - - - +
${(i = this.store.getOptions()) == null ? void 0 : i.information.title}
+
+
+ ${Le(st.cross)} +
+
-
${w().getOptions().information.content}
+
${(t = this.store.getOptions()) == null ? void 0 : t.information.content}
`; } @@ -18264,23 +18461,23 @@ let Is = class extends At { clearInterval(this.interval); } closeBox() { - clearInterval(this.interval), st.sendEvent("close-information-box", {}); + clearInterval(this.interval), tt.sendEvent("close-information-box", {}); } }; -Is.styles = [xt(Jy)]; -Bl([ - Yt() -], Is.prototype, "_width", 2); -Bl([ - Yt() -], Is.prototype, "_borderRadiusRight", 2); -Is = Bl([ - Xt("information-box") -], Is); -class ev extends Dt { - constructor() { - const t = document.createElement("information-box"); - super({ element: t }), this.div = t; +Wn.styles = [yt(Ly)]; +Wl([ + It() +], Wn.prototype, "_width", 2); +Wl([ + It() +], Wn.prototype, "_borderRadiusRight", 2); +Wn = Wl([ + qt("information-box") +], Wn); +class Ay extends kt { + constructor(t) { + const e = new Wn(t); + super({ element: e }), this.div = e, this.div.classList.add("custom-popup-element-position"); } show() { this.div.classList.remove("fade-out"), this.div.classList.add("fade-in"); @@ -18289,42 +18486,42 @@ class ev extends Dt { this.div.classList.remove("fade-in"), this.div.classList.add("fade-out"); } } -var iv = Object.defineProperty, nv = Object.getOwnPropertyDescriptor, sv = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? nv(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var Py = Object.defineProperty, Oy = Object.getOwnPropertyDescriptor, Ny = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? Oy(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && iv(t, e, s), s; + return n && s && Py(t, e, s), s; }; -let Fa = class extends At { +let Ba = class extends Pt { constructor() { super(); } render() { - return Lt`
+ return Lt`
-
- ${Fe(ot.information)} +
+ ${Le(st.information)}
`; } }; -Fa.styles = [xt(wo), xt(Eo)]; -Fa = sv([ - Xt("information-control-button") -], Fa); -class rv extends Dt { - constructor(t) { - const e = document.createElement("information-control-button"); +Ba.styles = [yt(Ao), yt(Io)]; +Ba = Ny([ + qt("information-control-button") +], Ba); +class Fy extends kt { + constructor(t, e, n) { + const s = document.createElement("information-control-button"); super({ - element: e - }), this.informationIsOpen = !0, e.addEventListener("click", this.toogleInformationBox.bind(this), !1), window.addEventListener("close-information-box", this.closeInformationBox.bind(this), !1), this.control = new ev(), w().getMap().addControl(this.control), this.openInformationBox(), this.setTarget(t); + element: s + }), this.informationIsOpen = !0, s.addEventListener("click", this.toogleInformationBox.bind(this), !1), window.addEventListener("close-information-box", this.closeInformationBox.bind(this), !1), this.control = new Ay(e), n.addControl(this.control), this.openInformationBox(), this.setTarget(t); } closeInformationBox() { - st.sendEvent("clear-information-box-interval", {}), this.control.hide(), this.informationIsOpen = !1; + tt.sendEvent("clear-information-box-interval", {}), this.control.hide(), this.informationIsOpen = !1; } openInformationBox() { - this.control.show(), st.sendEvent("open-information-box", {}), this.informationIsOpen = !0; + this.control.show(), tt.sendEvent("open-information-box", {}), this.informationIsOpen = !0; } toogleInformationBox() { this.informationIsOpen ? this.closeInformationBox() : this.openInformationBox(); @@ -18335,10 +18532,10 @@ class rv extends Dt { * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const ov = Al(class extends Pl { +const Dy = Fl(class extends Dl { constructor(i) { var t; - if (super(i), i.type !== $d.ATTRIBUTE || i.name !== "class" || ((t = i.strings) === null || t === void 0 ? void 0 : t.length) > 2) + if (super(i), i.type !== Hd.ATTRIBUTE || i.name !== "class" || ((t = i.strings) === null || t === void 0 ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute."); } render(i) { @@ -18360,29 +18557,32 @@ const ov = Al(class extends Pl { const o = !!t[r]; o === this.nt.has(r) || ((n = this.st) === null || n === void 0 ? void 0 : n.has(r)) || (o ? (s.add(r), this.nt.add(r)) : (s.remove(r), this.nt.delete(r))); } - return yi; + return Si; } -}), gf = `@media only screen and (min-width: 420px){.layer-container{right:calc(.5em + 40px)}}@media only screen and (max-width: 419px){.layer-container{left:calc(50% - 151px)}}.layer-container{position:absolute;max-width:302px;width:100%;top:var(--top-distance);z-index:0;font-family:sans-serif}.layer-title-container{border-top-left-radius:var(--icon-border-radius);border-top-right-radius:var(--icon-border-radius);border-bottom:1px solid var(--icon-border-color);display:flex;background-color:var(--information-box-background-color)}.layer-text{width:calc(100% - 13px);height:36px;padding:0 0 0 11px;font-size:14px;line-height:17px;font-weight:400;background-color:var(--information-box-background-color);color:var(--information-box-text-color);margin:0;align-items:center;display:flex}.layer-svg-container{width:29px;height:36px;margin-right:11px;display:flex;align-items:center}ul{margin-top:0;list-style-type:none;background-color:var(--information-box-background-color);padding-left:0;border-bottom-left-radius:var(--icon-border-radius);border-bottom-right-radius:var(--icon-border-radius)}li{height:64px;border-bottom:1px solid var(--icon-border-color);padding-left:11px;font-size:12px;display:flex;align-items:center;justify-content:start;color:var(--information-box-text-color)}li>.image-container{width:56px;display:flex;align-items:center;justify-content:center;height:inherit;padding-right:9px}li>.image-container>img{width:46px;height:46px;border-radius:var(--icon-border-radius);border:1px solid var(--icon-border-color)}.selected-layer{border:2px solid #dc2626!important;border-radius:var(--icon-border-radius)}ul>:last-child{border-bottom-right-radius:var(--icon-border-radius);border-bottom-left-radius:var(--icon-border-radius)}li:hover,li:focus{background-color:var(--icon-border-color)}svg{width:var(--svg-icon-size);height:var(--svg-icon-size);stroke:var(--information-box-title-color)}svg:hover{stroke:var(--information-cross-hover-color)}svg>g>.icon{fill:none;stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}.cross-div{width:var(--svg-icon-size);height:var(--svg-icon-size);cursor:pointer} +}), cf = `.layer-container{font-family:sans-serif}.layer-title-container{border-radius:var(--icon-border-radius) var(--icon-border-radius) 0px 0px;border-bottom:1px solid var(--icon-border-color);display:flex;background-color:var(--information-box-background-color)}.layer-text{width:calc(100% - 13px);height:36px;padding:0;font-weight:400;background-color:var(--information-box-background-color);font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color);margin:0 0 0 11px;align-items:center;display:flex}.layer-svg-container{width:29px;height:36px;margin-right:11px;display:flex;align-items:center}ul{margin-top:0;list-style-type:none;background-color:var(--information-box-background-color);padding-left:0;border-bottom-left-radius:var(--icon-border-radius);border-bottom-right-radius:var(--icon-border-radius)}li{height:64px;border-bottom:1px solid var(--icon-border-color);padding-left:11px;font-size:12px;display:flex;align-items:center;justify-content:start;color:var(--information-box-text-color)}li>.image-container{width:56px;display:flex;align-items:center;justify-content:center;height:inherit;padding-right:9px}li>.image-container>img{width:46px;height:46px;border-radius:var(--icon-border-radius);border:1px solid var(--icon-border-color)}.selected-layer{border:2px solid #dc2626!important;border-radius:var(--icon-border-radius)}ul>:last-child{border-bottom-right-radius:var(--icon-border-radius);border-bottom-left-radius:var(--icon-border-radius)}li:hover,li:focus{background-color:var(--icon-border-color)}svg{width:var(--svg-icon-size);height:var(--svg-icon-size);stroke:var(--information-box-title-color)}svg:hover{stroke:var(--information-cross-hover-color)}svg>g>.icon{fill:none;stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}.cross-div{width:var(--svg-icon-size);height:var(--svg-icon-size);cursor:pointer} `; -var av = Object.defineProperty, lv = Object.getOwnPropertyDescriptor, zl = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? lv(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var ky = Object.defineProperty, Gy = Object.getOwnPropertyDescriptor, is = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? Gy(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && av(t, e, s), s; + return n && s && ky(t, e, s), s; }; -let Kr = class extends At { +let Hn = class extends Pt { constructor() { - super(...arguments), this._currentSelectedIndex = 0; + super(...arguments), this._currentSelectedIndex = 0, this._wmts = [], this.wmts = ""; } selectLayer(i, t) { - st.sendEvent("layer-selected", i), this._currentSelectedIndex = t; + tt.sendEvent("layer-selected", i), this._currentSelectedIndex = t; + } + updated(i) { + i.has("wmts") && (this._wmts = JSON.parse(this.wmts)); } render() { return Lt`
    - ${w().getOptions().wmts.map( + ${this._wmts.map( (i, t) => Lt`
  • this.selectLayer(i, t)}>
    - +

    ${i.name}

  • ` @@ -18391,39 +18591,51 @@ let Kr = class extends At { `; } }; -Kr.styles = [xt(gf)]; -zl([ - Yt() -], Kr.prototype, "_currentSelectedIndex", 2); -Kr = zl([ - Xt("layer-list") -], Kr); -let Da = class extends At { +Hn.styles = [yt(cf)]; +is([ + It() +], Hn.prototype, "_currentSelectedIndex", 2); +is([ + It() +], Hn.prototype, "_wmts", 2); +is([ + Te() +], Hn.prototype, "wmts", 2); +Hn = is([ + qt("layer-list") +], Hn); +let io = class extends Pt { + constructor() { + super(...arguments), this.wmts = []; + } render() { - return Lt`
    + return Lt`

    Affichage de la carte

    - ${Fe(ot.cross)} + ${Le(st.cross)}
    - +
    `; } closeBox() { - st.sendEvent("layer-selection-closed", void 0); + tt.sendEvent("layer-selection-closed", void 0); } }; -Da.styles = [xt(gf)]; -Da = zl([ - Xt("layer-selection") -], Da); -class hv extends Dt { - constructor() { - const t = document.createElement("layer-selection"); - super({ element: t }); +io.styles = [yt(cf)]; +is([ + Te() +], io.prototype, "wmts", 2); +io = is([ + qt("layer-selection") +], io); +class $y extends kt { + constructor(t) { + const e = document.createElement("layer-selection"); + e.wmts = t, super({ element: e }), this.element.classList.add("layer-container-position"); } disable() { this.element.classList.add("disabled"); @@ -18435,34 +18647,34 @@ class hv extends Dt { this.element.classList.remove("fade-in"), this.element.classList.add("fade-out"); } } -var cv = Object.defineProperty, uv = Object.getOwnPropertyDescriptor, dv = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? uv(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var By = Object.defineProperty, zy = Object.getOwnPropertyDescriptor, Zy = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? zy(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && cv(t, e, s), s; + return n && s && By(t, e, s), s; }; -let ka = class extends At { +let za = class extends Pt { render() { - return Lt`
    + return Lt`
    -
    - ${Fe(ot.stack)} +
    + ${Le(st.stack)}
    `; } }; -ka.styles = [xt(wo), xt(Eo)]; -ka = dv([ - Xt("geo-layer-control-button") -], ka); -class fv extends Dt { - constructor(t) { - const e = document.createElement( +za.styles = [yt(Ao), yt(Io)]; +za = Zy([ + qt("geo-layer-control-button") +], za); +class Uy extends kt { + constructor(t, e, n) { + const s = document.createElement( "geo-layer-control-button" ); super({ - element: e - }), this.isOpen = !1, this.layerSelection = new hv(), this.layerSelection.disable(), w().getMap().addControl(this.layerSelection), e.addEventListener("click", () => { + element: s + }), this.isOpen = !1, this.layerSelection = new $y(n), this.layerSelection.disable(), e.addControl(this.layerSelection), s.addEventListener("click", () => { this.toogleSelection(); }), window.addEventListener("layer-selection-closed", () => this.close()), this.setTarget(t); } @@ -18473,7 +18685,7 @@ class fv extends Dt { this.isOpen = !1, this.layerSelection.hide(); } } -class Dc extends Dt { +class kc extends kt { constructor(t) { const e = document.createElement("div"); e.className = t, super({ @@ -18481,45 +18693,66 @@ class Dc extends Dt { }), this.div = e; } } -class gv { - static setupIcon() { - const t = w().getOptions(), e = w().getMap(), n = new Dc("left-buttons-control-container"); - e.addControl(n); - const s = new Dc("right-buttons-control-container"); - e.addControl(s), e.addControl(new rv(s.div)), t.fullscreen && e.addControl( +class Vy { + static setupIcon(t, e) { + var l; + const n = e.getOptions(), s = t.readonly, r = e.getMap(); + if (!r) + throw new Error("Missing map!"); + const o = new kc("left-buttons-control-container"); + r.addControl(o); + const a = new kc("right-buttons-control-container"); + r.addControl(a), s || r.addControl(new Fy(a.div, e, r)), n != null && n.interaction.fullscreen && r.addControl( new y2({ - label: ot.fullScreenLabel(), - labelActive: ot.fullScreenLabelActive(), + label: st.fullScreenLabel(), + labelActive: st.fullScreenLabelActive(), className: "ol-full-screen", - target: s.div + target: a.div }) - ), e.addControl(new fv(s.div)), t.displayZoom && e.addControl( - new od({ - zoomInLabel: ot.zoomInLabel(), - zoomOutLabel: ot.zoomOutLabel(), + ), r.addControl(new Uy(a.div, r, (l = n == null ? void 0 : n.wmts) != null ? l : [])), n != null && n.interaction.displayZoom && r.addControl( + new hd({ + zoomInLabel: st.zoomInLabel(), + zoomOutLabel: st.zoomOutLabel(), className: "ol-zoom", - target: n.div + target: o.div }) - ), t.enableCenterButton && e.addControl(new Yy(n.div)), t.enableRotation && e.getView().on("change:rotation", (r) => { - e.getControls().forEach((o) => { - o instanceof Fc && e.removeControl(o); - }), r.target.getRotation() !== 0 && e.addControl(new Fc(n.div)); - }); + ), (n == null ? void 0 : n.interaction.enableCenterButton) && !s && r.addControl(new wy(o.div)), n != null && n.interaction.enableRotation && Wt.registerBorderConstaintMapEvent( + "change:rotation", + (h) => Wy(r, h, o.div), + r, + n + ); } } -var mv = Object.defineProperty, _v = Object.getOwnPropertyDescriptor, pv = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? _v(t, e) : t, r = i.length - 1, o; r >= 0; r--) +function Wy(i, t, e) { + i.getControls().forEach((n) => { + n instanceof Dc && i.removeControl(n); + }), t.target.getRotation() !== 0 && i.addControl(new Dc(e, i)); +} +var Hy = Object.defineProperty, Xy = Object.getOwnPropertyDescriptor, Yy = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? Xy(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && mv(t, e, s), s; + return n && s && Hy(t, e, s), s; }; -class yv { - constructor() { - w().getMap().getView().on("change:center", (t) => { - st.sendEvent("current-center-position", t.target.getCenter()); - }); +class jy { + constructor(t) { + var n; + const e = t.getMap(); + if (!e) + throw new Error("Invalid map!"); + e.getView().on("change:center", (s) => { + tt.sendEvent("current-center-position", s.target.getCenter()); + }), ((n = t.getOptions()) == null ? void 0 : n.border.url) !== "" && Wt.registerWindowListener( + "border-contraint-enabled", + "change:center", + (s) => { + tt.sendEvent("current-center-position", s.target.getCenter()); + }, + e + ); } } -let kc = class extends At { +let Gc = class extends Pt { constructor() { super(); } @@ -18553,46 +18786,53 @@ let kc = class extends At { `; } }; -kc = pv([ - Xt("target-element") -], kc); -class vv extends Dt { - constructor() { - const t = document.createElement("target-element"); - super({ element: t }), new yv(); +Gc = Yy([ + qt("target-element") +], Gc); +class Ky extends kt { + constructor(t) { + const e = document.createElement("target-element"); + super({ element: e }), new jy(t); } } -const xv = `.box-element{left:calc(50% - 172px);font-family:sans-serif}.box-element{position:absolute;top:10px;background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);border:1px solid var(--information-box-background-color);margin-left:5px;margin-right:5px;max-width:302px;width:100%}.box-element-title{display:flex}.box-element-title-text{width:90%;font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color)}.box-element-content{font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color)} +const qy = `@media only screen and (min-width: 351px) and (max-width: 995px){.box-element{left:calc(50% - 167px);width:calc(100% - 30px);max-width:302px}}@media only screen and (max-width: 350px){.box-element{left:10px;width:calc(100% - 50px);max-width:302px}}@media only screen and (min-width: 996px){.box-element{left:calc((100% - (var(--target-box-width) + 30px)) / 2);width:calc(var(--target-box-width))}}.box-element{position:absolute;top:10px;background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);border:1px solid var(--information-box-background-color)}.box-element-title{display:flex}.box-element-title-text{width:90%;font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color)}.box-element-content{font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color)} `; -var Mv = Object.defineProperty, Cv = Object.getOwnPropertyDescriptor, js = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? Cv(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var Jy = Object.defineProperty, Qy = Object.getOwnPropertyDescriptor, Qs = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? Qy(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && Mv(t, e, s), s; + return n && s && Jy(t, e, s), s; }; -let Hi = class extends At { - constructor() { - super(), this.defaultPosition = [0, 0], this._currentPosition = "", this._reversePosition = "", this._lastPosition = this.defaultPosition; - const i = 20; - window.addEventListener("current-center-position", (t) => { - w().getOptions().geolocationInformation.reverseLocation ? (Math.abs(this._lastPosition[0] - t.detail[0]) > i || Math.abs(this._lastPosition[1] - t.detail[1]) > i) && (this._lastPosition = t.detail, this.searchAddress(t.detail)) : this._reversePosition = "", this._currentPosition = w().getOptions().geolocationInformation.currentLocation ? `${t.detail[0].toFixed(6)}, ${t.detail[1].toFixed(6)}` : ""; +let Ti = class extends Pt { + constructor(i) { + super(), this.defaultPosition = [0, 0], this._currentPosition = "", this._reversePosition = ""; + const t = i.getOptions(); + if (!t) + throw new Error("invalid options"); + this.options = t, this._lastPosition = this.defaultPosition; + const e = 20; + window.addEventListener("current-center-position", (n) => { + var s, r; + (s = this.options) != null && s.geolocationInformation.reverseLocation ? (Math.abs(this._lastPosition[0] - n.detail[0]) > e || Math.abs(this._lastPosition[1] - n.detail[1]) > e) && (this._lastPosition = n.detail, this.searchAddress(n.detail)) : this._reversePosition = "", this._currentPosition = (r = this.options) != null && r.geolocationInformation.currentLocation ? `${n.detail[0].toFixed(6)}, ${n.detail[1].toFixed(6)}` : ""; }); } connectedCallback() { super.connectedCallback(); } searchAddress(i) { - Kd.getAddressFromCoordinate(i).then((t) => { - this._reversePosition = t.results.length > 0 ? `proche de ${t.results[0].attributes.strname_deinr}` : "Aucune adresse proche reconnue"; + Yd.getAddressFromCoordinate(i).then((t) => { + this._reversePosition = t.results.length > 0 ? `\xC0 proximit\xE9 de ${t.results[0].attributes.strname_deinr}` : "Aucune adresse proche reconnue"; }); } firstUpdated() { - w().getOptions().geolocationInformation.reverseLocation ? this.searchAddress(this.defaultPosition) : this._reversePosition = "", this._currentPosition = w().getOptions().geolocationInformation.currentLocation ? `${this.defaultPosition[0].toFixed(6)}, ${this.defaultPosition[1].toFixed(6)}` : ""; + var i, t; + (i = this.options) != null && i.geolocationInformation.reverseLocation ? this.searchAddress(this.defaultPosition) : this._reversePosition = "", this._currentPosition = (t = this.options) != null && t.geolocationInformation.currentLocation ? `${this.defaultPosition[0].toFixed(6)}, ${this.defaultPosition[1].toFixed(6)}` : ""; } render() { + var i; return Lt` -
    +
    -
    ${w().getOptions().selectionTargetBoxMessage}
    +
    ${(i = this.options) == null ? void 0 : i.selectionTargetBoxMessage}
    ${this._reversePosition}
    ${this._currentPosition}
    @@ -18600,58 +18840,63 @@ let Hi = class extends At { `; } }; -Hi.styles = [xt(xv)]; -js([ - ji() -], Hi.prototype, "defaultPosition", 2); -js([ - Yt() -], Hi.prototype, "_currentPosition", 2); -js([ - Yt() -], Hi.prototype, "_reversePosition", 2); -js([ - Yt() -], Hi.prototype, "_lastPosition", 2); -Hi = js([ - Xt("target-information-box-element") -], Hi); -class Ev extends Dt { - constructor() { - const t = document.createElement("target-information-box-element"); - t.defaultPosition = w().getOptions().defaultCenter, super({ element: t }); +Ti.styles = [yt(qy)]; +Qs([ + Te() +], Ti.prototype, "defaultPosition", 2); +Qs([ + It() +], Ti.prototype, "_currentPosition", 2); +Qs([ + It() +], Ti.prototype, "_reversePosition", 2); +Qs([ + It() +], Ti.prototype, "_lastPosition", 2); +Ti = Qs([ + qt("target-information-box-element") +], Ti); +class tv extends kt { + constructor(t) { + var s, r; + const e = new Ti(t); + e.defaultPosition = (r = (s = t.getOptions()) == null ? void 0 : s.defaultCenter) != null ? r : [], super({ element: e }); + const n = t.getMap(); + if (!n) + throw new Error("invalid map"); + Wt.setResizeEvent(this.element, "--target-box-width", n); } } -function wv(i) { +function ev(i) { i("EPSG:4326", "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"), i("EPSG:4269", "+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"), i("EPSG:3857", "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"), i.WGS84 = i["EPSG:4326"], i["EPSG:3785"] = i["EPSG:3857"], i.GOOGLE = i["EPSG:3857"], i["EPSG:900913"] = i["EPSG:3857"], i["EPSG:102113"] = i["EPSG:3857"]; } -var Xi = 1, Yi = 2, br = 3, Sv = 4, Ga = 5, Gc = 6378137, Rv = 6356752314e-3, $c = 0.0066943799901413165, fs = 484813681109536e-20, S = Math.PI / 2, bv = 0.16666666666666666, Lv = 0.04722222222222222, Tv = 0.022156084656084655, I = 1e-10, $t = 0.017453292519943295, Ae = 57.29577951308232, ht = Math.PI / 4, As = Math.PI * 2, Rt = 3.14159265359, ne = {}; -ne.greenwich = 0; -ne.lisbon = -9.131906111111; -ne.paris = 2.337229166667; -ne.bogota = -74.080916666667; -ne.madrid = -3.687938888889; -ne.rome = 12.452333333333; -ne.bern = 7.439583333333; -ne.jakarta = 106.807719444444; -ne.ferro = -17.666666666667; -ne.brussels = 4.367975; -ne.stockholm = 18.058277777778; -ne.athens = 23.7163375; -ne.oslo = 10.722916666667; -const Iv = { +var en = 1, nn = 2, Ar = 3, iv = 4, Za = 5, $c = 6378137, nv = 6356752314e-3, Bc = 0.0066943799901413165, Ms = 484813681109536e-20, S = Math.PI / 2, sv = 0.16666666666666666, rv = 0.04722222222222222, ov = 0.022156084656084655, T = 1e-10, Bt = 0.017453292519943295, Fe = 57.29577951308232, lt = Math.PI / 4, $s = Math.PI * 2, Rt = 3.14159265359, oe = {}; +oe.greenwich = 0; +oe.lisbon = -9.131906111111; +oe.paris = 2.337229166667; +oe.bogota = -74.080916666667; +oe.madrid = -3.687938888889; +oe.rome = 12.452333333333; +oe.bern = 7.439583333333; +oe.jakarta = 106.807719444444; +oe.ferro = -17.666666666667; +oe.brussels = 4.367975; +oe.stockholm = 18.058277777778; +oe.athens = 23.7163375; +oe.oslo = 10.722916666667; +const av = { ft: { to_meter: 0.3048 }, "us-ft": { to_meter: 1200 / 3937 } }; -var Bc = /[\s_\-\/\(\)]/g; -function Ei(i, t) { +var zc = /[\s_\-\/\(\)]/g; +function Ii(i, t) { if (i[t]) return i[t]; - for (var e = Object.keys(i), n = t.toLowerCase().replace(Bc, ""), s = -1, r, o; ++s < e.length; ) - if (r = e[s], o = r.toLowerCase().replace(Bc, ""), o === n) + for (var e = Object.keys(i), n = t.toLowerCase().replace(zc, ""), s = -1, r, o; ++s < e.length; ) + if (r = e[s], o = r.toLowerCase().replace(zc, ""), o === n) return i[r]; } -function $a(i) { +function Ua(i) { var t = {}, e = i.split("+").map(function(a) { return a.trim(); }).filter(function(a) { @@ -18666,34 +18911,34 @@ function $a(i) { t.rf = parseFloat(a); }, lat_0: function(a) { - t.lat0 = a * $t; + t.lat0 = a * Bt; }, lat_1: function(a) { - t.lat1 = a * $t; + t.lat1 = a * Bt; }, lat_2: function(a) { - t.lat2 = a * $t; + t.lat2 = a * Bt; }, lat_ts: function(a) { - t.lat_ts = a * $t; + t.lat_ts = a * Bt; }, lon_0: function(a) { - t.long0 = a * $t; + t.long0 = a * Bt; }, lon_1: function(a) { - t.long1 = a * $t; + t.long1 = a * Bt; }, lon_2: function(a) { - t.long2 = a * $t; + t.long2 = a * Bt; }, alpha: function(a) { - t.alpha = parseFloat(a) * $t; + t.alpha = parseFloat(a) * Bt; }, gamma: function(a) { t.rectified_grid_angle = parseFloat(a); }, lonc: function(a) { - t.longc = a * $t; + t.longc = a * Bt; }, x_0: function(a) { t.x0 = parseFloat(a); @@ -18732,15 +18977,15 @@ function $a(i) { }, units: function(a) { t.units = a; - var l = Ei(Iv, a); + var l = Ii(av, a); l && (t.to_meter = l.to_meter); }, from_greenwich: function(a) { - t.from_greenwich = a * $t; + t.from_greenwich = a * Bt; }, pm: function(a) { - var l = Ei(ne, a); - t.from_greenwich = (l || parseFloat(a)) * $t; + var l = Ii(oe, a); + t.from_greenwich = (l || parseFloat(a)) * Bt; }, nadgrids: function(a) { a === "@null" ? t.datumCode = "none" : t.nadgrids = a; @@ -18757,128 +19002,128 @@ function $a(i) { s = e[n], n in o ? (r = o[n], typeof r == "function" ? r(s) : t[r] = s) : t[n] = s; return typeof t.datumCode == "string" && t.datumCode !== "WGS84" && (t.datumCode = t.datumCode.toLowerCase()), t; } -var Ps = 1, mf = 2, _f = 3, qr = 4, pf = 5, Zl = -1, Av = /\s/, Pv = /[A-Za-z]/, Ov = /[A-Za-z84_]/, So = /[,\]]/, yf = /[\d\.E\-\+]/; -function ei(i) { +var Bs = 1, uf = 2, df = 3, no = 4, ff = 5, Hl = -1, lv = /\s/, hv = /[A-Za-z]/, cv = /[A-Za-z84_]/, Po = /[,\]]/, gf = /[\d\.E\-\+]/; +function li(i) { if (typeof i != "string") throw new Error("not a string"); - this.text = i.trim(), this.level = 0, this.place = 0, this.root = null, this.stack = [], this.currentObject = null, this.state = Ps; + this.text = i.trim(), this.level = 0, this.place = 0, this.root = null, this.stack = [], this.currentObject = null, this.state = Bs; } -ei.prototype.readCharicter = function() { +li.prototype.readCharicter = function() { var i = this.text[this.place++]; - if (this.state !== qr) - for (; Av.test(i); ) { + if (this.state !== no) + for (; lv.test(i); ) { if (this.place >= this.text.length) return; i = this.text[this.place++]; } switch (this.state) { - case Ps: + case Bs: return this.neutral(i); - case mf: + case uf: return this.keyword(i); - case qr: + case no: return this.quoted(i); - case pf: + case ff: return this.afterquote(i); - case _f: + case df: return this.number(i); - case Zl: + case Hl: return; } }; -ei.prototype.afterquote = function(i) { +li.prototype.afterquote = function(i) { if (i === '"') { - this.word += '"', this.state = qr; + this.word += '"', this.state = no; return; } - if (So.test(i)) { + if (Po.test(i)) { this.word = this.word.trim(), this.afterItem(i); return; } throw new Error(`havn't handled "` + i + '" in afterquote yet, index ' + this.place); }; -ei.prototype.afterItem = function(i) { +li.prototype.afterItem = function(i) { if (i === ",") { - this.word !== null && this.currentObject.push(this.word), this.word = null, this.state = Ps; + this.word !== null && this.currentObject.push(this.word), this.word = null, this.state = Bs; return; } if (i === "]") { - this.level--, this.word !== null && (this.currentObject.push(this.word), this.word = null), this.state = Ps, this.currentObject = this.stack.pop(), this.currentObject || (this.state = Zl); + this.level--, this.word !== null && (this.currentObject.push(this.word), this.word = null), this.state = Bs, this.currentObject = this.stack.pop(), this.currentObject || (this.state = Hl); return; } }; -ei.prototype.number = function(i) { - if (yf.test(i)) { +li.prototype.number = function(i) { + if (gf.test(i)) { this.word += i; return; } - if (So.test(i)) { + if (Po.test(i)) { this.word = parseFloat(this.word), this.afterItem(i); return; } throw new Error(`havn't handled "` + i + '" in number yet, index ' + this.place); }; -ei.prototype.quoted = function(i) { +li.prototype.quoted = function(i) { if (i === '"') { - this.state = pf; + this.state = ff; return; } this.word += i; }; -ei.prototype.keyword = function(i) { - if (Ov.test(i)) { +li.prototype.keyword = function(i) { + if (cv.test(i)) { this.word += i; return; } if (i === "[") { var t = []; - t.push(this.word), this.level++, this.root === null ? this.root = t : this.currentObject.push(t), this.stack.push(this.currentObject), this.currentObject = t, this.state = Ps; + t.push(this.word), this.level++, this.root === null ? this.root = t : this.currentObject.push(t), this.stack.push(this.currentObject), this.currentObject = t, this.state = Bs; return; } - if (So.test(i)) { + if (Po.test(i)) { this.afterItem(i); return; } throw new Error(`havn't handled "` + i + '" in keyword yet, index ' + this.place); }; -ei.prototype.neutral = function(i) { - if (Pv.test(i)) { - this.word = i, this.state = mf; +li.prototype.neutral = function(i) { + if (hv.test(i)) { + this.word = i, this.state = uf; return; } if (i === '"') { - this.word = "", this.state = qr; + this.word = "", this.state = no; return; } - if (yf.test(i)) { - this.word = i, this.state = _f; + if (gf.test(i)) { + this.word = i, this.state = df; return; } - if (So.test(i)) { + if (Po.test(i)) { this.afterItem(i); return; } throw new Error(`havn't handled "` + i + '" in neutral yet, index ' + this.place); }; -ei.prototype.output = function() { +li.prototype.output = function() { for (; this.place < this.text.length; ) this.readCharicter(); - if (this.state === Zl) + if (this.state === Hl) return this.root; throw new Error('unable to parse string "' + this.text + '". State is ' + this.state); }; -function Nv(i) { - var t = new ei(i); +function uv(i) { + var t = new li(i); return t.output(); } -function zc(i, t, e) { +function Zc(i, t, e) { Array.isArray(t) && (e.unshift(t), t = null); var n = t ? {} : i, s = e.reduce(function(r, o) { - return xn(o, r), r; + return bn(o, r), r; }, n); t && (i[t] = s); } -function xn(i, t) { +function bn(i, t) { if (!Array.isArray(i)) { t[i] = !0; return; @@ -18886,7 +19131,7 @@ function xn(i, t) { var e = i.shift(); if (e === "PARAMETER" && (e = i.shift()), i.length === 1) { if (Array.isArray(i[0])) { - t[e] = {}, xn(i[0], t[e]); + t[e] = {}, bn(i[0], t[e]); return; } t[e] = i[0]; @@ -18913,7 +19158,7 @@ function xn(i, t) { t[e] = { name: i[0].toLowerCase(), convert: i[1] - }, i.length === 3 && xn(i[2], t[e]); + }, i.length === 3 && bn(i[2], t[e]); return; case "SPHEROID": case "ELLIPSOID": @@ -18921,7 +19166,7 @@ function xn(i, t) { name: i[0], a: i[1], rf: i[2] - }, i.length === 4 && xn(i[3], t[e]); + }, i.length === 4 && bn(i[3], t[e]); return; case "PROJECTEDCRS": case "PROJCRS": @@ -18944,24 +19189,24 @@ function xn(i, t) { case "FITTED_CS": case "LOCAL_DATUM": case "DATUM": - i[0] = ["name", i[0]], zc(t, e, i); + i[0] = ["name", i[0]], Zc(t, e, i); return; default: for (n = -1; ++n < i.length; ) if (!Array.isArray(i[n])) - return xn(i, t[e]); - return zc(t, e, i); + return bn(i, t[e]); + return Zc(t, e, i); } } -var Fv = 0.017453292519943295; -function Dv(i, t) { +var dv = 0.017453292519943295; +function fv(i, t) { var e = t[0], n = t[1]; !(e in i) && n in i && (i[e] = i[n], t.length === 3 && (i[e] = t[2](i[e]))); } -function We(i) { - return i * Fv; +function Ke(i) { + return i * dv; } -function kv(i) { +function gv(i) { if (i.type === "GEOGCS" ? i.projName = "longlat" : i.type === "LOCAL_CS" ? (i.projName = "identity", i.local = !0) : typeof i.PROJECTION == "object" ? i.projName = Object.keys(i.PROJECTION)[0] : i.projName = i.PROJECTION, i.AXIS) { for (var t = "", e = 0, n = i.AXIS.length; e < n; ++e) { var s = [i.AXIS[e][0].toLowerCase(), i.AXIS[e][1].toLowerCase()]; @@ -18977,7 +19222,7 @@ function kv(i) { return h * c; } var a = function(h) { - return Dv(i, h); + return fv(i, h); }, l = [ ["standard_parallel_1", "Standard_Parallel_1"], ["standard_parallel_1", "Latitude of 1st standard parallel"], @@ -19000,93 +19245,93 @@ function kv(i) { ["k0", "scale_factor"], ["latitude_of_center", "Latitude_Of_Center"], ["latitude_of_center", "Latitude_of_center"], - ["lat0", "latitude_of_center", We], + ["lat0", "latitude_of_center", Ke], ["longitude_of_center", "Longitude_Of_Center"], ["longitude_of_center", "Longitude_of_center"], - ["longc", "longitude_of_center", We], + ["longc", "longitude_of_center", Ke], ["x0", "false_easting", o], ["y0", "false_northing", o], - ["long0", "central_meridian", We], - ["lat0", "latitude_of_origin", We], - ["lat0", "standard_parallel_1", We], - ["lat1", "standard_parallel_1", We], - ["lat2", "standard_parallel_2", We], + ["long0", "central_meridian", Ke], + ["lat0", "latitude_of_origin", Ke], + ["lat0", "standard_parallel_1", Ke], + ["lat1", "standard_parallel_1", Ke], + ["lat2", "standard_parallel_2", Ke], ["azimuth", "Azimuth"], - ["alpha", "azimuth", We], + ["alpha", "azimuth", Ke], ["srsCode", "name"] ]; - l.forEach(a), !i.long0 && i.longc && (i.projName === "Albers_Conic_Equal_Area" || i.projName === "Lambert_Azimuthal_Equal_Area") && (i.long0 = i.longc), !i.lat_ts && i.lat1 && (i.projName === "Stereographic_South_Pole" || i.projName === "Polar Stereographic (variant B)") && (i.lat0 = We(i.lat1 > 0 ? 90 : -90), i.lat_ts = i.lat1); + l.forEach(a), !i.long0 && i.longc && (i.projName === "Albers_Conic_Equal_Area" || i.projName === "Lambert_Azimuthal_Equal_Area") && (i.long0 = i.longc), !i.lat_ts && i.lat1 && (i.projName === "Stereographic_South_Pole" || i.projName === "Polar Stereographic (variant B)") && (i.lat0 = Ke(i.lat1 > 0 ? 90 : -90), i.lat_ts = i.lat1); } -function vf(i) { - var t = Nv(i), e = t.shift(), n = t.shift(); +function mf(i) { + var t = uv(i), e = t.shift(), n = t.shift(); t.unshift(["name", n]), t.unshift(["type", e]); var s = {}; - return xn(t, s), kv(s), s; + return bn(t, s), gv(s), s; } -function Ut(i) { +function Xt(i) { var t = this; if (arguments.length === 2) { var e = arguments[1]; - typeof e == "string" ? e.charAt(0) === "+" ? Ut[i] = $a(arguments[1]) : Ut[i] = vf(arguments[1]) : Ut[i] = e; + typeof e == "string" ? e.charAt(0) === "+" ? Xt[i] = Ua(arguments[1]) : Xt[i] = mf(arguments[1]) : Xt[i] = e; } else if (arguments.length === 1) { if (Array.isArray(i)) return i.map(function(n) { - Array.isArray(n) ? Ut.apply(t, n) : Ut(n); + Array.isArray(n) ? Xt.apply(t, n) : Xt(n); }); if (typeof i == "string") { - if (i in Ut) - return Ut[i]; + if (i in Xt) + return Xt[i]; } else - "EPSG" in i ? Ut["EPSG:" + i.EPSG] = i : "ESRI" in i ? Ut["ESRI:" + i.ESRI] = i : "IAU2000" in i ? Ut["IAU2000:" + i.IAU2000] = i : console.log(i); + "EPSG" in i ? Xt["EPSG:" + i.EPSG] = i : "ESRI" in i ? Xt["ESRI:" + i.ESRI] = i : "IAU2000" in i ? Xt["IAU2000:" + i.IAU2000] = i : console.log(i); return; } } -wv(Ut); -function Gv(i) { +ev(Xt); +function mv(i) { return typeof i == "string"; } -function $v(i) { - return i in Ut; +function pv(i) { + return i in Xt; } -var Bv = ["PROJECTEDCRS", "PROJCRS", "GEOGCS", "GEOCCS", "PROJCS", "LOCAL_CS", "GEODCRS", "GEODETICCRS", "GEODETICDATUM", "ENGCRS", "ENGINEERINGCRS"]; -function zv(i) { - return Bv.some(function(t) { +var _v = ["PROJECTEDCRS", "PROJCRS", "GEOGCS", "GEOCCS", "PROJCS", "LOCAL_CS", "GEODCRS", "GEODETICCRS", "GEODETICDATUM", "ENGCRS", "ENGINEERINGCRS"]; +function yv(i) { + return _v.some(function(t) { return i.indexOf(t) > -1; }); } -var Zv = ["3857", "900913", "3785", "102113"]; -function Uv(i) { - var t = Ei(i, "authority"); +var vv = ["3857", "900913", "3785", "102113"]; +function xv(i) { + var t = Ii(i, "authority"); if (!!t) { - var e = Ei(t, "epsg"); - return e && Zv.indexOf(e) > -1; + var e = Ii(t, "epsg"); + return e && vv.indexOf(e) > -1; } } -function Vv(i) { - var t = Ei(i, "extension"); +function Cv(i) { + var t = Ii(i, "extension"); if (!!t) - return Ei(t, "proj4"); + return Ii(t, "proj4"); } -function Wv(i) { +function Mv(i) { return i[0] === "+"; } -function Hv(i) { - if (Gv(i)) { - if ($v(i)) - return Ut[i]; - if (zv(i)) { - var t = vf(i); - if (Uv(t)) - return Ut["EPSG:3857"]; - var e = Vv(t); - return e ? $a(e) : t; - } - if (Wv(i)) - return $a(i); +function Ev(i) { + if (mv(i)) { + if (pv(i)) + return Xt[i]; + if (yv(i)) { + var t = mf(i); + if (xv(t)) + return Xt["EPSG:3857"]; + var e = Cv(t); + return e ? Ua(e) : t; + } + if (Mv(i)) + return Ua(i); } else return i; } -function Zc(i, t) { +function Uc(i, t) { i = i || {}; var e, n; if (!t) @@ -19095,316 +19340,316 @@ function Zc(i, t) { e = t[n], e !== void 0 && (i[n] = e); return i; } -function De(i, t, e) { +function $e(i, t, e) { var n = i * t; return e / Math.sqrt(1 - n * n); } -function Ks(i) { +function tr(i) { return i < 0 ? -1 : 1; } function P(i) { - return Math.abs(i) <= Rt ? i : i - Ks(i) * As; + return Math.abs(i) <= Rt ? i : i - tr(i) * $s; } -function we(i, t, e) { +function be(i, t, e) { var n = i * e, s = 0.5 * i; return n = Math.pow((1 - n) / (1 + n), s), Math.tan(0.5 * (S - t)) / n; } -function Os(i, t) { +function zs(i, t) { for (var e = 0.5 * i, n, s, r = S - 2 * Math.atan(t), o = 0; o <= 15; o++) if (n = i * Math.sin(r), s = S - 2 * Math.atan(t * Math.pow((1 - n) / (1 + n), e)) - r, r += s, Math.abs(s) <= 1e-10) return r; return -9999; } -function Xv() { +function wv() { var i = this.b / this.a; - this.es = 1 - i * i, "x0" in this || (this.x0 = 0), "y0" in this || (this.y0 = 0), this.e = Math.sqrt(this.es), this.lat_ts ? this.sphere ? this.k0 = Math.cos(this.lat_ts) : this.k0 = De(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) : this.k0 || (this.k ? this.k0 = this.k : this.k0 = 1); + this.es = 1 - i * i, "x0" in this || (this.x0 = 0), "y0" in this || (this.y0 = 0), this.e = Math.sqrt(this.es), this.lat_ts ? this.sphere ? this.k0 = Math.cos(this.lat_ts) : this.k0 = $e(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) : this.k0 || (this.k ? this.k0 = this.k : this.k0 = 1); } -function Yv(i) { +function Sv(i) { var t = i.x, e = i.y; - if (e * Ae > 90 && e * Ae < -90 && t * Ae > 180 && t * Ae < -180) + if (e * Fe > 90 && e * Fe < -90 && t * Fe > 180 && t * Fe < -180) return null; var n, s; - if (Math.abs(Math.abs(e) - S) <= I) + if (Math.abs(Math.abs(e) - S) <= T) return null; if (this.sphere) - n = this.x0 + this.a * this.k0 * P(t - this.long0), s = this.y0 + this.a * this.k0 * Math.log(Math.tan(ht + 0.5 * e)); + n = this.x0 + this.a * this.k0 * P(t - this.long0), s = this.y0 + this.a * this.k0 * Math.log(Math.tan(lt + 0.5 * e)); else { - var r = Math.sin(e), o = we(this.e, e, r); + var r = Math.sin(e), o = be(this.e, e, r); n = this.x0 + this.a * this.k0 * P(t - this.long0), s = this.y0 - this.a * this.k0 * Math.log(o); } return i.x = n, i.y = s, i; } -function jv(i) { +function Rv(i) { var t = i.x - this.x0, e = i.y - this.y0, n, s; if (this.sphere) s = S - 2 * Math.atan(Math.exp(-e / (this.a * this.k0))); else { var r = Math.exp(-e / (this.a * this.k0)); - if (s = Os(this.e, r), s === -9999) + if (s = zs(this.e, r), s === -9999) return null; } return n = P(this.long0 + t / (this.a * this.k0)), i.x = n, i.y = s, i; } -var Kv = ["Mercator", "Popular Visualisation Pseudo Mercator", "Mercator_1SP", "Mercator_Auxiliary_Sphere", "merc"]; -const qv = { - init: Xv, - forward: Yv, - inverse: jv, - names: Kv +var bv = ["Mercator", "Popular Visualisation Pseudo Mercator", "Mercator_1SP", "Mercator_Auxiliary_Sphere", "merc"]; +const Lv = { + init: wv, + forward: Sv, + inverse: Rv, + names: bv }; -function Jv() { +function Tv() { } -function Uc(i) { +function Vc(i) { return i; } -var Qv = ["longlat", "identity"]; -const tx = { - init: Jv, - forward: Uc, - inverse: Uc, - names: Qv +var Iv = ["longlat", "identity"]; +const Av = { + init: Tv, + forward: Vc, + inverse: Vc, + names: Iv }; -var ex = [qv, tx], Lr = {}, Jr = []; -function xf(i, t) { - var e = Jr.length; - return i.names ? (Jr[e] = i, i.names.forEach(function(n) { - Lr[n.toLowerCase()] = e; +var Pv = [Lv, Av], Pr = {}, so = []; +function pf(i, t) { + var e = so.length; + return i.names ? (so[e] = i, i.names.forEach(function(n) { + Pr[n.toLowerCase()] = e; }), this) : (console.log(t), !0); } -function ix(i) { +function Ov(i) { if (!i) return !1; var t = i.toLowerCase(); - if (typeof Lr[t] < "u" && Jr[Lr[t]]) - return Jr[Lr[t]]; + if (typeof Pr[t] < "u" && so[Pr[t]]) + return so[Pr[t]]; } -function nx() { - ex.forEach(xf); +function Nv() { + Pv.forEach(pf); } -const sx = { - start: nx, - add: xf, - get: ix +const Fv = { + start: Nv, + add: pf, + get: Ov }; -var j = {}; -j.MERIT = { +var Y = {}; +Y.MERIT = { a: 6378137, rf: 298.257, ellipseName: "MERIT 1983" }; -j.SGS85 = { +Y.SGS85 = { a: 6378136, rf: 298.257, ellipseName: "Soviet Geodetic System 85" }; -j.GRS80 = { +Y.GRS80 = { a: 6378137, rf: 298.257222101, ellipseName: "GRS 1980(IUGG, 1980)" }; -j.IAU76 = { +Y.IAU76 = { a: 6378140, rf: 298.257, ellipseName: "IAU 1976" }; -j.airy = { +Y.airy = { a: 6377563396e-3, b: 635625691e-2, ellipseName: "Airy 1830" }; -j.APL4 = { +Y.APL4 = { a: 6378137, rf: 298.25, ellipseName: "Appl. Physics. 1965" }; -j.NWL9D = { +Y.NWL9D = { a: 6378145, rf: 298.25, ellipseName: "Naval Weapons Lab., 1965" }; -j.mod_airy = { +Y.mod_airy = { a: 6377340189e-3, b: 6356034446e-3, ellipseName: "Modified Airy" }; -j.andrae = { +Y.andrae = { a: 637710443e-2, rf: 300, ellipseName: "Andrae 1876 (Den., Iclnd.)" }; -j.aust_SA = { +Y.aust_SA = { a: 6378160, rf: 298.25, ellipseName: "Australian Natl & S. Amer. 1969" }; -j.GRS67 = { +Y.GRS67 = { a: 6378160, rf: 298.247167427, ellipseName: "GRS 67(IUGG 1967)" }; -j.bessel = { +Y.bessel = { a: 6377397155e-3, rf: 299.1528128, ellipseName: "Bessel 1841" }; -j.bess_nam = { +Y.bess_nam = { a: 6377483865e-3, rf: 299.1528128, ellipseName: "Bessel 1841 (Namibia)" }; -j.clrk66 = { +Y.clrk66 = { a: 63782064e-1, b: 63565838e-1, ellipseName: "Clarke 1866" }; -j.clrk80 = { +Y.clrk80 = { a: 6378249145e-3, rf: 293.4663, ellipseName: "Clarke 1880 mod." }; -j.clrk58 = { +Y.clrk58 = { a: 6378293645208759e-9, rf: 294.2606763692654, ellipseName: "Clarke 1858" }; -j.CPM = { +Y.CPM = { a: 63757387e-1, rf: 334.29, ellipseName: "Comm. des Poids et Mesures 1799" }; -j.delmbr = { +Y.delmbr = { a: 6376428, rf: 311.5, ellipseName: "Delambre 1810 (Belgium)" }; -j.engelis = { +Y.engelis = { a: 637813605e-2, rf: 298.2566, ellipseName: "Engelis 1985" }; -j.evrst30 = { +Y.evrst30 = { a: 6377276345e-3, rf: 300.8017, ellipseName: "Everest 1830" }; -j.evrst48 = { +Y.evrst48 = { a: 6377304063e-3, rf: 300.8017, ellipseName: "Everest 1948" }; -j.evrst56 = { +Y.evrst56 = { a: 6377301243e-3, rf: 300.8017, ellipseName: "Everest 1956" }; -j.evrst69 = { +Y.evrst69 = { a: 6377295664e-3, rf: 300.8017, ellipseName: "Everest 1969" }; -j.evrstSS = { +Y.evrstSS = { a: 6377298556e-3, rf: 300.8017, ellipseName: "Everest (Sabah & Sarawak)" }; -j.fschr60 = { +Y.fschr60 = { a: 6378166, rf: 298.3, ellipseName: "Fischer (Mercury Datum) 1960" }; -j.fschr60m = { +Y.fschr60m = { a: 6378155, rf: 298.3, ellipseName: "Fischer 1960" }; -j.fschr68 = { +Y.fschr68 = { a: 6378150, rf: 298.3, ellipseName: "Fischer 1968" }; -j.helmert = { +Y.helmert = { a: 6378200, rf: 298.3, ellipseName: "Helmert 1906" }; -j.hough = { +Y.hough = { a: 6378270, rf: 297, ellipseName: "Hough" }; -j.intl = { +Y.intl = { a: 6378388, rf: 297, ellipseName: "International 1909 (Hayford)" }; -j.kaula = { +Y.kaula = { a: 6378163, rf: 298.24, ellipseName: "Kaula 1961" }; -j.lerch = { +Y.lerch = { a: 6378139, rf: 298.257, ellipseName: "Lerch 1979" }; -j.mprts = { +Y.mprts = { a: 6397300, rf: 191, ellipseName: "Maupertius 1738" }; -j.new_intl = { +Y.new_intl = { a: 63781575e-1, b: 63567722e-1, ellipseName: "New International 1967" }; -j.plessis = { +Y.plessis = { a: 6376523, rf: 6355863, ellipseName: "Plessis 1817 (France)" }; -j.krass = { +Y.krass = { a: 6378245, rf: 298.3, ellipseName: "Krassovsky, 1942" }; -j.SEasia = { +Y.SEasia = { a: 6378155, b: 63567733205e-4, ellipseName: "Southeast Asia" }; -j.walbeck = { +Y.walbeck = { a: 6376896, b: 63558348467e-4, ellipseName: "Walbeck" }; -j.WGS60 = { +Y.WGS60 = { a: 6378165, rf: 298.3, ellipseName: "WGS 60" }; -j.WGS66 = { +Y.WGS66 = { a: 6378145, rf: 298.25, ellipseName: "WGS 66" }; -j.WGS7 = { +Y.WGS7 = { a: 6378135, rf: 298.26, ellipseName: "WGS 72" }; -var rx = j.WGS84 = { +var Dv = Y.WGS84 = { a: 6378137, rf: 298.257223563, ellipseName: "WGS 84" }; -j.sphere = { +Y.sphere = { a: 6370997, b: 6370997, ellipseName: "Normal Sphere (r=6370997)" }; -function ox(i, t, e, n) { +function kv(i, t, e, n) { var s = i * i, r = t * t, o = (s - r) / s, a = 0; - n ? (i *= 1 - o * (bv + o * (Lv + o * Tv)), s = i * i, o = 0) : a = Math.sqrt(o); + n ? (i *= 1 - o * (sv + o * (rv + o * ov)), s = i * i, o = 0) : a = Math.sqrt(o); var l = (s - r) / r; return { es: o, @@ -19412,180 +19657,180 @@ function ox(i, t, e, n) { ep2: l }; } -function ax(i, t, e, n, s) { +function Gv(i, t, e, n, s) { if (!i) { - var r = Ei(j, n); - r || (r = rx), i = r.a, t = r.b, e = r.rf; + var r = Ii(Y, n); + r || (r = Dv), i = r.a, t = r.b, e = r.rf; } - return e && !t && (t = (1 - 1 / e) * i), (e === 0 || Math.abs(i - t) < I) && (s = !0, t = i), { + return e && !t && (t = (1 - 1 / e) * i), (e === 0 || Math.abs(i - t) < T) && (s = !0, t = i), { a: i, b: t, rf: e, sphere: s }; } -var kt = {}; -kt.wgs84 = { +var Gt = {}; +Gt.wgs84 = { towgs84: "0,0,0", ellipse: "WGS84", datumName: "WGS84" }; -kt.ch1903 = { +Gt.ch1903 = { towgs84: "674.374,15.056,405.346", ellipse: "bessel", datumName: "swiss" }; -kt.ggrs87 = { +Gt.ggrs87 = { towgs84: "-199.87,74.79,246.62", ellipse: "GRS80", datumName: "Greek_Geodetic_Reference_System_1987" }; -kt.nad83 = { +Gt.nad83 = { towgs84: "0,0,0", ellipse: "GRS80", datumName: "North_American_Datum_1983" }; -kt.nad27 = { +Gt.nad27 = { nadgrids: "@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat", ellipse: "clrk66", datumName: "North_American_Datum_1927" }; -kt.potsdam = { +Gt.potsdam = { towgs84: "598.1,73.7,418.2,0.202,0.045,-2.455,6.7", ellipse: "bessel", datumName: "Potsdam Rauenberg 1950 DHDN" }; -kt.carthage = { +Gt.carthage = { towgs84: "-263.0,6.0,431.0", ellipse: "clark80", datumName: "Carthage 1934 Tunisia" }; -kt.hermannskogel = { +Gt.hermannskogel = { towgs84: "577.326,90.129,463.919,5.137,1.474,5.297,2.4232", ellipse: "bessel", datumName: "Hermannskogel" }; -kt.osni52 = { +Gt.osni52 = { towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15", ellipse: "airy", datumName: "Irish National" }; -kt.ire65 = { +Gt.ire65 = { towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15", ellipse: "mod_airy", datumName: "Ireland 1965" }; -kt.rassadiran = { +Gt.rassadiran = { towgs84: "-133.63,-157.5,-158.62", ellipse: "intl", datumName: "Rassadiran" }; -kt.nzgd49 = { +Gt.nzgd49 = { towgs84: "59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993", ellipse: "intl", datumName: "New Zealand Geodetic Datum 1949" }; -kt.osgb36 = { +Gt.osgb36 = { towgs84: "446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894", ellipse: "airy", datumName: "Airy 1830" }; -kt.s_jtsk = { +Gt.s_jtsk = { towgs84: "589,76,480", ellipse: "bessel", datumName: "S-JTSK (Ferro)" }; -kt.beduaram = { +Gt.beduaram = { towgs84: "-106,-87,188", ellipse: "clrk80", datumName: "Beduaram" }; -kt.gunung_segara = { +Gt.gunung_segara = { towgs84: "-403,684,41", ellipse: "bessel", datumName: "Gunung Segara Jakarta" }; -kt.rnb72 = { +Gt.rnb72 = { towgs84: "106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1", ellipse: "intl", datumName: "Reseau National Belge 1972" }; -function lx(i, t, e, n, s, r, o) { +function $v(i, t, e, n, s, r, o) { var a = {}; - return i === void 0 || i === "none" ? a.datum_type = Ga : a.datum_type = Sv, t && (a.datum_params = t.map(parseFloat), (a.datum_params[0] !== 0 || a.datum_params[1] !== 0 || a.datum_params[2] !== 0) && (a.datum_type = Xi), a.datum_params.length > 3 && (a.datum_params[3] !== 0 || a.datum_params[4] !== 0 || a.datum_params[5] !== 0 || a.datum_params[6] !== 0) && (a.datum_type = Yi, a.datum_params[3] *= fs, a.datum_params[4] *= fs, a.datum_params[5] *= fs, a.datum_params[6] = a.datum_params[6] / 1e6 + 1)), o && (a.datum_type = br, a.grids = o), a.a = e, a.b = n, a.es = s, a.ep2 = r, a; + return i === void 0 || i === "none" ? a.datum_type = Za : a.datum_type = iv, t && (a.datum_params = t.map(parseFloat), (a.datum_params[0] !== 0 || a.datum_params[1] !== 0 || a.datum_params[2] !== 0) && (a.datum_type = en), a.datum_params.length > 3 && (a.datum_params[3] !== 0 || a.datum_params[4] !== 0 || a.datum_params[5] !== 0 || a.datum_params[6] !== 0) && (a.datum_type = nn, a.datum_params[3] *= Ms, a.datum_params[4] *= Ms, a.datum_params[5] *= Ms, a.datum_params[6] = a.datum_params[6] / 1e6 + 1)), o && (a.datum_type = Ar, a.grids = o), a.a = e, a.b = n, a.es = s, a.ep2 = r, a; } -var Mf = {}; -function hx(i, t) { - var e = new DataView(t), n = dx(e), s = fx(e, n); +var _f = {}; +function Bv(i, t) { + var e = new DataView(t), n = Uv(e), s = Vv(e, n); s.nSubgrids > 1 && console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored"); - var r = gx(e, s, n), o = { header: s, subgrids: r }; - return Mf[i] = o, o; + var r = Wv(e, s, n), o = { header: s, subgrids: r }; + return _f[i] = o, o; } -function cx(i) { +function zv(i) { if (i === void 0) return null; var t = i.split(","); - return t.map(ux); + return t.map(Zv); } -function ux(i) { +function Zv(i) { if (i.length === 0) return null; var t = i[0] === "@"; return t && (i = i.slice(1)), i === "null" ? { name: "null", mandatory: !t, grid: null, isNull: !0 } : { name: i, mandatory: !t, - grid: Mf[i] || null, + grid: _f[i] || null, isNull: !1 }; } -function Mn(i) { +function Ln(i) { return i / 3600 * Math.PI / 180; } -function dx(i) { +function Uv(i) { var t = i.getInt32(8, !1); return t === 11 ? !1 : (t = i.getInt32(8, !0), t !== 11 && console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"), !0); } -function fx(i, t) { +function Vv(i, t) { return { nFields: i.getInt32(8, t), nSubgridFields: i.getInt32(24, t), nSubgrids: i.getInt32(40, t), - shiftType: Ba(i, 56, 56 + 8).trim(), + shiftType: Va(i, 56, 56 + 8).trim(), fromSemiMajorAxis: i.getFloat64(120, t), fromSemiMinorAxis: i.getFloat64(136, t), toSemiMajorAxis: i.getFloat64(152, t), toSemiMinorAxis: i.getFloat64(168, t) }; } -function Ba(i, t, e) { +function Va(i, t, e) { return String.fromCharCode.apply(null, new Uint8Array(i.buffer.slice(t, e))); } -function gx(i, t, e) { +function Wv(i, t, e) { for (var n = 176, s = [], r = 0; r < t.nSubgrids; r++) { - var o = _x(i, n, e), a = px(i, n, o, e), l = Math.round( + var o = Xv(i, n, e), a = Yv(i, n, o, e), l = Math.round( 1 + (o.upperLongitude - o.lowerLongitude) / o.longitudeInterval ), h = Math.round( 1 + (o.upperLatitude - o.lowerLatitude) / o.latitudeInterval ); s.push({ - ll: [Mn(o.lowerLongitude), Mn(o.lowerLatitude)], - del: [Mn(o.longitudeInterval), Mn(o.latitudeInterval)], + ll: [Ln(o.lowerLongitude), Ln(o.lowerLatitude)], + del: [Ln(o.longitudeInterval), Ln(o.latitudeInterval)], lim: [l, h], count: o.gridNodeCount, - cvs: mx(a) + cvs: Hv(a) }); } return s; } -function mx(i) { +function Hv(i) { return i.map(function(t) { - return [Mn(t.longitudeShift), Mn(t.latitudeShift)]; + return [Ln(t.longitudeShift), Ln(t.latitudeShift)]; }); } -function _x(i, t, e) { +function Xv(i, t, e) { return { - name: Ba(i, t + 8, t + 16).trim(), - parent: Ba(i, t + 24, t + 24 + 8).trim(), + name: Va(i, t + 8, t + 16).trim(), + parent: Va(i, t + 24, t + 24 + 8).trim(), lowerLatitude: i.getFloat64(t + 72, e), upperLatitude: i.getFloat64(t + 88, e), lowerLongitude: i.getFloat64(t + 104, e), @@ -19595,7 +19840,7 @@ function _x(i, t, e) { gridNodeCount: i.getInt32(t + 168, e) }; } -function px(i, t, e, n) { +function Yv(i, t, e, n) { for (var s = t + 176, r = 16, o = [], a = 0; a < e.gridNodeCount; a++) { var l = { latitudeShift: i.getFloat32(s + a * r, n), @@ -19607,29 +19852,29 @@ function px(i, t, e, n) { } return o; } -function Oe(i, t) { - if (!(this instanceof Oe)) - return new Oe(i); +function ke(i, t) { + if (!(this instanceof ke)) + return new ke(i); t = t || function(h) { if (h) throw h; }; - var e = Hv(i); + var e = Ev(i); if (typeof e != "object") { t(i); return; } - var n = Oe.projections.get(e.projName); + var n = ke.projections.get(e.projName); if (!n) { t(i); return; } if (e.datumCode && e.datumCode !== "none") { - var s = Ei(kt, e.datumCode); + var s = Ii(Gt, e.datumCode); s && (e.datum_params = e.datum_params || (s.towgs84 ? s.towgs84.split(",") : null), e.ellps = s.ellipse, e.datumName = s.datumName ? s.datumName : e.datumCode); } e.k0 = e.k0 || 1, e.axis = e.axis || "enu", e.ellps = e.ellps || "wgs84", e.lat1 = e.lat1 || e.lat0; - var r = ax(e.a, e.b, e.rf, e.ellps, e.sphere), o = ox(r.a, r.b, r.rf, e.R_A), a = cx(e.nadgrids), l = e.datum || lx( + var r = Gv(e.a, e.b, e.rf, e.ellps, e.sphere), o = kv(r.a, r.b, r.rf, e.R_A), a = zv(e.nadgrids), l = e.datum || $v( e.datumCode, e.datum_params, r.a, @@ -19638,14 +19883,14 @@ function Oe(i, t) { o.ep2, a ); - Zc(this, e), Zc(this, n), this.a = r.a, this.b = r.b, this.rf = r.rf, this.sphere = r.sphere, this.es = o.es, this.e = o.e, this.ep2 = o.ep2, this.datum = l, this.init(), t(null, this); + Uc(this, e), Uc(this, n), this.a = r.a, this.b = r.b, this.rf = r.rf, this.sphere = r.sphere, this.es = o.es, this.e = o.e, this.ep2 = o.ep2, this.datum = l, this.init(), t(null, this); } -Oe.projections = sx; -Oe.projections.start(); -function yx(i, t) { - return i.datum_type !== t.datum_type || i.a !== t.a || Math.abs(i.es - t.es) > 5e-11 ? !1 : i.datum_type === Xi ? i.datum_params[0] === t.datum_params[0] && i.datum_params[1] === t.datum_params[1] && i.datum_params[2] === t.datum_params[2] : i.datum_type === Yi ? i.datum_params[0] === t.datum_params[0] && i.datum_params[1] === t.datum_params[1] && i.datum_params[2] === t.datum_params[2] && i.datum_params[3] === t.datum_params[3] && i.datum_params[4] === t.datum_params[4] && i.datum_params[5] === t.datum_params[5] && i.datum_params[6] === t.datum_params[6] : !0; +ke.projections = Fv; +ke.projections.start(); +function jv(i, t) { + return i.datum_type !== t.datum_type || i.a !== t.a || Math.abs(i.es - t.es) > 5e-11 ? !1 : i.datum_type === en ? i.datum_params[0] === t.datum_params[0] && i.datum_params[1] === t.datum_params[1] && i.datum_params[2] === t.datum_params[2] : i.datum_type === nn ? i.datum_params[0] === t.datum_params[0] && i.datum_params[1] === t.datum_params[1] && i.datum_params[2] === t.datum_params[2] && i.datum_params[3] === t.datum_params[3] && i.datum_params[4] === t.datum_params[4] && i.datum_params[5] === t.datum_params[5] && i.datum_params[6] === t.datum_params[6] : !0; } -function Cf(i, t, e) { +function yf(i, t, e) { var n = i.x, s = i.y, r = i.z ? i.z : 0, o, a, l, h; if (s < -S && s > -1.001 * S) s = -S; @@ -19663,35 +19908,35 @@ function Cf(i, t, e) { z: (o * (1 - t) + r) * a }; } -function Ef(i, t, e, n) { - var s = 1e-12, r = s * s, o = 30, a, l, h, c, u, d, f, g, m, _, y, p, v, x = i.x, M = i.y, E = i.z ? i.z : 0, R, L, N; - if (a = Math.sqrt(x * x + M * M), l = Math.sqrt(x * x + M * M + E * E), a / e < s) { - if (R = 0, l / e < s) - return L = S, N = -n, { +function vf(i, t, e, n) { + var s = 1e-12, r = s * s, o = 30, a, l, h, c, u, d, f, g, m, p, _, y, v, x = i.x, C = i.y, E = i.z ? i.z : 0, w, R, A; + if (a = Math.sqrt(x * x + C * C), l = Math.sqrt(x * x + C * C + E * E), a / e < s) { + if (w = 0, l / e < s) + return R = S, A = -n, { x: i.x, y: i.y, z: i.z }; } else - R = Math.atan2(M, x); + w = Math.atan2(C, x); h = E / l, c = a / l, u = 1 / Math.sqrt(1 - t * (2 - t) * c * c), g = c * (1 - t) * u, m = h * u, v = 0; do - v++, f = e / Math.sqrt(1 - t * m * m), N = a * g + E * m - f * (1 - t * m * m), d = t * f / (f + N), u = 1 / Math.sqrt(1 - d * (2 - d) * c * c), _ = c * (1 - d) * u, y = h * u, p = y * g - _ * m, g = _, m = y; - while (p * p > r && v < o); - return L = Math.atan(y / Math.abs(_)), { - x: R, - y: L, - z: N + v++, f = e / Math.sqrt(1 - t * m * m), A = a * g + E * m - f * (1 - t * m * m), d = t * f / (f + A), u = 1 / Math.sqrt(1 - d * (2 - d) * c * c), p = c * (1 - d) * u, _ = h * u, y = _ * g - p * m, g = p, m = _; + while (y * y > r && v < o); + return R = Math.atan(_ / Math.abs(p)), { + x: w, + y: R, + z: A }; } -function vx(i, t, e) { - if (t === Xi) +function Kv(i, t, e) { + if (t === en) return { x: i.x + e[0], y: i.y + e[1], z: i.z + e[2] }; - if (t === Yi) { + if (t === nn) { var n = e[0], s = e[1], r = e[2], o = e[3], a = e[4], l = e[5], h = e[6]; return { x: h * (i.x - l * i.y + a * i.z) + n, @@ -19700,14 +19945,14 @@ function vx(i, t, e) { }; } } -function xx(i, t, e) { - if (t === Xi) +function qv(i, t, e) { + if (t === en) return { x: i.x - e[0], y: i.y - e[1], z: i.z - e[2] }; - if (t === Yi) { + if (t === nn) { var n = e[0], s = e[1], r = e[2], o = e[3], a = e[4], l = e[5], h = e[6], c = (i.x - n) / h, u = (i.y - s) / h, d = (i.z - r) / h; return { x: c + l * u - a * d, @@ -19716,30 +19961,30 @@ function xx(i, t, e) { }; } } -function wr(i) { - return i === Xi || i === Yi; +function Lr(i) { + return i === en || i === nn; } -function Mx(i, t, e) { - if (yx(i, t) || i.datum_type === Ga || t.datum_type === Ga) +function Jv(i, t, e) { + if (jv(i, t) || i.datum_type === Za || t.datum_type === Za) return e; var n = i.a, s = i.es; - if (i.datum_type === br) { - var r = Vc(i, !1, e); + if (i.datum_type === Ar) { + var r = Wc(i, !1, e); if (r !== 0) return; - n = Gc, s = $c; + n = $c, s = Bc; } var o = t.a, a = t.b, l = t.es; - if (t.datum_type === br && (o = Gc, a = Rv, l = $c), s === l && n === o && !wr(i.datum_type) && !wr(t.datum_type)) + if (t.datum_type === Ar && (o = $c, a = nv, l = Bc), s === l && n === o && !Lr(i.datum_type) && !Lr(t.datum_type)) return e; - if (e = Cf(e, s, n), wr(i.datum_type) && (e = vx(e, i.datum_type, i.datum_params)), wr(t.datum_type) && (e = xx(e, t.datum_type, t.datum_params)), e = Ef(e, l, o, a), t.datum_type === br) { - var h = Vc(t, !0, e); + if (e = yf(e, s, n), Lr(i.datum_type) && (e = Kv(e, i.datum_type, i.datum_params)), Lr(t.datum_type) && (e = qv(e, t.datum_type, t.datum_params)), e = vf(e, l, o, a), t.datum_type === Ar) { + var h = Wc(t, !0, e); if (h !== 0) return; } return e; } -function Vc(i, t, e) { +function Wc(i, t, e) { if (i.grids === null || i.grids.length === 0) return console.log("Grid shift grids not found"), -1; for (var n = { x: -e.x, y: e.y }, s = { x: Number.NaN, y: Number.NaN }, r = [], o = 0; o < i.grids.length; o++) { @@ -19754,25 +19999,25 @@ function Vc(i, t, e) { continue; } var l = a.grid.subgrids[0], h = (Math.abs(l.del[1]) + Math.abs(l.del[0])) / 1e4, c = l.ll[0] - h, u = l.ll[1] - h, d = l.ll[0] + (l.lim[0] - 1) * l.del[0] + h, f = l.ll[1] + (l.lim[1] - 1) * l.del[1] + h; - if (!(u > n.y || c > n.x || f < n.y || d < n.x) && (s = Cx(n, t, l), !isNaN(s.x))) + if (!(u > n.y || c > n.x || f < n.y || d < n.x) && (s = Qv(n, t, l), !isNaN(s.x))) break; } - return isNaN(s.x) ? (console.log("Failed to find a grid shift table for location '" + -n.x * Ae + " " + n.y * Ae + " tried: '" + r + "'"), -1) : (e.x = -s.x, e.y = s.y, 0); + return isNaN(s.x) ? (console.log("Failed to find a grid shift table for location '" + -n.x * Fe + " " + n.y * Fe + " tried: '" + r + "'"), -1) : (e.x = -s.x, e.y = s.y, 0); } -function Cx(i, t, e) { +function Qv(i, t, e) { var n = { x: Number.NaN, y: Number.NaN }; if (isNaN(i.x)) return n; var s = { x: i.x, y: i.y }; s.x -= e.ll[0], s.y -= e.ll[1], s.x = P(s.x - Math.PI) + Math.PI; - var r = Wc(s, e); + var r = Hc(s, e); if (t) { if (isNaN(r.x)) return n; r.x = s.x - r.x, r.y = s.y - r.y; var o = 9, a = 1e-12, l, h; do { - if (h = Wc(r, e), isNaN(h.x)) { + if (h = Hc(r, e), isNaN(h.x)) { console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation."); break; } @@ -19785,7 +20030,7 @@ function Cx(i, t, e) { isNaN(r.x) || (n.x = i.x + r.x, n.y = i.y + r.y); return n; } -function Wc(i, t) { +function Hc(i, t) { var e = { x: i.x / t.del[0], y: i.y / t.del[1] }, n = { x: Math.floor(e.x), y: Math.floor(e.y) }, s = { x: e.x - 1 * n.x, y: e.y - 1 * n.y }, r = { x: Number.NaN, y: Number.NaN }, o; if (n.x < 0 || n.x >= t.lim[0] || n.y < 0 || n.y >= t.lim[1]) return r; @@ -19799,7 +20044,7 @@ function Wc(i, t) { var c = { x: t.cvs[o][0], y: t.cvs[o][1] }, u = s.x * s.y, d = s.x * (1 - s.y), f = (1 - s.x) * (1 - s.y), g = (1 - s.x) * s.y; return r.x = f * a.x + d * l.x + g * c.x + u * h.x, r.y = f * a.y + d * l.y + g * c.y + u * h.y, r; } -function Hc(i, t, e) { +function Xc(i, t, e) { var n = e.x, s = e.y, r = e.z || 0, o, a, l, h = {}; for (l = 0; l < 3; l++) if (!(t && l === 2 && e.z === void 0)) @@ -19827,17 +20072,17 @@ function Hc(i, t, e) { } return h; } -function wf(i) { +function xf(i) { var t = { x: i[0], y: i[1] }; return i.length > 2 && (t.z = i[2]), i.length > 3 && (t.m = i[3]), t; } -function Ex(i) { - Xc(i.x), Xc(i.y); +function tx(i) { + Yc(i.x), Yc(i.y); } -function Xc(i) { +function Yc(i) { if (typeof Number.isFinite == "function") { if (Number.isFinite(i)) return; @@ -19846,15 +20091,15 @@ function Xc(i) { if (typeof i != "number" || i !== i || !isFinite(i)) throw new TypeError("coordinates must be finite numbers"); } -function wx(i, t) { - return (i.datum.datum_type === Xi || i.datum.datum_type === Yi) && t.datumCode !== "WGS84" || (t.datum.datum_type === Xi || t.datum.datum_type === Yi) && i.datumCode !== "WGS84"; +function ex(i, t) { + return (i.datum.datum_type === en || i.datum.datum_type === nn) && t.datumCode !== "WGS84" || (t.datum.datum_type === en || t.datum.datum_type === nn) && i.datumCode !== "WGS84"; } -function Qr(i, t, e, n) { +function ro(i, t, e, n) { var s; - if (Array.isArray(e) && (e = wf(e)), Ex(e), i.datum && t.datum && wx(i, t) && (s = new Oe("WGS84"), e = Qr(i, s, e, n), i = s), n && i.axis !== "enu" && (e = Hc(i, !1, e)), i.projName === "longlat") + if (Array.isArray(e) && (e = xf(e)), tx(e), i.datum && t.datum && ex(i, t) && (s = new ke("WGS84"), e = ro(i, s, e, n), i = s), n && i.axis !== "enu" && (e = Xc(i, !1, e)), i.projName === "longlat") e = { - x: e.x * $t, - y: e.y * $t, + x: e.x * Bt, + y: e.y * Bt, z: e.z || 0 }; else if (i.to_meter && (e = { @@ -19863,25 +20108,25 @@ function Qr(i, t, e, n) { z: e.z || 0 }), e = i.inverse(e), !e) return; - if (i.from_greenwich && (e.x += i.from_greenwich), e = Mx(i.datum, t.datum, e), !!e) + if (i.from_greenwich && (e.x += i.from_greenwich), e = Jv(i.datum, t.datum, e), !!e) return t.from_greenwich && (e = { x: e.x - t.from_greenwich, y: e.y, z: e.z || 0 }), t.projName === "longlat" ? e = { - x: e.x * Ae, - y: e.y * Ae, + x: e.x * Fe, + y: e.y * Fe, z: e.z || 0 } : (e = t.forward(e), t.to_meter && (e = { x: e.x / t.to_meter, y: e.y / t.to_meter, z: e.z || 0 - })), n && t.axis !== "enu" ? Hc(t, !0, e) : e; + })), n && t.axis !== "enu" ? Xc(t, !0, e) : e; } -var Yc = Oe("WGS84"); -function ta(i, t, e, n) { +var jc = ke("WGS84"); +function aa(i, t, e, n) { var s, r, o; - return Array.isArray(e) ? (s = Qr(i, t, e, n) || { x: NaN, y: NaN }, e.length > 2 ? typeof i.name < "u" && i.name === "geocent" || typeof t.name < "u" && t.name === "geocent" ? typeof s.z == "number" ? [s.x, s.y, s.z].concat(e.splice(3)) : [s.x, s.y, e[2]].concat(e.splice(3)) : [s.x, s.y].concat(e.splice(2)) : [s.x, s.y]) : (r = Qr(i, t, e, n), o = Object.keys(e), o.length === 2 || o.forEach(function(a) { + return Array.isArray(e) ? (s = ro(i, t, e, n) || { x: NaN, y: NaN }, e.length > 2 ? typeof i.name < "u" && i.name === "geocent" || typeof t.name < "u" && t.name === "geocent" ? typeof s.z == "number" ? [s.x, s.y, s.z].concat(e.splice(3)) : [s.x, s.y, e[2]].concat(e.splice(3)) : [s.x, s.y].concat(e.splice(2)) : [s.x, s.y]) : (r = ro(i, t, e, n), o = Object.keys(e), o.length === 2 || o.forEach(function(a) { if (typeof i.name < "u" && i.name === "geocent" || typeof t.name < "u" && t.name === "geocent") { if (a === "x" || a === "y" || a === "z") return; @@ -19890,112 +20135,112 @@ function ta(i, t, e, n) { r[a] = e[a]; }), r); } -function jc(i) { - return i instanceof Oe ? i : i.oProj ? i.oProj : Oe(i); +function Kc(i) { + return i instanceof ke ? i : i.oProj ? i.oProj : ke(i); } -function ee(i, t, e) { - i = jc(i); +function se(i, t, e) { + i = Kc(i); var n = !1, s; - return typeof t > "u" ? (t = i, i = Yc, n = !0) : (typeof t.x < "u" || Array.isArray(t)) && (e = t, t = i, i = Yc, n = !0), t = jc(t), e ? ta(i, t, e) : (s = { + return typeof t > "u" ? (t = i, i = jc, n = !0) : (typeof t.x < "u" || Array.isArray(t)) && (e = t, t = i, i = jc, n = !0), t = Kc(t), e ? aa(i, t, e) : (s = { forward: function(r, o) { - return ta(i, t, r, o); + return aa(i, t, r, o); }, inverse: function(r, o) { - return ta(t, i, r, o); + return aa(t, i, r, o); } }, n && (s.oProj = t), s); } -var Kc = 6, Sf = "AJSAJS", Rf = "AFAFAF", Cn = 65, qt = 73, pe = 79, os = 86, as = 90; -const Sx = { - forward: bf, - inverse: Rx, - toPoint: Lf +var qc = 6, Cf = "AJSAJS", Mf = "AFAFAF", Tn = 65, te = 73, ve = 79, ms = 86, ps = 90; +const ix = { + forward: Ef, + inverse: nx, + toPoint: wf }; -function bf(i, t) { - return t = t || 5, Tx(bx({ +function Ef(i, t) { + return t = t || 5, ox(sx({ lat: i[1], lon: i[0] }), t); } -function Rx(i) { - var t = Ul(If(i.toUpperCase())); +function nx(i) { + var t = Xl(Rf(i.toUpperCase())); return t.lat && t.lon ? [t.lon, t.lat, t.lon, t.lat] : [t.left, t.bottom, t.right, t.top]; } -function Lf(i) { - var t = Ul(If(i.toUpperCase())); +function wf(i) { + var t = Xl(Rf(i.toUpperCase())); return t.lat && t.lon ? [t.lon, t.lat] : [(t.left + t.right) / 2, (t.top + t.bottom) / 2]; } -function ea(i) { +function la(i) { return i * (Math.PI / 180); } -function qc(i) { +function Jc(i) { return 180 * (i / Math.PI); } -function bx(i) { - var t = i.lat, e = i.lon, n = 6378137, s = 669438e-8, r = 0.9996, o, a, l, h, c, u, d, f = ea(t), g = ea(e), m, _; - _ = Math.floor((e + 180) / 6) + 1, e === 180 && (_ = 60), t >= 56 && t < 64 && e >= 3 && e < 12 && (_ = 32), t >= 72 && t < 84 && (e >= 0 && e < 9 ? _ = 31 : e >= 9 && e < 21 ? _ = 33 : e >= 21 && e < 33 ? _ = 35 : e >= 33 && e < 42 && (_ = 37)), o = (_ - 1) * 6 - 180 + 3, m = ea(o), a = s / (1 - s), l = n / Math.sqrt(1 - s * Math.sin(f) * Math.sin(f)), h = Math.tan(f) * Math.tan(f), c = a * Math.cos(f) * Math.cos(f), u = Math.cos(f) * (g - m), d = n * ((1 - s / 4 - 3 * s * s / 64 - 5 * s * s * s / 256) * f - (3 * s / 8 + 3 * s * s / 32 + 45 * s * s * s / 1024) * Math.sin(2 * f) + (15 * s * s / 256 + 45 * s * s * s / 1024) * Math.sin(4 * f) - 35 * s * s * s / 3072 * Math.sin(6 * f)); - var y = r * l * (u + (1 - h + c) * u * u * u / 6 + (5 - 18 * h + h * h + 72 * c - 58 * a) * u * u * u * u * u / 120) + 5e5, p = r * (d + l * Math.tan(f) * (u * u / 2 + (5 - h + 9 * c + 4 * c * c) * u * u * u * u / 24 + (61 - 58 * h + h * h + 600 * c - 330 * a) * u * u * u * u * u * u / 720)); - return t < 0 && (p += 1e7), { - northing: Math.round(p), - easting: Math.round(y), - zoneNumber: _, - zoneLetter: Lx(t) +function sx(i) { + var t = i.lat, e = i.lon, n = 6378137, s = 669438e-8, r = 0.9996, o, a, l, h, c, u, d, f = la(t), g = la(e), m, p; + p = Math.floor((e + 180) / 6) + 1, e === 180 && (p = 60), t >= 56 && t < 64 && e >= 3 && e < 12 && (p = 32), t >= 72 && t < 84 && (e >= 0 && e < 9 ? p = 31 : e >= 9 && e < 21 ? p = 33 : e >= 21 && e < 33 ? p = 35 : e >= 33 && e < 42 && (p = 37)), o = (p - 1) * 6 - 180 + 3, m = la(o), a = s / (1 - s), l = n / Math.sqrt(1 - s * Math.sin(f) * Math.sin(f)), h = Math.tan(f) * Math.tan(f), c = a * Math.cos(f) * Math.cos(f), u = Math.cos(f) * (g - m), d = n * ((1 - s / 4 - 3 * s * s / 64 - 5 * s * s * s / 256) * f - (3 * s / 8 + 3 * s * s / 32 + 45 * s * s * s / 1024) * Math.sin(2 * f) + (15 * s * s / 256 + 45 * s * s * s / 1024) * Math.sin(4 * f) - 35 * s * s * s / 3072 * Math.sin(6 * f)); + var _ = r * l * (u + (1 - h + c) * u * u * u / 6 + (5 - 18 * h + h * h + 72 * c - 58 * a) * u * u * u * u * u / 120) + 5e5, y = r * (d + l * Math.tan(f) * (u * u / 2 + (5 - h + 9 * c + 4 * c * c) * u * u * u * u / 24 + (61 - 58 * h + h * h + 600 * c - 330 * a) * u * u * u * u * u * u / 720)); + return t < 0 && (y += 1e7), { + northing: Math.round(y), + easting: Math.round(_), + zoneNumber: p, + zoneLetter: rx(t) }; } -function Ul(i) { +function Xl(i) { var t = i.northing, e = i.easting, n = i.zoneLetter, s = i.zoneNumber; if (s < 0 || s > 60) return null; - var r = 0.9996, o = 6378137, a = 669438e-8, l, h = (1 - Math.sqrt(1 - a)) / (1 + Math.sqrt(1 - a)), c, u, d, f, g, m, _, y, p, v = e - 5e5, x = t; - n < "N" && (x -= 1e7), _ = (s - 1) * 6 - 180 + 3, l = a / (1 - a), m = x / r, y = m / (o * (1 - a / 4 - 3 * a * a / 64 - 5 * a * a * a / 256)), p = y + (3 * h / 2 - 27 * h * h * h / 32) * Math.sin(2 * y) + (21 * h * h / 16 - 55 * h * h * h * h / 32) * Math.sin(4 * y) + 151 * h * h * h / 96 * Math.sin(6 * y), c = o / Math.sqrt(1 - a * Math.sin(p) * Math.sin(p)), u = Math.tan(p) * Math.tan(p), d = l * Math.cos(p) * Math.cos(p), f = o * (1 - a) / Math.pow(1 - a * Math.sin(p) * Math.sin(p), 1.5), g = v / (c * r); - var M = p - c * Math.tan(p) / f * (g * g / 2 - (5 + 3 * u + 10 * d - 4 * d * d - 9 * l) * g * g * g * g / 24 + (61 + 90 * u + 298 * d + 45 * u * u - 252 * l - 3 * d * d) * g * g * g * g * g * g / 720); - M = qc(M); - var E = (g - (1 + 2 * u + d) * g * g * g / 6 + (5 - 2 * d + 28 * u - 3 * d * d + 8 * l + 24 * u * u) * g * g * g * g * g / 120) / Math.cos(p); - E = _ + qc(E); - var R; + var r = 0.9996, o = 6378137, a = 669438e-8, l, h = (1 - Math.sqrt(1 - a)) / (1 + Math.sqrt(1 - a)), c, u, d, f, g, m, p, _, y, v = e - 5e5, x = t; + n < "N" && (x -= 1e7), p = (s - 1) * 6 - 180 + 3, l = a / (1 - a), m = x / r, _ = m / (o * (1 - a / 4 - 3 * a * a / 64 - 5 * a * a * a / 256)), y = _ + (3 * h / 2 - 27 * h * h * h / 32) * Math.sin(2 * _) + (21 * h * h / 16 - 55 * h * h * h * h / 32) * Math.sin(4 * _) + 151 * h * h * h / 96 * Math.sin(6 * _), c = o / Math.sqrt(1 - a * Math.sin(y) * Math.sin(y)), u = Math.tan(y) * Math.tan(y), d = l * Math.cos(y) * Math.cos(y), f = o * (1 - a) / Math.pow(1 - a * Math.sin(y) * Math.sin(y), 1.5), g = v / (c * r); + var C = y - c * Math.tan(y) / f * (g * g / 2 - (5 + 3 * u + 10 * d - 4 * d * d - 9 * l) * g * g * g * g / 24 + (61 + 90 * u + 298 * d + 45 * u * u - 252 * l - 3 * d * d) * g * g * g * g * g * g / 720); + C = Jc(C); + var E = (g - (1 + 2 * u + d) * g * g * g / 6 + (5 - 2 * d + 28 * u - 3 * d * d + 8 * l + 24 * u * u) * g * g * g * g * g / 120) / Math.cos(y); + E = p + Jc(E); + var w; if (i.accuracy) { - var L = Ul({ + var R = Xl({ northing: i.northing + i.accuracy, easting: i.easting + i.accuracy, zoneLetter: i.zoneLetter, zoneNumber: i.zoneNumber }); - R = { - top: L.lat, - right: L.lon, - bottom: M, + w = { + top: R.lat, + right: R.lon, + bottom: C, left: E }; } else - R = { - lat: M, + w = { + lat: C, lon: E }; - return R; + return w; } -function Lx(i) { +function rx(i) { var t = "Z"; return 84 >= i && i >= 72 ? t = "X" : 72 > i && i >= 64 ? t = "W" : 64 > i && i >= 56 ? t = "V" : 56 > i && i >= 48 ? t = "U" : 48 > i && i >= 40 ? t = "T" : 40 > i && i >= 32 ? t = "S" : 32 > i && i >= 24 ? t = "R" : 24 > i && i >= 16 ? t = "Q" : 16 > i && i >= 8 ? t = "P" : 8 > i && i >= 0 ? t = "N" : 0 > i && i >= -8 ? t = "M" : -8 > i && i >= -16 ? t = "L" : -16 > i && i >= -24 ? t = "K" : -24 > i && i >= -32 ? t = "J" : -32 > i && i >= -40 ? t = "H" : -40 > i && i >= -48 ? t = "G" : -48 > i && i >= -56 ? t = "F" : -56 > i && i >= -64 ? t = "E" : -64 > i && i >= -72 ? t = "D" : -72 > i && i >= -80 && (t = "C"), t; } -function Tx(i, t) { +function ox(i, t) { var e = "00000" + i.easting, n = "00000" + i.northing; - return i.zoneNumber + i.zoneLetter + Ix(i.easting, i.northing, i.zoneNumber) + e.substr(e.length - 5, t) + n.substr(n.length - 5, t); + return i.zoneNumber + i.zoneLetter + ax(i.easting, i.northing, i.zoneNumber) + e.substr(e.length - 5, t) + n.substr(n.length - 5, t); } -function Ix(i, t, e) { - var n = Tf(e), s = Math.floor(i / 1e5), r = Math.floor(t / 1e5) % 20; - return Ax(s, r, n); +function ax(i, t, e) { + var n = Sf(e), s = Math.floor(i / 1e5), r = Math.floor(t / 1e5) % 20; + return lx(s, r, n); } -function Tf(i) { - var t = i % Kc; - return t === 0 && (t = Kc), t; +function Sf(i) { + var t = i % qc; + return t === 0 && (t = qc), t; } -function Ax(i, t, e) { - var n = e - 1, s = Sf.charCodeAt(n), r = Rf.charCodeAt(n), o = s + i - 1, a = r + t, l = !1; - o > as && (o = o - as + Cn - 1, l = !0), (o === qt || s < qt && o > qt || (o > qt || s < qt) && l) && o++, (o === pe || s < pe && o > pe || (o > pe || s < pe) && l) && (o++, o === qt && o++), o > as && (o = o - as + Cn - 1), a > os ? (a = a - os + Cn - 1, l = !0) : l = !1, (a === qt || r < qt && a > qt || (a > qt || r < qt) && l) && a++, (a === pe || r < pe && a > pe || (a > pe || r < pe) && l) && (a++, a === qt && a++), a > os && (a = a - os + Cn - 1); +function lx(i, t, e) { + var n = e - 1, s = Cf.charCodeAt(n), r = Mf.charCodeAt(n), o = s + i - 1, a = r + t, l = !1; + o > ps && (o = o - ps + Tn - 1, l = !0), (o === te || s < te && o > te || (o > te || s < te) && l) && o++, (o === ve || s < ve && o > ve || (o > ve || s < ve) && l) && (o++, o === te && o++), o > ps && (o = o - ps + Tn - 1), a > ms ? (a = a - ms + Tn - 1, l = !0) : l = !1, (a === te || r < te && a > te || (a > te || r < te) && l) && a++, (a === ve || r < ve && a > ve || (a > ve || r < ve) && l) && (a++, a === te && a++), a > ms && (a = a - ms + Tn - 1); var h = String.fromCharCode(o) + String.fromCharCode(a); return h; } -function If(i) { +function Rf(i) { if (i && i.length === 0) throw "MGRSPoint coverting from nothing"; for (var t = i.length, e = null, n = "", s, r = 0; !/[A-Z]/.test(s = i.charAt(r)); ) { @@ -20010,7 +20255,7 @@ function If(i) { if (a <= "A" || a === "B" || a === "Y" || a >= "Z" || a === "I" || a === "O") throw "MGRSPoint zone letter " + a + " not handled: " + i; e = i.substring(r, r += 2); - for (var l = Tf(o), h = Px(e.charAt(0), l), c = Ox(e.charAt(1), l); c < Nx(a); ) + for (var l = Sf(o), h = hx(e.charAt(0), l), c = cx(e.charAt(1), l); c < ux(a); ) c += 2e6; var u = t - r; if (u % 2 !== 0) @@ -20018,40 +20263,40 @@ function If(i) { of digits after the zone letter and two 100km letters - front half for easting meters, second half for northing meters` + i; - var d = u / 2, f = 0, g = 0, m, _, y, p, v; - return d > 0 && (m = 1e5 / Math.pow(10, d), _ = i.substring(r, r + d), f = parseFloat(_) * m, y = i.substring(r + d), g = parseFloat(y) * m), p = f + h, v = g + c, { - easting: p, + var d = u / 2, f = 0, g = 0, m, p, _, y, v; + return d > 0 && (m = 1e5 / Math.pow(10, d), p = i.substring(r, r + d), f = parseFloat(p) * m, _ = i.substring(r + d), g = parseFloat(_) * m), y = f + h, v = g + c, { + easting: y, northing: v, zoneLetter: a, zoneNumber: o, accuracy: m }; } -function Px(i, t) { - for (var e = Sf.charCodeAt(t - 1), n = 1e5, s = !1; e !== i.charCodeAt(0); ) { - if (e++, e === qt && e++, e === pe && e++, e > as) { +function hx(i, t) { + for (var e = Cf.charCodeAt(t - 1), n = 1e5, s = !1; e !== i.charCodeAt(0); ) { + if (e++, e === te && e++, e === ve && e++, e > ps) { if (s) throw "Bad character: " + i; - e = Cn, s = !0; + e = Tn, s = !0; } n += 1e5; } return n; } -function Ox(i, t) { +function cx(i, t) { if (i > "V") throw "MGRSPoint given invalid Northing " + i; - for (var e = Rf.charCodeAt(t - 1), n = 0, s = !1; e !== i.charCodeAt(0); ) { - if (e++, e === qt && e++, e === pe && e++, e > os) { + for (var e = Mf.charCodeAt(t - 1), n = 0, s = !1; e !== i.charCodeAt(0); ) { + if (e++, e === te && e++, e === ve && e++, e > ms) { if (s) throw "Bad character: " + i; - e = Cn, s = !0; + e = Tn, s = !0; } n += 1e5; } return n; } -function Nx(i) { +function ux(i) { var t; switch (i) { case "C": @@ -20121,9 +20366,9 @@ function Nx(i) { return t; throw "Invalid zone letter: " + i; } -function Gn(i, t, e) { - if (!(this instanceof Gn)) - return new Gn(i, t, e); +function Xn(i, t, e) { + if (!(this instanceof Xn)) + return new Xn(i, t, e); if (Array.isArray(i)) this.x = i[0], this.y = i[1], this.z = i[2] || 0; else if (typeof i == "object") @@ -20135,47 +20380,47 @@ function Gn(i, t, e) { this.x = i, this.y = t, this.z = e || 0; console.warn("proj4.Point will be removed in version 3, use proj4.toPoint"); } -Gn.fromMGRS = function(i) { - return new Gn(Lf(i)); +Xn.fromMGRS = function(i) { + return new Xn(wf(i)); }; -Gn.prototype.toMGRS = function(i) { - return bf([this.x, this.y], i); +Xn.prototype.toMGRS = function(i) { + return Ef([this.x, this.y], i); }; -var Fx = 1, Dx = 0.25, Jc = 0.046875, Qc = 0.01953125, tu = 0.01068115234375, kx = 0.75, Gx = 0.46875, $x = 0.013020833333333334, Bx = 0.007120768229166667, zx = 0.3645833333333333, Zx = 0.005696614583333333, Ux = 0.3076171875; -function Af(i) { +var dx = 1, fx = 0.25, Qc = 0.046875, tu = 0.01953125, eu = 0.01068115234375, gx = 0.75, mx = 0.46875, px = 0.013020833333333334, _x = 0.007120768229166667, yx = 0.3645833333333333, vx = 0.005696614583333333, xx = 0.3076171875; +function bf(i) { var t = []; - t[0] = Fx - i * (Dx + i * (Jc + i * (Qc + i * tu))), t[1] = i * (kx - i * (Jc + i * (Qc + i * tu))); + t[0] = dx - i * (fx + i * (Qc + i * (tu + i * eu))), t[1] = i * (gx - i * (Qc + i * (tu + i * eu))); var e = i * i; - return t[2] = e * (Gx - i * ($x + i * Bx)), e *= i, t[3] = e * (zx - i * Zx), t[4] = e * i * Ux, t; + return t[2] = e * (mx - i * (px + i * _x)), e *= i, t[3] = e * (yx - i * vx), t[4] = e * i * xx, t; } -function Ro(i, t, e, n) { +function Oo(i, t, e, n) { return e *= t, t *= t, n[0] * i - e * (n[1] + t * (n[2] + t * (n[3] + t * n[4]))); } -var Vx = 20; -function Pf(i, t, e) { - for (var n = 1 / (1 - t), s = i, r = Vx; r; --r) { +var Cx = 20; +function Lf(i, t, e) { + for (var n = 1 / (1 - t), s = i, r = Cx; r; --r) { var o = Math.sin(s), a = 1 - t * o * o; - if (a = (Ro(s, o, Math.cos(s), e) - i) * (a * Math.sqrt(a)) * n, s -= a, Math.abs(a) < I) + if (a = (Oo(s, o, Math.cos(s), e) - i) * (a * Math.sqrt(a)) * n, s -= a, Math.abs(a) < T) return s; } return s; } -function Wx() { - this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.es && (this.en = Af(this.es), this.ml0 = Ro(this.lat0, Math.sin(this.lat0), Math.cos(this.lat0), this.en)); +function Mx() { + this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.es && (this.en = bf(this.es), this.ml0 = Oo(this.lat0, Math.sin(this.lat0), Math.cos(this.lat0), this.en)); } -function Hx(i) { +function Ex(i) { var t = i.x, e = i.y, n = P(t - this.long0), s, r, o, a = Math.sin(e), l = Math.cos(e); if (this.es) { - var c = l * n, u = Math.pow(c, 2), d = this.ep2 * Math.pow(l, 2), f = Math.pow(d, 2), g = Math.abs(l) > I ? Math.tan(e) : 0, m = Math.pow(g, 2), _ = Math.pow(m, 2); + var c = l * n, u = Math.pow(c, 2), d = this.ep2 * Math.pow(l, 2), f = Math.pow(d, 2), g = Math.abs(l) > T ? Math.tan(e) : 0, m = Math.pow(g, 2), p = Math.pow(m, 2); s = 1 - this.es * Math.pow(a, 2), c = c / Math.sqrt(s); - var y = Ro(e, a, l, this.en); - r = this.a * (this.k0 * c * (1 + u / 6 * (1 - m + d + u / 20 * (5 - 18 * m + _ + 14 * d - 58 * m * d + u / 42 * (61 + 179 * _ - _ * m - 479 * m))))) + this.x0, o = this.a * (this.k0 * (y - this.ml0 + a * n * c / 2 * (1 + u / 12 * (5 - m + 9 * d + 4 * f + u / 30 * (61 + _ - 58 * m + 270 * d - 330 * m * d + u / 56 * (1385 + 543 * _ - _ * m - 3111 * m)))))) + this.y0; + var _ = Oo(e, a, l, this.en); + r = this.a * (this.k0 * c * (1 + u / 6 * (1 - m + d + u / 20 * (5 - 18 * m + p + 14 * d - 58 * m * d + u / 42 * (61 + 179 * p - p * m - 479 * m))))) + this.x0, o = this.a * (this.k0 * (_ - this.ml0 + a * n * c / 2 * (1 + u / 12 * (5 - m + 9 * d + 4 * f + u / 30 * (61 + p - 58 * m + 270 * d - 330 * m * d + u / 56 * (1385 + 543 * p - p * m - 3111 * m)))))) + this.y0; } else { var h = l * Math.sin(n); - if (Math.abs(Math.abs(h) - 1) < I) + if (Math.abs(Math.abs(h) - 1) < T) return 93; if (r = 0.5 * this.a * this.k0 * Math.log((1 + h) / (1 - h)) + this.x0, o = l * Math.cos(n) / Math.sqrt(1 - Math.pow(h, 2)), h = Math.abs(o), h >= 1) { - if (h - 1 > I) + if (h - 1 > T) return 93; o = 0; } else @@ -20184,105 +20429,105 @@ function Hx(i) { } return i.x = r, i.y = o, i; } -function Xx(i) { +function wx(i) { var t, e, n, s, r = (i.x - this.x0) * (1 / this.a), o = (i.y - this.y0) * (1 / this.a); if (this.es) - if (t = this.ml0 + o / this.k0, e = Pf(t, this.es, this.en), Math.abs(e) < S) { - var u = Math.sin(e), d = Math.cos(e), f = Math.abs(d) > I ? Math.tan(e) : 0, g = this.ep2 * Math.pow(d, 2), m = Math.pow(g, 2), _ = Math.pow(f, 2), y = Math.pow(_, 2); + if (t = this.ml0 + o / this.k0, e = Lf(t, this.es, this.en), Math.abs(e) < S) { + var u = Math.sin(e), d = Math.cos(e), f = Math.abs(d) > T ? Math.tan(e) : 0, g = this.ep2 * Math.pow(d, 2), m = Math.pow(g, 2), p = Math.pow(f, 2), _ = Math.pow(p, 2); t = 1 - this.es * Math.pow(u, 2); - var p = r * Math.sqrt(t) / this.k0, v = Math.pow(p, 2); - t = t * f, n = e - t * v / (1 - this.es) * 0.5 * (1 - v / 12 * (5 + 3 * _ - 9 * g * _ + g - 4 * m - v / 30 * (61 + 90 * _ - 252 * g * _ + 45 * y + 46 * g - v / 56 * (1385 + 3633 * _ + 4095 * y + 1574 * y * _)))), s = P(this.long0 + p * (1 - v / 6 * (1 + 2 * _ + g - v / 20 * (5 + 28 * _ + 24 * y + 8 * g * _ + 6 * g - v / 42 * (61 + 662 * _ + 1320 * y + 720 * y * _)))) / d); + var y = r * Math.sqrt(t) / this.k0, v = Math.pow(y, 2); + t = t * f, n = e - t * v / (1 - this.es) * 0.5 * (1 - v / 12 * (5 + 3 * p - 9 * g * p + g - 4 * m - v / 30 * (61 + 90 * p - 252 * g * p + 45 * _ + 46 * g - v / 56 * (1385 + 3633 * p + 4095 * _ + 1574 * _ * p)))), s = P(this.long0 + y * (1 - v / 6 * (1 + 2 * p + g - v / 20 * (5 + 28 * p + 24 * _ + 8 * g * p + 6 * g - v / 42 * (61 + 662 * p + 1320 * _ + 720 * _ * p)))) / d); } else - n = S * Ks(o), s = 0; + n = S * tr(o), s = 0; else { var a = Math.exp(r / this.k0), l = 0.5 * (a - 1 / a), h = this.lat0 + o / this.k0, c = Math.cos(h); t = Math.sqrt((1 - Math.pow(c, 2)) / (1 + Math.pow(l, 2))), n = Math.asin(t), o < 0 && (n = -n), l === 0 && c === 0 ? s = 0 : s = P(Math.atan2(l, c) + this.long0); } return i.x = s, i.y = n, i; } -var Yx = ["Fast_Transverse_Mercator", "Fast Transverse Mercator"]; -const Tr = { - init: Wx, - forward: Hx, - inverse: Xx, - names: Yx +var Sx = ["Fast_Transverse_Mercator", "Fast Transverse Mercator"]; +const Or = { + init: Mx, + forward: Ex, + inverse: wx, + names: Sx }; -function Of(i) { +function Tf(i) { var t = Math.exp(i); return t = (t - 1 / t) / 2, t; } -function Ce(i, t) { +function Se(i, t) { i = Math.abs(i), t = Math.abs(t); var e = Math.max(i, t), n = Math.min(i, t) / (e || 1); return e * Math.sqrt(1 + Math.pow(n, 2)); } -function jx(i) { +function Rx(i) { var t = 1 + i, e = t - 1; return e === 0 ? i : i * Math.log(t) / e; } -function Kx(i) { +function bx(i) { var t = Math.abs(i); - return t = jx(t * (1 + t / (Ce(1, t) + 1))), i < 0 ? -t : t; + return t = Rx(t * (1 + t / (Se(1, t) + 1))), i < 0 ? -t : t; } -function Vl(i, t) { +function Yl(i, t) { for (var e = 2 * Math.cos(2 * t), n = i.length - 1, s = i[n], r = 0, o; --n >= 0; ) o = -r + e * s + i[n], r = s, s = o; return t + o * Math.sin(2 * t); } -function qx(i, t) { +function Lx(i, t) { for (var e = 2 * Math.cos(t), n = i.length - 1, s = i[n], r = 0, o; --n >= 0; ) o = -r + e * s + i[n], r = s, s = o; return Math.sin(t) * o; } -function Jx(i) { +function Tx(i) { var t = Math.exp(i); return t = (t + 1 / t) / 2, t; } -function Nf(i, t, e) { - for (var n = Math.sin(t), s = Math.cos(t), r = Of(e), o = Jx(e), a = 2 * s * o, l = -2 * n * r, h = i.length - 1, c = i[h], u = 0, d = 0, f = 0, g, m; --h >= 0; ) +function If(i, t, e) { + for (var n = Math.sin(t), s = Math.cos(t), r = Tf(e), o = Tx(e), a = 2 * s * o, l = -2 * n * r, h = i.length - 1, c = i[h], u = 0, d = 0, f = 0, g, m; --h >= 0; ) g = d, m = u, d = c, u = f, c = -g + a * d - l * u + i[h], f = -m + l * d + a * u; return a = n * o, l = s * r, [a * c - l * f, a * f + l * c]; } -function Qx() { +function Ix() { if (!this.approx && (isNaN(this.es) || this.es <= 0)) throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.'); - this.approx && (Tr.init.apply(this), this.forward = Tr.forward, this.inverse = Tr.inverse), this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.cgb = [], this.cbg = [], this.utg = [], this.gtu = []; + this.approx && (Or.init.apply(this), this.forward = Or.forward, this.inverse = Or.inverse), this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.cgb = [], this.cbg = [], this.utg = [], this.gtu = []; var i = this.es / (1 + Math.sqrt(1 - this.es)), t = i / (2 - i), e = t; this.cgb[0] = t * (2 + t * (-2 / 3 + t * (-2 + t * (116 / 45 + t * (26 / 45 + t * (-2854 / 675)))))), this.cbg[0] = t * (-2 + t * (2 / 3 + t * (4 / 3 + t * (-82 / 45 + t * (32 / 45 + t * (4642 / 4725)))))), e = e * t, this.cgb[1] = e * (7 / 3 + t * (-8 / 5 + t * (-227 / 45 + t * (2704 / 315 + t * (2323 / 945))))), this.cbg[1] = e * (5 / 3 + t * (-16 / 15 + t * (-13 / 9 + t * (904 / 315 + t * (-1522 / 945))))), e = e * t, this.cgb[2] = e * (56 / 15 + t * (-136 / 35 + t * (-1262 / 105 + t * (73814 / 2835)))), this.cbg[2] = e * (-26 / 15 + t * (34 / 21 + t * (8 / 5 + t * (-12686 / 2835)))), e = e * t, this.cgb[3] = e * (4279 / 630 + t * (-332 / 35 + t * (-399572 / 14175))), this.cbg[3] = e * (1237 / 630 + t * (-12 / 5 + t * (-24832 / 14175))), e = e * t, this.cgb[4] = e * (4174 / 315 + t * (-144838 / 6237)), this.cbg[4] = e * (-734 / 315 + t * (109598 / 31185)), e = e * t, this.cgb[5] = e * (601676 / 22275), this.cbg[5] = e * (444337 / 155925), e = Math.pow(t, 2), this.Qn = this.k0 / (1 + t) * (1 + e * (1 / 4 + e * (1 / 64 + e / 256))), this.utg[0] = t * (-0.5 + t * (2 / 3 + t * (-37 / 96 + t * (1 / 360 + t * (81 / 512 + t * (-96199 / 604800)))))), this.gtu[0] = t * (0.5 + t * (-2 / 3 + t * (5 / 16 + t * (41 / 180 + t * (-127 / 288 + t * (7891 / 37800)))))), this.utg[1] = e * (-1 / 48 + t * (-1 / 15 + t * (437 / 1440 + t * (-46 / 105 + t * (1118711 / 3870720))))), this.gtu[1] = e * (13 / 48 + t * (-3 / 5 + t * (557 / 1440 + t * (281 / 630 + t * (-1983433 / 1935360))))), e = e * t, this.utg[2] = e * (-17 / 480 + t * (37 / 840 + t * (209 / 4480 + t * (-5569 / 90720)))), this.gtu[2] = e * (61 / 240 + t * (-103 / 140 + t * (15061 / 26880 + t * (167603 / 181440)))), e = e * t, this.utg[3] = e * (-4397 / 161280 + t * (11 / 504 + t * (830251 / 7257600))), this.gtu[3] = e * (49561 / 161280 + t * (-179 / 168 + t * (6601661 / 7257600))), e = e * t, this.utg[4] = e * (-4583 / 161280 + t * (108847 / 3991680)), this.gtu[4] = e * (34729 / 80640 + t * (-3418889 / 1995840)), e = e * t, this.utg[5] = e * (-20648693 / 638668800), this.gtu[5] = e * (212378941 / 319334400); - var n = Vl(this.cbg, this.lat0); - this.Zb = -this.Qn * (n + qx(this.gtu, 2 * n)); + var n = Yl(this.cbg, this.lat0); + this.Zb = -this.Qn * (n + Lx(this.gtu, 2 * n)); } -function t3(i) { +function Ax(i) { var t = P(i.x - this.long0), e = i.y; - e = Vl(this.cbg, e); + e = Yl(this.cbg, e); var n = Math.sin(e), s = Math.cos(e), r = Math.sin(t), o = Math.cos(t); - e = Math.atan2(n, o * s), t = Math.atan2(r * s, Ce(n, s * o)), t = Kx(Math.tan(t)); - var a = Nf(this.gtu, 2 * e, 2 * t); + e = Math.atan2(n, o * s), t = Math.atan2(r * s, Se(n, s * o)), t = bx(Math.tan(t)); + var a = If(this.gtu, 2 * e, 2 * t); e = e + a[0], t = t + a[1]; var l, h; return Math.abs(t) <= 2.623395162778 ? (l = this.a * (this.Qn * t) + this.x0, h = this.a * (this.Qn * e + this.Zb) + this.y0) : (l = 1 / 0, h = 1 / 0), i.x = l, i.y = h, i; } -function e3(i) { +function Px(i) { var t = (i.x - this.x0) * (1 / this.a), e = (i.y - this.y0) * (1 / this.a); e = (e - this.Zb) / this.Qn, t = t / this.Qn; var n, s; if (Math.abs(t) <= 2.623395162778) { - var r = Nf(this.utg, 2 * e, 2 * t); - e = e + r[0], t = t + r[1], t = Math.atan(Of(t)); + var r = If(this.utg, 2 * e, 2 * t); + e = e + r[0], t = t + r[1], t = Math.atan(Tf(t)); var o = Math.sin(e), a = Math.cos(e), l = Math.sin(t), h = Math.cos(t); - e = Math.atan2(o * h, Ce(l, h * a)), t = Math.atan2(l, h * a), n = P(t + this.long0), s = Vl(this.cgb, e); + e = Math.atan2(o * h, Se(l, h * a)), t = Math.atan2(l, h * a), n = P(t + this.long0), s = Yl(this.cgb, e); } else n = 1 / 0, s = 1 / 0; return i.x = n, i.y = s, i; } -var i3 = ["Extended_Transverse_Mercator", "Extended Transverse Mercator", "etmerc", "Transverse_Mercator", "Transverse Mercator", "tmerc"]; -const Ir = { - init: Qx, - forward: t3, - inverse: e3, - names: i3 +var Ox = ["Extended_Transverse_Mercator", "Extended Transverse Mercator", "etmerc", "Transverse_Mercator", "Transverse Mercator", "tmerc"]; +const Nr = { + init: Ix, + forward: Ax, + inverse: Px, + names: Ox }; -function n3(i, t) { +function Nx(i, t) { if (i === void 0) { if (i = Math.floor((P(t) + Math.PI) * 30 / Math.PI) + 1, i < 0) return 0; @@ -20291,99 +20536,99 @@ function n3(i, t) { } return i; } -var s3 = "etmerc"; -function r3() { - var i = n3(this.zone, this.long0); +var Fx = "etmerc"; +function Dx() { + var i = Nx(this.zone, this.long0); if (i === void 0) throw new Error("unknown utm zone"); - this.lat0 = 0, this.long0 = (6 * Math.abs(i) - 183) * $t, this.x0 = 5e5, this.y0 = this.utmSouth ? 1e7 : 0, this.k0 = 0.9996, Ir.init.apply(this), this.forward = Ir.forward, this.inverse = Ir.inverse; + this.lat0 = 0, this.long0 = (6 * Math.abs(i) - 183) * Bt, this.x0 = 5e5, this.y0 = this.utmSouth ? 1e7 : 0, this.k0 = 0.9996, Nr.init.apply(this), this.forward = Nr.forward, this.inverse = Nr.inverse; } -var o3 = ["Universal Transverse Mercator System", "utm"]; -const a3 = { - init: r3, - names: o3, - dependsOn: s3 +var kx = ["Universal Transverse Mercator System", "utm"]; +const Gx = { + init: Dx, + names: kx, + dependsOn: Fx }; -function Wl(i, t) { +function jl(i, t) { return Math.pow((1 - i) / (1 + i), t); } -var l3 = 20; -function h3() { +var $x = 20; +function Bx() { var i = Math.sin(this.lat0), t = Math.cos(this.lat0); - t *= t, this.rc = Math.sqrt(1 - this.es) / (1 - this.es * i * i), this.C = Math.sqrt(1 + this.es * t * t / (1 - this.es)), this.phic0 = Math.asin(i / this.C), this.ratexp = 0.5 * this.C * this.e, this.K = Math.tan(0.5 * this.phic0 + ht) / (Math.pow(Math.tan(0.5 * this.lat0 + ht), this.C) * Wl(this.e * i, this.ratexp)); + t *= t, this.rc = Math.sqrt(1 - this.es) / (1 - this.es * i * i), this.C = Math.sqrt(1 + this.es * t * t / (1 - this.es)), this.phic0 = Math.asin(i / this.C), this.ratexp = 0.5 * this.C * this.e, this.K = Math.tan(0.5 * this.phic0 + lt) / (Math.pow(Math.tan(0.5 * this.lat0 + lt), this.C) * jl(this.e * i, this.ratexp)); } -function c3(i) { +function zx(i) { var t = i.x, e = i.y; - return i.y = 2 * Math.atan(this.K * Math.pow(Math.tan(0.5 * e + ht), this.C) * Wl(this.e * Math.sin(e), this.ratexp)) - S, i.x = this.C * t, i; + return i.y = 2 * Math.atan(this.K * Math.pow(Math.tan(0.5 * e + lt), this.C) * jl(this.e * Math.sin(e), this.ratexp)) - S, i.x = this.C * t, i; } -function u3(i) { - for (var t = 1e-14, e = i.x / this.C, n = i.y, s = Math.pow(Math.tan(0.5 * n + ht) / this.K, 1 / this.C), r = l3; r > 0 && (n = 2 * Math.atan(s * Wl(this.e * Math.sin(i.y), -0.5 * this.e)) - S, !(Math.abs(n - i.y) < t)); --r) +function Zx(i) { + for (var t = 1e-14, e = i.x / this.C, n = i.y, s = Math.pow(Math.tan(0.5 * n + lt) / this.K, 1 / this.C), r = $x; r > 0 && (n = 2 * Math.atan(s * jl(this.e * Math.sin(i.y), -0.5 * this.e)) - S, !(Math.abs(n - i.y) < t)); --r) i.y = n; return r ? (i.x = e, i.y = n, i) : null; } -var d3 = ["gauss"]; -const Hl = { - init: h3, - forward: c3, - inverse: u3, - names: d3 +var Ux = ["gauss"]; +const Kl = { + init: Bx, + forward: zx, + inverse: Zx, + names: Ux }; -function f3() { - Hl.init.apply(this), this.rc && (this.sinc0 = Math.sin(this.phic0), this.cosc0 = Math.cos(this.phic0), this.R2 = 2 * this.rc, this.title || (this.title = "Oblique Stereographic Alternative")); +function Vx() { + Kl.init.apply(this), this.rc && (this.sinc0 = Math.sin(this.phic0), this.cosc0 = Math.cos(this.phic0), this.R2 = 2 * this.rc, this.title || (this.title = "Oblique Stereographic Alternative")); } -function g3(i) { +function Wx(i) { var t, e, n, s; - return i.x = P(i.x - this.long0), Hl.forward.apply(this, [i]), t = Math.sin(i.y), e = Math.cos(i.y), n = Math.cos(i.x), s = this.k0 * this.R2 / (1 + this.sinc0 * t + this.cosc0 * e * n), i.x = s * e * Math.sin(i.x), i.y = s * (this.cosc0 * t - this.sinc0 * e * n), i.x = this.a * i.x + this.x0, i.y = this.a * i.y + this.y0, i; + return i.x = P(i.x - this.long0), Kl.forward.apply(this, [i]), t = Math.sin(i.y), e = Math.cos(i.y), n = Math.cos(i.x), s = this.k0 * this.R2 / (1 + this.sinc0 * t + this.cosc0 * e * n), i.x = s * e * Math.sin(i.x), i.y = s * (this.cosc0 * t - this.sinc0 * e * n), i.x = this.a * i.x + this.x0, i.y = this.a * i.y + this.y0, i; } -function m3(i) { +function Hx(i) { var t, e, n, s, r; if (i.x = (i.x - this.x0) / this.a, i.y = (i.y - this.y0) / this.a, i.x /= this.k0, i.y /= this.k0, r = Math.sqrt(i.x * i.x + i.y * i.y)) { var o = 2 * Math.atan2(r, this.R2); t = Math.sin(o), e = Math.cos(o), s = Math.asin(e * this.sinc0 + i.y * t * this.cosc0 / r), n = Math.atan2(i.x * t, r * this.cosc0 * e - i.y * this.sinc0 * t); } else s = this.phic0, n = 0; - return i.x = n, i.y = s, Hl.inverse.apply(this, [i]), i.x = P(i.x + this.long0), i; -} -var _3 = ["Stereographic_North_Pole", "Oblique_Stereographic", "Polar_Stereographic", "sterea", "Oblique Stereographic Alternative", "Double_Stereographic"]; -const p3 = { - init: f3, - forward: g3, - inverse: m3, - names: _3 + return i.x = n, i.y = s, Kl.inverse.apply(this, [i]), i.x = P(i.x + this.long0), i; +} +var Xx = ["Stereographic_North_Pole", "Oblique_Stereographic", "Polar_Stereographic", "sterea", "Oblique Stereographic Alternative", "Double_Stereographic"]; +const Yx = { + init: Vx, + forward: Wx, + inverse: Hx, + names: Xx }; -function y3(i, t, e) { +function jx(i, t, e) { return t *= e, Math.tan(0.5 * (S + i)) * Math.pow((1 - t) / (1 + t), 0.5 * e); } -function v3() { - this.coslat0 = Math.cos(this.lat0), this.sinlat0 = Math.sin(this.lat0), this.sphere ? this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= I && (this.k0 = 0.5 * (1 + Ks(this.lat0) * Math.sin(this.lat_ts))) : (Math.abs(this.coslat0) <= I && (this.lat0 > 0 ? this.con = 1 : this.con = -1), this.cons = Math.sqrt(Math.pow(1 + this.e, 1 + this.e) * Math.pow(1 - this.e, 1 - this.e)), this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= I && (this.k0 = 0.5 * this.cons * De(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) / we(this.e, this.con * this.lat_ts, this.con * Math.sin(this.lat_ts))), this.ms1 = De(this.e, this.sinlat0, this.coslat0), this.X0 = 2 * Math.atan(this.ssfn_(this.lat0, this.sinlat0, this.e)) - S, this.cosX0 = Math.cos(this.X0), this.sinX0 = Math.sin(this.X0)); +function Kx() { + this.coslat0 = Math.cos(this.lat0), this.sinlat0 = Math.sin(this.lat0), this.sphere ? this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= T && (this.k0 = 0.5 * (1 + tr(this.lat0) * Math.sin(this.lat_ts))) : (Math.abs(this.coslat0) <= T && (this.lat0 > 0 ? this.con = 1 : this.con = -1), this.cons = Math.sqrt(Math.pow(1 + this.e, 1 + this.e) * Math.pow(1 - this.e, 1 - this.e)), this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= T && (this.k0 = 0.5 * this.cons * $e(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) / be(this.e, this.con * this.lat_ts, this.con * Math.sin(this.lat_ts))), this.ms1 = $e(this.e, this.sinlat0, this.coslat0), this.X0 = 2 * Math.atan(this.ssfn_(this.lat0, this.sinlat0, this.e)) - S, this.cosX0 = Math.cos(this.X0), this.sinX0 = Math.sin(this.X0)); } -function x3(i) { +function qx(i) { var t = i.x, e = i.y, n = Math.sin(e), s = Math.cos(e), r, o, a, l, h, c, u = P(t - this.long0); - return Math.abs(Math.abs(t - this.long0) - Math.PI) <= I && Math.abs(e + this.lat0) <= I ? (i.x = NaN, i.y = NaN, i) : this.sphere ? (r = 2 * this.k0 / (1 + this.sinlat0 * n + this.coslat0 * s * Math.cos(u)), i.x = this.a * r * s * Math.sin(u) + this.x0, i.y = this.a * r * (this.coslat0 * n - this.sinlat0 * s * Math.cos(u)) + this.y0, i) : (o = 2 * Math.atan(this.ssfn_(e, n, this.e)) - S, l = Math.cos(o), a = Math.sin(o), Math.abs(this.coslat0) <= I ? (h = we(this.e, e * this.con, this.con * n), c = 2 * this.a * this.k0 * h / this.cons, i.x = this.x0 + c * Math.sin(t - this.long0), i.y = this.y0 - this.con * c * Math.cos(t - this.long0), i) : (Math.abs(this.sinlat0) < I ? (r = 2 * this.a * this.k0 / (1 + l * Math.cos(u)), i.y = r * a) : (r = 2 * this.a * this.k0 * this.ms1 / (this.cosX0 * (1 + this.sinX0 * a + this.cosX0 * l * Math.cos(u))), i.y = r * (this.cosX0 * a - this.sinX0 * l * Math.cos(u)) + this.y0), i.x = r * l * Math.sin(u) + this.x0, i)); + return Math.abs(Math.abs(t - this.long0) - Math.PI) <= T && Math.abs(e + this.lat0) <= T ? (i.x = NaN, i.y = NaN, i) : this.sphere ? (r = 2 * this.k0 / (1 + this.sinlat0 * n + this.coslat0 * s * Math.cos(u)), i.x = this.a * r * s * Math.sin(u) + this.x0, i.y = this.a * r * (this.coslat0 * n - this.sinlat0 * s * Math.cos(u)) + this.y0, i) : (o = 2 * Math.atan(this.ssfn_(e, n, this.e)) - S, l = Math.cos(o), a = Math.sin(o), Math.abs(this.coslat0) <= T ? (h = be(this.e, e * this.con, this.con * n), c = 2 * this.a * this.k0 * h / this.cons, i.x = this.x0 + c * Math.sin(t - this.long0), i.y = this.y0 - this.con * c * Math.cos(t - this.long0), i) : (Math.abs(this.sinlat0) < T ? (r = 2 * this.a * this.k0 / (1 + l * Math.cos(u)), i.y = r * a) : (r = 2 * this.a * this.k0 * this.ms1 / (this.cosX0 * (1 + this.sinX0 * a + this.cosX0 * l * Math.cos(u))), i.y = r * (this.cosX0 * a - this.sinX0 * l * Math.cos(u)) + this.y0), i.x = r * l * Math.sin(u) + this.x0, i)); } -function M3(i) { +function Jx(i) { i.x -= this.x0, i.y -= this.y0; var t, e, n, s, r, o = Math.sqrt(i.x * i.x + i.y * i.y); if (this.sphere) { var a = 2 * Math.atan(o / (2 * this.a * this.k0)); - return t = this.long0, e = this.lat0, o <= I ? (i.x = t, i.y = e, i) : (e = Math.asin(Math.cos(a) * this.sinlat0 + i.y * Math.sin(a) * this.coslat0 / o), Math.abs(this.coslat0) < I ? this.lat0 > 0 ? t = P(this.long0 + Math.atan2(i.x, -1 * i.y)) : t = P(this.long0 + Math.atan2(i.x, i.y)) : t = P(this.long0 + Math.atan2(i.x * Math.sin(a), o * this.coslat0 * Math.cos(a) - i.y * this.sinlat0 * Math.sin(a))), i.x = t, i.y = e, i); - } else if (Math.abs(this.coslat0) <= I) { - if (o <= I) + return t = this.long0, e = this.lat0, o <= T ? (i.x = t, i.y = e, i) : (e = Math.asin(Math.cos(a) * this.sinlat0 + i.y * Math.sin(a) * this.coslat0 / o), Math.abs(this.coslat0) < T ? this.lat0 > 0 ? t = P(this.long0 + Math.atan2(i.x, -1 * i.y)) : t = P(this.long0 + Math.atan2(i.x, i.y)) : t = P(this.long0 + Math.atan2(i.x * Math.sin(a), o * this.coslat0 * Math.cos(a) - i.y * this.sinlat0 * Math.sin(a))), i.x = t, i.y = e, i); + } else if (Math.abs(this.coslat0) <= T) { + if (o <= T) return e = this.lat0, t = this.long0, i.x = t, i.y = e, i; - i.x *= this.con, i.y *= this.con, n = o * this.cons / (2 * this.a * this.k0), e = this.con * Os(this.e, n), t = this.con * P(this.con * this.long0 + Math.atan2(i.x, -1 * i.y)); + i.x *= this.con, i.y *= this.con, n = o * this.cons / (2 * this.a * this.k0), e = this.con * zs(this.e, n), t = this.con * P(this.con * this.long0 + Math.atan2(i.x, -1 * i.y)); } else - s = 2 * Math.atan(o * this.cosX0 / (2 * this.a * this.k0 * this.ms1)), t = this.long0, o <= I ? r = this.X0 : (r = Math.asin(Math.cos(s) * this.sinX0 + i.y * Math.sin(s) * this.cosX0 / o), t = P(this.long0 + Math.atan2(i.x * Math.sin(s), o * this.cosX0 * Math.cos(s) - i.y * this.sinX0 * Math.sin(s)))), e = -1 * Os(this.e, Math.tan(0.5 * (S + r))); + s = 2 * Math.atan(o * this.cosX0 / (2 * this.a * this.k0 * this.ms1)), t = this.long0, o <= T ? r = this.X0 : (r = Math.asin(Math.cos(s) * this.sinX0 + i.y * Math.sin(s) * this.cosX0 / o), t = P(this.long0 + Math.atan2(i.x * Math.sin(s), o * this.cosX0 * Math.cos(s) - i.y * this.sinX0 * Math.sin(s)))), e = -1 * zs(this.e, Math.tan(0.5 * (S + r))); return i.x = t, i.y = e, i; } -var C3 = ["stere", "Stereographic_South_Pole", "Polar Stereographic (variant B)"]; -const E3 = { - init: v3, - forward: x3, - inverse: M3, - names: C3, - ssfn_: y3 +var Qx = ["stere", "Stereographic_South_Pole", "Polar Stereographic (variant B)"]; +const t3 = { + init: Kx, + forward: qx, + inverse: Jx, + names: Qx, + ssfn_: jx }; -function w3() { +function e3() { var i = this.lat0; this.lambda0 = this.long0; var t = Math.sin(i), e = this.a, n = this.rf, s = 1 / n, r = 2 * s - Math.pow(s, 2), o = this.e = Math.sqrt(r); @@ -20391,11 +20636,11 @@ function w3() { var a = Math.log(Math.tan(Math.PI / 4 + this.b0 / 2)), l = Math.log(Math.tan(Math.PI / 4 + i / 2)), h = Math.log((1 + o * t) / (1 - o * t)); this.K = a - this.alpha * l + this.alpha * o / 2 * h; } -function S3(i) { +function i3(i) { var t = Math.log(Math.tan(Math.PI / 4 - i.y / 2)), e = this.e / 2 * Math.log((1 + this.e * Math.sin(i.y)) / (1 - this.e * Math.sin(i.y))), n = -this.alpha * (t + e) + this.K, s = 2 * (Math.atan(Math.exp(n)) - Math.PI / 4), r = this.alpha * (i.x - this.lambda0), o = Math.atan(Math.sin(r) / (Math.sin(this.b0) * Math.tan(s) + Math.cos(this.b0) * Math.cos(r))), a = Math.asin(Math.cos(this.b0) * Math.sin(s) - Math.sin(this.b0) * Math.cos(s) * Math.cos(r)); return i.y = this.R / 2 * Math.log((1 + Math.sin(a)) / (1 - Math.sin(a))) + this.y0, i.x = this.R * o + this.x0, i; } -function R3(i) { +function n3(i) { for (var t = i.x - this.x0, e = i.y - this.y0, n = t / this.R, s = 2 * (Math.atan(Math.exp(e / this.R)) - Math.PI / 4), r = Math.asin(Math.cos(this.b0) * Math.sin(s) + Math.sin(this.b0) * Math.cos(s) * Math.cos(n)), o = Math.atan(Math.sin(n) / (Math.cos(this.b0) * Math.cos(n) - Math.sin(this.b0) * Math.tan(s))), a = this.lambda0 + o / this.alpha, l = 0, h = r, c = -1e3, u = 0; Math.abs(h - c) > 1e-7; ) { if (++u > 20) return; @@ -20403,73 +20648,73 @@ function R3(i) { } return i.x = a, i.y = h, i; } -var b3 = ["somerc"]; -const L3 = { - init: w3, - forward: S3, - inverse: R3, - names: b3 +var s3 = ["somerc"]; +const r3 = { + init: e3, + forward: i3, + inverse: n3, + names: s3 }; -var pn = 1e-7; -function T3(i) { +var wn = 1e-7; +function o3(i) { var t = ["Hotine_Oblique_Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin"], e = typeof i.PROJECTION == "object" ? Object.keys(i.PROJECTION)[0] : i.PROJECTION; return "no_uoff" in i || "no_off" in i || t.indexOf(e) !== -1; } -function I3() { - var i, t, e, n, s, r, o, a, l, h, c = 0, u, d = 0, f = 0, g = 0, m = 0, _ = 0, y = 0; - this.no_off = T3(this), this.no_rot = "no_rot" in this; - var p = !1; - "alpha" in this && (p = !0); +function a3() { + var i, t, e, n, s, r, o, a, l, h, c = 0, u, d = 0, f = 0, g = 0, m = 0, p = 0, _ = 0; + this.no_off = o3(this), this.no_rot = "no_rot" in this; + var y = !1; + "alpha" in this && (y = !0); var v = !1; - if ("rectified_grid_angle" in this && (v = !0), p && (y = this.alpha), v && (c = this.rectified_grid_angle * $t), p || v) + if ("rectified_grid_angle" in this && (v = !0), y && (_ = this.alpha), v && (c = this.rectified_grid_angle * Bt), y || v) d = this.longc; - else if (f = this.long1, m = this.lat1, g = this.long2, _ = this.lat2, Math.abs(m - _) <= pn || (i = Math.abs(m)) <= pn || Math.abs(i - S) <= pn || Math.abs(Math.abs(this.lat0) - S) <= pn || Math.abs(Math.abs(_) - S) <= pn) + else if (f = this.long1, m = this.lat1, g = this.long2, p = this.lat2, Math.abs(m - p) <= wn || (i = Math.abs(m)) <= wn || Math.abs(i - S) <= wn || Math.abs(Math.abs(this.lat0) - S) <= wn || Math.abs(Math.abs(p) - S) <= wn) throw new Error(); var x = 1 - this.es; - t = Math.sqrt(x), Math.abs(this.lat0) > I ? (a = Math.sin(this.lat0), e = Math.cos(this.lat0), i = 1 - this.es * a * a, this.B = e * e, this.B = Math.sqrt(1 + this.es * this.B * this.B / x), this.A = this.B * this.k0 * t / i, n = this.B * t / (e * Math.sqrt(i)), s = n * n - 1, s <= 0 ? s = 0 : (s = Math.sqrt(s), this.lat0 < 0 && (s = -s)), this.E = s += n, this.E *= Math.pow(we(this.e, this.lat0, a), this.B)) : (this.B = 1 / t, this.A = this.k0, this.E = n = s = 1), p || v ? (p ? (u = Math.asin(Math.sin(y) / n), v || (c = y)) : (u = c, y = Math.asin(n * Math.sin(u))), this.lam0 = d - Math.asin(0.5 * (s - 1 / s) * Math.tan(u)) / this.B) : (r = Math.pow(we(this.e, m, Math.sin(m)), this.B), o = Math.pow(we(this.e, _, Math.sin(_)), this.B), s = this.E / r, l = (o - r) / (o + r), h = this.E * this.E, h = (h - o * r) / (h + o * r), i = f - g, i < -Math.pi ? g -= As : i > Math.pi && (g += As), this.lam0 = P(0.5 * (f + g) - Math.atan(h * Math.tan(0.5 * this.B * (f - g)) / l) / this.B), u = Math.atan(2 * Math.sin(this.B * P(f - this.lam0)) / (s - 1 / s)), c = y = Math.asin(n * Math.sin(u))), this.singam = Math.sin(u), this.cosgam = Math.cos(u), this.sinrot = Math.sin(c), this.cosrot = Math.cos(c), this.rB = 1 / this.B, this.ArB = this.A * this.rB, this.BrA = 1 / this.ArB, this.A * this.B, this.no_off ? this.u_0 = 0 : (this.u_0 = Math.abs(this.ArB * Math.atan(Math.sqrt(n * n - 1) / Math.cos(y))), this.lat0 < 0 && (this.u_0 = -this.u_0)), s = 0.5 * u, this.v_pole_n = this.ArB * Math.log(Math.tan(ht - s)), this.v_pole_s = this.ArB * Math.log(Math.tan(ht + s)); + t = Math.sqrt(x), Math.abs(this.lat0) > T ? (a = Math.sin(this.lat0), e = Math.cos(this.lat0), i = 1 - this.es * a * a, this.B = e * e, this.B = Math.sqrt(1 + this.es * this.B * this.B / x), this.A = this.B * this.k0 * t / i, n = this.B * t / (e * Math.sqrt(i)), s = n * n - 1, s <= 0 ? s = 0 : (s = Math.sqrt(s), this.lat0 < 0 && (s = -s)), this.E = s += n, this.E *= Math.pow(be(this.e, this.lat0, a), this.B)) : (this.B = 1 / t, this.A = this.k0, this.E = n = s = 1), y || v ? (y ? (u = Math.asin(Math.sin(_) / n), v || (c = _)) : (u = c, _ = Math.asin(n * Math.sin(u))), this.lam0 = d - Math.asin(0.5 * (s - 1 / s) * Math.tan(u)) / this.B) : (r = Math.pow(be(this.e, m, Math.sin(m)), this.B), o = Math.pow(be(this.e, p, Math.sin(p)), this.B), s = this.E / r, l = (o - r) / (o + r), h = this.E * this.E, h = (h - o * r) / (h + o * r), i = f - g, i < -Math.pi ? g -= $s : i > Math.pi && (g += $s), this.lam0 = P(0.5 * (f + g) - Math.atan(h * Math.tan(0.5 * this.B * (f - g)) / l) / this.B), u = Math.atan(2 * Math.sin(this.B * P(f - this.lam0)) / (s - 1 / s)), c = _ = Math.asin(n * Math.sin(u))), this.singam = Math.sin(u), this.cosgam = Math.cos(u), this.sinrot = Math.sin(c), this.cosrot = Math.cos(c), this.rB = 1 / this.B, this.ArB = this.A * this.rB, this.BrA = 1 / this.ArB, this.A * this.B, this.no_off ? this.u_0 = 0 : (this.u_0 = Math.abs(this.ArB * Math.atan(Math.sqrt(n * n - 1) / Math.cos(_))), this.lat0 < 0 && (this.u_0 = -this.u_0)), s = 0.5 * u, this.v_pole_n = this.ArB * Math.log(Math.tan(lt - s)), this.v_pole_s = this.ArB * Math.log(Math.tan(lt + s)); } -function A3(i) { +function l3(i) { var t = {}, e, n, s, r, o, a, l, h; - if (i.x = i.x - this.lam0, Math.abs(Math.abs(i.y) - S) > I) { - if (o = this.E / Math.pow(we(this.e, i.y, Math.sin(i.y)), this.B), a = 1 / o, e = 0.5 * (o - a), n = 0.5 * (o + a), r = Math.sin(this.B * i.x), s = (e * this.singam - r * this.cosgam) / n, Math.abs(Math.abs(s) - 1) < I) + if (i.x = i.x - this.lam0, Math.abs(Math.abs(i.y) - S) > T) { + if (o = this.E / Math.pow(be(this.e, i.y, Math.sin(i.y)), this.B), a = 1 / o, e = 0.5 * (o - a), n = 0.5 * (o + a), r = Math.sin(this.B * i.x), s = (e * this.singam - r * this.cosgam) / n, Math.abs(Math.abs(s) - 1) < T) throw new Error(); - h = 0.5 * this.ArB * Math.log((1 - s) / (1 + s)), a = Math.cos(this.B * i.x), Math.abs(a) < pn ? l = this.A * i.x : l = this.ArB * Math.atan2(e * this.cosgam + r * this.singam, a); + h = 0.5 * this.ArB * Math.log((1 - s) / (1 + s)), a = Math.cos(this.B * i.x), Math.abs(a) < wn ? l = this.A * i.x : l = this.ArB * Math.atan2(e * this.cosgam + r * this.singam, a); } else h = i.y > 0 ? this.v_pole_n : this.v_pole_s, l = this.ArB * i.y; return this.no_rot ? (t.x = l, t.y = h) : (l -= this.u_0, t.x = h * this.cosrot + l * this.sinrot, t.y = l * this.cosrot - h * this.sinrot), t.x = this.a * t.x + this.x0, t.y = this.a * t.y + this.y0, t; } -function P3(i) { +function h3(i) { var t, e, n, s, r, o, a, l = {}; - if (i.x = (i.x - this.x0) * (1 / this.a), i.y = (i.y - this.y0) * (1 / this.a), this.no_rot ? (e = i.y, t = i.x) : (e = i.x * this.cosrot - i.y * this.sinrot, t = i.y * this.cosrot + i.x * this.sinrot + this.u_0), n = Math.exp(-this.BrA * e), s = 0.5 * (n - 1 / n), r = 0.5 * (n + 1 / n), o = Math.sin(this.BrA * t), a = (o * this.cosgam + s * this.singam) / r, Math.abs(Math.abs(a) - 1) < I) + if (i.x = (i.x - this.x0) * (1 / this.a), i.y = (i.y - this.y0) * (1 / this.a), this.no_rot ? (e = i.y, t = i.x) : (e = i.x * this.cosrot - i.y * this.sinrot, t = i.y * this.cosrot + i.x * this.sinrot + this.u_0), n = Math.exp(-this.BrA * e), s = 0.5 * (n - 1 / n), r = 0.5 * (n + 1 / n), o = Math.sin(this.BrA * t), a = (o * this.cosgam + s * this.singam) / r, Math.abs(Math.abs(a) - 1) < T) l.x = 0, l.y = a < 0 ? -S : S; else { - if (l.y = this.E / Math.sqrt((1 + a) / (1 - a)), l.y = Os(this.e, Math.pow(l.y, 1 / this.B)), l.y === 1 / 0) + if (l.y = this.E / Math.sqrt((1 + a) / (1 - a)), l.y = zs(this.e, Math.pow(l.y, 1 / this.B)), l.y === 1 / 0) throw new Error(); l.x = -this.rB * Math.atan2(s * this.cosgam - o * this.singam, Math.cos(this.BrA * t)); } return l.x += this.lam0, l; } -var O3 = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Two_Point_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "Oblique_Mercator", "omerc"]; -const N3 = { - init: I3, - forward: A3, - inverse: P3, - names: O3 +var c3 = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Two_Point_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "Oblique_Mercator", "omerc"]; +const u3 = { + init: a3, + forward: l3, + inverse: h3, + names: c3 }; -function F3() { - if (this.lat2 || (this.lat2 = this.lat1), this.k0 || (this.k0 = 1), this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, !(Math.abs(this.lat1 + this.lat2) < I)) { +function d3() { + if (this.lat2 || (this.lat2 = this.lat1), this.k0 || (this.k0 = 1), this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, !(Math.abs(this.lat1 + this.lat2) < T)) { var i = this.b / this.a; this.e = Math.sqrt(1 - i * i); - var t = Math.sin(this.lat1), e = Math.cos(this.lat1), n = De(this.e, t, e), s = we(this.e, this.lat1, t), r = Math.sin(this.lat2), o = Math.cos(this.lat2), a = De(this.e, r, o), l = we(this.e, this.lat2, r), h = we(this.e, this.lat0, Math.sin(this.lat0)); - Math.abs(this.lat1 - this.lat2) > I ? this.ns = Math.log(n / a) / Math.log(s / l) : this.ns = t, isNaN(this.ns) && (this.ns = t), this.f0 = n / (this.ns * Math.pow(s, this.ns)), this.rh = this.a * this.f0 * Math.pow(h, this.ns), this.title || (this.title = "Lambert Conformal Conic"); + var t = Math.sin(this.lat1), e = Math.cos(this.lat1), n = $e(this.e, t, e), s = be(this.e, this.lat1, t), r = Math.sin(this.lat2), o = Math.cos(this.lat2), a = $e(this.e, r, o), l = be(this.e, this.lat2, r), h = be(this.e, this.lat0, Math.sin(this.lat0)); + Math.abs(this.lat1 - this.lat2) > T ? this.ns = Math.log(n / a) / Math.log(s / l) : this.ns = t, isNaN(this.ns) && (this.ns = t), this.f0 = n / (this.ns * Math.pow(s, this.ns)), this.rh = this.a * this.f0 * Math.pow(h, this.ns), this.title || (this.title = "Lambert Conformal Conic"); } } -function D3(i) { +function f3(i) { var t = i.x, e = i.y; - Math.abs(2 * Math.abs(e) - Math.PI) <= I && (e = Ks(e) * (S - 2 * I)); + Math.abs(2 * Math.abs(e) - Math.PI) <= T && (e = tr(e) * (S - 2 * T)); var n = Math.abs(Math.abs(e) - S), s, r; - if (n > I) - s = we(this.e, e, Math.sin(e)), r = this.a * this.f0 * Math.pow(s, this.ns); + if (n > T) + s = be(this.e, e, Math.sin(e)), r = this.a * this.f0 * Math.pow(s, this.ns); else { if (n = e * this.ns, n <= 0) return null; @@ -20478,18 +20723,18 @@ function D3(i) { var o = this.ns * P(t - this.long0); return i.x = this.k0 * (r * Math.sin(o)) + this.x0, i.y = this.k0 * (this.rh - r * Math.cos(o)) + this.y0, i; } -function k3(i) { +function g3(i) { var t, e, n, s, r, o = (i.x - this.x0) / this.k0, a = this.rh - (i.y - this.y0) / this.k0; this.ns > 0 ? (t = Math.sqrt(o * o + a * a), e = 1) : (t = -Math.sqrt(o * o + a * a), e = -1); var l = 0; if (t !== 0 && (l = Math.atan2(e * o, e * a)), t !== 0 || this.ns > 0) { - if (e = 1 / this.ns, n = Math.pow(t / (this.a * this.f0), e), s = Os(this.e, n), s === -9999) + if (e = 1 / this.ns, n = Math.pow(t / (this.a * this.f0), e), s = zs(this.e, n), s === -9999) return null; } else s = -S; return r = P(l / this.ns + this.long0), i.x = r, i.y = s, i; } -var G3 = [ +var m3 = [ "Lambert Tangential Conformal Conic Projection", "Lambert_Conformal_Conic", "Lambert_Conformal_Conic_1SP", @@ -20498,20 +20743,20 @@ var G3 = [ "Lambert Conic Conformal (1SP)", "Lambert Conic Conformal (2SP)" ]; -const $3 = { - init: F3, - forward: D3, - inverse: k3, - names: G3 +const p3 = { + init: d3, + forward: f3, + inverse: g3, + names: m3 }; -function B3() { +function _3() { this.a = 6377397155e-3, this.es = 0.006674372230614, this.e = Math.sqrt(this.es), this.lat0 || (this.lat0 = 0.863937979737193), this.long0 || (this.long0 = 0.7417649320975901 - 0.308341501185665), this.k0 || (this.k0 = 0.9999), this.s45 = 0.785398163397448, this.s90 = 2 * this.s45, this.fi0 = this.lat0, this.e2 = this.es, this.e = Math.sqrt(this.e2), this.alfa = Math.sqrt(1 + this.e2 * Math.pow(Math.cos(this.fi0), 4) / (1 - this.e2)), this.uq = 1.04216856380474, this.u0 = Math.asin(Math.sin(this.fi0) / this.alfa), this.g = Math.pow((1 + this.e * Math.sin(this.fi0)) / (1 - this.e * Math.sin(this.fi0)), this.alfa * this.e / 2), this.k = Math.tan(this.u0 / 2 + this.s45) / Math.pow(Math.tan(this.fi0 / 2 + this.s45), this.alfa) * this.g, this.k1 = this.k0, this.n0 = this.a * Math.sqrt(1 - this.e2) / (1 - this.e2 * Math.pow(Math.sin(this.fi0), 2)), this.s0 = 1.37008346281555, this.n = Math.sin(this.s0), this.ro0 = this.k1 * this.n0 / Math.tan(this.s0), this.ad = this.s90 - this.uq; } -function z3(i) { +function y3(i) { var t, e, n, s, r, o, a, l = i.x, h = i.y, c = P(l - this.long0); return t = Math.pow((1 + this.e * Math.sin(h)) / (1 - this.e * Math.sin(h)), this.alfa * this.e / 2), e = 2 * (Math.atan(this.k * Math.pow(Math.tan(h / 2 + this.s45), this.alfa) / t) - this.s45), n = -c * this.alfa, s = Math.asin(Math.cos(this.ad) * Math.sin(e) + Math.sin(this.ad) * Math.cos(e) * Math.cos(n)), r = Math.asin(Math.cos(e) * Math.sin(n) / Math.cos(s)), o = this.n * r, a = this.ro0 * Math.pow(Math.tan(this.s0 / 2 + this.s45), this.n) / Math.pow(Math.tan(s / 2 + this.s45), this.n), i.y = a * Math.cos(o) / 1, i.x = a * Math.sin(o) / 1, this.czech || (i.y *= -1, i.x *= -1), i; } -function Z3(i) { +function v3(i) { var t, e, n, s, r, o, a, l, h = i.x; i.x = i.y, i.y = h, this.czech || (i.y *= -1, i.x *= -1), o = Math.sqrt(i.x * i.x + i.y * i.y), r = Math.atan2(i.y, i.x), s = r / Math.sin(this.s0), n = 2 * (Math.atan(Math.pow(this.ro0 / o, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45), t = Math.asin(Math.cos(this.ad) * Math.sin(n) - Math.sin(this.ad) * Math.cos(n) * Math.cos(s)), e = Math.asin(Math.cos(n) * Math.sin(s) / Math.cos(t)), i.x = this.long0 - e / this.alfa, a = t, l = 0; var c = 0; @@ -20520,36 +20765,36 @@ function Z3(i) { while (l === 0 && c < 15); return c >= 15 ? null : i; } -var U3 = ["Krovak", "krovak"]; -const V3 = { - init: B3, - forward: z3, - inverse: Z3, - names: U3 +var x3 = ["Krovak", "krovak"]; +const C3 = { + init: _3, + forward: y3, + inverse: v3, + names: x3 }; -function Wt(i, t, e, n, s) { +function jt(i, t, e, n, s) { return i * s - t * Math.sin(2 * s) + e * Math.sin(4 * s) - n * Math.sin(6 * s); } -function qs(i) { +function er(i) { return 1 - 0.25 * i * (1 + i / 16 * (3 + 1.25 * i)); } -function Js(i) { +function ir(i) { return 0.375 * i * (1 + 0.25 * i * (1 + 0.46875 * i)); } -function Qs(i) { +function nr(i) { return 0.05859375 * i * i * (1 + 0.75 * i); } -function tr(i) { +function sr(i) { return i * i * i * (35 / 3072); } -function $n(i, t, e) { +function Yn(i, t, e) { var n = t * e; return i / Math.sqrt(1 - n * n); } -function Xn(i) { - return Math.abs(i) < S ? i : i - Ks(i) * Math.PI; +function ns(i) { + return Math.abs(i) < S ? i : i - tr(i) * Math.PI; } -function to(i, t, e, n, s) { +function oo(i, t, e, n, s) { var r, o; r = i / t; for (var a = 0; a < 15; a++) @@ -20557,51 +20802,51 @@ function to(i, t, e, n, s) { return r; return NaN; } -function W3() { - this.sphere || (this.e0 = qs(this.es), this.e1 = Js(this.es), this.e2 = Qs(this.es), this.e3 = tr(this.es), this.ml0 = this.a * Wt(this.e0, this.e1, this.e2, this.e3, this.lat0)); +function M3() { + this.sphere || (this.e0 = er(this.es), this.e1 = ir(this.es), this.e2 = nr(this.es), this.e3 = sr(this.es), this.ml0 = this.a * jt(this.e0, this.e1, this.e2, this.e3, this.lat0)); } -function H3(i) { +function E3(i) { var t, e, n = i.x, s = i.y; if (n = P(n - this.long0), this.sphere) t = this.a * Math.asin(Math.cos(s) * Math.sin(n)), e = this.a * (Math.atan2(Math.tan(s), Math.cos(n)) - this.lat0); else { - var r = Math.sin(s), o = Math.cos(s), a = $n(this.a, this.e, r), l = Math.tan(s) * Math.tan(s), h = n * Math.cos(s), c = h * h, u = this.es * o * o / (1 - this.es), d = this.a * Wt(this.e0, this.e1, this.e2, this.e3, s); + var r = Math.sin(s), o = Math.cos(s), a = Yn(this.a, this.e, r), l = Math.tan(s) * Math.tan(s), h = n * Math.cos(s), c = h * h, u = this.es * o * o / (1 - this.es), d = this.a * jt(this.e0, this.e1, this.e2, this.e3, s); t = a * h * (1 - c * l * (1 / 6 - (8 - l + 8 * u) * c / 120)), e = d - this.ml0 + a * r / o * c * (0.5 + (5 - l + 6 * u) * c / 24); } return i.x = t + this.x0, i.y = e + this.y0, i; } -function X3(i) { +function w3(i) { i.x -= this.x0, i.y -= this.y0; var t = i.x / this.a, e = i.y / this.a, n, s; if (this.sphere) { var r = e + this.lat0; n = Math.asin(Math.sin(r) * Math.cos(t)), s = Math.atan2(Math.tan(t), Math.cos(r)); } else { - var o = this.ml0 / this.a + e, a = to(o, this.e0, this.e1, this.e2, this.e3); - if (Math.abs(Math.abs(a) - S) <= I) + var o = this.ml0 / this.a + e, a = oo(o, this.e0, this.e1, this.e2, this.e3); + if (Math.abs(Math.abs(a) - S) <= T) return i.x = this.long0, i.y = S, e < 0 && (i.y *= -1), i; - var l = $n(this.a, this.e, Math.sin(a)), h = l * l * l / this.a / this.a * (1 - this.es), c = Math.pow(Math.tan(a), 2), u = t * this.a / l, d = u * u; + var l = Yn(this.a, this.e, Math.sin(a)), h = l * l * l / this.a / this.a * (1 - this.es), c = Math.pow(Math.tan(a), 2), u = t * this.a / l, d = u * u; n = a - l * Math.tan(a) / h * u * u * (0.5 - (1 + 3 * c) * u * u / 24), s = u * (1 - d * (c / 3 + (1 + 3 * c) * c * d / 15)) / Math.cos(a); } - return i.x = P(s + this.long0), i.y = Xn(n), i; + return i.x = P(s + this.long0), i.y = ns(n), i; } -var Y3 = ["Cassini", "Cassini_Soldner", "cass"]; -const j3 = { - init: W3, - forward: H3, - inverse: X3, - names: Y3 +var S3 = ["Cassini", "Cassini_Soldner", "cass"]; +const R3 = { + init: M3, + forward: E3, + inverse: w3, + names: S3 }; -function pi(i, t) { +function wi(i, t) { var e; return i > 1e-7 ? (e = i * t, (1 - i * i) * (t / (1 - e * e) - 0.5 / i * Math.log((1 - e) / (1 + e)))) : 2 * t; } -var K3 = 1, q3 = 2, J3 = 3, Q3 = 4; -function tM() { +var b3 = 1, L3 = 2, T3 = 3, I3 = 4; +function A3() { var i = Math.abs(this.lat0); - if (Math.abs(i - S) < I ? this.mode = this.lat0 < 0 ? this.S_POLE : this.N_POLE : Math.abs(i) < I ? this.mode = this.EQUIT : this.mode = this.OBLIQ, this.es > 0) { + if (Math.abs(i - S) < T ? this.mode = this.lat0 < 0 ? this.S_POLE : this.N_POLE : Math.abs(i) < T ? this.mode = this.EQUIT : this.mode = this.OBLIQ, this.es > 0) { var t; - switch (this.qp = pi(this.e, 1), this.mmf = 0.5 / (1 - this.es), this.apa = hM(this.es), this.mode) { + switch (this.qp = wi(this.e, 1), this.mmf = 0.5 / (1 - this.es), this.apa = B3(this.es), this.mode) { case this.N_POLE: this.dd = 1; break; @@ -20612,26 +20857,26 @@ function tM() { this.rq = Math.sqrt(0.5 * this.qp), this.dd = 1 / this.rq, this.xmf = 1, this.ymf = 0.5 * this.qp; break; case this.OBLIQ: - this.rq = Math.sqrt(0.5 * this.qp), t = Math.sin(this.lat0), this.sinb1 = pi(this.e, t) / this.qp, this.cosb1 = Math.sqrt(1 - this.sinb1 * this.sinb1), this.dd = Math.cos(this.lat0) / (Math.sqrt(1 - this.es * t * t) * this.rq * this.cosb1), this.ymf = (this.xmf = this.rq) / this.dd, this.xmf *= this.dd; + this.rq = Math.sqrt(0.5 * this.qp), t = Math.sin(this.lat0), this.sinb1 = wi(this.e, t) / this.qp, this.cosb1 = Math.sqrt(1 - this.sinb1 * this.sinb1), this.dd = Math.cos(this.lat0) / (Math.sqrt(1 - this.es * t * t) * this.rq * this.cosb1), this.ymf = (this.xmf = this.rq) / this.dd, this.xmf *= this.dd; break; } } else this.mode === this.OBLIQ && (this.sinph0 = Math.sin(this.lat0), this.cosph0 = Math.cos(this.lat0)); } -function eM(i) { +function P3(i) { var t, e, n, s, r, o, a, l, h, c, u = i.x, d = i.y; if (u = P(u - this.long0), this.sphere) { if (r = Math.sin(d), c = Math.cos(d), n = Math.cos(u), this.mode === this.OBLIQ || this.mode === this.EQUIT) { - if (e = this.mode === this.EQUIT ? 1 + c * n : 1 + this.sinph0 * r + this.cosph0 * c * n, e <= I) + if (e = this.mode === this.EQUIT ? 1 + c * n : 1 + this.sinph0 * r + this.cosph0 * c * n, e <= T) return null; e = Math.sqrt(2 / e), t = e * c * Math.sin(u), e *= this.mode === this.EQUIT ? r : this.cosph0 * r - this.sinph0 * c * n; } else if (this.mode === this.N_POLE || this.mode === this.S_POLE) { - if (this.mode === this.N_POLE && (n = -n), Math.abs(d + this.lat0) < I) + if (this.mode === this.N_POLE && (n = -n), Math.abs(d + this.lat0) < T) return null; - e = ht - d * 0.5, e = 2 * (this.mode === this.S_POLE ? Math.cos(e) : Math.sin(e)), t = e * Math.sin(u), e *= n; + e = lt - d * 0.5, e = 2 * (this.mode === this.S_POLE ? Math.cos(e) : Math.sin(e)), t = e * Math.sin(u), e *= n; } } else { - switch (a = 0, l = 0, h = 0, n = Math.cos(u), s = Math.sin(u), r = Math.sin(d), o = pi(this.e, r), (this.mode === this.OBLIQ || this.mode === this.EQUIT) && (a = o / this.qp, l = Math.sqrt(1 - a * a)), this.mode) { + switch (a = 0, l = 0, h = 0, n = Math.cos(u), s = Math.sin(u), r = Math.sin(d), o = wi(this.e, r), (this.mode === this.OBLIQ || this.mode === this.EQUIT) && (a = o / this.qp, l = Math.sqrt(1 - a * a)), this.mode) { case this.OBLIQ: h = 1 + this.sinb1 * a + this.cosb1 * l * n; break; @@ -20645,7 +20890,7 @@ function eM(i) { h = d - S, o = this.qp + o; break; } - if (Math.abs(h) < I) + if (Math.abs(h) < T) return null; switch (this.mode) { case this.OBLIQ: @@ -20660,7 +20905,7 @@ function eM(i) { } return i.x = this.a * t + this.x0, i.y = this.a * e + this.y0, i; } -function iM(i) { +function O3(i) { i.x -= this.x0, i.y -= this.y0; var t = i.x / this.a, e = i.y / this.a, n, s, r, o, a, l, h; if (this.sphere) { @@ -20669,10 +20914,10 @@ function iM(i) { return null; switch (s = 2 * Math.asin(s), (this.mode === this.OBLIQ || this.mode === this.EQUIT) && (d = Math.sin(s), c = Math.cos(s)), this.mode) { case this.EQUIT: - s = Math.abs(u) <= I ? 0 : Math.asin(e * d / u), t *= d, e = c * u; + s = Math.abs(u) <= T ? 0 : Math.asin(e * d / u), t *= d, e = c * u; break; case this.OBLIQ: - s = Math.abs(u) <= I ? this.lat0 : Math.asin(c * this.sinph0 + e * d * this.cosph0 / u), t *= d * this.cosph0, e = (c - Math.sin(s) * this.sinph0) * u; + s = Math.abs(u) <= T ? this.lat0 : Math.asin(c * this.sinph0 + e * d * this.cosph0 / u), t *= d * this.cosph0, e = (c - Math.sin(s) * this.sinph0) * u; break; case this.N_POLE: e = -e, s = S - s; @@ -20684,7 +20929,7 @@ function iM(i) { n = e === 0 && (this.mode === this.EQUIT || this.mode === this.OBLIQ) ? 0 : Math.atan2(t, e); } else { if (h = 0, this.mode === this.OBLIQ || this.mode === this.EQUIT) { - if (t /= this.dd, e *= this.dd, l = Math.sqrt(t * t + e * e), l < I) + if (t /= this.dd, e *= this.dd, l = Math.sqrt(t * t + e * e), l < T) return i.x = this.long0, i.y = this.lat0, i; o = 2 * Math.asin(0.5 * l / this.rq), r = Math.cos(o), t *= o = Math.sin(o), this.mode === this.OBLIQ ? (h = r * this.sinb1 + e * o * this.cosb1 / l, a = this.qp * h, e = l * this.cosb1 * r - e * this.sinb1 * o) : (h = e * o / l, a = this.qp * h, e = l * r); } else if (this.mode === this.N_POLE || this.mode === this.S_POLE) { @@ -20692,82 +20937,82 @@ function iM(i) { return i.x = this.long0, i.y = this.lat0, i; h = 1 - a / this.qp, this.mode === this.S_POLE && (h = -h); } - n = Math.atan2(t, e), s = cM(Math.asin(h), this.apa); + n = Math.atan2(t, e), s = z3(Math.asin(h), this.apa); } return i.x = P(this.long0 + n), i.y = s, i; } -var nM = 0.3333333333333333, sM = 0.17222222222222222, rM = 0.10257936507936508, oM = 0.06388888888888888, aM = 0.0664021164021164, lM = 0.016415012942191543; -function hM(i) { +var N3 = 0.3333333333333333, F3 = 0.17222222222222222, D3 = 0.10257936507936508, k3 = 0.06388888888888888, G3 = 0.0664021164021164, $3 = 0.016415012942191543; +function B3(i) { var t, e = []; - return e[0] = i * nM, t = i * i, e[0] += t * sM, e[1] = t * oM, t *= i, e[0] += t * rM, e[1] += t * aM, e[2] = t * lM, e; + return e[0] = i * N3, t = i * i, e[0] += t * F3, e[1] = t * k3, t *= i, e[0] += t * D3, e[1] += t * G3, e[2] = t * $3, e; } -function cM(i, t) { +function z3(i, t) { var e = i + i; return i + t[0] * Math.sin(e) + t[1] * Math.sin(e + e) + t[2] * Math.sin(e + e + e); } -var uM = ["Lambert Azimuthal Equal Area", "Lambert_Azimuthal_Equal_Area", "laea"]; -const dM = { - init: tM, - forward: eM, - inverse: iM, - names: uM, - S_POLE: K3, - N_POLE: q3, - EQUIT: J3, - OBLIQ: Q3 +var Z3 = ["Lambert Azimuthal Equal Area", "Lambert_Azimuthal_Equal_Area", "laea"]; +const U3 = { + init: A3, + forward: P3, + inverse: O3, + names: Z3, + S_POLE: b3, + N_POLE: L3, + EQUIT: T3, + OBLIQ: I3 }; -function wi(i) { +function Ai(i) { return Math.abs(i) > 1 && (i = i > 1 ? 1 : -1), Math.asin(i); } -function fM() { - Math.abs(this.lat1 + this.lat2) < I || (this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e3 = Math.sqrt(this.es), this.sin_po = Math.sin(this.lat1), this.cos_po = Math.cos(this.lat1), this.t1 = this.sin_po, this.con = this.sin_po, this.ms1 = De(this.e3, this.sin_po, this.cos_po), this.qs1 = pi(this.e3, this.sin_po, this.cos_po), this.sin_po = Math.sin(this.lat2), this.cos_po = Math.cos(this.lat2), this.t2 = this.sin_po, this.ms2 = De(this.e3, this.sin_po, this.cos_po), this.qs2 = pi(this.e3, this.sin_po, this.cos_po), this.sin_po = Math.sin(this.lat0), this.cos_po = Math.cos(this.lat0), this.t3 = this.sin_po, this.qs0 = pi(this.e3, this.sin_po, this.cos_po), Math.abs(this.lat1 - this.lat2) > I ? this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1) : this.ns0 = this.con, this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1, this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0); +function V3() { + Math.abs(this.lat1 + this.lat2) < T || (this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e3 = Math.sqrt(this.es), this.sin_po = Math.sin(this.lat1), this.cos_po = Math.cos(this.lat1), this.t1 = this.sin_po, this.con = this.sin_po, this.ms1 = $e(this.e3, this.sin_po, this.cos_po), this.qs1 = wi(this.e3, this.sin_po, this.cos_po), this.sin_po = Math.sin(this.lat2), this.cos_po = Math.cos(this.lat2), this.t2 = this.sin_po, this.ms2 = $e(this.e3, this.sin_po, this.cos_po), this.qs2 = wi(this.e3, this.sin_po, this.cos_po), this.sin_po = Math.sin(this.lat0), this.cos_po = Math.cos(this.lat0), this.t3 = this.sin_po, this.qs0 = wi(this.e3, this.sin_po, this.cos_po), Math.abs(this.lat1 - this.lat2) > T ? this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1) : this.ns0 = this.con, this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1, this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0); } -function gM(i) { +function W3(i) { var t = i.x, e = i.y; this.sin_phi = Math.sin(e), this.cos_phi = Math.cos(e); - var n = pi(this.e3, this.sin_phi, this.cos_phi), s = this.a * Math.sqrt(this.c - this.ns0 * n) / this.ns0, r = this.ns0 * P(t - this.long0), o = s * Math.sin(r) + this.x0, a = this.rh - s * Math.cos(r) + this.y0; + var n = wi(this.e3, this.sin_phi, this.cos_phi), s = this.a * Math.sqrt(this.c - this.ns0 * n) / this.ns0, r = this.ns0 * P(t - this.long0), o = s * Math.sin(r) + this.x0, a = this.rh - s * Math.cos(r) + this.y0; return i.x = o, i.y = a, i; } -function mM(i) { +function H3(i) { var t, e, n, s, r, o; return i.x -= this.x0, i.y = this.rh - i.y + this.y0, this.ns0 >= 0 ? (t = Math.sqrt(i.x * i.x + i.y * i.y), n = 1) : (t = -Math.sqrt(i.x * i.x + i.y * i.y), n = -1), s = 0, t !== 0 && (s = Math.atan2(n * i.x, n * i.y)), n = t * this.ns0 / this.a, this.sphere ? o = Math.asin((this.c - n * n) / (2 * this.ns0)) : (e = (this.c - n * n) / this.ns0, o = this.phi1z(this.e3, e)), r = P(s / this.ns0 + this.long0), i.x = r, i.y = o, i; } -function _M(i, t) { - var e, n, s, r, o, a = wi(0.5 * t); - if (i < I) +function X3(i, t) { + var e, n, s, r, o, a = Ai(0.5 * t); + if (i < T) return a; for (var l = i * i, h = 1; h <= 25; h++) if (e = Math.sin(a), n = Math.cos(a), s = i * e, r = 1 - s * s, o = 0.5 * r * r / n * (t / (1 - l) - e / r + 0.5 / i * Math.log((1 - s) / (1 + s))), a = a + o, Math.abs(o) <= 1e-7) return a; return null; } -var pM = ["Albers_Conic_Equal_Area", "Albers", "aea"]; -const yM = { - init: fM, - forward: gM, - inverse: mM, - names: pM, - phi1z: _M +var Y3 = ["Albers_Conic_Equal_Area", "Albers", "aea"]; +const j3 = { + init: V3, + forward: W3, + inverse: H3, + names: Y3, + phi1z: X3 }; -function vM() { +function K3() { this.sin_p14 = Math.sin(this.lat0), this.cos_p14 = Math.cos(this.lat0), this.infinity_dist = 1e3 * this.a, this.rc = 1; } -function xM(i) { +function q3(i) { var t, e, n, s, r, o, a, l, h = i.x, c = i.y; - return n = P(h - this.long0), t = Math.sin(c), e = Math.cos(c), s = Math.cos(n), o = this.sin_p14 * t + this.cos_p14 * e * s, r = 1, o > 0 || Math.abs(o) <= I ? (a = this.x0 + this.a * r * e * Math.sin(n) / o, l = this.y0 + this.a * r * (this.cos_p14 * t - this.sin_p14 * e * s) / o) : (a = this.x0 + this.infinity_dist * e * Math.sin(n), l = this.y0 + this.infinity_dist * (this.cos_p14 * t - this.sin_p14 * e * s)), i.x = a, i.y = l, i; + return n = P(h - this.long0), t = Math.sin(c), e = Math.cos(c), s = Math.cos(n), o = this.sin_p14 * t + this.cos_p14 * e * s, r = 1, o > 0 || Math.abs(o) <= T ? (a = this.x0 + this.a * r * e * Math.sin(n) / o, l = this.y0 + this.a * r * (this.cos_p14 * t - this.sin_p14 * e * s) / o) : (a = this.x0 + this.infinity_dist * e * Math.sin(n), l = this.y0 + this.infinity_dist * (this.cos_p14 * t - this.sin_p14 * e * s)), i.x = a, i.y = l, i; } -function MM(i) { +function J3(i) { var t, e, n, s, r, o; - return i.x = (i.x - this.x0) / this.a, i.y = (i.y - this.y0) / this.a, i.x /= this.k0, i.y /= this.k0, (t = Math.sqrt(i.x * i.x + i.y * i.y)) ? (s = Math.atan2(t, this.rc), e = Math.sin(s), n = Math.cos(s), o = wi(n * this.sin_p14 + i.y * e * this.cos_p14 / t), r = Math.atan2(i.x * e, t * this.cos_p14 * n - i.y * this.sin_p14 * e), r = P(this.long0 + r)) : (o = this.phic0, r = 0), i.x = r, i.y = o, i; -} -var CM = ["gnom"]; -const EM = { - init: vM, - forward: xM, - inverse: MM, - names: CM + return i.x = (i.x - this.x0) / this.a, i.y = (i.y - this.y0) / this.a, i.x /= this.k0, i.y /= this.k0, (t = Math.sqrt(i.x * i.x + i.y * i.y)) ? (s = Math.atan2(t, this.rc), e = Math.sin(s), n = Math.cos(s), o = Ai(n * this.sin_p14 + i.y * e * this.cos_p14 / t), r = Math.atan2(i.x * e, t * this.cos_p14 * n - i.y * this.sin_p14 * e), r = P(this.long0 + r)) : (o = this.phic0, r = 0), i.x = r, i.y = o, i; +} +var Q3 = ["gnom"]; +const tC = { + init: K3, + forward: q3, + inverse: J3, + names: Q3 }; -function wM(i, t) { +function eC(i, t) { var e = 1 - (1 - i * i) / (2 * i) * Math.log((1 - i) / (1 + i)); if (Math.abs(Math.abs(t) - e) < 1e-6) return t < 0 ? -1 * S : S; @@ -20776,87 +21021,87 @@ function wM(i, t) { return n; return NaN; } -function SM() { - this.sphere || (this.k0 = De(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts))); +function iC() { + this.sphere || (this.k0 = $e(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts))); } -function RM(i) { +function nC(i) { var t = i.x, e = i.y, n, s, r = P(t - this.long0); if (this.sphere) n = this.x0 + this.a * r * Math.cos(this.lat_ts), s = this.y0 + this.a * Math.sin(e) / Math.cos(this.lat_ts); else { - var o = pi(this.e, Math.sin(e)); + var o = wi(this.e, Math.sin(e)); n = this.x0 + this.a * this.k0 * r, s = this.y0 + this.a * o * 0.5 / this.k0; } return i.x = n, i.y = s, i; } -function bM(i) { +function sC(i) { i.x -= this.x0, i.y -= this.y0; var t, e; - return this.sphere ? (t = P(this.long0 + i.x / this.a / Math.cos(this.lat_ts)), e = Math.asin(i.y / this.a * Math.cos(this.lat_ts))) : (e = wM(this.e, 2 * i.y * this.k0 / this.a), t = P(this.long0 + i.x / (this.a * this.k0))), i.x = t, i.y = e, i; -} -var LM = ["cea"]; -const TM = { - init: SM, - forward: RM, - inverse: bM, - names: LM + return this.sphere ? (t = P(this.long0 + i.x / this.a / Math.cos(this.lat_ts)), e = Math.asin(i.y / this.a * Math.cos(this.lat_ts))) : (e = eC(this.e, 2 * i.y * this.k0 / this.a), t = P(this.long0 + i.x / (this.a * this.k0))), i.x = t, i.y = e, i; +} +var rC = ["cea"]; +const oC = { + init: iC, + forward: nC, + inverse: sC, + names: rC }; -function IM() { +function aC() { this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.lat_ts = this.lat_ts || 0, this.title = this.title || "Equidistant Cylindrical (Plate Carre)", this.rc = Math.cos(this.lat_ts); } -function AM(i) { - var t = i.x, e = i.y, n = P(t - this.long0), s = Xn(e - this.lat0); +function lC(i) { + var t = i.x, e = i.y, n = P(t - this.long0), s = ns(e - this.lat0); return i.x = this.x0 + this.a * n * this.rc, i.y = this.y0 + this.a * s, i; } -function PM(i) { +function hC(i) { var t = i.x, e = i.y; - return i.x = P(this.long0 + (t - this.x0) / (this.a * this.rc)), i.y = Xn(this.lat0 + (e - this.y0) / this.a), i; -} -var OM = ["Equirectangular", "Equidistant_Cylindrical", "eqc"]; -const NM = { - init: IM, - forward: AM, - inverse: PM, - names: OM + return i.x = P(this.long0 + (t - this.x0) / (this.a * this.rc)), i.y = ns(this.lat0 + (e - this.y0) / this.a), i; +} +var cC = ["Equirectangular", "Equidistant_Cylindrical", "eqc"]; +const uC = { + init: aC, + forward: lC, + inverse: hC, + names: cC }; -var eu = 20; -function FM() { - this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = qs(this.es), this.e1 = Js(this.es), this.e2 = Qs(this.es), this.e3 = tr(this.es), this.ml0 = this.a * Wt(this.e0, this.e1, this.e2, this.e3, this.lat0); +var iu = 20; +function dC() { + this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = er(this.es), this.e1 = ir(this.es), this.e2 = nr(this.es), this.e3 = sr(this.es), this.ml0 = this.a * jt(this.e0, this.e1, this.e2, this.e3, this.lat0); } -function DM(i) { +function fC(i) { var t = i.x, e = i.y, n, s, r, o = P(t - this.long0); if (r = o * Math.sin(e), this.sphere) - Math.abs(e) <= I ? (n = this.a * o, s = -1 * this.a * this.lat0) : (n = this.a * Math.sin(r) / Math.tan(e), s = this.a * (Xn(e - this.lat0) + (1 - Math.cos(r)) / Math.tan(e))); - else if (Math.abs(e) <= I) + Math.abs(e) <= T ? (n = this.a * o, s = -1 * this.a * this.lat0) : (n = this.a * Math.sin(r) / Math.tan(e), s = this.a * (ns(e - this.lat0) + (1 - Math.cos(r)) / Math.tan(e))); + else if (Math.abs(e) <= T) n = this.a * o, s = -1 * this.ml0; else { - var a = $n(this.a, this.e, Math.sin(e)) / Math.tan(e); - n = a * Math.sin(r), s = this.a * Wt(this.e0, this.e1, this.e2, this.e3, e) - this.ml0 + a * (1 - Math.cos(r)); + var a = Yn(this.a, this.e, Math.sin(e)) / Math.tan(e); + n = a * Math.sin(r), s = this.a * jt(this.e0, this.e1, this.e2, this.e3, e) - this.ml0 + a * (1 - Math.cos(r)); } return i.x = n + this.x0, i.y = s + this.y0, i; } -function kM(i) { +function gC(i) { var t, e, n, s, r, o, a, l, h; if (n = i.x - this.x0, s = i.y - this.y0, this.sphere) - if (Math.abs(s + this.a * this.lat0) <= I) + if (Math.abs(s + this.a * this.lat0) <= T) t = P(n / this.a + this.long0), e = 0; else { o = this.lat0 + s / this.a, a = n * n / this.a / this.a + o * o, l = o; var c; - for (r = eu; r; --r) - if (c = Math.tan(l), h = -1 * (o * (l * c + 1) - l - 0.5 * (l * l + a) * c) / ((l - o) / c - 1), l += h, Math.abs(h) <= I) { + for (r = iu; r; --r) + if (c = Math.tan(l), h = -1 * (o * (l * c + 1) - l - 0.5 * (l * l + a) * c) / ((l - o) / c - 1), l += h, Math.abs(h) <= T) { e = l; break; } t = P(this.long0 + Math.asin(n * Math.tan(l) / this.a) / Math.sin(e)); } - else if (Math.abs(s + this.ml0) <= I) + else if (Math.abs(s + this.ml0) <= T) e = 0, t = P(this.long0 + n / this.a); else { o = (this.ml0 + s) / this.a, a = n * n / this.a / this.a + o * o, l = o; var u, d, f, g, m; - for (r = eu; r; --r) - if (m = this.e * Math.sin(l), u = Math.sqrt(1 - m * m) * Math.tan(l), d = this.a * Wt(this.e0, this.e1, this.e2, this.e3, l), f = this.e0 - 2 * this.e1 * Math.cos(2 * l) + 4 * this.e2 * Math.cos(4 * l) - 6 * this.e3 * Math.cos(6 * l), g = d / this.a, h = (o * (u * g + 1) - g - 0.5 * u * (g * g + a)) / (this.es * Math.sin(2 * l) * (g * g + a - 2 * o * g) / (4 * u) + (o - g) * (u * f - 2 / Math.sin(2 * l)) - f), l -= h, Math.abs(h) <= I) { + for (r = iu; r; --r) + if (m = this.e * Math.sin(l), u = Math.sqrt(1 - m * m) * Math.tan(l), d = this.a * jt(this.e0, this.e1, this.e2, this.e3, l), f = this.e0 - 2 * this.e1 * Math.cos(2 * l) + 4 * this.e2 * Math.cos(4 * l) - 6 * this.e3 * Math.cos(6 * l), g = d / this.a, h = (o * (u * g + 1) - g - 0.5 * u * (g * g + a)) / (this.es * Math.sin(2 * l) * (g * g + a - 2 * o * g) / (4 * u) + (o - g) * (u * f - 2 / Math.sin(2 * l)) - f), l -= h, Math.abs(h) <= T) { e = l; break; } @@ -20864,117 +21109,117 @@ function kM(i) { } return i.x = t, i.y = e, i; } -var GM = ["Polyconic", "poly"]; -const $M = { - init: FM, - forward: DM, - inverse: kM, - names: GM +var mC = ["Polyconic", "poly"]; +const pC = { + init: dC, + forward: fC, + inverse: gC, + names: mC }; -function BM() { +function _C() { this.A = [], this.A[1] = 0.6399175073, this.A[2] = -0.1358797613, this.A[3] = 0.063294409, this.A[4] = -0.02526853, this.A[5] = 0.0117879, this.A[6] = -55161e-7, this.A[7] = 26906e-7, this.A[8] = -1333e-6, this.A[9] = 67e-5, this.A[10] = -34e-5, this.B_re = [], this.B_im = [], this.B_re[1] = 0.7557853228, this.B_im[1] = 0, this.B_re[2] = 0.249204646, this.B_im[2] = 3371507e-9, this.B_re[3] = -1541739e-9, this.B_im[3] = 0.04105856, this.B_re[4] = -0.10162907, this.B_im[4] = 0.01727609, this.B_re[5] = -0.26623489, this.B_im[5] = -0.36249218, this.B_re[6] = -0.6870983, this.B_im[6] = -1.1651967, this.C_re = [], this.C_im = [], this.C_re[1] = 1.3231270439, this.C_im[1] = 0, this.C_re[2] = -0.577245789, this.C_im[2] = -7809598e-9, this.C_re[3] = 0.508307513, this.C_im[3] = -0.112208952, this.C_re[4] = -0.15094762, this.C_im[4] = 0.18200602, this.C_re[5] = 1.01418179, this.C_im[5] = 1.64497696, this.C_re[6] = 1.9660549, this.C_im[6] = 2.5127645, this.D = [], this.D[1] = 1.5627014243, this.D[2] = 0.5185406398, this.D[3] = -0.03333098, this.D[4] = -0.1052906, this.D[5] = -0.0368594, this.D[6] = 7317e-6, this.D[7] = 0.0122, this.D[8] = 394e-5, this.D[9] = -13e-4; } -function zM(i) { - var t, e = i.x, n = i.y, s = n - this.lat0, r = e - this.long0, o = s / fs * 1e-5, a = r, l = 1, h = 0; +function yC(i) { + var t, e = i.x, n = i.y, s = n - this.lat0, r = e - this.long0, o = s / Ms * 1e-5, a = r, l = 1, h = 0; for (t = 1; t <= 10; t++) l = l * o, h = h + this.A[t] * l; - var c = h, u = a, d = 1, f = 0, g, m, _ = 0, y = 0; + var c = h, u = a, d = 1, f = 0, g, m, p = 0, _ = 0; for (t = 1; t <= 6; t++) - g = d * c - f * u, m = f * c + d * u, d = g, f = m, _ = _ + this.B_re[t] * d - this.B_im[t] * f, y = y + this.B_im[t] * d + this.B_re[t] * f; - return i.x = y * this.a + this.x0, i.y = _ * this.a + this.y0, i; + g = d * c - f * u, m = f * c + d * u, d = g, f = m, p = p + this.B_re[t] * d - this.B_im[t] * f, _ = _ + this.B_im[t] * d + this.B_re[t] * f; + return i.x = _ * this.a + this.x0, i.y = p * this.a + this.y0, i; } -function ZM(i) { +function vC(i) { var t, e = i.x, n = i.y, s = e - this.x0, r = n - this.y0, o = r / this.a, a = s / this.a, l = 1, h = 0, c, u, d = 0, f = 0; for (t = 1; t <= 6; t++) c = l * o - h * a, u = h * o + l * a, l = c, h = u, d = d + this.C_re[t] * l - this.C_im[t] * h, f = f + this.C_im[t] * l + this.C_re[t] * h; for (var g = 0; g < this.iterations; g++) { - var m = d, _ = f, y, p, v = o, x = a; + var m = d, p = f, _, y, v = o, x = a; for (t = 2; t <= 6; t++) - y = m * d - _ * f, p = _ * d + m * f, m = y, _ = p, v = v + (t - 1) * (this.B_re[t] * m - this.B_im[t] * _), x = x + (t - 1) * (this.B_im[t] * m + this.B_re[t] * _); - m = 1, _ = 0; - var M = this.B_re[1], E = this.B_im[1]; + _ = m * d - p * f, y = p * d + m * f, m = _, p = y, v = v + (t - 1) * (this.B_re[t] * m - this.B_im[t] * p), x = x + (t - 1) * (this.B_im[t] * m + this.B_re[t] * p); + m = 1, p = 0; + var C = this.B_re[1], E = this.B_im[1]; for (t = 2; t <= 6; t++) - y = m * d - _ * f, p = _ * d + m * f, m = y, _ = p, M = M + t * (this.B_re[t] * m - this.B_im[t] * _), E = E + t * (this.B_im[t] * m + this.B_re[t] * _); - var R = M * M + E * E; - d = (v * M + x * E) / R, f = (x * M - v * E) / R; + _ = m * d - p * f, y = p * d + m * f, m = _, p = y, C = C + t * (this.B_re[t] * m - this.B_im[t] * p), E = E + t * (this.B_im[t] * m + this.B_re[t] * p); + var w = C * C + E * E; + d = (v * C + x * E) / w, f = (x * C - v * E) / w; } - var L = d, N = f, G = 1, U = 0; + var R = d, A = f, k = 1, Z = 0; for (t = 1; t <= 9; t++) - G = G * L, U = U + this.D[t] * G; - var T = this.lat0 + U * fs * 1e5, $ = this.long0 + N; - return i.x = $, i.y = T, i; -} -var UM = ["New_Zealand_Map_Grid", "nzmg"]; -const VM = { - init: BM, - forward: zM, - inverse: ZM, - names: UM + k = k * R, Z = Z + this.D[t] * k; + var L = this.lat0 + Z * Ms * 1e5, G = this.long0 + A; + return i.x = G, i.y = L, i; +} +var xC = ["New_Zealand_Map_Grid", "nzmg"]; +const CC = { + init: _C, + forward: yC, + inverse: vC, + names: xC }; -function WM() { +function MC() { } -function HM(i) { +function EC(i) { var t = i.x, e = i.y, n = P(t - this.long0), s = this.x0 + this.a * n, r = this.y0 + this.a * Math.log(Math.tan(Math.PI / 4 + e / 2.5)) * 1.25; return i.x = s, i.y = r, i; } -function XM(i) { +function wC(i) { i.x -= this.x0, i.y -= this.y0; var t = P(this.long0 + i.x / this.a), e = 2.5 * (Math.atan(Math.exp(0.8 * i.y / this.a)) - Math.PI / 4); return i.x = t, i.y = e, i; } -var YM = ["Miller_Cylindrical", "mill"]; -const jM = { - init: WM, - forward: HM, - inverse: XM, - names: YM +var SC = ["Miller_Cylindrical", "mill"]; +const RC = { + init: MC, + forward: EC, + inverse: wC, + names: SC }; -var KM = 20; -function qM() { - this.sphere ? (this.n = 1, this.m = 0, this.es = 0, this.C_y = Math.sqrt((this.m + 1) / this.n), this.C_x = this.C_y / (this.m + 1)) : this.en = Af(this.es); +var bC = 20; +function LC() { + this.sphere ? (this.n = 1, this.m = 0, this.es = 0, this.C_y = Math.sqrt((this.m + 1) / this.n), this.C_x = this.C_y / (this.m + 1)) : this.en = bf(this.es); } -function JM(i) { +function TC(i) { var t, e, n = i.x, s = i.y; if (n = P(n - this.long0), this.sphere) { if (!this.m) s = this.n !== 1 ? Math.asin(this.n * Math.sin(s)) : s; else - for (var r = this.n * Math.sin(s), o = KM; o; --o) { + for (var r = this.n * Math.sin(s), o = bC; o; --o) { var a = (this.m * s + Math.sin(s) - r) / (this.m + Math.cos(s)); - if (s -= a, Math.abs(a) < I) + if (s -= a, Math.abs(a) < T) break; } t = this.a * this.C_x * n * (this.m + Math.cos(s)), e = this.a * this.C_y * s; } else { var l = Math.sin(s), h = Math.cos(s); - e = this.a * Ro(s, l, h, this.en), t = this.a * n * h / Math.sqrt(1 - this.es * l * l); + e = this.a * Oo(s, l, h, this.en), t = this.a * n * h / Math.sqrt(1 - this.es * l * l); } return i.x = t, i.y = e, i; } -function QM(i) { +function IC(i) { var t, e, n, s; - return i.x -= this.x0, n = i.x / this.a, i.y -= this.y0, t = i.y / this.a, this.sphere ? (t /= this.C_y, n = n / (this.C_x * (this.m + Math.cos(t))), this.m ? t = wi((this.m * t + Math.sin(t)) / this.n) : this.n !== 1 && (t = wi(Math.sin(t) / this.n)), n = P(n + this.long0), t = Xn(t)) : (t = Pf(i.y / this.a, this.es, this.en), s = Math.abs(t), s < S ? (s = Math.sin(t), e = this.long0 + i.x * Math.sqrt(1 - this.es * s * s) / (this.a * Math.cos(t)), n = P(e)) : s - I < S && (n = this.long0)), i.x = n, i.y = t, i; -} -var tC = ["Sinusoidal", "sinu"]; -const eC = { - init: qM, - forward: JM, - inverse: QM, - names: tC + return i.x -= this.x0, n = i.x / this.a, i.y -= this.y0, t = i.y / this.a, this.sphere ? (t /= this.C_y, n = n / (this.C_x * (this.m + Math.cos(t))), this.m ? t = Ai((this.m * t + Math.sin(t)) / this.n) : this.n !== 1 && (t = Ai(Math.sin(t) / this.n)), n = P(n + this.long0), t = ns(t)) : (t = Lf(i.y / this.a, this.es, this.en), s = Math.abs(t), s < S ? (s = Math.sin(t), e = this.long0 + i.x * Math.sqrt(1 - this.es * s * s) / (this.a * Math.cos(t)), n = P(e)) : s - T < S && (n = this.long0)), i.x = n, i.y = t, i; +} +var AC = ["Sinusoidal", "sinu"]; +const PC = { + init: LC, + forward: TC, + inverse: IC, + names: AC }; -function iC() { +function OC() { } -function nC(i) { +function NC(i) { for (var t = i.x, e = i.y, n = P(t - this.long0), s = e, r = Math.PI * Math.sin(e); ; ) { var o = -(s + Math.sin(s) - r) / (1 + Math.cos(s)); - if (s += o, Math.abs(o) < I) + if (s += o, Math.abs(o) < T) break; } - s /= 2, Math.PI / 2 - Math.abs(e) < I && (n = 0); + s /= 2, Math.PI / 2 - Math.abs(e) < T && (n = 0); var a = 0.900316316158 * this.a * n * Math.cos(s) + this.x0, l = 1.4142135623731 * this.a * Math.sin(s) + this.y0; return i.x = a, i.y = l, i; } -function sC(i) { +function FC(i) { var t, e; i.x -= this.x0, i.y -= this.y0, e = i.y / (1.4142135623731 * this.a), Math.abs(e) > 0.999999999999 && (e = 0.999999999999), t = Math.asin(e); var n = P(this.long0 + i.x / (0.900316316158 * this.a * Math.cos(t))); @@ -20982,165 +21227,165 @@ function sC(i) { var s = Math.asin(e); return i.x = n, i.y = s, i; } -var rC = ["Mollweide", "moll"]; -const oC = { - init: iC, - forward: nC, - inverse: sC, - names: rC +var DC = ["Mollweide", "moll"]; +const kC = { + init: OC, + forward: NC, + inverse: FC, + names: DC }; -function aC() { - Math.abs(this.lat1 + this.lat2) < I || (this.lat2 = this.lat2 || this.lat1, this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = qs(this.es), this.e1 = Js(this.es), this.e2 = Qs(this.es), this.e3 = tr(this.es), this.sinphi = Math.sin(this.lat1), this.cosphi = Math.cos(this.lat1), this.ms1 = De(this.e, this.sinphi, this.cosphi), this.ml1 = Wt(this.e0, this.e1, this.e2, this.e3, this.lat1), Math.abs(this.lat1 - this.lat2) < I ? this.ns = this.sinphi : (this.sinphi = Math.sin(this.lat2), this.cosphi = Math.cos(this.lat2), this.ms2 = De(this.e, this.sinphi, this.cosphi), this.ml2 = Wt(this.e0, this.e1, this.e2, this.e3, this.lat2), this.ns = (this.ms1 - this.ms2) / (this.ml2 - this.ml1)), this.g = this.ml1 + this.ms1 / this.ns, this.ml0 = Wt(this.e0, this.e1, this.e2, this.e3, this.lat0), this.rh = this.a * (this.g - this.ml0)); +function GC() { + Math.abs(this.lat1 + this.lat2) < T || (this.lat2 = this.lat2 || this.lat1, this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = er(this.es), this.e1 = ir(this.es), this.e2 = nr(this.es), this.e3 = sr(this.es), this.sinphi = Math.sin(this.lat1), this.cosphi = Math.cos(this.lat1), this.ms1 = $e(this.e, this.sinphi, this.cosphi), this.ml1 = jt(this.e0, this.e1, this.e2, this.e3, this.lat1), Math.abs(this.lat1 - this.lat2) < T ? this.ns = this.sinphi : (this.sinphi = Math.sin(this.lat2), this.cosphi = Math.cos(this.lat2), this.ms2 = $e(this.e, this.sinphi, this.cosphi), this.ml2 = jt(this.e0, this.e1, this.e2, this.e3, this.lat2), this.ns = (this.ms1 - this.ms2) / (this.ml2 - this.ml1)), this.g = this.ml1 + this.ms1 / this.ns, this.ml0 = jt(this.e0, this.e1, this.e2, this.e3, this.lat0), this.rh = this.a * (this.g - this.ml0)); } -function lC(i) { +function $C(i) { var t = i.x, e = i.y, n; if (this.sphere) n = this.a * (this.g - e); else { - var s = Wt(this.e0, this.e1, this.e2, this.e3, e); + var s = jt(this.e0, this.e1, this.e2, this.e3, e); n = this.a * (this.g - s); } var r = this.ns * P(t - this.long0), o = this.x0 + n * Math.sin(r), a = this.y0 + this.rh - n * Math.cos(r); return i.x = o, i.y = a, i; } -function hC(i) { +function BC(i) { i.x -= this.x0, i.y = this.rh - i.y + this.y0; var t, e, n, s; this.ns >= 0 ? (e = Math.sqrt(i.x * i.x + i.y * i.y), t = 1) : (e = -Math.sqrt(i.x * i.x + i.y * i.y), t = -1); var r = 0; if (e !== 0 && (r = Math.atan2(t * i.x, t * i.y)), this.sphere) - return s = P(this.long0 + r / this.ns), n = Xn(this.g - e / this.a), i.x = s, i.y = n, i; + return s = P(this.long0 + r / this.ns), n = ns(this.g - e / this.a), i.x = s, i.y = n, i; var o = this.g - e / this.a; - return n = to(o, this.e0, this.e1, this.e2, this.e3), s = P(this.long0 + r / this.ns), i.x = s, i.y = n, i; -} -var cC = ["Equidistant_Conic", "eqdc"]; -const uC = { - init: aC, - forward: lC, - inverse: hC, - names: cC + return n = oo(o, this.e0, this.e1, this.e2, this.e3), s = P(this.long0 + r / this.ns), i.x = s, i.y = n, i; +} +var zC = ["Equidistant_Conic", "eqdc"]; +const ZC = { + init: GC, + forward: $C, + inverse: BC, + names: zC }; -function dC() { +function UC() { this.R = this.a; } -function fC(i) { +function VC(i) { var t = i.x, e = i.y, n = P(t - this.long0), s, r; - Math.abs(e) <= I && (s = this.x0 + this.R * n, r = this.y0); - var o = wi(2 * Math.abs(e / Math.PI)); - (Math.abs(n) <= I || Math.abs(Math.abs(e) - S) <= I) && (s = this.x0, e >= 0 ? r = this.y0 + Math.PI * this.R * Math.tan(0.5 * o) : r = this.y0 + Math.PI * this.R * -Math.tan(0.5 * o)); + Math.abs(e) <= T && (s = this.x0 + this.R * n, r = this.y0); + var o = Ai(2 * Math.abs(e / Math.PI)); + (Math.abs(n) <= T || Math.abs(Math.abs(e) - S) <= T) && (s = this.x0, e >= 0 ? r = this.y0 + Math.PI * this.R * Math.tan(0.5 * o) : r = this.y0 + Math.PI * this.R * -Math.tan(0.5 * o)); var a = 0.5 * Math.abs(Math.PI / n - n / Math.PI), l = a * a, h = Math.sin(o), c = Math.cos(o), u = c / (h + c - 1), d = u * u, f = u * (2 / h - 1), g = f * f, m = Math.PI * this.R * (a * (u - g) + Math.sqrt(l * (u - g) * (u - g) - (g + l) * (d - g))) / (g + l); n < 0 && (m = -m), s = this.x0 + m; - var _ = l + u; - return m = Math.PI * this.R * (f * _ - a * Math.sqrt((g + l) * (l + 1) - _ * _)) / (g + l), e >= 0 ? r = this.y0 + m : r = this.y0 - m, i.x = s, i.y = r, i; + var p = l + u; + return m = Math.PI * this.R * (f * p - a * Math.sqrt((g + l) * (l + 1) - p * p)) / (g + l), e >= 0 ? r = this.y0 + m : r = this.y0 - m, i.x = s, i.y = r, i; } -function gC(i) { +function WC(i) { var t, e, n, s, r, o, a, l, h, c, u, d, f; - return i.x -= this.x0, i.y -= this.y0, u = Math.PI * this.R, n = i.x / u, s = i.y / u, r = n * n + s * s, o = -Math.abs(s) * (1 + r), a = o - 2 * s * s + n * n, l = -2 * o + 1 + 2 * s * s + r * r, f = s * s / l + (2 * a * a * a / l / l / l - 9 * o * a / l / l) / 27, h = (o - a * a / 3 / l) / l, c = 2 * Math.sqrt(-h / 3), u = 3 * f / h / c, Math.abs(u) > 1 && (u >= 0 ? u = 1 : u = -1), d = Math.acos(u) / 3, i.y >= 0 ? e = (-c * Math.cos(d + Math.PI / 3) - a / 3 / l) * Math.PI : e = -(-c * Math.cos(d + Math.PI / 3) - a / 3 / l) * Math.PI, Math.abs(n) < I ? t = this.long0 : t = P(this.long0 + Math.PI * (r - 1 + Math.sqrt(1 + 2 * (n * n - s * s) + r * r)) / 2 / n), i.x = t, i.y = e, i; -} -var mC = ["Van_der_Grinten_I", "VanDerGrinten", "vandg"]; -const _C = { - init: dC, - forward: fC, - inverse: gC, - names: mC + return i.x -= this.x0, i.y -= this.y0, u = Math.PI * this.R, n = i.x / u, s = i.y / u, r = n * n + s * s, o = -Math.abs(s) * (1 + r), a = o - 2 * s * s + n * n, l = -2 * o + 1 + 2 * s * s + r * r, f = s * s / l + (2 * a * a * a / l / l / l - 9 * o * a / l / l) / 27, h = (o - a * a / 3 / l) / l, c = 2 * Math.sqrt(-h / 3), u = 3 * f / h / c, Math.abs(u) > 1 && (u >= 0 ? u = 1 : u = -1), d = Math.acos(u) / 3, i.y >= 0 ? e = (-c * Math.cos(d + Math.PI / 3) - a / 3 / l) * Math.PI : e = -(-c * Math.cos(d + Math.PI / 3) - a / 3 / l) * Math.PI, Math.abs(n) < T ? t = this.long0 : t = P(this.long0 + Math.PI * (r - 1 + Math.sqrt(1 + 2 * (n * n - s * s) + r * r)) / 2 / n), i.x = t, i.y = e, i; +} +var HC = ["Van_der_Grinten_I", "VanDerGrinten", "vandg"]; +const XC = { + init: UC, + forward: VC, + inverse: WC, + names: HC }; -function pC() { +function YC() { this.sin_p12 = Math.sin(this.lat0), this.cos_p12 = Math.cos(this.lat0); } -function yC(i) { - var t = i.x, e = i.y, n = Math.sin(i.y), s = Math.cos(i.y), r = P(t - this.long0), o, a, l, h, c, u, d, f, g, m, _, y, p, v, x, M, E, R, L, N, G, U, T; - return this.sphere ? Math.abs(this.sin_p12 - 1) <= I ? (i.x = this.x0 + this.a * (S - e) * Math.sin(r), i.y = this.y0 - this.a * (S - e) * Math.cos(r), i) : Math.abs(this.sin_p12 + 1) <= I ? (i.x = this.x0 + this.a * (S + e) * Math.sin(r), i.y = this.y0 + this.a * (S + e) * Math.cos(r), i) : (R = this.sin_p12 * n + this.cos_p12 * s * Math.cos(r), M = Math.acos(R), E = M ? M / Math.sin(M) : 1, i.x = this.x0 + this.a * E * s * Math.sin(r), i.y = this.y0 + this.a * E * (this.cos_p12 * n - this.sin_p12 * s * Math.cos(r)), i) : (o = qs(this.es), a = Js(this.es), l = Qs(this.es), h = tr(this.es), Math.abs(this.sin_p12 - 1) <= I ? (c = this.a * Wt(o, a, l, h, S), u = this.a * Wt(o, a, l, h, e), i.x = this.x0 + (c - u) * Math.sin(r), i.y = this.y0 - (c - u) * Math.cos(r), i) : Math.abs(this.sin_p12 + 1) <= I ? (c = this.a * Wt(o, a, l, h, S), u = this.a * Wt(o, a, l, h, e), i.x = this.x0 + (c + u) * Math.sin(r), i.y = this.y0 + (c + u) * Math.cos(r), i) : (d = n / s, f = $n(this.a, this.e, this.sin_p12), g = $n(this.a, this.e, n), m = Math.atan((1 - this.es) * d + this.es * f * this.sin_p12 / (g * s)), _ = Math.atan2(Math.sin(r), this.cos_p12 * Math.tan(m) - this.sin_p12 * Math.cos(r)), _ === 0 ? L = Math.asin(this.cos_p12 * Math.sin(m) - this.sin_p12 * Math.cos(m)) : Math.abs(Math.abs(_) - Math.PI) <= I ? L = -Math.asin(this.cos_p12 * Math.sin(m) - this.sin_p12 * Math.cos(m)) : L = Math.asin(Math.sin(r) * Math.cos(m) / Math.sin(_)), y = this.e * this.sin_p12 / Math.sqrt(1 - this.es), p = this.e * this.cos_p12 * Math.cos(_) / Math.sqrt(1 - this.es), v = y * p, x = p * p, N = L * L, G = N * L, U = G * L, T = U * L, M = f * L * (1 - N * x * (1 - x) / 6 + G / 8 * v * (1 - 2 * x) + U / 120 * (x * (4 - 7 * x) - 3 * y * y * (1 - 7 * x)) - T / 48 * v), i.x = this.x0 + M * Math.sin(_), i.y = this.y0 + M * Math.cos(_), i)); +function jC(i) { + var t = i.x, e = i.y, n = Math.sin(i.y), s = Math.cos(i.y), r = P(t - this.long0), o, a, l, h, c, u, d, f, g, m, p, _, y, v, x, C, E, w, R, A, k, Z, L; + return this.sphere ? Math.abs(this.sin_p12 - 1) <= T ? (i.x = this.x0 + this.a * (S - e) * Math.sin(r), i.y = this.y0 - this.a * (S - e) * Math.cos(r), i) : Math.abs(this.sin_p12 + 1) <= T ? (i.x = this.x0 + this.a * (S + e) * Math.sin(r), i.y = this.y0 + this.a * (S + e) * Math.cos(r), i) : (w = this.sin_p12 * n + this.cos_p12 * s * Math.cos(r), C = Math.acos(w), E = C ? C / Math.sin(C) : 1, i.x = this.x0 + this.a * E * s * Math.sin(r), i.y = this.y0 + this.a * E * (this.cos_p12 * n - this.sin_p12 * s * Math.cos(r)), i) : (o = er(this.es), a = ir(this.es), l = nr(this.es), h = sr(this.es), Math.abs(this.sin_p12 - 1) <= T ? (c = this.a * jt(o, a, l, h, S), u = this.a * jt(o, a, l, h, e), i.x = this.x0 + (c - u) * Math.sin(r), i.y = this.y0 - (c - u) * Math.cos(r), i) : Math.abs(this.sin_p12 + 1) <= T ? (c = this.a * jt(o, a, l, h, S), u = this.a * jt(o, a, l, h, e), i.x = this.x0 + (c + u) * Math.sin(r), i.y = this.y0 + (c + u) * Math.cos(r), i) : (d = n / s, f = Yn(this.a, this.e, this.sin_p12), g = Yn(this.a, this.e, n), m = Math.atan((1 - this.es) * d + this.es * f * this.sin_p12 / (g * s)), p = Math.atan2(Math.sin(r), this.cos_p12 * Math.tan(m) - this.sin_p12 * Math.cos(r)), p === 0 ? R = Math.asin(this.cos_p12 * Math.sin(m) - this.sin_p12 * Math.cos(m)) : Math.abs(Math.abs(p) - Math.PI) <= T ? R = -Math.asin(this.cos_p12 * Math.sin(m) - this.sin_p12 * Math.cos(m)) : R = Math.asin(Math.sin(r) * Math.cos(m) / Math.sin(p)), _ = this.e * this.sin_p12 / Math.sqrt(1 - this.es), y = this.e * this.cos_p12 * Math.cos(p) / Math.sqrt(1 - this.es), v = _ * y, x = y * y, A = R * R, k = A * R, Z = k * R, L = Z * R, C = f * R * (1 - A * x * (1 - x) / 6 + k / 8 * v * (1 - 2 * x) + Z / 120 * (x * (4 - 7 * x) - 3 * _ * _ * (1 - 7 * x)) - L / 48 * v), i.x = this.x0 + C * Math.sin(p), i.y = this.y0 + C * Math.cos(p), i)); } -function vC(i) { +function KC(i) { i.x -= this.x0, i.y -= this.y0; - var t, e, n, s, r, o, a, l, h, c, u, d, f, g, m, _, y, p, v, x, M, E, R, L; - return this.sphere ? (t = Math.sqrt(i.x * i.x + i.y * i.y), t > 2 * S * this.a ? void 0 : (e = t / this.a, n = Math.sin(e), s = Math.cos(e), r = this.long0, Math.abs(t) <= I ? o = this.lat0 : (o = wi(s * this.sin_p12 + i.y * n * this.cos_p12 / t), a = Math.abs(this.lat0) - S, Math.abs(a) <= I ? this.lat0 >= 0 ? r = P(this.long0 + Math.atan2(i.x, -i.y)) : r = P(this.long0 - Math.atan2(-i.x, i.y)) : r = P(this.long0 + Math.atan2(i.x * n, t * this.cos_p12 * s - i.y * this.sin_p12 * n))), i.x = r, i.y = o, i)) : (l = qs(this.es), h = Js(this.es), c = Qs(this.es), u = tr(this.es), Math.abs(this.sin_p12 - 1) <= I ? (d = this.a * Wt(l, h, c, u, S), t = Math.sqrt(i.x * i.x + i.y * i.y), f = d - t, o = to(f / this.a, l, h, c, u), r = P(this.long0 + Math.atan2(i.x, -1 * i.y)), i.x = r, i.y = o, i) : Math.abs(this.sin_p12 + 1) <= I ? (d = this.a * Wt(l, h, c, u, S), t = Math.sqrt(i.x * i.x + i.y * i.y), f = t - d, o = to(f / this.a, l, h, c, u), r = P(this.long0 + Math.atan2(i.x, i.y)), i.x = r, i.y = o, i) : (t = Math.sqrt(i.x * i.x + i.y * i.y), _ = Math.atan2(i.x, i.y), g = $n(this.a, this.e, this.sin_p12), y = Math.cos(_), p = this.e * this.cos_p12 * y, v = -p * p / (1 - this.es), x = 3 * this.es * (1 - v) * this.sin_p12 * this.cos_p12 * y / (1 - this.es), M = t / g, E = M - v * (1 + v) * Math.pow(M, 3) / 6 - x * (1 + 3 * v) * Math.pow(M, 4) / 24, R = 1 - v * E * E / 2 - M * E * E * E / 6, m = Math.asin(this.sin_p12 * Math.cos(E) + this.cos_p12 * Math.sin(E) * y), r = P(this.long0 + Math.asin(Math.sin(_) * Math.sin(E) / Math.cos(m))), L = Math.sin(m), o = Math.atan2((L - this.es * R * this.sin_p12) * Math.tan(m), L * (1 - this.es)), i.x = r, i.y = o, i)); -} -var xC = ["Azimuthal_Equidistant", "aeqd"]; -const MC = { - init: pC, - forward: yC, - inverse: vC, - names: xC + var t, e, n, s, r, o, a, l, h, c, u, d, f, g, m, p, _, y, v, x, C, E, w, R; + return this.sphere ? (t = Math.sqrt(i.x * i.x + i.y * i.y), t > 2 * S * this.a ? void 0 : (e = t / this.a, n = Math.sin(e), s = Math.cos(e), r = this.long0, Math.abs(t) <= T ? o = this.lat0 : (o = Ai(s * this.sin_p12 + i.y * n * this.cos_p12 / t), a = Math.abs(this.lat0) - S, Math.abs(a) <= T ? this.lat0 >= 0 ? r = P(this.long0 + Math.atan2(i.x, -i.y)) : r = P(this.long0 - Math.atan2(-i.x, i.y)) : r = P(this.long0 + Math.atan2(i.x * n, t * this.cos_p12 * s - i.y * this.sin_p12 * n))), i.x = r, i.y = o, i)) : (l = er(this.es), h = ir(this.es), c = nr(this.es), u = sr(this.es), Math.abs(this.sin_p12 - 1) <= T ? (d = this.a * jt(l, h, c, u, S), t = Math.sqrt(i.x * i.x + i.y * i.y), f = d - t, o = oo(f / this.a, l, h, c, u), r = P(this.long0 + Math.atan2(i.x, -1 * i.y)), i.x = r, i.y = o, i) : Math.abs(this.sin_p12 + 1) <= T ? (d = this.a * jt(l, h, c, u, S), t = Math.sqrt(i.x * i.x + i.y * i.y), f = t - d, o = oo(f / this.a, l, h, c, u), r = P(this.long0 + Math.atan2(i.x, i.y)), i.x = r, i.y = o, i) : (t = Math.sqrt(i.x * i.x + i.y * i.y), p = Math.atan2(i.x, i.y), g = Yn(this.a, this.e, this.sin_p12), _ = Math.cos(p), y = this.e * this.cos_p12 * _, v = -y * y / (1 - this.es), x = 3 * this.es * (1 - v) * this.sin_p12 * this.cos_p12 * _ / (1 - this.es), C = t / g, E = C - v * (1 + v) * Math.pow(C, 3) / 6 - x * (1 + 3 * v) * Math.pow(C, 4) / 24, w = 1 - v * E * E / 2 - C * E * E * E / 6, m = Math.asin(this.sin_p12 * Math.cos(E) + this.cos_p12 * Math.sin(E) * _), r = P(this.long0 + Math.asin(Math.sin(p) * Math.sin(E) / Math.cos(m))), R = Math.sin(m), o = Math.atan2((R - this.es * w * this.sin_p12) * Math.tan(m), R * (1 - this.es)), i.x = r, i.y = o, i)); +} +var qC = ["Azimuthal_Equidistant", "aeqd"]; +const JC = { + init: YC, + forward: jC, + inverse: KC, + names: qC }; -function CC() { +function QC() { this.sin_p14 = Math.sin(this.lat0), this.cos_p14 = Math.cos(this.lat0); } -function EC(i) { +function tM(i) { var t, e, n, s, r, o, a, l, h = i.x, c = i.y; - return n = P(h - this.long0), t = Math.sin(c), e = Math.cos(c), s = Math.cos(n), o = this.sin_p14 * t + this.cos_p14 * e * s, r = 1, (o > 0 || Math.abs(o) <= I) && (a = this.a * r * e * Math.sin(n), l = this.y0 + this.a * r * (this.cos_p14 * t - this.sin_p14 * e * s)), i.x = a, i.y = l, i; + return n = P(h - this.long0), t = Math.sin(c), e = Math.cos(c), s = Math.cos(n), o = this.sin_p14 * t + this.cos_p14 * e * s, r = 1, (o > 0 || Math.abs(o) <= T) && (a = this.a * r * e * Math.sin(n), l = this.y0 + this.a * r * (this.cos_p14 * t - this.sin_p14 * e * s)), i.x = a, i.y = l, i; } -function wC(i) { +function eM(i) { var t, e, n, s, r, o, a; - return i.x -= this.x0, i.y -= this.y0, t = Math.sqrt(i.x * i.x + i.y * i.y), e = wi(t / this.a), n = Math.sin(e), s = Math.cos(e), o = this.long0, Math.abs(t) <= I ? (a = this.lat0, i.x = o, i.y = a, i) : (a = wi(s * this.sin_p14 + i.y * n * this.cos_p14 / t), r = Math.abs(this.lat0) - S, Math.abs(r) <= I ? (this.lat0 >= 0 ? o = P(this.long0 + Math.atan2(i.x, -i.y)) : o = P(this.long0 - Math.atan2(-i.x, i.y)), i.x = o, i.y = a, i) : (o = P(this.long0 + Math.atan2(i.x * n, t * this.cos_p14 * s - i.y * this.sin_p14 * n)), i.x = o, i.y = a, i)); -} -var SC = ["ortho"]; -const RC = { - init: CC, - forward: EC, - inverse: wC, - names: SC + return i.x -= this.x0, i.y -= this.y0, t = Math.sqrt(i.x * i.x + i.y * i.y), e = Ai(t / this.a), n = Math.sin(e), s = Math.cos(e), o = this.long0, Math.abs(t) <= T ? (a = this.lat0, i.x = o, i.y = a, i) : (a = Ai(s * this.sin_p14 + i.y * n * this.cos_p14 / t), r = Math.abs(this.lat0) - S, Math.abs(r) <= T ? (this.lat0 >= 0 ? o = P(this.long0 + Math.atan2(i.x, -i.y)) : o = P(this.long0 - Math.atan2(-i.x, i.y)), i.x = o, i.y = a, i) : (o = P(this.long0 + Math.atan2(i.x * n, t * this.cos_p14 * s - i.y * this.sin_p14 * n)), i.x = o, i.y = a, i)); +} +var iM = ["ortho"]; +const nM = { + init: QC, + forward: tM, + inverse: eM, + names: iM }; -var vt = { +var xt = { FRONT: 1, RIGHT: 2, BACK: 3, LEFT: 4, TOP: 5, BOTTOM: 6 -}, ct = { +}, ht = { AREA_0: 1, AREA_1: 2, AREA_2: 3, AREA_3: 4 }; -function bC() { - this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.lat_ts = this.lat_ts || 0, this.title = this.title || "Quadrilateralized Spherical Cube", this.lat0 >= S - ht / 2 ? this.face = vt.TOP : this.lat0 <= -(S - ht / 2) ? this.face = vt.BOTTOM : Math.abs(this.long0) <= ht ? this.face = vt.FRONT : Math.abs(this.long0) <= S + ht ? this.face = this.long0 > 0 ? vt.RIGHT : vt.LEFT : this.face = vt.BACK, this.es !== 0 && (this.one_minus_f = 1 - (this.a - this.b) / this.a, this.one_minus_f_squared = this.one_minus_f * this.one_minus_f); +function sM() { + this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.lat_ts = this.lat_ts || 0, this.title = this.title || "Quadrilateralized Spherical Cube", this.lat0 >= S - lt / 2 ? this.face = xt.TOP : this.lat0 <= -(S - lt / 2) ? this.face = xt.BOTTOM : Math.abs(this.long0) <= lt ? this.face = xt.FRONT : Math.abs(this.long0) <= S + lt ? this.face = this.long0 > 0 ? xt.RIGHT : xt.LEFT : this.face = xt.BACK, this.es !== 0 && (this.one_minus_f = 1 - (this.a - this.b) / this.a, this.one_minus_f_squared = this.one_minus_f * this.one_minus_f); } -function LC(i) { +function rM(i) { var t = { x: 0, y: 0 }, e, n, s, r, o, a, l = { value: 0 }; - if (i.x -= this.long0, this.es !== 0 ? e = Math.atan(this.one_minus_f_squared * Math.tan(i.y)) : e = i.y, n = i.x, this.face === vt.TOP) - r = S - e, n >= ht && n <= S + ht ? (l.value = ct.AREA_0, s = n - S) : n > S + ht || n <= -(S + ht) ? (l.value = ct.AREA_1, s = n > 0 ? n - Rt : n + Rt) : n > -(S + ht) && n <= -ht ? (l.value = ct.AREA_2, s = n + S) : (l.value = ct.AREA_3, s = n); - else if (this.face === vt.BOTTOM) - r = S + e, n >= ht && n <= S + ht ? (l.value = ct.AREA_0, s = -n + S) : n < ht && n >= -ht ? (l.value = ct.AREA_1, s = -n) : n < -ht && n >= -(S + ht) ? (l.value = ct.AREA_2, s = -n - S) : (l.value = ct.AREA_3, s = n > 0 ? -n + Rt : -n - Rt); + if (i.x -= this.long0, this.es !== 0 ? e = Math.atan(this.one_minus_f_squared * Math.tan(i.y)) : e = i.y, n = i.x, this.face === xt.TOP) + r = S - e, n >= lt && n <= S + lt ? (l.value = ht.AREA_0, s = n - S) : n > S + lt || n <= -(S + lt) ? (l.value = ht.AREA_1, s = n > 0 ? n - Rt : n + Rt) : n > -(S + lt) && n <= -lt ? (l.value = ht.AREA_2, s = n + S) : (l.value = ht.AREA_3, s = n); + else if (this.face === xt.BOTTOM) + r = S + e, n >= lt && n <= S + lt ? (l.value = ht.AREA_0, s = -n + S) : n < lt && n >= -lt ? (l.value = ht.AREA_1, s = -n) : n < -lt && n >= -(S + lt) ? (l.value = ht.AREA_2, s = -n - S) : (l.value = ht.AREA_3, s = n > 0 ? -n + Rt : -n - Rt); else { var h, c, u, d, f, g, m; - this.face === vt.RIGHT ? n = bn(n, +S) : this.face === vt.BACK ? n = bn(n, +Rt) : this.face === vt.LEFT && (n = bn(n, -S)), d = Math.sin(e), f = Math.cos(e), g = Math.sin(n), m = Math.cos(n), h = f * m, c = f * g, u = d, this.face === vt.FRONT ? (r = Math.acos(h), s = Sr(r, u, c, l)) : this.face === vt.RIGHT ? (r = Math.acos(c), s = Sr(r, u, -h, l)) : this.face === vt.BACK ? (r = Math.acos(-h), s = Sr(r, u, -c, l)) : this.face === vt.LEFT ? (r = Math.acos(-c), s = Sr(r, u, h, l)) : (r = s = 0, l.value = ct.AREA_0); + this.face === xt.RIGHT ? n = Nn(n, +S) : this.face === xt.BACK ? n = Nn(n, +Rt) : this.face === xt.LEFT && (n = Nn(n, -S)), d = Math.sin(e), f = Math.cos(e), g = Math.sin(n), m = Math.cos(n), h = f * m, c = f * g, u = d, this.face === xt.FRONT ? (r = Math.acos(h), s = Tr(r, u, c, l)) : this.face === xt.RIGHT ? (r = Math.acos(c), s = Tr(r, u, -h, l)) : this.face === xt.BACK ? (r = Math.acos(-h), s = Tr(r, u, -c, l)) : this.face === xt.LEFT ? (r = Math.acos(-c), s = Tr(r, u, h, l)) : (r = s = 0, l.value = ht.AREA_0); } - return a = Math.atan(12 / Rt * (s + Math.acos(Math.sin(s) * Math.cos(ht)) - S)), o = Math.sqrt((1 - Math.cos(r)) / (Math.cos(a) * Math.cos(a)) / (1 - Math.cos(Math.atan(1 / Math.cos(s))))), l.value === ct.AREA_1 ? a += S : l.value === ct.AREA_2 ? a += Rt : l.value === ct.AREA_3 && (a += 1.5 * Rt), t.x = o * Math.cos(a), t.y = o * Math.sin(a), t.x = t.x * this.a + this.x0, t.y = t.y * this.a + this.y0, i.x = t.x, i.y = t.y, i; + return a = Math.atan(12 / Rt * (s + Math.acos(Math.sin(s) * Math.cos(lt)) - S)), o = Math.sqrt((1 - Math.cos(r)) / (Math.cos(a) * Math.cos(a)) / (1 - Math.cos(Math.atan(1 / Math.cos(s))))), l.value === ht.AREA_1 ? a += S : l.value === ht.AREA_2 ? a += Rt : l.value === ht.AREA_3 && (a += 1.5 * Rt), t.x = o * Math.cos(a), t.y = o * Math.sin(a), t.x = t.x * this.a + this.x0, t.y = t.y * this.a + this.y0, i.x = t.x, i.y = t.y, i; } -function TC(i) { +function oM(i) { var t = { lam: 0, phi: 0 }, e, n, s, r, o, a, l, h, c, u = { value: 0 }; - if (i.x = (i.x - this.x0) / this.a, i.y = (i.y - this.y0) / this.a, n = Math.atan(Math.sqrt(i.x * i.x + i.y * i.y)), e = Math.atan2(i.y, i.x), i.x >= 0 && i.x >= Math.abs(i.y) ? u.value = ct.AREA_0 : i.y >= 0 && i.y >= Math.abs(i.x) ? (u.value = ct.AREA_1, e -= S) : i.x < 0 && -i.x >= Math.abs(i.y) ? (u.value = ct.AREA_2, e = e < 0 ? e + Rt : e - Rt) : (u.value = ct.AREA_3, e += S), c = Rt / 12 * Math.tan(e), o = Math.sin(c) / (Math.cos(c) - 1 / Math.sqrt(2)), a = Math.atan(o), s = Math.cos(e), r = Math.tan(n), l = 1 - s * s * r * r * (1 - Math.cos(Math.atan(1 / Math.cos(a)))), l < -1 ? l = -1 : l > 1 && (l = 1), this.face === vt.TOP) - h = Math.acos(l), t.phi = S - h, u.value === ct.AREA_0 ? t.lam = a + S : u.value === ct.AREA_1 ? t.lam = a < 0 ? a + Rt : a - Rt : u.value === ct.AREA_2 ? t.lam = a - S : t.lam = a; - else if (this.face === vt.BOTTOM) - h = Math.acos(l), t.phi = h - S, u.value === ct.AREA_0 ? t.lam = -a + S : u.value === ct.AREA_1 ? t.lam = -a : u.value === ct.AREA_2 ? t.lam = -a - S : t.lam = a < 0 ? -a - Rt : -a + Rt; + if (i.x = (i.x - this.x0) / this.a, i.y = (i.y - this.y0) / this.a, n = Math.atan(Math.sqrt(i.x * i.x + i.y * i.y)), e = Math.atan2(i.y, i.x), i.x >= 0 && i.x >= Math.abs(i.y) ? u.value = ht.AREA_0 : i.y >= 0 && i.y >= Math.abs(i.x) ? (u.value = ht.AREA_1, e -= S) : i.x < 0 && -i.x >= Math.abs(i.y) ? (u.value = ht.AREA_2, e = e < 0 ? e + Rt : e - Rt) : (u.value = ht.AREA_3, e += S), c = Rt / 12 * Math.tan(e), o = Math.sin(c) / (Math.cos(c) - 1 / Math.sqrt(2)), a = Math.atan(o), s = Math.cos(e), r = Math.tan(n), l = 1 - s * s * r * r * (1 - Math.cos(Math.atan(1 / Math.cos(a)))), l < -1 ? l = -1 : l > 1 && (l = 1), this.face === xt.TOP) + h = Math.acos(l), t.phi = S - h, u.value === ht.AREA_0 ? t.lam = a + S : u.value === ht.AREA_1 ? t.lam = a < 0 ? a + Rt : a - Rt : u.value === ht.AREA_2 ? t.lam = a - S : t.lam = a; + else if (this.face === xt.BOTTOM) + h = Math.acos(l), t.phi = h - S, u.value === ht.AREA_0 ? t.lam = -a + S : u.value === ht.AREA_1 ? t.lam = -a : u.value === ht.AREA_2 ? t.lam = -a - S : t.lam = a < 0 ? -a - Rt : -a + Rt; else { var d, f, g; - d = l, c = d * d, c >= 1 ? g = 0 : g = Math.sqrt(1 - c) * Math.sin(a), c += g * g, c >= 1 ? f = 0 : f = Math.sqrt(1 - c), u.value === ct.AREA_1 ? (c = f, f = -g, g = c) : u.value === ct.AREA_2 ? (f = -f, g = -g) : u.value === ct.AREA_3 && (c = f, f = g, g = -c), this.face === vt.RIGHT ? (c = d, d = -f, f = c) : this.face === vt.BACK ? (d = -d, f = -f) : this.face === vt.LEFT && (c = d, d = f, f = -c), t.phi = Math.acos(-g) - S, t.lam = Math.atan2(f, d), this.face === vt.RIGHT ? t.lam = bn(t.lam, -S) : this.face === vt.BACK ? t.lam = bn(t.lam, -Rt) : this.face === vt.LEFT && (t.lam = bn(t.lam, +S)); + d = l, c = d * d, c >= 1 ? g = 0 : g = Math.sqrt(1 - c) * Math.sin(a), c += g * g, c >= 1 ? f = 0 : f = Math.sqrt(1 - c), u.value === ht.AREA_1 ? (c = f, f = -g, g = c) : u.value === ht.AREA_2 ? (f = -f, g = -g) : u.value === ht.AREA_3 && (c = f, f = g, g = -c), this.face === xt.RIGHT ? (c = d, d = -f, f = c) : this.face === xt.BACK ? (d = -d, f = -f) : this.face === xt.LEFT && (c = d, d = f, f = -c), t.phi = Math.acos(-g) - S, t.lam = Math.atan2(f, d), this.face === xt.RIGHT ? t.lam = Nn(t.lam, -S) : this.face === xt.BACK ? t.lam = Nn(t.lam, -Rt) : this.face === xt.LEFT && (t.lam = Nn(t.lam, +S)); } if (this.es !== 0) { - var m, _, y; - m = t.phi < 0 ? 1 : 0, _ = Math.tan(t.phi), y = this.b / Math.sqrt(_ * _ + this.one_minus_f_squared), t.phi = Math.atan(Math.sqrt(this.a * this.a - y * y) / (this.one_minus_f * y)), m && (t.phi = -t.phi); + var m, p, _; + m = t.phi < 0 ? 1 : 0, p = Math.tan(t.phi), _ = this.b / Math.sqrt(p * p + this.one_minus_f_squared), t.phi = Math.atan(Math.sqrt(this.a * this.a - _ * _) / (this.one_minus_f * _)), m && (t.phi = -t.phi); } return t.lam += this.long0, i.x = t.lam, i.y = t.phi, i; } -function Sr(i, t, e, n) { +function Tr(i, t, e, n) { var s; - return i < I ? (n.value = ct.AREA_0, s = 0) : (s = Math.atan2(t, e), Math.abs(s) <= ht ? n.value = ct.AREA_0 : s > ht && s <= S + ht ? (n.value = ct.AREA_1, s -= S) : s > S + ht || s <= -(S + ht) ? (n.value = ct.AREA_2, s = s >= 0 ? s - Rt : s + Rt) : (n.value = ct.AREA_3, s += S)), s; + return i < T ? (n.value = ht.AREA_0, s = 0) : (s = Math.atan2(t, e), Math.abs(s) <= lt ? n.value = ht.AREA_0 : s > lt && s <= S + lt ? (n.value = ht.AREA_1, s -= S) : s > S + lt || s <= -(S + lt) ? (n.value = ht.AREA_2, s = s >= 0 ? s - Rt : s + Rt) : (n.value = ht.AREA_3, s += S)), s; } -function bn(i, t) { +function Nn(i, t) { var e = i + t; - return e < -Rt ? e += As : e > +Rt && (e -= As), e; -} -var IC = ["Quadrilateralized Spherical Cube", "Quadrilateralized_Spherical_Cube", "qsc"]; -const AC = { - init: bC, - forward: LC, - inverse: TC, - names: IC + return e < -Rt ? e += $s : e > +Rt && (e -= $s), e; +} +var aM = ["Quadrilateralized Spherical Cube", "Quadrilateralized_Spherical_Cube", "qsc"]; +const lM = { + init: sM, + forward: rM, + inverse: oM, + names: aM }; -var za = [ +var Wa = [ [1, 22199e-21, -715515e-10, 31103e-10], [0.9986, -482243e-9, -24897e-9, -13309e-10], [0.9954, -83103e-8, -448605e-10, -986701e-12], @@ -21160,7 +21405,7 @@ var za = [ [0.6213, -0.010418, 883923e-10, 624051e-11], [0.5722, -906601e-8, 182e-6, 624051e-11], [0.5322, -677797e-8, 275608e-9, 624051e-11] -], ls = [ +], _s = [ [-520417e-23, 0.0124, 121431e-23, -845284e-16], [0.062, 0.0124, -126793e-14, 422642e-15], [0.124, 0.0124, 507171e-14, -160604e-14], @@ -21180,12 +21425,12 @@ var za = [ [0.9394, 840947e-8, -192841e-9, -42106e-10], [0.9761, 616527e-8, -256e-6, -42106e-10], [1, 328947e-8, -319159e-9, -42106e-10] -], Ff = 0.8487, Df = 1.3523, kf = Ae / 5, PC = 1 / kf, En = 18, eo = function(i, t) { +], Af = 0.8487, Pf = 1.3523, Of = Fe / 5, hM = 1 / Of, In = 18, ao = function(i, t) { return i[0] + t * (i[1] + t * (i[2] + t * i[3])); -}, OC = function(i, t) { +}, cM = function(i, t) { return i[1] + t * (2 * i[2] + t * 3 * i[3]); }; -function NC(i, t, e, n) { +function uM(i, t, e, n) { for (var s = t; n; --n) { var r = i(s); if (s -= r, Math.abs(r) < e) @@ -21193,148 +21438,148 @@ function NC(i, t, e, n) { } return s; } -function FC() { +function dM() { this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.long0 = this.long0 || 0, this.es = 0, this.title = this.title || "Robinson"; } -function DC(i) { - var t = P(i.x - this.long0), e = Math.abs(i.y), n = Math.floor(e * kf); - n < 0 ? n = 0 : n >= En && (n = En - 1), e = Ae * (e - PC * n); +function fM(i) { + var t = P(i.x - this.long0), e = Math.abs(i.y), n = Math.floor(e * Of); + n < 0 ? n = 0 : n >= In && (n = In - 1), e = Fe * (e - hM * n); var s = { - x: eo(za[n], e) * t, - y: eo(ls[n], e) + x: ao(Wa[n], e) * t, + y: ao(_s[n], e) }; - return i.y < 0 && (s.y = -s.y), s.x = s.x * this.a * Ff + this.x0, s.y = s.y * this.a * Df + this.y0, s; + return i.y < 0 && (s.y = -s.y), s.x = s.x * this.a * Af + this.x0, s.y = s.y * this.a * Pf + this.y0, s; } -function kC(i) { +function gM(i) { var t = { - x: (i.x - this.x0) / (this.a * Ff), - y: Math.abs(i.y - this.y0) / (this.a * Df) + x: (i.x - this.x0) / (this.a * Af), + y: Math.abs(i.y - this.y0) / (this.a * Pf) }; if (t.y >= 1) - t.x /= za[En][0], t.y = i.y < 0 ? -S : S; + t.x /= Wa[In][0], t.y = i.y < 0 ? -S : S; else { - var e = Math.floor(t.y * En); - for (e < 0 ? e = 0 : e >= En && (e = En - 1); ; ) - if (ls[e][0] > t.y) + var e = Math.floor(t.y * In); + for (e < 0 ? e = 0 : e >= In && (e = In - 1); ; ) + if (_s[e][0] > t.y) --e; - else if (ls[e + 1][0] <= t.y) + else if (_s[e + 1][0] <= t.y) ++e; else break; - var n = ls[e], s = 5 * (t.y - n[0]) / (ls[e + 1][0] - n[0]); - s = NC(function(r) { - return (eo(n, r) - t.y) / OC(n, r); - }, s, I, 100), t.x /= eo(za[e], s), t.y = (5 * e + s) * $t, i.y < 0 && (t.y = -t.y); + var n = _s[e], s = 5 * (t.y - n[0]) / (_s[e + 1][0] - n[0]); + s = uM(function(r) { + return (ao(n, r) - t.y) / cM(n, r); + }, s, T, 100), t.x /= ao(Wa[e], s), t.y = (5 * e + s) * Bt, i.y < 0 && (t.y = -t.y); } return t.x = P(t.x + this.long0), t; } -var GC = ["Robinson", "robin"]; -const $C = { - init: FC, - forward: DC, - inverse: kC, - names: GC +var mM = ["Robinson", "robin"]; +const pM = { + init: dM, + forward: fM, + inverse: gM, + names: mM }; -function BC() { +function _M() { this.name = "geocent"; } -function zC(i) { - var t = Cf(i, this.es, this.a); +function yM(i) { + var t = yf(i, this.es, this.a); return t; } -function ZC(i) { - var t = Ef(i, this.es, this.a, this.b); +function vM(i) { + var t = vf(i, this.es, this.a, this.b); return t; } -var UC = ["Geocentric", "geocentric", "geocent", "Geocent"]; -const VC = { - init: BC, - forward: zC, - inverse: ZC, - names: UC +var xM = ["Geocentric", "geocentric", "geocent", "Geocent"]; +const CM = { + init: _M, + forward: yM, + inverse: vM, + names: xM }; -var zt = { +var Ut = { N_POLE: 0, S_POLE: 1, EQUIT: 2, OBLIQ: 3 -}, ns = { +}, ds = { h: { def: 1e5, num: !0 }, azi: { def: 0, num: !0, degrees: !0 }, tilt: { def: 0, num: !0, degrees: !0 }, long0: { def: 0, num: !0 }, lat0: { def: 0, num: !0 } }; -function WC() { - if (Object.keys(ns).forEach(function(e) { +function MM() { + if (Object.keys(ds).forEach(function(e) { if (typeof this[e] > "u") - this[e] = ns[e].def; + this[e] = ds[e].def; else { - if (ns[e].num && isNaN(this[e])) + if (ds[e].num && isNaN(this[e])) throw new Error("Invalid parameter value, must be numeric " + e + " = " + this[e]); - ns[e].num && (this[e] = parseFloat(this[e])); + ds[e].num && (this[e] = parseFloat(this[e])); } - ns[e].degrees && (this[e] = this[e] * $t); - }.bind(this)), Math.abs(Math.abs(this.lat0) - S) < I ? this.mode = this.lat0 < 0 ? zt.S_POLE : zt.N_POLE : Math.abs(this.lat0) < I ? this.mode = zt.EQUIT : (this.mode = zt.OBLIQ, this.sinph0 = Math.sin(this.lat0), this.cosph0 = Math.cos(this.lat0)), this.pn1 = this.h / this.a, this.pn1 <= 0 || this.pn1 > 1e10) + ds[e].degrees && (this[e] = this[e] * Bt); + }.bind(this)), Math.abs(Math.abs(this.lat0) - S) < T ? this.mode = this.lat0 < 0 ? Ut.S_POLE : Ut.N_POLE : Math.abs(this.lat0) < T ? this.mode = Ut.EQUIT : (this.mode = Ut.OBLIQ, this.sinph0 = Math.sin(this.lat0), this.cosph0 = Math.cos(this.lat0)), this.pn1 = this.h / this.a, this.pn1 <= 0 || this.pn1 > 1e10) throw new Error("Invalid height"); this.p = 1 + this.pn1, this.rp = 1 / this.p, this.h1 = 1 / this.pn1, this.pfact = (this.p + 1) * this.h1, this.es = 0; var i = this.tilt, t = this.azi; this.cg = Math.cos(t), this.sg = Math.sin(t), this.cw = Math.cos(i), this.sw = Math.sin(i); } -function HC(i) { +function EM(i) { i.x -= this.long0; var t = Math.sin(i.y), e = Math.cos(i.y), n = Math.cos(i.x), s, r; switch (this.mode) { - case zt.OBLIQ: + case Ut.OBLIQ: r = this.sinph0 * t + this.cosph0 * e * n; break; - case zt.EQUIT: + case Ut.EQUIT: r = e * n; break; - case zt.S_POLE: + case Ut.S_POLE: r = -t; break; - case zt.N_POLE: + case Ut.N_POLE: r = t; break; } switch (r = this.pn1 / (this.p - r), s = r * e * Math.sin(i.x), this.mode) { - case zt.OBLIQ: + case Ut.OBLIQ: r *= this.cosph0 * t - this.sinph0 * e * n; break; - case zt.EQUIT: + case Ut.EQUIT: r *= t; break; - case zt.N_POLE: + case Ut.N_POLE: r *= -(e * n); break; - case zt.S_POLE: + case Ut.S_POLE: r *= e * n; break; } var o, a; return o = r * this.cg + s * this.sg, a = 1 / (o * this.sw * this.h1 + this.cw), s = (s * this.cg - r * this.sg) * this.cw * a, r = o * a, i.x = s * this.a, i.y = r * this.a, i; } -function XC(i) { +function wM(i) { i.x /= this.a, i.y /= this.a; var t = { x: i.x, y: i.y }, e, n, s; s = 1 / (this.pn1 - i.y * this.sw), e = this.pn1 * i.x * s, n = this.pn1 * i.y * this.cw * s, i.x = e * this.cg + n * this.sg, i.y = n * this.cg - e * this.sg; - var r = Ce(i.x, i.y); - if (Math.abs(r) < I) + var r = Se(i.x, i.y); + if (Math.abs(r) < T) t.x = 0, t.y = i.y; else { var o, a; switch (a = 1 - r * r * this.pfact, a = (this.p - Math.sqrt(a)) / (this.pn1 / r + r / this.pn1), o = Math.sqrt(1 - a * a), this.mode) { - case zt.OBLIQ: + case Ut.OBLIQ: t.y = Math.asin(o * this.sinph0 + i.y * a * this.cosph0 / r), i.y = (o - this.sinph0 * Math.sin(t.y)) * r, i.x *= a * this.cosph0; break; - case zt.EQUIT: + case Ut.EQUIT: t.y = Math.asin(i.y * a / r), i.y = o * r, i.x *= a; break; - case zt.N_POLE: + case Ut.N_POLE: t.y = Math.asin(o), i.y = -i.y; break; - case zt.S_POLE: + case Ut.S_POLE: t.y = -Math.asin(o); break; } @@ -21342,14 +21587,14 @@ function XC(i) { } return i.x = t.x + this.long0, i.y = t.y, i; } -var YC = ["Tilted_Perspective", "tpers"]; -const jC = { - init: WC, - forward: HC, - inverse: XC, - names: YC +var SM = ["Tilted_Perspective", "tpers"]; +const RM = { + init: MM, + forward: EM, + inverse: wM, + names: SM }; -function KC() { +function bM() { if (this.flip_axis = this.sweep === "x" ? 1 : 0, this.h = Number(this.h), this.radius_g_1 = this.h / this.a, this.radius_g_1 <= 0 || this.radius_g_1 > 1e10) throw new Error(); if (this.radius_g = 1 + this.radius_g_1, this.C = this.radius_g * this.radius_g - 1, this.es !== 0) { @@ -21359,22 +21604,22 @@ function KC() { this.radius_p = 1, this.radius_p2 = 1, this.radius_p_inv2 = 1, this.shape = "sphere"; this.title || (this.title = "Geostationary Satellite View"); } -function qC(i) { +function LM(i) { var t = i.x, e = i.y, n, s, r, o; if (t = t - this.long0, this.shape === "ellipse") { e = Math.atan(this.radius_p2 * Math.tan(e)); - var a = this.radius_p / Ce(this.radius_p * Math.cos(e), Math.sin(e)); + var a = this.radius_p / Se(this.radius_p * Math.cos(e), Math.sin(e)); if (s = a * Math.cos(t) * Math.cos(e), r = a * Math.sin(t) * Math.cos(e), o = a * Math.sin(e), (this.radius_g - s) * s - r * r - o * o * this.radius_p_inv2 < 0) return i.x = Number.NaN, i.y = Number.NaN, i; - n = this.radius_g - s, this.flip_axis ? (i.x = this.radius_g_1 * Math.atan(r / Ce(o, n)), i.y = this.radius_g_1 * Math.atan(o / n)) : (i.x = this.radius_g_1 * Math.atan(r / n), i.y = this.radius_g_1 * Math.atan(o / Ce(r, n))); + n = this.radius_g - s, this.flip_axis ? (i.x = this.radius_g_1 * Math.atan(r / Se(o, n)), i.y = this.radius_g_1 * Math.atan(o / n)) : (i.x = this.radius_g_1 * Math.atan(r / n), i.y = this.radius_g_1 * Math.atan(o / Se(r, n))); } else - this.shape === "sphere" && (n = Math.cos(e), s = Math.cos(t) * n, r = Math.sin(t) * n, o = Math.sin(e), n = this.radius_g - s, this.flip_axis ? (i.x = this.radius_g_1 * Math.atan(r / Ce(o, n)), i.y = this.radius_g_1 * Math.atan(o / n)) : (i.x = this.radius_g_1 * Math.atan(r / n), i.y = this.radius_g_1 * Math.atan(o / Ce(r, n)))); + this.shape === "sphere" && (n = Math.cos(e), s = Math.cos(t) * n, r = Math.sin(t) * n, o = Math.sin(e), n = this.radius_g - s, this.flip_axis ? (i.x = this.radius_g_1 * Math.atan(r / Se(o, n)), i.y = this.radius_g_1 * Math.atan(o / n)) : (i.x = this.radius_g_1 * Math.atan(r / n), i.y = this.radius_g_1 * Math.atan(o / Se(r, n)))); return i.x = i.x * this.a, i.y = i.y * this.a, i; } -function JC(i) { +function TM(i) { var t = -1, e = 0, n = 0, s, r, o, a; if (i.x = i.x / this.a, i.y = i.y / this.a, this.shape === "ellipse") { - this.flip_axis ? (n = Math.tan(i.y / this.radius_g_1), e = Math.tan(i.x / this.radius_g_1) * Ce(1, n)) : (e = Math.tan(i.x / this.radius_g_1), n = Math.tan(i.y / this.radius_g_1) * Ce(1, e)); + this.flip_axis ? (n = Math.tan(i.y / this.radius_g_1), e = Math.tan(i.x / this.radius_g_1) * Se(1, n)) : (e = Math.tan(i.x / this.radius_g_1), n = Math.tan(i.y / this.radius_g_1) * Se(1, e)); var l = n / this.radius_p; if (s = e * e + l * l + t * t, r = 2 * this.radius_g * t, o = r * r - 4 * s * this.C, o < 0) return i.x = Number.NaN, i.y = Number.NaN, i; @@ -21386,37 +21631,37 @@ function JC(i) { } return i.x = i.x + this.long0, i; } -var QC = ["Geostationary Satellite View", "Geostationary_Satellite", "geos"]; -const tE = { - init: KC, - forward: qC, - inverse: JC, - names: QC +var IM = ["Geostationary Satellite View", "Geostationary_Satellite", "geos"]; +const AM = { + init: bM, + forward: LM, + inverse: TM, + names: IM }; -function eE(i) { - i.Proj.projections.add(Tr), i.Proj.projections.add(Ir), i.Proj.projections.add(a3), i.Proj.projections.add(p3), i.Proj.projections.add(E3), i.Proj.projections.add(L3), i.Proj.projections.add(N3), i.Proj.projections.add($3), i.Proj.projections.add(V3), i.Proj.projections.add(j3), i.Proj.projections.add(dM), i.Proj.projections.add(yM), i.Proj.projections.add(EM), i.Proj.projections.add(TM), i.Proj.projections.add(NM), i.Proj.projections.add($M), i.Proj.projections.add(VM), i.Proj.projections.add(jM), i.Proj.projections.add(eC), i.Proj.projections.add(oC), i.Proj.projections.add(uC), i.Proj.projections.add(_C), i.Proj.projections.add(MC), i.Proj.projections.add(RC), i.Proj.projections.add(AC), i.Proj.projections.add($C), i.Proj.projections.add(VC), i.Proj.projections.add(jC), i.Proj.projections.add(tE); -} -ee.defaultDatum = "WGS84"; -ee.Proj = Oe; -ee.WGS84 = new ee.Proj("WGS84"); -ee.Point = Gn; -ee.toPoint = wf; -ee.defs = Ut; -ee.nadgrid = hx; -ee.transform = Qr; -ee.mgrs = Sx; -ee.version = "__VERSION__"; -eE(ee); -function iE(i) { +function PM(i) { + i.Proj.projections.add(Or), i.Proj.projections.add(Nr), i.Proj.projections.add(Gx), i.Proj.projections.add(Yx), i.Proj.projections.add(t3), i.Proj.projections.add(r3), i.Proj.projections.add(u3), i.Proj.projections.add(p3), i.Proj.projections.add(C3), i.Proj.projections.add(R3), i.Proj.projections.add(U3), i.Proj.projections.add(j3), i.Proj.projections.add(tC), i.Proj.projections.add(oC), i.Proj.projections.add(uC), i.Proj.projections.add(pC), i.Proj.projections.add(CC), i.Proj.projections.add(RC), i.Proj.projections.add(PC), i.Proj.projections.add(kC), i.Proj.projections.add(ZC), i.Proj.projections.add(XC), i.Proj.projections.add(JC), i.Proj.projections.add(nM), i.Proj.projections.add(lM), i.Proj.projections.add(pM), i.Proj.projections.add(CM), i.Proj.projections.add(RM), i.Proj.projections.add(AM); +} +se.defaultDatum = "WGS84"; +se.Proj = ke; +se.WGS84 = new se.Proj("WGS84"); +se.Point = Xn; +se.toPoint = xf; +se.defs = Xt; +se.nadgrid = Bv; +se.transform = ro; +se.mgrs = ix; +se.version = "__VERSION__"; +PM(se); +function OM(i) { const t = Object.keys(i.defs), e = t.length; let n, s; for (n = 0; n < e; ++n) { const r = t[n]; - if (!J(r)) { + if (!q(r)) { const o = i.defs(r); let a = o.units; - !a && o.projName === "longlat" && (a = "degrees"), Vu( - new tl({ + !a && o.projName === "longlat" && (a = "degrees"), Xu( + new rl({ code: r, axisOrientation: o.axis, metersPerUnit: o.to_meter, @@ -21426,117 +21671,60 @@ function iE(i) { } } for (n = 0; n < e; ++n) { - const r = t[n], o = J(r); + const r = t[n], o = q(r); for (s = 0; s < e; ++s) { - const a = t[s], l = J(a); - if (!zu(r, a)) + const a = t[s], l = q(a); + if (!Vu(r, a)) if (i.defs[r] === i.defs[a]) - ma([o, l]); + xa([o, l]); else { const h = i(r, a); - vg( + yg( o, l, - Sh(o, l, h.forward), - Sh(l, o, h.inverse) + Th(o, l, h.forward), + Th(l, o, h.inverse) ); } } } } -class iu { - static setupCircles(t, e) { - let n = []; - return t.get("isSelected") ? n = [ - new Vt({ - zIndex: 1, - image: new qe({ - radius: 2 * e, - stroke: new Ee({ - color: "#FFFFFF", - width: 3 - }), - fill: new he({ - color: "rgb(239, 68, 68, 0.75)" - }) - }) - }), - new Vt({ - zIndex: 2, - image: new qe({ - radius: 0.2 * e, - stroke: new Ee({ - color: "#FFFFFF", - width: 3 - }), - fill: new he({ - color: "#DC2626" - }) - }) - }) - ] : n = [ - new Vt({ - zIndex: 1, - image: new qe({ - radius: 2 * e, - stroke: new Ee({ - color: "#FFFFFF", - width: 1 - }), - fill: new he({ - color: "rgb(239, 68, 68, 0.75)" - }) - }) - }), - new Vt({ - zIndex: 2, - image: new qe({ - radius: 0.2 * e, - stroke: new Ee({ - color: "#FFFFFF", - width: 1 - }), - fill: new he({ - color: "#DC2626" - }) - }) - }) - ], n; - } -} -class ia { - constructor(t) { - this.control = new qd(), this.store = w(); - const e = this.store.getMap(), n = new Ws(); - this.setupMapForCreation(e, n), window.addEventListener("authorize-created", (s) => { - this.createElement(n, s); +class nu { + constructor(t, e, n, s, r) { + var a; + this.store = r, this.states = s, this.inclusionArea = e, this.renderUtils = n; + const o = this.store.getMap(); + if (!o) + throw new Error("Missing map"); + this.map = o, this.control = new kl(this.store), this.vectorSource = new Qn(), this.setupMapForCreation(o, this.vectorSource), this.states.readonly || (window.addEventListener("authorize-created", (l) => { + this.createElement(this.vectorSource, l); + }), window.addEventListener("refused-created", () => { + this.store.removeLastSelectedFeature(), this.store.getMaxElement() === 1 && this.previousElement && this.store.addSelectedFeature(this.previousElement, this.previousElement.get("id"), "create"), tt.sendEvent("rule-validation", void 0); }), window.addEventListener("remove-created-icon", () => { - this.deleteElement(n); + this.deleteElement(this.vectorSource); }), window.addEventListener("recenter-selected-element", () => { - var o; - const s = this.store.getCurrentItemId(), r = (o = this.store.getSelectedFeature(s)) == null ? void 0 : o.get("geom").getCoordinates(); - e.getView().setCenter(r); - }), this.addLongClickEvent(t, e), e.on("click", (s) => { - e.forEachFeatureAtPixel(s.pixel, (r) => { - var o, a; - r && ((o = r.getGeometry()) == null ? void 0 : o.getType()) === "Point" && r.get("id") && (this.store.unselectFeatures(), this.store.setCurrentItemId(r.get("id")), (a = this.store.getSelectedFeature(r.get("id"))) == null || a.set("isSelected", !0), st.sendEvent("open-select-create-box", r.get("geom").getCoordinates()), this.control.show()); + var c; + const l = this.store.getCurrentItemId(), h = (c = this.store.getSelectedFeature(l)) == null ? void 0 : c.get("geom").getCoordinates(); + o.getView().setCenter(h); + }), ((a = this.store.getOptions()) == null ? void 0 : a.mode.type) === "mix" && window.addEventListener("remove-created", (l) => { + this.vectorSource.getFeatures().forEach((h) => { + h.get("id") === l.detail && this.remove(this.vectorSource, h); }); - }); + }), this.addLongClickEvent(t, o), o.on("click", (l) => { + o.forEachFeatureAtPixel(l.pixel, (h) => { + var c, u; + h && ((c = h.getGeometry()) == null ? void 0 : c.getType()) === "Point" && h.get("id") && (this.store.unselectFeatures(), this.store.setCurrentItemId(h.get("id")), (u = this.store.getSelectedFeature(h.get("id"))) == null || u.set("isSelected", !0), tt.sendEvent("open-select-create-box", h.get("geom").getCoordinates()), this.control.show()); + }); + })); + } + renderCurrentSelection(t) { + this.renderUtils.displayCurrentElementCreateTargetMode(this.vectorSource, t); + } + removeCurrentSelection() { + this.vectorSource.getFeatures().forEach((t) => this.vectorSource.removeFeature(t)); } setupMapForCreation(t, e) { - var o; - const n = this.store.getOptions(), s = ((o = n.notifications.find((a) => a.rule.type === "ZOOM_CONSTRAINT")) == null ? void 0 : o.rule.minZoom) || n.zoom, r = new Vs({ - source: e, - visible: !0 - }); - r.setStyle(function(a) { - return iu.setupCircles(a, 1); - }), t.addLayer(r), t.getView().on("change:resolution", () => { - const a = t.getView().getZoom(), l = t.getView().getResolution(); - a && l && a > s && r.setStyle(function(h) { - return iu.setupCircles(h, a / l); - }); - }), this.control.disable(), t.addControl(this.control); + this.renderUtils.setupAndLoadLayer(e), this.states.readonly || (this.control.disable(), t.addControl(this.control)); } createElement(t, e) { if (this.store.getSelectedFeatures().length > this.store.getMaxElement()) { @@ -21547,11 +21735,14 @@ class ia { const s = this.store.getSelectedFeature(this.store.getCurrentItemId()); s && (this.store.getMaxElement() === 1 ? (t.getFeatures().forEach((r) => t.removeFeature(r)), this.control.hide()) : t.getFeatures().forEach((r) => { r.get("id") !== this.store.getCurrentItemId() && r.set("isSelected", void 0); - }), t.addFeature(s), this.control.show(), st.sendEvent("open-select-create-box", s.get("geom").getCoordinates()), this.store.setCustomDisplay(!0), this.store.setTargetBoxSize("select")), this.store.getMap().get("target").className = `${this.store.getTargetBoxSize()} ${this.store.getTheme()}`; + }), t.addFeature(s), this.control.show(), tt.sendEvent("open-select-create-box", s.get("geom").getCoordinates()), this.store.setCustomDisplay(!0), this.store.setTargetBoxSize("select")), this.map.get("target").className = `${this.store.getTargetBoxSize()} ${gt.getTheme()}`; + } + remove(t, e) { + t.removeFeature(e), this.control.hide(), this.store.removeSelectedFeature(e.get("id")); } deleteElement(t) { const e = this.store.getSelectedFeature(this.store.getCurrentItemId()); - e && (t.removeFeature(e), this.control.hide(), this.store.removeSelectedFeature(this.store.getCurrentItemId()), st.sendEvent("rule-validation", void 0), Jd.setCustomStyleWithouInfoBox()), this.store.getMap().get("target").className = `${this.store.getTargetBoxSize()} ${this.store.getTheme()}`; + e && (this.remove(t, e), tt.sendEvent("rule-validation", void 0), jd.setCustomStyleWithouInfoBox(this.store)), this.map.get("target").className = `${this.store.getTargetBoxSize()} ${gt.getTheme()}`; } addLongClickEvent(t, e) { let s, r = [0, 0]; @@ -21574,14 +21765,28 @@ class ia { }); } requestElementCreation(t, e, n, s) { - const r = s.getBoundingClientRect(); - console.log(r); - const o = n.getCoordinateFromPixel([t - r.left - document.documentElement.scrollLeft, e - r.top - document.documentElement.scrollTop]), a = new Ci(o), l = new zs({ - geom: a, - id: Number(`${Math.round(o[0])}${Math.round(o[1])}`), - isSelected: !0 - }); - l.setGeometryName("geom"), this.store.getMaxElement() === 1 && this.store.removeSelectedFeature(this.store.getCurrentItemId()), (this.store.getMaxElement() === -1 || this.store.getSelectedFeatures().length <= this.store.getMaxElement()) && (this.store.addSelectedFeature(l, l.get("id"), "create"), st.sendEvent("icon-created", l.get("id"))); + var r; + if (!this.states.readonly) { + const o = s.getBoundingClientRect(), a = n.getCoordinateFromPixel([t - o.left - document.documentElement.scrollLeft, e - o.top - document.documentElement.scrollTop]), l = new oi(a), h = new an({ + geom: l, + id: Number(`${Math.round(a[0])}${Math.round(a[1])}`), + isSelected: !0 + }); + if (h.setGeometryName("geom"), this.inclusionArea && !this.inclusionArea.couldCreate(l.getCoordinates())) + return; + if (this.store.getMaxElement() === 1) { + if (((r = this.store.getOptions()) == null ? void 0 : r.mode.type) === "mix") { + const u = this.store.getSelectedFeatures(); + if (u && u.length === 1 && this.store.getCurrentFeatureType(u[0].get("objectid")) === "select") { + const f = u[0].get("objectid"); + tt.sendEvent("remove-clicked", f); + } + } + const c = this.store.getSelectedFeatures(); + c.length > 0 && (this.store.removeSelectedFeature(c[0].get("id")), this.previousElement = c[0]); + } + (this.store.getMaxElement() === -1 || this.store.getSelectedFeatures().length <= this.store.getMaxElement()) && (this.store.addSelectedFeature(h, h.get("id"), "create"), tt.sendEvent("icon-created", h.get("id"))); + } } moveAnalyzer(t, e, n) { return Math.abs(e - t[0]) > 10 || Math.abs(n - t[1]) > 10; @@ -21590,16 +21795,20 @@ class ia { clearTimeout(t), t = void 0; } } -const Gf = `.search-container{left:calc(50% - 151px);position:absolute;max-width:302px;width:100%;top:var(--top-distance);z-index:-1}.search-input-container{border-radius:var(--icon-border-radius);border:1px solid var(--icon-border-color);display:flex;background-color:var(--information-box-background-color)}.search-input{width:calc(100% - 13px);height:44px;border:none;outline:none;padding:0 0 0 11px;font-size:14px;background-color:var(--information-box-background-color);color:var(--information-box-text-color)}.search-svg-container{width:29px;height:44px;margin-right:11px;display:flex;align-items:center}ul{margin-top:0;list-style-type:none;background-color:var(--information-box-background-color);padding-left:0;border-radius:var(--icon-border-radius)}ul>:first-child{border-top-right-radius:var(--icon-border-radius);border-top-left-radius:var(--icon-border-radius)}li{height:40px;border-bottom:1px solid var(--icon-border-color);padding-left:11px;font-size:12px;display:flex;align-items:center;justify-content:start;color:var(--information-box-text-color)}ul>:last-child{border-bottom-right-radius:var(--icon-border-radius);border-bottom-left-radius:var(--icon-border-radius)}li:hover,li:focus{background-color:var(--icon-border-color)}svg{width:var(--svg-icon-size);height:var(--svg-icon-size);stroke:var(--information-box-title-color)}svg:hover{stroke:var(--information-cross-hover-color)}svg>g>.icon{fill:none;stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}.cross-div{width:var(--svg-icon-size);height:var(--svg-icon-size);cursor:pointer} +const Nf = `@media only screen and (min-width: 351px) and (max-width: 995px){.search-container{left:calc((100% - 334px)/2);width:100%;max-width:332px}}@media only screen and (max-width: 350px){.search-container{left:10px;width:calc(100% - 20px);max-width:332px}}@media only screen and (min-width: 996px){.search-container{left:calc((100% - (var(--search-width) + 30px)) / 2);width:calc(var(--search-width) + 30px)}}.search-container{position:absolute;top:var(--top-distance);z-index:0}.search-input-container{border-radius:var(--icon-border-radius);border:1px solid var(--icon-border-color);display:flex;background-color:var(--information-box-background-color);margin-bottom:1px}.search-input{width:calc(100% - 13px);height:44px;border:none;outline:none;padding:0 0 0 11px;font-size:14px;background-color:var(--information-box-background-color);color:var(--suggestion-box-text-color);font-family:sans-serif}.search-svg-container{width:29px;height:44px;margin-right:11px;display:flex;align-items:center}ul{margin-top:0;list-style-type:none;background-color:var(--information-box-background-color);padding-left:0;border-radius:var(--icon-border-radius)}ul>:first-child{border-top-right-radius:var(--icon-border-radius);border-top-left-radius:var(--icon-border-radius)}li{height:40px;border-bottom:1px solid var(--icon-border-color);padding-left:11px;font-size:12px;display:flex;align-items:center;justify-content:start;color:var(--suggestion-box-text-color);font-family:sans-serif;cursor:pointer}ul>:last-child{border-bottom-right-radius:var(--icon-border-radius);border-bottom-left-radius:var(--icon-border-radius)}li:hover,li:focus{background-color:var(--icon-border-color)}svg{width:var(--svg-icon-size);height:var(--svg-icon-size);stroke:var(--information-box-title-color)}svg:hover{stroke:var(--information-cross-hover-color)}svg>g>.icon{fill:none;stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}.cross-div{width:var(--svg-icon-size);height:var(--svg-icon-size);cursor:pointer} `; -var nE = Object.defineProperty, sE = Object.getOwnPropertyDescriptor, tn = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? sE(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var NM = Object.defineProperty, FM = Object.getOwnPropertyDescriptor, Ue = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? FM(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && nE(t, e, s), s; + return n && s && NM(t, e, s), s; }; -let Ns = class extends At { +let jn = class extends Pt { constructor() { - super(), this._results = [], w().getMap().addEventListener("click", () => { + super(...arguments), this._results = []; + } + firstUpdated() { + var i; + (i = this.map) == null || i.addEventListener("click", () => { this._results = []; }); } @@ -21622,7 +21831,8 @@ let Ns = class extends At { this._results = []; } selectAddress(i, t) { - w().getMap().getView().setCenter(xg([i[0], i[1]], "EPSG:2056")), this._results = [], st.sendEvent("address_selected", t); + var e; + (e = this.map) == null || e.getView().setCenter(vg([i[0], i[1]], "EPSG:2056")), this._results = [], tt.sendEvent("address_selected", t); } render() { return Lt` @@ -21634,27 +21844,36 @@ let Ns = class extends At { `; } }; -Ns.styles = [xt(Gf)]; -tn([ - ji({ type: Object }) -], Ns.prototype, "locations", 2); -tn([ - Yt() -], Ns.prototype, "_results", 2); -Ns = tn([ - Xt("location-list") -], Ns); -let Bn = class extends At { - constructor() { - super(), this.results = {}, this._hasSearch = !1, window.addEventListener("address_selected", (i) => { - this.inputElement.value = i.detail, this._hasSearch = !1; +jn.styles = [yt(Nf)]; +Ue([ + Te({ type: Object }) +], jn.prototype, "locations", 2); +Ue([ + Te({ type: Object }) +], jn.prototype, "map", 2); +Ue([ + It() +], jn.prototype, "_results", 2); +jn = Ue([ + qt("location-list") +], jn); +let ai = class extends Pt { + constructor(i) { + super(), this.results = {}, this._hasSearch = !1, this._hasSelected = !1, this.store = i; + const t = i.getMap(); + if (!t) + throw new Error("Missing map!"); + this.map = t, window.addEventListener("address_selected", (e) => { + this.inputElement.value = e.detail, this._hasSearch = !1, this._hasSelected = !0; }); } firstUpdated() { - this.inputElement.oninput = () => { + this.locationElements.map = this.map, this.inputElement.oninput = () => { if (this.inputElement.value.length > 1) { this._hasSearch = !0; - const i = w().getOptions(); + const i = this.store.getOptions(); + if (!i) + return; let t = `${i.search.requestWithoutCustomValue}&searchText=${this.inputElement.value}`; i.search.bboxRestiction !== "" && (t += `&bbox=${i.search.bboxRestiction}`), fetch(t).then((e) => e.json()).then((e) => { this.results = e; @@ -21664,122 +21883,135 @@ let Bn = class extends At { }; } clear() { - this.inputElement.value = "", this.results = {}, this._hasSearch = !1; + this.inputElement.value = "", this.results = {}, this._hasSearch = !1, this._hasSelected = !1; } render() { return Lt`
    - ${Bd( - this._hasSearch ? Lt`
    - ${Fe(ot.cross)} -
    ` : Lt`${Fe(ot.search)}` + ${Xd( + this._hasSearch || this._hasSelected ? Lt`
    + ${Le(st.cross)} +
    ` : Lt`${Le(st.search)}` )}
    - +
    `; } }; -Bn.styles = [xt(Gf)]; -tn([ - mu("#search") -], Bn.prototype, "inputElement", 2); -tn([ - Yt() -], Bn.prototype, "results", 2); -tn([ - Yt() -], Bn.prototype, "_hasSearch", 2); -Bn = tn([ - Xt("search-location") -], Bn); -class rE extends Dt { - constructor() { - const t = document.createElement("search-location"); - super({ element: t }), this.div = t; +ai.styles = [yt(Nf)]; +Ue([ + Ya("#search") +], ai.prototype, "inputElement", 2); +Ue([ + Ya("#location-result") +], ai.prototype, "locationElements", 2); +Ue([ + It() +], ai.prototype, "results", 2); +Ue([ + It() +], ai.prototype, "_hasSearch", 2); +Ue([ + It() +], ai.prototype, "_hasSelected", 2); +ai = Ue([ + qt("search-location") +], ai); +class DM extends kt { + constructor(t, e) { + const n = new ai(t); + super({ element: n }), this.div = n, Wt.setResizeEvent(this.div, "--search-width", e); } } -class oE { - constructor() { - const t = new Vt({ - fill: new he({ +class kM { + constructor(t) { + var r; + const e = new Vt({ + fill: new Yt({ color: "#ffffff00" }), - stroke: new Ee({ + stroke: new Re({ color: "#dddddd", width: 5 }) - }), e = new Vs({ - source: new Ws({ - url: () => w().getOptions().borderUrl, - format: new E_() + }), n = t.getOptions(); + if (!n) + throw new Error("Missing options"); + const s = new Vn({ + source: new Qn({ + url: () => n.border.url, + format: new Wd() }), zIndex: 9999, - style: t, + style: e, opacity: 0.9 }); - e.on("change", () => { - var s, r; - const n = (s = e.getSource()) == null ? void 0 : s.getExtent(); - if (n) { - const o = w().getOptions(); - w().getMap().setView(new Ke({ - extent: n, + s.on("change", () => { + var a, l; + const o = (a = s.getSource()) == null ? void 0 : a.getExtent(); + if (o) { + const h = t.getOptions(); + if (!h) + throw new Error("Missing options"); + (l = t.getMap()) == null || l.setView(new ii({ + extent: o, projection: "EPSG:2056", - center: o.defaultCenter, - zoom: o.zoom, - minZoom: o.minZoom, - maxZoom: o.maxZoom, - enableRotation: o.enableRotation, + center: h.defaultCenter, + zoom: h.zoom, + minZoom: h.minZoom, + maxZoom: h.maxZoom, + enableRotation: h.interaction.enableRotation, constrainOnlyCenter: !0 })); } - w().setBorderConstraint((r = e.getSource()) == null ? void 0 : r.getExtent()), st.sendEvent("border-contraint-enabled", void 0); - }), w().getMap().addLayer(e); + t.setBorderConstraint(s), tt.sendEvent("border-contraint-enabled", void 0); + }), (r = t.getMap()) == null || r.addLayer(s); } } -class aE { - constructor() { - var e; - this.vectorLayer = new Vs(), this.vectorSource = new Ws(); - const t = w().getGeolocation(); - if (t) { - const n = new zs(); - n.setStyle( +class GM { + constructor(t) { + var n, s; + this.vectorLayer = new Vn(), this.vectorSource = new Qn(), this.map = t; + const e = gt.getGeolocation(); + if (e) { + const r = new an(); + r.setStyle( new Vt({ - image: new qe({ + image: new ni({ radius: 6, - fill: new he({ + fill: new Yt({ color: "#3399CC" }), - stroke: new Ee({ + stroke: new Re({ color: "#fff", width: 2 }) }) }) - ), t.on("change:position", function() { - const s = t.getPosition(); - n.setGeometry( - s ? new Ci(s) : void 0 + ), e.on("change:position", function() { + const o = e.getPosition(); + r.setGeometry( + o ? new oi(o) : void 0 ); - }), (e = this.vectorSource) == null || e.addFeature(n), this.vectorLayer.setSource(this.vectorSource), w().getMap().addLayer(this.vectorLayer); + }), (n = this.vectorSource) == null || n.addFeature(r), this.vectorLayer.setSource(this.vectorSource), (s = this.map) == null || s.addLayer(this.vectorLayer); } } removeMarker() { - w().getMap().removeLayer(this.vectorLayer); + var t; + (t = this.map) == null || t.removeLayer(this.vectorLayer); } } -const lE = `.loader-element{position:absolute;top:calc(50% - 52px);background-color:var(--information-box-background-color);box-shadow:#0003 0 1px 4px;padding:15px;border-radius:10px;border:1px solid var(--information-box-background-color);z-index:10;max-width:302px;width:100%;left:calc(50% - 167px)}.loader-text{display:flex;justify-content:center;margin-top:10px;color:var(--information-box-title-color)}.loader-container{display:flex;justify-content:center}.loader{width:48px;height:48px;border:4px solid #008c6f;border-bottom-color:transparent;border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}} +const $M = `.loader-element{position:absolute;top:calc(50% - 52px);background-color:var(--information-box-background-color);box-shadow:#0003 0 1px 4px;padding:15px;border-radius:10px;border:1px solid var(--information-box-background-color);z-index:10;max-width:302px;width:100%;left:calc(50% - 167px)}.loader-text{display:flex;justify-content:center;margin-top:10px;color:var(--information-box-title-color)}.loader-container{display:flex;justify-content:center}.loader{width:48px;height:48px;border:4px solid #008c6f;border-bottom-color:transparent;border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}} `; -var hE = Object.defineProperty, cE = Object.getOwnPropertyDescriptor, $f = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? cE(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var BM = Object.defineProperty, zM = Object.getOwnPropertyDescriptor, Ff = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? zM(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && hE(t, e, s), s; + return n && s && BM(t, e, s), s; }; -let io = class extends At { +let lo = class extends Pt { constructor(i) { super(), this.message = "", this.message = i; } @@ -21794,14 +22026,14 @@ let io = class extends At { `; } }; -io.styles = [xt(lE)]; -$f([ - Yt() -], io.prototype, "message", 2); -io = $f([ - Xt("loader-box") -], io); -class uE extends Dt { +lo.styles = [yt($M)]; +Ff([ + It() +], lo.prototype, "message", 2); +lo = Ff([ + qt("loader-box") +], lo); +class ZM extends kt { constructor(t) { const e = document.createElement("loader-box"); e.message = t, super({ @@ -21818,106 +22050,329 @@ class uE extends Dt { this.element.classList.remove("fade-in"), this.element.classList.add("fade-out"); } } -class dE { +class UM { removeLoaderBox() { this.loaderBox.hide(); } chromeBasePermissionAnalyzer() { - const t = w().getGeolocation(); + const t = gt.getGeolocation(); navigator.permissions.query({ name: "geolocation" }).then((e) => { - e.state === "denied" && (t == null || t.setTracking(!1), this.denied()), e.state === "prompt" && this.loaderBox.show(), e.state === "granted" && this.granted(), e.onchange = () => { + e.state === "denied" && (t == null || t.setTracking(!1), this.denied()), e.state === "prompt" && this.openInfo(), e.state === "granted" && this.granted(), e.onchange = () => { var n; - e.state === "denied" && (t == null || t.setTracking(!1), this.denied()), e.state === "prompt" && (this.loaderBox.show(), t == null || t.setTracking(!0), (n = this.marker) == null || n.removeMarker()), e.state === "granted" && (t == null || t.setTracking(!0), this.granted()); + e.state === "denied" && (t == null || t.setTracking(!1), this.denied()), e.state === "prompt" && (this.openInfo(), t == null || t.setTracking(!0), (n = this.marker) == null || n.removeMarker()), e.state === "granted" && (t == null || t.setTracking(!0), this.granted()); }; }); } granted() { - this.removeLoaderBox(), this.marker = new aE(); + this.removeLoaderBox(), this.map.removeOverlay(this.overlay), this.marker = new GM(this.map); } denied() { var t; - this.removeLoaderBox(), (t = this.marker) == null || t.removeMarker(); + this.removeLoaderBox(), this.map.removeOverlay(this.overlay), (t = this.marker) == null || t.removeMarker(); + } + geolocationSuccess() { + this.granted(); + } + geolocationError() { + this.denied(); + } + getLocation() { + navigator.geolocation ? navigator.geolocation.getCurrentPosition(this.geolocationSuccess.bind(this), this.geolocationError.bind(this)) : this.denied(); + } + openInfo() { + this.map.addOverlay(this.overlay), this.loaderBox.show(), this.getLocation(); } checkGeolocation() { - const t = w().getGeolocation(); + const t = gt.getGeolocation(); navigator.userAgent.match(/Chrome\/\d+/) !== null ? this.chromeBasePermissionAnalyzer() : (navigator.permissions.query({ name: "geolocation" }).then((e) => { - e.state === "denied" && this.denied(), e.state === "prompt" && this.loaderBox.show(), e.state === "granted" && this.granted(); + e.state === "denied" && this.denied(), e.state === "prompt" && this.openInfo(), e.state === "granted" && this.granted(); }), t == null || t.on("error", () => { this.denied(); }), t == null || t.on("change:position", () => { this.granted(); })); } - constructor() { - const t = w().getGeolocation(); - t == null || t.setTracking(!0), this.loaderBox = new uE("Chargement des donn\xE9es GPS"), w().getMap().addControl(this.loaderBox), this.loaderBox.disable(), this.checkGeolocation(); + constructor(t) { + if (!t) + throw new Error("Missing map!"); + this.map = t; + const e = gt.getGeolocation(); + e == null || e.setTracking(!0); + const n = document.createElement("div"); + n.classList.add("map-overlay"); + const s = this.map.getView().calculateExtent(this.map.getSize()); + this.overlay = new l2({ element: n, position: Pi(s), className: "ol-overlay-container ol-selectable overlay-index" }), this.loaderBox = new ZM("Chargement des donn\xE9es GPS"), this.map.addControl(this.loaderBox), this.checkGeolocation(); + } +} +class su { + static getStates(t) { + const e = { + readonly: !1, + currentSelections: [] + }; + return t && (t.readonly && (e.readonly = t.readonly), t.currentSelections && t.currentSelections.length > 0 && (e.currentSelections = t.currentSelections)), e; } } -var fE = Object.defineProperty, gE = Object.getOwnPropertyDescriptor, bo = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? gE(t, e) : t, r = i.length - 1, o; r >= 0; r--) +class VM { + constructor(t) { + this.vectorSource = new Qn(), this.renderUtils = t, this.renderUtils.setupAndLoadLayer(this.vectorSource); + } + renderCurrentSelection(t) { + this.renderUtils.displayCurrentElementCreateTargetMode(this.vectorSource, t); + } + removeCurrentSelection() { + this.vectorSource.getFeatures().forEach((t) => this.vectorSource.removeFeature(t)); + } +} +class ru { + static setupCircles(t, e) { + let n = []; + return t.get("isSelected") ? n = [ + new Vt({ + zIndex: 1, + image: new ni({ + radius: 2 * e, + stroke: new Re({ + color: "#FFFFFF", + width: 3 + }), + fill: new Yt({ + color: "rgb(239, 68, 68, 0.75)" + }) + }) + }), + new Vt({ + zIndex: 2, + image: new ni({ + radius: e > 8 ? 4 : 0.2 * e, + stroke: new Re({ + color: "#FFFFFF", + width: 3 + }), + fill: new Yt({ + color: "#DC2626" + }) + }) + }) + ] : n = [ + new Vt({ + zIndex: 1, + image: new ni({ + radius: 2 * e, + stroke: new Re({ + color: "#FFFFFF", + width: 1 + }), + fill: new Yt({ + color: "rgb(239, 68, 68, 0.75)" + }) + }) + }), + new Vt({ + zIndex: 2, + image: new ni({ + radius: e > 8 ? 4 : 0.2 * e, + stroke: new Re({ + color: "#FFFFFF", + width: 1 + }), + fill: new Yt({ + color: "#DC2626" + }) + }) + }) + ], n; + } +} +class WM { + constructor(t) { + this.vectorIsLoaded = !1, this.store = t; + } + setIsLoaded(t) { + this.vectorIsLoaded = t; + } + getDefaultZoomFactor() { + var e; + let t = ((e = this.store.getMap()) == null ? void 0 : e.getView().getZoom()) || 1; + return t > 1 && (t = t / 2), t; + } + setChangeResolution(t, e) { + var a; + const n = this.store.getOptions(), s = ((a = n == null ? void 0 : n.notifications.find((l) => l.rule.type === "ZOOM_CONSTRAINT")) == null ? void 0 : a.rule.minZoom) || (n == null ? void 0 : n.zoom), r = t.getView().getZoom(), o = t.getView().getResolution(); + r && o && s && r > s && e.setStyle(function(l) { + return ru.setupCircles(l, r / o); + }); + } + setupAndLoadLayer(t) { + const e = new Vn({ + source: t, + visible: !0 + }); + e.setStyle((r) => ru.setupCircles(r, this.getDefaultZoomFactor())); + const n = this.store.getMap(); + if (!n) + return; + n == null || n.addLayer(e); + const s = this.store.getOptions(); + !s || Wt.registerBorderConstaintMapEvent( + "change:resolution", + () => this.setChangeResolution(n, e), + n, + s + ); + } + generateFeaturePointFromCoordinate(t) { + const e = t, n = new oi(e), s = new an({ + geom: n, + id: Number(`${Math.round(e[0])}${Math.round(e[1])}`), + isSelected: !1 + }); + return s.setGeometryName("geom"), s; + } + displayCurrentElementCreateTargetMode(t, e) { + t.getFeatures().forEach((n) => t.removeFeature(n)), e.currentSelections.length > 0 && e.currentSelections.forEach((n) => { + const s = this.generateFeaturePointFromCoordinate(n); + e.readonly || this.store.addSelectedFeature(s, s.get("id"), "create"), t.addFeature(s); + }); + } + loadSelectMode(t, e) { + const n = []; + return e.currentSelections && e.currentSelections.length > 0 && (t.getFeatures().forEach((s) => { + s.get("isClick") && s.set("isClick", !1); + }), e.currentSelections.forEach((s) => { + t.getFeatures().forEach((r) => { + const o = r.get("geom").getCoordinates(); + o[0].toFixed(2) == s[0] && o[1].toFixed(2) == s[1] && (n.push(s), r.set("isClick", !0), e.readonly || this.store.addSelectedFeature(r, r.get("objectid"), "select")); + }); + })), n; + } + displayCurrentElementSelectMode(t, e) { + this.vectorIsLoaded ? this.loadSelectMode(t, e) : t.on("featuresloadend", () => { + this.loadSelectMode(t, e), this.vectorIsLoaded = !0; + }); + } + loadMixMode(t, e, n) { + const s = this.loadSelectMode(t, n), r = { + readonly: n.readonly, + currentSelections: n.currentSelections.filter((o) => !s.includes(o)) + }; + this.displayCurrentElementCreateTargetMode(e, r); + } + displayMixMode(t, e, n) { + this.vectorIsLoaded ? this.loadMixMode(t, e, n) : t.on("featuresloadend", () => { + this.loadMixMode(t, e, n), this.vectorIsLoaded = !0; + }); + } +} +var HM = Object.defineProperty, XM = Object.getOwnPropertyDescriptor, Oi = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? XM(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && fE(t, e, s), s; + return n && s && HM(t, e, s), s; }; -let zn = class extends At { +let Be = class extends Pt { constructor() { - super(), this.options = {}; + super(), this.modeControllers = [], this.inclusionArea = void 0, this.options = {}, this.states = {}, this.store = new gt(), this.renderUtils = new WM(this.store); } connectedCallback() { super.connectedCallback(); } setupTheme(i) { - i.darkMode ? w().setTheme("dark") : i.lightMode || window.matchMedia("(prefers-color-scheme: light)").matches ? w().setTheme("light") : window.matchMedia("(prefers-color-scheme: dark)").matches ? w().setTheme("dark") : w().setTheme("light"); + i.darkMode ? gt.setTheme("dark") : i.lightMode || window.matchMedia("(prefers-color-scheme: light)").matches ? gt.setTheme("light") : window.matchMedia("(prefers-color-scheme: dark)").matches ? gt.setTheme("dark") : gt.setTheme("light"); } setupCustomDisplay(i) { - i.mode.type === "target" ? (w().setCustomDisplay(i.geolocationInformation.displayBox), this.setupTargetBoxSize(i.geolocationInformation)) : i.search.displaySearch ? (w().setTargetBoxSize("small"), w().setCustomDisplay(!0)) : (w().setTargetBoxSize("no-box"), w().setCustomDisplay(!1)); + i.mode.type === "target" ? (this.store.setCustomDisplay(i.geolocationInformation.displayBox), this.setupTargetBoxSize(i.geolocationInformation)) : i.search.displaySearch ? (this.store.setTargetBoxSize("small"), this.store.setCustomDisplay(!0)) : (this.store.setTargetBoxSize("no-box"), this.store.setCustomDisplay(!1)); } setupTargetBoxSize(i) { - i.currentLocation && i.reverseLocation ? w().setTargetBoxSize("large") : i.currentLocation || i.reverseLocation ? w().setTargetBoxSize("medium") : w().setTargetBoxSize("small"); + i.currentLocation && i.reverseLocation ? this.store.setTargetBoxSize("large") : i.currentLocation || i.reverseLocation ? this.store.setTargetBoxSize("medium") : this.store.setTargetBoxSize("small"); } firstUpdated() { - Uy.getOptions(this.options); - const i = w().getOptions(); - this.setupTheme(i), this.setupCustomDisplay(i), ee.defs("EPSG:2056", "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs"), iE(ee), this.view = new Ke({ + const i = yy.webComponentOptions(this.options); + this.store.setOptions(i); + const t = su.getStates(this.states); + if (!i) + return; + const e = t.readonly; + this.setupTheme(i), this.setupCustomDisplay(i), se.defs("EPSG:2056", "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs"), OM(se), this.view = new ii({ projection: "EPSG:2056", center: i.defaultCenter, zoom: i.zoom, minZoom: i.minZoom, maxZoom: i.maxZoom, - enableRotation: i.enableRotation - }), w().setMap(new W1({ + enableRotation: i.interaction.enableRotation + }); + const n = new V1({ target: this.mapElement, controls: [], layers: [], view: this.view - })), i.enableGeolocation && (w().setGeolocation(new j1({ + }); + this.store.setMap(n), Vy.setupIcon(t, this.store), i.interaction.enableGeolocation && !e && (gt.setGeolocation(new Y1({ trackingOptions: { enableHighAccuracy: !0 }, projection: this.view.getProjection() - })), new dE()), i.mode.type === "target" && (w().getMap().addControl(new vv()), i.geolocationInformation.displayBox && w().getMap().addControl( - new Ev() - )), i.wmts.length > 0 && new Ny(), i.displayScaleLine && w().getMap().addControl(new M2({ units: "metric" })), i.borderUrl !== "" && new oE(), i.inclusionArea.url !== "" && new Vy(), i.mode.type === "select" && i.wfs.url != "" && new Ac(), i.mode.type === "create" && new ia(this.mapElement), i.mode.type === "mix" && i.wfs.url != "" ? (new ia(this.mapElement), new Ac()) : i.mode.type === "mix" && new ia(this.mapElement), new By(), gv.setupIcon(), i.search.displaySearch && i.mode.type !== "target" && w().getMap().addControl(new rE()); + })), new UM(n)), i.search.displaySearch && i.mode.type !== "target" && !e && n.addControl(new DM(this.store, n)), i.mode.type === "target" && (this.modeControllers.push(new VM(this.renderUtils)), e || (n.addControl(new Ky(this.store)), i.geolocationInformation.displayBox && n.addControl( + new tv(this.store) + ))), i.wmts.length > 0 && new ly(this.store), i.interaction.displayScaleLine && n.addControl(new C2({ units: "metric" })), i.border.url !== "" && new kM(this.store), i.inclusionArea.url !== "" && (this.inclusionArea = new xy(this.store)), i.mode.type === "select" && i.wfs.url != "" && this.modeControllers.push(new Fc(this.renderUtils, t, this.store)), i.mode.type === "create" && this.modeControllers.push(new nu(this.mapElement, this.inclusionArea, this.renderUtils, t, this.store)), i.mode.type === "mix" && i.wfs.url != "" && (this.modeControllers.push(new Fc(this.renderUtils, t, this.store)), this.modeControllers.push(new nu(this.mapElement, this.inclusionArea, this.renderUtils, t, this.store))), e || new gy(this.store), Wt.setCursorEvent(n); + } + updated(i) { + var t, e, n; + if (i.has("states") && this.states) { + const s = su.getStates(this.states); + if (s.currentSelections.length > 0) { + switch ((t = this.store.getOptions()) == null ? void 0 : t.mode.type) { + case "target": + this.modeControllers[0].renderCurrentSelection(s); + break; + case "select": + this.modeControllers[0].renderCurrentSelection(s); + break; + case "create": + this.modeControllers[0].renderCurrentSelection(s); + break; + case "mix": + this.renderUtils.displayMixMode(this.modeControllers[0].vectorSource, this.modeControllers[1].vectorSource, s); + break; + } + (e = this.store.getMap()) == null || e.updateSize(); + } else + this.modeControllers.forEach((r) => r.removeCurrentSelection()), this.store.removeAllSelectedFeatures(), (n = this.store.getMap()) == null || n.getControls().forEach((r) => { + r instanceof kl && r.disable(); + }); + } } render() { return Lt` -
    +
    `; } }; -zn.styles = [xt(Fy), xt(Dy), xt(Eo), xt(df), xt(zy), xt(Zy)]; -bo([ - mu("#map") -], zn.prototype, "mapElement", 2); -bo([ - Yt() -], zn.prototype, "view", 2); -bo([ - ji({ type: Object, attribute: "options" }) -], zn.prototype, "options", 2); -zn = bo([ - Xt("openlayers-element") -], zn); +Be.styles = [yt(hy), yt(cy), yt(Io), yt(hf), yt(my), yt(py), yt(_y)]; +Oi([ + Ya("#map") +], Be.prototype, "mapElement", 2); +Oi([ + It() +], Be.prototype, "view", 2); +Oi([ + It() +], Be.prototype, "modeControllers", 2); +Oi([ + It() +], Be.prototype, "renderUtils", 2); +Oi([ + It() +], Be.prototype, "inclusionArea", 2); +Oi([ + Te({ type: Object, attribute: "options" }) +], Be.prototype, "options", 2); +Oi([ + Te({ type: Object, attribute: "states" }) +], Be.prototype, "states", 2); +Be = Oi([ + qt("openlayers-element") +], Be); export { - zn as OpenLayersElement + Be as OpenLayersElement }; diff --git a/geocity/apps/forms/admin.py b/geocity/apps/forms/admin.py index c633def9d..44d6e732a 100644 --- a/geocity/apps/forms/admin.py +++ b/geocity/apps/forms/admin.py @@ -2,12 +2,15 @@ from adminsortable2.admin import SortableAdminMixin, SortableInlineAdminMixin from django import forms from django.contrib import admin -from django.db.models.fields.json import JSONField from django.utils.translation import gettext_lazy as _ -from jsoneditor.forms import JSONEditor -from geocity.apps.accounts.admin import IntegratorFilterMixin, filter_for_user +from geocity.apps.accounts.admin import ( + IntegratorFilterMixin, + MapCustomChoiceField, + filter_for_user, +) from geocity.apps.accounts.models import PUBLIC_TYPE_CHOICES, AdministrativeEntity +from geocity.apps.forms.models import MapWidgetConfiguration from . import models @@ -54,6 +57,15 @@ class GeometryTypes(django.db.models.TextChoices): LINE = "has_geometry_line", _("Ligne") POLYGON = "has_geometry_polygon", _("Polygone") + def get_map_config(): + qs = MapWidgetConfiguration.objects.all() + + return MapCustomChoiceField( + queryset=qs, + widget=forms.Select, + label=_("Configuration de la carte avancée"), + ) + geometry_types = forms.MultipleChoiceField( choices=GeometryTypes.choices, widget=forms.CheckboxSelectMultiple, @@ -68,6 +80,8 @@ class GeometryTypes(django.db.models.TextChoices): # default=models.Form.GEO_WIDGET_GENERIC, ) + map_widget_configuration = get_map_config() + class Meta: model = models.Form fields = "__all__" @@ -89,8 +103,12 @@ class Meta: "wms_layers_order": "Ordre de(s) la(les) couche(s) dans la carte. 1: au-dessus", } - class Media: - js = ("js/admin/form.js",) + @property + def media(self): + return forms.Media( + css={"all": ("css/admin/display.css",)}, + js=("js/admin/form.js", "js/admin/display.js"), + ) def __init__(self, *args, **kwargs): instance = kwargs.get("instance") @@ -537,21 +555,19 @@ def get__tags(self, obj): @admin.register(models.MapWidgetConfiguration) class FormMapWidgetConfigurationAdmin(IntegratorFilterMixin, admin.ModelAdmin): + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + list_display = [ "name", "configuration", "integrator", ] - formfield_overrides = { - JSONField: { - "widget": JSONEditor( - init_options={"mode": "view", "modes": ["view", "code", "tree"]}, - ace_options={"readOnly": True}, - attrs={"style": "height: 1000px;"}, - ), - }, - } class Meta: model = models.MapWidgetConfiguration fields = "__all__" + + class Media: + css = {"all": ("css/admin/map_widget_configurator.css",)} + js = ("js/admin/map_widget_configurator.js",) diff --git a/geocity/apps/forms/models.py b/geocity/apps/forms/models.py index 20e830f83..4d41f4813 100644 --- a/geocity/apps/forms/models.py +++ b/geocity/apps/forms/models.py @@ -13,6 +13,7 @@ from django.utils.safestring import mark_safe from django.utils.timezone import now from django.utils.translation import gettext_lazy as _ +from django_jsonform.models.fields import JSONField from simple_history.models import HistoricalRecords from taggit.managers import TaggableManager @@ -297,8 +298,32 @@ class Meta: class MapWidgetConfiguration(models.Model): + ITEMS_SCHEMA = { + "type": "object", + "keys": { + "mode": { + "type": "object", + "keys": { + "type": { + "type": "string", + "title": "Modes d’interaction avec la carte", + "choices": [ + { + "title": "Création", + "value": "create", + }, + {"title": "Sélection", "value": "select"}, + {"title": "Cible", "value": "target"}, + {"title": "Mixte", "value": "mix"}, + ], + "widget": "radio", + } + }, + }, + }, + } name = models.CharField(_("Nom de la configuration"), max_length=255) - configuration = models.JSONField("Configuration du Widget cartographique") + configuration = JSONField(schema=ITEMS_SCHEMA) integrator = models.ForeignKey( Group, null=True, diff --git a/geocity/apps/submissions/forms.py b/geocity/apps/submissions/forms.py index a471904d1..a251872fa 100644 --- a/geocity/apps/submissions/forms.py +++ b/geocity/apps/submissions/forms.py @@ -30,7 +30,7 @@ AdministrativeEntity, PermitDepartment, ) -from geocity.fields import AddressWidget, AdvancedGeometryWidget +from geocity.fields import AddressWidget, GeometryWidgetAdvanced from ..forms.models import Price from ..reports.services import generate_report_pdf_as_response @@ -1196,7 +1196,7 @@ class Meta: "ends_at": "Date de fin du chantier ou d'occupation du territoire. Si l'heure n'est pas pertinente, insérer 23:59.", } widgets = { - "geom": AdvancedGeometryWidget(), + "geom": GeometryWidget(), "comment": forms.Textarea(attrs={"rows": 2}), } @@ -1229,13 +1229,14 @@ def __init__(self, *args, **kwargs): ): del self.fields["geom"] - # else: - # self.fields["geom"].widget.attrs["options"] = self.get_widget_options( - # self.submission - # ) - # self.fields["geom"].widget.attrs["options"][ - # "edit_geom" - # ] = not disable_fields + else: + options = self.get_widget_options(self.submission) + if options["geo_widget_option"][0] == 2: + self.fields["geom"].widget = GeometryWidgetAdvanced() + self.fields["geom"].widget.attrs["options"] = options + self.fields["geom"].widget.attrs["options"][ + "edit_geom" + ] = not disable_fields if ( not config.ENABLE_GEOCALENDAR or self.instance.comes_from_automatic_geocoding @@ -1274,6 +1275,16 @@ def get_widget_options(self, submission): has_geom_line = any(form.has_geometry_line for form in forms_set) has_geom_polygon = any(form.has_geometry_polygon for form in forms_set) + map_widget_configuration = [ + form.map_widget_configuration.configuration + for form in forms + if form.map_widget_configuration != None + ] + + geo_widget_option = [ + form.geo_widget_option for form in forms if form.geo_widget_option != None + ] + ftsearch_additional_searchtext_for_address_field = ( submission.administrative_entity.additional_searchtext_for_address_field if submission @@ -1295,6 +1306,8 @@ def get_widget_options(self, submission): "map_width": "100%", "map_height": 400, "default_center": [2539057, 1181111], + "map_widget_configuration": map_widget_configuration, + "geo_widget_option": geo_widget_option, "default_zoom": 10, "display_raw": False, "edit_geom": has_geom, diff --git a/geocity/apps/submissions/templates/advancedgeometrywidget/advancedgeometrywidget.html b/geocity/apps/submissions/templates/advancedgeometrywidget/advancedgeometrywidget.html deleted file mode 100644 index 8b29b8612..000000000 --- a/geocity/apps/submissions/templates/advancedgeometrywidget/advancedgeometrywidget.html +++ /dev/null @@ -1,99 +0,0 @@ -{% load static %} - -{% block scripts %} - -{% endblock %} - -
    - communeYverdon-les-BainsgenreParcelle privée" - }, - "selectionTargetBoxMessage": "Emplacement du banc" -}' -/> -
    -
    -
    Valider
    -
    -
    - -
    - diff --git a/geocity/apps/submissions/templates/advancedgeometrywidget/geometrywidget.html b/geocity/apps/submissions/templates/advancedgeometrywidget/geometrywidget.html new file mode 100644 index 000000000..388917a20 --- /dev/null +++ b/geocity/apps/submissions/templates/advancedgeometrywidget/geometrywidget.html @@ -0,0 +1,45 @@ +{% if id != 'id_form-__prefix__-geom' %} +{# Adapted from django gis contrib #} + +{% load i18n l10n %} +{% load static %} +{% load submissions_extras %} + +{% block stylesheets%} + + +{% endblock %} + + +
    +
    +
    + Localiser sur une carte +
    + +
    No geometry value provided.
    +
    + + + + + +{% block scripts %} + + +{% endblock %} +{% endif %} diff --git a/geocity/apps/submissions/templates/submissions/submission_geo_time.html b/geocity/apps/submissions/templates/submissions/submission_geo_time.html index 6f373ac09..677c0a172 100644 --- a/geocity/apps/submissions/templates/submissions/submission_geo_time.html +++ b/geocity/apps/submissions/templates/submissions/submission_geo_time.html @@ -38,6 +38,7 @@

    {{ geo_title }}

    + {% include "submissions/_geo_time_form.html" with form=formset.empty_form form_id="__prefix__" form_number="__prefix__" open=False %}
    diff --git a/geocity/fields.py b/geocity/fields.py index cd36f4ce3..632a065ea 100644 --- a/geocity/fields.py +++ b/geocity/fields.py @@ -41,6 +41,15 @@ def media(self): ) +class GeometryWidgetAdvanced(geoforms.OpenLayersWidget): + template_name = "advancedgeometrywidget/geometrywidget.html" + map_srid = 2056 + + @property + def media(self): + return forms.Media() + + class AddressWidget(forms.TextInput): @property def media(self): @@ -75,7 +84,3 @@ def __init__(self, attrs=None, autocomplete_options=None): "data_remote_autocomplete": json.dumps(autocomplete_options), } ) - - -class AdvancedGeometryWidget(forms.TextInput): - template_name = "advancedgeometrywidget/advancedgeometrywidget.html" diff --git a/geocity/settings.py b/geocity/settings.py index 7cbb34f59..1d94276ee 100644 --- a/geocity/settings.py +++ b/geocity/settings.py @@ -162,6 +162,7 @@ "ckeditor", "jazzmin", "jsoneditor", + "django_jsonform", # django contrib apps "django.contrib.admin", "django.contrib.auth", diff --git a/requirements.in b/requirements.in index a1eaf9d86..6631395fe 100644 --- a/requirements.in +++ b/requirements.in @@ -19,6 +19,7 @@ requests tablib[xlsx] whitenoise django-jsoneditor +django-jsonform django-admin-sortable2 django-simple-history djangorestframework diff --git a/requirements.txt b/requirements.txt index be1eb6589..e15b7c1a7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -89,6 +89,7 @@ django-js-asset==2.0.0 # via django-ckeditor django-jsoneditor==0.2.4 # via -r requirements.in +django-jsonform=2.15.0 django-oauth-toolkit==2.2.0 # via -r requirements.in django-otp==1.1.4 diff --git a/requirements_dev.txt b/requirements_dev.txt index 3f6fc9ac7..9a0b3cef8 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -127,6 +127,8 @@ django-ipware==4.0.2 # via # -r requirements.txt # django-axes +django-jsonform + # via -r requirements.txt django-jazzmin==2.6.0 # via -r requirements.txt django-js-asset==2.0.0 From c2de86e1328718de961198b3cc8fb59b4e91e9b9 Mon Sep 17 00:00:00 2001 From: Monod Olivier Date: Thu, 30 Mar 2023 11:17:48 +0200 Subject: [PATCH 15/17] default values --- .../core/static/js/admin/map_widget_configurator.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/geocity/apps/core/static/js/admin/map_widget_configurator.js b/geocity/apps/core/static/js/admin/map_widget_configurator.js index 1da26ab38..502b66732 100644 --- a/geocity/apps/core/static/js/admin/map_widget_configurator.js +++ b/geocity/apps/core/static/js/admin/map_widget_configurator.js @@ -40,12 +40,14 @@ const baseSchema = { "capability": { "type": "string", "title": "Lien vers la capability", - "placeholder": "https://wmts.asit-asso.ch/wmts?&Service=WMTS&Version=1.0.0&Request=GetCapabilities" + "placeholder": "https://wmts.geo.admin.ch/EPSG/2056/1.0.0/WMTSCapabilities.xml", + "default": "https://wmts.geo.admin.ch/EPSG/2056/1.0.0/WMTSCapabilities.xml" }, "layer": { "type": "string", "title": "Identifiant de la couche WMTS", - "placeholder": "asitvd.fond_cadastral" + "placeholder": "ch.swisstopo.swissimage", + "default": "ch.swisstopo.swissimage" }, "projection": { "type": "string", @@ -59,7 +61,8 @@ const baseSchema = { }, "thumbnail": { "type": "string", - "title": "Lien vers l'image qui sera affiché lors de la sélection de la couche" + "title": "Lien vers l'image qui sera affiché lors de la sélection de la couche", + "default": "/static/images/aerial.svg" } } } @@ -347,7 +350,8 @@ const wfsOption = { "url": { "type": "string", "title": "URL de la couche WFS", - "placeholder": "https://mapnv.ch/mapserv_proxy?ogcserver=source+for+image%2Fpng&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=ELE_tragwerk_gesco" + "placeholder": "https://mapnv.ch/mapserv_proxy?ogcserver=source+for+image%2Fpng&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=ELE_tragwerk_gesco", + "default": "https://mapnv.ch/mapserv_proxy?ogcserver=source+for+image%2Fpng&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=ELE_tragwerk_gesco" } } }; From 8cff3a59768da0fd795fbf70d363c2502f37c4d5 Mon Sep 17 00:00:00 2001 From: Monod Olivier Date: Thu, 30 Mar 2023 13:44:53 +0200 Subject: [PATCH 16/17] add fixtures for advanced map widget --- .../management/commands/fixturize.py | 19 +++- .../management/fixturize_data/demo_example.py | 14 ++- .../management/fixturize_data/fixturize.py | 91 +++++++++++++++++++ 3 files changed, 121 insertions(+), 3 deletions(-) diff --git a/geocity/apps/submissions/management/commands/fixturize.py b/geocity/apps/submissions/management/commands/fixturize.py index 9aaa44bdd..f898661ed 100644 --- a/geocity/apps/submissions/management/commands/fixturize.py +++ b/geocity/apps/submissions/management/commands/fixturize.py @@ -242,8 +242,10 @@ def setup_form_and_form_categories( for form_category, objs in form_categories: # Used to manage specific cases on forms - if form_category.startswith("RENEWAL_REMINDER") or form_category.startswith( - "NO_GEOM_NOR_TIME" + if ( + form_category.startswith("RENEWAL_REMINDER") + or form_category.startswith("NO_GEOM_NOR_TIME") + or form_category.startswith("ADVANCED_MAP_PLUGIN") ): # Remove first word form_category_name = form_category.split(" ", 1)[1] @@ -321,6 +323,8 @@ def create_form( permit_duration=result.get("permit_duration"), expiration_reminder=result.get("expiration_reminder"), days_before_reminder=result.get("days_before_reminder"), + map_widget_configuration=result.get("map_widget_configuration"), + geo_widget_option=result.get("geo_widget_option"), ) form_obj.administrative_entities.add(administrative_entity) form_order += 1 @@ -336,6 +340,8 @@ def setup_form_specific_cases(self, form_category): permit_duration = None expiration_reminder = False days_before_reminder = None + map_widget_configuration = None + geo_widget_option = Form.GEO_WIDGET_GENERIC # Configure specific form in order to illustrate full potential of Geocity # Check if form has RENEWAL_REMINDER or NO_GEOM_NOR_TIME @@ -353,6 +359,13 @@ def setup_form_specific_cases(self, form_category): has_geometry_line = False has_geometry_polygon = False needs_date = False + elif form_category.startswith("ADVANCED_MAP_PLUGIN"): + + map_widget_configuration, _ = MapWidgetConfiguration.objects.get_or_create( + name="Sélection d'objets", + configuration=advanced_map_config, + ) + geo_widget_option = Form.GEO_WIDGET_ADVANCED result = { "has_geometry_point": has_geometry_point, @@ -363,6 +376,8 @@ def setup_form_specific_cases(self, form_category): "permit_duration": permit_duration, "expiration_reminder": expiration_reminder, "days_before_reminder": days_before_reminder, + "map_widget_configuration": map_widget_configuration, + "geo_widget_option": geo_widget_option, } return result diff --git a/geocity/apps/submissions/management/fixturize_data/demo_example.py b/geocity/apps/submissions/management/fixturize_data/demo_example.py index 710052e34..e63dc7e0e 100644 --- a/geocity/apps/submissions/management/fixturize_data/demo_example.py +++ b/geocity/apps/submissions/management/fixturize_data/demo_example.py @@ -18,6 +18,7 @@ entities = { "ca.ch": "Commune-a", "cb.ch": "Commune-b", + "pc.ch": "Participation citoyenne ", } # Geometries for the entities @@ -30,7 +31,7 @@ ] # Ofs_ids for the entities -ofs_ids = [5938, 5938, 5586, 5890, 5938] +ofs_ids = [5938, 5938, 5586, 5890, 5938, 1] # Define the fields field_comment = { @@ -104,7 +105,18 @@ # To create specific cases add in front of category name : # - RENEWAL_REMINDER # - NO_GEOM_NOR_TIME +# - ADVANCED_MAP_PLUGIN form_categories = [ + ( + "ADVANCED_MAP_PLUGIN Gestion participative de l'espace public", + [ + ( + "Signaler un problème sur un lampadaire", + field_comment, + field_date, + ), + ], + ), ( "RENEWAL_REMINDER Stationnement (ex. de demande devant être prolongée)", [ diff --git a/geocity/apps/submissions/management/fixturize_data/fixturize.py b/geocity/apps/submissions/management/fixturize_data/fixturize.py index 9476ceec0..4fe87f898 100644 --- a/geocity/apps/submissions/management/fixturize_data/fixturize.py +++ b/geocity/apps/submissions/management/fixturize_data/fixturize.py @@ -111,6 +111,16 @@ # - RENEWAL_REMINDER # - NO_GEOM_NOR_TIME form_categories = [ + ( + "ADVANCED_MAP_PLUGIN Gestion participative de l'espace public", + [ + ( + "Signaler un problème sur un lampadaire", + field_comment, + field_date, + ), + ], + ), ( "RENEWAL_REMINDER Stationnement (ex. de demande devant être prolongée)", [ @@ -233,3 +243,84 @@ of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish.""" + +# Advanced map config example + +advanced_map_config = { + "wfs": { + "url": "https://mapnv.ch/mapserv_proxy?ogcserver=source+for+image%2Fpng&SERVICE=WFS&VERSION=2.0.0&REQUEST=GetFeature&TYPENAMES=ELE_tragwerk_gesco" + }, + "mode": {"type": "mix"}, + "wmts": [ + { + "name": "", + "layer": "ch.swisstopo.swissimage", + "thumbnail": "/static/images/aerial.svg", + "capability": "https://wmts.geo.admin.ch/EPSG/2056/1.0.0/WMTSCapabilities.xml", + "projection": "EPSG:2056", + } + ], + "zoom": 15, + "border": { + "url": "", + "notification": "Veuillez placer votre élément dans les limites autorisées", + }, + "search": { + "displaySearch": True, + "bboxRestiction": "", + "requestWithoutCustomValue": "https://api3.geo.admin.ch/rest/services/api/SearchServer?limit=5&&type=locations&sr=2056&lang=fr&origins=address%2Cparcel", + }, + "cluster": {"distance": 40, "minDistance": 35}, + "maxZoom": 20, + "minZoom": 1, + "information": {"title": "Signaler ...", "content": "", "duration": 5000}, + "interaction": { + "fullscreen": True, + "displayZoom": True, + "enableRotation": True, + "displayScaleLine": False, + "enableGeolocation": True, + "enableCenterButton": True, + }, + "outputFormat": "GeometryCollection", + "defaultCenter": [2539057, 1181111], + "inclusionArea": {"url": "", "filter": ""}, + "notifications": [ + { + "rule": { + "type": "ZOOM_CONSTRAINT", + "minZoom": 16, + "maxElement": None, + "couldBypass": None, + }, + "type": "warning", + "message": "Veuillez zoomer davantage avant de pouvoir sélectionner un emplacement.", + }, + { + "rule": { + "type": "MAX_SELECTION", + "minZoom": None, + "maxElement": 1, + "couldBypass": None, + }, + "type": "warning", + "message": "Le maximum de sélection est limité à {x}.", + }, + { + "rule": { + "type": "INFORMATION", + "minZoom": None, + "maxElement": None, + "couldBypass": None, + }, + "type": "info", + "message": "Sélectionnez un marqueur ou cliquez longuement sur la carte pour qu’un élément soit créé.", + }, + ], + "geolocationInformation": { + "displayBox": True, + "currentLocation": False, + "reverseLocation": True, + }, + "selectionTargetBoxMessage": "", +} From 221d02c08d3c065bfe172916cba5f0d6dbb74de0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Dozot?= Date: Mon, 3 Apr 2023 10:18:51 +0200 Subject: [PATCH 17/17] Add new version of lib + fix modal display problem + improve admin part --- geocity/apps/core/static/css/main.css | 6 +- .../js/admin/map_widget_configurator.js | 11 + .../advancegeometrywidget/geometrywidget.js | 33 +- .../geocity-wc-map.js | 8601 +++++++++-------- 4 files changed, 4347 insertions(+), 4304 deletions(-) diff --git a/geocity/apps/core/static/css/main.css b/geocity/apps/core/static/css/main.css index 83b3e3ceb..86a609f35 100644 --- a/geocity/apps/core/static/css/main.css +++ b/geocity/apps/core/static/css/main.css @@ -598,7 +598,7 @@ th.actions { } #map-custom-modal { - top: 10vh; + top: 5vh; left: 10vw; width: 80vw; height: 80vh; @@ -606,7 +606,7 @@ th.actions { #web-component-advanced { width: calc(100% - 40px); - height: calc(80vh - 96px); + height: calc(var(--window-modal-size) * 0.8 - 96px); } } @@ -674,7 +674,7 @@ th.actions { #web-component-advanced { width: 100%; - height: calc(100vh - 96px); + height: calc(var(--window-modal-size) - 96px); } } diff --git a/geocity/apps/core/static/js/admin/map_widget_configurator.js b/geocity/apps/core/static/js/admin/map_widget_configurator.js index 502b66732..02dcb3536 100644 --- a/geocity/apps/core/static/js/admin/map_widget_configurator.js +++ b/geocity/apps/core/static/js/admin/map_widget_configurator.js @@ -147,6 +147,7 @@ const baseSchema = { "filter": { "type": "string", "title": "Filtre d’URL pour WFS permettant de filtrer les données de la zone d’inclusion", + "helpText": "Filtre de service WFS, le filtre doit être un GeometryOperands et doit contenir le motif ", "placeholder": "GeometryOperands=urn:ogc:def:crs:EPSG::2056&FILTER=communeYverdon-les-BainsgenreParcelle privée" } } @@ -449,6 +450,16 @@ function changeSchema(data, isSchemaChange) { function setupDisplay(data) { if (data.notifications && data.notifications.length > 0) { + // There is no unique ID for array element add button. + // The only way is to use the class name. Then check the table title + // In case of translation. change the check v alue by the translation result. + const addButtons = document.getElementsByClassName('rjf-add-button'); + if (addButtons && addButtons.length > 0) { + for (let element of addButtons) { + if (element.parentElement.firstChild.innerHTML == 'Notifications') + element.style.display = 'none'; + }; + } for (let i = 0; i < data.notifications.length; i++) { const ruleType = document.getElementsByName(`rjf§notifications§${i}§rule§type`) if (ruleType && ruleType.length > 0 ) { diff --git a/geocity/apps/core/static/js/advancegeometrywidget/geometrywidget.js b/geocity/apps/core/static/js/advancegeometrywidget/geometrywidget.js index 05317109e..c35eab766 100644 --- a/geocity/apps/core/static/js/advancegeometrywidget/geometrywidget.js +++ b/geocity/apps/core/static/js/advancegeometrywidget/geometrywidget.js @@ -1,4 +1,5 @@ const readOnlyMap = document.getElementById("map-ro-result"); +readOnlyMap.style.display = 'none'; const editableMap = document.getElementById("web-component-advanced"); const serialized = document.querySelector("[data-role='serialized']"); const buttonModal = document.getElementById("map-custom-modal-button"); @@ -24,6 +25,11 @@ if ( options = JSON.parse(optionsDiv[0].dataset.options); } +setupReadOnlyMap = () => { + readOnlyMap.style.display = 'block'; + setupMap(readOnlyMap, options, true); +} + parseCoordinates = (data) => { const selections = []; if (options.map_widget_configuration[0].outputFormat == 'GeometryCollection') { @@ -52,20 +58,24 @@ setupMap = (container, options, readonly) => { } wc.states = states; container.appendChild(wc); + const modalHeight = window.innerHeight; + container.style.setProperty('--window-modal-size', modalHeight + 'px'); } } updateReadOnlyMap = () => { - if (readOnlyMap) { + // update map only if exists. If there is no value when the form is set. + // The read-only map is not instancitated but create when data is set. + if (readOnlyMap && readOnlyMap.lastChild && serialized.value) { const states = { readonly: true, }; - if (serialized.value) { - const data = JSON.parse(serialized.value); - const selections = parseCoordinates(data); - states['currentSelections'] = selections; - } + const data = JSON.parse(serialized.value); + const selections = parseCoordinates(data); + states['currentSelections'] = selections; readOnlyMap.lastChild.states = states; + } else if (serialized.value) { + setupReadOnlyMap(); } } @@ -126,6 +136,7 @@ validationButton.addEventListener("click", () => { if (selectedValues != "") { serialized.value = selectedValues; + buttonModal.innerHTML = ` Modifier sur la carte` toogleModal("none"); updateReadOnlyMap(); } @@ -142,6 +153,11 @@ window.addEventListener("position-selected", (event) => { } }); +window.addEventListener('resize', () => { + const modalHeight = window.innerHeight; + editableMap.style.setProperty('--window-modal-size', modalHeight + 'px'); +}) + const isInvalid = document .querySelectorAll("[data-geometry-widget]:not([data-initialize='0'])")[0] ?.parentNode?.parentNode?.classList.contains("is-invalid"); @@ -149,7 +165,10 @@ if (isInvalid) { document.getElementById("geo-invalid-content").style.display = "block"; } -setupMap(readOnlyMap, options, true); +if (serialized.value) { + setupReadOnlyMap(); + buttonModal.innerHTML = ` Modifier sur la carte` +} if (options && !options.edit_geom) { buttonModal.style.display = 'none'; diff --git a/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js b/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js index ac18503b2..599fad111 100644 --- a/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js +++ b/geocity/apps/core/static/libs/js/advanced-geometry-edition/geocity-wc-map.js @@ -3,8 +3,8 @@ * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Ir = window, Ha = Ir.ShadowRoot && (Ir.ShadyCSS === void 0 || Ir.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ou = Symbol(), ih = /* @__PURE__ */ new WeakMap(); -class $f { +const Lr = window, Ba = Lr.ShadowRoot && (Lr.ShadyCSS === void 0 || Lr.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ou = Symbol(), eh = /* @__PURE__ */ new WeakMap(); +class kf { constructor(t, e, n) { if (this._$cssResult$ = !0, n !== ou) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead."); @@ -13,9 +13,9 @@ class $f { get styleSheet() { let t = this.o; const e = this.t; - if (Ha && t === void 0) { + if (Ba && t === void 0) { const n = e !== void 0 && e.length === 1; - n && (t = ih.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && ih.set(e, t)); + n && (t = eh.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && eh.set(e, t)); } return t; } @@ -23,12 +23,12 @@ class $f { return this.cssText; } } -const yt = (i) => new $f(typeof i == "string" ? i : i + "", void 0, ou), Bf = (i, t) => { - Ha ? i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => { - const n = document.createElement("style"), s = Ir.litNonce; +const yt = (i) => new kf(typeof i == "string" ? i : i + "", void 0, ou), Xf = (i, t) => { + Ba ? i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => { + const n = document.createElement("style"), s = Lr.litNonce; s !== void 0 && n.setAttribute("nonce", s), n.textContent = e.cssText, i.appendChild(n); }); -}, nh = Ha ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => { +}, ih = Ba ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => { let e = ""; for (const n of t.cssRules) e += n.cssText; @@ -39,11 +39,11 @@ const yt = (i) => new $f(typeof i == "string" ? i : i + "", void 0, ou), Bf = (i * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var Go; -const Fr = window, sh = Fr.trustedTypes, zf = sh ? sh.emptyScript : "", rh = Fr.reactiveElementPolyfillSupport, ha = { toAttribute(i, t) { +var Do; +const zr = window, nh = zr.trustedTypes, Gf = nh ? nh.emptyScript : "", sh = zr.reactiveElementPolyfillSupport, aa = { toAttribute(i, t) { switch (t) { case Boolean: - i = i ? zf : null; + i = i ? Gf : null; break; case Object: case Array: @@ -68,8 +68,8 @@ const Fr = window, sh = Fr.trustedTypes, zf = sh ? sh.emptyScript : "", rh = Fr. } } return e; -} }, au = (i, t) => t !== i && (t == t || i == i), $o = { attribute: !0, type: String, converter: ha, reflect: !1, hasChanged: au }; -class vn extends HTMLElement { +} }, au = (i, t) => t !== i && (t == t || i == i), jo = { attribute: !0, type: String, converter: aa, reflect: !1, hasChanged: au }; +class xn extends HTMLElement { constructor() { super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u(); } @@ -85,7 +85,7 @@ class vn extends HTMLElement { s !== void 0 && (this._$Ev.set(s, n), t.push(s)); }), t; } - static createProperty(t, e = $o) { + static createProperty(t, e = jo) { if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) { const n = typeof t == "symbol" ? Symbol() : "__" + t, s = this.getPropertyDescriptor(t, n, e); s !== void 0 && Object.defineProperty(this.prototype, t, s); @@ -100,7 +100,7 @@ class vn extends HTMLElement { }, configurable: !0, enumerable: !0 }; } static getPropertyOptions(t) { - return this.elementProperties.get(t) || $o; + return this.elementProperties.get(t) || jo; } static finalize() { if (this.hasOwnProperty("finalized")) @@ -119,9 +119,9 @@ class vn extends HTMLElement { if (Array.isArray(t)) { const n = new Set(t.flat(1 / 0).reverse()); for (const s of n) - e.unshift(nh(s)); + e.unshift(ih(s)); } else - t !== void 0 && e.push(nh(t)); + t !== void 0 && e.push(ih(t)); return e; } static _$Ep(t, e) { @@ -148,7 +148,7 @@ class vn extends HTMLElement { createRenderRoot() { var t; const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions); - return Bf(e, this.constructor.elementStyles), e; + return Xf(e, this.constructor.elementStyles), e; } connectedCallback() { var t; @@ -169,11 +169,11 @@ class vn extends HTMLElement { attributeChangedCallback(t, e, n) { this._$AK(t, n); } - _$EO(t, e, n = $o) { + _$EO(t, e, n = jo) { var s; const r = this.constructor._$Ep(t, n); if (r !== void 0 && n.reflect === !0) { - const o = (((s = n.converter) === null || s === void 0 ? void 0 : s.toAttribute) !== void 0 ? n.converter : ha).toAttribute(e, n.type); + const o = (((s = n.converter) === null || s === void 0 ? void 0 : s.toAttribute) !== void 0 ? n.converter : aa).toAttribute(e, n.type); this._$El = t, o == null ? this.removeAttribute(r) : this.setAttribute(r, o), this._$El = null; } } @@ -181,7 +181,7 @@ class vn extends HTMLElement { var n; const s = this.constructor, r = s._$Ev.get(t); if (r !== void 0 && this._$El !== r) { - const o = s.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) === null || n === void 0 ? void 0 : n.fromAttribute) !== void 0 ? o.converter : ha; + const o = s.getPropertyOptions(r), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((n = o.converter) === null || n === void 0 ? void 0 : n.fromAttribute) !== void 0 ? o.converter : aa; this._$El = r, this[r] = a.fromAttribute(e, o.type), this._$El = null; } } @@ -248,49 +248,49 @@ class vn extends HTMLElement { firstUpdated(t) { } } -vn.finalized = !0, vn.elementProperties = /* @__PURE__ */ new Map(), vn.elementStyles = [], vn.shadowRootOptions = { mode: "open" }, rh == null || rh({ ReactiveElement: vn }), ((Go = Fr.reactiveElementVersions) !== null && Go !== void 0 ? Go : Fr.reactiveElementVersions = []).push("1.6.1"); +xn.finalized = !0, xn.elementProperties = /* @__PURE__ */ new Map(), xn.elementStyles = [], xn.shadowRootOptions = { mode: "open" }, sh == null || sh({ ReactiveElement: xn }), ((Do = zr.reactiveElementVersions) !== null && Do !== void 0 ? Do : zr.reactiveElementVersions = []).push("1.5.0"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var Bo; -const Dr = window, Fn = Dr.trustedTypes, oh = Fn ? Fn.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, kr = "$lit$", ei = `lit$${(Math.random() + "").slice(9)}$`, Xa = "?" + ei, Zf = `<${Xa}>`, Dn = document, Es = () => Dn.createComment(""), ws = (i) => i === null || typeof i != "object" && typeof i != "function", lu = Array.isArray, hu = (i) => lu(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", zo = `[ \f\r]`, ls = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ah = /-->/g, lh = />/g, Fi = RegExp(`>|${zo}(?:([^\\s"'>=/]+)(${zo}*=${zo}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`, "g"), hh = /'/g, ch = /"/g, cu = /^(?:script|style|textarea|title)$/i, Uf = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), Lt = Uf(1), Si = Symbol.for("lit-noChange"), bt = Symbol.for("lit-nothing"), uh = /* @__PURE__ */ new WeakMap(), An = Dn.createTreeWalker(Dn, 129, null, !1), uu = (i, t) => { +var ko; +const Fr = window, zn = Fr.trustedTypes, rh = zn ? zn.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, ei = `lit$${(Math.random() + "").slice(9)}$`, Wa = "?" + ei, Hf = `<${Wa}>`, Fn = document, Es = (i = "") => Fn.createComment(i), bs = (i) => i === null || typeof i != "object" && typeof i != "function", lu = Array.isArray, hu = (i) => lu(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", ls = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, oh = /-->/g, ah = />/g, zi = RegExp(`>|[ \f\r](?:([^\\s"'>=/]+)([ \f\r]*=[ \f\r]*(?:[^ \f\r"'\`<>=]|("|')|))|$)`, "g"), lh = /'/g, hh = /"/g, cu = /^(?:script|style|textarea|title)$/i, Zf = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), Ct = Zf(1), Pi = Symbol.for("lit-noChange"), Rt = Symbol.for("lit-nothing"), ch = /* @__PURE__ */ new WeakMap(), On = Fn.createTreeWalker(Fn, 129, null, !1), uu = (i, t) => { const e = i.length - 1, n = []; let s, r = t === 2 ? "" : "", o = ls; for (let l = 0; l < e; l++) { const h = i[l]; let c, u, d = -1, f = 0; for (; f < h.length && (o.lastIndex = f, u = o.exec(h), u !== null); ) - f = o.lastIndex, o === ls ? u[1] === "!--" ? o = ah : u[1] !== void 0 ? o = lh : u[2] !== void 0 ? (cu.test(u[2]) && (s = RegExp("" ? (o = s != null ? s : ls, d = -1) : u[1] === void 0 ? d = -2 : (d = o.lastIndex - u[2].length, c = u[1], o = u[3] === void 0 ? Fi : u[3] === '"' ? ch : hh) : o === ch || o === hh ? o = Fi : o === ah || o === lh ? o = ls : (o = Fi, s = void 0); - const g = o === Fi && i[l + 1].startsWith("/>") ? " " : ""; - r += o === ls ? h + Zf : d >= 0 ? (n.push(c), h.slice(0, d) + kr + h.slice(d) + ei + g) : h + ei + (d === -2 ? (n.push(void 0), l) : g); + f = o.lastIndex, o === ls ? u[1] === "!--" ? o = oh : u[1] !== void 0 ? o = ah : u[2] !== void 0 ? (cu.test(u[2]) && (s = RegExp("" ? (o = s != null ? s : ls, d = -1) : u[1] === void 0 ? d = -2 : (d = o.lastIndex - u[2].length, c = u[1], o = u[3] === void 0 ? zi : u[3] === '"' ? hh : lh) : o === hh || o === lh ? o = zi : o === oh || o === ah ? o = ls : (o = zi, s = void 0); + const g = o === zi && i[l + 1].startsWith("/>") ? " " : ""; + r += o === ls ? h + Hf : d >= 0 ? (n.push(c), h.slice(0, d) + "$lit$" + h.slice(d) + ei + g) : h + ei + (d === -2 ? (n.push(void 0), l) : g); } const a = r + (i[e] || "") + (t === 2 ? "" : ""); if (!Array.isArray(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array"); - return [oh !== void 0 ? oh.createHTML(a) : a, n]; + return [rh !== void 0 ? rh.createHTML(a) : a, n]; }; -class Ss { +class Ps { constructor({ strings: t, _$litType$: e }, n) { let s; this.parts = []; let r = 0, o = 0; const a = t.length - 1, l = this.parts, [h, c] = uu(t, e); - if (this.el = Ss.createElement(h, n), An.currentNode = this.el.content, e === 2) { + if (this.el = Ps.createElement(h, n), On.currentNode = this.el.content, e === 2) { const u = this.el.content, d = u.firstChild; d.remove(), u.append(...d.childNodes); } - for (; (s = An.nextNode()) !== null && l.length < a; ) { + for (; (s = On.nextNode()) !== null && l.length < a; ) { if (s.nodeType === 1) { if (s.hasAttributes()) { const u = []; for (const d of s.getAttributeNames()) - if (d.endsWith(kr) || d.startsWith(ei)) { + if (d.endsWith("$lit$") || d.startsWith(ei)) { const f = c[o++]; if (u.push(d), f !== void 0) { - const g = s.getAttribute(f.toLowerCase() + kr).split(ei), m = /([.?@])?(.*)/.exec(f); - l.push({ type: 1, index: r, name: m[2], strings: g, ctor: m[1] === "." ? fu : m[1] === "?" ? gu : m[1] === "@" ? mu : Zs }); + const g = s.getAttribute(f.toLowerCase() + "$lit$").split(ei), m = /([.?@])?(.*)/.exec(f); + l.push({ type: 1, index: r, name: m[2], strings: g, ctor: m[1] === "." ? fu : m[1] === "?" ? gu : m[1] === "@" ? mu : Hs }); } else l.push({ type: 6, index: r }); } @@ -300,14 +300,14 @@ class Ss { if (cu.test(s.tagName)) { const u = s.textContent.split(ei), d = u.length - 1; if (d > 0) { - s.textContent = Fn ? Fn.emptyScript : ""; + s.textContent = zn ? zn.emptyScript : ""; for (let f = 0; f < d; f++) - s.append(u[f], Es()), An.nextNode(), l.push({ type: 2, index: ++r }); + s.append(u[f], Es()), On.nextNode(), l.push({ type: 2, index: ++r }); s.append(u[d], Es()); } } } else if (s.nodeType === 8) - if (s.data === Xa) + if (s.data === Wa) l.push({ type: 2, index: r }); else { let u = -1; @@ -318,17 +318,17 @@ class Ss { } } static createElement(t, e) { - const n = Dn.createElement("template"); + const n = Fn.createElement("template"); return n.innerHTML = t, n; } } -function ji(i, t, e = i, n) { +function Ji(i, t, e = i, n) { var s, r, o, a; - if (t === Si) + if (t === Pi) return t; let l = n !== void 0 ? (s = e._$Co) === null || s === void 0 ? void 0 : s[n] : e._$Cl; - const h = ws(t) ? void 0 : t._$litDirective$; - return (l == null ? void 0 : l.constructor) !== h && ((r = l == null ? void 0 : l._$AO) === null || r === void 0 || r.call(l, !1), h === void 0 ? l = void 0 : (l = new h(i), l._$AT(i, e, n)), n !== void 0 ? ((o = (a = e)._$Co) !== null && o !== void 0 ? o : a._$Co = [])[n] = l : e._$Cl = l), l !== void 0 && (t = ji(i, l._$AS(i, t.values), l, n)), t; + const h = bs(t) ? void 0 : t._$litDirective$; + return (l == null ? void 0 : l.constructor) !== h && ((r = l == null ? void 0 : l._$AO) === null || r === void 0 || r.call(l, !1), h === void 0 ? l = void 0 : (l = new h(i), l._$AT(i, e, n)), n !== void 0 ? ((o = (a = e)._$Co) !== null && o !== void 0 ? o : a._$Co = [])[n] = l : e._$Cl = l), l !== void 0 && (t = Ji(i, l._$AS(i, t.values), l, n)), t; } class du { constructor(t, e) { @@ -342,15 +342,15 @@ class du { } v(t) { var e; - const { el: { content: n }, parts: s } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : Dn).importNode(n, !0); - An.currentNode = r; - let o = An.nextNode(), a = 0, l = 0, h = s[0]; + const { el: { content: n }, parts: s } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : Fn).importNode(n, !0); + On.currentNode = r; + let o = On.nextNode(), a = 0, l = 0, h = s[0]; for (; h !== void 0; ) { if (a === h.index) { let c; - h.type === 2 ? c = new Kn(o, o.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(o, h.name, h.strings, this, t) : h.type === 6 && (c = new pu(o, this, t)), this.u.push(c), h = s[++l]; + h.type === 2 ? c = new qn(o, o.nextSibling, this, t) : h.type === 1 ? c = new h.ctor(o, h.name, h.strings, this, t) : h.type === 6 && (c = new pu(o, this, t)), this.u.push(c), h = s[++l]; } - a !== (h == null ? void 0 : h.index) && (o = An.nextNode(), a++); + a !== (h == null ? void 0 : h.index) && (o = On.nextNode(), a++); } return r; } @@ -360,10 +360,10 @@ class du { n !== void 0 && (n.strings !== void 0 ? (n._$AI(t, n, e), e += n.strings.length - 2) : n._$AI(t[e])), e++; } } -class Kn { +class qn { constructor(t, e, n, s) { var r; - this.type = 2, this._$AH = bt, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = n, this.options = s, this._$Cm = (r = s == null ? void 0 : s.isConnected) === null || r === void 0 || r; + this.type = 2, this._$AH = Rt, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = n, this.options = s, this._$Cm = (r = s == null ? void 0 : s.isConnected) === null || r === void 0 || r; } get _$AU() { var t, e; @@ -372,7 +372,7 @@ class Kn { get parentNode() { let t = this._$AA.parentNode; const e = this._$AM; - return e !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = e.parentNode), t; + return e !== void 0 && t.nodeType === 11 && (t = e.parentNode), t; } get startNode() { return this._$AA; @@ -381,20 +381,20 @@ class Kn { return this._$AB; } _$AI(t, e = this) { - t = ji(this, t, e), ws(t) ? t === bt || t == null || t === "" ? (this._$AH !== bt && this._$AR(), this._$AH = bt) : t !== this._$AH && t !== Si && this.g(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : hu(t) ? this.k(t) : this.g(t); + t = Ji(this, t, e), bs(t) ? t === Rt || t == null || t === "" ? (this._$AH !== Rt && this._$AR(), this._$AH = Rt) : t !== this._$AH && t !== Pi && this.g(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : hu(t) ? this.k(t) : this.g(t); } - S(t) { - return this._$AA.parentNode.insertBefore(t, this._$AB); + O(t, e = this._$AB) { + return this._$AA.parentNode.insertBefore(t, e); } T(t) { - this._$AH !== t && (this._$AR(), this._$AH = this.S(t)); + this._$AH !== t && (this._$AR(), this._$AH = this.O(t)); } g(t) { - this._$AH !== bt && ws(this._$AH) ? this._$AA.nextSibling.data = t : this.T(Dn.createTextNode(t)), this._$AH = t; + this._$AH !== Rt && bs(this._$AH) ? this._$AA.nextSibling.data = t : this.T(Fn.createTextNode(t)), this._$AH = t; } $(t) { var e; - const { values: n, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = Ss.createElement(s.h, this.options)), s); + const { values: n, _$litType$: s } = t, r = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = Ps.createElement(s.h, this.options)), s); if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === r) this._$AH.p(n); else { @@ -403,15 +403,15 @@ class Kn { } } _$AC(t) { - let e = uh.get(t.strings); - return e === void 0 && uh.set(t.strings, e = new Ss(t)), e; + let e = ch.get(t.strings); + return e === void 0 && ch.set(t.strings, e = new Ps(t)), e; } k(t) { lu(this._$AH) || (this._$AH = [], this._$AR()); const e = this._$AH; let n, s = 0; for (const r of t) - s === e.length ? e.push(n = new Kn(this.S(Es()), this.S(Es()), this, this.options)) : n = e[s], n._$AI(r), s++; + s === e.length ? e.push(n = new qn(this.O(Es()), this.O(Es()), this, this.options)) : n = e[s], n._$AI(r), s++; s < e.length && (this._$AR(n && n._$AB.nextSibling, s), e.length = s); } _$AR(t = this._$AA.nextSibling, e) { @@ -426,9 +426,9 @@ class Kn { this._$AM === void 0 && (this._$Cm = t, (e = this._$AP) === null || e === void 0 || e.call(this, t)); } } -class Zs { +class Hs { constructor(t, e, n, s, r) { - this.type = 1, this._$AH = bt, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = r, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(new String()), this.strings = n) : this._$AH = bt; + this.type = 1, this._$AH = Rt, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = r, n.length > 2 || n[0] !== "" || n[1] !== "" ? (this._$AH = Array(n.length - 1).fill(new String()), this.strings = n) : this._$AH = Rt; } get tagName() { return this.element.tagName; @@ -440,45 +440,45 @@ class Zs { const r = this.strings; let o = !1; if (r === void 0) - t = ji(this, t, e, 0), o = !ws(t) || t !== this._$AH && t !== Si, o && (this._$AH = t); + t = Ji(this, t, e, 0), o = !bs(t) || t !== this._$AH && t !== Pi, o && (this._$AH = t); else { const a = t; let l, h; for (t = r[0], l = 0; l < r.length - 1; l++) - h = ji(this, a[n + l], e, l), h === Si && (h = this._$AH[l]), o || (o = !ws(h) || h !== this._$AH[l]), h === bt ? t = bt : t !== bt && (t += (h != null ? h : "") + r[l + 1]), this._$AH[l] = h; + h = Ji(this, a[n + l], e, l), h === Pi && (h = this._$AH[l]), o || (o = !bs(h) || h !== this._$AH[l]), h === Rt ? t = Rt : t !== Rt && (t += (h != null ? h : "") + r[l + 1]), this._$AH[l] = h; } o && !s && this.j(t); } j(t) { - t === bt ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t != null ? t : ""); + t === Rt ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t != null ? t : ""); } } -class fu extends Zs { +class fu extends Hs { constructor() { super(...arguments), this.type = 3; } j(t) { - this.element[this.name] = t === bt ? void 0 : t; + this.element[this.name] = t === Rt ? void 0 : t; } } -const Vf = Fn ? Fn.emptyScript : ""; -class gu extends Zs { +const Bf = zn ? zn.emptyScript : ""; +class gu extends Hs { constructor() { super(...arguments), this.type = 4; } j(t) { - t && t !== bt ? this.element.setAttribute(this.name, Vf) : this.element.removeAttribute(this.name); + t && t !== Rt ? this.element.setAttribute(this.name, Bf) : this.element.removeAttribute(this.name); } } -class mu extends Zs { +class mu extends Hs { constructor(t, e, n, s, r) { super(t, e, n, s, r), this.type = 5; } _$AI(t, e = this) { var n; - if ((t = (n = ji(this, t, e, 0)) !== null && n !== void 0 ? n : bt) === Si) + if ((t = (n = Ji(this, t, e, 0)) !== null && n !== void 0 ? n : Rt) === Pi) return; - const s = this._$AH, r = t === bt && s !== bt || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== bt && (s === bt || r); + const s = this._$AH, r = t === Rt && s !== Rt || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== Rt && (s === Rt || r); r && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t; } handleEvent(t) { @@ -494,18 +494,18 @@ class pu { return this._$AM._$AU; } _$AI(t) { - ji(this, t); + Ji(this, t); } } -const Wf = { P: kr, A: ei, M: Xa, C: 1, L: uu, D: du, R: hu, V: ji, I: Kn, H: Zs, N: gu, U: mu, F: fu, B: pu }, dh = Dr.litHtmlPolyfillSupport; -dh == null || dh(Ss, Kn), ((Bo = Dr.litHtmlVersions) !== null && Bo !== void 0 ? Bo : Dr.litHtmlVersions = []).push("2.7.0"); -const _u = (i, t, e) => { +const Wf = { P: "$lit$", A: ei, M: Wa, C: 1, L: uu, R: du, D: hu, V: Ji, I: qn, H: Hs, N: gu, U: mu, B: fu, F: pu }, uh = Fr.litHtmlPolyfillSupport; +uh == null || uh(Ps, qn), ((ko = Fr.litHtmlVersions) !== null && ko !== void 0 ? ko : Fr.litHtmlVersions = []).push("2.5.0"); +const vu = (i, t, e) => { var n, s; const r = (n = e == null ? void 0 : e.renderBefore) !== null && n !== void 0 ? n : t; let o = r._$litPart$; if (o === void 0) { const a = (s = e == null ? void 0 : e.renderBefore) !== null && s !== void 0 ? s : null; - r._$litPart$ = o = new Kn(t.insertBefore(Es(), a), a, void 0, e != null ? e : {}); + r._$litPart$ = o = new qn(t.insertBefore(Es(), a), a, void 0, e != null ? e : {}); } return o._$AI(i), o; }; @@ -514,8 +514,8 @@ const _u = (i, t, e) => { * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var Zo, Uo; -class Pt extends vn { +var Xo, Go; +class At extends xn { constructor() { super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0; } @@ -526,7 +526,7 @@ class Pt extends vn { } update(t) { const e = this.render(); - this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = _u(e, this.renderRoot, this.renderOptions); + this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = vu(e, this.renderRoot, this.renderOptions); } connectedCallback() { var t; @@ -537,19 +537,19 @@ class Pt extends vn { super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1); } render() { - return Si; + return Pi; } } -Pt.finalized = !0, Pt._$litElement$ = !0, (Zo = globalThis.litElementHydrateSupport) === null || Zo === void 0 || Zo.call(globalThis, { LitElement: Pt }); -const fh = globalThis.litElementPolyfillSupport; -fh == null || fh({ LitElement: Pt }); -((Uo = globalThis.litElementVersions) !== null && Uo !== void 0 ? Uo : globalThis.litElementVersions = []).push("3.3.0"); +At.finalized = !0, At._$litElement$ = !0, (Xo = globalThis.litElementHydrateSupport) === null || Xo === void 0 || Xo.call(globalThis, { LitElement: At }); +const dh = globalThis.litElementPolyfillSupport; +dh == null || dh({ LitElement: At }); +((Go = globalThis.litElementVersions) !== null && Go !== void 0 ? Go : globalThis.litElementVersions = []).push("3.2.2"); /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const qt = (i) => (t) => typeof t == "function" ? ((e, n) => (customElements.define(e, n), n))(i, t) : ((e, n) => { +const Kt = (i) => (t) => typeof t == "function" ? ((e, n) => (customElements.define(e, n), n))(i, t) : ((e, n) => { const { kind: s, elements: r } = n; return { kind: s, elements: r, finisher(o) { customElements.define(e, o); @@ -560,7 +560,7 @@ const qt = (i) => (t) => typeof t == "function" ? ((e, n) => (customElements.def * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Hf = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) { +const Vf = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) { e.createProperty(t.key, i); } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() { typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this)); @@ -570,14 +570,14 @@ const Hf = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descr function Te(i) { return (t, e) => e !== void 0 ? ((n, s, r) => { s.constructor.createProperty(r, n); - })(i, t, e) : Hf(i, t); + })(i, t, e) : Vf(i, t); } /** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -function It(i) { +function Lt(i) { return Te({ ...i, state: !0 }); } /** @@ -585,7 +585,7 @@ function It(i) { * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Xf = ({ finisher: i, descriptor: t }) => (e, n) => { +const Yf = ({ finisher: i, descriptor: t }) => (e, n) => { var s; if (n === void 0) { const r = (s = e.originalKey) !== null && s !== void 0 ? s : e.key, o = t != null ? { kind: "method", placement: "prototype", key: r, descriptor: t(e.key) } : { ...e, key: r }; @@ -603,8 +603,8 @@ const Xf = ({ finisher: i, descriptor: t }) => (e, n) => { * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -function Ya(i, t) { - return Xf({ descriptor: (e) => { +function Va(i, t) { + return Yf({ descriptor: (e) => { const n = { get() { var s, r; return (r = (s = this.renderRoot) === null || s === void 0 ? void 0 : s.querySelector(i)) !== null && r !== void 0 ? r : null; @@ -624,9 +624,9 @@ function Ya(i, t) { * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -var Vo; -((Vo = window.HTMLSlotElement) === null || Vo === void 0 ? void 0 : Vo.prototype.assignedElements) != null; -class Yf { +var Ho; +((Ho = window.HTMLSlotElement) === null || Ho === void 0 ? void 0 : Ho.prototype.assignedElements) != null; +class Uf { constructor(t) { this.propagationStopped, this.defaultPrevented, this.type = t, this.target = null; } @@ -637,10 +637,10 @@ class Yf { this.propagationStopped = !0; } } -const ze = Yf, kn = { +const Ge = Uf, Dn = { PROPERTYCHANGE: "propertychange" }; -class jf { +class Jf { constructor() { this.disposed = !1; } @@ -650,19 +650,19 @@ class jf { disposeInternal() { } } -const ja = jf; -function Kf(i, t, e) { +const Ya = Jf; +function qf(i, t, e) { let n, s; - e = e || Ki; + e = e || qi; let r = 0, o = i.length, a = !1; for (; r < o; ) n = r + (o - r >> 1), s = +e(i[n], t), s < 0 ? r = n + 1 : (o = n, a = !s); return a ? r : ~r; } -function Ki(i, t) { +function qi(i, t) { return i > t ? 1 : i < t ? -1 : 0; } -function Ka(i, t, e) { +function Ua(i, t, e) { const n = i.length; if (i[0] <= t) return 0; @@ -688,13 +688,13 @@ function Ka(i, t, e) { return n - 1; } } -function qf(i, t, e) { +function Kf(i, t, e) { for (; t < e; ) { const n = i[t]; i[t] = i[e], i[e] = n, ++t, --e; } } -function Kt(i, t) { +function qt(i, t) { const e = Array.isArray(t) ? t : [t], n = e.length; for (let s = 0; s < n; s++) i[i.length] = e[s]; @@ -708,8 +708,8 @@ function sn(i, t) { return !1; return !0; } -function Jf(i, t, e) { - const n = t || Ki; +function Qf(i, t, e) { + const n = t || qi; return i.every(function(s, r) { if (r === 0) return !0; @@ -717,32 +717,32 @@ function Jf(i, t, e) { return !(o > 0 || e && o === 0); }); } -function Rs() { +function Ss() { return !0; } -function ho() { +function lo() { return !1; } -function qi() { +function Ki() { } -function Qf(i) { +function $f(i) { let t = !1, e, n, s; return function() { const r = Array.prototype.slice.call(arguments); return (!t || this !== s || !sn(r, n)) && (t = !0, s = this, n = r, e = i.apply(this, arguments)), e; }; } -function Us(i) { +function Zs(i) { for (const t in i) delete i[t]; } -function Gn(i) { +function jn(i) { let t; for (t in i) return !1; return !t; } -class t0 extends ja { +class t0 extends Ya { constructor(t) { super(), this.eventTarget_ = t, this.pendingRemovals_ = null, this.dispatching_ = null, this.listeners_ = null; } @@ -756,7 +756,7 @@ class t0 extends ja { const e = typeof t == "string", n = e ? t : t.type, s = this.listeners_ && this.listeners_[n]; if (!s) return; - const r = e ? new ze(t) : t; + const r = e ? new Ge(t) : t; r.target || (r.target = this.eventTarget_ || this); const o = this.dispatching_ || (this.dispatching_ = {}), a = this.pendingRemovals_ || (this.pendingRemovals_ = {}); n in o || (o[n] = 0, a[n] = 0), ++o[n]; @@ -769,13 +769,13 @@ class t0 extends ja { if (--o[n] === 0) { let h = a[n]; for (delete a[n]; h--; ) - this.removeEventListener(n, qi); + this.removeEventListener(n, Ki); delete o[n]; } return l; } disposeInternal() { - this.listeners_ && Us(this.listeners_); + this.listeners_ && Zs(this.listeners_); } getListeners(t) { return this.listeners_ && this.listeners_[t] || void 0; @@ -787,11 +787,11 @@ class t0 extends ja { const n = this.listeners_ && this.listeners_[t]; if (n) { const s = n.indexOf(e); - s !== -1 && (this.pendingRemovals_ && t in this.pendingRemovals_ ? (n[s] = qi, ++this.pendingRemovals_[t]) : (n.splice(s, 1), n.length === 0 && delete this.listeners_[t])); + s !== -1 && (this.pendingRemovals_ && t in this.pendingRemovals_ ? (n[s] = Ki, ++this.pendingRemovals_[t]) : (n.splice(s, 1), n.length === 0 && delete this.listeners_[t])); } } } -const co = t0, H = { +const ho = t0, V = { CHANGE: "change", ERROR: "error", BLUR: "blur", @@ -824,18 +824,18 @@ function et(i, t, e, n, s) { }; return i.addEventListener(t, e), r; } -function Gr(i, t, e, n) { +function Dr(i, t, e, n) { return et(i, t, e, n, !0); } function pt(i) { - i && i.target && (i.target.removeEventListener(i.type, i.listener), Us(i)); + i && i.target && (i.target.removeEventListener(i.type, i.listener), Zs(i)); } -class uo extends co { +class co extends ho { constructor() { super(), this.on = this.onInternal, this.once = this.onceInternal, this.un = this.unInternal, this.revision_ = 0; } changed() { - ++this.revision_, this.dispatchEvent(H.CHANGE); + ++this.revision_, this.dispatchEvent(V.CHANGE); } getRevision() { return this.revision_; @@ -855,9 +855,9 @@ class uo extends co { const s = t.length; n = new Array(s); for (let r = 0; r < s; ++r) - n[r] = Gr(this, t[r], e); + n[r] = Dr(this, t[r], e); } else - n = Gr(this, t, e); + n = Dr(this, t, e); return e.ol_key = n, n; } unInternal(t, e) { @@ -871,9 +871,9 @@ class uo extends co { this.removeEventListener(t, e); } } -uo.prototype.on; -uo.prototype.once; -uo.prototype.un; +co.prototype.on; +co.prototype.once; +co.prototype.un; function e0(i) { if (Array.isArray(i)) for (let t = 0, e = i.length; t < e; ++t) @@ -881,15 +881,15 @@ function e0(i) { else pt(i); } -const yu = uo; -function V() { +const yu = co; +function B() { throw new Error("Unimplemented abstract method."); } let i0 = 0; function rt(i) { return i.ol_uid || (i.ol_uid = String(++i0)); } -class gh extends ze { +class fh extends Ge { constructor(t, e, n) { super(t), this.key = e, this.oldValue = n; } @@ -913,7 +913,7 @@ class n0 extends yu { } notify(t, e) { let n; - n = `change:${t}`, this.hasListener(n) && this.dispatchEvent(new gh(n, t, e)), n = kn.PROPERTYCHANGE, this.hasListener(n) && this.dispatchEvent(new gh(n, t, e)); + n = `change:${t}`, this.hasListener(n) && this.dispatchEvent(new fh(n, t, e)), n = Dn.PROPERTYCHANGE, this.hasListener(n) && this.dispatchEvent(new fh(n, t, e)); } addChangeListener(t, e) { this.addEventListener(`change:${t}`, e); @@ -940,7 +940,7 @@ class n0 extends yu { unset(t, e) { if (this.values_ && t in this.values_) { const n = this.values_[t]; - delete this.values_[t], Gn(this.values_) && (this.values_ = null), e || this.notify(t, n); + delete this.values_[t], jn(this.values_) && (this.values_ = null), e || this.notify(t, n); } } } @@ -1008,13 +1008,13 @@ class r0 extends Error { super(e), this.code = t, this.name = "AssertionError", this.message = e; } } -const vu = r0, ee = { +const xu = r0, ee = { ADD: "add", REMOVE: "remove" -}, mh = { +}, gh = { LENGTH: "length" }; -class fr extends ze { +class fr extends Ge { constructor(t, e, n) { super(t), this.element = e, this.index = n; } @@ -1047,7 +1047,7 @@ class o0 extends Ce { return this.array_[t]; } getLength() { - return this.get(mh.LENGTH); + return this.get(gh.LENGTH); } insertAt(t, e) { if (t < 0 || t > this.getLength()) @@ -1095,17 +1095,17 @@ class o0 extends Ce { ); } updateLength_() { - this.set(mh.LENGTH, this.array_.length); + this.set(gh.LENGTH, this.array_.length); } assertUnique_(t, e) { for (let n = 0, s = this.array_.length; n < s; ++n) if (this.array_[n] === t && n !== e) - throw new vu(58); + throw new xu(58); } } -const Oe = o0, Ri = typeof navigator < "u" && typeof navigator.userAgent < "u" ? navigator.userAgent.toLowerCase() : "", a0 = Ri.includes("firefox"), l0 = Ri.includes("safari") && !Ri.includes("chrom"); -l0 && (Ri.includes("version/15.4") || /cpu (os|iphone os) 15_4 like mac os x/.test(Ri)); -const h0 = Ri.includes("webkit") && !Ri.includes("edge"), c0 = Ri.includes("macintosh"), xu = typeof devicePixelRatio < "u" ? devicePixelRatio : 1, qa = typeof WorkerGlobalScope < "u" && typeof OffscreenCanvas < "u" && self instanceof WorkerGlobalScope, u0 = typeof Image < "u" && Image.prototype.decode, Cu = function() { +const Ie = o0, Si = typeof navigator < "u" && typeof navigator.userAgent < "u" ? navigator.userAgent.toLowerCase() : "", a0 = Si.includes("firefox"), l0 = Si.includes("safari") && !Si.includes("chrom"); +l0 && (Si.includes("version/15.4") || /cpu (os|iphone os) 15_4 like mac os x/.test(Si)); +const h0 = Si.includes("webkit") && !Si.includes("edge"), c0 = Si.includes("macintosh"), Mu = typeof devicePixelRatio < "u" ? devicePixelRatio : 1, Ja = typeof WorkerGlobalScope < "u" && typeof OffscreenCanvas < "u" && self instanceof WorkerGlobalScope, u0 = typeof Image < "u" && Image.prototype.decode, Cu = function() { let i = !1; try { const t = Object.defineProperty({}, "passive", { @@ -1118,12 +1118,12 @@ const h0 = Ri.includes("webkit") && !Ri.includes("edge"), c0 = Ri.includes("maci } return i; }(); -function X(i, t) { +function Y(i, t) { if (!i) - throw new vu(t); + throw new xu(t); } new Array(6); -function De() { +function Fe() { return [1, 0, 0, 1, 0, 0]; } function d0(i, t) { @@ -1136,35 +1136,35 @@ function f0(i, t, e, n, s, r, o) { function g0(i, t) { return i[0] = t[0], i[1] = t[1], i[2] = t[2], i[3] = t[3], i[4] = t[4], i[5] = t[5], i; } -function Dt(i, t) { +function Ft(i, t) { const e = t[0], n = t[1]; return t[0] = i[0] * e + i[2] * n + i[4], t[1] = i[1] * e + i[3] * n + i[5], t; } function m0(i, t, e) { return f0(i, t, 0, 0, e, 0, 0); } -function bi(i, t, e, n, s, r, o, a) { +function _i(i, t, e, n, s, r, o, a) { const l = Math.sin(r), h = Math.cos(r); return i[0] = n * h, i[1] = s * l, i[2] = -n * l, i[3] = s * h, i[4] = o * n * h - a * n * l + t, i[5] = o * s * l + a * s * h + e, i; } -function Ja(i, t) { +function qa(i, t) { const e = p0(t); - X(e !== 0, 32); + Y(e !== 0, 32); const n = t[0], s = t[1], r = t[2], o = t[3], a = t[4], l = t[5]; return i[0] = o / e, i[1] = -s / e, i[2] = -r / e, i[3] = n / e, i[4] = (r * l - o * a) / e, i[5] = -(n * l - s * a) / e, i; } function p0(i) { return i[0] * i[3] - i[1] * i[2]; } -let ph; -function Mu(i) { +let mh; +function wu(i) { const t = "matrix(" + i.join(", ") + ")"; - if (qa) + if (Ja) return t; - const e = ph || (ph = document.createElement("div")); + const e = mh || (mh = document.createElement("div")); return e.style.transform = t, e.style.transform; } -const Ft = { +const zt = { UNKNOWN: 0, INTERSECTING: 1, ABOVE: 2, @@ -1172,17 +1172,17 @@ const Ft = { BELOW: 8, LEFT: 16 }; -function ca(i) { +function la(i) { const t = fe(); for (let e = 0, n = i.length; e < n; ++e) ys(t, i[e]); return t; } -function _0(i, t, e) { +function v0(i, t, e) { const n = Math.min.apply(null, i), s = Math.min.apply(null, t), r = Math.max.apply(null, i), o = Math.max.apply(null, t); - return xe(n, s, r, o, e); + return Me(n, s, r, o, e); } -function fo(i, t, e) { +function uo(i, t, e) { return e ? (e[0] = i[0] - t, e[1] = i[1] - t, e[2] = i[2] + t, e[3] = i[3] + t, e) : [ i[0] - t, i[1] - t, @@ -1197,47 +1197,47 @@ function rn(i, t, e) { let n, s; return t < i[0] ? n = i[0] - t : i[2] < t ? n = t - i[2] : n = 0, e < i[1] ? s = i[1] - e : i[3] < e ? s = e - i[3] : s = 0, n * n + s * s; } -function go(i, t) { - return Qa(i, t[0], t[1]); +function fo(i, t) { + return Ka(i, t[0], t[1]); } -function xi(i, t) { +function Mi(i, t) { return i[0] <= t[0] && t[2] <= i[2] && i[1] <= t[1] && t[3] <= i[3]; } -function Qa(i, t, e) { +function Ka(i, t, e) { return i[0] <= t && t <= i[2] && i[1] <= e && e <= i[3]; } -function ua(i, t) { +function ha(i, t) { const e = i[0], n = i[1], s = i[2], r = i[3], o = t[0], a = t[1]; - let l = Ft.UNKNOWN; - return o < e ? l = l | Ft.LEFT : o > s && (l = l | Ft.RIGHT), a < n ? l = l | Ft.BELOW : a > r && (l = l | Ft.ABOVE), l === Ft.UNKNOWN && (l = Ft.INTERSECTING), l; + let l = zt.UNKNOWN; + return o < e ? l = l | zt.LEFT : o > s && (l = l | zt.RIGHT), a < n ? l = l | zt.BELOW : a > r && (l = l | zt.ABOVE), l === zt.UNKNOWN && (l = zt.INTERSECTING), l; } function fe() { return [1 / 0, 1 / 0, -1 / 0, -1 / 0]; } -function xe(i, t, e, n, s) { +function Me(i, t, e, n, s) { return s ? (s[0] = i, s[1] = t, s[2] = e, s[3] = n, s) : [i, t, e, n]; } -function Vs(i) { - return xe(1 / 0, 1 / 0, -1 / 0, -1 / 0, i); +function Bs(i) { + return Me(1 / 0, 1 / 0, -1 / 0, -1 / 0, i); } -function wu(i, t) { +function bu(i, t) { const e = i[0], n = i[1]; - return xe(e, n, e, n, t); + return Me(e, n, e, n, t); } -function Su(i, t, e, n, s) { - const r = Vs(s); - return bu(r, i, t, e, n); +function Pu(i, t, e, n, s) { + const r = Bs(s); + return _u(r, i, t, e, n); } -function bs(i, t) { +function _s(i, t) { return i[0] == t[0] && i[2] == t[2] && i[1] == t[1] && i[3] == t[3]; } -function Ru(i, t) { +function Su(i, t) { return t[0] < i[0] && (i[0] = t[0]), t[2] > i[2] && (i[2] = t[2]), t[1] < i[1] && (i[1] = t[1]), t[3] > i[3] && (i[3] = t[3]), i; } function ys(i, t) { t[0] < i[0] && (i[0] = t[0]), t[0] > i[2] && (i[2] = t[0]), t[1] < i[1] && (i[1] = t[1]), t[1] > i[3] && (i[3] = t[1]); } -function bu(i, t, e, n, s) { +function _u(i, t, e, n, s) { for (; e < n; e += s) y0(i, t[e], t[e + 1]); return i; @@ -1245,35 +1245,35 @@ function bu(i, t, e, n, s) { function y0(i, t, e) { i[0] = Math.min(i[0], t), i[1] = Math.min(i[1], e), i[2] = Math.max(i[2], t), i[3] = Math.max(i[3], e); } -function Lu(i, t) { +function Ru(i, t) { let e; - return e = t(mo(i)), e || (e = t(po(i)), e) || (e = t(_o(i)), e) || (e = t(Pi(i)), e) ? e : !1; + return e = t(go(i)), e || (e = t(mo(i)), e) || (e = t(po(i)), e) || (e = t(Ai(i)), e) ? e : !1; } -function da(i) { +function ca(i) { let t = 0; - return tl(i) || (t = mt(i) * Ge(i)), t; + return Qa(i) || (t = mt(i) * je(i)), t; } -function mo(i) { +function go(i) { return [i[0], i[1]]; } -function po(i) { +function mo(i) { return [i[2], i[1]]; } -function Li(i) { +function Ri(i) { return [(i[0] + i[2]) / 2, (i[1] + i[3]) / 2]; } -function v0(i, t) { +function x0(i, t) { let e; - return t === "bottom-left" ? e = mo(i) : t === "bottom-right" ? e = po(i) : t === "top-left" ? e = Pi(i) : t === "top-right" ? e = _o(i) : X(!1, 13), e; + return t === "bottom-left" ? e = go(i) : t === "bottom-right" ? e = mo(i) : t === "top-left" ? e = Ai(i) : t === "top-right" ? e = po(i) : Y(!1, 13), e; } -function fa(i, t, e, n, s) { - const [r, o, a, l, h, c, u, d] = ga( +function ua(i, t, e, n, s) { + const [r, o, a, l, h, c, u, d] = da( i, t, e, n ); - return xe( + return Me( Math.min(r, a, h, u), Math.min(o, l, c, d), Math.max(r, a, h, u), @@ -1281,7 +1281,7 @@ function fa(i, t, e, n, s) { s ); } -function ga(i, t, e, n) { +function da(i, t, e, n) { const s = t * n[0] / 2, r = t * n[1] / 2, o = Math.cos(e), a = Math.sin(e), l = s * o, h = s * a, c = r * o, u = r * a, d = i[0], f = i[1]; return [ d - l + u, @@ -1296,17 +1296,17 @@ function ga(i, t, e, n) { f - h - c ]; } -function Ge(i) { +function je(i) { return i[3] - i[1]; } -function vs(i, t, e) { +function xs(i, t, e) { const n = e || fe(); - return ie(i, t) ? (i[0] > t[0] ? n[0] = i[0] : n[0] = t[0], i[1] > t[1] ? n[1] = i[1] : n[1] = t[1], i[2] < t[2] ? n[2] = i[2] : n[2] = t[2], i[3] < t[3] ? n[3] = i[3] : n[3] = t[3]) : Vs(n), n; + return ie(i, t) ? (i[0] > t[0] ? n[0] = i[0] : n[0] = t[0], i[1] > t[1] ? n[1] = i[1] : n[1] = t[1], i[2] < t[2] ? n[2] = i[2] : n[2] = t[2], i[3] < t[3] ? n[3] = i[3] : n[3] = t[3]) : Bs(n), n; } -function Pi(i) { +function Ai(i) { return [i[0], i[3]]; } -function _o(i) { +function po(i) { return [i[2], i[3]]; } function mt(i) { @@ -1315,25 +1315,25 @@ function mt(i) { function ie(i, t) { return i[0] <= t[2] && i[2] >= t[0] && i[1] <= t[3] && i[3] >= t[1]; } -function tl(i) { +function Qa(i) { return i[2] < i[0] || i[3] < i[1]; } -function x0(i, t) { +function M0(i, t) { return t ? (t[0] = i[0], t[1] = i[1], t[2] = i[2], t[3] = i[3], t) : i; } function C0(i, t, e) { let n = !1; - const s = ua(i, t), r = ua(i, e); - if (s === Ft.INTERSECTING || r === Ft.INTERSECTING) + const s = ha(i, t), r = ha(i, e); + if (s === zt.INTERSECTING || r === zt.INTERSECTING) n = !0; else { const o = i[0], a = i[1], l = i[2], h = i[3], c = t[0], u = t[1], d = e[0], f = e[1], g = (f - u) / (d - c); let m, p; - !!(r & Ft.ABOVE) && !(s & Ft.ABOVE) && (m = d - (f - h) / g, n = m >= o && m <= l), !n && !!(r & Ft.RIGHT) && !(s & Ft.RIGHT) && (p = f - (d - l) * g, n = p >= a && p <= h), !n && !!(r & Ft.BELOW) && !(s & Ft.BELOW) && (m = d - (f - a) / g, n = m >= o && m <= l), !n && !!(r & Ft.LEFT) && !(s & Ft.LEFT) && (p = f - (d - o) * g, n = p >= a && p <= h); + !!(r & zt.ABOVE) && !(s & zt.ABOVE) && (m = d - (f - h) / g, n = m >= o && m <= l), !n && !!(r & zt.RIGHT) && !(s & zt.RIGHT) && (p = f - (d - l) * g, n = p >= a && p <= h), !n && !!(r & zt.BELOW) && !(s & zt.BELOW) && (m = d - (f - a) / g, n = m >= o && m <= l), !n && !!(r & zt.LEFT) && !(s & zt.LEFT) && (p = f - (d - o) * g, n = p >= a && p <= h); } return n; } -function M0(i, t, e, n) { +function w0(i, t, e, n) { let s = []; if (n > 1) { const a = i[2] - i[0], l = i[3] - i[1]; @@ -1363,10 +1363,10 @@ function M0(i, t, e, n) { const r = [], o = []; for (let a = 0, l = s.length; a < l; a += 2) r.push(s[a]), o.push(s[a + 1]); - return _0(r, o, e); + return v0(r, o, e); } function Tu(i, t) { - const e = t.getExtent(), n = Li(i); + const e = t.getExtent(), n = Ri(i); if (t.canWrapX() && (n[0] < e[0] || n[0] >= e[2])) { const s = mt(e), o = Math.floor( (n[0] - e[0]) / s @@ -1397,10 +1397,10 @@ function E0(i, t) { } return [i]; } -function wt(i, t, e) { +function Pt(i, t, e) { return Math.min(Math.max(i, t), e); } -function w0(i, t, e, n, s, r) { +function b0(i, t, e, n, s, r) { const o = s - e, a = r - n; if (o !== 0 || a !== 0) { const l = ((i - e) * o + (t - n) * a) / (o * o + a * a); @@ -1412,7 +1412,7 @@ function Wi(i, t, e, n) { const s = e - i, r = n - t; return s * s + r * r; } -function S0(i) { +function P0(i) { const t = i.length; for (let n = 0; n < t; n++) { let s = n, r = Math.abs(i[n][n]); @@ -1438,34 +1438,34 @@ function S0(i) { } return e; } -function _h(i) { +function ph(i) { return i * 180 / Math.PI; } -function Hi(i) { +function Vi(i) { return i * Math.PI / 180; } -function Pn(i, t) { +function An(i, t) { const e = i % t; return e * t < 0 ? e + t : e; } function ti(i, t, e) { return i + e * (t - i); } -function Iu(i, t) { +function Lu(i, t) { const e = Math.pow(10, t); return Math.round(i * e) / e; } function gr(i, t) { - return Math.floor(Iu(i, t)); + return Math.floor(Lu(i, t)); } function mr(i, t) { - return Math.ceil(Iu(i, t)); + return Math.ceil(Lu(i, t)); } -const R0 = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i, b0 = /^([a-z]*)$|^hsla?\(.*\)$/i; -function Au(i) { - return typeof i == "string" ? i : Pu(i); +const S0 = /^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i, _0 = /^([a-z]*)$|^hsla?\(.*\)$/i; +function Ou(i) { + return typeof i == "string" ? i : Au(i); } -function L0(i) { +function R0(i) { const t = document.createElement("div"); if (t.style.color = i, t.style.color !== "") { document.body.appendChild(t); @@ -1487,30 +1487,30 @@ const T0 = function() { for (const o in t) (r++ & 3) === 0 && (delete t[o], --e); } - s = I0(n), t[n] = s, ++e; + s = L0(n), t[n] = s, ++e; } return s; }; }(); -function $r(i) { +function jr(i) { return Array.isArray(i) ? i : T0(i); } -function I0(i) { +function L0(i) { let t, e, n, s, r; - if (b0.exec(i) && (i = L0(i)), R0.exec(i)) { + if (_0.exec(i) && (i = R0(i)), S0.exec(i)) { const o = i.length - 1; let a; o <= 4 ? a = 1 : a = 2; const l = o === 4 || o === 8; t = parseInt(i.substr(1 + 0 * a, a), 16), e = parseInt(i.substr(1 + 1 * a, a), 16), n = parseInt(i.substr(1 + 2 * a, a), 16), l ? s = parseInt(i.substr(1 + 3 * a, a), 16) : s = 255, a == 1 && (t = (t << 4) + t, e = (e << 4) + e, n = (n << 4) + n, l && (s = (s << 4) + s)), r = [t, e, n, s / 255]; } else - i.startsWith("rgba(") ? (r = i.slice(5, -1).split(",").map(Number), yh(r)) : i.startsWith("rgb(") ? (r = i.slice(4, -1).split(",").map(Number), r.push(1), yh(r)) : X(!1, 14); + i.startsWith("rgba(") ? (r = i.slice(5, -1).split(",").map(Number), vh(r)) : i.startsWith("rgb(") ? (r = i.slice(4, -1).split(",").map(Number), r.push(1), vh(r)) : Y(!1, 14); return r; } -function yh(i) { - return i[0] = wt(i[0] + 0.5 | 0, 0, 255), i[1] = wt(i[1] + 0.5 | 0, 0, 255), i[2] = wt(i[2] + 0.5 | 0, 0, 255), i[3] = wt(i[3], 0, 1), i; +function vh(i) { + return i[0] = Pt(i[0] + 0.5 | 0, 0, 255), i[1] = Pt(i[1] + 0.5 | 0, 0, 255), i[2] = Pt(i[2] + 0.5 | 0, 0, 255), i[3] = Pt(i[3], 0, 1), i; } -function Pu(i) { +function Au(i) { let t = i[0]; t != (t | 0) && (t = t + 0.5 | 0); let e = i[1]; @@ -1520,7 +1520,7 @@ function Pu(i) { const s = i[3] === void 0 ? 1 : Math.round(i[3] * 100) / 100; return "rgba(" + t + "," + e + "," + n + "," + s + ")"; } -class A0 { +class O0 { constructor() { this.cache_ = {}, this.cacheSize_ = 0, this.maxCacheSize_ = 32; } @@ -1540,22 +1540,22 @@ class A0 { } } get(t, e, n) { - const s = vh(t, e, n); + const s = yh(t, e, n); return s in this.cache_ ? this.cache_[s] : null; } set(t, e, n, s) { - const r = vh(t, e, n); + const r = yh(t, e, n); this.cache_[r] = s, ++this.cacheSize_; } setSize(t) { this.maxCacheSize_ = t, this.expire(); } } -function vh(i, t, e) { - const n = e ? Au(e) : "null"; +function yh(i, t, e) { + const n = e ? Ou(e) : "null"; return t + ":" + i + ":" + n; } -const Br = new A0(), ut = { +const kr = new O0(), ut = { OPACITY: "opacity", VISIBLE: "visible", EXTENT: "extent", @@ -1567,11 +1567,11 @@ const Br = new A0(), ut = { SOURCE: "source", MAP: "map" }; -class P0 extends Ce { +class A0 extends Ce { constructor(t) { super(), this.on, this.once, this.un, this.background_ = t.background; const e = Object.assign({}, t); - typeof t.properties == "object" && (delete e.properties, Object.assign(e, t.properties)), e[ut.OPACITY] = t.opacity !== void 0 ? t.opacity : 1, X(typeof e[ut.OPACITY] == "number", 64), e[ut.VISIBLE] = t.visible !== void 0 ? t.visible : !0, e[ut.Z_INDEX] = t.zIndex, e[ut.MAX_RESOLUTION] = t.maxResolution !== void 0 ? t.maxResolution : 1 / 0, e[ut.MIN_RESOLUTION] = t.minResolution !== void 0 ? t.minResolution : 0, e[ut.MIN_ZOOM] = t.minZoom !== void 0 ? t.minZoom : -1 / 0, e[ut.MAX_ZOOM] = t.maxZoom !== void 0 ? t.maxZoom : 1 / 0, this.className_ = e.className !== void 0 ? e.className : "ol-layer", delete e.className, this.setProperties(e), this.state_ = null; + typeof t.properties == "object" && (delete e.properties, Object.assign(e, t.properties)), e[ut.OPACITY] = t.opacity !== void 0 ? t.opacity : 1, Y(typeof e[ut.OPACITY] == "number", 64), e[ut.VISIBLE] = t.visible !== void 0 ? t.visible : !0, e[ut.Z_INDEX] = t.zIndex, e[ut.MAX_RESOLUTION] = t.maxResolution !== void 0 ? t.maxResolution : 1 / 0, e[ut.MIN_RESOLUTION] = t.minResolution !== void 0 ? t.minResolution : 0, e[ut.MIN_ZOOM] = t.minZoom !== void 0 ? t.minZoom : -1 / 0, e[ut.MAX_ZOOM] = t.maxZoom !== void 0 ? t.maxZoom : 1 / 0, this.className_ = e.className !== void 0 ? e.className : "ol-layer", delete e.className, this.setProperties(e), this.state_ = null; } getBackground() { return this.background_; @@ -1584,13 +1584,13 @@ class P0 extends Ce { layer: this, managed: t === void 0 ? !0 : t }, n = this.getZIndex(); - return e.opacity = wt(Math.round(this.getOpacity() * 100) / 100, 0, 1), e.visible = this.getVisible(), e.extent = this.getExtent(), e.zIndex = n === void 0 && !e.managed ? 1 / 0 : n, e.maxResolution = this.getMaxResolution(), e.minResolution = Math.max(this.getMinResolution(), 0), e.minZoom = this.getMinZoom(), e.maxZoom = this.getMaxZoom(), this.state_ = e, e; + return e.opacity = Pt(Math.round(this.getOpacity() * 100) / 100, 0, 1), e.visible = this.getVisible(), e.extent = this.getExtent(), e.zIndex = n === void 0 && !e.managed ? 1 / 0 : n, e.maxResolution = this.getMaxResolution(), e.minResolution = Math.max(this.getMinResolution(), 0), e.minZoom = this.getMinZoom(), e.maxZoom = this.getMaxZoom(), this.state_ = e, e; } getLayersArray(t) { - return V(); + return B(); } getLayerStatesArray(t) { - return V(); + return B(); } getExtent() { return this.get(ut.EXTENT); @@ -1611,7 +1611,7 @@ class P0 extends Ce { return this.get(ut.OPACITY); } getSourceState() { - return V(); + return B(); } getVisible() { return this.get(ut.VISIBLE); @@ -1638,7 +1638,7 @@ class P0 extends Ce { this.set(ut.MIN_ZOOM, t); } setOpacity(t) { - X(typeof t == "number", 64), this.set(ut.OPACITY, t); + Y(typeof t == "number", 64), this.set(ut.OPACITY, t); } setVisible(t) { this.set(ut.VISIBLE, t); @@ -1650,14 +1650,14 @@ class P0 extends Ce { this.state_ && (this.state_.layer = null, this.state_ = null), super.disposeInternal(); } } -const Ou = P0, Ei = { +const Iu = A0, Ei = { PRERENDER: "prerender", POSTRENDER: "postrender", PRECOMPOSE: "precompose", POSTCOMPOSE: "postcompose", RENDERCOMPLETE: "rendercomplete" }; -class O0 extends Ou { +class I0 extends Iu { constructor(t) { const e = Object.assign({}, t); delete e.source, super(e), this.on, this.once, this.un, this.mapPrecomposeKey_ = null, this.mapRenderKey_ = null, this.sourceChangeKey_ = null, this.renderer_ = null, this.rendered = !1, t.render && (this.render = t.render), t.map && this.setMap(t.map), this.addChangeListener( @@ -1691,7 +1691,7 @@ class O0 extends Ou { const t = this.getSource(); t && (this.sourceChangeKey_ = et( t, - H.CHANGE, + V.CHANGE, this.handleSourceChange_, this )), this.changed(); @@ -1722,7 +1722,7 @@ class O0 extends Ou { Ei.PRECOMPOSE, function(e) { const s = e.frameState.layerStatesArray, r = this.getLayerState(!1); - X( + Y( !s.some(function(o) { return o.layer === r.layer; }), @@ -1730,7 +1730,7 @@ class O0 extends Ou { ), s.push(r); }, this - ), this.mapRenderKey_ = et(this, H.CHANGE, t.render, t), this.changed()); + ), this.mapRenderKey_ = et(this, V.CHANGE, t.render, t), this.changed()); } setSource(t) { this.set(ut.SOURCE, t); @@ -1748,7 +1748,7 @@ class O0 extends Ou { this.renderer_ && (this.renderer_.dispose(), delete this.renderer_), this.setSource(null), super.disposeInternal(); } } -function el(i, t) { +function $a(i, t) { if (!i.visible) return !1; const e = t.resolution; @@ -1757,11 +1757,11 @@ function el(i, t) { const n = t.zoom; return n > i.minZoom && n <= i.maxZoom; } -const yo = O0; +const vo = I0; function Nu(i, t) { return i[0] += +t[0], i[1] += +t[1], i; } -function zr(i, t) { +function Xr(i, t) { let e = !0; for (let n = i.length - 1; n >= 0; --n) if (i[n] != t[n]) { @@ -1770,37 +1770,37 @@ function zr(i, t) { } return e; } -function il(i, t) { +function tl(i, t) { const e = Math.cos(t), n = Math.sin(t), s = i[0] * e - i[1] * n, r = i[1] * e + i[0] * n; return i[0] = s, i[1] = r, i; } -function Fu(i, t) { +function zu(i, t) { return i[0] *= t, i[1] *= t, i; } -function Du(i, t) { +function Fu(i, t) { if (t.canWrapX()) { - const e = mt(t.getExtent()), n = ku(i, t, e); + const e = mt(t.getExtent()), n = Du(i, t, e); n && (i[0] -= n * e); } return i; } -function ku(i, t, e) { +function Du(i, t, e) { const n = t.getExtent(); let s = 0; return t.canWrapX() && (i[0] < n[0] || i[0] > n[2]) && (e = e || mt(n), s = Math.floor( (i[0] - n[0]) / e )), s; } -class N0 extends ja { +class N0 extends Ya { constructor(t) { super(), this.map_ = t; } dispatchRenderEvent(t, e) { - V(); + B(); } calculateMatrices2D(t) { const e = t.viewState, n = t.coordinateToPixelTransform, s = t.pixelToCoordinateTransform; - bi( + _i( n, t.size[0] / 2, t.size[1] / 2, @@ -1809,46 +1809,46 @@ class N0 extends ja { -e.rotation, -e.center[0], -e.center[1] - ), Ja(s, n); + ), qa(s, n); } forEachFeatureAtCoordinate(t, e, n, s, r, o, a, l) { let h; const c = e.viewState; - function u(x, C, E, w) { - return r.call(o, C, x ? E : null, w); + function u(M, C, E, b) { + return r.call(o, C, M ? E : null, b); } - const d = c.projection, f = Du(t.slice(), d), g = [[0, 0]]; + const d = c.projection, f = Fu(t.slice(), d), g = [[0, 0]]; if (d.canWrapX() && s) { - const x = d.getExtent(), C = mt(x); + const M = d.getExtent(), C = mt(M); g.push([-C, 0], [C, 0]); } - const m = e.layerStatesArray, p = m.length, _ = [], y = []; - for (let x = 0; x < g.length; x++) + const m = e.layerStatesArray, p = m.length, v = [], y = []; + for (let M = 0; M < g.length; M++) for (let C = p - 1; C >= 0; --C) { - const E = m[C], w = E.layer; - if (w.hasRenderer() && el(E, c) && a.call(l, w)) { - const R = w.getRenderer(), A = w.getSource(); - if (R && A) { - const k = A.getWrapX() ? f : t, Z = u.bind( + const E = m[C], b = E.layer; + if (b.hasRenderer() && $a(E, c) && a.call(l, b)) { + const S = b.getRenderer(), O = b.getSource(); + if (S && O) { + const D = O.getWrapX() ? f : t, H = u.bind( null, E.managed ); - y[0] = k[0] + g[x][0], y[1] = k[1] + g[x][1], h = R.forEachFeatureAtCoordinate( + y[0] = D[0] + g[M][0], y[1] = D[1] + g[M][1], h = S.forEachFeatureAtCoordinate( y, e, n, - Z, - _ + H, + v ); } if (h) return h; } } - if (_.length === 0) + if (v.length === 0) return; - const v = 1 / _.length; - return _.forEach((x, C) => x.distanceSq += C * v), _.sort((x, C) => x.distanceSq - C.distanceSq), _.some((x) => h = x.callback(x.feature, x.layer, x.geometry)), h; + const x = 1 / v.length; + return v.forEach((M, C) => M.distanceSq += C * x), v.sort((M, C) => M.distanceSq - C.distanceSq), v.some((M) => h = M.callback(M.feature, M.layer, M.geometry)), h; } hasFeatureAtCoordinate(t, e, n, s, r, o) { return this.forEachFeatureAtCoordinate( @@ -1856,7 +1856,7 @@ class N0 extends ja { e, n, s, - Rs, + Ss, this, r, o @@ -1866,22 +1866,22 @@ class N0 extends ja { return this.map_; } renderFrame(t) { - V(); + B(); } scheduleExpireIconCache(t) { - Br.canExpireCache() && t.postRenderFunctions.push(F0); + kr.canExpireCache() && t.postRenderFunctions.push(z0); } } -function F0(i, t) { - Br.expire(); +function z0(i, t) { + kr.expire(); } -const D0 = N0; -class k0 extends ze { +const F0 = N0; +class D0 extends Ge { constructor(t, e, n, s) { super(t), this.inversePixelTransform = e, this.frameState = n, this.context = s; } } -const Gu = k0, pr = "ol-hidden", G0 = "ol-selectable", qn = "ol-unselectable", xh = "ol-unsupported", vo = "ol-control", Ch = "ol-collapsed", $0 = new RegExp( +const ju = D0, pr = "ol-hidden", j0 = "ol-selectable", Kn = "ol-unselectable", xh = "ol-unsupported", yo = "ol-control", Mh = "ol-collapsed", k0 = new RegExp( [ "^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)", "(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)", @@ -1892,15 +1892,15 @@ const Gu = k0, pr = "ol-hidden", G0 = "ol-selectable", qn = "ol-unselectable", x `?\\s*([-,\\"\\'\\sa-z]+?)\\s*$` ].join(""), "i" -), Mh = [ +), Ch = [ "style", "variant", "weight", "size", "lineHeight", "family" -], $u = function(i) { - const t = i.match($0); +], ku = function(i) { + const t = i.match(k0); if (!t) return null; const e = { @@ -1910,42 +1910,42 @@ const Gu = k0, pr = "ol-hidden", G0 = "ol-selectable", qn = "ol-unselectable", x weight: "normal", variant: "normal" }; - for (let n = 0, s = Mh.length; n < s; ++n) { + for (let n = 0, s = Ch.length; n < s; ++n) { const r = t[n + 1]; - r !== void 0 && (e[Mh[n]] = r); + r !== void 0 && (e[Ch[n]] = r); } return e.families = e.family.split(/,\s?/), e; }; function ge(i, t, e, n) { let s; - return e && e.length ? s = e.shift() : qa ? s = new OffscreenCanvas(i || 300, t || 300) : s = document.createElement("canvas"), i && (s.width = i), t && (s.height = t), s.getContext("2d", n); + return e && e.length ? s = e.shift() : Ja ? s = new OffscreenCanvas(i || 300, t || 300) : s = document.createElement("canvas"), i && (s.width = i), t && (s.height = t), s.getContext("2d", n); } -function Bu(i) { +function Xu(i) { const t = i.canvas; t.width = 1, t.height = 1, i.clearRect(0, 0, 1, 1); } -function B0(i) { +function X0(i) { let t = i.offsetWidth; const e = getComputedStyle(i); return t += parseInt(e.marginLeft, 10) + parseInt(e.marginRight, 10), t; } -function z0(i) { +function G0(i) { let t = i.offsetHeight; const e = getComputedStyle(i); return t += parseInt(e.marginTop, 10) + parseInt(e.marginBottom, 10), t; } -function Zr(i, t) { +function Gr(i, t) { const e = t.parentNode; e && e.replaceChild(i, t); } -function Ur(i) { +function Hr(i) { return i && i.parentNode ? i.parentNode.removeChild(i) : null; } -function zu(i) { +function Gu(i) { for (; i.lastChild; ) i.removeChild(i.lastChild); } -function Z0(i, t) { +function H0(i, t) { const e = i.childNodes; for (let n = 0; ; ++n) { const s = e[n], r = t[n]; @@ -1964,20 +1964,20 @@ function Z0(i, t) { } } } -const Zu = "10px sans-serif", si = "#000", Vr = "round", Ls = [], Ts = 0, $n = "round", Is = 10, As = "#000", Ps = "center", Wr = "middle", $i = [0, 0, 0, 0], Os = 1, qe = new Ce(); -let xn = null, ma; -const pa = {}, U0 = function() { +const Hu = "10px sans-serif", si = "#000", Zr = "round", Rs = [], Ts = 0, kn = "round", Ls = 10, Os = "#000", As = "center", Br = "middle", ki = [0, 0, 0, 0], Is = 1, Ke = new Ce(); +let Mn = null, fa; +const ga = {}, Z0 = function() { const t = "32px ", e = ["monospace", "serif"], n = e.length, s = "wmytzilWMYTZIL@#/&?$%10\uF013"; let r, o; function a(h, c, u) { let d = !0; for (let f = 0; f < n; ++f) { const g = e[f]; - if (o = Hr( + if (o = Wr( h + " " + c + " " + t + g, s ), u != g) { - const m = Hr( + const m = Wr( h + " " + c + " " + t + u + "," + g, s ); @@ -1988,16 +1988,16 @@ const pa = {}, U0 = function() { } function l() { let h = !0; - const c = qe.getKeys(); + const c = Ke.getKeys(); for (let u = 0, d = c.length; u < d; ++u) { const f = c[u]; - qe.get(f) < 100 && (a.apply(this, f.split(` -`)) ? (Us(pa), xn = null, ma = void 0, qe.set(f, 100)) : (qe.set(f, qe.get(f) + 1, !0), h = !1)); + Ke.get(f) < 100 && (a.apply(this, f.split(` +`)) ? (Zs(ga), Mn = null, fa = void 0, Ke.set(f, 100)) : (Ke.set(f, Ke.get(f) + 1, !0), h = !1)); } h && (clearInterval(r), r = void 0); } return function(h) { - const c = $u(h); + const c = ku(h); if (!c) return; const u = c.families; @@ -2005,35 +2005,35 @@ const pa = {}, U0 = function() { const g = u[d], m = c.style + ` ` + c.weight + ` ` + g; - qe.get(m) === void 0 && (qe.set(m, 100, !0), a(c.style, c.weight, g) || (qe.set(m, 0, !0), r === void 0 && (r = setInterval(l, 32)))); + Ke.get(m) === void 0 && (Ke.set(m, 100, !0), a(c.style, c.weight, g) || (Ke.set(m, 0, !0), r === void 0 && (r = setInterval(l, 32)))); } }; -}(), V0 = function() { +}(), B0 = function() { let i; return function(t) { - let e = pa[t]; + let e = ga[t]; if (e == null) { - if (qa) { - const n = $u(t), s = Uu(t, "\u017Dg"); + if (Ja) { + const n = ku(t), s = Zu(t, "\u017Dg"); e = (isNaN(Number(n.lineHeight)) ? 1.2 : Number(n.lineHeight)) * (s.actualBoundingBoxAscent + s.actualBoundingBoxDescent); } else i || (i = document.createElement("div"), i.innerHTML = "M", i.style.minHeight = "0", i.style.maxHeight = "none", i.style.height = "auto", i.style.padding = "0", i.style.border = "none", i.style.position = "absolute", i.style.display = "block", i.style.left = "-99999px"), i.style.font = t, document.body.appendChild(i), e = i.offsetHeight, document.body.removeChild(i); - pa[t] = e; + ga[t] = e; } return e; }; }(); -function Uu(i, t) { - return xn || (xn = ge(1, 1)), i != ma && (xn.font = i, ma = xn.font), xn.measureText(t); +function Zu(i, t) { + return Mn || (Mn = ge(1, 1)), i != fa && (Mn.font = i, fa = Mn.font), Mn.measureText(t); } -function Hr(i, t) { - return Uu(i, t).width; +function Wr(i, t) { + return Zu(i, t).width; } -function Eh(i, t, e) { +function wh(i, t, e) { if (t in e) return e[t]; const n = t.split(` -`).reduce((s, r) => Math.max(s, Hr(i, r)), 0); +`).reduce((s, r) => Math.max(s, Wr(i, r)), 0); return e[t] = n, n; } function W0(i, t) { @@ -2046,15 +2046,15 @@ function W0(i, t) { r = Math.max(r, o), s.push(o), o = 0, a += l; continue; } - const d = t[h + 1] || i.font, f = Hr(d, u); + const d = t[h + 1] || i.font, f = Wr(d, u); e.push(f), o += f; - const g = V0(d); + const g = B0(d); n.push(g), l = Math.max(l, g); } return { width: r, height: a, widths: e, heights: n, lineWidths: s }; } -function H0(i, t, e, n, s, r, o, a, l, h, c) { - i.save(), e !== 1 && (i.globalAlpha *= e), t && i.setTransform.apply(i, t), n.contextInstructions ? (i.translate(l, h), i.scale(c[0], c[1]), X0(n, i)) : c[0] < 0 || c[1] < 0 ? (i.translate(l, h), i.scale(c[0], c[1]), i.drawImage( +function V0(i, t, e, n, s, r, o, a, l, h, c) { + i.save(), e !== 1 && (i.globalAlpha *= e), t && i.setTransform.apply(i, t), n.contextInstructions ? (i.translate(l, h), i.scale(c[0], c[1]), Y0(n, i)) : c[0] < 0 || c[1] < 0 ? (i.translate(l, h), i.scale(c[0], c[1]), i.drawImage( n, s, r, @@ -2076,7 +2076,7 @@ function H0(i, t, e, n, s, r, o, a, l, h, c) { a * c[1] ), i.restore(); } -function X0(i, t) { +function Y0(i, t) { const e = i.contextInstructions; for (let n = 0, s = e.length; n < s; n += 2) Array.isArray(e[n + 1]) ? t[e[n]].apply( @@ -2084,22 +2084,22 @@ function X0(i, t) { e[n + 1] ) : t[e[n]] = e[n + 1]; } -class Y0 extends D0 { +class U0 extends F0 { constructor(t) { super(t), this.fontChangeListenerKey_ = et( - qe, - kn.PROPERTYCHANGE, + Ke, + Dn.PROPERTYCHANGE, t.redrawText.bind(t) ), this.element_ = document.createElement("div"); const e = this.element_.style; - e.position = "absolute", e.width = "100%", e.height = "100%", e.zIndex = "0", this.element_.className = qn + " ol-layers"; + e.position = "absolute", e.width = "100%", e.height = "100%", e.zIndex = "0", this.element_.className = Kn + " ol-layers"; const n = t.getViewport(); n.insertBefore(this.element_, n.firstChild || null), this.children_ = [], this.renderedVisible_ = !0; } dispatchRenderEvent(t, e) { const n = this.getMap(); if (n.hasListener(t)) { - const s = new Gu(t, void 0, e); + const s = new ju(t, void 0, e); n.dispatchEvent(s); } } @@ -2122,7 +2122,7 @@ class Y0 extends D0 { const l = e[o]; t.layerIndex = o; const h = l.layer, c = h.getSourceState(); - if (!el(l, n) || c != "ready" && c != "undefined") { + if (!$a(l, n) || c != "ready" && c != "undefined") { h.unrender(); continue; } @@ -2133,25 +2133,25 @@ class Y0 extends D0 { } for (let o = s.length - 1; o >= 0; --o) s[o].renderDeclutter(t); - Z0(this.element_, this.children_), this.dispatchRenderEvent(Ei.POSTCOMPOSE, t), this.renderedVisible_ || (this.element_.style.display = "", this.renderedVisible_ = !0), this.scheduleExpireIconCache(t); + H0(this.element_, this.children_), this.dispatchRenderEvent(Ei.POSTCOMPOSE, t), this.renderedVisible_ || (this.element_.style.display = "", this.renderedVisible_ = !0), this.scheduleExpireIconCache(t); } } -const j0 = Y0; -class vi extends ze { +const J0 = U0; +class xi extends Ge { constructor(t, e) { super(t), this.layer = e; } } -const Wo = { +const Zo = { LAYERS: "layers" }; -class nl extends Ou { +class el extends Iu { constructor(t) { t = t || {}; const e = Object.assign({}, t); delete e.layers; let n = t.layers; - super(e), this.on, this.once, this.un, this.layersListenerKeys_ = [], this.listenerKeys_ = {}, this.addChangeListener(Wo.LAYERS, this.handleLayersChanged_), n ? Array.isArray(n) ? n = new Oe(n.slice(), { unique: !0 }) : X(typeof n.getArray == "function", 43) : n = new Oe(void 0, { unique: !0 }), this.setLayers(n); + super(e), this.on, this.once, this.un, this.layersListenerKeys_ = [], this.listenerKeys_ = {}, this.addChangeListener(Zo.LAYERS, this.handleLayersChanged_), n ? Array.isArray(n) ? n = new Ie(n.slice(), { unique: !0 }) : Y(typeof n.getArray == "function", 43) : n = new Ie(void 0, { unique: !0 }), this.setLayers(n); } handleLayerChange_() { this.changed(); @@ -2165,11 +2165,11 @@ class nl extends Ou { ); for (const n in this.listenerKeys_) this.listenerKeys_[n].forEach(pt); - Us(this.listenerKeys_); + Zs(this.listenerKeys_); const e = t.getArray(); for (let n = 0, s = e.length; n < s; n++) { const r = e[n]; - this.registerLayerListeners_(r), this.dispatchEvent(new vi("addlayer", r)); + this.registerLayerListeners_(r), this.dispatchEvent(new xi("addlayer", r)); } this.changed(); } @@ -2177,42 +2177,42 @@ class nl extends Ou { const e = [ et( t, - kn.PROPERTYCHANGE, + Dn.PROPERTYCHANGE, this.handleLayerChange_, this ), - et(t, H.CHANGE, this.handleLayerChange_, this) + et(t, V.CHANGE, this.handleLayerChange_, this) ]; - t instanceof nl && e.push( + t instanceof el && e.push( et(t, "addlayer", this.handleLayerGroupAdd_, this), et(t, "removelayer", this.handleLayerGroupRemove_, this) ), this.listenerKeys_[rt(t)] = e; } handleLayerGroupAdd_(t) { - this.dispatchEvent(new vi("addlayer", t.layer)); + this.dispatchEvent(new xi("addlayer", t.layer)); } handleLayerGroupRemove_(t) { - this.dispatchEvent(new vi("removelayer", t.layer)); + this.dispatchEvent(new xi("removelayer", t.layer)); } handleLayersAdd_(t) { const e = t.element; - this.registerLayerListeners_(e), this.dispatchEvent(new vi("addlayer", e)), this.changed(); + this.registerLayerListeners_(e), this.dispatchEvent(new xi("addlayer", e)), this.changed(); } handleLayersRemove_(t) { const e = t.element, n = rt(e); - this.listenerKeys_[n].forEach(pt), delete this.listenerKeys_[n], this.dispatchEvent(new vi("removelayer", e)), this.changed(); + this.listenerKeys_[n].forEach(pt), delete this.listenerKeys_[n], this.dispatchEvent(new xi("removelayer", e)), this.changed(); } getLayers() { - return this.get(Wo.LAYERS); + return this.get(Zo.LAYERS); } setLayers(t) { const e = this.getLayers(); if (e) { const n = e.getArray(); for (let s = 0, r = n.length; s < r; ++s) - this.dispatchEvent(new vi("removelayer", n[s])); + this.dispatchEvent(new xi("removelayer", n[s])); } - this.set(Wo.LAYERS, t); + this.set(Zo.LAYERS, t); } getLayersArray(t) { return t = t !== void 0 ? t : [], this.getLayers().forEach(function(e) { @@ -2235,7 +2235,7 @@ class nl extends Ou { ), l.minResolution = Math.max( l.minResolution, s.minResolution - ), l.minZoom = Math.max(l.minZoom, s.minZoom), l.maxZoom = Math.min(l.maxZoom, s.maxZoom), s.extent !== void 0 && (l.extent !== void 0 ? l.extent = vs( + ), l.minZoom = Math.max(l.minZoom, s.minZoom), l.maxZoom = Math.min(l.maxZoom, s.maxZoom), s.extent !== void 0 && (l.extent !== void 0 ? l.extent = xs( l.extent, s.extent ) : l.extent = s.extent), l.zIndex === void 0 && (l.zIndex = r); @@ -2246,14 +2246,14 @@ class nl extends Ou { return "ready"; } } -const xo = nl; -class K0 extends ze { +const xo = el; +class q0 extends Ge { constructor(t, e, n) { super(t), this.map = e, this.frameState = n !== void 0 ? n : null; } } -const Cn = K0; -class q0 extends Cn { +const Cn = q0; +class K0 extends Cn { constructor(t, e, n, s, r, o) { super(t, e, r), this.originalEvent = n, this.pixel_ = null, this.coordinate_ = null, this.dragging = s !== void 0 ? s : !1, this.activePointers = o; } @@ -2276,10 +2276,10 @@ class q0 extends Cn { super.stopPropagation(), "stopPropagation" in this.originalEvent && this.originalEvent.stopPropagation(); } } -const _i = q0, Mt = { +const vi = K0, Et = { SINGLECLICK: "singleclick", - CLICK: H.CLICK, - DBLCLICK: H.DBLCLICK, + CLICK: V.CLICK, + DBLCLICK: V.DBLCLICK, POINTERDRAG: "pointerdrag", POINTERMOVE: "pointermove", POINTERDOWN: "pointerdown", @@ -2289,7 +2289,7 @@ const _i = q0, Mt = { POINTERENTER: "pointerenter", POINTERLEAVE: "pointerleave", POINTERCANCEL: "pointercancel" -}, _a = { +}, ma = { POINTERMOVE: "pointermove", POINTERDOWN: "pointerdown", POINTERUP: "pointerup", @@ -2299,41 +2299,41 @@ const _i = q0, Mt = { POINTERLEAVE: "pointerleave", POINTERCANCEL: "pointercancel" }; -class J0 extends co { +class Q0 extends ho { constructor(t, e) { super(t), this.map_ = t, this.clickTimeoutId_, this.emulateClicks_ = !1, this.dragging_ = !1, this.dragListenerKeys_ = [], this.moveTolerance_ = e === void 0 ? 1 : e, this.down_ = null; const n = this.map_.getViewport(); this.activePointers_ = [], this.trackedTouches_ = {}, this.element_ = n, this.pointerdownListenerKey_ = et( n, - _a.POINTERDOWN, + ma.POINTERDOWN, this.handlePointerDown_, this ), this.originalPointerMoveEvent_, this.relayedListenerKey_ = et( n, - _a.POINTERMOVE, + ma.POINTERMOVE, this.relayMoveEvent_, this ), this.boundHandleTouchMove_ = this.handleTouchMove_.bind(this), this.element_.addEventListener( - H.TOUCHMOVE, + V.TOUCHMOVE, this.boundHandleTouchMove_, Cu ? { passive: !1 } : !1 ); } emulateClick_(t) { - let e = new _i( - Mt.CLICK, + let e = new vi( + Et.CLICK, this.map_, t ); - this.dispatchEvent(e), this.clickTimeoutId_ !== void 0 ? (clearTimeout(this.clickTimeoutId_), this.clickTimeoutId_ = void 0, e = new _i( - Mt.DBLCLICK, + this.dispatchEvent(e), this.clickTimeoutId_ !== void 0 ? (clearTimeout(this.clickTimeoutId_), this.clickTimeoutId_ = void 0, e = new vi( + Et.DBLCLICK, this.map_, t ), this.dispatchEvent(e)) : this.clickTimeoutId_ = setTimeout( function() { this.clickTimeoutId_ = void 0; - const n = new _i( - Mt.SINGLECLICK, + const n = new vi( + Et.SINGLECLICK, this.map_, t ); @@ -2344,7 +2344,7 @@ class J0 extends co { } updateActivePointers_(t) { const e = t, n = e.pointerId; - if (e.type == Mt.POINTERUP || e.type == Mt.POINTERCANCEL) { + if (e.type == Et.POINTERUP || e.type == Et.POINTERCANCEL) { delete this.trackedTouches_[n]; for (const s in this.trackedTouches_) if (this.trackedTouches_[s].target !== e.target) { @@ -2352,13 +2352,13 @@ class J0 extends co { break; } } else - (e.type == Mt.POINTERDOWN || e.type == Mt.POINTERMOVE) && (this.trackedTouches_[n] = e); + (e.type == Et.POINTERDOWN || e.type == Et.POINTERMOVE) && (this.trackedTouches_[n] = e); this.activePointers_ = Object.values(this.trackedTouches_); } handlePointerUp_(t) { this.updateActivePointers_(t); - const e = new _i( - Mt.POINTERUP, + const e = new vi( + Et.POINTERUP, this.map_, t, void 0, @@ -2372,8 +2372,8 @@ class J0 extends co { } handlePointerDown_(t) { this.emulateClicks_ = this.activePointers_.length === 0, this.updateActivePointers_(t); - const e = new _i( - Mt.POINTERDOWN, + const e = new vi( + Et.POINTERDOWN, this.map_, t, void 0, @@ -2383,28 +2383,28 @@ class J0 extends co { this.dispatchEvent(e), this.down_ = {}; for (const n in t) { const s = t[n]; - this.down_[n] = typeof s == "function" ? qi : s; + this.down_[n] = typeof s == "function" ? Ki : s; } if (this.dragListenerKeys_.length === 0) { const n = this.map_.getOwnerDocument(); this.dragListenerKeys_.push( et( n, - Mt.POINTERMOVE, + Et.POINTERMOVE, this.handlePointerMove_, this ), - et(n, Mt.POINTERUP, this.handlePointerUp_, this), + et(n, Et.POINTERUP, this.handlePointerUp_, this), et( this.element_, - Mt.POINTERCANCEL, + Et.POINTERCANCEL, this.handlePointerUp_, this ) ), this.element_.getRootNode && this.element_.getRootNode() !== n && this.dragListenerKeys_.push( et( this.element_.getRootNode(), - Mt.POINTERUP, + Et.POINTERUP, this.handlePointerUp_, this ) @@ -2414,8 +2414,8 @@ class J0 extends co { handlePointerMove_(t) { if (this.isMoving_(t)) { this.updateActivePointers_(t), this.dragging_ = !0; - const e = new _i( - Mt.POINTERDRAG, + const e = new vi( + Et.POINTERDRAG, this.map_, t, this.dragging_, @@ -2429,8 +2429,8 @@ class J0 extends co { this.originalPointerMoveEvent_ = t; const e = !!(this.down_ && this.isMoving_(t)); this.dispatchEvent( - new _i( - Mt.POINTERMOVE, + new vi( + Et.POINTERMOVE, this.map_, t, e @@ -2446,12 +2446,12 @@ class J0 extends co { } disposeInternal() { this.relayedListenerKey_ && (pt(this.relayedListenerKey_), this.relayedListenerKey_ = null), this.element_.removeEventListener( - H.TOUCHMOVE, + V.TOUCHMOVE, this.boundHandleTouchMove_ ), this.pointerdownListenerKey_ && (pt(this.pointerdownListenerKey_), this.pointerdownListenerKey_ = null), this.dragListenerKeys_.forEach(pt), this.dragListenerKeys_.length = 0, this.element_ = null, super.disposeInternal(); } } -const Q0 = J0, Qe = { +const $0 = Q0, $e = { POSTRENDER: "postrender", MOVESTART: "movestart", MOVEEND: "moveend", @@ -2462,13 +2462,13 @@ const Q0 = J0, Qe = { SIZE: "size", TARGET: "target", VIEW: "view" -}, Xr = 1 / 0; +}, Vr = 1 / 0; class tg { constructor(t, e) { this.priorityFunction_ = t, this.keyFunction_ = e, this.elements_ = [], this.priorities_ = [], this.queuedElements_ = {}; } clear() { - this.elements_.length = 0, this.priorities_.length = 0, Us(this.queuedElements_); + this.elements_.length = 0, this.priorities_.length = 0, Zs(this.queuedElements_); } dequeue() { const t = this.elements_, e = this.priorities_, n = t[0]; @@ -2477,9 +2477,9 @@ class tg { return delete this.queuedElements_[s], n; } enqueue(t) { - X(!(this.keyFunction_(t) in this.queuedElements_), 31); + Y(!(this.keyFunction_(t) in this.queuedElements_), 31); const e = this.priorityFunction_(t); - return e != Xr ? (this.elements_.push(t), this.priorities_.push(e), this.queuedElements_[this.keyFunction_(t)] = !0, this.siftDown_(0, this.elements_.length - 1), !0) : !1; + return e != Vr ? (this.elements_.push(t), this.priorities_.push(e), this.queuedElements_[this.keyFunction_(t)] = !0, this.siftDown_(0, this.elements_.length - 1), !0) : !1; } getCount() { return this.elements_.length; @@ -2532,11 +2532,11 @@ class tg { const r = e.length; let o, a, l; for (a = 0; a < r; ++a) - o = e[a], l = t(o), l == Xr ? delete this.queuedElements_[this.keyFunction_(o)] : (n[s] = l, e[s++] = o); + o = e[a], l = t(o), l == Vr ? delete this.queuedElements_[this.keyFunction_(o)] : (n[s] = l, e[s++] = o); e.length = s, n.length = s, this.heapify_(); } } -const eg = tg, B = { +const eg = tg, X = { IDLE: 0, LOADING: 1, LOADED: 2, @@ -2556,15 +2556,15 @@ class ig extends eg { } enqueue(t) { const e = super.enqueue(t); - return e && t[0].addEventListener(H.CHANGE, this.boundHandleTileChange_), e; + return e && t[0].addEventListener(V.CHANGE, this.boundHandleTileChange_), e; } getTilesLoading() { return this.tilesLoading_; } handleTileChange(t) { const e = t.target, n = e.getState(); - if (n === B.LOADED || n === B.ERROR || n === B.EMPTY) { - n !== B.ERROR && e.removeEventListener(H.CHANGE, this.boundHandleTileChange_); + if (n === X.LOADED || n === X.ERROR || n === X.EMPTY) { + n !== X.ERROR && e.removeEventListener(V.CHANGE, this.boundHandleTileChange_); const s = e.getKey(); s in this.tilesLoadingKeys_ && (delete this.tilesLoadingKeys_[s], --this.tilesLoading_), this.tileChangeCallback_(); } @@ -2572,24 +2572,24 @@ class ig extends eg { loadMoreTiles(t, e) { let n = 0, s, r, o; for (; this.tilesLoading_ < t && n < e && this.getCount() > 0; ) - r = this.dequeue()[0], o = r.getKey(), s = r.getState(), s === B.IDLE && !(o in this.tilesLoadingKeys_) && (this.tilesLoadingKeys_[o] = !0, ++this.tilesLoading_, ++n, r.load()); + r = this.dequeue()[0], o = r.getKey(), s = r.getState(), s === X.IDLE && !(o in this.tilesLoadingKeys_) && (this.tilesLoadingKeys_[o] = !0, ++this.tilesLoading_, ++n, r.load()); } } const ng = ig; function sg(i, t, e, n, s) { if (!i || !(e in i.wantedTiles) || !i.wantedTiles[e][t.getKey()]) - return Xr; + return Vr; const r = i.viewState.center, o = n[0] - r[0], a = n[1] - r[1]; return 65536 * Math.log(s) + Math.sqrt(o * o + a * a) / s; } -const Zt = { +const Ht = { ANIMATING: 0, INTERACTING: 1 }, Ee = { CENTER: "center", RESOLUTION: "resolution", ROTATION: "rotation" -}, rg = 42, sl = 256, Bn = { +}, rg = 42, il = 256, Xn = { radians: 6370997 / (2 * Math.PI), degrees: 2 * Math.PI * 6370997 / 360, ft: 0.3048, @@ -2613,7 +2613,7 @@ class og { return this.units_; } getMetersPerUnit() { - return this.metersPerUnit_ || Bn[this.units_]; + return this.metersPerUnit_ || Xn[this.units_]; } getWorldExtent() { return this.worldExtent_; @@ -2646,8 +2646,8 @@ class og { return this.getPointResolutionFunc_; } } -const rl = og, Ws = 6378137, Sn = Math.PI * Ws, ag = [-Sn, -Sn, Sn, Sn], lg = [-180, -85, 180, 85], _r = Ws * Math.log(Math.tan(Math.PI / 2)); -class gn extends rl { +const nl = og, Ws = 6378137, Pn = Math.PI * Ws, ag = [-Pn, -Pn, Pn, Pn], lg = [-180, -85, 180, 85], vr = Ws * Math.log(Math.tan(Math.PI / 2)); +class gn extends nl { constructor(t) { super({ code: t, @@ -2661,7 +2661,7 @@ class gn extends rl { }); } } -const wh = [ +const Eh = [ new gn("EPSG:3857"), new gn("EPSG:102100"), new gn("EPSG:102113"), @@ -2673,9 +2673,9 @@ function hg(i, t, e) { const n = i.length; e = e > 1 ? e : 2, t === void 0 && (e > 2 ? t = i.slice() : t = new Array(n)); for (let s = 0; s < n; s += e) { - t[s] = Sn * i[s] / 180; + t[s] = Pn * i[s] / 180; let r = Ws * Math.log(Math.tan(Math.PI * (+i[s + 1] + 90) / 360)); - r > _r ? r = _r : r < -_r && (r = -_r), t[s + 1] = r; + r > vr ? r = vr : r < -vr && (r = -vr), t[s + 1] = r; } return t; } @@ -2683,69 +2683,69 @@ function cg(i, t, e) { const n = i.length; e = e > 1 ? e : 2, t === void 0 && (e > 2 ? t = i.slice() : t = new Array(n)); for (let s = 0; s < n; s += e) - t[s] = 180 * i[s] / Sn, t[s + 1] = 360 * Math.atan(Math.exp(i[s + 1] / Ws)) / Math.PI - 90; + t[s] = 180 * i[s] / Pn, t[s + 1] = 360 * Math.atan(Math.exp(i[s + 1] / Ws)) / Math.PI - 90; return t; } -const ug = 6378137, Sh = [-180, -90, 180, 90], dg = Math.PI * ug / 180; -class Di extends rl { +const ug = 6378137, bh = [-180, -90, 180, 90], dg = Math.PI * ug / 180; +class Fi extends nl { constructor(t, e) { super({ code: t, units: "degrees", - extent: Sh, + extent: bh, axisOrientation: e, global: !0, metersPerUnit: dg, - worldExtent: Sh + worldExtent: bh }); } } -const Rh = [ - new Di("CRS:84"), - new Di("EPSG:4326", "neu"), - new Di("urn:ogc:def:crs:OGC:1.3:CRS84"), - new Di("urn:ogc:def:crs:OGC:2:84"), - new Di("http://www.opengis.net/def/crs/OGC/1.3/CRS84"), - new Di("http://www.opengis.net/gml/srs/epsg.xml#4326", "neu"), - new Di("http://www.opengis.net/def/crs/EPSG/0/4326", "neu") +const Ph = [ + new Fi("CRS:84"), + new Fi("EPSG:4326", "neu"), + new Fi("urn:ogc:def:crs:OGC:1.3:CRS84"), + new Fi("urn:ogc:def:crs:OGC:2:84"), + new Fi("http://www.opengis.net/def/crs/OGC/1.3/CRS84"), + new Fi("http://www.opengis.net/gml/srs/epsg.xml#4326", "neu"), + new Fi("http://www.opengis.net/def/crs/EPSG/0/4326", "neu") ]; -let ya = {}; +let pa = {}; function fg(i) { - return ya[i] || ya[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null; + return pa[i] || pa[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/, "EPSG:$3")] || null; } function gg(i, t) { - ya[i] = t; + pa[i] = t; } -let On = {}; -function zn(i, t, e) { +let In = {}; +function Gn(i, t, e) { const n = i.getCode(), s = t.getCode(); - n in On || (On[n] = {}), On[n][s] = e; + n in In || (In[n] = {}), In[n][s] = e; } -function Vu(i, t) { +function Bu(i, t) { let e; - return i in On && t in On[i] && (e = On[i][t]), e; + return i in In && t in In[i] && (e = In[i][t]), e; } const Wu = 63710088e-1; -function bh(i, t, e) { +function Sh(i, t, e) { e = e || Wu; - const n = Hi(i[1]), s = Hi(t[1]), r = (s - n) / 2, o = Hi(t[0] - i[0]) / 2, a = Math.sin(r) * Math.sin(r) + Math.sin(o) * Math.sin(o) * Math.cos(n) * Math.cos(s); + const n = Vi(i[1]), s = Vi(t[1]), r = (s - n) / 2, o = Vi(t[0] - i[0]) / 2, a = Math.sin(r) * Math.sin(r) + Math.sin(o) * Math.sin(o) * Math.cos(n) * Math.cos(s); return 2 * e * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); } function mg(i, t, e, n) { n = n || Wu; - const s = Hi(i[1]), r = Hi(i[0]), o = t / n, a = Math.asin( + const s = Vi(i[1]), r = Vi(i[0]), o = t / n, a = Math.asin( Math.sin(s) * Math.cos(o) + Math.cos(s) * Math.sin(o) * Math.cos(e) ), l = r + Math.atan2( Math.sin(e) * Math.sin(o) * Math.cos(s), Math.cos(o) - Math.sin(s) * Math.sin(a) ); - return [_h(l), _h(a)]; + return [ph(l), ph(a)]; } let va = !0; -function Hu(i) { +function Vu(i) { va = !(i === void 0 ? !0 : i); } -function ol(i, t, e) { +function sl(i, t, e) { if (t !== void 0) { for (let n = 0, s = i.length; n < s; ++n) t[n] = i[n]; @@ -2754,7 +2754,7 @@ function ol(i, t, e) { t = i.slice(); return t; } -function al(i, t, e) { +function rl(i, t, e) { if (t !== void 0 && i !== t) { for (let n = 0, s = i.length; n < s; ++n) t[n] = i[n]; @@ -2762,34 +2762,34 @@ function al(i, t, e) { } return i; } -function Xu(i) { - gg(i.getCode(), i), zn(i, i, ol); +function Yu(i) { + gg(i.getCode(), i), Gn(i, i, sl); } function pg(i) { - i.forEach(Xu); + i.forEach(Yu); } -function q(i) { +function K(i) { return typeof i == "string" ? fg(i) : i || null; } function Yr(i, t, e, n) { - i = q(i); + i = K(i); let s; const r = i.getPointResolutionFunc(); if (r) { if (s = r(t, e), n && n !== i.getUnits()) { const o = i.getMetersPerUnit(); - o && (s = s * o / Bn[n]); + o && (s = s * o / Xn[n]); } } else { const o = i.getUnits(); if (o == "degrees" && !n || n == "degrees") s = t; else { - const a = Co( + const a = Mo( i, - q("EPSG:4326") + K("EPSG:4326") ); - if (a === al && o !== "degrees") + if (a === rl && o !== "degrees") s = t * i.getMetersPerUnit(); else { let h = [ @@ -2803,33 +2803,33 @@ function Yr(i, t, e, n) { e[1] + t / 2 ]; h = a(h, h, 2); - const c = bh(h.slice(0, 2), h.slice(2, 4)), u = bh(h.slice(4, 6), h.slice(6, 8)); + const c = Sh(h.slice(0, 2), h.slice(2, 4)), u = Sh(h.slice(4, 6), h.slice(6, 8)); s = (c + u) / 2; } - const l = n ? Bn[n] : i.getMetersPerUnit(); + const l = n ? Xn[n] : i.getMetersPerUnit(); l !== void 0 && (s /= l); } } return s; } -function xa(i) { +function ya(i) { pg(i), i.forEach(function(t) { i.forEach(function(e) { - t !== e && zn(t, e, ol); + t !== e && Gn(t, e, sl); }); }); } -function _g(i, t, e, n) { +function vg(i, t, e, n) { i.forEach(function(s) { t.forEach(function(r) { - zn(s, r, e), zn(r, s, n); + Gn(s, r, e), Gn(r, s, n); }); }); } -function ll(i, t) { - return i ? typeof i == "string" ? q(i) : i : q(t); +function ol(i, t) { + return i ? typeof i == "string" ? K(i) : i : K(t); } -function Lh(i) { +function _h(i) { return function(t, e, n) { const s = t.length; n = n !== void 0 ? n : 2, e = e !== void 0 ? e : new Array(s); @@ -2842,81 +2842,81 @@ function Lh(i) { }; } function yg(i, t, e, n) { - const s = q(i), r = q(t); - zn( + const s = K(i), r = K(t); + Gn( s, r, - Lh(e) - ), zn( + _h(e) + ), Gn( r, s, - Lh(n) + _h(n) ); } -function vg(i, t) { - return Hu(), Yu( +function xg(i, t) { + return Vu(), Uu( i, "EPSG:4326", t !== void 0 ? t : "EPSG:3857" ); } -function Ae(i, t) { +function Oe(i, t) { if (i === t) return !0; const e = i.getUnits() === t.getUnits(); - return (i.getCode() === t.getCode() || Co(i, t) === ol) && e; + return (i.getCode() === t.getCode() || Mo(i, t) === sl) && e; } -function Co(i, t) { +function Mo(i, t) { const e = i.getCode(), n = t.getCode(); - let s = Vu(e, n); - return s || (s = al), s; + let s = Bu(e, n); + return s || (s = rl), s; } function Ns(i, t) { - const e = q(i), n = q(t); - return Co(e, n); + const e = K(i), n = K(t); + return Mo(e, n); } -function Yu(i, t, e) { +function Uu(i, t, e) { return Ns(t, e)(i, void 0, i.length); } -function ju(i, t, e, n) { +function Ju(i, t, e, n) { const s = Ns(t, e); - return M0(i, s, void 0, n); + return w0(i, s, void 0, n); } -function Ca(i, t) { +function xa(i, t) { return i; } -function Je(i, t) { - return va && !zr(i, [0, 0]) && i[0] >= -180 && i[0] <= 180 && i[1] >= -90 && i[1] <= 90 && (va = !1, console.warn( +function Qe(i, t) { + return va && !Xr(i, [0, 0]) && i[0] >= -180 && i[0] <= 180 && i[1] >= -90 && i[1] <= 90 && (va = !1, console.warn( "Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates." )), i; } -function Ku(i, t) { +function qu(i, t) { return i; } -function Bi(i, t) { +function Xi(i, t) { return i; } -function Th(i, t, e) { +function Rh(i, t, e) { return function(n) { let s, r; if (i.canWrapX()) { const o = i.getExtent(), a = mt(o); - n = n.slice(0), r = ku(n, i, a), r && (n[0] = n[0] - r * a), n[0] = wt(n[0], o[0], o[2]), n[1] = wt(n[1], o[1], o[3]), s = e(n); + n = n.slice(0), r = Du(n, i, a), r && (n[0] = n[0] - r * a), n[0] = Pt(n[0], o[0], o[2]), n[1] = Pt(n[1], o[1], o[3]), s = e(n); } else s = e(n); return r && t.canWrapX() && (s[0] += r * mt(t.getExtent())), s; }; } -function xg() { - xa(wh), xa(Rh), _g( - Rh, - wh, +function Mg() { + ya(Eh), ya(Ph), vg( + Ph, + Eh, hg, cg ); } -xg(); -function Ih(i, t, e) { +Mg(); +function Th(i, t, e) { return function(n, s, r, o, a) { if (!n) return; @@ -2925,42 +2925,42 @@ function Ih(i, t, e) { const l = t ? 0 : r[0] * s, h = t ? 0 : r[1] * s, c = a ? a[0] : 0, u = a ? a[1] : 0; let d = i[0] + l / 2 + c, f = i[2] - l / 2 + c, g = i[1] + h / 2 + u, m = i[3] - h / 2 + u; d > f && (d = (f + d) / 2, f = d), g > m && (g = (m + g) / 2, m = g); - let p = wt(n[0], d, f), _ = wt(n[1], g, m); + let p = Pt(n[0], d, f), v = Pt(n[1], g, m); if (o && e && s) { const y = 30 * s; - p += -y * Math.log(1 + Math.max(0, d - n[0]) / y) + y * Math.log(1 + Math.max(0, n[0] - f) / y), _ += -y * Math.log(1 + Math.max(0, g - n[1]) / y) + y * Math.log(1 + Math.max(0, n[1] - m) / y); + p += -y * Math.log(1 + Math.max(0, d - n[0]) / y) + y * Math.log(1 + Math.max(0, n[0] - f) / y), v += -y * Math.log(1 + Math.max(0, g - n[1]) / y) + y * Math.log(1 + Math.max(0, n[1] - m) / y); } - return [p, _]; + return [p, v]; }; } function Cg(i) { return i; } -function hl(i, t, e, n) { - const s = mt(t) / e[0], r = Ge(t) / e[1]; +function al(i, t, e, n) { + const s = mt(t) / e[0], r = je(t) / e[1]; return n ? Math.min(i, Math.max(s, r)) : Math.min(i, Math.min(s, r)); } -function cl(i, t, e) { +function ll(i, t, e) { let n = Math.min(i, t); const s = 50; - return n *= Math.log(1 + s * Math.max(0, i / t - 1)) / s + 1, e && (n = Math.max(n, e), n /= Math.log(1 + s * Math.max(0, e / i - 1)) / s + 1), wt(n, e / 2, t * 2); + return n *= Math.log(1 + s * Math.max(0, i / t - 1)) / s + 1, e && (n = Math.max(n, e), n /= Math.log(1 + s * Math.max(0, e / i - 1)) / s + 1), Pt(n, e / 2, t * 2); } -function Mg(i, t, e, n) { +function wg(i, t, e, n) { return t = t !== void 0 ? t : !0, function(s, r, o, a) { if (s !== void 0) { - const l = i[0], h = i[i.length - 1], c = e ? hl( + const l = i[0], h = i[i.length - 1], c = e ? al( l, e, o, n ) : l; if (a) - return t ? cl( + return t ? ll( s, c, h - ) : wt(s, h, c); - const u = Math.min(c, s), d = Math.floor(Ka(i, u, r)); + ) : Pt(s, h, c); + const u = Math.min(c, s), d = Math.floor(Ua(i, u, r)); return i[d] > c && d < i.length - 1 ? i[d + 1] : i[d]; } else return; @@ -2969,38 +2969,38 @@ function Mg(i, t, e, n) { function Eg(i, t, e, n, s, r) { return n = n !== void 0 ? n : !0, e = e !== void 0 ? e : 0, function(o, a, l, h) { if (o !== void 0) { - const c = s ? hl( + const c = s ? al( t, s, l, r ) : t; if (h) - return n ? cl( + return n ? ll( o, c, e - ) : wt(o, e, c); + ) : Pt(o, e, c); const u = 1e-9, d = Math.ceil( Math.log(t / c) / Math.log(i) - u ), f = -a * (0.5 - u) + 0.5, g = Math.min(c, o), m = Math.floor( Math.log(t / g) / Math.log(i) + f - ), p = Math.max(d, m), _ = t / Math.pow(i, p); - return wt(_, e, c); + ), p = Math.max(d, m), v = t / Math.pow(i, p); + return Pt(v, e, c); } else return; }; } -function Ah(i, t, e, n, s) { +function Lh(i, t, e, n, s) { return e = e !== void 0 ? e : !0, function(r, o, a, l) { if (r !== void 0) { - const h = n ? hl( + const h = n ? al( i, n, a, s ) : i; - return !e || !l ? wt(r, t, h) : cl( + return !e || !l ? Pt(r, t, h) : ll( r, h, t @@ -3009,15 +3009,15 @@ function Ah(i, t, e, n, s) { return; }; } -function ul(i) { +function hl(i) { if (i !== void 0) return 0; } -function Ph(i) { +function Oh(i) { if (i !== void 0) return i; } -function wg(i) { +function bg(i) { const t = 2 * Math.PI / i; return function(e, n) { if (n) @@ -3026,27 +3026,27 @@ function wg(i) { return e = Math.floor(e / t + 0.5) * t, e; }; } -function Sg(i) { - return i = i || Hi(5), function(t, e) { +function Pg(i) { + return i = i || Vi(5), function(t, e) { if (e) return t; if (t !== void 0) return Math.abs(t) <= i ? 0 : t; }; } -function qu(i) { +function Ku(i) { return Math.pow(i, 3); } -function Jn(i) { - return 1 - qu(1 - i); +function Qn(i) { + return 1 - Ku(1 - i); } -function Rg(i) { +function Sg(i) { return 3 * i * i - 2 * i * i * i; } -function bg(i) { +function _g(i) { return i; } -function Xi(i, t, e, n, s, r) { +function Yi(i, t, e, n, s, r) { r = r || []; let o = 0; for (let a = t; a < e; a += n) { @@ -3055,7 +3055,7 @@ function Xi(i, t, e, n, s, r) { } return r && r.length != o && (r.length = o), r; } -function Ju(i, t, e, n, s, r, o) { +function Qu(i, t, e, n, s, r, o) { o = o || []; const a = Math.cos(s), l = Math.sin(s), h = r[0], c = r[1]; let u = 0; @@ -3067,7 +3067,7 @@ function Ju(i, t, e, n, s, r, o) { } return o && o.length != u && (o.length = u), o; } -function Lg(i, t, e, n, s, r, o, a) { +function Rg(i, t, e, n, s, r, o, a) { a = a || []; const l = o[0], h = o[1]; let c = 0; @@ -3089,10 +3089,10 @@ function Tg(i, t, e, n, s, r, o) { } return o && o.length != a && (o.length = a), o; } -const Oh = De(); -class Ig extends Ce { +const Ah = Fe(); +class Lg extends Ce { constructor() { - super(), this.extent_ = fe(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = Qf(function(t, e, n) { + super(), this.extent_ = fe(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = $f(function(t, e, n) { if (!n) return this.getSimplifiedGeometry(e); const s = this.clone(); @@ -3107,10 +3107,10 @@ class Ig extends Ce { ); } clone() { - return V(); + return B(); } closestPointXY(t, e, n, s) { - return V(); + return B(); } containsXY(t, e) { const n = this.getClosestPoint([t, e]); @@ -3123,44 +3123,44 @@ class Ig extends Ce { return this.containsXY(t[0], t[1]); } computeExtent(t) { - return V(); + return B(); } getExtent(t) { if (this.extentRevision_ != this.getRevision()) { const e = this.computeExtent(this.extent_); - (isNaN(e[0]) || isNaN(e[1])) && Vs(e), this.extentRevision_ = this.getRevision(); + (isNaN(e[0]) || isNaN(e[1])) && Bs(e), this.extentRevision_ = this.getRevision(); } - return x0(this.extent_, t); + return M0(this.extent_, t); } rotate(t, e) { - V(); + B(); } scale(t, e, n) { - V(); + B(); } simplify(t) { return this.getSimplifiedGeometry(t * t); } getSimplifiedGeometry(t) { - return V(); + return B(); } getType() { - return V(); + return B(); } applyTransform(t) { - V(); + B(); } intersectsExtent(t) { - return V(); + return B(); } translate(t, e) { - V(); + B(); } transform(t, e) { - const n = q(t), s = n.getUnits() == "tile-pixels" ? function(r, o, a) { - const l = n.getExtent(), h = n.getWorldExtent(), c = Ge(h) / Ge(l); - return bi( - Oh, + const n = K(t), s = n.getUnits() == "tile-pixels" ? function(r, o, a) { + const l = n.getExtent(), h = n.getWorldExtent(), c = je(h) / je(l); + return _i( + Ah, h[0], h[3], c, @@ -3168,12 +3168,12 @@ class Ig extends Ce { 0, 0, 0 - ), Xi( + ), Yi( r, 0, r.length, a, - Oh, + Ah, o ), Ns(n, e)( r, @@ -3184,13 +3184,13 @@ class Ig extends Ce { return this.applyTransform(s), this; } } -const Qu = Ig; -class Ag extends Qu { +const $u = Lg; +class Og extends $u { constructor() { super(), this.layout = "XY", this.stride = 2, this.flatCoordinates = null; } computeExtent(t) { - return Su( + return Pu( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -3199,7 +3199,7 @@ class Ag extends Qu { ); } getCoordinates() { - return V(); + return B(); } getFirstCoordinate() { return this.flatCoordinates.slice(0, this.stride); @@ -3228,15 +3228,15 @@ class Ag extends Qu { return this.stride; } setFlatCoordinates(t, e) { - this.stride = Nh(t), this.layout = t, this.flatCoordinates = e; + this.stride = Ih(t), this.layout = t, this.flatCoordinates = e; } setCoordinates(t, e) { - V(); + B(); } setLayout(t, e, n) { let s; if (t) - s = Nh(t); + s = Ih(t); else { for (let r = 0; r < n; ++r) if (e.length === 0) { @@ -3244,7 +3244,7 @@ class Ag extends Qu { return; } else e = e[0]; - s = e.length, t = Pg(s); + s = e.length, t = Ag(s); } this.layout = t, this.stride = s; } @@ -3255,7 +3255,7 @@ class Ag extends Qu { const n = this.getFlatCoordinates(); if (n) { const s = this.getStride(); - Ju( + Qu( n, 0, n.length, @@ -3267,11 +3267,11 @@ class Ag extends Qu { } } scale(t, e, n) { - e === void 0 && (e = t), n || (n = Li(this.getExtent())); + e === void 0 && (e = t), n || (n = Ri(this.getExtent())); const s = this.getFlatCoordinates(); if (s) { const r = this.getStride(); - Lg( + Rg( s, 0, s.length, @@ -3299,19 +3299,19 @@ class Ag extends Qu { } } } -function Pg(i) { +function Ag(i) { let t; return i == 2 ? t = "XY" : i == 3 ? t = "XYZ" : i == 4 && (t = "XYZM"), t; } -function Nh(i) { +function Ih(i) { let t; return i == "XY" ? t = 2 : i == "XYZ" || i == "XYM" ? t = 3 : i == "XYZM" && (t = 4), t; } -function Og(i, t, e) { +function Ig(i, t, e) { const n = i.getFlatCoordinates(); if (n) { const s = i.getStride(); - return Xi( + return Yi( n, 0, n.length, @@ -3322,8 +3322,8 @@ function Og(i, t, e) { } else return null; } -const on = Ag; -function Fh(i, t, e, n, s, r, o) { +const on = Og; +function Nh(i, t, e, n, s, r, o) { const a = i[t], l = i[t + 1], h = i[e] - a, c = i[e + 1] - l; let u; if (h === 0 && c === 0) @@ -3348,7 +3348,7 @@ function Fh(i, t, e, n, s, r, o) { o[d] = i[u + d]; o.length = n; } -function dl(i, t, e, n, s) { +function cl(i, t, e, n, s) { let r = i[t], o = i[t + 1]; for (t += n; t < e; t += n) { const a = i[t], l = i[t + 1], h = Wi(r, o, a, l); @@ -3356,21 +3356,21 @@ function dl(i, t, e, n, s) { } return s; } -function fl(i, t, e, n, s) { +function ul(i, t, e, n, s) { for (let r = 0, o = e.length; r < o; ++r) { const a = e[r]; - s = dl(i, t, a, n, s), t = a; + s = cl(i, t, a, n, s), t = a; } return s; } function Ng(i, t, e, n, s) { for (let r = 0, o = e.length; r < o; ++r) { const a = e[r]; - s = fl(i, t, a, n, s), t = a[a.length - 1]; + s = ul(i, t, a, n, s), t = a[a.length - 1]; } return s; } -function gl(i, t, e, n, s, r, o, a, l, h, c) { +function dl(i, t, e, n, s, r, o, a, l, h, c) { if (t == e) return h; let u, d; @@ -3389,7 +3389,7 @@ function gl(i, t, e, n, s, r, o, a, l, h, c) { c = c || [NaN, NaN]; let f = t + n; for (; f < e; ) - if (Fh( + if (Nh( i, f - n, f, @@ -3406,7 +3406,7 @@ function gl(i, t, e, n, s, r, o, a, l, h, c) { (Math.sqrt(d) - Math.sqrt(h)) / s | 0, 1 ); - if (r && (Fh( + if (r && (Nh( i, e - n, t, @@ -3421,11 +3421,11 @@ function gl(i, t, e, n, s, r, o, a, l, h, c) { } return h; } -function ml(i, t, e, n, s, r, o, a, l, h, c) { +function fl(i, t, e, n, s, r, o, a, l, h, c) { c = c || [NaN, NaN]; for (let u = 0, d = e.length; u < d; ++u) { const f = e[u]; - h = gl( + h = dl( i, t, f, @@ -3441,11 +3441,11 @@ function ml(i, t, e, n, s, r, o, a, l, h, c) { } return h; } -function Fg(i, t, e, n, s, r, o, a, l, h, c) { +function zg(i, t, e, n, s, r, o, a, l, h, c) { c = c || [NaN, NaN]; for (let u = 0, d = e.length; u < d; ++u) { const f = e[u]; - h = ml( + h = fl( i, t, f, @@ -3461,12 +3461,12 @@ function Fg(i, t, e, n, s, r, o, a, l, h, c) { } return h; } -function Dg(i, t, e, n) { +function Fg(i, t, e, n) { for (let s = 0, r = e.length; s < r; ++s) i[t++] = e[s]; return t; } -function Mo(i, t, e, n) { +function Co(i, t, e, n) { for (let s = 0, r = e.length; s < r; ++s) { const o = e[s]; for (let a = 0; a < n; ++a) @@ -3474,11 +3474,11 @@ function Mo(i, t, e, n) { } return t; } -function pl(i, t, e, n, s) { +function gl(i, t, e, n, s) { s = s || []; let r = 0; for (let o = 0, a = e.length; o < a; ++o) { - const l = Mo( + const l = Co( i, t, e[o], @@ -3488,11 +3488,11 @@ function pl(i, t, e, n, s) { } return s.length = r, s; } -function kg(i, t, e, n, s) { +function Dg(i, t, e, n, s) { s = s || []; let r = 0; for (let o = 0, a = e.length; o < a; ++o) { - const l = pl( + const l = gl( i, t, e[o], @@ -3503,7 +3503,7 @@ function kg(i, t, e, n, s) { } return s.length = r, s; } -function _l(i, t, e, n, s, r, o) { +function ml(i, t, e, n, s, r, o) { const a = (e - t) / n; if (a < 3) { for (; t < e; t += n) @@ -3517,9 +3517,9 @@ function _l(i, t, e, n, s, r, o) { for (; h.length > 0; ) { const u = h.pop(), d = h.pop(); let f = 0; - const g = i[d], m = i[d + 1], p = i[u], _ = i[u + 1]; + const g = i[d], m = i[d + 1], p = i[u], v = i[u + 1]; for (let y = d + n; y < u; y += n) { - const v = i[y], x = i[y + 1], C = w0(v, x, g, m, p, _); + const x = i[y], M = i[y + 1], C = b0(x, M, g, m, p, v); C > f && (c = y, f = C); } f > s && (l[(c - t) / n] = 1, d + n < c && h.push(d, c), c + n < u && h.push(c, u)); @@ -3528,10 +3528,10 @@ function _l(i, t, e, n, s, r, o) { l[u] && (r[o++] = i[t + u * n], r[o++] = i[t + u * n + 1]); return o; } -function Gg(i, t, e, n, s, r, o, a) { +function jg(i, t, e, n, s, r, o, a) { for (let l = 0, h = e.length; l < h; ++l) { const c = e[l]; - o = _l( + o = ml( i, t, c, @@ -3543,21 +3543,21 @@ function Gg(i, t, e, n, s, r, o, a) { } return o; } -function Gi(i, t) { +function ji(i, t) { return t * Math.round(i / t); } -function $g(i, t, e, n, s, r, o) { +function kg(i, t, e, n, s, r, o) { if (t == e) return o; - let a = Gi(i[t], s), l = Gi(i[t + 1], s); + let a = ji(i[t], s), l = ji(i[t + 1], s); t += n, r[o++] = a, r[o++] = l; let h, c; do - if (h = Gi(i[t], s), c = Gi(i[t + 1], s), t += n, t == e) + if (h = ji(i[t], s), c = ji(i[t + 1], s), t += n, t == e) return r[o++] = h, r[o++] = c, o; while (h == a && c == l); for (; t < e; ) { - const u = Gi(i[t], s), d = Gi(i[t + 1], s); + const u = ji(i[t], s), d = ji(i[t + 1], s); if (t += n, u == h && d == c) continue; const f = h - a, g = c - l, m = u - a, p = d - l; @@ -3572,7 +3572,7 @@ function $g(i, t, e, n, s, r, o) { function td(i, t, e, n, s, r, o, a) { for (let l = 0, h = e.length; l < h; ++l) { const c = e[l]; - o = $g( + o = kg( i, t, c, @@ -3584,7 +3584,7 @@ function td(i, t, e, n, s, r, o, a) { } return o; } -function Bg(i, t, e, n, s, r, o, a) { +function Xg(i, t, e, n, s, r, o, a) { for (let l = 0, h = e.length; l < h; ++l) { const c = e[l], u = []; o = td( @@ -3607,7 +3607,7 @@ function Ci(i, t, e, n, s) { s[r++] = i.slice(o, o + n); return s.length = r, s; } -function Fs(i, t, e, n, s) { +function zs(i, t, e, n, s) { s = s !== void 0 ? s : []; let r = 0; for (let o = 0, a = e.length; o < a; ++o) { @@ -3627,7 +3627,7 @@ function Ma(i, t, e, n, s) { let r = 0; for (let o = 0, a = e.length; o < a; ++o) { const l = e[o]; - s[r++] = l.length === 1 && l[0] === t ? [] : Fs( + s[r++] = l.length === 1 && l[0] === t ? [] : zs( i, t, l, @@ -3653,7 +3653,7 @@ function id(i, t, e, n) { } return s; } -function zg(i, t, e, n) { +function Gg(i, t, e, n) { let s = 0; for (let r = 0, o = e.length; r < o; ++r) { const a = e[r]; @@ -3661,7 +3661,7 @@ function zg(i, t, e, n) { } return s; } -class jr extends on { +class Ur extends on { constructor(t, e) { super(), this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, e !== void 0 && !Array.isArray(t[0]) ? this.setFlatCoordinates( e, @@ -3672,18 +3672,18 @@ class jr extends on { ); } clone() { - return new jr(this.flatCoordinates.slice(), this.layout); + return new Ur(this.flatCoordinates.slice(), this.layout); } closestPointXY(t, e, n, s) { return s < rn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( - dl( + cl( this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0 ) - ), this.maxDeltaRevision_ = this.getRevision()), gl( + ), this.maxDeltaRevision_ = this.getRevision()), dl( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -3714,7 +3714,7 @@ class jr extends on { } getSimplifiedGeometryInternal(t) { const e = []; - return e.length = _l( + return e.length = ml( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -3722,7 +3722,7 @@ class jr extends on { t, e, 0 - ), new jr(e, "XY"); + ), new Ur(e, "XY"); } getType() { return "LinearRing"; @@ -3731,7 +3731,7 @@ class jr extends on { return !1; } setCoordinates(t, e) { - this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Mo( + this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Co( this.flatCoordinates, 0, t, @@ -3739,13 +3739,13 @@ class jr extends on { ), this.changed(); } } -const Ea = jr; -class yl extends on { +const Ca = Ur; +class pl extends on { constructor(t, e) { super(), this.setCoordinates(t, e); } clone() { - const t = new yl(this.flatCoordinates.slice(), this.layout); + const t = new pl(this.flatCoordinates.slice(), this.layout); return t.applyProperties(this), t; } closestPointXY(t, e, n, s) { @@ -3767,16 +3767,16 @@ class yl extends on { return this.flatCoordinates ? this.flatCoordinates.slice() : []; } computeExtent(t) { - return wu(this.flatCoordinates, t); + return bu(this.flatCoordinates, t); } getType() { return "Point"; } intersectsExtent(t) { - return Qa(t, this.flatCoordinates[0], this.flatCoordinates[1]); + return Ka(t, this.flatCoordinates[0], this.flatCoordinates[1]); } setCoordinates(t, e) { - this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Dg( + this.setLayout(e, t, 0), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Fg( this.flatCoordinates, 0, t, @@ -3784,12 +3784,12 @@ class yl extends on { ), this.changed(); } } -const oi = yl; -function Zg(i, t, e, n, s) { - return !Lu( +const oi = pl; +function Hg(i, t, e, n, s) { + return !Ru( s, function(o) { - return !zi( + return !Gi( i, t, e, @@ -3800,7 +3800,7 @@ function Zg(i, t, e, n, s) { } ); } -function zi(i, t, e, n, s, r) { +function Gi(i, t, e, n, s, r) { let o = 0, a = i[e - n], l = i[e - n + 1]; for (; t < e; t += n) { const h = i[t], c = i[t + 1]; @@ -3809,14 +3809,14 @@ function zi(i, t, e, n, s, r) { return o !== 0; } function vl(i, t, e, n, s, r) { - if (e.length === 0 || !zi(i, t, e[0], n, s, r)) + if (e.length === 0 || !Gi(i, t, e[0], n, s, r)) return !1; for (let o = 1, a = e.length; o < a; ++o) - if (zi(i, e[o - 1], e[o], n, s, r)) + if (Gi(i, e[o - 1], e[o], n, s, r)) return !1; return !0; } -function Ug(i, t, e, n, s, r) { +function Zg(i, t, e, n, s, r) { if (e.length === 0) return !1; for (let o = 0, a = e.length; o < a; ++o) { @@ -3830,20 +3830,20 @@ function Ug(i, t, e, n, s, r) { function nd(i, t, e, n, s, r, o) { let a, l, h, c, u, d, f; const g = s[r + 1], m = []; - for (let y = 0, v = e.length; y < v; ++y) { - const x = e[y]; - for (c = i[x - n], d = i[x - n + 1], a = t; a < x; a += n) + for (let y = 0, x = e.length; y < x; ++y) { + const M = e[y]; + for (c = i[M - n], d = i[M - n + 1], a = t; a < M; a += n) u = i[a], f = i[a + 1], (g <= d && f <= g || d <= g && g <= f) && (h = (g - d) / (f - d) * (u - c) + c, m.push(h)), c = u, d = f; } - let p = NaN, _ = -1 / 0; - for (m.sort(Ki), c = m[0], a = 1, l = m.length; a < l; ++a) { + let p = NaN, v = -1 / 0; + for (m.sort(qi), c = m[0], a = 1, l = m.length; a < l; ++a) { u = m[a]; const y = Math.abs(u - c); - y > _ && (h = (c + u) / 2, vl(i, t, e, n, h, g) && (p = h, _ = y)), c = u; + y > v && (h = (c + u) / 2, vl(i, t, e, n, h, g) && (p = h, v = y)), c = u; } - return isNaN(p) && (p = s[r]), o ? (o.push(p, g, _), o) : [p, g, _]; + return isNaN(p) && (p = s[r]), o ? (o.push(p, g, v), o) : [p, g, v]; } -function Vg(i, t, e, n, s) { +function Bg(i, t, e, n, s) { let r = []; for (let o = 0, a = e.length; o < a; ++o) { const l = e[o]; @@ -3869,15 +3869,15 @@ function sd(i, t, e, n, s) { return r; return !1; } -function Eo(i, t, e, n, s) { - const r = bu( +function wo(i, t, e, n, s) { + const r = _u( fe(), i, t, e, n ); - return ie(s, r) ? xi(s, r) || r[0] >= s[0] && r[2] <= s[2] || r[1] >= s[1] && r[3] <= s[3] ? !0 : sd( + return ie(s, r) ? Mi(s, r) || r[0] >= s[0] && r[2] <= s[2] || r[1] >= s[1] && r[3] <= s[3] ? !0 : sd( i, t, e, @@ -3889,35 +3889,35 @@ function Eo(i, t, e, n, s) { } function Wg(i, t, e, n, s) { for (let r = 0, o = e.length; r < o; ++r) { - if (Eo(i, t, e[r], n, s)) + if (wo(i, t, e[r], n, s)) return !0; t = e[r]; } return !1; } function rd(i, t, e, n, s) { - return !!(Eo(i, t, e, n, s) || zi( + return !!(wo(i, t, e, n, s) || Gi( i, t, e, n, s[0], s[1] - ) || zi( + ) || Gi( i, t, e, n, s[0], s[3] - ) || zi( + ) || Gi( i, t, e, n, s[2], s[1] - ) || zi( + ) || Gi( i, t, e, @@ -3932,13 +3932,13 @@ function od(i, t, e, n, s) { if (e.length === 1) return !0; for (let r = 1, o = e.length; r < o; ++r) - if (Zg( + if (Hg( i, e[r - 1], e[r], n, s - ) && !Eo( + ) && !wo( i, e[r - 1], e[r], @@ -3948,7 +3948,7 @@ function od(i, t, e, n, s) { return !1; return !0; } -function Hg(i, t, e, n, s) { +function Vg(i, t, e, n, s) { for (let r = 0, o = e.length; r < o; ++r) { const a = e[r]; if (od(i, t, a, n, s)) @@ -3957,7 +3957,7 @@ function Hg(i, t, e, n, s) { } return !1; } -function Xg(i, t, e, n) { +function Yg(i, t, e, n) { for (; t < e - n; ) { for (let s = 0; s < n; ++s) { const r = i[t + s]; @@ -3992,7 +3992,7 @@ function ld(i, t, e, n, s) { } return !0; } -function Yg(i, t, e, n, s) { +function Ug(i, t, e, n, s) { for (let r = 0, o = e.length; r < o; ++r) { const a = e[r]; if (!ld(i, t, a, n, s)) @@ -4010,11 +4010,11 @@ function wa(i, t, e, n, s) { a, n ); - (r === 0 ? s && l || !s && !l : s && !l || !s && l) && Xg(i, t, a, n), t = a; + (r === 0 ? s && l || !s && !l : s && !l || !s && l) && Yg(i, t, a, n), t = a; } return t; } -function Dh(i, t, e, n, s) { +function zh(i, t, e, n, s) { for (let r = 0, o = e.length; r < o; ++r) t = wa( i, @@ -4025,7 +4025,7 @@ function Dh(i, t, e, n, s) { ); return t; } -class Zn extends on { +class Hn extends on { constructor(t, e, n) { super(), this.ends_ = [], this.flatInteriorPointRevision_ = -1, this.flatInteriorPoint_ = null, this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, this.orientedRevision_ = -1, this.orientedFlatCoordinates_ = null, e !== void 0 && n ? (this.setFlatCoordinates( e, @@ -4036,10 +4036,10 @@ class Zn extends on { ); } appendLinearRing(t) { - this.flatCoordinates ? Kt(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed(); + this.flatCoordinates ? qt(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed(); } clone() { - const t = new Zn( + const t = new Hn( this.flatCoordinates.slice(), this.layout, this.ends_.slice() @@ -4048,14 +4048,14 @@ class Zn extends on { } closestPointXY(t, e, n, s) { return s < rn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( - fl( + ul( this.flatCoordinates, 0, this.ends_, this.stride, 0 ) - ), this.maxDeltaRevision_ = this.getRevision()), ml( + ), this.maxDeltaRevision_ = this.getRevision()), fl( this.flatCoordinates, 0, this.ends_, @@ -4088,14 +4088,14 @@ class Zn extends on { } getCoordinates(t) { let e; - return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), wa(e, 0, this.ends_, this.stride, t)) : e = this.flatCoordinates, Fs(e, 0, this.ends_, this.stride); + return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), wa(e, 0, this.ends_, this.stride, t)) : e = this.flatCoordinates, zs(e, 0, this.ends_, this.stride); } getEnds() { return this.ends_; } getFlatInteriorPoint() { if (this.flatInteriorPointRevision_ != this.getRevision()) { - const t = Li(this.getExtent()); + const t = Ri(this.getExtent()); this.flatInteriorPoint_ = nd( this.getOrientedFlatCoordinates(), 0, @@ -4114,7 +4114,7 @@ class Zn extends on { return this.ends_.length; } getLinearRing(t) { - return t < 0 || this.ends_.length <= t ? null : new Ea( + return t < 0 || this.ends_.length <= t ? null : new Ca( this.flatCoordinates.slice( t === 0 ? 0 : this.ends_[t - 1], this.ends_[t] @@ -4126,7 +4126,7 @@ class Zn extends on { const t = this.layout, e = this.flatCoordinates, n = this.ends_, s = []; let r = 0; for (let o = 0, a = n.length; o < a; ++o) { - const l = n[o], h = new Ea( + const l = n[o], h = new Ca( e.slice(r, l), t ); @@ -4157,7 +4157,7 @@ class Zn extends on { e, 0, n - ), new Zn(e, "XY", n); + ), new Hn(e, "XY", n); } getType() { return "Polygon"; @@ -4173,7 +4173,7 @@ class Zn extends on { } setCoordinates(t, e) { this.setLayout(e, t, 2), this.flatCoordinates || (this.flatCoordinates = []); - const n = pl( + const n = gl( this.flatCoordinates, 0, t, @@ -4183,18 +4183,18 @@ class Zn extends on { this.flatCoordinates.length = n.length === 0 ? 0 : n[n.length - 1], this.changed(); } } -const Un = Zn; -function jg(i, t, e, n) { +const Zn = Hn; +function Jg(i, t, e, n) { e = e || 32; const s = []; for (let r = 0; r < e; ++r) - Kt( + qt( s, mg(i, t, 2 * Math.PI * r / e, n) ); - return s.push(s[0], s[1]), new Zn(s, "XY", [s.length]); + return s.push(s[0], s[1]), new Hn(s, "XY", [s.length]); } -function kh(i) { +function Fh(i) { const t = i[0], e = i[1], n = i[2], s = i[3], r = [ t, e, @@ -4207,21 +4207,21 @@ function kh(i) { t, e ]; - return new Zn(r, "XY", [r.length]); + return new Hn(r, "XY", [r.length]); } -const Ho = 0; -class Kg extends Ce { +const Bo = 0; +class qg extends Ce { constructor(t) { - super(), this.on, this.once, this.un, t = Object.assign({}, t), this.hints_ = [0, 0], this.animations_ = [], this.updateAnimationKey_, this.projection_ = ll(t.projection, "EPSG:3857"), this.viewportSize_ = [100, 100], this.targetCenter_ = null, this.targetResolution_, this.targetRotation_, this.nextCenter_ = null, this.nextResolution_, this.nextRotation_, this.cancelAnchor_ = void 0, t.projection && Hu(), t.center && (t.center = Je(t.center, this.projection_)), t.extent && (t.extent = Bi(t.extent, this.projection_)), this.applyOptions_(t); + super(), this.on, this.once, this.un, t = Object.assign({}, t), this.hints_ = [0, 0], this.animations_ = [], this.updateAnimationKey_, this.projection_ = ol(t.projection, "EPSG:3857"), this.viewportSize_ = [100, 100], this.targetCenter_ = null, this.targetResolution_, this.targetRotation_, this.nextCenter_ = null, this.nextResolution_, this.nextRotation_, this.cancelAnchor_ = void 0, t.projection && Vu(), t.center && (t.center = Qe(t.center, this.projection_)), t.extent && (t.extent = Xi(t.extent, this.projection_)), this.applyOptions_(t); } applyOptions_(t) { const e = Object.assign({}, t); for (const a in Ee) delete e[a]; this.setProperties(e, !0); - const n = Jg(t); + const n = Qg(t); this.maxResolution_ = n.maxResolution, this.minResolution_ = n.minResolution, this.zoomFactor_ = n.zoomFactor, this.resolutions_ = t.resolutions, this.padding_ = t.padding, this.minZoom_ = n.minZoom; - const s = qg(t), r = n.constraint, o = Qg(t); + const s = Kg(t), r = n.constraint, o = $g(t); this.constraints_ = { center: s, resolution: r, @@ -4253,10 +4253,10 @@ class Kg extends Ce { const e = new Array(arguments.length); for (let n = 0; n < e.length; ++n) { let s = arguments[n]; - s.center && (s = Object.assign({}, s), s.center = Je( + s.center && (s = Object.assign({}, s), s.center = Qe( s.center, this.getProjection() - )), s.anchor && (s = Object.assign({}, s), s.anchor = Je( + )), s.anchor && (s = Object.assign({}, s), s.anchor = Qe( s.anchor, this.getProjection() )), e[n] = s; @@ -4283,26 +4283,26 @@ class Kg extends Ce { complete: !1, anchor: c.anchor, duration: c.duration !== void 0 ? c.duration : 1e3, - easing: c.easing || Rg, + easing: c.easing || Sg, callback: n }; if (c.center && (u.sourceCenter = o, u.targetCenter = c.center.slice(), o = u.targetCenter), c.zoom !== void 0 ? (u.sourceResolution = a, u.targetResolution = this.getResolutionForZoom(c.zoom), a = u.targetResolution) : c.resolution && (u.sourceResolution = a, u.targetResolution = c.resolution, a = u.targetResolution), c.rotation !== void 0) { u.sourceRotation = l; - const d = Pn(c.rotation - l + Math.PI, 2 * Math.PI) - Math.PI; + const d = An(c.rotation - l + Math.PI, 2 * Math.PI) - Math.PI; u.targetRotation = l + d, l = u.targetRotation; } t1(u) ? u.complete = !0 : r += u.duration, h.push(u); } - this.animations_.push(h), this.setHint(Zt.ANIMATING, 1), this.updateAnimations_(); + this.animations_.push(h), this.setHint(Ht.ANIMATING, 1), this.updateAnimations_(); } getAnimating() { - return this.hints_[Zt.ANIMATING] > 0; + return this.hints_[Ht.ANIMATING] > 0; } getInteracting() { - return this.hints_[Zt.INTERACTING] > 0; + return this.hints_[Ht.INTERACTING] > 0; } cancelAnimations() { - this.setHint(Zt.ANIMATING, -this.hints_[Zt.ANIMATING]); + this.setHint(Ht.ANIMATING, -this.hints_[Ht.ANIMATING]); let t; for (let e = 0, n = this.animations_.length; e < n; ++e) { const s = this.animations_[e]; @@ -4336,8 +4336,8 @@ class Kg extends Ce { if (l.sourceCenter) { const d = l.sourceCenter[0], f = l.sourceCenter[1], g = l.targetCenter[0], m = l.targetCenter[1]; this.nextCenter_ = l.targetCenter; - const p = d + u * (g - d), _ = f + u * (m - f); - this.targetCenter_ = [p, _]; + const p = d + u * (g - d), v = f + u * (m - f); + this.targetCenter_ = [p, v]; } if (l.sourceResolution && l.targetResolution) { const d = u === 1 ? l.targetResolution : l.sourceResolution + u * (l.targetResolution - l.sourceResolution); @@ -4356,7 +4356,7 @@ class Kg extends Ce { this.nextResolution_ = l.targetResolution, this.targetResolution_ = d, this.applyTargetState_(!0); } if (l.sourceRotation !== void 0 && l.targetRotation !== void 0) { - const d = u === 1 ? Pn(l.targetRotation + Math.PI, 2 * Math.PI) - Math.PI : l.sourceRotation + u * (l.targetRotation - l.sourceRotation); + const d = u === 1 ? An(l.targetRotation + Math.PI, 2 * Math.PI) - Math.PI : l.sourceRotation + u * (l.targetRotation - l.sourceRotation); if (l.anchor) { const f = this.constraints_.rotation( d, @@ -4373,7 +4373,7 @@ class Kg extends Ce { break; } if (r) { - this.animations_[n] = null, this.setHint(Zt.ANIMATING, -1), this.nextCenter_ = null, this.nextResolution_ = NaN, this.nextRotation_ = NaN; + this.animations_[n] = null, this.setHint(Ht.ANIMATING, -1), this.nextCenter_ = null, this.nextResolution_ = NaN, this.nextRotation_ = NaN; const o = s[0].callback; o && yr(o, !0); } @@ -4385,7 +4385,7 @@ class Kg extends Ce { calculateCenterRotate(t, e) { let n; const s = this.getCenterInternal(); - return s !== void 0 && (n = [s[0] - e[0], s[1] - e[1]], il(n, t - this.getRotation()), Nu(n, e)), n; + return s !== void 0 && (n = [s[0] - e[0], s[1] - e[1]], tl(n, t - this.getRotation()), Nu(n, e)), n; } calculateCenterZoom(t, e) { let n; @@ -4412,7 +4412,7 @@ class Kg extends Ce { } getCenter() { const t = this.getCenterInternal(); - return t && Ca(t, this.getProjection()); + return t && xa(t, this.getProjection()); } getCenterInternal() { return this.get(Ee.CENTER); @@ -4428,16 +4428,16 @@ class Kg extends Ce { } calculateExtent(t) { const e = this.calculateExtentInternal(t); - return Ku(e, this.getProjection()); + return qu(e, this.getProjection()); } calculateExtentInternal(t) { t = t || this.getViewportSizeMinusPadding_(); const e = this.getCenterInternal(); - X(e, 1); + Y(e, 1); const n = this.getResolution(); - X(n !== void 0, 2); + Y(n !== void 0, 2); const s = this.getRotation(); - return X(s !== void 0, 3), fa(e, n, s, t); + return Y(s !== void 0, 3), ua(e, n, s, t); } getMaxResolution() { return this.maxResolution_; @@ -4471,13 +4471,13 @@ class Kg extends Ce { } getResolutionForExtent(t, e) { return this.getResolutionForExtentInternal( - Bi(t, this.getProjection()), + Xi(t, this.getProjection()), e ); } getResolutionForExtentInternal(t, e) { e = e || this.getViewportSizeMinusPadding_(); - const n = mt(t) / e[0], s = Ge(t) / e[1]; + const n = mt(t) / e[0], s = je(t) / e[1]; return Math.max(n, s); } getResolutionForValueFunction(t) { @@ -4510,7 +4510,7 @@ class Kg extends Ce { const r = this.padding_; if (r) { const o = this.getViewportSizeMinusPadding_(); - s = Xo( + s = Wo( s, this.getViewportSize_(), [o[0] / 2 + r[3], o[1] / 2 + r[0]], @@ -4537,7 +4537,7 @@ class Kg extends Ce { getZoomForResolution(t) { let e = this.minZoom_ || 0, n, s; if (this.resolutions_) { - const r = Ka(this.resolutions_, t, 1); + const r = Ua(this.resolutions_, t, 1); e = r, n = this.resolutions_[r], r == this.resolutions_.length - 1 ? s = 2 : s = n / this.resolutions_[r + 1]; } else n = this.maxResolution_, s = this.zoomFactor_; @@ -4547,30 +4547,30 @@ class Kg extends Ce { if (this.resolutions_) { if (this.resolutions_.length <= 1) return 0; - const e = wt( + const e = Pt( Math.floor(t), 0, this.resolutions_.length - 2 ), n = this.resolutions_[e] / this.resolutions_[e + 1]; - return this.resolutions_[e] / Math.pow(n, wt(t - e, 0, 1)); + return this.resolutions_[e] / Math.pow(n, Pt(t - e, 0, 1)); } else return this.maxResolution_ / Math.pow(this.zoomFactor_, t - this.minZoom_); } fit(t, e) { let n; - if (X( + if (Y( Array.isArray(t) || typeof t.getSimplifiedGeometry == "function", 24 ), Array.isArray(t)) { - X(!tl(t), 25); - const s = Bi(t, this.getProjection()); - n = kh(s); + Y(!Qa(t), 25); + const s = Xi(t, this.getProjection()); + n = Fh(s); } else if (t.getType() === "Circle") { - const s = Bi( + const s = Xi( t.getExtent(), this.getProjection() ); - n = kh(s), n.rotate(this.getRotation(), Li(s)); + n = Fh(s), n.rotate(this.getRotation(), Ri(s)); } else n = t; this.fitInternal(n, e); @@ -4597,9 +4597,9 @@ class Kg extends Ce { n[1] - s[0] - s[2] ]); l = isNaN(l) ? o : Math.max(l, o), l = this.getConstrainedResolution(l, r ? 0 : 1); - const h = this.getRotation(), c = Math.sin(h), u = Math.cos(h), d = Li(a); + const h = this.getRotation(), c = Math.sin(h), u = Math.cos(h), d = Ri(a); d[0] += (s[1] - s[3]) / 2 * l, d[1] += (s[0] - s[2]) / 2 * l; - const f = d[0] * u - d[1] * c, g = d[1] * u + d[0] * c, m = this.getConstrainedCenter([f, g], l), p = e.callback ? e.callback : qi; + const f = d[0] * u - d[1] * c, g = d[1] * u + d[0] * c, m = this.getConstrainedCenter([f, g], l), p = e.callback ? e.callback : Ki; e.duration !== void 0 ? this.animateInternal( { resolution: l, @@ -4612,14 +4612,14 @@ class Kg extends Ce { } centerOn(t, e, n) { this.centerOnInternal( - Je(t, this.getProjection()), + Qe(t, this.getProjection()), e, n ); } centerOnInternal(t, e, n) { this.setCenterInternal( - Xo( + Wo( t, e, n, @@ -4632,7 +4632,7 @@ class Kg extends Ce { let r; const o = this.padding_; if (o && t) { - const a = this.getViewportSizeMinusPadding_(-n), l = Xo( + const a = this.getViewportSizeMinusPadding_(-n), l = Wo( t, s, [a[0] / 2 + o[3], a[1] / 2 + o[0]], @@ -4650,7 +4650,7 @@ class Kg extends Ce { return !!this.getCenterInternal() && this.getResolution() !== void 0; } adjustCenter(t) { - const e = Ca(this.targetCenter_, this.getProjection()); + const e = xa(this.targetCenter_, this.getProjection()); this.setCenter([ e[0] + t[0], e[1] + t[1] @@ -4664,7 +4664,7 @@ class Kg extends Ce { ]); } adjustResolution(t, e) { - e = e && Je(e, this.getProjection()), this.adjustResolutionInternal(t, e); + e = e && Qe(e, this.getProjection()), this.adjustResolutionInternal(t, e); } adjustResolutionInternal(t, e) { const n = this.getAnimating() || this.getInteracting(), s = this.getViewportSize_(this.getRotation()), r = this.constraints_.resolution( @@ -4679,7 +4679,7 @@ class Kg extends Ce { this.adjustResolution(Math.pow(this.zoomFactor_, -t), e); } adjustRotation(t, e) { - e && (e = Je(e, this.getProjection())), this.adjustRotationInternal(t, e); + e && (e = Qe(e, this.getProjection())), this.adjustRotationInternal(t, e); } adjustRotationInternal(t, e) { const n = this.getAnimating() || this.getInteracting(), s = this.constraints_.rotation( @@ -4690,7 +4690,7 @@ class Kg extends Ce { } setCenter(t) { this.setCenterInternal( - t && Je(t, this.getProjection()) + t && Qe(t, this.getProjection()) ); } setCenterInternal(t) { @@ -4729,7 +4729,7 @@ class Kg extends Ce { r ) ); - this.get(Ee.ROTATION) !== s && this.set(Ee.ROTATION, s), this.get(Ee.RESOLUTION) !== o && (this.set(Ee.RESOLUTION, o), this.set("zoom", this.getZoom(), !0)), (!a || !this.get(Ee.CENTER) || !zr(this.get(Ee.CENTER), a)) && this.set(Ee.CENTER, a), this.getAnimating() && !t && this.cancelAnimations(), this.cancelAnchor_ = void 0; + this.get(Ee.ROTATION) !== s && this.set(Ee.ROTATION, s), this.get(Ee.RESOLUTION) !== o && (this.set(Ee.RESOLUTION, o), this.set("zoom", this.getZoom(), !0)), (!a || !this.get(Ee.CENTER) || !Xr(this.get(Ee.CENTER), a)) && this.set(Ee.CENTER, a), this.getAnimating() && !t && this.cancelAnimations(), this.cancelAnchor_ = void 0; } resolveConstraints(t, e, n) { t = t !== void 0 ? t : 200; @@ -4753,23 +4753,23 @@ class Kg extends Ce { this.targetResolution_ = a, this.targetRotation_ = r, this.targetCenter_ = l, this.applyTargetState_(); return; } - n = n || (t === 0 ? this.cancelAnchor_ : void 0), this.cancelAnchor_ = void 0, (this.getResolution() !== a || this.getRotation() !== r || !this.getCenterInternal() || !zr(this.getCenterInternal(), l)) && (this.getAnimating() && this.cancelAnimations(), this.animateInternal({ + n = n || (t === 0 ? this.cancelAnchor_ : void 0), this.cancelAnchor_ = void 0, (this.getResolution() !== a || this.getRotation() !== r || !this.getCenterInternal() || !Xr(this.getCenterInternal(), l)) && (this.getAnimating() && this.cancelAnimations(), this.animateInternal({ rotation: r, center: l, resolution: a, duration: t, - easing: Jn, + easing: Qn, anchor: n })); } beginInteraction() { - this.resolveConstraints(0), this.setHint(Zt.INTERACTING, 1); + this.resolveConstraints(0), this.setHint(Ht.INTERACTING, 1); } endInteraction(t, e, n) { - n = n && Je(n, this.getProjection()), this.endInteractionInternal(t, e, n); + n = n && Qe(n, this.getProjection()), this.endInteractionInternal(t, e, n); } endInteractionInternal(t, e, n) { - this.setHint(Zt.INTERACTING, -1), this.resolveConstraints(t, e, n); + this.setHint(Ht.INTERACTING, -1), this.resolveConstraints(t, e, n); } getConstrainedCenter(t, e) { const n = this.getViewportSize_(this.getRotation()); @@ -4796,30 +4796,30 @@ function yr(i, t) { i(t); }, 0); } -function qg(i) { +function Kg(i) { if (i.extent !== void 0) { const e = i.smoothExtentConstraint !== void 0 ? i.smoothExtentConstraint : !0; - return Ih(i.extent, i.constrainOnlyCenter, e); + return Th(i.extent, i.constrainOnlyCenter, e); } - const t = ll(i.projection, "EPSG:3857"); + const t = ol(i.projection, "EPSG:3857"); if (i.multiWorld !== !0 && t.isGlobal()) { const e = t.getExtent().slice(); - return e[0] = -1 / 0, e[2] = 1 / 0, Ih(e, !1, !1); + return e[0] = -1 / 0, e[2] = 1 / 0, Th(e, !1, !1); } return Cg; } -function Jg(i) { - let t, e, n, o = i.minZoom !== void 0 ? i.minZoom : Ho, a = i.maxZoom !== void 0 ? i.maxZoom : 28; - const l = i.zoomFactor !== void 0 ? i.zoomFactor : 2, h = i.multiWorld !== void 0 ? i.multiWorld : !1, c = i.smoothResolutionConstraint !== void 0 ? i.smoothResolutionConstraint : !0, u = i.showFullExtent !== void 0 ? i.showFullExtent : !1, d = ll(i.projection, "EPSG:3857"), f = d.getExtent(); +function Qg(i) { + let t, e, n, o = i.minZoom !== void 0 ? i.minZoom : Bo, a = i.maxZoom !== void 0 ? i.maxZoom : 28; + const l = i.zoomFactor !== void 0 ? i.zoomFactor : 2, h = i.multiWorld !== void 0 ? i.multiWorld : !1, c = i.smoothResolutionConstraint !== void 0 ? i.smoothResolutionConstraint : !0, u = i.showFullExtent !== void 0 ? i.showFullExtent : !1, d = ol(i.projection, "EPSG:3857"), f = d.getExtent(); let g = i.constrainOnlyCenter, m = i.extent; if (!h && !m && d.isGlobal() && (g = !1, m = f), i.resolutions !== void 0) { const p = i.resolutions; - e = p[o], n = p[a] !== void 0 ? p[a] : p[p.length - 1], i.constrainResolution ? t = Mg( + e = p[o], n = p[a] !== void 0 ? p[a] : p[p.length - 1], i.constrainResolution ? t = wg( p, c, !g && m, u - ) : t = Ah( + ) : t = Lh( e, n, c, @@ -4827,8 +4827,8 @@ function Jg(i) { u ); } else { - const _ = (f ? Math.max(mt(f), Ge(f)) : 360 * Bn.degrees / d.getMetersPerUnit()) / sl / Math.pow(2, Ho), y = _ / Math.pow(2, 28 - Ho); - e = i.maxResolution, e !== void 0 ? o = 0 : e = _ / Math.pow(l, o), n = i.minResolution, n === void 0 && (i.maxZoom !== void 0 ? i.maxResolution !== void 0 ? n = e / Math.pow(l, a) : n = _ / Math.pow(l, a) : n = y), a = o + Math.floor( + const v = (f ? Math.max(mt(f), je(f)) : 360 * Xn.degrees / d.getMetersPerUnit()) / il / Math.pow(2, Bo), y = v / Math.pow(2, 28 - Bo); + e = i.maxResolution, e !== void 0 ? o = 0 : e = v / Math.pow(l, o), n = i.minResolution, n === void 0 && (i.maxZoom !== void 0 ? i.maxResolution !== void 0 ? n = e / Math.pow(l, a) : n = v / Math.pow(l, a) : n = y), a = o + Math.floor( Math.log(e / n) / Math.log(l) ), n = e / Math.pow(l, a - o), i.constrainResolution ? t = Eg( l, @@ -4837,7 +4837,7 @@ function Jg(i) { c, !g && m, u - ) : t = Ah( + ) : t = Lh( e, n, c, @@ -4853,24 +4853,24 @@ function Jg(i) { zoomFactor: l }; } -function Qg(i) { +function $g(i) { if (i.enableRotation !== void 0 ? i.enableRotation : !0) { const e = i.constrainRotation; - return e === void 0 || e === !0 ? Sg() : e === !1 ? Ph : typeof e == "number" ? wg(e) : Ph; + return e === void 0 || e === !0 ? Pg() : e === !1 ? Oh : typeof e == "number" ? bg(e) : Oh; } else - return ul; + return hl; } function t1(i) { - return !(i.sourceCenter && i.targetCenter && !zr(i.sourceCenter, i.targetCenter) || i.sourceResolution !== i.targetResolution || i.sourceRotation !== i.targetRotation); + return !(i.sourceCenter && i.targetCenter && !Xr(i.sourceCenter, i.targetCenter) || i.sourceResolution !== i.targetResolution || i.sourceRotation !== i.targetRotation); } -function Xo(i, t, e, n, s) { +function Wo(i, t, e, n, s) { const r = Math.cos(-s); let o = Math.sin(-s), a = i[0] * r - i[1] * o, l = i[1] * r + i[0] * o; a += (t[0] / 2 - e[0]) * n, l += (e[1] - t[1] / 2) * n, o = -o; const h = a * r - l * o, c = l * r + a * o; return [h, c]; } -const ii = Kg; +const ii = qg; class e1 extends Ce { constructor(t) { super(); @@ -4878,17 +4878,17 @@ class e1 extends Ce { e && !t.target && !e.style.pointerEvents && (e.style.pointerEvents = "auto"), this.element = e || null, this.target_ = null, this.map_ = null, this.listenerKeys = [], t.render && (this.render = t.render), t.target && this.setTarget(t.target); } disposeInternal() { - Ur(this.element), super.disposeInternal(); + Hr(this.element), super.disposeInternal(); } getMap() { return this.map_; } setMap(t) { - this.map_ && Ur(this.element); + this.map_ && Hr(this.element); for (let e = 0, n = this.listenerKeys.length; e < n; ++e) pt(this.listenerKeys[e]); - this.listenerKeys.length = 0, this.map_ = t, t && ((this.target_ ? this.target_ : t.getOverlayContainerStopEvent()).appendChild(this.element), this.render !== qi && this.listenerKeys.push( - et(t, Qe.POSTRENDER, this.render, this) + this.listenerKeys.length = 0, this.map_ = t, t && ((this.target_ ? this.target_ : t.getOverlayContainerStopEvent()).appendChild(this.element), this.render !== Ki && this.listenerKeys.push( + et(t, $e.POSTRENDER, this.render, this) ), t.render()); } render(t) { @@ -4897,8 +4897,8 @@ class e1 extends Ce { this.target_ = typeof t == "string" ? document.getElementById(t) : t; } } -const kt = e1; -class i1 extends kt { +const Dt = e1; +class i1 extends Dt { constructor(t) { t = t || {}, super({ element: document.createElement("div"), @@ -4911,11 +4911,11 @@ class i1 extends kt { typeof a == "string" ? (this.label_ = document.createElement("span"), this.label_.textContent = a, this.label_.className = s) : this.label_ = a; const l = this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_; this.toggleButton_ = document.createElement("button"), this.toggleButton_.setAttribute("type", "button"), this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_)), this.toggleButton_.title = n, this.toggleButton_.appendChild(l), this.toggleButton_.addEventListener( - H.CLICK, + V.CLICK, this.handleClick_.bind(this), !1 ); - const h = e + " " + qn + " " + vo + (this.collapsed_ && this.collapsible_ ? " " + Ch : "") + (this.collapsible_ ? "" : " ol-uncollapsible"), c = this.element; + const h = e + " " + Kn + " " + yo + (this.collapsed_ && this.collapsible_ ? " " + Mh : "") + (this.collapsible_ ? "" : " ol-uncollapsible"), c = this.element; c.className = h, c.appendChild(this.toggleButton_), c.appendChild(this.ulElement_), this.renderedAttributions_ = [], this.renderedVisible_ = !0; } collectSourceAttributions_(t) { @@ -4924,7 +4924,7 @@ class i1 extends kt { const r = t.layerStatesArray; for (let o = 0, a = r.length; o < a; ++o) { const l = r[o]; - if (!el(l, t.viewState)) + if (!$a(l, t.viewState)) continue; const h = l.layer.getSource(); if (!h) @@ -4949,7 +4949,7 @@ class i1 extends kt { } const e = this.collectSourceAttributions_(t), n = e.length > 0; if (this.renderedVisible_ != n && (this.element.style.display = n ? "" : "none", this.renderedVisible_ = n), !sn(e, this.renderedAttributions_)) { - zu(this.ulElement_); + Gu(this.ulElement_); for (let s = 0, r = e.length; s < r; ++s) { const o = document.createElement("li"); o.innerHTML = e[s], this.ulElement_.appendChild(o); @@ -4961,7 +4961,7 @@ class i1 extends kt { t.preventDefault(), this.handleToggle_(), this.userCollapsed_ = this.collapsed_; } handleToggle_() { - this.element.classList.toggle(Ch), this.collapsed_ ? Zr(this.collapseLabel_, this.label_) : Zr(this.label_, this.collapseLabel_), this.collapsed_ = !this.collapsed_, this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_)); + this.element.classList.toggle(Mh), this.collapsed_ ? Gr(this.collapseLabel_, this.label_) : Gr(this.label_, this.collapseLabel_), this.collapsed_ = !this.collapsed_, this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_)); } getCollapsible() { return this.collapsible_; @@ -4980,7 +4980,7 @@ class i1 extends kt { } } const n1 = i1; -class s1 extends kt { +class s1 extends Dt { constructor(t) { t = t || {}, super({ element: document.createElement("div"), @@ -4991,11 +4991,11 @@ class s1 extends kt { this.label_ = null, typeof n == "string" ? (this.label_ = document.createElement("span"), this.label_.className = s, this.label_.textContent = n) : (this.label_ = n, this.label_.classList.add(s)); const r = t.tipLabel ? t.tipLabel : "Reset rotation", o = document.createElement("button"); o.className = e + "-reset", o.setAttribute("type", "button"), o.title = r, o.appendChild(this.label_), o.addEventListener( - H.CLICK, + V.CLICK, this.handleClick_.bind(this), !1 ); - const a = e + " " + qn + " " + vo, l = this.element; + const a = e + " " + Kn + " " + yo, l = this.element; l.className = a, l.appendChild(o), this.callResetNorth_ = t.resetNorth ? t.resetNorth : void 0, this.duration_ = t.duration !== void 0 ? t.duration : 250, this.autoHide_ = t.autoHide !== void 0 ? t.autoHide : !0, this.rotation_ = void 0, this.autoHide_ && this.element.classList.add(pr); } handleClick_(t) { @@ -5009,7 +5009,7 @@ class s1 extends kt { n !== void 0 && (this.duration_ > 0 && n % (2 * Math.PI) !== 0 ? e.animate({ rotation: 0, duration: this.duration_, - easing: Jn + easing: Qn }) : e.setRotation(0)); } render(t) { @@ -5029,7 +5029,7 @@ class s1 extends kt { } } const r1 = s1; -class o1 extends kt { +class o1 extends Dt { constructor(t) { t = t || {}, super({ element: document.createElement("div"), @@ -5039,7 +5039,7 @@ class o1 extends kt { c.className = s, c.setAttribute("type", "button"), c.title = l, c.appendChild( typeof o == "string" ? document.createTextNode(o) : o ), c.addEventListener( - H.CLICK, + V.CLICK, this.handleClick_.bind(this, n), !1 ); @@ -5047,11 +5047,11 @@ class o1 extends kt { u.className = r, u.setAttribute("type", "button"), u.title = h, u.appendChild( typeof a == "string" ? document.createTextNode(a) : a ), u.addEventListener( - H.CLICK, + V.CLICK, this.handleClick_.bind(this, -n), !1 ); - const d = e + " " + qn + " " + vo, f = this.element; + const d = e + " " + Kn + " " + yo, f = this.element; f.className = d, f.appendChild(c), f.appendChild(u), this.duration_ = t.duration !== void 0 ? t.duration : 250; } handleClick_(t, e) { @@ -5067,7 +5067,7 @@ class o1 extends kt { this.duration_ > 0 ? (n.getAnimating() && n.cancelAnimations(), n.animate({ zoom: r, duration: this.duration_, - easing: Jn + easing: Qn })) : n.setZoom(r); } } @@ -5075,10 +5075,10 @@ class o1 extends kt { const hd = o1; function a1(i) { i = i || {}; - const t = new Oe(); + const t = new Ie(); return (i.zoom !== void 0 ? i.zoom : !0) && t.push(new hd(i.zoomOptions)), (i.rotate !== void 0 ? i.rotate : !0) && t.push(new r1(i.rotateOptions)), (i.attribution !== void 0 ? i.attribution : !0) && t.push(new n1(i.attributionOptions)), t; } -const Gh = { +const Dh = { ACTIVE: "active" }; class l1 extends Ce { @@ -5086,7 +5086,7 @@ class l1 extends Ce { super(), this.on, this.once, this.un, t && t.handleEvent && (this.handleEvent = t.handleEvent), this.map_ = null, this.setActive(!0); } getActive() { - return this.get(Gh.ACTIVE); + return this.get(Dh.ACTIVE); } getMap() { return this.map_; @@ -5095,7 +5095,7 @@ class l1 extends Ce { return !0; } setActive(t) { - this.set(Gh.ACTIVE, t); + this.set(Dh.ACTIVE, t); } setMap(t) { this.map_ = t; @@ -5107,12 +5107,12 @@ function h1(i, t, e) { const s = [n[0] + t[0], n[1] + t[1]]; i.animateInternal({ duration: e !== void 0 ? e : 250, - easing: bg, + easing: _g, center: i.getConstrainedCenter(s) }); } } -function xl(i, t, e, n) { +function yl(i, t, e, n) { const s = i.getZoom(); if (s === void 0) return; @@ -5121,25 +5121,25 @@ function xl(i, t, e, n) { resolution: o, anchor: e, duration: n !== void 0 ? n : 250, - easing: Jn + easing: Qn }); } -const Hs = l1; -class c1 extends Hs { +const Vs = l1; +class c1 extends Vs { constructor(t) { super(), t = t || {}, this.delta_ = t.delta ? t.delta : 1, this.duration_ = t.duration !== void 0 ? t.duration : 250; } handleEvent(t) { let e = !1; - if (t.type == Mt.DBLCLICK) { + if (t.type == Et.DBLCLICK) { const n = t.originalEvent, s = t.map, r = t.coordinate, o = n.shiftKey ? -this.delta_ : this.delta_, a = s.getView(); - xl(a, o, r, this.duration_), n.preventDefault(), e = !0; + yl(a, o, r, this.duration_), n.preventDefault(), e = !0; } return !e; } } const u1 = c1; -class d1 extends Hs { +class d1 extends Vs { constructor(t) { t = t || {}, super( t @@ -5158,17 +5158,17 @@ class d1 extends Hs { return !0; let e = !1; if (this.updateTrackedPointers_(t), this.handlingDownUpSequence) { - if (t.type == Mt.POINTERDRAG) + if (t.type == Et.POINTERDRAG) this.handleDragEvent(t), t.originalEvent.preventDefault(); - else if (t.type == Mt.POINTERUP) { + else if (t.type == Et.POINTERUP) { const n = this.handleUpEvent(t); this.handlingDownUpSequence = n && this.targetPointers.length > 0; } - } else if (t.type == Mt.POINTERDOWN) { + } else if (t.type == Et.POINTERDOWN) { const n = this.handleDownEvent(t); this.handlingDownUpSequence = n, e = this.stopDown(n); } else - t.type == Mt.POINTERMOVE && this.handleMoveEvent(t); + t.type == Et.POINTERMOVE && this.handleMoveEvent(t); return !e; } handleMoveEvent(t) { @@ -5183,15 +5183,15 @@ class d1 extends Hs { t.activePointers && (this.targetPointers = t.activePointers); } } -function Cl(i) { +function xl(i) { const t = i.length; let e = 0, n = 0; for (let s = 0; s < t; s++) e += i[s].clientX, n += i[s].clientY; return [e / t, n / t]; } -const Xs = d1; -function Sa(i) { +const Ys = d1; +function Ea(i) { const t = arguments; return function(e) { let n = !0; @@ -5208,7 +5208,7 @@ const f1 = function(i) { return t.contains(e); }, cd = function(i) { return i.map.getTargetElement().hasAttribute("tabindex") ? g1(i) : !0; -}, m1 = Rs, ud = function(i) { +}, m1 = Ss, ud = function(i) { const t = i.originalEvent; return t.button == 0 && !(h0 && c0 && t.ctrlKey); }, dd = function(i) { @@ -5220,31 +5220,31 @@ const f1 = function(i) { }, fd = function(i) { const t = i.originalEvent, e = t.target.tagName; return e !== "INPUT" && e !== "SELECT" && e !== "TEXTAREA" && !t.target.isContentEditable; -}, Yo = function(i) { +}, Vo = function(i) { const t = i.originalEvent; - return X(t !== void 0, 56), t.pointerType == "mouse"; -}, _1 = function(i) { + return Y(t !== void 0, 56), t.pointerType == "mouse"; +}, v1 = function(i) { const t = i.originalEvent; - return X(t !== void 0, 56), t.isPrimary && t.button === 0; + return Y(t !== void 0, 56), t.isPrimary && t.button === 0; }; -class y1 extends Xs { +class y1 extends Ys { constructor(t) { super({ - stopDown: ho + stopDown: lo }), t = t || {}, this.kinetic_ = t.kinetic, this.lastCentroid = null, this.lastPointersCount_, this.panning_ = !1; - const e = t.condition ? t.condition : Sa(dd, _1); - this.condition_ = t.onFocusOnly ? Sa(cd, e) : e, this.noKinetic_ = !1; + const e = t.condition ? t.condition : Ea(dd, v1); + this.condition_ = t.onFocusOnly ? Ea(cd, e) : e, this.noKinetic_ = !1; } handleDragEvent(t) { this.panning_ || (this.panning_ = !0, this.getMap().getView().beginInteraction()); - const e = this.targetPointers, n = Cl(e); + const e = this.targetPointers, n = xl(e); if (e.length == this.lastPointersCount_) { if (this.kinetic_ && this.kinetic_.update(n[0], n[1]), this.lastCentroid) { const s = [ this.lastCentroid[0] - n[0], n[1] - this.lastCentroid[1] ], o = t.map.getView(); - Fu(s, o.getResolution()), il(s, o.getRotation()), o.adjustCenterInternal(s); + zu(s, o.getResolution()), tl(s, o.getRotation()), o.adjustCenterInternal(s); } } else this.kinetic_ && this.kinetic_.begin(); @@ -5261,7 +5261,7 @@ class y1 extends Xs { n.animateInternal({ center: n.getConstrainedCenter(l), duration: 500, - easing: Jn + easing: Qn }); } return this.panning_ && (this.panning_ = !1, n.endInteraction()), !1; @@ -5276,18 +5276,18 @@ class y1 extends Xs { return !1; } } -const v1 = y1; -class x1 extends Xs { +const x1 = y1; +class M1 extends Ys { constructor(t) { t = t || {}, super({ - stopDown: ho + stopDown: lo }), this.condition_ = t.condition ? t.condition : f1, this.lastAngle_ = void 0, this.duration_ = t.duration !== void 0 ? t.duration : 250; } handleDragEvent(t) { - if (!Yo(t)) + if (!Vo(t)) return; const e = t.map, n = e.getView(); - if (n.getConstraints().rotation === ul) + if (n.getConstraints().rotation === hl) return; const s = e.getSize(), r = t.pixel, o = Math.atan2(s[1] / 2 - r[1], r[0] - s[0] / 2); if (this.lastAngle_ !== void 0) { @@ -5297,14 +5297,14 @@ class x1 extends Xs { this.lastAngle_ = o; } handleUpEvent(t) { - return Yo(t) ? (t.map.getView().endInteraction(this.duration_), !1) : !0; + return Vo(t) ? (t.map.getView().endInteraction(this.duration_), !1) : !0; } handleDownEvent(t) { - return Yo(t) && ud(t) && this.condition_(t) ? (t.map.getView().beginInteraction(), this.lastAngle_ = void 0, !0) : !1; + return Vo(t) && ud(t) && this.condition_(t) ? (t.map.getView().beginInteraction(), this.lastAngle_ = void 0, !0) : !1; } } -const C1 = x1; -class M1 extends ja { +const C1 = M1; +class w1 extends Ya { constructor(t) { super(), this.geometry_ = null, this.element_ = document.createElement("div"), this.element_.style.position = "absolute", this.element_.style.pointerEvents = "auto", this.element_.className = "ol-box " + t, this.map_ = null, this.startPixel_ = null, this.endPixel_ = null; } @@ -5336,24 +5336,24 @@ class M1 extends ja { this.map_.getCoordinateFromPixelInternal, this.map_ ); - s[4] = s[0].slice(), this.geometry_ ? this.geometry_.setCoordinates([s]) : this.geometry_ = new Un([s]); + s[4] = s[0].slice(), this.geometry_ ? this.geometry_.setCoordinates([s]) : this.geometry_ = new Zn([s]); } getGeometry() { return this.geometry_; } } -const E1 = M1, vr = { +const E1 = w1, xr = { BOXSTART: "boxstart", BOXDRAG: "boxdrag", BOXEND: "boxend", BOXCANCEL: "boxcancel" }; -class jo extends ze { +class Yo extends Ge { constructor(t, e, n) { super(t), this.coordinate = e, this.mapBrowserEvent = n; } } -class w1 extends Xs { +class b1 extends Ys { constructor(t) { super(), this.on, this.once, this.un, t = t || {}, this.box_ = new E1(t.className || "ol-dragbox"), this.minArea_ = t.minArea !== void 0 ? t.minArea : 64, t.onBoxEnd && (this.onBoxEnd = t.onBoxEnd), this.startPixel_ = null, this.condition_ = t.condition ? t.condition : ud, this.boxEndCondition_ = t.boxEndCondition ? t.boxEndCondition : this.defaultBoxEndCondition; } @@ -5366,8 +5366,8 @@ class w1 extends Xs { } handleDragEvent(t) { this.box_.setPixels(this.startPixel_, t.pixel), this.dispatchEvent( - new jo( - vr.BOXDRAG, + new Yo( + xr.BOXDRAG, t.coordinate, t ) @@ -5381,8 +5381,8 @@ class w1 extends Xs { t.pixel ); return e && this.onBoxEnd(t), this.dispatchEvent( - new jo( - e ? vr.BOXEND : vr.BOXCANCEL, + new Yo( + e ? xr.BOXEND : xr.BOXCANCEL, t.coordinate, t ) @@ -5390,8 +5390,8 @@ class w1 extends Xs { } handleDownEvent(t) { return this.condition_(t) ? (this.startPixel_ = t.pixel, this.box_.setMap(t.map), this.box_.setPixels(this.startPixel_, this.startPixel_), this.dispatchEvent( - new jo( - vr.BOXSTART, + new Yo( + xr.BOXSTART, t.coordinate, t ) @@ -5400,8 +5400,8 @@ class w1 extends Xs { onBoxEnd(t) { } } -const S1 = w1; -class R1 extends S1 { +const P1 = b1; +class S1 extends P1 { constructor(t) { t = t || {}; const e = t.condition ? t.condition : p1; @@ -5420,17 +5420,17 @@ class R1 extends S1 { } n.fitInternal(s, { duration: this.duration_, - easing: Jn + easing: Qn }); } } -const b1 = R1, ki = { +const _1 = S1, Di = { LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40 }; -class L1 extends Hs { +class R1 extends Vs { constructor(t) { super(), t = t || {}, this.defaultCondition_ = function(e) { return dd(e) && fd(e); @@ -5438,38 +5438,38 @@ class L1 extends Hs { } handleEvent(t) { let e = !1; - if (t.type == H.KEYDOWN) { + if (t.type == V.KEYDOWN) { const n = t.originalEvent, s = n.keyCode; - if (this.condition_(t) && (s == ki.DOWN || s == ki.LEFT || s == ki.RIGHT || s == ki.UP)) { + if (this.condition_(t) && (s == Di.DOWN || s == Di.LEFT || s == Di.RIGHT || s == Di.UP)) { const o = t.map.getView(), a = o.getResolution() * this.pixelDelta_; let l = 0, h = 0; - s == ki.DOWN ? h = -a : s == ki.LEFT ? l = -a : s == ki.RIGHT ? l = a : h = a; + s == Di.DOWN ? h = -a : s == Di.LEFT ? l = -a : s == Di.RIGHT ? l = a : h = a; const c = [l, h]; - il(c, o.getRotation()), h1(o, c, this.duration_), n.preventDefault(), e = !0; + tl(c, o.getRotation()), h1(o, c, this.duration_), n.preventDefault(), e = !0; } } return !e; } } -const T1 = L1; -class I1 extends Hs { +const T1 = R1; +class L1 extends Vs { constructor(t) { super(), t = t || {}, this.condition_ = t.condition ? t.condition : fd, this.delta_ = t.delta ? t.delta : 1, this.duration_ = t.duration !== void 0 ? t.duration : 100; } handleEvent(t) { let e = !1; - if (t.type == H.KEYDOWN || t.type == H.KEYPRESS) { + if (t.type == V.KEYDOWN || t.type == V.KEYPRESS) { const n = t.originalEvent, s = n.charCode; if (this.condition_(t) && (s == "+".charCodeAt(0) || s == "-".charCodeAt(0))) { const r = t.map, o = s == "+".charCodeAt(0) ? this.delta_ : -this.delta_, a = r.getView(); - xl(a, o, void 0, this.duration_), n.preventDefault(), e = !0; + yl(a, o, void 0, this.duration_), n.preventDefault(), e = !0; } } return !e; } } -const A1 = I1; -class P1 { +const O1 = L1; +class A1 { constructor(t, e, n) { this.decay_ = t, this.minVelocity_ = e, this.delay_ = n, this.points_ = [], this.angle_ = 0, this.initialVelocity_ = 0; } @@ -5501,14 +5501,14 @@ class P1 { return this.angle_; } } -const O1 = P1; -class N1 extends Hs { +const I1 = A1; +class N1 extends Vs { constructor(t) { t = t || {}, super( t ), this.totalDelta_ = 0, this.lastDelta_ = 0, this.maxDelta_ = t.maxDelta !== void 0 ? t.maxDelta : 1, this.duration_ = t.duration !== void 0 ? t.duration : 250, this.timeout_ = t.timeout !== void 0 ? t.timeout : 80, this.useAnchor_ = t.useAnchor !== void 0 ? t.useAnchor : !0, this.constrainResolution_ = t.constrainResolution !== void 0 ? t.constrainResolution : !1; const e = t.condition ? t.condition : m1; - this.condition_ = t.onFocusOnly ? Sa(cd, e) : e, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_, this.mode_ = void 0, this.trackpadEventGap_ = 400, this.trackpadTimeoutId_, this.deltaPerZoom_ = 300; + this.condition_ = t.onFocusOnly ? Ea(cd, e) : e, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_, this.mode_ = void 0, this.trackpadEventGap_ = 400, this.trackpadTimeoutId_, this.deltaPerZoom_ = 300; } endInteraction_() { this.trackpadTimeoutId_ = void 0; @@ -5522,12 +5522,12 @@ class N1 extends Hs { ); } handleEvent(t) { - if (!this.condition_(t) || t.type !== H.WHEEL) + if (!this.condition_(t) || t.type !== V.WHEEL) return !0; const n = t.map, s = t.originalEvent; s.preventDefault(), this.useAnchor_ && (this.lastAnchor_ = t.coordinate); let r; - if (t.type == H.WHEEL && (r = s.deltaY, a0 && s.deltaMode === WheelEvent.DOM_DELTA_PIXEL && (r /= xu), s.deltaMode === WheelEvent.DOM_DELTA_LINE && (r *= 40)), r === 0) + if (t.type == V.WHEEL && (r = s.deltaY, a0 && s.deltaMode === WheelEvent.DOM_DELTA_PIXEL && (r /= Mu), s.deltaMode === WheelEvent.DOM_DELTA_LINE && (r *= 40)), r === 0) return !1; this.lastDelta_ = r; const o = Date.now(); @@ -5548,23 +5548,23 @@ class N1 extends Hs { handleWheelZoom_(t) { const e = t.getView(); e.getAnimating() && e.cancelAnimations(); - let n = -wt( + let n = -Pt( this.totalDelta_, -this.maxDelta_ * this.deltaPerZoom_, this.maxDelta_ * this.deltaPerZoom_ ) / this.deltaPerZoom_; - (e.getConstrainResolution() || this.constrainResolution_) && (n = n ? n > 0 ? 1 : -1 : 0), xl(e, n, this.lastAnchor_, this.duration_), this.mode_ = void 0, this.totalDelta_ = 0, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_ = void 0; + (e.getConstrainResolution() || this.constrainResolution_) && (n = n ? n > 0 ? 1 : -1 : 0), yl(e, n, this.lastAnchor_, this.duration_), this.mode_ = void 0, this.totalDelta_ = 0, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_ = void 0; } setMouseAnchor(t) { this.useAnchor_ = t, t || (this.lastAnchor_ = null); } } -const F1 = N1; -class D1 extends Xs { +const z1 = N1; +class F1 extends Ys { constructor(t) { t = t || {}; const e = t; - e.stopDown || (e.stopDown = ho), super(e), this.anchor_ = null, this.lastAngle_ = void 0, this.rotating_ = !1, this.rotationDelta_ = 0, this.threshold_ = t.threshold !== void 0 ? t.threshold : 0.3, this.duration_ = t.duration !== void 0 ? t.duration : 250; + e.stopDown || (e.stopDown = lo), super(e), this.anchor_ = null, this.lastAngle_ = void 0, this.rotating_ = !1, this.rotationDelta_ = 0, this.threshold_ = t.threshold !== void 0 ? t.threshold : 0.3, this.duration_ = t.duration !== void 0 ? t.duration : 250; } handleDragEvent(t) { let e = 0; @@ -5578,9 +5578,9 @@ class D1 extends Xs { } this.lastAngle_ = r; const o = t.map, a = o.getView(); - if (a.getConstraints().rotation === ul) + if (a.getConstraints().rotation === hl) return; - const l = o.getViewport().getBoundingClientRect(), h = Cl(this.targetPointers); + const l = o.getViewport().getBoundingClientRect(), h = xl(this.targetPointers); h[0] -= l.left, h[1] -= l.top, this.anchor_ = o.getCoordinateFromPixelInternal(h), this.rotating_ && (o.render(), a.adjustRotationInternal(e, this.anchor_)); } handleUpEvent(t) { @@ -5594,12 +5594,12 @@ class D1 extends Xs { return !1; } } -const k1 = D1; -class G1 extends Xs { +const D1 = F1; +class j1 extends Ys { constructor(t) { t = t || {}; const e = t; - e.stopDown || (e.stopDown = ho), super(e), this.anchor_ = null, this.duration_ = t.duration !== void 0 ? t.duration : 400, this.lastDistance_ = void 0, this.lastScaleDelta_ = 1; + e.stopDown || (e.stopDown = lo), super(e), this.anchor_ = null, this.duration_ = t.duration !== void 0 ? t.duration : 400, this.lastDistance_ = void 0, this.lastScaleDelta_ = 1; } handleDragEvent(t) { let e = 1; @@ -5607,7 +5607,7 @@ class G1 extends Xs { this.lastDistance_ !== void 0 && (e = this.lastDistance_ / a), this.lastDistance_ = a; const l = t.map, h = l.getView(); e != 1 && (this.lastScaleDelta_ = e); - const c = l.getViewport().getBoundingClientRect(), u = Cl(this.targetPointers); + const c = l.getViewport().getBoundingClientRect(), u = xl(this.targetPointers); u[0] -= c.left, u[1] -= c.top, this.anchor_ = l.getCoordinateFromPixelInternal(u), l.render(), h.adjustResolutionInternal(e, this.anchor_); } handleUpEvent(t) { @@ -5625,58 +5625,58 @@ class G1 extends Xs { return !1; } } -const $1 = G1; -function B1(i) { +const k1 = j1; +function X1(i) { i = i || {}; - const t = new Oe(), e = new O1(-5e-3, 0.05, 100); + const t = new Ie(), e = new I1(-5e-3, 0.05, 100); return (i.altShiftDragRotate !== void 0 ? i.altShiftDragRotate : !0) && t.push(new C1()), (i.doubleClickZoom !== void 0 ? i.doubleClickZoom : !0) && t.push( new u1({ delta: i.zoomDelta, duration: i.zoomDuration }) ), (i.dragPan !== void 0 ? i.dragPan : !0) && t.push( - new v1({ + new x1({ onFocusOnly: i.onFocusOnly, kinetic: e }) - ), (i.pinchRotate !== void 0 ? i.pinchRotate : !0) && t.push(new k1()), (i.pinchZoom !== void 0 ? i.pinchZoom : !0) && t.push( - new $1({ + ), (i.pinchRotate !== void 0 ? i.pinchRotate : !0) && t.push(new D1()), (i.pinchZoom !== void 0 ? i.pinchZoom : !0) && t.push( + new k1({ duration: i.zoomDuration }) ), (i.keyboard !== void 0 ? i.keyboard : !0) && (t.push(new T1()), t.push( - new A1({ + new O1({ delta: i.zoomDelta, duration: i.zoomDuration }) )), (i.mouseWheelZoom !== void 0 ? i.mouseWheelZoom : !0) && t.push( - new F1({ + new z1({ onFocusOnly: i.onFocusOnly, duration: i.zoomDuration }) ), (i.shiftDragZoom !== void 0 ? i.shiftDragZoom : !0) && t.push( - new b1({ + new _1({ duration: i.zoomDuration }) ), t; } -function $h(i) { +function jh(i) { return i[0] > 0 && i[1] > 0; } -function z1(i, t, e) { +function G1(i, t, e) { return e === void 0 && (e = [0, 0]), e[0] = i[0] * t + 0.5 | 0, e[1] = i[1] * t + 0.5 | 0, e; } function ce(i, t) { return Array.isArray(i) ? i : (t === void 0 ? t = [i, i] : (t[0] = i, t[1] = i), t); } function gd(i) { - if (i instanceof yo) { + if (i instanceof vo) { i.setMapInternal(null); return; } i instanceof xo && i.getLayers().forEach(gd); } function md(i, t) { - if (i instanceof yo) { + if (i instanceof vo) { i.setMapInternal(t); return; } @@ -5686,11 +5686,11 @@ function md(i, t) { md(e[n], t); } } -class Z1 extends Ce { +class H1 extends Ce { constructor(t) { super(), t = t || {}, this.on, this.once, this.un; - const e = U1(t); - this.renderComplete_, this.loaded_ = !0, this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this), this.maxTilesLoading_ = t.maxTilesLoading !== void 0 ? t.maxTilesLoading : 16, this.pixelRatio_ = t.pixelRatio !== void 0 ? t.pixelRatio : xu, this.postRenderTimeoutHandle_, this.animationDelayKey_, this.animationDelay_ = this.animationDelay_.bind(this), this.coordinateToPixelTransform_ = De(), this.pixelToCoordinateTransform_ = De(), this.frameIndex_ = 0, this.frameState_ = null, this.previousExtent_ = null, this.viewPropertyListenerKey_ = null, this.viewChangeListenerKey_ = null, this.layerGroupPropertyListenerKeys_ = null, this.viewport_ = document.createElement("div"), this.viewport_.className = "ol-viewport" + ("ontouchstart" in window ? " ol-touch" : ""), this.viewport_.style.position = "relative", this.viewport_.style.overflow = "hidden", this.viewport_.style.width = "100%", this.viewport_.style.height = "100%", this.overlayContainer_ = document.createElement("div"), this.overlayContainer_.style.position = "absolute", this.overlayContainer_.style.zIndex = "0", this.overlayContainer_.style.width = "100%", this.overlayContainer_.style.height = "100%", this.overlayContainer_.style.pointerEvents = "none", this.overlayContainer_.className = "ol-overlaycontainer", this.viewport_.appendChild(this.overlayContainer_), this.overlayContainerStopEvent_ = document.createElement("div"), this.overlayContainerStopEvent_.style.position = "absolute", this.overlayContainerStopEvent_.style.zIndex = "0", this.overlayContainerStopEvent_.style.width = "100%", this.overlayContainerStopEvent_.style.height = "100%", this.overlayContainerStopEvent_.style.pointerEvents = "none", this.overlayContainerStopEvent_.className = "ol-overlaycontainer-stopevent", this.viewport_.appendChild(this.overlayContainerStopEvent_), this.mapBrowserEventHandler_ = null, this.moveTolerance_ = t.moveTolerance, this.keyboardEventTarget_ = e.keyboardEventTarget, this.targetChangeHandlerKeys_ = null, this.controls = e.controls || a1(), this.interactions = e.interactions || B1({ + const e = Z1(t); + this.renderComplete_, this.loaded_ = !0, this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this), this.maxTilesLoading_ = t.maxTilesLoading !== void 0 ? t.maxTilesLoading : 16, this.pixelRatio_ = t.pixelRatio !== void 0 ? t.pixelRatio : Mu, this.postRenderTimeoutHandle_, this.animationDelayKey_, this.animationDelay_ = this.animationDelay_.bind(this), this.coordinateToPixelTransform_ = Fe(), this.pixelToCoordinateTransform_ = Fe(), this.frameIndex_ = 0, this.frameState_ = null, this.previousExtent_ = null, this.viewPropertyListenerKey_ = null, this.viewChangeListenerKey_ = null, this.layerGroupPropertyListenerKeys_ = null, this.viewport_ = document.createElement("div"), this.viewport_.className = "ol-viewport" + ("ontouchstart" in window ? " ol-touch" : ""), this.viewport_.style.position = "relative", this.viewport_.style.overflow = "hidden", this.viewport_.style.width = "100%", this.viewport_.style.height = "100%", this.overlayContainer_ = document.createElement("div"), this.overlayContainer_.style.position = "absolute", this.overlayContainer_.style.zIndex = "0", this.overlayContainer_.style.width = "100%", this.overlayContainer_.style.height = "100%", this.overlayContainer_.style.pointerEvents = "none", this.overlayContainer_.className = "ol-overlaycontainer", this.viewport_.appendChild(this.overlayContainer_), this.overlayContainerStopEvent_ = document.createElement("div"), this.overlayContainerStopEvent_.style.position = "absolute", this.overlayContainerStopEvent_.style.zIndex = "0", this.overlayContainerStopEvent_.style.width = "100%", this.overlayContainerStopEvent_.style.height = "100%", this.overlayContainerStopEvent_.style.pointerEvents = "none", this.overlayContainerStopEvent_.className = "ol-overlaycontainer-stopevent", this.viewport_.appendChild(this.overlayContainerStopEvent_), this.mapBrowserEventHandler_ = null, this.moveTolerance_ = t.moveTolerance, this.keyboardEventTarget_ = e.keyboardEventTarget, this.targetChangeHandlerKeys_ = null, this.controls = e.controls || a1(), this.interactions = e.interactions || X1({ onFocusOnly: !0 }), this.overlays_ = e.overlays, this.overlayIdIndex_ = {}, this.renderer_ = null, this.postRenderFunctions_ = [], this.tileQueue_ = new ng( this.getTilePriority.bind(this), @@ -5770,7 +5770,7 @@ class Z1 extends Ce { return; const s = this.getCoordinateFromPixelInternal(t); n = n !== void 0 ? n : {}; - const r = n.hitTolerance !== void 0 ? n.hitTolerance : 0, o = n.layerFilter !== void 0 ? n.layerFilter : Rs, a = n.checkWrapped !== !1; + const r = n.hitTolerance !== void 0 ? n.hitTolerance : 0, o = n.layerFilter !== void 0 ? n.layerFilter : Ss, a = n.checkWrapped !== !1; return this.renderer_.forEachFeatureAtCoordinate( s, this.frameState_, @@ -5806,7 +5806,7 @@ class Z1 extends Ce { return !1; const n = this.getCoordinateFromPixelInternal(t); e = e !== void 0 ? e : {}; - const s = e.layerFilter !== void 0 ? e.layerFilter : Rs, r = e.hitTolerance !== void 0 ? e.hitTolerance : 0, o = e.checkWrapped !== !1; + const s = e.layerFilter !== void 0 ? e.layerFilter : Ss, r = e.hitTolerance !== void 0 ? e.hitTolerance : 0, o = e.checkWrapped !== !1; return this.renderer_.hasFeatureAtCoordinate( n, this.frameState_, @@ -5837,14 +5837,14 @@ class Z1 extends Ce { return t !== void 0 ? typeof t == "string" ? document.getElementById(t) : t : null; } getCoordinateFromPixel(t) { - return Ca( + return xa( this.getCoordinateFromPixelInternal(t), this.getView().getProjection() ); } getCoordinateFromPixelInternal(t) { const e = this.frameState_; - return e ? Dt( + return e ? Ft( e.pixelToCoordinateTransform, t.slice() ) : null; @@ -5867,7 +5867,7 @@ class Z1 extends Ce { } setLayers(t) { const e = this.getLayerGroup(); - if (t instanceof Oe) { + if (t instanceof Ie) { e.setLayers(t); return; } @@ -5893,7 +5893,7 @@ class Z1 extends Ce { return !1; } getPixelFromCoordinate(t) { - const e = Je( + const e = Qe( t, this.getView().getProjection() ); @@ -5901,7 +5901,7 @@ class Z1 extends Ce { } getPixelFromCoordinateInternal(t) { const e = this.frameState_; - return e ? Dt( + return e ? Ft( e.coordinateToPixelTransform, t.slice(0, 2) ) : null; @@ -5939,14 +5939,14 @@ class Z1 extends Ce { } handleBrowserEvent(t, e) { e = e || t.type; - const n = new _i(e, this, t); + const n = new vi(e, this, t); this.handleMapBrowserEvent(n); } handleMapBrowserEvent(t) { if (!this.frameState_) return; const e = t.originalEvent, n = e.type; - if (n === _a.POINTERDOWN || n === H.WHEEL || n === H.KEYDOWN) { + if (n === ma.POINTERDOWN || n === V.WHEEL || n === V.KEYDOWN) { const s = this.getOwnerDocument(), r = this.viewport_.getRootNode ? this.viewport_.getRootNode() : s, o = e.target; if (this.overlayContainerStopEvent_.contains(o) || !(r === s ? s.documentElement : r).contains(o)) return; @@ -5968,7 +5968,7 @@ class Z1 extends Ce { let s = this.maxTilesLoading_, r = s; if (t) { const o = t.viewHints; - if (o[Zt.ANIMATING] || o[Zt.INTERACTING]) { + if (o[Ht.ANIMATING] || o[Ht.INTERACTING]) { const a = Date.now() - t.time > 8; s = a ? 0 : 8, r = a ? 0 : 2; } @@ -5979,9 +5979,9 @@ class Z1 extends Ce { Ei.RENDERCOMPLETE, t ), this.loaded_ === !1 && (this.loaded_ = !0, this.dispatchEvent( - new Cn(Qe.LOADEND, this, t) + new Cn($e.LOADEND, this, t) ))) : this.loaded_ === !0 && (this.loaded_ = !1, this.dispatchEvent( - new Cn(Qe.LOADSTART, this, t) + new Cn($e.LOADSTART, this, t) ))); const n = this.postRenderFunctions_; for (let s = 0, r = n.length; s < r; ++s) @@ -5996,32 +5996,32 @@ class Z1 extends Ce { for (let e = 0, n = this.targetChangeHandlerKeys_.length; e < n; ++e) pt(this.targetChangeHandlerKeys_[e]); this.targetChangeHandlerKeys_ = null, this.viewport_.removeEventListener( - H.CONTEXTMENU, + V.CONTEXTMENU, this.boundHandleBrowserEvent_ ), this.viewport_.removeEventListener( - H.WHEEL, + V.WHEEL, this.boundHandleBrowserEvent_ - ), this.mapBrowserEventHandler_.dispose(), this.mapBrowserEventHandler_ = null, Ur(this.viewport_); + ), this.mapBrowserEventHandler_.dispose(), this.mapBrowserEventHandler_ = null, Hr(this.viewport_); } const t = this.getTargetElement(); if (!t) this.renderer_ && (clearTimeout(this.postRenderTimeoutHandle_), this.postRenderTimeoutHandle_ = void 0, this.postRenderFunctions_.length = 0, this.renderer_.dispose(), this.renderer_ = null), this.animationDelayKey_ && (cancelAnimationFrame(this.animationDelayKey_), this.animationDelayKey_ = void 0); else { - t.appendChild(this.viewport_), this.renderer_ || (this.renderer_ = new j0(this)), this.mapBrowserEventHandler_ = new Q0( + t.appendChild(this.viewport_), this.renderer_ || (this.renderer_ = new J0(this)), this.mapBrowserEventHandler_ = new $0( this, this.moveTolerance_ ); - for (const s in Mt) + for (const s in Et) this.mapBrowserEventHandler_.addEventListener( - Mt[s], + Et[s], this.handleMapBrowserEvent.bind(this) ); this.viewport_.addEventListener( - H.CONTEXTMENU, + V.CONTEXTMENU, this.boundHandleBrowserEvent_, !1 ), this.viewport_.addEventListener( - H.WHEEL, + V.WHEEL, this.boundHandleBrowserEvent_, Cu ? { passive: !1 } : !1 ); @@ -6029,17 +6029,17 @@ class Z1 extends Ce { this.targetChangeHandlerKeys_ = [ et( n, - H.KEYDOWN, + V.KEYDOWN, this.handleBrowserEvent, this ), et( n, - H.KEYPRESS, + V.KEYPRESS, this.handleBrowserEvent, this ), - et(e, H.RESIZE, this.updateSize, this) + et(e, V.RESIZE, this.updateSize, this) ]; } this.updateSize(); @@ -6055,12 +6055,12 @@ class Z1 extends Ce { const t = this.getView(); t && (this.updateViewportSize_(), this.viewPropertyListenerKey_ = et( t, - kn.PROPERTYCHANGE, + Dn.PROPERTYCHANGE, this.handleViewPropertyChanged_, this ), this.viewChangeListenerKey_ = et( t, - H.CHANGE, + V.CHANGE, this.handleViewPropertyChanged_, this ), t.resolveConstraints(0)), this.render(); @@ -6068,9 +6068,9 @@ class Z1 extends Ce { handleLayerGroupChanged_() { this.layerGroupPropertyListenerKeys_ && (this.layerGroupPropertyListenerKeys_.forEach(pt), this.layerGroupPropertyListenerKeys_ = null); const t = this.getLayerGroup(); - t && (this.handleLayerAdd_(new vi("addlayer", t)), this.layerGroupPropertyListenerKeys_ = [ - et(t, kn.PROPERTYCHANGE, this.render, this), - et(t, H.CHANGE, this.render, this), + t && (this.handleLayerAdd_(new xi("addlayer", t)), this.layerGroupPropertyListenerKeys_ = [ + et(t, Dn.PROPERTYCHANGE, this.render, this), + et(t, V.CHANGE, this.render, this), et(t, "addlayer", this.handleLayerAdd_, this), et(t, "removelayer", this.handleLayerRemove_, this) ]), this.render(); @@ -6112,7 +6112,7 @@ class Z1 extends Ce { renderFrame_(t) { const e = this.getSize(), n = this.getView(), s = this.frameState_; let r = null; - if (e !== void 0 && $h(e) && n && n.isDef()) { + if (e !== void 0 && jh(e) && n && n.isDef()) { const o = n.getHints( this.frameState_ ? this.frameState_.viewHints : void 0 ), a = n.getState(); @@ -6120,7 +6120,7 @@ class Z1 extends Ce { animate: !1, coordinateToPixelTransform: this.coordinateToPixelTransform_, declutterTree: null, - extent: fa( + extent: ua( a.center, a.resolution, a.rotation, @@ -6143,7 +6143,7 @@ class Z1 extends Ce { renderTargets: {} }, a.nextCenter && a.nextResolution) { const l = isNaN(a.nextRotation) ? a.rotation : a.nextRotation; - r.nextExtent = fa( + r.nextExtent = ua( a.nextCenter, a.nextResolution, l, @@ -6154,17 +6154,17 @@ class Z1 extends Ce { this.frameState_ = r, this.renderer_.renderFrame(r), r && (r.animate && this.render(), Array.prototype.push.apply( this.postRenderFunctions_, r.postRenderFunctions - ), s && (!this.previousExtent_ || !tl(this.previousExtent_) && !bs(r.extent, this.previousExtent_)) && (this.dispatchEvent( - new Cn(Qe.MOVESTART, this, s) - ), this.previousExtent_ = Vs(this.previousExtent_)), this.previousExtent_ && !r.viewHints[Zt.ANIMATING] && !r.viewHints[Zt.INTERACTING] && !bs(r.extent, this.previousExtent_) && (this.dispatchEvent( - new Cn(Qe.MOVEEND, this, r) - ), Eu(r.extent, this.previousExtent_))), this.dispatchEvent(new Cn(Qe.POSTRENDER, this, r)), this.renderComplete_ = this.hasListener(Qe.LOADSTART) || this.hasListener(Qe.LOADEND) || this.hasListener(Ei.RENDERCOMPLETE) ? !this.tileQueue_.getTilesLoading() && !this.tileQueue_.getCount() && !this.getLoadingOrNotReady() : void 0, this.postRenderTimeoutHandle_ || (this.postRenderTimeoutHandle_ = setTimeout(() => { + ), s && (!this.previousExtent_ || !Qa(this.previousExtent_) && !_s(r.extent, this.previousExtent_)) && (this.dispatchEvent( + new Cn($e.MOVESTART, this, s) + ), this.previousExtent_ = Bs(this.previousExtent_)), this.previousExtent_ && !r.viewHints[Ht.ANIMATING] && !r.viewHints[Ht.INTERACTING] && !_s(r.extent, this.previousExtent_) && (this.dispatchEvent( + new Cn($e.MOVEEND, this, r) + ), Eu(r.extent, this.previousExtent_))), this.dispatchEvent(new Cn($e.POSTRENDER, this, r)), this.renderComplete_ = this.hasListener($e.LOADSTART) || this.hasListener($e.LOADEND) || this.hasListener(Ei.RENDERCOMPLETE) ? !this.tileQueue_.getTilesLoading() && !this.tileQueue_.getCount() && !this.getLoadingOrNotReady() : void 0, this.postRenderTimeoutHandle_ || (this.postRenderTimeoutHandle_ = setTimeout(() => { this.postRenderTimeoutHandle_ = void 0, this.handlePostRender(); }, 0)); } setLayerGroup(t) { const e = this.getLayerGroup(); - e && this.handleLayerRemove_(new vi("removelayer", e)), this.set(Nt.LAYERGROUP, t); + e && this.handleLayerRemove_(new xi("removelayer", e)), this.set(Nt.LAYERGROUP, t); } setSize(t) { this.set(Nt.SIZE, t); @@ -6188,7 +6188,7 @@ class Z1 extends Ce { let e; if (t) { const n = getComputedStyle(t), s = t.offsetWidth - parseFloat(n.borderLeftWidth) - parseFloat(n.paddingLeft) - parseFloat(n.paddingRight) - parseFloat(n.borderRightWidth), r = t.offsetHeight - parseFloat(n.borderTopWidth) - parseFloat(n.paddingTop) - parseFloat(n.paddingBottom) - parseFloat(n.borderBottomWidth); - !isNaN(s) && !isNaN(r) && (e = [s, r], !$h(e) && !!(t.offsetWidth || t.offsetHeight || t.getClientRects().length) && console.warn( + !isNaN(s) && !isNaN(r) && (e = [s, r], !jh(e) && !!(t.offsetWidth || t.offsetHeight || t.getClientRects().length) && console.warn( "No map visible because the map container's width or height are 0." )); } @@ -6206,7 +6206,7 @@ class Z1 extends Ce { } } } -function U1(i) { +function Z1(i) { let t = null; i.keyboardEventTarget !== void 0 && (t = typeof i.keyboardEventTarget == "string" ? document.getElementById(i.keyboardEventTarget) : i.keyboardEventTarget); const e = {}, n = i.layers && typeof i.layers.getLayers == "function" ? i.layers : new xo({ @@ -6214,20 +6214,20 @@ function U1(i) { }); e[Nt.LAYERGROUP] = n, e[Nt.TARGET] = i.target, e[Nt.VIEW] = i.view instanceof ii ? i.view : new ii(); let s; - i.controls !== void 0 && (Array.isArray(i.controls) ? s = new Oe(i.controls.slice()) : (X( + i.controls !== void 0 && (Array.isArray(i.controls) ? s = new Ie(i.controls.slice()) : (Y( typeof i.controls.getArray == "function", 47 ), s = i.controls)); let r; - i.interactions !== void 0 && (Array.isArray(i.interactions) ? r = new Oe(i.interactions.slice()) : (X( + i.interactions !== void 0 && (Array.isArray(i.interactions) ? r = new Ie(i.interactions.slice()) : (Y( typeof i.interactions.getArray == "function", 48 ), r = i.interactions)); let o; - return i.overlays !== void 0 ? Array.isArray(i.overlays) ? o = new Oe(i.overlays.slice()) : (X( + return i.overlays !== void 0 ? Array.isArray(i.overlays) ? o = new Ie(i.overlays.slice()) : (Y( typeof i.overlays.getArray == "function", 49 - ), o = i.overlays) : o = new Oe(), { + ), o = i.overlays) : o = new Ie(), { controls: s, interactions: r, keyboardEventTarget: t, @@ -6235,7 +6235,7 @@ function U1(i) { values: e }; } -const V1 = Z1; +const B1 = H1; class Ml extends Ce { constructor(t) { if (super(), this.on, this.once, this.un, this.id_ = void 0, this.geometryName_ = "geometry", this.style_ = null, this.styleFunction_ = void 0, this.geometryChangeKey_ = null, this.addChangeListener(this.geometryName_, this.handleGeometryChanged_), t) @@ -6278,7 +6278,7 @@ class Ml extends Ce { const t = this.getGeometry(); t && (this.geometryChangeKey_ = et( t, - H.CHANGE, + V.CHANGE, this.handleGeometryChange_, this )), this.changed(); @@ -6301,12 +6301,12 @@ function W1(i) { return i; { let t; - return Array.isArray(i) ? t = i : (X(typeof i.getZIndex == "function", 41), t = [i]), function() { + return Array.isArray(i) ? t = i : (Y(typeof i.getZIndex == "function", 41), t = [i]), function() { return t; }; } } -const an = Ml, vt = { +const an = Ml, xt = { ACCURACY: "accuracy", ACCURACY_GEOMETRY: "accuracyGeometry", ALTITUDE: "altitude", @@ -6318,24 +6318,24 @@ const an = Ml, vt = { TRACKING: "tracking", TRACKING_OPTIONS: "trackingOptions" }; -class H1 extends ze { +class V1 extends Ge { constructor(t) { - super(H.ERROR), this.code = t.code, this.message = t.message; + super(V.ERROR), this.code = t.code, this.message = t.message; } } -class X1 extends Ce { +class Y1 extends Ce { constructor(t) { - super(), this.on, this.once, this.un, t = t || {}, this.position_ = null, this.transform_ = al, this.watchId_ = void 0, this.addChangeListener(vt.PROJECTION, this.handleProjectionChanged_), this.addChangeListener(vt.TRACKING, this.handleTrackingChanged_), t.projection !== void 0 && this.setProjection(t.projection), t.trackingOptions !== void 0 && this.setTrackingOptions(t.trackingOptions), this.setTracking(t.tracking !== void 0 ? t.tracking : !1); + super(), this.on, this.once, this.un, t = t || {}, this.position_ = null, this.transform_ = rl, this.watchId_ = void 0, this.addChangeListener(xt.PROJECTION, this.handleProjectionChanged_), this.addChangeListener(xt.TRACKING, this.handleTrackingChanged_), t.projection !== void 0 && this.setProjection(t.projection), t.trackingOptions !== void 0 && this.setTrackingOptions(t.trackingOptions), this.setTracking(t.tracking !== void 0 ? t.tracking : !1); } disposeInternal() { this.setTracking(!1), super.disposeInternal(); } handleProjectionChanged_() { const t = this.getProjection(); - t && (this.transform_ = Co( - q("EPSG:4326"), + t && (this.transform_ = Mo( + K("EPSG:4326"), t - ), this.position_ && this.set(vt.POSITION, this.transform_(this.position_))); + ), this.position_ && this.set(xt.POSITION, this.transform_(this.position_))); } handleTrackingChanged_() { if ("geolocation" in navigator) { @@ -6349,72 +6349,72 @@ class X1 extends Ce { } positionChange_(t) { const e = t.coords; - this.set(vt.ACCURACY, e.accuracy), this.set( - vt.ALTITUDE, + this.set(xt.ACCURACY, e.accuracy), this.set( + xt.ALTITUDE, e.altitude === null ? void 0 : e.altitude ), this.set( - vt.ALTITUDE_ACCURACY, + xt.ALTITUDE_ACCURACY, e.altitudeAccuracy === null ? void 0 : e.altitudeAccuracy ), this.set( - vt.HEADING, - e.heading === null ? void 0 : Hi(e.heading) + xt.HEADING, + e.heading === null ? void 0 : Vi(e.heading) ), this.position_ ? (this.position_[0] = e.longitude, this.position_[1] = e.latitude) : this.position_ = [e.longitude, e.latitude]; const n = this.transform_(this.position_); - this.set(vt.POSITION, n), this.set(vt.SPEED, e.speed === null ? void 0 : e.speed); - const s = jg(this.position_, e.accuracy); - s.applyTransform(this.transform_), this.set(vt.ACCURACY_GEOMETRY, s), this.changed(); + this.set(xt.POSITION, n), this.set(xt.SPEED, e.speed === null ? void 0 : e.speed); + const s = Jg(this.position_, e.accuracy); + s.applyTransform(this.transform_), this.set(xt.ACCURACY_GEOMETRY, s), this.changed(); } positionError_(t) { - this.dispatchEvent(new H1(t)); + this.dispatchEvent(new V1(t)); } getAccuracy() { - return this.get(vt.ACCURACY); + return this.get(xt.ACCURACY); } getAccuracyGeometry() { - return this.get(vt.ACCURACY_GEOMETRY) || null; + return this.get(xt.ACCURACY_GEOMETRY) || null; } getAltitude() { - return this.get(vt.ALTITUDE); + return this.get(xt.ALTITUDE); } getAltitudeAccuracy() { - return this.get(vt.ALTITUDE_ACCURACY); + return this.get(xt.ALTITUDE_ACCURACY); } getHeading() { - return this.get(vt.HEADING); + return this.get(xt.HEADING); } getPosition() { - return this.get(vt.POSITION); + return this.get(xt.POSITION); } getProjection() { - return this.get(vt.PROJECTION); + return this.get(xt.PROJECTION); } getSpeed() { - return this.get(vt.SPEED); + return this.get(xt.SPEED); } getTracking() { - return this.get(vt.TRACKING); + return this.get(xt.TRACKING); } getTrackingOptions() { - return this.get(vt.TRACKING_OPTIONS); + return this.get(xt.TRACKING_OPTIONS); } setProjection(t) { - this.set(vt.PROJECTION, q(t)); + this.set(xt.PROJECTION, K(t)); } setTracking(t) { - this.set(vt.TRACKING, t); + this.set(xt.TRACKING, t); } setTrackingOptions(t) { - this.set(vt.TRACKING_OPTIONS, t); + this.set(xt.TRACKING_OPTIONS, t); } } -const Y1 = X1; -class El { +const U1 = Y1; +class Cl { constructor(t) { t = t || {}, this.color_ = t.color !== void 0 ? t.color : null; } clone() { const t = this.getColor(); - return new El({ + return new Cl({ color: Array.isArray(t) ? t.slice() : t || void 0 }); } @@ -6425,7 +6425,7 @@ class El { this.color_ = t; } } -const Yt = El; +const Ut = Cl; function pd(i, t, e, n, s, r, o) { let a, l; const h = (e - t) / n; @@ -6437,10 +6437,10 @@ function pd(i, t, e, n, s, r, o) { let c = i[t], u = i[t + 1], d = 0; const f = [0]; for (let p = t + n; p < e; p += n) { - const _ = i[p], y = i[p + 1]; - d += Math.sqrt((_ - c) * (_ - c) + (y - u) * (y - u)), f.push(d), c = _, u = y; + const v = i[p], y = i[p + 1]; + d += Math.sqrt((v - c) * (v - c) + (y - u) * (y - u)), f.push(d), c = v, u = y; } - const g = s * d, m = Kf(f, g); + const g = s * d, m = qf(f, g); m < 0 ? (l = (g - f[-m - 2]) / (f[-m - 1] - f[-m - 2]), a = t + (-m - 2) * n) : a = t + m * n; } o = o > 1 ? o : 2, r = r || new Array(o); @@ -6448,7 +6448,7 @@ function pd(i, t, e, n, s, r, o) { r[c] = a === void 0 ? NaN : l === void 0 ? i[a + c] : ti(i[a + c], i[a + n + c], l); return r; } -function Ra(i, t, e, n, s, r) { +function ba(i, t, e, n, s, r) { if (e == t) return null; let o; @@ -6478,9 +6478,9 @@ function Ra(i, t, e, n, s, r) { ); return o.push(s), o; } -function j1(i, t, e, n, s, r, o) { +function J1(i, t, e, n, s, r, o) { if (o) - return Ra( + return ba( i, t, e[e.length - 1], @@ -6499,7 +6499,7 @@ function j1(i, t, e, n, s, r, o) { if (s < i[t + n - 1]) return null; if (s <= i[c - 1]) - return Ra( + return ba( i, t, c, @@ -6512,7 +6512,7 @@ function j1(i, t, e, n, s, r, o) { } return null; } -function _d(i, t, e, n) { +function vd(i, t, e, n) { let s = i[t], r = i[t + 1], o = 0; for (let a = t + n; a < e; a += n) { const l = i[a], h = i[a + 1]; @@ -6520,7 +6520,7 @@ function _d(i, t, e, n) { } return o; } -class Kr extends on { +class Jr extends on { constructor(t, e) { super(), this.flatMidpoint_ = null, this.flatMidpointRevision_ = -1, this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, e !== void 0 && !Array.isArray(t[0]) ? this.setFlatCoordinates( e, @@ -6531,10 +6531,10 @@ class Kr extends on { ); } appendCoordinate(t) { - this.flatCoordinates ? Kt(this.flatCoordinates, t) : this.flatCoordinates = t.slice(), this.changed(); + this.flatCoordinates ? qt(this.flatCoordinates, t) : this.flatCoordinates = t.slice(), this.changed(); } clone() { - const t = new Kr( + const t = new Jr( this.flatCoordinates.slice(), this.layout ); @@ -6542,14 +6542,14 @@ class Kr extends on { } closestPointXY(t, e, n, s) { return s < rn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( - dl( + cl( this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0 ) - ), this.maxDeltaRevision_ = this.getRevision()), gl( + ), this.maxDeltaRevision_ = this.getRevision()), dl( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6572,7 +6572,7 @@ class Kr extends on { ); } getCoordinateAtM(t, e) { - return this.layout != "XYM" && this.layout != "XYZM" ? null : (e = e !== void 0 ? e : !1, Ra( + return this.layout != "XYM" && this.layout != "XYZM" ? null : (e = e !== void 0 ? e : !1, ba( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6601,7 +6601,7 @@ class Kr extends on { ); } getLength() { - return _d( + return vd( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6613,7 +6613,7 @@ class Kr extends on { } getSimplifiedGeometryInternal(t) { const e = []; - return e.length = _l( + return e.length = ml( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6621,13 +6621,13 @@ class Kr extends on { t, e, 0 - ), new Kr(e, "XY"); + ), new Jr(e, "XY"); } getType() { return "LineString"; } intersectsExtent(t) { - return Eo( + return wo( this.flatCoordinates, 0, this.flatCoordinates.length, @@ -6636,7 +6636,7 @@ class Kr extends on { ); } setCoordinates(t, e) { - this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Mo( + this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Co( this.flatCoordinates, 0, t, @@ -6644,7 +6644,7 @@ class Kr extends on { ), this.changed(); } } -const Ds = Kr; +const Fs = Jr; class wl { constructor(t) { t = t || {}, this.color_ = t.color !== void 0 ? t.color : null, this.lineCap_ = t.lineCap, this.lineDash_ = t.lineDash !== void 0 ? t.lineDash : null, this.lineDashOffset_ = t.lineDashOffset, this.lineJoin_ = t.lineJoin, this.miterLimit_ = t.miterLimit, this.width_ = t.width; @@ -6704,20 +6704,20 @@ class wl { this.width_ = t; } } -const Re = wl, At = { +const Se = wl, Ot = { IDLE: 0, LOADING: 1, LOADED: 2, ERROR: 3, EMPTY: 4 }; -class Sl { +class El { constructor(t) { this.opacity_ = t.opacity, this.rotateWithView_ = t.rotateWithView, this.rotation_ = t.rotation, this.scale_ = t.scale, this.scaleArray_ = ce(t.scale), this.displacement_ = t.displacement, this.declutterMode_ = t.declutterMode; } clone() { const t = this.getScale(); - return new Sl({ + return new El({ opacity: this.getOpacity(), scale: Array.isArray(t) ? t.slice() : t, rotation: this.getRotation(), @@ -6748,28 +6748,28 @@ class Sl { return this.declutterMode_; } getAnchor() { - return V(); + return B(); } getImage(t) { - return V(); + return B(); } getHitDetectionImage() { - return V(); + return B(); } getPixelRatio(t) { return 1; } getImageState() { - return V(); + return B(); } getImageSize() { - return V(); + return B(); } getOrigin() { - return V(); + return B(); } getSize() { - return V(); + return B(); } setDisplacement(t) { this.displacement_ = t; @@ -6787,20 +6787,20 @@ class Sl { this.scale_ = t, this.scaleArray_ = ce(t); } listenImageChange(t) { - V(); + B(); } load() { - V(); + B(); } unlistenImageChange(t) { - V(); + B(); } } -const yd = Sl; +const yd = El; function Ne(i) { - return Array.isArray(i) ? Pu(i) : i; + return Array.isArray(i) ? Au(i) : i; } -class Rl extends yd { +class bl extends yd { constructor(t) { const e = t.rotateWithView !== void 0 ? t.rotateWithView : !1; super({ @@ -6813,7 +6813,7 @@ class Rl extends yd { }), this.canvas_ = void 0, this.hitDetectionCanvas_ = null, this.fill_ = t.fill !== void 0 ? t.fill : null, this.origin_ = [0, 0], this.points_ = t.points, this.radius_ = t.radius !== void 0 ? t.radius : t.radius1, this.radius2_ = t.radius2, this.angle_ = t.angle !== void 0 ? t.angle : 0, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.size_ = null, this.renderOptions_ = null, this.render(); } clone() { - const t = this.getScale(), e = new Rl({ + const t = this.getScale(), e = new bl({ fill: this.getFill() ? this.getFill().clone() : void 0, points: this.getPoints(), radius: this.getRadius(), @@ -6868,7 +6868,7 @@ class Rl extends yd { return this.size_; } getImageState() { - return At.LOADED; + return Ot.LOADED; } getOrigin() { return this.origin_; @@ -6911,7 +6911,7 @@ class Rl extends yd { const f = e / 2 / d, g = e / 2 * (c / u), p = Math.sqrt((s + f) * (s + f) + g * g) - s; if (this.radius2_ === void 0 || t === "bevel") return p * 2; - const _ = s * Math.sin(a), y = Math.sqrt(s * s - _ * _), v = r - y, C = Math.sqrt(_ * _ + v * v) / _; + const v = s * Math.sin(a), y = Math.sqrt(s * s - v * v), x = r - y, C = Math.sqrt(v * v + x * x) / v; if (C <= n) { const E = C * e / 2 - r - s; return 2 * Math.max(p, E); @@ -6919,8 +6919,8 @@ class Rl extends yd { return p * 2; } createRenderOptions() { - let t = $n, e = 0, n = null, s = 0, r, o = 0; - this.stroke_ && (r = this.stroke_.getColor(), r === null && (r = As), r = Ne(r), o = this.stroke_.getWidth(), o === void 0 && (o = Os), n = this.stroke_.getLineDash(), s = this.stroke_.getLineDashOffset(), t = this.stroke_.getLineJoin(), t === void 0 && (t = $n), e = this.stroke_.getMiterLimit(), e === void 0 && (e = Is)); + let t = kn, e = 0, n = null, s = 0, r, o = 0; + this.stroke_ && (r = this.stroke_.getColor(), r === null && (r = Os), r = Ne(r), o = this.stroke_.getWidth(), o === void 0 && (o = Is), n = this.stroke_.getLineDash(), s = this.stroke_.getLineDashOffset(), t = this.stroke_.getLineJoin(), t === void 0 && (t = kn), e = this.stroke_.getMiterLimit(), e === void 0 && (e = Ls)); const a = this.calculateLineJoinSize_(t, o, e), l = Math.max(this.radius_, this.radius2_ || 0), h = Math.ceil(2 * l + a); return { strokeStyle: r, @@ -6947,7 +6947,7 @@ class Rl extends yd { createHitDetectionCanvas_(t) { if (this.fill_) { let e = this.fill_.getColor(), n = 0; - if (typeof e == "string" && (e = $r(e)), e === null ? n = 1 : Array.isArray(e) && (n = e.length === 4 ? e[3] : 1), n === 0) { + if (typeof e == "string" && (e = jr(e)), e === null ? n = 1 : Array.isArray(e) && (n = e.length === 4 ? e[3] : 1), n === 0) { const s = ge( t.size, t.size @@ -6977,8 +6977,8 @@ class Rl extends yd { e.translate(t.size / 2, t.size / 2), this.createPath_(e), e.fillStyle = si, e.fill(), this.stroke_ && (e.strokeStyle = t.strokeStyle, e.lineWidth = t.strokeWidth, t.lineDash && (e.setLineDash(t.lineDash), e.lineDashOffset = t.lineDashOffset), e.lineJoin = t.lineJoin, e.miterLimit = t.miterLimit, e.stroke()); } } -const vd = Rl; -class bl extends vd { +const xd = bl; +class Pl extends xd { constructor(t) { t = t || { radius: 5 }, super({ points: 1 / 0, @@ -6993,7 +6993,7 @@ class bl extends vd { }); } clone() { - const t = this.getScale(), e = new bl({ + const t = this.getScale(), e = new Pl({ fill: this.getFill() ? this.getFill().clone() : void 0, stroke: this.getStroke() ? this.getStroke().clone() : void 0, radius: this.getRadius(), @@ -7009,14 +7009,14 @@ class bl extends vd { this.radius_ = t, this.render(); } } -const ni = bl; -class wo { +const ni = Pl; +class Eo { constructor(t) { - t = t || {}, this.geometry_ = null, this.geometryFunction_ = Bh, t.geometry !== void 0 && this.setGeometry(t.geometry), this.fill_ = t.fill !== void 0 ? t.fill : null, this.image_ = t.image !== void 0 ? t.image : null, this.renderer_ = t.renderer !== void 0 ? t.renderer : null, this.hitDetectionRenderer_ = t.hitDetectionRenderer !== void 0 ? t.hitDetectionRenderer : null, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.text_ = t.text !== void 0 ? t.text : null, this.zIndex_ = t.zIndex; + t = t || {}, this.geometry_ = null, this.geometryFunction_ = kh, t.geometry !== void 0 && this.setGeometry(t.geometry), this.fill_ = t.fill !== void 0 ? t.fill : null, this.image_ = t.image !== void 0 ? t.image : null, this.renderer_ = t.renderer !== void 0 ? t.renderer : null, this.hitDetectionRenderer_ = t.hitDetectionRenderer !== void 0 ? t.hitDetectionRenderer : null, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.text_ = t.text !== void 0 ? t.text : null, this.zIndex_ = t.zIndex; } clone() { let t = this.getGeometry(); - return t && typeof t == "object" && (t = t.clone()), new wo({ + return t && typeof t == "object" && (t = t.clone()), new Eo({ geometry: t, fill: this.getFill() ? this.getFill().clone() : void 0, image: this.getImage() ? this.getImage().clone() : void 0, @@ -7076,35 +7076,35 @@ class wo { return e.get(t); } : t ? t !== void 0 && (this.geometryFunction_ = function() { return t; - }) : this.geometryFunction_ = Bh, this.geometry_ = t; + }) : this.geometryFunction_ = kh, this.geometry_ = t; } setZIndex(t) { this.zIndex_ = t; } } -function K1(i) { +function q1(i) { let t; if (typeof i == "function") t = i; else { let e; - Array.isArray(i) ? e = i : (X(typeof i.getZIndex == "function", 41), e = [i]), t = function() { + Array.isArray(i) ? e = i : (Y(typeof i.getZIndex == "function", 41), e = [i]), t = function() { return e; }; } return t; } -let Ko = null; -function q1(i, t) { - if (!Ko) { - const e = new Yt({ +let Uo = null; +function K1(i, t) { + if (!Uo) { + const e = new Ut({ color: "rgba(255,255,255,0.4)" - }), n = new Re({ + }), n = new Se({ color: "#3399CC", width: 1.25 }); - Ko = [ - new wo({ + Uo = [ + new Eo({ image: new ni({ fill: e, stroke: n, @@ -7115,19 +7115,19 @@ function q1(i, t) { }) ]; } - return Ko; + return Uo; } -function Bh(i) { +function kh(i) { return i.getGeometry(); } -const Vt = wo, J1 = "#333"; -class Ll { +const Bt = Eo, Q1 = "#333"; +class Sl { constructor(t) { - t = t || {}, this.font_ = t.font, this.rotation_ = t.rotation, this.rotateWithView_ = t.rotateWithView, this.scale_ = t.scale, this.scaleArray_ = ce(t.scale !== void 0 ? t.scale : 1), this.text_ = t.text, this.textAlign_ = t.textAlign, this.justify_ = t.justify, this.textBaseline_ = t.textBaseline, this.fill_ = t.fill !== void 0 ? t.fill : new Yt({ color: J1 }), this.maxAngle_ = t.maxAngle !== void 0 ? t.maxAngle : Math.PI / 4, this.placement_ = t.placement !== void 0 ? t.placement : "point", this.overflow_ = !!t.overflow, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.offsetX_ = t.offsetX !== void 0 ? t.offsetX : 0, this.offsetY_ = t.offsetY !== void 0 ? t.offsetY : 0, this.backgroundFill_ = t.backgroundFill ? t.backgroundFill : null, this.backgroundStroke_ = t.backgroundStroke ? t.backgroundStroke : null, this.padding_ = t.padding === void 0 ? null : t.padding; + t = t || {}, this.font_ = t.font, this.rotation_ = t.rotation, this.rotateWithView_ = t.rotateWithView, this.scale_ = t.scale, this.scaleArray_ = ce(t.scale !== void 0 ? t.scale : 1), this.text_ = t.text, this.textAlign_ = t.textAlign, this.justify_ = t.justify, this.textBaseline_ = t.textBaseline, this.fill_ = t.fill !== void 0 ? t.fill : new Ut({ color: Q1 }), this.maxAngle_ = t.maxAngle !== void 0 ? t.maxAngle : Math.PI / 4, this.placement_ = t.placement !== void 0 ? t.placement : "point", this.overflow_ = !!t.overflow, this.stroke_ = t.stroke !== void 0 ? t.stroke : null, this.offsetX_ = t.offsetX !== void 0 ? t.offsetX : 0, this.offsetY_ = t.offsetY !== void 0 ? t.offsetY : 0, this.backgroundFill_ = t.backgroundFill ? t.backgroundFill : null, this.backgroundStroke_ = t.backgroundStroke ? t.backgroundStroke : null, this.padding_ = t.padding === void 0 ? null : t.padding; } clone() { const t = this.getScale(); - return new Ll({ + return new Sl({ font: this.getFont(), placement: this.getPlacement(), maxAngle: this.getMaxAngle(), @@ -7260,15 +7260,15 @@ class Ll { this.padding_ = t; } } -const ba = Ll; -function Q1(i, t, e, n, s) { - xd(i, t, e || 0, n || i.length - 1, s || tm); +const Pa = Sl; +function $1(i, t, e, n, s) { + Md(i, t, e || 0, n || i.length - 1, s || t2); } -function xd(i, t, e, n, s) { +function Md(i, t, e, n, s) { for (; n > e; ) { if (n - e > 600) { var r = n - e + 1, o = t - e + 1, a = Math.log(r), l = 0.5 * Math.exp(2 * a / 3), h = 0.5 * Math.sqrt(a * l * (r - l) / r) * (o - r / 2 < 0 ? -1 : 1), c = Math.max(e, Math.floor(t - o * l / r + h)), u = Math.min(n, Math.floor(t + (r - o) * l / r + h)); - xd(i, t, c, u, s); + Md(i, t, c, u, s); } var d = i[t], f = e, g = n; for (hs(i, e, t), s(i[n], d) > 0 && hs(i, e, n); f < g; ) { @@ -7284,7 +7284,7 @@ function hs(i, t, e) { var n = i[t]; i[t] = i[e], i[e] = n; } -function tm(i, t) { +function t2(i, t) { return i < t ? -1 : i > t ? 1 : 0; } class Cd { @@ -7303,7 +7303,7 @@ class Cd { for (; e; ) { for (let o = 0; o < e.children.length; o++) { const a = e.children[o], l = e.leaf ? s(a) : a; - Cr(t, l) && (e.leaf ? n.push(a) : Jo(t, l) ? this._all(a, n) : r.push(a)); + Cr(t, l) && (e.leaf ? n.push(a) : qo(t, l) ? this._all(a, n) : r.push(a)); } e = r.pop(); } @@ -7318,7 +7318,7 @@ class Cd { for (let s = 0; s < e.children.length; s++) { const r = e.children[s], o = e.leaf ? this.toBBox(r) : r; if (Cr(t, o)) { - if (e.leaf || Jo(t, o)) + if (e.leaf || qo(t, o)) return !0; n.push(r); } @@ -7353,7 +7353,7 @@ class Cd { return t && this._insert(t, this.data.height - 1), this; } clear() { - return this.data = Mn([]), this; + return this.data = wn([]), this; } remove(t, e) { if (!t) @@ -7363,11 +7363,11 @@ class Cd { let a, l, h; for (; n || r.length; ) { if (n || (n = r.pop(), l = r[r.length - 1], a = o.pop(), h = !0), n.leaf) { - const c = em(t, n.children, e); + const c = e2(t, n.children, e); if (c !== -1) return n.children.splice(c, 1), r.push(n), this._condense(r), this; } - !h && !n.leaf && Jo(n, s) ? (r.push(n), o.push(a), a = 0, l = n, n = n.children[0]) : l ? (a++, n = l.children[a], h = !1) : n = null; + !h && !n.leaf && qo(n, s) ? (r.push(n), o.push(a), a = 0, l = n, n = n.children[0]) : l ? (a++, n = l.children[a], h = !1) : n = null; } return this; } @@ -7396,13 +7396,13 @@ class Cd { const r = n - e + 1; let o = this._maxEntries, a; if (r <= o) - return a = Mn(t.slice(e, n + 1)), mn(a, this.toBBox), a; - s || (s = Math.ceil(Math.log(r) / Math.log(o)), o = Math.ceil(r / Math.pow(o, s - 1))), a = Mn([]), a.leaf = !1, a.height = s; + return a = wn(t.slice(e, n + 1)), mn(a, this.toBBox), a; + s || (s = Math.ceil(Math.log(r) / Math.log(o)), o = Math.ceil(r / Math.pow(o, s - 1))), a = wn([]), a.leaf = !1, a.height = s; const l = Math.ceil(r / o), h = l * Math.ceil(Math.sqrt(o)); - zh(t, e, n, h, this.compareMinX); + Xh(t, e, n, h, this.compareMinX); for (let c = e; c <= n; c += h) { const u = Math.min(c + h - 1, n); - zh(t, c, u, l, this.compareMinY); + Xh(t, c, u, l, this.compareMinY); for (let d = c; d <= u; d += l) { const f = Math.min(d + l - 1, u); a.children.push(this._build(t, d, f, s - 1)); @@ -7414,7 +7414,7 @@ class Cd { for (; s.push(e), !(e.leaf || s.length - 1 === n); ) { let r = 1 / 0, o = 1 / 0, a; for (let l = 0; l < e.children.length; l++) { - const h = e.children[l], c = qo(h), u = sm(t, h) - c; + const h = e.children[l], c = Jo(h), u = s2(t, h) - c; u < o ? (o = u, r = c < r ? c : r, a = h) : u === o && c < r && (r = c, a = h); } e = a || e.children[0]; @@ -7430,35 +7430,35 @@ class Cd { _split(t, e) { const n = t[e], s = n.children.length, r = this._minEntries; this._chooseSplitAxis(n, r, s); - const o = this._chooseSplitIndex(n, r, s), a = Mn(n.children.splice(o, n.children.length - o)); + const o = this._chooseSplitIndex(n, r, s), a = wn(n.children.splice(o, n.children.length - o)); a.height = n.height, a.leaf = n.leaf, mn(n, this.toBBox), mn(a, this.toBBox), e ? t[e - 1].children.push(a) : this._splitRoot(n, a); } _splitRoot(t, e) { - this.data = Mn([t, e]), this.data.height = t.height + 1, this.data.leaf = !1, mn(this.data, this.toBBox); + this.data = wn([t, e]), this.data.height = t.height + 1, this.data.leaf = !1, mn(this.data, this.toBBox); } _chooseSplitIndex(t, e, n) { let s, r = 1 / 0, o = 1 / 0; for (let a = e; a <= n - e; a++) { - const l = fs(t, 0, a, this.toBBox), h = fs(t, a, n, this.toBBox), c = rm(l, h), u = qo(l) + qo(h); + const l = fs(t, 0, a, this.toBBox), h = fs(t, a, n, this.toBBox), c = r2(l, h), u = Jo(l) + Jo(h); c < r ? (r = c, s = a, o = u < o ? u : o) : c === r && u < o && (o = u, s = a); } return s || n - e; } _chooseSplitAxis(t, e, n) { - const s = t.leaf ? this.compareMinX : im, r = t.leaf ? this.compareMinY : nm, o = this._allDistMargin(t, e, n, s), a = this._allDistMargin(t, e, n, r); + const s = t.leaf ? this.compareMinX : i2, r = t.leaf ? this.compareMinY : n2, o = this._allDistMargin(t, e, n, s), a = this._allDistMargin(t, e, n, r); o < a && t.children.sort(s); } _allDistMargin(t, e, n, s) { t.children.sort(s); const r = this.toBBox, o = fs(t, 0, e, r), a = fs(t, n - e, n, r); - let l = xr(o) + xr(a); + let l = Mr(o) + Mr(a); for (let h = e; h < n - e; h++) { const c = t.children[h]; - gs(o, t.leaf ? r(c) : c), l += xr(o); + gs(o, t.leaf ? r(c) : c), l += Mr(o); } for (let h = n - e - 1; h >= e; h--) { const c = t.children[h]; - gs(a, t.leaf ? r(c) : c), l += xr(a); + gs(a, t.leaf ? r(c) : c), l += Mr(a); } return l; } @@ -7471,7 +7471,7 @@ class Cd { t[e].children.length === 0 ? e > 0 ? (n = t[e - 1].children, n.splice(n.indexOf(t[e]), 1)) : this.clear() : mn(t[e], this.toBBox); } } -function em(i, t, e) { +function e2(i, t, e) { if (!e) return t.indexOf(i); for (let n = 0; n < t.length; n++) @@ -7483,7 +7483,7 @@ function mn(i, t) { fs(i, 0, i.children.length, t, i); } function fs(i, t, e, n, s) { - s || (s = Mn(null)), s.minX = 1 / 0, s.minY = 1 / 0, s.maxX = -1 / 0, s.maxY = -1 / 0; + s || (s = wn(null)), s.minX = 1 / 0, s.minY = 1 / 0, s.maxX = -1 / 0, s.maxY = -1 / 0; for (let r = t; r < e; r++) { const o = i.children[r]; gs(s, i.leaf ? n(o) : o); @@ -7493,32 +7493,32 @@ function fs(i, t, e, n, s) { function gs(i, t) { return i.minX = Math.min(i.minX, t.minX), i.minY = Math.min(i.minY, t.minY), i.maxX = Math.max(i.maxX, t.maxX), i.maxY = Math.max(i.maxY, t.maxY), i; } -function im(i, t) { +function i2(i, t) { return i.minX - t.minX; } -function nm(i, t) { +function n2(i, t) { return i.minY - t.minY; } -function qo(i) { +function Jo(i) { return (i.maxX - i.minX) * (i.maxY - i.minY); } -function xr(i) { +function Mr(i) { return i.maxX - i.minX + (i.maxY - i.minY); } -function sm(i, t) { +function s2(i, t) { return (Math.max(t.maxX, i.maxX) - Math.min(t.minX, i.minX)) * (Math.max(t.maxY, i.maxY) - Math.min(t.minY, i.minY)); } -function rm(i, t) { +function r2(i, t) { const e = Math.max(i.minX, t.minX), n = Math.max(i.minY, t.minY), s = Math.min(i.maxX, t.maxX), r = Math.min(i.maxY, t.maxY); return Math.max(0, s - e) * Math.max(0, r - n); } -function Jo(i, t) { +function qo(i, t) { return i.minX <= t.minX && i.minY <= t.minY && t.maxX <= i.maxX && t.maxY <= i.maxY; } function Cr(i, t) { return t.minX <= i.maxX && t.minY <= i.maxY && t.maxX >= i.minX && t.maxY >= i.minY; } -function Mn(i) { +function wn(i) { return { children: i, height: 1, @@ -7529,20 +7529,20 @@ function Mn(i) { maxY: -1 / 0 }; } -function zh(i, t, e, n, s) { +function Xh(i, t, e, n, s) { const r = [t, e]; for (; r.length; ) { if (e = r.pop(), t = r.pop(), e - t <= n) continue; const o = t + Math.ceil((e - t) / n / 2) * n; - Q1(i, o, t, e, s), r.push(t, o, o, e); + $1(i, o, t, e, s), r.push(t, o, o, e); } } -function Md(i, t, e) { +function wd(i, t, e) { const n = i; let s = !0, r = !1, o = !1; const a = [ - Gr(n, H.LOAD, function() { + Dr(n, V.LOAD, function() { o = !0, r || t(); }) ]; @@ -7550,12 +7550,12 @@ function Md(i, t, e) { s && t(); }).catch(function(l) { s && (o ? t() : e()); - })) : a.push(Gr(n, H.ERROR, e)), function() { + })) : a.push(Dr(n, V.ERROR, e)), function() { s = !1, a.forEach(pt); }; } let cs = null; -class om extends co { +class o2 extends ho { constructor(t, e, n, s, r, o) { super(), this.hitDetectionImage_ = null, this.image_ = t, this.crossOrigin_ = s, this.canvas_ = {}, this.color_ = o, this.unlisten_ = null, this.imageState_ = r, this.size_ = n, this.src_ = e, this.tainted_; } @@ -7563,7 +7563,7 @@ class om extends co { this.image_ = new Image(), this.crossOrigin_ !== null && (this.image_.crossOrigin = this.crossOrigin_); } isTainted_() { - if (this.tainted_ === void 0 && this.imageState_ === At.LOADED) { + if (this.tainted_ === void 0 && this.imageState_ === Ot.LOADED) { cs || (cs = ge(1, 1)), cs.drawImage(this.image_, 0, 0); try { cs.getImageData(0, 0, 1, 1), this.tainted_ = !1; @@ -7574,13 +7574,13 @@ class om extends co { return this.tainted_ === !0; } dispatchChangeEvent_() { - this.dispatchEvent(H.CHANGE); + this.dispatchEvent(V.CHANGE); } handleImageError_() { - this.imageState_ = At.ERROR, this.unlistenImage_(), this.dispatchChangeEvent_(); + this.imageState_ = Ot.ERROR, this.unlistenImage_(), this.dispatchChangeEvent_(); } handleImageLoad_() { - this.imageState_ = At.LOADED, this.size_ ? (this.image_.width = this.size_[0], this.image_.height = this.size_[1]) : this.size_ = [this.image_.width, this.image_.height], this.unlistenImage_(), this.dispatchChangeEvent_(); + this.imageState_ = Ot.LOADED, this.size_ ? (this.image_.width = this.size_[0], this.image_.height = this.size_[1]) : this.size_ = [this.image_.width, this.image_.height], this.unlistenImage_(), this.dispatchChangeEvent_(); } getImage(t) { return this.image_ || this.initializeImage_(), this.replaceColor_(t), this.canvas_[t] ? this.canvas_[t] : this.image_; @@ -7607,14 +7607,14 @@ class om extends co { return this.src_; } load() { - if (this.imageState_ === At.IDLE) { - this.image_ || this.initializeImage_(), this.imageState_ = At.LOADING; + if (this.imageState_ === Ot.IDLE) { + this.image_ || this.initializeImage_(), this.imageState_ = Ot.LOADING; try { this.image_.src = this.src_; } catch { this.handleImageError_(); } - this.unlisten_ = Md( + this.unlisten_ = wd( this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this) @@ -7622,22 +7622,22 @@ class om extends co { } } replaceColor_(t) { - if (!this.color_ || this.canvas_[t] || this.imageState_ !== At.LOADED) + if (!this.color_ || this.canvas_[t] || this.imageState_ !== Ot.LOADED) return; const e = this.image_, n = document.createElement("canvas"); n.width = Math.ceil(e.width * t), n.height = Math.ceil(e.height * t); const s = n.getContext("2d"); - s.scale(t, t), s.drawImage(e, 0, 0), s.globalCompositeOperation = "multiply", s.fillStyle = Au(this.color_), s.fillRect(0, 0, n.width / t, n.height / t), s.globalCompositeOperation = "destination-in", s.drawImage(e, 0, 0), this.canvas_[t] = n; + s.scale(t, t), s.drawImage(e, 0, 0), s.globalCompositeOperation = "multiply", s.fillStyle = Ou(this.color_), s.fillRect(0, 0, n.width / t, n.height / t), s.globalCompositeOperation = "destination-in", s.drawImage(e, 0, 0), this.canvas_[t] = n; } unlistenImage_() { this.unlisten_ && (this.unlisten_(), this.unlisten_ = null); } } -function am(i, t, e, n, s, r) { - let o = Br.get(t, n, r); - return o || (o = new om(i, t, e, n, s, r), Br.set(t, n, r, o)), o; +function a2(i, t, e, n, s, r) { + let o = kr.get(t, n, r); + return o || (o = new o2(i, t, e, n, s, r), kr.set(t, n, r, o)), o; } -class Tl extends yd { +class _l extends yd { constructor(t) { t = t || {}; const e = t.opacity !== void 0 ? t.opacity : 1, n = t.rotation !== void 0 ? t.rotation : 0, s = t.scale !== void 0 ? t.scale : 1, r = t.rotateWithView !== void 0 ? t.rotateWithView : !1; @@ -7652,9 +7652,9 @@ class Tl extends yd { const o = t.img !== void 0 ? t.img : null; this.imgSize_ = t.imgSize; let a = t.src; - X(!(a !== void 0 && o), 4), X(!o || o && this.imgSize_, 5), (a === void 0 || a.length === 0) && o && (a = o.src || rt(o)), X(a !== void 0 && a.length > 0, 6); - const l = t.src !== void 0 ? At.IDLE : At.LOADED; - this.color_ = t.color !== void 0 ? $r(t.color) : null, this.iconImage_ = am( + Y(!(a !== void 0 && o), 4), Y(!o || o && this.imgSize_, 5), (a === void 0 || a.length === 0) && o && (a = o.src || rt(o)), Y(a !== void 0 && a.length > 0, 6); + const l = t.src !== void 0 ? Ot.IDLE : Ot.LOADED; + this.color_ = t.color !== void 0 ? jr(t.color) : null, this.iconImage_ = a2( o, a, this.imgSize_ !== void 0 ? this.imgSize_ : null, @@ -7665,7 +7665,7 @@ class Tl extends yd { } clone() { const t = this.getScale(); - return new Tl({ + return new _l({ anchor: this.anchor_.slice(), anchorOrigin: this.anchorOrigin_, anchorXUnits: this.anchorXUnits_, @@ -7748,33 +7748,33 @@ class Tl extends yd { return this.size_ ? this.size_ : this.iconImage_.getSize(); } listenImageChange(t) { - this.iconImage_.addEventListener(H.CHANGE, t); + this.iconImage_.addEventListener(V.CHANGE, t); } load() { this.iconImage_.load(); } unlistenImageChange(t) { - this.iconImage_.removeEventListener(H.CHANGE, t); + this.iconImage_.removeEventListener(V.CHANGE, t); } } -const xs = Tl; -function Zh(i) { - return new Vt({ - fill: ks(i, ""), - stroke: Gs(i, ""), - text: lm(i), - image: hm(i) +const Ms = _l; +function Gh(i) { + return new Bt({ + fill: Ds(i, ""), + stroke: js(i, ""), + text: l2(i), + image: h2(i) }); } -function ks(i, t) { +function Ds(i, t) { const e = i[t + "fill-color"]; if (!!e) - return new Yt({ color: e }); + return new Ut({ color: e }); } -function Gs(i, t) { +function js(i, t) { const e = i[t + "stroke-width"], n = i[t + "stroke-color"]; if (!(!e && !n)) - return new Re({ + return new Se({ width: e, color: n, lineCap: i[t + "stroke-line-cap"], @@ -7784,9 +7784,9 @@ function Gs(i, t) { miterLimit: i[t + "stroke-miter-limit"] }); } -function lm(i) { +function l2(i) { const t = i["text-value"]; - return t ? new ba({ + return t ? new Pa({ text: t, font: i["text-font"], maxAngle: i["text-max-angle"], @@ -7801,16 +7801,16 @@ function lm(i) { justify: i["text-justify"], textBaseline: i["text-baseline"], padding: i["text-padding"], - fill: ks(i, "text-"), - backgroundFill: ks(i, "text-background-"), - stroke: Gs(i, "text-"), - backgroundStroke: Gs(i, "text-background-") + fill: Ds(i, "text-"), + backgroundFill: Ds(i, "text-background-"), + stroke: js(i, "text-"), + backgroundStroke: js(i, "text-background-") }) : void 0; } -function hm(i) { +function h2(i) { const t = i["icon-src"], e = i["icon-img"]; if (t || e) - return new xs({ + return new Ms({ src: t, img: e, imgSize: i["icon-img-size"], @@ -7832,10 +7832,10 @@ function hm(i) { const n = i["shape-points"]; if (n) { const r = "shape-"; - return new vd({ + return new xd({ points: n, - fill: ks(i, r), - stroke: Gs(i, r), + fill: Ds(i, r), + stroke: js(i, r), radius: i["shape-radius"], radius1: i["shape-radius1"], radius2: i["shape-radius2"], @@ -7852,8 +7852,8 @@ function hm(i) { const r = "circle-"; return new ni({ radius: s, - fill: ks(i, r), - stroke: Gs(i, r), + fill: Ds(i, r), + stroke: js(i, r), displacement: i["circle-displacement"], scale: i["circle-scale"], rotation: i["circle-rotation"], @@ -7862,10 +7862,10 @@ function hm(i) { }); } } -const Uh = { +const Hh = { RENDER_ORDER: "renderOrder" }; -class cm extends yo { +class c2 extends vo { constructor(t) { t = t || {}; const e = Object.assign({}, t); @@ -7881,7 +7881,7 @@ class cm extends yo { return this.renderBuffer_; } getRenderOrder() { - return this.get(Uh.RENDER_ORDER); + return this.get(Hh.RENDER_ORDER); } getStyle() { return this.style_; @@ -7899,31 +7899,31 @@ class cm extends yo { t.declutterTree || (t.declutterTree = new Cd(9)), this.getRenderer().renderDeclutter(t); } setRenderOrder(t) { - this.set(Uh.RENDER_ORDER, t); + this.set(Hh.RENDER_ORDER, t); } setStyle(t) { let e; if (t === void 0) - e = q1; + e = K1; else if (t === null) e = null; else if (typeof t == "function") e = t; - else if (t instanceof Vt) + else if (t instanceof Bt) e = t; else if (Array.isArray(t)) { const n = t.length, s = new Array(n); for (let r = 0; r < n; ++r) { const o = t[r]; - o instanceof Vt ? s[r] = o : s[r] = Zh(o); + o instanceof Bt ? s[r] = o : s[r] = Gh(o); } e = s; } else - e = Zh(t); - this.style_ = e, this.styleFunction_ = t === null ? void 0 : K1(this.style_), this.changed(); + e = Gh(t); + this.style_ = e, this.styleFunction_ = t === null ? void 0 : q1(this.style_), this.changed(); } } -const um = cm, Ys = { +const u2 = c2, Us = { BEGIN_GEOMETRY: 0, BEGIN_PATH: 1, CIRCLE: 2, @@ -7937,8 +7937,8 @@ const um = cm, Ys = { SET_FILL_STYLE: 10, SET_STROKE_STYLE: 11, STROKE: 12 -}, Mr = [Ys.FILL], Mi = [Ys.STROKE], Zi = [Ys.BEGIN_PATH], Vh = [Ys.CLOSE_PATH], U = Ys; -class dm { +}, wr = [Us.FILL], wi = [Us.STROKE], Hi = [Us.BEGIN_PATH], Zh = [Us.CLOSE_PATH], Z = Us; +class d2 { drawCustom(t, e, n, s) { } drawGeometry(t) { @@ -7972,8 +7972,8 @@ class dm { setTextStyle(t, e) { } } -const Ed = dm; -class fm extends Ed { +const Ed = d2; +class f2 extends Ed { constructor(t, e, n, s) { super(), this.tolerance = t, this.maxExtent = e, this.pixelRatio = s, this.maxLineWidth = 0, this.resolution = n, this.beginGeometryInstruction1_ = null, this.beginGeometryInstruction2_ = null, this.bufferedMaxExtent_ = null, this.instructions = [], this.coordinates = [], this.tmpCoordinate_ = [], this.hitDetectionInstructions = [], this.state = {}; } @@ -7987,7 +7987,7 @@ class fm extends Ed { const n = this.getBufferedMaxExtent(), s = this.tmpCoordinate_, r = this.coordinates; let o = r.length; for (let a = 0, l = t.length; a < l; a += e) - s[0] = t[a], s[1] = t[a + 1], go(n, s) && (r[o++] = s[0], r[o++] = s[1]); + s[0] = t[a], s[1] = t[a + 1], fo(n, s) && (r[o++] = s[0], r[o++] = s[1]); return o; } appendFlatLineCoordinates(t, e, n, s, r, o) { @@ -7999,7 +7999,7 @@ class fm extends Ed { const d = this.tmpCoordinate_; let f = !0, g, m, p; for (g = e + s; g < n; g += s) - d[0] = t[g], d[1] = t[g + 1], p = ua(h, d), p !== m ? (f && (a[l++] = c, a[l++] = u, f = !1), a[l++] = d[0], a[l++] = d[1]) : p === Ft.INTERSECTING ? (a[l++] = d[0], a[l++] = d[1], f = !1) : f = !0, c = d[0], u = d[1], m = p; + d[0] = t[g], d[1] = t[g + 1], p = ha(h, d), p !== m ? (f && (a[l++] = c, a[l++] = u, f = !1), a[l++] = d[0], a[l++] = d[1]) : p === zt.INTERSECTING ? (a[l++] = d[0], a[l++] = d[1], f = !1) : f = !0, c = d[0], u = d[1], m = p; return (r && f || g === e + s) && (a[l++] = c, a[l++] = u), l; } drawCustomCoordinates_(t, e, n, s, r) { @@ -8036,14 +8036,14 @@ class fm extends Ed { ), u.push(p); } this.instructions.push([ - U.CUSTOM, + Z.CUSTOM, a, u, t, n, Ma ]), this.hitDetectionInstructions.push([ - U.CUSTOM, + Z.CUSTOM, a, u, t, @@ -8060,19 +8060,19 @@ class fm extends Ed { o, c ), this.instructions.push([ - U.CUSTOM, + Z.CUSTOM, a, c, t, n, - Fs + zs ]), this.hitDetectionInstructions.push([ - U.CUSTOM, + Z.CUSTOM, a, c, t, s || n, - Fs + zs ]); break; case "LineString": @@ -8085,14 +8085,14 @@ class fm extends Ed { !1, !1 ), this.instructions.push([ - U.CUSTOM, + Z.CUSTOM, a, h, t, n, Ci ]), this.hitDetectionInstructions.push([ - U.CUSTOM, + Z.CUSTOM, a, h, t, @@ -8102,14 +8102,14 @@ class fm extends Ed { break; case "MultiPoint": l = t.getFlatCoordinates(), h = this.appendFlatPointCoordinates(l, o), h > a && (this.instructions.push([ - U.CUSTOM, + Z.CUSTOM, a, h, t, n, Ci ]), this.hitDetectionInstructions.push([ - U.CUSTOM, + Z.CUSTOM, a, h, t, @@ -8119,13 +8119,13 @@ class fm extends Ed { break; case "Point": l = t.getFlatCoordinates(), this.coordinates.push(l[0], l[1]), h = this.coordinates.length, this.instructions.push([ - U.CUSTOM, + Z.CUSTOM, a, h, t, n ]), this.hitDetectionInstructions.push([ - U.CUSTOM, + Z.CUSTOM, a, h, t, @@ -8137,12 +8137,12 @@ class fm extends Ed { } beginGeometry(t, e) { this.beginGeometryInstruction1_ = [ - U.BEGIN_GEOMETRY, + Z.BEGIN_GEOMETRY, e, 0, t ], this.instructions.push(this.beginGeometryInstruction1_), this.beginGeometryInstruction2_ = [ - U.BEGIN_GEOMETRY, + Z.BEGIN_GEOMETRY, e, 0, t @@ -8162,7 +8162,7 @@ class fm extends Ed { const n = t.length; let s, r, o = -1; for (e = 0; e < n; ++e) - s = t[e], r = s[0], r == U.END_GEOMETRY ? o = e : r == U.BEGIN_GEOMETRY && (s[2] = e, qf(this.hitDetectionInstructions, o, e), o = -1); + s = t[e], r = s[0], r == Z.END_GEOMETRY ? o = e : r == Z.BEGIN_GEOMETRY && (s[2] = e, Kf(this.hitDetectionInstructions, o, e), o = -1); } setFillStrokeStyle(t, e) { const n = this.state; @@ -8176,25 +8176,25 @@ class fm extends Ed { if (e) { const s = e.getColor(); n.strokeStyle = Ne( - s || As + s || Os ); const r = e.getLineCap(); - n.lineCap = r !== void 0 ? r : Vr; + n.lineCap = r !== void 0 ? r : Zr; const o = e.getLineDash(); - n.lineDash = o ? o.slice() : Ls; + n.lineDash = o ? o.slice() : Rs; const a = e.getLineDashOffset(); n.lineDashOffset = a || Ts; const l = e.getLineJoin(); - n.lineJoin = l !== void 0 ? l : $n; + n.lineJoin = l !== void 0 ? l : kn; const h = e.getWidth(); - n.lineWidth = h !== void 0 ? h : Os; + n.lineWidth = h !== void 0 ? h : Is; const c = e.getMiterLimit(); - n.miterLimit = c !== void 0 ? c : Is, n.lineWidth > this.maxLineWidth && (this.maxLineWidth = n.lineWidth, this.bufferedMaxExtent_ = null); + n.miterLimit = c !== void 0 ? c : Ls, n.lineWidth > this.maxLineWidth && (this.maxLineWidth = n.lineWidth, this.bufferedMaxExtent_ = null); } else n.strokeStyle = void 0, n.lineCap = void 0, n.lineDash = null, n.lineDashOffset = void 0, n.lineJoin = void 0, n.lineWidth = void 0, n.miterLimit = void 0; } createFill(t) { - const e = t.fillStyle, n = [U.SET_FILL_STYLE, e]; + const e = t.fillStyle, n = [Z.SET_FILL_STYLE, e]; return typeof e != "string" && n.push(!0), n; } applyStroke(t) { @@ -8202,7 +8202,7 @@ class fm extends Ed { } createStroke(t) { return [ - U.SET_STROKE_STYLE, + Z.SET_STROKE_STYLE, t.strokeStyle, t.lineWidth * this.pixelRatio, t.lineCap, @@ -8222,19 +8222,19 @@ class fm extends Ed { } endGeometry(t) { this.beginGeometryInstruction1_[2] = this.instructions.length, this.beginGeometryInstruction1_ = null, this.beginGeometryInstruction2_[2] = this.hitDetectionInstructions.length, this.beginGeometryInstruction2_ = null; - const e = [U.END_GEOMETRY, t]; + const e = [Z.END_GEOMETRY, t]; this.instructions.push(e), this.hitDetectionInstructions.push(e); } getBufferedMaxExtent() { if (!this.bufferedMaxExtent_ && (this.bufferedMaxExtent_ = Eu(this.maxExtent), this.maxLineWidth > 0)) { const t = this.resolution * (this.maxLineWidth + 1) / 2; - fo(this.bufferedMaxExtent_, t, this.bufferedMaxExtent_); + uo(this.bufferedMaxExtent_, t, this.bufferedMaxExtent_); } return this.bufferedMaxExtent_; } } -const js = fm; -class gm extends js { +const Js = f2; +class g2 extends Js { constructor(t, e, n, s) { super(t, e, n, s), this.hitDetectionImage_ = null, this.image_ = null, this.imagePixelRatio_ = void 0, this.anchorX_ = void 0, this.anchorY_ = void 0, this.height_ = void 0, this.opacity_ = void 0, this.originX_ = void 0, this.originY_ = void 0, this.rotateWithView_ = void 0, this.rotation_ = void 0, this.scale_ = void 0, this.width_ = void 0, this.declutterMode_ = void 0, this.declutterImageWithText_ = void 0; } @@ -8244,7 +8244,7 @@ class gm extends js { this.beginGeometry(t, e); const n = t.getFlatCoordinates(), s = t.getStride(), r = this.coordinates.length, o = this.appendFlatPointCoordinates(n, s); this.instructions.push([ - U.DRAW_IMAGE, + Z.DRAW_IMAGE, r, o, this.image_, @@ -8264,7 +8264,7 @@ class gm extends js { this.declutterMode_, this.declutterImageWithText_ ]), this.hitDetectionInstructions.push([ - U.DRAW_IMAGE, + Z.DRAW_IMAGE, r, o, this.hitDetectionImage_, @@ -8288,7 +8288,7 @@ class gm extends js { this.beginGeometry(t, e); const n = t.getFlatCoordinates(), s = t.getStride(), r = this.coordinates.length, o = this.appendFlatPointCoordinates(n, s); this.instructions.push([ - U.DRAW_IMAGE, + Z.DRAW_IMAGE, r, o, this.image_, @@ -8308,7 +8308,7 @@ class gm extends js { this.declutterMode_, this.declutterImageWithText_ ]), this.hitDetectionInstructions.push([ - U.DRAW_IMAGE, + Z.DRAW_IMAGE, r, o, this.hitDetectionImage_, @@ -8334,8 +8334,8 @@ class gm extends js { this.imagePixelRatio_ = t.getPixelRatio(this.pixelRatio), this.anchorX_ = n[0], this.anchorY_ = n[1], this.hitDetectionImage_ = t.getHitDetectionImage(), this.image_ = t.getImage(this.pixelRatio), this.height_ = s[1], this.opacity_ = t.getOpacity(), this.originX_ = r[0], this.originY_ = r[1], this.rotateWithView_ = t.getRotateWithView(), this.rotation_ = t.getRotation(), this.scale_ = t.getScaleArray(), this.width_ = s[0], this.declutterMode_ = t.getDeclutterMode(), this.declutterImageWithText_ = e; } } -const mm = gm; -class pm extends js { +const m2 = g2; +class p2 extends Js { constructor(t, e, n, s) { super(t, e, n, s); } @@ -8348,7 +8348,7 @@ class pm extends js { !1, !1 ), a = [ - U.MOVE_TO_LINE_TO, + Z.MOVE_TO_LINE_TO, r, o ]; @@ -8360,16 +8360,16 @@ class pm extends js { return; this.updateStrokeStyle(n, this.applyStroke), this.beginGeometry(t, e), this.hitDetectionInstructions.push( [ - U.SET_STROKE_STYLE, + Z.SET_STROKE_STYLE, n.strokeStyle, n.lineWidth, n.lineCap, n.lineJoin, n.miterLimit, - Ls, + Rs, Ts ], - Zi + Hi ); const o = t.getFlatCoordinates(), a = t.getStride(); this.drawFlatCoordinates_( @@ -8377,7 +8377,7 @@ class pm extends js { 0, o.length, a - ), this.hitDetectionInstructions.push(Mi), this.endGeometry(e); + ), this.hitDetectionInstructions.push(wi), this.endGeometry(e); } drawMultiLineString(t, e) { const n = this.state, s = n.strokeStyle, r = n.lineWidth; @@ -8385,7 +8385,7 @@ class pm extends js { return; this.updateStrokeStyle(n, this.applyStroke), this.beginGeometry(t, e), this.hitDetectionInstructions.push( [ - U.SET_STROKE_STYLE, + Z.SET_STROKE_STYLE, n.strokeStyle, n.lineWidth, n.lineCap, @@ -8394,7 +8394,7 @@ class pm extends js { n.lineDash, n.lineDashOffset ], - Zi + Hi ); const o = t.getEnds(), a = t.getFlatCoordinates(), l = t.getStride(); let h = 0; @@ -8405,24 +8405,24 @@ class pm extends js { o[c], l ); - this.hitDetectionInstructions.push(Mi), this.endGeometry(e); + this.hitDetectionInstructions.push(wi), this.endGeometry(e); } finish() { const t = this.state; - return t.lastStroke != null && t.lastStroke != this.coordinates.length && this.instructions.push(Mi), this.reverseHitDetectionInstructions(), this.state = null, super.finish(); + return t.lastStroke != null && t.lastStroke != this.coordinates.length && this.instructions.push(wi), this.reverseHitDetectionInstructions(), this.state = null, super.finish(); } applyStroke(t) { - t.lastStroke != null && t.lastStroke != this.coordinates.length && (this.instructions.push(Mi), t.lastStroke = this.coordinates.length), t.lastStroke = 0, super.applyStroke(t), this.instructions.push(Zi); + t.lastStroke != null && t.lastStroke != this.coordinates.length && (this.instructions.push(wi), t.lastStroke = this.coordinates.length), t.lastStroke = 0, super.applyStroke(t), this.instructions.push(Hi); } } -const _m = pm; -class ym extends js { +const v2 = p2; +class y2 extends Js { constructor(t, e, n, s) { super(t, e, n, s); } drawFlatCoordinatess_(t, e, n, s) { const r = this.state, o = r.fillStyle !== void 0, a = r.strokeStyle !== void 0, l = n.length; - this.instructions.push(Zi), this.hitDetectionInstructions.push(Zi); + this.instructions.push(Hi), this.hitDetectionInstructions.push(Hi); for (let h = 0; h < l; ++h) { const c = n[h], u = this.coordinates.length, d = this.appendFlatLineCoordinates( t, @@ -8432,23 +8432,23 @@ class ym extends js { !0, !a ), f = [ - U.MOVE_TO_LINE_TO, + Z.MOVE_TO_LINE_TO, u, d ]; - this.instructions.push(f), this.hitDetectionInstructions.push(f), a && (this.instructions.push(Vh), this.hitDetectionInstructions.push(Vh)), e = c; + this.instructions.push(f), this.hitDetectionInstructions.push(f), a && (this.instructions.push(Zh), this.hitDetectionInstructions.push(Zh)), e = c; } - return o && (this.instructions.push(Mr), this.hitDetectionInstructions.push(Mr)), a && (this.instructions.push(Mi), this.hitDetectionInstructions.push(Mi)), e; + return o && (this.instructions.push(wr), this.hitDetectionInstructions.push(wr)), a && (this.instructions.push(wi), this.hitDetectionInstructions.push(wi)), e; } drawCircle(t, e) { const n = this.state, s = n.fillStyle, r = n.strokeStyle; if (s === void 0 && r === void 0) return; this.setFillStrokeStyles_(), this.beginGeometry(t, e), n.fillStyle !== void 0 && this.hitDetectionInstructions.push([ - U.SET_FILL_STYLE, + Z.SET_FILL_STYLE, si ]), n.strokeStyle !== void 0 && this.hitDetectionInstructions.push([ - U.SET_STROKE_STYLE, + Z.SET_STROKE_STYLE, n.strokeStyle, n.lineWidth, n.lineCap, @@ -8466,18 +8466,18 @@ class ym extends js { !1, !1 ); - const h = [U.CIRCLE, l]; - this.instructions.push(Zi, h), this.hitDetectionInstructions.push(Zi, h), n.fillStyle !== void 0 && (this.instructions.push(Mr), this.hitDetectionInstructions.push(Mr)), n.strokeStyle !== void 0 && (this.instructions.push(Mi), this.hitDetectionInstructions.push(Mi)), this.endGeometry(e); + const h = [Z.CIRCLE, l]; + this.instructions.push(Hi, h), this.hitDetectionInstructions.push(Hi, h), n.fillStyle !== void 0 && (this.instructions.push(wr), this.hitDetectionInstructions.push(wr)), n.strokeStyle !== void 0 && (this.instructions.push(wi), this.hitDetectionInstructions.push(wi)), this.endGeometry(e); } drawPolygon(t, e) { const n = this.state, s = n.fillStyle, r = n.strokeStyle; if (s === void 0 && r === void 0) return; this.setFillStrokeStyles_(), this.beginGeometry(t, e), n.fillStyle !== void 0 && this.hitDetectionInstructions.push([ - U.SET_FILL_STYLE, + Z.SET_FILL_STYLE, si ]), n.strokeStyle !== void 0 && this.hitDetectionInstructions.push([ - U.SET_STROKE_STYLE, + Z.SET_STROKE_STYLE, n.strokeStyle, n.lineWidth, n.lineCap, @@ -8499,10 +8499,10 @@ class ym extends js { if (s === void 0 && r === void 0) return; this.setFillStrokeStyles_(), this.beginGeometry(t, e), n.fillStyle !== void 0 && this.hitDetectionInstructions.push([ - U.SET_FILL_STYLE, + Z.SET_FILL_STYLE, si ]), n.strokeStyle !== void 0 && this.hitDetectionInstructions.push([ - U.SET_STROKE_STYLE, + Z.SET_STROKE_STYLE, n.strokeStyle, n.lineWidth, n.lineCap, @@ -8528,7 +8528,7 @@ class ym extends js { if (t !== 0) { const e = this.coordinates; for (let n = 0, s = e.length; n < s; ++n) - e[n] = Gi(e[n], t); + e[n] = ji(e[n], t); } return super.finish(); } @@ -8537,12 +8537,12 @@ class ym extends js { t.fillStyle !== void 0 && this.updateFillStyle(t, this.createFill), t.strokeStyle !== void 0 && this.updateStrokeStyle(t, this.applyStroke); } } -const Wh = ym; -function vm(i, t, e, n, s) { - let r = e, o = e, a = 0, l = 0, h = e, c, u, d, f, g, m, p, _, y, v; +const Bh = y2; +function x2(i, t, e, n, s) { + let r = e, o = e, a = 0, l = 0, h = e, c, u, d, f, g, m, p, v, y, x; for (u = e; u < n; u += s) { - const x = t[u], C = t[u + 1]; - g !== void 0 && (y = x - g, v = C - m, f = Math.sqrt(y * y + v * v), p !== void 0 && (l += d, c = Math.acos((p * y + _ * v) / (d * f)), c > i && (l > a && (a = l, r = h, o = u), l = 0, h = u - s)), d = f, p = y, _ = v), g = x, m = C; + const M = t[u], C = t[u + 1]; + g !== void 0 && (y = M - g, x = C - m, f = Math.sqrt(y * y + x * x), p !== void 0 && (l += d, c = Math.acos((p * y + v * x) / (d * f)), c > i && (l > a && (a = l, r = h, o = u), l = 0, h = u - s)), d = f, p = y, v = x), g = M, m = C; } return l += f, l > a ? [h, u] : [r, o]; } @@ -8559,7 +8559,7 @@ const Cs = { ideographic: 0.8, bottom: 1 }; -class xm extends js { +class M2 extends Js { constructor(t, e, n, s) { super(t, e, n, s), this.labels_ = null, this.text_ = "", this.textOffsetX_ = 0, this.textOffsetY_ = 0, this.textRotateWithView_ = void 0, this.textRotation_ = 0, this.textFillState_ = null, this.fillStates = {}, this.textStrokeState_ = null, this.strokeStates = {}, this.textState_ = {}, this.textStates = {}, this.textKey_ = "", this.fillKey_ = "", this.strokeKey_ = "", this.declutterImageWithText_ = void 0; } @@ -8588,7 +8588,7 @@ class xm extends js { else if (l == "MultiPolygon") { const m = t.getEndss(); u = []; - for (let p = 0, _ = m.length; p < _; ++p) + for (let p = 0, v = m.length; p < v; ++p) u.push(m[p][0]); } this.beginGeometry(t, e); @@ -8596,7 +8596,7 @@ class xm extends js { let f = 0, g; for (let m = 0, p = u.length; m < p; ++m) { if (d == null) { - const y = vm( + const y = x2( r.maxAngle, h, f, @@ -8608,8 +8608,8 @@ class xm extends js { g = u[m]; for (let y = f; y < g; y += c) o.push(h[y], h[y + 1]); - const _ = o.length; - f = u[m], this.drawChars_(a, _), a = _; + const v = o.length; + f = u[m], this.drawChars_(a, v), a = v; } this.endGeometry(e); } else { @@ -8634,8 +8634,8 @@ class xm extends js { case "MultiPolygon": const p = t.getFlatInteriorPoints(); h = []; - for (let _ = 0, y = p.length; _ < y; _ += 3) - r.overflow || u.push(p[_ + 2] / this.resolution), h.push(p[_], p[_ + 1]); + for (let v = 0, y = p.length; v < y; v += 3) + r.overflow || u.push(p[v + 2] / this.resolution), h.push(p[v], p[v + 1]); if (h.length === 0) return; c = 2; @@ -8646,9 +8646,9 @@ class xm extends js { return; if (u && (d - a) / 2 !== h.length / c) { let p = a / 2; - u = u.filter((_, y) => { - const v = o[(p + y) * 2] === h[y * c] && o[(p + y) * 2 + 1] === h[y * c + 1]; - return v || --p, v; + u = u.filter((v, y) => { + const x = o[(p + y) * 2] === h[y * c] && o[(p + y) * 2 + 1] === h[y * c + 1]; + return x || --p, x; }); } this.saveTextStates_(), (r.backgroundFill || r.backgroundStroke) && (this.setFillStrokeStyle( @@ -8656,13 +8656,13 @@ class xm extends js { r.backgroundStroke ), r.backgroundFill && (this.updateFillStyle(this.state, this.createFill), this.hitDetectionInstructions.push(this.createFill(this.state))), r.backgroundStroke && (this.updateStrokeStyle(this.state, this.applyStroke), this.hitDetectionInstructions.push(this.createStroke(this.state)))), this.beginGeometry(t, e); let f = r.padding; - if (f != $i && (r.scale[0] < 0 || r.scale[1] < 0)) { - let p = r.padding[0], _ = r.padding[1], y = r.padding[2], v = r.padding[3]; - r.scale[0] < 0 && (_ = -_, v = -v), r.scale[1] < 0 && (p = -p, y = -y), f = [p, _, y, v]; + if (f != ki && (r.scale[0] < 0 || r.scale[1] < 0)) { + let p = r.padding[0], v = r.padding[1], y = r.padding[2], x = r.padding[3]; + r.scale[0] < 0 && (v = -v, x = -x), r.scale[1] < 0 && (p = -p, y = -y), f = [p, v, y, x]; } const g = this.pixelRatio; this.instructions.push([ - U.DRAW_IMAGE, + Z.DRAW_IMAGE, a, d, null, @@ -8678,7 +8678,7 @@ class xm extends js { NaN, void 0, this.declutterImageWithText_, - f == $i ? $i : f.map(function(p) { + f == ki ? ki : f.map(function(p) { return p * g; }), !!r.backgroundFill, @@ -8693,7 +8693,7 @@ class xm extends js { ]); const m = 1 / g; this.hitDetectionInstructions.push([ - U.DRAW_IMAGE, + Z.DRAW_IMAGE, a, d, null, @@ -8736,9 +8736,9 @@ class xm extends js { const r = this.textKey_; r in this.textStates || (this.textStates[r] = { font: e.font, - textAlign: e.textAlign || Ps, + textAlign: e.textAlign || As, justify: e.justify, - textBaseline: e.textBaseline || Wr, + textBaseline: e.textBaseline || Br, scale: e.scale }); const o = this.fillKey_; @@ -8751,7 +8751,7 @@ class xm extends js { this.saveTextStates_(); const l = this.pixelRatio, h = Cs[s.textBaseline], c = this.textOffsetY_ * l, u = this.text_, d = n ? n.lineWidth * Math.abs(s.scale[0]) / 2 : 0; this.instructions.push([ - U.DRAW_CHARS, + Z.DRAW_CHARS, t, e, h, @@ -8766,7 +8766,7 @@ class xm extends js { o, 1 ]), this.hitDetectionInstructions.push([ - U.DRAW_CHARS, + Z.DRAW_CHARS, t, e, h, @@ -8796,31 +8796,31 @@ class xm extends js { r = null, this.textStrokeState_ = r; else { r = this.textStrokeState_, r || (r = {}, this.textStrokeState_ = r); - const g = a.getLineDash(), m = a.getLineDashOffset(), p = a.getWidth(), _ = a.getMiterLimit(); - r.lineCap = a.getLineCap() || Vr, r.lineDash = g ? g.slice() : Ls, r.lineDashOffset = m === void 0 ? Ts : m, r.lineJoin = a.getLineJoin() || $n, r.lineWidth = p === void 0 ? Os : p, r.miterLimit = _ === void 0 ? Is : _, r.strokeStyle = Ne( - a.getColor() || As + const g = a.getLineDash(), m = a.getLineDashOffset(), p = a.getWidth(), v = a.getMiterLimit(); + r.lineCap = a.getLineCap() || Zr, r.lineDash = g ? g.slice() : Rs, r.lineDashOffset = m === void 0 ? Ts : m, r.lineJoin = a.getLineJoin() || kn, r.lineWidth = p === void 0 ? Is : p, r.miterLimit = v === void 0 ? Ls : v, r.strokeStyle = Ne( + a.getColor() || Os ); } n = this.textState_; - const l = t.getFont() || Zu; - U0(l); + const l = t.getFont() || Hu; + Z0(l); const h = t.getScaleArray(); - n.overflow = t.getOverflow(), n.font = l, n.maxAngle = t.getMaxAngle(), n.placement = t.getPlacement(), n.textAlign = t.getTextAlign(), n.justify = t.getJustify(), n.textBaseline = t.getTextBaseline() || Wr, n.backgroundFill = t.getBackgroundFill(), n.backgroundStroke = t.getBackgroundStroke(), n.padding = t.getPadding() || $i, n.scale = h === void 0 ? [1, 1] : h; + n.overflow = t.getOverflow(), n.font = l, n.maxAngle = t.getMaxAngle(), n.placement = t.getPlacement(), n.textAlign = t.getTextAlign(), n.justify = t.getJustify(), n.textBaseline = t.getTextBaseline() || Br, n.backgroundFill = t.getBackgroundFill(), n.backgroundStroke = t.getBackgroundStroke(), n.padding = t.getPadding() || ki, n.scale = h === void 0 ? [1, 1] : h; const c = t.getOffsetX(), u = t.getOffsetY(), d = t.getRotateWithView(), f = t.getRotation(); this.text_ = t.getText() || "", this.textOffsetX_ = c === void 0 ? 0 : c, this.textOffsetY_ = u === void 0 ? 0 : u, this.textRotateWithView_ = d === void 0 ? !1 : d, this.textRotation_ = f === void 0 ? 0 : f, this.strokeKey_ = r ? (typeof r.strokeStyle == "string" ? r.strokeStyle : rt(r.strokeStyle)) + r.lineCap + r.lineDashOffset + "|" + r.lineWidth + r.lineJoin + r.miterLimit + "[" + r.lineDash.join() + "]" : "", this.textKey_ = n.font + n.scale + (n.textAlign || "?") + (n.justify || "?") + (n.textBaseline || "?"), this.fillKey_ = s ? typeof s.fillStyle == "string" ? s.fillStyle : "|" + rt(s.fillStyle) : ""; } this.declutterImageWithText_ = e; } } -const Cm = { - Circle: Wh, - Default: js, - Image: mm, - LineString: _m, - Polygon: Wh, - Text: xm +const C2 = { + Circle: Bh, + Default: Js, + Image: m2, + LineString: v2, + Polygon: Bh, + Text: M2 }; -class Mm { +class w2 { constructor(t, e, n, s) { this.tolerance_ = t, this.maxExtent_ = e, this.pixelRatio_ = s, this.resolution_ = n, this.buildersByZIndex_ = {}; } @@ -8842,7 +8842,7 @@ class Mm { s === void 0 && (s = {}, this.buildersByZIndex_[n] = s); let r = s[e]; if (r === void 0) { - const o = Cm[e]; + const o = C2[e]; r = new o( this.tolerance_, this.maxExtent_, @@ -8853,22 +8853,22 @@ class Mm { return r; } } -const Hh = Mm; -class Em extends yu { +const Wh = w2; +class E2 extends yu { constructor(t) { super(), this.ready = !0, this.boundHandleImageChange_ = this.handleImageChange_.bind(this), this.layer_ = t, this.declutterExecutorGroup = null; } getFeatures(t) { - return V(); + return B(); } getData(t) { return null; } prepareFrame(t) { - return V(); + return B(); } renderFrame(t, e) { - return V(); + return B(); } loadedTileCallback(t, e, n) { t[e] || (t[e] = {}), t[e][n.tileCoord.toString()] = n; @@ -8887,11 +8887,11 @@ class Em extends yu { handleFontsChanged() { } handleImageChange_(t) { - t.target.getState() === At.LOADED && this.renderIfReadyAndVisible(); + t.target.getState() === Ot.LOADED && this.renderIfReadyAndVisible(); } loadImage(t) { let e = t.getState(); - return e != At.LOADED && e != At.ERROR && t.addEventListener(H.CHANGE, this.boundHandleImageChange_), e == At.IDLE && (t.load(), e = t.getState()), e == At.LOADED; + return e != Ot.LOADED && e != Ot.ERROR && t.addEventListener(V.CHANGE, this.boundHandleImageChange_), e == Ot.IDLE && (t.load(), e = t.getState()), e == Ot.LOADED; } renderIfReadyAndVisible() { const t = this.getLayer(); @@ -8901,18 +8901,18 @@ class Em extends yu { delete this.layer_, super.disposeInternal(); } } -const wm = Em, Xh = []; +const b2 = E2, Vh = []; let En = null; -function Sm() { +function P2() { const i = document.createElement("canvas"); i.width = 1, i.height = 1, En = i.getContext("2d"); } -class Rm extends wm { +class S2 extends b2 { constructor(t) { - super(t), this.container = null, this.renderedResolution, this.tempTransform = De(), this.pixelTransform = De(), this.inversePixelTransform = De(), this.context = null, this.containerReused = !1, this.pixelContext_ = null, this.frameState = null; + super(t), this.container = null, this.renderedResolution, this.tempTransform = Fe(), this.pixelTransform = Fe(), this.inversePixelTransform = Fe(), this.context = null, this.containerReused = !1, this.pixelContext_ = null, this.frameState = null; } getImageData(t, e, n) { - En || Sm(), En.clearRect(0, 0, 1, 1); + En || P2(), En.clearRect(0, 0, 1, 1); let s; try { En.drawImage(t, e, n, 1, 1, 0, 0, 1, 1), s = En.getImageData(0, 0, 1, 1).data; @@ -8929,8 +8929,8 @@ class Rm extends wm { const s = this.getLayer().getClassName(); let r, o; if (t && t.className === s && (!n || t && t.style.backgroundColor && sn( - $r(t.style.backgroundColor), - $r(n) + jr(t.style.backgroundColor), + jr(n) ))) { const a = t.firstElementChild; a instanceof HTMLCanvasElement && (o = a.getContext("2d")); @@ -8945,15 +8945,15 @@ class Rm extends wm { !this.containerReused && n && !this.container.style.backgroundColor && (this.container.style.backgroundColor = n); } clipUnrotated(t, e, n) { - const s = Pi(n), r = _o(n), o = po(n), a = mo(n); - Dt(e.coordinateToPixelTransform, s), Dt(e.coordinateToPixelTransform, r), Dt(e.coordinateToPixelTransform, o), Dt(e.coordinateToPixelTransform, a); + const s = Ai(n), r = po(n), o = mo(n), a = go(n); + Ft(e.coordinateToPixelTransform, s), Ft(e.coordinateToPixelTransform, r), Ft(e.coordinateToPixelTransform, o), Ft(e.coordinateToPixelTransform, a); const l = this.inversePixelTransform; - Dt(l, s), Dt(l, r), Dt(l, o), Dt(l, a), t.save(), t.beginPath(), t.moveTo(Math.round(s[0]), Math.round(s[1])), t.lineTo(Math.round(r[0]), Math.round(r[1])), t.lineTo(Math.round(o[0]), Math.round(o[1])), t.lineTo(Math.round(a[0]), Math.round(a[1])), t.clip(); + Ft(l, s), Ft(l, r), Ft(l, o), Ft(l, a), t.save(), t.beginPath(), t.moveTo(Math.round(s[0]), Math.round(s[1])), t.lineTo(Math.round(r[0]), Math.round(r[1])), t.lineTo(Math.round(o[0]), Math.round(o[1])), t.lineTo(Math.round(a[0]), Math.round(a[1])), t.clip(); } dispatchRenderEvent_(t, e, n) { const s = this.getLayer(); if (s.hasListener(t)) { - const r = new Gu( + const r = new ju( t, this.inversePixelTransform, n, @@ -8970,7 +8970,7 @@ class Rm extends wm { } getRenderTransform(t, e, n, s, r, o, a) { const l = r / 2, h = o / 2, c = s / e, u = -c, d = -t[0] + a, f = -t[1]; - return bi( + return _i( this.tempTransform, l, h, @@ -8985,79 +8985,79 @@ class Rm extends wm { delete this.frameState, super.disposeInternal(); } } -const wd = Rm; -function bm(i, t, e, n, s, r, o, a, l, h, c, u) { - let d = i[t], f = i[t + 1], g = 0, m = 0, p = 0, _ = 0; +const bd = S2; +function _2(i, t, e, n, s, r, o, a, l, h, c, u) { + let d = i[t], f = i[t + 1], g = 0, m = 0, p = 0, v = 0; function y() { - g = d, m = f, t += n, d = i[t], f = i[t + 1], _ += p, p = Math.sqrt((d - g) * (d - g) + (f - m) * (f - m)); + g = d, m = f, t += n, d = i[t], f = i[t + 1], v += p, p = Math.sqrt((d - g) * (d - g) + (f - m) * (f - m)); } do y(); - while (t < e - n && _ + p < r); - let v = p === 0 ? 0 : (r - _) / p; - const x = ti(g, d, v), C = ti(m, f, v), E = t - n, w = _, R = r + a * l(h, s, c); - for (; t < e - n && _ + p < R; ) + while (t < e - n && v + p < r); + let x = p === 0 ? 0 : (r - v) / p; + const M = ti(g, d, x), C = ti(m, f, x), E = t - n, b = v, S = r + a * l(h, s, c); + for (; t < e - n && v + p < S; ) y(); - v = p === 0 ? 0 : (R - _) / p; - const A = ti(g, d, v), k = ti(m, f, v); - let Z; + x = p === 0 ? 0 : (S - v) / p; + const O = ti(g, d, x), D = ti(m, f, x); + let H; if (u) { - const D = [x, C, A, k]; - Ju(D, 0, 4, 2, u, D, D), Z = D[0] > D[2]; + const F = [M, C, O, D]; + Qu(F, 0, 4, 2, u, F, F), H = F[0] > F[2]; } else - Z = x > A; - const L = Math.PI, G = [], dt = E + n === t; - t = E, p = 0, _ = w, d = i[t], f = i[t + 1]; + H = M > O; + const R = Math.PI, j = [], dt = E + n === t; + t = E, p = 0, v = b, d = i[t], f = i[t + 1]; let N; if (dt) { - y(), N = Math.atan2(f - m, d - g), Z && (N += N > 0 ? -L : L); - const D = (A + x) / 2, I = (k + C) / 2; - return G[0] = [D, I, (R - r) / 2, N, s], G; + y(), N = Math.atan2(f - m, d - g), H && (N += N > 0 ? -R : R); + const F = (O + M) / 2, L = (D + C) / 2; + return j[0] = [F, L, (S - r) / 2, N, s], j; } s = s.replace(/\n/g, " "); - for (let D = 0, I = s.length; D < I; ) { + for (let F = 0, L = s.length; F < L; ) { y(); - let Q = Math.atan2(f - m, d - g); - if (Z && (Q += Q > 0 ? -L : L), N !== void 0) { - let at = Q - N; - if (at += at > L ? -2 * L : at < -L ? 2 * L : 0, Math.abs(at) > o) + let $ = Math.atan2(f - m, d - g); + if (H && ($ += $ > 0 ? -R : R), N !== void 0) { + let at = $ - N; + if (at += at > R ? -2 * R : at < -R ? 2 * R : 0, Math.abs(at) > o) return null; } - N = Q; - const Ct = D; - let _t = 0; - for (; D < I; ++D) { - const at = Z ? I - D - 1 : D, ft = a * l(h, s[at], c); - if (t + n < e && _ + p < r + _t + ft / 2) + N = $; + const wt = F; + let vt = 0; + for (; F < L; ++F) { + const at = H ? L - F - 1 : F, ft = a * l(h, s[at], c); + if (t + n < e && v + p < r + vt + ft / 2) break; - _t += ft; + vt += ft; } - if (D === Ct) + if (F === wt) continue; - const Ot = Z ? s.substring(I - Ct, I - D) : s.substring(Ct, D); - v = p === 0 ? 0 : (r + _t / 2 - _) / p; - const b = ti(g, d, v), ae = ti(m, f, v); - G.push([b, ae, _t / 2, Q, Ot]), r += _t; + const It = H ? s.substring(L - wt, L - F) : s.substring(wt, F); + x = p === 0 ? 0 : (r + vt / 2 - v) / p; + const _ = ti(g, d, x), ae = ti(m, f, x); + j.push([_, ae, vt / 2, $, It]), r += vt; } - return G; + return j; } -const pn = fe(), fi = [], Ye = [], je = [], gi = []; +const pn = fe(), fi = [], Ue = [], Je = [], gi = []; function Yh(i) { return i[3].declutterBox; } -const Lm = new RegExp( +const R2 = new RegExp( "[" + String.fromCharCode(1425) + "-" + String.fromCharCode(2303) + String.fromCharCode(64285) + "-" + String.fromCharCode(65023) + String.fromCharCode(65136) + "-" + String.fromCharCode(65276) + String.fromCharCode(67584) + "-" + String.fromCharCode(69631) + String.fromCharCode(124928) + "-" + String.fromCharCode(126975) + "]" ); -function jh(i, t) { - return (t === "start" || t === "end") && !Lm.test(i) && (t = t === "start" ? "left" : "right"), Cs[t]; +function Uh(i, t) { + return (t === "start" || t === "end") && !R2.test(i) && (t = t === "start" ? "left" : "right"), Cs[t]; } -function Tm(i, t, e) { +function T2(i, t, e) { return e > 0 && i.push(` `, ""), i.push(t, ""), i; } -class Im { +class L2 { constructor(t, e, n, s) { - this.overlaps = n, this.pixelRatio = e, this.resolution = t, this.alignFill_, this.instructions = s.instructions, this.coordinates = s.coordinates, this.coordinateCache_ = {}, this.renderedTransform_ = De(), this.hitDetectionInstructions = s.hitDetectionInstructions, this.pixelCoordinates_ = null, this.viewRotation_ = 0, this.fillStates = s.fillStates || {}, this.strokeStates = s.strokeStates || {}, this.textStates = s.textStates || {}, this.widths_ = {}, this.labels_ = {}; + this.overlaps = n, this.pixelRatio = e, this.resolution = t, this.alignFill_, this.instructions = s.instructions, this.coordinates = s.coordinates, this.coordinateCache_ = {}, this.renderedTransform_ = Fe(), this.hitDetectionInstructions = s.hitDetectionInstructions, this.pixelCoordinates_ = null, this.viewRotation_ = 0, this.fillStates = s.fillStates || {}, this.strokeStates = s.strokeStates || {}, this.textStates = s.textStates || {}, this.widths_ = {}, this.labels_ = {}; } createLabel(t, e, n, s) { const r = t + e + n + s; @@ -9066,40 +9066,40 @@ class Im { const o = s ? this.strokeStates[s] : null, a = n ? this.fillStates[n] : null, l = this.textStates[e], h = this.pixelRatio, c = [ l.scale[0] * h, l.scale[1] * h - ], u = Array.isArray(t), d = l.justify ? Cs[l.justify] : jh( + ], u = Array.isArray(t), d = l.justify ? Cs[l.justify] : Uh( Array.isArray(t) ? t[0] : t, - l.textAlign || Ps + l.textAlign || As ), f = s && o.lineWidth ? o.lineWidth : 0, g = u ? t : t.split(` -`).reduce(Tm, []), { width: m, height: p, widths: _, heights: y, lineWidths: v } = W0( +`).reduce(T2, []), { width: m, height: p, widths: v, heights: y, lineWidths: x } = W0( l, g - ), x = m + f, C = [], E = (x + 2) * c[0], w = (p + f) * c[1], R = { + ), M = m + f, C = [], E = (M + 2) * c[0], b = (p + f) * c[1], S = { width: E < 0 ? Math.floor(E) : Math.ceil(E), - height: w < 0 ? Math.floor(w) : Math.ceil(w), + height: b < 0 ? Math.floor(b) : Math.ceil(b), contextInstructions: C }; (c[0] != 1 || c[1] != 1) && C.push("scale", c), s && (C.push("strokeStyle", o.strokeStyle), C.push("lineWidth", f), C.push("lineCap", o.lineCap), C.push("lineJoin", o.lineJoin), C.push("miterLimit", o.miterLimit), C.push("setLineDash", [o.lineDash]), C.push("lineDashOffset", o.lineDashOffset)), n && C.push("fillStyle", a.fillStyle), C.push("textBaseline", "middle"), C.push("textAlign", "center"); - const A = 0.5 - d; - let k = d * x + A * f; - const Z = [], L = []; - let G = 0, dt = 0, N = 0, D = 0, I; - for (let Q = 0, Ct = g.length; Q < Ct; Q += 2) { - const _t = g[Q]; - if (_t === ` + const O = 0.5 - d; + let D = d * M + O * f; + const H = [], R = []; + let j = 0, dt = 0, N = 0, F = 0, L; + for (let $ = 0, wt = g.length; $ < wt; $ += 2) { + const vt = g[$]; + if (vt === ` `) { - dt += G, G = 0, k = d * x + A * f, ++D; + dt += j, j = 0, D = d * M + O * f, ++F; continue; } - const Ot = g[Q + 1] || l.font; - Ot !== I && (s && Z.push("font", Ot), n && L.push("font", Ot), I = Ot), G = Math.max(G, y[N]); - const b = [ - _t, - k + A * _[N] + d * (_[N] - v[D]), - 0.5 * (f + G) + dt + const It = g[$ + 1] || l.font; + It !== L && (s && H.push("font", It), n && R.push("font", It), L = It), j = Math.max(j, y[N]); + const _ = [ + vt, + D + O * v[N] + d * (v[N] - x[F]), + 0.5 * (f + j) + dt ]; - k += _[N], s && Z.push("strokeText", b), n && L.push("fillText", b), ++N; + D += v[N], s && H.push("strokeText", _), n && R.push("fillText", _), ++N; } - return Array.prototype.push.apply(C, Z), Array.prototype.push.apply(C, L), this.labels_[r] = R, R; + return Array.prototype.push.apply(C, H), Array.prototype.push.apply(C, R), this.labels_[r] = S, S; } replayTextBackground_(t, e, n, s, r, o, a) { t.beginPath(), t.moveTo.apply(t, e), t.lineTo.apply(t, n), t.lineTo.apply(t, s), t.lineTo.apply(t, r), t.lineTo.apply(t, e), o && (this.alignFill_ = o[2], this.fill_(t)), a && (this.setStrokeStyle_( @@ -9109,12 +9109,12 @@ class Im { } calculateImageOrLabelDimensions_(t, e, n, s, r, o, a, l, h, c, u, d, f, g, m, p) { a *= d[0], l *= d[1]; - let _ = n - a, y = s - l; - const v = r + h > t ? t - h : r, x = o + c > e ? e - c : o, C = g[3] + v * d[0] + g[1], E = g[0] + x * d[1] + g[2], w = _ - g[3], R = y - g[0]; - (m || u !== 0) && (fi[0] = w, gi[0] = w, fi[1] = R, Ye[1] = R, Ye[0] = w + C, je[0] = Ye[0], je[1] = R + E, gi[1] = je[1]); - let A; - return u !== 0 ? (A = bi( - De(), + let v = n - a, y = s - l; + const x = r + h > t ? t - h : r, M = o + c > e ? e - c : o, C = g[3] + x * d[0] + g[1], E = g[0] + M * d[1] + g[2], b = v - g[3], S = y - g[0]; + (m || u !== 0) && (fi[0] = b, gi[0] = b, fi[1] = S, Ue[1] = S, Ue[0] = b + C, Je[0] = Ue[0], Je[1] = S + E, gi[1] = Je[1]); + let O; + return u !== 0 ? (O = _i( + Fe(), n, s, 1, @@ -9122,23 +9122,23 @@ class Im { u, -n, -s - ), Dt(A, fi), Dt(A, Ye), Dt(A, je), Dt(A, gi), xe( - Math.min(fi[0], Ye[0], je[0], gi[0]), - Math.min(fi[1], Ye[1], je[1], gi[1]), - Math.max(fi[0], Ye[0], je[0], gi[0]), - Math.max(fi[1], Ye[1], je[1], gi[1]), + ), Ft(O, fi), Ft(O, Ue), Ft(O, Je), Ft(O, gi), Me( + Math.min(fi[0], Ue[0], Je[0], gi[0]), + Math.min(fi[1], Ue[1], Je[1], gi[1]), + Math.max(fi[0], Ue[0], Je[0], gi[0]), + Math.max(fi[1], Ue[1], Je[1], gi[1]), pn - )) : xe( - Math.min(w, w + C), - Math.min(R, R + E), - Math.max(w, w + C), - Math.max(R, R + E), + )) : Me( + Math.min(b, b + C), + Math.min(S, S + E), + Math.max(b, b + C), + Math.max(S, S + E), pn - ), f && (_ = Math.round(_), y = Math.round(y)), { - drawImageX: _, + ), f && (v = Math.round(v), y = Math.round(y)), { + drawImageX: v, drawImageY: y, - drawImageW: v, - drawImageH: x, + drawImageW: x, + drawImageH: M, originX: h, originY: c, declutterBox: { @@ -9148,7 +9148,7 @@ class Im { maxY: pn[3], value: p }, - canvasTransform: A, + canvasTransform: O, scale: d }; } @@ -9157,12 +9157,12 @@ class Im { return h.minX - u <= c.width / e && h.maxX + u >= 0 && h.minY - u <= c.height / e && h.maxY + u >= 0 && (l && this.replayTextBackground_( t, fi, - Ye, - je, + Ue, + Je, gi, o, a - ), H0( + ), V0( t, s.canvasTransform, r, @@ -9178,7 +9178,7 @@ class Im { } fill_(t) { if (this.alignFill_) { - const e = Dt(this.renderedTransform_, [0, 0]), n = 512 * this.pixelRatio; + const e = Ft(this.renderedTransform_, [0, 0]), n = 512 * this.pixelRatio; t.save(), t.translate(e[0] % n, e[1] % n), t.rotate(this.viewRotation_); } t.fill(), this.alignFill_ && t.restore(); @@ -9187,10 +9187,10 @@ class Im { t.strokeStyle = e[1], t.lineWidth = e[2], t.lineCap = e[3], t.lineJoin = e[4], t.miterLimit = e[5], t.lineDashOffset = e[7], t.setLineDash(e[6]); } drawLabelWithPointPlacement_(t, e, n, s) { - const r = this.textStates[e], o = this.createLabel(t, e, s, n), a = this.strokeStates[n], l = this.pixelRatio, h = jh( + const r = this.textStates[e], o = this.createLabel(t, e, s, n), a = this.strokeStates[n], l = this.pixelRatio, h = Uh( Array.isArray(t) ? t[0] : t, - r.textAlign || Ps - ), c = Cs[r.textBaseline || Wr], u = a && a.lineWidth ? a.lineWidth : 0, d = o.width / l - 2 * r.scale[0], f = h * d + 2 * (0.5 - h) * u, g = c * o.height / l + 2 * (0.5 - c) * u; + r.textAlign || As + ), c = Cs[r.textBaseline || Br], u = a && a.lineWidth ? a.lineWidth : 0, d = o.width / l - 2 * r.scale[0], f = h * d + 2 * (0.5 - h) * u, g = c * o.height / l + 2 * (0.5 - c) * u; return { label: o, anchorX: f, @@ -9199,7 +9199,7 @@ class Im { } execute_(t, e, n, s, r, o, a, l) { let h; - this.pixelCoordinates_ && sn(n, this.renderedTransform_) ? h = this.pixelCoordinates_ : (this.pixelCoordinates_ || (this.pixelCoordinates_ = []), h = Xi( + this.pixelCoordinates_ && sn(n, this.renderedTransform_) ? h = this.pixelCoordinates_ : (this.pixelCoordinates_ || (this.pixelCoordinates_ = []), h = Yi( this.coordinates, 0, this.coordinates.length, @@ -9209,93 +9209,93 @@ class Im { ), g0(this.renderedTransform_, n)); let c = 0; const u = s.length; - let d = 0, f, g, m, p, _, y, v, x, C, E, w, R, A = 0, k = 0, Z = null, L = null; - const G = this.coordinateCache_, dt = this.viewRotation_, N = Math.round(Math.atan2(-n[1], n[0]) * 1e12) / 1e12, D = { + let d = 0, f, g, m, p, v, y, x, M, C, E, b, S, O = 0, D = 0, H = null, R = null; + const j = this.coordinateCache_, dt = this.viewRotation_, N = Math.round(Math.atan2(-n[1], n[0]) * 1e12) / 1e12, F = { context: t, pixelRatio: this.pixelRatio, resolution: this.resolution, rotation: dt - }, I = this.instructions != s || this.overlaps ? 0 : 200; - let Q, Ct, _t, Ot; + }, L = this.instructions != s || this.overlaps ? 0 : 200; + let $, wt, vt, It; for (; c < u; ) { - const b = s[c]; - switch (b[0]) { - case U.BEGIN_GEOMETRY: - Q = b[1], Ot = b[3], Q.getGeometry() ? a !== void 0 && !ie(a, Ot.getExtent()) ? c = b[2] + 1 : ++c : c = b[2]; + const _ = s[c]; + switch (_[0]) { + case Z.BEGIN_GEOMETRY: + $ = _[1], It = _[3], $.getGeometry() ? a !== void 0 && !ie(a, It.getExtent()) ? c = _[2] + 1 : ++c : c = _[2]; break; - case U.BEGIN_PATH: - A > I && (this.fill_(t), A = 0), k > I && (t.stroke(), k = 0), !A && !k && (t.beginPath(), p = NaN, _ = NaN), ++c; + case Z.BEGIN_PATH: + O > L && (this.fill_(t), O = 0), D > L && (t.stroke(), D = 0), !O && !D && (t.beginPath(), p = NaN, v = NaN), ++c; break; - case U.CIRCLE: - d = b[1]; - const at = h[d], ft = h[d + 1], hi = h[d + 2], Ie = h[d + 3], $t = hi - at, Ve = Ie - ft, ln = Math.sqrt($t * $t + Ve * Ve); + case Z.CIRCLE: + d = _[1]; + const at = h[d], ft = h[d + 1], hi = h[d + 2], Le = h[d + 3], kt = hi - at, Be = Le - ft, ln = Math.sqrt(kt * kt + Be * Be); t.moveTo(at + ln, ft), t.arc(at, ft, ln, 0, 2 * Math.PI, !0), ++c; break; - case U.CLOSE_PATH: + case Z.CLOSE_PATH: t.closePath(), ++c; break; - case U.CUSTOM: - d = b[1], f = b[2]; - const rr = b[3], hn = b[4], or = b.length == 6 ? b[5] : void 0; - D.geometry = rr, D.feature = Q, c in G || (G[c] = []); - const ci = G[c]; - or ? or(h, d, f, 2, ci) : (ci[0] = h[d], ci[1] = h[d + 1], ci.length = 2), hn(ci, D), ++c; + case Z.CUSTOM: + d = _[1], f = _[2]; + const rr = _[3], hn = _[4], or = _.length == 6 ? _[5] : void 0; + F.geometry = rr, F.feature = $, c in j || (j[c] = []); + const ci = j[c]; + or ? or(h, d, f, 2, ci) : (ci[0] = h[d], ci[1] = h[d + 1], ci.length = 2), hn(ci, F), ++c; break; - case U.DRAW_IMAGE: - d = b[1], f = b[2], x = b[3], g = b[4], m = b[5]; - let ss = b[6]; - const ui = b[7], ar = b[8], lr = b[9], hr = b[10]; - let cn = b[11]; - const No = b[12]; - let Jt = b[13]; - const me = b[14], Me = b[15]; - if (!x && b.length >= 20) { - C = b[19], E = b[20], w = b[21], R = b[22]; + case Z.DRAW_IMAGE: + d = _[1], f = _[2], M = _[3], g = _[4], m = _[5]; + let ss = _[6]; + const ui = _[7], ar = _[8], lr = _[9], hr = _[10]; + let cn = _[11]; + const Io = _[12]; + let Qt = _[13]; + const me = _[14], we = _[15]; + if (!M && _.length >= 20) { + C = _[19], E = _[20], b = _[21], S = _[22]; const le = this.drawLabelWithPointPlacement_( C, E, - w, - R + b, + S ); - x = le.label, b[3] = x; - const fn = b[23]; - g = (le.anchorX - fn) * this.pixelRatio, b[4] = g; - const pe = b[24]; - m = (le.anchorY - pe) * this.pixelRatio, b[5] = m, ss = x.height, b[6] = ss, Jt = x.width, b[13] = Jt; + M = le.label, _[3] = M; + const fn = _[23]; + g = (le.anchorX - fn) * this.pixelRatio, _[4] = g; + const pe = _[24]; + m = (le.anchorY - pe) * this.pixelRatio, _[5] = m, ss = M.height, _[6] = ss, Qt = M.width, _[13] = Qt; } let We; - b.length > 25 && (We = b[25]); + _.length > 25 && (We = _[25]); let un, Ni, di; - b.length > 17 ? (un = b[16], Ni = b[17], di = b[18]) : (un = $i, Ni = !1, di = !1), hr && N ? cn += dt : !hr && !N && (cn -= dt); + _.length > 17 ? (un = _[16], Ni = _[17], di = _[18]) : (un = ki, Ni = !1, di = !1), hr && N ? cn += dt : !hr && !N && (cn -= dt); let dn = 0; for (; d < f; d += 2) { - if (We && We[dn++] < Jt / this.pixelRatio) + if (We && We[dn++] < Qt / this.pixelRatio) continue; const le = this.calculateImageOrLabelDimensions_( - x.width, - x.height, + M.width, + M.height, h[d], h[d + 1], - Jt, + Qt, ss, g, m, ar, lr, cn, - No, + Io, r, un, Ni || di, - Q + $ ), fn = [ t, e, - x, + M, le, ui, - Ni ? Z : null, - di ? L : null + Ni ? H : null, + di ? R : null ]; if (l) { if (me === "none") @@ -9304,166 +9304,166 @@ class Im { l.insert(le.declutterBox); continue; } else { - let pe, He; - if (Me) { + let pe, Ve; + if (we) { const he = f - d; - if (!Me[he]) { - Me[he] = fn; + if (!we[he]) { + we[he] = fn; continue; } - if (pe = Me[he], delete Me[he], He = Yh(pe), l.collides(He)) + if (pe = we[he], delete we[he], Ve = Yh(pe), l.collides(Ve)) continue; } if (l.collides(le.declutterBox)) continue; - pe && (l.insert(He), this.replayImageOrLabel_.apply(this, pe)), l.insert(le.declutterBox); + pe && (l.insert(Ve), this.replayImageOrLabel_.apply(this, pe)), l.insert(le.declutterBox); } } this.replayImageOrLabel_.apply(this, fn); } ++c; break; - case U.DRAW_CHARS: - const cr = b[1], Ht = b[2], Fo = b[3], Df = b[4]; - R = b[5]; - const kf = b[6], ql = b[7], Jl = b[8]; - w = b[9]; - const Do = b[10]; - C = b[11], E = b[12]; + case Z.DRAW_CHARS: + const cr = _[1], Vt = _[2], No = _[3], Ff = _[4]; + S = _[5]; + const Df = _[6], ql = _[7], Kl = _[8]; + b = _[9]; + const zo = _[10]; + C = _[11], E = _[12]; const Ql = [ - b[13], - b[13] - ], ko = this.textStates[E], rs = ko.font, os = [ - ko.scale[0] * ql, - ko.scale[1] * ql + _[13], + _[13] + ], Fo = this.textStates[E], rs = Fo.font, os = [ + Fo.scale[0] * ql, + Fo.scale[1] * ql ]; let as; rs in this.widths_ ? as = this.widths_[rs] : (as = {}, this.widths_[rs] = as); - const th = _d(h, cr, Ht, 2), eh = Math.abs(os[0]) * Eh(rs, C, as); - if (Df || eh <= th) { - const le = this.textStates[E].textAlign, fn = (th - eh) * Cs[le], pe = bm( + const $l = vd(h, cr, Vt, 2), th = Math.abs(os[0]) * wh(rs, C, as); + if (Ff || th <= $l) { + const le = this.textStates[E].textAlign, fn = ($l - th) * Cs[le], pe = _2( h, cr, - Ht, + Vt, 2, C, fn, - kf, + Df, Math.abs(os[0]), - Eh, + wh, rs, as, N ? 0 : this.viewRotation_ ); t: if (pe) { - const He = []; - let he, ur, dr, Qt, _e; - if (w) + const Ve = []; + let he, ur, dr, $t, ve; + if (b) for (he = 0, ur = pe.length; he < ur; ++he) { - _e = pe[he], dr = _e[4], Qt = this.createLabel(dr, E, "", w), g = _e[2] + (os[0] < 0 ? -Do : Do), m = Fo * Qt.height + (0.5 - Fo) * 2 * Do * os[1] / os[0] - Jl; - const Xe = this.calculateImageOrLabelDimensions_( - Qt.width, - Qt.height, - _e[0], - _e[1], - Qt.width, - Qt.height, + ve = pe[he], dr = ve[4], $t = this.createLabel(dr, E, "", b), g = ve[2] + (os[0] < 0 ? -zo : zo), m = No * $t.height + (0.5 - No) * 2 * zo * os[1] / os[0] - Kl; + const Ye = this.calculateImageOrLabelDimensions_( + $t.width, + $t.height, + ve[0], + ve[1], + $t.width, + $t.height, g, m, 0, 0, - _e[3], + ve[3], Ql, !1, - $i, + ki, !1, - Q + $ ); - if (l && l.collides(Xe.declutterBox)) + if (l && l.collides(Ye.declutterBox)) break t; - He.push([ + Ve.push([ t, e, - Qt, - Xe, + $t, + Ye, 1, null, null ]); } - if (R) + if (S) for (he = 0, ur = pe.length; he < ur; ++he) { - _e = pe[he], dr = _e[4], Qt = this.createLabel(dr, E, R, ""), g = _e[2], m = Fo * Qt.height - Jl; - const Xe = this.calculateImageOrLabelDimensions_( - Qt.width, - Qt.height, - _e[0], - _e[1], - Qt.width, - Qt.height, + ve = pe[he], dr = ve[4], $t = this.createLabel(dr, E, S, ""), g = ve[2], m = No * $t.height - Kl; + const Ye = this.calculateImageOrLabelDimensions_( + $t.width, + $t.height, + ve[0], + ve[1], + $t.width, + $t.height, g, m, 0, 0, - _e[3], + ve[3], Ql, !1, - $i, + ki, !1, - Q + $ ); - if (l && l.collides(Xe.declutterBox)) + if (l && l.collides(Ye.declutterBox)) break t; - He.push([ + Ve.push([ t, e, - Qt, - Xe, + $t, + Ye, 1, null, null ]); } - l && l.load(He.map(Yh)); - for (let Xe = 0, Gf = He.length; Xe < Gf; ++Xe) - this.replayImageOrLabel_.apply(this, He[Xe]); + l && l.load(Ve.map(Yh)); + for (let Ye = 0, jf = Ve.length; Ye < jf; ++Ye) + this.replayImageOrLabel_.apply(this, Ve[Ye]); } } ++c; break; - case U.END_GEOMETRY: + case Z.END_GEOMETRY: if (o !== void 0) { - Q = b[1]; - const le = o(Q, Ot); + $ = _[1]; + const le = o($, It); if (le) return le; } ++c; break; - case U.FILL: - I ? A++ : this.fill_(t), ++c; + case Z.FILL: + L ? O++ : this.fill_(t), ++c; break; - case U.MOVE_TO_LINE_TO: - for (d = b[1], f = b[2], Ct = h[d], _t = h[d + 1], y = Ct + 0.5 | 0, v = _t + 0.5 | 0, (y !== p || v !== _) && (t.moveTo(Ct, _t), p = y, _ = v), d += 2; d < f; d += 2) - Ct = h[d], _t = h[d + 1], y = Ct + 0.5 | 0, v = _t + 0.5 | 0, (d == f - 2 || y !== p || v !== _) && (t.lineTo(Ct, _t), p = y, _ = v); + case Z.MOVE_TO_LINE_TO: + for (d = _[1], f = _[2], wt = h[d], vt = h[d + 1], y = wt + 0.5 | 0, x = vt + 0.5 | 0, (y !== p || x !== v) && (t.moveTo(wt, vt), p = y, v = x), d += 2; d < f; d += 2) + wt = h[d], vt = h[d + 1], y = wt + 0.5 | 0, x = vt + 0.5 | 0, (d == f - 2 || y !== p || x !== v) && (t.lineTo(wt, vt), p = y, v = x); ++c; break; - case U.SET_FILL_STYLE: - Z = b, this.alignFill_ = b[2], A && (this.fill_(t), A = 0, k && (t.stroke(), k = 0)), t.fillStyle = b[1], ++c; + case Z.SET_FILL_STYLE: + H = _, this.alignFill_ = _[2], O && (this.fill_(t), O = 0, D && (t.stroke(), D = 0)), t.fillStyle = _[1], ++c; break; - case U.SET_STROKE_STYLE: - L = b, k && (t.stroke(), k = 0), this.setStrokeStyle_(t, b), ++c; + case Z.SET_STROKE_STYLE: + R = _, D && (t.stroke(), D = 0), this.setStrokeStyle_(t, _), ++c; break; - case U.STROKE: - I ? k++ : t.stroke(), ++c; + case Z.STROKE: + L ? D++ : t.stroke(), ++c; break; default: ++c; break; } } - A && this.fill_(t), k && t.stroke(); + O && this.fill_(t), D && t.stroke(); } execute(t, e, n, s, r, o) { this.viewRotation_ = s, this.execute_( @@ -9489,10 +9489,10 @@ class Im { ); } } -const Am = Im, Qo = ["Polygon", "Circle", "LineString", "Image", "Text", "Default"]; -class Pm { +const O2 = L2, Ko = ["Polygon", "Circle", "LineString", "Image", "Text", "Default"]; +class A2 { constructor(t, e, n, s, r, o) { - this.maxExtent_ = t, this.overlaps_ = s, this.pixelRatio_ = n, this.resolution_ = e, this.renderBuffer_ = o, this.executorsByZIndex_ = {}, this.hitDetectionContext_ = null, this.hitDetectionTransform_ = De(), this.createExecutors_(r); + this.maxExtent_ = t, this.overlaps_ = s, this.pixelRatio_ = n, this.resolution_ = e, this.renderBuffer_ = o, this.executorsByZIndex_ = {}, this.hitDetectionContext_ = null, this.hitDetectionTransform_ = Fe(), this.createExecutors_(r); } clip(t, e) { const n = this.getClipCoords(e); @@ -9505,7 +9505,7 @@ class Pm { const s = t[e]; for (const r in s) { const o = s[r]; - n[r] = new Am( + n[r] = new O2( this.resolution_, this.pixelRatio_, this.overlaps_, @@ -9525,7 +9525,7 @@ class Pm { } forEachFeatureAtCoordinate(t, e, n, s, r, o) { s = Math.round(s); - const a = s * 2 + 1, l = bi( + const a = s * 2 + 1, l = _i( this.hitDetectionTransform_, s + 0.5, s + 0.5, @@ -9542,45 +9542,45 @@ class Pm { const c = this.hitDetectionContext_; c.canvas.width !== a || c.canvas.height !== a ? (c.canvas.width = a, c.canvas.height = a) : h || c.clearRect(0, 0, a, a); let u; - this.renderBuffer_ !== void 0 && (u = fe(), ys(u, t), fo( + this.renderBuffer_ !== void 0 && (u = fe(), ys(u, t), uo( u, e * (this.renderBuffer_ + s), u )); - const d = Om(s); + const d = I2(s); let f; function g(C, E) { - const w = c.getImageData( + const b = c.getImageData( 0, 0, a, a ).data; - for (let R = 0, A = d.length; R < A; R++) - if (w[d[R]] > 0) { + for (let S = 0, O = d.length; S < O; S++) + if (b[d[S]] > 0) { if (!o || f !== "Image" && f !== "Text" || o.includes(C)) { - const k = (d[R] - 3) / 4, Z = s - k % a, L = s - (k / a | 0), G = r(C, E, Z * Z + L * L); - if (G) - return G; + const D = (d[S] - 3) / 4, H = s - D % a, R = s - (D / a | 0), j = r(C, E, H * H + R * R); + if (j) + return j; } c.clearRect(0, 0, a, a); break; } } const m = Object.keys(this.executorsByZIndex_).map(Number); - m.sort(Ki); - let p, _, y, v, x; + m.sort(qi); + let p, v, y, x, M; for (p = m.length - 1; p >= 0; --p) { const C = m[p].toString(); - for (y = this.executorsByZIndex_[C], _ = Qo.length - 1; _ >= 0; --_) - if (f = Qo[_], v = y[f], v !== void 0 && (x = v.executeHitDetection( + for (y = this.executorsByZIndex_[C], v = Ko.length - 1; v >= 0; --v) + if (f = Ko[v], x = y[f], x !== void 0 && (M = x.executeHitDetection( c, l, n, g, u - ), x)) - return x; + ), M)) + return M; } } getClipCoords(t) { @@ -9588,14 +9588,14 @@ class Pm { if (!e) return null; const n = e[0], s = e[1], r = e[2], o = e[3], a = [n, s, n, o, r, o, r, s]; - return Xi(a, 0, 8, 2, t, a), a; + return Yi(a, 0, 8, 2, t, a), a; } isEmpty() { - return Gn(this.executorsByZIndex_); + return jn(this.executorsByZIndex_); } execute(t, e, n, s, r, o, a) { const l = Object.keys(this.executorsByZIndex_).map(Number); - l.sort(Ki), this.maxExtent_ && (t.save(), this.clip(t, n)), o = o || Qo; + l.sort(qi), this.maxExtent_ && (t.save(), this.clip(t, n)), o = o || Ko; let h, c, u, d, f, g; for (a && l.reverse(), h = 0, c = l.length; h < c; ++h) { const m = l[h].toString(); @@ -9614,10 +9614,10 @@ class Pm { this.maxExtent_ && t.restore(); } } -const ta = {}; -function Om(i) { - if (ta[i] !== void 0) - return ta[i]; +const Qo = {}; +function I2(i) { + if (Qo[i] !== void 0) + return Qo[i]; const t = i * 2 + 1, e = i * i, n = new Array(e + 1); for (let r = 0; r <= i; ++r) for (let o = 0; o <= i; ++o) { @@ -9630,17 +9630,17 @@ function Om(i) { const s = []; for (let r = 0, o = n.length; r < o; ++r) n[r] && s.push(...n[r]); - return ta[i] = s, s; + return Qo[i] = s, s; } -const Kh = Pm; -class Nm extends Ed { +const Jh = A2; +class N2 extends Ed { constructor(t, e, n, s, r, o, a) { - super(), this.context_ = t, this.pixelRatio_ = e, this.extent_ = n, this.transform_ = s, this.viewRotation_ = r, this.squaredTolerance_ = o, this.userTransform_ = a, this.contextFillState_ = null, this.contextStrokeState_ = null, this.contextTextState_ = null, this.fillState_ = null, this.strokeState_ = null, this.image_ = null, this.imageAnchorX_ = 0, this.imageAnchorY_ = 0, this.imageHeight_ = 0, this.imageOpacity_ = 0, this.imageOriginX_ = 0, this.imageOriginY_ = 0, this.imageRotateWithView_ = !1, this.imageRotation_ = 0, this.imageScale_ = [0, 0], this.imageWidth_ = 0, this.text_ = "", this.textOffsetX_ = 0, this.textOffsetY_ = 0, this.textRotateWithView_ = !1, this.textRotation_ = 0, this.textScale_ = [0, 0], this.textFillState_ = null, this.textStrokeState_ = null, this.textState_ = null, this.pixelCoordinates_ = [], this.tmpLocalTransform_ = De(); + super(), this.context_ = t, this.pixelRatio_ = e, this.extent_ = n, this.transform_ = s, this.viewRotation_ = r, this.squaredTolerance_ = o, this.userTransform_ = a, this.contextFillState_ = null, this.contextStrokeState_ = null, this.contextTextState_ = null, this.fillState_ = null, this.strokeState_ = null, this.image_ = null, this.imageAnchorX_ = 0, this.imageAnchorY_ = 0, this.imageHeight_ = 0, this.imageOpacity_ = 0, this.imageOriginX_ = 0, this.imageOriginY_ = 0, this.imageRotateWithView_ = !1, this.imageRotation_ = 0, this.imageScale_ = [0, 0], this.imageWidth_ = 0, this.text_ = "", this.textOffsetX_ = 0, this.textOffsetY_ = 0, this.textRotateWithView_ = !1, this.textRotation_ = 0, this.textScale_ = [0, 0], this.textFillState_ = null, this.textStrokeState_ = null, this.textState_ = null, this.pixelCoordinates_ = [], this.tmpLocalTransform_ = Fe(); } drawImages_(t, e, n, s) { if (!this.image_) return; - const r = Xi( + const r = Yi( t, e, n, @@ -9655,7 +9655,7 @@ class Nm extends Ed { const d = r[c] - this.imageAnchorX_, f = r[c + 1] - this.imageAnchorY_; if (h !== 0 || this.imageScale_[0] != 1 || this.imageScale_[1] != 1) { const g = d + this.imageAnchorX_, m = f + this.imageAnchorY_; - bi( + _i( a, g, m, @@ -9694,7 +9694,7 @@ class Nm extends Ed { if (!this.textState_ || this.text_ === "") return; this.textFillState_ && this.setContextFillState_(this.textFillState_), this.textStrokeState_ && this.setContextStrokeState_(this.textStrokeState_), this.setContextTextState_(this.textState_); - const r = Xi( + const r = Yi( t, e, n, @@ -9709,7 +9709,7 @@ class Nm extends Ed { } } moveToLineTo_(t, e, n, s, r) { - const o = this.context_, a = Xi( + const o = this.context_, a = Yi( t, e, n, @@ -9739,7 +9739,7 @@ class Nm extends Ed { if (!!ie(this.extent_, t.getExtent())) { if (this.fillState_ || this.strokeState_) { this.fillState_ && this.setContextFillState_(this.fillState_), this.strokeState_ && this.setContextStrokeState_(this.strokeState_); - const e = Og( + const e = Ig( t, this.transform_, this.pixelCoordinates_ @@ -9946,7 +9946,7 @@ class Nm extends Ed { }); } setContextTextState_(t) { - const e = this.context_, n = this.contextTextState_, s = t.textAlign ? t.textAlign : Ps; + const e = this.context_, n = this.contextTextState_, s = t.textAlign ? t.textAlign : As; n ? (n.font != t.font && (n.font = t.font, e.font = t.font), n.textAlign != s && (n.textAlign = s, e.textAlign = s), n.textBaseline != t.textBaseline && (n.textBaseline = t.textBaseline, e.textBaseline = t.textBaseline)) : (e.font = t.font, e.textAlign = s, e.textBaseline = t.textBaseline, this.contextTextState_ = { font: t.font, textAlign: s, @@ -9967,16 +9967,16 @@ class Nm extends Ed { if (!e) this.strokeState_ = null; else { - const n = e.getColor(), s = e.getLineCap(), r = e.getLineDash(), o = e.getLineDashOffset(), a = e.getLineJoin(), l = e.getWidth(), h = e.getMiterLimit(), c = r || Ls; + const n = e.getColor(), s = e.getLineCap(), r = e.getLineDash(), o = e.getLineDashOffset(), a = e.getLineJoin(), l = e.getWidth(), h = e.getMiterLimit(), c = r || Rs; this.strokeState_ = { - lineCap: s !== void 0 ? s : Vr, + lineCap: s !== void 0 ? s : Zr, lineDash: this.pixelRatio_ === 1 ? c : c.map((u) => u * this.pixelRatio_), lineDashOffset: (o || Ts) * this.pixelRatio_, - lineJoin: a !== void 0 ? a : $n, - lineWidth: (l !== void 0 ? l : Os) * this.pixelRatio_, - miterLimit: h !== void 0 ? h : Is, + lineJoin: a !== void 0 ? a : kn, + lineWidth: (l !== void 0 ? l : Is) * this.pixelRatio_, + miterLimit: h !== void 0 ? h : Ls, strokeStyle: Ne( - n || As + n || Os ) }; } @@ -10014,24 +10014,24 @@ class Nm extends Ed { if (!n) this.textStrokeState_ = null; else { - const f = n.getColor(), g = n.getLineCap(), m = n.getLineDash(), p = n.getLineDashOffset(), _ = n.getLineJoin(), y = n.getWidth(), v = n.getMiterLimit(); + const f = n.getColor(), g = n.getLineCap(), m = n.getLineDash(), p = n.getLineDashOffset(), v = n.getLineJoin(), y = n.getWidth(), x = n.getMiterLimit(); this.textStrokeState_ = { - lineCap: g !== void 0 ? g : Vr, - lineDash: m || Ls, + lineCap: g !== void 0 ? g : Zr, + lineDash: m || Rs, lineDashOffset: p || Ts, - lineJoin: _ !== void 0 ? _ : $n, - lineWidth: y !== void 0 ? y : Os, - miterLimit: v !== void 0 ? v : Is, + lineJoin: v !== void 0 ? v : kn, + lineWidth: y !== void 0 ? y : Is, + miterLimit: x !== void 0 ? x : Ls, strokeStyle: Ne( - f || As + f || Os ) }; } const s = t.getFont(), r = t.getOffsetX(), o = t.getOffsetY(), a = t.getRotateWithView(), l = t.getRotation(), h = t.getScaleArray(), c = t.getText(), u = t.getTextAlign(), d = t.getTextBaseline(); this.textState_ = { - font: s !== void 0 ? s : Zu, - textAlign: u !== void 0 ? u : Ps, - textBaseline: d !== void 0 ? d : Wr + font: s !== void 0 ? s : Hu, + textAlign: u !== void 0 ? u : As, + textBaseline: d !== void 0 ? d : Br }, this.text_ = c !== void 0 ? Array.isArray(c) ? c.reduce((f, g, m) => f += m % 2 ? " " : g, "") : c : "", this.textOffsetX_ = r !== void 0 ? this.pixelRatio_ * r : 0, this.textOffsetY_ = o !== void 0 ? this.pixelRatio_ * o : 0, this.textRotateWithView_ = a !== void 0 ? a : !1, this.textRotation_ = l !== void 0 ? l : 0, this.textScale_ = [ this.pixelRatio_ * h[0], this.pixelRatio_ * h[1] @@ -10039,112 +10039,112 @@ class Nm extends Ed { } } } -const Sd = Nm, Pe = 0.5; -function Fm(i, t, e, n, s, r, o) { - const a = i[0] * Pe, l = i[1] * Pe, h = ge(a, l); +const Pd = N2, Ae = 0.5; +function z2(i, t, e, n, s, r, o) { + const a = i[0] * Ae, l = i[1] * Ae, h = ge(a, l); h.imageSmoothingEnabled = !1; - const c = h.canvas, u = new Sd( + const c = h.canvas, u = new Pd( h, - Pe, + Ae, s, null, o ), d = e.length, f = Math.floor((256 * 256 * 256 - 1) / d), g = {}; for (let p = 1; p <= d; ++p) { - const _ = e[p - 1], y = _.getStyleFunction() || n; + const v = e[p - 1], y = v.getStyleFunction() || n; if (!n) continue; - let v = y(_, r); - if (!v) + let x = y(v, r); + if (!x) continue; - Array.isArray(v) || (v = [v]); + Array.isArray(x) || (x = [x]); const C = "#" + ("000000" + (p * f).toString(16)).slice(-6); - for (let E = 0, w = v.length; E < w; ++E) { - const R = v[E], A = R.getGeometryFunction()(_); - if (!A || !ie(s, A.getExtent())) + for (let E = 0, b = x.length; E < b; ++E) { + const S = x[E], O = S.getGeometryFunction()(v); + if (!O || !ie(s, O.getExtent())) continue; - const k = R.clone(), Z = k.getFill(); - Z && Z.setColor(C); - const L = k.getStroke(); - L && (L.setColor(C), L.setLineDash(null)), k.setText(void 0); - const G = R.getImage(); - if (G && G.getOpacity() !== 0) { - const D = G.getImageSize(); - if (!D) + const D = S.clone(), H = D.getFill(); + H && H.setColor(C); + const R = D.getStroke(); + R && (R.setColor(C), R.setLineDash(null)), D.setText(void 0); + const j = S.getImage(); + if (j && j.getOpacity() !== 0) { + const F = j.getImageSize(); + if (!F) continue; - const I = ge( - D[0], - D[1], + const L = ge( + F[0], + F[1], void 0, { alpha: !1 } - ), Q = I.canvas; - I.fillStyle = C, I.fillRect(0, 0, Q.width, Q.height), k.setImage( - new xs({ - img: Q, - imgSize: D, - anchor: G.getAnchor(), + ), $ = L.canvas; + L.fillStyle = C, L.fillRect(0, 0, $.width, $.height), D.setImage( + new Ms({ + img: $, + imgSize: F, + anchor: j.getAnchor(), anchorXUnits: "pixels", anchorYUnits: "pixels", - offset: G.getOrigin(), + offset: j.getOrigin(), opacity: 1, - size: G.getSize(), - scale: G.getScale(), - rotation: G.getRotation(), - rotateWithView: G.getRotateWithView() + size: j.getSize(), + scale: j.getScale(), + rotation: j.getRotation(), + rotateWithView: j.getRotateWithView() }) ); } - const dt = k.getZIndex() || 0; + const dt = D.getZIndex() || 0; let N = g[dt]; - N || (N = {}, g[dt] = N, N.Polygon = [], N.Circle = [], N.LineString = [], N.Point = []), N[A.getType().replace("Multi", "")].push( - A, - k + N || (N = {}, g[dt] = N, N.Polygon = [], N.Circle = [], N.LineString = [], N.Point = []), N[O.getType().replace("Multi", "")].push( + O, + D ); } } - const m = Object.keys(g).map(Number).sort(Ki); - for (let p = 0, _ = m.length; p < _; ++p) { + const m = Object.keys(g).map(Number).sort(qi); + for (let p = 0, v = m.length; p < v; ++p) { const y = g[m[p]]; - for (const v in y) { - const x = y[v]; - for (let C = 0, E = x.length; C < E; C += 2) { - u.setStyle(x[C + 1]); - for (let w = 0, R = t.length; w < R; ++w) - u.setTransform(t[w]), u.drawGeometry(x[C]); + for (const x in y) { + const M = y[x]; + for (let C = 0, E = M.length; C < E; C += 2) { + u.setStyle(M[C + 1]); + for (let b = 0, S = t.length; b < S; ++b) + u.setTransform(t[b]), u.drawGeometry(M[C]); } } } return h.getImageData(0, 0, c.width, c.height); } -function Dm(i, t, e) { +function F2(i, t, e) { const n = []; if (e) { - const s = Math.floor(Math.round(i[0]) * Pe), r = Math.floor(Math.round(i[1]) * Pe), o = (wt(s, 0, e.width - 1) + wt(r, 0, e.height - 1) * e.width) * 4, a = e.data[o], l = e.data[o + 1], c = e.data[o + 2] + 256 * (l + 256 * a), u = Math.floor((256 * 256 * 256 - 1) / t.length); + const s = Math.floor(Math.round(i[0]) * Ae), r = Math.floor(Math.round(i[1]) * Ae), o = (Pt(s, 0, e.width - 1) + Pt(r, 0, e.height - 1) * e.width) * 4, a = e.data[o], l = e.data[o + 1], c = e.data[o + 2] + 256 * (l + 256 * a), u = Math.floor((256 * 256 * 256 - 1) / t.length); c && c % u === 0 && n.push(t[c / u - 1]); } return n; } -const km = 0.5, Rd = { - Point: Wm, - LineString: Zm, - Polygon: Xm, - MultiPoint: Hm, - MultiLineString: Um, - MultiPolygon: Vm, - GeometryCollection: zm, - Circle: $m +const D2 = 0.5, Sd = { + Point: W2, + LineString: H2, + Polygon: Y2, + MultiPoint: V2, + MultiLineString: Z2, + MultiPolygon: B2, + GeometryCollection: G2, + Circle: k2 }; -function Gm(i, t) { +function j2(i, t) { return parseInt(rt(i), 10) - parseInt(rt(t), 10); } -function bd(i, t) { - const e = La(i, t); +function _d(i, t) { + const e = Sa(i, t); return e * e; } -function La(i, t) { - return km * i / t; +function Sa(i, t) { + return D2 * i / t; } -function $m(i, t, e, n, s) { +function k2(i, t, e, n, s) { const r = e.getFill(), o = e.getStroke(); if (r || o) { const l = i.getBuilder(e.getZIndex(), "Circle"); @@ -10164,9 +10164,9 @@ function qh(i, t, e, n, s, r, o) { const l = e.getImage(); if (l) { const h = l.getImageState(); - h == At.LOADED || h == At.ERROR ? l.unlistenImageChange(s) : (h == At.IDLE && l.load(), l.listenImageChange(s), a = !0); + h == Ot.LOADED || h == Ot.ERROR ? l.unlistenImageChange(s) : (h == Ot.IDLE && l.load(), l.listenImageChange(s), a = !0); } - return Bm( + return X2( i, t, e, @@ -10175,7 +10175,7 @@ function qh(i, t, e, n, s, r, o) { o ), a; } -function Bm(i, t, e, n, s, r) { +function X2(i, t, e, n, s, r) { const o = e.getGeometryFunction()(t); if (!o) return; @@ -10184,9 +10184,9 @@ function Bm(i, t, e, n, s, r) { s ); if (e.getRenderer()) - Ld(i, a, e, t); + Rd(i, a, e, t); else { - const h = Rd[a.getType()]; + const h = Sd[a.getType()]; h( i, a, @@ -10196,11 +10196,11 @@ function Bm(i, t, e, n, s, r) { ); } } -function Ld(i, t, e, n) { +function Rd(i, t, e, n) { if (t.getType() == "GeometryCollection") { const r = t.getGeometries(); for (let o = 0, a = r.length; o < a; ++o) - Ld(i, r[o], e, n); + Rd(i, r[o], e, n); return; } i.getBuilder(e.getZIndex(), "Default").drawCustom( @@ -10210,11 +10210,11 @@ function Ld(i, t, e, n) { e.getHitDetectionRenderer() ); } -function zm(i, t, e, n, s) { +function G2(i, t, e, n, s) { const r = t.getGeometriesArray(); let o, a; for (o = 0, a = r.length; o < a; ++o) { - const l = Rd[r[o].getType()]; + const l = Sd[r[o].getType()]; l( i, r[o], @@ -10224,7 +10224,7 @@ function zm(i, t, e, n, s) { ); } } -function Zm(i, t, e, n, s) { +function H2(i, t, e, n, s) { const r = e.getStroke(); if (r) { const a = i.getBuilder( @@ -10242,7 +10242,7 @@ function Zm(i, t, e, n, s) { a.setTextStyle(o), a.drawText(t, n); } } -function Um(i, t, e, n, s) { +function Z2(i, t, e, n, s) { const r = e.getStroke(); if (r) { const a = i.getBuilder( @@ -10260,7 +10260,7 @@ function Um(i, t, e, n, s) { a.setTextStyle(o), a.drawText(t, n); } } -function Vm(i, t, e, n, s) { +function B2(i, t, e, n, s) { const r = e.getFill(), o = e.getStroke(); if (o || r) { const l = i.getBuilder(e.getZIndex(), "Polygon"); @@ -10275,11 +10275,11 @@ function Vm(i, t, e, n, s) { l.setTextStyle(a), l.drawText(t, n); } } -function Wm(i, t, e, n, s) { +function W2(i, t, e, n, s) { const r = e.getImage(), o = e.getText(); let a; if (r) { - if (r.getImageState() != At.LOADED) + if (r.getImageState() != Ot.LOADED) return; let l = i; if (s) { @@ -10307,11 +10307,11 @@ function Wm(i, t, e, n, s) { h.setTextStyle(o, a), h.drawText(t, n); } } -function Hm(i, t, e, n, s) { +function V2(i, t, e, n, s) { const r = e.getImage(), o = e.getText(); let a; if (r) { - if (r.getImageState() != At.LOADED) + if (r.getImageState() != Ot.LOADED) return; let l = i; if (s) { @@ -10339,7 +10339,7 @@ function Hm(i, t, e, n, s) { h.setTextStyle(o, a), h.drawText(t, n); } } -function Xm(i, t, e, n, s) { +function Y2(i, t, e, n, s) { const r = e.getFill(), o = e.getStroke(); if (r || o) { const l = i.getBuilder(e.getZIndex(), "Polygon"); @@ -10354,13 +10354,13 @@ function Xm(i, t, e, n, s) { l.setTextStyle(a), l.drawText(t, n); } } -class Ym extends wd { +class U2 extends bd { constructor(t) { super(t), this.boundHandleStyleImageChange_ = this.handleStyleImageChange_.bind(this), this.animatingOrInteracting_, this.hitDetectionImageData_ = null, this.renderedFeatures_ = null, this.renderedRevision_ = -1, this.renderedResolution_ = NaN, this.renderedExtent_ = fe(), this.wrappedRenderedExtent_ = fe(), this.renderedRotation_, this.renderedCenter_ = null, this.renderedProjection_ = null, this.renderedRenderOrder_ = null, this.replayGroup_ = null, this.replayGroupChanged = !0, this.declutterExecutorGroup = null, this.clipping = !0, this.compositionContext_ = null, this.opacity_ = 1; } renderWorlds(t, e, n) { - const s = e.extent, r = e.viewState, o = r.center, a = r.resolution, l = r.projection, h = r.rotation, c = l.getExtent(), u = this.getLayer().getSource(), d = e.pixelRatio, f = e.viewHints, g = !(f[Zt.ANIMATING] || f[Zt.INTERACTING]), m = this.compositionContext_, p = Math.round(e.size[0] * d), _ = Math.round(e.size[1] * d), y = u.getWrapX() && l.canWrapX(), v = y ? mt(c) : null, x = y ? Math.ceil((s[2] - c[2]) / v) + 1 : 1; - let C = y ? Math.floor((s[0] - c[0]) / v) : 0; + const s = e.extent, r = e.viewState, o = r.center, a = r.resolution, l = r.projection, h = r.rotation, c = l.getExtent(), u = this.getLayer().getSource(), d = e.pixelRatio, f = e.viewHints, g = !(f[Ht.ANIMATING] || f[Ht.INTERACTING]), m = this.compositionContext_, p = Math.round(e.size[0] * d), v = Math.round(e.size[1] * d), y = u.getWrapX() && l.canWrapX(), x = y ? mt(c) : null, M = y ? Math.ceil((s[2] - c[2]) / x) + 1 : 1; + let C = y ? Math.floor((s[0] - c[0]) / x) : 0; do { const E = this.getRenderTransform( o, @@ -10368,8 +10368,8 @@ class Ym extends wd { h, d, p, - _, - C * v + v, + C * x ); t.execute( m, @@ -10380,14 +10380,14 @@ class Ym extends wd { void 0, n ); - } while (++C < x); + } while (++C < M); } setupCompositionContext_() { if (this.opacity_ !== 1) { const t = ge( this.context.canvas.width, this.context.canvas.height, - Xh + Vh ); this.compositionContext_ = t; } else @@ -10396,7 +10396,7 @@ class Ym extends wd { releaseCompositionContext_() { if (this.opacity_ !== 1) { const t = this.context.globalAlpha; - this.context.globalAlpha = this.opacity_, this.context.drawImage(this.compositionContext_.canvas, 0, 0), this.context.globalAlpha = t, Bu(this.compositionContext_), Xh.push(this.compositionContext_.canvas), this.compositionContext_ = null; + this.context.globalAlpha = this.opacity_, this.context.drawImage(this.compositionContext_.canvas, 0, 0), this.context.globalAlpha = t, Xu(this.compositionContext_), Vh.push(this.compositionContext_.canvas), this.compositionContext_ = null; } } renderDeclutter(t) { @@ -10408,8 +10408,8 @@ class Ym extends wd { } renderFrame(t, e) { const n = t.pixelRatio, s = t.layerStatesArray[t.layerIndex]; - m0(this.pixelTransform, 1 / n, 1 / n), Ja(this.inversePixelTransform, this.pixelTransform); - const r = Mu(this.pixelTransform); + m0(this.pixelTransform, 1 / n, 1 / n), qa(this.inversePixelTransform, this.pixelTransform); + const r = wu(this.pixelTransform); this.useContainer(e, r, this.getBackground(t)); const o = this.context, a = o.canvas, l = this.replayGroup_, h = this.declutterExecutorGroup; if ((!l || l.isEmpty()) && (!h || h.isEmpty())) @@ -10420,8 +10420,8 @@ class Ym extends wd { d.projection, this.opacity_ = s.opacity, this.setupCompositionContext_(); let f = !1, g = !0; if (s.extent && this.clipping) { - const m = Bi(s.extent); - g = ie(m, t.extent), f = g && !xi(m, t.extent), f && this.clipUnrotated(this.compositionContext_, t, m); + const m = Xi(s.extent); + g = ie(m, t.extent), f = g && !Mi(m, t.extent), f && this.clipUnrotated(this.compositionContext_, t, m); } return g && this.renderWorlds(l, t), f && this.compositionContext_.restore(), this.releaseCompositionContext_(), this.postRender(o, t), this.renderedRotation_ !== d.rotation && (this.renderedRotation_ = d.rotation, this.hitDetectionImageData_ = null), this.container; } @@ -10430,50 +10430,50 @@ class Ym extends wd { function(e) { if (!this.hitDetectionImageData_ && !this.animatingOrInteracting_) { const n = [this.context.canvas.width, this.context.canvas.height]; - Dt(this.pixelTransform, n); - const s = this.renderedCenter_, r = this.renderedResolution_, o = this.renderedRotation_, a = this.renderedProjection_, l = this.wrappedRenderedExtent_, h = this.getLayer(), c = [], u = n[0] * Pe, d = n[1] * Pe; + Ft(this.pixelTransform, n); + const s = this.renderedCenter_, r = this.renderedResolution_, o = this.renderedRotation_, a = this.renderedProjection_, l = this.wrappedRenderedExtent_, h = this.getLayer(), c = [], u = n[0] * Ae, d = n[1] * Ae; c.push( this.getRenderTransform( s, r, o, - Pe, + Ae, u, d, 0 ).slice() ); const f = h.getSource(), g = a.getExtent(); - if (f.getWrapX() && a.canWrapX() && !xi(g, l)) { + if (f.getWrapX() && a.canWrapX() && !Mi(g, l)) { let m = l[0]; const p = mt(g); - let _ = 0, y; + let v = 0, y; for (; m < g[0]; ) - --_, y = p * _, c.push( + --v, y = p * v, c.push( this.getRenderTransform( s, r, o, - Pe, + Ae, u, d, y ).slice() ), m += p; - for (_ = 0, m = l[2]; m > g[2]; ) - ++_, y = p * _, c.push( + for (v = 0, m = l[2]; m > g[2]; ) + ++v, y = p * v, c.push( this.getRenderTransform( s, r, o, - Pe, + Ae, u, d, y ).slice() ), m -= p; } - this.hitDetectionImageData_ = Fm( + this.hitDetectionImageData_ = z2( n, c, this.renderedFeatures_, @@ -10484,7 +10484,7 @@ class Ym extends wd { ); } e( - Dm(t, this.renderedFeatures_, this.hitDetectionImageData_) + F2(t, this.renderedFeatures_, this.hitDetectionImageData_) ); }.bind(this) ); @@ -10493,12 +10493,12 @@ class Ym extends wd { if (!this.replayGroup_) return; const o = e.viewState.resolution, a = e.viewState.rotation, l = this.getLayer(), h = {}, c = function(f, g, m) { - const p = rt(f), _ = h[p]; - if (_) { - if (_ !== !0 && m < _.distanceSq) { + const p = rt(f), v = h[p]; + if (v) { + if (v !== !0 && m < v.distanceSq) { if (m === 0) - return h[p] = !0, r.splice(r.lastIndexOf(_), 1), s(f, l, g); - _.geometry = g, _.distanceSq = m; + return h[p] = !0, r.splice(r.lastIndexOf(v), 1), s(f, l, g); + v.geometry = g, v.distanceSq = m; } } else { if (m === 0) @@ -10536,89 +10536,89 @@ class Ym extends wd { const e = this.getLayer(), n = e.getSource(); if (!n) return !1; - const s = t.viewHints[Zt.ANIMATING], r = t.viewHints[Zt.INTERACTING], o = e.getUpdateWhileAnimating(), a = e.getUpdateWhileInteracting(); + const s = t.viewHints[Ht.ANIMATING], r = t.viewHints[Ht.INTERACTING], o = e.getUpdateWhileAnimating(), a = e.getUpdateWhileInteracting(); if (this.ready && !o && s || !a && r) return this.animatingOrInteracting_ = !0, !0; this.animatingOrInteracting_ = !1; const l = t.extent, h = t.viewState, c = h.projection, u = h.resolution, d = t.pixelRatio, f = e.getRevision(), g = e.getRenderBuffer(); let m = e.getRenderOrder(); - m === void 0 && (m = Gm); - const p = h.center.slice(), _ = fo( + m === void 0 && (m = j2); + const p = h.center.slice(), v = uo( l, g * u - ), y = _.slice(), v = [_.slice()], x = c.getExtent(); - if (n.getWrapX() && c.canWrapX() && !xi(x, t.extent)) { - const N = mt(x), D = Math.max(mt(_) / 2, N); - _[0] = x[0] - D, _[2] = x[2] + D, Du(p, c); - const I = Tu(v[0], c); - I[0] < x[0] && I[2] < x[2] ? v.push([ - I[0] + N, - I[1], - I[2] + N, - I[3] - ]) : I[0] > x[0] && I[2] > x[2] && v.push([ - I[0] - N, - I[1], - I[2] - N, - I[3] + ), y = v.slice(), x = [v.slice()], M = c.getExtent(); + if (n.getWrapX() && c.canWrapX() && !Mi(M, t.extent)) { + const N = mt(M), F = Math.max(mt(v) / 2, N); + v[0] = M[0] - F, v[2] = M[2] + F, Fu(p, c); + const L = Tu(x[0], c); + L[0] < M[0] && L[2] < M[2] ? x.push([ + L[0] + N, + L[1], + L[2] + N, + L[3] + ]) : L[0] > M[0] && L[2] > M[2] && x.push([ + L[0] - N, + L[1], + L[2] - N, + L[3] ]); } - if (this.ready && this.renderedResolution_ == u && this.renderedRevision_ == f && this.renderedRenderOrder_ == m && xi(this.wrappedRenderedExtent_, _)) + if (this.ready && this.renderedResolution_ == u && this.renderedRevision_ == f && this.renderedRenderOrder_ == m && Mi(this.wrappedRenderedExtent_, v)) return sn(this.renderedExtent_, y) || (this.hitDetectionImageData_ = null, this.renderedExtent_ = y), this.renderedCenter_ = p, this.replayGroupChanged = !1, !0; this.replayGroup_ = null; - const C = new Hh( - La(u, d), - _, + const C = new Wh( + Sa(u, d), + v, u, d ); let E; - this.getLayer().getDeclutter() && (E = new Hh( - La(u, d), - _, + this.getLayer().getDeclutter() && (E = new Wh( + Sa(u, d), + v, u, d )); - let w; - for (let N = 0, D = v.length; N < D; ++N) - n.loadFeatures(v[N], u, c); - const R = bd(u, d); - let A = !0; - const k = function(N) { - let D; - const I = N.getStyleFunction() || e.getStyleFunction(); - if (I && (D = I(N, u)), D) { - const Q = this.renderFeature( + let b; + for (let N = 0, F = x.length; N < F; ++N) + n.loadFeatures(x[N], u, c); + const S = _d(u, d); + let O = !0; + const D = function(N) { + let F; + const L = N.getStyleFunction() || e.getStyleFunction(); + if (L && (F = L(N, u)), F) { + const $ = this.renderFeature( N, - R, - D, + S, + F, C, - w, + b, E ); - A = A && !Q; + O = O && !$; } - }.bind(this), Z = Ku(_), L = n.getFeaturesInExtent(Z); - m && L.sort(m); - for (let N = 0, D = L.length; N < D; ++N) - k(L[N]); - this.renderedFeatures_ = L, this.ready = A; - const G = C.finish(), dt = new Kh( - _, + }.bind(this), H = qu(v), R = n.getFeaturesInExtent(H); + m && R.sort(m); + for (let N = 0, F = R.length; N < F; ++N) + D(R[N]); + this.renderedFeatures_ = R, this.ready = O; + const j = C.finish(), dt = new Jh( + v, u, d, n.getOverlaps(), - G, + j, e.getRenderBuffer() ); - return E && (this.declutterExecutorGroup = new Kh( - _, + return E && (this.declutterExecutorGroup = new Jh( + v, u, d, n.getOverlaps(), E.finish(), e.getRenderBuffer() - )), this.renderedResolution_ = u, this.renderedRevision_ = f, this.renderedRenderOrder_ = m, this.renderedExtent_ = y, this.wrappedRenderedExtent_ = _, this.renderedCenter_ = p, this.renderedProjection_ = c, this.replayGroup_ = dt, this.hitDetectionImageData_ = null, this.replayGroupChanged = !0, !0; + )), this.renderedResolution_ = u, this.renderedRevision_ = f, this.renderedRenderOrder_ = m, this.renderedExtent_ = y, this.wrappedRenderedExtent_ = v, this.renderedCenter_ = p, this.renderedProjection_ = c, this.replayGroup_ = dt, this.hitDetectionImageData_ = null, this.replayGroupChanged = !0, !0; } renderFeature(t, e, n, s, r, o) { if (!n) @@ -10648,17 +10648,17 @@ class Ym extends wd { return a; } } -const jm = Ym; -class Km extends um { +const J2 = U2; +class q2 extends u2 { constructor(t) { super(t); } createRenderer() { - return new jm(this); + return new J2(this); } } -const Vn = Km; -class qm { +const Bn = q2; +class K2 { constructor(t) { this.rbush_ = new Cd(t), this.items_ = {}; } @@ -10692,7 +10692,7 @@ class qm { } update(t, e) { const n = this.items_[rt(e)], s = [n.minX, n.minY, n.maxX, n.maxY]; - bs(s, t) || (this.remove(e), this.insert(t, e)); + _s(s, t) || (this.remove(e), this.insert(t, e)); } getAll() { return this.rbush_.all().map(function(e) { @@ -10724,14 +10724,14 @@ class qm { return n; } isEmpty() { - return Gn(this.items_); + return jn(this.items_); } clear() { this.rbush_.clear(), this.items_ = {}; } getExtent(t) { const e = this.rbush_.toJSON(); - return xe(e.minX, e.minY, e.maxX, e.maxY, t); + return Me(e.minX, e.minY, e.maxX, e.maxY, t); } concat(t) { this.rbush_.load(t.rbush_.all()); @@ -10739,10 +10739,10 @@ class qm { this.items_[e] = t.items_[e]; } } -const Jh = qm; -class Jm extends Ce { +const Kh = K2; +class Q2 extends Ce { constructor(t) { - super(), this.projection = q(t.projection), this.attributions_ = Qh(t.attributions), this.attributionsCollapsible_ = t.attributionsCollapsible !== void 0 ? t.attributionsCollapsible : !0, this.loading = !1, this.state_ = t.state !== void 0 ? t.state : "ready", this.wrapX_ = t.wrapX !== void 0 ? t.wrapX : !1, this.interpolate_ = !!t.interpolate, this.viewResolver = null, this.viewRejector = null; + super(), this.projection = K(t.projection), this.attributions_ = Qh(t.attributions), this.attributionsCollapsible_ = t.attributionsCollapsible !== void 0 ? t.attributionsCollapsible : !0, this.loading = !1, this.state_ = t.state !== void 0 ? t.state : "ready", this.wrapX_ = t.wrapX !== void 0 ? t.wrapX : !1, this.interpolate_ = !!t.interpolate, this.viewResolver = null, this.viewRejector = null; const e = this; this.viewPromise_ = new Promise(function(n, s) { e.viewResolver = n, e.viewRejector = s; @@ -10758,7 +10758,7 @@ class Jm extends Ce { return this.projection; } getResolutions() { - return V(); + return B(); } getView() { return this.viewPromise_; @@ -10789,7 +10789,7 @@ function Qh(i) { return [i]; } : null; } -const Td = Jm, we = { +const Td = Q2, be = { ADDFEATURE: "addfeature", CHANGEFEATURE: "changefeature", CLEAR: "clear", @@ -10798,20 +10798,20 @@ const Td = Jm, we = { FEATURESLOADEND: "featuresloadend", FEATURESLOADERROR: "featuresloaderror" }; -function Id(i, t) { +function Ld(i, t) { return [[-1 / 0, -1 / 0, 1 / 0, 1 / 0]]; } -function Qm(i, t) { +function $2(i, t) { return [i]; } -let t2 = !1; -function e2(i, t, e, n, s, r, o) { +let tm = !1; +function em(i, t, e, n, s, r, o) { const a = new XMLHttpRequest(); a.open( "GET", typeof i == "function" ? i(e, n, s) : i, !0 - ), t.getType() == "arraybuffer" && (a.responseType = "arraybuffer"), a.withCredentials = t2, a.onload = function(l) { + ), t.getType() == "arraybuffer" && (a.responseType = "arraybuffer"), a.withCredentials = tm, a.onload = function(l) { if (!a.status || a.status >= 200 && a.status < 300) { const h = t.getType(); let c; @@ -10829,10 +10829,10 @@ function e2(i, t, e, n, s, r, o) { o(); }, a.onerror = o, a.send(); } -function tc(i, t) { +function $h(i, t) { return function(e, n, s, r, o) { const a = this; - e2( + em( i, t, e, @@ -10841,16 +10841,16 @@ function tc(i, t) { function(l, h) { a.addFeatures(l), r !== void 0 && r(l); }, - o || qi + o || Ki ); }; } -class mi extends ze { +class mi extends Ge { constructor(t, e, n) { super(t), this.feature = e, this.features = n; } } -class i2 extends Td { +class im extends Td { constructor(t) { t = t || {}, super({ attributions: t.attributions, @@ -10858,14 +10858,14 @@ class i2 extends Td { projection: void 0, state: "ready", wrapX: t.wrapX !== void 0 ? t.wrapX : !0 - }), this.on, this.once, this.un, this.loader_ = qi, this.format_ = t.format, this.overlaps_ = t.overlaps === void 0 ? !0 : t.overlaps, this.url_ = t.url, t.loader !== void 0 ? this.loader_ = t.loader : this.url_ !== void 0 && (X(this.format_, 7), this.loader_ = tc( + }), this.on, this.once, this.un, this.loader_ = Ki, this.format_ = t.format, this.overlaps_ = t.overlaps === void 0 ? !0 : t.overlaps, this.url_ = t.url, t.loader !== void 0 ? this.loader_ = t.loader : this.url_ !== void 0 && (Y(this.format_, 7), this.loader_ = $h( this.url_, this.format_ - )), this.strategy_ = t.strategy !== void 0 ? t.strategy : Id; + )), this.strategy_ = t.strategy !== void 0 ? t.strategy : Ld; const e = t.useSpatialIndex !== void 0 ? t.useSpatialIndex : !0; - this.featuresRtree_ = e ? new Jh() : null, this.loadedExtentsRtree_ = new Jh(), this.loadingExtentsCount_ = 0, this.nullGeometryFeatures_ = {}, this.idIndex_ = {}, this.uidIndex_ = {}, this.featureChangeKeys_ = {}, this.featuresCollection_ = null; + this.featuresRtree_ = e ? new Kh() : null, this.loadedExtentsRtree_ = new Kh(), this.loadingExtentsCount_ = 0, this.nullGeometryFeatures_ = {}, this.idIndex_ = {}, this.uidIndex_ = {}, this.featureChangeKeys_ = {}, this.featuresCollection_ = null; let n, s; - Array.isArray(t.features) ? s = t.features : t.features && (n = t.features, s = n.getArray()), !e && n === void 0 && (n = new Oe(s)), s !== void 0 && this.addFeaturesInternal(s), n !== void 0 && this.bindFeaturesCollection_(n); + Array.isArray(t.features) ? s = t.features : t.features && (n = t.features, s = n.getArray()), !e && n === void 0 && (n = new Ie(s)), s !== void 0 && this.addFeaturesInternal(s), n !== void 0 && this.bindFeaturesCollection_(n); } addFeature(t) { this.addFeatureInternal(t), this.changed(); @@ -10884,15 +10884,15 @@ class i2 extends Td { } else this.nullGeometryFeatures_[e] = t; this.dispatchEvent( - new mi(we.ADDFEATURE, t) + new mi(be.ADDFEATURE, t) ); } setupChangeEvents_(t, e) { this.featureChangeKeys_[t] = [ - et(e, H.CHANGE, this.handleFeatureChange_, this), + et(e, V.CHANGE, this.handleFeatureChange_, this), et( e, - kn.PROPERTYCHANGE, + Dn.PROPERTYCHANGE, this.handleFeatureChange_, this ) @@ -10901,7 +10901,7 @@ class i2 extends Td { addToIndex_(t, e) { let n = !0; const s = e.getId(); - return s !== void 0 && (s.toString() in this.idIndex_ ? n = !1 : this.idIndex_[s.toString()] = e), n && (X(!(t in this.uidIndex_), 30), this.uidIndex_[t] = e), n; + return s !== void 0 && (s.toString() in this.idIndex_ ? n = !1 : this.idIndex_[s.toString()] = e), n && (Y(!(t in this.uidIndex_), 30), this.uidIndex_[t] = e), n; } addFeatures(t) { this.addFeaturesInternal(t), this.changed(); @@ -10922,21 +10922,21 @@ class i2 extends Td { } else this.nullGeometryFeatures_[l] = a; } - if (this.featuresRtree_ && this.featuresRtree_.load(e, s), this.hasListener(we.ADDFEATURE)) + if (this.featuresRtree_ && this.featuresRtree_.load(e, s), this.hasListener(be.ADDFEATURE)) for (let r = 0, o = n.length; r < o; r++) this.dispatchEvent( - new mi(we.ADDFEATURE, n[r]) + new mi(be.ADDFEATURE, n[r]) ); } bindFeaturesCollection_(t) { let e = !1; this.addEventListener( - we.ADDFEATURE, + be.ADDFEATURE, function(n) { e || (e = !0, t.push(n.feature), e = !1); } ), this.addEventListener( - we.REMOVEFEATURE, + be.REMOVEFEATURE, function(n) { e || (e = !0, t.remove(n.feature), e = !1); } @@ -10966,7 +10966,7 @@ class i2 extends Td { this.removeFeatureInternal(this.nullGeometryFeatures_[s]); } this.featuresCollection_ && this.featuresCollection_.clear(), this.featuresRtree_ && this.featuresRtree_.clear(), this.nullGeometryFeatures_ = {}; - const e = new mi(we.CLEAR); + const e = new mi(be.CLEAR); this.dispatchEvent(e), this.changed(); } forEachFeature(t) { @@ -11003,7 +11003,7 @@ class i2 extends Td { } getFeatures() { let t; - return this.featuresCollection_ ? t = this.featuresCollection_.getArray().slice(0) : this.featuresRtree_ && (t = this.featuresRtree_.getAll(), Gn(this.nullGeometryFeatures_) || Kt(t, Object.values(this.nullGeometryFeatures_))), t; + return this.featuresCollection_ ? t = this.featuresCollection_.getArray().slice(0) : this.featuresRtree_ && (t = this.featuresRtree_.getAll(), jn(this.nullGeometryFeatures_) || qt(t, Object.values(this.nullGeometryFeatures_))), t; } getFeaturesAtCoordinate(t) { const e = []; @@ -11028,7 +11028,7 @@ class i2 extends Td { const o = [NaN, NaN]; let a = 1 / 0; const l = [-1 / 0, -1 / 0, 1 / 0, 1 / 0]; - return e = e || Rs, this.featuresRtree_.forEachInExtent( + return e = e || Ss, this.featuresRtree_.forEachInExtent( l, function(h) { if (e(h)) { @@ -11082,7 +11082,7 @@ class i2 extends Td { } else this.removeFromIdIndex_(e), this.uidIndex_[n] = e; this.changed(), this.dispatchEvent( - new mi(we.CHANGEFEATURE, e) + new mi(be.CHANGEFEATURE, e) ); } hasFeature(t) { @@ -11090,7 +11090,7 @@ class i2 extends Td { return e !== void 0 ? e in this.idIndex_ : rt(t) in this.uidIndex_; } isEmpty() { - return this.featuresRtree_ ? this.featuresRtree_.isEmpty() && Gn(this.nullGeometryFeatures_) : this.featuresCollection_ ? this.featuresCollection_.getLength() === 0 : !0; + return this.featuresRtree_ ? this.featuresRtree_.isEmpty() && jn(this.nullGeometryFeatures_) : this.featuresCollection_ ? this.featuresCollection_.getLength() === 0 : !0; } loadFeatures(t, e, n) { const s = this.loadedExtentsRtree_, r = this.strategy_(t, e, n); @@ -11099,10 +11099,10 @@ class i2 extends Td { s.forEachInExtent( l, function(c) { - return xi(c.extent, l); + return Mi(c.extent, l); } ) || (++this.loadingExtentsCount_, this.dispatchEvent( - new mi(we.FEATURESLOADSTART) + new mi(be.FEATURESLOADSTART) ), this.loader_.call( this, l, @@ -11111,7 +11111,7 @@ class i2 extends Td { function(c) { --this.loadingExtentsCount_, this.dispatchEvent( new mi( - we.FEATURESLOADEND, + be.FEATURESLOADEND, void 0, c ) @@ -11119,7 +11119,7 @@ class i2 extends Td { }.bind(this), function() { --this.loadingExtentsCount_, this.dispatchEvent( - new mi(we.FEATURESLOADERROR) + new mi(be.FEATURESLOADERROR) ); }.bind(this) ), s.insert(l, { extent: l.slice() })); @@ -11133,7 +11133,7 @@ class i2 extends Td { const e = this.loadedExtentsRtree_; let n; e.forEachInExtent(t, function(s) { - if (bs(s.extent, t)) + if (_s(s.extent, t)) return n = s, !0; }), n && e.remove(n); } @@ -11150,7 +11150,7 @@ class i2 extends Td { n.forEach(pt), delete this.featureChangeKeys_[e]; const s = t.getId(); return s !== void 0 && delete this.idIndex_[s.toString()], delete this.uidIndex_[e], this.dispatchEvent( - new mi(we.REMOVEFEATURE, t) + new mi(be.REMOVEFEATURE, t) ), t; } removeFromIdIndex_(t) { @@ -11166,22 +11166,22 @@ class i2 extends Td { this.loader_ = t; } setUrl(t) { - X(this.format_, 7), this.url_ = t, this.setLoader(tc(t, this.format_)); + Y(this.format_, 7), this.url_ = t, this.setLoader($h(t, this.format_)); } } -const Qn = i2; -function n2(i) { +const $n = im; +function nm(i) { if (!(i.context instanceof CanvasRenderingContext2D)) throw new Error("Only works for render events from Canvas 2D layers"); const t = i.inversePixelTransform[0], e = i.frameState, n = d0( i.inversePixelTransform.slice(), e.coordinateToPixelTransform - ), s = bd( + ), s = _d( e.viewState.resolution, t ); let r; - return new Sd( + return new Pd( i.context, t, e.extent, @@ -11191,15 +11191,15 @@ function n2(i) { r ); } -class s2 extends co { +class sm extends ho { constructor(t, e, n) { super(), n = n || {}, this.tileCoord = t, this.state = e, this.interimTile = null, this.key = "", this.transition_ = n.transition === void 0 ? 250 : n.transition, this.transitionStarts_ = {}, this.interpolate = !!n.interpolate; } changed() { - this.dispatchEvent(H.CHANGE); + this.dispatchEvent(V.CHANGE); } release() { - this.state === B.ERROR && this.setState(B.EMPTY); + this.state === X.ERROR && this.setState(X.EMPTY); } getKey() { return this.key + "/" + this.tileCoord; @@ -11209,7 +11209,7 @@ class s2 extends co { return this; let t = this.interimTile; do { - if (t.getState() == B.LOADED) + if (t.getState() == X.LOADED) return this.transition_ = 0, t; t = t.interimTile; } while (t); @@ -11220,11 +11220,11 @@ class s2 extends co { return; let t = this.interimTile, e = this; do { - if (t.getState() == B.LOADED) { + if (t.getState() == X.LOADED) { t.interimTile = null; break; } else - t.getState() == B.LOADING ? e = t : t.getState() == B.IDLE ? e.interimTile = t.interimTile : e = t; + t.getState() == X.LOADING ? e = t : t.getState() == X.IDLE ? e.interimTile = t.interimTile : e = t; t = e.interimTile; } while (t); } @@ -11235,12 +11235,12 @@ class s2 extends co { return this.state; } setState(t) { - if (this.state !== B.ERROR && this.state > t) + if (this.state !== X.ERROR && this.state > t) throw new Error("Tile load sequence violation"); this.state = t, this.changed(); } load() { - V(); + B(); } getAlpha(t, e) { if (!this.transition_) @@ -11251,7 +11251,7 @@ class s2 extends co { else if (n === -1) return 1; const s = e - n + 1e3 / 60; - return s >= this.transition_ ? 1 : qu(s / this.transition_); + return s >= this.transition_ ? 1 : Ku(s / this.transition_); } inTransition(t) { return this.transition_ ? this.transitionStarts_[t] !== -1 : !1; @@ -11260,8 +11260,8 @@ class s2 extends co { this.transition_ && (this.transitionStarts_[t] = -1); } } -const Ad = s2; -class r2 extends Ad { +const Od = sm; +class rm extends Od { constructor(t, e, n, s, r, o) { super(t, e, o), this.crossOrigin_ = s, this.src_ = n, this.key = n, this.image_ = new Image(), s !== null && (this.image_.crossOrigin = s), this.unlisten_ = null, this.tileLoadFunction_ = r; } @@ -11269,17 +11269,17 @@ class r2 extends Ad { return this.image_; } setImage(t) { - this.image_ = t, this.state = B.LOADED, this.unlistenImage_(), this.changed(); + this.image_ = t, this.state = X.LOADED, this.unlistenImage_(), this.changed(); } handleImageError_() { - this.state = B.ERROR, this.unlistenImage_(), this.image_ = o2(), this.changed(); + this.state = X.ERROR, this.unlistenImage_(), this.image_ = om(), this.changed(); } handleImageLoad_() { const t = this.image_; - t.naturalWidth && t.naturalHeight ? this.state = B.LOADED : this.state = B.EMPTY, this.unlistenImage_(), this.changed(); + t.naturalWidth && t.naturalHeight ? this.state = X.LOADED : this.state = X.EMPTY, this.unlistenImage_(), this.changed(); } load() { - this.state == B.ERROR && (this.state = B.IDLE, this.image_ = new Image(), this.crossOrigin_ !== null && (this.image_.crossOrigin = this.crossOrigin_)), this.state == B.IDLE && (this.state = B.LOADING, this.changed(), this.tileLoadFunction_(this, this.src_), this.unlisten_ = Md( + this.state == X.ERROR && (this.state = X.IDLE, this.image_ = new Image(), this.crossOrigin_ !== null && (this.image_.crossOrigin = this.crossOrigin_)), this.state == X.IDLE && (this.state = X.LOADING, this.changed(), this.tileLoadFunction_(this, this.src_), this.unlisten_ = wd( this.image_, this.handleImageLoad_.bind(this), this.handleImageError_.bind(this) @@ -11289,54 +11289,54 @@ class r2 extends Ad { this.unlisten_ && (this.unlisten_(), this.unlisten_ = null); } } -function o2() { +function om() { const i = ge(1, 1); return i.fillStyle = "rgba(0,0,0,0)", i.fillRect(0, 0, 1, 1), i.canvas; } -const Pd = r2, zt = { +const Ad = rm, Gt = { ELEMENT: "element", MAP: "map", OFFSET: "offset", POSITION: "position", POSITIONING: "positioning" }; -class a2 extends Ce { +class am extends Ce { constructor(t) { - super(), this.on, this.once, this.un, this.options = t, this.id = t.id, this.insertFirst = t.insertFirst !== void 0 ? t.insertFirst : !0, this.stopEvent = t.stopEvent !== void 0 ? t.stopEvent : !0, this.element = document.createElement("div"), this.element.className = t.className !== void 0 ? t.className : "ol-overlay-container " + G0, this.element.style.position = "absolute", this.element.style.pointerEvents = "auto", this.autoPan = t.autoPan === !0 ? {} : t.autoPan || void 0, this.rendered = { + super(), this.on, this.once, this.un, this.options = t, this.id = t.id, this.insertFirst = t.insertFirst !== void 0 ? t.insertFirst : !0, this.stopEvent = t.stopEvent !== void 0 ? t.stopEvent : !0, this.element = document.createElement("div"), this.element.className = t.className !== void 0 ? t.className : "ol-overlay-container " + j0, this.element.style.position = "absolute", this.element.style.pointerEvents = "auto", this.autoPan = t.autoPan === !0 ? {} : t.autoPan || void 0, this.rendered = { transform_: "", visible: !0 - }, this.mapPostrenderListenerKey = null, this.addChangeListener(zt.ELEMENT, this.handleElementChanged), this.addChangeListener(zt.MAP, this.handleMapChanged), this.addChangeListener(zt.OFFSET, this.handleOffsetChanged), this.addChangeListener(zt.POSITION, this.handlePositionChanged), this.addChangeListener(zt.POSITIONING, this.handlePositioningChanged), t.element !== void 0 && this.setElement(t.element), this.setOffset(t.offset !== void 0 ? t.offset : [0, 0]), this.setPositioning(t.positioning || "top-left"), t.position !== void 0 && this.setPosition(t.position); + }, this.mapPostrenderListenerKey = null, this.addChangeListener(Gt.ELEMENT, this.handleElementChanged), this.addChangeListener(Gt.MAP, this.handleMapChanged), this.addChangeListener(Gt.OFFSET, this.handleOffsetChanged), this.addChangeListener(Gt.POSITION, this.handlePositionChanged), this.addChangeListener(Gt.POSITIONING, this.handlePositioningChanged), t.element !== void 0 && this.setElement(t.element), this.setOffset(t.offset !== void 0 ? t.offset : [0, 0]), this.setPositioning(t.positioning || "top-left"), t.position !== void 0 && this.setPosition(t.position); } getElement() { - return this.get(zt.ELEMENT); + return this.get(Gt.ELEMENT); } getId() { return this.id; } getMap() { - return this.get(zt.MAP) || null; + return this.get(Gt.MAP) || null; } getOffset() { - return this.get(zt.OFFSET); + return this.get(Gt.OFFSET); } getPosition() { - return this.get(zt.POSITION); + return this.get(Gt.POSITION); } getPositioning() { - return this.get(zt.POSITIONING); + return this.get(Gt.POSITIONING); } handleElementChanged() { - zu(this.element); + Gu(this.element); const t = this.getElement(); t && this.element.appendChild(t); } handleMapChanged() { - this.mapPostrenderListenerKey && (Ur(this.element), pt(this.mapPostrenderListenerKey), this.mapPostrenderListenerKey = null); + this.mapPostrenderListenerKey && (Hr(this.element), pt(this.mapPostrenderListenerKey), this.mapPostrenderListenerKey = null); const t = this.getMap(); if (t) { this.mapPostrenderListenerKey = et( t, - Qe.POSTRENDER, + $e.POSTRENDER, this.render, this ), this.updatePixelPosition(); @@ -11357,31 +11357,31 @@ class a2 extends Ce { this.updatePixelPosition(); } setElement(t) { - this.set(zt.ELEMENT, t); + this.set(Gt.ELEMENT, t); } setMap(t) { - this.set(zt.MAP, t); + this.set(Gt.MAP, t); } setOffset(t) { - this.set(zt.OFFSET, t); + this.set(Gt.OFFSET, t); } setPosition(t) { - this.set(zt.POSITION, t); + this.set(Gt.POSITION, t); } performAutoPan() { this.autoPan && this.panIntoView(this.autoPan); } panIntoView(t) { const e = this.getMap(); - if (!e || !e.getTargetElement() || !this.get(zt.POSITION)) + if (!e || !e.getTargetElement() || !this.get(Gt.POSITION)) return; const n = this.getRect(e.getTargetElement(), e.getSize()), s = this.getElement(), r = this.getRect(s, [ - B0(s), - z0(s) + X0(s), + G0(s) ]); t = t || {}; const o = t.margin === void 0 ? 20 : t.margin; - if (!xi(n, r)) { + if (!Mi(n, r)) { const a = r[0] - n[0], l = n[2] - r[2], h = r[1] - n[1], c = n[3] - r[3], u = [0, 0]; if (a < 0 ? u[0] = a - o : l < 0 && (u[0] = Math.abs(l) + o), h < 0 ? u[1] = h - o : c < 0 && (u[1] = Math.abs(c) + o), u[0] !== 0 || u[1] !== 0) { const d = e.getView().getCenterInternal(), f = e.getPixelFromCoordinateInternal(d); @@ -11401,7 +11401,7 @@ class a2 extends Ce { return [s, r, s + e[0], r + e[1]]; } setPositioning(t) { - this.set(zt.POSITIONING, t); + this.set(Gt.POSITIONING, t); } setVisible(t) { this.rendered.visible !== t && (this.element.style.display = t ? "" : "none", this.rendered.visible = t); @@ -11428,8 +11428,8 @@ class a2 extends Ce { return this.options; } } -const l2 = a2; -class h2 { +const lm = am; +class hm { constructor(t) { this.highWaterMark = t !== void 0 ? t : 2048, this.count_ = 0, this.entries_ = {}, this.oldest_ = null, this.newest_ = null; } @@ -11453,11 +11453,11 @@ class h2 { } get(t, e) { const n = this.entries_[t]; - return X(n !== void 0, 15), n === this.newest_ || (n === this.oldest_ ? (this.oldest_ = this.oldest_.newer, this.oldest_.older = null) : (n.newer.older = n.older, n.older.newer = n.newer), n.newer = null, n.older = this.newest_, this.newest_.newer = n, this.newest_ = n), n.value_; + return Y(n !== void 0, 15), n === this.newest_ || (n === this.oldest_ ? (this.oldest_ = this.oldest_.newer, this.oldest_.older = null) : (n.newer.older = n.older, n.older.newer = n.newer), n.newer = null, n.older = this.newest_, this.newest_.newer = n, this.newest_ = n), n.value_; } remove(t) { const e = this.entries_[t]; - return X(e !== void 0, 15), e === this.newest_ ? (this.newest_ = e.older, this.newest_ && (this.newest_.newer = null)) : e === this.oldest_ ? (this.oldest_ = e.newer, this.oldest_ && (this.oldest_.older = null)) : (e.newer.older = e.older, e.older.newer = e.newer), delete this.entries_[t], --this.count_, e.value_; + return Y(e !== void 0, 15), e === this.newest_ ? (this.newest_ = e.older, this.newest_ && (this.newest_.newer = null)) : e === this.oldest_ ? (this.oldest_ = e.newer, this.oldest_ && (this.oldest_.older = null)) : (e.newer.older = e.older, e.older.newer = e.newer), delete this.entries_[t], --this.count_, e.value_; } getCount() { return this.count_; @@ -11497,7 +11497,7 @@ class h2 { this.get(t), this.entries_[t].value_ = e; } set(t, e) { - X(!(t in this.entries_), 16); + Y(!(t in this.entries_), 16); const n = { key_: t, newer: null, @@ -11510,30 +11510,30 @@ class h2 { this.highWaterMark = t; } } -const c2 = h2; -function ec(i, t, e, n) { +const cm = hm; +function tc(i, t, e, n) { return n !== void 0 ? (n[0] = i, n[1] = t, n[2] = e, n) : [i, t, e]; } -function So(i, t, e) { +function bo(i, t, e) { return i + "/" + t + "/" + e; } -function Od(i) { - return So(i[0], i[1], i[2]); +function Id(i) { + return bo(i[0], i[1], i[2]); } -function u2(i) { +function um(i) { return i.split("/").map(Number); } -function d2(i) { +function dm(i) { return (i[1] << i[0]) + i[2]; } -function f2(i, t) { +function fm(i, t) { const e = i[0], n = i[1], s = i[2]; if (t.getMinZoom() > e || e > t.getMaxZoom()) return !1; const r = t.getFullTileRange(e); return r ? r.containsXY(n, s) : !0; } -class g2 extends c2 { +class gm extends cm { clear() { for (; this.getCount() > 0; ) this.pop().release(); @@ -11546,16 +11546,16 @@ class g2 extends c2 { pruneExceptNewestZ() { if (this.getCount() === 0) return; - const t = this.peekFirstKey(), n = u2(t)[0]; + const t = this.peekFirstKey(), n = um(t)[0]; this.forEach( function(s) { - s.tileCoord[0] !== n && (this.remove(Od(s.tileCoord)), s.release()); + s.tileCoord[0] !== n && (this.remove(Id(s.tileCoord)), s.release()); }.bind(this) ); } } -const Nd = g2; -class Fd { +const Nd = gm; +class zd { constructor(t, e, n, s) { this.minX = t, this.maxX = e, this.minY = n, this.maxY = s; } @@ -11587,18 +11587,18 @@ class Fd { return this.minX <= t.maxX && this.maxX >= t.minX && this.minY <= t.maxY && this.maxY >= t.minY; } } -function _n(i, t, e, n, s) { - return s !== void 0 ? (s.minX = i, s.maxX = t, s.minY = e, s.maxY = n, s) : new Fd(i, t, e, n); +function vn(i, t, e, n, s) { + return s !== void 0 ? (s.minX = i, s.maxX = t, s.minY = e, s.maxY = n, s) : new zd(i, t, e, n); } -const Dd = Fd, ic = [ +const Fd = zd, ec = [ "fullscreenchange", "webkitfullscreenchange", "MSFullscreenChange" -], nc = { +], ic = { ENTERFULLSCREEN: "enterfullscreen", LEAVEFULLSCREEN: "leavefullscreen" }; -class m2 extends kt { +class mm extends Dt { constructor(t) { t = t || {}, super({ element: document.createElement("div"), @@ -11610,10 +11610,10 @@ class m2 extends kt { this.labelActiveNode_ = typeof n == "string" ? document.createTextNode(n) : n; const s = t.tipLabel ? t.tipLabel : "Toggle full-screen"; this.button_ = document.createElement("button"), this.button_.title = s, this.button_.setAttribute("type", "button"), this.button_.appendChild(this.labelNode_), this.button_.addEventListener( - H.CLICK, + V.CLICK, this.handleClick_.bind(this), !1 - ), this.setClassName_(this.button_, this.isInFullscreen_), this.element.className = `${this.cssClassName_} ${qn} ${vo}`, this.element.appendChild(this.button_); + ), this.setClassName_(this.button_, this.isInFullscreen_), this.element.className = `${this.cssClassName_} ${Kn} ${yo}`, this.element.appendChild(this.button_); } handleClick_(t) { t.preventDefault(), this.handleFullScreen_(); @@ -11623,12 +11623,12 @@ class m2 extends kt { if (!t) return; const e = t.getOwnerDocument(); - if (!!sc(e)) - if (rc(e)) - _2(e); + if (!!nc(e)) + if (sc(e)) + vm(e); else { let n; - this.source_ ? n = typeof this.source_ == "string" ? e.getElementById(this.source_) : this.source_ : n = t.getTargetElement(), this.keys_ ? p2(n) : kd(n); + this.source_ ? n = typeof this.source_ == "string" ? e.getElementById(this.source_) : this.source_ : n = t.getTargetElement(), this.keys_ ? pm(n) : Dd(n); } } handleFullScreenChange_() { @@ -11636,7 +11636,7 @@ class m2 extends kt { if (!t) return; const e = this.isInFullscreen_; - this.isInFullscreen_ = rc(t.getOwnerDocument()), e !== this.isInFullscreen_ && (this.setClassName_(this.button_, this.isInFullscreen_), this.isInFullscreen_ ? (Zr(this.labelActiveNode_, this.labelNode_), this.dispatchEvent(nc.ENTERFULLSCREEN)) : (Zr(this.labelNode_, this.labelActiveNode_), this.dispatchEvent(nc.LEAVEFULLSCREEN)), t.updateSize()); + this.isInFullscreen_ = sc(t.getOwnerDocument()), e !== this.isInFullscreen_ && (this.setClassName_(this.button_, this.isInFullscreen_), this.isInFullscreen_ ? (Gr(this.labelActiveNode_, this.labelNode_), this.dispatchEvent(ic.ENTERFULLSCREEN)) : (Gr(this.labelNode_, this.labelActiveNode_), this.dispatchEvent(ic.LEAVEFULLSCREEN)), t.updateSize()); } setClassName_(t, e) { e ? (t.classList.remove(...this.inactiveClassName_), t.classList.add(...this.activeClassName_)) : (t.classList.remove(...this.activeClassName_), t.classList.add(...this.inactiveClassName_)); @@ -11659,33 +11659,33 @@ class m2 extends kt { const e = this.getMap(); if (e) { const n = e.getOwnerDocument(); - sc(n) ? this.element.classList.remove(xh) : this.element.classList.add(xh); - for (let s = 0, r = ic.length; s < r; ++s) + nc(n) ? this.element.classList.remove(xh) : this.element.classList.add(xh); + for (let s = 0, r = ec.length; s < r; ++s) t.push( - et(n, ic[s], this.handleFullScreenChange_, this) + et(n, ec[s], this.handleFullScreenChange_, this) ); this.handleFullScreenChange_(); } } } -function sc(i) { +function nc(i) { const t = i.body; return !!(t.webkitRequestFullscreen || t.requestFullscreen && i.fullscreenEnabled); } -function rc(i) { +function sc(i) { return !!(i.webkitIsFullScreen || i.fullscreenElement); } -function kd(i) { +function Dd(i) { i.requestFullscreen ? i.requestFullscreen() : i.webkitRequestFullscreen && i.webkitRequestFullscreen(); } -function p2(i) { - i.webkitRequestFullscreen ? i.webkitRequestFullscreen() : kd(i); +function pm(i) { + i.webkitRequestFullscreen ? i.webkitRequestFullscreen() : Dd(i); } -function _2(i) { +function vm(i) { i.exitFullscreen ? i.exitFullscreen() : i.webkitExitFullscreen && i.webkitExitFullscreen(); } -const y2 = m2, ea = "units", v2 = [1, 2, 5], us = 25.4 / 0.28; -class x2 extends kt { +const ym = mm, $o = "units", xm = [1, 2, 5], us = 25.4 / 0.28; +class Mm extends Dt { constructor(t) { t = t || {}; const e = document.createElement("div"); @@ -11695,16 +11695,16 @@ class x2 extends kt { target: t.target }), this.on, this.once, this.un; const n = t.className !== void 0 ? t.className : t.bar ? "ol-scale-bar" : "ol-scale-line"; - this.innerElement_ = document.createElement("div"), this.innerElement_.className = n + "-inner", this.element.className = n + " " + qn, this.element.appendChild(this.innerElement_), this.viewState_ = null, this.minWidth_ = t.minWidth !== void 0 ? t.minWidth : 64, this.maxWidth_ = t.maxWidth, this.renderedVisible_ = !1, this.renderedWidth_ = void 0, this.renderedHTML_ = "", this.addChangeListener(ea, this.handleUnitsChanged_), this.setUnits(t.units || "metric"), this.scaleBar_ = t.bar || !1, this.scaleBarSteps_ = t.steps || 4, this.scaleBarText_ = t.text || !1, this.dpi_ = t.dpi || void 0; + this.innerElement_ = document.createElement("div"), this.innerElement_.className = n + "-inner", this.element.className = n + " " + Kn, this.element.appendChild(this.innerElement_), this.viewState_ = null, this.minWidth_ = t.minWidth !== void 0 ? t.minWidth : 64, this.maxWidth_ = t.maxWidth, this.renderedVisible_ = !1, this.renderedWidth_ = void 0, this.renderedHTML_ = "", this.addChangeListener($o, this.handleUnitsChanged_), this.setUnits(t.units || "metric"), this.scaleBar_ = t.bar || !1, this.scaleBarSteps_ = t.steps || 4, this.scaleBarText_ = t.text || !1, this.dpi_ = t.dpi || void 0; } getUnits() { - return this.get(ea); + return this.get($o); } handleUnitsChanged_() { this.updateElement_(); } setUnits(t) { - this.set(ea, t); + this.set($o, t); } setDpi(t) { this.dpi_ = t; @@ -11725,24 +11725,24 @@ class x2 extends kt { const a = this.minWidth_ * (this.dpi_ || us) / us, l = this.maxWidth_ !== void 0 ? this.maxWidth_ * (this.dpi_ || us) / us : void 0; let h = a * o, c = ""; if (s == "degrees") { - const v = Bn.degrees; - h *= v, h < v / 60 ? (c = "\u2033", o *= 3600) : h < v ? (c = "\u2032", o *= 60) : c = "\xB0"; + const x = Xn.degrees; + h *= x, h < x / 60 ? (c = "\u2033", o *= 3600) : h < x ? (c = "\u2032", o *= 60) : c = "\xB0"; } else - s == "imperial" ? h < 0.9144 ? (c = "in", o /= 0.0254) : h < 1609.344 ? (c = "ft", o /= 0.3048) : (c = "mi", o /= 1609.344) : s == "nautical" ? (o /= 1852, c = "NM") : s == "metric" ? h < 1e-3 ? (c = "\u03BCm", o *= 1e6) : h < 1 ? (c = "mm", o *= 1e3) : h < 1e3 ? c = "m" : (c = "km", o /= 1e3) : s == "us" ? h < 0.9144 ? (c = "in", o *= 39.37) : h < 1609.344 ? (c = "ft", o /= 0.30480061) : (c = "mi", o /= 1609.3472) : X(!1, 33); - let u = 3 * Math.floor(Math.log(a * o) / Math.log(10)), d, f, g, m, p, _; + s == "imperial" ? h < 0.9144 ? (c = "in", o /= 0.0254) : h < 1609.344 ? (c = "ft", o /= 0.3048) : (c = "mi", o /= 1609.344) : s == "nautical" ? (o /= 1852, c = "NM") : s == "metric" ? h < 1e-3 ? (c = "\u03BCm", o *= 1e6) : h < 1 ? (c = "mm", o *= 1e3) : h < 1e3 ? c = "m" : (c = "km", o /= 1e3) : s == "us" ? h < 0.9144 ? (c = "in", o *= 39.37) : h < 1609.344 ? (c = "ft", o /= 0.30480061) : (c = "mi", o /= 1609.3472) : Y(!1, 33); + let u = 3 * Math.floor(Math.log(a * o) / Math.log(10)), d, f, g, m, p, v; for (; ; ) { g = Math.floor(u / 3); - const v = Math.pow(10, g); - if (d = v2[(u % 3 + 3) % 3] * v, f = Math.round(d / o), isNaN(f)) { + const x = Math.pow(10, g); + if (d = xm[(u % 3 + 3) % 3] * x, f = Math.round(d / o), isNaN(f)) { this.element.style.display = "none", this.renderedVisible_ = !1; return; } if (l !== void 0 && f >= l) { - d = m, f = p, g = _; + d = m, f = p, g = v; break; } else if (f >= a) break; - m = d, p = f, _ = g, ++u; + m = d, p = f, v = g, ++u; } const y = this.scaleBar_ ? this.createScaleBar(f, d, c) : d.toFixed(g < 0 ? -g : 0) + " " + c; this.renderedHTML_ != y && (this.innerElement_.innerHTML = y, this.renderedHTML_ = y), this.renderedWidth_ != f && (this.innerElement_.style.width = f + "px", this.renderedWidth_ = f), this.renderedVisible_ || (this.element.style.display = "", this.renderedVisible_ = !0); @@ -11778,21 +11778,21 @@ class x2 extends kt { e ? this.viewState_ = e.viewState : this.viewState_ = null, this.updateElement_(); } } -const C2 = x2, M2 = 0.5, E2 = 10, oc = 0.25; -class w2 { +const Cm = Mm, wm = 0.5, Em = 10, rc = 0.25; +class bm { constructor(t, e, n, s, r, o) { this.sourceProj_ = t, this.targetProj_ = e; let a = {}; const l = Ns(this.targetProj_, this.sourceProj_); this.transformInv_ = function(y) { - const v = y[0] + "/" + y[1]; - return a[v] || (a[v] = l(y)), a[v]; + const x = y[0] + "/" + y[1]; + return a[x] || (a[x] = l(y)), a[x]; }, this.maxSourceExtent_ = s, this.errorThresholdSquared_ = r * r, this.triangles_ = [], this.wrapsXInSource_ = !1, this.canWrapXInSource_ = this.sourceProj_.canWrapX() && !!s && !!this.sourceProj_.getExtent() && mt(s) == mt(this.sourceProj_.getExtent()), this.sourceWorldWidth_ = this.sourceProj_.getExtent() ? mt(this.sourceProj_.getExtent()) : null, this.targetWorldWidth_ = this.targetProj_.getExtent() ? mt(this.targetProj_.getExtent()) : null; - const h = Pi(n), c = _o(n), u = po(n), d = mo(n), f = this.transformInv_(h), g = this.transformInv_(c), m = this.transformInv_(u), p = this.transformInv_(d), _ = E2 + (o ? Math.max( + const h = Ai(n), c = po(n), u = mo(n), d = go(n), f = this.transformInv_(h), g = this.transformInv_(c), m = this.transformInv_(u), p = this.transformInv_(d), v = Em + (o ? Math.max( 0, Math.ceil( Math.log2( - da(n) / (o * o * 256 * 256) + ca(n) / (o * o * 256 * 256) ) ) ) : 0); @@ -11805,39 +11805,39 @@ class w2 { g, m, p, - _ + v ), this.wrapsXInSource_) { let y = 1 / 0; - this.triangles_.forEach(function(v, x, C) { + this.triangles_.forEach(function(x, M, C) { y = Math.min( y, - v.source[0][0], - v.source[1][0], - v.source[2][0] + x.source[0][0], + x.source[1][0], + x.source[2][0] ); }), this.triangles_.forEach( - function(v) { + function(x) { if (Math.max( - v.source[0][0], - v.source[1][0], - v.source[2][0] + x.source[0][0], + x.source[1][0], + x.source[2][0] ) - y > this.sourceWorldWidth_ / 2) { - const x = [ - [v.source[0][0], v.source[0][1]], - [v.source[1][0], v.source[1][1]], - [v.source[2][0], v.source[2][1]] + const M = [ + [x.source[0][0], x.source[0][1]], + [x.source[1][0], x.source[1][1]], + [x.source[2][0], x.source[2][1]] ]; - x[0][0] - y > this.sourceWorldWidth_ / 2 && (x[0][0] -= this.sourceWorldWidth_), x[1][0] - y > this.sourceWorldWidth_ / 2 && (x[1][0] -= this.sourceWorldWidth_), x[2][0] - y > this.sourceWorldWidth_ / 2 && (x[2][0] -= this.sourceWorldWidth_); + M[0][0] - y > this.sourceWorldWidth_ / 2 && (M[0][0] -= this.sourceWorldWidth_), M[1][0] - y > this.sourceWorldWidth_ / 2 && (M[1][0] -= this.sourceWorldWidth_), M[2][0] - y > this.sourceWorldWidth_ / 2 && (M[2][0] -= this.sourceWorldWidth_); const C = Math.min( - x[0][0], - x[1][0], - x[2][0] + M[0][0], + M[1][0], + M[2][0] ); Math.max( - x[0][0], - x[1][0], - x[2][0] - ) - C < this.sourceWorldWidth_ / 2 && (v.source = x); + M[0][0], + M[1][0], + M[2][0] + ) - C < this.sourceWorldWidth_ / 2 && (x.source = M); } }.bind(this) ); @@ -11851,14 +11851,14 @@ class w2 { }); } addQuad_(t, e, n, s, r, o, a, l, h) { - const c = ca([r, o, a, l]), u = this.sourceWorldWidth_ ? mt(c) / this.sourceWorldWidth_ : null, d = this.sourceWorldWidth_, f = this.sourceProj_.canWrapX() && u > 0.5 && u < 1; + const c = la([r, o, a, l]), u = this.sourceWorldWidth_ ? mt(c) / this.sourceWorldWidth_ : null, d = this.sourceWorldWidth_, f = this.sourceProj_.canWrapX() && u > 0.5 && u < 1; let g = !1; if (h > 0) { if (this.targetProj_.isGlobal() && this.targetWorldWidth_) { - const p = ca([t, e, n, s]); - g = mt(p) / this.targetWorldWidth_ > oc || g; + const p = la([t, e, n, s]); + g = mt(p) / this.targetWorldWidth_ > rc || g; } - !f && this.sourceProj_.isGlobal() && u && (g = u > oc || g); + !f && this.sourceProj_.isGlobal() && u && (g = u > rc || g); } if (!g && this.maxSourceExtent_ && isFinite(c[0]) && isFinite(c[1]) && isFinite(c[2]) && isFinite(c[3]) && !ie(c, this.maxSourceExtent_)) return; @@ -11871,15 +11871,15 @@ class w2 { } if (h > 0) { if (!g) { - const p = [(t[0] + n[0]) / 2, (t[1] + n[1]) / 2], _ = this.transformInv_(p); + const p = [(t[0] + n[0]) / 2, (t[1] + n[1]) / 2], v = this.transformInv_(p); let y; - f ? y = (Pn(r[0], d) + Pn(a[0], d)) / 2 - Pn(_[0], d) : y = (r[0] + a[0]) / 2 - _[0]; - const v = (r[1] + a[1]) / 2 - _[1]; - g = y * y + v * v > this.errorThresholdSquared_; + f ? y = (An(r[0], d) + An(a[0], d)) / 2 - An(v[0], d) : y = (r[0] + a[0]) / 2 - v[0]; + const x = (r[1] + a[1]) / 2 - v[1]; + g = y * y + x * x > this.errorThresholdSquared_; } if (g) { if (Math.abs(t[0] - n[0]) <= Math.abs(t[1] - n[1])) { - const p = [(e[0] + n[0]) / 2, (e[1] + n[1]) / 2], _ = this.transformInv_(p), y = [(s[0] + t[0]) / 2, (s[1] + t[1]) / 2], v = this.transformInv_(y); + const p = [(e[0] + n[0]) / 2, (e[1] + n[1]) / 2], v = this.transformInv_(p), y = [(s[0] + t[0]) / 2, (s[1] + t[1]) / 2], x = this.transformInv_(y); this.addQuad_( t, e, @@ -11887,30 +11887,30 @@ class w2 { y, r, o, - _, v, + x, h - 1 ), this.addQuad_( y, p, n, s, + x, v, - _, a, l, h - 1 ); } else { - const p = [(t[0] + e[0]) / 2, (t[1] + e[1]) / 2], _ = this.transformInv_(p), y = [(n[0] + s[0]) / 2, (n[1] + s[1]) / 2], v = this.transformInv_(y); + const p = [(t[0] + e[0]) / 2, (t[1] + e[1]) / 2], v = this.transformInv_(p), y = [(n[0] + s[0]) / 2, (n[1] + s[1]) / 2], x = this.transformInv_(y); this.addQuad_( t, p, y, s, r, - _, v, + x, l, h - 1 ), this.addQuad_( @@ -11918,10 +11918,10 @@ class w2 { e, n, y, - _, + v, o, a, - v, + x, h - 1 ); } @@ -11946,26 +11946,26 @@ class w2 { return this.triangles_; } } -const S2 = w2; -let ia; -const Gd = []; -function ac(i, t, e, n, s) { +const Pm = bm; +let ta; +const jd = []; +function oc(i, t, e, n, s) { i.beginPath(), i.moveTo(0, 0), i.lineTo(t, e), i.lineTo(n, s), i.closePath(), i.save(), i.clip(), i.fillRect(0, 0, Math.max(t, n) + 1, Math.max(e, s)), i.restore(); } -function na(i, t) { +function ea(i, t) { return Math.abs(i[t * 4] - 210) > 2 || Math.abs(i[t * 4 + 3] - 0.75 * 255) > 2; } -function R2() { - if (ia === void 0) { +function Sm() { + if (ta === void 0) { const i = document.createElement("canvas").getContext("2d"); - i.globalCompositeOperation = "lighter", i.fillStyle = "rgba(210, 0, 0, 0.75)", ac(i, 4, 5, 4, 0), ac(i, 4, 5, 0, 5); + i.globalCompositeOperation = "lighter", i.fillStyle = "rgba(210, 0, 0, 0.75)", oc(i, 4, 5, 4, 0), oc(i, 4, 5, 0, 5); const t = i.getImageData(0, 0, 3, 3).data; - ia = na(t, 0) || na(t, 4) || na(t, 8); + ta = ea(t, 0) || ea(t, 4) || ea(t, 8); } - return ia; + return ta; } -function lc(i, t, e, n) { - const s = Yu(e, t, i); +function ac(i, t, e, n) { + const s = Uu(e, t, i); let r = Yr( t, n, @@ -11976,22 +11976,22 @@ function lc(i, t, e, n) { const a = i.getMetersPerUnit(); a !== void 0 && (r /= a); const l = i.getExtent(); - if (!l || go(l, s)) { + if (!l || fo(l, s)) { const h = Yr(i, r, s) / r; isFinite(h) && h > 0 && (r /= h); } return r; } -function b2(i, t, e, n) { - const s = Li(e); - let r = lc( +function _m(i, t, e, n) { + const s = Ri(e); + let r = ac( i, t, s, n ); - return (!isFinite(r) || r <= 0) && Lu(e, function(o) { - return r = lc( + return (!isFinite(r) || r <= 0) && Ru(e, function(o) { + return r = ac( i, t, o, @@ -11999,157 +11999,157 @@ function b2(i, t, e, n) { ), isFinite(r) && r > 0; }), r; } -function L2(i, t, e, n, s, r, o, a, l, h, c, u) { +function Rm(i, t, e, n, s, r, o, a, l, h, c, u) { const d = ge( Math.round(e * i), Math.round(e * t), - Gd + jd ); if (u || (d.imageSmoothingEnabled = !1), l.length === 0) return d.canvas; d.scale(e, e); - function f(x) { - return Math.round(x * e) / e; + function f(M) { + return Math.round(M * e) / e; } d.globalCompositeOperation = "lighter"; const g = fe(); - l.forEach(function(x, C, E) { - Ru(g, x.extent); + l.forEach(function(M, C, E) { + Su(g, M.extent); }); - const m = mt(g), p = Ge(g), _ = ge( + const m = mt(g), p = je(g), v = ge( Math.round(e * m / n), Math.round(e * p / n) ); - u || (_.imageSmoothingEnabled = !1); + u || (v.imageSmoothingEnabled = !1); const y = e / n; - l.forEach(function(x, C, E) { - const w = x.extent[0] - g[0], R = -(x.extent[3] - g[3]), A = mt(x.extent), k = Ge(x.extent); - x.image.width > 0 && x.image.height > 0 && _.drawImage( - x.image, + l.forEach(function(M, C, E) { + const b = M.extent[0] - g[0], S = -(M.extent[3] - g[3]), O = mt(M.extent), D = je(M.extent); + M.image.width > 0 && M.image.height > 0 && v.drawImage( + M.image, h, h, - x.image.width - 2 * h, - x.image.height - 2 * h, - w * y, - R * y, - A * y, - k * y + M.image.width - 2 * h, + M.image.height - 2 * h, + b * y, + S * y, + O * y, + D * y ); }); - const v = Pi(o); - return a.getTriangles().forEach(function(x, C, E) { - const w = x.source, R = x.target; - let A = w[0][0], k = w[0][1], Z = w[1][0], L = w[1][1], G = w[2][0], dt = w[2][1]; - const N = f((R[0][0] - v[0]) / r), D = f( - -(R[0][1] - v[1]) / r - ), I = f((R[1][0] - v[0]) / r), Q = f( - -(R[1][1] - v[1]) / r - ), Ct = f((R[2][0] - v[0]) / r), _t = f( - -(R[2][1] - v[1]) / r - ), Ot = A, b = k; - A = 0, k = 0, Z -= Ot, L -= b, G -= Ot, dt -= b; + const x = Ai(o); + return a.getTriangles().forEach(function(M, C, E) { + const b = M.source, S = M.target; + let O = b[0][0], D = b[0][1], H = b[1][0], R = b[1][1], j = b[2][0], dt = b[2][1]; + const N = f((S[0][0] - x[0]) / r), F = f( + -(S[0][1] - x[1]) / r + ), L = f((S[1][0] - x[0]) / r), $ = f( + -(S[1][1] - x[1]) / r + ), wt = f((S[2][0] - x[0]) / r), vt = f( + -(S[2][1] - x[1]) / r + ), It = O, _ = D; + O = 0, D = 0, H -= It, R -= _, j -= It, dt -= _; const ae = [ - [Z, L, 0, 0, I - N], - [G, dt, 0, 0, Ct - N], - [0, 0, Z, L, Q - D], - [0, 0, G, dt, _t - D] - ], at = S0(ae); + [H, R, 0, 0, L - N], + [j, dt, 0, 0, wt - N], + [0, 0, H, R, $ - F], + [0, 0, j, dt, vt - F] + ], at = P0(ae); if (!!at) { - if (d.save(), d.beginPath(), R2() || !u) { - d.moveTo(I, Q); - const ft = 4, hi = N - I, Ie = D - Q; - for (let $t = 0; $t < ft; $t++) + if (d.save(), d.beginPath(), Sm() || !u) { + d.moveTo(L, $); + const ft = 4, hi = N - L, Le = F - $; + for (let kt = 0; kt < ft; kt++) d.lineTo( - I + f(($t + 1) * hi / ft), - Q + f($t * Ie / (ft - 1)) - ), $t != ft - 1 && d.lineTo( - I + f(($t + 1) * hi / ft), - Q + f(($t + 1) * Ie / (ft - 1)) + L + f((kt + 1) * hi / ft), + $ + f(kt * Le / (ft - 1)) + ), kt != ft - 1 && d.lineTo( + L + f((kt + 1) * hi / ft), + $ + f((kt + 1) * Le / (ft - 1)) ); - d.lineTo(Ct, _t); + d.lineTo(wt, vt); } else - d.moveTo(I, Q), d.lineTo(N, D), d.lineTo(Ct, _t); + d.moveTo(L, $), d.lineTo(N, F), d.lineTo(wt, vt); d.clip(), d.transform( at[0], at[2], at[1], at[3], N, - D + F ), d.translate( - g[0] - Ot, - g[3] - b + g[0] - It, + g[3] - _ ), d.scale( n / e, -n / e - ), d.drawImage(_.canvas, 0, 0), d.restore(); + ), d.drawImage(v.canvas, 0, 0), d.restore(); } - }), c && (d.save(), d.globalCompositeOperation = "source-over", d.strokeStyle = "black", d.lineWidth = 1, a.getTriangles().forEach(function(x, C, E) { - const w = x.target, R = (w[0][0] - v[0]) / r, A = -(w[0][1] - v[1]) / r, k = (w[1][0] - v[0]) / r, Z = -(w[1][1] - v[1]) / r, L = (w[2][0] - v[0]) / r, G = -(w[2][1] - v[1]) / r; - d.beginPath(), d.moveTo(k, Z), d.lineTo(R, A), d.lineTo(L, G), d.closePath(), d.stroke(); + }), c && (d.save(), d.globalCompositeOperation = "source-over", d.strokeStyle = "black", d.lineWidth = 1, a.getTriangles().forEach(function(M, C, E) { + const b = M.target, S = (b[0][0] - x[0]) / r, O = -(b[0][1] - x[1]) / r, D = (b[1][0] - x[0]) / r, H = -(b[1][1] - x[1]) / r, R = (b[2][0] - x[0]) / r, j = -(b[2][1] - x[1]) / r; + d.beginPath(), d.moveTo(D, H), d.lineTo(S, O), d.lineTo(R, j), d.closePath(), d.stroke(); }), d.restore()), d.canvas; } -class T2 extends Ad { +class Tm extends Od { constructor(t, e, n, s, r, o, a, l, h, c, u, d) { - super(r, B.IDLE, { interpolate: !!d }), this.renderEdges_ = u !== void 0 ? u : !1, this.pixelRatio_ = a, this.gutter_ = l, this.canvas_ = null, this.sourceTileGrid_ = e, this.targetTileGrid_ = s, this.wrappedTileCoord_ = o || r, this.sourceTiles_ = [], this.sourcesListenerKeys_ = null, this.sourceZ_ = 0; + super(r, X.IDLE, { interpolate: !!d }), this.renderEdges_ = u !== void 0 ? u : !1, this.pixelRatio_ = a, this.gutter_ = l, this.canvas_ = null, this.sourceTileGrid_ = e, this.targetTileGrid_ = s, this.wrappedTileCoord_ = o || r, this.sourceTiles_ = [], this.sourcesListenerKeys_ = null, this.sourceZ_ = 0; const f = s.getTileCoordExtent( this.wrappedTileCoord_ ), g = this.targetTileGrid_.getExtent(); let m = this.sourceTileGrid_.getExtent(); - const p = g ? vs(f, g) : f; - if (da(p) === 0) { - this.state = B.EMPTY; + const p = g ? xs(f, g) : f; + if (ca(p) === 0) { + this.state = X.EMPTY; return; } - const _ = t.getExtent(); - _ && (m ? m = vs(m, _) : m = _); + const v = t.getExtent(); + v && (m ? m = xs(m, v) : m = v); const y = s.getResolution( this.wrappedTileCoord_[0] - ), v = b2( + ), x = _m( t, n, p, y ); - if (!isFinite(v) || v <= 0) { - this.state = B.EMPTY; + if (!isFinite(x) || x <= 0) { + this.state = X.EMPTY; return; } - const x = c !== void 0 ? c : M2; - if (this.triangulation_ = new S2( + const M = c !== void 0 ? c : wm; + if (this.triangulation_ = new Pm( t, n, p, m, - v * x, + x * M, y ), this.triangulation_.getTriangles().length === 0) { - this.state = B.EMPTY; + this.state = X.EMPTY; return; } - this.sourceZ_ = e.getZForResolution(v); + this.sourceZ_ = e.getZForResolution(x); let C = this.triangulation_.calculateSourceExtent(); - if (m && (t.canWrapX() ? (C[1] = wt( + if (m && (t.canWrapX() ? (C[1] = Pt( C[1], m[1], m[3] - ), C[3] = wt( + ), C[3] = Pt( C[3], m[1], m[3] - )) : C = vs(C, m)), !da(C)) - this.state = B.EMPTY; + )) : C = xs(C, m)), !ca(C)) + this.state = X.EMPTY; else { const E = e.getTileRangeForExtentAndZ( C, this.sourceZ_ ); - for (let w = E.minX; w <= E.maxX; w++) - for (let R = E.minY; R <= E.maxY; R++) { - const A = h(this.sourceZ_, w, R, a); - A && this.sourceTiles_.push(A); + for (let b = E.minX; b <= E.maxX; b++) + for (let S = E.minY; S <= E.maxY; S++) { + const O = h(this.sourceZ_, b, S, a); + O && this.sourceTiles_.push(O); } - this.sourceTiles_.length === 0 && (this.state = B.EMPTY); + this.sourceTiles_.length === 0 && (this.state = X.EMPTY); } } getImage() { @@ -12159,20 +12159,20 @@ class T2 extends Ad { const t = []; if (this.sourceTiles_.forEach( function(e, n, s) { - e && e.getState() == B.LOADED && t.push({ + e && e.getState() == X.LOADED && t.push({ extent: this.sourceTileGrid_.getTileCoordExtent(e.tileCoord), image: e.getImage() }); }.bind(this) ), this.sourceTiles_.length = 0, t.length === 0) - this.state = B.ERROR; + this.state = X.ERROR; else { const e = this.wrappedTileCoord_[0], n = this.targetTileGrid_.getTileSize(e), s = typeof n == "number" ? n : n[0], r = typeof n == "number" ? n : n[1], o = this.targetTileGrid_.getResolution(e), a = this.sourceTileGrid_.getResolution( this.sourceZ_ ), l = this.targetTileGrid_.getTileCoordExtent( this.wrappedTileCoord_ ); - this.canvas_ = L2( + this.canvas_ = Rm( s, r, this.pixelRatio_, @@ -12185,25 +12185,25 @@ class T2 extends Ad { this.gutter_, this.renderEdges_, this.interpolate - ), this.state = B.LOADED; + ), this.state = X.LOADED; } this.changed(); } load() { - if (this.state == B.IDLE) { - this.state = B.LOADING, this.changed(); + if (this.state == X.IDLE) { + this.state = X.LOADING, this.changed(); let t = 0; this.sourcesListenerKeys_ = [], this.sourceTiles_.forEach( function(e, n, s) { const r = e.getState(); - if (r == B.IDLE || r == B.LOADING) { + if (r == X.IDLE || r == X.LOADING) { t++; const o = et( e, - H.CHANGE, + V.CHANGE, function(a) { const l = e.getState(); - (l == B.LOADED || l == B.ERROR || l == B.EMPTY) && (pt(o), t--, t === 0 && (this.unlistenSources_(), this.reproject_())); + (l == X.LOADED || l == X.ERROR || l == X.EMPTY) && (pt(o), t--, t === 0 && (this.unlistenSources_(), this.reproject_())); }, this ); @@ -12211,7 +12211,7 @@ class T2 extends Ad { } }.bind(this) ), t === 0 ? setTimeout(this.reproject_.bind(this), 0) : this.sourceTiles_.forEach(function(e, n, s) { - e.getState() == B.IDLE && e.load(); + e.getState() == X.IDLE && e.load(); }); } } @@ -12219,18 +12219,18 @@ class T2 extends Ad { this.sourcesListenerKeys_.forEach(pt), this.sourcesListenerKeys_ = null; } release() { - this.canvas_ && (Bu(this.canvas_.getContext("2d")), Gd.push(this.canvas_), this.canvas_ = null), super.release(); + this.canvas_ && (Xu(this.canvas_.getContext("2d")), jd.push(this.canvas_), this.canvas_ = null), super.release(); } } -const Ta = T2, sa = { +const _a = Tm, ia = { TILELOADSTART: "tileloadstart", TILELOADEND: "tileloadend", TILELOADERROR: "tileloaderror" -}, I2 = [0, 0, 0], pi = 5; -class A2 { +}, Lm = [0, 0, 0], pi = 5; +class Om { constructor(t) { - this.minZoom = t.minZoom !== void 0 ? t.minZoom : 0, this.resolutions_ = t.resolutions, X( - Jf( + this.minZoom = t.minZoom !== void 0 ? t.minZoom : 0, this.resolutions_ = t.resolutions, Y( + Qf( this.resolutions_, function(s, r) { return r - s; @@ -12249,16 +12249,16 @@ class A2 { break; } } - this.zoomFactor_ = e, this.maxZoom = this.resolutions_.length - 1, this.origin_ = t.origin !== void 0 ? t.origin : null, this.origins_ = null, t.origins !== void 0 && (this.origins_ = t.origins, X(this.origins_.length == this.resolutions_.length, 20)); + this.zoomFactor_ = e, this.maxZoom = this.resolutions_.length - 1, this.origin_ = t.origin !== void 0 ? t.origin : null, this.origins_ = null, t.origins !== void 0 && (this.origins_ = t.origins, Y(this.origins_.length == this.resolutions_.length, 20)); const n = t.extent; - n !== void 0 && !this.origin_ && !this.origins_ && (this.origin_ = Pi(n)), X( + n !== void 0 && !this.origin_ && !this.origins_ && (this.origin_ = Ai(n)), Y( !this.origin_ && this.origins_ || this.origin_ && !this.origins_, 18 - ), this.tileSizes_ = null, t.tileSizes !== void 0 && (this.tileSizes_ = t.tileSizes, X(this.tileSizes_.length == this.resolutions_.length, 19)), this.tileSize_ = t.tileSize !== void 0 ? t.tileSize : this.tileSizes_ ? null : sl, X( + ), this.tileSizes_ = null, t.tileSizes !== void 0 && (this.tileSizes_ = t.tileSizes, Y(this.tileSizes_.length == this.resolutions_.length, 19)), this.tileSize_ = t.tileSize !== void 0 ? t.tileSize : this.tileSizes_ ? null : il, Y( !this.tileSize_ && this.tileSizes_ || this.tileSize_ && !this.tileSizes_, 22 ), this.extent_ = n !== void 0 ? n : null, this.fullTileRanges_ = null, this.tmpSize_ = [0, 0], this.tmpExtent_ = [0, 0, 0, 0], t.sizes !== void 0 ? this.fullTileRanges_ = t.sizes.map(function(s, r) { - const o = new Dd( + const o = new Fd( Math.min(0, s[0]), Math.max(s[0] - 1, -1), Math.min(0, s[1]), @@ -12280,7 +12280,7 @@ class A2 { forEachTileCoordParentTileRange(t, e, n, s) { let r, o, a, l = null, h = t[0] - 1; for (this.zoomFactor_ === 2 ? (o = t[1], a = t[2]) : l = this.getTileCoordExtent(t, s); h >= this.minZoom; ) { - if (this.zoomFactor_ === 2 ? (o = Math.floor(o / 2), a = Math.floor(a / 2), r = _n(o, o, a, a, n)) : r = this.getTileRangeForExtentAndZ( + if (this.zoomFactor_ === 2 ? (o = Math.floor(o / 2), a = Math.floor(a / 2), r = vn(o, o, a, a, n)) : r = this.getTileRangeForExtentAndZ( l, h, n @@ -12312,7 +12312,7 @@ class A2 { if (t[0] < this.maxZoom) { if (this.zoomFactor_ === 2) { const r = t[1] * 2, o = t[2] * 2; - return _n( + return vn( r, r + 1, o, @@ -12337,7 +12337,7 @@ class A2 { return null; const s = t[0], r = t[1], o = t[2]; if (e === s) - return _n( + return vn( r, o, r, @@ -12347,22 +12347,22 @@ class A2 { if (this.zoomFactor_) { const l = Math.pow(this.zoomFactor_, e - s), h = Math.floor(r * l), c = Math.floor(o * l); if (e < s) - return _n(h, h, c, c, n); + return vn(h, h, c, c, n); const u = Math.floor(l * (r + 1)) - 1, d = Math.floor(l * (o + 1)) - 1; - return _n(h, u, c, d, n); + return vn(h, u, c, d, n); } const a = this.getTileCoordExtent(t, this.tmpExtent_); return this.getTileRangeForExtentAndZ(a, e, n); } getTileRangeExtent(t, e, n) { const s = this.getOrigin(t), r = this.getResolution(t), o = ce(this.getTileSize(t), this.tmpSize_), a = s[0] + e.minX * o[0] * r, l = s[0] + (e.maxX + 1) * o[0] * r, h = s[1] + e.minY * o[1] * r, c = s[1] + (e.maxY + 1) * o[1] * r; - return xe(a, h, l, c, n); + return Me(a, h, l, c, n); } getTileRangeForExtentAndZ(t, e, n) { - const s = I2; + const s = Lm; this.getTileCoordForXYAndZ_(t[0], t[3], e, !1, s); const r = s[1], o = s[2]; - return this.getTileCoordForXYAndZ_(t[2], t[1], e, !0, s), _n( + return this.getTileCoordForXYAndZ_(t[2], t[1], e, !0, s), vn( r, s[1], o, @@ -12379,7 +12379,7 @@ class A2 { } getTileCoordExtent(t, e) { const n = this.getOrigin(t[0]), s = this.getResolution(t[0]), r = ce(this.getTileSize(t[0]), this.tmpSize_), o = n[0] + t[1] * r[0] * s, a = n[1] - (t[2] + 1) * r[1] * s, l = o + r[0] * s, h = a + r[1] * s; - return xe(o, a, l, h, e); + return Me(o, a, l, h, e); } getTileCoordForCoordAndResolution(t, e, n) { return this.getTileCoordForXYAndResolution_( @@ -12393,12 +12393,12 @@ class A2 { getTileCoordForXYAndResolution_(t, e, n, s, r) { const o = this.getZForResolution(n), a = n / this.getResolution(o), l = this.getOrigin(o), h = ce(this.getTileSize(o), this.tmpSize_); let c = a * (t - l[0]) / n / h[0], u = a * (l[1] - e) / n / h[1]; - return s ? (c = mr(c, pi) - 1, u = mr(u, pi) - 1) : (c = gr(c, pi), u = gr(u, pi)), ec(o, c, u, r); + return s ? (c = mr(c, pi) - 1, u = mr(u, pi) - 1) : (c = gr(c, pi), u = gr(u, pi)), tc(o, c, u, r); } getTileCoordForXYAndZ_(t, e, n, s, r) { const o = this.getOrigin(n), a = this.getResolution(n), l = ce(this.getTileSize(n), this.tmpSize_); let h = (t - o[0]) / a / l[0], c = (o[1] - e) / a / l[1]; - return s ? (h = mr(h, pi) - 1, c = mr(c, pi) - 1) : (h = gr(h, pi), c = gr(c, pi)), ec(n, h, c, r); + return s ? (h = mr(h, pi) - 1, c = mr(c, pi) - 1) : (h = gr(h, pi), c = gr(c, pi)), tc(n, h, c, r); } getTileCoordForCoordAndZ(t, e, n) { return this.getTileCoordForXYAndZ_( @@ -12419,12 +12419,12 @@ class A2 { return this.fullTileRanges_ ? this.fullTileRanges_[t] : this.extent_ ? this.getTileRangeForExtentAndZ(this.extent_, t) : null; } getZForResolution(t, e) { - const n = Ka( + const n = Ua( this.resolutions_, t, e || 0 ); - return wt(n, this.minZoom, this.maxZoom); + return Pt(n, this.minZoom, this.maxZoom); } tileCoordIntersectsViewport(t, e) { return rd( @@ -12442,14 +12442,14 @@ class A2 { this.fullTileRanges_ = n; } } -const $d = A2; -function Bd(i) { +const kd = Om; +function Xd(i) { let t = i.getDefaultTileGrid(); - return t || (t = F2(i), i.setDefaultTileGrid(t)), t; + return t || (t = zm(i), i.setDefaultTileGrid(t)), t; } -function P2(i, t, e) { - const n = t[0], s = i.getTileCoordCenter(t), r = zd(e); - if (go(r, s)) +function Am(i, t, e) { + const n = t[0], s = i.getTileCoordCenter(t), r = Gd(e); + if (fo(r, s)) return t; { const o = mt(r), a = Math.ceil( @@ -12458,39 +12458,39 @@ function P2(i, t, e) { return s[0] += o * a, i.getTileCoordForCoordAndZ(s, n); } } -function O2(i, t, e, n) { +function Im(i, t, e, n) { n = n !== void 0 ? n : "top-left"; - const s = N2(i, t, e); - return new $d({ + const s = Nm(i, t, e); + return new kd({ extent: i, - origin: v0(i, n), + origin: x0(i, n), resolutions: s, tileSize: e }); } -function N2(i, t, e, n) { - t = t !== void 0 ? t : rg, e = ce(e !== void 0 ? e : sl); - const s = Ge(i), r = mt(i); +function Nm(i, t, e, n) { + t = t !== void 0 ? t : rg, e = ce(e !== void 0 ? e : il); + const s = je(i), r = mt(i); n = n > 0 ? n : Math.max(r / e[0], s / e[1]); const o = t + 1, a = new Array(o); for (let l = 0; l < o; ++l) a[l] = n / Math.pow(2, l); return a; } -function F2(i, t, e, n) { - const s = zd(i); - return O2(s, t, e, n); +function zm(i, t, e, n) { + const s = Gd(i); + return Im(s, t, e, n); } -function zd(i) { - i = q(i); +function Gd(i) { + i = K(i); let t = i.getExtent(); if (!t) { - const e = 180 * Bn.degrees / i.getMetersPerUnit(); - t = xe(-e, -e, e, e); + const e = 180 * Xn.degrees / i.getMetersPerUnit(); + t = Me(-e, -e, e, e); } return t; } -class D2 extends Td { +class Fm extends Td { constructor(t) { super({ attributions: t.attributions, @@ -12520,7 +12520,7 @@ class D2 extends Td { let o = !0, a, l, h; for (let c = n.minX; c <= n.maxX; ++c) for (let u = n.minY; u <= n.maxY; ++u) - l = So(e, c, u), h = !1, r.containsKey(l) && (a = r.get(l), h = a.getState() === B.LOADED, h && (h = s(a) !== !1)), h || (o = !1); + l = bo(e, c, u), h = !1, r.containsKey(l) && (a = r.get(l), h = a.getState() === X.LOADED, h && (h = s(a) !== !1)), h || (o = !1); return o; } getGutterForProjection(t) { @@ -12539,18 +12539,18 @@ class D2 extends Td { return this.tileGrid ? this.tileGrid.getResolutions() : null; } getTile(t, e, n, s, r) { - return V(); + return B(); } getTileGrid() { return this.tileGrid; } getTileGridForProjection(t) { - return this.tileGrid ? this.tileGrid : Bd(t); + return this.tileGrid ? this.tileGrid : Xd(t); } getTileCacheForProjection(t) { const e = this.getProjection(); - return X( - e === null || Ae(e, t), + return Y( + e === null || Oe(e, t), 68 ), this.tileCache; } @@ -12559,12 +12559,12 @@ class D2 extends Td { } getTilePixelSize(t, e, n) { const s = this.getTileGridForProjection(n), r = this.getTilePixelRatio(e), o = ce(s.getTileSize(t), this.tmpSize); - return r == 1 ? o : z1(o, r, this.tmpSize); + return r == 1 ? o : G1(o, r, this.tmpSize); } getTileCoordForTileUrlFunction(t, e) { e = e !== void 0 ? e : this.getProjection(); const n = this.getTileGridForProjection(e); - return this.getWrapX() && e.isGlobal() && (t = P2(n, t, e)), f2(t, n) ? t : null; + return this.getWrapX() && e.isGlobal() && (t = Am(n, t, e)), fm(t, n) ? t : null; } clear() { this.tileCache.clear(); @@ -12579,38 +12579,38 @@ class D2 extends Td { useTile(t, e, n, s) { } } -class k2 extends ze { +class Dm extends Ge { constructor(t, e) { super(t), this.tile = e; } } -const G2 = D2; -function $2(i, t) { +const jm = Fm; +function km(i, t) { const e = /\{z\}/g, n = /\{x\}/g, s = /\{y\}/g, r = /\{-y\}/g; return function(o, a, l) { if (o) return i.replace(e, o[0].toString()).replace(n, o[1].toString()).replace(s, o[2].toString()).replace(r, function() { const h = o[0], c = t.getFullTileRange(h); - return X(c, 55), (c.getHeight() - o[2] - 1).toString(); + return Y(c, 55), (c.getHeight() - o[2] - 1).toString(); }); }; } -function B2(i, t) { +function Xm(i, t) { const e = i.length, n = new Array(e); for (let s = 0; s < e; ++s) - n[s] = $2(i[s], t); - return Ia(n); + n[s] = km(i[s], t); + return Ra(n); } -function Ia(i) { +function Ra(i) { return i.length === 1 ? i[0] : function(t, e, n) { if (t) { - const s = d2(t), r = Pn(s, i.length); + const s = dm(t), r = An(s, i.length); return i[r](t, e, n); } else return; }; } -function Zd(i) { +function Hd(i) { const t = []; let e = /\{([a-z])-([a-z])\}/.exec(i); if (e) { @@ -12628,7 +12628,7 @@ function Zd(i) { } return t.push(i), t; } -class Il extends G2 { +class Rl extends jm { constructor(t) { super({ attributions: t.attributions, @@ -12644,7 +12644,7 @@ class Il extends G2 { key: t.key, attributionsCollapsible: t.attributionsCollapsible, zDirection: t.zDirection - }), this.generateTileUrlFunction_ = this.tileUrlFunction === Il.prototype.tileUrlFunction, this.tileLoadFunction = t.tileLoadFunction, t.tileUrlFunction && (this.tileUrlFunction = t.tileUrlFunction), this.urls = null, t.urls ? this.setUrls(t.urls) : t.url && this.setUrl(t.url), this.tileLoadingKeys_ = {}; + }), this.generateTileUrlFunction_ = this.tileUrlFunction === Rl.prototype.tileUrlFunction, this.tileLoadFunction = t.tileLoadFunction, t.tileUrlFunction && (this.tileUrlFunction = t.tileUrlFunction), this.urls = null, t.urls ? this.setUrls(t.urls) : t.url && this.setUrl(t.url), this.tileLoadingKeys_ = {}; } getTileLoadFunction() { return this.tileLoadFunction; @@ -12658,7 +12658,7 @@ class Il extends G2 { handleTileChange(t) { const e = t.target, n = rt(e), s = e.getState(); let r; - s == B.LOADING ? (this.tileLoadingKeys_[n] = !0, r = sa.TILELOADSTART) : n in this.tileLoadingKeys_ && (delete this.tileLoadingKeys_[n], r = s == B.ERROR ? sa.TILELOADERROR : s == B.LOADED ? sa.TILELOADEND : void 0), r != null && this.dispatchEvent(new k2(r, e)); + s == X.LOADING ? (this.tileLoadingKeys_[n] = !0, r = ia.TILELOADSTART) : n in this.tileLoadingKeys_ && (delete this.tileLoadingKeys_[n], r = s == X.ERROR ? ia.TILELOADERROR : s == X.LOADED ? ia.TILELOADEND : void 0), r != null && this.dispatchEvent(new Dm(r, e)); } setTileLoadFunction(t) { this.tileCache.clear(), this.tileLoadFunction = t, this.changed(); @@ -12667,24 +12667,24 @@ class Il extends G2 { this.tileUrlFunction = t, this.tileCache.pruneExceptNewestZ(), typeof e < "u" ? this.setKey(e) : this.changed(); } setUrl(t) { - const e = Zd(t); + const e = Hd(t); this.urls = e, this.setUrls(e); } setUrls(t) { this.urls = t; const e = t.join(` `); - this.generateTileUrlFunction_ ? this.setTileUrlFunction(B2(t, this.tileGrid), e) : this.setKey(e); + this.generateTileUrlFunction_ ? this.setTileUrlFunction(Xm(t, this.tileGrid), e) : this.setKey(e); } tileUrlFunction(t, e, n) { } useTile(t, e, n) { - const s = So(t, e, n); + const s = bo(t, e, n); this.tileCache.containsKey(s) && this.tileCache.get(s); } } -const z2 = Il; -class Z2 extends z2 { +const Gm = Rl; +class Hm extends Gm { constructor(t) { super({ attributions: t.attributions, @@ -12693,7 +12693,7 @@ class Z2 extends z2 { projection: t.projection, state: t.state, tileGrid: t.tileGrid, - tileLoadFunction: t.tileLoadFunction ? t.tileLoadFunction : U2, + tileLoadFunction: t.tileLoadFunction ? t.tileLoadFunction : Zm, tilePixelRatio: t.tilePixelRatio, tileUrlFunction: t.tileUrlFunction, url: t.url, @@ -12704,7 +12704,7 @@ class Z2 extends z2 { key: t.key, attributionsCollapsible: t.attributionsCollapsible, zDirection: t.zDirection - }), this.crossOrigin = t.crossOrigin !== void 0 ? t.crossOrigin : null, this.tileClass = t.tileClass !== void 0 ? t.tileClass : Pd, this.tileCacheForProjection = {}, this.tileGridForProjection = {}, this.reprojectionErrorThreshold_ = t.reprojectionErrorThreshold, this.renderReprojectionEdges_ = !1; + }), this.crossOrigin = t.crossOrigin !== void 0 ? t.crossOrigin : null, this.tileClass = t.tileClass !== void 0 ? t.tileClass : Ad, this.tileCacheForProjection = {}, this.tileGridForProjection = {}, this.reprojectionErrorThreshold_ = t.reprojectionErrorThreshold, this.renderReprojectionEdges_ = !1; } canExpireCache() { if (this.tileCache.canExpireCache()) @@ -12725,7 +12725,7 @@ class Z2 extends z2 { } } getGutterForProjection(t) { - return this.getProjection() && t && !Ae(this.getProjection(), t) ? 0 : this.getGutter(); + return this.getProjection() && t && !Oe(this.getProjection(), t) ? 0 : this.getGutter(); } getGutter() { return 0; @@ -12735,20 +12735,20 @@ class Z2 extends z2 { return this.getInterpolate() || (t += ":disable-interpolation"), t; } getOpaque(t) { - return this.getProjection() && t && !Ae(this.getProjection(), t) ? !1 : super.getOpaque(t); + return this.getProjection() && t && !Oe(this.getProjection(), t) ? !1 : super.getOpaque(t); } getTileGridForProjection(t) { const e = this.getProjection(); - if (this.tileGrid && (!e || Ae(e, t))) + if (this.tileGrid && (!e || Oe(e, t))) return this.tileGrid; { const n = rt(t); - return n in this.tileGridForProjection || (this.tileGridForProjection[n] = Bd(t)), this.tileGridForProjection[n]; + return n in this.tileGridForProjection || (this.tileGridForProjection[n] = Xd(t)), this.tileGridForProjection[n]; } } getTileCacheForProjection(t) { const e = this.getProjection(); - if (!e || Ae(e, t)) + if (!e || Oe(e, t)) return this.tileCache; { const n = rt(t); @@ -12763,17 +12763,17 @@ class Z2 extends z2 { r ), h = l ? this.tileUrlFunction(l, s, r) : void 0, c = new this.tileClass( a, - h !== void 0 ? B.IDLE : B.EMPTY, + h !== void 0 ? X.IDLE : X.EMPTY, h !== void 0 ? h : "", this.crossOrigin, this.tileLoadFunction, this.tileOptions ); - return c.key = o, c.addEventListener(H.CHANGE, this.handleTileChange.bind(this)), c; + return c.key = o, c.addEventListener(V.CHANGE, this.handleTileChange.bind(this)), c; } getTile(t, e, n, s, r) { const o = this.getProjection(); - if (!o || !r || Ae(o, r)) + if (!o || !r || Oe(o, r)) return this.getTileInternal( t, e, @@ -12784,7 +12784,7 @@ class Z2 extends z2 { { const a = this.getTileCacheForProjection(r), l = [t, e, n]; let h; - const c = Od(l); + const c = Id(l); a.containsKey(c) && (h = a.get(c)); const u = this.getKey(); if (h && h.key == u) @@ -12793,7 +12793,7 @@ class Z2 extends z2 { const d = this.getTileGridForProjection(o), f = this.getTileGridForProjection(r), g = this.getTileCoordForTileUrlFunction( l, r - ), m = new Ta( + ), m = new _a( o, d, r, @@ -12802,8 +12802,8 @@ class Z2 extends z2 { g, this.getTilePixelRatio(s), this.getGutter(), - function(p, _, y, v) { - return this.getTileInternal(p, _, y, v, o); + function(p, v, y, x) { + return this.getTileInternal(p, v, y, x, o); }.bind(this), this.reprojectionErrorThreshold_, this.renderReprojectionEdges_, @@ -12815,12 +12815,12 @@ class Z2 extends z2 { } getTileInternal(t, e, n, s, r) { let o = null; - const a = So(t, e, n), l = this.getKey(); + const a = bo(t, e, n), l = this.getKey(); if (!this.tileCache.containsKey(a)) o = this.createTile_(t, e, n, s, r, l), this.tileCache.set(a, o); else if (o = this.tileCache.get(a), o.key != l) { const h = o; - o = this.createTile_(t, e, n, s, r, l), h.getState() == B.IDLE ? o.interimTile = h.interimTile : o.interimTile = h, o.refreshInterimChain(), this.tileCache.replace(a, o); + o = this.createTile_(t, e, n, s, r, l), h.getState() == X.IDLE ? o.interimTile = h.interimTile : o.interimTile = h, o.refreshInterimChain(), this.tileCache.replace(a, o); } return o; } @@ -12833,7 +12833,7 @@ class Z2 extends z2 { } } setTileGridForProjection(t, e) { - const n = q(t); + const n = K(t); if (n) { const s = rt(n); s in this.tileGridForProjection || (this.tileGridForProjection[s] = e); @@ -12845,18 +12845,18 @@ class Z2 extends z2 { this.tileCacheForProjection[t].clear(); } } -function U2(i, t) { +function Zm(i, t) { i.getImage().src = t; } -const V2 = Z2; -class W2 extends Qn { +const Bm = Hm; +class Wm extends $n { constructor(t) { super({ attributions: t.attributions, wrapX: t.wrapX }), this.resolution = void 0, this.distance = t.distance !== void 0 ? t.distance : 20, this.minDistance = t.minDistance || 0, this.interpolationRatio = 0, this.features = [], this.geometryFunction = t.geometryFunction || function(e) { const n = e.getGeometry(); - return X(n.getType() == "Point", 10), n; + return Y(n.getType() == "Point", 10), n; }, this.createCustomCluster_ = t.createCluster, this.source = null, this.boundRefresh_ = this.refresh.bind(this), this.updateDistance(this.distance, this.minDistance), this.setSource(t.source || null); } clear(t) { @@ -12881,7 +12881,7 @@ class W2 extends Qn { return this.minDistance; } setSource(t) { - this.source && this.source.removeEventListener(H.CHANGE, this.boundRefresh_), this.source = t, t && t.addEventListener(H.CHANGE, this.boundRefresh_), this.refresh(); + this.source && this.source.removeEventListener(V.CHANGE, this.boundRefresh_), this.source = t, t && t.addEventListener(V.CHANGE, this.boundRefresh_), this.refresh(); } refresh() { this.clear(), this.cluster(), this.addFeatures(this.features); @@ -12900,7 +12900,7 @@ class W2 extends Qn { const l = this.geometryFunction(a); if (l) { const h = l.getCoordinates(); - wu(h, t), fo(t, e, t); + bu(h, t), uo(t, e, t); const c = this.source.getFeaturesInExtent(t).filter(function(u) { const d = rt(u); return d in s ? !1 : (s[d] = !0, !0); @@ -12916,8 +12916,8 @@ class W2 extends Qn { const l = this.geometryFunction(t[a]); l ? Nu(n, l.getCoordinates()) : t.splice(a, 1); } - Fu(n, 1 / t.length); - const s = Li(e), r = this.interpolationRatio, o = new oi([ + zu(n, 1 / t.length); + const s = Ri(e), r = this.interpolationRatio, o = new oi([ n[0] * (1 - r) + s[0] * r, n[1] * (1 - r) + s[1] * r ]); @@ -12927,8 +12927,8 @@ class W2 extends Qn { }); } } -const H2 = W2; -function hc(i, t) { +const Vm = Wm; +function lc(i, t) { const e = []; Object.keys(t).forEach(function(s) { t[s] !== null && t[s] !== void 0 && e.push(s + "=" + encodeURIComponent(t[s])); @@ -12940,7 +12940,7 @@ const Er = { PRELOAD: "preload", USE_INTERIM_TILES_ON_ERROR: "useInterimTilesOnError" }; -class X2 extends yo { +class Ym extends vo { constructor(t) { t = t || {}; const e = Object.assign({}, t); @@ -12964,29 +12964,29 @@ class X2 extends yo { return super.getData(t); } } -const Y2 = X2; -class j2 extends wd { +const Um = Ym; +class Jm extends bd { constructor(t) { - super(t), this.extentChanged = !0, this.renderedExtent_ = null, this.renderedPixelRatio, this.renderedProjection = null, this.renderedRevision, this.renderedTiles = [], this.newTiles_ = !1, this.tmpExtent = fe(), this.tmpTileRange_ = new Dd(0, 0, 0, 0); + super(t), this.extentChanged = !0, this.renderedExtent_ = null, this.renderedPixelRatio, this.renderedProjection = null, this.renderedRevision, this.renderedTiles = [], this.newTiles_ = !1, this.tmpExtent = fe(), this.tmpTileRange_ = new Fd(0, 0, 0, 0); } isDrawableTile(t) { const e = this.getLayer(), n = t.getState(), s = e.getUseInterimTilesOnError(); - return n == B.LOADED || n == B.EMPTY || n == B.ERROR && !s; + return n == X.LOADED || n == X.EMPTY || n == X.ERROR && !s; } getTile(t, e, n, s) { const r = s.pixelRatio, o = s.viewState.projection, a = this.getLayer(); let h = a.getSource().getTile(t, e, n, r, o); - return h.getState() == B.ERROR && a.getUseInterimTilesOnError() && a.getPreload() > 0 && (this.newTiles_ = !0), this.isDrawableTile(h) || (h = h.getInterimTile()), h; + return h.getState() == X.ERROR && a.getUseInterimTilesOnError() && a.getPreload() > 0 && (this.newTiles_ = !0), this.isDrawableTile(h) || (h = h.getInterimTile()), h; } getData(t) { const e = this.frameState; if (!e) return null; - const n = this.getLayer(), s = Dt( + const n = this.getLayer(), s = Ft( e.pixelToCoordinateTransform, t.slice() ), r = n.getExtent(); - if (r && !go(r, s)) + if (r && !fo(r, s)) return null; const o = e.pixelRatio, a = e.viewState.projection, l = e.viewState, h = n.getRenderSource(), c = h.getTileGridForProjection(l.projection), u = h.getTilePixelRatio(e.pixelRatio); for (let d = c.getZForResolution(l.resolution); d >= c.getMinZoom(); --d) { @@ -12997,18 +12997,18 @@ class j2 extends wd { o, a ); - if (!(g instanceof Pd || g instanceof Ta) || g instanceof Ta && g.getState() === B.EMPTY) + if (!(g instanceof Ad || g instanceof _a) || g instanceof _a && g.getState() === X.EMPTY) return null; - if (g.getState() !== B.LOADED) + if (g.getState() !== X.LOADED) continue; - const m = c.getOrigin(d), p = ce(c.getTileSize(d)), _ = c.getResolution(d), y = Math.floor( - u * ((s[0] - m[0]) / _ - f[1] * p[0]) - ), v = Math.floor( - u * ((m[1] - s[1]) / _ - f[2] * p[1]) - ), x = Math.round( + const m = c.getOrigin(d), p = ce(c.getTileSize(d)), v = c.getResolution(d), y = Math.floor( + u * ((s[0] - m[0]) / v - f[1] * p[0]) + ), x = Math.floor( + u * ((m[1] - s[1]) / v - f[2] * p[1]) + ), M = Math.round( u * h.getGutterForProjection(l.projection) ); - return this.getImageData(g.getImage(), y + x, v + x); + return this.getImageData(g.getImage(), y + M, x + M); } return null; } @@ -13021,128 +13021,128 @@ class j2 extends wd { renderFrame(t, e) { const n = t.layerStatesArray[t.layerIndex], s = t.viewState, r = s.projection, o = s.resolution, a = s.center, l = s.rotation, h = t.pixelRatio, c = this.getLayer(), u = c.getSource(), d = u.getRevision(), f = u.getTileGridForProjection(r), g = f.getZForResolution(o, u.zDirection), m = f.getResolution(g); let p = t.extent; - const _ = t.viewState.resolution, y = u.getTilePixelRatio(h), v = Math.round(mt(p) / _ * h), x = Math.round(Ge(p) / _ * h), C = n.extent && Bi(n.extent); - C && (p = vs( + const v = t.viewState.resolution, y = u.getTilePixelRatio(h), x = Math.round(mt(p) / v * h), M = Math.round(je(p) / v * h), C = n.extent && Xi(n.extent); + C && (p = xs( p, - Bi(n.extent) + Xi(n.extent) )); - const E = m * v / 2 / y, w = m * x / 2 / y, R = [ + const E = m * x / 2 / y, b = m * M / 2 / y, S = [ a[0] - E, - a[1] - w, + a[1] - b, a[0] + E, - a[1] + w - ], A = f.getTileRangeForExtentAndZ(p, g), k = {}; - k[g] = {}; - const Z = this.createLoadedTileFinder( + a[1] + b + ], O = f.getTileRangeForExtentAndZ(p, g), D = {}; + D[g] = {}; + const H = this.createLoadedTileFinder( u, r, - k - ), L = this.tmpExtent, G = this.tmpTileRange_; + D + ), R = this.tmpExtent, j = this.tmpTileRange_; this.newTiles_ = !1; - const dt = l ? ga( + const dt = l ? da( s.center, - _, + v, l, t.size ) : void 0; - for (let ae = A.minX; ae <= A.maxX; ++ae) - for (let at = A.minY; at <= A.maxY; ++at) { + for (let ae = O.minX; ae <= O.maxX; ++ae) + for (let at = O.minY; at <= O.maxY; ++at) { if (l && !f.tileCoordIntersectsViewport([g, ae, at], dt)) continue; const ft = this.getTile(g, ae, at, t); if (this.isDrawableTile(ft)) { - const $t = rt(this); - if (ft.getState() == B.LOADED) { - k[g][ft.tileCoord.toString()] = ft; - let Ve = ft.inTransition($t); - Ve && n.opacity !== 1 && (ft.endTransition($t), Ve = !1), !this.newTiles_ && (Ve || !this.renderedTiles.includes(ft)) && (this.newTiles_ = !0); + const kt = rt(this); + if (ft.getState() == X.LOADED) { + D[g][ft.tileCoord.toString()] = ft; + let Be = ft.inTransition(kt); + Be && n.opacity !== 1 && (ft.endTransition(kt), Be = !1), !this.newTiles_ && (Be || !this.renderedTiles.includes(ft)) && (this.newTiles_ = !0); } - if (ft.getAlpha($t, t.time) === 1) + if (ft.getAlpha(kt, t.time) === 1) continue; } const hi = f.getTileCoordChildTileRange( ft.tileCoord, - G, - L + j, + R ); - let Ie = !1; - hi && (Ie = Z(g + 1, hi)), Ie || f.forEachTileCoordParentTileRange( + let Le = !1; + hi && (Le = H(g + 1, hi)), Le || f.forEachTileCoordParentTileRange( ft.tileCoord, - Z, - G, - L + H, + j, + R ); } const N = m / o * h / y; - bi( + _i( this.pixelTransform, t.size[0] / 2, t.size[1] / 2, 1 / h, 1 / h, l, - -v / 2, - -x / 2 + -x / 2, + -M / 2 ); - const D = Mu(this.pixelTransform); - this.useContainer(e, D, this.getBackground(t)); - const I = this.context, Q = I.canvas; - Ja(this.inversePixelTransform, this.pixelTransform), bi( + const F = wu(this.pixelTransform); + this.useContainer(e, F, this.getBackground(t)); + const L = this.context, $ = L.canvas; + qa(this.inversePixelTransform, this.pixelTransform), _i( this.tempTransform, - v / 2, x / 2, + M / 2, N, N, 0, - -v / 2, - -x / 2 - ), Q.width != v || Q.height != x ? (Q.width = v, Q.height = x) : this.containerReused || I.clearRect(0, 0, v, x), C && this.clipUnrotated(I, t, C), u.getInterpolate() || (I.imageSmoothingEnabled = !1), this.preRender(I, t), this.renderedTiles.length = 0; - let Ct = Object.keys(k).map(Number); - Ct.sort(Ki); - let _t, Ot, b; - n.opacity === 1 && (!this.containerReused || u.getOpaque(t.viewState.projection)) ? Ct = Ct.reverse() : (_t = [], Ot = []); - for (let ae = Ct.length - 1; ae >= 0; --ae) { - const at = Ct[ae], ft = u.getTilePixelSize( + -x / 2, + -M / 2 + ), $.width != x || $.height != M ? ($.width = x, $.height = M) : this.containerReused || L.clearRect(0, 0, x, M), C && this.clipUnrotated(L, t, C), u.getInterpolate() || (L.imageSmoothingEnabled = !1), this.preRender(L, t), this.renderedTiles.length = 0; + let wt = Object.keys(D).map(Number); + wt.sort(qi); + let vt, It, _; + n.opacity === 1 && (!this.containerReused || u.getOpaque(t.viewState.projection)) ? wt = wt.reverse() : (vt = [], It = []); + for (let ae = wt.length - 1; ae >= 0; --ae) { + const at = wt[ae], ft = u.getTilePixelSize( at, h, r - ), Ie = f.getResolution(at) / m, $t = ft[0] * Ie * N, Ve = ft[1] * Ie * N, ln = f.getTileCoordForCoordAndZ( - Pi(R), + ), Le = f.getResolution(at) / m, kt = ft[0] * Le * N, Be = ft[1] * Le * N, ln = f.getTileCoordForCoordAndZ( + Ai(S), at - ), rr = f.getTileCoordExtent(ln), hn = Dt(this.tempTransform, [ - y * (rr[0] - R[0]) / m, - y * (R[3] - rr[3]) / m - ]), or = y * u.getGutterForProjection(r), ci = k[at]; + ), rr = f.getTileCoordExtent(ln), hn = Ft(this.tempTransform, [ + y * (rr[0] - S[0]) / m, + y * (S[3] - rr[3]) / m + ]), or = y * u.getGutterForProjection(r), ci = D[at]; for (const ss in ci) { - const ui = ci[ss], ar = ui.tileCoord, lr = ln[1] - ar[1], hr = Math.round(hn[0] - (lr - 1) * $t), cn = ln[2] - ar[2], No = Math.round(hn[1] - (cn - 1) * Ve), Jt = Math.round(hn[0] - lr * $t), me = Math.round(hn[1] - cn * Ve), Me = hr - Jt, We = No - me, un = g === at, Ni = un && ui.getAlpha(rt(this), t.time) !== 1; + const ui = ci[ss], ar = ui.tileCoord, lr = ln[1] - ar[1], hr = Math.round(hn[0] - (lr - 1) * kt), cn = ln[2] - ar[2], Io = Math.round(hn[1] - (cn - 1) * Be), Qt = Math.round(hn[0] - lr * kt), me = Math.round(hn[1] - cn * Be), we = hr - Qt, We = Io - me, un = g === at, Ni = un && ui.getAlpha(rt(this), t.time) !== 1; let di = !1; if (!Ni) - if (_t) { - b = [Jt, me, Jt + Me, me, Jt + Me, me + We, Jt, me + We]; - for (let dn = 0, cr = _t.length; dn < cr; ++dn) - if (g !== at && at < Ot[dn]) { - const Ht = _t[dn]; + if (vt) { + _ = [Qt, me, Qt + we, me, Qt + we, me + We, Qt, me + We]; + for (let dn = 0, cr = vt.length; dn < cr; ++dn) + if (g !== at && at < It[dn]) { + const Vt = vt[dn]; ie( - [Jt, me, Jt + Me, me + We], - [Ht[0], Ht[3], Ht[4], Ht[7]] - ) && (di || (I.save(), di = !0), I.beginPath(), I.moveTo(b[0], b[1]), I.lineTo(b[2], b[3]), I.lineTo(b[4], b[5]), I.lineTo(b[6], b[7]), I.moveTo(Ht[6], Ht[7]), I.lineTo(Ht[4], Ht[5]), I.lineTo(Ht[2], Ht[3]), I.lineTo(Ht[0], Ht[1]), I.clip()); + [Qt, me, Qt + we, me + We], + [Vt[0], Vt[3], Vt[4], Vt[7]] + ) && (di || (L.save(), di = !0), L.beginPath(), L.moveTo(_[0], _[1]), L.lineTo(_[2], _[3]), L.lineTo(_[4], _[5]), L.lineTo(_[6], _[7]), L.moveTo(Vt[6], Vt[7]), L.lineTo(Vt[4], Vt[5]), L.lineTo(Vt[2], Vt[3]), L.lineTo(Vt[0], Vt[1]), L.clip()); } - _t.push(b), Ot.push(at); + vt.push(_), It.push(at); } else - I.clearRect(Jt, me, Me, We); + L.clearRect(Qt, me, we, We); this.drawTileImage( ui, t, - Jt, + Qt, me, - Me, + we, We, or, un - ), _t && !Ni ? (di && I.restore(), this.renderedTiles.unshift(ui)) : this.renderedTiles.push(ui), this.updateUsedTiles(t.usedTiles, u, ui); + ), vt && !Ni ? (di && L.restore(), this.renderedTiles.unshift(ui)) : this.renderedTiles.push(ui), this.updateUsedTiles(t.usedTiles, u, ui); } } - return this.renderedRevision = d, this.renderedResolution = m, this.extentChanged = !this.renderedExtent_ || !bs(this.renderedExtent_, R), this.renderedExtent_ = R, this.renderedPixelRatio = h, this.renderedProjection = r, this.manageTilePyramid( + return this.renderedRevision = d, this.renderedResolution = m, this.extentChanged = !this.renderedExtent_ || !_s(this.renderedExtent_, S), this.renderedExtent_ = S, this.renderedPixelRatio = h, this.renderedProjection = r, this.manageTilePyramid( t, u, f, @@ -13151,7 +13151,7 @@ class j2 extends wd { p, g, c.getPreload() - ), this.scheduleExpireCache(t, u), this.postRender(I, t), n.extent && I.restore(), I.imageSmoothingEnabled = !0, D !== Q.style.transform && (Q.style.transform = D), this.container; + ), this.scheduleExpireCache(t, u), this.postRender(L, t), n.extent && L.restore(), L.imageSmoothingEnabled = !0, F !== $.style.transform && ($.style.transform = F), this.container; } drawTileImage(t, e, n, s, r, o, a, l) { const h = this.getTileImage(t); @@ -13198,36 +13198,36 @@ class j2 extends wd { manageTilePyramid(t, e, n, s, r, o, a, l, h) { const c = rt(e); c in t.wantedTiles || (t.wantedTiles[c] = {}); - const u = t.wantedTiles[c], d = t.tileQueue, f = n.getMinZoom(), g = t.viewState.rotation, m = g ? ga( + const u = t.wantedTiles[c], d = t.tileQueue, f = n.getMinZoom(), g = t.viewState.rotation, m = g ? da( t.viewState.center, t.viewState.resolution, g, t.size ) : void 0; - let p = 0, _, y, v, x, C, E; + let p = 0, v, y, x, M, C, E; for (E = f; E <= a; ++E) - for (y = n.getTileRangeForExtentAndZ(o, E, y), v = n.getResolution(E), x = y.minX; x <= y.maxX; ++x) + for (y = n.getTileRangeForExtentAndZ(o, E, y), x = n.getResolution(E), M = y.minX; M <= y.maxX; ++M) for (C = y.minY; C <= y.maxY; ++C) - g && !n.tileCoordIntersectsViewport([E, x, C], m) || (a - E <= l ? (++p, _ = e.getTile(E, x, C, s, r), _.getState() == B.IDLE && (u[_.getKey()] = !0, d.isKeyQueued(_.getKey()) || d.enqueue([ - _, + g && !n.tileCoordIntersectsViewport([E, M, C], m) || (a - E <= l ? (++p, v = e.getTile(E, M, C, s, r), v.getState() == X.IDLE && (u[v.getKey()] = !0, d.isKeyQueued(v.getKey()) || d.enqueue([ + v, c, - n.getTileCoordCenter(_.tileCoord), - v - ])), h !== void 0 && h(_)) : e.useTile(E, x, C, r)); + n.getTileCoordCenter(v.tileCoord), + x + ])), h !== void 0 && h(v)) : e.useTile(E, M, C, r)); e.updateCacheSize(p, r); } } -const K2 = j2; -class q2 extends Y2 { +const qm = Jm; +class Km extends Um { constructor(t) { super(t); } createRenderer() { - return new K2(this); + return new qm(this); } } -const J2 = q2; -class Q2 extends $d { +const Qm = Km; +class $m extends kd { constructor(t) { super({ extent: t.extent, @@ -13249,24 +13249,24 @@ class Q2 extends $d { function tp(i, t, e) { const n = [], s = [], r = [], o = [], a = []; e = e !== void 0 ? e : []; - const l = "SupportedCRS", h = "TileMatrix", c = "Identifier", u = "ScaleDenominator", d = "TopLeftCorner", f = "TileWidth", g = "TileHeight", m = i[l], p = q(m), _ = p.getMetersPerUnit(), y = p.getAxisOrientation().substr(0, 2) == "ne"; - return i[h].sort(function(v, x) { - return x[u] - v[u]; - }), i[h].forEach(function(v) { - let x; - if (e.length > 0 ? x = e.find(function(C) { - return v[c] == C[h] ? !0 : v[c].includes(":") ? !1 : i[c] + ":" + v[c] === C[h]; - }) : x = !0, x) { - s.push(v[c]); - const C = v[u] * 28e-5 / _, E = v[f], w = v[g]; + const l = "SupportedCRS", h = "TileMatrix", c = "Identifier", u = "ScaleDenominator", d = "TopLeftCorner", f = "TileWidth", g = "TileHeight", m = i[l], p = K(m), v = p.getMetersPerUnit(), y = p.getAxisOrientation().substr(0, 2) == "ne"; + return i[h].sort(function(x, M) { + return M[u] - x[u]; + }), i[h].forEach(function(x) { + let M; + if (e.length > 0 ? M = e.find(function(C) { + return x[c] == C[h] ? !0 : x[c].includes(":") ? !1 : i[c] + ":" + x[c] === C[h]; + }) : M = !0, M) { + s.push(x[c]); + const C = x[u] * 28e-5 / v, E = x[f], b = x[g]; y ? r.push([ - v[d][1], - v[d][0] - ]) : r.push(v[d]), n.push(C), o.push( - E == w ? E : [E, w] - ), a.push([v.MatrixWidth, v.MatrixHeight]); + x[d][1], + x[d][0] + ]) : r.push(x[d]), n.push(C), o.push( + E == b ? E : [E, b] + ), a.push([x.MatrixWidth, x.MatrixHeight]); } - }), new Q2({ + }), new $m({ extent: t, origins: r, resolutions: n, @@ -13275,11 +13275,11 @@ function tp(i, t, e) { sizes: a }); } -class ep extends V2 { +class ep extends Bm { constructor(t) { const e = t.requestEncoding !== void 0 ? t.requestEncoding : "KVP", n = t.tileGrid; let s = t.urls; - s === void 0 && t.url !== void 0 && (s = Zd(t.url)), super({ + s === void 0 && t.url !== void 0 && (s = Hd(t.url)), super({ attributions: t.attributions, attributionsCollapsible: t.attributionsCollapsible, cacheSize: t.cacheSize, @@ -13295,7 +13295,7 @@ class ep extends V2 { wrapX: t.wrapX !== void 0 ? t.wrapX : !1, transition: t.transition, zDirection: t.zDirection - }), this.version_ = t.version !== void 0 ? t.version : "1.0.0", this.format_ = t.format !== void 0 ? t.format : "image/jpeg", this.dimensions_ = t.dimensions !== void 0 ? t.dimensions : {}, this.layer_ = t.layer, this.matrixSet_ = t.matrixSet, this.style_ = t.style, this.requestEncoding_ = e, this.setKey(this.getKeyForDimensions_()), s && s.length > 0 && (this.tileUrlFunction = Ia( + }), this.version_ = t.version !== void 0 ? t.version : "1.0.0", this.format_ = t.format !== void 0 ? t.format : "image/jpeg", this.dimensions_ = t.dimensions !== void 0 ? t.dimensions : {}, this.layer_ = t.layer, this.matrixSet_ = t.matrixSet, this.style_ = t.style, this.requestEncoding_ = e, this.setKey(this.getKeyForDimensions_()), s && s.length > 0 && (this.tileUrlFunction = Ra( s.map(this.createFromWMTSTemplate.bind(this)) )); } @@ -13304,7 +13304,7 @@ class ep extends V2 { const e = t.join(` `); this.setTileUrlFunction( - Ia( + Ra( t.map(this.createFromWMTSTemplate.bind(this)) ), e @@ -13352,7 +13352,7 @@ class ep extends V2 { Request: "GetTile", Version: this.version_, Format: this.format_ - }), t = e == "KVP" ? hc(t, n) : t.replace(/\{(\w+?)\}/g, function(o, a) { + }), t = e == "KVP" ? lc(t, n) : t.replace(/\{(\w+?)\}/g, function(o, a) { return a.toLowerCase() in n ? n[a.toLowerCase()] : o; }); const s = this.tileGrid, r = this.dimensions_; @@ -13365,7 +13365,7 @@ class ep extends V2 { }; Object.assign(h, r); let c = t; - return e == "KVP" ? c = hc(c, h) : c = c.replace(/\{(\w+?)\}/g, function(u, d) { + return e == "KVP" ? c = lc(c, h) : c = c.replace(/\{(\w+?)\}/g, function(u, d) { return h[d]; }), c; } else @@ -13375,127 +13375,127 @@ class ep extends V2 { } const ip = ep; function np(i, t) { - const n = i.Contents.Layer.find(function(L) { - return L.Identifier == t.layer; + const n = i.Contents.Layer.find(function(R) { + return R.Identifier == t.layer; }); if (!n) return null; const s = i.Contents.TileMatrixSet; let r; - n.TileMatrixSetLink.length > 1 ? "projection" in t ? r = n.TileMatrixSetLink.findIndex(function(L) { - const dt = s.find(function(I) { - return I.Identifier == L.TileMatrixSet; - }).SupportedCRS, N = q(dt), D = q(t.projection); - return N && D ? Ae(N, D) : dt == t.projection; - }) : r = n.TileMatrixSetLink.findIndex(function(L) { - return L.TileMatrixSet == t.matrixSet; + n.TileMatrixSetLink.length > 1 ? "projection" in t ? r = n.TileMatrixSetLink.findIndex(function(R) { + const dt = s.find(function(L) { + return L.Identifier == R.TileMatrixSet; + }).SupportedCRS, N = K(dt), F = K(t.projection); + return N && F ? Oe(N, F) : dt == t.projection; + }) : r = n.TileMatrixSetLink.findIndex(function(R) { + return R.TileMatrixSet == t.matrixSet; }) : r = 0, r < 0 && (r = 0); const o = n.TileMatrixSetLink[r].TileMatrixSet, a = n.TileMatrixSetLink[r].TileMatrixSetLimits; let l = n.Format[0]; - "format" in t && (l = t.format), r = n.Style.findIndex(function(L) { - return "style" in t ? L.Title == t.style : L.isDefault; + "format" in t && (l = t.format), r = n.Style.findIndex(function(R) { + return "style" in t ? R.Title == t.style : R.isDefault; }), r < 0 && (r = 0); const h = n.Style[r].Identifier, c = {}; - "Dimension" in n && n.Dimension.forEach(function(L, G, dt) { - const N = L.Identifier; - let D = L.Default; - D === void 0 && (D = L.Value[0]), c[N] = D; + "Dimension" in n && n.Dimension.forEach(function(R, j, dt) { + const N = R.Identifier; + let F = R.Default; + F === void 0 && (F = R.Value[0]), c[N] = F; }); - const d = i.Contents.TileMatrixSet.find(function(L) { - return L.Identifier == o; + const d = i.Contents.TileMatrixSet.find(function(R) { + return R.Identifier == o; }); let f; const g = d.SupportedCRS; - if (g && (f = q(g)), "projection" in t) { - const L = q(t.projection); - L && (!f || Ae(L, f)) && (f = L); + if (g && (f = K(g)), "projection" in t) { + const R = K(t.projection); + R && (!f || Oe(R, f)) && (f = R); } let m = !1; const p = f.getAxisOrientation().substr(0, 2) == "ne"; - let _ = d.TileMatrix[0], y = { + let v = d.TileMatrix[0], y = { MinTileCol: 0, MinTileRow: 0, - MaxTileCol: _.MatrixWidth - 1, - MaxTileRow: _.MatrixHeight - 1 + MaxTileCol: v.MatrixWidth - 1, + MaxTileRow: v.MatrixHeight - 1 }; if (a) { y = a[a.length - 1]; - const L = d.TileMatrix.find( - (G) => G.Identifier === y.TileMatrix || d.Identifier + ":" + G.Identifier === y.TileMatrix + const R = d.TileMatrix.find( + (j) => j.Identifier === y.TileMatrix || d.Identifier + ":" + j.Identifier === y.TileMatrix ); - L && (_ = L); - } - const v = _.ScaleDenominator * 28e-5 / f.getMetersPerUnit(), x = p ? [_.TopLeftCorner[1], _.TopLeftCorner[0]] : _.TopLeftCorner, C = _.TileWidth * v, E = _.TileHeight * v; - let w = d.BoundingBox; - w && p && (w = [ - w[1], - w[0], - w[3], - w[2] + R && (v = R); + } + const x = v.ScaleDenominator * 28e-5 / f.getMetersPerUnit(), M = p ? [v.TopLeftCorner[1], v.TopLeftCorner[0]] : v.TopLeftCorner, C = v.TileWidth * x, E = v.TileHeight * x; + let b = d.BoundingBox; + b && p && (b = [ + b[1], + b[0], + b[3], + b[2] ]); - let R = [ - x[0] + C * y.MinTileCol, - x[1] - E * (1 + y.MaxTileRow), - x[0] + C * (1 + y.MaxTileCol), - x[1] - E * y.MinTileRow + let S = [ + M[0] + C * y.MinTileCol, + M[1] - E * (1 + y.MaxTileRow), + M[0] + C * (1 + y.MaxTileCol), + M[1] - E * y.MinTileRow ]; - if (w !== void 0 && !xi(w, R)) { - const L = n.WGS84BoundingBox, G = q("EPSG:4326").getExtent(); - if (R = w, L) - m = L[0] === G[0] && L[2] === G[2]; + if (b !== void 0 && !Mi(b, S)) { + const R = n.WGS84BoundingBox, j = K("EPSG:4326").getExtent(); + if (S = b, R) + m = R[0] === j[0] && R[2] === j[2]; else { - const dt = ju( - w, + const dt = Ju( + b, d.SupportedCRS, "EPSG:4326" ); - m = dt[0] - 1e-10 <= G[0] && dt[2] + 1e-10 >= G[2]; + m = dt[0] - 1e-10 <= j[0] && dt[2] + 1e-10 >= j[2]; } } - const A = tp( + const O = tp( d, - R, + S, a - ), k = []; - let Z = t.requestEncoding; - if (Z = Z !== void 0 ? Z : "", "OperationsMetadata" in i && "GetTile" in i.OperationsMetadata) { - const L = i.OperationsMetadata.GetTile.DCP.HTTP.Get; - for (let G = 0, dt = L.length; G < dt; ++G) - if (L[G].Constraint) { - const D = L[G].Constraint.find(function(I) { - return I.name == "GetEncoding"; + ), D = []; + let H = t.requestEncoding; + if (H = H !== void 0 ? H : "", "OperationsMetadata" in i && "GetTile" in i.OperationsMetadata) { + const R = i.OperationsMetadata.GetTile.DCP.HTTP.Get; + for (let j = 0, dt = R.length; j < dt; ++j) + if (R[j].Constraint) { + const F = R[j].Constraint.find(function(L) { + return L.name == "GetEncoding"; }).AllowedValues.Value; - if (Z === "" && (Z = D[0]), Z === "KVP") - D.includes("KVP") && k.push(L[G].href); + if (H === "" && (H = F[0]), H === "KVP") + F.includes("KVP") && D.push(R[j].href); else break; } else - L[G].href && (Z = "KVP", k.push(L[G].href)); + R[j].href && (H = "KVP", D.push(R[j].href)); } - return k.length === 0 && (Z = "REST", n.ResourceURL.forEach(function(L) { - L.resourceType === "tile" && (l = L.format, k.push(L.template)); + return D.length === 0 && (H = "REST", n.ResourceURL.forEach(function(R) { + R.resourceType === "tile" && (l = R.format, D.push(R.template)); })), { - urls: k, + urls: D, layer: t.layer, matrixSet: o, format: l, projection: f, - requestEncoding: Z, - tileGrid: A, + requestEncoding: H, + tileGrid: O, style: h, dimensions: c, wrapX: m, crossOrigin: t.crossOrigin }; } -class Ud { +class Zd { constructor() { this.dataProjection = void 0, this.defaultFeatureProjection = void 0, this.supportedMediaTypes = null; } getReadOptions(t, e) { if (e) { - let n = e.dataProjection ? q(e.dataProjection) : this.readProjection(t); - e.extent && n && n.getUnits() === "tile-pixels" && (n = q(n), n.setWorldExtent(e.extent)), e = { + let n = e.dataProjection ? K(e.dataProjection) : this.readProjection(t); + e.extent && n && n.getUnits() === "tile-pixels" && (n = K(n), n.setWorldExtent(e.extent)), e = { dataProjection: n, featureProjection: e.featureProjection }; @@ -13512,34 +13512,34 @@ class Ud { ); } getType() { - return V(); + return B(); } readFeature(t, e) { - return V(); + return B(); } readFeatures(t, e) { - return V(); + return B(); } readGeometry(t, e) { - return V(); + return B(); } readProjection(t) { - return V(); + return B(); } writeFeature(t, e) { - return V(); + return B(); } writeFeatures(t, e) { - return V(); + return B(); } writeGeometry(t, e) { - return V(); + return B(); } } -function Ks(i, t, e) { - const n = e ? q(e.featureProjection) : null, s = e ? q(e.dataProjection) : null; +function qs(i, t, e) { + const n = e ? K(e.featureProjection) : null, s = e ? K(e.dataProjection) : null; let r; - if (n && s && !Ae(n, s) ? r = (t ? i.clone() : i).transform( + if (n && s && !Oe(n, s) ? r = (t ? i.clone() : i).transform( t ? n : s, t ? s : n ) : r = i, t && e && e.decimals !== void 0) { @@ -13552,9 +13552,9 @@ function Ks(i, t, e) { } return r; } -function Al(i, t) { - const e = t ? q(t.featureProjection) : null, n = t ? q(t.dataProjection) : null; - return e && n && !Ae(e, n) ? ju(i, n, e) : i; +function Tl(i, t) { + const e = t ? K(t.featureProjection) : null, n = t ? K(t.dataProjection) : null; + return e && n && !Oe(e, n) ? Ju(i, n, e) : i; } class qr extends on { constructor(t, e, n) { @@ -13573,13 +13573,13 @@ class qr extends on { const r = t, o = [], a = []; for (let l = 0, h = r.length; l < h; ++l) { const c = r[l]; - l === 0 && (s = c.getLayout()), Kt(o, c.getFlatCoordinates()), a.push(o.length); + l === 0 && (s = c.getLayout()), qt(o, c.getFlatCoordinates()), a.push(o.length); } this.setFlatCoordinates(s, o), this.ends_ = a; } } appendLineString(t) { - this.flatCoordinates ? Kt(this.flatCoordinates, t.getFlatCoordinates().slice()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed(); + this.flatCoordinates ? qt(this.flatCoordinates, t.getFlatCoordinates().slice()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed(); } clone() { const t = new qr( @@ -13591,14 +13591,14 @@ class qr extends on { } closestPointXY(t, e, n, s) { return s < rn(this.getExtent(), t, e) ? s : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt( - fl( + ul( this.flatCoordinates, 0, this.ends_, this.stride, 0 ) - ), this.maxDeltaRevision_ = this.getRevision()), ml( + ), this.maxDeltaRevision_ = this.getRevision()), fl( this.flatCoordinates, 0, this.ends_, @@ -13612,7 +13612,7 @@ class qr extends on { )); } getCoordinateAtM(t, e, n) { - return this.layout != "XYM" && this.layout != "XYZM" || this.flatCoordinates.length === 0 ? null : (e = e !== void 0 ? e : !1, n = n !== void 0 ? n : !1, j1( + return this.layout != "XYM" && this.layout != "XYZM" || this.flatCoordinates.length === 0 ? null : (e = e !== void 0 ? e : !1, n = n !== void 0 ? n : !1, J1( this.flatCoordinates, 0, this.ends_, @@ -13623,7 +13623,7 @@ class qr extends on { )); } getCoordinates() { - return Fs( + return zs( this.flatCoordinates, 0, this.ends_, @@ -13634,7 +13634,7 @@ class qr extends on { return this.ends_; } getLineString(t) { - return t < 0 || this.ends_.length <= t ? null : new Ds( + return t < 0 || this.ends_.length <= t ? null : new Fs( this.flatCoordinates.slice( t === 0 ? 0 : this.ends_[t - 1], this.ends_[t] @@ -13646,7 +13646,7 @@ class qr extends on { const t = this.flatCoordinates, e = this.ends_, n = this.layout, s = []; let r = 0; for (let o = 0, a = e.length; o < a; ++o) { - const l = e[o], h = new Ds( + const l = e[o], h = new Fs( t.slice(r, l), n ); @@ -13666,13 +13666,13 @@ class qr extends on { r, 0.5 ); - Kt(t, h), n = l; + qt(t, h), n = l; } return t; } getSimplifiedGeometryInternal(t) { const e = [], n = []; - return e.length = Gg( + return e.length = jg( this.flatCoordinates, 0, this.ends_, @@ -13697,7 +13697,7 @@ class qr extends on { } setCoordinates(t, e) { this.setLayout(e, t, 2), this.flatCoordinates || (this.flatCoordinates = []); - const n = pl( + const n = gl( this.flatCoordinates, 0, t, @@ -13707,7 +13707,7 @@ class qr extends on { this.flatCoordinates.length = n.length === 0 ? 0 : n[n.length - 1], this.changed(); } } -const Pl = qr; +const Ll = qr; class Ol extends on { constructor(t, e) { super(), e && !Array.isArray(t[0]) ? this.setFlatCoordinates( @@ -13719,7 +13719,7 @@ class Ol extends on { ); } appendPoint(t) { - this.flatCoordinates ? Kt(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.changed(); + this.flatCoordinates ? qt(this.flatCoordinates, t.getFlatCoordinates()) : this.flatCoordinates = t.getFlatCoordinates().slice(), this.changed(); } clone() { const t = new Ol( @@ -13781,13 +13781,13 @@ class Ol extends on { const e = this.flatCoordinates, n = this.stride; for (let s = 0, r = e.length; s < r; s += n) { const o = e[s], a = e[s + 1]; - if (Qa(t, o, a)) + if (Ka(t, o, a)) return !0; } return !1; } setCoordinates(t, e) { - this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Mo( + this.setLayout(e, t, 1), this.flatCoordinates || (this.flatCoordinates = []), this.flatCoordinates.length = Co( this.flatCoordinates, 0, t, @@ -13795,13 +13795,13 @@ class Ol extends on { ), this.changed(); } } -const Ro = Ol; +const Po = Ol; function sp(i, t, e, n) { const s = []; let r = fe(); for (let o = 0, a = e.length; o < a; ++o) { const l = e[o]; - r = Su( + r = Pu( i, t, l[0], @@ -13810,7 +13810,7 @@ function sp(i, t, e, n) { } return s; } -class Jr extends on { +class Kr extends on { constructor(t, e, n) { if (super(), this.endss_ = [], this.flatInteriorPointsRevision_ = -1, this.flatInteriorPoints_ = null, this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, this.orientedRevision_ = -1, this.orientedFlatCoordinates_ = null, !n && !Array.isArray(t[0])) { let s = this.getLayout(); @@ -13821,7 +13821,7 @@ class Jr extends on { const u = o.length, d = c.getEnds(); for (let f = 0, g = d.length; f < g; ++f) d[f] += u; - Kt(o, c.getFlatCoordinates()), a.push(d); + qt(o, c.getFlatCoordinates()), a.push(d); } e = s, t = o, n = a; } @@ -13839,7 +13839,7 @@ class Jr extends on { this.flatCoordinates = t.getFlatCoordinates().slice(), e = t.getEnds().slice(), this.endss_.push(); else { const n = this.flatCoordinates.length; - Kt(this.flatCoordinates, t.getFlatCoordinates()), e = t.getEnds().slice(); + qt(this.flatCoordinates, t.getFlatCoordinates()), e = t.getEnds().slice(); for (let s = 0, r = e.length; s < r; ++s) e[s] += n; } @@ -13849,7 +13849,7 @@ class Jr extends on { const t = this.endss_.length, e = new Array(t); for (let s = 0; s < t; ++s) e[s] = this.endss_[s].slice(); - const n = new Jr( + const n = new Kr( this.flatCoordinates.slice(), this.layout, e @@ -13865,7 +13865,7 @@ class Jr extends on { this.stride, 0 ) - ), this.maxDeltaRevision_ = this.getRevision()), Fg( + ), this.maxDeltaRevision_ = this.getRevision()), zg( this.getOrientedFlatCoordinates(), 0, this.endss_, @@ -13879,7 +13879,7 @@ class Jr extends on { )); } containsXY(t, e) { - return Ug( + return Zg( this.getOrientedFlatCoordinates(), 0, this.endss_, @@ -13889,7 +13889,7 @@ class Jr extends on { ); } getArea() { - return zg( + return Gg( this.getOrientedFlatCoordinates(), 0, this.endss_, @@ -13898,7 +13898,7 @@ class Jr extends on { } getCoordinates(t) { let e; - return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), Dh( + return t !== void 0 ? (e = this.getOrientedFlatCoordinates().slice(), zh( e, 0, this.endss_, @@ -13922,7 +13922,7 @@ class Jr extends on { this.endss_, this.stride ); - this.flatInteriorPoints_ = Vg( + this.flatInteriorPoints_ = Bg( this.getOrientedFlatCoordinates(), 0, this.endss_, @@ -13933,12 +13933,12 @@ class Jr extends on { return this.flatInteriorPoints_; } getInteriorPoints() { - return new Ro(this.getFlatInteriorPoints().slice(), "XYM"); + return new Po(this.getFlatInteriorPoints().slice(), "XYM"); } getOrientedFlatCoordinates() { if (this.orientedRevision_ != this.getRevision()) { const t = this.flatCoordinates; - Yg(t, 0, this.endss_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = Dh( + Ug(t, 0, this.endss_, this.stride) ? this.orientedFlatCoordinates_ = t : (this.orientedFlatCoordinates_ = t.slice(), this.orientedFlatCoordinates_.length = zh( this.orientedFlatCoordinates_, 0, this.endss_, @@ -13949,7 +13949,7 @@ class Jr extends on { } getSimplifiedGeometryInternal(t) { const e = [], n = []; - return e.length = Bg( + return e.length = Xg( this.flatCoordinates, 0, this.endss_, @@ -13958,7 +13958,7 @@ class Jr extends on { e, 0, n - ), new Jr(e, "XY", n); + ), new Kr(e, "XY", n); } getPolygon(t) { if (t < 0 || this.endss_.length <= t) @@ -13974,7 +13974,7 @@ class Jr extends on { if (e !== 0) for (let r = 0, o = n.length; r < o; ++r) n[r] -= e; - return new Un( + return new Zn( this.flatCoordinates.slice(e, s), this.layout, n @@ -13988,7 +13988,7 @@ class Jr extends on { if (r !== 0) for (let u = 0, d = l.length; u < d; ++u) l[u] -= r; - const c = new Un( + const c = new Zn( e.slice(r, h), t, l @@ -14001,7 +14001,7 @@ class Jr extends on { return "MultiPolygon"; } intersectsExtent(t) { - return Hg( + return Vg( this.getOrientedFlatCoordinates(), 0, this.endss_, @@ -14011,7 +14011,7 @@ class Jr extends on { } setCoordinates(t, e) { this.setLayout(e, t, 3), this.flatCoordinates || (this.flatCoordinates = []); - const n = kg( + const n = Dg( this.flatCoordinates, 0, t, @@ -14027,8 +14027,8 @@ class Jr extends on { this.changed(); } } -const Nl = Jr; -class Qr extends Qu { +const Al = Kr; +class Qr extends $u { constructor(t) { super(), this.geometries_ = t || null, this.changeEventsKeys_ = [], this.listenGeometriesChange_(); } @@ -14039,7 +14039,7 @@ class Qr extends Qu { if (!!this.geometries_) for (let t = 0, e = this.geometries_.length; t < e; ++t) this.changeEventsKeys_.push( - et(this.geometries_[t], H.CHANGE, this.changed, this) + et(this.geometries_[t], V.CHANGE, this.changed, this) ); } clone() { @@ -14067,14 +14067,14 @@ class Qr extends Qu { return !1; } computeExtent(t) { - Vs(t); + Bs(t); const e = this.geometries_; for (let n = 0, s = e.length; n < s; ++n) - Ru(t, e[n].getExtent()); + Su(t, e[n].getExtent()); return t; } getGeometries() { - return cc(this.geometries_); + return hc(this.geometries_); } getGeometriesArray() { return this.geometries_; @@ -14123,14 +14123,14 @@ class Qr extends Qu { this.changed(); } scale(t, e, n) { - n || (n = Li(this.getExtent())); + n || (n = Ri(this.getExtent())); const s = this.geometries_; for (let r = 0, o = s.length; r < o; ++r) s[r].scale(t, e, n); this.changed(); } setGeometries(t) { - this.setGeometriesArray(cc(t)); + this.setGeometriesArray(hc(t)); } setGeometriesArray(t) { this.unlistenGeometriesChange_(), this.geometries_ = t, this.listenGeometriesChange_(), this.changed(); @@ -14151,14 +14151,14 @@ class Qr extends Qu { this.unlistenGeometriesChange_(), super.disposeInternal(); } } -function cc(i) { +function hc(i) { const t = []; for (let e = 0, n = i.length; e < n; ++e) t.push(i[e].clone()); return t; } -const Vd = Qr; -class rp extends Ud { +const Bd = Qr; +class rp extends Zd { constructor() { super(); } @@ -14167,57 +14167,57 @@ class rp extends Ud { } readFeature(t, e) { return this.readFeatureFromObject( - wr(t), + br(t), this.getReadOptions(t, e) ); } readFeatures(t, e) { return this.readFeaturesFromObject( - wr(t), + br(t), this.getReadOptions(t, e) ); } readFeatureFromObject(t, e) { - return V(); + return B(); } readFeaturesFromObject(t, e) { - return V(); + return B(); } readGeometry(t, e) { return this.readGeometryFromObject( - wr(t), + br(t), this.getReadOptions(t, e) ); } readGeometryFromObject(t, e) { - return V(); + return B(); } readProjection(t) { - return this.readProjectionFromObject(wr(t)); + return this.readProjectionFromObject(br(t)); } readProjectionFromObject(t) { - return V(); + return B(); } writeFeature(t, e) { return JSON.stringify(this.writeFeatureObject(t, e)); } writeFeatureObject(t, e) { - return V(); + return B(); } writeFeatures(t, e) { return JSON.stringify(this.writeFeaturesObject(t, e)); } writeFeaturesObject(t, e) { - return V(); + return B(); } writeGeometry(t, e) { return JSON.stringify(this.writeGeometryObject(t, e)); } writeGeometryObject(t, e) { - return V(); + return B(); } } -function wr(i) { +function br(i) { if (typeof i == "string") { const t = JSON.parse(i); return t || null; @@ -14227,9 +14227,9 @@ function wr(i) { const op = rp; class ap extends op { constructor(t) { - t = t || {}, super(), this.dataProjection = q( + t = t || {}, super(), this.dataProjection = K( t.dataProjection ? t.dataProjection : "EPSG:4326" - ), t.featureProjection && (this.defaultFeatureProjection = q(t.featureProjection)), this.geometryName_ = t.geometryName, this.extractGeometryName_ = t.extractGeometryName, this.supportedMediaTypes = [ + ), t.featureProjection && (this.defaultFeatureProjection = K(t.featureProjection)), this.geometryName_ = t.geometryName, this.extractGeometryName_ = t.extractGeometryName, this.supportedMediaTypes = [ "application/geo+json", "application/vnd.geo+json" ]; @@ -14241,7 +14241,7 @@ class ap extends op { geometry: t, properties: null }; - const s = Aa(n.geometry, e), r = new an(); + const s = Ta(n.geometry, e), r = new an(); return this.geometryName_ ? r.setGeometryName(this.geometryName_) : this.extractGeometryName_ && "geometry_name" in n !== void 0 && r.setGeometryName(n.geometry_name), r.setGeometry(s), "id" in n && r.setId(n.id), n.properties && r.setProperties(n.properties, !0), r; } readFeaturesFromObject(t, e) { @@ -14258,12 +14258,12 @@ class ap extends op { return s; } readGeometryFromObject(t, e) { - return Aa(t, e); + return Ta(t, e); } readProjectionFromObject(t) { const e = t.crs; let n; - return e ? e.type == "name" ? n = q(e.properties.name) : e.type === "EPSG" ? n = q("EPSG:" + e.properties.code) : X(!1, 36) : n = this.dataProjection, n; + return e ? e.type == "name" ? n = K(e.properties.name) : e.type === "EPSG" ? n = K("EPSG:" + e.properties.code) : Y(!1, 36) : n = this.dataProjection, n; } writeFeatureObject(t, e) { e = this.adaptOptions(e); @@ -14275,7 +14275,7 @@ class ap extends op { if (s !== void 0 && (n.id = s), !t.hasProperties()) return n; const r = t.getProperties(), o = t.getGeometry(); - return o && (n.geometry = Pa(o, e), delete r[t.getGeometryName()]), Gn(r) || (n.properties = r), n; + return o && (n.geometry = La(o, e), delete r[t.getGeometryName()]), jn(r) || (n.properties = r), n; } writeFeaturesObject(t, e) { e = this.adaptOptions(e); @@ -14288,10 +14288,10 @@ class ap extends op { }; } writeGeometryObject(t, e) { - return Pa(t, this.adaptOptions(e)); + return La(t, this.adaptOptions(e)); } } -function Aa(i, t) { +function Ta(i, t) { if (!i) return null; let e; @@ -14337,41 +14337,41 @@ function Aa(i, t) { default: throw new Error("Unsupported GeoJSON type: " + i.type); } - return Ks(e, !1, t); + return qs(e, !1, t); } function lp(i, t) { const e = i.geometries.map( function(n) { - return Aa(n, t); + return Ta(n, t); } ); - return new Vd(e); + return new Bd(e); } function hp(i) { return new oi(i.coordinates); } function cp(i) { - return new Ds(i.coordinates); + return new Fs(i.coordinates); } function up(i) { - return new Pl(i.coordinates); + return new Ll(i.coordinates); } function dp(i) { - return new Ro(i.coordinates); + return new Po(i.coordinates); } function fp(i) { - return new Nl(i.coordinates); + return new Al(i.coordinates); } function gp(i) { - return new Un(i.coordinates); + return new Zn(i.coordinates); } -function Pa(i, t) { - i = Ks(i, !0, t); +function La(i, t) { + i = qs(i, !0, t); const e = i.getType(); let n; switch (e) { case "Point": { - n = xp(i); + n = Mp(i); break; } case "LineString": { @@ -14394,13 +14394,13 @@ function Pa(i, t) { break; } case "MultiLineString": { - n = _p( + n = vp( i ); break; } case "MultiPolygon": { - n = vp( + n = xp( i, t ); @@ -14429,7 +14429,7 @@ function mp(i, t) { return t = Object.assign({}, t), delete t.featureProjection, { type: "GeometryCollection", geometries: i.getGeometriesArray().map(function(n) { - return Pa(n, t); + return La(n, t); }) }; } @@ -14439,7 +14439,7 @@ function pp(i, t) { coordinates: i.getCoordinates() }; } -function _p(i, t) { +function vp(i, t) { return { type: "MultiLineString", coordinates: i.getCoordinates() @@ -14451,14 +14451,14 @@ function yp(i, t) { coordinates: i.getCoordinates() }; } -function vp(i, t) { +function xp(i, t) { let e; return t && (e = t.rightHanded), { type: "MultiPolygon", coordinates: i.getCoordinates(e) }; } -function xp(i, t) { +function Mp(i, t) { return { type: "Point", coordinates: i.getCoordinates() @@ -14482,8 +14482,8 @@ class tt { * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Hd = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Fl = (i) => (...t) => ({ _$litDirective$: i, values: t }); -class Dl { +const Vd = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Il = (i) => (...t) => ({ _$litDirective$: i, values: t }); +class Nl { constructor(t) { } get _$AU() { @@ -14504,12 +14504,12 @@ class Dl { * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const { I: Mp } = Wf, Sr = (i, t) => t === void 0 ? (i == null ? void 0 : i._$litType$) !== void 0 : (i == null ? void 0 : i._$litType$) === t, uc = () => document.createComment(""), dc = (i, t, e) => { +const { I: wp } = Wf, Pr = (i, t) => t === void 0 ? (i == null ? void 0 : i._$litType$) !== void 0 : (i == null ? void 0 : i._$litType$) === t, cc = () => document.createComment(""), uc = (i, t, e) => { var n; const s = i._$AA.parentNode, r = t === void 0 ? i._$AB : t._$AA; if (e === void 0) { - const o = s.insertBefore(uc(), r), a = s.insertBefore(uc(), r); - e = new Mp(o, a, i, i.options); + const o = s.insertBefore(cc(), r), a = s.insertBefore(cc(), r); + e = new wp(o, a, i, i.options); } else { const o = e._$AB.nextSibling, a = e._$AM, l = a !== i; if (l) { @@ -14525,7 +14525,7 @@ const { I: Mp } = Wf, Sr = (i, t) => t === void 0 ? (i == null ? void 0 : i._$li } } return e; -}, Ep = {}, fc = (i, t = Ep) => i._$AH = t, gc = (i) => i._$AH, wp = (i) => { +}, Ep = {}, dc = (i, t = Ep) => i._$AH = t, fc = (i) => i._$AH, bp = (i) => { i._$AR(); }; /** @@ -14533,7 +14533,7 @@ const { I: Mp } = Wf, Sr = (i, t) => t === void 0 ? (i == null ? void 0 : i._$li * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Xd = Fl(class extends Dl { +const zl = Il(class extends Nl { constructor(i) { super(i), this.et = /* @__PURE__ */ new WeakMap(); } @@ -14541,21 +14541,21 @@ const Xd = Fl(class extends Dl { return [i]; } update(i, [t]) { - if (Sr(this.it) && (!Sr(t) || this.it.strings !== t.strings)) { - const e = gc(i).pop(); + if (Pr(this.it) && (!Pr(t) || this.it.strings !== t.strings)) { + const e = fc(i).pop(); let n = this.et.get(this.it.strings); if (n === void 0) { const s = document.createDocumentFragment(); - n = _u(bt, s), n.setConnected(!1), this.et.set(this.it.strings, n); + n = vu(Rt, s), n.setConnected(!1), this.et.set(this.it.strings, n); } - fc(n, [e]), dc(n, void 0, e); + dc(n, [e]), uc(n, void 0, e); } - if (Sr(t)) { - if (!Sr(this.it) || this.it.strings !== t.strings) { + if (Pr(t)) { + if (!Pr(this.it) || this.it.strings !== t.strings) { const e = this.et.get(t.strings); if (e !== void 0) { - const n = gc(e).pop(); - wp(i), dc(i, void 0, n), fc(i, [n]); + const n = fc(e).pop(); + bp(i), uc(i, void 0, n), dc(i, [n]); } } this.it = t; @@ -14569,15 +14569,15 @@ const Xd = Fl(class extends Dl { * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -class Oa extends Dl { +class Oa extends Nl { constructor(t) { - if (super(t), this.it = bt, t.type !== Hd.CHILD) + if (super(t), this.it = Rt, t.type !== Vd.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings"); } render(t) { - if (t === bt || t == null) + if (t === Rt || t == null) return this._t = void 0, this.it = t; - if (t === Si) + if (t === Pi) return t; if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value"); @@ -14594,10 +14594,10 @@ Oa.directiveName = "unsafeHTML", Oa.resultType = 1; * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -class Na extends Oa { +class Aa extends Oa { } -Na.directiveName = "unsafeSVG", Na.resultType = 2; -const Le = Fl(Na); +Aa.directiveName = "unsafeSVG", Aa.resultType = 2; +const Re = Il(Aa); class gt { constructor() { this.customDisplay = !1, this.targetBoxSize = "", this.selectedFeatures = [], this.currentItemId = -1, this.maxElement = -1; @@ -14690,7 +14690,7 @@ class gt { } } gt.theme = ""; -const Sp = `@media only screen and (min-width: 351px) and (max-width: 995px){.box-element{left:calc(50% - 167px);width:calc(100% - 30px);max-width:302px}}@media only screen and (max-width: 350px){.box-element{left:10px;width:calc(100% - 50px);max-width:302px}}@media only screen and (min-width: 996px){.box-element{left:calc((100% - (var(--select-box-width) + 30px)) / 2);width:calc(var(--select-box-width))}}.box-element{position:absolute;top:10px;background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);border:1px solid var(--information-box-background-color);font-family:sans-serif;display:flex;z-index:5}.box-text-container{width:calc(100% - 80px)}.box-icon-container{width:80px;display:flex}.box-element-title{display:flex}.box-element-title-text{width:900%;font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color)}.box-element-content{font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color);width:90%}.position-icon{display:flex;justify-content:flex-end;width:50%}.icon-container{width:36px;height:36px;background-color:var(--select-icon-background);border-radius:var(--icon-border-radius)}.icon-container>svg{display:block;margin-left:calc((var(--icon-width) - var(--svg-icon-size)) / 2);margin-top:calc((var(--icon-height) - var(--svg-icon-size)) / 2);width:var(--svg-icon-size)!important;height:var(--svg-icon-size)!important}.icon-container>svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round} +const Pp = `@media only screen and (min-width: 351px) and (max-width: 995px){.box-element{left:calc(50% - 167px);width:calc(100% - 30px);max-width:302px}}@media only screen and (max-width: 350px){.box-element{left:10px;width:calc(100% - 50px);max-width:302px}}@media only screen and (min-width: 996px){.box-element{left:calc((100% - (var(--select-box-width) + 30px)) / 2);width:calc(var(--select-box-width))}}.box-element{position:absolute;top:10px;background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);border:1px solid var(--information-box-background-color);font-family:sans-serif;display:flex;z-index:5}.box-text-container{width:calc(100% - 80px)}.box-icon-container{width:80px;display:flex}.box-element-title{display:flex}.box-element-title-text{width:900%;font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color)}.box-element-content{font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color);width:90%}.position-icon{display:flex;justify-content:flex-end;width:50%}.icon-container{width:36px;height:36px;background-color:var(--select-icon-background);border-radius:var(--icon-border-radius)}.icon-container>svg{display:block;margin-left:calc((var(--icon-width) - var(--svg-icon-size)) / 2);margin-top:calc((var(--icon-height) - var(--svg-icon-size)) / 2);width:var(--svg-icon-size)!important;height:var(--svg-icon-size)!important}.icon-container>svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round} `; class Wt { static setEvent(t, e, n) { @@ -15034,12 +15034,12 @@ st.stack = ` `; -var Rp = Object.defineProperty, bp = Object.getOwnPropertyDescriptor, bo = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? bp(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var Sp = Object.defineProperty, _p = Object.getOwnPropertyDescriptor, So = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? _p(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && Rp(t, e, s), s; + return n && s && Sp(t, e, s), s; }; -let Ji = class extends Pt { +let Qi = class extends At { constructor(i) { super(), this.currentPosition = [0, 0], this._isRecenterButton = !0, this._currentPosition = "", this.store = i; const t = this.store.getMap(), e = this.store.getOptions(); @@ -15064,7 +15064,7 @@ let Ji = class extends Pt { } render() { var i; - return Lt` + return Ct`
    @@ -15074,15 +15074,15 @@ let Ji = class extends Pt {
    - ${Xd( - this._isRecenterButton ? Lt`` : Lt`
    - ${Le(st.iconRecenter)} + ${zl( + this._isRecenterButton ? Ct`` : Ct`
    + ${Re(st.iconRecenter)}
    ` )}
    - ${Le(st.iconRemoveSelection)} + ${Re(st.iconRemoveSelection)}
    @@ -15106,22 +15106,22 @@ let Ji = class extends Pt { } } }; -Ji.styles = [yt(Sp)]; -bo([ +Qi.styles = [yt(Pp)]; +So([ Te() -], Ji.prototype, "currentPosition", 2); -bo([ - It() -], Ji.prototype, "_isRecenterButton", 2); -bo([ - It() -], Ji.prototype, "_currentPosition", 2); -Ji = bo([ - qt("select-information-box-element") -], Ji); -class kl extends kt { +], Qi.prototype, "currentPosition", 2); +So([ + Lt() +], Qi.prototype, "_isRecenterButton", 2); +So([ + Lt() +], Qi.prototype, "_currentPosition", 2); +Qi = So([ + Kt("select-information-box-element") +], Qi); +class Fl extends Dt { constructor(t) { - const e = new Ji(t); + const e = new Qi(t); super({ element: e }), this.div = e; const n = t.getMap(); if (!n) @@ -15138,77 +15138,77 @@ class kl extends kt { this.div.classList.remove("fade-in"), this.div.classList.add("fade-out"); } } -class Lp { +class Rp { constructor() { this.clickImage = document.createElement("img"), this.clickImage.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(st.mapPinClick), this.selectImage = document.createElement("img"), this.selectImage.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(st.mapPinSelect); } clusterWithIcon(t) { const e = t.get("features").length; let n; - return e === 1 && t.get("features")[0].get("isSelected") ? n = new Vt({ + return e === 1 && t.get("features")[0].get("isSelected") ? n = new Bt({ zIndex: 1, - image: new xs({ + image: new Ms({ img: this.selectImage, imgSize: [42, 54], anchor: [0.52, 55], anchorXUnits: "fraction", anchorYUnits: "pixels" }) - }) : e === 1 && t.get("features")[0].get("isClick") ? n = new Vt({ + }) : e === 1 && t.get("features")[0].get("isClick") ? n = new Bt({ zIndex: 1, - image: new xs({ + image: new Ms({ img: this.clickImage, imgSize: [42, 54], anchor: [0.5, 54], anchorXUnits: "fraction", anchorYUnits: "pixels" }) - }) : e === 1 && !t.get("features")[0].get("isClick") ? n = new Vt({ + }) : e === 1 && !t.get("features")[0].get("isClick") ? n = new Bt({ zIndex: 1, - image: new xs({ + image: new Ms({ src: "data:image/svg+xml;charset=utf-8," + encodeURIComponent(st.mapPin), anchor: [0.5, 54], anchorXUnits: "fraction", anchorYUnits: "pixels" }) - }) : t.get("features").find((s) => s.get("isClick")) ? n = new Vt({ + }) : t.get("features").find((s) => s.get("isClick")) ? n = new Bt({ image: new ni({ radius: 15, - stroke: new Re({ + stroke: new Se({ color: "#fff" }), - fill: new Yt({ + fill: new Ut({ color: "#EF4444" }) }), - text: new ba({ + text: new Pa({ text: e.toString(), font: "14px sans-serif", - fill: new Yt({ + fill: new Ut({ color: "#fff" }) }) - }) : n = new Vt({ + }) : n = new Bt({ image: new ni({ radius: 15, - stroke: new Re({ + stroke: new Se({ color: "#fff" }), - fill: new Yt({ + fill: new Ut({ color: "#334155" }) }), - text: new ba({ + text: new Pa({ text: e.toString(), font: "14px sans-serif", - fill: new Yt({ + fill: new Ut({ color: "#fff" }) }) }), n; } } -class jd { +class Ud { static setCustomStyleWithouInfoBox(t) { var s, r; const e = t.getOptions(); @@ -15217,30 +15217,30 @@ class jd { t.setTargetBoxSize(n); } } -const Fa = "http://www.w3.org/2001/XMLSchema-instance"; -function j(i, t) { +const Ia = "http://www.w3.org/2001/XMLSchema-instance"; +function J(i, t) { return Qd().createElementNS(i, t); } -function Qi(i, t) { - return Kd(i, t, []).join(""); +function $i(i, t) { + return Jd(i, t, []).join(""); } -function Kd(i, t, e) { +function Jd(i, t, e) { if (i.nodeType == Node.CDATA_SECTION_NODE || i.nodeType == Node.TEXT_NODE) t ? e.push(String(i.nodeValue).replace(/(\r\n|\r|\n)/g, "")) : e.push(i.nodeValue); else { let n; for (n = i.firstChild; n; n = n.nextSibling) - Kd(n, t, e); + Jd(n, t, e); } return e; } -function Ui(i) { +function Zi(i) { return "documentElement" in i; } function Tp(i, t, e) { return i.getAttributeNS(t, e) || ""; } -function Vi(i) { +function Bi(i) { return new DOMParser().parseFromString(i, "application/xml"); } function qd(i, t) { @@ -15252,7 +15252,7 @@ function qd(i, t) { ); if (s !== void 0) { const r = n[n.length - 1]; - Kt(r, s); + qt(r, s); } }; } @@ -15266,7 +15266,7 @@ function W(i, t) { s !== void 0 && n[n.length - 1].push(s); }; } -function z(i, t) { +function G(i, t) { return function(e, n) { const s = i.call( t !== void 0 ? t : this, @@ -15290,7 +15290,7 @@ function ue(i, t, e) { } }; } -function O(i, t, e) { +function I(i, t, e) { return function(n, s) { const r = i.call( e !== void 0 ? e : this, @@ -15303,7 +15303,7 @@ function O(i, t, e) { } }; } -function M(i, t) { +function w(i, t) { return function(e, n, s) { i.call( t !== void 0 ? t : this, @@ -15319,10 +15319,10 @@ function de(i, t) { let a = i; a === void 0 && (a = s); const l = t !== void 0 ? t : o.namespaceURI; - return j(l, a); + return J(l, a); }; } -const Jd = de(); +const Kd = de(); function ct(i, t, e) { e = e !== void 0 ? e : {}; let n, s; @@ -15330,7 +15330,7 @@ function ct(i, t, e) { e[i[n]] = t; return e; } -function Yi(i, t, e, n) { +function Ui(i, t, e, n) { let s; for (s = t.firstElementChild; s; s = s.nextElementSibling) { const r = i[s.namespaceURI]; @@ -15340,10 +15340,10 @@ function Yi(i, t, e, n) { } } } -function $(i, t, e, n, s) { - return n.push(i), Yi(t, e, n, s), n.pop(); +function k(i, t, e, n, s) { + return n.push(i), Ui(t, e, n, s), n.pop(); } -function Ip(i, t, e, n, s, r) { +function Lp(i, t, e, n, s, r) { const o = (s !== void 0 ? s : e).length; let a, l; for (let h = 0; h < o; ++h) @@ -15359,20 +15359,20 @@ function Ip(i, t, e, n, s, r) { n )); } -function Et(i, t, e, n, s, r, o) { - return s.push(i), Ip(t, e, n, s, r, o), s.pop(); +function bt(i, t, e, n, s, r, o) { + return s.push(i), Lp(t, e, n, s, r, o), s.pop(); } -let ra; -function Ap() { - return ra === void 0 && typeof XMLSerializer < "u" && (ra = new XMLSerializer()), ra; +let na; +function Op() { + return na === void 0 && typeof XMLSerializer < "u" && (na = new XMLSerializer()), na; } -let oa; +let sa; function Qd() { - return oa === void 0 && typeof document < "u" && (oa = document.implementation.createDocument("", "", null)), oa; + return sa === void 0 && typeof document < "u" && (sa = document.implementation.createDocument("", "", null)), sa; } -class Pp extends Ud { +class Ap extends Zd { constructor() { - super(), this.xmlSerializer_ = Ap(); + super(), this.xmlSerializer_ = Op(); } getType() { return "xml"; @@ -15380,10 +15380,10 @@ class Pp extends Ud { readFeature(t, e) { if (t) if (typeof t == "string") { - const n = Vi(t); + const n = Bi(t); return this.readFeatureFromDocument(n, e); } else - return Ui(t) ? this.readFeatureFromDocument( + return Zi(t) ? this.readFeatureFromDocument( t, e ) : this.readFeatureFromNode(t, e); @@ -15400,10 +15400,10 @@ class Pp extends Ud { readFeatures(t, e) { if (t) if (typeof t == "string") { - const n = Vi(t); + const n = Bi(t); return this.readFeaturesFromDocument(n, e); } else - return Ui(t) ? this.readFeaturesFromDocument( + return Zi(t) ? this.readFeaturesFromDocument( t, e ) : this.readFeaturesFromNode( @@ -15416,22 +15416,22 @@ class Pp extends Ud { readFeaturesFromDocument(t, e) { const n = []; for (let s = t.firstChild; s; s = s.nextSibling) - s.nodeType == Node.ELEMENT_NODE && Kt( + s.nodeType == Node.ELEMENT_NODE && qt( n, this.readFeaturesFromNode(s, e) ); return n; } readFeaturesFromNode(t, e) { - return V(); + return B(); } readGeometry(t, e) { if (t) if (typeof t == "string") { - const n = Vi(t); + const n = Bi(t); return this.readGeometryFromDocument(n, e); } else - return Ui(t) ? this.readGeometryFromDocument( + return Zi(t) ? this.readGeometryFromDocument( t, e ) : this.readGeometryFromNode( @@ -15450,10 +15450,10 @@ class Pp extends Ud { readProjection(t) { if (t) if (typeof t == "string") { - const e = Vi(t); + const e = Bi(t); return this.readProjectionFromDocument(e); } else - return Ui(t) ? this.readProjectionFromDocument(t) : this.readProjectionFromNode(t); + return Zi(t) ? this.readProjectionFromDocument(t) : this.readProjectionFromNode(t); else return null; } @@ -15485,19 +15485,19 @@ class Pp extends Ud { return null; } } -const tf = Pp, ri = "http://www.opengis.net/gml", Op = /^\s*$/; -class St extends tf { +const $d = Ap, ri = "http://www.opengis.net/gml", Ip = /^\s*$/; +class St extends $d { constructor(t) { super(), t = t || {}, this.featureType = t.featureType, this.featureNS = t.featureNS, this.srsName = t.srsName, this.schemaLocation = "", this.FEATURE_COLLECTION_PARSERS = {}, this.FEATURE_COLLECTION_PARSERS[this.namespace] = { featureMember: W(this.readFeaturesInternal), - featureMembers: z(this.readFeaturesInternal) + featureMembers: G(this.readFeaturesInternal) }, this.supportedMediaTypes = ["application/gml+xml"]; } readFeaturesInternal(t, e) { const n = t.localName; let s = null; if (n == "FeatureCollection") - s = $( + s = k( [], this.FEATURE_COLLECTION_PARSERS, t, @@ -15515,16 +15515,16 @@ class St extends tf { if (g.nodeType === 1) { const m = g.nodeName.split(":").pop(); if (!o.includes(m)) { - let p = "", _ = 0; + let p = "", v = 0; const y = g.namespaceURI; - for (const v in a) { - if (a[v] === y) { - p = v; + for (const x in a) { + if (a[x] === y) { + p = x; break; } - ++_; + ++v; } - p || (p = l + _, a[p] = y), o.push(p + ":" + m); + p || (p = l + v, a[p] = y), o.push(p + ":" + m); } } } @@ -15538,16 +15538,16 @@ class St extends tf { for (const d in a) { const f = {}; for (let g = 0, m = u.length; g < m; ++g) - (u[g].includes(":") ? u[g].split(":")[0] : h) === d && (f[u[g].split(":").pop()] = n == "featureMembers" ? W(this.readFeatureElement, this) : z(this.readFeatureElement, this)); + (u[g].includes(":") ? u[g].split(":")[0] : h) === d && (f[u[g].split(":").pop()] = n == "featureMembers" ? W(this.readFeatureElement, this) : G(this.readFeatureElement, this)); c[a[d]] = f; } - n == "featureMember" || n == "member" ? s = $(void 0, c, t, e) : s = $([], c, t, e); + n == "featureMember" || n == "member" ? s = k(void 0, c, t, e) : s = k([], c, t, e); } return s === null && (s = []), s; } readGeometryOrExtent(t, e) { const n = e[0]; - return n.srsName = t.firstElementChild.getAttribute("srsName"), n.srsDimension = t.firstElementChild.getAttribute("srsDimension"), $( + return n.srsName = t.firstElementChild.getAttribute("srsName"), n.srsDimension = t.firstElementChild.getAttribute("srsDimension"), k( null, this.GEOMETRY_PARSERS, t, @@ -15557,11 +15557,11 @@ class St extends tf { } readExtentElement(t, e) { const n = e[0], s = this.readGeometryOrExtent(t, e); - return s ? Al(s, n) : void 0; + return s ? Tl(s, n) : void 0; } readGeometryElement(t, e) { const n = e[0], s = this.readGeometryOrExtent(t, e); - return s ? Ks(s, !1, n) : void 0; + return s ? qs(s, !1, n) : void 0; } readFeatureElementInternal(t, e, n) { let s; @@ -15569,7 +15569,7 @@ class St extends tf { for (let o = t.firstElementChild; o; o = o.nextElementSibling) { let a; const l = o.localName; - o.childNodes.length === 0 || o.childNodes.length === 1 && (o.firstChild.nodeType === 3 || o.firstChild.nodeType === 4) ? (a = Qi(o, !1), Op.test(a) && (a = void 0)) : (n && (a = l === "boundedBy" ? this.readExtentElement(o, e) : this.readGeometryElement(o, e)), a ? l !== "boundedBy" && (s = l) : a = this.readFeatureElementInternal(o, e, !1)); + o.childNodes.length === 0 || o.childNodes.length === 1 && (o.firstChild.nodeType === 3 || o.firstChild.nodeType === 4) ? (a = $i(o, !1), Ip.test(a) && (a = void 0)) : (n && (a = l === "boundedBy" ? this.readExtentElement(o, e) : this.readGeometryElement(o, e)), a ? l !== "boundedBy" && (s = l) : a = this.readFeatureElementInternal(o, e, !1)); const h = o.attributes.length; if (h > 0) { a = { _content_: a }; @@ -15597,7 +15597,7 @@ class St extends tf { return new oi(n, "XYZ"); } readMultiPoint(t, e) { - const n = $( + const n = k( [], this.MULTIPOINT_PARSERS, t, @@ -15605,10 +15605,10 @@ class St extends tf { this ); if (n) - return new Ro(n); + return new Po(n); } readMultiLineString(t, e) { - const n = $( + const n = k( [], this.MULTILINESTRING_PARSERS, t, @@ -15616,10 +15616,10 @@ class St extends tf { this ); if (n) - return new Pl(n); + return new Ll(n); } readMultiPolygon(t, e) { - const n = $( + const n = k( [], this.MULTIPOLYGON_PARSERS, t, @@ -15627,24 +15627,24 @@ class St extends tf { this ); if (n) - return new Nl(n); + return new Al(n); } pointMemberParser(t, e) { - Yi(this.POINTMEMBER_PARSERS, t, e, this); + Ui(this.POINTMEMBER_PARSERS, t, e, this); } lineStringMemberParser(t, e) { - Yi(this.LINESTRINGMEMBER_PARSERS, t, e, this); + Ui(this.LINESTRINGMEMBER_PARSERS, t, e, this); } polygonMemberParser(t, e) { - Yi(this.POLYGONMEMBER_PARSERS, t, e, this); + Ui(this.POLYGONMEMBER_PARSERS, t, e, this); } readLineString(t, e) { const n = this.readFlatCoordinatesFromNode(t, e); if (n) - return new Ds(n, "XYZ"); + return new Fs(n, "XYZ"); } readFlatLinearRing(t, e) { - const n = $( + const n = k( null, this.GEOMETRY_FLAT_COORDINATES_PARSERS, t, @@ -15657,10 +15657,10 @@ class St extends tf { readLinearRing(t, e) { const n = this.readFlatCoordinatesFromNode(t, e); if (n) - return new Ea(n, "XYZ"); + return new Ca(n, "XYZ"); } readPolygon(t, e) { - const n = $( + const n = k( [null], this.FLAT_LINEAR_RINGS_PARSERS, t, @@ -15671,13 +15671,13 @@ class St extends tf { const s = n[0], r = [s.length]; let o, a; for (o = 1, a = n.length; o < a; ++o) - Kt(s, n[o]), r.push(s.length); - return new Un(s, "XYZ", r); + qt(s, n[o]), r.push(s.length); + return new Zn(s, "XYZ", r); } else return; } readFlatCoordinatesFromNode(t, e) { - return $( + return k( null, this.GEOMETRY_FLAT_COORDINATES_PARSERS, t, @@ -15699,7 +15699,7 @@ class St extends tf { return n && Object.assign(n, this.getReadOptions(t, e)), this.readFeaturesInternal(t, [n]) || []; } readProjectionFromNode(t) { - return q( + return K( this.srsName ? this.srsName : t.firstElementChild.getAttribute("srsName") ); } @@ -15753,51 +15753,51 @@ St.prototype.POLYGONMEMBER_PARSERS = { }; St.prototype.RING_PARSERS = { "http://www.opengis.net/gml": { - LinearRing: z(St.prototype.readFlatLinearRing) + LinearRing: G(St.prototype.readFlatLinearRing) } }; -const K = St; +const q = St; function Np(i) { - const t = Qi(i, !1); - return Fp(t); + const t = $i(i, !1); + return zp(t); } -function Fp(i) { +function zp(i) { const t = /^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(i); if (t) return parseFloat(t[1]); } function ne(i) { - const t = Qi(i, !1); - return Rn(t); + const t = $i(i, !1); + return Sn(t); } -function Rn(i) { +function Sn(i) { const t = /^\s*(\d+)\s*$/.exec(i); if (t) return parseInt(t[1], 10); } function nt(i) { - return Qi(i, !1).trim(); + return $i(i, !1).trim(); } function Tt(i, t) { i.appendChild(Qd().createTextNode(t)); } -const Dp = ri + " http://schemas.opengis.net/gml/2.1.2/feature.xsd", kp = { +const Fp = ri + " http://schemas.opengis.net/gml/2.1.2/feature.xsd", Dp = { MultiLineString: "lineStringMember", MultiCurve: "curveMember", MultiPolygon: "polygonMember", MultiSurface: "surfaceMember" }; -class it extends K { +class it extends q { constructor(t) { t = t || {}, super(t), this.FEATURE_COLLECTION_PARSERS[ri].featureMember = W( this.readFeaturesInternal - ), this.schemaLocation = t.schemaLocation ? t.schemaLocation : Dp; + ), this.schemaLocation = t.schemaLocation ? t.schemaLocation : Fp; } readFlatCoordinates(t, e) { - const n = Qi(t, !1).replace(/^\s*|\s*$/g, ""), r = e[0].srsName; + const n = $i(t, !1).replace(/^\s*|\s*$/g, ""), r = e[0].srsName; let o = "enu"; if (r) { - const h = q(r); + const h = K(r); h && (o = h.getAxisOrientation()); } const a = n.trim().split(/\s+/), l = []; @@ -15808,14 +15808,14 @@ class it extends K { return l; } readBox(t, e) { - const n = $( + const n = k( [null], this.BOX_PARSERS_, t, e, this ); - return xe( + return Me( n[1][0], n[1][1], n[1][3], @@ -15823,7 +15823,7 @@ class it extends K { ); } innerBoundaryIsParser(t, e) { - const n = $( + const n = k( void 0, this.RING_PARSERS, t, @@ -15833,7 +15833,7 @@ class it extends K { n && e[e.length - 1].push(n); } outerBoundaryIsParser(t, e) { - const n = $( + const n = k( void 0, this.RING_PARSERS, t, @@ -15847,7 +15847,7 @@ class it extends K { } GEOMETRY_NODE_FACTORY_(t, e, n) { const s = e[e.length - 1], r = s.multiSurface, o = s.surface, a = s.multiCurve; - return Array.isArray(t) ? n = "Envelope" : (n = t.getType(), n === "MultiPolygon" && r === !0 ? n = "MultiSurface" : n === "Polygon" && o === !0 ? n = "Surface" : n === "MultiLineString" && a === !0 && (n = "MultiCurve")), j("http://www.opengis.net/gml", n); + return Array.isArray(t) ? n = "Envelope" : (n = t.getType(), n === "MultiPolygon" && r === !0 ? n = "MultiSurface" : n === "Polygon" && o === !0 ? n = "Surface" : n === "MultiLineString" && a === !0 && (n = "MultiCurve")), J("http://www.opengis.net/gml", n); } writeFeatureElement(t, e, n) { const s = e.getId(); @@ -15859,14 +15859,14 @@ class it extends K { const u = e.getProperties(); for (const d in u) { const f = u[d]; - f !== null && (l.push(d), h.push(f), d == a || typeof f.getSimplifiedGeometry == "function" ? d in r.serializers[o] || (r.serializers[o][d] = M( + f !== null && (l.push(d), h.push(f), d == a || typeof f.getSimplifiedGeometry == "function" ? d in r.serializers[o] || (r.serializers[o][d] = w( this.writeGeometryElement, this - )) : d in r.serializers[o] || (r.serializers[o][d] = M(Tt))); + )) : d in r.serializers[o] || (r.serializers[o][d] = w(Tt))); } } const c = Object.assign({}, r); - c.node = t, Et( + c.node = t, bt( c, r.serializers, de(void 0, o), @@ -15881,7 +15881,7 @@ class it extends K { const o = this.createCoordinatesNode_(t.namespaceURI); t.appendChild(o), this.writeCoordinates_(o, e, n); } else if (t.nodeName === "Curve") { - const o = j(t.namespaceURI, "segments"); + const o = J(t.namespaceURI, "segments"); t.appendChild(o), this.writeCurveSegments_(o, e, n); } } @@ -15893,7 +15893,7 @@ class it extends K { const s = n[n.length - 1], r = s.hasZ, o = s.srsName, a = s.curve; o && t.setAttribute("srsName", o); const l = e.getLineStrings(); - Et( + bt( { node: t, hasZ: r, srsName: o, curve: a }, this.LINESTRINGORCURVEMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, @@ -15907,14 +15907,14 @@ class it extends K { const s = n[n.length - 1], r = Object.assign({}, s); r.node = t; let o; - Array.isArray(e) ? o = Al( + Array.isArray(e) ? o = Tl( e, s - ) : o = Ks( + ) : o = qs( e, !0, s - ), Et( + ), bt( r, this.GEOMETRY_SERIALIZERS, this.GEOMETRY_NODE_FACTORY_, @@ -15925,7 +15925,7 @@ class it extends K { ); } createCoordinatesNode_(t) { - const e = j(t, "coordinates"); + const e = J(t, "coordinates"); return e.setAttribute("decimal", "."), e.setAttribute("cs", ","), e.setAttribute("ts", " "), e; } writeCoordinates_(t, e, n) { @@ -15937,14 +15937,14 @@ class it extends K { Tt(t, h.join(" ")); } writeCurveSegments_(t, e, n) { - const s = j(t.namespaceURI, "LineStringSegment"); + const s = J(t.namespaceURI, "LineStringSegment"); t.appendChild(s), this.writeCurveOrLineString(s, e, n); } writeSurfaceOrPolygon(t, e, n) { const s = n[n.length - 1], r = s.hasZ, o = s.srsName; if (t.nodeName !== "PolygonPatch" && o && t.setAttribute("srsName", o), t.nodeName === "Polygon" || t.nodeName === "PolygonPatch") { const a = e.getLinearRings(); - Et( + bt( { node: t, hasZ: r, srsName: o }, this.RING_SERIALIZERS, this.RING_NODE_FACTORY_, @@ -15954,28 +15954,28 @@ class it extends K { this ); } else if (t.nodeName === "Surface") { - const a = j(t.namespaceURI, "patches"); + const a = J(t.namespaceURI, "patches"); t.appendChild(a), this.writeSurfacePatches_(a, e, n); } } RING_NODE_FACTORY_(t, e, n) { const s = e[e.length - 1], r = s.node, o = s.exteriorWritten; - return o === void 0 && (s.exteriorWritten = !0), j( + return o === void 0 && (s.exteriorWritten = !0), J( r.namespaceURI, o !== void 0 ? "innerBoundaryIs" : "outerBoundaryIs" ); } writeSurfacePatches_(t, e, n) { - const s = j(t.namespaceURI, "PolygonPatch"); + const s = J(t.namespaceURI, "PolygonPatch"); t.appendChild(s), this.writeSurfaceOrPolygon(s, e, n); } writeRing(t, e, n) { - const s = j(t.namespaceURI, "LinearRing"); + const s = J(t.namespaceURI, "LinearRing"); t.appendChild(s), this.writeLinearRing(s, e, n); } getCoords_(t, e, n) { let s = "enu"; - e && (s = q(e).getAxisOrientation()); + e && (s = K(e).getAxisOrientation()); let r = s.substr(0, 2) === "en" ? t[0] + "," + t[1] : t[1] + "," + t[0]; if (n) { const o = t[2] || 0; @@ -15995,7 +15995,7 @@ class it extends K { const s = n[n.length - 1], r = s.hasZ, o = s.srsName; o && t.setAttribute("srsName", o); const a = e.getPoints(); - Et( + bt( { node: t, hasZ: r, srsName: o }, this.POINTMEMBER_SERIALIZERS, de("pointMember"), @@ -16006,7 +16006,7 @@ class it extends K { ); } writePointMember(t, e, n) { - const s = j(t.namespaceURI, "Point"); + const s = J(t.namespaceURI, "Point"); t.appendChild(s), this.writePoint(s, e, n); } writeLinearRing(t, e, n) { @@ -16019,7 +16019,7 @@ class it extends K { const s = n[n.length - 1], r = s.hasZ, o = s.srsName, a = s.surface; o && t.setAttribute("srsName", o); const l = e.getPolygons(); - Et( + bt( { node: t, hasZ: r, srsName: o, surface: a }, this.SURFACEORPOLYGONMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, @@ -16037,10 +16037,10 @@ class it extends K { const r = n[n.length - 1].srsName; r && t.setAttribute("srsName", r); const o = ["lowerCorner", "upperCorner"], a = [e[0] + " " + e[1], e[2] + " " + e[3]]; - Et( + bt( { node: t }, this.ENVELOPE_SERIALIZERS, - Jd, + Kd, a, n, o, @@ -16049,15 +16049,15 @@ class it extends K { } MULTIGEOMETRY_MEMBER_NODE_FACTORY_(t, e, n) { const s = e[e.length - 1].node; - return j( + return J( "http://www.opengis.net/gml", - kp[s.nodeName] + Dp[s.nodeName] ); } } it.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { "http://www.opengis.net/gml": { - coordinates: z(it.prototype.readFlatCoordinates) + coordinates: G(it.prototype.readFlatCoordinates) } }; it.prototype.FLAT_LINEAR_RINGS_PARSERS = { @@ -16073,87 +16073,87 @@ it.prototype.BOX_PARSERS_ = { }; it.prototype.GEOMETRY_PARSERS = { "http://www.opengis.net/gml": { - Point: z(K.prototype.readPoint), - MultiPoint: z(K.prototype.readMultiPoint), - LineString: z(K.prototype.readLineString), - MultiLineString: z(K.prototype.readMultiLineString), - LinearRing: z(K.prototype.readLinearRing), - Polygon: z(K.prototype.readPolygon), - MultiPolygon: z(K.prototype.readMultiPolygon), - Box: z(it.prototype.readBox) + Point: G(q.prototype.readPoint), + MultiPoint: G(q.prototype.readMultiPoint), + LineString: G(q.prototype.readLineString), + MultiLineString: G(q.prototype.readMultiLineString), + LinearRing: G(q.prototype.readLinearRing), + Polygon: G(q.prototype.readPolygon), + MultiPolygon: G(q.prototype.readMultiPolygon), + Box: G(it.prototype.readBox) } }; it.prototype.GEOMETRY_SERIALIZERS = { "http://www.opengis.net/gml": { - Curve: M(it.prototype.writeCurveOrLineString), - MultiCurve: M(it.prototype.writeMultiCurveOrLineString), - Point: M(it.prototype.writePoint), - MultiPoint: M(it.prototype.writeMultiPoint), - LineString: M(it.prototype.writeCurveOrLineString), - MultiLineString: M( + Curve: w(it.prototype.writeCurveOrLineString), + MultiCurve: w(it.prototype.writeMultiCurveOrLineString), + Point: w(it.prototype.writePoint), + MultiPoint: w(it.prototype.writeMultiPoint), + LineString: w(it.prototype.writeCurveOrLineString), + MultiLineString: w( it.prototype.writeMultiCurveOrLineString ), - LinearRing: M(it.prototype.writeLinearRing), - Polygon: M(it.prototype.writeSurfaceOrPolygon), - MultiPolygon: M( + LinearRing: w(it.prototype.writeLinearRing), + Polygon: w(it.prototype.writeSurfaceOrPolygon), + MultiPolygon: w( it.prototype.writeMultiSurfaceOrPolygon ), - Surface: M(it.prototype.writeSurfaceOrPolygon), - MultiSurface: M( + Surface: w(it.prototype.writeSurfaceOrPolygon), + MultiSurface: w( it.prototype.writeMultiSurfaceOrPolygon ), - Envelope: M(it.prototype.writeEnvelope) + Envelope: w(it.prototype.writeEnvelope) } }; it.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = { "http://www.opengis.net/gml": { - lineStringMember: M( + lineStringMember: w( it.prototype.writeLineStringOrCurveMember ), - curveMember: M( + curveMember: w( it.prototype.writeLineStringOrCurveMember ) } }; it.prototype.RING_SERIALIZERS = { "http://www.opengis.net/gml": { - outerBoundaryIs: M(it.prototype.writeRing), - innerBoundaryIs: M(it.prototype.writeRing) + outerBoundaryIs: w(it.prototype.writeRing), + innerBoundaryIs: w(it.prototype.writeRing) } }; it.prototype.POINTMEMBER_SERIALIZERS = { "http://www.opengis.net/gml": { - pointMember: M(it.prototype.writePointMember) + pointMember: w(it.prototype.writePointMember) } }; it.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = { "http://www.opengis.net/gml": { - surfaceMember: M( + surfaceMember: w( it.prototype.writeSurfaceOrPolygonMember ), - polygonMember: M( + polygonMember: w( it.prototype.writeSurfaceOrPolygonMember ) } }; it.prototype.ENVELOPE_SERIALIZERS = { "http://www.opengis.net/gml": { - lowerCorner: M(Tt), - upperCorner: M(Tt) + lowerCorner: w(Tt), + upperCorner: w(Tt) } }; -const qs = it, Gp = ri + " http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd", $p = { +const Ks = it, jp = ri + " http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd", kp = { MultiLineString: "lineStringMember", MultiCurve: "curveMember", MultiPolygon: "polygonMember", MultiSurface: "surfaceMember" }; -class F extends K { +class z extends q { constructor(t) { - t = t || {}, super(t), this.surface_ = t.surface !== void 0 ? t.surface : !1, this.curve_ = t.curve !== void 0 ? t.curve : !1, this.multiCurve_ = t.multiCurve !== void 0 ? t.multiCurve : !0, this.multiSurface_ = t.multiSurface !== void 0 ? t.multiSurface : !0, this.schemaLocation = t.schemaLocation ? t.schemaLocation : Gp, this.hasZ = t.hasZ !== void 0 ? t.hasZ : !1; + t = t || {}, super(t), this.surface_ = t.surface !== void 0 ? t.surface : !1, this.curve_ = t.curve !== void 0 ? t.curve : !1, this.multiCurve_ = t.multiCurve !== void 0 ? t.multiCurve : !0, this.multiSurface_ = t.multiSurface !== void 0 ? t.multiSurface : !0, this.schemaLocation = t.schemaLocation ? t.schemaLocation : jp, this.hasZ = t.hasZ !== void 0 ? t.hasZ : !1; } readMultiCurve(t, e) { - const n = $( + const n = k( [], this.MULTICURVE_PARSERS, t, @@ -16161,10 +16161,10 @@ class F extends K { this ); if (n) - return new Pl(n); + return new Ll(n); } readFlatCurveRing(t, e) { - const n = $( + const n = k( [], this.MULTICURVE_PARSERS, t, @@ -16172,11 +16172,11 @@ class F extends K { this ), s = []; for (let r = 0, o = n.length; r < o; ++r) - Kt(s, n[r].getFlatCoordinates()); + qt(s, n[r].getFlatCoordinates()); return s; } readMultiSurface(t, e) { - const n = $( + const n = k( [], this.MULTISURFACE_PARSERS, t, @@ -16184,16 +16184,16 @@ class F extends K { this ); if (n) - return new Nl(n); + return new Al(n); } curveMemberParser(t, e) { - Yi(this.CURVEMEMBER_PARSERS, t, e, this); + Ui(this.CURVEMEMBER_PARSERS, t, e, this); } surfaceMemberParser(t, e) { - Yi(this.SURFACEMEMBER_PARSERS, t, e, this); + Ui(this.SURFACEMEMBER_PARSERS, t, e, this); } readPatch(t, e) { - return $( + return k( [null], this.PATCHES_PARSERS, t, @@ -16202,10 +16202,10 @@ class F extends K { ); } readSegment(t, e) { - return $([], this.SEGMENTS_PARSERS, t, e, this); + return k([], this.SEGMENTS_PARSERS, t, e, this); } readPolygonPatch(t, e) { - return $( + return k( [null], this.FLAT_LINEAR_RINGS_PARSERS, t, @@ -16214,7 +16214,7 @@ class F extends K { ); } readLineStringSegment(t, e) { - return $( + return k( [null], this.GEOMETRY_FLAT_COORDINATES_PARSERS, t, @@ -16223,7 +16223,7 @@ class F extends K { ); } interiorParser(t, e) { - const n = $( + const n = k( void 0, this.RING_PARSERS, t, @@ -16233,7 +16233,7 @@ class F extends K { n && e[e.length - 1].push(n); } exteriorParser(t, e) { - const n = $( + const n = k( void 0, this.RING_PARSERS, t, @@ -16246,7 +16246,7 @@ class F extends K { } } readSurface(t, e) { - const n = $( + const n = k( [null], this.SURFACE_PARSERS, t, @@ -16257,13 +16257,13 @@ class F extends K { const s = n[0], r = [s.length]; let o, a; for (o = 1, a = n.length; o < a; ++o) - Kt(s, n[o]), r.push(s.length); - return new Un(s, "XYZ", r); + qt(s, n[o]), r.push(s.length); + return new Zn(s, "XYZ", r); } else return; } readCurve(t, e) { - const n = $( + const n = k( [null], this.CURVE_PARSERS, t, @@ -16271,17 +16271,17 @@ class F extends K { this ); if (n) - return new Ds(n, "XYZ"); + return new Fs(n, "XYZ"); } readEnvelope(t, e) { - const n = $( + const n = k( [null], this.ENVELOPE_PARSERS, t, e, this ); - return xe( + return Me( n[1][0], n[1][1], n[2][0], @@ -16289,7 +16289,7 @@ class F extends K { ); } readFlatPos(t, e) { - let n = Qi(t, !1); + let n = $i(t, !1); const s = /^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/, r = []; let o; for (; o = s.exec(n); ) @@ -16298,7 +16298,7 @@ class F extends K { return; const l = e[0].srsName; let h = "enu"; - if (l && (h = q(l).getAxisOrientation()), h === "neu") { + if (l && (h = K(l).getAxisOrientation()), h === "neu") { let u, d; for (u = 0, d = r.length; u < d; u += 3) { const f = r[u], g = r[u + 1]; @@ -16310,14 +16310,14 @@ class F extends K { return r; } readFlatPosList(t, e) { - const n = Qi(t, !1).replace(/^\s*|\s*$/g, ""), s = e[0], r = s.srsName, o = s.srsDimension; + const n = $i(t, !1).replace(/^\s*|\s*$/g, ""), s = e[0], r = s.srsName, o = s.srsDimension; let a = "enu"; - r && (a = q(r).getAxisOrientation()); + r && (a = K(r).getAxisOrientation()); const l = n.split(/\s+/); let h = 2; - t.getAttribute("srsDimension") ? h = Rn(t.getAttribute("srsDimension")) : t.getAttribute("dimension") ? h = Rn(t.getAttribute("dimension")) : t.parentNode.getAttribute("srsDimension") ? h = Rn( + t.getAttribute("srsDimension") ? h = Sn(t.getAttribute("srsDimension")) : t.getAttribute("dimension") ? h = Sn(t.getAttribute("dimension")) : t.parentNode.getAttribute("srsDimension") ? h = Sn( t.parentNode.getAttribute("srsDimension") - ) : o && (h = Rn(o)); + ) : o && (h = Sn(o)); let c, u, d; const f = []; for (let g = 0, m = l.length; g < m; g += h) @@ -16329,7 +16329,7 @@ class F extends K { t.setAttribute("srsDimension", o); const a = s.srsName; let l = "enu"; - a && (l = q(a).getAxisOrientation()); + a && (l = K(a).getAxisOrientation()); const h = e.getCoordinates(); let c; if (l.substr(0, 2) === "en" ? c = h[0] + " " + h[1] : c = h[1] + " " + h[0], r) { @@ -16340,7 +16340,7 @@ class F extends K { } getCoords_(t, e, n) { let s = "enu"; - e && (s = q(e).getAxisOrientation()); + e && (s = K(e).getAxisOrientation()); let r = s.substr(0, 2) === "en" ? t[0] + " " + t[1] : t[1] + " " + t[0]; if (n) { const o = t[2] || 0; @@ -16360,17 +16360,17 @@ class F extends K { writePoint(t, e, n) { const r = n[n.length - 1].srsName; r && t.setAttribute("srsName", r); - const o = j(t.namespaceURI, "pos"); + const o = J(t.namespaceURI, "pos"); t.appendChild(o), this.writePos_(o, e, n); } writeEnvelope(t, e, n) { const r = n[n.length - 1].srsName; r && t.setAttribute("srsName", r); const o = ["lowerCorner", "upperCorner"], a = [e[0] + " " + e[1], e[2] + " " + e[3]]; - Et( + bt( { node: t }, this.ENVELOPE_SERIALIZERS, - Jd, + Kd, a, n, o, @@ -16380,12 +16380,12 @@ class F extends K { writeLinearRing(t, e, n) { const r = n[n.length - 1].srsName; r && t.setAttribute("srsName", r); - const o = j(t.namespaceURI, "posList"); + const o = J(t.namespaceURI, "posList"); t.appendChild(o), this.writePosList_(o, e, n); } RING_NODE_FACTORY_(t, e, n) { const s = e[e.length - 1], r = s.node, o = s.exteriorWritten; - return o === void 0 && (s.exteriorWritten = !0), j( + return o === void 0 && (s.exteriorWritten = !0), J( r.namespaceURI, o !== void 0 ? "interior" : "exterior" ); @@ -16394,7 +16394,7 @@ class F extends K { const s = n[n.length - 1], r = s.hasZ, o = s.srsName; if (t.nodeName !== "PolygonPatch" && o && t.setAttribute("srsName", o), t.nodeName === "Polygon" || t.nodeName === "PolygonPatch") { const a = e.getLinearRings(); - Et( + bt( { node: t, hasZ: r, srsName: o }, this.RING_SERIALIZERS, this.RING_NODE_FACTORY_, @@ -16404,17 +16404,17 @@ class F extends K { this ); } else if (t.nodeName === "Surface") { - const a = j(t.namespaceURI, "patches"); + const a = J(t.namespaceURI, "patches"); t.appendChild(a), this.writeSurfacePatches_(a, e, n); } } writeCurveOrLineString(t, e, n) { const r = n[n.length - 1].srsName; if (t.nodeName !== "LineStringSegment" && r && t.setAttribute("srsName", r), t.nodeName === "LineString" || t.nodeName === "LineStringSegment") { - const o = j(t.namespaceURI, "posList"); + const o = J(t.namespaceURI, "posList"); t.appendChild(o), this.writePosList_(o, e, n); } else if (t.nodeName === "Curve") { - const o = j(t.namespaceURI, "segments"); + const o = J(t.namespaceURI, "segments"); t.appendChild(o), this.writeCurveSegments_(o, e, n); } } @@ -16422,7 +16422,7 @@ class F extends K { const s = n[n.length - 1], r = s.hasZ, o = s.srsName, a = s.surface; o && t.setAttribute("srsName", o); const l = e.getPolygons(); - Et( + bt( { node: t, hasZ: r, srsName: o, surface: a }, this.SURFACEORPOLYGONMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, @@ -16436,7 +16436,7 @@ class F extends K { const s = n[n.length - 1], r = s.srsName, o = s.hasZ; r && t.setAttribute("srsName", r); const a = e.getPoints(); - Et( + bt( { node: t, hasZ: o, srsName: r }, this.POINTMEMBER_SERIALIZERS, de("pointMember"), @@ -16450,7 +16450,7 @@ class F extends K { const s = n[n.length - 1], r = s.hasZ, o = s.srsName, a = s.curve; o && t.setAttribute("srsName", o); const l = e.getLineStrings(); - Et( + bt( { node: t, hasZ: r, srsName: o, curve: a }, this.LINESTRINGORCURVEMEMBER_SERIALIZERS, this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_, @@ -16461,7 +16461,7 @@ class F extends K { ); } writeRing(t, e, n) { - const s = j(t.namespaceURI, "LinearRing"); + const s = J(t.namespaceURI, "LinearRing"); t.appendChild(s), this.writeLinearRing(s, e, n); } writeSurfaceOrPolygonMember(t, e, n) { @@ -16469,7 +16469,7 @@ class F extends K { s && (t.appendChild(s), this.writeSurfaceOrPolygon(s, e, n)); } writePointMember(t, e, n) { - const s = j(t.namespaceURI, "Point"); + const s = J(t.namespaceURI, "Point"); t.appendChild(s), this.writePoint(s, e, n); } writeLineStringOrCurveMember(t, e, n) { @@ -16477,25 +16477,25 @@ class F extends K { s && (t.appendChild(s), this.writeCurveOrLineString(s, e, n)); } writeSurfacePatches_(t, e, n) { - const s = j(t.namespaceURI, "PolygonPatch"); + const s = J(t.namespaceURI, "PolygonPatch"); t.appendChild(s), this.writeSurfaceOrPolygon(s, e, n); } writeCurveSegments_(t, e, n) { - const s = j(t.namespaceURI, "LineStringSegment"); + const s = J(t.namespaceURI, "LineStringSegment"); t.appendChild(s), this.writeCurveOrLineString(s, e, n); } writeGeometryElement(t, e, n) { const s = n[n.length - 1], r = Object.assign({}, s); r.node = t; let o; - Array.isArray(e) ? o = Al( + Array.isArray(e) ? o = Tl( e, s - ) : o = Ks( + ) : o = qs( e, !0, s - ), Et( + ), bt( r, this.GEOMETRY_SERIALIZERS, this.GEOMETRY_NODE_FACTORY_, @@ -16515,14 +16515,14 @@ class F extends K { const u = e.getProperties(); for (const d in u) { const f = u[d]; - f !== null && (l.push(d), h.push(f), d == a || typeof f.getSimplifiedGeometry == "function" ? d in r.serializers[o] || (r.serializers[o][d] = M( + f !== null && (l.push(d), h.push(f), d == a || typeof f.getSimplifiedGeometry == "function" ? d in r.serializers[o] || (r.serializers[o][d] = w( this.writeGeometryElement, this - )) : d in r.serializers[o] || (r.serializers[o][d] = M(Tt))); + )) : d in r.serializers[o] || (r.serializers[o][d] = w(Tt))); } } const c = Object.assign({}, r); - c.node = t, Et( + c.node = t, bt( c, r.serializers, de(void 0, o), @@ -16533,12 +16533,12 @@ class F extends K { } writeFeatureMembers_(t, e, n) { const s = n[n.length - 1], r = s.featureType, o = s.featureNS, a = {}; - a[o] = {}, a[o][r] = M( + a[o] = {}, a[o][r] = w( this.writeFeatureElement, this ); const l = Object.assign({}, s); - l.node = t, Et( + l.node = t, bt( l, a, de(r, o), @@ -16548,18 +16548,18 @@ class F extends K { } MULTIGEOMETRY_MEMBER_NODE_FACTORY_(t, e, n) { const s = e[e.length - 1].node; - return j( + return J( this.namespace, - $p[s.nodeName] + kp[s.nodeName] ); } GEOMETRY_NODE_FACTORY_(t, e, n) { const s = e[e.length - 1], r = s.multiSurface, o = s.surface, a = s.curve, l = s.multiCurve; - return Array.isArray(t) ? n = "Envelope" : (n = t.getType(), n === "MultiPolygon" && r === !0 ? n = "MultiSurface" : n === "Polygon" && o === !0 ? n = "Surface" : n === "LineString" && a === !0 ? n = "Curve" : n === "MultiLineString" && l === !0 && (n = "MultiCurve")), j(this.namespace, n); + return Array.isArray(t) ? n = "Envelope" : (n = t.getType(), n === "MultiPolygon" && r === !0 ? n = "MultiSurface" : n === "Polygon" && o === !0 ? n = "Surface" : n === "LineString" && a === !0 ? n = "Curve" : n === "MultiLineString" && l === !0 && (n = "MultiCurve")), J(this.namespace, n); } writeGeometryNode(t, e) { e = this.adaptOptions(e); - const n = j(this.namespace, "geom"), s = { + const n = J(this.namespace, "geom"), s = { node: n, hasZ: this.hasZ, srsName: this.srsName, @@ -16572,9 +16572,9 @@ class F extends K { } writeFeaturesNode(t, e) { e = this.adaptOptions(e); - const n = j(this.namespace, "featureMembers"); + const n = J(this.namespace, "featureMembers"); n.setAttributeNS( - Fa, + Ia, "xsi:schemaLocation", this.schemaLocation ); @@ -16591,155 +16591,155 @@ class F extends K { return e && Object.assign(s, e), this.writeFeatureMembers_(n, t, [s]), n; } } -F.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { +z.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { "http://www.opengis.net/gml": { - pos: z(F.prototype.readFlatPos), - posList: z(F.prototype.readFlatPosList), - coordinates: z(qs.prototype.readFlatCoordinates) + pos: G(z.prototype.readFlatPos), + posList: G(z.prototype.readFlatPosList), + coordinates: G(Ks.prototype.readFlatCoordinates) } }; -F.prototype.FLAT_LINEAR_RINGS_PARSERS = { +z.prototype.FLAT_LINEAR_RINGS_PARSERS = { "http://www.opengis.net/gml": { - interior: F.prototype.interiorParser, - exterior: F.prototype.exteriorParser + interior: z.prototype.interiorParser, + exterior: z.prototype.exteriorParser } }; -F.prototype.GEOMETRY_PARSERS = { +z.prototype.GEOMETRY_PARSERS = { "http://www.opengis.net/gml": { - Point: z(K.prototype.readPoint), - MultiPoint: z(K.prototype.readMultiPoint), - LineString: z(K.prototype.readLineString), - MultiLineString: z(K.prototype.readMultiLineString), - LinearRing: z(K.prototype.readLinearRing), - Polygon: z(K.prototype.readPolygon), - MultiPolygon: z(K.prototype.readMultiPolygon), - Surface: z(F.prototype.readSurface), - MultiSurface: z(F.prototype.readMultiSurface), - Curve: z(F.prototype.readCurve), - MultiCurve: z(F.prototype.readMultiCurve), - Envelope: z(F.prototype.readEnvelope) + Point: G(q.prototype.readPoint), + MultiPoint: G(q.prototype.readMultiPoint), + LineString: G(q.prototype.readLineString), + MultiLineString: G(q.prototype.readMultiLineString), + LinearRing: G(q.prototype.readLinearRing), + Polygon: G(q.prototype.readPolygon), + MultiPolygon: G(q.prototype.readMultiPolygon), + Surface: G(z.prototype.readSurface), + MultiSurface: G(z.prototype.readMultiSurface), + Curve: G(z.prototype.readCurve), + MultiCurve: G(z.prototype.readMultiCurve), + Envelope: G(z.prototype.readEnvelope) } }; -F.prototype.MULTICURVE_PARSERS = { +z.prototype.MULTICURVE_PARSERS = { "http://www.opengis.net/gml": { - curveMember: W(F.prototype.curveMemberParser), - curveMembers: W(F.prototype.curveMemberParser) + curveMember: W(z.prototype.curveMemberParser), + curveMembers: W(z.prototype.curveMemberParser) } }; -F.prototype.MULTISURFACE_PARSERS = { +z.prototype.MULTISURFACE_PARSERS = { "http://www.opengis.net/gml": { - surfaceMember: W(F.prototype.surfaceMemberParser), - surfaceMembers: W(F.prototype.surfaceMemberParser) + surfaceMember: W(z.prototype.surfaceMemberParser), + surfaceMembers: W(z.prototype.surfaceMemberParser) } }; -F.prototype.CURVEMEMBER_PARSERS = { +z.prototype.CURVEMEMBER_PARSERS = { "http://www.opengis.net/gml": { - LineString: W(K.prototype.readLineString), - Curve: W(F.prototype.readCurve) + LineString: W(q.prototype.readLineString), + Curve: W(z.prototype.readCurve) } }; -F.prototype.SURFACEMEMBER_PARSERS = { +z.prototype.SURFACEMEMBER_PARSERS = { "http://www.opengis.net/gml": { - Polygon: W(K.prototype.readPolygon), - Surface: W(F.prototype.readSurface) + Polygon: W(q.prototype.readPolygon), + Surface: W(z.prototype.readSurface) } }; -F.prototype.SURFACE_PARSERS = { +z.prototype.SURFACE_PARSERS = { "http://www.opengis.net/gml": { - patches: z(F.prototype.readPatch) + patches: G(z.prototype.readPatch) } }; -F.prototype.CURVE_PARSERS = { +z.prototype.CURVE_PARSERS = { "http://www.opengis.net/gml": { - segments: z(F.prototype.readSegment) + segments: G(z.prototype.readSegment) } }; -F.prototype.ENVELOPE_PARSERS = { +z.prototype.ENVELOPE_PARSERS = { "http://www.opengis.net/gml": { - lowerCorner: W(F.prototype.readFlatPosList), - upperCorner: W(F.prototype.readFlatPosList) + lowerCorner: W(z.prototype.readFlatPosList), + upperCorner: W(z.prototype.readFlatPosList) } }; -F.prototype.PATCHES_PARSERS = { +z.prototype.PATCHES_PARSERS = { "http://www.opengis.net/gml": { - PolygonPatch: z(F.prototype.readPolygonPatch) + PolygonPatch: G(z.prototype.readPolygonPatch) } }; -F.prototype.SEGMENTS_PARSERS = { +z.prototype.SEGMENTS_PARSERS = { "http://www.opengis.net/gml": { LineStringSegment: qd( - F.prototype.readLineStringSegment + z.prototype.readLineStringSegment ) } }; -K.prototype.RING_PARSERS = { +q.prototype.RING_PARSERS = { "http://www.opengis.net/gml": { - LinearRing: z(K.prototype.readFlatLinearRing), - Ring: z(F.prototype.readFlatCurveRing) + LinearRing: G(q.prototype.readFlatLinearRing), + Ring: G(z.prototype.readFlatCurveRing) } }; -F.prototype.writeFeatures; -F.prototype.RING_SERIALIZERS = { +z.prototype.writeFeatures; +z.prototype.RING_SERIALIZERS = { "http://www.opengis.net/gml": { - exterior: M(F.prototype.writeRing), - interior: M(F.prototype.writeRing) + exterior: w(z.prototype.writeRing), + interior: w(z.prototype.writeRing) } }; -F.prototype.ENVELOPE_SERIALIZERS = { +z.prototype.ENVELOPE_SERIALIZERS = { "http://www.opengis.net/gml": { - lowerCorner: M(Tt), - upperCorner: M(Tt) + lowerCorner: w(Tt), + upperCorner: w(Tt) } }; -F.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = { +z.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = { "http://www.opengis.net/gml": { - surfaceMember: M( - F.prototype.writeSurfaceOrPolygonMember + surfaceMember: w( + z.prototype.writeSurfaceOrPolygonMember ), - polygonMember: M( - F.prototype.writeSurfaceOrPolygonMember + polygonMember: w( + z.prototype.writeSurfaceOrPolygonMember ) } }; -F.prototype.POINTMEMBER_SERIALIZERS = { +z.prototype.POINTMEMBER_SERIALIZERS = { "http://www.opengis.net/gml": { - pointMember: M(F.prototype.writePointMember) + pointMember: w(z.prototype.writePointMember) } }; -F.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = { +z.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = { "http://www.opengis.net/gml": { - lineStringMember: M( - F.prototype.writeLineStringOrCurveMember + lineStringMember: w( + z.prototype.writeLineStringOrCurveMember ), - curveMember: M( - F.prototype.writeLineStringOrCurveMember + curveMember: w( + z.prototype.writeLineStringOrCurveMember ) } }; -F.prototype.GEOMETRY_SERIALIZERS = { +z.prototype.GEOMETRY_SERIALIZERS = { "http://www.opengis.net/gml": { - Curve: M(F.prototype.writeCurveOrLineString), - MultiCurve: M(F.prototype.writeMultiCurveOrLineString), - Point: M(F.prototype.writePoint), - MultiPoint: M(F.prototype.writeMultiPoint), - LineString: M(F.prototype.writeCurveOrLineString), - MultiLineString: M( - F.prototype.writeMultiCurveOrLineString + Curve: w(z.prototype.writeCurveOrLineString), + MultiCurve: w(z.prototype.writeMultiCurveOrLineString), + Point: w(z.prototype.writePoint), + MultiPoint: w(z.prototype.writeMultiPoint), + LineString: w(z.prototype.writeCurveOrLineString), + MultiLineString: w( + z.prototype.writeMultiCurveOrLineString ), - LinearRing: M(F.prototype.writeLinearRing), - Polygon: M(F.prototype.writeSurfaceOrPolygon), - MultiPolygon: M( - F.prototype.writeMultiSurfaceOrPolygon + LinearRing: w(z.prototype.writeLinearRing), + Polygon: w(z.prototype.writeSurfaceOrPolygon), + MultiPolygon: w( + z.prototype.writeMultiSurfaceOrPolygon ), - Surface: M(F.prototype.writeSurfaceOrPolygon), - MultiSurface: M( - F.prototype.writeMultiSurfaceOrPolygon + Surface: w(z.prototype.writeSurfaceOrPolygon), + MultiSurface: w( + z.prototype.writeMultiSurfaceOrPolygon ), - Envelope: M(F.prototype.writeEnvelope) + Envelope: w(z.prototype.writeEnvelope) } }; -const J = F; -class ot extends J { +const Q = z; +class ot extends Q { constructor(t) { t = t || {}, super(t), this.schemaLocation = t.schemaLocation ? t.schemaLocation : this.namespace + " http://schemas.opengis.net/gml/3.2.1/gml.xsd"; } @@ -16747,189 +16747,189 @@ class ot extends J { ot.prototype.namespace = "http://www.opengis.net/gml/3.2"; ot.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS = { "http://www.opengis.net/gml/3.2": { - pos: z(J.prototype.readFlatPos), - posList: z(J.prototype.readFlatPosList), - coordinates: z(qs.prototype.readFlatCoordinates) + pos: G(Q.prototype.readFlatPos), + posList: G(Q.prototype.readFlatPosList), + coordinates: G(Ks.prototype.readFlatCoordinates) } }; ot.prototype.FLAT_LINEAR_RINGS_PARSERS = { "http://www.opengis.net/gml/3.2": { - interior: J.prototype.interiorParser, - exterior: J.prototype.exteriorParser + interior: Q.prototype.interiorParser, + exterior: Q.prototype.exteriorParser } }; ot.prototype.GEOMETRY_PARSERS = { "http://www.opengis.net/gml/3.2": { - Point: z(K.prototype.readPoint), - MultiPoint: z(K.prototype.readMultiPoint), - LineString: z(K.prototype.readLineString), - MultiLineString: z(K.prototype.readMultiLineString), - LinearRing: z(K.prototype.readLinearRing), - Polygon: z(K.prototype.readPolygon), - MultiPolygon: z(K.prototype.readMultiPolygon), - Surface: z(ot.prototype.readSurface), - MultiSurface: z(J.prototype.readMultiSurface), - Curve: z(ot.prototype.readCurve), - MultiCurve: z(J.prototype.readMultiCurve), - Envelope: z(ot.prototype.readEnvelope) + Point: G(q.prototype.readPoint), + MultiPoint: G(q.prototype.readMultiPoint), + LineString: G(q.prototype.readLineString), + MultiLineString: G(q.prototype.readMultiLineString), + LinearRing: G(q.prototype.readLinearRing), + Polygon: G(q.prototype.readPolygon), + MultiPolygon: G(q.prototype.readMultiPolygon), + Surface: G(ot.prototype.readSurface), + MultiSurface: G(Q.prototype.readMultiSurface), + Curve: G(ot.prototype.readCurve), + MultiCurve: G(Q.prototype.readMultiCurve), + Envelope: G(ot.prototype.readEnvelope) } }; ot.prototype.MULTICURVE_PARSERS = { "http://www.opengis.net/gml/3.2": { - curveMember: W(J.prototype.curveMemberParser), - curveMembers: W(J.prototype.curveMemberParser) + curveMember: W(Q.prototype.curveMemberParser), + curveMembers: W(Q.prototype.curveMemberParser) } }; ot.prototype.MULTISURFACE_PARSERS = { "http://www.opengis.net/gml/3.2": { - surfaceMember: W(J.prototype.surfaceMemberParser), - surfaceMembers: W(J.prototype.surfaceMemberParser) + surfaceMember: W(Q.prototype.surfaceMemberParser), + surfaceMembers: W(Q.prototype.surfaceMemberParser) } }; ot.prototype.CURVEMEMBER_PARSERS = { "http://www.opengis.net/gml/3.2": { - LineString: W(K.prototype.readLineString), - Curve: W(J.prototype.readCurve) + LineString: W(q.prototype.readLineString), + Curve: W(Q.prototype.readCurve) } }; ot.prototype.SURFACEMEMBER_PARSERS = { "http://www.opengis.net/gml/3.2": { - Polygon: W(K.prototype.readPolygon), - Surface: W(J.prototype.readSurface) + Polygon: W(q.prototype.readPolygon), + Surface: W(Q.prototype.readSurface) } }; ot.prototype.SURFACE_PARSERS = { "http://www.opengis.net/gml/3.2": { - patches: z(J.prototype.readPatch) + patches: G(Q.prototype.readPatch) } }; ot.prototype.CURVE_PARSERS = { "http://www.opengis.net/gml/3.2": { - segments: z(J.prototype.readSegment) + segments: G(Q.prototype.readSegment) } }; ot.prototype.ENVELOPE_PARSERS = { "http://www.opengis.net/gml/3.2": { - lowerCorner: W(J.prototype.readFlatPosList), - upperCorner: W(J.prototype.readFlatPosList) + lowerCorner: W(Q.prototype.readFlatPosList), + upperCorner: W(Q.prototype.readFlatPosList) } }; ot.prototype.PATCHES_PARSERS = { "http://www.opengis.net/gml/3.2": { - PolygonPatch: z(J.prototype.readPolygonPatch) + PolygonPatch: G(Q.prototype.readPolygonPatch) } }; ot.prototype.SEGMENTS_PARSERS = { "http://www.opengis.net/gml/3.2": { LineStringSegment: qd( - J.prototype.readLineStringSegment + Q.prototype.readLineStringSegment ) } }; ot.prototype.MULTIPOINT_PARSERS = { "http://www.opengis.net/gml/3.2": { - pointMember: W(K.prototype.pointMemberParser), - pointMembers: W(K.prototype.pointMemberParser) + pointMember: W(q.prototype.pointMemberParser), + pointMembers: W(q.prototype.pointMemberParser) } }; ot.prototype.MULTILINESTRING_PARSERS = { "http://www.opengis.net/gml/3.2": { lineStringMember: W( - K.prototype.lineStringMemberParser + q.prototype.lineStringMemberParser ), lineStringMembers: W( - K.prototype.lineStringMemberParser + q.prototype.lineStringMemberParser ) } }; ot.prototype.MULTIPOLYGON_PARSERS = { "http://www.opengis.net/gml/3.2": { - polygonMember: W(K.prototype.polygonMemberParser), - polygonMembers: W(K.prototype.polygonMemberParser) + polygonMember: W(q.prototype.polygonMemberParser), + polygonMembers: W(q.prototype.polygonMemberParser) } }; ot.prototype.POINTMEMBER_PARSERS = { "http://www.opengis.net/gml/3.2": { - Point: W(K.prototype.readFlatCoordinatesFromNode) + Point: W(q.prototype.readFlatCoordinatesFromNode) } }; ot.prototype.LINESTRINGMEMBER_PARSERS = { "http://www.opengis.net/gml/3.2": { - LineString: W(K.prototype.readLineString) + LineString: W(q.prototype.readLineString) } }; ot.prototype.POLYGONMEMBER_PARSERS = { "http://www.opengis.net/gml/3.2": { - Polygon: W(K.prototype.readPolygon) + Polygon: W(q.prototype.readPolygon) } }; ot.prototype.RING_PARSERS = { "http://www.opengis.net/gml/3.2": { - LinearRing: z(K.prototype.readFlatLinearRing), - Ring: z(ot.prototype.readFlatCurveRing) + LinearRing: G(q.prototype.readFlatLinearRing), + Ring: G(ot.prototype.readFlatCurveRing) } }; ot.prototype.RING_SERIALIZERS = { "http://www.opengis.net/gml/3.2": { - exterior: M(J.prototype.writeRing), - interior: M(J.prototype.writeRing) + exterior: w(Q.prototype.writeRing), + interior: w(Q.prototype.writeRing) } }; ot.prototype.ENVELOPE_SERIALIZERS = { "http://www.opengis.net/gml/3.2": { - lowerCorner: M(Tt), - upperCorner: M(Tt) + lowerCorner: w(Tt), + upperCorner: w(Tt) } }; ot.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS = { "http://www.opengis.net/gml/3.2": { - surfaceMember: M( - J.prototype.writeSurfaceOrPolygonMember + surfaceMember: w( + Q.prototype.writeSurfaceOrPolygonMember ), - polygonMember: M( - J.prototype.writeSurfaceOrPolygonMember + polygonMember: w( + Q.prototype.writeSurfaceOrPolygonMember ) } }; ot.prototype.POINTMEMBER_SERIALIZERS = { "http://www.opengis.net/gml/3.2": { - pointMember: M(J.prototype.writePointMember) + pointMember: w(Q.prototype.writePointMember) } }; ot.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS = { "http://www.opengis.net/gml/3.2": { - lineStringMember: M( - J.prototype.writeLineStringOrCurveMember + lineStringMember: w( + Q.prototype.writeLineStringOrCurveMember ), - curveMember: M( - J.prototype.writeLineStringOrCurveMember + curveMember: w( + Q.prototype.writeLineStringOrCurveMember ) } }; ot.prototype.GEOMETRY_SERIALIZERS = { "http://www.opengis.net/gml/3.2": { - Curve: M(J.prototype.writeCurveOrLineString), - MultiCurve: M(J.prototype.writeMultiCurveOrLineString), - Point: M(ot.prototype.writePoint), - MultiPoint: M(J.prototype.writeMultiPoint), - LineString: M(J.prototype.writeCurveOrLineString), - MultiLineString: M( - J.prototype.writeMultiCurveOrLineString + Curve: w(Q.prototype.writeCurveOrLineString), + MultiCurve: w(Q.prototype.writeMultiCurveOrLineString), + Point: w(ot.prototype.writePoint), + MultiPoint: w(Q.prototype.writeMultiPoint), + LineString: w(Q.prototype.writeCurveOrLineString), + MultiLineString: w( + Q.prototype.writeMultiCurveOrLineString ), - LinearRing: M(J.prototype.writeLinearRing), - Polygon: M(J.prototype.writeSurfaceOrPolygon), - MultiPolygon: M( - J.prototype.writeMultiSurfaceOrPolygon + LinearRing: w(Q.prototype.writeLinearRing), + Polygon: w(Q.prototype.writeSurfaceOrPolygon), + MultiPolygon: w( + Q.prototype.writeMultiSurfaceOrPolygon ), - Surface: M(J.prototype.writeSurfaceOrPolygon), - MultiSurface: M( - J.prototype.writeMultiSurfaceOrPolygon + Surface: w(Q.prototype.writeSurfaceOrPolygon), + MultiSurface: w( + Q.prototype.writeMultiSurfaceOrPolygon ), - Envelope: M(J.prototype.writeEnvelope) + Envelope: w(Q.prototype.writeEnvelope) } }; -const Gl = ot; -class Bp { +const Dl = ot; +class Xp { constructor(t) { this.tagName_ = t; } @@ -16937,20 +16937,20 @@ class Bp { return this.tagName_; } } -const ef = Bp; -class zp extends ef { +const tf = Xp; +class Gp extends tf { constructor(t, e) { - super(t), this.conditions = e, X(this.conditions.length >= 2, 57); + super(t), this.conditions = e, Y(this.conditions.length >= 2, 57); } } -const Zp = zp; -class Up extends Zp { +const Hp = Gp; +class Zp extends Hp { constructor(t) { super("And", Array.prototype.slice.call(arguments)); } } -const Vp = Up; -class Wp extends ef { +const Bp = Zp; +class Wp extends tf { constructor(t, e, n) { if (super("BBOX"), this.geometryName = t, this.extent = e, e.length !== 4) throw new Error( @@ -16959,96 +16959,96 @@ class Wp extends ef { this.srsName = n; } } -const Hp = Wp; -function Xp(i) { +const Vp = Wp; +function Yp(i) { const t = [null].concat(Array.prototype.slice.call(arguments)); - return new (Function.prototype.bind.apply(Vp, t))(); + return new (Function.prototype.bind.apply(Bp, t))(); } -function Yp(i, t, e) { - return new Hp(i, t, e); +function Up(i, t, e) { + return new Vp(i, t, e); } -const mc = { +const gc = { "http://www.opengis.net/gml": { - boundedBy: O( - K.prototype.readExtentElement, + boundedBy: I( + q.prototype.readExtentElement, "bounds" ) }, "http://www.opengis.net/wfs/2.0": { - member: W(K.prototype.readFeaturesInternal) + member: W(q.prototype.readFeaturesInternal) } -}, jp = { +}, Jp = { "http://www.opengis.net/wfs": { - totalInserted: O(ne), - totalUpdated: O(ne), - totalDeleted: O(ne) + totalInserted: I(ne), + totalUpdated: I(ne), + totalDeleted: I(ne) }, "http://www.opengis.net/wfs/2.0": { - totalInserted: O(ne), - totalUpdated: O(ne), - totalDeleted: O(ne) + totalInserted: I(ne), + totalUpdated: I(ne), + totalDeleted: I(ne) } -}, Kp = { +}, qp = { "http://www.opengis.net/wfs": { - TransactionSummary: O( - _c, + TransactionSummary: I( + pc, "transactionSummary" ), - InsertResults: O(vc, "insertIds") + InsertResults: I(yc, "insertIds") }, "http://www.opengis.net/wfs/2.0": { - TransactionSummary: O( - _c, + TransactionSummary: I( + pc, "transactionSummary" ), - InsertResults: O(vc, "insertIds") + InsertResults: I(yc, "insertIds") } -}, qp = { +}, Kp = { "http://www.opengis.net/wfs": { - PropertyName: M(Tt) + PropertyName: w(Tt) }, "http://www.opengis.net/wfs/2.0": { - PropertyName: M(Tt) + PropertyName: w(Tt) } -}, nf = { +}, ef = { "http://www.opengis.net/wfs": { - Insert: M(xc), - Update: M(Mc), - Delete: M(Cc), - Property: M(Ec), - Native: M(wc) + Insert: w(xc), + Update: w(Cc), + Delete: w(Mc), + Property: w(wc), + Native: w(Ec) }, "http://www.opengis.net/wfs/2.0": { - Insert: M(xc), - Update: M(Mc), - Delete: M(Cc), - Property: M(Ec), - Native: M(wc) + Insert: w(xc), + Update: w(Cc), + Delete: w(Mc), + Property: w(wc), + Native: w(Ec) } -}, sf = "feature", $l = "http://www.w3.org/2000/xmlns/", Bl = { +}, nf = "feature", jl = "http://www.w3.org/2000/xmlns/", kl = { "2.0.0": "http://www.opengis.net/ogc/1.1", "1.1.0": "http://www.opengis.net/ogc", "1.0.0": "http://www.opengis.net/ogc" -}, Da = { +}, Na = { "2.0.0": "http://www.opengis.net/wfs/2.0", "1.1.0": "http://www.opengis.net/wfs", "1.0.0": "http://www.opengis.net/wfs" -}, zl = { +}, Xl = { "2.0.0": "http://www.opengis.net/fes/2.0", "1.1.0": "http://www.opengis.net/fes", "1.0.0": "http://www.opengis.net/fes" -}, pc = { +}, mc = { "2.0.0": "http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd", "1.1.0": "http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd", "1.0.0": "http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd" -}, Zl = { - "2.0.0": Gl, - "1.1.0": J, - "1.0.0": qs -}, Jp = "1.1.0"; -class Qp extends tf { +}, Gl = { + "2.0.0": Dl, + "1.1.0": Q, + "1.0.0": Ks +}, Qp = "1.1.0"; +class $p extends $d { constructor(t) { - super(), t = t || {}, this.version_ = t.version ? t.version : Jp, this.featureType_ = t.featureType, this.featureNS_ = t.featureNS, this.gmlFormat_ = t.gmlFormat ? t.gmlFormat : new Zl[this.version_](), this.schemaLocation_ = t.schemaLocation ? t.schemaLocation : pc[this.version_]; + super(), t = t || {}, this.version_ = t.version ? t.version : Qp, this.featureType_ = t.featureType, this.featureNS_ = t.featureNS, this.gmlFormat_ = t.gmlFormat ? t.gmlFormat : new Gl[this.version_](), this.schemaLocation_ = t.schemaLocation ? t.schemaLocation : mc[this.version_]; } getFeatureType() { return this.featureType_; @@ -17066,8 +17066,8 @@ class Qp extends tf { }), Object.assign(n, this.getReadOptions(t, e || {})); const s = [n]; let r; - this.version_ === "2.0.0" ? r = mc : r = this.gmlFormat_.FEATURE_COLLECTION_PARSERS; - let o = $( + this.version_ === "2.0.0" ? r = gc : r = this.gmlFormat_.FEATURE_COLLECTION_PARSERS; + let o = k( [], r, t, @@ -17079,10 +17079,10 @@ class Qp extends tf { readTransactionResponse(t) { if (t) if (typeof t == "string") { - const e = Vi(t); + const e = Bi(t); return this.readTransactionResponseFromDocument(e); } else - return Ui(t) ? this.readTransactionResponseFromDocument( + return Zi(t) ? this.readTransactionResponseFromDocument( t ) : this.readTransactionResponseFromNode( t @@ -17093,10 +17093,10 @@ class Qp extends tf { readFeatureCollectionMetadata(t) { if (t) if (typeof t == "string") { - const e = Vi(t); + const e = Bi(t); return this.readFeatureCollectionMetadataFromDocument(e); } else - return Ui(t) ? this.readFeatureCollectionMetadataFromDocument( + return Zi(t) ? this.readFeatureCollectionMetadataFromDocument( t ) : this.readFeatureCollectionMetadataFromNode( t @@ -17112,12 +17112,12 @@ class Qp extends tf { ); } readFeatureCollectionMetadataFromNode(t) { - const e = {}, n = Rn( + const e = {}, n = Sn( t.getAttribute("numberOfFeatures") ); - return e.numberOfFeatures = n, $( + return e.numberOfFeatures = n, k( e, - mc, + gc, t, [], this.gmlFormat_ @@ -17129,17 +17129,17 @@ class Qp extends tf { return this.readTransactionResponseFromNode(e); } readTransactionResponseFromNode(t) { - return $( + return k( {}, - Kp, + qp, t, [] ); } writeGetFeature(t) { - const e = j(Da[this.version_], "GetFeature"); + const e = J(Na[this.version_], "GetFeature"); e.setAttribute("service", "WFS"), e.setAttribute("version", this.version_), t.handle && e.setAttribute("handle", t.handle), t.outputFormat && e.setAttribute("outputFormat", t.outputFormat), t.maxFeatures !== void 0 && e.setAttribute("maxFeatures", String(t.maxFeatures)), t.resultType && e.setAttribute("resultType", t.resultType), t.startIndex !== void 0 && e.setAttribute("startIndex", String(t.startIndex)), t.count !== void 0 && e.setAttribute("count", String(t.count)), t.viewParams !== void 0 && e.setAttribute("viewParams", t.viewParams), e.setAttributeNS( - Fa, + Ia, "xsi:schemaLocation", this.schemaLocation_ ); @@ -17152,9 +17152,9 @@ class Qp extends tf { featureNS: t.featureNS ? t.featureNS : this.featureNS_, featurePrefix: t.featurePrefix, propertyNames: t.propertyNames ? t.propertyNames : [] - }), X(Array.isArray(t.featureTypes), 11), typeof t.featureTypes[0] == "string") { + }), Y(Array.isArray(t.featureTypes), 11), typeof t.featureTypes[0] == "string") { let s = t.filter; - t.bbox && (X(t.geometryName, 12), s = this.combineBboxAndFilter( + t.bbox && (Y(t.geometryName, 12), s = this.combineBboxAndFilter( t.geometryName, t.bbox, t.srsName, @@ -17162,7 +17162,7 @@ class Qp extends tf { )), Object.assign(n, { geometryName: t.geometryName, filter: s - }), Nc( + }), Ic( e, t.featureTypes, [n] @@ -17178,25 +17178,25 @@ class Qp extends tf { Object.assign(n, { geometryName: s.geometryName, filter: r - }), Nc(e, [s.name], [n]); + }), Ic(e, [s.name], [n]); }); return e; } combineBboxAndFilter(t, e, n, s) { - const r = Yp(t, e, n); - return s ? Xp(s, r) : r; + const r = Up(t, e, n); + return s ? Yp(s, r) : r; } writeTransaction(t, e, n, s) { - const r = [], o = s.version ? s.version : this.version_, a = j(Da[o], "Transaction"); + const r = [], o = s.version ? s.version : this.version_, a = J(Na[o], "Transaction"); a.setAttribute("service", "WFS"), a.setAttribute("version", o); let l; s && (l = s.gmlOptions ? s.gmlOptions : {}, s.handle && a.setAttribute("handle", s.handle)), a.setAttributeNS( - Fa, + Ia, "xsi:schemaLocation", - pc[o] + mc[o] ); - const h = t_(a, l, o, s); - return t && Rr("Insert", t, r, h), e && Rr("Update", e, r, h), n && Rr("Delete", n, r, h), s.nativeElements && Rr( + const h = tv(a, l, o, s); + return t && Sr("Insert", t, r, h), e && Sr("Update", e, r, h), n && Sr("Delete", n, r, h), s.nativeElements && Sr( "Native", s.nativeElements, r, @@ -17215,14 +17215,14 @@ class Qp extends tf { for (let e = t.firstElementChild; e; e = e.nextElementSibling) if (!(e.childNodes.length === 0 || e.childNodes.length === 1 && e.firstChild.nodeType === 3)) { const n = [{}]; - return this.gmlFormat_.readGeometryElement(e, n), q(n.pop().srsName); + return this.gmlFormat_.readGeometryElement(e, n), K(n.pop().srsName); } } return null; } } -function t_(i, t, e, n) { - const s = n.featurePrefix ? n.featurePrefix : sf; +function tv(i, t, e, n) { + const s = n.featurePrefix ? n.featurePrefix : nf; let r; return e === "1.0.0" ? r = 2 : e === "1.1.0" ? r = 3 : e === "2.0.0" && (r = 3.2), Object.assign( { node: i }, @@ -17238,19 +17238,19 @@ function t_(i, t, e, n) { t ); } -function Rr(i, t, e, n) { - Et( +function Sr(i, t, e, n) { + bt( n, - nf, + ef, de(i), t, e ); } -function _c(i, t) { - return $({}, jp, i, t); +function pc(i, t) { + return k({}, Jp, i, t); } -const e_ = { +const ev = { "http://www.opengis.net/ogc": { FeatureId: W(function(i, t) { return i.getAttribute("fid"); @@ -17262,46 +17262,46 @@ const e_ = { }) } }; -function yc(i, t) { - Yi(e_, i, t); +function vc(i, t) { + Ui(ev, i, t); } -const i_ = { +const iv = { "http://www.opengis.net/wfs": { - Feature: yc + Feature: vc }, "http://www.opengis.net/wfs/2.0": { - Feature: yc + Feature: vc } }; -function vc(i, t) { - return $([], i_, i, t); +function yc(i, t) { + return k([], iv, i, t); } function xc(i, t, e) { - const n = e[e.length - 1], s = n.featureType, r = n.featureNS, o = n.gmlVersion, a = j(r, s); - i.appendChild(a), o === 2 ? qs.prototype.writeFeatureElement(a, t, e) : o === 3 ? J.prototype.writeFeatureElement(a, t, e) : Gl.prototype.writeFeatureElement(a, t, e); + const n = e[e.length - 1], s = n.featureType, r = n.featureNS, o = n.gmlVersion, a = J(r, s); + i.appendChild(a), o === 2 ? Ks.prototype.writeFeatureElement(a, t, e) : o === 3 ? Q.prototype.writeFeatureElement(a, t, e) : Dl.prototype.writeFeatureElement(a, t, e); } -function rf(i, t, e) { - const s = e[e.length - 1].version, r = Bl[s], o = j(r, "Filter"), a = j(r, "FeatureId"); +function sf(i, t, e) { + const s = e[e.length - 1].version, r = kl[s], o = J(r, "Filter"), a = J(r, "FeatureId"); o.appendChild(a), a.setAttribute("fid", t), i.appendChild(o); } -function Ul(i, t) { - i = i || sf; +function Hl(i, t) { + i = i || nf; const e = i + ":"; return t.startsWith(e) ? t : e + t; } -function Cc(i, t, e) { +function Mc(i, t, e) { const n = e[e.length - 1]; - X(t.getId() !== void 0, 26); - const s = n.featureType, r = n.featurePrefix, o = n.featureNS, a = Ul(r, s); - i.setAttribute("typeName", a), i.setAttributeNS($l, "xmlns:" + r, o); + Y(t.getId() !== void 0, 26); + const s = n.featureType, r = n.featurePrefix, o = n.featureNS, a = Hl(r, s); + i.setAttribute("typeName", a), i.setAttributeNS(jl, "xmlns:" + r, o); const l = t.getId(); - l !== void 0 && rf(i, l, e); + l !== void 0 && sf(i, l, e); } -function Mc(i, t, e) { +function Cc(i, t, e) { const n = e[e.length - 1]; - X(t.getId() !== void 0, 27); - const s = n.version, r = n.featureType, o = n.featurePrefix, a = n.featureNS, l = Ul(o, r), h = t.getGeometryName(); - i.setAttribute("typeName", l), i.setAttributeNS($l, "xmlns:" + o, a); + Y(t.getId() !== void 0, 27); + const s = n.version, r = n.featureType, o = n.featurePrefix, a = n.featureNS, l = Hl(o, r), h = t.getGeometryName(); + i.setAttribute("typeName", l), i.setAttributeNS(jl, "xmlns:" + o, a); const c = t.getId(); if (c !== void 0) { const u = t.getKeys(), d = []; @@ -17312,7 +17312,7 @@ function Mc(i, t, e) { m && typeof m.getSimplifiedGeometry == "function" && (p = h), d.push({ name: p, value: m }); } } - Et( + bt( { version: s, gmlVersion: n.gmlVersion, @@ -17320,156 +17320,156 @@ function Mc(i, t, e) { hasZ: n.hasZ, srsName: n.srsName }, - nf, + ef, de("Property"), d, e - ), rf(i, c, e); + ), sf(i, c, e); } } -function Ec(i, t, e) { - const n = e[e.length - 1], s = n.version, r = Da[s], o = j(r, "Name"), a = n.gmlVersion; +function wc(i, t, e) { + const n = e[e.length - 1], s = n.version, r = Na[s], o = J(r, "Name"), a = n.gmlVersion; if (i.appendChild(o), Tt(o, t.name), t.value !== void 0 && t.value !== null) { - const l = j(r, "Value"); - i.appendChild(l), t.value && typeof t.value.getSimplifiedGeometry == "function" ? a === 2 ? qs.prototype.writeGeometryElement(l, t.value, e) : a === 3 ? J.prototype.writeGeometryElement(l, t.value, e) : Gl.prototype.writeGeometryElement(l, t.value, e) : Tt(l, t.value); + const l = J(r, "Value"); + i.appendChild(l), t.value && typeof t.value.getSimplifiedGeometry == "function" ? a === 2 ? Ks.prototype.writeGeometryElement(l, t.value, e) : a === 3 ? Q.prototype.writeGeometryElement(l, t.value, e) : Dl.prototype.writeGeometryElement(l, t.value, e) : Tt(l, t.value); } } -function wc(i, t, e) { +function Ec(i, t, e) { t.vendorId && i.setAttribute("vendorId", t.vendorId), t.safeToIgnore !== void 0 && i.setAttribute("safeToIgnore", String(t.safeToIgnore)), t.value !== void 0 && Tt(i, t.value); } -const Lo = { +const _o = { "http://www.opengis.net/wfs": { - Query: M(Sc) + Query: w(bc) }, "http://www.opengis.net/wfs/2.0": { - Query: M(Sc) + Query: w(bc) }, "http://www.opengis.net/ogc": { - During: M(Lc), - And: M(br), - Or: M(br), - Not: M(Tc), - BBOX: M(Rc), - Contains: M(yi), - Intersects: M(yi), - Within: M(yi), - DWithin: M(bc), - PropertyIsEqualTo: M(ye), - PropertyIsNotEqualTo: M(ye), - PropertyIsLessThan: M(ye), - PropertyIsLessThanOrEqualTo: M(ye), - PropertyIsGreaterThan: M(ye), - PropertyIsGreaterThanOrEqualTo: M(ye), - PropertyIsNull: M(Ic), - PropertyIsBetween: M(Ac), - PropertyIsLike: M(Pc) + During: w(_c), + And: w(_r), + Or: w(_r), + Not: w(Rc), + BBOX: w(Pc), + Contains: w(yi), + Intersects: w(yi), + Within: w(yi), + DWithin: w(Sc), + PropertyIsEqualTo: w(ye), + PropertyIsNotEqualTo: w(ye), + PropertyIsLessThan: w(ye), + PropertyIsLessThanOrEqualTo: w(ye), + PropertyIsGreaterThan: w(ye), + PropertyIsGreaterThanOrEqualTo: w(ye), + PropertyIsNull: w(Tc), + PropertyIsBetween: w(Lc), + PropertyIsLike: w(Oc) }, "http://www.opengis.net/fes/2.0": { - During: M(Lc), - And: M(br), - Or: M(br), - Not: M(Tc), - BBOX: M(Rc), - Contains: M(yi), - Disjoint: M(yi), - Intersects: M(yi), - ResourceId: M(s_), - Within: M(yi), - DWithin: M(bc), - PropertyIsEqualTo: M(ye), - PropertyIsNotEqualTo: M(ye), - PropertyIsLessThan: M(ye), - PropertyIsLessThanOrEqualTo: M(ye), - PropertyIsGreaterThan: M(ye), - PropertyIsGreaterThanOrEqualTo: M(ye), - PropertyIsNull: M(Ic), - PropertyIsBetween: M(Ac), - PropertyIsLike: M(Pc) + During: w(_c), + And: w(_r), + Or: w(_r), + Not: w(Rc), + BBOX: w(Pc), + Contains: w(yi), + Disjoint: w(yi), + Intersects: w(yi), + ResourceId: w(sv), + Within: w(yi), + DWithin: w(Sc), + PropertyIsEqualTo: w(ye), + PropertyIsNotEqualTo: w(ye), + PropertyIsLessThan: w(ye), + PropertyIsLessThanOrEqualTo: w(ye), + PropertyIsGreaterThan: w(ye), + PropertyIsGreaterThanOrEqualTo: w(ye), + PropertyIsNull: w(Tc), + PropertyIsBetween: w(Lc), + PropertyIsLike: w(Oc) } }; -function Sc(i, t, e) { +function bc(i, t, e) { const n = e[e.length - 1], s = n.version, r = n.featurePrefix, o = n.featureNS, a = n.propertyNames, l = n.srsName; let h; - r ? h = Ul(r, t) : h = t; + r ? h = Hl(r, t) : h = t; let c; - s === "2.0.0" ? c = "typeNames" : c = "typeName", i.setAttribute(c, h), l && i.setAttribute("srsName", l), o && i.setAttributeNS($l, "xmlns:" + r, o); + s === "2.0.0" ? c = "typeNames" : c = "typeName", i.setAttribute(c, h), l && i.setAttribute("srsName", l), o && i.setAttributeNS(jl, "xmlns:" + r, o); const u = Object.assign({}, n); - u.node = i, Et( + u.node = i, bt( u, - qp, + Kp, de("PropertyName"), a, e ); const d = n.filter; if (d) { - const f = j(To(s), "Filter"); - i.appendChild(f), n_(f, d, e); + const f = J(Ro(s), "Filter"); + i.appendChild(f), nv(f, d, e); } } -function n_(i, t, e) { +function nv(i, t, e) { const n = e[e.length - 1], s = { node: i }; - Object.assign(s, { context: n }), Et( + Object.assign(s, { context: n }), bt( s, - Lo, + _o, de(t.getTagName()), [t], e ); } -function Rc(i, t, e) { +function Pc(i, t, e) { const n = e[e.length - 1], r = n.context.version; n.srsName = t.srsName; - const o = Zl[r]; + const o = Gl[r]; ts(r, i, t.geometryName), o.prototype.writeGeometryElement(i, t.extent, e); } -function s_(i, t, e) { +function sv(i, t, e) { i.setAttribute("rid", t.rid); } function yi(i, t, e) { const n = e[e.length - 1], r = n.context.version; n.srsName = t.srsName; - const o = Zl[r]; + const o = Gl[r]; ts(r, i, t.geometryName), o.prototype.writeGeometryElement(i, t.geometry, e); } -function bc(i, t, e) { +function Sc(i, t, e) { const r = e[e.length - 1].context.version; yi(i, t, e); - const o = j(To(r), "Distance"); + const o = J(Ro(r), "Distance"); Tt(o, t.distance.toString()), r === "2.0.0" ? o.setAttribute("uom", t.unit) : o.setAttribute("units", t.unit), i.appendChild(o); } -function Lc(i, t, e) { +function _c(i, t, e) { const r = e[e.length - 1].context.version; - to(zl[r], "ValueReference", i, t.propertyName); - const o = j(ri, "TimePeriod"); + $r(Xl[r], "ValueReference", i, t.propertyName); + const o = J(ri, "TimePeriod"); i.appendChild(o); - const a = j(ri, "begin"); - o.appendChild(a), Oc(a, t.begin); - const l = j(ri, "end"); - o.appendChild(l), Oc(l, t.end); + const a = J(ri, "begin"); + o.appendChild(a), Ac(a, t.begin); + const l = J(ri, "end"); + o.appendChild(l), Ac(l, t.end); } -function br(i, t, e) { +function _r(i, t, e) { const s = e[e.length - 1].context, r = { node: i }; Object.assign(r, { context: s }); const o = t.conditions; for (let a = 0, l = o.length; a < l; ++a) { const h = o[a]; - Et( + bt( r, - Lo, + _o, de(h.getTagName()), [h], e ); } } -function Tc(i, t, e) { +function Rc(i, t, e) { const s = e[e.length - 1].context, r = { node: i }; Object.assign(r, { context: s }); const o = t.condition; - Et( + bt( r, - Lo, + _o, de(o.getTagName()), [o], e @@ -17477,59 +17477,59 @@ function Tc(i, t, e) { } function ye(i, t, e) { const r = e[e.length - 1].context.version; - t.matchCase !== void 0 && i.setAttribute("matchCase", t.matchCase.toString()), ts(r, i, t.propertyName), eo(r, i, "" + t.expression); + t.matchCase !== void 0 && i.setAttribute("matchCase", t.matchCase.toString()), ts(r, i, t.propertyName), to(r, i, "" + t.expression); } -function Ic(i, t, e) { +function Tc(i, t, e) { const r = e[e.length - 1].context.version; ts(r, i, t.propertyName); } -function Ac(i, t, e) { - const r = e[e.length - 1].context.version, o = To(r); +function Lc(i, t, e) { + const r = e[e.length - 1].context.version, o = Ro(r); ts(r, i, t.propertyName); - const a = j(o, "LowerBoundary"); - i.appendChild(a), eo(r, a, "" + t.lowerBoundary); - const l = j(o, "UpperBoundary"); - i.appendChild(l), eo(r, l, "" + t.upperBoundary); + const a = J(o, "LowerBoundary"); + i.appendChild(a), to(r, a, "" + t.lowerBoundary); + const l = J(o, "UpperBoundary"); + i.appendChild(l), to(r, l, "" + t.upperBoundary); } -function Pc(i, t, e) { +function Oc(i, t, e) { const r = e[e.length - 1].context.version; - i.setAttribute("wildCard", t.wildCard), i.setAttribute("singleChar", t.singleChar), i.setAttribute("escapeChar", t.escapeChar), t.matchCase !== void 0 && i.setAttribute("matchCase", t.matchCase.toString()), ts(r, i, t.propertyName), eo(r, i, "" + t.pattern); + i.setAttribute("wildCard", t.wildCard), i.setAttribute("singleChar", t.singleChar), i.setAttribute("escapeChar", t.escapeChar), t.matchCase !== void 0 && i.setAttribute("matchCase", t.matchCase.toString()), ts(r, i, t.propertyName), to(r, i, "" + t.pattern); } -function to(i, t, e, n) { - const s = j(i, t); +function $r(i, t, e, n) { + const s = J(i, t); Tt(s, n), e.appendChild(s); } -function eo(i, t, e) { - to(To(i), "Literal", t, e); +function to(i, t, e) { + $r(Ro(i), "Literal", t, e); } function ts(i, t, e) { - i === "2.0.0" ? to(zl[i], "ValueReference", t, e) : to(Bl[i], "PropertyName", t, e); + i === "2.0.0" ? $r(Xl[i], "ValueReference", t, e) : $r(kl[i], "PropertyName", t, e); } -function Oc(i, t) { - const e = j(ri, "TimeInstant"); +function Ac(i, t) { + const e = J(ri, "TimeInstant"); i.appendChild(e); - const n = j(ri, "timePosition"); + const n = J(ri, "timePosition"); e.appendChild(n), Tt(n, t); } -function Nc(i, t, e) { +function Ic(i, t, e) { const n = e[e.length - 1], s = Object.assign({}, n); - s.node = i, Et( + s.node = i, bt( s, - Lo, + _o, de("Query"), t, e ); } -function To(i) { +function Ro(i) { let t; - return i === "2.0.0" ? t = zl[i] : t = Bl[i], t; + return i === "2.0.0" ? t = Xl[i] : t = kl[i], t; } -const r_ = Qp; -class of { +const rv = $p; +class rf { static getSource(t, e, n) { - return new Qn({ - format: new r_({ + return new $n({ + format: new rv({ version: "2.0.0" }), url: (s) => { @@ -17543,17 +17543,17 @@ class of { console.error("The replacement string cannot be found. You lose the BBOX optimization."), r = `${r}&${e}`; return r; }, - strategy: n ? Qm : Id + strategy: n ? $2 : Ld }); } } -class Fc { +class Nc { constructor(t, e, n) { - this.vectorLayer = new Vn(), this.store = n, this.states = e, this.renderUtils = t; + this.vectorLayer = new Bn(), this.store = n, this.states = e, this.renderUtils = t; const s = this.store.getMap(), r = this.store.getOptions(); if (!r || !s) throw new Error("Missing map or options"); - this.options = r, this.map = s, this.control = new kl(this.store), this.vectorLayer = new Vn(), this.vectorSource = of.getSource(r.wfs.url, "", !1), this.vectorSource.on("featuresloadend", () => { + this.options = r, this.map = s, this.control = new Fl(this.store), this.vectorLayer = new Bn(), this.vectorSource = rf.getSource(r.wfs.url, "", !1), this.vectorSource.on("featuresloadend", () => { this.renderUtils.setIsLoaded(!0); }), this.displayDataOnMap(s, this.vectorLayer, r, this.vectorSource), this.states.readonly || (s.on("click", (o) => { s.forEachFeatureAtPixel(o.pixel, (a) => { @@ -17589,11 +17589,11 @@ class Fc { s && s >= n.maxZoom ? e.setDistance(0) : e.setDistance(n.cluster.distance); } displayDataOnMap(t, e, n, s) { - const r = new H2({ + const r = new Vm({ distance: n.cluster.distance, minDistance: n.cluster.minDistance, source: s - }), o = new Lp(); + }), o = new Rp(); e.setSource(r), e.setStyle(function(a) { return o.clusterWithIcon(a); }), t.addLayer(e), this.control.disable(), this.states.readonly || (t.addControl(this.control), this.toogleDataSelection(e)), Wt.registerBorderConstaintMapEvent( @@ -17611,7 +17611,7 @@ class Fc { t.set("isClick", e), t.set("isSelected", e); } removeSelectedItem(t) { - this.removeItem(t), this.control.hide(), tt.sendEvent("rule-validation", void 0), jd.setCustomStyleWithouInfoBox(this.store); + this.removeItem(t), this.control.hide(), tt.sendEvent("rule-validation", void 0), Ud.setCustomStyleWithouInfoBox(this.store); } removeItem(t) { this.setIconToDisplay(t, void 0), this.store.removeSelectedFeature(t.get("objectid")); @@ -17645,14 +17645,14 @@ class Fc { }); } } -class o_ { +class ov { read(t) { if (t) if (typeof t == "string") { - const e = Vi(t); + const e = Bi(t); return this.readFromDocument(e); } else - return Ui(t) ? this.readFromDocument(t) : this.readFromNode(t); + return Zi(t) ? this.readFromDocument(t) : this.readFromNode(t); else return null; } @@ -17665,258 +17665,258 @@ class o_ { readFromNode(t) { } } -const af = o_, a_ = "http://www.w3.org/1999/xlink"; -function Vl(i) { - return i.getAttributeNS(a_, "href"); +const of = ov, av = "http://www.w3.org/1999/xlink"; +function Zl(i) { + return i.getAttributeNS(av, "href"); } -const re = [null, "http://www.opengis.net/ows/1.1"], l_ = ct(re, { - ServiceIdentification: O(O_), - ServiceProvider: O(F_), - OperationsMetadata: O(A_) +const re = [null, "http://www.opengis.net/ows/1.1"], lv = ct(re, { + ServiceIdentification: I(Iv), + ServiceProvider: I(zv), + OperationsMetadata: I(Ov) }); -class h_ extends af { +class hv extends of { constructor() { super(); } readFromNode(t) { - const e = $({}, l_, t, []); + const e = k({}, lv, t, []); return e || null; } } -const c_ = ct(re, { - DeliveryPoint: O(nt), - City: O(nt), - AdministrativeArea: O(nt), - PostalCode: O(nt), - Country: O(nt), - ElectronicMailAddress: O(nt) -}), u_ = ct(re, { - Value: ue(D_) -}), d_ = ct(re, { - AllowedValues: O(w_) -}), f_ = ct(re, { - Phone: O(P_), - Address: O(E_) -}), g_ = ct(re, { - HTTP: O(T_) -}), m_ = ct(re, { - Get: ue(L_), +const cv = ct(re, { + DeliveryPoint: I(nt), + City: I(nt), + AdministrativeArea: I(nt), + PostalCode: I(nt), + Country: I(nt), + ElectronicMailAddress: I(nt) +}), uv = ct(re, { + Value: ue(Fv) +}), dv = ct(re, { + AllowedValues: I(bv) +}), fv = ct(re, { + Phone: I(Av), + Address: I(Ev) +}), gv = ct(re, { + HTTP: I(Tv) +}), mv = ct(re, { + Get: ue(Rv), Post: void 0 -}), p_ = ct(re, { - DCP: O(b_) -}), __ = ct(re, { - Operation: I_ -}), y_ = ct(re, { - Voice: O(nt), - Facsimile: O(nt) -}), v_ = ct(re, { - Constraint: ue(S_) -}), x_ = ct(re, { - IndividualName: O(nt), - PositionName: O(nt), - ContactInfo: O(R_) -}), C_ = ct(re, { - Abstract: O(nt), - AccessConstraints: O(nt), - Fees: O(nt), - Title: O(nt), - ServiceTypeVersion: O(nt), - ServiceType: O(nt) -}), M_ = ct(re, { - ProviderName: O(nt), - ProviderSite: O(Vl), - ServiceContact: O(N_) +}), pv = ct(re, { + DCP: I(_v) +}), vv = ct(re, { + Operation: Lv +}), yv = ct(re, { + Voice: I(nt), + Facsimile: I(nt) +}), xv = ct(re, { + Constraint: ue(Pv) +}), Mv = ct(re, { + IndividualName: I(nt), + PositionName: I(nt), + ContactInfo: I(Sv) +}), Cv = ct(re, { + Abstract: I(nt), + AccessConstraints: I(nt), + Fees: I(nt), + Title: I(nt), + ServiceTypeVersion: I(nt), + ServiceType: I(nt) +}), wv = ct(re, { + ProviderName: I(nt), + ProviderSite: I(Zl), + ServiceContact: I(Nv) }); -function E_(i, t) { - return $({}, c_, i, t); +function Ev(i, t) { + return k({}, cv, i, t); } -function w_(i, t) { - return $({}, u_, i, t); +function bv(i, t) { + return k({}, uv, i, t); } -function S_(i, t) { +function Pv(i, t) { const e = i.getAttribute("name"); if (!!e) - return $({ name: e }, d_, i, t); + return k({ name: e }, dv, i, t); } -function R_(i, t) { - return $({}, f_, i, t); +function Sv(i, t) { + return k({}, fv, i, t); } -function b_(i, t) { - return $({}, g_, i, t); +function _v(i, t) { + return k({}, gv, i, t); } -function L_(i, t) { - const e = Vl(i); +function Rv(i, t) { + const e = Zl(i); if (!!e) - return $( + return k( { href: e }, - v_, + xv, i, t ); } -function T_(i, t) { - return $({}, m_, i, t); +function Tv(i, t) { + return k({}, mv, i, t); } -function I_(i, t) { - const e = i.getAttribute("name"), n = $({}, p_, i, t); +function Lv(i, t) { + const e = i.getAttribute("name"), n = k({}, pv, i, t); if (!n) return; const s = t[t.length - 1]; s[e] = n; } -function A_(i, t) { - return $({}, __, i, t); +function Ov(i, t) { + return k({}, vv, i, t); } -function P_(i, t) { - return $({}, y_, i, t); +function Av(i, t) { + return k({}, yv, i, t); } -function O_(i, t) { - return $({}, C_, i, t); +function Iv(i, t) { + return k({}, Cv, i, t); } -function N_(i, t) { - return $({}, x_, i, t); +function Nv(i, t) { + return k({}, Mv, i, t); } -function F_(i, t) { - return $({}, M_, i, t); +function zv(i, t) { + return k({}, wv, i, t); } -function D_(i, t) { +function Fv(i, t) { return nt(i); } -const k_ = h_, Ze = [null, "http://www.opengis.net/wmts/1.0"], es = [null, "http://www.opengis.net/ows/1.1"], G_ = ct(Ze, { - Contents: O(K_) +const Dv = hv, He = [null, "http://www.opengis.net/wmts/1.0"], es = [null, "http://www.opengis.net/ows/1.1"], jv = ct(He, { + Contents: I(qv) }); -class $_ extends af { +class kv extends of { constructor() { - super(), this.owsParser_ = new k_(); + super(), this.owsParser_ = new Dv(); } readFromNode(t) { let e = t.getAttribute("version"); e && (e = e.trim()); let n = this.owsParser_.readFromNode(t); - return n ? (n.version = e, n = $( + return n ? (n.version = e, n = k( n, - G_, + jv, t, [] ), n || null) : null; } } -const B_ = ct(Ze, { - Layer: ue(q_), - TileMatrixSet: ue(J_) -}), z_ = ct( - Ze, +const Xv = ct(He, { + Layer: ue(Kv), + TileMatrixSet: ue(Qv) +}), Gv = ct( + He, { - Style: ue(Q_), + Style: ue($v), Format: ue(nt), - TileMatrixSetLink: ue(ty), - Dimension: ue(ey), - ResourceURL: ue(iy) + TileMatrixSetLink: ue(t3), + Dimension: ue(e3), + ResourceURL: ue(i3) }, ct(es, { - Title: O(nt), - Abstract: O(nt), - WGS84BoundingBox: O(lf), - Identifier: O(nt) + Title: I(nt), + Abstract: I(nt), + WGS84BoundingBox: I(af), + Identifier: I(nt) }) -), Z_ = ct( - Ze, +), Hv = ct( + He, { - LegendURL: ue(ny) + LegendURL: ue(n3) }, ct(es, { - Title: O(nt), - Identifier: O(nt) + Title: I(nt), + Identifier: I(nt) }) -), U_ = ct(Ze, { - TileMatrixSet: O(nt), - TileMatrixSetLimits: O(ry) -}), V_ = ct(Ze, { - TileMatrixLimits: W(oy) -}), W_ = ct(Ze, { - TileMatrix: O(nt), - MinTileRow: O(ne), - MaxTileRow: O(ne), - MinTileCol: O(ne), - MaxTileCol: O(ne) -}), H_ = ct( - Ze, +), Zv = ct(He, { + TileMatrixSet: I(nt), + TileMatrixSetLimits: I(r3) +}), Bv = ct(He, { + TileMatrixLimits: W(o3) +}), Wv = ct(He, { + TileMatrix: I(nt), + MinTileRow: I(ne), + MaxTileRow: I(ne), + MinTileCol: I(ne), + MaxTileCol: I(ne) +}), Vv = ct( + He, { - Default: O(nt), + Default: I(nt), Value: ue(nt) }, ct(es, { - Identifier: O(nt) + Identifier: I(nt) }) -), X_ = ct(es, { - LowerCorner: W(ka), - UpperCorner: W(ka) -}), Y_ = ct( - Ze, +), Yv = ct(es, { + LowerCorner: W(za), + UpperCorner: W(za) +}), Uv = ct( + He, { - WellKnownScaleSet: O(nt), - TileMatrix: ue(sy) + WellKnownScaleSet: I(nt), + TileMatrix: ue(s3) }, ct(es, { - SupportedCRS: O(nt), - Identifier: O(nt), - BoundingBox: O(lf) + SupportedCRS: I(nt), + Identifier: I(nt), + BoundingBox: I(af) }) -), j_ = ct( - Ze, +), Jv = ct( + He, { - TopLeftCorner: O(ka), - ScaleDenominator: O(Np), - TileWidth: O(ne), - TileHeight: O(ne), - MatrixWidth: O(ne), - MatrixHeight: O(ne) + TopLeftCorner: I(za), + ScaleDenominator: I(Np), + TileWidth: I(ne), + TileHeight: I(ne), + MatrixWidth: I(ne), + MatrixHeight: I(ne) }, ct(es, { - Identifier: O(nt) + Identifier: I(nt) }) ); -function K_(i, t) { - return $({}, B_, i, t); +function qv(i, t) { + return k({}, Xv, i, t); } -function q_(i, t) { - return $({}, z_, i, t); +function Kv(i, t) { + return k({}, Gv, i, t); } -function J_(i, t) { - return $({}, Y_, i, t); +function Qv(i, t) { + return k({}, Uv, i, t); } -function Q_(i, t) { - const e = $({}, Z_, i, t); +function $v(i, t) { + const e = k({}, Hv, i, t); if (!e) return; const n = i.getAttribute("isDefault") === "true"; return e.isDefault = n, e; } -function ty(i, t) { - return $({}, U_, i, t); +function t3(i, t) { + return k({}, Zv, i, t); } -function ey(i, t) { - return $({}, H_, i, t); +function e3(i, t) { + return k({}, Vv, i, t); } -function iy(i, t) { +function i3(i, t) { const e = i.getAttribute("format"), n = i.getAttribute("template"), s = i.getAttribute("resourceType"), r = {}; return e && (r.format = e), n && (r.template = n), s && (r.resourceType = s), r; } -function lf(i, t) { - const e = $( +function af(i, t) { + const e = k( [], - X_, + Yv, i, t ); if (e.length == 2) - return ca(e); + return la(e); } -function ny(i, t) { +function n3(i, t) { const e = {}; - return e.format = i.getAttribute("format"), e.href = Vl(i), e; + return e.format = i.getAttribute("format"), e.href = Zl(i), e; } -function ka(i, t) { +function za(i, t) { const e = nt(i).split(/\s+/); if (!e || e.length != 2) return; @@ -17924,41 +17924,41 @@ function ka(i, t) { if (!(isNaN(n) || isNaN(s))) return [n, s]; } -function sy(i, t) { - return $({}, j_, i, t); +function s3(i, t) { + return k({}, Jv, i, t); } -function ry(i, t) { - return $([], V_, i, t); +function r3(i, t) { + return k([], Bv, i, t); } -function oy(i, t) { - return $({}, W_, i, t); +function o3(i, t) { + return k({}, Wv, i, t); } -const ay = $_; -class ly { +const a3 = kv; +class l3 { constructor(t) { - const e = new ay(), n = t.getOptions(); + const e = new a3(), n = t.getOptions(); if (!n) throw new Error("Missing options"); const s = []; Promise.all(n.wmts.map((r) => { fetch(r.capability).then((o) => o.text()).then(function(o) { var c, u, d; - const a = new J2({ + const a = new Qm({ opacity: 1 }), l = e.read(o), h = np(l, { layer: r.layer, matrixSet: r.projection }); h && (a.setSource(new ip(h)), a.setVisible(r.layer == n.wmts[0].layer), s.push(a), (c = t.getMap()) == null || c.getLayers().insertAt(0, a), t.getBorderConstraint() && a.setExtent((d = (u = t.getBorderConstraint()) == null ? void 0 : u.getSource()) == null ? void 0 : d.getExtent()), a.on("postrender", function(f) { - var p, _; - const g = n2(f), m = f.context; - m && (m.globalCompositeOperation = "destination-in", (_ = (p = t.getBorderConstraint()) == null ? void 0 : p.getSource()) == null || _.forEachFeature(function(y) { - const v = new Vt({ - fill: new Yt({ + var p, v; + const g = nm(f), m = f.context; + m && (m.globalCompositeOperation = "destination-in", (v = (p = t.getBorderConstraint()) == null ? void 0 : p.getSource()) == null || v.forEachFeature(function(y) { + const x = new Bt({ + fill: new Ut({ color: "white" }) }); - g.drawFeature(y, v); + g.drawFeature(y, x); }), m.globalCompositeOperation = "source-over"); })); }); @@ -17976,17 +17976,17 @@ class ly { }); } } -const hy = `:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move} -`, cy = `#map{width:100%;height:100%;background-color:#fff}.ol-layer{background-color:#80808020}.map-overlay{width:100vw;height:100vh;background-color:gray;opacity:.3}.overlay-index{z-index:10} -`, Io = `.left-buttons-control-container{display:flex;position:absolute;width:var(--icon-width);flex-direction:column;left:var(--side-distance)}.right-buttons-control-container{display:flex;position:absolute;right:var(--side-distance);width:var(--icon-width);flex-direction:column}.ol-control{background-color:transparent}.ol-control button:hover{background-color:var(--control-background-color-hover);outline:none}.ol-control button:focus{background-color:var(--control-background-color-hover);outline:none}.ol-zoom{position:relative;top:0px;left:0px;margin-bottom:var(--top-distance)}.ol-zoom>.ol-zoom-in{margin-bottom:1px}.ol-full-screen{position:relative;width:var(--icon-width);top:0px;right:0px;margin-bottom:var(--top-distance)}.center-control,.information-control{margin-bottom:var(--top-distance)}.ol-zoom>button{margin:0}.ol-full-screen>button,.ol-full-screen-custom-small>button,.ol-full-screen-custom-medium>button,.ol-full-screen-custom-large>button{border-radius:var(--icon-border-radius);margin:0;cursor:pointer}.ol-control button{background-color:var(--control-background-color);width:var(--icon-width);height:var(--icon-height)}.ol-zoom-in,.ol-zoom-out,.information-control,.center-control,.rotation-control,.ol-full-screen-true,.ol-full-screen-false{z-index:0;position:relative;width:var(--icon-width);height:var(--icon-height);background-color:var(--control-background-color);border-radius:var(--icon-border-radius);cursor:pointer}.ol-zoom-in:hover,.ol-zoom-out:hover,.information-control:hover,.center-control:hover,.rotation-control:hover,.ol-full-screen-true:hover,.ol-full-screen-false:hover,.information-control:focus,.center-control:focus,.rotation-control:focus{background-color:var(--control-background-color-hover);outline:none}.ol-zoom-in{border-top-right-radius:var(--icon-border-radius);border-top-left-radius:var(--icon-border-radius)}.ol-zoom-out{border-bottom-right-radius:var(--icon-border-radius);border-bottom-left-radius:var(--icon-border-radius)}.ol-zoom-in>div>svg,.ol-zoom-out>div>svg,.ol-full-screen-true>div>svg,.ol-full-screen-false>div>svg{width:var(--svg-icon-size);height:var(--svg-icon-size)}.ol-zoom-in>div>svg>g>.icon,.ol-zoom-out>div>svg>g>.icon,.ol-full-screen-true>div>svg>g>.icon,.ol-full-screen-false>div>svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}@media only screen and (min-width: 420px){.left-buttons-control-container,.right-buttons-control-container{top:var(--top-distance)}}@media only screen and (max-width: 419px){.left-buttons-control-container,.right-buttons-control-container{top:calc(calc(var(--top-distance) * 2) + var(--box-height))}} -`, hf = `.notification-element-info-light{--notification-background-color: #DBEAFE;--notification-stroke-color: #1D4ED8;--notification-text-color: #1D4ED8}.notification-element-info-dark{--notification-background-color: #2563EB;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}.notification-element-warning-light{--notification-background-color: #FEF3C7;--notification-stroke-color: #B45309;--notification-text-color: #B45309}.notification-element-warning-dark{--notification-background-color: #D97706;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}.notification-element-error-light{--notification-background-color: #FEE2E2;--notification-stroke-color: #B91C1C;--notification-text-color: #B91C1C}.notification-element-error-dark{--notification-background-color: #DC2626;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}@media only screen and (max-width: 350px){.notification-element{left:10px;width:calc(100% - 50px);max-width:302px}}@media only screen and (min-width: 351px) and (max-width: 995px){.notification-element{left:calc((100% - 334px)/2);width:100%;max-width:302px}}@media only screen and (min-width: 996px){.notification-element{left:calc((100% - (var(--notification-width) + 30px)) / 2);width:var(--notification-width)}}.notification-element{position:absolute;bottom:10px;display:block;font-family:sans-serif;--icon-size: 32px;background-color:var(--notification-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);z-index:5;grid-template-columns:100%;grid-template-rows:100%}.notification-title>div>svg{display:block;width:var(--icon-size);height:var(--icon-size);padding-right:10px}.notification-icon-container{height:100%}.notification-title>div>svg>g>.icon{fill:none;stroke:var(--notification-stroke-color);stroke-width:2px;stroke-linejoin:round;stroke-linecap:round}.notification-title{display:flex}.notification-title-text{font-weight:400;font-size:12px;line-height:15px;color:var(--notification-text-color)} +const h3 = `:root,:host{--ol-background-color: white;--ol-accent-background-color: #F5F5F5;--ol-subtle-background-color: rgba(128, 128, 128, .25);--ol-partial-background-color: rgba(255, 255, 255, .75);--ol-foreground-color: #333333;--ol-subtle-foreground-color: #666666;--ol-brand-color: #00AAFF}.ol-box{box-sizing:border-box;border-radius:2px;border:1.5px solid var(--ol-background-color);background-color:var(--ol-partial-background-color)}.ol-mouse-position{top:8px;right:8px;position:absolute}.ol-scale-line{background:var(--ol-partial-background-color);border-radius:4px;bottom:8px;left:8px;padding:2px;position:absolute}.ol-scale-line-inner{border:1px solid var(--ol-subtle-foreground-color);border-top:none;color:var(--ol-foreground-color);font-size:10px;text-align:center;margin:1px;will-change:contents,width;transition:all .25s}.ol-scale-bar{position:absolute;bottom:8px;left:8px}.ol-scale-bar-inner{display:flex}.ol-scale-step-marker{width:1px;height:15px;background-color:var(--ol-foreground-color);float:right;z-index:10}.ol-scale-step-text{position:absolute;bottom:-5px;font-size:10px;z-index:11;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-text{position:absolute;font-size:12px;text-align:center;bottom:25px;color:var(--ol-foreground-color);text-shadow:-1.5px 0 var(--ol-partial-background-color),0 1.5px var(--ol-partial-background-color),1.5px 0 var(--ol-partial-background-color),0 -1.5px var(--ol-partial-background-color)}.ol-scale-singlebar{position:relative;height:10px;z-index:9;box-sizing:border-box;border:1px solid var(--ol-foreground-color)}.ol-scale-singlebar-even{background-color:var(--ol-subtle-foreground-color)}.ol-scale-singlebar-odd{background-color:var(--ol-background-color)}.ol-unsupported{display:none}.ol-viewport,.ol-unselectable{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ol-viewport canvas{all:unset}.ol-selectable{-webkit-touch-callout:default;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ol-grabbing{cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:grabbing}.ol-grab{cursor:move;cursor:-webkit-grab;cursor:-moz-grab;cursor:grab}.ol-control{position:absolute;background-color:var(--ol-subtle-background-color);border-radius:4px}.ol-zoom{top:.5em;left:.5em}.ol-rotate{top:.5em;right:.5em;transition:opacity .25s linear,visibility 0s linear}.ol-rotate.ol-hidden{opacity:0;visibility:hidden;transition:opacity .25s linear,visibility 0s linear .25s}.ol-zoom-extent{top:4.643em;left:.5em}.ol-full-screen{right:.5em;top:.5em}.ol-control button{display:block;margin:1px;padding:0;color:var(--ol-subtle-foreground-color);font-weight:700;text-decoration:none;font-size:inherit;text-align:center;height:1.375em;width:1.375em;line-height:.4em;background-color:var(--ol-background-color);border:none;border-radius:2px}.ol-control button::-moz-focus-inner{border:none;padding:0}.ol-zoom-extent button{line-height:1.4em}.ol-compass{display:block;font-weight:400;will-change:transform}.ol-touch .ol-control button{font-size:1.5em}.ol-touch .ol-zoom-extent{top:5.5em}.ol-control button:hover,.ol-control button:focus{text-decoration:none;outline:1px solid var(--ol-subtle-foreground-color);color:var(--ol-foreground-color)}.ol-zoom .ol-zoom-in{border-radius:2px 2px 0 0}.ol-zoom .ol-zoom-out{border-radius:0 0 2px 2px}.ol-attribution{text-align:right;bottom:.5em;right:.5em;max-width:calc(100% - 1.3em);display:flex;flex-flow:row-reverse;align-items:center}.ol-attribution a{color:var(--ol-subtle-foreground-color);text-decoration:none}.ol-attribution ul{margin:0;padding:1px .5em;color:var(--ol-foreground-color);text-shadow:0 0 2px var(--ol-background-color);font-size:12px}.ol-attribution li{display:inline;list-style:none}.ol-attribution li:not(:last-child):after{content:" "}.ol-attribution img{max-height:2em;max-width:inherit;vertical-align:middle}.ol-attribution button{flex-shrink:0}.ol-attribution.ol-collapsed ul{display:none}.ol-attribution:not(.ol-collapsed){background:var(--ol-partial-background-color)}.ol-attribution.ol-uncollapsible{bottom:0;right:0;border-radius:4px 0 0}.ol-attribution.ol-uncollapsible img{margin-top:-.2em;max-height:1.6em}.ol-attribution.ol-uncollapsible button{display:none}.ol-zoomslider{top:4.5em;left:.5em;height:200px}.ol-zoomslider button{position:relative;height:10px}.ol-touch .ol-zoomslider{top:5.5em}.ol-overviewmap{left:.5em;bottom:.5em}.ol-overviewmap.ol-uncollapsible{bottom:0;left:0;border-radius:0 4px 0 0}.ol-overviewmap .ol-overviewmap-map,.ol-overviewmap button{display:block}.ol-overviewmap .ol-overviewmap-map{border:1px solid var(--ol-subtle-foreground-color);height:150px;width:150px}.ol-overviewmap:not(.ol-collapsed) button{bottom:0;left:0;position:absolute}.ol-overviewmap.ol-collapsed .ol-overviewmap-map,.ol-overviewmap.ol-uncollapsible button{display:none}.ol-overviewmap:not(.ol-collapsed){background:var(--ol-subtle-background-color)}.ol-overviewmap-box{border:1.5px dotted var(--ol-subtle-foreground-color)}.ol-overviewmap .ol-overviewmap-box:hover{cursor:move} +`, c3 = `#map{width:100%;height:100%;background-color:#fff}.ol-layer{background-color:#80808020}.map-overlay{width:100vw;height:100vh;background-color:gray;opacity:.3}.overlay-index{z-index:10} +`, To = `.left-buttons-control-container{display:flex;position:absolute;width:var(--icon-width);flex-direction:column;left:var(--side-distance)}.right-buttons-control-container{display:flex;position:absolute;right:var(--side-distance);width:var(--icon-width);flex-direction:column}.ol-control{background-color:transparent}.ol-control button:hover{background-color:var(--control-background-color-hover);outline:none}.ol-control button:focus{background-color:var(--control-background-color-hover);outline:none}.ol-zoom{position:relative;top:0px;left:0px;margin-bottom:var(--top-distance)}.ol-zoom>.ol-zoom-in{margin-bottom:1px}.ol-full-screen{position:relative;width:var(--icon-width);top:0px;right:0px;margin-bottom:var(--top-distance)}.center-control,.information-control{margin-bottom:var(--top-distance)}.ol-zoom>button{margin:0}.ol-full-screen>button,.ol-full-screen-custom-small>button,.ol-full-screen-custom-medium>button,.ol-full-screen-custom-large>button{border-radius:var(--icon-border-radius);margin:0;cursor:pointer}.ol-control button{background-color:var(--control-background-color);width:var(--icon-width);height:var(--icon-height)}.ol-zoom-in,.ol-zoom-out,.information-control,.center-control,.rotation-control,.ol-full-screen-true,.ol-full-screen-false{z-index:0;position:relative;width:var(--icon-width);height:var(--icon-height);background-color:var(--control-background-color);border-radius:var(--icon-border-radius);cursor:pointer}.ol-zoom-in:hover,.ol-zoom-out:hover,.information-control:hover,.center-control:hover,.rotation-control:hover,.ol-full-screen-true:hover,.ol-full-screen-false:hover,.information-control:focus,.center-control:focus,.rotation-control:focus{background-color:var(--control-background-color-hover);outline:none}.ol-zoom-in{border-top-right-radius:var(--icon-border-radius);border-top-left-radius:var(--icon-border-radius)}.ol-zoom-out{border-bottom-right-radius:var(--icon-border-radius);border-bottom-left-radius:var(--icon-border-radius)}.ol-zoom-in>div>svg,.ol-zoom-out>div>svg,.ol-full-screen-true>div>svg,.ol-full-screen-false>div>svg{width:var(--svg-icon-size);height:var(--svg-icon-size)}.ol-zoom-in>div>svg>g>.icon,.ol-zoom-out>div>svg>g>.icon,.ol-full-screen-true>div>svg>g>.icon,.ol-full-screen-false>div>svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}@media only screen and (min-width: 420px){.left-buttons-control-container,.right-buttons-control-container{top:var(--top-distance)}}@media only screen and (max-width: 419px){.left-buttons-control-container,.right-buttons-control-container{top:calc(calc(var(--top-distance) * 2) + var(--box-height))}} +`, lf = `.notification-element-info-light{--notification-background-color: #DBEAFE;--notification-stroke-color: #1D4ED8;--notification-text-color: #1D4ED8}.notification-element-info-dark{--notification-background-color: #2563EB;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}.notification-element-warning-light{--notification-background-color: #FEF3C7;--notification-stroke-color: #B45309;--notification-text-color: #B45309}.notification-element-warning-dark{--notification-background-color: #D97706;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}.notification-element-error-light{--notification-background-color: #FEE2E2;--notification-stroke-color: #B91C1C;--notification-text-color: #B91C1C}.notification-element-error-dark{--notification-background-color: #DC2626;--notification-stroke-color: #FFFFFF;--notification-text-color: #FFFFFF}@media only screen and (max-width: 350px){.notification-element{left:10px;width:calc(100% - 50px);max-width:302px}}@media only screen and (min-width: 351px) and (max-width: 995px){.notification-element{left:calc((100% - 334px)/2);width:100%;max-width:302px}}@media only screen and (min-width: 996px){.notification-element{left:calc((100% - (var(--notification-width) + 30px)) / 2);width:var(--notification-width)}}.notification-element{position:absolute;bottom:10px;display:block;font-family:sans-serif;--icon-size: 32px;background-color:var(--notification-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);z-index:5;grid-template-columns:100%;grid-template-rows:100%}.notification-title>div>svg{display:block;width:var(--icon-size);height:var(--icon-size);padding-right:10px}.notification-icon-container{height:100%}.notification-title>div>svg>g>.icon{fill:none;stroke:var(--notification-stroke-color);stroke-width:2px;stroke-linejoin:round;stroke-linecap:round}.notification-title{display:flex}.notification-title-text{font-weight:400;font-size:12px;line-height:15px;color:var(--notification-text-color)} `; -var uy = Object.defineProperty, dy = Object.getOwnPropertyDescriptor, Js = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? dy(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var u3 = Object.defineProperty, d3 = Object.getOwnPropertyDescriptor, Qs = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? d3(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && uy(t, e, s), s; + return n && s && u3(t, e, s), s; }; -let tn = class extends Pt { +let tn = class extends At { constructor() { super(), this.type = "info", this.message = "", this.icon = "", this.theme = ""; } @@ -18004,11 +18004,11 @@ let tn = class extends Pt { } } render() { - return Lt` + return Ct`
    - ${Le(this.icon)} + ${Re(this.icon)}
    ${this.message}
    @@ -18016,23 +18016,23 @@ let tn = class extends Pt { `; } }; -tn.styles = [yt(hf)]; -Js([ +tn.styles = [yt(lf)]; +Qs([ Te() ], tn.prototype, "type", 2); -Js([ +Qs([ Te() ], tn.prototype, "message", 2); -Js([ - It() +Qs([ + Lt() ], tn.prototype, "icon", 2); -Js([ - It() +Qs([ + Lt() ], tn.prototype, "theme", 2); -tn = Js([ - qt("notification-box") +tn = Qs([ + Kt("notification-box") ], tn); -class yn extends kt { +class yn extends Dt { constructor(t, e) { const n = document.createElement( "notification-box" @@ -18049,17 +18049,17 @@ class yn extends kt { this.div.classList.remove("fade-in"), this.div.classList.add("fade-out"); } } -class fy { +class f3 { constructor() { this.geojsonFormat = new Wd(); } convertToMultiPoint(t) { return new an({ - geometry: new Ro([[t[0], t[1]]]) + geometry: new Po([[t[0], t[1]]]) }); } formatGeometryCollection(t) { - const e = new Vd(t); + const e = new Bd(t); return this.geojsonFormat.writeGeometry(e, { decimals: 2 }); @@ -18110,10 +18110,10 @@ class fy { return ((n = e.getOptions()) == null ? void 0 : n.outputFormat) === "GeometryCollection" ? this.generateGeometryCollection(t) : this.generateFeatureCollection(t, e); } } -class gy { +class g3 { constructor(t) { var s; - if (this.validZoomConstraint = !0, this.validAreaConstraint = !0, this.validBorderContraint = !0, this.validMaxElementConstraint = !0, this.displayMaxElementConstraint = !1, this.outputFormat = new fy(), !t) + if (this.validZoomConstraint = !0, this.validAreaConstraint = !0, this.validBorderContraint = !0, this.validMaxElementConstraint = !0, this.displayMaxElementConstraint = !1, this.outputFormat = new f3(), !t) throw new Error("Missing store!"); this.store = t; const e = this.store.getOptions(); @@ -18148,8 +18148,8 @@ class gy { this.setup(e.notifications), this.displayRightNotification(); } displayRightNotification() { - var t, e, n, s, r, o, a, l, h, c, u, d, f, g, m, p, _, y, v, x, C, E, w, R, A; - this.validZoomConstraint ? this.validBorderContraint ? this.validAreaConstraint ? this.displayMaxElementConstraint ? ((p = this.zoomNotificationControl) == null || p.hide(), (_ = this.inclusionNotificationControl) == null || _.hide(), (y = this.maxElementNotificationControl) == null || y.show(), (v = this.infosNotificationControl) == null || v.hide(), (x = this.borderContraintNotificationControl) == null || x.hide()) : ((C = this.zoomNotificationControl) == null || C.hide(), (E = this.inclusionNotificationControl) == null || E.hide(), (w = this.maxElementNotificationControl) == null || w.hide(), (R = this.infosNotificationControl) == null || R.show(), (A = this.borderContraintNotificationControl) == null || A.hide()) : ((u = this.zoomNotificationControl) == null || u.hide(), (d = this.inclusionNotificationControl) == null || d.show(), (f = this.maxElementNotificationControl) == null || f.hide(), (g = this.infosNotificationControl) == null || g.hide(), (m = this.borderContraintNotificationControl) == null || m.hide()) : ((o = this.zoomNotificationControl) == null || o.hide(), (a = this.inclusionNotificationControl) == null || a.hide(), (l = this.maxElementNotificationControl) == null || l.hide(), (h = this.infosNotificationControl) == null || h.hide(), (c = this.borderContraintNotificationControl) == null || c.show()) : ((t = this.zoomNotificationControl) == null || t.show(), (e = this.inclusionNotificationControl) == null || e.hide(), (n = this.maxElementNotificationControl) == null || n.hide(), (s = this.infosNotificationControl) == null || s.hide(), (r = this.borderContraintNotificationControl) == null || r.hide()); + var t, e, n, s, r, o, a, l, h, c, u, d, f, g, m, p, v, y, x, M, C, E, b, S, O; + this.validZoomConstraint ? this.validBorderContraint ? this.validAreaConstraint ? this.displayMaxElementConstraint ? ((p = this.zoomNotificationControl) == null || p.hide(), (v = this.inclusionNotificationControl) == null || v.hide(), (y = this.maxElementNotificationControl) == null || y.show(), (x = this.infosNotificationControl) == null || x.hide(), (M = this.borderContraintNotificationControl) == null || M.hide()) : ((C = this.zoomNotificationControl) == null || C.hide(), (E = this.inclusionNotificationControl) == null || E.hide(), (b = this.maxElementNotificationControl) == null || b.hide(), (S = this.infosNotificationControl) == null || S.show(), (O = this.borderContraintNotificationControl) == null || O.hide()) : ((u = this.zoomNotificationControl) == null || u.hide(), (d = this.inclusionNotificationControl) == null || d.show(), (f = this.maxElementNotificationControl) == null || f.hide(), (g = this.infosNotificationControl) == null || g.hide(), (m = this.borderContraintNotificationControl) == null || m.hide()) : ((o = this.zoomNotificationControl) == null || o.hide(), (a = this.inclusionNotificationControl) == null || a.hide(), (l = this.maxElementNotificationControl) == null || l.hide(), (h = this.infosNotificationControl) == null || h.hide(), (c = this.borderContraintNotificationControl) == null || c.show()) : ((t = this.zoomNotificationControl) == null || t.show(), (e = this.inclusionNotificationControl) == null || e.hide(), (n = this.maxElementNotificationControl) == null || n.hide(), (s = this.infosNotificationControl) == null || s.hide(), (r = this.borderContraintNotificationControl) == null || r.hide()); } setupTargetMode() { window.addEventListener("current-center-position", (t) => { @@ -18241,11 +18241,11 @@ class gy { this.validBorderContraint = !0; } } -const my = `:host>.no-box{--box-height: 0px;--top-distance: 10px}:host>.select{--box-height: 68px;--top-distance: 10px}:host>.large{--box-height: 79px;--top-distance: 10px}:host>.medium{--box-height: 64px;--top-distance: 10px}:host>.small{--box-height: 49px;--top-distance: 10px}:host>.light{--control-background-color: rgb(30 41 59 / 75%);--control-background-color-hover: rgb(30 41 59 / 100%);--control-icon-color: white;--information-box-background-color: white;--information-box-title-color: #1E293B;--information-cross-hover-color: rgb(30 41 59 / 75%);--information-box-text-color: #334155;--suggestion-box-text-color: #334155;--select-icon-background: #1E293B;--icon-border-color: #CBD5E1}:host>.dark{--control-background-color: rgb(255 255 255 / 75%);--control-background-color-hover: rgb(255 255 255 / 100%);--control-icon-color: #1E293B;--information-box-background-color: #1F2937;--information-box-title-color: #F3F4F6;--information-cross-hover-color: rgb(255 255 255 / 75%);--information-box-text-color: #9CA3AF;--suggestion-box-text-color: #F1F5F9;--select-icon-background: rgb(255,255,255, .75);--icon-border-color: #334155}:host>#map{--icon-width: 36px;--icon-height: 36px;--side-distance: 10px;--icon-border-radius: 4px;--box-border-radius: 4px;--svg-icon-size: 26px;--icon-stroke-width: 2px;font-family:sans-serif} -`, py = `@keyframes fadeIn{0%{opacity:0;visibility:inherit}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0;visibility:hidden}}.fade-in{animation:fadeIn .3s forwards}.fade-out{animation:fadeOut .3s forwards}.disabled{visibility:hidden} -`, _y = `@media only screen and (min-width: 513px){.layer-container-position{right:55px;width:100%}}@media only screen and (min-width: 350px) and (max-width: 512px){.layer-container-position{left:calc(50% - 166px);width:100%}}@media only screen and (max-width: 350px){.layer-container-position{left:10px;width:calc(100% - 20px)}}.layer-container-position{z-index:1;max-width:332px;top:var(--top-distance);position:absolute}@media only screen and (min-width: 513px){.custom-popup-element-position{right:55px;width:100%}}@media only screen and (min-width: 350px) and (max-width: 512px){.custom-popup-element-position{left:calc(50% - 166px);width:100%}}@media only screen and (max-width: 350px){.custom-popup-element-position{left:10px;width:calc(100% - 20px)}}.custom-popup-element-position{font-family:sans-serif;position:absolute;top:10px;z-index:2;max-width:332px} +const m3 = `:host>.no-box{--box-height: 0px;--top-distance: 10px}:host>.select{--box-height: 68px;--top-distance: 10px}:host>.large{--box-height: 79px;--top-distance: 10px}:host>.medium{--box-height: 64px;--top-distance: 10px}:host>.small{--box-height: 49px;--top-distance: 10px}:host>.light{--control-background-color: rgb(30 41 59 / 75%);--control-background-color-hover: rgb(30 41 59 / 100%);--control-icon-color: white;--information-box-background-color: white;--information-box-title-color: #1E293B;--information-cross-hover-color: rgb(30 41 59 / 75%);--information-box-text-color: #334155;--suggestion-box-text-color: #334155;--select-icon-background: #1E293B;--icon-border-color: #CBD5E1}:host>.dark{--control-background-color: rgb(255 255 255 / 75%);--control-background-color-hover: rgb(255 255 255 / 100%);--control-icon-color: #1E293B;--information-box-background-color: #1F2937;--information-box-title-color: #F3F4F6;--information-cross-hover-color: rgb(255 255 255 / 75%);--information-box-text-color: #9CA3AF;--suggestion-box-text-color: #F1F5F9;--select-icon-background: rgb(255,255,255, .75);--icon-border-color: #334155}:host>#map{--icon-width: 36px;--icon-height: 36px;--side-distance: 10px;--icon-border-radius: 4px;--box-border-radius: 4px;--svg-icon-size: 26px;--icon-stroke-width: 2px;font-family:sans-serif} +`, p3 = `@keyframes fadeIn{0%{opacity:0;visibility:inherit}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0;visibility:hidden}}.fade-in{animation:fadeIn .3s forwards}.fade-out{animation:fadeOut .3s forwards}.disabled{visibility:hidden} +`, v3 = `@media only screen and (min-width: 513px){.layer-container-position{right:55px;width:100%}}@media only screen and (min-width: 350px) and (max-width: 512px){.layer-container-position{left:calc(50% - 166px);width:100%}}@media only screen and (max-width: 350px){.layer-container-position{left:10px;width:calc(100% - 20px)}}.layer-container-position{z-index:1;max-width:332px;top:var(--top-distance);position:absolute}@media only screen and (min-width: 513px){.custom-popup-element-position{right:55px;width:100%}}@media only screen and (min-width: 350px) and (max-width: 512px){.custom-popup-element-position{left:calc(50% - 166px);width:100%}}@media only screen and (max-width: 350px){.custom-popup-element-position{left:10px;width:calc(100% - 20px)}}.custom-popup-element-position{font-family:sans-serif;position:absolute;top:10px;z-index:2;max-width:332px} `; -class yy { +class y3 { static webComponentOptions(t) { const e = { zoom: 15, @@ -18304,32 +18304,32 @@ class yy { }, outputFormat: "GeometryCollection" }; - return t.zoom !== void 0 && (e.zoom = t.zoom), t.minZoom !== void 0 && (e.minZoom = t.minZoom), t.maxZoom !== void 0 && (e.maxZoom = t.maxZoom), t.interaction !== void 0 && (e.interaction = t.interaction), t.search !== void 0 && (e.search = t.search), t.defaultCenter !== void 0 && t.defaultCenter[0] !== null && (e.defaultCenter = t.defaultCenter), t.information !== void 0 && (e.information = t.information), t.notifications !== void 0 && t.notifications.length > 0 && (e.notifications = t.notifications), t.mode !== void 0 && (e.mode = t.mode), t.cluster !== void 0 && (e.cluster = t.cluster), t.geolocationInformation !== void 0 && (e.geolocationInformation = t.geolocationInformation), t.wfs !== void 0 && (e.wfs = t.wfs), t.wmts !== void 0 && (e.wmts = t.wmts), t.inclusionArea !== void 0 && (e.inclusionArea = t.inclusionArea), t.selectionTargetBoxMessage !== void 0 && (e.selectionTargetBoxMessage = t.selectionTargetBoxMessage), t.border !== void 0 && (e.border = t.border), t.outputFormat !== void 0 && (e.outputFormat = t.outputFormat), e; + return t.zoom !== void 0 && (e.zoom = t.zoom), t.minZoom !== void 0 && (e.minZoom = t.minZoom), t.maxZoom !== void 0 && (e.maxZoom = t.maxZoom), t.interaction !== void 0 && (e.interaction = t.interaction), t.search !== void 0 && (e.search = t.search), t.defaultCenter !== void 0 && t.defaultCenter[0] !== null && (e.defaultCenter = t.defaultCenter), t.information !== void 0 && (e.information = t.information), t.notifications !== void 0 && t.notifications.length > 0 && (e.notifications = t.notifications), t.mode !== void 0 && (e.mode = t.mode), t.cluster !== void 0 && (e.cluster = t.cluster), t.geolocationInformation !== void 0 && (e.geolocationInformation = t.geolocationInformation), t.wfs !== void 0 && (e.wfs = t.wfs), t.wmts !== void 0 && (e.wmts = t.wmts), t.inclusionArea !== void 0 && (e.inclusionArea = t.inclusionArea), t.selectionTargetBoxMessage !== void 0 && (e.selectionTargetBoxMessage = t.selectionTargetBoxMessage), t.border !== void 0 && (e.border = t.border), t.outputFormat !== void 0 && (e.outputFormat = t.outputFormat), (e.mode.type == "select" || e.mode.type == "mix") && e.wfs.url == "" && console.error("Configuration error: There is no WFS url defined"), e; } } -class vy { +class x3 { static setupStyle() { - return new Vt({ - stroke: new Re({ + return new Bt({ + stroke: new Se({ color: "#C026D3", width: 1 }), - fill: new Yt({ + fill: new Ut({ color: "rgb(191, 38, 211, 0.10)" }) }); } } -class xy { +class M3 { constructor(t) { var s; const e = t.getOptions(); if (!e) throw new Error("Invalid store options"); - this.vectorSource = of.getSource(e.inclusionArea.url, e.inclusionArea.filter, !0); - const n = new Vn({ + this.vectorSource = rf.getSource(e.inclusionArea.url, e.inclusionArea.filter, !0); + const n = new Bn({ source: this.vectorSource, - style: vy.setupStyle() + style: x3.setupStyle() }); (s = t.getMap()) == null || s.addLayer(n), e.mode.type === "target" && window.addEventListener("current-center-position", (r) => { this.couldCreate(r.detail); @@ -18347,33 +18347,33 @@ class xy { return !1; } } -const Ao = `svg{margin-left:calc((var(--icon-width) - var(--svg-icon-size)) / 2);margin-top:calc((var(--icon-height) - var(--svg-icon-size)) / 2);width:var(--svg-icon-size);height:var(--svg-icon-size)}svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round} +const Lo = `svg{margin-left:calc((var(--icon-width) - var(--svg-icon-size)) / 2);margin-top:calc((var(--icon-height) - var(--svg-icon-size)) / 2);width:var(--svg-icon-size);height:var(--svg-icon-size)}svg>g>.icon{fill:none;stroke:var(--control-icon-color);stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round} `; -var Cy = Object.defineProperty, My = Object.getOwnPropertyDescriptor, Ey = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? My(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var C3 = Object.defineProperty, w3 = Object.getOwnPropertyDescriptor, E3 = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? w3(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && Cy(t, e, s), s; + return n && s && C3(t, e, s), s; }; -let Ga = class extends Pt { +let Fa = class extends At { constructor() { super(); } render() { - return Lt`
    + return Ct`
    - ${Le(st.geolocation)} + ${Re(st.geolocation)}
    `; } }; -Ga.styles = [yt(Ao), yt(Io)]; -Ga = Ey([ - qt("geolocation-control-button") -], Ga); -class wy extends kt { +Fa.styles = [yt(Lo), yt(To)]; +Fa = E3([ + Kt("geolocation-control-button") +], Fa); +class b3 extends Dt { constructor(t) { const e = document.createElement("geolocation-control-button"); super({ @@ -18391,21 +18391,21 @@ class wy extends kt { } } } -var Sy = Object.defineProperty, Ry = Object.getOwnPropertyDescriptor, by = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? Ry(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var P3 = Object.defineProperty, S3 = Object.getOwnPropertyDescriptor, _3 = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? S3(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && Sy(t, e, s), s; + return n && s && P3(t, e, s), s; }; -let $a = class extends Pt { +let Da = class extends At { render() { - return Lt`
    ${Le(st.rotation)}
    `; + return Ct`
    ${Re(st.rotation)}
    `; } }; -$a.styles = [yt(Ao)]; -$a = by([ - qt("rotation-control-button") -], $a); -class Dc extends kt { +Da.styles = [yt(Lo)]; +Da = _3([ + Kt("rotation-control-button") +], Da); +class zc extends Dt { constructor(t, e) { const n = document.createElement("div"), s = document.createElement("rotation-control-button"); n.appendChild(s); @@ -18420,14 +18420,14 @@ class Dc extends kt { this.map.getView().setRotation(0); } } -const Ly = `.custom-popup-element{background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:0 11px 11px;border-radius:var(--box-border-radius)}.custom-popup-element:after{content:"";width:var(--progress-width);height:4px;background:#008C6F;position:absolute;bottom:-1px;left:0;border-bottom-left-radius:4px;border-bottom-right-radius:var(--border-radius-right)}.custom-popup-title{display:flex;height:36px}.custom-popup-title-text{width:calc(100% - var(--svg-icon-size));font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color);align-items:center;display:flex}.custom-popup-title-svg-container{width:29px;height:36px;justify-content:flex-end;display:flex;align-items:center}.custom-popup-title-svg{width:10%;justify-content:flex-end;display:flex;fill:none;stroke:var(--information-box-title-color);stroke-width:2px;stroke-linejoin:round;stroke-linecap:round;cursor:pointer}.custom-popup-title-svg:hover{stroke:var(--information-cross-hover-color)}.custom-popup-content{width:calc(100% - var(--svg-icon-size));font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color)}svg{width:var(--svg-icon-size);height:var(--svg-icon-size);stroke:var(--information-box-title-color)}svg:hover{stroke:var(--information-cross-hover-color)}svg>g>.icon{fill:none;stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}.cross-div{width:var(--svg-icon-size);height:var(--svg-icon-size);cursor:pointer} +const R3 = `.custom-popup-element{background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:0 11px 11px;border-radius:var(--box-border-radius)}.custom-popup-element:after{content:"";width:var(--progress-width);height:4px;background:#008C6F;position:absolute;bottom:-1px;left:0;border-bottom-left-radius:4px;border-bottom-right-radius:var(--border-radius-right)}.custom-popup-title{display:flex;height:36px}.custom-popup-title-text{width:calc(100% - var(--svg-icon-size));font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color);align-items:center;display:flex}.custom-popup-title-svg-container{width:29px;height:36px;justify-content:flex-end;display:flex;align-items:center}.custom-popup-title-svg{width:10%;justify-content:flex-end;display:flex;fill:none;stroke:var(--information-box-title-color);stroke-width:2px;stroke-linejoin:round;stroke-linecap:round;cursor:pointer}.custom-popup-title-svg:hover{stroke:var(--information-cross-hover-color)}.custom-popup-content{width:calc(100% - var(--svg-icon-size));font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color)}svg{width:var(--svg-icon-size);height:var(--svg-icon-size);stroke:var(--information-box-title-color)}svg:hover{stroke:var(--information-cross-hover-color)}svg>g>.icon{fill:none;stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}.cross-div{width:var(--svg-icon-size);height:var(--svg-icon-size);cursor:pointer} `; -var Ty = Object.defineProperty, Iy = Object.getOwnPropertyDescriptor, Wl = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? Iy(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var T3 = Object.defineProperty, L3 = Object.getOwnPropertyDescriptor, Bl = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? L3(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && Ty(t, e, s), s; + return n && s && T3(t, e, s), s; }; -let Wn = class extends Pt { +let Wn = class extends At { constructor(i) { super(), this._width = 100, this._borderRadiusRight = 0, this.store = i; const t = i.getOptions(); @@ -18443,13 +18443,13 @@ let Wn = class extends Pt { } render() { var i, t; - return Lt` + return Ct`
    ${(i = this.store.getOptions()) == null ? void 0 : i.information.title}
    - ${Le(st.cross)} + ${Re(st.cross)}
    @@ -18464,17 +18464,17 @@ let Wn = class extends Pt { clearInterval(this.interval), tt.sendEvent("close-information-box", {}); } }; -Wn.styles = [yt(Ly)]; -Wl([ - It() +Wn.styles = [yt(R3)]; +Bl([ + Lt() ], Wn.prototype, "_width", 2); -Wl([ - It() +Bl([ + Lt() ], Wn.prototype, "_borderRadiusRight", 2); -Wn = Wl([ - qt("information-box") +Wn = Bl([ + Kt("information-box") ], Wn); -class Ay extends kt { +class O3 extends Dt { constructor(t) { const e = new Wn(t); super({ element: e }), this.div = e, this.div.classList.add("custom-popup-element-position"); @@ -18486,36 +18486,36 @@ class Ay extends kt { this.div.classList.remove("fade-in"), this.div.classList.add("fade-out"); } } -var Py = Object.defineProperty, Oy = Object.getOwnPropertyDescriptor, Ny = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? Oy(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var A3 = Object.defineProperty, I3 = Object.getOwnPropertyDescriptor, N3 = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? I3(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && Py(t, e, s), s; + return n && s && A3(t, e, s), s; }; -let Ba = class extends Pt { +let ja = class extends At { constructor() { super(); } render() { - return Lt`
    + return Ct`
    - ${Le(st.information)} + ${Re(st.information)}
    `; } }; -Ba.styles = [yt(Ao), yt(Io)]; -Ba = Ny([ - qt("information-control-button") -], Ba); -class Fy extends kt { +ja.styles = [yt(Lo), yt(To)]; +ja = N3([ + Kt("information-control-button") +], ja); +class z3 extends Dt { constructor(t, e, n) { const s = document.createElement("information-control-button"); super({ element: s - }), this.informationIsOpen = !0, s.addEventListener("click", this.toogleInformationBox.bind(this), !1), window.addEventListener("close-information-box", this.closeInformationBox.bind(this), !1), this.control = new Ay(e), n.addControl(this.control), this.openInformationBox(), this.setTarget(t); + }), this.informationIsOpen = !0, s.addEventListener("click", this.toogleInformationBox.bind(this), !1), window.addEventListener("close-information-box", this.closeInformationBox.bind(this), !1), this.control = new O3(e), n.addControl(this.control), this.openInformationBox(), this.setTarget(t); } closeInformationBox() { tt.sendEvent("clear-information-box-interval", {}), this.control.hide(), this.informationIsOpen = !1; @@ -18532,10 +18532,10 @@ class Fy extends kt { * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -const Dy = Fl(class extends Dl { +const Fc = Il(class extends Nl { constructor(i) { var t; - if (super(i), i.type !== Hd.ATTRIBUTE || i.name !== "class" || ((t = i.strings) === null || t === void 0 ? void 0 : t.length) > 2) + if (super(i), i.type !== Vd.ATTRIBUTE || i.name !== "class" || ((t = i.strings) === null || t === void 0 ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute."); } render(i) { @@ -18557,16 +18557,20 @@ const Dy = Fl(class extends Dl { const o = !!t[r]; o === this.nt.has(r) || ((n = this.st) === null || n === void 0 ? void 0 : n.has(r)) || (o ? (s.add(r), this.nt.add(r)) : (s.remove(r), this.nt.delete(r))); } - return Si; + return Pi; } -}), cf = `.layer-container{font-family:sans-serif}.layer-title-container{border-radius:var(--icon-border-radius) var(--icon-border-radius) 0px 0px;border-bottom:1px solid var(--icon-border-color);display:flex;background-color:var(--information-box-background-color)}.layer-text{width:calc(100% - 13px);height:36px;padding:0;font-weight:400;background-color:var(--information-box-background-color);font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color);margin:0 0 0 11px;align-items:center;display:flex}.layer-svg-container{width:29px;height:36px;margin-right:11px;display:flex;align-items:center}ul{margin-top:0;list-style-type:none;background-color:var(--information-box-background-color);padding-left:0;border-bottom-left-radius:var(--icon-border-radius);border-bottom-right-radius:var(--icon-border-radius)}li{height:64px;border-bottom:1px solid var(--icon-border-color);padding-left:11px;font-size:12px;display:flex;align-items:center;justify-content:start;color:var(--information-box-text-color)}li>.image-container{width:56px;display:flex;align-items:center;justify-content:center;height:inherit;padding-right:9px}li>.image-container>img{width:46px;height:46px;border-radius:var(--icon-border-radius);border:1px solid var(--icon-border-color)}.selected-layer{border:2px solid #dc2626!important;border-radius:var(--icon-border-radius)}ul>:last-child{border-bottom-right-radius:var(--icon-border-radius);border-bottom-left-radius:var(--icon-border-radius)}li:hover,li:focus{background-color:var(--icon-border-color)}svg{width:var(--svg-icon-size);height:var(--svg-icon-size);stroke:var(--information-box-title-color)}svg:hover{stroke:var(--information-cross-hover-color)}svg>g>.icon{fill:none;stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}.cross-div{width:var(--svg-icon-size);height:var(--svg-icon-size);cursor:pointer} +}); +class hf { +} +hf.baseMapIcon = "data:image/png;base64,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"; +const cf = `.layer-container{font-family:sans-serif}.layer-title-container{border-radius:var(--icon-border-radius) var(--icon-border-radius) 0px 0px;border-bottom:1px solid var(--icon-border-color);display:flex;background-color:var(--information-box-background-color)}.layer-text{width:calc(100% - 13px);height:36px;padding:0;font-weight:400;background-color:var(--information-box-background-color);font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color);margin:0 0 0 11px;align-items:center;display:flex}.layer-svg-container{width:29px;height:36px;margin-right:11px;display:flex;align-items:center}ul{margin-top:0;list-style-type:none;background-color:var(--information-box-background-color);padding-left:0;border-bottom-left-radius:var(--icon-border-radius);border-bottom-right-radius:var(--icon-border-radius)}li{height:64px;border-bottom:1px solid var(--icon-border-color);padding-left:11px;font-size:12px;display:flex;align-items:center;justify-content:start;color:var(--information-box-text-color)}li>.image-container{width:56px;display:flex;align-items:center;justify-content:center;height:inherit;padding-right:9px}li>.image-container>img{width:46px;height:46px;border-radius:var(--icon-border-radius);border:1px solid var(--icon-border-color)}.selected-layer{border:2px solid #dc2626!important;border-radius:var(--icon-border-radius)}ul>:last-child{border-bottom-right-radius:var(--icon-border-radius);border-bottom-left-radius:var(--icon-border-radius)}li:hover,li:focus{background-color:var(--icon-border-color)}svg{width:var(--svg-icon-size);height:var(--svg-icon-size);stroke:var(--information-box-title-color)}svg:hover{stroke:var(--information-cross-hover-color)}svg>g>.icon{fill:none;stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}.cross-div{width:var(--svg-icon-size);height:var(--svg-icon-size);cursor:pointer} `; -var ky = Object.defineProperty, Gy = Object.getOwnPropertyDescriptor, is = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? Gy(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var F3 = Object.defineProperty, D3 = Object.getOwnPropertyDescriptor, is = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? D3(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && ky(t, e, s), s; + return n && s && F3(t, e, s), s; }; -let Hn = class extends Pt { +let Vn = class extends At { constructor() { super(...arguments), this._currentSelectedIndex = 0, this._wmts = [], this.wmts = ""; } @@ -18577,12 +18581,18 @@ let Hn = class extends Pt { i.has("wmts") && (this._wmts = JSON.parse(this.wmts)); } render() { - return Lt` + return Ct`
      ${this._wmts.map( - (i, t) => Lt`
    • this.selectLayer(i, t)}> + (i, t) => Ct`
    • this.selectLayer(i, t)}>
      - + ${zl( + i.thumbnail && i.thumbnail.length > 0 ? Ct` + + ` : Ct` + + ` + )}

      ${i.name}

    • ` @@ -18591,30 +18601,30 @@ let Hn = class extends Pt { `; } }; -Hn.styles = [yt(cf)]; +Vn.styles = [yt(cf)]; is([ - It() -], Hn.prototype, "_currentSelectedIndex", 2); + Lt() +], Vn.prototype, "_currentSelectedIndex", 2); is([ - It() -], Hn.prototype, "_wmts", 2); + Lt() +], Vn.prototype, "_wmts", 2); is([ Te() -], Hn.prototype, "wmts", 2); -Hn = is([ - qt("layer-list") -], Hn); -let io = class extends Pt { +], Vn.prototype, "wmts", 2); +Vn = is([ + Kt("layer-list") +], Vn); +let eo = class extends At { constructor() { super(...arguments), this.wmts = []; } render() { - return Lt`
      + return Ct`

      Affichage de la carte

      - ${Le(st.cross)} + ${Re(st.cross)}
      @@ -18625,14 +18635,14 @@ let io = class extends Pt { tt.sendEvent("layer-selection-closed", void 0); } }; -io.styles = [yt(cf)]; +eo.styles = [yt(cf)]; is([ Te() -], io.prototype, "wmts", 2); -io = is([ - qt("layer-selection") -], io); -class $y extends kt { +], eo.prototype, "wmts", 2); +eo = is([ + Kt("layer-selection") +], eo); +class j3 extends Dt { constructor(t) { const e = document.createElement("layer-selection"); e.wmts = t, super({ element: e }), this.element.classList.add("layer-container-position"); @@ -18647,34 +18657,34 @@ class $y extends kt { this.element.classList.remove("fade-in"), this.element.classList.add("fade-out"); } } -var By = Object.defineProperty, zy = Object.getOwnPropertyDescriptor, Zy = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? zy(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var k3 = Object.defineProperty, X3 = Object.getOwnPropertyDescriptor, G3 = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? X3(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && By(t, e, s), s; + return n && s && k3(t, e, s), s; }; -let za = class extends Pt { +let ka = class extends At { render() { - return Lt`
      + return Ct`
      - ${Le(st.stack)} + ${Re(st.stack)}
      `; } }; -za.styles = [yt(Ao), yt(Io)]; -za = Zy([ - qt("geo-layer-control-button") -], za); -class Uy extends kt { +ka.styles = [yt(Lo), yt(To)]; +ka = G3([ + Kt("geo-layer-control-button") +], ka); +class H3 extends Dt { constructor(t, e, n) { const s = document.createElement( "geo-layer-control-button" ); super({ element: s - }), this.isOpen = !1, this.layerSelection = new $y(n), this.layerSelection.disable(), e.addControl(this.layerSelection), s.addEventListener("click", () => { + }), this.isOpen = !1, this.layerSelection = new j3(n), this.layerSelection.disable(), e.addControl(this.layerSelection), s.addEventListener("click", () => { this.toogleSelection(); }), window.addEventListener("layer-selection-closed", () => this.close()), this.setTarget(t); } @@ -18685,7 +18695,7 @@ class Uy extends kt { this.isOpen = !1, this.layerSelection.hide(); } } -class kc extends kt { +class Dc extends Dt { constructor(t) { const e = document.createElement("div"); e.className = t, super({ @@ -18693,48 +18703,48 @@ class kc extends kt { }), this.div = e; } } -class Vy { +class Z3 { static setupIcon(t, e) { var l; const n = e.getOptions(), s = t.readonly, r = e.getMap(); if (!r) throw new Error("Missing map!"); - const o = new kc("left-buttons-control-container"); + const o = new Dc("left-buttons-control-container"); r.addControl(o); - const a = new kc("right-buttons-control-container"); - r.addControl(a), s || r.addControl(new Fy(a.div, e, r)), n != null && n.interaction.fullscreen && r.addControl( - new y2({ + const a = new Dc("right-buttons-control-container"); + r.addControl(a), s || r.addControl(new z3(a.div, e, r)), n != null && n.interaction.fullscreen && r.addControl( + new ym({ label: st.fullScreenLabel(), labelActive: st.fullScreenLabelActive(), className: "ol-full-screen", target: a.div }) - ), r.addControl(new Uy(a.div, r, (l = n == null ? void 0 : n.wmts) != null ? l : [])), n != null && n.interaction.displayZoom && r.addControl( + ), r.addControl(new H3(a.div, r, (l = n == null ? void 0 : n.wmts) != null ? l : [])), n != null && n.interaction.displayZoom && r.addControl( new hd({ zoomInLabel: st.zoomInLabel(), zoomOutLabel: st.zoomOutLabel(), className: "ol-zoom", target: o.div }) - ), (n == null ? void 0 : n.interaction.enableCenterButton) && !s && r.addControl(new wy(o.div)), n != null && n.interaction.enableRotation && Wt.registerBorderConstaintMapEvent( + ), (n == null ? void 0 : n.interaction.enableCenterButton) && !s && r.addControl(new b3(o.div)), n != null && n.interaction.enableRotation && Wt.registerBorderConstaintMapEvent( "change:rotation", - (h) => Wy(r, h, o.div), + (h) => B3(r, h, o.div), r, n ); } } -function Wy(i, t, e) { +function B3(i, t, e) { i.getControls().forEach((n) => { - n instanceof Dc && i.removeControl(n); - }), t.target.getRotation() !== 0 && i.addControl(new Dc(e, i)); + n instanceof zc && i.removeControl(n); + }), t.target.getRotation() !== 0 && i.addControl(new zc(e, i)); } -var Hy = Object.defineProperty, Xy = Object.getOwnPropertyDescriptor, Yy = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? Xy(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var W3 = Object.defineProperty, V3 = Object.getOwnPropertyDescriptor, Y3 = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? V3(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && Hy(t, e, s), s; + return n && s && W3(t, e, s), s; }; -class jy { +class U3 { constructor(t) { var n; const e = t.getMap(); @@ -18752,12 +18762,12 @@ class jy { ); } } -let Gc = class extends Pt { +let jc = class extends At { constructor() { super(); } render() { - return Lt` + return Ct`
      @@ -18786,23 +18796,23 @@ let Gc = class extends Pt { `; } }; -Gc = Yy([ - qt("target-element") -], Gc); -class Ky extends kt { +jc = Y3([ + Kt("target-element") +], jc); +class J3 extends Dt { constructor(t) { const e = document.createElement("target-element"); - super({ element: e }), new jy(t); + super({ element: e }), new U3(t); } } -const qy = `@media only screen and (min-width: 351px) and (max-width: 995px){.box-element{left:calc(50% - 167px);width:calc(100% - 30px);max-width:302px}}@media only screen and (max-width: 350px){.box-element{left:10px;width:calc(100% - 50px);max-width:302px}}@media only screen and (min-width: 996px){.box-element{left:calc((100% - (var(--target-box-width) + 30px)) / 2);width:calc(var(--target-box-width))}}.box-element{position:absolute;top:10px;background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);border:1px solid var(--information-box-background-color)}.box-element-title{display:flex}.box-element-title-text{width:90%;font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color)}.box-element-content{font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color)} +const q3 = `@media only screen and (min-width: 351px) and (max-width: 995px){.box-element{left:calc(50% - 167px);width:calc(100% - 30px);max-width:302px}}@media only screen and (max-width: 350px){.box-element{left:10px;width:calc(100% - 50px);max-width:302px}}@media only screen and (min-width: 996px){.box-element{left:calc((100% - (var(--target-box-width) + 30px)) / 2);width:calc(var(--target-box-width))}}.box-element{position:absolute;top:10px;background-color:var(--information-box-background-color);box-shadow:0 1px 4px #0003;padding:15px;border-radius:var(--box-border-radius);border:1px solid var(--information-box-background-color)}.box-element-title{display:flex}.box-element-title-text{width:90%;font-weight:600;font-size:14px;line-height:17px;color:var(--information-box-title-color)}.box-element-content{font-weight:400;font-size:12px;line-height:15px;color:var(--information-box-text-color)} `; -var Jy = Object.defineProperty, Qy = Object.getOwnPropertyDescriptor, Qs = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? Qy(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var K3 = Object.defineProperty, Q3 = Object.getOwnPropertyDescriptor, $s = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? Q3(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && Jy(t, e, s), s; + return n && s && K3(t, e, s), s; }; -let Ti = class extends Pt { +let Ti = class extends At { constructor(i) { super(), this.defaultPosition = [0, 0], this._currentPosition = "", this._reversePosition = ""; const t = i.getOptions(); @@ -18829,7 +18839,7 @@ let Ti = class extends Pt { } render() { var i; - return Lt` + return Ct`
      ${(i = this.options) == null ? void 0 : i.selectionTargetBoxMessage}
      @@ -18840,23 +18850,23 @@ let Ti = class extends Pt { `; } }; -Ti.styles = [yt(qy)]; -Qs([ +Ti.styles = [yt(q3)]; +$s([ Te() ], Ti.prototype, "defaultPosition", 2); -Qs([ - It() +$s([ + Lt() ], Ti.prototype, "_currentPosition", 2); -Qs([ - It() +$s([ + Lt() ], Ti.prototype, "_reversePosition", 2); -Qs([ - It() +$s([ + Lt() ], Ti.prototype, "_lastPosition", 2); -Ti = Qs([ - qt("target-information-box-element") +Ti = $s([ + Kt("target-information-box-element") ], Ti); -class tv extends kt { +class $3 extends Dt { constructor(t) { var s, r; const e = new Ti(t); @@ -18867,10 +18877,10 @@ class tv extends kt { Wt.setResizeEvent(this.element, "--target-box-width", n); } } -function ev(i) { +function ty(i) { i("EPSG:4326", "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"), i("EPSG:4269", "+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"), i("EPSG:3857", "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"), i.WGS84 = i["EPSG:4326"], i["EPSG:3785"] = i["EPSG:3857"], i.GOOGLE = i["EPSG:3857"], i["EPSG:900913"] = i["EPSG:3857"], i["EPSG:102113"] = i["EPSG:3857"]; } -var en = 1, nn = 2, Ar = 3, iv = 4, Za = 5, $c = 6378137, nv = 6356752314e-3, Bc = 0.0066943799901413165, Ms = 484813681109536e-20, S = Math.PI / 2, sv = 0.16666666666666666, rv = 0.04722222222222222, ov = 0.022156084656084655, T = 1e-10, Bt = 0.017453292519943295, Fe = 57.29577951308232, lt = Math.PI / 4, $s = Math.PI * 2, Rt = 3.14159265359, oe = {}; +var en = 1, nn = 2, Or = 3, ey = 4, Xa = 5, kc = 6378137, iy = 6356752314e-3, Xc = 0.0066943799901413165, ws = 484813681109536e-20, P = Math.PI / 2, ny = 0.16666666666666666, sy = 0.04722222222222222, ry = 0.022156084656084655, T = 1e-10, Xt = 0.017453292519943295, ze = 57.29577951308232, lt = Math.PI / 4, ks = Math.PI * 2, _t = 3.14159265359, oe = {}; oe.greenwich = 0; oe.lisbon = -9.131906111111; oe.paris = 2.337229166667; @@ -18884,19 +18894,19 @@ oe.brussels = 4.367975; oe.stockholm = 18.058277777778; oe.athens = 23.7163375; oe.oslo = 10.722916666667; -const av = { +const oy = { ft: { to_meter: 0.3048 }, "us-ft": { to_meter: 1200 / 3937 } }; -var zc = /[\s_\-\/\(\)]/g; -function Ii(i, t) { +var Gc = /[\s_\-\/\(\)]/g; +function Li(i, t) { if (i[t]) return i[t]; - for (var e = Object.keys(i), n = t.toLowerCase().replace(zc, ""), s = -1, r, o; ++s < e.length; ) - if (r = e[s], o = r.toLowerCase().replace(zc, ""), o === n) + for (var e = Object.keys(i), n = t.toLowerCase().replace(Gc, ""), s = -1, r, o; ++s < e.length; ) + if (r = e[s], o = r.toLowerCase().replace(Gc, ""), o === n) return i[r]; } -function Ua(i) { +function Ga(i) { var t = {}, e = i.split("+").map(function(a) { return a.trim(); }).filter(function(a) { @@ -18911,34 +18921,34 @@ function Ua(i) { t.rf = parseFloat(a); }, lat_0: function(a) { - t.lat0 = a * Bt; + t.lat0 = a * Xt; }, lat_1: function(a) { - t.lat1 = a * Bt; + t.lat1 = a * Xt; }, lat_2: function(a) { - t.lat2 = a * Bt; + t.lat2 = a * Xt; }, lat_ts: function(a) { - t.lat_ts = a * Bt; + t.lat_ts = a * Xt; }, lon_0: function(a) { - t.long0 = a * Bt; + t.long0 = a * Xt; }, lon_1: function(a) { - t.long1 = a * Bt; + t.long1 = a * Xt; }, lon_2: function(a) { - t.long2 = a * Bt; + t.long2 = a * Xt; }, alpha: function(a) { - t.alpha = parseFloat(a) * Bt; + t.alpha = parseFloat(a) * Xt; }, gamma: function(a) { t.rectified_grid_angle = parseFloat(a); }, lonc: function(a) { - t.longc = a * Bt; + t.longc = a * Xt; }, x_0: function(a) { t.x0 = parseFloat(a); @@ -18977,15 +18987,15 @@ function Ua(i) { }, units: function(a) { t.units = a; - var l = Ii(av, a); + var l = Li(oy, a); l && (t.to_meter = l.to_meter); }, from_greenwich: function(a) { - t.from_greenwich = a * Bt; + t.from_greenwich = a * Xt; }, pm: function(a) { - var l = Ii(oe, a); - t.from_greenwich = (l || parseFloat(a)) * Bt; + var l = Li(oe, a); + t.from_greenwich = (l || parseFloat(a)) * Xt; }, nadgrids: function(a) { a === "@null" ? t.datumCode = "none" : t.nadgrids = a; @@ -19002,41 +19012,41 @@ function Ua(i) { s = e[n], n in o ? (r = o[n], typeof r == "function" ? r(s) : t[r] = s) : t[n] = s; return typeof t.datumCode == "string" && t.datumCode !== "WGS84" && (t.datumCode = t.datumCode.toLowerCase()), t; } -var Bs = 1, uf = 2, df = 3, no = 4, ff = 5, Hl = -1, lv = /\s/, hv = /[A-Za-z]/, cv = /[A-Za-z84_]/, Po = /[,\]]/, gf = /[\d\.E\-\+]/; +var Xs = 1, uf = 2, df = 3, io = 4, ff = 5, Wl = -1, ay = /\s/, ly = /[A-Za-z]/, hy = /[A-Za-z84_]/, Oo = /[,\]]/, gf = /[\d\.E\-\+]/; function li(i) { if (typeof i != "string") throw new Error("not a string"); - this.text = i.trim(), this.level = 0, this.place = 0, this.root = null, this.stack = [], this.currentObject = null, this.state = Bs; + this.text = i.trim(), this.level = 0, this.place = 0, this.root = null, this.stack = [], this.currentObject = null, this.state = Xs; } li.prototype.readCharicter = function() { var i = this.text[this.place++]; - if (this.state !== no) - for (; lv.test(i); ) { + if (this.state !== io) + for (; ay.test(i); ) { if (this.place >= this.text.length) return; i = this.text[this.place++]; } switch (this.state) { - case Bs: + case Xs: return this.neutral(i); case uf: return this.keyword(i); - case no: + case io: return this.quoted(i); case ff: return this.afterquote(i); case df: return this.number(i); - case Hl: + case Wl: return; } }; li.prototype.afterquote = function(i) { if (i === '"') { - this.word += '"', this.state = no; + this.word += '"', this.state = io; return; } - if (Po.test(i)) { + if (Oo.test(i)) { this.word = this.word.trim(), this.afterItem(i); return; } @@ -19044,11 +19054,11 @@ li.prototype.afterquote = function(i) { }; li.prototype.afterItem = function(i) { if (i === ",") { - this.word !== null && this.currentObject.push(this.word), this.word = null, this.state = Bs; + this.word !== null && this.currentObject.push(this.word), this.word = null, this.state = Xs; return; } if (i === "]") { - this.level--, this.word !== null && (this.currentObject.push(this.word), this.word = null), this.state = Bs, this.currentObject = this.stack.pop(), this.currentObject || (this.state = Hl); + this.level--, this.word !== null && (this.currentObject.push(this.word), this.word = null), this.state = Xs, this.currentObject = this.stack.pop(), this.currentObject || (this.state = Wl); return; } }; @@ -19057,7 +19067,7 @@ li.prototype.number = function(i) { this.word += i; return; } - if (Po.test(i)) { + if (Oo.test(i)) { this.word = parseFloat(this.word), this.afterItem(i); return; } @@ -19071,35 +19081,35 @@ li.prototype.quoted = function(i) { this.word += i; }; li.prototype.keyword = function(i) { - if (cv.test(i)) { + if (hy.test(i)) { this.word += i; return; } if (i === "[") { var t = []; - t.push(this.word), this.level++, this.root === null ? this.root = t : this.currentObject.push(t), this.stack.push(this.currentObject), this.currentObject = t, this.state = Bs; + t.push(this.word), this.level++, this.root === null ? this.root = t : this.currentObject.push(t), this.stack.push(this.currentObject), this.currentObject = t, this.state = Xs; return; } - if (Po.test(i)) { + if (Oo.test(i)) { this.afterItem(i); return; } throw new Error(`havn't handled "` + i + '" in keyword yet, index ' + this.place); }; li.prototype.neutral = function(i) { - if (hv.test(i)) { + if (ly.test(i)) { this.word = i, this.state = uf; return; } if (i === '"') { - this.word = "", this.state = no; + this.word = "", this.state = io; return; } if (gf.test(i)) { this.word = i, this.state = df; return; } - if (Po.test(i)) { + if (Oo.test(i)) { this.afterItem(i); return; } @@ -19108,22 +19118,22 @@ li.prototype.neutral = function(i) { li.prototype.output = function() { for (; this.place < this.text.length; ) this.readCharicter(); - if (this.state === Hl) + if (this.state === Wl) return this.root; throw new Error('unable to parse string "' + this.text + '". State is ' + this.state); }; -function uv(i) { +function cy(i) { var t = new li(i); return t.output(); } -function Zc(i, t, e) { +function Hc(i, t, e) { Array.isArray(t) && (e.unshift(t), t = null); var n = t ? {} : i, s = e.reduce(function(r, o) { - return bn(o, r), r; + return _n(o, r), r; }, n); t && (i[t] = s); } -function bn(i, t) { +function _n(i, t) { if (!Array.isArray(i)) { t[i] = !0; return; @@ -19131,7 +19141,7 @@ function bn(i, t) { var e = i.shift(); if (e === "PARAMETER" && (e = i.shift()), i.length === 1) { if (Array.isArray(i[0])) { - t[e] = {}, bn(i[0], t[e]); + t[e] = {}, _n(i[0], t[e]); return; } t[e] = i[0]; @@ -19158,7 +19168,7 @@ function bn(i, t) { t[e] = { name: i[0].toLowerCase(), convert: i[1] - }, i.length === 3 && bn(i[2], t[e]); + }, i.length === 3 && _n(i[2], t[e]); return; case "SPHEROID": case "ELLIPSOID": @@ -19166,7 +19176,7 @@ function bn(i, t) { name: i[0], a: i[1], rf: i[2] - }, i.length === 4 && bn(i[3], t[e]); + }, i.length === 4 && _n(i[3], t[e]); return; case "PROJECTEDCRS": case "PROJCRS": @@ -19189,24 +19199,24 @@ function bn(i, t) { case "FITTED_CS": case "LOCAL_DATUM": case "DATUM": - i[0] = ["name", i[0]], Zc(t, e, i); + i[0] = ["name", i[0]], Hc(t, e, i); return; default: for (n = -1; ++n < i.length; ) if (!Array.isArray(i[n])) - return bn(i, t[e]); - return Zc(t, e, i); + return _n(i, t[e]); + return Hc(t, e, i); } } -var dv = 0.017453292519943295; -function fv(i, t) { +var uy = 0.017453292519943295; +function dy(i, t) { var e = t[0], n = t[1]; !(e in i) && n in i && (i[e] = i[n], t.length === 3 && (i[e] = t[2](i[e]))); } -function Ke(i) { - return i * dv; +function qe(i) { + return i * uy; } -function gv(i) { +function fy(i) { if (i.type === "GEOGCS" ? i.projName = "longlat" : i.type === "LOCAL_CS" ? (i.projName = "identity", i.local = !0) : typeof i.PROJECTION == "object" ? i.projName = Object.keys(i.PROJECTION)[0] : i.projName = i.PROJECTION, i.AXIS) { for (var t = "", e = 0, n = i.AXIS.length; e < n; ++e) { var s = [i.AXIS[e][0].toLowerCase(), i.AXIS[e][1].toLowerCase()]; @@ -19222,7 +19232,7 @@ function gv(i) { return h * c; } var a = function(h) { - return fv(i, h); + return dy(i, h); }, l = [ ["standard_parallel_1", "Standard_Parallel_1"], ["standard_parallel_1", "Latitude of 1st standard parallel"], @@ -19245,93 +19255,93 @@ function gv(i) { ["k0", "scale_factor"], ["latitude_of_center", "Latitude_Of_Center"], ["latitude_of_center", "Latitude_of_center"], - ["lat0", "latitude_of_center", Ke], + ["lat0", "latitude_of_center", qe], ["longitude_of_center", "Longitude_Of_Center"], ["longitude_of_center", "Longitude_of_center"], - ["longc", "longitude_of_center", Ke], + ["longc", "longitude_of_center", qe], ["x0", "false_easting", o], ["y0", "false_northing", o], - ["long0", "central_meridian", Ke], - ["lat0", "latitude_of_origin", Ke], - ["lat0", "standard_parallel_1", Ke], - ["lat1", "standard_parallel_1", Ke], - ["lat2", "standard_parallel_2", Ke], + ["long0", "central_meridian", qe], + ["lat0", "latitude_of_origin", qe], + ["lat0", "standard_parallel_1", qe], + ["lat1", "standard_parallel_1", qe], + ["lat2", "standard_parallel_2", qe], ["azimuth", "Azimuth"], - ["alpha", "azimuth", Ke], + ["alpha", "azimuth", qe], ["srsCode", "name"] ]; - l.forEach(a), !i.long0 && i.longc && (i.projName === "Albers_Conic_Equal_Area" || i.projName === "Lambert_Azimuthal_Equal_Area") && (i.long0 = i.longc), !i.lat_ts && i.lat1 && (i.projName === "Stereographic_South_Pole" || i.projName === "Polar Stereographic (variant B)") && (i.lat0 = Ke(i.lat1 > 0 ? 90 : -90), i.lat_ts = i.lat1); + l.forEach(a), !i.long0 && i.longc && (i.projName === "Albers_Conic_Equal_Area" || i.projName === "Lambert_Azimuthal_Equal_Area") && (i.long0 = i.longc), !i.lat_ts && i.lat1 && (i.projName === "Stereographic_South_Pole" || i.projName === "Polar Stereographic (variant B)") && (i.lat0 = qe(i.lat1 > 0 ? 90 : -90), i.lat_ts = i.lat1); } function mf(i) { - var t = uv(i), e = t.shift(), n = t.shift(); + var t = cy(i), e = t.shift(), n = t.shift(); t.unshift(["name", n]), t.unshift(["type", e]); var s = {}; - return bn(t, s), gv(s), s; + return _n(t, s), fy(s), s; } -function Xt(i) { +function Yt(i) { var t = this; if (arguments.length === 2) { var e = arguments[1]; - typeof e == "string" ? e.charAt(0) === "+" ? Xt[i] = Ua(arguments[1]) : Xt[i] = mf(arguments[1]) : Xt[i] = e; + typeof e == "string" ? e.charAt(0) === "+" ? Yt[i] = Ga(arguments[1]) : Yt[i] = mf(arguments[1]) : Yt[i] = e; } else if (arguments.length === 1) { if (Array.isArray(i)) return i.map(function(n) { - Array.isArray(n) ? Xt.apply(t, n) : Xt(n); + Array.isArray(n) ? Yt.apply(t, n) : Yt(n); }); if (typeof i == "string") { - if (i in Xt) - return Xt[i]; + if (i in Yt) + return Yt[i]; } else - "EPSG" in i ? Xt["EPSG:" + i.EPSG] = i : "ESRI" in i ? Xt["ESRI:" + i.ESRI] = i : "IAU2000" in i ? Xt["IAU2000:" + i.IAU2000] = i : console.log(i); + "EPSG" in i ? Yt["EPSG:" + i.EPSG] = i : "ESRI" in i ? Yt["ESRI:" + i.ESRI] = i : "IAU2000" in i ? Yt["IAU2000:" + i.IAU2000] = i : console.log(i); return; } } -ev(Xt); -function mv(i) { +ty(Yt); +function gy(i) { return typeof i == "string"; } -function pv(i) { - return i in Xt; +function my(i) { + return i in Yt; } -var _v = ["PROJECTEDCRS", "PROJCRS", "GEOGCS", "GEOCCS", "PROJCS", "LOCAL_CS", "GEODCRS", "GEODETICCRS", "GEODETICDATUM", "ENGCRS", "ENGINEERINGCRS"]; -function yv(i) { - return _v.some(function(t) { +var py = ["PROJECTEDCRS", "PROJCRS", "GEOGCS", "GEOCCS", "PROJCS", "LOCAL_CS", "GEODCRS", "GEODETICCRS", "GEODETICDATUM", "ENGCRS", "ENGINEERINGCRS"]; +function vy(i) { + return py.some(function(t) { return i.indexOf(t) > -1; }); } -var vv = ["3857", "900913", "3785", "102113"]; -function xv(i) { - var t = Ii(i, "authority"); +var yy = ["3857", "900913", "3785", "102113"]; +function xy(i) { + var t = Li(i, "authority"); if (!!t) { - var e = Ii(t, "epsg"); - return e && vv.indexOf(e) > -1; + var e = Li(t, "epsg"); + return e && yy.indexOf(e) > -1; } } -function Cv(i) { - var t = Ii(i, "extension"); +function My(i) { + var t = Li(i, "extension"); if (!!t) - return Ii(t, "proj4"); + return Li(t, "proj4"); } -function Mv(i) { +function Cy(i) { return i[0] === "+"; } -function Ev(i) { - if (mv(i)) { - if (pv(i)) - return Xt[i]; - if (yv(i)) { +function wy(i) { + if (gy(i)) { + if (my(i)) + return Yt[i]; + if (vy(i)) { var t = mf(i); - if (xv(t)) - return Xt["EPSG:3857"]; - var e = Cv(t); - return e ? Ua(e) : t; + if (xy(t)) + return Yt["EPSG:3857"]; + var e = My(t); + return e ? Ga(e) : t; } - if (Mv(i)) - return Ua(i); + if (Cy(i)) + return Ga(i); } else return i; } -function Uc(i, t) { +function Zc(i, t) { i = i || {}; var e, n; if (!t) @@ -19340,316 +19350,316 @@ function Uc(i, t) { e = t[n], e !== void 0 && (i[n] = e); return i; } -function $e(i, t, e) { +function ke(i, t, e) { var n = i * t; return e / Math.sqrt(1 - n * n); } function tr(i) { return i < 0 ? -1 : 1; } -function P(i) { - return Math.abs(i) <= Rt ? i : i - tr(i) * $s; +function A(i) { + return Math.abs(i) <= _t ? i : i - tr(i) * ks; } -function be(i, t, e) { +function _e(i, t, e) { var n = i * e, s = 0.5 * i; - return n = Math.pow((1 - n) / (1 + n), s), Math.tan(0.5 * (S - t)) / n; + return n = Math.pow((1 - n) / (1 + n), s), Math.tan(0.5 * (P - t)) / n; } -function zs(i, t) { - for (var e = 0.5 * i, n, s, r = S - 2 * Math.atan(t), o = 0; o <= 15; o++) - if (n = i * Math.sin(r), s = S - 2 * Math.atan(t * Math.pow((1 - n) / (1 + n), e)) - r, r += s, Math.abs(s) <= 1e-10) +function Gs(i, t) { + for (var e = 0.5 * i, n, s, r = P - 2 * Math.atan(t), o = 0; o <= 15; o++) + if (n = i * Math.sin(r), s = P - 2 * Math.atan(t * Math.pow((1 - n) / (1 + n), e)) - r, r += s, Math.abs(s) <= 1e-10) return r; return -9999; } -function wv() { +function Ey() { var i = this.b / this.a; - this.es = 1 - i * i, "x0" in this || (this.x0 = 0), "y0" in this || (this.y0 = 0), this.e = Math.sqrt(this.es), this.lat_ts ? this.sphere ? this.k0 = Math.cos(this.lat_ts) : this.k0 = $e(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) : this.k0 || (this.k ? this.k0 = this.k : this.k0 = 1); + this.es = 1 - i * i, "x0" in this || (this.x0 = 0), "y0" in this || (this.y0 = 0), this.e = Math.sqrt(this.es), this.lat_ts ? this.sphere ? this.k0 = Math.cos(this.lat_ts) : this.k0 = ke(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) : this.k0 || (this.k ? this.k0 = this.k : this.k0 = 1); } -function Sv(i) { +function by(i) { var t = i.x, e = i.y; - if (e * Fe > 90 && e * Fe < -90 && t * Fe > 180 && t * Fe < -180) + if (e * ze > 90 && e * ze < -90 && t * ze > 180 && t * ze < -180) return null; var n, s; - if (Math.abs(Math.abs(e) - S) <= T) + if (Math.abs(Math.abs(e) - P) <= T) return null; if (this.sphere) - n = this.x0 + this.a * this.k0 * P(t - this.long0), s = this.y0 + this.a * this.k0 * Math.log(Math.tan(lt + 0.5 * e)); + n = this.x0 + this.a * this.k0 * A(t - this.long0), s = this.y0 + this.a * this.k0 * Math.log(Math.tan(lt + 0.5 * e)); else { - var r = Math.sin(e), o = be(this.e, e, r); - n = this.x0 + this.a * this.k0 * P(t - this.long0), s = this.y0 - this.a * this.k0 * Math.log(o); + var r = Math.sin(e), o = _e(this.e, e, r); + n = this.x0 + this.a * this.k0 * A(t - this.long0), s = this.y0 - this.a * this.k0 * Math.log(o); } return i.x = n, i.y = s, i; } -function Rv(i) { +function Py(i) { var t = i.x - this.x0, e = i.y - this.y0, n, s; if (this.sphere) - s = S - 2 * Math.atan(Math.exp(-e / (this.a * this.k0))); + s = P - 2 * Math.atan(Math.exp(-e / (this.a * this.k0))); else { var r = Math.exp(-e / (this.a * this.k0)); - if (s = zs(this.e, r), s === -9999) + if (s = Gs(this.e, r), s === -9999) return null; } - return n = P(this.long0 + t / (this.a * this.k0)), i.x = n, i.y = s, i; + return n = A(this.long0 + t / (this.a * this.k0)), i.x = n, i.y = s, i; } -var bv = ["Mercator", "Popular Visualisation Pseudo Mercator", "Mercator_1SP", "Mercator_Auxiliary_Sphere", "merc"]; -const Lv = { - init: wv, - forward: Sv, - inverse: Rv, - names: bv +var Sy = ["Mercator", "Popular Visualisation Pseudo Mercator", "Mercator_1SP", "Mercator_Auxiliary_Sphere", "merc"]; +const _y = { + init: Ey, + forward: by, + inverse: Py, + names: Sy }; -function Tv() { +function Ry() { } -function Vc(i) { +function Bc(i) { return i; } -var Iv = ["longlat", "identity"]; -const Av = { - init: Tv, - forward: Vc, - inverse: Vc, - names: Iv +var Ty = ["longlat", "identity"]; +const Ly = { + init: Ry, + forward: Bc, + inverse: Bc, + names: Ty }; -var Pv = [Lv, Av], Pr = {}, so = []; +var Oy = [_y, Ly], Ar = {}, no = []; function pf(i, t) { - var e = so.length; - return i.names ? (so[e] = i, i.names.forEach(function(n) { - Pr[n.toLowerCase()] = e; + var e = no.length; + return i.names ? (no[e] = i, i.names.forEach(function(n) { + Ar[n.toLowerCase()] = e; }), this) : (console.log(t), !0); } -function Ov(i) { +function Ay(i) { if (!i) return !1; var t = i.toLowerCase(); - if (typeof Pr[t] < "u" && so[Pr[t]]) - return so[Pr[t]]; + if (typeof Ar[t] < "u" && no[Ar[t]]) + return no[Ar[t]]; } -function Nv() { - Pv.forEach(pf); +function Iy() { + Oy.forEach(pf); } -const Fv = { - start: Nv, +const Ny = { + start: Iy, add: pf, - get: Ov + get: Ay }; -var Y = {}; -Y.MERIT = { +var U = {}; +U.MERIT = { a: 6378137, rf: 298.257, ellipseName: "MERIT 1983" }; -Y.SGS85 = { +U.SGS85 = { a: 6378136, rf: 298.257, ellipseName: "Soviet Geodetic System 85" }; -Y.GRS80 = { +U.GRS80 = { a: 6378137, rf: 298.257222101, ellipseName: "GRS 1980(IUGG, 1980)" }; -Y.IAU76 = { +U.IAU76 = { a: 6378140, rf: 298.257, ellipseName: "IAU 1976" }; -Y.airy = { +U.airy = { a: 6377563396e-3, b: 635625691e-2, ellipseName: "Airy 1830" }; -Y.APL4 = { +U.APL4 = { a: 6378137, rf: 298.25, ellipseName: "Appl. Physics. 1965" }; -Y.NWL9D = { +U.NWL9D = { a: 6378145, rf: 298.25, ellipseName: "Naval Weapons Lab., 1965" }; -Y.mod_airy = { +U.mod_airy = { a: 6377340189e-3, b: 6356034446e-3, ellipseName: "Modified Airy" }; -Y.andrae = { +U.andrae = { a: 637710443e-2, rf: 300, ellipseName: "Andrae 1876 (Den., Iclnd.)" }; -Y.aust_SA = { +U.aust_SA = { a: 6378160, rf: 298.25, ellipseName: "Australian Natl & S. Amer. 1969" }; -Y.GRS67 = { +U.GRS67 = { a: 6378160, rf: 298.247167427, ellipseName: "GRS 67(IUGG 1967)" }; -Y.bessel = { +U.bessel = { a: 6377397155e-3, rf: 299.1528128, ellipseName: "Bessel 1841" }; -Y.bess_nam = { +U.bess_nam = { a: 6377483865e-3, rf: 299.1528128, ellipseName: "Bessel 1841 (Namibia)" }; -Y.clrk66 = { +U.clrk66 = { a: 63782064e-1, b: 63565838e-1, ellipseName: "Clarke 1866" }; -Y.clrk80 = { +U.clrk80 = { a: 6378249145e-3, rf: 293.4663, ellipseName: "Clarke 1880 mod." }; -Y.clrk58 = { +U.clrk58 = { a: 6378293645208759e-9, rf: 294.2606763692654, ellipseName: "Clarke 1858" }; -Y.CPM = { +U.CPM = { a: 63757387e-1, rf: 334.29, ellipseName: "Comm. des Poids et Mesures 1799" }; -Y.delmbr = { +U.delmbr = { a: 6376428, rf: 311.5, ellipseName: "Delambre 1810 (Belgium)" }; -Y.engelis = { +U.engelis = { a: 637813605e-2, rf: 298.2566, ellipseName: "Engelis 1985" }; -Y.evrst30 = { +U.evrst30 = { a: 6377276345e-3, rf: 300.8017, ellipseName: "Everest 1830" }; -Y.evrst48 = { +U.evrst48 = { a: 6377304063e-3, rf: 300.8017, ellipseName: "Everest 1948" }; -Y.evrst56 = { +U.evrst56 = { a: 6377301243e-3, rf: 300.8017, ellipseName: "Everest 1956" }; -Y.evrst69 = { +U.evrst69 = { a: 6377295664e-3, rf: 300.8017, ellipseName: "Everest 1969" }; -Y.evrstSS = { +U.evrstSS = { a: 6377298556e-3, rf: 300.8017, ellipseName: "Everest (Sabah & Sarawak)" }; -Y.fschr60 = { +U.fschr60 = { a: 6378166, rf: 298.3, ellipseName: "Fischer (Mercury Datum) 1960" }; -Y.fschr60m = { +U.fschr60m = { a: 6378155, rf: 298.3, ellipseName: "Fischer 1960" }; -Y.fschr68 = { +U.fschr68 = { a: 6378150, rf: 298.3, ellipseName: "Fischer 1968" }; -Y.helmert = { +U.helmert = { a: 6378200, rf: 298.3, ellipseName: "Helmert 1906" }; -Y.hough = { +U.hough = { a: 6378270, rf: 297, ellipseName: "Hough" }; -Y.intl = { +U.intl = { a: 6378388, rf: 297, ellipseName: "International 1909 (Hayford)" }; -Y.kaula = { +U.kaula = { a: 6378163, rf: 298.24, ellipseName: "Kaula 1961" }; -Y.lerch = { +U.lerch = { a: 6378139, rf: 298.257, ellipseName: "Lerch 1979" }; -Y.mprts = { +U.mprts = { a: 6397300, rf: 191, ellipseName: "Maupertius 1738" }; -Y.new_intl = { +U.new_intl = { a: 63781575e-1, b: 63567722e-1, ellipseName: "New International 1967" }; -Y.plessis = { +U.plessis = { a: 6376523, rf: 6355863, ellipseName: "Plessis 1817 (France)" }; -Y.krass = { +U.krass = { a: 6378245, rf: 298.3, ellipseName: "Krassovsky, 1942" }; -Y.SEasia = { +U.SEasia = { a: 6378155, b: 63567733205e-4, ellipseName: "Southeast Asia" }; -Y.walbeck = { +U.walbeck = { a: 6376896, b: 63558348467e-4, ellipseName: "Walbeck" }; -Y.WGS60 = { +U.WGS60 = { a: 6378165, rf: 298.3, ellipseName: "WGS 60" }; -Y.WGS66 = { +U.WGS66 = { a: 6378145, rf: 298.25, ellipseName: "WGS 66" }; -Y.WGS7 = { +U.WGS7 = { a: 6378135, rf: 298.26, ellipseName: "WGS 72" }; -var Dv = Y.WGS84 = { +var zy = U.WGS84 = { a: 6378137, rf: 298.257223563, ellipseName: "WGS 84" }; -Y.sphere = { +U.sphere = { a: 6370997, b: 6370997, ellipseName: "Normal Sphere (r=6370997)" }; -function kv(i, t, e, n) { +function Fy(i, t, e, n) { var s = i * i, r = t * t, o = (s - r) / s, a = 0; - n ? (i *= 1 - o * (sv + o * (rv + o * ov)), s = i * i, o = 0) : a = Math.sqrt(o); + n ? (i *= 1 - o * (ny + o * (sy + o * ry)), s = i * i, o = 0) : a = Math.sqrt(o); var l = (s - r) / r; return { es: o, @@ -19657,10 +19667,10 @@ function kv(i, t, e, n) { ep2: l }; } -function Gv(i, t, e, n, s) { +function Dy(i, t, e, n, s) { if (!i) { - var r = Ii(Y, n); - r || (r = Dv), i = r.a, t = r.b, e = r.rf; + var r = Li(U, n); + r || (r = zy), i = r.a, t = r.b, e = r.rf; } return e && !t && (t = (1 - 1 / e) * i), (e === 0 || Math.abs(i - t) < T) && (s = !0, t = i), { a: i, @@ -19669,168 +19679,168 @@ function Gv(i, t, e, n, s) { sphere: s }; } -var Gt = {}; -Gt.wgs84 = { +var jt = {}; +jt.wgs84 = { towgs84: "0,0,0", ellipse: "WGS84", datumName: "WGS84" }; -Gt.ch1903 = { +jt.ch1903 = { towgs84: "674.374,15.056,405.346", ellipse: "bessel", datumName: "swiss" }; -Gt.ggrs87 = { +jt.ggrs87 = { towgs84: "-199.87,74.79,246.62", ellipse: "GRS80", datumName: "Greek_Geodetic_Reference_System_1987" }; -Gt.nad83 = { +jt.nad83 = { towgs84: "0,0,0", ellipse: "GRS80", datumName: "North_American_Datum_1983" }; -Gt.nad27 = { +jt.nad27 = { nadgrids: "@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat", ellipse: "clrk66", datumName: "North_American_Datum_1927" }; -Gt.potsdam = { +jt.potsdam = { towgs84: "598.1,73.7,418.2,0.202,0.045,-2.455,6.7", ellipse: "bessel", datumName: "Potsdam Rauenberg 1950 DHDN" }; -Gt.carthage = { +jt.carthage = { towgs84: "-263.0,6.0,431.0", ellipse: "clark80", datumName: "Carthage 1934 Tunisia" }; -Gt.hermannskogel = { +jt.hermannskogel = { towgs84: "577.326,90.129,463.919,5.137,1.474,5.297,2.4232", ellipse: "bessel", datumName: "Hermannskogel" }; -Gt.osni52 = { +jt.osni52 = { towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15", ellipse: "airy", datumName: "Irish National" }; -Gt.ire65 = { +jt.ire65 = { towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15", ellipse: "mod_airy", datumName: "Ireland 1965" }; -Gt.rassadiran = { +jt.rassadiran = { towgs84: "-133.63,-157.5,-158.62", ellipse: "intl", datumName: "Rassadiran" }; -Gt.nzgd49 = { +jt.nzgd49 = { towgs84: "59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993", ellipse: "intl", datumName: "New Zealand Geodetic Datum 1949" }; -Gt.osgb36 = { +jt.osgb36 = { towgs84: "446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894", ellipse: "airy", datumName: "Airy 1830" }; -Gt.s_jtsk = { +jt.s_jtsk = { towgs84: "589,76,480", ellipse: "bessel", datumName: "S-JTSK (Ferro)" }; -Gt.beduaram = { +jt.beduaram = { towgs84: "-106,-87,188", ellipse: "clrk80", datumName: "Beduaram" }; -Gt.gunung_segara = { +jt.gunung_segara = { towgs84: "-403,684,41", ellipse: "bessel", datumName: "Gunung Segara Jakarta" }; -Gt.rnb72 = { +jt.rnb72 = { towgs84: "106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1", ellipse: "intl", datumName: "Reseau National Belge 1972" }; -function $v(i, t, e, n, s, r, o) { +function jy(i, t, e, n, s, r, o) { var a = {}; - return i === void 0 || i === "none" ? a.datum_type = Za : a.datum_type = iv, t && (a.datum_params = t.map(parseFloat), (a.datum_params[0] !== 0 || a.datum_params[1] !== 0 || a.datum_params[2] !== 0) && (a.datum_type = en), a.datum_params.length > 3 && (a.datum_params[3] !== 0 || a.datum_params[4] !== 0 || a.datum_params[5] !== 0 || a.datum_params[6] !== 0) && (a.datum_type = nn, a.datum_params[3] *= Ms, a.datum_params[4] *= Ms, a.datum_params[5] *= Ms, a.datum_params[6] = a.datum_params[6] / 1e6 + 1)), o && (a.datum_type = Ar, a.grids = o), a.a = e, a.b = n, a.es = s, a.ep2 = r, a; + return i === void 0 || i === "none" ? a.datum_type = Xa : a.datum_type = ey, t && (a.datum_params = t.map(parseFloat), (a.datum_params[0] !== 0 || a.datum_params[1] !== 0 || a.datum_params[2] !== 0) && (a.datum_type = en), a.datum_params.length > 3 && (a.datum_params[3] !== 0 || a.datum_params[4] !== 0 || a.datum_params[5] !== 0 || a.datum_params[6] !== 0) && (a.datum_type = nn, a.datum_params[3] *= ws, a.datum_params[4] *= ws, a.datum_params[5] *= ws, a.datum_params[6] = a.datum_params[6] / 1e6 + 1)), o && (a.datum_type = Or, a.grids = o), a.a = e, a.b = n, a.es = s, a.ep2 = r, a; } -var _f = {}; -function Bv(i, t) { - var e = new DataView(t), n = Uv(e), s = Vv(e, n); +var vf = {}; +function ky(i, t) { + var e = new DataView(t), n = Hy(e), s = Zy(e, n); s.nSubgrids > 1 && console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored"); - var r = Wv(e, s, n), o = { header: s, subgrids: r }; - return _f[i] = o, o; + var r = By(e, s, n), o = { header: s, subgrids: r }; + return vf[i] = o, o; } -function zv(i) { +function Xy(i) { if (i === void 0) return null; var t = i.split(","); - return t.map(Zv); + return t.map(Gy); } -function Zv(i) { +function Gy(i) { if (i.length === 0) return null; var t = i[0] === "@"; return t && (i = i.slice(1)), i === "null" ? { name: "null", mandatory: !t, grid: null, isNull: !0 } : { name: i, mandatory: !t, - grid: _f[i] || null, + grid: vf[i] || null, isNull: !1 }; } -function Ln(i) { +function Rn(i) { return i / 3600 * Math.PI / 180; } -function Uv(i) { +function Hy(i) { var t = i.getInt32(8, !1); return t === 11 ? !1 : (t = i.getInt32(8, !0), t !== 11 && console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"), !0); } -function Vv(i, t) { +function Zy(i, t) { return { nFields: i.getInt32(8, t), nSubgridFields: i.getInt32(24, t), nSubgrids: i.getInt32(40, t), - shiftType: Va(i, 56, 56 + 8).trim(), + shiftType: Ha(i, 56, 56 + 8).trim(), fromSemiMajorAxis: i.getFloat64(120, t), fromSemiMinorAxis: i.getFloat64(136, t), toSemiMajorAxis: i.getFloat64(152, t), toSemiMinorAxis: i.getFloat64(168, t) }; } -function Va(i, t, e) { +function Ha(i, t, e) { return String.fromCharCode.apply(null, new Uint8Array(i.buffer.slice(t, e))); } -function Wv(i, t, e) { +function By(i, t, e) { for (var n = 176, s = [], r = 0; r < t.nSubgrids; r++) { - var o = Xv(i, n, e), a = Yv(i, n, o, e), l = Math.round( + var o = Vy(i, n, e), a = Yy(i, n, o, e), l = Math.round( 1 + (o.upperLongitude - o.lowerLongitude) / o.longitudeInterval ), h = Math.round( 1 + (o.upperLatitude - o.lowerLatitude) / o.latitudeInterval ); s.push({ - ll: [Ln(o.lowerLongitude), Ln(o.lowerLatitude)], - del: [Ln(o.longitudeInterval), Ln(o.latitudeInterval)], + ll: [Rn(o.lowerLongitude), Rn(o.lowerLatitude)], + del: [Rn(o.longitudeInterval), Rn(o.latitudeInterval)], lim: [l, h], count: o.gridNodeCount, - cvs: Hv(a) + cvs: Wy(a) }); } return s; } -function Hv(i) { +function Wy(i) { return i.map(function(t) { - return [Ln(t.longitudeShift), Ln(t.latitudeShift)]; + return [Rn(t.longitudeShift), Rn(t.latitudeShift)]; }); } -function Xv(i, t, e) { +function Vy(i, t, e) { return { - name: Va(i, t + 8, t + 16).trim(), - parent: Va(i, t + 24, t + 24 + 8).trim(), + name: Ha(i, t + 8, t + 16).trim(), + parent: Ha(i, t + 24, t + 24 + 8).trim(), lowerLatitude: i.getFloat64(t + 72, e), upperLatitude: i.getFloat64(t + 88, e), lowerLongitude: i.getFloat64(t + 104, e), @@ -19840,7 +19850,7 @@ function Xv(i, t, e) { gridNodeCount: i.getInt32(t + 168, e) }; } -function Yv(i, t, e, n) { +function Yy(i, t, e, n) { for (var s = t + 176, r = 16, o = [], a = 0; a < e.gridNodeCount; a++) { var l = { latitudeShift: i.getFloat32(s + a * r, n), @@ -19852,29 +19862,29 @@ function Yv(i, t, e, n) { } return o; } -function ke(i, t) { - if (!(this instanceof ke)) - return new ke(i); +function De(i, t) { + if (!(this instanceof De)) + return new De(i); t = t || function(h) { if (h) throw h; }; - var e = Ev(i); + var e = wy(i); if (typeof e != "object") { t(i); return; } - var n = ke.projections.get(e.projName); + var n = De.projections.get(e.projName); if (!n) { t(i); return; } if (e.datumCode && e.datumCode !== "none") { - var s = Ii(Gt, e.datumCode); + var s = Li(jt, e.datumCode); s && (e.datum_params = e.datum_params || (s.towgs84 ? s.towgs84.split(",") : null), e.ellps = s.ellipse, e.datumName = s.datumName ? s.datumName : e.datumCode); } e.k0 = e.k0 || 1, e.axis = e.axis || "enu", e.ellps = e.ellps || "wgs84", e.lat1 = e.lat1 || e.lat0; - var r = Gv(e.a, e.b, e.rf, e.ellps, e.sphere), o = kv(r.a, r.b, r.rf, e.R_A), a = zv(e.nadgrids), l = e.datum || $v( + var r = Dy(e.a, e.b, e.rf, e.ellps, e.sphere), o = Fy(r.a, r.b, r.rf, e.R_A), a = Xy(e.nadgrids), l = e.datum || jy( e.datumCode, e.datum_params, r.a, @@ -19883,23 +19893,23 @@ function ke(i, t) { o.ep2, a ); - Uc(this, e), Uc(this, n), this.a = r.a, this.b = r.b, this.rf = r.rf, this.sphere = r.sphere, this.es = o.es, this.e = o.e, this.ep2 = o.ep2, this.datum = l, this.init(), t(null, this); + Zc(this, e), Zc(this, n), this.a = r.a, this.b = r.b, this.rf = r.rf, this.sphere = r.sphere, this.es = o.es, this.e = o.e, this.ep2 = o.ep2, this.datum = l, this.init(), t(null, this); } -ke.projections = Fv; -ke.projections.start(); -function jv(i, t) { +De.projections = Ny; +De.projections.start(); +function Uy(i, t) { return i.datum_type !== t.datum_type || i.a !== t.a || Math.abs(i.es - t.es) > 5e-11 ? !1 : i.datum_type === en ? i.datum_params[0] === t.datum_params[0] && i.datum_params[1] === t.datum_params[1] && i.datum_params[2] === t.datum_params[2] : i.datum_type === nn ? i.datum_params[0] === t.datum_params[0] && i.datum_params[1] === t.datum_params[1] && i.datum_params[2] === t.datum_params[2] && i.datum_params[3] === t.datum_params[3] && i.datum_params[4] === t.datum_params[4] && i.datum_params[5] === t.datum_params[5] && i.datum_params[6] === t.datum_params[6] : !0; } function yf(i, t, e) { var n = i.x, s = i.y, r = i.z ? i.z : 0, o, a, l, h; - if (s < -S && s > -1.001 * S) - s = -S; - else if (s > S && s < 1.001 * S) - s = S; + if (s < -P && s > -1.001 * P) + s = -P; + else if (s > P && s < 1.001 * P) + s = P; else { - if (s < -S) + if (s < -P) return { x: -1 / 0, y: -1 / 0, z: i.z }; - if (s > S) + if (s > P) return { x: 1 / 0, y: 1 / 0, z: i.z }; } return n > Math.PI && (n -= 2 * Math.PI), a = Math.sin(s), h = Math.cos(s), l = a * a, o = e / Math.sqrt(1 - t * l), { @@ -19908,28 +19918,28 @@ function yf(i, t, e) { z: (o * (1 - t) + r) * a }; } -function vf(i, t, e, n) { - var s = 1e-12, r = s * s, o = 30, a, l, h, c, u, d, f, g, m, p, _, y, v, x = i.x, C = i.y, E = i.z ? i.z : 0, w, R, A; - if (a = Math.sqrt(x * x + C * C), l = Math.sqrt(x * x + C * C + E * E), a / e < s) { - if (w = 0, l / e < s) - return R = S, A = -n, { +function xf(i, t, e, n) { + var s = 1e-12, r = s * s, o = 30, a, l, h, c, u, d, f, g, m, p, v, y, x, M = i.x, C = i.y, E = i.z ? i.z : 0, b, S, O; + if (a = Math.sqrt(M * M + C * C), l = Math.sqrt(M * M + C * C + E * E), a / e < s) { + if (b = 0, l / e < s) + return S = P, O = -n, { x: i.x, y: i.y, z: i.z }; } else - w = Math.atan2(C, x); - h = E / l, c = a / l, u = 1 / Math.sqrt(1 - t * (2 - t) * c * c), g = c * (1 - t) * u, m = h * u, v = 0; + b = Math.atan2(C, M); + h = E / l, c = a / l, u = 1 / Math.sqrt(1 - t * (2 - t) * c * c), g = c * (1 - t) * u, m = h * u, x = 0; do - v++, f = e / Math.sqrt(1 - t * m * m), A = a * g + E * m - f * (1 - t * m * m), d = t * f / (f + A), u = 1 / Math.sqrt(1 - d * (2 - d) * c * c), p = c * (1 - d) * u, _ = h * u, y = _ * g - p * m, g = p, m = _; - while (y * y > r && v < o); - return R = Math.atan(_ / Math.abs(p)), { - x: w, - y: R, - z: A + x++, f = e / Math.sqrt(1 - t * m * m), O = a * g + E * m - f * (1 - t * m * m), d = t * f / (f + O), u = 1 / Math.sqrt(1 - d * (2 - d) * c * c), p = c * (1 - d) * u, v = h * u, y = v * g - p * m, g = p, m = v; + while (y * y > r && x < o); + return S = Math.atan(v / Math.abs(p)), { + x: b, + y: S, + z: O }; } -function Kv(i, t, e) { +function Jy(i, t, e) { if (t === en) return { x: i.x + e[0], @@ -19945,7 +19955,7 @@ function Kv(i, t, e) { }; } } -function qv(i, t, e) { +function qy(i, t, e) { if (t === en) return { x: i.x - e[0], @@ -19961,23 +19971,23 @@ function qv(i, t, e) { }; } } -function Lr(i) { +function Rr(i) { return i === en || i === nn; } -function Jv(i, t, e) { - if (jv(i, t) || i.datum_type === Za || t.datum_type === Za) +function Ky(i, t, e) { + if (Uy(i, t) || i.datum_type === Xa || t.datum_type === Xa) return e; var n = i.a, s = i.es; - if (i.datum_type === Ar) { + if (i.datum_type === Or) { var r = Wc(i, !1, e); if (r !== 0) return; - n = $c, s = Bc; + n = kc, s = Xc; } var o = t.a, a = t.b, l = t.es; - if (t.datum_type === Ar && (o = $c, a = nv, l = Bc), s === l && n === o && !Lr(i.datum_type) && !Lr(t.datum_type)) + if (t.datum_type === Or && (o = kc, a = iy, l = Xc), s === l && n === o && !Rr(i.datum_type) && !Rr(t.datum_type)) return e; - if (e = yf(e, s, n), Lr(i.datum_type) && (e = Kv(e, i.datum_type, i.datum_params)), Lr(t.datum_type) && (e = qv(e, t.datum_type, t.datum_params)), e = vf(e, l, o, a), t.datum_type === Ar) { + if (e = yf(e, s, n), Rr(i.datum_type) && (e = Jy(e, i.datum_type, i.datum_params)), Rr(t.datum_type) && (e = qy(e, t.datum_type, t.datum_params)), e = xf(e, l, o, a), t.datum_type === Or) { var h = Wc(t, !0, e); if (h !== 0) return; @@ -19999,25 +20009,25 @@ function Wc(i, t, e) { continue; } var l = a.grid.subgrids[0], h = (Math.abs(l.del[1]) + Math.abs(l.del[0])) / 1e4, c = l.ll[0] - h, u = l.ll[1] - h, d = l.ll[0] + (l.lim[0] - 1) * l.del[0] + h, f = l.ll[1] + (l.lim[1] - 1) * l.del[1] + h; - if (!(u > n.y || c > n.x || f < n.y || d < n.x) && (s = Qv(n, t, l), !isNaN(s.x))) + if (!(u > n.y || c > n.x || f < n.y || d < n.x) && (s = Qy(n, t, l), !isNaN(s.x))) break; } - return isNaN(s.x) ? (console.log("Failed to find a grid shift table for location '" + -n.x * Fe + " " + n.y * Fe + " tried: '" + r + "'"), -1) : (e.x = -s.x, e.y = s.y, 0); + return isNaN(s.x) ? (console.log("Failed to find a grid shift table for location '" + -n.x * ze + " " + n.y * ze + " tried: '" + r + "'"), -1) : (e.x = -s.x, e.y = s.y, 0); } -function Qv(i, t, e) { +function Qy(i, t, e) { var n = { x: Number.NaN, y: Number.NaN }; if (isNaN(i.x)) return n; var s = { x: i.x, y: i.y }; - s.x -= e.ll[0], s.y -= e.ll[1], s.x = P(s.x - Math.PI) + Math.PI; - var r = Hc(s, e); + s.x -= e.ll[0], s.y -= e.ll[1], s.x = A(s.x - Math.PI) + Math.PI; + var r = Vc(s, e); if (t) { if (isNaN(r.x)) return n; r.x = s.x - r.x, r.y = s.y - r.y; var o = 9, a = 1e-12, l, h; do { - if (h = Hc(r, e), isNaN(h.x)) { + if (h = Vc(r, e), isNaN(h.x)) { console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation."); break; } @@ -20025,12 +20035,12 @@ function Qv(i, t, e) { } while (o-- && Math.abs(l.x) > a && Math.abs(l.y) > a); if (o < 0) return console.log("Inverse grid shift iterator failed to converge."), n; - n.x = P(r.x + e.ll[0]), n.y = r.y + e.ll[1]; + n.x = A(r.x + e.ll[0]), n.y = r.y + e.ll[1]; } else isNaN(r.x) || (n.x = i.x + r.x, n.y = i.y + r.y); return n; } -function Hc(i, t) { +function Vc(i, t) { var e = { x: i.x / t.del[0], y: i.y / t.del[1] }, n = { x: Math.floor(e.x), y: Math.floor(e.y) }, s = { x: e.x - 1 * n.x, y: e.y - 1 * n.y }, r = { x: Number.NaN, y: Number.NaN }, o; if (n.x < 0 || n.x >= t.lim[0] || n.y < 0 || n.y >= t.lim[1]) return r; @@ -20044,7 +20054,7 @@ function Hc(i, t) { var c = { x: t.cvs[o][0], y: t.cvs[o][1] }, u = s.x * s.y, d = s.x * (1 - s.y), f = (1 - s.x) * (1 - s.y), g = (1 - s.x) * s.y; return r.x = f * a.x + d * l.x + g * c.x + u * h.x, r.y = f * a.y + d * l.y + g * c.y + u * h.y, r; } -function Xc(i, t, e) { +function Yc(i, t, e) { var n = e.x, s = e.y, r = e.z || 0, o, a, l, h = {}; for (l = 0; l < 3; l++) if (!(t && l === 2 && e.z === void 0)) @@ -20072,17 +20082,17 @@ function Xc(i, t, e) { } return h; } -function xf(i) { +function Mf(i) { var t = { x: i[0], y: i[1] }; return i.length > 2 && (t.z = i[2]), i.length > 3 && (t.m = i[3]), t; } -function tx(i) { - Yc(i.x), Yc(i.y); +function $y(i) { + Uc(i.x), Uc(i.y); } -function Yc(i) { +function Uc(i) { if (typeof Number.isFinite == "function") { if (Number.isFinite(i)) return; @@ -20091,15 +20101,15 @@ function Yc(i) { if (typeof i != "number" || i !== i || !isFinite(i)) throw new TypeError("coordinates must be finite numbers"); } -function ex(i, t) { +function tx(i, t) { return (i.datum.datum_type === en || i.datum.datum_type === nn) && t.datumCode !== "WGS84" || (t.datum.datum_type === en || t.datum.datum_type === nn) && i.datumCode !== "WGS84"; } -function ro(i, t, e, n) { +function so(i, t, e, n) { var s; - if (Array.isArray(e) && (e = xf(e)), tx(e), i.datum && t.datum && ex(i, t) && (s = new ke("WGS84"), e = ro(i, s, e, n), i = s), n && i.axis !== "enu" && (e = Xc(i, !1, e)), i.projName === "longlat") + if (Array.isArray(e) && (e = Mf(e)), $y(e), i.datum && t.datum && tx(i, t) && (s = new De("WGS84"), e = so(i, s, e, n), i = s), n && i.axis !== "enu" && (e = Yc(i, !1, e)), i.projName === "longlat") e = { - x: e.x * Bt, - y: e.y * Bt, + x: e.x * Xt, + y: e.y * Xt, z: e.z || 0 }; else if (i.to_meter && (e = { @@ -20108,25 +20118,25 @@ function ro(i, t, e, n) { z: e.z || 0 }), e = i.inverse(e), !e) return; - if (i.from_greenwich && (e.x += i.from_greenwich), e = Jv(i.datum, t.datum, e), !!e) + if (i.from_greenwich && (e.x += i.from_greenwich), e = Ky(i.datum, t.datum, e), !!e) return t.from_greenwich && (e = { x: e.x - t.from_greenwich, y: e.y, z: e.z || 0 }), t.projName === "longlat" ? e = { - x: e.x * Fe, - y: e.y * Fe, + x: e.x * ze, + y: e.y * ze, z: e.z || 0 } : (e = t.forward(e), t.to_meter && (e = { x: e.x / t.to_meter, y: e.y / t.to_meter, z: e.z || 0 - })), n && t.axis !== "enu" ? Xc(t, !0, e) : e; + })), n && t.axis !== "enu" ? Yc(t, !0, e) : e; } -var jc = ke("WGS84"); -function aa(i, t, e, n) { +var Jc = De("WGS84"); +function ra(i, t, e, n) { var s, r, o; - return Array.isArray(e) ? (s = ro(i, t, e, n) || { x: NaN, y: NaN }, e.length > 2 ? typeof i.name < "u" && i.name === "geocent" || typeof t.name < "u" && t.name === "geocent" ? typeof s.z == "number" ? [s.x, s.y, s.z].concat(e.splice(3)) : [s.x, s.y, e[2]].concat(e.splice(3)) : [s.x, s.y].concat(e.splice(2)) : [s.x, s.y]) : (r = ro(i, t, e, n), o = Object.keys(e), o.length === 2 || o.forEach(function(a) { + return Array.isArray(e) ? (s = so(i, t, e, n) || { x: NaN, y: NaN }, e.length > 2 ? typeof i.name < "u" && i.name === "geocent" || typeof t.name < "u" && t.name === "geocent" ? typeof s.z == "number" ? [s.x, s.y, s.z].concat(e.splice(3)) : [s.x, s.y, e[2]].concat(e.splice(3)) : [s.x, s.y].concat(e.splice(2)) : [s.x, s.y]) : (r = so(i, t, e, n), o = Object.keys(e), o.length === 2 || o.forEach(function(a) { if (typeof i.name < "u" && i.name === "geocent" || typeof t.name < "u" && t.name === "geocent") { if (a === "x" || a === "y" || a === "z") return; @@ -20135,112 +20145,112 @@ function aa(i, t, e, n) { r[a] = e[a]; }), r); } -function Kc(i) { - return i instanceof ke ? i : i.oProj ? i.oProj : ke(i); +function qc(i) { + return i instanceof De ? i : i.oProj ? i.oProj : De(i); } function se(i, t, e) { - i = Kc(i); + i = qc(i); var n = !1, s; - return typeof t > "u" ? (t = i, i = jc, n = !0) : (typeof t.x < "u" || Array.isArray(t)) && (e = t, t = i, i = jc, n = !0), t = Kc(t), e ? aa(i, t, e) : (s = { + return typeof t > "u" ? (t = i, i = Jc, n = !0) : (typeof t.x < "u" || Array.isArray(t)) && (e = t, t = i, i = Jc, n = !0), t = qc(t), e ? ra(i, t, e) : (s = { forward: function(r, o) { - return aa(i, t, r, o); + return ra(i, t, r, o); }, inverse: function(r, o) { - return aa(t, i, r, o); + return ra(t, i, r, o); } }, n && (s.oProj = t), s); } -var qc = 6, Cf = "AJSAJS", Mf = "AFAFAF", Tn = 65, te = 73, ve = 79, ms = 86, ps = 90; -const ix = { +var Kc = 6, Cf = "AJSAJS", wf = "AFAFAF", Tn = 65, te = 73, xe = 79, ms = 86, ps = 90; +const ex = { forward: Ef, - inverse: nx, - toPoint: wf + inverse: ix, + toPoint: bf }; function Ef(i, t) { - return t = t || 5, ox(sx({ + return t = t || 5, rx(nx({ lat: i[1], lon: i[0] }), t); } -function nx(i) { - var t = Xl(Rf(i.toUpperCase())); +function ix(i) { + var t = Vl(Sf(i.toUpperCase())); return t.lat && t.lon ? [t.lon, t.lat, t.lon, t.lat] : [t.left, t.bottom, t.right, t.top]; } -function wf(i) { - var t = Xl(Rf(i.toUpperCase())); +function bf(i) { + var t = Vl(Sf(i.toUpperCase())); return t.lat && t.lon ? [t.lon, t.lat] : [(t.left + t.right) / 2, (t.top + t.bottom) / 2]; } -function la(i) { +function oa(i) { return i * (Math.PI / 180); } -function Jc(i) { +function Qc(i) { return 180 * (i / Math.PI); } -function sx(i) { - var t = i.lat, e = i.lon, n = 6378137, s = 669438e-8, r = 0.9996, o, a, l, h, c, u, d, f = la(t), g = la(e), m, p; - p = Math.floor((e + 180) / 6) + 1, e === 180 && (p = 60), t >= 56 && t < 64 && e >= 3 && e < 12 && (p = 32), t >= 72 && t < 84 && (e >= 0 && e < 9 ? p = 31 : e >= 9 && e < 21 ? p = 33 : e >= 21 && e < 33 ? p = 35 : e >= 33 && e < 42 && (p = 37)), o = (p - 1) * 6 - 180 + 3, m = la(o), a = s / (1 - s), l = n / Math.sqrt(1 - s * Math.sin(f) * Math.sin(f)), h = Math.tan(f) * Math.tan(f), c = a * Math.cos(f) * Math.cos(f), u = Math.cos(f) * (g - m), d = n * ((1 - s / 4 - 3 * s * s / 64 - 5 * s * s * s / 256) * f - (3 * s / 8 + 3 * s * s / 32 + 45 * s * s * s / 1024) * Math.sin(2 * f) + (15 * s * s / 256 + 45 * s * s * s / 1024) * Math.sin(4 * f) - 35 * s * s * s / 3072 * Math.sin(6 * f)); - var _ = r * l * (u + (1 - h + c) * u * u * u / 6 + (5 - 18 * h + h * h + 72 * c - 58 * a) * u * u * u * u * u / 120) + 5e5, y = r * (d + l * Math.tan(f) * (u * u / 2 + (5 - h + 9 * c + 4 * c * c) * u * u * u * u / 24 + (61 - 58 * h + h * h + 600 * c - 330 * a) * u * u * u * u * u * u / 720)); +function nx(i) { + var t = i.lat, e = i.lon, n = 6378137, s = 669438e-8, r = 0.9996, o, a, l, h, c, u, d, f = oa(t), g = oa(e), m, p; + p = Math.floor((e + 180) / 6) + 1, e === 180 && (p = 60), t >= 56 && t < 64 && e >= 3 && e < 12 && (p = 32), t >= 72 && t < 84 && (e >= 0 && e < 9 ? p = 31 : e >= 9 && e < 21 ? p = 33 : e >= 21 && e < 33 ? p = 35 : e >= 33 && e < 42 && (p = 37)), o = (p - 1) * 6 - 180 + 3, m = oa(o), a = s / (1 - s), l = n / Math.sqrt(1 - s * Math.sin(f) * Math.sin(f)), h = Math.tan(f) * Math.tan(f), c = a * Math.cos(f) * Math.cos(f), u = Math.cos(f) * (g - m), d = n * ((1 - s / 4 - 3 * s * s / 64 - 5 * s * s * s / 256) * f - (3 * s / 8 + 3 * s * s / 32 + 45 * s * s * s / 1024) * Math.sin(2 * f) + (15 * s * s / 256 + 45 * s * s * s / 1024) * Math.sin(4 * f) - 35 * s * s * s / 3072 * Math.sin(6 * f)); + var v = r * l * (u + (1 - h + c) * u * u * u / 6 + (5 - 18 * h + h * h + 72 * c - 58 * a) * u * u * u * u * u / 120) + 5e5, y = r * (d + l * Math.tan(f) * (u * u / 2 + (5 - h + 9 * c + 4 * c * c) * u * u * u * u / 24 + (61 - 58 * h + h * h + 600 * c - 330 * a) * u * u * u * u * u * u / 720)); return t < 0 && (y += 1e7), { northing: Math.round(y), - easting: Math.round(_), + easting: Math.round(v), zoneNumber: p, - zoneLetter: rx(t) + zoneLetter: sx(t) }; } -function Xl(i) { +function Vl(i) { var t = i.northing, e = i.easting, n = i.zoneLetter, s = i.zoneNumber; if (s < 0 || s > 60) return null; - var r = 0.9996, o = 6378137, a = 669438e-8, l, h = (1 - Math.sqrt(1 - a)) / (1 + Math.sqrt(1 - a)), c, u, d, f, g, m, p, _, y, v = e - 5e5, x = t; - n < "N" && (x -= 1e7), p = (s - 1) * 6 - 180 + 3, l = a / (1 - a), m = x / r, _ = m / (o * (1 - a / 4 - 3 * a * a / 64 - 5 * a * a * a / 256)), y = _ + (3 * h / 2 - 27 * h * h * h / 32) * Math.sin(2 * _) + (21 * h * h / 16 - 55 * h * h * h * h / 32) * Math.sin(4 * _) + 151 * h * h * h / 96 * Math.sin(6 * _), c = o / Math.sqrt(1 - a * Math.sin(y) * Math.sin(y)), u = Math.tan(y) * Math.tan(y), d = l * Math.cos(y) * Math.cos(y), f = o * (1 - a) / Math.pow(1 - a * Math.sin(y) * Math.sin(y), 1.5), g = v / (c * r); + var r = 0.9996, o = 6378137, a = 669438e-8, l, h = (1 - Math.sqrt(1 - a)) / (1 + Math.sqrt(1 - a)), c, u, d, f, g, m, p, v, y, x = e - 5e5, M = t; + n < "N" && (M -= 1e7), p = (s - 1) * 6 - 180 + 3, l = a / (1 - a), m = M / r, v = m / (o * (1 - a / 4 - 3 * a * a / 64 - 5 * a * a * a / 256)), y = v + (3 * h / 2 - 27 * h * h * h / 32) * Math.sin(2 * v) + (21 * h * h / 16 - 55 * h * h * h * h / 32) * Math.sin(4 * v) + 151 * h * h * h / 96 * Math.sin(6 * v), c = o / Math.sqrt(1 - a * Math.sin(y) * Math.sin(y)), u = Math.tan(y) * Math.tan(y), d = l * Math.cos(y) * Math.cos(y), f = o * (1 - a) / Math.pow(1 - a * Math.sin(y) * Math.sin(y), 1.5), g = x / (c * r); var C = y - c * Math.tan(y) / f * (g * g / 2 - (5 + 3 * u + 10 * d - 4 * d * d - 9 * l) * g * g * g * g / 24 + (61 + 90 * u + 298 * d + 45 * u * u - 252 * l - 3 * d * d) * g * g * g * g * g * g / 720); - C = Jc(C); + C = Qc(C); var E = (g - (1 + 2 * u + d) * g * g * g / 6 + (5 - 2 * d + 28 * u - 3 * d * d + 8 * l + 24 * u * u) * g * g * g * g * g / 120) / Math.cos(y); - E = p + Jc(E); - var w; + E = p + Qc(E); + var b; if (i.accuracy) { - var R = Xl({ + var S = Vl({ northing: i.northing + i.accuracy, easting: i.easting + i.accuracy, zoneLetter: i.zoneLetter, zoneNumber: i.zoneNumber }); - w = { - top: R.lat, - right: R.lon, + b = { + top: S.lat, + right: S.lon, bottom: C, left: E }; } else - w = { + b = { lat: C, lon: E }; - return w; + return b; } -function rx(i) { +function sx(i) { var t = "Z"; return 84 >= i && i >= 72 ? t = "X" : 72 > i && i >= 64 ? t = "W" : 64 > i && i >= 56 ? t = "V" : 56 > i && i >= 48 ? t = "U" : 48 > i && i >= 40 ? t = "T" : 40 > i && i >= 32 ? t = "S" : 32 > i && i >= 24 ? t = "R" : 24 > i && i >= 16 ? t = "Q" : 16 > i && i >= 8 ? t = "P" : 8 > i && i >= 0 ? t = "N" : 0 > i && i >= -8 ? t = "M" : -8 > i && i >= -16 ? t = "L" : -16 > i && i >= -24 ? t = "K" : -24 > i && i >= -32 ? t = "J" : -32 > i && i >= -40 ? t = "H" : -40 > i && i >= -48 ? t = "G" : -48 > i && i >= -56 ? t = "F" : -56 > i && i >= -64 ? t = "E" : -64 > i && i >= -72 ? t = "D" : -72 > i && i >= -80 && (t = "C"), t; } -function ox(i, t) { +function rx(i, t) { var e = "00000" + i.easting, n = "00000" + i.northing; - return i.zoneNumber + i.zoneLetter + ax(i.easting, i.northing, i.zoneNumber) + e.substr(e.length - 5, t) + n.substr(n.length - 5, t); + return i.zoneNumber + i.zoneLetter + ox(i.easting, i.northing, i.zoneNumber) + e.substr(e.length - 5, t) + n.substr(n.length - 5, t); } -function ax(i, t, e) { - var n = Sf(e), s = Math.floor(i / 1e5), r = Math.floor(t / 1e5) % 20; - return lx(s, r, n); +function ox(i, t, e) { + var n = Pf(e), s = Math.floor(i / 1e5), r = Math.floor(t / 1e5) % 20; + return ax(s, r, n); } -function Sf(i) { - var t = i % qc; - return t === 0 && (t = qc), t; +function Pf(i) { + var t = i % Kc; + return t === 0 && (t = Kc), t; } -function lx(i, t, e) { - var n = e - 1, s = Cf.charCodeAt(n), r = Mf.charCodeAt(n), o = s + i - 1, a = r + t, l = !1; - o > ps && (o = o - ps + Tn - 1, l = !0), (o === te || s < te && o > te || (o > te || s < te) && l) && o++, (o === ve || s < ve && o > ve || (o > ve || s < ve) && l) && (o++, o === te && o++), o > ps && (o = o - ps + Tn - 1), a > ms ? (a = a - ms + Tn - 1, l = !0) : l = !1, (a === te || r < te && a > te || (a > te || r < te) && l) && a++, (a === ve || r < ve && a > ve || (a > ve || r < ve) && l) && (a++, a === te && a++), a > ms && (a = a - ms + Tn - 1); +function ax(i, t, e) { + var n = e - 1, s = Cf.charCodeAt(n), r = wf.charCodeAt(n), o = s + i - 1, a = r + t, l = !1; + o > ps && (o = o - ps + Tn - 1, l = !0), (o === te || s < te && o > te || (o > te || s < te) && l) && o++, (o === xe || s < xe && o > xe || (o > xe || s < xe) && l) && (o++, o === te && o++), o > ps && (o = o - ps + Tn - 1), a > ms ? (a = a - ms + Tn - 1, l = !0) : l = !1, (a === te || r < te && a > te || (a > te || r < te) && l) && a++, (a === xe || r < xe && a > xe || (a > xe || r < xe) && l) && (a++, a === te && a++), a > ms && (a = a - ms + Tn - 1); var h = String.fromCharCode(o) + String.fromCharCode(a); return h; } -function Rf(i) { +function Sf(i) { if (i && i.length === 0) throw "MGRSPoint coverting from nothing"; for (var t = i.length, e = null, n = "", s, r = 0; !/[A-Z]/.test(s = i.charAt(r)); ) { @@ -20255,7 +20265,7 @@ function Rf(i) { if (a <= "A" || a === "B" || a === "Y" || a >= "Z" || a === "I" || a === "O") throw "MGRSPoint zone letter " + a + " not handled: " + i; e = i.substring(r, r += 2); - for (var l = Sf(o), h = hx(e.charAt(0), l), c = cx(e.charAt(1), l); c < ux(a); ) + for (var l = Pf(o), h = lx(e.charAt(0), l), c = hx(e.charAt(1), l); c < cx(a); ) c += 2e6; var u = t - r; if (u % 2 !== 0) @@ -20263,18 +20273,18 @@ function Rf(i) { of digits after the zone letter and two 100km letters - front half for easting meters, second half for northing meters` + i; - var d = u / 2, f = 0, g = 0, m, p, _, y, v; - return d > 0 && (m = 1e5 / Math.pow(10, d), p = i.substring(r, r + d), f = parseFloat(p) * m, _ = i.substring(r + d), g = parseFloat(_) * m), y = f + h, v = g + c, { + var d = u / 2, f = 0, g = 0, m, p, v, y, x; + return d > 0 && (m = 1e5 / Math.pow(10, d), p = i.substring(r, r + d), f = parseFloat(p) * m, v = i.substring(r + d), g = parseFloat(v) * m), y = f + h, x = g + c, { easting: y, - northing: v, + northing: x, zoneLetter: a, zoneNumber: o, accuracy: m }; } -function hx(i, t) { +function lx(i, t) { for (var e = Cf.charCodeAt(t - 1), n = 1e5, s = !1; e !== i.charCodeAt(0); ) { - if (e++, e === te && e++, e === ve && e++, e > ps) { + if (e++, e === te && e++, e === xe && e++, e > ps) { if (s) throw "Bad character: " + i; e = Tn, s = !0; @@ -20283,11 +20293,11 @@ function hx(i, t) { } return n; } -function cx(i, t) { +function hx(i, t) { if (i > "V") throw "MGRSPoint given invalid Northing " + i; - for (var e = Mf.charCodeAt(t - 1), n = 0, s = !1; e !== i.charCodeAt(0); ) { - if (e++, e === te && e++, e === ve && e++, e > ms) { + for (var e = wf.charCodeAt(t - 1), n = 0, s = !1; e !== i.charCodeAt(0); ) { + if (e++, e === te && e++, e === xe && e++, e > ms) { if (s) throw "Bad character: " + i; e = Tn, s = !0; @@ -20296,7 +20306,7 @@ function cx(i, t) { } return n; } -function ux(i) { +function cx(i) { var t; switch (i) { case "C": @@ -20366,9 +20376,9 @@ function ux(i) { return t; throw "Invalid zone letter: " + i; } -function Xn(i, t, e) { - if (!(this instanceof Xn)) - return new Xn(i, t, e); +function Yn(i, t, e) { + if (!(this instanceof Yn)) + return new Yn(i, t, e); if (Array.isArray(i)) this.x = i[0], this.y = i[1], this.z = i[2] || 0; else if (typeof i == "object") @@ -20380,41 +20390,41 @@ function Xn(i, t, e) { this.x = i, this.y = t, this.z = e || 0; console.warn("proj4.Point will be removed in version 3, use proj4.toPoint"); } -Xn.fromMGRS = function(i) { - return new Xn(wf(i)); +Yn.fromMGRS = function(i) { + return new Yn(bf(i)); }; -Xn.prototype.toMGRS = function(i) { +Yn.prototype.toMGRS = function(i) { return Ef([this.x, this.y], i); }; -var dx = 1, fx = 0.25, Qc = 0.046875, tu = 0.01953125, eu = 0.01068115234375, gx = 0.75, mx = 0.46875, px = 0.013020833333333334, _x = 0.007120768229166667, yx = 0.3645833333333333, vx = 0.005696614583333333, xx = 0.3076171875; -function bf(i) { +var ux = 1, dx = 0.25, $c = 0.046875, tu = 0.01953125, eu = 0.01068115234375, fx = 0.75, gx = 0.46875, mx = 0.013020833333333334, px = 0.007120768229166667, vx = 0.3645833333333333, yx = 0.005696614583333333, xx = 0.3076171875; +function _f(i) { var t = []; - t[0] = dx - i * (fx + i * (Qc + i * (tu + i * eu))), t[1] = i * (gx - i * (Qc + i * (tu + i * eu))); + t[0] = ux - i * (dx + i * ($c + i * (tu + i * eu))), t[1] = i * (fx - i * ($c + i * (tu + i * eu))); var e = i * i; - return t[2] = e * (mx - i * (px + i * _x)), e *= i, t[3] = e * (yx - i * vx), t[4] = e * i * xx, t; + return t[2] = e * (gx - i * (mx + i * px)), e *= i, t[3] = e * (vx - i * yx), t[4] = e * i * xx, t; } -function Oo(i, t, e, n) { +function Ao(i, t, e, n) { return e *= t, t *= t, n[0] * i - e * (n[1] + t * (n[2] + t * (n[3] + t * n[4]))); } -var Cx = 20; -function Lf(i, t, e) { - for (var n = 1 / (1 - t), s = i, r = Cx; r; --r) { +var Mx = 20; +function Rf(i, t, e) { + for (var n = 1 / (1 - t), s = i, r = Mx; r; --r) { var o = Math.sin(s), a = 1 - t * o * o; - if (a = (Oo(s, o, Math.cos(s), e) - i) * (a * Math.sqrt(a)) * n, s -= a, Math.abs(a) < T) + if (a = (Ao(s, o, Math.cos(s), e) - i) * (a * Math.sqrt(a)) * n, s -= a, Math.abs(a) < T) return s; } return s; } -function Mx() { - this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.es && (this.en = bf(this.es), this.ml0 = Oo(this.lat0, Math.sin(this.lat0), Math.cos(this.lat0), this.en)); +function Cx() { + this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.es && (this.en = _f(this.es), this.ml0 = Ao(this.lat0, Math.sin(this.lat0), Math.cos(this.lat0), this.en)); } -function Ex(i) { - var t = i.x, e = i.y, n = P(t - this.long0), s, r, o, a = Math.sin(e), l = Math.cos(e); +function wx(i) { + var t = i.x, e = i.y, n = A(t - this.long0), s, r, o, a = Math.sin(e), l = Math.cos(e); if (this.es) { var c = l * n, u = Math.pow(c, 2), d = this.ep2 * Math.pow(l, 2), f = Math.pow(d, 2), g = Math.abs(l) > T ? Math.tan(e) : 0, m = Math.pow(g, 2), p = Math.pow(m, 2); s = 1 - this.es * Math.pow(a, 2), c = c / Math.sqrt(s); - var _ = Oo(e, a, l, this.en); - r = this.a * (this.k0 * c * (1 + u / 6 * (1 - m + d + u / 20 * (5 - 18 * m + p + 14 * d - 58 * m * d + u / 42 * (61 + 179 * p - p * m - 479 * m))))) + this.x0, o = this.a * (this.k0 * (_ - this.ml0 + a * n * c / 2 * (1 + u / 12 * (5 - m + 9 * d + 4 * f + u / 30 * (61 + p - 58 * m + 270 * d - 330 * m * d + u / 56 * (1385 + 543 * p - p * m - 3111 * m)))))) + this.y0; + var v = Ao(e, a, l, this.en); + r = this.a * (this.k0 * c * (1 + u / 6 * (1 - m + d + u / 20 * (5 - 18 * m + p + 14 * d - 58 * m * d + u / 42 * (61 + 179 * p - p * m - 479 * m))))) + this.x0, o = this.a * (this.k0 * (v - this.ml0 + a * n * c / 2 * (1 + u / 12 * (5 - m + 9 * d + 4 * f + u / 30 * (61 + p - 58 * m + 270 * d - 330 * m * d + u / 56 * (1385 + 543 * p - p * m - 3111 * m)))))) + this.y0; } else { var h = l * Math.sin(n); if (Math.abs(Math.abs(h) - 1) < T) @@ -20429,206 +20439,206 @@ function Ex(i) { } return i.x = r, i.y = o, i; } -function wx(i) { +function Ex(i) { var t, e, n, s, r = (i.x - this.x0) * (1 / this.a), o = (i.y - this.y0) * (1 / this.a); if (this.es) - if (t = this.ml0 + o / this.k0, e = Lf(t, this.es, this.en), Math.abs(e) < S) { - var u = Math.sin(e), d = Math.cos(e), f = Math.abs(d) > T ? Math.tan(e) : 0, g = this.ep2 * Math.pow(d, 2), m = Math.pow(g, 2), p = Math.pow(f, 2), _ = Math.pow(p, 2); + if (t = this.ml0 + o / this.k0, e = Rf(t, this.es, this.en), Math.abs(e) < P) { + var u = Math.sin(e), d = Math.cos(e), f = Math.abs(d) > T ? Math.tan(e) : 0, g = this.ep2 * Math.pow(d, 2), m = Math.pow(g, 2), p = Math.pow(f, 2), v = Math.pow(p, 2); t = 1 - this.es * Math.pow(u, 2); - var y = r * Math.sqrt(t) / this.k0, v = Math.pow(y, 2); - t = t * f, n = e - t * v / (1 - this.es) * 0.5 * (1 - v / 12 * (5 + 3 * p - 9 * g * p + g - 4 * m - v / 30 * (61 + 90 * p - 252 * g * p + 45 * _ + 46 * g - v / 56 * (1385 + 3633 * p + 4095 * _ + 1574 * _ * p)))), s = P(this.long0 + y * (1 - v / 6 * (1 + 2 * p + g - v / 20 * (5 + 28 * p + 24 * _ + 8 * g * p + 6 * g - v / 42 * (61 + 662 * p + 1320 * _ + 720 * _ * p)))) / d); + var y = r * Math.sqrt(t) / this.k0, x = Math.pow(y, 2); + t = t * f, n = e - t * x / (1 - this.es) * 0.5 * (1 - x / 12 * (5 + 3 * p - 9 * g * p + g - 4 * m - x / 30 * (61 + 90 * p - 252 * g * p + 45 * v + 46 * g - x / 56 * (1385 + 3633 * p + 4095 * v + 1574 * v * p)))), s = A(this.long0 + y * (1 - x / 6 * (1 + 2 * p + g - x / 20 * (5 + 28 * p + 24 * v + 8 * g * p + 6 * g - x / 42 * (61 + 662 * p + 1320 * v + 720 * v * p)))) / d); } else - n = S * tr(o), s = 0; + n = P * tr(o), s = 0; else { var a = Math.exp(r / this.k0), l = 0.5 * (a - 1 / a), h = this.lat0 + o / this.k0, c = Math.cos(h); - t = Math.sqrt((1 - Math.pow(c, 2)) / (1 + Math.pow(l, 2))), n = Math.asin(t), o < 0 && (n = -n), l === 0 && c === 0 ? s = 0 : s = P(Math.atan2(l, c) + this.long0); + t = Math.sqrt((1 - Math.pow(c, 2)) / (1 + Math.pow(l, 2))), n = Math.asin(t), o < 0 && (n = -n), l === 0 && c === 0 ? s = 0 : s = A(Math.atan2(l, c) + this.long0); } return i.x = s, i.y = n, i; } -var Sx = ["Fast_Transverse_Mercator", "Fast Transverse Mercator"]; -const Or = { - init: Mx, - forward: Ex, - inverse: wx, - names: Sx +var bx = ["Fast_Transverse_Mercator", "Fast Transverse Mercator"]; +const Ir = { + init: Cx, + forward: wx, + inverse: Ex, + names: bx }; function Tf(i) { var t = Math.exp(i); return t = (t - 1 / t) / 2, t; } -function Se(i, t) { +function Pe(i, t) { i = Math.abs(i), t = Math.abs(t); var e = Math.max(i, t), n = Math.min(i, t) / (e || 1); return e * Math.sqrt(1 + Math.pow(n, 2)); } -function Rx(i) { +function Px(i) { var t = 1 + i, e = t - 1; return e === 0 ? i : i * Math.log(t) / e; } -function bx(i) { +function Sx(i) { var t = Math.abs(i); - return t = Rx(t * (1 + t / (Se(1, t) + 1))), i < 0 ? -t : t; + return t = Px(t * (1 + t / (Pe(1, t) + 1))), i < 0 ? -t : t; } function Yl(i, t) { for (var e = 2 * Math.cos(2 * t), n = i.length - 1, s = i[n], r = 0, o; --n >= 0; ) o = -r + e * s + i[n], r = s, s = o; return t + o * Math.sin(2 * t); } -function Lx(i, t) { +function _x(i, t) { for (var e = 2 * Math.cos(t), n = i.length - 1, s = i[n], r = 0, o; --n >= 0; ) o = -r + e * s + i[n], r = s, s = o; return Math.sin(t) * o; } -function Tx(i) { +function Rx(i) { var t = Math.exp(i); return t = (t + 1 / t) / 2, t; } -function If(i, t, e) { - for (var n = Math.sin(t), s = Math.cos(t), r = Tf(e), o = Tx(e), a = 2 * s * o, l = -2 * n * r, h = i.length - 1, c = i[h], u = 0, d = 0, f = 0, g, m; --h >= 0; ) +function Lf(i, t, e) { + for (var n = Math.sin(t), s = Math.cos(t), r = Tf(e), o = Rx(e), a = 2 * s * o, l = -2 * n * r, h = i.length - 1, c = i[h], u = 0, d = 0, f = 0, g, m; --h >= 0; ) g = d, m = u, d = c, u = f, c = -g + a * d - l * u + i[h], f = -m + l * d + a * u; return a = n * o, l = s * r, [a * c - l * f, a * f + l * c]; } -function Ix() { +function Tx() { if (!this.approx && (isNaN(this.es) || this.es <= 0)) throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.'); - this.approx && (Or.init.apply(this), this.forward = Or.forward, this.inverse = Or.inverse), this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.cgb = [], this.cbg = [], this.utg = [], this.gtu = []; + this.approx && (Ir.init.apply(this), this.forward = Ir.forward, this.inverse = Ir.inverse), this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.lat0 = this.lat0 !== void 0 ? this.lat0 : 0, this.cgb = [], this.cbg = [], this.utg = [], this.gtu = []; var i = this.es / (1 + Math.sqrt(1 - this.es)), t = i / (2 - i), e = t; this.cgb[0] = t * (2 + t * (-2 / 3 + t * (-2 + t * (116 / 45 + t * (26 / 45 + t * (-2854 / 675)))))), this.cbg[0] = t * (-2 + t * (2 / 3 + t * (4 / 3 + t * (-82 / 45 + t * (32 / 45 + t * (4642 / 4725)))))), e = e * t, this.cgb[1] = e * (7 / 3 + t * (-8 / 5 + t * (-227 / 45 + t * (2704 / 315 + t * (2323 / 945))))), this.cbg[1] = e * (5 / 3 + t * (-16 / 15 + t * (-13 / 9 + t * (904 / 315 + t * (-1522 / 945))))), e = e * t, this.cgb[2] = e * (56 / 15 + t * (-136 / 35 + t * (-1262 / 105 + t * (73814 / 2835)))), this.cbg[2] = e * (-26 / 15 + t * (34 / 21 + t * (8 / 5 + t * (-12686 / 2835)))), e = e * t, this.cgb[3] = e * (4279 / 630 + t * (-332 / 35 + t * (-399572 / 14175))), this.cbg[3] = e * (1237 / 630 + t * (-12 / 5 + t * (-24832 / 14175))), e = e * t, this.cgb[4] = e * (4174 / 315 + t * (-144838 / 6237)), this.cbg[4] = e * (-734 / 315 + t * (109598 / 31185)), e = e * t, this.cgb[5] = e * (601676 / 22275), this.cbg[5] = e * (444337 / 155925), e = Math.pow(t, 2), this.Qn = this.k0 / (1 + t) * (1 + e * (1 / 4 + e * (1 / 64 + e / 256))), this.utg[0] = t * (-0.5 + t * (2 / 3 + t * (-37 / 96 + t * (1 / 360 + t * (81 / 512 + t * (-96199 / 604800)))))), this.gtu[0] = t * (0.5 + t * (-2 / 3 + t * (5 / 16 + t * (41 / 180 + t * (-127 / 288 + t * (7891 / 37800)))))), this.utg[1] = e * (-1 / 48 + t * (-1 / 15 + t * (437 / 1440 + t * (-46 / 105 + t * (1118711 / 3870720))))), this.gtu[1] = e * (13 / 48 + t * (-3 / 5 + t * (557 / 1440 + t * (281 / 630 + t * (-1983433 / 1935360))))), e = e * t, this.utg[2] = e * (-17 / 480 + t * (37 / 840 + t * (209 / 4480 + t * (-5569 / 90720)))), this.gtu[2] = e * (61 / 240 + t * (-103 / 140 + t * (15061 / 26880 + t * (167603 / 181440)))), e = e * t, this.utg[3] = e * (-4397 / 161280 + t * (11 / 504 + t * (830251 / 7257600))), this.gtu[3] = e * (49561 / 161280 + t * (-179 / 168 + t * (6601661 / 7257600))), e = e * t, this.utg[4] = e * (-4583 / 161280 + t * (108847 / 3991680)), this.gtu[4] = e * (34729 / 80640 + t * (-3418889 / 1995840)), e = e * t, this.utg[5] = e * (-20648693 / 638668800), this.gtu[5] = e * (212378941 / 319334400); var n = Yl(this.cbg, this.lat0); - this.Zb = -this.Qn * (n + Lx(this.gtu, 2 * n)); + this.Zb = -this.Qn * (n + _x(this.gtu, 2 * n)); } -function Ax(i) { - var t = P(i.x - this.long0), e = i.y; +function Lx(i) { + var t = A(i.x - this.long0), e = i.y; e = Yl(this.cbg, e); var n = Math.sin(e), s = Math.cos(e), r = Math.sin(t), o = Math.cos(t); - e = Math.atan2(n, o * s), t = Math.atan2(r * s, Se(n, s * o)), t = bx(Math.tan(t)); - var a = If(this.gtu, 2 * e, 2 * t); + e = Math.atan2(n, o * s), t = Math.atan2(r * s, Pe(n, s * o)), t = Sx(Math.tan(t)); + var a = Lf(this.gtu, 2 * e, 2 * t); e = e + a[0], t = t + a[1]; var l, h; return Math.abs(t) <= 2.623395162778 ? (l = this.a * (this.Qn * t) + this.x0, h = this.a * (this.Qn * e + this.Zb) + this.y0) : (l = 1 / 0, h = 1 / 0), i.x = l, i.y = h, i; } -function Px(i) { +function Ox(i) { var t = (i.x - this.x0) * (1 / this.a), e = (i.y - this.y0) * (1 / this.a); e = (e - this.Zb) / this.Qn, t = t / this.Qn; var n, s; if (Math.abs(t) <= 2.623395162778) { - var r = If(this.utg, 2 * e, 2 * t); + var r = Lf(this.utg, 2 * e, 2 * t); e = e + r[0], t = t + r[1], t = Math.atan(Tf(t)); var o = Math.sin(e), a = Math.cos(e), l = Math.sin(t), h = Math.cos(t); - e = Math.atan2(o * h, Se(l, h * a)), t = Math.atan2(l, h * a), n = P(t + this.long0), s = Yl(this.cgb, e); + e = Math.atan2(o * h, Pe(l, h * a)), t = Math.atan2(l, h * a), n = A(t + this.long0), s = Yl(this.cgb, e); } else n = 1 / 0, s = 1 / 0; return i.x = n, i.y = s, i; } -var Ox = ["Extended_Transverse_Mercator", "Extended Transverse Mercator", "etmerc", "Transverse_Mercator", "Transverse Mercator", "tmerc"]; +var Ax = ["Extended_Transverse_Mercator", "Extended Transverse Mercator", "etmerc", "Transverse_Mercator", "Transverse Mercator", "tmerc"]; const Nr = { - init: Ix, - forward: Ax, - inverse: Px, - names: Ox + init: Tx, + forward: Lx, + inverse: Ox, + names: Ax }; -function Nx(i, t) { +function Ix(i, t) { if (i === void 0) { - if (i = Math.floor((P(t) + Math.PI) * 30 / Math.PI) + 1, i < 0) + if (i = Math.floor((A(t) + Math.PI) * 30 / Math.PI) + 1, i < 0) return 0; if (i > 60) return 60; } return i; } -var Fx = "etmerc"; -function Dx() { - var i = Nx(this.zone, this.long0); +var Nx = "etmerc"; +function zx() { + var i = Ix(this.zone, this.long0); if (i === void 0) throw new Error("unknown utm zone"); - this.lat0 = 0, this.long0 = (6 * Math.abs(i) - 183) * Bt, this.x0 = 5e5, this.y0 = this.utmSouth ? 1e7 : 0, this.k0 = 0.9996, Nr.init.apply(this), this.forward = Nr.forward, this.inverse = Nr.inverse; + this.lat0 = 0, this.long0 = (6 * Math.abs(i) - 183) * Xt, this.x0 = 5e5, this.y0 = this.utmSouth ? 1e7 : 0, this.k0 = 0.9996, Nr.init.apply(this), this.forward = Nr.forward, this.inverse = Nr.inverse; } -var kx = ["Universal Transverse Mercator System", "utm"]; -const Gx = { - init: Dx, - names: kx, - dependsOn: Fx +var Fx = ["Universal Transverse Mercator System", "utm"]; +const Dx = { + init: zx, + names: Fx, + dependsOn: Nx }; -function jl(i, t) { +function Ul(i, t) { return Math.pow((1 - i) / (1 + i), t); } -var $x = 20; -function Bx() { +var jx = 20; +function kx() { var i = Math.sin(this.lat0), t = Math.cos(this.lat0); - t *= t, this.rc = Math.sqrt(1 - this.es) / (1 - this.es * i * i), this.C = Math.sqrt(1 + this.es * t * t / (1 - this.es)), this.phic0 = Math.asin(i / this.C), this.ratexp = 0.5 * this.C * this.e, this.K = Math.tan(0.5 * this.phic0 + lt) / (Math.pow(Math.tan(0.5 * this.lat0 + lt), this.C) * jl(this.e * i, this.ratexp)); + t *= t, this.rc = Math.sqrt(1 - this.es) / (1 - this.es * i * i), this.C = Math.sqrt(1 + this.es * t * t / (1 - this.es)), this.phic0 = Math.asin(i / this.C), this.ratexp = 0.5 * this.C * this.e, this.K = Math.tan(0.5 * this.phic0 + lt) / (Math.pow(Math.tan(0.5 * this.lat0 + lt), this.C) * Ul(this.e * i, this.ratexp)); } -function zx(i) { +function Xx(i) { var t = i.x, e = i.y; - return i.y = 2 * Math.atan(this.K * Math.pow(Math.tan(0.5 * e + lt), this.C) * jl(this.e * Math.sin(e), this.ratexp)) - S, i.x = this.C * t, i; + return i.y = 2 * Math.atan(this.K * Math.pow(Math.tan(0.5 * e + lt), this.C) * Ul(this.e * Math.sin(e), this.ratexp)) - P, i.x = this.C * t, i; } -function Zx(i) { - for (var t = 1e-14, e = i.x / this.C, n = i.y, s = Math.pow(Math.tan(0.5 * n + lt) / this.K, 1 / this.C), r = $x; r > 0 && (n = 2 * Math.atan(s * jl(this.e * Math.sin(i.y), -0.5 * this.e)) - S, !(Math.abs(n - i.y) < t)); --r) +function Gx(i) { + for (var t = 1e-14, e = i.x / this.C, n = i.y, s = Math.pow(Math.tan(0.5 * n + lt) / this.K, 1 / this.C), r = jx; r > 0 && (n = 2 * Math.atan(s * Ul(this.e * Math.sin(i.y), -0.5 * this.e)) - P, !(Math.abs(n - i.y) < t)); --r) i.y = n; return r ? (i.x = e, i.y = n, i) : null; } -var Ux = ["gauss"]; -const Kl = { - init: Bx, - forward: zx, - inverse: Zx, - names: Ux +var Hx = ["gauss"]; +const Jl = { + init: kx, + forward: Xx, + inverse: Gx, + names: Hx }; -function Vx() { - Kl.init.apply(this), this.rc && (this.sinc0 = Math.sin(this.phic0), this.cosc0 = Math.cos(this.phic0), this.R2 = 2 * this.rc, this.title || (this.title = "Oblique Stereographic Alternative")); +function Zx() { + Jl.init.apply(this), this.rc && (this.sinc0 = Math.sin(this.phic0), this.cosc0 = Math.cos(this.phic0), this.R2 = 2 * this.rc, this.title || (this.title = "Oblique Stereographic Alternative")); } -function Wx(i) { +function Bx(i) { var t, e, n, s; - return i.x = P(i.x - this.long0), Kl.forward.apply(this, [i]), t = Math.sin(i.y), e = Math.cos(i.y), n = Math.cos(i.x), s = this.k0 * this.R2 / (1 + this.sinc0 * t + this.cosc0 * e * n), i.x = s * e * Math.sin(i.x), i.y = s * (this.cosc0 * t - this.sinc0 * e * n), i.x = this.a * i.x + this.x0, i.y = this.a * i.y + this.y0, i; + return i.x = A(i.x - this.long0), Jl.forward.apply(this, [i]), t = Math.sin(i.y), e = Math.cos(i.y), n = Math.cos(i.x), s = this.k0 * this.R2 / (1 + this.sinc0 * t + this.cosc0 * e * n), i.x = s * e * Math.sin(i.x), i.y = s * (this.cosc0 * t - this.sinc0 * e * n), i.x = this.a * i.x + this.x0, i.y = this.a * i.y + this.y0, i; } -function Hx(i) { +function Wx(i) { var t, e, n, s, r; if (i.x = (i.x - this.x0) / this.a, i.y = (i.y - this.y0) / this.a, i.x /= this.k0, i.y /= this.k0, r = Math.sqrt(i.x * i.x + i.y * i.y)) { var o = 2 * Math.atan2(r, this.R2); t = Math.sin(o), e = Math.cos(o), s = Math.asin(e * this.sinc0 + i.y * t * this.cosc0 / r), n = Math.atan2(i.x * t, r * this.cosc0 * e - i.y * this.sinc0 * t); } else s = this.phic0, n = 0; - return i.x = n, i.y = s, Kl.inverse.apply(this, [i]), i.x = P(i.x + this.long0), i; + return i.x = n, i.y = s, Jl.inverse.apply(this, [i]), i.x = A(i.x + this.long0), i; } -var Xx = ["Stereographic_North_Pole", "Oblique_Stereographic", "Polar_Stereographic", "sterea", "Oblique Stereographic Alternative", "Double_Stereographic"]; +var Vx = ["Stereographic_North_Pole", "Oblique_Stereographic", "Polar_Stereographic", "sterea", "Oblique Stereographic Alternative", "Double_Stereographic"]; const Yx = { - init: Vx, - forward: Wx, - inverse: Hx, - names: Xx + init: Zx, + forward: Bx, + inverse: Wx, + names: Vx }; -function jx(i, t, e) { - return t *= e, Math.tan(0.5 * (S + i)) * Math.pow((1 - t) / (1 + t), 0.5 * e); +function Ux(i, t, e) { + return t *= e, Math.tan(0.5 * (P + i)) * Math.pow((1 - t) / (1 + t), 0.5 * e); } -function Kx() { - this.coslat0 = Math.cos(this.lat0), this.sinlat0 = Math.sin(this.lat0), this.sphere ? this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= T && (this.k0 = 0.5 * (1 + tr(this.lat0) * Math.sin(this.lat_ts))) : (Math.abs(this.coslat0) <= T && (this.lat0 > 0 ? this.con = 1 : this.con = -1), this.cons = Math.sqrt(Math.pow(1 + this.e, 1 + this.e) * Math.pow(1 - this.e, 1 - this.e)), this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= T && (this.k0 = 0.5 * this.cons * $e(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) / be(this.e, this.con * this.lat_ts, this.con * Math.sin(this.lat_ts))), this.ms1 = $e(this.e, this.sinlat0, this.coslat0), this.X0 = 2 * Math.atan(this.ssfn_(this.lat0, this.sinlat0, this.e)) - S, this.cosX0 = Math.cos(this.X0), this.sinX0 = Math.sin(this.X0)); +function Jx() { + this.coslat0 = Math.cos(this.lat0), this.sinlat0 = Math.sin(this.lat0), this.sphere ? this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= T && (this.k0 = 0.5 * (1 + tr(this.lat0) * Math.sin(this.lat_ts))) : (Math.abs(this.coslat0) <= T && (this.lat0 > 0 ? this.con = 1 : this.con = -1), this.cons = Math.sqrt(Math.pow(1 + this.e, 1 + this.e) * Math.pow(1 - this.e, 1 - this.e)), this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= T && (this.k0 = 0.5 * this.cons * ke(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) / _e(this.e, this.con * this.lat_ts, this.con * Math.sin(this.lat_ts))), this.ms1 = ke(this.e, this.sinlat0, this.coslat0), this.X0 = 2 * Math.atan(this.ssfn_(this.lat0, this.sinlat0, this.e)) - P, this.cosX0 = Math.cos(this.X0), this.sinX0 = Math.sin(this.X0)); } function qx(i) { - var t = i.x, e = i.y, n = Math.sin(e), s = Math.cos(e), r, o, a, l, h, c, u = P(t - this.long0); - return Math.abs(Math.abs(t - this.long0) - Math.PI) <= T && Math.abs(e + this.lat0) <= T ? (i.x = NaN, i.y = NaN, i) : this.sphere ? (r = 2 * this.k0 / (1 + this.sinlat0 * n + this.coslat0 * s * Math.cos(u)), i.x = this.a * r * s * Math.sin(u) + this.x0, i.y = this.a * r * (this.coslat0 * n - this.sinlat0 * s * Math.cos(u)) + this.y0, i) : (o = 2 * Math.atan(this.ssfn_(e, n, this.e)) - S, l = Math.cos(o), a = Math.sin(o), Math.abs(this.coslat0) <= T ? (h = be(this.e, e * this.con, this.con * n), c = 2 * this.a * this.k0 * h / this.cons, i.x = this.x0 + c * Math.sin(t - this.long0), i.y = this.y0 - this.con * c * Math.cos(t - this.long0), i) : (Math.abs(this.sinlat0) < T ? (r = 2 * this.a * this.k0 / (1 + l * Math.cos(u)), i.y = r * a) : (r = 2 * this.a * this.k0 * this.ms1 / (this.cosX0 * (1 + this.sinX0 * a + this.cosX0 * l * Math.cos(u))), i.y = r * (this.cosX0 * a - this.sinX0 * l * Math.cos(u)) + this.y0), i.x = r * l * Math.sin(u) + this.x0, i)); + var t = i.x, e = i.y, n = Math.sin(e), s = Math.cos(e), r, o, a, l, h, c, u = A(t - this.long0); + return Math.abs(Math.abs(t - this.long0) - Math.PI) <= T && Math.abs(e + this.lat0) <= T ? (i.x = NaN, i.y = NaN, i) : this.sphere ? (r = 2 * this.k0 / (1 + this.sinlat0 * n + this.coslat0 * s * Math.cos(u)), i.x = this.a * r * s * Math.sin(u) + this.x0, i.y = this.a * r * (this.coslat0 * n - this.sinlat0 * s * Math.cos(u)) + this.y0, i) : (o = 2 * Math.atan(this.ssfn_(e, n, this.e)) - P, l = Math.cos(o), a = Math.sin(o), Math.abs(this.coslat0) <= T ? (h = _e(this.e, e * this.con, this.con * n), c = 2 * this.a * this.k0 * h / this.cons, i.x = this.x0 + c * Math.sin(t - this.long0), i.y = this.y0 - this.con * c * Math.cos(t - this.long0), i) : (Math.abs(this.sinlat0) < T ? (r = 2 * this.a * this.k0 / (1 + l * Math.cos(u)), i.y = r * a) : (r = 2 * this.a * this.k0 * this.ms1 / (this.cosX0 * (1 + this.sinX0 * a + this.cosX0 * l * Math.cos(u))), i.y = r * (this.cosX0 * a - this.sinX0 * l * Math.cos(u)) + this.y0), i.x = r * l * Math.sin(u) + this.x0, i)); } -function Jx(i) { +function Kx(i) { i.x -= this.x0, i.y -= this.y0; var t, e, n, s, r, o = Math.sqrt(i.x * i.x + i.y * i.y); if (this.sphere) { var a = 2 * Math.atan(o / (2 * this.a * this.k0)); - return t = this.long0, e = this.lat0, o <= T ? (i.x = t, i.y = e, i) : (e = Math.asin(Math.cos(a) * this.sinlat0 + i.y * Math.sin(a) * this.coslat0 / o), Math.abs(this.coslat0) < T ? this.lat0 > 0 ? t = P(this.long0 + Math.atan2(i.x, -1 * i.y)) : t = P(this.long0 + Math.atan2(i.x, i.y)) : t = P(this.long0 + Math.atan2(i.x * Math.sin(a), o * this.coslat0 * Math.cos(a) - i.y * this.sinlat0 * Math.sin(a))), i.x = t, i.y = e, i); + return t = this.long0, e = this.lat0, o <= T ? (i.x = t, i.y = e, i) : (e = Math.asin(Math.cos(a) * this.sinlat0 + i.y * Math.sin(a) * this.coslat0 / o), Math.abs(this.coslat0) < T ? this.lat0 > 0 ? t = A(this.long0 + Math.atan2(i.x, -1 * i.y)) : t = A(this.long0 + Math.atan2(i.x, i.y)) : t = A(this.long0 + Math.atan2(i.x * Math.sin(a), o * this.coslat0 * Math.cos(a) - i.y * this.sinlat0 * Math.sin(a))), i.x = t, i.y = e, i); } else if (Math.abs(this.coslat0) <= T) { if (o <= T) return e = this.lat0, t = this.long0, i.x = t, i.y = e, i; - i.x *= this.con, i.y *= this.con, n = o * this.cons / (2 * this.a * this.k0), e = this.con * zs(this.e, n), t = this.con * P(this.con * this.long0 + Math.atan2(i.x, -1 * i.y)); + i.x *= this.con, i.y *= this.con, n = o * this.cons / (2 * this.a * this.k0), e = this.con * Gs(this.e, n), t = this.con * A(this.con * this.long0 + Math.atan2(i.x, -1 * i.y)); } else - s = 2 * Math.atan(o * this.cosX0 / (2 * this.a * this.k0 * this.ms1)), t = this.long0, o <= T ? r = this.X0 : (r = Math.asin(Math.cos(s) * this.sinX0 + i.y * Math.sin(s) * this.cosX0 / o), t = P(this.long0 + Math.atan2(i.x * Math.sin(s), o * this.cosX0 * Math.cos(s) - i.y * this.sinX0 * Math.sin(s)))), e = -1 * zs(this.e, Math.tan(0.5 * (S + r))); + s = 2 * Math.atan(o * this.cosX0 / (2 * this.a * this.k0 * this.ms1)), t = this.long0, o <= T ? r = this.X0 : (r = Math.asin(Math.cos(s) * this.sinX0 + i.y * Math.sin(s) * this.cosX0 / o), t = A(this.long0 + Math.atan2(i.x * Math.sin(s), o * this.cosX0 * Math.cos(s) - i.y * this.sinX0 * Math.sin(s)))), e = -1 * Gs(this.e, Math.tan(0.5 * (P + r))); return i.x = t, i.y = e, i; } var Qx = ["stere", "Stereographic_South_Pole", "Polar Stereographic (variant B)"]; -const t3 = { - init: Kx, +const $x = { + init: Jx, forward: qx, - inverse: Jx, + inverse: Kx, names: Qx, - ssfn_: jx + ssfn_: Ux }; -function e3() { +function t9() { var i = this.lat0; this.lambda0 = this.long0; var t = Math.sin(i), e = this.a, n = this.rf, s = 1 / n, r = 2 * s - Math.pow(s, 2), o = this.e = Math.sqrt(r); @@ -20636,11 +20646,11 @@ function e3() { var a = Math.log(Math.tan(Math.PI / 4 + this.b0 / 2)), l = Math.log(Math.tan(Math.PI / 4 + i / 2)), h = Math.log((1 + o * t) / (1 - o * t)); this.K = a - this.alpha * l + this.alpha * o / 2 * h; } -function i3(i) { +function e9(i) { var t = Math.log(Math.tan(Math.PI / 4 - i.y / 2)), e = this.e / 2 * Math.log((1 + this.e * Math.sin(i.y)) / (1 - this.e * Math.sin(i.y))), n = -this.alpha * (t + e) + this.K, s = 2 * (Math.atan(Math.exp(n)) - Math.PI / 4), r = this.alpha * (i.x - this.lambda0), o = Math.atan(Math.sin(r) / (Math.sin(this.b0) * Math.tan(s) + Math.cos(this.b0) * Math.cos(r))), a = Math.asin(Math.cos(this.b0) * Math.sin(s) - Math.sin(this.b0) * Math.cos(s) * Math.cos(r)); return i.y = this.R / 2 * Math.log((1 + Math.sin(a)) / (1 - Math.sin(a))) + this.y0, i.x = this.R * o + this.x0, i; } -function n3(i) { +function i9(i) { for (var t = i.x - this.x0, e = i.y - this.y0, n = t / this.R, s = 2 * (Math.atan(Math.exp(e / this.R)) - Math.PI / 4), r = Math.asin(Math.cos(this.b0) * Math.sin(s) + Math.sin(this.b0) * Math.cos(s) * Math.cos(n)), o = Math.atan(Math.sin(n) / (Math.cos(this.b0) * Math.cos(n) - Math.sin(this.b0) * Math.tan(s))), a = this.lambda0 + o / this.alpha, l = 0, h = r, c = -1e3, u = 0; Math.abs(h - c) > 1e-7; ) { if (++u > 20) return; @@ -20648,93 +20658,93 @@ function n3(i) { } return i.x = a, i.y = h, i; } -var s3 = ["somerc"]; -const r3 = { - init: e3, - forward: i3, - inverse: n3, - names: s3 +var n9 = ["somerc"]; +const s9 = { + init: t9, + forward: e9, + inverse: i9, + names: n9 }; -var wn = 1e-7; -function o3(i) { +var bn = 1e-7; +function r9(i) { var t = ["Hotine_Oblique_Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin"], e = typeof i.PROJECTION == "object" ? Object.keys(i.PROJECTION)[0] : i.PROJECTION; return "no_uoff" in i || "no_off" in i || t.indexOf(e) !== -1; } -function a3() { - var i, t, e, n, s, r, o, a, l, h, c = 0, u, d = 0, f = 0, g = 0, m = 0, p = 0, _ = 0; - this.no_off = o3(this), this.no_rot = "no_rot" in this; +function o9() { + var i, t, e, n, s, r, o, a, l, h, c = 0, u, d = 0, f = 0, g = 0, m = 0, p = 0, v = 0; + this.no_off = r9(this), this.no_rot = "no_rot" in this; var y = !1; "alpha" in this && (y = !0); - var v = !1; - if ("rectified_grid_angle" in this && (v = !0), y && (_ = this.alpha), v && (c = this.rectified_grid_angle * Bt), y || v) + var x = !1; + if ("rectified_grid_angle" in this && (x = !0), y && (v = this.alpha), x && (c = this.rectified_grid_angle * Xt), y || x) d = this.longc; - else if (f = this.long1, m = this.lat1, g = this.long2, p = this.lat2, Math.abs(m - p) <= wn || (i = Math.abs(m)) <= wn || Math.abs(i - S) <= wn || Math.abs(Math.abs(this.lat0) - S) <= wn || Math.abs(Math.abs(p) - S) <= wn) + else if (f = this.long1, m = this.lat1, g = this.long2, p = this.lat2, Math.abs(m - p) <= bn || (i = Math.abs(m)) <= bn || Math.abs(i - P) <= bn || Math.abs(Math.abs(this.lat0) - P) <= bn || Math.abs(Math.abs(p) - P) <= bn) throw new Error(); - var x = 1 - this.es; - t = Math.sqrt(x), Math.abs(this.lat0) > T ? (a = Math.sin(this.lat0), e = Math.cos(this.lat0), i = 1 - this.es * a * a, this.B = e * e, this.B = Math.sqrt(1 + this.es * this.B * this.B / x), this.A = this.B * this.k0 * t / i, n = this.B * t / (e * Math.sqrt(i)), s = n * n - 1, s <= 0 ? s = 0 : (s = Math.sqrt(s), this.lat0 < 0 && (s = -s)), this.E = s += n, this.E *= Math.pow(be(this.e, this.lat0, a), this.B)) : (this.B = 1 / t, this.A = this.k0, this.E = n = s = 1), y || v ? (y ? (u = Math.asin(Math.sin(_) / n), v || (c = _)) : (u = c, _ = Math.asin(n * Math.sin(u))), this.lam0 = d - Math.asin(0.5 * (s - 1 / s) * Math.tan(u)) / this.B) : (r = Math.pow(be(this.e, m, Math.sin(m)), this.B), o = Math.pow(be(this.e, p, Math.sin(p)), this.B), s = this.E / r, l = (o - r) / (o + r), h = this.E * this.E, h = (h - o * r) / (h + o * r), i = f - g, i < -Math.pi ? g -= $s : i > Math.pi && (g += $s), this.lam0 = P(0.5 * (f + g) - Math.atan(h * Math.tan(0.5 * this.B * (f - g)) / l) / this.B), u = Math.atan(2 * Math.sin(this.B * P(f - this.lam0)) / (s - 1 / s)), c = _ = Math.asin(n * Math.sin(u))), this.singam = Math.sin(u), this.cosgam = Math.cos(u), this.sinrot = Math.sin(c), this.cosrot = Math.cos(c), this.rB = 1 / this.B, this.ArB = this.A * this.rB, this.BrA = 1 / this.ArB, this.A * this.B, this.no_off ? this.u_0 = 0 : (this.u_0 = Math.abs(this.ArB * Math.atan(Math.sqrt(n * n - 1) / Math.cos(_))), this.lat0 < 0 && (this.u_0 = -this.u_0)), s = 0.5 * u, this.v_pole_n = this.ArB * Math.log(Math.tan(lt - s)), this.v_pole_s = this.ArB * Math.log(Math.tan(lt + s)); + var M = 1 - this.es; + t = Math.sqrt(M), Math.abs(this.lat0) > T ? (a = Math.sin(this.lat0), e = Math.cos(this.lat0), i = 1 - this.es * a * a, this.B = e * e, this.B = Math.sqrt(1 + this.es * this.B * this.B / M), this.A = this.B * this.k0 * t / i, n = this.B * t / (e * Math.sqrt(i)), s = n * n - 1, s <= 0 ? s = 0 : (s = Math.sqrt(s), this.lat0 < 0 && (s = -s)), this.E = s += n, this.E *= Math.pow(_e(this.e, this.lat0, a), this.B)) : (this.B = 1 / t, this.A = this.k0, this.E = n = s = 1), y || x ? (y ? (u = Math.asin(Math.sin(v) / n), x || (c = v)) : (u = c, v = Math.asin(n * Math.sin(u))), this.lam0 = d - Math.asin(0.5 * (s - 1 / s) * Math.tan(u)) / this.B) : (r = Math.pow(_e(this.e, m, Math.sin(m)), this.B), o = Math.pow(_e(this.e, p, Math.sin(p)), this.B), s = this.E / r, l = (o - r) / (o + r), h = this.E * this.E, h = (h - o * r) / (h + o * r), i = f - g, i < -Math.pi ? g -= ks : i > Math.pi && (g += ks), this.lam0 = A(0.5 * (f + g) - Math.atan(h * Math.tan(0.5 * this.B * (f - g)) / l) / this.B), u = Math.atan(2 * Math.sin(this.B * A(f - this.lam0)) / (s - 1 / s)), c = v = Math.asin(n * Math.sin(u))), this.singam = Math.sin(u), this.cosgam = Math.cos(u), this.sinrot = Math.sin(c), this.cosrot = Math.cos(c), this.rB = 1 / this.B, this.ArB = this.A * this.rB, this.BrA = 1 / this.ArB, this.A * this.B, this.no_off ? this.u_0 = 0 : (this.u_0 = Math.abs(this.ArB * Math.atan(Math.sqrt(n * n - 1) / Math.cos(v))), this.lat0 < 0 && (this.u_0 = -this.u_0)), s = 0.5 * u, this.v_pole_n = this.ArB * Math.log(Math.tan(lt - s)), this.v_pole_s = this.ArB * Math.log(Math.tan(lt + s)); } -function l3(i) { +function a9(i) { var t = {}, e, n, s, r, o, a, l, h; - if (i.x = i.x - this.lam0, Math.abs(Math.abs(i.y) - S) > T) { - if (o = this.E / Math.pow(be(this.e, i.y, Math.sin(i.y)), this.B), a = 1 / o, e = 0.5 * (o - a), n = 0.5 * (o + a), r = Math.sin(this.B * i.x), s = (e * this.singam - r * this.cosgam) / n, Math.abs(Math.abs(s) - 1) < T) + if (i.x = i.x - this.lam0, Math.abs(Math.abs(i.y) - P) > T) { + if (o = this.E / Math.pow(_e(this.e, i.y, Math.sin(i.y)), this.B), a = 1 / o, e = 0.5 * (o - a), n = 0.5 * (o + a), r = Math.sin(this.B * i.x), s = (e * this.singam - r * this.cosgam) / n, Math.abs(Math.abs(s) - 1) < T) throw new Error(); - h = 0.5 * this.ArB * Math.log((1 - s) / (1 + s)), a = Math.cos(this.B * i.x), Math.abs(a) < wn ? l = this.A * i.x : l = this.ArB * Math.atan2(e * this.cosgam + r * this.singam, a); + h = 0.5 * this.ArB * Math.log((1 - s) / (1 + s)), a = Math.cos(this.B * i.x), Math.abs(a) < bn ? l = this.A * i.x : l = this.ArB * Math.atan2(e * this.cosgam + r * this.singam, a); } else h = i.y > 0 ? this.v_pole_n : this.v_pole_s, l = this.ArB * i.y; return this.no_rot ? (t.x = l, t.y = h) : (l -= this.u_0, t.x = h * this.cosrot + l * this.sinrot, t.y = l * this.cosrot - h * this.sinrot), t.x = this.a * t.x + this.x0, t.y = this.a * t.y + this.y0, t; } -function h3(i) { +function l9(i) { var t, e, n, s, r, o, a, l = {}; if (i.x = (i.x - this.x0) * (1 / this.a), i.y = (i.y - this.y0) * (1 / this.a), this.no_rot ? (e = i.y, t = i.x) : (e = i.x * this.cosrot - i.y * this.sinrot, t = i.y * this.cosrot + i.x * this.sinrot + this.u_0), n = Math.exp(-this.BrA * e), s = 0.5 * (n - 1 / n), r = 0.5 * (n + 1 / n), o = Math.sin(this.BrA * t), a = (o * this.cosgam + s * this.singam) / r, Math.abs(Math.abs(a) - 1) < T) - l.x = 0, l.y = a < 0 ? -S : S; + l.x = 0, l.y = a < 0 ? -P : P; else { - if (l.y = this.E / Math.sqrt((1 + a) / (1 - a)), l.y = zs(this.e, Math.pow(l.y, 1 / this.B)), l.y === 1 / 0) + if (l.y = this.E / Math.sqrt((1 + a) / (1 - a)), l.y = Gs(this.e, Math.pow(l.y, 1 / this.B)), l.y === 1 / 0) throw new Error(); l.x = -this.rB * Math.atan2(s * this.cosgam - o * this.singam, Math.cos(this.BrA * t)); } return l.x += this.lam0, l; } -var c3 = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Two_Point_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "Oblique_Mercator", "omerc"]; -const u3 = { - init: a3, - forward: l3, - inverse: h3, - names: c3 +var h9 = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Two_Point_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "Oblique_Mercator", "omerc"]; +const c9 = { + init: o9, + forward: a9, + inverse: l9, + names: h9 }; -function d3() { +function u9() { if (this.lat2 || (this.lat2 = this.lat1), this.k0 || (this.k0 = 1), this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, !(Math.abs(this.lat1 + this.lat2) < T)) { var i = this.b / this.a; this.e = Math.sqrt(1 - i * i); - var t = Math.sin(this.lat1), e = Math.cos(this.lat1), n = $e(this.e, t, e), s = be(this.e, this.lat1, t), r = Math.sin(this.lat2), o = Math.cos(this.lat2), a = $e(this.e, r, o), l = be(this.e, this.lat2, r), h = be(this.e, this.lat0, Math.sin(this.lat0)); + var t = Math.sin(this.lat1), e = Math.cos(this.lat1), n = ke(this.e, t, e), s = _e(this.e, this.lat1, t), r = Math.sin(this.lat2), o = Math.cos(this.lat2), a = ke(this.e, r, o), l = _e(this.e, this.lat2, r), h = _e(this.e, this.lat0, Math.sin(this.lat0)); Math.abs(this.lat1 - this.lat2) > T ? this.ns = Math.log(n / a) / Math.log(s / l) : this.ns = t, isNaN(this.ns) && (this.ns = t), this.f0 = n / (this.ns * Math.pow(s, this.ns)), this.rh = this.a * this.f0 * Math.pow(h, this.ns), this.title || (this.title = "Lambert Conformal Conic"); } } -function f3(i) { +function d9(i) { var t = i.x, e = i.y; - Math.abs(2 * Math.abs(e) - Math.PI) <= T && (e = tr(e) * (S - 2 * T)); - var n = Math.abs(Math.abs(e) - S), s, r; + Math.abs(2 * Math.abs(e) - Math.PI) <= T && (e = tr(e) * (P - 2 * T)); + var n = Math.abs(Math.abs(e) - P), s, r; if (n > T) - s = be(this.e, e, Math.sin(e)), r = this.a * this.f0 * Math.pow(s, this.ns); + s = _e(this.e, e, Math.sin(e)), r = this.a * this.f0 * Math.pow(s, this.ns); else { if (n = e * this.ns, n <= 0) return null; r = 0; } - var o = this.ns * P(t - this.long0); + var o = this.ns * A(t - this.long0); return i.x = this.k0 * (r * Math.sin(o)) + this.x0, i.y = this.k0 * (this.rh - r * Math.cos(o)) + this.y0, i; } -function g3(i) { +function f9(i) { var t, e, n, s, r, o = (i.x - this.x0) / this.k0, a = this.rh - (i.y - this.y0) / this.k0; this.ns > 0 ? (t = Math.sqrt(o * o + a * a), e = 1) : (t = -Math.sqrt(o * o + a * a), e = -1); var l = 0; if (t !== 0 && (l = Math.atan2(e * o, e * a)), t !== 0 || this.ns > 0) { - if (e = 1 / this.ns, n = Math.pow(t / (this.a * this.f0), e), s = zs(this.e, n), s === -9999) + if (e = 1 / this.ns, n = Math.pow(t / (this.a * this.f0), e), s = Gs(this.e, n), s === -9999) return null; } else - s = -S; - return r = P(l / this.ns + this.long0), i.x = r, i.y = s, i; + s = -P; + return r = A(l / this.ns + this.long0), i.x = r, i.y = s, i; } -var m3 = [ +var g9 = [ "Lambert Tangential Conformal Conic Projection", "Lambert_Conformal_Conic", "Lambert_Conformal_Conic_1SP", @@ -20743,20 +20753,20 @@ var m3 = [ "Lambert Conic Conformal (1SP)", "Lambert Conic Conformal (2SP)" ]; -const p3 = { - init: d3, - forward: f3, - inverse: g3, - names: m3 +const m9 = { + init: u9, + forward: d9, + inverse: f9, + names: g9 }; -function _3() { +function p9() { this.a = 6377397155e-3, this.es = 0.006674372230614, this.e = Math.sqrt(this.es), this.lat0 || (this.lat0 = 0.863937979737193), this.long0 || (this.long0 = 0.7417649320975901 - 0.308341501185665), this.k0 || (this.k0 = 0.9999), this.s45 = 0.785398163397448, this.s90 = 2 * this.s45, this.fi0 = this.lat0, this.e2 = this.es, this.e = Math.sqrt(this.e2), this.alfa = Math.sqrt(1 + this.e2 * Math.pow(Math.cos(this.fi0), 4) / (1 - this.e2)), this.uq = 1.04216856380474, this.u0 = Math.asin(Math.sin(this.fi0) / this.alfa), this.g = Math.pow((1 + this.e * Math.sin(this.fi0)) / (1 - this.e * Math.sin(this.fi0)), this.alfa * this.e / 2), this.k = Math.tan(this.u0 / 2 + this.s45) / Math.pow(Math.tan(this.fi0 / 2 + this.s45), this.alfa) * this.g, this.k1 = this.k0, this.n0 = this.a * Math.sqrt(1 - this.e2) / (1 - this.e2 * Math.pow(Math.sin(this.fi0), 2)), this.s0 = 1.37008346281555, this.n = Math.sin(this.s0), this.ro0 = this.k1 * this.n0 / Math.tan(this.s0), this.ad = this.s90 - this.uq; } -function y3(i) { - var t, e, n, s, r, o, a, l = i.x, h = i.y, c = P(l - this.long0); +function v9(i) { + var t, e, n, s, r, o, a, l = i.x, h = i.y, c = A(l - this.long0); return t = Math.pow((1 + this.e * Math.sin(h)) / (1 - this.e * Math.sin(h)), this.alfa * this.e / 2), e = 2 * (Math.atan(this.k * Math.pow(Math.tan(h / 2 + this.s45), this.alfa) / t) - this.s45), n = -c * this.alfa, s = Math.asin(Math.cos(this.ad) * Math.sin(e) + Math.sin(this.ad) * Math.cos(e) * Math.cos(n)), r = Math.asin(Math.cos(e) * Math.sin(n) / Math.cos(s)), o = this.n * r, a = this.ro0 * Math.pow(Math.tan(this.s0 / 2 + this.s45), this.n) / Math.pow(Math.tan(s / 2 + this.s45), this.n), i.y = a * Math.cos(o) / 1, i.x = a * Math.sin(o) / 1, this.czech || (i.y *= -1, i.x *= -1), i; } -function v3(i) { +function y9(i) { var t, e, n, s, r, o, a, l, h = i.x; i.x = i.y, i.y = h, this.czech || (i.y *= -1, i.x *= -1), o = Math.sqrt(i.x * i.x + i.y * i.y), r = Math.atan2(i.y, i.x), s = r / Math.sin(this.s0), n = 2 * (Math.atan(Math.pow(this.ro0 / o, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45), t = Math.asin(Math.cos(this.ad) * Math.sin(n) - Math.sin(this.ad) * Math.cos(n) * Math.cos(s)), e = Math.asin(Math.cos(n) * Math.sin(s) / Math.cos(t)), i.x = this.long0 - e / this.alfa, a = t, l = 0; var c = 0; @@ -20765,14 +20775,14 @@ function v3(i) { while (l === 0 && c < 15); return c >= 15 ? null : i; } -var x3 = ["Krovak", "krovak"]; -const C3 = { - init: _3, - forward: y3, - inverse: v3, - names: x3 +var x9 = ["Krovak", "krovak"]; +const M9 = { + init: p9, + forward: v9, + inverse: y9, + names: x9 }; -function jt(i, t, e, n, s) { +function Jt(i, t, e, n, s) { return i * s - t * Math.sin(2 * s) + e * Math.sin(4 * s) - n * Math.sin(6 * s); } function er(i) { @@ -20787,14 +20797,14 @@ function nr(i) { function sr(i) { return i * i * i * (35 / 3072); } -function Yn(i, t, e) { +function Un(i, t, e) { var n = t * e; return i / Math.sqrt(1 - n * n); } function ns(i) { - return Math.abs(i) < S ? i : i - tr(i) * Math.PI; + return Math.abs(i) < P ? i : i - tr(i) * Math.PI; } -function oo(i, t, e, n, s) { +function ro(i, t, e, n, s) { var r, o; r = i / t; for (var a = 0; a < 15; a++) @@ -20802,51 +20812,51 @@ function oo(i, t, e, n, s) { return r; return NaN; } -function M3() { - this.sphere || (this.e0 = er(this.es), this.e1 = ir(this.es), this.e2 = nr(this.es), this.e3 = sr(this.es), this.ml0 = this.a * jt(this.e0, this.e1, this.e2, this.e3, this.lat0)); +function C9() { + this.sphere || (this.e0 = er(this.es), this.e1 = ir(this.es), this.e2 = nr(this.es), this.e3 = sr(this.es), this.ml0 = this.a * Jt(this.e0, this.e1, this.e2, this.e3, this.lat0)); } -function E3(i) { +function w9(i) { var t, e, n = i.x, s = i.y; - if (n = P(n - this.long0), this.sphere) + if (n = A(n - this.long0), this.sphere) t = this.a * Math.asin(Math.cos(s) * Math.sin(n)), e = this.a * (Math.atan2(Math.tan(s), Math.cos(n)) - this.lat0); else { - var r = Math.sin(s), o = Math.cos(s), a = Yn(this.a, this.e, r), l = Math.tan(s) * Math.tan(s), h = n * Math.cos(s), c = h * h, u = this.es * o * o / (1 - this.es), d = this.a * jt(this.e0, this.e1, this.e2, this.e3, s); + var r = Math.sin(s), o = Math.cos(s), a = Un(this.a, this.e, r), l = Math.tan(s) * Math.tan(s), h = n * Math.cos(s), c = h * h, u = this.es * o * o / (1 - this.es), d = this.a * Jt(this.e0, this.e1, this.e2, this.e3, s); t = a * h * (1 - c * l * (1 / 6 - (8 - l + 8 * u) * c / 120)), e = d - this.ml0 + a * r / o * c * (0.5 + (5 - l + 6 * u) * c / 24); } return i.x = t + this.x0, i.y = e + this.y0, i; } -function w3(i) { +function E9(i) { i.x -= this.x0, i.y -= this.y0; var t = i.x / this.a, e = i.y / this.a, n, s; if (this.sphere) { var r = e + this.lat0; n = Math.asin(Math.sin(r) * Math.cos(t)), s = Math.atan2(Math.tan(t), Math.cos(r)); } else { - var o = this.ml0 / this.a + e, a = oo(o, this.e0, this.e1, this.e2, this.e3); - if (Math.abs(Math.abs(a) - S) <= T) - return i.x = this.long0, i.y = S, e < 0 && (i.y *= -1), i; - var l = Yn(this.a, this.e, Math.sin(a)), h = l * l * l / this.a / this.a * (1 - this.es), c = Math.pow(Math.tan(a), 2), u = t * this.a / l, d = u * u; + var o = this.ml0 / this.a + e, a = ro(o, this.e0, this.e1, this.e2, this.e3); + if (Math.abs(Math.abs(a) - P) <= T) + return i.x = this.long0, i.y = P, e < 0 && (i.y *= -1), i; + var l = Un(this.a, this.e, Math.sin(a)), h = l * l * l / this.a / this.a * (1 - this.es), c = Math.pow(Math.tan(a), 2), u = t * this.a / l, d = u * u; n = a - l * Math.tan(a) / h * u * u * (0.5 - (1 + 3 * c) * u * u / 24), s = u * (1 - d * (c / 3 + (1 + 3 * c) * c * d / 15)) / Math.cos(a); } - return i.x = P(s + this.long0), i.y = ns(n), i; + return i.x = A(s + this.long0), i.y = ns(n), i; } -var S3 = ["Cassini", "Cassini_Soldner", "cass"]; -const R3 = { - init: M3, - forward: E3, - inverse: w3, - names: S3 +var b9 = ["Cassini", "Cassini_Soldner", "cass"]; +const P9 = { + init: C9, + forward: w9, + inverse: E9, + names: b9 }; -function wi(i, t) { +function bi(i, t) { var e; return i > 1e-7 ? (e = i * t, (1 - i * i) * (t / (1 - e * e) - 0.5 / i * Math.log((1 - e) / (1 + e)))) : 2 * t; } -var b3 = 1, L3 = 2, T3 = 3, I3 = 4; -function A3() { +var S9 = 1, _9 = 2, R9 = 3, T9 = 4; +function L9() { var i = Math.abs(this.lat0); - if (Math.abs(i - S) < T ? this.mode = this.lat0 < 0 ? this.S_POLE : this.N_POLE : Math.abs(i) < T ? this.mode = this.EQUIT : this.mode = this.OBLIQ, this.es > 0) { + if (Math.abs(i - P) < T ? this.mode = this.lat0 < 0 ? this.S_POLE : this.N_POLE : Math.abs(i) < T ? this.mode = this.EQUIT : this.mode = this.OBLIQ, this.es > 0) { var t; - switch (this.qp = wi(this.e, 1), this.mmf = 0.5 / (1 - this.es), this.apa = B3(this.es), this.mode) { + switch (this.qp = bi(this.e, 1), this.mmf = 0.5 / (1 - this.es), this.apa = k9(this.es), this.mode) { case this.N_POLE: this.dd = 1; break; @@ -20857,15 +20867,15 @@ function A3() { this.rq = Math.sqrt(0.5 * this.qp), this.dd = 1 / this.rq, this.xmf = 1, this.ymf = 0.5 * this.qp; break; case this.OBLIQ: - this.rq = Math.sqrt(0.5 * this.qp), t = Math.sin(this.lat0), this.sinb1 = wi(this.e, t) / this.qp, this.cosb1 = Math.sqrt(1 - this.sinb1 * this.sinb1), this.dd = Math.cos(this.lat0) / (Math.sqrt(1 - this.es * t * t) * this.rq * this.cosb1), this.ymf = (this.xmf = this.rq) / this.dd, this.xmf *= this.dd; + this.rq = Math.sqrt(0.5 * this.qp), t = Math.sin(this.lat0), this.sinb1 = bi(this.e, t) / this.qp, this.cosb1 = Math.sqrt(1 - this.sinb1 * this.sinb1), this.dd = Math.cos(this.lat0) / (Math.sqrt(1 - this.es * t * t) * this.rq * this.cosb1), this.ymf = (this.xmf = this.rq) / this.dd, this.xmf *= this.dd; break; } } else this.mode === this.OBLIQ && (this.sinph0 = Math.sin(this.lat0), this.cosph0 = Math.cos(this.lat0)); } -function P3(i) { +function O9(i) { var t, e, n, s, r, o, a, l, h, c, u = i.x, d = i.y; - if (u = P(u - this.long0), this.sphere) { + if (u = A(u - this.long0), this.sphere) { if (r = Math.sin(d), c = Math.cos(d), n = Math.cos(u), this.mode === this.OBLIQ || this.mode === this.EQUIT) { if (e = this.mode === this.EQUIT ? 1 + c * n : 1 + this.sinph0 * r + this.cosph0 * c * n, e <= T) return null; @@ -20876,7 +20886,7 @@ function P3(i) { e = lt - d * 0.5, e = 2 * (this.mode === this.S_POLE ? Math.cos(e) : Math.sin(e)), t = e * Math.sin(u), e *= n; } } else { - switch (a = 0, l = 0, h = 0, n = Math.cos(u), s = Math.sin(u), r = Math.sin(d), o = wi(this.e, r), (this.mode === this.OBLIQ || this.mode === this.EQUIT) && (a = o / this.qp, l = Math.sqrt(1 - a * a)), this.mode) { + switch (a = 0, l = 0, h = 0, n = Math.cos(u), s = Math.sin(u), r = Math.sin(d), o = bi(this.e, r), (this.mode === this.OBLIQ || this.mode === this.EQUIT) && (a = o / this.qp, l = Math.sqrt(1 - a * a)), this.mode) { case this.OBLIQ: h = 1 + this.sinb1 * a + this.cosb1 * l * n; break; @@ -20884,10 +20894,10 @@ function P3(i) { h = 1 + l * n; break; case this.N_POLE: - h = S + d, o = this.qp - o; + h = P + d, o = this.qp - o; break; case this.S_POLE: - h = d - S, o = this.qp + o; + h = d - P, o = this.qp + o; break; } if (Math.abs(h) < T) @@ -20905,7 +20915,7 @@ function P3(i) { } return i.x = this.a * t + this.x0, i.y = this.a * e + this.y0, i; } -function O3(i) { +function A9(i) { i.x -= this.x0, i.y -= this.y0; var t = i.x / this.a, e = i.y / this.a, n, s, r, o, a, l, h; if (this.sphere) { @@ -20920,10 +20930,10 @@ function O3(i) { s = Math.abs(u) <= T ? this.lat0 : Math.asin(c * this.sinph0 + e * d * this.cosph0 / u), t *= d * this.cosph0, e = (c - Math.sin(s) * this.sinph0) * u; break; case this.N_POLE: - e = -e, s = S - s; + e = -e, s = P - s; break; case this.S_POLE: - s -= S; + s -= P; break; } n = e === 0 && (this.mode === this.EQUIT || this.mode === this.OBLIQ) ? 0 : Math.atan2(t, e); @@ -20937,48 +20947,48 @@ function O3(i) { return i.x = this.long0, i.y = this.lat0, i; h = 1 - a / this.qp, this.mode === this.S_POLE && (h = -h); } - n = Math.atan2(t, e), s = z3(Math.asin(h), this.apa); + n = Math.atan2(t, e), s = X9(Math.asin(h), this.apa); } - return i.x = P(this.long0 + n), i.y = s, i; + return i.x = A(this.long0 + n), i.y = s, i; } -var N3 = 0.3333333333333333, F3 = 0.17222222222222222, D3 = 0.10257936507936508, k3 = 0.06388888888888888, G3 = 0.0664021164021164, $3 = 0.016415012942191543; -function B3(i) { +var I9 = 0.3333333333333333, N9 = 0.17222222222222222, z9 = 0.10257936507936508, F9 = 0.06388888888888888, D9 = 0.0664021164021164, j9 = 0.016415012942191543; +function k9(i) { var t, e = []; - return e[0] = i * N3, t = i * i, e[0] += t * F3, e[1] = t * k3, t *= i, e[0] += t * D3, e[1] += t * G3, e[2] = t * $3, e; + return e[0] = i * I9, t = i * i, e[0] += t * N9, e[1] = t * F9, t *= i, e[0] += t * z9, e[1] += t * D9, e[2] = t * j9, e; } -function z3(i, t) { +function X9(i, t) { var e = i + i; return i + t[0] * Math.sin(e) + t[1] * Math.sin(e + e) + t[2] * Math.sin(e + e + e); } -var Z3 = ["Lambert Azimuthal Equal Area", "Lambert_Azimuthal_Equal_Area", "laea"]; -const U3 = { - init: A3, - forward: P3, - inverse: O3, - names: Z3, - S_POLE: b3, - N_POLE: L3, - EQUIT: T3, - OBLIQ: I3 +var G9 = ["Lambert Azimuthal Equal Area", "Lambert_Azimuthal_Equal_Area", "laea"]; +const H9 = { + init: L9, + forward: O9, + inverse: A9, + names: G9, + S_POLE: S9, + N_POLE: _9, + EQUIT: R9, + OBLIQ: T9 }; -function Ai(i) { +function Oi(i) { return Math.abs(i) > 1 && (i = i > 1 ? 1 : -1), Math.asin(i); } -function V3() { - Math.abs(this.lat1 + this.lat2) < T || (this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e3 = Math.sqrt(this.es), this.sin_po = Math.sin(this.lat1), this.cos_po = Math.cos(this.lat1), this.t1 = this.sin_po, this.con = this.sin_po, this.ms1 = $e(this.e3, this.sin_po, this.cos_po), this.qs1 = wi(this.e3, this.sin_po, this.cos_po), this.sin_po = Math.sin(this.lat2), this.cos_po = Math.cos(this.lat2), this.t2 = this.sin_po, this.ms2 = $e(this.e3, this.sin_po, this.cos_po), this.qs2 = wi(this.e3, this.sin_po, this.cos_po), this.sin_po = Math.sin(this.lat0), this.cos_po = Math.cos(this.lat0), this.t3 = this.sin_po, this.qs0 = wi(this.e3, this.sin_po, this.cos_po), Math.abs(this.lat1 - this.lat2) > T ? this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1) : this.ns0 = this.con, this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1, this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0); +function Z9() { + Math.abs(this.lat1 + this.lat2) < T || (this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e3 = Math.sqrt(this.es), this.sin_po = Math.sin(this.lat1), this.cos_po = Math.cos(this.lat1), this.t1 = this.sin_po, this.con = this.sin_po, this.ms1 = ke(this.e3, this.sin_po, this.cos_po), this.qs1 = bi(this.e3, this.sin_po, this.cos_po), this.sin_po = Math.sin(this.lat2), this.cos_po = Math.cos(this.lat2), this.t2 = this.sin_po, this.ms2 = ke(this.e3, this.sin_po, this.cos_po), this.qs2 = bi(this.e3, this.sin_po, this.cos_po), this.sin_po = Math.sin(this.lat0), this.cos_po = Math.cos(this.lat0), this.t3 = this.sin_po, this.qs0 = bi(this.e3, this.sin_po, this.cos_po), Math.abs(this.lat1 - this.lat2) > T ? this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1) : this.ns0 = this.con, this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1, this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0); } -function W3(i) { +function B9(i) { var t = i.x, e = i.y; this.sin_phi = Math.sin(e), this.cos_phi = Math.cos(e); - var n = wi(this.e3, this.sin_phi, this.cos_phi), s = this.a * Math.sqrt(this.c - this.ns0 * n) / this.ns0, r = this.ns0 * P(t - this.long0), o = s * Math.sin(r) + this.x0, a = this.rh - s * Math.cos(r) + this.y0; + var n = bi(this.e3, this.sin_phi, this.cos_phi), s = this.a * Math.sqrt(this.c - this.ns0 * n) / this.ns0, r = this.ns0 * A(t - this.long0), o = s * Math.sin(r) + this.x0, a = this.rh - s * Math.cos(r) + this.y0; return i.x = o, i.y = a, i; } -function H3(i) { +function W9(i) { var t, e, n, s, r, o; - return i.x -= this.x0, i.y = this.rh - i.y + this.y0, this.ns0 >= 0 ? (t = Math.sqrt(i.x * i.x + i.y * i.y), n = 1) : (t = -Math.sqrt(i.x * i.x + i.y * i.y), n = -1), s = 0, t !== 0 && (s = Math.atan2(n * i.x, n * i.y)), n = t * this.ns0 / this.a, this.sphere ? o = Math.asin((this.c - n * n) / (2 * this.ns0)) : (e = (this.c - n * n) / this.ns0, o = this.phi1z(this.e3, e)), r = P(s / this.ns0 + this.long0), i.x = r, i.y = o, i; + return i.x -= this.x0, i.y = this.rh - i.y + this.y0, this.ns0 >= 0 ? (t = Math.sqrt(i.x * i.x + i.y * i.y), n = 1) : (t = -Math.sqrt(i.x * i.x + i.y * i.y), n = -1), s = 0, t !== 0 && (s = Math.atan2(n * i.x, n * i.y)), n = t * this.ns0 / this.a, this.sphere ? o = Math.asin((this.c - n * n) / (2 * this.ns0)) : (e = (this.c - n * n) / this.ns0, o = this.phi1z(this.e3, e)), r = A(s / this.ns0 + this.long0), i.x = r, i.y = o, i; } -function X3(i, t) { - var e, n, s, r, o, a = Ai(0.5 * t); +function V9(i, t) { + var e, n, s, r, o, a = Oi(0.5 * t); if (i < T) return a; for (var l = i * i, h = 1; h <= 25; h++) @@ -20986,105 +20996,105 @@ function X3(i, t) { return a; return null; } -var Y3 = ["Albers_Conic_Equal_Area", "Albers", "aea"]; -const j3 = { - init: V3, - forward: W3, - inverse: H3, - names: Y3, - phi1z: X3 +var Y9 = ["Albers_Conic_Equal_Area", "Albers", "aea"]; +const U9 = { + init: Z9, + forward: B9, + inverse: W9, + names: Y9, + phi1z: V9 }; -function K3() { +function J9() { this.sin_p14 = Math.sin(this.lat0), this.cos_p14 = Math.cos(this.lat0), this.infinity_dist = 1e3 * this.a, this.rc = 1; } -function q3(i) { +function q9(i) { var t, e, n, s, r, o, a, l, h = i.x, c = i.y; - return n = P(h - this.long0), t = Math.sin(c), e = Math.cos(c), s = Math.cos(n), o = this.sin_p14 * t + this.cos_p14 * e * s, r = 1, o > 0 || Math.abs(o) <= T ? (a = this.x0 + this.a * r * e * Math.sin(n) / o, l = this.y0 + this.a * r * (this.cos_p14 * t - this.sin_p14 * e * s) / o) : (a = this.x0 + this.infinity_dist * e * Math.sin(n), l = this.y0 + this.infinity_dist * (this.cos_p14 * t - this.sin_p14 * e * s)), i.x = a, i.y = l, i; + return n = A(h - this.long0), t = Math.sin(c), e = Math.cos(c), s = Math.cos(n), o = this.sin_p14 * t + this.cos_p14 * e * s, r = 1, o > 0 || Math.abs(o) <= T ? (a = this.x0 + this.a * r * e * Math.sin(n) / o, l = this.y0 + this.a * r * (this.cos_p14 * t - this.sin_p14 * e * s) / o) : (a = this.x0 + this.infinity_dist * e * Math.sin(n), l = this.y0 + this.infinity_dist * (this.cos_p14 * t - this.sin_p14 * e * s)), i.x = a, i.y = l, i; } -function J3(i) { +function K9(i) { var t, e, n, s, r, o; - return i.x = (i.x - this.x0) / this.a, i.y = (i.y - this.y0) / this.a, i.x /= this.k0, i.y /= this.k0, (t = Math.sqrt(i.x * i.x + i.y * i.y)) ? (s = Math.atan2(t, this.rc), e = Math.sin(s), n = Math.cos(s), o = Ai(n * this.sin_p14 + i.y * e * this.cos_p14 / t), r = Math.atan2(i.x * e, t * this.cos_p14 * n - i.y * this.sin_p14 * e), r = P(this.long0 + r)) : (o = this.phic0, r = 0), i.x = r, i.y = o, i; -} -var Q3 = ["gnom"]; -const tC = { - init: K3, - forward: q3, - inverse: J3, - names: Q3 + return i.x = (i.x - this.x0) / this.a, i.y = (i.y - this.y0) / this.a, i.x /= this.k0, i.y /= this.k0, (t = Math.sqrt(i.x * i.x + i.y * i.y)) ? (s = Math.atan2(t, this.rc), e = Math.sin(s), n = Math.cos(s), o = Oi(n * this.sin_p14 + i.y * e * this.cos_p14 / t), r = Math.atan2(i.x * e, t * this.cos_p14 * n - i.y * this.sin_p14 * e), r = A(this.long0 + r)) : (o = this.phic0, r = 0), i.x = r, i.y = o, i; +} +var Q9 = ["gnom"]; +const $9 = { + init: J9, + forward: q9, + inverse: K9, + names: Q9 }; -function eC(i, t) { +function t4(i, t) { var e = 1 - (1 - i * i) / (2 * i) * Math.log((1 - i) / (1 + i)); if (Math.abs(Math.abs(t) - e) < 1e-6) - return t < 0 ? -1 * S : S; + return t < 0 ? -1 * P : P; for (var n = Math.asin(0.5 * t), s, r, o, a, l = 0; l < 30; l++) if (r = Math.sin(n), o = Math.cos(n), a = i * r, s = Math.pow(1 - a * a, 2) / (2 * o) * (t / (1 - i * i) - r / (1 - a * a) + 0.5 / i * Math.log((1 - a) / (1 + a))), n += s, Math.abs(s) <= 1e-10) return n; return NaN; } -function iC() { - this.sphere || (this.k0 = $e(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts))); +function e4() { + this.sphere || (this.k0 = ke(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts))); } -function nC(i) { - var t = i.x, e = i.y, n, s, r = P(t - this.long0); +function i4(i) { + var t = i.x, e = i.y, n, s, r = A(t - this.long0); if (this.sphere) n = this.x0 + this.a * r * Math.cos(this.lat_ts), s = this.y0 + this.a * Math.sin(e) / Math.cos(this.lat_ts); else { - var o = wi(this.e, Math.sin(e)); + var o = bi(this.e, Math.sin(e)); n = this.x0 + this.a * this.k0 * r, s = this.y0 + this.a * o * 0.5 / this.k0; } return i.x = n, i.y = s, i; } -function sC(i) { +function n4(i) { i.x -= this.x0, i.y -= this.y0; var t, e; - return this.sphere ? (t = P(this.long0 + i.x / this.a / Math.cos(this.lat_ts)), e = Math.asin(i.y / this.a * Math.cos(this.lat_ts))) : (e = eC(this.e, 2 * i.y * this.k0 / this.a), t = P(this.long0 + i.x / (this.a * this.k0))), i.x = t, i.y = e, i; -} -var rC = ["cea"]; -const oC = { - init: iC, - forward: nC, - inverse: sC, - names: rC + return this.sphere ? (t = A(this.long0 + i.x / this.a / Math.cos(this.lat_ts)), e = Math.asin(i.y / this.a * Math.cos(this.lat_ts))) : (e = t4(this.e, 2 * i.y * this.k0 / this.a), t = A(this.long0 + i.x / (this.a * this.k0))), i.x = t, i.y = e, i; +} +var s4 = ["cea"]; +const r4 = { + init: e4, + forward: i4, + inverse: n4, + names: s4 }; -function aC() { +function o4() { this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.lat_ts = this.lat_ts || 0, this.title = this.title || "Equidistant Cylindrical (Plate Carre)", this.rc = Math.cos(this.lat_ts); } -function lC(i) { - var t = i.x, e = i.y, n = P(t - this.long0), s = ns(e - this.lat0); +function a4(i) { + var t = i.x, e = i.y, n = A(t - this.long0), s = ns(e - this.lat0); return i.x = this.x0 + this.a * n * this.rc, i.y = this.y0 + this.a * s, i; } -function hC(i) { +function l4(i) { var t = i.x, e = i.y; - return i.x = P(this.long0 + (t - this.x0) / (this.a * this.rc)), i.y = ns(this.lat0 + (e - this.y0) / this.a), i; -} -var cC = ["Equirectangular", "Equidistant_Cylindrical", "eqc"]; -const uC = { - init: aC, - forward: lC, - inverse: hC, - names: cC + return i.x = A(this.long0 + (t - this.x0) / (this.a * this.rc)), i.y = ns(this.lat0 + (e - this.y0) / this.a), i; +} +var h4 = ["Equirectangular", "Equidistant_Cylindrical", "eqc"]; +const c4 = { + init: o4, + forward: a4, + inverse: l4, + names: h4 }; var iu = 20; -function dC() { - this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = er(this.es), this.e1 = ir(this.es), this.e2 = nr(this.es), this.e3 = sr(this.es), this.ml0 = this.a * jt(this.e0, this.e1, this.e2, this.e3, this.lat0); +function u4() { + this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = er(this.es), this.e1 = ir(this.es), this.e2 = nr(this.es), this.e3 = sr(this.es), this.ml0 = this.a * Jt(this.e0, this.e1, this.e2, this.e3, this.lat0); } -function fC(i) { - var t = i.x, e = i.y, n, s, r, o = P(t - this.long0); +function d4(i) { + var t = i.x, e = i.y, n, s, r, o = A(t - this.long0); if (r = o * Math.sin(e), this.sphere) Math.abs(e) <= T ? (n = this.a * o, s = -1 * this.a * this.lat0) : (n = this.a * Math.sin(r) / Math.tan(e), s = this.a * (ns(e - this.lat0) + (1 - Math.cos(r)) / Math.tan(e))); else if (Math.abs(e) <= T) n = this.a * o, s = -1 * this.ml0; else { - var a = Yn(this.a, this.e, Math.sin(e)) / Math.tan(e); - n = a * Math.sin(r), s = this.a * jt(this.e0, this.e1, this.e2, this.e3, e) - this.ml0 + a * (1 - Math.cos(r)); + var a = Un(this.a, this.e, Math.sin(e)) / Math.tan(e); + n = a * Math.sin(r), s = this.a * Jt(this.e0, this.e1, this.e2, this.e3, e) - this.ml0 + a * (1 - Math.cos(r)); } return i.x = n + this.x0, i.y = s + this.y0, i; } -function gC(i) { +function f4(i) { var t, e, n, s, r, o, a, l, h; if (n = i.x - this.x0, s = i.y - this.y0, this.sphere) if (Math.abs(s + this.a * this.lat0) <= T) - t = P(n / this.a + this.long0), e = 0; + t = A(n / this.a + this.long0), e = 0; else { o = this.lat0 + s / this.a, a = n * n / this.a / this.a + o * o, l = o; var c; @@ -21093,98 +21103,98 @@ function gC(i) { e = l; break; } - t = P(this.long0 + Math.asin(n * Math.tan(l) / this.a) / Math.sin(e)); + t = A(this.long0 + Math.asin(n * Math.tan(l) / this.a) / Math.sin(e)); } else if (Math.abs(s + this.ml0) <= T) - e = 0, t = P(this.long0 + n / this.a); + e = 0, t = A(this.long0 + n / this.a); else { o = (this.ml0 + s) / this.a, a = n * n / this.a / this.a + o * o, l = o; var u, d, f, g, m; for (r = iu; r; --r) - if (m = this.e * Math.sin(l), u = Math.sqrt(1 - m * m) * Math.tan(l), d = this.a * jt(this.e0, this.e1, this.e2, this.e3, l), f = this.e0 - 2 * this.e1 * Math.cos(2 * l) + 4 * this.e2 * Math.cos(4 * l) - 6 * this.e3 * Math.cos(6 * l), g = d / this.a, h = (o * (u * g + 1) - g - 0.5 * u * (g * g + a)) / (this.es * Math.sin(2 * l) * (g * g + a - 2 * o * g) / (4 * u) + (o - g) * (u * f - 2 / Math.sin(2 * l)) - f), l -= h, Math.abs(h) <= T) { + if (m = this.e * Math.sin(l), u = Math.sqrt(1 - m * m) * Math.tan(l), d = this.a * Jt(this.e0, this.e1, this.e2, this.e3, l), f = this.e0 - 2 * this.e1 * Math.cos(2 * l) + 4 * this.e2 * Math.cos(4 * l) - 6 * this.e3 * Math.cos(6 * l), g = d / this.a, h = (o * (u * g + 1) - g - 0.5 * u * (g * g + a)) / (this.es * Math.sin(2 * l) * (g * g + a - 2 * o * g) / (4 * u) + (o - g) * (u * f - 2 / Math.sin(2 * l)) - f), l -= h, Math.abs(h) <= T) { e = l; break; } - u = Math.sqrt(1 - this.es * Math.pow(Math.sin(e), 2)) * Math.tan(e), t = P(this.long0 + Math.asin(n * u / this.a) / Math.sin(e)); + u = Math.sqrt(1 - this.es * Math.pow(Math.sin(e), 2)) * Math.tan(e), t = A(this.long0 + Math.asin(n * u / this.a) / Math.sin(e)); } return i.x = t, i.y = e, i; } -var mC = ["Polyconic", "poly"]; -const pC = { - init: dC, - forward: fC, - inverse: gC, - names: mC +var g4 = ["Polyconic", "poly"]; +const m4 = { + init: u4, + forward: d4, + inverse: f4, + names: g4 }; -function _C() { +function p4() { this.A = [], this.A[1] = 0.6399175073, this.A[2] = -0.1358797613, this.A[3] = 0.063294409, this.A[4] = -0.02526853, this.A[5] = 0.0117879, this.A[6] = -55161e-7, this.A[7] = 26906e-7, this.A[8] = -1333e-6, this.A[9] = 67e-5, this.A[10] = -34e-5, this.B_re = [], this.B_im = [], this.B_re[1] = 0.7557853228, this.B_im[1] = 0, this.B_re[2] = 0.249204646, this.B_im[2] = 3371507e-9, this.B_re[3] = -1541739e-9, this.B_im[3] = 0.04105856, this.B_re[4] = -0.10162907, this.B_im[4] = 0.01727609, this.B_re[5] = -0.26623489, this.B_im[5] = -0.36249218, this.B_re[6] = -0.6870983, this.B_im[6] = -1.1651967, this.C_re = [], this.C_im = [], this.C_re[1] = 1.3231270439, this.C_im[1] = 0, this.C_re[2] = -0.577245789, this.C_im[2] = -7809598e-9, this.C_re[3] = 0.508307513, this.C_im[3] = -0.112208952, this.C_re[4] = -0.15094762, this.C_im[4] = 0.18200602, this.C_re[5] = 1.01418179, this.C_im[5] = 1.64497696, this.C_re[6] = 1.9660549, this.C_im[6] = 2.5127645, this.D = [], this.D[1] = 1.5627014243, this.D[2] = 0.5185406398, this.D[3] = -0.03333098, this.D[4] = -0.1052906, this.D[5] = -0.0368594, this.D[6] = 7317e-6, this.D[7] = 0.0122, this.D[8] = 394e-5, this.D[9] = -13e-4; } -function yC(i) { - var t, e = i.x, n = i.y, s = n - this.lat0, r = e - this.long0, o = s / Ms * 1e-5, a = r, l = 1, h = 0; +function v4(i) { + var t, e = i.x, n = i.y, s = n - this.lat0, r = e - this.long0, o = s / ws * 1e-5, a = r, l = 1, h = 0; for (t = 1; t <= 10; t++) l = l * o, h = h + this.A[t] * l; - var c = h, u = a, d = 1, f = 0, g, m, p = 0, _ = 0; + var c = h, u = a, d = 1, f = 0, g, m, p = 0, v = 0; for (t = 1; t <= 6; t++) - g = d * c - f * u, m = f * c + d * u, d = g, f = m, p = p + this.B_re[t] * d - this.B_im[t] * f, _ = _ + this.B_im[t] * d + this.B_re[t] * f; - return i.x = _ * this.a + this.x0, i.y = p * this.a + this.y0, i; + g = d * c - f * u, m = f * c + d * u, d = g, f = m, p = p + this.B_re[t] * d - this.B_im[t] * f, v = v + this.B_im[t] * d + this.B_re[t] * f; + return i.x = v * this.a + this.x0, i.y = p * this.a + this.y0, i; } -function vC(i) { +function y4(i) { var t, e = i.x, n = i.y, s = e - this.x0, r = n - this.y0, o = r / this.a, a = s / this.a, l = 1, h = 0, c, u, d = 0, f = 0; for (t = 1; t <= 6; t++) c = l * o - h * a, u = h * o + l * a, l = c, h = u, d = d + this.C_re[t] * l - this.C_im[t] * h, f = f + this.C_im[t] * l + this.C_re[t] * h; for (var g = 0; g < this.iterations; g++) { - var m = d, p = f, _, y, v = o, x = a; + var m = d, p = f, v, y, x = o, M = a; for (t = 2; t <= 6; t++) - _ = m * d - p * f, y = p * d + m * f, m = _, p = y, v = v + (t - 1) * (this.B_re[t] * m - this.B_im[t] * p), x = x + (t - 1) * (this.B_im[t] * m + this.B_re[t] * p); + v = m * d - p * f, y = p * d + m * f, m = v, p = y, x = x + (t - 1) * (this.B_re[t] * m - this.B_im[t] * p), M = M + (t - 1) * (this.B_im[t] * m + this.B_re[t] * p); m = 1, p = 0; var C = this.B_re[1], E = this.B_im[1]; for (t = 2; t <= 6; t++) - _ = m * d - p * f, y = p * d + m * f, m = _, p = y, C = C + t * (this.B_re[t] * m - this.B_im[t] * p), E = E + t * (this.B_im[t] * m + this.B_re[t] * p); - var w = C * C + E * E; - d = (v * C + x * E) / w, f = (x * C - v * E) / w; + v = m * d - p * f, y = p * d + m * f, m = v, p = y, C = C + t * (this.B_re[t] * m - this.B_im[t] * p), E = E + t * (this.B_im[t] * m + this.B_re[t] * p); + var b = C * C + E * E; + d = (x * C + M * E) / b, f = (M * C - x * E) / b; } - var R = d, A = f, k = 1, Z = 0; + var S = d, O = f, D = 1, H = 0; for (t = 1; t <= 9; t++) - k = k * R, Z = Z + this.D[t] * k; - var L = this.lat0 + Z * Ms * 1e5, G = this.long0 + A; - return i.x = G, i.y = L, i; -} -var xC = ["New_Zealand_Map_Grid", "nzmg"]; -const CC = { - init: _C, - forward: yC, - inverse: vC, - names: xC + D = D * S, H = H + this.D[t] * D; + var R = this.lat0 + H * ws * 1e5, j = this.long0 + O; + return i.x = j, i.y = R, i; +} +var x4 = ["New_Zealand_Map_Grid", "nzmg"]; +const M4 = { + init: p4, + forward: v4, + inverse: y4, + names: x4 }; -function MC() { +function C4() { } -function EC(i) { - var t = i.x, e = i.y, n = P(t - this.long0), s = this.x0 + this.a * n, r = this.y0 + this.a * Math.log(Math.tan(Math.PI / 4 + e / 2.5)) * 1.25; +function w4(i) { + var t = i.x, e = i.y, n = A(t - this.long0), s = this.x0 + this.a * n, r = this.y0 + this.a * Math.log(Math.tan(Math.PI / 4 + e / 2.5)) * 1.25; return i.x = s, i.y = r, i; } -function wC(i) { +function E4(i) { i.x -= this.x0, i.y -= this.y0; - var t = P(this.long0 + i.x / this.a), e = 2.5 * (Math.atan(Math.exp(0.8 * i.y / this.a)) - Math.PI / 4); + var t = A(this.long0 + i.x / this.a), e = 2.5 * (Math.atan(Math.exp(0.8 * i.y / this.a)) - Math.PI / 4); return i.x = t, i.y = e, i; } -var SC = ["Miller_Cylindrical", "mill"]; -const RC = { - init: MC, - forward: EC, - inverse: wC, - names: SC +var b4 = ["Miller_Cylindrical", "mill"]; +const P4 = { + init: C4, + forward: w4, + inverse: E4, + names: b4 }; -var bC = 20; -function LC() { - this.sphere ? (this.n = 1, this.m = 0, this.es = 0, this.C_y = Math.sqrt((this.m + 1) / this.n), this.C_x = this.C_y / (this.m + 1)) : this.en = bf(this.es); +var S4 = 20; +function _4() { + this.sphere ? (this.n = 1, this.m = 0, this.es = 0, this.C_y = Math.sqrt((this.m + 1) / this.n), this.C_x = this.C_y / (this.m + 1)) : this.en = _f(this.es); } -function TC(i) { +function R4(i) { var t, e, n = i.x, s = i.y; - if (n = P(n - this.long0), this.sphere) { + if (n = A(n - this.long0), this.sphere) { if (!this.m) s = this.n !== 1 ? Math.asin(this.n * Math.sin(s)) : s; else - for (var r = this.n * Math.sin(s), o = bC; o; --o) { + for (var r = this.n * Math.sin(s), o = S4; o; --o) { var a = (this.m * s + Math.sin(s) - r) / (this.m + Math.cos(s)); if (s -= a, Math.abs(a) < T) break; @@ -21192,25 +21202,25 @@ function TC(i) { t = this.a * this.C_x * n * (this.m + Math.cos(s)), e = this.a * this.C_y * s; } else { var l = Math.sin(s), h = Math.cos(s); - e = this.a * Oo(s, l, h, this.en), t = this.a * n * h / Math.sqrt(1 - this.es * l * l); + e = this.a * Ao(s, l, h, this.en), t = this.a * n * h / Math.sqrt(1 - this.es * l * l); } return i.x = t, i.y = e, i; } -function IC(i) { +function T4(i) { var t, e, n, s; - return i.x -= this.x0, n = i.x / this.a, i.y -= this.y0, t = i.y / this.a, this.sphere ? (t /= this.C_y, n = n / (this.C_x * (this.m + Math.cos(t))), this.m ? t = Ai((this.m * t + Math.sin(t)) / this.n) : this.n !== 1 && (t = Ai(Math.sin(t) / this.n)), n = P(n + this.long0), t = ns(t)) : (t = Lf(i.y / this.a, this.es, this.en), s = Math.abs(t), s < S ? (s = Math.sin(t), e = this.long0 + i.x * Math.sqrt(1 - this.es * s * s) / (this.a * Math.cos(t)), n = P(e)) : s - T < S && (n = this.long0)), i.x = n, i.y = t, i; -} -var AC = ["Sinusoidal", "sinu"]; -const PC = { - init: LC, - forward: TC, - inverse: IC, - names: AC + return i.x -= this.x0, n = i.x / this.a, i.y -= this.y0, t = i.y / this.a, this.sphere ? (t /= this.C_y, n = n / (this.C_x * (this.m + Math.cos(t))), this.m ? t = Oi((this.m * t + Math.sin(t)) / this.n) : this.n !== 1 && (t = Oi(Math.sin(t) / this.n)), n = A(n + this.long0), t = ns(t)) : (t = Rf(i.y / this.a, this.es, this.en), s = Math.abs(t), s < P ? (s = Math.sin(t), e = this.long0 + i.x * Math.sqrt(1 - this.es * s * s) / (this.a * Math.cos(t)), n = A(e)) : s - T < P && (n = this.long0)), i.x = n, i.y = t, i; +} +var L4 = ["Sinusoidal", "sinu"]; +const O4 = { + init: _4, + forward: R4, + inverse: T4, + names: L4 }; -function OC() { +function A4() { } -function NC(i) { - for (var t = i.x, e = i.y, n = P(t - this.long0), s = e, r = Math.PI * Math.sin(e); ; ) { +function I4(i) { + for (var t = i.x, e = i.y, n = A(t - this.long0), s = e, r = Math.PI * Math.sin(e); ; ) { var o = -(s + Math.sin(s) - r) / (1 + Math.cos(s)); if (s += o, Math.abs(o) < T) break; @@ -21219,114 +21229,114 @@ function NC(i) { var a = 0.900316316158 * this.a * n * Math.cos(s) + this.x0, l = 1.4142135623731 * this.a * Math.sin(s) + this.y0; return i.x = a, i.y = l, i; } -function FC(i) { +function N4(i) { var t, e; i.x -= this.x0, i.y -= this.y0, e = i.y / (1.4142135623731 * this.a), Math.abs(e) > 0.999999999999 && (e = 0.999999999999), t = Math.asin(e); - var n = P(this.long0 + i.x / (0.900316316158 * this.a * Math.cos(t))); + var n = A(this.long0 + i.x / (0.900316316158 * this.a * Math.cos(t))); n < -Math.PI && (n = -Math.PI), n > Math.PI && (n = Math.PI), e = (2 * t + Math.sin(2 * t)) / Math.PI, Math.abs(e) > 1 && (e = 1); var s = Math.asin(e); return i.x = n, i.y = s, i; } -var DC = ["Mollweide", "moll"]; -const kC = { - init: OC, - forward: NC, - inverse: FC, - names: DC +var z4 = ["Mollweide", "moll"]; +const F4 = { + init: A4, + forward: I4, + inverse: N4, + names: z4 }; -function GC() { - Math.abs(this.lat1 + this.lat2) < T || (this.lat2 = this.lat2 || this.lat1, this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = er(this.es), this.e1 = ir(this.es), this.e2 = nr(this.es), this.e3 = sr(this.es), this.sinphi = Math.sin(this.lat1), this.cosphi = Math.cos(this.lat1), this.ms1 = $e(this.e, this.sinphi, this.cosphi), this.ml1 = jt(this.e0, this.e1, this.e2, this.e3, this.lat1), Math.abs(this.lat1 - this.lat2) < T ? this.ns = this.sinphi : (this.sinphi = Math.sin(this.lat2), this.cosphi = Math.cos(this.lat2), this.ms2 = $e(this.e, this.sinphi, this.cosphi), this.ml2 = jt(this.e0, this.e1, this.e2, this.e3, this.lat2), this.ns = (this.ms1 - this.ms2) / (this.ml2 - this.ml1)), this.g = this.ml1 + this.ms1 / this.ns, this.ml0 = jt(this.e0, this.e1, this.e2, this.e3, this.lat0), this.rh = this.a * (this.g - this.ml0)); +function D4() { + Math.abs(this.lat1 + this.lat2) < T || (this.lat2 = this.lat2 || this.lat1, this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = er(this.es), this.e1 = ir(this.es), this.e2 = nr(this.es), this.e3 = sr(this.es), this.sinphi = Math.sin(this.lat1), this.cosphi = Math.cos(this.lat1), this.ms1 = ke(this.e, this.sinphi, this.cosphi), this.ml1 = Jt(this.e0, this.e1, this.e2, this.e3, this.lat1), Math.abs(this.lat1 - this.lat2) < T ? this.ns = this.sinphi : (this.sinphi = Math.sin(this.lat2), this.cosphi = Math.cos(this.lat2), this.ms2 = ke(this.e, this.sinphi, this.cosphi), this.ml2 = Jt(this.e0, this.e1, this.e2, this.e3, this.lat2), this.ns = (this.ms1 - this.ms2) / (this.ml2 - this.ml1)), this.g = this.ml1 + this.ms1 / this.ns, this.ml0 = Jt(this.e0, this.e1, this.e2, this.e3, this.lat0), this.rh = this.a * (this.g - this.ml0)); } -function $C(i) { +function j4(i) { var t = i.x, e = i.y, n; if (this.sphere) n = this.a * (this.g - e); else { - var s = jt(this.e0, this.e1, this.e2, this.e3, e); + var s = Jt(this.e0, this.e1, this.e2, this.e3, e); n = this.a * (this.g - s); } - var r = this.ns * P(t - this.long0), o = this.x0 + n * Math.sin(r), a = this.y0 + this.rh - n * Math.cos(r); + var r = this.ns * A(t - this.long0), o = this.x0 + n * Math.sin(r), a = this.y0 + this.rh - n * Math.cos(r); return i.x = o, i.y = a, i; } -function BC(i) { +function k4(i) { i.x -= this.x0, i.y = this.rh - i.y + this.y0; var t, e, n, s; this.ns >= 0 ? (e = Math.sqrt(i.x * i.x + i.y * i.y), t = 1) : (e = -Math.sqrt(i.x * i.x + i.y * i.y), t = -1); var r = 0; if (e !== 0 && (r = Math.atan2(t * i.x, t * i.y)), this.sphere) - return s = P(this.long0 + r / this.ns), n = ns(this.g - e / this.a), i.x = s, i.y = n, i; + return s = A(this.long0 + r / this.ns), n = ns(this.g - e / this.a), i.x = s, i.y = n, i; var o = this.g - e / this.a; - return n = oo(o, this.e0, this.e1, this.e2, this.e3), s = P(this.long0 + r / this.ns), i.x = s, i.y = n, i; -} -var zC = ["Equidistant_Conic", "eqdc"]; -const ZC = { - init: GC, - forward: $C, - inverse: BC, - names: zC + return n = ro(o, this.e0, this.e1, this.e2, this.e3), s = A(this.long0 + r / this.ns), i.x = s, i.y = n, i; +} +var X4 = ["Equidistant_Conic", "eqdc"]; +const G4 = { + init: D4, + forward: j4, + inverse: k4, + names: X4 }; -function UC() { +function H4() { this.R = this.a; } -function VC(i) { - var t = i.x, e = i.y, n = P(t - this.long0), s, r; +function Z4(i) { + var t = i.x, e = i.y, n = A(t - this.long0), s, r; Math.abs(e) <= T && (s = this.x0 + this.R * n, r = this.y0); - var o = Ai(2 * Math.abs(e / Math.PI)); - (Math.abs(n) <= T || Math.abs(Math.abs(e) - S) <= T) && (s = this.x0, e >= 0 ? r = this.y0 + Math.PI * this.R * Math.tan(0.5 * o) : r = this.y0 + Math.PI * this.R * -Math.tan(0.5 * o)); + var o = Oi(2 * Math.abs(e / Math.PI)); + (Math.abs(n) <= T || Math.abs(Math.abs(e) - P) <= T) && (s = this.x0, e >= 0 ? r = this.y0 + Math.PI * this.R * Math.tan(0.5 * o) : r = this.y0 + Math.PI * this.R * -Math.tan(0.5 * o)); var a = 0.5 * Math.abs(Math.PI / n - n / Math.PI), l = a * a, h = Math.sin(o), c = Math.cos(o), u = c / (h + c - 1), d = u * u, f = u * (2 / h - 1), g = f * f, m = Math.PI * this.R * (a * (u - g) + Math.sqrt(l * (u - g) * (u - g) - (g + l) * (d - g))) / (g + l); n < 0 && (m = -m), s = this.x0 + m; var p = l + u; return m = Math.PI * this.R * (f * p - a * Math.sqrt((g + l) * (l + 1) - p * p)) / (g + l), e >= 0 ? r = this.y0 + m : r = this.y0 - m, i.x = s, i.y = r, i; } -function WC(i) { +function B4(i) { var t, e, n, s, r, o, a, l, h, c, u, d, f; - return i.x -= this.x0, i.y -= this.y0, u = Math.PI * this.R, n = i.x / u, s = i.y / u, r = n * n + s * s, o = -Math.abs(s) * (1 + r), a = o - 2 * s * s + n * n, l = -2 * o + 1 + 2 * s * s + r * r, f = s * s / l + (2 * a * a * a / l / l / l - 9 * o * a / l / l) / 27, h = (o - a * a / 3 / l) / l, c = 2 * Math.sqrt(-h / 3), u = 3 * f / h / c, Math.abs(u) > 1 && (u >= 0 ? u = 1 : u = -1), d = Math.acos(u) / 3, i.y >= 0 ? e = (-c * Math.cos(d + Math.PI / 3) - a / 3 / l) * Math.PI : e = -(-c * Math.cos(d + Math.PI / 3) - a / 3 / l) * Math.PI, Math.abs(n) < T ? t = this.long0 : t = P(this.long0 + Math.PI * (r - 1 + Math.sqrt(1 + 2 * (n * n - s * s) + r * r)) / 2 / n), i.x = t, i.y = e, i; -} -var HC = ["Van_der_Grinten_I", "VanDerGrinten", "vandg"]; -const XC = { - init: UC, - forward: VC, - inverse: WC, - names: HC + return i.x -= this.x0, i.y -= this.y0, u = Math.PI * this.R, n = i.x / u, s = i.y / u, r = n * n + s * s, o = -Math.abs(s) * (1 + r), a = o - 2 * s * s + n * n, l = -2 * o + 1 + 2 * s * s + r * r, f = s * s / l + (2 * a * a * a / l / l / l - 9 * o * a / l / l) / 27, h = (o - a * a / 3 / l) / l, c = 2 * Math.sqrt(-h / 3), u = 3 * f / h / c, Math.abs(u) > 1 && (u >= 0 ? u = 1 : u = -1), d = Math.acos(u) / 3, i.y >= 0 ? e = (-c * Math.cos(d + Math.PI / 3) - a / 3 / l) * Math.PI : e = -(-c * Math.cos(d + Math.PI / 3) - a / 3 / l) * Math.PI, Math.abs(n) < T ? t = this.long0 : t = A(this.long0 + Math.PI * (r - 1 + Math.sqrt(1 + 2 * (n * n - s * s) + r * r)) / 2 / n), i.x = t, i.y = e, i; +} +var W4 = ["Van_der_Grinten_I", "VanDerGrinten", "vandg"]; +const V4 = { + init: H4, + forward: Z4, + inverse: B4, + names: W4 }; -function YC() { +function Y4() { this.sin_p12 = Math.sin(this.lat0), this.cos_p12 = Math.cos(this.lat0); } -function jC(i) { - var t = i.x, e = i.y, n = Math.sin(i.y), s = Math.cos(i.y), r = P(t - this.long0), o, a, l, h, c, u, d, f, g, m, p, _, y, v, x, C, E, w, R, A, k, Z, L; - return this.sphere ? Math.abs(this.sin_p12 - 1) <= T ? (i.x = this.x0 + this.a * (S - e) * Math.sin(r), i.y = this.y0 - this.a * (S - e) * Math.cos(r), i) : Math.abs(this.sin_p12 + 1) <= T ? (i.x = this.x0 + this.a * (S + e) * Math.sin(r), i.y = this.y0 + this.a * (S + e) * Math.cos(r), i) : (w = this.sin_p12 * n + this.cos_p12 * s * Math.cos(r), C = Math.acos(w), E = C ? C / Math.sin(C) : 1, i.x = this.x0 + this.a * E * s * Math.sin(r), i.y = this.y0 + this.a * E * (this.cos_p12 * n - this.sin_p12 * s * Math.cos(r)), i) : (o = er(this.es), a = ir(this.es), l = nr(this.es), h = sr(this.es), Math.abs(this.sin_p12 - 1) <= T ? (c = this.a * jt(o, a, l, h, S), u = this.a * jt(o, a, l, h, e), i.x = this.x0 + (c - u) * Math.sin(r), i.y = this.y0 - (c - u) * Math.cos(r), i) : Math.abs(this.sin_p12 + 1) <= T ? (c = this.a * jt(o, a, l, h, S), u = this.a * jt(o, a, l, h, e), i.x = this.x0 + (c + u) * Math.sin(r), i.y = this.y0 + (c + u) * Math.cos(r), i) : (d = n / s, f = Yn(this.a, this.e, this.sin_p12), g = Yn(this.a, this.e, n), m = Math.atan((1 - this.es) * d + this.es * f * this.sin_p12 / (g * s)), p = Math.atan2(Math.sin(r), this.cos_p12 * Math.tan(m) - this.sin_p12 * Math.cos(r)), p === 0 ? R = Math.asin(this.cos_p12 * Math.sin(m) - this.sin_p12 * Math.cos(m)) : Math.abs(Math.abs(p) - Math.PI) <= T ? R = -Math.asin(this.cos_p12 * Math.sin(m) - this.sin_p12 * Math.cos(m)) : R = Math.asin(Math.sin(r) * Math.cos(m) / Math.sin(p)), _ = this.e * this.sin_p12 / Math.sqrt(1 - this.es), y = this.e * this.cos_p12 * Math.cos(p) / Math.sqrt(1 - this.es), v = _ * y, x = y * y, A = R * R, k = A * R, Z = k * R, L = Z * R, C = f * R * (1 - A * x * (1 - x) / 6 + k / 8 * v * (1 - 2 * x) + Z / 120 * (x * (4 - 7 * x) - 3 * _ * _ * (1 - 7 * x)) - L / 48 * v), i.x = this.x0 + C * Math.sin(p), i.y = this.y0 + C * Math.cos(p), i)); +function U4(i) { + var t = i.x, e = i.y, n = Math.sin(i.y), s = Math.cos(i.y), r = A(t - this.long0), o, a, l, h, c, u, d, f, g, m, p, v, y, x, M, C, E, b, S, O, D, H, R; + return this.sphere ? Math.abs(this.sin_p12 - 1) <= T ? (i.x = this.x0 + this.a * (P - e) * Math.sin(r), i.y = this.y0 - this.a * (P - e) * Math.cos(r), i) : Math.abs(this.sin_p12 + 1) <= T ? (i.x = this.x0 + this.a * (P + e) * Math.sin(r), i.y = this.y0 + this.a * (P + e) * Math.cos(r), i) : (b = this.sin_p12 * n + this.cos_p12 * s * Math.cos(r), C = Math.acos(b), E = C ? C / Math.sin(C) : 1, i.x = this.x0 + this.a * E * s * Math.sin(r), i.y = this.y0 + this.a * E * (this.cos_p12 * n - this.sin_p12 * s * Math.cos(r)), i) : (o = er(this.es), a = ir(this.es), l = nr(this.es), h = sr(this.es), Math.abs(this.sin_p12 - 1) <= T ? (c = this.a * Jt(o, a, l, h, P), u = this.a * Jt(o, a, l, h, e), i.x = this.x0 + (c - u) * Math.sin(r), i.y = this.y0 - (c - u) * Math.cos(r), i) : Math.abs(this.sin_p12 + 1) <= T ? (c = this.a * Jt(o, a, l, h, P), u = this.a * Jt(o, a, l, h, e), i.x = this.x0 + (c + u) * Math.sin(r), i.y = this.y0 + (c + u) * Math.cos(r), i) : (d = n / s, f = Un(this.a, this.e, this.sin_p12), g = Un(this.a, this.e, n), m = Math.atan((1 - this.es) * d + this.es * f * this.sin_p12 / (g * s)), p = Math.atan2(Math.sin(r), this.cos_p12 * Math.tan(m) - this.sin_p12 * Math.cos(r)), p === 0 ? S = Math.asin(this.cos_p12 * Math.sin(m) - this.sin_p12 * Math.cos(m)) : Math.abs(Math.abs(p) - Math.PI) <= T ? S = -Math.asin(this.cos_p12 * Math.sin(m) - this.sin_p12 * Math.cos(m)) : S = Math.asin(Math.sin(r) * Math.cos(m) / Math.sin(p)), v = this.e * this.sin_p12 / Math.sqrt(1 - this.es), y = this.e * this.cos_p12 * Math.cos(p) / Math.sqrt(1 - this.es), x = v * y, M = y * y, O = S * S, D = O * S, H = D * S, R = H * S, C = f * S * (1 - O * M * (1 - M) / 6 + D / 8 * x * (1 - 2 * M) + H / 120 * (M * (4 - 7 * M) - 3 * v * v * (1 - 7 * M)) - R / 48 * x), i.x = this.x0 + C * Math.sin(p), i.y = this.y0 + C * Math.cos(p), i)); } -function KC(i) { +function J4(i) { i.x -= this.x0, i.y -= this.y0; - var t, e, n, s, r, o, a, l, h, c, u, d, f, g, m, p, _, y, v, x, C, E, w, R; - return this.sphere ? (t = Math.sqrt(i.x * i.x + i.y * i.y), t > 2 * S * this.a ? void 0 : (e = t / this.a, n = Math.sin(e), s = Math.cos(e), r = this.long0, Math.abs(t) <= T ? o = this.lat0 : (o = Ai(s * this.sin_p12 + i.y * n * this.cos_p12 / t), a = Math.abs(this.lat0) - S, Math.abs(a) <= T ? this.lat0 >= 0 ? r = P(this.long0 + Math.atan2(i.x, -i.y)) : r = P(this.long0 - Math.atan2(-i.x, i.y)) : r = P(this.long0 + Math.atan2(i.x * n, t * this.cos_p12 * s - i.y * this.sin_p12 * n))), i.x = r, i.y = o, i)) : (l = er(this.es), h = ir(this.es), c = nr(this.es), u = sr(this.es), Math.abs(this.sin_p12 - 1) <= T ? (d = this.a * jt(l, h, c, u, S), t = Math.sqrt(i.x * i.x + i.y * i.y), f = d - t, o = oo(f / this.a, l, h, c, u), r = P(this.long0 + Math.atan2(i.x, -1 * i.y)), i.x = r, i.y = o, i) : Math.abs(this.sin_p12 + 1) <= T ? (d = this.a * jt(l, h, c, u, S), t = Math.sqrt(i.x * i.x + i.y * i.y), f = t - d, o = oo(f / this.a, l, h, c, u), r = P(this.long0 + Math.atan2(i.x, i.y)), i.x = r, i.y = o, i) : (t = Math.sqrt(i.x * i.x + i.y * i.y), p = Math.atan2(i.x, i.y), g = Yn(this.a, this.e, this.sin_p12), _ = Math.cos(p), y = this.e * this.cos_p12 * _, v = -y * y / (1 - this.es), x = 3 * this.es * (1 - v) * this.sin_p12 * this.cos_p12 * _ / (1 - this.es), C = t / g, E = C - v * (1 + v) * Math.pow(C, 3) / 6 - x * (1 + 3 * v) * Math.pow(C, 4) / 24, w = 1 - v * E * E / 2 - C * E * E * E / 6, m = Math.asin(this.sin_p12 * Math.cos(E) + this.cos_p12 * Math.sin(E) * _), r = P(this.long0 + Math.asin(Math.sin(p) * Math.sin(E) / Math.cos(m))), R = Math.sin(m), o = Math.atan2((R - this.es * w * this.sin_p12) * Math.tan(m), R * (1 - this.es)), i.x = r, i.y = o, i)); -} -var qC = ["Azimuthal_Equidistant", "aeqd"]; -const JC = { - init: YC, - forward: jC, - inverse: KC, - names: qC + var t, e, n, s, r, o, a, l, h, c, u, d, f, g, m, p, v, y, x, M, C, E, b, S; + return this.sphere ? (t = Math.sqrt(i.x * i.x + i.y * i.y), t > 2 * P * this.a ? void 0 : (e = t / this.a, n = Math.sin(e), s = Math.cos(e), r = this.long0, Math.abs(t) <= T ? o = this.lat0 : (o = Oi(s * this.sin_p12 + i.y * n * this.cos_p12 / t), a = Math.abs(this.lat0) - P, Math.abs(a) <= T ? this.lat0 >= 0 ? r = A(this.long0 + Math.atan2(i.x, -i.y)) : r = A(this.long0 - Math.atan2(-i.x, i.y)) : r = A(this.long0 + Math.atan2(i.x * n, t * this.cos_p12 * s - i.y * this.sin_p12 * n))), i.x = r, i.y = o, i)) : (l = er(this.es), h = ir(this.es), c = nr(this.es), u = sr(this.es), Math.abs(this.sin_p12 - 1) <= T ? (d = this.a * Jt(l, h, c, u, P), t = Math.sqrt(i.x * i.x + i.y * i.y), f = d - t, o = ro(f / this.a, l, h, c, u), r = A(this.long0 + Math.atan2(i.x, -1 * i.y)), i.x = r, i.y = o, i) : Math.abs(this.sin_p12 + 1) <= T ? (d = this.a * Jt(l, h, c, u, P), t = Math.sqrt(i.x * i.x + i.y * i.y), f = t - d, o = ro(f / this.a, l, h, c, u), r = A(this.long0 + Math.atan2(i.x, i.y)), i.x = r, i.y = o, i) : (t = Math.sqrt(i.x * i.x + i.y * i.y), p = Math.atan2(i.x, i.y), g = Un(this.a, this.e, this.sin_p12), v = Math.cos(p), y = this.e * this.cos_p12 * v, x = -y * y / (1 - this.es), M = 3 * this.es * (1 - x) * this.sin_p12 * this.cos_p12 * v / (1 - this.es), C = t / g, E = C - x * (1 + x) * Math.pow(C, 3) / 6 - M * (1 + 3 * x) * Math.pow(C, 4) / 24, b = 1 - x * E * E / 2 - C * E * E * E / 6, m = Math.asin(this.sin_p12 * Math.cos(E) + this.cos_p12 * Math.sin(E) * v), r = A(this.long0 + Math.asin(Math.sin(p) * Math.sin(E) / Math.cos(m))), S = Math.sin(m), o = Math.atan2((S - this.es * b * this.sin_p12) * Math.tan(m), S * (1 - this.es)), i.x = r, i.y = o, i)); +} +var q4 = ["Azimuthal_Equidistant", "aeqd"]; +const K4 = { + init: Y4, + forward: U4, + inverse: J4, + names: q4 }; -function QC() { +function Q4() { this.sin_p14 = Math.sin(this.lat0), this.cos_p14 = Math.cos(this.lat0); } -function tM(i) { +function $4(i) { var t, e, n, s, r, o, a, l, h = i.x, c = i.y; - return n = P(h - this.long0), t = Math.sin(c), e = Math.cos(c), s = Math.cos(n), o = this.sin_p14 * t + this.cos_p14 * e * s, r = 1, (o > 0 || Math.abs(o) <= T) && (a = this.a * r * e * Math.sin(n), l = this.y0 + this.a * r * (this.cos_p14 * t - this.sin_p14 * e * s)), i.x = a, i.y = l, i; + return n = A(h - this.long0), t = Math.sin(c), e = Math.cos(c), s = Math.cos(n), o = this.sin_p14 * t + this.cos_p14 * e * s, r = 1, (o > 0 || Math.abs(o) <= T) && (a = this.a * r * e * Math.sin(n), l = this.y0 + this.a * r * (this.cos_p14 * t - this.sin_p14 * e * s)), i.x = a, i.y = l, i; } -function eM(i) { +function tM(i) { var t, e, n, s, r, o, a; - return i.x -= this.x0, i.y -= this.y0, t = Math.sqrt(i.x * i.x + i.y * i.y), e = Ai(t / this.a), n = Math.sin(e), s = Math.cos(e), o = this.long0, Math.abs(t) <= T ? (a = this.lat0, i.x = o, i.y = a, i) : (a = Ai(s * this.sin_p14 + i.y * n * this.cos_p14 / t), r = Math.abs(this.lat0) - S, Math.abs(r) <= T ? (this.lat0 >= 0 ? o = P(this.long0 + Math.atan2(i.x, -i.y)) : o = P(this.long0 - Math.atan2(-i.x, i.y)), i.x = o, i.y = a, i) : (o = P(this.long0 + Math.atan2(i.x * n, t * this.cos_p14 * s - i.y * this.sin_p14 * n)), i.x = o, i.y = a, i)); -} -var iM = ["ortho"]; -const nM = { - init: QC, - forward: tM, - inverse: eM, - names: iM + return i.x -= this.x0, i.y -= this.y0, t = Math.sqrt(i.x * i.x + i.y * i.y), e = Oi(t / this.a), n = Math.sin(e), s = Math.cos(e), o = this.long0, Math.abs(t) <= T ? (a = this.lat0, i.x = o, i.y = a, i) : (a = Oi(s * this.sin_p14 + i.y * n * this.cos_p14 / t), r = Math.abs(this.lat0) - P, Math.abs(r) <= T ? (this.lat0 >= 0 ? o = A(this.long0 + Math.atan2(i.x, -i.y)) : o = A(this.long0 - Math.atan2(-i.x, i.y)), i.x = o, i.y = a, i) : (o = A(this.long0 + Math.atan2(i.x * n, t * this.cos_p14 * s - i.y * this.sin_p14 * n)), i.x = o, i.y = a, i)); +} +var eM = ["ortho"]; +const iM = { + init: Q4, + forward: $4, + inverse: tM, + names: eM }; -var xt = { +var Mt = { FRONT: 1, RIGHT: 2, BACK: 3, @@ -21339,53 +21349,53 @@ var xt = { AREA_2: 3, AREA_3: 4 }; -function sM() { - this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.lat_ts = this.lat_ts || 0, this.title = this.title || "Quadrilateralized Spherical Cube", this.lat0 >= S - lt / 2 ? this.face = xt.TOP : this.lat0 <= -(S - lt / 2) ? this.face = xt.BOTTOM : Math.abs(this.long0) <= lt ? this.face = xt.FRONT : Math.abs(this.long0) <= S + lt ? this.face = this.long0 > 0 ? xt.RIGHT : xt.LEFT : this.face = xt.BACK, this.es !== 0 && (this.one_minus_f = 1 - (this.a - this.b) / this.a, this.one_minus_f_squared = this.one_minus_f * this.one_minus_f); +function nM() { + this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.lat0 = this.lat0 || 0, this.long0 = this.long0 || 0, this.lat_ts = this.lat_ts || 0, this.title = this.title || "Quadrilateralized Spherical Cube", this.lat0 >= P - lt / 2 ? this.face = Mt.TOP : this.lat0 <= -(P - lt / 2) ? this.face = Mt.BOTTOM : Math.abs(this.long0) <= lt ? this.face = Mt.FRONT : Math.abs(this.long0) <= P + lt ? this.face = this.long0 > 0 ? Mt.RIGHT : Mt.LEFT : this.face = Mt.BACK, this.es !== 0 && (this.one_minus_f = 1 - (this.a - this.b) / this.a, this.one_minus_f_squared = this.one_minus_f * this.one_minus_f); } -function rM(i) { +function sM(i) { var t = { x: 0, y: 0 }, e, n, s, r, o, a, l = { value: 0 }; - if (i.x -= this.long0, this.es !== 0 ? e = Math.atan(this.one_minus_f_squared * Math.tan(i.y)) : e = i.y, n = i.x, this.face === xt.TOP) - r = S - e, n >= lt && n <= S + lt ? (l.value = ht.AREA_0, s = n - S) : n > S + lt || n <= -(S + lt) ? (l.value = ht.AREA_1, s = n > 0 ? n - Rt : n + Rt) : n > -(S + lt) && n <= -lt ? (l.value = ht.AREA_2, s = n + S) : (l.value = ht.AREA_3, s = n); - else if (this.face === xt.BOTTOM) - r = S + e, n >= lt && n <= S + lt ? (l.value = ht.AREA_0, s = -n + S) : n < lt && n >= -lt ? (l.value = ht.AREA_1, s = -n) : n < -lt && n >= -(S + lt) ? (l.value = ht.AREA_2, s = -n - S) : (l.value = ht.AREA_3, s = n > 0 ? -n + Rt : -n - Rt); + if (i.x -= this.long0, this.es !== 0 ? e = Math.atan(this.one_minus_f_squared * Math.tan(i.y)) : e = i.y, n = i.x, this.face === Mt.TOP) + r = P - e, n >= lt && n <= P + lt ? (l.value = ht.AREA_0, s = n - P) : n > P + lt || n <= -(P + lt) ? (l.value = ht.AREA_1, s = n > 0 ? n - _t : n + _t) : n > -(P + lt) && n <= -lt ? (l.value = ht.AREA_2, s = n + P) : (l.value = ht.AREA_3, s = n); + else if (this.face === Mt.BOTTOM) + r = P + e, n >= lt && n <= P + lt ? (l.value = ht.AREA_0, s = -n + P) : n < lt && n >= -lt ? (l.value = ht.AREA_1, s = -n) : n < -lt && n >= -(P + lt) ? (l.value = ht.AREA_2, s = -n - P) : (l.value = ht.AREA_3, s = n > 0 ? -n + _t : -n - _t); else { var h, c, u, d, f, g, m; - this.face === xt.RIGHT ? n = Nn(n, +S) : this.face === xt.BACK ? n = Nn(n, +Rt) : this.face === xt.LEFT && (n = Nn(n, -S)), d = Math.sin(e), f = Math.cos(e), g = Math.sin(n), m = Math.cos(n), h = f * m, c = f * g, u = d, this.face === xt.FRONT ? (r = Math.acos(h), s = Tr(r, u, c, l)) : this.face === xt.RIGHT ? (r = Math.acos(c), s = Tr(r, u, -h, l)) : this.face === xt.BACK ? (r = Math.acos(-h), s = Tr(r, u, -c, l)) : this.face === xt.LEFT ? (r = Math.acos(-c), s = Tr(r, u, h, l)) : (r = s = 0, l.value = ht.AREA_0); + this.face === Mt.RIGHT ? n = Nn(n, +P) : this.face === Mt.BACK ? n = Nn(n, +_t) : this.face === Mt.LEFT && (n = Nn(n, -P)), d = Math.sin(e), f = Math.cos(e), g = Math.sin(n), m = Math.cos(n), h = f * m, c = f * g, u = d, this.face === Mt.FRONT ? (r = Math.acos(h), s = Tr(r, u, c, l)) : this.face === Mt.RIGHT ? (r = Math.acos(c), s = Tr(r, u, -h, l)) : this.face === Mt.BACK ? (r = Math.acos(-h), s = Tr(r, u, -c, l)) : this.face === Mt.LEFT ? (r = Math.acos(-c), s = Tr(r, u, h, l)) : (r = s = 0, l.value = ht.AREA_0); } - return a = Math.atan(12 / Rt * (s + Math.acos(Math.sin(s) * Math.cos(lt)) - S)), o = Math.sqrt((1 - Math.cos(r)) / (Math.cos(a) * Math.cos(a)) / (1 - Math.cos(Math.atan(1 / Math.cos(s))))), l.value === ht.AREA_1 ? a += S : l.value === ht.AREA_2 ? a += Rt : l.value === ht.AREA_3 && (a += 1.5 * Rt), t.x = o * Math.cos(a), t.y = o * Math.sin(a), t.x = t.x * this.a + this.x0, t.y = t.y * this.a + this.y0, i.x = t.x, i.y = t.y, i; + return a = Math.atan(12 / _t * (s + Math.acos(Math.sin(s) * Math.cos(lt)) - P)), o = Math.sqrt((1 - Math.cos(r)) / (Math.cos(a) * Math.cos(a)) / (1 - Math.cos(Math.atan(1 / Math.cos(s))))), l.value === ht.AREA_1 ? a += P : l.value === ht.AREA_2 ? a += _t : l.value === ht.AREA_3 && (a += 1.5 * _t), t.x = o * Math.cos(a), t.y = o * Math.sin(a), t.x = t.x * this.a + this.x0, t.y = t.y * this.a + this.y0, i.x = t.x, i.y = t.y, i; } -function oM(i) { +function rM(i) { var t = { lam: 0, phi: 0 }, e, n, s, r, o, a, l, h, c, u = { value: 0 }; - if (i.x = (i.x - this.x0) / this.a, i.y = (i.y - this.y0) / this.a, n = Math.atan(Math.sqrt(i.x * i.x + i.y * i.y)), e = Math.atan2(i.y, i.x), i.x >= 0 && i.x >= Math.abs(i.y) ? u.value = ht.AREA_0 : i.y >= 0 && i.y >= Math.abs(i.x) ? (u.value = ht.AREA_1, e -= S) : i.x < 0 && -i.x >= Math.abs(i.y) ? (u.value = ht.AREA_2, e = e < 0 ? e + Rt : e - Rt) : (u.value = ht.AREA_3, e += S), c = Rt / 12 * Math.tan(e), o = Math.sin(c) / (Math.cos(c) - 1 / Math.sqrt(2)), a = Math.atan(o), s = Math.cos(e), r = Math.tan(n), l = 1 - s * s * r * r * (1 - Math.cos(Math.atan(1 / Math.cos(a)))), l < -1 ? l = -1 : l > 1 && (l = 1), this.face === xt.TOP) - h = Math.acos(l), t.phi = S - h, u.value === ht.AREA_0 ? t.lam = a + S : u.value === ht.AREA_1 ? t.lam = a < 0 ? a + Rt : a - Rt : u.value === ht.AREA_2 ? t.lam = a - S : t.lam = a; - else if (this.face === xt.BOTTOM) - h = Math.acos(l), t.phi = h - S, u.value === ht.AREA_0 ? t.lam = -a + S : u.value === ht.AREA_1 ? t.lam = -a : u.value === ht.AREA_2 ? t.lam = -a - S : t.lam = a < 0 ? -a - Rt : -a + Rt; + if (i.x = (i.x - this.x0) / this.a, i.y = (i.y - this.y0) / this.a, n = Math.atan(Math.sqrt(i.x * i.x + i.y * i.y)), e = Math.atan2(i.y, i.x), i.x >= 0 && i.x >= Math.abs(i.y) ? u.value = ht.AREA_0 : i.y >= 0 && i.y >= Math.abs(i.x) ? (u.value = ht.AREA_1, e -= P) : i.x < 0 && -i.x >= Math.abs(i.y) ? (u.value = ht.AREA_2, e = e < 0 ? e + _t : e - _t) : (u.value = ht.AREA_3, e += P), c = _t / 12 * Math.tan(e), o = Math.sin(c) / (Math.cos(c) - 1 / Math.sqrt(2)), a = Math.atan(o), s = Math.cos(e), r = Math.tan(n), l = 1 - s * s * r * r * (1 - Math.cos(Math.atan(1 / Math.cos(a)))), l < -1 ? l = -1 : l > 1 && (l = 1), this.face === Mt.TOP) + h = Math.acos(l), t.phi = P - h, u.value === ht.AREA_0 ? t.lam = a + P : u.value === ht.AREA_1 ? t.lam = a < 0 ? a + _t : a - _t : u.value === ht.AREA_2 ? t.lam = a - P : t.lam = a; + else if (this.face === Mt.BOTTOM) + h = Math.acos(l), t.phi = h - P, u.value === ht.AREA_0 ? t.lam = -a + P : u.value === ht.AREA_1 ? t.lam = -a : u.value === ht.AREA_2 ? t.lam = -a - P : t.lam = a < 0 ? -a - _t : -a + _t; else { var d, f, g; - d = l, c = d * d, c >= 1 ? g = 0 : g = Math.sqrt(1 - c) * Math.sin(a), c += g * g, c >= 1 ? f = 0 : f = Math.sqrt(1 - c), u.value === ht.AREA_1 ? (c = f, f = -g, g = c) : u.value === ht.AREA_2 ? (f = -f, g = -g) : u.value === ht.AREA_3 && (c = f, f = g, g = -c), this.face === xt.RIGHT ? (c = d, d = -f, f = c) : this.face === xt.BACK ? (d = -d, f = -f) : this.face === xt.LEFT && (c = d, d = f, f = -c), t.phi = Math.acos(-g) - S, t.lam = Math.atan2(f, d), this.face === xt.RIGHT ? t.lam = Nn(t.lam, -S) : this.face === xt.BACK ? t.lam = Nn(t.lam, -Rt) : this.face === xt.LEFT && (t.lam = Nn(t.lam, +S)); + d = l, c = d * d, c >= 1 ? g = 0 : g = Math.sqrt(1 - c) * Math.sin(a), c += g * g, c >= 1 ? f = 0 : f = Math.sqrt(1 - c), u.value === ht.AREA_1 ? (c = f, f = -g, g = c) : u.value === ht.AREA_2 ? (f = -f, g = -g) : u.value === ht.AREA_3 && (c = f, f = g, g = -c), this.face === Mt.RIGHT ? (c = d, d = -f, f = c) : this.face === Mt.BACK ? (d = -d, f = -f) : this.face === Mt.LEFT && (c = d, d = f, f = -c), t.phi = Math.acos(-g) - P, t.lam = Math.atan2(f, d), this.face === Mt.RIGHT ? t.lam = Nn(t.lam, -P) : this.face === Mt.BACK ? t.lam = Nn(t.lam, -_t) : this.face === Mt.LEFT && (t.lam = Nn(t.lam, +P)); } if (this.es !== 0) { - var m, p, _; - m = t.phi < 0 ? 1 : 0, p = Math.tan(t.phi), _ = this.b / Math.sqrt(p * p + this.one_minus_f_squared), t.phi = Math.atan(Math.sqrt(this.a * this.a - _ * _) / (this.one_minus_f * _)), m && (t.phi = -t.phi); + var m, p, v; + m = t.phi < 0 ? 1 : 0, p = Math.tan(t.phi), v = this.b / Math.sqrt(p * p + this.one_minus_f_squared), t.phi = Math.atan(Math.sqrt(this.a * this.a - v * v) / (this.one_minus_f * v)), m && (t.phi = -t.phi); } return t.lam += this.long0, i.x = t.lam, i.y = t.phi, i; } function Tr(i, t, e, n) { var s; - return i < T ? (n.value = ht.AREA_0, s = 0) : (s = Math.atan2(t, e), Math.abs(s) <= lt ? n.value = ht.AREA_0 : s > lt && s <= S + lt ? (n.value = ht.AREA_1, s -= S) : s > S + lt || s <= -(S + lt) ? (n.value = ht.AREA_2, s = s >= 0 ? s - Rt : s + Rt) : (n.value = ht.AREA_3, s += S)), s; + return i < T ? (n.value = ht.AREA_0, s = 0) : (s = Math.atan2(t, e), Math.abs(s) <= lt ? n.value = ht.AREA_0 : s > lt && s <= P + lt ? (n.value = ht.AREA_1, s -= P) : s > P + lt || s <= -(P + lt) ? (n.value = ht.AREA_2, s = s >= 0 ? s - _t : s + _t) : (n.value = ht.AREA_3, s += P)), s; } function Nn(i, t) { var e = i + t; - return e < -Rt ? e += $s : e > +Rt && (e -= $s), e; -} -var aM = ["Quadrilateralized Spherical Cube", "Quadrilateralized_Spherical_Cube", "qsc"]; -const lM = { - init: sM, - forward: rM, - inverse: oM, - names: aM + return e < -_t ? e += ks : e > +_t && (e -= ks), e; +} +var oM = ["Quadrilateralized Spherical Cube", "Quadrilateralized_Spherical_Cube", "qsc"]; +const aM = { + init: nM, + forward: sM, + inverse: rM, + names: oM }; -var Wa = [ +var Za = [ [1, 22199e-21, -715515e-10, 31103e-10], [0.9986, -482243e-9, -24897e-9, -13309e-10], [0.9954, -83103e-8, -448605e-10, -986701e-12], @@ -21405,7 +21415,7 @@ var Wa = [ [0.6213, -0.010418, 883923e-10, 624051e-11], [0.5722, -906601e-8, 182e-6, 624051e-11], [0.5322, -677797e-8, 275608e-9, 624051e-11] -], _s = [ +], vs = [ [-520417e-23, 0.0124, 121431e-23, -845284e-16], [0.062, 0.0124, -126793e-14, 422642e-15], [0.124, 0.0124, 507171e-14, -160604e-14], @@ -21425,12 +21435,12 @@ var Wa = [ [0.9394, 840947e-8, -192841e-9, -42106e-10], [0.9761, 616527e-8, -256e-6, -42106e-10], [1, 328947e-8, -319159e-9, -42106e-10] -], Af = 0.8487, Pf = 1.3523, Of = Fe / 5, hM = 1 / Of, In = 18, ao = function(i, t) { +], Of = 0.8487, Af = 1.3523, If = ze / 5, lM = 1 / If, Ln = 18, oo = function(i, t) { return i[0] + t * (i[1] + t * (i[2] + t * i[3])); -}, cM = function(i, t) { +}, hM = function(i, t) { return i[1] + t * (2 * i[2] + t * 3 * i[3]); }; -function uM(i, t, e, n) { +function cM(i, t, e, n) { for (var s = t; n; --n) { var r = i(s); if (s -= r, Math.abs(r) < e) @@ -21438,67 +21448,67 @@ function uM(i, t, e, n) { } return s; } -function dM() { +function uM() { this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.long0 = this.long0 || 0, this.es = 0, this.title = this.title || "Robinson"; } -function fM(i) { - var t = P(i.x - this.long0), e = Math.abs(i.y), n = Math.floor(e * Of); - n < 0 ? n = 0 : n >= In && (n = In - 1), e = Fe * (e - hM * n); +function dM(i) { + var t = A(i.x - this.long0), e = Math.abs(i.y), n = Math.floor(e * If); + n < 0 ? n = 0 : n >= Ln && (n = Ln - 1), e = ze * (e - lM * n); var s = { - x: ao(Wa[n], e) * t, - y: ao(_s[n], e) + x: oo(Za[n], e) * t, + y: oo(vs[n], e) }; - return i.y < 0 && (s.y = -s.y), s.x = s.x * this.a * Af + this.x0, s.y = s.y * this.a * Pf + this.y0, s; + return i.y < 0 && (s.y = -s.y), s.x = s.x * this.a * Of + this.x0, s.y = s.y * this.a * Af + this.y0, s; } -function gM(i) { +function fM(i) { var t = { - x: (i.x - this.x0) / (this.a * Af), - y: Math.abs(i.y - this.y0) / (this.a * Pf) + x: (i.x - this.x0) / (this.a * Of), + y: Math.abs(i.y - this.y0) / (this.a * Af) }; if (t.y >= 1) - t.x /= Wa[In][0], t.y = i.y < 0 ? -S : S; + t.x /= Za[Ln][0], t.y = i.y < 0 ? -P : P; else { - var e = Math.floor(t.y * In); - for (e < 0 ? e = 0 : e >= In && (e = In - 1); ; ) - if (_s[e][0] > t.y) + var e = Math.floor(t.y * Ln); + for (e < 0 ? e = 0 : e >= Ln && (e = Ln - 1); ; ) + if (vs[e][0] > t.y) --e; - else if (_s[e + 1][0] <= t.y) + else if (vs[e + 1][0] <= t.y) ++e; else break; - var n = _s[e], s = 5 * (t.y - n[0]) / (_s[e + 1][0] - n[0]); - s = uM(function(r) { - return (ao(n, r) - t.y) / cM(n, r); - }, s, T, 100), t.x /= ao(Wa[e], s), t.y = (5 * e + s) * Bt, i.y < 0 && (t.y = -t.y); - } - return t.x = P(t.x + this.long0), t; -} -var mM = ["Robinson", "robin"]; -const pM = { - init: dM, - forward: fM, - inverse: gM, - names: mM + var n = vs[e], s = 5 * (t.y - n[0]) / (vs[e + 1][0] - n[0]); + s = cM(function(r) { + return (oo(n, r) - t.y) / hM(n, r); + }, s, T, 100), t.x /= oo(Za[e], s), t.y = (5 * e + s) * Xt, i.y < 0 && (t.y = -t.y); + } + return t.x = A(t.x + this.long0), t; +} +var gM = ["Robinson", "robin"]; +const mM = { + init: uM, + forward: dM, + inverse: fM, + names: gM }; -function _M() { +function pM() { this.name = "geocent"; } -function yM(i) { +function vM(i) { var t = yf(i, this.es, this.a); return t; } -function vM(i) { - var t = vf(i, this.es, this.a, this.b); +function yM(i) { + var t = xf(i, this.es, this.a, this.b); return t; } var xM = ["Geocentric", "geocentric", "geocent", "Geocent"]; -const CM = { - init: _M, - forward: yM, - inverse: vM, +const MM = { + init: pM, + forward: vM, + inverse: yM, names: xM }; -var Ut = { +var Zt = { N_POLE: 0, S_POLE: 1, EQUIT: 2, @@ -21510,7 +21520,7 @@ var Ut = { long0: { def: 0, num: !0 }, lat0: { def: 0, num: !0 } }; -function MM() { +function CM() { if (Object.keys(ds).forEach(function(e) { if (typeof this[e] > "u") this[e] = ds[e].def; @@ -21519,67 +21529,67 @@ function MM() { throw new Error("Invalid parameter value, must be numeric " + e + " = " + this[e]); ds[e].num && (this[e] = parseFloat(this[e])); } - ds[e].degrees && (this[e] = this[e] * Bt); - }.bind(this)), Math.abs(Math.abs(this.lat0) - S) < T ? this.mode = this.lat0 < 0 ? Ut.S_POLE : Ut.N_POLE : Math.abs(this.lat0) < T ? this.mode = Ut.EQUIT : (this.mode = Ut.OBLIQ, this.sinph0 = Math.sin(this.lat0), this.cosph0 = Math.cos(this.lat0)), this.pn1 = this.h / this.a, this.pn1 <= 0 || this.pn1 > 1e10) + ds[e].degrees && (this[e] = this[e] * Xt); + }.bind(this)), Math.abs(Math.abs(this.lat0) - P) < T ? this.mode = this.lat0 < 0 ? Zt.S_POLE : Zt.N_POLE : Math.abs(this.lat0) < T ? this.mode = Zt.EQUIT : (this.mode = Zt.OBLIQ, this.sinph0 = Math.sin(this.lat0), this.cosph0 = Math.cos(this.lat0)), this.pn1 = this.h / this.a, this.pn1 <= 0 || this.pn1 > 1e10) throw new Error("Invalid height"); this.p = 1 + this.pn1, this.rp = 1 / this.p, this.h1 = 1 / this.pn1, this.pfact = (this.p + 1) * this.h1, this.es = 0; var i = this.tilt, t = this.azi; this.cg = Math.cos(t), this.sg = Math.sin(t), this.cw = Math.cos(i), this.sw = Math.sin(i); } -function EM(i) { +function wM(i) { i.x -= this.long0; var t = Math.sin(i.y), e = Math.cos(i.y), n = Math.cos(i.x), s, r; switch (this.mode) { - case Ut.OBLIQ: + case Zt.OBLIQ: r = this.sinph0 * t + this.cosph0 * e * n; break; - case Ut.EQUIT: + case Zt.EQUIT: r = e * n; break; - case Ut.S_POLE: + case Zt.S_POLE: r = -t; break; - case Ut.N_POLE: + case Zt.N_POLE: r = t; break; } switch (r = this.pn1 / (this.p - r), s = r * e * Math.sin(i.x), this.mode) { - case Ut.OBLIQ: + case Zt.OBLIQ: r *= this.cosph0 * t - this.sinph0 * e * n; break; - case Ut.EQUIT: + case Zt.EQUIT: r *= t; break; - case Ut.N_POLE: + case Zt.N_POLE: r *= -(e * n); break; - case Ut.S_POLE: + case Zt.S_POLE: r *= e * n; break; } var o, a; return o = r * this.cg + s * this.sg, a = 1 / (o * this.sw * this.h1 + this.cw), s = (s * this.cg - r * this.sg) * this.cw * a, r = o * a, i.x = s * this.a, i.y = r * this.a, i; } -function wM(i) { +function EM(i) { i.x /= this.a, i.y /= this.a; var t = { x: i.x, y: i.y }, e, n, s; s = 1 / (this.pn1 - i.y * this.sw), e = this.pn1 * i.x * s, n = this.pn1 * i.y * this.cw * s, i.x = e * this.cg + n * this.sg, i.y = n * this.cg - e * this.sg; - var r = Se(i.x, i.y); + var r = Pe(i.x, i.y); if (Math.abs(r) < T) t.x = 0, t.y = i.y; else { var o, a; switch (a = 1 - r * r * this.pfact, a = (this.p - Math.sqrt(a)) / (this.pn1 / r + r / this.pn1), o = Math.sqrt(1 - a * a), this.mode) { - case Ut.OBLIQ: + case Zt.OBLIQ: t.y = Math.asin(o * this.sinph0 + i.y * a * this.cosph0 / r), i.y = (o - this.sinph0 * Math.sin(t.y)) * r, i.x *= a * this.cosph0; break; - case Ut.EQUIT: + case Zt.EQUIT: t.y = Math.asin(i.y * a / r), i.y = o * r, i.x *= a; break; - case Ut.N_POLE: + case Zt.N_POLE: t.y = Math.asin(o), i.y = -i.y; break; - case Ut.S_POLE: + case Zt.S_POLE: t.y = -Math.asin(o); break; } @@ -21587,14 +21597,14 @@ function wM(i) { } return i.x = t.x + this.long0, i.y = t.y, i; } -var SM = ["Tilted_Perspective", "tpers"]; -const RM = { - init: MM, - forward: EM, - inverse: wM, - names: SM +var bM = ["Tilted_Perspective", "tpers"]; +const PM = { + init: CM, + forward: wM, + inverse: EM, + names: bM }; -function bM() { +function SM() { if (this.flip_axis = this.sweep === "x" ? 1 : 0, this.h = Number(this.h), this.radius_g_1 = this.h / this.a, this.radius_g_1 <= 0 || this.radius_g_1 > 1e10) throw new Error(); if (this.radius_g = 1 + this.radius_g_1, this.C = this.radius_g * this.radius_g - 1, this.es !== 0) { @@ -21604,22 +21614,22 @@ function bM() { this.radius_p = 1, this.radius_p2 = 1, this.radius_p_inv2 = 1, this.shape = "sphere"; this.title || (this.title = "Geostationary Satellite View"); } -function LM(i) { +function _M(i) { var t = i.x, e = i.y, n, s, r, o; if (t = t - this.long0, this.shape === "ellipse") { e = Math.atan(this.radius_p2 * Math.tan(e)); - var a = this.radius_p / Se(this.radius_p * Math.cos(e), Math.sin(e)); + var a = this.radius_p / Pe(this.radius_p * Math.cos(e), Math.sin(e)); if (s = a * Math.cos(t) * Math.cos(e), r = a * Math.sin(t) * Math.cos(e), o = a * Math.sin(e), (this.radius_g - s) * s - r * r - o * o * this.radius_p_inv2 < 0) return i.x = Number.NaN, i.y = Number.NaN, i; - n = this.radius_g - s, this.flip_axis ? (i.x = this.radius_g_1 * Math.atan(r / Se(o, n)), i.y = this.radius_g_1 * Math.atan(o / n)) : (i.x = this.radius_g_1 * Math.atan(r / n), i.y = this.radius_g_1 * Math.atan(o / Se(r, n))); + n = this.radius_g - s, this.flip_axis ? (i.x = this.radius_g_1 * Math.atan(r / Pe(o, n)), i.y = this.radius_g_1 * Math.atan(o / n)) : (i.x = this.radius_g_1 * Math.atan(r / n), i.y = this.radius_g_1 * Math.atan(o / Pe(r, n))); } else - this.shape === "sphere" && (n = Math.cos(e), s = Math.cos(t) * n, r = Math.sin(t) * n, o = Math.sin(e), n = this.radius_g - s, this.flip_axis ? (i.x = this.radius_g_1 * Math.atan(r / Se(o, n)), i.y = this.radius_g_1 * Math.atan(o / n)) : (i.x = this.radius_g_1 * Math.atan(r / n), i.y = this.radius_g_1 * Math.atan(o / Se(r, n)))); + this.shape === "sphere" && (n = Math.cos(e), s = Math.cos(t) * n, r = Math.sin(t) * n, o = Math.sin(e), n = this.radius_g - s, this.flip_axis ? (i.x = this.radius_g_1 * Math.atan(r / Pe(o, n)), i.y = this.radius_g_1 * Math.atan(o / n)) : (i.x = this.radius_g_1 * Math.atan(r / n), i.y = this.radius_g_1 * Math.atan(o / Pe(r, n)))); return i.x = i.x * this.a, i.y = i.y * this.a, i; } -function TM(i) { +function RM(i) { var t = -1, e = 0, n = 0, s, r, o, a; if (i.x = i.x / this.a, i.y = i.y / this.a, this.shape === "ellipse") { - this.flip_axis ? (n = Math.tan(i.y / this.radius_g_1), e = Math.tan(i.x / this.radius_g_1) * Se(1, n)) : (e = Math.tan(i.x / this.radius_g_1), n = Math.tan(i.y / this.radius_g_1) * Se(1, e)); + this.flip_axis ? (n = Math.tan(i.y / this.radius_g_1), e = Math.tan(i.x / this.radius_g_1) * Pe(1, n)) : (e = Math.tan(i.x / this.radius_g_1), n = Math.tan(i.y / this.radius_g_1) * Pe(1, e)); var l = n / this.radius_p; if (s = e * e + l * l + t * t, r = 2 * this.radius_g * t, o = r * r - 4 * s * this.C, o < 0) return i.x = Number.NaN, i.y = Number.NaN, i; @@ -21631,37 +21641,37 @@ function TM(i) { } return i.x = i.x + this.long0, i; } -var IM = ["Geostationary Satellite View", "Geostationary_Satellite", "geos"]; -const AM = { - init: bM, - forward: LM, - inverse: TM, - names: IM +var TM = ["Geostationary Satellite View", "Geostationary_Satellite", "geos"]; +const LM = { + init: SM, + forward: _M, + inverse: RM, + names: TM }; -function PM(i) { - i.Proj.projections.add(Or), i.Proj.projections.add(Nr), i.Proj.projections.add(Gx), i.Proj.projections.add(Yx), i.Proj.projections.add(t3), i.Proj.projections.add(r3), i.Proj.projections.add(u3), i.Proj.projections.add(p3), i.Proj.projections.add(C3), i.Proj.projections.add(R3), i.Proj.projections.add(U3), i.Proj.projections.add(j3), i.Proj.projections.add(tC), i.Proj.projections.add(oC), i.Proj.projections.add(uC), i.Proj.projections.add(pC), i.Proj.projections.add(CC), i.Proj.projections.add(RC), i.Proj.projections.add(PC), i.Proj.projections.add(kC), i.Proj.projections.add(ZC), i.Proj.projections.add(XC), i.Proj.projections.add(JC), i.Proj.projections.add(nM), i.Proj.projections.add(lM), i.Proj.projections.add(pM), i.Proj.projections.add(CM), i.Proj.projections.add(RM), i.Proj.projections.add(AM); +function OM(i) { + i.Proj.projections.add(Ir), i.Proj.projections.add(Nr), i.Proj.projections.add(Dx), i.Proj.projections.add(Yx), i.Proj.projections.add($x), i.Proj.projections.add(s9), i.Proj.projections.add(c9), i.Proj.projections.add(m9), i.Proj.projections.add(M9), i.Proj.projections.add(P9), i.Proj.projections.add(H9), i.Proj.projections.add(U9), i.Proj.projections.add($9), i.Proj.projections.add(r4), i.Proj.projections.add(c4), i.Proj.projections.add(m4), i.Proj.projections.add(M4), i.Proj.projections.add(P4), i.Proj.projections.add(O4), i.Proj.projections.add(F4), i.Proj.projections.add(G4), i.Proj.projections.add(V4), i.Proj.projections.add(K4), i.Proj.projections.add(iM), i.Proj.projections.add(aM), i.Proj.projections.add(mM), i.Proj.projections.add(MM), i.Proj.projections.add(PM), i.Proj.projections.add(LM); } se.defaultDatum = "WGS84"; -se.Proj = ke; +se.Proj = De; se.WGS84 = new se.Proj("WGS84"); -se.Point = Xn; -se.toPoint = xf; -se.defs = Xt; -se.nadgrid = Bv; -se.transform = ro; -se.mgrs = ix; +se.Point = Yn; +se.toPoint = Mf; +se.defs = Yt; +se.nadgrid = ky; +se.transform = so; +se.mgrs = ex; se.version = "__VERSION__"; -PM(se); -function OM(i) { +OM(se); +function AM(i) { const t = Object.keys(i.defs), e = t.length; let n, s; for (n = 0; n < e; ++n) { const r = t[n]; - if (!q(r)) { + if (!K(r)) { const o = i.defs(r); let a = o.units; - !a && o.projName === "longlat" && (a = "degrees"), Xu( - new rl({ + !a && o.projName === "longlat" && (a = "degrees"), Yu( + new nl({ code: r, axisOrientation: o.axis, metersPerUnit: o.to_meter, @@ -21671,19 +21681,19 @@ function OM(i) { } } for (n = 0; n < e; ++n) { - const r = t[n], o = q(r); + const r = t[n], o = K(r); for (s = 0; s < e; ++s) { - const a = t[s], l = q(a); - if (!Vu(r, a)) + const a = t[s], l = K(a); + if (!Bu(r, a)) if (i.defs[r] === i.defs[a]) - xa([o, l]); + ya([o, l]); else { const h = i(r, a); yg( o, l, - Th(o, l, h.forward), - Th(l, o, h.inverse) + Rh(o, l, h.forward), + Rh(l, o, h.inverse) ); } } @@ -21696,7 +21706,7 @@ class nu { const o = this.store.getMap(); if (!o) throw new Error("Missing map"); - this.map = o, this.control = new kl(this.store), this.vectorSource = new Qn(), this.setupMapForCreation(o, this.vectorSource), this.states.readonly || (window.addEventListener("authorize-created", (l) => { + this.map = o, this.control = new Fl(this.store), this.vectorSource = new $n(), this.setupMapForCreation(o, this.vectorSource), this.states.readonly || (window.addEventListener("authorize-created", (l) => { this.createElement(this.vectorSource, l); }), window.addEventListener("refused-created", () => { this.store.removeLastSelectedFeature(), this.store.getMaxElement() === 1 && this.previousElement && this.store.addSelectedFeature(this.previousElement, this.previousElement.get("id"), "create"), tt.sendEvent("rule-validation", void 0); @@ -21742,7 +21752,7 @@ class nu { } deleteElement(t) { const e = this.store.getSelectedFeature(this.store.getCurrentItemId()); - e && (this.remove(t, e), tt.sendEvent("rule-validation", void 0), jd.setCustomStyleWithouInfoBox(this.store)), this.map.get("target").className = `${this.store.getTargetBoxSize()} ${gt.getTheme()}`; + e && (this.remove(t, e), tt.sendEvent("rule-validation", void 0), Ud.setCustomStyleWithouInfoBox(this.store)), this.map.get("target").className = `${this.store.getTargetBoxSize()} ${gt.getTheme()}`; } addLongClickEvent(t, e) { let s, r = [0, 0]; @@ -21797,12 +21807,12 @@ class nu { } const Nf = `@media only screen and (min-width: 351px) and (max-width: 995px){.search-container{left:calc((100% - 334px)/2);width:100%;max-width:332px}}@media only screen and (max-width: 350px){.search-container{left:10px;width:calc(100% - 20px);max-width:332px}}@media only screen and (min-width: 996px){.search-container{left:calc((100% - (var(--search-width) + 30px)) / 2);width:calc(var(--search-width) + 30px)}}.search-container{position:absolute;top:var(--top-distance);z-index:0}.search-input-container{border-radius:var(--icon-border-radius);border:1px solid var(--icon-border-color);display:flex;background-color:var(--information-box-background-color);margin-bottom:1px}.search-input{width:calc(100% - 13px);height:44px;border:none;outline:none;padding:0 0 0 11px;font-size:14px;background-color:var(--information-box-background-color);color:var(--suggestion-box-text-color);font-family:sans-serif}.search-svg-container{width:29px;height:44px;margin-right:11px;display:flex;align-items:center}ul{margin-top:0;list-style-type:none;background-color:var(--information-box-background-color);padding-left:0;border-radius:var(--icon-border-radius)}ul>:first-child{border-top-right-radius:var(--icon-border-radius);border-top-left-radius:var(--icon-border-radius)}li{height:40px;border-bottom:1px solid var(--icon-border-color);padding-left:11px;font-size:12px;display:flex;align-items:center;justify-content:start;color:var(--suggestion-box-text-color);font-family:sans-serif;cursor:pointer}ul>:last-child{border-bottom-right-radius:var(--icon-border-radius);border-bottom-left-radius:var(--icon-border-radius)}li:hover,li:focus{background-color:var(--icon-border-color)}svg{width:var(--svg-icon-size);height:var(--svg-icon-size);stroke:var(--information-box-title-color)}svg:hover{stroke:var(--information-cross-hover-color)}svg>g>.icon{fill:none;stroke-width:var(--icon-stroke-width);stroke-linejoin:round;stroke-linecap:round}.cross-div{width:var(--svg-icon-size);height:var(--svg-icon-size);cursor:pointer} `; -var NM = Object.defineProperty, FM = Object.getOwnPropertyDescriptor, Ue = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? FM(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var IM = Object.defineProperty, NM = Object.getOwnPropertyDescriptor, Ze = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? NM(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && NM(t, e, s), s; + return n && s && IM(t, e, s), s; }; -let jn = class extends Pt { +let Jn = class extends At { constructor() { super(...arguments), this._results = []; } @@ -21832,32 +21842,32 @@ let jn = class extends Pt { } selectAddress(i, t) { var e; - (e = this.map) == null || e.getView().setCenter(vg([i[0], i[1]], "EPSG:2056")), this._results = [], tt.sendEvent("address_selected", t); + (e = this.map) == null || e.getView().setCenter(xg([i[0], i[1]], "EPSG:2056")), this._results = [], tt.sendEvent("address_selected", t); } render() { - return Lt` + return Ct`
        ${this._results.map( - (i) => Lt`
      • this.selectAddress(i.coordinate, i.address)}>${i.address}
      • ` + (i) => Ct`
      • this.selectAddress(i.coordinate, i.address)}>${i.address}
      • ` )}
      `; } }; -jn.styles = [yt(Nf)]; -Ue([ +Jn.styles = [yt(Nf)]; +Ze([ Te({ type: Object }) -], jn.prototype, "locations", 2); -Ue([ +], Jn.prototype, "locations", 2); +Ze([ Te({ type: Object }) -], jn.prototype, "map", 2); -Ue([ - It() -], jn.prototype, "_results", 2); -jn = Ue([ - qt("location-list") -], jn); -let ai = class extends Pt { +], Jn.prototype, "map", 2); +Ze([ + Lt() +], Jn.prototype, "_results", 2); +Jn = Ze([ + Kt("location-list") +], Jn); +let ai = class extends At { constructor(i) { super(), this.results = {}, this._hasSearch = !1, this._hasSelected = !1, this.store = i; const t = i.getMap(); @@ -21886,14 +21896,14 @@ let ai = class extends Pt { this.inputElement.value = "", this.results = {}, this._hasSearch = !1, this._hasSelected = !1; } render() { - return Lt`
      + return Ct`
      - ${Xd( - this._hasSearch || this._hasSelected ? Lt`
      - ${Le(st.cross)} -
      ` : Lt`${Le(st.search)}` + ${zl( + this._hasSearch || this._hasSelected ? Ct`
      + ${Re(st.cross)} +
      ` : Ct`${Re(st.search)}` )}
      @@ -21902,46 +21912,46 @@ let ai = class extends Pt { } }; ai.styles = [yt(Nf)]; -Ue([ - Ya("#search") +Ze([ + Va("#search") ], ai.prototype, "inputElement", 2); -Ue([ - Ya("#location-result") +Ze([ + Va("#location-result") ], ai.prototype, "locationElements", 2); -Ue([ - It() +Ze([ + Lt() ], ai.prototype, "results", 2); -Ue([ - It() +Ze([ + Lt() ], ai.prototype, "_hasSearch", 2); -Ue([ - It() +Ze([ + Lt() ], ai.prototype, "_hasSelected", 2); -ai = Ue([ - qt("search-location") +ai = Ze([ + Kt("search-location") ], ai); -class DM extends kt { +class zM extends Dt { constructor(t, e) { const n = new ai(t); super({ element: n }), this.div = n, Wt.setResizeEvent(this.div, "--search-width", e); } } -class kM { +class FM { constructor(t) { var r; - const e = new Vt({ - fill: new Yt({ + const e = new Bt({ + fill: new Ut({ color: "#ffffff00" }), - stroke: new Re({ + stroke: new Se({ color: "#dddddd", width: 5 }) }), n = t.getOptions(); if (!n) throw new Error("Missing options"); - const s = new Vn({ - source: new Qn({ + const s = new Bn({ + source: new $n({ url: () => n.border.url, format: new Wd() }), @@ -21971,21 +21981,21 @@ class kM { }), (r = t.getMap()) == null || r.addLayer(s); } } -class GM { +class DM { constructor(t) { var n, s; - this.vectorLayer = new Vn(), this.vectorSource = new Qn(), this.map = t; + this.vectorLayer = new Bn(), this.vectorSource = new $n(), this.map = t; const e = gt.getGeolocation(); if (e) { const r = new an(); r.setStyle( - new Vt({ + new Bt({ image: new ni({ radius: 6, - fill: new Yt({ + fill: new Ut({ color: "#3399CC" }), - stroke: new Re({ + stroke: new Se({ color: "#fff", width: 2 }) @@ -22004,19 +22014,19 @@ class GM { (t = this.map) == null || t.removeLayer(this.vectorLayer); } } -const $M = `.loader-element{position:absolute;top:calc(50% - 52px);background-color:var(--information-box-background-color);box-shadow:#0003 0 1px 4px;padding:15px;border-radius:10px;border:1px solid var(--information-box-background-color);z-index:10;max-width:302px;width:100%;left:calc(50% - 167px)}.loader-text{display:flex;justify-content:center;margin-top:10px;color:var(--information-box-title-color)}.loader-container{display:flex;justify-content:center}.loader{width:48px;height:48px;border:4px solid #008c6f;border-bottom-color:transparent;border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}} +const jM = `.loader-element{position:absolute;top:calc(50% - 52px);background-color:var(--information-box-background-color);box-shadow:#0003 0 1px 4px;padding:15px;border-radius:10px;border:1px solid var(--information-box-background-color);z-index:10;max-width:302px;width:100%;left:calc(50% - 167px)}.loader-text{display:flex;justify-content:center;margin-top:10px;color:var(--information-box-title-color)}.loader-container{display:flex;justify-content:center}.loader{width:48px;height:48px;border:4px solid #008c6f;border-bottom-color:transparent;border-radius:50%;display:inline-block;box-sizing:border-box;animation:rotation 1s linear infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}} `; -var BM = Object.defineProperty, zM = Object.getOwnPropertyDescriptor, Ff = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? zM(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var kM = Object.defineProperty, XM = Object.getOwnPropertyDescriptor, zf = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? XM(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && BM(t, e, s), s; + return n && s && kM(t, e, s), s; }; -let lo = class extends Pt { +let ao = class extends At { constructor(i) { super(), this.message = "", this.message = i; } render() { - return Lt` + return Ct`
      @@ -22026,14 +22036,14 @@ let lo = class extends Pt { `; } }; -lo.styles = [yt($M)]; -Ff([ - It() -], lo.prototype, "message", 2); -lo = Ff([ - qt("loader-box") -], lo); -class ZM extends kt { +ao.styles = [yt(jM)]; +zf([ + Lt() +], ao.prototype, "message", 2); +ao = zf([ + Kt("loader-box") +], ao); +class GM extends Dt { constructor(t) { const e = document.createElement("loader-box"); e.message = t, super({ @@ -22050,7 +22060,7 @@ class ZM extends kt { this.element.classList.remove("fade-in"), this.element.classList.add("fade-out"); } } -class UM { +class HM { removeLoaderBox() { this.loaderBox.hide(); } @@ -22064,7 +22074,7 @@ class UM { }); } granted() { - this.removeLoaderBox(), this.map.removeOverlay(this.overlay), this.marker = new GM(this.map); + this.removeLoaderBox(), this.map.removeOverlay(this.overlay), this.marker = new DM(this.map); } denied() { var t; @@ -22084,7 +22094,10 @@ class UM { } checkGeolocation() { const t = gt.getGeolocation(); - navigator.userAgent.match(/Chrome\/\d+/) !== null ? this.chromeBasePermissionAnalyzer() : (navigator.permissions.query({ name: "geolocation" }).then((e) => { + navigator.userAgent.match(/Chrome\/\d+/) !== null ? this.chromeBasePermissionAnalyzer() : navigator.userAgent.match(/(iPad)/) && navigator.userAgent.match(/AppleWebKit/) ? navigator.geolocation.getCurrentPosition( + () => this.granted(), + () => this.denied() + ) : (navigator.permissions.query({ name: "geolocation" }).then((e) => { e.state === "denied" && this.denied(), e.state === "prompt" && this.openInfo(), e.state === "granted" && this.granted(); }), t == null || t.on("error", () => { this.denied(); @@ -22101,7 +22114,7 @@ class UM { const n = document.createElement("div"); n.classList.add("map-overlay"); const s = this.map.getView().calculateExtent(this.map.getSize()); - this.overlay = new l2({ element: n, position: Pi(s), className: "ol-overlay-container ol-selectable overlay-index" }), this.loaderBox = new ZM("Chargement des donn\xE9es GPS"), this.map.addControl(this.loaderBox), this.checkGeolocation(); + this.overlay = new lm({ element: n, position: Ai(s), className: "ol-overlay-container ol-selectable overlay-index" }), this.loaderBox = new GM("Chargement des donn\xE9es GPS"), this.map.addControl(this.loaderBox), this.checkGeolocation(); } } class su { @@ -22113,9 +22126,9 @@ class su { return t && (t.readonly && (e.readonly = t.readonly), t.currentSelections && t.currentSelections.length > 0 && (e.currentSelections = t.currentSelections)), e; } } -class VM { +class ZM { constructor(t) { - this.vectorSource = new Qn(), this.renderUtils = t, this.renderUtils.setupAndLoadLayer(this.vectorSource); + this.vectorSource = new $n(), this.renderUtils = t, this.renderUtils.setupAndLoadLayer(this.vectorSource); } renderCurrentSelection(t) { this.renderUtils.displayCurrentElementCreateTargetMode(this.vectorSource, t); @@ -22128,55 +22141,55 @@ class ru { static setupCircles(t, e) { let n = []; return t.get("isSelected") ? n = [ - new Vt({ + new Bt({ zIndex: 1, image: new ni({ radius: 2 * e, - stroke: new Re({ + stroke: new Se({ color: "#FFFFFF", width: 3 }), - fill: new Yt({ + fill: new Ut({ color: "rgb(239, 68, 68, 0.75)" }) }) }), - new Vt({ + new Bt({ zIndex: 2, image: new ni({ radius: e > 8 ? 4 : 0.2 * e, - stroke: new Re({ + stroke: new Se({ color: "#FFFFFF", width: 3 }), - fill: new Yt({ + fill: new Ut({ color: "#DC2626" }) }) }) ] : n = [ - new Vt({ + new Bt({ zIndex: 1, image: new ni({ radius: 2 * e, - stroke: new Re({ + stroke: new Se({ color: "#FFFFFF", width: 1 }), - fill: new Yt({ + fill: new Ut({ color: "rgb(239, 68, 68, 0.75)" }) }) }), - new Vt({ + new Bt({ zIndex: 2, image: new ni({ radius: e > 8 ? 4 : 0.2 * e, - stroke: new Re({ + stroke: new Se({ color: "#FFFFFF", width: 1 }), - fill: new Yt({ + fill: new Ut({ color: "#DC2626" }) }) @@ -22184,7 +22197,7 @@ class ru { ], n; } } -class WM { +class BM { constructor(t) { this.vectorIsLoaded = !1, this.store = t; } @@ -22204,7 +22217,7 @@ class WM { }); } setupAndLoadLayer(t) { - const e = new Vn({ + const e = new Bn({ source: t, visible: !0 }); @@ -22259,19 +22272,19 @@ class WM { this.displayCurrentElementCreateTargetMode(e, r); } displayMixMode(t, e, n) { - this.vectorIsLoaded ? this.loadMixMode(t, e, n) : t.on("featuresloadend", () => { + t && e && (this.vectorIsLoaded ? this.loadMixMode(t, e, n) : t.on("featuresloadend", () => { this.loadMixMode(t, e, n), this.vectorIsLoaded = !0; - }); + })); } } -var HM = Object.defineProperty, XM = Object.getOwnPropertyDescriptor, Oi = (i, t, e, n) => { - for (var s = n > 1 ? void 0 : n ? XM(t, e) : t, r = i.length - 1, o; r >= 0; r--) +var WM = Object.defineProperty, VM = Object.getOwnPropertyDescriptor, Ii = (i, t, e, n) => { + for (var s = n > 1 ? void 0 : n ? VM(t, e) : t, r = i.length - 1, o; r >= 0; r--) (o = i[r]) && (s = (n ? o(t, e, s) : o(s)) || s); - return n && s && HM(t, e, s), s; + return n && s && WM(t, e, s), s; }; -let Be = class extends Pt { +let Xe = class extends At { constructor() { - super(), this.modeControllers = [], this.inclusionArea = void 0, this.options = {}, this.states = {}, this.store = new gt(), this.renderUtils = new WM(this.store); + super(), this.modeControllers = [], this.inclusionArea = void 0, this.options = {}, this.states = {}, this.store = new gt(), this.renderUtils = new BM(this.store); } connectedCallback() { super.connectedCallback(); @@ -22286,13 +22299,13 @@ let Be = class extends Pt { i.currentLocation && i.reverseLocation ? this.store.setTargetBoxSize("large") : i.currentLocation || i.reverseLocation ? this.store.setTargetBoxSize("medium") : this.store.setTargetBoxSize("small"); } firstUpdated() { - const i = yy.webComponentOptions(this.options); + const i = y3.webComponentOptions(this.options); this.store.setOptions(i); const t = su.getStates(this.states); if (!i) return; const e = t.readonly; - this.setupTheme(i), this.setupCustomDisplay(i), se.defs("EPSG:2056", "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs"), OM(se), this.view = new ii({ + this.setupTheme(i), this.setupCustomDisplay(i), se.defs("EPSG:2056", "+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs"), AM(se), this.view = new ii({ projection: "EPSG:2056", center: i.defaultCenter, zoom: i.zoom, @@ -22300,79 +22313,79 @@ let Be = class extends Pt { maxZoom: i.maxZoom, enableRotation: i.interaction.enableRotation }); - const n = new V1({ + const n = new B1({ target: this.mapElement, controls: [], layers: [], view: this.view }); - this.store.setMap(n), Vy.setupIcon(t, this.store), i.interaction.enableGeolocation && !e && (gt.setGeolocation(new Y1({ + this.store.setMap(n), Z3.setupIcon(t, this.store), i.interaction.enableGeolocation && !e && (gt.setGeolocation(new U1({ trackingOptions: { enableHighAccuracy: !0 }, projection: this.view.getProjection() - })), new UM(n)), i.search.displaySearch && i.mode.type !== "target" && !e && n.addControl(new DM(this.store, n)), i.mode.type === "target" && (this.modeControllers.push(new VM(this.renderUtils)), e || (n.addControl(new Ky(this.store)), i.geolocationInformation.displayBox && n.addControl( - new tv(this.store) - ))), i.wmts.length > 0 && new ly(this.store), i.interaction.displayScaleLine && n.addControl(new C2({ units: "metric" })), i.border.url !== "" && new kM(this.store), i.inclusionArea.url !== "" && (this.inclusionArea = new xy(this.store)), i.mode.type === "select" && i.wfs.url != "" && this.modeControllers.push(new Fc(this.renderUtils, t, this.store)), i.mode.type === "create" && this.modeControllers.push(new nu(this.mapElement, this.inclusionArea, this.renderUtils, t, this.store)), i.mode.type === "mix" && i.wfs.url != "" && (this.modeControllers.push(new Fc(this.renderUtils, t, this.store)), this.modeControllers.push(new nu(this.mapElement, this.inclusionArea, this.renderUtils, t, this.store))), e || new gy(this.store), Wt.setCursorEvent(n); + })), new HM(n)), i.search.displaySearch && i.mode.type !== "target" && !e && n.addControl(new zM(this.store, n)), i.mode.type === "target" && (this.modeControllers.push(new ZM(this.renderUtils)), e || (n.addControl(new J3(this.store)), i.geolocationInformation.displayBox && n.addControl( + new $3(this.store) + ))), i.wmts.length > 0 && new l3(this.store), i.interaction.displayScaleLine && n.addControl(new Cm({ units: "metric" })), i.border.url !== "" && new FM(this.store), i.inclusionArea.url !== "" && (this.inclusionArea = new M3(this.store)), i.mode.type === "select" && i.wfs.url != "" && this.modeControllers.push(new Nc(this.renderUtils, t, this.store)), i.mode.type === "create" && this.modeControllers.push(new nu(this.mapElement, this.inclusionArea, this.renderUtils, t, this.store)), i.mode.type === "mix" && i.wfs.url != "" && (this.modeControllers.push(new Nc(this.renderUtils, t, this.store)), this.modeControllers.push(new nu(this.mapElement, this.inclusionArea, this.renderUtils, t, this.store))), e || new g3(this.store), Wt.setCursorEvent(n); } updated(i) { - var t, e, n; + var t, e, n, s, r, o, a, l; if (i.has("states") && this.states) { - const s = su.getStates(this.states); - if (s.currentSelections.length > 0) { + const h = su.getStates(this.states); + if (h.currentSelections.length > 0) { switch ((t = this.store.getOptions()) == null ? void 0 : t.mode.type) { case "target": - this.modeControllers[0].renderCurrentSelection(s); + (e = this.modeControllers[0]) == null || e.renderCurrentSelection(h); break; case "select": - this.modeControllers[0].renderCurrentSelection(s); + (n = this.modeControllers[0]) == null || n.renderCurrentSelection(h); break; case "create": - this.modeControllers[0].renderCurrentSelection(s); + (s = this.modeControllers[0]) == null || s.renderCurrentSelection(h); break; case "mix": - this.renderUtils.displayMixMode(this.modeControllers[0].vectorSource, this.modeControllers[1].vectorSource, s); + this.renderUtils.displayMixMode((r = this.modeControllers[0]) == null ? void 0 : r.vectorSource, (o = this.modeControllers[1]) == null ? void 0 : o.vectorSource, h); break; } - (e = this.store.getMap()) == null || e.updateSize(); + (a = this.store.getMap()) == null || a.updateSize(); } else - this.modeControllers.forEach((r) => r.removeCurrentSelection()), this.store.removeAllSelectedFeatures(), (n = this.store.getMap()) == null || n.getControls().forEach((r) => { - r instanceof kl && r.disable(); + this.modeControllers.forEach((c) => c.removeCurrentSelection()), this.store.removeAllSelectedFeatures(), (l = this.store.getMap()) == null || l.getControls().forEach((c) => { + c instanceof Fl && c.disable(); }); } } render() { - return Lt` + return Ct`
      `; } }; -Be.styles = [yt(hy), yt(cy), yt(Io), yt(hf), yt(my), yt(py), yt(_y)]; -Oi([ - Ya("#map") -], Be.prototype, "mapElement", 2); -Oi([ - It() -], Be.prototype, "view", 2); -Oi([ - It() -], Be.prototype, "modeControllers", 2); -Oi([ - It() -], Be.prototype, "renderUtils", 2); -Oi([ - It() -], Be.prototype, "inclusionArea", 2); -Oi([ +Xe.styles = [yt(h3), yt(c3), yt(To), yt(lf), yt(m3), yt(p3), yt(v3)]; +Ii([ + Va("#map") +], Xe.prototype, "mapElement", 2); +Ii([ + Lt() +], Xe.prototype, "view", 2); +Ii([ + Lt() +], Xe.prototype, "modeControllers", 2); +Ii([ + Lt() +], Xe.prototype, "renderUtils", 2); +Ii([ + Lt() +], Xe.prototype, "inclusionArea", 2); +Ii([ Te({ type: Object, attribute: "options" }) -], Be.prototype, "options", 2); -Oi([ +], Xe.prototype, "options", 2); +Ii([ Te({ type: Object, attribute: "states" }) -], Be.prototype, "states", 2); -Be = Oi([ - qt("openlayers-element") -], Be); +], Xe.prototype, "states", 2); +Xe = Ii([ + Kt("openlayers-element") +], Xe); export { - Be as OpenLayersElement + Xe as OpenLayersElement };