@datagouv/components-next 0.0.9 → 0.0.11
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/{JsonPreview.client-BIz1_EiB.js → JsonPreview.client-Boqx8dM7.js} +2 -2
- package/dist/{MapContainer.client-ZDwr4Q_I.js → MapContainer.client-DbRyTZ69.js} +180 -142
- package/dist/{PdfPreview.client-BTTMM27i.js → PdfPreview.client-wbXsTNTV.js} +2 -2
- package/dist/{Pmtiles.client-4kOoUQcR.js → Pmtiles.client-pnjwffA_.js} +1 -1
- package/dist/Swagger.client-DwYQ-RDs.js +4 -0
- package/dist/{XmlPreview.client-BYIIkDqf.js → XmlPreview.client-Z6TgGP2G.js} +2 -2
- package/dist/components-next.css +3 -3
- package/dist/components-next.js +1 -1
- package/dist/{main-CLUk9Jj7.js → main-CLgZLazG.js} +21234 -21264
- package/dist/{pdf-vue3-BZh6kzke.js → pdf-vue3-CwfAPVHf.js} +1 -1
- package/dist/{text-clamp.esm-DP59tec5.js → text-clamp.esm--JneuJHF.js} +1 -1
- package/dist/{vue3-json-viewer-DIQzFF6K.js → vue3-json-viewer-CWdqwDBZ.js} +1 -1
- package/dist/{vue3-xml-viewer.common-BmKw6vER.js → vue3-xml-viewer.common-B4U761SY.js} +805 -799
- package/package.json +7 -2
- package/dist/Swagger.client-Q7a5wb51.js +0 -4
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var ri = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var Rt = (i) => {
|
|
3
3
|
throw TypeError(i);
|
|
4
4
|
};
|
|
5
5
|
var si = (i, e, t) => e in i ? ri(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
6
|
-
var mt = (i, e, t) => si(i, typeof e != "symbol" ? e + "" : e, t), ai = (i, e, t) => e.has(i) ||
|
|
7
|
-
var Pt = (i, e, t) => e.has(i) ?
|
|
6
|
+
var mt = (i, e, t) => si(i, typeof e != "symbol" ? e + "" : e, t), ai = (i, e, t) => e.has(i) || Rt("Cannot " + t);
|
|
7
|
+
var Pt = (i, e, t) => e.has(i) ? Rt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t);
|
|
8
8
|
var ft = (i, e, t) => (ai(i, e, "access private method"), t);
|
|
9
|
-
import { j as commonjsGlobal, k as getDefaultExportFromCjs$1, d as defineComponent, l as useI18n, r as ref, e as onMounted, m as createBlock, b as createElementBlock, f as openBlock, p as withCtx, q as createVNode, g as createBaseVNode, u as unref, F as Fe, t as toDisplayString, s as _sfc_main$1 } from "./main-
|
|
9
|
+
import { j as commonjsGlobal, k as getDefaultExportFromCjs$1, d as defineComponent, l as useI18n, r as ref, e as onMounted, m as createBlock, b as createElementBlock, f as openBlock, p as withCtx, q as createVNode, g as createBaseVNode, u as unref, F as Fe, t as toDisplayString, s as _sfc_main$1 } from "./main-CLgZLazG.js";
|
|
10
10
|
const ObjectEventType = {
|
|
11
11
|
/**
|
|
12
12
|
* Triggered when a property is changed.
|
|
@@ -5303,7 +5303,10 @@ const CLASS_HIDDEN = "ol-hidden", CLASS_SELECTABLE = "ol-selectable", CLASS_UNSE
|
|
|
5303
5303
|
"size",
|
|
5304
5304
|
"lineHeight",
|
|
5305
5305
|
"family"
|
|
5306
|
-
],
|
|
5306
|
+
], fontWeights$1 = {
|
|
5307
|
+
normal: 400,
|
|
5308
|
+
bold: 700
|
|
5309
|
+
}, getFontParameters = function(i) {
|
|
5307
5310
|
const e = i.match(fontRegEx);
|
|
5308
5311
|
if (!e)
|
|
5309
5312
|
return null;
|
|
@@ -5313,15 +5316,15 @@ const CLASS_HIDDEN = "ol-hidden", CLASS_SELECTABLE = "ol-selectable", CLASS_UNSE
|
|
|
5313
5316
|
lineHeight: "normal",
|
|
5314
5317
|
size: "1.2em",
|
|
5315
5318
|
style: "normal",
|
|
5316
|
-
weight: "
|
|
5319
|
+
weight: "400",
|
|
5317
5320
|
variant: "normal"
|
|
5318
5321
|
}
|
|
5319
5322
|
);
|
|
5320
5323
|
for (let n = 0, s = fontRegExMatchIndex.length; n < s; ++n) {
|
|
5321
5324
|
const o = e[n + 1];
|
|
5322
|
-
o !== void 0 && (t[fontRegExMatchIndex[n]] = o);
|
|
5325
|
+
o !== void 0 && (t[fontRegExMatchIndex[n]] = typeof o == "string" ? o.trim() : o);
|
|
5323
5326
|
}
|
|
5324
|
-
return t.families = t.family.split(/,\s?/), t;
|
|
5327
|
+
return isNaN(Number(t.weight)) && t.weight in fontWeights$1 && (t.weight = fontWeights$1[t.weight]), t.families = t.family.split(/,\s?/).map((n) => n.trim().replace(/^['"]|['"]$/g, "")), t;
|
|
5325
5328
|
};
|
|
5326
5329
|
function createCanvasContext2D(i, e, t, n) {
|
|
5327
5330
|
let s;
|
|
@@ -5870,7 +5873,7 @@ const altKeyOnly = function(i) {
|
|
|
5870
5873
|
return (t instanceof ShadowRoot ? t.host : e).hasAttribute("tabindex") ? focus(i) : !0;
|
|
5871
5874
|
}, always$1 = TRUE, mouseActionButton = function(i) {
|
|
5872
5875
|
const e = i.originalEvent;
|
|
5873
|
-
return
|
|
5876
|
+
return "pointerId" in e && e.button == 0 && !(WEBKIT && MAC && e.ctrlKey);
|
|
5874
5877
|
}, never = FALSE, pointerMove = function(i) {
|
|
5875
5878
|
return i.type == "pointermove";
|
|
5876
5879
|
}, singleClick = function(i) {
|
|
@@ -5898,10 +5901,10 @@ const altKeyOnly = function(i) {
|
|
|
5898
5901
|
!e.target.isContentEditable;
|
|
5899
5902
|
}, mouseOnly = function(i) {
|
|
5900
5903
|
const e = i.originalEvent;
|
|
5901
|
-
return
|
|
5904
|
+
return "pointerId" in e && e.pointerType == "mouse";
|
|
5902
5905
|
}, primaryAction = function(i) {
|
|
5903
5906
|
const e = i.originalEvent;
|
|
5904
|
-
return
|
|
5907
|
+
return "pointerId" in e && e.isPrimary && e.button === 0;
|
|
5905
5908
|
};
|
|
5906
5909
|
class PointerInteraction extends Interaction {
|
|
5907
5910
|
/**
|
|
@@ -6432,6 +6435,7 @@ class KeyboardZoom extends Interaction {
|
|
|
6432
6435
|
return !t;
|
|
6433
6436
|
}
|
|
6434
6437
|
}
|
|
6438
|
+
const DELTA_LINE_MULTIPLIER = 40, DELTA_PAGE_MULTIPLIER = 300;
|
|
6435
6439
|
class MouseWheelZoom extends Interaction {
|
|
6436
6440
|
/**
|
|
6437
6441
|
* @param {Options} [options] Options.
|
|
@@ -6473,8 +6477,16 @@ class MouseWheelZoom extends Interaction {
|
|
|
6473
6477
|
e.originalEvent
|
|
6474
6478
|
);
|
|
6475
6479
|
s.preventDefault(), this.useAnchor_ && (this.lastAnchor_ = e.pixel);
|
|
6476
|
-
let o;
|
|
6477
|
-
|
|
6480
|
+
let o = s.deltaY;
|
|
6481
|
+
switch (s.deltaMode) {
|
|
6482
|
+
case WheelEvent.DOM_DELTA_LINE:
|
|
6483
|
+
o *= DELTA_LINE_MULTIPLIER;
|
|
6484
|
+
break;
|
|
6485
|
+
case WheelEvent.DOM_DELTA_PAGE:
|
|
6486
|
+
o *= DELTA_PAGE_MULTIPLIER;
|
|
6487
|
+
break;
|
|
6488
|
+
}
|
|
6489
|
+
if (o === 0)
|
|
6478
6490
|
return !1;
|
|
6479
6491
|
this.lastDelta_ = o;
|
|
6480
6492
|
const l = Date.now();
|
|
@@ -7243,7 +7255,7 @@ let Layer$1 = class extends BaseLayer {
|
|
|
7243
7255
|
this
|
|
7244
7256
|
), e.getState() === "ready" && (this.sourceReady_ = !0, setTimeout(() => {
|
|
7245
7257
|
this.dispatchEvent("sourceready");
|
|
7246
|
-
}, 0))
|
|
7258
|
+
}, 0))), this.changed();
|
|
7247
7259
|
}
|
|
7248
7260
|
/**
|
|
7249
7261
|
* @param {import("../pixel").Pixel} pixel Pixel.
|
|
@@ -9243,50 +9255,70 @@ function asCanvasPattern(i) {
|
|
|
9243
9255
|
}
|
|
9244
9256
|
const defaultFont = "10px sans-serif", defaultFillStyle = "#000", defaultLineCap = "round", defaultLineDash = [], defaultLineDashOffset = 0, defaultLineJoin = "round", defaultMiterLimit = 10, defaultStrokeStyle = "#000", defaultTextAlign = "center", defaultTextBaseline = "middle", defaultPadding = [0, 0, 0, 0], defaultLineWidth = 1, checkedFonts = new BaseObject();
|
|
9245
9257
|
let measureContext$1 = null, measureFont;
|
|
9246
|
-
const textHeights = {},
|
|
9247
|
-
|
|
9248
|
-
|
|
9249
|
-
|
|
9250
|
-
|
|
9251
|
-
|
|
9252
|
-
|
|
9253
|
-
|
|
9254
|
-
|
|
9255
|
-
|
|
9256
|
-
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9258
|
+
const textHeights = {}, genericFontFamilies = /* @__PURE__ */ new Set([
|
|
9259
|
+
"serif",
|
|
9260
|
+
"sans-serif",
|
|
9261
|
+
"monospace",
|
|
9262
|
+
"cursive",
|
|
9263
|
+
"fantasy",
|
|
9264
|
+
"system-ui",
|
|
9265
|
+
"ui-serif",
|
|
9266
|
+
"ui-sans-serif",
|
|
9267
|
+
"ui-monospace",
|
|
9268
|
+
"ui-rounded",
|
|
9269
|
+
"emoji",
|
|
9270
|
+
"math",
|
|
9271
|
+
"fangsong"
|
|
9272
|
+
]);
|
|
9273
|
+
function getFontKey(i, e, t) {
|
|
9274
|
+
return `${i} ${e} 16px "${t}"`;
|
|
9275
|
+
}
|
|
9276
|
+
const registerFont = /* @__PURE__ */ function() {
|
|
9277
|
+
let e, t;
|
|
9278
|
+
async function n(o) {
|
|
9279
|
+
await t.ready;
|
|
9280
|
+
const l = await t.load(o);
|
|
9281
|
+
if (l.length === 0)
|
|
9282
|
+
return !1;
|
|
9283
|
+
const c = getFontParameters(o), u = c.families[0].toLowerCase(), h = c.weight;
|
|
9284
|
+
return l.some(
|
|
9285
|
+
/**
|
|
9286
|
+
* @param {import('../css.js').FontParameters} f Font.
|
|
9287
|
+
* @return {boolean} Font matches.
|
|
9288
|
+
*/
|
|
9289
|
+
(g) => {
|
|
9290
|
+
const f = g.family.replace(/^['"]|['"]$/g, "").toLowerCase(), m = fontWeights$1[g.weight] || g.weight;
|
|
9291
|
+
return f === u && g.style === c.style && m == h;
|
|
9262
9292
|
}
|
|
9263
|
-
|
|
9264
|
-
return !!m;
|
|
9293
|
+
);
|
|
9265
9294
|
}
|
|
9266
|
-
function
|
|
9267
|
-
|
|
9268
|
-
|
|
9269
|
-
|
|
9270
|
-
|
|
9271
|
-
|
|
9272
|
-
|
|
9273
|
-
|
|
9274
|
-
|
|
9275
|
-
|
|
9295
|
+
async function s() {
|
|
9296
|
+
await t.ready;
|
|
9297
|
+
let o = !0;
|
|
9298
|
+
const l = checkedFonts.getProperties(), c = Object.keys(l).filter(
|
|
9299
|
+
(u) => l[u] < 100
|
|
9300
|
+
);
|
|
9301
|
+
for (let u = c.length - 1; u >= 0; --u) {
|
|
9302
|
+
const h = c[u];
|
|
9303
|
+
let g = l[h];
|
|
9304
|
+
g < 100 && (await n(h) ? (clear$1(textHeights), checkedFonts.set(h, 100)) : (g += 10, checkedFonts.set(h, g, !0), g < 100 && (o = !1)));
|
|
9276
9305
|
}
|
|
9277
|
-
|
|
9306
|
+
e = void 0, o || (e = setTimeout(s, 100));
|
|
9278
9307
|
}
|
|
9279
|
-
return function(
|
|
9280
|
-
|
|
9281
|
-
|
|
9308
|
+
return async function(o) {
|
|
9309
|
+
t || (t = WORKER_OFFSCREEN_CANVAS ? self.fonts : document.fonts);
|
|
9310
|
+
const l = getFontParameters(o);
|
|
9311
|
+
if (!l)
|
|
9282
9312
|
return;
|
|
9283
|
-
const
|
|
9284
|
-
|
|
9285
|
-
|
|
9286
|
-
|
|
9287
|
-
|
|
9288
|
-
|
|
9313
|
+
const c = l.families;
|
|
9314
|
+
let u = !1;
|
|
9315
|
+
for (const h of c) {
|
|
9316
|
+
if (genericFontFamilies.has(h))
|
|
9317
|
+
continue;
|
|
9318
|
+
const g = getFontKey(l.style, l.weight, h);
|
|
9319
|
+
checkedFonts.get(g) === void 0 && (checkedFonts.set(g, 0, !0), u = !0);
|
|
9289
9320
|
}
|
|
9321
|
+
u && (clearTimeout(e), e = setTimeout(s, 100));
|
|
9290
9322
|
};
|
|
9291
9323
|
}(), measureTextHeight = /* @__PURE__ */ function() {
|
|
9292
9324
|
let i;
|
|
@@ -12857,7 +12889,9 @@ let Map$1 = class extends BaseObject {
|
|
|
12857
12889
|
* Redraws all text after new fonts have loaded
|
|
12858
12890
|
*/
|
|
12859
12891
|
redrawText() {
|
|
12860
|
-
|
|
12892
|
+
if (!this.frameState_)
|
|
12893
|
+
return;
|
|
12894
|
+
const e = this.frameState_.layerStatesArray;
|
|
12861
12895
|
for (let t = 0, n = e.length; t < n; ++t) {
|
|
12862
12896
|
const s = e[t].layer;
|
|
12863
12897
|
s.hasRenderer() && s.getRenderer().handleFontsChanged();
|
|
@@ -14750,8 +14784,8 @@ class CanvasLayerRenderer extends LayerRenderer {
|
|
|
14750
14784
|
delete this.frameState, super.disposeInternal();
|
|
14751
14785
|
}
|
|
14752
14786
|
}
|
|
14753
|
-
function getCacheKey(i, e, t, n) {
|
|
14754
|
-
return `${i},${getKeyZXY(
|
|
14787
|
+
function getCacheKey(i, e, t, n, s) {
|
|
14788
|
+
return `${getUid(i)},${e},${getKeyZXY(t, n, s)}`;
|
|
14755
14789
|
}
|
|
14756
14790
|
function addTileToLookup(i, e, t) {
|
|
14757
14791
|
if (!(t in i))
|
|
@@ -14785,7 +14819,7 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
|
|
14785
14819
|
* @param {Options} [options] Options.
|
|
14786
14820
|
*/
|
|
14787
14821
|
constructor(e, t) {
|
|
14788
|
-
super(e), t = t || {}, this.extentChanged = !0, this.renderComplete = !1, this.renderedExtent_ = null, this.renderedPixelRatio, this.renderedProjection = null, this.
|
|
14822
|
+
super(e), t = t || {}, this.extentChanged = !0, this.renderComplete = !1, this.renderedExtent_ = null, this.renderedPixelRatio, this.renderedProjection = null, this.renderedTiles = [], this.renderedSourceKey_, this.renderedSourceRevision_, this.tempExtent = createEmpty(), this.tempTileRange_ = new TileRange(0, 0, 0, 0), this.tempTileCoord_ = createOrUpdate(0, 0, 0);
|
|
14789
14823
|
const n = t.cacheSize !== void 0 ? t.cacheSize : 512;
|
|
14790
14824
|
this.tileCache_ = new LRUCache(n), this.maxStaleKeys = n * 0.5;
|
|
14791
14825
|
}
|
|
@@ -14806,7 +14840,7 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
|
|
14806
14840
|
* @protected
|
|
14807
14841
|
*/
|
|
14808
14842
|
getOrCreateTile(e, t, n, s) {
|
|
14809
|
-
const o = this.tileCache_, c = this.getLayer().getSource(), u = getCacheKey(c.getKey(), e, t, n);
|
|
14843
|
+
const o = this.tileCache_, c = this.getLayer().getSource(), u = getCacheKey(c, c.getKey(), e, t, n);
|
|
14810
14844
|
let h;
|
|
14811
14845
|
if (o.containsKey(u))
|
|
14812
14846
|
h = o.get(u);
|
|
@@ -14887,7 +14921,7 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
|
|
14887
14921
|
if (!t)
|
|
14888
14922
|
return !1;
|
|
14889
14923
|
const n = t.getRevision();
|
|
14890
|
-
return this.
|
|
14924
|
+
return this.renderedSourceRevision_ ? this.renderedSourceRevision_ !== n && (this.renderedSourceRevision_ = n, this.renderedSourceKey_ === t.getKey() && this.tileCache_.clear()) : this.renderedSourceRevision_ = n, !0;
|
|
14891
14925
|
}
|
|
14892
14926
|
/**
|
|
14893
14927
|
* @param {import("../../Map.js").FrameState} frameState Frame state.
|
|
@@ -14952,7 +14986,13 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
|
|
14952
14986
|
findStaleTile_(e, t) {
|
|
14953
14987
|
const n = this.tileCache_, s = e[0], o = e[1], l = e[2], c = this.getStaleKeys();
|
|
14954
14988
|
for (let u = 0; u < c.length; ++u) {
|
|
14955
|
-
const h = getCacheKey(
|
|
14989
|
+
const h = getCacheKey(
|
|
14990
|
+
this.getLayer().getSource(),
|
|
14991
|
+
c[u],
|
|
14992
|
+
s,
|
|
14993
|
+
o,
|
|
14994
|
+
l
|
|
14995
|
+
);
|
|
14956
14996
|
if (n.containsKey(h)) {
|
|
14957
14997
|
const g = n.peek(h);
|
|
14958
14998
|
if (g.getState() === TileState.LOADED)
|
|
@@ -14980,10 +15020,10 @@ class CanvasTileLayerRenderer extends CanvasLayerRenderer {
|
|
|
14980
15020
|
if (!o)
|
|
14981
15021
|
return !1;
|
|
14982
15022
|
let l = !0;
|
|
14983
|
-
const c = this.tileCache_,
|
|
15023
|
+
const c = this.tileCache_, u = this.getLayer().getRenderSource(), h = u.getKey();
|
|
14984
15024
|
for (let g = o.minX; g <= o.maxX; ++g)
|
|
14985
15025
|
for (let f = o.minY; f <= o.maxY; ++f) {
|
|
14986
|
-
const m = getCacheKey(h, n, g, f);
|
|
15026
|
+
const m = getCacheKey(u, h, n, g, f);
|
|
14987
15027
|
let v = !1;
|
|
14988
15028
|
if (c.containsKey(m)) {
|
|
14989
15029
|
const T = c.peek(m);
|
|
@@ -16721,7 +16761,7 @@ class Overlay extends BaseObject {
|
|
|
16721
16761
|
updateRenderedPosition(e, t) {
|
|
16722
16762
|
const n = this.element.style, s = this.getOffset(), o = this.getPositioning();
|
|
16723
16763
|
this.setVisible(!0);
|
|
16724
|
-
const l =
|
|
16764
|
+
const l = `${e[0] + s[0]}px`, c = `${e[1] + s[1]}px`;
|
|
16725
16765
|
let u = "0%", h = "0%";
|
|
16726
16766
|
o == "bottom-right" || o == "center-right" || o == "top-right" ? u = "-100%" : (o == "bottom-center" || o == "center-center" || o == "top-center") && (u = "-50%"), o == "bottom-left" || o == "bottom-center" || o == "bottom-right" ? h = "-100%" : (o == "center-left" || o == "center-center" || o == "center-right") && (h = "-50%");
|
|
16727
16767
|
const g = `translate(${u}, ${h}) translate(${l}, ${c})`;
|
|
@@ -19709,7 +19749,7 @@ class VectorSource extends Source {
|
|
|
19709
19749
|
* @param {function(FeatureType):boolean} [filter] Feature filter function.
|
|
19710
19750
|
* The filter function will receive one argument, the {@link module:ol/Feature~Feature feature}
|
|
19711
19751
|
* and it should return a boolean value. By default, no filtering is made.
|
|
19712
|
-
* @return {FeatureType} Closest feature.
|
|
19752
|
+
* @return {FeatureType|null} Closest feature (or `null` if none found).
|
|
19713
19753
|
* @api
|
|
19714
19754
|
*/
|
|
19715
19755
|
getClosestFeatureToCoordinate(e, t) {
|
|
@@ -21420,7 +21460,7 @@ class CanvasBuilder extends VectorContext {
|
|
|
21420
21460
|
*/
|
|
21421
21461
|
updateFillStyle(e, t) {
|
|
21422
21462
|
const n = e.fillStyle;
|
|
21423
|
-
(typeof n != "string" || e.currentFillStyle != n) && (
|
|
21463
|
+
(typeof n != "string" || e.currentFillStyle != n) && (this.instructions.push(t.call(this, e)), e.currentFillStyle = n);
|
|
21424
21464
|
}
|
|
21425
21465
|
/**
|
|
21426
21466
|
* @param {import("../canvas.js").FillStrokeState} state State.
|
|
@@ -21428,7 +21468,7 @@ class CanvasBuilder extends VectorContext {
|
|
|
21428
21468
|
*/
|
|
21429
21469
|
updateStrokeStyle(e, t) {
|
|
21430
21470
|
const n = e.strokeStyle, s = e.lineCap, o = e.lineDash, l = e.lineDashOffset, c = e.lineJoin, u = e.lineWidth, h = e.miterLimit;
|
|
21431
|
-
(e.currentStrokeStyle != n || e.currentLineCap != s || o != e.currentLineDash && !equals$2(e.currentLineDash, o) || e.currentLineDashOffset != l || e.currentLineJoin != c || e.currentLineWidth != u || e.currentMiterLimit != h) && (
|
|
21471
|
+
(e.currentStrokeStyle != n || e.currentLineCap != s || o != e.currentLineDash && !equals$2(e.currentLineDash, o) || e.currentLineDashOffset != l || e.currentLineJoin != c || e.currentLineWidth != u || e.currentMiterLimit != h) && (t.call(this, e), e.currentStrokeStyle = n, e.currentLineCap = s, e.currentLineDash = o, e.currentLineDashOffset = l, e.currentLineJoin = c, e.currentLineWidth = u, e.currentMiterLimit = h);
|
|
21432
21472
|
}
|
|
21433
21473
|
/**
|
|
21434
21474
|
* @param {import("../../Feature.js").FeatureLike} feature Feature.
|
|
@@ -21863,7 +21903,7 @@ class CanvasPolygonBuilder extends CanvasBuilder {
|
|
|
21863
21903
|
*/
|
|
21864
21904
|
setFillStrokeStyles_() {
|
|
21865
21905
|
const e = this.state;
|
|
21866
|
-
|
|
21906
|
+
this.updateFillStyle(e, this.createFill), this.updateStrokeStyle(e, this.applyStroke);
|
|
21867
21907
|
}
|
|
21868
21908
|
}
|
|
21869
21909
|
function lineChunk(i, e, t, n, s) {
|
|
@@ -22554,7 +22594,7 @@ class Executor {
|
|
|
22554
22594
|
*/
|
|
22555
22595
|
setStrokeStyle_(e, t) {
|
|
22556
22596
|
e.strokeStyle = /** @type {import("../../colorlike.js").ColorLike} */
|
|
22557
|
-
t[1], e.lineWidth = /** @type {number} */
|
|
22597
|
+
t[1], t[1] && (e.lineWidth = /** @type {number} */
|
|
22558
22598
|
t[2], e.lineCap = /** @type {CanvasLineCap} */
|
|
22559
22599
|
t[3], e.lineJoin = /** @type {CanvasLineJoin} */
|
|
22560
22600
|
t[4], e.miterLimit = /** @type {number} */
|
|
@@ -22562,7 +22602,7 @@ class Executor {
|
|
|
22562
22602
|
t[7], e.setLineDash(
|
|
22563
22603
|
/** @type {Array<number>} */
|
|
22564
22604
|
t[6]
|
|
22565
|
-
);
|
|
22605
|
+
));
|
|
22566
22606
|
}
|
|
22567
22607
|
/**
|
|
22568
22608
|
* @private
|
|
@@ -22760,7 +22800,7 @@ class Executor {
|
|
|
22760
22800
|
ge
|
|
22761
22801
|
];
|
|
22762
22802
|
if (u) {
|
|
22763
|
-
let at, ot,
|
|
22803
|
+
let at, ot, Le;
|
|
22764
22804
|
if (ie) {
|
|
22765
22805
|
const He = T - v;
|
|
22766
22806
|
if (!ie[He]) {
|
|
@@ -22768,14 +22808,14 @@ class Executor {
|
|
|
22768
22808
|
continue;
|
|
22769
22809
|
}
|
|
22770
22810
|
const tt = ie[He];
|
|
22771
|
-
at = tt.args, ot = tt.declutterMode, delete ie[He],
|
|
22811
|
+
at = tt.args, ot = tt.declutterMode, delete ie[He], Le = getDeclutterBox(at);
|
|
22772
22812
|
}
|
|
22773
22813
|
let it, ht;
|
|
22774
|
-
if (at && (ot !== "declutter" || !u.collides(
|
|
22814
|
+
if (at && (ot !== "declutter" || !u.collides(Le)) && (it = !0), (F !== "declutter" || !u.collides(Ve.declutterBox)) && (ht = !0), ot === "declutter" && F === "declutter") {
|
|
22775
22815
|
const He = it && ht;
|
|
22776
22816
|
it = He, ht = He;
|
|
22777
22817
|
}
|
|
22778
|
-
it && (ot !== "none" && u.insert(
|
|
22818
|
+
it && (ot !== "none" && u.insert(Le), this.replayImageOrLabel_.apply(this, at)), ht && (F !== "none" && u.insert(Ve.declutterBox), this.replayImageOrLabel_.apply(this, ut));
|
|
22779
22819
|
} else
|
|
22780
22820
|
this.replayImageOrLabel_.apply(this, ut);
|
|
22781
22821
|
}
|
|
@@ -22788,7 +22828,7 @@ class Executor {
|
|
|
22788
22828
|
), Ae = (
|
|
22789
22829
|
/** @type {number} */
|
|
22790
22830
|
se[2]
|
|
22791
|
-
),
|
|
22831
|
+
), Re = (
|
|
22792
22832
|
/** @type {number} */
|
|
22793
22833
|
se[3]
|
|
22794
22834
|
), ke = (
|
|
@@ -22851,12 +22891,12 @@ class Executor {
|
|
|
22851
22891
|
);
|
|
22852
22892
|
e: if (at) {
|
|
22853
22893
|
const ot = [];
|
|
22854
|
-
let
|
|
22894
|
+
let Le, it, ht, He, tt;
|
|
22855
22895
|
if (X)
|
|
22856
|
-
for (
|
|
22857
|
-
tt = at[
|
|
22896
|
+
for (Le = 0, it = at.length; Le < it; ++Le) {
|
|
22897
|
+
tt = at[Le], ht = /** @type {string} */
|
|
22858
22898
|
tt[4], He = this.createLabel(ht, Y, "", X), D = /** @type {number} */
|
|
22859
|
-
tt[2] + (Qe[0] < 0 ? -Ue : Ue), G =
|
|
22899
|
+
tt[2] + (Qe[0] < 0 ? -Ue : Ue), G = Re * He.height + (0.5 - Re) * 2 * Ue * Qe[1] / Qe[0] - Ze;
|
|
22860
22900
|
const ct = this.calculateImageOrLabelDimensions_(
|
|
22861
22901
|
He.width,
|
|
22862
22902
|
He.height,
|
|
@@ -22888,10 +22928,10 @@ class Executor {
|
|
|
22888
22928
|
]);
|
|
22889
22929
|
}
|
|
22890
22930
|
if (J)
|
|
22891
|
-
for (
|
|
22892
|
-
tt = at[
|
|
22931
|
+
for (Le = 0, it = at.length; Le < it; ++Le) {
|
|
22932
|
+
tt = at[Le], ht = /** @type {string} */
|
|
22893
22933
|
tt[4], He = this.createLabel(ht, Y, J, ""), D = /** @type {number} */
|
|
22894
|
-
tt[2], G =
|
|
22934
|
+
tt[2], G = Re * He.height - Ze;
|
|
22895
22935
|
const ct = this.calculateImageOrLabelDimensions_(
|
|
22896
22936
|
He.width,
|
|
22897
22937
|
He.height,
|
|
@@ -23212,7 +23252,7 @@ class ExecutorGroup {
|
|
|
23212
23252
|
)
|
|
23213
23253
|
), B && H.restore(), U) {
|
|
23214
23254
|
U.offset();
|
|
23215
|
-
const W = u[g] * h +
|
|
23255
|
+
const W = u[g] * h + ALL.indexOf(G);
|
|
23216
23256
|
this.deferredZIndexContexts_[W] || (this.deferredZIndexContexts_[W] = []), this.deferredZIndexContexts_[W].push(U);
|
|
23217
23257
|
}
|
|
23218
23258
|
}
|
|
@@ -24177,7 +24217,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer {
|
|
|
24177
24217
|
* @private
|
|
24178
24218
|
*/
|
|
24179
24219
|
resetDrawContext_() {
|
|
24180
|
-
if (this.opacity_ !== 1) {
|
|
24220
|
+
if (this.opacity_ !== 1 && this.targetContext_) {
|
|
24181
24221
|
const e = this.targetContext_.globalAlpha;
|
|
24182
24222
|
this.targetContext_.globalAlpha = this.opacity_, this.targetContext_.drawImage(this.context.canvas, 0, 0), this.targetContext_.globalAlpha = e, releaseCanvas(this.context), canvasPool$1.push(this.context.canvas), this.context = this.targetContext_, this.targetContext_ = null;
|
|
24183
24223
|
}
|
|
@@ -26860,8 +26900,8 @@ function requireEs6Promise() {
|
|
|
26860
26900
|
if (ge) {
|
|
26861
26901
|
try {
|
|
26862
26902
|
fe = ce(he);
|
|
26863
|
-
} catch (
|
|
26864
|
-
Ae = !1, ye =
|
|
26903
|
+
} catch (Re) {
|
|
26904
|
+
Ae = !1, ye = Re;
|
|
26865
26905
|
}
|
|
26866
26906
|
if (ae === fe) {
|
|
26867
26907
|
_e(ae, le());
|
|
@@ -26902,11 +26942,11 @@ function requireEs6Promise() {
|
|
|
26902
26942
|
}, ie.prototype._eachEntry = function(ce, he) {
|
|
26903
26943
|
var ge = this._instanceConstructor, fe = ge.resolve;
|
|
26904
26944
|
if (fe === $) {
|
|
26905
|
-
var ye = void 0, Ae = void 0,
|
|
26945
|
+
var ye = void 0, Ae = void 0, Re = !1;
|
|
26906
26946
|
try {
|
|
26907
26947
|
ye = ce.then;
|
|
26908
26948
|
} catch (Ye) {
|
|
26909
|
-
|
|
26949
|
+
Re = !0, Ae = Ye;
|
|
26910
26950
|
}
|
|
26911
26951
|
if (ye === J && ce._state !== Q)
|
|
26912
26952
|
this._settledAt(ce._state, he, ce._result);
|
|
@@ -26914,7 +26954,7 @@ function requireEs6Promise() {
|
|
|
26914
26954
|
this._remaining--, this._result[he] = ce;
|
|
26915
26955
|
else if (ge === Ee) {
|
|
26916
26956
|
var ke = new ge(te);
|
|
26917
|
-
|
|
26957
|
+
Re ? _e(ke, Ae) : se(ke, ce, ye), this._willSettleAt(ke, he);
|
|
26918
26958
|
} else
|
|
26919
26959
|
this._willSettleAt(new ge(function(Ye) {
|
|
26920
26960
|
return Ye(ce);
|
|
@@ -46274,11 +46314,11 @@ function stylefunction(i, e, t, n = defaultResolutions, s = void 0, o = void 0,
|
|
|
46274
46314
|
const ye = s[ce], Ae = createCanvas(
|
|
46275
46315
|
ye.width,
|
|
46276
46316
|
ye.height
|
|
46277
|
-
),
|
|
46317
|
+
), Re = (
|
|
46278
46318
|
/** @type {CanvasRenderingContext2D} */
|
|
46279
46319
|
Ae.getContext("2d")
|
|
46280
46320
|
);
|
|
46281
|
-
|
|
46321
|
+
Re.globalAlpha = _e, Re.drawImage(
|
|
46282
46322
|
he.image,
|
|
46283
46323
|
ye.x,
|
|
46284
46324
|
ye.y,
|
|
@@ -46288,7 +46328,7 @@ function stylefunction(i, e, t, n = defaultResolutions, s = void 0, o = void 0,
|
|
|
46288
46328
|
0,
|
|
46289
46329
|
ye.width,
|
|
46290
46330
|
ye.height
|
|
46291
|
-
), fe =
|
|
46331
|
+
), fe = Re.createPattern(Ae, "repeat"), v[ge] = fe;
|
|
46292
46332
|
}
|
|
46293
46333
|
Ie.setColor(fe);
|
|
46294
46334
|
}
|
|
@@ -46469,7 +46509,7 @@ function stylefunction(i, e, t, n = defaultResolutions, s = void 0, o = void 0,
|
|
|
46469
46509
|
ee
|
|
46470
46510
|
) : null;
|
|
46471
46511
|
if (!Ae || Ae.a !== 0) {
|
|
46472
|
-
const
|
|
46512
|
+
const Re = getValue(
|
|
46473
46513
|
ne,
|
|
46474
46514
|
"paint",
|
|
46475
46515
|
"icon-halo-color",
|
|
@@ -46484,7 +46524,7 @@ function stylefunction(i, e, t, n = defaultResolutions, s = void 0, o = void 0,
|
|
|
46484
46524
|
T,
|
|
46485
46525
|
ee
|
|
46486
46526
|
);
|
|
46487
|
-
let Ye = `${pe}.${ye}.${ke}.${
|
|
46527
|
+
let Ye = `${pe}.${ye}.${ke}.${Re}`;
|
|
46488
46528
|
if (Ae !== null && (Ye += `.${Ae}`), xe = m[Ye], !xe) {
|
|
46489
46529
|
const ze = getDeclutterMode(
|
|
46490
46530
|
ne,
|
|
@@ -46537,12 +46577,12 @@ function stylefunction(i, e, t, n = defaultResolutions, s = void 0, o = void 0,
|
|
|
46537
46577
|
pixelRatio: we.pixelRatio
|
|
46538
46578
|
},
|
|
46539
46579
|
ke,
|
|
46540
|
-
|
|
46580
|
+
Re
|
|
46541
46581
|
), Ue = void 0) : Be = drawIconHalo(
|
|
46542
46582
|
ge.image,
|
|
46543
46583
|
we,
|
|
46544
46584
|
ke,
|
|
46545
|
-
|
|
46585
|
+
Re
|
|
46546
46586
|
);
|
|
46547
46587
|
else {
|
|
46548
46588
|
if (we.sdf && !ge.unSDFed) {
|
|
@@ -46745,23 +46785,23 @@ function stylefunction(i, e, t, n = defaultResolutions, s = void 0, o = void 0,
|
|
|
46745
46785
|
Ee * (ge.scale || 1),
|
|
46746
46786
|
Ne
|
|
46747
46787
|
);
|
|
46748
|
-
let
|
|
46749
|
-
if (
|
|
46788
|
+
let Re = ge.text;
|
|
46789
|
+
if (Re === `
|
|
46750
46790
|
`)
|
|
46751
46791
|
return he.push(`
|
|
46752
46792
|
`, ""), he;
|
|
46753
46793
|
if (K == 2)
|
|
46754
|
-
return he.push(applyLetterSpacing(
|
|
46755
|
-
|
|
46756
|
-
|
|
46794
|
+
return he.push(applyLetterSpacing(Re, $e), Ae), he;
|
|
46795
|
+
Re = wrapText(
|
|
46796
|
+
Re,
|
|
46757
46797
|
Ae,
|
|
46758
46798
|
ie,
|
|
46759
46799
|
$e
|
|
46760
46800
|
).split(`
|
|
46761
46801
|
`);
|
|
46762
|
-
for (let ke = 0, Ye =
|
|
46802
|
+
for (let ke = 0, Ye = Re.length; ke < Ye; ++ke)
|
|
46763
46803
|
ke > 0 && he.push(`
|
|
46764
|
-
`, ""), he.push(
|
|
46804
|
+
`, ""), he.push(Re[ke], Ae);
|
|
46765
46805
|
return he;
|
|
46766
46806
|
}, []) : Oe = fromTemplate(ce, Y).trim(), _e = getValue(
|
|
46767
46807
|
ne,
|
|
@@ -46853,7 +46893,7 @@ function stylefunction(i, e, t, n = defaultResolutions, s = void 0, o = void 0,
|
|
|
46853
46893
|
T,
|
|
46854
46894
|
ee
|
|
46855
46895
|
);
|
|
46856
|
-
const
|
|
46896
|
+
const Re = getValue(
|
|
46857
46897
|
ne,
|
|
46858
46898
|
"layout",
|
|
46859
46899
|
"text-offset",
|
|
@@ -46905,9 +46945,9 @@ function stylefunction(i, e, t, n = defaultResolutions, s = void 0, o = void 0,
|
|
|
46905
46945
|
ee
|
|
46906
46946
|
);
|
|
46907
46947
|
Se.setJustify(Ue === "auto" ? void 0 : Ue), Se.setOffsetX(
|
|
46908
|
-
|
|
46948
|
+
Re[0] * Ee + ze + ke[0]
|
|
46909
46949
|
), Se.setOffsetY(
|
|
46910
|
-
|
|
46950
|
+
Re[1] * Ee + Ye + ke[1]
|
|
46911
46951
|
), U.setColor(
|
|
46912
46952
|
colorWithOpacity(
|
|
46913
46953
|
getValue(
|
|
@@ -65611,26 +65651,25 @@ const NAMESPACE_URI = "http://www.w3.org/1999/xlink";
|
|
|
65611
65651
|
function readHref(i) {
|
|
65612
65652
|
return i.getAttributeNS(NAMESPACE_URI, "href");
|
|
65613
65653
|
}
|
|
65614
|
-
const NAMESPACE_URIS$2 = [
|
|
65654
|
+
const NAMESPACE_URIS$2 = [
|
|
65655
|
+
null,
|
|
65656
|
+
"http://www.opengis.net/wms",
|
|
65657
|
+
"http://www.opengis.net/sld"
|
|
65658
|
+
];
|
|
65615
65659
|
function isV13(i) {
|
|
65616
65660
|
return compareVersions(i[0].version, "1.3") >= 0;
|
|
65617
65661
|
}
|
|
65618
65662
|
const PARSERS$2 = makeStructureNS(NAMESPACE_URIS$2, {
|
|
65619
65663
|
Service: makeObjectPropertySetter(readService),
|
|
65620
65664
|
Capability: makeObjectPropertySetter(readCapability)
|
|
65621
|
-
}),
|
|
65665
|
+
}), CAPABILITY_PARSERS = makeStructureNS(NAMESPACE_URIS$2, {
|
|
65622
65666
|
Request: makeObjectPropertySetter(readRequest),
|
|
65623
65667
|
Exception: makeObjectPropertySetter(readException),
|
|
65624
|
-
Layer: makeObjectPropertySetter(readCapabilityLayer)
|
|
65625
|
-
}, CAPABILITY_PARSERS = makeStructureNS(NAMESPACE_URIS$2, {
|
|
65626
|
-
...COMMON_CAPABILITY_PARSERS,
|
|
65668
|
+
Layer: makeObjectPropertySetter(readCapabilityLayer),
|
|
65627
65669
|
UserDefinedSymbolization: makeObjectPropertySetter(
|
|
65628
65670
|
readUserDefinedSymbolization
|
|
65629
65671
|
)
|
|
65630
|
-
})
|
|
65631
|
-
NAMESPACE_URIS$2,
|
|
65632
|
-
COMMON_CAPABILITY_PARSERS
|
|
65633
|
-
);
|
|
65672
|
+
});
|
|
65634
65673
|
class WMSCapabilities extends XML {
|
|
65635
65674
|
constructor() {
|
|
65636
65675
|
super(), this.version = void 0;
|
|
@@ -65731,7 +65770,9 @@ const COMMON_SERVICE_PARSERS = {
|
|
|
65731
65770
|
}), REQUEST_PARSERS = makeStructureNS(NAMESPACE_URIS$2, {
|
|
65732
65771
|
GetCapabilities: makeObjectPropertySetter(readOperationType),
|
|
65733
65772
|
GetMap: makeObjectPropertySetter(readOperationType),
|
|
65734
|
-
GetFeatureInfo: makeObjectPropertySetter(readOperationType)
|
|
65773
|
+
GetFeatureInfo: makeObjectPropertySetter(readOperationType),
|
|
65774
|
+
DescribeLayer: makeObjectPropertySetter(readOperationType),
|
|
65775
|
+
GetLegendGraphic: makeObjectPropertySetter(readOperationType)
|
|
65735
65776
|
}), OPERATIONTYPE_PARSERS = makeStructureNS(NAMESPACE_URIS$2, {
|
|
65736
65777
|
Format: makeObjectPropertyPusher(readString),
|
|
65737
65778
|
DCPType: makeObjectPropertyPusher(readDCPType)
|
|
@@ -65758,12 +65799,14 @@ function readAttribution(i, e) {
|
|
|
65758
65799
|
}
|
|
65759
65800
|
function readUserDefinedSymbolization(i, e) {
|
|
65760
65801
|
return {
|
|
65761
|
-
SupportSLD: !!readBooleanString(
|
|
65762
|
-
i.getAttribute("UserDefinedSymbolization")
|
|
65763
|
-
),
|
|
65802
|
+
SupportSLD: !!readBooleanString(i.getAttribute("SupportSLD")),
|
|
65764
65803
|
UserLayer: !!readBooleanString(i.getAttribute("UserLayer")),
|
|
65765
65804
|
UserStyle: !!readBooleanString(i.getAttribute("UserStyle")),
|
|
65766
|
-
RemoteWFS: !!readBooleanString(i.getAttribute("RemoteWFS"))
|
|
65805
|
+
RemoteWFS: !!readBooleanString(i.getAttribute("RemoteWFS")),
|
|
65806
|
+
InlineFeatureData: !!readBooleanString(
|
|
65807
|
+
i.getAttribute("InlineFeatureData")
|
|
65808
|
+
),
|
|
65809
|
+
RemoteWCS: !!readBooleanString(i.getAttribute("RemoteWCS"))
|
|
65767
65810
|
};
|
|
65768
65811
|
}
|
|
65769
65812
|
function readBoundingBox$1(i, e, t = !0) {
|
|
@@ -65812,12 +65855,7 @@ function readEXGeographicBoundingBox(i, e) {
|
|
|
65812
65855
|
];
|
|
65813
65856
|
}
|
|
65814
65857
|
function readCapability(i, e) {
|
|
65815
|
-
return pushParseAndPop(
|
|
65816
|
-
{},
|
|
65817
|
-
isV13(e) ? CAPABILITY_PARSERS_V13 : CAPABILITY_PARSERS,
|
|
65818
|
-
i,
|
|
65819
|
-
e
|
|
65820
|
-
);
|
|
65858
|
+
return pushParseAndPop({}, CAPABILITY_PARSERS, i, e);
|
|
65821
65859
|
}
|
|
65822
65860
|
function readService(i, e) {
|
|
65823
65861
|
return pushParseAndPop(
|
|
@@ -69899,8 +69937,8 @@ var logger$c = LoggerByDefault.getLogger("measures"), Measures = {
|
|
|
69899
69937
|
left: 10
|
|
69900
69938
|
};
|
|
69901
69939
|
var c = s.options.displayProfileOptions, u = i.points, h = JSON.parse(JSON.stringify(u));
|
|
69902
|
-
h.sort(function(
|
|
69903
|
-
return
|
|
69940
|
+
h.sort(function(Le, it) {
|
|
69941
|
+
return Le.z - it.z;
|
|
69904
69942
|
});
|
|
69905
69943
|
var g = h[0].z, f = h[h.length - 1].z, m = i.distance;
|
|
69906
69944
|
let v = "m";
|
|
@@ -69922,8 +69960,8 @@ var logger$c = LoggerByDefault.getLogger("measures"), Measures = {
|
|
|
69922
69960
|
let me;
|
|
69923
69961
|
f === g ? me = J / 0.2 : me = J / (re - ee);
|
|
69924
69962
|
let se, Ce, be, ve, _e, Ie;
|
|
69925
|
-
for (let
|
|
69926
|
-
se = document.createElementNS("http://www.w3.org/2000/svg", "text"), se.setAttribute("class", "profile-z-graduation"), se.setAttribute("font-family", o.fontFamily), se.setAttribute("font-size", "10px"), se.setAttribute("fill", "#5E5E5E"), se.textContent = (Math.round(100 * (ee +
|
|
69963
|
+
for (let Le = 0; Le <= oe; Le++)
|
|
69964
|
+
se = document.createElementNS("http://www.w3.org/2000/svg", "text"), se.setAttribute("class", "profile-z-graduation"), se.setAttribute("font-family", o.fontFamily), se.setAttribute("font-size", "10px"), se.setAttribute("fill", "#5E5E5E"), se.textContent = (Math.round(100 * (ee + Le * Q)) / 100).toLocaleString(), Ce = J - Le * ne, se.setAttribute("transform", `translate(${H + B - 8}, ${Ce + 5})`), se.setAttribute("text-anchor", "end"), le.appendChild(se), be = Math.round(Ce) - 0.5, ve = document.createElementNS("http://www.w3.org/2000/svg", "g"), _e = document.createElementNS("http://www.w3.org/2000/svg", "path"), _e.setAttribute("cs", "100,100"), _e.setAttribute("stroke-width", "1"), Le !== 0 ? _e.setAttribute("stroke-opacity", "0.2") : _e.setAttribute("stroke-opacity", "1"), _e.setAttribute("stroke", "#000000"), _e.setAttribute("fill", "none"), _e.setAttribute("d", `M${H + B},${be} L${$ + H + B},${be}`), Ie = document.createElementNS("http://www.w3.org/2000/svg", "path"), Ie.setAttribute("cs", "100,100"), Ie.setAttribute("stroke-width", "1"), Ie.setAttribute("stroke-opacity", "1"), Ie.setAttribute("stroke", "#000000"), Ie.setAttribute("fill", "none"), Ie.setAttribute("d", `M${H + B},${be} L${H + B + 5},${be}`), Ie.setAttribute("transform", "translate(-5, 0)"), ve.appendChild(Ie), ve.appendChild(_e), de.appendChild(ve);
|
|
69927
69965
|
var Te = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
69928
69966
|
Te.setAttribute("class", "profile-z-legend"), Te.setAttribute("font-family", o.fontFamily), Te.setAttribute("font-size", "11px"), Te.setAttribute("fill", "#5E5E5E"), Te.textContent = "Altitude (m)", Te.setAttribute("transform", `translate(${H - 8}, ${Math.round(J / 2)}) rotate(-90)`), Te.setAttribute("text-anchor", "middle"), le.appendChild(Te), K.appendChild(le), K.appendChild(de), m > 2e3 && (m /= 1e3, v = "km");
|
|
69929
69967
|
const Ge = Math.floor($ / Y);
|
|
@@ -69935,25 +69973,25 @@ var logger$c = LoggerByDefault.getLogger("measures"), Measures = {
|
|
|
69935
69973
|
Ke.setAttribute("class", "profile-x-vertical");
|
|
69936
69974
|
const pe = document.createElementNS("http://www.w3.org/2000/svg", "g"), xe = $ / qe, je = (qe - Se) * xe, Oe = Math.round(($ - je) / We);
|
|
69937
69975
|
let Pe, Ne, Ee, $e, ie, ae;
|
|
69938
|
-
for (let
|
|
69939
|
-
Pe = document.createElementNS("http://www.w3.org/2000/svg", "text"), Pe.setAttribute("class", "profile-x-graduation"), Pe.setAttribute("font-family", o.fontFamily), Pe.setAttribute("font-size", "10px"), Pe.setAttribute("fill", "#5E5E5E"),
|
|
69976
|
+
for (let Le = 0; Le <= We + 1; Le++)
|
|
69977
|
+
Pe = document.createElementNS("http://www.w3.org/2000/svg", "text"), Pe.setAttribute("class", "profile-x-graduation"), Pe.setAttribute("font-family", o.fontFamily), Pe.setAttribute("font-size", "10px"), Pe.setAttribute("fill", "#5E5E5E"), Le !== We + 1 && (Pe.textContent = (Math.round(100 * Le * ue) / 100).toLocaleString()), Ne = H + B + Le * Oe, Le === We + 1 && (Ne = H + B + $), Pe.setAttribute("transform", `translate(${Ne}, ${J + q + 5})`), Pe.setAttribute("text-anchor", "middle"), Ke.appendChild(Pe), Ee = Ne - 0.5, $e = document.createElementNS("http://www.w3.org/2000/svg", "g"), ie = document.createElementNS("http://www.w3.org/2000/svg", "path"), ie.setAttribute("cs", "100,100"), ie.setAttribute("stroke-width", "1"), Le !== 0 ? ie.setAttribute("stroke-opacity", "0.2") : ie.setAttribute("stroke-opacity", "1"), ie.setAttribute("stroke", "#000000"), ie.setAttribute("fill", "none"), ie.setAttribute("d", `M${Ee},${J} L${Ee},0`), ae = document.createElementNS("http://www.w3.org/2000/svg", "path"), ae.setAttribute("cs", "100,100"), ae.setAttribute("stroke-width", "1"), ae.setAttribute("stroke-opacity", "1"), ae.setAttribute("stroke", "#000000"), ae.setAttribute("fill", "none"), ae.setAttribute("d", `M${Ee},${J} L${Ee},${J - 5}`), ae.setAttribute("transform", "translate(0, 5)"), $e.appendChild(ae), $e.appendChild(ie), pe.appendChild($e);
|
|
69940
69978
|
var ce = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
69941
69979
|
ce.setAttribute("class", "profile-x-legend"), ce.setAttribute("font-family", o.fontFamily), ce.setAttribute("font-size", "11px"), ce.setAttribute("fill", "#5E5E5E"), ce.textContent = `Distance (${v})`, ce.setAttribute("transform", `translate(${H + B + $ / 2}, ${J + q + W + 3})`), ce.setAttribute("text-anchor", "middle"), Ke.appendChild(ce), K.appendChild(Ke), K.appendChild(pe);
|
|
69942
69980
|
const he = document.createElementNS("http://www.w3.org/2000/svg", "g");
|
|
69943
69981
|
let ge = 1;
|
|
69944
69982
|
v === "km" && (ge = 1e3);
|
|
69945
69983
|
let fe = this._dataDistToSvgX(u[0].dist / ge, U, $, xe), ye = this._dataZToSvgY(u[0].z, J, ee, me), Ae = `M${fe},${ye}`;
|
|
69946
|
-
for (let
|
|
69947
|
-
fe = this._dataDistToSvgX(u[
|
|
69948
|
-
const
|
|
69949
|
-
|
|
69984
|
+
for (let Le = 1; Le < u.length; Le++)
|
|
69985
|
+
fe = this._dataDistToSvgX(u[Le].dist / ge, U, $, xe), ye = this._dataZToSvgY(u[Le].z, J, ee, me), Ae += ` L${fe},${ye}`;
|
|
69986
|
+
const Re = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
69987
|
+
Re.setAttribute("cs", "100,100"), Re.setAttribute("stroke-width", "1"), Re.setAttribute("stroke-opacity", "1"), Re.setAttribute("stroke", o.strokeColor), Re.setAttribute("fill", "none"), Re.setAttribute("d", Ae), Ae += ` L${fe},${J}`, Ae += ` L${U - $},${J}`;
|
|
69950
69988
|
const ke = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
69951
|
-
ke.setAttribute("cs", "100,100"), ke.setAttribute("stroke-width", "1"), ke.setAttribute("stroke-opacity", "0"), ke.setAttribute("stroke", "#000000"), ke.setAttribute("fill", o.fillColor), ke.setAttribute("fill-opacity", "0.2"), ke.setAttribute("d", Ae), he.appendChild(
|
|
69989
|
+
ke.setAttribute("cs", "100,100"), ke.setAttribute("stroke-width", "1"), ke.setAttribute("stroke-opacity", "0"), ke.setAttribute("stroke", "#000000"), ke.setAttribute("fill", o.fillColor), ke.setAttribute("fill-opacity", "0.2"), ke.setAttribute("d", Ae), he.appendChild(Re), he.appendChild(ke), K.appendChild(he);
|
|
69952
69990
|
const Ye = document.createElementNS("http://www.w3.org/2000/svg", "g"), ze = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
69953
69991
|
ze.setAttribute("width", $), ze.setAttribute("height", J), ze.setAttribute("transform", `translate(${U - $},0)`), ze.setAttribute("visibility", "hidden"), ze.setAttribute("pointer-events", "all");
|
|
69954
69992
|
const Ze = JSON.parse(JSON.stringify(u));
|
|
69955
|
-
Ze.sort(function(
|
|
69956
|
-
return
|
|
69993
|
+
Ze.sort(function(Le, it) {
|
|
69994
|
+
return Le.dist - it.dist;
|
|
69957
69995
|
});
|
|
69958
69996
|
const Ue = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
69959
69997
|
Ue.setAttribute("id", "focusLineX"), Ue.setAttribute("class", "focusLine-default"), Ue.setAttribute("fill", "none"), Ue.setAttribute("stroke", o.focusLineColor), Ue.setAttribute("stroke-width", "0.5px"), Ue.setAttribute("visibility", "hidden");
|
|
@@ -69975,18 +70013,18 @@ var logger$c = LoggerByDefault.getLogger("measures"), Measures = {
|
|
|
69975
70013
|
function at() {
|
|
69976
70014
|
Ue.setAttribute("visibility", "hidden"), we.setAttribute("visibility", "hidden"), Be.setAttribute("visibility", "hidden"), n.__removeProfileMarker(s), De.classList.remove("tooltipFadeIn"), et.classList.remove("tooltipFadeIn"), De.classList.add("tooltipFadeOut"), et.classList.add("tooltipFadeOut");
|
|
69977
70015
|
}
|
|
69978
|
-
function ot(
|
|
70016
|
+
function ot(Le) {
|
|
69979
70017
|
const it = K.createSVGPoint();
|
|
69980
|
-
it.x =
|
|
70018
|
+
it.x = Le.clientX, it.y = Le.clientY;
|
|
69981
70019
|
const ht = it.matrixTransform(K.getScreenCTM().inverse()), He = this._svgXToDataDist(ht.x, U, $, xe) * ge, tt = Math.max(1, this._arrayBisect(Ze, He)), ct = u[tt - 1], St = u[tt];
|
|
69982
70020
|
let pt = ct;
|
|
69983
70021
|
He - ct.dist > St.dist - He && (pt = St);
|
|
69984
70022
|
const Ct = this._dataDistToSvgX(pt.dist / ge, U, $, xe), Et = this._dataZToSvgY(pt.z, J, ee, me);
|
|
69985
70023
|
Be.setAttribute("cx", Ct), Be.setAttribute("cy", Et), Ue.setAttribute("x1", Ct), Ue.setAttribute("y1", J), Ue.setAttribute("x2", Ct), Ue.setAttribute("y2", 0), we.setAttribute("x1", H + B), we.setAttribute("y1", Et), we.setAttribute("x2", $ + H + B), we.setAttribute("y2", Et), n.__updateProfileMarker(s, pt);
|
|
69986
|
-
const Tt = `Altitude : ${pt.z.toLocaleString()} m`, ni = `Pente : ${pt.slope} %`,
|
|
69987
|
-
Me.innerHTML = Tt, Qe.innerHTML = ni, st.innerHTML =
|
|
70024
|
+
const Tt = `Altitude : ${pt.z.toLocaleString()} m`, ni = `Pente : ${pt.slope} %`, Lt = `(lat : ${pt.lat.toLocaleString()} / lon : ${pt.lon.toLocaleString()})`;
|
|
70025
|
+
Me.innerHTML = Tt, Qe.innerHTML = ni, st.innerHTML = Lt;
|
|
69988
70026
|
const yt = Math.max(
|
|
69989
|
-
this._getTextWidth(
|
|
70027
|
+
this._getTextWidth(Lt, st),
|
|
69990
70028
|
this._getTextWidth(Tt, Me)
|
|
69991
70029
|
);
|
|
69992
70030
|
let xt;
|