@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,8 +1,8 @@
|
|
|
1
1
|
import { r as e } from "./rolldown-runtime-DsPmjQRF.js";
|
|
2
|
-
import {
|
|
3
|
-
import { S as
|
|
2
|
+
import { Ct as t, J as n, Kt as r, Mt as i, N as a, Nt as o, O as s, P as c, Qt as l, T as u, U as d, V as f, W as p, X as m, Yt as h, at as g, bt as _, dt as v, f as ee, g as te, i as y, in as ne, k as re, kt as b, l as x, lt as ie, m as ae, nn as oe, nt as se, o as ce, q as S, qt as le, st as ue, u as C, ut as de, v as fe, wt as w, y as pe, zt as me } from "./proj-0ED4AWuV.js";
|
|
3
|
+
import { S as T, T as he, _ as ge, b as _e, i as ve, m as ye, r as be, w as xe } from "./transform-bRfffInI.js";
|
|
4
4
|
// ../node_modules/ol/geom/flat/transform.js
|
|
5
|
-
function
|
|
5
|
+
function E(e, t, n, r, i, a, o) {
|
|
6
6
|
a ||= [], o ||= 2;
|
|
7
7
|
let s = 0;
|
|
8
8
|
for (let c = t; c < n; c += r) {
|
|
@@ -12,7 +12,7 @@ function T(e, t, n, r, i, a, o) {
|
|
|
12
12
|
}
|
|
13
13
|
return a && a.length != s && (a.length = s), a;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function Se(e, t, n, r, i, a, o) {
|
|
16
16
|
o ||= [];
|
|
17
17
|
let s = Math.cos(i), c = Math.sin(i), l = a[0], u = a[1], d = 0;
|
|
18
18
|
for (let i = t; i < n; i += r) {
|
|
@@ -22,7 +22,7 @@ function Ce(e, t, n, r, i, a, o) {
|
|
|
22
22
|
}
|
|
23
23
|
return o && o.length != d && (o.length = d), o;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function Ce(e, t, n, r, i, a, o, s) {
|
|
26
26
|
s ||= [];
|
|
27
27
|
let c = o[0], l = o[1], u = 0;
|
|
28
28
|
for (let o = t; o < n; o += r) {
|
|
@@ -32,7 +32,7 @@ function we(e, t, n, r, i, a, o, s) {
|
|
|
32
32
|
}
|
|
33
33
|
return s && s.length != u && (s.length = u), s;
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function we(e, t, n, r, i, a, o) {
|
|
36
36
|
o ||= [];
|
|
37
37
|
let s = 0;
|
|
38
38
|
for (let c = t; c < n; c += r) {
|
|
@@ -42,9 +42,9 @@ function Te(e, t, n, r, i, a, o) {
|
|
|
42
42
|
return o && o.length != s && (o.length = s), o;
|
|
43
43
|
}
|
|
44
44
|
// ../node_modules/ol/geom/Geometry.js
|
|
45
|
-
var
|
|
45
|
+
var Te = ve(), Ee = [NaN, NaN], De = class extends me {
|
|
46
46
|
constructor() {
|
|
47
|
-
super(), this.extent_ =
|
|
47
|
+
super(), this.extent_ = ue(), this.extentRevision_ = -1, this.simplifiedGeometryMaxMinSquaredTolerance = 0, this.simplifiedGeometryRevision = 0, this.simplifyTransformedInternal = le((e, t, n) => {
|
|
48
48
|
if (!n) return this.getSimplifiedGeometry(t);
|
|
49
49
|
let r = this.clone();
|
|
50
50
|
return r.applyTransform(n), r.getSimplifiedGeometry(t);
|
|
@@ -54,13 +54,13 @@ var Ee = ye(), De = [NaN, NaN], E = class extends d {
|
|
|
54
54
|
return this.simplifyTransformedInternal(this.getRevision(), e, t);
|
|
55
55
|
}
|
|
56
56
|
clone() {
|
|
57
|
-
return
|
|
57
|
+
return h();
|
|
58
58
|
}
|
|
59
59
|
closestPointXY(e, t, n, r) {
|
|
60
|
-
return
|
|
60
|
+
return h();
|
|
61
61
|
}
|
|
62
62
|
containsXY(e, t) {
|
|
63
|
-
return this.closestPointXY(e, t,
|
|
63
|
+
return this.closestPointXY(e, t, Ee, Number.MIN_VALUE) === 0;
|
|
64
64
|
}
|
|
65
65
|
getClosestPoint(e, t) {
|
|
66
66
|
return t ||= [NaN, NaN], this.closestPointXY(e[0], e[1], t, Infinity), t;
|
|
@@ -69,57 +69,59 @@ var Ee = ye(), De = [NaN, NaN], E = class extends d {
|
|
|
69
69
|
return this.containsXY(e[0], e[1]);
|
|
70
70
|
}
|
|
71
71
|
computeExtent(e) {
|
|
72
|
-
return
|
|
72
|
+
return h();
|
|
73
73
|
}
|
|
74
74
|
getExtent(e) {
|
|
75
75
|
if (this.extentRevision_ != this.getRevision()) {
|
|
76
76
|
let e = this.computeExtent(this.extent_);
|
|
77
|
-
(isNaN(e[0]) || isNaN(e[1])) &&
|
|
77
|
+
(isNaN(e[0]) || isNaN(e[1])) && ie(e), this.extentRevision_ = this.getRevision();
|
|
78
78
|
}
|
|
79
79
|
return o(this.extent_, e);
|
|
80
80
|
}
|
|
81
81
|
rotate(e, t) {
|
|
82
|
-
|
|
82
|
+
h();
|
|
83
83
|
}
|
|
84
84
|
scale(e, t, n) {
|
|
85
|
-
|
|
85
|
+
h();
|
|
86
86
|
}
|
|
87
87
|
simplify(e) {
|
|
88
88
|
return this.getSimplifiedGeometry(e * e);
|
|
89
89
|
}
|
|
90
90
|
getSimplifiedGeometry(e) {
|
|
91
|
-
return
|
|
91
|
+
return h();
|
|
92
92
|
}
|
|
93
93
|
getType() {
|
|
94
|
-
return
|
|
94
|
+
return h();
|
|
95
95
|
}
|
|
96
96
|
applyTransform(e) {
|
|
97
|
-
|
|
97
|
+
h();
|
|
98
98
|
}
|
|
99
99
|
intersectsExtent(e) {
|
|
100
|
-
return
|
|
100
|
+
return h();
|
|
101
101
|
}
|
|
102
102
|
translate(e, t) {
|
|
103
|
-
|
|
103
|
+
h();
|
|
104
104
|
}
|
|
105
105
|
transform(e, t) {
|
|
106
|
-
let
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
let
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
106
|
+
let n = ee(e);
|
|
107
|
+
if (!n) return this;
|
|
108
|
+
let r = n.getUnits() == "tile-pixels" ? function(e, r, i) {
|
|
109
|
+
let a = n.getExtent(), o = n.getWorldExtent(), s = w(o) / w(a);
|
|
110
|
+
be(Te, o[0], o[3], s, -s, 0, 0, 0);
|
|
111
|
+
let c = E(e, 0, e.length, i, Te, r), l = ae(n, t);
|
|
112
|
+
return l ? l(c, c, i) : c;
|
|
113
|
+
} : ae(n, t);
|
|
114
|
+
return r && this.applyTransform(r), this;
|
|
115
|
+
}
|
|
116
|
+
}, D = class extends De {
|
|
115
117
|
constructor() {
|
|
116
118
|
super(), this.layout = "XY", this.stride = 2, this.flatCoordinates;
|
|
117
119
|
}
|
|
118
120
|
computeExtent(e) {
|
|
119
|
-
return
|
|
121
|
+
return v(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, e);
|
|
120
122
|
}
|
|
121
123
|
getCoordinates() {
|
|
122
|
-
return
|
|
124
|
+
return h();
|
|
123
125
|
}
|
|
124
126
|
getFirstCoordinate() {
|
|
125
127
|
return this.flatCoordinates.slice(0, this.stride);
|
|
@@ -148,7 +150,7 @@ var Ee = ye(), De = [NaN, NaN], E = class extends d {
|
|
|
148
150
|
this.stride = O(e), this.layout = e, this.flatCoordinates = t;
|
|
149
151
|
}
|
|
150
152
|
setCoordinates(e, t) {
|
|
151
|
-
|
|
153
|
+
h();
|
|
152
154
|
}
|
|
153
155
|
setLayout(e, t, n) {
|
|
154
156
|
let r;
|
|
@@ -172,22 +174,22 @@ var Ee = ye(), De = [NaN, NaN], E = class extends d {
|
|
|
172
174
|
let n = this.getFlatCoordinates();
|
|
173
175
|
if (n) {
|
|
174
176
|
let r = this.getStride();
|
|
175
|
-
|
|
177
|
+
Se(n, 0, n.length, r, e, t, n), this.changed();
|
|
176
178
|
}
|
|
177
179
|
}
|
|
178
180
|
scale(e, t, n) {
|
|
179
|
-
t === void 0 && (t = e), n ||=
|
|
181
|
+
t === void 0 && (t = e), n ||= _(this.getExtent());
|
|
180
182
|
let r = this.getFlatCoordinates();
|
|
181
183
|
if (r) {
|
|
182
184
|
let i = this.getStride();
|
|
183
|
-
|
|
185
|
+
Ce(r, 0, r.length, i, e, t, n, r), this.changed();
|
|
184
186
|
}
|
|
185
187
|
}
|
|
186
188
|
translate(e, t) {
|
|
187
189
|
let n = this.getFlatCoordinates();
|
|
188
190
|
if (n) {
|
|
189
191
|
let r = this.getStride();
|
|
190
|
-
|
|
192
|
+
we(n, 0, n.length, r, e, t, n), this.changed();
|
|
191
193
|
}
|
|
192
194
|
}
|
|
193
195
|
};
|
|
@@ -203,29 +205,29 @@ function ke(e, t, n) {
|
|
|
203
205
|
let r = e.getFlatCoordinates();
|
|
204
206
|
if (!r) return null;
|
|
205
207
|
let i = e.getStride();
|
|
206
|
-
return
|
|
208
|
+
return E(r, 0, r.length, i, t, n);
|
|
207
209
|
}
|
|
208
210
|
// ../node_modules/ol/geom/flat/closest.js
|
|
209
|
-
function Ae(e, t, n, i, a, o
|
|
210
|
-
let
|
|
211
|
-
if (
|
|
211
|
+
function Ae(e, t, n, r, i, a, o) {
|
|
212
|
+
let s = e[t], c = e[t + 1], l = e[n] - s, u = e[n + 1] - c, f;
|
|
213
|
+
if (l === 0 && u === 0) f = t;
|
|
212
214
|
else {
|
|
213
|
-
let p = ((
|
|
215
|
+
let p = ((i - s) * l + (a - c) * u) / (l * l + u * u);
|
|
214
216
|
if (p > 1) f = n;
|
|
215
217
|
else if (p > 0) {
|
|
216
|
-
for (let
|
|
217
|
-
|
|
218
|
+
for (let i = 0; i < r; ++i) o[i] = d(e[t + i], e[n + i], p);
|
|
219
|
+
o.length = r;
|
|
218
220
|
return;
|
|
219
221
|
} else f = t;
|
|
220
222
|
}
|
|
221
|
-
for (let t = 0; t <
|
|
222
|
-
|
|
223
|
+
for (let t = 0; t < r; ++t) o[t] = e[f + t];
|
|
224
|
+
o.length = r;
|
|
223
225
|
}
|
|
224
226
|
function k(e, t, n, r, i) {
|
|
225
|
-
let
|
|
227
|
+
let a = e[t], o = e[t + 1];
|
|
226
228
|
for (t += r; t < n; t += r) {
|
|
227
|
-
let n = e[t], r = e[t + 1],
|
|
228
|
-
|
|
229
|
+
let n = e[t], r = e[t + 1], s = S(a, o, n, r);
|
|
230
|
+
s > i && (i = s), a = n, o = r;
|
|
229
231
|
}
|
|
230
232
|
return i;
|
|
231
233
|
}
|
|
@@ -243,27 +245,27 @@ function je(e, t, n, r, i) {
|
|
|
243
245
|
}
|
|
244
246
|
return i;
|
|
245
247
|
}
|
|
246
|
-
function j(e, t, n, r, i, o, s, c, l, u
|
|
247
|
-
if (t == n) return
|
|
248
|
-
let
|
|
248
|
+
function j(e, t, n, r, i, a, o, s, c, l, u) {
|
|
249
|
+
if (t == n) return l;
|
|
250
|
+
let d, f;
|
|
249
251
|
if (i === 0) {
|
|
250
|
-
if (
|
|
251
|
-
for (
|
|
252
|
-
return
|
|
252
|
+
if (f = S(o, s, e[t], e[t + 1]), f < l) {
|
|
253
|
+
for (d = 0; d < r; ++d) c[d] = e[t + d];
|
|
254
|
+
return c.length = r, f;
|
|
253
255
|
}
|
|
254
|
-
return
|
|
256
|
+
return l;
|
|
255
257
|
}
|
|
256
|
-
|
|
257
|
-
let
|
|
258
|
-
for (;
|
|
259
|
-
for (
|
|
260
|
-
|
|
261
|
-
} else
|
|
262
|
-
if (
|
|
263
|
-
for (
|
|
264
|
-
|
|
258
|
+
u ||= [NaN, NaN];
|
|
259
|
+
let p = t + r;
|
|
260
|
+
for (; p < n;) if (Ae(e, p - r, p, r, o, s, u), f = S(o, s, u[0], u[1]), f < l) {
|
|
261
|
+
for (l = f, d = 0; d < r; ++d) c[d] = u[d];
|
|
262
|
+
c.length = r, p += r;
|
|
263
|
+
} else p += r * Math.max((Math.sqrt(f) - Math.sqrt(l)) / i | 0, 1);
|
|
264
|
+
if (a && (Ae(e, n - r, t, r, o, s, u), f = S(o, s, u[0], u[1]), f < l)) {
|
|
265
|
+
for (l = f, d = 0; d < r; ++d) c[d] = u[d];
|
|
266
|
+
c.length = r;
|
|
265
267
|
}
|
|
266
|
-
return
|
|
268
|
+
return l;
|
|
267
269
|
}
|
|
268
270
|
function M(e, t, n, r, i, a, o, s, c, l, u) {
|
|
269
271
|
u ||= [NaN, NaN];
|
|
@@ -283,7 +285,7 @@ function Me(e, t, n, r, i, a, o, s, c, l, u) {
|
|
|
283
285
|
}
|
|
284
286
|
// ../node_modules/ol/geom/flat/deflate.js
|
|
285
287
|
function Ne(e, t, n, r) {
|
|
286
|
-
for (let
|
|
288
|
+
for (let i = 0; i < r; ++i) e[t++] = n[i];
|
|
287
289
|
return t;
|
|
288
290
|
}
|
|
289
291
|
function N(e, t, n, r) {
|
|
@@ -337,25 +339,25 @@ function Fe(e, t, n, r, i) {
|
|
|
337
339
|
return i.length = a, i;
|
|
338
340
|
}
|
|
339
341
|
// ../node_modules/ol/geom/flat/simplify.js
|
|
340
|
-
function L(e, t,
|
|
341
|
-
let
|
|
342
|
-
if (
|
|
343
|
-
for (; t <
|
|
344
|
-
return
|
|
345
|
-
}
|
|
346
|
-
let
|
|
347
|
-
|
|
348
|
-
let
|
|
349
|
-
for (;
|
|
350
|
-
let
|
|
351
|
-
for (let t =
|
|
352
|
-
let
|
|
353
|
-
|
|
342
|
+
function L(e, t, r, i, a, o, s) {
|
|
343
|
+
let c = (r - t) / i;
|
|
344
|
+
if (c < 3) {
|
|
345
|
+
for (; t < r; t += i) o[s++] = e[t], o[s++] = e[t + 1];
|
|
346
|
+
return s;
|
|
347
|
+
}
|
|
348
|
+
let l = Array(c);
|
|
349
|
+
l[0] = 1, l[c - 1] = 1;
|
|
350
|
+
let u = [t, r - i], d = 0;
|
|
351
|
+
for (; u.length > 0;) {
|
|
352
|
+
let r = u.pop(), o = u.pop(), s = 0, c = e[o], f = e[o + 1], p = e[r], m = e[r + 1];
|
|
353
|
+
for (let t = o + i; t < r; t += i) {
|
|
354
|
+
let r = e[t], i = e[t + 1], a = n(r, i, c, f, p, m);
|
|
355
|
+
a > s && (d = t, s = a);
|
|
354
356
|
}
|
|
355
|
-
|
|
357
|
+
s > a && (l[(d - t) / i] = 1, o + i < d && u.push(o, d), d + i < r && u.push(d, r));
|
|
356
358
|
}
|
|
357
|
-
for (let n = 0; n <
|
|
358
|
-
return
|
|
359
|
+
for (let n = 0; n < c; ++n) l[n] && (o[s++] = e[t + n * i], o[s++] = e[t + n * i + 1]);
|
|
360
|
+
return s;
|
|
359
361
|
}
|
|
360
362
|
function Ie(e, t, n, r, i, a, o, s) {
|
|
361
363
|
for (let c = 0, l = n.length; c < l; ++c) {
|
|
@@ -407,11 +409,11 @@ var ze = class e extends D {
|
|
|
407
409
|
return t.applyProperties(this), t;
|
|
408
410
|
}
|
|
409
411
|
closestPointXY(e, t, n, r) {
|
|
410
|
-
let i = this.flatCoordinates,
|
|
411
|
-
if (
|
|
412
|
+
let i = this.flatCoordinates, a = S(e, t, i[0], i[1]);
|
|
413
|
+
if (a < r) {
|
|
412
414
|
let e = this.stride;
|
|
413
415
|
for (let t = 0; t < e; ++t) n[t] = i[t];
|
|
414
|
-
return n.length = e,
|
|
416
|
+
return n.length = e, a;
|
|
415
417
|
}
|
|
416
418
|
return r;
|
|
417
419
|
}
|
|
@@ -419,13 +421,13 @@ var ze = class e extends D {
|
|
|
419
421
|
return this.flatCoordinates.slice();
|
|
420
422
|
}
|
|
421
423
|
computeExtent(e) {
|
|
422
|
-
return
|
|
424
|
+
return de(this.flatCoordinates, e);
|
|
423
425
|
}
|
|
424
426
|
getType() {
|
|
425
427
|
return "Point";
|
|
426
428
|
}
|
|
427
429
|
intersectsExtent(e) {
|
|
428
|
-
return
|
|
430
|
+
return g(e, this.flatCoordinates[0], this.flatCoordinates[1]);
|
|
429
431
|
}
|
|
430
432
|
setCoordinates(e, t) {
|
|
431
433
|
this.setLayout(t, e, 0), this.flatCoordinates ||= [], this.flatCoordinates.length = Ne(this.flatCoordinates, 0, e, this.stride), this.changed();
|
|
@@ -465,7 +467,7 @@ var V = class e extends D {
|
|
|
465
467
|
return new e(this.flatCoordinates.slice(), this.layout);
|
|
466
468
|
}
|
|
467
469
|
closestPointXY(e, t, n, r) {
|
|
468
|
-
return r <
|
|
470
|
+
return r < se(this.getExtent(), e, t) ? r : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(k(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0)), this.maxDeltaRevision_ = this.getRevision()), j(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, this.maxDelta_, !0, e, t, n, r));
|
|
469
471
|
}
|
|
470
472
|
getArea() {
|
|
471
473
|
return B(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
|
|
@@ -481,7 +483,7 @@ var V = class e extends D {
|
|
|
481
483
|
return "LinearRing";
|
|
482
484
|
}
|
|
483
485
|
intersectsExtent(e) {
|
|
484
|
-
return
|
|
486
|
+
return ye(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, e);
|
|
485
487
|
}
|
|
486
488
|
setCoordinates(e, t) {
|
|
487
489
|
this.setLayout(t, e, 1), this.flatCoordinates ||= [], this.flatCoordinates.length = N(this.flatCoordinates, 0, e, this.stride), this.changed();
|
|
@@ -489,20 +491,20 @@ var V = class e extends D {
|
|
|
489
491
|
};
|
|
490
492
|
// ../node_modules/ol/geom/flat/interiorpoint.js
|
|
491
493
|
function H(e, t, n, r, i, a, o) {
|
|
492
|
-
let s, c,
|
|
494
|
+
let s, c, u, d, f, p, m, h = i[a + 1], g = [];
|
|
493
495
|
for (let i = 0, a = n.length; i < a; ++i) {
|
|
494
496
|
let a = n[i];
|
|
495
|
-
for (
|
|
497
|
+
for (d = e[a - r], p = e[a - r + 1], s = t; s < a; s += r) f = e[s], m = e[s + 1], (h <= p && m <= h || p <= h && h <= m) && (u = (h - p) / (m - p) * (f - d) + d, g.push(u)), d = f, p = m;
|
|
496
498
|
}
|
|
497
499
|
let _ = NaN, v = -Infinity;
|
|
498
|
-
for (g.sort(
|
|
499
|
-
|
|
500
|
-
let i = Math.abs(
|
|
501
|
-
i > v && (
|
|
500
|
+
for (g.sort(l), d = g[0], s = 1, c = g.length; s < c; ++s) {
|
|
501
|
+
f = g[s];
|
|
502
|
+
let i = Math.abs(f - d);
|
|
503
|
+
i > v && (u = (d + f) / 2, _e(e, t, n, r, u, h) && (_ = u, v = i)), d = f;
|
|
502
504
|
}
|
|
503
|
-
return isNaN(_) && (_ = i[a]), o ? (o.push(_,
|
|
505
|
+
return isNaN(_) && (_ = i[a]), o ? (o.push(_, h, v), o) : [
|
|
504
506
|
_,
|
|
505
|
-
|
|
507
|
+
h,
|
|
506
508
|
v
|
|
507
509
|
];
|
|
508
510
|
}
|
|
@@ -583,17 +585,17 @@ var K = class e extends D {
|
|
|
583
585
|
super(), this.ends_ = [], this.flatInteriorPointRevision_ = -1, this.flatInteriorPoint_ = null, this.maxDelta_ = -1, this.maxDeltaRevision_ = -1, this.orientedRevision_ = -1, this.orientedFlatCoordinates_ = null, t !== void 0 && n ? (this.setFlatCoordinates(t, e), this.ends_ = n) : this.setCoordinates(e, t);
|
|
584
586
|
}
|
|
585
587
|
appendLinearRing(e) {
|
|
586
|
-
this.flatCoordinates ?
|
|
588
|
+
this.flatCoordinates ? oe(this.flatCoordinates, e.getFlatCoordinates()) : this.flatCoordinates = e.getFlatCoordinates().slice(), this.ends_.push(this.flatCoordinates.length), this.changed();
|
|
587
589
|
}
|
|
588
590
|
clone() {
|
|
589
591
|
let t = new e(this.flatCoordinates.slice(), this.layout, this.ends_.slice());
|
|
590
592
|
return t.applyProperties(this), t;
|
|
591
593
|
}
|
|
592
594
|
closestPointXY(e, t, n, r) {
|
|
593
|
-
return r <
|
|
595
|
+
return r < se(this.getExtent(), e, t) ? r : (this.maxDeltaRevision_ != this.getRevision() && (this.maxDelta_ = Math.sqrt(A(this.flatCoordinates, 0, this.ends_, this.stride, 0)), this.maxDeltaRevision_ = this.getRevision()), M(this.flatCoordinates, 0, this.ends_, this.stride, this.maxDelta_, !0, e, t, n, r));
|
|
594
596
|
}
|
|
595
597
|
containsXY(e, t) {
|
|
596
|
-
return
|
|
598
|
+
return _e(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, e, t);
|
|
597
599
|
}
|
|
598
600
|
getArea() {
|
|
599
601
|
return Be(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride);
|
|
@@ -607,7 +609,7 @@ var K = class e extends D {
|
|
|
607
609
|
}
|
|
608
610
|
getFlatInteriorPoint() {
|
|
609
611
|
if (this.flatInteriorPointRevision_ != this.getRevision()) {
|
|
610
|
-
let e =
|
|
612
|
+
let e = _(this.getExtent());
|
|
611
613
|
this.flatInteriorPoint_ = H(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, e, 0), this.flatInteriorPointRevision_ = this.getRevision();
|
|
612
614
|
}
|
|
613
615
|
return this.flatInteriorPoint_;
|
|
@@ -644,7 +646,7 @@ var K = class e extends D {
|
|
|
644
646
|
return "Polygon";
|
|
645
647
|
}
|
|
646
648
|
intersectsExtent(e) {
|
|
647
|
-
return
|
|
649
|
+
return ge(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, e);
|
|
648
650
|
}
|
|
649
651
|
setCoordinates(e, t) {
|
|
650
652
|
this.setLayout(t, e, 2), this.flatCoordinates ||= [];
|
|
@@ -655,24 +657,24 @@ var K = class e extends D {
|
|
|
655
657
|
function qe(e, t, n, r) {
|
|
656
658
|
n ||= 32;
|
|
657
659
|
let i = [];
|
|
658
|
-
for (let a = 0; a < n; ++a)
|
|
660
|
+
for (let a = 0; a < n; ++a) oe(i, u(e, t, 2 * Math.PI * a / n, r));
|
|
659
661
|
return i.push(i[0], i[1]), new K(i, "XY", [i.length]);
|
|
660
662
|
}
|
|
661
663
|
function q(e) {
|
|
662
|
-
if (
|
|
663
|
-
let t = e[0], n = e[1], r = e[2],
|
|
664
|
+
if (i(e)) throw Error("Cannot create polygon from empty extent");
|
|
665
|
+
let t = e[0], n = e[1], r = e[2], a = e[3], o = [
|
|
664
666
|
t,
|
|
665
667
|
n,
|
|
666
668
|
t,
|
|
667
|
-
|
|
669
|
+
a,
|
|
668
670
|
r,
|
|
669
|
-
|
|
671
|
+
a,
|
|
670
672
|
r,
|
|
671
673
|
n,
|
|
672
674
|
t,
|
|
673
675
|
n
|
|
674
676
|
];
|
|
675
|
-
return new K(
|
|
677
|
+
return new K(o, "XY", [o.length]);
|
|
676
678
|
}
|
|
677
679
|
function Je(e, t, n) {
|
|
678
680
|
t ||= 32;
|
|
@@ -687,7 +689,7 @@ function Je(e, t, n) {
|
|
|
687
689
|
function Ye(e, t, n, r) {
|
|
688
690
|
let i = e.getFlatCoordinates(), a = e.getStride(), o = i.length / a - 1, s = r || 0;
|
|
689
691
|
for (let e = 0; e <= o; ++e) {
|
|
690
|
-
let r = e * a, c = s +
|
|
692
|
+
let r = e * a, c = s + p(e, o) * 2 * Math.PI / o;
|
|
691
693
|
i[r] = t[0] + n * Math.cos(c), i[r + 1] = t[1] + n * Math.sin(c);
|
|
692
694
|
}
|
|
693
695
|
e.changed();
|
|
@@ -707,7 +709,7 @@ function Qe(e) {
|
|
|
707
709
|
});
|
|
708
710
|
}
|
|
709
711
|
function $e(e) {
|
|
710
|
-
let t = e === void 0 ?
|
|
712
|
+
let t = e === void 0 ? m(5) : e;
|
|
711
713
|
return (function(e, n) {
|
|
712
714
|
return n || e === void 0 ? e : Math.abs(e) <= t ? 0 : e;
|
|
713
715
|
});
|
|
@@ -722,16 +724,16 @@ var J = {
|
|
|
722
724
|
ROTATION: "rotation"
|
|
723
725
|
};
|
|
724
726
|
// ../node_modules/ol/centerconstraint.js
|
|
725
|
-
function et(e,
|
|
726
|
-
return (function(i, a, o, s
|
|
727
|
-
if (!
|
|
728
|
-
if (!
|
|
729
|
-
let
|
|
727
|
+
function et(e, t, n) {
|
|
728
|
+
return (function(r, i, a, o, s) {
|
|
729
|
+
if (!r) return;
|
|
730
|
+
if (!i && !t) return r;
|
|
731
|
+
let c = t ? 0 : a[0] * (i ?? 0), l = t ? 0 : a[1] * (i ?? 0), u = s ? s[0] : 0, d = s ? s[1] : 0, p = e[0] + c / 2 + u, m = e[2] - c / 2 + u, h = e[1] + l / 2 + d, g = e[3] - l / 2 + d;
|
|
730
732
|
p > m && (p = (m + p) / 2, m = p), h > g && (h = (g + h) / 2, g = h);
|
|
731
|
-
let _ =
|
|
732
|
-
if (
|
|
733
|
-
let e = 30 *
|
|
734
|
-
_ += -e * Math.log(1 + Math.max(0, p -
|
|
733
|
+
let _ = f(r[0], p, m), v = f(r[1], h, g);
|
|
734
|
+
if (o && n && i) {
|
|
735
|
+
let e = 30 * i;
|
|
736
|
+
_ += -e * Math.log(1 + Math.max(0, p - r[0]) / e) + e * Math.log(1 + Math.max(0, r[0] - m) / e), v += -e * Math.log(1 + Math.max(0, h - r[1]) / e) + e * Math.log(1 + Math.max(0, r[1] - g) / e);
|
|
735
737
|
}
|
|
736
738
|
return [_, v];
|
|
737
739
|
});
|
|
@@ -740,39 +742,39 @@ function tt(e) {
|
|
|
740
742
|
return e;
|
|
741
743
|
}
|
|
742
744
|
// ../node_modules/ol/resolutionconstraint.js
|
|
743
|
-
function X(e, t,
|
|
744
|
-
let
|
|
745
|
-
return
|
|
746
|
-
}
|
|
747
|
-
function Z(e,
|
|
748
|
-
let
|
|
749
|
-
return
|
|
750
|
-
}
|
|
751
|
-
function nt(e, n, r
|
|
752
|
-
return
|
|
753
|
-
if (
|
|
754
|
-
let
|
|
755
|
-
if (
|
|
756
|
-
let
|
|
757
|
-
return e[
|
|
745
|
+
function X(e, t, n, r) {
|
|
746
|
+
let i = b(t) / n[0], a = w(t) / n[1];
|
|
747
|
+
return r ? Math.min(e, Math.max(i, a)) : Math.min(e, Math.min(i, a));
|
|
748
|
+
}
|
|
749
|
+
function Z(e, t, n) {
|
|
750
|
+
let r = Math.min(e, t);
|
|
751
|
+
return r *= Math.log(1 + 50 * Math.max(0, e / t - 1)) / 50 + 1, n && (r = Math.max(r, n), r /= Math.log(1 + 50 * Math.max(0, n / e - 1)) / 50 + 1), f(r, n / 2, t * 2);
|
|
752
|
+
}
|
|
753
|
+
function nt(e, t, n, r) {
|
|
754
|
+
return t = t === void 0 || t, (function(i, a, o, s) {
|
|
755
|
+
if (i !== void 0) {
|
|
756
|
+
let c = e[0], l = e[e.length - 1], u = n ? X(c, n, o, !!r) : c;
|
|
757
|
+
if (s) return t ? Z(i, u, l) : f(i, l, u);
|
|
758
|
+
let d = Math.floor(ne(e, Math.min(u, i), a));
|
|
759
|
+
return e[d] > u && d < e.length - 1 ? e[d + 1] : e[d];
|
|
758
760
|
}
|
|
759
761
|
});
|
|
760
762
|
}
|
|
761
|
-
function rt(e, n, r, i, a
|
|
762
|
-
return
|
|
763
|
-
if (
|
|
764
|
-
let
|
|
765
|
-
if (
|
|
766
|
-
let
|
|
767
|
-
return
|
|
763
|
+
function rt(e, t, n, r, i, a) {
|
|
764
|
+
return r = r === void 0 || r, n = n === void 0 ? 0 : n, (function(o, s, c, l) {
|
|
765
|
+
if (o !== void 0) {
|
|
766
|
+
let u = i ? X(t, i, c, !!a) : t;
|
|
767
|
+
if (l) return r ? Z(o, u, n) : f(o, n, u);
|
|
768
|
+
let d = Math.ceil(Math.log(t / u) / Math.log(e) - 1e-9), p = -s * .499999999 + .5, m = Math.floor(Math.log(t / Math.min(u, o)) / Math.log(e) + p), h = t / e ** +Math.max(d, m);
|
|
769
|
+
return f(h, n, u);
|
|
768
770
|
}
|
|
769
771
|
});
|
|
770
772
|
}
|
|
771
|
-
function it(e, n, r, i
|
|
772
|
-
return
|
|
773
|
-
if (
|
|
774
|
-
let
|
|
775
|
-
return !
|
|
773
|
+
function it(e, t, n, r, i) {
|
|
774
|
+
return n = n === void 0 || n, (function(a, o, s, c) {
|
|
775
|
+
if (a !== void 0) {
|
|
776
|
+
let o = r ? X(e, r, s, !!i) : e;
|
|
777
|
+
return !n || !c ? f(a, t, o) : Z(a, o, t);
|
|
776
778
|
}
|
|
777
779
|
});
|
|
778
780
|
}
|
|
@@ -788,9 +790,9 @@ var at = /* @__PURE__ */ e({
|
|
|
788
790
|
withHigherResolutions: () => ft,
|
|
789
791
|
withLowerResolutions: () => pt,
|
|
790
792
|
withZoom: () => ht
|
|
791
|
-
}), ot = 0, st = class extends
|
|
793
|
+
}), ot = 0, st = class extends me {
|
|
792
794
|
constructor(e) {
|
|
793
|
-
super(), this.on, this.once, this.un, e = Object.assign({}, e), this.hints_ = [0, 0], this.animations_ = [], this.updateAnimationKey_, this.projection_ = y(e.projection, "EPSG:3857"), this.viewportSize_ = [100, 100], this.targetCenter_ = null, this.targetResolution_, this.targetRotation_, this.nextCenter_ = null, this.nextResolution_, this.nextRotation_, this.cancelAnchor_ = void 0, e.projection && ce(), e.center && (e.center =
|
|
795
|
+
super(), this.on, this.once, this.un, e = Object.assign({}, e), this.hints_ = [0, 0], this.animations_ = [], this.updateAnimationKey_, this.projection_ = y(e.projection, "EPSG:3857"), this.viewportSize_ = [100, 100], this.targetCenter_ = null, this.targetResolution_, this.targetRotation_, this.nextCenter_ = null, this.nextResolution_, this.nextRotation_, this.cancelAnchor_ = void 0, e.projection && ce(), e.center && (e.center = x(e.center, this.projection_)), e.extent && (e.extent = C(e.extent, this.projection_)), this.applyOptions_(e);
|
|
794
796
|
}
|
|
795
797
|
applyOptions_(e) {
|
|
796
798
|
let t = Object.assign({}, e);
|
|
@@ -838,7 +840,7 @@ var at = /* @__PURE__ */ e({
|
|
|
838
840
|
let t = Array(arguments.length);
|
|
839
841
|
for (let e = 0; e < t.length; ++e) {
|
|
840
842
|
let n = arguments[e];
|
|
841
|
-
n.center && (n = Object.assign({}, n), n.center =
|
|
843
|
+
n.center && (n = Object.assign({}, n), n.center = x(n.center, this.getProjection())), n.anchor && (n = Object.assign({}, n), n.anchor = x(n.anchor, this.getProjection())), t[e] = n;
|
|
842
844
|
}
|
|
843
845
|
this.animateInternal.apply(this, t);
|
|
844
846
|
}
|
|
@@ -861,12 +863,12 @@ var at = /* @__PURE__ */ e({
|
|
|
861
863
|
complete: !1,
|
|
862
864
|
anchor: e.anchor,
|
|
863
865
|
duration: e.duration === void 0 ? 1e3 : e.duration,
|
|
864
|
-
easing: e.easing ||
|
|
866
|
+
easing: e.easing || he,
|
|
865
867
|
callback: n
|
|
866
868
|
};
|
|
867
869
|
if (e.center && (t.sourceCenter = a, t.targetCenter = e.center.slice(), a = t.targetCenter), e.zoom === void 0 ? e.resolution && (t.sourceResolution = o, t.targetResolution = e.resolution, o = t.targetResolution) : (t.sourceResolution = o, t.targetResolution = this.getResolutionForZoom(e.zoom), o = t.targetResolution), e.rotation !== void 0) {
|
|
868
870
|
t.sourceRotation = s;
|
|
869
|
-
let n =
|
|
871
|
+
let n = p(e.rotation - s + Math.PI, 2 * Math.PI) - Math.PI;
|
|
870
872
|
t.targetRotation = s + n, s = t.targetRotation;
|
|
871
873
|
}
|
|
872
874
|
dt(t) ? t.complete = !0 : i += t.duration, c.push(t);
|
|
@@ -920,7 +922,7 @@ var at = /* @__PURE__ */ e({
|
|
|
920
922
|
this.nextResolution_ = a.targetResolution, this.targetResolution_ = e, this.applyTargetState_(!0);
|
|
921
923
|
}
|
|
922
924
|
if (a.sourceRotation !== void 0 && a.targetRotation !== void 0) {
|
|
923
|
-
let e = c === 1 ?
|
|
925
|
+
let e = c === 1 ? p(a.targetRotation + Math.PI, 2 * Math.PI) - Math.PI : a.sourceRotation + c * (a.targetRotation - a.sourceRotation);
|
|
924
926
|
if (a.anchor) {
|
|
925
927
|
let t = this.constraints_.rotation(e, !0);
|
|
926
928
|
this.targetCenter_ = this.calculateCenterRotate(t, a.anchor);
|
|
@@ -939,7 +941,7 @@ var at = /* @__PURE__ */ e({
|
|
|
939
941
|
}
|
|
940
942
|
calculateCenterRotate(e, t) {
|
|
941
943
|
let n, r = this.getCenterInternal();
|
|
942
|
-
return r !== void 0 && (n = [r[0] - t[0], r[1] - t[1]],
|
|
944
|
+
return r !== void 0 && (n = [r[0] - t[0], r[1] - t[1]], c(n, e - this.getRotation()), re(n, t)), n;
|
|
943
945
|
}
|
|
944
946
|
calculateCenterZoom(e, t) {
|
|
945
947
|
let n, r = this.getCenterInternal(), i = this.getResolution();
|
|
@@ -958,7 +960,7 @@ var at = /* @__PURE__ */ e({
|
|
|
958
960
|
}
|
|
959
961
|
getCenter() {
|
|
960
962
|
let e = this.getCenterInternal();
|
|
961
|
-
return e &&
|
|
963
|
+
return e && fe(e, this.getProjection());
|
|
962
964
|
}
|
|
963
965
|
getCenterInternal() {
|
|
964
966
|
return this.get(Y.CENTER);
|
|
@@ -974,16 +976,16 @@ var at = /* @__PURE__ */ e({
|
|
|
974
976
|
}
|
|
975
977
|
calculateExtent(e) {
|
|
976
978
|
let t = this.calculateExtentInternal(e);
|
|
977
|
-
return
|
|
979
|
+
return pe(t, this.getProjection());
|
|
978
980
|
}
|
|
979
981
|
calculateExtentInternal(e) {
|
|
980
982
|
e ||= this.getViewportSizeMinusPadding_();
|
|
981
|
-
let
|
|
982
|
-
|
|
983
|
-
let
|
|
984
|
-
|
|
985
|
-
let
|
|
986
|
-
return
|
|
983
|
+
let n = this.getCenterInternal();
|
|
984
|
+
T(n, "The view center is not defined");
|
|
985
|
+
let r = this.getResolution();
|
|
986
|
+
T(r !== void 0, "The view resolution is not defined");
|
|
987
|
+
let i = this.getRotation();
|
|
988
|
+
return T(i !== void 0, "The view rotation is not defined"), t(n, r, i, e);
|
|
987
989
|
}
|
|
988
990
|
getMaxResolution() {
|
|
989
991
|
return this.maxResolution_;
|
|
@@ -1016,12 +1018,12 @@ var at = /* @__PURE__ */ e({
|
|
|
1016
1018
|
return this.resolutions_;
|
|
1017
1019
|
}
|
|
1018
1020
|
getResolutionForExtent(e, t) {
|
|
1019
|
-
return this.getResolutionForExtentInternal(
|
|
1021
|
+
return this.getResolutionForExtentInternal(C(e, this.getProjection()), t);
|
|
1020
1022
|
}
|
|
1021
1023
|
getResolutionForExtentInternal(e, t) {
|
|
1022
1024
|
t ||= this.getViewportSizeMinusPadding_();
|
|
1023
|
-
let
|
|
1024
|
-
return Math.max(
|
|
1025
|
+
let n = b(e) / t[0], r = w(e) / t[1];
|
|
1026
|
+
return Math.max(n, r);
|
|
1025
1027
|
}
|
|
1026
1028
|
getResolutionForValueFunction(e) {
|
|
1027
1029
|
e ||= 2;
|
|
@@ -1073,7 +1075,7 @@ var at = /* @__PURE__ */ e({
|
|
|
1073
1075
|
getZoomForResolution(e) {
|
|
1074
1076
|
let t = this.minZoom_ || 0, n, r;
|
|
1075
1077
|
if (this.resolutions_) {
|
|
1076
|
-
let i =
|
|
1078
|
+
let i = ne(this.resolutions_, e, 1);
|
|
1077
1079
|
t = i, n = this.resolutions_[i], r = i == this.resolutions_.length - 1 ? 2 : n / this.resolutions_[i + 1];
|
|
1078
1080
|
} else n = this.maxResolution_, r = this.zoomFactor_;
|
|
1079
1081
|
return t + Math.log(n / e) / Math.log(r);
|
|
@@ -1081,17 +1083,17 @@ var at = /* @__PURE__ */ e({
|
|
|
1081
1083
|
getResolutionForZoom(e) {
|
|
1082
1084
|
if (this.resolutions_?.length) {
|
|
1083
1085
|
if (this.resolutions_.length === 1) return this.resolutions_[0];
|
|
1084
|
-
let
|
|
1085
|
-
return this.resolutions_[
|
|
1086
|
+
let t = f(Math.floor(e), 0, this.resolutions_.length - 2), n = this.resolutions_[t] / this.resolutions_[t + 1];
|
|
1087
|
+
return this.resolutions_[t] / n ** +f(e - t, 0, 1);
|
|
1086
1088
|
}
|
|
1087
1089
|
return this.maxResolution_ / this.zoomFactor_ ** +(e - this.minZoom_);
|
|
1088
1090
|
}
|
|
1089
1091
|
fit(e, t) {
|
|
1090
1092
|
let n;
|
|
1091
|
-
if (
|
|
1093
|
+
if (T(Array.isArray(e) || typeof e.getSimplifiedGeometry == "function", "Invalid extent or geometry provided as `geometry`"), Array.isArray(e)) T(!i(e), "Cannot fit empty extent provided as `geometry`"), n = q(C(e, this.getProjection()));
|
|
1092
1094
|
else if (e.getType() === "Circle") {
|
|
1093
|
-
let t =
|
|
1094
|
-
n = q(t), n.rotate(this.getRotation(),
|
|
1095
|
+
let t = C(e.getExtent(), this.getProjection());
|
|
1096
|
+
n = q(t), n.rotate(this.getRotation(), _(t));
|
|
1095
1097
|
} else {
|
|
1096
1098
|
let t = te();
|
|
1097
1099
|
n = t ? e.clone().transform(t, this.getProjection()) : e;
|
|
@@ -1115,27 +1117,27 @@ var at = /* @__PURE__ */ e({
|
|
|
1115
1117
|
t ||= {};
|
|
1116
1118
|
let n = t.size;
|
|
1117
1119
|
n ||= this.getViewportSizeMinusPadding_();
|
|
1118
|
-
let
|
|
1120
|
+
let i = t.padding === void 0 ? [
|
|
1119
1121
|
0,
|
|
1120
1122
|
0,
|
|
1121
1123
|
0,
|
|
1122
1124
|
0
|
|
1123
|
-
] : t.padding,
|
|
1124
|
-
|
|
1125
|
-
let
|
|
1126
|
-
|
|
1127
|
-
let
|
|
1128
|
-
|
|
1129
|
-
let
|
|
1130
|
-
t.duration === void 0 ? (this.targetResolution_ =
|
|
1131
|
-
resolution:
|
|
1132
|
-
center:
|
|
1125
|
+
] : t.padding, a = t.nearest !== void 0 && t.nearest, o;
|
|
1126
|
+
o = t.minResolution === void 0 ? t.maxZoom === void 0 ? 0 : this.getResolutionForZoom(t.maxZoom) : t.minResolution;
|
|
1127
|
+
let s = this.rotatedExtentForGeometry(e), c = this.getResolutionForExtentInternal(s, [n[0] - i[1] - i[3], n[1] - i[0] - i[2]]);
|
|
1128
|
+
c = isNaN(c) ? o : Math.max(c, o), c = this.getConstrainedResolution(c, +!a);
|
|
1129
|
+
let l = this.getRotation(), u = Math.sin(l), d = Math.cos(l), f = _(s);
|
|
1130
|
+
f[0] += (i[1] - i[3]) / 2 * c, f[1] += (i[0] - i[2]) / 2 * c;
|
|
1131
|
+
let p = f[0] * d - f[1] * u, m = f[1] * d + f[0] * u, h = this.getConstrainedCenter([p, m], c), g = t.callback ? t.callback : r;
|
|
1132
|
+
t.duration === void 0 ? (this.targetResolution_ = c, this.targetCenter_ = h, this.applyTargetState_(!1, !0), Q(g, !0)) : this.animateInternal({
|
|
1133
|
+
resolution: c,
|
|
1134
|
+
center: h,
|
|
1133
1135
|
duration: t.duration,
|
|
1134
1136
|
easing: t.easing
|
|
1135
|
-
},
|
|
1137
|
+
}, g);
|
|
1136
1138
|
}
|
|
1137
1139
|
centerOn(e, t, n) {
|
|
1138
|
-
this.centerOnInternal(
|
|
1140
|
+
this.centerOnInternal(x(e, this.getProjection()), t, n);
|
|
1139
1141
|
}
|
|
1140
1142
|
centerOnInternal(e, t, n) {
|
|
1141
1143
|
this.setCenterInternal($(e, t, n, this.getResolution(), this.getRotation()));
|
|
@@ -1152,7 +1154,7 @@ var at = /* @__PURE__ */ e({
|
|
|
1152
1154
|
return !!this.getCenterInternal() && this.getResolution() !== void 0;
|
|
1153
1155
|
}
|
|
1154
1156
|
adjustCenter(e) {
|
|
1155
|
-
let t =
|
|
1157
|
+
let t = fe(this.targetCenter_, this.getProjection());
|
|
1156
1158
|
this.setCenter([t[0] + e[0], t[1] + e[1]]);
|
|
1157
1159
|
}
|
|
1158
1160
|
adjustCenterInternal(e) {
|
|
@@ -1160,7 +1162,7 @@ var at = /* @__PURE__ */ e({
|
|
|
1160
1162
|
this.setCenterInternal([t[0] + e[0], t[1] + e[1]]);
|
|
1161
1163
|
}
|
|
1162
1164
|
adjustResolution(e, t) {
|
|
1163
|
-
t &&=
|
|
1165
|
+
t &&= x(t, this.getProjection()), this.adjustResolutionInternal(e, t);
|
|
1164
1166
|
}
|
|
1165
1167
|
adjustResolutionInternal(e, t) {
|
|
1166
1168
|
let n = this.getAnimating() || this.getInteracting(), r = this.getViewportSize_(this.getRotation()), i = this.constraints_.resolution(this.targetResolution_ * e, 0, r, n);
|
|
@@ -1170,14 +1172,14 @@ var at = /* @__PURE__ */ e({
|
|
|
1170
1172
|
this.adjustResolution(this.zoomFactor_ ** +-e, t);
|
|
1171
1173
|
}
|
|
1172
1174
|
adjustRotation(e, t) {
|
|
1173
|
-
t &&=
|
|
1175
|
+
t &&= x(t, this.getProjection()), this.adjustRotationInternal(e, t);
|
|
1174
1176
|
}
|
|
1175
1177
|
adjustRotationInternal(e, t) {
|
|
1176
1178
|
let n = this.getAnimating() || this.getInteracting(), r = this.constraints_.rotation(this.targetRotation_ + e, n);
|
|
1177
1179
|
t && (this.targetCenter_ = this.calculateCenterRotate(r, t)), this.targetRotation_ += e, this.applyTargetState_();
|
|
1178
1180
|
}
|
|
1179
1181
|
setCenter(e) {
|
|
1180
|
-
this.setCenterInternal(e &&
|
|
1182
|
+
this.setCenterInternal(e && x(e, this.getProjection()));
|
|
1181
1183
|
}
|
|
1182
1184
|
setCenterInternal(e) {
|
|
1183
1185
|
this.targetCenter_ = e, this.applyTargetState_();
|
|
@@ -1195,18 +1197,18 @@ var at = /* @__PURE__ */ e({
|
|
|
1195
1197
|
this.setResolution(this.getResolutionForZoom(e));
|
|
1196
1198
|
}
|
|
1197
1199
|
applyTargetState_(e, t) {
|
|
1198
|
-
let n = this.getAnimating() || this.getInteracting() || t, r = this.constraints_.rotation(this.targetRotation_, n), i = this.getViewportSize_(r),
|
|
1199
|
-
this.get(Y.ROTATION) !== r && this.set(Y.ROTATION, r), this.get(Y.RESOLUTION) !==
|
|
1200
|
+
let n = this.getAnimating() || this.getInteracting() || t, r = this.constraints_.rotation(this.targetRotation_, n), i = this.getViewportSize_(r), o = this.constraints_.resolution(this.targetResolution_, 0, i, n), s = this.constraints_.center(this.targetCenter_, o, i, n, this.calculateCenterShift(this.targetCenter_, o, r, i));
|
|
1201
|
+
this.get(Y.ROTATION) !== r && this.set(Y.ROTATION, r), this.get(Y.RESOLUTION) !== o && (this.set(Y.RESOLUTION, o), this.set("zoom", this.getZoom(), !0)), s && this.get(Y.CENTER) && a(this.get(Y.CENTER), s) || this.set(Y.CENTER, s), this.getAnimating() && !e && this.cancelAnimations(), this.cancelAnchor_ = void 0;
|
|
1200
1202
|
}
|
|
1201
1203
|
resolveConstraints(e, t, n) {
|
|
1202
1204
|
e = e === void 0 ? 200 : e;
|
|
1203
|
-
let r = t || 0, i = this.constraints_.rotation(this.targetRotation_),
|
|
1204
|
-
e === 0 && !this.cancelAnchor_ ? (this.targetResolution_ =
|
|
1205
|
+
let r = t || 0, i = this.constraints_.rotation(this.targetRotation_), o = this.getViewportSize_(i), s = this.constraints_.resolution(this.targetResolution_, r, o), c = this.constraints_.center(this.targetCenter_, s, o, !1, this.calculateCenterShift(this.targetCenter_, s, i, o));
|
|
1206
|
+
e === 0 && !this.cancelAnchor_ ? (this.targetResolution_ = s, this.targetRotation_ = i, this.targetCenter_ = c, this.applyTargetState_()) : (n ||= e === 0 ? this.cancelAnchor_ : void 0, this.cancelAnchor_ = void 0, this.getResolution() === s && this.getRotation() === i && this.getCenterInternal() && a(this.getCenterInternal(), c) || (this.getAnimating() && this.cancelAnimations(), this.animateInternal({
|
|
1205
1207
|
rotation: i,
|
|
1206
1208
|
center: c,
|
|
1207
|
-
resolution:
|
|
1209
|
+
resolution: s,
|
|
1208
1210
|
duration: e,
|
|
1209
|
-
easing:
|
|
1211
|
+
easing: xe,
|
|
1210
1212
|
anchor: n
|
|
1211
1213
|
})));
|
|
1212
1214
|
}
|
|
@@ -1214,7 +1216,7 @@ var at = /* @__PURE__ */ e({
|
|
|
1214
1216
|
this.resolveConstraints(0), this.setHint(J.INTERACTING, 1);
|
|
1215
1217
|
}
|
|
1216
1218
|
endInteraction(e, t, n) {
|
|
1217
|
-
n &&=
|
|
1219
|
+
n &&= x(n, this.getProjection()), this.endInteractionInternal(e, t, n);
|
|
1218
1220
|
}
|
|
1219
1221
|
endInteractionInternal(e, t, n) {
|
|
1220
1222
|
this.getInteracting() && (this.setHint(J.INTERACTING, -1), this.resolveConstraints(e, t, n));
|
|
@@ -1251,20 +1253,20 @@ function ct(e) {
|
|
|
1251
1253
|
return tt;
|
|
1252
1254
|
}
|
|
1253
1255
|
function lt(e) {
|
|
1254
|
-
let t, r, i
|
|
1255
|
-
if (!
|
|
1256
|
-
let
|
|
1257
|
-
|
|
1256
|
+
let t, n, r, i = e.minZoom === void 0 ? ot : e.minZoom, a = e.maxZoom === void 0 ? 28 : e.maxZoom, o = e.zoomFactor === void 0 ? 2 : e.zoomFactor, c = e.multiWorld !== void 0 && e.multiWorld, l = e.smoothResolutionConstraint === void 0 || e.smoothResolutionConstraint, u = e.showFullExtent !== void 0 && e.showFullExtent, d = y(e.projection, "EPSG:3857"), f = d.getExtent(), p = e.constrainOnlyCenter, m = e.extent;
|
|
1257
|
+
if (!c && !m && d.isGlobal() && (p = !1, m = f), e.resolutions !== void 0) {
|
|
1258
|
+
let o = e.resolutions;
|
|
1259
|
+
n = o[i], r = o[a] === void 0 ? o[o.length - 1] : o[a], t = e.constrainResolution ? nt(o, l, !p && m, u) : it(n, r, l, !p && m, u);
|
|
1258
1260
|
} else {
|
|
1259
|
-
let
|
|
1260
|
-
|
|
1261
|
+
let c = (f ? Math.max(b(f), w(f)) : 360 * s.degrees / d.getMetersPerUnit()) / 256 / 2 ** ot, h = c / 2 ** 28;
|
|
1262
|
+
n = e.maxResolution, n === void 0 ? n = c / o ** +i : i = 0, r = e.minResolution, r === void 0 && (r = e.maxZoom === void 0 ? h : e.maxResolution === void 0 ? c / o ** +a : n / o ** +a), a = i + Math.floor(Math.log(n / r) / Math.log(o)), r = n / o ** +(a - i), t = e.constrainResolution ? rt(o, n, r, l, !p && m, u) : it(n, r, l, !p && m, u);
|
|
1261
1263
|
}
|
|
1262
1264
|
return {
|
|
1263
1265
|
constraint: t,
|
|
1264
|
-
maxResolution:
|
|
1265
|
-
minResolution:
|
|
1266
|
-
minZoom:
|
|
1267
|
-
zoomFactor:
|
|
1266
|
+
maxResolution: n,
|
|
1267
|
+
minResolution: r,
|
|
1268
|
+
minZoom: i,
|
|
1269
|
+
zoomFactor: o
|
|
1268
1270
|
};
|
|
1269
1271
|
}
|
|
1270
1272
|
function ut(e) {
|
|
@@ -1275,7 +1277,7 @@ function ut(e) {
|
|
|
1275
1277
|
return Xe;
|
|
1276
1278
|
}
|
|
1277
1279
|
function dt(e) {
|
|
1278
|
-
return !(e.sourceCenter && e.targetCenter && !
|
|
1280
|
+
return !(e.sourceCenter && e.targetCenter && !a(e.sourceCenter, e.targetCenter) || e.sourceResolution !== e.targetResolution || e.sourceRotation !== e.targetRotation);
|
|
1279
1281
|
}
|
|
1280
1282
|
function $(e, t, n, r, i) {
|
|
1281
1283
|
let a = Math.cos(-i), o = Math.sin(-i), s = e[0] * a - e[1] * o, c = e[1] * a + e[0] * o;
|
|
@@ -1306,7 +1308,7 @@ function pt(e) {
|
|
|
1306
1308
|
function mt() {
|
|
1307
1309
|
return function(e) {
|
|
1308
1310
|
if (!e.extent) return e;
|
|
1309
|
-
let t =
|
|
1311
|
+
let t = _(e.extent), n = {
|
|
1310
1312
|
...e,
|
|
1311
1313
|
center: t
|
|
1312
1314
|
};
|
|
@@ -1326,4 +1328,4 @@ async function gt(e, ...t) {
|
|
|
1326
1328
|
for (let e of t) n = e(n);
|
|
1327
1329
|
return n;
|
|
1328
1330
|
}
|
|
1329
|
-
export { P as A, O as B, Re as C, Fe as D, I as E, j as F,
|
|
1331
|
+
export { P as A, O as B, Re as C, Fe as D, I as E, j as F, De as H, k as I, je as L, A as M, M as N, Ne as O, Me as P, D as R, z as S, F as T, Se as U, ke as V, E as W, V as _, Xe as a, L as b, Je as c, W as d, We as f, He as g, H as h, J as i, Pe as j, N as k, q as l, Ge as m, at as n, K as o, G as p, Y as r, qe as s, st as t, Ke as u, Ve as v, R as w, Ie as x, ze as y, Oe as z };
|