@datagouv/components-next 1.5.1-dev.1397.g7333a397 → 1.5.1-dev.1398.g03d927e4
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/dist/{Control-DPuXeUqi.js → Control-BbyEe8x_.js} +7 -7
- package/dist/{Datafair.client-LlEgG7WU.js → Datafair.client-Dy9xu8CW.js} +1 -1
- package/dist/{Image-DVWRoLLI.js → Image-umPJvSA8.js} +16 -13
- package/dist/{ImagePreview.client-Db5dmxMP.js → ImagePreview.client-CwAd1LgO.js} +1 -1
- package/dist/{JsonPreview.client-DKy2AexC.js → JsonPreview.client-B_3llbkW.js} +2 -2
- package/dist/{Layer-D_5tYbVm.js → Layer-CagLskq_.js} +67 -61
- package/dist/{Map-CTBJEae_.js → Map-Cek3vwVi.js} +1094 -932
- package/dist/{MapContainer.client-DoN1jSzM.js → MapContainer.client-AMALm4aj.js} +7 -7
- package/dist/{OSM-B5Zc3qAf.js → OSM-Bm69tJpi.js} +1 -1
- package/dist/{PdfPreview.client-D3wHTDb9.js → PdfPreview.client-BzcjEgi5.js} +3 -3
- package/dist/{PdfSkeleton-nas5Pmia.js → PdfSkeleton-CEK7DOge.js} +1 -1
- package/dist/{Pmtiles.client-DncYrZSp.js → Pmtiles.client-C8SVSeQV.js} +9992 -9271
- package/dist/{PreviewError-EeaGx3SL.js → PreviewError-DOcS8Jau.js} +83 -46
- package/dist/{PreviewWrapper-BhldDdXK.js → PreviewWrapper-CdSsdB9s.js} +1 -1
- package/dist/{ScaleLine-C_tuJ6VG.js → ScaleLine-C8xmHdEk.js} +15 -8
- package/dist/Tile-DfivRbb3.js +479 -0
- package/dist/{Tile-8nHSuqcv.js → Tile-DvVc2IeI.js} +220 -151
- package/dist/{TileImage-CgO5alXc.js → TileImage-CxC7EP7_.js} +53 -45
- package/dist/{View-Dad8DfSD.js → View-44C9US2-.js} +210 -208
- package/dist/{XmlPreview.client-CmGbc3c3.js → XmlPreview.client-BnIm8NMm.js} +2 -2
- package/dist/assets/maplibre-gl-worker-Dlv-oLtU.js +10 -0
- package/dist/components-next.css +1 -1
- package/dist/components-next.js +11524 -10316
- package/dist/components.css +2 -2
- package/dist/{france-BtSQqcqV.js → france-DjD07ZB4.js} +1 -1
- package/dist/{proj-COhZ08DR.js → proj-0ED4AWuV.js} +260 -246
- package/dist/purify.es-D-UgLNEK.js +848 -0
- package/dist/{src-DJJgtynU.js → src-DdUvT8zT.js} +1972 -1306
- package/dist/{transform-CNeEnSK9.js → transform-bRfffInI.js} +3 -3
- package/package.json +18 -18
- package/src/components/Form/SelectGroup.vue +0 -2
- package/dist/Tile-Bu5lF4M5.js +0 -463
- package/dist/assets/maplibre-gl-worker-CEzvAyZY.js +0 -10
- package/dist/purify.es-eElsWhh7.js +0 -876
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { r as e } from "./rolldown-runtime-DsPmjQRF.js";
|
|
2
|
-
import {
|
|
3
|
-
import { C as
|
|
4
|
-
import { c as
|
|
5
|
-
import { E as
|
|
6
|
-
import { a as
|
|
7
|
-
import { a as
|
|
2
|
+
import { Ct as t, F as n, Gt as r, Ht as i, Jt as a, Mt as o, P as s, Qt as c, R as l, Tt as u, Ut as d, V as f, Wt as p, Xt as m, Yt as h, Z as ee, cn as g, dn as _, fn as v, ft as te, g as y, kt as ne, l as b, lt as re, on as ie, pn as ae, sn as x, tn as oe, tt as se, un as S, v as ce, z as le, zt as ue } from "./proj-0ED4AWuV.js";
|
|
3
|
+
import { C as de, S as fe, _ as pe, a as C, b as me, c as he, d as ge, f as _e, l as ve, o as ye, p as w, r as be, u as xe, v as Se, w as Ce, x as we, y as Te } from "./Image-umPJvSA8.js";
|
|
4
|
+
import { c as Ee, i as De, l as Oe, n as ke, o as Ae, r as je, t as Me, u as Ne } from "./Control-BbyEe8x_.js";
|
|
5
|
+
import { E as Pe, S as T, i as Fe, n as Ie, o as Le, r as Re, s as ze, w as Be } from "./transform-bRfffInI.js";
|
|
6
|
+
import { a as Ve, i as He, o as Ue, t as We } from "./View-44C9US2-.js";
|
|
7
|
+
import { a as Ge, c as Ke, d as qe, f as Je, i as Ye, l as Xe, n as Ze, o as Qe, p as $e, r as et, s as tt, t as nt, u as rt } from "./Layer-CagLskq_.js";
|
|
8
8
|
// ../node_modules/ol/CollectionEventType.js
|
|
9
|
-
var
|
|
9
|
+
var E = {
|
|
10
10
|
ADD: "add",
|
|
11
11
|
REMOVE: "remove"
|
|
12
|
-
},
|
|
12
|
+
}, it = { LENGTH: "length" }, at = class extends d {
|
|
13
13
|
constructor(e, t, n) {
|
|
14
14
|
super(e), this.element = t, this.index = n;
|
|
15
15
|
}
|
|
16
|
-
},
|
|
16
|
+
}, D = class extends ue {
|
|
17
17
|
constructor(e, t) {
|
|
18
18
|
if (super(), this.on, this.once, this.un, t ||= {}, this.unique_ = !!t.unique, this.array_ = e ?? [], this.unique_) for (let e = 1, t = this.array_.length; e < t; ++e) this.assertUnique_(this.array_[e], e);
|
|
19
19
|
this.updateLength_();
|
|
@@ -36,11 +36,11 @@ var D = {
|
|
|
36
36
|
return this.array_[e];
|
|
37
37
|
}
|
|
38
38
|
getLength() {
|
|
39
|
-
return this.get(
|
|
39
|
+
return this.get(it.LENGTH);
|
|
40
40
|
}
|
|
41
41
|
insertAt(e, t) {
|
|
42
42
|
if (e < 0 || e > this.getLength()) throw Error("Index out of bounds: " + e);
|
|
43
|
-
this.unique_ && this.assertUnique_(t), this.array_.splice(e, 0, t), this.updateLength_(), this.dispatchEvent(new
|
|
43
|
+
this.unique_ && this.assertUnique_(t), this.array_.splice(e, 0, t), this.updateLength_(), this.dispatchEvent(new at(E.ADD, t, e));
|
|
44
44
|
}
|
|
45
45
|
pop() {
|
|
46
46
|
return this.removeAt(this.getLength() - 1);
|
|
@@ -56,7 +56,7 @@ var D = {
|
|
|
56
56
|
removeAt(e) {
|
|
57
57
|
if (e < 0 || e >= this.getLength()) return;
|
|
58
58
|
let t = this.array_[e];
|
|
59
|
-
return this.array_.splice(e, 1), this.updateLength_(), this.dispatchEvent(new
|
|
59
|
+
return this.array_.splice(e, 1), this.updateLength_(), this.dispatchEvent(new at(E.REMOVE, t, e)), t;
|
|
60
60
|
}
|
|
61
61
|
setAt(e, t) {
|
|
62
62
|
if (e >= this.getLength()) {
|
|
@@ -66,10 +66,10 @@ var D = {
|
|
|
66
66
|
if (e < 0) throw Error("Index out of bounds: " + e);
|
|
67
67
|
this.unique_ && this.assertUnique_(t, e);
|
|
68
68
|
let n = this.array_[e];
|
|
69
|
-
this.array_[e] = t, this.dispatchEvent(new
|
|
69
|
+
this.array_[e] = t, this.dispatchEvent(new at(E.REMOVE, n, e)), this.dispatchEvent(new at(E.ADD, t, e));
|
|
70
70
|
}
|
|
71
71
|
updateLength_() {
|
|
72
|
-
this.set(
|
|
72
|
+
this.set(it.LENGTH, this.array_.length);
|
|
73
73
|
}
|
|
74
74
|
assertUnique_(e, t) {
|
|
75
75
|
let n = this.array_;
|
|
@@ -77,29 +77,29 @@ var D = {
|
|
|
77
77
|
}
|
|
78
78
|
};
|
|
79
79
|
// ../node_modules/quickselect/index.js
|
|
80
|
-
function
|
|
80
|
+
function ot(e, t, n = 0, r = e.length - 1, i = ct) {
|
|
81
81
|
for (; r > n;) {
|
|
82
82
|
if (r - n > 600) {
|
|
83
83
|
let a = r - n + 1, o = t - n + 1, s = Math.log(a), c = .5 * Math.exp(2 * s / 3), l = .5 * Math.sqrt(s * c * (a - c) / a) * (o - a / 2 < 0 ? -1 : 1);
|
|
84
|
-
|
|
84
|
+
ot(e, t, Math.max(n, Math.floor(t - o * c / a + l)), Math.min(r, Math.floor(t + (a - o) * c / a + l)), i);
|
|
85
85
|
}
|
|
86
86
|
let a = e[t], o = n, s = r;
|
|
87
|
-
for (
|
|
88
|
-
for (
|
|
87
|
+
for (st(e, n, t), i(e[r], a) > 0 && st(e, n, r); o < s;) {
|
|
88
|
+
for (st(e, o, s), o++, s--; i(e[o], a) < 0;) o++;
|
|
89
89
|
for (; i(e[s], a) > 0;) s--;
|
|
90
90
|
}
|
|
91
|
-
i(e[n], a) === 0 ?
|
|
91
|
+
i(e[n], a) === 0 ? st(e, n, s) : (s++, st(e, s, r)), s <= t && (n = s + 1), t <= s && (r = s - 1);
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function st(e, t, n) {
|
|
95
95
|
let r = e[t];
|
|
96
96
|
e[t] = e[n], e[n] = r;
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function ct(e, t) {
|
|
99
99
|
return e < t ? -1 : +(e > t);
|
|
100
100
|
}
|
|
101
101
|
// ../node_modules/rbush/index.js
|
|
102
|
-
var
|
|
102
|
+
var lt = class {
|
|
103
103
|
constructor(e = 9) {
|
|
104
104
|
this._maxEntries = Math.max(4, e), this._minEntries = Math.max(2, Math.ceil(this._maxEntries * .4)), this.clear();
|
|
105
105
|
}
|
|
@@ -108,12 +108,12 @@ var ot = class {
|
|
|
108
108
|
}
|
|
109
109
|
search(e) {
|
|
110
110
|
let t = this.data, n = [];
|
|
111
|
-
if (!
|
|
111
|
+
if (!xt(e, t)) return n;
|
|
112
112
|
let r = this.toBBox, i = [];
|
|
113
113
|
for (; t;) {
|
|
114
114
|
for (let a = 0; a < t.children.length; a++) {
|
|
115
115
|
let o = t.children[a], s = t.leaf ? r(o) : o;
|
|
116
|
-
|
|
116
|
+
xt(e, s) && (t.leaf ? n.push(o) : bt(e, s) ? this._all(o, n) : i.push(o));
|
|
117
117
|
}
|
|
118
118
|
t = i.pop();
|
|
119
119
|
}
|
|
@@ -121,13 +121,13 @@ var ot = class {
|
|
|
121
121
|
}
|
|
122
122
|
collides(e) {
|
|
123
123
|
let t = this.data;
|
|
124
|
-
if (!
|
|
124
|
+
if (!xt(e, t)) return !1;
|
|
125
125
|
let n = [];
|
|
126
126
|
for (; t;) {
|
|
127
127
|
for (let r = 0; r < t.children.length; r++) {
|
|
128
128
|
let i = t.children[r], a = t.leaf ? this.toBBox(i) : i;
|
|
129
|
-
if (
|
|
130
|
-
if (t.leaf ||
|
|
129
|
+
if (xt(e, a)) {
|
|
130
|
+
if (t.leaf || bt(e, a)) return !0;
|
|
131
131
|
n.push(i);
|
|
132
132
|
}
|
|
133
133
|
}
|
|
@@ -157,17 +157,17 @@ var ot = class {
|
|
|
157
157
|
return e && this._insert(e, this.data.height - 1), this;
|
|
158
158
|
}
|
|
159
159
|
clear() {
|
|
160
|
-
return this.data =
|
|
160
|
+
return this.data = St([]), this;
|
|
161
161
|
}
|
|
162
162
|
remove(e, t) {
|
|
163
163
|
if (!e) return this;
|
|
164
164
|
let n = this.data, r = this.toBBox(e), i = [], a = [], o, s, c;
|
|
165
165
|
for (; n || i.length;) {
|
|
166
166
|
if (n || (n = i.pop(), s = i[i.length - 1], o = a.pop(), c = !0), n.leaf) {
|
|
167
|
-
let r =
|
|
167
|
+
let r = ut(e, n.children, t);
|
|
168
168
|
if (r !== -1) return n.children.splice(r, 1), i.push(n), this._condense(i), this;
|
|
169
169
|
}
|
|
170
|
-
!c && !n.leaf &&
|
|
170
|
+
!c && !n.leaf && bt(n, r) ? (i.push(n), a.push(o), o = 0, s = n, n = n.children[0]) : s ? (o++, n = s.children[o], c = !1) : n = null;
|
|
171
171
|
}
|
|
172
172
|
return this;
|
|
173
173
|
}
|
|
@@ -193,25 +193,25 @@ var ot = class {
|
|
|
193
193
|
}
|
|
194
194
|
_build(e, t, n, r) {
|
|
195
195
|
let i = n - t + 1, a = this._maxEntries, o;
|
|
196
|
-
if (i <= a) return o =
|
|
197
|
-
r || (r = Math.ceil(Math.log(i) / Math.log(a)), a = Math.ceil(i / a ** (r - 1))), o =
|
|
196
|
+
if (i <= a) return o = St(e.slice(t, n + 1)), dt(o, this.toBBox), o;
|
|
197
|
+
r || (r = Math.ceil(Math.log(i) / Math.log(a)), a = Math.ceil(i / a ** (r - 1))), o = St([]), o.leaf = !1, o.height = r;
|
|
198
198
|
let s = Math.ceil(i / a), c = s * Math.ceil(Math.sqrt(a));
|
|
199
|
-
|
|
199
|
+
Ct(e, t, n, c, this.compareMinX);
|
|
200
200
|
for (let i = t; i <= n; i += c) {
|
|
201
201
|
let t = Math.min(i + c - 1, n);
|
|
202
|
-
|
|
202
|
+
Ct(e, i, t, s, this.compareMinY);
|
|
203
203
|
for (let n = i; n <= t; n += s) {
|
|
204
204
|
let i = Math.min(n + s - 1, t);
|
|
205
205
|
o.children.push(this._build(e, n, i, r - 1));
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
return
|
|
208
|
+
return dt(o, this.toBBox), o;
|
|
209
209
|
}
|
|
210
210
|
_chooseSubtree(e, t, n, r) {
|
|
211
211
|
for (; r.push(t), !(t.leaf || r.length - 1 === n);) {
|
|
212
212
|
let n = Infinity, r = Infinity, i;
|
|
213
213
|
for (let a = 0; a < t.children.length; a++) {
|
|
214
|
-
let o = t.children[a], s =
|
|
214
|
+
let o = t.children[a], s = gt(o), c = vt(e, o) - s;
|
|
215
215
|
c < r ? (r = c, n = s < n ? s : n, i = o) : c === r && s < n && (n = s, i = o);
|
|
216
216
|
}
|
|
217
217
|
t = i || t.children[0];
|
|
@@ -220,95 +220,95 @@ var ot = class {
|
|
|
220
220
|
}
|
|
221
221
|
_insert(e, t, n) {
|
|
222
222
|
let r = n ? e : this.toBBox(e), i = [], a = this._chooseSubtree(r, this.data, t, i);
|
|
223
|
-
for (a.children.push(e),
|
|
223
|
+
for (a.children.push(e), pt(a, r); t >= 0 && i[t].children.length > this._maxEntries;) this._split(i, t), t--;
|
|
224
224
|
this._adjustParentBBoxes(r, i, t);
|
|
225
225
|
}
|
|
226
226
|
_split(e, t) {
|
|
227
227
|
let n = e[t], r = n.children.length, i = this._minEntries;
|
|
228
228
|
this._chooseSplitAxis(n, i, r);
|
|
229
|
-
let a = this._chooseSplitIndex(n, i, r), o =
|
|
230
|
-
o.height = n.height, o.leaf = n.leaf,
|
|
229
|
+
let a = this._chooseSplitIndex(n, i, r), o = St(n.children.splice(a, n.children.length - a));
|
|
230
|
+
o.height = n.height, o.leaf = n.leaf, dt(n, this.toBBox), dt(o, this.toBBox), t ? e[t - 1].children.push(o) : this._splitRoot(n, o);
|
|
231
231
|
}
|
|
232
232
|
_splitRoot(e, t) {
|
|
233
|
-
this.data =
|
|
233
|
+
this.data = St([e, t]), this.data.height = e.height + 1, this.data.leaf = !1, dt(this.data, this.toBBox);
|
|
234
234
|
}
|
|
235
235
|
_chooseSplitIndex(e, t, n) {
|
|
236
236
|
let r, i = Infinity, a = Infinity;
|
|
237
237
|
for (let o = t; o <= n - t; o++) {
|
|
238
|
-
let t =
|
|
238
|
+
let t = ft(e, 0, o, this.toBBox), s = ft(e, o, n, this.toBBox), c = yt(t, s), l = gt(t) + gt(s);
|
|
239
239
|
c < i ? (i = c, r = o, a = l < a ? l : a) : c === i && l < a && (a = l, r = o);
|
|
240
240
|
}
|
|
241
241
|
return r || n - t;
|
|
242
242
|
}
|
|
243
243
|
_chooseSplitAxis(e, t, n) {
|
|
244
|
-
let r = e.leaf ? this.compareMinX :
|
|
244
|
+
let r = e.leaf ? this.compareMinX : mt, i = e.leaf ? this.compareMinY : ht;
|
|
245
245
|
this._allDistMargin(e, t, n, r) < this._allDistMargin(e, t, n, i) && e.children.sort(r);
|
|
246
246
|
}
|
|
247
247
|
_allDistMargin(e, t, n, r) {
|
|
248
248
|
e.children.sort(r);
|
|
249
|
-
let i = this.toBBox, a =
|
|
249
|
+
let i = this.toBBox, a = ft(e, 0, t, i), o = ft(e, n - t, n, i), s = _t(a) + _t(o);
|
|
250
250
|
for (let r = t; r < n - t; r++) {
|
|
251
251
|
let t = e.children[r];
|
|
252
|
-
|
|
252
|
+
pt(a, e.leaf ? i(t) : t), s += _t(a);
|
|
253
253
|
}
|
|
254
254
|
for (let r = n - t - 1; r >= t; r--) {
|
|
255
255
|
let t = e.children[r];
|
|
256
|
-
|
|
256
|
+
pt(o, e.leaf ? i(t) : t), s += _t(o);
|
|
257
257
|
}
|
|
258
258
|
return s;
|
|
259
259
|
}
|
|
260
260
|
_adjustParentBBoxes(e, t, n) {
|
|
261
|
-
for (let r = n; r >= 0; r--)
|
|
261
|
+
for (let r = n; r >= 0; r--) pt(t[r], e);
|
|
262
262
|
}
|
|
263
263
|
_condense(e) {
|
|
264
|
-
for (let t = e.length - 1, n; t >= 0; t--) e[t].children.length === 0 ? t > 0 ? (n = e[t - 1].children, n.splice(n.indexOf(e[t]), 1)) : this.clear() :
|
|
264
|
+
for (let t = e.length - 1, n; t >= 0; t--) e[t].children.length === 0 ? t > 0 ? (n = e[t - 1].children, n.splice(n.indexOf(e[t]), 1)) : this.clear() : dt(e[t], this.toBBox);
|
|
265
265
|
}
|
|
266
266
|
};
|
|
267
|
-
function
|
|
267
|
+
function ut(e, t, n) {
|
|
268
268
|
if (!n) return t.indexOf(e);
|
|
269
269
|
for (let r = 0; r < t.length; r++) if (n(e, t[r])) return r;
|
|
270
270
|
return -1;
|
|
271
271
|
}
|
|
272
|
-
function
|
|
273
|
-
|
|
272
|
+
function dt(e, t) {
|
|
273
|
+
ft(e, 0, e.children.length, t, e);
|
|
274
274
|
}
|
|
275
|
-
function
|
|
276
|
-
i ||=
|
|
275
|
+
function ft(e, t, n, r, i) {
|
|
276
|
+
i ||= St(null), i.minX = Infinity, i.minY = Infinity, i.maxX = -Infinity, i.maxY = -Infinity;
|
|
277
277
|
for (let a = t; a < n; a++) {
|
|
278
278
|
let t = e.children[a];
|
|
279
|
-
|
|
279
|
+
pt(i, e.leaf ? r(t) : t);
|
|
280
280
|
}
|
|
281
281
|
return i;
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function pt(e, t) {
|
|
284
284
|
return e.minX = Math.min(e.minX, t.minX), e.minY = Math.min(e.minY, t.minY), e.maxX = Math.max(e.maxX, t.maxX), e.maxY = Math.max(e.maxY, t.maxY), e;
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function mt(e, t) {
|
|
287
287
|
return e.minX - t.minX;
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function ht(e, t) {
|
|
290
290
|
return e.minY - t.minY;
|
|
291
291
|
}
|
|
292
|
-
function
|
|
292
|
+
function gt(e) {
|
|
293
293
|
return (e.maxX - e.minX) * (e.maxY - e.minY);
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function _t(e) {
|
|
296
296
|
return e.maxX - e.minX + (e.maxY - e.minY);
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function vt(e, t) {
|
|
299
299
|
return (Math.max(t.maxX, e.maxX) - Math.min(t.minX, e.minX)) * (Math.max(t.maxY, e.maxY) - Math.min(t.minY, e.minY));
|
|
300
300
|
}
|
|
301
|
-
function
|
|
301
|
+
function yt(e, t) {
|
|
302
302
|
let n = Math.max(e.minX, t.minX), r = Math.max(e.minY, t.minY), i = Math.min(e.maxX, t.maxX), a = Math.min(e.maxY, t.maxY);
|
|
303
303
|
return Math.max(0, i - n) * Math.max(0, a - r);
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function bt(e, t) {
|
|
306
306
|
return e.minX <= t.minX && e.minY <= t.minY && t.maxX <= e.maxX && t.maxY <= e.maxY;
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function xt(e, t) {
|
|
309
309
|
return t.minX <= e.maxX && t.minY <= e.maxY && t.maxX >= e.minX && t.maxY >= e.minY;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function St(e) {
|
|
312
312
|
return {
|
|
313
313
|
children: e,
|
|
314
314
|
height: 1,
|
|
@@ -319,19 +319,19 @@ function yt(e) {
|
|
|
319
319
|
maxY: -Infinity
|
|
320
320
|
};
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function Ct(e, t, n, r, i) {
|
|
323
323
|
let a = [t, n];
|
|
324
324
|
for (; a.length;) {
|
|
325
325
|
if (n = a.pop(), t = a.pop(), n - t <= r) continue;
|
|
326
326
|
let o = t + Math.ceil((n - t) / r / 2) * r;
|
|
327
|
-
|
|
327
|
+
ot(e, o, t, n, i), a.push(t, o, o, n);
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
// ../node_modules/ol/MapBrowserEventType.js
|
|
331
|
-
var
|
|
331
|
+
var O = {
|
|
332
332
|
SINGLECLICK: "singleclick",
|
|
333
|
-
CLICK:
|
|
334
|
-
DBLCLICK:
|
|
333
|
+
CLICK: x.CLICK,
|
|
334
|
+
DBLCLICK: x.DBLCLICK,
|
|
335
335
|
POINTERDRAG: "pointerdrag",
|
|
336
336
|
POINTERMOVE: "pointermove",
|
|
337
337
|
POINTERDOWN: "pointerdown",
|
|
@@ -341,12 +341,12 @@ var k = {
|
|
|
341
341
|
POINTERENTER: "pointerenter",
|
|
342
342
|
POINTERLEAVE: "pointerleave",
|
|
343
343
|
POINTERCANCEL: "pointercancel"
|
|
344
|
-
},
|
|
344
|
+
}, wt = { ACTIVE: "active" }, Tt = class extends ue {
|
|
345
345
|
constructor(e) {
|
|
346
346
|
super(), this.on, this.once, this.un, e && e.handleEvent && (this.handleEvent = e.handleEvent), this.map_ = null, this.setActive(!0);
|
|
347
347
|
}
|
|
348
348
|
getActive() {
|
|
349
|
-
return this.get(
|
|
349
|
+
return this.get(wt.ACTIVE);
|
|
350
350
|
}
|
|
351
351
|
getMap() {
|
|
352
352
|
return this.map_;
|
|
@@ -355,36 +355,38 @@ var k = {
|
|
|
355
355
|
return !0;
|
|
356
356
|
}
|
|
357
357
|
setActive(e) {
|
|
358
|
-
this.set(
|
|
358
|
+
this.set(wt.ACTIVE, e);
|
|
359
359
|
}
|
|
360
360
|
setMap(e) {
|
|
361
361
|
this.map_ = e;
|
|
362
362
|
}
|
|
363
363
|
};
|
|
364
|
-
function
|
|
364
|
+
function Et(e, t, n) {
|
|
365
365
|
let r = e.getCenterInternal();
|
|
366
366
|
if (r) {
|
|
367
367
|
let i = [r[0] + t[0], r[1] + t[1]];
|
|
368
368
|
e.animateInternal({
|
|
369
369
|
duration: n === void 0 ? 250 : n,
|
|
370
|
-
easing:
|
|
370
|
+
easing: Pe,
|
|
371
371
|
center: e.getConstrainedCenter(i)
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
|
-
function
|
|
375
|
+
function Dt(e, t, n, r) {
|
|
376
376
|
let i = e.getZoom();
|
|
377
377
|
if (i === void 0) return;
|
|
378
|
-
let a = e.getConstrainedZoom(i + t)
|
|
379
|
-
|
|
378
|
+
let a = e.getConstrainedZoom(i + t);
|
|
379
|
+
if (a === void 0) return;
|
|
380
|
+
let o = e.getResolutionForZoom(a);
|
|
381
|
+
o !== void 0 && (e.getAnimating() && e.cancelAnimations(), e.animate({
|
|
380
382
|
resolution: o,
|
|
381
383
|
anchor: n,
|
|
382
384
|
duration: r === void 0 ? 250 : r,
|
|
383
|
-
easing:
|
|
384
|
-
});
|
|
385
|
+
easing: Be
|
|
386
|
+
}));
|
|
385
387
|
}
|
|
386
388
|
// ../node_modules/ol/Kinetic.js
|
|
387
|
-
var
|
|
389
|
+
var Ot = class {
|
|
388
390
|
constructor(e, t, n) {
|
|
389
391
|
this.decay_ = e, this.minVelocity_ = t, this.delay_ = n, this.points_ = [], this.angle_ = 0, this.initialVelocity_ = 0;
|
|
390
392
|
}
|
|
@@ -411,21 +413,21 @@ var Tt = class {
|
|
|
411
413
|
getAngle() {
|
|
412
414
|
return this.angle_;
|
|
413
415
|
}
|
|
414
|
-
},
|
|
416
|
+
}, kt = class extends Tt {
|
|
415
417
|
constructor(e) {
|
|
416
418
|
super(), e ||= {}, this.delta_ = e.delta ? e.delta : 1, this.duration_ = e.duration === void 0 ? 250 : e.duration;
|
|
417
419
|
}
|
|
418
420
|
handleEvent(e) {
|
|
419
421
|
let t = !1;
|
|
420
|
-
if (e.type ==
|
|
422
|
+
if (e.type == O.DBLCLICK) {
|
|
421
423
|
let n = e.originalEvent, r = e.map, i = e.coordinate, a = n.shiftKey ? -this.delta_ : this.delta_;
|
|
422
|
-
|
|
424
|
+
Dt(r.getView(), a, i, this.duration_), n.preventDefault(), t = !0;
|
|
423
425
|
}
|
|
424
426
|
return !t;
|
|
425
427
|
}
|
|
426
428
|
};
|
|
427
429
|
// ../node_modules/ol/events/condition.js
|
|
428
|
-
function
|
|
430
|
+
function At(e) {
|
|
429
431
|
let t = arguments;
|
|
430
432
|
return function(e) {
|
|
431
433
|
let n = !0;
|
|
@@ -433,44 +435,48 @@ function Dt(e) {
|
|
|
433
435
|
return n;
|
|
434
436
|
};
|
|
435
437
|
}
|
|
436
|
-
var
|
|
438
|
+
var jt = function(e) {
|
|
437
439
|
let t = e.originalEvent;
|
|
438
440
|
return t.altKey && !(t.metaKey || t.ctrlKey) && !t.shiftKey;
|
|
439
|
-
},
|
|
441
|
+
}, Mt = function(e) {
|
|
440
442
|
let t = e.originalEvent;
|
|
441
443
|
return t.altKey && !(t.metaKey || t.ctrlKey) && t.shiftKey;
|
|
442
|
-
},
|
|
443
|
-
let t = e.map.getTargetElement()
|
|
444
|
+
}, Nt = function(e) {
|
|
445
|
+
let t = e.map.getTargetElement();
|
|
446
|
+
if (!t) return !1;
|
|
447
|
+
let n = t.getRootNode(), r = e.map.getOwnerDocument().activeElement;
|
|
444
448
|
return n instanceof ShadowRoot ? n.host.contains(r) : t.contains(r);
|
|
445
|
-
},
|
|
446
|
-
let t = e.map.getTargetElement()
|
|
447
|
-
|
|
448
|
-
|
|
449
|
+
}, Pt = function(e) {
|
|
450
|
+
let t = e.map.getTargetElement();
|
|
451
|
+
if (!t) return !0;
|
|
452
|
+
let n = t.getRootNode();
|
|
453
|
+
return !(n instanceof ShadowRoot ? n.host : t).hasAttribute("tabindex") || Nt(e);
|
|
454
|
+
}, Ft = r, It = function(e) {
|
|
449
455
|
let t = e.originalEvent;
|
|
450
|
-
return "pointerId" in t && t.button == 0 && !(
|
|
451
|
-
},
|
|
456
|
+
return "pointerId" in t && t.button == 0 && !(de && we && t.ctrlKey);
|
|
457
|
+
}, Lt = p, Rt = function(e) {
|
|
452
458
|
return e.type == "pointermove";
|
|
453
|
-
},
|
|
454
|
-
return e.type ==
|
|
455
|
-
},
|
|
459
|
+
}, zt = function(e) {
|
|
460
|
+
return e.type == O.SINGLECLICK;
|
|
461
|
+
}, Bt = function(e) {
|
|
456
462
|
let t = e.originalEvent;
|
|
457
463
|
return !t.altKey && !(t.metaKey || t.ctrlKey) && !t.shiftKey;
|
|
458
|
-
},
|
|
464
|
+
}, Vt = function(e) {
|
|
459
465
|
let t = e.originalEvent;
|
|
460
|
-
return
|
|
461
|
-
},
|
|
466
|
+
return we ? t.metaKey : t.ctrlKey;
|
|
467
|
+
}, Ht = function(e) {
|
|
462
468
|
let t = e.originalEvent;
|
|
463
469
|
return !t.altKey && !(t.metaKey || t.ctrlKey) && t.shiftKey;
|
|
464
|
-
},
|
|
470
|
+
}, Ut = function(e) {
|
|
465
471
|
let t = e.originalEvent, n = t.target.tagName;
|
|
466
472
|
return n !== "INPUT" && n !== "SELECT" && n !== "TEXTAREA" && !t.target.isContentEditable;
|
|
467
|
-
},
|
|
473
|
+
}, Wt = function(e) {
|
|
468
474
|
let t = e.originalEvent;
|
|
469
475
|
return "pointerId" in t && t.pointerType == "mouse";
|
|
470
|
-
},
|
|
476
|
+
}, Gt = function(e) {
|
|
471
477
|
let t = e.originalEvent;
|
|
472
478
|
return "pointerId" in t && t.isPrimary && t.button === 0;
|
|
473
|
-
},
|
|
479
|
+
}, Kt = class extends Tt {
|
|
474
480
|
constructor(e) {
|
|
475
481
|
e ||= {}, super(e), e.handleDownEvent && (this.handleDownEvent = e.handleDownEvent), e.handleDragEvent && (this.handleDragEvent = e.handleDragEvent), e.handleMoveEvent && (this.handleMoveEvent = e.handleMoveEvent), e.handleUpEvent && (this.handleUpEvent = e.handleUpEvent), e.stopDown && (this.stopDown = e.stopDown), this.handlingDownUpSequence = !1, this.targetPointers = [];
|
|
476
482
|
}
|
|
@@ -485,15 +491,15 @@ var Ot = function(e) {
|
|
|
485
491
|
if (!e.originalEvent) return !0;
|
|
486
492
|
let t = !1;
|
|
487
493
|
if (this.updateTrackedPointers_(e), this.handlingDownUpSequence) {
|
|
488
|
-
if (e.type ==
|
|
489
|
-
else if (e.type ==
|
|
494
|
+
if (e.type == O.POINTERDRAG) this.handleDragEvent(e), e.originalEvent.preventDefault();
|
|
495
|
+
else if (e.type == O.POINTERUP) {
|
|
490
496
|
let t = this.handleUpEvent(e);
|
|
491
497
|
this.handlingDownUpSequence = t && this.targetPointers.length > 0;
|
|
492
498
|
}
|
|
493
|
-
} else if (e.type ==
|
|
499
|
+
} else if (e.type == O.POINTERDOWN) {
|
|
494
500
|
let n = this.handleDownEvent(e);
|
|
495
501
|
this.handlingDownUpSequence = n, t = this.stopDown(n);
|
|
496
|
-
} else e.type ==
|
|
502
|
+
} else e.type == O.POINTERMOVE && this.handleMoveEvent(e);
|
|
497
503
|
return !t;
|
|
498
504
|
}
|
|
499
505
|
handleMoveEvent(e) {}
|
|
@@ -507,7 +513,7 @@ var Ot = function(e) {
|
|
|
507
513
|
e.activePointers && (this.targetPointers = e.activePointers);
|
|
508
514
|
}
|
|
509
515
|
};
|
|
510
|
-
function
|
|
516
|
+
function qt(e) {
|
|
511
517
|
let t = e.length, n = 0, r = 0;
|
|
512
518
|
for (let i = 0; i < t; i++) n += e[i].clientX, r += e[i].clientY;
|
|
513
519
|
return {
|
|
@@ -516,34 +522,37 @@ function Wt(e) {
|
|
|
516
522
|
};
|
|
517
523
|
}
|
|
518
524
|
// ../node_modules/ol/interaction/DragPan.js
|
|
519
|
-
var
|
|
525
|
+
var Jt = class extends Kt {
|
|
520
526
|
constructor(e) {
|
|
521
|
-
super({ stopDown:
|
|
522
|
-
let t = e.condition ? e.condition :
|
|
523
|
-
this.condition_ = e.onFocusOnly ?
|
|
527
|
+
super({ stopDown: p }), e ||= {}, this.kinetic_ = e.kinetic, this.lastCentroid = null, this.lastPointersCount_, this.panning_ = !1;
|
|
528
|
+
let t = e.condition ? e.condition : At(Bt, Gt);
|
|
529
|
+
this.condition_ = e.onFocusOnly ? At(Pt, t) : t, this.noKinetic_ = !1;
|
|
524
530
|
}
|
|
525
531
|
handleDragEvent(e) {
|
|
526
532
|
let t = e.map;
|
|
527
533
|
this.panning_ || (this.panning_ = !0, t.getView().beginInteraction());
|
|
528
|
-
let
|
|
529
|
-
if (
|
|
530
|
-
if (this.kinetic_ && this.kinetic_.update(
|
|
531
|
-
let t = [this.lastCentroid[0] -
|
|
532
|
-
|
|
534
|
+
let r = this.targetPointers, i = t.getEventPixel(qt(r));
|
|
535
|
+
if (r.length == this.lastPointersCount_) {
|
|
536
|
+
if (this.kinetic_ && this.kinetic_.update(i[0], i[1]), this.lastCentroid) {
|
|
537
|
+
let t = [this.lastCentroid[0] - i[0], i[1] - this.lastCentroid[1]], r = e.map.getView(), a = r.getResolution();
|
|
538
|
+
a !== void 0 && (n(t, a), s(t, r.getRotation()), r.adjustCenterInternal(t));
|
|
533
539
|
}
|
|
534
540
|
} else this.kinetic_ && this.kinetic_.begin();
|
|
535
|
-
this.lastCentroid =
|
|
541
|
+
this.lastCentroid = i, this.lastPointersCount_ = r.length, e.originalEvent.preventDefault();
|
|
536
542
|
}
|
|
537
543
|
handleUpEvent(e) {
|
|
538
544
|
let t = e.map, n = t.getView();
|
|
539
545
|
if (this.targetPointers.length === 0) {
|
|
540
546
|
if (!this.noKinetic_ && this.kinetic_ && this.kinetic_.end()) {
|
|
541
|
-
let e = this.kinetic_.getDistance(), r = this.kinetic_.getAngle(), i = n.getCenterInternal()
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
+
let e = this.kinetic_.getDistance(), r = this.kinetic_.getAngle(), i = n.getCenterInternal();
|
|
548
|
+
if (i) {
|
|
549
|
+
let a = t.getPixelFromCoordinateInternal(i), o = t.getCoordinateFromPixelInternal([a[0] - e * Math.cos(r), a[1] - e * Math.sin(r)]);
|
|
550
|
+
n.animateInternal({
|
|
551
|
+
center: n.getConstrainedCenter(o),
|
|
552
|
+
duration: 500,
|
|
553
|
+
easing: Be
|
|
554
|
+
});
|
|
555
|
+
}
|
|
547
556
|
}
|
|
548
557
|
return this.panning_ && (this.panning_ = !1, n.endInteraction()), !1;
|
|
549
558
|
}
|
|
@@ -556,15 +565,17 @@ var Gt = class extends Ut {
|
|
|
556
565
|
}
|
|
557
566
|
return !1;
|
|
558
567
|
}
|
|
559
|
-
},
|
|
568
|
+
}, Yt = class extends Kt {
|
|
560
569
|
constructor(e) {
|
|
561
|
-
e ||= {}, super({ stopDown:
|
|
570
|
+
e ||= {}, super({ stopDown: p }), this.condition_ = e.condition ? e.condition : Mt, this.lastAngle_ = void 0, this.duration_ = e.duration === void 0 ? 250 : e.duration;
|
|
562
571
|
}
|
|
563
572
|
handleDragEvent(e) {
|
|
564
|
-
if (!
|
|
573
|
+
if (!Wt(e)) return;
|
|
565
574
|
let t = e.map, n = t.getView();
|
|
566
|
-
if (n.getConstraints().rotation ===
|
|
567
|
-
let r = t.getSize()
|
|
575
|
+
if (n.getConstraints().rotation === Ve) return;
|
|
576
|
+
let r = t.getSize();
|
|
577
|
+
if (!r) return;
|
|
578
|
+
let i = e.pixel, a = Math.atan2(r[1] / 2 - i[1], i[0] - r[0] / 2);
|
|
568
579
|
if (this.lastAngle_ !== void 0) {
|
|
569
580
|
let e = a - this.lastAngle_;
|
|
570
581
|
n.adjustRotationInternal(-e);
|
|
@@ -572,12 +583,12 @@ var Gt = class extends Ut {
|
|
|
572
583
|
this.lastAngle_ = a;
|
|
573
584
|
}
|
|
574
585
|
handleUpEvent(e) {
|
|
575
|
-
return !
|
|
586
|
+
return !Wt(e) || (e.map.getView().endInteraction(this.duration_), !1);
|
|
576
587
|
}
|
|
577
588
|
handleDownEvent(e) {
|
|
578
|
-
return
|
|
589
|
+
return Wt(e) && It(e) && this.condition_(e) ? (e.map.getView().beginInteraction(), this.lastAngle_ = void 0, !0) : !1;
|
|
579
590
|
}
|
|
580
|
-
},
|
|
591
|
+
}, Xt = class extends ie {
|
|
581
592
|
constructor(e) {
|
|
582
593
|
super(), this.geometry_ = null, this.element_ = document.createElement("div"), this.element_.style.position = "absolute", this.element_.style.pointerEvents = "auto", this.element_.className = "ol-box " + e, this.map_ = null, this.startPixel_ = null, this.endPixel_ = null;
|
|
583
594
|
}
|
|
@@ -585,45 +596,56 @@ var Gt = class extends Ut {
|
|
|
585
596
|
this.setMap(null);
|
|
586
597
|
}
|
|
587
598
|
render_() {
|
|
588
|
-
let e = this.startPixel_, t = this.endPixel_
|
|
599
|
+
let e = this.startPixel_, t = this.endPixel_;
|
|
600
|
+
if (!e || !t) return;
|
|
601
|
+
let n = this.element_.style;
|
|
589
602
|
n.left = Math.min(e[0], t[0]) + "px", n.top = Math.min(e[1], t[1]) + "px", n.width = Math.abs(t[0] - e[0]) + "px", n.height = Math.abs(t[1] - e[1]) + "px";
|
|
590
603
|
}
|
|
591
604
|
setMap(e) {
|
|
592
605
|
if (this.map_) {
|
|
593
|
-
this.map_.getOverlayContainer()
|
|
594
|
-
|
|
595
|
-
|
|
606
|
+
let e = this.map_.getOverlayContainer();
|
|
607
|
+
e && e.removeChild(this.element_);
|
|
608
|
+
let t = this.element_.style;
|
|
609
|
+
t.left = "inherit", t.top = "inherit", t.width = "inherit", t.height = "inherit";
|
|
610
|
+
}
|
|
611
|
+
if (this.map_ = e, this.map_) {
|
|
612
|
+
let e = this.map_.getOverlayContainer();
|
|
613
|
+
e && e.appendChild(this.element_);
|
|
596
614
|
}
|
|
597
|
-
this.map_ = e, this.map_ && this.map_.getOverlayContainer().appendChild(this.element_);
|
|
598
615
|
}
|
|
599
616
|
setPixels(e, t) {
|
|
600
617
|
this.startPixel_ = e, this.endPixel_ = t, this.createOrUpdateGeometry(), this.render_();
|
|
601
618
|
}
|
|
602
619
|
createOrUpdateGeometry() {
|
|
603
620
|
if (!this.map_) return;
|
|
604
|
-
let e = this.startPixel_, t = this.endPixel_
|
|
621
|
+
let e = this.startPixel_, t = this.endPixel_;
|
|
622
|
+
if (!e || !t) return;
|
|
623
|
+
let n = [
|
|
605
624
|
e,
|
|
606
625
|
[e[0], t[1]],
|
|
607
626
|
t,
|
|
608
627
|
[t[0], e[1]]
|
|
609
|
-
].map(
|
|
610
|
-
|
|
628
|
+
], r = this.map_, i = n.map((e) => r.getCoordinateFromPixelInternal(e)), a = i[0];
|
|
629
|
+
if (!a) return;
|
|
630
|
+
i[4] = a.slice();
|
|
631
|
+
let o = i;
|
|
632
|
+
this.geometry_ ? this.geometry_.setCoordinates([o]) : this.geometry_ = new Ue([o]);
|
|
611
633
|
}
|
|
612
634
|
getGeometry() {
|
|
613
635
|
return this.geometry_;
|
|
614
636
|
}
|
|
615
|
-
},
|
|
637
|
+
}, Zt = {
|
|
616
638
|
BOXSTART: "boxstart",
|
|
617
639
|
BOXDRAG: "boxdrag",
|
|
618
640
|
BOXEND: "boxend",
|
|
619
641
|
BOXCANCEL: "boxcancel"
|
|
620
|
-
},
|
|
642
|
+
}, Qt = class extends d {
|
|
621
643
|
constructor(e, t, n) {
|
|
622
644
|
super(e), this.coordinate = t, this.mapBrowserEvent = n;
|
|
623
645
|
}
|
|
624
|
-
},
|
|
646
|
+
}, $t = class extends Kt {
|
|
625
647
|
constructor(e) {
|
|
626
|
-
super(), this.on, this.once, this.un, e ??= {}, this.box_ = new
|
|
648
|
+
super(), this.on, this.once, this.un, e ??= {}, this.box_ = new Xt(e.className || "ol-dragbox"), this.minArea_ = e.minArea ?? 64, e.onBoxEnd && (this.onBoxEnd = e.onBoxEnd), this.startPixel_ = null, this.condition_ = e.condition ?? It, this.boxEndCondition_ = e.boxEndCondition ?? this.defaultBoxEndCondition;
|
|
627
649
|
}
|
|
628
650
|
defaultBoxEndCondition(e, t, n) {
|
|
629
651
|
let r = n[0] - t[0], i = n[1] - t[1];
|
|
@@ -633,27 +655,27 @@ var Gt = class extends Ut {
|
|
|
633
655
|
return this.box_.getGeometry();
|
|
634
656
|
}
|
|
635
657
|
handleDragEvent(e) {
|
|
636
|
-
this.startPixel_ && (this.box_.setPixels(this.startPixel_, e.pixel), this.dispatchEvent(new
|
|
658
|
+
this.startPixel_ && (this.box_.setPixels(this.startPixel_, e.pixel), this.dispatchEvent(new Qt(Zt.BOXDRAG, e.coordinate, e)));
|
|
637
659
|
}
|
|
638
660
|
handleUpEvent(e) {
|
|
639
661
|
if (!this.startPixel_) return !1;
|
|
640
662
|
let t = this.boxEndCondition_(e, this.startPixel_, e.pixel);
|
|
641
|
-
return t && this.onBoxEnd(e), this.dispatchEvent(new
|
|
663
|
+
return t && this.onBoxEnd(e), this.dispatchEvent(new Qt(t ? Zt.BOXEND : Zt.BOXCANCEL, e.coordinate, e)), this.box_.setMap(null), this.startPixel_ = null, !1;
|
|
642
664
|
}
|
|
643
665
|
handleDownEvent(e) {
|
|
644
|
-
return this.condition_(e) ? (this.startPixel_ = e.pixel, this.box_.setMap(e.map), this.box_.setPixels(this.startPixel_, this.startPixel_), this.dispatchEvent(new
|
|
666
|
+
return this.condition_(e) ? (this.startPixel_ = e.pixel, this.box_.setMap(e.map), this.box_.setPixels(this.startPixel_, this.startPixel_), this.dispatchEvent(new Qt(Zt.BOXSTART, e.coordinate, e)), !0) : !1;
|
|
645
667
|
}
|
|
646
668
|
onBoxEnd(e) {}
|
|
647
669
|
setActive(e) {
|
|
648
|
-
e || (this.box_.setMap(null), this.startPixel_ &&= (this.dispatchEvent(new
|
|
670
|
+
e || (this.box_.setMap(null), this.startPixel_ &&= (this.dispatchEvent(new Qt(Zt.BOXCANCEL, this.startPixel_, null)), null)), super.setActive(e);
|
|
649
671
|
}
|
|
650
672
|
setMap(e) {
|
|
651
|
-
this.getMap() && (this.box_.setMap(null), this.startPixel_ &&= (this.dispatchEvent(new
|
|
673
|
+
this.getMap() && (this.box_.setMap(null), this.startPixel_ &&= (this.dispatchEvent(new Qt(Zt.BOXCANCEL, this.startPixel_, null)), null)), super.setMap(e);
|
|
652
674
|
}
|
|
653
|
-
},
|
|
675
|
+
}, en = class extends $t {
|
|
654
676
|
constructor(e) {
|
|
655
677
|
e ||= {};
|
|
656
|
-
let t = e.condition ? e.condition :
|
|
678
|
+
let t = e.condition ? e.condition : Ht;
|
|
657
679
|
super({
|
|
658
680
|
condition: t,
|
|
659
681
|
className: e.className || "ol-dragzoom",
|
|
@@ -661,99 +683,95 @@ var Gt = class extends Ut {
|
|
|
661
683
|
}), this.duration_ = e.duration === void 0 ? 200 : e.duration, this.out_ = e.out !== void 0 && e.out;
|
|
662
684
|
}
|
|
663
685
|
onBoxEnd(e) {
|
|
664
|
-
let t = this.getMap()
|
|
686
|
+
let t = this.getMap();
|
|
687
|
+
if (!t) return;
|
|
688
|
+
let n = t.getView(), r = this.getGeometry();
|
|
665
689
|
if (this.out_) {
|
|
666
|
-
let e =
|
|
667
|
-
|
|
690
|
+
let e = n.rotatedExtentForGeometry(r), t = n.getResolutionForExtentInternal(e), i = n.getResolution();
|
|
691
|
+
if (t === void 0 || i === void 0) return;
|
|
692
|
+
let a = i / t;
|
|
693
|
+
r = r.clone(), r.scale(a * a);
|
|
668
694
|
}
|
|
669
|
-
|
|
695
|
+
n.fitInternal(r, {
|
|
670
696
|
duration: this.duration_,
|
|
671
|
-
easing:
|
|
697
|
+
easing: Be
|
|
672
698
|
});
|
|
673
699
|
}
|
|
674
|
-
},
|
|
700
|
+
}, tn = {
|
|
675
701
|
LEFT: "ArrowLeft",
|
|
676
702
|
UP: "ArrowUp",
|
|
677
703
|
RIGHT: "ArrowRight",
|
|
678
704
|
DOWN: "ArrowDown"
|
|
679
|
-
},
|
|
705
|
+
}, nn = class extends Tt {
|
|
680
706
|
constructor(e) {
|
|
681
707
|
super(), e ||= {}, this.defaultCondition_ = function(e) {
|
|
682
|
-
return
|
|
708
|
+
return Bt(e) && Ut(e);
|
|
683
709
|
}, this.condition_ = e.condition === void 0 ? this.defaultCondition_ : e.condition, this.duration_ = e.duration === void 0 ? 100 : e.duration, this.pixelDelta_ = e.pixelDelta === void 0 ? 128 : e.pixelDelta;
|
|
684
710
|
}
|
|
685
711
|
handleEvent(e) {
|
|
686
712
|
let t = !1;
|
|
687
|
-
if (e.type ==
|
|
713
|
+
if (e.type == x.KEYDOWN) {
|
|
688
714
|
let n = e.originalEvent, r = n.key;
|
|
689
|
-
if (this.condition_(e) && (r ==
|
|
690
|
-
let i = e.map.getView(), a = i.getResolution()
|
|
691
|
-
|
|
692
|
-
let
|
|
693
|
-
|
|
715
|
+
if (this.condition_(e) && (r == tn.DOWN || r == tn.LEFT || r == tn.RIGHT || r == tn.UP)) {
|
|
716
|
+
let i = e.map.getView(), a = i.getResolution();
|
|
717
|
+
if (a === void 0) return !0;
|
|
718
|
+
let o = a * this.pixelDelta_, c = 0, l = 0;
|
|
719
|
+
r == tn.DOWN ? l = -o : r == tn.LEFT ? c = -o : r == tn.RIGHT ? c = o : l = o;
|
|
720
|
+
let u = [c, l];
|
|
721
|
+
s(u, i.getRotation()), Et(i, u, this.duration_), n.preventDefault(), t = !0;
|
|
694
722
|
}
|
|
695
723
|
}
|
|
696
724
|
return !t;
|
|
697
725
|
}
|
|
698
|
-
},
|
|
726
|
+
}, rn = class extends Tt {
|
|
699
727
|
constructor(e) {
|
|
700
728
|
super(), e ||= {}, this.condition_ = e.condition ? e.condition : function(e) {
|
|
701
|
-
return !
|
|
729
|
+
return !Vt(e) && Ut(e);
|
|
702
730
|
}, this.delta_ = e.delta ? e.delta : 1, this.duration_ = e.duration === void 0 ? 100 : e.duration;
|
|
703
731
|
}
|
|
704
732
|
handleEvent(e) {
|
|
705
733
|
let t = !1;
|
|
706
|
-
if (e.type ==
|
|
734
|
+
if (e.type == x.KEYDOWN || e.type == x.KEYPRESS) {
|
|
707
735
|
let n = e.originalEvent, r = n.key;
|
|
708
736
|
if (this.condition_(e) && (r === "+" || r === "-")) {
|
|
709
737
|
let i = e.map, a = r === "+" ? this.delta_ : -this.delta_;
|
|
710
|
-
|
|
738
|
+
Dt(i.getView(), a, void 0, this.duration_), n.preventDefault(), t = !0;
|
|
711
739
|
}
|
|
712
740
|
}
|
|
713
741
|
return !t;
|
|
714
742
|
}
|
|
715
|
-
},
|
|
743
|
+
}, an = 40, on = 300, sn = 3, cn = class extends Tt {
|
|
716
744
|
constructor(e) {
|
|
717
745
|
e ||= {}, super(e), this.totalDelta_ = 0, this.lastDelta_ = 0, this.maxDelta_ = e.maxDelta === void 0 ? 1 : e.maxDelta, this.duration_ = e.duration === void 0 ? 250 : e.duration, this.timeout_ = e.timeout === void 0 ? 80 : e.timeout, this.useAnchor_ = e.useAnchor === void 0 || e.useAnchor, this.constrainResolution_ = e.constrainResolution !== void 0 && e.constrainResolution;
|
|
718
|
-
let t = e.condition ? e.condition :
|
|
719
|
-
this.condition_ = e.onFocusOnly ?
|
|
720
|
-
}
|
|
721
|
-
setMap(e) {
|
|
722
|
-
if (this.ctrlKeyListenerKeys_.forEach(v), this.ctrlKeyListenerKeys_.length = 0, this.ctrlKeyPressed_ = !1, super.setMap(e), e) {
|
|
723
|
-
let t = e.getOwnerDocument();
|
|
724
|
-
this.ctrlKeyListenerKeys_.push(S(t, "keydown", (e) => {
|
|
725
|
-
e.key === "Control" && (this.ctrlKeyPressed_ = !0);
|
|
726
|
-
}), S(t, "keyup", (e) => {
|
|
727
|
-
e.key === "Control" && (this.ctrlKeyPressed_ = !1);
|
|
728
|
-
}));
|
|
729
|
-
}
|
|
746
|
+
let t = e.condition ? e.condition : Ft;
|
|
747
|
+
this.condition_ = e.onFocusOnly ? At(Pt, t) : t, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_, this.mode_ = void 0, this.trackpadEventGap_ = 400, this.trackpadTimeoutId_, this.deltaPerZoom_ = 300;
|
|
730
748
|
}
|
|
731
749
|
endInteraction_() {
|
|
732
750
|
this.trackpadTimeoutId_ = void 0;
|
|
733
751
|
let e = this.getMap();
|
|
734
752
|
if (!e) return;
|
|
735
753
|
let t = e.getView(), n = this.lastDelta_ ? this.lastDelta_ > 0 ? 1 : -1 : 0;
|
|
736
|
-
t.endInteraction(this.constrainResolution_ || t.getConstrainResolution() ? 100 : void 0, n, this.lastAnchor_ ? e.getCoordinateFromPixel(this.lastAnchor_) :
|
|
754
|
+
t.endInteraction(this.constrainResolution_ || t.getConstrainResolution() ? 100 : void 0, n, this.lastAnchor_ ? e.getCoordinateFromPixel(this.lastAnchor_) : void 0);
|
|
737
755
|
}
|
|
738
756
|
handleEvent(e) {
|
|
739
|
-
if (!this.condition_(e) || e.type !==
|
|
757
|
+
if (!this.condition_(e) || e.type !== x.WHEEL) return !0;
|
|
740
758
|
let t = e.map, n = e.originalEvent;
|
|
741
759
|
n.preventDefault();
|
|
742
|
-
let r = n.ctrlKey && !
|
|
743
|
-
|
|
760
|
+
let r = n.ctrlKey && !e.ctrlKey;
|
|
761
|
+
this.useAnchor_ && (this.lastAnchor_ = e.pixel);
|
|
744
762
|
let i = n.deltaY;
|
|
745
763
|
switch (n.deltaMode) {
|
|
746
764
|
case WheelEvent.DOM_DELTA_LINE:
|
|
747
|
-
i *=
|
|
765
|
+
i *= an;
|
|
748
766
|
break;
|
|
749
|
-
case WheelEvent.DOM_DELTA_PAGE: i *=
|
|
767
|
+
case WheelEvent.DOM_DELTA_PAGE: i *= on;
|
|
750
768
|
}
|
|
751
769
|
if (i === 0) return !1;
|
|
752
770
|
this.lastDelta_ = i;
|
|
753
771
|
let a = Date.now();
|
|
754
772
|
this.startTime_ === void 0 && (this.startTime_ = a), (!this.mode_ || a - this.startTime_ > this.trackpadEventGap_) && (this.mode_ = Math.abs(i) < 4 ? "trackpad" : "wheel");
|
|
755
773
|
let o = t.getView();
|
|
756
|
-
if (this.mode_ === "trackpad") return this.trackpadTimeoutId_ ? clearTimeout(this.trackpadTimeoutId_) : (o.getAnimating() && o.cancelAnimations(), o.beginInteraction()), this.trackpadTimeoutId_ = setTimeout(this.endInteraction_.bind(this), this.timeout_), r && (i *=
|
|
774
|
+
if (this.mode_ === "trackpad") return this.trackpadTimeoutId_ ? clearTimeout(this.trackpadTimeoutId_) : (o.getAnimating() && o.cancelAnimations(), o.beginInteraction()), this.trackpadTimeoutId_ = setTimeout(this.endInteraction_.bind(this), this.timeout_), r && (i *= sn), o.adjustZoom(-i / this.deltaPerZoom_, this.lastAnchor_ ? t.getCoordinateFromPixel(this.lastAnchor_) : void 0), this.startTime_ = a, !1;
|
|
757
775
|
this.totalDelta_ += i;
|
|
758
776
|
let s = Math.max(this.timeout_ - (a - this.startTime_), 0);
|
|
759
777
|
return clearTimeout(this.timeoutId_), this.timeoutId_ = setTimeout(this.handleWheelZoom_.bind(this, t), s), !1;
|
|
@@ -761,17 +779,17 @@ var Gt = class extends Ut {
|
|
|
761
779
|
handleWheelZoom_(e) {
|
|
762
780
|
let t = e.getView();
|
|
763
781
|
t.getAnimating() && t.cancelAnimations();
|
|
764
|
-
let
|
|
765
|
-
(t.getConstrainResolution() || this.constrainResolution_) && (
|
|
782
|
+
let n = -f(this.totalDelta_, -this.maxDelta_ * this.deltaPerZoom_, this.maxDelta_ * this.deltaPerZoom_) / this.deltaPerZoom_;
|
|
783
|
+
(t.getConstrainResolution() || this.constrainResolution_) && (n = n ? n > 0 ? 1 : -1 : 0), Dt(t, n, this.lastAnchor_ ? e.getCoordinateFromPixel(this.lastAnchor_) : void 0, this.duration_), this.mode_ = void 0, this.totalDelta_ = 0, this.lastAnchor_ = null, this.startTime_ = void 0, this.timeoutId_ = void 0;
|
|
766
784
|
}
|
|
767
785
|
setMouseAnchor(e) {
|
|
768
786
|
this.useAnchor_ = e, e || (this.lastAnchor_ = null);
|
|
769
787
|
}
|
|
770
|
-
},
|
|
788
|
+
}, ln = class extends Kt {
|
|
771
789
|
constructor(e) {
|
|
772
790
|
e ||= {};
|
|
773
791
|
let t = e;
|
|
774
|
-
t.stopDown ||=
|
|
792
|
+
t.stopDown ||= p, super(t), this.anchor_ = null, this.lastAngle_ = void 0, this.rotating_ = !1, this.rotationDelta_ = 0, this.threshold_ = e.threshold === void 0 ? .3 : e.threshold, this.duration_ = e.duration === void 0 ? 250 : e.duration;
|
|
775
793
|
}
|
|
776
794
|
handleDragEvent(e) {
|
|
777
795
|
let t = 0, n = this.targetPointers[0], r = this.targetPointers[1], i = Math.atan2(r.clientY - n.clientY, r.clientX - n.clientX);
|
|
@@ -781,7 +799,7 @@ var Gt = class extends Ut {
|
|
|
781
799
|
}
|
|
782
800
|
this.lastAngle_ = i;
|
|
783
801
|
let a = e.map, o = a.getView();
|
|
784
|
-
o.getConstraints().rotation !==
|
|
802
|
+
o.getConstraints().rotation !== Ve && (this.anchor_ = a.getCoordinateFromPixelInternal(a.getEventPixel(qt(this.targetPointers))) ?? null, this.rotating_ && (a.render(), o.adjustRotationInternal(t, this.anchor_ ?? void 0)));
|
|
785
803
|
}
|
|
786
804
|
handleUpEvent(e) {
|
|
787
805
|
return this.targetPointers.length < 2 ? (e.map.getView().endInteraction(this.duration_), !1) : !0;
|
|
@@ -793,17 +811,17 @@ var Gt = class extends Ut {
|
|
|
793
811
|
}
|
|
794
812
|
return !1;
|
|
795
813
|
}
|
|
796
|
-
},
|
|
814
|
+
}, un = class extends Kt {
|
|
797
815
|
constructor(e) {
|
|
798
816
|
e ||= {};
|
|
799
817
|
let t = e;
|
|
800
|
-
t.stopDown ||=
|
|
818
|
+
t.stopDown ||= p, super(t), this.anchor_ = null, this.duration_ = e.duration === void 0 ? 400 : e.duration, this.lastDistance_ = void 0, this.lastScaleDelta_ = 1;
|
|
801
819
|
}
|
|
802
820
|
handleDragEvent(e) {
|
|
803
821
|
let t = 1, n = this.targetPointers[0], r = this.targetPointers[1], i = n.clientX - r.clientX, a = n.clientY - r.clientY, o = Math.sqrt(i * i + a * a);
|
|
804
822
|
this.lastDistance_ !== void 0 && (t = this.lastDistance_ / o), this.lastDistance_ = o;
|
|
805
823
|
let s = e.map, c = s.getView();
|
|
806
|
-
t != 1 && (this.lastScaleDelta_ = t), this.anchor_ = s.getCoordinateFromPixelInternal(s.getEventPixel(
|
|
824
|
+
t != 1 && (this.lastScaleDelta_ = t), this.anchor_ = s.getCoordinateFromPixelInternal(s.getEventPixel(qt(this.targetPointers))) ?? null, s.render(), c.adjustResolutionInternal(t, this.anchor_ ?? void 0);
|
|
807
825
|
}
|
|
808
826
|
handleUpEvent(e) {
|
|
809
827
|
if (this.targetPointers.length < 2) {
|
|
@@ -821,31 +839,31 @@ var Gt = class extends Ut {
|
|
|
821
839
|
}
|
|
822
840
|
};
|
|
823
841
|
// ../node_modules/ol/interaction/defaults.js
|
|
824
|
-
function
|
|
842
|
+
function dn(e) {
|
|
825
843
|
e ||= {};
|
|
826
|
-
let t = new
|
|
827
|
-
return (e.altShiftDragRotate === void 0 || e.altShiftDragRotate) && t.push(new
|
|
844
|
+
let t = new D(), n = new Ot(-.005, .05, 100);
|
|
845
|
+
return (e.altShiftDragRotate === void 0 || e.altShiftDragRotate) && t.push(new Yt()), (e.doubleClickZoom === void 0 || e.doubleClickZoom) && t.push(new kt({
|
|
828
846
|
delta: e.zoomDelta,
|
|
829
847
|
duration: e.zoomDuration
|
|
830
|
-
})), (e.dragPan === void 0 || e.dragPan) && t.push(new
|
|
848
|
+
})), (e.dragPan === void 0 || e.dragPan) && t.push(new Jt({
|
|
831
849
|
onFocusOnly: e.onFocusOnly,
|
|
832
850
|
kinetic: n
|
|
833
|
-
})), (e.pinchRotate === void 0 || e.pinchRotate) && t.push(new
|
|
851
|
+
})), (e.pinchRotate === void 0 || e.pinchRotate) && t.push(new ln()), (e.pinchZoom === void 0 || e.pinchZoom) && t.push(new un({ duration: e.zoomDuration })), (e.keyboard === void 0 || e.keyboard) && (t.push(new nn()), t.push(new rn({
|
|
834
852
|
delta: e.zoomDelta,
|
|
835
853
|
duration: e.zoomDuration
|
|
836
|
-
}))), (e.mouseWheelZoom === void 0 || e.mouseWheelZoom) && t.push(new
|
|
854
|
+
}))), (e.mouseWheelZoom === void 0 || e.mouseWheelZoom) && t.push(new cn({
|
|
837
855
|
onFocusOnly: e.onFocusOnly,
|
|
838
856
|
duration: e.zoomDuration
|
|
839
|
-
})), (e.shiftDragZoom === void 0 || e.shiftDragZoom) && t.push(new
|
|
857
|
+
})), (e.shiftDragZoom === void 0 || e.shiftDragZoom) && t.push(new en({ duration: e.zoomDuration })), t;
|
|
840
858
|
}
|
|
841
859
|
// ../node_modules/ol/MapEvent.js
|
|
842
|
-
var
|
|
860
|
+
var fn = class extends d {
|
|
843
861
|
constructor(e, t, n) {
|
|
844
862
|
super(e), this.map = t, this.frameState = n === void 0 ? null : n;
|
|
845
863
|
}
|
|
846
|
-
},
|
|
864
|
+
}, k = class extends fn {
|
|
847
865
|
constructor(e, t, n, r, i, a) {
|
|
848
|
-
super(e, t, i), this.originalEvent = n, this.pixel_ = null, this.coordinate_ = null, this.dragging = r !== void 0 && r, this.activePointers = a;
|
|
866
|
+
super(e, t, i), this.originalEvent = n, this.pixel_ = null, this.coordinate_ = null, this.dragging = r !== void 0 && r, this.activePointers = a, this.ctrlKey = !1;
|
|
849
867
|
}
|
|
850
868
|
get pixel() {
|
|
851
869
|
return this.pixel_ ||= this.map.getEventPixel(this.originalEvent), this.pixel_;
|
|
@@ -865,7 +883,7 @@ var ln = class extends p {
|
|
|
865
883
|
stopPropagation() {
|
|
866
884
|
super.stopPropagation(), "stopPropagation" in this.originalEvent && this.originalEvent.stopPropagation();
|
|
867
885
|
}
|
|
868
|
-
},
|
|
886
|
+
}, pn = class {
|
|
869
887
|
constructor() {
|
|
870
888
|
this.cache_ = {}, this.patternCache_ = {}, this.cacheSize_ = 0, this.maxCacheSize_ = 1024;
|
|
871
889
|
}
|
|
@@ -885,56 +903,70 @@ var ln = class extends p {
|
|
|
885
903
|
}
|
|
886
904
|
}
|
|
887
905
|
get(e, t) {
|
|
888
|
-
let n =
|
|
906
|
+
let n = mn(e, t);
|
|
889
907
|
return n in this.cache_ ? this.cache_[n] : null;
|
|
890
908
|
}
|
|
891
909
|
getPattern(e, t) {
|
|
892
|
-
let n =
|
|
910
|
+
let n = mn(e, t);
|
|
893
911
|
return n in this.patternCache_ ? this.patternCache_[n] : null;
|
|
894
912
|
}
|
|
895
913
|
set(e, t, n, r) {
|
|
896
|
-
let i =
|
|
897
|
-
this.cache_[i] = n, r &&
|
|
898
|
-
|
|
899
|
-
|
|
914
|
+
let i = mn(e, t), a = i in this.cache_;
|
|
915
|
+
if (n && (this.cache_[i] = n), r && n) {
|
|
916
|
+
if (n.getImageState() === C.IDLE && n.load(), n.getImageState() === C.LOADING) n.ready().then(() => {
|
|
917
|
+
let e = _e().createPattern(n.getImage(1), "repeat");
|
|
918
|
+
e && (this.patternCache_[i] = e);
|
|
919
|
+
});
|
|
920
|
+
else {
|
|
921
|
+
let e = _e().createPattern(n.getImage(1), "repeat");
|
|
922
|
+
e && (this.patternCache_[i] = e);
|
|
923
|
+
}
|
|
924
|
+
}
|
|
925
|
+
a || ++this.cacheSize_;
|
|
900
926
|
}
|
|
901
927
|
setSize(e) {
|
|
902
928
|
this.maxCacheSize_ = e, this.expire();
|
|
903
929
|
}
|
|
904
930
|
};
|
|
905
|
-
function
|
|
906
|
-
let n = t ?
|
|
931
|
+
function mn(e, t) {
|
|
932
|
+
let n = t ? Qe(t) : "null";
|
|
907
933
|
return e + ":" + n;
|
|
908
934
|
}
|
|
909
|
-
var
|
|
935
|
+
var A = new pn(), hn = null, gn = class extends i {
|
|
910
936
|
constructor(e, t, n, r, i) {
|
|
911
|
-
super(), this.hitDetectionImage_ = null, this.image_ = e, this.crossOrigin_ = n?.crossOrigin, this.referrerPolicy_ = n?.referrerPolicy, this.canvas_ = {}, this.color_ = i, this.imageState_ = r === void 0 ?
|
|
937
|
+
super(), this.hitDetectionImage_ = null, this.image_ = e, this.crossOrigin_ = n?.crossOrigin ?? null, this.referrerPolicy_ = n?.referrerPolicy, this.canvas_ = {}, this.color_ = i, this.imageState_ = r === void 0 ? C.IDLE : r, this.size_ = e && e.width && e.height ? [e.width, e.height] : null, this.src_ = t, this.tainted_, this.ready_ = null;
|
|
912
938
|
}
|
|
913
939
|
initializeImage_() {
|
|
914
940
|
this.image_ = new Image(), this.crossOrigin_ !== null && (this.image_.crossOrigin = this.crossOrigin_), this.referrerPolicy_ !== void 0 && (this.image_.referrerPolicy = this.referrerPolicy_);
|
|
915
941
|
}
|
|
916
942
|
isTainted_() {
|
|
917
|
-
if (this.tainted_ === void 0 && this.imageState_ ===
|
|
918
|
-
|
|
943
|
+
if (this.tainted_ === void 0 && this.imageState_ === C.LOADED) {
|
|
944
|
+
let e = this.image_;
|
|
945
|
+
if (!e) return !1;
|
|
946
|
+
hn ||= xe(1, 1, void 0, { willReadFrequently: !0 }), hn.drawImage(e, 0, 0);
|
|
919
947
|
try {
|
|
920
|
-
|
|
948
|
+
hn.getImageData(0, 0, 1, 1), this.tainted_ = !1;
|
|
921
949
|
} catch {
|
|
922
|
-
|
|
950
|
+
hn = null, this.tainted_ = !0;
|
|
923
951
|
}
|
|
924
952
|
}
|
|
925
953
|
return this.tainted_ === !0;
|
|
926
954
|
}
|
|
927
955
|
dispatchChangeEvent_() {
|
|
928
|
-
this.dispatchEvent(
|
|
956
|
+
this.dispatchEvent(x.CHANGE);
|
|
929
957
|
}
|
|
930
958
|
handleImageError_() {
|
|
931
|
-
this.imageState_ =
|
|
959
|
+
this.imageState_ = C.ERROR, this.dispatchChangeEvent_();
|
|
932
960
|
}
|
|
933
961
|
handleImageLoad_() {
|
|
934
|
-
this.imageState_ =
|
|
962
|
+
this.imageState_ = C.LOADED;
|
|
963
|
+
let e = this.image_;
|
|
964
|
+
e && "width" in e && "height" in e && (this.size_ = [e.width, e.height]), this.dispatchChangeEvent_();
|
|
935
965
|
}
|
|
936
966
|
getImage(e) {
|
|
937
|
-
|
|
967
|
+
this.image_ || this.initializeImage_(), this.replaceColor_(e);
|
|
968
|
+
let t = this.image_;
|
|
969
|
+
return this.canvas_[e] ? this.canvas_[e] : t;
|
|
938
970
|
}
|
|
939
971
|
setImage(e) {
|
|
940
972
|
this.image_ = e;
|
|
@@ -948,8 +980,10 @@ var j = new un(), fn = null, pn = class extends f {
|
|
|
948
980
|
getHitDetectionImage() {
|
|
949
981
|
if (this.image_ || this.initializeImage_(), !this.hitDetectionImage_) {
|
|
950
982
|
if (this.isTainted_()) {
|
|
951
|
-
let e = this.size_
|
|
952
|
-
|
|
983
|
+
let e = this.size_;
|
|
984
|
+
if (!e) return this.image_;
|
|
985
|
+
let t = e[0], n = e[1], r = xe(t, n);
|
|
986
|
+
r.fillRect(0, 0, t, n), this.hitDetectionImage_ = r.canvas;
|
|
953
987
|
} else this.hitDetectionImage_ = this.image_;
|
|
954
988
|
}
|
|
955
989
|
return this.hitDetectionImage_;
|
|
@@ -961,59 +995,61 @@ var j = new un(), fn = null, pn = class extends f {
|
|
|
961
995
|
return this.src_;
|
|
962
996
|
}
|
|
963
997
|
load() {
|
|
964
|
-
if (this.imageState_ ===
|
|
965
|
-
this.image_ || this.initializeImage_(), this.imageState_ =
|
|
998
|
+
if (this.imageState_ === C.IDLE) {
|
|
999
|
+
this.image_ || this.initializeImage_(), this.imageState_ = C.LOADING;
|
|
966
1000
|
try {
|
|
967
1001
|
this.src_ !== void 0 && (this.image_.src = this.src_);
|
|
968
1002
|
} catch {
|
|
969
1003
|
this.handleImageError_();
|
|
970
1004
|
}
|
|
971
|
-
this.image_ instanceof HTMLImageElement &&
|
|
1005
|
+
this.image_ instanceof HTMLImageElement && be(this.image_, this.src_).then((e) => {
|
|
972
1006
|
this.image_ = e, this.handleImageLoad_();
|
|
973
1007
|
}).catch(this.handleImageError_.bind(this));
|
|
974
1008
|
}
|
|
975
1009
|
}
|
|
976
1010
|
replaceColor_(e) {
|
|
977
|
-
if (!this.color_ || this.canvas_[e] || this.imageState_ !==
|
|
978
|
-
let t = this.image_
|
|
979
|
-
|
|
1011
|
+
if (!this.color_ || this.canvas_[e] || this.imageState_ !== C.LOADED) return;
|
|
1012
|
+
let t = this.image_;
|
|
1013
|
+
if (!t) return;
|
|
1014
|
+
let n = xe(Math.ceil(t.width * e), Math.ceil(t.height * e)), r = n.canvas;
|
|
1015
|
+
n.scale(e, e), n.drawImage(t, 0, 0), n.globalCompositeOperation = "multiply", n.fillStyle = tt(this.color_), n.fillRect(0, 0, r.width / e, r.height / e), n.globalCompositeOperation = "destination-in", n.drawImage(t, 0, 0), this.canvas_[e] = r;
|
|
980
1016
|
}
|
|
981
1017
|
ready() {
|
|
982
1018
|
return this.ready_ ||= new Promise((e) => {
|
|
983
|
-
if (this.imageState_ ===
|
|
1019
|
+
if (this.imageState_ === C.LOADED || this.imageState_ === C.ERROR) e();
|
|
984
1020
|
else {
|
|
985
1021
|
let t = () => {
|
|
986
|
-
(this.imageState_ ===
|
|
1022
|
+
(this.imageState_ === C.LOADED || this.imageState_ === C.ERROR) && (this.removeEventListener(x.CHANGE, t), e());
|
|
987
1023
|
};
|
|
988
|
-
this.addEventListener(
|
|
1024
|
+
this.addEventListener(x.CHANGE, t);
|
|
989
1025
|
}
|
|
990
1026
|
}), this.ready_;
|
|
991
1027
|
}
|
|
992
1028
|
};
|
|
993
|
-
function
|
|
994
|
-
let o = t === void 0 ? void 0 :
|
|
995
|
-
return o || (o = new
|
|
1029
|
+
function _n(e, t, n, r, i, a) {
|
|
1030
|
+
let o = t === void 0 ? void 0 : A.get(t, i);
|
|
1031
|
+
return o || (o = new gn(e, e && "src" in e ? e.src || void 0 : t, n, r, i), t !== void 0 && A.set(t, i, o, a)), a && o && t !== void 0 && !A.getPattern(t, i) && A.set(t, i, o, a), o;
|
|
996
1032
|
}
|
|
997
1033
|
// ../node_modules/ol/colorlike.js
|
|
998
|
-
function
|
|
999
|
-
return e ? Array.isArray(e) ?
|
|
1034
|
+
function vn(e) {
|
|
1035
|
+
return e ? Array.isArray(e) ? qe(e) : typeof e == "object" && "src" in e ? yn(e) : e : null;
|
|
1000
1036
|
}
|
|
1001
|
-
function
|
|
1002
|
-
if (!e.offset || !e.size) return
|
|
1003
|
-
let t = e.src + ":" + e.offset, n =
|
|
1037
|
+
function yn(e) {
|
|
1038
|
+
if (!e.offset || !e.size) return A.getPattern(e.src, e.color ?? null);
|
|
1039
|
+
let t = e.src + ":" + e.offset, n = A.getPattern(t, e.color ?? null);
|
|
1004
1040
|
if (n) return n;
|
|
1005
|
-
let r =
|
|
1006
|
-
if (r.getImageState() !==
|
|
1007
|
-
let i =
|
|
1008
|
-
return i.drawImage(r.getImage(1), e.offset[0], e.offset[1], e.size[0], e.size[1], 0, 0, e.size[0], e.size[1]),
|
|
1041
|
+
let r = A.get(e.src, null);
|
|
1042
|
+
if (!r || r.getImageState() !== C.LOADED) return null;
|
|
1043
|
+
let i = xe(e.size[0], e.size[1]);
|
|
1044
|
+
return i.drawImage(r.getImage(1), e.offset[0], e.offset[1], e.size[0], e.size[1], 0, 0, e.size[0], e.size[1]), _n(i.canvas, t, {}, C.LOADED, e.color ?? null, !0), A.getPattern(t, e.color ?? null);
|
|
1009
1045
|
}
|
|
1010
1046
|
// ../node_modules/ol/render/canvas.js
|
|
1011
|
-
var
|
|
1047
|
+
var bn = "10px sans-serif", xn = "#000", Sn = "round", Cn = [], wn = "round", Tn = "#000", En = "center", Dn = "middle", On = [
|
|
1012
1048
|
0,
|
|
1013
1049
|
0,
|
|
1014
1050
|
0,
|
|
1015
1051
|
0
|
|
1016
|
-
],
|
|
1052
|
+
], kn = new ue(), An = null, jn, Mn = {}, Nn = /* @__PURE__ */ new Set([
|
|
1017
1053
|
"serif",
|
|
1018
1054
|
"sans-serif",
|
|
1019
1055
|
"monospace",
|
|
@@ -1028,66 +1064,68 @@ var _n = "10px sans-serif", vn = "#000", yn = "round", bn = [], xn = "round", Sn
|
|
|
1028
1064
|
"math",
|
|
1029
1065
|
"fangsong"
|
|
1030
1066
|
]);
|
|
1031
|
-
function
|
|
1067
|
+
function Pn(e, t, n) {
|
|
1032
1068
|
return `${e} ${t} 16px "${n}"`;
|
|
1033
1069
|
}
|
|
1034
|
-
var
|
|
1070
|
+
var Fn = (function() {
|
|
1035
1071
|
let e, t;
|
|
1036
1072
|
async function n(e) {
|
|
1037
1073
|
await t.ready;
|
|
1038
|
-
let n =
|
|
1074
|
+
let n = Oe(e);
|
|
1075
|
+
if (!n) return !1;
|
|
1076
|
+
let r = n.families[0].toLowerCase(), i = n.weight, a = [];
|
|
1039
1077
|
return t.forEach((e) => {
|
|
1040
|
-
let t = e.family.replace(/^['"]|['"]$/g, "").toLowerCase(), o =
|
|
1078
|
+
let t = e.family.replace(/^['"]|['"]$/g, "").toLowerCase(), o = Ee[e.weight] || e.weight;
|
|
1041
1079
|
t === r && e.style === n.style && o == i && a.push(e);
|
|
1042
1080
|
}), a.length !== 0 && (await Promise.all(a.map((e) => e.load().then(() => !0, () => !1)))).some((e) => e);
|
|
1043
1081
|
}
|
|
1044
1082
|
async function r() {
|
|
1045
1083
|
await t.ready;
|
|
1046
|
-
let i = !0, a =
|
|
1084
|
+
let i = !0, a = kn.getProperties(), o = Object.keys(a).filter((e) => a[e] < 100);
|
|
1047
1085
|
for (let e = o.length - 1; e >= 0; --e) {
|
|
1048
1086
|
let t = o[e], r = a[t];
|
|
1049
|
-
r < 100 && (await n(t) ? (
|
|
1087
|
+
r < 100 && (await n(t) ? (_(Mn), kn.set(t, 100)) : (r += 10, kn.set(t, r, !0), r < 100 && (i = !1)));
|
|
1050
1088
|
}
|
|
1051
1089
|
e = void 0, i || (e = setTimeout(r, 100));
|
|
1052
1090
|
}
|
|
1053
1091
|
return async function(n) {
|
|
1054
|
-
t ||=
|
|
1055
|
-
let i =
|
|
1092
|
+
t ||= Ce ? self.fonts : document.fonts;
|
|
1093
|
+
let i = Oe(n);
|
|
1056
1094
|
if (!i) return;
|
|
1057
1095
|
let a = i.families, o = !1;
|
|
1058
1096
|
for (let e of a) {
|
|
1059
|
-
if (
|
|
1060
|
-
let t =
|
|
1061
|
-
|
|
1097
|
+
if (Nn.has(e)) continue;
|
|
1098
|
+
let t = Pn(i.style, i.weight, e);
|
|
1099
|
+
kn.get(t) === void 0 && (kn.set(t, 0, !0), o = !0);
|
|
1062
1100
|
}
|
|
1063
1101
|
o && (clearTimeout(e), e = setTimeout(r, 100));
|
|
1064
1102
|
};
|
|
1065
|
-
})(),
|
|
1103
|
+
})(), In = (function() {
|
|
1066
1104
|
let e;
|
|
1067
1105
|
return function(t) {
|
|
1068
|
-
let n =
|
|
1106
|
+
let n = Mn[t];
|
|
1069
1107
|
if (n == null) {
|
|
1070
|
-
if (
|
|
1071
|
-
let e =
|
|
1072
|
-
n = (isNaN(Number(e.lineHeight)) ? 1.2 : Number(e.lineHeight)) * (r.actualBoundingBoxAscent + r.actualBoundingBoxDescent);
|
|
1108
|
+
if (Ce) {
|
|
1109
|
+
let e = Oe(t), r = Ln(t, "Žg");
|
|
1110
|
+
n = (!e || isNaN(Number(e.lineHeight)) ? 1.2 : Number(e.lineHeight)) * (r.actualBoundingBoxAscent + r.actualBoundingBoxDescent);
|
|
1073
1111
|
} else e || (e = document.createElement("div"), e.innerHTML = "M", e.style.minHeight = "0", e.style.maxHeight = "none", e.style.height = "auto", e.style.padding = "0", e.style.border = "none", e.style.position = "absolute", e.style.display = "block", e.style.left = "-99999px"), e.style.font = t, document.body.appendChild(e), n = e.offsetHeight, document.body.removeChild(e);
|
|
1074
|
-
|
|
1112
|
+
Mn[t] = n;
|
|
1075
1113
|
}
|
|
1076
1114
|
return n;
|
|
1077
1115
|
};
|
|
1078
1116
|
})();
|
|
1079
|
-
function
|
|
1080
|
-
return
|
|
1117
|
+
function Ln(e, t) {
|
|
1118
|
+
return An ||= xe(1, 1), e != jn && (An.font = e, jn = An.font), An.measureText(t);
|
|
1081
1119
|
}
|
|
1082
|
-
function
|
|
1083
|
-
return
|
|
1120
|
+
function Rn(e, t) {
|
|
1121
|
+
return Ln(e, t).width;
|
|
1084
1122
|
}
|
|
1085
|
-
function
|
|
1123
|
+
function zn(e, t, n) {
|
|
1086
1124
|
if (t in n) return n[t];
|
|
1087
|
-
let r = t.split("\n").reduce((t, n) => Math.max(t,
|
|
1125
|
+
let r = t.split("\n").reduce((t, n) => Math.max(t, Rn(e, n)), 0);
|
|
1088
1126
|
return n[t] = r, r;
|
|
1089
1127
|
}
|
|
1090
|
-
function
|
|
1128
|
+
function Bn(e, t) {
|
|
1091
1129
|
let n = [], r = [], i = [], a = 0, o = 0, s = 0, c = 0;
|
|
1092
1130
|
for (let l = 0, u = t.length; l <= u; l += 2) {
|
|
1093
1131
|
let d = t[l];
|
|
@@ -1095,9 +1133,9 @@ function Ln(e, t) {
|
|
|
1095
1133
|
a = Math.max(a, o), i.push(o), o = 0, s += c, c = 0;
|
|
1096
1134
|
continue;
|
|
1097
1135
|
}
|
|
1098
|
-
let f = t[l + 1] || e.font, p =
|
|
1136
|
+
let f = t[l + 1] || e.font, p = Rn(f, d);
|
|
1099
1137
|
n.push(p), o += p;
|
|
1100
|
-
let m =
|
|
1138
|
+
let m = In(f);
|
|
1101
1139
|
r.push(m), c = Math.max(c, m);
|
|
1102
1140
|
}
|
|
1103
1141
|
return {
|
|
@@ -1108,17 +1146,23 @@ function Ln(e, t) {
|
|
|
1108
1146
|
lineWidths: i
|
|
1109
1147
|
};
|
|
1110
1148
|
}
|
|
1111
|
-
function
|
|
1112
|
-
e.save(), n !== 1 && (e.globalAlpha === void 0 ? e.globalAlpha = (e)
|
|
1149
|
+
function Vn(e, t, n, r, i, a, o, s, c, l, u) {
|
|
1150
|
+
e.save(), n !== 1 && (e.globalAlpha === void 0 ? e.globalAlpha = function(e) {
|
|
1151
|
+
return e.globalAlpha *= n;
|
|
1152
|
+
} : e.globalAlpha *= n), t && e.transform.apply(e, t), r.contextInstructions ? (e.translate(c, l), e.scale(u[0], u[1]), Hn(r, e)) : u[0] < 0 || u[1] < 0 ? (e.translate(c, l), e.scale(u[0], u[1]), e.drawImage(r, i, a, o, s, 0, 0, o, s)) : e.drawImage(r, i, a, o, s, c, l, o * u[0], s * u[1]), e.restore();
|
|
1113
1153
|
}
|
|
1114
|
-
function
|
|
1115
|
-
let n = e.contextInstructions;
|
|
1116
|
-
for (let e = 0,
|
|
1154
|
+
function Hn(e, t) {
|
|
1155
|
+
let n = t, r = e.contextInstructions;
|
|
1156
|
+
for (let e = 0, t = r.length; e < t; e += 2) if (Array.isArray(r[e + 1])) n[r[e]].apply(n, r[e + 1]);
|
|
1157
|
+
else {
|
|
1158
|
+
let t = r[e];
|
|
1159
|
+
n[t] = r[e + 1];
|
|
1160
|
+
}
|
|
1117
1161
|
}
|
|
1118
1162
|
// ../node_modules/ol/style/Image.js
|
|
1119
|
-
var
|
|
1163
|
+
var Un = class e {
|
|
1120
1164
|
constructor(e) {
|
|
1121
|
-
this.opacity_ = e.opacity, this.rotateWithView_ = e.rotateWithView, this.rotation_ = e.rotation, this.scale_ = e.scale, this.scaleArray_ =
|
|
1165
|
+
this.opacity_ = e.opacity, this.rotateWithView_ = e.rotateWithView, this.rotation_ = e.rotation, this.scale_ = e.scale, this.scaleArray_ = he(e.scale), this.displacement_ = e.displacement, this.declutterMode_ = e.declutterMode;
|
|
1122
1166
|
}
|
|
1123
1167
|
clone() {
|
|
1124
1168
|
let t = this.getScale();
|
|
@@ -1153,28 +1197,28 @@ var Bn = class e {
|
|
|
1153
1197
|
return this.declutterMode_;
|
|
1154
1198
|
}
|
|
1155
1199
|
getAnchor() {
|
|
1156
|
-
return
|
|
1200
|
+
return h();
|
|
1157
1201
|
}
|
|
1158
1202
|
getImage(e) {
|
|
1159
|
-
return
|
|
1203
|
+
return h();
|
|
1160
1204
|
}
|
|
1161
1205
|
getHitDetectionImage() {
|
|
1162
|
-
return
|
|
1206
|
+
return h();
|
|
1163
1207
|
}
|
|
1164
1208
|
getPixelRatio(e) {
|
|
1165
1209
|
return 1;
|
|
1166
1210
|
}
|
|
1167
1211
|
getImageState() {
|
|
1168
|
-
return
|
|
1212
|
+
return h();
|
|
1169
1213
|
}
|
|
1170
1214
|
getImageSize() {
|
|
1171
|
-
return
|
|
1215
|
+
return h();
|
|
1172
1216
|
}
|
|
1173
1217
|
getOrigin() {
|
|
1174
|
-
return
|
|
1218
|
+
return h();
|
|
1175
1219
|
}
|
|
1176
1220
|
getSize() {
|
|
1177
|
-
return
|
|
1221
|
+
return h();
|
|
1178
1222
|
}
|
|
1179
1223
|
setDisplacement(e) {
|
|
1180
1224
|
this.displacement_ = e;
|
|
@@ -1189,44 +1233,44 @@ var Bn = class e {
|
|
|
1189
1233
|
this.rotation_ = e;
|
|
1190
1234
|
}
|
|
1191
1235
|
setScale(e) {
|
|
1192
|
-
this.scale_ = e, this.scaleArray_ =
|
|
1236
|
+
this.scale_ = e, this.scaleArray_ = he(e);
|
|
1193
1237
|
}
|
|
1194
1238
|
listenImageChange(e) {
|
|
1195
|
-
|
|
1239
|
+
h();
|
|
1196
1240
|
}
|
|
1197
1241
|
load() {
|
|
1198
|
-
|
|
1242
|
+
h();
|
|
1199
1243
|
}
|
|
1200
1244
|
unlistenImageChange(e) {
|
|
1201
|
-
|
|
1245
|
+
h();
|
|
1202
1246
|
}
|
|
1203
1247
|
ready() {
|
|
1204
1248
|
return Promise.resolve();
|
|
1205
1249
|
}
|
|
1206
1250
|
};
|
|
1207
1251
|
// ../node_modules/ol/style/Icon.js
|
|
1208
|
-
function
|
|
1252
|
+
function Wn(e, t, n, r) {
|
|
1209
1253
|
return n !== void 0 && r !== void 0 ? [n / e, r / t] : n === void 0 ? r === void 0 ? 1 : r / t : n / e;
|
|
1210
1254
|
}
|
|
1211
|
-
var
|
|
1255
|
+
var Gn = class e extends Un {
|
|
1212
1256
|
constructor(e) {
|
|
1213
1257
|
e ||= {};
|
|
1214
|
-
let t = e.opacity === void 0 ? 1 : e.opacity, n = e.rotation === void 0 ? 0 : e.rotation,
|
|
1258
|
+
let t = e.opacity === void 0 ? 1 : e.opacity, n = e.rotation === void 0 ? 0 : e.rotation, r = e.scale === void 0 ? 1 : e.scale, i = e.rotateWithView !== void 0 && e.rotateWithView;
|
|
1215
1259
|
super({
|
|
1216
1260
|
opacity: t,
|
|
1217
1261
|
rotation: n,
|
|
1218
|
-
scale:
|
|
1262
|
+
scale: r,
|
|
1219
1263
|
displacement: e.displacement === void 0 ? [0, 0] : e.displacement,
|
|
1220
|
-
rotateWithView:
|
|
1264
|
+
rotateWithView: i,
|
|
1221
1265
|
declutterMode: e.declutterMode
|
|
1222
1266
|
}), this.anchor_ = e.anchor === void 0 ? [.5, .5] : e.anchor, this.normalizedAnchor_ = null, this.anchorOrigin_ = e.anchorOrigin === void 0 ? "top-left" : e.anchorOrigin, this.anchorXUnits_ = e.anchorXUnits === void 0 ? "fraction" : e.anchorXUnits, this.anchorYUnits_ = e.anchorYUnits === void 0 ? "fraction" : e.anchorYUnits, this.crossOrigin_ = e.crossOrigin === void 0 ? null : e.crossOrigin, this.referrerPolicy_ = e.referrerPolicy;
|
|
1223
|
-
let
|
|
1224
|
-
|
|
1225
|
-
let
|
|
1226
|
-
if (e.src === void 0 ?
|
|
1267
|
+
let a = e.img === void 0 ? null : e.img, o = e.src;
|
|
1268
|
+
T(!(o !== void 0 && a), "`image` and `src` cannot be provided at the same time"), (o === void 0 || o.length === 0) && a && (o = a.src || m(a)), T(o !== void 0 && o.length > 0, "A defined and non-empty `src` or `image` must be provided"), T(e.width === void 0 && e.height === void 0 || e.scale === void 0, "`width` or `height` cannot be provided together with `scale`");
|
|
1269
|
+
let s;
|
|
1270
|
+
if (e.src === void 0 ? a !== void 0 && (s = "complete" in a ? a.complete ? a.src ? C.LOADED : C.IDLE : C.LOADING : C.LOADED) : s = C.IDLE, this.color_ = e.color === void 0 ? null : Qe(e.color), this.iconImage_ = _n(a, o, {
|
|
1227
1271
|
crossOrigin: this.crossOrigin_,
|
|
1228
1272
|
referrerPolicy: this.referrerPolicy_
|
|
1229
|
-
},
|
|
1273
|
+
}, s, this.color_), this.offset_ = e.offset === void 0 ? [0, 0] : e.offset, this.offsetOrigin_ = e.offsetOrigin === void 0 ? "top-left" : e.offsetOrigin, this.origin_ = null, this.size_ = e.size === void 0 ? null : e.size, this.initialOptions_, e.width !== void 0 || e.height !== void 0) {
|
|
1230
1274
|
let t, n;
|
|
1231
1275
|
if (e.size) [t, n] = e.size;
|
|
1232
1276
|
else {
|
|
@@ -1237,13 +1281,13 @@ var Hn = class e extends Bn {
|
|
|
1237
1281
|
let t = () => {
|
|
1238
1282
|
if (this.unlistenImageChange(t), !this.initialOptions_) return;
|
|
1239
1283
|
let n = this.iconImage_.getSize();
|
|
1240
|
-
this.setScale(
|
|
1284
|
+
n && this.setScale(Wn(n[0], n[1], e.width, e.height));
|
|
1241
1285
|
};
|
|
1242
1286
|
this.listenImageChange(t);
|
|
1243
1287
|
return;
|
|
1244
1288
|
}
|
|
1245
1289
|
}
|
|
1246
|
-
t !== void 0 && this.setScale(
|
|
1290
|
+
t !== void 0 && this.setScale(Wn(t, n, e.width, e.height));
|
|
1247
1291
|
}
|
|
1248
1292
|
}
|
|
1249
1293
|
clone() {
|
|
@@ -1295,11 +1339,11 @@ var Hn = class e extends Bn {
|
|
|
1295
1339
|
return this.color_;
|
|
1296
1340
|
}
|
|
1297
1341
|
setColor(e) {
|
|
1298
|
-
let t = e ?
|
|
1342
|
+
let t = e ? Qe(e) : null;
|
|
1299
1343
|
if (this.color_ === t || this.color_ && t && this.color_.length === t.length && this.color_.every((e, n) => e === t[n])) return;
|
|
1300
1344
|
this.color_ = t;
|
|
1301
|
-
let n = this.getSrc(), r = n === void 0 ? this.getHitDetectionImage() : null, i = n === void 0 ? this.iconImage_.getImageState() :
|
|
1302
|
-
this.iconImage_ =
|
|
1345
|
+
let n = this.getSrc(), r = n === void 0 ? this.getHitDetectionImage() : null, i = n === void 0 ? this.iconImage_.getImageState() : C.IDLE;
|
|
1346
|
+
this.iconImage_ = _n(r, n, {
|
|
1303
1347
|
crossOrigin: this.crossOrigin_,
|
|
1304
1348
|
referrerPolicy: this.referrerPolicy_
|
|
1305
1349
|
}, i, this.color_);
|
|
@@ -1333,10 +1377,10 @@ var Hn = class e extends Bn {
|
|
|
1333
1377
|
return this.iconImage_.getSrc();
|
|
1334
1378
|
}
|
|
1335
1379
|
setSrc(e) {
|
|
1336
|
-
this.iconImage_ =
|
|
1380
|
+
this.iconImage_ = _n(null, e, {
|
|
1337
1381
|
crossOrigin: this.crossOrigin_,
|
|
1338
1382
|
referrerPolicy: this.referrerPolicy_
|
|
1339
|
-
},
|
|
1383
|
+
}, C.IDLE, this.color_);
|
|
1340
1384
|
}
|
|
1341
1385
|
getSize() {
|
|
1342
1386
|
return this.size_ ? this.size_ : this.iconImage_.getSize();
|
|
@@ -1344,64 +1388,73 @@ var Hn = class e extends Bn {
|
|
|
1344
1388
|
getWidth() {
|
|
1345
1389
|
let e = this.getScaleArray();
|
|
1346
1390
|
if (this.size_) return this.size_[0] * e[0];
|
|
1347
|
-
if (this.iconImage_.getImageState() ==
|
|
1391
|
+
if (this.iconImage_.getImageState() == C.LOADED) {
|
|
1392
|
+
let t = this.iconImage_.getSize();
|
|
1393
|
+
if (t) return t[0] * e[0];
|
|
1394
|
+
}
|
|
1348
1395
|
}
|
|
1349
1396
|
getHeight() {
|
|
1350
1397
|
let e = this.getScaleArray();
|
|
1351
1398
|
if (this.size_) return this.size_[1] * e[1];
|
|
1352
|
-
if (this.iconImage_.getImageState() ==
|
|
1399
|
+
if (this.iconImage_.getImageState() == C.LOADED) {
|
|
1400
|
+
let t = this.iconImage_.getSize();
|
|
1401
|
+
if (t) return t[1] * e[1];
|
|
1402
|
+
}
|
|
1353
1403
|
}
|
|
1354
1404
|
setScale(e) {
|
|
1355
1405
|
delete this.initialOptions_, super.setScale(e);
|
|
1356
1406
|
}
|
|
1357
1407
|
listenImageChange(e) {
|
|
1358
|
-
this.iconImage_.addEventListener(
|
|
1408
|
+
this.iconImage_.addEventListener(x.CHANGE, e);
|
|
1359
1409
|
}
|
|
1360
1410
|
load() {
|
|
1361
1411
|
this.iconImage_.load();
|
|
1362
1412
|
}
|
|
1363
1413
|
unlistenImageChange(e) {
|
|
1364
|
-
this.iconImage_.removeEventListener(
|
|
1414
|
+
this.iconImage_.removeEventListener(x.CHANGE, e);
|
|
1365
1415
|
}
|
|
1366
1416
|
ready() {
|
|
1367
1417
|
return this.iconImage_.ready();
|
|
1368
1418
|
}
|
|
1369
|
-
},
|
|
1370
|
-
[
|
|
1371
|
-
[
|
|
1372
|
-
[
|
|
1373
|
-
[
|
|
1374
|
-
[
|
|
1375
|
-
[
|
|
1376
|
-
},
|
|
1377
|
-
function
|
|
1378
|
-
return e in
|
|
1379
|
-
}
|
|
1380
|
-
function
|
|
1419
|
+
}, Kn = 0, j = 1 << Kn++, M = 1 << Kn++, N = 1 << Kn++, P = 1 << Kn++, F = 1 << Kn++, qn = 1 << Kn++, Jn = 2 ** Kn - 1, Yn = {
|
|
1420
|
+
[j]: "boolean",
|
|
1421
|
+
[M]: "number",
|
|
1422
|
+
[N]: "string",
|
|
1423
|
+
[P]: "color",
|
|
1424
|
+
[F]: "number[]",
|
|
1425
|
+
[qn]: "size"
|
|
1426
|
+
}, Xn = Object.keys(Yn).map(Number).sort(c);
|
|
1427
|
+
function Zn(e) {
|
|
1428
|
+
return e in Yn;
|
|
1429
|
+
}
|
|
1430
|
+
function I(e) {
|
|
1381
1431
|
let t = [];
|
|
1382
|
-
for (let n of
|
|
1432
|
+
for (let n of Xn) Qn(e, n) && t.push(Yn[n]);
|
|
1383
1433
|
return t.length === 0 ? "untyped" : t.length < 3 ? t.join(" or ") : t.slice(0, -1).join(", ") + ", or " + t[t.length - 1];
|
|
1384
1434
|
}
|
|
1385
|
-
function
|
|
1435
|
+
function Qn(e, t) {
|
|
1386
1436
|
return (e & t) === t;
|
|
1387
1437
|
}
|
|
1388
|
-
function
|
|
1438
|
+
function $n(e, t) {
|
|
1389
1439
|
return !!(e & t);
|
|
1390
1440
|
}
|
|
1391
|
-
function
|
|
1441
|
+
function L(e, t) {
|
|
1392
1442
|
return e === t;
|
|
1393
1443
|
}
|
|
1444
|
+
function R(e) {
|
|
1445
|
+
return e instanceof Error ? e.message : String(e);
|
|
1446
|
+
}
|
|
1394
1447
|
var z = class {
|
|
1395
1448
|
constructor(e, t) {
|
|
1396
|
-
if (!
|
|
1449
|
+
if (!Zn(e)) throw Error(`literal expressions must have a specific type, got ${I(e)}`);
|
|
1397
1450
|
this.type = e, this.value = t;
|
|
1398
1451
|
}
|
|
1399
|
-
},
|
|
1452
|
+
}, er = class {
|
|
1400
1453
|
constructor(e, t, ...n) {
|
|
1401
1454
|
this.type = e, this.operator = t, this.args = n;
|
|
1402
1455
|
}
|
|
1403
1456
|
};
|
|
1404
|
-
function
|
|
1457
|
+
function tr(e) {
|
|
1405
1458
|
return {
|
|
1406
1459
|
variables: /* @__PURE__ */ new Map(),
|
|
1407
1460
|
properties: /* @__PURE__ */ new Map(),
|
|
@@ -1415,36 +1468,36 @@ function Qn(e) {
|
|
|
1415
1468
|
function B(e, t, n) {
|
|
1416
1469
|
switch (typeof e) {
|
|
1417
1470
|
case "boolean":
|
|
1418
|
-
if (
|
|
1419
|
-
if (!
|
|
1420
|
-
return new z(
|
|
1471
|
+
if (L(t, N)) return new z(N, e ? "true" : "false");
|
|
1472
|
+
if (!Qn(t, j)) throw Error(`got a boolean, but expected ${I(t)}`);
|
|
1473
|
+
return new z(j, e);
|
|
1421
1474
|
case "number":
|
|
1422
|
-
if (
|
|
1423
|
-
if (
|
|
1424
|
-
if (
|
|
1425
|
-
if (!
|
|
1426
|
-
return new z(
|
|
1475
|
+
if (L(t, qn)) return new z(qn, he(e));
|
|
1476
|
+
if (L(t, j)) return new z(j, !!e);
|
|
1477
|
+
if (L(t, N)) return new z(N, e.toString());
|
|
1478
|
+
if (!Qn(t, M)) throw Error(`got a number, but expected ${I(t)}`);
|
|
1479
|
+
return new z(M, e);
|
|
1427
1480
|
case "string":
|
|
1428
|
-
if (
|
|
1429
|
-
if (
|
|
1430
|
-
if (!
|
|
1431
|
-
return new z(
|
|
1481
|
+
if (L(t, P)) return new z(P, Ke(e));
|
|
1482
|
+
if (L(t, j)) return new z(j, !!e);
|
|
1483
|
+
if (!Qn(t, N)) throw Error(`got a string, but expected ${I(t)}`);
|
|
1484
|
+
return new z(N, e);
|
|
1432
1485
|
}
|
|
1433
1486
|
if (!Array.isArray(e)) throw Error("expression must be an array or a primitive value");
|
|
1434
1487
|
if (e.length === 0) throw Error("empty expression");
|
|
1435
|
-
if (typeof e[0] == "string") return
|
|
1488
|
+
if (typeof e[0] == "string") return br(e, t, n);
|
|
1436
1489
|
for (let t of e) if (typeof t != "number") throw Error("expected an array of numbers");
|
|
1437
|
-
if (
|
|
1490
|
+
if (L(t, qn)) {
|
|
1438
1491
|
if (e.length !== 2) throw Error(`expected an array of two values for a size, got ${e.length}`);
|
|
1439
|
-
return new z(
|
|
1492
|
+
return new z(qn, e);
|
|
1440
1493
|
}
|
|
1441
|
-
if (
|
|
1442
|
-
if (e.length === 3) return new z(
|
|
1443
|
-
if (e.length === 4) return new z(
|
|
1494
|
+
if (L(t, P)) {
|
|
1495
|
+
if (e.length === 3) return new z(P, [...e, 1]);
|
|
1496
|
+
if (e.length === 4) return new z(P, e);
|
|
1444
1497
|
throw Error(`expected an array of 3 or 4 values for a color, got ${e.length}`);
|
|
1445
1498
|
}
|
|
1446
|
-
if (!
|
|
1447
|
-
return new z(
|
|
1499
|
+
if (!Qn(t, F)) throw Error(`got an array of numbers, but expected ${I(t)}`);
|
|
1500
|
+
return new z(F, e);
|
|
1448
1501
|
}
|
|
1449
1502
|
var V = {
|
|
1450
1503
|
Get: "get",
|
|
@@ -1482,6 +1535,7 @@ var V = {
|
|
|
1482
1535
|
Match: "match",
|
|
1483
1536
|
Between: "between",
|
|
1484
1537
|
Interpolate: "interpolate",
|
|
1538
|
+
InterpolateHcl: "interpolate-hcl",
|
|
1485
1539
|
Coalesce: "coalesce",
|
|
1486
1540
|
Case: "case",
|
|
1487
1541
|
In: "in",
|
|
@@ -1494,65 +1548,66 @@ var V = {
|
|
|
1494
1548
|
Palette: "palette",
|
|
1495
1549
|
ToString: "to-string",
|
|
1496
1550
|
Has: "has"
|
|
1497
|
-
},
|
|
1498
|
-
[V.Get]: W(H(1, Infinity),
|
|
1499
|
-
[V.Var]:
|
|
1500
|
-
[V.Has]: W(H(1, Infinity),
|
|
1501
|
-
[V.Id]: W(
|
|
1502
|
-
[V.Concat]: W(H(2, Infinity), U(
|
|
1503
|
-
[V.GeometryType]: W(
|
|
1504
|
-
[V.LineMetric]: W(
|
|
1505
|
-
[V.Resolution]: W(
|
|
1506
|
-
[V.Zoom]: W(
|
|
1507
|
-
[V.Time]: W(
|
|
1508
|
-
[V.Any]: W(H(2, Infinity), U(
|
|
1509
|
-
[V.All]: W(H(2, Infinity), U(
|
|
1510
|
-
[V.Not]: W(H(1, 1), U(
|
|
1511
|
-
[V.Equal]: W(H(2, 2),
|
|
1512
|
-
[V.NotEqual]: W(H(2, 2),
|
|
1513
|
-
[V.GreaterThan]: W(H(2, 2), U(
|
|
1514
|
-
[V.GreaterThanOrEqualTo]: W(H(2, 2), U(
|
|
1515
|
-
[V.LessThan]: W(H(2, 2), U(
|
|
1516
|
-
[V.LessThanOrEqualTo]: W(H(2, 2), U(
|
|
1517
|
-
[V.Multiply]: W(H(2, Infinity),
|
|
1518
|
-
[V.Coalesce]: W(H(2, Infinity),
|
|
1519
|
-
[V.Divide]: W(H(2, 2), U(
|
|
1520
|
-
[V.Add]: W(H(2, Infinity), U(
|
|
1521
|
-
[V.Subtract]: W(H(2, 2), U(
|
|
1522
|
-
[V.Clamp]: W(H(3, 3), U(
|
|
1523
|
-
[V.Mod]: W(H(2, 2), U(
|
|
1524
|
-
[V.Pow]: W(H(2, 2), U(
|
|
1525
|
-
[V.Abs]: W(H(1, 1), U(
|
|
1526
|
-
[V.Floor]: W(H(1, 1), U(
|
|
1527
|
-
[V.Ceil]: W(H(1, 1), U(
|
|
1528
|
-
[V.Round]: W(H(1, 1), U(
|
|
1529
|
-
[V.Sin]: W(H(1, 1), U(
|
|
1530
|
-
[V.Cos]: W(H(1, 1), U(
|
|
1531
|
-
[V.Atan]: W(H(1, 2), U(
|
|
1532
|
-
[V.Sqrt]: W(H(1, 1), U(
|
|
1533
|
-
[V.Match]: W(H(4, Infinity),
|
|
1534
|
-
[V.Between]: W(H(3, 3), U(
|
|
1535
|
-
[V.Interpolate]: W(H(6, Infinity),
|
|
1536
|
-
[V.
|
|
1537
|
-
[V.
|
|
1538
|
-
[V.
|
|
1539
|
-
[V.
|
|
1540
|
-
[V.
|
|
1541
|
-
[V.
|
|
1542
|
-
[V.
|
|
1543
|
-
[V.
|
|
1544
|
-
[V.
|
|
1551
|
+
}, nr = {
|
|
1552
|
+
[V.Get]: W(H(1, Infinity), rr),
|
|
1553
|
+
[V.Var]: ir(),
|
|
1554
|
+
[V.Has]: W(H(1, Infinity), rr),
|
|
1555
|
+
[V.Id]: W(ar, lr),
|
|
1556
|
+
[V.Concat]: W(H(2, Infinity), U(N)),
|
|
1557
|
+
[V.GeometryType]: W(or, lr),
|
|
1558
|
+
[V.LineMetric]: W(sr, lr),
|
|
1559
|
+
[V.Resolution]: W(cr, lr),
|
|
1560
|
+
[V.Zoom]: W(cr, lr),
|
|
1561
|
+
[V.Time]: W(cr, lr),
|
|
1562
|
+
[V.Any]: W(H(2, Infinity), U(j)),
|
|
1563
|
+
[V.All]: W(H(2, Infinity), U(j)),
|
|
1564
|
+
[V.Not]: W(H(1, 1), U(j)),
|
|
1565
|
+
[V.Equal]: W(H(2, 2), dr()),
|
|
1566
|
+
[V.NotEqual]: W(H(2, 2), dr()),
|
|
1567
|
+
[V.GreaterThan]: W(H(2, 2), U(M)),
|
|
1568
|
+
[V.GreaterThanOrEqualTo]: W(H(2, 2), U(M)),
|
|
1569
|
+
[V.LessThan]: W(H(2, 2), U(M)),
|
|
1570
|
+
[V.LessThanOrEqualTo]: W(H(2, 2), U(M)),
|
|
1571
|
+
[V.Multiply]: W(H(2, Infinity), ur),
|
|
1572
|
+
[V.Coalesce]: W(H(2, Infinity), ur),
|
|
1573
|
+
[V.Divide]: W(H(2, 2), U(M)),
|
|
1574
|
+
[V.Add]: W(H(2, Infinity), U(M)),
|
|
1575
|
+
[V.Subtract]: W(H(2, 2), U(M)),
|
|
1576
|
+
[V.Clamp]: W(H(3, 3), U(M)),
|
|
1577
|
+
[V.Mod]: W(H(2, 2), U(M)),
|
|
1578
|
+
[V.Pow]: W(H(2, 2), U(M)),
|
|
1579
|
+
[V.Abs]: W(H(1, 1), U(M)),
|
|
1580
|
+
[V.Floor]: W(H(1, 1), U(M)),
|
|
1581
|
+
[V.Ceil]: W(H(1, 1), U(M)),
|
|
1582
|
+
[V.Round]: W(H(1, 1), U(M)),
|
|
1583
|
+
[V.Sin]: W(H(1, 1), U(M)),
|
|
1584
|
+
[V.Cos]: W(H(1, 1), U(M)),
|
|
1585
|
+
[V.Atan]: W(H(1, 2), U(M)),
|
|
1586
|
+
[V.Sqrt]: W(H(1, 1), U(M)),
|
|
1587
|
+
[V.Match]: W(H(4, Infinity), pr, mr),
|
|
1588
|
+
[V.Between]: W(H(3, 3), U(M)),
|
|
1589
|
+
[V.Interpolate]: W(H(6, Infinity), pr, gr),
|
|
1590
|
+
[V.InterpolateHcl]: W(H(6, Infinity), pr, hr, gr),
|
|
1591
|
+
[V.Case]: W(H(3, Infinity), fr, _r),
|
|
1592
|
+
[V.In]: W(H(2, 2), vr),
|
|
1593
|
+
[V.Number]: W(H(1, Infinity), U(Jn)),
|
|
1594
|
+
[V.String]: W(H(1, Infinity), U(Jn)),
|
|
1595
|
+
[V.Array]: W(H(1, Infinity), U(M)),
|
|
1596
|
+
[V.Color]: W(H(1, 4), U(M)),
|
|
1597
|
+
[V.Band]: W(H(1, 3), U(M)),
|
|
1598
|
+
[V.Palette]: W(H(2, 2), yr),
|
|
1599
|
+
[V.ToString]: W(H(1, 1), U(j | M | N | P))
|
|
1545
1600
|
};
|
|
1546
|
-
function
|
|
1601
|
+
function rr(e, t, n) {
|
|
1547
1602
|
let r = e.length - 1, i = Array(r);
|
|
1548
1603
|
for (let a = 0; a < r; ++a) {
|
|
1549
1604
|
let r = e[a + 1];
|
|
1550
1605
|
switch (typeof r) {
|
|
1551
1606
|
case "number":
|
|
1552
|
-
i[a] = new z(
|
|
1607
|
+
i[a] = new z(M, r);
|
|
1553
1608
|
break;
|
|
1554
1609
|
case "string":
|
|
1555
|
-
i[a] = new z(
|
|
1610
|
+
i[a] = new z(N, r);
|
|
1556
1611
|
break;
|
|
1557
1612
|
default: throw Error(`expected a string key or numeric array index for a get operation, got ${r}`);
|
|
1558
1613
|
}
|
|
@@ -1560,37 +1615,37 @@ function er(e, t, n) {
|
|
|
1560
1615
|
}
|
|
1561
1616
|
return i;
|
|
1562
1617
|
}
|
|
1563
|
-
function
|
|
1618
|
+
function ir() {
|
|
1564
1619
|
return function(e, t, n) {
|
|
1565
1620
|
let r = e[1];
|
|
1566
1621
|
if (typeof r != "string") throw Error("expected a string argument for var operation");
|
|
1567
1622
|
let i = t, a = n.inputVariables?.[r];
|
|
1568
1623
|
if (a !== void 0) {
|
|
1569
|
-
let e = B(a,
|
|
1624
|
+
let e = B(a, Jn, n);
|
|
1570
1625
|
if (!(e instanceof z)) throw Error(`style variables should only be literal values (no expressions!), variable name: ${r}`);
|
|
1571
1626
|
let o = e.type;
|
|
1572
|
-
if (typeof a == "string" &&
|
|
1627
|
+
if (typeof a == "string" && $n(i, P) && !$n(i, N) ? o = P : Array.isArray(a) && a.length === 2 && $n(i, qn) && !$n(i, F) && (o = qn), i &= o, i === 0) throw Error(`the type expected from the var operator (${I(t)}) did not have any overlap with the type of the corresponding style variables (${I(o)}), variable name: ${r}`);
|
|
1573
1628
|
}
|
|
1574
1629
|
if (n.variables.has(r)) {
|
|
1575
1630
|
let e = n.variables.get(r);
|
|
1576
|
-
if (i &= e, i === 0) throw Error(`a new type expected from the var operator (${
|
|
1631
|
+
if (i &= e, i === 0) throw Error(`a new type expected from the var operator (${I(t)}) did not have any overlap with the previous type expected for it (${I(e)}), variable name: ${r}`);
|
|
1577
1632
|
}
|
|
1578
|
-
return n.variables.set(r, i), new
|
|
1633
|
+
return n.variables.set(r, i), new er(i, "var", new z(N, r));
|
|
1579
1634
|
};
|
|
1580
1635
|
}
|
|
1581
|
-
function
|
|
1636
|
+
function ar(e, t, n) {
|
|
1582
1637
|
n.featureId = !0;
|
|
1583
1638
|
}
|
|
1584
|
-
function
|
|
1639
|
+
function or(e, t, n) {
|
|
1585
1640
|
n.geometryType = !0;
|
|
1586
1641
|
}
|
|
1587
|
-
function
|
|
1642
|
+
function sr(e, t, n) {
|
|
1588
1643
|
n.mCoordinate = !0;
|
|
1589
1644
|
}
|
|
1590
|
-
function
|
|
1645
|
+
function cr(e, t, n) {
|
|
1591
1646
|
n.mapState = !0;
|
|
1592
1647
|
}
|
|
1593
|
-
function
|
|
1648
|
+
function lr(e, t, n) {
|
|
1594
1649
|
let r = e[0];
|
|
1595
1650
|
if (e.length !== 1) throw Error(`expected no arguments for ${r} operation`);
|
|
1596
1651
|
return [];
|
|
@@ -1606,7 +1661,7 @@ function H(e, t) {
|
|
|
1606
1661
|
}
|
|
1607
1662
|
};
|
|
1608
1663
|
}
|
|
1609
|
-
function
|
|
1664
|
+
function ur(e, t, n) {
|
|
1610
1665
|
let r = e.length - 1, i = Array(r);
|
|
1611
1666
|
for (let a = 0; a < r; ++a) {
|
|
1612
1667
|
let r = B(e[a + 1], t, n);
|
|
@@ -1624,9 +1679,9 @@ function U(e) {
|
|
|
1624
1679
|
return a;
|
|
1625
1680
|
};
|
|
1626
1681
|
}
|
|
1627
|
-
function
|
|
1682
|
+
function dr() {
|
|
1628
1683
|
return function(e, t, n) {
|
|
1629
|
-
let r = e[0], i = e.length - 1, a = Array(i), o =
|
|
1684
|
+
let r = e[0], i = e.length - 1, a = Array(i), o = Jn;
|
|
1630
1685
|
for (let t = 0; t < i; ++t) {
|
|
1631
1686
|
let r = B(e[t + 1], o, n);
|
|
1632
1687
|
o &= r.type;
|
|
@@ -1639,22 +1694,23 @@ function cr() {
|
|
|
1639
1694
|
return a;
|
|
1640
1695
|
};
|
|
1641
1696
|
}
|
|
1642
|
-
function
|
|
1697
|
+
function fr(e, t, n) {
|
|
1643
1698
|
let r = e[0], i = e.length - 1;
|
|
1644
1699
|
if (i % 2 == 0) throw Error(`expected an odd number of arguments for ${r}, got ${i} instead`);
|
|
1645
1700
|
}
|
|
1646
|
-
function
|
|
1701
|
+
function pr(e, t, n) {
|
|
1647
1702
|
let r = e[0], i = e.length - 1;
|
|
1648
1703
|
if (i % 2 == 1) throw Error(`expected an even number of arguments for operation ${r}, got ${i} instead`);
|
|
1649
1704
|
}
|
|
1650
|
-
function
|
|
1651
|
-
let r = e.length - 1, i = B(e[e.length - 1], t, n), a =
|
|
1705
|
+
function mr(e, t, n) {
|
|
1706
|
+
let r = e.length - 1, i = B(e[e.length - 1], t, n), a = N | M | j, o = Array(r - 2);
|
|
1652
1707
|
for (let t = 0; t < r - 2; t += 2) {
|
|
1653
1708
|
try {
|
|
1654
1709
|
let r = B(e[t + 2], a, n);
|
|
1655
1710
|
a &= r.type;
|
|
1656
1711
|
} catch (e) {
|
|
1657
|
-
|
|
1712
|
+
let n = R(e);
|
|
1713
|
+
throw Error(`failed to parse argument ${t + 1} of match expression: ${n}`);
|
|
1658
1714
|
}
|
|
1659
1715
|
if (a === 0) throw Error("no common type was found among the arguments of match expression");
|
|
1660
1716
|
}
|
|
@@ -1663,13 +1719,14 @@ function dr(e, t, n) {
|
|
|
1663
1719
|
let r = B(e[t + 2], a, n);
|
|
1664
1720
|
o[t] = r;
|
|
1665
1721
|
} catch (e) {
|
|
1666
|
-
|
|
1722
|
+
let n = R(e);
|
|
1723
|
+
throw Error(`failed to parse argument ${t + 1} of match expression: ${n}`);
|
|
1667
1724
|
}
|
|
1668
1725
|
try {
|
|
1669
1726
|
let r = B(e[t + 3], i.type, n);
|
|
1670
1727
|
o[t + 1] = r;
|
|
1671
1728
|
} catch (e) {
|
|
1672
|
-
throw Error(`failed to parse argument ${t + 2} of match expression: ${e
|
|
1729
|
+
throw Error(`failed to parse argument ${t + 2} of match expression: ${R(e)}`);
|
|
1673
1730
|
}
|
|
1674
1731
|
}
|
|
1675
1732
|
return [
|
|
@@ -1678,7 +1735,10 @@ function dr(e, t, n) {
|
|
|
1678
1735
|
i
|
|
1679
1736
|
];
|
|
1680
1737
|
}
|
|
1681
|
-
function
|
|
1738
|
+
function hr(e, t, n) {
|
|
1739
|
+
if (!Qn(t, P)) throw Error(`the ${e[0]} operator can only return a color, got ${I(t)}`);
|
|
1740
|
+
}
|
|
1741
|
+
function gr(e, t, n) {
|
|
1682
1742
|
let r = e[1], i;
|
|
1683
1743
|
switch (r[0]) {
|
|
1684
1744
|
case "linear":
|
|
@@ -1691,25 +1751,25 @@ function fr(e, t, n) {
|
|
|
1691
1751
|
break;
|
|
1692
1752
|
default: throw Error(`invalid interpolation type: ${JSON.stringify(r)}`);
|
|
1693
1753
|
}
|
|
1694
|
-
let a = new z(
|
|
1754
|
+
let a = new z(M, i), o;
|
|
1695
1755
|
try {
|
|
1696
|
-
o = B(e[2],
|
|
1756
|
+
o = B(e[2], M, n);
|
|
1697
1757
|
} catch (e) {
|
|
1698
|
-
throw Error(`failed to parse argument 1 in interpolate expression: ${e
|
|
1758
|
+
throw Error(`failed to parse argument 1 in interpolate expression: ${R(e)}`);
|
|
1699
1759
|
}
|
|
1700
1760
|
let s = Array(e.length - 3);
|
|
1701
1761
|
for (let r = 0; r < s.length; r += 2) {
|
|
1702
1762
|
try {
|
|
1703
|
-
let t = B(e[r + 3],
|
|
1763
|
+
let t = B(e[r + 3], M, n);
|
|
1704
1764
|
s[r] = t;
|
|
1705
1765
|
} catch (e) {
|
|
1706
|
-
throw Error(`failed to parse argument ${r + 2} for interpolate expression: ${e
|
|
1766
|
+
throw Error(`failed to parse argument ${r + 2} for interpolate expression: ${R(e)}`);
|
|
1707
1767
|
}
|
|
1708
1768
|
try {
|
|
1709
1769
|
let i = B(e[r + 4], t, n);
|
|
1710
1770
|
s[r + 1] = i;
|
|
1711
1771
|
} catch (e) {
|
|
1712
|
-
throw Error(`failed to parse argument ${r + 3} for interpolate expression: ${e
|
|
1772
|
+
throw Error(`failed to parse argument ${r + 3} for interpolate expression: ${R(e)}`);
|
|
1713
1773
|
}
|
|
1714
1774
|
}
|
|
1715
1775
|
return [
|
|
@@ -1718,47 +1778,47 @@ function fr(e, t, n) {
|
|
|
1718
1778
|
...s
|
|
1719
1779
|
];
|
|
1720
1780
|
}
|
|
1721
|
-
function
|
|
1781
|
+
function _r(e, t, n) {
|
|
1722
1782
|
let r = B(e[e.length - 1], t, n), i = Array(e.length - 1);
|
|
1723
1783
|
for (let t = 0; t < i.length - 1; t += 2) {
|
|
1724
1784
|
try {
|
|
1725
|
-
let r = B(e[t + 1],
|
|
1785
|
+
let r = B(e[t + 1], j, n);
|
|
1726
1786
|
i[t] = r;
|
|
1727
1787
|
} catch (e) {
|
|
1728
|
-
throw Error(`failed to parse argument ${t} of case expression: ${e
|
|
1788
|
+
throw Error(`failed to parse argument ${t} of case expression: ${R(e)}`);
|
|
1729
1789
|
}
|
|
1730
1790
|
try {
|
|
1731
1791
|
let a = B(e[t + 2], r.type, n);
|
|
1732
1792
|
i[t + 1] = a;
|
|
1733
1793
|
} catch (e) {
|
|
1734
|
-
throw Error(`failed to parse argument ${t + 1} of case expression: ${e
|
|
1794
|
+
throw Error(`failed to parse argument ${t + 1} of case expression: ${R(e)}`);
|
|
1735
1795
|
}
|
|
1736
1796
|
}
|
|
1737
1797
|
return i[i.length - 1] = r, i;
|
|
1738
1798
|
}
|
|
1739
|
-
function
|
|
1799
|
+
function vr(e, t, n) {
|
|
1740
1800
|
let r = e[2];
|
|
1741
1801
|
if (!Array.isArray(r)) throw Error("the second argument for the \"in\" operator must be an array");
|
|
1742
1802
|
let i;
|
|
1743
1803
|
if (r[0] === "literal") {
|
|
1744
1804
|
if (r = r[1], !Array.isArray(r)) throw Error("failed to parse \"in\" expression: the literal operator must be followed by an array");
|
|
1745
1805
|
} else if (typeof r[0] == "string") throw Error("for the \"in\" operator, a string array should be wrapped in a \"literal\" operator to disambiguate from expressions");
|
|
1746
|
-
i = typeof r[0] == "string" ?
|
|
1806
|
+
i = typeof r[0] == "string" ? N : M;
|
|
1747
1807
|
let a = Array(r.length);
|
|
1748
1808
|
for (let e = 0; e < a.length; e++) try {
|
|
1749
1809
|
let t = B(r[e], i, n);
|
|
1750
1810
|
a[e] = t;
|
|
1751
1811
|
} catch (t) {
|
|
1752
|
-
throw Error(`failed to parse haystack item ${e} for "in" expression: ${t
|
|
1812
|
+
throw Error(`failed to parse haystack item ${e} for "in" expression: ${R(t)}`);
|
|
1753
1813
|
}
|
|
1754
1814
|
return [B(e[1], i, n), ...a];
|
|
1755
1815
|
}
|
|
1756
|
-
function
|
|
1816
|
+
function yr(e, t, n) {
|
|
1757
1817
|
let r;
|
|
1758
1818
|
try {
|
|
1759
|
-
r = B(e[1],
|
|
1819
|
+
r = B(e[1], M, n);
|
|
1760
1820
|
} catch (e) {
|
|
1761
|
-
throw Error(`failed to parse first argument in palette expression: ${e
|
|
1821
|
+
throw Error(`failed to parse first argument in palette expression: ${R(e)}`);
|
|
1762
1822
|
}
|
|
1763
1823
|
let i = e[2];
|
|
1764
1824
|
if (!Array.isArray(i)) throw Error("the second argument of palette must be an array");
|
|
@@ -1766,9 +1826,9 @@ function hr(e, t, n) {
|
|
|
1766
1826
|
for (let e = 0; e < a.length; e++) {
|
|
1767
1827
|
let t;
|
|
1768
1828
|
try {
|
|
1769
|
-
t = B(i[e],
|
|
1829
|
+
t = B(i[e], P, n);
|
|
1770
1830
|
} catch (t) {
|
|
1771
|
-
throw Error(`failed to parse color at index ${e} in palette expression: ${t
|
|
1831
|
+
throw Error(`failed to parse color at index ${e} in palette expression: ${R(t)}`);
|
|
1772
1832
|
}
|
|
1773
1833
|
if (!(t instanceof z)) throw Error(`the palette color at index ${e} must be a literal value`);
|
|
1774
1834
|
a[e] = t;
|
|
@@ -1777,7 +1837,7 @@ function hr(e, t, n) {
|
|
|
1777
1837
|
}
|
|
1778
1838
|
function W(...e) {
|
|
1779
1839
|
return function(t, n, r) {
|
|
1780
|
-
let i = t[0], a;
|
|
1840
|
+
let i = t[0], a = [];
|
|
1781
1841
|
for (let i = 0; i < e.length; i++) {
|
|
1782
1842
|
let o = e[i](t, n, r);
|
|
1783
1843
|
if (i == e.length - 1) {
|
|
@@ -1785,15 +1845,15 @@ function W(...e) {
|
|
|
1785
1845
|
a = o;
|
|
1786
1846
|
}
|
|
1787
1847
|
}
|
|
1788
|
-
return new
|
|
1848
|
+
return new er(n, i, ...a);
|
|
1789
1849
|
};
|
|
1790
1850
|
}
|
|
1791
|
-
function
|
|
1792
|
-
let r = e[0], i =
|
|
1851
|
+
function br(e, t, n) {
|
|
1852
|
+
let r = e[0], i = nr[r];
|
|
1793
1853
|
if (!i) throw Error(`unknown operator: ${r}`);
|
|
1794
1854
|
return i(e, t, n);
|
|
1795
1855
|
}
|
|
1796
|
-
function
|
|
1856
|
+
function xr(e) {
|
|
1797
1857
|
if (!e) return "";
|
|
1798
1858
|
let t = e.getType();
|
|
1799
1859
|
switch (t) {
|
|
@@ -1804,12 +1864,12 @@ function _r(e) {
|
|
|
1804
1864
|
case "MultiLineString":
|
|
1805
1865
|
case "MultiPolygon": return t.substring(5);
|
|
1806
1866
|
case "Circle": return "Polygon";
|
|
1807
|
-
case "GeometryCollection": return
|
|
1867
|
+
case "GeometryCollection": return xr(e.getGeometries()[0]);
|
|
1808
1868
|
default: return "";
|
|
1809
1869
|
}
|
|
1810
1870
|
}
|
|
1811
1871
|
// ../node_modules/ol/expr/cpu.js
|
|
1812
|
-
function
|
|
1872
|
+
function Sr() {
|
|
1813
1873
|
return {
|
|
1814
1874
|
variables: {},
|
|
1815
1875
|
properties: {},
|
|
@@ -1823,8 +1883,8 @@ function G(e, t, n) {
|
|
|
1823
1883
|
}
|
|
1824
1884
|
function K(e, t) {
|
|
1825
1885
|
if (e instanceof z) {
|
|
1826
|
-
if (e.type ===
|
|
1827
|
-
let t =
|
|
1886
|
+
if (e.type === P && typeof e.value == "string") {
|
|
1887
|
+
let t = Ke(e.value);
|
|
1828
1888
|
return function() {
|
|
1829
1889
|
return t;
|
|
1830
1890
|
};
|
|
@@ -1837,28 +1897,28 @@ function K(e, t) {
|
|
|
1837
1897
|
switch (n) {
|
|
1838
1898
|
case V.Number:
|
|
1839
1899
|
case V.String:
|
|
1840
|
-
case V.Coalesce: return
|
|
1900
|
+
case V.Coalesce: return Tr(e, t);
|
|
1841
1901
|
case V.Get:
|
|
1842
1902
|
case V.Var:
|
|
1843
|
-
case V.Has: return
|
|
1844
|
-
case V.Id: return (e) => e.featureId;
|
|
1903
|
+
case V.Has: return Er(e, t);
|
|
1904
|
+
case V.Id: return (e) => e.featureId ?? "";
|
|
1845
1905
|
case V.GeometryType: return (e) => e.geometryType;
|
|
1846
1906
|
case V.Concat: {
|
|
1847
1907
|
let n = e.args.map((e) => K(e, t));
|
|
1848
|
-
return (e) => "".concat(...n.map((t) => t(e).toString()));
|
|
1908
|
+
return (e) => "".concat(...n.map((t) => (t(e) ?? "").toString()));
|
|
1849
1909
|
}
|
|
1850
1910
|
case V.Resolution: return (e) => e.resolution;
|
|
1851
1911
|
case V.Any:
|
|
1852
1912
|
case V.All:
|
|
1853
1913
|
case V.Between:
|
|
1854
1914
|
case V.In:
|
|
1855
|
-
case V.Not: return
|
|
1915
|
+
case V.Not: return Or(e, t);
|
|
1856
1916
|
case V.Equal:
|
|
1857
1917
|
case V.NotEqual:
|
|
1858
1918
|
case V.LessThan:
|
|
1859
1919
|
case V.LessThanOrEqualTo:
|
|
1860
1920
|
case V.GreaterThan:
|
|
1861
|
-
case V.GreaterThanOrEqualTo: return
|
|
1921
|
+
case V.GreaterThanOrEqualTo: return Dr(e, t);
|
|
1862
1922
|
case V.Multiply:
|
|
1863
1923
|
case V.Divide:
|
|
1864
1924
|
case V.Add:
|
|
@@ -1873,15 +1933,59 @@ function K(e, t) {
|
|
|
1873
1933
|
case V.Sin:
|
|
1874
1934
|
case V.Cos:
|
|
1875
1935
|
case V.Atan:
|
|
1876
|
-
case V.Sqrt: return
|
|
1877
|
-
case V.Case: return
|
|
1878
|
-
case V.Match: return
|
|
1879
|
-
case V.Interpolate:
|
|
1880
|
-
case V.
|
|
1936
|
+
case V.Sqrt: return kr(e, t);
|
|
1937
|
+
case V.Case: return Ar(e, t);
|
|
1938
|
+
case V.Match: return jr(e, t);
|
|
1939
|
+
case V.Interpolate:
|
|
1940
|
+
case V.InterpolateHcl: return Mr(e, t);
|
|
1941
|
+
case V.ToString: return Nr(e, t);
|
|
1942
|
+
case V.Array: return Cr(e, t);
|
|
1943
|
+
case V.Color: return wr(e, t);
|
|
1881
1944
|
default: throw Error(`Unsupported operator ${n}`);
|
|
1882
1945
|
}
|
|
1883
1946
|
}
|
|
1884
|
-
function
|
|
1947
|
+
function Cr(e, t) {
|
|
1948
|
+
let n = e.args.length, r = Array(n);
|
|
1949
|
+
for (let i = 0; i < n; ++i) r[i] = K(e.args[i], t);
|
|
1950
|
+
if (e.type === P && (n === 3 || n === 4)) {
|
|
1951
|
+
let e = n === 4 ? r[3] : null;
|
|
1952
|
+
return (t) => [
|
|
1953
|
+
r[0](t) * 255,
|
|
1954
|
+
r[1](t) * 255,
|
|
1955
|
+
r[2](t) * 255,
|
|
1956
|
+
e ? e(t) : 1
|
|
1957
|
+
];
|
|
1958
|
+
}
|
|
1959
|
+
return (e) => {
|
|
1960
|
+
let t = Array(n);
|
|
1961
|
+
for (let i = 0; i < n; ++i) t[i] = r[i](e);
|
|
1962
|
+
return t;
|
|
1963
|
+
};
|
|
1964
|
+
}
|
|
1965
|
+
function wr(e, t) {
|
|
1966
|
+
let n = e.args.length, r = Array(n);
|
|
1967
|
+
for (let i = 0; i < n; ++i) r[i] = K(e.args[i], t);
|
|
1968
|
+
if (n < 3) {
|
|
1969
|
+
let e = n === 2 ? r[1] : null;
|
|
1970
|
+
return (t) => {
|
|
1971
|
+
let n = r[0](t);
|
|
1972
|
+
return [
|
|
1973
|
+
n,
|
|
1974
|
+
n,
|
|
1975
|
+
n,
|
|
1976
|
+
e ? e(t) : 1
|
|
1977
|
+
];
|
|
1978
|
+
};
|
|
1979
|
+
}
|
|
1980
|
+
let i = n === 4 ? r[3] : null;
|
|
1981
|
+
return (e) => [
|
|
1982
|
+
r[0](e),
|
|
1983
|
+
r[1](e),
|
|
1984
|
+
r[2](e),
|
|
1985
|
+
i ? i(e) : 1
|
|
1986
|
+
];
|
|
1987
|
+
}
|
|
1988
|
+
function Tr(e, t) {
|
|
1885
1989
|
let n = e.operator, r = e.args.length, i = Array(r);
|
|
1886
1990
|
for (let n = 0; n < r; ++n) i[n] = K(e.args[n], t);
|
|
1887
1991
|
switch (n) {
|
|
@@ -1903,7 +2007,7 @@ function yr(e, t) {
|
|
|
1903
2007
|
default: throw Error(`Unsupported assertion operator ${n}`);
|
|
1904
2008
|
}
|
|
1905
2009
|
}
|
|
1906
|
-
function
|
|
2010
|
+
function Er(e, t) {
|
|
1907
2011
|
let n = e.args[0].value;
|
|
1908
2012
|
switch (e.operator) {
|
|
1909
2013
|
case V.Get: return (t) => {
|
|
@@ -1929,7 +2033,7 @@ function br(e, t) {
|
|
|
1929
2033
|
default: throw Error(`Unsupported accessor operator ${e.operator}`);
|
|
1930
2034
|
}
|
|
1931
2035
|
}
|
|
1932
|
-
function
|
|
2036
|
+
function Dr(e, t) {
|
|
1933
2037
|
let n = e.operator, r = K(e.args[0], t), i = K(e.args[1], t);
|
|
1934
2038
|
switch (n) {
|
|
1935
2039
|
case V.Equal: return (e) => r(e) === i(e);
|
|
@@ -1941,7 +2045,7 @@ function xr(e, t) {
|
|
|
1941
2045
|
default: throw Error(`Unsupported comparison operator ${n}`);
|
|
1942
2046
|
}
|
|
1943
2047
|
}
|
|
1944
|
-
function
|
|
2048
|
+
function Or(e, t) {
|
|
1945
2049
|
let n = e.operator, r = e.args.length, i = Array(r);
|
|
1946
2050
|
for (let n = 0; n < r; ++n) i[n] = K(e.args[n], t);
|
|
1947
2051
|
switch (n) {
|
|
@@ -1966,7 +2070,7 @@ function Sr(e, t) {
|
|
|
1966
2070
|
default: throw Error(`Unsupported logical operator ${n}`);
|
|
1967
2071
|
}
|
|
1968
2072
|
}
|
|
1969
|
-
function
|
|
2073
|
+
function kr(e, t) {
|
|
1970
2074
|
let n = e.operator, r = e.args.length, i = Array(r);
|
|
1971
2075
|
for (let n = 0; n < r; ++n) i[n] = K(e.args[n], t);
|
|
1972
2076
|
switch (n) {
|
|
@@ -2001,7 +2105,7 @@ function Cr(e, t) {
|
|
|
2001
2105
|
default: throw Error(`Unsupported numeric operator ${n}`);
|
|
2002
2106
|
}
|
|
2003
2107
|
}
|
|
2004
|
-
function
|
|
2108
|
+
function Ar(e, t) {
|
|
2005
2109
|
let n = e.args.length, r = Array(n);
|
|
2006
2110
|
for (let i = 0; i < n; ++i) r[i] = K(e.args[i], t);
|
|
2007
2111
|
return (e) => {
|
|
@@ -2009,7 +2113,7 @@ function wr(e, t) {
|
|
|
2009
2113
|
return r[n - 1](e);
|
|
2010
2114
|
};
|
|
2011
2115
|
}
|
|
2012
|
-
function
|
|
2116
|
+
function jr(e, t) {
|
|
2013
2117
|
let n = e.args.length, r = Array(n);
|
|
2014
2118
|
for (let i = 0; i < n; ++i) r[i] = K(e.args[i], t);
|
|
2015
2119
|
return (e) => {
|
|
@@ -2018,50 +2122,59 @@ function Tr(e, t) {
|
|
|
2018
2122
|
return r[n - 1](e);
|
|
2019
2123
|
};
|
|
2020
2124
|
}
|
|
2021
|
-
function
|
|
2125
|
+
function Mr(e, t) {
|
|
2022
2126
|
let n = e.args.length, r = Array(n);
|
|
2023
2127
|
for (let i = 0; i < n; ++i) r[i] = K(e.args[i], t);
|
|
2128
|
+
let i = e.operator === V.InterpolateHcl ? Fr : Pr;
|
|
2024
2129
|
return (e) => {
|
|
2025
|
-
let t = r[0](e),
|
|
2026
|
-
for (let
|
|
2027
|
-
let n = r[
|
|
2028
|
-
if (
|
|
2029
|
-
|
|
2130
|
+
let t = r[0](e), a = r[1](e), o, s;
|
|
2131
|
+
for (let c = 2; c < n; c += 2) {
|
|
2132
|
+
let n = r[c](e), l = r[c + 1](e), u = Array.isArray(l);
|
|
2133
|
+
if (u && (l = Je(l)), n >= a) return c === 2 ? l : u ? i(t, a, o, s, n, l) : q(t, a, o, s, n, l);
|
|
2134
|
+
o = n, s = l;
|
|
2030
2135
|
}
|
|
2031
|
-
return
|
|
2136
|
+
return s;
|
|
2032
2137
|
};
|
|
2033
2138
|
}
|
|
2034
|
-
function
|
|
2139
|
+
function Nr(e, t) {
|
|
2035
2140
|
let n = e.operator, r = e.args.length, i = Array(r);
|
|
2036
2141
|
for (let n = 0; n < r; ++n) i[n] = K(e.args[n], t);
|
|
2037
2142
|
switch (n) {
|
|
2038
2143
|
case V.ToString: return (t) => {
|
|
2039
2144
|
let n = i[0](t);
|
|
2040
|
-
return e.args[0].type ===
|
|
2145
|
+
return e.args[0].type === P ? qe(n) : n.toString();
|
|
2041
2146
|
};
|
|
2042
2147
|
default: throw Error(`Unsupported convert operator ${n}`);
|
|
2043
2148
|
}
|
|
2044
2149
|
}
|
|
2045
|
-
function
|
|
2150
|
+
function q(e, t, n, r, i, a) {
|
|
2046
2151
|
let o = i - n;
|
|
2047
2152
|
if (o === 0) return r;
|
|
2048
2153
|
let s = t - n;
|
|
2049
2154
|
return r + (e === 1 ? s / o : (e ** +s - 1) / (e ** +o - 1)) * (a - r);
|
|
2050
2155
|
}
|
|
2051
|
-
function
|
|
2156
|
+
function Pr(e, t, n, r, i, a) {
|
|
2157
|
+
return i - n === 0 ? r : [
|
|
2158
|
+
q(e, t, n, r[0], i, a[0]),
|
|
2159
|
+
q(e, t, n, r[1], i, a[1]),
|
|
2160
|
+
q(e, t, n, r[2], i, a[2]),
|
|
2161
|
+
q(e, t, n, r[3], i, a[3])
|
|
2162
|
+
];
|
|
2163
|
+
}
|
|
2164
|
+
function Fr(e, t, n, r, i, a) {
|
|
2052
2165
|
if (i - n === 0) return r;
|
|
2053
|
-
let o =
|
|
2166
|
+
let o = rt(r), s = rt(a), c = s[2] - o[2];
|
|
2054
2167
|
c > 180 ? c -= 360 : c < -180 && (c += 360);
|
|
2055
2168
|
let l = [
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
o[2] +
|
|
2059
|
-
|
|
2169
|
+
q(e, t, n, o[0], i, s[0]),
|
|
2170
|
+
q(e, t, n, o[1], i, s[1]),
|
|
2171
|
+
o[2] + q(e, t, n, 0, i, c),
|
|
2172
|
+
q(e, t, n, r[3], i, a[3])
|
|
2060
2173
|
];
|
|
2061
|
-
return
|
|
2174
|
+
return Xe(l);
|
|
2062
2175
|
}
|
|
2063
2176
|
// ../node_modules/ol/style/RegularShape.js
|
|
2064
|
-
var
|
|
2177
|
+
var Ir = class e extends Un {
|
|
2065
2178
|
constructor(e) {
|
|
2066
2179
|
super({
|
|
2067
2180
|
opacity: 1,
|
|
@@ -2070,16 +2183,16 @@ var Ar = class e extends Bn {
|
|
|
2070
2183
|
scale: e.scale === void 0 ? 1 : e.scale,
|
|
2071
2184
|
displacement: e.displacement === void 0 ? [0, 0] : e.displacement,
|
|
2072
2185
|
declutterMode: e.declutterMode
|
|
2073
|
-
}), this.hitDetectionCanvas_ = null, this.fill_ = e.fill === void 0 ? null : e.fill, this.origin_ = [0, 0], this.points_ = e.points, this.radius = e.radius, this.radius2_ = e.radius2, this.angle_ = e.angle === void 0 ? 0 : e.angle, this.stroke_ = e.stroke === void 0 ? null : e.stroke, this.size_, this.renderOptions_, this.imageState_ = this.fill_ && this.fill_.loading() ?
|
|
2186
|
+
}), this.hitDetectionCanvas_ = null, this.fill_ = e.fill === void 0 ? null : e.fill, this.origin_ = [0, 0], this.points_ = e.points, this.radius = e.radius, this.radius2_ = e.radius2, this.angle_ = e.angle === void 0 ? 0 : e.angle, this.stroke_ = e.stroke === void 0 ? null : e.stroke, this.size_, this.renderOptions_, this.imageState_ = this.fill_ && this.fill_.loading() ? C.LOADING : C.LOADED, this.imageState_ === C.LOADING && this.ready().then(() => this.imageState_ = C.LOADED), this.render();
|
|
2074
2187
|
}
|
|
2075
2188
|
clone() {
|
|
2076
2189
|
let t = this.getScale(), n = new e({
|
|
2077
|
-
fill: this.getFill()
|
|
2190
|
+
fill: this.getFill()?.clone(),
|
|
2078
2191
|
points: this.getPoints(),
|
|
2079
2192
|
radius: this.getRadius(),
|
|
2080
2193
|
radius2: this.getRadius2(),
|
|
2081
2194
|
angle: this.getAngle(),
|
|
2082
|
-
stroke: this.getStroke()
|
|
2195
|
+
stroke: this.getStroke()?.clone(),
|
|
2083
2196
|
rotation: this.getRotation(),
|
|
2084
2197
|
rotateWithView: this.getRotateWithView(),
|
|
2085
2198
|
scale: Array.isArray(t) ? t.slice() : t,
|
|
@@ -2105,12 +2218,12 @@ var Ar = class e extends Bn {
|
|
|
2105
2218
|
return this.hitDetectionCanvas_ ||= this.createHitDetectionCanvas_(this.renderOptions_), this.hitDetectionCanvas_;
|
|
2106
2219
|
}
|
|
2107
2220
|
getImage(e) {
|
|
2108
|
-
let t = this.fill_?.getKey(), n = `${e},${this.angle_},${this.radius},${this.radius2_},${this.points_},${t}` + Object.values(this.renderOptions_).join(","), r =
|
|
2221
|
+
let t = this.fill_?.getKey(), n = `${e},${this.angle_},${this.radius},${this.radius2_},${this.points_},${t}` + Object.values(this.renderOptions_).join(","), r = A.get(n, null)?.getImage(1);
|
|
2109
2222
|
if (!r) {
|
|
2110
|
-
let t = this.renderOptions_, i = Math.ceil(t.size * e), a =
|
|
2223
|
+
let t = this.renderOptions_, i = Math.ceil(t.size * e), a = xe(i, i);
|
|
2111
2224
|
this.draw_(t, a, e), r = a.canvas;
|
|
2112
|
-
let o = new
|
|
2113
|
-
|
|
2225
|
+
let o = new gn(r, void 0, {}, C.LOADED, null);
|
|
2226
|
+
A.set(n, null, o), createImageBitmap(r).then((e) => {
|
|
2114
2227
|
o.setImage(e);
|
|
2115
2228
|
});
|
|
2116
2229
|
}
|
|
@@ -2166,16 +2279,16 @@ var Ar = class e extends Bn {
|
|
|
2166
2279
|
if (e === "miter" && d <= n) return d * t;
|
|
2167
2280
|
let f = t / 2 / d, p = t / 2 * (l / u), m = Math.sqrt((r + f) * (r + f) + p * p) - r;
|
|
2168
2281
|
if (this.radius2_ === void 0 || e === "bevel") return m * 2;
|
|
2169
|
-
let h = r * Math.sin(o),
|
|
2170
|
-
if (
|
|
2171
|
-
let e =
|
|
2282
|
+
let h = r * Math.sin(o), ee = Math.sqrt(r * r - h * h), g = i - ee, _ = Math.sqrt(h * h + g * g) / h;
|
|
2283
|
+
if (_ <= n) {
|
|
2284
|
+
let e = _ * t / 2 - i - r;
|
|
2172
2285
|
return 2 * Math.max(m, e);
|
|
2173
2286
|
}
|
|
2174
2287
|
return m * 2;
|
|
2175
2288
|
}
|
|
2176
2289
|
createRenderOptions() {
|
|
2177
|
-
let e =
|
|
2178
|
-
this.stroke_ && (a =
|
|
2290
|
+
let e = Sn, t = wn, n = 0, r = null, i = 0, a, o = 0;
|
|
2291
|
+
this.stroke_ && (a = vn(this.stroke_.getColor() ?? "#000"), o = this.stroke_.getWidth() ?? 1, r = this.stroke_.getLineDash(), i = this.stroke_.getLineDashOffset() ?? 0, t = this.stroke_.getLineJoin() ?? "round", e = this.stroke_.getLineCap() ?? "round", n = this.stroke_.getMiterLimit() ?? 10);
|
|
2179
2292
|
let s = this.calculateLineJoinSize_(t, o, n), c = Math.max(this.radius, this.radius2_ || 0), l = Math.ceil(2 * c + s);
|
|
2180
2293
|
return {
|
|
2181
2294
|
strokeStyle: a,
|
|
@@ -2196,7 +2309,7 @@ var Ar = class e extends Bn {
|
|
|
2196
2309
|
draw_(e, t, n) {
|
|
2197
2310
|
if (t.scale(n, n), t.translate(e.size / 2, e.size / 2), this.createPath_(t), this.fill_) {
|
|
2198
2311
|
let e = this.fill_.getColor();
|
|
2199
|
-
e === null && (e =
|
|
2312
|
+
e === null && (e = xn), t.fillStyle = vn(e), t.fill();
|
|
2200
2313
|
}
|
|
2201
2314
|
e.strokeStyle && (t.strokeStyle = e.strokeStyle, t.lineWidth = e.strokeWidth, e.lineDash && (t.setLineDash(e.lineDash), t.lineDashOffset = e.lineDashOffset), t.lineCap = e.lineCap, t.lineJoin = e.lineJoin, t.miterLimit = e.miterLimit, t.stroke());
|
|
2202
2315
|
}
|
|
@@ -2204,7 +2317,7 @@ var Ar = class e extends Bn {
|
|
|
2204
2317
|
let t;
|
|
2205
2318
|
if (this.fill_) {
|
|
2206
2319
|
let n = this.fill_.getColor(), r = 0;
|
|
2207
|
-
typeof n == "string" && (n =
|
|
2320
|
+
typeof n == "string" && (n = Qe(n)), n === null ? r = 1 : Array.isArray(n) && (r = n.length === 4 ? n[3] : 1), r === 0 && (t = xe(e.size, e.size), this.drawHitDetectionCanvas_(e, t));
|
|
2208
2321
|
}
|
|
2209
2322
|
return t ? t.canvas : this.getImage(1);
|
|
2210
2323
|
}
|
|
@@ -2223,12 +2336,12 @@ var Ar = class e extends Bn {
|
|
|
2223
2336
|
}
|
|
2224
2337
|
}
|
|
2225
2338
|
drawHitDetectionCanvas_(e, t) {
|
|
2226
|
-
t.translate(e.size / 2, e.size / 2), this.createPath_(t), t.fillStyle =
|
|
2339
|
+
t.translate(e.size / 2, e.size / 2), this.createPath_(t), t.fillStyle = xn, t.fill(), e.strokeStyle && (t.strokeStyle = e.strokeStyle, t.lineWidth = e.strokeWidth, e.lineDash && (t.setLineDash(e.lineDash), t.lineDashOffset = e.lineDashOffset), t.lineJoin = e.lineJoin, t.miterLimit = e.miterLimit, t.stroke());
|
|
2227
2340
|
}
|
|
2228
2341
|
ready() {
|
|
2229
2342
|
return this.fill_ ? this.fill_.ready() : Promise.resolve();
|
|
2230
2343
|
}
|
|
2231
|
-
},
|
|
2344
|
+
}, Lr = class e extends Ir {
|
|
2232
2345
|
constructor(e) {
|
|
2233
2346
|
e ||= { radius: 5 }, super({
|
|
2234
2347
|
points: Infinity,
|
|
@@ -2244,8 +2357,8 @@ var Ar = class e extends Bn {
|
|
|
2244
2357
|
}
|
|
2245
2358
|
clone() {
|
|
2246
2359
|
let t = this.getScale(), n = new e({
|
|
2247
|
-
fill: this.getFill()
|
|
2248
|
-
stroke: this.getStroke()
|
|
2360
|
+
fill: this.getFill()?.clone(),
|
|
2361
|
+
stroke: this.getStroke()?.clone(),
|
|
2249
2362
|
radius: this.getRadius(),
|
|
2250
2363
|
scale: Array.isArray(t) ? t.slice() : t,
|
|
2251
2364
|
rotation: this.getRotation(),
|
|
@@ -2255,7 +2368,7 @@ var Ar = class e extends Bn {
|
|
|
2255
2368
|
});
|
|
2256
2369
|
return n.setOpacity(this.getOpacity()), n;
|
|
2257
2370
|
}
|
|
2258
|
-
},
|
|
2371
|
+
}, Rr = class e {
|
|
2259
2372
|
constructor(e) {
|
|
2260
2373
|
e ||= {}, this.patternImage_ = null, this.color_ = null, e.color !== void 0 && this.setColor(e.color);
|
|
2261
2374
|
}
|
|
@@ -2268,16 +2381,16 @@ var Ar = class e extends Bn {
|
|
|
2268
2381
|
}
|
|
2269
2382
|
setColor(e) {
|
|
2270
2383
|
if (typeof e == "object" && e && "src" in e) {
|
|
2271
|
-
let t =
|
|
2384
|
+
let t = _n(null, e.src, { crossOrigin: "anonymous" }, void 0, e.offset ? null : e.color ? e.color : null, !(e.offset && e.size));
|
|
2272
2385
|
t.ready().then(() => {
|
|
2273
2386
|
this.patternImage_ = null;
|
|
2274
|
-
}), t.getImageState() ===
|
|
2387
|
+
}), t.getImageState() === C.IDLE && t.load(), t.getImageState() === C.LOADING && (this.patternImage_ = t);
|
|
2275
2388
|
}
|
|
2276
2389
|
this.color_ = e;
|
|
2277
2390
|
}
|
|
2278
2391
|
getKey() {
|
|
2279
2392
|
let e = this.getColor();
|
|
2280
|
-
return e ? e instanceof CanvasPattern || e instanceof CanvasGradient ?
|
|
2393
|
+
return e ? e instanceof CanvasPattern || e instanceof CanvasGradient ? m(e) : typeof e == "object" && "src" in e ? e.src + ":" + e.offset : Qe(e).toString() : "";
|
|
2281
2394
|
}
|
|
2282
2395
|
loading() {
|
|
2283
2396
|
return !!this.patternImage_;
|
|
@@ -2285,7 +2398,7 @@ var Ar = class e extends Bn {
|
|
|
2285
2398
|
ready() {
|
|
2286
2399
|
return this.patternImage_ ? this.patternImage_.ready() : Promise.resolve();
|
|
2287
2400
|
}
|
|
2288
|
-
},
|
|
2401
|
+
}, zr = class e {
|
|
2289
2402
|
constructor(e) {
|
|
2290
2403
|
e ||= {}, this.color_ = e.color === void 0 ? null : e.color, this.lineCap_ = e.lineCap, this.lineDash_ = e.lineDash === void 0 ? null : e.lineDash, this.lineDashOffset_ = e.lineDashOffset, this.lineJoin_ = e.lineJoin, this.miterLimit_ = e.miterLimit, this.offset_ = e.offset, this.width_ = e.width;
|
|
2291
2404
|
}
|
|
@@ -2294,7 +2407,7 @@ var Ar = class e extends Bn {
|
|
|
2294
2407
|
return new e({
|
|
2295
2408
|
color: Array.isArray(t) ? t.slice() : t || void 0,
|
|
2296
2409
|
lineCap: this.getLineCap(),
|
|
2297
|
-
lineDash: this.getLineDash()
|
|
2410
|
+
lineDash: this.getLineDash()?.slice(),
|
|
2298
2411
|
lineDashOffset: this.getLineDashOffset(),
|
|
2299
2412
|
lineJoin: this.getLineJoin(),
|
|
2300
2413
|
miterLimit: this.getMiterLimit(),
|
|
@@ -2350,19 +2463,19 @@ var Ar = class e extends Bn {
|
|
|
2350
2463
|
setWidth(e) {
|
|
2351
2464
|
this.width_ = e;
|
|
2352
2465
|
}
|
|
2353
|
-
},
|
|
2466
|
+
}, J = class e {
|
|
2354
2467
|
constructor(e) {
|
|
2355
|
-
e ||= {}, this.geometry_ = null, this.geometryFunction_ =
|
|
2468
|
+
e ||= {}, this.geometry_ = null, this.geometryFunction_ = Wr, e.geometry !== void 0 && this.setGeometry(e.geometry), this.fill_ = e.fill === void 0 ? null : e.fill, this.image_ = e.image === void 0 ? null : e.image, this.renderer_ = e.renderer === void 0 ? null : e.renderer, this.hitDetectionRenderer_ = e.hitDetectionRenderer === void 0 ? null : e.hitDetectionRenderer, this.stroke_ = e.stroke === void 0 ? null : e.stroke, this.text_ = e.text === void 0 ? null : e.text, this.zIndex_ = e.zIndex;
|
|
2356
2469
|
}
|
|
2357
2470
|
clone() {
|
|
2358
2471
|
let t = this.getGeometry();
|
|
2359
2472
|
return t && typeof t == "object" && (t = t.clone()), new e({
|
|
2360
2473
|
geometry: t ?? void 0,
|
|
2361
|
-
fill: this.getFill()
|
|
2362
|
-
image: this.getImage()
|
|
2474
|
+
fill: this.getFill()?.clone(),
|
|
2475
|
+
image: this.getImage()?.clone(),
|
|
2363
2476
|
renderer: this.getRenderer() ?? void 0,
|
|
2364
|
-
stroke: this.getStroke()
|
|
2365
|
-
text: this.getText()
|
|
2477
|
+
stroke: this.getStroke()?.clone(),
|
|
2478
|
+
text: this.getText()?.clone(),
|
|
2366
2479
|
zIndex: this.getZIndex()
|
|
2367
2480
|
});
|
|
2368
2481
|
}
|
|
@@ -2416,32 +2529,32 @@ var Ar = class e extends Bn {
|
|
|
2416
2529
|
return t.get(e);
|
|
2417
2530
|
} : e ? e !== void 0 && (this.geometryFunction_ = function() {
|
|
2418
2531
|
return e;
|
|
2419
|
-
}) : this.geometryFunction_ =
|
|
2532
|
+
}) : this.geometryFunction_ = Wr, this.geometry_ = e;
|
|
2420
2533
|
}
|
|
2421
2534
|
setZIndex(e) {
|
|
2422
2535
|
this.zIndex_ = e;
|
|
2423
2536
|
}
|
|
2424
2537
|
};
|
|
2425
|
-
function
|
|
2538
|
+
function Br(e) {
|
|
2426
2539
|
let t;
|
|
2427
2540
|
if (typeof e == "function") t = e;
|
|
2428
2541
|
else {
|
|
2429
2542
|
let n;
|
|
2430
|
-
Array.isArray(e) ? n = e : (
|
|
2543
|
+
Array.isArray(e) ? n = e : (T(typeof e.getZIndex == "function", "Expected an `Style` or an array of `Style`"), n = [e]), t = function() {
|
|
2431
2544
|
return n;
|
|
2432
2545
|
};
|
|
2433
2546
|
}
|
|
2434
2547
|
return t;
|
|
2435
2548
|
}
|
|
2436
|
-
var
|
|
2437
|
-
function
|
|
2438
|
-
if (!
|
|
2439
|
-
let e = new
|
|
2549
|
+
var Vr = null;
|
|
2550
|
+
function Hr(e, t) {
|
|
2551
|
+
if (!Vr) {
|
|
2552
|
+
let e = new Rr({ color: "rgba(255,255,255,0.4)" }), t = new zr({
|
|
2440
2553
|
color: "#3399CC",
|
|
2441
2554
|
width: 1.25
|
|
2442
2555
|
});
|
|
2443
|
-
|
|
2444
|
-
image: new
|
|
2556
|
+
Vr = [new J({
|
|
2557
|
+
image: new Lr({
|
|
2445
2558
|
fill: e,
|
|
2446
2559
|
stroke: t,
|
|
2447
2560
|
radius: 5
|
|
@@ -2450,9 +2563,9 @@ function Ir(e, t) {
|
|
|
2450
2563
|
stroke: t
|
|
2451
2564
|
})];
|
|
2452
2565
|
}
|
|
2453
|
-
return
|
|
2566
|
+
return Vr;
|
|
2454
2567
|
}
|
|
2455
|
-
function
|
|
2568
|
+
function Ur() {
|
|
2456
2569
|
let e = {}, t = [
|
|
2457
2570
|
255,
|
|
2458
2571
|
255,
|
|
@@ -2464,22 +2577,22 @@ function Lr() {
|
|
|
2464
2577
|
255,
|
|
2465
2578
|
1
|
|
2466
2579
|
];
|
|
2467
|
-
return e.Polygon = [new
|
|
2580
|
+
return e.Polygon = [new J({ fill: new Rr({ color: [
|
|
2468
2581
|
255,
|
|
2469
2582
|
255,
|
|
2470
2583
|
255,
|
|
2471
2584
|
.5
|
|
2472
|
-
] }) })], e.MultiPolygon = e.Polygon, e.LineString = [new
|
|
2585
|
+
] }) })], e.MultiPolygon = e.Polygon, e.LineString = [new J({ stroke: new zr({
|
|
2473
2586
|
color: t,
|
|
2474
2587
|
width: 5
|
|
2475
|
-
}) }), new
|
|
2588
|
+
}) }), new J({ stroke: new zr({
|
|
2476
2589
|
color: n,
|
|
2477
2590
|
width: 3
|
|
2478
|
-
}) })], e.MultiLineString = e.LineString, e.Circle = e.Polygon.concat(e.LineString), e.Point = [new
|
|
2479
|
-
image: new
|
|
2591
|
+
}) })], e.MultiLineString = e.LineString, e.Circle = e.Polygon.concat(e.LineString), e.Point = [new J({
|
|
2592
|
+
image: new Lr({
|
|
2480
2593
|
radius: 6,
|
|
2481
|
-
fill: new
|
|
2482
|
-
stroke: new
|
|
2594
|
+
fill: new Rr({ color: n }),
|
|
2595
|
+
stroke: new zr({
|
|
2483
2596
|
color: t,
|
|
2484
2597
|
width: 3 / 2
|
|
2485
2598
|
})
|
|
@@ -2487,13 +2600,13 @@ function Lr() {
|
|
|
2487
2600
|
zIndex: Infinity
|
|
2488
2601
|
})], e.MultiPoint = e.Point, e.GeometryCollection = e.Polygon.concat(e.LineString, e.Point), e;
|
|
2489
2602
|
}
|
|
2490
|
-
function
|
|
2603
|
+
function Wr(e) {
|
|
2491
2604
|
return e.getGeometry();
|
|
2492
2605
|
}
|
|
2493
2606
|
// ../node_modules/ol/style/Text.js
|
|
2494
|
-
var
|
|
2607
|
+
var Gr = "#333", Kr = class e {
|
|
2495
2608
|
constructor(e) {
|
|
2496
|
-
e ||= {}, this.font_ = e.font, this.rotation_ = e.rotation, this.rotateWithView_ = e.rotateWithView, this.keepUpright_ = e.keepUpright, this.scale_ = e.scale, this.scaleArray_ =
|
|
2609
|
+
e ||= {}, this.font_ = e.font, this.rotation_ = e.rotation, this.rotateWithView_ = e.rotateWithView, this.keepUpright_ = e.keepUpright, this.scale_ = e.scale, this.scaleArray_ = he(e.scale === void 0 ? 1 : e.scale), this.text_ = e.text, this.textAlign_ = e.textAlign, this.justify_ = e.justify, this.repeat_ = e.repeat, this.textBaseline_ = e.textBaseline, this.fill_ = e.fill === void 0 ? new Rr({ color: Gr }) : e.fill, this.maxAngle_ = e.maxAngle === void 0 ? Math.PI / 4 : e.maxAngle, this.placement_ = e.placement === void 0 ? "point" : e.placement, this.overflow_ = !!e.overflow, this.stroke_ = e.stroke === void 0 ? null : e.stroke, this.offsetX_ = e.offsetX === void 0 ? 0 : e.offsetX, this.offsetY_ = e.offsetY === void 0 ? 0 : e.offsetY, this.backgroundFill_ = e.backgroundFill ? e.backgroundFill : null, this.backgroundStroke_ = e.backgroundStroke ? e.backgroundStroke : null, this.padding_ = e.padding === void 0 ? null : e.padding, this.declutterMode_ = e.declutterMode;
|
|
2497
2610
|
}
|
|
2498
2611
|
clone() {
|
|
2499
2612
|
let t = this.getScale();
|
|
@@ -2511,12 +2624,12 @@ var zr = "#333", Br = class e {
|
|
|
2511
2624
|
textAlign: this.getTextAlign(),
|
|
2512
2625
|
justify: this.getJustify(),
|
|
2513
2626
|
textBaseline: this.getTextBaseline(),
|
|
2514
|
-
fill: this.getFill() instanceof
|
|
2515
|
-
stroke: this.getStroke()
|
|
2627
|
+
fill: this.getFill() instanceof Rr ? this.getFill().clone() : this.getFill(),
|
|
2628
|
+
stroke: this.getStroke()?.clone(),
|
|
2516
2629
|
offsetX: this.getOffsetX(),
|
|
2517
2630
|
offsetY: this.getOffsetY(),
|
|
2518
|
-
backgroundFill: this.getBackgroundFill()
|
|
2519
|
-
backgroundStroke: this.getBackgroundStroke()
|
|
2631
|
+
backgroundFill: this.getBackgroundFill()?.clone(),
|
|
2632
|
+
backgroundStroke: this.getBackgroundStroke()?.clone(),
|
|
2520
2633
|
padding: this.getPadding() || void 0,
|
|
2521
2634
|
declutterMode: this.getDeclutterMode()
|
|
2522
2635
|
});
|
|
@@ -2621,7 +2734,7 @@ var zr = "#333", Br = class e {
|
|
|
2621
2734
|
this.rotation_ = e;
|
|
2622
2735
|
}
|
|
2623
2736
|
setScale(e) {
|
|
2624
|
-
this.scale_ = e, this.scaleArray_ =
|
|
2737
|
+
this.scale_ = e, this.scaleArray_ = he(e === void 0 ? 1 : e);
|
|
2625
2738
|
}
|
|
2626
2739
|
setStroke(e) {
|
|
2627
2740
|
this.stroke_ = e;
|
|
@@ -2649,31 +2762,38 @@ var zr = "#333", Br = class e {
|
|
|
2649
2762
|
}
|
|
2650
2763
|
};
|
|
2651
2764
|
// ../node_modules/ol/render/canvas/style.js
|
|
2652
|
-
function
|
|
2765
|
+
function qr(e) {
|
|
2653
2766
|
return !0;
|
|
2654
2767
|
}
|
|
2655
|
-
function
|
|
2656
|
-
t ??=
|
|
2657
|
-
let n =
|
|
2768
|
+
function Jr(e, t) {
|
|
2769
|
+
t ??= tr();
|
|
2770
|
+
let n = Zr(e, t), r = Sr();
|
|
2658
2771
|
return function(e, i) {
|
|
2659
|
-
if (r.properties = e.getPropertiesInternal(), r.resolution = i, t.featureId) {
|
|
2772
|
+
if (r.properties = e.getPropertiesInternal() ?? {}, r.resolution = i, t.featureId) {
|
|
2660
2773
|
let t = e.getId();
|
|
2661
2774
|
t === void 0 ? r.featureId = null : r.featureId = t;
|
|
2662
2775
|
}
|
|
2663
|
-
|
|
2776
|
+
if (t.geometryType) {
|
|
2777
|
+
let t = e.getGeometry();
|
|
2778
|
+
t && (r.geometryType = xr(t));
|
|
2779
|
+
}
|
|
2780
|
+
return n(r);
|
|
2664
2781
|
};
|
|
2665
2782
|
}
|
|
2666
|
-
function
|
|
2667
|
-
t ??=
|
|
2783
|
+
function Yr(e, t) {
|
|
2784
|
+
t ??= tr();
|
|
2668
2785
|
let n = e.length, r = Array(n);
|
|
2669
|
-
for (let i = 0; i < n; ++i) r[i] =
|
|
2670
|
-
let i =
|
|
2786
|
+
for (let i = 0; i < n; ++i) r[i] = Qr(e[i], t);
|
|
2787
|
+
let i = Sr(), a = Array(n);
|
|
2671
2788
|
return function(e, o) {
|
|
2672
|
-
if (i.properties = e.getPropertiesInternal(), i.resolution = o, t.featureId) {
|
|
2789
|
+
if (i.properties = e.getPropertiesInternal() ?? {}, i.resolution = o, t.featureId) {
|
|
2673
2790
|
let t = e.getId();
|
|
2674
2791
|
t === void 0 ? i.featureId = null : i.featureId = t;
|
|
2675
2792
|
}
|
|
2676
|
-
|
|
2793
|
+
if (t.geometryType) {
|
|
2794
|
+
let t = e.getGeometry();
|
|
2795
|
+
t && (i.geometryType = xr(t));
|
|
2796
|
+
}
|
|
2677
2797
|
let s = 0;
|
|
2678
2798
|
for (let e = 0; e < n; ++e) {
|
|
2679
2799
|
let t = r[e](i);
|
|
@@ -2682,8 +2802,8 @@ function Ur(e, t) {
|
|
|
2682
2802
|
return a.length = s, a;
|
|
2683
2803
|
};
|
|
2684
2804
|
}
|
|
2685
|
-
function
|
|
2686
|
-
if (t ??=
|
|
2805
|
+
function Xr(e, t) {
|
|
2806
|
+
if (t ??= tr(), !Array.isArray(e)) return Yr([e], t);
|
|
2687
2807
|
let n = e.length;
|
|
2688
2808
|
if ("style" in e[0]) {
|
|
2689
2809
|
let r = Array(n);
|
|
@@ -2692,19 +2812,19 @@ function Wr(e, t) {
|
|
|
2692
2812
|
if (!("style" in n)) throw Error("Expected a list of rules with a style property");
|
|
2693
2813
|
r[t] = n;
|
|
2694
2814
|
}
|
|
2695
|
-
return
|
|
2815
|
+
return Jr(r, t);
|
|
2696
2816
|
}
|
|
2697
|
-
return
|
|
2817
|
+
return Yr(e, t);
|
|
2698
2818
|
}
|
|
2699
|
-
function
|
|
2819
|
+
function Zr(e, t) {
|
|
2700
2820
|
let n = e.length, r = Array(n);
|
|
2701
2821
|
for (let i = 0; i < n; ++i) {
|
|
2702
|
-
let n = e[i], a = "filter" in n ? G(n.filter,
|
|
2822
|
+
let n = e[i], a = "filter" in n && n.filter !== void 0 ? G(n.filter, j, t) : qr, o;
|
|
2703
2823
|
if (Array.isArray(n.style)) {
|
|
2704
2824
|
let e = n.style.length;
|
|
2705
2825
|
o = Array(e);
|
|
2706
|
-
for (let r = 0; r < e; ++r) o[r] =
|
|
2707
|
-
} else o = [
|
|
2826
|
+
for (let r = 0; r < e; ++r) o[r] = Qr(n.style[r], t);
|
|
2827
|
+
} else o = [Qr(n.style, t)];
|
|
2708
2828
|
r[i] = {
|
|
2709
2829
|
filter: a,
|
|
2710
2830
|
styles: o
|
|
@@ -2725,10 +2845,10 @@ function Gr(e, t) {
|
|
|
2725
2845
|
return i;
|
|
2726
2846
|
};
|
|
2727
2847
|
}
|
|
2728
|
-
function
|
|
2729
|
-
let n =
|
|
2730
|
-
if (!n && !r && !i && !a && !
|
|
2731
|
-
let s = new
|
|
2848
|
+
function Qr(e, t) {
|
|
2849
|
+
let n = $r(e, "", t), r = ei(e, "", t), i = ti(e, t), a = ni(e, t), o = X(e, "z-index", t);
|
|
2850
|
+
if (!n && !r && !i && !a && !v(e)) throw Error("No fill, stroke, point, or text symbolizer properties in style: " + JSON.stringify(e));
|
|
2851
|
+
let s = new J();
|
|
2732
2852
|
return function(e) {
|
|
2733
2853
|
let t = !0;
|
|
2734
2854
|
if (n) {
|
|
@@ -2750,28 +2870,28 @@ function Kr(e, t) {
|
|
|
2750
2870
|
return o && s.setZIndex(o(e)), t ? null : s;
|
|
2751
2871
|
};
|
|
2752
2872
|
}
|
|
2753
|
-
function
|
|
2873
|
+
function $r(e, t, n) {
|
|
2754
2874
|
let r;
|
|
2755
|
-
if (t + "fill-pattern-src" in e) r =
|
|
2875
|
+
if (t + "fill-pattern-src" in e) r = oi(e, t + "fill-", n);
|
|
2756
2876
|
else {
|
|
2757
|
-
if (e
|
|
2758
|
-
r =
|
|
2877
|
+
if (Y(e, t + "fill-color") === "none") return (e) => null;
|
|
2878
|
+
r = ci(e, t + "fill-color", n);
|
|
2759
2879
|
}
|
|
2760
2880
|
if (!r) return null;
|
|
2761
|
-
let i = new
|
|
2881
|
+
let i = new Rr();
|
|
2762
2882
|
return function(e) {
|
|
2763
2883
|
let t = r(e);
|
|
2764
|
-
return t ===
|
|
2884
|
+
return t === Ge ? null : (i.setColor(t), i);
|
|
2765
2885
|
};
|
|
2766
2886
|
}
|
|
2767
|
-
function
|
|
2768
|
-
let r =
|
|
2887
|
+
function ei(e, t, n) {
|
|
2888
|
+
let r = X(e, t + "stroke-width", n), i = ci(e, t + "stroke-color", n);
|
|
2769
2889
|
if (!r && !i) return null;
|
|
2770
|
-
let a =
|
|
2890
|
+
let a = Z(e, t + "stroke-line-cap", n), o = Z(e, t + "stroke-line-join", n), s = li(e, t + "stroke-line-dash", n), c = X(e, t + "stroke-line-dash-offset", n), l = X(e, t + "stroke-miter-limit", n), u = X(e, t + "stroke-offset", n), d = new zr();
|
|
2771
2891
|
return function(e) {
|
|
2772
2892
|
if (i) {
|
|
2773
2893
|
let t = i(e);
|
|
2774
|
-
if (t ===
|
|
2894
|
+
if (t === Ge) return null;
|
|
2775
2895
|
d.setColor(t);
|
|
2776
2896
|
}
|
|
2777
2897
|
if (r && d.setWidth(r(e)), a) {
|
|
@@ -2787,144 +2907,144 @@ function Jr(e, t, n) {
|
|
|
2787
2907
|
return s && d.setLineDash(s(e)), c && d.setLineDashOffset(c(e)), l && d.setMiterLimit(l(e)), u && d.setOffset(u(e)), d;
|
|
2788
2908
|
};
|
|
2789
2909
|
}
|
|
2790
|
-
function
|
|
2791
|
-
let n = "text-", r =
|
|
2910
|
+
function ti(e, t) {
|
|
2911
|
+
let n = "text-", r = Z(e, "text-value", t);
|
|
2792
2912
|
if (!r) return null;
|
|
2793
|
-
let i =
|
|
2913
|
+
let i = $r(e, n, t), a = $r(e, "text-background-", t), o = ei(e, n, t), s = ei(e, "text-background-", t), c = Z(e, "text-font", t), l = X(e, "text-max-angle", t), u = X(e, "text-offset-x", t), d = X(e, "text-offset-y", t), f = si(e, "text-overflow", t), p = Z(e, "text-placement", t), m = X(e, "text-repeat", t), h = fi(e, "text-scale", t), ee = si(e, "text-rotate-with-view", t), g = X(e, "text-rotation", t), _ = Z(e, "text-align", t), v = Z(e, "text-justify", t), te = Z(e, "text-baseline", t), y = si(e, "text-keep-upright", t), ne = li(e, "text-padding", t), b = new Kr({ declutterMode: yi(e, "text-declutter-mode") });
|
|
2794
2914
|
return function(e) {
|
|
2795
|
-
if (
|
|
2915
|
+
if (b.setText(r(e)), i && b.setFill(i(e)), a && b.setBackgroundFill(a(e)), o && b.setStroke(o(e)), s && b.setBackgroundStroke(s(e)), c && b.setFont(c(e)), l && b.setMaxAngle(l(e)), u && b.setOffsetX(u(e)), d && b.setOffsetY(d(e)), f && b.setOverflow(f(e)), p) {
|
|
2796
2916
|
let t = p(e);
|
|
2797
2917
|
if (t !== "point" && t !== "line") throw Error("Expected point or line for text-placement");
|
|
2798
|
-
|
|
2918
|
+
b.setPlacement(t);
|
|
2799
2919
|
}
|
|
2800
|
-
if (m &&
|
|
2801
|
-
let t =
|
|
2920
|
+
if (m && b.setRepeat(m(e)), h && b.setScale(h(e)), ee && b.setRotateWithView(ee(e)), g && b.setRotation(g(e)), _) {
|
|
2921
|
+
let t = _(e);
|
|
2802
2922
|
if (t !== "left" && t !== "center" && t !== "right" && t !== "end" && t !== "start") throw Error("Expected left, right, center, start, or end for text-align");
|
|
2803
|
-
|
|
2923
|
+
b.setTextAlign(t);
|
|
2804
2924
|
}
|
|
2805
|
-
if (
|
|
2806
|
-
let t =
|
|
2925
|
+
if (v) {
|
|
2926
|
+
let t = v(e);
|
|
2807
2927
|
if (t !== "left" && t !== "right" && t !== "center") throw Error("Expected left, right, or center for text-justify");
|
|
2808
|
-
|
|
2928
|
+
b.setJustify(t);
|
|
2809
2929
|
}
|
|
2810
|
-
if (
|
|
2811
|
-
let t =
|
|
2930
|
+
if (te) {
|
|
2931
|
+
let t = te(e);
|
|
2812
2932
|
if (t !== "bottom" && t !== "top" && t !== "middle" && t !== "alphabetic" && t !== "hanging") throw Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");
|
|
2813
|
-
|
|
2933
|
+
b.setTextBaseline(t);
|
|
2814
2934
|
}
|
|
2815
|
-
return
|
|
2935
|
+
return ne && b.setPadding(ne(e)), y && b.setKeepUpright(y(e)), b;
|
|
2816
2936
|
};
|
|
2817
2937
|
}
|
|
2818
|
-
function
|
|
2819
|
-
return "icon-src" in e ?
|
|
2938
|
+
function ni(e, t) {
|
|
2939
|
+
return "icon-src" in e ? ri(e, t) : "shape-points" in e ? ii(e, t) : "circle-radius" in e ? ai(e, t) : null;
|
|
2820
2940
|
}
|
|
2821
|
-
function
|
|
2822
|
-
let n = "icon-src", r =
|
|
2823
|
-
p !== void 0 && (Array.isArray(p) && p.length > 0 && typeof p[0] == "string" ? h =
|
|
2824
|
-
let
|
|
2941
|
+
function ri(e, t) {
|
|
2942
|
+
let n = "icon-src", r = xi(Y(e, n), n), i = ui(e, "icon-anchor", t), a = fi(e, "icon-scale", t), o = X(e, "icon-opacity", t), s = ui(e, "icon-displacement", t), c = X(e, "icon-rotation", t), l = si(e, "icon-rotate-with-view", t), u = gi(e, "icon-anchor-origin"), d = _i(e, "icon-anchor-x-units"), f = _i(e, "icon-anchor-y-units"), p = Y(e, "icon-color"), m, h = null;
|
|
2943
|
+
p !== void 0 && (Array.isArray(p) && p.length > 0 && typeof p[0] == "string" ? h = ci(e, "icon-color", t) : m = Ci(p, "icon-color"));
|
|
2944
|
+
let ee = hi(e, "icon-cross-origin"), g = vi(e, "icon-offset"), _ = gi(e, "icon-offset-origin"), v = pi(e, "icon-width"), te = {
|
|
2825
2945
|
src: r,
|
|
2826
2946
|
anchorOrigin: u,
|
|
2827
2947
|
anchorXUnits: d,
|
|
2828
2948
|
anchorYUnits: f,
|
|
2829
|
-
crossOrigin:
|
|
2830
|
-
offset:
|
|
2831
|
-
offsetOrigin:
|
|
2832
|
-
height:
|
|
2833
|
-
width:
|
|
2834
|
-
size:
|
|
2835
|
-
declutterMode:
|
|
2836
|
-
},
|
|
2949
|
+
crossOrigin: ee,
|
|
2950
|
+
offset: g,
|
|
2951
|
+
offsetOrigin: _,
|
|
2952
|
+
height: pi(e, "icon-height"),
|
|
2953
|
+
width: v,
|
|
2954
|
+
size: mi(e, "icon-size"),
|
|
2955
|
+
declutterMode: yi(e, "icon-declutter-mode")
|
|
2956
|
+
}, y = null;
|
|
2837
2957
|
return function(e) {
|
|
2838
|
-
if (
|
|
2958
|
+
if (y) h && y.setColor(h(e));
|
|
2839
2959
|
else {
|
|
2840
2960
|
let t = h ? h(e) : m;
|
|
2841
|
-
|
|
2961
|
+
y = new Gn(t === void 0 ? Object.assign({}, te) : Object.assign({}, te, { color: t }));
|
|
2842
2962
|
}
|
|
2843
|
-
return o &&
|
|
2963
|
+
return o && y.setOpacity(o(e)), s && y.setDisplacement(s(e)), c && y.setRotation(c(e)), l && y.setRotateWithView(l(e)), a && y.setScale(a(e)), i && y.setAnchor(i(e)), y;
|
|
2844
2964
|
};
|
|
2845
2965
|
}
|
|
2846
|
-
function
|
|
2847
|
-
let n = "shape-", r = "shape-points", i = "shape-radius", a =
|
|
2966
|
+
function ii(e, t) {
|
|
2967
|
+
let n = "shape-", r = "shape-points", i = "shape-radius", a = Si(Y(e, r), r);
|
|
2848
2968
|
if (!(i in e)) throw Error(`Expected a number for ${i}`);
|
|
2849
|
-
let o =
|
|
2969
|
+
let o = X(e, i, t), s = Y(e, i), c = typeof s == "number" ? s : 5, l = "shape-radius2", u = X(e, l, t), d = Y(e, l), f = typeof d == "number" ? d : void 0, p = $r(e, n, t), m = ei(e, n, t), h = fi(e, "shape-scale", t), ee = ui(e, "shape-displacement", t), g = X(e, "shape-rotation", t), _ = si(e, "shape-rotate-with-view", t), v = new Ir({
|
|
2850
2970
|
points: a,
|
|
2851
|
-
radius:
|
|
2852
|
-
radius2:
|
|
2853
|
-
angle:
|
|
2854
|
-
declutterMode:
|
|
2971
|
+
radius: c,
|
|
2972
|
+
radius2: f,
|
|
2973
|
+
angle: pi(e, "shape-angle"),
|
|
2974
|
+
declutterMode: yi(e, "shape-declutter-mode")
|
|
2855
2975
|
});
|
|
2856
2976
|
return function(e) {
|
|
2857
|
-
return o &&
|
|
2977
|
+
return o && v.setRadius(o(e)), u && v.setRadius2(u(e)), p && v.setFill(p(e)), m && v.setStroke(m(e)), ee && v.setDisplacement(ee(e)), g && v.setRotation(g(e)), _ && v.setRotateWithView(_(e)), h && v.setScale(h(e)), v;
|
|
2858
2978
|
};
|
|
2859
2979
|
}
|
|
2860
|
-
function
|
|
2861
|
-
let n = "circle-", r =
|
|
2980
|
+
function ai(e, t) {
|
|
2981
|
+
let n = "circle-", r = $r(e, n, t), i = ei(e, n, t), a = X(e, "circle-radius", t), o = fi(e, "circle-scale", t), s = ui(e, "circle-displacement", t), c = X(e, "circle-rotation", t), l = si(e, "circle-rotate-with-view", t), u = new Lr({
|
|
2862
2982
|
radius: 5,
|
|
2863
|
-
declutterMode:
|
|
2983
|
+
declutterMode: yi(e, "circle-declutter-mode")
|
|
2864
2984
|
});
|
|
2865
2985
|
return function(e) {
|
|
2866
2986
|
return a && u.setRadius(a(e)), r && u.setFill(r(e)), i && u.setStroke(i(e)), s && u.setDisplacement(s(e)), c && u.setRotation(c(e)), l && u.setRotateWithView(l(e)), o && u.setScale(o(e)), u;
|
|
2867
2987
|
};
|
|
2868
2988
|
}
|
|
2869
|
-
function
|
|
2989
|
+
function Y(e, t) {
|
|
2870
2990
|
if (!(t in e)) return;
|
|
2871
2991
|
let n = e[t];
|
|
2872
2992
|
return n === void 0 ? void 0 : n;
|
|
2873
2993
|
}
|
|
2874
|
-
function
|
|
2875
|
-
let r =
|
|
2994
|
+
function X(e, t, n) {
|
|
2995
|
+
let r = Y(e, t);
|
|
2876
2996
|
if (r === void 0) return;
|
|
2877
|
-
let i = G(r,
|
|
2997
|
+
let i = G(r, M, n);
|
|
2878
2998
|
return function(e) {
|
|
2879
|
-
return
|
|
2999
|
+
return Si(i(e), t);
|
|
2880
3000
|
};
|
|
2881
3001
|
}
|
|
2882
|
-
function
|
|
2883
|
-
let r =
|
|
3002
|
+
function Z(e, t, n) {
|
|
3003
|
+
let r = Y(e, t);
|
|
2884
3004
|
if (r === void 0) return null;
|
|
2885
|
-
let i = G(r,
|
|
3005
|
+
let i = G(r, N, n);
|
|
2886
3006
|
return function(e) {
|
|
2887
|
-
return
|
|
3007
|
+
return xi(i(e), t);
|
|
2888
3008
|
};
|
|
2889
3009
|
}
|
|
2890
|
-
function
|
|
2891
|
-
let r =
|
|
3010
|
+
function oi(e, t, n) {
|
|
3011
|
+
let r = Z(e, t + "pattern-src", n), i = di(e, t + "pattern-offset", n), a = di(e, t + "pattern-size", n), o = ci(e, t + "color", n);
|
|
2892
3012
|
return function(e) {
|
|
2893
|
-
return {
|
|
3013
|
+
return r ? {
|
|
2894
3014
|
src: r(e),
|
|
2895
|
-
offset: i
|
|
2896
|
-
size: a
|
|
2897
|
-
color: o
|
|
2898
|
-
};
|
|
3015
|
+
offset: i ? i(e) : null,
|
|
3016
|
+
size: a ? a(e) : null,
|
|
3017
|
+
color: o ? o(e) : null
|
|
3018
|
+
} : null;
|
|
2899
3019
|
};
|
|
2900
3020
|
}
|
|
2901
|
-
function
|
|
2902
|
-
let r =
|
|
3021
|
+
function si(e, t, n) {
|
|
3022
|
+
let r = Y(e, t);
|
|
2903
3023
|
if (r === void 0) return null;
|
|
2904
|
-
let i = G(r,
|
|
3024
|
+
let i = G(r, j, n);
|
|
2905
3025
|
return function(e) {
|
|
2906
3026
|
let n = i(e);
|
|
2907
3027
|
if (typeof n != "boolean") throw Error(`Expected a boolean for ${t}`);
|
|
2908
3028
|
return n;
|
|
2909
3029
|
};
|
|
2910
3030
|
}
|
|
2911
|
-
function
|
|
2912
|
-
let r =
|
|
3031
|
+
function ci(e, t, n) {
|
|
3032
|
+
let r = Y(e, t);
|
|
2913
3033
|
if (r === void 0) return null;
|
|
2914
|
-
let i = G(r,
|
|
3034
|
+
let i = G(r, P, n);
|
|
2915
3035
|
return function(e) {
|
|
2916
|
-
return
|
|
3036
|
+
return Ci(i(e), t);
|
|
2917
3037
|
};
|
|
2918
3038
|
}
|
|
2919
|
-
function
|
|
2920
|
-
let r =
|
|
3039
|
+
function li(e, t, n) {
|
|
3040
|
+
let r = Y(e, t);
|
|
2921
3041
|
if (r === void 0) return null;
|
|
2922
3042
|
if (Array.isArray(r) && (r.length === 0 || typeof r[0] != "string")) {
|
|
2923
3043
|
let e = r.map((e, r) => {
|
|
2924
3044
|
if (typeof e == "number") return () => e;
|
|
2925
|
-
let i = G(e,
|
|
3045
|
+
let i = G(e, M, n);
|
|
2926
3046
|
return function(e) {
|
|
2927
|
-
return
|
|
3047
|
+
return Si(i(e), `${t}[${r}]`);
|
|
2928
3048
|
};
|
|
2929
3049
|
});
|
|
2930
3050
|
return function(t) {
|
|
@@ -2933,115 +3053,115 @@ function ri(e, t, n) {
|
|
|
2933
3053
|
return n;
|
|
2934
3054
|
};
|
|
2935
3055
|
}
|
|
2936
|
-
let i = G(r,
|
|
3056
|
+
let i = G(r, F, n);
|
|
2937
3057
|
return function(e) {
|
|
2938
|
-
return
|
|
3058
|
+
return bi(i(e), t);
|
|
2939
3059
|
};
|
|
2940
3060
|
}
|
|
2941
|
-
function
|
|
2942
|
-
let r =
|
|
3061
|
+
function ui(e, t, n) {
|
|
3062
|
+
let r = Y(e, t);
|
|
2943
3063
|
if (r === void 0) return null;
|
|
2944
|
-
let i = G(r,
|
|
3064
|
+
let i = G(r, F, n);
|
|
2945
3065
|
return function(e) {
|
|
2946
|
-
let n =
|
|
3066
|
+
let n = bi(i(e), t);
|
|
2947
3067
|
if (n.length !== 2) throw Error(`Expected two numbers for ${t}`);
|
|
2948
3068
|
return n;
|
|
2949
3069
|
};
|
|
2950
3070
|
}
|
|
2951
|
-
function
|
|
2952
|
-
let r =
|
|
3071
|
+
function di(e, t, n) {
|
|
3072
|
+
let r = Y(e, t);
|
|
2953
3073
|
if (r === void 0) return null;
|
|
2954
|
-
let i = G(r,
|
|
3074
|
+
let i = G(r, F, n);
|
|
2955
3075
|
return function(e) {
|
|
2956
|
-
return
|
|
3076
|
+
return wi(i(e), t);
|
|
2957
3077
|
};
|
|
2958
3078
|
}
|
|
2959
|
-
function
|
|
2960
|
-
let r =
|
|
3079
|
+
function fi(e, t, n) {
|
|
3080
|
+
let r = Y(e, t);
|
|
2961
3081
|
if (r === void 0) return null;
|
|
2962
|
-
let i = G(r,
|
|
3082
|
+
let i = G(r, F | M, n);
|
|
2963
3083
|
return function(e) {
|
|
2964
|
-
return
|
|
3084
|
+
return Ti(i(e), t);
|
|
2965
3085
|
};
|
|
2966
3086
|
}
|
|
2967
|
-
function
|
|
2968
|
-
let n = e
|
|
3087
|
+
function pi(e, t) {
|
|
3088
|
+
let n = Y(e, t);
|
|
2969
3089
|
if (n !== void 0) {
|
|
2970
3090
|
if (typeof n != "number") throw Error(`Expected a number for ${t}`);
|
|
2971
3091
|
return n;
|
|
2972
3092
|
}
|
|
2973
3093
|
}
|
|
2974
|
-
function
|
|
2975
|
-
let n = e
|
|
3094
|
+
function mi(e, t) {
|
|
3095
|
+
let n = Y(e, t);
|
|
2976
3096
|
if (n !== void 0) {
|
|
2977
|
-
if (typeof n == "number") return
|
|
3097
|
+
if (typeof n == "number") return he(n);
|
|
2978
3098
|
if (!Array.isArray(n) || n.length !== 2 || typeof n[0] != "number" || typeof n[1] != "number") throw Error(`Expected a number or size array for ${t}`);
|
|
2979
3099
|
return n;
|
|
2980
3100
|
}
|
|
2981
3101
|
}
|
|
2982
|
-
function
|
|
2983
|
-
let n = e
|
|
3102
|
+
function hi(e, t) {
|
|
3103
|
+
let n = Y(e, t);
|
|
2984
3104
|
if (n !== void 0) {
|
|
2985
3105
|
if (typeof n != "string") throw Error(`Expected a string for ${t}`);
|
|
2986
3106
|
return n;
|
|
2987
3107
|
}
|
|
2988
3108
|
}
|
|
2989
|
-
function
|
|
2990
|
-
let n = e
|
|
3109
|
+
function gi(e, t) {
|
|
3110
|
+
let n = Y(e, t);
|
|
2991
3111
|
if (n !== void 0) {
|
|
2992
3112
|
if (n !== "bottom-left" && n !== "bottom-right" && n !== "top-left" && n !== "top-right") throw Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${t}`);
|
|
2993
3113
|
return n;
|
|
2994
3114
|
}
|
|
2995
3115
|
}
|
|
2996
|
-
function
|
|
2997
|
-
let n = e
|
|
3116
|
+
function _i(e, t) {
|
|
3117
|
+
let n = Y(e, t);
|
|
2998
3118
|
if (n !== void 0) {
|
|
2999
3119
|
if (n !== "pixels" && n !== "fraction") throw Error(`Expected pixels or fraction for ${t}`);
|
|
3000
3120
|
return n;
|
|
3001
3121
|
}
|
|
3002
3122
|
}
|
|
3003
|
-
function
|
|
3004
|
-
let n = e
|
|
3005
|
-
if (n !== void 0) return
|
|
3123
|
+
function vi(e, t) {
|
|
3124
|
+
let n = Y(e, t);
|
|
3125
|
+
if (n !== void 0) return bi(n, t);
|
|
3006
3126
|
}
|
|
3007
|
-
function
|
|
3008
|
-
let n = e
|
|
3127
|
+
function yi(e, t) {
|
|
3128
|
+
let n = Y(e, t);
|
|
3009
3129
|
if (n !== void 0) {
|
|
3010
3130
|
if (typeof n != "string") throw Error(`Expected a string for ${t}`);
|
|
3011
3131
|
if (n !== "declutter" && n !== "obstacle" && n !== "none") throw Error(`Expected declutter, obstacle, or none for ${t}`);
|
|
3012
3132
|
return n;
|
|
3013
3133
|
}
|
|
3014
3134
|
}
|
|
3015
|
-
function
|
|
3135
|
+
function bi(e, t) {
|
|
3016
3136
|
if (!Array.isArray(e)) throw Error(`Expected an array for ${t}`);
|
|
3017
3137
|
let n = e.length;
|
|
3018
3138
|
for (let r = 0; r < n; ++r) if (typeof e[r] != "number") throw Error(`Expected an array of numbers for ${t}`);
|
|
3019
3139
|
return e;
|
|
3020
3140
|
}
|
|
3021
|
-
function
|
|
3141
|
+
function xi(e, t) {
|
|
3022
3142
|
if (typeof e != "string") throw Error(`Expected a string for ${t}`);
|
|
3023
3143
|
return e;
|
|
3024
3144
|
}
|
|
3025
|
-
function
|
|
3145
|
+
function Si(e, t) {
|
|
3026
3146
|
if (typeof e != "number") throw Error(`Expected a number for ${t}`);
|
|
3027
3147
|
return e;
|
|
3028
3148
|
}
|
|
3029
|
-
function
|
|
3149
|
+
function Ci(e, t) {
|
|
3030
3150
|
if (typeof e == "string") return e;
|
|
3031
|
-
let n =
|
|
3151
|
+
let n = bi(e, t), r = n.length;
|
|
3032
3152
|
if (r < 3 || r > 4) throw Error(`Expected a color with 3 or 4 values for ${t}`);
|
|
3033
3153
|
return n;
|
|
3034
3154
|
}
|
|
3035
|
-
function
|
|
3036
|
-
let n =
|
|
3155
|
+
function wi(e, t) {
|
|
3156
|
+
let n = bi(e, t);
|
|
3037
3157
|
if (n.length !== 2) throw Error(`Expected an array of two numbers for ${t}`);
|
|
3038
3158
|
return n;
|
|
3039
3159
|
}
|
|
3040
|
-
function
|
|
3041
|
-
return typeof e == "number" ? e :
|
|
3160
|
+
function Ti(e, t) {
|
|
3161
|
+
return typeof e == "number" ? e : wi(e, t);
|
|
3042
3162
|
}
|
|
3043
3163
|
// ../node_modules/ol/layer/BaseVector.js
|
|
3044
|
-
var
|
|
3164
|
+
var Ei = { RENDER_ORDER: "renderOrder" }, Di = class extends nt {
|
|
3045
3165
|
constructor(e) {
|
|
3046
3166
|
e ||= {};
|
|
3047
3167
|
let t = Object.assign({}, e);
|
|
@@ -3057,7 +3177,7 @@ var bi = { RENDER_ORDER: "renderOrder" }, xi = class extends $e {
|
|
|
3057
3177
|
return this.renderBuffer_;
|
|
3058
3178
|
}
|
|
3059
3179
|
getRenderOrder() {
|
|
3060
|
-
return this.get(
|
|
3180
|
+
return this.get(Ei.RENDER_ORDER);
|
|
3061
3181
|
}
|
|
3062
3182
|
getStyle() {
|
|
3063
3183
|
return this.style_;
|
|
@@ -3073,38 +3193,41 @@ var bi = { RENDER_ORDER: "renderOrder" }, xi = class extends $e {
|
|
|
3073
3193
|
}
|
|
3074
3194
|
renderDeclutter(e, t) {
|
|
3075
3195
|
let n = this.getDeclutter();
|
|
3076
|
-
|
|
3196
|
+
if (!n) return;
|
|
3197
|
+
e.declutter ||= {}, n in e.declutter || (e.declutter[n] = new lt(9));
|
|
3198
|
+
let r = this.getRenderer();
|
|
3199
|
+
r && r.renderDeclutter(e, t);
|
|
3077
3200
|
}
|
|
3078
3201
|
setRenderOrder(e) {
|
|
3079
|
-
this.set(
|
|
3202
|
+
this.set(Ei.RENDER_ORDER, e);
|
|
3080
3203
|
}
|
|
3081
3204
|
setStyle(e) {
|
|
3082
|
-
this.style_ = e === void 0 ?
|
|
3083
|
-
let t =
|
|
3084
|
-
this.styleFunction_ = e === null ? void 0 :
|
|
3205
|
+
this.style_ = e === void 0 ? Hr : e ?? null;
|
|
3206
|
+
let t = Oi(e);
|
|
3207
|
+
this.styleFunction_ = e === null || t === null ? void 0 : Br(t), this.changed();
|
|
3085
3208
|
}
|
|
3086
3209
|
setDeclutter(e) {
|
|
3087
3210
|
this.declutter_ = e ? String(e) : void 0, this.changed();
|
|
3088
3211
|
}
|
|
3089
3212
|
};
|
|
3090
|
-
function
|
|
3091
|
-
if (e === void 0) return
|
|
3213
|
+
function Oi(e) {
|
|
3214
|
+
if (e === void 0) return Hr;
|
|
3092
3215
|
if (!e) return null;
|
|
3093
|
-
if (typeof e == "function" || e instanceof
|
|
3216
|
+
if (typeof e == "function" || e instanceof J) return e;
|
|
3094
3217
|
if (Array.isArray(e) && e.length === 0) return [];
|
|
3095
|
-
if (Array.isArray(e) && e[0] instanceof
|
|
3218
|
+
if (Array.isArray(e) && e[0] instanceof J) {
|
|
3096
3219
|
let t = e.length, n = Array(t);
|
|
3097
3220
|
for (let r = 0; r < t; ++r) {
|
|
3098
3221
|
let t = e[r];
|
|
3099
|
-
if (!(t instanceof
|
|
3222
|
+
if (!(t instanceof J)) throw Error("Expected a list of style instances");
|
|
3100
3223
|
n[r] = t;
|
|
3101
3224
|
}
|
|
3102
3225
|
return n;
|
|
3103
3226
|
}
|
|
3104
|
-
return
|
|
3227
|
+
return Xr(e);
|
|
3105
3228
|
}
|
|
3106
3229
|
// ../node_modules/ol/pointer/EventType.js
|
|
3107
|
-
var
|
|
3230
|
+
var ki = {
|
|
3108
3231
|
POINTERMOVE: "pointermove",
|
|
3109
3232
|
POINTERDOWN: "pointerdown",
|
|
3110
3233
|
POINTERUP: "pointerup",
|
|
@@ -3113,83 +3236,90 @@ var Ci = {
|
|
|
3113
3236
|
POINTERENTER: "pointerenter",
|
|
3114
3237
|
POINTERLEAVE: "pointerleave",
|
|
3115
3238
|
POINTERCANCEL: "pointercancel"
|
|
3116
|
-
},
|
|
3239
|
+
}, Ai = class extends i {
|
|
3117
3240
|
constructor(e, t) {
|
|
3118
3241
|
super(e), this.map_ = e, this.clickTimeoutId_, this.emulateClicks_ = !1, this.dragging_ = !1, this.dragListenerKeys_ = [], this.moveTolerance_ = t === void 0 ? 1 : t, this.down_ = null;
|
|
3119
3242
|
let n = this.map_.getViewport();
|
|
3120
|
-
|
|
3243
|
+
if (!n) throw Error("Map viewport is required");
|
|
3244
|
+
this.activePointers_ = [], this.trackedTouches_ = {}, this.element_ = n, this.pointerdownListenerKey_ = g(n, ki.POINTERDOWN, this.handlePointerDown_, this), this.originalPointerMoveEvent_, this.relayedListenerKey_ = g(n, ki.POINTERMOVE, this.relayMoveEvent_, this), this.boundHandleTouchMove_ = this.handleTouchMove_.bind(this), this.element_.addEventListener(x.TOUCHMOVE, this.boundHandleTouchMove_, fe ? { passive: !1 } : !1);
|
|
3121
3245
|
}
|
|
3122
3246
|
emulateClick_(e) {
|
|
3123
|
-
let t = new
|
|
3247
|
+
let t = new k(O.CLICK, this.map_, e);
|
|
3124
3248
|
this.dispatchEvent(t), this.clickTimeoutId_ === void 0 ? this.clickTimeoutId_ = setTimeout(() => {
|
|
3125
3249
|
this.clickTimeoutId_ = void 0;
|
|
3126
|
-
let t = new
|
|
3250
|
+
let t = new k(O.SINGLECLICK, this.map_, e);
|
|
3127
3251
|
this.dispatchEvent(t);
|
|
3128
|
-
}, 250) : (clearTimeout(this.clickTimeoutId_), this.clickTimeoutId_ = void 0, t = new
|
|
3252
|
+
}, 250) : (clearTimeout(this.clickTimeoutId_), this.clickTimeoutId_ = void 0, t = new k(O.DBLCLICK, this.map_, e), this.dispatchEvent(t));
|
|
3129
3253
|
}
|
|
3130
3254
|
updateActivePointers_(e) {
|
|
3131
3255
|
let t = e, n = t.pointerId;
|
|
3132
|
-
if (t.type ==
|
|
3256
|
+
if (t.type == O.POINTERUP || t.type == O.POINTERCANCEL) {
|
|
3133
3257
|
delete this.trackedTouches_[n];
|
|
3134
3258
|
for (let e in this.trackedTouches_) if (this.trackedTouches_[e].target !== t.target) {
|
|
3135
3259
|
delete this.trackedTouches_[e];
|
|
3136
3260
|
break;
|
|
3137
3261
|
}
|
|
3138
|
-
} else (t.type ==
|
|
3262
|
+
} else (t.type == O.POINTERDOWN || t.type == O.POINTERMOVE) && (this.trackedTouches_[n] = t);
|
|
3139
3263
|
this.activePointers_ = Object.values(this.trackedTouches_);
|
|
3140
3264
|
}
|
|
3141
3265
|
handlePointerUp_(e) {
|
|
3142
3266
|
this.updateActivePointers_(e);
|
|
3143
|
-
let t = new
|
|
3144
|
-
this.dispatchEvent(t), this.emulateClicks_ && !t.defaultPrevented && !this.dragging_ && this.isMouseActionButton_(e) && this.emulateClick_(this.down_), this.activePointers_.length === 0 && (this.dragListenerKeys_.forEach(
|
|
3267
|
+
let t = new k(O.POINTERUP, this.map_, e, void 0, void 0, this.activePointers_);
|
|
3268
|
+
this.dispatchEvent(t), this.emulateClicks_ && !t.defaultPrevented && !this.dragging_ && this.isMouseActionButton_(e) && this.down_ && this.emulateClick_(this.down_), this.activePointers_.length === 0 && (this.dragListenerKeys_.forEach(S), this.dragListenerKeys_.length = 0, this.dragging_ = !1, this.down_ = null);
|
|
3145
3269
|
}
|
|
3146
3270
|
isMouseActionButton_(e) {
|
|
3147
3271
|
return e.button === 0;
|
|
3148
3272
|
}
|
|
3149
3273
|
handlePointerDown_(e) {
|
|
3150
3274
|
this.emulateClicks_ = this.activePointers_.length === 0, this.updateActivePointers_(e);
|
|
3151
|
-
let t = new
|
|
3275
|
+
let t = new k(O.POINTERDOWN, this.map_, e, void 0, void 0, this.activePointers_);
|
|
3152
3276
|
if (this.dispatchEvent(t), this.down_ = new PointerEvent(e.type, e), Object.defineProperty(this.down_, "target", {
|
|
3153
3277
|
writable: !1,
|
|
3154
3278
|
value: e.target
|
|
3155
3279
|
}), this.dragListenerKeys_.length === 0) {
|
|
3156
|
-
let e = this.map_.getOwnerDocument();
|
|
3157
|
-
|
|
3280
|
+
let e = this.map_.getOwnerDocument(), t = this.element_;
|
|
3281
|
+
if (!t) return;
|
|
3282
|
+
if (this.dragListenerKeys_.push(g(e, O.POINTERMOVE, this.handlePointerMove_, this), g(e, O.POINTERUP, this.handlePointerUp_, this), g(t, O.POINTERCANCEL, this.handlePointerUp_, this)), t.getRootNode && t.getRootNode() !== e) {
|
|
3283
|
+
let e = t.getRootNode();
|
|
3284
|
+
this.dragListenerKeys_.push(g(e, O.POINTERUP, this.handlePointerUp_, this));
|
|
3285
|
+
}
|
|
3158
3286
|
}
|
|
3159
3287
|
}
|
|
3160
3288
|
handlePointerMove_(e) {
|
|
3161
3289
|
if (this.isMoving_(e)) {
|
|
3162
3290
|
this.updateActivePointers_(e), this.dragging_ = !0;
|
|
3163
|
-
let t = new
|
|
3291
|
+
let t = new k(O.POINTERDRAG, this.map_, e, this.dragging_, void 0, this.activePointers_);
|
|
3164
3292
|
this.dispatchEvent(t);
|
|
3165
3293
|
}
|
|
3166
3294
|
}
|
|
3167
3295
|
relayMoveEvent_(e) {
|
|
3168
3296
|
this.originalPointerMoveEvent_ = e;
|
|
3169
3297
|
let t = !!(this.down_ && this.isMoving_(e));
|
|
3170
|
-
this.dispatchEvent(new
|
|
3298
|
+
this.dispatchEvent(new k(O.POINTERMOVE, this.map_, e, t));
|
|
3171
3299
|
}
|
|
3172
3300
|
handleTouchMove_(e) {
|
|
3173
3301
|
let t = this.originalPointerMoveEvent_;
|
|
3174
3302
|
t && !t.defaultPrevented || typeof e.cancelable == "boolean" && e.cancelable !== !0 || e.preventDefault();
|
|
3175
3303
|
}
|
|
3176
3304
|
isMoving_(e) {
|
|
3177
|
-
|
|
3305
|
+
let t = this.down_;
|
|
3306
|
+
return this.dragging_ || t !== null && (Math.abs(e.clientX - t.clientX) > this.moveTolerance_ || Math.abs(e.clientY - t.clientY) > this.moveTolerance_);
|
|
3178
3307
|
}
|
|
3179
3308
|
disposeInternal() {
|
|
3180
|
-
|
|
3309
|
+
let e = this.element_;
|
|
3310
|
+
this.relayedListenerKey_ &&= (S(this.relayedListenerKey_), void 0), e && e.removeEventListener(x.TOUCHMOVE, this.boundHandleTouchMove_), this.pointerdownListenerKey_ &&= (S(this.pointerdownListenerKey_), void 0), this.dragListenerKeys_.forEach(S), this.dragListenerKeys_.length = 0, this.element_ = void 0, super.disposeInternal();
|
|
3181
3311
|
}
|
|
3182
|
-
},
|
|
3312
|
+
}, Q = {
|
|
3183
3313
|
LAYERGROUP: "layergroup",
|
|
3184
3314
|
SIZE: "size",
|
|
3185
3315
|
TARGET: "target",
|
|
3186
3316
|
VIEW: "view"
|
|
3187
|
-
},
|
|
3317
|
+
}, ji = Infinity, Mi = class {
|
|
3188
3318
|
constructor(e, t) {
|
|
3189
3319
|
this.priorityFunction_ = e, this.keyFunction_ = t, this.elements_ = [], this.priorities_ = [], this.queuedElements_ = {};
|
|
3190
3320
|
}
|
|
3191
3321
|
clear() {
|
|
3192
|
-
this.elements_.length = 0, this.priorities_.length = 0,
|
|
3322
|
+
this.elements_.length = 0, this.priorities_.length = 0, _(this.queuedElements_);
|
|
3193
3323
|
}
|
|
3194
3324
|
dequeue() {
|
|
3195
3325
|
let e = this.elements_, t = this.priorities_, n = e[0];
|
|
@@ -3198,7 +3328,7 @@ var Ci = {
|
|
|
3198
3328
|
return delete this.queuedElements_[r], n;
|
|
3199
3329
|
}
|
|
3200
3330
|
enqueue(e) {
|
|
3201
|
-
|
|
3331
|
+
T(!(this.keyFunction_(e) in this.queuedElements_), "Tried to enqueue an `element` that was already added to the queue");
|
|
3202
3332
|
let t = this.priorityFunction_(e);
|
|
3203
3333
|
return t != Infinity && (this.elements_.push(e), this.priorities_.push(t), this.queuedElements_[this.keyFunction_(e)] = !0, this.siftDown_(0, this.elements_.length - 1), !0);
|
|
3204
3334
|
}
|
|
@@ -3249,21 +3379,21 @@ var Ci = {
|
|
|
3249
3379
|
for (o = 0; o < i; ++o) a = t[o], s = e(a), s == Infinity ? delete this.queuedElements_[this.keyFunction_(a)] : (n[r] = s, t[r++] = a);
|
|
3250
3380
|
t.length = r, n.length = r, this.heapify_();
|
|
3251
3381
|
}
|
|
3252
|
-
},
|
|
3382
|
+
}, Ni = class extends Mi {
|
|
3253
3383
|
constructor(e, t) {
|
|
3254
3384
|
super((t) => e.apply(null, t), (e) => e[0].getKey()), this.boundHandleTileChange_ = this.handleTileChange.bind(this), this.tileChangeCallback_ = t, this.tilesLoading_ = 0, this.tilesLoadingKeys_ = {};
|
|
3255
3385
|
}
|
|
3256
3386
|
enqueue(e) {
|
|
3257
3387
|
let t = super.enqueue(e);
|
|
3258
|
-
return t && e[0].addEventListener(
|
|
3388
|
+
return t && e[0].addEventListener(x.CHANGE, this.boundHandleTileChange_), t;
|
|
3259
3389
|
}
|
|
3260
3390
|
getTilesLoading() {
|
|
3261
3391
|
return this.tilesLoading_;
|
|
3262
3392
|
}
|
|
3263
3393
|
handleTileChange(e) {
|
|
3264
3394
|
let t = e.target, n = t.getState();
|
|
3265
|
-
if (n ===
|
|
3266
|
-
n !==
|
|
3395
|
+
if (n === ve.LOADED || n === ve.ERROR || n === ve.EMPTY) {
|
|
3396
|
+
n !== ve.ERROR && t.removeEventListener(x.CHANGE, this.boundHandleTileChange_);
|
|
3267
3397
|
let e = t.getKey();
|
|
3268
3398
|
e in this.tilesLoadingKeys_ && (delete this.tilesLoadingKeys_[e], --this.tilesLoading_), this.tileChangeCallback_();
|
|
3269
3399
|
}
|
|
@@ -3272,17 +3402,17 @@ var Ci = {
|
|
|
3272
3402
|
let n = 0;
|
|
3273
3403
|
for (; this.tilesLoading_ < e && n < t && this.getCount() > 0;) {
|
|
3274
3404
|
let e = this.dequeue()[0], t = e.getKey();
|
|
3275
|
-
e.getState() ===
|
|
3405
|
+
e.getState() === ve.IDLE && !(t in this.tilesLoadingKeys_) && (this.tilesLoadingKeys_[t] = !0, ++this.tilesLoading_, ++n, e.load());
|
|
3276
3406
|
}
|
|
3277
3407
|
}
|
|
3278
3408
|
};
|
|
3279
|
-
function
|
|
3280
|
-
if (!e || !(n in e.wantedTiles) || !e.wantedTiles[n][t.getKey()]) return
|
|
3409
|
+
function Pi(e, t, n, r, i) {
|
|
3410
|
+
if (!e || !(n in e.wantedTiles) || !e.wantedTiles[n][t.getKey()]) return ji;
|
|
3281
3411
|
let a = e.viewState.center, o = r[0] - a[0], s = r[1] - a[1];
|
|
3282
3412
|
return 65536 * Math.log(i) + Math.sqrt(o * o + s * s) / i;
|
|
3283
3413
|
}
|
|
3284
3414
|
// ../node_modules/ol/control/Attribution.js
|
|
3285
|
-
var
|
|
3415
|
+
var Fi = class extends Me {
|
|
3286
3416
|
constructor(e) {
|
|
3287
3417
|
e ||= {}, super({
|
|
3288
3418
|
element: document.createElement("div"),
|
|
@@ -3294,26 +3424,30 @@ var ki = class extends ke {
|
|
|
3294
3424
|
let o = e.label === void 0 ? "i" : e.label;
|
|
3295
3425
|
typeof o == "string" ? (this.label_ = document.createElement("span"), this.label_.textContent = o, this.label_.className = r) : this.label_ = o;
|
|
3296
3426
|
let s = this.collapsible_ && !this.collapsed_ ? this.collapseLabel_ : this.label_;
|
|
3297
|
-
this.toggleButton_ = document.createElement("button"), this.toggleButton_.setAttribute("type", "button"), this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_)), this.toggleButton_.title = n, this.toggleButton_.appendChild(s), this.toggleButton_.addEventListener(
|
|
3298
|
-
let c = t + " " +
|
|
3427
|
+
this.toggleButton_ = document.createElement("button"), this.toggleButton_.setAttribute("type", "button"), this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_)), this.toggleButton_.title = n, this.toggleButton_.appendChild(s), this.toggleButton_.addEventListener(x.CLICK, this.handleClick_.bind(this), !1);
|
|
3428
|
+
let c = t + " " + Ae + " " + je + (this.collapsed_ && this.collapsible_ ? " " + ke : "") + (this.collapsible_ ? "" : " ol-uncollapsible"), l = this.element;
|
|
3299
3429
|
l.className = c, l.appendChild(this.toggleButton_), l.appendChild(this.ulElement_), this.renderedAttributions_ = [], this.renderedVisible_ = !0;
|
|
3300
3430
|
}
|
|
3301
3431
|
collectSourceAttributions_(e) {
|
|
3302
|
-
let t = this.getMap()
|
|
3303
|
-
if (
|
|
3304
|
-
|
|
3432
|
+
let t = this.getMap();
|
|
3433
|
+
if (!t) return [];
|
|
3434
|
+
let n = t.getAllLayers(), r = new Set(n.flatMap((t) => t.getAttributions(e)));
|
|
3435
|
+
if (this.attributions_ !== void 0 && (Array.isArray(this.attributions_) ? this.attributions_.forEach((e) => r.add(e)) : r.add(this.attributions_)), !this.overrideCollapsible_) {
|
|
3436
|
+
let e = !n.some((e) => e.getSource()?.getAttributionsCollapsible() === !1);
|
|
3305
3437
|
this.setCollapsible(e);
|
|
3306
3438
|
}
|
|
3307
|
-
return Array.from(
|
|
3439
|
+
return Array.from(r);
|
|
3308
3440
|
}
|
|
3309
3441
|
async updateElement_(e) {
|
|
3442
|
+
let t = this.element;
|
|
3443
|
+
if (!t) return;
|
|
3310
3444
|
if (!e) {
|
|
3311
|
-
this.renderedVisible_ &&= (
|
|
3445
|
+
this.renderedVisible_ &&= (t.style.display = "none", !1);
|
|
3312
3446
|
return;
|
|
3313
3447
|
}
|
|
3314
|
-
let n = await Promise.all(this.collectSourceAttributions_(e).map((e) =>
|
|
3315
|
-
if (this.renderedVisible_ != r && (
|
|
3316
|
-
|
|
3448
|
+
let n = await Promise.all(this.collectSourceAttributions_(e).map((e) => a(() => e))), r = n.length > 0;
|
|
3449
|
+
if (this.renderedVisible_ != r && (t.style.display = r ? "" : "none", this.renderedVisible_ = r), !oe(n, this.renderedAttributions_)) {
|
|
3450
|
+
pe(this.ulElement_);
|
|
3317
3451
|
for (let e = 0, t = n.length; e < t; ++e) {
|
|
3318
3452
|
let t = document.createElement("li");
|
|
3319
3453
|
t.innerHTML = n[e], this.ulElement_.appendChild(t);
|
|
@@ -3325,13 +3459,17 @@ var ki = class extends ke {
|
|
|
3325
3459
|
e.preventDefault(), this.handleToggle_(), this.userCollapsed_ = this.collapsed_;
|
|
3326
3460
|
}
|
|
3327
3461
|
handleToggle_() {
|
|
3328
|
-
|
|
3462
|
+
let e = this.element;
|
|
3463
|
+
e && (e.classList.toggle(ke), this.collapsed_ ? Te(this.collapseLabel_, this.label_) : Te(this.label_, this.collapseLabel_), this.collapsed_ = !this.collapsed_, this.toggleButton_.setAttribute("aria-expanded", String(!this.collapsed_)));
|
|
3329
3464
|
}
|
|
3330
3465
|
getCollapsible() {
|
|
3331
3466
|
return this.collapsible_;
|
|
3332
3467
|
}
|
|
3333
3468
|
setCollapsible(e) {
|
|
3334
|
-
|
|
3469
|
+
if (this.collapsible_ === e) return;
|
|
3470
|
+
this.collapsible_ = e;
|
|
3471
|
+
let t = this.element;
|
|
3472
|
+
t && (t.classList.toggle("ol-uncollapsible"), this.userCollapsed_ && this.handleToggle_());
|
|
3335
3473
|
}
|
|
3336
3474
|
setCollapsed(e) {
|
|
3337
3475
|
this.userCollapsed_ = e, this.collapsible_ && this.collapsed_ !== e && this.handleToggle_();
|
|
@@ -3342,7 +3480,7 @@ var ki = class extends ke {
|
|
|
3342
3480
|
render(e) {
|
|
3343
3481
|
this.updateElement_(e.frameState);
|
|
3344
3482
|
}
|
|
3345
|
-
},
|
|
3483
|
+
}, Ii = class extends Me {
|
|
3346
3484
|
constructor(e) {
|
|
3347
3485
|
e ||= {}, super({
|
|
3348
3486
|
element: document.createElement("div"),
|
|
@@ -3350,135 +3488,140 @@ var ki = class extends ke {
|
|
|
3350
3488
|
target: e.target
|
|
3351
3489
|
});
|
|
3352
3490
|
let t = e.className === void 0 ? "ol-rotate" : e.className, n = e.label === void 0 ? "⇧" : e.label, r = e.compassClassName === void 0 ? "ol-compass" : e.compassClassName;
|
|
3353
|
-
this.label_
|
|
3491
|
+
this.label_, typeof n == "string" ? (this.label_ = document.createElement("span"), this.label_.className = r, this.label_.textContent = n) : (this.label_ = n, this.label_.classList.add(r));
|
|
3354
3492
|
let i = e.tipLabel ? e.tipLabel : "Reset rotation", a = document.createElement("button");
|
|
3355
|
-
a.className = t + "-reset", a.setAttribute("type", "button"), a.title = i, a.appendChild(this.label_), a.addEventListener(
|
|
3356
|
-
let o = t + " " +
|
|
3357
|
-
s.className = o, s.appendChild(a), this.callResetNorth_ = e.resetNorth ? e.resetNorth : void 0, this.duration_ = e.duration === void 0 ? 250 : e.duration, this.autoHide_ = e.autoHide === void 0 || e.autoHide, this.rotation_ = void 0, this.autoHide_ && this.element.classList.add(
|
|
3493
|
+
a.className = t + "-reset", a.setAttribute("type", "button"), a.title = i, a.appendChild(this.label_), a.addEventListener(x.CLICK, this.handleClick_.bind(this), !1);
|
|
3494
|
+
let o = t + " " + Ae + " " + je, s = this.element;
|
|
3495
|
+
s.className = o, s.appendChild(a), this.callResetNorth_ = e.resetNorth ? e.resetNorth : void 0, this.duration_ = e.duration === void 0 ? 250 : e.duration, this.autoHide_ = e.autoHide === void 0 || e.autoHide, this.rotation_ = void 0, this.autoHide_ && this.element.classList.add(De);
|
|
3358
3496
|
}
|
|
3359
3497
|
handleClick_(e) {
|
|
3360
3498
|
e.preventDefault(), this.callResetNorth_ === void 0 ? this.resetNorth_() : this.callResetNorth_();
|
|
3361
3499
|
}
|
|
3362
3500
|
resetNorth_() {
|
|
3363
|
-
let e = this.getMap()
|
|
3501
|
+
let e = this.getMap();
|
|
3364
3502
|
if (!e) return;
|
|
3365
|
-
let t = e.
|
|
3366
|
-
|
|
3503
|
+
let t = e.getView();
|
|
3504
|
+
if (!t) return;
|
|
3505
|
+
let n = t.getRotation();
|
|
3506
|
+
n !== void 0 && (this.duration_ > 0 && n % (2 * Math.PI) != 0 ? t.animate({
|
|
3367
3507
|
rotation: 0,
|
|
3368
3508
|
duration: this.duration_,
|
|
3369
|
-
easing:
|
|
3370
|
-
}) :
|
|
3509
|
+
easing: Be
|
|
3510
|
+
}) : t.setRotation(0));
|
|
3371
3511
|
}
|
|
3372
3512
|
render(e) {
|
|
3373
3513
|
let t = e.frameState;
|
|
3374
3514
|
if (!t) return;
|
|
3375
3515
|
let n = t.viewState.rotation;
|
|
3376
3516
|
if (n != this.rotation_) {
|
|
3377
|
-
let e = "rotate(" + n + "rad)";
|
|
3378
|
-
if (this.autoHide_) {
|
|
3379
|
-
let e =
|
|
3380
|
-
!e && n === 0 ?
|
|
3517
|
+
let e = "rotate(" + n + "rad)", t = this.element;
|
|
3518
|
+
if (this.autoHide_ && t) {
|
|
3519
|
+
let e = t.classList.contains(De);
|
|
3520
|
+
!e && n === 0 ? t.classList.add(De) : e && n !== 0 && t.classList.remove(De);
|
|
3381
3521
|
}
|
|
3382
3522
|
this.label_.style.transform = e;
|
|
3383
3523
|
}
|
|
3384
3524
|
this.rotation_ = n;
|
|
3385
3525
|
}
|
|
3386
|
-
},
|
|
3526
|
+
}, Li = class extends Me {
|
|
3387
3527
|
constructor(e) {
|
|
3388
3528
|
e ||= {}, super({
|
|
3389
3529
|
element: document.createElement("div"),
|
|
3390
3530
|
target: e.target
|
|
3391
3531
|
});
|
|
3392
3532
|
let t = e.className === void 0 ? "ol-zoom" : e.className, n = e.delta === void 0 ? 1 : e.delta, r = e.zoomInClassName === void 0 ? t + "-in" : e.zoomInClassName, i = e.zoomOutClassName === void 0 ? t + "-out" : e.zoomOutClassName, a = e.zoomInLabel === void 0 ? "+" : e.zoomInLabel, o = e.zoomOutLabel === void 0 ? "–" : e.zoomOutLabel, s = e.zoomInTipLabel === void 0 ? "Zoom in" : e.zoomInTipLabel, c = e.zoomOutTipLabel === void 0 ? "Zoom out" : e.zoomOutTipLabel, l = document.createElement("button");
|
|
3393
|
-
l.className = r, l.setAttribute("type", "button"), l.title = s, l.appendChild(typeof a == "string" ? document.createTextNode(a) : a), l.addEventListener(
|
|
3533
|
+
l.className = r, l.setAttribute("type", "button"), l.title = s, l.appendChild(typeof a == "string" ? document.createTextNode(a) : a), l.addEventListener(x.CLICK, this.handleClick_.bind(this, n), !1);
|
|
3394
3534
|
let u = document.createElement("button");
|
|
3395
|
-
u.className = i, u.setAttribute("type", "button"), u.title = c, u.appendChild(typeof o == "string" ? document.createTextNode(o) : o), u.addEventListener(
|
|
3396
|
-
let d = t + " " +
|
|
3535
|
+
u.className = i, u.setAttribute("type", "button"), u.title = c, u.appendChild(typeof o == "string" ? document.createTextNode(o) : o), u.addEventListener(x.CLICK, this.handleClick_.bind(this, -n), !1);
|
|
3536
|
+
let d = t + " " + Ae + " " + je, f = this.element;
|
|
3397
3537
|
f.className = d, f.appendChild(l), f.appendChild(u), this.duration_ = e.duration === void 0 ? 250 : e.duration;
|
|
3398
3538
|
}
|
|
3399
3539
|
handleClick_(e, t) {
|
|
3400
3540
|
t.preventDefault(), this.zoomByDelta_(e);
|
|
3401
3541
|
}
|
|
3402
3542
|
zoomByDelta_(e) {
|
|
3403
|
-
let t = this.getMap()
|
|
3543
|
+
let t = this.getMap();
|
|
3404
3544
|
if (!t) return;
|
|
3405
|
-
let n = t.
|
|
3406
|
-
if (n
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3545
|
+
let n = t.getView();
|
|
3546
|
+
if (!n) return;
|
|
3547
|
+
let r = n.getZoom();
|
|
3548
|
+
if (r !== void 0) {
|
|
3549
|
+
let t = n.getConstrainedZoom(r + e);
|
|
3550
|
+
if (t === void 0) return;
|
|
3551
|
+
this.duration_ > 0 ? (n.getAnimating() && n.cancelAnimations(), n.animate({
|
|
3552
|
+
zoom: t,
|
|
3410
3553
|
duration: this.duration_,
|
|
3411
|
-
easing:
|
|
3412
|
-
})) :
|
|
3554
|
+
easing: Be
|
|
3555
|
+
})) : n.setZoom(t);
|
|
3413
3556
|
}
|
|
3414
3557
|
}
|
|
3415
3558
|
};
|
|
3416
3559
|
// ../node_modules/ol/control/defaults.js
|
|
3417
|
-
function
|
|
3560
|
+
function Ri(e) {
|
|
3418
3561
|
e ||= {};
|
|
3419
|
-
let t = new
|
|
3420
|
-
return (e.zoom === void 0 || e.zoom) && t.push(new
|
|
3562
|
+
let t = new D();
|
|
3563
|
+
return (e.zoom === void 0 || e.zoom) && t.push(new Li(e.zoomOptions)), (e.rotate === void 0 || e.rotate) && t.push(new Ii(e.rotateOptions)), (e.attribution === void 0 || e.attribution) && t.push(new Fi(e.attributionOptions)), t;
|
|
3421
3564
|
}
|
|
3422
3565
|
// ../node_modules/ol/layer/Group.js
|
|
3423
|
-
var
|
|
3566
|
+
var zi = {
|
|
3424
3567
|
ADDLAYER: "addlayer",
|
|
3425
3568
|
REMOVELAYER: "removelayer"
|
|
3426
|
-
}, $ = class extends
|
|
3569
|
+
}, $ = class extends d {
|
|
3427
3570
|
constructor(e, t) {
|
|
3428
3571
|
super(e), this.layer = t;
|
|
3429
3572
|
}
|
|
3430
|
-
},
|
|
3573
|
+
}, Bi = { LAYERS: "layers" }, Vi = class e extends et {
|
|
3431
3574
|
constructor(e) {
|
|
3432
3575
|
e ||= {};
|
|
3433
3576
|
let t = Object.assign({}, e);
|
|
3434
3577
|
delete t.layers;
|
|
3435
3578
|
let n = e.layers;
|
|
3436
|
-
super(t), this.on, this.once, this.un, this.layersListenerKeys_ = [], this.listenerKeys_ = {}, this.addChangeListener(
|
|
3579
|
+
super(t), this.on, this.once, this.un, this.layersListenerKeys_ = [], this.listenerKeys_ = {}, this.addChangeListener(Bi.LAYERS, this.handleLayersChanged_), n ? Array.isArray(n) ? n = new D(n.slice(), { unique: !0 }) : T(typeof n.getArray == "function", "Expected `layers` to be an array or a `Collection`") : n = new D(void 0, { unique: !0 }), this.setLayers(n);
|
|
3437
3580
|
}
|
|
3438
3581
|
handleLayerChange_() {
|
|
3439
3582
|
this.changed();
|
|
3440
3583
|
}
|
|
3441
3584
|
handleLayersChanged_() {
|
|
3442
|
-
this.layersListenerKeys_.forEach(
|
|
3585
|
+
this.layersListenerKeys_.forEach(S), this.layersListenerKeys_.length = 0;
|
|
3443
3586
|
let e = this.getLayers();
|
|
3444
|
-
this.layersListenerKeys_.push(
|
|
3445
|
-
for (let e in this.listenerKeys_) this.listenerKeys_[e].forEach(
|
|
3446
|
-
|
|
3587
|
+
this.layersListenerKeys_.push(g(e, E.ADD, this.handleLayersAdd_, this), g(e, E.REMOVE, this.handleLayersRemove_, this));
|
|
3588
|
+
for (let e in this.listenerKeys_) this.listenerKeys_[e].forEach(S);
|
|
3589
|
+
_(this.listenerKeys_);
|
|
3447
3590
|
let t = e.getArray();
|
|
3448
3591
|
for (let e = 0, n = t.length; e < n; e++) {
|
|
3449
3592
|
let n = t[e];
|
|
3450
|
-
this.registerLayerListeners_(n), this.dispatchEvent(new $(
|
|
3593
|
+
this.registerLayerListeners_(n), this.dispatchEvent(new $(zi.ADDLAYER, n));
|
|
3451
3594
|
}
|
|
3452
3595
|
this.changed();
|
|
3453
3596
|
}
|
|
3454
3597
|
registerLayerListeners_(t) {
|
|
3455
|
-
let n = [
|
|
3456
|
-
t instanceof e && n.push(
|
|
3598
|
+
let n = [g(t, ae.PROPERTYCHANGE, this.handleLayerChange_, this), g(t, x.CHANGE, this.handleLayerChange_, this)];
|
|
3599
|
+
t instanceof e && n.push(g(t, zi.ADDLAYER, this.handleLayerGroupAdd_, this), g(t, zi.REMOVELAYER, this.handleLayerGroupRemove_, this)), this.listenerKeys_[m(t)] = n;
|
|
3457
3600
|
}
|
|
3458
3601
|
handleLayerGroupAdd_(e) {
|
|
3459
|
-
this.dispatchEvent(new $(
|
|
3602
|
+
this.dispatchEvent(new $(zi.ADDLAYER, e.layer));
|
|
3460
3603
|
}
|
|
3461
3604
|
handleLayerGroupRemove_(e) {
|
|
3462
|
-
this.dispatchEvent(new $(
|
|
3605
|
+
this.dispatchEvent(new $(zi.REMOVELAYER, e.layer));
|
|
3463
3606
|
}
|
|
3464
3607
|
handleLayersAdd_(e) {
|
|
3465
3608
|
let t = e.element;
|
|
3466
|
-
this.registerLayerListeners_(t), this.dispatchEvent(new $(
|
|
3609
|
+
this.registerLayerListeners_(t), this.dispatchEvent(new $(zi.ADDLAYER, t)), this.changed();
|
|
3467
3610
|
}
|
|
3468
3611
|
handleLayersRemove_(e) {
|
|
3469
|
-
let t = e.element, n =
|
|
3470
|
-
this.listenerKeys_[n].forEach(
|
|
3612
|
+
let t = e.element, n = m(t);
|
|
3613
|
+
this.listenerKeys_[n].forEach(S), delete this.listenerKeys_[n], this.dispatchEvent(new $(zi.REMOVELAYER, t)), this.changed();
|
|
3471
3614
|
}
|
|
3472
3615
|
getLayers() {
|
|
3473
|
-
return this.get(
|
|
3616
|
+
return this.get(Bi.LAYERS);
|
|
3474
3617
|
}
|
|
3475
3618
|
setLayers(e) {
|
|
3476
3619
|
let t = this.getLayers();
|
|
3477
3620
|
if (t) {
|
|
3478
3621
|
let e = t.getArray();
|
|
3479
|
-
for (let t = 0, n = e.length; t < n; ++t) this.dispatchEvent(new $(
|
|
3622
|
+
for (let t = 0, n = e.length; t < n; ++t) this.dispatchEvent(new $(zi.REMOVELAYER, e[t]));
|
|
3480
3623
|
}
|
|
3481
|
-
this.set(
|
|
3624
|
+
this.set(Bi.LAYERS, e);
|
|
3482
3625
|
}
|
|
3483
3626
|
getLayersArray(e) {
|
|
3484
3627
|
return e = e === void 0 ? [] : e, this.getLayers().forEach(function(t) {
|
|
@@ -3494,125 +3637,124 @@ var Q = {
|
|
|
3494
3637
|
!e && r.zIndex === void 0 && (i = 0);
|
|
3495
3638
|
for (let e = n, a = t.length; e < a; e++) {
|
|
3496
3639
|
let n = t[e];
|
|
3497
|
-
n.opacity *= r.opacity, n.visible = n.visible && r.visible, n.maxResolution = Math.min(n.maxResolution, r.maxResolution), n.minResolution = Math.max(n.minResolution, r.minResolution), n.minZoom = Math.max(n.minZoom, r.minZoom), n.maxZoom = Math.min(n.maxZoom, r.maxZoom), r.extent !== void 0 && (n.extent = n.extent === void 0 ? r.extent :
|
|
3640
|
+
n.opacity *= r.opacity, n.visible = n.visible && r.visible, n.maxResolution = Math.min(n.maxResolution, r.maxResolution), n.minResolution = Math.max(n.minResolution, r.minResolution), n.minZoom = Math.max(n.minZoom, r.minZoom), n.maxZoom = Math.min(n.maxZoom, r.maxZoom), r.extent !== void 0 && (n.extent = n.extent === void 0 ? r.extent : u(n.extent, r.extent)), n.zIndex === void 0 && (n.zIndex = i);
|
|
3498
3641
|
}
|
|
3499
3642
|
return t;
|
|
3500
3643
|
}
|
|
3501
3644
|
getSourceState() {
|
|
3502
3645
|
return "ready";
|
|
3503
3646
|
}
|
|
3504
|
-
},
|
|
3647
|
+
}, Hi = class extends ie {
|
|
3505
3648
|
constructor(e) {
|
|
3506
3649
|
super(), this.map_ = e;
|
|
3507
3650
|
}
|
|
3508
3651
|
dispatchRenderEvent(e, t) {
|
|
3509
|
-
|
|
3652
|
+
h();
|
|
3510
3653
|
}
|
|
3511
3654
|
calculateMatrices2D(e) {
|
|
3512
3655
|
let t = e.viewState, n = e.coordinateToPixelTransform, r = e.pixelToCoordinateTransform;
|
|
3513
|
-
|
|
3656
|
+
Re(n, e.size[0] / 2, e.size[1] / 2, 1 / t.resolution, -1 / t.resolution, -t.rotation, -t.center[0], -t.center[1]), ze(r, n);
|
|
3514
3657
|
}
|
|
3515
|
-
forEachFeatureAtCoordinate(e, t, n, r, i, a, o,
|
|
3516
|
-
let
|
|
3517
|
-
function
|
|
3658
|
+
forEachFeatureAtCoordinate(e, t, n, r, i, a, o, s) {
|
|
3659
|
+
let c, u = t.viewState;
|
|
3660
|
+
function d(e, t, n, r) {
|
|
3518
3661
|
return i.call(a, t, e ? n : null, r);
|
|
3519
3662
|
}
|
|
3520
|
-
let
|
|
3521
|
-
if (
|
|
3522
|
-
let e =
|
|
3523
|
-
|
|
3663
|
+
let f = u.projection, p = l(e.slice(), f), m = [[0, 0]];
|
|
3664
|
+
if (f.canWrapX() && r) {
|
|
3665
|
+
let e = f.getExtent(), t = ne(e);
|
|
3666
|
+
m.push([-t, 0], [t, 0]);
|
|
3524
3667
|
}
|
|
3525
|
-
let
|
|
3526
|
-
for (let r = 0; r <
|
|
3527
|
-
let a =
|
|
3528
|
-
if (
|
|
3529
|
-
let i =
|
|
3668
|
+
let h = t.layerStatesArray, ee = h.length, g = [], _ = [];
|
|
3669
|
+
for (let r = 0; r < m.length; r++) for (let i = ee - 1; i >= 0; --i) {
|
|
3670
|
+
let a = h[i], l = a.layer;
|
|
3671
|
+
if (l.hasRenderer() && Ze(a, u) && o.call(s, l)) {
|
|
3672
|
+
let i = l.getRenderer(), o = l.getSource();
|
|
3530
3673
|
if (i && o) {
|
|
3531
|
-
let s = o.getWrapX() ?
|
|
3532
|
-
|
|
3674
|
+
let s = o.getWrapX() ? p : e, l = d.bind(null, a.managed);
|
|
3675
|
+
_[0] = s[0] + m[r][0], _[1] = s[1] + m[r][1], c = i.forEachFeatureAtCoordinate(_, t, n, l, g);
|
|
3533
3676
|
}
|
|
3534
|
-
if (
|
|
3677
|
+
if (c) return c;
|
|
3535
3678
|
}
|
|
3536
3679
|
}
|
|
3537
|
-
if (
|
|
3538
|
-
let
|
|
3539
|
-
return
|
|
3680
|
+
if (g.length === 0) return;
|
|
3681
|
+
let v = 1 / g.length;
|
|
3682
|
+
return g.forEach((e, t) => e.distanceSq += t * v), g.sort((e, t) => e.distanceSq - t.distanceSq), g.some((e) => c = e.callback(e.feature, e.layer, e.geometry)), c;
|
|
3540
3683
|
}
|
|
3541
|
-
hasFeatureAtCoordinate(e, t, n,
|
|
3542
|
-
return this.forEachFeatureAtCoordinate(e, t, n,
|
|
3684
|
+
hasFeatureAtCoordinate(e, t, n, i, a, o) {
|
|
3685
|
+
return this.forEachFeatureAtCoordinate(e, t, n, i, r, this, a, o) !== void 0;
|
|
3543
3686
|
}
|
|
3544
3687
|
getMap() {
|
|
3545
3688
|
return this.map_;
|
|
3546
3689
|
}
|
|
3547
3690
|
renderFrame(e) {
|
|
3548
|
-
|
|
3691
|
+
h();
|
|
3549
3692
|
}
|
|
3550
3693
|
scheduleExpireIconCache(e) {
|
|
3551
|
-
|
|
3694
|
+
A.canExpireCache() && e.postRenderFunctions.push(Ui);
|
|
3552
3695
|
}
|
|
3553
3696
|
};
|
|
3554
|
-
function
|
|
3555
|
-
|
|
3697
|
+
function Ui(e, t) {
|
|
3698
|
+
A.expire();
|
|
3556
3699
|
}
|
|
3557
3700
|
// ../node_modules/ol/renderer/Composite.js
|
|
3558
|
-
var
|
|
3701
|
+
var Wi = class extends Hi {
|
|
3559
3702
|
constructor(e) {
|
|
3560
|
-
super(e), this.fontChangeListenerKey_ =
|
|
3703
|
+
super(e), this.fontChangeListenerKey_ = g(kn, ae.PROPERTYCHANGE, e.redrawText, e), this.element_ = Ce ? ge() : document.createElement("div");
|
|
3561
3704
|
let t = this.element_.style;
|
|
3562
|
-
t.position = "absolute", t.width = "100%", t.height = "100%", t.zIndex = "0", this.element_.className =
|
|
3705
|
+
t.position = "absolute", t.width = "100%", t.height = "100%", t.zIndex = "0", this.element_.className = Ae + " ol-layers";
|
|
3563
3706
|
let n = e.getViewport();
|
|
3564
3707
|
n && n.insertBefore(this.element_, n.firstChild || null), this.children_ = [], this.renderedVisible_ = !0;
|
|
3565
3708
|
}
|
|
3566
3709
|
dispatchRenderEvent(e, t) {
|
|
3567
3710
|
let n = this.getMap();
|
|
3568
3711
|
if (n.hasListener(e)) {
|
|
3569
|
-
let r = new
|
|
3712
|
+
let r = new Ye(e, void 0, t);
|
|
3570
3713
|
n.dispatchEvent(r);
|
|
3571
3714
|
}
|
|
3572
3715
|
}
|
|
3573
3716
|
disposeInternal() {
|
|
3574
|
-
|
|
3717
|
+
S(this.fontChangeListenerKey_), this.element_.remove(), super.disposeInternal();
|
|
3575
3718
|
}
|
|
3576
3719
|
renderFrame(e) {
|
|
3577
3720
|
if (!e) {
|
|
3578
3721
|
this.renderedVisible_ &&= (this.element_.style.display = "none", !1);
|
|
3579
3722
|
return;
|
|
3580
3723
|
}
|
|
3581
|
-
this.calculateMatrices2D(e), this.dispatchRenderEvent(
|
|
3724
|
+
this.calculateMatrices2D(e), this.dispatchRenderEvent($e.PRECOMPOSE, e);
|
|
3582
3725
|
let t = e.layerStatesArray.sort((e, t) => e.zIndex - t.zIndex);
|
|
3583
|
-
t.some((e) => e.layer instanceof
|
|
3726
|
+
t.some((e) => e.layer instanceof Di && e.layer.getDeclutter()) && (e.declutter = {});
|
|
3584
3727
|
let n = e.viewState;
|
|
3585
3728
|
this.children_.length = 0;
|
|
3586
3729
|
let r = this.getMap().getTargetElement(), i;
|
|
3587
|
-
|
|
3730
|
+
w(r) && (i = r.getContext("2d"), i.setTransform(1, 0, 0, 1, 0, 0), i.clearRect(0, 0, r.width, r.height));
|
|
3588
3731
|
let a = [], o = i ? r : null;
|
|
3589
3732
|
for (let r = 0, i = t.length; r < i; ++r) {
|
|
3590
3733
|
let i = t[r];
|
|
3591
3734
|
e.layerIndex = r;
|
|
3592
3735
|
let s = i.layer, c = s.getSourceState();
|
|
3593
|
-
if (!
|
|
3736
|
+
if (!Ze(i, n) || c != "ready" && c != "undefined") {
|
|
3594
3737
|
s.unrender();
|
|
3595
3738
|
continue;
|
|
3596
3739
|
}
|
|
3597
3740
|
let l = s.render(e, o);
|
|
3598
3741
|
l && (l !== o && (this.children_.push(l), o = l), a.push(i));
|
|
3599
3742
|
}
|
|
3600
|
-
this.declutter(e, a),
|
|
3601
|
-
for (let e of i ? this.children_ : []) {
|
|
3743
|
+
if (this.declutter(e, a), Se(this.element_, this.children_), i) for (let e of this.children_) {
|
|
3602
3744
|
let t = e.firstElementChild || e, n = e.style.backgroundColor;
|
|
3603
|
-
if (n && (!
|
|
3745
|
+
if (n && (!w(t) || t.width > 0) && (i.fillStyle = n, i.fillRect(0, 0, i.canvas.width, i.canvas.height)), !w(t) || t.width === 0) continue;
|
|
3604
3746
|
i.save();
|
|
3605
3747
|
let r = e.style.opacity || t.style.opacity;
|
|
3606
3748
|
i.globalAlpha = r === "" ? 1 : Number(r);
|
|
3607
3749
|
let a = t.style.transform;
|
|
3608
|
-
if (a) i.transform(...
|
|
3750
|
+
if (a) i.transform(...Le(a));
|
|
3609
3751
|
else {
|
|
3610
3752
|
let e = parseFloat(t.style.width) / t.width, n = parseFloat(t.style.height) / t.height;
|
|
3611
3753
|
i.transform(e, 0, 0, n, 0, 0);
|
|
3612
3754
|
}
|
|
3613
3755
|
i.drawImage(t, 0, 0), i.restore();
|
|
3614
3756
|
}
|
|
3615
|
-
this.dispatchRenderEvent(
|
|
3757
|
+
this.dispatchRenderEvent($e.POSTCOMPOSE, e), this.renderedVisible_ ||= (this.element_.style.display = "", !0), this.scheduleExpireIconCache(e);
|
|
3616
3758
|
}
|
|
3617
3759
|
declutter(e, t) {
|
|
3618
3760
|
if (e.declutter) {
|
|
@@ -3620,42 +3762,42 @@ var Li = class extends Fi {
|
|
|
3620
3762
|
let r = t[n], i = r.layer;
|
|
3621
3763
|
i.getDeclutter() && i.renderDeclutter(e, r);
|
|
3622
3764
|
}
|
|
3623
|
-
t.forEach((t) => t.layer
|
|
3765
|
+
t.forEach((t) => t.layer?.renderDeferred(e));
|
|
3624
3766
|
}
|
|
3625
3767
|
}
|
|
3626
|
-
},
|
|
3627
|
-
function
|
|
3628
|
-
e instanceof
|
|
3768
|
+
}, Gi = /* @__PURE__ */ e({ default: () => Ji });
|
|
3769
|
+
function Ki(e) {
|
|
3770
|
+
e instanceof nt ? e.setMapInternal(null) : e instanceof Vi && e.getLayers().forEach(Ki);
|
|
3629
3771
|
}
|
|
3630
|
-
function
|
|
3631
|
-
if (e instanceof
|
|
3632
|
-
else if (e instanceof
|
|
3772
|
+
function qi(e, t) {
|
|
3773
|
+
if (e instanceof nt) e.setMapInternal(t);
|
|
3774
|
+
else if (e instanceof Vi) {
|
|
3633
3775
|
let n = e.getLayers().getArray();
|
|
3634
|
-
for (let e = 0, r = n.length; e < r; ++e)
|
|
3776
|
+
for (let e = 0, r = n.length; e < r; ++e) qi(n[e], t);
|
|
3635
3777
|
}
|
|
3636
3778
|
}
|
|
3637
|
-
var
|
|
3779
|
+
var Ji = class extends ue {
|
|
3638
3780
|
constructor(e) {
|
|
3639
3781
|
super(), e ||= {}, this.on, this.once, this.un;
|
|
3640
|
-
let t =
|
|
3641
|
-
this.renderComplete_ = !1, this.loaded_ = !0, this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this), this.maxTilesLoading_ = e.maxTilesLoading === void 0 ? 16 : e.maxTilesLoading, this.pixelRatio_ = e.pixelRatio === void 0 ?
|
|
3782
|
+
let t = Yi(e);
|
|
3783
|
+
this.renderComplete_ = !1, this.loaded_ = !0, this.boundHandleBrowserEvent_ = this.handleBrowserEvent.bind(this), this.ctrlKey_ = !1, this.boundHandleCtrlKey_ = this.handleCtrlKey_.bind(this), this.maxTilesLoading_ = e.maxTilesLoading === void 0 ? 16 : e.maxTilesLoading, this.pixelRatio_ = e.pixelRatio === void 0 ? me : e.pixelRatio, this.postRenderTimeoutHandle_, this.animationDelayKey_, this.animationDelay_ = this.animationDelay_.bind(this), this.coordinateToPixelTransform_ = Fe(), this.pixelToCoordinateTransform_ = Fe(), this.frameIndex_ = 0, this.frameState_ = null, this.previousExtent_ = null, this.viewPropertyListenerKey_ = null, this.viewChangeListenerKey_ = null, this.layerGroupPropertyListenerKeys_ = null, this.viewport_, this.overlayContainer_, this.overlayContainerStopEvent_, Ce || (this.viewport_ = document.createElement("div"), this.viewport_.className = "ol-viewport" + ("ontouchstart" in window ? " ol-touch" : ""), this.viewport_.style.position = "relative", this.viewport_.style.overflow = "hidden", this.viewport_.style.width = "100%", this.viewport_.style.height = "100%", this.overlayContainer_ = document.createElement("div"), this.overlayContainer_.style.position = "absolute", this.overlayContainer_.style.zIndex = "0", this.overlayContainer_.style.width = "100%", this.overlayContainer_.style.height = "100%", this.overlayContainer_.style.pointerEvents = "none", this.overlayContainer_.className = "ol-overlaycontainer", this.viewport_.appendChild(this.overlayContainer_), this.overlayContainerStopEvent_ = document.createElement("div"), this.overlayContainerStopEvent_.style.position = "absolute", this.overlayContainerStopEvent_.style.zIndex = "0", this.overlayContainerStopEvent_.style.width = "100%", this.overlayContainerStopEvent_.style.height = "100%", this.overlayContainerStopEvent_.style.pointerEvents = "none", this.overlayContainerStopEvent_.className = "ol-overlaycontainer-stopevent", this.viewport_.appendChild(this.overlayContainerStopEvent_)), this.mapBrowserEventHandler_ = null, this.moveTolerance_ = e.moveTolerance, this.keyboardEventTarget_ = t.keyboardEventTarget, this.targetChangeHandlerKeys_ = null, this.targetElement_ = null, Ce || (this.resizeObserver_ = new ResizeObserver(() => this.updateSize())), this.controls = t.controls || (Ce ? new D() : Ri()), this.interactions = t.interactions || (Ce ? new D() : dn({ onFocusOnly: !0 })), this.overlays_ = t.overlays, this.overlayIdIndex_ = {}, this.renderer_ = null, this.postRenderFunctions_ = [], this.tileQueue_ = new Ni(this.getTilePriority.bind(this), this.handleTileChange_.bind(this)), this.addChangeListener(Q.LAYERGROUP, this.handleLayerGroupChanged_), this.addChangeListener(Q.VIEW, this.handleViewChanged_), this.addChangeListener(Q.SIZE, this.handleSizeChanged_), this.addChangeListener(Q.TARGET, this.handleTargetChanged_), this.setProperties(t.values);
|
|
3642
3784
|
let n = this;
|
|
3643
|
-
e.view && !(e.view instanceof
|
|
3644
|
-
n.setView(new
|
|
3645
|
-
}), this.controls.addEventListener(
|
|
3785
|
+
e.view && !(e.view instanceof We) && e.view.then(function(e) {
|
|
3786
|
+
n.setView(new We(e));
|
|
3787
|
+
}), this.controls.addEventListener(E.ADD, ((e) => {
|
|
3646
3788
|
e.element.setMap(this);
|
|
3647
|
-
}), this.controls.addEventListener(
|
|
3789
|
+
})), this.controls.addEventListener(E.REMOVE, ((e) => {
|
|
3648
3790
|
e.element.setMap(null);
|
|
3649
|
-
}), this.interactions.addEventListener(
|
|
3791
|
+
})), this.interactions.addEventListener(E.ADD, ((e) => {
|
|
3650
3792
|
e.element.setMap(this);
|
|
3651
|
-
}), this.interactions.addEventListener(
|
|
3793
|
+
})), this.interactions.addEventListener(E.REMOVE, ((e) => {
|
|
3652
3794
|
e.element.setMap(null);
|
|
3653
|
-
}), this.overlays_.addEventListener(
|
|
3795
|
+
})), this.overlays_.addEventListener(E.ADD, ((e) => {
|
|
3654
3796
|
this.addOverlayInternal_(e.element);
|
|
3655
|
-
}), this.overlays_.addEventListener(
|
|
3797
|
+
})), this.overlays_.addEventListener(E.REMOVE, ((e) => {
|
|
3656
3798
|
let t = e.element.getId();
|
|
3657
3799
|
t !== void 0 && delete this.overlayIdIndex_[t.toString()], e.element.setMap(null);
|
|
3658
|
-
}), this.controls.forEach((e) => {
|
|
3800
|
+
})), this.controls.forEach((e) => {
|
|
3659
3801
|
e.setMap(this);
|
|
3660
3802
|
}), this.interactions.forEach((e) => {
|
|
3661
3803
|
e.setMap(this);
|
|
@@ -3671,7 +3813,7 @@ var Vi = class extends u {
|
|
|
3671
3813
|
this.getLayerGroup().getLayers().push(e);
|
|
3672
3814
|
}
|
|
3673
3815
|
handleLayerAdd_(e) {
|
|
3674
|
-
|
|
3816
|
+
qi(e.layer, this);
|
|
3675
3817
|
}
|
|
3676
3818
|
addOverlay(e) {
|
|
3677
3819
|
this.getOverlays().push(e);
|
|
@@ -3685,10 +3827,10 @@ var Vi = class extends u {
|
|
|
3685
3827
|
}
|
|
3686
3828
|
forEachFeatureAtPixel(e, t, n) {
|
|
3687
3829
|
if (!this.frameState_ || !this.renderer_) return;
|
|
3688
|
-
let
|
|
3830
|
+
let i = this.getCoordinateFromPixelInternal(e);
|
|
3689
3831
|
n = n === void 0 ? {} : n;
|
|
3690
|
-
let
|
|
3691
|
-
return this.renderer_.forEachFeatureAtCoordinate(
|
|
3832
|
+
let a = n.hitTolerance === void 0 ? 0 : n.hitTolerance, o = n.layerFilter === void 0 ? r : n.layerFilter, s = n.checkWrapped !== !1;
|
|
3833
|
+
return this.renderer_.forEachFeatureAtCoordinate(i, this.frameState_, a, s, t, null, o, null);
|
|
3692
3834
|
}
|
|
3693
3835
|
getFeaturesAtPixel(e, t) {
|
|
3694
3836
|
let n = [];
|
|
@@ -3700,7 +3842,7 @@ var Vi = class extends u {
|
|
|
3700
3842
|
let e = [];
|
|
3701
3843
|
function t(n) {
|
|
3702
3844
|
n.forEach(function(n) {
|
|
3703
|
-
n instanceof
|
|
3845
|
+
n instanceof Vi ? t(n.getLayers()) : e.push(n);
|
|
3704
3846
|
});
|
|
3705
3847
|
}
|
|
3706
3848
|
return t(this.getLayers()), e;
|
|
@@ -3709,8 +3851,8 @@ var Vi = class extends u {
|
|
|
3709
3851
|
if (!this.frameState_ || !this.renderer_) return !1;
|
|
3710
3852
|
let n = this.getCoordinateFromPixelInternal(e);
|
|
3711
3853
|
t = t === void 0 ? {} : t;
|
|
3712
|
-
let
|
|
3713
|
-
return this.renderer_.hasFeatureAtCoordinate(n, this.frameState_,
|
|
3854
|
+
let i = t.layerFilter === void 0 ? r : t.layerFilter, a = t.hitTolerance === void 0 ? 0 : t.hitTolerance, o = t.checkWrapped !== !1;
|
|
3855
|
+
return this.renderer_.hasFeatureAtCoordinate(n, this.frameState_, a, o, i, null);
|
|
3714
3856
|
}
|
|
3715
3857
|
getEventCoordinate(e) {
|
|
3716
3858
|
return this.getCoordinateFromPixel(this.getEventPixel(e));
|
|
@@ -3723,17 +3865,22 @@ var Vi = class extends u {
|
|
|
3723
3865
|
return [(a.clientX - t.left) / r, (a.clientY - t.top) / i];
|
|
3724
3866
|
}
|
|
3725
3867
|
getTarget() {
|
|
3726
|
-
return this.get(
|
|
3868
|
+
return this.get(Q.TARGET);
|
|
3727
3869
|
}
|
|
3728
3870
|
getTargetElement() {
|
|
3729
3871
|
return this.targetElement_;
|
|
3730
3872
|
}
|
|
3731
|
-
getCoordinateFromPixel(e) {
|
|
3732
|
-
|
|
3873
|
+
getCoordinateFromPixel(e, t) {
|
|
3874
|
+
let n = ce(this.getCoordinateFromPixelInternal(e), this.getView().getProjection());
|
|
3875
|
+
if (t?.wrapX && n) {
|
|
3876
|
+
let e = y() || this.getView().getProjection();
|
|
3877
|
+
l(n, e);
|
|
3878
|
+
}
|
|
3879
|
+
return n;
|
|
3733
3880
|
}
|
|
3734
3881
|
getCoordinateFromPixelInternal(e) {
|
|
3735
3882
|
let t = this.frameState_;
|
|
3736
|
-
return t ?
|
|
3883
|
+
return t ? Ie(t.pixelToCoordinateTransform, e.slice()) : null;
|
|
3737
3884
|
}
|
|
3738
3885
|
getControls() {
|
|
3739
3886
|
return this.controls;
|
|
@@ -3749,11 +3896,11 @@ var Vi = class extends u {
|
|
|
3749
3896
|
return this.interactions;
|
|
3750
3897
|
}
|
|
3751
3898
|
getLayerGroup() {
|
|
3752
|
-
return this.get(
|
|
3899
|
+
return this.get(Q.LAYERGROUP);
|
|
3753
3900
|
}
|
|
3754
3901
|
setLayers(e) {
|
|
3755
3902
|
let t = this.getLayerGroup();
|
|
3756
|
-
if (e instanceof
|
|
3903
|
+
if (e instanceof D) {
|
|
3757
3904
|
t.setLayers(e);
|
|
3758
3905
|
return;
|
|
3759
3906
|
}
|
|
@@ -3763,6 +3910,9 @@ var Vi = class extends u {
|
|
|
3763
3910
|
getLayers() {
|
|
3764
3911
|
return this.getLayerGroup().getLayers();
|
|
3765
3912
|
}
|
|
3913
|
+
updateRenderComplete_() {
|
|
3914
|
+
this.renderComplete_ = (this.hasListener(Ne.LOADSTART) || this.hasListener(Ne.LOADEND) || this.hasListener($e.RENDERCOMPLETE)) && !this.tileQueue_.getTilesLoading() && !this.tileQueue_.getCount() && !this.getLoadingOrNotReady();
|
|
3915
|
+
}
|
|
3766
3916
|
getLoadingOrNotReady() {
|
|
3767
3917
|
let e = this.getLayerGroup().getLayerStatesArray();
|
|
3768
3918
|
for (let t = 0, n = e.length; t < n; ++t) {
|
|
@@ -3775,13 +3925,13 @@ var Vi = class extends u {
|
|
|
3775
3925
|
}
|
|
3776
3926
|
return !1;
|
|
3777
3927
|
}
|
|
3778
|
-
getPixelFromCoordinate(e) {
|
|
3779
|
-
let
|
|
3780
|
-
return this.getPixelFromCoordinateInternal(
|
|
3928
|
+
getPixelFromCoordinate(e, t) {
|
|
3929
|
+
let n = this.getView().getProjection(), r = b(e, n);
|
|
3930
|
+
return t?.wrapX && this.frameState_ && (r = le(r.slice(), n, this.frameState_.viewState.center[0])), this.getPixelFromCoordinateInternal(r);
|
|
3781
3931
|
}
|
|
3782
3932
|
getPixelFromCoordinateInternal(e) {
|
|
3783
3933
|
let t = this.frameState_;
|
|
3784
|
-
return t ?
|
|
3934
|
+
return t ? Ie(t.coordinateToPixelTransform, e.slice(0, 2)) : null;
|
|
3785
3935
|
}
|
|
3786
3936
|
getPixelRatio() {
|
|
3787
3937
|
return this.pixelRatio_;
|
|
@@ -3793,10 +3943,10 @@ var Vi = class extends u {
|
|
|
3793
3943
|
return this.renderer_;
|
|
3794
3944
|
}
|
|
3795
3945
|
getSize() {
|
|
3796
|
-
return this.get(
|
|
3946
|
+
return this.get(Q.SIZE);
|
|
3797
3947
|
}
|
|
3798
3948
|
getView() {
|
|
3799
|
-
return this.get(
|
|
3949
|
+
return this.get(Q.VIEW);
|
|
3800
3950
|
}
|
|
3801
3951
|
getViewport() {
|
|
3802
3952
|
return this.viewport_;
|
|
@@ -3812,17 +3962,21 @@ var Vi = class extends u {
|
|
|
3812
3962
|
return e ? e.ownerDocument : document;
|
|
3813
3963
|
}
|
|
3814
3964
|
getTilePriority(e, t, n, r) {
|
|
3815
|
-
return
|
|
3965
|
+
return Pi(this.frameState_, e, t, n, r);
|
|
3816
3966
|
}
|
|
3817
3967
|
handleBrowserEvent(e, t) {
|
|
3818
3968
|
t ||= e.type;
|
|
3819
|
-
let n = new
|
|
3969
|
+
let n = new k(t, this, e);
|
|
3820
3970
|
this.handleMapBrowserEvent(n);
|
|
3821
3971
|
}
|
|
3972
|
+
handleCtrlKey_(e) {
|
|
3973
|
+
let t = e;
|
|
3974
|
+
this.ctrlKey_ = t.key === "Control" ? t.type === x.KEYDOWN : t.ctrlKey;
|
|
3975
|
+
}
|
|
3822
3976
|
handleMapBrowserEvent(e) {
|
|
3823
|
-
if (!this.frameState_) return;
|
|
3977
|
+
if (e.originalEvent.ctrlKey === !1 && (this.ctrlKey_ = !1), e.ctrlKey = this.ctrlKey_, !this.frameState_) return;
|
|
3824
3978
|
let t = e.originalEvent, n = t.type;
|
|
3825
|
-
if (n ===
|
|
3979
|
+
if (n === ki.POINTERDOWN || n === x.WHEEL || n === x.KEYDOWN) {
|
|
3826
3980
|
let e = this.getOwnerDocument(), n = this.viewport_.getRootNode ? this.viewport_.getRootNode() : e, r = t.target, i = n instanceof ShadowRoot ? n.host === r ? n.host.ownerDocument : n : n === e ? e.documentElement : n;
|
|
3827
3981
|
if (this.overlayContainerStopEvent_.contains(r) || !i.contains(r)) return;
|
|
3828
3982
|
}
|
|
@@ -3837,14 +3991,17 @@ var Vi = class extends u {
|
|
|
3837
3991
|
handlePostRender() {
|
|
3838
3992
|
let e = this.frameState_, t = this.tileQueue_;
|
|
3839
3993
|
if (!t.isEmpty()) {
|
|
3840
|
-
let n = this.maxTilesLoading_, r = n, i = e ? e.viewHints : void 0
|
|
3841
|
-
if (
|
|
3994
|
+
let n = this.maxTilesLoading_, r = n, i = e ? e.viewHints : void 0;
|
|
3995
|
+
if (i && (i[He.ANIMATING] || i[He.INTERACTING])) {
|
|
3842
3996
|
let t = Date.now() - e.time > 8;
|
|
3843
3997
|
n = t ? 0 : 8, r = t ? 0 : 2;
|
|
3844
3998
|
}
|
|
3845
|
-
t.getTilesLoading() < n
|
|
3999
|
+
if (t.getTilesLoading() < n) {
|
|
4000
|
+
let e = t.getCount();
|
|
4001
|
+
t.reprioritize(), t.getCount() < e && this.updateRenderComplete_(), t.loadMoreTiles(n, r);
|
|
4002
|
+
}
|
|
3846
4003
|
}
|
|
3847
|
-
e && this.renderer_ && !e.animate && (this.renderComplete_ ? (this.hasListener(
|
|
4004
|
+
e && this.renderer_ && !e.animate && (this.renderComplete_ ? (this.hasListener($e.RENDERCOMPLETE) && this.renderer_.dispatchRenderEvent($e.RENDERCOMPLETE, e), this.loaded_ === !1 && (this.loaded_ = !0, this.dispatchEvent(new fn(Ne.LOADEND, this, e)))) : this.loaded_ === !0 && (this.loaded_ = !1, this.dispatchEvent(new fn(Ne.LOADSTART, this, e))));
|
|
3848
4005
|
let n = this.postRenderFunctions_;
|
|
3849
4006
|
if (e) for (let t = 0, r = n.length; t < r; ++t) n[t](this, e);
|
|
3850
4007
|
n.length = 0;
|
|
@@ -3854,10 +4011,13 @@ var Vi = class extends u {
|
|
|
3854
4011
|
}
|
|
3855
4012
|
handleTargetChanged_() {
|
|
3856
4013
|
if (this.mapBrowserEventHandler_) {
|
|
3857
|
-
|
|
3858
|
-
|
|
4014
|
+
let e = this.targetChangeHandlerKeys_;
|
|
4015
|
+
for (let t = 0, n = e.length; t < n; ++t) S(e[t]);
|
|
4016
|
+
this.targetChangeHandlerKeys_ = null;
|
|
4017
|
+
let t = this.getOwnerDocument();
|
|
4018
|
+
t.removeEventListener(x.KEYDOWN, this.boundHandleCtrlKey_, !0), t.removeEventListener(x.KEYUP, this.boundHandleCtrlKey_, !0), this.ctrlKey_ = !1, this.viewport_.removeEventListener(x.CONTEXTMENU, this.boundHandleBrowserEvent_), this.viewport_.removeEventListener(x.WHEEL, this.boundHandleBrowserEvent_), this.mapBrowserEventHandler_.dispose(), this.mapBrowserEventHandler_ = null, this.viewport_.remove();
|
|
3859
4019
|
}
|
|
3860
|
-
if (this.targetElement_ && !
|
|
4020
|
+
if (this.targetElement_ && !w(this.targetElement_)) {
|
|
3861
4021
|
this.resizeObserver_?.unobserve(this.targetElement_);
|
|
3862
4022
|
let e = this.targetElement_.getRootNode();
|
|
3863
4023
|
e instanceof ShadowRoot && this.resizeObserver_.unobserve(e.host), this.setSize(void 0);
|
|
@@ -3865,17 +4025,19 @@ var Vi = class extends u {
|
|
|
3865
4025
|
let e = this.getTarget(), t = typeof e == "string" ? document.getElementById(e) : e;
|
|
3866
4026
|
if (this.targetElement_ = t, !t) this.renderer_ &&= (clearTimeout(this.postRenderTimeoutHandle_), this.postRenderTimeoutHandle_ = void 0, this.postRenderFunctions_.length = 0, this.renderer_.dispose(), null), this.animationDelayKey_ &&= (cancelAnimationFrame(this.animationDelayKey_), void 0);
|
|
3867
4027
|
else {
|
|
3868
|
-
if (
|
|
3869
|
-
this.mapBrowserEventHandler_ = new
|
|
3870
|
-
for (let e in
|
|
3871
|
-
this.viewport_.addEventListener(
|
|
3872
|
-
let e;
|
|
3873
|
-
|
|
4028
|
+
if (w(t) || t.appendChild(this.viewport_), this.renderer_ ||= new Wi(this), !w(t)) {
|
|
4029
|
+
this.mapBrowserEventHandler_ = new Ai(this, this.moveTolerance_);
|
|
4030
|
+
for (let e in O) this.mapBrowserEventHandler_.addEventListener(O[e], this.handleMapBrowserEvent.bind(this));
|
|
4031
|
+
this.viewport_.addEventListener(x.CONTEXTMENU, this.boundHandleBrowserEvent_, !1), this.viewport_.addEventListener(x.WHEEL, this.boundHandleBrowserEvent_, fe ? { passive: !1 } : !1);
|
|
4032
|
+
let e = this.getOwnerDocument();
|
|
4033
|
+
e.addEventListener(x.KEYDOWN, this.boundHandleCtrlKey_, !0), e.addEventListener(x.KEYUP, this.boundHandleCtrlKey_, !0);
|
|
4034
|
+
let n;
|
|
4035
|
+
if (this.keyboardEventTarget_) n = this.keyboardEventTarget_;
|
|
3874
4036
|
else {
|
|
3875
|
-
let
|
|
3876
|
-
|
|
4037
|
+
let e = t.getRootNode();
|
|
4038
|
+
n = e instanceof ShadowRoot ? e.host : t;
|
|
3877
4039
|
}
|
|
3878
|
-
if (this.targetChangeHandlerKeys_ = [
|
|
4040
|
+
if (this.targetChangeHandlerKeys_ = [g(n, x.KEYDOWN, this.handleBrowserEvent, this), g(n, x.KEYPRESS, this.handleBrowserEvent, this)], !w(t)) {
|
|
3879
4041
|
let e = t.getRootNode();
|
|
3880
4042
|
e instanceof ShadowRoot && this.resizeObserver_.observe(e.host), this.resizeObserver_?.observe(t);
|
|
3881
4043
|
}
|
|
@@ -3890,18 +4052,18 @@ var Vi = class extends u {
|
|
|
3890
4052
|
this.render();
|
|
3891
4053
|
}
|
|
3892
4054
|
handleViewChanged_() {
|
|
3893
|
-
this.viewPropertyListenerKey_ &&= (
|
|
4055
|
+
this.viewPropertyListenerKey_ &&= (S(this.viewPropertyListenerKey_), null), this.viewChangeListenerKey_ &&= (S(this.viewChangeListenerKey_), null);
|
|
3894
4056
|
let e = this.getView();
|
|
3895
|
-
e && (this.updateViewportSize_(this.getSize()), this.viewPropertyListenerKey_ =
|
|
4057
|
+
e && (this.updateViewportSize_(this.getSize()), this.viewPropertyListenerKey_ = g(e, ae.PROPERTYCHANGE, this.handleViewPropertyChanged_, this), this.viewChangeListenerKey_ = g(e, x.CHANGE, this.handleViewPropertyChanged_, this), e.resolveConstraints(0)), this.render();
|
|
3896
4058
|
}
|
|
3897
4059
|
handleLayerGroupChanged_() {
|
|
3898
|
-
this.layerGroupPropertyListenerKeys_ &&= (this.layerGroupPropertyListenerKeys_.forEach(
|
|
4060
|
+
this.layerGroupPropertyListenerKeys_ &&= (this.layerGroupPropertyListenerKeys_.forEach(S), null);
|
|
3899
4061
|
let e = this.getLayerGroup();
|
|
3900
4062
|
e && (this.handleLayerAdd_(new $("addlayer", e)), this.layerGroupPropertyListenerKeys_ = [
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
4063
|
+
g(e, ae.PROPERTYCHANGE, this.render, this),
|
|
4064
|
+
g(e, x.CHANGE, this.render, this),
|
|
4065
|
+
g(e, "addlayer", this.handleLayerAdd_, this),
|
|
4066
|
+
g(e, "removelayer", this.handleLayerRemove_, this)
|
|
3905
4067
|
]), this.render();
|
|
3906
4068
|
}
|
|
3907
4069
|
isRendered() {
|
|
@@ -3934,97 +4096,97 @@ var Vi = class extends u {
|
|
|
3934
4096
|
return this.getLayerGroup().getLayers().remove(e);
|
|
3935
4097
|
}
|
|
3936
4098
|
handleLayerRemove_(e) {
|
|
3937
|
-
|
|
4099
|
+
Ki(e.layer);
|
|
3938
4100
|
}
|
|
3939
4101
|
removeOverlay(e) {
|
|
3940
4102
|
return this.getOverlays().remove(e);
|
|
3941
4103
|
}
|
|
3942
4104
|
renderFrame_(e) {
|
|
3943
|
-
let
|
|
3944
|
-
if (
|
|
3945
|
-
let i =
|
|
4105
|
+
let n = this.getSize(), r = this.getView(), i = this.frameState_, a = null;
|
|
4106
|
+
if (n !== void 0 && ye(n) && r && r.isDef()) {
|
|
4107
|
+
let i = r.getHints(this.frameState_ ? this.frameState_.viewHints : void 0), o = r.getState();
|
|
3946
4108
|
if (a = {
|
|
3947
4109
|
animate: !1,
|
|
3948
4110
|
coordinateToPixelTransform: this.coordinateToPixelTransform_,
|
|
3949
4111
|
declutter: null,
|
|
3950
|
-
extent:
|
|
4112
|
+
extent: t(o.center, o.resolution, o.rotation, n),
|
|
3951
4113
|
index: this.frameIndex_++,
|
|
3952
4114
|
layerIndex: 0,
|
|
3953
4115
|
layerStatesArray: this.getLayerGroup().getLayerStatesArray(),
|
|
3954
4116
|
pixelRatio: this.pixelRatio_,
|
|
3955
4117
|
pixelToCoordinateTransform: this.pixelToCoordinateTransform_,
|
|
3956
4118
|
postRenderFunctions: [],
|
|
3957
|
-
size:
|
|
4119
|
+
size: n,
|
|
3958
4120
|
tileQueue: this.tileQueue_,
|
|
3959
4121
|
time: e,
|
|
3960
4122
|
usedTiles: {},
|
|
3961
4123
|
viewState: o,
|
|
3962
4124
|
viewHints: i,
|
|
3963
4125
|
wantedTiles: {},
|
|
3964
|
-
mapId:
|
|
4126
|
+
mapId: m(this),
|
|
3965
4127
|
renderTargets: {}
|
|
3966
4128
|
}, o.nextCenter && o.nextResolution) {
|
|
3967
4129
|
let e = isNaN(o.nextRotation) ? o.rotation : o.nextRotation;
|
|
3968
|
-
a.nextExtent =
|
|
4130
|
+
a.nextExtent = t(o.nextCenter, o.nextResolution, e, n);
|
|
3969
4131
|
}
|
|
3970
4132
|
}
|
|
3971
|
-
this.frameState_ = a, this.renderer_.renderFrame(a), a && (a.animate && this.render(), Array.prototype.push.apply(this.postRenderFunctions_, a.postRenderFunctions), i && (this.previousExtent_ && (
|
|
4133
|
+
this.frameState_ = a, this.renderer_.renderFrame(a), a && (a.animate && this.render(), Array.prototype.push.apply(this.postRenderFunctions_, a.postRenderFunctions), i && (this.previousExtent_ && (o(this.previousExtent_) || te(a.extent, this.previousExtent_)) || (this.dispatchEvent(new fn(Ne.MOVESTART, this, i)), this.previousExtent_ = re(this.previousExtent_))), this.previousExtent_ && !a.viewHints[He.ANIMATING] && !a.viewHints[He.INTERACTING] && !te(a.extent, this.previousExtent_) && (this.dispatchEvent(new fn(Ne.MOVEEND, this, a)), se(a.extent, this.previousExtent_))), this.dispatchEvent(new fn(Ne.POSTRENDER, this, a)), this.updateRenderComplete_(), this.postRenderTimeoutHandle_ ||= setTimeout(() => {
|
|
3972
4134
|
this.postRenderTimeoutHandle_ = void 0, this.handlePostRender();
|
|
3973
4135
|
}, 0);
|
|
3974
4136
|
}
|
|
3975
4137
|
setLayerGroup(e) {
|
|
3976
4138
|
let t = this.getLayerGroup();
|
|
3977
|
-
t && this.handleLayerRemove_(new $("removelayer", t)), this.set(
|
|
4139
|
+
t && this.handleLayerRemove_(new $("removelayer", t)), this.set(Q.LAYERGROUP, e);
|
|
3978
4140
|
}
|
|
3979
4141
|
setSize(e) {
|
|
3980
|
-
this.set(
|
|
4142
|
+
this.set(Q.SIZE, e);
|
|
3981
4143
|
}
|
|
3982
4144
|
setTarget(e) {
|
|
3983
|
-
this.set(
|
|
4145
|
+
this.set(Q.TARGET, e);
|
|
3984
4146
|
}
|
|
3985
4147
|
setView(e) {
|
|
3986
|
-
if (!e || e instanceof
|
|
3987
|
-
this.set(
|
|
4148
|
+
if (!e || e instanceof We) {
|
|
4149
|
+
this.set(Q.VIEW, e);
|
|
3988
4150
|
return;
|
|
3989
4151
|
}
|
|
3990
|
-
this.set(
|
|
4152
|
+
this.set(Q.VIEW, new We());
|
|
3991
4153
|
let t = this;
|
|
3992
4154
|
e.then(function(e) {
|
|
3993
|
-
t.setView(new
|
|
4155
|
+
t.setView(new We(e));
|
|
3994
4156
|
});
|
|
3995
4157
|
}
|
|
3996
4158
|
updateSize() {
|
|
3997
|
-
let e = this.getTargetElement(),
|
|
4159
|
+
let e = this.getTargetElement(), t;
|
|
3998
4160
|
if (e) {
|
|
3999
|
-
let
|
|
4000
|
-
if (
|
|
4001
|
-
let
|
|
4002
|
-
|
|
4161
|
+
let n, r;
|
|
4162
|
+
if (w(e)) {
|
|
4163
|
+
let t = e.getContext("2d").getTransform();
|
|
4164
|
+
n = e.width / t.a, r = e.height / t.d;
|
|
4003
4165
|
} else {
|
|
4004
|
-
let
|
|
4005
|
-
|
|
4166
|
+
let t = getComputedStyle(e);
|
|
4167
|
+
n = e.offsetWidth - parseFloat(t.borderLeftWidth) - parseFloat(t.paddingLeft) - parseFloat(t.paddingRight) - parseFloat(t.borderRightWidth), r = e.offsetHeight - parseFloat(t.borderTopWidth) - parseFloat(t.paddingTop) - parseFloat(t.paddingBottom) - parseFloat(t.borderBottomWidth);
|
|
4006
4168
|
}
|
|
4007
|
-
!isNaN(
|
|
4169
|
+
!isNaN(n) && !isNaN(r) && (t = [Math.max(0, n), Math.max(0, r)], !ye(t) && (e.offsetWidth || e.offsetHeight || e.getClientRects().length) && ee("No map visible because the map container's width or height are 0."));
|
|
4008
4170
|
}
|
|
4009
|
-
let
|
|
4010
|
-
!
|
|
4171
|
+
let n = this.getSize();
|
|
4172
|
+
!t || n && oe(t, n) || (this.updateViewportSize_(t), this.setSize(t));
|
|
4011
4173
|
}
|
|
4012
4174
|
updateViewportSize_(e) {
|
|
4013
4175
|
let t = this.getView();
|
|
4014
4176
|
t && t.setViewportSize(e);
|
|
4015
4177
|
}
|
|
4016
4178
|
};
|
|
4017
|
-
function
|
|
4179
|
+
function Yi(e) {
|
|
4018
4180
|
let t = null;
|
|
4019
4181
|
e.keyboardEventTarget !== void 0 && (t = typeof e.keyboardEventTarget == "string" ? document.getElementById(e.keyboardEventTarget) : e.keyboardEventTarget);
|
|
4020
|
-
let n = {}, r = e.layers && typeof e.layers.getLayers == "function" ? e.layers : new
|
|
4021
|
-
n[
|
|
4182
|
+
let n = {}, r = e.layers && typeof e.layers.getLayers == "function" ? e.layers : new Vi({ layers: e.layers });
|
|
4183
|
+
n[Q.LAYERGROUP] = r, n[Q.TARGET] = e.target, n[Q.VIEW] = e.view instanceof We ? e.view : new We();
|
|
4022
4184
|
let i;
|
|
4023
|
-
e.controls !== void 0 && (Array.isArray(e.controls) ? i = new
|
|
4185
|
+
e.controls !== void 0 && (Array.isArray(e.controls) ? i = new D(e.controls.slice()) : (T(typeof e.controls.getArray == "function", "Expected `controls` to be an array or an `ol/Collection.js`"), i = e.controls));
|
|
4024
4186
|
let a;
|
|
4025
|
-
e.interactions !== void 0 && (Array.isArray(e.interactions) ? a = new
|
|
4187
|
+
e.interactions !== void 0 && (Array.isArray(e.interactions) ? a = new D(e.interactions.slice()) : (T(typeof e.interactions.getArray == "function", "Expected `interactions` to be an array or an `ol/Collection.js`"), a = e.interactions));
|
|
4026
4188
|
let o;
|
|
4027
|
-
return e.overlays === void 0 ? o = new
|
|
4189
|
+
return e.overlays === void 0 ? o = new D() : Array.isArray(e.overlays) ? o = new D(e.overlays.slice()) : (T(typeof e.overlays.getArray == "function", "Expected `overlays` to be an array or an `ol/Collection.js`"), o = e.overlays), {
|
|
4028
4190
|
controls: i,
|
|
4029
4191
|
interactions: a,
|
|
4030
4192
|
keyboardEventTarget: t,
|
|
@@ -4032,4 +4194,4 @@ function Hi(e) {
|
|
|
4032
4194
|
values: n
|
|
4033
4195
|
};
|
|
4034
4196
|
}
|
|
4035
|
-
export {
|
|
4197
|
+
export { vn as A, Gt as B, Tn as C, Bn as D, Vn as E, jt as F, O as G, zt as H, Ft as I, E as J, lt as K, Lt as L, A as M, k as N, zn as O, Kt as P, Bt as R, On as S, Dn as T, Tt as U, Ht as V, wt as W, xn as _, Fi as a, Cn as b, Kr as c, zr as d, Rr as f, kn as g, Un as h, Li as i, _n as j, Fn as k, J as l, Gn as m, Gi as n, Q as o, Lr as p, D as q, Vi as r, Di as s, Ji as t, Ur as u, bn as v, En as w, wn as x, Sn as y, Rt as z };
|