@sword916/vae-map-plus 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +5376 -0
- package/lib/style.css +1 -0
- package/lib/vae-amap/favicon.ico +0 -0
- package/lib/vae-amap/images/game.png +0 -0
- package/lib/vae-amap/images/grid.png +0 -0
- package/lib/vae-amap/images/marker.png +0 -0
- package/lib/vae-amap/index.js +209 -0
- package/lib/vae-amap/style.css +1 -0
- package/lib/vae-cloudmap/favicon.ico +0 -0
- package/lib/vae-cloudmap/images/game.png +0 -0
- package/lib/vae-cloudmap/images/grid.png +0 -0
- package/lib/vae-cloudmap/images/marker.png +0 -0
- package/lib/vae-cloudmap/index.html +30 -0
- package/lib/vae-cloudmap/index.js +4085 -0
- package/lib/vae-cloudmap/style.css +1 -0
- package/lib/vae-map/favicon.ico +0 -0
- package/lib/vae-map/images/game.png +0 -0
- package/lib/vae-map/images/grid.png +0 -0
- package/lib/vae-map/images/marker.png +0 -0
- package/lib/vae-map/index.html +30 -0
- package/lib/vae-map/index.js +4322 -0
- package/lib/vae-map/style.css +1 -0
- package/package.json +1 -1
- package/plugins/L.AnimatedMarker/favicon.ico +0 -0
- package/plugins/L.AnimatedMarker/images/game.png +0 -0
- package/plugins/L.AnimatedMarker/images/grid.png +0 -0
- package/plugins/L.AnimatedMarker/images/marker.png +0 -0
- package/plugins/L.AnimatedMarker/index.html +30 -0
- package/plugins/L.AnimatedMarker/index.js +83 -0
- package/plugins/L.EchartsLayer/favicon.ico +0 -0
- package/plugins/L.EchartsLayer/images/game.png +0 -0
- package/plugins/L.EchartsLayer/images/grid.png +0 -0
- package/plugins/L.EchartsLayer/images/marker.png +0 -0
- package/plugins/L.EchartsLayer/index.html +30 -0
- package/plugins/L.EchartsLayer/index.js +176 -0
- package/plugins/L.FootageCalculator.Area/favicon.ico +0 -0
- package/plugins/L.FootageCalculator.Area/images/game.png +0 -0
- package/plugins/L.FootageCalculator.Area/images/grid.png +0 -0
- package/plugins/L.FootageCalculator.Area/images/marker.png +0 -0
- package/plugins/L.FootageCalculator.Area/index.html +30 -0
- package/plugins/L.FootageCalculator.Area/index.js +418 -0
- package/plugins/L.FootageCalculator.Line/favicon.ico +0 -0
- package/plugins/L.FootageCalculator.Line/images/game.png +0 -0
- package/plugins/L.FootageCalculator.Line/images/grid.png +0 -0
- package/plugins/L.FootageCalculator.Line/images/marker.png +0 -0
- package/plugins/L.FootageCalculator.Line/index.html +30 -0
- package/plugins/L.FootageCalculator.Line/index.js +416 -0
- package/plugins/L.GeoUtil/favicon.ico +0 -0
- package/plugins/L.GeoUtil/images/game.png +0 -0
- package/plugins/L.GeoUtil/images/grid.png +0 -0
- package/plugins/L.GeoUtil/images/marker.png +0 -0
- package/plugins/L.GeoUtil/index.html +30 -0
- package/plugins/L.GeoUtil/index.js +279 -0
- package/plugins/L.Glyphicon/favicon.ico +0 -0
- package/plugins/L.Glyphicon/images/game.png +0 -0
- package/plugins/L.Glyphicon/images/grid.png +0 -0
- package/plugins/L.Glyphicon/images/marker.png +0 -0
- package/plugins/L.Glyphicon/index.html +30 -0
- package/plugins/L.Glyphicon/index.js +57 -0
- package/plugins/L.Glyphicon/style.css +1 -0
- package/plugins/L.MarkerClusterX/favicon.ico +0 -0
- package/plugins/L.MarkerClusterX/images/game.png +0 -0
- package/plugins/L.MarkerClusterX/images/grid.png +0 -0
- package/plugins/L.MarkerClusterX/images/marker.png +0 -0
- package/plugins/L.MarkerClusterX/index.html +30 -0
- package/plugins/L.MarkerClusterX/index.js +33 -0
- package/plugins/L.MarkerClusterX/style.css +1 -0
- package/plugins/L.SafeDivOverlay/favicon.ico +0 -0
- package/plugins/L.SafeDivOverlay/images/game.png +0 -0
- package/plugins/L.SafeDivOverlay/images/grid.png +0 -0
- package/plugins/L.SafeDivOverlay/images/marker.png +0 -0
- package/plugins/L.SafeDivOverlay/index.html +30 -0
- package/plugins/L.SafeDivOverlay/index.js +26 -0
- package/plugins/L.TileLayer.ChinaProvider/favicon.ico +0 -0
- package/plugins/L.TileLayer.ChinaProvider/images/game.png +0 -0
- package/plugins/L.TileLayer.ChinaProvider/images/grid.png +0 -0
- package/plugins/L.TileLayer.ChinaProvider/images/marker.png +0 -0
- package/plugins/L.TileLayer.ChinaProvider/index.html +30 -0
- package/plugins/L.TileLayer.ChinaProvider/index.js +91 -0
- package/plugins/L.VuePopup/favicon.ico +0 -0
- package/plugins/L.VuePopup/images/game.png +0 -0
- package/plugins/L.VuePopup/images/grid.png +0 -0
- package/plugins/L.VuePopup/images/marker.png +0 -0
- package/plugins/L.VuePopup/index.html +30 -0
- package/plugins/L.VuePopup/index.js +68 -0
- package/plugins/L.VueTooltip/favicon.ico +0 -0
- package/plugins/L.VueTooltip/images/game.png +0 -0
- package/plugins/L.VueTooltip/images/grid.png +0 -0
- package/plugins/L.VueTooltip/images/marker.png +0 -0
- package/plugins/L.VueTooltip/index.html +30 -0
- package/plugins/L.VueTooltip/index.js +68 -0
- package/plugins/Mixin.Map.Measure/favicon.ico +0 -0
- package/plugins/Mixin.Map.Measure/images/game.png +0 -0
- package/plugins/Mixin.Map.Measure/images/grid.png +0 -0
- package/plugins/Mixin.Map.Measure/images/marker.png +0 -0
- package/plugins/Mixin.Map.Measure/index.html +30 -0
- package/plugins/Mixin.Map.Measure/index.js +84 -0
- package/plugins/globals/favicon.ico +0 -0
- package/plugins/globals/images/game.png +0 -0
- package/plugins/globals/images/grid.png +0 -0
- package/plugins/globals/images/marker.png +0 -0
- package/plugins/globals/index.html +30 -0
- package/plugins/globals/index.js +4 -0
- package/build/index.mjs +0 -113
- package/examples/App.vue +0 -18
- package/examples/index.js +0 -13
- package/examples/router/index.js +0 -35
- package/examples/views/amap.vue +0 -29
- package/examples/views/amarker.vue +0 -58
- package/examples/views/buffer.vue +0 -66
- package/examples/views/cluster.vue +0 -74
- package/examples/views/cover.vue +0 -85
- package/examples/views/draw-line.vue +0 -49
- package/examples/views/draw.vue +0 -54
- package/examples/views/echarts.vue +0 -142
- package/examples/views/emarker.vue +0 -39
- package/examples/views/image.vue +0 -182
- package/examples/views/index.vue +0 -61
- package/examples/views/lrmap.vue +0 -108
- package/examples/views/map.vue +0 -82
- package/examples/views/measure.vue +0 -86
- package/examples/views/parts/popup.vue +0 -39
- package/examples/views/parts/tooltip.vue +0 -39
- package/examples/views/push-area.vue +0 -52
- package/examples/views/push-line.vue +0 -84
- package/examples/views/trace.vue +0 -49
- package/jsconfig.json +0 -17
- package/src/components/resize-listener/component.jsx +0 -30
- package/src/components/resize-listener/index.js +0 -3
- package/src/composables/useAutoMessage.js +0 -41
- package/src/composables/useContextMenu.js +0 -99
- package/src/composables/useMapMeasure.js +0 -191
- package/src/composables/useResizeObserver.js +0 -81
- package/src/mixins/message.js +0 -1
- package/src/packages/index.js +0 -16
- package/src/packages/vae-amap/index.js +0 -8
- package/src/packages/vae-amap/style.less +0 -9
- package/src/packages/vae-amap/vae-amap.jsx +0 -98
- package/src/packages/vae-cloudmap/ctrl-context-menu/index.vue +0 -74
- package/src/packages/vae-cloudmap/ctrl-draw/index.vue +0 -499
- package/src/packages/vae-cloudmap/ctrl-draw-line/index.vue +0 -161
- package/src/packages/vae-cloudmap/index.js +0 -57
- package/src/packages/vae-cloudmap/scripts/L.MarkerCluster/index.js +0 -2690
- package/src/packages/vae-cloudmap/scripts/L.MarkerCluster/style.css +0 -14
- package/src/packages/vae-cloudmap/scripts/L.Vae.CRS/index.js +0 -212
- package/src/packages/vae-cloudmap/scripts/L.Vae.Client/index.js +0 -780
- package/src/packages/vae-cloudmap/scripts/Mixin.ContextMenu/index.js +0 -101
- package/src/packages/vae-cloudmap/style.less +0 -163
- package/src/packages/vae-cloudmap/vae-cloudmap.jsx +0 -272
- package/src/packages/vae-map/ctrl-context-menu/index.vue +0 -74
- package/src/packages/vae-map/ctrl-draw/index.vue +0 -498
- package/src/packages/vae-map/ctrl-draw-line/index.vue +0 -128
- package/src/packages/vae-map/index.js +0 -59
- package/src/packages/vae-map/scripts/L.MarkerCluster/index.js +0 -2690
- package/src/packages/vae-map/scripts/L.MarkerCluster/style.css +0 -14
- package/src/packages/vae-map/scripts/L.Vae.CRS/index.js +0 -114
- package/src/packages/vae-map/scripts/L.Vae.Client/index.js +0 -548
- package/src/packages/vae-map/scripts/Mixin.ContextMenu/index.js +0 -1
- package/src/packages/vae-map/style.less +0 -161
- package/src/packages/vae-map/vae-lrmap.jsx +0 -237
- package/src/packages/vae-map/vae-map.jsx +0 -135
- package/src/plugins/L.AnimatedMarker/index.js +0 -158
- package/src/plugins/L.EchartsLayer/index.js +0 -339
- package/src/plugins/L.ElasticMarker/index.js +0 -162
- package/src/plugins/L.FootageCalculator.Area/index.js +0 -263
- package/src/plugins/L.FootageCalculator.Line/index.js +0 -273
- package/src/plugins/L.GeoUtil/buffer.js +0 -67
- package/src/plugins/L.GeoUtil/index.js +0 -284
- package/src/plugins/L.Glyphicon/index.js +0 -91
- package/src/plugins/L.Glyphicon/style.less +0 -37
- package/src/plugins/L.MarkerClusterX/index.js +0 -93
- package/src/plugins/L.MarkerClusterX/style.less +0 -162
- package/src/plugins/L.SafeDivOverlay/index.js +0 -55
- package/src/plugins/L.TileLayer.ChinaProvider/index.js +0 -108
- package/src/plugins/L.VuePopup/index.js +0 -67
- package/src/plugins/L.VueTooltip/index.js +0 -63
- package/src/plugins/Mixin.Map.Measure/index.js +0 -248
- package/src/plugins/globals/index.js +0 -7
- package/src/utils/index.js +0 -36
- package/src/utils/resize-event.js +0 -45
- /package/{public → lib}/favicon.ico +0 -0
- /package/{public → lib}/images/game.png +0 -0
- /package/{public → lib}/images/grid.png +0 -0
- /package/{public → lib}/images/marker.png +0 -0
- /package/{public → lib/vae-amap}/index.html +0 -0
|
@@ -0,0 +1,4085 @@
|
|
|
1
|
+
import { watch as Te, unref as S, onBeforeUnmount as kt, defineComponent as te, ref as O, createVNode as Q, readonly as rr, getCurrentScope as sr, onScopeDispose as or, onMounted as ut, nextTick as rt, getCurrentInstance as Re, shallowRef as Da, watchEffect as Na, isRef as ir, computed as A, reactive as Ra, warn as ar, inject as $e, openBlock as I, createElementBlock as q, createElementVNode as ee, mergeProps as lr, renderSlot as je, normalizeClass as G, Transition as Dt, withCtx as Le, normalizeStyle as Ge, createTextVNode as cr, toDisplayString as qe, createCommentVNode as ge, provide as ur, shallowReactive as hn, createBlock as se, withDirectives as bt, resolveDynamicComponent as xt, Fragment as Nt, withModifiers as mn, vShow as Lt, isVNode as We, render as st, renderList as fr, h as dr, toRef as pr, createApp as gn } from "vue";
|
|
2
|
+
import { v4 as hr } from "uuid";
|
|
3
|
+
import { debounce as mr } from "lodash";
|
|
4
|
+
import vn from "leaflet";
|
|
5
|
+
import be from "axios";
|
|
6
|
+
import "leaflet.markercluster";
|
|
7
|
+
import "leaflet-geometryutil";
|
|
8
|
+
import "proj4";
|
|
9
|
+
import "proj4leaflet";
|
|
10
|
+
import "@geoman-io/leaflet-geoman-free";
|
|
11
|
+
import * as me from "echarts";
|
|
12
|
+
import ze from "jquery";
|
|
13
|
+
import ht from "@turf/buffer";
|
|
14
|
+
const Ke = () => _.replace(hr(), /-/g, "");
|
|
15
|
+
function mt(e, t) {
|
|
16
|
+
if (t && _.isPlainObject(t)) {
|
|
17
|
+
let r = t;
|
|
18
|
+
t = function(s) {
|
|
19
|
+
let o = !0;
|
|
20
|
+
return Object.keys(r).forEach((i) => {
|
|
21
|
+
s[i] != r[i] && (o = !1);
|
|
22
|
+
}), o;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function n(r = [], s) {
|
|
26
|
+
return r.forEach((o) => {
|
|
27
|
+
t && _.isObject(t) && !s && (t(o) ? s = o : o.children && Array.isArray(o.children) && (s = n(o.children, s) || s));
|
|
28
|
+
}), s;
|
|
29
|
+
}
|
|
30
|
+
return n(e);
|
|
31
|
+
}
|
|
32
|
+
const ke = /* @__PURE__ */ new WeakMap();
|
|
33
|
+
function gr(e) {
|
|
34
|
+
return {
|
|
35
|
+
width: e.contentRect.width,
|
|
36
|
+
height: e.contentRect.height,
|
|
37
|
+
visible: !!(e.contentRect.height && e.contentRect.width),
|
|
38
|
+
entry: e
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function vr(e) {
|
|
42
|
+
let t = ke.get(e);
|
|
43
|
+
return t || (t = {
|
|
44
|
+
listeners: /* @__PURE__ */ new Set(),
|
|
45
|
+
observer: new ResizeObserver((n) => {
|
|
46
|
+
for (const r of n) {
|
|
47
|
+
const s = ke.get(r.target);
|
|
48
|
+
if (!s)
|
|
49
|
+
continue;
|
|
50
|
+
const o = gr(r);
|
|
51
|
+
s.listeners.forEach((i) => i(o));
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
}, t.observer.observe(e), ke.set(e, t)), t;
|
|
55
|
+
}
|
|
56
|
+
function yr(e) {
|
|
57
|
+
const t = ke.get(e);
|
|
58
|
+
!t || t.listeners.size > 0 || (t.observer.disconnect(), ke.delete(e));
|
|
59
|
+
}
|
|
60
|
+
function Rt(e, t) {
|
|
61
|
+
return !e || typeof t != "function" ? () => {
|
|
62
|
+
} : (vr(e).listeners.add(t), () => {
|
|
63
|
+
const r = ke.get(e);
|
|
64
|
+
r && (r.listeners.delete(t), yr(e));
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function _r(e, t) {
|
|
68
|
+
let n = null;
|
|
69
|
+
const r = (s) => {
|
|
70
|
+
n == null || n(), n = s ? Rt(s, t) : null;
|
|
71
|
+
};
|
|
72
|
+
Te(
|
|
73
|
+
() => S(e),
|
|
74
|
+
(s) => {
|
|
75
|
+
r(s);
|
|
76
|
+
},
|
|
77
|
+
{ immediate: !0 }
|
|
78
|
+
), kt(() => {
|
|
79
|
+
n == null || n();
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
const wr = /* @__PURE__ */ te({
|
|
83
|
+
name: "ResizeListener",
|
|
84
|
+
props: {
|
|
85
|
+
debounce: {
|
|
86
|
+
type: Number,
|
|
87
|
+
default: 100
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
emits: ["resize"],
|
|
91
|
+
setup(e, {
|
|
92
|
+
emit: t,
|
|
93
|
+
slots: n
|
|
94
|
+
}) {
|
|
95
|
+
const r = O(null), s = mr(() => {
|
|
96
|
+
r.value && t("resize", r.value);
|
|
97
|
+
}, e.debounce);
|
|
98
|
+
return _r(r, ({
|
|
99
|
+
visible: o
|
|
100
|
+
}) => {
|
|
101
|
+
o && s();
|
|
102
|
+
}), () => {
|
|
103
|
+
var o;
|
|
104
|
+
return Q("div", {
|
|
105
|
+
ref: r
|
|
106
|
+
}, [(o = n.default) == null ? void 0 : o.call(n)]);
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
}), De = {
|
|
110
|
+
tab: "Tab",
|
|
111
|
+
enter: "Enter",
|
|
112
|
+
space: "Space",
|
|
113
|
+
left: "ArrowLeft",
|
|
114
|
+
up: "ArrowUp",
|
|
115
|
+
right: "ArrowRight",
|
|
116
|
+
down: "ArrowDown",
|
|
117
|
+
esc: "Escape",
|
|
118
|
+
delete: "Delete",
|
|
119
|
+
backspace: "Backspace",
|
|
120
|
+
numpadEnter: "NumpadEnter",
|
|
121
|
+
pageUp: "PageUp",
|
|
122
|
+
pageDown: "PageDown",
|
|
123
|
+
home: "Home",
|
|
124
|
+
end: "End"
|
|
125
|
+
}, br = [
|
|
126
|
+
"",
|
|
127
|
+
"default",
|
|
128
|
+
"small",
|
|
129
|
+
"large"
|
|
130
|
+
];
|
|
131
|
+
function jt(e) {
|
|
132
|
+
return sr() ? (or(e), !0) : !1;
|
|
133
|
+
}
|
|
134
|
+
function ft(e) {
|
|
135
|
+
return typeof e == "function" ? e() : S(e);
|
|
136
|
+
}
|
|
137
|
+
const ye = typeof window < "u" && typeof document < "u";
|
|
138
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
139
|
+
const xr = Object.prototype.toString, Lr = (e) => xr.call(e) === "[object Object]";
|
|
140
|
+
const Sr = () => {
|
|
141
|
+
};
|
|
142
|
+
function yn(e, t, n = {}) {
|
|
143
|
+
const {
|
|
144
|
+
immediate: r = !0
|
|
145
|
+
} = n, s = O(!1);
|
|
146
|
+
let o = null;
|
|
147
|
+
function i() {
|
|
148
|
+
o && (clearTimeout(o), o = null);
|
|
149
|
+
}
|
|
150
|
+
function a() {
|
|
151
|
+
s.value = !1, i();
|
|
152
|
+
}
|
|
153
|
+
function l(...c) {
|
|
154
|
+
i(), s.value = !0, o = setTimeout(() => {
|
|
155
|
+
s.value = !1, o = null, e(...c);
|
|
156
|
+
}, ft(t));
|
|
157
|
+
}
|
|
158
|
+
return r && (s.value = !0, ye && l()), jt(a), {
|
|
159
|
+
isPending: rr(s),
|
|
160
|
+
start: l,
|
|
161
|
+
stop: a
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
const _n = ye ? window : void 0, Ja = ye ? window.document : void 0;
|
|
165
|
+
function St(e) {
|
|
166
|
+
var t;
|
|
167
|
+
const n = ft(e);
|
|
168
|
+
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
169
|
+
}
|
|
170
|
+
function wn(...e) {
|
|
171
|
+
let t, n, r, s;
|
|
172
|
+
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, r, s] = e, t = _n) : [t, n, r, s] = e, !t)
|
|
173
|
+
return Sr;
|
|
174
|
+
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
|
|
175
|
+
const o = [], i = () => {
|
|
176
|
+
o.forEach((u) => u()), o.length = 0;
|
|
177
|
+
}, a = (u, f, d, w) => (u.addEventListener(f, d, w), () => u.removeEventListener(f, d, w)), l = Te(
|
|
178
|
+
() => [St(t), ft(s)],
|
|
179
|
+
([u, f]) => {
|
|
180
|
+
if (i(), !u)
|
|
181
|
+
return;
|
|
182
|
+
const d = Lr(f) ? { ...f } : f;
|
|
183
|
+
o.push(
|
|
184
|
+
...n.flatMap((w) => r.map((v) => a(u, w, v, d)))
|
|
185
|
+
);
|
|
186
|
+
},
|
|
187
|
+
{ immediate: !0, flush: "post" }
|
|
188
|
+
), c = () => {
|
|
189
|
+
l(), i();
|
|
190
|
+
};
|
|
191
|
+
return jt(c), c;
|
|
192
|
+
}
|
|
193
|
+
function Cr() {
|
|
194
|
+
const e = O(!1), t = Re();
|
|
195
|
+
return t && ut(() => {
|
|
196
|
+
e.value = !0;
|
|
197
|
+
}, t), e;
|
|
198
|
+
}
|
|
199
|
+
function Mr(e) {
|
|
200
|
+
const t = Cr();
|
|
201
|
+
return A(() => (t.value, !!e()));
|
|
202
|
+
}
|
|
203
|
+
function Ar(e, t, n = {}) {
|
|
204
|
+
const { window: r = _n, ...s } = n;
|
|
205
|
+
let o;
|
|
206
|
+
const i = Mr(() => r && "ResizeObserver" in r), a = () => {
|
|
207
|
+
o && (o.disconnect(), o = void 0);
|
|
208
|
+
}, l = A(() => {
|
|
209
|
+
const f = ft(e);
|
|
210
|
+
return Array.isArray(f) ? f.map((d) => St(d)) : [St(f)];
|
|
211
|
+
}), c = Te(
|
|
212
|
+
l,
|
|
213
|
+
(f) => {
|
|
214
|
+
if (a(), i.value && r) {
|
|
215
|
+
o = new ResizeObserver(t);
|
|
216
|
+
for (const d of f)
|
|
217
|
+
d && o.observe(d, s);
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
{ immediate: !0, flush: "post" }
|
|
221
|
+
), u = () => {
|
|
222
|
+
a(), c();
|
|
223
|
+
};
|
|
224
|
+
return jt(u), {
|
|
225
|
+
isSupported: i,
|
|
226
|
+
stop: u
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
const Tr = () => ye && /android/i.test(window.navigator.userAgent);
|
|
230
|
+
/**
|
|
231
|
+
* @vue/shared v3.5.32
|
|
232
|
+
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
233
|
+
* @license MIT
|
|
234
|
+
**/
|
|
235
|
+
process.env.NODE_ENV !== "production" && Object.freeze({});
|
|
236
|
+
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
237
|
+
const Er = Object.prototype.hasOwnProperty, ot = (e, t) => Er.call(e, t), bn = Array.isArray;
|
|
238
|
+
const Ze = (e) => typeof e == "function", le = (e) => typeof e == "string", xn = (e) => e !== null && typeof e == "object";
|
|
239
|
+
const Ln = (e) => {
|
|
240
|
+
const t = /* @__PURE__ */ Object.create(null);
|
|
241
|
+
return (n) => t[n] || (t[n] = e(n));
|
|
242
|
+
}, Or = /-\w/g, Ya = Ln(
|
|
243
|
+
(e) => e.replace(Or, (t) => t.slice(1).toUpperCase())
|
|
244
|
+
), Xa = Ln((e) => e.charAt(0).toUpperCase() + e.slice(1));
|
|
245
|
+
var Sn = typeof global == "object" && global && global.Object === Object && global, Pr = typeof self == "object" && self && self.Object === Object && self, ce = Sn || Pr || Function("return this")(), ve = ce.Symbol, Cn = Object.prototype, zr = Cn.hasOwnProperty, Ir = Cn.toString, Ue = ve ? ve.toStringTag : void 0;
|
|
246
|
+
function $r(e) {
|
|
247
|
+
var t = zr.call(e, Ue), n = e[Ue];
|
|
248
|
+
try {
|
|
249
|
+
e[Ue] = void 0;
|
|
250
|
+
var r = !0;
|
|
251
|
+
} catch {
|
|
252
|
+
}
|
|
253
|
+
var s = Ir.call(e);
|
|
254
|
+
return r && (t ? e[Ue] = n : delete e[Ue]), s;
|
|
255
|
+
}
|
|
256
|
+
var kr = Object.prototype, Dr = kr.toString;
|
|
257
|
+
function Nr(e) {
|
|
258
|
+
return Dr.call(e);
|
|
259
|
+
}
|
|
260
|
+
var Rr = "[object Null]", jr = "[object Undefined]", Gt = ve ? ve.toStringTag : void 0;
|
|
261
|
+
function Ee(e) {
|
|
262
|
+
return e == null ? e === void 0 ? jr : Rr : Gt && Gt in Object(e) ? $r(e) : Nr(e);
|
|
263
|
+
}
|
|
264
|
+
function Xe(e) {
|
|
265
|
+
return e != null && typeof e == "object";
|
|
266
|
+
}
|
|
267
|
+
var Br = "[object Symbol]";
|
|
268
|
+
function Bt(e) {
|
|
269
|
+
return typeof e == "symbol" || Xe(e) && Ee(e) == Br;
|
|
270
|
+
}
|
|
271
|
+
function Fr(e, t) {
|
|
272
|
+
for (var n = -1, r = e == null ? 0 : e.length, s = Array(r); ++n < r; )
|
|
273
|
+
s[n] = t(e[n], n, e);
|
|
274
|
+
return s;
|
|
275
|
+
}
|
|
276
|
+
var Ft = Array.isArray, qt = ve ? ve.prototype : void 0, Wt = qt ? qt.toString : void 0;
|
|
277
|
+
function Mn(e) {
|
|
278
|
+
if (typeof e == "string")
|
|
279
|
+
return e;
|
|
280
|
+
if (Ft(e))
|
|
281
|
+
return Fr(e, Mn) + "";
|
|
282
|
+
if (Bt(e))
|
|
283
|
+
return Wt ? Wt.call(e) : "";
|
|
284
|
+
var t = e + "";
|
|
285
|
+
return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
|
|
286
|
+
}
|
|
287
|
+
function An(e) {
|
|
288
|
+
var t = typeof e;
|
|
289
|
+
return e != null && (t == "object" || t == "function");
|
|
290
|
+
}
|
|
291
|
+
var Vr = "[object AsyncFunction]", Ur = "[object Function]", Hr = "[object GeneratorFunction]", Gr = "[object Proxy]";
|
|
292
|
+
function qr(e) {
|
|
293
|
+
if (!An(e))
|
|
294
|
+
return !1;
|
|
295
|
+
var t = Ee(e);
|
|
296
|
+
return t == Ur || t == Hr || t == Vr || t == Gr;
|
|
297
|
+
}
|
|
298
|
+
var gt = ce["__core-js_shared__"], Kt = function() {
|
|
299
|
+
var e = /[^.]+$/.exec(gt && gt.keys && gt.keys.IE_PROTO || "");
|
|
300
|
+
return e ? "Symbol(src)_1." + e : "";
|
|
301
|
+
}();
|
|
302
|
+
function Wr(e) {
|
|
303
|
+
return !!Kt && Kt in e;
|
|
304
|
+
}
|
|
305
|
+
var Kr = Function.prototype, Zr = Kr.toString;
|
|
306
|
+
function Oe(e) {
|
|
307
|
+
if (e != null) {
|
|
308
|
+
try {
|
|
309
|
+
return Zr.call(e);
|
|
310
|
+
} catch {
|
|
311
|
+
}
|
|
312
|
+
try {
|
|
313
|
+
return e + "";
|
|
314
|
+
} catch {
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
return "";
|
|
318
|
+
}
|
|
319
|
+
var Jr = /[\\^$.*+?()[\]{}|]/g, Yr = /^\[object .+?Constructor\]$/, Xr = Function.prototype, Qr = Object.prototype, es = Xr.toString, ts = Qr.hasOwnProperty, ns = RegExp(
|
|
320
|
+
"^" + es.call(ts).replace(Jr, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
321
|
+
);
|
|
322
|
+
function rs(e) {
|
|
323
|
+
if (!An(e) || Wr(e))
|
|
324
|
+
return !1;
|
|
325
|
+
var t = qr(e) ? ns : Yr;
|
|
326
|
+
return t.test(Oe(e));
|
|
327
|
+
}
|
|
328
|
+
function ss(e, t) {
|
|
329
|
+
return e == null ? void 0 : e[t];
|
|
330
|
+
}
|
|
331
|
+
function Pe(e, t) {
|
|
332
|
+
var n = ss(e, t);
|
|
333
|
+
return rs(n) ? n : void 0;
|
|
334
|
+
}
|
|
335
|
+
var Ct = Pe(ce, "WeakMap"), Zt = function() {
|
|
336
|
+
try {
|
|
337
|
+
var e = Pe(Object, "defineProperty");
|
|
338
|
+
return e({}, "", {}), e;
|
|
339
|
+
} catch {
|
|
340
|
+
}
|
|
341
|
+
}();
|
|
342
|
+
function os(e, t, n) {
|
|
343
|
+
t == "__proto__" && Zt ? Zt(e, t, {
|
|
344
|
+
configurable: !0,
|
|
345
|
+
enumerable: !0,
|
|
346
|
+
value: n,
|
|
347
|
+
writable: !0
|
|
348
|
+
}) : e[t] = n;
|
|
349
|
+
}
|
|
350
|
+
function is(e, t) {
|
|
351
|
+
return e === t || e !== e && t !== t;
|
|
352
|
+
}
|
|
353
|
+
var as = Object.prototype, Qa = as.hasOwnProperty;
|
|
354
|
+
var ls = 9007199254740991;
|
|
355
|
+
function cs(e) {
|
|
356
|
+
return typeof e == "number" && e > -1 && e % 1 == 0 && e <= ls;
|
|
357
|
+
}
|
|
358
|
+
var el = Object.prototype;
|
|
359
|
+
var us = "[object Arguments]";
|
|
360
|
+
function Jt(e) {
|
|
361
|
+
return Xe(e) && Ee(e) == us;
|
|
362
|
+
}
|
|
363
|
+
var Tn = Object.prototype, fs = Tn.hasOwnProperty, ds = Tn.propertyIsEnumerable, tl = Jt(/* @__PURE__ */ function() {
|
|
364
|
+
return arguments;
|
|
365
|
+
}()) ? Jt : function(e) {
|
|
366
|
+
return Xe(e) && fs.call(e, "callee") && !ds.call(e, "callee");
|
|
367
|
+
};
|
|
368
|
+
var En = typeof exports == "object" && exports && !exports.nodeType && exports, Yt = En && typeof module == "object" && module && !module.nodeType && module, ps = Yt && Yt.exports === En, Xt = ps ? ce.Buffer : void 0, nl = Xt ? Xt.isBuffer : void 0;
|
|
369
|
+
var hs = "[object Arguments]", ms = "[object Array]", gs = "[object Boolean]", vs = "[object Date]", ys = "[object Error]", _s = "[object Function]", ws = "[object Map]", bs = "[object Number]", xs = "[object Object]", Ls = "[object RegExp]", Ss = "[object Set]", Cs = "[object String]", Ms = "[object WeakMap]", As = "[object ArrayBuffer]", Ts = "[object DataView]", Es = "[object Float32Array]", Os = "[object Float64Array]", Ps = "[object Int8Array]", zs = "[object Int16Array]", Is = "[object Int32Array]", $s = "[object Uint8Array]", ks = "[object Uint8ClampedArray]", Ds = "[object Uint16Array]", Ns = "[object Uint32Array]", z = {};
|
|
370
|
+
z[Es] = z[Os] = z[Ps] = z[zs] = z[Is] = z[$s] = z[ks] = z[Ds] = z[Ns] = !0;
|
|
371
|
+
z[hs] = z[ms] = z[As] = z[gs] = z[Ts] = z[vs] = z[ys] = z[_s] = z[ws] = z[bs] = z[xs] = z[Ls] = z[Ss] = z[Cs] = z[Ms] = !1;
|
|
372
|
+
function Rs(e) {
|
|
373
|
+
return Xe(e) && cs(e.length) && !!z[Ee(e)];
|
|
374
|
+
}
|
|
375
|
+
function js(e) {
|
|
376
|
+
return function(t) {
|
|
377
|
+
return e(t);
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
var On = typeof exports == "object" && exports && !exports.nodeType && exports, He = On && typeof module == "object" && module && !module.nodeType && module, Bs = He && He.exports === On, vt = Bs && Sn.process, Qt = function() {
|
|
381
|
+
try {
|
|
382
|
+
var e = He && He.require && He.require("util").types;
|
|
383
|
+
return e || vt && vt.binding && vt.binding("util");
|
|
384
|
+
} catch {
|
|
385
|
+
}
|
|
386
|
+
}(), en = Qt && Qt.isTypedArray, rl = en ? js(en) : Rs, Fs = Object.prototype, sl = Fs.hasOwnProperty;
|
|
387
|
+
function Pn(e, t) {
|
|
388
|
+
return function(n) {
|
|
389
|
+
return e(t(n));
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
var ol = Pn(Object.keys, Object), Vs = Object.prototype, il = Vs.hasOwnProperty;
|
|
393
|
+
var Us = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Hs = /^\w*$/;
|
|
394
|
+
function Gs(e, t) {
|
|
395
|
+
if (Ft(e))
|
|
396
|
+
return !1;
|
|
397
|
+
var n = typeof e;
|
|
398
|
+
return n == "number" || n == "symbol" || n == "boolean" || e == null || Bt(e) ? !0 : Hs.test(e) || !Us.test(e) || t != null && e in Object(t);
|
|
399
|
+
}
|
|
400
|
+
var Je = Pe(Object, "create");
|
|
401
|
+
function qs() {
|
|
402
|
+
this.__data__ = Je ? Je(null) : {}, this.size = 0;
|
|
403
|
+
}
|
|
404
|
+
function Ws(e) {
|
|
405
|
+
var t = this.has(e) && delete this.__data__[e];
|
|
406
|
+
return this.size -= t ? 1 : 0, t;
|
|
407
|
+
}
|
|
408
|
+
var Ks = "__lodash_hash_undefined__", Zs = Object.prototype, Js = Zs.hasOwnProperty;
|
|
409
|
+
function Ys(e) {
|
|
410
|
+
var t = this.__data__;
|
|
411
|
+
if (Je) {
|
|
412
|
+
var n = t[e];
|
|
413
|
+
return n === Ks ? void 0 : n;
|
|
414
|
+
}
|
|
415
|
+
return Js.call(t, e) ? t[e] : void 0;
|
|
416
|
+
}
|
|
417
|
+
var Xs = Object.prototype, Qs = Xs.hasOwnProperty;
|
|
418
|
+
function eo(e) {
|
|
419
|
+
var t = this.__data__;
|
|
420
|
+
return Je ? t[e] !== void 0 : Qs.call(t, e);
|
|
421
|
+
}
|
|
422
|
+
var to = "__lodash_hash_undefined__";
|
|
423
|
+
function no(e, t) {
|
|
424
|
+
var n = this.__data__;
|
|
425
|
+
return this.size += this.has(e) ? 0 : 1, n[e] = Je && t === void 0 ? to : t, this;
|
|
426
|
+
}
|
|
427
|
+
function Se(e) {
|
|
428
|
+
var t = -1, n = e == null ? 0 : e.length;
|
|
429
|
+
for (this.clear(); ++t < n; ) {
|
|
430
|
+
var r = e[t];
|
|
431
|
+
this.set(r[0], r[1]);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
Se.prototype.clear = qs;
|
|
435
|
+
Se.prototype.delete = Ws;
|
|
436
|
+
Se.prototype.get = Ys;
|
|
437
|
+
Se.prototype.has = eo;
|
|
438
|
+
Se.prototype.set = no;
|
|
439
|
+
function ro() {
|
|
440
|
+
this.__data__ = [], this.size = 0;
|
|
441
|
+
}
|
|
442
|
+
function dt(e, t) {
|
|
443
|
+
for (var n = e.length; n--; )
|
|
444
|
+
if (is(e[n][0], t))
|
|
445
|
+
return n;
|
|
446
|
+
return -1;
|
|
447
|
+
}
|
|
448
|
+
var so = Array.prototype, oo = so.splice;
|
|
449
|
+
function io(e) {
|
|
450
|
+
var t = this.__data__, n = dt(t, e);
|
|
451
|
+
if (n < 0)
|
|
452
|
+
return !1;
|
|
453
|
+
var r = t.length - 1;
|
|
454
|
+
return n == r ? t.pop() : oo.call(t, n, 1), --this.size, !0;
|
|
455
|
+
}
|
|
456
|
+
function ao(e) {
|
|
457
|
+
var t = this.__data__, n = dt(t, e);
|
|
458
|
+
return n < 0 ? void 0 : t[n][1];
|
|
459
|
+
}
|
|
460
|
+
function lo(e) {
|
|
461
|
+
return dt(this.__data__, e) > -1;
|
|
462
|
+
}
|
|
463
|
+
function co(e, t) {
|
|
464
|
+
var n = this.__data__, r = dt(n, e);
|
|
465
|
+
return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
|
|
466
|
+
}
|
|
467
|
+
function ue(e) {
|
|
468
|
+
var t = -1, n = e == null ? 0 : e.length;
|
|
469
|
+
for (this.clear(); ++t < n; ) {
|
|
470
|
+
var r = e[t];
|
|
471
|
+
this.set(r[0], r[1]);
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
ue.prototype.clear = ro;
|
|
475
|
+
ue.prototype.delete = io;
|
|
476
|
+
ue.prototype.get = ao;
|
|
477
|
+
ue.prototype.has = lo;
|
|
478
|
+
ue.prototype.set = co;
|
|
479
|
+
var Ye = Pe(ce, "Map");
|
|
480
|
+
function uo() {
|
|
481
|
+
this.size = 0, this.__data__ = {
|
|
482
|
+
hash: new Se(),
|
|
483
|
+
map: new (Ye || ue)(),
|
|
484
|
+
string: new Se()
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
function fo(e) {
|
|
488
|
+
var t = typeof e;
|
|
489
|
+
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
|
|
490
|
+
}
|
|
491
|
+
function pt(e, t) {
|
|
492
|
+
var n = e.__data__;
|
|
493
|
+
return fo(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
|
|
494
|
+
}
|
|
495
|
+
function po(e) {
|
|
496
|
+
var t = pt(this, e).delete(e);
|
|
497
|
+
return this.size -= t ? 1 : 0, t;
|
|
498
|
+
}
|
|
499
|
+
function ho(e) {
|
|
500
|
+
return pt(this, e).get(e);
|
|
501
|
+
}
|
|
502
|
+
function mo(e) {
|
|
503
|
+
return pt(this, e).has(e);
|
|
504
|
+
}
|
|
505
|
+
function go(e, t) {
|
|
506
|
+
var n = pt(this, e), r = n.size;
|
|
507
|
+
return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
|
|
508
|
+
}
|
|
509
|
+
function fe(e) {
|
|
510
|
+
var t = -1, n = e == null ? 0 : e.length;
|
|
511
|
+
for (this.clear(); ++t < n; ) {
|
|
512
|
+
var r = e[t];
|
|
513
|
+
this.set(r[0], r[1]);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
fe.prototype.clear = uo;
|
|
517
|
+
fe.prototype.delete = po;
|
|
518
|
+
fe.prototype.get = ho;
|
|
519
|
+
fe.prototype.has = mo;
|
|
520
|
+
fe.prototype.set = go;
|
|
521
|
+
var vo = "Expected a function";
|
|
522
|
+
function Vt(e, t) {
|
|
523
|
+
if (typeof e != "function" || t != null && typeof t != "function")
|
|
524
|
+
throw new TypeError(vo);
|
|
525
|
+
var n = function() {
|
|
526
|
+
var r = arguments, s = t ? t.apply(this, r) : r[0], o = n.cache;
|
|
527
|
+
if (o.has(s))
|
|
528
|
+
return o.get(s);
|
|
529
|
+
var i = e.apply(this, r);
|
|
530
|
+
return n.cache = o.set(s, i) || o, i;
|
|
531
|
+
};
|
|
532
|
+
return n.cache = new (Vt.Cache || fe)(), n;
|
|
533
|
+
}
|
|
534
|
+
Vt.Cache = fe;
|
|
535
|
+
var yo = 500;
|
|
536
|
+
function _o(e) {
|
|
537
|
+
var t = Vt(e, function(r) {
|
|
538
|
+
return n.size === yo && n.clear(), r;
|
|
539
|
+
}), n = t.cache;
|
|
540
|
+
return t;
|
|
541
|
+
}
|
|
542
|
+
var wo = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, bo = /\\(\\)?/g, xo = _o(function(e) {
|
|
543
|
+
var t = [];
|
|
544
|
+
return e.charCodeAt(0) === 46 && t.push(""), e.replace(wo, function(n, r, s, o) {
|
|
545
|
+
t.push(s ? o.replace(bo, "$1") : r || n);
|
|
546
|
+
}), t;
|
|
547
|
+
});
|
|
548
|
+
function Lo(e) {
|
|
549
|
+
return e == null ? "" : Mn(e);
|
|
550
|
+
}
|
|
551
|
+
function So(e, t) {
|
|
552
|
+
return Ft(e) ? e : Gs(e, t) ? [e] : xo(Lo(e));
|
|
553
|
+
}
|
|
554
|
+
function Co(e) {
|
|
555
|
+
if (typeof e == "string" || Bt(e))
|
|
556
|
+
return e;
|
|
557
|
+
var t = e + "";
|
|
558
|
+
return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
|
|
559
|
+
}
|
|
560
|
+
function Mo(e, t) {
|
|
561
|
+
t = So(t, e);
|
|
562
|
+
for (var n = 0, r = t.length; e != null && n < r; )
|
|
563
|
+
e = e[Co(t[n++])];
|
|
564
|
+
return n && n == r ? e : void 0;
|
|
565
|
+
}
|
|
566
|
+
function Ao(e, t, n) {
|
|
567
|
+
var r = e == null ? void 0 : Mo(e, t);
|
|
568
|
+
return r === void 0 ? n : r;
|
|
569
|
+
}
|
|
570
|
+
var To = Pn(Object.getPrototypeOf, Object), Eo = "[object Object]", Oo = Function.prototype, Po = Object.prototype, zn = Oo.toString, zo = Po.hasOwnProperty, Io = zn.call(Object);
|
|
571
|
+
function $o(e) {
|
|
572
|
+
if (!Xe(e) || Ee(e) != Eo)
|
|
573
|
+
return !1;
|
|
574
|
+
var t = To(e);
|
|
575
|
+
if (t === null)
|
|
576
|
+
return !0;
|
|
577
|
+
var n = zo.call(t, "constructor") && t.constructor;
|
|
578
|
+
return typeof n == "function" && n instanceof n && zn.call(n) == Io;
|
|
579
|
+
}
|
|
580
|
+
function ko() {
|
|
581
|
+
this.__data__ = new ue(), this.size = 0;
|
|
582
|
+
}
|
|
583
|
+
function Do(e) {
|
|
584
|
+
var t = this.__data__, n = t.delete(e);
|
|
585
|
+
return this.size = t.size, n;
|
|
586
|
+
}
|
|
587
|
+
function No(e) {
|
|
588
|
+
return this.__data__.get(e);
|
|
589
|
+
}
|
|
590
|
+
function Ro(e) {
|
|
591
|
+
return this.__data__.has(e);
|
|
592
|
+
}
|
|
593
|
+
var jo = 200;
|
|
594
|
+
function Bo(e, t) {
|
|
595
|
+
var n = this.__data__;
|
|
596
|
+
if (n instanceof ue) {
|
|
597
|
+
var r = n.__data__;
|
|
598
|
+
if (!Ye || r.length < jo - 1)
|
|
599
|
+
return r.push([e, t]), this.size = ++n.size, this;
|
|
600
|
+
n = this.__data__ = new fe(r);
|
|
601
|
+
}
|
|
602
|
+
return n.set(e, t), this.size = n.size, this;
|
|
603
|
+
}
|
|
604
|
+
function Qe(e) {
|
|
605
|
+
var t = this.__data__ = new ue(e);
|
|
606
|
+
this.size = t.size;
|
|
607
|
+
}
|
|
608
|
+
Qe.prototype.clear = ko;
|
|
609
|
+
Qe.prototype.delete = Do;
|
|
610
|
+
Qe.prototype.get = No;
|
|
611
|
+
Qe.prototype.has = Ro;
|
|
612
|
+
Qe.prototype.set = Bo;
|
|
613
|
+
var Fo = Object.prototype, al = Fo.propertyIsEnumerable;
|
|
614
|
+
var Mt = Pe(ce, "DataView"), At = Pe(ce, "Promise"), Tt = Pe(ce, "Set"), tn = "[object Map]", Vo = "[object Object]", nn = "[object Promise]", rn = "[object Set]", sn = "[object WeakMap]", on = "[object DataView]", Uo = Oe(Mt), Ho = Oe(Ye), Go = Oe(At), qo = Oe(Tt), Wo = Oe(Ct), Ie = Ee;
|
|
615
|
+
(Mt && Ie(new Mt(new ArrayBuffer(1))) != on || Ye && Ie(new Ye()) != tn || At && Ie(At.resolve()) != nn || Tt && Ie(new Tt()) != rn || Ct && Ie(new Ct()) != sn) && (Ie = function(e) {
|
|
616
|
+
var t = Ee(e), n = t == Vo ? e.constructor : void 0, r = n ? Oe(n) : "";
|
|
617
|
+
if (r)
|
|
618
|
+
switch (r) {
|
|
619
|
+
case Uo:
|
|
620
|
+
return on;
|
|
621
|
+
case Ho:
|
|
622
|
+
return tn;
|
|
623
|
+
case Go:
|
|
624
|
+
return nn;
|
|
625
|
+
case qo:
|
|
626
|
+
return rn;
|
|
627
|
+
case Wo:
|
|
628
|
+
return sn;
|
|
629
|
+
}
|
|
630
|
+
return t;
|
|
631
|
+
});
|
|
632
|
+
var ll = ce.Uint8Array, Ko = "__lodash_hash_undefined__";
|
|
633
|
+
function Zo(e) {
|
|
634
|
+
return this.__data__.set(e, Ko), this;
|
|
635
|
+
}
|
|
636
|
+
function Jo(e) {
|
|
637
|
+
return this.__data__.has(e);
|
|
638
|
+
}
|
|
639
|
+
function Et(e) {
|
|
640
|
+
var t = -1, n = e == null ? 0 : e.length;
|
|
641
|
+
for (this.__data__ = new fe(); ++t < n; )
|
|
642
|
+
this.add(e[t]);
|
|
643
|
+
}
|
|
644
|
+
Et.prototype.add = Et.prototype.push = Zo;
|
|
645
|
+
Et.prototype.has = Jo;
|
|
646
|
+
var an = ve ? ve.prototype : void 0, cl = an ? an.valueOf : void 0;
|
|
647
|
+
var Yo = Object.prototype, ul = Yo.hasOwnProperty;
|
|
648
|
+
var Xo = Object.prototype, fl = Xo.hasOwnProperty;
|
|
649
|
+
function In(e) {
|
|
650
|
+
for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) {
|
|
651
|
+
var s = e[t];
|
|
652
|
+
os(r, s[0], s[1]);
|
|
653
|
+
}
|
|
654
|
+
return r;
|
|
655
|
+
}
|
|
656
|
+
const Qo = (e) => e === void 0, yt = (e) => typeof e == "boolean", Ce = (e) => typeof e == "number";
|
|
657
|
+
const Ot = (e) => typeof Element > "u" ? !1 : e instanceof Element;
|
|
658
|
+
const ei = (e) => le(e) ? !Number.isNaN(Number(e)) : !1;
|
|
659
|
+
const $n = (e) => {
|
|
660
|
+
if (e.code && e.code !== "Unidentified") return e.code;
|
|
661
|
+
const t = ti(e);
|
|
662
|
+
if (t) {
|
|
663
|
+
if (Object.values(De).includes(t)) return t;
|
|
664
|
+
switch (t) {
|
|
665
|
+
case " ":
|
|
666
|
+
return De.space;
|
|
667
|
+
default:
|
|
668
|
+
return "";
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
return "";
|
|
672
|
+
}, ti = (e) => {
|
|
673
|
+
let t = e.key && e.key !== "Unidentified" ? e.key : "";
|
|
674
|
+
if (!t && e.type === "keyup" && Tr()) {
|
|
675
|
+
const n = e.target;
|
|
676
|
+
t = n.value.charAt(n.selectionStart - 1);
|
|
677
|
+
}
|
|
678
|
+
return t;
|
|
679
|
+
}, ln = (e) => Object.keys(e);
|
|
680
|
+
const kn = "__epPropKey", B = (e) => e, ni = (e) => xn(e) && !!e[kn], Dn = (e, t) => {
|
|
681
|
+
if (!xn(e) || ni(e)) return e;
|
|
682
|
+
const { values: n, required: r, default: s, type: o, validator: i } = e, a = {
|
|
683
|
+
type: o,
|
|
684
|
+
required: !!r,
|
|
685
|
+
validator: n || i ? (l) => {
|
|
686
|
+
let c = !1, u = [];
|
|
687
|
+
if (n && (u = Array.from(n), ot(e, "default") && u.push(s), c || (c = u.includes(l))), i && (c || (c = i(l))), !c && u.length > 0) {
|
|
688
|
+
const f = [...new Set(u)].map((d) => JSON.stringify(d)).join(", ");
|
|
689
|
+
ar(`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${f}], got value ${JSON.stringify(l)}.`);
|
|
690
|
+
}
|
|
691
|
+
return c;
|
|
692
|
+
} : void 0,
|
|
693
|
+
[kn]: !0
|
|
694
|
+
};
|
|
695
|
+
return ot(e, "default") && (a.default = s), a;
|
|
696
|
+
}, Fe = (e) => In(Object.entries(e).map(([t, n]) => [t, Dn(n, t)]));
|
|
697
|
+
var ri = class extends Error {
|
|
698
|
+
constructor(e) {
|
|
699
|
+
super(e), this.name = "ElementPlusError";
|
|
700
|
+
}
|
|
701
|
+
};
|
|
702
|
+
function Ve(e, t) {
|
|
703
|
+
{
|
|
704
|
+
const n = le(e) ? new ri(`[${e}] ${t}`) : e;
|
|
705
|
+
console.warn(n);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
const si = "utils/dom/style";
|
|
709
|
+
function Pt(e, t = "px") {
|
|
710
|
+
if (!e && e !== 0) return "";
|
|
711
|
+
if (Ce(e) || ei(e)) return `${e}${t}`;
|
|
712
|
+
if (le(e)) return e;
|
|
713
|
+
Ve(si, "binding value must be a string or number");
|
|
714
|
+
}
|
|
715
|
+
var oi = {
|
|
716
|
+
name: "en",
|
|
717
|
+
el: {
|
|
718
|
+
breadcrumb: { label: "Breadcrumb" },
|
|
719
|
+
colorpicker: {
|
|
720
|
+
confirm: "OK",
|
|
721
|
+
clear: "Clear",
|
|
722
|
+
defaultLabel: "color picker",
|
|
723
|
+
description: "current color is {color}. press enter to select a new color.",
|
|
724
|
+
alphaLabel: "pick alpha value",
|
|
725
|
+
alphaDescription: "alpha {alpha}, current color is {color}",
|
|
726
|
+
hueLabel: "pick hue value",
|
|
727
|
+
hueDescription: "hue {hue}, current color is {color}",
|
|
728
|
+
svLabel: "pick saturation and brightness value",
|
|
729
|
+
svDescription: "saturation {saturation}, brightness {brightness}, current color is {color}",
|
|
730
|
+
predefineDescription: "select {value} as the color"
|
|
731
|
+
},
|
|
732
|
+
datepicker: {
|
|
733
|
+
now: "Now",
|
|
734
|
+
today: "Today",
|
|
735
|
+
cancel: "Cancel",
|
|
736
|
+
clear: "Clear",
|
|
737
|
+
confirm: "OK",
|
|
738
|
+
dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
|
|
739
|
+
monthTablePrompt: "Use the arrow keys and enter to select the month",
|
|
740
|
+
yearTablePrompt: "Use the arrow keys and enter to select the year",
|
|
741
|
+
selectedDate: "Selected date",
|
|
742
|
+
selectDate: "Select date",
|
|
743
|
+
selectTime: "Select time",
|
|
744
|
+
startDate: "Start Date",
|
|
745
|
+
startTime: "Start Time",
|
|
746
|
+
endDate: "End Date",
|
|
747
|
+
endTime: "End Time",
|
|
748
|
+
prevYear: "Previous Year",
|
|
749
|
+
nextYear: "Next Year",
|
|
750
|
+
prevMonth: "Previous Month",
|
|
751
|
+
nextMonth: "Next Month",
|
|
752
|
+
year: "",
|
|
753
|
+
month1: "January",
|
|
754
|
+
month2: "February",
|
|
755
|
+
month3: "March",
|
|
756
|
+
month4: "April",
|
|
757
|
+
month5: "May",
|
|
758
|
+
month6: "June",
|
|
759
|
+
month7: "July",
|
|
760
|
+
month8: "August",
|
|
761
|
+
month9: "September",
|
|
762
|
+
month10: "October",
|
|
763
|
+
month11: "November",
|
|
764
|
+
month12: "December",
|
|
765
|
+
weeks: {
|
|
766
|
+
sun: "Sun",
|
|
767
|
+
mon: "Mon",
|
|
768
|
+
tue: "Tue",
|
|
769
|
+
wed: "Wed",
|
|
770
|
+
thu: "Thu",
|
|
771
|
+
fri: "Fri",
|
|
772
|
+
sat: "Sat"
|
|
773
|
+
},
|
|
774
|
+
weeksFull: {
|
|
775
|
+
sun: "Sunday",
|
|
776
|
+
mon: "Monday",
|
|
777
|
+
tue: "Tuesday",
|
|
778
|
+
wed: "Wednesday",
|
|
779
|
+
thu: "Thursday",
|
|
780
|
+
fri: "Friday",
|
|
781
|
+
sat: "Saturday"
|
|
782
|
+
},
|
|
783
|
+
months: {
|
|
784
|
+
jan: "Jan",
|
|
785
|
+
feb: "Feb",
|
|
786
|
+
mar: "Mar",
|
|
787
|
+
apr: "Apr",
|
|
788
|
+
may: "May",
|
|
789
|
+
jun: "Jun",
|
|
790
|
+
jul: "Jul",
|
|
791
|
+
aug: "Aug",
|
|
792
|
+
sep: "Sep",
|
|
793
|
+
oct: "Oct",
|
|
794
|
+
nov: "Nov",
|
|
795
|
+
dec: "Dec"
|
|
796
|
+
}
|
|
797
|
+
},
|
|
798
|
+
inputNumber: {
|
|
799
|
+
decrease: "decrease number",
|
|
800
|
+
increase: "increase number"
|
|
801
|
+
},
|
|
802
|
+
select: {
|
|
803
|
+
loading: "Loading",
|
|
804
|
+
noMatch: "No matching data",
|
|
805
|
+
noData: "No data",
|
|
806
|
+
placeholder: "Select"
|
|
807
|
+
},
|
|
808
|
+
mention: { loading: "Loading" },
|
|
809
|
+
dropdown: { toggleDropdown: "Toggle Dropdown" },
|
|
810
|
+
cascader: {
|
|
811
|
+
noMatch: "No matching data",
|
|
812
|
+
loading: "Loading",
|
|
813
|
+
placeholder: "Select",
|
|
814
|
+
noData: "No data"
|
|
815
|
+
},
|
|
816
|
+
pagination: {
|
|
817
|
+
goto: "Go to",
|
|
818
|
+
pagesize: "/page",
|
|
819
|
+
total: "Total {total}",
|
|
820
|
+
pageClassifier: "",
|
|
821
|
+
page: "Page",
|
|
822
|
+
prev: "Go to previous page",
|
|
823
|
+
next: "Go to next page",
|
|
824
|
+
currentPage: "page {pager}",
|
|
825
|
+
prevPages: "Previous {pager} pages",
|
|
826
|
+
nextPages: "Next {pager} pages",
|
|
827
|
+
deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
|
|
828
|
+
},
|
|
829
|
+
dialog: { close: "Close this dialog" },
|
|
830
|
+
drawer: { close: "Close this dialog" },
|
|
831
|
+
messagebox: {
|
|
832
|
+
title: "Message",
|
|
833
|
+
confirm: "OK",
|
|
834
|
+
cancel: "Cancel",
|
|
835
|
+
error: "Illegal input",
|
|
836
|
+
close: "Close this dialog"
|
|
837
|
+
},
|
|
838
|
+
upload: {
|
|
839
|
+
deleteTip: "press delete to remove",
|
|
840
|
+
delete: "Delete",
|
|
841
|
+
preview: "Preview",
|
|
842
|
+
continue: "Continue"
|
|
843
|
+
},
|
|
844
|
+
slider: {
|
|
845
|
+
defaultLabel: "slider between {min} and {max}",
|
|
846
|
+
defaultRangeStartLabel: "pick start value",
|
|
847
|
+
defaultRangeEndLabel: "pick end value"
|
|
848
|
+
},
|
|
849
|
+
table: {
|
|
850
|
+
emptyText: "No Data",
|
|
851
|
+
confirmFilter: "Confirm",
|
|
852
|
+
resetFilter: "Reset",
|
|
853
|
+
clearFilter: "All",
|
|
854
|
+
sumText: "Sum",
|
|
855
|
+
selectAllLabel: "Select all rows",
|
|
856
|
+
selectRowLabel: "Select this row",
|
|
857
|
+
expandRowLabel: "Expand this row",
|
|
858
|
+
collapseRowLabel: "Collapse this row",
|
|
859
|
+
sortLabel: "Sort by {column}",
|
|
860
|
+
filterLabel: "Filter by {column}"
|
|
861
|
+
},
|
|
862
|
+
tag: { close: "Close this tag" },
|
|
863
|
+
tour: {
|
|
864
|
+
next: "Next",
|
|
865
|
+
previous: "Previous",
|
|
866
|
+
finish: "Finish",
|
|
867
|
+
close: "Close this dialog"
|
|
868
|
+
},
|
|
869
|
+
tree: { emptyText: "No Data" },
|
|
870
|
+
transfer: {
|
|
871
|
+
noMatch: "No matching data",
|
|
872
|
+
noData: "No data",
|
|
873
|
+
titles: ["List 1", "List 2"],
|
|
874
|
+
filterPlaceholder: "Enter keyword",
|
|
875
|
+
noCheckedFormat: "{total} items",
|
|
876
|
+
hasCheckedFormat: "{checked}/{total} checked"
|
|
877
|
+
},
|
|
878
|
+
image: { error: "FAILED" },
|
|
879
|
+
pageHeader: { title: "Back" },
|
|
880
|
+
popconfirm: {
|
|
881
|
+
confirmButtonText: "Yes",
|
|
882
|
+
cancelButtonText: "No"
|
|
883
|
+
},
|
|
884
|
+
carousel: {
|
|
885
|
+
leftArrow: "Carousel arrow left",
|
|
886
|
+
rightArrow: "Carousel arrow right",
|
|
887
|
+
indicator: "Carousel switch to index {index}"
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
};
|
|
891
|
+
const ii = (e) => (t, n) => ai(t, n, S(e)), ai = (e, t, n) => Ao(n, e, e).replace(/\{(\w+)\}/g, (r, s) => `${(t == null ? void 0 : t[s]) ?? `{${s}}`}`), li = (e) => ({
|
|
892
|
+
lang: A(() => S(e).name),
|
|
893
|
+
locale: ir(e) ? e : O(e),
|
|
894
|
+
t: ii(e)
|
|
895
|
+
}), Nn = Symbol("localeContextKey"), ci = (e) => {
|
|
896
|
+
const t = e || $e(Nn, O());
|
|
897
|
+
return li(A(() => t.value || oi));
|
|
898
|
+
}, nt = "el", ui = "is-", xe = (e, t, n, r, s) => {
|
|
899
|
+
let o = `${e}-${t}`;
|
|
900
|
+
return n && (o += `-${n}`), r && (o += `__${r}`), s && (o += `--${s}`), o;
|
|
901
|
+
}, Rn = Symbol("namespaceContextKey"), fi = (e) => {
|
|
902
|
+
const t = e || (Re() ? $e(Rn, O(nt)) : O(nt));
|
|
903
|
+
return A(() => S(t) || nt);
|
|
904
|
+
}, Ut = (e, t) => {
|
|
905
|
+
const n = fi(t);
|
|
906
|
+
return {
|
|
907
|
+
namespace: n,
|
|
908
|
+
b: (h = "") => xe(n.value, e, h, "", ""),
|
|
909
|
+
e: (h) => h ? xe(n.value, e, "", h, "") : "",
|
|
910
|
+
m: (h) => h ? xe(n.value, e, "", "", h) : "",
|
|
911
|
+
be: (h, x) => h && x ? xe(n.value, e, h, x, "") : "",
|
|
912
|
+
em: (h, x) => h && x ? xe(n.value, e, "", h, x) : "",
|
|
913
|
+
bm: (h, x) => h && x ? xe(n.value, e, h, "", x) : "",
|
|
914
|
+
bem: (h, x, E) => h && x && E ? xe(n.value, e, h, x, E) : "",
|
|
915
|
+
is: (h, ...x) => {
|
|
916
|
+
const E = x.length >= 1 ? x[0] : !0;
|
|
917
|
+
return h && E ? `${ui}${h}` : "";
|
|
918
|
+
},
|
|
919
|
+
cssVar: (h) => {
|
|
920
|
+
const x = {};
|
|
921
|
+
for (const E in h) h[E] && (x[`--${n.value}-${E}`] = h[E]);
|
|
922
|
+
return x;
|
|
923
|
+
},
|
|
924
|
+
cssVarName: (h) => `--${n.value}-${h}`,
|
|
925
|
+
cssVarBlock: (h) => {
|
|
926
|
+
const x = {};
|
|
927
|
+
for (const E in h) h[E] && (x[`--${n.value}-${e}-${E}`] = h[E]);
|
|
928
|
+
return x;
|
|
929
|
+
},
|
|
930
|
+
cssVarBlockName: (h) => `--${n.value}-${e}-${h}`
|
|
931
|
+
};
|
|
932
|
+
}, cn = { current: 0 }, un = O(0), jn = 2e3, fn = Symbol("elZIndexContextKey"), Bn = Symbol("zIndexContextKey"), di = (e) => {
|
|
933
|
+
const t = Re() ? $e(fn, cn) : cn, n = e || (Re() ? $e(Bn, void 0) : void 0), r = A(() => {
|
|
934
|
+
const i = S(n);
|
|
935
|
+
return Ce(i) ? i : jn;
|
|
936
|
+
}), s = A(() => r.value + un.value), o = () => (t.current++, un.value = t.current, s.value);
|
|
937
|
+
return !ye && !$e(fn) && Ve("ZIndexInjection", `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
|
|
938
|
+
usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`), {
|
|
939
|
+
initialZIndex: r,
|
|
940
|
+
currentZIndex: s,
|
|
941
|
+
nextZIndex: o
|
|
942
|
+
};
|
|
943
|
+
}, pi = Dn({
|
|
944
|
+
type: String,
|
|
945
|
+
values: br,
|
|
946
|
+
required: !1
|
|
947
|
+
}), hi = Symbol("size");
|
|
948
|
+
const mi = Symbol("emptyValuesContextKey");
|
|
949
|
+
const gi = Fe({
|
|
950
|
+
emptyValues: Array,
|
|
951
|
+
valueOnClear: {
|
|
952
|
+
type: B([
|
|
953
|
+
String,
|
|
954
|
+
Number,
|
|
955
|
+
Boolean,
|
|
956
|
+
Function
|
|
957
|
+
]),
|
|
958
|
+
default: void 0,
|
|
959
|
+
validator: (e) => (e = Ze(e) ? e() : e, bn(e) ? e.every((t) => !t) : !e)
|
|
960
|
+
}
|
|
961
|
+
});
|
|
962
|
+
const vi = (e) => {
|
|
963
|
+
const t = e.props, n = bn(t) ? In(t.map((r) => [r, {}])) : t;
|
|
964
|
+
e.setPropsDefaults = (r) => {
|
|
965
|
+
if (n) {
|
|
966
|
+
for (const [s, o] of Object.entries(r)) {
|
|
967
|
+
const i = n[s];
|
|
968
|
+
if (ot(n, s)) {
|
|
969
|
+
if ($o(i)) {
|
|
970
|
+
n[s] = {
|
|
971
|
+
...i,
|
|
972
|
+
default: o
|
|
973
|
+
};
|
|
974
|
+
continue;
|
|
975
|
+
}
|
|
976
|
+
n[s] = {
|
|
977
|
+
type: i,
|
|
978
|
+
default: o
|
|
979
|
+
};
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
e.props = n;
|
|
983
|
+
}
|
|
984
|
+
};
|
|
985
|
+
}, Fn = (e, t) => {
|
|
986
|
+
if (e.install = (n) => {
|
|
987
|
+
for (const r of [e, ...Object.values(t ?? {})]) n.component(r.name, r);
|
|
988
|
+
}, t) for (const [n, r] of Object.entries(t)) e[n] = r;
|
|
989
|
+
return vi(e), e;
|
|
990
|
+
}, Vn = (e, t) => (e.install = (n) => {
|
|
991
|
+
e._context = n._context, n.config.globalProperties[t] = e;
|
|
992
|
+
}, e);
|
|
993
|
+
/*! Element Plus Icons Vue v2.3.2 */
|
|
994
|
+
var yi = /* @__PURE__ */ te({
|
|
995
|
+
name: "CircleCloseFilled",
|
|
996
|
+
__name: "circle-close-filled",
|
|
997
|
+
setup(e) {
|
|
998
|
+
return (t, n) => (I(), q("svg", {
|
|
999
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1000
|
+
viewBox: "0 0 1024 1024"
|
|
1001
|
+
}, [
|
|
1002
|
+
ee("path", {
|
|
1003
|
+
fill: "currentColor",
|
|
1004
|
+
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"
|
|
1005
|
+
})
|
|
1006
|
+
]));
|
|
1007
|
+
}
|
|
1008
|
+
}), Un = yi;
|
|
1009
|
+
var _i = /* @__PURE__ */ te({
|
|
1010
|
+
name: "Close",
|
|
1011
|
+
__name: "close",
|
|
1012
|
+
setup(e) {
|
|
1013
|
+
return (t, n) => (I(), q("svg", {
|
|
1014
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1015
|
+
viewBox: "0 0 1024 1024"
|
|
1016
|
+
}, [
|
|
1017
|
+
ee("path", {
|
|
1018
|
+
fill: "currentColor",
|
|
1019
|
+
d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
|
|
1020
|
+
})
|
|
1021
|
+
]));
|
|
1022
|
+
}
|
|
1023
|
+
}), Hn = _i;
|
|
1024
|
+
var wi = /* @__PURE__ */ te({
|
|
1025
|
+
name: "InfoFilled",
|
|
1026
|
+
__name: "info-filled",
|
|
1027
|
+
setup(e) {
|
|
1028
|
+
return (t, n) => (I(), q("svg", {
|
|
1029
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1030
|
+
viewBox: "0 0 1024 1024"
|
|
1031
|
+
}, [
|
|
1032
|
+
ee("path", {
|
|
1033
|
+
fill: "currentColor",
|
|
1034
|
+
d: "M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"
|
|
1035
|
+
})
|
|
1036
|
+
]));
|
|
1037
|
+
}
|
|
1038
|
+
}), zt = wi;
|
|
1039
|
+
var bi = /* @__PURE__ */ te({
|
|
1040
|
+
name: "SuccessFilled",
|
|
1041
|
+
__name: "success-filled",
|
|
1042
|
+
setup(e) {
|
|
1043
|
+
return (t, n) => (I(), q("svg", {
|
|
1044
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1045
|
+
viewBox: "0 0 1024 1024"
|
|
1046
|
+
}, [
|
|
1047
|
+
ee("path", {
|
|
1048
|
+
fill: "currentColor",
|
|
1049
|
+
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"
|
|
1050
|
+
})
|
|
1051
|
+
]));
|
|
1052
|
+
}
|
|
1053
|
+
}), Gn = bi;
|
|
1054
|
+
var xi = /* @__PURE__ */ te({
|
|
1055
|
+
name: "WarningFilled",
|
|
1056
|
+
__name: "warning-filled",
|
|
1057
|
+
setup(e) {
|
|
1058
|
+
return (t, n) => (I(), q("svg", {
|
|
1059
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1060
|
+
viewBox: "0 0 1024 1024"
|
|
1061
|
+
}, [
|
|
1062
|
+
ee("path", {
|
|
1063
|
+
fill: "currentColor",
|
|
1064
|
+
d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"
|
|
1065
|
+
})
|
|
1066
|
+
]));
|
|
1067
|
+
}
|
|
1068
|
+
}), qn = xi;
|
|
1069
|
+
const It = B([
|
|
1070
|
+
String,
|
|
1071
|
+
Object,
|
|
1072
|
+
Function
|
|
1073
|
+
]);
|
|
1074
|
+
const Li = {
|
|
1075
|
+
Close: Hn,
|
|
1076
|
+
SuccessFilled: Gn,
|
|
1077
|
+
InfoFilled: zt,
|
|
1078
|
+
WarningFilled: qn,
|
|
1079
|
+
CircleCloseFilled: Un
|
|
1080
|
+
}, it = {
|
|
1081
|
+
primary: zt,
|
|
1082
|
+
success: Gn,
|
|
1083
|
+
warning: qn,
|
|
1084
|
+
error: Un,
|
|
1085
|
+
info: zt
|
|
1086
|
+
};
|
|
1087
|
+
const Si = Fe({
|
|
1088
|
+
size: { type: B([Number, String]) },
|
|
1089
|
+
color: { type: String }
|
|
1090
|
+
});
|
|
1091
|
+
var Ci = /* @__PURE__ */ te({
|
|
1092
|
+
name: "ElIcon",
|
|
1093
|
+
inheritAttrs: !1,
|
|
1094
|
+
__name: "icon",
|
|
1095
|
+
props: Si,
|
|
1096
|
+
setup(e) {
|
|
1097
|
+
const t = e, n = Ut("icon"), r = A(() => {
|
|
1098
|
+
const { size: s, color: o } = t, i = Pt(s);
|
|
1099
|
+
return !i && !o ? {} : {
|
|
1100
|
+
fontSize: i,
|
|
1101
|
+
"--color": o
|
|
1102
|
+
};
|
|
1103
|
+
});
|
|
1104
|
+
return (s, o) => (I(), q("i", lr({
|
|
1105
|
+
class: S(n).b(),
|
|
1106
|
+
style: r.value
|
|
1107
|
+
}, s.$attrs), [je(s.$slots, "default")], 16));
|
|
1108
|
+
}
|
|
1109
|
+
}), Mi = Ci;
|
|
1110
|
+
const at = Fn(Mi), Ai = (e) => e, Ti = Fe({
|
|
1111
|
+
value: {
|
|
1112
|
+
type: [String, Number],
|
|
1113
|
+
default: ""
|
|
1114
|
+
},
|
|
1115
|
+
max: {
|
|
1116
|
+
type: Number,
|
|
1117
|
+
default: 99
|
|
1118
|
+
},
|
|
1119
|
+
isDot: Boolean,
|
|
1120
|
+
hidden: Boolean,
|
|
1121
|
+
type: {
|
|
1122
|
+
type: String,
|
|
1123
|
+
values: [
|
|
1124
|
+
"primary",
|
|
1125
|
+
"success",
|
|
1126
|
+
"warning",
|
|
1127
|
+
"info",
|
|
1128
|
+
"danger"
|
|
1129
|
+
],
|
|
1130
|
+
default: "danger"
|
|
1131
|
+
},
|
|
1132
|
+
showZero: {
|
|
1133
|
+
type: Boolean,
|
|
1134
|
+
default: !0
|
|
1135
|
+
},
|
|
1136
|
+
color: String,
|
|
1137
|
+
badgeStyle: { type: B([
|
|
1138
|
+
String,
|
|
1139
|
+
Object,
|
|
1140
|
+
Array
|
|
1141
|
+
]) },
|
|
1142
|
+
offset: {
|
|
1143
|
+
type: B(Array),
|
|
1144
|
+
default: () => [0, 0]
|
|
1145
|
+
},
|
|
1146
|
+
badgeClass: { type: String }
|
|
1147
|
+
});
|
|
1148
|
+
var Ei = /* @__PURE__ */ te({
|
|
1149
|
+
name: "ElBadge",
|
|
1150
|
+
__name: "badge",
|
|
1151
|
+
props: Ti,
|
|
1152
|
+
setup(e, { expose: t }) {
|
|
1153
|
+
const n = e, r = Ut("badge"), s = A(() => n.isDot ? "" : Ce(n.value) && Ce(n.max) ? n.max < n.value ? `${n.max}+` : `${n.value}` : `${n.value}`), o = A(() => [{
|
|
1154
|
+
backgroundColor: n.color,
|
|
1155
|
+
marginRight: Pt(-n.offset[0]),
|
|
1156
|
+
marginTop: Pt(n.offset[1])
|
|
1157
|
+
}, n.badgeStyle ?? {}]);
|
|
1158
|
+
return t({ content: s }), (i, a) => (I(), q("div", { class: G(S(r).b()) }, [je(i.$slots, "default"), Q(Dt, { name: `${S(r).namespace.value}-zoom-in-center` }, {
|
|
1159
|
+
default: Le(() => [!e.hidden && (s.value || e.isDot || i.$slots.content) ? (I(), q("sup", {
|
|
1160
|
+
key: 0,
|
|
1161
|
+
class: G([
|
|
1162
|
+
S(r).e("content"),
|
|
1163
|
+
S(r).em("content", e.type),
|
|
1164
|
+
S(r).is("fixed", !!i.$slots.default),
|
|
1165
|
+
S(r).is("dot", e.isDot),
|
|
1166
|
+
S(r).is("hide-zero", !e.showZero && e.value === 0),
|
|
1167
|
+
e.badgeClass
|
|
1168
|
+
]),
|
|
1169
|
+
style: Ge(o.value)
|
|
1170
|
+
}, [je(i.$slots, "content", { value: s.value }, () => [cr(qe(s.value), 1)])], 6)) : ge("v-if", !0)]),
|
|
1171
|
+
_: 3
|
|
1172
|
+
}, 8, ["name"])], 2));
|
|
1173
|
+
}
|
|
1174
|
+
}), Oi = Ei;
|
|
1175
|
+
const Pi = Fn(Oi), Wn = Symbol(), lt = O();
|
|
1176
|
+
function Kn(e, t = void 0) {
|
|
1177
|
+
const n = Re() ? $e(Wn, lt) : lt;
|
|
1178
|
+
return e ? A(() => {
|
|
1179
|
+
var r;
|
|
1180
|
+
return ((r = n.value) == null ? void 0 : r[e]) ?? t;
|
|
1181
|
+
}) : n;
|
|
1182
|
+
}
|
|
1183
|
+
function Zn(e, t) {
|
|
1184
|
+
const n = Kn(), r = Ut(e, A(() => {
|
|
1185
|
+
var a;
|
|
1186
|
+
return ((a = n.value) == null ? void 0 : a.namespace) || nt;
|
|
1187
|
+
})), s = ci(A(() => {
|
|
1188
|
+
var a;
|
|
1189
|
+
return (a = n.value) == null ? void 0 : a.locale;
|
|
1190
|
+
})), o = di(A(() => {
|
|
1191
|
+
var a;
|
|
1192
|
+
return ((a = n.value) == null ? void 0 : a.zIndex) || jn;
|
|
1193
|
+
})), i = A(() => {
|
|
1194
|
+
var a;
|
|
1195
|
+
return S(t) || ((a = n.value) == null ? void 0 : a.size) || "";
|
|
1196
|
+
});
|
|
1197
|
+
return Jn(A(() => S(n) || {})), {
|
|
1198
|
+
ns: r,
|
|
1199
|
+
locale: s,
|
|
1200
|
+
zIndex: o,
|
|
1201
|
+
size: i
|
|
1202
|
+
};
|
|
1203
|
+
}
|
|
1204
|
+
const Jn = (e, t, n = !1) => {
|
|
1205
|
+
const r = !!Re(), s = r ? Kn() : void 0, o = r ? ur : void 0;
|
|
1206
|
+
if (!o) {
|
|
1207
|
+
Ve("provideGlobalConfig", "provideGlobalConfig() can only be used inside setup().");
|
|
1208
|
+
return;
|
|
1209
|
+
}
|
|
1210
|
+
const i = A(() => {
|
|
1211
|
+
const a = S(e);
|
|
1212
|
+
return s != null && s.value ? zi(s.value, a) : a;
|
|
1213
|
+
});
|
|
1214
|
+
return o(Wn, i), o(Nn, A(() => i.value.locale)), o(Rn, A(() => i.value.namespace)), o(Bn, A(() => i.value.zIndex)), o(hi, { size: A(() => i.value.size || "") }), o(mi, A(() => ({
|
|
1215
|
+
emptyValues: i.value.emptyValues,
|
|
1216
|
+
valueOnClear: i.value.valueOnClear
|
|
1217
|
+
}))), (n || !lt.value) && (lt.value = i.value), i;
|
|
1218
|
+
}, zi = (e, t) => {
|
|
1219
|
+
const n = [.../* @__PURE__ */ new Set([...ln(e), ...ln(t)])], r = {};
|
|
1220
|
+
for (const s of n) r[s] = t[s] !== void 0 ? t[s] : e[s];
|
|
1221
|
+
return r;
|
|
1222
|
+
}, Ii = Fe({
|
|
1223
|
+
a11y: {
|
|
1224
|
+
type: Boolean,
|
|
1225
|
+
default: !0
|
|
1226
|
+
},
|
|
1227
|
+
locale: { type: B(Object) },
|
|
1228
|
+
size: pi,
|
|
1229
|
+
button: { type: B(Object) },
|
|
1230
|
+
card: { type: B(Object) },
|
|
1231
|
+
dialog: { type: B(Object) },
|
|
1232
|
+
link: { type: B(Object) },
|
|
1233
|
+
experimentalFeatures: { type: B(Object) },
|
|
1234
|
+
keyboardNavigation: {
|
|
1235
|
+
type: Boolean,
|
|
1236
|
+
default: !0
|
|
1237
|
+
},
|
|
1238
|
+
message: { type: B(Object) },
|
|
1239
|
+
zIndex: Number,
|
|
1240
|
+
namespace: {
|
|
1241
|
+
type: String,
|
|
1242
|
+
default: "el"
|
|
1243
|
+
},
|
|
1244
|
+
table: { type: B(Object) },
|
|
1245
|
+
...gi
|
|
1246
|
+
}), H = { placement: "top" }, dl = te({
|
|
1247
|
+
name: "ElConfigProvider",
|
|
1248
|
+
props: Ii,
|
|
1249
|
+
setup(e, { slots: t }) {
|
|
1250
|
+
const n = Jn(e);
|
|
1251
|
+
return Te(() => e.message, (r) => {
|
|
1252
|
+
var s;
|
|
1253
|
+
Object.assign(H, ((s = n == null ? void 0 : n.value) == null ? void 0 : s.message) ?? {}, r ?? {});
|
|
1254
|
+
}, {
|
|
1255
|
+
immediate: !0,
|
|
1256
|
+
deep: !0
|
|
1257
|
+
}), () => je(t, "default", { config: n == null ? void 0 : n.value });
|
|
1258
|
+
}
|
|
1259
|
+
});
|
|
1260
|
+
var $i = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1261
|
+
var Yn = { exports: {} };
|
|
1262
|
+
(function(e, t) {
|
|
1263
|
+
(function(n, r) {
|
|
1264
|
+
e.exports = r();
|
|
1265
|
+
})($i, function() {
|
|
1266
|
+
var n = 1e3, r = 6e4, s = 36e5, o = "millisecond", i = "second", a = "minute", l = "hour", c = "day", u = "week", f = "month", d = "quarter", w = "year", v = "date", h = "Invalid Date", x = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, E = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, D = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(b) {
|
|
1267
|
+
var y = ["th", "st", "nd", "rd"], g = b % 100;
|
|
1268
|
+
return "[" + b + (y[(g - 20) % 10] || y[g] || y[0]) + "]";
|
|
1269
|
+
} }, R = function(b, y, g) {
|
|
1270
|
+
var p = String(b);
|
|
1271
|
+
return !p || p.length >= y ? b : "" + Array(y + 1 - p.length).join(g) + b;
|
|
1272
|
+
}, Z = { s: R, z: function(b) {
|
|
1273
|
+
var y = -b.utcOffset(), g = Math.abs(y), p = Math.floor(g / 60), m = g % 60;
|
|
1274
|
+
return (y <= 0 ? "+" : "-") + R(p, 2, "0") + ":" + R(m, 2, "0");
|
|
1275
|
+
}, m: function b(y, g) {
|
|
1276
|
+
if (y.date() < g.date()) return -b(g, y);
|
|
1277
|
+
var p = 12 * (g.year() - y.year()) + (g.month() - y.month()), m = y.clone().add(p, f), C = g - m < 0, M = y.clone().add(p + (C ? -1 : 1), f);
|
|
1278
|
+
return +(-(p + (g - m) / (C ? m - M : M - m)) || 0);
|
|
1279
|
+
}, a: function(b) {
|
|
1280
|
+
return b < 0 ? Math.ceil(b) || 0 : Math.floor(b);
|
|
1281
|
+
}, p: function(b) {
|
|
1282
|
+
return { M: f, y: w, w: u, d: c, D: v, h: l, m: a, s: i, ms: o, Q: d }[b] || String(b || "").toLowerCase().replace(/s$/, "");
|
|
1283
|
+
}, u: function(b) {
|
|
1284
|
+
return b === void 0;
|
|
1285
|
+
} }, Y = "en", X = {};
|
|
1286
|
+
X[Y] = D;
|
|
1287
|
+
var de = "$isDayjsObject", pe = function(b) {
|
|
1288
|
+
return b instanceof oe || !(!b || !b[de]);
|
|
1289
|
+
}, J = function b(y, g, p) {
|
|
1290
|
+
var m;
|
|
1291
|
+
if (!y) return Y;
|
|
1292
|
+
if (typeof y == "string") {
|
|
1293
|
+
var C = y.toLowerCase();
|
|
1294
|
+
X[C] && (m = C), g && (X[C] = g, m = C);
|
|
1295
|
+
var M = y.split("-");
|
|
1296
|
+
if (!m && M.length > 1) return b(M[0]);
|
|
1297
|
+
} else {
|
|
1298
|
+
var P = y.name;
|
|
1299
|
+
X[P] = y, m = P;
|
|
1300
|
+
}
|
|
1301
|
+
return !p && m && (Y = m), m || !p && Y;
|
|
1302
|
+
}, $ = function(b, y) {
|
|
1303
|
+
if (pe(b)) return b.clone();
|
|
1304
|
+
var g = typeof y == "object" ? y : {};
|
|
1305
|
+
return g.date = b, g.args = arguments, new oe(g);
|
|
1306
|
+
}, T = Z;
|
|
1307
|
+
T.l = J, T.i = pe, T.w = function(b, y) {
|
|
1308
|
+
return $(b, { locale: y.$L, utc: y.$u, x: y.$x, $offset: y.$offset });
|
|
1309
|
+
};
|
|
1310
|
+
var oe = function() {
|
|
1311
|
+
function b(g) {
|
|
1312
|
+
this.$L = J(g.locale, null, !0), this.parse(g), this.$x = this.$x || g.x || {}, this[de] = !0;
|
|
1313
|
+
}
|
|
1314
|
+
var y = b.prototype;
|
|
1315
|
+
return y.parse = function(g) {
|
|
1316
|
+
this.$d = function(p) {
|
|
1317
|
+
var m = p.date, C = p.utc;
|
|
1318
|
+
if (m === null) return /* @__PURE__ */ new Date(NaN);
|
|
1319
|
+
if (T.u(m)) return /* @__PURE__ */ new Date();
|
|
1320
|
+
if (m instanceof Date) return new Date(m);
|
|
1321
|
+
if (typeof m == "string" && !/Z$/i.test(m)) {
|
|
1322
|
+
var M = m.match(x);
|
|
1323
|
+
if (M) {
|
|
1324
|
+
var P = M[2] - 1 || 0, k = (M[7] || "0").substring(0, 3);
|
|
1325
|
+
return C ? new Date(Date.UTC(M[1], P, M[3] || 1, M[4] || 0, M[5] || 0, M[6] || 0, k)) : new Date(M[1], P, M[3] || 1, M[4] || 0, M[5] || 0, M[6] || 0, k);
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
return new Date(m);
|
|
1329
|
+
}(g), this.init();
|
|
1330
|
+
}, y.init = function() {
|
|
1331
|
+
var g = this.$d;
|
|
1332
|
+
this.$y = g.getFullYear(), this.$M = g.getMonth(), this.$D = g.getDate(), this.$W = g.getDay(), this.$H = g.getHours(), this.$m = g.getMinutes(), this.$s = g.getSeconds(), this.$ms = g.getMilliseconds();
|
|
1333
|
+
}, y.$utils = function() {
|
|
1334
|
+
return T;
|
|
1335
|
+
}, y.isValid = function() {
|
|
1336
|
+
return this.$d.toString() !== h;
|
|
1337
|
+
}, y.isSame = function(g, p) {
|
|
1338
|
+
var m = $(g);
|
|
1339
|
+
return this.startOf(p) <= m && m <= this.endOf(p);
|
|
1340
|
+
}, y.isAfter = function(g, p) {
|
|
1341
|
+
return $(g) < this.startOf(p);
|
|
1342
|
+
}, y.isBefore = function(g, p) {
|
|
1343
|
+
return this.endOf(p) < $(g);
|
|
1344
|
+
}, y.$g = function(g, p, m) {
|
|
1345
|
+
return T.u(g) ? this[p] : this.set(m, g);
|
|
1346
|
+
}, y.unix = function() {
|
|
1347
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
1348
|
+
}, y.valueOf = function() {
|
|
1349
|
+
return this.$d.getTime();
|
|
1350
|
+
}, y.startOf = function(g, p) {
|
|
1351
|
+
var m = this, C = !!T.u(p) || p, M = T.p(g), P = function(ae, V) {
|
|
1352
|
+
var re = T.w(m.$u ? Date.UTC(m.$y, V, ae) : new Date(m.$y, V, ae), m);
|
|
1353
|
+
return C ? re : re.endOf(c);
|
|
1354
|
+
}, k = function(ae, V) {
|
|
1355
|
+
return T.w(m.toDate()[ae].apply(m.toDate("s"), (C ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(V)), m);
|
|
1356
|
+
}, N = this.$W, j = this.$M, K = this.$D, he = "set" + (this.$u ? "UTC" : "");
|
|
1357
|
+
switch (M) {
|
|
1358
|
+
case w:
|
|
1359
|
+
return C ? P(1, 0) : P(31, 11);
|
|
1360
|
+
case f:
|
|
1361
|
+
return C ? P(1, j) : P(0, j + 1);
|
|
1362
|
+
case u:
|
|
1363
|
+
var ie = this.$locale().weekStart || 0, _e = (N < ie ? N + 7 : N) - ie;
|
|
1364
|
+
return P(C ? K - _e : K + (6 - _e), j);
|
|
1365
|
+
case c:
|
|
1366
|
+
case v:
|
|
1367
|
+
return k(he + "Hours", 0);
|
|
1368
|
+
case l:
|
|
1369
|
+
return k(he + "Minutes", 1);
|
|
1370
|
+
case a:
|
|
1371
|
+
return k(he + "Seconds", 2);
|
|
1372
|
+
case i:
|
|
1373
|
+
return k(he + "Milliseconds", 3);
|
|
1374
|
+
default:
|
|
1375
|
+
return this.clone();
|
|
1376
|
+
}
|
|
1377
|
+
}, y.endOf = function(g) {
|
|
1378
|
+
return this.startOf(g, !1);
|
|
1379
|
+
}, y.$set = function(g, p) {
|
|
1380
|
+
var m, C = T.p(g), M = "set" + (this.$u ? "UTC" : ""), P = (m = {}, m[c] = M + "Date", m[v] = M + "Date", m[f] = M + "Month", m[w] = M + "FullYear", m[l] = M + "Hours", m[a] = M + "Minutes", m[i] = M + "Seconds", m[o] = M + "Milliseconds", m)[C], k = C === c ? this.$D + (p - this.$W) : p;
|
|
1381
|
+
if (C === f || C === w) {
|
|
1382
|
+
var N = this.clone().set(v, 1);
|
|
1383
|
+
N.$d[P](k), N.init(), this.$d = N.set(v, Math.min(this.$D, N.daysInMonth())).$d;
|
|
1384
|
+
} else P && this.$d[P](k);
|
|
1385
|
+
return this.init(), this;
|
|
1386
|
+
}, y.set = function(g, p) {
|
|
1387
|
+
return this.clone().$set(g, p);
|
|
1388
|
+
}, y.get = function(g) {
|
|
1389
|
+
return this[T.p(g)]();
|
|
1390
|
+
}, y.add = function(g, p) {
|
|
1391
|
+
var m, C = this;
|
|
1392
|
+
g = Number(g);
|
|
1393
|
+
var M = T.p(p), P = function(j) {
|
|
1394
|
+
var K = $(C);
|
|
1395
|
+
return T.w(K.date(K.date() + Math.round(j * g)), C);
|
|
1396
|
+
};
|
|
1397
|
+
if (M === f) return this.set(f, this.$M + g);
|
|
1398
|
+
if (M === w) return this.set(w, this.$y + g);
|
|
1399
|
+
if (M === c) return P(1);
|
|
1400
|
+
if (M === u) return P(7);
|
|
1401
|
+
var k = (m = {}, m[a] = r, m[l] = s, m[i] = n, m)[M] || 1, N = this.$d.getTime() + g * k;
|
|
1402
|
+
return T.w(N, this);
|
|
1403
|
+
}, y.subtract = function(g, p) {
|
|
1404
|
+
return this.add(-1 * g, p);
|
|
1405
|
+
}, y.format = function(g) {
|
|
1406
|
+
var p = this, m = this.$locale();
|
|
1407
|
+
if (!this.isValid()) return m.invalidDate || h;
|
|
1408
|
+
var C = g || "YYYY-MM-DDTHH:mm:ssZ", M = T.z(this), P = this.$H, k = this.$m, N = this.$M, j = m.weekdays, K = m.months, he = m.meridiem, ie = function(V, re, we, et) {
|
|
1409
|
+
return V && (V[re] || V(p, C)) || we[re].slice(0, et);
|
|
1410
|
+
}, _e = function(V) {
|
|
1411
|
+
return T.s(P % 12 || 12, V, "0");
|
|
1412
|
+
}, ae = he || function(V, re, we) {
|
|
1413
|
+
var et = V < 12 ? "AM" : "PM";
|
|
1414
|
+
return we ? et.toLowerCase() : et;
|
|
1415
|
+
};
|
|
1416
|
+
return C.replace(E, function(V, re) {
|
|
1417
|
+
return re || function(we) {
|
|
1418
|
+
switch (we) {
|
|
1419
|
+
case "YY":
|
|
1420
|
+
return String(p.$y).slice(-2);
|
|
1421
|
+
case "YYYY":
|
|
1422
|
+
return T.s(p.$y, 4, "0");
|
|
1423
|
+
case "M":
|
|
1424
|
+
return N + 1;
|
|
1425
|
+
case "MM":
|
|
1426
|
+
return T.s(N + 1, 2, "0");
|
|
1427
|
+
case "MMM":
|
|
1428
|
+
return ie(m.monthsShort, N, K, 3);
|
|
1429
|
+
case "MMMM":
|
|
1430
|
+
return ie(K, N);
|
|
1431
|
+
case "D":
|
|
1432
|
+
return p.$D;
|
|
1433
|
+
case "DD":
|
|
1434
|
+
return T.s(p.$D, 2, "0");
|
|
1435
|
+
case "d":
|
|
1436
|
+
return String(p.$W);
|
|
1437
|
+
case "dd":
|
|
1438
|
+
return ie(m.weekdaysMin, p.$W, j, 2);
|
|
1439
|
+
case "ddd":
|
|
1440
|
+
return ie(m.weekdaysShort, p.$W, j, 3);
|
|
1441
|
+
case "dddd":
|
|
1442
|
+
return j[p.$W];
|
|
1443
|
+
case "H":
|
|
1444
|
+
return String(P);
|
|
1445
|
+
case "HH":
|
|
1446
|
+
return T.s(P, 2, "0");
|
|
1447
|
+
case "h":
|
|
1448
|
+
return _e(1);
|
|
1449
|
+
case "hh":
|
|
1450
|
+
return _e(2);
|
|
1451
|
+
case "a":
|
|
1452
|
+
return ae(P, k, !0);
|
|
1453
|
+
case "A":
|
|
1454
|
+
return ae(P, k, !1);
|
|
1455
|
+
case "m":
|
|
1456
|
+
return String(k);
|
|
1457
|
+
case "mm":
|
|
1458
|
+
return T.s(k, 2, "0");
|
|
1459
|
+
case "s":
|
|
1460
|
+
return String(p.$s);
|
|
1461
|
+
case "ss":
|
|
1462
|
+
return T.s(p.$s, 2, "0");
|
|
1463
|
+
case "SSS":
|
|
1464
|
+
return T.s(p.$ms, 3, "0");
|
|
1465
|
+
case "Z":
|
|
1466
|
+
return M;
|
|
1467
|
+
}
|
|
1468
|
+
return null;
|
|
1469
|
+
}(V) || M.replace(":", "");
|
|
1470
|
+
});
|
|
1471
|
+
}, y.utcOffset = function() {
|
|
1472
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
1473
|
+
}, y.diff = function(g, p, m) {
|
|
1474
|
+
var C, M = this, P = T.p(p), k = $(g), N = (k.utcOffset() - this.utcOffset()) * r, j = this - k, K = function() {
|
|
1475
|
+
return T.m(M, k);
|
|
1476
|
+
};
|
|
1477
|
+
switch (P) {
|
|
1478
|
+
case w:
|
|
1479
|
+
C = K() / 12;
|
|
1480
|
+
break;
|
|
1481
|
+
case f:
|
|
1482
|
+
C = K();
|
|
1483
|
+
break;
|
|
1484
|
+
case d:
|
|
1485
|
+
C = K() / 3;
|
|
1486
|
+
break;
|
|
1487
|
+
case u:
|
|
1488
|
+
C = (j - N) / 6048e5;
|
|
1489
|
+
break;
|
|
1490
|
+
case c:
|
|
1491
|
+
C = (j - N) / 864e5;
|
|
1492
|
+
break;
|
|
1493
|
+
case l:
|
|
1494
|
+
C = j / s;
|
|
1495
|
+
break;
|
|
1496
|
+
case a:
|
|
1497
|
+
C = j / r;
|
|
1498
|
+
break;
|
|
1499
|
+
case i:
|
|
1500
|
+
C = j / n;
|
|
1501
|
+
break;
|
|
1502
|
+
default:
|
|
1503
|
+
C = j;
|
|
1504
|
+
}
|
|
1505
|
+
return m ? C : T.a(C);
|
|
1506
|
+
}, y.daysInMonth = function() {
|
|
1507
|
+
return this.endOf(f).$D;
|
|
1508
|
+
}, y.$locale = function() {
|
|
1509
|
+
return X[this.$L];
|
|
1510
|
+
}, y.locale = function(g, p) {
|
|
1511
|
+
if (!g) return this.$L;
|
|
1512
|
+
var m = this.clone(), C = J(g, p, !0);
|
|
1513
|
+
return C && (m.$L = C), m;
|
|
1514
|
+
}, y.clone = function() {
|
|
1515
|
+
return T.w(this.$d, this);
|
|
1516
|
+
}, y.toDate = function() {
|
|
1517
|
+
return new Date(this.valueOf());
|
|
1518
|
+
}, y.toJSON = function() {
|
|
1519
|
+
return this.isValid() ? this.toISOString() : null;
|
|
1520
|
+
}, y.toISOString = function() {
|
|
1521
|
+
return this.$d.toISOString();
|
|
1522
|
+
}, y.toString = function() {
|
|
1523
|
+
return this.$d.toUTCString();
|
|
1524
|
+
}, b;
|
|
1525
|
+
}(), F = oe.prototype;
|
|
1526
|
+
return $.prototype = F, [["$ms", o], ["$s", i], ["$m", a], ["$H", l], ["$W", c], ["$M", f], ["$y", w], ["$D", v]].forEach(function(b) {
|
|
1527
|
+
F[b[1]] = function(y) {
|
|
1528
|
+
return this.$g(y, b[0], b[1]);
|
|
1529
|
+
};
|
|
1530
|
+
}), $.extend = function(b, y) {
|
|
1531
|
+
return b.$i || (b(y, oe, $), b.$i = !0), $;
|
|
1532
|
+
}, $.locale = J, $.isDayjs = pe, $.unix = function(b) {
|
|
1533
|
+
return $(1e3 * b);
|
|
1534
|
+
}, $.en = X[Y], $.Ls = X, $.p = {}, $;
|
|
1535
|
+
});
|
|
1536
|
+
})(Yn);
|
|
1537
|
+
var pl = Yn.exports;
|
|
1538
|
+
const Xn = [
|
|
1539
|
+
"primary",
|
|
1540
|
+
"success",
|
|
1541
|
+
"info",
|
|
1542
|
+
"warning",
|
|
1543
|
+
"error"
|
|
1544
|
+
], Qn = [
|
|
1545
|
+
"top",
|
|
1546
|
+
"top-left",
|
|
1547
|
+
"top-right",
|
|
1548
|
+
"bottom",
|
|
1549
|
+
"bottom-left",
|
|
1550
|
+
"bottom-right"
|
|
1551
|
+
], Ne = "top", U = Ai({
|
|
1552
|
+
customClass: "",
|
|
1553
|
+
dangerouslyUseHTMLString: !1,
|
|
1554
|
+
duration: 3e3,
|
|
1555
|
+
icon: void 0,
|
|
1556
|
+
id: "",
|
|
1557
|
+
message: "",
|
|
1558
|
+
onClose: void 0,
|
|
1559
|
+
showClose: !1,
|
|
1560
|
+
type: "info",
|
|
1561
|
+
plain: !1,
|
|
1562
|
+
offset: 16,
|
|
1563
|
+
placement: void 0,
|
|
1564
|
+
zIndex: 0,
|
|
1565
|
+
grouping: !1,
|
|
1566
|
+
repeatNum: 1,
|
|
1567
|
+
appendTo: ye ? document.body : void 0
|
|
1568
|
+
}), ki = Fe({
|
|
1569
|
+
customClass: {
|
|
1570
|
+
type: String,
|
|
1571
|
+
default: U.customClass
|
|
1572
|
+
},
|
|
1573
|
+
dangerouslyUseHTMLString: {
|
|
1574
|
+
type: Boolean,
|
|
1575
|
+
default: U.dangerouslyUseHTMLString
|
|
1576
|
+
},
|
|
1577
|
+
duration: {
|
|
1578
|
+
type: Number,
|
|
1579
|
+
default: U.duration
|
|
1580
|
+
},
|
|
1581
|
+
icon: {
|
|
1582
|
+
type: It,
|
|
1583
|
+
default: U.icon
|
|
1584
|
+
},
|
|
1585
|
+
id: {
|
|
1586
|
+
type: String,
|
|
1587
|
+
default: U.id
|
|
1588
|
+
},
|
|
1589
|
+
message: {
|
|
1590
|
+
type: B([
|
|
1591
|
+
String,
|
|
1592
|
+
Object,
|
|
1593
|
+
Function
|
|
1594
|
+
]),
|
|
1595
|
+
default: U.message
|
|
1596
|
+
},
|
|
1597
|
+
onClose: {
|
|
1598
|
+
type: B(Function),
|
|
1599
|
+
default: U.onClose
|
|
1600
|
+
},
|
|
1601
|
+
showClose: {
|
|
1602
|
+
type: Boolean,
|
|
1603
|
+
default: U.showClose
|
|
1604
|
+
},
|
|
1605
|
+
type: {
|
|
1606
|
+
type: String,
|
|
1607
|
+
values: Xn,
|
|
1608
|
+
default: U.type
|
|
1609
|
+
},
|
|
1610
|
+
plain: {
|
|
1611
|
+
type: Boolean,
|
|
1612
|
+
default: U.plain
|
|
1613
|
+
},
|
|
1614
|
+
offset: {
|
|
1615
|
+
type: Number,
|
|
1616
|
+
default: U.offset
|
|
1617
|
+
},
|
|
1618
|
+
placement: {
|
|
1619
|
+
type: String,
|
|
1620
|
+
values: Qn,
|
|
1621
|
+
default: U.placement
|
|
1622
|
+
},
|
|
1623
|
+
zIndex: {
|
|
1624
|
+
type: Number,
|
|
1625
|
+
default: U.zIndex
|
|
1626
|
+
},
|
|
1627
|
+
grouping: {
|
|
1628
|
+
type: Boolean,
|
|
1629
|
+
default: U.grouping
|
|
1630
|
+
},
|
|
1631
|
+
repeatNum: {
|
|
1632
|
+
type: Number,
|
|
1633
|
+
default: U.repeatNum
|
|
1634
|
+
}
|
|
1635
|
+
}), Di = { destroy: () => !0 }, ne = hn({}), Ni = (e) => (ne[e] || (ne[e] = hn([])), ne[e]), Ri = (e, t) => {
|
|
1636
|
+
const n = ne[t] || [], r = n.findIndex((i) => i.id === e), s = n[r];
|
|
1637
|
+
let o;
|
|
1638
|
+
return r > 0 && (o = n[r - 1]), {
|
|
1639
|
+
current: s,
|
|
1640
|
+
prev: o
|
|
1641
|
+
};
|
|
1642
|
+
}, ji = (e, t) => {
|
|
1643
|
+
const { prev: n } = Ri(e, t);
|
|
1644
|
+
return n ? n.vm.exposed.bottom.value : 0;
|
|
1645
|
+
}, Bi = (e, t, n) => (ne[n] || []).findIndex((r) => r.id === e) > 0 ? 16 : t, Fi = ["id"], Vi = ["innerHTML"];
|
|
1646
|
+
var Ui = /* @__PURE__ */ te({
|
|
1647
|
+
name: "ElMessage",
|
|
1648
|
+
__name: "message",
|
|
1649
|
+
props: ki,
|
|
1650
|
+
emits: Di,
|
|
1651
|
+
setup(e, { expose: t, emit: n }) {
|
|
1652
|
+
const { Close: r } = Li, s = e, o = n, i = O(!1), { ns: a, zIndex: l } = Zn("message"), { currentZIndex: c, nextZIndex: u } = l, f = O(), d = O(!1), w = O(0);
|
|
1653
|
+
let v;
|
|
1654
|
+
const h = A(() => s.type ? s.type === "error" ? "danger" : s.type : "info"), x = A(() => {
|
|
1655
|
+
const F = s.type;
|
|
1656
|
+
return { [a.bm("icon", F)]: F && it[F] };
|
|
1657
|
+
}), E = A(() => s.icon || it[s.type] || ""), D = A(() => s.placement || Ne), R = A(() => ji(s.id, D.value)), Z = A(() => Math.max(Bi(s.id, s.offset, D.value) + R.value, s.offset)), Y = A(() => w.value + Z.value), X = A(() => D.value.includes("left") ? a.is("left") : D.value.includes("right") ? a.is("right") : a.is("center")), de = A(() => D.value.startsWith("top") ? "top" : "bottom"), pe = A(() => ({
|
|
1658
|
+
[de.value]: `${Z.value}px`,
|
|
1659
|
+
zIndex: c.value
|
|
1660
|
+
}));
|
|
1661
|
+
function J() {
|
|
1662
|
+
s.duration !== 0 && ({ stop: v } = yn(() => {
|
|
1663
|
+
T();
|
|
1664
|
+
}, s.duration));
|
|
1665
|
+
}
|
|
1666
|
+
function $() {
|
|
1667
|
+
v == null || v();
|
|
1668
|
+
}
|
|
1669
|
+
function T() {
|
|
1670
|
+
d.value = !1, rt(() => {
|
|
1671
|
+
var F;
|
|
1672
|
+
i.value || ((F = s.onClose) == null || F.call(s), o("destroy"));
|
|
1673
|
+
});
|
|
1674
|
+
}
|
|
1675
|
+
function oe(F) {
|
|
1676
|
+
$n(F) === De.esc && T();
|
|
1677
|
+
}
|
|
1678
|
+
return ut(() => {
|
|
1679
|
+
J(), u(), d.value = !0;
|
|
1680
|
+
}), Te(() => s.repeatNum, () => {
|
|
1681
|
+
$(), J();
|
|
1682
|
+
}), wn(document, "keydown", oe), Ar(f, () => {
|
|
1683
|
+
w.value = f.value.getBoundingClientRect().height;
|
|
1684
|
+
}), t({
|
|
1685
|
+
visible: d,
|
|
1686
|
+
bottom: Y,
|
|
1687
|
+
close: T
|
|
1688
|
+
}), (F, b) => (I(), se(Dt, {
|
|
1689
|
+
name: S(a).b("fade"),
|
|
1690
|
+
onBeforeEnter: b[0] || (b[0] = (y) => i.value = !0),
|
|
1691
|
+
onBeforeLeave: e.onClose,
|
|
1692
|
+
onAfterLeave: b[1] || (b[1] = (y) => F.$emit("destroy")),
|
|
1693
|
+
persisted: ""
|
|
1694
|
+
}, {
|
|
1695
|
+
default: Le(() => [bt(ee("div", {
|
|
1696
|
+
id: e.id,
|
|
1697
|
+
ref_key: "messageRef",
|
|
1698
|
+
ref: f,
|
|
1699
|
+
class: G([
|
|
1700
|
+
S(a).b(),
|
|
1701
|
+
{ [S(a).m(e.type)]: e.type },
|
|
1702
|
+
S(a).is("closable", e.showClose),
|
|
1703
|
+
S(a).is("plain", e.plain),
|
|
1704
|
+
S(a).is("bottom", de.value === "bottom"),
|
|
1705
|
+
X.value,
|
|
1706
|
+
e.customClass
|
|
1707
|
+
]),
|
|
1708
|
+
style: Ge(pe.value),
|
|
1709
|
+
role: "alert",
|
|
1710
|
+
onMouseenter: $,
|
|
1711
|
+
onMouseleave: J
|
|
1712
|
+
}, [
|
|
1713
|
+
e.repeatNum > 1 ? (I(), se(S(Pi), {
|
|
1714
|
+
key: 0,
|
|
1715
|
+
value: e.repeatNum,
|
|
1716
|
+
type: h.value,
|
|
1717
|
+
class: G(S(a).e("badge"))
|
|
1718
|
+
}, null, 8, [
|
|
1719
|
+
"value",
|
|
1720
|
+
"type",
|
|
1721
|
+
"class"
|
|
1722
|
+
])) : ge("v-if", !0),
|
|
1723
|
+
E.value ? (I(), se(S(at), {
|
|
1724
|
+
key: 1,
|
|
1725
|
+
class: G([S(a).e("icon"), x.value])
|
|
1726
|
+
}, {
|
|
1727
|
+
default: Le(() => [(I(), se(xt(E.value)))]),
|
|
1728
|
+
_: 1
|
|
1729
|
+
}, 8, ["class"])) : ge("v-if", !0),
|
|
1730
|
+
je(F.$slots, "default", {}, () => [e.dangerouslyUseHTMLString ? (I(), q(Nt, { key: 1 }, [ge(" Caution here, message could've been compromised, never use user's input as message "), ee("p", {
|
|
1731
|
+
class: G(S(a).e("content")),
|
|
1732
|
+
innerHTML: e.message
|
|
1733
|
+
}, null, 10, Vi)], 2112)) : (I(), q("p", {
|
|
1734
|
+
key: 0,
|
|
1735
|
+
class: G(S(a).e("content"))
|
|
1736
|
+
}, qe(e.message), 3))]),
|
|
1737
|
+
e.showClose ? (I(), se(S(at), {
|
|
1738
|
+
key: 2,
|
|
1739
|
+
class: G(S(a).e("closeBtn")),
|
|
1740
|
+
onClick: mn(T, ["stop"])
|
|
1741
|
+
}, {
|
|
1742
|
+
default: Le(() => [Q(S(r))]),
|
|
1743
|
+
_: 1
|
|
1744
|
+
}, 8, ["class"])) : ge("v-if", !0)
|
|
1745
|
+
], 46, Fi), [[Lt, d.value]])]),
|
|
1746
|
+
_: 3
|
|
1747
|
+
}, 8, ["name", "onBeforeLeave"]));
|
|
1748
|
+
}
|
|
1749
|
+
}), Hi = Ui;
|
|
1750
|
+
let Gi = 1;
|
|
1751
|
+
const qi = (e) => {
|
|
1752
|
+
if (!e.appendTo) e.appendTo = document.body;
|
|
1753
|
+
else if (le(e.appendTo)) {
|
|
1754
|
+
let t = document.querySelector(e.appendTo);
|
|
1755
|
+
Ot(t) || (Ve("ElMessage", "the appendTo option is not an HTMLElement. Falling back to document.body."), t = document.body), e.appendTo = t;
|
|
1756
|
+
}
|
|
1757
|
+
}, Wi = (e) => {
|
|
1758
|
+
!e.placement && le(H.placement) && H.placement && (e.placement = H.placement), e.placement || (e.placement = Ne), Qn.includes(e.placement) || (Ve("ElMessage", `Invalid placement: ${e.placement}. Falling back to '${Ne}'.`), e.placement = Ne);
|
|
1759
|
+
}, er = (e) => {
|
|
1760
|
+
const t = !e || le(e) || We(e) || Ze(e) ? { message: e } : e, n = {
|
|
1761
|
+
...U,
|
|
1762
|
+
...t
|
|
1763
|
+
};
|
|
1764
|
+
return qi(n), Wi(n), yt(H.grouping) && !n.grouping && (n.grouping = H.grouping), Ce(H.duration) && n.duration === 3e3 && (n.duration = H.duration), Ce(H.offset) && n.offset === 16 && (n.offset = H.offset), yt(H.showClose) && !n.showClose && (n.showClose = H.showClose), yt(H.plain) && !n.plain && (n.plain = H.plain), n;
|
|
1765
|
+
}, Ki = (e) => {
|
|
1766
|
+
const t = ne[e.props.placement || Ne], n = t.indexOf(e);
|
|
1767
|
+
if (n === -1) return;
|
|
1768
|
+
t.splice(n, 1);
|
|
1769
|
+
const { handler: r } = e;
|
|
1770
|
+
r.close();
|
|
1771
|
+
}, Zi = ({ appendTo: e, ...t }, n) => {
|
|
1772
|
+
const r = `message_${Gi++}`, s = t.onClose, o = document.createElement("div"), i = {
|
|
1773
|
+
...t,
|
|
1774
|
+
id: r,
|
|
1775
|
+
onClose: () => {
|
|
1776
|
+
s == null || s(), Ki(c);
|
|
1777
|
+
},
|
|
1778
|
+
onDestroy: () => {
|
|
1779
|
+
st(null, o);
|
|
1780
|
+
}
|
|
1781
|
+
}, a = Q(Hi, i, Ze(i.message) || We(i.message) ? { default: Ze(i.message) ? i.message : () => i.message } : null);
|
|
1782
|
+
a.appContext = n || Me._context, st(a, o), e.appendChild(o.firstElementChild);
|
|
1783
|
+
const l = a.component, c = {
|
|
1784
|
+
id: r,
|
|
1785
|
+
vnode: a,
|
|
1786
|
+
vm: l,
|
|
1787
|
+
handler: { close: () => {
|
|
1788
|
+
l.exposed.close();
|
|
1789
|
+
} },
|
|
1790
|
+
props: a.component.props
|
|
1791
|
+
};
|
|
1792
|
+
return c;
|
|
1793
|
+
}, Me = (e = {}, t) => {
|
|
1794
|
+
if (!ye) return { close: () => {
|
|
1795
|
+
} };
|
|
1796
|
+
const n = er(e), r = Ni(n.placement || Ne);
|
|
1797
|
+
if (n.grouping && r.length) {
|
|
1798
|
+
const o = r.find(({ vnode: i }) => {
|
|
1799
|
+
var a;
|
|
1800
|
+
return ((a = i.props) == null ? void 0 : a.message) === n.message;
|
|
1801
|
+
});
|
|
1802
|
+
if (o)
|
|
1803
|
+
return o.props.repeatNum += 1, o.props.type = n.type, o.handler;
|
|
1804
|
+
}
|
|
1805
|
+
if (Ce(H.max) && r.length >= H.max) return { close: () => {
|
|
1806
|
+
} };
|
|
1807
|
+
const s = Zi(n, t);
|
|
1808
|
+
return r.push(s), s.handler;
|
|
1809
|
+
};
|
|
1810
|
+
Xn.forEach((e) => {
|
|
1811
|
+
Me[e] = (t = {}, n) => Me({
|
|
1812
|
+
...er(t),
|
|
1813
|
+
type: e
|
|
1814
|
+
}, n);
|
|
1815
|
+
});
|
|
1816
|
+
function Ji(e) {
|
|
1817
|
+
for (const t in ne) if (ot(ne, t)) {
|
|
1818
|
+
const n = [...ne[t]];
|
|
1819
|
+
for (const r of n) (!e || e === r.props.type) && r.handler.close();
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
function Yi(e) {
|
|
1823
|
+
ne[e] && [...ne[e]].forEach((t) => t.handler.close());
|
|
1824
|
+
}
|
|
1825
|
+
Me.closeAll = Ji;
|
|
1826
|
+
Me.closeAllByPlacement = Yi;
|
|
1827
|
+
Me._context = null;
|
|
1828
|
+
const Xi = Vn(Me, "$message"), tr = [
|
|
1829
|
+
"primary",
|
|
1830
|
+
"success",
|
|
1831
|
+
"info",
|
|
1832
|
+
"warning",
|
|
1833
|
+
"error"
|
|
1834
|
+
], Qi = Fe({
|
|
1835
|
+
customClass: {
|
|
1836
|
+
type: String,
|
|
1837
|
+
default: ""
|
|
1838
|
+
},
|
|
1839
|
+
dangerouslyUseHTMLString: Boolean,
|
|
1840
|
+
duration: {
|
|
1841
|
+
type: Number,
|
|
1842
|
+
default: 4500
|
|
1843
|
+
},
|
|
1844
|
+
icon: { type: It },
|
|
1845
|
+
id: {
|
|
1846
|
+
type: String,
|
|
1847
|
+
default: ""
|
|
1848
|
+
},
|
|
1849
|
+
message: {
|
|
1850
|
+
type: B([
|
|
1851
|
+
String,
|
|
1852
|
+
Object,
|
|
1853
|
+
Function
|
|
1854
|
+
]),
|
|
1855
|
+
default: ""
|
|
1856
|
+
},
|
|
1857
|
+
offset: {
|
|
1858
|
+
type: Number,
|
|
1859
|
+
default: 0
|
|
1860
|
+
},
|
|
1861
|
+
onClick: {
|
|
1862
|
+
type: B(Function),
|
|
1863
|
+
default: () => {
|
|
1864
|
+
}
|
|
1865
|
+
},
|
|
1866
|
+
onClose: {
|
|
1867
|
+
type: B(Function),
|
|
1868
|
+
required: !0
|
|
1869
|
+
},
|
|
1870
|
+
position: {
|
|
1871
|
+
type: String,
|
|
1872
|
+
values: [
|
|
1873
|
+
"top-right",
|
|
1874
|
+
"top-left",
|
|
1875
|
+
"bottom-right",
|
|
1876
|
+
"bottom-left"
|
|
1877
|
+
],
|
|
1878
|
+
default: "top-right"
|
|
1879
|
+
},
|
|
1880
|
+
showClose: {
|
|
1881
|
+
type: Boolean,
|
|
1882
|
+
default: !0
|
|
1883
|
+
},
|
|
1884
|
+
title: {
|
|
1885
|
+
type: String,
|
|
1886
|
+
default: ""
|
|
1887
|
+
},
|
|
1888
|
+
type: {
|
|
1889
|
+
type: String,
|
|
1890
|
+
values: [...tr, ""],
|
|
1891
|
+
default: ""
|
|
1892
|
+
},
|
|
1893
|
+
zIndex: Number,
|
|
1894
|
+
closeIcon: {
|
|
1895
|
+
type: It,
|
|
1896
|
+
default: Hn
|
|
1897
|
+
}
|
|
1898
|
+
}), ea = { destroy: () => !0 }, ta = ["id"], na = ["textContent"], ra = { key: 0 }, sa = ["innerHTML"];
|
|
1899
|
+
var oa = /* @__PURE__ */ te({
|
|
1900
|
+
name: "ElNotification",
|
|
1901
|
+
__name: "notification",
|
|
1902
|
+
props: Qi,
|
|
1903
|
+
emits: ea,
|
|
1904
|
+
setup(e, { expose: t }) {
|
|
1905
|
+
const n = e, { ns: r, zIndex: s } = Zn("notification"), { nextZIndex: o, currentZIndex: i } = s, a = O(!1);
|
|
1906
|
+
let l;
|
|
1907
|
+
const c = A(() => {
|
|
1908
|
+
const D = n.type;
|
|
1909
|
+
return D && it[n.type] ? r.m(D) : "";
|
|
1910
|
+
}), u = A(() => n.type && it[n.type] || n.icon), f = A(() => n.position.endsWith("right") ? "right" : "left"), d = A(() => n.position.startsWith("top") ? "top" : "bottom"), w = A(() => ({
|
|
1911
|
+
[d.value]: `${n.offset}px`,
|
|
1912
|
+
zIndex: n.zIndex ?? i.value
|
|
1913
|
+
}));
|
|
1914
|
+
function v() {
|
|
1915
|
+
n.duration > 0 && ({ stop: l } = yn(() => {
|
|
1916
|
+
a.value && x();
|
|
1917
|
+
}, n.duration));
|
|
1918
|
+
}
|
|
1919
|
+
function h() {
|
|
1920
|
+
l == null || l();
|
|
1921
|
+
}
|
|
1922
|
+
function x() {
|
|
1923
|
+
a.value = !1;
|
|
1924
|
+
}
|
|
1925
|
+
function E(D) {
|
|
1926
|
+
switch ($n(D)) {
|
|
1927
|
+
case De.delete:
|
|
1928
|
+
case De.backspace:
|
|
1929
|
+
h();
|
|
1930
|
+
break;
|
|
1931
|
+
case De.esc:
|
|
1932
|
+
a.value && x();
|
|
1933
|
+
break;
|
|
1934
|
+
default:
|
|
1935
|
+
v();
|
|
1936
|
+
break;
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
return ut(() => {
|
|
1940
|
+
v(), o(), a.value = !0;
|
|
1941
|
+
}), wn(document, "keydown", E), t({
|
|
1942
|
+
visible: a,
|
|
1943
|
+
close: x
|
|
1944
|
+
}), (D, R) => (I(), se(Dt, {
|
|
1945
|
+
name: S(r).b("fade"),
|
|
1946
|
+
onBeforeLeave: e.onClose,
|
|
1947
|
+
onAfterLeave: R[1] || (R[1] = (Z) => D.$emit("destroy")),
|
|
1948
|
+
persisted: ""
|
|
1949
|
+
}, {
|
|
1950
|
+
default: Le(() => [bt(ee("div", {
|
|
1951
|
+
id: e.id,
|
|
1952
|
+
class: G([
|
|
1953
|
+
S(r).b(),
|
|
1954
|
+
e.customClass,
|
|
1955
|
+
f.value
|
|
1956
|
+
]),
|
|
1957
|
+
style: Ge(w.value),
|
|
1958
|
+
role: "alert",
|
|
1959
|
+
onMouseenter: h,
|
|
1960
|
+
onMouseleave: v,
|
|
1961
|
+
onClick: R[0] || (R[0] = (...Z) => e.onClick && e.onClick(...Z))
|
|
1962
|
+
}, [u.value ? (I(), se(S(at), {
|
|
1963
|
+
key: 0,
|
|
1964
|
+
class: G([S(r).e("icon"), c.value])
|
|
1965
|
+
}, {
|
|
1966
|
+
default: Le(() => [(I(), se(xt(u.value)))]),
|
|
1967
|
+
_: 1
|
|
1968
|
+
}, 8, ["class"])) : ge("v-if", !0), ee("div", { class: G(S(r).e("group")) }, [
|
|
1969
|
+
ee("h2", {
|
|
1970
|
+
class: G(S(r).e("title")),
|
|
1971
|
+
textContent: qe(e.title)
|
|
1972
|
+
}, null, 10, na),
|
|
1973
|
+
bt(ee("div", {
|
|
1974
|
+
class: G(S(r).e("content")),
|
|
1975
|
+
style: Ge(e.title ? void 0 : { margin: 0 })
|
|
1976
|
+
}, [je(D.$slots, "default", {}, () => [e.dangerouslyUseHTMLString ? (I(), q(Nt, { key: 1 }, [ge(" Caution here, message could've been compromised, never use user's input as message "), ee("p", { innerHTML: e.message }, null, 8, sa)], 2112)) : (I(), q("p", ra, qe(e.message), 1))])], 6), [[Lt, e.message]]),
|
|
1977
|
+
e.showClose ? (I(), se(S(at), {
|
|
1978
|
+
key: 0,
|
|
1979
|
+
class: G(S(r).e("closeBtn")),
|
|
1980
|
+
onClick: mn(x, ["stop"])
|
|
1981
|
+
}, {
|
|
1982
|
+
default: Le(() => [(I(), se(xt(e.closeIcon)))]),
|
|
1983
|
+
_: 1
|
|
1984
|
+
}, 8, ["class"])) : ge("v-if", !0)
|
|
1985
|
+
], 2)], 46, ta), [[Lt, a.value]])]),
|
|
1986
|
+
_: 3
|
|
1987
|
+
}, 8, ["name", "onBeforeLeave"]));
|
|
1988
|
+
}
|
|
1989
|
+
}), ia = oa;
|
|
1990
|
+
const Be = {
|
|
1991
|
+
"top-left": [],
|
|
1992
|
+
"top-right": [],
|
|
1993
|
+
"bottom-left": [],
|
|
1994
|
+
"bottom-right": []
|
|
1995
|
+
}, ct = 16;
|
|
1996
|
+
let aa = 1;
|
|
1997
|
+
const Ae = function(e = {}, t) {
|
|
1998
|
+
if (!ye) return { close: () => {
|
|
1999
|
+
} };
|
|
2000
|
+
(le(e) || We(e)) && (e = { message: e });
|
|
2001
|
+
const n = e.position || "top-right";
|
|
2002
|
+
let r = e.offset || 0;
|
|
2003
|
+
Be[n].forEach(({ vm: u }) => {
|
|
2004
|
+
var f;
|
|
2005
|
+
r += (((f = u.el) == null ? void 0 : f.offsetHeight) || 0) + ct;
|
|
2006
|
+
}), r += ct;
|
|
2007
|
+
const s = `notification_${aa++}`, o = e.onClose, i = {
|
|
2008
|
+
...e,
|
|
2009
|
+
offset: r,
|
|
2010
|
+
id: s,
|
|
2011
|
+
onClose: () => {
|
|
2012
|
+
la(s, n, o);
|
|
2013
|
+
}
|
|
2014
|
+
};
|
|
2015
|
+
let a = document.body;
|
|
2016
|
+
Ot(e.appendTo) ? a = e.appendTo : le(e.appendTo) && (a = document.querySelector(e.appendTo)), Ot(a) || (Ve("ElNotification", "the appendTo option is not an HTMLElement. Falling back to document.body."), a = document.body);
|
|
2017
|
+
const l = document.createElement("div"), c = Q(ia, i, Ze(i.message) ? i.message : We(i.message) ? () => i.message : null);
|
|
2018
|
+
return c.appContext = Qo(t) ? Ae._context : t, c.props.onDestroy = () => {
|
|
2019
|
+
st(null, l);
|
|
2020
|
+
}, st(c, l), Be[n].push({ vm: c }), a.appendChild(l.firstElementChild), { close: () => {
|
|
2021
|
+
c.component.exposed.visible.value = !1;
|
|
2022
|
+
} };
|
|
2023
|
+
};
|
|
2024
|
+
tr.forEach((e) => {
|
|
2025
|
+
Ae[e] = (t = {}, n) => ((le(t) || We(t)) && (t = { message: t }), Ae({
|
|
2026
|
+
...t,
|
|
2027
|
+
type: e
|
|
2028
|
+
}, n));
|
|
2029
|
+
});
|
|
2030
|
+
function la(e, t, n) {
|
|
2031
|
+
const r = Be[t], s = r.findIndex(({ vm: c }) => {
|
|
2032
|
+
var u;
|
|
2033
|
+
return ((u = c.component) == null ? void 0 : u.props.id) === e;
|
|
2034
|
+
});
|
|
2035
|
+
if (s === -1) return;
|
|
2036
|
+
const { vm: o } = r[s];
|
|
2037
|
+
if (!o) return;
|
|
2038
|
+
n == null || n(o);
|
|
2039
|
+
const i = o.el.offsetHeight, a = t.split("-")[0];
|
|
2040
|
+
r.splice(s, 1);
|
|
2041
|
+
const l = r.length;
|
|
2042
|
+
if (!(l < 1))
|
|
2043
|
+
for (let c = s; c < l; c++) {
|
|
2044
|
+
const { el: u, component: f } = r[c].vm, d = Number.parseInt(u.style[a], 10) - i - ct;
|
|
2045
|
+
f.props.offset = d;
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
function ca() {
|
|
2049
|
+
for (const e of Object.values(Be)) e.forEach(({ vm: t }) => {
|
|
2050
|
+
t.component.exposed.visible.value = !1;
|
|
2051
|
+
});
|
|
2052
|
+
}
|
|
2053
|
+
function ua(e = "top-right") {
|
|
2054
|
+
var n, r, s, o;
|
|
2055
|
+
let t = ((s = (r = (n = Be[e][0]) == null ? void 0 : n.vm.component) == null ? void 0 : r.props) == null ? void 0 : s.offset) || 0;
|
|
2056
|
+
for (const { vm: i } of Be[e])
|
|
2057
|
+
i.component.props.offset = t, t += (((o = i.el) == null ? void 0 : o.offsetHeight) || 0) + ct;
|
|
2058
|
+
}
|
|
2059
|
+
Ae.closeAll = ca;
|
|
2060
|
+
Ae.updateOffsets = ua;
|
|
2061
|
+
Ae._context = null;
|
|
2062
|
+
const fa = Vn(Ae, "$notify");
|
|
2063
|
+
function da() {
|
|
2064
|
+
return (e) => {
|
|
2065
|
+
let t, n, r;
|
|
2066
|
+
if (_.isString(e) ? (t = e, n = "error", r = 3e3) : (t = e.message, n = e.type || "error", r = _.isNil(e.duration) ? 3e3 : e.duration), ["success", "warning", "info", "error"].includes(n)) {
|
|
2067
|
+
Xi({
|
|
2068
|
+
message: t,
|
|
2069
|
+
type: n,
|
|
2070
|
+
duration: r
|
|
2071
|
+
});
|
|
2072
|
+
return;
|
|
2073
|
+
}
|
|
2074
|
+
let s = n;
|
|
2075
|
+
s === "info" ? s = "primary" : s === "error" && (s = "danger"), fa({
|
|
2076
|
+
message: t,
|
|
2077
|
+
type: s,
|
|
2078
|
+
duration: r
|
|
2079
|
+
});
|
|
2080
|
+
};
|
|
2081
|
+
}
|
|
2082
|
+
const pa = (e, t) => {
|
|
2083
|
+
const n = e.__vccOpts || e;
|
|
2084
|
+
for (const [r, s] of t)
|
|
2085
|
+
n[r] = s;
|
|
2086
|
+
return n;
|
|
2087
|
+
}, ha = ["onClick"], ma = {
|
|
2088
|
+
__name: "index",
|
|
2089
|
+
props: {
|
|
2090
|
+
left: {
|
|
2091
|
+
type: Number,
|
|
2092
|
+
default: 0
|
|
2093
|
+
},
|
|
2094
|
+
top: {
|
|
2095
|
+
type: Number,
|
|
2096
|
+
default: 0
|
|
2097
|
+
},
|
|
2098
|
+
menus: {
|
|
2099
|
+
type: Array,
|
|
2100
|
+
default: () => []
|
|
2101
|
+
}
|
|
2102
|
+
},
|
|
2103
|
+
emits: ["callback"],
|
|
2104
|
+
setup(e, { emit: t }) {
|
|
2105
|
+
const n = e, r = t, s = (i) => {
|
|
2106
|
+
i.disabled || r("callback", i.callback);
|
|
2107
|
+
}, o = A(() => ({
|
|
2108
|
+
left: `${n.left}px`,
|
|
2109
|
+
top: `${n.top}px`
|
|
2110
|
+
}));
|
|
2111
|
+
return (i, a) => (I(), q(
|
|
2112
|
+
"div",
|
|
2113
|
+
{
|
|
2114
|
+
class: "vae-map-ctrl--context-menu",
|
|
2115
|
+
style: Ge(o.value)
|
|
2116
|
+
},
|
|
2117
|
+
[
|
|
2118
|
+
(I(!0), q(
|
|
2119
|
+
Nt,
|
|
2120
|
+
null,
|
|
2121
|
+
fr(e.menus, (l) => (I(), q("div", {
|
|
2122
|
+
key: l.text,
|
|
2123
|
+
class: G(["item", { "is-disabled": l.disabled, "is-divided": l.divided }]),
|
|
2124
|
+
onClick: (c) => s(l)
|
|
2125
|
+
}, qe(l.text), 11, ha))),
|
|
2126
|
+
128
|
|
2127
|
+
/* KEYED_FRAGMENT */
|
|
2128
|
+
))
|
|
2129
|
+
],
|
|
2130
|
+
4
|
|
2131
|
+
/* STYLE */
|
|
2132
|
+
));
|
|
2133
|
+
}
|
|
2134
|
+
}, ga = /* @__PURE__ */ pa(ma, [["__scopeId", "data-v-bcbcfe25"]]);
|
|
2135
|
+
function dn(e) {
|
|
2136
|
+
return (e == null ? void 0 : e.$el) ?? e ?? null;
|
|
2137
|
+
}
|
|
2138
|
+
function va({ mapRef: e, mapContainerRef: t, menusRef: n }) {
|
|
2139
|
+
const r = O(null), s = O(!1), o = O(null), i = O(0), a = O(0), l = A(() => S(n) ?? []), c = () => {
|
|
2140
|
+
const v = S(e);
|
|
2141
|
+
v == null || v.off("click", c), s.value = !1, o.value = null;
|
|
2142
|
+
}, u = (v) => {
|
|
2143
|
+
s.value = !1, v && _.isFunction(v) && v(o.value);
|
|
2144
|
+
}, f = async (v) => {
|
|
2145
|
+
var Y;
|
|
2146
|
+
s.value = !0, o.value = v, await rt();
|
|
2147
|
+
const h = dn(r.value), x = dn(S(t));
|
|
2148
|
+
if (!h || !x)
|
|
2149
|
+
return;
|
|
2150
|
+
const E = h.scrollHeight, D = h.scrollWidth, R = x.scrollHeight, Z = x.scrollWidth;
|
|
2151
|
+
i.value = v.containerPoint.x, a.value = v.containerPoint.y, i.value + D > Z && Z > D && (i.value = Z - D), a.value + E > R && R > E && (a.value = R - E), (Y = S(e)) == null || Y.on("click", c);
|
|
2152
|
+
}, d = () => {
|
|
2153
|
+
const v = S(e);
|
|
2154
|
+
v && (v.off("contextmenu", f), l.value.length > 0 && v.on("contextmenu", f));
|
|
2155
|
+
};
|
|
2156
|
+
return Te(l, d, { deep: !0 }), kt(() => {
|
|
2157
|
+
const v = S(e);
|
|
2158
|
+
v == null || v.off("contextmenu", f), v == null || v.off("click", c);
|
|
2159
|
+
}), {
|
|
2160
|
+
addContextMenu: d,
|
|
2161
|
+
hideContextMenu: c,
|
|
2162
|
+
renderContextMenu: () => l.value.length === 0 || !s.value ? null : dr(ga, {
|
|
2163
|
+
ref: r,
|
|
2164
|
+
menus: l.value,
|
|
2165
|
+
left: i.value,
|
|
2166
|
+
top: a.value,
|
|
2167
|
+
onCallback: u
|
|
2168
|
+
})
|
|
2169
|
+
};
|
|
2170
|
+
}
|
|
2171
|
+
const ya = /* @__PURE__ */ te({
|
|
2172
|
+
name: "VaeCloudmap",
|
|
2173
|
+
props: {
|
|
2174
|
+
height: {
|
|
2175
|
+
type: String,
|
|
2176
|
+
default: "100%"
|
|
2177
|
+
},
|
|
2178
|
+
width: {
|
|
2179
|
+
type: String,
|
|
2180
|
+
default: "100%"
|
|
2181
|
+
},
|
|
2182
|
+
options: {
|
|
2183
|
+
type: Object,
|
|
2184
|
+
default: () => ({})
|
|
2185
|
+
},
|
|
2186
|
+
beforeCreate: {
|
|
2187
|
+
type: Function,
|
|
2188
|
+
default: _.noop
|
|
2189
|
+
},
|
|
2190
|
+
contextMenu: {
|
|
2191
|
+
type: Array,
|
|
2192
|
+
default: () => []
|
|
2193
|
+
}
|
|
2194
|
+
},
|
|
2195
|
+
emits: ["init-map", "reload-map"],
|
|
2196
|
+
setup(e, {
|
|
2197
|
+
emit: t,
|
|
2198
|
+
expose: n
|
|
2199
|
+
}) {
|
|
2200
|
+
const r = da(), s = O(!1), o = O(null), i = O(`vae_lrmap_${Ke()}`), a = O(null), l = O(!1), c = O(!1), u = O(""), f = O(!1), d = O(""), w = O(null), v = O(null), {
|
|
2201
|
+
addContextMenu: h,
|
|
2202
|
+
renderContextMenu: x
|
|
2203
|
+
} = va({
|
|
2204
|
+
mapRef: a,
|
|
2205
|
+
mapContainerRef: v,
|
|
2206
|
+
menusRef: pr(e, "contextMenu")
|
|
2207
|
+
}), E = A(() => c.value || f.value), D = A(() => u.value || d.value), R = (p) => {
|
|
2208
|
+
const {
|
|
2209
|
+
leafletOptions: m,
|
|
2210
|
+
requestOptions: C,
|
|
2211
|
+
treeLayers: M,
|
|
2212
|
+
visibleKeys: P,
|
|
2213
|
+
requestServer: k,
|
|
2214
|
+
queryEntity: N,
|
|
2215
|
+
getFeatureDict: j,
|
|
2216
|
+
showLayers: K,
|
|
2217
|
+
showLayerSets: he,
|
|
2218
|
+
getLayerSetsKeys: ie,
|
|
2219
|
+
getThumbnail: _e
|
|
2220
|
+
} = o.value, ae = _.merge({
|
|
2221
|
+
el: i.value,
|
|
2222
|
+
client: o.value
|
|
2223
|
+
}, m, C), V = p ? {
|
|
2224
|
+
treeLayers: M,
|
|
2225
|
+
visibleKeys: P
|
|
2226
|
+
} : {}, re = {
|
|
2227
|
+
requestServer: k.bind(o.value),
|
|
2228
|
+
queryEntity: N.bind(o.value),
|
|
2229
|
+
getFeatureDict: j.bind(o.value),
|
|
2230
|
+
showLayers: K.bind(o.value),
|
|
2231
|
+
showLayerSets: he.bind(o.value),
|
|
2232
|
+
getLayerSetsKeys: ie.bind(o.value),
|
|
2233
|
+
getThumbnail: _e.bind(o.value)
|
|
2234
|
+
}, we = p ? {
|
|
2235
|
+
refreshMap: () => {
|
|
2236
|
+
J(), T();
|
|
2237
|
+
},
|
|
2238
|
+
reloadMap: g
|
|
2239
|
+
} : null;
|
|
2240
|
+
return _.merge(ae, V, re, we);
|
|
2241
|
+
}, Z = (p) => {
|
|
2242
|
+
c.value = !0, u.value = p;
|
|
2243
|
+
}, Y = () => {
|
|
2244
|
+
c.value = !1, u.value = "";
|
|
2245
|
+
}, X = (p) => {
|
|
2246
|
+
f.value = !0, d.value = p;
|
|
2247
|
+
}, de = () => {
|
|
2248
|
+
f.value = !1, d.value = "";
|
|
2249
|
+
}, pe = (p) => {
|
|
2250
|
+
var m;
|
|
2251
|
+
typeof ((m = e.options) == null ? void 0 : m.onFail) == "function" && e.options.onFail(p.message);
|
|
2252
|
+
}, J = () => {
|
|
2253
|
+
!a.value || !o.value || (w.value && a.value.removeLayer(w.value), w.value = o.value.currentTileLayer().addTo(a.value));
|
|
2254
|
+
}, $ = () => {
|
|
2255
|
+
o.value = new L.Vae.CloudClient(L.extend({
|
|
2256
|
+
uid: i.value
|
|
2257
|
+
}, e.options)), o.value.on("message", (p) => {
|
|
2258
|
+
r({
|
|
2259
|
+
message: p.message,
|
|
2260
|
+
type: p.messageType
|
|
2261
|
+
});
|
|
2262
|
+
}), o.value.on("openmask", (p) => {
|
|
2263
|
+
X(p.text);
|
|
2264
|
+
}), o.value.on("closemask", de), o.value.on("refreshtilelayer", J), o.value.on("fail", pe);
|
|
2265
|
+
}, T = (p = !0) => {
|
|
2266
|
+
if (a.value) {
|
|
2267
|
+
if (e.options.zoom && e.options.center)
|
|
2268
|
+
return;
|
|
2269
|
+
a.value.fitBounds(o.value.leafletOptions.bounds, {
|
|
2270
|
+
animate: p
|
|
2271
|
+
});
|
|
2272
|
+
}
|
|
2273
|
+
}, oe = () => {
|
|
2274
|
+
if (!a.value) {
|
|
2275
|
+
const p = L.extend({
|
|
2276
|
+
zoomControl: !1,
|
|
2277
|
+
attributionControl: !1,
|
|
2278
|
+
doubleClickZoom: !1
|
|
2279
|
+
}, _.omit(e.options, ["url", "dsname", "layerTreeType", "defaultLayers", "defaultLayerSets"]), _.pick(o.value.leafletOptions, ["crs", "center", "maxZoom"]));
|
|
2280
|
+
return a.value = L.map(i.value, p), T(!1), new Promise((m) => {
|
|
2281
|
+
a.value.whenReady(m);
|
|
2282
|
+
});
|
|
2283
|
+
}
|
|
2284
|
+
return Promise.resolve();
|
|
2285
|
+
}, F = () => {
|
|
2286
|
+
a.value.vae = {}, _.merge(a.value.vae, R(!0));
|
|
2287
|
+
}, b = ({
|
|
2288
|
+
event: p = "init-map",
|
|
2289
|
+
alert: m = !0
|
|
2290
|
+
} = {}) => {
|
|
2291
|
+
$(), o.value.start(m).then(async (C) => {
|
|
2292
|
+
C && (await e.beforeCreate(R(!1)), await o.value.setDefaultLayers(), await oe(), h(), J(), F(), t(p, a.value), p === "init-map" && (l.value = !0));
|
|
2293
|
+
});
|
|
2294
|
+
}, y = () => {
|
|
2295
|
+
var p;
|
|
2296
|
+
(p = a.value) == null || p.invalidateSize();
|
|
2297
|
+
}, g = () => {
|
|
2298
|
+
var p;
|
|
2299
|
+
(p = a.value) == null || p.remove(), a.value = null, w.value = null, s.value = !0, rt(() => {
|
|
2300
|
+
s.value = !1, rt(() => {
|
|
2301
|
+
b({
|
|
2302
|
+
event: "reload-map"
|
|
2303
|
+
});
|
|
2304
|
+
});
|
|
2305
|
+
});
|
|
2306
|
+
};
|
|
2307
|
+
return Te(() => e.options, () => {
|
|
2308
|
+
l.value || b({
|
|
2309
|
+
alert: !0
|
|
2310
|
+
});
|
|
2311
|
+
}, {
|
|
2312
|
+
deep: !0
|
|
2313
|
+
}), ut(() => {
|
|
2314
|
+
b({
|
|
2315
|
+
alert: !1
|
|
2316
|
+
});
|
|
2317
|
+
}), kt(() => {
|
|
2318
|
+
var p;
|
|
2319
|
+
(p = a.value) == null || p.remove();
|
|
2320
|
+
}), n({
|
|
2321
|
+
requestMeta: b,
|
|
2322
|
+
refreshClient: $,
|
|
2323
|
+
createMap: oe,
|
|
2324
|
+
extendMapInstance: F,
|
|
2325
|
+
createContextInstance: R,
|
|
2326
|
+
refreshTileLayer: J,
|
|
2327
|
+
setDefaultView: T,
|
|
2328
|
+
openMask: Z,
|
|
2329
|
+
closeMask: Y,
|
|
2330
|
+
openInnerMask: X,
|
|
2331
|
+
closeInnerMask: de,
|
|
2332
|
+
resizeMap: y,
|
|
2333
|
+
reloadMap: g,
|
|
2334
|
+
onFail: pe
|
|
2335
|
+
}), () => {
|
|
2336
|
+
if (s.value)
|
|
2337
|
+
return null;
|
|
2338
|
+
const p = E.value ? Q("div", {
|
|
2339
|
+
class: "loading-mask"
|
|
2340
|
+
}, [Q("div", {
|
|
2341
|
+
class: "wrapper"
|
|
2342
|
+
}, [Q("div", {
|
|
2343
|
+
class: "loading-icon"
|
|
2344
|
+
}, [Q("i", {
|
|
2345
|
+
class: "fas fa-circle-notch fa-spin"
|
|
2346
|
+
}, null)]), Q("div", {
|
|
2347
|
+
class: "loading-text"
|
|
2348
|
+
}, [D.value])])]) : null;
|
|
2349
|
+
return Q(wr, {
|
|
2350
|
+
ref: v,
|
|
2351
|
+
class: "vae-lrmap cloudmap",
|
|
2352
|
+
style: {
|
|
2353
|
+
height: e.height,
|
|
2354
|
+
width: e.width
|
|
2355
|
+
},
|
|
2356
|
+
onResize: y
|
|
2357
|
+
}, {
|
|
2358
|
+
default: () => [Q("div", {
|
|
2359
|
+
class: "leaflet-map",
|
|
2360
|
+
id: i.value
|
|
2361
|
+
}, null), x(), p]
|
|
2362
|
+
});
|
|
2363
|
+
};
|
|
2364
|
+
}
|
|
2365
|
+
}), _a = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAABSCAMAAAAhFXfZAAAC91BMVEVMaXEzeak2f7I4g7g3g7cua5gzeKg8hJo3grY4g7c3grU0gLI2frE0daAubJc2gbQwd6QzeKk2gLMtd5sxdKIua5g1frA2f7IydaM0e6w2fq41fK01eqo3grgubJgta5cxdKI1f7AydaQydaMxc6EubJgvbJkwcZ4ubZkwcJwubZgubJcydqUydKIxapgubJctbJcubZcubJcvbJYubJcvbZkubJctbJctbZcubJg2f7AubJcrbZcubJcubJcua5g3grY0fq8ubJcubJdEkdEwhsw6i88vhswuhcsuhMtBjMgthMsrg8srgss6is8qgcs8i9A9iMYtg8spgcoogMo7hcMngMonf8olfso4gr8kfck5iM8jfMk4iM8he8k1fro7itAgesk2hs8eecgzfLcofssdeMg0hc4cd8g2hcsxeLQbdsgZdcgxeLImfcszhM0vda4xgckzhM4xg84wf8Yxgs4udKsvfcQucqhUndROmdM1fK0wcZ8vb5w0eqpQm9MzeKhXoNVcpdYydKNWn9VZotVKltJFjsIwcJ1Rms9OlslLmtH///8+kc9epdYzd6dbo9VHkMM2f7FHmNBClM8ydqVcpNY9hro3gLM9hLczealQmcw3fa46f7A8gLMxc6I3eagyc6FIldJMl9JSnNRSntNNl9JPnNJFi75UnM9ZodVKksg8kM45jc09e6ZHltFBk883gbRBh7pDk9EwcaBzn784g7dKkcY2i81Om9M7j85Llc81is09g7Q4grY/j9A0eqxKmdFFltBEjcXf6fFImdBCiLxJl9FGlNFBi78yiMxVndEvbpo6js74+vx+psPP3+o/ks5HkcpGmNCjwdZCkNDM3ehYoNJEls+lxNkxh8xHks0+jdC1zd5Lg6r+/v/H2ufz9/o3jM3t8/edvdM/k89Th61OiLBSjbZklbaTt9BfptdjmL1AicBHj8hGk9FAgK1dkLNTjLRekrdClc/k7fM0icy0y9tgp9c4jc2NtM9Dlc8zicxeXZn3AAAAQ3RSTlMAHDdTb4yPA+LtnEQmC4L2EmHqB7XA0d0sr478x4/Yd5i1zOfyPkf1sLVq4Nh3FvjxopQ2/STNuFzUwFIwxKaejILpIBEV9wAABhVJREFUeF6s1NdyFEcYBeBeoQIhRAkLlRDGrhIgY3BJL8CVeKzuyXFzzjkn5ZxzzuScg3PO8cKzu70JkO0LfxdTU//pM9vTu7Xgf6KqOVTb9X7toRrVEfBf1HTVjZccrT/2by1VV928Yty9ZbVuucdz90frG8DBjl9pVApbOstvmMuvVgaNXSfAAd6pGxpy6yxf5ph43pS/4f3uoaGm2rdu72S9xzOvMymkZFq/ptDrk90mhW7e4zl7HLzhxGWPR20xmSxJ/VqldG5m9XhaVOA1DadsNh3Pu5L2N6QtPO/32JpqQBVVk20oy/Pi2s23WEvyfHbe1thadVQttvm7Llf65gGmXK67XtupyoM7HQhmXdLS8oGWJNeOJ3C5fG5XCEJnkez3/oFdsvgJ4l2ANZwhrJKk/7OSXa+3Vw2WJMlKnGkobouYk6T0TyX30klOUnTD9HJ5qpckL3EW/w4XF3Xd0FGywXUrstrclVsqz5Pd/sXFYyDnPdrLcQODmGOK47IZb4CmibmMn+MYRzFZ5jg33ZL/EJrWcszHmANy3ARBK/IXtciJy8VsitPSdE3uuHxzougojcUdr8/32atnz/ev3f/K5wtpxUTpcaI45zusVDpYtZi+jg0oU9b3x74h7+n9ABvYEZeKaVq0sh0AtLKsFtqNBdeT0MrSzwwlq9+x6xAO4tgOtSzbCjrNQQiNvQUbUEubvzBUeGw26yDCsRHCoLkTHDa7IdOLIThs/gHvChszh2CimE8peRs47cxANI0lYNB5y1DljpOF0IhzBDPOZnDOqYYbeGKECbPzWnXludPphw5c2YBq5zlwXphIbO4VDCZ0gnPfUO1TwZoYwAs2ExPCedAu9DAjfQUjzITQb3jNj0KG2Sgt6BHaQUdYzWz+XmBktOHwanXjaSTcwwziBcuMOtwBmqPrTOxFQR/DRKKPqyur0aiW6cULYsx6tBm0jXpR/AUWR6HRq9WVW6MRhIq5jLyjbaCTDCijyYJNpCajdyobP/eTw0iexBAKkJ3gA5KcQb2zBXsIBckn+xVv8jkZSaEFHE+jFEleAEfayRU0MouNoBmB/L50Ai/HSLIHxcrpCvnhSQAuakKp2C/YbCylJjXRVy/z3+Kv/RrNcCo+WUzlVEhzKffnTQnxeN9fWF88fiNCUdSTsaufaChKWInHeysygfpIqagoakW+vV20J8uyl6TyNKEZWV4oRSPyCkWpgOLSbkCObT8o2r6tlG58HQquf6O0v50tB7JM7F4EORd2dx/K0w/KHsVkLPaoYrwgP/y7krr3SSMA4zj+OBgmjYkxcdIJQyQRKgg2viX9Hddi9UBb29LrKR7CVVEEEXWojUkXNyfTNDE14W9gbHJNuhjDettN3ZvbOvdOqCD3Jp/9l+/wJE+9PkYGjx/fqkys3S2rMozM/o2106rfMUINo6hVqz+eu/hd1c4xTg0TAfy5kV+4UG6+IthHTU9woWmxuKNbTfuCSfovBCxq7EtHqvYL4Sm6F8GVxsSXHMQ07TOi1DKtZxjWaaIyi4CXWjxPccUw8WVbMYY5wxC1mzEyXMJWkllpRloi+Kkoq69sxBTlElF6aAxYUbjXNlhlDZilDnM4U5SlN5biRsRHnbx3mbeWjEh4mEyiuJDl5XcWVmX5GvNkFgLWZM5qwsop4/AWfLhU1cR7k1VVvcYCWRkOI6Xy5gmnphCYIkvzuNYzHzosq2oNk2RtSs8khfUOfHIDgR6ysYBaMpl4uEgk2U/oJTs9AaTSwma7dT69geAE2ZpEjUsn2ieJNHeKfrI3EcAGJ2ZaNgVuC8EBctCLc57P5u5led6IOBkIYkuQMrmmjChs4VkfOerHqSBkPzZlhe06RslZ3zMjk2sscqKwY0RcjKK+LWbzd7KiHhkncs/siFJ+V5eXxD34B8nVuJEpGJNmxN2gH3vSvp7J70tF+D1Ej8qUJD1TkErAND2GZwTFg/LubvmgiBG3SOvdlsqFQrkEzJCL1rstlnVFROixZoDDSuXQFHESwVGlcuQcMb/b42NgjLowh5MTDFE3vNB5qStRIErdCQEh6pLPR92anSUb/wAIhldAaDMpGgAAAABJRU5ErkJggg==", wa = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAApCAYAAADAk4LOAAAFgUlEQVR4Aa1XA5BjWRTN2oW17d3YaZtr2962HUzbDNpjszW24mRt28p47v7zq/bXZtrp/lWnXr337j3nPCe85NcypgSFdugCpW5YoDAMRaIMqRi6aKq5E3YqDQO3qAwjVWrD8Ncq/RBpykd8oZUb/kaJutow8r1aP9II0WmLKLIsJyv1w/kqw9Ch2MYdB++12Onxee/QMwvf4/Dk/Lfp/i4nxTXtOoQ4pW5Aj7wpici1A9erdAN2OH64x8OSP9j3Ft3b7aWkTg/Fm91siTra0f9on5sQr9INejH6CUUUpavjFNq1B+Oadhxmnfa8RfEmN8VNAsQhPqF55xHkMzz3jSmChWU6f7/XZKNH+9+hBLOHYozuKQPxyMPUKkrX/K0uWnfFaJGS1QPRtZsOPtr3NsW0uyh6NNCOkU3Yz+bXbT3I8G3xE5EXLXtCXbbqwCO9zPQYPRTZ5vIDXD7U+w7rFDEoUUf7ibHIR4y6bLVPXrz8JVZEql13trxwue/uDivd3fkWRbS6/IA2bID4uk0UpF1N8qLlbBlXs4Ee7HLTfV1j54APvODnSfOWBqtKVvjgLKzF5YdEk5ewRkGlK0i33Eofffc7HT56jD7/6U+qH3Cx7SBLNntH5YIPvODnyfIXZYRVDPqgHtLs5ABHD3YzLuespb7t79FY34DjMwrVrcTuwlT55YMPvOBnRrJ4VXTdNnYug5ucHLBjEpt30701A3Ts+HEa73u6dT3FNWwflY86eMHPk+Yu+i6pzUpRrW7SNDg5JHR4KapmM5Wv2E8Tfcb1HoqqHMHU+uWDD7zg54mz5/2BSnizi9T1Dg4QQXLToGNCkb6tb1NU+QAlGr1++eADrzhn/u8Q2YZhQVlZ5+CAOtqfbhmaUCS1ezNFVm2imDbPmPng5wmz+gwh+oHDce0eUtQ6OGDIyR0uUhUsoO3vfDmmgOezH0mZN59x7MBi++WDL1g/eEiU3avlidO671bkLfwbw5XV2P8Pzo0ydy4t2/0eu33xYSOMOD8hTf4CrBtGMSoXfPLchX+J0ruSePw3LZeK0juPJbYzrhkH0io7B3k164hiGvawhOKMLkrQLyVpZg8rHFW7E2uHOL888IBPlNZ1FPzstSJM694fWr6RwpvcJK60+0HCILTBzZLFNdtAzJaohze60T8qBzyh5ZuOg5e7uwQppofEmf2++DYvmySqGBuKaicF1blQjhuHdvCIMvp8whTTfZzI7RldpwtSzL+F1+wkdZ2TBOW2gIF88PBTzD/gpeREAMEbxnJcaJHNHrpzji0gQCS6hdkEeYt9DF/2qPcEC8RM28Hwmr3sdNyht00byAut2k3gufWNtgtOEOFGUwcXWNDbdNbpgBGxEvKkOQsxivJx33iow0Vw5S6SVTrpVq11ysA2Rp7gTfPfktc6zhtXBBC+adRLshf6sG2RfHPZ5EAc4sVZ83yCN00Fk/4kggu40ZTvIEm5g24qtU4KjBrx/BTTH8ifVASAG7gKrnWxJDcU7x8X6Ecczhm3o6YicvsLXWfh3Ch1W0k8x0nXF+0fFxgt4phz8QvypiwCCFKMqXCnqXExjq10beH+UUA7+nG6mdG/Pu0f3LgFcGrl2s0kNNjpmoJ9o4B29CMO8dMT4Q5ox8uitF6fqsrJOr8qnwNbRzv6hSnG5wP+64C7h9lp30hKNtKdWjtdkbuPA19nJ7Tz3zR/ibgARbhb4AlhavcBebmTHcFl2fvYEnW0ox9xMxKBS8btJ+KiEbq9zA4RthQXDhPa0T9TEe69gWupwc6uBUphquXgf+/FrIjweHQS4/pduMe5ERUMHUd9xv8ZR98CxkS4F2n3EUrUZ10EYNw7BWm9x1GiPssi3GgiGRDKWRYZfXlON+dfNbM+GgIwYdwAAAAASUVORK5CYII=", ba = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAApCAQAAAACach9AAACMUlEQVR4Ae3ShY7jQBAE0Aoz/f9/HTMzhg1zrdKUrJbdx+Kd2nD8VNudfsL/Th///dyQN2TH6f3y/BGpC379rV+S+qqetBOxImNQXL8JCAr2V4iMQXHGNJxeCfZXhSRBcQMfvkOWUdtfzlLgAENmZDcmo2TVmt8OSM2eXxBp3DjHSMFutqS7SbmemzBiR+xpKCNUIRkdkkYxhAkyGoBvyQFEJEefwSmmvBfJuJ6aKqKWnAkvGZOaZXTUgFqYULWNSHUckZuR1HIIimUExutRxwzOLROIG4vKmCKQt364mIlhSyzAf1m9lHZHJZrlAOMMztRRiKimp/rpdJDc9Awry5xTZCte7FHtuS8wJgeYGrex28xNTd086Dik7vUMscQOa8y4DoGtCCSkAKlNwpgNtphjrC6MIHUkR6YWxxs6Sc5xqn222mmCRFzIt8lEdKx+ikCtg91qS2WpwVfBelJCiQJwvzixfI9cxZQWgiSJelKnwBElKYtDOb2MFbhmUigbReQBV0Cg4+qMXSxXSyGUn4UbF8l+7qdSGnTC0XLCmahIgUHLhLOhpVCtw4CzYXvLQWQbJNmxoCsOKAxSgBJno75avolkRw8iIAFcsdc02e9iyCd8tHwmeSSoKTowIgvscSGZUOA7PuCN5b2BX9mQM7S0wYhMNU74zgsPBj3HU7wguAfnxxjFQGBE6pwN+GjME9zHY7zGp8wVxMShYX9NXvEWD3HbwJf4giO4CFIQxXScH1/TM+04kkBiAAAAAElFTkSuQmCC", xa = (e = L.point(0, 0)) => {
|
|
2366
|
+
const t = L.Projection.SphericalMercator, n = t.R, r = Math.PI / 180;
|
|
2367
|
+
return L.extend({}, t, {
|
|
2368
|
+
project(s) {
|
|
2369
|
+
const o = t.MAX_LATITUDE, i = Math.max(Math.min(o, s.lat), -o), a = Math.sin(i * r);
|
|
2370
|
+
return L.point(n * s.lng * r, n * Math.log((1 + a) / (1 - a)) / 2).add(e);
|
|
2371
|
+
},
|
|
2372
|
+
unproject(s) {
|
|
2373
|
+
const [o, i] = s.subtract(e);
|
|
2374
|
+
return L.latLng((2 * Math.atan(Math.exp(i / n)) - Math.PI / 2) * r, o * r / n);
|
|
2375
|
+
}
|
|
2376
|
+
});
|
|
2377
|
+
}, La = {
|
|
2378
|
+
SIMPLE(e = 2) {
|
|
2379
|
+
const t = Math.pow(0.1, e);
|
|
2380
|
+
return L.extend({}, L.CRS.Simple, {
|
|
2381
|
+
scale: (n) => t * Math.pow(2, n),
|
|
2382
|
+
zoom: (n) => Math.log(n / t) / Math.log(2)
|
|
2383
|
+
});
|
|
2384
|
+
},
|
|
2385
|
+
OFFSET_EPSG3857(e = L.point(0, 0)) {
|
|
2386
|
+
return L.extend({}, L.CRS.EPSG3857, {
|
|
2387
|
+
projection: xa(e)
|
|
2388
|
+
});
|
|
2389
|
+
},
|
|
2390
|
+
BJ54(e, t = {}) {
|
|
2391
|
+
let n = [307.2, 153.6, 76.8, 38.4, 19.2, 9.6, 4.8, 2.4, 1.2, 0.6, 0.3, 0.15, 0.075, 0.0375, 0.01875];
|
|
2392
|
+
t.resolutions && (n = t.resolutions);
|
|
2393
|
+
let r, s;
|
|
2394
|
+
e > 25e6 && e < 4e7 ? (r = 3, s = parseInt(e / 1e6)) : e > 12e6 && e < 22e6 && (r = 6, s = parseInt(e / 1e6));
|
|
2395
|
+
let o, i, a;
|
|
2396
|
+
if (s >= 0 && (r == 3 ? (o = 2376 + s, i = s * 3, a = 1e6 * s + 5e5) : r == 6 && (o = 2325 + s, i = s * 6 - 3, a = 1e6 * s + 5e5)), o) {
|
|
2397
|
+
let l = "+proj=tmerc +lat_0=0 +lon_0=" + i + " +k=1 +x_0=" + a + " +y_0=0 +ellps=krass +units=m +no_defs no_defs";
|
|
2398
|
+
return new L.Proj.CRS("EPSG:" + o, l, { resolutions: n });
|
|
2399
|
+
} else
|
|
2400
|
+
return this.SIMPLE();
|
|
2401
|
+
},
|
|
2402
|
+
XA80(e) {
|
|
2403
|
+
let t = 900099, n = 0, r = 0, s = parseInt(e / 1e6);
|
|
2404
|
+
s > 0 && (r = s * 3, n = 1e6 * s + 5e5, t = 2376 + s);
|
|
2405
|
+
let o = "+proj=tmerc +lat_0=0 +lon_0=" + r + " +k=1 +x_0=" + n + " +y_0=0 +a=6378140 +b=6356755.288157528 +units=m +no_defs no_defs", i = [307.2, 153.6, 76.8, 38.4, 19.2, 9.6, 4.8, 2.4, 1.2, 0.6, 0.3, 0.15, 0.075, 0.0375, 0.01875];
|
|
2406
|
+
return new L.Proj.CRS("EPSG:" + t, o, { resolutions: i, origin: [0, 0] });
|
|
2407
|
+
},
|
|
2408
|
+
CGCS2000(e, t = {}) {
|
|
2409
|
+
let n = [307.2, 153.6, 76.8, 38.4, 19.2, 9.6, 4.8, 2.4, 1.2, 0.6, 0.3, 0.15, 0.075, 0.0375, 0.01875];
|
|
2410
|
+
t.resolutions && (n = t.resolutions);
|
|
2411
|
+
let r = [0, 0];
|
|
2412
|
+
t.origin && (r = t.origin);
|
|
2413
|
+
let s, o;
|
|
2414
|
+
e > 25e6 && e < 45e6 ? (s = 3, o = parseInt(e / 1e6)) : e > 12e6 && e < 22e6 && (s = 6, o = parseInt(e / 1e6));
|
|
2415
|
+
let i, a, l;
|
|
2416
|
+
return o >= 0 && (s == 3 ? (o >= 25 && o <= 45 && (i = "45" + (o - 12)), a = o * 3, l = 1e6 * o + 5e5) : s == 6 && (o >= 13 && o <= 21 && (i = "44" + (o + 78)), o >= 22 && o <= 23 && (i = "44" + (o - 22)), a = o * 6 - 3, l = 1e6 * o + 5e5)), new L.Proj.CRS("EPSG:" + i, "+proj=tmerc +lat_0=0 +lon_0=" + a + " +k=1 +x_0=" + l + " +y_0=0 +ellps=GRS80 +units=m +no_defs +type=crs", {
|
|
2417
|
+
resolutions: n,
|
|
2418
|
+
origin: r
|
|
2419
|
+
});
|
|
2420
|
+
}
|
|
2421
|
+
/* CGCS2000_4523(options = {}) {
|
|
2422
|
+
let resolutions = [307.2, 153.6, 76.8, 38.4, 19.2, 9.6, 4.8, 2.4, 1.2, 0.6, 0.3, 0.15, 0.075, 0.0375, 0.01875]
|
|
2423
|
+
if (options.resolutions) {
|
|
2424
|
+
resolutions = options.resolutions
|
|
2425
|
+
}
|
|
2426
|
+
;
|
|
2427
|
+
let origin = [0, 0]
|
|
2428
|
+
if (options.origin) {
|
|
2429
|
+
origin = options.origin
|
|
2430
|
+
}
|
|
2431
|
+
;
|
|
2432
|
+
|
|
2433
|
+
return new L.Proj.CRS("EPSG:4523", "+proj=tmerc +lat_0=0 +lon_0=105 +k=1 +x_0=35500000 +y_0=0 +ellps=GRS80 +units=m +no_defs +type=crs", {
|
|
2434
|
+
resolutions: resolutions,
|
|
2435
|
+
origin: origin
|
|
2436
|
+
});
|
|
2437
|
+
},
|
|
2438
|
+
CGCS2000_4524(options = {}) {
|
|
2439
|
+
let resolutions = [307.2, 153.6, 76.8, 38.4, 19.2, 9.6, 4.8, 2.4, 1.2, 0.6, 0.3, 0.15, 0.075, 0.0375, 0.01875]
|
|
2440
|
+
if (options.resolutions) {
|
|
2441
|
+
resolutions = options.resolutions
|
|
2442
|
+
}
|
|
2443
|
+
;
|
|
2444
|
+
let origin = [0, 0]
|
|
2445
|
+
if (options.origin) {
|
|
2446
|
+
origin = options.origin
|
|
2447
|
+
}
|
|
2448
|
+
;
|
|
2449
|
+
|
|
2450
|
+
return new L.Proj.CRS("EPSG:4524", "+proj=tmerc +lat_0=0 +lon_0=108 +k=1 +x_0=36500000 +y_0=0 +ellps=GRS80 +units=m +no_defs +type=crs", {
|
|
2451
|
+
resolutions: resolutions,
|
|
2452
|
+
origin: origin
|
|
2453
|
+
});
|
|
2454
|
+
},
|
|
2455
|
+
CGCS2000_4525(options = {}) {
|
|
2456
|
+
let resolutions = [307.2, 153.6, 76.8, 38.4, 19.2, 9.6, 4.8, 2.4, 1.2, 0.6, 0.3, 0.15, 0.075, 0.0375, 0.01875]
|
|
2457
|
+
if (options.resolutions) {
|
|
2458
|
+
resolutions = options.resolutions
|
|
2459
|
+
}
|
|
2460
|
+
;
|
|
2461
|
+
let origin = [0, 0]
|
|
2462
|
+
if (options.origin) {
|
|
2463
|
+
origin = options.origin
|
|
2464
|
+
}
|
|
2465
|
+
;
|
|
2466
|
+
return new L.Proj.CRS("EPSG:4525", "+proj=tmerc +lat_0=0 +lon_0=111 +k=1 +x_0=37500000 +y_0=0 +ellps=GRS80 +units=m +no_defs +type=crs", {
|
|
2467
|
+
resolutions: resolutions,
|
|
2468
|
+
origin: origin
|
|
2469
|
+
});
|
|
2470
|
+
},
|
|
2471
|
+
CGCS2000_4526(options = {}) {
|
|
2472
|
+
let resolutions = [307.2, 153.6, 76.8, 38.4, 19.2, 9.6, 4.8, 2.4, 1.2, 0.6, 0.3, 0.15, 0.075, 0.0375, 0.01875]
|
|
2473
|
+
if (options.resolutions) {
|
|
2474
|
+
resolutions = options.resolutions
|
|
2475
|
+
}
|
|
2476
|
+
;
|
|
2477
|
+
let origin = [0, 0]
|
|
2478
|
+
if (options.origin) {
|
|
2479
|
+
origin = options.origin
|
|
2480
|
+
}
|
|
2481
|
+
;
|
|
2482
|
+
return new L.Proj.CRS("EPSG:4526", "+proj=tmerc +lat_0=0 +lon_0=114 +k=1 +x_0=38500000 +y_0=0 +ellps=GRS80 +units=m +no_defs +type=crs", {
|
|
2483
|
+
resolutions: resolutions,
|
|
2484
|
+
origin: origin
|
|
2485
|
+
});
|
|
2486
|
+
}*/
|
|
2487
|
+
};
|
|
2488
|
+
L.Vae = L.Vae || {};
|
|
2489
|
+
L.Vae.CRS = L.extend(L.Vae.CRS || {}, La);
|
|
2490
|
+
L.Vae = L.Vae || {};
|
|
2491
|
+
L.Vae.CloudClient = L.Evented.extend({
|
|
2492
|
+
options: {},
|
|
2493
|
+
requestOptions: {},
|
|
2494
|
+
leafletOptions: {},
|
|
2495
|
+
extent: [],
|
|
2496
|
+
treeLayers: [],
|
|
2497
|
+
visibleKeys: [],
|
|
2498
|
+
token: "",
|
|
2499
|
+
async initialize(e) {
|
|
2500
|
+
this.options = e, this.requestOptions = { url: null, uid: null, dsid: null, mapid: null, dsname: null, customTreeLayers: null }, this.leafletOptions = {}, this.token = await this.requestCouldGisToken();
|
|
2501
|
+
},
|
|
2502
|
+
/**
|
|
2503
|
+
* 连接地图服务,构建地图参数
|
|
2504
|
+
* @param {Boolean} alert 是否提示参数错误
|
|
2505
|
+
*/
|
|
2506
|
+
async start({ alert: e } = {}) {
|
|
2507
|
+
return new Promise(async (t) => {
|
|
2508
|
+
var n;
|
|
2509
|
+
for (let r of ["url"]) {
|
|
2510
|
+
const s = this.options ? this.options[r] : null, o = `参数 options.${r} 无效`;
|
|
2511
|
+
if (!_.isString(s) || s.trim().length == 0) {
|
|
2512
|
+
this.fire("fail", { message: o }), e && this.fire("message", { message: o, messageType: "error" });
|
|
2513
|
+
return;
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
this.requestOptions.uid = ((n = this.options) == null ? void 0 : n.uid) || `vae_client_${Ke()}`;
|
|
2517
|
+
try {
|
|
2518
|
+
this.fire("openmask", { text: "正在 获取图元信息" });
|
|
2519
|
+
const r = new URLSearchParams();
|
|
2520
|
+
r.append("packettype", "map"), r.append("action", "getmeta"), r.append("uid", this.requestOptions.uid), _.isString(this.options.dsname) && this.options.dsname.trim().length > 0 ? r.append("dsname", this.options.dsname) : r.append("dsid", this.options.dsid || "default"), _.isString(this.options.mapname) && this.options.mapname.trim().length > 0 ? r.append("mapname", this.options.mapname) : r.append("mapid", this.options.mapid || "default");
|
|
2521
|
+
const s = (await be.post(this.options.url + "map/getmeta?", r)).data;
|
|
2522
|
+
this.fire("closemask"), s.status == "success" ? (this.buildMapOptions(s.result), t(!0)) : (this.fire("fail", { message: "未获取到正确的图元信息" }), console.error(s.errinfo), this.fire("message", { message: "未获取到正确的图元信息", messageType: "error" }), t(!1));
|
|
2523
|
+
} catch (r) {
|
|
2524
|
+
this.fire("fail", { message: "获取图元失败,请检查地图服务和请求参数" }), console.error(r), this.fire("message", { message: "获取图元失败,请检查地图服务和请求参数", messageType: "error" }), this.fire("closemask"), t(!1);
|
|
2525
|
+
}
|
|
2526
|
+
});
|
|
2527
|
+
},
|
|
2528
|
+
// 构建地图配置项
|
|
2529
|
+
buildMapOptions({ dsid: e, mapid: t, extent: n }) {
|
|
2530
|
+
try {
|
|
2531
|
+
if (n = this.options.extent || n, _.isString(n) && (n = n.split(",")), Array.isArray(n) && (n = n.map(Number)), e)
|
|
2532
|
+
this.requestOptions.url = this.options.url, this.requestOptions.dsid = e, this.requestOptions.mapid = t ?? this.options.mapid ?? "default", this.requestOptions.dsname = this.options.dsname;
|
|
2533
|
+
else
|
|
2534
|
+
throw this.fire("fail", { message: "数据源dsid错误" }), new Error("数据源dsid错误");
|
|
2535
|
+
if (Array.isArray(n) && n.length == 4) {
|
|
2536
|
+
this.extent = n;
|
|
2537
|
+
let r = (n[0] + n[2]) * 0.5, s = (n[1] + n[3]) * 0.5;
|
|
2538
|
+
console.log(this.extent);
|
|
2539
|
+
let o = this.options.crs || L.Vae.CRS.SIMPLE();
|
|
2540
|
+
o == "bj54" ? o = L.Vae.CRS.BJ54(r, this.options) : o == "xa80" ? o = L.Vae.CRS.XA80(r) : o == "simple" ? o = L.Vae.CRS.SIMPLE() : (o == "CGCS2000" || o == "cgcs2000") && (o = L.Vae.CRS.CGCS2000(r, this.options));
|
|
2541
|
+
let i = this.options.wmscrs || o;
|
|
2542
|
+
i == "bj54" ? i = L.Vae.CRS.BJ54(r) : i == "xa80" ? i = L.Vae.CRS.XA80(r) : o == "simple" ? i = L.Vae.CRS.SIMPLE() : (o == "CGCS2000" || o == "cgcs2000") && (i = L.Vae.CRS.CGCS2000(r, this.options));
|
|
2543
|
+
const a = this.options.center || i.unproject(L.point(r, s)), l = this.options.maxZoom ? this.options.maxZoom : o.options && o.options.resolutions ? o.options.resolutions.length - 1 : 25, c = i.unproject(L.point(n[0], n[1])), u = i.unproject(L.point(n[2], n[3])), f = L.latLngBounds(c, u);
|
|
2544
|
+
this.leafletOptions = { crs: o, wmscrs: i, center: a, maxZoom: l, bounds: f };
|
|
2545
|
+
} else
|
|
2546
|
+
throw this.fire("fail", { message: "地图属性extent错误" }), new Error("地图属性extent错误");
|
|
2547
|
+
} catch (r) {
|
|
2548
|
+
this.fire("fail", { message: "地图参数构建错误" }), console.error(r), this.fire("message", { message: "地图参数构建错误", type: "error" });
|
|
2549
|
+
}
|
|
2550
|
+
},
|
|
2551
|
+
/**
|
|
2552
|
+
* 请求地图服务
|
|
2553
|
+
* @param {string} api 请求动作
|
|
2554
|
+
* @param {string} message 提示消息
|
|
2555
|
+
* @param {object} params 额外参数
|
|
2556
|
+
* @param {boolean} forceResolve 请求结果无效时,强制resolve而不是reject
|
|
2557
|
+
* @param {boolean} checkResult 是否校验结果
|
|
2558
|
+
* @param {boolean} loadMask 是否添加遮罩层
|
|
2559
|
+
*/
|
|
2560
|
+
requestServer({ api: e, message: t = "加载数据", params: n = {}, forceResolve: r, checkResult: s = !0, loadMask: o = !0 }) {
|
|
2561
|
+
return new Promise((i, a) => {
|
|
2562
|
+
e && (o && this.fire("openmask", { text: `正在 ${t}` }), be.post(`${this.requestOptions.url}${e}`, L.extend({
|
|
2563
|
+
uid: this.requestOptions.uid,
|
|
2564
|
+
dsGuid: this.requestOptions.dsid
|
|
2565
|
+
}, n)).then((l) => {
|
|
2566
|
+
if (s) {
|
|
2567
|
+
const c = l.data;
|
|
2568
|
+
c && c.status == "success" ? i(c.result) : (this.fire("fail", { message: c.errinfo }), r ? (console.error(c.errinfo), i("")) : (this.fire("message", { message: `${t}结果无效`, messageType: "error" }), console.error(c.errinfo), a(c.errinfo)));
|
|
2569
|
+
} else
|
|
2570
|
+
i(l.data);
|
|
2571
|
+
}).catch((l) => {
|
|
2572
|
+
this.fire("fail", { message: `${t}失败,请检查地图服务和和请求参数` }), this.fire("message", { message: `${t}失败,请检查地图服务和和请求参数`, messageType: "error" }), console.error(l), a(l);
|
|
2573
|
+
}).finally(() => {
|
|
2574
|
+
o && this.fire("closemask");
|
|
2575
|
+
}));
|
|
2576
|
+
});
|
|
2577
|
+
},
|
|
2578
|
+
/**
|
|
2579
|
+
* 请求云GIS地图服务
|
|
2580
|
+
* @param {string} api 请求动作
|
|
2581
|
+
* @param {string} message 提示消息
|
|
2582
|
+
* @param {object} params 额外参数
|
|
2583
|
+
* @param {boolean} forceResolve 请求结果无效时,强制resolve而不是reject
|
|
2584
|
+
* @param {boolean} checkResult 是否校验结果
|
|
2585
|
+
* @param {boolean} loadMask 是否添加遮罩层
|
|
2586
|
+
*/
|
|
2587
|
+
requestCloudServer({ api: e, message: t = "加载数据", params: n = {}, forceResolve: r, checkResult: s = !0, loadMask: o = !0 }) {
|
|
2588
|
+
return new Promise((i, a) => {
|
|
2589
|
+
e && (o && this.fire("openmask", { text: `正在 ${t}` }), be.get(
|
|
2590
|
+
`${this.options.url}${e}`,
|
|
2591
|
+
{
|
|
2592
|
+
params: _.merge(n, { token: this.token })
|
|
2593
|
+
}
|
|
2594
|
+
).then(async (l) => {
|
|
2595
|
+
if (s) {
|
|
2596
|
+
const c = l.data;
|
|
2597
|
+
c && c.code == "0" ? i(c.data) : (this.fire("fail", { message: c.msg }), r ? (console.error(c.msg), i("")) : c && c.code == "40001" ? (console.log("requestCloudServer 登录过期,重新获取token", this.token), this.token = await this.requestCouldGisToken(), this.requestCloudServer({ api: e, message: t, params: n, forceResolve: r, checkResult: s, loadMask: o }).then((u) => {
|
|
2598
|
+
i(u);
|
|
2599
|
+
}).catch((u) => {
|
|
2600
|
+
a(u);
|
|
2601
|
+
})) : (this.fire("message", { message: `${t}结果无效`, messageType: "error" }), console.error(c.msg), a(c.msg)));
|
|
2602
|
+
} else
|
|
2603
|
+
i(l.data);
|
|
2604
|
+
}).catch((l) => {
|
|
2605
|
+
console.log("catch ERROR", l), this.fire("fail", { message: `${t}失败,请检查地图服务和和请求参数` }), this.fire("message", { message: `${t}失败,请检查地图服务和和请求参数`, messageType: "error" }), console.error(l), a(l);
|
|
2606
|
+
}).finally(() => {
|
|
2607
|
+
o && this.fire("closemask");
|
|
2608
|
+
}));
|
|
2609
|
+
});
|
|
2610
|
+
},
|
|
2611
|
+
/**
|
|
2612
|
+
* 请求云GIS数据
|
|
2613
|
+
* @param {string} api 请求动作
|
|
2614
|
+
* @param {string} message 提示消息
|
|
2615
|
+
* @param {object} params 额外参数
|
|
2616
|
+
* @param {string} method 请求方式
|
|
2617
|
+
* @param {object} data POST请求体
|
|
2618
|
+
* @param {object} headers 请求头
|
|
2619
|
+
* @param {boolean} forceResolve 请求结果无效时,强制resolve而不是reject
|
|
2620
|
+
* @param {boolean} checkResult 是否校验结果
|
|
2621
|
+
* @param {boolean} loadMask 是否添加遮罩层
|
|
2622
|
+
*/
|
|
2623
|
+
requestCloudMapData({ api: e, message: t = "加载数据", params: n = {}, method: r = "get", data: s = null, headers: o = {}, forceResolve: i, checkResult: a = !0, loadMask: l = !0 }) {
|
|
2624
|
+
return new Promise((c, u) => {
|
|
2625
|
+
if (e) {
|
|
2626
|
+
l && this.fire("openmask", { text: `正在 ${t}` });
|
|
2627
|
+
const f = `${this.options.cloudGisUrl}${e}`;
|
|
2628
|
+
(String(r).toLowerCase() === "post" ? be.post(f, s, { headers: o }) : be.get(f, {
|
|
2629
|
+
params: _.merge(n, { token: this.token })
|
|
2630
|
+
})).then(async (v) => {
|
|
2631
|
+
if (a) {
|
|
2632
|
+
const h = v.data;
|
|
2633
|
+
if (h && h.code == "0")
|
|
2634
|
+
c(h.data);
|
|
2635
|
+
else if (this.fire("fail", { message: h.msg }), i)
|
|
2636
|
+
console.error(h.msg), c("");
|
|
2637
|
+
else if (h && h.code == "40001") {
|
|
2638
|
+
console.log("requestCloudMapData 登录过期,重新获取token", this.token), this.token = await this.requestCouldGisToken();
|
|
2639
|
+
const x = o.Authorization ? _.merge({}, o, { Authorization: this.token }) : o;
|
|
2640
|
+
this.requestCloudMapData({ api: e, message: t, params: n, method: r, data: s, headers: x, forceResolve: i, checkResult: a, loadMask: l }).then((E) => {
|
|
2641
|
+
c(E);
|
|
2642
|
+
}).catch((E) => {
|
|
2643
|
+
u(E);
|
|
2644
|
+
});
|
|
2645
|
+
} else
|
|
2646
|
+
this.fire("message", { message: `${t}结果无效`, messageType: "error" }), console.error(h.msg), u(h.msg);
|
|
2647
|
+
} else
|
|
2648
|
+
c(v.data);
|
|
2649
|
+
}).catch((v) => {
|
|
2650
|
+
console.log("catch ERROR", v), this.fire("fail", { message: `${t}失败,请检查地图服务和和请求参数` }), this.fire("message", { message: `${t}失败,请检查地图服务和和请求参数`, messageType: "error" }), console.error(v), u(v);
|
|
2651
|
+
}).finally(() => {
|
|
2652
|
+
l && this.fire("closemask");
|
|
2653
|
+
});
|
|
2654
|
+
}
|
|
2655
|
+
});
|
|
2656
|
+
},
|
|
2657
|
+
/**
|
|
2658
|
+
* 请求云GIS的Token
|
|
2659
|
+
*/
|
|
2660
|
+
requestCouldGisToken() {
|
|
2661
|
+
return new Promise((e, t) => {
|
|
2662
|
+
be.post(`${this.options.cloudGisUrl}api/gis/mapserver/rest/auth`, {
|
|
2663
|
+
user_name: this.options.username,
|
|
2664
|
+
password: this.options.password
|
|
2665
|
+
}).then((n) => {
|
|
2666
|
+
const r = n.data;
|
|
2667
|
+
r && r.code == "0" ? e(r.data.token) : (this.fire("fail", { message: r.msg }), this.fire("message", { message: `请求Token失败,${r.msg}`, messageType: "error" }), console.error(r.msg), e(""));
|
|
2668
|
+
}).catch((n) => {
|
|
2669
|
+
console.log("noErrorMsg", this.options), this.options.noErrorMsg || (this.fire("fail", { message: "请求Token失败,请检查云GIS账号和密码" }), this.fire("message", { message: "请求Token失败,请检查云GIS账号和密码", messageType: "error" })), console.error(n), t(n);
|
|
2670
|
+
});
|
|
2671
|
+
});
|
|
2672
|
+
},
|
|
2673
|
+
// 设置默认图层
|
|
2674
|
+
async setDefaultLayers() {
|
|
2675
|
+
this.fire("openmask", { text: "正在 加载默认图层" });
|
|
2676
|
+
const { defaultLayers: e, defaultLayerSets: t, disabledLayerSets: n, layerTreeType: r } = this.options;
|
|
2677
|
+
await this.formatLayerGroup_CloudGis(r, n), Array.isArray(e) ? this.visibleKeys = await this.showLayers(e, { loadMask: !1, refreshTiles: !1 }) : Array.isArray(t) ? this.visibleKeys = await this.showLayerSets(t, { loadMask: !1, refreshTiles: !1 }) : Array.isArray(n) && await this.showLayers(this.visibleKeys, { loadMask: !1, refreshTiles: !1 }), this.fire("closemask");
|
|
2678
|
+
},
|
|
2679
|
+
/**
|
|
2680
|
+
* 初始化图层信息
|
|
2681
|
+
* 有协同服务时,处理为树结构
|
|
2682
|
+
* 无协同服务时,处理为列表结构
|
|
2683
|
+
* @param {enum} type 类型,'leaf'(默认):叶子节点为实际图层,'branch':叶子节点为末级图集,图层置于layers属性
|
|
2684
|
+
* @param {array<string>} disabledLayerSets 禁用的图集,支持'x>y>z'的选择方式
|
|
2685
|
+
* @returns {treeLayers,visibleLayers}
|
|
2686
|
+
* @property {array<object>} treeLayers 树结构:{id,label,children}
|
|
2687
|
+
* @property {array<string>} visibleKeys 可见图层keys
|
|
2688
|
+
*/
|
|
2689
|
+
async formatLayerGroup_CloudGis(e = "leaf", t = []) {
|
|
2690
|
+
let n = [], r = await this.requestCloudMapData({
|
|
2691
|
+
api: "api/sys/layerauth/getGroupLayer",
|
|
2692
|
+
message: "获取图层",
|
|
2693
|
+
loadMask: !1,
|
|
2694
|
+
params: {
|
|
2695
|
+
dsGuid: this.options.dsGuid
|
|
2696
|
+
}
|
|
2697
|
+
});
|
|
2698
|
+
if (!r) {
|
|
2699
|
+
this.fire("fail", { message: "请求图层信息失败" }), this.fire("message", { message: "请求图层信息失败", messageType: "error" });
|
|
2700
|
+
return;
|
|
2701
|
+
}
|
|
2702
|
+
if (n = r, n.forEach((s) => {
|
|
2703
|
+
this.handleLayerNode(s, 0);
|
|
2704
|
+
}), Array.isArray(t) && t.length > 0) {
|
|
2705
|
+
let s = [], o = [];
|
|
2706
|
+
if (t.forEach((i) => {
|
|
2707
|
+
let a;
|
|
2708
|
+
i.split(">").forEach((l) => {
|
|
2709
|
+
l && (a = mt(a ? [a] : n, { label: l }));
|
|
2710
|
+
}), a && s.push(a.id);
|
|
2711
|
+
}), s.length > 0) {
|
|
2712
|
+
const i = (l) => {
|
|
2713
|
+
let c = [];
|
|
2714
|
+
return Array.isArray(l.children) && l.children.length > 0 ? l.children.forEach((u) => {
|
|
2715
|
+
c = _.concat(c, i(u));
|
|
2716
|
+
}) : c = _.concat(c, l.layers || l), c;
|
|
2717
|
+
}, a = (l) => {
|
|
2718
|
+
let c = l;
|
|
2719
|
+
if (_.includes(s, l.id))
|
|
2720
|
+
c = null, o.push(l.id), i(l).forEach((u) => {
|
|
2721
|
+
o.push(u.id);
|
|
2722
|
+
});
|
|
2723
|
+
else {
|
|
2724
|
+
let u = c.children;
|
|
2725
|
+
u && u.length > 0 && (c.children = _.compact(u.map((f) => a(f))));
|
|
2726
|
+
}
|
|
2727
|
+
return c;
|
|
2728
|
+
};
|
|
2729
|
+
n = _.compact(n.map((l) => a(l))), this.visibleKeys = _.pull(this.visibleKeys, ..._.uniq(o));
|
|
2730
|
+
}
|
|
2731
|
+
}
|
|
2732
|
+
this.treeLayers = n;
|
|
2733
|
+
},
|
|
2734
|
+
handleLayerNode(e, t = 0, n = "") {
|
|
2735
|
+
e.level = t, e.type == "layergroup" && (delete e.type, delete e.isLoad, delete e.mapInfo, delete e.isReadOnly, e.id = `NODE_${t}_${e.id}`), e.type == "layeritem" && (delete e.type, delete e.isLoad, delete e.mapInfo, delete e.isReadOnly, e.id = `LEAF_${t}_${e.guid}_${n}`, this.visibleKeys.push(e.id)), e.children && Array.isArray(e.children) && e.children.forEach((r) => this.handleLayerNode(r, t + 1, e.id));
|
|
2736
|
+
},
|
|
2737
|
+
/**
|
|
2738
|
+
* 显示指定图层
|
|
2739
|
+
* @param {array} nodes 图层节点集,兼容keys/leaf节点/branch节点
|
|
2740
|
+
* @param {boolean} args.loadMask 是否添加遮罩层
|
|
2741
|
+
* @param {boolean} args.refreshTiles 是否刷新瓦片
|
|
2742
|
+
* @returns {array} 对应的图层keys
|
|
2743
|
+
*/
|
|
2744
|
+
async showLayers(e = [], t = { loadMask: !0, refreshTiles: !0 }) {
|
|
2745
|
+
const n = _.isUndefined(t.loadMask) ? !0 : !!t.loadMask, r = _.isUndefined(t.refreshTiles) ? !0 : !!t.refreshTiles;
|
|
2746
|
+
await this.requestServer({
|
|
2747
|
+
api: "layer/hidelayers",
|
|
2748
|
+
params: { type: "all" },
|
|
2749
|
+
message: "关闭全部图层",
|
|
2750
|
+
loadMask: n
|
|
2751
|
+
});
|
|
2752
|
+
const s = (a) => {
|
|
2753
|
+
let l = [], c = [];
|
|
2754
|
+
if (Array.isArray(a)) {
|
|
2755
|
+
const u = (f, d) => {
|
|
2756
|
+
let w = [];
|
|
2757
|
+
function v(h) {
|
|
2758
|
+
for (let x of h)
|
|
2759
|
+
if (x.id == d) {
|
|
2760
|
+
Array.isArray(x.layers) ? w = x.layers.map((E) => E.label) : w = [x.label];
|
|
2761
|
+
break;
|
|
2762
|
+
} else Array.isArray(x.children) && x.children.length > 0 && v(x.children);
|
|
2763
|
+
}
|
|
2764
|
+
return v(f), w;
|
|
2765
|
+
};
|
|
2766
|
+
a.forEach((f) => {
|
|
2767
|
+
typeof f == "string" ? (l = _.concat(l, u(this.treeLayers, f)), c.push(f)) : typeof f == "object" && (Array.isArray(f.layers) ? (l = _.concat(l, f.layers.map((d) => d.label)), c = _.concat(l, f.layers.map((d) => d.id))) : (l.push(f.label), c.push(f.id)));
|
|
2768
|
+
});
|
|
2769
|
+
}
|
|
2770
|
+
return [l, c];
|
|
2771
|
+
}, [o, i] = s(e);
|
|
2772
|
+
return await this.requestServer({
|
|
2773
|
+
api: "layer/showlayers",
|
|
2774
|
+
params: {
|
|
2775
|
+
layers: _.join(o),
|
|
2776
|
+
packettype: "layer",
|
|
2777
|
+
action: "showlayers",
|
|
2778
|
+
mapid: this.requestOptions.mapid
|
|
2779
|
+
},
|
|
2780
|
+
message: "打开指定图层",
|
|
2781
|
+
loadMask: n
|
|
2782
|
+
}), r && this.fire("refreshtilelayer"), this.visibleKeys = i, this.visibleKeys;
|
|
2783
|
+
},
|
|
2784
|
+
/**
|
|
2785
|
+
* 显示指定图组,支持'xx>yy>zz'形式的精确选择
|
|
2786
|
+
* @param {array} sets 图组名称
|
|
2787
|
+
* @param {boolean} args.loadMask 是否添加遮罩层
|
|
2788
|
+
* @param {boolean} args.refreshTiles 是否刷新瓦片
|
|
2789
|
+
* @returns {array} 对应的图层keys
|
|
2790
|
+
*/
|
|
2791
|
+
async showLayerSets(e = [], t = { loadMask: !0, refreshTiles: !0 }) {
|
|
2792
|
+
const n = _.isUndefined(t.loadMask) ? !0 : !!t.loadMask, r = _.isUndefined(t.refreshTiles) ? !0 : !!t.refreshTiles;
|
|
2793
|
+
if (_.isString(e) && e.length > 0 && (e = [e]), this.treeLayers.length > 0) {
|
|
2794
|
+
const s = (i) => {
|
|
2795
|
+
let a = [];
|
|
2796
|
+
return Array.isArray(i.children) && i.children.length > 0 ? i.children.forEach((l) => {
|
|
2797
|
+
a = _.concat(a, s(l));
|
|
2798
|
+
}) : a = _.concat(a, i.layers || i), a;
|
|
2799
|
+
};
|
|
2800
|
+
let o = [];
|
|
2801
|
+
return e.forEach((i) => {
|
|
2802
|
+
let a;
|
|
2803
|
+
i.split(">").forEach((l) => {
|
|
2804
|
+
l && (a = mt(a ? [a] : this.treeLayers, { label: l }));
|
|
2805
|
+
}), a && (o.push(a.id), s(a).forEach((l) => {
|
|
2806
|
+
o.push(l.id);
|
|
2807
|
+
}));
|
|
2808
|
+
}), await this.showLayers(o, { loadMask: n, refreshTiles: r }), o;
|
|
2809
|
+
}
|
|
2810
|
+
},
|
|
2811
|
+
/**
|
|
2812
|
+
* 获取指定图组的所有key,支持'xx>yy>zz'形式的精确选择
|
|
2813
|
+
* @param {array} sets 图组名称
|
|
2814
|
+
* @param {array} except 被排除的图层名称
|
|
2815
|
+
* @returns {array} 对应的图层keys
|
|
2816
|
+
*/
|
|
2817
|
+
async getLayerSetsKeys(e = [], t = []) {
|
|
2818
|
+
if (_.isString(e) && e.length > 0 && (e = [e]), this.treeLayers.length > 0) {
|
|
2819
|
+
const n = (s) => {
|
|
2820
|
+
let o = [];
|
|
2821
|
+
return Array.isArray(s.children) && s.children.length > 0 ? s.children.forEach((i) => {
|
|
2822
|
+
o = _.concat(o, n(i));
|
|
2823
|
+
}) : o = _.concat(o, s.layers || s), o;
|
|
2824
|
+
};
|
|
2825
|
+
let r = [];
|
|
2826
|
+
return e.forEach((s) => {
|
|
2827
|
+
let o;
|
|
2828
|
+
s.split(">").forEach((i) => {
|
|
2829
|
+
i && (o = mt(o ? [o] : this.treeLayers, { label: i }));
|
|
2830
|
+
}), o && (r.push(o.id), n(o).forEach((i) => {
|
|
2831
|
+
let a = !1;
|
|
2832
|
+
t.forEach((l) => {
|
|
2833
|
+
i.label.indexOf(l) > -1 && (a = !0);
|
|
2834
|
+
}), a || r.push(i.id);
|
|
2835
|
+
}));
|
|
2836
|
+
}), r;
|
|
2837
|
+
}
|
|
2838
|
+
},
|
|
2839
|
+
/**
|
|
2840
|
+
* 查询实体信息
|
|
2841
|
+
* @param {object} params 查询参数
|
|
2842
|
+
* @param {boolean} loadMask 是否添加遮罩层
|
|
2843
|
+
*/
|
|
2844
|
+
queryEntity(e = {}, t) {
|
|
2845
|
+
const n = L.extend({
|
|
2846
|
+
stamp: Date.now(),
|
|
2847
|
+
dsGuid: this.options.dsGuid,
|
|
2848
|
+
//this.requestOptions.dsid || '',
|
|
2849
|
+
returnAttribute: !0,
|
|
2850
|
+
geometryTypes: "point,line,polyline,polygon,compound",
|
|
2851
|
+
layerNames: "",
|
|
2852
|
+
returnFeatureInfo: "all",
|
|
2853
|
+
returnGroupByLayer: !0
|
|
2854
|
+
}, e);
|
|
2855
|
+
return this.requestCloudMapData({
|
|
2856
|
+
api: "api/gis/mapserver/rest/feature/query",
|
|
2857
|
+
method: "post",
|
|
2858
|
+
data: n,
|
|
2859
|
+
headers: {
|
|
2860
|
+
Authorization: this.token
|
|
2861
|
+
},
|
|
2862
|
+
message: "查询实体",
|
|
2863
|
+
loadMask: t
|
|
2864
|
+
});
|
|
2865
|
+
},
|
|
2866
|
+
/**
|
|
2867
|
+
* 查询要素字典
|
|
2868
|
+
* @param {string} targetDsGuid 数据源唯一标识
|
|
2869
|
+
* @param {boolean} loadMask 是否添加遮罩层
|
|
2870
|
+
*/
|
|
2871
|
+
getFeatureDict(e) {
|
|
2872
|
+
return this.requestCloudMapData({
|
|
2873
|
+
api: "api/cfg/features/get",
|
|
2874
|
+
message: "查询字典",
|
|
2875
|
+
loadMask: e,
|
|
2876
|
+
params: {
|
|
2877
|
+
stamp: Date.now(),
|
|
2878
|
+
dsGuid: this.options.dsGuid
|
|
2879
|
+
}
|
|
2880
|
+
});
|
|
2881
|
+
},
|
|
2882
|
+
// 获取缩略图
|
|
2883
|
+
getThumbnail() {
|
|
2884
|
+
return new Promise((e) => {
|
|
2885
|
+
if (this.extent.length == 4) {
|
|
2886
|
+
const { url: t, dsid: n, mapid: r, uid: s } = this.requestOptions;
|
|
2887
|
+
be.get(`${t}wmsmap/getmap`, {
|
|
2888
|
+
params: {
|
|
2889
|
+
dsid: n,
|
|
2890
|
+
mapid: r,
|
|
2891
|
+
uid: s,
|
|
2892
|
+
request: "GetMap",
|
|
2893
|
+
service: "WMS",
|
|
2894
|
+
width: 256,
|
|
2895
|
+
height: 256,
|
|
2896
|
+
format: "image/png",
|
|
2897
|
+
transparent: !0,
|
|
2898
|
+
version: "1.1.1",
|
|
2899
|
+
bbox: _.join(this.extent, ",")
|
|
2900
|
+
},
|
|
2901
|
+
responseType: "arraybuffer"
|
|
2902
|
+
}).then((o) => {
|
|
2903
|
+
const i = btoa(new Uint8Array(o.data).reduce((a, l) => a + String.fromCharCode(l), ""));
|
|
2904
|
+
e(`data:image/png;base64,${i}`);
|
|
2905
|
+
});
|
|
2906
|
+
}
|
|
2907
|
+
});
|
|
2908
|
+
},
|
|
2909
|
+
// 获取切片图层对象
|
|
2910
|
+
// 适用于requestOptions、leafletOptions以及图层状态已经准备的场景
|
|
2911
|
+
currentTileLayer() {
|
|
2912
|
+
const { url: e, dsid: t, mapid: n, uid: r } = this.requestOptions, { wmscrs: s, maxZoom: o } = this.leafletOptions, i = `${e}wmsmap/getmap?dsid=${t}&mapid=${n}&uid=${r}&tid=${Ke()}`;
|
|
2913
|
+
return L.tileLayer.wms(i, {
|
|
2914
|
+
format: "image/png",
|
|
2915
|
+
transparent: !0,
|
|
2916
|
+
crs: s,
|
|
2917
|
+
maxZoom: o
|
|
2918
|
+
});
|
|
2919
|
+
},
|
|
2920
|
+
// 生成切片图层对象
|
|
2921
|
+
async createTileLayer({ beforeCreate: e } = {}) {
|
|
2922
|
+
return await this.start(), _.isFunction(e) && await e(this), await this.setDefaultLayers(), this.currentTileLayer();
|
|
2923
|
+
}
|
|
2924
|
+
});
|
|
2925
|
+
function Sa(e, t) {
|
|
2926
|
+
function n(r) {
|
|
2927
|
+
return Array.isArray(r) && r.length == 2 ? { x: r[0], y: r[1] } : r.lat && r.lng ? { x: r.lat, y: r.lng } : r;
|
|
2928
|
+
}
|
|
2929
|
+
return e = n(e), t = n(t), Math.sqrt((e.x - t.x) * (e.x - t.x) + (e.y - t.y) * (e.y - t.y));
|
|
2930
|
+
}
|
|
2931
|
+
L.AnimatedMarker = L.Marker.extend({
|
|
2932
|
+
/**
|
|
2933
|
+
* 活动状态
|
|
2934
|
+
* 1. disabled 不可用
|
|
2935
|
+
* 2. free 空闲
|
|
2936
|
+
* 3. move 移动中
|
|
2937
|
+
* 4. pause 暂停中
|
|
2938
|
+
*/
|
|
2939
|
+
_status: "disabled",
|
|
2940
|
+
chunkMoveTimer: null,
|
|
2941
|
+
options: {
|
|
2942
|
+
// 持续时间
|
|
2943
|
+
duration: 5e3,
|
|
2944
|
+
// 轨迹序列
|
|
2945
|
+
latLngs: [],
|
|
2946
|
+
// 浮于其他Marker上层
|
|
2947
|
+
zIndexOffset: 1e3
|
|
2948
|
+
},
|
|
2949
|
+
initialize(e) {
|
|
2950
|
+
L.setOptions(this, e);
|
|
2951
|
+
const t = this.options.latLngs;
|
|
2952
|
+
t && t.length > 1 ? (L.Marker.prototype.initialize.call(this, t[0], this.options), this._status = "free") : console.error("invalid latLngs");
|
|
2953
|
+
},
|
|
2954
|
+
// 开始动画
|
|
2955
|
+
startMove() {
|
|
2956
|
+
if (this._status == "free") {
|
|
2957
|
+
const { duration: e, latLngs: t } = this.options;
|
|
2958
|
+
let n = 0, r = [], s = [];
|
|
2959
|
+
for (let o = 0; o < t.length - 1; o++) {
|
|
2960
|
+
const i = Sa(t[o], t[o + 1]);
|
|
2961
|
+
n += i, r.push(i);
|
|
2962
|
+
}
|
|
2963
|
+
r.forEach((o) => {
|
|
2964
|
+
s.push(o / n * e);
|
|
2965
|
+
}), this.stepDurations = s, this.chunkIndex = 0, this._status = "move", this.setLatLng(t[0]), _.delay(() => {
|
|
2966
|
+
this.chunkMove(), this.fire("startmove");
|
|
2967
|
+
});
|
|
2968
|
+
} else
|
|
2969
|
+
console.error("instance is not free");
|
|
2970
|
+
},
|
|
2971
|
+
// 分段移动
|
|
2972
|
+
chunkMove() {
|
|
2973
|
+
if (this.chunkIndex < this.stepDurations.length) {
|
|
2974
|
+
if (this._status == "pause")
|
|
2975
|
+
return;
|
|
2976
|
+
const e = this.stepDurations[this.chunkIndex], t = `transform ${e}ms linear`;
|
|
2977
|
+
this.setTransition(t), this.chunkIndex += 1, _.delay(() => {
|
|
2978
|
+
this.fire("chunkmove", { index: this.chunkIndex, duration: e }), this.setLatLng(this.options.latLngs[this.chunkIndex]), this.chunkMoveTimer = _.delay(this.chunkMove.bind(this), e);
|
|
2979
|
+
});
|
|
2980
|
+
} else
|
|
2981
|
+
this.stopMove();
|
|
2982
|
+
},
|
|
2983
|
+
// 设置动画参数
|
|
2984
|
+
setTransition(e) {
|
|
2985
|
+
const t = L.DomUtil.TRANSITION, n = this._icon ? this._icon.style : "";
|
|
2986
|
+
n && (n[t] = e);
|
|
2987
|
+
const r = this._shadow ? this._shadow.style : "";
|
|
2988
|
+
r && (r[t] = e);
|
|
2989
|
+
const s = this.getTooltip(), o = s && s._container ? s._container.style : "";
|
|
2990
|
+
o && (o[t] = e);
|
|
2991
|
+
const i = this.getPopup(), a = i && i._container ? i._container.style : "";
|
|
2992
|
+
a && (a[t] = e);
|
|
2993
|
+
},
|
|
2994
|
+
// 停止动画
|
|
2995
|
+
stopMove() {
|
|
2996
|
+
this._status = "free", this.setTransition(null), this.chunkMoveTimer && (clearTimeout(this.chunkMoveTimer), this.chunkMoveTimer = null), this.setLatLng(_.last(this.options.latLngs)), this.fire("stopmove");
|
|
2997
|
+
},
|
|
2998
|
+
// 暂停动画
|
|
2999
|
+
pauseMove() {
|
|
3000
|
+
this._status == "move" && (this._status = "pause", this.fire("pausemove"));
|
|
3001
|
+
},
|
|
3002
|
+
// 继续动画
|
|
3003
|
+
continueMove() {
|
|
3004
|
+
this._status == "pause" && (this._status = "move", this.fire("continuemove"), this.chunkMove());
|
|
3005
|
+
}
|
|
3006
|
+
});
|
|
3007
|
+
L.animatedMarker = (e) => new L.AnimatedMarker(e);
|
|
3008
|
+
L.EchartsLayer = L.Layer.extend({
|
|
3009
|
+
includes: [],
|
|
3010
|
+
_echartsContainer: null,
|
|
3011
|
+
_map: null,
|
|
3012
|
+
_ec: null,
|
|
3013
|
+
_echartsOptions: null,
|
|
3014
|
+
options: {
|
|
3015
|
+
loadWhileAnimating: !1
|
|
3016
|
+
},
|
|
3017
|
+
initialize: function(e, t) {
|
|
3018
|
+
L.Util.setOptions(this, t), this.setOption(e);
|
|
3019
|
+
},
|
|
3020
|
+
/**
|
|
3021
|
+
* @function L.supermap.echartsLayer.prototype.setOption
|
|
3022
|
+
* @description 设置图表地图参数。
|
|
3023
|
+
* @param {Object} echartsOptions - 图表参数。
|
|
3024
|
+
* @param {string} lazyUpdate - 后台自动更新。
|
|
3025
|
+
* @param {boolean} [notMerge] - 是否合并参数。
|
|
3026
|
+
*/
|
|
3027
|
+
setOption: function(e, t, n) {
|
|
3028
|
+
const r = e.baseOption || e;
|
|
3029
|
+
r.LeafletMap = r.LeafletMap || {
|
|
3030
|
+
roam: !0
|
|
3031
|
+
}, r.animation = r.animation === !0, this._echartsOptions = e, this._ec && this._ec.setOption(e, t, n);
|
|
3032
|
+
},
|
|
3033
|
+
getEcharts: function() {
|
|
3034
|
+
return this._ec;
|
|
3035
|
+
},
|
|
3036
|
+
_disableEchartsContainer: function() {
|
|
3037
|
+
this._echartsContainer.style.visibility = "hidden";
|
|
3038
|
+
},
|
|
3039
|
+
_enableEchartsContainer: function() {
|
|
3040
|
+
this._echartsContainer.style.visibility = "visible";
|
|
3041
|
+
},
|
|
3042
|
+
/**
|
|
3043
|
+
* @private
|
|
3044
|
+
* @function L.supermap.echartsLayer.prototype.onAdd
|
|
3045
|
+
* @description 添加地图。
|
|
3046
|
+
* @param {L.Map} map - 待添加的地图。
|
|
3047
|
+
*/
|
|
3048
|
+
onAdd: function(e) {
|
|
3049
|
+
this._map = e, this._initEchartsContainer(), this._ec = me.init(this._echartsContainer), this._ec.leafletMap = e;
|
|
3050
|
+
const t = this;
|
|
3051
|
+
e.on("zoomstart", function() {
|
|
3052
|
+
t._disableEchartsContainer();
|
|
3053
|
+
}), !t.options.loadWhileAnimating && e.on("movestart", function() {
|
|
3054
|
+
t._disableEchartsContainer();
|
|
3055
|
+
}), me.registerAction({
|
|
3056
|
+
type: "LeafletMapLayout",
|
|
3057
|
+
event: "LeafletMapLayout",
|
|
3058
|
+
update: "updateLayout"
|
|
3059
|
+
}, function(n) {
|
|
3060
|
+
}), me.registerCoordinateSystem(
|
|
3061
|
+
"leaflet",
|
|
3062
|
+
W
|
|
3063
|
+
), me.extendComponentModel({
|
|
3064
|
+
type: "LeafletMap",
|
|
3065
|
+
getBMap: function() {
|
|
3066
|
+
return this.__LeafletMap;
|
|
3067
|
+
},
|
|
3068
|
+
defaultOption: {
|
|
3069
|
+
roam: !1
|
|
3070
|
+
}
|
|
3071
|
+
}), me.extendComponentView({
|
|
3072
|
+
type: "LeafletMap",
|
|
3073
|
+
render: function(n, r, s) {
|
|
3074
|
+
let o = !0, i = r.scheduler.ecInstance.leafletMap;
|
|
3075
|
+
const a = s.getZr().painter.getViewportRoot(), l = i.options.zoomAnimation && L.Browser.any3d;
|
|
3076
|
+
a.className = " leaflet-layer leaflet-zoom-" + (l ? "animated" : "hide") + " echarts-layer";
|
|
3077
|
+
const c = L.DomUtil.testProp(["transformOrigin", "WebkitTransformOrigin", "msTransformOrigin"]);
|
|
3078
|
+
a.style[c] = "50% 50%";
|
|
3079
|
+
const u = n.coordinateSystem, f = s.getZr().painter.getLayers(), d = function() {
|
|
3080
|
+
if (o)
|
|
3081
|
+
return;
|
|
3082
|
+
const h = t._map.containerPointToLayerPoint([0, 0]), x = [h.x || 0, h.y || 0];
|
|
3083
|
+
if (a.style.left = x[0] + "px", a.style.top = x[1] + "px", !t.options.loadWhileAnimating) {
|
|
3084
|
+
for (let E in f)
|
|
3085
|
+
f.hasOwnProperty(E) && f[E] && w(f[E].ctx);
|
|
3086
|
+
t._enableEchartsContainer();
|
|
3087
|
+
}
|
|
3088
|
+
u.setMapOffset(x), n.__mapOffset = x, s.dispatchAction({
|
|
3089
|
+
type: "LeafletMapLayout"
|
|
3090
|
+
});
|
|
3091
|
+
};
|
|
3092
|
+
function w(h) {
|
|
3093
|
+
h && h.clearRect && h.clearRect(0, 0, h.canvas.width, h.canvas.height);
|
|
3094
|
+
}
|
|
3095
|
+
function v() {
|
|
3096
|
+
o || (s.dispatchAction({
|
|
3097
|
+
type: "LeafletMapLayout"
|
|
3098
|
+
}), t._enableEchartsContainer());
|
|
3099
|
+
}
|
|
3100
|
+
t._oldMoveHandler && i.off(t.options.loadWhileAnimating ? "move" : "moveend", t._oldMoveHandler), t._oldZoomEndHandler && i.off("zoomend", t._oldZoomEndHandler), i.on(t.options.loadWhileAnimating ? "move" : "moveend", d), i.on("zoomend", v), t._oldMoveHandler = d, t._oldZoomEndHandler = v, o = !1;
|
|
3101
|
+
}
|
|
3102
|
+
}), this._ec.setOption(this._echartsOptions);
|
|
3103
|
+
},
|
|
3104
|
+
onRemove: function() {
|
|
3105
|
+
this._ec.clear(), this._ec.dispose(), delete this._ec, L.DomUtil.remove(this._echartsContainer), this._oldZoomEndHandler && (this._map.off("zoomend", this._oldZoomEndHandler), this._oldZoomEndHandler = null), this._oldMoveHandler && (this._map.off(this.options.loadWhileAnimating ? "move" : "moveend", this._oldMoveHandler), this._oldMoveHandler = null), this._resizeHandler && (this._map.off("resize", this._resizeHandler), this._resizeHandler = null), delete this._map;
|
|
3106
|
+
},
|
|
3107
|
+
_initEchartsContainer: function() {
|
|
3108
|
+
const e = this._map.getSize(), t = document.createElement("div");
|
|
3109
|
+
t.style.position = "absolute", t.style.height = e.y + "px", t.style.width = e.x + "px", t.style.zIndex = 10, this._echartsContainer = t, this.getPane().appendChild(this._echartsContainer);
|
|
3110
|
+
const n = this;
|
|
3111
|
+
function r(s) {
|
|
3112
|
+
let o = s.newSize;
|
|
3113
|
+
n._echartsContainer.style.width = o.x + "px", n._echartsContainer.style.height = o.y + "px", n._ec.resize();
|
|
3114
|
+
}
|
|
3115
|
+
this._map.on("resize", r), this._resizeHandler = r;
|
|
3116
|
+
}
|
|
3117
|
+
});
|
|
3118
|
+
function W(e) {
|
|
3119
|
+
this._LeafletMap = e, this.dimensions = ["lng", "lat"], this._mapOffset = [0, 0];
|
|
3120
|
+
}
|
|
3121
|
+
W.prototype.dimensions = ["lng", "lat"];
|
|
3122
|
+
W.prototype.setMapOffset = function(e) {
|
|
3123
|
+
this._mapOffset = e;
|
|
3124
|
+
};
|
|
3125
|
+
W.prototype.getBMap = function() {
|
|
3126
|
+
return this._LeafletMap;
|
|
3127
|
+
};
|
|
3128
|
+
W.prototype.prepareCustoms = function() {
|
|
3129
|
+
const e = me.util, t = this.getViewRect();
|
|
3130
|
+
return {
|
|
3131
|
+
coordSys: {
|
|
3132
|
+
// The name exposed to user is always 'cartesian2d' but not 'grid'.
|
|
3133
|
+
type: "leaflet",
|
|
3134
|
+
x: t.x,
|
|
3135
|
+
y: t.y,
|
|
3136
|
+
width: t.width,
|
|
3137
|
+
height: t.height
|
|
3138
|
+
},
|
|
3139
|
+
api: {
|
|
3140
|
+
coord: e.bind(this.dataToPoint, this),
|
|
3141
|
+
size: e.bind(n, this)
|
|
3142
|
+
}
|
|
3143
|
+
};
|
|
3144
|
+
function n(r, s) {
|
|
3145
|
+
return s = s || [0, 0], e.map([0, 1], function(o) {
|
|
3146
|
+
const i = s[o], a = r[o] / 2, l = [], c = [];
|
|
3147
|
+
return l[o] = i - a, c[o] = i + a, l[1 - o] = c[1 - o] = s[1 - o], Math.abs(this.dataToPoint(l)[o] - this.dataToPoint(c)[o]);
|
|
3148
|
+
}, this);
|
|
3149
|
+
}
|
|
3150
|
+
};
|
|
3151
|
+
W.prototype.dataToPoint = function(e) {
|
|
3152
|
+
e[1] === null && (e[1] = L.CRS.EPSG3857.projection.MAX_LATITUDE);
|
|
3153
|
+
const t = this._LeafletMap.latLngToLayerPoint([e[1], e[0]]), n = this._mapOffset;
|
|
3154
|
+
return [t.x - n[0], t.y - n[1]];
|
|
3155
|
+
};
|
|
3156
|
+
W.prototype.fixLat = function(e) {
|
|
3157
|
+
return e >= 90 ? 89.99999999999999 : e <= -90 ? -89.99999999999999 : e;
|
|
3158
|
+
};
|
|
3159
|
+
W.prototype.pointToData = function(e) {
|
|
3160
|
+
let t = this._mapOffset, n = this._LeafletMap.layerPointToLatLng([e[0] + t[0], e[1] + t[1]]);
|
|
3161
|
+
return [n.lng, n.lat];
|
|
3162
|
+
};
|
|
3163
|
+
W.prototype.getViewRect = function() {
|
|
3164
|
+
const e = this._LeafletMap.getSize();
|
|
3165
|
+
return new me.graphic.BoundingRect(0, 0, e.x, e.y);
|
|
3166
|
+
};
|
|
3167
|
+
W.prototype.getRoamTransform = function() {
|
|
3168
|
+
return me.matrix.create();
|
|
3169
|
+
};
|
|
3170
|
+
W.dimensions = W.prototype.dimensions;
|
|
3171
|
+
W.create = function(e) {
|
|
3172
|
+
let t, n = e.scheduler.ecInstance.leafletMap;
|
|
3173
|
+
e.eachComponent("LeafletMap", function(r) {
|
|
3174
|
+
t || (t = new W(n)), r.coordinateSystem = t, r.coordinateSystem.setMapOffset(r.__mapOffset || [0, 0]);
|
|
3175
|
+
}), e.eachSeries(function(r) {
|
|
3176
|
+
(!r.get("coordinateSystem") || r.get("coordinateSystem") === "leaflet") && (t || (t = new W(n)), r.coordinateSystem = t, r.animation = r.animation === !0);
|
|
3177
|
+
});
|
|
3178
|
+
};
|
|
3179
|
+
L.echartsLayer = (e, t) => new L.EchartsLayer(e, t);
|
|
3180
|
+
L.ElasticMarker = L.Marker.extend({
|
|
3181
|
+
targetMap: null,
|
|
3182
|
+
options: {
|
|
3183
|
+
// 启用动态尺寸
|
|
3184
|
+
elasticScale: !0,
|
|
3185
|
+
// 合适的级别
|
|
3186
|
+
fitZoom: 10,
|
|
3187
|
+
// 最大比例
|
|
3188
|
+
maxScale: 1.35,
|
|
3189
|
+
// 最小比例
|
|
3190
|
+
minScale: 0.35,
|
|
3191
|
+
// 比例变换系数
|
|
3192
|
+
scaleFactor: 1.35,
|
|
3193
|
+
// 启用动态透明度
|
|
3194
|
+
elasticOpacity: !1,
|
|
3195
|
+
opacityFitZoom: null,
|
|
3196
|
+
minOpacity: 0.1,
|
|
3197
|
+
opacityFactor: 2,
|
|
3198
|
+
// 启动动态tooltip
|
|
3199
|
+
elasticTooltip: !0,
|
|
3200
|
+
tooltipFitZoom: null
|
|
3201
|
+
},
|
|
3202
|
+
initialize(e, t) {
|
|
3203
|
+
L.setOptions(this, t), this.options.opacityFitZoom = this.options.opacityFitZoom || this.options.fitZoom, this.options.tooltipFitZoom = this.options.tooltipFitZoom || this.options.fitZoom, this._bindEvents(), L.Marker.prototype.initialize.call(this, e, this.options);
|
|
3204
|
+
},
|
|
3205
|
+
_bindEvents() {
|
|
3206
|
+
this.on("add", (e) => {
|
|
3207
|
+
this.targetMap = e.target._map, this.targetMap.on("zoomend", this._update, this), this._update();
|
|
3208
|
+
}), this.on("remove", () => {
|
|
3209
|
+
this.targetMap.off("zoomend", this._update, this), this.targetMap = null;
|
|
3210
|
+
}), this.on("tooltipopen", (e) => {
|
|
3211
|
+
this._updateTooltip();
|
|
3212
|
+
});
|
|
3213
|
+
},
|
|
3214
|
+
_update() {
|
|
3215
|
+
if (this.options.elasticScale && this.targetMap) {
|
|
3216
|
+
const e = this.targetMap.getZoom();
|
|
3217
|
+
let t = 1 - (this.options.fitZoom - e) * this.options.scaleFactor * 0.1;
|
|
3218
|
+
t = _.max([this.options.minScale, t]), t = _.min([this.options.maxScale, t]);
|
|
3219
|
+
const n = this.getIcon();
|
|
3220
|
+
if (n instanceof L.DivIcon) {
|
|
3221
|
+
const r = ze(this._icon), s = r.contents();
|
|
3222
|
+
this.options.interactive && t < 1 && (r.css("pointer-events", "none"), s.css("pointer-events", "auto")), s.css("transform", `scale(${t})`), s.css("transition", "0.2s");
|
|
3223
|
+
} else if (n instanceof L.Icon) {
|
|
3224
|
+
const r = ze(this._icon), s = ze(this._shadow);
|
|
3225
|
+
let o, i;
|
|
3226
|
+
n instanceof L.Icon.Default ? o = i = L.Icon.Default.prototype.options.iconAnchor : (o = n.options.iconAnchor, i = n.options.shadowAnchor), r.length > 0 && (r.css("transform", r.css("transform") + ` scale(${t})`), o && o.length == 2 && r.css("transform-origin", `${o[0] + "px"} ${o[1] + "px"}`), r.css("transition", "0.2s")), s.length > 0 && (s.css("transform", s.css("transform") + ` scale(${t})`), i && i.length == 2 && s.css("transform-origin", `${i[0] + "px"} ${i[1] + "px"}`), s.css("transition", "0.2s"));
|
|
3227
|
+
}
|
|
3228
|
+
}
|
|
3229
|
+
if (this.options.elasticOpacity && this.targetMap) {
|
|
3230
|
+
const e = this.targetMap.getZoom();
|
|
3231
|
+
let t = 1;
|
|
3232
|
+
e < this.options.fitZoom && (t = 1 - (this.options.fitZoom - e) * this.options.opacityFactor * 0.1), t = _.max([this.options.minOpacity, t]);
|
|
3233
|
+
const n = ze(this._icon), r = ze(this._shadow);
|
|
3234
|
+
n.length > 0 && n.css("opacity", t), r.length > 0 && r.css("opacity", t);
|
|
3235
|
+
}
|
|
3236
|
+
this._updateTooltip();
|
|
3237
|
+
},
|
|
3238
|
+
_updateTooltip() {
|
|
3239
|
+
if (this.options.elasticTooltip && this.targetMap) {
|
|
3240
|
+
const e = this.getTooltip();
|
|
3241
|
+
if (e) {
|
|
3242
|
+
const t = this.targetMap.getZoom(), n = ze(e._container);
|
|
3243
|
+
t >= this.options.fitZoom ? n.css("display", "") : n.css("display", "none"), _.delay(() => {
|
|
3244
|
+
this.isTooltipOpen() && e._map && e._latlng && e._container && e._updatePosition();
|
|
3245
|
+
});
|
|
3246
|
+
}
|
|
3247
|
+
}
|
|
3248
|
+
}
|
|
3249
|
+
});
|
|
3250
|
+
L.elasticMarker = (e, t) => new L.ElasticMarker(e, t);
|
|
3251
|
+
function Ht(e, t, n = {}) {
|
|
3252
|
+
const r = { type: "Feature" };
|
|
3253
|
+
return (n.id === 0 || n.id) && (r.id = n.id), n.bbox && (r.bbox = n.bbox), r.properties = {}, r.geometry = e, r;
|
|
3254
|
+
}
|
|
3255
|
+
function Ca(e, t, n = {}) {
|
|
3256
|
+
if (!e)
|
|
3257
|
+
throw new Error("coordinates is required");
|
|
3258
|
+
if (!Array.isArray(e))
|
|
3259
|
+
throw new Error("coordinates must be an Array");
|
|
3260
|
+
if (e.length < 2)
|
|
3261
|
+
throw new Error("coordinates must be at least 2 numbers long");
|
|
3262
|
+
if (!pn(e[0]) || !pn(e[1]))
|
|
3263
|
+
throw new Error("coordinates must contain numbers");
|
|
3264
|
+
return Ht({
|
|
3265
|
+
type: "Point",
|
|
3266
|
+
coordinates: e
|
|
3267
|
+
}, t, n);
|
|
3268
|
+
}
|
|
3269
|
+
function Ma(e, t, n = {}) {
|
|
3270
|
+
for (const s of e) {
|
|
3271
|
+
if (s.length < 4)
|
|
3272
|
+
throw new Error(
|
|
3273
|
+
"Each LinearRing of a Polygon must have 4 or more Positions."
|
|
3274
|
+
);
|
|
3275
|
+
if (s[s.length - 1].length !== s[0].length)
|
|
3276
|
+
throw new Error("First and last Position are not equivalent.");
|
|
3277
|
+
for (let o = 0; o < s[s.length - 1].length; o++)
|
|
3278
|
+
if (s[s.length - 1][o] !== s[0][o])
|
|
3279
|
+
throw new Error("First and last Position are not equivalent.");
|
|
3280
|
+
}
|
|
3281
|
+
return Ht({
|
|
3282
|
+
type: "Polygon",
|
|
3283
|
+
coordinates: e
|
|
3284
|
+
}, t, n);
|
|
3285
|
+
}
|
|
3286
|
+
function Aa(e, t, n = {}) {
|
|
3287
|
+
if (e.length < 2)
|
|
3288
|
+
throw new Error("coordinates must be an array of two or more positions");
|
|
3289
|
+
return Ht({
|
|
3290
|
+
type: "LineString",
|
|
3291
|
+
coordinates: e
|
|
3292
|
+
}, t, n);
|
|
3293
|
+
}
|
|
3294
|
+
function pn(e) {
|
|
3295
|
+
return !isNaN(e) && e !== null && !Array.isArray(e);
|
|
3296
|
+
}
|
|
3297
|
+
const _t = (e) => {
|
|
3298
|
+
let t = [];
|
|
3299
|
+
return e.geometry.coordinates.forEach((r) => {
|
|
3300
|
+
t.push(r.map((s) => ({
|
|
3301
|
+
lat: s[1],
|
|
3302
|
+
lng: s[0]
|
|
3303
|
+
})));
|
|
3304
|
+
}), t;
|
|
3305
|
+
}, Ta = {
|
|
3306
|
+
/**
|
|
3307
|
+
* 点缓冲分析
|
|
3308
|
+
* @param {L.LatLng} center 中心点
|
|
3309
|
+
* @param {Number} distance 缓冲距离
|
|
3310
|
+
* @param {String} units 单位
|
|
3311
|
+
* @returns {Array<Array<L.LatLng>>} 缓冲区经纬度序列
|
|
3312
|
+
*/
|
|
3313
|
+
bufferPoint(e, t, n = "meters") {
|
|
3314
|
+
const r = [e.lng, e.lat], s = ht(Ca(r), t, { units: n });
|
|
3315
|
+
return _t(s);
|
|
3316
|
+
},
|
|
3317
|
+
/**
|
|
3318
|
+
* 路径缓冲分析
|
|
3319
|
+
* @param {Array<L.LatLng>} latLngs 路径经纬度序列
|
|
3320
|
+
* @param {Number} distance 缓冲距离
|
|
3321
|
+
* @param {String} units 单位
|
|
3322
|
+
* @returns {Array<Array<L.LatLng>>} 缓冲区经纬度序列
|
|
3323
|
+
*/
|
|
3324
|
+
bufferLine(e, t, n = "meters") {
|
|
3325
|
+
const r = e.map((o) => [o.lng, o.lat]), s = ht(Aa(r), t, { units: n });
|
|
3326
|
+
return _t(s);
|
|
3327
|
+
},
|
|
3328
|
+
/**
|
|
3329
|
+
* 区域缓冲分析
|
|
3330
|
+
* @param {Array<L.LatLng>} latLngs 区域经纬度序列
|
|
3331
|
+
* @param {Number} distance 缓冲距离
|
|
3332
|
+
* @param {String} units 单位
|
|
3333
|
+
* @returns {Array<Array<L.LatLng>>} 缓冲区经纬度序列
|
|
3334
|
+
*/
|
|
3335
|
+
bufferArea(e, t, n = "meters") {
|
|
3336
|
+
let r = e.map((o) => [o.lng, o.lat]);
|
|
3337
|
+
r.push(r[0]);
|
|
3338
|
+
const s = ht(Ma([r]), t, { units: n });
|
|
3339
|
+
return _t(s);
|
|
3340
|
+
}
|
|
3341
|
+
}, Ea = {
|
|
3342
|
+
/**
|
|
3343
|
+
* 角度转弧度
|
|
3344
|
+
* @param {角度} angle
|
|
3345
|
+
*/
|
|
3346
|
+
angleToRad(e) {
|
|
3347
|
+
return e * Math.PI / 180;
|
|
3348
|
+
},
|
|
3349
|
+
/**
|
|
3350
|
+
* 弧度转角度
|
|
3351
|
+
* @param {弧度} rad
|
|
3352
|
+
*/
|
|
3353
|
+
radToAngle(e) {
|
|
3354
|
+
return e * 180 / Math.PI;
|
|
3355
|
+
},
|
|
3356
|
+
/**
|
|
3357
|
+
* 水平角度转顺时针角
|
|
3358
|
+
* @param {角度} angle
|
|
3359
|
+
*/
|
|
3360
|
+
toClockwiseAngle(e) {
|
|
3361
|
+
let t = 90 - e;
|
|
3362
|
+
return t < 0 && (t += 360), t;
|
|
3363
|
+
},
|
|
3364
|
+
/**
|
|
3365
|
+
* 求两点水平弧度
|
|
3366
|
+
* @param {L.Point} a 起点
|
|
3367
|
+
* @param {L.Point} b 终点
|
|
3368
|
+
*/
|
|
3369
|
+
computeRad(e, t) {
|
|
3370
|
+
return Math.atan2(t.y - e.y, t.x - e.x);
|
|
3371
|
+
},
|
|
3372
|
+
/**
|
|
3373
|
+
* 求两点水平角度
|
|
3374
|
+
* @param {L.Point} a 起点
|
|
3375
|
+
* @param {L.Point} b 终点
|
|
3376
|
+
*/
|
|
3377
|
+
computeAngle(e, t) {
|
|
3378
|
+
return this.radToAngle(this.computeRad(e, t));
|
|
3379
|
+
},
|
|
3380
|
+
/**
|
|
3381
|
+
* 获取线段夹角弧度
|
|
3382
|
+
* @param {L.Point} a 交点
|
|
3383
|
+
* @param {L.Point} b 终点一
|
|
3384
|
+
* @param {L.Point} c 终点二
|
|
3385
|
+
*/
|
|
3386
|
+
segmentsRad(e, t, n) {
|
|
3387
|
+
const r = t.x - e.x, s = t.y - e.y, o = n.x - e.x, i = n.y - e.y, a = r * o + s * i, l = r * i - s * o;
|
|
3388
|
+
return Math.atan2(l, a);
|
|
3389
|
+
},
|
|
3390
|
+
/**
|
|
3391
|
+
* 获取点到线段所在直线的垂足
|
|
3392
|
+
* @param {L.Point} a 点
|
|
3393
|
+
* @param {L.Point} m 线段起点
|
|
3394
|
+
* @param {L.Point} n 线段终点
|
|
3395
|
+
*/
|
|
3396
|
+
footPointOnLine(e, t, n) {
|
|
3397
|
+
const r = (t.x - n.x) * (t.x - n.x) + (t.y - n.y) * (t.y - n.y), o = ((e.x - t.x) * (n.x - t.x) + (e.y - t.y) * (n.y - t.y)) / r, i = t.x + o * (n.x - t.x), a = t.y + o * (n.y - t.y);
|
|
3398
|
+
return L.point(i, a);
|
|
3399
|
+
},
|
|
3400
|
+
/**
|
|
3401
|
+
* 两线段所在直线的交点坐标,平行或共线时不返回
|
|
3402
|
+
* @param {L.Point} a 线段一起点
|
|
3403
|
+
* @param {L.Point} b 线段一终点
|
|
3404
|
+
* @param {L.Point} c 线段二起点
|
|
3405
|
+
* @param {L.Point} d 线段二终点
|
|
3406
|
+
*/
|
|
3407
|
+
linesIntersection(e, t, n, r) {
|
|
3408
|
+
const s = (t.y - e.y) * (r.x - n.x) - (e.x - t.x) * (n.y - r.y);
|
|
3409
|
+
if (s) {
|
|
3410
|
+
const o = ((t.x - e.x) * (r.x - n.x) * (n.y - e.y) + (t.y - e.y) * (r.x - n.x) * e.x - (r.y - n.y) * (t.x - e.x) * n.x) / s, i = -((t.y - e.y) * (r.y - n.y) * (n.x - e.x) + (t.x - e.x) * (r.y - n.y) * e.y - (r.x - n.x) * (t.y - e.y) * n.y) / s;
|
|
3411
|
+
return L.point(o, i);
|
|
3412
|
+
}
|
|
3413
|
+
},
|
|
3414
|
+
/**
|
|
3415
|
+
* 根据经纬度计算累计距离,单位米
|
|
3416
|
+
* @param {Array<L.LatLng>} latLngs
|
|
3417
|
+
* @param {L.CRS} 坐标系,默认使用L.CRS.EPSG3857
|
|
3418
|
+
*/
|
|
3419
|
+
distanceByLatLngs(e, t = L.CRS.EPSG3857) {
|
|
3420
|
+
typeof t.distance != "function" && (t = L.CRS.EPSG3857);
|
|
3421
|
+
let n = 0;
|
|
3422
|
+
if (Array.isArray(e) && e.length > 1)
|
|
3423
|
+
for (let r = 0; r < e.length - 1; r++)
|
|
3424
|
+
n += t.distance(e[r], e[r + 1]);
|
|
3425
|
+
return n;
|
|
3426
|
+
},
|
|
3427
|
+
/**
|
|
3428
|
+
* 根据经纬度计算面积,单位平方米
|
|
3429
|
+
* @param {Array<L.LatLng>} latLngs
|
|
3430
|
+
*/
|
|
3431
|
+
areaByLatLngs(e) {
|
|
3432
|
+
let t = e.length, n = 0, r = Math.PI / 180, s, o;
|
|
3433
|
+
if (t > 2) {
|
|
3434
|
+
for (let i = 0; i < t; i++)
|
|
3435
|
+
s = e[i], o = e[(i + 1) % t], n += (o.lng - s.lng) * r * (2 + Math.sin(s.lat * r) + Math.sin(o.lat * r));
|
|
3436
|
+
n = n * 6378137 * 6378137 / 2;
|
|
3437
|
+
}
|
|
3438
|
+
return Math.abs(n);
|
|
3439
|
+
},
|
|
3440
|
+
/**
|
|
3441
|
+
* 根据坐标点计算面积
|
|
3442
|
+
* @param {Array<L.Point>} points
|
|
3443
|
+
*/
|
|
3444
|
+
areaByPoints(e) {
|
|
3445
|
+
let t = 0;
|
|
3446
|
+
if (Array.isArray(e) && e.length > 2) {
|
|
3447
|
+
let n = 0;
|
|
3448
|
+
for (let r = 0; r < e.length; r++)
|
|
3449
|
+
r + 1 == e.length ? n += e[r].x * e[0].y - e[0].x * e[r].y : n += e[r].x * e[r + 1].y - e[r + 1].x * e[r].y;
|
|
3450
|
+
t = 1 / 2 * Math.abs(n);
|
|
3451
|
+
}
|
|
3452
|
+
return t;
|
|
3453
|
+
},
|
|
3454
|
+
/**
|
|
3455
|
+
* 转换面积,增加单位
|
|
3456
|
+
* @param {number} area 面积数字,单位平方米
|
|
3457
|
+
*/
|
|
3458
|
+
readableArea(e) {
|
|
3459
|
+
let t = 0;
|
|
3460
|
+
return e > 1e3 * 1e3 ? t = (e / (1e3 * 1e3)).toFixed(2) + " km²" : t = Math.ceil(e) + " m²", t;
|
|
3461
|
+
},
|
|
3462
|
+
/**
|
|
3463
|
+
* 点是否在多边形内,射线法
|
|
3464
|
+
* @param {L.Point} point 给定点
|
|
3465
|
+
* @param {Array<L.Point>} points 多边形坐标
|
|
3466
|
+
* @returns {Boolean} 是否置于多边形内或边界上
|
|
3467
|
+
*/
|
|
3468
|
+
isPointInPoly(e, t) {
|
|
3469
|
+
const n = e.x, r = e.y;
|
|
3470
|
+
let s = !1, o = !1;
|
|
3471
|
+
const i = t.length;
|
|
3472
|
+
for (let a = 0, l = i - 1; a < i; l = a, a++) {
|
|
3473
|
+
const c = t[a].x, u = t[a].y, f = t[l].x, d = t[l].y;
|
|
3474
|
+
if ((c === n && u === r || f === n && d === r) && (o = !0), u < r && d >= r || u >= r && d < r) {
|
|
3475
|
+
const w = c + (r - u) * (f - c) / (d - u);
|
|
3476
|
+
o = w === n, w > n && (s = !s);
|
|
3477
|
+
}
|
|
3478
|
+
if (o)
|
|
3479
|
+
break;
|
|
3480
|
+
}
|
|
3481
|
+
return o || s;
|
|
3482
|
+
},
|
|
3483
|
+
/**
|
|
3484
|
+
* 点到面的距离,在内部视为0
|
|
3485
|
+
* @param {L.Point} point 给定点
|
|
3486
|
+
* @param {Array<L.Point>} points 多边形坐标
|
|
3487
|
+
* @param {L.CRS} crs 地图CRS
|
|
3488
|
+
* @returns {Boolean} 距离数值,若CRS可用,单位为米
|
|
3489
|
+
*/
|
|
3490
|
+
distanceToPoly(e, t, n) {
|
|
3491
|
+
let r = 0;
|
|
3492
|
+
if (!this.isPointInPoly(e, t)) {
|
|
3493
|
+
let s = [], o = [];
|
|
3494
|
+
const i = t.length;
|
|
3495
|
+
for (let c = 0, u = i - 1; c < i; u = c, c++)
|
|
3496
|
+
s.push(L.LineUtil.pointToSegmentDistance(e, t[c], t[u])), o.push(L.LineUtil.closestPointOnSegment(e, t[c], t[u]));
|
|
3497
|
+
r = _.min(s);
|
|
3498
|
+
const a = _.indexOf(s, r), l = o[a];
|
|
3499
|
+
if (n && n.unproject) {
|
|
3500
|
+
const c = n.unproject(e), u = n.unproject(l);
|
|
3501
|
+
r = n.distance(c, u);
|
|
3502
|
+
}
|
|
3503
|
+
}
|
|
3504
|
+
return r;
|
|
3505
|
+
},
|
|
3506
|
+
/**
|
|
3507
|
+
* 点到折线的距离
|
|
3508
|
+
* @param {L.Point} point 给定点
|
|
3509
|
+
* @param {Array<L.Point>} points 折线坐标
|
|
3510
|
+
* @param {L.CRS} crs 地图CRS
|
|
3511
|
+
* @param {Boolean} 距离数值,若CRS可用,单位为米
|
|
3512
|
+
*/
|
|
3513
|
+
distanceToLine(e, t, n) {
|
|
3514
|
+
let r = 0, s = [], o = [];
|
|
3515
|
+
if (Array.isArray(t) && t.length > 1) {
|
|
3516
|
+
for (let l = 0; l < t.length - 1; l++)
|
|
3517
|
+
s.push(L.LineUtil.pointToSegmentDistance(e, t[l], t[l + 1])), o.push(L.LineUtil.closestPointOnSegment(e, t[l], t[l + 1]));
|
|
3518
|
+
r = _.min(s);
|
|
3519
|
+
const i = _.indexOf(s, r), a = o[i];
|
|
3520
|
+
if (n && n.unproject) {
|
|
3521
|
+
const l = n.unproject(e), c = n.unproject(a);
|
|
3522
|
+
r = n.distance(l, c);
|
|
3523
|
+
}
|
|
3524
|
+
}
|
|
3525
|
+
return r;
|
|
3526
|
+
}
|
|
3527
|
+
};
|
|
3528
|
+
L.GeoUtil = L.extend(L.GeoUtil || {}, _.assign(Ea, Ta));
|
|
3529
|
+
L.FootageCalculator = L.FootageCalculator || {};
|
|
3530
|
+
L.FootageCalculator.Area = L.Evented.extend({
|
|
3531
|
+
options: {
|
|
3532
|
+
crs: L.CRS.EPSG3857,
|
|
3533
|
+
// 坐标转换类
|
|
3534
|
+
latlngs: [],
|
|
3535
|
+
// 边界经纬度
|
|
3536
|
+
headStart: null,
|
|
3537
|
+
// 机头经纬度
|
|
3538
|
+
headEnd: null,
|
|
3539
|
+
// 机头终点经纬度
|
|
3540
|
+
tailStart: null,
|
|
3541
|
+
// 机尾经纬度
|
|
3542
|
+
tailEnd: null
|
|
3543
|
+
/// 机尾终点经纬度
|
|
3544
|
+
},
|
|
3545
|
+
initialize(e) {
|
|
3546
|
+
L.setOptions(this, e);
|
|
3547
|
+
const { crs: t, latlngs: n, headStart: r, headEnd: s, tailStart: o, tailEnd: i } = this.options;
|
|
3548
|
+
if (t && t.project && t.unproject)
|
|
3549
|
+
this.crs = t;
|
|
3550
|
+
else
|
|
3551
|
+
throw new Error("请传入正确的crs参数");
|
|
3552
|
+
if (Array.isArray(n) && n.length > 2)
|
|
3553
|
+
this.latlngs = n;
|
|
3554
|
+
else
|
|
3555
|
+
throw new Error("请传入正确的latlngs参数");
|
|
3556
|
+
function a(c, u) {
|
|
3557
|
+
if (c < 0)
|
|
3558
|
+
throw new Error(`请传入正确的${u}参数,此参数必须是latlngs的某个节点`);
|
|
3559
|
+
}
|
|
3560
|
+
if (this.hsIndex = _.findIndex(n, (c) => _.isEqual(c, r)), a(this.hsIndex, "headStart"), this.heIndex = _.findIndex(n, (c) => _.isEqual(c, s)), a(this.heIndex, "headEnd"), this.tsIndex = _.findIndex(n, (c) => _.isEqual(c, o)), a(this.tsIndex, "tailStart"), this.teIndex = _.findIndex(n, (c) => _.isEqual(c, i)), a(this.teIndex, "tailEnd"), _.uniq([this.hsIndex, this.heIndex, this.tsIndex, this.teIndex]).length < 4)
|
|
3561
|
+
throw new Error("机头机尾坐标不允许重复");
|
|
3562
|
+
const l = Math.abs(this.hsIndex - this.tsIndex);
|
|
3563
|
+
if (l != 1 && l != n.length - 1)
|
|
3564
|
+
throw new Error("机头和机尾起点必须相邻");
|
|
3565
|
+
this.initParams();
|
|
3566
|
+
},
|
|
3567
|
+
// 初始化参数
|
|
3568
|
+
initParams() {
|
|
3569
|
+
this.points = this.latlngs.map((s) => this.crs.project(wt(s)));
|
|
3570
|
+
const e = this.latlngs.length;
|
|
3571
|
+
let t = [], n = [], r = this.hsIndex < this.tsIndex;
|
|
3572
|
+
if (Math.abs(this.hsIndex - this.tsIndex) == e - 1 && (r = this.tsIndex == 0), r) {
|
|
3573
|
+
let s = this.hsIndex;
|
|
3574
|
+
this.heIndex > this.hsIndex && (s += e);
|
|
3575
|
+
for (let i = this.heIndex; i <= s; i++)
|
|
3576
|
+
t.push(this.points[i >= e ? i - e : i]);
|
|
3577
|
+
t.reverse();
|
|
3578
|
+
let o = this.teIndex;
|
|
3579
|
+
this.tsIndex > this.teIndex && (o += e);
|
|
3580
|
+
for (let i = this.tsIndex; i <= o; i++)
|
|
3581
|
+
n.push(this.points[i >= e ? i - e : i]);
|
|
3582
|
+
} else {
|
|
3583
|
+
let s = this.heIndex;
|
|
3584
|
+
this.hsIndex > this.heIndex && (s += e);
|
|
3585
|
+
for (let i = this.hsIndex; i <= s; i++)
|
|
3586
|
+
t.push(this.points[i >= e ? i - e : i]);
|
|
3587
|
+
let o = this.tsIndex;
|
|
3588
|
+
this.teIndex > this.tsIndex && (o += e);
|
|
3589
|
+
for (let i = this.teIndex; i <= o; i++)
|
|
3590
|
+
n.push(this.points[i >= e ? i - e : i]);
|
|
3591
|
+
n.reverse();
|
|
3592
|
+
}
|
|
3593
|
+
this.headSegments = [], t.forEach((s, o) => {
|
|
3594
|
+
o > 0 && this.headSegments.push({ start: t[o - 1], end: s });
|
|
3595
|
+
}), this.tailSegments = [], n.forEach((s, o) => {
|
|
3596
|
+
o > 0 && this.tailSegments.push({ start: n[o - 1], end: s });
|
|
3597
|
+
});
|
|
3598
|
+
},
|
|
3599
|
+
/**
|
|
3600
|
+
* 执行计算
|
|
3601
|
+
* @param {L.LatLng} headStart 机头起点
|
|
3602
|
+
* @param {L.LatLng} tailStart 机尾起点
|
|
3603
|
+
* @param {Number} headDistance 机头推进距离
|
|
3604
|
+
* @param {Number} tailDistance 机尾推进距离
|
|
3605
|
+
* @returns {L.LatLng} headEnd 推进后机头的经纬度
|
|
3606
|
+
* @returns {L.LatLng} tailEnd 推进后机尾的经纬度
|
|
3607
|
+
* @returns {Array<L.LatLng>} latlngs 推进的区域范围
|
|
3608
|
+
*/
|
|
3609
|
+
doCalculate({ headStart: e, tailStart: t, headDistance: n, tailDistance: r }) {
|
|
3610
|
+
const s = this.crs.project(wt(e)), o = this.crs.project(wt(t)), i = this.calcWorkPath(s, this.headSegments, n), a = this.calcWorkPath(o, this.tailSegments, r), l = this.crs.unproject(_.last(i.path)), c = this.crs.unproject(_.last(a.path));
|
|
3611
|
+
let u = [], f = i.path, d = a.path;
|
|
3612
|
+
return d.reverse(), new Array(f, d).forEach((w) => {
|
|
3613
|
+
w.forEach((v) => {
|
|
3614
|
+
u.push(this.crs.unproject(v));
|
|
3615
|
+
});
|
|
3616
|
+
}), { headEnd: l, tailEnd: c, latlngs: u };
|
|
3617
|
+
},
|
|
3618
|
+
/**
|
|
3619
|
+
* 计算一次推进的结果
|
|
3620
|
+
* @param {L.Point} start 起点
|
|
3621
|
+
* @param {Array} segments 线段
|
|
3622
|
+
* @param {Number} distance 推进距离
|
|
3623
|
+
*/
|
|
3624
|
+
calcWorkPath(e, t, n) {
|
|
3625
|
+
let r = 0, s = -1, o = -1, i;
|
|
3626
|
+
t.forEach((d, w) => {
|
|
3627
|
+
if (o < 0) {
|
|
3628
|
+
let v = d.start;
|
|
3629
|
+
s < 0 && L.LineUtil.pointToSegmentDistance(e, d.start, d.end) < 0.01 && (s = w, v = e);
|
|
3630
|
+
let h = 0;
|
|
3631
|
+
s >= 0 && (h = v.distanceTo(d.end)), r + h >= n && (o = w, i = this.calcEndPointOnLine(v, d.end, n - r)), r += h;
|
|
3632
|
+
}
|
|
3633
|
+
});
|
|
3634
|
+
let a = o;
|
|
3635
|
+
o < 0 && (a = t.length - 1, i = _.last(t).end);
|
|
3636
|
+
let l = [e];
|
|
3637
|
+
for (let d = s; d < a; d++)
|
|
3638
|
+
l.push(t[d].end);
|
|
3639
|
+
if (l.push(i), l.length == 2 && l[0].x == l[1].x && l[0].y == l[1].y) {
|
|
3640
|
+
const d = _.last(t), w = L.GeoUtil.computeRad(d.start, d.end);
|
|
3641
|
+
l[0] = l[1].subtract(L.point(0.01 * Math.cos(w), 0.01 * Math.sin(w)));
|
|
3642
|
+
}
|
|
3643
|
+
let c = [];
|
|
3644
|
+
if (a == o) {
|
|
3645
|
+
c = [i];
|
|
3646
|
+
for (let d = a; d < t.length - 1; d++)
|
|
3647
|
+
c.push(t[d].end);
|
|
3648
|
+
c.push(_.last(t).end);
|
|
3649
|
+
}
|
|
3650
|
+
let u = t[o];
|
|
3651
|
+
o < 0 && (u = _.last(t));
|
|
3652
|
+
let f = L.GeoUtil.computeRad(u.start, u.end);
|
|
3653
|
+
return { path: l, remainingPath: c, endRad: f };
|
|
3654
|
+
},
|
|
3655
|
+
// 获取a点向b点方向延伸distance后的坐标
|
|
3656
|
+
calcEndPointOnLine(e, t, n) {
|
|
3657
|
+
const r = L.GeoUtil.computeRad(e, t), s = n * Math.cos(r), o = n * Math.sin(r);
|
|
3658
|
+
return e.add(L.point(s, o));
|
|
3659
|
+
}
|
|
3660
|
+
});
|
|
3661
|
+
function wt(e) {
|
|
3662
|
+
return e instanceof L.LatLng || (e = L.latLng(e)), e;
|
|
3663
|
+
}
|
|
3664
|
+
L.footageCalculator = L.footageCalculator || {};
|
|
3665
|
+
L.footageCalculator.area = function(e) {
|
|
3666
|
+
return new L.FootageCalculator.Area(e);
|
|
3667
|
+
};
|
|
3668
|
+
L.FootageCalculator = L.FootageCalculator || {};
|
|
3669
|
+
L.FootageCalculator.Line = L.Evented.extend({
|
|
3670
|
+
options: {
|
|
3671
|
+
crs: L.CRS.EPSG3857,
|
|
3672
|
+
// 坐标转换类
|
|
3673
|
+
latlngs: [],
|
|
3674
|
+
// 中心线
|
|
3675
|
+
width: 0
|
|
3676
|
+
// 巷道宽度
|
|
3677
|
+
},
|
|
3678
|
+
initialize(e) {
|
|
3679
|
+
L.setOptions(this, e);
|
|
3680
|
+
const t = this.options.crs;
|
|
3681
|
+
if (t && t.project && t.unproject)
|
|
3682
|
+
this.crs = t;
|
|
3683
|
+
else
|
|
3684
|
+
throw new Error("请传入正确的crs参数");
|
|
3685
|
+
const n = this.options.latlngs, r = this.options.width;
|
|
3686
|
+
if (Array.isArray(n) && n.length > 1 && r > 0)
|
|
3687
|
+
this.latlngs = n, this.width = r;
|
|
3688
|
+
else
|
|
3689
|
+
throw new Error("请传入正确的latlngs和width参数");
|
|
3690
|
+
this.initParams();
|
|
3691
|
+
},
|
|
3692
|
+
// 初始化参数
|
|
3693
|
+
initParams() {
|
|
3694
|
+
this.points = this.latlngs.map((e) => (e instanceof L.LatLng || (e = L.latLng(e)), this.crs.project(e))), this.segments = [], this.points.forEach((e, t) => {
|
|
3695
|
+
if (t > 0) {
|
|
3696
|
+
let n = 0;
|
|
3697
|
+
t > 1 && (n = this.calcOffsetDistance(
|
|
3698
|
+
this.points[t - 2],
|
|
3699
|
+
this.points[t - 1],
|
|
3700
|
+
this.points[t],
|
|
3701
|
+
this.width / 2
|
|
3702
|
+
)), this.segments.push({
|
|
3703
|
+
start: this.points[t - 1],
|
|
3704
|
+
end: e,
|
|
3705
|
+
offsetDistance: n
|
|
3706
|
+
});
|
|
3707
|
+
}
|
|
3708
|
+
});
|
|
3709
|
+
},
|
|
3710
|
+
/**
|
|
3711
|
+
* 执行计算
|
|
3712
|
+
* @param {L.LatLng} start 起点
|
|
3713
|
+
* @param {Number} distance 推进距离,米
|
|
3714
|
+
*/
|
|
3715
|
+
doCalculate({ start: e, distance: t }) {
|
|
3716
|
+
if (t > 0) {
|
|
3717
|
+
e instanceof L.LatLng || (e = L.latLng(e));
|
|
3718
|
+
const n = this.crs.project(e), { path: r, remainingPath: s, endRad: o } = this.calcWorkPath(n, this.segments, t), i = this.calcWorkArea({ path: r, width: this.width / 2 }), a = r.map((f) => this.crs.unproject(f)), l = i.map((f) => this.crs.unproject(f)), c = s.map((f) => this.crs.unproject(f)), u = L.GeoUtil.toClockwiseAngle(L.GeoUtil.radToAngle(o));
|
|
3719
|
+
return { path: a, remainingPath: c, area: l, endAngle: u };
|
|
3720
|
+
} else
|
|
3721
|
+
throw new Error("distance参数必须大于0");
|
|
3722
|
+
},
|
|
3723
|
+
/**
|
|
3724
|
+
* 计算一次推进的结果
|
|
3725
|
+
* @param {L.Point} start 起点
|
|
3726
|
+
* @param {Array} segments 线段
|
|
3727
|
+
* @param {Number} distance 推进距离
|
|
3728
|
+
*/
|
|
3729
|
+
calcWorkPath(e, t, n) {
|
|
3730
|
+
let r = 0, s = -1, o = -1, i;
|
|
3731
|
+
t.forEach((d, w) => {
|
|
3732
|
+
if (o < 0) {
|
|
3733
|
+
n += d.offsetDistance;
|
|
3734
|
+
let v = d.start;
|
|
3735
|
+
s < 0 && L.LineUtil.pointToSegmentDistance(e, d.start, d.end) < 0.01 && (s = w, v = e);
|
|
3736
|
+
let h = 0;
|
|
3737
|
+
s >= 0 && (h = v.distanceTo(d.end)), r + h >= n && (o = w, i = this.calcEndPointOnLine(v, d.end, n - r)), r += h;
|
|
3738
|
+
}
|
|
3739
|
+
});
|
|
3740
|
+
let a = o;
|
|
3741
|
+
o < 0 && (a = t.length - 1, i = _.last(t).end);
|
|
3742
|
+
let l = [e];
|
|
3743
|
+
for (let d = s; d < a; d++)
|
|
3744
|
+
l.push(t[d].end);
|
|
3745
|
+
if (l.push(i), l.length == 2 && l[0].x == l[1].x && l[0].y == l[1].y) {
|
|
3746
|
+
const d = _.last(t), w = L.GeoUtil.computeRad(d.start, d.end);
|
|
3747
|
+
l[0] = l[1].subtract(L.point(0.01 * Math.cos(w), 0.01 * Math.sin(w)));
|
|
3748
|
+
}
|
|
3749
|
+
let c = [];
|
|
3750
|
+
if (a == o) {
|
|
3751
|
+
c = [i];
|
|
3752
|
+
for (let d = a; d < t.length - 1; d++)
|
|
3753
|
+
c.push(t[d].end);
|
|
3754
|
+
c.push(_.last(t).end);
|
|
3755
|
+
}
|
|
3756
|
+
let u = t[o];
|
|
3757
|
+
o < 0 && (u = _.last(t));
|
|
3758
|
+
let f = L.GeoUtil.computeRad(u.start, u.end);
|
|
3759
|
+
return { path: l, remainingPath: c, endRad: f };
|
|
3760
|
+
},
|
|
3761
|
+
/**
|
|
3762
|
+
* 根据中心线路径和法线长度,计算推进范围
|
|
3763
|
+
* @param {Array<L.Point>} path 推进路径
|
|
3764
|
+
* @param {Number} width 法线长度
|
|
3765
|
+
*/
|
|
3766
|
+
calcWorkArea({ path: e, width: t }) {
|
|
3767
|
+
let n = [], r = [];
|
|
3768
|
+
return e.map((o, i) => {
|
|
3769
|
+
if (i == 0) {
|
|
3770
|
+
const a = L.GeoUtil.computeRad(e[i], e[i + 1]);
|
|
3771
|
+
return this.calcVerticalOffestPoints(o, a, t);
|
|
3772
|
+
} else if (i == e.length - 1) {
|
|
3773
|
+
const a = L.GeoUtil.computeRad(e[i - 1], e[i]);
|
|
3774
|
+
return this.calcVerticalOffestPoints(o, a, t);
|
|
3775
|
+
} else {
|
|
3776
|
+
const a = L.GeoUtil.computeRad(e[i - 1], e[i]), l = L.GeoUtil.computeRad(e[i], e[i + 1]), c = this.calcVerticalOffestPoints(e[i - 1], a, t), u = this.calcVerticalOffestPoints(e[i], a, t), f = this.calcVerticalOffestPoints(e[i], l, t), d = this.calcVerticalOffestPoints(e[i + 1], l, t), w = L.GeoUtil.linesIntersection(c[0], u[0], f[0], d[0]), v = L.GeoUtil.linesIntersection(c[1], u[1], f[1], d[1]);
|
|
3777
|
+
if (w && v)
|
|
3778
|
+
return [w, v];
|
|
3779
|
+
}
|
|
3780
|
+
}).forEach((o) => {
|
|
3781
|
+
o && (n.push(o[0]), r.push(o[1]));
|
|
3782
|
+
}), _.concat(n, _.reverse(r));
|
|
3783
|
+
},
|
|
3784
|
+
// 获取a点向b点方向延伸distance后的坐标
|
|
3785
|
+
calcEndPointOnLine(e, t, n) {
|
|
3786
|
+
const r = L.GeoUtil.computeRad(e, t), s = n * Math.cos(r), o = n * Math.sin(r);
|
|
3787
|
+
return e.add(L.point(s, o));
|
|
3788
|
+
},
|
|
3789
|
+
// 计算补足距离
|
|
3790
|
+
calcOffsetDistance(e, t, n, r) {
|
|
3791
|
+
const s = L.GeoUtil.segmentsRad(t, e, n, r), o = L.GeoUtil.computeRad(e, t), i = L.GeoUtil.computeRad(t, n), a = this.calcVerticalOffestPoints(e, o, r), l = this.calcVerticalOffestPoints(t, o, r), c = this.calcVerticalOffestPoints(t, i, r), u = this.calcVerticalOffestPoints(n, i, r);
|
|
3792
|
+
let f = null;
|
|
3793
|
+
return s > 0 ? f = L.GeoUtil.linesIntersection(a[1], l[1], c[1], u[1]) : f = L.GeoUtil.linesIntersection(a[0], l[0], c[0], u[0]), f ? L.GeoUtil.footPointOnLine(f, t, n).distanceTo(t) : 0;
|
|
3794
|
+
},
|
|
3795
|
+
// 获取目标点的在给定方向的法线上的两个偏移点
|
|
3796
|
+
calcVerticalOffestPoints(e, t, n) {
|
|
3797
|
+
const r = t - Math.PI / 2, s = L.point(n * Math.cos(r), n * Math.sin(r));
|
|
3798
|
+
return [e.add(s), e.subtract(s)];
|
|
3799
|
+
}
|
|
3800
|
+
});
|
|
3801
|
+
L.footageCalculator = L.footageCalculator || {};
|
|
3802
|
+
L.footageCalculator.line = function(e) {
|
|
3803
|
+
return new L.FootageCalculator(e);
|
|
3804
|
+
};
|
|
3805
|
+
L.Glyphicon = L.DivIcon.extend({
|
|
3806
|
+
options: {
|
|
3807
|
+
icon: "fas fa-leaf",
|
|
3808
|
+
size: 32,
|
|
3809
|
+
fontSize: null,
|
|
3810
|
+
background: "white",
|
|
3811
|
+
color: "#4d90fe",
|
|
3812
|
+
borderRadius: null,
|
|
3813
|
+
borderWidth: 2,
|
|
3814
|
+
borderColor: null,
|
|
3815
|
+
boxShadow: !0,
|
|
3816
|
+
additionalCSS: "",
|
|
3817
|
+
className: "",
|
|
3818
|
+
effect: {
|
|
3819
|
+
type: null,
|
|
3820
|
+
size: null,
|
|
3821
|
+
color: null,
|
|
3822
|
+
interval: null
|
|
3823
|
+
}
|
|
3824
|
+
},
|
|
3825
|
+
initialize(e = {}) {
|
|
3826
|
+
L.setOptions(this, e);
|
|
3827
|
+
let t = this.options, n = document.createElement("div");
|
|
3828
|
+
L.DomUtil.addClass(n, "vae-glyphicon");
|
|
3829
|
+
let r = [];
|
|
3830
|
+
r.push(`height:${t.size - t.borderWidth * 2}px`), r.push(`width:${t.size - t.borderWidth * 2}px`), r.push(`color:${t.color}`);
|
|
3831
|
+
let s = _.isNil(t.fontSize) ? t.size / 2 : t.fontSize;
|
|
3832
|
+
r.push(`font-size:${s}px`);
|
|
3833
|
+
let o = _.isNil(t.borderRadius) ? t.size : t.borderRadius;
|
|
3834
|
+
r.push(`border-radius:${o}px`), r.push(`border-width:${t.borderWidth}px`), r.push(`border-color:${t.borderColor || t.color}`), r.push("border-style:solid"), r.push(`background-color:${t.background}`), t.boxShadow && r.push("box-shadow:0 2px 6px 0 rgba(0, 0, 0, 0.2)"), r.push(t.additionalCSS);
|
|
3835
|
+
let i = document.createAttribute("style");
|
|
3836
|
+
i.value = r.join(";");
|
|
3837
|
+
let a = document.createElement("div");
|
|
3838
|
+
L.DomUtil.addClass(a, t.icon), n.setAttributeNode(i), n.appendChild(a);
|
|
3839
|
+
let l = t.effect;
|
|
3840
|
+
if (l && l.type) {
|
|
3841
|
+
let c = document.createElement("div"), u = l.type;
|
|
3842
|
+
if (u === "halo") {
|
|
3843
|
+
let f = document.createAttribute("style"), d = [];
|
|
3844
|
+
L.DomUtil.addClass(c, "halo");
|
|
3845
|
+
let w = l.size || t.size * 3;
|
|
3846
|
+
d.push(`height:${w}px`), d.push(`width:${w}px`);
|
|
3847
|
+
let v = l.color || t.color;
|
|
3848
|
+
d.push(`background-color:${v}`), d.push(`top:-${(w - t.size) / 2}px`), d.push(`left:-${(w - t.size) / 2}px`), d.push(`animation:vae-effect-${u} ${l.interval || 2}s 0s infinite ease-in`), f.value = d.join(";"), c.setAttributeNode(f);
|
|
3849
|
+
}
|
|
3850
|
+
n.appendChild(c);
|
|
3851
|
+
}
|
|
3852
|
+
L.DivIcon.prototype.initialize.call(this, {
|
|
3853
|
+
html: n.outerHTML,
|
|
3854
|
+
iconSize: [t.size, t.size],
|
|
3855
|
+
className: t.className
|
|
3856
|
+
});
|
|
3857
|
+
}
|
|
3858
|
+
});
|
|
3859
|
+
L.glyphicon = function(e) {
|
|
3860
|
+
return new L.Glyphicon(e);
|
|
3861
|
+
};
|
|
3862
|
+
function Oa(e) {
|
|
3863
|
+
let t = 1, n = 30, r = 6;
|
|
3864
|
+
const s = e.getChildCount();
|
|
3865
|
+
s > 0 && s <= 9 ? (t = 1, n = 30, r = 6) : s > 9 && s <= 49 ? (t = 2, n = 38, r = 8) : s > 49 && s <= 99 ? (t = 3, n = 46, r = 8) : s > 99 && s <= 499 ? (t = 4, n = 54, r = 10) : s > 499 && s < 999 ? (t = 5, n = 62, r = 10) : (t = 6, n = 70, r = 12);
|
|
3866
|
+
const o = `vae-markercluster--icon style--${this.iconStyle || "blue"} level--${t}`, i = n - r, a = `border-radius:${n / 2}px;`, l = `height:${i}px;width:${i}px;border-radius:${i / 2}px;`;
|
|
3867
|
+
return L.divIcon({
|
|
3868
|
+
html: `<div class="outer center" style="${a}"><div class="inner center" style="${l}">${s}</div></div>`,
|
|
3869
|
+
className: o,
|
|
3870
|
+
iconSize: [n, n]
|
|
3871
|
+
});
|
|
3872
|
+
}
|
|
3873
|
+
L.MarkerClusterGroupX = L.MarkerClusterGroup.extend({
|
|
3874
|
+
options: {
|
|
3875
|
+
iconStyle: "blue",
|
|
3876
|
+
showCoverageOnHover: !1,
|
|
3877
|
+
maxClusterRadius: 60,
|
|
3878
|
+
spiderLegPolylineOptions: {
|
|
3879
|
+
weight: 2,
|
|
3880
|
+
dashArray: [5, 5],
|
|
3881
|
+
interactive: !1,
|
|
3882
|
+
opacity: 0.8
|
|
3883
|
+
},
|
|
3884
|
+
iconCreateFunction: Oa
|
|
3885
|
+
},
|
|
3886
|
+
initialize(e = {}) {
|
|
3887
|
+
L.setOptions(this, e);
|
|
3888
|
+
const t = this.options.iconStyle || "blue";
|
|
3889
|
+
this.options.spiderLegPolylineOptions.color = t == "red" ? "hsl(354, 70%, 54%)" : t == "blue" ? "hsl(211, 100%, 45%)" : t == "green" ? "hsl(134, 61%, 41%)" : t == "gray" ? "#606266" : t == "yellow" ? "#f9c31f" : t == "orange" ? "#fd7e14" : t == "cyan" ? "#17a2b8" : t == "purple" ? "#5c11d4" : t == "pink" ? "#e83e8c" : t == "transparent" ? "rgba(0,0,0,0.6)" : null, L.MarkerClusterGroup.prototype.initialize.call(this, this.options);
|
|
3890
|
+
}
|
|
3891
|
+
});
|
|
3892
|
+
L.markerClusterGroupX = function(e) {
|
|
3893
|
+
return new L.MarkerClusterGroupX(e);
|
|
3894
|
+
};
|
|
3895
|
+
const Pa = {
|
|
3896
|
+
TianDiTu: {
|
|
3897
|
+
Normal: {
|
|
3898
|
+
Map: "https://t{s}.tianditu.gov.cn/DataServer?T=vec_w&X={x}&Y={y}&L={z}&tk={key}",
|
|
3899
|
+
Annotion: "https://t{s}.tianditu.gov.cn/DataServer?T=cva_w&X={x}&Y={y}&L={z}&tk={key}"
|
|
3900
|
+
},
|
|
3901
|
+
Satellite: {
|
|
3902
|
+
Map: "https://t{s}.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk={key}",
|
|
3903
|
+
Annotion: "https://t{s}.tianditu.gov.cn/DataServer?T=cia_w&X={x}&Y={y}&L={z}&tk={key}"
|
|
3904
|
+
},
|
|
3905
|
+
Terrain: {
|
|
3906
|
+
Map: "https://t{s}.tianditu.gov.cn/DataServer?T=ter_w&X={x}&Y={y}&L={z}&tk={key}",
|
|
3907
|
+
Annotion: "https://t{s}.tianditu.gov.cn/DataServer?T=cta_w&X={x}&Y={y}&L={z}&tk={key}"
|
|
3908
|
+
},
|
|
3909
|
+
Subdomains: ["0", "1", "2", "3", "4", "5", "6", "7"],
|
|
3910
|
+
key: "1a346e3ea95a3227a097cabf11a901b7"
|
|
3911
|
+
},
|
|
3912
|
+
GaoDe: {
|
|
3913
|
+
Normal: {
|
|
3914
|
+
Map: "https://webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}"
|
|
3915
|
+
},
|
|
3916
|
+
Satellite: {
|
|
3917
|
+
Map: "https://webst0{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",
|
|
3918
|
+
Annotion: "https://webst0{s}.is.autonavi.com/appmaptile?style=8&x={x}&y={y}&z={z}"
|
|
3919
|
+
},
|
|
3920
|
+
Subdomains: ["1", "2", "3", "4"]
|
|
3921
|
+
},
|
|
3922
|
+
GaoDe_Mobile: {
|
|
3923
|
+
Normal: {
|
|
3924
|
+
Map: "https://wprd0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=1&style=7"
|
|
3925
|
+
},
|
|
3926
|
+
Satellite: {
|
|
3927
|
+
Map: "https://wprd0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=1&style=6",
|
|
3928
|
+
Annotion: "https://wprd0{s}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=2&style=8"
|
|
3929
|
+
},
|
|
3930
|
+
Subdomains: ["1", "2", "3", "4"]
|
|
3931
|
+
},
|
|
3932
|
+
Google: {
|
|
3933
|
+
Normal: {
|
|
3934
|
+
Map: "https://www.google.cn/maps/vt?lyrs=m&gl=cn&x={x}&y={y}&z={z}"
|
|
3935
|
+
},
|
|
3936
|
+
Satellite: {
|
|
3937
|
+
Map: "https://www.google.cn/maps/vt?lyrs=s&gl=cn&x={x}&y={y}&z={z}",
|
|
3938
|
+
Annotion: "https://www.google.cn/maps/vt?lyrs=h&gl=cn&x={x}&y={y}&z={z}"
|
|
3939
|
+
},
|
|
3940
|
+
Subdomains: []
|
|
3941
|
+
},
|
|
3942
|
+
Geoq: {
|
|
3943
|
+
Normal: {
|
|
3944
|
+
Map: "https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer/tile/{z}/{y}/{x}",
|
|
3945
|
+
PurplishBlue: "https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}",
|
|
3946
|
+
Gray: "https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetGray/MapServer/tile/{z}/{y}/{x}",
|
|
3947
|
+
Warm: "https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetWarm/MapServer/tile/{z}/{y}/{x}"
|
|
3948
|
+
},
|
|
3949
|
+
Theme: {
|
|
3950
|
+
Hydro: "https://thematic.geoq.cn/arcgis/rest/services/ThematicMaps/WorldHydroMap/MapServer/tile/{z}/{y}/{x}",
|
|
3951
|
+
Division: "https://thematic.geoq.cn/arcgis/rest/services/ThematicMaps/administrative_division_boundaryandlabel/MapServer/tile/{z}/{y}/{x}"
|
|
3952
|
+
},
|
|
3953
|
+
Subdomains: []
|
|
3954
|
+
}
|
|
3955
|
+
};
|
|
3956
|
+
L.TileLayer.ChinaProvider = L.TileLayer.extend({
|
|
3957
|
+
initialize(e, t = {}) {
|
|
3958
|
+
var o;
|
|
3959
|
+
const [n, r] = e.split("@"), s = n.split(".");
|
|
3960
|
+
if (s[0] && s.length == 3) {
|
|
3961
|
+
const i = s[0], a = s[1], l = s[2], c = Pa[i];
|
|
3962
|
+
if (c) {
|
|
3963
|
+
const u = (o = c == null ? void 0 : c[a]) == null ? void 0 : o[l];
|
|
3964
|
+
if (u)
|
|
3965
|
+
if (c.hasOwnProperty("key") && !r)
|
|
3966
|
+
console.error(`provider '${i}' need a key`);
|
|
3967
|
+
else {
|
|
3968
|
+
const f = {
|
|
3969
|
+
maxZoom: 24,
|
|
3970
|
+
subdomains: c.Subdomains,
|
|
3971
|
+
key: r
|
|
3972
|
+
};
|
|
3973
|
+
L.TileLayer.prototype.initialize.call(this, u, L.extend(f, t));
|
|
3974
|
+
}
|
|
3975
|
+
else
|
|
3976
|
+
console.error(`provider not found '${e}'`);
|
|
3977
|
+
} else
|
|
3978
|
+
console.error(`provider not found '${e}'`);
|
|
3979
|
+
} else
|
|
3980
|
+
console.error(`provider not found '${e}'`);
|
|
3981
|
+
}
|
|
3982
|
+
});
|
|
3983
|
+
L.tileLayer.chinaProvider = function(e, t) {
|
|
3984
|
+
return new L.TileLayer.ChinaProvider(e, t);
|
|
3985
|
+
};
|
|
3986
|
+
L.VuePopup = L.Popup.extend({
|
|
3987
|
+
app: null,
|
|
3988
|
+
stopResize: null,
|
|
3989
|
+
options: {
|
|
3990
|
+
vueInstance: null,
|
|
3991
|
+
props: null
|
|
3992
|
+
},
|
|
3993
|
+
initialize(e) {
|
|
3994
|
+
L.setOptions(this, e), this._bindEvents(), L.Popup.prototype.initialize.call(this, _.omit(this.options, ["vueInstance", "props"]));
|
|
3995
|
+
},
|
|
3996
|
+
_bindEvents() {
|
|
3997
|
+
this.options.vueInstance && (this.on("add", () => {
|
|
3998
|
+
const e = () => {
|
|
3999
|
+
this._updateVuePopup();
|
|
4000
|
+
}, t = `vue-popup-${Ke()}`;
|
|
4001
|
+
this.setContent(`<div id="${t}"></div>`), queueMicrotask(() => {
|
|
4002
|
+
const n = document.getElementById(t);
|
|
4003
|
+
n && (this.app = gn(this.options.vueInstance, this.options.props ?? {}), this.app.mount(n), this.stopResize = Rt(n, e));
|
|
4004
|
+
});
|
|
4005
|
+
}), this.on("remove", () => {
|
|
4006
|
+
var e, t;
|
|
4007
|
+
(e = this.stopResize) == null || e.call(this), this.stopResize = null, (t = this.app) == null || t.unmount(), this.app = null;
|
|
4008
|
+
}));
|
|
4009
|
+
},
|
|
4010
|
+
_updateVuePopup() {
|
|
4011
|
+
!this._map || !this._latlng || !this._container || (this._container.style.visibility = "hidden", this._updateLayout(), this._updatePosition(), this._container.style.visibility = "", this._adjustPan());
|
|
4012
|
+
}
|
|
4013
|
+
});
|
|
4014
|
+
L.vuePopup = function(e) {
|
|
4015
|
+
return new L.VuePopup(e);
|
|
4016
|
+
};
|
|
4017
|
+
L.VueTooltip = L.Tooltip.extend({
|
|
4018
|
+
app: null,
|
|
4019
|
+
stopResize: null,
|
|
4020
|
+
options: {
|
|
4021
|
+
vueInstance: null,
|
|
4022
|
+
props: null
|
|
4023
|
+
},
|
|
4024
|
+
initialize(e) {
|
|
4025
|
+
L.setOptions(this, e), this._bindEvents(), L.Tooltip.prototype.initialize.call(this, _.omit(this.options, ["vueInstance", "props"]));
|
|
4026
|
+
},
|
|
4027
|
+
_bindEvents() {
|
|
4028
|
+
this.options.vueInstance && (this.on("add", () => {
|
|
4029
|
+
const e = () => {
|
|
4030
|
+
this._updateVueTooltip();
|
|
4031
|
+
}, t = `vue-tooltip-${Ke()}`;
|
|
4032
|
+
this.setContent(`<div id="${t}"></div>`), queueMicrotask(() => {
|
|
4033
|
+
const n = document.getElementById(t);
|
|
4034
|
+
n && (this.app = gn(this.options.vueInstance, this.options.props ?? {}), this.app.mount(n), this.stopResize = Rt(n, e));
|
|
4035
|
+
});
|
|
4036
|
+
}), this.on("remove", () => {
|
|
4037
|
+
var e, t;
|
|
4038
|
+
(e = this.stopResize) == null || e.call(this), this.stopResize = null, (t = this.app) == null || t.unmount(), this.app = null;
|
|
4039
|
+
}));
|
|
4040
|
+
},
|
|
4041
|
+
_updateVueTooltip() {
|
|
4042
|
+
!this._map || !this._latlng || !this._container || this._updatePosition();
|
|
4043
|
+
}
|
|
4044
|
+
});
|
|
4045
|
+
L.vueTooltip = function(e) {
|
|
4046
|
+
return new L.VueTooltip(e);
|
|
4047
|
+
};
|
|
4048
|
+
const $t = "_safeDivOverlayPatched";
|
|
4049
|
+
function za(e) {
|
|
4050
|
+
return !!(e && e._map && e._latlng && e._container);
|
|
4051
|
+
}
|
|
4052
|
+
function tt(e, t) {
|
|
4053
|
+
var s;
|
|
4054
|
+
if (!((s = e == null ? void 0 : e.prototype) != null && s[t]))
|
|
4055
|
+
return;
|
|
4056
|
+
const n = `${$t}_${t}`;
|
|
4057
|
+
if (e.prototype[n])
|
|
4058
|
+
return;
|
|
4059
|
+
const r = e.prototype[t];
|
|
4060
|
+
e.include({
|
|
4061
|
+
[n]: !0,
|
|
4062
|
+
[t](...o) {
|
|
4063
|
+
if (za(this))
|
|
4064
|
+
return r.apply(this, o);
|
|
4065
|
+
}
|
|
4066
|
+
});
|
|
4067
|
+
}
|
|
4068
|
+
function nr(e) {
|
|
4069
|
+
!e || e[$t] || (tt(e.Tooltip, "_animateZoom"), tt(e.Tooltip, "_updatePosition"), tt(e.Popup, "_animateZoom"), tt(e.Popup, "_updatePosition"), e[$t] = !0);
|
|
4070
|
+
}
|
|
4071
|
+
nr(vn);
|
|
4072
|
+
typeof window < "u" && window.L && window.L !== vn && nr(window.L);
|
|
4073
|
+
const Ia = () => {
|
|
4074
|
+
delete L.Icon.Default.prototype._getIconUrl, L.Icon.Default.mergeOptions({
|
|
4075
|
+
iconRetinaUrl: _a,
|
|
4076
|
+
iconUrl: wa,
|
|
4077
|
+
shadowUrl: ba
|
|
4078
|
+
});
|
|
4079
|
+
}, $a = (e, t = {}) => {
|
|
4080
|
+
e.component(`${t.prefix || "vae"}-cloudmap`, ya), Ia();
|
|
4081
|
+
}, hl = { install: $a };
|
|
4082
|
+
export {
|
|
4083
|
+
ya as VaeCloudmap,
|
|
4084
|
+
hl as default
|
|
4085
|
+
};
|