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