@maptiler/geocoding-control 2.0.0-rc.9 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/leaflet.js +784 -799
- package/leaflet.js.map +1 -1
- package/leaflet.umd.js +3 -3
- package/leaflet.umd.js.map +1 -1
- package/maplibregl.js +1180 -1195
- package/maplibregl.js.map +1 -1
- package/maplibregl.umd.js +3 -3
- package/maplibregl.umd.js.map +1 -1
- package/maptilersdk.js +1155 -1170
- package/maptilersdk.js.map +1 -1
- package/maptilersdk.umd.js +3 -3
- package/maptilersdk.umd.js.map +1 -1
- package/openlayers.js +1405 -1420
- package/openlayers.js.map +1 -1
- package/openlayers.umd.js +3 -3
- package/openlayers.umd.js.map +1 -1
- package/package.json +2 -2
- package/react.js +783 -798
- package/react.js.map +1 -1
- package/react.umd.js +1 -1
- package/react.umd.js.map +1 -1
- package/svelte/GeocodingControl.svelte +21 -46
- package/svelte/GeocodingControl.svelte.d.ts +0 -1
- package/svelte/types.d.ts +0 -1
- package/types.d.ts +0 -1
- package/vanilla.js +590 -605
- package/vanilla.js.map +1 -1
- package/vanilla.umd.js +1 -1
- package/vanilla.umd.js.map +1 -1
package/maptilersdk.js
CHANGED
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var ln = Object.defineProperty;
|
|
2
|
+
var Gt = (i) => {
|
|
3
3
|
throw TypeError(i);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var ee = (i, e, t) =>
|
|
7
|
-
var Z = (i, e, t) => (
|
|
8
|
-
import * as
|
|
5
|
+
var un = (i, e, t) => e in i ? ln(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
6
|
+
var ee = (i, e, t) => un(i, typeof e != "symbol" ? e + "" : e, t), jt = (i, e, t) => e.has(i) || Gt("Cannot " + t);
|
|
7
|
+
var Z = (i, e, t) => (jt(i, e, "read from private field"), t ? t.call(i) : e.get(i)), wt = (i, e, t) => e.has(i) ? Gt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), _t = (i, e, t, n) => (jt(i, e, "write to private field"), n ? n.call(i, t) : e.set(i, t), t);
|
|
8
|
+
import * as qt from "@maptiler/sdk";
|
|
9
9
|
function z() {
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function an(i, e) {
|
|
12
12
|
for (const t in e) i[t] = e[t];
|
|
13
13
|
return (
|
|
14
14
|
/** @type {T & S} */
|
|
15
15
|
i
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function Ci(i) {
|
|
19
19
|
return i();
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Qt() {
|
|
22
22
|
return /* @__PURE__ */ Object.create(null);
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
i.forEach(
|
|
24
|
+
function me(i) {
|
|
25
|
+
i.forEach(Ci);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function ki(i) {
|
|
28
28
|
return typeof i == "function";
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function Le(i, e) {
|
|
31
31
|
return i != i ? e == e : i !== e || i && typeof i == "object" || typeof i == "function";
|
|
32
32
|
}
|
|
33
|
-
let
|
|
33
|
+
let et;
|
|
34
34
|
function K(i, e) {
|
|
35
|
-
return i === e ? !0 : (
|
|
35
|
+
return i === e ? !0 : (et || (et = document.createElement("a")), et.href = e, i === et.href);
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function cn(i) {
|
|
38
38
|
return Object.keys(i).length === 0;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function fn(i, e, t, n) {
|
|
41
41
|
if (i) {
|
|
42
|
-
const r =
|
|
42
|
+
const r = Ni(i, e, t, n);
|
|
43
43
|
return i[0](r);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
return i[1] && n ?
|
|
46
|
+
function Ni(i, e, t, n) {
|
|
47
|
+
return i[1] && n ? an(t.ctx.slice(), i[1](n(e))) : t.ctx;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function dn(i, e, t, n) {
|
|
50
50
|
if (i[2] && n) {
|
|
51
51
|
const r = i[2](n(t));
|
|
52
52
|
if (e.dirty === void 0)
|
|
53
53
|
return r;
|
|
54
54
|
if (typeof r == "object") {
|
|
55
|
-
const
|
|
56
|
-
for (let
|
|
57
|
-
o
|
|
58
|
-
return
|
|
55
|
+
const s = [], u = Math.max(e.dirty.length, r.length);
|
|
56
|
+
for (let o = 0; o < u; o += 1)
|
|
57
|
+
s[o] = e.dirty[o] | r[o];
|
|
58
|
+
return s;
|
|
59
59
|
}
|
|
60
60
|
return e.dirty | r;
|
|
61
61
|
}
|
|
62
62
|
return e.dirty;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function hn(i, e, t, n, r, s) {
|
|
65
65
|
if (r) {
|
|
66
|
-
const u =
|
|
66
|
+
const u = Ni(e, t, n, s);
|
|
67
67
|
i.p(u, r);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function gn(i) {
|
|
71
71
|
if (i.ctx.length > 32) {
|
|
72
72
|
const e = [], t = i.ctx.length / 32;
|
|
73
73
|
for (let n = 0; n < t; n++)
|
|
@@ -76,7 +76,7 @@ function pn(i) {
|
|
|
76
76
|
}
|
|
77
77
|
return -1;
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Zt(i) {
|
|
80
80
|
return i ?? "";
|
|
81
81
|
}
|
|
82
82
|
function P(i, e) {
|
|
@@ -91,22 +91,22 @@ function B(i) {
|
|
|
91
91
|
function A(i) {
|
|
92
92
|
return document.createElement(i);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function le(i) {
|
|
95
95
|
return document.createElementNS("http://www.w3.org/2000/svg", i);
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function Ee(i) {
|
|
98
98
|
return document.createTextNode(i);
|
|
99
99
|
}
|
|
100
100
|
function ie() {
|
|
101
|
-
return
|
|
101
|
+
return Ee(" ");
|
|
102
102
|
}
|
|
103
|
-
function
|
|
104
|
-
return
|
|
103
|
+
function mn() {
|
|
104
|
+
return Ee("");
|
|
105
105
|
}
|
|
106
106
|
function $(i, e, t, n) {
|
|
107
107
|
return i.addEventListener(e, t, n), () => i.removeEventListener(e, t, n);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function yn(i) {
|
|
110
110
|
return function(e) {
|
|
111
111
|
return e.preventDefault(), i.call(this, e);
|
|
112
112
|
};
|
|
@@ -114,187 +114,187 @@ function wn(i) {
|
|
|
114
114
|
function b(i, e, t) {
|
|
115
115
|
t == null ? i.removeAttribute(e) : i.getAttribute(e) !== t && i.setAttribute(e, t);
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function vn(i) {
|
|
118
118
|
return Array.from(i.childNodes);
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Ge(i, e) {
|
|
121
121
|
e = "" + e, i.data !== e && (i.data = /** @type {string} */
|
|
122
122
|
e);
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function Ht(i, e) {
|
|
125
125
|
i.value = e ?? "";
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function re(i, e, t) {
|
|
128
128
|
i.classList.toggle(e, !!t);
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function pn(i, e, { bubbles: t = !1, cancelable: n = !1 } = {}) {
|
|
131
131
|
return new CustomEvent(i, { detail: e, bubbles: t, cancelable: n });
|
|
132
132
|
}
|
|
133
|
-
let
|
|
134
|
-
function
|
|
135
|
-
|
|
133
|
+
let je;
|
|
134
|
+
function Fe(i) {
|
|
135
|
+
je = i;
|
|
136
136
|
}
|
|
137
|
-
function
|
|
138
|
-
if (!
|
|
139
|
-
return
|
|
137
|
+
function Ri() {
|
|
138
|
+
if (!je) throw new Error("Function called outside component initialization");
|
|
139
|
+
return je;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
|
|
141
|
+
function bn(i) {
|
|
142
|
+
Ri().$$.on_destroy.push(i);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
const i =
|
|
144
|
+
function En() {
|
|
145
|
+
const i = Ri();
|
|
146
146
|
return (e, t, { cancelable: n = !1 } = {}) => {
|
|
147
147
|
const r = i.$$.callbacks[e];
|
|
148
148
|
if (r) {
|
|
149
|
-
const
|
|
149
|
+
const s = pn(
|
|
150
150
|
/** @type {string} */
|
|
151
151
|
e,
|
|
152
152
|
t,
|
|
153
153
|
{ cancelable: n }
|
|
154
154
|
);
|
|
155
155
|
return r.slice().forEach((u) => {
|
|
156
|
-
u.call(i,
|
|
157
|
-
}), !
|
|
156
|
+
u.call(i, s);
|
|
157
|
+
}), !s.defaultPrevented;
|
|
158
158
|
}
|
|
159
159
|
return !0;
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function Vt(i, e) {
|
|
163
163
|
const t = i.$$.callbacks[e.type];
|
|
164
164
|
t && t.slice().forEach((n) => n.call(this, e));
|
|
165
165
|
}
|
|
166
|
-
const
|
|
167
|
-
let
|
|
168
|
-
const
|
|
169
|
-
let
|
|
170
|
-
function
|
|
171
|
-
|
|
166
|
+
const Ae = [], Mt = [];
|
|
167
|
+
let We = [];
|
|
168
|
+
const Yt = [], wn = /* @__PURE__ */ Promise.resolve();
|
|
169
|
+
let Ct = !1;
|
|
170
|
+
function _n() {
|
|
171
|
+
Ct || (Ct = !0, wn.then(Ti));
|
|
172
172
|
}
|
|
173
|
-
function
|
|
174
|
-
|
|
173
|
+
function kt(i) {
|
|
174
|
+
We.push(i);
|
|
175
175
|
}
|
|
176
|
-
const
|
|
177
|
-
let
|
|
178
|
-
function
|
|
179
|
-
if (
|
|
176
|
+
const Lt = /* @__PURE__ */ new Set();
|
|
177
|
+
let Ie = 0;
|
|
178
|
+
function Ti() {
|
|
179
|
+
if (Ie !== 0)
|
|
180
180
|
return;
|
|
181
|
-
const i =
|
|
181
|
+
const i = je;
|
|
182
182
|
do {
|
|
183
183
|
try {
|
|
184
|
-
for (;
|
|
185
|
-
const e =
|
|
186
|
-
|
|
184
|
+
for (; Ie < Ae.length; ) {
|
|
185
|
+
const e = Ae[Ie];
|
|
186
|
+
Ie++, Fe(e), Ln(e.$$);
|
|
187
187
|
}
|
|
188
188
|
} catch (e) {
|
|
189
|
-
throw
|
|
189
|
+
throw Ae.length = 0, Ie = 0, e;
|
|
190
190
|
}
|
|
191
|
-
for (
|
|
192
|
-
for (let e = 0; e <
|
|
193
|
-
const t =
|
|
194
|
-
|
|
191
|
+
for (Fe(null), Ae.length = 0, Ie = 0; Mt.length; ) Mt.pop()();
|
|
192
|
+
for (let e = 0; e < We.length; e += 1) {
|
|
193
|
+
const t = We[e];
|
|
194
|
+
Lt.has(t) || (Lt.add(t), t());
|
|
195
195
|
}
|
|
196
|
-
|
|
197
|
-
} while (
|
|
198
|
-
for (;
|
|
199
|
-
|
|
200
|
-
|
|
196
|
+
We.length = 0;
|
|
197
|
+
} while (Ae.length);
|
|
198
|
+
for (; Yt.length; )
|
|
199
|
+
Yt.pop()();
|
|
200
|
+
Ct = !1, Lt.clear(), Fe(i);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function Ln(i) {
|
|
203
203
|
if (i.fragment !== null) {
|
|
204
|
-
i.update(),
|
|
204
|
+
i.update(), me(i.before_update);
|
|
205
205
|
const e = i.dirty;
|
|
206
|
-
i.dirty = [-1], i.fragment && i.fragment.p(i.ctx, e), i.after_update.forEach(
|
|
206
|
+
i.dirty = [-1], i.fragment && i.fragment.p(i.ctx, e), i.after_update.forEach(kt);
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function Sn(i) {
|
|
210
210
|
const e = [], t = [];
|
|
211
|
-
|
|
211
|
+
We.forEach((n) => i.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), We = e;
|
|
212
212
|
}
|
|
213
|
-
const
|
|
214
|
-
let
|
|
215
|
-
function
|
|
216
|
-
|
|
213
|
+
const it = /* @__PURE__ */ new Set();
|
|
214
|
+
let Ne;
|
|
215
|
+
function nt() {
|
|
216
|
+
Ne = {
|
|
217
217
|
r: 0,
|
|
218
218
|
c: [],
|
|
219
|
-
p:
|
|
219
|
+
p: Ne
|
|
220
220
|
// parent group
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
|
|
223
|
+
function rt() {
|
|
224
|
+
Ne.r || me(Ne.c), Ne = Ne.p;
|
|
225
225
|
}
|
|
226
226
|
function j(i, e) {
|
|
227
|
-
i && i.i && (
|
|
227
|
+
i && i.i && (it.delete(i), i.i(e));
|
|
228
228
|
}
|
|
229
229
|
function V(i, e, t, n) {
|
|
230
230
|
if (i && i.o) {
|
|
231
|
-
if (
|
|
232
|
-
|
|
233
|
-
|
|
231
|
+
if (it.has(i)) return;
|
|
232
|
+
it.add(i), Ne.c.push(() => {
|
|
233
|
+
it.delete(i), n && (t && i.d(1), n());
|
|
234
234
|
}), i.o(e);
|
|
235
235
|
} else n && n();
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function Kt(i) {
|
|
238
238
|
return (i == null ? void 0 : i.length) !== void 0 ? i : Array.from(i);
|
|
239
239
|
}
|
|
240
|
-
function
|
|
240
|
+
function xn(i, e) {
|
|
241
241
|
V(i, 1, 1, () => {
|
|
242
242
|
e.delete(i.key);
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
function
|
|
246
|
-
let f = i.length, g =
|
|
245
|
+
function Mn(i, e, t, n, r, s, u, o, c, l, d, a) {
|
|
246
|
+
let f = i.length, g = s.length, v = f;
|
|
247
247
|
const _ = {};
|
|
248
248
|
for (; v--; ) _[i[v].key] = v;
|
|
249
|
-
const h = [], y = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(),
|
|
249
|
+
const h = [], y = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), E = [];
|
|
250
250
|
for (v = g; v--; ) {
|
|
251
|
-
const
|
|
251
|
+
const w = a(r, s, v), L = t(w);
|
|
252
252
|
let k = u.get(L);
|
|
253
|
-
k ?
|
|
253
|
+
k ? E.push(() => k.p(w, e)) : (k = l(L, w), k.c()), y.set(L, h[v] = k), L in _ && p.set(L, Math.abs(v - _[L]));
|
|
254
254
|
}
|
|
255
255
|
const S = /* @__PURE__ */ new Set(), M = /* @__PURE__ */ new Set();
|
|
256
|
-
function C(
|
|
257
|
-
j(
|
|
256
|
+
function C(w) {
|
|
257
|
+
j(w, 1), w.m(o, d), u.set(w.key, w), d = w.first, g--;
|
|
258
258
|
}
|
|
259
259
|
for (; f && g; ) {
|
|
260
|
-
const
|
|
261
|
-
|
|
260
|
+
const w = h[g - 1], L = i[f - 1], k = w.key, O = L.key;
|
|
261
|
+
w === L ? (d = w.first, f--, g--) : y.has(O) ? !u.has(k) || S.has(k) ? C(w) : M.has(O) ? f-- : p.get(k) > p.get(O) ? (M.add(k), C(w)) : (S.add(O), f--) : (c(L, u), f--);
|
|
262
262
|
}
|
|
263
263
|
for (; f--; ) {
|
|
264
|
-
const
|
|
265
|
-
y.has(
|
|
264
|
+
const w = i[f];
|
|
265
|
+
y.has(w.key) || c(w, u);
|
|
266
266
|
}
|
|
267
267
|
for (; g; ) C(h[g - 1]);
|
|
268
|
-
return
|
|
268
|
+
return me(E), h;
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function we(i) {
|
|
271
271
|
i && i.c();
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function he(i, e, t) {
|
|
274
274
|
const { fragment: n, after_update: r } = i.$$;
|
|
275
|
-
n && n.m(e, t),
|
|
276
|
-
const
|
|
277
|
-
i.$$.on_destroy ? i.$$.on_destroy.push(...
|
|
278
|
-
}), r.forEach(
|
|
275
|
+
n && n.m(e, t), kt(() => {
|
|
276
|
+
const s = i.$$.on_mount.map(Ci).filter(ki);
|
|
277
|
+
i.$$.on_destroy ? i.$$.on_destroy.push(...s) : me(s), i.$$.on_mount = [];
|
|
278
|
+
}), r.forEach(kt);
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function ge(i, e) {
|
|
281
281
|
const t = i.$$;
|
|
282
|
-
t.fragment !== null && (
|
|
282
|
+
t.fragment !== null && (Sn(t.after_update), me(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
i.$$.dirty[0] === -1 && (
|
|
284
|
+
function Cn(i, e) {
|
|
285
|
+
i.$$.dirty[0] === -1 && (Ae.push(i), _n(), i.$$.dirty.fill(0)), i.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
const c =
|
|
289
|
-
|
|
287
|
+
function Se(i, e, t, n, r, s, u = null, o = [-1]) {
|
|
288
|
+
const c = je;
|
|
289
|
+
Fe(i);
|
|
290
290
|
const l = i.$$ = {
|
|
291
291
|
fragment: null,
|
|
292
292
|
ctx: [],
|
|
293
293
|
// state
|
|
294
|
-
props:
|
|
294
|
+
props: s,
|
|
295
295
|
update: z,
|
|
296
296
|
not_equal: r,
|
|
297
|
-
bound:
|
|
297
|
+
bound: Qt(),
|
|
298
298
|
// lifecycle
|
|
299
299
|
on_mount: [],
|
|
300
300
|
on_destroy: [],
|
|
@@ -303,8 +303,8 @@ function Me(i, e, t, n, r, o, u = null, s = [-1]) {
|
|
|
303
303
|
after_update: [],
|
|
304
304
|
context: new Map(e.context || (c ? c.$$.context : [])),
|
|
305
305
|
// everything else
|
|
306
|
-
callbacks:
|
|
307
|
-
dirty:
|
|
306
|
+
callbacks: Qt(),
|
|
307
|
+
dirty: o,
|
|
308
308
|
skip_bound: !1,
|
|
309
309
|
root: e.target || c.$$.root
|
|
310
310
|
};
|
|
@@ -312,18 +312,18 @@ function Me(i, e, t, n, r, o, u = null, s = [-1]) {
|
|
|
312
312
|
let d = !1;
|
|
313
313
|
if (l.ctx = t ? t(i, e.props || {}, (a, f, ...g) => {
|
|
314
314
|
const v = g.length ? g[0] : f;
|
|
315
|
-
return l.ctx && r(l.ctx[a], l.ctx[a] = v) && (!l.skip_bound && l.bound[a] && l.bound[a](v), d &&
|
|
316
|
-
}) : [], l.update(), d = !0,
|
|
315
|
+
return l.ctx && r(l.ctx[a], l.ctx[a] = v) && (!l.skip_bound && l.bound[a] && l.bound[a](v), d && Cn(i, a)), f;
|
|
316
|
+
}) : [], l.update(), d = !0, me(l.before_update), l.fragment = n ? n(l.ctx) : !1, e.target) {
|
|
317
317
|
if (e.hydrate) {
|
|
318
|
-
const a =
|
|
318
|
+
const a = vn(e.target);
|
|
319
319
|
l.fragment && l.fragment.l(a), a.forEach(B);
|
|
320
320
|
} else
|
|
321
321
|
l.fragment && l.fragment.c();
|
|
322
|
-
e.intro && j(i.$$.fragment),
|
|
322
|
+
e.intro && j(i.$$.fragment), he(i, e.target, e.anchor), Ti();
|
|
323
323
|
}
|
|
324
|
-
|
|
324
|
+
Fe(c);
|
|
325
325
|
}
|
|
326
|
-
class
|
|
326
|
+
class xe {
|
|
327
327
|
constructor() {
|
|
328
328
|
/**
|
|
329
329
|
* ### PRIVATE API
|
|
@@ -344,7 +344,7 @@ class Ce {
|
|
|
344
344
|
}
|
|
345
345
|
/** @returns {void} */
|
|
346
346
|
$destroy() {
|
|
347
|
-
|
|
347
|
+
ge(this, 1), this.$destroy = z;
|
|
348
348
|
}
|
|
349
349
|
/**
|
|
350
350
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -353,7 +353,7 @@ class Ce {
|
|
|
353
353
|
* @returns {() => void}
|
|
354
354
|
*/
|
|
355
355
|
$on(e, t) {
|
|
356
|
-
if (!
|
|
356
|
+
if (!ki(t))
|
|
357
357
|
return z;
|
|
358
358
|
const n = this.$$.callbacks[e] || (this.$$.callbacks[e] = []);
|
|
359
359
|
return n.push(t), () => {
|
|
@@ -366,16 +366,16 @@ class Ce {
|
|
|
366
366
|
* @returns {void}
|
|
367
367
|
*/
|
|
368
368
|
$set(e) {
|
|
369
|
-
this.$$set && !
|
|
369
|
+
this.$$set && !cn(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
|
-
const
|
|
373
|
-
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(
|
|
374
|
-
function
|
|
372
|
+
const kn = "4";
|
|
373
|
+
typeof window < "u" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(kn);
|
|
374
|
+
function Nn(i) {
|
|
375
375
|
let e, t;
|
|
376
376
|
return {
|
|
377
377
|
c() {
|
|
378
|
-
e =
|
|
378
|
+
e = le("svg"), t = le("path"), b(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"), b(e, "viewBox", "0 0 14 14"), b(e, "width", "13"), b(e, "height", "13"), b(e, "class", "svelte-en2qvf");
|
|
379
379
|
},
|
|
380
380
|
m(n, r) {
|
|
381
381
|
U(n, e, r), P(e, t);
|
|
@@ -388,16 +388,16 @@ function In(i) {
|
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
class
|
|
391
|
+
class Pi extends xe {
|
|
392
392
|
constructor(e) {
|
|
393
|
-
super(),
|
|
393
|
+
super(), Se(this, e, null, Nn, Le, {});
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function Rn(i) {
|
|
397
397
|
let e, t;
|
|
398
398
|
return {
|
|
399
399
|
c() {
|
|
400
|
-
e =
|
|
400
|
+
e = le("svg"), t = le("path"), b(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"), b(e, "viewBox", "0 0 30 30"), b(e, "fill", "none"), b(e, "xmlns", "http://www.w3.org/2000/svg"), b(e, "class", "svelte-d2loi5");
|
|
401
401
|
},
|
|
402
402
|
m(n, r) {
|
|
403
403
|
U(n, e, r), P(e, t);
|
|
@@ -410,12 +410,12 @@ function On(i) {
|
|
|
410
410
|
}
|
|
411
411
|
};
|
|
412
412
|
}
|
|
413
|
-
class
|
|
413
|
+
class Ii extends xe {
|
|
414
414
|
constructor(e) {
|
|
415
|
-
super(),
|
|
415
|
+
super(), Se(this, e, null, Rn, Le, {});
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function Tn(i) {
|
|
419
419
|
let e, t;
|
|
420
420
|
return {
|
|
421
421
|
c() {
|
|
@@ -446,7 +446,7 @@ function An(i) {
|
|
|
446
446
|
}
|
|
447
447
|
};
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function Pn(i) {
|
|
450
450
|
let e, t;
|
|
451
451
|
return {
|
|
452
452
|
c() {
|
|
@@ -477,7 +477,7 @@ function Wn(i) {
|
|
|
477
477
|
}
|
|
478
478
|
};
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function In(i) {
|
|
481
481
|
let e, t;
|
|
482
482
|
return {
|
|
483
483
|
c() {
|
|
@@ -508,7 +508,7 @@ function zn(i) {
|
|
|
508
508
|
}
|
|
509
509
|
};
|
|
510
510
|
}
|
|
511
|
-
function
|
|
511
|
+
function On(i) {
|
|
512
512
|
let e, t;
|
|
513
513
|
return {
|
|
514
514
|
c() {
|
|
@@ -539,7 +539,7 @@ function Bn(i) {
|
|
|
539
539
|
}
|
|
540
540
|
};
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function An(i) {
|
|
543
543
|
let e, t;
|
|
544
544
|
return {
|
|
545
545
|
c() {
|
|
@@ -570,7 +570,7 @@ function Dn(i) {
|
|
|
570
570
|
}
|
|
571
571
|
};
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Wn(i) {
|
|
574
574
|
let e, t;
|
|
575
575
|
return {
|
|
576
576
|
c() {
|
|
@@ -601,7 +601,7 @@ function Un(i) {
|
|
|
601
601
|
}
|
|
602
602
|
};
|
|
603
603
|
}
|
|
604
|
-
function
|
|
604
|
+
function zn(i) {
|
|
605
605
|
let e, t;
|
|
606
606
|
return {
|
|
607
607
|
c() {
|
|
@@ -632,7 +632,7 @@ function Fn(i) {
|
|
|
632
632
|
}
|
|
633
633
|
};
|
|
634
634
|
}
|
|
635
|
-
function
|
|
635
|
+
function Bn(i) {
|
|
636
636
|
let e, t, n, r;
|
|
637
637
|
return {
|
|
638
638
|
c() {
|
|
@@ -644,35 +644,35 @@ function Gn(i) {
|
|
|
644
644
|
i[4]
|
|
645
645
|
), b(e, "class", "svelte-ltkwvy");
|
|
646
646
|
},
|
|
647
|
-
m(
|
|
648
|
-
U(
|
|
647
|
+
m(s, u) {
|
|
648
|
+
U(s, e, u), n || (r = $(
|
|
649
649
|
e,
|
|
650
650
|
"error",
|
|
651
651
|
/*error_handler*/
|
|
652
652
|
i[14]
|
|
653
653
|
), n = !0);
|
|
654
654
|
},
|
|
655
|
-
p(
|
|
655
|
+
p(s, u) {
|
|
656
656
|
u & /*imageUrl*/
|
|
657
657
|
32 && !K(e.src, t = /*imageUrl*/
|
|
658
|
-
|
|
658
|
+
s[5]) && b(e, "src", t), u & /*category*/
|
|
659
659
|
16 && b(
|
|
660
660
|
e,
|
|
661
661
|
"alt",
|
|
662
662
|
/*category*/
|
|
663
|
-
|
|
663
|
+
s[4]
|
|
664
664
|
);
|
|
665
665
|
},
|
|
666
|
-
d(
|
|
667
|
-
|
|
666
|
+
d(s) {
|
|
667
|
+
s && B(e), n = !1, r();
|
|
668
668
|
}
|
|
669
669
|
};
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function Xt(i) {
|
|
672
672
|
let e, t;
|
|
673
673
|
return {
|
|
674
674
|
c() {
|
|
675
|
-
e = A("span"), t =
|
|
675
|
+
e = A("span"), t = Ee(
|
|
676
676
|
/*placeType*/
|
|
677
677
|
i[6]
|
|
678
678
|
), b(e, "class", "secondary svelte-ltkwvy");
|
|
@@ -682,7 +682,7 @@ function ei(i) {
|
|
|
682
682
|
},
|
|
683
683
|
p(n, r) {
|
|
684
684
|
r & /*placeType*/
|
|
685
|
-
64 &&
|
|
685
|
+
64 && Ge(
|
|
686
686
|
t,
|
|
687
687
|
/*placeType*/
|
|
688
688
|
n[6]
|
|
@@ -693,8 +693,8 @@ function ei(i) {
|
|
|
693
693
|
}
|
|
694
694
|
};
|
|
695
695
|
}
|
|
696
|
-
function
|
|
697
|
-
let e, t, n, r,
|
|
696
|
+
function Dn(i) {
|
|
697
|
+
let e, t, n, r, s, u, o, c, l, d = (
|
|
698
698
|
/*isReverse*/
|
|
699
699
|
(i[7] ? (
|
|
700
700
|
/*feature*/
|
|
@@ -720,34 +720,34 @@ function jn(i) {
|
|
|
720
720
|
/*feature*/
|
|
721
721
|
i[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
722
722
|
)) + ""
|
|
723
|
-
), y, p,
|
|
723
|
+
), y, p, E;
|
|
724
724
|
function S(L, k) {
|
|
725
725
|
return k & /*feature*/
|
|
726
726
|
1 && (t = null), k & /*feature*/
|
|
727
727
|
1 && (n = null), k & /*feature*/
|
|
728
728
|
1 && (r = null), k & /*feature*/
|
|
729
|
-
1 && (
|
|
730
|
-
L[5] ?
|
|
729
|
+
1 && (s = null), /*imageUrl*/
|
|
730
|
+
L[5] ? Bn : (
|
|
731
731
|
/*feature*/
|
|
732
|
-
L[0].address ?
|
|
733
|
-
L[0].id.startsWith("road.")), t ?
|
|
734
|
-
L[0].id.startsWith("address.")), n ?
|
|
735
|
-
L[0].id.startsWith("postal_code.")), r ?
|
|
736
|
-
L[0].id.startsWith("poi.")),
|
|
732
|
+
L[0].address ? zn : (t == null && (t = !!/*feature*/
|
|
733
|
+
L[0].id.startsWith("road.")), t ? Wn : (n == null && (n = !!/*feature*/
|
|
734
|
+
L[0].id.startsWith("address.")), n ? An : (r == null && (r = !!/*feature*/
|
|
735
|
+
L[0].id.startsWith("postal_code.")), r ? On : (s == null && (s = !!/*feature*/
|
|
736
|
+
L[0].id.startsWith("poi.")), s ? In : (
|
|
737
737
|
/*isReverse*/
|
|
738
|
-
L[7] ?
|
|
738
|
+
L[7] ? Pn : Tn
|
|
739
739
|
)))))
|
|
740
740
|
);
|
|
741
741
|
}
|
|
742
|
-
let M = S(i, -1), C = M(i),
|
|
742
|
+
let M = S(i, -1), C = M(i), w = g && Xt(i);
|
|
743
743
|
return {
|
|
744
744
|
c() {
|
|
745
|
-
e = A("li"), C.c(), u = ie(),
|
|
745
|
+
e = A("li"), C.c(), u = ie(), o = A("span"), c = A("span"), l = A("span"), a = Ee(d), f = ie(), w && w.c(), v = ie(), _ = A("span"), y = Ee(h), b(l, "class", "primary svelte-ltkwvy"), b(c, "class", "svelte-ltkwvy"), b(_, "class", "line2 svelte-ltkwvy"), b(o, "class", "texts svelte-ltkwvy"), b(e, "tabindex", "0"), b(
|
|
746
746
|
e,
|
|
747
747
|
"data-selected",
|
|
748
748
|
/*selected*/
|
|
749
749
|
i[1]
|
|
750
|
-
), b(e, "class", "svelte-ltkwvy"),
|
|
750
|
+
), b(e, "class", "svelte-ltkwvy"), re(
|
|
751
751
|
e,
|
|
752
752
|
"selected",
|
|
753
753
|
/*selected*/
|
|
@@ -755,7 +755,7 @@ function jn(i) {
|
|
|
755
755
|
);
|
|
756
756
|
},
|
|
757
757
|
m(L, k) {
|
|
758
|
-
U(L, e, k), C.m(e, null), P(e, u), P(e,
|
|
758
|
+
U(L, e, k), C.m(e, null), P(e, u), P(e, o), P(o, c), P(c, l), P(l, a), P(c, f), w && w.m(c, null), P(o, v), P(o, _), P(_, y), p || (E = [
|
|
759
759
|
$(
|
|
760
760
|
e,
|
|
761
761
|
"mouseenter",
|
|
@@ -779,7 +779,7 @@ function jn(i) {
|
|
|
779
779
|
) : (
|
|
780
780
|
/*feature*/
|
|
781
781
|
L[0].place_name.replace(/,.*/, "")
|
|
782
|
-
)) + "") &&
|
|
782
|
+
)) + "") && Ge(a, d), k & /*showPlaceType, feature, imageUrl*/
|
|
783
783
|
37 && (g = /*showPlaceType*/
|
|
784
784
|
L[2] === "always" || /*showPlaceType*/
|
|
785
785
|
L[2] !== "never" && !/*feature*/
|
|
@@ -789,19 +789,19 @@ function jn(i) {
|
|
|
789
789
|
L[0].id.startsWith("postal_code.") && (!/*feature*/
|
|
790
790
|
L[0].id.startsWith("poi.") || !/*imageUrl*/
|
|
791
791
|
L[5]) && !/*isReverse*/
|
|
792
|
-
L[7]), g ?
|
|
792
|
+
L[7]), g ? w ? w.p(L, k) : (w = Xt(L), w.c(), w.m(c, null)) : w && (w.d(1), w = null), k & /*feature*/
|
|
793
793
|
1 && h !== (h = /*isReverse*/
|
|
794
794
|
(L[7] ? "" : (
|
|
795
795
|
/*feature*/
|
|
796
796
|
L[0].place_name.replace(/[^,]*,?\s*/, "")
|
|
797
|
-
)) + "") &&
|
|
797
|
+
)) + "") && Ge(y, h), k & /*selected*/
|
|
798
798
|
2 && b(
|
|
799
799
|
e,
|
|
800
800
|
"data-selected",
|
|
801
801
|
/*selected*/
|
|
802
802
|
L[1]
|
|
803
803
|
), k & /*selected*/
|
|
804
|
-
2 &&
|
|
804
|
+
2 && re(
|
|
805
805
|
e,
|
|
806
806
|
"selected",
|
|
807
807
|
/*selected*/
|
|
@@ -811,40 +811,40 @@ function jn(i) {
|
|
|
811
811
|
i: z,
|
|
812
812
|
o: z,
|
|
813
813
|
d(L) {
|
|
814
|
-
L && B(e), C.d(),
|
|
814
|
+
L && B(e), C.d(), w && w.d(), p = !1, me(E);
|
|
815
815
|
}
|
|
816
816
|
};
|
|
817
817
|
}
|
|
818
|
-
function
|
|
819
|
-
var
|
|
820
|
-
let n, r, { feature:
|
|
821
|
-
const d = (
|
|
822
|
-
let a, f, g = 0, v =
|
|
818
|
+
function Un(i, e, t) {
|
|
819
|
+
var E;
|
|
820
|
+
let n, r, { feature: s } = e, { selected: u = !1 } = e, { showPlaceType: o } = e, { missingIconsCache: c } = e, { iconsBaseUrl: l } = e;
|
|
821
|
+
const d = (E = s.properties) == null ? void 0 : E.categories;
|
|
822
|
+
let a, f, g = 0, v = s.place_type[0] === "reverse";
|
|
823
823
|
function _() {
|
|
824
824
|
f && c.add(f), t(10, g++, g);
|
|
825
825
|
}
|
|
826
826
|
function h(S) {
|
|
827
|
-
|
|
827
|
+
Vt.call(this, i, S);
|
|
828
828
|
}
|
|
829
829
|
function y(S) {
|
|
830
|
-
|
|
830
|
+
Vt.call(this, i, S);
|
|
831
831
|
}
|
|
832
832
|
const p = () => _();
|
|
833
833
|
return i.$$set = (S) => {
|
|
834
|
-
"feature" in S && t(0,
|
|
834
|
+
"feature" in S && t(0, s = S.feature), "selected" in S && t(1, u = S.selected), "showPlaceType" in S && t(2, o = S.showPlaceType), "missingIconsCache" in S && t(9, c = S.missingIconsCache), "iconsBaseUrl" in S && t(3, l = S.iconsBaseUrl);
|
|
835
835
|
}, i.$$.update = () => {
|
|
836
|
-
var S, M, C,
|
|
836
|
+
var S, M, C, w;
|
|
837
837
|
if (i.$$.dirty & /*loadIconAttempt, index, category, iconsBaseUrl, imageUrl, missingIconsCache*/
|
|
838
838
|
3640)
|
|
839
839
|
do
|
|
840
840
|
t(11, n--, n), t(4, a = d == null ? void 0 : d[n]), t(5, f = a ? l + a.replace(/ /g, "_") + ".svg" : void 0);
|
|
841
841
|
while (n > -1 && (!f || c.has(f)));
|
|
842
842
|
i.$$.dirty & /*feature*/
|
|
843
|
-
1 && t(6, r = ((M = (S =
|
|
843
|
+
1 && t(6, r = ((M = (S = s.properties) == null ? void 0 : S.categories) == null ? void 0 : M.join(", ")) ?? ((w = (C = s.properties) == null ? void 0 : C.place_type_name) == null ? void 0 : w[0]) ?? s.place_type[0]);
|
|
844
844
|
}, t(11, n = (d == null ? void 0 : d.length) ?? 0), [
|
|
845
|
-
o,
|
|
846
|
-
u,
|
|
847
845
|
s,
|
|
846
|
+
u,
|
|
847
|
+
o,
|
|
848
848
|
l,
|
|
849
849
|
a,
|
|
850
850
|
f,
|
|
@@ -859,9 +859,9 @@ function qn(i, e, t) {
|
|
|
859
859
|
p
|
|
860
860
|
];
|
|
861
861
|
}
|
|
862
|
-
class
|
|
862
|
+
class Fn extends xe {
|
|
863
863
|
constructor(e) {
|
|
864
|
-
super(),
|
|
864
|
+
super(), Se(this, e, Un, Dn, Le, {
|
|
865
865
|
feature: 0,
|
|
866
866
|
selected: 1,
|
|
867
867
|
showPlaceType: 2,
|
|
@@ -870,7 +870,7 @@ class Qn extends Ce {
|
|
|
870
870
|
});
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function Gn(i) {
|
|
874
874
|
let e;
|
|
875
875
|
return {
|
|
876
876
|
c() {
|
|
@@ -887,42 +887,42 @@ function Zn(i) {
|
|
|
887
887
|
}
|
|
888
888
|
};
|
|
889
889
|
}
|
|
890
|
-
class
|
|
890
|
+
class jn extends xe {
|
|
891
891
|
constructor(e) {
|
|
892
|
-
super(),
|
|
892
|
+
super(), Se(this, e, null, Gn, Le, {});
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function qn(i) {
|
|
896
896
|
let e, t, n;
|
|
897
897
|
return {
|
|
898
898
|
c() {
|
|
899
|
-
e =
|
|
900
|
-
i[0] === "list" ? 20 : void 0), b(e, "viewBox", "0 0 70 85"), b(e, "fill", "none"), b(e, "class", "svelte-gzo3ar"),
|
|
899
|
+
e = le("svg"), t = le("path"), b(t, "stroke-width", "4"), b(t, "d", "M 5,33.103579 C 5,17.607779 18.457,5 35,5 C 51.543,5 65,17.607779 65,33.103579 C 65,56.388679 40.4668,76.048179 36.6112,79.137779 C 36.3714,79.329879 36.2116,79.457979 36.1427,79.518879 C 35.8203,79.800879 35.4102,79.942779 35,79.942779 C 34.5899,79.942779 34.1797,79.800879 33.8575,79.518879 C 33.7886,79.457979 33.6289,79.330079 33.3893,79.138079 C 29.5346,76.049279 5,56.389379 5,33.103579 Z M 35.0001,49.386379 C 43.1917,49.386379 49.8323,42.646079 49.8323,34.331379 C 49.8323,26.016779 43.1917,19.276479 35.0001,19.276479 C 26.8085,19.276479 20.1679,26.016779 20.1679,34.331379 C 20.1679,42.646079 26.8085,49.386379 35.0001,49.386379 Z"), b(t, "class", "svelte-gzo3ar"), b(e, "width", n = /*displayIn*/
|
|
900
|
+
i[0] === "list" ? 20 : void 0), b(e, "viewBox", "0 0 70 85"), b(e, "fill", "none"), b(e, "class", "svelte-gzo3ar"), re(
|
|
901
901
|
e,
|
|
902
902
|
"in-map",
|
|
903
903
|
/*displayIn*/
|
|
904
904
|
i[0] !== "list"
|
|
905
|
-
),
|
|
905
|
+
), re(
|
|
906
906
|
e,
|
|
907
907
|
"list-icon",
|
|
908
908
|
/*displayIn*/
|
|
909
909
|
i[0] === "list"
|
|
910
910
|
);
|
|
911
911
|
},
|
|
912
|
-
m(r,
|
|
913
|
-
U(r, e,
|
|
912
|
+
m(r, s) {
|
|
913
|
+
U(r, e, s), P(e, t);
|
|
914
914
|
},
|
|
915
|
-
p(r, [
|
|
916
|
-
|
|
915
|
+
p(r, [s]) {
|
|
916
|
+
s & /*displayIn*/
|
|
917
917
|
1 && n !== (n = /*displayIn*/
|
|
918
|
-
r[0] === "list" ? 20 : void 0) && b(e, "width", n),
|
|
919
|
-
1 &&
|
|
918
|
+
r[0] === "list" ? 20 : void 0) && b(e, "width", n), s & /*displayIn*/
|
|
919
|
+
1 && re(
|
|
920
920
|
e,
|
|
921
921
|
"in-map",
|
|
922
922
|
/*displayIn*/
|
|
923
923
|
r[0] !== "list"
|
|
924
|
-
),
|
|
925
|
-
1 &&
|
|
924
|
+
), s & /*displayIn*/
|
|
925
|
+
1 && re(
|
|
926
926
|
e,
|
|
927
927
|
"list-icon",
|
|
928
928
|
/*displayIn*/
|
|
@@ -936,22 +936,22 @@ function Vn(i) {
|
|
|
936
936
|
}
|
|
937
937
|
};
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function Qn(i, e, t) {
|
|
940
940
|
let { displayIn: n } = e;
|
|
941
941
|
return i.$$set = (r) => {
|
|
942
942
|
"displayIn" in r && t(0, n = r.displayIn);
|
|
943
943
|
}, [n];
|
|
944
944
|
}
|
|
945
|
-
class
|
|
945
|
+
class Zn extends xe {
|
|
946
946
|
constructor(e) {
|
|
947
|
-
super(),
|
|
947
|
+
super(), Se(this, e, Qn, qn, Le, { displayIn: 0 });
|
|
948
948
|
}
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function Hn(i) {
|
|
951
951
|
let e, t;
|
|
952
952
|
return {
|
|
953
953
|
c() {
|
|
954
|
-
e =
|
|
954
|
+
e = le("svg"), t = le("path"), b(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"), b(e, "viewBox", "0 0 60.006 21.412"), b(e, "width", "14"), b(e, "height", "20"), b(e, "class", "svelte-en2qvf");
|
|
955
955
|
},
|
|
956
956
|
m(n, r) {
|
|
957
957
|
U(n, e, r), P(e, t);
|
|
@@ -964,19 +964,19 @@ function Xn(i) {
|
|
|
964
964
|
}
|
|
965
965
|
};
|
|
966
966
|
}
|
|
967
|
-
class
|
|
967
|
+
class Vn extends xe {
|
|
968
968
|
constructor(e) {
|
|
969
|
-
super(),
|
|
969
|
+
super(), Se(this, e, null, Hn, Le, {});
|
|
970
970
|
}
|
|
971
971
|
}
|
|
972
|
-
function
|
|
972
|
+
function Yn(i) {
|
|
973
973
|
let e, t, n;
|
|
974
974
|
return {
|
|
975
975
|
c() {
|
|
976
|
-
e =
|
|
976
|
+
e = le("svg"), t = le("circle"), n = le("path"), b(t, "cx", "4.789"), b(t, "cy", "4.787"), b(t, "r", "3.85"), b(t, "class", "svelte-1aq105l"), b(n, "d", "M12.063 12.063 7.635 7.635"), b(n, "class", "svelte-1aq105l"), b(e, "xmlns", "http://www.w3.org/2000/svg"), b(e, "width", "13"), b(e, "height", "13"), b(e, "viewBox", "0 0 13 13"), b(e, "class", "svelte-1aq105l");
|
|
977
977
|
},
|
|
978
|
-
m(r,
|
|
979
|
-
U(r, e,
|
|
978
|
+
m(r, s) {
|
|
979
|
+
U(r, e, s), P(e, t), P(e, n);
|
|
980
980
|
},
|
|
981
981
|
p: z,
|
|
982
982
|
i: z,
|
|
@@ -986,37 +986,37 @@ function $n(i) {
|
|
|
986
986
|
}
|
|
987
987
|
};
|
|
988
988
|
}
|
|
989
|
-
class
|
|
989
|
+
class Kn extends xe {
|
|
990
990
|
constructor(e) {
|
|
991
|
-
super(),
|
|
991
|
+
super(), Se(this, e, null, Yn, Le, {});
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
|
-
function
|
|
995
|
-
const n = e[1], r = e[0],
|
|
996
|
-
return i === n && t ? i : ((i - r) %
|
|
994
|
+
function Xn(i, e, t) {
|
|
995
|
+
const n = e[1], r = e[0], s = n - r;
|
|
996
|
+
return i === n && t ? i : ((i - r) % s + s) % s + r;
|
|
997
997
|
}
|
|
998
|
-
function
|
|
998
|
+
function ot(i) {
|
|
999
999
|
const e = [...i];
|
|
1000
1000
|
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;
|
|
1001
1001
|
}
|
|
1002
|
-
let
|
|
1003
|
-
async function
|
|
1002
|
+
let Be;
|
|
1003
|
+
async function Jn(i, e, t) {
|
|
1004
1004
|
const n = i == null ? void 0 : i.getCenterAndZoom();
|
|
1005
1005
|
for (const r of e ?? [])
|
|
1006
1006
|
if (!(n && (r.minZoom != null && r.minZoom > n[0] || r.maxZoom != null && r.maxZoom < n[0]))) {
|
|
1007
1007
|
if (r.type === "fixed")
|
|
1008
1008
|
return r.coordinates.join(",");
|
|
1009
1009
|
e: if (r.type === "client-geolocation") {
|
|
1010
|
-
if (
|
|
1011
|
-
if (!
|
|
1010
|
+
if (Be && r.cachedLocationExpiry && Be.time + r.cachedLocationExpiry > Date.now()) {
|
|
1011
|
+
if (!Be.coords)
|
|
1012
1012
|
break e;
|
|
1013
|
-
return
|
|
1013
|
+
return Be.coords;
|
|
1014
1014
|
}
|
|
1015
|
-
let
|
|
1015
|
+
let s;
|
|
1016
1016
|
try {
|
|
1017
|
-
return
|
|
1017
|
+
return s = await new Promise((u, o) => {
|
|
1018
1018
|
t.signal.addEventListener("abort", () => {
|
|
1019
|
-
|
|
1019
|
+
o(Error("aborted"));
|
|
1020
1020
|
}), navigator.geolocation.getCurrentPosition(
|
|
1021
1021
|
(c) => {
|
|
1022
1022
|
u(
|
|
@@ -1024,16 +1024,16 @@ async function ir(i, e, t) {
|
|
|
1024
1024
|
);
|
|
1025
1025
|
},
|
|
1026
1026
|
(c) => {
|
|
1027
|
-
|
|
1027
|
+
o(c);
|
|
1028
1028
|
},
|
|
1029
1029
|
r
|
|
1030
1030
|
);
|
|
1031
|
-
}),
|
|
1031
|
+
}), s;
|
|
1032
1032
|
} catch {
|
|
1033
1033
|
} finally {
|
|
1034
|
-
r.cachedLocationExpiry && (
|
|
1034
|
+
r.cachedLocationExpiry && (Be = {
|
|
1035
1035
|
time: Date.now(),
|
|
1036
|
-
coords:
|
|
1036
|
+
coords: s
|
|
1037
1037
|
});
|
|
1038
1038
|
}
|
|
1039
1039
|
if (t.signal.aborted)
|
|
@@ -1045,67 +1045,67 @@ async function ir(i, e, t) {
|
|
|
1045
1045
|
return n[1].toFixed(6) + "," + n[2].toFixed(6);
|
|
1046
1046
|
}
|
|
1047
1047
|
}
|
|
1048
|
-
const
|
|
1049
|
-
function
|
|
1048
|
+
const $n = /^(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, Jt = /^([+-]?[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,})$/, $t = /^(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, ei = /^(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, ti = /^(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, ii = /^(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;
|
|
1049
|
+
function er(i) {
|
|
1050
1050
|
if (!["DMS", "DM", "DD"].includes(i))
|
|
1051
1051
|
throw new Error("invalid format specified");
|
|
1052
1052
|
if (this.decimalCoordinates && this.decimalCoordinates.trim()) {
|
|
1053
|
-
const e = this.decimalCoordinates.split(",").map((g) => Number(g.trim())), t = Number(e[0]), n = Number(e[1]), r = Math.abs(t),
|
|
1053
|
+
const e = this.decimalCoordinates.split(",").map((g) => Number(g.trim())), t = Number(e[0]), n = Number(e[1]), r = Math.abs(t), s = Math.abs(n), u = t > 0 ? "N" : "S", o = n > 0 ? "E" : "W";
|
|
1054
1054
|
let c;
|
|
1055
|
-
i == "DD" && (c = `${r}° ${u}, ${
|
|
1056
|
-
const l = Math.floor(r), d = Math.floor(
|
|
1055
|
+
i == "DD" && (c = `${r}° ${u}, ${s}° ${o}`);
|
|
1056
|
+
const l = Math.floor(r), d = Math.floor(s), a = (r - l) * 60, f = (s - d) * 60;
|
|
1057
1057
|
if (i == "DM") {
|
|
1058
|
-
let g =
|
|
1059
|
-
g.endsWith(".000") && v.endsWith(".000") && (g = g.replace(/\.000$/, ""), v = v.replace(/\.000$/, "")), c = `${l}° ${g}' ${u}, ${d}° ${v}' ${
|
|
1058
|
+
let g = ni(a, 3).toFixed(3).padStart(6, "0"), v = ni(f, 3).toFixed(3).padStart(6, "0");
|
|
1059
|
+
g.endsWith(".000") && v.endsWith(".000") && (g = g.replace(/\.000$/, ""), v = v.replace(/\.000$/, "")), c = `${l}° ${g}' ${u}, ${d}° ${v}' ${o}`;
|
|
1060
1060
|
}
|
|
1061
1061
|
if (i == "DMS") {
|
|
1062
1062
|
const g = Math.floor(a), v = Math.floor(f);
|
|
1063
1063
|
let _ = ((a - g) * 60).toFixed(1).padStart(4, "0"), h = ((f - v) * 60).toFixed(1).padStart(4, "0");
|
|
1064
1064
|
const y = g.toString().padStart(2, "0"), p = v.toString().padStart(2, "0");
|
|
1065
|
-
_.endsWith(".0") && h.endsWith(".0") && (_ = _.replace(/\.0$/, ""), h = h.replace(/\.0$/, "")), c = `${l}° ${y}' ${_}" ${u}, ${d}° ${p}' ${h}" ${
|
|
1065
|
+
_.endsWith(".0") && h.endsWith(".0") && (_ = _.replace(/\.0$/, ""), h = h.replace(/\.0$/, "")), c = `${l}° ${y}' ${_}" ${u}, ${d}° ${p}' ${h}" ${o}`;
|
|
1066
1066
|
}
|
|
1067
1067
|
return c;
|
|
1068
1068
|
} else
|
|
1069
1069
|
throw new Error("no decimal coordinates to convert");
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1071
|
+
function ni(i, e) {
|
|
1072
1072
|
const t = Math.pow(10, e);
|
|
1073
1073
|
return Math.round((i + Number.EPSILON) * t) / t;
|
|
1074
1074
|
}
|
|
1075
|
-
function
|
|
1075
|
+
function Ot(i, e) {
|
|
1076
1076
|
e || (e = 5), i = i.replace(/\s+/g, " ").trim();
|
|
1077
|
-
let t = null, n = null, r = "",
|
|
1078
|
-
if (
|
|
1077
|
+
let t = null, n = null, r = "", s = "", u = null, o = [], c = !1;
|
|
1078
|
+
if ($n.test(i))
|
|
1079
1079
|
throw new Error("invalid coordinate value");
|
|
1080
|
-
if (
|
|
1081
|
-
if (
|
|
1082
|
-
t = Math.abs(
|
|
1080
|
+
if (Jt.test(i))
|
|
1081
|
+
if (o = Jt.exec(i), c = De(o), c)
|
|
1082
|
+
t = Math.abs(o[1]) + o[2] / 60, Number(o[1]) < 0 && (t *= -1), n = Math.abs(o[3]) + o[4] / 60, Number(o[3]) < 0 && (n *= -1), u = "DM";
|
|
1083
1083
|
else
|
|
1084
1084
|
throw new Error("invalid coordinate format");
|
|
1085
|
-
else if (
|
|
1086
|
-
if (
|
|
1087
|
-
if (t =
|
|
1085
|
+
else if ($t.test(i))
|
|
1086
|
+
if (o = $t.exec(i), c = De(o), c) {
|
|
1087
|
+
if (t = o[2], n = o[6], t.includes(",") && (t = t.replace(",", ".")), n.includes(",") && (n = n.replace(",", ".")), u = "DD", Number(Math.round(t)) == Number(t))
|
|
1088
1088
|
throw new Error("integer only coordinate provided");
|
|
1089
1089
|
if (Number(Math.round(n)) == Number(n))
|
|
1090
1090
|
throw new Error("integer only coordinate provided");
|
|
1091
|
-
|
|
1091
|
+
o[1] ? (r = o[1], s = o[5]) : o[4] && (r = o[4], s = o[8]);
|
|
1092
1092
|
} else
|
|
1093
1093
|
throw new Error("invalid decimal coordinate format");
|
|
1094
|
-
else if (
|
|
1095
|
-
if (
|
|
1096
|
-
t = Math.abs(parseInt(
|
|
1094
|
+
else if (ei.test(i))
|
|
1095
|
+
if (o = ei.exec(i), c = De(o), c)
|
|
1096
|
+
t = Math.abs(parseInt(o[2])), o[4] && (t += o[4] / 60, u = "DM"), o[6] && (t += o[6].replace(",", ".") / 3600, u = "DMS"), parseInt(o[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(o[9])), o[11] && (n += o[11] / 60), o[13] && (n += o[13].replace(",", ".") / 3600), parseInt(o[9]) < 0 && (n = -1 * n), o[1] ? (r = o[1], s = o[8]) : o[7] && (r = o[7], s = o[14]);
|
|
1097
1097
|
else
|
|
1098
1098
|
throw new Error("invalid DMS coordinates format");
|
|
1099
|
-
else if (
|
|
1100
|
-
if (
|
|
1101
|
-
t = Math.abs(parseInt(
|
|
1099
|
+
else if (ti.test(i))
|
|
1100
|
+
if (o = ti.exec(i), c = De(o), c)
|
|
1101
|
+
t = Math.abs(parseInt(o[2])), o[4] && (t += o[4] / 60, u = "DM"), o[6] && (t += o[6] / 3600, u = "DMS"), parseInt(o[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(o[10])), o[12] && (n += o[12] / 60), o[14] && (n += o[14] / 3600), parseInt(o[10]) < 0 && (n = -1 * n), o[1] ? (r = o[1], s = o[9]) : o[8] && (r = o[8], s = o[16]);
|
|
1102
1102
|
else
|
|
1103
1103
|
throw new Error("invalid DMS coordinates format");
|
|
1104
|
-
else if (
|
|
1105
|
-
if (
|
|
1104
|
+
else if (ii.test(i)) {
|
|
1105
|
+
if (o = ii.exec(i), c = De(o), o.filter((l) => l).length <= 5)
|
|
1106
1106
|
throw new Error("invalid coordinates format");
|
|
1107
1107
|
if (c)
|
|
1108
|
-
t = Math.abs(parseInt(
|
|
1108
|
+
t = Math.abs(parseInt(o[2])), o[4] && (t += o[4].replace(",", ".") / 60, u = "DM"), o[6] && (t += o[6].replace(",", ".") / 3600, u = "DMS"), parseInt(o[2]) < 0 && (t = -1 * t), n = Math.abs(parseInt(o[10])), o[12] && (n += o[12].replace(",", ".") / 60), o[14] && (n += o[14].replace(",", ".") / 3600), parseInt(o[10]) < 0 && (n = -1 * n), o[1] ? (r = o[1], s = o[9]) : o[8] && (r = o[8], s = o[16]);
|
|
1109
1109
|
else
|
|
1110
1110
|
throw new Error("invalid coordinates format");
|
|
1111
1111
|
}
|
|
@@ -1114,14 +1114,14 @@ function zt(i, e) {
|
|
|
1114
1114
|
throw new Error("invalid longitude value");
|
|
1115
1115
|
if (Math.abs(t) >= 90)
|
|
1116
1116
|
throw new Error("invalid latitude value");
|
|
1117
|
-
if (r && !
|
|
1117
|
+
if (r && !s || !r && s)
|
|
1118
1118
|
throw new Error("invalid coordinates value");
|
|
1119
|
-
if (r && r ==
|
|
1119
|
+
if (r && r == s)
|
|
1120
1120
|
throw new Error("invalid coordinates format");
|
|
1121
1121
|
t.toString().includes(",") && (t = t.replace(",", ".")), n.toString().includes(",") && (n = n.replace(",", "."));
|
|
1122
1122
|
let l = /S|SOUTH/i;
|
|
1123
|
-
l.test(r) && t > 0 && (t = -1 * t), l = /W|WEST/i, l.test(
|
|
1124
|
-
const d =
|
|
1123
|
+
l.test(r) && t > 0 && (t = -1 * t), l = /W|WEST/i, l.test(s) && n > 0 && (n = -1 * n);
|
|
1124
|
+
const d = o[0].trim();
|
|
1125
1125
|
let a, f;
|
|
1126
1126
|
const g = /[,/;\u0020]/g, v = d.match(g);
|
|
1127
1127
|
if (v == null) {
|
|
@@ -1134,9 +1134,9 @@ function zt(i, e) {
|
|
|
1134
1134
|
if (y == 0)
|
|
1135
1135
|
p = d.indexOf(v[0]), a = d.substring(0, p).trim(), f = d.substring(p + 1).trim();
|
|
1136
1136
|
else {
|
|
1137
|
-
let
|
|
1138
|
-
for (;
|
|
1139
|
-
p = d.indexOf(v[
|
|
1137
|
+
let E = 0, S = 0;
|
|
1138
|
+
for (; E <= y; )
|
|
1139
|
+
p = d.indexOf(v[E], S), S = p + 1, E++;
|
|
1140
1140
|
a = d.substring(0, p).trim(), f = d.substring(p + 1).trim();
|
|
1141
1141
|
}
|
|
1142
1142
|
}
|
|
@@ -1156,23 +1156,23 @@ function zt(i, e) {
|
|
|
1156
1156
|
decimalLongitude: n,
|
|
1157
1157
|
decimalCoordinates: `${t},${n}`,
|
|
1158
1158
|
originalFormat: u,
|
|
1159
|
-
closeEnough:
|
|
1160
|
-
toCoordinateFormat:
|
|
1159
|
+
closeEnough: tr,
|
|
1160
|
+
toCoordinateFormat: er
|
|
1161
1161
|
});
|
|
1162
1162
|
} else
|
|
1163
1163
|
throw new Error("coordinates pattern match failed");
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function De(i) {
|
|
1166
1166
|
if (!isNaN(i[0]))
|
|
1167
1167
|
return !1;
|
|
1168
1168
|
const e = [...i];
|
|
1169
1169
|
if (e.shift(), e.length % 2 > 0)
|
|
1170
1170
|
return !1;
|
|
1171
1171
|
const t = /^[-+]?\d+([\.,]\d+)?$/, n = /[eastsouthnorthwest]+/i, r = e.length / 2;
|
|
1172
|
-
for (let
|
|
1173
|
-
const u = e[
|
|
1174
|
-
if (!(u == null &&
|
|
1175
|
-
if (u == null ||
|
|
1172
|
+
for (let s = 0; s < r; s++) {
|
|
1173
|
+
const u = e[s], o = e[s + r], c = t.test(u) && t.test(o), l = n.test(u) && n.test(o), d = u == o;
|
|
1174
|
+
if (!(u == null && o == null)) {
|
|
1175
|
+
if (u == null || o == null)
|
|
1176
1176
|
return !1;
|
|
1177
1177
|
if (c || l || d)
|
|
1178
1178
|
continue;
|
|
@@ -1181,28 +1181,28 @@ function Fe(i) {
|
|
|
1181
1181
|
}
|
|
1182
1182
|
return !0;
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1184
|
+
function ri(i, e) {
|
|
1185
1185
|
const t = Math.abs(i - e);
|
|
1186
1186
|
return Number(t.toFixed(6)) <= 1e-5;
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1188
|
+
function tr(i) {
|
|
1189
1189
|
if (!i)
|
|
1190
1190
|
throw new Error("coords must be provided");
|
|
1191
1191
|
if (i.includes(",")) {
|
|
1192
1192
|
const e = i.split(",");
|
|
1193
1193
|
if (Number(e[0]) == NaN || Number(e[1]) == NaN)
|
|
1194
1194
|
throw new Error("coords are not valid decimals");
|
|
1195
|
-
return
|
|
1195
|
+
return ri(this.decimalLatitude, Number(e[0])) && ri(this.decimalLongitude, e[1]);
|
|
1196
1196
|
} else
|
|
1197
1197
|
throw new Error("coords being tested must be separated by a comma");
|
|
1198
1198
|
}
|
|
1199
|
-
const
|
|
1199
|
+
const ir = Object.freeze({
|
|
1200
1200
|
DMS: "DMS",
|
|
1201
1201
|
DM: "DM",
|
|
1202
1202
|
DD: "DD"
|
|
1203
1203
|
});
|
|
1204
|
-
|
|
1205
|
-
const
|
|
1204
|
+
Ot.to = ir;
|
|
1205
|
+
const nr = [
|
|
1206
1206
|
{
|
|
1207
1207
|
verbatimCoordinates: "40.123, -74.123",
|
|
1208
1208
|
verbatimLatitude: "40.123",
|
|
@@ -1343,10 +1343,10 @@ const lr = [
|
|
|
1343
1343
|
verbatimLatitude: "40 7 22.8",
|
|
1344
1344
|
verbatimLongitude: "-74 7 22.8"
|
|
1345
1345
|
}
|
|
1346
|
-
],
|
|
1346
|
+
], rr = {
|
|
1347
1347
|
decimalLatitude: 40.123,
|
|
1348
1348
|
decimalLongitude: -74.123
|
|
1349
|
-
},
|
|
1349
|
+
}, sr = [
|
|
1350
1350
|
{
|
|
1351
1351
|
verbatimCoordinates: `50°4'17.698"south, 14°24'2.826"east`,
|
|
1352
1352
|
verbatimLatitude: `50°4'17.698"south`,
|
|
@@ -1431,7 +1431,7 @@ const lr = [
|
|
|
1431
1431
|
decimalLatitude: -18.4,
|
|
1432
1432
|
decimalLongitude: 22.75
|
|
1433
1433
|
}
|
|
1434
|
-
],
|
|
1434
|
+
], or = [
|
|
1435
1435
|
{
|
|
1436
1436
|
verbatimCoordinates: "10.432342S 10.6345345E",
|
|
1437
1437
|
verbatimLatitude: "10.432342S",
|
|
@@ -1566,27 +1566,27 @@ const lr = [
|
|
|
1566
1566
|
decimalLongitude: 18.33453
|
|
1567
1567
|
}
|
|
1568
1568
|
];
|
|
1569
|
-
function
|
|
1569
|
+
function lr() {
|
|
1570
1570
|
const i = [];
|
|
1571
|
-
return
|
|
1572
|
-
e.decimalLatitude ? i.push(e) : i.push({ ...e, ...
|
|
1573
|
-
}), [...i, ...
|
|
1574
|
-
}
|
|
1575
|
-
const
|
|
1576
|
-
|
|
1577
|
-
const
|
|
1578
|
-
function
|
|
1571
|
+
return nr.forEach((e) => {
|
|
1572
|
+
e.decimalLatitude ? i.push(e) : i.push({ ...e, ...rr });
|
|
1573
|
+
}), [...i, ...sr, ...or];
|
|
1574
|
+
}
|
|
1575
|
+
const ur = lr();
|
|
1576
|
+
Ot.formats = ur.map((i) => i.verbatimCoordinates);
|
|
1577
|
+
const ar = Ot;
|
|
1578
|
+
function si(i, e, t) {
|
|
1579
1579
|
const n = i.slice();
|
|
1580
|
-
return n[
|
|
1580
|
+
return n[84] = e[t], n[86] = t, n;
|
|
1581
1581
|
}
|
|
1582
|
-
function
|
|
1582
|
+
function oi(i) {
|
|
1583
1583
|
let e, t;
|
|
1584
|
-
return e = new
|
|
1584
|
+
return e = new jn({}), {
|
|
1585
1585
|
c() {
|
|
1586
|
-
|
|
1586
|
+
we(e.$$.fragment);
|
|
1587
1587
|
},
|
|
1588
1588
|
m(n, r) {
|
|
1589
|
-
|
|
1589
|
+
he(e, n, r), t = !0;
|
|
1590
1590
|
},
|
|
1591
1591
|
i(n) {
|
|
1592
1592
|
t || (j(e.$$.fragment, n), t = !0);
|
|
@@ -1595,43 +1595,43 @@ function ai(i) {
|
|
|
1595
1595
|
V(e.$$.fragment, n), t = !1;
|
|
1596
1596
|
},
|
|
1597
1597
|
d(n) {
|
|
1598
|
-
|
|
1598
|
+
ge(e, n);
|
|
1599
1599
|
}
|
|
1600
1600
|
};
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1603
|
-
let e, t, n, r,
|
|
1604
|
-
return t = new
|
|
1602
|
+
function li(i) {
|
|
1603
|
+
let e, t, n, r, s;
|
|
1604
|
+
return t = new Vn({}), {
|
|
1605
1605
|
c() {
|
|
1606
|
-
e = A("button"),
|
|
1606
|
+
e = A("button"), we(t.$$.fragment), b(e, "type", "button"), b(
|
|
1607
1607
|
e,
|
|
1608
1608
|
"title",
|
|
1609
1609
|
/*reverseButtonTitle*/
|
|
1610
1610
|
i[9]
|
|
1611
|
-
), b(e, "class", "svelte-bz0zu3"),
|
|
1611
|
+
), b(e, "class", "svelte-bz0zu3"), re(
|
|
1612
1612
|
e,
|
|
1613
1613
|
"active",
|
|
1614
1614
|
/*reverseActive*/
|
|
1615
1615
|
i[0]
|
|
1616
1616
|
);
|
|
1617
1617
|
},
|
|
1618
|
-
m(u,
|
|
1619
|
-
U(u, e,
|
|
1618
|
+
m(u, o) {
|
|
1619
|
+
U(u, e, o), he(t, e, null), n = !0, r || (s = $(
|
|
1620
1620
|
e,
|
|
1621
1621
|
"click",
|
|
1622
1622
|
/*click_handler_2*/
|
|
1623
|
-
i[
|
|
1623
|
+
i[69]
|
|
1624
1624
|
), r = !0);
|
|
1625
1625
|
},
|
|
1626
|
-
p(u,
|
|
1627
|
-
(!n ||
|
|
1626
|
+
p(u, o) {
|
|
1627
|
+
(!n || o[0] & /*reverseButtonTitle*/
|
|
1628
1628
|
512) && b(
|
|
1629
1629
|
e,
|
|
1630
1630
|
"title",
|
|
1631
1631
|
/*reverseButtonTitle*/
|
|
1632
1632
|
u[9]
|
|
1633
|
-
), (!n ||
|
|
1634
|
-
1) &&
|
|
1633
|
+
), (!n || o[0] & /*reverseActive*/
|
|
1634
|
+
1) && re(
|
|
1635
1635
|
e,
|
|
1636
1636
|
"active",
|
|
1637
1637
|
/*reverseActive*/
|
|
@@ -1645,24 +1645,24 @@ function ci(i) {
|
|
|
1645
1645
|
V(t.$$.fragment, u), n = !1;
|
|
1646
1646
|
},
|
|
1647
1647
|
d(u) {
|
|
1648
|
-
u && B(e),
|
|
1648
|
+
u && B(e), ge(t), r = !1, s();
|
|
1649
1649
|
}
|
|
1650
1650
|
};
|
|
1651
1651
|
}
|
|
1652
|
-
function
|
|
1653
|
-
let e, t = [], n = /* @__PURE__ */ new Map(), r,
|
|
1652
|
+
function cr(i) {
|
|
1653
|
+
let e, t = [], n = /* @__PURE__ */ new Map(), r, s, u, o = Kt(
|
|
1654
1654
|
/*listFeatures*/
|
|
1655
1655
|
i[14]
|
|
1656
1656
|
);
|
|
1657
1657
|
const c = (l) => (
|
|
1658
1658
|
/*feature*/
|
|
1659
|
-
l[
|
|
1660
|
-
(l[
|
|
1661
|
-
l[
|
|
1659
|
+
l[84].id + /*feature*/
|
|
1660
|
+
(l[84].address ? "," + /*feature*/
|
|
1661
|
+
l[84].address : "")
|
|
1662
1662
|
);
|
|
1663
|
-
for (let l = 0; l <
|
|
1664
|
-
let d =
|
|
1665
|
-
n.set(a, t[l] =
|
|
1663
|
+
for (let l = 0; l < o.length; l += 1) {
|
|
1664
|
+
let d = si(i, o, l), a = c(d);
|
|
1665
|
+
n.set(a, t[l] = ui(a, d));
|
|
1666
1666
|
}
|
|
1667
1667
|
return {
|
|
1668
1668
|
c() {
|
|
@@ -1675,31 +1675,31 @@ function gr(i) {
|
|
|
1675
1675
|
U(l, e, d);
|
|
1676
1676
|
for (let a = 0; a < t.length; a += 1)
|
|
1677
1677
|
t[a] && t[a].m(e, null);
|
|
1678
|
-
r = !0,
|
|
1678
|
+
r = !0, s || (u = [
|
|
1679
1679
|
$(
|
|
1680
1680
|
e,
|
|
1681
1681
|
"mouseleave",
|
|
1682
1682
|
/*mouseleave_handler*/
|
|
1683
|
-
i[
|
|
1683
|
+
i[73]
|
|
1684
1684
|
),
|
|
1685
1685
|
$(
|
|
1686
1686
|
e,
|
|
1687
1687
|
"blur",
|
|
1688
1688
|
/*blur_handler_1*/
|
|
1689
|
-
i[
|
|
1689
|
+
i[74]
|
|
1690
1690
|
)
|
|
1691
|
-
],
|
|
1691
|
+
], s = !0);
|
|
1692
1692
|
},
|
|
1693
1693
|
p(l, d) {
|
|
1694
1694
|
d[0] & /*listFeatures, showPlaceType, selectedItemIndex, missingIconsCache, iconsBaseUrl, pick*/
|
|
1695
|
-
17880064 && (
|
|
1695
|
+
17880064 && (o = Kt(
|
|
1696
1696
|
/*listFeatures*/
|
|
1697
1697
|
l[14]
|
|
1698
|
-
),
|
|
1698
|
+
), nt(), t = Mn(t, d, c, 1, l, o, n, e, xn, ui, null, si), rt());
|
|
1699
1699
|
},
|
|
1700
1700
|
i(l) {
|
|
1701
1701
|
if (!r) {
|
|
1702
|
-
for (let d = 0; d <
|
|
1702
|
+
for (let d = 0; d < o.length; d += 1)
|
|
1703
1703
|
j(t[d]);
|
|
1704
1704
|
r = !0;
|
|
1705
1705
|
}
|
|
@@ -1713,46 +1713,46 @@ function gr(i) {
|
|
|
1713
1713
|
l && B(e);
|
|
1714
1714
|
for (let d = 0; d < t.length; d += 1)
|
|
1715
1715
|
t[d].d();
|
|
1716
|
-
|
|
1716
|
+
s = !1, me(u);
|
|
1717
1717
|
}
|
|
1718
1718
|
};
|
|
1719
1719
|
}
|
|
1720
|
-
function
|
|
1721
|
-
let e, t, n, r,
|
|
1722
|
-
return t = new
|
|
1720
|
+
function fr(i) {
|
|
1721
|
+
let e, t, n, r, s, u;
|
|
1722
|
+
return t = new Ii({}), {
|
|
1723
1723
|
c() {
|
|
1724
|
-
e = A("div"),
|
|
1724
|
+
e = A("div"), we(t.$$.fragment), n = ie(), r = A("div"), s = Ee(
|
|
1725
1725
|
/*noResultsMessage*/
|
|
1726
1726
|
i[7]
|
|
1727
1727
|
), b(r, "class", "svelte-bz0zu3"), b(e, "class", "no-results svelte-bz0zu3");
|
|
1728
1728
|
},
|
|
1729
|
-
m(
|
|
1730
|
-
U(
|
|
1729
|
+
m(o, c) {
|
|
1730
|
+
U(o, e, c), he(t, e, null), P(e, n), P(e, r), P(r, s), u = !0;
|
|
1731
1731
|
},
|
|
1732
|
-
p(
|
|
1732
|
+
p(o, c) {
|
|
1733
1733
|
(!u || c[0] & /*noResultsMessage*/
|
|
1734
|
-
128) &&
|
|
1735
|
-
|
|
1734
|
+
128) && Ge(
|
|
1735
|
+
s,
|
|
1736
1736
|
/*noResultsMessage*/
|
|
1737
|
-
|
|
1737
|
+
o[7]
|
|
1738
1738
|
);
|
|
1739
1739
|
},
|
|
1740
|
-
i(
|
|
1741
|
-
u || (j(t.$$.fragment,
|
|
1740
|
+
i(o) {
|
|
1741
|
+
u || (j(t.$$.fragment, o), u = !0);
|
|
1742
1742
|
},
|
|
1743
|
-
o(
|
|
1744
|
-
V(t.$$.fragment,
|
|
1743
|
+
o(o) {
|
|
1744
|
+
V(t.$$.fragment, o), u = !1;
|
|
1745
1745
|
},
|
|
1746
|
-
d(
|
|
1747
|
-
|
|
1746
|
+
d(o) {
|
|
1747
|
+
o && B(e), ge(t);
|
|
1748
1748
|
}
|
|
1749
1749
|
};
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1751
|
+
function dr(i) {
|
|
1752
1752
|
let e = "", t;
|
|
1753
1753
|
return {
|
|
1754
1754
|
c() {
|
|
1755
|
-
t =
|
|
1755
|
+
t = Ee(e);
|
|
1756
1756
|
},
|
|
1757
1757
|
m(n, r) {
|
|
1758
1758
|
U(n, t, r);
|
|
@@ -1765,27 +1765,27 @@ function yr(i) {
|
|
|
1765
1765
|
}
|
|
1766
1766
|
};
|
|
1767
1767
|
}
|
|
1768
|
-
function
|
|
1769
|
-
let e, t, n, r,
|
|
1770
|
-
return t = new
|
|
1768
|
+
function hr(i) {
|
|
1769
|
+
let e, t, n, r, s, u, o, c, l, d, a;
|
|
1770
|
+
return t = new Ii({}), c = new Pi({}), {
|
|
1771
1771
|
c() {
|
|
1772
|
-
e = A("div"),
|
|
1772
|
+
e = A("div"), we(t.$$.fragment), n = ie(), r = A("div"), s = Ee(
|
|
1773
1773
|
/*errorMessage*/
|
|
1774
1774
|
i[6]
|
|
1775
|
-
), u = ie(),
|
|
1775
|
+
), u = ie(), o = A("button"), we(c.$$.fragment), b(r, "class", "svelte-bz0zu3"), b(o, "class", "svelte-bz0zu3"), b(e, "class", "error svelte-bz0zu3");
|
|
1776
1776
|
},
|
|
1777
1777
|
m(f, g) {
|
|
1778
|
-
U(f, e, g),
|
|
1779
|
-
|
|
1778
|
+
U(f, e, g), he(t, e, null), P(e, n), P(e, r), P(r, s), P(e, u), P(e, o), he(c, o, null), l = !0, d || (a = $(
|
|
1779
|
+
o,
|
|
1780
1780
|
"click",
|
|
1781
1781
|
/*click_handler_3*/
|
|
1782
|
-
i[
|
|
1782
|
+
i[70]
|
|
1783
1783
|
), d = !0);
|
|
1784
1784
|
},
|
|
1785
1785
|
p(f, g) {
|
|
1786
1786
|
(!l || g[0] & /*errorMessage*/
|
|
1787
|
-
64) &&
|
|
1788
|
-
|
|
1787
|
+
64) && Ge(
|
|
1788
|
+
s,
|
|
1789
1789
|
/*errorMessage*/
|
|
1790
1790
|
f[6]
|
|
1791
1791
|
);
|
|
@@ -1797,35 +1797,35 @@ function vr(i) {
|
|
|
1797
1797
|
V(t.$$.fragment, f), V(c.$$.fragment, f), l = !1;
|
|
1798
1798
|
},
|
|
1799
1799
|
d(f) {
|
|
1800
|
-
f && B(e),
|
|
1800
|
+
f && B(e), ge(t), ge(c), d = !1, a();
|
|
1801
1801
|
}
|
|
1802
1802
|
};
|
|
1803
1803
|
}
|
|
1804
|
-
function
|
|
1804
|
+
function ui(i, e) {
|
|
1805
1805
|
let t, n, r;
|
|
1806
|
-
function
|
|
1806
|
+
function s() {
|
|
1807
1807
|
return (
|
|
1808
1808
|
/*mouseenter_handler*/
|
|
1809
|
-
e[
|
|
1809
|
+
e[71](
|
|
1810
1810
|
/*i*/
|
|
1811
|
-
e[
|
|
1811
|
+
e[86]
|
|
1812
1812
|
)
|
|
1813
1813
|
);
|
|
1814
1814
|
}
|
|
1815
1815
|
function u() {
|
|
1816
1816
|
return (
|
|
1817
1817
|
/*focus_handler_1*/
|
|
1818
|
-
e[
|
|
1818
|
+
e[72](
|
|
1819
1819
|
/*feature*/
|
|
1820
|
-
e[
|
|
1820
|
+
e[84]
|
|
1821
1821
|
)
|
|
1822
1822
|
);
|
|
1823
1823
|
}
|
|
1824
|
-
return n = new
|
|
1824
|
+
return n = new Fn({
|
|
1825
1825
|
props: {
|
|
1826
1826
|
feature: (
|
|
1827
1827
|
/*feature*/
|
|
1828
|
-
e[
|
|
1828
|
+
e[84]
|
|
1829
1829
|
),
|
|
1830
1830
|
showPlaceType: (
|
|
1831
1831
|
/*showPlaceType*/
|
|
@@ -1834,7 +1834,7 @@ function fi(i, e) {
|
|
|
1834
1834
|
selected: (
|
|
1835
1835
|
/*selectedItemIndex*/
|
|
1836
1836
|
e[15] === /*i*/
|
|
1837
|
-
e[
|
|
1837
|
+
e[86]
|
|
1838
1838
|
),
|
|
1839
1839
|
missingIconsCache: (
|
|
1840
1840
|
/*missingIconsCache*/
|
|
@@ -1845,72 +1845,72 @@ function fi(i, e) {
|
|
|
1845
1845
|
e[12]
|
|
1846
1846
|
)
|
|
1847
1847
|
}
|
|
1848
|
-
}), n.$on("mouseenter",
|
|
1848
|
+
}), n.$on("mouseenter", s), n.$on("focus", u), {
|
|
1849
1849
|
key: i,
|
|
1850
1850
|
first: null,
|
|
1851
1851
|
c() {
|
|
1852
|
-
t =
|
|
1852
|
+
t = mn(), we(n.$$.fragment), this.first = t;
|
|
1853
1853
|
},
|
|
1854
|
-
m(
|
|
1855
|
-
U(
|
|
1854
|
+
m(o, c) {
|
|
1855
|
+
U(o, t, c), he(n, o, c), r = !0;
|
|
1856
1856
|
},
|
|
1857
|
-
p(
|
|
1858
|
-
e =
|
|
1857
|
+
p(o, c) {
|
|
1858
|
+
e = o;
|
|
1859
1859
|
const l = {};
|
|
1860
1860
|
c[0] & /*listFeatures*/
|
|
1861
1861
|
16384 && (l.feature = /*feature*/
|
|
1862
|
-
e[
|
|
1862
|
+
e[84]), c[0] & /*showPlaceType*/
|
|
1863
1863
|
1024 && (l.showPlaceType = /*showPlaceType*/
|
|
1864
1864
|
e[10]), c[0] & /*selectedItemIndex, listFeatures*/
|
|
1865
1865
|
49152 && (l.selected = /*selectedItemIndex*/
|
|
1866
1866
|
e[15] === /*i*/
|
|
1867
|
-
e[
|
|
1867
|
+
e[86]), c[0] & /*iconsBaseUrl*/
|
|
1868
1868
|
4096 && (l.iconsBaseUrl = /*iconsBaseUrl*/
|
|
1869
1869
|
e[12]), n.$set(l);
|
|
1870
1870
|
},
|
|
1871
|
-
i(
|
|
1872
|
-
r || (j(n.$$.fragment,
|
|
1871
|
+
i(o) {
|
|
1872
|
+
r || (j(n.$$.fragment, o), r = !0);
|
|
1873
1873
|
},
|
|
1874
|
-
o(
|
|
1875
|
-
V(n.$$.fragment,
|
|
1874
|
+
o(o) {
|
|
1875
|
+
V(n.$$.fragment, o), r = !1;
|
|
1876
1876
|
},
|
|
1877
|
-
d(
|
|
1878
|
-
|
|
1877
|
+
d(o) {
|
|
1878
|
+
o && B(t), ge(n, o);
|
|
1879
1879
|
}
|
|
1880
1880
|
};
|
|
1881
1881
|
}
|
|
1882
|
-
function
|
|
1883
|
-
let e, t, n, r,
|
|
1884
|
-
|
|
1885
|
-
let
|
|
1882
|
+
function gr(i) {
|
|
1883
|
+
let e, t, n, r, s, u, o, c, l, d, a, f, g, v, _, h, y, p, E, S, M, C = !1;
|
|
1884
|
+
s = new Kn({}), a = new Pi({});
|
|
1885
|
+
let w = (
|
|
1886
1886
|
/*abortController*/
|
|
1887
|
-
i[19] &&
|
|
1887
|
+
i[19] && oi()
|
|
1888
1888
|
), L = (
|
|
1889
1889
|
/*enableReverse*/
|
|
1890
|
-
i[5] === "button" &&
|
|
1890
|
+
i[5] === "button" && li(i)
|
|
1891
1891
|
);
|
|
1892
1892
|
const k = (
|
|
1893
1893
|
/*#slots*/
|
|
1894
|
-
i[
|
|
1895
|
-
), O =
|
|
1894
|
+
i[61].default
|
|
1895
|
+
), O = fn(
|
|
1896
1896
|
k,
|
|
1897
1897
|
i,
|
|
1898
1898
|
/*$$scope*/
|
|
1899
|
-
i[
|
|
1899
|
+
i[60],
|
|
1900
1900
|
null
|
|
1901
|
-
), G = [
|
|
1901
|
+
), G = [hr, dr, fr, cr], N = [];
|
|
1902
1902
|
function X(x, W) {
|
|
1903
|
-
var
|
|
1903
|
+
var se, fe;
|
|
1904
1904
|
return (
|
|
1905
1905
|
/*error*/
|
|
1906
1906
|
x[18] ? 0 : (
|
|
1907
1907
|
/*focusedDelayed*/
|
|
1908
1908
|
x[16] ? (
|
|
1909
1909
|
/*listFeatures*/
|
|
1910
|
-
((
|
|
1910
|
+
((se = x[14]) == null ? void 0 : se.length) === 0 ? 2 : (
|
|
1911
1911
|
/*focusedDelayed*/
|
|
1912
1912
|
x[16] && /*listFeatures*/
|
|
1913
|
-
((
|
|
1913
|
+
((fe = x[14]) != null && fe.length) ? 3 : -1
|
|
1914
1914
|
)
|
|
1915
1915
|
) : 1
|
|
1916
1916
|
)
|
|
@@ -1918,30 +1918,30 @@ function pr(i) {
|
|
|
1918
1918
|
}
|
|
1919
1919
|
return ~(h = X(i)) && (y = N[h] = G[h](i)), {
|
|
1920
1920
|
c() {
|
|
1921
|
-
e = ie(), t = A("form"), n = A("div"), r = A("button"),
|
|
1922
|
-
|
|
1921
|
+
e = ie(), t = A("form"), n = A("div"), r = A("button"), we(s.$$.fragment), u = ie(), o = A("input"), c = ie(), l = A("div"), d = A("button"), we(a.$$.fragment), f = ie(), w && w.c(), g = ie(), L && L.c(), v = ie(), O && O.c(), _ = ie(), y && y.c(), b(r, "class", "search-button svelte-bz0zu3"), b(r, "type", "button"), b(
|
|
1922
|
+
o,
|
|
1923
1923
|
"placeholder",
|
|
1924
1924
|
/*placeholder*/
|
|
1925
1925
|
i[8]
|
|
1926
1926
|
), b(
|
|
1927
|
-
|
|
1927
|
+
o,
|
|
1928
1928
|
"aria-label",
|
|
1929
1929
|
/*placeholder*/
|
|
1930
1930
|
i[8]
|
|
1931
|
-
), b(
|
|
1931
|
+
), b(o, "class", "svelte-bz0zu3"), b(d, "type", "button"), b(
|
|
1932
1932
|
d,
|
|
1933
1933
|
"title",
|
|
1934
1934
|
/*clearButtonTitle*/
|
|
1935
1935
|
i[3]
|
|
1936
|
-
), b(d, "class", "svelte-bz0zu3"), b(l, "class", "clear-button-container svelte-bz0zu3"),
|
|
1936
|
+
), b(d, "class", "svelte-bz0zu3"), b(l, "class", "clear-button-container svelte-bz0zu3"), re(
|
|
1937
1937
|
l,
|
|
1938
1938
|
"displayable",
|
|
1939
1939
|
/*searchValue*/
|
|
1940
1940
|
i[1] !== ""
|
|
1941
|
-
), b(n, "class", "input-group svelte-bz0zu3"), b(t, "tabindex", "0"), b(t, "class", p =
|
|
1941
|
+
), b(n, "class", "input-group svelte-bz0zu3"), b(t, "tabindex", "0"), b(t, "class", p = Zt(
|
|
1942
1942
|
/*className*/
|
|
1943
1943
|
i[2]
|
|
1944
|
-
) + " svelte-bz0zu3"),
|
|
1944
|
+
) + " svelte-bz0zu3"), re(
|
|
1945
1945
|
t,
|
|
1946
1946
|
"can-collapse",
|
|
1947
1947
|
/*collapsed*/
|
|
@@ -1950,126 +1950,126 @@ function pr(i) {
|
|
|
1950
1950
|
);
|
|
1951
1951
|
},
|
|
1952
1952
|
m(x, W) {
|
|
1953
|
-
U(x, e, W), U(x, t, W), P(t, n), P(n, r),
|
|
1954
|
-
|
|
1953
|
+
U(x, e, W), U(x, t, W), P(t, n), P(n, r), he(s, r, null), P(n, u), P(n, o), i[63](o), Ht(
|
|
1954
|
+
o,
|
|
1955
1955
|
/*searchValue*/
|
|
1956
1956
|
i[1]
|
|
1957
|
-
), P(n, c), P(n, l), P(l, d),
|
|
1957
|
+
), P(n, c), P(n, l), P(l, d), he(a, d, null), P(l, f), w && w.m(l, null), P(n, g), L && L.m(n, null), P(n, v), O && O.m(n, null), P(t, _), ~h && N[h].m(t, null), E = !0, S || (M = [
|
|
1958
1958
|
$(
|
|
1959
1959
|
r,
|
|
1960
1960
|
"click",
|
|
1961
1961
|
/*click_handler*/
|
|
1962
|
-
i[
|
|
1962
|
+
i[62]
|
|
1963
1963
|
),
|
|
1964
1964
|
$(
|
|
1965
|
-
|
|
1965
|
+
o,
|
|
1966
1966
|
"input",
|
|
1967
1967
|
/*input_1_input_handler*/
|
|
1968
|
-
i[
|
|
1968
|
+
i[64]
|
|
1969
1969
|
),
|
|
1970
1970
|
$(
|
|
1971
|
-
|
|
1971
|
+
o,
|
|
1972
1972
|
"focus",
|
|
1973
1973
|
/*focus_handler*/
|
|
1974
|
-
i[
|
|
1974
|
+
i[65]
|
|
1975
1975
|
),
|
|
1976
1976
|
$(
|
|
1977
|
-
|
|
1977
|
+
o,
|
|
1978
1978
|
"blur",
|
|
1979
1979
|
/*blur_handler*/
|
|
1980
|
-
i[
|
|
1980
|
+
i[66]
|
|
1981
1981
|
),
|
|
1982
1982
|
$(
|
|
1983
|
-
|
|
1983
|
+
o,
|
|
1984
1984
|
"keydown",
|
|
1985
1985
|
/*handleKeyDown*/
|
|
1986
1986
|
i[22]
|
|
1987
1987
|
),
|
|
1988
1988
|
$(
|
|
1989
|
-
|
|
1989
|
+
o,
|
|
1990
1990
|
"input",
|
|
1991
1991
|
/*input_handler*/
|
|
1992
|
-
i[
|
|
1992
|
+
i[67]
|
|
1993
1993
|
),
|
|
1994
1994
|
$(
|
|
1995
1995
|
d,
|
|
1996
1996
|
"click",
|
|
1997
1997
|
/*click_handler_1*/
|
|
1998
|
-
i[
|
|
1998
|
+
i[68]
|
|
1999
1999
|
),
|
|
2000
|
-
$(t, "submit",
|
|
2001
|
-
/*
|
|
2000
|
+
$(t, "submit", yn(
|
|
2001
|
+
/*handleOnSubmit*/
|
|
2002
2002
|
i[21]
|
|
2003
2003
|
))
|
|
2004
2004
|
], S = !0);
|
|
2005
2005
|
},
|
|
2006
2006
|
p(x, W) {
|
|
2007
|
-
(!
|
|
2007
|
+
(!E || W[0] & /*placeholder*/
|
|
2008
2008
|
256) && b(
|
|
2009
|
-
|
|
2009
|
+
o,
|
|
2010
2010
|
"placeholder",
|
|
2011
2011
|
/*placeholder*/
|
|
2012
2012
|
x[8]
|
|
2013
|
-
), (!
|
|
2013
|
+
), (!E || W[0] & /*placeholder*/
|
|
2014
2014
|
256) && b(
|
|
2015
|
-
|
|
2015
|
+
o,
|
|
2016
2016
|
"aria-label",
|
|
2017
2017
|
/*placeholder*/
|
|
2018
2018
|
x[8]
|
|
2019
2019
|
), W[0] & /*searchValue*/
|
|
2020
|
-
2 &&
|
|
2021
|
-
x[1] &&
|
|
2022
|
-
|
|
2020
|
+
2 && o.value !== /*searchValue*/
|
|
2021
|
+
x[1] && Ht(
|
|
2022
|
+
o,
|
|
2023
2023
|
/*searchValue*/
|
|
2024
2024
|
x[1]
|
|
2025
|
-
), (!
|
|
2025
|
+
), (!E || W[0] & /*clearButtonTitle*/
|
|
2026
2026
|
8) && b(
|
|
2027
2027
|
d,
|
|
2028
2028
|
"title",
|
|
2029
2029
|
/*clearButtonTitle*/
|
|
2030
2030
|
x[3]
|
|
2031
2031
|
), /*abortController*/
|
|
2032
|
-
x[19] ?
|
|
2033
|
-
524288 && j(
|
|
2034
|
-
|
|
2035
|
-
}),
|
|
2036
|
-
2) &&
|
|
2032
|
+
x[19] ? w ? W[0] & /*abortController*/
|
|
2033
|
+
524288 && j(w, 1) : (w = oi(), w.c(), j(w, 1), w.m(l, null)) : w && (nt(), V(w, 1, 1, () => {
|
|
2034
|
+
w = null;
|
|
2035
|
+
}), rt()), (!E || W[0] & /*searchValue*/
|
|
2036
|
+
2) && re(
|
|
2037
2037
|
l,
|
|
2038
2038
|
"displayable",
|
|
2039
2039
|
/*searchValue*/
|
|
2040
2040
|
x[1] !== ""
|
|
2041
2041
|
), /*enableReverse*/
|
|
2042
2042
|
x[5] === "button" ? L ? (L.p(x, W), W[0] & /*enableReverse*/
|
|
2043
|
-
32 && j(L, 1)) : (L =
|
|
2043
|
+
32 && j(L, 1)) : (L = li(x), L.c(), j(L, 1), L.m(n, v)) : L && (nt(), V(L, 1, 1, () => {
|
|
2044
2044
|
L = null;
|
|
2045
|
-
}),
|
|
2046
|
-
|
|
2045
|
+
}), rt()), O && O.p && (!E || W[1] & /*$$scope*/
|
|
2046
|
+
536870912) && hn(
|
|
2047
2047
|
O,
|
|
2048
2048
|
k,
|
|
2049
2049
|
x,
|
|
2050
2050
|
/*$$scope*/
|
|
2051
|
-
x[
|
|
2052
|
-
|
|
2051
|
+
x[60],
|
|
2052
|
+
E ? dn(
|
|
2053
2053
|
k,
|
|
2054
2054
|
/*$$scope*/
|
|
2055
|
-
x[
|
|
2055
|
+
x[60],
|
|
2056
2056
|
W,
|
|
2057
2057
|
null
|
|
2058
|
-
) :
|
|
2058
|
+
) : gn(
|
|
2059
2059
|
/*$$scope*/
|
|
2060
|
-
x[
|
|
2060
|
+
x[60]
|
|
2061
2061
|
),
|
|
2062
2062
|
null
|
|
2063
2063
|
);
|
|
2064
|
-
let
|
|
2065
|
-
h = X(x), h ===
|
|
2066
|
-
N[
|
|
2067
|
-
}),
|
|
2068
|
-
4 && p !== (p =
|
|
2064
|
+
let se = h;
|
|
2065
|
+
h = X(x), h === se ? ~h && N[h].p(x, W) : (y && (nt(), V(N[se], 1, 1, () => {
|
|
2066
|
+
N[se] = null;
|
|
2067
|
+
}), rt()), ~h ? (y = N[h], y ? y.p(x, W) : (y = N[h] = G[h](x), y.c()), j(y, 1), y.m(t, null)) : y = null), (!E || W[0] & /*className*/
|
|
2068
|
+
4 && p !== (p = Zt(
|
|
2069
2069
|
/*className*/
|
|
2070
2070
|
x[2]
|
|
2071
|
-
) + " svelte-bz0zu3")) && b(t, "class", p), (!
|
|
2072
|
-
22) &&
|
|
2071
|
+
) + " svelte-bz0zu3")) && b(t, "class", p), (!E || W[0] & /*className, collapsed, searchValue*/
|
|
2072
|
+
22) && re(
|
|
2073
2073
|
t,
|
|
2074
2074
|
"can-collapse",
|
|
2075
2075
|
/*collapsed*/
|
|
@@ -2078,19 +2078,19 @@ function pr(i) {
|
|
|
2078
2078
|
);
|
|
2079
2079
|
},
|
|
2080
2080
|
i(x) {
|
|
2081
|
-
|
|
2081
|
+
E || (j(C), j(s.$$.fragment, x), j(a.$$.fragment, x), j(w), j(L), j(O, x), j(y), E = !0);
|
|
2082
2082
|
},
|
|
2083
2083
|
o(x) {
|
|
2084
|
-
V(C), V(
|
|
2084
|
+
V(C), V(s.$$.fragment, x), V(a.$$.fragment, x), V(w), V(L), V(O, x), V(y), E = !1;
|
|
2085
2085
|
},
|
|
2086
2086
|
d(x) {
|
|
2087
|
-
x && (B(e), B(t)),
|
|
2087
|
+
x && (B(e), B(t)), ge(s), i[63](null), ge(a), w && w.d(), L && L.d(), O && O.d(x), ~h && N[h].d(), S = !1, me(M);
|
|
2088
2088
|
}
|
|
2089
2089
|
};
|
|
2090
2090
|
}
|
|
2091
|
-
function
|
|
2092
|
-
let n, r, { $$slots:
|
|
2093
|
-
const
|
|
2091
|
+
function mr(i, e, t) {
|
|
2092
|
+
let n, r, { $$slots: s = {}, $$scope: u } = e;
|
|
2093
|
+
const o = {
|
|
2094
2094
|
continental_marine: 4,
|
|
2095
2095
|
country: 4,
|
|
2096
2096
|
major_landform: 8,
|
|
@@ -2114,236 +2114,224 @@ function br(i, e, t) {
|
|
|
2114
2114
|
"poi.restaurant": 18,
|
|
2115
2115
|
"poi.aerodrome": 13
|
|
2116
2116
|
};
|
|
2117
|
-
let { class: c = void 0 } = e, { apiKey: l } = e, { bbox: d = void 0 } = e, { clearButtonTitle: a = "clear" } = e, { clearOnBlur: f = !1 } = e, { collapsed: g = !1 } = e, { country: v = void 0 } = e, { debounceSearch: _ = 200 } = e, { enableReverse: h = "never" } = e, { errorMessage: y = "Something went wrong…" } = e, { filter: p = () => !0 } = e, { flyTo:
|
|
2117
|
+
let { class: c = void 0 } = e, { apiKey: l } = e, { bbox: d = void 0 } = e, { clearButtonTitle: a = "clear" } = e, { clearOnBlur: f = !1 } = e, { collapsed: g = !1 } = e, { country: v = void 0 } = e, { debounceSearch: _ = 200 } = e, { enableReverse: h = "never" } = e, { errorMessage: y = "Something went wrong…" } = e, { filter: p = () => !0 } = e, { flyTo: E = !0 } = e, { fuzzyMatch: S = !0 } = e, { language: M = void 0 } = e, { limit: C = void 0 } = e, { mapController: w = void 0 } = e, { minLength: L = 2 } = e, { noResultsMessage: k = "Oops! Looks like you're trying to predict something that's not quite right. We can't seem to find what you're looking for. Maybe try double-checking your spelling or try a different search term. Keep on typing - we'll do our best to get you where you need to go!" } = e, { placeholder: O = "Search" } = e, { proximity: G = [{ type: "server-geolocation" }] } = e, { reverseActive: N = h === "always" } = e, { reverseButtonTitle: X = "toggle reverse geocoding" } = e, { searchValue: x = "" } = e, { pickedResultStyle: W = "full-geometry" } = e, { showPlaceType: se = "if-needed" } = e, { showResultsWhileTyping: fe = !0 } = e, { selectFirst: Re = !0 } = e, { flyToSelected: at = !1 } = e, { markerOnSelected: Ve = !0 } = e, { types: Ce = void 0 } = e, { exhaustiveReverseGeocoding: ct = !1 } = e, { excludeTypes: Ye = !1 } = e, { zoom: Ke = o } = e, { apiUrl: ft = "https://api.maptiler.com/geocoding" } = e, { fetchParameters: dt = {} } = e, { iconsBaseUrl: Bt = "https://cdn.maptiler.com/maptiler-geocoding-control/v2.0.1/icons/" } = e, { adjustUrlQuery: ht = () => {
|
|
2118
2118
|
} } = e;
|
|
2119
|
-
function
|
|
2120
|
-
|
|
2119
|
+
function Di() {
|
|
2120
|
+
ue.focus();
|
|
2121
2121
|
}
|
|
2122
|
-
function
|
|
2123
|
-
|
|
2122
|
+
function Ui() {
|
|
2123
|
+
ue.blur();
|
|
2124
2124
|
}
|
|
2125
|
-
function
|
|
2126
|
-
t(1, x = m), F ? (t(15, D = -1),
|
|
2127
|
-
|
|
2125
|
+
function Dt(m, F = !0, H = !1) {
|
|
2126
|
+
t(1, x = m), F ? (t(15, D = -1), Ft()) : (vt(!H, H), setTimeout(() => {
|
|
2127
|
+
ue.focus(), ue.select();
|
|
2128
2128
|
}));
|
|
2129
2129
|
}
|
|
2130
|
-
function
|
|
2131
|
-
t(14, I = void 0), t(
|
|
2132
|
-
}
|
|
2133
|
-
function Qi() {
|
|
2134
|
-
t(56, q = []), t(57, T = void 0);
|
|
2130
|
+
function Fi() {
|
|
2131
|
+
t(14, I = void 0), t(56, R = void 0), t(15, D = -1);
|
|
2135
2132
|
}
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
function Hi() {
|
|
2139
|
-
return !!ne;
|
|
2133
|
+
function Gi() {
|
|
2134
|
+
t(55, q = []), t(56, R = void 0);
|
|
2140
2135
|
}
|
|
2141
|
-
|
|
2142
|
-
|
|
2136
|
+
let Te = !1, I, q, R, Ut = "", ue, D = -1, ae, Xe = [], ke, Pe, Je, gt;
|
|
2137
|
+
const ji = /* @__PURE__ */ new Set(), ye = En();
|
|
2138
|
+
bn(() => {
|
|
2139
|
+
w && (w.setEventHandler(void 0), w.indicateReverse(!1), w.setSelectedMarker(-1), w.setFeatures(void 0, void 0, !1));
|
|
2143
2140
|
});
|
|
2144
|
-
function
|
|
2145
|
-
if (
|
|
2146
|
-
|
|
2147
|
-
return;
|
|
2148
|
-
}
|
|
2149
|
-
if (D > -1 && I)
|
|
2150
|
-
t(57, T = I[D]), t(1, x = T.place_type[0] === "reverse" ? T.place_name : T.place_name.replace(/,.*/, "")), t(18, fe = void 0), t(56, q = void 0), t(15, D = -1);
|
|
2141
|
+
function Ft(m) {
|
|
2142
|
+
if (Pe && (clearTimeout(Pe), Pe = void 0), D > -1 && I)
|
|
2143
|
+
t(56, R = I[D]), t(1, x = R.place_type[0] === "reverse" ? R.place_name : R.place_name.replace(/,.*/, "")), t(18, ae = void 0), t(55, q = void 0), t(15, D = -1);
|
|
2151
2144
|
else if (x) {
|
|
2152
|
-
const F = m || !
|
|
2153
|
-
|
|
2154
|
-
t(
|
|
2155
|
-
}).catch((
|
|
2145
|
+
const F = m || !mt(x);
|
|
2146
|
+
yt(x, { exact: !0 }).then(() => {
|
|
2147
|
+
t(55, q = I), t(56, R = void 0), F && qi();
|
|
2148
|
+
}).catch((H) => t(18, ae = H));
|
|
2156
2149
|
}
|
|
2157
2150
|
}
|
|
2158
|
-
function
|
|
2151
|
+
function mt(m) {
|
|
2159
2152
|
try {
|
|
2160
|
-
return
|
|
2153
|
+
return ar(m, 6);
|
|
2161
2154
|
} catch {
|
|
2162
2155
|
return !1;
|
|
2163
2156
|
}
|
|
2164
2157
|
}
|
|
2165
|
-
async function
|
|
2166
|
-
t(18,
|
|
2158
|
+
async function yt(m, { byId: F = !1, exact: H = !1 } = {}) {
|
|
2159
|
+
t(18, ae = void 0), ke == null || ke.abort();
|
|
2167
2160
|
const te = new AbortController();
|
|
2168
|
-
t(19,
|
|
2161
|
+
t(19, ke = te);
|
|
2169
2162
|
try {
|
|
2170
|
-
const
|
|
2171
|
-
if (M !== void 0 &&
|
|
2172
|
-
const
|
|
2173
|
-
|
|
2163
|
+
const T = mt(m), Q = new URLSearchParams();
|
|
2164
|
+
if (M !== void 0 && Q.set("language", Array.isArray(M) ? M.join(",") : M ?? ""), Ce && Q.set("types", Ce.join(",")), Ye && Q.set("excludeTypes", String(Ye)), d && Q.set("bbox", d.map(($e) => $e.toFixed(6)).join(",")), v && Q.set("country", Array.isArray(v) ? v.join(",") : v), !F && !T) {
|
|
2165
|
+
const $e = await Jn(w, G, te);
|
|
2166
|
+
$e && Q.set("proximity", $e), (H || !fe) && Q.set("autocomplete", "false"), Q.set("fuzzyMatch", String(S));
|
|
2174
2167
|
}
|
|
2175
|
-
C !== void 0 && (
|
|
2176
|
-
const
|
|
2177
|
-
if (
|
|
2178
|
-
F ? (t(14, I = void 0), t(
|
|
2168
|
+
C !== void 0 && (ct || !T || (Ce == null ? void 0 : Ce.length) === 1) && Q.set("limit", String(C)), Q.set("key", l), ht(Q);
|
|
2169
|
+
const ce = ft + "/" + encodeURIComponent(T ? T.decimalLongitude + "," + T.decimalLatitude : m) + ".json?" + Q.toString();
|
|
2170
|
+
if (ce === Ut) {
|
|
2171
|
+
F ? (t(14, I = void 0), t(56, R = Xe[0])) : t(14, I = Xe);
|
|
2179
2172
|
return;
|
|
2180
2173
|
}
|
|
2181
|
-
|
|
2182
|
-
const
|
|
2183
|
-
if (!
|
|
2184
|
-
throw new Error(await
|
|
2185
|
-
const
|
|
2186
|
-
|
|
2174
|
+
Ut = ce;
|
|
2175
|
+
const bt = await fetch(ce, { signal: te.signal, ...dt });
|
|
2176
|
+
if (!bt.ok)
|
|
2177
|
+
throw new Error(await bt.text());
|
|
2178
|
+
const Et = await bt.json();
|
|
2179
|
+
ye("response", { url: ce, featureCollection: Et }), F ? (t(14, I = void 0), t(56, R = Et.features[0]), Xe = [R]) : (t(14, I = Et.features.filter(p)), T && I.unshift({
|
|
2187
2180
|
type: "Feature",
|
|
2188
2181
|
properties: {},
|
|
2189
|
-
id: "reverse_" +
|
|
2190
|
-
text:
|
|
2191
|
-
place_name:
|
|
2182
|
+
id: "reverse_" + T.decimalLongitude + "_" + T.decimalLatitude,
|
|
2183
|
+
text: T.decimalLatitude + ", " + T.decimalLongitude,
|
|
2184
|
+
place_name: T.decimalLatitude + ", " + T.decimalLongitude,
|
|
2192
2185
|
place_type: ["reverse"],
|
|
2193
|
-
center: [
|
|
2186
|
+
center: [T.decimalLongitude, T.decimalLatitude],
|
|
2194
2187
|
bbox: [
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2188
|
+
T.decimalLongitude,
|
|
2189
|
+
T.decimalLatitude,
|
|
2190
|
+
T.decimalLongitude,
|
|
2191
|
+
T.decimalLatitude
|
|
2199
2192
|
],
|
|
2200
2193
|
geometry: {
|
|
2201
2194
|
type: "Point",
|
|
2202
|
-
coordinates: [
|
|
2195
|
+
coordinates: [T.decimalLongitude, T.decimalLatitude]
|
|
2203
2196
|
}
|
|
2204
|
-
}),
|
|
2205
|
-
} catch (
|
|
2206
|
-
if (
|
|
2197
|
+
}), Xe = I, T && ue.focus());
|
|
2198
|
+
} catch (T) {
|
|
2199
|
+
if (T && typeof T == "object" && "name" in T && T.name === "AbortError")
|
|
2207
2200
|
return;
|
|
2208
|
-
throw
|
|
2201
|
+
throw T;
|
|
2209
2202
|
} finally {
|
|
2210
|
-
te ===
|
|
2203
|
+
te === ke && t(19, ke = void 0);
|
|
2211
2204
|
}
|
|
2212
2205
|
}
|
|
2213
|
-
function
|
|
2214
|
-
var
|
|
2215
|
-
if (!(q != null && q.length) || !
|
|
2206
|
+
function qi() {
|
|
2207
|
+
var te;
|
|
2208
|
+
if (!(q != null && q.length) || !E)
|
|
2216
2209
|
return;
|
|
2217
|
-
const m = [180, 90, -180, -90], F = !q.some((
|
|
2218
|
-
let
|
|
2219
|
-
for (const
|
|
2220
|
-
const
|
|
2221
|
-
if (
|
|
2222
|
-
for (const
|
|
2223
|
-
m[
|
|
2210
|
+
const m = [180, 90, -180, -90], F = !q.some((T) => !T.matching_text);
|
|
2211
|
+
let H;
|
|
2212
|
+
for (const T of q) {
|
|
2213
|
+
const Q = ze(T);
|
|
2214
|
+
if (H = H === void 0 ? Q : Q === void 0 ? H : Math.max(H, Q), F || !T.matching_text)
|
|
2215
|
+
for (const ce of [0, 1, 2, 3])
|
|
2216
|
+
m[ce] = Math[ce < 2 ? "min" : "max"](m[ce], ((te = T.bbox) == null ? void 0 : te[ce]) ?? T.center[ce % 2]);
|
|
2224
2217
|
}
|
|
2225
|
-
|
|
2218
|
+
w && q.length > 0 && (R && m[0] === m[2] && m[1] === m[3] ? w.flyTo(R.center, ze(R)) : w.fitBounds(ot(m), 50, H));
|
|
2226
2219
|
}
|
|
2227
|
-
function
|
|
2228
|
-
var
|
|
2220
|
+
function ze(m) {
|
|
2221
|
+
var H;
|
|
2229
2222
|
if (!m.bbox || m.bbox[0] !== m.bbox[2] && m.bbox[1] !== m.bbox[3])
|
|
2230
2223
|
return;
|
|
2231
2224
|
const F = m.id.replace(/\..*/, "");
|
|
2232
|
-
return (Array.isArray((
|
|
2233
|
-
(
|
|
2234
|
-
const
|
|
2235
|
-
return
|
|
2225
|
+
return (Array.isArray((H = m.properties) == null ? void 0 : H.categories) ? m.properties.categories.reduce(
|
|
2226
|
+
(te, T) => {
|
|
2227
|
+
const Q = Ke[F + "." + T];
|
|
2228
|
+
return te === void 0 ? Q : Q === void 0 ? te : Math.max(te, Q);
|
|
2236
2229
|
},
|
|
2237
2230
|
void 0
|
|
2238
|
-
) : void 0) ??
|
|
2231
|
+
) : void 0) ?? Ke[F];
|
|
2239
2232
|
}
|
|
2240
|
-
function
|
|
2241
|
-
t(0, N = h === "always"), t(14, I = void 0), t(
|
|
2233
|
+
function Qi(m) {
|
|
2234
|
+
t(0, N = h === "always"), t(14, I = void 0), t(56, R = void 0), t(15, D = -1), Dt(m[1].toFixed(6) + ", " + Xn(m[0], [-180, 180], !0).toFixed(6), !1, !0);
|
|
2242
2235
|
}
|
|
2243
|
-
function
|
|
2236
|
+
function Zi(m) {
|
|
2244
2237
|
if (!I)
|
|
2245
2238
|
return;
|
|
2246
2239
|
let F = m.key === "ArrowDown" ? 1 : m.key === "ArrowUp" ? -1 : 0;
|
|
2247
|
-
F && (D === (
|
|
2240
|
+
F && (D === (Re ? 0 : -1) && F === -1 && t(15, D = I.length), t(15, D += F), D >= I.length && t(15, D = -1), D < 0 && Re && t(15, D = 0), m.preventDefault());
|
|
2248
2241
|
}
|
|
2249
|
-
function
|
|
2250
|
-
if (t(18,
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
()
|
|
2262
|
-
t(58, ne = void 0), Be(Q, { appendSpace: !0 }).catch((re) => t(18, fe = re));
|
|
2263
|
-
},
|
|
2264
|
-
dt
|
|
2265
|
-
));
|
|
2242
|
+
function vt(m = !0, F = !1) {
|
|
2243
|
+
if (t(18, ae = void 0), fe || F) {
|
|
2244
|
+
if (Pe && clearTimeout(Pe), x.length < L)
|
|
2245
|
+
return;
|
|
2246
|
+
const H = x;
|
|
2247
|
+
Pe = window.setTimeout(
|
|
2248
|
+
() => {
|
|
2249
|
+
yt(H).catch((te) => t(18, ae = te));
|
|
2250
|
+
},
|
|
2251
|
+
m ? _ : 0
|
|
2252
|
+
);
|
|
2253
|
+
} else
|
|
2254
|
+
t(14, I = void 0), t(18, ae = void 0);
|
|
2266
2255
|
}
|
|
2267
|
-
function
|
|
2268
|
-
t(
|
|
2256
|
+
function pt(m) {
|
|
2257
|
+
t(56, R = m), t(1, x = m.place_name), t(15, D = -1);
|
|
2269
2258
|
}
|
|
2270
|
-
const
|
|
2271
|
-
function
|
|
2272
|
-
|
|
2273
|
-
|
|
2259
|
+
const Hi = () => ue.focus();
|
|
2260
|
+
function Vi(m) {
|
|
2261
|
+
Mt[m ? "unshift" : "push"](() => {
|
|
2262
|
+
ue = m, t(17, ue);
|
|
2274
2263
|
});
|
|
2275
2264
|
}
|
|
2276
|
-
function
|
|
2277
|
-
x = this.value, t(1, x), t(13,
|
|
2265
|
+
function Yi() {
|
|
2266
|
+
x = this.value, t(1, x), t(13, Te), t(28, f);
|
|
2278
2267
|
}
|
|
2279
|
-
const
|
|
2280
|
-
t(1, x = ""),
|
|
2281
|
-
},
|
|
2282
|
-
|
|
2283
|
-
},
|
|
2268
|
+
const Ki = () => t(13, Te = !0), Xi = () => t(13, Te = !1), Ji = () => vt(), $i = () => {
|
|
2269
|
+
t(1, x = ""), ue.focus();
|
|
2270
|
+
}, en = () => t(0, N = !N), tn = () => t(18, ae = void 0), nn = (m) => t(15, D = m), rn = (m) => pt(m), sn = () => {
|
|
2271
|
+
Re || t(15, D = -1);
|
|
2272
|
+
}, on = () => {
|
|
2284
2273
|
};
|
|
2285
2274
|
return i.$$set = (m) => {
|
|
2286
|
-
"class" in m && t(2, c = m.class), "apiKey" in m && t(26, l = m.apiKey), "bbox" in m && t(27, d = m.bbox), "clearButtonTitle" in m && t(3, a = m.clearButtonTitle), "clearOnBlur" in m && t(28, f = m.clearOnBlur), "collapsed" in m && t(4, g = m.collapsed), "country" in m && t(29, v = m.country), "debounceSearch" in m && t(30, _ = m.debounceSearch), "enableReverse" in m && t(5, h = m.enableReverse), "errorMessage" in m && t(6, y = m.errorMessage), "filter" in m && t(31, p = m.filter), "flyTo" in m && t(32,
|
|
2275
|
+
"class" in m && t(2, c = m.class), "apiKey" in m && t(26, l = m.apiKey), "bbox" in m && t(27, d = m.bbox), "clearButtonTitle" in m && t(3, a = m.clearButtonTitle), "clearOnBlur" in m && t(28, f = m.clearOnBlur), "collapsed" in m && t(4, g = m.collapsed), "country" in m && t(29, v = m.country), "debounceSearch" in m && t(30, _ = m.debounceSearch), "enableReverse" in m && t(5, h = 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, M = m.language), "limit" in m && t(35, C = m.limit), "mapController" in m && t(36, w = m.mapController), "minLength" in m && t(37, L = m.minLength), "noResultsMessage" in m && t(7, k = m.noResultsMessage), "placeholder" in m && t(8, O = m.placeholder), "proximity" in m && t(38, G = m.proximity), "reverseActive" in m && t(0, N = m.reverseActive), "reverseButtonTitle" in m && t(9, X = m.reverseButtonTitle), "searchValue" in m && t(1, x = m.searchValue), "pickedResultStyle" in m && t(39, W = m.pickedResultStyle), "showPlaceType" in m && t(10, se = m.showPlaceType), "showResultsWhileTyping" in m && t(40, fe = m.showResultsWhileTyping), "selectFirst" in m && t(11, Re = m.selectFirst), "flyToSelected" in m && t(41, at = m.flyToSelected), "markerOnSelected" in m && t(42, Ve = m.markerOnSelected), "types" in m && t(43, Ce = m.types), "exhaustiveReverseGeocoding" in m && t(44, ct = m.exhaustiveReverseGeocoding), "excludeTypes" in m && t(45, Ye = m.excludeTypes), "zoom" in m && t(46, Ke = m.zoom), "apiUrl" in m && t(47, ft = m.apiUrl), "fetchParameters" in m && t(48, dt = m.fetchParameters), "iconsBaseUrl" in m && t(12, Bt = m.iconsBaseUrl), "adjustUrlQuery" in m && t(49, ht = m.adjustUrlQuery), "$$scope" in m && t(60, u = m.$$scope);
|
|
2287
2276
|
}, i.$$.update = () => {
|
|
2288
2277
|
if (i.$$.dirty[0] & /*enableReverse*/
|
|
2289
2278
|
32 && t(0, N = h === "always"), i.$$.dirty[0] & /*focused, clearOnBlur*/
|
|
2290
2279
|
268443648 && setTimeout(() => {
|
|
2291
|
-
t(16,
|
|
2280
|
+
t(16, Je = Te), f && !Te && t(1, x = "");
|
|
2292
2281
|
}), i.$$.dirty[0] & /*searchValue, listFeatures*/
|
|
2293
2282
|
16386 | i.$$.dirty[1] & /*minLength*/
|
|
2294
|
-
64 && x.length < L && (t(
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
18432 &&
|
|
2283
|
+
64 && x.length < L && (t(56, R = void 0), t(14, I = void 0), t(18, ae = void 0), t(55, q = I)), i.$$.dirty[1] & /*pickedResultStyle, picked*/
|
|
2284
|
+
33554688 && W !== "marker-only" && R && !R.address && R.geometry.type === "Point" && R.place_type[0] !== "reverse" && yt(R.id, { byId: !0 }).catch((m) => t(18, ae = m)), i.$$.dirty[1] & /*mapController, picked, prevIdToFly, flyTo*/
|
|
2285
|
+
100663330 && (w && R && R.id !== gt && E && (!R.bbox || R.bbox[0] === R.bbox[2] && R.bbox[1] === R.bbox[3] ? w.flyTo(R.center, ze(R)) : w.fitBounds(ot(R.bbox), 50, ze(R)), t(14, I = void 0), t(55, q = void 0), t(15, D = -1)), t(57, gt = R == null ? void 0 : R.id)), i.$$.dirty[0] & /*selectFirst, listFeatures*/
|
|
2286
|
+
18432 && Re && I != null && I.length && t(15, D = 0), i.$$.dirty[0] & /*searchValue*/
|
|
2298
2287
|
2 && t(15, D = -1), i.$$.dirty[0] & /*listFeatures*/
|
|
2299
2288
|
16384 | i.$$.dirty[1] & /*markedFeatures*/
|
|
2300
|
-
|
|
2289
|
+
16777216 && q !== I && t(55, q = void 0), i.$$.dirty[0] & /*reverseActive, listFeatures, focusedDelayed*/
|
|
2301
2290
|
81921 | i.$$.dirty[1] & /*mapController, markedFeatures*/
|
|
2302
|
-
|
|
2291
|
+
16777248 && w && w.setEventHandler((m) => {
|
|
2303
2292
|
switch (m.type) {
|
|
2304
2293
|
case "mapClick":
|
|
2305
|
-
N &&
|
|
2294
|
+
N && Qi(m.coordinates);
|
|
2306
2295
|
break;
|
|
2307
2296
|
case "markerClick":
|
|
2308
2297
|
{
|
|
2309
|
-
const F = I == null ? void 0 : I.find((
|
|
2310
|
-
F &&
|
|
2298
|
+
const F = I == null ? void 0 : I.find((H) => H.id === m.id);
|
|
2299
|
+
F && pt(F);
|
|
2311
2300
|
}
|
|
2312
2301
|
break;
|
|
2313
2302
|
case "markerMouseEnter":
|
|
2314
|
-
q && t(15, D =
|
|
2303
|
+
q && t(15, D = Je ? (I == null ? void 0 : I.findIndex((F) => F.id === m.id)) ?? -1 : -1);
|
|
2315
2304
|
break;
|
|
2316
2305
|
case "markerMouseLeave":
|
|
2317
2306
|
q && t(15, D = -1);
|
|
2318
2307
|
break;
|
|
2319
2308
|
}
|
|
2320
2309
|
}), i.$$.dirty[0] & /*listFeatures, selectedItemIndex*/
|
|
2321
|
-
49152 && t(
|
|
2322
|
-
|
|
2323
|
-
256 && t(
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2310
|
+
49152 && t(58, r = I == null ? void 0 : I[D]), i.$$.dirty[1] & /*mapController, selected, flyTo, flyToSelected*/
|
|
2311
|
+
134218786 && w && r && E && at && w.flyTo(r.center, ze(r)), i.$$.dirty[1] & /*pickedResultStyle*/
|
|
2312
|
+
256 && t(59, n = W === "full-geometry-including-polygon-center-marker"), i.$$.dirty[1] & /*markerOnSelected, mapController, showPolygonMarker*/
|
|
2313
|
+
268437536 && (Ve || w == null || w.setFeatures(void 0, void 0, n)), i.$$.dirty[1] & /*mapController, markerOnSelected, markedFeatures, selected, showPolygonMarker*/
|
|
2314
|
+
419432480 && w && Ve && !q && (w.setFeatures(r ? [r] : void 0, void 0, n), w.setSelectedMarker(r ? 0 : -1)), i.$$.dirty[1] & /*mapController, markedFeatures, picked, showPolygonMarker*/
|
|
2315
|
+
318767136 && w && w.setFeatures(q, R, n), i.$$.dirty[0] & /*selectedItemIndex*/
|
|
2327
2316
|
32768 | i.$$.dirty[1] & /*markedFeatures, mapController*/
|
|
2328
|
-
|
|
2329
|
-
671088640 && r && (window.clearTimeout(ne), t(58, ne = void 0)), i.$$.dirty[0] & /*searchValue*/
|
|
2317
|
+
16777248 && q && w && w.setSelectedMarker(D), i.$$.dirty[0] & /*searchValue*/
|
|
2330
2318
|
2 | i.$$.dirty[1] & /*mapController*/
|
|
2331
|
-
32 &&
|
|
2332
|
-
const m =
|
|
2333
|
-
|
|
2319
|
+
32 && w) {
|
|
2320
|
+
const m = mt(x);
|
|
2321
|
+
w.setReverseMarker(m ? [m.decimalLongitude, m.decimalLatitude] : void 0);
|
|
2334
2322
|
}
|
|
2335
2323
|
i.$$.dirty[1] & /*selected*/
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
81920 &&
|
|
2339
|
-
optionsVisible:
|
|
2324
|
+
134217728 && ye("select", { feature: r }), i.$$.dirty[1] & /*picked*/
|
|
2325
|
+
33554432 && ye("pick", { feature: R }), i.$$.dirty[0] & /*focusedDelayed, listFeatures*/
|
|
2326
|
+
81920 && ye("optionsvisibilitychange", {
|
|
2327
|
+
optionsVisible: Je && !!I
|
|
2340
2328
|
}), i.$$.dirty[0] & /*listFeatures*/
|
|
2341
|
-
16384 &&
|
|
2342
|
-
|
|
2343
|
-
1 &&
|
|
2344
|
-
2 &&
|
|
2329
|
+
16384 && ye("featureslisted", { features: I }), i.$$.dirty[1] & /*markedFeatures*/
|
|
2330
|
+
16777216 && ye("featuresmarked", { features: q }), i.$$.dirty[0] & /*reverseActive*/
|
|
2331
|
+
1 && ye("reversetoggle", { reverse: N }), i.$$.dirty[0] & /*searchValue*/
|
|
2332
|
+
2 && ye("querychange", { query: x }), i.$$.dirty[0] & /*reverseActive*/
|
|
2345
2333
|
1 | i.$$.dirty[1] & /*mapController*/
|
|
2346
|
-
32 &&
|
|
2334
|
+
32 && w && w.indicateReverse(N);
|
|
2347
2335
|
}, [
|
|
2348
2336
|
N,
|
|
2349
2337
|
x,
|
|
@@ -2355,60 +2343,62 @@ function br(i, e, t) {
|
|
|
2355
2343
|
k,
|
|
2356
2344
|
O,
|
|
2357
2345
|
X,
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2346
|
+
se,
|
|
2347
|
+
Re,
|
|
2348
|
+
Bt,
|
|
2349
|
+
Te,
|
|
2362
2350
|
I,
|
|
2363
2351
|
D,
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2352
|
+
Je,
|
|
2353
|
+
ue,
|
|
2354
|
+
ae,
|
|
2355
|
+
ke,
|
|
2356
|
+
ji,
|
|
2357
|
+
Ft,
|
|
2368
2358
|
Zi,
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
Et,
|
|
2373
|
-
s,
|
|
2359
|
+
vt,
|
|
2360
|
+
pt,
|
|
2361
|
+
o,
|
|
2374
2362
|
l,
|
|
2375
2363
|
d,
|
|
2376
2364
|
f,
|
|
2377
2365
|
v,
|
|
2378
2366
|
_,
|
|
2379
2367
|
p,
|
|
2380
|
-
|
|
2368
|
+
E,
|
|
2381
2369
|
S,
|
|
2382
2370
|
M,
|
|
2383
2371
|
C,
|
|
2384
|
-
|
|
2372
|
+
w,
|
|
2385
2373
|
L,
|
|
2386
2374
|
G,
|
|
2387
2375
|
W,
|
|
2388
|
-
|
|
2376
|
+
fe,
|
|
2377
|
+
at,
|
|
2378
|
+
Ve,
|
|
2379
|
+
Ce,
|
|
2380
|
+
ct,
|
|
2381
|
+
Ye,
|
|
2382
|
+
Ke,
|
|
2383
|
+
ft,
|
|
2389
2384
|
dt,
|
|
2390
2385
|
ht,
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
Je,
|
|
2396
|
-
mt,
|
|
2397
|
-
yt,
|
|
2398
|
-
vt,
|
|
2386
|
+
Di,
|
|
2387
|
+
Ui,
|
|
2388
|
+
Dt,
|
|
2389
|
+
Fi,
|
|
2399
2390
|
Gi,
|
|
2400
|
-
ji,
|
|
2401
|
-
Gt,
|
|
2402
|
-
qi,
|
|
2403
|
-
Qi,
|
|
2404
2391
|
q,
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
pt,
|
|
2392
|
+
R,
|
|
2393
|
+
gt,
|
|
2408
2394
|
r,
|
|
2409
2395
|
n,
|
|
2410
2396
|
u,
|
|
2411
|
-
|
|
2397
|
+
s,
|
|
2398
|
+
Hi,
|
|
2399
|
+
Vi,
|
|
2400
|
+
Yi,
|
|
2401
|
+
Ki,
|
|
2412
2402
|
Xi,
|
|
2413
2403
|
Ji,
|
|
2414
2404
|
$i,
|
|
@@ -2416,22 +2406,18 @@ function br(i, e, t) {
|
|
|
2416
2406
|
tn,
|
|
2417
2407
|
nn,
|
|
2418
2408
|
rn,
|
|
2419
|
-
on,
|
|
2420
2409
|
sn,
|
|
2421
|
-
|
|
2422
|
-
un,
|
|
2423
|
-
an,
|
|
2424
|
-
cn
|
|
2410
|
+
on
|
|
2425
2411
|
];
|
|
2426
2412
|
}
|
|
2427
|
-
let
|
|
2413
|
+
let yr = class extends xe {
|
|
2428
2414
|
constructor(e) {
|
|
2429
|
-
super(),
|
|
2415
|
+
super(), Se(
|
|
2430
2416
|
this,
|
|
2431
2417
|
e,
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2418
|
+
mr,
|
|
2419
|
+
gr,
|
|
2420
|
+
Le,
|
|
2435
2421
|
{
|
|
2436
2422
|
ZOOM_DEFAULTS: 25,
|
|
2437
2423
|
class: 2,
|
|
@@ -2460,23 +2446,22 @@ let wr = class extends Ce {
|
|
|
2460
2446
|
pickedResultStyle: 39,
|
|
2461
2447
|
showPlaceType: 10,
|
|
2462
2448
|
showResultsWhileTyping: 40,
|
|
2463
|
-
autocompleteTimeout: 41,
|
|
2464
2449
|
selectFirst: 11,
|
|
2465
|
-
flyToSelected:
|
|
2466
|
-
markerOnSelected:
|
|
2467
|
-
types:
|
|
2468
|
-
exhaustiveReverseGeocoding:
|
|
2469
|
-
excludeTypes:
|
|
2470
|
-
zoom:
|
|
2471
|
-
apiUrl:
|
|
2472
|
-
fetchParameters:
|
|
2450
|
+
flyToSelected: 41,
|
|
2451
|
+
markerOnSelected: 42,
|
|
2452
|
+
types: 43,
|
|
2453
|
+
exhaustiveReverseGeocoding: 44,
|
|
2454
|
+
excludeTypes: 45,
|
|
2455
|
+
zoom: 46,
|
|
2456
|
+
apiUrl: 47,
|
|
2457
|
+
fetchParameters: 48,
|
|
2473
2458
|
iconsBaseUrl: 12,
|
|
2474
|
-
adjustUrlQuery:
|
|
2475
|
-
focus:
|
|
2476
|
-
blur:
|
|
2477
|
-
setQuery:
|
|
2478
|
-
clearList:
|
|
2479
|
-
clearMap:
|
|
2459
|
+
adjustUrlQuery: 49,
|
|
2460
|
+
focus: 50,
|
|
2461
|
+
blur: 51,
|
|
2462
|
+
setQuery: 52,
|
|
2463
|
+
clearList: 53,
|
|
2464
|
+
clearMap: 54
|
|
2480
2465
|
},
|
|
2481
2466
|
null,
|
|
2482
2467
|
[-1, -1, -1]
|
|
@@ -2486,26 +2471,26 @@ let wr = class extends Ce {
|
|
|
2486
2471
|
return this.$$.ctx[25];
|
|
2487
2472
|
}
|
|
2488
2473
|
get focus() {
|
|
2489
|
-
return this.$$.ctx[
|
|
2474
|
+
return this.$$.ctx[50];
|
|
2490
2475
|
}
|
|
2491
2476
|
get blur() {
|
|
2492
|
-
return this.$$.ctx[
|
|
2477
|
+
return this.$$.ctx[51];
|
|
2493
2478
|
}
|
|
2494
2479
|
get setQuery() {
|
|
2495
|
-
return this.$$.ctx[
|
|
2480
|
+
return this.$$.ctx[52];
|
|
2496
2481
|
}
|
|
2497
2482
|
get clearList() {
|
|
2498
|
-
return this.$$.ctx[
|
|
2483
|
+
return this.$$.ctx[53];
|
|
2499
2484
|
}
|
|
2500
2485
|
get clearMap() {
|
|
2501
|
-
return this.$$.ctx[
|
|
2486
|
+
return this.$$.ctx[54];
|
|
2502
2487
|
}
|
|
2503
2488
|
};
|
|
2504
|
-
function
|
|
2489
|
+
function qe(i, e, t = {}) {
|
|
2505
2490
|
const n = { type: "Feature" };
|
|
2506
2491
|
return (t.id === 0 || t.id) && (n.id = t.id), t.bbox && (n.bbox = t.bbox), n.properties = e || {}, n.geometry = i, n;
|
|
2507
2492
|
}
|
|
2508
|
-
function
|
|
2493
|
+
function At(i, e, t = {}) {
|
|
2509
2494
|
for (const r of i) {
|
|
2510
2495
|
if (r.length < 4)
|
|
2511
2496
|
throw new Error(
|
|
@@ -2513,21 +2498,21 @@ function Bt(i, e, t = {}) {
|
|
|
2513
2498
|
);
|
|
2514
2499
|
if (r[r.length - 1].length !== r[0].length)
|
|
2515
2500
|
throw new Error("First and last Position are not equivalent.");
|
|
2516
|
-
for (let
|
|
2517
|
-
if (r[r.length - 1][
|
|
2501
|
+
for (let s = 0; s < r[r.length - 1].length; s++)
|
|
2502
|
+
if (r[r.length - 1][s] !== r[0][s])
|
|
2518
2503
|
throw new Error("First and last Position are not equivalent.");
|
|
2519
2504
|
}
|
|
2520
|
-
return
|
|
2505
|
+
return qe({
|
|
2521
2506
|
type: "Polygon",
|
|
2522
2507
|
coordinates: i
|
|
2523
2508
|
}, e, t);
|
|
2524
2509
|
}
|
|
2525
|
-
function
|
|
2510
|
+
function Qe(i, e = {}) {
|
|
2526
2511
|
const t = { type: "FeatureCollection" };
|
|
2527
2512
|
return e.id && (t.id = e.id), e.bbox && (t.bbox = e.bbox), t.features = i, t;
|
|
2528
2513
|
}
|
|
2529
|
-
function
|
|
2530
|
-
return
|
|
2514
|
+
function Oi(i, e, t = {}) {
|
|
2515
|
+
return qe({
|
|
2531
2516
|
type: "MultiPolygon",
|
|
2532
2517
|
coordinates: i
|
|
2533
2518
|
}, e, t);
|
|
@@ -2554,15 +2539,15 @@ MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
2554
2539
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
2555
2540
|
and limitations under the License.
|
|
2556
2541
|
***************************************************************************** */
|
|
2557
|
-
function
|
|
2542
|
+
function vr(i, e) {
|
|
2558
2543
|
var t = { label: 0, sent: function() {
|
|
2559
|
-
if (
|
|
2560
|
-
return
|
|
2561
|
-
}, trys: [], ops: [] }, n, r,
|
|
2562
|
-
return u = { next:
|
|
2544
|
+
if (s[0] & 1) throw s[1];
|
|
2545
|
+
return s[1];
|
|
2546
|
+
}, trys: [], ops: [] }, n, r, s, u;
|
|
2547
|
+
return u = { next: o(0), throw: o(1), return: o(2) }, typeof Symbol == "function" && (u[Symbol.iterator] = function() {
|
|
2563
2548
|
return this;
|
|
2564
2549
|
}), u;
|
|
2565
|
-
function
|
|
2550
|
+
function o(l) {
|
|
2566
2551
|
return function(d) {
|
|
2567
2552
|
return c([l, d]);
|
|
2568
2553
|
};
|
|
@@ -2570,11 +2555,11 @@ function Er(i, e) {
|
|
|
2570
2555
|
function c(l) {
|
|
2571
2556
|
if (n) throw new TypeError("Generator is already executing.");
|
|
2572
2557
|
for (; t; ) try {
|
|
2573
|
-
if (n = 1, r && (
|
|
2574
|
-
switch (r = 0,
|
|
2558
|
+
if (n = 1, r && (s = l[0] & 2 ? r.return : l[0] ? r.throw || ((s = r.return) && s.call(r), 0) : r.next) && !(s = s.call(r, l[1])).done) return s;
|
|
2559
|
+
switch (r = 0, s && (l = [l[0] & 2, s.value]), l[0]) {
|
|
2575
2560
|
case 0:
|
|
2576
2561
|
case 1:
|
|
2577
|
-
|
|
2562
|
+
s = l;
|
|
2578
2563
|
break;
|
|
2579
2564
|
case 4:
|
|
2580
2565
|
return t.label++, { value: l[1], done: !1 };
|
|
@@ -2585,36 +2570,36 @@ function Er(i, e) {
|
|
|
2585
2570
|
l = t.ops.pop(), t.trys.pop();
|
|
2586
2571
|
continue;
|
|
2587
2572
|
default:
|
|
2588
|
-
if (
|
|
2573
|
+
if (s = t.trys, !(s = s.length > 0 && s[s.length - 1]) && (l[0] === 6 || l[0] === 2)) {
|
|
2589
2574
|
t = 0;
|
|
2590
2575
|
continue;
|
|
2591
2576
|
}
|
|
2592
|
-
if (l[0] === 3 && (!
|
|
2577
|
+
if (l[0] === 3 && (!s || l[1] > s[0] && l[1] < s[3])) {
|
|
2593
2578
|
t.label = l[1];
|
|
2594
2579
|
break;
|
|
2595
2580
|
}
|
|
2596
|
-
if (l[0] === 6 && t.label <
|
|
2597
|
-
t.label =
|
|
2581
|
+
if (l[0] === 6 && t.label < s[1]) {
|
|
2582
|
+
t.label = s[1], s = l;
|
|
2598
2583
|
break;
|
|
2599
2584
|
}
|
|
2600
|
-
if (
|
|
2601
|
-
t.label =
|
|
2585
|
+
if (s && t.label < s[2]) {
|
|
2586
|
+
t.label = s[2], t.ops.push(l);
|
|
2602
2587
|
break;
|
|
2603
2588
|
}
|
|
2604
|
-
|
|
2589
|
+
s[2] && t.ops.pop(), t.trys.pop();
|
|
2605
2590
|
continue;
|
|
2606
2591
|
}
|
|
2607
2592
|
l = e.call(i, t);
|
|
2608
2593
|
} catch (d) {
|
|
2609
2594
|
l = [6, d], r = 0;
|
|
2610
2595
|
} finally {
|
|
2611
|
-
n =
|
|
2596
|
+
n = s = 0;
|
|
2612
2597
|
}
|
|
2613
2598
|
if (l[0] & 5) throw l[1];
|
|
2614
2599
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
2615
2600
|
}
|
|
2616
2601
|
}
|
|
2617
|
-
var
|
|
2602
|
+
var _e = (
|
|
2618
2603
|
/** @class */
|
|
2619
2604
|
/* @__PURE__ */ function() {
|
|
2620
2605
|
function i(e, t) {
|
|
@@ -2623,91 +2608,91 @@ var Se = (
|
|
|
2623
2608
|
return i;
|
|
2624
2609
|
}()
|
|
2625
2610
|
);
|
|
2626
|
-
function
|
|
2611
|
+
function pr(i, e) {
|
|
2627
2612
|
return i > e ? 1 : i < e ? -1 : 0;
|
|
2628
2613
|
}
|
|
2629
|
-
function
|
|
2630
|
-
for (var n = new
|
|
2614
|
+
function ve(i, e, t) {
|
|
2615
|
+
for (var n = new _e(null, null), r = n, s = n; ; ) {
|
|
2631
2616
|
var u = t(i, e.key);
|
|
2632
2617
|
if (u < 0) {
|
|
2633
2618
|
if (e.left === null)
|
|
2634
2619
|
break;
|
|
2635
2620
|
if (t(i, e.left.key) < 0) {
|
|
2636
|
-
var
|
|
2637
|
-
if (e.left =
|
|
2621
|
+
var o = e.left;
|
|
2622
|
+
if (e.left = o.right, o.right = e, e = o, e.left === null)
|
|
2638
2623
|
break;
|
|
2639
2624
|
}
|
|
2640
|
-
|
|
2625
|
+
s.left = e, s = e, e = e.left;
|
|
2641
2626
|
} else if (u > 0) {
|
|
2642
2627
|
if (e.right === null)
|
|
2643
2628
|
break;
|
|
2644
2629
|
if (t(i, e.right.key) > 0) {
|
|
2645
|
-
var
|
|
2646
|
-
if (e.right =
|
|
2630
|
+
var o = e.right;
|
|
2631
|
+
if (e.right = o.left, o.left = e, e = o, e.right === null)
|
|
2647
2632
|
break;
|
|
2648
2633
|
}
|
|
2649
2634
|
r.right = e, r = e, e = e.right;
|
|
2650
2635
|
} else
|
|
2651
2636
|
break;
|
|
2652
2637
|
}
|
|
2653
|
-
return r.right = e.left,
|
|
2638
|
+
return r.right = e.left, s.left = e.right, e.left = n.right, e.right = n.left, e;
|
|
2654
2639
|
}
|
|
2655
|
-
function
|
|
2656
|
-
var r = new
|
|
2640
|
+
function St(i, e, t, n) {
|
|
2641
|
+
var r = new _e(i, e);
|
|
2657
2642
|
if (t === null)
|
|
2658
2643
|
return r.left = r.right = null, r;
|
|
2659
|
-
t =
|
|
2660
|
-
var
|
|
2661
|
-
return
|
|
2644
|
+
t = ve(i, t, n);
|
|
2645
|
+
var s = n(i, t.key);
|
|
2646
|
+
return s < 0 ? (r.left = t.left, r.right = t, t.left = null) : s >= 0 && (r.right = t.right, r.left = t, t.right = null), r;
|
|
2662
2647
|
}
|
|
2663
|
-
function
|
|
2648
|
+
function ai(i, e, t) {
|
|
2664
2649
|
var n = null, r = null;
|
|
2665
2650
|
if (e) {
|
|
2666
|
-
e =
|
|
2667
|
-
var
|
|
2668
|
-
|
|
2651
|
+
e = ve(i, e, t);
|
|
2652
|
+
var s = t(e.key, i);
|
|
2653
|
+
s === 0 ? (n = e.left, r = e.right) : s < 0 ? (r = e.right, e.right = null, n = e) : (n = e.left, e.left = null, r = e);
|
|
2669
2654
|
}
|
|
2670
2655
|
return { left: n, right: r };
|
|
2671
2656
|
}
|
|
2672
|
-
function
|
|
2673
|
-
return e === null ? i : (i === null || (e =
|
|
2657
|
+
function br(i, e, t) {
|
|
2658
|
+
return e === null ? i : (i === null || (e = ve(i.key, e, t), e.left = i), e);
|
|
2674
2659
|
}
|
|
2675
|
-
function
|
|
2660
|
+
function Nt(i, e, t, n, r) {
|
|
2676
2661
|
if (i) {
|
|
2677
2662
|
n("" + e + (t ? "└── " : "├── ") + r(i) + `
|
|
2678
2663
|
`);
|
|
2679
|
-
var
|
|
2680
|
-
i.left &&
|
|
2664
|
+
var s = e + (t ? " " : "│ ");
|
|
2665
|
+
i.left && Nt(i.left, s, !1, n, r), i.right && Nt(i.right, s, !0, n, r);
|
|
2681
2666
|
}
|
|
2682
2667
|
}
|
|
2683
|
-
var
|
|
2668
|
+
var Wt = (
|
|
2684
2669
|
/** @class */
|
|
2685
2670
|
function() {
|
|
2686
2671
|
function i(e) {
|
|
2687
|
-
e === void 0 && (e =
|
|
2672
|
+
e === void 0 && (e = pr), this._root = null, this._size = 0, this._comparator = e;
|
|
2688
2673
|
}
|
|
2689
2674
|
return i.prototype.insert = function(e, t) {
|
|
2690
|
-
return this._size++, this._root =
|
|
2675
|
+
return this._size++, this._root = St(e, t, this._root, this._comparator);
|
|
2691
2676
|
}, i.prototype.add = function(e, t) {
|
|
2692
|
-
var n = new
|
|
2677
|
+
var n = new _e(e, t);
|
|
2693
2678
|
this._root === null && (n.left = n.right = null, this._size++, this._root = n);
|
|
2694
|
-
var r = this._comparator,
|
|
2695
|
-
return u === 0 ? this._root =
|
|
2679
|
+
var r = this._comparator, s = ve(e, this._root, r), u = r(e, s.key);
|
|
2680
|
+
return u === 0 ? this._root = s : (u < 0 ? (n.left = s.left, n.right = s, s.left = null) : u > 0 && (n.right = s.right, n.left = s, s.right = null), this._size++, this._root = n), this._root;
|
|
2696
2681
|
}, i.prototype.remove = function(e) {
|
|
2697
2682
|
this._root = this._remove(e, this._root, this._comparator);
|
|
2698
2683
|
}, i.prototype._remove = function(e, t, n) {
|
|
2699
2684
|
var r;
|
|
2700
2685
|
if (t === null)
|
|
2701
2686
|
return null;
|
|
2702
|
-
t =
|
|
2703
|
-
var
|
|
2704
|
-
return
|
|
2687
|
+
t = ve(e, t, n);
|
|
2688
|
+
var s = n(e, t.key);
|
|
2689
|
+
return s === 0 ? (t.left === null ? r = t.right : (r = ve(e, t.left, n), r.right = t.right), this._size--, r) : t;
|
|
2705
2690
|
}, i.prototype.pop = function() {
|
|
2706
2691
|
var e = this._root;
|
|
2707
2692
|
if (e) {
|
|
2708
2693
|
for (; e.left; )
|
|
2709
2694
|
e = e.left;
|
|
2710
|
-
return this._root =
|
|
2695
|
+
return this._root = ve(e.key, this._root, this._comparator), this._root = this._remove(e.key, this._root, this._comparator), { key: e.key, data: e.data };
|
|
2711
2696
|
}
|
|
2712
2697
|
return null;
|
|
2713
2698
|
}, i.prototype.findStatic = function(e) {
|
|
@@ -2719,7 +2704,7 @@ var Dt = (
|
|
|
2719
2704
|
}
|
|
2720
2705
|
return null;
|
|
2721
2706
|
}, i.prototype.find = function(e) {
|
|
2722
|
-
return this._root && (this._root =
|
|
2707
|
+
return this._root && (this._root = ve(e, this._root, this._comparator), this._comparator(e, this._root.key) !== 0) ? null : this._root;
|
|
2723
2708
|
}, i.prototype.contains = function(e) {
|
|
2724
2709
|
for (var t = this._root, n = this._comparator; t; ) {
|
|
2725
2710
|
var r = n(e, t.key);
|
|
@@ -2729,19 +2714,19 @@ var Dt = (
|
|
|
2729
2714
|
}
|
|
2730
2715
|
return !1;
|
|
2731
2716
|
}, i.prototype.forEach = function(e, t) {
|
|
2732
|
-
for (var n = this._root, r = [],
|
|
2733
|
-
n !== null ? (r.push(n), n = n.left) : r.length !== 0 ? (n = r.pop(), e.call(t, n), n = n.right) :
|
|
2717
|
+
for (var n = this._root, r = [], s = !1; !s; )
|
|
2718
|
+
n !== null ? (r.push(n), n = n.left) : r.length !== 0 ? (n = r.pop(), e.call(t, n), n = n.right) : s = !0;
|
|
2734
2719
|
return this;
|
|
2735
2720
|
}, i.prototype.range = function(e, t, n, r) {
|
|
2736
|
-
for (var
|
|
2737
|
-
if (
|
|
2738
|
-
|
|
2721
|
+
for (var s = [], u = this._comparator, o = this._root, c; s.length !== 0 || o; )
|
|
2722
|
+
if (o)
|
|
2723
|
+
s.push(o), o = o.left;
|
|
2739
2724
|
else {
|
|
2740
|
-
if (
|
|
2725
|
+
if (o = s.pop(), c = u(o.key, t), c > 0)
|
|
2741
2726
|
break;
|
|
2742
|
-
if (u(
|
|
2727
|
+
if (u(o.key, e) >= 0 && n.call(r, o))
|
|
2743
2728
|
return this;
|
|
2744
|
-
|
|
2729
|
+
o = o.right;
|
|
2745
2730
|
}
|
|
2746
2731
|
return this;
|
|
2747
2732
|
}, i.prototype.keys = function() {
|
|
@@ -2771,11 +2756,11 @@ var Dt = (
|
|
|
2771
2756
|
e = e.right;
|
|
2772
2757
|
return e;
|
|
2773
2758
|
}, i.prototype.at = function(e) {
|
|
2774
|
-
for (var t = this._root, n = !1, r = 0,
|
|
2759
|
+
for (var t = this._root, n = !1, r = 0, s = []; !n; )
|
|
2775
2760
|
if (t)
|
|
2776
|
-
|
|
2777
|
-
else if (
|
|
2778
|
-
if (t =
|
|
2761
|
+
s.push(t), t = t.left;
|
|
2762
|
+
else if (s.length > 0) {
|
|
2763
|
+
if (t = s.pop(), r === e)
|
|
2779
2764
|
return t;
|
|
2780
2765
|
r++, t = t.right;
|
|
2781
2766
|
} else
|
|
@@ -2789,10 +2774,10 @@ var Dt = (
|
|
|
2789
2774
|
return n;
|
|
2790
2775
|
}
|
|
2791
2776
|
for (var r = this._comparator; t; ) {
|
|
2792
|
-
var
|
|
2793
|
-
if (
|
|
2777
|
+
var s = r(e.key, t.key);
|
|
2778
|
+
if (s === 0)
|
|
2794
2779
|
break;
|
|
2795
|
-
|
|
2780
|
+
s < 0 ? (n = t, t = t.left) : t = t.right;
|
|
2796
2781
|
}
|
|
2797
2782
|
return n;
|
|
2798
2783
|
}, i.prototype.prev = function(e) {
|
|
@@ -2803,24 +2788,24 @@ var Dt = (
|
|
|
2803
2788
|
return n;
|
|
2804
2789
|
}
|
|
2805
2790
|
for (var r = this._comparator; t; ) {
|
|
2806
|
-
var
|
|
2807
|
-
if (
|
|
2791
|
+
var s = r(e.key, t.key);
|
|
2792
|
+
if (s === 0)
|
|
2808
2793
|
break;
|
|
2809
|
-
|
|
2794
|
+
s < 0 ? t = t.left : (n = t, t = t.right);
|
|
2810
2795
|
}
|
|
2811
2796
|
return n;
|
|
2812
2797
|
}, i.prototype.clear = function() {
|
|
2813
2798
|
return this._root = null, this._size = 0, this;
|
|
2814
2799
|
}, i.prototype.toList = function() {
|
|
2815
|
-
return
|
|
2800
|
+
return wr(this._root);
|
|
2816
2801
|
}, i.prototype.load = function(e, t, n) {
|
|
2817
2802
|
t === void 0 && (t = []), n === void 0 && (n = !1);
|
|
2818
|
-
var r = e.length,
|
|
2819
|
-
if (n &&
|
|
2820
|
-
this._root =
|
|
2803
|
+
var r = e.length, s = this._comparator;
|
|
2804
|
+
if (n && Pt(e, t, 0, r - 1, s), this._root === null)
|
|
2805
|
+
this._root = Rt(e, t, 0, r), this._size = r;
|
|
2821
2806
|
else {
|
|
2822
|
-
var u =
|
|
2823
|
-
r = this._size + r, this._root =
|
|
2807
|
+
var u = _r(this.toList(), Er(e, t), s);
|
|
2808
|
+
r = this._size + r, this._root = Tt({ head: u }, 0, r);
|
|
2824
2809
|
}
|
|
2825
2810
|
return this;
|
|
2826
2811
|
}, i.prototype.isEmpty = function() {
|
|
@@ -2842,17 +2827,17 @@ var Dt = (
|
|
|
2842
2827
|
return String(n.key);
|
|
2843
2828
|
});
|
|
2844
2829
|
var t = [];
|
|
2845
|
-
return
|
|
2830
|
+
return Nt(this._root, "", !0, function(n) {
|
|
2846
2831
|
return t.push(n);
|
|
2847
2832
|
}, e), t.join("");
|
|
2848
2833
|
}, i.prototype.update = function(e, t, n) {
|
|
2849
|
-
var r = this._comparator,
|
|
2850
|
-
r(e, t) < 0 ?
|
|
2834
|
+
var r = this._comparator, s = ai(e, this._root, r), u = s.left, o = s.right;
|
|
2835
|
+
r(e, t) < 0 ? o = St(t, n, o, r) : u = St(t, n, u, r), this._root = br(u, o, r);
|
|
2851
2836
|
}, i.prototype.split = function(e) {
|
|
2852
|
-
return
|
|
2837
|
+
return ai(e, this._root, this._comparator);
|
|
2853
2838
|
}, i.prototype[Symbol.iterator] = function() {
|
|
2854
2839
|
var e, t, n;
|
|
2855
|
-
return
|
|
2840
|
+
return vr(this, function(r) {
|
|
2856
2841
|
switch (r.label) {
|
|
2857
2842
|
case 0:
|
|
2858
2843
|
e = this._root, t = [], n = !1, r.label = 1;
|
|
@@ -2876,98 +2861,98 @@ var Dt = (
|
|
|
2876
2861
|
}, i;
|
|
2877
2862
|
}()
|
|
2878
2863
|
);
|
|
2879
|
-
function
|
|
2864
|
+
function Rt(i, e, t, n) {
|
|
2880
2865
|
var r = n - t;
|
|
2881
2866
|
if (r > 0) {
|
|
2882
|
-
var
|
|
2883
|
-
return c.left =
|
|
2867
|
+
var s = t + Math.floor(r / 2), u = i[s], o = e[s], c = new _e(u, o);
|
|
2868
|
+
return c.left = Rt(i, e, t, s), c.right = Rt(i, e, s + 1, n), c;
|
|
2884
2869
|
}
|
|
2885
2870
|
return null;
|
|
2886
2871
|
}
|
|
2887
|
-
function
|
|
2888
|
-
for (var t = new
|
|
2889
|
-
n = n.next = new
|
|
2872
|
+
function Er(i, e) {
|
|
2873
|
+
for (var t = new _e(null, null), n = t, r = 0; r < i.length; r++)
|
|
2874
|
+
n = n.next = new _e(i[r], e[r]);
|
|
2890
2875
|
return n.next = null, t.next;
|
|
2891
2876
|
}
|
|
2892
|
-
function
|
|
2893
|
-
for (var e = i, t = [], n = !1, r = new
|
|
2894
|
-
e ? (t.push(e), e = e.left) : t.length > 0 ? (e =
|
|
2895
|
-
return
|
|
2877
|
+
function wr(i) {
|
|
2878
|
+
for (var e = i, t = [], n = !1, r = new _e(null, null), s = r; !n; )
|
|
2879
|
+
e ? (t.push(e), e = e.left) : t.length > 0 ? (e = s = s.next = t.pop(), e = e.right) : n = !0;
|
|
2880
|
+
return s.next = null, r.next;
|
|
2896
2881
|
}
|
|
2897
|
-
function
|
|
2882
|
+
function Tt(i, e, t) {
|
|
2898
2883
|
var n = t - e;
|
|
2899
2884
|
if (n > 0) {
|
|
2900
|
-
var r = e + Math.floor(n / 2),
|
|
2901
|
-
return u.left =
|
|
2885
|
+
var r = e + Math.floor(n / 2), s = Tt(i, e, r), u = i.head;
|
|
2886
|
+
return u.left = s, i.head = i.head.next, u.right = Tt(i, r + 1, t), u;
|
|
2902
2887
|
}
|
|
2903
2888
|
return null;
|
|
2904
2889
|
}
|
|
2905
|
-
function
|
|
2906
|
-
for (var n = new
|
|
2907
|
-
t(
|
|
2908
|
-
return
|
|
2890
|
+
function _r(i, e, t) {
|
|
2891
|
+
for (var n = new _e(null, null), r = n, s = i, u = e; s !== null && u !== null; )
|
|
2892
|
+
t(s.key, u.key) < 0 ? (r.next = s, s = s.next) : (r.next = u, u = u.next), r = r.next;
|
|
2893
|
+
return s !== null ? r.next = s : u !== null && (r.next = u), n.next;
|
|
2909
2894
|
}
|
|
2910
|
-
function
|
|
2895
|
+
function Pt(i, e, t, n, r) {
|
|
2911
2896
|
if (!(t >= n)) {
|
|
2912
|
-
for (var
|
|
2897
|
+
for (var s = i[t + n >> 1], u = t - 1, o = n + 1; ; ) {
|
|
2913
2898
|
do
|
|
2914
2899
|
u++;
|
|
2915
|
-
while (r(i[u],
|
|
2900
|
+
while (r(i[u], s) < 0);
|
|
2916
2901
|
do
|
|
2917
|
-
|
|
2918
|
-
while (r(i[
|
|
2919
|
-
if (u >=
|
|
2902
|
+
o--;
|
|
2903
|
+
while (r(i[o], s) > 0);
|
|
2904
|
+
if (u >= o)
|
|
2920
2905
|
break;
|
|
2921
2906
|
var c = i[u];
|
|
2922
|
-
i[u] = i[
|
|
2907
|
+
i[u] = i[o], i[o] = c, c = e[u], e[u] = e[o], e[o] = c;
|
|
2923
2908
|
}
|
|
2924
|
-
|
|
2909
|
+
Pt(i, e, t, o, r), Pt(i, e, o + 1, n, r);
|
|
2925
2910
|
}
|
|
2926
2911
|
}
|
|
2927
|
-
const
|
|
2928
|
-
function
|
|
2929
|
-
let
|
|
2930
|
-
d > l == d > -l ? (
|
|
2912
|
+
const de = 11102230246251565e-32, Y = 134217729, Lr = (3 + 8 * de) * de;
|
|
2913
|
+
function xt(i, e, t, n, r) {
|
|
2914
|
+
let s, u, o, c, l = e[0], d = n[0], a = 0, f = 0;
|
|
2915
|
+
d > l == d > -l ? (s = l, l = e[++a]) : (s = d, d = n[++f]);
|
|
2931
2916
|
let g = 0;
|
|
2932
2917
|
if (a < i && f < t)
|
|
2933
|
-
for (d > l == d > -l ? (u = l +
|
|
2934
|
-
d > l == d > -l ? (u =
|
|
2918
|
+
for (d > l == d > -l ? (u = l + s, o = s - (u - l), l = e[++a]) : (u = d + s, o = s - (u - d), d = n[++f]), s = u, o !== 0 && (r[g++] = o); a < i && f < t; )
|
|
2919
|
+
d > l == d > -l ? (u = s + l, c = u - s, o = s - (u - c) + (l - c), l = e[++a]) : (u = s + d, c = u - s, o = s - (u - c) + (d - c), d = n[++f]), s = u, o !== 0 && (r[g++] = o);
|
|
2935
2920
|
for (; a < i; )
|
|
2936
|
-
u =
|
|
2921
|
+
u = s + l, c = u - s, o = s - (u - c) + (l - c), l = e[++a], s = u, o !== 0 && (r[g++] = o);
|
|
2937
2922
|
for (; f < t; )
|
|
2938
|
-
u =
|
|
2939
|
-
return (
|
|
2923
|
+
u = s + d, c = u - s, o = s - (u - c) + (d - c), d = n[++f], s = u, o !== 0 && (r[g++] = o);
|
|
2924
|
+
return (s !== 0 || g === 0) && (r[g++] = s), g;
|
|
2940
2925
|
}
|
|
2941
|
-
function
|
|
2926
|
+
function Sr(i, e) {
|
|
2942
2927
|
let t = e[0];
|
|
2943
2928
|
for (let n = 1; n < i; n++) t += e[n];
|
|
2944
2929
|
return t;
|
|
2945
2930
|
}
|
|
2946
|
-
function
|
|
2931
|
+
function He(i) {
|
|
2947
2932
|
return new Float64Array(i);
|
|
2948
2933
|
}
|
|
2949
|
-
const
|
|
2950
|
-
function
|
|
2951
|
-
let
|
|
2952
|
-
const k = i - r, O = t - r, G = e -
|
|
2953
|
-
S = k * N, f = Y * k, g = f - (f - k), v = k - g, f = Y * N, _ = f - (f - N), h = N - _, M = v * h - (S - g * _ - v * _ - g * h), C = G * O, f = Y * G, g = f - (f - G), v = G - g, f = Y * O, _ = f - (f - O), h = O - _,
|
|
2954
|
-
let X =
|
|
2955
|
-
if (X >= x || -X >= x || (a = i - k,
|
|
2956
|
-
S =
|
|
2957
|
-
const W =
|
|
2958
|
-
S = k * d, f = Y * k, g = f - (f - k), v = k - g, f = Y * d, _ = f - (f - d), h = d - _, M = v * h - (S - g * _ - v * _ - g * h), C = G * l, f = Y * G, g = f - (f - G), v = G - g, f = Y * l, _ = f - (f - l), h = l - _,
|
|
2959
|
-
const
|
|
2960
|
-
S =
|
|
2961
|
-
const
|
|
2962
|
-
return
|
|
2963
|
-
}
|
|
2964
|
-
function
|
|
2965
|
-
const u = (e -
|
|
2966
|
-
return Math.abs(c) >=
|
|
2967
|
-
}
|
|
2968
|
-
const
|
|
2934
|
+
const xr = (3 + 16 * de) * de, Mr = (2 + 12 * de) * de, Cr = (9 + 64 * de) * de * de, Oe = He(4), ci = He(8), fi = He(12), di = He(16), J = He(4);
|
|
2935
|
+
function kr(i, e, t, n, r, s, u) {
|
|
2936
|
+
let o, c, l, d, a, f, g, v, _, h, y, p, E, S, M, C, w, L;
|
|
2937
|
+
const k = i - r, O = t - r, G = e - s, N = n - s;
|
|
2938
|
+
S = k * N, f = Y * k, g = f - (f - k), v = k - g, f = Y * N, _ = f - (f - N), h = N - _, M = v * h - (S - g * _ - v * _ - g * h), C = G * O, f = Y * G, g = f - (f - G), v = G - g, f = Y * O, _ = f - (f - O), h = O - _, w = v * h - (C - g * _ - v * _ - g * h), y = M - w, a = M - y, Oe[0] = M - (y + a) + (a - w), p = S + y, a = p - S, E = S - (p - a) + (y - a), y = E - C, a = E - y, Oe[1] = E - (y + a) + (a - C), L = p + y, a = L - p, Oe[2] = p - (L - a) + (y - a), Oe[3] = L;
|
|
2939
|
+
let X = Sr(4, Oe), x = Mr * u;
|
|
2940
|
+
if (X >= x || -X >= x || (a = i - k, o = i - (k + a) + (a - r), a = t - O, l = t - (O + a) + (a - r), a = e - G, c = e - (G + a) + (a - s), a = n - N, d = n - (N + a) + (a - s), o === 0 && c === 0 && l === 0 && d === 0) || (x = Cr * u + Lr * Math.abs(X), X += k * d + N * o - (G * l + O * c), X >= x || -X >= x)) return X;
|
|
2941
|
+
S = o * N, f = Y * o, g = f - (f - o), v = o - g, f = Y * N, _ = f - (f - N), h = N - _, M = v * h - (S - g * _ - v * _ - g * h), C = c * O, f = Y * c, g = f - (f - c), v = c - g, f = Y * O, _ = f - (f - O), h = O - _, w = v * h - (C - g * _ - v * _ - g * h), y = M - w, a = M - y, J[0] = M - (y + a) + (a - w), p = S + y, a = p - S, E = S - (p - a) + (y - a), y = E - C, a = E - y, J[1] = E - (y + a) + (a - C), L = p + y, a = L - p, J[2] = p - (L - a) + (y - a), J[3] = L;
|
|
2942
|
+
const W = xt(4, Oe, 4, J, ci);
|
|
2943
|
+
S = k * d, f = Y * k, g = f - (f - k), v = k - g, f = Y * d, _ = f - (f - d), h = d - _, M = v * h - (S - g * _ - v * _ - g * h), C = G * l, f = Y * G, g = f - (f - G), v = G - g, f = Y * l, _ = f - (f - l), h = l - _, w = v * h - (C - g * _ - v * _ - g * h), y = M - w, a = M - y, J[0] = M - (y + a) + (a - w), p = S + y, a = p - S, E = S - (p - a) + (y - a), y = E - C, a = E - y, J[1] = E - (y + a) + (a - C), L = p + y, a = L - p, J[2] = p - (L - a) + (y - a), J[3] = L;
|
|
2944
|
+
const se = xt(W, ci, 4, J, fi);
|
|
2945
|
+
S = o * d, f = Y * o, g = f - (f - o), v = o - g, f = Y * d, _ = f - (f - d), h = d - _, M = v * h - (S - g * _ - v * _ - g * h), C = c * l, f = Y * c, g = f - (f - c), v = c - g, f = Y * l, _ = f - (f - l), h = l - _, w = v * h - (C - g * _ - v * _ - g * h), y = M - w, a = M - y, J[0] = M - (y + a) + (a - w), p = S + y, a = p - S, E = S - (p - a) + (y - a), y = E - C, a = E - y, J[1] = E - (y + a) + (a - C), L = p + y, a = L - p, J[2] = p - (L - a) + (y - a), J[3] = L;
|
|
2946
|
+
const fe = xt(se, fi, 4, J, di);
|
|
2947
|
+
return di[fe - 1];
|
|
2948
|
+
}
|
|
2949
|
+
function Nr(i, e, t, n, r, s) {
|
|
2950
|
+
const u = (e - s) * (t - r), o = (i - r) * (n - s), c = u - o, l = Math.abs(u + o);
|
|
2951
|
+
return Math.abs(c) >= xr * l ? c : -kr(i, e, t, n, r, s, l);
|
|
2952
|
+
}
|
|
2953
|
+
const Ue = (i, e) => i.ll.x <= e.x && e.x <= i.ur.x && i.ll.y <= e.y && e.y <= i.ur.y, It = (i, e) => {
|
|
2969
2954
|
if (e.ur.x < i.ll.x || i.ur.x < e.ll.x || e.ur.y < i.ll.y || i.ur.y < e.ll.y) return null;
|
|
2970
|
-
const t = i.ll.x < e.ll.x ? e.ll.x : i.ll.x, n = i.ur.x < e.ur.x ? i.ur.x : e.ur.x, r = i.ll.y < e.ll.y ? e.ll.y : i.ll.y,
|
|
2955
|
+
const t = i.ll.x < e.ll.x ? e.ll.x : i.ll.x, n = i.ur.x < e.ur.x ? i.ur.x : e.ur.x, r = i.ll.y < e.ll.y ? e.ll.y : i.ll.y, s = i.ur.y < e.ur.y ? i.ur.y : e.ur.y;
|
|
2971
2956
|
return {
|
|
2972
2957
|
ll: {
|
|
2973
2958
|
x: t,
|
|
@@ -2975,24 +2960,24 @@ const Ge = (i, e) => i.ll.x <= e.x && e.x <= i.ur.x && i.ll.y <= e.y && e.y <= i
|
|
|
2975
2960
|
},
|
|
2976
2961
|
ur: {
|
|
2977
2962
|
x: n,
|
|
2978
|
-
y:
|
|
2963
|
+
y: s
|
|
2979
2964
|
}
|
|
2980
2965
|
};
|
|
2981
2966
|
};
|
|
2982
|
-
let
|
|
2983
|
-
|
|
2984
|
-
const
|
|
2985
|
-
if (-
|
|
2967
|
+
let pe = Number.EPSILON;
|
|
2968
|
+
pe === void 0 && (pe = Math.pow(2, -52));
|
|
2969
|
+
const Rr = pe * pe, hi = (i, e) => {
|
|
2970
|
+
if (-pe < i && i < pe && -pe < e && e < pe)
|
|
2986
2971
|
return 0;
|
|
2987
2972
|
const t = i - e;
|
|
2988
|
-
return t * t <
|
|
2973
|
+
return t * t < Rr * i * e ? 0 : i < e ? -1 : 1;
|
|
2989
2974
|
};
|
|
2990
|
-
class
|
|
2975
|
+
class Tr {
|
|
2991
2976
|
constructor() {
|
|
2992
2977
|
this.reset();
|
|
2993
2978
|
}
|
|
2994
2979
|
reset() {
|
|
2995
|
-
this.xRounder = new
|
|
2980
|
+
this.xRounder = new gi(), this.yRounder = new gi();
|
|
2996
2981
|
}
|
|
2997
2982
|
round(e, t) {
|
|
2998
2983
|
return {
|
|
@@ -3001,9 +2986,9 @@ class Ar {
|
|
|
3001
2986
|
};
|
|
3002
2987
|
}
|
|
3003
2988
|
}
|
|
3004
|
-
class
|
|
2989
|
+
class gi {
|
|
3005
2990
|
constructor() {
|
|
3006
|
-
this.tree = new
|
|
2991
|
+
this.tree = new Wt(), this.round(0);
|
|
3007
2992
|
}
|
|
3008
2993
|
// Note: this can rounds input values backwards or forwards.
|
|
3009
2994
|
// You might ask, why not restrict this to just rounding
|
|
@@ -3014,16 +2999,16 @@ class vi {
|
|
|
3014
2999
|
// angle for t-intersections).
|
|
3015
3000
|
round(e) {
|
|
3016
3001
|
const t = this.tree.add(e), n = this.tree.prev(t);
|
|
3017
|
-
if (n !== null &&
|
|
3002
|
+
if (n !== null && hi(t.key, n.key) === 0)
|
|
3018
3003
|
return this.tree.remove(e), n.key;
|
|
3019
3004
|
const r = this.tree.next(t);
|
|
3020
|
-
return r !== null &&
|
|
3005
|
+
return r !== null && hi(t.key, r.key) === 0 ? (this.tree.remove(e), r.key) : e;
|
|
3021
3006
|
}
|
|
3022
3007
|
}
|
|
3023
|
-
const
|
|
3024
|
-
const n =
|
|
3008
|
+
const Ze = new Tr(), st = (i, e) => i.x * e.y - i.y * e.x, Ai = (i, e) => i.x * e.x + i.y * e.y, mi = (i, e, t) => {
|
|
3009
|
+
const n = Nr(i.x, i.y, e.x, e.y, t.x, t.y);
|
|
3025
3010
|
return n > 0 ? -1 : n < 0 ? 1 : 0;
|
|
3026
|
-
},
|
|
3011
|
+
}, lt = (i) => Math.sqrt(Ai(i, i)), Pr = (i, e, t) => {
|
|
3027
3012
|
const n = {
|
|
3028
3013
|
x: e.x - i.x,
|
|
3029
3014
|
y: e.y - i.y
|
|
@@ -3031,8 +3016,8 @@ const Ve = new Ar(), ut = (i, e) => i.x * e.y - i.y * e.x, Bi = (i, e) => i.x *
|
|
|
3031
3016
|
x: t.x - i.x,
|
|
3032
3017
|
y: t.y - i.y
|
|
3033
3018
|
};
|
|
3034
|
-
return
|
|
3035
|
-
},
|
|
3019
|
+
return st(r, n) / lt(r) / lt(n);
|
|
3020
|
+
}, Ir = (i, e, t) => {
|
|
3036
3021
|
const n = {
|
|
3037
3022
|
x: e.x - i.x,
|
|
3038
3023
|
y: e.y - i.y
|
|
@@ -3040,34 +3025,34 @@ const Ve = new Ar(), ut = (i, e) => i.x * e.y - i.y * e.x, Bi = (i, e) => i.x *
|
|
|
3040
3025
|
x: t.x - i.x,
|
|
3041
3026
|
y: t.y - i.y
|
|
3042
3027
|
};
|
|
3043
|
-
return
|
|
3044
|
-
},
|
|
3028
|
+
return Ai(r, n) / lt(r) / lt(n);
|
|
3029
|
+
}, yi = (i, e, t) => e.y === 0 ? null : {
|
|
3045
3030
|
x: i.x + e.x / e.y * (t - i.y),
|
|
3046
3031
|
y: t
|
|
3047
|
-
},
|
|
3032
|
+
}, vi = (i, e, t) => e.x === 0 ? null : {
|
|
3048
3033
|
x: t,
|
|
3049
3034
|
y: i.y + e.y / e.x * (t - i.x)
|
|
3050
|
-
},
|
|
3051
|
-
if (e.x === 0) return
|
|
3052
|
-
if (n.x === 0) return
|
|
3053
|
-
if (e.y === 0) return
|
|
3054
|
-
if (n.y === 0) return
|
|
3055
|
-
const r =
|
|
3035
|
+
}, Or = (i, e, t, n) => {
|
|
3036
|
+
if (e.x === 0) return vi(t, n, i.x);
|
|
3037
|
+
if (n.x === 0) return vi(i, e, t.x);
|
|
3038
|
+
if (e.y === 0) return yi(t, n, i.y);
|
|
3039
|
+
if (n.y === 0) return yi(i, e, t.y);
|
|
3040
|
+
const r = st(e, n);
|
|
3056
3041
|
if (r == 0) return null;
|
|
3057
|
-
const
|
|
3042
|
+
const s = {
|
|
3058
3043
|
x: t.x - i.x,
|
|
3059
3044
|
y: t.y - i.y
|
|
3060
|
-
}, u =
|
|
3045
|
+
}, u = st(s, e) / r, o = st(s, n) / r, c = i.x + o * e.x, l = t.x + u * n.x, d = i.y + o * e.y, a = t.y + u * n.y, f = (c + l) / 2, g = (d + a) / 2;
|
|
3061
3046
|
return {
|
|
3062
3047
|
x: f,
|
|
3063
3048
|
y: g
|
|
3064
3049
|
};
|
|
3065
3050
|
};
|
|
3066
|
-
class
|
|
3051
|
+
class ne {
|
|
3067
3052
|
// for ordering sweep events in the sweep event queue
|
|
3068
3053
|
static compare(e, t) {
|
|
3069
|
-
const n =
|
|
3070
|
-
return n !== 0 ? n : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 :
|
|
3054
|
+
const n = ne.comparePoints(e.point, t.point);
|
|
3055
|
+
return n !== 0 ? n : (e.point !== t.point && e.link(t), e.isLeft !== t.isLeft ? e.isLeft ? 1 : -1 : be.compare(e.segment, t.segment));
|
|
3071
3056
|
}
|
|
3072
3057
|
// for ordering points in sweep line order
|
|
3073
3058
|
static comparePoints(e, t) {
|
|
@@ -3082,8 +3067,8 @@ class oe {
|
|
|
3082
3067
|
throw new Error("Tried to link already linked events");
|
|
3083
3068
|
const t = e.point.events;
|
|
3084
3069
|
for (let n = 0, r = t.length; n < r; n++) {
|
|
3085
|
-
const
|
|
3086
|
-
this.point.events.push(
|
|
3070
|
+
const s = t[n];
|
|
3071
|
+
this.point.events.push(s), s.point = this.point;
|
|
3087
3072
|
}
|
|
3088
3073
|
this.checkForConsuming();
|
|
3089
3074
|
}
|
|
@@ -3095,8 +3080,8 @@ class oe {
|
|
|
3095
3080
|
const n = this.point.events[t];
|
|
3096
3081
|
if (n.segment.consumedBy === void 0)
|
|
3097
3082
|
for (let r = t + 1; r < e; r++) {
|
|
3098
|
-
const
|
|
3099
|
-
|
|
3083
|
+
const s = this.point.events[r];
|
|
3084
|
+
s.consumedBy === void 0 && n.otherSE.point.events === s.otherSE.point.events && n.segment.consume(s.segment);
|
|
3100
3085
|
}
|
|
3101
3086
|
}
|
|
3102
3087
|
}
|
|
@@ -3120,27 +3105,27 @@ class oe {
|
|
|
3120
3105
|
*/
|
|
3121
3106
|
getLeftmostComparator(e) {
|
|
3122
3107
|
const t = /* @__PURE__ */ new Map(), n = (r) => {
|
|
3123
|
-
const
|
|
3108
|
+
const s = r.otherSE;
|
|
3124
3109
|
t.set(r, {
|
|
3125
|
-
sine:
|
|
3126
|
-
cosine:
|
|
3110
|
+
sine: Pr(this.point, e.point, s.point),
|
|
3111
|
+
cosine: Ir(this.point, e.point, s.point)
|
|
3127
3112
|
});
|
|
3128
3113
|
};
|
|
3129
|
-
return (r,
|
|
3130
|
-
t.has(r) || n(r), t.has(
|
|
3114
|
+
return (r, s) => {
|
|
3115
|
+
t.has(r) || n(r), t.has(s) || n(s);
|
|
3131
3116
|
const {
|
|
3132
3117
|
sine: u,
|
|
3133
|
-
cosine:
|
|
3118
|
+
cosine: o
|
|
3134
3119
|
} = t.get(r), {
|
|
3135
3120
|
sine: c,
|
|
3136
3121
|
cosine: l
|
|
3137
|
-
} = t.get(
|
|
3138
|
-
return u >= 0 && c >= 0 ?
|
|
3122
|
+
} = t.get(s);
|
|
3123
|
+
return u >= 0 && c >= 0 ? o < l ? 1 : o > l ? -1 : 0 : u < 0 && c < 0 ? o < l ? -1 : o > l ? 1 : 0 : c < u ? -1 : c > u ? 1 : 0;
|
|
3139
3124
|
};
|
|
3140
3125
|
}
|
|
3141
3126
|
}
|
|
3142
|
-
let
|
|
3143
|
-
class
|
|
3127
|
+
let Ar = 0;
|
|
3128
|
+
class be {
|
|
3144
3129
|
/* This compare() function is for ordering segments in the sweep
|
|
3145
3130
|
* line tree, and does so according to the following criteria:
|
|
3146
3131
|
*
|
|
@@ -3155,13 +3140,13 @@ class Ee {
|
|
|
3155
3140
|
* is directly on the right-more of the two left inputs.
|
|
3156
3141
|
*/
|
|
3157
3142
|
static compare(e, t) {
|
|
3158
|
-
const n = e.leftSE.point.x, r = t.leftSE.point.x,
|
|
3143
|
+
const n = e.leftSE.point.x, r = t.leftSE.point.x, s = e.rightSE.point.x, u = t.rightSE.point.x;
|
|
3159
3144
|
if (u < n) return 1;
|
|
3160
|
-
if (
|
|
3161
|
-
const
|
|
3145
|
+
if (s < r) return -1;
|
|
3146
|
+
const o = e.leftSE.point.y, c = t.leftSE.point.y, l = e.rightSE.point.y, d = t.rightSE.point.y;
|
|
3162
3147
|
if (n < r) {
|
|
3163
|
-
if (c <
|
|
3164
|
-
if (c >
|
|
3148
|
+
if (c < o && c < l) return 1;
|
|
3149
|
+
if (c > o && c > l) return -1;
|
|
3165
3150
|
const a = e.comparePoint(t.leftSE.point);
|
|
3166
3151
|
if (a < 0) return 1;
|
|
3167
3152
|
if (a > 0) return -1;
|
|
@@ -3169,46 +3154,46 @@ class Ee {
|
|
|
3169
3154
|
return f !== 0 ? f : -1;
|
|
3170
3155
|
}
|
|
3171
3156
|
if (n > r) {
|
|
3172
|
-
if (
|
|
3173
|
-
if (
|
|
3157
|
+
if (o < c && o < d) return -1;
|
|
3158
|
+
if (o > c && o > d) return 1;
|
|
3174
3159
|
const a = t.comparePoint(e.leftSE.point);
|
|
3175
3160
|
if (a !== 0) return a;
|
|
3176
3161
|
const f = e.comparePoint(t.rightSE.point);
|
|
3177
3162
|
return f < 0 ? 1 : f > 0 ? -1 : 1;
|
|
3178
3163
|
}
|
|
3179
|
-
if (
|
|
3180
|
-
if (
|
|
3181
|
-
if (
|
|
3164
|
+
if (o < c) return -1;
|
|
3165
|
+
if (o > c) return 1;
|
|
3166
|
+
if (s < u) {
|
|
3182
3167
|
const a = t.comparePoint(e.rightSE.point);
|
|
3183
3168
|
if (a !== 0) return a;
|
|
3184
3169
|
}
|
|
3185
|
-
if (
|
|
3170
|
+
if (s > u) {
|
|
3186
3171
|
const a = e.comparePoint(t.rightSE.point);
|
|
3187
3172
|
if (a < 0) return 1;
|
|
3188
3173
|
if (a > 0) return -1;
|
|
3189
3174
|
}
|
|
3190
|
-
if (
|
|
3191
|
-
const a = l -
|
|
3175
|
+
if (s !== u) {
|
|
3176
|
+
const a = l - o, f = s - n, g = d - c, v = u - r;
|
|
3192
3177
|
if (a > f && g < v) return 1;
|
|
3193
3178
|
if (a < f && g > v) return -1;
|
|
3194
3179
|
}
|
|
3195
|
-
return
|
|
3180
|
+
return s > u ? 1 : s < u || l < d ? -1 : l > d ? 1 : e.id < t.id ? -1 : e.id > t.id ? 1 : 0;
|
|
3196
3181
|
}
|
|
3197
3182
|
/* Warning: a reference to ringWindings input will be stored,
|
|
3198
3183
|
* and possibly will be later modified */
|
|
3199
3184
|
constructor(e, t, n, r) {
|
|
3200
|
-
this.id = ++
|
|
3185
|
+
this.id = ++Ar, this.leftSE = e, e.segment = this, e.otherSE = t, this.rightSE = t, t.segment = this, t.otherSE = e, this.rings = n, this.windings = r;
|
|
3201
3186
|
}
|
|
3202
3187
|
static fromRing(e, t, n) {
|
|
3203
|
-
let r,
|
|
3204
|
-
const
|
|
3205
|
-
if (
|
|
3206
|
-
r = e,
|
|
3207
|
-
else if (
|
|
3208
|
-
r = t,
|
|
3188
|
+
let r, s, u;
|
|
3189
|
+
const o = ne.comparePoints(e, t);
|
|
3190
|
+
if (o < 0)
|
|
3191
|
+
r = e, s = t, u = 1;
|
|
3192
|
+
else if (o > 0)
|
|
3193
|
+
r = t, s = e, u = -1;
|
|
3209
3194
|
else throw new Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);
|
|
3210
|
-
const c = new
|
|
3211
|
-
return new
|
|
3195
|
+
const c = new ne(r, !0), l = new ne(s, !1);
|
|
3196
|
+
return new be(c, l, [n], [u]);
|
|
3212
3197
|
}
|
|
3213
3198
|
/* When a segment is split, the rightSE is replaced with a new sweep event */
|
|
3214
3199
|
replaceRightSE(e) {
|
|
@@ -3255,9 +3240,9 @@ class Ee {
|
|
|
3255
3240
|
const t = this.leftSE.point, n = this.rightSE.point, r = this.vector();
|
|
3256
3241
|
if (t.x === n.x)
|
|
3257
3242
|
return e.x === t.x ? 0 : e.x < t.x ? 1 : -1;
|
|
3258
|
-
const
|
|
3243
|
+
const s = (e.y - t.y) / r.y, u = t.x + s * r.x;
|
|
3259
3244
|
if (e.x === u) return 0;
|
|
3260
|
-
const
|
|
3245
|
+
const o = (e.x - t.x) / r.x, c = t.y + o * r.y;
|
|
3261
3246
|
return e.y === c ? 0 : e.y < c ? -1 : 1;
|
|
3262
3247
|
}
|
|
3263
3248
|
/**
|
|
@@ -3276,20 +3261,20 @@ class Ee {
|
|
|
3276
3261
|
* Else, return null.
|
|
3277
3262
|
*/
|
|
3278
3263
|
getIntersection(e) {
|
|
3279
|
-
const t = this.bbox(), n = e.bbox(), r =
|
|
3264
|
+
const t = this.bbox(), n = e.bbox(), r = It(t, n);
|
|
3280
3265
|
if (r === null) return null;
|
|
3281
|
-
const
|
|
3266
|
+
const s = this.leftSE.point, u = this.rightSE.point, o = e.leftSE.point, c = e.rightSE.point, l = Ue(t, o) && this.comparePoint(o) === 0, d = Ue(n, s) && e.comparePoint(s) === 0, a = Ue(t, c) && this.comparePoint(c) === 0, f = Ue(n, u) && e.comparePoint(u) === 0;
|
|
3282
3267
|
if (d && l)
|
|
3283
3268
|
return f && !a ? u : !f && a ? c : null;
|
|
3284
3269
|
if (d)
|
|
3285
|
-
return a &&
|
|
3270
|
+
return a && s.x === c.x && s.y === c.y ? null : s;
|
|
3286
3271
|
if (l)
|
|
3287
|
-
return f && u.x ===
|
|
3272
|
+
return f && u.x === o.x && u.y === o.y ? null : o;
|
|
3288
3273
|
if (f && a) return null;
|
|
3289
3274
|
if (f) return u;
|
|
3290
3275
|
if (a) return c;
|
|
3291
|
-
const g =
|
|
3292
|
-
return g === null || !
|
|
3276
|
+
const g = Or(s, this.vector(), o, e.vector());
|
|
3277
|
+
return g === null || !Ue(r, g) ? null : Ze.round(g.x, g.y);
|
|
3293
3278
|
}
|
|
3294
3279
|
/**
|
|
3295
3280
|
* Split the given segment into multiple segments on the given points.
|
|
@@ -3304,10 +3289,10 @@ class Ee {
|
|
|
3304
3289
|
* Warning: input array of points is modified
|
|
3305
3290
|
*/
|
|
3306
3291
|
split(e) {
|
|
3307
|
-
const t = [], n = e.events !== void 0, r = new
|
|
3308
|
-
this.replaceRightSE(
|
|
3309
|
-
const
|
|
3310
|
-
return
|
|
3292
|
+
const t = [], n = e.events !== void 0, r = new ne(e, !0), s = new ne(e, !1), u = this.rightSE;
|
|
3293
|
+
this.replaceRightSE(s), t.push(s), t.push(r);
|
|
3294
|
+
const o = new be(r, u, this.rings.slice(), this.windings.slice());
|
|
3295
|
+
return ne.comparePoints(o.leftSE.point, o.rightSE.point) > 0 && o.swapEvents(), ne.comparePoints(this.leftSE.point, this.rightSE.point) > 0 && this.swapEvents(), n && (r.checkForConsuming(), s.checkForConsuming()), t;
|
|
3311
3296
|
}
|
|
3312
3297
|
/* Swap which event is left and right */
|
|
3313
3298
|
swapEvents() {
|
|
@@ -3322,19 +3307,19 @@ class Ee {
|
|
|
3322
3307
|
let t = this, n = e;
|
|
3323
3308
|
for (; t.consumedBy; ) t = t.consumedBy;
|
|
3324
3309
|
for (; n.consumedBy; ) n = n.consumedBy;
|
|
3325
|
-
const r =
|
|
3310
|
+
const r = be.compare(t, n);
|
|
3326
3311
|
if (r !== 0) {
|
|
3327
3312
|
if (r > 0) {
|
|
3328
|
-
const
|
|
3329
|
-
t = n, n =
|
|
3313
|
+
const s = t;
|
|
3314
|
+
t = n, n = s;
|
|
3330
3315
|
}
|
|
3331
3316
|
if (t.prev === n) {
|
|
3332
|
-
const
|
|
3333
|
-
t = n, n =
|
|
3317
|
+
const s = t;
|
|
3318
|
+
t = n, n = s;
|
|
3334
3319
|
}
|
|
3335
|
-
for (let
|
|
3336
|
-
const
|
|
3337
|
-
l === -1 ? (t.rings.push(
|
|
3320
|
+
for (let s = 0, u = n.rings.length; s < u; s++) {
|
|
3321
|
+
const o = n.rings[s], c = n.windings[s], l = t.rings.indexOf(o);
|
|
3322
|
+
l === -1 ? (t.rings.push(o), t.windings.push(c)) : t.windings[l] += c;
|
|
3338
3323
|
}
|
|
3339
3324
|
n.rings = null, n.windings = null, n.consumedBy = t, n.leftSE.consumedBy = t.leftSE, n.rightSE.consumedBy = t.rightSE;
|
|
3340
3325
|
}
|
|
@@ -3365,24 +3350,24 @@ class Ee {
|
|
|
3365
3350
|
multiPolys: []
|
|
3366
3351
|
};
|
|
3367
3352
|
const t = this._afterState.rings, n = this._afterState.windings, r = this._afterState.multiPolys;
|
|
3368
|
-
for (let
|
|
3369
|
-
const l = this.rings[
|
|
3353
|
+
for (let o = 0, c = this.rings.length; o < c; o++) {
|
|
3354
|
+
const l = this.rings[o], d = this.windings[o], a = t.indexOf(l);
|
|
3370
3355
|
a === -1 ? (t.push(l), n.push(d)) : n[a] += d;
|
|
3371
3356
|
}
|
|
3372
|
-
const
|
|
3373
|
-
for (let
|
|
3374
|
-
if (n[
|
|
3375
|
-
const l = t[
|
|
3357
|
+
const s = [], u = [];
|
|
3358
|
+
for (let o = 0, c = t.length; o < c; o++) {
|
|
3359
|
+
if (n[o] === 0) continue;
|
|
3360
|
+
const l = t[o], d = l.poly;
|
|
3376
3361
|
if (u.indexOf(d) === -1)
|
|
3377
|
-
if (l.isExterior)
|
|
3362
|
+
if (l.isExterior) s.push(d);
|
|
3378
3363
|
else {
|
|
3379
3364
|
u.indexOf(d) === -1 && u.push(d);
|
|
3380
|
-
const a =
|
|
3381
|
-
a !== -1 &&
|
|
3365
|
+
const a = s.indexOf(l.poly);
|
|
3366
|
+
a !== -1 && s.splice(a, 1);
|
|
3382
3367
|
}
|
|
3383
3368
|
}
|
|
3384
|
-
for (let
|
|
3385
|
-
const l = o
|
|
3369
|
+
for (let o = 0, c = s.length; o < c; o++) {
|
|
3370
|
+
const l = s[o].multiPoly;
|
|
3386
3371
|
r.indexOf(l) === -1 && r.push(l);
|
|
3387
3372
|
}
|
|
3388
3373
|
return this._afterState;
|
|
@@ -3392,7 +3377,7 @@ class Ee {
|
|
|
3392
3377
|
if (this.consumedBy) return !1;
|
|
3393
3378
|
if (this._isInResult !== void 0) return this._isInResult;
|
|
3394
3379
|
const e = this.beforeState().multiPolys, t = this.afterState().multiPolys;
|
|
3395
|
-
switch (
|
|
3380
|
+
switch (oe.type) {
|
|
3396
3381
|
case "union": {
|
|
3397
3382
|
const n = e.length === 0, r = t.length === 0;
|
|
3398
3383
|
this._isInResult = n !== r;
|
|
@@ -3400,7 +3385,7 @@ class Ee {
|
|
|
3400
3385
|
}
|
|
3401
3386
|
case "intersection": {
|
|
3402
3387
|
let n, r;
|
|
3403
|
-
e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r ===
|
|
3388
|
+
e.length < t.length ? (n = e.length, r = t.length) : (n = t.length, r = e.length), this._isInResult = r === oe.numMultiPolys && n < r;
|
|
3404
3389
|
break;
|
|
3405
3390
|
}
|
|
3406
3391
|
case "xor": {
|
|
@@ -3414,18 +3399,18 @@ class Ee {
|
|
|
3414
3399
|
break;
|
|
3415
3400
|
}
|
|
3416
3401
|
default:
|
|
3417
|
-
throw new Error(`Unrecognized operation type found ${
|
|
3402
|
+
throw new Error(`Unrecognized operation type found ${oe.type}`);
|
|
3418
3403
|
}
|
|
3419
3404
|
return this._isInResult;
|
|
3420
3405
|
}
|
|
3421
3406
|
}
|
|
3422
|
-
class
|
|
3407
|
+
class pi {
|
|
3423
3408
|
constructor(e, t, n) {
|
|
3424
3409
|
if (!Array.isArray(e) || e.length === 0)
|
|
3425
3410
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3426
3411
|
if (this.poly = t, this.isExterior = n, this.segments = [], typeof e[0][0] != "number" || typeof e[0][1] != "number")
|
|
3427
3412
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3428
|
-
const r =
|
|
3413
|
+
const r = Ze.round(e[0][0], e[0][1]);
|
|
3429
3414
|
this.bbox = {
|
|
3430
3415
|
ll: {
|
|
3431
3416
|
x: r.x,
|
|
@@ -3436,14 +3421,14 @@ class Ei {
|
|
|
3436
3421
|
y: r.y
|
|
3437
3422
|
}
|
|
3438
3423
|
};
|
|
3439
|
-
let
|
|
3440
|
-
for (let u = 1,
|
|
3424
|
+
let s = r;
|
|
3425
|
+
for (let u = 1, o = e.length; u < o; u++) {
|
|
3441
3426
|
if (typeof e[u][0] != "number" || typeof e[u][1] != "number")
|
|
3442
3427
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3443
|
-
let c =
|
|
3444
|
-
c.x ===
|
|
3428
|
+
let c = Ze.round(e[u][0], e[u][1]);
|
|
3429
|
+
c.x === s.x && c.y === s.y || (this.segments.push(be.fromRing(s, 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), s = c);
|
|
3445
3430
|
}
|
|
3446
|
-
(r.x !==
|
|
3431
|
+
(r.x !== s.x || r.y !== s.y) && this.segments.push(be.fromRing(s, r, this));
|
|
3447
3432
|
}
|
|
3448
3433
|
getSweepEvents() {
|
|
3449
3434
|
const e = [];
|
|
@@ -3454,11 +3439,11 @@ class Ei {
|
|
|
3454
3439
|
return e;
|
|
3455
3440
|
}
|
|
3456
3441
|
}
|
|
3457
|
-
class
|
|
3442
|
+
class Wr {
|
|
3458
3443
|
constructor(e, t) {
|
|
3459
3444
|
if (!Array.isArray(e))
|
|
3460
3445
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
3461
|
-
this.exteriorRing = new
|
|
3446
|
+
this.exteriorRing = new pi(e[0], this, !0), this.bbox = {
|
|
3462
3447
|
ll: {
|
|
3463
3448
|
x: this.exteriorRing.bbox.ll.x,
|
|
3464
3449
|
y: this.exteriorRing.bbox.ll.y
|
|
@@ -3469,8 +3454,8 @@ class Ur {
|
|
|
3469
3454
|
}
|
|
3470
3455
|
}, this.interiorRings = [];
|
|
3471
3456
|
for (let n = 1, r = e.length; n < r; n++) {
|
|
3472
|
-
const
|
|
3473
|
-
|
|
3457
|
+
const s = new pi(e[n], this, !1);
|
|
3458
|
+
s.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = s.bbox.ll.x), s.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = s.bbox.ll.y), s.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = s.bbox.ur.x), s.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = s.bbox.ur.y), this.interiorRings.push(s);
|
|
3474
3459
|
}
|
|
3475
3460
|
this.multiPoly = t;
|
|
3476
3461
|
}
|
|
@@ -3478,13 +3463,13 @@ class Ur {
|
|
|
3478
3463
|
const e = this.exteriorRing.getSweepEvents();
|
|
3479
3464
|
for (let t = 0, n = this.interiorRings.length; t < n; t++) {
|
|
3480
3465
|
const r = this.interiorRings[t].getSweepEvents();
|
|
3481
|
-
for (let
|
|
3482
|
-
e.push(r[
|
|
3466
|
+
for (let s = 0, u = r.length; s < u; s++)
|
|
3467
|
+
e.push(r[s]);
|
|
3483
3468
|
}
|
|
3484
3469
|
return e;
|
|
3485
3470
|
}
|
|
3486
3471
|
}
|
|
3487
|
-
class
|
|
3472
|
+
class bi {
|
|
3488
3473
|
constructor(e, t) {
|
|
3489
3474
|
if (!Array.isArray(e))
|
|
3490
3475
|
throw new Error("Input geometry is not a valid Polygon or MultiPolygon");
|
|
@@ -3503,8 +3488,8 @@ class _i {
|
|
|
3503
3488
|
}
|
|
3504
3489
|
};
|
|
3505
3490
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
3506
|
-
const
|
|
3507
|
-
|
|
3491
|
+
const s = new Wr(e[n], this);
|
|
3492
|
+
s.bbox.ll.x < this.bbox.ll.x && (this.bbox.ll.x = s.bbox.ll.x), s.bbox.ll.y < this.bbox.ll.y && (this.bbox.ll.y = s.bbox.ll.y), s.bbox.ur.x > this.bbox.ur.x && (this.bbox.ur.x = s.bbox.ur.x), s.bbox.ur.y > this.bbox.ur.y && (this.bbox.ur.y = s.bbox.ur.y), this.polys.push(s);
|
|
3508
3493
|
}
|
|
3509
3494
|
this.isSubject = t;
|
|
3510
3495
|
}
|
|
@@ -3512,25 +3497,25 @@ class _i {
|
|
|
3512
3497
|
const e = [];
|
|
3513
3498
|
for (let t = 0, n = this.polys.length; t < n; t++) {
|
|
3514
3499
|
const r = this.polys[t].getSweepEvents();
|
|
3515
|
-
for (let
|
|
3516
|
-
e.push(r[
|
|
3500
|
+
for (let s = 0, u = r.length; s < u; s++)
|
|
3501
|
+
e.push(r[s]);
|
|
3517
3502
|
}
|
|
3518
3503
|
return e;
|
|
3519
3504
|
}
|
|
3520
3505
|
}
|
|
3521
|
-
class
|
|
3506
|
+
class ut {
|
|
3522
3507
|
/* Given the segments from the sweep line pass, compute & return a series
|
|
3523
3508
|
* of closed rings from all the segments marked to be part of the result */
|
|
3524
3509
|
static factory(e) {
|
|
3525
3510
|
const t = [];
|
|
3526
3511
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
3527
|
-
const
|
|
3528
|
-
if (!
|
|
3529
|
-
let u = null,
|
|
3530
|
-
const l = [
|
|
3531
|
-
for (; u =
|
|
3512
|
+
const s = e[n];
|
|
3513
|
+
if (!s.isInResult() || s.ringOut) continue;
|
|
3514
|
+
let u = null, o = s.leftSE, c = s.rightSE;
|
|
3515
|
+
const l = [o], d = o.point, a = [];
|
|
3516
|
+
for (; u = o, o = c, l.push(o), o.point !== d; )
|
|
3532
3517
|
for (; ; ) {
|
|
3533
|
-
const f =
|
|
3518
|
+
const f = o.getAvailableLinkedEvents();
|
|
3534
3519
|
if (f.length === 0) {
|
|
3535
3520
|
const _ = l[0].point, h = l[l.length - 1].point;
|
|
3536
3521
|
throw new Error(`Unable to complete output ring starting at [${_.x}, ${_.y}]. Last matching segment found ends at [${h.x}, ${h.y}].`);
|
|
@@ -3541,24 +3526,24 @@ class ft {
|
|
|
3541
3526
|
}
|
|
3542
3527
|
let g = null;
|
|
3543
3528
|
for (let _ = 0, h = a.length; _ < h; _++)
|
|
3544
|
-
if (a[_].point ===
|
|
3529
|
+
if (a[_].point === o.point) {
|
|
3545
3530
|
g = _;
|
|
3546
3531
|
break;
|
|
3547
3532
|
}
|
|
3548
3533
|
if (g !== null) {
|
|
3549
3534
|
const _ = a.splice(g)[0], h = l.splice(_.index);
|
|
3550
|
-
h.unshift(h[0].otherSE), t.push(new
|
|
3535
|
+
h.unshift(h[0].otherSE), t.push(new ut(h.reverse()));
|
|
3551
3536
|
continue;
|
|
3552
3537
|
}
|
|
3553
3538
|
a.push({
|
|
3554
3539
|
index: l.length,
|
|
3555
|
-
point:
|
|
3540
|
+
point: o.point
|
|
3556
3541
|
});
|
|
3557
|
-
const v =
|
|
3542
|
+
const v = o.getLeftmostComparator(u);
|
|
3558
3543
|
c = f.sort(v)[0].otherSE;
|
|
3559
3544
|
break;
|
|
3560
3545
|
}
|
|
3561
|
-
t.push(new
|
|
3546
|
+
t.push(new ut(l));
|
|
3562
3547
|
}
|
|
3563
3548
|
return t;
|
|
3564
3549
|
}
|
|
@@ -3573,13 +3558,13 @@ class ft {
|
|
|
3573
3558
|
const t = [e];
|
|
3574
3559
|
for (let l = 1, d = this.events.length - 1; l < d; l++) {
|
|
3575
3560
|
const a = this.events[l].point, f = this.events[l + 1].point;
|
|
3576
|
-
|
|
3561
|
+
mi(a, e, f) !== 0 && (t.push(a), e = a);
|
|
3577
3562
|
}
|
|
3578
3563
|
if (t.length === 1) return null;
|
|
3579
3564
|
const n = t[0], r = t[1];
|
|
3580
|
-
|
|
3581
|
-
const
|
|
3582
|
-
for (let l = u; l !=
|
|
3565
|
+
mi(n, e, r) === 0 && t.shift(), t.push(t[0]);
|
|
3566
|
+
const s = this.isExteriorRing() ? 1 : -1, u = this.isExteriorRing() ? 0 : t.length - 1, o = this.isExteriorRing() ? t.length : -1, c = [];
|
|
3567
|
+
for (let l = u; l != o; l += s) c.push([t[l].x, t[l].y]);
|
|
3583
3568
|
return c;
|
|
3584
3569
|
}
|
|
3585
3570
|
isExteriorRing() {
|
|
@@ -3595,9 +3580,9 @@ class ft {
|
|
|
3595
3580
|
/* Returns the ring that encloses this one, if any */
|
|
3596
3581
|
_calcEnclosingRing() {
|
|
3597
3582
|
let e = this.events[0];
|
|
3598
|
-
for (let r = 1,
|
|
3583
|
+
for (let r = 1, s = this.events.length; r < s; r++) {
|
|
3599
3584
|
const u = this.events[r];
|
|
3600
|
-
|
|
3585
|
+
ne.compare(e, u) > 0 && (e = u);
|
|
3601
3586
|
}
|
|
3602
3587
|
let t = e.segment.prevInResult(), n = t ? t.prevInResult() : null;
|
|
3603
3588
|
for (; ; ) {
|
|
@@ -3609,7 +3594,7 @@ class ft {
|
|
|
3609
3594
|
}
|
|
3610
3595
|
}
|
|
3611
3596
|
}
|
|
3612
|
-
class
|
|
3597
|
+
class Ei {
|
|
3613
3598
|
constructor(e) {
|
|
3614
3599
|
this.exteriorRing = e, e.poly = this, this.interiorRings = [];
|
|
3615
3600
|
}
|
|
@@ -3626,7 +3611,7 @@ class Li {
|
|
|
3626
3611
|
return e;
|
|
3627
3612
|
}
|
|
3628
3613
|
}
|
|
3629
|
-
class
|
|
3614
|
+
class zr {
|
|
3630
3615
|
constructor(e) {
|
|
3631
3616
|
this.rings = e, this.polys = this._composePolys(e);
|
|
3632
3617
|
}
|
|
@@ -3641,21 +3626,21 @@ class Fr {
|
|
|
3641
3626
|
_composePolys(e) {
|
|
3642
3627
|
const t = [];
|
|
3643
3628
|
for (let n = 0, r = e.length; n < r; n++) {
|
|
3644
|
-
const
|
|
3645
|
-
if (!
|
|
3646
|
-
if (
|
|
3629
|
+
const s = e[n];
|
|
3630
|
+
if (!s.poly)
|
|
3631
|
+
if (s.isExteriorRing()) t.push(new Ei(s));
|
|
3647
3632
|
else {
|
|
3648
|
-
const u =
|
|
3649
|
-
u.poly || t.push(new
|
|
3633
|
+
const u = s.enclosingRing();
|
|
3634
|
+
u.poly || t.push(new Ei(u)), u.poly.addInterior(s);
|
|
3650
3635
|
}
|
|
3651
3636
|
}
|
|
3652
3637
|
return t;
|
|
3653
3638
|
}
|
|
3654
3639
|
}
|
|
3655
|
-
class
|
|
3640
|
+
class Br {
|
|
3656
3641
|
constructor(e) {
|
|
3657
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
3658
|
-
this.queue = e, this.tree = new
|
|
3642
|
+
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : be.compare;
|
|
3643
|
+
this.queue = e, this.tree = new Wt(t), this.segments = [];
|
|
3659
3644
|
}
|
|
3660
3645
|
process(e) {
|
|
3661
3646
|
const t = e.segment, n = [];
|
|
@@ -3663,17 +3648,17 @@ class Gr {
|
|
|
3663
3648
|
return e.isLeft ? this.queue.remove(e.otherSE) : this.tree.remove(t), n;
|
|
3664
3649
|
const r = e.isLeft ? this.tree.add(t) : this.tree.find(t);
|
|
3665
3650
|
if (!r) throw new Error(`Unable to find segment #${t.id} [${t.leftSE.point.x}, ${t.leftSE.point.y}] -> [${t.rightSE.point.x}, ${t.rightSE.point.y}] in SweepLine tree.`);
|
|
3666
|
-
let
|
|
3667
|
-
for (;
|
|
3668
|
-
|
|
3651
|
+
let s = r, u = r, o, c;
|
|
3652
|
+
for (; o === void 0; )
|
|
3653
|
+
s = this.tree.prev(s), s === null ? o = null : s.key.consumedBy === void 0 && (o = s.key);
|
|
3669
3654
|
for (; c === void 0; )
|
|
3670
3655
|
u = this.tree.next(u), u === null ? c = null : u.key.consumedBy === void 0 && (c = u.key);
|
|
3671
3656
|
if (e.isLeft) {
|
|
3672
3657
|
let l = null;
|
|
3673
|
-
if (
|
|
3674
|
-
const a =
|
|
3675
|
-
if (a !== null && (t.isAnEndpoint(a) || (l = a), !
|
|
3676
|
-
const f = this._splitSafely(
|
|
3658
|
+
if (o) {
|
|
3659
|
+
const a = o.getIntersection(t);
|
|
3660
|
+
if (a !== null && (t.isAnEndpoint(a) || (l = a), !o.isAnEndpoint(a))) {
|
|
3661
|
+
const f = this._splitSafely(o, a);
|
|
3677
3662
|
for (let g = 0, v = f.length; g < v; g++)
|
|
3678
3663
|
n.push(f[g]);
|
|
3679
3664
|
}
|
|
@@ -3689,18 +3674,18 @@ class Gr {
|
|
|
3689
3674
|
}
|
|
3690
3675
|
if (l !== null || d !== null) {
|
|
3691
3676
|
let a = null;
|
|
3692
|
-
l === null ? a = d : d === null ? a = l : a =
|
|
3677
|
+
l === null ? a = d : d === null ? a = l : a = ne.comparePoints(l, d) <= 0 ? l : d, this.queue.remove(t.rightSE), n.push(t.rightSE);
|
|
3693
3678
|
const f = t.split(a);
|
|
3694
3679
|
for (let g = 0, v = f.length; g < v; g++)
|
|
3695
3680
|
n.push(f[g]);
|
|
3696
3681
|
}
|
|
3697
|
-
n.length > 0 ? (this.tree.remove(t), n.push(e)) : (this.segments.push(t), t.prev =
|
|
3682
|
+
n.length > 0 ? (this.tree.remove(t), n.push(e)) : (this.segments.push(t), t.prev = o);
|
|
3698
3683
|
} else {
|
|
3699
|
-
if (
|
|
3700
|
-
const l =
|
|
3684
|
+
if (o && c) {
|
|
3685
|
+
const l = o.getIntersection(c);
|
|
3701
3686
|
if (l !== null) {
|
|
3702
|
-
if (!
|
|
3703
|
-
const d = this._splitSafely(
|
|
3687
|
+
if (!o.isAnEndpoint(l)) {
|
|
3688
|
+
const d = this._splitSafely(o, l);
|
|
3704
3689
|
for (let a = 0, f = d.length; a < f; a++)
|
|
3705
3690
|
n.push(d[a]);
|
|
3706
3691
|
}
|
|
@@ -3725,85 +3710,85 @@ class Gr {
|
|
|
3725
3710
|
return r.push(n), e.consumedBy === void 0 && this.tree.add(e), r;
|
|
3726
3711
|
}
|
|
3727
3712
|
}
|
|
3728
|
-
const
|
|
3729
|
-
class
|
|
3713
|
+
const wi = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE || 1e6, Dr = typeof process < "u" && process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS || 1e6;
|
|
3714
|
+
class Ur {
|
|
3730
3715
|
run(e, t, n) {
|
|
3731
|
-
|
|
3732
|
-
const r = [new
|
|
3716
|
+
oe.type = e, Ze.reset();
|
|
3717
|
+
const r = [new bi(t, !0)];
|
|
3733
3718
|
for (let a = 0, f = n.length; a < f; a++)
|
|
3734
|
-
r.push(new
|
|
3735
|
-
if (
|
|
3719
|
+
r.push(new bi(n[a], !1));
|
|
3720
|
+
if (oe.numMultiPolys = r.length, oe.type === "difference") {
|
|
3736
3721
|
const a = r[0];
|
|
3737
3722
|
let f = 1;
|
|
3738
3723
|
for (; f < r.length; )
|
|
3739
|
-
|
|
3724
|
+
It(r[f].bbox, a.bbox) !== null ? f++ : r.splice(f, 1);
|
|
3740
3725
|
}
|
|
3741
|
-
if (
|
|
3726
|
+
if (oe.type === "intersection")
|
|
3742
3727
|
for (let a = 0, f = r.length; a < f; a++) {
|
|
3743
3728
|
const g = r[a];
|
|
3744
3729
|
for (let v = a + 1, _ = r.length; v < _; v++)
|
|
3745
|
-
if (
|
|
3730
|
+
if (It(g.bbox, r[v].bbox) === null) return [];
|
|
3746
3731
|
}
|
|
3747
|
-
const
|
|
3732
|
+
const s = new Wt(ne.compare);
|
|
3748
3733
|
for (let a = 0, f = r.length; a < f; a++) {
|
|
3749
3734
|
const g = r[a].getSweepEvents();
|
|
3750
3735
|
for (let v = 0, _ = g.length; v < _; v++)
|
|
3751
|
-
if (
|
|
3736
|
+
if (s.insert(g[v]), s.size > wi)
|
|
3752
3737
|
throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big).");
|
|
3753
3738
|
}
|
|
3754
|
-
const u = new
|
|
3755
|
-
let
|
|
3739
|
+
const u = new Br(s);
|
|
3740
|
+
let o = s.size, c = s.pop();
|
|
3756
3741
|
for (; c; ) {
|
|
3757
3742
|
const a = c.key;
|
|
3758
|
-
if (
|
|
3743
|
+
if (s.size === o) {
|
|
3759
3744
|
const g = a.segment;
|
|
3760
3745
|
throw new Error(`Unable to pop() ${a.isLeft ? "left" : "right"} SweepEvent [${a.point.x}, ${a.point.y}] from segment #${g.id} [${g.leftSE.point.x}, ${g.leftSE.point.y}] -> [${g.rightSE.point.x}, ${g.rightSE.point.y}] from queue.`);
|
|
3761
3746
|
}
|
|
3762
|
-
if (
|
|
3747
|
+
if (s.size > wi)
|
|
3763
3748
|
throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big).");
|
|
3764
|
-
if (u.segments.length >
|
|
3749
|
+
if (u.segments.length > Dr)
|
|
3765
3750
|
throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments).");
|
|
3766
3751
|
const f = u.process(a);
|
|
3767
3752
|
for (let g = 0, v = f.length; g < v; g++) {
|
|
3768
3753
|
const _ = f[g];
|
|
3769
|
-
_.consumedBy === void 0 &&
|
|
3754
|
+
_.consumedBy === void 0 && s.insert(_);
|
|
3770
3755
|
}
|
|
3771
|
-
|
|
3756
|
+
o = s.size, c = s.pop();
|
|
3772
3757
|
}
|
|
3773
|
-
|
|
3774
|
-
const l =
|
|
3775
|
-
return new
|
|
3758
|
+
Ze.reset();
|
|
3759
|
+
const l = ut.factory(u.segments);
|
|
3760
|
+
return new zr(l).getGeom();
|
|
3776
3761
|
}
|
|
3777
3762
|
}
|
|
3778
|
-
const
|
|
3763
|
+
const oe = new Ur(), Fr = function(i) {
|
|
3779
3764
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
3780
3765
|
t[n - 1] = arguments[n];
|
|
3781
|
-
return
|
|
3782
|
-
},
|
|
3766
|
+
return oe.run("union", i, t);
|
|
3767
|
+
}, Gr = function(i) {
|
|
3783
3768
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
3784
3769
|
t[n - 1] = arguments[n];
|
|
3785
|
-
return
|
|
3786
|
-
},
|
|
3770
|
+
return oe.run("intersection", i, t);
|
|
3771
|
+
}, jr = function(i) {
|
|
3787
3772
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
3788
3773
|
t[n - 1] = arguments[n];
|
|
3789
|
-
return
|
|
3790
|
-
},
|
|
3774
|
+
return oe.run("xor", i, t);
|
|
3775
|
+
}, qr = function(i) {
|
|
3791
3776
|
for (var e = arguments.length, t = new Array(e > 1 ? e - 1 : 0), n = 1; n < e; n++)
|
|
3792
3777
|
t[n - 1] = arguments[n];
|
|
3793
|
-
return
|
|
3778
|
+
return oe.run("difference", i, t);
|
|
3794
3779
|
};
|
|
3795
|
-
var
|
|
3796
|
-
union:
|
|
3797
|
-
intersection:
|
|
3798
|
-
xor:
|
|
3799
|
-
difference:
|
|
3780
|
+
var Wi = {
|
|
3781
|
+
union: Fr,
|
|
3782
|
+
intersection: Gr,
|
|
3783
|
+
xor: jr,
|
|
3784
|
+
difference: qr
|
|
3800
3785
|
};
|
|
3801
|
-
function
|
|
3786
|
+
function zi(i, e, t) {
|
|
3802
3787
|
if (i !== null)
|
|
3803
|
-
for (var n, r,
|
|
3804
|
-
l = v ? i.features[y].geometry : _ ? i.geometry : i, f = l ? l.type === "GeometryCollection" : !1,
|
|
3805
|
-
for (var p = 0; p <
|
|
3806
|
-
var
|
|
3788
|
+
for (var n, r, s, u, o, c, l, d = 0, a = 0, f, g = i.type, v = g === "FeatureCollection", _ = g === "Feature", h = v ? i.features.length : 1, y = 0; y < h; y++) {
|
|
3789
|
+
l = v ? i.features[y].geometry : _ ? i.geometry : i, f = l ? l.type === "GeometryCollection" : !1, o = f ? l.geometries.length : 1;
|
|
3790
|
+
for (var p = 0; p < o; p++) {
|
|
3791
|
+
var E = 0, S = 0;
|
|
3807
3792
|
if (u = f ? l.geometries[p] : l, u !== null) {
|
|
3808
3793
|
c = u.coordinates;
|
|
3809
3794
|
var M = u.type;
|
|
@@ -3815,11 +3800,11 @@ function Ui(i, e, t) {
|
|
|
3815
3800
|
c,
|
|
3816
3801
|
a,
|
|
3817
3802
|
y,
|
|
3818
|
-
|
|
3803
|
+
E,
|
|
3819
3804
|
S
|
|
3820
3805
|
) === !1)
|
|
3821
3806
|
return !1;
|
|
3822
|
-
a++,
|
|
3807
|
+
a++, E++;
|
|
3823
3808
|
break;
|
|
3824
3809
|
case "LineString":
|
|
3825
3810
|
case "MultiPoint":
|
|
@@ -3828,13 +3813,13 @@ function Ui(i, e, t) {
|
|
|
3828
3813
|
c[n],
|
|
3829
3814
|
a,
|
|
3830
3815
|
y,
|
|
3831
|
-
|
|
3816
|
+
E,
|
|
3832
3817
|
S
|
|
3833
3818
|
) === !1)
|
|
3834
3819
|
return !1;
|
|
3835
|
-
a++, M === "MultiPoint" &&
|
|
3820
|
+
a++, M === "MultiPoint" && E++;
|
|
3836
3821
|
}
|
|
3837
|
-
M === "LineString" &&
|
|
3822
|
+
M === "LineString" && E++;
|
|
3838
3823
|
break;
|
|
3839
3824
|
case "Polygon":
|
|
3840
3825
|
case "MultiLineString":
|
|
@@ -3844,25 +3829,25 @@ function Ui(i, e, t) {
|
|
|
3844
3829
|
c[n][r],
|
|
3845
3830
|
a,
|
|
3846
3831
|
y,
|
|
3847
|
-
|
|
3832
|
+
E,
|
|
3848
3833
|
S
|
|
3849
3834
|
) === !1)
|
|
3850
3835
|
return !1;
|
|
3851
3836
|
a++;
|
|
3852
3837
|
}
|
|
3853
|
-
M === "MultiLineString" &&
|
|
3838
|
+
M === "MultiLineString" && E++, M === "Polygon" && S++;
|
|
3854
3839
|
}
|
|
3855
|
-
M === "Polygon" &&
|
|
3840
|
+
M === "Polygon" && E++;
|
|
3856
3841
|
break;
|
|
3857
3842
|
case "MultiPolygon":
|
|
3858
3843
|
for (n = 0; n < c.length; n++) {
|
|
3859
3844
|
for (S = 0, r = 0; r < c[n].length; r++) {
|
|
3860
|
-
for (
|
|
3845
|
+
for (s = 0; s < c[n][r].length - d; s++) {
|
|
3861
3846
|
if (e(
|
|
3862
|
-
c[n][r][
|
|
3847
|
+
c[n][r][s],
|
|
3863
3848
|
a,
|
|
3864
3849
|
y,
|
|
3865
|
-
|
|
3850
|
+
E,
|
|
3866
3851
|
S
|
|
3867
3852
|
) === !1)
|
|
3868
3853
|
return !1;
|
|
@@ -3870,12 +3855,12 @@ function Ui(i, e, t) {
|
|
|
3870
3855
|
}
|
|
3871
3856
|
S++;
|
|
3872
3857
|
}
|
|
3873
|
-
|
|
3858
|
+
E++;
|
|
3874
3859
|
}
|
|
3875
3860
|
break;
|
|
3876
3861
|
case "GeometryCollection":
|
|
3877
3862
|
for (n = 0; n < u.geometries.length; n++)
|
|
3878
|
-
if (
|
|
3863
|
+
if (zi(u.geometries[n], e) === !1)
|
|
3879
3864
|
return !1;
|
|
3880
3865
|
break;
|
|
3881
3866
|
default:
|
|
@@ -3885,11 +3870,11 @@ function Ui(i, e, t) {
|
|
|
3885
3870
|
}
|
|
3886
3871
|
}
|
|
3887
3872
|
}
|
|
3888
|
-
function
|
|
3889
|
-
var t, n, r,
|
|
3873
|
+
function zt(i, e) {
|
|
3874
|
+
var t, n, r, s, u, o, c, l, d, a, f = 0, g = i.type === "FeatureCollection", v = i.type === "Feature", _ = g ? i.features.length : 1;
|
|
3890
3875
|
for (t = 0; t < _; t++) {
|
|
3891
|
-
for (
|
|
3892
|
-
if (
|
|
3876
|
+
for (o = g ? i.features[t].geometry : v ? i.geometry : i, l = g ? i.features[t].properties : v ? i.properties : {}, d = g ? i.features[t].bbox : v ? i.bbox : void 0, a = g ? i.features[t].id : v ? i.id : void 0, c = o ? o.type === "GeometryCollection" : !1, u = c ? o.geometries.length : 1, r = 0; r < u; r++) {
|
|
3877
|
+
if (s = c ? o.geometries[r] : o, s === null) {
|
|
3893
3878
|
if (e(
|
|
3894
3879
|
null,
|
|
3895
3880
|
f,
|
|
@@ -3900,7 +3885,7 @@ function Ut(i, e) {
|
|
|
3900
3885
|
return !1;
|
|
3901
3886
|
continue;
|
|
3902
3887
|
}
|
|
3903
|
-
switch (
|
|
3888
|
+
switch (s.type) {
|
|
3904
3889
|
case "Point":
|
|
3905
3890
|
case "LineString":
|
|
3906
3891
|
case "MultiPoint":
|
|
@@ -3908,7 +3893,7 @@ function Ut(i, e) {
|
|
|
3908
3893
|
case "MultiLineString":
|
|
3909
3894
|
case "MultiPolygon": {
|
|
3910
3895
|
if (e(
|
|
3911
|
-
|
|
3896
|
+
s,
|
|
3912
3897
|
f,
|
|
3913
3898
|
l,
|
|
3914
3899
|
d,
|
|
@@ -3918,9 +3903,9 @@ function Ut(i, e) {
|
|
|
3918
3903
|
break;
|
|
3919
3904
|
}
|
|
3920
3905
|
case "GeometryCollection": {
|
|
3921
|
-
for (n = 0; n <
|
|
3906
|
+
for (n = 0; n < s.geometries.length; n++)
|
|
3922
3907
|
if (e(
|
|
3923
|
-
|
|
3908
|
+
s.geometries[n],
|
|
3924
3909
|
f,
|
|
3925
3910
|
l,
|
|
3926
3911
|
d,
|
|
@@ -3936,22 +3921,22 @@ function Ut(i, e) {
|
|
|
3936
3921
|
f++;
|
|
3937
3922
|
}
|
|
3938
3923
|
}
|
|
3939
|
-
function
|
|
3940
|
-
|
|
3941
|
-
var
|
|
3942
|
-
switch (
|
|
3924
|
+
function Qr(i, e) {
|
|
3925
|
+
zt(i, function(t, n, r, s, u) {
|
|
3926
|
+
var o = t === null ? null : t.type;
|
|
3927
|
+
switch (o) {
|
|
3943
3928
|
case null:
|
|
3944
3929
|
case "Point":
|
|
3945
3930
|
case "LineString":
|
|
3946
3931
|
case "Polygon":
|
|
3947
3932
|
return e(
|
|
3948
|
-
|
|
3933
|
+
qe(t, r, { bbox: s, id: u }),
|
|
3949
3934
|
n,
|
|
3950
3935
|
0
|
|
3951
3936
|
) === !1 ? !1 : void 0;
|
|
3952
3937
|
}
|
|
3953
3938
|
var c;
|
|
3954
|
-
switch (
|
|
3939
|
+
switch (o) {
|
|
3955
3940
|
case "MultiPoint":
|
|
3956
3941
|
c = "Point";
|
|
3957
3942
|
break;
|
|
@@ -3967,53 +3952,53 @@ function Yr(i, e) {
|
|
|
3967
3952
|
type: c,
|
|
3968
3953
|
coordinates: d
|
|
3969
3954
|
};
|
|
3970
|
-
if (e(
|
|
3955
|
+
if (e(qe(a, r), n, l) === !1)
|
|
3971
3956
|
return !1;
|
|
3972
3957
|
}
|
|
3973
3958
|
});
|
|
3974
3959
|
}
|
|
3975
|
-
function
|
|
3960
|
+
function Zr(i, e = {}) {
|
|
3976
3961
|
const t = [];
|
|
3977
|
-
if (
|
|
3962
|
+
if (zt(i, (r) => {
|
|
3978
3963
|
t.push(r.coordinates);
|
|
3979
3964
|
}), t.length < 2)
|
|
3980
3965
|
throw new Error("Must have at least 2 geometries");
|
|
3981
|
-
const n =
|
|
3982
|
-
return n.length === 0 ? null : n.length === 1 ?
|
|
3966
|
+
const n = Wi.union(t[0], ...t.slice(1));
|
|
3967
|
+
return n.length === 0 ? null : n.length === 1 ? At(n[0], e.properties) : Oi(n, e.properties);
|
|
3983
3968
|
}
|
|
3984
|
-
var
|
|
3985
|
-
function
|
|
3969
|
+
var Bi = Zr;
|
|
3970
|
+
function Hr(i, e = {}) {
|
|
3986
3971
|
if (i.bbox != null && e.recompute !== !0)
|
|
3987
3972
|
return i.bbox;
|
|
3988
3973
|
const t = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
3989
|
-
return
|
|
3974
|
+
return zi(i, (n) => {
|
|
3990
3975
|
t[0] > n[0] && (t[0] = n[0]), t[1] > n[1] && (t[1] = n[1]), t[2] < n[0] && (t[2] = n[0]), t[3] < n[1] && (t[3] = n[1]);
|
|
3991
3976
|
}), t;
|
|
3992
3977
|
}
|
|
3993
|
-
var
|
|
3994
|
-
function
|
|
3978
|
+
var _i = Hr;
|
|
3979
|
+
function Vr(i) {
|
|
3995
3980
|
const e = [];
|
|
3996
|
-
if (
|
|
3981
|
+
if (zt(i, (r) => {
|
|
3997
3982
|
e.push(r.coordinates);
|
|
3998
3983
|
}), e.length < 2)
|
|
3999
3984
|
throw new Error("Must have at least two features");
|
|
4000
|
-
const t = i.features[0].properties || {}, n =
|
|
4001
|
-
return n.length === 0 ? null : n.length === 1 ?
|
|
3985
|
+
const t = i.features[0].properties || {}, n = Wi.difference(e[0], ...e.slice(1));
|
|
3986
|
+
return n.length === 0 ? null : n.length === 1 ? At(n[0], t) : Oi(n, t);
|
|
4002
3987
|
}
|
|
4003
|
-
var
|
|
4004
|
-
function
|
|
3988
|
+
var Yr = Vr;
|
|
3989
|
+
function Kr(i) {
|
|
4005
3990
|
if (!i)
|
|
4006
3991
|
throw new Error("geojson is required");
|
|
4007
3992
|
var e = [];
|
|
4008
|
-
return
|
|
3993
|
+
return Qr(i, function(t) {
|
|
4009
3994
|
e.push(t);
|
|
4010
|
-
}),
|
|
3995
|
+
}), Qe(e);
|
|
4011
3996
|
}
|
|
4012
|
-
var
|
|
4013
|
-
function
|
|
4014
|
-
const t =
|
|
4015
|
-
|
|
4016
|
-
|
|
3997
|
+
var Xr = Kr;
|
|
3998
|
+
function Li(i, e) {
|
|
3999
|
+
const t = Yr(
|
|
4000
|
+
Qe([
|
|
4001
|
+
At([
|
|
4017
4002
|
[
|
|
4018
4003
|
[180, 90],
|
|
4019
4004
|
[-180, 90],
|
|
@@ -4028,27 +4013,27 @@ function Mi(i, e) {
|
|
|
4028
4013
|
if (!t)
|
|
4029
4014
|
return;
|
|
4030
4015
|
t.properties = { isMask: !0 };
|
|
4031
|
-
const n =
|
|
4032
|
-
if (
|
|
4033
|
-
for (const c of
|
|
4034
|
-
const l =
|
|
4016
|
+
const n = ot(_i(i)), r = (n[2] - n[0]) / 360 / 1e3, s = n[0] < -180, u = n[2] > 180, o = Xr(i);
|
|
4017
|
+
if (o.features.length > 1 && (s || u))
|
|
4018
|
+
for (const c of o.features) {
|
|
4019
|
+
const l = ot(_i(c));
|
|
4035
4020
|
if (u && l[0] < -180 + r)
|
|
4036
4021
|
for (const d of c.geometry.coordinates)
|
|
4037
4022
|
for (const a of d)
|
|
4038
4023
|
a[0] += 360 - r;
|
|
4039
|
-
if (
|
|
4024
|
+
if (s && l[2] > 180 - r)
|
|
4040
4025
|
for (const d of c.geometry.coordinates)
|
|
4041
4026
|
for (const a of d)
|
|
4042
4027
|
a[0] -= 360 - r;
|
|
4043
4028
|
}
|
|
4044
4029
|
e(
|
|
4045
|
-
|
|
4046
|
-
|
|
4030
|
+
Qe([
|
|
4031
|
+
o.features.length < 2 ? i : Bi(o) ?? i,
|
|
4047
4032
|
t
|
|
4048
4033
|
])
|
|
4049
4034
|
);
|
|
4050
4035
|
}
|
|
4051
|
-
const
|
|
4036
|
+
const Si = {
|
|
4052
4037
|
fill: {
|
|
4053
4038
|
paint: {
|
|
4054
4039
|
"fill-color": "#000",
|
|
@@ -4067,9 +4052,9 @@ const Ci = {
|
|
|
4067
4052
|
},
|
|
4068
4053
|
filter: ["!", ["has", "isMask"]]
|
|
4069
4054
|
}
|
|
4070
|
-
},
|
|
4071
|
-
function
|
|
4072
|
-
let
|
|
4055
|
+
}, tt = "mtlr-gc-full-geom", xi = "mtlr-gc-full-geom-fill", Mi = "mtlr-gc-full-geom-line";
|
|
4056
|
+
function Jr(i, e, t = !0, n = !0, r = {}, s = {}, u = Si) {
|
|
4057
|
+
let o;
|
|
4073
4058
|
const c = [];
|
|
4074
4059
|
let l, d, a;
|
|
4075
4060
|
function f() {
|
|
@@ -4077,29 +4062,29 @@ function io(i, e, t = !0, n = !0, r = {}, o = {}, u = Ci) {
|
|
|
4077
4062
|
i.once("load", f);
|
|
4078
4063
|
return;
|
|
4079
4064
|
}
|
|
4080
|
-
const h = u ? u === !0 ?
|
|
4065
|
+
const h = u ? u === !0 ? Si : u : void 0;
|
|
4081
4066
|
if (!(h != null && h.fill) && !(h != null && h.line))
|
|
4082
4067
|
return;
|
|
4083
|
-
const y = i.getSource(
|
|
4068
|
+
const y = i.getSource(tt);
|
|
4084
4069
|
if (y)
|
|
4085
|
-
y.setData(a ??
|
|
4070
|
+
y.setData(a ?? Qe([]));
|
|
4086
4071
|
else if (a)
|
|
4087
|
-
i.addSource(
|
|
4072
|
+
i.addSource(tt, {
|
|
4088
4073
|
type: "geojson",
|
|
4089
4074
|
data: a
|
|
4090
4075
|
});
|
|
4091
4076
|
else
|
|
4092
4077
|
return;
|
|
4093
|
-
!i.getLayer(
|
|
4078
|
+
!i.getLayer(xi) && (h != null && h.fill) && i.addLayer({
|
|
4094
4079
|
...h == null ? void 0 : h.fill,
|
|
4095
|
-
id:
|
|
4080
|
+
id: xi,
|
|
4096
4081
|
type: "fill",
|
|
4097
|
-
source:
|
|
4098
|
-
}), !i.getLayer(
|
|
4082
|
+
source: tt
|
|
4083
|
+
}), !i.getLayer(Mi) && (h != null && h.line) && i.addLayer({
|
|
4099
4084
|
...h == null ? void 0 : h.line,
|
|
4100
|
-
id:
|
|
4085
|
+
id: Mi,
|
|
4101
4086
|
type: "line",
|
|
4102
|
-
source:
|
|
4087
|
+
source: tt
|
|
4103
4088
|
});
|
|
4104
4089
|
}
|
|
4105
4090
|
function g(h) {
|
|
@@ -4111,7 +4096,7 @@ function io(i, e, t = !0, n = !0, r = {}, o = {}, u = Ci) {
|
|
|
4111
4096
|
});
|
|
4112
4097
|
});
|
|
4113
4098
|
const v = (h) => {
|
|
4114
|
-
|
|
4099
|
+
o == null || o({
|
|
4115
4100
|
type: "mapClick",
|
|
4116
4101
|
coordinates: [h.lngLat.lng, h.lngLat.lat]
|
|
4117
4102
|
});
|
|
@@ -4120,14 +4105,14 @@ function io(i, e, t = !0, n = !0, r = {}, o = {}, u = Ci) {
|
|
|
4120
4105
|
if (!e)
|
|
4121
4106
|
throw new Error();
|
|
4122
4107
|
const y = document.createElement("div");
|
|
4123
|
-
return h && y.classList.add("marker-interactive"), new
|
|
4108
|
+
return h && y.classList.add("marker-interactive"), new Zn({
|
|
4124
4109
|
props: { displayIn: "maplibre" },
|
|
4125
4110
|
target: y
|
|
4126
4111
|
}), new e.Marker({ element: y, offset: [1, -13] });
|
|
4127
4112
|
}
|
|
4128
4113
|
return {
|
|
4129
4114
|
setEventHandler(h) {
|
|
4130
|
-
h ? (
|
|
4115
|
+
h ? (o = h, i.on("click", v)) : (o = void 0, i.off("click", v));
|
|
4131
4116
|
},
|
|
4132
4117
|
flyTo(h, y) {
|
|
4133
4118
|
i.flyTo({ center: h, ...y ? { zoom: y } : {}, ...r });
|
|
@@ -4138,7 +4123,7 @@ function io(i, e, t = !0, n = !0, r = {}, o = {}, u = Ci) {
|
|
|
4138
4123
|
[h[0], h[1]],
|
|
4139
4124
|
[h[2], h[3]]
|
|
4140
4125
|
],
|
|
4141
|
-
{ padding: y, ...p ? { maxZoom: p } : {}, ...
|
|
4126
|
+
{ padding: y, ...p ? { maxZoom: p } : {}, ...s }
|
|
4142
4127
|
);
|
|
4143
4128
|
},
|
|
4144
4129
|
indicateReverse(h) {
|
|
@@ -4148,28 +4133,28 @@ function io(i, e, t = !0, n = !0, r = {}, o = {}, u = Ci) {
|
|
|
4148
4133
|
!e || !t || (d ? h ? d.setLngLat(h) : (d.remove(), d = void 0) : h && (t instanceof Function ? d = t(i) ?? void 0 : (d = (typeof t == "object" ? new e.Marker(t) : _()).setLngLat(h).addTo(i), d.getElement().classList.add("marker-reverse"))));
|
|
4149
4134
|
},
|
|
4150
4135
|
setFeatures(h, y, p) {
|
|
4151
|
-
for (const
|
|
4152
|
-
|
|
4136
|
+
for (const E of c)
|
|
4137
|
+
E.remove();
|
|
4153
4138
|
if (c.length = 0, g(void 0), !!e) {
|
|
4154
4139
|
if (y) {
|
|
4155
|
-
let
|
|
4140
|
+
let E = !1;
|
|
4156
4141
|
if (y.geometry.type === "GeometryCollection") {
|
|
4157
4142
|
const S = y.geometry.geometries.filter(
|
|
4158
4143
|
(M) => M.type === "Polygon" || M.type === "MultiPolygon"
|
|
4159
4144
|
);
|
|
4160
4145
|
e: if (S.length > 0) {
|
|
4161
|
-
const M =
|
|
4162
|
-
|
|
4146
|
+
const M = Bi(
|
|
4147
|
+
Qe(S.map((C) => qe(C)))
|
|
4163
4148
|
);
|
|
4164
4149
|
if (!M)
|
|
4165
4150
|
break e;
|
|
4166
|
-
|
|
4151
|
+
Li(
|
|
4167
4152
|
{
|
|
4168
4153
|
...y,
|
|
4169
4154
|
geometry: M.geometry
|
|
4170
4155
|
},
|
|
4171
4156
|
g
|
|
4172
|
-
),
|
|
4157
|
+
), E = !0;
|
|
4173
4158
|
} else {
|
|
4174
4159
|
const M = y.geometry.geometries.filter(
|
|
4175
4160
|
(C) => C.type === "LineString" || C.type === "MultiLineString"
|
|
@@ -4177,12 +4162,12 @@ function io(i, e, t = !0, n = !0, r = {}, o = {}, u = Ci) {
|
|
|
4177
4162
|
M.length > 0 && (g({
|
|
4178
4163
|
...y,
|
|
4179
4164
|
geometry: { type: "GeometryCollection", geometries: M }
|
|
4180
|
-
}),
|
|
4165
|
+
}), E = !0);
|
|
4181
4166
|
}
|
|
4182
4167
|
}
|
|
4183
|
-
if (!
|
|
4168
|
+
if (!E) {
|
|
4184
4169
|
if (y.geometry.type === "Polygon" || y.geometry.type === "MultiPolygon")
|
|
4185
|
-
|
|
4170
|
+
Li(y, g);
|
|
4186
4171
|
else if (y.geometry.type === "LineString" || y.geometry.type === "MultiLineString") {
|
|
4187
4172
|
g(y);
|
|
4188
4173
|
return;
|
|
@@ -4198,31 +4183,31 @@ function io(i, e, t = !0, n = !0, r = {}, o = {}, u = Ci) {
|
|
|
4198
4183
|
);
|
|
4199
4184
|
}
|
|
4200
4185
|
if (n)
|
|
4201
|
-
for (const
|
|
4202
|
-
if (
|
|
4186
|
+
for (const E of h ?? []) {
|
|
4187
|
+
if (E === y)
|
|
4203
4188
|
continue;
|
|
4204
4189
|
let S;
|
|
4205
4190
|
if (n instanceof Function) {
|
|
4206
|
-
if (S = n(i,
|
|
4191
|
+
if (S = n(i, E), !S)
|
|
4207
4192
|
continue;
|
|
4208
4193
|
} else
|
|
4209
|
-
S = (typeof n == "object" ? new e.Marker(n) : _(!0)).setLngLat(
|
|
4194
|
+
S = (typeof n == "object" ? new e.Marker(n) : _(!0)).setLngLat(E.center).setPopup(
|
|
4210
4195
|
new e.Popup({
|
|
4211
4196
|
offset: [1, -27],
|
|
4212
4197
|
closeButton: !1,
|
|
4213
4198
|
closeOnMove: !0,
|
|
4214
4199
|
className: "maptiler-gc-popup"
|
|
4215
4200
|
}).setText(
|
|
4216
|
-
|
|
4201
|
+
E.place_type[0] === "reverse" ? E.place_name : E.place_name.replace(/,.*/, "")
|
|
4217
4202
|
)
|
|
4218
4203
|
).addTo(i);
|
|
4219
4204
|
const M = S.getElement();
|
|
4220
4205
|
M.addEventListener("click", (C) => {
|
|
4221
|
-
C.stopPropagation(),
|
|
4206
|
+
C.stopPropagation(), o == null || o({ type: "markerClick", id: E.id });
|
|
4222
4207
|
}), M.addEventListener("mouseenter", () => {
|
|
4223
|
-
|
|
4208
|
+
o == null || o({ type: "markerMouseEnter", id: E.id }), S.togglePopup();
|
|
4224
4209
|
}), M.addEventListener("mouseleave", () => {
|
|
4225
|
-
|
|
4210
|
+
o == null || o({ type: "markerMouseLeave", id: E.id }), S.togglePopup();
|
|
4226
4211
|
}), c.push(S);
|
|
4227
4212
|
}
|
|
4228
4213
|
}
|
|
@@ -4236,7 +4221,7 @@ function io(i, e, t = !0, n = !0, r = {}, o = {}, u = Ci) {
|
|
|
4236
4221
|
}
|
|
4237
4222
|
};
|
|
4238
4223
|
}
|
|
4239
|
-
function
|
|
4224
|
+
function $r(i, e, t) {
|
|
4240
4225
|
var v, _;
|
|
4241
4226
|
class n {
|
|
4242
4227
|
constructor(y, p) {
|
|
@@ -4246,102 +4231,102 @@ function no(i, e, t) {
|
|
|
4246
4231
|
}
|
|
4247
4232
|
}
|
|
4248
4233
|
class r extends n {
|
|
4249
|
-
constructor(p,
|
|
4234
|
+
constructor(p, E) {
|
|
4250
4235
|
super(p, "select");
|
|
4251
4236
|
ee(this, "feature");
|
|
4252
|
-
Object.assign(this,
|
|
4237
|
+
Object.assign(this, E);
|
|
4253
4238
|
}
|
|
4254
4239
|
}
|
|
4255
|
-
class
|
|
4256
|
-
constructor(p,
|
|
4240
|
+
class s extends n {
|
|
4241
|
+
constructor(p, E) {
|
|
4257
4242
|
super(p, "featureslisted");
|
|
4258
4243
|
ee(this, "features");
|
|
4259
|
-
this.features =
|
|
4244
|
+
this.features = E;
|
|
4260
4245
|
}
|
|
4261
4246
|
}
|
|
4262
4247
|
class u extends n {
|
|
4263
|
-
constructor(p,
|
|
4248
|
+
constructor(p, E) {
|
|
4264
4249
|
super(p, "featuresmarked");
|
|
4265
4250
|
ee(this, "features");
|
|
4266
|
-
this.features =
|
|
4251
|
+
this.features = E;
|
|
4267
4252
|
}
|
|
4268
4253
|
}
|
|
4269
|
-
class
|
|
4270
|
-
constructor(p,
|
|
4254
|
+
class o extends n {
|
|
4255
|
+
constructor(p, E) {
|
|
4271
4256
|
super(p, "optionsvisibilitychange");
|
|
4272
4257
|
ee(this, "optionsVisible");
|
|
4273
|
-
this.optionsVisible =
|
|
4258
|
+
this.optionsVisible = E;
|
|
4274
4259
|
}
|
|
4275
4260
|
}
|
|
4276
4261
|
class c extends n {
|
|
4277
|
-
constructor(p,
|
|
4262
|
+
constructor(p, E) {
|
|
4278
4263
|
super(p, "pick");
|
|
4279
4264
|
ee(this, "feature");
|
|
4280
|
-
this.feature =
|
|
4265
|
+
this.feature = E;
|
|
4281
4266
|
}
|
|
4282
4267
|
}
|
|
4283
4268
|
class l extends n {
|
|
4284
|
-
constructor(p,
|
|
4269
|
+
constructor(p, E) {
|
|
4285
4270
|
super(p, "querychange");
|
|
4286
4271
|
ee(this, "query");
|
|
4287
|
-
this.query =
|
|
4272
|
+
this.query = E;
|
|
4288
4273
|
}
|
|
4289
4274
|
}
|
|
4290
4275
|
class d extends n {
|
|
4291
|
-
constructor(p,
|
|
4276
|
+
constructor(p, E, S) {
|
|
4292
4277
|
super(p, "response");
|
|
4293
4278
|
ee(this, "url");
|
|
4294
4279
|
ee(this, "featureCollection");
|
|
4295
|
-
this.url =
|
|
4280
|
+
this.url = E, this.featureCollection = S;
|
|
4296
4281
|
}
|
|
4297
4282
|
}
|
|
4298
4283
|
class a extends n {
|
|
4299
|
-
constructor(p,
|
|
4284
|
+
constructor(p, E) {
|
|
4300
4285
|
super(p, "reversetoggle");
|
|
4301
4286
|
ee(this, "reverse");
|
|
4302
|
-
this.reverse =
|
|
4287
|
+
this.reverse = E;
|
|
4303
4288
|
}
|
|
4304
4289
|
}
|
|
4305
4290
|
class f extends i {
|
|
4306
4291
|
constructor(p = {}) {
|
|
4307
4292
|
super();
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4293
|
+
wt(this, v);
|
|
4294
|
+
wt(this, _);
|
|
4295
|
+
_t(this, _, p);
|
|
4311
4296
|
}
|
|
4312
4297
|
onAddInt(p) {
|
|
4313
|
-
const
|
|
4314
|
-
|
|
4298
|
+
const E = document.createElement("div");
|
|
4299
|
+
E.className = "mapboxgl-ctrl-geocoder mapboxgl-ctrl maplibregl-ctrl-geocoder maplibregl-ctrl mapboxgl-ctrl-group";
|
|
4315
4300
|
const {
|
|
4316
4301
|
marker: S,
|
|
4317
4302
|
showResultMarkers: M,
|
|
4318
4303
|
flyTo: C,
|
|
4319
|
-
fullGeometryStyle:
|
|
4304
|
+
fullGeometryStyle: w,
|
|
4320
4305
|
...L
|
|
4321
4306
|
} = Z(this, _), k = typeof C == "boolean" ? {} : C, G = {
|
|
4322
|
-
mapController:
|
|
4307
|
+
mapController: Jr(
|
|
4323
4308
|
p,
|
|
4324
4309
|
e,
|
|
4325
4310
|
S,
|
|
4326
4311
|
M,
|
|
4327
4312
|
k,
|
|
4328
4313
|
k,
|
|
4329
|
-
|
|
4314
|
+
w
|
|
4330
4315
|
),
|
|
4331
4316
|
flyTo: C === void 0 ? !0 : !!C,
|
|
4332
4317
|
apiKey: "",
|
|
4333
4318
|
// just to satisfy apiKey; TODO find a better solution
|
|
4334
|
-
...t == null ? void 0 : t(p,
|
|
4319
|
+
...t == null ? void 0 : t(p, E),
|
|
4335
4320
|
...L
|
|
4336
4321
|
};
|
|
4337
4322
|
if (!G.apiKey)
|
|
4338
4323
|
throw new Error("no apiKey provided");
|
|
4339
|
-
return
|
|
4324
|
+
return _t(this, v, new yr({ target: E, props: G })), Z(this, v).$on("select", (N) => {
|
|
4340
4325
|
this.fire(new r(this, N.detail));
|
|
4341
4326
|
}), Z(this, v).$on("pick", (N) => {
|
|
4342
4327
|
this.fire(new c(this, N.detail.feature));
|
|
4343
4328
|
}), Z(this, v).$on("featureslisted", (N) => {
|
|
4344
|
-
this.fire(new
|
|
4329
|
+
this.fire(new s(this, N.detail.features));
|
|
4345
4330
|
}), Z(this, v).$on("featuresmarked", (N) => {
|
|
4346
4331
|
this.fire(new u(this, N.detail.features));
|
|
4347
4332
|
}), Z(this, v).$on("response", (N) => {
|
|
@@ -4354,22 +4339,22 @@ function no(i, e, t) {
|
|
|
4354
4339
|
);
|
|
4355
4340
|
}), Z(this, v).$on("optionsvisibilitychange", (N) => {
|
|
4356
4341
|
this.fire(
|
|
4357
|
-
new
|
|
4342
|
+
new o(this, N.detail.optionsVisible)
|
|
4358
4343
|
);
|
|
4359
4344
|
}), Z(this, v).$on("reversetoggle", (N) => {
|
|
4360
4345
|
this.fire(new a(this, N.detail.reverse));
|
|
4361
4346
|
}), Z(this, v).$on("querychange", (N) => {
|
|
4362
4347
|
this.fire(new l(this, N.detail.query));
|
|
4363
|
-
}),
|
|
4348
|
+
}), E;
|
|
4364
4349
|
}
|
|
4365
|
-
on(p,
|
|
4366
|
-
return super.on(p,
|
|
4350
|
+
on(p, E) {
|
|
4351
|
+
return super.on(p, E);
|
|
4367
4352
|
}
|
|
4368
|
-
once(p,
|
|
4369
|
-
return super.once(p,
|
|
4353
|
+
once(p, E) {
|
|
4354
|
+
return super.once(p, E);
|
|
4370
4355
|
}
|
|
4371
|
-
off(p,
|
|
4372
|
-
return super.off(p,
|
|
4356
|
+
off(p, E) {
|
|
4357
|
+
return super.off(p, E);
|
|
4373
4358
|
}
|
|
4374
4359
|
listens(p) {
|
|
4375
4360
|
return super.listens(p);
|
|
@@ -4378,17 +4363,17 @@ function no(i, e, t) {
|
|
|
4378
4363
|
var L;
|
|
4379
4364
|
Object.assign(Z(this, _), p);
|
|
4380
4365
|
const {
|
|
4381
|
-
marker:
|
|
4366
|
+
marker: E,
|
|
4382
4367
|
showResultMarkers: S,
|
|
4383
4368
|
flyTo: M,
|
|
4384
4369
|
fullGeometryStyle: C,
|
|
4385
|
-
...
|
|
4370
|
+
...w
|
|
4386
4371
|
} = Z(this, _);
|
|
4387
|
-
(L = Z(this, v)) == null || L.$set(
|
|
4372
|
+
(L = Z(this, v)) == null || L.$set(w);
|
|
4388
4373
|
}
|
|
4389
|
-
setQuery(p,
|
|
4374
|
+
setQuery(p, E = !0) {
|
|
4390
4375
|
var S;
|
|
4391
|
-
(S = Z(this, v)) == null || S.setQuery(p,
|
|
4376
|
+
(S = Z(this, v)) == null || S.setQuery(p, E);
|
|
4392
4377
|
}
|
|
4393
4378
|
clearMap() {
|
|
4394
4379
|
var p;
|
|
@@ -4399,8 +4384,8 @@ function no(i, e, t) {
|
|
|
4399
4384
|
(p = Z(this, v)) == null || p.clearList();
|
|
4400
4385
|
}
|
|
4401
4386
|
setReverseMode(p) {
|
|
4402
|
-
var
|
|
4403
|
-
(
|
|
4387
|
+
var E;
|
|
4388
|
+
(E = Z(this, v)) == null || E.$set({ reverseActive: p });
|
|
4404
4389
|
}
|
|
4405
4390
|
focus() {
|
|
4406
4391
|
var p;
|
|
@@ -4419,9 +4404,9 @@ function no(i, e, t) {
|
|
|
4419
4404
|
MapLibreBasedGeocodingControl: f,
|
|
4420
4405
|
events: {
|
|
4421
4406
|
SelectEvent: r,
|
|
4422
|
-
FeaturesListedEvent:
|
|
4407
|
+
FeaturesListedEvent: s,
|
|
4423
4408
|
FeaturesMarkedEvent: u,
|
|
4424
|
-
OptionsVisibilityChangeEvent:
|
|
4409
|
+
OptionsVisibilityChangeEvent: o,
|
|
4425
4410
|
PickEvent: c,
|
|
4426
4411
|
QueryChangeEvent: l,
|
|
4427
4412
|
ResponseEvent: d,
|
|
@@ -4429,35 +4414,35 @@ function no(i, e, t) {
|
|
|
4429
4414
|
}
|
|
4430
4415
|
};
|
|
4431
4416
|
}
|
|
4432
|
-
const { MapLibreBasedGeocodingControl:
|
|
4433
|
-
|
|
4434
|
-
|
|
4417
|
+
const { MapLibreBasedGeocodingControl: es, events: Me } = $r(
|
|
4418
|
+
qt.Evented,
|
|
4419
|
+
qt,
|
|
4435
4420
|
(i, e) => {
|
|
4436
4421
|
const t = {};
|
|
4437
4422
|
if (!("getSdkConfig" in i && typeof i.getSdkConfig == "function"))
|
|
4438
4423
|
throw new Error("MapTiler SDK not detected");
|
|
4439
4424
|
const { primaryLanguage: n, apiKey: r } = i.getSdkConfig();
|
|
4440
4425
|
t.apiKey = r;
|
|
4441
|
-
const
|
|
4442
|
-
return
|
|
4426
|
+
const s = /^([a-z]{2})($|_|-)/.exec(n);
|
|
4427
|
+
return s && (t.language = s[1]), e.className += " maptiler-ctrl", t;
|
|
4443
4428
|
}
|
|
4444
4429
|
);
|
|
4445
|
-
class
|
|
4430
|
+
class ns extends es {
|
|
4446
4431
|
onAdd(e) {
|
|
4447
4432
|
return super.onAddInt(e);
|
|
4448
4433
|
}
|
|
4449
4434
|
}
|
|
4450
|
-
const
|
|
4435
|
+
const rs = Me.SelectEvent, ss = Me.FeaturesListedEvent, os = Me.FeaturesMarkedEvent, ls = Me.OptionsVisibilityChangeEvent, us = Me.PickEvent, as = Me.QueryChangeEvent, cs = Me.ResponseEvent, fs = Me.ReverseToggleEvent;
|
|
4451
4436
|
export {
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4437
|
+
ss as FeaturesListedEvent,
|
|
4438
|
+
os as FeaturesMarkedEvent,
|
|
4439
|
+
ns as GeocodingControl,
|
|
4440
|
+
ls as OptionsVisibilityChangeEvent,
|
|
4441
|
+
us as PickEvent,
|
|
4442
|
+
as as QueryChangeEvent,
|
|
4443
|
+
cs as ResponseEvent,
|
|
4444
|
+
fs as ReverseToggleEvent,
|
|
4445
|
+
rs as SelectEvent,
|
|
4446
|
+
Jr as createMapLibreGlMapController
|
|
4462
4447
|
};
|
|
4463
4448
|
//# sourceMappingURL=maptilersdk.js.map
|