@heycar/heycars-map 0.3.17 → 0.3.18
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/CHANGELOG.md +6 -0
- package/dist/hooks/useMapRecomendPlace.d.ts +1 -0
- package/dist/hooks-business/useBusinessRecomendPlaceMap.d.ts +4 -1
- package/dist/index.cjs +19 -19
- package/dist/index.js +213 -194
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import kn, { defineComponent as St, h as M, computed as h, inject as We, provide as Ue, watch as
|
|
1
|
+
import kn, { defineComponent as St, h as M, computed as h, inject as We, provide as Ue, watch as E, watchPostEffect as H, shallowRef as R, onMounted as Ne, onUnmounted as Se, reactive as T, toRefs as ht, ref as w, toRef as Wn, watchEffect as Re } from "vue";
|
|
2
2
|
kn.util.warn;
|
|
3
3
|
const Be = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjYiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSItMzkuNzE5JSIgeTE9IjUwJSIgeDI9IjEyNi4wOTMlIiB5Mj0iNTAlIiBpZD0icHJlZml4X19hIj48c3RvcCBzdG9wLWNvbG9yPSIjNzlBRkZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzVDOERGRiIgb2Zmc2V0PSIzMi4zNDIlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzUwN0ZGRiIgb2Zmc2V0PSI3NC44NTMlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzQ0NzFGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTEuNSAyNGgzdjE0LjVhMS41IDEuNSAwIDAxLTMgMFYyNHoiIGZpbGw9IiM0QzgwRkYiLz48Zz48Y2lyY2xlIGZpbGw9InVybCgjcHJlZml4X19hKSIgY3g9IjEzIiBjeT0iMTMiIHI9IjEzIi8+PGNpcmNsZSBmaWxsPSIjRkZGIiBjeD0iMTMiIGN5PSIxMyIgcj0iNCIvPjwvZz48L2c+PC9zdmc+", Ve = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNiIgaGVpZ2h0PSIxMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMSAxbDQgNC00IDQiIHN0cm9rZT0iI0ZGRiIgc3Ryb2tlLXdpZHRoPSIyIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIG9wYWNpdHk9Ii44Ii8+PC9zdmc+";
|
|
4
4
|
var Un = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}, Bn = typeof global == "object" && global && global.Object === Object && global;
|
|
@@ -335,19 +335,19 @@ function li(e, t, n) {
|
|
|
335
335
|
throw new TypeError(si);
|
|
336
336
|
t = nt(t) || 0, Ze(n) && (d = !!n.leading, u = "maxWait" in n, o = u ? ci(nt(n.maxWait) || 0, t) : o, l = "trailing" in n ? !!n.trailing : l);
|
|
337
337
|
function I(D) {
|
|
338
|
-
var
|
|
339
|
-
return a = i = void 0, g = D, r = e.apply(
|
|
338
|
+
var P = a, b = i;
|
|
339
|
+
return a = i = void 0, g = D, r = e.apply(b, P), r;
|
|
340
340
|
}
|
|
341
341
|
function m(D) {
|
|
342
342
|
return g = D, s = setTimeout(y, t), d ? I(D) : r;
|
|
343
343
|
}
|
|
344
344
|
function f(D) {
|
|
345
|
-
var
|
|
346
|
-
return u ? ui(U, o -
|
|
345
|
+
var P = D - c, b = D - g, U = t - P;
|
|
346
|
+
return u ? ui(U, o - b) : U;
|
|
347
347
|
}
|
|
348
348
|
function v(D) {
|
|
349
|
-
var
|
|
350
|
-
return c === void 0 ||
|
|
349
|
+
var P = D - c, b = D - g;
|
|
350
|
+
return c === void 0 || P >= t || P < 0 || u && b >= o;
|
|
351
351
|
}
|
|
352
352
|
function y() {
|
|
353
353
|
var D = ze();
|
|
@@ -358,15 +358,15 @@ function li(e, t, n) {
|
|
|
358
358
|
function p(D) {
|
|
359
359
|
return s = void 0, l && a ? I(D) : (a = i = void 0, r);
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function N() {
|
|
362
362
|
s !== void 0 && clearTimeout(s), g = 0, a = c = i = s = void 0;
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function L() {
|
|
365
365
|
return s === void 0 ? r : p(ze());
|
|
366
366
|
}
|
|
367
|
-
function
|
|
368
|
-
var D = ze(),
|
|
369
|
-
if (a = arguments, i = this, c = D,
|
|
367
|
+
function x() {
|
|
368
|
+
var D = ze(), P = v(D);
|
|
369
|
+
if (a = arguments, i = this, c = D, P) {
|
|
370
370
|
if (s === void 0)
|
|
371
371
|
return m(c);
|
|
372
372
|
if (u)
|
|
@@ -374,7 +374,7 @@ function li(e, t, n) {
|
|
|
374
374
|
}
|
|
375
375
|
return s === void 0 && (s = setTimeout(y, t)), r;
|
|
376
376
|
}
|
|
377
|
-
return
|
|
377
|
+
return x.cancel = N, x.flush = L, x;
|
|
378
378
|
}
|
|
379
379
|
var di = oi(function(e, t, n) {
|
|
380
380
|
return e + (n ? "-" : "") + t.toLowerCase();
|
|
@@ -478,7 +478,7 @@ const yi = j((e) => {
|
|
|
478
478
|
return e === "gmap" ? le() : ue();
|
|
479
479
|
}, Q = (e) => {
|
|
480
480
|
const t = Ft();
|
|
481
|
-
|
|
481
|
+
E(
|
|
482
482
|
() => t.value,
|
|
483
483
|
(n) => {
|
|
484
484
|
n && Promise.resolve().then(e);
|
|
@@ -489,7 +489,7 @@ const yi = j((e) => {
|
|
|
489
489
|
);
|
|
490
490
|
}, Xt = (e) => {
|
|
491
491
|
const { registerOverlay: t, overlayRef: n } = e;
|
|
492
|
-
|
|
492
|
+
E(
|
|
493
493
|
() => n.value,
|
|
494
494
|
(a, i) => {
|
|
495
495
|
t && (i && t.remove(i), a && t.add(a));
|
|
@@ -648,7 +648,7 @@ de(function() {
|
|
|
648
648
|
});
|
|
649
649
|
de($t());
|
|
650
650
|
de($t(me));
|
|
651
|
-
const
|
|
651
|
+
const z = ([e, t]) => ({
|
|
652
652
|
lng: e,
|
|
653
653
|
lat: t
|
|
654
654
|
}), he = (e) => {
|
|
@@ -663,7 +663,7 @@ const T = ([e, t]) => ({
|
|
|
663
663
|
case "zh":
|
|
664
664
|
return "style_zh_cn";
|
|
665
665
|
}
|
|
666
|
-
},
|
|
666
|
+
}, C = (e) => [e.lng, e.lat], fe = (e) => (...t) => {
|
|
667
667
|
Promise.resolve().then(() => e == null ? void 0 : e(...t));
|
|
668
668
|
}, mt = (e) => {
|
|
669
669
|
const { address_components: t } = e, n = t.find(
|
|
@@ -683,7 +683,7 @@ function Ye() {
|
|
|
683
683
|
}
|
|
684
684
|
function ge(e, t, n) {
|
|
685
685
|
const a = Ye();
|
|
686
|
-
return
|
|
686
|
+
return E(() => a(e()), t, {
|
|
687
687
|
immediate: !1,
|
|
688
688
|
flush: "post",
|
|
689
689
|
...n
|
|
@@ -691,7 +691,7 @@ function ge(e, t, n) {
|
|
|
691
691
|
}
|
|
692
692
|
function ee(e, t, n) {
|
|
693
693
|
const a = Ye();
|
|
694
|
-
return
|
|
694
|
+
return E(() => a(e()), t, {
|
|
695
695
|
immediate: !0,
|
|
696
696
|
flush: "post",
|
|
697
697
|
...n
|
|
@@ -699,7 +699,7 @@ function ee(e, t, n) {
|
|
|
699
699
|
}
|
|
700
700
|
function Oi(e, t, n) {
|
|
701
701
|
const a = Ye();
|
|
702
|
-
return
|
|
702
|
+
return E(() => a(e()), t, {
|
|
703
703
|
immediate: !0,
|
|
704
704
|
...n
|
|
705
705
|
});
|
|
@@ -711,7 +711,7 @@ function ki(e, t, n, a) {
|
|
|
711
711
|
const i = n.map(
|
|
712
712
|
({ name: o }) => () => t[o]
|
|
713
713
|
);
|
|
714
|
-
|
|
714
|
+
E(
|
|
715
715
|
i,
|
|
716
716
|
(o, r) => {
|
|
717
717
|
const s = e.value;
|
|
@@ -767,7 +767,7 @@ function K(e, t, n, a) {
|
|
|
767
767
|
});
|
|
768
768
|
}
|
|
769
769
|
const V = j((e, { emit: t }) => {
|
|
770
|
-
const { registerOverlay: n } = e, a =
|
|
770
|
+
const { registerOverlay: n } = e, a = R(), i = ue();
|
|
771
771
|
return Ne(() => {
|
|
772
772
|
a.value = new AMap.Marker({ ...e });
|
|
773
773
|
}), Se(() => {
|
|
@@ -794,7 +794,7 @@ const V = j((e, { emit: t }) => {
|
|
|
794
794
|
]), se(a, e, t, ["onClick"]), () => null;
|
|
795
795
|
}), Y = j(
|
|
796
796
|
(e, { emit: t }) => {
|
|
797
|
-
const { registerOverlay: n } = e, a =
|
|
797
|
+
const { registerOverlay: n } = e, a = R(), i = le(), o = (r) => t(r, { target: a.value });
|
|
798
798
|
return Xt({ registerOverlay: n, overlayRef: a }), Ne(() => {
|
|
799
799
|
const { registerOverlay: r, ...s } = e;
|
|
800
800
|
a.value = new google.maps.marker.AdvancedMarkerView({ ...s }), a.value.addListener;
|
|
@@ -811,7 +811,7 @@ const V = j((e, { emit: t }) => {
|
|
|
811
811
|
(r) => {
|
|
812
812
|
a.value && Object.assign(a.value, r);
|
|
813
813
|
}
|
|
814
|
-
),
|
|
814
|
+
), E(
|
|
815
815
|
() => e.content,
|
|
816
816
|
(r) => {
|
|
817
817
|
a.value && (a.value.content = r);
|
|
@@ -821,7 +821,7 @@ const V = j((e, { emit: t }) => {
|
|
|
821
821
|
}
|
|
822
822
|
), K(a, e, o, ["onClick"]), () => null;
|
|
823
823
|
}
|
|
824
|
-
),
|
|
824
|
+
), Z = (e, t, n) => {
|
|
825
825
|
const { class: a, ...i } = t != null ? t : {}, o = document.createElement(e);
|
|
826
826
|
return a && (o.className = a), Object.assign(o, i), n && (o.innerHTML = n), o;
|
|
827
827
|
};
|
|
@@ -838,13 +838,13 @@ const nn = j((e) => {
|
|
|
838
838
|
}
|
|
839
839
|
});
|
|
840
840
|
}), an = j((e) => {
|
|
841
|
-
const t = h(() =>
|
|
841
|
+
const t = h(() => Z("img", {
|
|
842
842
|
class: tn,
|
|
843
843
|
src: Be
|
|
844
844
|
}));
|
|
845
845
|
return () => M(Y, {
|
|
846
846
|
attrs: {
|
|
847
|
-
position:
|
|
847
|
+
position: z(e.position),
|
|
848
848
|
content: t.value
|
|
849
849
|
}
|
|
850
850
|
});
|
|
@@ -887,7 +887,7 @@ const Wi = j((e) => {
|
|
|
887
887
|
}), Ui = j((e) => {
|
|
888
888
|
const t = h(() => {
|
|
889
889
|
var n;
|
|
890
|
-
return
|
|
890
|
+
return Z("div", {
|
|
891
891
|
class: rn
|
|
892
892
|
}, `
|
|
893
893
|
<div class="${on}">
|
|
@@ -907,7 +907,7 @@ const Wi = j((e) => {
|
|
|
907
907
|
}
|
|
908
908
|
}) : M(Y, {
|
|
909
909
|
attrs: {
|
|
910
|
-
position:
|
|
910
|
+
position: z(e.position),
|
|
911
911
|
content: t.value
|
|
912
912
|
}
|
|
913
913
|
});
|
|
@@ -949,9 +949,9 @@ var Oe = {}, Bi = {
|
|
|
949
949
|
}, y.onload = function() {
|
|
950
950
|
if (s.AMapUI = o.loaded, m.length)
|
|
951
951
|
window.AMapUI.loadUI(m, function() {
|
|
952
|
-
for (var p = 0,
|
|
953
|
-
var
|
|
954
|
-
window.AMapUI[
|
|
952
|
+
for (var p = 0, N = m.length; p < N; p++) {
|
|
953
|
+
var L = m[p].split("/").slice(-1)[0];
|
|
954
|
+
window.AMapUI[L] = arguments[p];
|
|
955
955
|
}
|
|
956
956
|
for (l(); c.AMapUI.length; )
|
|
957
957
|
c.AMapUI.splice(0, 1)[0]();
|
|
@@ -962,16 +962,16 @@ var Oe = {}, Bi = {
|
|
|
962
962
|
}, v.appendChild(y);
|
|
963
963
|
} else
|
|
964
964
|
s.AMapUI === o.loaded ? u.version && u.version !== r.AMapUI.version ? I("不允许多个版本 AMapUI 混用") : m.length ? window.AMapUI.loadUI(m, function() {
|
|
965
|
-
for (var p = 0,
|
|
966
|
-
var
|
|
967
|
-
window.AMapUI[
|
|
965
|
+
for (var p = 0, N = m.length; p < N; p++) {
|
|
966
|
+
var L = m[p].split("/").slice(-1)[0];
|
|
967
|
+
window.AMapUI[L] = arguments[p];
|
|
968
968
|
}
|
|
969
969
|
l();
|
|
970
970
|
}) : l() : u.version && u.version !== r.AMapUI.version ? I("不允许多个版本 AMapUI 混用") : c.AMapUI.push(function(p) {
|
|
971
971
|
p ? I(p) : m.length ? window.AMapUI.loadUI(m, function() {
|
|
972
|
-
for (var
|
|
973
|
-
var
|
|
974
|
-
window.AMapUI[
|
|
972
|
+
for (var N = 0, L = m.length; N < L; N++) {
|
|
973
|
+
var x = m[N].split("/").slice(-1)[0];
|
|
974
|
+
window.AMapUI[x] = arguments[N];
|
|
975
975
|
}
|
|
976
976
|
l();
|
|
977
977
|
}) : l();
|
|
@@ -1254,7 +1254,7 @@ const Qi = (e) => {
|
|
|
1254
1254
|
let n, a;
|
|
1255
1255
|
const i = new Promise((s, c) => {
|
|
1256
1256
|
n = s, a = c;
|
|
1257
|
-
}), o =
|
|
1257
|
+
}), o = R(
|
|
1258
1258
|
"LOADING"
|
|
1259
1259
|
/* LOADING */
|
|
1260
1260
|
), r = h(() => {
|
|
@@ -1289,7 +1289,7 @@ const Qi = (e) => {
|
|
|
1289
1289
|
let n, a;
|
|
1290
1290
|
const i = new Promise((s, c) => {
|
|
1291
1291
|
n = s, a = c;
|
|
1292
|
-
}), o =
|
|
1292
|
+
}), o = R(
|
|
1293
1293
|
"LOADING"
|
|
1294
1294
|
/* LOADING */
|
|
1295
1295
|
), r = h(() => {
|
|
@@ -1350,7 +1350,7 @@ const $i = j((e, { slots: t, emit: n }) => {
|
|
|
1350
1350
|
rotateEnable: !!e.rotateEnable,
|
|
1351
1351
|
animateEnable: !!e.animateEnable,
|
|
1352
1352
|
keyboardEnable: !!e.keyboardEnable
|
|
1353
|
-
})), d =
|
|
1353
|
+
})), d = R(), u = R();
|
|
1354
1354
|
return Ai(u), H(() => {
|
|
1355
1355
|
if (u.value || !d.value)
|
|
1356
1356
|
return;
|
|
@@ -1400,7 +1400,7 @@ const qi = j((e, { slots: t, emit: n }) => {
|
|
|
1400
1400
|
const a = e.mapRef, i = h(() => {
|
|
1401
1401
|
const { mapRef: d, onDragStart: u, onDragEnd: l, onZoomEnd: I, ...m } = e;
|
|
1402
1402
|
return m;
|
|
1403
|
-
}), o = i.value, r =
|
|
1403
|
+
}), o = i.value, r = R(), s = R(), { executeMapApi: c } = gn(), g = (d) => n(d, { target: s.value });
|
|
1404
1404
|
return Ni(s), H(() => {
|
|
1405
1405
|
if (s.value || !r.value)
|
|
1406
1406
|
return;
|
|
@@ -1488,7 +1488,7 @@ const qi = j((e, { slots: t, emit: n }) => {
|
|
|
1488
1488
|
attrs: {
|
|
1489
1489
|
mapRef: l,
|
|
1490
1490
|
mapId: g,
|
|
1491
|
-
center: I ?
|
|
1491
|
+
center: I ? z(I) : void 0,
|
|
1492
1492
|
zoom: m
|
|
1493
1493
|
},
|
|
1494
1494
|
on: {
|
|
@@ -1512,7 +1512,7 @@ const qi = j((e, { slots: t, emit: n }) => {
|
|
|
1512
1512
|
}
|
|
1513
1513
|
};
|
|
1514
1514
|
}).props(["center", "fallback", "loading", "mapRef", "zoom"]), oe = j((e) => {
|
|
1515
|
-
const t =
|
|
1515
|
+
const t = R(), n = ue();
|
|
1516
1516
|
return Ne(() => {
|
|
1517
1517
|
t.value = new AMap.Polyline({ ...e });
|
|
1518
1518
|
}), Se(() => {
|
|
@@ -1537,7 +1537,7 @@ const qi = j((e, { slots: t, emit: n }) => {
|
|
|
1537
1537
|
}
|
|
1538
1538
|
), () => null;
|
|
1539
1539
|
}), Me = j((e) => {
|
|
1540
|
-
const t =
|
|
1540
|
+
const t = R(), n = le();
|
|
1541
1541
|
return Ne(() => {
|
|
1542
1542
|
t.value = new google.maps.Polyline({ ...e });
|
|
1543
1543
|
}), Se(() => {
|
|
@@ -1597,7 +1597,7 @@ const qi = j((e, { slots: t, emit: n }) => {
|
|
|
1597
1597
|
}
|
|
1598
1598
|
})]);
|
|
1599
1599
|
}), to = j((e) => {
|
|
1600
|
-
const t = h(() => e.path.map(
|
|
1600
|
+
const t = h(() => e.path.map(z));
|
|
1601
1601
|
return () => {
|
|
1602
1602
|
const n = window.innerWidth * 0.01, a = 10 * n, i = 2.5 * n, o = 0.35 * n, r = 0.75 * n, s = 1 * n, c = e.done ? "#96B2CA" : "#487BF4", g = e.done ? "#7693AF" : "#4175F1", d = e.done ? "#7693AF" : "#6C95F5";
|
|
1603
1603
|
return M("div", [M(Me, {
|
|
@@ -1646,7 +1646,7 @@ const qi = j((e, { slots: t, emit: n }) => {
|
|
|
1646
1646
|
attrs: e
|
|
1647
1647
|
}) : null;
|
|
1648
1648
|
}), In = (e) => {
|
|
1649
|
-
const t =
|
|
1649
|
+
const t = T({ path: [], distance: 0, duration: 0 }), n = new AMap.Driving({});
|
|
1650
1650
|
return ee(
|
|
1651
1651
|
() => ({ ...e }),
|
|
1652
1652
|
({ from: a, to: i }) => {
|
|
@@ -1677,7 +1677,7 @@ const qi = j((e, { slots: t, emit: n }) => {
|
|
|
1677
1677
|
}
|
|
1678
1678
|
), t;
|
|
1679
1679
|
}, Mn = (e) => {
|
|
1680
|
-
const t =
|
|
1680
|
+
const t = T({ path: [], distance: 0, duration: 0 }), n = new google.maps.DirectionsService();
|
|
1681
1681
|
return ee(
|
|
1682
1682
|
() => ({ ...e }),
|
|
1683
1683
|
({ from: a, to: i }) => {
|
|
@@ -1728,7 +1728,7 @@ const qi = j((e, { slots: t, emit: n }) => {
|
|
|
1728
1728
|
}), fn = (e) => h(() => {
|
|
1729
1729
|
const { path: t } = e, [n, a] = t;
|
|
1730
1730
|
if (!(!n || !a))
|
|
1731
|
-
return google.maps.geometry.spherical.computeHeading(
|
|
1731
|
+
return google.maps.geometry.spherical.computeHeading(z(n), z(a));
|
|
1732
1732
|
}), mr = (e) => {
|
|
1733
1733
|
const { supplier: t } = S();
|
|
1734
1734
|
return t === "gmap" ? fn(e) : mn(e);
|
|
@@ -1739,13 +1739,13 @@ const qi = j((e, { slots: t, emit: n }) => {
|
|
|
1739
1739
|
path: a,
|
|
1740
1740
|
distance: i,
|
|
1741
1741
|
duration: o
|
|
1742
|
-
} = ht(In(e)), r = mn(
|
|
1742
|
+
} = ht(In(e)), r = mn(T({
|
|
1743
1743
|
path: a,
|
|
1744
1744
|
map: n
|
|
1745
1745
|
}));
|
|
1746
1746
|
return () => {
|
|
1747
1747
|
var s;
|
|
1748
|
-
return M("div", [(s = t.render) == null ? void 0 : s.call(t,
|
|
1748
|
+
return M("div", [(s = t.render) == null ? void 0 : s.call(t, T({
|
|
1749
1749
|
path: a,
|
|
1750
1750
|
angle: r,
|
|
1751
1751
|
distance: i,
|
|
@@ -1759,13 +1759,13 @@ const qi = j((e, { slots: t, emit: n }) => {
|
|
|
1759
1759
|
path: a,
|
|
1760
1760
|
distance: i,
|
|
1761
1761
|
duration: o
|
|
1762
|
-
} = ht(Mn(e)), r = fn(
|
|
1762
|
+
} = ht(Mn(e)), r = fn(T({
|
|
1763
1763
|
path: a,
|
|
1764
1764
|
map: n
|
|
1765
1765
|
}));
|
|
1766
1766
|
return () => {
|
|
1767
1767
|
var s;
|
|
1768
|
-
return M("div", [(s = t.render) == null ? void 0 : s.call(t,
|
|
1768
|
+
return M("div", [(s = t.render) == null ? void 0 : s.call(t, T({
|
|
1769
1769
|
path: a,
|
|
1770
1770
|
angle: r,
|
|
1771
1771
|
distance: i,
|
|
@@ -1978,12 +1978,12 @@ const Io = j((e) => {
|
|
|
1978
1978
|
const t = h(() => {
|
|
1979
1979
|
var i;
|
|
1980
1980
|
const n = e.type === "start" ? vn : pn, a = e.description ? he(e.description).map((o) => o.type === "normal" ? o.value : `<span class="${Ln}">${o.value}</span>`).join("") : "";
|
|
1981
|
-
return !e.description && !e.title ?
|
|
1981
|
+
return !e.description && !e.title ? Z("img", {
|
|
1982
1982
|
class: $({
|
|
1983
1983
|
type: e.type
|
|
1984
1984
|
}),
|
|
1985
1985
|
src: n
|
|
1986
|
-
}) : e.description ?
|
|
1986
|
+
}) : e.description ? Z("div", {
|
|
1987
1987
|
class: pe
|
|
1988
1988
|
}, `
|
|
1989
1989
|
<div class="${yn}">
|
|
@@ -1993,7 +1993,7 @@ const Io = j((e) => {
|
|
|
1993
1993
|
<img src="${n}" class="${$({
|
|
1994
1994
|
type: e.type
|
|
1995
1995
|
})}">
|
|
1996
|
-
`) :
|
|
1996
|
+
`) : Z("div", {
|
|
1997
1997
|
class: pe
|
|
1998
1998
|
}, `
|
|
1999
1999
|
<div class="${Nn}">${e.title}</div>
|
|
@@ -2005,7 +2005,7 @@ const Io = j((e) => {
|
|
|
2005
2005
|
return () => M(Y, {
|
|
2006
2006
|
attrs: {
|
|
2007
2007
|
registerOverlay: e.registerOverlay,
|
|
2008
|
-
position:
|
|
2008
|
+
position: z(e.position),
|
|
2009
2009
|
content: t.value
|
|
2010
2010
|
}
|
|
2011
2011
|
});
|
|
@@ -2026,7 +2026,7 @@ const Io = j((e) => {
|
|
|
2026
2026
|
from: i,
|
|
2027
2027
|
to: o,
|
|
2028
2028
|
fromDescription: r
|
|
2029
|
-
} = e, s =
|
|
2029
|
+
} = e, s = C(i), c = C(o);
|
|
2030
2030
|
return M(De, {
|
|
2031
2031
|
attrs: {
|
|
2032
2032
|
mapRef: n,
|
|
@@ -2085,31 +2085,29 @@ const Io = j((e) => {
|
|
|
2085
2085
|
longitude: (m = o == null ? void 0 : o[0]) != null ? m : 0,
|
|
2086
2086
|
speed: 0
|
|
2087
2087
|
}), u = w([d.value.longitude, d.value.latitude]), l = S();
|
|
2088
|
-
return
|
|
2088
|
+
return E(
|
|
2089
2089
|
() => !0,
|
|
2090
2090
|
(f, v, y) => {
|
|
2091
2091
|
s.value = !0;
|
|
2092
2092
|
const p = navigator.geolocation.watchPosition(
|
|
2093
|
-
(
|
|
2094
|
-
const
|
|
2095
|
-
d.value =
|
|
2093
|
+
(N) => {
|
|
2094
|
+
const L = N.coords, x = [N.coords.longitude, N.coords.latitude];
|
|
2095
|
+
d.value = L, u.value = x, s.value && (s.value = !1, c.value = !0, n == null || n({ position: x, coordinate: L })), t == null || t({ position: x, coordinate: L });
|
|
2096
2096
|
},
|
|
2097
|
-
(
|
|
2098
|
-
s.value = !1, g.value =
|
|
2099
|
-
const
|
|
2100
|
-
|
|
2097
|
+
(N) => {
|
|
2098
|
+
s.value = !1, g.value = N;
|
|
2099
|
+
const L = e == null ? void 0 : e.geoDefaultPosition;
|
|
2100
|
+
L && !r && (r = !0, a == null || a({ position: L }));
|
|
2101
2101
|
},
|
|
2102
2102
|
{ timeout: mo, maximumAge: 0, enableHighAccuracy: !1 }
|
|
2103
2103
|
);
|
|
2104
2104
|
y(() => navigator.geolocation.clearWatch(p));
|
|
2105
2105
|
},
|
|
2106
2106
|
{ immediate: !0 }
|
|
2107
|
-
),
|
|
2107
|
+
), E(
|
|
2108
2108
|
() => l.status !== q.LOADING && g.value,
|
|
2109
2109
|
(f) => {
|
|
2110
|
-
|
|
2111
|
-
f && g.value && (i == null || i(g.value));
|
|
2112
|
-
}, 100);
|
|
2110
|
+
f && g.value && (i == null || i(g.value));
|
|
2113
2111
|
},
|
|
2114
2112
|
{ immediate: !0, deep: !0 }
|
|
2115
2113
|
), {
|
|
@@ -2120,7 +2118,7 @@ const Io = j((e) => {
|
|
|
2120
2118
|
geoReady: c
|
|
2121
2119
|
};
|
|
2122
2120
|
}, fo = () => {
|
|
2123
|
-
const e =
|
|
2121
|
+
const e = R();
|
|
2124
2122
|
return { mapRef: e, panTo: (a) => {
|
|
2125
2123
|
var i;
|
|
2126
2124
|
return (i = e == null ? void 0 : e.value) == null ? void 0 : i.panTo(a);
|
|
@@ -2128,10 +2126,10 @@ const Io = j((e) => {
|
|
|
2128
2126
|
e.value = a;
|
|
2129
2127
|
} };
|
|
2130
2128
|
}, po = () => {
|
|
2131
|
-
const e =
|
|
2129
|
+
const e = R();
|
|
2132
2130
|
return { mapRef: e, panTo: (a) => {
|
|
2133
2131
|
var i;
|
|
2134
|
-
return (i = e == null ? void 0 : e.value) == null ? void 0 : i.panTo(
|
|
2132
|
+
return (i = e == null ? void 0 : e.value) == null ? void 0 : i.panTo(z(a));
|
|
2135
2133
|
}, setMap: (a) => {
|
|
2136
2134
|
e.value = a;
|
|
2137
2135
|
} };
|
|
@@ -2179,7 +2177,7 @@ const Io = j((e) => {
|
|
|
2179
2177
|
e.value += 1;
|
|
2180
2178
|
} };
|
|
2181
2179
|
}, Sn = (e) => {
|
|
2182
|
-
const { onChange: t, onChangeCity: n } = e, a = [...e.pointRef.value], i = w(a), { readyPromise: o } = S(), r =
|
|
2180
|
+
const { onChange: t, onChangeCity: n } = e, a = [...e.pointRef.value], i = w(a), { readyPromise: o } = S(), r = T({
|
|
2183
2181
|
lng: i.value[0],
|
|
2184
2182
|
lat: i.value[1],
|
|
2185
2183
|
name: ""
|
|
@@ -2189,8 +2187,8 @@ const Io = j((e) => {
|
|
|
2189
2187
|
I.getAddress(new AMap.LngLat(m, f), (v, y) => {
|
|
2190
2188
|
if (v !== "complete")
|
|
2191
2189
|
return;
|
|
2192
|
-
const { addressComponent: p } = y.regeocode,
|
|
2193
|
-
n == null || n({ cityName:
|
|
2190
|
+
const { addressComponent: p } = y.regeocode, N = p.city ? p.city : p.province, L = p.province;
|
|
2191
|
+
n == null || n({ cityName: N, cityParentName: L, countryName: "" });
|
|
2194
2192
|
});
|
|
2195
2193
|
} catch (I) {
|
|
2196
2194
|
console.log(I);
|
|
@@ -2200,7 +2198,7 @@ const Io = j((e) => {
|
|
|
2200
2198
|
}, u = (l) => {
|
|
2201
2199
|
r.lng = l.lng, r.lat = l.lat, r.name = l.name;
|
|
2202
2200
|
};
|
|
2203
|
-
return
|
|
2201
|
+
return E(
|
|
2204
2202
|
() => [s.value],
|
|
2205
2203
|
async () => {
|
|
2206
2204
|
await o;
|
|
@@ -2208,8 +2206,8 @@ const Io = j((e) => {
|
|
|
2208
2206
|
l.getAddress(new AMap.LngLat(I, m), (f, v) => {
|
|
2209
2207
|
switch (f) {
|
|
2210
2208
|
case "complete": {
|
|
2211
|
-
const { formattedAddress: y, addressComponent: p } = v.regeocode,
|
|
2212
|
-
r.name = y, r.lng = I, r.lat = m, t == null || t({ lng: I, lat: m, name: y }), n == null || n({ cityName:
|
|
2209
|
+
const { formattedAddress: y, addressComponent: p } = v.regeocode, N = p.city ? p.city : p.province, L = p.province;
|
|
2210
|
+
r.name = y, r.lng = I, r.lat = m, t == null || t({ lng: I, lat: m, name: y }), n == null || n({ cityName: N, cityParentName: L, countryName: "" });
|
|
2213
2211
|
return;
|
|
2214
2212
|
}
|
|
2215
2213
|
case "no_data":
|
|
@@ -2222,7 +2220,7 @@ const Io = j((e) => {
|
|
|
2222
2220
|
}
|
|
2223
2221
|
), { place: r, updatePlace: d, setPlace: u, updateCity: g };
|
|
2224
2222
|
}, hn = (e) => {
|
|
2225
|
-
const { onChange: t, onChangeCity: n } = e, a = [...e.pointRef.value], i = w(a), { readyPromise: o } = S(), { idx: r, update: s } = ne(), c =
|
|
2223
|
+
const { onChange: t, onChangeCity: n } = e, a = [...e.pointRef.value], i = w(a), { readyPromise: o } = S(), { idx: r, update: s } = ne(), c = T({
|
|
2226
2224
|
lng: i.value[0],
|
|
2227
2225
|
lat: i.value[1],
|
|
2228
2226
|
name: ""
|
|
@@ -2231,15 +2229,15 @@ const Io = j((e) => {
|
|
|
2231
2229
|
}, d = (l) => {
|
|
2232
2230
|
c.lng = l.lng, c.lat = l.lat, c.name = l.name;
|
|
2233
2231
|
}, u = async (l) => {
|
|
2234
|
-
const I = new google.maps.Geocoder(), { lng: m, lat: f } = l, { results: v } = await I.geocode({ language: re, location: { lng: m, lat: f } }), y = mt(v[0]), p = v.slice(-2)[0].address_components[0].long_name,
|
|
2235
|
-
n == null || n({ cityName: y, cityParentName: p, countryName:
|
|
2232
|
+
const I = new google.maps.Geocoder(), { lng: m, lat: f } = l, { results: v } = await I.geocode({ language: re, location: { lng: m, lat: f } }), y = mt(v[0]), p = v.slice(-2)[0].address_components[0].long_name, N = v.slice(-1)[0].address_components[0].long_name;
|
|
2233
|
+
n == null || n({ cityName: y, cityParentName: p, countryName: N });
|
|
2236
2234
|
};
|
|
2237
|
-
return
|
|
2235
|
+
return E(
|
|
2238
2236
|
() => r.value,
|
|
2239
2237
|
async () => {
|
|
2240
2238
|
await o;
|
|
2241
|
-
const l = new google.maps.Geocoder(), [I, m] = i.value, { results: f } = await l.geocode({ language: re, location: { lng: I, lat: m } }), v = f[0].formatted_address, y = mt(f[0]), p = f.slice(-2)[0].address_components[0].long_name,
|
|
2242
|
-
c.lng = I, c.lat = m, c.name = v, t == null || t({ lng: I, lat: m, name: v }), n == null || n({ cityName: y, cityParentName: p, countryName:
|
|
2239
|
+
const l = new google.maps.Geocoder(), [I, m] = i.value, { results: f } = await l.geocode({ language: re, location: { lng: I, lat: m } }), v = f[0].formatted_address, y = mt(f[0]), p = f.slice(-2)[0].address_components[0].long_name, N = f.slice(-1)[0].address_components[0].long_name;
|
|
2240
|
+
c.lng = I, c.lat = m, c.name = v, t == null || t({ lng: I, lat: m, name: v }), n == null || n({ cityName: y, cityParentName: p, countryName: N });
|
|
2243
2241
|
}
|
|
2244
2242
|
), { place: c, updatePlace: g, setPlace: d, updateCity: u };
|
|
2245
2243
|
}, pr = (e) => {
|
|
@@ -2248,7 +2246,7 @@ const Io = j((e) => {
|
|
|
2248
2246
|
}, Lo = (e, t) => {
|
|
2249
2247
|
let n = 1 / 0, a = e;
|
|
2250
2248
|
for (const i of t) {
|
|
2251
|
-
const o = AMap.GeometryUtil.distance(
|
|
2249
|
+
const o = AMap.GeometryUtil.distance(C(e), C(i));
|
|
2252
2250
|
o >= n || (a = i, n = o);
|
|
2253
2251
|
}
|
|
2254
2252
|
return { shortestPlace: a, shortestDistance: n };
|
|
@@ -2260,70 +2258,88 @@ const Io = j((e) => {
|
|
|
2260
2258
|
}
|
|
2261
2259
|
return { shortestPlace: a, shortestDistance: n };
|
|
2262
2260
|
}, No = (e) => {
|
|
2263
|
-
const {
|
|
2261
|
+
const {
|
|
2262
|
+
pointRef: t,
|
|
2263
|
+
getRecomendPlace: n,
|
|
2264
|
+
getLimit: a,
|
|
2265
|
+
context: i,
|
|
2266
|
+
onChange: o,
|
|
2267
|
+
onChangePlace: r,
|
|
2268
|
+
onChangeCity: s,
|
|
2269
|
+
isSearchRecommendPlace: c
|
|
2270
|
+
} = e, g = w(!0), d = w([]), { idx: u, update: l } = ne(), { readyPromise: I } = S(), { place: m, updatePlace: f, setPlace: v, updateCity: y } = Sn({
|
|
2264
2271
|
pointRef: t,
|
|
2265
2272
|
onChange: r,
|
|
2266
2273
|
onChangeCity: s
|
|
2267
|
-
}),
|
|
2274
|
+
}), p = T({ ...m }), N = h(() => {
|
|
2268
2275
|
const L = t.value;
|
|
2269
|
-
return
|
|
2270
|
-
(
|
|
2276
|
+
return d.value.some(
|
|
2277
|
+
(x) => qt(C(x), L)
|
|
2271
2278
|
);
|
|
2272
2279
|
});
|
|
2273
|
-
return
|
|
2274
|
-
() =>
|
|
2280
|
+
return E(
|
|
2281
|
+
() => u.value,
|
|
2275
2282
|
async () => {
|
|
2276
|
-
await
|
|
2277
|
-
const L = await n({ ...
|
|
2283
|
+
await I;
|
|
2284
|
+
const L = c.value ? await n({ ...m }, i) : [];
|
|
2278
2285
|
if (L === void 0) {
|
|
2279
|
-
|
|
2286
|
+
g.value = !1, d.value = [], Object.assign(p, { ...m }), o == null || o({ ...m });
|
|
2280
2287
|
return;
|
|
2281
2288
|
}
|
|
2282
|
-
const { shortestPlace:
|
|
2283
|
-
|
|
2289
|
+
const { shortestPlace: x, shortestDistance: D } = Lo(m, L), P = a(i), b = D > P ? m : x;
|
|
2290
|
+
g.value = !0, d.value = L, Object.assign(p, { ...b }), o == null || o({ ...b });
|
|
2284
2291
|
}
|
|
2285
2292
|
), {
|
|
2286
|
-
recomendPlace:
|
|
2287
|
-
placeCandidates:
|
|
2288
|
-
availableRef:
|
|
2289
|
-
isElectedRef:
|
|
2290
|
-
updateRecomandPlace:
|
|
2291
|
-
updatePlace:
|
|
2292
|
-
setPlace:
|
|
2293
|
-
updateCity:
|
|
2293
|
+
recomendPlace: p,
|
|
2294
|
+
placeCandidates: d,
|
|
2295
|
+
availableRef: g,
|
|
2296
|
+
isElectedRef: N,
|
|
2297
|
+
updateRecomandPlace: l,
|
|
2298
|
+
updatePlace: f,
|
|
2299
|
+
setPlace: v,
|
|
2300
|
+
updateCity: y
|
|
2294
2301
|
};
|
|
2295
2302
|
}, So = (e) => {
|
|
2296
|
-
const {
|
|
2303
|
+
const {
|
|
2304
|
+
pointRef: t,
|
|
2305
|
+
getRecomendPlace: n,
|
|
2306
|
+
getLimit: a,
|
|
2307
|
+
context: i,
|
|
2308
|
+
onChange: o,
|
|
2309
|
+
onChangePlace: r,
|
|
2310
|
+
onChangeCity: s,
|
|
2311
|
+
isSearchRecommendPlace: c
|
|
2312
|
+
} = e, g = w(!0), d = w([]), { idx: u, update: l } = ne(), { readyPromise: I } = S(), { place: m, updatePlace: f, setPlace: v, updateCity: y } = hn({
|
|
2297
2313
|
pointRef: t,
|
|
2298
2314
|
onChange: r,
|
|
2299
2315
|
onChangeCity: s
|
|
2300
|
-
}),
|
|
2316
|
+
}), p = T({ ...m }), N = h(() => {
|
|
2301
2317
|
const L = t.value;
|
|
2302
|
-
return
|
|
2303
|
-
(
|
|
2318
|
+
return d.value.some(
|
|
2319
|
+
(x) => qt(C(x), L)
|
|
2304
2320
|
);
|
|
2305
2321
|
});
|
|
2306
|
-
return
|
|
2307
|
-
() =>
|
|
2322
|
+
return E(
|
|
2323
|
+
() => u.value,
|
|
2308
2324
|
async () => {
|
|
2309
|
-
await
|
|
2310
|
-
const L = await n({ ...
|
|
2325
|
+
await I;
|
|
2326
|
+
const L = c.value ? await n({ ...m }, i) : [];
|
|
2311
2327
|
if (L === void 0) {
|
|
2312
|
-
|
|
2328
|
+
g.value = !1, d.value = [], Object.assign(p, { ...m }), o == null || o({ ...m });
|
|
2313
2329
|
return;
|
|
2314
2330
|
}
|
|
2315
|
-
const { shortestPlace:
|
|
2316
|
-
|
|
2331
|
+
const { shortestPlace: x, shortestDistance: D } = Ao(m, L), P = a(i), b = D > P ? m : x;
|
|
2332
|
+
g.value = !0, d.value = L, Object.assign(p, { ...b }), o == null || o({ ...b });
|
|
2317
2333
|
}
|
|
2318
2334
|
), {
|
|
2319
|
-
recomendPlace:
|
|
2320
|
-
placeCandidates:
|
|
2321
|
-
availableRef:
|
|
2322
|
-
isElectedRef:
|
|
2323
|
-
updateRecomandPlace:
|
|
2324
|
-
updatePlace:
|
|
2325
|
-
setPlace:
|
|
2326
|
-
updateCity:
|
|
2335
|
+
recomendPlace: p,
|
|
2336
|
+
placeCandidates: d,
|
|
2337
|
+
availableRef: g,
|
|
2338
|
+
isElectedRef: N,
|
|
2339
|
+
updateRecomandPlace: l,
|
|
2340
|
+
updatePlace: f,
|
|
2341
|
+
setPlace: v,
|
|
2342
|
+
updateCity: y
|
|
2327
2343
|
};
|
|
2328
2344
|
}, ho = (e) => {
|
|
2329
2345
|
const { supplier: t } = S();
|
|
@@ -2367,7 +2383,7 @@ const wo = j((e) => {
|
|
|
2367
2383
|
const {
|
|
2368
2384
|
size: n = "large"
|
|
2369
2385
|
} = e, a = n === "large" ? Dn : B;
|
|
2370
|
-
return
|
|
2386
|
+
return Z("img", {
|
|
2371
2387
|
class: wn({
|
|
2372
2388
|
size: n
|
|
2373
2389
|
}),
|
|
@@ -2376,7 +2392,7 @@ const wo = j((e) => {
|
|
|
2376
2392
|
});
|
|
2377
2393
|
return () => M(Y, {
|
|
2378
2394
|
attrs: {
|
|
2379
|
-
position:
|
|
2395
|
+
position: z(e.position),
|
|
2380
2396
|
content: t.value,
|
|
2381
2397
|
registerOverlay: e.registerOverlay
|
|
2382
2398
|
}
|
|
@@ -2408,7 +2424,7 @@ const wo = j((e) => {
|
|
|
2408
2424
|
return [(u - g) * c, (l - d) * c];
|
|
2409
2425
|
}, o = w(Array(e.places.length).fill("right"));
|
|
2410
2426
|
return Oi(
|
|
2411
|
-
() => e.places.map(
|
|
2427
|
+
() => e.places.map(C),
|
|
2412
2428
|
(r) => {
|
|
2413
2429
|
const s = r.map((l, I) => ({ point: l, index: I })).sort(
|
|
2414
2430
|
({ point: [, l] }, { point: [, I] }) => l < I ? 1 : l > I ? -1 : 0
|
|
@@ -2423,8 +2439,8 @@ const wo = j((e) => {
|
|
|
2423
2439
|
if (l === 0) {
|
|
2424
2440
|
const [y, p] = i(s[l].point, s[l + 1].point);
|
|
2425
2441
|
u = y > -t && y < t && p > -n && p < n;
|
|
2426
|
-
const
|
|
2427
|
-
g[I] =
|
|
2442
|
+
const N = u && y > 0 ? "left" : "right";
|
|
2443
|
+
g[I] = N, d = N;
|
|
2428
2444
|
continue;
|
|
2429
2445
|
}
|
|
2430
2446
|
const [m, f] = i(s[l].point, s[l + 1].point), v = u ? yt(d) : "right";
|
|
@@ -2490,7 +2506,7 @@ const To = j((e, {
|
|
|
2490
2506
|
const {
|
|
2491
2507
|
hideIcon: r = !1
|
|
2492
2508
|
} = e;
|
|
2493
|
-
return
|
|
2509
|
+
return Z("div", {
|
|
2494
2510
|
class: `${Cn({
|
|
2495
2511
|
textAlign: n.value
|
|
2496
2512
|
})} ${Lt({
|
|
@@ -2506,7 +2522,7 @@ const To = j((e, {
|
|
|
2506
2522
|
const {
|
|
2507
2523
|
hideIcon: r = !1
|
|
2508
2524
|
} = e;
|
|
2509
|
-
return
|
|
2525
|
+
return Z("img", {
|
|
2510
2526
|
class: `${ve({
|
|
2511
2527
|
hideIcon: r
|
|
2512
2528
|
})} ${Lt({
|
|
@@ -2519,7 +2535,7 @@ const To = j((e, {
|
|
|
2519
2535
|
};
|
|
2520
2536
|
return () => M(Y, {
|
|
2521
2537
|
attrs: {
|
|
2522
|
-
position:
|
|
2538
|
+
position: z(e.position),
|
|
2523
2539
|
content: e.label ? a.value : i.value
|
|
2524
2540
|
},
|
|
2525
2541
|
on: {
|
|
@@ -2541,7 +2557,7 @@ const To = j((e, {
|
|
|
2541
2557
|
}) => {
|
|
2542
2558
|
const {
|
|
2543
2559
|
renderLabel: n
|
|
2544
|
-
} = e, a = Eo(
|
|
2560
|
+
} = e, a = Eo(T({
|
|
2545
2561
|
places: Wn(e, "places"),
|
|
2546
2562
|
heightLimit: 9,
|
|
2547
2563
|
widthLimit: 32
|
|
@@ -2550,7 +2566,7 @@ const To = j((e, {
|
|
|
2550
2566
|
const r = a.value[o], s = n ? n(i) : i.name;
|
|
2551
2567
|
return M(W, {
|
|
2552
2568
|
attrs: {
|
|
2553
|
-
position:
|
|
2569
|
+
position: C(i),
|
|
2554
2570
|
label: s,
|
|
2555
2571
|
textAlign: r
|
|
2556
2572
|
},
|
|
@@ -2578,16 +2594,16 @@ const To = j((e, {
|
|
|
2578
2594
|
timerStop: g
|
|
2579
2595
|
} = Do({
|
|
2580
2596
|
interval: ko
|
|
2581
|
-
}), d =
|
|
2597
|
+
}), d = T({
|
|
2582
2598
|
lng: (Xe = n == null ? void 0 : n[0]) != null ? Xe : 0,
|
|
2583
2599
|
lat: ($e = n == null ? void 0 : n[1]) != null ? $e : 0,
|
|
2584
2600
|
name: ""
|
|
2585
2601
|
}), u = h(() => [d.lng, d.lat]), l = {
|
|
2586
2602
|
source: "geo"
|
|
2587
2603
|
}, I = (A) => {
|
|
2588
|
-
l.source = "api",
|
|
2604
|
+
l.source = "api", L(A);
|
|
2589
2605
|
}, m = (A) => {
|
|
2590
|
-
l.source = "api",
|
|
2606
|
+
l.source = "api", x(A), D(A), P();
|
|
2591
2607
|
}, f = (A) => {
|
|
2592
2608
|
l.source = "api", d.lng = A.lng, d.lat = A.lat, d.name = A.name;
|
|
2593
2609
|
}, {
|
|
@@ -2597,34 +2613,35 @@ const To = j((e, {
|
|
|
2597
2613
|
} = Pe({
|
|
2598
2614
|
geoDefaultPosition: n,
|
|
2599
2615
|
onLoad: async (A) => {
|
|
2600
|
-
await s, l.source = "geo",
|
|
2616
|
+
await s, l.source = "geo", L(A.position), t("loadGeoLocation", A);
|
|
2601
2617
|
},
|
|
2602
2618
|
onLoadDefault: async (A) => {
|
|
2603
|
-
await s, l.source = "geo",
|
|
2619
|
+
await s, l.source = "geo", L(A.position), t("loadDefaultGeoLocation", A);
|
|
2604
2620
|
},
|
|
2605
2621
|
onChange: (A) => t("changeGeoLocation", A),
|
|
2606
2622
|
onError: (A) => t("geoError", A)
|
|
2607
2623
|
});
|
|
2608
2624
|
i.setCenterPlaceByUserSpecified = m, i.panToGeoPositionByRecomend = () => y.value ? !1 : (I(v.value), !0);
|
|
2609
2625
|
const {
|
|
2610
|
-
isDragging:
|
|
2626
|
+
isDragging: N
|
|
2611
2627
|
} = jo({
|
|
2612
2628
|
mapRef: o,
|
|
2613
2629
|
onChange: (A) => {
|
|
2614
|
-
l.source = "drag", c(),
|
|
2630
|
+
i.setIsSearchRecommendPlace(!0), l.source = "drag", c(), L(A), t("changeByDrag", A);
|
|
2615
2631
|
}
|
|
2616
2632
|
}), {
|
|
2617
|
-
updatePlace:
|
|
2618
|
-
setPlace:
|
|
2633
|
+
updatePlace: L,
|
|
2634
|
+
setPlace: x,
|
|
2619
2635
|
updateCity: D,
|
|
2620
|
-
updateRecomandPlace:
|
|
2621
|
-
placeCandidates:
|
|
2636
|
+
updateRecomandPlace: P,
|
|
2637
|
+
placeCandidates: b,
|
|
2622
2638
|
availableRef: U,
|
|
2623
2639
|
isElectedRef: Fe
|
|
2624
2640
|
} = ho({
|
|
2625
2641
|
pointRef: u,
|
|
2626
2642
|
context: l,
|
|
2627
2643
|
getRecomendPlace: a,
|
|
2644
|
+
isSearchRecommendPlace: i.isSearchRecommendPlace,
|
|
2628
2645
|
getLimit: (A) => {
|
|
2629
2646
|
const O = A == null ? void 0 : A.source;
|
|
2630
2647
|
switch (O) {
|
|
@@ -2640,7 +2657,7 @@ const To = j((e, {
|
|
|
2640
2657
|
}
|
|
2641
2658
|
},
|
|
2642
2659
|
onChangePlace: (A) => {
|
|
2643
|
-
l.source !== "recomend" &&
|
|
2660
|
+
l.source !== "recomend" && P(), t("changePlace", A);
|
|
2644
2661
|
},
|
|
2645
2662
|
onChange: async (A) => {
|
|
2646
2663
|
var ae, _e;
|
|
@@ -2659,7 +2676,7 @@ const To = j((e, {
|
|
|
2659
2676
|
...d
|
|
2660
2677
|
});
|
|
2661
2678
|
}), Re(() => {
|
|
2662
|
-
i.onChangeRecomendPlaces([...
|
|
2679
|
+
i.onChangeRecomendPlaces([...b.value]);
|
|
2663
2680
|
});
|
|
2664
2681
|
const Te = w(!0), Gn = (A) => {
|
|
2665
2682
|
A < 13 ? Te.value = !1 : Te.value = !0;
|
|
@@ -2681,7 +2698,7 @@ const To = j((e, {
|
|
|
2681
2698
|
}
|
|
2682
2699
|
}), Te.value ? M(Ro, {
|
|
2683
2700
|
attrs: {
|
|
2684
|
-
places:
|
|
2701
|
+
places: b.value,
|
|
2685
2702
|
renderLabel: (ae) => Zi(ae, d) ? void 0 : ae.name
|
|
2686
2703
|
},
|
|
2687
2704
|
on: {
|
|
@@ -2691,7 +2708,7 @@ const To = j((e, {
|
|
|
2691
2708
|
attrs: {
|
|
2692
2709
|
title: A,
|
|
2693
2710
|
description: O,
|
|
2694
|
-
type:
|
|
2711
|
+
type: N.value ? "locator" : "box"
|
|
2695
2712
|
},
|
|
2696
2713
|
on: {
|
|
2697
2714
|
click: () => t("clickLocator")
|
|
@@ -2723,12 +2740,12 @@ const Bo = j((e) => {
|
|
|
2723
2740
|
const t = h(() => {
|
|
2724
2741
|
var i;
|
|
2725
2742
|
const n = e.title ? he(e.title).map((o) => o.type === "normal" ? o.value : `<span class="${Pn}">${o.value}</span>`).join("") : "", a = `transform:rotate(${(i = e.angle) != null ? i : 0}deg)`;
|
|
2726
|
-
return e.title ?
|
|
2743
|
+
return e.title ? Z("div", {
|
|
2727
2744
|
class: bn
|
|
2728
2745
|
}, `
|
|
2729
2746
|
<div class="${En}">${n}</div>
|
|
2730
2747
|
<img src="${ye}" class="${je}" style="${a}">
|
|
2731
|
-
`) :
|
|
2748
|
+
`) : Z("img", {
|
|
2732
2749
|
class: je,
|
|
2733
2750
|
src: ye,
|
|
2734
2751
|
style: a
|
|
@@ -2736,7 +2753,7 @@ const Bo = j((e) => {
|
|
|
2736
2753
|
});
|
|
2737
2754
|
return () => M(Y, {
|
|
2738
2755
|
attrs: {
|
|
2739
|
-
position:
|
|
2756
|
+
position: z(e.position),
|
|
2740
2757
|
content: t.value,
|
|
2741
2758
|
registerOverlay: e.registerOverlay
|
|
2742
2759
|
}
|
|
@@ -2766,7 +2783,7 @@ const Bo = j((e) => {
|
|
|
2766
2783
|
}
|
|
2767
2784
|
});
|
|
2768
2785
|
}), Ho = j((e) => {
|
|
2769
|
-
const t = h(() => e.path.map(
|
|
2786
|
+
const t = h(() => e.path.map(z));
|
|
2770
2787
|
return () => {
|
|
2771
2788
|
const n = t.value;
|
|
2772
2789
|
if (n.length === 0)
|
|
@@ -2804,7 +2821,7 @@ const Bo = j((e) => {
|
|
|
2804
2821
|
attrs: e
|
|
2805
2822
|
});
|
|
2806
2823
|
}), zn = (e) => {
|
|
2807
|
-
const t =
|
|
2824
|
+
const t = R([]), n = new AMap.Walking({});
|
|
2808
2825
|
return ee(
|
|
2809
2826
|
() => ({ ...e }),
|
|
2810
2827
|
({ from: a, to: i }) => {
|
|
@@ -2833,7 +2850,7 @@ const Bo = j((e) => {
|
|
|
2833
2850
|
}
|
|
2834
2851
|
), t;
|
|
2835
2852
|
}, Rn = (e) => {
|
|
2836
|
-
const t =
|
|
2853
|
+
const t = R([]), n = new google.maps.DirectionsService();
|
|
2837
2854
|
return ee(
|
|
2838
2855
|
() => ({ ...e }),
|
|
2839
2856
|
({ from: a, to: i }) => {
|
|
@@ -2874,7 +2891,7 @@ const Bo = j((e) => {
|
|
|
2874
2891
|
const n = zn(e);
|
|
2875
2892
|
return () => {
|
|
2876
2893
|
var a;
|
|
2877
|
-
return M("div", [(a = t.render) == null ? void 0 : a.call(t,
|
|
2894
|
+
return M("div", [(a = t.render) == null ? void 0 : a.call(t, T({
|
|
2878
2895
|
path: n
|
|
2879
2896
|
}))]);
|
|
2880
2897
|
};
|
|
@@ -2884,7 +2901,7 @@ const Bo = j((e) => {
|
|
|
2884
2901
|
const n = Rn(e);
|
|
2885
2902
|
return () => {
|
|
2886
2903
|
var a;
|
|
2887
|
-
return M("div", [(a = t.render) == null ? void 0 : a.call(t,
|
|
2904
|
+
return M("div", [(a = t.render) == null ? void 0 : a.call(t, T({
|
|
2888
2905
|
path: n
|
|
2889
2906
|
}))]);
|
|
2890
2907
|
};
|
|
@@ -2916,15 +2933,15 @@ const Fo = j((e) => {
|
|
|
2916
2933
|
}
|
|
2917
2934
|
})]);
|
|
2918
2935
|
}), Xo = j((e) => {
|
|
2919
|
-
const t = h(() =>
|
|
2936
|
+
const t = h(() => Z("img", {
|
|
2920
2937
|
class: Ae,
|
|
2921
2938
|
src: Le
|
|
2922
|
-
})), n = h(() =>
|
|
2939
|
+
})), n = h(() => Z("img", {
|
|
2923
2940
|
class: `${Ae} ${On}`,
|
|
2924
2941
|
src: Le
|
|
2925
2942
|
}));
|
|
2926
2943
|
return () => {
|
|
2927
|
-
const a =
|
|
2944
|
+
const a = z(e.position);
|
|
2928
2945
|
return M("div", [M(Y, {
|
|
2929
2946
|
attrs: {
|
|
2930
2947
|
position: a,
|
|
@@ -2949,7 +2966,7 @@ const Fo = j((e) => {
|
|
|
2949
2966
|
from: n,
|
|
2950
2967
|
title: a,
|
|
2951
2968
|
registerOverlay: i
|
|
2952
|
-
} = e, o =
|
|
2969
|
+
} = e, o = C(n);
|
|
2953
2970
|
return M("div", [M(G, {
|
|
2954
2971
|
attrs: {
|
|
2955
2972
|
type: "start",
|
|
@@ -2977,7 +2994,7 @@ const Fo = j((e) => {
|
|
|
2977
2994
|
passengerPosition: i,
|
|
2978
2995
|
renderTitle: o,
|
|
2979
2996
|
registerOverlay: r
|
|
2980
|
-
} = e, s =
|
|
2997
|
+
} = e, s = C(n);
|
|
2981
2998
|
return M("div", [!!i && M(Ee, {
|
|
2982
2999
|
attrs: {
|
|
2983
3000
|
position: i,
|
|
@@ -3038,7 +3055,7 @@ const Fo = j((e) => {
|
|
|
3038
3055
|
passengerPosition: a,
|
|
3039
3056
|
title: i,
|
|
3040
3057
|
registerOverlay: o
|
|
3041
|
-
} = e, r =
|
|
3058
|
+
} = e, r = C(n);
|
|
3042
3059
|
return M("div", [M(G, {
|
|
3043
3060
|
attrs: {
|
|
3044
3061
|
type: "start",
|
|
@@ -3067,7 +3084,7 @@ const Fo = j((e) => {
|
|
|
3067
3084
|
passengerPosition: i,
|
|
3068
3085
|
title: o,
|
|
3069
3086
|
registerOverlay: r
|
|
3070
|
-
} = e, s =
|
|
3087
|
+
} = e, s = C(n);
|
|
3071
3088
|
return M("div", [M(Qe, {
|
|
3072
3089
|
attrs: {
|
|
3073
3090
|
position: a,
|
|
@@ -3113,7 +3130,7 @@ const Fo = j((e) => {
|
|
|
3113
3130
|
carPosition: a,
|
|
3114
3131
|
renderTitle: i,
|
|
3115
3132
|
registerOverlay: o
|
|
3116
|
-
} = e, r =
|
|
3133
|
+
} = e, r = C(n);
|
|
3117
3134
|
return M("div", [M(G, {
|
|
3118
3135
|
attrs: {
|
|
3119
3136
|
type: "end",
|
|
@@ -3157,7 +3174,7 @@ const Fo = j((e) => {
|
|
|
3157
3174
|
from: n,
|
|
3158
3175
|
to: a,
|
|
3159
3176
|
registerOverlay: i
|
|
3160
|
-
} = e, o =
|
|
3177
|
+
} = e, o = C(n), r = C(a);
|
|
3161
3178
|
return M("div", [M(G, {
|
|
3162
3179
|
attrs: {
|
|
3163
3180
|
type: "start",
|
|
@@ -3190,7 +3207,7 @@ const Fo = j((e) => {
|
|
|
3190
3207
|
from: n,
|
|
3191
3208
|
to: a,
|
|
3192
3209
|
registerOverlay: i
|
|
3193
|
-
} = e, o =
|
|
3210
|
+
} = e, o = C(n), r = C(a);
|
|
3194
3211
|
return M("div", [M(G, {
|
|
3195
3212
|
attrs: {
|
|
3196
3213
|
type: "start",
|
|
@@ -3245,7 +3262,7 @@ const Fo = j((e) => {
|
|
|
3245
3262
|
const {
|
|
3246
3263
|
from: o,
|
|
3247
3264
|
to: r
|
|
3248
|
-
} = e, s = At(o) && At(r), c = s ?
|
|
3265
|
+
} = e, s = At(o) && At(r), c = s ? C(o) : [...Uo];
|
|
3249
3266
|
return M(De, {
|
|
3250
3267
|
attrs: {
|
|
3251
3268
|
center: c,
|
|
@@ -3279,9 +3296,9 @@ const Fo = j((e) => {
|
|
|
3279
3296
|
geoPosition: g,
|
|
3280
3297
|
geoError: d
|
|
3281
3298
|
} = Pe({
|
|
3282
|
-
geoDefaultPosition:
|
|
3283
|
-
}), u = w(
|
|
3284
|
-
return
|
|
3299
|
+
geoDefaultPosition: C(t)
|
|
3300
|
+
}), u = w(C(e.from));
|
|
3301
|
+
return E(() => e.driverStatus, (l, I, m) => {
|
|
3285
3302
|
if (!nr.includes(l))
|
|
3286
3303
|
return;
|
|
3287
3304
|
const f = setInterval(() => {
|
|
@@ -3299,10 +3316,10 @@ const Fo = j((e) => {
|
|
|
3299
3316
|
bookDispatchingTitle: v,
|
|
3300
3317
|
bookDispatchedTitle: y,
|
|
3301
3318
|
driverArrivedTitle: p
|
|
3302
|
-
} = e,
|
|
3319
|
+
} = e, N = u.value, L = d.value ? void 0 : g.value;
|
|
3303
3320
|
return M(De, {
|
|
3304
3321
|
attrs: {
|
|
3305
|
-
center:
|
|
3322
|
+
center: C(I),
|
|
3306
3323
|
zoom: 13,
|
|
3307
3324
|
mapRef: i
|
|
3308
3325
|
}
|
|
@@ -3327,8 +3344,8 @@ const Fo = j((e) => {
|
|
|
3327
3344
|
}) : l === "dispatched" || l === "driverStartService" || l === "book-driverStartService" ? M(_o, {
|
|
3328
3345
|
attrs: {
|
|
3329
3346
|
from: I,
|
|
3330
|
-
carPosition:
|
|
3331
|
-
passengerPosition:
|
|
3347
|
+
carPosition: N,
|
|
3348
|
+
passengerPosition: L,
|
|
3332
3349
|
renderTitle: r,
|
|
3333
3350
|
registerOverlay: a
|
|
3334
3351
|
},
|
|
@@ -3338,7 +3355,7 @@ const Fo = j((e) => {
|
|
|
3338
3355
|
}) : l === "book-dispatched" ? M(Ko, {
|
|
3339
3356
|
attrs: {
|
|
3340
3357
|
from: I,
|
|
3341
|
-
passengerPosition:
|
|
3358
|
+
passengerPosition: L,
|
|
3342
3359
|
title: y,
|
|
3343
3360
|
registerOverlay: a
|
|
3344
3361
|
},
|
|
@@ -3348,7 +3365,7 @@ const Fo = j((e) => {
|
|
|
3348
3365
|
}) : l === "inService" ? M(er, {
|
|
3349
3366
|
attrs: {
|
|
3350
3367
|
to: m,
|
|
3351
|
-
carPosition:
|
|
3368
|
+
carPosition: N,
|
|
3352
3369
|
renderTitle: s,
|
|
3353
3370
|
registerOverlay: a
|
|
3354
3371
|
},
|
|
@@ -3358,8 +3375,8 @@ const Fo = j((e) => {
|
|
|
3358
3375
|
}) : l === "driverArrived" ? M(qo, {
|
|
3359
3376
|
attrs: {
|
|
3360
3377
|
from: I,
|
|
3361
|
-
carPosition:
|
|
3362
|
-
passengerPosition:
|
|
3378
|
+
carPosition: N,
|
|
3379
|
+
passengerPosition: L,
|
|
3363
3380
|
title: p,
|
|
3364
3381
|
registerOverlay: a
|
|
3365
3382
|
},
|
|
@@ -3405,7 +3422,7 @@ const Fo = j((e) => {
|
|
|
3405
3422
|
const e = S();
|
|
3406
3423
|
return { apiMapDistance: (n, a) => {
|
|
3407
3424
|
if (e.status === q.SUCCESS)
|
|
3408
|
-
return google.maps.geometry.spherical.computeDistanceBetween(
|
|
3425
|
+
return google.maps.geometry.spherical.computeDistanceBetween(z(n), z(a));
|
|
3409
3426
|
} };
|
|
3410
3427
|
}, Je = () => {
|
|
3411
3428
|
const { supplier: e } = S();
|
|
@@ -3416,7 +3433,7 @@ const Fo = j((e) => {
|
|
|
3416
3433
|
}, u = (l) => {
|
|
3417
3434
|
r.value = l, c();
|
|
3418
3435
|
};
|
|
3419
|
-
return
|
|
3436
|
+
return E(
|
|
3420
3437
|
() => g.value,
|
|
3421
3438
|
async () => {
|
|
3422
3439
|
if (!r.value)
|
|
@@ -3457,7 +3474,7 @@ const Fo = j((e) => {
|
|
|
3457
3474
|
}, u = (I) => {
|
|
3458
3475
|
r.value = I, c();
|
|
3459
3476
|
}, l = document.createElement("div");
|
|
3460
|
-
return
|
|
3477
|
+
return E(
|
|
3461
3478
|
() => g.value,
|
|
3462
3479
|
async () => {
|
|
3463
3480
|
if (!r.value)
|
|
@@ -3471,15 +3488,15 @@ const Fo = j((e) => {
|
|
|
3471
3488
|
const v = o.value;
|
|
3472
3489
|
switch (f) {
|
|
3473
3490
|
case google.maps.places.PlacesServiceStatus.OK:
|
|
3474
|
-
s.value = m.map(({ geometry: y, name: p, formatted_address:
|
|
3475
|
-
var D,
|
|
3476
|
-
const
|
|
3491
|
+
s.value = m.map(({ geometry: y, name: p, formatted_address: N }) => {
|
|
3492
|
+
var D, P, b, U;
|
|
3493
|
+
const L = (P = (D = y == null ? void 0 : y.location) == null ? void 0 : D.lng()) != null ? P : 0, x = (U = (b = y == null ? void 0 : y.location) == null ? void 0 : b.lat()) != null ? U : 0;
|
|
3477
3494
|
return {
|
|
3478
|
-
lng:
|
|
3479
|
-
lat:
|
|
3495
|
+
lng: L,
|
|
3496
|
+
lat: x,
|
|
3480
3497
|
name: p != null ? p : "",
|
|
3481
|
-
description:
|
|
3482
|
-
distance: v ? i(v, [
|
|
3498
|
+
description: N != null ? N : "",
|
|
3499
|
+
distance: v ? i(v, [L, x]) : void 0
|
|
3483
3500
|
};
|
|
3484
3501
|
});
|
|
3485
3502
|
return;
|
|
@@ -3497,8 +3514,8 @@ const Fo = j((e) => {
|
|
|
3497
3514
|
return t === "gmap" ? rr(e) : or(e);
|
|
3498
3515
|
}, cr = (e) => {
|
|
3499
3516
|
var i;
|
|
3500
|
-
const { cityNameRef: t, onChange: n } = e, a =
|
|
3501
|
-
return
|
|
3517
|
+
const { cityNameRef: t, onChange: n } = e, a = T({ name: (i = t.value) != null ? i : "" });
|
|
3518
|
+
return E(
|
|
3502
3519
|
() => t.value,
|
|
3503
3520
|
(o) => {
|
|
3504
3521
|
const r = o != null ? o : "";
|
|
@@ -3507,7 +3524,7 @@ const Fo = j((e) => {
|
|
|
3507
3524
|
), a;
|
|
3508
3525
|
}, ur = (e) => {
|
|
3509
3526
|
var o;
|
|
3510
|
-
const { cityNameRef: t, onChange: n } = e, { readyPromise: a } = S(), i =
|
|
3527
|
+
const { cityNameRef: t, onChange: n } = e, { readyPromise: a } = S(), i = T({
|
|
3511
3528
|
name: (o = t.value) != null ? o : "",
|
|
3512
3529
|
bound: {
|
|
3513
3530
|
east: 0,
|
|
@@ -3553,7 +3570,7 @@ const Fo = j((e) => {
|
|
|
3553
3570
|
});
|
|
3554
3571
|
return { setMap: e, registerFitVeiw: n, setFitView: a };
|
|
3555
3572
|
}, Sr = () => {
|
|
3556
|
-
const e =
|
|
3573
|
+
const e = T({
|
|
3557
3574
|
lng: 0,
|
|
3558
3575
|
lat: 0,
|
|
3559
3576
|
name: ""
|
|
@@ -3572,12 +3589,14 @@ const Fo = j((e) => {
|
|
|
3572
3589
|
},
|
|
3573
3590
|
setIsSearchRecommendPlace: (c) => {
|
|
3574
3591
|
n.value = c;
|
|
3575
|
-
}
|
|
3592
|
+
},
|
|
3593
|
+
isSearchRecommendPlace: n
|
|
3576
3594
|
};
|
|
3577
3595
|
return {
|
|
3578
3596
|
mapContext: s,
|
|
3579
3597
|
centerPlace: e,
|
|
3580
3598
|
placeCandidates: t,
|
|
3599
|
+
isSearchRecommendPlace: n,
|
|
3581
3600
|
panToGeoPositionByRecomend: i,
|
|
3582
3601
|
setCenterPlaceByUserSpecified: o,
|
|
3583
3602
|
apiMapDistance: a
|