@maptiler/geocoding-control 2.0.0-rc.9 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/leaflet.js +784 -799
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +3 -3
- package/leaflet.umd.js.map +1 -1
- package/maplibregl.js +1180 -1195
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +3 -3
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.js +1155 -1170
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +3 -3
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers.js +1405 -1420
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +3 -3
- package/openlayers.umd.js.map +1 -1
- package/package.json +2 -2
- package/react.js +783 -798
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/svelte/GeocodingControl.svelte +21 -46
- package/svelte/GeocodingControl.svelte.d.ts +0 -1
- package/svelte/types.d.ts +0 -1
- package/types.d.ts +0 -1
- package/vanilla.js +590 -605
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
package/openlayers.js
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
throw TypeError(
|
|
1
|
+
var gn = Object.defineProperty;
|
|
2
|
+
var Vt = (n) => {
|
|
3
|
+
throw TypeError(n);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
import { Control as
|
|
9
|
-
import
|
|
10
|
-
import { Feature as
|
|
11
|
-
import { Point as
|
|
12
|
-
import
|
|
13
|
-
import { fromLonLat as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
5
|
+
var mn = (n, e, t) => e in n ? gn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
6
|
+
var ne = (n, e, t) => mn(n, typeof e != "symbol" ? e + "" : e, t), Zt = (n, e, t) => e.has(n) || Vt("Cannot " + t);
|
|
7
|
+
var V = (n, e, t) => (Zt(n, e, "read from private field"), t ? t.call(n) : e.get(n)), Lt = (n, e, t) => e.has(n) ? Vt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), St = (n, e, t, i) => (Zt(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t);
|
|
8
|
+
import { Control as yn } from "ol/control";
|
|
9
|
+
import xe from "ol/events/Event";
|
|
10
|
+
import { Feature as fe } from "ol";
|
|
11
|
+
import { Point as xt, Polygon as Ht, MultiPolygon as Yt, GeometryCollection as pn, LineString as Xt, MultiLineString as Kt } from "ol/geom";
|
|
12
|
+
import vn from "ol/layer/Vector";
|
|
13
|
+
import { fromLonLat as tt, transformExtent as bn, toLonLat as Jt, getUserProjection as wn } from "ol/proj";
|
|
14
|
+
import _n from "ol/source/Vector";
|
|
15
|
+
import $t from "ol/style/Fill";
|
|
16
|
+
import En from "ol/style/Icon";
|
|
17
|
+
import ei from "ol/style/Stroke";
|
|
18
|
+
import Ln from "ol/style/Style";
|
|
19
|
+
import Sn from "ol/style/Text";
|
|
20
20
|
function D() {
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
for (const t in e)
|
|
22
|
+
function xn(n, e) {
|
|
23
|
+
for (const t in e) n[t] = e[t];
|
|
24
24
|
return (
|
|
25
25
|
/** @type {T & S} */
|
|
26
|
-
|
|
26
|
+
n
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
29
|
+
function Wi(n) {
|
|
30
|
+
return n();
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function ti() {
|
|
33
33
|
return /* @__PURE__ */ Object.create(null);
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
|
|
35
|
+
function ye(n) {
|
|
36
|
+
n.forEach(Wi);
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
return typeof
|
|
38
|
+
function Ai(n) {
|
|
39
|
+
return typeof n == "function";
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return
|
|
41
|
+
function Pe(n, e) {
|
|
42
|
+
return n != n ? e == e : n !== e || n && typeof n == "object" || typeof n == "function";
|
|
43
43
|
}
|
|
44
|
-
let
|
|
45
|
-
function K(
|
|
46
|
-
return
|
|
44
|
+
let it;
|
|
45
|
+
function K(n, e) {
|
|
46
|
+
return n === e ? !0 : (it || (it = document.createElement("a")), it.href = e, n === it.href);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return Object.keys(
|
|
48
|
+
function Mn(n) {
|
|
49
|
+
return Object.keys(n).length === 0;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
if (
|
|
53
|
-
const r =
|
|
54
|
-
return
|
|
51
|
+
function kn(n, e, t, i) {
|
|
52
|
+
if (n) {
|
|
53
|
+
const r = zi(n, e, t, i);
|
|
54
|
+
return n[0](r);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
function
|
|
58
|
-
return
|
|
57
|
+
function zi(n, e, t, i) {
|
|
58
|
+
return n[1] && i ? xn(t.ctx.slice(), n[1](i(e))) : t.ctx;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
61
|
-
if (
|
|
62
|
-
const r =
|
|
60
|
+
function Cn(n, e, t, i) {
|
|
61
|
+
if (n[2] && i) {
|
|
62
|
+
const r = n[2](i(t));
|
|
63
63
|
if (e.dirty === void 0)
|
|
64
64
|
return r;
|
|
65
65
|
if (typeof r == "object") {
|
|
@@ -72,240 +72,240 @@ function Rn(i, e, t, n) {
|
|
|
72
72
|
}
|
|
73
73
|
return e.dirty;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function Nn(n, e, t, i, r, o) {
|
|
76
76
|
if (r) {
|
|
77
|
-
const l =
|
|
78
|
-
|
|
77
|
+
const l = zi(e, t, i, o);
|
|
78
|
+
n.p(l, r);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
function
|
|
82
|
-
if (
|
|
83
|
-
const e = [], t =
|
|
84
|
-
for (let
|
|
85
|
-
e[
|
|
81
|
+
function Pn(n) {
|
|
82
|
+
if (n.ctx.length > 32) {
|
|
83
|
+
const e = [], t = n.ctx.length / 32;
|
|
84
|
+
for (let i = 0; i < t; i++)
|
|
85
|
+
e[i] = -1;
|
|
86
86
|
return e;
|
|
87
87
|
}
|
|
88
88
|
return -1;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
return
|
|
90
|
+
function ii(n) {
|
|
91
|
+
return n ?? "";
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
|
|
93
|
+
function T(n, e) {
|
|
94
|
+
n.appendChild(e);
|
|
95
95
|
}
|
|
96
|
-
function U(
|
|
97
|
-
|
|
96
|
+
function U(n, e, t) {
|
|
97
|
+
n.insertBefore(e, t || null);
|
|
98
98
|
}
|
|
99
|
-
function F(
|
|
100
|
-
|
|
99
|
+
function F(n) {
|
|
100
|
+
n.parentNode && n.parentNode.removeChild(n);
|
|
101
101
|
}
|
|
102
|
-
function W(
|
|
103
|
-
return document.createElement(
|
|
102
|
+
function W(n) {
|
|
103
|
+
return document.createElement(n);
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
return document.createElementNS("http://www.w3.org/2000/svg",
|
|
105
|
+
function de(n) {
|
|
106
|
+
return document.createElementNS("http://www.w3.org/2000/svg", n);
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
return document.createTextNode(
|
|
108
|
+
function Ee(n) {
|
|
109
|
+
return document.createTextNode(n);
|
|
110
110
|
}
|
|
111
111
|
function ie() {
|
|
112
|
-
return
|
|
112
|
+
return Ee(" ");
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
return
|
|
114
|
+
function Rn() {
|
|
115
|
+
return Ee("");
|
|
116
116
|
}
|
|
117
|
-
function ee(
|
|
118
|
-
return
|
|
117
|
+
function ee(n, e, t, i) {
|
|
118
|
+
return n.addEventListener(e, t, i), () => n.removeEventListener(e, t, i);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Tn(n) {
|
|
121
121
|
return function(e) {
|
|
122
|
-
return e.preventDefault(),
|
|
122
|
+
return e.preventDefault(), n.call(this, e);
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
function p(
|
|
126
|
-
t == null ?
|
|
125
|
+
function p(n, e, t) {
|
|
126
|
+
t == null ? n.removeAttribute(e) : n.getAttribute(e) !== t && n.setAttribute(e, t);
|
|
127
127
|
}
|
|
128
|
-
function
|
|
129
|
-
return Array.from(
|
|
128
|
+
function In(n) {
|
|
129
|
+
return Array.from(n.childNodes);
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
e = "" + e,
|
|
131
|
+
function Qe(n, e) {
|
|
132
|
+
e = "" + e, n.data !== e && (n.data = /** @type {string} */
|
|
133
133
|
e);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
|
|
135
|
+
function ni(n, e) {
|
|
136
|
+
n.value = e ?? "";
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
|
|
138
|
+
function be(n, e, t) {
|
|
139
|
+
n.classList.toggle(e, !!t);
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
return new CustomEvent(
|
|
141
|
+
function On(n, e, { bubbles: t = !1, cancelable: i = !1 } = {}) {
|
|
142
|
+
return new CustomEvent(n, { detail: e, bubbles: t, cancelable: i });
|
|
143
143
|
}
|
|
144
|
-
let
|
|
145
|
-
function
|
|
146
|
-
|
|
144
|
+
let Ve;
|
|
145
|
+
function qe(n) {
|
|
146
|
+
Ve = n;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
if (!
|
|
150
|
-
return
|
|
148
|
+
function Fi() {
|
|
149
|
+
if (!Ve) throw new Error("Function called outside component initialization");
|
|
150
|
+
return Ve;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
153
|
-
|
|
152
|
+
function Wn(n) {
|
|
153
|
+
Fi().$$.on_destroy.push(n);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
const
|
|
157
|
-
return (e, t, { cancelable:
|
|
158
|
-
const r =
|
|
155
|
+
function An() {
|
|
156
|
+
const n = Fi();
|
|
157
|
+
return (e, t, { cancelable: i = !1 } = {}) => {
|
|
158
|
+
const r = n.$$.callbacks[e];
|
|
159
159
|
if (r) {
|
|
160
|
-
const o =
|
|
160
|
+
const o = On(
|
|
161
161
|
/** @type {string} */
|
|
162
162
|
e,
|
|
163
163
|
t,
|
|
164
|
-
{ cancelable:
|
|
164
|
+
{ cancelable: i }
|
|
165
165
|
);
|
|
166
166
|
return r.slice().forEach((l) => {
|
|
167
|
-
l.call(
|
|
167
|
+
l.call(n, o);
|
|
168
168
|
}), !o.defaultPrevented;
|
|
169
169
|
}
|
|
170
170
|
return !0;
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
const t =
|
|
175
|
-
t && t.slice().forEach((
|
|
173
|
+
function ri(n, e) {
|
|
174
|
+
const t = n.$$.callbacks[e.type];
|
|
175
|
+
t && t.slice().forEach((i) => i.call(this, e));
|
|
176
176
|
}
|
|
177
|
-
const
|
|
178
|
-
let
|
|
179
|
-
const
|
|
180
|
-
let
|
|
181
|
-
function
|
|
182
|
-
|
|
177
|
+
const Fe = [], Nt = [];
|
|
178
|
+
let Be = [];
|
|
179
|
+
const oi = [], zn = /* @__PURE__ */ Promise.resolve();
|
|
180
|
+
let Pt = !1;
|
|
181
|
+
function Fn() {
|
|
182
|
+
Pt || (Pt = !0, zn.then(Bi));
|
|
183
183
|
}
|
|
184
|
-
function
|
|
185
|
-
|
|
184
|
+
function Rt(n) {
|
|
185
|
+
Be.push(n);
|
|
186
186
|
}
|
|
187
|
-
const
|
|
188
|
-
let
|
|
189
|
-
function
|
|
190
|
-
if (
|
|
187
|
+
const Mt = /* @__PURE__ */ new Set();
|
|
188
|
+
let Ae = 0;
|
|
189
|
+
function Bi() {
|
|
190
|
+
if (Ae !== 0)
|
|
191
191
|
return;
|
|
192
|
-
const
|
|
192
|
+
const n = Ve;
|
|
193
193
|
do {
|
|
194
194
|
try {
|
|
195
|
-
for (;
|
|
196
|
-
const e =
|
|
197
|
-
|
|
195
|
+
for (; Ae < Fe.length; ) {
|
|
196
|
+
const e = Fe[Ae];
|
|
197
|
+
Ae++, qe(e), Bn(e.$$);
|
|
198
198
|
}
|
|
199
199
|
} catch (e) {
|
|
200
|
-
throw
|
|
200
|
+
throw Fe.length = 0, Ae = 0, e;
|
|
201
201
|
}
|
|
202
|
-
for (
|
|
203
|
-
for (let e = 0; e <
|
|
204
|
-
const t =
|
|
205
|
-
|
|
202
|
+
for (qe(null), Fe.length = 0, Ae = 0; Nt.length; ) Nt.pop()();
|
|
203
|
+
for (let e = 0; e < Be.length; e += 1) {
|
|
204
|
+
const t = Be[e];
|
|
205
|
+
Mt.has(t) || (Mt.add(t), t());
|
|
206
206
|
}
|
|
207
|
-
|
|
208
|
-
} while (
|
|
209
|
-
for (;
|
|
210
|
-
|
|
211
|
-
|
|
207
|
+
Be.length = 0;
|
|
208
|
+
} while (Fe.length);
|
|
209
|
+
for (; oi.length; )
|
|
210
|
+
oi.pop()();
|
|
211
|
+
Pt = !1, Mt.clear(), qe(n);
|
|
212
212
|
}
|
|
213
|
-
function
|
|
214
|
-
if (
|
|
215
|
-
|
|
216
|
-
const e =
|
|
217
|
-
|
|
213
|
+
function Bn(n) {
|
|
214
|
+
if (n.fragment !== null) {
|
|
215
|
+
n.update(), ye(n.before_update);
|
|
216
|
+
const e = n.dirty;
|
|
217
|
+
n.dirty = [-1], n.fragment && n.fragment.p(n.ctx, e), n.after_update.forEach(Rt);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function Dn(n) {
|
|
221
221
|
const e = [], t = [];
|
|
222
|
-
|
|
222
|
+
Be.forEach((i) => n.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), Be = e;
|
|
223
223
|
}
|
|
224
|
-
const
|
|
225
|
-
let
|
|
226
|
-
function
|
|
227
|
-
|
|
224
|
+
const nt = /* @__PURE__ */ new Set();
|
|
225
|
+
let Ce;
|
|
226
|
+
function rt() {
|
|
227
|
+
Ce = {
|
|
228
228
|
r: 0,
|
|
229
229
|
c: [],
|
|
230
|
-
p:
|
|
230
|
+
p: Ce
|
|
231
231
|
// parent group
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
|
-
function
|
|
235
|
-
|
|
234
|
+
function ot() {
|
|
235
|
+
Ce.r || ye(Ce.c), Ce = Ce.p;
|
|
236
236
|
}
|
|
237
|
-
function G(
|
|
238
|
-
|
|
237
|
+
function G(n, e) {
|
|
238
|
+
n && n.i && (nt.delete(n), n.i(e));
|
|
239
239
|
}
|
|
240
|
-
function Y(
|
|
241
|
-
if (
|
|
242
|
-
if (
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
}),
|
|
246
|
-
} else
|
|
240
|
+
function Y(n, e, t, i) {
|
|
241
|
+
if (n && n.o) {
|
|
242
|
+
if (nt.has(n)) return;
|
|
243
|
+
nt.add(n), Ce.c.push(() => {
|
|
244
|
+
nt.delete(n), i && (t && n.d(1), i());
|
|
245
|
+
}), n.o(e);
|
|
246
|
+
} else i && i();
|
|
247
247
|
}
|
|
248
|
-
function
|
|
249
|
-
return (
|
|
248
|
+
function si(n) {
|
|
249
|
+
return (n == null ? void 0 : n.length) !== void 0 ? n : Array.from(n);
|
|
250
250
|
}
|
|
251
|
-
function
|
|
252
|
-
Y(
|
|
253
|
-
e.delete(
|
|
251
|
+
function Un(n, e) {
|
|
252
|
+
Y(n, 1, 1, () => {
|
|
253
|
+
e.delete(n.key);
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
|
-
function
|
|
257
|
-
let f =
|
|
256
|
+
function Gn(n, e, t, i, r, o, l, s, c, u, d, a) {
|
|
257
|
+
let f = n.length, h = o.length, m = f;
|
|
258
258
|
const y = {};
|
|
259
|
-
for (;
|
|
259
|
+
for (; m--; ) y[n[m].key] = m;
|
|
260
260
|
const b = [], w = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new Map(), S = [];
|
|
261
|
-
for (
|
|
262
|
-
const v = a(r, o,
|
|
261
|
+
for (m = h; m--; ) {
|
|
262
|
+
const v = a(r, o, m), _ = t(v);
|
|
263
263
|
let k = l.get(_);
|
|
264
|
-
k ? S.push(() => k.p(v, e)) : (k = u(_, v), k.c()), w.set(_, b[
|
|
264
|
+
k ? S.push(() => k.p(v, e)) : (k = u(_, v), k.c()), w.set(_, b[m] = k), _ in y && L.set(_, Math.abs(m - y[_]));
|
|
265
265
|
}
|
|
266
266
|
const E = /* @__PURE__ */ new Set(), M = /* @__PURE__ */ new Set();
|
|
267
267
|
function C(v) {
|
|
268
268
|
G(v, 1), v.m(s, d), l.set(v.key, v), d = v.first, h--;
|
|
269
269
|
}
|
|
270
270
|
for (; f && h; ) {
|
|
271
|
-
const v = b[h - 1], _ =
|
|
271
|
+
const v = b[h - 1], _ = n[f - 1], k = v.key, I = _.key;
|
|
272
272
|
v === _ ? (d = v.first, f--, h--) : w.has(I) ? !l.has(k) || E.has(k) ? C(v) : M.has(I) ? f-- : L.get(k) > L.get(I) ? (M.add(k), C(v)) : (E.add(I), f--) : (c(_, l), f--);
|
|
273
273
|
}
|
|
274
274
|
for (; f--; ) {
|
|
275
|
-
const v =
|
|
275
|
+
const v = n[f];
|
|
276
276
|
w.has(v.key) || c(v, l);
|
|
277
277
|
}
|
|
278
278
|
for (; h; ) C(b[h - 1]);
|
|
279
|
-
return
|
|
279
|
+
return ye(S), b;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
|
|
281
|
+
function Le(n) {
|
|
282
|
+
n && n.c();
|
|
283
283
|
}
|
|
284
|
-
function ge(
|
|
285
|
-
const { fragment:
|
|
286
|
-
|
|
287
|
-
const o =
|
|
288
|
-
|
|
289
|
-
}), r.forEach(
|
|
284
|
+
function ge(n, e, t) {
|
|
285
|
+
const { fragment: i, after_update: r } = n.$$;
|
|
286
|
+
i && i.m(e, t), Rt(() => {
|
|
287
|
+
const o = n.$$.on_mount.map(Wi).filter(Ai);
|
|
288
|
+
n.$$.on_destroy ? n.$$.on_destroy.push(...o) : ye(o), n.$$.on_mount = [];
|
|
289
|
+
}), r.forEach(Rt);
|
|
290
290
|
}
|
|
291
|
-
function
|
|
292
|
-
const t =
|
|
293
|
-
t.fragment !== null && (
|
|
291
|
+
function me(n, e) {
|
|
292
|
+
const t = n.$$;
|
|
293
|
+
t.fragment !== null && (Dn(t.after_update), ye(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
294
294
|
}
|
|
295
|
-
function
|
|
296
|
-
|
|
295
|
+
function jn(n, e) {
|
|
296
|
+
n.$$.dirty[0] === -1 && (Fe.push(n), Fn(), n.$$.dirty.fill(0)), n.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
297
297
|
}
|
|
298
|
-
function
|
|
299
|
-
const c =
|
|
300
|
-
|
|
301
|
-
const u =
|
|
298
|
+
function Re(n, e, t, i, r, o, l = null, s = [-1]) {
|
|
299
|
+
const c = Ve;
|
|
300
|
+
qe(n);
|
|
301
|
+
const u = n.$$ = {
|
|
302
302
|
fragment: null,
|
|
303
303
|
ctx: [],
|
|
304
304
|
// state
|
|
305
305
|
props: o,
|
|
306
306
|
update: D,
|
|
307
307
|
not_equal: r,
|
|
308
|
-
bound:
|
|
308
|
+
bound: ti(),
|
|
309
309
|
// lifecycle
|
|
310
310
|
on_mount: [],
|
|
311
311
|
on_destroy: [],
|
|
@@ -314,27 +314,27 @@ function Ie(i, e, t, n, r, o, l = null, s = [-1]) {
|
|
|
314
314
|
after_update: [],
|
|
315
315
|
context: new Map(e.context || (c ? c.$$.context : [])),
|
|
316
316
|
// everything else
|
|
317
|
-
callbacks:
|
|
317
|
+
callbacks: ti(),
|
|
318
318
|
dirty: s,
|
|
319
319
|
skip_bound: !1,
|
|
320
320
|
root: e.target || c.$$.root
|
|
321
321
|
};
|
|
322
322
|
l && l(u.root);
|
|
323
323
|
let d = !1;
|
|
324
|
-
if (u.ctx = t ? t(
|
|
325
|
-
const
|
|
326
|
-
return u.ctx && r(u.ctx[a], u.ctx[a] =
|
|
327
|
-
}) : [], u.update(), d = !0,
|
|
324
|
+
if (u.ctx = t ? t(n, e.props || {}, (a, f, ...h) => {
|
|
325
|
+
const m = h.length ? h[0] : f;
|
|
326
|
+
return u.ctx && r(u.ctx[a], u.ctx[a] = m) && (!u.skip_bound && u.bound[a] && u.bound[a](m), d && jn(n, a)), f;
|
|
327
|
+
}) : [], u.update(), d = !0, ye(u.before_update), u.fragment = i ? i(u.ctx) : !1, e.target) {
|
|
328
328
|
if (e.hydrate) {
|
|
329
|
-
const a =
|
|
329
|
+
const a = In(e.target);
|
|
330
330
|
u.fragment && u.fragment.l(a), a.forEach(F);
|
|
331
331
|
} else
|
|
332
332
|
u.fragment && u.fragment.c();
|
|
333
|
-
e.intro && G(
|
|
333
|
+
e.intro && G(n.$$.fragment), ge(n, e.target, e.anchor), Bi();
|
|
334
334
|
}
|
|
335
|
-
|
|
335
|
+
qe(c);
|
|
336
336
|
}
|
|
337
|
-
class
|
|
337
|
+
class Te {
|
|
338
338
|
constructor() {
|
|
339
339
|
/**
|
|
340
340
|
* ### PRIVATE API
|
|
@@ -343,7 +343,7 @@ class Oe {
|
|
|
343
343
|
*
|
|
344
344
|
* @type {any}
|
|
345
345
|
*/
|
|
346
|
-
|
|
346
|
+
ne(this, "$$");
|
|
347
347
|
/**
|
|
348
348
|
* ### PRIVATE API
|
|
349
349
|
*
|
|
@@ -351,11 +351,11 @@ class Oe {
|
|
|
351
351
|
*
|
|
352
352
|
* @type {any}
|
|
353
353
|
*/
|
|
354
|
-
|
|
354
|
+
ne(this, "$$set");
|
|
355
355
|
}
|
|
356
356
|
/** @returns {void} */
|
|
357
357
|
$destroy() {
|
|
358
|
-
|
|
358
|
+
me(this, 1), this.$destroy = D;
|
|
359
359
|
}
|
|
360
360
|
/**
|
|
361
361
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -364,12 +364,12 @@ class Oe {
|
|
|
364
364
|
* @returns {() => void}
|
|
365
365
|
*/
|
|
366
366
|
$on(e, t) {
|
|
367
|
-
if (!
|
|
367
|
+
if (!Ai(t))
|
|
368
368
|
return D;
|
|
369
|
-
const
|
|
370
|
-
return
|
|
371
|
-
const r =
|
|
372
|
-
r !== -1 &&
|
|
369
|
+
const i = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
370
|
+
return i.push(t), () => {
|
|
371
|
+
const r = i.indexOf(t);
|
|
372
|
+
r !== -1 && i.splice(r, 1);
|
|
373
373
|
};
|
|
374
374
|
}
|
|
375
375
|
/**
|
|
@@ -377,291 +377,291 @@ class Oe {
|
|
|
377
377
|
* @returns {void}
|
|
378
378
|
*/
|
|
379
379
|
$set(e) {
|
|
380
|
-
this.$$set && !
|
|
380
|
+
this.$$set && !Mn(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
|
-
const
|
|
384
|
-
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
385
|
-
function
|
|
383
|
+
const qn = "4";
|
|
384
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(qn);
|
|
385
|
+
function Qn(n) {
|
|
386
386
|
let e, t;
|
|
387
387
|
return {
|
|
388
388
|
c() {
|
|
389
|
-
e =
|
|
389
|
+
e = de("svg"), t = de("path"), p(t, "d", "M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"), p(e, "viewBox", "0 0 14 14"), p(e, "width", "13"), p(e, "height", "13"), p(e, "class", "svelte-en2qvf");
|
|
390
390
|
},
|
|
391
|
-
m(
|
|
392
|
-
U(
|
|
391
|
+
m(i, r) {
|
|
392
|
+
U(i, e, r), T(e, t);
|
|
393
393
|
},
|
|
394
394
|
p: D,
|
|
395
395
|
i: D,
|
|
396
396
|
o: D,
|
|
397
|
-
d(
|
|
398
|
-
|
|
397
|
+
d(i) {
|
|
398
|
+
i && F(e);
|
|
399
399
|
}
|
|
400
400
|
};
|
|
401
401
|
}
|
|
402
|
-
class
|
|
402
|
+
class Di extends Te {
|
|
403
403
|
constructor(e) {
|
|
404
|
-
super(),
|
|
404
|
+
super(), Re(this, e, null, Qn, Pe, {});
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function Vn(n) {
|
|
408
408
|
let e, t;
|
|
409
409
|
return {
|
|
410
410
|
c() {
|
|
411
|
-
e =
|
|
411
|
+
e = de("svg"), t = de("path"), p(t, "d", "M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"), p(e, "viewBox", "0 0 30 30"), p(e, "fill", "none"), p(e, "xmlns", "http://www.w3.org/2000/svg"), p(e, "class", "svelte-d2loi5");
|
|
412
412
|
},
|
|
413
|
-
m(
|
|
414
|
-
U(
|
|
413
|
+
m(i, r) {
|
|
414
|
+
U(i, e, r), T(e, t);
|
|
415
415
|
},
|
|
416
416
|
p: D,
|
|
417
417
|
i: D,
|
|
418
418
|
o: D,
|
|
419
|
-
d(
|
|
420
|
-
|
|
419
|
+
d(i) {
|
|
420
|
+
i && F(e);
|
|
421
421
|
}
|
|
422
422
|
};
|
|
423
423
|
}
|
|
424
|
-
class
|
|
424
|
+
class Ui extends Te {
|
|
425
425
|
constructor(e) {
|
|
426
|
-
super(),
|
|
426
|
+
super(), Re(this, e, null, Vn, Pe, {});
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function Zn(n) {
|
|
430
430
|
let e, t;
|
|
431
431
|
return {
|
|
432
432
|
c() {
|
|
433
433
|
e = W("img"), K(e.src, t = /*iconsBaseUrl*/
|
|
434
|
-
|
|
434
|
+
n[3] + "area.svg") || p(e, "src", t), p(
|
|
435
435
|
e,
|
|
436
436
|
"alt",
|
|
437
437
|
/*placeType*/
|
|
438
|
-
|
|
438
|
+
n[6]
|
|
439
439
|
), p(e, "class", "svelte-ltkwvy");
|
|
440
440
|
},
|
|
441
|
-
m(
|
|
442
|
-
U(
|
|
441
|
+
m(i, r) {
|
|
442
|
+
U(i, e, r);
|
|
443
443
|
},
|
|
444
|
-
p(
|
|
444
|
+
p(i, r) {
|
|
445
445
|
r & /*iconsBaseUrl*/
|
|
446
446
|
8 && !K(e.src, t = /*iconsBaseUrl*/
|
|
447
|
-
|
|
447
|
+
i[3] + "area.svg") && p(e, "src", t), r & /*placeType*/
|
|
448
448
|
64 && p(
|
|
449
449
|
e,
|
|
450
450
|
"alt",
|
|
451
451
|
/*placeType*/
|
|
452
|
-
|
|
452
|
+
i[6]
|
|
453
453
|
);
|
|
454
454
|
},
|
|
455
|
-
d(
|
|
456
|
-
|
|
455
|
+
d(i) {
|
|
456
|
+
i && F(e);
|
|
457
457
|
}
|
|
458
458
|
};
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function Hn(n) {
|
|
461
461
|
let e, t;
|
|
462
462
|
return {
|
|
463
463
|
c() {
|
|
464
464
|
e = W("img"), K(e.src, t = /*iconsBaseUrl*/
|
|
465
|
-
|
|
465
|
+
n[3] + "reverse.svg") || p(e, "src", t), p(
|
|
466
466
|
e,
|
|
467
467
|
"alt",
|
|
468
468
|
/*placeType*/
|
|
469
|
-
|
|
469
|
+
n[6]
|
|
470
470
|
), p(e, "class", "svelte-ltkwvy");
|
|
471
471
|
},
|
|
472
|
-
m(
|
|
473
|
-
U(
|
|
472
|
+
m(i, r) {
|
|
473
|
+
U(i, e, r);
|
|
474
474
|
},
|
|
475
|
-
p(
|
|
475
|
+
p(i, r) {
|
|
476
476
|
r & /*iconsBaseUrl*/
|
|
477
477
|
8 && !K(e.src, t = /*iconsBaseUrl*/
|
|
478
|
-
|
|
478
|
+
i[3] + "reverse.svg") && p(e, "src", t), r & /*placeType*/
|
|
479
479
|
64 && p(
|
|
480
480
|
e,
|
|
481
481
|
"alt",
|
|
482
482
|
/*placeType*/
|
|
483
|
-
|
|
483
|
+
i[6]
|
|
484
484
|
);
|
|
485
485
|
},
|
|
486
|
-
d(
|
|
487
|
-
|
|
486
|
+
d(i) {
|
|
487
|
+
i && F(e);
|
|
488
488
|
}
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function Yn(n) {
|
|
492
492
|
let e, t;
|
|
493
493
|
return {
|
|
494
494
|
c() {
|
|
495
495
|
e = W("img"), K(e.src, t = /*iconsBaseUrl*/
|
|
496
|
-
|
|
496
|
+
n[3] + "poi.svg") || p(e, "src", t), p(
|
|
497
497
|
e,
|
|
498
498
|
"alt",
|
|
499
499
|
/*placeType*/
|
|
500
|
-
|
|
500
|
+
n[6]
|
|
501
501
|
), p(e, "class", "svelte-ltkwvy");
|
|
502
502
|
},
|
|
503
|
-
m(
|
|
504
|
-
U(
|
|
503
|
+
m(i, r) {
|
|
504
|
+
U(i, e, r);
|
|
505
505
|
},
|
|
506
|
-
p(
|
|
506
|
+
p(i, r) {
|
|
507
507
|
r & /*iconsBaseUrl*/
|
|
508
508
|
8 && !K(e.src, t = /*iconsBaseUrl*/
|
|
509
|
-
|
|
509
|
+
i[3] + "poi.svg") && p(e, "src", t), r & /*placeType*/
|
|
510
510
|
64 && p(
|
|
511
511
|
e,
|
|
512
512
|
"alt",
|
|
513
513
|
/*placeType*/
|
|
514
|
-
|
|
514
|
+
i[6]
|
|
515
515
|
);
|
|
516
516
|
},
|
|
517
|
-
d(
|
|
518
|
-
|
|
517
|
+
d(i) {
|
|
518
|
+
i && F(e);
|
|
519
519
|
}
|
|
520
520
|
};
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function Xn(n) {
|
|
523
523
|
let e, t;
|
|
524
524
|
return {
|
|
525
525
|
c() {
|
|
526
526
|
e = W("img"), K(e.src, t = /*iconsBaseUrl*/
|
|
527
|
-
|
|
527
|
+
n[3] + "postal_code.svg") || p(e, "src", t), p(
|
|
528
528
|
e,
|
|
529
529
|
"alt",
|
|
530
530
|
/*placeType*/
|
|
531
|
-
|
|
531
|
+
n[6]
|
|
532
532
|
), p(e, "class", "svelte-ltkwvy");
|
|
533
533
|
},
|
|
534
|
-
m(
|
|
535
|
-
U(
|
|
534
|
+
m(i, r) {
|
|
535
|
+
U(i, e, r);
|
|
536
536
|
},
|
|
537
|
-
p(
|
|
537
|
+
p(i, r) {
|
|
538
538
|
r & /*iconsBaseUrl*/
|
|
539
539
|
8 && !K(e.src, t = /*iconsBaseUrl*/
|
|
540
|
-
|
|
540
|
+
i[3] + "postal_code.svg") && p(e, "src", t), r & /*placeType*/
|
|
541
541
|
64 && p(
|
|
542
542
|
e,
|
|
543
543
|
"alt",
|
|
544
544
|
/*placeType*/
|
|
545
|
-
|
|
545
|
+
i[6]
|
|
546
546
|
);
|
|
547
547
|
},
|
|
548
|
-
d(
|
|
549
|
-
|
|
548
|
+
d(i) {
|
|
549
|
+
i && F(e);
|
|
550
550
|
}
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function Kn(n) {
|
|
554
554
|
let e, t;
|
|
555
555
|
return {
|
|
556
556
|
c() {
|
|
557
557
|
e = W("img"), K(e.src, t = /*iconsBaseUrl*/
|
|
558
|
-
|
|
558
|
+
n[3] + "street.svg") || p(e, "src", t), p(
|
|
559
559
|
e,
|
|
560
560
|
"alt",
|
|
561
561
|
/*placeType*/
|
|
562
|
-
|
|
562
|
+
n[6]
|
|
563
563
|
), p(e, "class", "svelte-ltkwvy");
|
|
564
564
|
},
|
|
565
|
-
m(
|
|
566
|
-
U(
|
|
565
|
+
m(i, r) {
|
|
566
|
+
U(i, e, r);
|
|
567
567
|
},
|
|
568
|
-
p(
|
|
568
|
+
p(i, r) {
|
|
569
569
|
r & /*iconsBaseUrl*/
|
|
570
570
|
8 && !K(e.src, t = /*iconsBaseUrl*/
|
|
571
|
-
|
|
571
|
+
i[3] + "street.svg") && p(e, "src", t), r & /*placeType*/
|
|
572
572
|
64 && p(
|
|
573
573
|
e,
|
|
574
574
|
"alt",
|
|
575
575
|
/*placeType*/
|
|
576
|
-
|
|
576
|
+
i[6]
|
|
577
577
|
);
|
|
578
578
|
},
|
|
579
|
-
d(
|
|
580
|
-
|
|
579
|
+
d(i) {
|
|
580
|
+
i && F(e);
|
|
581
581
|
}
|
|
582
582
|
};
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function Jn(n) {
|
|
585
585
|
let e, t;
|
|
586
586
|
return {
|
|
587
587
|
c() {
|
|
588
588
|
e = W("img"), K(e.src, t = /*iconsBaseUrl*/
|
|
589
|
-
|
|
589
|
+
n[3] + "road.svg") || p(e, "src", t), p(
|
|
590
590
|
e,
|
|
591
591
|
"alt",
|
|
592
592
|
/*placeType*/
|
|
593
|
-
|
|
593
|
+
n[6]
|
|
594
594
|
), p(e, "class", "svelte-ltkwvy");
|
|
595
595
|
},
|
|
596
|
-
m(
|
|
597
|
-
U(
|
|
596
|
+
m(i, r) {
|
|
597
|
+
U(i, e, r);
|
|
598
598
|
},
|
|
599
|
-
p(
|
|
599
|
+
p(i, r) {
|
|
600
600
|
r & /*iconsBaseUrl*/
|
|
601
601
|
8 && !K(e.src, t = /*iconsBaseUrl*/
|
|
602
|
-
|
|
602
|
+
i[3] + "road.svg") && p(e, "src", t), r & /*placeType*/
|
|
603
603
|
64 && p(
|
|
604
604
|
e,
|
|
605
605
|
"alt",
|
|
606
606
|
/*placeType*/
|
|
607
|
-
|
|
607
|
+
i[6]
|
|
608
608
|
);
|
|
609
609
|
},
|
|
610
|
-
d(
|
|
611
|
-
|
|
610
|
+
d(i) {
|
|
611
|
+
i && F(e);
|
|
612
612
|
}
|
|
613
613
|
};
|
|
614
614
|
}
|
|
615
|
-
function
|
|
615
|
+
function $n(n) {
|
|
616
616
|
let e, t;
|
|
617
617
|
return {
|
|
618
618
|
c() {
|
|
619
619
|
e = W("img"), K(e.src, t = /*iconsBaseUrl*/
|
|
620
|
-
|
|
620
|
+
n[3] + "housenumber.svg") || p(e, "src", t), p(
|
|
621
621
|
e,
|
|
622
622
|
"alt",
|
|
623
623
|
/*placeType*/
|
|
624
|
-
|
|
624
|
+
n[6]
|
|
625
625
|
), p(e, "class", "svelte-ltkwvy");
|
|
626
626
|
},
|
|
627
|
-
m(
|
|
628
|
-
U(
|
|
627
|
+
m(i, r) {
|
|
628
|
+
U(i, e, r);
|
|
629
629
|
},
|
|
630
|
-
p(
|
|
630
|
+
p(i, r) {
|
|
631
631
|
r & /*iconsBaseUrl*/
|
|
632
632
|
8 && !K(e.src, t = /*iconsBaseUrl*/
|
|
633
|
-
|
|
633
|
+
i[3] + "housenumber.svg") && p(e, "src", t), r & /*placeType*/
|
|
634
634
|
64 && p(
|
|
635
635
|
e,
|
|
636
636
|
"alt",
|
|
637
637
|
/*placeType*/
|
|
638
|
-
|
|
638
|
+
i[6]
|
|
639
639
|
);
|
|
640
640
|
},
|
|
641
|
-
d(
|
|
642
|
-
|
|
641
|
+
d(i) {
|
|
642
|
+
i && F(e);
|
|
643
643
|
}
|
|
644
644
|
};
|
|
645
645
|
}
|
|
646
|
-
function
|
|
647
|
-
let e, t,
|
|
646
|
+
function er(n) {
|
|
647
|
+
let e, t, i, r;
|
|
648
648
|
return {
|
|
649
649
|
c() {
|
|
650
650
|
e = W("img"), K(e.src, t = /*imageUrl*/
|
|
651
|
-
|
|
651
|
+
n[5]) || p(e, "src", t), p(
|
|
652
652
|
e,
|
|
653
653
|
"alt",
|
|
654
654
|
/*category*/
|
|
655
|
-
|
|
655
|
+
n[4]
|
|
656
656
|
), p(e, "class", "svelte-ltkwvy");
|
|
657
657
|
},
|
|
658
658
|
m(o, l) {
|
|
659
|
-
U(o, e, l),
|
|
659
|
+
U(o, e, l), i || (r = ee(
|
|
660
660
|
e,
|
|
661
661
|
"error",
|
|
662
662
|
/*error_handler*/
|
|
663
|
-
|
|
664
|
-
),
|
|
663
|
+
n[14]
|
|
664
|
+
), i = !0);
|
|
665
665
|
},
|
|
666
666
|
p(o, l) {
|
|
667
667
|
l & /*imageUrl*/
|
|
@@ -675,109 +675,109 @@ function rr(i) {
|
|
|
675
675
|
);
|
|
676
676
|
},
|
|
677
677
|
d(o) {
|
|
678
|
-
o && F(e),
|
|
678
|
+
o && F(e), i = !1, r();
|
|
679
679
|
}
|
|
680
680
|
};
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function li(n) {
|
|
683
683
|
let e, t;
|
|
684
684
|
return {
|
|
685
685
|
c() {
|
|
686
|
-
e = W("span"), t =
|
|
686
|
+
e = W("span"), t = Ee(
|
|
687
687
|
/*placeType*/
|
|
688
|
-
|
|
688
|
+
n[6]
|
|
689
689
|
), p(e, "class", "secondary svelte-ltkwvy");
|
|
690
690
|
},
|
|
691
|
-
m(
|
|
692
|
-
U(
|
|
691
|
+
m(i, r) {
|
|
692
|
+
U(i, e, r), T(e, t);
|
|
693
693
|
},
|
|
694
|
-
p(
|
|
694
|
+
p(i, r) {
|
|
695
695
|
r & /*placeType*/
|
|
696
|
-
64 &&
|
|
696
|
+
64 && Qe(
|
|
697
697
|
t,
|
|
698
698
|
/*placeType*/
|
|
699
|
-
|
|
699
|
+
i[6]
|
|
700
700
|
);
|
|
701
701
|
},
|
|
702
|
-
d(
|
|
703
|
-
|
|
702
|
+
d(i) {
|
|
703
|
+
i && F(e);
|
|
704
704
|
}
|
|
705
705
|
};
|
|
706
706
|
}
|
|
707
|
-
function
|
|
708
|
-
let e, t,
|
|
707
|
+
function tr(n) {
|
|
708
|
+
let e, t, i, r, o, l, s, c, u, d = (
|
|
709
709
|
/*isReverse*/
|
|
710
|
-
(
|
|
710
|
+
(n[7] ? (
|
|
711
711
|
/*feature*/
|
|
712
|
-
|
|
712
|
+
n[0].place_name
|
|
713
713
|
) : (
|
|
714
714
|
/*feature*/
|
|
715
|
-
|
|
715
|
+
n[0].place_name.replace(/,.*/, "")
|
|
716
716
|
)) + ""
|
|
717
717
|
), a, f, h = (
|
|
718
718
|
/*showPlaceType*/
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
),
|
|
719
|
+
n[2] === "always" || /*showPlaceType*/
|
|
720
|
+
n[2] !== "never" && !/*feature*/
|
|
721
|
+
n[0].address && !/*feature*/
|
|
722
|
+
n[0].id.startsWith("road.") && !/*feature*/
|
|
723
|
+
n[0].id.startsWith("address.") && !/*feature*/
|
|
724
|
+
n[0].id.startsWith("postal_code.") && (!/*feature*/
|
|
725
|
+
n[0].id.startsWith("poi.") || !/*imageUrl*/
|
|
726
|
+
n[5]) && !/*isReverse*/
|
|
727
|
+
n[7]
|
|
728
|
+
), m, y, b = (
|
|
729
729
|
/*isReverse*/
|
|
730
|
-
(
|
|
730
|
+
(n[7] ? "" : (
|
|
731
731
|
/*feature*/
|
|
732
|
-
|
|
732
|
+
n[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
733
733
|
)) + ""
|
|
734
734
|
), w, L, S;
|
|
735
735
|
function E(_, k) {
|
|
736
736
|
return k & /*feature*/
|
|
737
737
|
1 && (t = null), k & /*feature*/
|
|
738
|
-
1 && (
|
|
738
|
+
1 && (i = null), k & /*feature*/
|
|
739
739
|
1 && (r = null), k & /*feature*/
|
|
740
740
|
1 && (o = null), /*imageUrl*/
|
|
741
|
-
_[5] ?
|
|
741
|
+
_[5] ? er : (
|
|
742
742
|
/*feature*/
|
|
743
|
-
_[0].address ?
|
|
744
|
-
_[0].id.startsWith("road.")), t ?
|
|
745
|
-
_[0].id.startsWith("address.")),
|
|
746
|
-
_[0].id.startsWith("postal_code.")), r ?
|
|
747
|
-
_[0].id.startsWith("poi.")), o ?
|
|
743
|
+
_[0].address ? $n : (t == null && (t = !!/*feature*/
|
|
744
|
+
_[0].id.startsWith("road.")), t ? Jn : (i == null && (i = !!/*feature*/
|
|
745
|
+
_[0].id.startsWith("address.")), i ? Kn : (r == null && (r = !!/*feature*/
|
|
746
|
+
_[0].id.startsWith("postal_code.")), r ? Xn : (o == null && (o = !!/*feature*/
|
|
747
|
+
_[0].id.startsWith("poi.")), o ? Yn : (
|
|
748
748
|
/*isReverse*/
|
|
749
|
-
_[7] ?
|
|
749
|
+
_[7] ? Hn : Zn
|
|
750
750
|
)))))
|
|
751
751
|
);
|
|
752
752
|
}
|
|
753
|
-
let M = E(
|
|
753
|
+
let M = E(n, -1), C = M(n), v = h && li(n);
|
|
754
754
|
return {
|
|
755
755
|
c() {
|
|
756
|
-
e = W("li"), C.c(), l = ie(), s = W("span"), c = W("span"), u = W("span"), a =
|
|
756
|
+
e = W("li"), C.c(), l = ie(), s = W("span"), c = W("span"), u = W("span"), a = Ee(d), f = ie(), v && v.c(), m = ie(), y = W("span"), w = Ee(b), p(u, "class", "primary svelte-ltkwvy"), p(c, "class", "svelte-ltkwvy"), p(y, "class", "line2 svelte-ltkwvy"), p(s, "class", "texts svelte-ltkwvy"), p(e, "tabindex", "0"), p(
|
|
757
757
|
e,
|
|
758
758
|
"data-selected",
|
|
759
759
|
/*selected*/
|
|
760
|
-
|
|
761
|
-
), p(e, "class", "svelte-ltkwvy"),
|
|
760
|
+
n[1]
|
|
761
|
+
), p(e, "class", "svelte-ltkwvy"), be(
|
|
762
762
|
e,
|
|
763
763
|
"selected",
|
|
764
764
|
/*selected*/
|
|
765
|
-
|
|
765
|
+
n[1]
|
|
766
766
|
);
|
|
767
767
|
},
|
|
768
768
|
m(_, k) {
|
|
769
|
-
U(_, e, k), C.m(e, null),
|
|
769
|
+
U(_, e, k), C.m(e, null), T(e, l), T(e, s), T(s, c), T(c, u), T(u, a), T(c, f), v && v.m(c, null), T(s, m), T(s, y), T(y, w), L || (S = [
|
|
770
770
|
ee(
|
|
771
771
|
e,
|
|
772
772
|
"mouseenter",
|
|
773
773
|
/*mouseenter_handler*/
|
|
774
|
-
|
|
774
|
+
n[12]
|
|
775
775
|
),
|
|
776
776
|
ee(
|
|
777
777
|
e,
|
|
778
778
|
"focus",
|
|
779
779
|
/*focus_handler*/
|
|
780
|
-
|
|
780
|
+
n[13]
|
|
781
781
|
)
|
|
782
782
|
], L = !0);
|
|
783
783
|
},
|
|
@@ -790,7 +790,7 @@ function or(i) {
|
|
|
790
790
|
) : (
|
|
791
791
|
/*feature*/
|
|
792
792
|
_[0].place_name.replace(/,.*/, "")
|
|
793
|
-
)) + "") &&
|
|
793
|
+
)) + "") && Qe(a, d), k & /*showPlaceType, feature, imageUrl*/
|
|
794
794
|
37 && (h = /*showPlaceType*/
|
|
795
795
|
_[2] === "always" || /*showPlaceType*/
|
|
796
796
|
_[2] !== "never" && !/*feature*/
|
|
@@ -800,19 +800,19 @@ function or(i) {
|
|
|
800
800
|
_[0].id.startsWith("postal_code.") && (!/*feature*/
|
|
801
801
|
_[0].id.startsWith("poi.") || !/*imageUrl*/
|
|
802
802
|
_[5]) && !/*isReverse*/
|
|
803
|
-
_[7]), h ? v ? v.p(_, k) : (v =
|
|
803
|
+
_[7]), h ? v ? v.p(_, k) : (v = li(_), v.c(), v.m(c, null)) : v && (v.d(1), v = null), k & /*feature*/
|
|
804
804
|
1 && b !== (b = /*isReverse*/
|
|
805
805
|
(_[7] ? "" : (
|
|
806
806
|
/*feature*/
|
|
807
807
|
_[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
808
|
-
)) + "") &&
|
|
808
|
+
)) + "") && Qe(w, b), k & /*selected*/
|
|
809
809
|
2 && p(
|
|
810
810
|
e,
|
|
811
811
|
"data-selected",
|
|
812
812
|
/*selected*/
|
|
813
813
|
_[1]
|
|
814
814
|
), k & /*selected*/
|
|
815
|
-
2 &&
|
|
815
|
+
2 && be(
|
|
816
816
|
e,
|
|
817
817
|
"selected",
|
|
818
818
|
/*selected*/
|
|
@@ -822,37 +822,37 @@ function or(i) {
|
|
|
822
822
|
i: D,
|
|
823
823
|
o: D,
|
|
824
824
|
d(_) {
|
|
825
|
-
_ && F(e), C.d(), v && v.d(), L = !1,
|
|
825
|
+
_ && F(e), C.d(), v && v.d(), L = !1, ye(S);
|
|
826
826
|
}
|
|
827
827
|
};
|
|
828
828
|
}
|
|
829
|
-
function
|
|
829
|
+
function ir(n, e, t) {
|
|
830
830
|
var S;
|
|
831
|
-
let
|
|
831
|
+
let i, r, { feature: o } = e, { selected: l = !1 } = e, { showPlaceType: s } = e, { missingIconsCache: c } = e, { iconsBaseUrl: u } = e;
|
|
832
832
|
const d = (S = o.properties) == null ? void 0 : S.categories;
|
|
833
|
-
let a, f, h = 0,
|
|
833
|
+
let a, f, h = 0, m = o.place_type[0] === "reverse";
|
|
834
834
|
function y() {
|
|
835
835
|
f && c.add(f), t(10, h++, h);
|
|
836
836
|
}
|
|
837
837
|
function b(E) {
|
|
838
|
-
|
|
838
|
+
ri.call(this, n, E);
|
|
839
839
|
}
|
|
840
840
|
function w(E) {
|
|
841
|
-
|
|
841
|
+
ri.call(this, n, E);
|
|
842
842
|
}
|
|
843
843
|
const L = () => y();
|
|
844
|
-
return
|
|
844
|
+
return n.$$set = (E) => {
|
|
845
845
|
"feature" in E && t(0, o = E.feature), "selected" in E && t(1, l = E.selected), "showPlaceType" in E && t(2, s = E.showPlaceType), "missingIconsCache" in E && t(9, c = E.missingIconsCache), "iconsBaseUrl" in E && t(3, u = E.iconsBaseUrl);
|
|
846
|
-
},
|
|
846
|
+
}, n.$$.update = () => {
|
|
847
847
|
var E, M, C, v;
|
|
848
|
-
if (
|
|
848
|
+
if (n.$$.dirty & /*loadIconAttempt, index, category, iconsBaseUrl, imageUrl, missingIconsCache*/
|
|
849
849
|
3640)
|
|
850
850
|
do
|
|
851
|
-
t(11,
|
|
852
|
-
while (
|
|
853
|
-
|
|
851
|
+
t(11, i--, i), t(4, a = d == null ? void 0 : d[i]), t(5, f = a ? u + a.replace(/ /g, "_") + ".svg" : void 0);
|
|
852
|
+
while (i > -1 && (!f || c.has(f)));
|
|
853
|
+
n.$$.dirty & /*feature*/
|
|
854
854
|
1 && t(6, r = ((M = (E = o.properties) == null ? void 0 : E.categories) == null ? void 0 : M.join(", ")) ?? ((v = (C = o.properties) == null ? void 0 : C.place_type_name) == null ? void 0 : v[0]) ?? o.place_type[0]);
|
|
855
|
-
}, t(11,
|
|
855
|
+
}, t(11, i = (d == null ? void 0 : d.length) ?? 0), [
|
|
856
856
|
o,
|
|
857
857
|
l,
|
|
858
858
|
s,
|
|
@@ -860,19 +860,19 @@ function sr(i, e, t) {
|
|
|
860
860
|
a,
|
|
861
861
|
f,
|
|
862
862
|
r,
|
|
863
|
-
|
|
863
|
+
m,
|
|
864
864
|
y,
|
|
865
865
|
c,
|
|
866
866
|
h,
|
|
867
|
-
|
|
867
|
+
i,
|
|
868
868
|
b,
|
|
869
869
|
w,
|
|
870
870
|
L
|
|
871
871
|
];
|
|
872
872
|
}
|
|
873
|
-
class
|
|
873
|
+
class nr extends Te {
|
|
874
874
|
constructor(e) {
|
|
875
|
-
super(),
|
|
875
|
+
super(), Re(this, e, ir, tr, Pe, {
|
|
876
876
|
feature: 0,
|
|
877
877
|
selected: 1,
|
|
878
878
|
showPlaceType: 2,
|
|
@@ -881,14 +881,14 @@ class lr extends Oe {
|
|
|
881
881
|
});
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function rr(n) {
|
|
885
885
|
let e;
|
|
886
886
|
return {
|
|
887
887
|
c() {
|
|
888
888
|
e = W("div"), e.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>', p(e, "class", "svelte-7cmwmc");
|
|
889
889
|
},
|
|
890
|
-
m(t,
|
|
891
|
-
U(t, e,
|
|
890
|
+
m(t, i) {
|
|
891
|
+
U(t, e, i);
|
|
892
892
|
},
|
|
893
893
|
p: D,
|
|
894
894
|
i: D,
|
|
@@ -898,41 +898,41 @@ function ur(i) {
|
|
|
898
898
|
}
|
|
899
899
|
};
|
|
900
900
|
}
|
|
901
|
-
class
|
|
901
|
+
class or extends Te {
|
|
902
902
|
constructor(e) {
|
|
903
|
-
super(),
|
|
903
|
+
super(), Re(this, e, null, rr, Pe, {});
|
|
904
904
|
}
|
|
905
905
|
}
|
|
906
|
-
function
|
|
906
|
+
function sr(n) {
|
|
907
907
|
let e, t;
|
|
908
908
|
return {
|
|
909
909
|
c() {
|
|
910
|
-
e =
|
|
910
|
+
e = de("svg"), t = de("path"), p(t, "d", "M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"), p(e, "viewBox", "0 0 60.006 21.412"), p(e, "width", "14"), p(e, "height", "20"), p(e, "class", "svelte-en2qvf");
|
|
911
911
|
},
|
|
912
|
-
m(
|
|
913
|
-
U(
|
|
912
|
+
m(i, r) {
|
|
913
|
+
U(i, e, r), T(e, t);
|
|
914
914
|
},
|
|
915
915
|
p: D,
|
|
916
916
|
i: D,
|
|
917
917
|
o: D,
|
|
918
|
-
d(
|
|
919
|
-
|
|
918
|
+
d(i) {
|
|
919
|
+
i && F(e);
|
|
920
920
|
}
|
|
921
921
|
};
|
|
922
922
|
}
|
|
923
|
-
class
|
|
923
|
+
class lr extends Te {
|
|
924
924
|
constructor(e) {
|
|
925
|
-
super(),
|
|
925
|
+
super(), Re(this, e, null, sr, Pe, {});
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
|
-
function
|
|
929
|
-
let e, t,
|
|
928
|
+
function ur(n) {
|
|
929
|
+
let e, t, i;
|
|
930
930
|
return {
|
|
931
931
|
c() {
|
|
932
|
-
e =
|
|
932
|
+
e = de("svg"), t = de("circle"), i = de("path"), p(t, "cx", "4.789"), p(t, "cy", "4.787"), p(t, "r", "3.85"), p(t, "class", "svelte-1aq105l"), p(i, "d", "M12.063 12.063 7.635 7.635"), p(i, "class", "svelte-1aq105l"), p(e, "xmlns", "http://www.w3.org/2000/svg"), p(e, "width", "13"), p(e, "height", "13"), p(e, "viewBox", "0 0 13 13"), p(e, "class", "svelte-1aq105l");
|
|
933
933
|
},
|
|
934
934
|
m(r, o) {
|
|
935
|
-
U(r, e, o),
|
|
935
|
+
U(r, e, o), T(e, t), T(e, i);
|
|
936
936
|
},
|
|
937
937
|
p: D,
|
|
938
938
|
i: D,
|
|
@@ -942,31 +942,31 @@ function dr(i) {
|
|
|
942
942
|
}
|
|
943
943
|
};
|
|
944
944
|
}
|
|
945
|
-
class
|
|
945
|
+
class ar extends Te {
|
|
946
946
|
constructor(e) {
|
|
947
|
-
super(),
|
|
947
|
+
super(), Re(this, e, null, ur, Pe, {});
|
|
948
948
|
}
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
const
|
|
952
|
-
return
|
|
950
|
+
function cr(n, e, t) {
|
|
951
|
+
const i = e[1], r = e[0], o = i - r;
|
|
952
|
+
return n === i && t ? n : ((n - r) % o + o) % o + r;
|
|
953
953
|
}
|
|
954
|
-
function
|
|
955
|
-
const e = [...
|
|
954
|
+
function lt(n) {
|
|
955
|
+
const e = [...n];
|
|
956
956
|
return e[2] < e[0] && (Math.abs((e[0] + e[2] + 360) / 2) > Math.abs((e[0] - 360 + e[2]) / 2) ? e[0] -= 360 : e[2] += 360), e;
|
|
957
957
|
}
|
|
958
|
-
let
|
|
959
|
-
async function
|
|
960
|
-
const
|
|
958
|
+
let Ue;
|
|
959
|
+
async function fr(n, e, t) {
|
|
960
|
+
const i = n == null ? void 0 : n.getCenterAndZoom();
|
|
961
961
|
for (const r of e ?? [])
|
|
962
|
-
if (!(
|
|
962
|
+
if (!(i && (r.minZoom != null && r.minZoom > i[0] || r.maxZoom != null && r.maxZoom < i[0]))) {
|
|
963
963
|
if (r.type === "fixed")
|
|
964
964
|
return r.coordinates.join(",");
|
|
965
965
|
e: if (r.type === "client-geolocation") {
|
|
966
|
-
if (
|
|
967
|
-
if (!
|
|
966
|
+
if (Ue && r.cachedLocationExpiry && Ue.time + r.cachedLocationExpiry > Date.now()) {
|
|
967
|
+
if (!Ue.coords)
|
|
968
968
|
break e;
|
|
969
|
-
return
|
|
969
|
+
return Ue.coords;
|
|
970
970
|
}
|
|
971
971
|
let o;
|
|
972
972
|
try {
|
|
@@ -987,7 +987,7 @@ async function gr(i, e, t) {
|
|
|
987
987
|
}), o;
|
|
988
988
|
} catch {
|
|
989
989
|
} finally {
|
|
990
|
-
r.cachedLocationExpiry && (
|
|
990
|
+
r.cachedLocationExpiry && (Ue = {
|
|
991
991
|
time: Date.now(),
|
|
992
992
|
coords: o
|
|
993
993
|
});
|
|
@@ -997,76 +997,76 @@ async function gr(i, e, t) {
|
|
|
997
997
|
}
|
|
998
998
|
if (r.type === "server-geolocation")
|
|
999
999
|
return "ip";
|
|
1000
|
-
if (
|
|
1001
|
-
return
|
|
1000
|
+
if (i && r.type === "map-center")
|
|
1001
|
+
return i[1].toFixed(6) + "," + i[2].toFixed(6);
|
|
1002
1002
|
}
|
|
1003
1003
|
}
|
|
1004
|
-
const
|
|
1005
|
-
function
|
|
1006
|
-
if (!["DMS", "DM", "DD"].includes(
|
|
1004
|
+
const dr = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([6-9][0-9])\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*(EAST|WEST|[EW])?$/i, ui = /^([+-]?[0-8]?[0-9])\s+([0-5]?[0-9]\.\d{3,})[\s,]{1,}([+-]?[0-1]?[0-9]?[0-9])\s+([0-5]?[0-9]\.\d{3,})$/, ai = /^(NORTH|SOUTH|[NS])?[\s]*([+-]?[0-8]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(NORTH|SOUTH|[NS])?[\s]*[,/;]?[\s]*(EAST|WEST|[EW])?[\s]*([+-]?[0-1]?[0-9]?[0-9](?:[\.,]\d{3,}))[\s]*([•º°]?)[\s]*(EAST|WEST|[EW])?$/i, ci = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(\.)\s*([0-5]?[0-9])\s*(\.)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(EAST|WEST|[EW])?$/i, fi = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*(D(?:EG)?(?:REES)?)\s*([0-5]?[0-9])\s*(M(?:IN)?(?:UTES)?)\s*((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(S(?:EC)?(?:ONDS)?)\s*(EAST|WEST|[EW])?$/i, di = /^(NORTH|SOUTH|[NS])?\s*([+-]?[0-8]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|’’|´´|["″”\.])?\s*(NORTH|SOUTH|[NS])?(?:\s*[,/;]\s*|\s*)(EAST|WEST|[EW])?\s*([+-]?[0-1]?[0-9]?[0-9])\s*([•º°\.:]|D(?:EG)?(?:REES)?)?\s*,?([0-5]?[0-9](?:[\.,]\d{1,})?)?\s*(['′´’\.:]|M(?:IN)?(?:UTES)?)?\s*,?((?:[0-5]?[0-9])(?:[\.,]\d{1,3})?)?\s*(''|′′|´´|’’|["″”\.])?\s*(EAST|WEST|[EW])?$/i;
|
|
1005
|
+
function hr(n) {
|
|
1006
|
+
if (!["DMS", "DM", "DD"].includes(n))
|
|
1007
1007
|
throw new Error("invalid format specified");
|
|
1008
1008
|
if (this.decimalCoordinates && this.decimalCoordinates.trim()) {
|
|
1009
|
-
const e = this.decimalCoordinates.split(",").map((h) => Number(h.trim())), t = Number(e[0]),
|
|
1009
|
+
const e = this.decimalCoordinates.split(",").map((h) => Number(h.trim())), t = Number(e[0]), i = Number(e[1]), r = Math.abs(t), o = Math.abs(i), l = t > 0 ? "N" : "S", s = i > 0 ? "E" : "W";
|
|
1010
1010
|
let c;
|
|
1011
|
-
|
|
1011
|
+
n == "DD" && (c = `${r}° ${l}, ${o}° ${s}`);
|
|
1012
1012
|
const u = Math.floor(r), d = Math.floor(o), a = (r - u) * 60, f = (o - d) * 60;
|
|
1013
|
-
if (
|
|
1014
|
-
let h =
|
|
1015
|
-
h.endsWith(".000") &&
|
|
1013
|
+
if (n == "DM") {
|
|
1014
|
+
let h = hi(a, 3).toFixed(3).padStart(6, "0"), m = hi(f, 3).toFixed(3).padStart(6, "0");
|
|
1015
|
+
h.endsWith(".000") && m.endsWith(".000") && (h = h.replace(/\.000$/, ""), m = m.replace(/\.000$/, "")), c = `${u}° ${h}' ${l}, ${d}° ${m}' ${s}`;
|
|
1016
1016
|
}
|
|
1017
|
-
if (
|
|
1018
|
-
const h = Math.floor(a),
|
|
1019
|
-
let y = ((a - h) * 60).toFixed(1).padStart(4, "0"), b = ((f -
|
|
1020
|
-
const w = h.toString().padStart(2, "0"), L =
|
|
1017
|
+
if (n == "DMS") {
|
|
1018
|
+
const h = Math.floor(a), m = Math.floor(f);
|
|
1019
|
+
let y = ((a - h) * 60).toFixed(1).padStart(4, "0"), b = ((f - m) * 60).toFixed(1).padStart(4, "0");
|
|
1020
|
+
const w = h.toString().padStart(2, "0"), L = m.toString().padStart(2, "0");
|
|
1021
1021
|
y.endsWith(".0") && b.endsWith(".0") && (y = y.replace(/\.0$/, ""), b = b.replace(/\.0$/, "")), c = `${u}° ${w}' ${y}" ${l}, ${d}° ${L}' ${b}" ${s}`;
|
|
1022
1022
|
}
|
|
1023
1023
|
return c;
|
|
1024
1024
|
} else
|
|
1025
1025
|
throw new Error("no decimal coordinates to convert");
|
|
1026
1026
|
}
|
|
1027
|
-
function
|
|
1027
|
+
function hi(n, e) {
|
|
1028
1028
|
const t = Math.pow(10, e);
|
|
1029
|
-
return Math.round((
|
|
1029
|
+
return Math.round((n + Number.EPSILON) * t) / t;
|
|
1030
1030
|
}
|
|
1031
|
-
function
|
|
1032
|
-
e || (e = 5),
|
|
1033
|
-
let t = null,
|
|
1034
|
-
if (
|
|
1031
|
+
function Ft(n, e) {
|
|
1032
|
+
e || (e = 5), n = n.replace(/\s+/g, " ").trim();
|
|
1033
|
+
let t = null, i = null, r = "", o = "", l = null, s = [], c = !1;
|
|
1034
|
+
if (dr.test(n))
|
|
1035
1035
|
throw new Error("invalid coordinate value");
|
|
1036
|
-
if (
|
|
1037
|
-
if (s =
|
|
1038
|
-
t = Math.abs(s[1]) + s[2] / 60, Number(s[1]) < 0 && (t *= -1),
|
|
1036
|
+
if (ui.test(n))
|
|
1037
|
+
if (s = ui.exec(n), c = Ge(s), c)
|
|
1038
|
+
t = Math.abs(s[1]) + s[2] / 60, Number(s[1]) < 0 && (t *= -1), i = Math.abs(s[3]) + s[4] / 60, Number(s[3]) < 0 && (i *= -1), l = "DM";
|
|
1039
1039
|
else
|
|
1040
1040
|
throw new Error("invalid coordinate format");
|
|
1041
|
-
else if (
|
|
1042
|
-
if (s =
|
|
1043
|
-
if (t = s[2],
|
|
1041
|
+
else if (ai.test(n))
|
|
1042
|
+
if (s = ai.exec(n), c = Ge(s), c) {
|
|
1043
|
+
if (t = s[2], i = s[6], t.includes(",") && (t = t.replace(",", ".")), i.includes(",") && (i = i.replace(",", ".")), l = "DD", Number(Math.round(t)) == Number(t))
|
|
1044
1044
|
throw new Error("integer only coordinate provided");
|
|
1045
|
-
if (Number(Math.round(
|
|
1045
|
+
if (Number(Math.round(i)) == Number(i))
|
|
1046
1046
|
throw new Error("integer only coordinate provided");
|
|
1047
1047
|
s[1] ? (r = s[1], o = s[5]) : s[4] && (r = s[4], o = s[8]);
|
|
1048
1048
|
} else
|
|
1049
1049
|
throw new Error("invalid decimal coordinate format");
|
|
1050
|
-
else if (
|
|
1051
|
-
if (s =
|
|
1052
|
-
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, l = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t),
|
|
1050
|
+
else if (ci.test(n))
|
|
1051
|
+
if (s = ci.exec(n), c = Ge(s), c)
|
|
1052
|
+
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, l = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), i = Math.abs(parseInt(s[9])), s[11] && (i += s[11] / 60), s[13] && (i += s[13].replace(",", ".") / 3600), parseInt(s[9]) < 0 && (i = -1 * i), s[1] ? (r = s[1], o = s[8]) : s[7] && (r = s[7], o = s[14]);
|
|
1053
1053
|
else
|
|
1054
1054
|
throw new Error("invalid DMS coordinates format");
|
|
1055
|
-
else if (
|
|
1056
|
-
if (s =
|
|
1057
|
-
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, l = "DM"), s[6] && (t += s[6] / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t),
|
|
1055
|
+
else if (fi.test(n))
|
|
1056
|
+
if (s = fi.exec(n), c = Ge(s), c)
|
|
1057
|
+
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4] / 60, l = "DM"), s[6] && (t += s[6] / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), i = Math.abs(parseInt(s[10])), s[12] && (i += s[12] / 60), s[14] && (i += s[14] / 3600), parseInt(s[10]) < 0 && (i = -1 * i), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
|
|
1058
1058
|
else
|
|
1059
1059
|
throw new Error("invalid DMS coordinates format");
|
|
1060
|
-
else if (
|
|
1061
|
-
if (s =
|
|
1060
|
+
else if (di.test(n)) {
|
|
1061
|
+
if (s = di.exec(n), c = Ge(s), s.filter((u) => u).length <= 5)
|
|
1062
1062
|
throw new Error("invalid coordinates format");
|
|
1063
1063
|
if (c)
|
|
1064
|
-
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4].replace(",", ".") / 60, l = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t),
|
|
1064
|
+
t = Math.abs(parseInt(s[2])), s[4] && (t += s[4].replace(",", ".") / 60, l = "DM"), s[6] && (t += s[6].replace(",", ".") / 3600, l = "DMS"), parseInt(s[2]) < 0 && (t = -1 * t), i = Math.abs(parseInt(s[10])), s[12] && (i += s[12].replace(",", ".") / 60), s[14] && (i += s[14].replace(",", ".") / 3600), parseInt(s[10]) < 0 && (i = -1 * i), s[1] ? (r = s[1], o = s[9]) : s[8] && (r = s[8], o = s[16]);
|
|
1065
1065
|
else
|
|
1066
1066
|
throw new Error("invalid coordinates format");
|
|
1067
1067
|
}
|
|
1068
1068
|
if (c) {
|
|
1069
|
-
if (Math.abs(
|
|
1069
|
+
if (Math.abs(i) >= 180)
|
|
1070
1070
|
throw new Error("invalid longitude value");
|
|
1071
1071
|
if (Math.abs(t) >= 90)
|
|
1072
1072
|
throw new Error("invalid latitude value");
|
|
@@ -1074,25 +1074,25 @@ function Ut(i, e) {
|
|
|
1074
1074
|
throw new Error("invalid coordinates value");
|
|
1075
1075
|
if (r && r == o)
|
|
1076
1076
|
throw new Error("invalid coordinates format");
|
|
1077
|
-
t.toString().includes(",") && (t = t.replace(",", ".")),
|
|
1077
|
+
t.toString().includes(",") && (t = t.replace(",", ".")), i.toString().includes(",") && (i = i.replace(",", "."));
|
|
1078
1078
|
let u = /S|SOUTH/i;
|
|
1079
|
-
u.test(r) && t > 0 && (t = -1 * t), u = /W|WEST/i, u.test(o) &&
|
|
1079
|
+
u.test(r) && t > 0 && (t = -1 * t), u = /W|WEST/i, u.test(o) && i > 0 && (i = -1 * i);
|
|
1080
1080
|
const d = s[0].trim();
|
|
1081
1081
|
let a, f;
|
|
1082
|
-
const h = /[,/;\u0020]/g,
|
|
1083
|
-
if (
|
|
1084
|
-
const w = Math.floor(
|
|
1082
|
+
const h = /[,/;\u0020]/g, m = d.match(h);
|
|
1083
|
+
if (m == null) {
|
|
1084
|
+
const w = Math.floor(n.length / 2);
|
|
1085
1085
|
a = d.substring(0, w).trim(), f = d.substring(w).trim();
|
|
1086
1086
|
} else {
|
|
1087
1087
|
let w;
|
|
1088
|
-
|
|
1088
|
+
m.length % 2 == 1 ? w = Math.floor(m.length / 2) : w = m.length / 2 - 1;
|
|
1089
1089
|
let L = 0;
|
|
1090
1090
|
if (w == 0)
|
|
1091
|
-
L = d.indexOf(
|
|
1091
|
+
L = d.indexOf(m[0]), a = d.substring(0, L).trim(), f = d.substring(L + 1).trim();
|
|
1092
1092
|
else {
|
|
1093
1093
|
let S = 0, E = 0;
|
|
1094
1094
|
for (; S <= w; )
|
|
1095
|
-
L = d.indexOf(
|
|
1095
|
+
L = d.indexOf(m[S], E), E = L + 1, S++;
|
|
1096
1096
|
a = d.substring(0, L).trim(), f = d.substring(L + 1).trim();
|
|
1097
1097
|
}
|
|
1098
1098
|
}
|
|
@@ -1104,29 +1104,29 @@ function Ut(i, e) {
|
|
|
1104
1104
|
throw new Error("invalid coordinates format");
|
|
1105
1105
|
if (/^\d+$/.test(a) || /^\d+$/.test(f))
|
|
1106
1106
|
throw new Error("degree only coordinate/s provided");
|
|
1107
|
-
return t = Number(Number(t).toFixed(e)),
|
|
1107
|
+
return t = Number(Number(t).toFixed(e)), i = Number(Number(i).toFixed(e)), Object.freeze({
|
|
1108
1108
|
verbatimCoordinates: d,
|
|
1109
1109
|
verbatimLatitude: a,
|
|
1110
1110
|
verbatimLongitude: f,
|
|
1111
1111
|
decimalLatitude: t,
|
|
1112
|
-
decimalLongitude:
|
|
1113
|
-
decimalCoordinates: `${t},${
|
|
1112
|
+
decimalLongitude: i,
|
|
1113
|
+
decimalCoordinates: `${t},${i}`,
|
|
1114
1114
|
originalFormat: l,
|
|
1115
|
-
closeEnough:
|
|
1116
|
-
toCoordinateFormat:
|
|
1115
|
+
closeEnough: gr,
|
|
1116
|
+
toCoordinateFormat: hr
|
|
1117
1117
|
});
|
|
1118
1118
|
} else
|
|
1119
1119
|
throw new Error("coordinates pattern match failed");
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1122
|
-
if (!isNaN(
|
|
1121
|
+
function Ge(n) {
|
|
1122
|
+
if (!isNaN(n[0]))
|
|
1123
1123
|
return !1;
|
|
1124
|
-
const e = [...
|
|
1124
|
+
const e = [...n];
|
|
1125
1125
|
if (e.shift(), e.length % 2 > 0)
|
|
1126
1126
|
return !1;
|
|
1127
|
-
const t = /^[-+]?\d+([\.,]\d+)?$/,
|
|
1127
|
+
const t = /^[-+]?\d+([\.,]\d+)?$/, i = /[eastsouthnorthwest]+/i, r = e.length / 2;
|
|
1128
1128
|
for (let o = 0; o < r; o++) {
|
|
1129
|
-
const l = e[o], s = e[o + r], c = t.test(l) && t.test(s), u =
|
|
1129
|
+
const l = e[o], s = e[o + r], c = t.test(l) && t.test(s), u = i.test(l) && i.test(s), d = l == s;
|
|
1130
1130
|
if (!(l == null && s == null)) {
|
|
1131
1131
|
if (l == null || s == null)
|
|
1132
1132
|
return !1;
|
|
@@ -1137,28 +1137,28 @@ function qe(i) {
|
|
|
1137
1137
|
}
|
|
1138
1138
|
return !0;
|
|
1139
1139
|
}
|
|
1140
|
-
function
|
|
1141
|
-
const t = Math.abs(
|
|
1140
|
+
function gi(n, e) {
|
|
1141
|
+
const t = Math.abs(n - e);
|
|
1142
1142
|
return Number(t.toFixed(6)) <= 1e-5;
|
|
1143
1143
|
}
|
|
1144
|
-
function
|
|
1145
|
-
if (!
|
|
1144
|
+
function gr(n) {
|
|
1145
|
+
if (!n)
|
|
1146
1146
|
throw new Error("coords must be provided");
|
|
1147
|
-
if (
|
|
1148
|
-
const e =
|
|
1147
|
+
if (n.includes(",")) {
|
|
1148
|
+
const e = n.split(",");
|
|
1149
1149
|
if (Number(e[0]) == NaN || Number(e[1]) == NaN)
|
|
1150
1150
|
throw new Error("coords are not valid decimals");
|
|
1151
|
-
return
|
|
1151
|
+
return gi(this.decimalLatitude, Number(e[0])) && gi(this.decimalLongitude, e[1]);
|
|
1152
1152
|
} else
|
|
1153
1153
|
throw new Error("coords being tested must be separated by a comma");
|
|
1154
1154
|
}
|
|
1155
|
-
const
|
|
1155
|
+
const mr = Object.freeze({
|
|
1156
1156
|
DMS: "DMS",
|
|
1157
1157
|
DM: "DM",
|
|
1158
1158
|
DD: "DD"
|
|
1159
1159
|
});
|
|
1160
|
-
|
|
1161
|
-
const
|
|
1160
|
+
Ft.to = mr;
|
|
1161
|
+
const yr = [
|
|
1162
1162
|
{
|
|
1163
1163
|
verbatimCoordinates: "40.123, -74.123",
|
|
1164
1164
|
verbatimLatitude: "40.123",
|
|
@@ -1299,10 +1299,10 @@ const wr = [
|
|
|
1299
1299
|
verbatimLatitude: "40 7 22.8",
|
|
1300
1300
|
verbatimLongitude: "-74 7 22.8"
|
|
1301
1301
|
}
|
|
1302
|
-
],
|
|
1302
|
+
], pr = {
|
|
1303
1303
|
decimalLatitude: 40.123,
|
|
1304
1304
|
decimalLongitude: -74.123
|
|
1305
|
-
},
|
|
1305
|
+
}, vr = [
|
|
1306
1306
|
{
|
|
1307
1307
|
verbatimCoordinates: `50°4'17.698"south, 14°24'2.826"east`,
|
|
1308
1308
|
verbatimLatitude: `50°4'17.698"south`,
|
|
@@ -1387,7 +1387,7 @@ const wr = [
|
|
|
1387
1387
|
decimalLatitude: -18.4,
|
|
1388
1388
|
decimalLongitude: 22.75
|
|
1389
1389
|
}
|
|
1390
|
-
],
|
|
1390
|
+
], br = [
|
|
1391
1391
|
{
|
|
1392
1392
|
verbatimCoordinates: "10.432342S 10.6345345E",
|
|
1393
1393
|
verbatimLatitude: "10.432342S",
|
|
@@ -1522,72 +1522,72 @@ const wr = [
|
|
|
1522
1522
|
decimalLongitude: 18.33453
|
|
1523
1523
|
}
|
|
1524
1524
|
];
|
|
1525
|
-
function
|
|
1526
|
-
const
|
|
1527
|
-
return
|
|
1528
|
-
e.decimalLatitude ?
|
|
1529
|
-
}), [...
|
|
1530
|
-
}
|
|
1531
|
-
const
|
|
1532
|
-
|
|
1533
|
-
const
|
|
1534
|
-
function
|
|
1535
|
-
const
|
|
1536
|
-
return
|
|
1537
|
-
}
|
|
1538
|
-
function
|
|
1525
|
+
function wr() {
|
|
1526
|
+
const n = [];
|
|
1527
|
+
return yr.forEach((e) => {
|
|
1528
|
+
e.decimalLatitude ? n.push(e) : n.push({ ...e, ...pr });
|
|
1529
|
+
}), [...n, ...vr, ...br];
|
|
1530
|
+
}
|
|
1531
|
+
const _r = wr();
|
|
1532
|
+
Ft.formats = _r.map((n) => n.verbatimCoordinates);
|
|
1533
|
+
const Er = Ft;
|
|
1534
|
+
function mi(n, e, t) {
|
|
1535
|
+
const i = n.slice();
|
|
1536
|
+
return i[84] = e[t], i[86] = t, i;
|
|
1537
|
+
}
|
|
1538
|
+
function yi(n) {
|
|
1539
1539
|
let e, t;
|
|
1540
|
-
return e = new
|
|
1540
|
+
return e = new or({}), {
|
|
1541
1541
|
c() {
|
|
1542
|
-
|
|
1542
|
+
Le(e.$$.fragment);
|
|
1543
1543
|
},
|
|
1544
|
-
m(
|
|
1545
|
-
ge(e,
|
|
1544
|
+
m(i, r) {
|
|
1545
|
+
ge(e, i, r), t = !0;
|
|
1546
1546
|
},
|
|
1547
|
-
i(
|
|
1548
|
-
t || (G(e.$$.fragment,
|
|
1547
|
+
i(i) {
|
|
1548
|
+
t || (G(e.$$.fragment, i), t = !0);
|
|
1549
1549
|
},
|
|
1550
|
-
o(
|
|
1551
|
-
Y(e.$$.fragment,
|
|
1550
|
+
o(i) {
|
|
1551
|
+
Y(e.$$.fragment, i), t = !1;
|
|
1552
1552
|
},
|
|
1553
|
-
d(
|
|
1554
|
-
|
|
1553
|
+
d(i) {
|
|
1554
|
+
me(e, i);
|
|
1555
1555
|
}
|
|
1556
1556
|
};
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1559
|
-
let e, t,
|
|
1560
|
-
return t = new
|
|
1558
|
+
function pi(n) {
|
|
1559
|
+
let e, t, i, r, o;
|
|
1560
|
+
return t = new lr({}), {
|
|
1561
1561
|
c() {
|
|
1562
|
-
e = W("button"),
|
|
1562
|
+
e = W("button"), Le(t.$$.fragment), p(e, "type", "button"), p(
|
|
1563
1563
|
e,
|
|
1564
1564
|
"title",
|
|
1565
1565
|
/*reverseButtonTitle*/
|
|
1566
|
-
|
|
1567
|
-
), p(e, "class", "svelte-bz0zu3"),
|
|
1566
|
+
n[9]
|
|
1567
|
+
), p(e, "class", "svelte-bz0zu3"), be(
|
|
1568
1568
|
e,
|
|
1569
1569
|
"active",
|
|
1570
1570
|
/*reverseActive*/
|
|
1571
|
-
|
|
1571
|
+
n[0]
|
|
1572
1572
|
);
|
|
1573
1573
|
},
|
|
1574
1574
|
m(l, s) {
|
|
1575
|
-
U(l, e, s), ge(t, e, null),
|
|
1575
|
+
U(l, e, s), ge(t, e, null), i = !0, r || (o = ee(
|
|
1576
1576
|
e,
|
|
1577
1577
|
"click",
|
|
1578
1578
|
/*click_handler_2*/
|
|
1579
|
-
|
|
1579
|
+
n[69]
|
|
1580
1580
|
), r = !0);
|
|
1581
1581
|
},
|
|
1582
1582
|
p(l, s) {
|
|
1583
|
-
(!
|
|
1583
|
+
(!i || s[0] & /*reverseButtonTitle*/
|
|
1584
1584
|
512) && p(
|
|
1585
1585
|
e,
|
|
1586
1586
|
"title",
|
|
1587
1587
|
/*reverseButtonTitle*/
|
|
1588
1588
|
l[9]
|
|
1589
|
-
), (!
|
|
1590
|
-
1) &&
|
|
1589
|
+
), (!i || s[0] & /*reverseActive*/
|
|
1590
|
+
1) && be(
|
|
1591
1591
|
e,
|
|
1592
1592
|
"active",
|
|
1593
1593
|
/*reverseActive*/
|
|
@@ -1595,30 +1595,30 @@ function wi(i) {
|
|
|
1595
1595
|
);
|
|
1596
1596
|
},
|
|
1597
1597
|
i(l) {
|
|
1598
|
-
|
|
1598
|
+
i || (G(t.$$.fragment, l), i = !0);
|
|
1599
1599
|
},
|
|
1600
1600
|
o(l) {
|
|
1601
|
-
Y(t.$$.fragment, l),
|
|
1601
|
+
Y(t.$$.fragment, l), i = !1;
|
|
1602
1602
|
},
|
|
1603
1603
|
d(l) {
|
|
1604
|
-
l && F(e),
|
|
1604
|
+
l && F(e), me(t), r = !1, o();
|
|
1605
1605
|
}
|
|
1606
1606
|
};
|
|
1607
1607
|
}
|
|
1608
|
-
function
|
|
1609
|
-
let e, t = [],
|
|
1608
|
+
function Lr(n) {
|
|
1609
|
+
let e, t = [], i = /* @__PURE__ */ new Map(), r, o, l, s = si(
|
|
1610
1610
|
/*listFeatures*/
|
|
1611
|
-
|
|
1611
|
+
n[14]
|
|
1612
1612
|
);
|
|
1613
1613
|
const c = (u) => (
|
|
1614
1614
|
/*feature*/
|
|
1615
|
-
u[
|
|
1616
|
-
(u[
|
|
1617
|
-
u[
|
|
1615
|
+
u[84].id + /*feature*/
|
|
1616
|
+
(u[84].address ? "," + /*feature*/
|
|
1617
|
+
u[84].address : "")
|
|
1618
1618
|
);
|
|
1619
1619
|
for (let u = 0; u < s.length; u += 1) {
|
|
1620
|
-
let d =
|
|
1621
|
-
|
|
1620
|
+
let d = mi(n, s, u), a = c(d);
|
|
1621
|
+
i.set(a, t[u] = vi(a, d));
|
|
1622
1622
|
}
|
|
1623
1623
|
return {
|
|
1624
1624
|
c() {
|
|
@@ -1636,22 +1636,22 @@ function kr(i) {
|
|
|
1636
1636
|
e,
|
|
1637
1637
|
"mouseleave",
|
|
1638
1638
|
/*mouseleave_handler*/
|
|
1639
|
-
|
|
1639
|
+
n[73]
|
|
1640
1640
|
),
|
|
1641
1641
|
ee(
|
|
1642
1642
|
e,
|
|
1643
1643
|
"blur",
|
|
1644
1644
|
/*blur_handler_1*/
|
|
1645
|
-
|
|
1645
|
+
n[74]
|
|
1646
1646
|
)
|
|
1647
1647
|
], o = !0);
|
|
1648
1648
|
},
|
|
1649
1649
|
p(u, d) {
|
|
1650
1650
|
d[0] & /*listFeatures, showPlaceType, selectedItemIndex, missingIconsCache, iconsBaseUrl, pick*/
|
|
1651
|
-
17880064 && (s =
|
|
1651
|
+
17880064 && (s = si(
|
|
1652
1652
|
/*listFeatures*/
|
|
1653
1653
|
u[14]
|
|
1654
|
-
),
|
|
1654
|
+
), rt(), t = Gn(t, d, c, 1, u, s, i, e, Un, vi, null, mi), ot());
|
|
1655
1655
|
},
|
|
1656
1656
|
i(u) {
|
|
1657
1657
|
if (!r) {
|
|
@@ -1669,25 +1669,25 @@ function kr(i) {
|
|
|
1669
1669
|
u && F(e);
|
|
1670
1670
|
for (let d = 0; d < t.length; d += 1)
|
|
1671
1671
|
t[d].d();
|
|
1672
|
-
o = !1,
|
|
1672
|
+
o = !1, ye(l);
|
|
1673
1673
|
}
|
|
1674
1674
|
};
|
|
1675
1675
|
}
|
|
1676
|
-
function
|
|
1677
|
-
let e, t,
|
|
1678
|
-
return t = new
|
|
1676
|
+
function Sr(n) {
|
|
1677
|
+
let e, t, i, r, o, l;
|
|
1678
|
+
return t = new Ui({}), {
|
|
1679
1679
|
c() {
|
|
1680
|
-
e = W("div"),
|
|
1680
|
+
e = W("div"), Le(t.$$.fragment), i = ie(), r = W("div"), o = Ee(
|
|
1681
1681
|
/*noResultsMessage*/
|
|
1682
|
-
|
|
1682
|
+
n[7]
|
|
1683
1683
|
), p(r, "class", "svelte-bz0zu3"), p(e, "class", "no-results svelte-bz0zu3");
|
|
1684
1684
|
},
|
|
1685
1685
|
m(s, c) {
|
|
1686
|
-
U(s, e, c), ge(t, e, null),
|
|
1686
|
+
U(s, e, c), ge(t, e, null), T(e, i), T(e, r), T(r, o), l = !0;
|
|
1687
1687
|
},
|
|
1688
1688
|
p(s, c) {
|
|
1689
1689
|
(!l || c[0] & /*noResultsMessage*/
|
|
1690
|
-
128) &&
|
|
1690
|
+
128) && Qe(
|
|
1691
1691
|
o,
|
|
1692
1692
|
/*noResultsMessage*/
|
|
1693
1693
|
s[7]
|
|
@@ -1700,47 +1700,47 @@ function Cr(i) {
|
|
|
1700
1700
|
Y(t.$$.fragment, s), l = !1;
|
|
1701
1701
|
},
|
|
1702
1702
|
d(s) {
|
|
1703
|
-
s && F(e),
|
|
1703
|
+
s && F(e), me(t);
|
|
1704
1704
|
}
|
|
1705
1705
|
};
|
|
1706
1706
|
}
|
|
1707
|
-
function
|
|
1707
|
+
function xr(n) {
|
|
1708
1708
|
let e = "", t;
|
|
1709
1709
|
return {
|
|
1710
1710
|
c() {
|
|
1711
|
-
t =
|
|
1711
|
+
t = Ee(e);
|
|
1712
1712
|
},
|
|
1713
|
-
m(
|
|
1714
|
-
U(
|
|
1713
|
+
m(i, r) {
|
|
1714
|
+
U(i, t, r);
|
|
1715
1715
|
},
|
|
1716
1716
|
p: D,
|
|
1717
1717
|
i: D,
|
|
1718
1718
|
o: D,
|
|
1719
|
-
d(
|
|
1720
|
-
|
|
1719
|
+
d(i) {
|
|
1720
|
+
i && F(t);
|
|
1721
1721
|
}
|
|
1722
1722
|
};
|
|
1723
1723
|
}
|
|
1724
|
-
function
|
|
1725
|
-
let e, t,
|
|
1726
|
-
return t = new
|
|
1724
|
+
function Mr(n) {
|
|
1725
|
+
let e, t, i, r, o, l, s, c, u, d, a;
|
|
1726
|
+
return t = new Ui({}), c = new Di({}), {
|
|
1727
1727
|
c() {
|
|
1728
|
-
e = W("div"),
|
|
1728
|
+
e = W("div"), Le(t.$$.fragment), i = ie(), r = W("div"), o = Ee(
|
|
1729
1729
|
/*errorMessage*/
|
|
1730
|
-
|
|
1731
|
-
), l = ie(), s = W("button"),
|
|
1730
|
+
n[6]
|
|
1731
|
+
), l = ie(), s = W("button"), Le(c.$$.fragment), p(r, "class", "svelte-bz0zu3"), p(s, "class", "svelte-bz0zu3"), p(e, "class", "error svelte-bz0zu3");
|
|
1732
1732
|
},
|
|
1733
1733
|
m(f, h) {
|
|
1734
|
-
U(f, e, h), ge(t, e, null),
|
|
1734
|
+
U(f, e, h), ge(t, e, null), T(e, i), T(e, r), T(r, o), T(e, l), T(e, s), ge(c, s, null), u = !0, d || (a = ee(
|
|
1735
1735
|
s,
|
|
1736
1736
|
"click",
|
|
1737
1737
|
/*click_handler_3*/
|
|
1738
|
-
|
|
1738
|
+
n[70]
|
|
1739
1739
|
), d = !0);
|
|
1740
1740
|
},
|
|
1741
1741
|
p(f, h) {
|
|
1742
1742
|
(!u || h[0] & /*errorMessage*/
|
|
1743
|
-
64) &&
|
|
1743
|
+
64) && Qe(
|
|
1744
1744
|
o,
|
|
1745
1745
|
/*errorMessage*/
|
|
1746
1746
|
f[6]
|
|
@@ -1753,35 +1753,35 @@ function Pr(i) {
|
|
|
1753
1753
|
Y(t.$$.fragment, f), Y(c.$$.fragment, f), u = !1;
|
|
1754
1754
|
},
|
|
1755
1755
|
d(f) {
|
|
1756
|
-
f && F(e),
|
|
1756
|
+
f && F(e), me(t), me(c), d = !1, a();
|
|
1757
1757
|
}
|
|
1758
1758
|
};
|
|
1759
1759
|
}
|
|
1760
|
-
function
|
|
1761
|
-
let t,
|
|
1760
|
+
function vi(n, e) {
|
|
1761
|
+
let t, i, r;
|
|
1762
1762
|
function o() {
|
|
1763
1763
|
return (
|
|
1764
1764
|
/*mouseenter_handler*/
|
|
1765
|
-
e[
|
|
1765
|
+
e[71](
|
|
1766
1766
|
/*i*/
|
|
1767
|
-
e[
|
|
1767
|
+
e[86]
|
|
1768
1768
|
)
|
|
1769
1769
|
);
|
|
1770
1770
|
}
|
|
1771
1771
|
function l() {
|
|
1772
1772
|
return (
|
|
1773
1773
|
/*focus_handler_1*/
|
|
1774
|
-
e[
|
|
1774
|
+
e[72](
|
|
1775
1775
|
/*feature*/
|
|
1776
|
-
e[
|
|
1776
|
+
e[84]
|
|
1777
1777
|
)
|
|
1778
1778
|
);
|
|
1779
1779
|
}
|
|
1780
|
-
return
|
|
1780
|
+
return i = new nr({
|
|
1781
1781
|
props: {
|
|
1782
1782
|
feature: (
|
|
1783
1783
|
/*feature*/
|
|
1784
|
-
e[
|
|
1784
|
+
e[84]
|
|
1785
1785
|
),
|
|
1786
1786
|
showPlaceType: (
|
|
1787
1787
|
/*showPlaceType*/
|
|
@@ -1790,7 +1790,7 @@ function _i(i, e) {
|
|
|
1790
1790
|
selected: (
|
|
1791
1791
|
/*selectedItemIndex*/
|
|
1792
1792
|
e[15] === /*i*/
|
|
1793
|
-
e[
|
|
1793
|
+
e[86]
|
|
1794
1794
|
),
|
|
1795
1795
|
missingIconsCache: (
|
|
1796
1796
|
/*missingIconsCache*/
|
|
@@ -1801,161 +1801,161 @@ function _i(i, e) {
|
|
|
1801
1801
|
e[12]
|
|
1802
1802
|
)
|
|
1803
1803
|
}
|
|
1804
|
-
}),
|
|
1805
|
-
key:
|
|
1804
|
+
}), i.$on("mouseenter", o), i.$on("focus", l), {
|
|
1805
|
+
key: n,
|
|
1806
1806
|
first: null,
|
|
1807
1807
|
c() {
|
|
1808
|
-
t =
|
|
1808
|
+
t = Rn(), Le(i.$$.fragment), this.first = t;
|
|
1809
1809
|
},
|
|
1810
1810
|
m(s, c) {
|
|
1811
|
-
U(s, t, c), ge(
|
|
1811
|
+
U(s, t, c), ge(i, s, c), r = !0;
|
|
1812
1812
|
},
|
|
1813
1813
|
p(s, c) {
|
|
1814
1814
|
e = s;
|
|
1815
1815
|
const u = {};
|
|
1816
1816
|
c[0] & /*listFeatures*/
|
|
1817
1817
|
16384 && (u.feature = /*feature*/
|
|
1818
|
-
e[
|
|
1818
|
+
e[84]), c[0] & /*showPlaceType*/
|
|
1819
1819
|
1024 && (u.showPlaceType = /*showPlaceType*/
|
|
1820
1820
|
e[10]), c[0] & /*selectedItemIndex, listFeatures*/
|
|
1821
1821
|
49152 && (u.selected = /*selectedItemIndex*/
|
|
1822
1822
|
e[15] === /*i*/
|
|
1823
|
-
e[
|
|
1823
|
+
e[86]), c[0] & /*iconsBaseUrl*/
|
|
1824
1824
|
4096 && (u.iconsBaseUrl = /*iconsBaseUrl*/
|
|
1825
|
-
e[12]),
|
|
1825
|
+
e[12]), i.$set(u);
|
|
1826
1826
|
},
|
|
1827
1827
|
i(s) {
|
|
1828
|
-
r || (G(
|
|
1828
|
+
r || (G(i.$$.fragment, s), r = !0);
|
|
1829
1829
|
},
|
|
1830
1830
|
o(s) {
|
|
1831
|
-
Y(
|
|
1831
|
+
Y(i.$$.fragment, s), r = !1;
|
|
1832
1832
|
},
|
|
1833
1833
|
d(s) {
|
|
1834
|
-
s && F(t),
|
|
1834
|
+
s && F(t), me(i, s);
|
|
1835
1835
|
}
|
|
1836
1836
|
};
|
|
1837
1837
|
}
|
|
1838
|
-
function
|
|
1839
|
-
let e, t,
|
|
1840
|
-
o = new
|
|
1838
|
+
function kr(n) {
|
|
1839
|
+
let e, t, i, r, o, l, s, c, u, d, a, f, h, m, y, b, w, L, S, E, M, C = !1;
|
|
1840
|
+
o = new ar({}), a = new Di({});
|
|
1841
1841
|
let v = (
|
|
1842
1842
|
/*abortController*/
|
|
1843
|
-
|
|
1843
|
+
n[19] && yi()
|
|
1844
1844
|
), _ = (
|
|
1845
1845
|
/*enableReverse*/
|
|
1846
|
-
|
|
1846
|
+
n[5] === "button" && pi(n)
|
|
1847
1847
|
);
|
|
1848
1848
|
const k = (
|
|
1849
1849
|
/*#slots*/
|
|
1850
|
-
|
|
1851
|
-
), I =
|
|
1850
|
+
n[61].default
|
|
1851
|
+
), I = kn(
|
|
1852
1852
|
k,
|
|
1853
|
-
|
|
1853
|
+
n,
|
|
1854
1854
|
/*$$scope*/
|
|
1855
|
-
|
|
1855
|
+
n[60],
|
|
1856
1856
|
null
|
|
1857
|
-
),
|
|
1857
|
+
), H = [Mr, xr, Sr, Lr], O = [];
|
|
1858
1858
|
function J(x, A) {
|
|
1859
|
-
var
|
|
1859
|
+
var oe, ce;
|
|
1860
1860
|
return (
|
|
1861
1861
|
/*error*/
|
|
1862
1862
|
x[18] ? 0 : (
|
|
1863
1863
|
/*focusedDelayed*/
|
|
1864
1864
|
x[16] ? (
|
|
1865
1865
|
/*listFeatures*/
|
|
1866
|
-
((
|
|
1866
|
+
((oe = x[14]) == null ? void 0 : oe.length) === 0 ? 2 : (
|
|
1867
1867
|
/*focusedDelayed*/
|
|
1868
1868
|
x[16] && /*listFeatures*/
|
|
1869
|
-
((
|
|
1869
|
+
((ce = x[14]) != null && ce.length) ? 3 : -1
|
|
1870
1870
|
)
|
|
1871
1871
|
) : 1
|
|
1872
1872
|
)
|
|
1873
1873
|
);
|
|
1874
1874
|
}
|
|
1875
|
-
return ~(b = J(
|
|
1875
|
+
return ~(b = J(n)) && (w = O[b] = H[b](n)), {
|
|
1876
1876
|
c() {
|
|
1877
|
-
e = ie(), t = W("form"),
|
|
1877
|
+
e = ie(), t = W("form"), i = W("div"), r = W("button"), Le(o.$$.fragment), l = ie(), s = W("input"), c = ie(), u = W("div"), d = W("button"), Le(a.$$.fragment), f = ie(), v && v.c(), h = ie(), _ && _.c(), m = ie(), I && I.c(), y = ie(), w && w.c(), p(r, "class", "search-button svelte-bz0zu3"), p(r, "type", "button"), p(
|
|
1878
1878
|
s,
|
|
1879
1879
|
"placeholder",
|
|
1880
1880
|
/*placeholder*/
|
|
1881
|
-
|
|
1881
|
+
n[8]
|
|
1882
1882
|
), p(
|
|
1883
1883
|
s,
|
|
1884
1884
|
"aria-label",
|
|
1885
1885
|
/*placeholder*/
|
|
1886
|
-
|
|
1886
|
+
n[8]
|
|
1887
1887
|
), p(s, "class", "svelte-bz0zu3"), p(d, "type", "button"), p(
|
|
1888
1888
|
d,
|
|
1889
1889
|
"title",
|
|
1890
1890
|
/*clearButtonTitle*/
|
|
1891
|
-
|
|
1892
|
-
), p(d, "class", "svelte-bz0zu3"), p(u, "class", "clear-button-container svelte-bz0zu3"),
|
|
1891
|
+
n[3]
|
|
1892
|
+
), p(d, "class", "svelte-bz0zu3"), p(u, "class", "clear-button-container svelte-bz0zu3"), be(
|
|
1893
1893
|
u,
|
|
1894
1894
|
"displayable",
|
|
1895
1895
|
/*searchValue*/
|
|
1896
|
-
|
|
1897
|
-
), p(
|
|
1896
|
+
n[1] !== ""
|
|
1897
|
+
), p(i, "class", "input-group svelte-bz0zu3"), p(t, "tabindex", "0"), p(t, "class", L = ii(
|
|
1898
1898
|
/*className*/
|
|
1899
|
-
|
|
1900
|
-
) + " svelte-bz0zu3"),
|
|
1899
|
+
n[2]
|
|
1900
|
+
) + " svelte-bz0zu3"), be(
|
|
1901
1901
|
t,
|
|
1902
1902
|
"can-collapse",
|
|
1903
1903
|
/*collapsed*/
|
|
1904
|
-
|
|
1905
|
-
|
|
1904
|
+
n[4] && /*searchValue*/
|
|
1905
|
+
n[1] === ""
|
|
1906
1906
|
);
|
|
1907
1907
|
},
|
|
1908
1908
|
m(x, A) {
|
|
1909
|
-
U(x, e, A), U(x, t, A),
|
|
1909
|
+
U(x, e, A), U(x, t, A), T(t, i), T(i, r), ge(o, r, null), T(i, l), T(i, s), n[63](s), ni(
|
|
1910
1910
|
s,
|
|
1911
1911
|
/*searchValue*/
|
|
1912
|
-
|
|
1913
|
-
),
|
|
1912
|
+
n[1]
|
|
1913
|
+
), T(i, c), T(i, u), T(u, d), ge(a, d, null), T(u, f), v && v.m(u, null), T(i, h), _ && _.m(i, null), T(i, m), I && I.m(i, null), T(t, y), ~b && O[b].m(t, null), S = !0, E || (M = [
|
|
1914
1914
|
ee(
|
|
1915
1915
|
r,
|
|
1916
1916
|
"click",
|
|
1917
1917
|
/*click_handler*/
|
|
1918
|
-
|
|
1918
|
+
n[62]
|
|
1919
1919
|
),
|
|
1920
1920
|
ee(
|
|
1921
1921
|
s,
|
|
1922
1922
|
"input",
|
|
1923
1923
|
/*input_1_input_handler*/
|
|
1924
|
-
|
|
1924
|
+
n[64]
|
|
1925
1925
|
),
|
|
1926
1926
|
ee(
|
|
1927
1927
|
s,
|
|
1928
1928
|
"focus",
|
|
1929
1929
|
/*focus_handler*/
|
|
1930
|
-
|
|
1930
|
+
n[65]
|
|
1931
1931
|
),
|
|
1932
1932
|
ee(
|
|
1933
1933
|
s,
|
|
1934
1934
|
"blur",
|
|
1935
1935
|
/*blur_handler*/
|
|
1936
|
-
|
|
1936
|
+
n[66]
|
|
1937
1937
|
),
|
|
1938
1938
|
ee(
|
|
1939
1939
|
s,
|
|
1940
1940
|
"keydown",
|
|
1941
1941
|
/*handleKeyDown*/
|
|
1942
|
-
|
|
1942
|
+
n[22]
|
|
1943
1943
|
),
|
|
1944
1944
|
ee(
|
|
1945
1945
|
s,
|
|
1946
1946
|
"input",
|
|
1947
1947
|
/*input_handler*/
|
|
1948
|
-
|
|
1948
|
+
n[67]
|
|
1949
1949
|
),
|
|
1950
1950
|
ee(
|
|
1951
1951
|
d,
|
|
1952
1952
|
"click",
|
|
1953
1953
|
/*click_handler_1*/
|
|
1954
|
-
|
|
1954
|
+
n[68]
|
|
1955
1955
|
),
|
|
1956
|
-
ee(t, "submit",
|
|
1957
|
-
/*
|
|
1958
|
-
|
|
1956
|
+
ee(t, "submit", Tn(
|
|
1957
|
+
/*handleOnSubmit*/
|
|
1958
|
+
n[21]
|
|
1959
1959
|
))
|
|
1960
1960
|
], E = !0);
|
|
1961
1961
|
},
|
|
@@ -1974,7 +1974,7 @@ function Tr(i) {
|
|
|
1974
1974
|
x[8]
|
|
1975
1975
|
), A[0] & /*searchValue*/
|
|
1976
1976
|
2 && s.value !== /*searchValue*/
|
|
1977
|
-
x[1] &&
|
|
1977
|
+
x[1] && ni(
|
|
1978
1978
|
s,
|
|
1979
1979
|
/*searchValue*/
|
|
1980
1980
|
x[1]
|
|
@@ -1986,46 +1986,46 @@ function Tr(i) {
|
|
|
1986
1986
|
x[3]
|
|
1987
1987
|
), /*abortController*/
|
|
1988
1988
|
x[19] ? v ? A[0] & /*abortController*/
|
|
1989
|
-
524288 && G(v, 1) : (v =
|
|
1989
|
+
524288 && G(v, 1) : (v = yi(), v.c(), G(v, 1), v.m(u, null)) : v && (rt(), Y(v, 1, 1, () => {
|
|
1990
1990
|
v = null;
|
|
1991
|
-
}),
|
|
1992
|
-
2) &&
|
|
1991
|
+
}), ot()), (!S || A[0] & /*searchValue*/
|
|
1992
|
+
2) && be(
|
|
1993
1993
|
u,
|
|
1994
1994
|
"displayable",
|
|
1995
1995
|
/*searchValue*/
|
|
1996
1996
|
x[1] !== ""
|
|
1997
1997
|
), /*enableReverse*/
|
|
1998
1998
|
x[5] === "button" ? _ ? (_.p(x, A), A[0] & /*enableReverse*/
|
|
1999
|
-
32 && G(_, 1)) : (_ =
|
|
1999
|
+
32 && G(_, 1)) : (_ = pi(x), _.c(), G(_, 1), _.m(i, m)) : _ && (rt(), Y(_, 1, 1, () => {
|
|
2000
2000
|
_ = null;
|
|
2001
|
-
}),
|
|
2002
|
-
|
|
2001
|
+
}), ot()), I && I.p && (!S || A[1] & /*$$scope*/
|
|
2002
|
+
536870912) && Nn(
|
|
2003
2003
|
I,
|
|
2004
2004
|
k,
|
|
2005
2005
|
x,
|
|
2006
2006
|
/*$$scope*/
|
|
2007
|
-
x[
|
|
2008
|
-
S ?
|
|
2007
|
+
x[60],
|
|
2008
|
+
S ? Cn(
|
|
2009
2009
|
k,
|
|
2010
2010
|
/*$$scope*/
|
|
2011
|
-
x[
|
|
2011
|
+
x[60],
|
|
2012
2012
|
A,
|
|
2013
2013
|
null
|
|
2014
|
-
) :
|
|
2014
|
+
) : Pn(
|
|
2015
2015
|
/*$$scope*/
|
|
2016
|
-
x[
|
|
2016
|
+
x[60]
|
|
2017
2017
|
),
|
|
2018
2018
|
null
|
|
2019
2019
|
);
|
|
2020
|
-
let
|
|
2021
|
-
b = J(x), b ===
|
|
2022
|
-
O[
|
|
2023
|
-
}),
|
|
2024
|
-
4 && L !== (L =
|
|
2020
|
+
let oe = b;
|
|
2021
|
+
b = J(x), b === oe ? ~b && O[b].p(x, A) : (w && (rt(), Y(O[oe], 1, 1, () => {
|
|
2022
|
+
O[oe] = null;
|
|
2023
|
+
}), ot()), ~b ? (w = O[b], w ? w.p(x, A) : (w = O[b] = H[b](x), w.c()), G(w, 1), w.m(t, null)) : w = null), (!S || A[0] & /*className*/
|
|
2024
|
+
4 && L !== (L = ii(
|
|
2025
2025
|
/*className*/
|
|
2026
2026
|
x[2]
|
|
2027
2027
|
) + " svelte-bz0zu3")) && p(t, "class", L), (!S || A[0] & /*className, collapsed, searchValue*/
|
|
2028
|
-
22) &&
|
|
2028
|
+
22) && be(
|
|
2029
2029
|
t,
|
|
2030
2030
|
"can-collapse",
|
|
2031
2031
|
/*collapsed*/
|
|
@@ -2040,12 +2040,12 @@ function Tr(i) {
|
|
|
2040
2040
|
Y(C), Y(o.$$.fragment, x), Y(a.$$.fragment, x), Y(v), Y(_), Y(I, x), Y(w), S = !1;
|
|
2041
2041
|
},
|
|
2042
2042
|
d(x) {
|
|
2043
|
-
x && (F(e), F(t)),
|
|
2043
|
+
x && (F(e), F(t)), me(o), n[63](null), me(a), v && v.d(), _ && _.d(), I && I.d(x), ~b && O[b].d(), E = !1, ye(M);
|
|
2044
2044
|
}
|
|
2045
2045
|
};
|
|
2046
2046
|
}
|
|
2047
|
-
function
|
|
2048
|
-
let
|
|
2047
|
+
function Cr(n, e, t) {
|
|
2048
|
+
let i, r, { $$slots: o = {}, $$scope: l } = e;
|
|
2049
2049
|
const s = {
|
|
2050
2050
|
continental_marine: 4,
|
|
2051
2051
|
country: 4,
|
|
@@ -2070,76 +2070,69 @@ function Rr(i, e, t) {
|
|
|
2070
2070
|
"poi.restaurant": 18,
|
|
2071
2071
|
"poi.aerodrome": 13
|
|
2072
2072
|
};
|
|
2073
|
-
let { class: c = void 0 } = e, { apiKey: u } = e, { bbox: d = void 0 } = e, { clearButtonTitle: a = "clear" } = e, { clearOnBlur: f = !1 } = e, { collapsed: h = !1 } = e, { country:
|
|
2073
|
+
let { class: c = void 0 } = e, { apiKey: u } = e, { bbox: d = void 0 } = e, { clearButtonTitle: a = "clear" } = e, { clearOnBlur: f = !1 } = e, { collapsed: h = !1 } = e, { country: m = void 0 } = e, { debounceSearch: y = 200 } = e, { enableReverse: b = "never" } = e, { errorMessage: w = "Something went wrong…" } = e, { filter: L = () => !0 } = e, { flyTo: S = !0 } = e, { fuzzyMatch: E = !0 } = e, { language: M = void 0 } = e, { limit: C = void 0 } = e, { mapController: v = void 0 } = e, { minLength: _ = 2 } = e, { noResultsMessage: k = "Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!" } = e, { placeholder: I = "Search" } = e, { proximity: H = [{ type: "server-geolocation" }] } = e, { reverseActive: O = b === "always" } = e, { reverseButtonTitle: J = "toggle reverse geocoding" } = e, { searchValue: x = "" } = e, { pickedResultStyle: A = "full-geometry" } = e, { showPlaceType: oe = "if-needed" } = e, { showResultsWhileTyping: ce = !0 } = e, { selectFirst: Ie = !0 } = e, { flyToSelected: ft = !1 } = e, { markerOnSelected: Ye = !0 } = e, { types: Me = void 0 } = e, { exhaustiveReverseGeocoding: dt = !1 } = e, { excludeTypes: Xe = !1 } = e, { zoom: Ke = s } = e, { apiUrl: ht = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: gt = {} } = e, { iconsBaseUrl: Gt = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.0.1/icons/" } = e, { adjustUrlQuery: mt = () => {
|
|
2074
2074
|
} } = e;
|
|
2075
|
-
function
|
|
2076
|
-
|
|
2075
|
+
function Vi() {
|
|
2076
|
+
le.focus();
|
|
2077
2077
|
}
|
|
2078
|
-
function
|
|
2079
|
-
|
|
2078
|
+
function Zi() {
|
|
2079
|
+
le.blur();
|
|
2080
2080
|
}
|
|
2081
|
-
function
|
|
2082
|
-
t(1, x =
|
|
2083
|
-
|
|
2081
|
+
function jt(g, B = !0, Q = !1) {
|
|
2082
|
+
t(1, x = g), B ? (t(15, z = -1), Qt()) : (bt(!Q, Q), setTimeout(() => {
|
|
2083
|
+
le.focus(), le.select();
|
|
2084
2084
|
}));
|
|
2085
2085
|
}
|
|
2086
|
-
function
|
|
2087
|
-
t(14,
|
|
2088
|
-
}
|
|
2089
|
-
function Ji() {
|
|
2090
|
-
t(56, j = []), t(57, N = void 0);
|
|
2086
|
+
function Hi() {
|
|
2087
|
+
t(14, R = void 0), t(56, N = void 0), t(15, z = -1);
|
|
2091
2088
|
}
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
function en() {
|
|
2095
|
-
return !!ne;
|
|
2089
|
+
function Yi() {
|
|
2090
|
+
t(55, j = []), t(56, N = void 0);
|
|
2096
2091
|
}
|
|
2097
|
-
|
|
2092
|
+
let Oe = !1, R, j, N, qt = "", le, z = -1, ue, Je = [], ke, We, $e, yt;
|
|
2093
|
+
const Xi = /* @__PURE__ */ new Set(), pe = An();
|
|
2094
|
+
Wn(() => {
|
|
2098
2095
|
v && (v.setEventHandler(void 0), v.indicateReverse(!1), v.setSelectedMarker(-1), v.setFeatures(void 0, void 0, !1));
|
|
2099
2096
|
});
|
|
2100
|
-
function
|
|
2101
|
-
if (
|
|
2102
|
-
|
|
2103
|
-
return;
|
|
2104
|
-
}
|
|
2105
|
-
if (z > -1 && T)
|
|
2106
|
-
t(57, N = T[z]), t(1, x = N.place_type[0] === "reverse" ? N.place_name : N.place_name.replace(/,.*/, "")), t(18, ce = void 0), t(56, j = void 0), t(15, z = -1);
|
|
2097
|
+
function Qt(g) {
|
|
2098
|
+
if (We && (clearTimeout(We), We = void 0), z > -1 && R)
|
|
2099
|
+
t(56, N = R[z]), t(1, x = N.place_type[0] === "reverse" ? N.place_name : N.place_name.replace(/,.*/, "")), t(18, ue = void 0), t(55, j = void 0), t(15, z = -1);
|
|
2107
2100
|
else if (x) {
|
|
2108
|
-
const B =
|
|
2109
|
-
|
|
2110
|
-
t(
|
|
2111
|
-
}).catch((
|
|
2101
|
+
const B = g || !pt(x);
|
|
2102
|
+
vt(x, { exact: !0 }).then(() => {
|
|
2103
|
+
t(55, j = R), t(56, N = void 0), B && Ki();
|
|
2104
|
+
}).catch((Q) => t(18, ue = Q));
|
|
2112
2105
|
}
|
|
2113
2106
|
}
|
|
2114
|
-
function
|
|
2107
|
+
function pt(g) {
|
|
2115
2108
|
try {
|
|
2116
|
-
return
|
|
2109
|
+
return Er(g, 6);
|
|
2117
2110
|
} catch {
|
|
2118
2111
|
return !1;
|
|
2119
2112
|
}
|
|
2120
2113
|
}
|
|
2121
|
-
async function
|
|
2122
|
-
t(18,
|
|
2114
|
+
async function vt(g, { byId: B = !1, exact: Q = !1 } = {}) {
|
|
2115
|
+
t(18, ue = void 0), ke == null || ke.abort();
|
|
2123
2116
|
const te = new AbortController();
|
|
2124
|
-
t(19,
|
|
2117
|
+
t(19, ke = te);
|
|
2125
2118
|
try {
|
|
2126
|
-
const P =
|
|
2127
|
-
if (M !== void 0 &&
|
|
2128
|
-
const
|
|
2129
|
-
|
|
2119
|
+
const P = pt(g), q = new URLSearchParams();
|
|
2120
|
+
if (M !== void 0 && q.set("language", Array.isArray(M) ? M.join(",") : M ?? ""), Me && q.set("types", Me.join(",")), Xe && q.set("excludeTypes", String(Xe)), d && q.set("bbox", d.map((et) => et.toFixed(6)).join(",")), m && q.set("country", Array.isArray(m) ? m.join(",") : m), !B && !P) {
|
|
2121
|
+
const et = await fr(v, H, te);
|
|
2122
|
+
et && q.set("proximity", et), (Q || !ce) && q.set("autocomplete", "false"), q.set("fuzzyMatch", String(E));
|
|
2130
2123
|
}
|
|
2131
|
-
C !== void 0 && (
|
|
2132
|
-
const
|
|
2133
|
-
if (
|
|
2134
|
-
B ? (t(14,
|
|
2124
|
+
C !== void 0 && (dt || !P || (Me == null ? void 0 : Me.length) === 1) && q.set("limit", String(C)), q.set("key", u), mt(q);
|
|
2125
|
+
const ae = ht + "/" + encodeURIComponent(P ? P.decimalLongitude + "," + P.decimalLatitude : g) + ".json?" + q.toString();
|
|
2126
|
+
if (ae === qt) {
|
|
2127
|
+
B ? (t(14, R = void 0), t(56, N = Je[0])) : t(14, R = Je);
|
|
2135
2128
|
return;
|
|
2136
2129
|
}
|
|
2137
|
-
|
|
2138
|
-
const
|
|
2139
|
-
if (!
|
|
2140
|
-
throw new Error(await
|
|
2141
|
-
const
|
|
2142
|
-
|
|
2130
|
+
qt = ae;
|
|
2131
|
+
const _t = await fetch(ae, { signal: te.signal, ...gt });
|
|
2132
|
+
if (!_t.ok)
|
|
2133
|
+
throw new Error(await _t.text());
|
|
2134
|
+
const Et = await _t.json();
|
|
2135
|
+
pe("response", { url: ae, featureCollection: Et }), B ? (t(14, R = void 0), t(56, N = Et.features[0]), Je = [N]) : (t(14, R = Et.features.filter(L)), P && R.unshift({
|
|
2143
2136
|
type: "Feature",
|
|
2144
2137
|
properties: {},
|
|
2145
2138
|
id: "reverse_" + P.decimalLongitude + "_" + P.decimalLatitude,
|
|
@@ -2157,148 +2150,143 @@ function Rr(i, e, t) {
|
|
|
2157
2150
|
type: "Point",
|
|
2158
2151
|
coordinates: [P.decimalLongitude, P.decimalLatitude]
|
|
2159
2152
|
}
|
|
2160
|
-
}),
|
|
2153
|
+
}), Je = R, P && le.focus());
|
|
2161
2154
|
} catch (P) {
|
|
2162
2155
|
if (P && typeof P == "object" && "name" in P && P.name === "AbortError")
|
|
2163
2156
|
return;
|
|
2164
2157
|
throw P;
|
|
2165
2158
|
} finally {
|
|
2166
|
-
te ===
|
|
2159
|
+
te === ke && t(19, ke = void 0);
|
|
2167
2160
|
}
|
|
2168
2161
|
}
|
|
2169
|
-
function
|
|
2170
|
-
var
|
|
2162
|
+
function Ki() {
|
|
2163
|
+
var te;
|
|
2171
2164
|
if (!(j != null && j.length) || !S)
|
|
2172
2165
|
return;
|
|
2173
|
-
const
|
|
2174
|
-
let
|
|
2175
|
-
for (const
|
|
2176
|
-
const
|
|
2177
|
-
if (
|
|
2178
|
-
for (const
|
|
2179
|
-
|
|
2166
|
+
const g = [180, 90, -180, -90], B = !j.some((P) => !P.matching_text);
|
|
2167
|
+
let Q;
|
|
2168
|
+
for (const P of j) {
|
|
2169
|
+
const q = De(P);
|
|
2170
|
+
if (Q = Q === void 0 ? q : q === void 0 ? Q : Math.max(Q, q), B || !P.matching_text)
|
|
2171
|
+
for (const ae of [0, 1, 2, 3])
|
|
2172
|
+
g[ae] = Math[ae < 2 ? "min" : "max"](g[ae], ((te = P.bbox) == null ? void 0 : te[ae]) ?? P.center[ae % 2]);
|
|
2180
2173
|
}
|
|
2181
|
-
v && j.length > 0 && (N &&
|
|
2174
|
+
v && j.length > 0 && (N && g[0] === g[2] && g[1] === g[3] ? v.flyTo(N.center, De(N)) : v.fitBounds(lt(g), 50, Q));
|
|
2182
2175
|
}
|
|
2183
|
-
function
|
|
2184
|
-
var
|
|
2185
|
-
if (!
|
|
2176
|
+
function De(g) {
|
|
2177
|
+
var Q;
|
|
2178
|
+
if (!g.bbox || g.bbox[0] !== g.bbox[2] && g.bbox[1] !== g.bbox[3])
|
|
2186
2179
|
return;
|
|
2187
|
-
const B =
|
|
2188
|
-
return (Array.isArray((
|
|
2189
|
-
(
|
|
2190
|
-
const
|
|
2191
|
-
return
|
|
2180
|
+
const B = g.id.replace(/\..*/, "");
|
|
2181
|
+
return (Array.isArray((Q = g.properties) == null ? void 0 : Q.categories) ? g.properties.categories.reduce(
|
|
2182
|
+
(te, P) => {
|
|
2183
|
+
const q = Ke[B + "." + P];
|
|
2184
|
+
return te === void 0 ? q : q === void 0 ? te : Math.max(te, q);
|
|
2192
2185
|
},
|
|
2193
2186
|
void 0
|
|
2194
|
-
) : void 0) ??
|
|
2187
|
+
) : void 0) ?? Ke[B];
|
|
2195
2188
|
}
|
|
2196
|
-
function
|
|
2197
|
-
t(0, O = b === "always"), t(14,
|
|
2189
|
+
function Ji(g) {
|
|
2190
|
+
t(0, O = b === "always"), t(14, R = void 0), t(56, N = void 0), t(15, z = -1), jt(g[1].toFixed(6) + ", " + cr(g[0], [-180, 180], !0).toFixed(6), !1, !0);
|
|
2198
2191
|
}
|
|
2199
|
-
function
|
|
2200
|
-
if (!
|
|
2192
|
+
function $i(g) {
|
|
2193
|
+
if (!R)
|
|
2201
2194
|
return;
|
|
2202
|
-
let B =
|
|
2203
|
-
B && (z === (
|
|
2195
|
+
let B = g.key === "ArrowDown" ? 1 : g.key === "ArrowUp" ? -1 : 0;
|
|
2196
|
+
B && (z === (Ie ? 0 : -1) && B === -1 && t(15, z = R.length), t(15, z += B), z >= R.length && t(15, z = -1), z < 0 && Ie && t(15, z = 0), g.preventDefault());
|
|
2204
2197
|
}
|
|
2205
|
-
function
|
|
2206
|
-
if (t(18,
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
()
|
|
2218
|
-
t(58, ne = void 0), Ue(q, { appendSpace: !0 }).catch((re) => t(18, ce = re));
|
|
2219
|
-
},
|
|
2220
|
-
mt
|
|
2221
|
-
));
|
|
2198
|
+
function bt(g = !0, B = !1) {
|
|
2199
|
+
if (t(18, ue = void 0), ce || B) {
|
|
2200
|
+
if (We && clearTimeout(We), x.length < _)
|
|
2201
|
+
return;
|
|
2202
|
+
const Q = x;
|
|
2203
|
+
We = window.setTimeout(
|
|
2204
|
+
() => {
|
|
2205
|
+
vt(Q).catch((te) => t(18, ue = te));
|
|
2206
|
+
},
|
|
2207
|
+
g ? y : 0
|
|
2208
|
+
);
|
|
2209
|
+
} else
|
|
2210
|
+
t(14, R = void 0), t(18, ue = void 0);
|
|
2222
2211
|
}
|
|
2223
|
-
function
|
|
2224
|
-
t(
|
|
2212
|
+
function wt(g) {
|
|
2213
|
+
t(56, N = g), t(1, x = g.place_name), t(15, z = -1);
|
|
2225
2214
|
}
|
|
2226
|
-
const
|
|
2227
|
-
function
|
|
2228
|
-
|
|
2229
|
-
|
|
2215
|
+
const en = () => le.focus();
|
|
2216
|
+
function tn(g) {
|
|
2217
|
+
Nt[g ? "unshift" : "push"](() => {
|
|
2218
|
+
le = g, t(17, le);
|
|
2230
2219
|
});
|
|
2231
2220
|
}
|
|
2232
|
-
function
|
|
2233
|
-
x = this.value, t(1, x), t(13,
|
|
2221
|
+
function nn() {
|
|
2222
|
+
x = this.value, t(1, x), t(13, Oe), t(28, f);
|
|
2234
2223
|
}
|
|
2235
|
-
const
|
|
2236
|
-
t(1, x = ""),
|
|
2237
|
-
},
|
|
2238
|
-
|
|
2239
|
-
},
|
|
2224
|
+
const rn = () => t(13, Oe = !0), on = () => t(13, Oe = !1), sn = () => bt(), ln = () => {
|
|
2225
|
+
t(1, x = ""), le.focus();
|
|
2226
|
+
}, un = () => t(0, O = !O), an = () => t(18, ue = void 0), cn = (g) => t(15, z = g), fn = (g) => wt(g), dn = () => {
|
|
2227
|
+
Ie || t(15, z = -1);
|
|
2228
|
+
}, hn = () => {
|
|
2240
2229
|
};
|
|
2241
|
-
return
|
|
2242
|
-
"class" in
|
|
2243
|
-
},
|
|
2244
|
-
if (
|
|
2245
|
-
32 && t(0, O = b === "always"),
|
|
2230
|
+
return n.$$set = (g) => {
|
|
2231
|
+
"class" in g && t(2, c = g.class), "apiKey" in g && t(26, u = g.apiKey), "bbox" in g && t(27, d = g.bbox), "clearButtonTitle" in g && t(3, a = g.clearButtonTitle), "clearOnBlur" in g && t(28, f = g.clearOnBlur), "collapsed" in g && t(4, h = g.collapsed), "country" in g && t(29, m = g.country), "debounceSearch" in g && t(30, y = g.debounceSearch), "enableReverse" in g && t(5, b = g.enableReverse), "errorMessage" in g && t(6, w = g.errorMessage), "filter" in g && t(31, L = g.filter), "flyTo" in g && t(32, S = g.flyTo), "fuzzyMatch" in g && t(33, E = g.fuzzyMatch), "language" in g && t(34, M = g.language), "limit" in g && t(35, C = g.limit), "mapController" in g && t(36, v = g.mapController), "minLength" in g && t(37, _ = g.minLength), "noResultsMessage" in g && t(7, k = g.noResultsMessage), "placeholder" in g && t(8, I = g.placeholder), "proximity" in g && t(38, H = g.proximity), "reverseActive" in g && t(0, O = g.reverseActive), "reverseButtonTitle" in g && t(9, J = g.reverseButtonTitle), "searchValue" in g && t(1, x = g.searchValue), "pickedResultStyle" in g && t(39, A = g.pickedResultStyle), "showPlaceType" in g && t(10, oe = g.showPlaceType), "showResultsWhileTyping" in g && t(40, ce = g.showResultsWhileTyping), "selectFirst" in g && t(11, Ie = g.selectFirst), "flyToSelected" in g && t(41, ft = g.flyToSelected), "markerOnSelected" in g && t(42, Ye = g.markerOnSelected), "types" in g && t(43, Me = g.types), "exhaustiveReverseGeocoding" in g && t(44, dt = g.exhaustiveReverseGeocoding), "excludeTypes" in g && t(45, Xe = g.excludeTypes), "zoom" in g && t(46, Ke = g.zoom), "apiUrl" in g && t(47, ht = g.apiUrl), "fetchParameters" in g && t(48, gt = g.fetchParameters), "iconsBaseUrl" in g && t(12, Gt = g.iconsBaseUrl), "adjustUrlQuery" in g && t(49, mt = g.adjustUrlQuery), "$$scope" in g && t(60, l = g.$$scope);
|
|
2232
|
+
}, n.$$.update = () => {
|
|
2233
|
+
if (n.$$.dirty[0] & /*enableReverse*/
|
|
2234
|
+
32 && t(0, O = b === "always"), n.$$.dirty[0] & /*focused, clearOnBlur*/
|
|
2246
2235
|
268443648 && setTimeout(() => {
|
|
2247
|
-
t(16,
|
|
2248
|
-
}),
|
|
2249
|
-
16386 |
|
|
2250
|
-
64 && x.length < _ && (t(
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
18432 &&
|
|
2254
|
-
2 && t(15, z = -1),
|
|
2255
|
-
16384 |
|
|
2256
|
-
|
|
2257
|
-
81921 |
|
|
2258
|
-
|
|
2259
|
-
switch (
|
|
2236
|
+
t(16, $e = Oe), f && !Oe && t(1, x = "");
|
|
2237
|
+
}), n.$$.dirty[0] & /*searchValue, listFeatures*/
|
|
2238
|
+
16386 | n.$$.dirty[1] & /*minLength*/
|
|
2239
|
+
64 && x.length < _ && (t(56, N = void 0), t(14, R = void 0), t(18, ue = void 0), t(55, j = R)), n.$$.dirty[1] & /*pickedResultStyle, picked*/
|
|
2240
|
+
33554688 && A !== "marker-only" && N && !N.address && N.geometry.type === "Point" && N.place_type[0] !== "reverse" && vt(N.id, { byId: !0 }).catch((g) => t(18, ue = g)), n.$$.dirty[1] & /*mapController, picked, prevIdToFly, flyTo*/
|
|
2241
|
+
100663330 && (v && N && N.id !== yt && S && (!N.bbox || N.bbox[0] === N.bbox[2] && N.bbox[1] === N.bbox[3] ? v.flyTo(N.center, De(N)) : v.fitBounds(lt(N.bbox), 50, De(N)), t(14, R = void 0), t(55, j = void 0), t(15, z = -1)), t(57, yt = N == null ? void 0 : N.id)), n.$$.dirty[0] & /*selectFirst, listFeatures*/
|
|
2242
|
+
18432 && Ie && R != null && R.length && t(15, z = 0), n.$$.dirty[0] & /*searchValue*/
|
|
2243
|
+
2 && t(15, z = -1), n.$$.dirty[0] & /*listFeatures*/
|
|
2244
|
+
16384 | n.$$.dirty[1] & /*markedFeatures*/
|
|
2245
|
+
16777216 && j !== R && t(55, j = void 0), n.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
|
|
2246
|
+
81921 | n.$$.dirty[1] & /*mapController, markedFeatures*/
|
|
2247
|
+
16777248 && v && v.setEventHandler((g) => {
|
|
2248
|
+
switch (g.type) {
|
|
2260
2249
|
case "mapClick":
|
|
2261
|
-
O &&
|
|
2250
|
+
O && Ji(g.coordinates);
|
|
2262
2251
|
break;
|
|
2263
2252
|
case "markerClick":
|
|
2264
2253
|
{
|
|
2265
|
-
const B =
|
|
2266
|
-
B &&
|
|
2254
|
+
const B = R == null ? void 0 : R.find((Q) => Q.id === g.id);
|
|
2255
|
+
B && wt(B);
|
|
2267
2256
|
}
|
|
2268
2257
|
break;
|
|
2269
2258
|
case "markerMouseEnter":
|
|
2270
|
-
j && t(15, z =
|
|
2259
|
+
j && t(15, z = $e ? (R == null ? void 0 : R.findIndex((B) => B.id === g.id)) ?? -1 : -1);
|
|
2271
2260
|
break;
|
|
2272
2261
|
case "markerMouseLeave":
|
|
2273
2262
|
j && t(15, z = -1);
|
|
2274
2263
|
break;
|
|
2275
2264
|
}
|
|
2276
|
-
}),
|
|
2277
|
-
49152 && t(
|
|
2278
|
-
|
|
2279
|
-
256 && t(
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
32768 |
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
2 | i.$$.dirty[1] & /*mapController*/
|
|
2265
|
+
}), n.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
2266
|
+
49152 && t(58, r = R == null ? void 0 : R[z]), n.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
|
|
2267
|
+
134218786 && v && r && S && ft && v.flyTo(r.center, De(r)), n.$$.dirty[1] & /*pickedResultStyle*/
|
|
2268
|
+
256 && t(59, i = A === "full-geometry-including-polygon-center-marker"), n.$$.dirty[1] & /*markerOnSelected, mapController, showPolygonMarker*/
|
|
2269
|
+
268437536 && (Ye || v == null || v.setFeatures(void 0, void 0, i)), n.$$.dirty[1] & /*mapController, markerOnSelected, markedFeatures, selected, showPolygonMarker*/
|
|
2270
|
+
419432480 && v && Ye && !j && (v.setFeatures(r ? [r] : void 0, void 0, i), v.setSelectedMarker(r ? 0 : -1)), n.$$.dirty[1] & /*mapController, markedFeatures, picked, showPolygonMarker*/
|
|
2271
|
+
318767136 && v && v.setFeatures(j, N, i), n.$$.dirty[0] & /*selectedItemIndex*/
|
|
2272
|
+
32768 | n.$$.dirty[1] & /*markedFeatures, mapController*/
|
|
2273
|
+
16777248 && j && v && v.setSelectedMarker(z), n.$$.dirty[0] & /*searchValue*/
|
|
2274
|
+
2 | n.$$.dirty[1] & /*mapController*/
|
|
2287
2275
|
32 && v) {
|
|
2288
|
-
const
|
|
2289
|
-
v.setReverseMarker(
|
|
2276
|
+
const g = pt(x);
|
|
2277
|
+
v.setReverseMarker(g ? [g.decimalLongitude, g.decimalLatitude] : void 0);
|
|
2290
2278
|
}
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
81920 &&
|
|
2295
|
-
optionsVisible:
|
|
2296
|
-
}),
|
|
2297
|
-
16384 &&
|
|
2298
|
-
|
|
2299
|
-
1 &&
|
|
2300
|
-
2 &&
|
|
2301
|
-
1 |
|
|
2279
|
+
n.$$.dirty[1] & /*selected*/
|
|
2280
|
+
134217728 && pe("select", { feature: r }), n.$$.dirty[1] & /*picked*/
|
|
2281
|
+
33554432 && pe("pick", { feature: N }), n.$$.dirty[0] & /*focusedDelayed, listFeatures*/
|
|
2282
|
+
81920 && pe("optionsvisibilitychange", {
|
|
2283
|
+
optionsVisible: $e && !!R
|
|
2284
|
+
}), n.$$.dirty[0] & /*listFeatures*/
|
|
2285
|
+
16384 && pe("featureslisted", { features: R }), n.$$.dirty[1] & /*markedFeatures*/
|
|
2286
|
+
16777216 && pe("featuresmarked", { features: j }), n.$$.dirty[0] & /*reverseActive*/
|
|
2287
|
+
1 && pe("reversetoggle", { reverse: O }), n.$$.dirty[0] & /*searchValue*/
|
|
2288
|
+
2 && pe("querychange", { query: x }), n.$$.dirty[0] & /*reverseActive*/
|
|
2289
|
+
1 | n.$$.dirty[1] & /*mapController*/
|
|
2302
2290
|
32 && v && v.indicateReverse(O);
|
|
2303
2291
|
}, [
|
|
2304
2292
|
O,
|
|
@@ -2311,26 +2299,26 @@ function Rr(i, e, t) {
|
|
|
2311
2299
|
k,
|
|
2312
2300
|
I,
|
|
2313
2301
|
J,
|
|
2302
|
+
oe,
|
|
2303
|
+
Ie,
|
|
2304
|
+
Gt,
|
|
2305
|
+
Oe,
|
|
2306
|
+
R,
|
|
2307
|
+
z,
|
|
2308
|
+
$e,
|
|
2314
2309
|
le,
|
|
2315
|
-
|
|
2310
|
+
ue,
|
|
2311
|
+
ke,
|
|
2312
|
+
Xi,
|
|
2316
2313
|
Qt,
|
|
2317
|
-
Ae,
|
|
2318
|
-
T,
|
|
2319
|
-
z,
|
|
2320
|
-
tt,
|
|
2321
|
-
ae,
|
|
2322
|
-
ce,
|
|
2323
|
-
Ne,
|
|
2324
2314
|
$i,
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
Et,
|
|
2328
|
-
Lt,
|
|
2315
|
+
bt,
|
|
2316
|
+
wt,
|
|
2329
2317
|
s,
|
|
2330
2318
|
u,
|
|
2331
2319
|
d,
|
|
2332
2320
|
f,
|
|
2333
|
-
|
|
2321
|
+
m,
|
|
2334
2322
|
y,
|
|
2335
2323
|
L,
|
|
2336
2324
|
S,
|
|
@@ -2339,32 +2327,34 @@ function Rr(i, e, t) {
|
|
|
2339
2327
|
C,
|
|
2340
2328
|
v,
|
|
2341
2329
|
_,
|
|
2342
|
-
|
|
2330
|
+
H,
|
|
2343
2331
|
A,
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2332
|
+
ce,
|
|
2333
|
+
ft,
|
|
2334
|
+
Ye,
|
|
2335
|
+
Me,
|
|
2336
|
+
dt,
|
|
2337
|
+
Xe,
|
|
2347
2338
|
Ke,
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2339
|
+
ht,
|
|
2340
|
+
gt,
|
|
2341
|
+
mt,
|
|
2342
|
+
Vi,
|
|
2343
|
+
Zi,
|
|
2344
|
+
jt,
|
|
2345
|
+
Hi,
|
|
2355
2346
|
Yi,
|
|
2356
|
-
Xi,
|
|
2357
|
-
Vt,
|
|
2358
|
-
Ki,
|
|
2359
|
-
Ji,
|
|
2360
2347
|
j,
|
|
2361
2348
|
N,
|
|
2362
|
-
|
|
2363
|
-
wt,
|
|
2349
|
+
yt,
|
|
2364
2350
|
r,
|
|
2365
|
-
|
|
2351
|
+
i,
|
|
2366
2352
|
l,
|
|
2367
2353
|
o,
|
|
2354
|
+
en,
|
|
2355
|
+
tn,
|
|
2356
|
+
nn,
|
|
2357
|
+
rn,
|
|
2368
2358
|
on,
|
|
2369
2359
|
sn,
|
|
2370
2360
|
ln,
|
|
@@ -2373,21 +2363,17 @@ function Rr(i, e, t) {
|
|
|
2373
2363
|
cn,
|
|
2374
2364
|
fn,
|
|
2375
2365
|
dn,
|
|
2376
|
-
hn
|
|
2377
|
-
mn,
|
|
2378
|
-
gn,
|
|
2379
|
-
yn,
|
|
2380
|
-
pn
|
|
2366
|
+
hn
|
|
2381
2367
|
];
|
|
2382
2368
|
}
|
|
2383
|
-
let
|
|
2369
|
+
let Nr = class extends Te {
|
|
2384
2370
|
constructor(e) {
|
|
2385
|
-
super(),
|
|
2371
|
+
super(), Re(
|
|
2386
2372
|
this,
|
|
2387
2373
|
e,
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2374
|
+
Cr,
|
|
2375
|
+
kr,
|
|
2376
|
+
Pe,
|
|
2391
2377
|
{
|
|
2392
2378
|
ZOOM_DEFAULTS: 25,
|
|
2393
2379
|
class: 2,
|
|
@@ -2416,23 +2402,22 @@ let Ir = class extends Oe {
|
|
|
2416
2402
|
pickedResultStyle: 39,
|
|
2417
2403
|
showPlaceType: 10,
|
|
2418
2404
|
showResultsWhileTyping: 40,
|
|
2419
|
-
autocompleteTimeout: 41,
|
|
2420
2405
|
selectFirst: 11,
|
|
2421
|
-
flyToSelected:
|
|
2422
|
-
markerOnSelected:
|
|
2423
|
-
types:
|
|
2424
|
-
exhaustiveReverseGeocoding:
|
|
2425
|
-
excludeTypes:
|
|
2426
|
-
zoom:
|
|
2427
|
-
apiUrl:
|
|
2428
|
-
fetchParameters:
|
|
2406
|
+
flyToSelected: 41,
|
|
2407
|
+
markerOnSelected: 42,
|
|
2408
|
+
types: 43,
|
|
2409
|
+
exhaustiveReverseGeocoding: 44,
|
|
2410
|
+
excludeTypes: 45,
|
|
2411
|
+
zoom: 46,
|
|
2412
|
+
apiUrl: 47,
|
|
2413
|
+
fetchParameters: 48,
|
|
2429
2414
|
iconsBaseUrl: 12,
|
|
2430
|
-
adjustUrlQuery:
|
|
2431
|
-
focus:
|
|
2432
|
-
blur:
|
|
2433
|
-
setQuery:
|
|
2434
|
-
clearList:
|
|
2435
|
-
clearMap:
|
|
2415
|
+
adjustUrlQuery: 49,
|
|
2416
|
+
focus: 50,
|
|
2417
|
+
blur: 51,
|
|
2418
|
+
setQuery: 52,
|
|
2419
|
+
clearList: 53,
|
|
2420
|
+
clearMap: 54
|
|
2436
2421
|
},
|
|
2437
2422
|
null,
|
|
2438
2423
|
[-1, -1, -1]
|
|
@@ -2442,27 +2427,27 @@ let Ir = class extends Oe {
|
|
|
2442
2427
|
return this.$$.ctx[25];
|
|
2443
2428
|
}
|
|
2444
2429
|
get focus() {
|
|
2445
|
-
return this.$$.ctx[
|
|
2430
|
+
return this.$$.ctx[50];
|
|
2446
2431
|
}
|
|
2447
2432
|
get blur() {
|
|
2448
|
-
return this.$$.ctx[
|
|
2433
|
+
return this.$$.ctx[51];
|
|
2449
2434
|
}
|
|
2450
2435
|
get setQuery() {
|
|
2451
|
-
return this.$$.ctx[
|
|
2436
|
+
return this.$$.ctx[52];
|
|
2452
2437
|
}
|
|
2453
2438
|
get clearList() {
|
|
2454
|
-
return this.$$.ctx[
|
|
2439
|
+
return this.$$.ctx[53];
|
|
2455
2440
|
}
|
|
2456
2441
|
get clearMap() {
|
|
2457
|
-
return this.$$.ctx[
|
|
2442
|
+
return this.$$.ctx[54];
|
|
2458
2443
|
}
|
|
2459
2444
|
};
|
|
2460
|
-
function
|
|
2461
|
-
const
|
|
2462
|
-
return (t.id === 0 || t.id) && (
|
|
2445
|
+
function ut(n, e, t = {}) {
|
|
2446
|
+
const i = { type: "Feature" };
|
|
2447
|
+
return (t.id === 0 || t.id) && (i.id = t.id), t.bbox && (i.bbox = t.bbox), i.properties = e || {}, i.geometry = n, i;
|
|
2463
2448
|
}
|
|
2464
|
-
function
|
|
2465
|
-
for (const r of
|
|
2449
|
+
function Bt(n, e, t = {}) {
|
|
2450
|
+
for (const r of n) {
|
|
2466
2451
|
if (r.length < 4)
|
|
2467
2452
|
throw new Error(
|
|
2468
2453
|
"Each LinearRing of a Polygon must have 4 or more Positions."
|
|
@@ -2473,25 +2458,25 @@ function Gt(i, e, t = {}) {
|
|
|
2473
2458
|
if (r[r.length - 1][o] !== r[0][o])
|
|
2474
2459
|
throw new Error("First and last Position are not equivalent.");
|
|
2475
2460
|
}
|
|
2476
|
-
return
|
|
2461
|
+
return ut({
|
|
2477
2462
|
type: "Polygon",
|
|
2478
|
-
coordinates:
|
|
2463
|
+
coordinates: n
|
|
2479
2464
|
}, e, t);
|
|
2480
2465
|
}
|
|
2481
|
-
function
|
|
2466
|
+
function Tt(n, e = {}) {
|
|
2482
2467
|
const t = { type: "FeatureCollection" };
|
|
2483
|
-
return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features =
|
|
2468
|
+
return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = n, t;
|
|
2484
2469
|
}
|
|
2485
|
-
function
|
|
2486
|
-
return
|
|
2470
|
+
function Gi(n, e, t = {}) {
|
|
2471
|
+
return ut({
|
|
2487
2472
|
type: "MultiPolygon",
|
|
2488
|
-
coordinates:
|
|
2473
|
+
coordinates: n
|
|
2489
2474
|
}, e, t);
|
|
2490
2475
|
}
|
|
2491
|
-
function
|
|
2492
|
-
if (
|
|
2493
|
-
for (var
|
|
2494
|
-
u =
|
|
2476
|
+
function ji(n, e, t) {
|
|
2477
|
+
if (n !== null)
|
|
2478
|
+
for (var i, r, o, l, s, c, u, d = 0, a = 0, f, h = n.type, m = h === "FeatureCollection", y = h === "Feature", b = m ? n.features.length : 1, w = 0; w < b; w++) {
|
|
2479
|
+
u = m ? n.features[w].geometry : y ? n.geometry : n, f = u ? u.type === "GeometryCollection" : !1, s = f ? u.geometries.length : 1;
|
|
2495
2480
|
for (var L = 0; L < s; L++) {
|
|
2496
2481
|
var S = 0, E = 0;
|
|
2497
2482
|
if (l = f ? u.geometries[L] : u, l !== null) {
|
|
@@ -2513,9 +2498,9 @@ function Vi(i, e, t) {
|
|
|
2513
2498
|
break;
|
|
2514
2499
|
case "LineString":
|
|
2515
2500
|
case "MultiPoint":
|
|
2516
|
-
for (
|
|
2501
|
+
for (i = 0; i < c.length; i++) {
|
|
2517
2502
|
if (e(
|
|
2518
|
-
c[
|
|
2503
|
+
c[i],
|
|
2519
2504
|
a,
|
|
2520
2505
|
w,
|
|
2521
2506
|
S,
|
|
@@ -2528,10 +2513,10 @@ function Vi(i, e, t) {
|
|
|
2528
2513
|
break;
|
|
2529
2514
|
case "Polygon":
|
|
2530
2515
|
case "MultiLineString":
|
|
2531
|
-
for (
|
|
2532
|
-
for (r = 0; r < c[
|
|
2516
|
+
for (i = 0; i < c.length; i++) {
|
|
2517
|
+
for (r = 0; r < c[i].length - d; r++) {
|
|
2533
2518
|
if (e(
|
|
2534
|
-
c[
|
|
2519
|
+
c[i][r],
|
|
2535
2520
|
a,
|
|
2536
2521
|
w,
|
|
2537
2522
|
S,
|
|
@@ -2545,11 +2530,11 @@ function Vi(i, e, t) {
|
|
|
2545
2530
|
M === "Polygon" && S++;
|
|
2546
2531
|
break;
|
|
2547
2532
|
case "MultiPolygon":
|
|
2548
|
-
for (
|
|
2549
|
-
for (E = 0, r = 0; r < c[
|
|
2550
|
-
for (o = 0; o < c[
|
|
2533
|
+
for (i = 0; i < c.length; i++) {
|
|
2534
|
+
for (E = 0, r = 0; r < c[i].length; r++) {
|
|
2535
|
+
for (o = 0; o < c[i][r].length - d; o++) {
|
|
2551
2536
|
if (e(
|
|
2552
|
-
c[
|
|
2537
|
+
c[i][r][o],
|
|
2553
2538
|
a,
|
|
2554
2539
|
w,
|
|
2555
2540
|
S,
|
|
@@ -2564,8 +2549,8 @@ function Vi(i, e, t) {
|
|
|
2564
2549
|
}
|
|
2565
2550
|
break;
|
|
2566
2551
|
case "GeometryCollection":
|
|
2567
|
-
for (
|
|
2568
|
-
if (
|
|
2552
|
+
for (i = 0; i < l.geometries.length; i++)
|
|
2553
|
+
if (ji(l.geometries[i], e) === !1)
|
|
2569
2554
|
return !1;
|
|
2570
2555
|
break;
|
|
2571
2556
|
default:
|
|
@@ -2575,10 +2560,10 @@ function Vi(i, e, t) {
|
|
|
2575
2560
|
}
|
|
2576
2561
|
}
|
|
2577
2562
|
}
|
|
2578
|
-
function
|
|
2579
|
-
var t,
|
|
2563
|
+
function Dt(n, e) {
|
|
2564
|
+
var t, i, r, o, l, s, c, u, d, a, f = 0, h = n.type === "FeatureCollection", m = n.type === "Feature", y = h ? n.features.length : 1;
|
|
2580
2565
|
for (t = 0; t < y; t++) {
|
|
2581
|
-
for (s = h ?
|
|
2566
|
+
for (s = h ? n.features[t].geometry : m ? n.geometry : n, u = h ? n.features[t].properties : m ? n.properties : {}, d = h ? n.features[t].bbox : m ? n.bbox : void 0, a = h ? n.features[t].id : m ? n.id : void 0, c = s ? s.type === "GeometryCollection" : !1, l = c ? s.geometries.length : 1, r = 0; r < l; r++) {
|
|
2582
2567
|
if (o = c ? s.geometries[r] : s, o === null) {
|
|
2583
2568
|
if (e(
|
|
2584
2569
|
null,
|
|
@@ -2608,9 +2593,9 @@ function jt(i, e) {
|
|
|
2608
2593
|
break;
|
|
2609
2594
|
}
|
|
2610
2595
|
case "GeometryCollection": {
|
|
2611
|
-
for (
|
|
2596
|
+
for (i = 0; i < o.geometries.length; i++)
|
|
2612
2597
|
if (e(
|
|
2613
|
-
o.geometries[
|
|
2598
|
+
o.geometries[i],
|
|
2614
2599
|
f,
|
|
2615
2600
|
u,
|
|
2616
2601
|
d,
|
|
@@ -2626,8 +2611,8 @@ function jt(i, e) {
|
|
|
2626
2611
|
f++;
|
|
2627
2612
|
}
|
|
2628
2613
|
}
|
|
2629
|
-
function
|
|
2630
|
-
|
|
2614
|
+
function Pr(n, e) {
|
|
2615
|
+
Dt(n, function(t, i, r, o, l) {
|
|
2631
2616
|
var s = t === null ? null : t.type;
|
|
2632
2617
|
switch (s) {
|
|
2633
2618
|
case null:
|
|
@@ -2635,8 +2620,8 @@ function Or(i, e) {
|
|
|
2635
2620
|
case "LineString":
|
|
2636
2621
|
case "Polygon":
|
|
2637
2622
|
return e(
|
|
2638
|
-
|
|
2639
|
-
|
|
2623
|
+
ut(t, r, { bbox: o, id: l }),
|
|
2624
|
+
i,
|
|
2640
2625
|
0
|
|
2641
2626
|
) === !1 ? !1 : void 0;
|
|
2642
2627
|
}
|
|
@@ -2657,20 +2642,20 @@ function Or(i, e) {
|
|
|
2657
2642
|
type: c,
|
|
2658
2643
|
coordinates: d
|
|
2659
2644
|
};
|
|
2660
|
-
if (e(
|
|
2645
|
+
if (e(ut(a, r), i, u) === !1)
|
|
2661
2646
|
return !1;
|
|
2662
2647
|
}
|
|
2663
2648
|
});
|
|
2664
2649
|
}
|
|
2665
|
-
function
|
|
2666
|
-
if (
|
|
2667
|
-
return
|
|
2650
|
+
function Rr(n, e = {}) {
|
|
2651
|
+
if (n.bbox != null && e.recompute !== !0)
|
|
2652
|
+
return n.bbox;
|
|
2668
2653
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
2669
|
-
return
|
|
2670
|
-
t[0] >
|
|
2654
|
+
return ji(n, (i) => {
|
|
2655
|
+
t[0] > i[0] && (t[0] = i[0]), t[1] > i[1] && (t[1] = i[1]), t[2] < i[0] && (t[2] = i[0]), t[3] < i[1] && (t[3] = i[1]);
|
|
2671
2656
|
}), t;
|
|
2672
2657
|
}
|
|
2673
|
-
var
|
|
2658
|
+
var bi = Rr;
|
|
2674
2659
|
/**
|
|
2675
2660
|
* splaytree v3.1.2
|
|
2676
2661
|
* Fast Splay tree for Node and browser
|
|
@@ -2693,11 +2678,11 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
2693
2678
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
2694
2679
|
and limitations under the License.
|
|
2695
2680
|
***************************************************************************** */
|
|
2696
|
-
function
|
|
2681
|
+
function Tr(n, e) {
|
|
2697
2682
|
var t = { label: 0, sent: function() {
|
|
2698
2683
|
if (o[0] & 1) throw o[1];
|
|
2699
2684
|
return o[1];
|
|
2700
|
-
}, trys: [], ops: [] },
|
|
2685
|
+
}, trys: [], ops: [] }, i, r, o, l;
|
|
2701
2686
|
return l = { next: s(0), throw: s(1), return: s(2) }, typeof Symbol == "function" && (l[Symbol.iterator] = function() {
|
|
2702
2687
|
return this;
|
|
2703
2688
|
}), l;
|
|
@@ -2707,9 +2692,9 @@ function Ar(i, e) {
|
|
|
2707
2692
|
};
|
|
2708
2693
|
}
|
|
2709
2694
|
function c(u) {
|
|
2710
|
-
if (
|
|
2695
|
+
if (i) throw new TypeError("Generator is already executing.");
|
|
2711
2696
|
for (; t; ) try {
|
|
2712
|
-
if (
|
|
2697
|
+
if (i = 1, r && (o = u[0] & 2 ? r.return : u[0] ? r.throw || ((o = r.return) && o.call(r), 0) : r.next) && !(o = o.call(r, u[1])).done) return o;
|
|
2713
2698
|
switch (r = 0, o && (u = [u[0] & 2, o.value]), u[0]) {
|
|
2714
2699
|
case 0:
|
|
2715
2700
|
case 1:
|
|
@@ -2743,35 +2728,35 @@ function Ar(i, e) {
|
|
|
2743
2728
|
o[2] && t.ops.pop(), t.trys.pop();
|
|
2744
2729
|
continue;
|
|
2745
2730
|
}
|
|
2746
|
-
u = e.call(
|
|
2731
|
+
u = e.call(n, t);
|
|
2747
2732
|
} catch (d) {
|
|
2748
2733
|
u = [6, d], r = 0;
|
|
2749
2734
|
} finally {
|
|
2750
|
-
|
|
2735
|
+
i = o = 0;
|
|
2751
2736
|
}
|
|
2752
2737
|
if (u[0] & 5) throw u[1];
|
|
2753
2738
|
return { value: u[0] ? u[1] : void 0, done: !0 };
|
|
2754
2739
|
}
|
|
2755
2740
|
}
|
|
2756
|
-
var
|
|
2741
|
+
var Se = (
|
|
2757
2742
|
/** @class */
|
|
2758
2743
|
/* @__PURE__ */ function() {
|
|
2759
|
-
function
|
|
2744
|
+
function n(e, t) {
|
|
2760
2745
|
this.next = null, this.key = e, this.data = t, this.left = null, this.right = null;
|
|
2761
2746
|
}
|
|
2762
|
-
return
|
|
2747
|
+
return n;
|
|
2763
2748
|
}()
|
|
2764
2749
|
);
|
|
2765
|
-
function
|
|
2766
|
-
return
|
|
2750
|
+
function Ir(n, e) {
|
|
2751
|
+
return n > e ? 1 : n < e ? -1 : 0;
|
|
2767
2752
|
}
|
|
2768
|
-
function
|
|
2769
|
-
for (var
|
|
2770
|
-
var l = t(
|
|
2753
|
+
function ve(n, e, t) {
|
|
2754
|
+
for (var i = new Se(null, null), r = i, o = i; ; ) {
|
|
2755
|
+
var l = t(n, e.key);
|
|
2771
2756
|
if (l < 0) {
|
|
2772
2757
|
if (e.left === null)
|
|
2773
2758
|
break;
|
|
2774
|
-
if (t(
|
|
2759
|
+
if (t(n, e.left.key) < 0) {
|
|
2775
2760
|
var s = e.left;
|
|
2776
2761
|
if (e.left = s.right, s.right = e, e = s, e.left === null)
|
|
2777
2762
|
break;
|
|
@@ -2780,7 +2765,7 @@ function we(i, e, t) {
|
|
|
2780
2765
|
} else if (l > 0) {
|
|
2781
2766
|
if (e.right === null)
|
|
2782
2767
|
break;
|
|
2783
|
-
if (t(
|
|
2768
|
+
if (t(n, e.right.key) > 0) {
|
|
2784
2769
|
var s = e.right;
|
|
2785
2770
|
if (e.right = s.left, s.left = e, e = s, e.right === null)
|
|
2786
2771
|
break;
|
|
@@ -2789,128 +2774,128 @@ function we(i, e, t) {
|
|
|
2789
2774
|
} else
|
|
2790
2775
|
break;
|
|
2791
2776
|
}
|
|
2792
|
-
return r.right = e.left, o.left = e.right, e.left =
|
|
2777
|
+
return r.right = e.left, o.left = e.right, e.left = i.right, e.right = i.left, e;
|
|
2793
2778
|
}
|
|
2794
|
-
function
|
|
2795
|
-
var r = new
|
|
2779
|
+
function kt(n, e, t, i) {
|
|
2780
|
+
var r = new Se(n, e);
|
|
2796
2781
|
if (t === null)
|
|
2797
2782
|
return r.left = r.right = null, r;
|
|
2798
|
-
t =
|
|
2799
|
-
var o = n
|
|
2783
|
+
t = ve(n, t, i);
|
|
2784
|
+
var o = i(n, t.key);
|
|
2800
2785
|
return o < 0 ? (r.left = t.left, r.right = t, t.left = null) : o >= 0 && (r.right = t.right, r.left = t, t.right = null), r;
|
|
2801
2786
|
}
|
|
2802
|
-
function
|
|
2803
|
-
var
|
|
2787
|
+
function wi(n, e, t) {
|
|
2788
|
+
var i = null, r = null;
|
|
2804
2789
|
if (e) {
|
|
2805
|
-
e =
|
|
2806
|
-
var o = t(e.key,
|
|
2807
|
-
o === 0 ? (
|
|
2790
|
+
e = ve(n, e, t);
|
|
2791
|
+
var o = t(e.key, n);
|
|
2792
|
+
o === 0 ? (i = e.left, r = e.right) : o < 0 ? (r = e.right, e.right = null, i = e) : (i = e.left, e.left = null, r = e);
|
|
2808
2793
|
}
|
|
2809
|
-
return { left:
|
|
2794
|
+
return { left: i, right: r };
|
|
2810
2795
|
}
|
|
2811
|
-
function
|
|
2812
|
-
return e === null ?
|
|
2796
|
+
function Or(n, e, t) {
|
|
2797
|
+
return e === null ? n : (n === null || (e = ve(n.key, e, t), e.left = n), e);
|
|
2813
2798
|
}
|
|
2814
|
-
function
|
|
2815
|
-
if (
|
|
2816
|
-
|
|
2799
|
+
function It(n, e, t, i, r) {
|
|
2800
|
+
if (n) {
|
|
2801
|
+
i("" + e + (t ? "└── " : "├── ") + r(n) + `
|
|
2817
2802
|
`);
|
|
2818
2803
|
var o = e + (t ? " " : "│ ");
|
|
2819
|
-
|
|
2804
|
+
n.left && It(n.left, o, !1, i, r), n.right && It(n.right, o, !0, i, r);
|
|
2820
2805
|
}
|
|
2821
2806
|
}
|
|
2822
|
-
var
|
|
2807
|
+
var Ut = (
|
|
2823
2808
|
/** @class */
|
|
2824
2809
|
function() {
|
|
2825
|
-
function
|
|
2826
|
-
e === void 0 && (e =
|
|
2810
|
+
function n(e) {
|
|
2811
|
+
e === void 0 && (e = Ir), this._root = null, this._size = 0, this._comparator = e;
|
|
2827
2812
|
}
|
|
2828
|
-
return
|
|
2829
|
-
return this._size++, this._root =
|
|
2830
|
-
},
|
|
2831
|
-
var
|
|
2832
|
-
this._root === null && (
|
|
2833
|
-
var r = this._comparator, o =
|
|
2834
|
-
return l === 0 ? this._root = o : (l < 0 ? (
|
|
2835
|
-
},
|
|
2813
|
+
return n.prototype.insert = function(e, t) {
|
|
2814
|
+
return this._size++, this._root = kt(e, t, this._root, this._comparator);
|
|
2815
|
+
}, n.prototype.add = function(e, t) {
|
|
2816
|
+
var i = new Se(e, t);
|
|
2817
|
+
this._root === null && (i.left = i.right = null, this._size++, this._root = i);
|
|
2818
|
+
var r = this._comparator, o = ve(e, this._root, r), l = r(e, o.key);
|
|
2819
|
+
return l === 0 ? this._root = o : (l < 0 ? (i.left = o.left, i.right = o, o.left = null) : l > 0 && (i.right = o.right, i.left = o, o.right = null), this._size++, this._root = i), this._root;
|
|
2820
|
+
}, n.prototype.remove = function(e) {
|
|
2836
2821
|
this._root = this._remove(e, this._root, this._comparator);
|
|
2837
|
-
},
|
|
2822
|
+
}, n.prototype._remove = function(e, t, i) {
|
|
2838
2823
|
var r;
|
|
2839
2824
|
if (t === null)
|
|
2840
2825
|
return null;
|
|
2841
|
-
t =
|
|
2842
|
-
var o =
|
|
2843
|
-
return o === 0 ? (t.left === null ? r = t.right : (r =
|
|
2844
|
-
},
|
|
2826
|
+
t = ve(e, t, i);
|
|
2827
|
+
var o = i(e, t.key);
|
|
2828
|
+
return o === 0 ? (t.left === null ? r = t.right : (r = ve(e, t.left, i), r.right = t.right), this._size--, r) : t;
|
|
2829
|
+
}, n.prototype.pop = function() {
|
|
2845
2830
|
var e = this._root;
|
|
2846
2831
|
if (e) {
|
|
2847
2832
|
for (; e.left; )
|
|
2848
2833
|
e = e.left;
|
|
2849
|
-
return this._root =
|
|
2834
|
+
return this._root = ve(e.key, this._root, this._comparator), this._root = this._remove(e.key, this._root, this._comparator), { key: e.key, data: e.data };
|
|
2850
2835
|
}
|
|
2851
2836
|
return null;
|
|
2852
|
-
},
|
|
2853
|
-
for (var t = this._root,
|
|
2854
|
-
var r =
|
|
2837
|
+
}, n.prototype.findStatic = function(e) {
|
|
2838
|
+
for (var t = this._root, i = this._comparator; t; ) {
|
|
2839
|
+
var r = i(e, t.key);
|
|
2855
2840
|
if (r === 0)
|
|
2856
2841
|
return t;
|
|
2857
2842
|
r < 0 ? t = t.left : t = t.right;
|
|
2858
2843
|
}
|
|
2859
2844
|
return null;
|
|
2860
|
-
},
|
|
2861
|
-
return this._root && (this._root =
|
|
2862
|
-
},
|
|
2863
|
-
for (var t = this._root,
|
|
2864
|
-
var r =
|
|
2845
|
+
}, n.prototype.find = function(e) {
|
|
2846
|
+
return this._root && (this._root = ve(e, this._root, this._comparator), this._comparator(e, this._root.key) !== 0) ? null : this._root;
|
|
2847
|
+
}, n.prototype.contains = function(e) {
|
|
2848
|
+
for (var t = this._root, i = this._comparator; t; ) {
|
|
2849
|
+
var r = i(e, t.key);
|
|
2865
2850
|
if (r === 0)
|
|
2866
2851
|
return !0;
|
|
2867
2852
|
r < 0 ? t = t.left : t = t.right;
|
|
2868
2853
|
}
|
|
2869
2854
|
return !1;
|
|
2870
|
-
},
|
|
2871
|
-
for (var
|
|
2872
|
-
|
|
2855
|
+
}, n.prototype.forEach = function(e, t) {
|
|
2856
|
+
for (var i = this._root, r = [], o = !1; !o; )
|
|
2857
|
+
i !== null ? (r.push(i), i = i.left) : r.length !== 0 ? (i = r.pop(), e.call(t, i), i = i.right) : o = !0;
|
|
2873
2858
|
return this;
|
|
2874
|
-
},
|
|
2859
|
+
}, n.prototype.range = function(e, t, i, r) {
|
|
2875
2860
|
for (var o = [], l = this._comparator, s = this._root, c; o.length !== 0 || s; )
|
|
2876
2861
|
if (s)
|
|
2877
2862
|
o.push(s), s = s.left;
|
|
2878
2863
|
else {
|
|
2879
2864
|
if (s = o.pop(), c = l(s.key, t), c > 0)
|
|
2880
2865
|
break;
|
|
2881
|
-
if (l(s.key, e) >= 0 &&
|
|
2866
|
+
if (l(s.key, e) >= 0 && i.call(r, s))
|
|
2882
2867
|
return this;
|
|
2883
2868
|
s = s.right;
|
|
2884
2869
|
}
|
|
2885
2870
|
return this;
|
|
2886
|
-
},
|
|
2871
|
+
}, n.prototype.keys = function() {
|
|
2887
2872
|
var e = [];
|
|
2888
2873
|
return this.forEach(function(t) {
|
|
2889
|
-
var
|
|
2890
|
-
return e.push(
|
|
2874
|
+
var i = t.key;
|
|
2875
|
+
return e.push(i);
|
|
2891
2876
|
}), e;
|
|
2892
|
-
},
|
|
2877
|
+
}, n.prototype.values = function() {
|
|
2893
2878
|
var e = [];
|
|
2894
2879
|
return this.forEach(function(t) {
|
|
2895
|
-
var
|
|
2896
|
-
return e.push(
|
|
2880
|
+
var i = t.data;
|
|
2881
|
+
return e.push(i);
|
|
2897
2882
|
}), e;
|
|
2898
|
-
},
|
|
2883
|
+
}, n.prototype.min = function() {
|
|
2899
2884
|
return this._root ? this.minNode(this._root).key : null;
|
|
2900
|
-
},
|
|
2885
|
+
}, n.prototype.max = function() {
|
|
2901
2886
|
return this._root ? this.maxNode(this._root).key : null;
|
|
2902
|
-
},
|
|
2887
|
+
}, n.prototype.minNode = function(e) {
|
|
2903
2888
|
if (e === void 0 && (e = this._root), e)
|
|
2904
2889
|
for (; e.left; )
|
|
2905
2890
|
e = e.left;
|
|
2906
2891
|
return e;
|
|
2907
|
-
},
|
|
2892
|
+
}, n.prototype.maxNode = function(e) {
|
|
2908
2893
|
if (e === void 0 && (e = this._root), e)
|
|
2909
2894
|
for (; e.right; )
|
|
2910
2895
|
e = e.right;
|
|
2911
2896
|
return e;
|
|
2912
|
-
},
|
|
2913
|
-
for (var t = this._root,
|
|
2897
|
+
}, n.prototype.at = function(e) {
|
|
2898
|
+
for (var t = this._root, i = !1, r = 0, o = []; !i; )
|
|
2914
2899
|
if (t)
|
|
2915
2900
|
o.push(t), t = t.left;
|
|
2916
2901
|
else if (o.length > 0) {
|
|
@@ -2918,91 +2903,91 @@ var qt = (
|
|
|
2918
2903
|
return t;
|
|
2919
2904
|
r++, t = t.right;
|
|
2920
2905
|
} else
|
|
2921
|
-
|
|
2906
|
+
i = !0;
|
|
2922
2907
|
return null;
|
|
2923
|
-
},
|
|
2924
|
-
var t = this._root,
|
|
2908
|
+
}, n.prototype.next = function(e) {
|
|
2909
|
+
var t = this._root, i = null;
|
|
2925
2910
|
if (e.right) {
|
|
2926
|
-
for (
|
|
2927
|
-
|
|
2928
|
-
return
|
|
2911
|
+
for (i = e.right; i.left; )
|
|
2912
|
+
i = i.left;
|
|
2913
|
+
return i;
|
|
2929
2914
|
}
|
|
2930
2915
|
for (var r = this._comparator; t; ) {
|
|
2931
2916
|
var o = r(e.key, t.key);
|
|
2932
2917
|
if (o === 0)
|
|
2933
2918
|
break;
|
|
2934
|
-
o < 0 ? (
|
|
2919
|
+
o < 0 ? (i = t, t = t.left) : t = t.right;
|
|
2935
2920
|
}
|
|
2936
|
-
return
|
|
2937
|
-
},
|
|
2938
|
-
var t = this._root,
|
|
2921
|
+
return i;
|
|
2922
|
+
}, n.prototype.prev = function(e) {
|
|
2923
|
+
var t = this._root, i = null;
|
|
2939
2924
|
if (e.left !== null) {
|
|
2940
|
-
for (
|
|
2941
|
-
|
|
2942
|
-
return
|
|
2925
|
+
for (i = e.left; i.right; )
|
|
2926
|
+
i = i.right;
|
|
2927
|
+
return i;
|
|
2943
2928
|
}
|
|
2944
2929
|
for (var r = this._comparator; t; ) {
|
|
2945
2930
|
var o = r(e.key, t.key);
|
|
2946
2931
|
if (o === 0)
|
|
2947
2932
|
break;
|
|
2948
|
-
o < 0 ? t = t.left : (
|
|
2933
|
+
o < 0 ? t = t.left : (i = t, t = t.right);
|
|
2949
2934
|
}
|
|
2950
|
-
return
|
|
2951
|
-
},
|
|
2935
|
+
return i;
|
|
2936
|
+
}, n.prototype.clear = function() {
|
|
2952
2937
|
return this._root = null, this._size = 0, this;
|
|
2953
|
-
},
|
|
2954
|
-
return
|
|
2955
|
-
},
|
|
2956
|
-
t === void 0 && (t = []),
|
|
2938
|
+
}, n.prototype.toList = function() {
|
|
2939
|
+
return Ar(this._root);
|
|
2940
|
+
}, n.prototype.load = function(e, t, i) {
|
|
2941
|
+
t === void 0 && (t = []), i === void 0 && (i = !1);
|
|
2957
2942
|
var r = e.length, o = this._comparator;
|
|
2958
|
-
if (
|
|
2959
|
-
this._root =
|
|
2943
|
+
if (i && At(e, t, 0, r - 1, o), this._root === null)
|
|
2944
|
+
this._root = Ot(e, t, 0, r), this._size = r;
|
|
2960
2945
|
else {
|
|
2961
|
-
var l =
|
|
2962
|
-
r = this._size + r, this._root =
|
|
2946
|
+
var l = zr(this.toList(), Wr(e, t), o);
|
|
2947
|
+
r = this._size + r, this._root = Wt({ head: l }, 0, r);
|
|
2963
2948
|
}
|
|
2964
2949
|
return this;
|
|
2965
|
-
},
|
|
2950
|
+
}, n.prototype.isEmpty = function() {
|
|
2966
2951
|
return this._root === null;
|
|
2967
|
-
}, Object.defineProperty(
|
|
2952
|
+
}, Object.defineProperty(n.prototype, "size", {
|
|
2968
2953
|
get: function() {
|
|
2969
2954
|
return this._size;
|
|
2970
2955
|
},
|
|
2971
2956
|
enumerable: !0,
|
|
2972
2957
|
configurable: !0
|
|
2973
|
-
}), Object.defineProperty(
|
|
2958
|
+
}), Object.defineProperty(n.prototype, "root", {
|
|
2974
2959
|
get: function() {
|
|
2975
2960
|
return this._root;
|
|
2976
2961
|
},
|
|
2977
2962
|
enumerable: !0,
|
|
2978
2963
|
configurable: !0
|
|
2979
|
-
}),
|
|
2980
|
-
e === void 0 && (e = function(
|
|
2981
|
-
return String(
|
|
2964
|
+
}), n.prototype.toString = function(e) {
|
|
2965
|
+
e === void 0 && (e = function(i) {
|
|
2966
|
+
return String(i.key);
|
|
2982
2967
|
});
|
|
2983
2968
|
var t = [];
|
|
2984
|
-
return
|
|
2985
|
-
return t.push(
|
|
2969
|
+
return It(this._root, "", !0, function(i) {
|
|
2970
|
+
return t.push(i);
|
|
2986
2971
|
}, e), t.join("");
|
|
2987
|
-
},
|
|
2988
|
-
var r = this._comparator, o =
|
|
2989
|
-
r(e, t) < 0 ? s =
|
|
2990
|
-
},
|
|
2991
|
-
return
|
|
2992
|
-
},
|
|
2993
|
-
var e, t,
|
|
2994
|
-
return
|
|
2972
|
+
}, n.prototype.update = function(e, t, i) {
|
|
2973
|
+
var r = this._comparator, o = wi(e, this._root, r), l = o.left, s = o.right;
|
|
2974
|
+
r(e, t) < 0 ? s = kt(t, i, s, r) : l = kt(t, i, l, r), this._root = Or(l, s, r);
|
|
2975
|
+
}, n.prototype.split = function(e) {
|
|
2976
|
+
return wi(e, this._root, this._comparator);
|
|
2977
|
+
}, n.prototype[Symbol.iterator] = function() {
|
|
2978
|
+
var e, t, i;
|
|
2979
|
+
return Tr(this, function(r) {
|
|
2995
2980
|
switch (r.label) {
|
|
2996
2981
|
case 0:
|
|
2997
|
-
e = this._root, t = [],
|
|
2982
|
+
e = this._root, t = [], i = !1, r.label = 1;
|
|
2998
2983
|
case 1:
|
|
2999
|
-
return
|
|
2984
|
+
return i ? [3, 6] : e === null ? [3, 2] : (t.push(e), e = e.left, [3, 5]);
|
|
3000
2985
|
case 2:
|
|
3001
2986
|
return t.length === 0 ? [3, 4] : (e = t.pop(), [4, e]);
|
|
3002
2987
|
case 3:
|
|
3003
2988
|
return r.sent(), e = e.right, [3, 5];
|
|
3004
2989
|
case 4:
|
|
3005
|
-
|
|
2990
|
+
i = !0, r.label = 5;
|
|
3006
2991
|
case 5:
|
|
3007
2992
|
return [3, 1];
|
|
3008
2993
|
case 6:
|
|
@@ -3012,126 +2997,126 @@ var qt = (
|
|
|
3012
2997
|
];
|
|
3013
2998
|
}
|
|
3014
2999
|
});
|
|
3015
|
-
},
|
|
3000
|
+
}, n;
|
|
3016
3001
|
}()
|
|
3017
3002
|
);
|
|
3018
|
-
function
|
|
3019
|
-
var r =
|
|
3003
|
+
function Ot(n, e, t, i) {
|
|
3004
|
+
var r = i - t;
|
|
3020
3005
|
if (r > 0) {
|
|
3021
|
-
var o = t + Math.floor(r / 2), l =
|
|
3022
|
-
return c.left =
|
|
3006
|
+
var o = t + Math.floor(r / 2), l = n[o], s = e[o], c = new Se(l, s);
|
|
3007
|
+
return c.left = Ot(n, e, t, o), c.right = Ot(n, e, o + 1, i), c;
|
|
3023
3008
|
}
|
|
3024
3009
|
return null;
|
|
3025
3010
|
}
|
|
3026
|
-
function
|
|
3027
|
-
for (var t = new
|
|
3028
|
-
|
|
3029
|
-
return
|
|
3011
|
+
function Wr(n, e) {
|
|
3012
|
+
for (var t = new Se(null, null), i = t, r = 0; r < n.length; r++)
|
|
3013
|
+
i = i.next = new Se(n[r], e[r]);
|
|
3014
|
+
return i.next = null, t.next;
|
|
3030
3015
|
}
|
|
3031
|
-
function
|
|
3032
|
-
for (var e =
|
|
3033
|
-
e ? (t.push(e), e = e.left) : t.length > 0 ? (e = o = o.next = t.pop(), e = e.right) :
|
|
3016
|
+
function Ar(n) {
|
|
3017
|
+
for (var e = n, t = [], i = !1, r = new Se(null, null), o = r; !i; )
|
|
3018
|
+
e ? (t.push(e), e = e.left) : t.length > 0 ? (e = o = o.next = t.pop(), e = e.right) : i = !0;
|
|
3034
3019
|
return o.next = null, r.next;
|
|
3035
3020
|
}
|
|
3036
|
-
function
|
|
3037
|
-
var
|
|
3038
|
-
if (
|
|
3039
|
-
var r = e + Math.floor(
|
|
3040
|
-
return l.left = o,
|
|
3021
|
+
function Wt(n, e, t) {
|
|
3022
|
+
var i = t - e;
|
|
3023
|
+
if (i > 0) {
|
|
3024
|
+
var r = e + Math.floor(i / 2), o = Wt(n, e, r), l = n.head;
|
|
3025
|
+
return l.left = o, n.head = n.head.next, l.right = Wt(n, r + 1, t), l;
|
|
3041
3026
|
}
|
|
3042
3027
|
return null;
|
|
3043
3028
|
}
|
|
3044
|
-
function
|
|
3045
|
-
for (var
|
|
3029
|
+
function zr(n, e, t) {
|
|
3030
|
+
for (var i = new Se(null, null), r = i, o = n, l = e; o !== null && l !== null; )
|
|
3046
3031
|
t(o.key, l.key) < 0 ? (r.next = o, o = o.next) : (r.next = l, l = l.next), r = r.next;
|
|
3047
|
-
return o !== null ? r.next = o : l !== null && (r.next = l),
|
|
3032
|
+
return o !== null ? r.next = o : l !== null && (r.next = l), i.next;
|
|
3048
3033
|
}
|
|
3049
|
-
function
|
|
3050
|
-
if (!(t >=
|
|
3051
|
-
for (var o =
|
|
3034
|
+
function At(n, e, t, i, r) {
|
|
3035
|
+
if (!(t >= i)) {
|
|
3036
|
+
for (var o = n[t + i >> 1], l = t - 1, s = i + 1; ; ) {
|
|
3052
3037
|
do
|
|
3053
3038
|
l++;
|
|
3054
|
-
while (r(
|
|
3039
|
+
while (r(n[l], o) < 0);
|
|
3055
3040
|
do
|
|
3056
3041
|
s--;
|
|
3057
|
-
while (r(
|
|
3042
|
+
while (r(n[s], o) > 0);
|
|
3058
3043
|
if (l >= s)
|
|
3059
3044
|
break;
|
|
3060
|
-
var c =
|
|
3061
|
-
|
|
3045
|
+
var c = n[l];
|
|
3046
|
+
n[l] = n[s], n[s] = c, c = e[l], e[l] = e[s], e[s] = c;
|
|
3062
3047
|
}
|
|
3063
|
-
|
|
3048
|
+
At(n, e, t, s, r), At(n, e, s + 1, i, r);
|
|
3064
3049
|
}
|
|
3065
3050
|
}
|
|
3066
|
-
const
|
|
3067
|
-
function
|
|
3068
|
-
let o, l, s, c, u = e[0], d =
|
|
3069
|
-
d > u == d > -u ? (o = u, u = e[++a]) : (o = d, d =
|
|
3051
|
+
const he = 11102230246251565e-32, X = 134217729, Fr = (3 + 8 * he) * he;
|
|
3052
|
+
function Ct(n, e, t, i, r) {
|
|
3053
|
+
let o, l, s, c, u = e[0], d = i[0], a = 0, f = 0;
|
|
3054
|
+
d > u == d > -u ? (o = u, u = e[++a]) : (o = d, d = i[++f]);
|
|
3070
3055
|
let h = 0;
|
|
3071
|
-
if (a <
|
|
3072
|
-
for (d > u == d > -u ? (l = u + o, s = o - (l - u), u = e[++a]) : (l = d + o, s = o - (l - d), d =
|
|
3073
|
-
d > u == d > -u ? (l = o + u, c = l - o, s = o - (l - c) + (u - c), u = e[++a]) : (l = o + d, c = l - o, s = o - (l - c) + (d - c), d =
|
|
3074
|
-
for (; a <
|
|
3056
|
+
if (a < n && f < t)
|
|
3057
|
+
for (d > u == d > -u ? (l = u + o, s = o - (l - u), u = e[++a]) : (l = d + o, s = o - (l - d), d = i[++f]), o = l, s !== 0 && (r[h++] = s); a < n && f < t; )
|
|
3058
|
+
d > u == d > -u ? (l = o + u, c = l - o, s = o - (l - c) + (u - c), u = e[++a]) : (l = o + d, c = l - o, s = o - (l - c) + (d - c), d = i[++f]), o = l, s !== 0 && (r[h++] = s);
|
|
3059
|
+
for (; a < n; )
|
|
3075
3060
|
l = o + u, c = l - o, s = o - (l - c) + (u - c), u = e[++a], o = l, s !== 0 && (r[h++] = s);
|
|
3076
3061
|
for (; f < t; )
|
|
3077
|
-
l = o + d, c = l - o, s = o - (l - c) + (d - c), d =
|
|
3062
|
+
l = o + d, c = l - o, s = o - (l - c) + (d - c), d = i[++f], o = l, s !== 0 && (r[h++] = s);
|
|
3078
3063
|
return (o !== 0 || h === 0) && (r[h++] = o), h;
|
|
3079
3064
|
}
|
|
3080
|
-
function
|
|
3065
|
+
function Br(n, e) {
|
|
3081
3066
|
let t = e[0];
|
|
3082
|
-
for (let
|
|
3067
|
+
for (let i = 1; i < n; i++) t += e[i];
|
|
3083
3068
|
return t;
|
|
3084
3069
|
}
|
|
3085
|
-
function
|
|
3086
|
-
return new Float64Array(
|
|
3087
|
-
}
|
|
3088
|
-
const
|
|
3089
|
-
function
|
|
3090
|
-
let s, c, u, d, a, f, h,
|
|
3091
|
-
const k =
|
|
3092
|
-
E = k * O, f = X * k, h = f - (f - k),
|
|
3093
|
-
let J =
|
|
3094
|
-
if (J >= x || -J >= x || (a =
|
|
3095
|
-
E = s * O, f = X * s, h = f - (f - s),
|
|
3096
|
-
const A =
|
|
3097
|
-
E = k * d, f = X * k, h = f - (f - k),
|
|
3098
|
-
const
|
|
3099
|
-
E = s * d, f = X * s, h = f - (f - s),
|
|
3100
|
-
const
|
|
3101
|
-
return
|
|
3102
|
-
}
|
|
3103
|
-
function
|
|
3104
|
-
const l = (e - o) * (t - r), s = (
|
|
3105
|
-
return Math.abs(c) >=
|
|
3106
|
-
}
|
|
3107
|
-
const
|
|
3108
|
-
if (e.ur.x <
|
|
3109
|
-
const t =
|
|
3070
|
+
function He(n) {
|
|
3071
|
+
return new Float64Array(n);
|
|
3072
|
+
}
|
|
3073
|
+
const Dr = (3 + 16 * he) * he, Ur = (2 + 12 * he) * he, Gr = (9 + 64 * he) * he * he, ze = He(4), _i = He(8), Ei = He(12), Li = He(16), $ = He(4);
|
|
3074
|
+
function jr(n, e, t, i, r, o, l) {
|
|
3075
|
+
let s, c, u, d, a, f, h, m, y, b, w, L, S, E, M, C, v, _;
|
|
3076
|
+
const k = n - r, I = t - r, H = e - o, O = i - o;
|
|
3077
|
+
E = k * O, f = X * k, h = f - (f - k), m = k - h, f = X * O, y = f - (f - O), b = O - y, M = m * b - (E - h * y - m * y - h * b), C = H * I, f = X * H, h = f - (f - H), m = H - h, f = X * I, y = f - (f - I), b = I - y, v = m * b - (C - h * y - m * y - h * b), w = M - v, a = M - w, ze[0] = M - (w + a) + (a - v), L = E + w, a = L - E, S = E - (L - a) + (w - a), w = S - C, a = S - w, ze[1] = S - (w + a) + (a - C), _ = L + w, a = _ - L, ze[2] = L - (_ - a) + (w - a), ze[3] = _;
|
|
3078
|
+
let J = Br(4, ze), x = Ur * l;
|
|
3079
|
+
if (J >= x || -J >= x || (a = n - k, s = n - (k + a) + (a - r), a = t - I, u = t - (I + a) + (a - r), a = e - H, c = e - (H + a) + (a - o), a = i - O, d = i - (O + a) + (a - o), s === 0 && c === 0 && u === 0 && d === 0) || (x = Gr * l + Fr * Math.abs(J), J += k * d + O * s - (H * u + I * c), J >= x || -J >= x)) return J;
|
|
3080
|
+
E = s * O, f = X * s, h = f - (f - s), m = s - h, f = X * O, y = f - (f - O), b = O - y, M = m * b - (E - h * y - m * y - h * b), C = c * I, f = X * c, h = f - (f - c), m = c - h, f = X * I, y = f - (f - I), b = I - y, v = m * b - (C - h * y - m * y - h * b), w = M - v, a = M - w, $[0] = M - (w + a) + (a - v), L = E + w, a = L - E, S = E - (L - a) + (w - a), w = S - C, a = S - w, $[1] = S - (w + a) + (a - C), _ = L + w, a = _ - L, $[2] = L - (_ - a) + (w - a), $[3] = _;
|
|
3081
|
+
const A = Ct(4, ze, 4, $, _i);
|
|
3082
|
+
E = k * d, f = X * k, h = f - (f - k), m = k - h, f = X * d, y = f - (f - d), b = d - y, M = m * b - (E - h * y - m * y - h * b), C = H * u, f = X * H, h = f - (f - H), m = H - h, f = X * u, y = f - (f - u), b = u - y, v = m * b - (C - h * y - m * y - h * b), w = M - v, a = M - w, $[0] = M - (w + a) + (a - v), L = E + w, a = L - E, S = E - (L - a) + (w - a), w = S - C, a = S - w, $[1] = S - (w + a) + (a - C), _ = L + w, a = _ - L, $[2] = L - (_ - a) + (w - a), $[3] = _;
|
|
3083
|
+
const oe = Ct(A, _i, 4, $, Ei);
|
|
3084
|
+
E = s * d, f = X * s, h = f - (f - s), m = s - h, f = X * d, y = f - (f - d), b = d - y, M = m * b - (E - h * y - m * y - h * b), C = c * u, f = X * c, h = f - (f - c), m = c - h, f = X * u, y = f - (f - u), b = u - y, v = m * b - (C - h * y - m * y - h * b), w = M - v, a = M - w, $[0] = M - (w + a) + (a - v), L = E + w, a = L - E, S = E - (L - a) + (w - a), w = S - C, a = S - w, $[1] = S - (w + a) + (a - C), _ = L + w, a = _ - L, $[2] = L - (_ - a) + (w - a), $[3] = _;
|
|
3085
|
+
const ce = Ct(oe, Ei, 4, $, Li);
|
|
3086
|
+
return Li[ce - 1];
|
|
3087
|
+
}
|
|
3088
|
+
function qr(n, e, t, i, r, o) {
|
|
3089
|
+
const l = (e - o) * (t - r), s = (n - r) * (i - o), c = l - s, u = Math.abs(l + s);
|
|
3090
|
+
return Math.abs(c) >= Dr * u ? c : -jr(n, e, t, i, r, o, u);
|
|
3091
|
+
}
|
|
3092
|
+
const je = (n, e) => n.ll.x <= e.x && e.x <= n.ur.x && n.ll.y <= e.y && e.y <= n.ur.y, zt = (n, e) => {
|
|
3093
|
+
if (e.ur.x < n.ll.x || n.ur.x < e.ll.x || e.ur.y < n.ll.y || n.ur.y < e.ll.y) return null;
|
|
3094
|
+
const t = n.ll.x < e.ll.x ? e.ll.x : n.ll.x, i = n.ur.x < e.ur.x ? n.ur.x : e.ur.x, r = n.ll.y < e.ll.y ? e.ll.y : n.ll.y, o = n.ur.y < e.ur.y ? n.ur.y : e.ur.y;
|
|
3110
3095
|
return {
|
|
3111
3096
|
ll: {
|
|
3112
3097
|
x: t,
|
|
3113
3098
|
y: r
|
|
3114
3099
|
},
|
|
3115
3100
|
ur: {
|
|
3116
|
-
x:
|
|
3101
|
+
x: i,
|
|
3117
3102
|
y: o
|
|
3118
3103
|
}
|
|
3119
3104
|
};
|
|
3120
3105
|
};
|
|
3121
|
-
let
|
|
3122
|
-
|
|
3123
|
-
const
|
|
3124
|
-
if (-
|
|
3106
|
+
let we = Number.EPSILON;
|
|
3107
|
+
we === void 0 && (we = Math.pow(2, -52));
|
|
3108
|
+
const Qr = we * we, Si = (n, e) => {
|
|
3109
|
+
if (-we < n && n < we && -we < e && e < we)
|
|
3125
3110
|
return 0;
|
|
3126
|
-
const t =
|
|
3127
|
-
return t * t <
|
|
3111
|
+
const t = n - e;
|
|
3112
|
+
return t * t < Qr * n * e ? 0 : n < e ? -1 : 1;
|
|
3128
3113
|
};
|
|
3129
|
-
class
|
|
3114
|
+
class Vr {
|
|
3130
3115
|
constructor() {
|
|
3131
3116
|
this.reset();
|
|
3132
3117
|
}
|
|
3133
3118
|
reset() {
|
|
3134
|
-
this.xRounder = new
|
|
3119
|
+
this.xRounder = new xi(), this.yRounder = new xi();
|
|
3135
3120
|
}
|
|
3136
3121
|
round(e, t) {
|
|
3137
3122
|
return {
|
|
@@ -3140,9 +3125,9 @@ class Xr {
|
|
|
3140
3125
|
};
|
|
3141
3126
|
}
|
|
3142
3127
|
}
|
|
3143
|
-
class
|
|
3128
|
+
class xi {
|
|
3144
3129
|
constructor() {
|
|
3145
|
-
this.tree = new
|
|
3130
|
+
this.tree = new Ut(), this.round(0);
|
|
3146
3131
|
}
|
|
3147
3132
|
// Note: this can rounds input values backwards or forwards.
|
|
3148
3133
|
// You might ask, why not restrict this to just rounding
|
|
@@ -3152,61 +3137,61 @@ class Ci {
|
|
|
3152
3137
|
// to endpoints (to establish independence from the segment
|
|
3153
3138
|
// angle for t-intersections).
|
|
3154
3139
|
round(e) {
|
|
3155
|
-
const t = this.tree.add(e),
|
|
3156
|
-
if (
|
|
3157
|
-
return this.tree.remove(e),
|
|
3140
|
+
const t = this.tree.add(e), i = this.tree.prev(t);
|
|
3141
|
+
if (i !== null && Si(t.key, i.key) === 0)
|
|
3142
|
+
return this.tree.remove(e), i.key;
|
|
3158
3143
|
const r = this.tree.next(t);
|
|
3159
|
-
return r !== null &&
|
|
3144
|
+
return r !== null && Si(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
|
|
3160
3145
|
}
|
|
3161
3146
|
}
|
|
3162
|
-
const
|
|
3163
|
-
const
|
|
3164
|
-
return
|
|
3165
|
-
},
|
|
3166
|
-
const
|
|
3167
|
-
x: e.x -
|
|
3168
|
-
y: e.y -
|
|
3147
|
+
const Ze = new Vr(), st = (n, e) => n.x * e.y - n.y * e.x, qi = (n, e) => n.x * e.x + n.y * e.y, Mi = (n, e, t) => {
|
|
3148
|
+
const i = qr(n.x, n.y, e.x, e.y, t.x, t.y);
|
|
3149
|
+
return i > 0 ? -1 : i < 0 ? 1 : 0;
|
|
3150
|
+
}, at = (n) => Math.sqrt(qi(n, n)), Zr = (n, e, t) => {
|
|
3151
|
+
const i = {
|
|
3152
|
+
x: e.x - n.x,
|
|
3153
|
+
y: e.y - n.y
|
|
3169
3154
|
}, r = {
|
|
3170
|
-
x: t.x -
|
|
3171
|
-
y: t.y -
|
|
3155
|
+
x: t.x - n.x,
|
|
3156
|
+
y: t.y - n.y
|
|
3172
3157
|
};
|
|
3173
|
-
return
|
|
3174
|
-
},
|
|
3175
|
-
const
|
|
3176
|
-
x: e.x -
|
|
3177
|
-
y: e.y -
|
|
3158
|
+
return st(r, i) / at(r) / at(i);
|
|
3159
|
+
}, Hr = (n, e, t) => {
|
|
3160
|
+
const i = {
|
|
3161
|
+
x: e.x - n.x,
|
|
3162
|
+
y: e.y - n.y
|
|
3178
3163
|
}, r = {
|
|
3179
|
-
x: t.x -
|
|
3180
|
-
y: t.y -
|
|
3164
|
+
x: t.x - n.x,
|
|
3165
|
+
y: t.y - n.y
|
|
3181
3166
|
};
|
|
3182
|
-
return
|
|
3183
|
-
},
|
|
3184
|
-
x:
|
|
3167
|
+
return qi(r, i) / at(r) / at(i);
|
|
3168
|
+
}, ki = (n, e, t) => e.y === 0 ? null : {
|
|
3169
|
+
x: n.x + e.x / e.y * (t - n.y),
|
|
3185
3170
|
y: t
|
|
3186
|
-
},
|
|
3171
|
+
}, Ci = (n, e, t) => e.x === 0 ? null : {
|
|
3187
3172
|
x: t,
|
|
3188
|
-
y:
|
|
3189
|
-
},
|
|
3190
|
-
if (e.x === 0) return
|
|
3191
|
-
if (
|
|
3192
|
-
if (e.y === 0) return
|
|
3193
|
-
if (
|
|
3194
|
-
const r =
|
|
3173
|
+
y: n.y + e.y / e.x * (t - n.x)
|
|
3174
|
+
}, Yr = (n, e, t, i) => {
|
|
3175
|
+
if (e.x === 0) return Ci(t, i, n.x);
|
|
3176
|
+
if (i.x === 0) return Ci(n, e, t.x);
|
|
3177
|
+
if (e.y === 0) return ki(t, i, n.y);
|
|
3178
|
+
if (i.y === 0) return ki(n, e, t.y);
|
|
3179
|
+
const r = st(e, i);
|
|
3195
3180
|
if (r == 0) return null;
|
|
3196
3181
|
const o = {
|
|
3197
|
-
x: t.x -
|
|
3198
|
-
y: t.y -
|
|
3199
|
-
}, l =
|
|
3182
|
+
x: t.x - n.x,
|
|
3183
|
+
y: t.y - n.y
|
|
3184
|
+
}, l = st(o, e) / r, s = st(o, i) / r, c = n.x + s * e.x, u = t.x + l * i.x, d = n.y + s * e.y, a = t.y + l * i.y, f = (c + u) / 2, h = (d + a) / 2;
|
|
3200
3185
|
return {
|
|
3201
3186
|
x: f,
|
|
3202
3187
|
y: h
|
|
3203
3188
|
};
|
|
3204
3189
|
};
|
|
3205
|
-
class
|
|
3190
|
+
class re {
|
|
3206
3191
|
// for ordering sweep events in the sweep event queue
|
|
3207
3192
|
static compare(e, t) {
|
|
3208
|
-
const
|
|
3209
|
-
return
|
|
3193
|
+
const i = re.comparePoints(e.point, t.point);
|
|
3194
|
+
return i !== 0 ? i : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 : _e.compare(e.segment, t.segment));
|
|
3210
3195
|
}
|
|
3211
3196
|
// for ordering points in sweep line order
|
|
3212
3197
|
static comparePoints(e, t) {
|
|
@@ -3220,8 +3205,8 @@ class se {
|
|
|
3220
3205
|
if (e.point === this.point)
|
|
3221
3206
|
throw new Error("Tried to link already linked events");
|
|
3222
3207
|
const t = e.point.events;
|
|
3223
|
-
for (let
|
|
3224
|
-
const o = t[
|
|
3208
|
+
for (let i = 0, r = t.length; i < r; i++) {
|
|
3209
|
+
const o = t[i];
|
|
3225
3210
|
this.point.events.push(o), o.point = this.point;
|
|
3226
3211
|
}
|
|
3227
3212
|
this.checkForConsuming();
|
|
@@ -3231,17 +3216,17 @@ class se {
|
|
|
3231
3216
|
checkForConsuming() {
|
|
3232
3217
|
const e = this.point.events.length;
|
|
3233
3218
|
for (let t = 0; t < e; t++) {
|
|
3234
|
-
const
|
|
3235
|
-
if (
|
|
3219
|
+
const i = this.point.events[t];
|
|
3220
|
+
if (i.segment.consumedBy === void 0)
|
|
3236
3221
|
for (let r = t + 1; r < e; r++) {
|
|
3237
3222
|
const o = this.point.events[r];
|
|
3238
|
-
o.consumedBy === void 0 &&
|
|
3223
|
+
o.consumedBy === void 0 && i.otherSE.point.events === o.otherSE.point.events && i.segment.consume(o.segment);
|
|
3239
3224
|
}
|
|
3240
3225
|
}
|
|
3241
3226
|
}
|
|
3242
3227
|
getAvailableLinkedEvents() {
|
|
3243
3228
|
const e = [];
|
|
3244
|
-
for (let t = 0,
|
|
3229
|
+
for (let t = 0, i = this.point.events.length; t < i; t++) {
|
|
3245
3230
|
const r = this.point.events[t];
|
|
3246
3231
|
r !== this && !r.segment.ringOut && r.segment.isInResult() && e.push(r);
|
|
3247
3232
|
}
|
|
@@ -3258,15 +3243,15 @@ class se {
|
|
|
3258
3243
|
* re-computing already-computed values.
|
|
3259
3244
|
*/
|
|
3260
3245
|
getLeftmostComparator(e) {
|
|
3261
|
-
const t = /* @__PURE__ */ new Map(),
|
|
3246
|
+
const t = /* @__PURE__ */ new Map(), i = (r) => {
|
|
3262
3247
|
const o = r.otherSE;
|
|
3263
3248
|
t.set(r, {
|
|
3264
|
-
sine:
|
|
3265
|
-
cosine:
|
|
3249
|
+
sine: Zr(this.point, e.point, o.point),
|
|
3250
|
+
cosine: Hr(this.point, e.point, o.point)
|
|
3266
3251
|
});
|
|
3267
3252
|
};
|
|
3268
3253
|
return (r, o) => {
|
|
3269
|
-
t.has(r) ||
|
|
3254
|
+
t.has(r) || i(r), t.has(o) || i(o);
|
|
3270
3255
|
const {
|
|
3271
3256
|
sine: l,
|
|
3272
3257
|
cosine: s
|
|
@@ -3278,8 +3263,8 @@ class se {
|
|
|
3278
3263
|
};
|
|
3279
3264
|
}
|
|
3280
3265
|
}
|
|
3281
|
-
let
|
|
3282
|
-
class
|
|
3266
|
+
let Xr = 0;
|
|
3267
|
+
class _e {
|
|
3283
3268
|
/* This compare() function is for ordering segments in the sweep
|
|
3284
3269
|
* line tree, and does so according to the following criteria:
|
|
3285
3270
|
*
|
|
@@ -3294,11 +3279,11 @@ class Le {
|
|
|
3294
3279
|
* is directly on the right-more of the two left inputs.
|
|
3295
3280
|
*/
|
|
3296
3281
|
static compare(e, t) {
|
|
3297
|
-
const
|
|
3298
|
-
if (l <
|
|
3282
|
+
const i = e.leftSE.point.x, r = t.leftSE.point.x, o = e.rightSE.point.x, l = t.rightSE.point.x;
|
|
3283
|
+
if (l < i) return 1;
|
|
3299
3284
|
if (o < r) return -1;
|
|
3300
3285
|
const s = e.leftSE.point.y, c = t.leftSE.point.y, u = e.rightSE.point.y, d = t.rightSE.point.y;
|
|
3301
|
-
if (
|
|
3286
|
+
if (i < r) {
|
|
3302
3287
|
if (c < s && c < u) return 1;
|
|
3303
3288
|
if (c > s && c > u) return -1;
|
|
3304
3289
|
const a = e.comparePoint(t.leftSE.point);
|
|
@@ -3307,7 +3292,7 @@ class Le {
|
|
|
3307
3292
|
const f = t.comparePoint(e.rightSE.point);
|
|
3308
3293
|
return f !== 0 ? f : -1;
|
|
3309
3294
|
}
|
|
3310
|
-
if (
|
|
3295
|
+
if (i > r) {
|
|
3311
3296
|
if (s < c && s < d) return -1;
|
|
3312
3297
|
if (s > c && s > d) return 1;
|
|
3313
3298
|
const a = t.comparePoint(e.leftSE.point);
|
|
@@ -3327,27 +3312,27 @@ class Le {
|
|
|
3327
3312
|
if (a > 0) return -1;
|
|
3328
3313
|
}
|
|
3329
3314
|
if (o !== l) {
|
|
3330
|
-
const a = u - s, f = o -
|
|
3331
|
-
if (a > f && h <
|
|
3332
|
-
if (a < f && h >
|
|
3315
|
+
const a = u - s, f = o - i, h = d - c, m = l - r;
|
|
3316
|
+
if (a > f && h < m) return 1;
|
|
3317
|
+
if (a < f && h > m) return -1;
|
|
3333
3318
|
}
|
|
3334
3319
|
return o > l ? 1 : o < l || u < d ? -1 : u > d ? 1 : e.id < t.id ? -1 : e.id > t.id ? 1 : 0;
|
|
3335
3320
|
}
|
|
3336
3321
|
/* Warning: a reference to ringWindings input will be stored,
|
|
3337
3322
|
* and possibly will be later modified */
|
|
3338
|
-
constructor(e, t,
|
|
3339
|
-
this.id = ++
|
|
3323
|
+
constructor(e, t, i, r) {
|
|
3324
|
+
this.id = ++Xr, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = i, this.windings = r;
|
|
3340
3325
|
}
|
|
3341
|
-
static fromRing(e, t,
|
|
3326
|
+
static fromRing(e, t, i) {
|
|
3342
3327
|
let r, o, l;
|
|
3343
|
-
const s =
|
|
3328
|
+
const s = re.comparePoints(e, t);
|
|
3344
3329
|
if (s < 0)
|
|
3345
3330
|
r = e, o = t, l = 1;
|
|
3346
3331
|
else if (s > 0)
|
|
3347
3332
|
r = t, o = e, l = -1;
|
|
3348
3333
|
else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);
|
|
3349
|
-
const c = new
|
|
3350
|
-
return new
|
|
3334
|
+
const c = new re(r, !0), u = new re(o, !1);
|
|
3335
|
+
return new _e(c, u, [i], [l]);
|
|
3351
3336
|
}
|
|
3352
3337
|
/* When a segment is split, the rightSE is replaced with a new sweep event */
|
|
3353
3338
|
replaceRightSE(e) {
|
|
@@ -3391,8 +3376,8 @@ class Le {
|
|
|
3391
3376
|
*/
|
|
3392
3377
|
comparePoint(e) {
|
|
3393
3378
|
if (this.isAnEndpoint(e)) return 0;
|
|
3394
|
-
const t = this.leftSE.point,
|
|
3395
|
-
if (t.x ===
|
|
3379
|
+
const t = this.leftSE.point, i = this.rightSE.point, r = this.vector();
|
|
3380
|
+
if (t.x === i.x)
|
|
3396
3381
|
return e.x === t.x ? 0 : e.x < t.x ? 1 : -1;
|
|
3397
3382
|
const o = (e.y - t.y) / r.y, l = t.x + o * r.x;
|
|
3398
3383
|
if (e.x === l) return 0;
|
|
@@ -3415,9 +3400,9 @@ class Le {
|
|
|
3415
3400
|
* Else, return null.
|
|
3416
3401
|
*/
|
|
3417
3402
|
getIntersection(e) {
|
|
3418
|
-
const t = this.bbox(),
|
|
3403
|
+
const t = this.bbox(), i = e.bbox(), r = zt(t, i);
|
|
3419
3404
|
if (r === null) return null;
|
|
3420
|
-
const o = this.leftSE.point, l = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point, u =
|
|
3405
|
+
const o = this.leftSE.point, l = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point, u = je(t, s) && this.comparePoint(s) === 0, d = je(i, o) && e.comparePoint(o) === 0, a = je(t, c) && this.comparePoint(c) === 0, f = je(i, l) && e.comparePoint(l) === 0;
|
|
3421
3406
|
if (d && u)
|
|
3422
3407
|
return f && !a ? l : !f && a ? c : null;
|
|
3423
3408
|
if (d)
|
|
@@ -3427,8 +3412,8 @@ class Le {
|
|
|
3427
3412
|
if (f && a) return null;
|
|
3428
3413
|
if (f) return l;
|
|
3429
3414
|
if (a) return c;
|
|
3430
|
-
const h =
|
|
3431
|
-
return h === null || !
|
|
3415
|
+
const h = Yr(o, this.vector(), s, e.vector());
|
|
3416
|
+
return h === null || !je(r, h) ? null : Ze.round(h.x, h.y);
|
|
3432
3417
|
}
|
|
3433
3418
|
/**
|
|
3434
3419
|
* Split the given segment into multiple segments on the given points.
|
|
@@ -3443,39 +3428,39 @@ class Le {
|
|
|
3443
3428
|
* Warning: input array of points is modified
|
|
3444
3429
|
*/
|
|
3445
3430
|
split(e) {
|
|
3446
|
-
const t = [],
|
|
3431
|
+
const t = [], i = e.events !== void 0, r = new re(e, !0), o = new re(e, !1), l = this.rightSE;
|
|
3447
3432
|
this.replaceRightSE(o), t.push(o), t.push(r);
|
|
3448
|
-
const s = new
|
|
3449
|
-
return
|
|
3433
|
+
const s = new _e(r, l, this.rings.slice(), this.windings.slice());
|
|
3434
|
+
return re.comparePoints(s.leftSE.point, s.rightSE.point) > 0 && s.swapEvents(), re.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), i && (r.checkForConsuming(), o.checkForConsuming()), t;
|
|
3450
3435
|
}
|
|
3451
3436
|
/* Swap which event is left and right */
|
|
3452
3437
|
swapEvents() {
|
|
3453
3438
|
const e = this.rightSE;
|
|
3454
3439
|
this.rightSE = this.leftSE, this.leftSE = e, this.leftSE.isLeft = !0, this.rightSE.isLeft = !1;
|
|
3455
|
-
for (let t = 0,
|
|
3440
|
+
for (let t = 0, i = this.windings.length; t < i; t++)
|
|
3456
3441
|
this.windings[t] *= -1;
|
|
3457
3442
|
}
|
|
3458
3443
|
/* Consume another segment. We take their rings under our wing
|
|
3459
3444
|
* and mark them as consumed. Use for perfectly overlapping segments */
|
|
3460
3445
|
consume(e) {
|
|
3461
|
-
let t = this,
|
|
3446
|
+
let t = this, i = e;
|
|
3462
3447
|
for (; t.consumedBy; ) t = t.consumedBy;
|
|
3463
|
-
for (;
|
|
3464
|
-
const r =
|
|
3448
|
+
for (; i.consumedBy; ) i = i.consumedBy;
|
|
3449
|
+
const r = _e.compare(t, i);
|
|
3465
3450
|
if (r !== 0) {
|
|
3466
3451
|
if (r > 0) {
|
|
3467
3452
|
const o = t;
|
|
3468
|
-
t =
|
|
3453
|
+
t = i, i = o;
|
|
3469
3454
|
}
|
|
3470
|
-
if (t.prev ===
|
|
3455
|
+
if (t.prev === i) {
|
|
3471
3456
|
const o = t;
|
|
3472
|
-
t =
|
|
3457
|
+
t = i, i = o;
|
|
3473
3458
|
}
|
|
3474
|
-
for (let o = 0, l =
|
|
3475
|
-
const s =
|
|
3459
|
+
for (let o = 0, l = i.rings.length; o < l; o++) {
|
|
3460
|
+
const s = i.rings[o], c = i.windings[o], u = t.rings.indexOf(s);
|
|
3476
3461
|
u === -1 ? (t.rings.push(s), t.windings.push(c)) : t.windings[u] += c;
|
|
3477
3462
|
}
|
|
3478
|
-
|
|
3463
|
+
i.rings = null, i.windings = null, i.consumedBy = t, i.leftSE.consumedBy = t.leftSE, i.rightSE.consumedBy = t.rightSE;
|
|
3479
3464
|
}
|
|
3480
3465
|
}
|
|
3481
3466
|
/* The first segment previous segment chain that is in the result */
|
|
@@ -3503,14 +3488,14 @@ class Le {
|
|
|
3503
3488
|
windings: e.windings.slice(0),
|
|
3504
3489
|
multiPolys: []
|
|
3505
3490
|
};
|
|
3506
|
-
const t = this._afterState.rings,
|
|
3491
|
+
const t = this._afterState.rings, i = this._afterState.windings, r = this._afterState.multiPolys;
|
|
3507
3492
|
for (let s = 0, c = this.rings.length; s < c; s++) {
|
|
3508
3493
|
const u = this.rings[s], d = this.windings[s], a = t.indexOf(u);
|
|
3509
|
-
a === -1 ? (t.push(u),
|
|
3494
|
+
a === -1 ? (t.push(u), i.push(d)) : i[a] += d;
|
|
3510
3495
|
}
|
|
3511
3496
|
const o = [], l = [];
|
|
3512
3497
|
for (let s = 0, c = t.length; s < c; s++) {
|
|
3513
|
-
if (
|
|
3498
|
+
if (i[s] === 0) continue;
|
|
3514
3499
|
const u = t[s], d = u.poly;
|
|
3515
3500
|
if (l.indexOf(d) === -1)
|
|
3516
3501
|
if (u.isExterior) o.push(d);
|
|
@@ -3531,40 +3516,40 @@ class Le {
|
|
|
3531
3516
|
if (this.consumedBy) return !1;
|
|
3532
3517
|
if (this._isInResult !== void 0) return this._isInResult;
|
|
3533
3518
|
const e = this.beforeState().multiPolys, t = this.afterState().multiPolys;
|
|
3534
|
-
switch (
|
|
3519
|
+
switch (se.type) {
|
|
3535
3520
|
case "union": {
|
|
3536
|
-
const
|
|
3537
|
-
this._isInResult =
|
|
3521
|
+
const i = e.length === 0, r = t.length === 0;
|
|
3522
|
+
this._isInResult = i !== r;
|
|
3538
3523
|
break;
|
|
3539
3524
|
}
|
|
3540
3525
|
case "intersection": {
|
|
3541
|
-
let
|
|
3542
|
-
e.length < t.length ? (
|
|
3526
|
+
let i, r;
|
|
3527
|
+
e.length < t.length ? (i = e.length, r = t.length) : (i = t.length, r = e.length), this._isInResult = r === se.numMultiPolys && i < r;
|
|
3543
3528
|
break;
|
|
3544
3529
|
}
|
|
3545
3530
|
case "xor": {
|
|
3546
|
-
const
|
|
3547
|
-
this._isInResult =
|
|
3531
|
+
const i = Math.abs(e.length - t.length);
|
|
3532
|
+
this._isInResult = i % 2 === 1;
|
|
3548
3533
|
break;
|
|
3549
3534
|
}
|
|
3550
3535
|
case "difference": {
|
|
3551
|
-
const
|
|
3552
|
-
this._isInResult =
|
|
3536
|
+
const i = (r) => r.length === 1 && r[0].isSubject;
|
|
3537
|
+
this._isInResult = i(e) !== i(t);
|
|
3553
3538
|
break;
|
|
3554
3539
|
}
|
|
3555
3540
|
default:
|
|
3556
|
-
throw new Error(`Unrecognized operation type found ${
|
|
3541
|
+
throw new Error(`Unrecognized operation type found ${se.type}`);
|
|
3557
3542
|
}
|
|
3558
3543
|
return this._isInResult;
|
|
3559
3544
|
}
|
|
3560
3545
|
}
|
|
3561
|
-
class
|
|
3562
|
-
constructor(e, t,
|
|
3546
|
+
class Ni {
|
|
3547
|
+
constructor(e, t, i) {
|
|
3563
3548
|
if (!Array.isArray(e) || e.length === 0)
|
|
3564
3549
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3565
|
-
if (this.poly = t, this.isExterior =
|
|
3550
|
+
if (this.poly = t, this.isExterior = i, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number")
|
|
3566
3551
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3567
|
-
const r =
|
|
3552
|
+
const r = Ze.round(e[0][0], e[0][1]);
|
|
3568
3553
|
this.bbox = {
|
|
3569
3554
|
ll: {
|
|
3570
3555
|
x: r.x,
|
|
@@ -3579,25 +3564,25 @@ class Ri {
|
|
|
3579
3564
|
for (let l = 1, s = e.length; l < s; l++) {
|
|
3580
3565
|
if (typeof e[l][0] != "number" || typeof e[l][1] != "number")
|
|
3581
3566
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3582
|
-
let c =
|
|
3583
|
-
c.x === o.x && c.y === o.y || (this.segments.push(
|
|
3567
|
+
let c = Ze.round(e[l][0], e[l][1]);
|
|
3568
|
+
c.x === o.x && c.y === o.y || (this.segments.push(_e.fromRing(o, c, this)), c.x < this.bbox.ll.x && (this.bbox.ll.x = c.x), c.y < this.bbox.ll.y && (this.bbox.ll.y = c.y), c.x > this.bbox.ur.x && (this.bbox.ur.x = c.x), c.y > this.bbox.ur.y && (this.bbox.ur.y = c.y), o = c);
|
|
3584
3569
|
}
|
|
3585
|
-
(r.x !== o.x || r.y !== o.y) && this.segments.push(
|
|
3570
|
+
(r.x !== o.x || r.y !== o.y) && this.segments.push(_e.fromRing(o, r, this));
|
|
3586
3571
|
}
|
|
3587
3572
|
getSweepEvents() {
|
|
3588
3573
|
const e = [];
|
|
3589
|
-
for (let t = 0,
|
|
3574
|
+
for (let t = 0, i = this.segments.length; t < i; t++) {
|
|
3590
3575
|
const r = this.segments[t];
|
|
3591
3576
|
e.push(r.leftSE), e.push(r.rightSE);
|
|
3592
3577
|
}
|
|
3593
3578
|
return e;
|
|
3594
3579
|
}
|
|
3595
3580
|
}
|
|
3596
|
-
class
|
|
3581
|
+
class Kr {
|
|
3597
3582
|
constructor(e, t) {
|
|
3598
3583
|
if (!Array.isArray(e))
|
|
3599
3584
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3600
|
-
this.exteriorRing = new
|
|
3585
|
+
this.exteriorRing = new Ni(e[0], this, !0), this.bbox = {
|
|
3601
3586
|
ll: {
|
|
3602
3587
|
x: this.exteriorRing.bbox.ll.x,
|
|
3603
3588
|
y: this.exteriorRing.bbox.ll.y
|
|
@@ -3607,15 +3592,15 @@ class to {
|
|
|
3607
3592
|
y: this.exteriorRing.bbox.ur.y
|
|
3608
3593
|
}
|
|
3609
3594
|
}, this.interiorRings = [];
|
|
3610
|
-
for (let
|
|
3611
|
-
const o = new
|
|
3595
|
+
for (let i = 1, r = e.length; i < r; i++) {
|
|
3596
|
+
const o = new Ni(e[i], this, !1);
|
|
3612
3597
|
o.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = o.bbox.ll.x), o.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = o.bbox.ll.y), o.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = o.bbox.ur.x), o.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = o.bbox.ur.y), this.interiorRings.push(o);
|
|
3613
3598
|
}
|
|
3614
3599
|
this.multiPoly = t;
|
|
3615
3600
|
}
|
|
3616
3601
|
getSweepEvents() {
|
|
3617
3602
|
const e = this.exteriorRing.getSweepEvents();
|
|
3618
|
-
for (let t = 0,
|
|
3603
|
+
for (let t = 0, i = this.interiorRings.length; t < i; t++) {
|
|
3619
3604
|
const r = this.interiorRings[t].getSweepEvents();
|
|
3620
3605
|
for (let o = 0, l = r.length; o < l; o++)
|
|
3621
3606
|
e.push(r[o]);
|
|
@@ -3623,7 +3608,7 @@ class to {
|
|
|
3623
3608
|
return e;
|
|
3624
3609
|
}
|
|
3625
3610
|
}
|
|
3626
|
-
class
|
|
3611
|
+
class Pi {
|
|
3627
3612
|
constructor(e, t) {
|
|
3628
3613
|
if (!Array.isArray(e))
|
|
3629
3614
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
@@ -3641,15 +3626,15 @@ class Ii {
|
|
|
3641
3626
|
y: Number.NEGATIVE_INFINITY
|
|
3642
3627
|
}
|
|
3643
3628
|
};
|
|
3644
|
-
for (let
|
|
3645
|
-
const o = new
|
|
3629
|
+
for (let i = 0, r = e.length; i < r; i++) {
|
|
3630
|
+
const o = new Kr(e[i], this);
|
|
3646
3631
|
o.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = o.bbox.ll.x), o.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = o.bbox.ll.y), o.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = o.bbox.ur.x), o.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = o.bbox.ur.y), this.polys.push(o);
|
|
3647
3632
|
}
|
|
3648
3633
|
this.isSubject = t;
|
|
3649
3634
|
}
|
|
3650
3635
|
getSweepEvents() {
|
|
3651
3636
|
const e = [];
|
|
3652
|
-
for (let t = 0,
|
|
3637
|
+
for (let t = 0, i = this.polys.length; t < i; t++) {
|
|
3653
3638
|
const r = this.polys[t].getSweepEvents();
|
|
3654
3639
|
for (let o = 0, l = r.length; o < l; o++)
|
|
3655
3640
|
e.push(r[o]);
|
|
@@ -3657,13 +3642,13 @@ class Ii {
|
|
|
3657
3642
|
return e;
|
|
3658
3643
|
}
|
|
3659
3644
|
}
|
|
3660
|
-
class
|
|
3645
|
+
class ct {
|
|
3661
3646
|
/* Given the segments from the sweep line pass, compute & return a series
|
|
3662
3647
|
* of closed rings from all the segments marked to be part of the result */
|
|
3663
3648
|
static factory(e) {
|
|
3664
3649
|
const t = [];
|
|
3665
|
-
for (let
|
|
3666
|
-
const o = e[
|
|
3650
|
+
for (let i = 0, r = e.length; i < r; i++) {
|
|
3651
|
+
const o = e[i];
|
|
3667
3652
|
if (!o.isInResult() || o.ringOut) continue;
|
|
3668
3653
|
let l = null, s = o.leftSE, c = o.rightSE;
|
|
3669
3654
|
const u = [s], d = s.point, a = [];
|
|
@@ -3686,24 +3671,24 @@ class ht {
|
|
|
3686
3671
|
}
|
|
3687
3672
|
if (h !== null) {
|
|
3688
3673
|
const y = a.splice(h)[0], b = u.splice(y.index);
|
|
3689
|
-
b.unshift(b[0].otherSE), t.push(new
|
|
3674
|
+
b.unshift(b[0].otherSE), t.push(new ct(b.reverse()));
|
|
3690
3675
|
continue;
|
|
3691
3676
|
}
|
|
3692
3677
|
a.push({
|
|
3693
3678
|
index: u.length,
|
|
3694
3679
|
point: s.point
|
|
3695
3680
|
});
|
|
3696
|
-
const
|
|
3697
|
-
c = f.sort(
|
|
3681
|
+
const m = s.getLeftmostComparator(l);
|
|
3682
|
+
c = f.sort(m)[0].otherSE;
|
|
3698
3683
|
break;
|
|
3699
3684
|
}
|
|
3700
|
-
t.push(new
|
|
3685
|
+
t.push(new ct(u));
|
|
3701
3686
|
}
|
|
3702
3687
|
return t;
|
|
3703
3688
|
}
|
|
3704
3689
|
constructor(e) {
|
|
3705
3690
|
this.events = e;
|
|
3706
|
-
for (let t = 0,
|
|
3691
|
+
for (let t = 0, i = e.length; t < i; t++)
|
|
3707
3692
|
e[t].segment.ringOut = this;
|
|
3708
3693
|
this.poly = null;
|
|
3709
3694
|
}
|
|
@@ -3712,11 +3697,11 @@ class ht {
|
|
|
3712
3697
|
const t = [e];
|
|
3713
3698
|
for (let u = 1, d = this.events.length - 1; u < d; u++) {
|
|
3714
3699
|
const a = this.events[u].point, f = this.events[u + 1].point;
|
|
3715
|
-
|
|
3700
|
+
Mi(a, e, f) !== 0 && (t.push(a), e = a);
|
|
3716
3701
|
}
|
|
3717
3702
|
if (t.length === 1) return null;
|
|
3718
|
-
const
|
|
3719
|
-
|
|
3703
|
+
const i = t[0], r = t[1];
|
|
3704
|
+
Mi(i, e, r) === 0 && t.shift(), t.push(t[0]);
|
|
3720
3705
|
const o = this.isExteriorRing() ? 1 : -1, l = this.isExteriorRing() ? 0 : t.length - 1, s = this.isExteriorRing() ? t.length : -1, c = [];
|
|
3721
3706
|
for (let u = l; u != s; u += o) c.push([t[u].x, t[u].y]);
|
|
3722
3707
|
return c;
|
|
@@ -3736,19 +3721,19 @@ class ht {
|
|
|
3736
3721
|
let e = this.events[0];
|
|
3737
3722
|
for (let r = 1, o = this.events.length; r < o; r++) {
|
|
3738
3723
|
const l = this.events[r];
|
|
3739
|
-
|
|
3724
|
+
re.compare(e, l) > 0 && (e = l);
|
|
3740
3725
|
}
|
|
3741
|
-
let t = e.segment.prevInResult(),
|
|
3726
|
+
let t = e.segment.prevInResult(), i = t ? t.prevInResult() : null;
|
|
3742
3727
|
for (; ; ) {
|
|
3743
3728
|
if (!t) return null;
|
|
3744
|
-
if (!
|
|
3745
|
-
if (
|
|
3746
|
-
return
|
|
3747
|
-
t =
|
|
3729
|
+
if (!i) return t.ringOut;
|
|
3730
|
+
if (i.ringOut !== t.ringOut)
|
|
3731
|
+
return i.ringOut.enclosingRing() !== t.ringOut ? t.ringOut : t.ringOut.enclosingRing();
|
|
3732
|
+
t = i.prevInResult(), i = t ? t.prevInResult() : null;
|
|
3748
3733
|
}
|
|
3749
3734
|
}
|
|
3750
3735
|
}
|
|
3751
|
-
class
|
|
3736
|
+
class Ri {
|
|
3752
3737
|
constructor(e) {
|
|
3753
3738
|
this.exteriorRing = e, e.poly = this, this.interiorRings = [];
|
|
3754
3739
|
}
|
|
@@ -3758,20 +3743,20 @@ class Oi {
|
|
|
3758
3743
|
getGeom() {
|
|
3759
3744
|
const e = [this.exteriorRing.getGeom()];
|
|
3760
3745
|
if (e[0] === null) return null;
|
|
3761
|
-
for (let t = 0,
|
|
3746
|
+
for (let t = 0, i = this.interiorRings.length; t < i; t++) {
|
|
3762
3747
|
const r = this.interiorRings[t].getGeom();
|
|
3763
3748
|
r !== null && e.push(r);
|
|
3764
3749
|
}
|
|
3765
3750
|
return e;
|
|
3766
3751
|
}
|
|
3767
3752
|
}
|
|
3768
|
-
class
|
|
3753
|
+
class Jr {
|
|
3769
3754
|
constructor(e) {
|
|
3770
3755
|
this.rings = e, this.polys = this._composePolys(e);
|
|
3771
3756
|
}
|
|
3772
3757
|
getGeom() {
|
|
3773
3758
|
const e = [];
|
|
3774
|
-
for (let t = 0,
|
|
3759
|
+
for (let t = 0, i = this.polys.length; t < i; t++) {
|
|
3775
3760
|
const r = this.polys[t].getGeom();
|
|
3776
3761
|
r !== null && e.push(r);
|
|
3777
3762
|
}
|
|
@@ -3779,27 +3764,27 @@ class io {
|
|
|
3779
3764
|
}
|
|
3780
3765
|
_composePolys(e) {
|
|
3781
3766
|
const t = [];
|
|
3782
|
-
for (let
|
|
3783
|
-
const o = e[
|
|
3767
|
+
for (let i = 0, r = e.length; i < r; i++) {
|
|
3768
|
+
const o = e[i];
|
|
3784
3769
|
if (!o.poly)
|
|
3785
|
-
if (o.isExteriorRing()) t.push(new
|
|
3770
|
+
if (o.isExteriorRing()) t.push(new Ri(o));
|
|
3786
3771
|
else {
|
|
3787
3772
|
const l = o.enclosingRing();
|
|
3788
|
-
l.poly || t.push(new
|
|
3773
|
+
l.poly || t.push(new Ri(l)), l.poly.addInterior(o);
|
|
3789
3774
|
}
|
|
3790
3775
|
}
|
|
3791
3776
|
return t;
|
|
3792
3777
|
}
|
|
3793
3778
|
}
|
|
3794
|
-
class
|
|
3779
|
+
class $r {
|
|
3795
3780
|
constructor(e) {
|
|
3796
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
3797
|
-
this.queue = e, this.tree = new
|
|
3781
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : _e.compare;
|
|
3782
|
+
this.queue = e, this.tree = new Ut(t), this.segments = [];
|
|
3798
3783
|
}
|
|
3799
3784
|
process(e) {
|
|
3800
|
-
const t = e.segment,
|
|
3785
|
+
const t = e.segment, i = [];
|
|
3801
3786
|
if (e.consumedBy)
|
|
3802
|
-
return e.isLeft ? this.queue.remove(e.otherSE) : this.tree.remove(t),
|
|
3787
|
+
return e.isLeft ? this.queue.remove(e.otherSE) : this.tree.remove(t), i;
|
|
3803
3788
|
const r = e.isLeft ? this.tree.add(t) : this.tree.find(t);
|
|
3804
3789
|
if (!r) throw new Error(`Unable to find segment #${t.id} [${t.leftSE.point.x}, ${t.leftSE.point.y}] -> [${t.rightSE.point.x}, ${t.rightSE.point.y}] in SweepLine tree.`);
|
|
3805
3790
|
let o = r, l = r, s, c;
|
|
@@ -3813,8 +3798,8 @@ class no {
|
|
|
3813
3798
|
const a = s.getIntersection(t);
|
|
3814
3799
|
if (a !== null && (t.isAnEndpoint(a) || (u = a), !s.isAnEndpoint(a))) {
|
|
3815
3800
|
const f = this._splitSafely(s, a);
|
|
3816
|
-
for (let h = 0,
|
|
3817
|
-
|
|
3801
|
+
for (let h = 0, m = f.length; h < m; h++)
|
|
3802
|
+
i.push(f[h]);
|
|
3818
3803
|
}
|
|
3819
3804
|
}
|
|
3820
3805
|
let d = null;
|
|
@@ -3822,18 +3807,18 @@ class no {
|
|
|
3822
3807
|
const a = c.getIntersection(t);
|
|
3823
3808
|
if (a !== null && (t.isAnEndpoint(a) || (d = a), !c.isAnEndpoint(a))) {
|
|
3824
3809
|
const f = this._splitSafely(c, a);
|
|
3825
|
-
for (let h = 0,
|
|
3826
|
-
|
|
3810
|
+
for (let h = 0, m = f.length; h < m; h++)
|
|
3811
|
+
i.push(f[h]);
|
|
3827
3812
|
}
|
|
3828
3813
|
}
|
|
3829
3814
|
if (u !== null || d !== null) {
|
|
3830
3815
|
let a = null;
|
|
3831
|
-
u === null ? a = d : d === null ? a = u : a =
|
|
3816
|
+
u === null ? a = d : d === null ? a = u : a = re.comparePoints(u, d) <= 0 ? u : d, this.queue.remove(t.rightSE), i.push(t.rightSE);
|
|
3832
3817
|
const f = t.split(a);
|
|
3833
|
-
for (let h = 0,
|
|
3834
|
-
|
|
3818
|
+
for (let h = 0, m = f.length; h < m; h++)
|
|
3819
|
+
i.push(f[h]);
|
|
3835
3820
|
}
|
|
3836
|
-
|
|
3821
|
+
i.length > 0 ? (this.tree.remove(t), i.push(e)) : (this.segments.push(t), t.prev = s);
|
|
3837
3822
|
} else {
|
|
3838
3823
|
if (s && c) {
|
|
3839
3824
|
const u = s.getIntersection(c);
|
|
@@ -3841,56 +3826,56 @@ class no {
|
|
|
3841
3826
|
if (!s.isAnEndpoint(u)) {
|
|
3842
3827
|
const d = this._splitSafely(s, u);
|
|
3843
3828
|
for (let a = 0, f = d.length; a < f; a++)
|
|
3844
|
-
|
|
3829
|
+
i.push(d[a]);
|
|
3845
3830
|
}
|
|
3846
3831
|
if (!c.isAnEndpoint(u)) {
|
|
3847
3832
|
const d = this._splitSafely(c, u);
|
|
3848
3833
|
for (let a = 0, f = d.length; a < f; a++)
|
|
3849
|
-
|
|
3834
|
+
i.push(d[a]);
|
|
3850
3835
|
}
|
|
3851
3836
|
}
|
|
3852
3837
|
}
|
|
3853
3838
|
this.tree.remove(t);
|
|
3854
3839
|
}
|
|
3855
|
-
return
|
|
3840
|
+
return i;
|
|
3856
3841
|
}
|
|
3857
3842
|
/* Safely split a segment that is currently in the datastructures
|
|
3858
3843
|
* IE - a segment other than the one that is currently being processed. */
|
|
3859
3844
|
_splitSafely(e, t) {
|
|
3860
3845
|
this.tree.remove(e);
|
|
3861
|
-
const
|
|
3862
|
-
this.queue.remove(
|
|
3846
|
+
const i = e.rightSE;
|
|
3847
|
+
this.queue.remove(i);
|
|
3863
3848
|
const r = e.split(t);
|
|
3864
|
-
return r.push(
|
|
3849
|
+
return r.push(i), e.consumedBy === void 0 && this.tree.add(e), r;
|
|
3865
3850
|
}
|
|
3866
3851
|
}
|
|
3867
|
-
const
|
|
3868
|
-
class
|
|
3869
|
-
run(e, t,
|
|
3870
|
-
|
|
3871
|
-
const r = [new
|
|
3872
|
-
for (let a = 0, f =
|
|
3873
|
-
r.push(new
|
|
3874
|
-
if (
|
|
3852
|
+
const Ti = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, eo = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
|
|
3853
|
+
class to {
|
|
3854
|
+
run(e, t, i) {
|
|
3855
|
+
se.type = e, Ze.reset();
|
|
3856
|
+
const r = [new Pi(t, !0)];
|
|
3857
|
+
for (let a = 0, f = i.length; a < f; a++)
|
|
3858
|
+
r.push(new Pi(i[a], !1));
|
|
3859
|
+
if (se.numMultiPolys = r.length, se.type === "difference") {
|
|
3875
3860
|
const a = r[0];
|
|
3876
3861
|
let f = 1;
|
|
3877
3862
|
for (; f < r.length; )
|
|
3878
|
-
|
|
3863
|
+
zt(r[f].bbox, a.bbox) !== null ? f++ : r.splice(f, 1);
|
|
3879
3864
|
}
|
|
3880
|
-
if (
|
|
3865
|
+
if (se.type === "intersection")
|
|
3881
3866
|
for (let a = 0, f = r.length; a < f; a++) {
|
|
3882
3867
|
const h = r[a];
|
|
3883
|
-
for (let
|
|
3884
|
-
if (
|
|
3868
|
+
for (let m = a + 1, y = r.length; m < y; m++)
|
|
3869
|
+
if (zt(h.bbox, r[m].bbox) === null) return [];
|
|
3885
3870
|
}
|
|
3886
|
-
const o = new
|
|
3871
|
+
const o = new Ut(re.compare);
|
|
3887
3872
|
for (let a = 0, f = r.length; a < f; a++) {
|
|
3888
3873
|
const h = r[a].getSweepEvents();
|
|
3889
|
-
for (let
|
|
3890
|
-
if (o.insert(h[
|
|
3874
|
+
for (let m = 0, y = h.length; m < y; m++)
|
|
3875
|
+
if (o.insert(h[m]), o.size > Ti)
|
|
3891
3876
|
throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
|
|
3892
3877
|
}
|
|
3893
|
-
const l = new
|
|
3878
|
+
const l = new $r(o);
|
|
3894
3879
|
let s = o.size, c = o.pop();
|
|
3895
3880
|
for (; c; ) {
|
|
3896
3881
|
const a = c.key;
|
|
@@ -3898,78 +3883,78 @@ class oo {
|
|
|
3898
3883
|
const h = a.segment;
|
|
3899
3884
|
throw new Error(`Unable to pop() ${a.isLeft ? "left" : "right"} SweepEvent [${a.point.x}, ${a.point.y}] from segment #${h.id} [${h.leftSE.point.x}, ${h.leftSE.point.y}] -> [${h.rightSE.point.x}, ${h.rightSE.point.y}] from queue.`);
|
|
3900
3885
|
}
|
|
3901
|
-
if (o.size >
|
|
3886
|
+
if (o.size > Ti)
|
|
3902
3887
|
throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");
|
|
3903
|
-
if (l.segments.length >
|
|
3888
|
+
if (l.segments.length > eo)
|
|
3904
3889
|
throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
|
|
3905
3890
|
const f = l.process(a);
|
|
3906
|
-
for (let h = 0,
|
|
3891
|
+
for (let h = 0, m = f.length; h < m; h++) {
|
|
3907
3892
|
const y = f[h];
|
|
3908
3893
|
y.consumedBy === void 0 && o.insert(y);
|
|
3909
3894
|
}
|
|
3910
3895
|
s = o.size, c = o.pop();
|
|
3911
3896
|
}
|
|
3912
|
-
|
|
3913
|
-
const u =
|
|
3914
|
-
return new
|
|
3915
|
-
}
|
|
3916
|
-
}
|
|
3917
|
-
const
|
|
3918
|
-
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0),
|
|
3919
|
-
t[
|
|
3920
|
-
return
|
|
3921
|
-
},
|
|
3922
|
-
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0),
|
|
3923
|
-
t[
|
|
3924
|
-
return
|
|
3925
|
-
},
|
|
3926
|
-
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0),
|
|
3927
|
-
t[
|
|
3928
|
-
return
|
|
3929
|
-
},
|
|
3930
|
-
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0),
|
|
3931
|
-
t[
|
|
3932
|
-
return
|
|
3897
|
+
Ze.reset();
|
|
3898
|
+
const u = ct.factory(l.segments);
|
|
3899
|
+
return new Jr(u).getGeom();
|
|
3900
|
+
}
|
|
3901
|
+
}
|
|
3902
|
+
const se = new to(), io = function(n) {
|
|
3903
|
+
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3904
|
+
t[i - 1] = arguments[i];
|
|
3905
|
+
return se.run("union", n, t);
|
|
3906
|
+
}, no = function(n) {
|
|
3907
|
+
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3908
|
+
t[i - 1] = arguments[i];
|
|
3909
|
+
return se.run("intersection", n, t);
|
|
3910
|
+
}, ro = function(n) {
|
|
3911
|
+
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3912
|
+
t[i - 1] = arguments[i];
|
|
3913
|
+
return se.run("xor", n, t);
|
|
3914
|
+
}, oo = function(n) {
|
|
3915
|
+
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3916
|
+
t[i - 1] = arguments[i];
|
|
3917
|
+
return se.run("difference", n, t);
|
|
3933
3918
|
};
|
|
3934
|
-
var
|
|
3935
|
-
union:
|
|
3936
|
-
intersection:
|
|
3937
|
-
xor:
|
|
3938
|
-
difference:
|
|
3919
|
+
var Qi = {
|
|
3920
|
+
union: io,
|
|
3921
|
+
intersection: no,
|
|
3922
|
+
xor: ro,
|
|
3923
|
+
difference: oo
|
|
3939
3924
|
};
|
|
3940
|
-
function
|
|
3925
|
+
function so(n) {
|
|
3941
3926
|
const e = [];
|
|
3942
|
-
if (
|
|
3927
|
+
if (Dt(n, (r) => {
|
|
3943
3928
|
e.push(r.coordinates);
|
|
3944
3929
|
}), e.length < 2)
|
|
3945
3930
|
throw new Error("Must have at least two features");
|
|
3946
|
-
const t =
|
|
3947
|
-
return
|
|
3931
|
+
const t = n.features[0].properties || {}, i = Qi.difference(e[0], ...e.slice(1));
|
|
3932
|
+
return i.length === 0 ? null : i.length === 1 ? Bt(i[0], t) : Gi(i, t);
|
|
3948
3933
|
}
|
|
3949
|
-
var
|
|
3950
|
-
function
|
|
3951
|
-
if (!
|
|
3934
|
+
var lo = so;
|
|
3935
|
+
function uo(n) {
|
|
3936
|
+
if (!n)
|
|
3952
3937
|
throw new Error("geojson is required");
|
|
3953
3938
|
var e = [];
|
|
3954
|
-
return
|
|
3939
|
+
return Pr(n, function(t) {
|
|
3955
3940
|
e.push(t);
|
|
3956
|
-
}),
|
|
3941
|
+
}), Tt(e);
|
|
3957
3942
|
}
|
|
3958
|
-
var
|
|
3959
|
-
function
|
|
3943
|
+
var ao = uo;
|
|
3944
|
+
function co(n, e = {}) {
|
|
3960
3945
|
const t = [];
|
|
3961
|
-
if (
|
|
3946
|
+
if (Dt(n, (r) => {
|
|
3962
3947
|
t.push(r.coordinates);
|
|
3963
3948
|
}), t.length < 2)
|
|
3964
3949
|
throw new Error("Must have at least 2 geometries");
|
|
3965
|
-
const
|
|
3966
|
-
return
|
|
3967
|
-
}
|
|
3968
|
-
var
|
|
3969
|
-
function
|
|
3970
|
-
const t =
|
|
3971
|
-
|
|
3972
|
-
|
|
3950
|
+
const i = Qi.union(t[0], ...t.slice(1));
|
|
3951
|
+
return i.length === 0 ? null : i.length === 1 ? Bt(i[0], e.properties) : Gi(i, e.properties);
|
|
3952
|
+
}
|
|
3953
|
+
var fo = co;
|
|
3954
|
+
function Ii(n, e) {
|
|
3955
|
+
const t = lo(
|
|
3956
|
+
Tt([
|
|
3957
|
+
Bt([
|
|
3973
3958
|
[
|
|
3974
3959
|
[180, 90],
|
|
3975
3960
|
[-180, 90],
|
|
@@ -3978,16 +3963,16 @@ function Ai(i, e) {
|
|
|
3978
3963
|
[180, 90]
|
|
3979
3964
|
]
|
|
3980
3965
|
]),
|
|
3981
|
-
|
|
3966
|
+
n
|
|
3982
3967
|
])
|
|
3983
3968
|
);
|
|
3984
3969
|
if (!t)
|
|
3985
3970
|
return;
|
|
3986
3971
|
t.properties = { isMask: !0 };
|
|
3987
|
-
const
|
|
3972
|
+
const i = lt(bi(n)), r = (i[2] - i[0]) / 360 / 1e3, o = i[0] < -180, l = i[2] > 180, s = ao(n);
|
|
3988
3973
|
if (s.features.length > 1 && (o || l))
|
|
3989
3974
|
for (const c of s.features) {
|
|
3990
|
-
const u =
|
|
3975
|
+
const u = lt(bi(c));
|
|
3991
3976
|
if (l && u[0] < -180 + r)
|
|
3992
3977
|
for (const d of c.geometry.coordinates)
|
|
3993
3978
|
for (const a of d)
|
|
@@ -3998,36 +3983,36 @@ function Ai(i, e) {
|
|
|
3998
3983
|
a[0] -= 360 - r;
|
|
3999
3984
|
}
|
|
4000
3985
|
e(
|
|
4001
|
-
|
|
4002
|
-
s.features.length < 2 ?
|
|
3986
|
+
Tt([
|
|
3987
|
+
s.features.length < 2 ? n : fo(s) ?? n,
|
|
4003
3988
|
t
|
|
4004
3989
|
])
|
|
4005
3990
|
);
|
|
4006
3991
|
}
|
|
4007
|
-
const
|
|
4008
|
-
function
|
|
3992
|
+
const Oi = "EPSG:4326";
|
|
3993
|
+
function ho(n) {
|
|
4009
3994
|
var o;
|
|
4010
|
-
const e =
|
|
4011
|
-
return new
|
|
4012
|
-
stroke: t ? void 0 : new
|
|
3995
|
+
const e = n.getProperties(), { isMask: t } = e, i = (o = n.getGeometry()) == null ? void 0 : o.getType(), r = t ? 0 : i === "LineString" || i === "MultiLineString" ? 3 : 2;
|
|
3996
|
+
return new Ln({
|
|
3997
|
+
stroke: t ? void 0 : new ei({
|
|
4013
3998
|
color: "#3170fe",
|
|
4014
3999
|
lineDash: [r, r],
|
|
4015
4000
|
width: r,
|
|
4016
4001
|
lineCap: "butt"
|
|
4017
4002
|
}),
|
|
4018
|
-
fill: t ? new
|
|
4003
|
+
fill: t ? new $t({
|
|
4019
4004
|
color: "#00000020"
|
|
4020
4005
|
}) : void 0,
|
|
4021
|
-
image: new
|
|
4006
|
+
image: new En({
|
|
4022
4007
|
src: `/icons/marker_${e.isReverse ? "reverse" : e.isSelected ? "selected" : "unselected"}.svg`,
|
|
4023
4008
|
anchor: [0.5, 1]
|
|
4024
4009
|
}),
|
|
4025
4010
|
zIndex: e.isSelected ? 2 : e.isReverse ? 0 : 1,
|
|
4026
|
-
text: e.isSelected && e.tooltip ? new
|
|
4027
|
-
backgroundFill: new
|
|
4011
|
+
text: e.isSelected && e.tooltip ? new Sn({
|
|
4012
|
+
backgroundFill: new $t({ color: "white" }),
|
|
4028
4013
|
text: e.tooltip,
|
|
4029
4014
|
offsetY: -40,
|
|
4030
|
-
backgroundStroke: new
|
|
4015
|
+
backgroundStroke: new ei({
|
|
4031
4016
|
color: "white",
|
|
4032
4017
|
lineJoin: "round",
|
|
4033
4018
|
width: 3
|
|
@@ -4036,79 +4021,79 @@ function po(i) {
|
|
|
4036
4021
|
}) : void 0
|
|
4037
4022
|
});
|
|
4038
4023
|
}
|
|
4039
|
-
function
|
|
4024
|
+
function go(n, e = {}, t = {}, i = ho) {
|
|
4040
4025
|
let r = -1, o, l, s, c = !1;
|
|
4041
|
-
const u = new
|
|
4026
|
+
const u = new vn({
|
|
4042
4027
|
updateWhileAnimating: !0
|
|
4043
4028
|
});
|
|
4044
|
-
|
|
4045
|
-
const d = new
|
|
4046
|
-
u.setSource(d), u.setStyle(
|
|
4047
|
-
|
|
4029
|
+
n.addLayer(u);
|
|
4030
|
+
const d = new _n({});
|
|
4031
|
+
u.setSource(d), u.setStyle(i), n.on("click", (m) => {
|
|
4032
|
+
n.forEachFeatureAtPixel(m.pixel, (y) => {
|
|
4048
4033
|
const b = y.getId();
|
|
4049
4034
|
if (b)
|
|
4050
|
-
return
|
|
4035
|
+
return m.stopPropagation(), l == null || l({ type: "markerClick", id: b }), y;
|
|
4051
4036
|
});
|
|
4052
|
-
}),
|
|
4053
|
-
const y =
|
|
4037
|
+
}), n.on("pointermove", (m) => {
|
|
4038
|
+
const y = n.forEachFeatureAtPixel(m.pixel, (b) => b.getId());
|
|
4054
4039
|
o !== y && (o && (l == null || l({
|
|
4055
4040
|
type: "markerMouseLeave",
|
|
4056
4041
|
id: o
|
|
4057
4042
|
})), y && (l == null || l({
|
|
4058
4043
|
type: "markerMouseEnter",
|
|
4059
4044
|
id: y
|
|
4060
|
-
})),
|
|
4045
|
+
})), n.getTargetElement().style.cursor = y ? "pointer" : c ? "crosshair" : "", o = y);
|
|
4061
4046
|
});
|
|
4062
4047
|
function a() {
|
|
4063
|
-
return
|
|
4048
|
+
return wn() ?? n.getView().getProjection();
|
|
4064
4049
|
}
|
|
4065
|
-
function f(
|
|
4066
|
-
return
|
|
4050
|
+
function f(m) {
|
|
4051
|
+
return m.transform(Oi, a());
|
|
4067
4052
|
}
|
|
4068
|
-
const h = (
|
|
4053
|
+
const h = (m) => {
|
|
4069
4054
|
l == null || l({
|
|
4070
4055
|
type: "mapClick",
|
|
4071
|
-
coordinates:
|
|
4056
|
+
coordinates: Jt(m.coordinate, a())
|
|
4072
4057
|
});
|
|
4073
4058
|
};
|
|
4074
4059
|
return {
|
|
4075
|
-
setEventHandler(
|
|
4076
|
-
|
|
4060
|
+
setEventHandler(m) {
|
|
4061
|
+
m ? (l = m, n.on("click", h)) : (l = void 0, n.un("click", h));
|
|
4077
4062
|
},
|
|
4078
|
-
flyTo(
|
|
4079
|
-
|
|
4080
|
-
center:
|
|
4063
|
+
flyTo(m, y) {
|
|
4064
|
+
n.getView().animate({
|
|
4065
|
+
center: tt(m, a()),
|
|
4081
4066
|
...y ? { zoom: y } : {},
|
|
4082
4067
|
duration: 2e3,
|
|
4083
4068
|
...e
|
|
4084
4069
|
});
|
|
4085
4070
|
},
|
|
4086
|
-
fitBounds(
|
|
4087
|
-
|
|
4071
|
+
fitBounds(m, y, b) {
|
|
4072
|
+
n.getView().fit(bn(m, Oi, a()), {
|
|
4088
4073
|
padding: [y, y, y, y],
|
|
4089
4074
|
...b ? { maxZoom: b } : {},
|
|
4090
4075
|
duration: 2e3,
|
|
4091
4076
|
...t
|
|
4092
4077
|
});
|
|
4093
4078
|
},
|
|
4094
|
-
indicateReverse(
|
|
4095
|
-
c =
|
|
4079
|
+
indicateReverse(m) {
|
|
4080
|
+
c = m, n.getTargetElement().style.cursor = m ? "crosshair" : "";
|
|
4096
4081
|
},
|
|
4097
|
-
setReverseMarker(
|
|
4098
|
-
s ?
|
|
4099
|
-
|
|
4100
|
-
) : (d.removeFeature(s), s.dispose(), s = void 0) :
|
|
4101
|
-
new
|
|
4082
|
+
setReverseMarker(m) {
|
|
4083
|
+
s ? m ? s.getGeometry().setCoordinates(
|
|
4084
|
+
tt(m, a())
|
|
4085
|
+
) : (d.removeFeature(s), s.dispose(), s = void 0) : m && (s = new fe(
|
|
4086
|
+
new xt(tt(m, a()))
|
|
4102
4087
|
), s.setProperties({ isReverse: !0 }), d.addFeature(s));
|
|
4103
4088
|
},
|
|
4104
|
-
setFeatures(
|
|
4089
|
+
setFeatures(m, y, b) {
|
|
4105
4090
|
function w(L) {
|
|
4106
4091
|
var S;
|
|
4107
4092
|
if (L)
|
|
4108
4093
|
for (const E of L.features) {
|
|
4109
|
-
const M = E.geometry.type === "Polygon" ? new
|
|
4094
|
+
const M = E.geometry.type === "Polygon" ? new Ht(E.geometry.coordinates) : E.geometry.type === "MultiPolygon" ? new Yt(E.geometry.coordinates) : null;
|
|
4110
4095
|
M && d.addFeature(
|
|
4111
|
-
new
|
|
4096
|
+
new fe({
|
|
4112
4097
|
isMask: !!((S = E.properties) != null && S.isMask),
|
|
4113
4098
|
geometry: f(M)
|
|
4114
4099
|
})
|
|
@@ -4119,40 +4104,40 @@ function vo(i, e = {}, t = {}, n = po) {
|
|
|
4119
4104
|
let L = !1;
|
|
4120
4105
|
if (y.geometry.type === "GeometryCollection") {
|
|
4121
4106
|
const S = y.geometry.geometries.map(
|
|
4122
|
-
(E) => E.type === "Polygon" ? new
|
|
4107
|
+
(E) => E.type === "Polygon" ? new Ht(E.coordinates) : E.type === "MultiPolygon" ? new Yt(E.coordinates) : null
|
|
4123
4108
|
).filter((E) => !!E);
|
|
4124
4109
|
if (S.length > 0)
|
|
4125
4110
|
d.addFeature(
|
|
4126
|
-
new
|
|
4111
|
+
new fe(f(new pn(S)))
|
|
4127
4112
|
), L = !0;
|
|
4128
4113
|
else
|
|
4129
4114
|
for (const E of y.geometry.geometries)
|
|
4130
4115
|
E.type === "LineString" ? (d.addFeature(
|
|
4131
|
-
new
|
|
4132
|
-
f(new
|
|
4116
|
+
new fe(
|
|
4117
|
+
f(new Xt(E.coordinates))
|
|
4133
4118
|
)
|
|
4134
4119
|
), L = !0) : E.type === "MultiLineString" && d.addFeature(
|
|
4135
|
-
new
|
|
4136
|
-
f(new
|
|
4120
|
+
new fe(
|
|
4121
|
+
f(new Kt(E.coordinates))
|
|
4137
4122
|
)
|
|
4138
4123
|
), L = !0;
|
|
4139
4124
|
}
|
|
4140
4125
|
if (!L) {
|
|
4141
4126
|
if (y.geometry.type === "Polygon")
|
|
4142
|
-
|
|
4127
|
+
Ii(y, w);
|
|
4143
4128
|
else if (y.geometry.type === "MultiPolygon")
|
|
4144
|
-
|
|
4129
|
+
Ii(y, w);
|
|
4145
4130
|
else if (y.geometry.type === "LineString") {
|
|
4146
4131
|
d.addFeature(
|
|
4147
|
-
new
|
|
4148
|
-
f(new
|
|
4132
|
+
new fe(
|
|
4133
|
+
f(new Xt(y.geometry.coordinates))
|
|
4149
4134
|
)
|
|
4150
4135
|
);
|
|
4151
4136
|
return;
|
|
4152
4137
|
} else if (y.geometry.type === "MultiLineString") {
|
|
4153
4138
|
d.addFeature(
|
|
4154
|
-
new
|
|
4155
|
-
f(new
|
|
4139
|
+
new fe(
|
|
4140
|
+
f(new Kt(y.geometry.coordinates))
|
|
4156
4141
|
)
|
|
4157
4142
|
);
|
|
4158
4143
|
return;
|
|
@@ -4160,13 +4145,13 @@ function vo(i, e = {}, t = {}, n = po) {
|
|
|
4160
4145
|
}
|
|
4161
4146
|
if (!b && y.geometry.type !== "Point")
|
|
4162
4147
|
return;
|
|
4163
|
-
d.addFeature(new
|
|
4148
|
+
d.addFeature(new fe(f(new xt(y.center))));
|
|
4164
4149
|
}
|
|
4165
|
-
for (const L of
|
|
4150
|
+
for (const L of m ?? []) {
|
|
4166
4151
|
if (L === y)
|
|
4167
4152
|
continue;
|
|
4168
|
-
const S = new
|
|
4169
|
-
new
|
|
4153
|
+
const S = new fe(
|
|
4154
|
+
new xt(tt(L.center, a()))
|
|
4170
4155
|
);
|
|
4171
4156
|
S.setId(L.id), S.setProperties({
|
|
4172
4157
|
fuzzy: !!L.matching_text,
|
|
@@ -4174,71 +4159,71 @@ function vo(i, e = {}, t = {}, n = po) {
|
|
|
4174
4159
|
}), d.addFeature(S);
|
|
4175
4160
|
}
|
|
4176
4161
|
},
|
|
4177
|
-
setSelectedMarker(
|
|
4162
|
+
setSelectedMarker(m) {
|
|
4178
4163
|
var w, L, S;
|
|
4179
4164
|
const y = d.getFeatures(), b = (w = y[0]) != null && w.getProperties().isReverse ? 1 : 0;
|
|
4180
4165
|
r > -1 && ((L = y[r + b]) == null || L.setProperties({
|
|
4181
4166
|
isSelected: !1
|
|
4182
|
-
})),
|
|
4167
|
+
})), m > -1 && ((S = y[m + b]) == null || S.setProperties({
|
|
4183
4168
|
isSelected: !0
|
|
4184
|
-
})), r =
|
|
4169
|
+
})), r = m;
|
|
4185
4170
|
},
|
|
4186
4171
|
getCenterAndZoom() {
|
|
4187
|
-
const
|
|
4172
|
+
const m = n.getView(), y = m.getCenter(), b = m.getZoom();
|
|
4188
4173
|
if (!(!y || b === void 0))
|
|
4189
|
-
return [b, ...
|
|
4174
|
+
return [b, ...Jt(y, a())];
|
|
4190
4175
|
}
|
|
4191
4176
|
};
|
|
4192
4177
|
}
|
|
4193
|
-
var
|
|
4194
|
-
class
|
|
4178
|
+
var Z, Ne;
|
|
4179
|
+
class zo extends yn {
|
|
4195
4180
|
constructor(t) {
|
|
4196
|
-
const
|
|
4197
|
-
|
|
4181
|
+
const i = document.createElement("div");
|
|
4182
|
+
i.className = "ol-search";
|
|
4198
4183
|
super({
|
|
4199
|
-
element:
|
|
4184
|
+
element: i,
|
|
4200
4185
|
target: t.target
|
|
4201
4186
|
});
|
|
4202
|
-
|
|
4203
|
-
|
|
4187
|
+
Lt(this, Z);
|
|
4188
|
+
Lt(this, Ne);
|
|
4204
4189
|
const { flyTo: r, fullGeometryStyle: o, ...l } = t;
|
|
4205
|
-
|
|
4206
|
-
target:
|
|
4190
|
+
St(this, Z, new Nr({
|
|
4191
|
+
target: i,
|
|
4207
4192
|
props: {
|
|
4208
4193
|
flyTo: r === void 0 ? !0 : !!r,
|
|
4209
4194
|
...l
|
|
4210
4195
|
}
|
|
4211
|
-
})),
|
|
4196
|
+
})), V(this, Z).$on("select", (s) => {
|
|
4197
|
+
this.dispatchEvent(new mo(s.detail.feature));
|
|
4198
|
+
}), V(this, Z).$on("pick", (s) => {
|
|
4212
4199
|
this.dispatchEvent(new bo(s.detail.feature));
|
|
4213
|
-
}),
|
|
4214
|
-
this.dispatchEvent(new
|
|
4215
|
-
}),
|
|
4216
|
-
this.dispatchEvent(new
|
|
4217
|
-
}),
|
|
4218
|
-
this.dispatchEvent(new _o(s.detail.features));
|
|
4219
|
-
}), Q(this, V).$on("response", (s) => {
|
|
4200
|
+
}), V(this, Z).$on("featureslisted", (s) => {
|
|
4201
|
+
this.dispatchEvent(new yo(s.detail.features));
|
|
4202
|
+
}), V(this, Z).$on("featuresmarked", (s) => {
|
|
4203
|
+
this.dispatchEvent(new po(s.detail.features));
|
|
4204
|
+
}), V(this, Z).$on("response", (s) => {
|
|
4220
4205
|
this.dispatchEvent(
|
|
4221
|
-
new
|
|
4206
|
+
new _o(s.detail.url, s.detail.featureCollection)
|
|
4222
4207
|
);
|
|
4223
|
-
}),
|
|
4208
|
+
}), V(this, Z).$on("optionsvisibilitychange", (s) => {
|
|
4224
4209
|
this.dispatchEvent(
|
|
4225
|
-
new
|
|
4210
|
+
new vo(s.detail.optionsVisible)
|
|
4226
4211
|
);
|
|
4227
|
-
}),
|
|
4228
|
-
this.dispatchEvent(new
|
|
4229
|
-
}),
|
|
4230
|
-
this.dispatchEvent(new
|
|
4231
|
-
}),
|
|
4212
|
+
}), V(this, Z).$on("reversetoggle", (s) => {
|
|
4213
|
+
this.dispatchEvent(new Eo(s.detail.reverse));
|
|
4214
|
+
}), V(this, Z).$on("querychange", (s) => {
|
|
4215
|
+
this.dispatchEvent(new wo(s.detail.query));
|
|
4216
|
+
}), St(this, Ne, t);
|
|
4232
4217
|
}
|
|
4233
4218
|
setMap(t) {
|
|
4234
|
-
var
|
|
4219
|
+
var i;
|
|
4235
4220
|
if (super.setMap(t), t) {
|
|
4236
4221
|
const {
|
|
4237
4222
|
// marker,
|
|
4238
4223
|
// showResultMarkers,
|
|
4239
4224
|
flyTo: r,
|
|
4240
4225
|
fullGeometryStyle: o
|
|
4241
|
-
} =
|
|
4226
|
+
} = V(this, Ne), l = go(
|
|
4242
4227
|
t,
|
|
4243
4228
|
typeof r == "boolean" ? void 0 : r,
|
|
4244
4229
|
typeof r == "boolean" ? void 0 : r,
|
|
@@ -4246,110 +4231,110 @@ class Uo extends wn {
|
|
|
4246
4231
|
// showResultMarkers,
|
|
4247
4232
|
o
|
|
4248
4233
|
);
|
|
4249
|
-
(
|
|
4234
|
+
(i = V(this, Z)) == null || i.$set({ mapController: l });
|
|
4250
4235
|
}
|
|
4251
4236
|
}
|
|
4252
4237
|
setOptions(t) {
|
|
4253
4238
|
var l;
|
|
4254
|
-
Object.assign(
|
|
4255
|
-
const { flyTo:
|
|
4256
|
-
(l =
|
|
4239
|
+
Object.assign(V(this, Ne), t);
|
|
4240
|
+
const { flyTo: i, fullGeometryStyle: r, ...o } = V(this, Ne);
|
|
4241
|
+
(l = V(this, Z)) == null || l.$set({
|
|
4257
4242
|
...o,
|
|
4258
|
-
flyTo:
|
|
4243
|
+
flyTo: i === void 0 ? !0 : !!i
|
|
4259
4244
|
});
|
|
4260
4245
|
}
|
|
4261
|
-
setQuery(t,
|
|
4246
|
+
setQuery(t, i = !0) {
|
|
4262
4247
|
var r;
|
|
4263
|
-
(r =
|
|
4248
|
+
(r = V(this, Z)) == null || r.setQuery(t, i);
|
|
4264
4249
|
}
|
|
4265
4250
|
clearMap() {
|
|
4266
4251
|
var t;
|
|
4267
|
-
(t =
|
|
4252
|
+
(t = V(this, Z)) == null || t.clearMap();
|
|
4268
4253
|
}
|
|
4269
4254
|
clearList() {
|
|
4270
4255
|
var t;
|
|
4271
|
-
(t =
|
|
4256
|
+
(t = V(this, Z)) == null || t.clearList();
|
|
4272
4257
|
}
|
|
4273
4258
|
focus() {
|
|
4274
4259
|
var t;
|
|
4275
|
-
(t =
|
|
4260
|
+
(t = V(this, Z)) == null || t.focus();
|
|
4276
4261
|
}
|
|
4277
4262
|
blur() {
|
|
4278
4263
|
var t;
|
|
4279
|
-
(t =
|
|
4264
|
+
(t = V(this, Z)) == null || t.blur();
|
|
4280
4265
|
}
|
|
4281
4266
|
// onRemove() {
|
|
4282
4267
|
// this.#gc?.$destroy();
|
|
4283
4268
|
// }
|
|
4284
4269
|
}
|
|
4285
|
-
|
|
4286
|
-
class
|
|
4270
|
+
Z = new WeakMap(), Ne = new WeakMap();
|
|
4271
|
+
class mo extends xe {
|
|
4287
4272
|
constructor(t) {
|
|
4288
4273
|
super("select");
|
|
4289
|
-
|
|
4274
|
+
ne(this, "feature");
|
|
4290
4275
|
this.feature = t;
|
|
4291
4276
|
}
|
|
4292
4277
|
}
|
|
4293
|
-
class
|
|
4278
|
+
class yo extends xe {
|
|
4294
4279
|
constructor(t) {
|
|
4295
4280
|
super("featureslisted");
|
|
4296
|
-
|
|
4281
|
+
ne(this, "features");
|
|
4297
4282
|
this.features = t;
|
|
4298
4283
|
}
|
|
4299
4284
|
}
|
|
4300
|
-
class
|
|
4285
|
+
class po extends xe {
|
|
4301
4286
|
constructor(t) {
|
|
4302
4287
|
super("featuresmarked");
|
|
4303
|
-
|
|
4288
|
+
ne(this, "features");
|
|
4304
4289
|
this.features = t;
|
|
4305
4290
|
}
|
|
4306
4291
|
}
|
|
4307
|
-
class
|
|
4292
|
+
class vo extends xe {
|
|
4308
4293
|
constructor(t) {
|
|
4309
4294
|
super("optionsvisibilitychange");
|
|
4310
|
-
|
|
4295
|
+
ne(this, "optionsVisible");
|
|
4311
4296
|
this.optionsVisible = t;
|
|
4312
4297
|
}
|
|
4313
4298
|
}
|
|
4314
|
-
class
|
|
4299
|
+
class bo extends xe {
|
|
4315
4300
|
constructor(t) {
|
|
4316
4301
|
super("pick");
|
|
4317
|
-
|
|
4302
|
+
ne(this, "feature");
|
|
4318
4303
|
this.feature = t;
|
|
4319
4304
|
}
|
|
4320
4305
|
}
|
|
4321
|
-
class
|
|
4306
|
+
class wo extends xe {
|
|
4322
4307
|
constructor(t) {
|
|
4323
4308
|
super("querychange");
|
|
4324
|
-
|
|
4309
|
+
ne(this, "query");
|
|
4325
4310
|
this.query = t;
|
|
4326
4311
|
}
|
|
4327
4312
|
}
|
|
4328
|
-
class
|
|
4329
|
-
constructor(t,
|
|
4313
|
+
class _o extends xe {
|
|
4314
|
+
constructor(t, i) {
|
|
4330
4315
|
super("response");
|
|
4331
|
-
|
|
4332
|
-
|
|
4333
|
-
this.url = t, this.featureCollection =
|
|
4316
|
+
ne(this, "url");
|
|
4317
|
+
ne(this, "featureCollection");
|
|
4318
|
+
this.url = t, this.featureCollection = i;
|
|
4334
4319
|
}
|
|
4335
4320
|
}
|
|
4336
|
-
class
|
|
4321
|
+
class Eo extends xe {
|
|
4337
4322
|
constructor(t) {
|
|
4338
4323
|
super("reversetoggle");
|
|
4339
|
-
|
|
4324
|
+
ne(this, "reverse");
|
|
4340
4325
|
this.reverse = t;
|
|
4341
4326
|
}
|
|
4342
4327
|
}
|
|
4343
4328
|
export {
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4329
|
+
yo as FeaturesListedEvent,
|
|
4330
|
+
po as FeaturesMarkedEvent,
|
|
4331
|
+
zo as GeocodingControl,
|
|
4332
|
+
vo as OptionsVisibilityChangeEvent,
|
|
4333
|
+
bo as PickEvent,
|
|
4334
|
+
wo as QueryChangeEvent,
|
|
4335
|
+
_o as ResponseEvent,
|
|
4336
|
+
Eo as ReverseToggleEvent,
|
|
4337
|
+
mo as SelectEvent,
|
|
4338
|
+
go as createOpenLayersMapController
|
|
4354
4339
|
};
|
|
4355
4340
|
//# sourceMappingURL=openlayers.js.map
|