@maptiler/geocoding-control 1.4.2-dev.3 → 2.0.0-rc.2
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 +2659 -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 +1396 -1369
- 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.d.ts +2614 -5
- package/maplibregl.js +1563 -1418
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +3 -3
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.d.ts +2614 -5
- package/maptilersdk.js +1574 -1426
- 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 +1300 -1318
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +3 -3
- package/openlayers.umd.js.map +1 -1
- package/package.json +17 -17
- package/react.d.ts +4 -4
- package/react.js +811 -798
- 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 +1 -1
- package/svelte/FeatureItem.svelte.d.ts +1 -1
- package/svelte/GeocodingControl.svelte +68 -46
- package/svelte/GeocodingControl.svelte.d.ts +25 -11
- package/svelte/MapLibreBasedGeocodingControl.d.ts +2659 -35
- package/svelte/MapLibreBasedGeocodingControl.js +165 -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 +26 -15
- package/svelte/maplibregl-controller.d.ts +7 -7
- package/svelte/maplibregl-controller.js +96 -66
- package/svelte/maplibregl.d.ts +2614 -5
- package/svelte/maplibregl.js +10 -7
- package/svelte/maptilersdk.d.ts +2614 -5
- 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 +31 -45
- package/svelte/react.d.ts +4 -4
- package/svelte/react.js +5 -5
- package/svelte/types.d.ts +72 -30
- package/svelte/vanilla.d.ts +14 -1
- package/svelte/vanilla.js +31 -8
- package/types.d.ts +72 -30
- package/vanilla.d.ts +14 -1
- package/vanilla.js +837 -796
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
package/openlayers.js
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var pn = Object.defineProperty;
|
|
2
|
+
var Ht = (n) => {
|
|
3
3
|
throw TypeError(n);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
import { Control as
|
|
9
|
-
import
|
|
5
|
+
var vn = (n, e, t) => e in n ? pn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
6
|
+
var se = (n, e, t) => vn(n, typeof e != "symbol" ? e + "" : e, t), Yt = (n, e, t) => e.has(n) || Ht("Cannot " + t);
|
|
7
|
+
var Z = (n, e, t) => (Yt(n, e, "read from private field"), t ? t.call(n) : e.get(n)), Mt = (n, e, t) => e.has(n) ? Ht("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), rt = (n, e, t, i) => (Yt(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t);
|
|
8
|
+
import { Control as bn } 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 Xt, MultiPolygon as Kt, GeometryCollection as wn, LineString as Jt, MultiLineString as $t, Point as kt } from "ol/geom";
|
|
12
|
+
import _n from "ol/layer/Vector";
|
|
13
|
+
import { toLonLat as ei, getUserProjection as En, fromLonLat as ot, transformExtent as Ln } from "ol/proj";
|
|
14
|
+
import Sn from "ol/source/Vector";
|
|
15
|
+
import ti from "ol/style/Fill";
|
|
16
|
+
import xn from "ol/style/Icon";
|
|
17
|
+
import ii from "ol/style/Stroke";
|
|
18
|
+
import Mn from "ol/style/Style";
|
|
19
|
+
import kn from "ol/style/Text";
|
|
20
|
+
function G() {
|
|
21
|
+
}
|
|
22
|
+
function Cn(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 zi(n) {
|
|
30
30
|
return n();
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function ni() {
|
|
33
33
|
return /* @__PURE__ */ Object.create(null);
|
|
34
34
|
}
|
|
35
35
|
function ye(n) {
|
|
36
|
-
n.forEach(
|
|
36
|
+
n.forEach(zi);
|
|
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 st;
|
|
45
|
+
function J(n, e) {
|
|
46
|
+
return n === e ? !0 : (st || (st = document.createElement("a")), st.href = e, n === st.href);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function Nn(n) {
|
|
49
49
|
return Object.keys(n).length === 0;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Pn(n, e, t, i) {
|
|
52
52
|
if (n) {
|
|
53
53
|
const r = Fi(n, e, t, i);
|
|
54
54
|
return n[0](r);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
function Fi(n, e, t, i) {
|
|
58
|
-
return n[1] && i ?
|
|
58
|
+
return n[1] && i ? Cn(t.ctx.slice(), n[1](i(e))) : t.ctx;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function Tn(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 Cn(n, e, t, i) {
|
|
|
72
72
|
}
|
|
73
73
|
return e.dirty;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function Rn(n, e, t, i, r, o) {
|
|
76
76
|
if (r) {
|
|
77
77
|
const l = Fi(e, t, i, o);
|
|
78
78
|
n.p(l, r);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
function
|
|
81
|
+
function In(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 Pn(n) {
|
|
|
87
87
|
}
|
|
88
88
|
return -1;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function ri(n) {
|
|
91
91
|
return n ?? "";
|
|
92
92
|
}
|
|
93
93
|
function R(n, e) {
|
|
@@ -105,59 +105,59 @@ 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 On() {
|
|
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 Wn(n) {
|
|
121
121
|
return function(e) {
|
|
122
122
|
return e.preventDefault(), n.call(this, e);
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
function
|
|
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 An(n) {
|
|
129
129
|
return Array.from(n.childNodes);
|
|
130
130
|
}
|
|
131
131
|
function Ze(n, e) {
|
|
132
132
|
e = "" + e, n.data !== e && (n.data = /** @type {string} */
|
|
133
133
|
e);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function oi(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 zn(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 He;
|
|
145
|
+
function Ve(n) {
|
|
146
|
+
He = n;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
if (!
|
|
150
|
-
return
|
|
148
|
+
function Di() {
|
|
149
|
+
if (!He) throw new Error("Function called outside component initialization");
|
|
150
|
+
return He;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
153
|
-
|
|
152
|
+
function Bn(n) {
|
|
153
|
+
Di().$$.on_destroy.push(n);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
const n =
|
|
155
|
+
function Fn() {
|
|
156
|
+
const n = Di();
|
|
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 = zn(
|
|
161
161
|
/** @type {string} */
|
|
162
162
|
e,
|
|
163
163
|
t,
|
|
@@ -170,142 +170,142 @@ function An() {
|
|
|
170
170
|
return !0;
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
|
-
function
|
|
173
|
+
function si(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
|
|
177
|
+
const Fe = [], Tt = [];
|
|
178
178
|
let De = [];
|
|
179
|
-
const
|
|
180
|
-
let
|
|
181
|
-
function
|
|
182
|
-
|
|
179
|
+
const li = [], Dn = /* @__PURE__ */ Promise.resolve();
|
|
180
|
+
let Rt = !1;
|
|
181
|
+
function Un() {
|
|
182
|
+
Rt || (Rt = !0, Dn.then(Ui));
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function It(n) {
|
|
185
185
|
De.push(n);
|
|
186
186
|
}
|
|
187
|
-
const
|
|
188
|
-
let
|
|
189
|
-
function
|
|
190
|
-
if (
|
|
187
|
+
const Ct = /* @__PURE__ */ new Set();
|
|
188
|
+
let ze = 0;
|
|
189
|
+
function Ui() {
|
|
190
|
+
if (ze !== 0)
|
|
191
191
|
return;
|
|
192
|
-
const n =
|
|
192
|
+
const n = He;
|
|
193
193
|
do {
|
|
194
194
|
try {
|
|
195
|
-
for (;
|
|
196
|
-
const e =
|
|
197
|
-
|
|
195
|
+
for (; ze < Fe.length; ) {
|
|
196
|
+
const e = Fe[ze];
|
|
197
|
+
ze++, Ve(e), Gn(e.$$);
|
|
198
198
|
}
|
|
199
199
|
} catch (e) {
|
|
200
|
-
throw
|
|
200
|
+
throw Fe.length = 0, ze = 0, e;
|
|
201
201
|
}
|
|
202
|
-
for (
|
|
202
|
+
for (Ve(null), Fe.length = 0, ze = 0; Tt.length; ) Tt.pop()();
|
|
203
203
|
for (let e = 0; e < De.length; e += 1) {
|
|
204
204
|
const t = De[e];
|
|
205
|
-
|
|
205
|
+
Ct.has(t) || (Ct.add(t), t());
|
|
206
206
|
}
|
|
207
207
|
De.length = 0;
|
|
208
|
-
} while (
|
|
209
|
-
for (;
|
|
210
|
-
|
|
211
|
-
|
|
208
|
+
} while (Fe.length);
|
|
209
|
+
for (; li.length; )
|
|
210
|
+
li.pop()();
|
|
211
|
+
Rt = !1, Ct.clear(), Ve(n);
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function Gn(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(It);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function jn(n) {
|
|
221
221
|
const e = [], t = [];
|
|
222
222
|
De.forEach((i) => n.indexOf(i) === -1 ? e.push(i) : t.push(i)), t.forEach((i) => i()), De = e;
|
|
223
223
|
}
|
|
224
|
-
const
|
|
225
|
-
let
|
|
226
|
-
function
|
|
227
|
-
|
|
224
|
+
const lt = /* @__PURE__ */ new Set();
|
|
225
|
+
let Te;
|
|
226
|
+
function ut() {
|
|
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 at() {
|
|
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 && (lt.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 (lt.has(n)) return;
|
|
243
|
+
lt.add(n), Te.c.push(() => {
|
|
244
|
+
lt.delete(n), i && (t && n.d(1), i());
|
|
245
245
|
}), n.o(e);
|
|
246
246
|
} else i && i();
|
|
247
247
|
}
|
|
248
|
-
function
|
|
248
|
+
function ui(n) {
|
|
249
249
|
return (n == null ? void 0 : n.length) !== void 0 ? n : Array.from(n);
|
|
250
250
|
}
|
|
251
|
-
function
|
|
252
|
-
|
|
251
|
+
function qn(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), It(() => {
|
|
287
|
+
const o = n.$$.on_mount.map(zi).filter(Bi);
|
|
288
288
|
n.$$.on_destroy ? n.$$.on_destroy.push(...o) : ye(o), n.$$.on_mount = [];
|
|
289
|
-
}), r.forEach(
|
|
289
|
+
}), r.forEach(It);
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function ge(n, e) {
|
|
292
292
|
const t = n.$$;
|
|
293
|
-
t.fragment !== null && (
|
|
293
|
+
t.fragment !== null && (jn(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 && (Fe.push(n), Un(), 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 = He;
|
|
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: ni(),
|
|
309
309
|
// lifecycle
|
|
310
310
|
on_mount: [],
|
|
311
311
|
on_destroy: [],
|
|
@@ -314,27 +314,27 @@ function Te(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: ni(),
|
|
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 = An(e.target);
|
|
330
|
+
a.fragment && a.fragment.l(u), u.forEach(B);
|
|
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), Ui();
|
|
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 Re {
|
|
|
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 Re {
|
|
|
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 Re {
|
|
|
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,75 +377,75 @@ class Re {
|
|
|
377
377
|
* @returns {void}
|
|
378
378
|
*/
|
|
379
379
|
$set(e) {
|
|
380
|
-
this.$$set && !
|
|
380
|
+
this.$$set && !Nn(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 Zn = "4";
|
|
384
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Zn);
|
|
385
|
+
function Hn(n) {
|
|
386
386
|
let e, t;
|
|
387
387
|
return {
|
|
388
388
|
c() {
|
|
389
|
-
e = de("svg"), t = de("path"),
|
|
389
|
+
e = de("svg"), t = de("path"), v(t, "d", "M13.12.706a.982.982 0 0 0-1.391 0L6.907 5.517 2.087.696a.982.982 0 1 0-1.391 1.39l4.821 4.821L.696 11.73a.982.982 0 1 0 1.39 1.39l4.821-4.821 4.822 4.821a.982.982 0 1 0 1.39-1.39L8.298 6.908l4.821-4.822a.988.988 0 0 0 0-1.38Z"), v(e, "viewBox", "0 0 14 14"), v(e, "width", "13"), v(e, "height", "13"), v(e, "class", "svelte-en2qvf");
|
|
390
390
|
},
|
|
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
398
|
i && B(e);
|
|
399
399
|
}
|
|
400
400
|
};
|
|
401
401
|
}
|
|
402
|
-
class
|
|
402
|
+
class Gi extends Oe {
|
|
403
403
|
constructor(e) {
|
|
404
|
-
super(),
|
|
404
|
+
super(), Ie(this, e, null, Hn, Re, {});
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function Yn(n) {
|
|
408
408
|
let e, t;
|
|
409
409
|
return {
|
|
410
410
|
c() {
|
|
411
|
-
e = de("svg"), t = de("path"),
|
|
411
|
+
e = de("svg"), t = de("path"), v(t, "d", "M15 0C6.705 0 0 6.705 0 15C0 23.295 6.705 30 15 30C23.295 30 30 23.295 30 15C30 6.705 23.295 0 15 0ZM22.5 20.385L20.385 22.5L15 17.115L9.615 22.5L7.5 20.385L12.885 15L7.5 9.615L9.615 7.5L15 12.885L20.385 7.5L22.5 9.615L17.115 15L22.5 20.385Z"), v(e, "viewBox", "0 0 30 30"), v(e, "fill", "none"), v(e, "xmlns", "http://www.w3.org/2000/svg"), v(e, "class", "svelte-d2loi5");
|
|
412
412
|
},
|
|
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
420
|
i && B(e);
|
|
421
421
|
}
|
|
422
422
|
};
|
|
423
423
|
}
|
|
424
|
-
class
|
|
424
|
+
class ji extends Oe {
|
|
425
425
|
constructor(e) {
|
|
426
|
-
super(),
|
|
426
|
+
super(), Ie(this, e, null, Yn, Re, {});
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function Xn(n) {
|
|
430
430
|
let e, t;
|
|
431
431
|
return {
|
|
432
432
|
c() {
|
|
433
|
-
e = W("img"),
|
|
434
|
-
n[3] + "area.svg") ||
|
|
433
|
+
e = W("img"), J(e.src, t = /*iconsBaseUrl*/
|
|
434
|
+
n[3] + "area.svg") || v(e, "src", t), v(
|
|
435
435
|
e,
|
|
436
436
|
"alt",
|
|
437
437
|
/*placeType*/
|
|
438
438
|
n[6]
|
|
439
|
-
),
|
|
439
|
+
), v(e, "class", "svelte-ltkwvy");
|
|
440
440
|
},
|
|
441
441
|
m(i, r) {
|
|
442
442
|
j(i, e, r);
|
|
443
443
|
},
|
|
444
444
|
p(i, r) {
|
|
445
445
|
r & /*iconsBaseUrl*/
|
|
446
|
-
8 && !
|
|
447
|
-
i[3] + "area.svg") &&
|
|
448
|
-
64 &&
|
|
446
|
+
8 && !J(e.src, t = /*iconsBaseUrl*/
|
|
447
|
+
i[3] + "area.svg") && v(e, "src", t), r & /*placeType*/
|
|
448
|
+
64 && v(
|
|
449
449
|
e,
|
|
450
450
|
"alt",
|
|
451
451
|
/*placeType*/
|
|
@@ -457,26 +457,26 @@ function Vn(n) {
|
|
|
457
457
|
}
|
|
458
458
|
};
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function Kn(n) {
|
|
461
461
|
let e, t;
|
|
462
462
|
return {
|
|
463
463
|
c() {
|
|
464
|
-
e = W("img"),
|
|
465
|
-
n[3] + "reverse.svg") ||
|
|
464
|
+
e = W("img"), J(e.src, t = /*iconsBaseUrl*/
|
|
465
|
+
n[3] + "reverse.svg") || v(e, "src", t), v(
|
|
466
466
|
e,
|
|
467
467
|
"alt",
|
|
468
468
|
/*placeType*/
|
|
469
469
|
n[6]
|
|
470
|
-
),
|
|
470
|
+
), v(e, "class", "svelte-ltkwvy");
|
|
471
471
|
},
|
|
472
472
|
m(i, r) {
|
|
473
473
|
j(i, e, r);
|
|
474
474
|
},
|
|
475
475
|
p(i, r) {
|
|
476
476
|
r & /*iconsBaseUrl*/
|
|
477
|
-
8 && !
|
|
478
|
-
i[3] + "reverse.svg") &&
|
|
479
|
-
64 &&
|
|
477
|
+
8 && !J(e.src, t = /*iconsBaseUrl*/
|
|
478
|
+
i[3] + "reverse.svg") && v(e, "src", t), r & /*placeType*/
|
|
479
|
+
64 && v(
|
|
480
480
|
e,
|
|
481
481
|
"alt",
|
|
482
482
|
/*placeType*/
|
|
@@ -488,26 +488,26 @@ function Hn(n) {
|
|
|
488
488
|
}
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function Jn(n) {
|
|
492
492
|
let e, t;
|
|
493
493
|
return {
|
|
494
494
|
c() {
|
|
495
|
-
e = W("img"),
|
|
496
|
-
n[3] + "poi.svg") ||
|
|
495
|
+
e = W("img"), J(e.src, t = /*iconsBaseUrl*/
|
|
496
|
+
n[3] + "poi.svg") || v(e, "src", t), v(
|
|
497
497
|
e,
|
|
498
498
|
"alt",
|
|
499
499
|
/*placeType*/
|
|
500
500
|
n[6]
|
|
501
|
-
),
|
|
501
|
+
), v(e, "class", "svelte-ltkwvy");
|
|
502
502
|
},
|
|
503
503
|
m(i, r) {
|
|
504
504
|
j(i, e, r);
|
|
505
505
|
},
|
|
506
506
|
p(i, r) {
|
|
507
507
|
r & /*iconsBaseUrl*/
|
|
508
|
-
8 && !
|
|
509
|
-
i[3] + "poi.svg") &&
|
|
510
|
-
64 &&
|
|
508
|
+
8 && !J(e.src, t = /*iconsBaseUrl*/
|
|
509
|
+
i[3] + "poi.svg") && v(e, "src", t), r & /*placeType*/
|
|
510
|
+
64 && v(
|
|
511
511
|
e,
|
|
512
512
|
"alt",
|
|
513
513
|
/*placeType*/
|
|
@@ -519,26 +519,26 @@ function Yn(n) {
|
|
|
519
519
|
}
|
|
520
520
|
};
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function $n(n) {
|
|
523
523
|
let e, t;
|
|
524
524
|
return {
|
|
525
525
|
c() {
|
|
526
|
-
e = W("img"),
|
|
527
|
-
n[3] + "postal_code.svg") ||
|
|
526
|
+
e = W("img"), J(e.src, t = /*iconsBaseUrl*/
|
|
527
|
+
n[3] + "postal_code.svg") || v(e, "src", t), v(
|
|
528
528
|
e,
|
|
529
529
|
"alt",
|
|
530
530
|
/*placeType*/
|
|
531
531
|
n[6]
|
|
532
|
-
),
|
|
532
|
+
), v(e, "class", "svelte-ltkwvy");
|
|
533
533
|
},
|
|
534
534
|
m(i, r) {
|
|
535
535
|
j(i, e, r);
|
|
536
536
|
},
|
|
537
537
|
p(i, r) {
|
|
538
538
|
r & /*iconsBaseUrl*/
|
|
539
|
-
8 && !
|
|
540
|
-
i[3] + "postal_code.svg") &&
|
|
541
|
-
64 &&
|
|
539
|
+
8 && !J(e.src, t = /*iconsBaseUrl*/
|
|
540
|
+
i[3] + "postal_code.svg") && v(e, "src", t), r & /*placeType*/
|
|
541
|
+
64 && v(
|
|
542
542
|
e,
|
|
543
543
|
"alt",
|
|
544
544
|
/*placeType*/
|
|
@@ -550,26 +550,26 @@ function Xn(n) {
|
|
|
550
550
|
}
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function er(n) {
|
|
554
554
|
let e, t;
|
|
555
555
|
return {
|
|
556
556
|
c() {
|
|
557
|
-
e = W("img"),
|
|
558
|
-
n[3] + "street.svg") ||
|
|
557
|
+
e = W("img"), J(e.src, t = /*iconsBaseUrl*/
|
|
558
|
+
n[3] + "street.svg") || v(e, "src", t), v(
|
|
559
559
|
e,
|
|
560
560
|
"alt",
|
|
561
561
|
/*placeType*/
|
|
562
562
|
n[6]
|
|
563
|
-
),
|
|
563
|
+
), v(e, "class", "svelte-ltkwvy");
|
|
564
564
|
},
|
|
565
565
|
m(i, r) {
|
|
566
566
|
j(i, e, r);
|
|
567
567
|
},
|
|
568
568
|
p(i, r) {
|
|
569
569
|
r & /*iconsBaseUrl*/
|
|
570
|
-
8 && !
|
|
571
|
-
i[3] + "street.svg") &&
|
|
572
|
-
64 &&
|
|
570
|
+
8 && !J(e.src, t = /*iconsBaseUrl*/
|
|
571
|
+
i[3] + "street.svg") && v(e, "src", t), r & /*placeType*/
|
|
572
|
+
64 && v(
|
|
573
573
|
e,
|
|
574
574
|
"alt",
|
|
575
575
|
/*placeType*/
|
|
@@ -581,26 +581,26 @@ function Kn(n) {
|
|
|
581
581
|
}
|
|
582
582
|
};
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function tr(n) {
|
|
585
585
|
let e, t;
|
|
586
586
|
return {
|
|
587
587
|
c() {
|
|
588
|
-
e = W("img"),
|
|
589
|
-
n[3] + "road.svg") ||
|
|
588
|
+
e = W("img"), J(e.src, t = /*iconsBaseUrl*/
|
|
589
|
+
n[3] + "road.svg") || v(e, "src", t), v(
|
|
590
590
|
e,
|
|
591
591
|
"alt",
|
|
592
592
|
/*placeType*/
|
|
593
593
|
n[6]
|
|
594
|
-
),
|
|
594
|
+
), v(e, "class", "svelte-ltkwvy");
|
|
595
595
|
},
|
|
596
596
|
m(i, r) {
|
|
597
597
|
j(i, e, r);
|
|
598
598
|
},
|
|
599
599
|
p(i, r) {
|
|
600
600
|
r & /*iconsBaseUrl*/
|
|
601
|
-
8 && !
|
|
602
|
-
i[3] + "road.svg") &&
|
|
603
|
-
64 &&
|
|
601
|
+
8 && !J(e.src, t = /*iconsBaseUrl*/
|
|
602
|
+
i[3] + "road.svg") && v(e, "src", t), r & /*placeType*/
|
|
603
|
+
64 && v(
|
|
604
604
|
e,
|
|
605
605
|
"alt",
|
|
606
606
|
/*placeType*/
|
|
@@ -612,26 +612,26 @@ function Jn(n) {
|
|
|
612
612
|
}
|
|
613
613
|
};
|
|
614
614
|
}
|
|
615
|
-
function
|
|
615
|
+
function ir(n) {
|
|
616
616
|
let e, t;
|
|
617
617
|
return {
|
|
618
618
|
c() {
|
|
619
|
-
e = W("img"),
|
|
620
|
-
n[3] + "housenumber.svg") ||
|
|
619
|
+
e = W("img"), J(e.src, t = /*iconsBaseUrl*/
|
|
620
|
+
n[3] + "housenumber.svg") || v(e, "src", t), v(
|
|
621
621
|
e,
|
|
622
622
|
"alt",
|
|
623
623
|
/*placeType*/
|
|
624
624
|
n[6]
|
|
625
|
-
),
|
|
625
|
+
), v(e, "class", "svelte-ltkwvy");
|
|
626
626
|
},
|
|
627
627
|
m(i, r) {
|
|
628
628
|
j(i, e, r);
|
|
629
629
|
},
|
|
630
630
|
p(i, r) {
|
|
631
631
|
r & /*iconsBaseUrl*/
|
|
632
|
-
8 && !
|
|
633
|
-
i[3] + "housenumber.svg") &&
|
|
634
|
-
64 &&
|
|
632
|
+
8 && !J(e.src, t = /*iconsBaseUrl*/
|
|
633
|
+
i[3] + "housenumber.svg") && v(e, "src", t), r & /*placeType*/
|
|
634
|
+
64 && v(
|
|
635
635
|
e,
|
|
636
636
|
"alt",
|
|
637
637
|
/*placeType*/
|
|
@@ -643,20 +643,20 @@ function $n(n) {
|
|
|
643
643
|
}
|
|
644
644
|
};
|
|
645
645
|
}
|
|
646
|
-
function
|
|
646
|
+
function nr(n) {
|
|
647
647
|
let e, t, i, r;
|
|
648
648
|
return {
|
|
649
649
|
c() {
|
|
650
|
-
e = W("img"),
|
|
651
|
-
n[5]) ||
|
|
650
|
+
e = W("img"), J(e.src, t = /*imageUrl*/
|
|
651
|
+
n[5]) || v(e, "src", t), v(
|
|
652
652
|
e,
|
|
653
653
|
"alt",
|
|
654
654
|
/*category*/
|
|
655
655
|
n[4]
|
|
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,9 +665,9 @@ function er(n) {
|
|
|
665
665
|
},
|
|
666
666
|
p(o, l) {
|
|
667
667
|
l & /*imageUrl*/
|
|
668
|
-
32 && !
|
|
669
|
-
o[5]) &&
|
|
670
|
-
16 &&
|
|
668
|
+
32 && !J(e.src, t = /*imageUrl*/
|
|
669
|
+
o[5]) && v(e, "src", t), l & /*category*/
|
|
670
|
+
16 && v(
|
|
671
671
|
e,
|
|
672
672
|
"alt",
|
|
673
673
|
/*category*/
|
|
@@ -679,14 +679,14 @@ function er(n) {
|
|
|
679
679
|
}
|
|
680
680
|
};
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function ai(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");
|
|
690
690
|
},
|
|
691
691
|
m(i, r) {
|
|
692
692
|
j(i, e, r), R(e, t);
|
|
@@ -704,8 +704,8 @@ function li(n) {
|
|
|
704
704
|
}
|
|
705
705
|
};
|
|
706
706
|
}
|
|
707
|
-
function
|
|
708
|
-
let e, t, i, r, o, l, s, c,
|
|
707
|
+
function rr(n) {
|
|
708
|
+
let e, t, i, r, o, l, s, c, a, d = (
|
|
709
709
|
/*isReverse*/
|
|
710
710
|
(n[7] ? (
|
|
711
711
|
/*feature*/
|
|
@@ -714,10 +714,10 @@ function tr(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
|
-
n[2] && !/*feature*/
|
|
720
|
+
n[2] !== "never" && !/*feature*/
|
|
721
721
|
n[0].address && !/*feature*/
|
|
722
722
|
n[0].id.startsWith("road.") && !/*feature*/
|
|
723
723
|
n[0].id.startsWith("address.") && !/*feature*/
|
|
@@ -725,55 +725,55 @@ function tr(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
|
-
),
|
|
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] ? nr : (
|
|
742
742
|
/*feature*/
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
743
|
+
_[0].address ? ir : (t == null && (t = !!/*feature*/
|
|
744
|
+
_[0].id.startsWith("road.")), t ? tr : (i == null && (i = !!/*feature*/
|
|
745
|
+
_[0].id.startsWith("address.")), i ? er : (r == null && (r = !!/*feature*/
|
|
746
|
+
_[0].id.startsWith("postal_code.")), r ? $n : (o == null && (o = !!/*feature*/
|
|
747
|
+
_[0].id.startsWith("poi.")), o ? Jn : (
|
|
748
748
|
/*isReverse*/
|
|
749
|
-
|
|
749
|
+
_[7] ? Kn : Xn
|
|
750
750
|
)))))
|
|
751
751
|
);
|
|
752
752
|
}
|
|
753
|
-
let
|
|
753
|
+
let k = w(n, -1), x = k(n), L = h && ai(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
|
-
),
|
|
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 tr(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
|
-
)) + "") && Ze(
|
|
792
|
+
_[0].place_name.replace(/,.*/, "")
|
|
793
|
+
)) + "") && Ze(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] !== "never" && !/*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 = ai(_), 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
|
-
)) + "") && Ze(
|
|
809
|
-
2 &&
|
|
807
|
+
_[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
808
|
+
)) + "") && Ze(p, y), C & /*selected*/
|
|
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
|
+
_ && B(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 or(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
|
+
si.call(this, n, w);
|
|
839
839
|
}
|
|
840
|
-
function
|
|
841
|
-
|
|
840
|
+
function p(w) {
|
|
841
|
+
si.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
|
-
|
|
869
|
-
|
|
868
|
+
y,
|
|
869
|
+
p,
|
|
870
870
|
E
|
|
871
871
|
];
|
|
872
872
|
}
|
|
873
|
-
class
|
|
873
|
+
class sr extends Oe {
|
|
874
874
|
constructor(e) {
|
|
875
|
-
super(),
|
|
875
|
+
super(), Ie(this, e, or, rr, Re, {
|
|
876
876
|
feature: 0,
|
|
877
877
|
selected: 1,
|
|
878
878
|
showPlaceType: 2,
|
|
@@ -881,92 +881,92 @@ class nr extends Re {
|
|
|
881
881
|
});
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function lr(n) {
|
|
885
885
|
let e;
|
|
886
886
|
return {
|
|
887
887
|
c() {
|
|
888
|
-
e = W("div"), e.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>',
|
|
888
|
+
e = W("div"), e.innerHTML = '<svg viewBox="0 0 18 18" width="24" height="24" class="svelte-7cmwmc"><path fill="#333" d="M4.4 4.4l.8.8c2.1-2.1 5.5-2.1 7.6 0l.8-.8c-2.5-2.5-6.7-2.5-9.2 0z"></path><path opacity=".1" d="M12.8 12.9c-2.1 2.1-5.5 2.1-7.6 0-2.1-2.1-2.1-5.5 0-7.7l-.8-.8c-2.5 2.5-2.5 6.7 0 9.2s6.6 2.5 9.2 0 2.5-6.6 0-9.2l-.8.8c2.2 2.1 2.2 5.6 0 7.7z"></path></svg>', v(e, "class", "svelte-7cmwmc");
|
|
889
889
|
},
|
|
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
897
|
t && B(e);
|
|
898
898
|
}
|
|
899
899
|
};
|
|
900
900
|
}
|
|
901
|
-
class
|
|
901
|
+
class ur extends Oe {
|
|
902
902
|
constructor(e) {
|
|
903
|
-
super(),
|
|
903
|
+
super(), Ie(this, e, null, lr, Re, {});
|
|
904
904
|
}
|
|
905
905
|
}
|
|
906
|
-
function
|
|
906
|
+
function ar(n) {
|
|
907
907
|
let e, t;
|
|
908
908
|
return {
|
|
909
909
|
c() {
|
|
910
|
-
e = de("svg"), t = de("path"),
|
|
910
|
+
e = de("svg"), t = de("path"), v(t, "d", "M30.003-26.765C13.46-26.765 0-14.158 0 1.337c0 23.286 24.535 42.952 28.39 46.04.24.192.402.316.471.376.323.282.732.424 1.142.424.41 0 .82-.142 1.142-.424.068-.06.231-.183.471-.376 3.856-3.09 28.39-22.754 28.39-46.04 0-15.495-13.46-28.102-30.003-28.102Zm1.757 12.469c4.38 0 7.858 1.052 10.431 3.158 2.595 2.105 3.89 4.913 3.89 8.422 0 2.34-.53 4.362-1.593 6.063-1.063 1.702-3.086 3.616-6.063 5.742-2.042 1.51-3.337 2.659-3.89 3.446-.532.787-.8 1.82-.8 3.096v1.914h-8.449V15.18c0-2.041.434-3.815 1.306-5.325.872-1.51 2.467-3.118 4.785-4.82 2.233-1.594 3.7-2.89 4.402-3.889a5.582 5.582 0 0 0 1.087-3.35c0-1.382-.51-2.435-1.531-3.158-1.02-.723-2.45-1.087-4.28-1.087-3.19 0-6.826 1.047-10.91 3.131l-3.472-6.986c4.742-2.659 9.77-3.992 15.087-3.992Zm-1.88 37.324c1.765 0 3.124.472 4.08 1.408.98.936 1.47 2.276 1.47 4.02 0 1.68-.49 3.007-1.47 3.985-.977.957-2.336 1.435-4.08 1.435-1.787 0-3.171-.465-4.15-1.4-.978-.958-1.47-2.298-1.47-4.02 0-1.787.48-3.14 1.436-4.054.957-.915 2.355-1.374 4.184-1.374Z"), v(e, "viewBox", "0 0 60.006 21.412"), v(e, "width", "14"), v(e, "height", "20"), v(e, "class", "svelte-en2qvf");
|
|
911
911
|
},
|
|
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
919
|
i && B(e);
|
|
920
920
|
}
|
|
921
921
|
};
|
|
922
922
|
}
|
|
923
|
-
class
|
|
923
|
+
class cr extends Oe {
|
|
924
924
|
constructor(e) {
|
|
925
|
-
super(),
|
|
925
|
+
super(), Ie(this, e, null, ar, Re, {});
|
|
926
926
|
}
|
|
927
927
|
}
|
|
928
|
-
function
|
|
928
|
+
function fr(n) {
|
|
929
929
|
let e, t, i;
|
|
930
930
|
return {
|
|
931
931
|
c() {
|
|
932
|
-
e = de("svg"), t = de("circle"), i = de("path"),
|
|
932
|
+
e = de("svg"), t = de("circle"), i = de("path"), v(t, "cx", "4.789"), v(t, "cy", "4.787"), v(t, "r", "3.85"), v(t, "class", "svelte-1aq105l"), v(i, "d", "M12.063 12.063 7.635 7.635"), v(i, "class", "svelte-1aq105l"), v(e, "xmlns", "http://www.w3.org/2000/svg"), v(e, "width", "13"), v(e, "height", "13"), v(e, "viewBox", "0 0 13 13"), v(e, "class", "svelte-1aq105l");
|
|
933
933
|
},
|
|
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
941
|
r && B(e);
|
|
942
942
|
}
|
|
943
943
|
};
|
|
944
944
|
}
|
|
945
|
-
class
|
|
945
|
+
class dr extends Oe {
|
|
946
946
|
constructor(e) {
|
|
947
|
-
super(),
|
|
947
|
+
super(), Ie(this, e, null, fr, Re, {});
|
|
948
948
|
}
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function hr(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 ft(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 je;
|
|
959
|
+
async function mr(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 (je && r.cachedLocationExpiry && je.time + r.cachedLocationExpiry > Date.now()) {
|
|
967
|
+
if (!je.coords)
|
|
968
968
|
break e;
|
|
969
|
-
return
|
|
969
|
+
return je.coords;
|
|
970
970
|
}
|
|
971
971
|
let o;
|
|
972
972
|
try {
|
|
@@ -976,7 +976,7 @@ async function fr(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 fr(n, e, t) {
|
|
|
987
987
|
}), o;
|
|
988
988
|
} catch {
|
|
989
989
|
} finally {
|
|
990
|
-
r.cachedLocationExpiry && (
|
|
990
|
+
r.cachedLocationExpiry && (je = {
|
|
991
991
|
time: Date.now(),
|
|
992
992
|
coords: o
|
|
993
993
|
});
|
|
@@ -1001,45 +1001,45 @@ async function fr(n, e, t) {
|
|
|
1001
1001
|
return i[1].toFixed(6) + "," + i[2].toFixed(6);
|
|
1002
1002
|
}
|
|
1003
1003
|
}
|
|
1004
|
-
const
|
|
1005
|
-
function
|
|
1004
|
+
const gr = /^(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, ci = /^([+-]?[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,})$/, fi = /^(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, di = /^(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, hi = /^(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, mi = /^(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 yr(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 = gi(u, 3).toFixed(3).padStart(6, "0"), b = gi(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
|
|
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 gi(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 Dt(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 (gr.test(n))
|
|
1035
1035
|
throw new Error("invalid coordinate value");
|
|
1036
|
-
if (
|
|
1037
|
-
if (s =
|
|
1036
|
+
if (ci.test(n))
|
|
1037
|
+
if (s = ci.exec(n), c = qe(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 (fi.test(n))
|
|
1042
|
+
if (s = fi.exec(n), c = qe(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 Bt(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 (di.test(n))
|
|
1051
|
+
if (s = di.exec(n), c = qe(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 (hi.test(n))
|
|
1056
|
+
if (s = hi.exec(n), c = qe(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 (mi.test(n)) {
|
|
1061
|
+
if (s = mi.exec(n), c = qe(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 Bt(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 (
|
|
1084
|
-
const
|
|
1085
|
-
|
|
1081
|
+
let u, f;
|
|
1082
|
+
const h = /[,/;\u0020]/g, b = d.match(h);
|
|
1083
|
+
if (b == null) {
|
|
1084
|
+
const p = Math.floor(n.length / 2);
|
|
1085
|
+
u = d.substring(0, p).trim(), f = d.substring(p).trim();
|
|
1086
1086
|
} else {
|
|
1087
|
-
let
|
|
1088
|
-
|
|
1087
|
+
let p;
|
|
1088
|
+
b.length % 2 == 1 ? p = Math.floor(b.length / 2) : p = b.length / 2 - 1;
|
|
1089
1089
|
let E = 0;
|
|
1090
|
-
if (
|
|
1091
|
-
E = d.indexOf(
|
|
1090
|
+
if (p == 0)
|
|
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: pr,
|
|
1116
|
+
toCoordinateFormat: yr
|
|
1117
1117
|
});
|
|
1118
1118
|
} else
|
|
1119
1119
|
throw new Error("coordinates pattern match failed");
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1121
|
+
function qe(n) {
|
|
1122
1122
|
if (!isNaN(n[0]))
|
|
1123
1123
|
return !1;
|
|
1124
1124
|
const e = [...n];
|
|
@@ -1126,39 +1126,39 @@ function ze(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 yi(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 pr(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 yi(this.decimalLatitude, Number(e[0])) && yi(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 vr = Object.freeze({
|
|
1156
1156
|
DMS: "DMS",
|
|
1157
1157
|
DM: "DM",
|
|
1158
1158
|
DD: "DD"
|
|
1159
1159
|
});
|
|
1160
|
-
|
|
1161
|
-
const
|
|
1160
|
+
Dt.to = vr;
|
|
1161
|
+
const br = [
|
|
1162
1162
|
{
|
|
1163
1163
|
verbatimCoordinates: "40.123, -74.123",
|
|
1164
1164
|
verbatimLatitude: "40.123",
|
|
@@ -1299,10 +1299,10 @@ const yr = [
|
|
|
1299
1299
|
verbatimLatitude: "40 7 22.8",
|
|
1300
1300
|
verbatimLongitude: "-74 7 22.8"
|
|
1301
1301
|
}
|
|
1302
|
-
],
|
|
1302
|
+
], wr = {
|
|
1303
1303
|
decimalLatitude: 40.123,
|
|
1304
1304
|
decimalLongitude: -74.123
|
|
1305
|
-
},
|
|
1305
|
+
}, _r = [
|
|
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 yr = [
|
|
|
1387
1387
|
decimalLatitude: -18.4,
|
|
1388
1388
|
decimalLongitude: 22.75
|
|
1389
1389
|
}
|
|
1390
|
-
],
|
|
1390
|
+
], Er = [
|
|
1391
1391
|
{
|
|
1392
1392
|
verbatimCoordinates: "10.432342S 10.6345345E",
|
|
1393
1393
|
verbatimLatitude: "10.432342S",
|
|
@@ -1522,49 +1522,49 @@ const yr = [
|
|
|
1522
1522
|
decimalLongitude: 18.33453
|
|
1523
1523
|
}
|
|
1524
1524
|
];
|
|
1525
|
-
function
|
|
1525
|
+
function Lr() {
|
|
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 br.forEach((e) => {
|
|
1528
|
+
e.decimalLatitude ? n.push(e) : n.push({ ...e, ...wr });
|
|
1529
|
+
}), [...n, ..._r, ...Er];
|
|
1530
|
+
}
|
|
1531
|
+
const Sr = Lr();
|
|
1532
|
+
Dt.formats = Sr.map((n) => n.verbatimCoordinates);
|
|
1533
|
+
const xr = Dt;
|
|
1534
|
+
function pi(n, e, t) {
|
|
1535
1535
|
const i = n.slice();
|
|
1536
|
-
return i[
|
|
1536
|
+
return i[86] = e[t], i[88] = t, i;
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1538
|
+
function vi(n) {
|
|
1539
1539
|
let e, t;
|
|
1540
|
-
return e = new
|
|
1540
|
+
return e = new ur({}), {
|
|
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 bi(n) {
|
|
1559
1559
|
let e, t, i, r, o;
|
|
1560
|
-
return t = new
|
|
1560
|
+
return t = new cr({}), {
|
|
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
|
-
),
|
|
1567
|
+
), v(e, "class", "svelte-bz0zu3"), Ee(
|
|
1568
1568
|
e,
|
|
1569
1569
|
"active",
|
|
1570
1570
|
/*reverseActive*/
|
|
@@ -1572,22 +1572,22 @@ function vi(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[70]
|
|
1580
1580
|
), r = !0);
|
|
1581
1581
|
},
|
|
1582
1582
|
p(l, s) {
|
|
1583
1583
|
(!i || s[0] & /*reverseButtonTitle*/
|
|
1584
|
-
512) &&
|
|
1584
|
+
512) && v(
|
|
1585
1585
|
e,
|
|
1586
1586
|
"title",
|
|
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,92 +1598,92 @@ function vi(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 && B(e),
|
|
1604
|
+
l && B(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 Mr(n) {
|
|
1609
|
+
let e, t = [], i = /* @__PURE__ */ new Map(), r, o, l, s = ui(
|
|
1610
1610
|
/*listFeatures*/
|
|
1611
1611
|
n[14]
|
|
1612
1612
|
);
|
|
1613
|
-
const c = (
|
|
1613
|
+
const c = (a) => (
|
|
1614
1614
|
/*feature*/
|
|
1615
|
-
|
|
1616
|
-
(
|
|
1617
|
-
|
|
1615
|
+
a[86].id + /*feature*/
|
|
1616
|
+
(a[86].address ? "," + /*feature*/
|
|
1617
|
+
a[86].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 = pi(n, s, a), u = c(d);
|
|
1621
|
+
i.set(u, t[a] = wi(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
|
-
p(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[74]
|
|
1640
1640
|
),
|
|
1641
|
-
|
|
1641
|
+
ee(
|
|
1642
1642
|
e,
|
|
1643
1643
|
"blur",
|
|
1644
1644
|
/*blur_handler_1*/
|
|
1645
|
-
n[
|
|
1645
|
+
n[75]
|
|
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 = ui(
|
|
1652
1652
|
/*listFeatures*/
|
|
1653
|
-
|
|
1654
|
-
),
|
|
1653
|
+
a[14]
|
|
1654
|
+
), ut(), t = Qn(t, d, c, 1, a, s, i, e, qn, wi, null, pi), at());
|
|
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 && B(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 kr(n) {
|
|
1677
1677
|
let e, t, i, r, o, l;
|
|
1678
|
-
return t = new
|
|
1678
|
+
return t = new ji({}), {
|
|
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
|
-
),
|
|
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*/
|
|
@@ -1697,49 +1697,49 @@ function Sr(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 && B(e),
|
|
1703
|
+
s && B(e), ge(t);
|
|
1704
1704
|
}
|
|
1705
1705
|
};
|
|
1706
1706
|
}
|
|
1707
|
-
function
|
|
1707
|
+
function Cr(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
1720
|
i && B(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 Nr(n) {
|
|
1725
|
+
let e, t, i, r, o, l, s, c, a, d, u;
|
|
1726
|
+
return t = new ji({}), c = new Gi({}), {
|
|
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[71]
|
|
1739
1739
|
), d = !0);
|
|
1740
1740
|
},
|
|
1741
1741
|
p(f, h) {
|
|
1742
|
-
(!
|
|
1742
|
+
(!a || h[0] & /*errorMessage*/
|
|
1743
1743
|
64) && Ze(
|
|
1744
1744
|
o,
|
|
1745
1745
|
/*errorMessage*/
|
|
@@ -1747,41 +1747,41 @@ function Mr(n) {
|
|
|
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 && B(e),
|
|
1756
|
+
f && B(e), ge(t), ge(c), d = !1, u();
|
|
1757
1757
|
}
|
|
1758
1758
|
};
|
|
1759
1759
|
}
|
|
1760
|
-
function
|
|
1760
|
+
function wi(n, e) {
|
|
1761
1761
|
let t, i, r;
|
|
1762
1762
|
function o() {
|
|
1763
1763
|
return (
|
|
1764
1764
|
/*mouseenter_handler*/
|
|
1765
|
-
e[
|
|
1765
|
+
e[72](
|
|
1766
1766
|
/*i*/
|
|
1767
|
-
e[
|
|
1767
|
+
e[88]
|
|
1768
1768
|
)
|
|
1769
1769
|
);
|
|
1770
1770
|
}
|
|
1771
1771
|
function l() {
|
|
1772
1772
|
return (
|
|
1773
1773
|
/*focus_handler_1*/
|
|
1774
|
-
e[
|
|
1774
|
+
e[73](
|
|
1775
1775
|
/*feature*/
|
|
1776
|
-
e[
|
|
1776
|
+
e[86]
|
|
1777
1777
|
)
|
|
1778
1778
|
);
|
|
1779
1779
|
}
|
|
1780
|
-
return i = new
|
|
1780
|
+
return i = new sr({
|
|
1781
1781
|
props: {
|
|
1782
1782
|
feature: (
|
|
1783
1783
|
/*feature*/
|
|
1784
|
-
e[
|
|
1784
|
+
e[86]
|
|
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[88]
|
|
1794
1794
|
),
|
|
1795
1795
|
missingIconsCache: (
|
|
1796
1796
|
/*missingIconsCache*/
|
|
@@ -1805,99 +1805,99 @@ function pi(n, e) {
|
|
|
1805
1805
|
key: n,
|
|
1806
1806
|
first: null,
|
|
1807
1807
|
c() {
|
|
1808
|
-
t =
|
|
1808
|
+
t = On(), 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[86]), 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[88]), 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 && B(t),
|
|
1834
|
+
s && B(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 Pr(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 dr({}), u = new Gi({});
|
|
1841
1841
|
let L = (
|
|
1842
1842
|
/*abortController*/
|
|
1843
|
-
n[19] &&
|
|
1844
|
-
),
|
|
1843
|
+
n[19] && vi()
|
|
1844
|
+
), _ = (
|
|
1845
1845
|
/*enableReverse*/
|
|
1846
|
-
n[5] === !0 &&
|
|
1846
|
+
n[5] === !0 && bi(n)
|
|
1847
1847
|
);
|
|
1848
|
-
const
|
|
1848
|
+
const C = (
|
|
1849
1849
|
/*#slots*/
|
|
1850
|
-
n[
|
|
1851
|
-
), I =
|
|
1852
|
-
|
|
1850
|
+
n[62].default
|
|
1851
|
+
), I = Pn(
|
|
1852
|
+
C,
|
|
1853
1853
|
n,
|
|
1854
1854
|
/*$$scope*/
|
|
1855
|
-
n[
|
|
1855
|
+
n[61],
|
|
1856
1856
|
null
|
|
1857
|
-
), A = [
|
|
1858
|
-
function O(M,
|
|
1859
|
-
var
|
|
1857
|
+
), A = [Nr, Cr, kr, Mr], F = [];
|
|
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 = F[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*/
|
|
1881
1881
|
n[8]
|
|
1882
|
-
),
|
|
1882
|
+
), v(
|
|
1883
1883
|
s,
|
|
1884
1884
|
"aria-label",
|
|
1885
1885
|
/*placeholder*/
|
|
1886
1886
|
n[8]
|
|
1887
|
-
),
|
|
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
|
-
),
|
|
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
|
-
),
|
|
1897
|
+
), v(i, "class", "input-group svelte-bz0zu3"), v(t, "tabindex", "0"), v(t, "class", E = ri(
|
|
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 kr(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[64](s), oi(
|
|
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 && F[y].m(t, null), S = !0, w || (k = [
|
|
1914
|
+
ee(
|
|
1915
1915
|
r,
|
|
1916
1916
|
"click",
|
|
1917
1917
|
/*click_handler*/
|
|
1918
|
-
n[
|
|
1918
|
+
n[63]
|
|
1919
1919
|
),
|
|
1920
|
-
|
|
1920
|
+
ee(
|
|
1921
1921
|
s,
|
|
1922
1922
|
"input",
|
|
1923
1923
|
/*input_1_input_handler*/
|
|
1924
|
-
n[
|
|
1924
|
+
n[65]
|
|
1925
1925
|
),
|
|
1926
|
-
|
|
1926
|
+
ee(
|
|
1927
1927
|
s,
|
|
1928
1928
|
"focus",
|
|
1929
1929
|
/*focus_handler*/
|
|
1930
|
-
n[
|
|
1930
|
+
n[66]
|
|
1931
1931
|
),
|
|
1932
|
-
|
|
1932
|
+
ee(
|
|
1933
1933
|
s,
|
|
1934
1934
|
"blur",
|
|
1935
1935
|
/*blur_handler*/
|
|
1936
|
-
n[
|
|
1936
|
+
n[67]
|
|
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[68]
|
|
1949
1949
|
),
|
|
1950
|
-
|
|
1950
|
+
ee(
|
|
1951
1951
|
d,
|
|
1952
1952
|
"click",
|
|
1953
1953
|
/*click_handler_1*/
|
|
1954
|
-
n[
|
|
1954
|
+
n[69]
|
|
1955
1955
|
),
|
|
1956
|
-
|
|
1957
|
-
/*
|
|
1956
|
+
ee(t, "submit", Wn(
|
|
1957
|
+
/*handleSubmit*/
|
|
1958
1958
|
n[21]
|
|
1959
1959
|
))
|
|
1960
|
-
],
|
|
1960
|
+
], w = !0);
|
|
1961
1961
|
},
|
|
1962
|
-
p(M,
|
|
1963
|
-
(!
|
|
1964
|
-
256) &&
|
|
1962
|
+
p(M, D) {
|
|
1963
|
+
(!S || D[0] & /*placeholder*/
|
|
1964
|
+
256) && v(
|
|
1965
1965
|
s,
|
|
1966
1966
|
"placeholder",
|
|
1967
1967
|
/*placeholder*/
|
|
1968
1968
|
M[8]
|
|
1969
|
-
), (!
|
|
1970
|
-
256) &&
|
|
1969
|
+
), (!S || D[0] & /*placeholder*/
|
|
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] && oi(
|
|
1978
1978
|
s,
|
|
1979
1979
|
/*searchValue*/
|
|
1980
1980
|
M[1]
|
|
1981
|
-
), (!
|
|
1982
|
-
8) &&
|
|
1981
|
+
), (!S || D[0] & /*clearButtonTitle*/
|
|
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 = vi(), L.c(), q(L, 1), L.m(a, null)) : L && (ut(), X(L, 1, 1, () => {
|
|
1990
1990
|
L = null;
|
|
1991
|
-
}),
|
|
1992
|
-
2) &&
|
|
1993
|
-
|
|
1991
|
+
}), at()), (!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)) : (_ = bi(M), _.c(), q(_, 1), _.m(i, b)) : _ && (ut(), X(_, 1, 1, () => {
|
|
2000
|
+
_ = null;
|
|
2001
|
+
}), at()), I && I.p && (!S || D[1] & /*$$scope*/
|
|
2002
|
+
1073741824) && Rn(
|
|
2003
2003
|
I,
|
|
2004
|
-
|
|
2004
|
+
C,
|
|
2005
2005
|
M,
|
|
2006
2006
|
/*$$scope*/
|
|
2007
|
-
M[
|
|
2008
|
-
|
|
2009
|
-
|
|
2007
|
+
M[61],
|
|
2008
|
+
S ? Tn(
|
|
2009
|
+
C,
|
|
2010
2010
|
/*$$scope*/
|
|
2011
|
-
M[
|
|
2012
|
-
|
|
2011
|
+
M[61],
|
|
2012
|
+
D,
|
|
2013
2013
|
null
|
|
2014
|
-
) :
|
|
2014
|
+
) : In(
|
|
2015
2015
|
/*$$scope*/
|
|
2016
|
-
M[
|
|
2016
|
+
M[61]
|
|
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 && F[y].p(M, D) : (p && (ut(), X(F[te], 1, 1, () => {
|
|
2022
|
+
F[te] = null;
|
|
2023
|
+
}), at()), ~y ? (p = F[y], p ? p.p(M, D) : (p = F[y] = A[y](M), p.c()), q(p, 1), p.m(t, null)) : p = null), (!S || D[0] & /*className*/
|
|
2024
|
+
4 && E !== (E = ri(
|
|
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 kr(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 && (B(e), B(t)),
|
|
2043
|
+
M && (B(e), B(t)), ge(o), n[64](null), ge(u), L && L.d(), _ && _.d(), I && I.d(M), ~y && F[y].d(), w = !1, ye(k);
|
|
2044
2044
|
}
|
|
2045
2045
|
};
|
|
2046
2046
|
}
|
|
2047
|
-
function
|
|
2047
|
+
function Tr(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 Cr(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: F = "toggle reverse geocoding" } = e, { searchValue: O = "" } = e, { pickedResultStyle: M = "full-geometry" } = e, { showPlaceType: D = "if-needed" } = e, { showResultsWhileTyping: te = !0 } = e, { autocompleteTimeout: pe = void 0 } = e, { selectFirst: We = !0 } = e, { flyToSelected: gt = !1 } = e, { markerOnSelected: Ke = !0 } = e, { types: Ne = void 0 } = e, { exhaustiveReverseGeocoding: yt = !1 } = e, { excludeTypes: Je = !1 } = e, { zoom: $e = l } = e, { apiUrl: pt = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: vt = {} } = e, { iconsBaseUrl: qt = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.0.0-rc.2/icons/" } = e, { adjustUrlQuery: bt = () => {
|
|
2074
2074
|
} } = e;
|
|
2075
|
-
function
|
|
2076
|
-
|
|
2075
|
+
function Hi() {
|
|
2076
|
+
ae.focus();
|
|
2077
2077
|
}
|
|
2078
|
-
function
|
|
2079
|
-
|
|
2078
|
+
function Yi() {
|
|
2079
|
+
ae.blur();
|
|
2080
2080
|
}
|
|
2081
|
-
function
|
|
2082
|
-
t(1, O =
|
|
2083
|
-
|
|
2081
|
+
function Qt(m, U = !0, V = !1) {
|
|
2082
|
+
t(1, O = m), U ? (t(15, z = -1), Zt()) : (Et(!V, V), setTimeout(() => {
|
|
2083
|
+
ae.focus(), ae.select();
|
|
2084
2084
|
}));
|
|
2085
2085
|
}
|
|
2086
|
-
function
|
|
2087
|
-
t(14, T = void 0), t(57, N = void 0), t(15,
|
|
2086
|
+
function Xi() {
|
|
2087
|
+
t(14, T = void 0), t(57, N = void 0), t(15, z = -1);
|
|
2088
2088
|
}
|
|
2089
|
-
function
|
|
2090
|
-
t(56,
|
|
2089
|
+
function Ki() {
|
|
2090
|
+
t(56, Q = []), t(57, N = void 0);
|
|
2091
|
+
}
|
|
2092
|
+
let Ae = !1, T, Q, N, Vt = "", ae, z = -1, ce, et = [], Pe, ve, re, tt, wt;
|
|
2093
|
+
const Ji = /* @__PURE__ */ new Set(), be = Fn();
|
|
2094
|
+
function $i() {
|
|
2095
|
+
return !!re;
|
|
2091
2096
|
}
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
Wn(() => {
|
|
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 Zt(
|
|
2098
|
-
if (
|
|
2099
|
-
|
|
2100
|
+
function Zt(m) {
|
|
2101
|
+
if (ve && (window.clearTimeout(ve), ve = void 0), re) {
|
|
2102
|
+
window.clearTimeout(re), t(58, re = void 0), Ue(O, { exact: !0 });
|
|
2103
|
+
return;
|
|
2104
|
+
}
|
|
2105
|
+
if (z > -1 && T)
|
|
2106
|
+
t(57, N = T[z]), t(1, O = N.place_type[0] === "reverse" ? N.place_name : N.place_name.replace(/,.*/, "")), t(18, ce = void 0), t(56, Q = void 0), t(15, z = -1);
|
|
2100
2107
|
else if (O) {
|
|
2101
|
-
const
|
|
2102
|
-
|
|
2103
|
-
t(56,
|
|
2104
|
-
}).catch((V) => t(18,
|
|
2108
|
+
const U = m || !_t(O);
|
|
2109
|
+
Ue(O, { exact: !0 }).then(() => {
|
|
2110
|
+
t(56, Q = T), t(57, N = void 0), U && en();
|
|
2111
|
+
}).catch((V) => t(18, ce = V));
|
|
2105
2112
|
}
|
|
2106
2113
|
}
|
|
2107
|
-
function
|
|
2114
|
+
function _t(m) {
|
|
2108
2115
|
try {
|
|
2109
|
-
return
|
|
2116
|
+
return xr(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 Ue(m, { byId: U = !1, exact: V = !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 = _t(m), Y = new URLSearchParams();
|
|
2127
|
+
if (w !== void 0 && Y.set("language", Array.isArray(w) ? w.join(",") : w ?? ""), Ne && Y.set("types", Ne.join(",")), Je && Y.set("excludeTypes", String(Je)), a && Y.set("bbox", a.map((nt) => nt.toFixed(6)).join(",")), h && Y.set("country", Array.isArray(h) ? h.join(",") : h), !U && !P) {
|
|
2128
|
+
const nt = await mr(x, I, ie);
|
|
2129
|
+
nt && Y.set("proximity", nt), (V || !te) && Y.set("autocomplete", "false"), Y.set("fuzzyMatch", String(S));
|
|
2123
2130
|
}
|
|
2124
|
-
|
|
2125
|
-
const
|
|
2126
|
-
if (
|
|
2127
|
-
|
|
2131
|
+
k !== void 0 && (yt || !P || (Ne == null ? void 0 : Ne.length) === 1) && Y.set("limit", String(k)), Y.set("key", c), bt(Y);
|
|
2132
|
+
const it = pt + "/" + encodeURIComponent(P ? P.decimalLongitude + "," + P.decimalLatitude : m + (oe ? " " : "")) + ".json?" + Y.toString();
|
|
2133
|
+
if (it === Vt) {
|
|
2134
|
+
U ? (t(14, T = void 0), t(57, N = et[0])) : t(14, T = et);
|
|
2128
2135
|
return;
|
|
2129
2136
|
}
|
|
2130
|
-
|
|
2131
|
-
const
|
|
2132
|
-
if (!
|
|
2133
|
-
throw new Error(await
|
|
2134
|
-
const
|
|
2135
|
-
|
|
2137
|
+
Vt = it;
|
|
2138
|
+
const St = await fetch(it, { signal: ie.signal, ...vt });
|
|
2139
|
+
if (!St.ok)
|
|
2140
|
+
throw new Error(await St.text());
|
|
2141
|
+
const xt = await St.json();
|
|
2142
|
+
be("response", { url: it, featureCollection: xt }), U ? (t(14, T = void 0), t(57, N = xt.features[0]), et = [N]) : (t(14, T = xt.features.filter(p)), P && T.unshift({
|
|
2136
2143
|
type: "Feature",
|
|
2137
2144
|
properties: {},
|
|
2138
2145
|
id: "reverse_" + P.decimalLongitude + "_" + P.decimalLatitude,
|
|
@@ -2150,209 +2157,212 @@ function Cr(n, e, t) {
|
|
|
2150
2157
|
type: "Point",
|
|
2151
2158
|
coordinates: [P.decimalLongitude, P.decimalLatitude]
|
|
2152
2159
|
}
|
|
2153
|
-
}),
|
|
2160
|
+
}), et = 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
|
|
2164
|
-
if (!(
|
|
2169
|
+
function en() {
|
|
2170
|
+
var oe;
|
|
2171
|
+
if (!(Q != null && Q.length) || !E)
|
|
2165
2172
|
return;
|
|
2166
|
-
const
|
|
2173
|
+
const m = [180, 90, -180, -90], U = !Q.some((ie) => !ie.matching_text);
|
|
2167
2174
|
let V;
|
|
2168
|
-
for (const
|
|
2169
|
-
const
|
|
2170
|
-
if (V =
|
|
2171
|
-
for (const
|
|
2172
|
-
|
|
2175
|
+
for (const ie of Q) {
|
|
2176
|
+
const P = Ge(ie);
|
|
2177
|
+
if (V = V === void 0 ? P : P === void 0 ? V : Math.max(V, 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 && Q.length > 0 && (N && m[0] === m[2] && m[1] === m[3] ? x.flyTo(N.center, Ge(N)) : x.fitBounds(ft(m), 50, V));
|
|
2175
2182
|
}
|
|
2176
|
-
function
|
|
2183
|
+
function Ge(m) {
|
|
2177
2184
|
var V;
|
|
2178
|
-
if (!
|
|
2185
|
+
if (!m.bbox || m.bbox[0] !== m.bbox[2] && m.bbox[1] !== m.bbox[3])
|
|
2179
2186
|
return;
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
const Q = Ie[G + "." + P];
|
|
2186
|
-
return ee === void 0 ? Q : Q === void 0 ? ee : Math.max(ee, Q);
|
|
2187
|
+
const U = m.id.replace(/\..*/, "");
|
|
2188
|
+
return (Array.isArray((V = m.properties) == null ? void 0 : V.categories) ? m.properties.categories.reduce(
|
|
2189
|
+
(oe, ie) => {
|
|
2190
|
+
const P = $e[U + "." + ie];
|
|
2191
|
+
return oe === void 0 ? P : P === void 0 ? oe : Math.max(oe, P);
|
|
2187
2192
|
},
|
|
2188
2193
|
void 0
|
|
2189
|
-
) : void 0) ??
|
|
2194
|
+
) : void 0) ?? $e[U];
|
|
2190
2195
|
}
|
|
2191
|
-
function
|
|
2192
|
-
t(0, A =
|
|
2196
|
+
function tn(m) {
|
|
2197
|
+
t(0, A = g === "always"), t(14, T = void 0), t(57, N = void 0), t(15, z = -1), Qt(m[1].toFixed(6) + ", " + hr(m[0], [-180, 180], !0).toFixed(6), !1, !0);
|
|
2193
2198
|
}
|
|
2194
|
-
function
|
|
2199
|
+
function nn(m) {
|
|
2195
2200
|
if (!T)
|
|
2196
2201
|
return;
|
|
2197
|
-
let
|
|
2198
|
-
|
|
2202
|
+
let U = m.key === "ArrowDown" ? 1 : m.key === "ArrowUp" ? -1 : 0;
|
|
2203
|
+
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
2204
|
}
|
|
2200
|
-
function
|
|
2201
|
-
if (t(18,
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2205
|
+
function Et(m = !0, U = !1) {
|
|
2206
|
+
if (t(18, ce = void 0), ve && (window.clearTimeout(ve), ve = void 0), re && (window.clearTimeout(re), t(58, re = void 0)), !te && !U || O.length < L) {
|
|
2207
|
+
t(14, T = void 0);
|
|
2208
|
+
return;
|
|
2209
|
+
}
|
|
2210
|
+
const V = O;
|
|
2211
|
+
ve = window.setTimeout(
|
|
2212
|
+
() => {
|
|
2213
|
+
ve = void 0, Ue(V).catch((oe) => t(18, ce = oe));
|
|
2214
|
+
},
|
|
2215
|
+
m ? b : 0
|
|
2216
|
+
), O.endsWith(" ") || t(58, re = window.setTimeout(
|
|
2217
|
+
() => {
|
|
2218
|
+
t(58, re = void 0), Ue(V, { appendSpace: !0 }).catch((oe) => t(18, ce = oe));
|
|
2219
|
+
},
|
|
2220
|
+
pe
|
|
2221
|
+
));
|
|
2213
2222
|
}
|
|
2214
|
-
function
|
|
2215
|
-
t(57, N =
|
|
2223
|
+
function Lt(m) {
|
|
2224
|
+
t(57, N = m), t(1, O = m.place_name), t(15, z = -1);
|
|
2216
2225
|
}
|
|
2217
|
-
const
|
|
2218
|
-
function
|
|
2219
|
-
|
|
2220
|
-
|
|
2226
|
+
const rn = () => ae.focus();
|
|
2227
|
+
function on(m) {
|
|
2228
|
+
Tt[m ? "unshift" : "push"](() => {
|
|
2229
|
+
ae = m, t(17, ae);
|
|
2221
2230
|
});
|
|
2222
2231
|
}
|
|
2223
|
-
function
|
|
2224
|
-
O = this.value, t(1, O), t(13,
|
|
2232
|
+
function sn() {
|
|
2233
|
+
O = this.value, t(1, O), t(13, Ae), t(28, u);
|
|
2225
2234
|
}
|
|
2226
|
-
const
|
|
2227
|
-
t(1, O = ""),
|
|
2228
|
-
},
|
|
2229
|
-
|
|
2230
|
-
},
|
|
2235
|
+
const ln = () => t(13, Ae = !0), un = () => t(13, Ae = !1), an = () => Et(), cn = () => {
|
|
2236
|
+
t(1, O = ""), ae.focus();
|
|
2237
|
+
}, fn = () => t(0, A = !A), dn = () => t(18, ce = void 0), hn = (m) => t(15, z = m), mn = (m) => Lt(m), gn = () => {
|
|
2238
|
+
We || t(15, z = -1);
|
|
2239
|
+
}, yn = () => {
|
|
2231
2240
|
};
|
|
2232
|
-
return n.$$set = (
|
|
2233
|
-
"class" in
|
|
2241
|
+
return n.$$set = (m) => {
|
|
2242
|
+
"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, F = m.reverseButtonTitle), "searchValue" in m && t(1, O = m.searchValue), "pickedResultStyle" in m && t(39, M = m.pickedResultStyle), "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, gt = m.flyToSelected), "markerOnSelected" in m && t(43, Ke = m.markerOnSelected), "types" in m && t(44, Ne = m.types), "exhaustiveReverseGeocoding" in m && t(45, yt = m.exhaustiveReverseGeocoding), "excludeTypes" in m && t(46, Je = m.excludeTypes), "zoom" in m && t(47, $e = m.zoom), "apiUrl" in m && t(48, pt = m.apiUrl), "fetchParameters" in m && t(49, vt = m.fetchParameters), "iconsBaseUrl" in m && t(12, qt = m.iconsBaseUrl), "adjustUrlQuery" in m && t(50, bt = m.adjustUrlQuery), "$$scope" in m && t(61, o = m.$$scope);
|
|
2234
2243
|
}, n.$$.update = () => {
|
|
2235
2244
|
if (n.$$.dirty[0] & /*enableReverse*/
|
|
2236
|
-
32 && t(0, A =
|
|
2245
|
+
32 && t(0, A = g === "always"), n.$$.dirty[0] & /*focused, clearOnBlur*/
|
|
2237
2246
|
268443648 && setTimeout(() => {
|
|
2238
|
-
t(16,
|
|
2247
|
+
t(16, tt = Ae), u && !Ae && t(1, O = "");
|
|
2239
2248
|
}), n.$$.dirty[0] & /*searchValue, listFeatures*/
|
|
2240
2249
|
16386 | n.$$.dirty[1] & /*minLength*/
|
|
2241
|
-
64 && O.length < L && (t(57, N = void 0), t(14, T = void 0), t(18,
|
|
2242
|
-
67109120 && M && N && !N.address && N.geometry.type === "Point" && N.place_type[0] !== "reverse" &&
|
|
2243
|
-
|
|
2244
|
-
18432 &&
|
|
2245
|
-
2 && t(15,
|
|
2250
|
+
64 && O.length < L && (t(57, N = void 0), t(14, T = void 0), t(18, ce = void 0), t(56, Q = T)), n.$$.dirty[1] & /*pickedResultStyle, picked*/
|
|
2251
|
+
67109120 && M !== "marker-only" && N && !N.address && N.geometry.type === "Point" && N.place_type[0] !== "reverse" && Ue(N.id, { byId: !0 }).catch((m) => t(18, ce = m)), n.$$.dirty[1] & /*mapController, picked, prevIdToFly, flyTo*/
|
|
2252
|
+
335544354 && (x && N && N.id !== wt && E && (!N.bbox || N.bbox[0] === N.bbox[2] && N.bbox[1] === N.bbox[3] ? x.flyTo(N.center, Ge(N)) : x.fitBounds(ft(N.bbox), 50, Ge(N)), t(14, T = void 0), t(56, Q = void 0), t(15, z = -1)), t(59, wt = N == null ? void 0 : N.id)), n.$$.dirty[0] & /*selectFirst, listFeatures*/
|
|
2253
|
+
18432 && We && T != null && T.length && ($i() || t(15, z = 0)), n.$$.dirty[0] & /*searchValue*/
|
|
2254
|
+
2 && t(15, z = -1), n.$$.dirty[0] & /*listFeatures*/
|
|
2246
2255
|
16384 | n.$$.dirty[1] & /*markedFeatures*/
|
|
2247
|
-
33554432 &&
|
|
2256
|
+
33554432 && Q !== T && t(56, Q = void 0), n.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
|
|
2248
2257
|
81921 | n.$$.dirty[1] & /*mapController, markedFeatures*/
|
|
2249
|
-
33554464 &&
|
|
2250
|
-
switch (
|
|
2258
|
+
33554464 && x && x.setEventHandler((m) => {
|
|
2259
|
+
switch (m.type) {
|
|
2251
2260
|
case "mapClick":
|
|
2252
|
-
A &&
|
|
2261
|
+
A && tn(m.coordinates);
|
|
2253
2262
|
break;
|
|
2254
2263
|
case "markerClick":
|
|
2255
2264
|
{
|
|
2256
|
-
const
|
|
2257
|
-
|
|
2265
|
+
const U = T == null ? void 0 : T.find((V) => V.id === m.id);
|
|
2266
|
+
U && Lt(U);
|
|
2258
2267
|
}
|
|
2259
2268
|
break;
|
|
2260
2269
|
case "markerMouseEnter":
|
|
2261
|
-
|
|
2270
|
+
Q && t(15, z = tt ? (T == null ? void 0 : T.findIndex((U) => U.id === m.id)) ?? -1 : -1);
|
|
2262
2271
|
break;
|
|
2263
2272
|
case "markerMouseLeave":
|
|
2264
|
-
|
|
2273
|
+
Q && t(15, z = -1);
|
|
2265
2274
|
break;
|
|
2266
2275
|
}
|
|
2267
2276
|
}), n.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
2268
|
-
49152 && t(
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
100663328 &&
|
|
2277
|
+
49152 && t(60, i = T == null ? void 0 : T[z]), n.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
|
|
2278
|
+
536872994 && x && i && E && gt && x.flyTo(i.center, Ge(i)), n.$$.dirty[1] & /*markerOnSelected, mapController*/
|
|
2279
|
+
4128 && (Ke || x == null || x.setMarkers(void 0, void 0)), n.$$.dirty[1] & /*mapController, markerOnSelected, markedFeatures, selected*/
|
|
2280
|
+
570429472 && x && Ke && !Q && (x.setMarkers(i ? [i] : void 0, void 0), x.setSelectedMarker(i ? 0 : -1)), n.$$.dirty[1] & /*mapController, markedFeatures, picked*/
|
|
2281
|
+
100663328 && x && x.setMarkers(Q, N), n.$$.dirty[0] & /*selectedItemIndex*/
|
|
2273
2282
|
32768 | n.$$.dirty[1] & /*markedFeatures, mapController*/
|
|
2274
|
-
33554464 &&
|
|
2283
|
+
33554464 && Q && x && x.setSelectedMarker(z), n.$$.dirty[1] & /*selected, autocompleteTimeoutRef*/
|
|
2284
|
+
671088640 && i && (window.clearTimeout(re), t(58, re = void 0)), n.$$.dirty[0] & /*searchValue*/
|
|
2275
2285
|
2 | n.$$.dirty[1] & /*mapController*/
|
|
2276
|
-
32 &&
|
|
2277
|
-
const
|
|
2278
|
-
|
|
2286
|
+
32 && x) {
|
|
2287
|
+
const m = _t(O);
|
|
2288
|
+
x.setReverseMarker(m ? [m.decimalLongitude, m.decimalLatitude] : void 0);
|
|
2279
2289
|
}
|
|
2280
2290
|
n.$$.dirty[1] & /*selected*/
|
|
2281
|
-
|
|
2282
|
-
67108864 &&
|
|
2283
|
-
81920 &&
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2291
|
+
536870912 && be("select", { feature: i }), n.$$.dirty[1] & /*picked*/
|
|
2292
|
+
67108864 && be("pick", { feature: N }), n.$$.dirty[0] & /*focusedDelayed, listFeatures*/
|
|
2293
|
+
81920 && be("optionsvisibilitychange", {
|
|
2294
|
+
optionsVisible: tt && !!T
|
|
2295
|
+
}), n.$$.dirty[0] & /*listFeatures*/
|
|
2296
|
+
16384 && be("featureslisted", { features: T }), n.$$.dirty[1] & /*markedFeatures*/
|
|
2297
|
+
33554432 && be("featuresmarked", { features: Q }), n.$$.dirty[0] & /*reverseActive*/
|
|
2298
|
+
1 && be("reversetoggle", { reverse: A }), n.$$.dirty[0] & /*searchValue*/
|
|
2299
|
+
2 && be("querychange", { query: O }), n.$$.dirty[0] & /*reverseActive*/
|
|
2288
2300
|
1 | n.$$.dirty[1] & /*mapController*/
|
|
2289
|
-
32 &&
|
|
2301
|
+
32 && x && x.indicateReverse(A);
|
|
2290
2302
|
}, [
|
|
2291
2303
|
A,
|
|
2292
2304
|
O,
|
|
2293
2305
|
s,
|
|
2294
2306
|
d,
|
|
2295
2307
|
f,
|
|
2308
|
+
g,
|
|
2296
2309
|
y,
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2310
|
+
_,
|
|
2311
|
+
C,
|
|
2312
|
+
F,
|
|
2300
2313
|
D,
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
Oe,
|
|
2314
|
+
We,
|
|
2315
|
+
qt,
|
|
2316
|
+
Ae,
|
|
2305
2317
|
T,
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
ue,
|
|
2318
|
+
z,
|
|
2319
|
+
tt,
|
|
2309
2320
|
ae,
|
|
2310
|
-
|
|
2311
|
-
|
|
2321
|
+
ce,
|
|
2322
|
+
Pe,
|
|
2323
|
+
Ji,
|
|
2312
2324
|
Zt,
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2325
|
+
nn,
|
|
2326
|
+
Et,
|
|
2327
|
+
Lt,
|
|
2316
2328
|
l,
|
|
2317
2329
|
c,
|
|
2318
|
-
u,
|
|
2319
2330
|
a,
|
|
2331
|
+
u,
|
|
2320
2332
|
h,
|
|
2321
|
-
|
|
2322
|
-
|
|
2333
|
+
b,
|
|
2334
|
+
p,
|
|
2323
2335
|
E,
|
|
2324
|
-
_,
|
|
2325
|
-
x,
|
|
2326
|
-
C,
|
|
2327
2336
|
S,
|
|
2337
|
+
w,
|
|
2338
|
+
k,
|
|
2339
|
+
x,
|
|
2328
2340
|
L,
|
|
2329
2341
|
I,
|
|
2330
2342
|
M,
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
Ye,
|
|
2334
|
-
Me,
|
|
2335
|
-
ht,
|
|
2336
|
-
Xe,
|
|
2337
|
-
Ie,
|
|
2338
|
-
Ke,
|
|
2343
|
+
te,
|
|
2344
|
+
pe,
|
|
2339
2345
|
gt,
|
|
2340
|
-
|
|
2346
|
+
Ke,
|
|
2347
|
+
Ne,
|
|
2341
2348
|
yt,
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2349
|
+
Je,
|
|
2350
|
+
$e,
|
|
2351
|
+
pt,
|
|
2352
|
+
vt,
|
|
2353
|
+
bt,
|
|
2345
2354
|
Hi,
|
|
2346
2355
|
Yi,
|
|
2347
|
-
|
|
2356
|
+
Qt,
|
|
2357
|
+
Xi,
|
|
2358
|
+
Ki,
|
|
2359
|
+
Q,
|
|
2348
2360
|
N,
|
|
2349
|
-
|
|
2361
|
+
re,
|
|
2362
|
+
wt,
|
|
2350
2363
|
i,
|
|
2351
2364
|
o,
|
|
2352
2365
|
r,
|
|
2353
|
-
en,
|
|
2354
|
-
tn,
|
|
2355
|
-
nn,
|
|
2356
2366
|
rn,
|
|
2357
2367
|
on,
|
|
2358
2368
|
sn,
|
|
@@ -2362,17 +2372,20 @@ function Cr(n, e, t) {
|
|
|
2362
2372
|
cn,
|
|
2363
2373
|
fn,
|
|
2364
2374
|
dn,
|
|
2365
|
-
hn
|
|
2375
|
+
hn,
|
|
2376
|
+
mn,
|
|
2377
|
+
gn,
|
|
2378
|
+
yn
|
|
2366
2379
|
];
|
|
2367
2380
|
}
|
|
2368
|
-
let
|
|
2381
|
+
let Rr = class extends Oe {
|
|
2369
2382
|
constructor(e) {
|
|
2370
|
-
super(),
|
|
2383
|
+
super(), Ie(
|
|
2371
2384
|
this,
|
|
2372
2385
|
e,
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2386
|
+
Tr,
|
|
2387
|
+
Pr,
|
|
2388
|
+
Re,
|
|
2376
2389
|
{
|
|
2377
2390
|
ZOOM_DEFAULTS: 25,
|
|
2378
2391
|
class: 2,
|
|
@@ -2398,17 +2411,17 @@ let Nr = class extends Re {
|
|
|
2398
2411
|
reverseActive: 0,
|
|
2399
2412
|
reverseButtonTitle: 9,
|
|
2400
2413
|
searchValue: 1,
|
|
2401
|
-
|
|
2414
|
+
pickedResultStyle: 39,
|
|
2402
2415
|
showPlaceType: 10,
|
|
2403
2416
|
showResultsWhileTyping: 40,
|
|
2417
|
+
autocompleteTimeout: 41,
|
|
2404
2418
|
selectFirst: 11,
|
|
2405
|
-
flyToSelected:
|
|
2406
|
-
markerOnSelected:
|
|
2407
|
-
types:
|
|
2408
|
-
exhaustiveReverseGeocoding:
|
|
2409
|
-
excludeTypes:
|
|
2410
|
-
zoom:
|
|
2411
|
-
maxZoom: 47,
|
|
2419
|
+
flyToSelected: 42,
|
|
2420
|
+
markerOnSelected: 43,
|
|
2421
|
+
types: 44,
|
|
2422
|
+
exhaustiveReverseGeocoding: 45,
|
|
2423
|
+
excludeTypes: 46,
|
|
2424
|
+
zoom: 47,
|
|
2412
2425
|
apiUrl: 48,
|
|
2413
2426
|
fetchParameters: 49,
|
|
2414
2427
|
iconsBaseUrl: 12,
|
|
@@ -2442,11 +2455,11 @@ let Nr = class extends Re {
|
|
|
2442
2455
|
return this.$$.ctx[55];
|
|
2443
2456
|
}
|
|
2444
2457
|
};
|
|
2445
|
-
function
|
|
2458
|
+
function dt(n, e, t = {}) {
|
|
2446
2459
|
const i = { type: "Feature" };
|
|
2447
2460
|
return (t.id === 0 || t.id) && (i.id = t.id), t.bbox && (i.bbox = t.bbox), i.properties = e || {}, i.geometry = n, i;
|
|
2448
2461
|
}
|
|
2449
|
-
function
|
|
2462
|
+
function Ut(n, e, t = {}) {
|
|
2450
2463
|
for (const r of n) {
|
|
2451
2464
|
if (r.length < 4)
|
|
2452
2465
|
throw new Error(
|
|
@@ -2458,58 +2471,58 @@ function Dt(n, e, t = {}) {
|
|
|
2458
2471
|
if (r[r.length - 1][o] !== r[0][o])
|
|
2459
2472
|
throw new Error("First and last Position are not equivalent.");
|
|
2460
2473
|
}
|
|
2461
|
-
return
|
|
2474
|
+
return dt({
|
|
2462
2475
|
type: "Polygon",
|
|
2463
2476
|
coordinates: n
|
|
2464
2477
|
}, e, t);
|
|
2465
2478
|
}
|
|
2466
|
-
function
|
|
2479
|
+
function Ot(n, e = {}) {
|
|
2467
2480
|
const t = { type: "FeatureCollection" };
|
|
2468
2481
|
return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = n, t;
|
|
2469
2482
|
}
|
|
2470
|
-
function
|
|
2471
|
-
return
|
|
2483
|
+
function qi(n, e, t = {}) {
|
|
2484
|
+
return dt({
|
|
2472
2485
|
type: "MultiPolygon",
|
|
2473
2486
|
coordinates: n
|
|
2474
2487
|
}, e, t);
|
|
2475
2488
|
}
|
|
2476
|
-
function
|
|
2489
|
+
function Qi(n, e, t) {
|
|
2477
2490
|
if (n !== null)
|
|
2478
|
-
for (var i, r, o, l, s, c,
|
|
2479
|
-
|
|
2491
|
+
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++) {
|
|
2492
|
+
a = b ? n.features[p].geometry : g ? n.geometry : n, f = a ? a.type === "GeometryCollection" : !1, s = f ? a.geometries.length : 1;
|
|
2480
2493
|
for (var E = 0; E < s; E++) {
|
|
2481
|
-
var
|
|
2482
|
-
if (l = f ?
|
|
2494
|
+
var S = 0, w = 0;
|
|
2495
|
+
if (l = f ? a.geometries[E] : a, l !== null) {
|
|
2483
2496
|
c = l.coordinates;
|
|
2484
|
-
var
|
|
2485
|
-
switch (d = 0,
|
|
2497
|
+
var k = l.type;
|
|
2498
|
+
switch (d = 0, k) {
|
|
2486
2499
|
case null:
|
|
2487
2500
|
break;
|
|
2488
2501
|
case "Point":
|
|
2489
2502
|
if (e(
|
|
2490
2503
|
c,
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2504
|
+
u,
|
|
2505
|
+
p,
|
|
2506
|
+
S,
|
|
2507
|
+
w
|
|
2495
2508
|
) === !1)
|
|
2496
2509
|
return !1;
|
|
2497
|
-
|
|
2510
|
+
u++, S++;
|
|
2498
2511
|
break;
|
|
2499
2512
|
case "LineString":
|
|
2500
2513
|
case "MultiPoint":
|
|
2501
2514
|
for (i = 0; i < c.length; i++) {
|
|
2502
2515
|
if (e(
|
|
2503
2516
|
c[i],
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2517
|
+
u,
|
|
2518
|
+
p,
|
|
2519
|
+
S,
|
|
2520
|
+
w
|
|
2508
2521
|
) === !1)
|
|
2509
2522
|
return !1;
|
|
2510
|
-
|
|
2523
|
+
u++, k === "MultiPoint" && S++;
|
|
2511
2524
|
}
|
|
2512
|
-
|
|
2525
|
+
k === "LineString" && S++;
|
|
2513
2526
|
break;
|
|
2514
2527
|
case "Polygon":
|
|
2515
2528
|
case "MultiLineString":
|
|
@@ -2517,40 +2530,40 @@ function ji(n, e, t) {
|
|
|
2517
2530
|
for (r = 0; r < c[i].length - d; r++) {
|
|
2518
2531
|
if (e(
|
|
2519
2532
|
c[i][r],
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2533
|
+
u,
|
|
2534
|
+
p,
|
|
2535
|
+
S,
|
|
2536
|
+
w
|
|
2524
2537
|
) === !1)
|
|
2525
2538
|
return !1;
|
|
2526
|
-
|
|
2539
|
+
u++;
|
|
2527
2540
|
}
|
|
2528
|
-
|
|
2541
|
+
k === "MultiLineString" && S++, k === "Polygon" && w++;
|
|
2529
2542
|
}
|
|
2530
|
-
|
|
2543
|
+
k === "Polygon" && S++;
|
|
2531
2544
|
break;
|
|
2532
2545
|
case "MultiPolygon":
|
|
2533
2546
|
for (i = 0; i < c.length; i++) {
|
|
2534
|
-
for (
|
|
2547
|
+
for (w = 0, r = 0; r < c[i].length; r++) {
|
|
2535
2548
|
for (o = 0; o < c[i][r].length - d; o++) {
|
|
2536
2549
|
if (e(
|
|
2537
2550
|
c[i][r][o],
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2551
|
+
u,
|
|
2552
|
+
p,
|
|
2553
|
+
S,
|
|
2554
|
+
w
|
|
2542
2555
|
) === !1)
|
|
2543
2556
|
return !1;
|
|
2544
|
-
|
|
2557
|
+
u++;
|
|
2545
2558
|
}
|
|
2546
|
-
|
|
2559
|
+
w++;
|
|
2547
2560
|
}
|
|
2548
|
-
|
|
2561
|
+
S++;
|
|
2549
2562
|
}
|
|
2550
2563
|
break;
|
|
2551
2564
|
case "GeometryCollection":
|
|
2552
2565
|
for (i = 0; i < l.geometries.length; i++)
|
|
2553
|
-
if (
|
|
2566
|
+
if (Qi(l.geometries[i], e) === !1)
|
|
2554
2567
|
return !1;
|
|
2555
2568
|
break;
|
|
2556
2569
|
default:
|
|
@@ -2560,17 +2573,17 @@ function ji(n, e, t) {
|
|
|
2560
2573
|
}
|
|
2561
2574
|
}
|
|
2562
2575
|
}
|
|
2563
|
-
function
|
|
2564
|
-
var t, i, r, o, l, s, c,
|
|
2565
|
-
for (t = 0; t <
|
|
2566
|
-
for (s = h ? n.features[t].geometry :
|
|
2576
|
+
function Gt(n, e) {
|
|
2577
|
+
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;
|
|
2578
|
+
for (t = 0; t < g; t++) {
|
|
2579
|
+
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++) {
|
|
2567
2580
|
if (o = c ? s.geometries[r] : s, o === null) {
|
|
2568
2581
|
if (e(
|
|
2569
2582
|
null,
|
|
2570
2583
|
f,
|
|
2571
|
-
|
|
2584
|
+
a,
|
|
2572
2585
|
d,
|
|
2573
|
-
|
|
2586
|
+
u
|
|
2574
2587
|
) === !1)
|
|
2575
2588
|
return !1;
|
|
2576
2589
|
continue;
|
|
@@ -2585,9 +2598,9 @@ function Ut(n, e) {
|
|
|
2585
2598
|
if (e(
|
|
2586
2599
|
o,
|
|
2587
2600
|
f,
|
|
2588
|
-
|
|
2601
|
+
a,
|
|
2589
2602
|
d,
|
|
2590
|
-
|
|
2603
|
+
u
|
|
2591
2604
|
) === !1)
|
|
2592
2605
|
return !1;
|
|
2593
2606
|
break;
|
|
@@ -2597,9 +2610,9 @@ function Ut(n, e) {
|
|
|
2597
2610
|
if (e(
|
|
2598
2611
|
o.geometries[i],
|
|
2599
2612
|
f,
|
|
2600
|
-
|
|
2613
|
+
a,
|
|
2601
2614
|
d,
|
|
2602
|
-
|
|
2615
|
+
u
|
|
2603
2616
|
) === !1)
|
|
2604
2617
|
return !1;
|
|
2605
2618
|
break;
|
|
@@ -2611,8 +2624,8 @@ function Ut(n, e) {
|
|
|
2611
2624
|
f++;
|
|
2612
2625
|
}
|
|
2613
2626
|
}
|
|
2614
|
-
function
|
|
2615
|
-
|
|
2627
|
+
function Ir(n, e) {
|
|
2628
|
+
Gt(n, function(t, i, r, o, l) {
|
|
2616
2629
|
var s = t === null ? null : t.type;
|
|
2617
2630
|
switch (s) {
|
|
2618
2631
|
case null:
|
|
@@ -2620,7 +2633,7 @@ function Pr(n, e) {
|
|
|
2620
2633
|
case "LineString":
|
|
2621
2634
|
case "Polygon":
|
|
2622
2635
|
return e(
|
|
2623
|
-
|
|
2636
|
+
dt(t, r, { bbox: o, id: l }),
|
|
2624
2637
|
i,
|
|
2625
2638
|
0
|
|
2626
2639
|
) === !1 ? !1 : void 0;
|
|
@@ -2637,25 +2650,25 @@ function Pr(n, e) {
|
|
|
2637
2650
|
c = "Polygon";
|
|
2638
2651
|
break;
|
|
2639
2652
|
}
|
|
2640
|
-
for (var
|
|
2641
|
-
var d = t.coordinates[
|
|
2653
|
+
for (var a = 0; a < t.coordinates.length; a++) {
|
|
2654
|
+
var d = t.coordinates[a], u = {
|
|
2642
2655
|
type: c,
|
|
2643
2656
|
coordinates: d
|
|
2644
2657
|
};
|
|
2645
|
-
if (e(
|
|
2658
|
+
if (e(dt(u, r), i, a) === !1)
|
|
2646
2659
|
return !1;
|
|
2647
2660
|
}
|
|
2648
2661
|
});
|
|
2649
2662
|
}
|
|
2650
|
-
function
|
|
2663
|
+
function Or(n, e = {}) {
|
|
2651
2664
|
if (n.bbox != null && e.recompute !== !0)
|
|
2652
2665
|
return n.bbox;
|
|
2653
2666
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
2654
|
-
return
|
|
2667
|
+
return Qi(n, (i) => {
|
|
2655
2668
|
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]);
|
|
2656
2669
|
}), t;
|
|
2657
2670
|
}
|
|
2658
|
-
var
|
|
2671
|
+
var _i = Or;
|
|
2659
2672
|
/**
|
|
2660
2673
|
* splaytree v3.1.2
|
|
2661
2674
|
* Fast Splay tree for Node and browser
|
|
@@ -2678,7 +2691,7 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
2678
2691
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
2679
2692
|
and limitations under the License.
|
|
2680
2693
|
***************************************************************************** */
|
|
2681
|
-
function
|
|
2694
|
+
function Wr(n, e) {
|
|
2682
2695
|
var t = { label: 0, sent: function() {
|
|
2683
2696
|
if (o[0] & 1) throw o[1];
|
|
2684
2697
|
return o[1];
|
|
@@ -2686,59 +2699,59 @@ function Rr(n, e) {
|
|
|
2686
2699
|
return l = { next: s(0), throw: s(1), return: s(2) }, typeof Symbol == "function" && (l[Symbol.iterator] = function() {
|
|
2687
2700
|
return this;
|
|
2688
2701
|
}), l;
|
|
2689
|
-
function s(
|
|
2702
|
+
function s(a) {
|
|
2690
2703
|
return function(d) {
|
|
2691
|
-
return c([
|
|
2704
|
+
return c([a, d]);
|
|
2692
2705
|
};
|
|
2693
2706
|
}
|
|
2694
|
-
function c(
|
|
2707
|
+
function c(a) {
|
|
2695
2708
|
if (i) throw new TypeError("Generator is already executing.");
|
|
2696
2709
|
for (; t; ) try {
|
|
2697
|
-
if (i = 1, r && (o =
|
|
2698
|
-
switch (r = 0, o && (
|
|
2710
|
+
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;
|
|
2711
|
+
switch (r = 0, o && (a = [a[0] & 2, o.value]), a[0]) {
|
|
2699
2712
|
case 0:
|
|
2700
2713
|
case 1:
|
|
2701
|
-
o =
|
|
2714
|
+
o = a;
|
|
2702
2715
|
break;
|
|
2703
2716
|
case 4:
|
|
2704
|
-
return t.label++, { value:
|
|
2717
|
+
return t.label++, { value: a[1], done: !1 };
|
|
2705
2718
|
case 5:
|
|
2706
|
-
t.label++, r =
|
|
2719
|
+
t.label++, r = a[1], a = [0];
|
|
2707
2720
|
continue;
|
|
2708
2721
|
case 7:
|
|
2709
|
-
|
|
2722
|
+
a = t.ops.pop(), t.trys.pop();
|
|
2710
2723
|
continue;
|
|
2711
2724
|
default:
|
|
2712
|
-
if (o = t.trys, !(o = o.length > 0 && o[o.length - 1]) && (
|
|
2725
|
+
if (o = t.trys, !(o = o.length > 0 && o[o.length - 1]) && (a[0] === 6 || a[0] === 2)) {
|
|
2713
2726
|
t = 0;
|
|
2714
2727
|
continue;
|
|
2715
2728
|
}
|
|
2716
|
-
if (
|
|
2717
|
-
t.label =
|
|
2729
|
+
if (a[0] === 3 && (!o || a[1] > o[0] && a[1] < o[3])) {
|
|
2730
|
+
t.label = a[1];
|
|
2718
2731
|
break;
|
|
2719
2732
|
}
|
|
2720
|
-
if (
|
|
2721
|
-
t.label = o[1], o =
|
|
2733
|
+
if (a[0] === 6 && t.label < o[1]) {
|
|
2734
|
+
t.label = o[1], o = a;
|
|
2722
2735
|
break;
|
|
2723
2736
|
}
|
|
2724
2737
|
if (o && t.label < o[2]) {
|
|
2725
|
-
t.label = o[2], t.ops.push(
|
|
2738
|
+
t.label = o[2], t.ops.push(a);
|
|
2726
2739
|
break;
|
|
2727
2740
|
}
|
|
2728
2741
|
o[2] && t.ops.pop(), t.trys.pop();
|
|
2729
2742
|
continue;
|
|
2730
2743
|
}
|
|
2731
|
-
|
|
2744
|
+
a = e.call(n, t);
|
|
2732
2745
|
} catch (d) {
|
|
2733
|
-
|
|
2746
|
+
a = [6, d], r = 0;
|
|
2734
2747
|
} finally {
|
|
2735
2748
|
i = o = 0;
|
|
2736
2749
|
}
|
|
2737
|
-
if (
|
|
2738
|
-
return { value:
|
|
2750
|
+
if (a[0] & 5) throw a[1];
|
|
2751
|
+
return { value: a[0] ? a[1] : void 0, done: !0 };
|
|
2739
2752
|
}
|
|
2740
2753
|
}
|
|
2741
|
-
var
|
|
2754
|
+
var ke = (
|
|
2742
2755
|
/** @class */
|
|
2743
2756
|
/* @__PURE__ */ function() {
|
|
2744
2757
|
function n(e, t) {
|
|
@@ -2747,11 +2760,11 @@ var Se = (
|
|
|
2747
2760
|
return n;
|
|
2748
2761
|
}()
|
|
2749
2762
|
);
|
|
2750
|
-
function
|
|
2763
|
+
function Ar(n, e) {
|
|
2751
2764
|
return n > e ? 1 : n < e ? -1 : 0;
|
|
2752
2765
|
}
|
|
2753
|
-
function
|
|
2754
|
-
for (var i = new
|
|
2766
|
+
function we(n, e, t) {
|
|
2767
|
+
for (var i = new ke(null, null), r = i, o = i; ; ) {
|
|
2755
2768
|
var l = t(n, e.key);
|
|
2756
2769
|
if (l < 0) {
|
|
2757
2770
|
if (e.left === null)
|
|
@@ -2776,46 +2789,46 @@ function pe(n, e, t) {
|
|
|
2776
2789
|
}
|
|
2777
2790
|
return r.right = e.left, o.left = e.right, e.left = i.right, e.right = i.left, e;
|
|
2778
2791
|
}
|
|
2779
|
-
function
|
|
2780
|
-
var r = new
|
|
2792
|
+
function Nt(n, e, t, i) {
|
|
2793
|
+
var r = new ke(n, e);
|
|
2781
2794
|
if (t === null)
|
|
2782
2795
|
return r.left = r.right = null, r;
|
|
2783
|
-
t =
|
|
2796
|
+
t = we(n, t, i);
|
|
2784
2797
|
var o = i(n, t.key);
|
|
2785
2798
|
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;
|
|
2786
2799
|
}
|
|
2787
|
-
function
|
|
2800
|
+
function Ei(n, e, t) {
|
|
2788
2801
|
var i = null, r = null;
|
|
2789
2802
|
if (e) {
|
|
2790
|
-
e =
|
|
2803
|
+
e = we(n, e, t);
|
|
2791
2804
|
var o = t(e.key, n);
|
|
2792
2805
|
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);
|
|
2793
2806
|
}
|
|
2794
2807
|
return { left: i, right: r };
|
|
2795
2808
|
}
|
|
2796
|
-
function
|
|
2797
|
-
return e === null ? n : (n === null || (e =
|
|
2809
|
+
function zr(n, e, t) {
|
|
2810
|
+
return e === null ? n : (n === null || (e = we(n.key, e, t), e.left = n), e);
|
|
2798
2811
|
}
|
|
2799
|
-
function
|
|
2812
|
+
function Wt(n, e, t, i, r) {
|
|
2800
2813
|
if (n) {
|
|
2801
2814
|
i("" + e + (t ? "└── " : "├── ") + r(n) + `
|
|
2802
2815
|
`);
|
|
2803
2816
|
var o = e + (t ? " " : "│ ");
|
|
2804
|
-
n.left &&
|
|
2817
|
+
n.left && Wt(n.left, o, !1, i, r), n.right && Wt(n.right, o, !0, i, r);
|
|
2805
2818
|
}
|
|
2806
2819
|
}
|
|
2807
|
-
var
|
|
2820
|
+
var jt = (
|
|
2808
2821
|
/** @class */
|
|
2809
2822
|
function() {
|
|
2810
2823
|
function n(e) {
|
|
2811
|
-
e === void 0 && (e =
|
|
2824
|
+
e === void 0 && (e = Ar), this._root = null, this._size = 0, this._comparator = e;
|
|
2812
2825
|
}
|
|
2813
2826
|
return n.prototype.insert = function(e, t) {
|
|
2814
|
-
return this._size++, this._root =
|
|
2827
|
+
return this._size++, this._root = Nt(e, t, this._root, this._comparator);
|
|
2815
2828
|
}, n.prototype.add = function(e, t) {
|
|
2816
|
-
var i = new
|
|
2829
|
+
var i = new ke(e, t);
|
|
2817
2830
|
this._root === null && (i.left = i.right = null, this._size++, this._root = i);
|
|
2818
|
-
var r = this._comparator, o =
|
|
2831
|
+
var r = this._comparator, o = we(e, this._root, r), l = r(e, o.key);
|
|
2819
2832
|
return l === 0 ? this._root = o : (l < 0 ? (i.left = o.left, i.right = o, o.left = null) : l > 0 && (i.right = o.right, i.left = o, o.right = null), this._size++, this._root = i), this._root;
|
|
2820
2833
|
}, n.prototype.remove = function(e) {
|
|
2821
2834
|
this._root = this._remove(e, this._root, this._comparator);
|
|
@@ -2823,15 +2836,15 @@ var Gt = (
|
|
|
2823
2836
|
var r;
|
|
2824
2837
|
if (t === null)
|
|
2825
2838
|
return null;
|
|
2826
|
-
t =
|
|
2839
|
+
t = we(e, t, i);
|
|
2827
2840
|
var o = i(e, t.key);
|
|
2828
|
-
return o === 0 ? (t.left === null ? r = t.right : (r =
|
|
2841
|
+
return o === 0 ? (t.left === null ? r = t.right : (r = we(e, t.left, i), r.right = t.right), this._size--, r) : t;
|
|
2829
2842
|
}, n.prototype.pop = function() {
|
|
2830
2843
|
var e = this._root;
|
|
2831
2844
|
if (e) {
|
|
2832
2845
|
for (; e.left; )
|
|
2833
2846
|
e = e.left;
|
|
2834
|
-
return this._root =
|
|
2847
|
+
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 };
|
|
2835
2848
|
}
|
|
2836
2849
|
return null;
|
|
2837
2850
|
}, n.prototype.findStatic = function(e) {
|
|
@@ -2843,7 +2856,7 @@ var Gt = (
|
|
|
2843
2856
|
}
|
|
2844
2857
|
return null;
|
|
2845
2858
|
}, n.prototype.find = function(e) {
|
|
2846
|
-
return this._root && (this._root =
|
|
2859
|
+
return this._root && (this._root = we(e, this._root, this._comparator), this._comparator(e, this._root.key) !== 0) ? null : this._root;
|
|
2847
2860
|
}, n.prototype.contains = function(e) {
|
|
2848
2861
|
for (var t = this._root, i = this._comparator; t; ) {
|
|
2849
2862
|
var r = i(e, t.key);
|
|
@@ -2936,15 +2949,15 @@ var Gt = (
|
|
|
2936
2949
|
}, n.prototype.clear = function() {
|
|
2937
2950
|
return this._root = null, this._size = 0, this;
|
|
2938
2951
|
}, n.prototype.toList = function() {
|
|
2939
|
-
return
|
|
2952
|
+
return Fr(this._root);
|
|
2940
2953
|
}, n.prototype.load = function(e, t, i) {
|
|
2941
2954
|
t === void 0 && (t = []), i === void 0 && (i = !1);
|
|
2942
2955
|
var r = e.length, o = this._comparator;
|
|
2943
|
-
if (i &&
|
|
2944
|
-
this._root =
|
|
2956
|
+
if (i && Bt(e, t, 0, r - 1, o), this._root === null)
|
|
2957
|
+
this._root = At(e, t, 0, r), this._size = r;
|
|
2945
2958
|
else {
|
|
2946
|
-
var l =
|
|
2947
|
-
r = this._size + r, this._root =
|
|
2959
|
+
var l = Dr(this.toList(), Br(e, t), o);
|
|
2960
|
+
r = this._size + r, this._root = zt({ head: l }, 0, r);
|
|
2948
2961
|
}
|
|
2949
2962
|
return this;
|
|
2950
2963
|
}, n.prototype.isEmpty = function() {
|
|
@@ -2966,17 +2979,17 @@ var Gt = (
|
|
|
2966
2979
|
return String(i.key);
|
|
2967
2980
|
});
|
|
2968
2981
|
var t = [];
|
|
2969
|
-
return
|
|
2982
|
+
return Wt(this._root, "", !0, function(i) {
|
|
2970
2983
|
return t.push(i);
|
|
2971
2984
|
}, e), t.join("");
|
|
2972
2985
|
}, n.prototype.update = function(e, t, i) {
|
|
2973
|
-
var r = this._comparator, o =
|
|
2974
|
-
r(e, t) < 0 ? s =
|
|
2986
|
+
var r = this._comparator, o = Ei(e, this._root, r), l = o.left, s = o.right;
|
|
2987
|
+
r(e, t) < 0 ? s = Nt(t, i, s, r) : l = Nt(t, i, l, r), this._root = zr(l, s, r);
|
|
2975
2988
|
}, n.prototype.split = function(e) {
|
|
2976
|
-
return
|
|
2989
|
+
return Ei(e, this._root, this._comparator);
|
|
2977
2990
|
}, n.prototype[Symbol.iterator] = function() {
|
|
2978
2991
|
var e, t, i;
|
|
2979
|
-
return
|
|
2992
|
+
return Wr(this, function(r) {
|
|
2980
2993
|
switch (r.label) {
|
|
2981
2994
|
case 0:
|
|
2982
2995
|
e = this._root, t = [], i = !1, r.label = 1;
|
|
@@ -3000,38 +3013,38 @@ var Gt = (
|
|
|
3000
3013
|
}, n;
|
|
3001
3014
|
}()
|
|
3002
3015
|
);
|
|
3003
|
-
function
|
|
3016
|
+
function At(n, e, t, i) {
|
|
3004
3017
|
var r = i - t;
|
|
3005
3018
|
if (r > 0) {
|
|
3006
|
-
var o = t + Math.floor(r / 2), l = n[o], s = e[o], c = new
|
|
3007
|
-
return c.left =
|
|
3019
|
+
var o = t + Math.floor(r / 2), l = n[o], s = e[o], c = new ke(l, s);
|
|
3020
|
+
return c.left = At(n, e, t, o), c.right = At(n, e, o + 1, i), c;
|
|
3008
3021
|
}
|
|
3009
3022
|
return null;
|
|
3010
3023
|
}
|
|
3011
|
-
function
|
|
3012
|
-
for (var t = new
|
|
3013
|
-
i = i.next = new
|
|
3024
|
+
function Br(n, e) {
|
|
3025
|
+
for (var t = new ke(null, null), i = t, r = 0; r < n.length; r++)
|
|
3026
|
+
i = i.next = new ke(n[r], e[r]);
|
|
3014
3027
|
return i.next = null, t.next;
|
|
3015
3028
|
}
|
|
3016
|
-
function
|
|
3017
|
-
for (var e = n, t = [], i = !1, r = new
|
|
3029
|
+
function Fr(n) {
|
|
3030
|
+
for (var e = n, t = [], i = !1, r = new ke(null, null), o = r; !i; )
|
|
3018
3031
|
e ? (t.push(e), e = e.left) : t.length > 0 ? (e = o = o.next = t.pop(), e = e.right) : i = !0;
|
|
3019
3032
|
return o.next = null, r.next;
|
|
3020
3033
|
}
|
|
3021
|
-
function
|
|
3034
|
+
function zt(n, e, t) {
|
|
3022
3035
|
var i = t - e;
|
|
3023
3036
|
if (i > 0) {
|
|
3024
|
-
var r = e + Math.floor(i / 2), o =
|
|
3025
|
-
return l.left = o, n.head = n.head.next, l.right =
|
|
3037
|
+
var r = e + Math.floor(i / 2), o = zt(n, e, r), l = n.head;
|
|
3038
|
+
return l.left = o, n.head = n.head.next, l.right = zt(n, r + 1, t), l;
|
|
3026
3039
|
}
|
|
3027
3040
|
return null;
|
|
3028
3041
|
}
|
|
3029
|
-
function
|
|
3030
|
-
for (var i = new
|
|
3042
|
+
function Dr(n, e, t) {
|
|
3043
|
+
for (var i = new ke(null, null), r = i, o = n, l = e; o !== null && l !== null; )
|
|
3031
3044
|
t(o.key, l.key) < 0 ? (r.next = o, o = o.next) : (r.next = l, l = l.next), r = r.next;
|
|
3032
3045
|
return o !== null ? r.next = o : l !== null && (r.next = l), i.next;
|
|
3033
3046
|
}
|
|
3034
|
-
function
|
|
3047
|
+
function Bt(n, e, t, i, r) {
|
|
3035
3048
|
if (!(t >= i)) {
|
|
3036
3049
|
for (var o = n[t + i >> 1], l = t - 1, s = i + 1; ; ) {
|
|
3037
3050
|
do
|
|
@@ -3045,51 +3058,51 @@ function At(n, e, t, i, r) {
|
|
|
3045
3058
|
var c = n[l];
|
|
3046
3059
|
n[l] = n[s], n[s] = c, c = e[l], e[l] = e[s], e[s] = c;
|
|
3047
3060
|
}
|
|
3048
|
-
|
|
3061
|
+
Bt(n, e, t, s, r), Bt(n, e, s + 1, i, r);
|
|
3049
3062
|
}
|
|
3050
3063
|
}
|
|
3051
|
-
const he = 11102230246251565e-32,
|
|
3052
|
-
function
|
|
3053
|
-
let o, l, s, c,
|
|
3054
|
-
d >
|
|
3064
|
+
const he = 11102230246251565e-32, K = 134217729, Ur = (3 + 8 * he) * he;
|
|
3065
|
+
function Pt(n, e, t, i, r) {
|
|
3066
|
+
let o, l, s, c, a = e[0], d = i[0], u = 0, f = 0;
|
|
3067
|
+
d > a == d > -a ? (o = a, a = e[++u]) : (o = d, d = i[++f]);
|
|
3055
3068
|
let h = 0;
|
|
3056
|
-
if (
|
|
3057
|
-
for (d >
|
|
3058
|
-
d >
|
|
3059
|
-
for (;
|
|
3060
|
-
l = o +
|
|
3069
|
+
if (u < n && f < t)
|
|
3070
|
+
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; )
|
|
3071
|
+
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);
|
|
3072
|
+
for (; u < n; )
|
|
3073
|
+
l = o + a, c = l - o, s = o - (l - c) + (a - c), a = e[++u], o = l, s !== 0 && (r[h++] = s);
|
|
3061
3074
|
for (; f < t; )
|
|
3062
3075
|
l = o + d, c = l - o, s = o - (l - c) + (d - c), d = i[++f], o = l, s !== 0 && (r[h++] = s);
|
|
3063
3076
|
return (o !== 0 || h === 0) && (r[h++] = o), h;
|
|
3064
3077
|
}
|
|
3065
|
-
function
|
|
3078
|
+
function Gr(n, e) {
|
|
3066
3079
|
let t = e[0];
|
|
3067
3080
|
for (let i = 1; i < n; i++) t += e[i];
|
|
3068
3081
|
return t;
|
|
3069
3082
|
}
|
|
3070
|
-
function
|
|
3083
|
+
function Xe(n) {
|
|
3071
3084
|
return new Float64Array(n);
|
|
3072
3085
|
}
|
|
3073
|
-
const
|
|
3074
|
-
function
|
|
3075
|
-
let s, c,
|
|
3076
|
-
const
|
|
3077
|
-
|
|
3078
|
-
let O =
|
|
3079
|
-
if (O >= M || -O >= M || (
|
|
3080
|
-
|
|
3081
|
-
const
|
|
3082
|
-
|
|
3083
|
-
const
|
|
3084
|
-
|
|
3085
|
-
const
|
|
3086
|
-
return
|
|
3087
|
-
}
|
|
3088
|
-
function
|
|
3089
|
-
const l = (e - o) * (t - r), s = (n - r) * (i - o), c = l - s,
|
|
3090
|
-
return Math.abs(c) >=
|
|
3091
|
-
}
|
|
3092
|
-
const
|
|
3086
|
+
const jr = (3 + 16 * he) * he, qr = (2 + 12 * he) * he, Qr = (9 + 64 * he) * he * he, Be = Xe(4), Li = Xe(8), Si = Xe(12), xi = Xe(16), $ = Xe(4);
|
|
3087
|
+
function Vr(n, e, t, i, r, o, l) {
|
|
3088
|
+
let s, c, a, d, u, f, h, b, g, y, p, E, S, w, k, x, L, _;
|
|
3089
|
+
const C = n - r, I = t - r, A = e - o, F = i - o;
|
|
3090
|
+
w = C * F, f = K * C, h = f - (f - C), b = C - h, f = K * F, g = f - (f - F), y = F - 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] = _;
|
|
3091
|
+
let O = Gr(4, Be), M = qr * l;
|
|
3092
|
+
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 - F, d = i - (F + u) + (u - o), s === 0 && c === 0 && a === 0 && d === 0) || (M = Qr * l + Ur * Math.abs(O), O += C * d + F * s - (A * a + I * c), O >= M || -O >= M)) return O;
|
|
3093
|
+
w = s * F, f = K * s, h = f - (f - s), b = s - h, f = K * F, g = f - (f - F), y = F - 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] = _;
|
|
3094
|
+
const D = Pt(4, Be, 4, $, Li);
|
|
3095
|
+
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] = _;
|
|
3096
|
+
const te = Pt(D, Li, 4, $, Si);
|
|
3097
|
+
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] = _;
|
|
3098
|
+
const pe = Pt(te, Si, 4, $, xi);
|
|
3099
|
+
return xi[pe - 1];
|
|
3100
|
+
}
|
|
3101
|
+
function Zr(n, e, t, i, r, o) {
|
|
3102
|
+
const l = (e - o) * (t - r), s = (n - r) * (i - o), c = l - s, a = Math.abs(l + s);
|
|
3103
|
+
return Math.abs(c) >= jr * a ? c : -Vr(n, e, t, i, r, o, a);
|
|
3104
|
+
}
|
|
3105
|
+
const Qe = (n, e) => n.ll.x <= e.x && e.x <= n.ur.x && n.ll.y <= e.y && e.y <= n.ur.y, Ft = (n, e) => {
|
|
3093
3106
|
if (e.ur.x < n.ll.x || n.ur.x < e.ll.x || e.ur.y < n.ll.y || n.ur.y < e.ll.y) return null;
|
|
3094
3107
|
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;
|
|
3095
3108
|
return {
|
|
@@ -3103,20 +3116,20 @@ const je = (n, e) => n.ll.x <= e.x && e.x <= n.ur.x && n.ll.y <= e.y && e.y <= n
|
|
|
3103
3116
|
}
|
|
3104
3117
|
};
|
|
3105
3118
|
};
|
|
3106
|
-
let
|
|
3107
|
-
|
|
3108
|
-
const
|
|
3109
|
-
if (-
|
|
3119
|
+
let Le = Number.EPSILON;
|
|
3120
|
+
Le === void 0 && (Le = Math.pow(2, -52));
|
|
3121
|
+
const Hr = Le * Le, Mi = (n, e) => {
|
|
3122
|
+
if (-Le < n && n < Le && -Le < e && e < Le)
|
|
3110
3123
|
return 0;
|
|
3111
3124
|
const t = n - e;
|
|
3112
|
-
return t * t <
|
|
3125
|
+
return t * t < Hr * n * e ? 0 : n < e ? -1 : 1;
|
|
3113
3126
|
};
|
|
3114
|
-
class
|
|
3127
|
+
class Yr {
|
|
3115
3128
|
constructor() {
|
|
3116
3129
|
this.reset();
|
|
3117
3130
|
}
|
|
3118
3131
|
reset() {
|
|
3119
|
-
this.xRounder = new
|
|
3132
|
+
this.xRounder = new ki(), this.yRounder = new ki();
|
|
3120
3133
|
}
|
|
3121
3134
|
round(e, t) {
|
|
3122
3135
|
return {
|
|
@@ -3125,9 +3138,9 @@ class Qr {
|
|
|
3125
3138
|
};
|
|
3126
3139
|
}
|
|
3127
3140
|
}
|
|
3128
|
-
class
|
|
3141
|
+
class ki {
|
|
3129
3142
|
constructor() {
|
|
3130
|
-
this.tree = new
|
|
3143
|
+
this.tree = new jt(), this.round(0);
|
|
3131
3144
|
}
|
|
3132
3145
|
// Note: this can rounds input values backwards or forwards.
|
|
3133
3146
|
// You might ask, why not restrict this to just rounding
|
|
@@ -3138,16 +3151,16 @@ class xi {
|
|
|
3138
3151
|
// angle for t-intersections).
|
|
3139
3152
|
round(e) {
|
|
3140
3153
|
const t = this.tree.add(e), i = this.tree.prev(t);
|
|
3141
|
-
if (i !== null &&
|
|
3154
|
+
if (i !== null && Mi(t.key, i.key) === 0)
|
|
3142
3155
|
return this.tree.remove(e), i.key;
|
|
3143
3156
|
const r = this.tree.next(t);
|
|
3144
|
-
return r !== null &&
|
|
3157
|
+
return r !== null && Mi(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
|
|
3145
3158
|
}
|
|
3146
3159
|
}
|
|
3147
|
-
const
|
|
3148
|
-
const i =
|
|
3160
|
+
const Ye = new Yr(), ct = (n, e) => n.x * e.y - n.y * e.x, Vi = (n, e) => n.x * e.x + n.y * e.y, Ci = (n, e, t) => {
|
|
3161
|
+
const i = Zr(n.x, n.y, e.x, e.y, t.x, t.y);
|
|
3149
3162
|
return i > 0 ? -1 : i < 0 ? 1 : 0;
|
|
3150
|
-
},
|
|
3163
|
+
}, ht = (n) => Math.sqrt(Vi(n, n)), Xr = (n, e, t) => {
|
|
3151
3164
|
const i = {
|
|
3152
3165
|
x: e.x - n.x,
|
|
3153
3166
|
y: e.y - n.y
|
|
@@ -3155,8 +3168,8 @@ const Ve = new Qr(), lt = (n, e) => n.x * e.y - n.y * e.x, qi = (n, e) => n.x *
|
|
|
3155
3168
|
x: t.x - n.x,
|
|
3156
3169
|
y: t.y - n.y
|
|
3157
3170
|
};
|
|
3158
|
-
return
|
|
3159
|
-
},
|
|
3171
|
+
return ct(r, i) / ht(r) / ht(i);
|
|
3172
|
+
}, Kr = (n, e, t) => {
|
|
3160
3173
|
const i = {
|
|
3161
3174
|
x: e.x - n.x,
|
|
3162
3175
|
y: e.y - n.y
|
|
@@ -3164,34 +3177,34 @@ const Ve = new Qr(), lt = (n, e) => n.x * e.y - n.y * e.x, qi = (n, e) => n.x *
|
|
|
3164
3177
|
x: t.x - n.x,
|
|
3165
3178
|
y: t.y - n.y
|
|
3166
3179
|
};
|
|
3167
|
-
return
|
|
3168
|
-
},
|
|
3180
|
+
return Vi(r, i) / ht(r) / ht(i);
|
|
3181
|
+
}, Ni = (n, e, t) => e.y === 0 ? null : {
|
|
3169
3182
|
x: n.x + e.x / e.y * (t - n.y),
|
|
3170
3183
|
y: t
|
|
3171
|
-
},
|
|
3184
|
+
}, Pi = (n, e, t) => e.x === 0 ? null : {
|
|
3172
3185
|
x: t,
|
|
3173
3186
|
y: n.y + e.y / e.x * (t - n.x)
|
|
3174
|
-
},
|
|
3175
|
-
if (e.x === 0) return
|
|
3176
|
-
if (i.x === 0) return
|
|
3177
|
-
if (e.y === 0) return
|
|
3178
|
-
if (i.y === 0) return
|
|
3179
|
-
const r =
|
|
3187
|
+
}, Jr = (n, e, t, i) => {
|
|
3188
|
+
if (e.x === 0) return Pi(t, i, n.x);
|
|
3189
|
+
if (i.x === 0) return Pi(n, e, t.x);
|
|
3190
|
+
if (e.y === 0) return Ni(t, i, n.y);
|
|
3191
|
+
if (i.y === 0) return Ni(n, e, t.y);
|
|
3192
|
+
const r = ct(e, i);
|
|
3180
3193
|
if (r == 0) return null;
|
|
3181
3194
|
const o = {
|
|
3182
3195
|
x: t.x - n.x,
|
|
3183
3196
|
y: t.y - n.y
|
|
3184
|
-
}, l =
|
|
3197
|
+
}, l = ct(o, e) / r, s = ct(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;
|
|
3185
3198
|
return {
|
|
3186
3199
|
x: f,
|
|
3187
3200
|
y: h
|
|
3188
3201
|
};
|
|
3189
3202
|
};
|
|
3190
|
-
class
|
|
3203
|
+
class le {
|
|
3191
3204
|
// for ordering sweep events in the sweep event queue
|
|
3192
3205
|
static compare(e, t) {
|
|
3193
|
-
const i =
|
|
3194
|
-
return i !== 0 ? i : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 :
|
|
3206
|
+
const i = le.comparePoints(e.point, t.point);
|
|
3207
|
+
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));
|
|
3195
3208
|
}
|
|
3196
3209
|
// for ordering points in sweep line order
|
|
3197
3210
|
static comparePoints(e, t) {
|
|
@@ -3246,8 +3259,8 @@ class re {
|
|
|
3246
3259
|
const t = /* @__PURE__ */ new Map(), i = (r) => {
|
|
3247
3260
|
const o = r.otherSE;
|
|
3248
3261
|
t.set(r, {
|
|
3249
|
-
sine:
|
|
3250
|
-
cosine:
|
|
3262
|
+
sine: Xr(this.point, e.point, o.point),
|
|
3263
|
+
cosine: Kr(this.point, e.point, o.point)
|
|
3251
3264
|
});
|
|
3252
3265
|
};
|
|
3253
3266
|
return (r, o) => {
|
|
@@ -3257,14 +3270,14 @@ class re {
|
|
|
3257
3270
|
cosine: s
|
|
3258
3271
|
} = t.get(r), {
|
|
3259
3272
|
sine: c,
|
|
3260
|
-
cosine:
|
|
3273
|
+
cosine: a
|
|
3261
3274
|
} = t.get(o);
|
|
3262
|
-
return l >= 0 && c >= 0 ? s <
|
|
3275
|
+
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;
|
|
3263
3276
|
};
|
|
3264
3277
|
}
|
|
3265
3278
|
}
|
|
3266
|
-
let
|
|
3267
|
-
class
|
|
3279
|
+
let $r = 0;
|
|
3280
|
+
class Se {
|
|
3268
3281
|
/* This compare() function is for ordering segments in the sweep
|
|
3269
3282
|
* line tree, and does so according to the following criteria:
|
|
3270
3283
|
*
|
|
@@ -3282,57 +3295,57 @@ class _e {
|
|
|
3282
3295
|
const i = e.leftSE.point.x, r = t.leftSE.point.x, o = e.rightSE.point.x, l = t.rightSE.point.x;
|
|
3283
3296
|
if (l < i) return 1;
|
|
3284
3297
|
if (o < r) return -1;
|
|
3285
|
-
const s = e.leftSE.point.y, c = t.leftSE.point.y,
|
|
3298
|
+
const s = e.leftSE.point.y, c = t.leftSE.point.y, a = e.rightSE.point.y, d = t.rightSE.point.y;
|
|
3286
3299
|
if (i < r) {
|
|
3287
|
-
if (c < s && c <
|
|
3288
|
-
if (c > s && c >
|
|
3289
|
-
const
|
|
3290
|
-
if (
|
|
3291
|
-
if (
|
|
3300
|
+
if (c < s && c < a) return 1;
|
|
3301
|
+
if (c > s && c > a) return -1;
|
|
3302
|
+
const u = e.comparePoint(t.leftSE.point);
|
|
3303
|
+
if (u < 0) return 1;
|
|
3304
|
+
if (u > 0) return -1;
|
|
3292
3305
|
const f = t.comparePoint(e.rightSE.point);
|
|
3293
3306
|
return f !== 0 ? f : -1;
|
|
3294
3307
|
}
|
|
3295
3308
|
if (i > r) {
|
|
3296
3309
|
if (s < c && s < d) return -1;
|
|
3297
3310
|
if (s > c && s > d) return 1;
|
|
3298
|
-
const
|
|
3299
|
-
if (
|
|
3311
|
+
const u = t.comparePoint(e.leftSE.point);
|
|
3312
|
+
if (u !== 0) return u;
|
|
3300
3313
|
const f = e.comparePoint(t.rightSE.point);
|
|
3301
3314
|
return f < 0 ? 1 : f > 0 ? -1 : 1;
|
|
3302
3315
|
}
|
|
3303
3316
|
if (s < c) return -1;
|
|
3304
3317
|
if (s > c) return 1;
|
|
3305
3318
|
if (o < l) {
|
|
3306
|
-
const
|
|
3307
|
-
if (
|
|
3319
|
+
const u = t.comparePoint(e.rightSE.point);
|
|
3320
|
+
if (u !== 0) return u;
|
|
3308
3321
|
}
|
|
3309
3322
|
if (o > l) {
|
|
3310
|
-
const
|
|
3311
|
-
if (
|
|
3312
|
-
if (
|
|
3323
|
+
const u = e.comparePoint(t.rightSE.point);
|
|
3324
|
+
if (u < 0) return 1;
|
|
3325
|
+
if (u > 0) return -1;
|
|
3313
3326
|
}
|
|
3314
3327
|
if (o !== l) {
|
|
3315
|
-
const
|
|
3316
|
-
if (
|
|
3317
|
-
if (
|
|
3328
|
+
const u = a - s, f = o - i, h = d - c, b = l - r;
|
|
3329
|
+
if (u > f && h < b) return 1;
|
|
3330
|
+
if (u < f && h > b) return -1;
|
|
3318
3331
|
}
|
|
3319
|
-
return o > l ? 1 : o < l ||
|
|
3332
|
+
return o > l ? 1 : o < l || a < d ? -1 : a > d ? 1 : e.id < t.id ? -1 : e.id > t.id ? 1 : 0;
|
|
3320
3333
|
}
|
|
3321
3334
|
/* Warning: a reference to ringWindings input will be stored,
|
|
3322
3335
|
* and possibly will be later modified */
|
|
3323
3336
|
constructor(e, t, i, r) {
|
|
3324
|
-
this.id =
|
|
3337
|
+
this.id = ++$r, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = i, this.windings = r;
|
|
3325
3338
|
}
|
|
3326
3339
|
static fromRing(e, t, i) {
|
|
3327
3340
|
let r, o, l;
|
|
3328
|
-
const s =
|
|
3341
|
+
const s = le.comparePoints(e, t);
|
|
3329
3342
|
if (s < 0)
|
|
3330
3343
|
r = e, o = t, l = 1;
|
|
3331
3344
|
else if (s > 0)
|
|
3332
3345
|
r = t, o = e, l = -1;
|
|
3333
3346
|
else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);
|
|
3334
|
-
const c = new
|
|
3335
|
-
return new
|
|
3347
|
+
const c = new le(r, !0), a = new le(o, !1);
|
|
3348
|
+
return new Se(c, a, [i], [l]);
|
|
3336
3349
|
}
|
|
3337
3350
|
/* When a segment is split, the rightSE is replaced with a new sweep event */
|
|
3338
3351
|
replaceRightSE(e) {
|
|
@@ -3402,18 +3415,18 @@ class _e {
|
|
|
3402
3415
|
getIntersection(e) {
|
|
3403
3416
|
const t = this.bbox(), i = e.bbox(), r = Ft(t, i);
|
|
3404
3417
|
if (r === null) return null;
|
|
3405
|
-
const o = this.leftSE.point, l = this.rightSE.point, s = e.leftSE.point, c = e.rightSE.point,
|
|
3406
|
-
if (d &&
|
|
3407
|
-
return f && !
|
|
3418
|
+
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;
|
|
3419
|
+
if (d && a)
|
|
3420
|
+
return f && !u ? l : !f && u ? c : null;
|
|
3408
3421
|
if (d)
|
|
3409
|
-
return
|
|
3410
|
-
if (
|
|
3422
|
+
return u && o.x === c.x && o.y === c.y ? null : o;
|
|
3423
|
+
if (a)
|
|
3411
3424
|
return f && l.x === s.x && l.y === s.y ? null : s;
|
|
3412
|
-
if (f &&
|
|
3425
|
+
if (f && u) return null;
|
|
3413
3426
|
if (f) return l;
|
|
3414
|
-
if (
|
|
3415
|
-
const h =
|
|
3416
|
-
return h === null || !
|
|
3427
|
+
if (u) return c;
|
|
3428
|
+
const h = Jr(o, this.vector(), s, e.vector());
|
|
3429
|
+
return h === null || !Qe(r, h) ? null : Ye.round(h.x, h.y);
|
|
3417
3430
|
}
|
|
3418
3431
|
/**
|
|
3419
3432
|
* Split the given segment into multiple segments on the given points.
|
|
@@ -3428,10 +3441,10 @@ class _e {
|
|
|
3428
3441
|
* Warning: input array of points is modified
|
|
3429
3442
|
*/
|
|
3430
3443
|
split(e) {
|
|
3431
|
-
const t = [], i = e.events !== void 0, r = new
|
|
3444
|
+
const t = [], i = e.events !== void 0, r = new le(e, !0), o = new le(e, !1), l = this.rightSE;
|
|
3432
3445
|
this.replaceRightSE(o), t.push(o), t.push(r);
|
|
3433
|
-
const s = new
|
|
3434
|
-
return
|
|
3446
|
+
const s = new Se(r, l, this.rings.slice(), this.windings.slice());
|
|
3447
|
+
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;
|
|
3435
3448
|
}
|
|
3436
3449
|
/* Swap which event is left and right */
|
|
3437
3450
|
swapEvents() {
|
|
@@ -3446,7 +3459,7 @@ class _e {
|
|
|
3446
3459
|
let t = this, i = e;
|
|
3447
3460
|
for (; t.consumedBy; ) t = t.consumedBy;
|
|
3448
3461
|
for (; i.consumedBy; ) i = i.consumedBy;
|
|
3449
|
-
const r =
|
|
3462
|
+
const r = Se.compare(t, i);
|
|
3450
3463
|
if (r !== 0) {
|
|
3451
3464
|
if (r > 0) {
|
|
3452
3465
|
const o = t;
|
|
@@ -3457,8 +3470,8 @@ class _e {
|
|
|
3457
3470
|
t = i, i = o;
|
|
3458
3471
|
}
|
|
3459
3472
|
for (let o = 0, l = i.rings.length; o < l; o++) {
|
|
3460
|
-
const s = i.rings[o], c = i.windings[o],
|
|
3461
|
-
|
|
3473
|
+
const s = i.rings[o], c = i.windings[o], a = t.rings.indexOf(s);
|
|
3474
|
+
a === -1 ? (t.rings.push(s), t.windings.push(c)) : t.windings[a] += c;
|
|
3462
3475
|
}
|
|
3463
3476
|
i.rings = null, i.windings = null, i.consumedBy = t, i.leftSE.consumedBy = t.leftSE, i.rightSE.consumedBy = t.rightSE;
|
|
3464
3477
|
}
|
|
@@ -3490,24 +3503,24 @@ class _e {
|
|
|
3490
3503
|
};
|
|
3491
3504
|
const t = this._afterState.rings, i = this._afterState.windings, r = this._afterState.multiPolys;
|
|
3492
3505
|
for (let s = 0, c = this.rings.length; s < c; s++) {
|
|
3493
|
-
const
|
|
3494
|
-
|
|
3506
|
+
const a = this.rings[s], d = this.windings[s], u = t.indexOf(a);
|
|
3507
|
+
u === -1 ? (t.push(a), i.push(d)) : i[u] += d;
|
|
3495
3508
|
}
|
|
3496
3509
|
const o = [], l = [];
|
|
3497
3510
|
for (let s = 0, c = t.length; s < c; s++) {
|
|
3498
3511
|
if (i[s] === 0) continue;
|
|
3499
|
-
const
|
|
3512
|
+
const a = t[s], d = a.poly;
|
|
3500
3513
|
if (l.indexOf(d) === -1)
|
|
3501
|
-
if (
|
|
3514
|
+
if (a.isExterior) o.push(d);
|
|
3502
3515
|
else {
|
|
3503
3516
|
l.indexOf(d) === -1 && l.push(d);
|
|
3504
|
-
const
|
|
3505
|
-
|
|
3517
|
+
const u = o.indexOf(a.poly);
|
|
3518
|
+
u !== -1 && o.splice(u, 1);
|
|
3506
3519
|
}
|
|
3507
3520
|
}
|
|
3508
3521
|
for (let s = 0, c = o.length; s < c; s++) {
|
|
3509
|
-
const
|
|
3510
|
-
r.indexOf(
|
|
3522
|
+
const a = o[s].multiPoly;
|
|
3523
|
+
r.indexOf(a) === -1 && r.push(a);
|
|
3511
3524
|
}
|
|
3512
3525
|
return this._afterState;
|
|
3513
3526
|
}
|
|
@@ -3516,7 +3529,7 @@ class _e {
|
|
|
3516
3529
|
if (this.consumedBy) return !1;
|
|
3517
3530
|
if (this._isInResult !== void 0) return this._isInResult;
|
|
3518
3531
|
const e = this.beforeState().multiPolys, t = this.afterState().multiPolys;
|
|
3519
|
-
switch (
|
|
3532
|
+
switch (ue.type) {
|
|
3520
3533
|
case "union": {
|
|
3521
3534
|
const i = e.length === 0, r = t.length === 0;
|
|
3522
3535
|
this._isInResult = i !== r;
|
|
@@ -3524,7 +3537,7 @@ class _e {
|
|
|
3524
3537
|
}
|
|
3525
3538
|
case "intersection": {
|
|
3526
3539
|
let i, r;
|
|
3527
|
-
e.length < t.length ? (i = e.length, r = t.length) : (i = t.length, r = e.length), this._isInResult = r ===
|
|
3540
|
+
e.length < t.length ? (i = e.length, r = t.length) : (i = t.length, r = e.length), this._isInResult = r === ue.numMultiPolys && i < r;
|
|
3528
3541
|
break;
|
|
3529
3542
|
}
|
|
3530
3543
|
case "xor": {
|
|
@@ -3538,18 +3551,18 @@ class _e {
|
|
|
3538
3551
|
break;
|
|
3539
3552
|
}
|
|
3540
3553
|
default:
|
|
3541
|
-
throw new Error(`Unrecognized operation type found ${
|
|
3554
|
+
throw new Error(`Unrecognized operation type found ${ue.type}`);
|
|
3542
3555
|
}
|
|
3543
3556
|
return this._isInResult;
|
|
3544
3557
|
}
|
|
3545
3558
|
}
|
|
3546
|
-
class
|
|
3559
|
+
class Ti {
|
|
3547
3560
|
constructor(e, t, i) {
|
|
3548
3561
|
if (!Array.isArray(e) || e.length === 0)
|
|
3549
3562
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3550
3563
|
if (this.poly = t, this.isExterior = i, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number")
|
|
3551
3564
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3552
|
-
const r =
|
|
3565
|
+
const r = Ye.round(e[0][0], e[0][1]);
|
|
3553
3566
|
this.bbox = {
|
|
3554
3567
|
ll: {
|
|
3555
3568
|
x: r.x,
|
|
@@ -3564,10 +3577,10 @@ class Ni {
|
|
|
3564
3577
|
for (let l = 1, s = e.length; l < s; l++) {
|
|
3565
3578
|
if (typeof e[l][0] != "number" || typeof e[l][1] != "number")
|
|
3566
3579
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3567
|
-
let c =
|
|
3568
|
-
c.x === o.x && c.y === o.y || (this.segments.push(
|
|
3580
|
+
let c = Ye.round(e[l][0], e[l][1]);
|
|
3581
|
+
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);
|
|
3569
3582
|
}
|
|
3570
|
-
(r.x !== o.x || r.y !== o.y) && this.segments.push(
|
|
3583
|
+
(r.x !== o.x || r.y !== o.y) && this.segments.push(Se.fromRing(o, r, this));
|
|
3571
3584
|
}
|
|
3572
3585
|
getSweepEvents() {
|
|
3573
3586
|
const e = [];
|
|
@@ -3578,11 +3591,11 @@ class Ni {
|
|
|
3578
3591
|
return e;
|
|
3579
3592
|
}
|
|
3580
3593
|
}
|
|
3581
|
-
class
|
|
3594
|
+
class eo {
|
|
3582
3595
|
constructor(e, t) {
|
|
3583
3596
|
if (!Array.isArray(e))
|
|
3584
3597
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3585
|
-
this.exteriorRing = new
|
|
3598
|
+
this.exteriorRing = new Ti(e[0], this, !0), this.bbox = {
|
|
3586
3599
|
ll: {
|
|
3587
3600
|
x: this.exteriorRing.bbox.ll.x,
|
|
3588
3601
|
y: this.exteriorRing.bbox.ll.y
|
|
@@ -3593,7 +3606,7 @@ class Kr {
|
|
|
3593
3606
|
}
|
|
3594
3607
|
}, this.interiorRings = [];
|
|
3595
3608
|
for (let i = 1, r = e.length; i < r; i++) {
|
|
3596
|
-
const o = new
|
|
3609
|
+
const o = new Ti(e[i], this, !1);
|
|
3597
3610
|
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);
|
|
3598
3611
|
}
|
|
3599
3612
|
this.multiPoly = t;
|
|
@@ -3608,7 +3621,7 @@ class Kr {
|
|
|
3608
3621
|
return e;
|
|
3609
3622
|
}
|
|
3610
3623
|
}
|
|
3611
|
-
class
|
|
3624
|
+
class Ri {
|
|
3612
3625
|
constructor(e, t) {
|
|
3613
3626
|
if (!Array.isArray(e))
|
|
3614
3627
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
@@ -3627,7 +3640,7 @@ class Pi {
|
|
|
3627
3640
|
}
|
|
3628
3641
|
};
|
|
3629
3642
|
for (let i = 0, r = e.length; i < r; i++) {
|
|
3630
|
-
const o = new
|
|
3643
|
+
const o = new eo(e[i], this);
|
|
3631
3644
|
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);
|
|
3632
3645
|
}
|
|
3633
3646
|
this.isSubject = t;
|
|
@@ -3642,7 +3655,7 @@ class Pi {
|
|
|
3642
3655
|
return e;
|
|
3643
3656
|
}
|
|
3644
3657
|
}
|
|
3645
|
-
class
|
|
3658
|
+
class mt {
|
|
3646
3659
|
/* Given the segments from the sweep line pass, compute & return a series
|
|
3647
3660
|
* of closed rings from all the segments marked to be part of the result */
|
|
3648
3661
|
static factory(e) {
|
|
@@ -3651,38 +3664,38 @@ class ft {
|
|
|
3651
3664
|
const o = e[i];
|
|
3652
3665
|
if (!o.isInResult() || o.ringOut) continue;
|
|
3653
3666
|
let l = null, s = o.leftSE, c = o.rightSE;
|
|
3654
|
-
const
|
|
3655
|
-
for (; l = s, s = c,
|
|
3667
|
+
const a = [s], d = s.point, u = [];
|
|
3668
|
+
for (; l = s, s = c, a.push(s), s.point !== d; )
|
|
3656
3669
|
for (; ; ) {
|
|
3657
3670
|
const f = s.getAvailableLinkedEvents();
|
|
3658
3671
|
if (f.length === 0) {
|
|
3659
|
-
const
|
|
3660
|
-
throw new Error(`Unable to complete output ring starting at [${
|
|
3672
|
+
const g = a[0].point, y = a[a.length - 1].point;
|
|
3673
|
+
throw new Error(`Unable to complete output ring starting at [${g.x}, ${g.y}]. Last matching segment found ends at [${y.x}, ${y.y}].`);
|
|
3661
3674
|
}
|
|
3662
3675
|
if (f.length === 1) {
|
|
3663
3676
|
c = f[0].otherSE;
|
|
3664
3677
|
break;
|
|
3665
3678
|
}
|
|
3666
3679
|
let h = null;
|
|
3667
|
-
for (let
|
|
3668
|
-
if (
|
|
3669
|
-
h =
|
|
3680
|
+
for (let g = 0, y = u.length; g < y; g++)
|
|
3681
|
+
if (u[g].point === s.point) {
|
|
3682
|
+
h = g;
|
|
3670
3683
|
break;
|
|
3671
3684
|
}
|
|
3672
3685
|
if (h !== null) {
|
|
3673
|
-
const
|
|
3674
|
-
|
|
3686
|
+
const g = u.splice(h)[0], y = a.splice(g.index);
|
|
3687
|
+
y.unshift(y[0].otherSE), t.push(new mt(y.reverse()));
|
|
3675
3688
|
continue;
|
|
3676
3689
|
}
|
|
3677
|
-
|
|
3678
|
-
index:
|
|
3690
|
+
u.push({
|
|
3691
|
+
index: a.length,
|
|
3679
3692
|
point: s.point
|
|
3680
3693
|
});
|
|
3681
|
-
const
|
|
3682
|
-
c = f.sort(
|
|
3694
|
+
const b = s.getLeftmostComparator(l);
|
|
3695
|
+
c = f.sort(b)[0].otherSE;
|
|
3683
3696
|
break;
|
|
3684
3697
|
}
|
|
3685
|
-
t.push(new
|
|
3698
|
+
t.push(new mt(a));
|
|
3686
3699
|
}
|
|
3687
3700
|
return t;
|
|
3688
3701
|
}
|
|
@@ -3695,15 +3708,15 @@ class ft {
|
|
|
3695
3708
|
getGeom() {
|
|
3696
3709
|
let e = this.events[0].point;
|
|
3697
3710
|
const t = [e];
|
|
3698
|
-
for (let
|
|
3699
|
-
const
|
|
3700
|
-
|
|
3711
|
+
for (let a = 1, d = this.events.length - 1; a < d; a++) {
|
|
3712
|
+
const u = this.events[a].point, f = this.events[a + 1].point;
|
|
3713
|
+
Ci(u, e, f) !== 0 && (t.push(u), e = u);
|
|
3701
3714
|
}
|
|
3702
3715
|
if (t.length === 1) return null;
|
|
3703
3716
|
const i = t[0], r = t[1];
|
|
3704
|
-
|
|
3717
|
+
Ci(i, e, r) === 0 && t.shift(), t.push(t[0]);
|
|
3705
3718
|
const o = this.isExteriorRing() ? 1 : -1, l = this.isExteriorRing() ? 0 : t.length - 1, s = this.isExteriorRing() ? t.length : -1, c = [];
|
|
3706
|
-
for (let
|
|
3719
|
+
for (let a = l; a != s; a += o) c.push([t[a].x, t[a].y]);
|
|
3707
3720
|
return c;
|
|
3708
3721
|
}
|
|
3709
3722
|
isExteriorRing() {
|
|
@@ -3721,7 +3734,7 @@ class ft {
|
|
|
3721
3734
|
let e = this.events[0];
|
|
3722
3735
|
for (let r = 1, o = this.events.length; r < o; r++) {
|
|
3723
3736
|
const l = this.events[r];
|
|
3724
|
-
|
|
3737
|
+
le.compare(e, l) > 0 && (e = l);
|
|
3725
3738
|
}
|
|
3726
3739
|
let t = e.segment.prevInResult(), i = t ? t.prevInResult() : null;
|
|
3727
3740
|
for (; ; ) {
|
|
@@ -3733,7 +3746,7 @@ class ft {
|
|
|
3733
3746
|
}
|
|
3734
3747
|
}
|
|
3735
3748
|
}
|
|
3736
|
-
class
|
|
3749
|
+
class Ii {
|
|
3737
3750
|
constructor(e) {
|
|
3738
3751
|
this.exteriorRing = e, e.poly = this, this.interiorRings = [];
|
|
3739
3752
|
}
|
|
@@ -3750,7 +3763,7 @@ class Ti {
|
|
|
3750
3763
|
return e;
|
|
3751
3764
|
}
|
|
3752
3765
|
}
|
|
3753
|
-
class
|
|
3766
|
+
class to {
|
|
3754
3767
|
constructor(e) {
|
|
3755
3768
|
this.rings = e, this.polys = this._composePolys(e);
|
|
3756
3769
|
}
|
|
@@ -3767,19 +3780,19 @@ class Jr {
|
|
|
3767
3780
|
for (let i = 0, r = e.length; i < r; i++) {
|
|
3768
3781
|
const o = e[i];
|
|
3769
3782
|
if (!o.poly)
|
|
3770
|
-
if (o.isExteriorRing()) t.push(new
|
|
3783
|
+
if (o.isExteriorRing()) t.push(new Ii(o));
|
|
3771
3784
|
else {
|
|
3772
3785
|
const l = o.enclosingRing();
|
|
3773
|
-
l.poly || t.push(new
|
|
3786
|
+
l.poly || t.push(new Ii(l)), l.poly.addInterior(o);
|
|
3774
3787
|
}
|
|
3775
3788
|
}
|
|
3776
3789
|
return t;
|
|
3777
3790
|
}
|
|
3778
3791
|
}
|
|
3779
|
-
class
|
|
3792
|
+
class io {
|
|
3780
3793
|
constructor(e) {
|
|
3781
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
3782
|
-
this.queue = e, this.tree = new
|
|
3794
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Se.compare;
|
|
3795
|
+
this.queue = e, this.tree = new jt(t), this.segments = [];
|
|
3783
3796
|
}
|
|
3784
3797
|
process(e) {
|
|
3785
3798
|
const t = e.segment, i = [];
|
|
@@ -3793,45 +3806,45 @@ class $r {
|
|
|
3793
3806
|
for (; c === void 0; )
|
|
3794
3807
|
l = this.tree.next(l), l === null ? c = null : l.key.consumedBy === void 0 && (c = l.key);
|
|
3795
3808
|
if (e.isLeft) {
|
|
3796
|
-
let
|
|
3809
|
+
let a = null;
|
|
3797
3810
|
if (s) {
|
|
3798
|
-
const
|
|
3799
|
-
if (
|
|
3800
|
-
const f = this._splitSafely(s,
|
|
3801
|
-
for (let h = 0,
|
|
3811
|
+
const u = s.getIntersection(t);
|
|
3812
|
+
if (u !== null && (t.isAnEndpoint(u) || (a = u), !s.isAnEndpoint(u))) {
|
|
3813
|
+
const f = this._splitSafely(s, u);
|
|
3814
|
+
for (let h = 0, b = f.length; h < b; h++)
|
|
3802
3815
|
i.push(f[h]);
|
|
3803
3816
|
}
|
|
3804
3817
|
}
|
|
3805
3818
|
let d = null;
|
|
3806
3819
|
if (c) {
|
|
3807
|
-
const
|
|
3808
|
-
if (
|
|
3809
|
-
const f = this._splitSafely(c,
|
|
3810
|
-
for (let h = 0,
|
|
3820
|
+
const u = c.getIntersection(t);
|
|
3821
|
+
if (u !== null && (t.isAnEndpoint(u) || (d = u), !c.isAnEndpoint(u))) {
|
|
3822
|
+
const f = this._splitSafely(c, u);
|
|
3823
|
+
for (let h = 0, b = f.length; h < b; h++)
|
|
3811
3824
|
i.push(f[h]);
|
|
3812
3825
|
}
|
|
3813
3826
|
}
|
|
3814
|
-
if (
|
|
3815
|
-
let
|
|
3816
|
-
|
|
3817
|
-
const f = t.split(
|
|
3818
|
-
for (let h = 0,
|
|
3827
|
+
if (a !== null || d !== null) {
|
|
3828
|
+
let u = null;
|
|
3829
|
+
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);
|
|
3830
|
+
const f = t.split(u);
|
|
3831
|
+
for (let h = 0, b = f.length; h < b; h++)
|
|
3819
3832
|
i.push(f[h]);
|
|
3820
3833
|
}
|
|
3821
3834
|
i.length > 0 ? (this.tree.remove(t), i.push(e)) : (this.segments.push(t), t.prev = s);
|
|
3822
3835
|
} else {
|
|
3823
3836
|
if (s && c) {
|
|
3824
|
-
const
|
|
3825
|
-
if (
|
|
3826
|
-
if (!s.isAnEndpoint(
|
|
3827
|
-
const d = this._splitSafely(s,
|
|
3828
|
-
for (let
|
|
3829
|
-
i.push(d[
|
|
3837
|
+
const a = s.getIntersection(c);
|
|
3838
|
+
if (a !== null) {
|
|
3839
|
+
if (!s.isAnEndpoint(a)) {
|
|
3840
|
+
const d = this._splitSafely(s, a);
|
|
3841
|
+
for (let u = 0, f = d.length; u < f; u++)
|
|
3842
|
+
i.push(d[u]);
|
|
3830
3843
|
}
|
|
3831
|
-
if (!c.isAnEndpoint(
|
|
3832
|
-
const d = this._splitSafely(c,
|
|
3833
|
-
for (let
|
|
3834
|
-
i.push(d[
|
|
3844
|
+
if (!c.isAnEndpoint(a)) {
|
|
3845
|
+
const d = this._splitSafely(c, a);
|
|
3846
|
+
for (let u = 0, f = d.length; u < f; u++)
|
|
3847
|
+
i.push(d[u]);
|
|
3835
3848
|
}
|
|
3836
3849
|
}
|
|
3837
3850
|
}
|
|
@@ -3849,112 +3862,112 @@ class $r {
|
|
|
3849
3862
|
return r.push(i), e.consumedBy === void 0 && this.tree.add(e), r;
|
|
3850
3863
|
}
|
|
3851
3864
|
}
|
|
3852
|
-
const
|
|
3853
|
-
class
|
|
3865
|
+
const Oi = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, no = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
|
|
3866
|
+
class ro {
|
|
3854
3867
|
run(e, t, i) {
|
|
3855
|
-
|
|
3856
|
-
const r = [new
|
|
3857
|
-
for (let
|
|
3858
|
-
r.push(new
|
|
3859
|
-
if (
|
|
3860
|
-
const
|
|
3868
|
+
ue.type = e, Ye.reset();
|
|
3869
|
+
const r = [new Ri(t, !0)];
|
|
3870
|
+
for (let u = 0, f = i.length; u < f; u++)
|
|
3871
|
+
r.push(new Ri(i[u], !1));
|
|
3872
|
+
if (ue.numMultiPolys = r.length, ue.type === "difference") {
|
|
3873
|
+
const u = r[0];
|
|
3861
3874
|
let f = 1;
|
|
3862
3875
|
for (; f < r.length; )
|
|
3863
|
-
Ft(r[f].bbox,
|
|
3876
|
+
Ft(r[f].bbox, u.bbox) !== null ? f++ : r.splice(f, 1);
|
|
3864
3877
|
}
|
|
3865
|
-
if (
|
|
3866
|
-
for (let
|
|
3867
|
-
const h = r[
|
|
3868
|
-
for (let
|
|
3869
|
-
if (Ft(h.bbox, r[
|
|
3878
|
+
if (ue.type === "intersection")
|
|
3879
|
+
for (let u = 0, f = r.length; u < f; u++) {
|
|
3880
|
+
const h = r[u];
|
|
3881
|
+
for (let b = u + 1, g = r.length; b < g; b++)
|
|
3882
|
+
if (Ft(h.bbox, r[b].bbox) === null) return [];
|
|
3870
3883
|
}
|
|
3871
|
-
const o = new
|
|
3872
|
-
for (let
|
|
3873
|
-
const h = r[
|
|
3874
|
-
for (let
|
|
3875
|
-
if (o.insert(h[
|
|
3884
|
+
const o = new jt(le.compare);
|
|
3885
|
+
for (let u = 0, f = r.length; u < f; u++) {
|
|
3886
|
+
const h = r[u].getSweepEvents();
|
|
3887
|
+
for (let b = 0, g = h.length; b < g; b++)
|
|
3888
|
+
if (o.insert(h[b]), o.size > Oi)
|
|
3876
3889
|
throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
|
|
3877
3890
|
}
|
|
3878
|
-
const l = new
|
|
3891
|
+
const l = new io(o);
|
|
3879
3892
|
let s = o.size, c = o.pop();
|
|
3880
3893
|
for (; c; ) {
|
|
3881
|
-
const
|
|
3894
|
+
const u = c.key;
|
|
3882
3895
|
if (o.size === s) {
|
|
3883
|
-
const h =
|
|
3884
|
-
throw new Error(`Unable to pop() ${
|
|
3896
|
+
const h = u.segment;
|
|
3897
|
+
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.`);
|
|
3885
3898
|
}
|
|
3886
|
-
if (o.size >
|
|
3899
|
+
if (o.size > Oi)
|
|
3887
3900
|
throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");
|
|
3888
|
-
if (l.segments.length >
|
|
3901
|
+
if (l.segments.length > no)
|
|
3889
3902
|
throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
|
|
3890
|
-
const f = l.process(
|
|
3891
|
-
for (let h = 0,
|
|
3892
|
-
const
|
|
3893
|
-
|
|
3903
|
+
const f = l.process(u);
|
|
3904
|
+
for (let h = 0, b = f.length; h < b; h++) {
|
|
3905
|
+
const g = f[h];
|
|
3906
|
+
g.consumedBy === void 0 && o.insert(g);
|
|
3894
3907
|
}
|
|
3895
3908
|
s = o.size, c = o.pop();
|
|
3896
3909
|
}
|
|
3897
|
-
|
|
3898
|
-
const
|
|
3899
|
-
return new
|
|
3910
|
+
Ye.reset();
|
|
3911
|
+
const a = mt.factory(l.segments);
|
|
3912
|
+
return new to(a).getGeom();
|
|
3900
3913
|
}
|
|
3901
3914
|
}
|
|
3902
|
-
const
|
|
3915
|
+
const ue = new ro(), oo = function(n) {
|
|
3903
3916
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3904
3917
|
t[i - 1] = arguments[i];
|
|
3905
|
-
return
|
|
3906
|
-
},
|
|
3918
|
+
return ue.run("union", n, t);
|
|
3919
|
+
}, so = function(n) {
|
|
3907
3920
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3908
3921
|
t[i - 1] = arguments[i];
|
|
3909
|
-
return
|
|
3910
|
-
},
|
|
3922
|
+
return ue.run("intersection", n, t);
|
|
3923
|
+
}, lo = function(n) {
|
|
3911
3924
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3912
3925
|
t[i - 1] = arguments[i];
|
|
3913
|
-
return
|
|
3914
|
-
},
|
|
3926
|
+
return ue.run("xor", n, t);
|
|
3927
|
+
}, uo = function(n) {
|
|
3915
3928
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)
|
|
3916
3929
|
t[i - 1] = arguments[i];
|
|
3917
|
-
return
|
|
3930
|
+
return ue.run("difference", n, t);
|
|
3918
3931
|
};
|
|
3919
3932
|
var Zi = {
|
|
3920
|
-
union:
|
|
3921
|
-
intersection:
|
|
3922
|
-
xor:
|
|
3923
|
-
difference:
|
|
3933
|
+
union: oo,
|
|
3934
|
+
intersection: so,
|
|
3935
|
+
xor: lo,
|
|
3936
|
+
difference: uo
|
|
3924
3937
|
};
|
|
3925
|
-
function
|
|
3938
|
+
function ao(n) {
|
|
3926
3939
|
const e = [];
|
|
3927
|
-
if (
|
|
3940
|
+
if (Gt(n, (r) => {
|
|
3928
3941
|
e.push(r.coordinates);
|
|
3929
3942
|
}), e.length < 2)
|
|
3930
3943
|
throw new Error("Must have at least two features");
|
|
3931
3944
|
const t = n.features[0].properties || {}, i = Zi.difference(e[0], ...e.slice(1));
|
|
3932
|
-
return i.length === 0 ? null : i.length === 1 ?
|
|
3945
|
+
return i.length === 0 ? null : i.length === 1 ? Ut(i[0], t) : qi(i, t);
|
|
3933
3946
|
}
|
|
3934
|
-
var
|
|
3935
|
-
function
|
|
3947
|
+
var co = ao;
|
|
3948
|
+
function fo(n) {
|
|
3936
3949
|
if (!n)
|
|
3937
3950
|
throw new Error("geojson is required");
|
|
3938
3951
|
var e = [];
|
|
3939
|
-
return
|
|
3952
|
+
return Ir(n, function(t) {
|
|
3940
3953
|
e.push(t);
|
|
3941
|
-
}),
|
|
3954
|
+
}), Ot(e);
|
|
3942
3955
|
}
|
|
3943
|
-
var
|
|
3944
|
-
function
|
|
3956
|
+
var ho = fo;
|
|
3957
|
+
function mo(n, e = {}) {
|
|
3945
3958
|
const t = [];
|
|
3946
|
-
if (
|
|
3959
|
+
if (Gt(n, (r) => {
|
|
3947
3960
|
t.push(r.coordinates);
|
|
3948
3961
|
}), t.length < 2)
|
|
3949
3962
|
throw new Error("Must have at least 2 geometries");
|
|
3950
3963
|
const i = Zi.union(t[0], ...t.slice(1));
|
|
3951
|
-
return i.length === 0 ? null : i.length === 1 ?
|
|
3964
|
+
return i.length === 0 ? null : i.length === 1 ? Ut(i[0], e.properties) : qi(i, e.properties);
|
|
3952
3965
|
}
|
|
3953
|
-
var
|
|
3954
|
-
function
|
|
3955
|
-
const t =
|
|
3956
|
-
|
|
3957
|
-
|
|
3966
|
+
var go = mo;
|
|
3967
|
+
function Wi(n, e) {
|
|
3968
|
+
const t = co(
|
|
3969
|
+
Ot([
|
|
3970
|
+
Ut([
|
|
3958
3971
|
[
|
|
3959
3972
|
[180, 90],
|
|
3960
3973
|
[-180, 90],
|
|
@@ -3969,50 +3982,50 @@ function Ii(n, e) {
|
|
|
3969
3982
|
if (!t)
|
|
3970
3983
|
return;
|
|
3971
3984
|
t.properties = { isMask: !0 };
|
|
3972
|
-
const i =
|
|
3985
|
+
const i = ft(_i(n)), r = (i[2] - i[0]) / 360 / 1e3, o = i[0] < -180, l = i[2] > 180, s = ho(n);
|
|
3973
3986
|
if (s.features.length > 1 && (o || l))
|
|
3974
3987
|
for (const c of s.features) {
|
|
3975
|
-
const
|
|
3976
|
-
if (l &&
|
|
3988
|
+
const a = ft(_i(c));
|
|
3989
|
+
if (l && a[0] < -180 + r)
|
|
3977
3990
|
for (const d of c.geometry.coordinates)
|
|
3978
|
-
for (const
|
|
3979
|
-
|
|
3980
|
-
if (o &&
|
|
3991
|
+
for (const u of d)
|
|
3992
|
+
u[0] += 360 - r;
|
|
3993
|
+
if (o && a[2] > 180 - r)
|
|
3981
3994
|
for (const d of c.geometry.coordinates)
|
|
3982
|
-
for (const
|
|
3983
|
-
|
|
3995
|
+
for (const u of d)
|
|
3996
|
+
u[0] -= 360 - r;
|
|
3984
3997
|
}
|
|
3985
3998
|
e(
|
|
3986
|
-
|
|
3987
|
-
s.features.length < 2 ? n :
|
|
3999
|
+
Ot([
|
|
4000
|
+
s.features.length < 2 ? n : go(s) ?? n,
|
|
3988
4001
|
t
|
|
3989
4002
|
])
|
|
3990
4003
|
);
|
|
3991
4004
|
}
|
|
3992
|
-
const
|
|
3993
|
-
function
|
|
4005
|
+
const Ai = "EPSG:4326";
|
|
4006
|
+
function yo(n) {
|
|
3994
4007
|
var o;
|
|
3995
4008
|
const e = n.getProperties(), { isMask: t } = e, i = (o = n.getGeometry()) == null ? void 0 : o.getType(), r = t ? 0 : i === "LineString" || i === "MultiLineString" ? 3 : 2;
|
|
3996
|
-
return new
|
|
3997
|
-
stroke: t ? void 0 : new
|
|
4009
|
+
return new Mn({
|
|
4010
|
+
stroke: t ? void 0 : new ii({
|
|
3998
4011
|
color: "#3170fe",
|
|
3999
4012
|
lineDash: [r, r],
|
|
4000
4013
|
width: r,
|
|
4001
4014
|
lineCap: "butt"
|
|
4002
4015
|
}),
|
|
4003
|
-
fill: t ? new
|
|
4016
|
+
fill: t ? new ti({
|
|
4004
4017
|
color: "#00000020"
|
|
4005
4018
|
}) : void 0,
|
|
4006
|
-
image: new
|
|
4019
|
+
image: new xn({
|
|
4007
4020
|
src: `/icons/marker_${e.isReverse ? "reverse" : e.isSelected ? "selected" : "unselected"}.svg`,
|
|
4008
4021
|
anchor: [0.5, 1]
|
|
4009
4022
|
}),
|
|
4010
4023
|
zIndex: e.isSelected ? 2 : e.isReverse ? 0 : 1,
|
|
4011
|
-
text: e.isSelected && e.tooltip ? new
|
|
4012
|
-
backgroundFill: new
|
|
4024
|
+
text: e.isSelected && e.tooltip ? new kn({
|
|
4025
|
+
backgroundFill: new ti({ color: "white" }),
|
|
4013
4026
|
text: e.tooltip,
|
|
4014
4027
|
offsetY: -40,
|
|
4015
|
-
backgroundStroke: new
|
|
4028
|
+
backgroundStroke: new ii({
|
|
4016
4029
|
color: "white",
|
|
4017
4030
|
lineJoin: "round",
|
|
4018
4031
|
width: 3
|
|
@@ -4021,160 +4034,162 @@ function ho(n) {
|
|
|
4021
4034
|
}) : void 0
|
|
4022
4035
|
});
|
|
4023
4036
|
}
|
|
4024
|
-
function
|
|
4025
|
-
let
|
|
4026
|
-
const
|
|
4037
|
+
function po(n, e = {}, t = {}, i = yo, r = !1) {
|
|
4038
|
+
let o = -1, l, s, c, a = !1;
|
|
4039
|
+
const d = new _n({
|
|
4027
4040
|
updateWhileAnimating: !0
|
|
4028
4041
|
});
|
|
4029
|
-
n.addLayer(
|
|
4030
|
-
const
|
|
4031
|
-
|
|
4032
|
-
n.forEachFeatureAtPixel(
|
|
4033
|
-
const
|
|
4034
|
-
if (
|
|
4035
|
-
return
|
|
4042
|
+
n.addLayer(d);
|
|
4043
|
+
const u = new Sn({});
|
|
4044
|
+
d.setSource(u), d.setStyle(i), n.on("click", (g) => {
|
|
4045
|
+
n.forEachFeatureAtPixel(g.pixel, (y) => {
|
|
4046
|
+
const p = y.getId();
|
|
4047
|
+
if (p)
|
|
4048
|
+
return g.stopPropagation(), s == null || s({ type: "markerClick", id: p }), y;
|
|
4036
4049
|
});
|
|
4037
|
-
}), n.on("pointermove", (
|
|
4038
|
-
const y = n.forEachFeatureAtPixel(
|
|
4039
|
-
|
|
4050
|
+
}), n.on("pointermove", (g) => {
|
|
4051
|
+
const y = n.forEachFeatureAtPixel(g.pixel, (p) => p.getId());
|
|
4052
|
+
l !== y && (l && (s == null || s({
|
|
4040
4053
|
type: "markerMouseLeave",
|
|
4041
|
-
id:
|
|
4042
|
-
})), y && (
|
|
4054
|
+
id: l
|
|
4055
|
+
})), y && (s == null || s({
|
|
4043
4056
|
type: "markerMouseEnter",
|
|
4044
4057
|
id: y
|
|
4045
|
-
})), n.getTargetElement().style.cursor = y ? "pointer" :
|
|
4058
|
+
})), n.getTargetElement().style.cursor = y ? "pointer" : a ? "crosshair" : "", l = y);
|
|
4046
4059
|
});
|
|
4047
|
-
function
|
|
4048
|
-
return
|
|
4060
|
+
function f() {
|
|
4061
|
+
return En() ?? n.getView().getProjection();
|
|
4049
4062
|
}
|
|
4050
|
-
function
|
|
4051
|
-
return
|
|
4063
|
+
function h(g) {
|
|
4064
|
+
return g.transform(Ai, f());
|
|
4052
4065
|
}
|
|
4053
|
-
const
|
|
4054
|
-
|
|
4066
|
+
const b = (g) => {
|
|
4067
|
+
s == null || s({
|
|
4055
4068
|
type: "mapClick",
|
|
4056
|
-
coordinates:
|
|
4069
|
+
coordinates: ei(g.coordinate, f())
|
|
4057
4070
|
});
|
|
4058
4071
|
};
|
|
4059
4072
|
return {
|
|
4060
|
-
setEventHandler(
|
|
4061
|
-
|
|
4073
|
+
setEventHandler(g) {
|
|
4074
|
+
g ? (s = g, n.on("click", b)) : (s = void 0, n.un("click", b));
|
|
4062
4075
|
},
|
|
4063
|
-
flyTo(
|
|
4076
|
+
flyTo(g, y) {
|
|
4064
4077
|
n.getView().animate({
|
|
4065
|
-
center:
|
|
4078
|
+
center: ot(g, f()),
|
|
4066
4079
|
...y ? { zoom: y } : {},
|
|
4067
4080
|
duration: 2e3,
|
|
4068
4081
|
...e
|
|
4069
4082
|
});
|
|
4070
4083
|
},
|
|
4071
|
-
fitBounds(
|
|
4072
|
-
n.getView().fit(
|
|
4084
|
+
fitBounds(g, y, p) {
|
|
4085
|
+
n.getView().fit(Ln(g, Ai, f()), {
|
|
4073
4086
|
padding: [y, y, y, y],
|
|
4074
|
-
...
|
|
4087
|
+
...p ? { maxZoom: p } : {},
|
|
4075
4088
|
duration: 2e3,
|
|
4076
4089
|
...t
|
|
4077
4090
|
});
|
|
4078
4091
|
},
|
|
4079
|
-
indicateReverse(
|
|
4080
|
-
|
|
4092
|
+
indicateReverse(g) {
|
|
4093
|
+
a = g, n.getTargetElement().style.cursor = g ? "crosshair" : "";
|
|
4081
4094
|
},
|
|
4082
|
-
setReverseMarker(
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
) : (
|
|
4086
|
-
new
|
|
4087
|
-
),
|
|
4095
|
+
setReverseMarker(g) {
|
|
4096
|
+
c ? g ? c.getGeometry().setCoordinates(
|
|
4097
|
+
ot(g, f())
|
|
4098
|
+
) : (u.removeFeature(c), c.dispose(), c = void 0) : g && (c = new fe(
|
|
4099
|
+
new kt(ot(g, f()))
|
|
4100
|
+
), c.setProperties({ isReverse: !0 }), u.addFeature(c));
|
|
4088
4101
|
},
|
|
4089
|
-
setMarkers(
|
|
4090
|
-
function
|
|
4091
|
-
var
|
|
4092
|
-
if (
|
|
4093
|
-
for (const
|
|
4094
|
-
const
|
|
4095
|
-
|
|
4102
|
+
setMarkers(g, y) {
|
|
4103
|
+
function p(E) {
|
|
4104
|
+
var S;
|
|
4105
|
+
if (E)
|
|
4106
|
+
for (const w of E.features) {
|
|
4107
|
+
const k = w.geometry.type === "Polygon" ? new Xt(w.geometry.coordinates) : w.geometry.type === "MultiPolygon" ? new Kt(w.geometry.coordinates) : null;
|
|
4108
|
+
k && u.addFeature(
|
|
4096
4109
|
new fe({
|
|
4097
|
-
isMask: !!((
|
|
4098
|
-
geometry:
|
|
4110
|
+
isMask: !!((S = w.properties) != null && S.isMask),
|
|
4111
|
+
geometry: h(k)
|
|
4099
4112
|
})
|
|
4100
4113
|
);
|
|
4101
4114
|
}
|
|
4102
4115
|
}
|
|
4103
|
-
if (
|
|
4104
|
-
let
|
|
4116
|
+
if (u.clear(), c && u.addFeature(c), y) {
|
|
4117
|
+
let E = !1;
|
|
4105
4118
|
if (y.geometry.type === "GeometryCollection") {
|
|
4106
|
-
const
|
|
4107
|
-
(
|
|
4108
|
-
).filter((
|
|
4109
|
-
if (
|
|
4110
|
-
|
|
4111
|
-
new fe(
|
|
4112
|
-
),
|
|
4119
|
+
const S = y.geometry.geometries.map(
|
|
4120
|
+
(w) => w.type === "Polygon" ? new Xt(w.coordinates) : w.type === "MultiPolygon" ? new Kt(w.coordinates) : null
|
|
4121
|
+
).filter((w) => !!w);
|
|
4122
|
+
if (S.length > 0)
|
|
4123
|
+
u.addFeature(
|
|
4124
|
+
new fe(h(new wn(S)))
|
|
4125
|
+
), E = !0;
|
|
4113
4126
|
else
|
|
4114
|
-
for (const
|
|
4115
|
-
|
|
4127
|
+
for (const w of y.geometry.geometries)
|
|
4128
|
+
w.type === "LineString" ? (u.addFeature(
|
|
4116
4129
|
new fe(
|
|
4117
|
-
|
|
4130
|
+
h(new Jt(w.coordinates))
|
|
4118
4131
|
)
|
|
4119
|
-
),
|
|
4132
|
+
), E = !0) : w.type === "MultiLineString" && u.addFeature(
|
|
4120
4133
|
new fe(
|
|
4121
|
-
|
|
4134
|
+
h(new $t(w.coordinates))
|
|
4122
4135
|
)
|
|
4123
|
-
),
|
|
4136
|
+
), E = !0;
|
|
4124
4137
|
}
|
|
4125
|
-
if (!
|
|
4138
|
+
if (!E) {
|
|
4126
4139
|
if (y.geometry.type === "Polygon")
|
|
4127
|
-
|
|
4140
|
+
Wi(y, p);
|
|
4128
4141
|
else if (y.geometry.type === "MultiPolygon")
|
|
4129
|
-
|
|
4142
|
+
Wi(y, p);
|
|
4130
4143
|
else if (y.geometry.type === "LineString") {
|
|
4131
|
-
|
|
4144
|
+
u.addFeature(
|
|
4132
4145
|
new fe(
|
|
4133
|
-
|
|
4146
|
+
h(new Jt(y.geometry.coordinates))
|
|
4134
4147
|
)
|
|
4135
4148
|
);
|
|
4136
4149
|
return;
|
|
4137
4150
|
} else if (y.geometry.type === "MultiLineString") {
|
|
4138
|
-
|
|
4151
|
+
u.addFeature(
|
|
4139
4152
|
new fe(
|
|
4140
|
-
|
|
4153
|
+
h(new $t(y.geometry.coordinates))
|
|
4141
4154
|
)
|
|
4142
4155
|
);
|
|
4143
4156
|
return;
|
|
4144
4157
|
}
|
|
4145
4158
|
}
|
|
4146
|
-
|
|
4159
|
+
if (!r && y.geometry.type !== "Point")
|
|
4160
|
+
return;
|
|
4161
|
+
u.addFeature(new fe(h(new kt(y.center))));
|
|
4147
4162
|
}
|
|
4148
|
-
for (const
|
|
4149
|
-
if (
|
|
4163
|
+
for (const E of g ?? []) {
|
|
4164
|
+
if (E === y)
|
|
4150
4165
|
continue;
|
|
4151
|
-
const
|
|
4152
|
-
new
|
|
4166
|
+
const S = new fe(
|
|
4167
|
+
new kt(ot(E.center, f()))
|
|
4153
4168
|
);
|
|
4154
|
-
|
|
4155
|
-
fuzzy: !!
|
|
4156
|
-
tooltip:
|
|
4157
|
-
}),
|
|
4169
|
+
S.setId(E.id), S.setProperties({
|
|
4170
|
+
fuzzy: !!E.matching_text,
|
|
4171
|
+
tooltip: E.place_type[0] === "reverse" ? E.place_name : E.place_name.replace(/,.*/, "")
|
|
4172
|
+
}), u.addFeature(S);
|
|
4158
4173
|
}
|
|
4159
4174
|
},
|
|
4160
|
-
setSelectedMarker(
|
|
4161
|
-
var
|
|
4162
|
-
const y =
|
|
4163
|
-
|
|
4175
|
+
setSelectedMarker(g) {
|
|
4176
|
+
var E, S, w;
|
|
4177
|
+
const y = u.getFeatures(), p = (E = y[0]) != null && E.getProperties().isReverse ? 1 : 0;
|
|
4178
|
+
o > -1 && ((S = y[o + p]) == null || S.setProperties({
|
|
4164
4179
|
isSelected: !1
|
|
4165
|
-
})),
|
|
4180
|
+
})), g > -1 && ((w = y[g + p]) == null || w.setProperties({
|
|
4166
4181
|
isSelected: !0
|
|
4167
|
-
})),
|
|
4182
|
+
})), o = g;
|
|
4168
4183
|
},
|
|
4169
4184
|
getCenterAndZoom() {
|
|
4170
|
-
const
|
|
4171
|
-
if (!(!y ||
|
|
4172
|
-
return [
|
|
4185
|
+
const g = n.getView(), y = g.getCenter(), p = g.getZoom();
|
|
4186
|
+
if (!(!y || p === void 0))
|
|
4187
|
+
return [p, ...ei(y, f())];
|
|
4173
4188
|
}
|
|
4174
4189
|
};
|
|
4175
4190
|
}
|
|
4176
|
-
var
|
|
4177
|
-
class
|
|
4191
|
+
var H, _e;
|
|
4192
|
+
class Do extends bn {
|
|
4178
4193
|
constructor(t) {
|
|
4179
4194
|
const i = document.createElement("div");
|
|
4180
4195
|
i.className = "ol-search";
|
|
@@ -4182,70 +4197,36 @@ class Fo extends yn {
|
|
|
4182
4197
|
element: i,
|
|
4183
4198
|
target: t.target
|
|
4184
4199
|
});
|
|
4185
|
-
|
|
4186
|
-
|
|
4200
|
+
Mt(this, H);
|
|
4201
|
+
Mt(this, _e);
|
|
4187
4202
|
const { flyTo: r, fullGeometryStyle: o, ...l } = t;
|
|
4188
|
-
|
|
4203
|
+
rt(this, H, new Rr({
|
|
4189
4204
|
target: i,
|
|
4190
4205
|
props: {
|
|
4191
4206
|
flyTo: r === void 0 ? !0 : !!r,
|
|
4192
4207
|
...l
|
|
4193
4208
|
}
|
|
4194
|
-
}))
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
);
|
|
4216
|
-
break;
|
|
4217
|
-
case "featuresMarked":
|
|
4218
|
-
this.dispatchEvent(
|
|
4219
|
-
new vo(c.detail)
|
|
4220
|
-
);
|
|
4221
|
-
break;
|
|
4222
|
-
case "optionsVisibilityChange":
|
|
4223
|
-
this.dispatchEvent(
|
|
4224
|
-
new po(c.detail)
|
|
4225
|
-
);
|
|
4226
|
-
break;
|
|
4227
|
-
case "pick":
|
|
4228
|
-
this.dispatchEvent(
|
|
4229
|
-
new bo(c.detail)
|
|
4230
|
-
);
|
|
4231
|
-
break;
|
|
4232
|
-
case "queryChange":
|
|
4233
|
-
this.dispatchEvent(new wo(c.detail));
|
|
4234
|
-
break;
|
|
4235
|
-
case "response":
|
|
4236
|
-
this.dispatchEvent(
|
|
4237
|
-
new _o(
|
|
4238
|
-
c.detail.url,
|
|
4239
|
-
c.detail.featureCollection
|
|
4240
|
-
)
|
|
4241
|
-
);
|
|
4242
|
-
break;
|
|
4243
|
-
case "reverseToggle":
|
|
4244
|
-
this.dispatchEvent(new Eo(c.detail));
|
|
4245
|
-
break;
|
|
4246
|
-
}
|
|
4247
|
-
});
|
|
4248
|
-
tt(this, Ne, t);
|
|
4209
|
+
})), Z(this, H).$on("select", (s) => {
|
|
4210
|
+
this.dispatchEvent(new vo(s.detail.feature));
|
|
4211
|
+
}), Z(this, H).$on("pick", (s) => {
|
|
4212
|
+
this.dispatchEvent(new Eo(s.detail.feature));
|
|
4213
|
+
}), Z(this, H).$on("featureslisted", (s) => {
|
|
4214
|
+
this.dispatchEvent(new bo(s.detail.features));
|
|
4215
|
+
}), Z(this, H).$on("featuresmarked", (s) => {
|
|
4216
|
+
this.dispatchEvent(new wo(s.detail.features));
|
|
4217
|
+
}), Z(this, H).$on("response", (s) => {
|
|
4218
|
+
this.dispatchEvent(
|
|
4219
|
+
new So(s.detail.url, s.detail.featureCollection)
|
|
4220
|
+
);
|
|
4221
|
+
}), Z(this, H).$on("optionsvisibilitychange", (s) => {
|
|
4222
|
+
this.dispatchEvent(
|
|
4223
|
+
new _o(s.detail.optionsVisible)
|
|
4224
|
+
);
|
|
4225
|
+
}), Z(this, H).$on("reversetoggle", (s) => {
|
|
4226
|
+
this.dispatchEvent(new xo(s.detail.reverse));
|
|
4227
|
+
}), Z(this, H).$on("querychange", (s) => {
|
|
4228
|
+
this.dispatchEvent(new Lo(s.detail.query));
|
|
4229
|
+
}), rt(this, _e, t);
|
|
4249
4230
|
}
|
|
4250
4231
|
setMap(t) {
|
|
4251
4232
|
var i;
|
|
@@ -4255,118 +4236,119 @@ class Fo extends yn {
|
|
|
4255
4236
|
// showResultMarkers,
|
|
4256
4237
|
flyTo: r,
|
|
4257
4238
|
fullGeometryStyle: o
|
|
4258
|
-
} =
|
|
4239
|
+
} = Z(this, _e), l = po(
|
|
4259
4240
|
t,
|
|
4260
4241
|
typeof r == "boolean" ? void 0 : r,
|
|
4261
4242
|
typeof r == "boolean" ? void 0 : r,
|
|
4262
4243
|
// marker,
|
|
4263
4244
|
// showResultMarkers,
|
|
4264
|
-
o
|
|
4245
|
+
o,
|
|
4246
|
+
Z(this, _e).pickedResultStyle === "full-geometry-including-polygon-center-marker"
|
|
4265
4247
|
);
|
|
4266
|
-
(i =
|
|
4248
|
+
(i = Z(this, H)) == null || i.$set({ mapController: l });
|
|
4267
4249
|
}
|
|
4268
4250
|
}
|
|
4269
4251
|
setOptions(t) {
|
|
4270
4252
|
var l;
|
|
4271
|
-
|
|
4272
|
-
const { flyTo: i, fullGeometryStyle: r, ...o } =
|
|
4273
|
-
(l =
|
|
4253
|
+
rt(this, _e, t);
|
|
4254
|
+
const { flyTo: i, fullGeometryStyle: r, ...o } = Z(this, _e);
|
|
4255
|
+
(l = Z(this, H)) == null || l.$set({
|
|
4274
4256
|
...o,
|
|
4275
4257
|
flyTo: i === void 0 ? !0 : !!i
|
|
4276
4258
|
});
|
|
4277
4259
|
}
|
|
4278
4260
|
setQuery(t, i = !0) {
|
|
4279
4261
|
var r;
|
|
4280
|
-
(r =
|
|
4262
|
+
(r = Z(this, H)) == null || r.setQuery(t, i);
|
|
4281
4263
|
}
|
|
4282
4264
|
clearMap() {
|
|
4283
4265
|
var t;
|
|
4284
|
-
(t =
|
|
4266
|
+
(t = Z(this, H)) == null || t.clearMap();
|
|
4285
4267
|
}
|
|
4286
4268
|
clearList() {
|
|
4287
4269
|
var t;
|
|
4288
|
-
(t =
|
|
4270
|
+
(t = Z(this, H)) == null || t.clearList();
|
|
4289
4271
|
}
|
|
4290
4272
|
focus() {
|
|
4291
4273
|
var t;
|
|
4292
|
-
(t =
|
|
4274
|
+
(t = Z(this, H)) == null || t.focus();
|
|
4293
4275
|
}
|
|
4294
4276
|
blur() {
|
|
4295
4277
|
var t;
|
|
4296
|
-
(t =
|
|
4278
|
+
(t = Z(this, H)) == null || t.blur();
|
|
4297
4279
|
}
|
|
4298
4280
|
// onRemove() {
|
|
4299
4281
|
// this.#gc?.$destroy();
|
|
4300
4282
|
// }
|
|
4301
4283
|
}
|
|
4302
|
-
|
|
4303
|
-
class
|
|
4284
|
+
H = new WeakMap(), _e = new WeakMap();
|
|
4285
|
+
class vo extends Ce {
|
|
4304
4286
|
constructor(t) {
|
|
4305
4287
|
super("select");
|
|
4306
|
-
|
|
4288
|
+
se(this, "feature");
|
|
4307
4289
|
this.feature = t;
|
|
4308
4290
|
}
|
|
4309
4291
|
}
|
|
4310
|
-
class
|
|
4292
|
+
class bo extends Ce {
|
|
4311
4293
|
constructor(t) {
|
|
4312
|
-
super("
|
|
4313
|
-
|
|
4294
|
+
super("featureslisted");
|
|
4295
|
+
se(this, "features");
|
|
4314
4296
|
this.features = t;
|
|
4315
4297
|
}
|
|
4316
4298
|
}
|
|
4317
|
-
class
|
|
4299
|
+
class wo extends Ce {
|
|
4318
4300
|
constructor(t) {
|
|
4319
|
-
super("
|
|
4320
|
-
|
|
4301
|
+
super("featuresmarked");
|
|
4302
|
+
se(this, "features");
|
|
4321
4303
|
this.features = t;
|
|
4322
4304
|
}
|
|
4323
4305
|
}
|
|
4324
|
-
class
|
|
4306
|
+
class _o extends Ce {
|
|
4325
4307
|
constructor(t) {
|
|
4326
|
-
super("
|
|
4327
|
-
|
|
4308
|
+
super("optionsvisibilitychange");
|
|
4309
|
+
se(this, "optionsVisible");
|
|
4328
4310
|
this.optionsVisible = t;
|
|
4329
4311
|
}
|
|
4330
4312
|
}
|
|
4331
|
-
class
|
|
4313
|
+
class Eo extends Ce {
|
|
4332
4314
|
constructor(t) {
|
|
4333
4315
|
super("pick");
|
|
4334
|
-
|
|
4316
|
+
se(this, "feature");
|
|
4335
4317
|
this.feature = t;
|
|
4336
4318
|
}
|
|
4337
4319
|
}
|
|
4338
|
-
class
|
|
4320
|
+
class Lo extends Ce {
|
|
4339
4321
|
constructor(t) {
|
|
4340
|
-
super("
|
|
4341
|
-
|
|
4322
|
+
super("querychange");
|
|
4323
|
+
se(this, "query");
|
|
4342
4324
|
this.query = t;
|
|
4343
4325
|
}
|
|
4344
4326
|
}
|
|
4345
|
-
class
|
|
4327
|
+
class So extends Ce {
|
|
4346
4328
|
constructor(t, i) {
|
|
4347
4329
|
super("response");
|
|
4348
|
-
|
|
4349
|
-
|
|
4330
|
+
se(this, "url");
|
|
4331
|
+
se(this, "featureCollection");
|
|
4350
4332
|
this.url = t, this.featureCollection = i;
|
|
4351
4333
|
}
|
|
4352
4334
|
}
|
|
4353
|
-
class
|
|
4335
|
+
class xo extends Ce {
|
|
4354
4336
|
constructor(t) {
|
|
4355
|
-
super("
|
|
4356
|
-
|
|
4337
|
+
super("reversetoggle");
|
|
4338
|
+
se(this, "reverse");
|
|
4357
4339
|
this.reverse = t;
|
|
4358
4340
|
}
|
|
4359
4341
|
}
|
|
4360
4342
|
export {
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4343
|
+
bo as FeaturesListedEvent,
|
|
4344
|
+
wo as FeaturesMarkedEvent,
|
|
4345
|
+
Do as GeocodingControl,
|
|
4346
|
+
_o as OptionsVisibilityChangeEvent,
|
|
4347
|
+
Eo as PickEvent,
|
|
4348
|
+
Lo as QueryChangeEvent,
|
|
4349
|
+
So as ResponseEvent,
|
|
4350
|
+
xo as ReverseToggleEvent,
|
|
4351
|
+
vo as SelectEvent,
|
|
4352
|
+
po as createOpenLayersMapController
|
|
4371
4353
|
};
|
|
4372
4354
|
//# sourceMappingURL=openlayers.js.map
|