@mapxus/mapxus-map-jp 10.0.1 → 10.1.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/dist/index.umd.js +2 -2
- package/dist/{mapxus-map-10.0.1-jp.css → mapxus-map-10.1.1-jp.css} +0 -0
- package/dist/mapxus-map-10.1.1-jp.js +0 -0
- package/dist/utils.cjs +1 -1
- package/es/index.d.ts +248 -225
- package/es/index.mjs +891 -856
- package/es/{languages-D7yV3lDz.mjs → languages-Bg_kZzv4.mjs} +24 -23
- package/es/utils/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/mapxus-map-10.0.1-jp.js +0 -0
package/es/index.mjs
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import
|
|
3
|
-
import { dispatch as
|
|
4
|
-
import { TinyEmitter as
|
|
5
|
-
import { AuthSdkError as
|
|
6
|
-
var
|
|
1
|
+
import { c as cr, P as hr, C as pe, a as H, b as M, O as A, d as _i, V as re, B as ne, A as Re, e as $, f as be, g as yt, S as _r, h as fr, R as pr, i as gr } from "./languages-Bg_kZzv4.mjs";
|
|
2
|
+
import Et from "maplibre-gl";
|
|
3
|
+
import { dispatch as mt } from "d3-dispatch";
|
|
4
|
+
import { TinyEmitter as yr } from "tiny-emitter";
|
|
5
|
+
import { AuthSdkError as xt, getLatestCredentials as mr, SDKName as Ot, getToken as br, md5 as vr } from "@mapxus/mapxus-auth-jp";
|
|
6
|
+
var bt = /* @__PURE__ */ ((t) => (t[t.VENUE = 0] = "VENUE", t[t.GLOBAL = 1] = "GLOBAL", t))(bt || {});
|
|
7
7
|
function Sr(t) {
|
|
8
8
|
return t.layers.filter(
|
|
9
|
-
(e) => !
|
|
9
|
+
(e) => !St(e.source)
|
|
10
10
|
);
|
|
11
11
|
}
|
|
12
12
|
function vt(t) {
|
|
13
13
|
return t.layers.filter(
|
|
14
|
-
(e) =>
|
|
14
|
+
(e) => St(e.source)
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function St(t) {
|
|
18
18
|
return typeof t != "string" ? !1 : t.startsWith("indoor-");
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function fi(t) {
|
|
21
21
|
const {
|
|
22
22
|
buildingId: e,
|
|
23
23
|
labelCenter: { lat: i, lon: r },
|
|
@@ -60,7 +60,7 @@ function It(t) {
|
|
|
60
60
|
sourceLayer: "mapxus_building"
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function Lt(t) {
|
|
64
64
|
const {
|
|
65
65
|
address: e,
|
|
66
66
|
buildings: i,
|
|
@@ -77,8 +77,8 @@ function Ne(t) {
|
|
|
77
77
|
"addr:housenumber": y.housenumber
|
|
78
78
|
} : { [`addr:street:${g}`]: y.street }
|
|
79
79
|
), {}), c = Object.entries(s).reduce((_, [g, y]) => {
|
|
80
|
-
const
|
|
81
|
-
return Object.assign(_, { [
|
|
80
|
+
const v = g === "default" ? "name" : `name:${g}`;
|
|
81
|
+
return Object.assign(_, { [v]: y });
|
|
82
82
|
}, {}), h = l ? i.find((_) => _.id === l)?.defaultFloor : null, f = l ? {
|
|
83
83
|
default_displayed_building: l,
|
|
84
84
|
...h ? { default_displayed_ordinal: h } : {}
|
|
@@ -105,12 +105,12 @@ function Ne(t) {
|
|
|
105
105
|
function I(t, e = ",") {
|
|
106
106
|
return typeof t != "string" || !t.trim() ? [] : t.split(e);
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const De = {
|
|
109
109
|
lineWidth: 3,
|
|
110
110
|
lineColor: "#A5E3FF",
|
|
111
111
|
lineOpacity: 1,
|
|
112
112
|
lineOffset: -1.5
|
|
113
|
-
},
|
|
113
|
+
}, $t = {
|
|
114
114
|
fontColor: "#8c8c8c",
|
|
115
115
|
activeFontColor: "#fff",
|
|
116
116
|
backgroundColor: "#fff",
|
|
@@ -118,8 +118,8 @@ const Ue = {
|
|
|
118
118
|
itemSize: 50,
|
|
119
119
|
itemCount: 4,
|
|
120
120
|
defaultFolded: !1
|
|
121
|
-
},
|
|
122
|
-
class
|
|
121
|
+
}, Lr = cr(window.navigator.language) ?? hr.ENGLISH;
|
|
122
|
+
class Mt extends Error {
|
|
123
123
|
status;
|
|
124
124
|
constructor(e, i) {
|
|
125
125
|
super(e);
|
|
@@ -127,13 +127,13 @@ class At extends Error {
|
|
|
127
127
|
r !== void 0 && (this.status = r), s !== void 0 && (this.name = s);
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
function
|
|
130
|
+
function Ir(t, e = 30) {
|
|
131
131
|
let i, r = null;
|
|
132
132
|
return { promise: new Promise((o, a) => {
|
|
133
133
|
r = a;
|
|
134
134
|
const l = performance.now(), d = () => {
|
|
135
135
|
t() ? (clearInterval(i), o(!0)) : (performance.now() - l) / 1e3 > e && (a(
|
|
136
|
-
new
|
|
136
|
+
new Mt(
|
|
137
137
|
"Timeouts or Feature is not found in the map at current zoom level.",
|
|
138
138
|
{ status: 404, name: "NetworkError" }
|
|
139
139
|
)
|
|
@@ -142,7 +142,7 @@ function Lr(t, e = 30) {
|
|
|
142
142
|
d(), i = setInterval(d, 100);
|
|
143
143
|
}), abort: () => {
|
|
144
144
|
i && (clearInterval(i), i = null), r && (r(
|
|
145
|
-
new
|
|
145
|
+
new Mt("Query was aborted by the user.", {
|
|
146
146
|
status: 400,
|
|
147
147
|
name: "AbortError"
|
|
148
148
|
})
|
|
@@ -151,29 +151,29 @@ function Lr(t, e = 30) {
|
|
|
151
151
|
}
|
|
152
152
|
function k(t) {
|
|
153
153
|
if (!t) return null;
|
|
154
|
-
const i = (Array.isArray(t) ? t : [t]).filter(
|
|
154
|
+
const i = (Array.isArray(t) ? t : [t]).filter(m).map((r) => r.trim());
|
|
155
155
|
return i.length > 0 ? i.join(",") : null;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function m(t) {
|
|
158
158
|
return typeof t == "string" && t.trim().length > 0;
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function Z(t) {
|
|
161
161
|
return Array.isArray(t) && t.length === 2 && t.every((e) => typeof e == "number");
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
return Array.isArray(t) && t.length === 2 && t.every((e) =>
|
|
163
|
+
function ce(t) {
|
|
164
|
+
return Array.isArray(t) && t.length === 2 && t.every((e) => Z(e));
|
|
165
165
|
}
|
|
166
166
|
function ue(t) {
|
|
167
167
|
return typeof t == "number" && t > 0;
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function He(t, e) {
|
|
170
170
|
const i = { ...t };
|
|
171
171
|
return e.forEach((r) => {
|
|
172
172
|
delete i[r];
|
|
173
173
|
}), i;
|
|
174
174
|
}
|
|
175
|
-
var
|
|
176
|
-
const
|
|
175
|
+
var wr = /* @__PURE__ */ ((t) => (t.POINT = "Point", t.POLYGON = "Polygon", t))(wr || {}), pi = /* @__PURE__ */ ((t) => (t.POINT = "Point", t.POLYGON = "Polygon", t.GATE = "Gate", t))(pi || {}), Br = /* @__PURE__ */ ((t) => (t.DEFAULT_NAME = "DefaultName", t))(Br || {}), Pr = /* @__PURE__ */ ((t) => (t.ABSOLUTE_DISTANCE = "AbsoluteDistance", t.ACTUAL_DISTANCE = "ActualDistance", t))(Pr || {});
|
|
176
|
+
const At = [
|
|
177
177
|
"specialHours",
|
|
178
178
|
"businessStatus",
|
|
179
179
|
"serviceHours",
|
|
@@ -183,8 +183,8 @@ const Tt = [
|
|
|
183
183
|
"totalPhotoCount",
|
|
184
184
|
"photos",
|
|
185
185
|
"icon"
|
|
186
|
-
],
|
|
187
|
-
class
|
|
186
|
+
], qe = pe.getInstance();
|
|
187
|
+
class gi {
|
|
188
188
|
constructor() {
|
|
189
189
|
}
|
|
190
190
|
/**
|
|
@@ -212,7 +212,7 @@ class fi {
|
|
|
212
212
|
offset: n = A,
|
|
213
213
|
page: o = M
|
|
214
214
|
} = e;
|
|
215
|
-
if (!
|
|
215
|
+
if (!Z(i))
|
|
216
216
|
throw new Error(
|
|
217
217
|
"Invalid center parameter. Expected an array of two numbers."
|
|
218
218
|
);
|
|
@@ -221,7 +221,7 @@ class fi {
|
|
|
221
221
|
"Invalid distance parameter. Expected a positive number and no more than 10000."
|
|
222
222
|
);
|
|
223
223
|
const a = new URLSearchParams();
|
|
224
|
-
a.set("center", i.join(",")), a.set("distance", String(Math.round(r))), a.set("offset", String(n)), a.set("page", String(o)),
|
|
224
|
+
a.set("center", i.join(",")), a.set("distance", String(Math.round(r))), a.set("offset", String(n)), a.set("page", String(o)), m(s) && a.set("keywords", s);
|
|
225
225
|
const l = `${H}?${a.toString()}`;
|
|
226
226
|
return this._filterPoiProperties(l, z);
|
|
227
227
|
}
|
|
@@ -238,12 +238,12 @@ class fi {
|
|
|
238
238
|
keywords: n,
|
|
239
239
|
orderBy: o
|
|
240
240
|
} = e;
|
|
241
|
-
if (!
|
|
241
|
+
if (!ce(i))
|
|
242
242
|
throw new Error(
|
|
243
243
|
"'bounds' must be an array of two arrays, each containing two numbers."
|
|
244
244
|
);
|
|
245
245
|
const a = new URLSearchParams();
|
|
246
|
-
a.set("bbox", i.flat().join()), a.set("offset", String(r)), a.set("page", String(s)),
|
|
246
|
+
a.set("bbox", i.flat().join()), a.set("offset", String(r)), a.set("page", String(s)), m(n) && a.set("keywords", n), o && a.set("orderBy", o);
|
|
247
247
|
const l = `${H}?${a.toString()}`;
|
|
248
248
|
return this._filterPoiProperties(l, z);
|
|
249
249
|
}
|
|
@@ -260,10 +260,10 @@ class fi {
|
|
|
260
260
|
keywords: n,
|
|
261
261
|
orderBy: o
|
|
262
262
|
} = e;
|
|
263
|
-
if (!
|
|
263
|
+
if (!m(i))
|
|
264
264
|
throw new Error("'buildingId' must be a non-empty string.");
|
|
265
265
|
const a = new URLSearchParams();
|
|
266
|
-
a.set("buildingId", i), a.set("offset", String(r)), a.set("page", String(s)),
|
|
266
|
+
a.set("buildingId", i), a.set("offset", String(r)), a.set("page", String(s)), m(n) && a.set("keywords", n), o && a.set("orderBy", o);
|
|
267
267
|
const l = `${H}?${a.toString()}`;
|
|
268
268
|
return this._filterPoiProperties(
|
|
269
269
|
l,
|
|
@@ -283,10 +283,10 @@ class fi {
|
|
|
283
283
|
keywords: n,
|
|
284
284
|
orderBy: o
|
|
285
285
|
} = e;
|
|
286
|
-
if (!
|
|
286
|
+
if (!m(i))
|
|
287
287
|
throw new Error("'venueId' must be a non-empty string.");
|
|
288
288
|
const a = new URLSearchParams();
|
|
289
|
-
a.set("venueId", i), a.set("offset", String(r)), a.set("page", String(s)),
|
|
289
|
+
a.set("venueId", i), a.set("offset", String(r)), a.set("page", String(s)), m(n) && a.set("keywords", n), o && a.set("orderBy", o);
|
|
290
290
|
const l = `${H}?${a.toString()}`;
|
|
291
291
|
return this._filterPoiProperties(l, z);
|
|
292
292
|
}
|
|
@@ -303,7 +303,7 @@ class fi {
|
|
|
303
303
|
"Either 'floorIds' or 'sharedFloorIds' must be a non-empty array."
|
|
304
304
|
);
|
|
305
305
|
const { offset: o = A, page: a = M, keywords: l, orderBy: d } = e, u = new URLSearchParams();
|
|
306
|
-
u.set("offset", String(o)), u.set("page", String(a)), u.set(i, r),
|
|
306
|
+
u.set("offset", String(o)), u.set("page", String(a)), u.set(i, r), m(l) && u.set("keywords", l), d && u.set("orderBy", d);
|
|
307
307
|
const c = `${H}?${u.toString()}`;
|
|
308
308
|
return this._filterPoiProperties(c, z);
|
|
309
309
|
}
|
|
@@ -316,9 +316,9 @@ class fi {
|
|
|
316
316
|
center: i,
|
|
317
317
|
angle: r,
|
|
318
318
|
distance: s,
|
|
319
|
-
distanceSearchType: n =
|
|
319
|
+
distanceSearchType: n = pi.POINT
|
|
320
320
|
} = e;
|
|
321
|
-
if (!
|
|
321
|
+
if (!Z(i))
|
|
322
322
|
throw new Error(
|
|
323
323
|
"Invalid center parameter. Expected an array of two numbers."
|
|
324
324
|
);
|
|
@@ -332,15 +332,15 @@ class fi {
|
|
|
332
332
|
);
|
|
333
333
|
const o = new URLSearchParams();
|
|
334
334
|
if ("ordinal" in e) {
|
|
335
|
-
if (!
|
|
335
|
+
if (!m(e.ordinal))
|
|
336
336
|
throw new Error("'ordinal' must be a non-empty string.");
|
|
337
337
|
o.set("ordinal", e.ordinal);
|
|
338
338
|
} else if ("floorId" in e) {
|
|
339
|
-
if (!
|
|
339
|
+
if (!m(e.floorId))
|
|
340
340
|
throw new Error("'floorId' must be a non-empty string.");
|
|
341
341
|
o.set("floorId", e.floorId);
|
|
342
342
|
} else if ("buildingId" in e) {
|
|
343
|
-
if (!
|
|
343
|
+
if (!m(e.buildingId))
|
|
344
344
|
throw new Error("'buildingId' must be a non-empty string.");
|
|
345
345
|
o.set("buildingId", e.buildingId);
|
|
346
346
|
} else
|
|
@@ -349,7 +349,7 @@ class fi {
|
|
|
349
349
|
);
|
|
350
350
|
o.set("center", i.join()), o.set("angle", String(Math.round(r))), o.set("distance", String(s)), o.set("distanceSearchType", n);
|
|
351
351
|
const a = `${H}/orientation?${o.toString()}`;
|
|
352
|
-
return (await
|
|
352
|
+
return (await qe.getHttpSession()).request(a);
|
|
353
353
|
}
|
|
354
354
|
/**
|
|
355
355
|
* Search POIs by category or excluded categories.
|
|
@@ -357,7 +357,7 @@ class fi {
|
|
|
357
357
|
*/
|
|
358
358
|
searchByCategory(e) {
|
|
359
359
|
const { center: i, distance: r, page: s = M, offset: n = A } = e;
|
|
360
|
-
if (!
|
|
360
|
+
if (!Z(i))
|
|
361
361
|
throw new Error(
|
|
362
362
|
"Invalid center parameter. Expected an array of two numbers."
|
|
363
363
|
);
|
|
@@ -366,7 +366,7 @@ class fi {
|
|
|
366
366
|
"Invalid distance parameter. Expected a positive number and no more than 10000"
|
|
367
367
|
);
|
|
368
368
|
const o = new URLSearchParams();
|
|
369
|
-
if ("category" in e &&
|
|
369
|
+
if ("category" in e && m(e.category))
|
|
370
370
|
o.set("category", String(e.category));
|
|
371
371
|
else if ("excludedCategories" in e && k(e.excludedCategories))
|
|
372
372
|
o.set(
|
|
@@ -382,27 +382,28 @@ class fi {
|
|
|
382
382
|
return this._filterPoiProperties(a, z);
|
|
383
383
|
}
|
|
384
384
|
/**
|
|
385
|
+
* @deprecated Use CategoryService.searchCategories() instead.
|
|
385
386
|
* Search poi categories by venue id, building id, or floor id.
|
|
386
387
|
* @param {TSearchCategoriesOptions} options
|
|
387
388
|
*/
|
|
388
389
|
async searchCategories(e) {
|
|
389
390
|
const i = new URLSearchParams();
|
|
390
|
-
if ("floorId" in e &&
|
|
391
|
+
if ("floorId" in e && m(e.floorId) ? i.set("floorId", e.floorId) : "buildingId" in e && m(e.buildingId) ? i.set("buildingId", e.buildingId) : "sharedFloorId" in e && m(e.sharedFloorId) ? i.set("sharedFloorId", e.sharedFloorId) : "venueId" in e && m(e.venueId) && i.set("venueId", e.venueId), "bounds" in e && ce(e.bounds) && (i.set("bbox", e.bounds.flat().join()), m(e.keywords) && i.set("keywords", e.keywords)), i.toString().length === 0)
|
|
391
392
|
throw new Error(
|
|
392
393
|
"At least one of 'floorId', 'buildingId', 'sharedFloorId', 'venueId', or 'bounds' must be provided."
|
|
393
394
|
);
|
|
394
|
-
const r = `${
|
|
395
|
-
return (await
|
|
395
|
+
const r = `${_i}?${i.toString()}`;
|
|
396
|
+
return (await qe.getHttpSession()).request(r);
|
|
396
397
|
}
|
|
397
398
|
search(e) {
|
|
398
399
|
const i = new URLSearchParams();
|
|
399
400
|
Object.entries(e).forEach(([s, n]) => {
|
|
400
401
|
switch (s) {
|
|
401
402
|
case "bounds":
|
|
402
|
-
|
|
403
|
+
ce(n) && i.set("bbox", n.flat().join());
|
|
403
404
|
break;
|
|
404
405
|
case "center":
|
|
405
|
-
|
|
406
|
+
Z(n) && i.set("center", n.join());
|
|
406
407
|
break;
|
|
407
408
|
case "excludedCategories":
|
|
408
409
|
const o = k(n);
|
|
@@ -424,7 +425,7 @@ class fi {
|
|
|
424
425
|
return this._filterPoiProperties(r, z);
|
|
425
426
|
}
|
|
426
427
|
async _filterPoiProperties(e, i) {
|
|
427
|
-
const s = await (await
|
|
428
|
+
const s = await (await qe.getHttpSession()).request(e), n = s.result.pois.map(i);
|
|
428
429
|
return {
|
|
429
430
|
...s,
|
|
430
431
|
result: {
|
|
@@ -435,9 +436,9 @@ class fi {
|
|
|
435
436
|
}
|
|
436
437
|
}
|
|
437
438
|
function z(t) {
|
|
438
|
-
return "sharedFloorId" in t,
|
|
439
|
+
return "sharedFloorId" in t, He(t, At);
|
|
439
440
|
}
|
|
440
|
-
const
|
|
441
|
+
const Fr = [
|
|
441
442
|
"opening_hours",
|
|
442
443
|
"description",
|
|
443
444
|
"phone",
|
|
@@ -445,8 +446,8 @@ const Pr = [
|
|
|
445
446
|
"email",
|
|
446
447
|
"appURL",
|
|
447
448
|
"icon"
|
|
448
|
-
],
|
|
449
|
-
class
|
|
449
|
+
], Cr = pe.getInstance();
|
|
450
|
+
class yi {
|
|
450
451
|
constructor() {
|
|
451
452
|
}
|
|
452
453
|
/**
|
|
@@ -457,10 +458,10 @@ class pi {
|
|
|
457
458
|
const i = k(e);
|
|
458
459
|
if (!i)
|
|
459
460
|
throw new Error("Please input venue id at least one.");
|
|
460
|
-
const r = `${
|
|
461
|
+
const r = `${re}/${i}`;
|
|
461
462
|
return this._filterVenueProperties(
|
|
462
463
|
r,
|
|
463
|
-
|
|
464
|
+
se
|
|
464
465
|
);
|
|
465
466
|
}
|
|
466
467
|
/**
|
|
@@ -475,7 +476,7 @@ class pi {
|
|
|
475
476
|
offset: n = A,
|
|
476
477
|
page: o = M
|
|
477
478
|
} = e;
|
|
478
|
-
if (!
|
|
479
|
+
if (!Z(i))
|
|
479
480
|
throw new Error(
|
|
480
481
|
"Invalid center parameter. Expected an array of two numbers."
|
|
481
482
|
);
|
|
@@ -484,11 +485,11 @@ class pi {
|
|
|
484
485
|
"Invalid distance parameter. Expected a positive number and no more than 10000."
|
|
485
486
|
);
|
|
486
487
|
const a = new URLSearchParams();
|
|
487
|
-
a.set("center", i.join(",")), a.set("distance", String(r)), a.set("offset", String(n)), a.set("page", String(o)),
|
|
488
|
-
const l = `${
|
|
488
|
+
a.set("center", i.join(",")), a.set("distance", String(r)), a.set("offset", String(n)), a.set("page", String(o)), m(s) && a.set("keywords", s);
|
|
489
|
+
const l = `${re}?${a.toString()}`;
|
|
489
490
|
return this._filterVenueProperties(
|
|
490
491
|
l,
|
|
491
|
-
|
|
492
|
+
se
|
|
492
493
|
);
|
|
493
494
|
}
|
|
494
495
|
/**
|
|
@@ -497,16 +498,16 @@ class pi {
|
|
|
497
498
|
*/
|
|
498
499
|
searchByBounds(e) {
|
|
499
500
|
const { keywords: i, bounds: r, offset: s = A, page: n = M } = e;
|
|
500
|
-
if (!
|
|
501
|
+
if (!ce(r))
|
|
501
502
|
throw new Error(
|
|
502
503
|
"'bounds' must be an array of two arrays, each containing two numbers."
|
|
503
504
|
);
|
|
504
505
|
const o = new URLSearchParams();
|
|
505
|
-
o.set("bbox", r.flat().join()), o.set("offset", String(s)), o.set("page", String(n)),
|
|
506
|
-
const a = `${
|
|
506
|
+
o.set("bbox", r.flat().join()), o.set("offset", String(s)), o.set("page", String(n)), m(i) && o.set("keywords", i);
|
|
507
|
+
const a = `${re}?${o.toString()}`;
|
|
507
508
|
return this._filterVenueProperties(
|
|
508
509
|
a,
|
|
509
|
-
|
|
510
|
+
se
|
|
510
511
|
);
|
|
511
512
|
}
|
|
512
513
|
/**
|
|
@@ -515,20 +516,20 @@ class pi {
|
|
|
515
516
|
*/
|
|
516
517
|
searchByGlobal(e) {
|
|
517
518
|
const { keywords: i, offset: r = A, page: s = M } = e, n = new URLSearchParams();
|
|
518
|
-
n.set("offset", String(r)), n.set("page", String(s)),
|
|
519
|
-
const o = `${
|
|
519
|
+
n.set("offset", String(r)), n.set("page", String(s)), m(i) && n.set("keywords", i);
|
|
520
|
+
const o = `${re}?${n.toString()}`;
|
|
520
521
|
return this._filterVenueProperties(
|
|
521
522
|
o,
|
|
522
|
-
|
|
523
|
+
se
|
|
523
524
|
);
|
|
524
525
|
}
|
|
525
526
|
searchBySharedFloorId(e) {
|
|
526
|
-
if (!
|
|
527
|
+
if (!m(e))
|
|
527
528
|
throw new Error("Please input correct sharedFloorId.");
|
|
528
|
-
const i = `${
|
|
529
|
+
const i = `${re}/shared_floors/${e}`;
|
|
529
530
|
return this._filterVenueProperties(
|
|
530
531
|
i,
|
|
531
|
-
|
|
532
|
+
se
|
|
532
533
|
);
|
|
533
534
|
}
|
|
534
535
|
search(e) {
|
|
@@ -536,14 +537,14 @@ class pi {
|
|
|
536
537
|
Object.entries(e).forEach(([s, n]) => {
|
|
537
538
|
s === "bounds" ? i.set("bbox", n.flat().join()) : s === "center" ? i.set("center", n.join()) : i.set(s, String(n));
|
|
538
539
|
});
|
|
539
|
-
const r = `${
|
|
540
|
+
const r = `${re}?${i.toString()}`;
|
|
540
541
|
return this._filterVenueProperties(
|
|
541
542
|
r,
|
|
542
|
-
|
|
543
|
+
se
|
|
543
544
|
);
|
|
544
545
|
}
|
|
545
546
|
async _filterVenueProperties(e, i) {
|
|
546
|
-
const s = await (await
|
|
547
|
+
const s = await (await Cr.getHttpSession()).request(e), n = s.result.venues.map(i);
|
|
547
548
|
return {
|
|
548
549
|
...s,
|
|
549
550
|
result: {
|
|
@@ -553,10 +554,10 @@ class pi {
|
|
|
553
554
|
};
|
|
554
555
|
}
|
|
555
556
|
}
|
|
556
|
-
function
|
|
557
|
-
return
|
|
557
|
+
function se(t) {
|
|
558
|
+
return He(t, Fr);
|
|
558
559
|
}
|
|
559
|
-
const
|
|
560
|
+
const Er = [
|
|
560
561
|
"specialHours",
|
|
561
562
|
"businessStatus",
|
|
562
563
|
"serviceHours",
|
|
@@ -566,8 +567,8 @@ const Cr = [
|
|
|
566
567
|
"totalPhotoCount",
|
|
567
568
|
"photos",
|
|
568
569
|
"description"
|
|
569
|
-
],
|
|
570
|
-
class
|
|
570
|
+
], xr = pe.getInstance();
|
|
571
|
+
class mi {
|
|
571
572
|
constructor() {
|
|
572
573
|
}
|
|
573
574
|
/**
|
|
@@ -578,10 +579,10 @@ class gi {
|
|
|
578
579
|
const i = k(e);
|
|
579
580
|
if (!i)
|
|
580
581
|
throw new Error("Please input building id at least one.");
|
|
581
|
-
const r = `${
|
|
582
|
+
const r = `${ne}/${i}`;
|
|
582
583
|
return this._filterBuildingProperties(
|
|
583
584
|
r,
|
|
584
|
-
|
|
585
|
+
oe
|
|
585
586
|
);
|
|
586
587
|
}
|
|
587
588
|
/**
|
|
@@ -596,7 +597,7 @@ class gi {
|
|
|
596
597
|
offset: n = A,
|
|
597
598
|
page: o = M
|
|
598
599
|
} = e;
|
|
599
|
-
if (!
|
|
600
|
+
if (!Z(i))
|
|
600
601
|
throw new Error(
|
|
601
602
|
"Invalid center parameter. Expected an array of two numbers."
|
|
602
603
|
);
|
|
@@ -605,11 +606,11 @@ class gi {
|
|
|
605
606
|
"Invalid distance parameter. Expected a positive number and no more than 10000."
|
|
606
607
|
);
|
|
607
608
|
const a = new URLSearchParams();
|
|
608
|
-
a.set("center", i.join(",")), a.set("distance", String(r)), a.set("offset", String(n)), a.set("page", String(o)),
|
|
609
|
-
const l = `${
|
|
609
|
+
a.set("center", i.join(",")), a.set("distance", String(r)), a.set("offset", String(n)), a.set("page", String(o)), m(s) && a.set("keywords", s);
|
|
610
|
+
const l = `${ne}?${a.toString()}`;
|
|
610
611
|
return this._filterBuildingProperties(
|
|
611
612
|
l,
|
|
612
|
-
|
|
613
|
+
oe
|
|
613
614
|
);
|
|
614
615
|
}
|
|
615
616
|
/**
|
|
@@ -618,16 +619,16 @@ class gi {
|
|
|
618
619
|
*/
|
|
619
620
|
searchByBounds(e) {
|
|
620
621
|
const { bounds: i, offset: r = A, page: s = M, keywords: n } = e;
|
|
621
|
-
if (!
|
|
622
|
+
if (!ce(i))
|
|
622
623
|
throw new Error(
|
|
623
624
|
"'bounds' must be an array of two arrays, each containing two numbers."
|
|
624
625
|
);
|
|
625
626
|
const o = new URLSearchParams();
|
|
626
|
-
o.set("bbox", i.flat().join()), o.set("offset", String(r)), o.set("page", String(s)),
|
|
627
|
-
const a = `${
|
|
627
|
+
o.set("bbox", i.flat().join()), o.set("offset", String(r)), o.set("page", String(s)), m(n) && o.set("keywords", n);
|
|
628
|
+
const a = `${ne}?${o.toString()}`;
|
|
628
629
|
return this._filterBuildingProperties(
|
|
629
630
|
a,
|
|
630
|
-
|
|
631
|
+
oe
|
|
631
632
|
);
|
|
632
633
|
}
|
|
633
634
|
/**
|
|
@@ -636,11 +637,11 @@ class gi {
|
|
|
636
637
|
*/
|
|
637
638
|
searchByGlobal(e) {
|
|
638
639
|
const { keywords: i, offset: r = A, page: s = M } = e, n = new URLSearchParams();
|
|
639
|
-
n.set("searchGlobal", String(!0)), n.set("offset", String(r)), n.set("page", String(s)),
|
|
640
|
-
const o = `${
|
|
640
|
+
n.set("searchGlobal", String(!0)), n.set("offset", String(r)), n.set("page", String(s)), m(i) && n.set("keywords", i);
|
|
641
|
+
const o = `${ne}?${n.toString()}`;
|
|
641
642
|
return this._filterBuildingProperties(
|
|
642
643
|
o,
|
|
643
|
-
|
|
644
|
+
oe
|
|
644
645
|
);
|
|
645
646
|
}
|
|
646
647
|
/**
|
|
@@ -648,12 +649,12 @@ class gi {
|
|
|
648
649
|
* @param floorId
|
|
649
650
|
*/
|
|
650
651
|
searchByFloorId(e) {
|
|
651
|
-
if (!
|
|
652
|
+
if (!m(e))
|
|
652
653
|
throw new Error("'floorId' cannot be empty.");
|
|
653
|
-
const i = `${
|
|
654
|
+
const i = `${ne}/floors/${e}`;
|
|
654
655
|
return this._filterBuildingProperties(
|
|
655
656
|
i,
|
|
656
|
-
|
|
657
|
+
oe
|
|
657
658
|
);
|
|
658
659
|
}
|
|
659
660
|
search(e) {
|
|
@@ -661,14 +662,14 @@ class gi {
|
|
|
661
662
|
Object.entries(e).forEach(([s, n]) => {
|
|
662
663
|
s === "bounds" ? i.set("bbox", n.flat().join()) : s === "center" ? i.set("center", n.join()) : i.set(s, String(n));
|
|
663
664
|
});
|
|
664
|
-
const r = `${
|
|
665
|
+
const r = `${ne}?${i.toString()}`;
|
|
665
666
|
return this._filterBuildingProperties(
|
|
666
667
|
r,
|
|
667
|
-
|
|
668
|
+
oe
|
|
668
669
|
);
|
|
669
670
|
}
|
|
670
671
|
async _filterBuildingProperties(e, i) {
|
|
671
|
-
const s = await (await
|
|
672
|
+
const s = await (await xr.getHttpSession()).request(e), n = s.result.buildings.map(i);
|
|
672
673
|
return {
|
|
673
674
|
...s,
|
|
674
675
|
result: {
|
|
@@ -678,25 +679,25 @@ class gi {
|
|
|
678
679
|
};
|
|
679
680
|
}
|
|
680
681
|
}
|
|
681
|
-
function
|
|
682
|
-
return
|
|
682
|
+
function oe(t) {
|
|
683
|
+
return He(t, Er);
|
|
683
684
|
}
|
|
684
|
-
const
|
|
685
|
-
async function
|
|
686
|
-
return (await
|
|
685
|
+
const bi = new mi(), vi = new yi(), Or = new gi();
|
|
686
|
+
async function ot(t) {
|
|
687
|
+
return (await bi.searchByIds(t)).result.buildings[0];
|
|
687
688
|
}
|
|
688
|
-
async function
|
|
689
|
-
const i = (await
|
|
690
|
-
return await
|
|
689
|
+
async function $r(t) {
|
|
690
|
+
const i = (await bi.searchByFloorId(t)).result.buildings[0].buildingId;
|
|
691
|
+
return await ot(i);
|
|
691
692
|
}
|
|
692
|
-
async function
|
|
693
|
-
return (await
|
|
693
|
+
async function at(t) {
|
|
694
|
+
return (await vi.searchByIds(t)).result.venues[0];
|
|
694
695
|
}
|
|
695
|
-
async function
|
|
696
|
-
return (await
|
|
696
|
+
async function Si(t) {
|
|
697
|
+
return (await vi.searchBySharedFloorId(t)).result.venues[0];
|
|
697
698
|
}
|
|
698
|
-
async function
|
|
699
|
-
return (await
|
|
699
|
+
async function Mr(t) {
|
|
700
|
+
return (await Or.searchByIds([t])).result.pois[0];
|
|
700
701
|
}
|
|
701
702
|
class Y {
|
|
702
703
|
static instance;
|
|
@@ -732,33 +733,33 @@ class Y {
|
|
|
732
733
|
));
|
|
733
734
|
}
|
|
734
735
|
}
|
|
735
|
-
var
|
|
736
|
-
function
|
|
737
|
-
var e =
|
|
736
|
+
var Li = typeof global == "object" && global && global.Object === Object && global, Ar = typeof self == "object" && self && self.Object === Object && self, R = Li || Ar || Function("return this")(), W = R.Symbol, Ii = Object.prototype, Tr = Ii.hasOwnProperty, kr = Ii.toString, ve = W ? W.toStringTag : void 0;
|
|
737
|
+
function Rr(t) {
|
|
738
|
+
var e = Tr.call(t, ve), i = t[ve];
|
|
738
739
|
try {
|
|
739
|
-
t[
|
|
740
|
+
t[ve] = void 0;
|
|
740
741
|
var r = !0;
|
|
741
742
|
} catch {
|
|
742
743
|
}
|
|
743
|
-
var s =
|
|
744
|
-
return r && (e ? t[
|
|
744
|
+
var s = kr.call(t);
|
|
745
|
+
return r && (e ? t[ve] = i : delete t[ve]), s;
|
|
745
746
|
}
|
|
746
|
-
var
|
|
747
|
-
function
|
|
748
|
-
return
|
|
747
|
+
var Dr = Object.prototype, Hr = Dr.toString;
|
|
748
|
+
function Nr(t) {
|
|
749
|
+
return Hr.call(t);
|
|
749
750
|
}
|
|
750
|
-
var
|
|
751
|
-
function
|
|
752
|
-
return t == null ? t === void 0 ?
|
|
751
|
+
var Ur = "[object Null]", jr = "[object Undefined]", Tt = W ? W.toStringTag : void 0;
|
|
752
|
+
function ge(t) {
|
|
753
|
+
return t == null ? t === void 0 ? jr : Ur : Tt && Tt in Object(t) ? Rr(t) : Nr(t);
|
|
753
754
|
}
|
|
754
|
-
function
|
|
755
|
+
function _e(t) {
|
|
755
756
|
return t != null && typeof t == "object";
|
|
756
757
|
}
|
|
757
|
-
var
|
|
758
|
+
var Vr = "[object Symbol]";
|
|
758
759
|
function Ce(t) {
|
|
759
|
-
return typeof t == "symbol" ||
|
|
760
|
+
return typeof t == "symbol" || _e(t) && ge(t) == Vr;
|
|
760
761
|
}
|
|
761
|
-
function
|
|
762
|
+
function qr(t, e, i) {
|
|
762
763
|
for (var r = -1, s = t.length; ++r < s; ) {
|
|
763
764
|
var n = t[r], o = e(n);
|
|
764
765
|
if (o != null && (a === void 0 ? o === o && !Ce(o) : i(o, a)))
|
|
@@ -766,35 +767,35 @@ function Vr(t, e, i) {
|
|
|
766
767
|
}
|
|
767
768
|
return l;
|
|
768
769
|
}
|
|
769
|
-
function
|
|
770
|
+
function zr() {
|
|
770
771
|
this.__data__ = [], this.size = 0;
|
|
771
772
|
}
|
|
772
|
-
function
|
|
773
|
+
function wi(t, e) {
|
|
773
774
|
return t === e || t !== t && e !== e;
|
|
774
775
|
}
|
|
775
|
-
function
|
|
776
|
+
function Ue(t, e) {
|
|
776
777
|
for (var i = t.length; i--; )
|
|
777
|
-
if (
|
|
778
|
+
if (wi(t[i][0], e))
|
|
778
779
|
return i;
|
|
779
780
|
return -1;
|
|
780
781
|
}
|
|
781
|
-
var
|
|
782
|
-
function
|
|
783
|
-
var e = this.__data__, i =
|
|
782
|
+
var Gr = Array.prototype, Yr = Gr.splice;
|
|
783
|
+
function Wr(t) {
|
|
784
|
+
var e = this.__data__, i = Ue(e, t);
|
|
784
785
|
if (i < 0)
|
|
785
786
|
return !1;
|
|
786
787
|
var r = e.length - 1;
|
|
787
|
-
return i == r ? e.pop() :
|
|
788
|
+
return i == r ? e.pop() : Yr.call(e, i, 1), --this.size, !0;
|
|
788
789
|
}
|
|
789
|
-
function
|
|
790
|
-
var e = this.__data__, i =
|
|
790
|
+
function Kr(t) {
|
|
791
|
+
var e = this.__data__, i = Ue(e, t);
|
|
791
792
|
return i < 0 ? void 0 : e[i][1];
|
|
792
793
|
}
|
|
793
|
-
function
|
|
794
|
-
return
|
|
794
|
+
function Xr(t) {
|
|
795
|
+
return Ue(this.__data__, t) > -1;
|
|
795
796
|
}
|
|
796
|
-
function
|
|
797
|
-
var i = this.__data__, r =
|
|
797
|
+
function Qr(t, e) {
|
|
798
|
+
var i = this.__data__, r = Ue(i, t);
|
|
798
799
|
return r < 0 ? (++this.size, i.push([t, e])) : i[r][1] = e, this;
|
|
799
800
|
}
|
|
800
801
|
function V(t) {
|
|
@@ -804,47 +805,47 @@ function V(t) {
|
|
|
804
805
|
this.set(r[0], r[1]);
|
|
805
806
|
}
|
|
806
807
|
}
|
|
807
|
-
V.prototype.clear =
|
|
808
|
-
V.prototype.delete =
|
|
809
|
-
V.prototype.get =
|
|
810
|
-
V.prototype.has =
|
|
811
|
-
V.prototype.set =
|
|
812
|
-
function
|
|
808
|
+
V.prototype.clear = zr;
|
|
809
|
+
V.prototype.delete = Wr;
|
|
810
|
+
V.prototype.get = Kr;
|
|
811
|
+
V.prototype.has = Xr;
|
|
812
|
+
V.prototype.set = Qr;
|
|
813
|
+
function Zr() {
|
|
813
814
|
this.__data__ = new V(), this.size = 0;
|
|
814
815
|
}
|
|
815
|
-
function
|
|
816
|
+
function Jr(t) {
|
|
816
817
|
var e = this.__data__, i = e.delete(t);
|
|
817
818
|
return this.size = e.size, i;
|
|
818
819
|
}
|
|
819
|
-
function
|
|
820
|
+
function en(t) {
|
|
820
821
|
return this.__data__.get(t);
|
|
821
822
|
}
|
|
822
|
-
function
|
|
823
|
+
function tn(t) {
|
|
823
824
|
return this.__data__.has(t);
|
|
824
825
|
}
|
|
825
|
-
function
|
|
826
|
+
function fe(t) {
|
|
826
827
|
var e = typeof t;
|
|
827
828
|
return t != null && (e == "object" || e == "function");
|
|
828
829
|
}
|
|
829
|
-
var
|
|
830
|
-
function
|
|
831
|
-
if (!
|
|
830
|
+
var rn = "[object AsyncFunction]", nn = "[object Function]", sn = "[object GeneratorFunction]", on = "[object Proxy]";
|
|
831
|
+
function Bi(t) {
|
|
832
|
+
if (!fe(t))
|
|
832
833
|
return !1;
|
|
833
|
-
var e =
|
|
834
|
-
return e ==
|
|
834
|
+
var e = ge(t);
|
|
835
|
+
return e == nn || e == sn || e == rn || e == on;
|
|
835
836
|
}
|
|
836
|
-
var
|
|
837
|
-
var t = /[^.]+$/.exec(
|
|
837
|
+
var ze = R["__core-js_shared__"], kt = (function() {
|
|
838
|
+
var t = /[^.]+$/.exec(ze && ze.keys && ze.keys.IE_PROTO || "");
|
|
838
839
|
return t ? "Symbol(src)_1." + t : "";
|
|
839
840
|
})();
|
|
840
|
-
function
|
|
841
|
-
return !!
|
|
841
|
+
function an(t) {
|
|
842
|
+
return !!kt && kt in t;
|
|
842
843
|
}
|
|
843
|
-
var
|
|
844
|
-
function
|
|
844
|
+
var ln = Function.prototype, dn = ln.toString;
|
|
845
|
+
function te(t) {
|
|
845
846
|
if (t != null) {
|
|
846
847
|
try {
|
|
847
|
-
return
|
|
848
|
+
return dn.call(t);
|
|
848
849
|
} catch {
|
|
849
850
|
}
|
|
850
851
|
try {
|
|
@@ -854,88 +855,88 @@ function ie(t) {
|
|
|
854
855
|
}
|
|
855
856
|
return "";
|
|
856
857
|
}
|
|
857
|
-
var
|
|
858
|
-
"^" +
|
|
858
|
+
var un = /[\\^$.*+?()[\]{}|]/g, cn = /^\[object .+?Constructor\]$/, hn = Function.prototype, _n = Object.prototype, fn = hn.toString, pn = _n.hasOwnProperty, gn = RegExp(
|
|
859
|
+
"^" + fn.call(pn).replace(un, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
859
860
|
);
|
|
860
|
-
function
|
|
861
|
-
if (!
|
|
861
|
+
function yn(t) {
|
|
862
|
+
if (!fe(t) || an(t))
|
|
862
863
|
return !1;
|
|
863
|
-
var e =
|
|
864
|
-
return e.test(
|
|
864
|
+
var e = Bi(t) ? gn : cn;
|
|
865
|
+
return e.test(te(t));
|
|
865
866
|
}
|
|
866
|
-
function
|
|
867
|
+
function mn(t, e) {
|
|
867
868
|
return t?.[e];
|
|
868
869
|
}
|
|
869
|
-
function
|
|
870
|
-
var i =
|
|
871
|
-
return
|
|
870
|
+
function ye(t, e) {
|
|
871
|
+
var i = mn(t, e);
|
|
872
|
+
return yn(i) ? i : void 0;
|
|
872
873
|
}
|
|
873
|
-
var
|
|
874
|
-
function
|
|
875
|
-
this.__data__ =
|
|
874
|
+
var Be = ye(R, "Map"), Pe = ye(Object, "create");
|
|
875
|
+
function bn() {
|
|
876
|
+
this.__data__ = Pe ? Pe(null) : {}, this.size = 0;
|
|
876
877
|
}
|
|
877
|
-
function
|
|
878
|
+
function vn(t) {
|
|
878
879
|
var e = this.has(t) && delete this.__data__[t];
|
|
879
880
|
return this.size -= e ? 1 : 0, e;
|
|
880
881
|
}
|
|
881
|
-
var Sn = "__lodash_hash_undefined__",
|
|
882
|
-
function
|
|
882
|
+
var Sn = "__lodash_hash_undefined__", Ln = Object.prototype, In = Ln.hasOwnProperty;
|
|
883
|
+
function wn(t) {
|
|
883
884
|
var e = this.__data__;
|
|
884
|
-
if (
|
|
885
|
+
if (Pe) {
|
|
885
886
|
var i = e[t];
|
|
886
887
|
return i === Sn ? void 0 : i;
|
|
887
888
|
}
|
|
888
|
-
return
|
|
889
|
+
return In.call(e, t) ? e[t] : void 0;
|
|
889
890
|
}
|
|
890
|
-
var
|
|
891
|
-
function
|
|
891
|
+
var Bn = Object.prototype, Pn = Bn.hasOwnProperty;
|
|
892
|
+
function Fn(t) {
|
|
892
893
|
var e = this.__data__;
|
|
893
|
-
return
|
|
894
|
+
return Pe ? e[t] !== void 0 : Pn.call(e, t);
|
|
894
895
|
}
|
|
895
|
-
var
|
|
896
|
-
function
|
|
896
|
+
var Cn = "__lodash_hash_undefined__";
|
|
897
|
+
function En(t, e) {
|
|
897
898
|
var i = this.__data__;
|
|
898
|
-
return this.size += this.has(t) ? 0 : 1, i[t] =
|
|
899
|
+
return this.size += this.has(t) ? 0 : 1, i[t] = Pe && e === void 0 ? Cn : e, this;
|
|
899
900
|
}
|
|
900
|
-
function
|
|
901
|
+
function ee(t) {
|
|
901
902
|
var e = -1, i = t == null ? 0 : t.length;
|
|
902
903
|
for (this.clear(); ++e < i; ) {
|
|
903
904
|
var r = t[e];
|
|
904
905
|
this.set(r[0], r[1]);
|
|
905
906
|
}
|
|
906
907
|
}
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
function
|
|
908
|
+
ee.prototype.clear = bn;
|
|
909
|
+
ee.prototype.delete = vn;
|
|
910
|
+
ee.prototype.get = wn;
|
|
911
|
+
ee.prototype.has = Fn;
|
|
912
|
+
ee.prototype.set = En;
|
|
913
|
+
function xn() {
|
|
913
914
|
this.size = 0, this.__data__ = {
|
|
914
|
-
hash: new
|
|
915
|
-
map: new (
|
|
916
|
-
string: new
|
|
915
|
+
hash: new ee(),
|
|
916
|
+
map: new (Be || V)(),
|
|
917
|
+
string: new ee()
|
|
917
918
|
};
|
|
918
919
|
}
|
|
919
|
-
function
|
|
920
|
+
function On(t) {
|
|
920
921
|
var e = typeof t;
|
|
921
922
|
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
|
|
922
923
|
}
|
|
923
|
-
function
|
|
924
|
+
function je(t, e) {
|
|
924
925
|
var i = t.__data__;
|
|
925
|
-
return
|
|
926
|
-
}
|
|
927
|
-
function On(t) {
|
|
928
|
-
var e = Ye(this, t).delete(t);
|
|
929
|
-
return this.size -= e ? 1 : 0, e;
|
|
926
|
+
return On(e) ? i[typeof e == "string" ? "string" : "hash"] : i.map;
|
|
930
927
|
}
|
|
931
928
|
function $n(t) {
|
|
932
|
-
|
|
929
|
+
var e = je(this, t).delete(t);
|
|
930
|
+
return this.size -= e ? 1 : 0, e;
|
|
933
931
|
}
|
|
934
932
|
function Mn(t) {
|
|
935
|
-
return
|
|
933
|
+
return je(this, t).get(t);
|
|
934
|
+
}
|
|
935
|
+
function An(t) {
|
|
936
|
+
return je(this, t).has(t);
|
|
936
937
|
}
|
|
937
|
-
function
|
|
938
|
-
var i =
|
|
938
|
+
function Tn(t, e) {
|
|
939
|
+
var i = je(this, t), r = i.size;
|
|
939
940
|
return i.set(t, e), this.size += i.size == r ? 0 : 1, this;
|
|
940
941
|
}
|
|
941
942
|
function q(t) {
|
|
@@ -945,17 +946,17 @@ function q(t) {
|
|
|
945
946
|
this.set(r[0], r[1]);
|
|
946
947
|
}
|
|
947
948
|
}
|
|
948
|
-
q.prototype.clear =
|
|
949
|
-
q.prototype.delete =
|
|
950
|
-
q.prototype.get =
|
|
951
|
-
q.prototype.has =
|
|
952
|
-
q.prototype.set =
|
|
953
|
-
var
|
|
954
|
-
function
|
|
949
|
+
q.prototype.clear = xn;
|
|
950
|
+
q.prototype.delete = $n;
|
|
951
|
+
q.prototype.get = Mn;
|
|
952
|
+
q.prototype.has = An;
|
|
953
|
+
q.prototype.set = Tn;
|
|
954
|
+
var kn = 200;
|
|
955
|
+
function Rn(t, e) {
|
|
955
956
|
var i = this.__data__;
|
|
956
957
|
if (i instanceof V) {
|
|
957
958
|
var r = i.__data__;
|
|
958
|
-
if (!
|
|
959
|
+
if (!Be || r.length < kn - 1)
|
|
959
960
|
return r.push([t, e]), this.size = ++i.size, this;
|
|
960
961
|
i = this.__data__ = new q(r);
|
|
961
962
|
}
|
|
@@ -965,43 +966,43 @@ function U(t) {
|
|
|
965
966
|
var e = this.__data__ = new V(t);
|
|
966
967
|
this.size = e.size;
|
|
967
968
|
}
|
|
968
|
-
U.prototype.clear =
|
|
969
|
-
U.prototype.delete =
|
|
970
|
-
U.prototype.get =
|
|
971
|
-
U.prototype.has =
|
|
972
|
-
U.prototype.set =
|
|
973
|
-
var
|
|
974
|
-
function Dn(t) {
|
|
975
|
-
return this.__data__.set(t, Rn), this;
|
|
976
|
-
}
|
|
969
|
+
U.prototype.clear = Zr;
|
|
970
|
+
U.prototype.delete = Jr;
|
|
971
|
+
U.prototype.get = en;
|
|
972
|
+
U.prototype.has = tn;
|
|
973
|
+
U.prototype.set = Rn;
|
|
974
|
+
var Dn = "__lodash_hash_undefined__";
|
|
977
975
|
function Hn(t) {
|
|
976
|
+
return this.__data__.set(t, Dn), this;
|
|
977
|
+
}
|
|
978
|
+
function Nn(t) {
|
|
978
979
|
return this.__data__.has(t);
|
|
979
980
|
}
|
|
980
|
-
function
|
|
981
|
+
function Fe(t) {
|
|
981
982
|
var e = -1, i = t == null ? 0 : t.length;
|
|
982
983
|
for (this.__data__ = new q(); ++e < i; )
|
|
983
984
|
this.add(t[e]);
|
|
984
985
|
}
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
function
|
|
986
|
+
Fe.prototype.add = Fe.prototype.push = Hn;
|
|
987
|
+
Fe.prototype.has = Nn;
|
|
988
|
+
function Un(t, e) {
|
|
988
989
|
for (var i = -1, r = t == null ? 0 : t.length; ++i < r; )
|
|
989
990
|
if (e(t[i], i, t))
|
|
990
991
|
return !0;
|
|
991
992
|
return !1;
|
|
992
993
|
}
|
|
993
|
-
function
|
|
994
|
+
function Pi(t, e) {
|
|
994
995
|
return t.has(e);
|
|
995
996
|
}
|
|
996
|
-
var
|
|
997
|
-
function
|
|
998
|
-
var o = i &
|
|
997
|
+
var jn = 1, Vn = 2;
|
|
998
|
+
function Fi(t, e, i, r, s, n) {
|
|
999
|
+
var o = i & jn, a = t.length, l = e.length;
|
|
999
1000
|
if (a != l && !(o && l > a))
|
|
1000
1001
|
return !1;
|
|
1001
1002
|
var d = n.get(t), u = n.get(e);
|
|
1002
1003
|
if (d && u)
|
|
1003
1004
|
return d == e && u == t;
|
|
1004
|
-
var c = -1, h = !0, f = i &
|
|
1005
|
+
var c = -1, h = !0, f = i & Vn ? new Fe() : void 0;
|
|
1005
1006
|
for (n.set(t, e), n.set(e, t); ++c < a; ) {
|
|
1006
1007
|
var p = t[c], _ = e[c];
|
|
1007
1008
|
if (r)
|
|
@@ -1013,9 +1014,9 @@ function Bi(t, e, i, r, s, n) {
|
|
|
1013
1014
|
break;
|
|
1014
1015
|
}
|
|
1015
1016
|
if (f) {
|
|
1016
|
-
if (!
|
|
1017
|
-
if (!
|
|
1018
|
-
return f.push(
|
|
1017
|
+
if (!Un(e, function(y, v) {
|
|
1018
|
+
if (!Pi(f, v) && (p === y || s(p, y, i, r, n)))
|
|
1019
|
+
return f.push(v);
|
|
1019
1020
|
})) {
|
|
1020
1021
|
h = !1;
|
|
1021
1022
|
break;
|
|
@@ -1027,170 +1028,170 @@ function Bi(t, e, i, r, s, n) {
|
|
|
1027
1028
|
}
|
|
1028
1029
|
return n.delete(t), n.delete(e), h;
|
|
1029
1030
|
}
|
|
1030
|
-
var
|
|
1031
|
-
function
|
|
1031
|
+
var Rt = R.Uint8Array;
|
|
1032
|
+
function qn(t) {
|
|
1032
1033
|
var e = -1, i = Array(t.size);
|
|
1033
1034
|
return t.forEach(function(r, s) {
|
|
1034
1035
|
i[++e] = [s, r];
|
|
1035
1036
|
}), i;
|
|
1036
1037
|
}
|
|
1037
|
-
function
|
|
1038
|
+
function It(t) {
|
|
1038
1039
|
var e = -1, i = Array(t.size);
|
|
1039
1040
|
return t.forEach(function(r) {
|
|
1040
1041
|
i[++e] = r;
|
|
1041
1042
|
}), i;
|
|
1042
1043
|
}
|
|
1043
|
-
var
|
|
1044
|
-
function
|
|
1044
|
+
var zn = 1, Gn = 2, Yn = "[object Boolean]", Wn = "[object Date]", Kn = "[object Error]", Xn = "[object Map]", Qn = "[object Number]", Zn = "[object RegExp]", Jn = "[object Set]", es = "[object String]", ts = "[object Symbol]", is = "[object ArrayBuffer]", rs = "[object DataView]", Dt = W ? W.prototype : void 0, Ge = Dt ? Dt.valueOf : void 0;
|
|
1045
|
+
function ns(t, e, i, r, s, n, o) {
|
|
1045
1046
|
switch (i) {
|
|
1046
|
-
case
|
|
1047
|
+
case rs:
|
|
1047
1048
|
if (t.byteLength != e.byteLength || t.byteOffset != e.byteOffset)
|
|
1048
1049
|
return !1;
|
|
1049
1050
|
t = t.buffer, e = e.buffer;
|
|
1050
|
-
case
|
|
1051
|
-
return !(t.byteLength != e.byteLength || !n(new
|
|
1052
|
-
case Gn:
|
|
1051
|
+
case is:
|
|
1052
|
+
return !(t.byteLength != e.byteLength || !n(new Rt(t), new Rt(e)));
|
|
1053
1053
|
case Yn:
|
|
1054
|
-
case Xn:
|
|
1055
|
-
return Li(+t, +e);
|
|
1056
1054
|
case Wn:
|
|
1057
|
-
return t.name == e.name && t.message == e.message;
|
|
1058
1055
|
case Qn:
|
|
1059
|
-
|
|
1060
|
-
return t == e + "";
|
|
1056
|
+
return wi(+t, +e);
|
|
1061
1057
|
case Kn:
|
|
1062
|
-
|
|
1058
|
+
return t.name == e.name && t.message == e.message;
|
|
1063
1059
|
case Zn:
|
|
1064
|
-
|
|
1065
|
-
|
|
1060
|
+
case es:
|
|
1061
|
+
return t == e + "";
|
|
1062
|
+
case Xn:
|
|
1063
|
+
var a = qn;
|
|
1064
|
+
case Jn:
|
|
1065
|
+
var l = r & zn;
|
|
1066
|
+
if (a || (a = It), t.size != e.size && !l)
|
|
1066
1067
|
return !1;
|
|
1067
1068
|
var d = o.get(t);
|
|
1068
1069
|
if (d)
|
|
1069
1070
|
return d == e;
|
|
1070
|
-
r |=
|
|
1071
|
-
var u =
|
|
1071
|
+
r |= Gn, o.set(t, e);
|
|
1072
|
+
var u = Fi(a(t), a(e), r, s, n, o);
|
|
1072
1073
|
return o.delete(t), u;
|
|
1073
|
-
case
|
|
1074
|
-
if (
|
|
1075
|
-
return
|
|
1074
|
+
case ts:
|
|
1075
|
+
if (Ge)
|
|
1076
|
+
return Ge.call(t) == Ge.call(e);
|
|
1076
1077
|
}
|
|
1077
1078
|
return !1;
|
|
1078
1079
|
}
|
|
1079
|
-
function
|
|
1080
|
+
function ss(t, e) {
|
|
1080
1081
|
for (var i = -1, r = e.length, s = t.length; ++i < r; )
|
|
1081
1082
|
t[s + i] = e[i];
|
|
1082
1083
|
return t;
|
|
1083
1084
|
}
|
|
1084
1085
|
var j = Array.isArray;
|
|
1085
|
-
function
|
|
1086
|
+
function os(t, e, i) {
|
|
1086
1087
|
var r = e(t);
|
|
1087
|
-
return j(t) ? r :
|
|
1088
|
+
return j(t) ? r : ss(r, i(t));
|
|
1088
1089
|
}
|
|
1089
|
-
function
|
|
1090
|
+
function as(t, e) {
|
|
1090
1091
|
for (var i = -1, r = t == null ? 0 : t.length, s = 0, n = []; ++i < r; ) {
|
|
1091
1092
|
var o = t[i];
|
|
1092
1093
|
e(o, i, t) && (n[s++] = o);
|
|
1093
1094
|
}
|
|
1094
1095
|
return n;
|
|
1095
1096
|
}
|
|
1096
|
-
function
|
|
1097
|
+
function ls() {
|
|
1097
1098
|
return [];
|
|
1098
1099
|
}
|
|
1099
|
-
var
|
|
1100
|
-
return t == null ? [] : (t = Object(t),
|
|
1101
|
-
return
|
|
1100
|
+
var ds = Object.prototype, us = ds.propertyIsEnumerable, Ht = Object.getOwnPropertySymbols, cs = Ht ? function(t) {
|
|
1101
|
+
return t == null ? [] : (t = Object(t), as(Ht(t), function(e) {
|
|
1102
|
+
return us.call(t, e);
|
|
1102
1103
|
}));
|
|
1103
|
-
} :
|
|
1104
|
-
function
|
|
1104
|
+
} : ls;
|
|
1105
|
+
function hs(t, e) {
|
|
1105
1106
|
for (var i = -1, r = Array(t); ++i < t; )
|
|
1106
1107
|
r[i] = e(i);
|
|
1107
1108
|
return r;
|
|
1108
1109
|
}
|
|
1109
|
-
var
|
|
1110
|
-
function
|
|
1111
|
-
return
|
|
1110
|
+
var _s = "[object Arguments]";
|
|
1111
|
+
function Nt(t) {
|
|
1112
|
+
return _e(t) && ge(t) == _s;
|
|
1112
1113
|
}
|
|
1113
|
-
var
|
|
1114
|
+
var Ci = Object.prototype, fs = Ci.hasOwnProperty, ps = Ci.propertyIsEnumerable, Ei = Nt(/* @__PURE__ */ (function() {
|
|
1114
1115
|
return arguments;
|
|
1115
|
-
})()) ?
|
|
1116
|
-
return
|
|
1116
|
+
})()) ? Nt : function(t) {
|
|
1117
|
+
return _e(t) && fs.call(t, "callee") && !ps.call(t, "callee");
|
|
1117
1118
|
};
|
|
1118
|
-
function
|
|
1119
|
+
function gs() {
|
|
1119
1120
|
return !1;
|
|
1120
1121
|
}
|
|
1121
|
-
var
|
|
1122
|
-
function
|
|
1122
|
+
var xi = typeof exports == "object" && exports && !exports.nodeType && exports, Ut = xi && typeof module == "object" && module && !module.nodeType && module, ys = Ut && Ut.exports === xi, jt = ys ? R.Buffer : void 0, ms = jt ? jt.isBuffer : void 0, lt = ms || gs, bs = 9007199254740991, vs = /^(?:0|[1-9]\d*)$/;
|
|
1123
|
+
function Oi(t, e) {
|
|
1123
1124
|
var i = typeof t;
|
|
1124
|
-
return e = e ??
|
|
1125
|
+
return e = e ?? bs, !!e && (i == "number" || i != "symbol" && vs.test(t)) && t > -1 && t % 1 == 0 && t < e;
|
|
1125
1126
|
}
|
|
1126
1127
|
var Ss = 9007199254740991;
|
|
1127
|
-
function
|
|
1128
|
+
function wt(t) {
|
|
1128
1129
|
return typeof t == "number" && t > -1 && t % 1 == 0 && t <= Ss;
|
|
1129
1130
|
}
|
|
1130
|
-
var
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
function zs(t) {
|
|
1134
|
-
return he(t) && Bt(t.length) && !!v[fe(t)];
|
|
1135
|
-
}
|
|
1131
|
+
var Ls = "[object Arguments]", Is = "[object Array]", ws = "[object Boolean]", Bs = "[object Date]", Ps = "[object Error]", Fs = "[object Function]", Cs = "[object Map]", Es = "[object Number]", xs = "[object Object]", Os = "[object RegExp]", $s = "[object Set]", Ms = "[object String]", As = "[object WeakMap]", Ts = "[object ArrayBuffer]", ks = "[object DataView]", Rs = "[object Float32Array]", Ds = "[object Float64Array]", Hs = "[object Int8Array]", Ns = "[object Int16Array]", Us = "[object Int32Array]", js = "[object Uint8Array]", Vs = "[object Uint8ClampedArray]", qs = "[object Uint16Array]", zs = "[object Uint32Array]", S = {};
|
|
1132
|
+
S[Rs] = S[Ds] = S[Hs] = S[Ns] = S[Us] = S[js] = S[Vs] = S[qs] = S[zs] = !0;
|
|
1133
|
+
S[Ls] = S[Is] = S[Ts] = S[ws] = S[ks] = S[Bs] = S[Ps] = S[Fs] = S[Cs] = S[Es] = S[xs] = S[Os] = S[$s] = S[Ms] = S[As] = !1;
|
|
1136
1134
|
function Gs(t) {
|
|
1135
|
+
return _e(t) && wt(t.length) && !!S[ge(t)];
|
|
1136
|
+
}
|
|
1137
|
+
function Ys(t) {
|
|
1137
1138
|
return function(e) {
|
|
1138
1139
|
return t(e);
|
|
1139
1140
|
};
|
|
1140
1141
|
}
|
|
1141
|
-
var
|
|
1142
|
+
var $i = typeof exports == "object" && exports && !exports.nodeType && exports, we = $i && typeof module == "object" && module && !module.nodeType && module, Ws = we && we.exports === $i, Ye = Ws && Li.process, Vt = (function() {
|
|
1142
1143
|
try {
|
|
1143
|
-
var t =
|
|
1144
|
-
return t ||
|
|
1144
|
+
var t = we && we.require && we.require("util").types;
|
|
1145
|
+
return t || Ye && Ye.binding && Ye.binding("util");
|
|
1145
1146
|
} catch {
|
|
1146
1147
|
}
|
|
1147
|
-
})(),
|
|
1148
|
-
function
|
|
1149
|
-
var i = j(t), r = !i &&
|
|
1148
|
+
})(), qt = Vt && Vt.isTypedArray, Mi = qt ? Ys(qt) : Gs, Ks = Object.prototype, Xs = Ks.hasOwnProperty;
|
|
1149
|
+
function Qs(t, e) {
|
|
1150
|
+
var i = j(t), r = !i && Ei(t), s = !i && !r && lt(t), n = !i && !r && !s && Mi(t), o = i || r || s || n, a = o ? hs(t.length, String) : [], l = a.length;
|
|
1150
1151
|
for (var d in t)
|
|
1151
|
-
|
|
1152
|
+
Xs.call(t, d) && !(o && // Safari 9 has enumerable `arguments.length` in strict mode.
|
|
1152
1153
|
(d == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
|
|
1153
1154
|
s && (d == "offset" || d == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
1154
1155
|
n && (d == "buffer" || d == "byteLength" || d == "byteOffset") || // Skip index properties.
|
|
1155
|
-
|
|
1156
|
+
Oi(d, l))) && a.push(d);
|
|
1156
1157
|
return a;
|
|
1157
1158
|
}
|
|
1158
|
-
var
|
|
1159
|
-
function
|
|
1160
|
-
var e = t && t.constructor, i = typeof e == "function" && e.prototype ||
|
|
1159
|
+
var Zs = Object.prototype;
|
|
1160
|
+
function Js(t) {
|
|
1161
|
+
var e = t && t.constructor, i = typeof e == "function" && e.prototype || Zs;
|
|
1161
1162
|
return t === i;
|
|
1162
1163
|
}
|
|
1163
|
-
function
|
|
1164
|
+
function eo(t, e) {
|
|
1164
1165
|
return function(i) {
|
|
1165
1166
|
return t(e(i));
|
|
1166
1167
|
};
|
|
1167
1168
|
}
|
|
1168
|
-
var
|
|
1169
|
-
function
|
|
1170
|
-
if (!
|
|
1171
|
-
return
|
|
1169
|
+
var to = eo(Object.keys, Object), io = Object.prototype, ro = io.hasOwnProperty;
|
|
1170
|
+
function no(t) {
|
|
1171
|
+
if (!Js(t))
|
|
1172
|
+
return to(t);
|
|
1172
1173
|
var e = [];
|
|
1173
1174
|
for (var i in Object(t))
|
|
1174
|
-
|
|
1175
|
+
ro.call(t, i) && i != "constructor" && e.push(i);
|
|
1175
1176
|
return e;
|
|
1176
1177
|
}
|
|
1177
|
-
function
|
|
1178
|
-
return t != null &&
|
|
1178
|
+
function so(t) {
|
|
1179
|
+
return t != null && wt(t.length) && !Bi(t);
|
|
1179
1180
|
}
|
|
1180
|
-
function
|
|
1181
|
-
return
|
|
1181
|
+
function Ai(t) {
|
|
1182
|
+
return so(t) ? Qs(t) : no(t);
|
|
1182
1183
|
}
|
|
1183
|
-
function
|
|
1184
|
-
return
|
|
1184
|
+
function zt(t) {
|
|
1185
|
+
return os(t, Ai, cs);
|
|
1185
1186
|
}
|
|
1186
|
-
var
|
|
1187
|
-
function
|
|
1188
|
-
var o = i &
|
|
1187
|
+
var oo = 1, ao = Object.prototype, lo = ao.hasOwnProperty;
|
|
1188
|
+
function uo(t, e, i, r, s, n) {
|
|
1189
|
+
var o = i & oo, a = zt(t), l = a.length, d = zt(e), u = d.length;
|
|
1189
1190
|
if (l != u && !o)
|
|
1190
1191
|
return !1;
|
|
1191
1192
|
for (var c = l; c--; ) {
|
|
1192
1193
|
var h = a[c];
|
|
1193
|
-
if (!(o ? h in e :
|
|
1194
|
+
if (!(o ? h in e : lo.call(e, h)))
|
|
1194
1195
|
return !1;
|
|
1195
1196
|
}
|
|
1196
1197
|
var f = n.get(t), p = n.get(e);
|
|
@@ -1200,10 +1201,10 @@ function lo(t, e, i, r, s, n) {
|
|
|
1200
1201
|
n.set(t, e), n.set(e, t);
|
|
1201
1202
|
for (var g = o; ++c < l; ) {
|
|
1202
1203
|
h = a[c];
|
|
1203
|
-
var y = t[h],
|
|
1204
|
+
var y = t[h], v = e[h];
|
|
1204
1205
|
if (r)
|
|
1205
|
-
var B = o ? r(
|
|
1206
|
-
if (!(B === void 0 ? y ===
|
|
1206
|
+
var B = o ? r(v, y, h, e, t, n) : r(y, v, h, t, e, n);
|
|
1207
|
+
if (!(B === void 0 ? y === v || s(y, v, i, r, n) : B)) {
|
|
1207
1208
|
_ = !1;
|
|
1208
1209
|
break;
|
|
1209
1210
|
}
|
|
@@ -1215,50 +1216,50 @@ function lo(t, e, i, r, s, n) {
|
|
|
1215
1216
|
}
|
|
1216
1217
|
return n.delete(t), n.delete(e), _;
|
|
1217
1218
|
}
|
|
1218
|
-
var
|
|
1219
|
-
(
|
|
1220
|
-
var e =
|
|
1219
|
+
var dt = ye(R, "DataView"), ut = ye(R, "Promise"), he = ye(R, "Set"), ct = ye(R, "WeakMap"), Gt = "[object Map]", co = "[object Object]", Yt = "[object Promise]", Wt = "[object Set]", Kt = "[object WeakMap]", Xt = "[object DataView]", ho = te(dt), _o = te(Be), fo = te(ut), po = te(he), go = te(ct), G = ge;
|
|
1220
|
+
(dt && G(new dt(new ArrayBuffer(1))) != Xt || Be && G(new Be()) != Gt || ut && G(ut.resolve()) != Yt || he && G(new he()) != Wt || ct && G(new ct()) != Kt) && (G = function(t) {
|
|
1221
|
+
var e = ge(t), i = e == co ? t.constructor : void 0, r = i ? te(i) : "";
|
|
1221
1222
|
if (r)
|
|
1222
1223
|
switch (r) {
|
|
1223
|
-
case co:
|
|
1224
|
-
return Qt;
|
|
1225
1224
|
case ho:
|
|
1226
|
-
return
|
|
1225
|
+
return Xt;
|
|
1227
1226
|
case _o:
|
|
1228
|
-
return
|
|
1227
|
+
return Gt;
|
|
1229
1228
|
case fo:
|
|
1230
|
-
return
|
|
1229
|
+
return Yt;
|
|
1231
1230
|
case po:
|
|
1232
|
-
return
|
|
1231
|
+
return Wt;
|
|
1232
|
+
case go:
|
|
1233
|
+
return Kt;
|
|
1233
1234
|
}
|
|
1234
1235
|
return e;
|
|
1235
1236
|
});
|
|
1236
|
-
var
|
|
1237
|
-
function
|
|
1238
|
-
var o = j(t), a = j(e), l = o ?
|
|
1239
|
-
l = l ==
|
|
1237
|
+
var yo = 1, Qt = "[object Arguments]", Zt = "[object Array]", Oe = "[object Object]", mo = Object.prototype, Jt = mo.hasOwnProperty;
|
|
1238
|
+
function bo(t, e, i, r, s, n) {
|
|
1239
|
+
var o = j(t), a = j(e), l = o ? Zt : G(t), d = a ? Zt : G(e);
|
|
1240
|
+
l = l == Qt ? Oe : l, d = d == Qt ? Oe : d;
|
|
1240
1241
|
var u = l == Oe, c = d == Oe, h = l == d;
|
|
1241
|
-
if (h &&
|
|
1242
|
-
if (!
|
|
1242
|
+
if (h && lt(t)) {
|
|
1243
|
+
if (!lt(e))
|
|
1243
1244
|
return !1;
|
|
1244
1245
|
o = !0, u = !1;
|
|
1245
1246
|
}
|
|
1246
1247
|
if (h && !u)
|
|
1247
|
-
return n || (n = new U()), o ||
|
|
1248
|
-
if (!(i &
|
|
1249
|
-
var f = u &&
|
|
1248
|
+
return n || (n = new U()), o || Mi(t) ? Fi(t, e, i, r, s, n) : ns(t, e, l, i, r, s, n);
|
|
1249
|
+
if (!(i & yo)) {
|
|
1250
|
+
var f = u && Jt.call(t, "__wrapped__"), p = c && Jt.call(e, "__wrapped__");
|
|
1250
1251
|
if (f || p) {
|
|
1251
1252
|
var _ = f ? t.value() : t, g = p ? e.value() : e;
|
|
1252
1253
|
return n || (n = new U()), s(_, g, i, r, n);
|
|
1253
1254
|
}
|
|
1254
1255
|
}
|
|
1255
|
-
return h ? (n || (n = new U()),
|
|
1256
|
+
return h ? (n || (n = new U()), uo(t, e, i, r, s, n)) : !1;
|
|
1256
1257
|
}
|
|
1257
|
-
function
|
|
1258
|
-
return t === e ? !0 : t == null || e == null || !
|
|
1258
|
+
function Bt(t, e, i, r, s) {
|
|
1259
|
+
return t === e ? !0 : t == null || e == null || !_e(t) && !_e(e) ? t !== t && e !== e : bo(t, e, i, r, Bt, s);
|
|
1259
1260
|
}
|
|
1260
|
-
var
|
|
1261
|
-
function
|
|
1261
|
+
var vo = 1, So = 2;
|
|
1262
|
+
function Lo(t, e, i, r) {
|
|
1262
1263
|
var s = i.length, n = s;
|
|
1263
1264
|
if (t == null)
|
|
1264
1265
|
return !n;
|
|
@@ -1275,44 +1276,44 @@ function vo(t, e, i, r) {
|
|
|
1275
1276
|
return !1;
|
|
1276
1277
|
} else {
|
|
1277
1278
|
var u = new U(), c;
|
|
1278
|
-
if (!(c === void 0 ?
|
|
1279
|
+
if (!(c === void 0 ? Bt(d, l, vo | So, r, u) : c))
|
|
1279
1280
|
return !1;
|
|
1280
1281
|
}
|
|
1281
1282
|
}
|
|
1282
1283
|
return !0;
|
|
1283
1284
|
}
|
|
1284
|
-
function
|
|
1285
|
-
return t === t && !
|
|
1285
|
+
function Ti(t) {
|
|
1286
|
+
return t === t && !fe(t);
|
|
1286
1287
|
}
|
|
1287
|
-
function
|
|
1288
|
-
for (var e =
|
|
1288
|
+
function Io(t) {
|
|
1289
|
+
for (var e = Ai(t), i = e.length; i--; ) {
|
|
1289
1290
|
var r = e[i], s = t[r];
|
|
1290
|
-
e[i] = [r, s,
|
|
1291
|
+
e[i] = [r, s, Ti(s)];
|
|
1291
1292
|
}
|
|
1292
1293
|
return e;
|
|
1293
1294
|
}
|
|
1294
|
-
function
|
|
1295
|
+
function ki(t, e) {
|
|
1295
1296
|
return function(i) {
|
|
1296
1297
|
return i == null ? !1 : i[t] === e && (e !== void 0 || t in Object(i));
|
|
1297
1298
|
};
|
|
1298
1299
|
}
|
|
1299
|
-
function
|
|
1300
|
-
var e =
|
|
1301
|
-
return e.length == 1 && e[0][2] ?
|
|
1302
|
-
return i === t ||
|
|
1300
|
+
function wo(t) {
|
|
1301
|
+
var e = Io(t);
|
|
1302
|
+
return e.length == 1 && e[0][2] ? ki(e[0][0], e[0][1]) : function(i) {
|
|
1303
|
+
return i === t || Lo(i, t, e);
|
|
1303
1304
|
};
|
|
1304
1305
|
}
|
|
1305
|
-
var
|
|
1306
|
-
function
|
|
1306
|
+
var Bo = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Po = /^\w*$/;
|
|
1307
|
+
function Pt(t, e) {
|
|
1307
1308
|
if (j(t))
|
|
1308
1309
|
return !1;
|
|
1309
1310
|
var i = typeof t;
|
|
1310
|
-
return i == "number" || i == "symbol" || i == "boolean" || t == null || Ce(t) ? !0 :
|
|
1311
|
+
return i == "number" || i == "symbol" || i == "boolean" || t == null || Ce(t) ? !0 : Po.test(t) || !Bo.test(t) || e != null && t in Object(e);
|
|
1311
1312
|
}
|
|
1312
|
-
var
|
|
1313
|
-
function
|
|
1313
|
+
var Fo = "Expected a function";
|
|
1314
|
+
function Ft(t, e) {
|
|
1314
1315
|
if (typeof t != "function" || e != null && typeof e != "function")
|
|
1315
|
-
throw new TypeError(
|
|
1316
|
+
throw new TypeError(Fo);
|
|
1316
1317
|
var i = function() {
|
|
1317
1318
|
var r = arguments, s = e ? e.apply(this, r) : r[0], n = i.cache;
|
|
1318
1319
|
if (n.has(s))
|
|
@@ -1320,109 +1321,109 @@ function Ct(t, e) {
|
|
|
1320
1321
|
var o = t.apply(this, r);
|
|
1321
1322
|
return i.cache = n.set(s, o) || n, o;
|
|
1322
1323
|
};
|
|
1323
|
-
return i.cache = new (
|
|
1324
|
+
return i.cache = new (Ft.Cache || q)(), i;
|
|
1324
1325
|
}
|
|
1325
|
-
|
|
1326
|
-
var
|
|
1327
|
-
function
|
|
1328
|
-
var e =
|
|
1329
|
-
return i.size ===
|
|
1326
|
+
Ft.Cache = q;
|
|
1327
|
+
var Co = 500;
|
|
1328
|
+
function Eo(t) {
|
|
1329
|
+
var e = Ft(t, function(r) {
|
|
1330
|
+
return i.size === Co && i.clear(), r;
|
|
1330
1331
|
}), i = e.cache;
|
|
1331
1332
|
return e;
|
|
1332
1333
|
}
|
|
1333
|
-
var
|
|
1334
|
+
var xo = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Oo = /\\(\\)?/g, $o = Eo(function(t) {
|
|
1334
1335
|
var e = [];
|
|
1335
|
-
return t.charCodeAt(0) === 46 && e.push(""), t.replace(
|
|
1336
|
-
e.push(s ? n.replace(
|
|
1336
|
+
return t.charCodeAt(0) === 46 && e.push(""), t.replace(xo, function(i, r, s, n) {
|
|
1337
|
+
e.push(s ? n.replace(Oo, "$1") : r || i);
|
|
1337
1338
|
}), e;
|
|
1338
1339
|
});
|
|
1339
|
-
function
|
|
1340
|
+
function Mo(t, e) {
|
|
1340
1341
|
for (var i = -1, r = t == null ? 0 : t.length, s = Array(r); ++i < r; )
|
|
1341
1342
|
s[i] = e(t[i], i, t);
|
|
1342
1343
|
return s;
|
|
1343
1344
|
}
|
|
1344
|
-
var
|
|
1345
|
-
function
|
|
1345
|
+
var ei = W ? W.prototype : void 0, ti = ei ? ei.toString : void 0;
|
|
1346
|
+
function Ri(t) {
|
|
1346
1347
|
if (typeof t == "string")
|
|
1347
1348
|
return t;
|
|
1348
1349
|
if (j(t))
|
|
1349
|
-
return
|
|
1350
|
+
return Mo(t, Ri) + "";
|
|
1350
1351
|
if (Ce(t))
|
|
1351
|
-
return
|
|
1352
|
+
return ti ? ti.call(t) : "";
|
|
1352
1353
|
var e = t + "";
|
|
1353
1354
|
return e == "0" && 1 / t == -1 / 0 ? "-0" : e;
|
|
1354
1355
|
}
|
|
1355
|
-
function
|
|
1356
|
-
return t == null ? "" :
|
|
1356
|
+
function Di(t) {
|
|
1357
|
+
return t == null ? "" : Ri(t);
|
|
1357
1358
|
}
|
|
1358
|
-
function
|
|
1359
|
-
return j(t) ? t :
|
|
1359
|
+
function Hi(t, e) {
|
|
1360
|
+
return j(t) ? t : Pt(t, e) ? [t] : $o(Di(t));
|
|
1360
1361
|
}
|
|
1361
|
-
function
|
|
1362
|
+
function Ve(t) {
|
|
1362
1363
|
if (typeof t == "string" || Ce(t))
|
|
1363
1364
|
return t;
|
|
1364
1365
|
var e = t + "";
|
|
1365
1366
|
return e == "0" && 1 / t == -1 / 0 ? "-0" : e;
|
|
1366
1367
|
}
|
|
1367
|
-
function
|
|
1368
|
-
e =
|
|
1368
|
+
function Ni(t, e) {
|
|
1369
|
+
e = Hi(e, t);
|
|
1369
1370
|
for (var i = 0, r = e.length; t != null && i < r; )
|
|
1370
|
-
t = t[
|
|
1371
|
+
t = t[Ve(e[i++])];
|
|
1371
1372
|
return i && i == r ? t : void 0;
|
|
1372
1373
|
}
|
|
1373
|
-
function
|
|
1374
|
-
var r = t == null ? void 0 :
|
|
1374
|
+
function Ao(t, e, i) {
|
|
1375
|
+
var r = t == null ? void 0 : Ni(t, e);
|
|
1375
1376
|
return r === void 0 ? i : r;
|
|
1376
1377
|
}
|
|
1377
|
-
function
|
|
1378
|
+
function To(t, e) {
|
|
1378
1379
|
return t != null && e in Object(t);
|
|
1379
1380
|
}
|
|
1380
|
-
function
|
|
1381
|
-
e =
|
|
1381
|
+
function ko(t, e, i) {
|
|
1382
|
+
e = Hi(e, t);
|
|
1382
1383
|
for (var r = -1, s = e.length, n = !1; ++r < s; ) {
|
|
1383
|
-
var o =
|
|
1384
|
+
var o = Ve(e[r]);
|
|
1384
1385
|
if (!(n = t != null && i(t, o)))
|
|
1385
1386
|
break;
|
|
1386
1387
|
t = t[o];
|
|
1387
1388
|
}
|
|
1388
|
-
return n || ++r != s ? n : (s = t == null ? 0 : t.length, !!s &&
|
|
1389
|
+
return n || ++r != s ? n : (s = t == null ? 0 : t.length, !!s && wt(s) && Oi(o, s) && (j(t) || Ei(t)));
|
|
1389
1390
|
}
|
|
1390
|
-
function
|
|
1391
|
-
return t != null &&
|
|
1391
|
+
function Ro(t, e) {
|
|
1392
|
+
return t != null && ko(t, e, To);
|
|
1392
1393
|
}
|
|
1393
|
-
var
|
|
1394
|
-
function
|
|
1395
|
-
return
|
|
1396
|
-
var r =
|
|
1397
|
-
return r === void 0 && r === e ?
|
|
1394
|
+
var Do = 1, Ho = 2;
|
|
1395
|
+
function No(t, e) {
|
|
1396
|
+
return Pt(t) && Ti(e) ? ki(Ve(t), e) : function(i) {
|
|
1397
|
+
var r = Ao(i, t);
|
|
1398
|
+
return r === void 0 && r === e ? Ro(i, t) : Bt(e, r, Do | Ho);
|
|
1398
1399
|
};
|
|
1399
1400
|
}
|
|
1400
|
-
function
|
|
1401
|
+
function Uo(t) {
|
|
1401
1402
|
return t;
|
|
1402
1403
|
}
|
|
1403
|
-
function
|
|
1404
|
+
function jo(t) {
|
|
1404
1405
|
return function(e) {
|
|
1405
1406
|
return e?.[t];
|
|
1406
1407
|
};
|
|
1407
1408
|
}
|
|
1408
|
-
function
|
|
1409
|
+
function Vo(t) {
|
|
1409
1410
|
return function(e) {
|
|
1410
|
-
return
|
|
1411
|
+
return Ni(e, t);
|
|
1411
1412
|
};
|
|
1412
1413
|
}
|
|
1413
|
-
function
|
|
1414
|
-
return
|
|
1414
|
+
function qo(t) {
|
|
1415
|
+
return Pt(t) ? jo(Ve(t)) : Vo(t);
|
|
1415
1416
|
}
|
|
1416
|
-
function
|
|
1417
|
-
return typeof t == "function" ? t : t == null ?
|
|
1417
|
+
function Ui(t) {
|
|
1418
|
+
return typeof t == "function" ? t : t == null ? Uo : typeof t == "object" ? j(t) ? No(t[0], t[1]) : wo(t) : qo(t);
|
|
1418
1419
|
}
|
|
1419
|
-
function
|
|
1420
|
+
function zo(t, e) {
|
|
1420
1421
|
return t < e;
|
|
1421
1422
|
}
|
|
1422
|
-
function
|
|
1423
|
-
return t && t.length ?
|
|
1423
|
+
function Go(t, e) {
|
|
1424
|
+
return t && t.length ? qr(t, Ui(e), zo) : void 0;
|
|
1424
1425
|
}
|
|
1425
|
-
class
|
|
1426
|
+
class Yo {
|
|
1426
1427
|
_isMaskMode;
|
|
1427
1428
|
_hiddenBuildings;
|
|
1428
1429
|
_history;
|
|
@@ -1440,10 +1441,10 @@ class Go {
|
|
|
1440
1441
|
id: _,
|
|
1441
1442
|
overlap: g,
|
|
1442
1443
|
building_ids: y,
|
|
1443
|
-
shared_level_ids:
|
|
1444
|
+
shared_level_ids: v,
|
|
1444
1445
|
default_displayed_ordinal: B,
|
|
1445
1446
|
default_displayed_building: C
|
|
1446
|
-
} = p.properties, w = _ === i,
|
|
1447
|
+
} = p.properties, w = _ === i, b = Xo(g), E = I(y), x = this._history.getHistoryOrdinal(_);
|
|
1447
1448
|
let P = x ?? B;
|
|
1448
1449
|
if (P)
|
|
1449
1450
|
x || (this._history.setHistoryOrdinal(_, P), this._history.setHistoryBuildingUnit(_, {
|
|
@@ -1451,7 +1452,7 @@ class Go {
|
|
|
1451
1452
|
type: "building"
|
|
1452
1453
|
}));
|
|
1453
1454
|
else {
|
|
1454
|
-
const { ordinal: L, buildingId: T } =
|
|
1455
|
+
const { ordinal: L, buildingId: T } = Wo(E, s);
|
|
1455
1456
|
if (!L) continue;
|
|
1456
1457
|
P = L, this._history.setHistoryOrdinal(_, P), this._history.setHistoryBuildingUnit(_, {
|
|
1457
1458
|
id: T,
|
|
@@ -1459,26 +1460,26 @@ class Go {
|
|
|
1459
1460
|
});
|
|
1460
1461
|
}
|
|
1461
1462
|
E.forEach((L) => {
|
|
1462
|
-
const T = s.get(L), O =
|
|
1463
|
+
const T = s.get(L), O = Ko(
|
|
1463
1464
|
T,
|
|
1464
1465
|
P
|
|
1465
1466
|
);
|
|
1466
1467
|
O ? this._isMaskMode ? w ? (a.push(O), o.push({
|
|
1467
1468
|
level: O,
|
|
1468
|
-
overlap:
|
|
1469
|
+
overlap: b.get(O) ?? null,
|
|
1469
1470
|
venueId: _
|
|
1470
1471
|
})) : u.push(L) : (o.push({
|
|
1471
1472
|
level: O,
|
|
1472
|
-
overlap:
|
|
1473
|
+
overlap: b.get(O) ?? null,
|
|
1473
1474
|
venueId: _
|
|
1474
1475
|
}), w && a.push(O)) : d.push(L);
|
|
1475
|
-
}), I(
|
|
1476
|
-
const T = n.get(L), { ordinal: O, persistence: D } = T?.properties || {}, K = D === "true" && 0 <= O && O <= P,
|
|
1476
|
+
}), I(v).forEach((L) => {
|
|
1477
|
+
const T = n.get(L), { ordinal: O, persistence: D } = T?.properties || {}, K = D === "true" && 0 <= O && O <= P, ie = O === P, xe = K || ie, me = {
|
|
1477
1478
|
level: L,
|
|
1478
|
-
overlap:
|
|
1479
|
+
overlap: b.get(L) ?? null,
|
|
1479
1480
|
venueId: _
|
|
1480
1481
|
};
|
|
1481
|
-
xe ? this._isMaskMode ? w ? (o.push(
|
|
1482
|
+
xe ? this._isMaskMode ? w ? (o.push(me), K && l.push(L), ie && a.push(L)) : c.push(L) : (o.push(me), w && ie && a.push(L), K && l.push(L)) : d.push(L);
|
|
1482
1483
|
});
|
|
1483
1484
|
}
|
|
1484
1485
|
return this._hiddenBuildings = d, {
|
|
@@ -1493,11 +1494,11 @@ class Go {
|
|
|
1493
1494
|
return this._hiddenBuildings;
|
|
1494
1495
|
}
|
|
1495
1496
|
}
|
|
1496
|
-
function
|
|
1497
|
+
function Wo(t, e) {
|
|
1497
1498
|
const i = t.find((n) => e.has(n)) ?? t[0] ?? null, r = i ? e.get(i) : null;
|
|
1498
|
-
return { ordinal: r ?
|
|
1499
|
+
return { ordinal: r ? ji(r) : null, buildingId: i };
|
|
1499
1500
|
}
|
|
1500
|
-
function
|
|
1501
|
+
function ji(t) {
|
|
1501
1502
|
if (!t || !t.properties)
|
|
1502
1503
|
return null;
|
|
1503
1504
|
const { level_ids: e, ordinals: i, default_displayed_floor: r } = t.properties, s = I(i);
|
|
@@ -1508,14 +1509,14 @@ function Ni(t) {
|
|
|
1508
1509
|
);
|
|
1509
1510
|
n = s[o] ?? null;
|
|
1510
1511
|
}
|
|
1511
|
-
return n || (n =
|
|
1512
|
+
return n || (n = Go(s, (o) => Math.abs(Number(o) - 0.1))), n;
|
|
1512
1513
|
}
|
|
1513
|
-
function
|
|
1514
|
+
function Ko(t, e) {
|
|
1514
1515
|
if (!t || !t.properties) return null;
|
|
1515
1516
|
const { level_ids: i, ordinals: r } = t.properties, s = I(r).findIndex((n) => n === e);
|
|
1516
1517
|
return I(i)[s] ?? null;
|
|
1517
1518
|
}
|
|
1518
|
-
function
|
|
1519
|
+
function Xo(t) {
|
|
1519
1520
|
const e = /* @__PURE__ */ new Map();
|
|
1520
1521
|
if (!t) return e;
|
|
1521
1522
|
for (const i of I(t, "/")) {
|
|
@@ -1524,7 +1525,7 @@ function Ko(t) {
|
|
|
1524
1525
|
}
|
|
1525
1526
|
return e;
|
|
1526
1527
|
}
|
|
1527
|
-
class
|
|
1528
|
+
class Qo {
|
|
1528
1529
|
_maplibre;
|
|
1529
1530
|
_isAnimated = !0;
|
|
1530
1531
|
_bounds = null;
|
|
@@ -1567,73 +1568,73 @@ class Xo {
|
|
|
1567
1568
|
this._center && this._maplibre.panTo(this._center, { animate: this._isAnimated });
|
|
1568
1569
|
}
|
|
1569
1570
|
}
|
|
1570
|
-
var
|
|
1571
|
+
var We = function() {
|
|
1571
1572
|
return R.Date.now();
|
|
1572
|
-
},
|
|
1573
|
-
function
|
|
1574
|
-
for (var e = t.length; e-- &&
|
|
1573
|
+
}, Zo = /\s/;
|
|
1574
|
+
function Jo(t) {
|
|
1575
|
+
for (var e = t.length; e-- && Zo.test(t.charAt(e)); )
|
|
1575
1576
|
;
|
|
1576
1577
|
return e;
|
|
1577
1578
|
}
|
|
1578
|
-
var
|
|
1579
|
-
function
|
|
1580
|
-
return t && t.slice(0,
|
|
1579
|
+
var ea = /^\s+/;
|
|
1580
|
+
function ta(t) {
|
|
1581
|
+
return t && t.slice(0, Jo(t) + 1).replace(ea, "");
|
|
1581
1582
|
}
|
|
1582
|
-
var
|
|
1583
|
-
function
|
|
1583
|
+
var ii = NaN, ia = /^[-+]0x[0-9a-f]+$/i, ra = /^0b[01]+$/i, na = /^0o[0-7]+$/i, sa = parseInt;
|
|
1584
|
+
function Ne(t) {
|
|
1584
1585
|
if (typeof t == "number")
|
|
1585
1586
|
return t;
|
|
1586
1587
|
if (Ce(t))
|
|
1587
|
-
return
|
|
1588
|
-
if (
|
|
1588
|
+
return ii;
|
|
1589
|
+
if (fe(t)) {
|
|
1589
1590
|
var e = typeof t.valueOf == "function" ? t.valueOf() : t;
|
|
1590
|
-
t =
|
|
1591
|
+
t = fe(e) ? e + "" : e;
|
|
1591
1592
|
}
|
|
1592
1593
|
if (typeof t != "string")
|
|
1593
1594
|
return t === 0 ? t : +t;
|
|
1594
|
-
t =
|
|
1595
|
-
var i =
|
|
1596
|
-
return i ||
|
|
1595
|
+
t = ta(t);
|
|
1596
|
+
var i = ra.test(t);
|
|
1597
|
+
return i || na.test(t) ? sa(t.slice(2), i ? 2 : 8) : ia.test(t) ? ii : +t;
|
|
1597
1598
|
}
|
|
1598
|
-
var
|
|
1599
|
-
function
|
|
1599
|
+
var oa = "Expected a function", aa = Math.max, la = Math.min;
|
|
1600
|
+
function Vi(t, e, i) {
|
|
1600
1601
|
var r, s, n, o, a, l, d = 0, u = !1, c = !1, h = !0;
|
|
1601
1602
|
if (typeof t != "function")
|
|
1602
|
-
throw new TypeError(
|
|
1603
|
-
e =
|
|
1604
|
-
function f(
|
|
1603
|
+
throw new TypeError(oa);
|
|
1604
|
+
e = Ne(e) || 0, fe(i) && (u = !!i.leading, c = "maxWait" in i, n = c ? aa(Ne(i.maxWait) || 0, e) : n, h = "trailing" in i ? !!i.trailing : h);
|
|
1605
|
+
function f(b) {
|
|
1605
1606
|
var E = r, x = s;
|
|
1606
|
-
return r = s = void 0, d =
|
|
1607
|
+
return r = s = void 0, d = b, o = t.apply(x, E), o;
|
|
1607
1608
|
}
|
|
1608
|
-
function p(
|
|
1609
|
-
return d =
|
|
1609
|
+
function p(b) {
|
|
1610
|
+
return d = b, a = setTimeout(y, e), u ? f(b) : o;
|
|
1610
1611
|
}
|
|
1611
|
-
function _(
|
|
1612
|
-
var E =
|
|
1613
|
-
return c ?
|
|
1612
|
+
function _(b) {
|
|
1613
|
+
var E = b - l, x = b - d, P = e - E;
|
|
1614
|
+
return c ? la(P, n - x) : P;
|
|
1614
1615
|
}
|
|
1615
|
-
function g(
|
|
1616
|
-
var E =
|
|
1616
|
+
function g(b) {
|
|
1617
|
+
var E = b - l, x = b - d;
|
|
1617
1618
|
return l === void 0 || E >= e || E < 0 || c && x >= n;
|
|
1618
1619
|
}
|
|
1619
1620
|
function y() {
|
|
1620
|
-
var
|
|
1621
|
-
if (g(
|
|
1622
|
-
return b
|
|
1623
|
-
a = setTimeout(y, _(
|
|
1621
|
+
var b = We();
|
|
1622
|
+
if (g(b))
|
|
1623
|
+
return v(b);
|
|
1624
|
+
a = setTimeout(y, _(b));
|
|
1624
1625
|
}
|
|
1625
|
-
function b
|
|
1626
|
-
return a = void 0, h && r ? f(
|
|
1626
|
+
function v(b) {
|
|
1627
|
+
return a = void 0, h && r ? f(b) : (r = s = void 0, o);
|
|
1627
1628
|
}
|
|
1628
1629
|
function B() {
|
|
1629
1630
|
a !== void 0 && clearTimeout(a), d = 0, r = l = s = a = void 0;
|
|
1630
1631
|
}
|
|
1631
1632
|
function C() {
|
|
1632
|
-
return a === void 0 ? o :
|
|
1633
|
+
return a === void 0 ? o : v(We());
|
|
1633
1634
|
}
|
|
1634
1635
|
function w() {
|
|
1635
|
-
var
|
|
1636
|
-
if (r = arguments, s = this, l =
|
|
1636
|
+
var b = We(), E = g(b);
|
|
1637
|
+
if (r = arguments, s = this, l = b, E) {
|
|
1637
1638
|
if (a === void 0)
|
|
1638
1639
|
return p(l);
|
|
1639
1640
|
if (c)
|
|
@@ -1643,40 +1644,40 @@ function Ui(t, e, i) {
|
|
|
1643
1644
|
}
|
|
1644
1645
|
return w.cancel = B, w.flush = C, w;
|
|
1645
1646
|
}
|
|
1646
|
-
function
|
|
1647
|
+
function da(t, e, i, r) {
|
|
1647
1648
|
for (var s = t.length, n = i + -1; ++n < s; )
|
|
1648
1649
|
if (e(t[n], n, t))
|
|
1649
1650
|
return n;
|
|
1650
1651
|
return -1;
|
|
1651
1652
|
}
|
|
1652
|
-
function
|
|
1653
|
+
function ua(t) {
|
|
1653
1654
|
return t !== t;
|
|
1654
1655
|
}
|
|
1655
|
-
function
|
|
1656
|
+
function ca(t, e, i) {
|
|
1656
1657
|
for (var r = i - 1, s = t.length; ++r < s; )
|
|
1657
1658
|
if (t[r] === e)
|
|
1658
1659
|
return r;
|
|
1659
1660
|
return -1;
|
|
1660
1661
|
}
|
|
1661
|
-
function
|
|
1662
|
-
return e === e ?
|
|
1662
|
+
function ha(t, e, i) {
|
|
1663
|
+
return e === e ? ca(t, e, i) : da(t, ua, i);
|
|
1663
1664
|
}
|
|
1664
|
-
function
|
|
1665
|
+
function _a(t, e) {
|
|
1665
1666
|
var i = t == null ? 0 : t.length;
|
|
1666
|
-
return !!i &&
|
|
1667
|
+
return !!i && ha(t, e, 0) > -1;
|
|
1667
1668
|
}
|
|
1668
|
-
function
|
|
1669
|
+
function fa() {
|
|
1669
1670
|
}
|
|
1670
|
-
var
|
|
1671
|
-
return new
|
|
1672
|
-
} :
|
|
1673
|
-
function
|
|
1674
|
-
var r = -1, s =
|
|
1675
|
-
if (n >=
|
|
1676
|
-
var d = e ? null :
|
|
1671
|
+
var pa = 1 / 0, ga = he && 1 / It(new he([, -0]))[1] == pa ? function(t) {
|
|
1672
|
+
return new he(t);
|
|
1673
|
+
} : fa, ya = 200;
|
|
1674
|
+
function ma(t, e, i) {
|
|
1675
|
+
var r = -1, s = _a, n = t.length, o = !0, a = [], l = a;
|
|
1676
|
+
if (n >= ya) {
|
|
1677
|
+
var d = e ? null : ga(t);
|
|
1677
1678
|
if (d)
|
|
1678
|
-
return
|
|
1679
|
-
o = !1, s =
|
|
1679
|
+
return It(d);
|
|
1680
|
+
o = !1, s = Pi, l = new Fe();
|
|
1680
1681
|
} else
|
|
1681
1682
|
l = e ? [] : a;
|
|
1682
1683
|
e:
|
|
@@ -1691,16 +1692,16 @@ function ya(t, e, i) {
|
|
|
1691
1692
|
}
|
|
1692
1693
|
return a;
|
|
1693
1694
|
}
|
|
1694
|
-
function
|
|
1695
|
-
return t && t.length ?
|
|
1695
|
+
function qi(t, e) {
|
|
1696
|
+
return t && t.length ? ma(t, Ui(e)) : [];
|
|
1696
1697
|
}
|
|
1697
|
-
var
|
|
1698
|
-
function
|
|
1699
|
-
var e = ++
|
|
1700
|
-
return
|
|
1698
|
+
var ba = 0;
|
|
1699
|
+
function J(t) {
|
|
1700
|
+
var e = ++ba;
|
|
1701
|
+
return Di(t) + e;
|
|
1701
1702
|
}
|
|
1702
|
-
const
|
|
1703
|
-
class
|
|
1703
|
+
const Se = "Indoor_selectedFloorChanged", Me = "Indoor_selectedBuildingChanged", ht = "Indoor_mapxusMapLoaded", ri = "Indoor_maplibreMapLoaded", Ke = "mapxus-venue-fill", ae = "mapxus-building-line", ni = "mapxus-level-fill", Xe = "mapxus-shared-level-fill", Qe = "highlight-mapxus_level", Ze = "highlight-mapxus_shared_level";
|
|
1704
|
+
class zi extends yr {
|
|
1704
1705
|
_map;
|
|
1705
1706
|
_features = [];
|
|
1706
1707
|
_allVenuesMap = /* @__PURE__ */ new Map();
|
|
@@ -1730,7 +1731,7 @@ class Vi extends gr {
|
|
|
1730
1731
|
// shared bg layer for alwaysDisplayed shared floors
|
|
1731
1732
|
_lowerLayers = [];
|
|
1732
1733
|
_excludedPoisInMiddle = [];
|
|
1733
|
-
_dispatch =
|
|
1734
|
+
_dispatch = mt(Se);
|
|
1734
1735
|
_startWithIndoorView;
|
|
1735
1736
|
_indoorMapLoaded = !1;
|
|
1736
1737
|
_isSelectSharedFloor = !1;
|
|
@@ -1767,14 +1768,14 @@ class Vi extends gr {
|
|
|
1767
1768
|
enableOutdoorClickSelection: u,
|
|
1768
1769
|
floorSwitchScope: c
|
|
1769
1770
|
} = e;
|
|
1770
|
-
this.layeredHandler = new
|
|
1771
|
+
this.layeredHandler = new Yo(l), this.dragPanHandler = new Qo(i, a), this._map = i, this._enableIndoorClickSelection = d, this._enableOutdoorClickSelection = u, this._startWithIndoorView = r, this._outdoorMapShown = s, this._isMaskMode = l, this._fitBounds = o, this._floorSwitchScope = c, this._selectedHighlightStyle = n ? Object.assign(
|
|
1771
1772
|
{},
|
|
1772
|
-
|
|
1773
|
+
De,
|
|
1773
1774
|
n
|
|
1774
|
-
) :
|
|
1775
|
+
) : De, this._bindMaplibreEventListeners();
|
|
1775
1776
|
}
|
|
1776
1777
|
destroy() {
|
|
1777
|
-
this._isDestroyed || (this._isDestroyed = !0, this._dispatch.on(`.${
|
|
1778
|
+
this._isDestroyed || (this._isDestroyed = !0, this._dispatch.on(`.${Se}`, null), this.off(Me), this.off(ri), this.off(ht), this._debounceRendering?.cancel(), this._abortQueryFeature && (this._abortQueryFeature(), this._abortQueryFeature = null));
|
|
1778
1779
|
}
|
|
1779
1780
|
/**
|
|
1780
1781
|
* @deprecated
|
|
@@ -1843,11 +1844,11 @@ class Vi extends gr {
|
|
|
1843
1844
|
* @param ordinal
|
|
1844
1845
|
*/
|
|
1845
1846
|
async switchFloorByOrdinal(e) {
|
|
1846
|
-
this._updateFloorState(e), this._dispatch.call(
|
|
1847
|
+
this._updateFloorState(e), this._dispatch.call(Se, null, {
|
|
1847
1848
|
venue: this.venue,
|
|
1848
1849
|
building: this.building,
|
|
1849
1850
|
floor: this.floor
|
|
1850
|
-
}), this.venue && e && (this._floorSwitchScope ===
|
|
1851
|
+
}), this.venue && e && (this._floorSwitchScope === bt.GLOBAL && this._changeOtherVenuesHistory(e), this._dragPan === !0 && (this._fitBounds ? await this.dragPanHandler.fitBounds() : await this.panToBuildingCenter()), this._dragPan === "restrict" && await this._checkAndPanToBuilding()), this.updateRendering();
|
|
1851
1852
|
}
|
|
1852
1853
|
setOutdoorMapShown(e) {
|
|
1853
1854
|
this._outdoorMapShown = e, this._setOutdoorVisibility(e);
|
|
@@ -1863,12 +1864,12 @@ class Vi extends gr {
|
|
|
1863
1864
|
e ?? { "line-opacity": 0 }
|
|
1864
1865
|
);
|
|
1865
1866
|
for (const i of [
|
|
1866
|
-
|
|
1867
|
-
|
|
1867
|
+
Qe,
|
|
1868
|
+
Ze
|
|
1868
1869
|
])
|
|
1869
1870
|
if (this._map.getLayer(i))
|
|
1870
1871
|
if (e) {
|
|
1871
|
-
const { lineColor: r, lineOpacity: s, lineWidth: n, lineOffset: o } = this._selectedHighlightStyle, a =
|
|
1872
|
+
const { lineColor: r, lineOpacity: s, lineWidth: n, lineOffset: o } = this._selectedHighlightStyle, a = si(n, o);
|
|
1872
1873
|
this._map.setPaintProperty(i, "line-color", r), this._map.setPaintProperty(i, "line-opacity", s), this._map.setPaintProperty(i, "line-width", n), this._map.setPaintProperty(i, "line-offset", a);
|
|
1873
1874
|
} else
|
|
1874
1875
|
this._map.setPaintProperty(i, "line-opacity", 0);
|
|
@@ -1878,7 +1879,7 @@ class Vi extends gr {
|
|
|
1878
1879
|
* @param listener
|
|
1879
1880
|
*/
|
|
1880
1881
|
onMapChange(e) {
|
|
1881
|
-
const i =
|
|
1882
|
+
const i = J(`${Se}.`);
|
|
1882
1883
|
return this._dispatch.on(i, e), { unsubscribe: () => this._dispatch.on(i, null) };
|
|
1883
1884
|
}
|
|
1884
1885
|
/**
|
|
@@ -1908,7 +1909,7 @@ class Vi extends gr {
|
|
|
1908
1909
|
}), this.dragPanHandler.setCenter(d), this._curVenueId !== a && (this._curVenueId = a, this._curVenueFeature = await this._queryVenueFeature(a)), r = this._getBuildingDisplayedOrdinal(e, s);
|
|
1909
1910
|
}
|
|
1910
1911
|
await this.switchFloorByOrdinal(r), this.emit(
|
|
1911
|
-
|
|
1912
|
+
Me,
|
|
1912
1913
|
e ? {
|
|
1913
1914
|
building: e,
|
|
1914
1915
|
ordinal: r,
|
|
@@ -1925,11 +1926,11 @@ class Vi extends gr {
|
|
|
1925
1926
|
this._curVenueId = a, this._curVenueFeature = i, this.dragPanHandler.setCenter(l), this._history.addVisitedBuildingUnit({ id: s, type: "sharedFloor" }), this._history.setHistoryOrdinal(a, n), this._history.setHistoryBuildingUnit(a, {
|
|
1926
1927
|
id: s,
|
|
1927
1928
|
type: "sharedFloor"
|
|
1928
|
-
}), this._dragPan === !0 && (this._fitBounds ? await this.dragPanHandler.fitBounds() : await this.panToVenueCenter()), this._dispatch.call(
|
|
1929
|
+
}), this._dragPan === !0 && (this._fitBounds ? await this.dragPanHandler.fitBounds() : await this.panToVenueCenter()), this._dispatch.call(Se, null, {
|
|
1929
1930
|
venue: this.venue,
|
|
1930
1931
|
building: this.building,
|
|
1931
1932
|
floor: this.floor
|
|
1932
|
-
}), this.emit(
|
|
1933
|
+
}), this.emit(Me, {
|
|
1933
1934
|
...e,
|
|
1934
1935
|
dragPan: this._dragPan
|
|
1935
1936
|
}), this._dispatchIndoorMapLoaded(), this.updateRendering();
|
|
@@ -1944,7 +1945,7 @@ class Vi extends gr {
|
|
|
1944
1945
|
async panToBuildingCenter() {
|
|
1945
1946
|
if (this.dragPanHandler.panToCenter(), this._featureIncomplete) {
|
|
1946
1947
|
const e = () => this.getFeaturesById(this._curBuildingId, {
|
|
1947
|
-
layerIds: [
|
|
1948
|
+
layerIds: [ae]
|
|
1948
1949
|
})[0];
|
|
1949
1950
|
await this._waitForFeatureLoaded(e);
|
|
1950
1951
|
}
|
|
@@ -1952,13 +1953,13 @@ class Vi extends gr {
|
|
|
1952
1953
|
async panToVenueCenter() {
|
|
1953
1954
|
if (this.dragPanHandler.panToCenter(), this._featureIncomplete) {
|
|
1954
1955
|
const e = () => this.getFeaturesById(this._curVenueId, {
|
|
1955
|
-
layerIds: [
|
|
1956
|
+
layerIds: [Ke]
|
|
1956
1957
|
})[0];
|
|
1957
1958
|
await this._waitForFeatureLoaded(e);
|
|
1958
1959
|
}
|
|
1959
1960
|
}
|
|
1960
1961
|
async _waitForFeatureLoaded(e) {
|
|
1961
|
-
const i = () => this._isDestroyed ? (this._abortQueryFeature?.(), !0) : !!e(), { promise: r, abort: s } =
|
|
1962
|
+
const i = () => this._isDestroyed ? (this._abortQueryFeature?.(), !0) : !!e(), { promise: r, abort: s } = Ir(i);
|
|
1962
1963
|
this._abortQueryFeature = s;
|
|
1963
1964
|
try {
|
|
1964
1965
|
await Promise.race([
|
|
@@ -1980,75 +1981,78 @@ class Vi extends gr {
|
|
|
1980
1981
|
setFitBounds(e) {
|
|
1981
1982
|
this._fitBounds = e;
|
|
1982
1983
|
}
|
|
1983
|
-
async
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
}, s = async (n) => {
|
|
1997
|
-
let o = this.getFeaturesById(n, {
|
|
1998
|
-
layerIds: [X]
|
|
1999
|
-
})[0];
|
|
2000
|
-
if (!o) {
|
|
2001
|
-
const a = await Ve(n);
|
|
2002
|
-
o = It(a), this._featureIncomplete = !0;
|
|
2003
|
-
}
|
|
2004
|
-
return o ?? null;
|
|
1984
|
+
async selectByClickMap(e) {
|
|
1985
|
+
if (!this._enableIndoorClickSelection && !this._enableOutdoorClickSelection)
|
|
1986
|
+
return;
|
|
1987
|
+
this.setDragPan(!1), this.dragPanHandler.setBounds(null), this._featureIncomplete = !1, !e.venue ? this._enableOutdoorClickSelection && await this.selectBuilding(null) : this._enableIndoorClickSelection && (e.building ? await this.selectBuilding(e.building, {
|
|
1988
|
+
floorId: e.floor?.id
|
|
1989
|
+
}) : "name" in e.floor && await this.selectSharedFloor(e.floor, e.venue));
|
|
1990
|
+
}
|
|
1991
|
+
queryIndoorInfoByPoint(e) {
|
|
1992
|
+
const i = this._map.unproject(e), r = this._queryVisibleFeature(e), s = {
|
|
1993
|
+
coordinate: i,
|
|
1994
|
+
venue: null,
|
|
1995
|
+
building: null,
|
|
1996
|
+
floor: null
|
|
2005
1997
|
};
|
|
2006
|
-
if (
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
|
|
1998
|
+
if (!r) return s;
|
|
1999
|
+
const { sourceLayer: n } = r;
|
|
2000
|
+
let o = s;
|
|
2001
|
+
if (n === "mapxus_level") {
|
|
2002
|
+
const a = r.properties?.["ref:building"], l = this.getFeaturesById(a)?.[0];
|
|
2003
|
+
if (l) {
|
|
2004
|
+
const d = l.properties?.["ref:venue"], u = this.getFeaturesById(d)?.[0];
|
|
2005
|
+
if (u) {
|
|
2006
|
+
const { id: c, name: h, ordinal: f } = r.properties;
|
|
2007
|
+
o = {
|
|
2008
|
+
coordinate: i,
|
|
2009
|
+
venue: u,
|
|
2010
|
+
building: l,
|
|
2011
|
+
floor: { id: c, code: h, ordinal: f }
|
|
2012
|
+
};
|
|
2013
|
+
} else
|
|
2014
|
+
console.warn(
|
|
2015
|
+
"Venue feature not found for building: ",
|
|
2016
|
+
a
|
|
2017
|
+
);
|
|
2020
2018
|
}
|
|
2021
|
-
} else if (
|
|
2019
|
+
} else if (n === "mapxus_shared_level") {
|
|
2022
2020
|
const {
|
|
2023
|
-
id:
|
|
2024
|
-
ordinal:
|
|
2025
|
-
name:
|
|
2026
|
-
"ref:venue":
|
|
2027
|
-
} =
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2021
|
+
id: a,
|
|
2022
|
+
ordinal: l,
|
|
2023
|
+
name: d,
|
|
2024
|
+
"ref:venue": u
|
|
2025
|
+
} = r.properties || {}, c = this.getFeaturesById(u)?.[0];
|
|
2026
|
+
c ? o = {
|
|
2027
|
+
coordinate: i,
|
|
2028
|
+
venue: c,
|
|
2029
|
+
building: null,
|
|
2030
|
+
floor: {
|
|
2031
|
+
id: a,
|
|
2032
|
+
name: typeof d == "string" ? { default: d } : d,
|
|
2033
|
+
ordinal: l
|
|
2034
|
+
}
|
|
2035
|
+
} : console.warn("Venue feature not found for sharedFloor: ", a);
|
|
2036
2036
|
} else {
|
|
2037
|
-
const
|
|
2038
|
-
|
|
2037
|
+
const a = r?.properties?.["ref:venue"], l = this.getFeaturesById(a)?.[0];
|
|
2038
|
+
l ? o = {
|
|
2039
|
+
coordinate: i,
|
|
2040
|
+
venue: l,
|
|
2041
|
+
building: r,
|
|
2042
|
+
floor: null
|
|
2043
|
+
} : console.warn(
|
|
2044
|
+
"Venue feature not found for building: ",
|
|
2045
|
+
r.properties?.id
|
|
2046
|
+
);
|
|
2039
2047
|
}
|
|
2040
|
-
|
|
2041
|
-
async selectByClickMap(e) {
|
|
2042
|
-
!this._enableIndoorClickSelection && !this._enableOutdoorClickSelection || (this.setDragPan(!1), this.dragPanHandler.setBounds(null), this._featureIncomplete = !1, e ? this._enableIndoorClickSelection && ("building" in e ? await this.selectBuilding(e.building, {
|
|
2043
|
-
floorId: e?.floor?.id
|
|
2044
|
-
}) : "sharedFloor" in e && await this.selectSharedFloor(e.sharedFloor, e.venue)) : this._enableOutdoorClickSelection && await this.selectBuilding(null));
|
|
2048
|
+
return o;
|
|
2045
2049
|
}
|
|
2046
2050
|
_bindMaplibreEventListeners() {
|
|
2047
2051
|
this._map.once("styledata", () => this.updateCustomLayers()), this._map.once("idle", () => {
|
|
2048
|
-
this.emit(
|
|
2052
|
+
this.emit(ri), (!this._startWithIndoorView || this._map.getZoom() < 14) && this._dispatchIndoorMapLoaded();
|
|
2049
2053
|
}), this._map.on(
|
|
2050
2054
|
"sourcedata",
|
|
2051
|
-
this._debounceRendering =
|
|
2055
|
+
this._debounceRendering = Vi(
|
|
2052
2056
|
() => this.updateRendering(),
|
|
2053
2057
|
300
|
|
2054
2058
|
)
|
|
@@ -2059,7 +2063,7 @@ class Vi extends gr {
|
|
|
2059
2063
|
}
|
|
2060
2064
|
_getIndoorFeatures() {
|
|
2061
2065
|
return this._queryRenderedFeatures().filter(
|
|
2062
|
-
(e) =>
|
|
2066
|
+
(e) => St(e.source)
|
|
2063
2067
|
);
|
|
2064
2068
|
}
|
|
2065
2069
|
_getBuildingFloorByOrdinal(e, i) {
|
|
@@ -2086,19 +2090,19 @@ class Vi extends gr {
|
|
|
2086
2090
|
}
|
|
2087
2091
|
_addReserveFloorLayers() {
|
|
2088
2092
|
for (const e of [
|
|
2089
|
-
|
|
2093
|
+
Re,
|
|
2090
2094
|
$
|
|
2091
2095
|
]) {
|
|
2092
2096
|
if (this._map.getLayer(e)) continue;
|
|
2093
2097
|
const i = e.split("_")[1], r = this._map.getLayer(i);
|
|
2094
2098
|
if (!r) continue;
|
|
2095
|
-
const { source: s, sourceLayer: n } = r, o = e ===
|
|
2099
|
+
const { source: s, sourceLayer: n } = r, o = e === Re ? this._middleLayers[0] : this._lowerLayers[0];
|
|
2096
2100
|
let a = {
|
|
2097
2101
|
"fill-opacity": 0
|
|
2098
2102
|
};
|
|
2099
2103
|
if (this._isMaskMode && e === $) {
|
|
2100
2104
|
const l = this._originIndoorLayers.find(
|
|
2101
|
-
({ id: d }) => d ===
|
|
2105
|
+
({ id: d }) => d === ae
|
|
2102
2106
|
);
|
|
2103
2107
|
l && (a = Object.assign(
|
|
2104
2108
|
{},
|
|
@@ -2119,13 +2123,13 @@ class Vi extends gr {
|
|
|
2119
2123
|
}
|
|
2120
2124
|
}
|
|
2121
2125
|
_addBuildingMaskLayer() {
|
|
2122
|
-
if (this._map.getLayer(
|
|
2126
|
+
if (this._map.getLayer(be)) return;
|
|
2123
2127
|
const e = this._originIndoorLayers.find(
|
|
2124
|
-
({ id: i }) => i ===
|
|
2128
|
+
({ id: i }) => i === ae
|
|
2125
2129
|
);
|
|
2126
2130
|
if (e) {
|
|
2127
2131
|
const i = Object.assign({}, e, {
|
|
2128
|
-
id:
|
|
2132
|
+
id: be,
|
|
2129
2133
|
layout: Object.assign({}, e.layout ?? {}, {
|
|
2130
2134
|
visibility: "visible"
|
|
2131
2135
|
}),
|
|
@@ -2133,14 +2137,14 @@ class Vi extends gr {
|
|
|
2133
2137
|
"fill-opacity": 0
|
|
2134
2138
|
})
|
|
2135
2139
|
});
|
|
2136
|
-
this._map.addLayer(i,
|
|
2140
|
+
this._map.addLayer(i, ae);
|
|
2137
2141
|
}
|
|
2138
2142
|
}
|
|
2139
2143
|
_updateUnselectedMask() {
|
|
2140
2144
|
if (!this._isMaskMode) return;
|
|
2141
2145
|
const e = [...this._maskBuildings], i = [...this._maskSharedFloors];
|
|
2142
|
-
this._map.getLayer(
|
|
2143
|
-
|
|
2146
|
+
this._map.getLayer(be) && this._map.setPaintProperty(
|
|
2147
|
+
be,
|
|
2144
2148
|
"fill-opacity",
|
|
2145
2149
|
[
|
|
2146
2150
|
"case",
|
|
@@ -2162,16 +2166,16 @@ class Vi extends gr {
|
|
|
2162
2166
|
_addSelectedHighlightLayers() {
|
|
2163
2167
|
const e = [
|
|
2164
2168
|
{
|
|
2165
|
-
layerId:
|
|
2169
|
+
layerId: Qe,
|
|
2166
2170
|
sourceLayer: "mapxus_level"
|
|
2167
2171
|
},
|
|
2168
2172
|
{
|
|
2169
|
-
layerId:
|
|
2173
|
+
layerId: Ze,
|
|
2170
2174
|
sourceLayer: "mapxus_shared_level"
|
|
2171
2175
|
}
|
|
2172
2176
|
];
|
|
2173
2177
|
let i = this._originIndoorLayers.find(
|
|
2174
|
-
({ type: r }) =>
|
|
2178
|
+
({ type: r }) => et(r)
|
|
2175
2179
|
);
|
|
2176
2180
|
if (!i) {
|
|
2177
2181
|
const r = this._originIndoorLayers.findIndex(
|
|
@@ -2181,7 +2185,7 @@ class Vi extends gr {
|
|
|
2181
2185
|
}
|
|
2182
2186
|
for (const { layerId: r, sourceLayer: s } of e) {
|
|
2183
2187
|
if (this._map.getLayer(r)) continue;
|
|
2184
|
-
const { lineWidth: n, lineOpacity: o, lineColor: a, lineOffset: l } = this._selectedHighlightStyle, d =
|
|
2188
|
+
const { lineWidth: n, lineOpacity: o, lineColor: a, lineOffset: l } = this._selectedHighlightStyle, d = si(n, l);
|
|
2185
2189
|
this._map.addLayer(
|
|
2186
2190
|
{
|
|
2187
2191
|
id: r,
|
|
@@ -2203,8 +2207,8 @@ class Vi extends gr {
|
|
|
2203
2207
|
}
|
|
2204
2208
|
_filterSelectedHighlight() {
|
|
2205
2209
|
for (const e of [
|
|
2206
|
-
|
|
2207
|
-
|
|
2210
|
+
Qe,
|
|
2211
|
+
Ze
|
|
2208
2212
|
])
|
|
2209
2213
|
this._map.getLayer(e) && this._map.setFilter(e, [
|
|
2210
2214
|
"==",
|
|
@@ -2214,15 +2218,15 @@ class Vi extends gr {
|
|
|
2214
2218
|
}
|
|
2215
2219
|
_copyOverlapLayers() {
|
|
2216
2220
|
const e = this._originIndoorLayers.findIndex(
|
|
2217
|
-
({ type: a, "source-layer": l }) =>
|
|
2221
|
+
({ type: a, "source-layer": l }) => oi(l, a)
|
|
2218
2222
|
), i = this._originIndoorLayers.findIndex(
|
|
2219
|
-
({ type: a, "source-layer": l }) =>
|
|
2223
|
+
({ type: a, "source-layer": l }) => Je(l, a)
|
|
2220
2224
|
), r = this._originIndoorLayers.slice(e, i);
|
|
2221
2225
|
this._upperLayers = r.filter(
|
|
2222
|
-
({ type: a }) =>
|
|
2226
|
+
({ type: a }) => La(a)
|
|
2223
2227
|
);
|
|
2224
2228
|
const s = this._originIndoorLayers.slice(i), n = s.findIndex(
|
|
2225
|
-
({ type: a, "source-layer": l }) => !
|
|
2229
|
+
({ type: a, "source-layer": l }) => !Je(l, a)
|
|
2226
2230
|
);
|
|
2227
2231
|
if (n > -1) {
|
|
2228
2232
|
this._commonPoiLayers = s.slice(0, n);
|
|
@@ -2239,7 +2243,7 @@ class Vi extends gr {
|
|
|
2239
2243
|
({ type: a, "source-layer": l }) => l === "mapxus_section" && a === "symbol"
|
|
2240
2244
|
);
|
|
2241
2245
|
const o = this._upperLayers[0];
|
|
2242
|
-
this._middleLayers = this._upperLayers.filter(({ type: a }) => !
|
|
2246
|
+
this._middleLayers = this._upperLayers.filter(({ type: a }) => !et(a)).map((a) => {
|
|
2243
2247
|
const l = `${a.id}-overlap-copy`;
|
|
2244
2248
|
let d = this._map.getLayer(l);
|
|
2245
2249
|
return d || (d = Object.assign({}, a, {
|
|
@@ -2252,7 +2256,7 @@ class Vi extends gr {
|
|
|
2252
2256
|
(s) => s.id === $.split("_")[1]
|
|
2253
2257
|
)) return;
|
|
2254
2258
|
const i = this._upperLayers.filter(
|
|
2255
|
-
({ "source-layer": s, type: n }) => !
|
|
2259
|
+
({ "source-layer": s, type: n }) => !_t(s, n) && !et(n)
|
|
2256
2260
|
), r = this._middleLayers[0] || this._upperLayers[0];
|
|
2257
2261
|
this._lowerLayers = [
|
|
2258
2262
|
...i,
|
|
@@ -2267,13 +2271,13 @@ class Vi extends gr {
|
|
|
2267
2271
|
}
|
|
2268
2272
|
_updateFeatures() {
|
|
2269
2273
|
this._features = this._getIndoorFeatures();
|
|
2270
|
-
const e =
|
|
2274
|
+
const e = qi(
|
|
2271
2275
|
this._features,
|
|
2272
2276
|
(n) => n.layer.id + ":" + n.properties.id
|
|
2273
2277
|
), i = [], r = [], s = [];
|
|
2274
2278
|
for (const n of e) {
|
|
2275
2279
|
const o = n.layer.id;
|
|
2276
|
-
o ===
|
|
2280
|
+
o === Ke ? i.push(n) : o === ae ? r.push(n) : o === $ && s.push(n);
|
|
2277
2281
|
}
|
|
2278
2282
|
this._allVenuesMap = new Map(
|
|
2279
2283
|
i.map((n) => [n.properties.id, n])
|
|
@@ -2383,9 +2387,9 @@ class Vi extends gr {
|
|
|
2383
2387
|
type: a,
|
|
2384
2388
|
"source-layer": l
|
|
2385
2389
|
} = s, d = o ? [o] : [], u = n.includes("-shared-bg"), c = [...this._maskBuildings], h = [...this._maskSharedFloors];
|
|
2386
|
-
|
|
2390
|
+
oi(l, a) ? r = [
|
|
2387
2391
|
"all",
|
|
2388
|
-
|
|
2392
|
+
_t(l, a) ? ["!in", "ref:building", ...c] : ["!in", "id", ...h],
|
|
2389
2393
|
["in", "id", ...e],
|
|
2390
2394
|
...d
|
|
2391
2395
|
] : u ? r = [
|
|
@@ -2415,7 +2419,7 @@ class Vi extends gr {
|
|
|
2415
2419
|
// unit,section,gate in shared level
|
|
2416
2420
|
],
|
|
2417
2421
|
...d
|
|
2418
|
-
],
|
|
2422
|
+
], Je(l, a) && r.splice(1, 0, [
|
|
2419
2423
|
"any",
|
|
2420
2424
|
["!has", "overlap"],
|
|
2421
2425
|
[
|
|
@@ -2437,12 +2441,12 @@ class Vi extends gr {
|
|
|
2437
2441
|
}
|
|
2438
2442
|
async _queryVenueFeature(e) {
|
|
2439
2443
|
let i = this.getFeaturesById(e, {
|
|
2440
|
-
layerIds: [
|
|
2444
|
+
layerIds: [Ke]
|
|
2441
2445
|
})[0] ?? null;
|
|
2442
2446
|
if (!i)
|
|
2443
2447
|
try {
|
|
2444
|
-
const r = await
|
|
2445
|
-
i =
|
|
2448
|
+
const r = await at(e);
|
|
2449
|
+
i = Lt(r);
|
|
2446
2450
|
} catch (r) {
|
|
2447
2451
|
console.error(r);
|
|
2448
2452
|
}
|
|
@@ -2460,7 +2464,7 @@ class Vi extends gr {
|
|
|
2460
2464
|
return a[d] ?? null;
|
|
2461
2465
|
}
|
|
2462
2466
|
const l = this._history.getHistoryOrdinal(r);
|
|
2463
|
-
return l && a.includes(l) ? l :
|
|
2467
|
+
return l && a.includes(l) ? l : ji(e);
|
|
2464
2468
|
}
|
|
2465
2469
|
_updateFloorState(e) {
|
|
2466
2470
|
if (!e) {
|
|
@@ -2480,17 +2484,17 @@ class Vi extends gr {
|
|
|
2480
2484
|
}
|
|
2481
2485
|
async _checkAndPanToBuilding() {
|
|
2482
2486
|
this.getFeaturesById(this._curBuildingId, {
|
|
2483
|
-
layerIds: [
|
|
2487
|
+
layerIds: [ae]
|
|
2484
2488
|
})[0] || (this._fitBounds ? this.dragPanHandler.fitBounds() : this.dragPanHandler.panToCenter());
|
|
2485
2489
|
}
|
|
2486
2490
|
_queryVisibleFeature(e) {
|
|
2487
2491
|
const r = [
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
`${
|
|
2491
|
-
`${
|
|
2492
|
-
`${
|
|
2493
|
-
...this._isMaskMode ? [$,
|
|
2492
|
+
ni,
|
|
2493
|
+
Xe,
|
|
2494
|
+
`${ni}-overlap-copy`,
|
|
2495
|
+
`${Xe}-overlap-copy`,
|
|
2496
|
+
`${Xe}-shared-bg`,
|
|
2497
|
+
...this._isMaskMode ? [$, be] : []
|
|
2494
2498
|
].filter(
|
|
2495
2499
|
(o) => !!this._map.getLayer(o)
|
|
2496
2500
|
), s = this._map.queryRenderedFeatures(e, {
|
|
@@ -2504,7 +2508,7 @@ class Vi extends gr {
|
|
|
2504
2508
|
break;
|
|
2505
2509
|
}
|
|
2506
2510
|
}
|
|
2507
|
-
return n &&
|
|
2511
|
+
return n && va(n.sourceLayer, n.layer.type) && (this._maskBuildings.has(n.properties?.id) || (n = null)), n;
|
|
2508
2512
|
}
|
|
2509
2513
|
_queryRenderedFeatures(e) {
|
|
2510
2514
|
const i = (e || []).filter((n) => this._map.getLayer(n));
|
|
@@ -2520,7 +2524,7 @@ class Vi extends gr {
|
|
|
2520
2524
|
);
|
|
2521
2525
|
}
|
|
2522
2526
|
_dispatchIndoorMapLoaded() {
|
|
2523
|
-
this._indoorMapLoaded || (this._indoorMapLoaded = !0, this.emit(
|
|
2527
|
+
this._indoorMapLoaded || (this._indoorMapLoaded = !0, this.emit(ht));
|
|
2524
2528
|
}
|
|
2525
2529
|
_changeOtherVenuesHistory(e) {
|
|
2526
2530
|
const i = [...this._allVenuesMap.values()];
|
|
@@ -2530,8 +2534,8 @@ class Vi extends gr {
|
|
|
2530
2534
|
}
|
|
2531
2535
|
}
|
|
2532
2536
|
}
|
|
2533
|
-
function
|
|
2534
|
-
const i = typeof t == "number" && t ===
|
|
2537
|
+
function si(t, e) {
|
|
2538
|
+
const i = typeof t == "number" && t === De.lineWidth, r = typeof e == "number" && e === De.lineOffset;
|
|
2535
2539
|
if (!r)
|
|
2536
2540
|
return e;
|
|
2537
2541
|
if (i && r)
|
|
@@ -2553,43 +2557,43 @@ function oi(t, e) {
|
|
|
2553
2557
|
if (!i && r)
|
|
2554
2558
|
return typeof t == "number" ? -(t / 2) : e;
|
|
2555
2559
|
}
|
|
2556
|
-
function
|
|
2560
|
+
function va(t, e) {
|
|
2557
2561
|
return t === "mapxus_building" && (e === "fill" || e === "line" || e === "symbol");
|
|
2558
2562
|
}
|
|
2559
|
-
function
|
|
2560
|
-
return
|
|
2563
|
+
function oi(t, e) {
|
|
2564
|
+
return _t(t, e) || Sa(t, e);
|
|
2561
2565
|
}
|
|
2562
|
-
function
|
|
2566
|
+
function _t(t, e) {
|
|
2563
2567
|
return t === "mapxus_level" && (e === "fill" || e === "line");
|
|
2564
2568
|
}
|
|
2565
|
-
function
|
|
2569
|
+
function Sa(t, e) {
|
|
2566
2570
|
return t === "mapxus_shared_level" && (e === "fill" || e === "line");
|
|
2567
2571
|
}
|
|
2568
|
-
function
|
|
2572
|
+
function Je(t, e) {
|
|
2569
2573
|
return t === "mapxus_place" && e === "symbol";
|
|
2570
2574
|
}
|
|
2571
|
-
function
|
|
2575
|
+
function et(t) {
|
|
2572
2576
|
return t === "fill-extrusion";
|
|
2573
2577
|
}
|
|
2574
|
-
function
|
|
2578
|
+
function La(t) {
|
|
2575
2579
|
return t === "line" || t === "fill" || t === "fill-extrusion";
|
|
2576
2580
|
}
|
|
2577
|
-
const
|
|
2578
|
-
class
|
|
2581
|
+
const $e = "Poi_poiClick";
|
|
2582
|
+
class Gi {
|
|
2579
2583
|
_map;
|
|
2580
2584
|
_currentStyle = null;
|
|
2581
2585
|
_styleLayersLength = 0;
|
|
2582
2586
|
_layerIds = [];
|
|
2583
|
-
_dispatch =
|
|
2587
|
+
_dispatch = mt($e);
|
|
2584
2588
|
_listeners = [];
|
|
2585
2589
|
constructor(e) {
|
|
2586
2590
|
this._map = e, this._bindPoiClickEvent();
|
|
2587
2591
|
}
|
|
2588
2592
|
destroy() {
|
|
2589
|
-
this._dispatch.on(`.${
|
|
2593
|
+
this._dispatch.on(`.${$e}`, null), this._currentStyle = null, this._map = null, this._dispatch = null, this._listeners = [], this._layerIds = [];
|
|
2590
2594
|
}
|
|
2591
2595
|
onPoiClick(e) {
|
|
2592
|
-
const i =
|
|
2596
|
+
const i = J(`${$e}.`);
|
|
2593
2597
|
return this._dispatch.on(i, e), this._listeners.push(i), { unsubscribe: () => this._dispatch.on(i, null) };
|
|
2594
2598
|
}
|
|
2595
2599
|
_queryPoiLayers() {
|
|
@@ -2627,7 +2631,7 @@ class zi {
|
|
|
2627
2631
|
id: u,
|
|
2628
2632
|
section: c = "",
|
|
2629
2633
|
correlation_id: h
|
|
2630
|
-
} = d?.properties || {}, f =
|
|
2634
|
+
} = d?.properties || {}, f = ai(
|
|
2631
2635
|
d?.properties
|
|
2632
2636
|
);
|
|
2633
2637
|
return {
|
|
@@ -2645,7 +2649,7 @@ class zi {
|
|
|
2645
2649
|
const a = r.properties["ref:level"], { floor: l, building: d, venue: u } = this._queryIndoorFeaturesByFloor(a);
|
|
2646
2650
|
o.floor = l, o.building = d, o.venue = u;
|
|
2647
2651
|
}
|
|
2648
|
-
this._dispatch.call(
|
|
2652
|
+
this._dispatch.call($e, null, o);
|
|
2649
2653
|
});
|
|
2650
2654
|
}
|
|
2651
2655
|
_queryIndoorFeaturesBySharedFloor(e) {
|
|
@@ -2658,7 +2662,7 @@ class zi {
|
|
|
2658
2662
|
return { floor: null, venue: null };
|
|
2659
2663
|
const s = r.properties["ref:venue"], n = i.find(
|
|
2660
2664
|
(d) => d.layer.id === "mapxus-venue-fill" && d.properties.id === s
|
|
2661
|
-
) ?? null, { id: o, ordinal: a } = r.properties, l =
|
|
2665
|
+
) ?? null, { id: o, ordinal: a } = r.properties, l = ai(r.properties);
|
|
2662
2666
|
return {
|
|
2663
2667
|
floor: { id: o, ordinal: a, name: l },
|
|
2664
2668
|
venue: n
|
|
@@ -2667,7 +2671,7 @@ class zi {
|
|
|
2667
2671
|
_queryIndoorFeaturesByFloor(e) {
|
|
2668
2672
|
const i = this._map.queryRenderedFeatures({
|
|
2669
2673
|
layers: [
|
|
2670
|
-
|
|
2674
|
+
Re,
|
|
2671
2675
|
"mapxus-building-line",
|
|
2672
2676
|
"mapxus-venue-fill"
|
|
2673
2677
|
]
|
|
@@ -2693,7 +2697,7 @@ class zi {
|
|
|
2693
2697
|
};
|
|
2694
2698
|
}
|
|
2695
2699
|
}
|
|
2696
|
-
function
|
|
2700
|
+
function ai(t) {
|
|
2697
2701
|
return t ? Object.keys(t).filter((i) => i.includes("name")).reduce((i, r) => {
|
|
2698
2702
|
const [, s] = I(r, ":");
|
|
2699
2703
|
return s ? i[s] = t[r] : i.default = t[r], i;
|
|
@@ -2706,7 +2710,7 @@ function F(t, e, i) {
|
|
|
2706
2710
|
const r = document.createElement(t);
|
|
2707
2711
|
return e && (r.className = e), i && i.appendChild(r), r;
|
|
2708
2712
|
}
|
|
2709
|
-
class
|
|
2713
|
+
class Yi {
|
|
2710
2714
|
_map;
|
|
2711
2715
|
_maplibre;
|
|
2712
2716
|
_buildingId;
|
|
@@ -2866,24 +2870,24 @@ class Gi {
|
|
|
2866
2870
|
).matches;
|
|
2867
2871
|
}
|
|
2868
2872
|
}
|
|
2869
|
-
var
|
|
2870
|
-
function
|
|
2871
|
-
return t >=
|
|
2873
|
+
var Ia = Math.max, wa = Math.min;
|
|
2874
|
+
function Ba(t, e, i) {
|
|
2875
|
+
return t >= wa(e, i) && t < Ia(e, i);
|
|
2872
2876
|
}
|
|
2873
|
-
var
|
|
2874
|
-
function
|
|
2877
|
+
var li = 1 / 0, Pa = 17976931348623157e292;
|
|
2878
|
+
function di(t) {
|
|
2875
2879
|
if (!t)
|
|
2876
2880
|
return t === 0 ? t : 0;
|
|
2877
|
-
if (t =
|
|
2881
|
+
if (t = Ne(t), t === li || t === -li) {
|
|
2878
2882
|
var e = t < 0 ? -1 : 1;
|
|
2879
|
-
return e *
|
|
2883
|
+
return e * Pa;
|
|
2880
2884
|
}
|
|
2881
2885
|
return t === t ? t : 0;
|
|
2882
2886
|
}
|
|
2883
|
-
function
|
|
2884
|
-
return e =
|
|
2887
|
+
function Wi(t, e, i) {
|
|
2888
|
+
return e = di(e), i === void 0 ? (i = e, e = 0) : i = di(i), t = Ne(t), Ba(t, e, i);
|
|
2885
2889
|
}
|
|
2886
|
-
class
|
|
2890
|
+
class Ki {
|
|
2887
2891
|
_container;
|
|
2888
2892
|
_indoor;
|
|
2889
2893
|
_maplibre;
|
|
@@ -2913,7 +2917,7 @@ class Wi {
|
|
|
2913
2917
|
_clearScrollEventListener;
|
|
2914
2918
|
constructor(e, i) {
|
|
2915
2919
|
const { style: r, enabled: s = !0, language: n } = i;
|
|
2916
|
-
this._indoor = e, this._language = n, this._style = r ? Object.assign({},
|
|
2920
|
+
this._indoor = e, this._language = n, this._style = r ? Object.assign({}, $t, r) : $t, this._isEnabled = s, this._addIndoorEventListeners();
|
|
2917
2921
|
}
|
|
2918
2922
|
onAdd(e) {
|
|
2919
2923
|
return this._maplibre = e, this._addMapMoveEventListener(), this._container = F(
|
|
@@ -2972,7 +2976,7 @@ class Wi {
|
|
|
2972
2976
|
}
|
|
2973
2977
|
_addIndoorEventListeners() {
|
|
2974
2978
|
this._indoor.on(
|
|
2975
|
-
|
|
2979
|
+
Me,
|
|
2976
2980
|
(e) => {
|
|
2977
2981
|
if (this._updatePrepared(), !e) return;
|
|
2978
2982
|
const { ordinal: i, dragPan: r } = e;
|
|
@@ -3062,7 +3066,7 @@ class Wi {
|
|
|
3062
3066
|
width: `${r}px`
|
|
3063
3067
|
}), this._$createFloors(this._$innerFloors), this._floorNames.length > s && (this._$arrowBtnDown = this._$createScrollButton(l, "down"), this._$arrowBtnDown.onclick = () => this._handleScroll("down"), this._$innerFloors.addEventListener(
|
|
3064
3068
|
"scroll",
|
|
3065
|
-
this._debounceScroll =
|
|
3069
|
+
this._debounceScroll = Vi((d) => {
|
|
3066
3070
|
d.stopPropagation(), this._resetArrowBtnStatus(this._$innerFloors.scrollTop);
|
|
3067
3071
|
}, 100)
|
|
3068
3072
|
), this._clearScrollEventListener = () => this._$innerFloors.removeEventListener(
|
|
@@ -3147,7 +3151,7 @@ class Wi {
|
|
|
3147
3151
|
}
|
|
3148
3152
|
}
|
|
3149
3153
|
_getScrollTop(e) {
|
|
3150
|
-
return
|
|
3154
|
+
return Wi(this._centerSelectorIdx, this._lastNormalScrollableIdx + 1) ? (e - this._centerSelectorIdx) * this._style.itemSize : e > this._lastNormalScrollableIdx ? this._maxScrollTop : 0;
|
|
3151
3155
|
}
|
|
3152
3156
|
_handleScroll(e) {
|
|
3153
3157
|
const i = this._$innerFloors.scrollTop, { itemSize: r } = this._style;
|
|
@@ -3163,8 +3167,8 @@ class Wi {
|
|
|
3163
3167
|
e ? (this._$selectorExpanded.classList.remove("hidden"), this._$selectorFolded.classList.add("hidden")) : (this._$selectorExpanded.classList.add("hidden"), this._$selectorFolded.classList.remove("hidden"));
|
|
3164
3168
|
}
|
|
3165
3169
|
}
|
|
3166
|
-
const
|
|
3167
|
-
class
|
|
3170
|
+
const Xi = yt.includes("co.jp"), Fa = Xi ? "kawasaki-logo" : "mapxus-logo", Ca = Xi ? "https://www.khi.co.jp/groupvision2030/mapxus.html" : "https://www.mapxus.com/";
|
|
3171
|
+
class Ea {
|
|
3168
3172
|
_container;
|
|
3169
3173
|
_isEnabled;
|
|
3170
3174
|
constructor(e) {
|
|
@@ -3178,10 +3182,10 @@ class Fa {
|
|
|
3178
3182
|
), this._isEnabled) {
|
|
3179
3183
|
const i = F(
|
|
3180
3184
|
"a",
|
|
3181
|
-
|
|
3185
|
+
Fa,
|
|
3182
3186
|
this._container
|
|
3183
3187
|
);
|
|
3184
|
-
i.target = "_blank", i.href =
|
|
3188
|
+
i.target = "_blank", i.href = Ca, i.setAttribute("aria-label", "Mapxus logo"), i.setAttribute("rel", "noopener"), this._container.appendChild(i);
|
|
3185
3189
|
}
|
|
3186
3190
|
return this._container;
|
|
3187
3191
|
}
|
|
@@ -3192,8 +3196,8 @@ class Fa {
|
|
|
3192
3196
|
return "bottom-left";
|
|
3193
3197
|
}
|
|
3194
3198
|
}
|
|
3195
|
-
const
|
|
3196
|
-
class
|
|
3199
|
+
const xa = yt.includes("co.jp");
|
|
3200
|
+
class Oa {
|
|
3197
3201
|
_container;
|
|
3198
3202
|
_anchor;
|
|
3199
3203
|
_theme;
|
|
@@ -3221,10 +3225,10 @@ class Ea {
|
|
|
3221
3225
|
this._setCopyrightInfo(e);
|
|
3222
3226
|
}
|
|
3223
3227
|
_setCopyrightInfo(e) {
|
|
3224
|
-
this._anchor.innerText = e === "landsD" ? "© The Government of the Hong Kong SAR" :
|
|
3228
|
+
this._anchor.innerText = e === "landsD" ? "© The Government of the Hong Kong SAR" : xa ? "©Mapxus driven by Kawasaki ©OpenStreetMap contributors" : "©Mapxus ©OpenStreetMap contributors", e === "landsD" && (this._anchor.href = "https://www.map.gov.hk/gm/");
|
|
3225
3229
|
}
|
|
3226
3230
|
}
|
|
3227
|
-
class
|
|
3231
|
+
class $a {
|
|
3228
3232
|
_container;
|
|
3229
3233
|
_$icon;
|
|
3230
3234
|
_removeClickEventListener;
|
|
@@ -3233,7 +3237,7 @@ class xa {
|
|
|
3233
3237
|
"div",
|
|
3234
3238
|
"maplibregl-ctrl mapxus-ctrl-collapsed-copyright",
|
|
3235
3239
|
e.getContainer()
|
|
3236
|
-
), this._container.innerHTML =
|
|
3240
|
+
), this._container.innerHTML = Ma(), this._bindEvents(), this._container;
|
|
3237
3241
|
}
|
|
3238
3242
|
onRemove() {
|
|
3239
3243
|
this._removeClickEventListener(), Ee(this._container);
|
|
@@ -3258,7 +3262,7 @@ class xa {
|
|
|
3258
3262
|
}
|
|
3259
3263
|
}
|
|
3260
3264
|
}
|
|
3261
|
-
function
|
|
3265
|
+
function Ma() {
|
|
3262
3266
|
return `
|
|
3263
3267
|
<div class="mapxus-collapsed-copyright-content">
|
|
3264
3268
|
<div class="mapxus-collapsed-copyright-menu hidden">
|
|
@@ -3270,11 +3274,11 @@ function Oa() {
|
|
|
3270
3274
|
</div>
|
|
3271
3275
|
`;
|
|
3272
3276
|
}
|
|
3273
|
-
function
|
|
3274
|
-
return `${
|
|
3277
|
+
function tt(t) {
|
|
3278
|
+
return `${yt}/${_r}/${t}`;
|
|
3275
3279
|
}
|
|
3276
|
-
var
|
|
3277
|
-
class
|
|
3280
|
+
var Qi = /* @__PURE__ */ ((t) => (t.CHRISTMAS = "christmas_mims2_v1", t.HALLOWEEN = "halloween_mims2_v1", t.MAPPY_BEE = "mappybee_mims2_v2", t.MAPXUS = "mapxus_mims2_v1", t.LANDS_D = "lands_d_mims2_v1", t.COMMON = "common_mims2_v1", t.MAPXUS_V2 = "mapxus_v2", t.MAPXUS_DEFAULT = "mapxus_v8", t.ROSE_TEA = "rose_tea", t.PEAR_SORBET = "pear_sorbet", t.CITY_WALK = "city_walk", t.MOCHA_MOUSSE = "mocha_mousse", t.SECTION_DISPLAY_BY_COLOR = "mapxus_v7_with_section_v2", t.SECTION_DISPLAY_BY_CATEGORY = "mapxus_v7_with_section_v3", t))(Qi || {});
|
|
3281
|
+
class Zi {
|
|
3278
3282
|
_buildingSelector;
|
|
3279
3283
|
_isEnabled = !0;
|
|
3280
3284
|
_position;
|
|
@@ -3306,7 +3310,7 @@ class Qi {
|
|
|
3306
3310
|
return this._position;
|
|
3307
3311
|
}
|
|
3308
3312
|
}
|
|
3309
|
-
class
|
|
3313
|
+
class Ji {
|
|
3310
3314
|
_floorSelector;
|
|
3311
3315
|
_isEnabled;
|
|
3312
3316
|
_position;
|
|
@@ -3341,7 +3345,7 @@ class Zi {
|
|
|
3341
3345
|
return this._position;
|
|
3342
3346
|
}
|
|
3343
3347
|
}
|
|
3344
|
-
class
|
|
3348
|
+
class er {
|
|
3345
3349
|
_indoor;
|
|
3346
3350
|
_isEnabled = !0;
|
|
3347
3351
|
constructor(e) {
|
|
@@ -3357,7 +3361,7 @@ class Ji {
|
|
|
3357
3361
|
return this._isEnabled;
|
|
3358
3362
|
}
|
|
3359
3363
|
}
|
|
3360
|
-
class
|
|
3364
|
+
class tr {
|
|
3361
3365
|
_indoor;
|
|
3362
3366
|
_isEnabled = !0;
|
|
3363
3367
|
constructor(e) {
|
|
@@ -3373,7 +3377,7 @@ class er {
|
|
|
3373
3377
|
return this._isEnabled;
|
|
3374
3378
|
}
|
|
3375
3379
|
}
|
|
3376
|
-
class
|
|
3380
|
+
class ir {
|
|
3377
3381
|
_indoor;
|
|
3378
3382
|
_isEnabled = !0;
|
|
3379
3383
|
constructor(e) {
|
|
@@ -3389,7 +3393,7 @@ class tr {
|
|
|
3389
3393
|
return this._isEnabled;
|
|
3390
3394
|
}
|
|
3391
3395
|
}
|
|
3392
|
-
class
|
|
3396
|
+
class rr {
|
|
3393
3397
|
_indoor;
|
|
3394
3398
|
_isEnabled = !0;
|
|
3395
3399
|
constructor(e) {
|
|
@@ -3405,8 +3409,8 @@ class ir {
|
|
|
3405
3409
|
return this._isEnabled;
|
|
3406
3410
|
}
|
|
3407
3411
|
}
|
|
3408
|
-
const
|
|
3409
|
-
let
|
|
3412
|
+
const it = "Map_mapClick", rt = "Map_pointClick", nt = "Map_isRenderComplete", Le = "Map_isDestroyed", X = pe.getInstance();
|
|
3413
|
+
let Aa = class {
|
|
3410
3414
|
_map;
|
|
3411
3415
|
_indoor;
|
|
3412
3416
|
_poi;
|
|
@@ -3414,11 +3418,11 @@ let $a = class {
|
|
|
3414
3418
|
_buildingFilterControl;
|
|
3415
3419
|
_attributionControl;
|
|
3416
3420
|
_language;
|
|
3417
|
-
_dispatch =
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3421
|
+
_dispatch = mt(
|
|
3422
|
+
it,
|
|
3423
|
+
rt,
|
|
3424
|
+
nt,
|
|
3425
|
+
Le
|
|
3422
3426
|
);
|
|
3423
3427
|
_fitBounds;
|
|
3424
3428
|
_history = Y.getInstance();
|
|
@@ -3434,10 +3438,10 @@ let $a = class {
|
|
|
3434
3438
|
floorSelector;
|
|
3435
3439
|
constructor(e) {
|
|
3436
3440
|
if (!e.map)
|
|
3437
|
-
throw new
|
|
3441
|
+
throw new xt("Parameter 'Map' is required!", {
|
|
3438
3442
|
type: "ValidationError"
|
|
3439
3443
|
});
|
|
3440
|
-
|
|
3444
|
+
X.registerSDK(), this._permissionCheck().then(() => this._setup(e)).catch((i) => {
|
|
3441
3445
|
const r = i.cause ? i.message + " " + i.cause.message : i.message;
|
|
3442
3446
|
console.error(r);
|
|
3443
3447
|
});
|
|
@@ -3447,7 +3451,7 @@ let $a = class {
|
|
|
3447
3451
|
* @param callback
|
|
3448
3452
|
*/
|
|
3449
3453
|
renderComplete(e) {
|
|
3450
|
-
const i =
|
|
3454
|
+
const i = J(`${nt}.`);
|
|
3451
3455
|
this._dispatch.on(i, e);
|
|
3452
3456
|
}
|
|
3453
3457
|
/**
|
|
@@ -3455,9 +3459,9 @@ let $a = class {
|
|
|
3455
3459
|
* @param callback
|
|
3456
3460
|
*/
|
|
3457
3461
|
destroyed(e) {
|
|
3458
|
-
const i =
|
|
3462
|
+
const i = J(`${Le}.`);
|
|
3459
3463
|
this._dispatch.on(i, () => {
|
|
3460
|
-
e(), this._dispatch.on(i, null), this._dispatch._[
|
|
3464
|
+
e(), this._dispatch.on(i, null), this._dispatch._[Le].length === 0 && (delete this._dispatch, Object.freeze(this));
|
|
3461
3465
|
});
|
|
3462
3466
|
}
|
|
3463
3467
|
/**
|
|
@@ -3535,6 +3539,15 @@ let $a = class {
|
|
|
3535
3539
|
this._indoor?.setOutdoorMapShown(e);
|
|
3536
3540
|
}
|
|
3537
3541
|
/**
|
|
3542
|
+
* Query indoor features and coordinate by screen point.
|
|
3543
|
+
* @param point
|
|
3544
|
+
* @returns
|
|
3545
|
+
*/
|
|
3546
|
+
queryIndoorInfoByPoint(e) {
|
|
3547
|
+
return this._indoor?.queryIndoorInfoByPoint(e);
|
|
3548
|
+
}
|
|
3549
|
+
/**
|
|
3550
|
+
* @deprecated Use "queryIndoorInfoByPoint()" instead.
|
|
3538
3551
|
* Query indoor features by screen point({x, y}).
|
|
3539
3552
|
* @param point
|
|
3540
3553
|
* @returns
|
|
@@ -3544,7 +3557,7 @@ let $a = class {
|
|
|
3544
3557
|
layers: [
|
|
3545
3558
|
"mapxus-venue-fill",
|
|
3546
3559
|
"mapxus-building-line",
|
|
3547
|
-
|
|
3560
|
+
Re,
|
|
3548
3561
|
$
|
|
3549
3562
|
]
|
|
3550
3563
|
}), n = s.find(
|
|
@@ -3618,7 +3631,7 @@ let $a = class {
|
|
|
3618
3631
|
*/
|
|
3619
3632
|
async selectFloorById(e, i) {
|
|
3620
3633
|
const { dragPan: r = !0, animate: s = !0, fitBounds: n } = i || {}, o = n ?? this._fitBounds, a = async () => {
|
|
3621
|
-
const l = await
|
|
3634
|
+
const l = await ui(e), { maxLat: d, maxLon: u, minLat: c, minLon: h } = l?.bbox || {};
|
|
3622
3635
|
this._indoor.dragPanHandler.setBounds([
|
|
3623
3636
|
h,
|
|
3624
3637
|
c,
|
|
@@ -3643,7 +3656,7 @@ let $a = class {
|
|
|
3643
3656
|
if (d)
|
|
3644
3657
|
o && await a();
|
|
3645
3658
|
else {
|
|
3646
|
-
const c = await
|
|
3659
|
+
const c = await ui(e), { maxLat: h, maxLon: f, minLat: p, minLon: _ } = c.bbox;
|
|
3647
3660
|
l = !0, d = c.feature, this._indoor.dragPanHandler.setBounds([
|
|
3648
3661
|
_,
|
|
3649
3662
|
p,
|
|
@@ -3660,7 +3673,7 @@ let $a = class {
|
|
|
3660
3673
|
}
|
|
3661
3674
|
async selectSharedFloorById(e, i) {
|
|
3662
3675
|
const { dragPan: r = !0, animate: s = !0, fitBounds: n } = i || {}, o = n ?? this._fitBounds, a = async () => {
|
|
3663
|
-
const l = await
|
|
3676
|
+
const l = await Ta(e), { maxLat: d, maxLon: u, minLat: c, minLon: h } = l?.bbox || {};
|
|
3664
3677
|
this._indoor.dragPanHandler.setBounds([
|
|
3665
3678
|
h,
|
|
3666
3679
|
c,
|
|
@@ -3681,8 +3694,8 @@ let $a = class {
|
|
|
3681
3694
|
if (c)
|
|
3682
3695
|
o && await a();
|
|
3683
3696
|
else {
|
|
3684
|
-
const h = await
|
|
3685
|
-
u =
|
|
3697
|
+
const h = await Si(e);
|
|
3698
|
+
u = Lt(h), l = !0;
|
|
3686
3699
|
const { maxLat: f, maxLon: p, minLat: _, minLon: g } = h?.bbox || {};
|
|
3687
3700
|
this._indoor.dragPanHandler.setBounds([
|
|
3688
3701
|
g,
|
|
@@ -3692,8 +3705,8 @@ let $a = class {
|
|
|
3692
3705
|
]);
|
|
3693
3706
|
const y = h.sharedFloors.find(
|
|
3694
3707
|
({ id: w }) => w === e
|
|
3695
|
-
), { id:
|
|
3696
|
-
d = { id:
|
|
3708
|
+
), { id: v, name: B, ordinal: C } = y;
|
|
3709
|
+
d = { id: v, name: B, ordinal: C + "" };
|
|
3697
3710
|
}
|
|
3698
3711
|
if (!l) {
|
|
3699
3712
|
const {
|
|
@@ -3729,7 +3742,7 @@ let $a = class {
|
|
|
3729
3742
|
*/
|
|
3730
3743
|
async selectBuildingById(e, i) {
|
|
3731
3744
|
const { dragPan: r = !0, animate: s = !0, fitBounds: n } = i || {}, o = n ?? this._fitBounds, a = async () => {
|
|
3732
|
-
const l = await
|
|
3745
|
+
const l = await ot(e), { maxLat: d, maxLon: u, minLat: c, minLon: h } = l?.bbox || {};
|
|
3733
3746
|
this._indoor.dragPanHandler.setBounds([
|
|
3734
3747
|
h,
|
|
3735
3748
|
c,
|
|
@@ -3749,8 +3762,8 @@ let $a = class {
|
|
|
3749
3762
|
if (d)
|
|
3750
3763
|
o && await a();
|
|
3751
3764
|
else {
|
|
3752
|
-
const u = await
|
|
3753
|
-
d =
|
|
3765
|
+
const u = await ot(e), { maxLat: c, maxLon: h, minLat: f, minLon: p } = u?.bbox || {};
|
|
3766
|
+
d = fi(u), l = !0, this._indoor.dragPanHandler.setBounds([
|
|
3754
3767
|
p,
|
|
3755
3768
|
f,
|
|
3756
3769
|
h,
|
|
@@ -3774,7 +3787,7 @@ let $a = class {
|
|
|
3774
3787
|
return;
|
|
3775
3788
|
}
|
|
3776
3789
|
const { dragPan: s = !0, animate: n = !0, fitBounds: o } = i || {}, a = o ?? this._fitBounds, l = async () => {
|
|
3777
|
-
const d = await
|
|
3790
|
+
const d = await at(e), { maxLat: u, maxLon: c, minLat: h, minLon: f } = d?.bbox || {};
|
|
3778
3791
|
this._indoor.dragPanHandler.setBounds([
|
|
3779
3792
|
f,
|
|
3780
3793
|
h,
|
|
@@ -3801,7 +3814,7 @@ let $a = class {
|
|
|
3801
3814
|
const { default_displayed_building: h, building_ids: f } = u.properties;
|
|
3802
3815
|
c = h || I(f)[0];
|
|
3803
3816
|
} else {
|
|
3804
|
-
const h = await
|
|
3817
|
+
const h = await at(e);
|
|
3805
3818
|
c = h.defaultBuilding || h.buildings[0]?.id;
|
|
3806
3819
|
}
|
|
3807
3820
|
await this.selectBuildingById(c, i);
|
|
@@ -3813,7 +3826,7 @@ let $a = class {
|
|
|
3813
3826
|
* @param listener
|
|
3814
3827
|
*/
|
|
3815
3828
|
onMapClickListener(e) {
|
|
3816
|
-
const i =
|
|
3829
|
+
const i = J(`${it}.`);
|
|
3817
3830
|
return this._dispatch.on(i, e), { unsubscribe: () => this._dispatch.on(i, null) };
|
|
3818
3831
|
}
|
|
3819
3832
|
/**
|
|
@@ -3828,7 +3841,7 @@ let $a = class {
|
|
|
3828
3841
|
* @param listener
|
|
3829
3842
|
*/
|
|
3830
3843
|
onPointClickListener(e) {
|
|
3831
|
-
const i =
|
|
3844
|
+
const i = J(`${rt}.`);
|
|
3832
3845
|
return this._dispatch.on(i, e), { unsubscribe: () => this._dispatch.on(i, null) };
|
|
3833
3846
|
}
|
|
3834
3847
|
/**
|
|
@@ -3847,7 +3860,7 @@ let $a = class {
|
|
|
3847
3860
|
this.setTheme(e);
|
|
3848
3861
|
}
|
|
3849
3862
|
setTheme(e) {
|
|
3850
|
-
e !==
|
|
3863
|
+
e !== X.theme && (this._setStyle(tt(e), { diff: !1 }), X.setTheme(e), this._map?.once("styledata", () => {
|
|
3851
3864
|
this._indoor.updateCustomLayers(), this._indoor.updateRendering();
|
|
3852
3865
|
}), "changeTheme" in this._attributionControl && this._attributionControl.changeTheme(e));
|
|
3853
3866
|
}
|
|
@@ -3873,7 +3886,7 @@ let $a = class {
|
|
|
3873
3886
|
floorId: n,
|
|
3874
3887
|
buildingId: o,
|
|
3875
3888
|
venueId: a,
|
|
3876
|
-
theme: l =
|
|
3889
|
+
theme: l = Qi.MAPXUS_DEFAULT,
|
|
3877
3890
|
floorSelectorEnabled: d,
|
|
3878
3891
|
buildingSelectorEnabled: u,
|
|
3879
3892
|
outdoorMapShown: c = !0,
|
|
@@ -3883,16 +3896,16 @@ let $a = class {
|
|
|
3883
3896
|
fitBounds: _,
|
|
3884
3897
|
boundsPadding: g = 30,
|
|
3885
3898
|
selectedHighlightStyle: y,
|
|
3886
|
-
floorSelectorStyle:
|
|
3887
|
-
language: B =
|
|
3899
|
+
floorSelectorStyle: v,
|
|
3900
|
+
language: B = Lr,
|
|
3888
3901
|
autoSelectBuilding: C = !1,
|
|
3889
3902
|
transformRequest: w = null,
|
|
3890
|
-
mapxusLogoEnabled:
|
|
3903
|
+
mapxusLogoEnabled: b = !0,
|
|
3891
3904
|
enableIndoorClickSelection: E = !0,
|
|
3892
3905
|
enableOutdoorClickSelection: x = !0,
|
|
3893
|
-
floorSwitchScope: P =
|
|
3906
|
+
floorSwitchScope: P = bt.VENUE
|
|
3894
3907
|
} = e;
|
|
3895
|
-
this._map = i, this.
|
|
3908
|
+
this._map = i, this._fitBounds = _ ?? p ?? !1, this._indoor = new zi({
|
|
3896
3909
|
map: this._map,
|
|
3897
3910
|
startWithIndoorView: !!(a || o || n || r || s),
|
|
3898
3911
|
outdoorMapShown: c,
|
|
@@ -3903,23 +3916,23 @@ let $a = class {
|
|
|
3903
3916
|
enableIndoorClickSelection: E,
|
|
3904
3917
|
enableOutdoorClickSelection: x,
|
|
3905
3918
|
floorSwitchScope: P
|
|
3906
|
-
}), this._poi = new
|
|
3919
|
+
}), this._poi = new Gi(this._map), this._transformRequestHandler = w, this._resourceRequestTransform(), this._installRtlTextPlugin(), this._setStyle(tt(l)), X.setTheme(l), this._checkMapZoom(), h ? this._attributionControl = new $a() : (this._attributionControl = new Oa({
|
|
3907
3920
|
theme: l
|
|
3908
|
-
}), this._addControl(new
|
|
3909
|
-
this._buildingFilterControl = new
|
|
3921
|
+
}), this._addControl(new Ea({ enabled: b }))), this._addControl(this._attributionControl), this._addControl(
|
|
3922
|
+
this._buildingFilterControl = new Yi(
|
|
3910
3923
|
this,
|
|
3911
3924
|
u
|
|
3912
3925
|
)
|
|
3913
3926
|
), this._addControl(
|
|
3914
|
-
this._floorsControl = new
|
|
3927
|
+
this._floorsControl = new Ki(this._indoor, {
|
|
3915
3928
|
language: B,
|
|
3916
|
-
style:
|
|
3929
|
+
style: v,
|
|
3917
3930
|
enabled: d
|
|
3918
3931
|
})
|
|
3919
|
-
), r ? this._selectPoiById(r) : n ? this.selectFloorById(n, { animate: !1 }) : o ? this.selectBuildingById(o, { animate: !1 }) : a ? this.selectVenueById(a, { animate: !1 }) : s && this.selectSharedFloorById(s, { animate: !1 }), this.switchOutdoor = new
|
|
3932
|
+
), r ? this._selectPoiById(r) : n ? this.selectFloorById(n, { animate: !1 }) : o ? this.selectBuildingById(o, { animate: !1 }) : a ? this.selectVenueById(a, { animate: !1 }) : s && this.selectSharedFloorById(s, { animate: !1 }), this.switchOutdoor = new tr(this._indoor), this.switchBuilding = new er(this._indoor), this.outdoorClickSelection = new rr(this._indoor), this.indoorClickSelection = new ir(this._indoor), this.buildingSelector = new Zi(
|
|
3920
3933
|
this._buildingFilterControl
|
|
3921
|
-
), this.floorSelector = new
|
|
3922
|
-
C && this._map.on("moveend", () => this._selectCenterBuilding()), this._bindMapClickListener(), this._dispatch.call(
|
|
3934
|
+
), this.floorSelector = new Ji(this._floorsControl), this._map.once("styledata", () => this.setLanguage(B)), this._map.on("remove", () => this._destroy()), this._map.on("error", (L) => this._updatePermission(L)), this._indoor.once(ht, () => {
|
|
3935
|
+
C && this._map.on("moveend", () => this._selectCenterBuilding()), this._bindMapClickListener(), this._dispatch.call(nt);
|
|
3923
3936
|
});
|
|
3924
3937
|
}
|
|
3925
3938
|
_setStyle(e, i) {
|
|
@@ -3933,7 +3946,7 @@ let $a = class {
|
|
|
3933
3946
|
}
|
|
3934
3947
|
async _selectPoiById(e) {
|
|
3935
3948
|
try {
|
|
3936
|
-
const i = await
|
|
3949
|
+
const i = await Mr(e), { lon: r, lat: s } = i.location;
|
|
3937
3950
|
"floorId" in i ? await this.selectFloorById(i.floorId, { animate: !1 }) : "sharedFloorId" in i && await this.selectSharedFloorById(i.sharedFloorId, {
|
|
3938
3951
|
animate: !1
|
|
3939
3952
|
}), this._map.panTo([r, s], { animate: !1 });
|
|
@@ -3945,12 +3958,12 @@ let $a = class {
|
|
|
3945
3958
|
_resourceRequestTransform() {
|
|
3946
3959
|
this._map.setTransformRequest(
|
|
3947
3960
|
(e, i) => {
|
|
3948
|
-
const { host: r } = new URL(e), s = r.includes("map-api") && r.includes("mapxus"), n =
|
|
3961
|
+
const { host: r } = new URL(e), s = r.includes("map-api") && r.includes("mapxus"), n = mr();
|
|
3949
3962
|
return s ? {
|
|
3950
3963
|
url: e,
|
|
3951
3964
|
headers: {
|
|
3952
3965
|
"Content-Type": "application/json",
|
|
3953
|
-
sdkVersion: `web-${
|
|
3966
|
+
sdkVersion: `web-${Ot.MapSDK}/${fr}`,
|
|
3954
3967
|
identifier: n.identifier,
|
|
3955
3968
|
token: n.token
|
|
3956
3969
|
}
|
|
@@ -3966,9 +3979,9 @@ let $a = class {
|
|
|
3966
3979
|
}
|
|
3967
3980
|
async _updatePermission(e) {
|
|
3968
3981
|
if (e.error?.status !== 401) return;
|
|
3969
|
-
await
|
|
3982
|
+
await br(), this._resourceRequestTransform();
|
|
3970
3983
|
const i = e.error.url;
|
|
3971
|
-
/^https:\/\/[^/]+\/bms\/api\/v\d+\/tiles\/styles\//.test(i) &&
|
|
3984
|
+
/^https:\/\/[^/]+\/bms\/api\/v\d+\/tiles\/styles\//.test(i) && X.theme && this._setStyle(tt(X.theme));
|
|
3972
3985
|
}
|
|
3973
3986
|
_selectCenterBuilding() {
|
|
3974
3987
|
const e = this._getCenterBuildingUnitsMap();
|
|
@@ -4000,7 +4013,7 @@ let $a = class {
|
|
|
4000
4013
|
{
|
|
4001
4014
|
layers: o
|
|
4002
4015
|
}
|
|
4003
|
-
), d =
|
|
4016
|
+
), d = qi(a, "properties.id").filter(
|
|
4004
4017
|
(u) => !this._indoor.layeredHandler.getHiddenBuildings().includes(u.properties.id)
|
|
4005
4018
|
);
|
|
4006
4019
|
return new globalThis.Map(
|
|
@@ -4018,34 +4031,29 @@ let $a = class {
|
|
|
4018
4031
|
}
|
|
4019
4032
|
_bindMapClickListener() {
|
|
4020
4033
|
this._map.on("click", async (e) => {
|
|
4021
|
-
const { point: i, lngLat: r } = e, s =
|
|
4022
|
-
await this._indoor.selectByClickMap(s), this._dispatch.call(
|
|
4034
|
+
const { point: i, lngLat: r } = e, s = this._indoor.queryIndoorInfoByPoint(i);
|
|
4035
|
+
await this._indoor.selectByClickMap(s), this._dispatch.call(rt, null, {
|
|
4023
4036
|
point: i,
|
|
4024
4037
|
coordinate: r
|
|
4025
|
-
}), this._dispatch.call(
|
|
4026
|
-
coordinate: r,
|
|
4027
|
-
venue: s?.venue ?? null,
|
|
4028
|
-
building: s && "building" in s ? s.building : null,
|
|
4029
|
-
floor: s ? "sharedFloor" in s ? s.sharedFloor : s.floor ?? null : null
|
|
4030
|
-
});
|
|
4038
|
+
}), this._dispatch.call(it, null, s);
|
|
4031
4039
|
});
|
|
4032
4040
|
}
|
|
4033
4041
|
_dispatchErrorGlobal(e, i) {
|
|
4034
|
-
const r =
|
|
4042
|
+
const r = X.getGlobalDispatcher();
|
|
4035
4043
|
if (!r) return;
|
|
4036
4044
|
const s = i.response?.status || i.status || "unknown", n = i.response?.data?.message || i.message || "unknown";
|
|
4037
4045
|
r.call(e, null, { status: s, message: n });
|
|
4038
4046
|
}
|
|
4039
4047
|
_installRtlTextPlugin() {
|
|
4040
|
-
|
|
4048
|
+
Et.getRTLTextPluginStatus() === "unavailable" && Et.setRTLTextPlugin(
|
|
4041
4049
|
"https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.3.0/dist/mapbox-gl-rtl-text.js",
|
|
4042
4050
|
!0
|
|
4043
4051
|
);
|
|
4044
4052
|
}
|
|
4045
4053
|
async _permissionCheck() {
|
|
4046
4054
|
try {
|
|
4047
|
-
if (!(await
|
|
4048
|
-
throw new
|
|
4055
|
+
if (!(await vr(Ot.MapSDK) === "true"))
|
|
4056
|
+
throw new xt("Permission invalid!", {
|
|
4049
4057
|
status: 403,
|
|
4050
4058
|
type: "PermissionError"
|
|
4051
4059
|
});
|
|
@@ -4059,26 +4067,26 @@ let $a = class {
|
|
|
4059
4067
|
this.isDestroyed = !0;
|
|
4060
4068
|
const e = this._dispatch._;
|
|
4061
4069
|
for (const i in e)
|
|
4062
|
-
i !==
|
|
4070
|
+
i !== Le && e.hasOwnProperty(i) && e[i].forEach(({ name: r }) => {
|
|
4063
4071
|
this._dispatch.on(`${i}.${r}`, null);
|
|
4064
4072
|
});
|
|
4065
4073
|
this._indoor.destroy(), this._poi.destroy(), Object.keys(this).forEach((i) => {
|
|
4066
4074
|
i !== "isDestroyed" && i !== "_dispatch" && delete this[i];
|
|
4067
|
-
}), this._dispatch.call(
|
|
4075
|
+
}), this._dispatch.call(Le);
|
|
4068
4076
|
}
|
|
4069
4077
|
};
|
|
4070
|
-
async function
|
|
4071
|
-
const e = await
|
|
4078
|
+
async function ui(t) {
|
|
4079
|
+
const e = await $r(t);
|
|
4072
4080
|
return {
|
|
4073
|
-
feature:
|
|
4081
|
+
feature: fi(e),
|
|
4074
4082
|
bbox: e.bbox
|
|
4075
4083
|
};
|
|
4076
4084
|
}
|
|
4077
|
-
async function
|
|
4078
|
-
const e = await
|
|
4079
|
-
return { feature:
|
|
4085
|
+
async function Ta(t) {
|
|
4086
|
+
const e = await Si(t);
|
|
4087
|
+
return { feature: Lt(e), bbox: e.bbox };
|
|
4080
4088
|
}
|
|
4081
|
-
async function
|
|
4089
|
+
async function Ie(t, e) {
|
|
4082
4090
|
if (!t.hasImage(e))
|
|
4083
4091
|
try {
|
|
4084
4092
|
const i = await t.loadImage(e);
|
|
@@ -4087,7 +4095,7 @@ async function ve(t, e) {
|
|
|
4087
4095
|
throw new Error(i);
|
|
4088
4096
|
}
|
|
4089
4097
|
}
|
|
4090
|
-
class
|
|
4098
|
+
class ka {
|
|
4091
4099
|
_maplibreMap;
|
|
4092
4100
|
_layerId;
|
|
4093
4101
|
_sourceId;
|
|
@@ -4096,7 +4104,7 @@ class Aa {
|
|
|
4096
4104
|
_iconAnchor = "bottom";
|
|
4097
4105
|
constructor(e) {
|
|
4098
4106
|
this._maplibreMap = e;
|
|
4099
|
-
const i =
|
|
4107
|
+
const i = J();
|
|
4100
4108
|
this._layerId = `MXMap_preset_marker_layer_${i}`, this._sourceId = `MXMap_preset_marker_source_${i}`;
|
|
4101
4109
|
}
|
|
4102
4110
|
/**
|
|
@@ -4107,7 +4115,7 @@ class Aa {
|
|
|
4107
4115
|
async setIcon(e) {
|
|
4108
4116
|
if (typeof e != "string" || !e.trim())
|
|
4109
4117
|
throw new Error("Icon must be a non-empty string.");
|
|
4110
|
-
await
|
|
4118
|
+
await Ie(this._maplibreMap, e.trim()), this._imageName = e;
|
|
4111
4119
|
}
|
|
4112
4120
|
/**
|
|
4113
4121
|
* Set marker image size.
|
|
@@ -4380,11 +4388,11 @@ class Aa {
|
|
|
4380
4388
|
i(s[0]);
|
|
4381
4389
|
}
|
|
4382
4390
|
}
|
|
4383
|
-
function
|
|
4391
|
+
function Ae(t) {
|
|
4384
4392
|
var e = t == null ? 0 : t.length;
|
|
4385
4393
|
return e ? t[e - 1] : void 0;
|
|
4386
4394
|
}
|
|
4387
|
-
const
|
|
4395
|
+
const st = {
|
|
4388
4396
|
indoorLineColor: "#45b1cc",
|
|
4389
4397
|
outdoorLineColor: "#8183ba",
|
|
4390
4398
|
dashedLineColor: "#969696",
|
|
@@ -4405,21 +4413,21 @@ const dt = {
|
|
|
4405
4413
|
size: 0.25,
|
|
4406
4414
|
spacing: 1
|
|
4407
4415
|
}
|
|
4408
|
-
},
|
|
4416
|
+
}, Te = "mmws-source-line-solid", le = "mmws-layer-line-solid", de = "mmws-layer-icon-line-symbol", ft = "mmws-source-line-dashed", Q = "mmws-layer-line-dashed", pt = "mmws-source-icon-connector", nr = "mmws-layer-icon-connector", ke = "mmws-source-icon-marker", gt = "mmws-layer-icon-marker", ci = [
|
|
4409
4417
|
le,
|
|
4410
4418
|
de,
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
],
|
|
4415
|
-
|
|
4419
|
+
Q,
|
|
4420
|
+
nr,
|
|
4421
|
+
gt
|
|
4422
|
+
], Ra = [
|
|
4423
|
+
Te,
|
|
4424
|
+
ft,
|
|
4416
4425
|
pt,
|
|
4417
|
-
|
|
4418
|
-
De
|
|
4426
|
+
ke
|
|
4419
4427
|
];
|
|
4420
|
-
class
|
|
4428
|
+
class Da {
|
|
4421
4429
|
_maplibreMap;
|
|
4422
|
-
_routeStyle =
|
|
4430
|
+
_routeStyle = st;
|
|
4423
4431
|
_styleDiffs = {};
|
|
4424
4432
|
_filterBy = "venue";
|
|
4425
4433
|
_curVenue = null;
|
|
@@ -4451,7 +4459,7 @@ class ka {
|
|
|
4451
4459
|
const i = e.slice(1, e.length - 1);
|
|
4452
4460
|
this._routeStyle.markers = {
|
|
4453
4461
|
from: e[0],
|
|
4454
|
-
to:
|
|
4462
|
+
to: Ae(e),
|
|
4455
4463
|
stops: i.length ? i : [e[0]]
|
|
4456
4464
|
}, this._styleDiffs = { markers: this._routeStyle.markers };
|
|
4457
4465
|
} else
|
|
@@ -4530,15 +4538,15 @@ class ka {
|
|
|
4530
4538
|
dashedLineFeatures: a,
|
|
4531
4539
|
markerFeatures: l
|
|
4532
4540
|
} = this._classifyFeatures(r, s, i);
|
|
4533
|
-
this._renderSolidLines(n), this._renderLineSymbols(
|
|
4541
|
+
this._renderSolidLines(n), this._renderLineSymbols(Te, de), this._routeStyle.disableDashedLine !== !0 && this._renderDashedLines(a), this._renderConnectors(o), this._renderMarkers(l);
|
|
4534
4542
|
}
|
|
4535
4543
|
/**
|
|
4536
4544
|
* Remove route from the map.
|
|
4537
4545
|
*/
|
|
4538
4546
|
remove() {
|
|
4539
|
-
|
|
4547
|
+
ci.forEach((e) => {
|
|
4540
4548
|
this._maplibreMap.getLayer(e) && this._maplibreMap.removeLayer(e);
|
|
4541
|
-
}),
|
|
4549
|
+
}), Ra.forEach((e) => {
|
|
4542
4550
|
this._maplibreMap.getSource(e) && this._maplibreMap.removeSource(e);
|
|
4543
4551
|
});
|
|
4544
4552
|
}
|
|
@@ -4567,12 +4575,12 @@ class ka {
|
|
|
4567
4575
|
floor_id: O,
|
|
4568
4576
|
ordinal: D,
|
|
4569
4577
|
sign: K,
|
|
4570
|
-
type:
|
|
4571
|
-
interval: [xe,
|
|
4578
|
+
type: ie,
|
|
4579
|
+
interval: [xe, me]
|
|
4572
4580
|
} = x;
|
|
4573
|
-
if (
|
|
4581
|
+
if (Na(K))
|
|
4574
4582
|
l.push(x);
|
|
4575
|
-
else if (
|
|
4583
|
+
else if (Ha(K)) {
|
|
4576
4584
|
P !== 0 && P !== e.length - 1 && n.push(
|
|
4577
4585
|
this._createIconFeature(
|
|
4578
4586
|
`connector-${n.length}`,
|
|
@@ -4584,30 +4592,30 @@ class ka {
|
|
|
4584
4592
|
floor_id: O,
|
|
4585
4593
|
ordinal: D
|
|
4586
4594
|
}),
|
|
4587
|
-
icon:
|
|
4595
|
+
icon: ie
|
|
4588
4596
|
}
|
|
4589
4597
|
)
|
|
4590
4598
|
);
|
|
4591
|
-
const
|
|
4592
|
-
if (
|
|
4599
|
+
const Ct = e[P + 1];
|
|
4600
|
+
if (Ct) {
|
|
4593
4601
|
const {
|
|
4594
|
-
venue_id:
|
|
4595
|
-
building_id:
|
|
4596
|
-
floor_id:
|
|
4597
|
-
ordinal:
|
|
4598
|
-
} =
|
|
4602
|
+
venue_id: ar,
|
|
4603
|
+
building_id: lr,
|
|
4604
|
+
floor_id: dr,
|
|
4605
|
+
ordinal: ur
|
|
4606
|
+
} = Ct;
|
|
4599
4607
|
n.push(
|
|
4600
4608
|
this._createIconFeature(
|
|
4601
4609
|
`connector-${n.length}`,
|
|
4602
|
-
i[
|
|
4610
|
+
i[me],
|
|
4603
4611
|
{
|
|
4604
4612
|
...N({
|
|
4605
|
-
venue_id:
|
|
4606
|
-
building_id:
|
|
4607
|
-
floor_id:
|
|
4608
|
-
ordinal:
|
|
4613
|
+
venue_id: ar,
|
|
4614
|
+
building_id: lr,
|
|
4615
|
+
floor_id: dr,
|
|
4616
|
+
ordinal: ur
|
|
4609
4617
|
}),
|
|
4610
|
-
icon:
|
|
4618
|
+
icon: ie
|
|
4611
4619
|
}
|
|
4612
4620
|
)
|
|
4613
4621
|
);
|
|
@@ -4616,13 +4624,13 @@ class ka {
|
|
|
4616
4624
|
s.push(
|
|
4617
4625
|
this._createLineFeature(
|
|
4618
4626
|
`solid-line-${s.length}`,
|
|
4619
|
-
i.slice(xe,
|
|
4627
|
+
i.slice(xe, me + 1),
|
|
4620
4628
|
N({
|
|
4621
4629
|
venue_id: L,
|
|
4622
4630
|
building_id: T,
|
|
4623
4631
|
floor_id: O,
|
|
4624
4632
|
ordinal: D,
|
|
4625
|
-
isShuttleBus:
|
|
4633
|
+
isShuttleBus: Ua(K) ? 1 : 0
|
|
4626
4634
|
})
|
|
4627
4635
|
)
|
|
4628
4636
|
);
|
|
@@ -4636,8 +4644,8 @@ class ka {
|
|
|
4636
4644
|
venue_id: _,
|
|
4637
4645
|
building_id: g,
|
|
4638
4646
|
floor_id: y,
|
|
4639
|
-
ordinal:
|
|
4640
|
-
} = p, B = i[0], C = i[i.length - 1], w = r[0],
|
|
4647
|
+
ordinal: v
|
|
4648
|
+
} = p, B = i[0], C = i[i.length - 1], w = r[0], b = r[r.length - 1], E = r.slice(1, r.length - 1);
|
|
4641
4649
|
return w && o.push(
|
|
4642
4650
|
this._createLineFeature(
|
|
4643
4651
|
`dashed-line-${o.length}`,
|
|
@@ -4649,15 +4657,15 @@ class ka {
|
|
|
4649
4657
|
ordinal: f
|
|
4650
4658
|
})
|
|
4651
4659
|
)
|
|
4652
|
-
),
|
|
4660
|
+
), b && o.push(
|
|
4653
4661
|
this._createLineFeature(
|
|
4654
4662
|
`dashed-line-${o.length}`,
|
|
4655
|
-
[C,
|
|
4663
|
+
[C, b],
|
|
4656
4664
|
N({
|
|
4657
4665
|
venue_id: _,
|
|
4658
4666
|
building_id: g,
|
|
4659
4667
|
floor_id: y,
|
|
4660
|
-
ordinal:
|
|
4668
|
+
ordinal: v
|
|
4661
4669
|
})
|
|
4662
4670
|
)
|
|
4663
4671
|
), l.length && E.length && l.forEach(
|
|
@@ -4691,7 +4699,7 @@ class ka {
|
|
|
4691
4699
|
ordinal: T,
|
|
4692
4700
|
markerType: `stops_${D}`
|
|
4693
4701
|
}),
|
|
4694
|
-
icon: this._routeStyle.markers.stops[D] ??
|
|
4702
|
+
icon: this._routeStyle.markers.stops[D] ?? Ae(this._routeStyle.markers.stops),
|
|
4695
4703
|
iconSize: this._routeStyle.markerIconSize
|
|
4696
4704
|
}
|
|
4697
4705
|
)
|
|
@@ -4716,13 +4724,13 @@ class ka {
|
|
|
4716
4724
|
), a.push(
|
|
4717
4725
|
this._createIconFeature(
|
|
4718
4726
|
`marker-${a.length}`,
|
|
4719
|
-
|
|
4727
|
+
b ?? C,
|
|
4720
4728
|
{
|
|
4721
4729
|
...N({
|
|
4722
4730
|
venue_id: _,
|
|
4723
4731
|
building_id: g,
|
|
4724
4732
|
floor_id: y,
|
|
4725
|
-
ordinal:
|
|
4733
|
+
ordinal: v,
|
|
4726
4734
|
markerType: "to"
|
|
4727
4735
|
}),
|
|
4728
4736
|
icon: this._routeStyle.markers.to,
|
|
@@ -4759,7 +4767,7 @@ class ka {
|
|
|
4759
4767
|
};
|
|
4760
4768
|
}
|
|
4761
4769
|
_renderSolidLines(e) {
|
|
4762
|
-
this._addCollectionSource(
|
|
4770
|
+
this._addCollectionSource(Te, e), this._addLineLayer(Te, le, {
|
|
4763
4771
|
"line-color": [
|
|
4764
4772
|
"case",
|
|
4765
4773
|
["==", ["get", "isShuttleBus"], "1"],
|
|
@@ -4778,17 +4786,17 @@ class ka {
|
|
|
4778
4786
|
});
|
|
4779
4787
|
}
|
|
4780
4788
|
_renderDashedLines(e) {
|
|
4781
|
-
this._addCollectionSource(
|
|
4789
|
+
this._addCollectionSource(ft, e), this._addLineLayer(ft, Q, {
|
|
4782
4790
|
"line-color": this._routeStyle.dashedLineColor,
|
|
4783
4791
|
"line-width": this._routeStyle.dashedLineWidth,
|
|
4784
4792
|
"line-dasharray": [0.1, 1.8]
|
|
4785
4793
|
});
|
|
4786
4794
|
}
|
|
4787
4795
|
_renderConnectors(e) {
|
|
4788
|
-
this._addCollectionSource(
|
|
4796
|
+
this._addCollectionSource(pt, e), this._addIconLayer(pt, nr);
|
|
4789
4797
|
}
|
|
4790
4798
|
_renderMarkers(e) {
|
|
4791
|
-
this._addCollectionSource(
|
|
4799
|
+
this._addCollectionSource(ke, e), this._addIconLayer(ke, gt, {
|
|
4792
4800
|
"icon-anchor": "bottom",
|
|
4793
4801
|
"icon-allow-overlap": !0,
|
|
4794
4802
|
"icon-ignore-placement": !0
|
|
@@ -4863,11 +4871,11 @@ class ka {
|
|
|
4863
4871
|
});
|
|
4864
4872
|
}
|
|
4865
4873
|
_updateStyleProperties(e) {
|
|
4866
|
-
if (this._styleDiffs =
|
|
4874
|
+
if (this._styleDiffs = sr(
|
|
4867
4875
|
this._routeStyle,
|
|
4868
|
-
e ??
|
|
4876
|
+
e ?? st
|
|
4869
4877
|
), !e)
|
|
4870
|
-
this._routeStyle =
|
|
4878
|
+
this._routeStyle = st;
|
|
4871
4879
|
else if (Object.keys(this._styleDiffs).length) {
|
|
4872
4880
|
const i = {
|
|
4873
4881
|
...this._routeStyle.lineSymbol,
|
|
@@ -4894,12 +4902,12 @@ class ka {
|
|
|
4894
4902
|
}
|
|
4895
4903
|
async _loadMarkerIcons() {
|
|
4896
4904
|
const { markers: e, lineSymbol: i } = this._styleDiffs;
|
|
4897
|
-
if (i?.image && await
|
|
4905
|
+
if (i?.image && await Ie(this._maplibreMap, i.image), e && Object.keys(e).length) {
|
|
4898
4906
|
const { from: r, to: s, stops: n } = e;
|
|
4899
|
-
if (r && await
|
|
4907
|
+
if (r && await Ie(this._maplibreMap, r), s && await Ie(this._maplibreMap, s), n && n.length) {
|
|
4900
4908
|
const o = n.filter((a) => !!a);
|
|
4901
4909
|
o.length && await Promise.all(
|
|
4902
|
-
o.map((a) =>
|
|
4910
|
+
o.map((a) => Ie(this._maplibreMap, a))
|
|
4903
4911
|
);
|
|
4904
4912
|
}
|
|
4905
4913
|
}
|
|
@@ -4932,40 +4940,40 @@ class ka {
|
|
|
4932
4940
|
"line-width",
|
|
4933
4941
|
n
|
|
4934
4942
|
), typeof a == "boolean" ? a ? this._maplibreMap.setPaintProperty(
|
|
4935
|
-
|
|
4943
|
+
Q,
|
|
4936
4944
|
"line-color",
|
|
4937
4945
|
"transparent"
|
|
4938
4946
|
) : (this._maplibreMap.setPaintProperty(
|
|
4939
|
-
|
|
4947
|
+
Q,
|
|
4940
4948
|
"line-color",
|
|
4941
4949
|
this._routeStyle.dashedLineColor
|
|
4942
4950
|
), this._maplibreMap.setPaintProperty(
|
|
4943
|
-
|
|
4951
|
+
Q,
|
|
4944
4952
|
"line-width",
|
|
4945
4953
|
this._routeStyle.dashedLineWidth
|
|
4946
4954
|
)) : this._routeStyle.disableDashedLine !== !0 && (r && this._maplibreMap.setPaintProperty(
|
|
4947
|
-
|
|
4955
|
+
Q,
|
|
4948
4956
|
"line-color",
|
|
4949
4957
|
r
|
|
4950
4958
|
), o !== void 0 && o + "" && this._maplibreMap.setPaintProperty(
|
|
4951
|
-
|
|
4959
|
+
Q,
|
|
4952
4960
|
"line-width",
|
|
4953
4961
|
o
|
|
4954
4962
|
)), l !== void 0 && l + "" && this._filterRouteOpacity(), u !== void 0 && u + "" && this._maplibreMap.setLayoutProperty(
|
|
4955
|
-
|
|
4963
|
+
gt,
|
|
4956
4964
|
"icon-size",
|
|
4957
4965
|
u
|
|
4958
4966
|
), c && Object.keys(c).length) {
|
|
4959
4967
|
const { from: f, to: p, stops: _ } = c, g = this._maplibreMap.getSource(
|
|
4960
|
-
|
|
4968
|
+
ke
|
|
4961
4969
|
), y = await g.getData();
|
|
4962
|
-
y.features = y.features.map((
|
|
4963
|
-
const { markerType: B } =
|
|
4964
|
-
if (f !== void 0 && B === "from" && (
|
|
4970
|
+
y.features = y.features.map((v) => {
|
|
4971
|
+
const { markerType: B } = v.properties;
|
|
4972
|
+
if (f !== void 0 && B === "from" && (v.properties.icon = f), p !== void 0 && B === "to" && (v.properties.icon = p), _ && B.includes("stops")) {
|
|
4965
4973
|
const C = parseInt(B.split("_")[1]);
|
|
4966
|
-
|
|
4974
|
+
v.properties.icon = _[C] ?? Ae(_);
|
|
4967
4975
|
}
|
|
4968
|
-
return
|
|
4976
|
+
return v;
|
|
4969
4977
|
}), g.setData(y);
|
|
4970
4978
|
}
|
|
4971
4979
|
if (h) {
|
|
@@ -5040,7 +5048,7 @@ class ka {
|
|
|
5040
5048
|
];
|
|
5041
5049
|
break;
|
|
5042
5050
|
}
|
|
5043
|
-
|
|
5051
|
+
ci.forEach((i) => {
|
|
5044
5052
|
this._maplibreMap.getLayer(i) && this._maplibreMap.setPaintProperty(
|
|
5045
5053
|
i,
|
|
5046
5054
|
i.includes("layer-line") ? "line-opacity" : "icon-opacity",
|
|
@@ -5057,16 +5065,16 @@ function N(t) {
|
|
|
5057
5065
|
])
|
|
5058
5066
|
);
|
|
5059
5067
|
}
|
|
5060
|
-
function
|
|
5068
|
+
function Ha(t) {
|
|
5061
5069
|
return t === 100 || t === -100;
|
|
5062
5070
|
}
|
|
5063
|
-
function
|
|
5071
|
+
function Na(t) {
|
|
5064
5072
|
return t === 5;
|
|
5065
5073
|
}
|
|
5066
|
-
function
|
|
5067
|
-
return
|
|
5074
|
+
function Ua(t) {
|
|
5075
|
+
return Wi(t, 104, 108);
|
|
5068
5076
|
}
|
|
5069
|
-
function
|
|
5077
|
+
function sr(t, e) {
|
|
5070
5078
|
const i = {};
|
|
5071
5079
|
for (const r in e) {
|
|
5072
5080
|
const s = t[r], n = e[r];
|
|
@@ -5075,20 +5083,20 @@ function nr(t, e) {
|
|
|
5075
5083
|
const o = n.slice(1, n.length - 1);
|
|
5076
5084
|
i[r] = {
|
|
5077
5085
|
from: n[0],
|
|
5078
|
-
to:
|
|
5086
|
+
to: Ae(n),
|
|
5079
5087
|
stops: o.length ? o : [n[0]]
|
|
5080
5088
|
};
|
|
5081
5089
|
} else {
|
|
5082
|
-
const o =
|
|
5090
|
+
const o = sr(s, n);
|
|
5083
5091
|
Object.keys(o).length && (i[r] = o);
|
|
5084
5092
|
}
|
|
5085
5093
|
else n + "" != s + "" && (i[r] = r === "stops" ? n ?? [null] : n);
|
|
5086
5094
|
}
|
|
5087
5095
|
return i;
|
|
5088
5096
|
}
|
|
5089
|
-
var
|
|
5090
|
-
const
|
|
5091
|
-
class
|
|
5097
|
+
var or = /* @__PURE__ */ ((t) => (t.FOOT = "foot", t.WHEELCHAIR = "wheelchair", t.ESCALATOR = "escalator", t.EMERGENCY = "emergency", t))(or || {});
|
|
5098
|
+
const ja = pe.getInstance();
|
|
5099
|
+
class Va {
|
|
5092
5100
|
constructor() {
|
|
5093
5101
|
}
|
|
5094
5102
|
/**
|
|
@@ -5096,14 +5104,14 @@ class Ua {
|
|
|
5096
5104
|
* @param options {IRouteSearchOptions}
|
|
5097
5105
|
*/
|
|
5098
5106
|
async search(e) {
|
|
5099
|
-
const { points: i, vehicle: r =
|
|
5107
|
+
const { points: i, vehicle: r = or.FOOT, locale: s = "en" } = e;
|
|
5100
5108
|
if (!(i && i.length > 1 && i.length < 6))
|
|
5101
5109
|
throw new Error(
|
|
5102
5110
|
"Parameter error. It must be 1 < {points.length} < 6"
|
|
5103
5111
|
);
|
|
5104
|
-
if (
|
|
5112
|
+
if (qa(i))
|
|
5105
5113
|
throw new Error("Parameter error. Points must have lat and lon.");
|
|
5106
|
-
return (await
|
|
5114
|
+
return (await ja.getHttpSession()).request(pr, {
|
|
5107
5115
|
method: "POST",
|
|
5108
5116
|
body: JSON.stringify({
|
|
5109
5117
|
points: i,
|
|
@@ -5113,64 +5121,91 @@ class Ua {
|
|
|
5113
5121
|
});
|
|
5114
5122
|
}
|
|
5115
5123
|
}
|
|
5116
|
-
function
|
|
5124
|
+
function qa(t) {
|
|
5117
5125
|
return t.some(
|
|
5118
5126
|
(e) => !e || typeof e.lat != "number" || typeof e.lon != "number"
|
|
5119
5127
|
);
|
|
5120
5128
|
}
|
|
5121
|
-
const
|
|
5122
|
-
|
|
5129
|
+
const hi = pe.getInstance();
|
|
5130
|
+
class za {
|
|
5131
|
+
constructor() {
|
|
5132
|
+
}
|
|
5133
|
+
/**
|
|
5134
|
+
* Search poi categories by venue id, building id, or floor id.
|
|
5135
|
+
* @param {TSearchCategoriesOptions} options
|
|
5136
|
+
*/
|
|
5137
|
+
async searchCategories(e) {
|
|
5138
|
+
const i = new URLSearchParams();
|
|
5139
|
+
if ("floorId" in e && m(e.floorId) ? i.set("floorId", e.floorId) : "buildingId" in e && m(e.buildingId) ? i.set("buildingId", e.buildingId) : "sharedFloorId" in e && m(e.sharedFloorId) ? i.set("sharedFloorId", e.sharedFloorId) : "venueId" in e && m(e.venueId) && i.set("venueId", e.venueId), "bounds" in e && ce(e.bounds) && (i.set("bbox", e.bounds.flat().join()), m(e.keywords) && i.set("keywords", e.keywords)), i.toString().length === 0)
|
|
5140
|
+
throw new Error(
|
|
5141
|
+
"At least one of 'floorId', 'buildingId', 'sharedFloorId', 'venueId', or 'bounds' must be provided."
|
|
5142
|
+
);
|
|
5143
|
+
const r = `${_i}?${i.toString()}`;
|
|
5144
|
+
return (await hi.getHttpSession()).request(r);
|
|
5145
|
+
}
|
|
5146
|
+
async searchCategoryTrees(e) {
|
|
5147
|
+
return (await hi.getHttpSession()).request(
|
|
5148
|
+
`${gr}?featureType=${e}`
|
|
5149
|
+
);
|
|
5150
|
+
}
|
|
5151
|
+
}
|
|
5152
|
+
var Ga = /* @__PURE__ */ ((t) => (t.Poi = "POI", t))(Ga || {});
|
|
5153
|
+
const Ja = {
|
|
5154
|
+
Map: Aa,
|
|
5123
5155
|
/** @deprecated */
|
|
5124
|
-
Indoor:
|
|
5125
|
-
Marker:
|
|
5156
|
+
Indoor: zi,
|
|
5157
|
+
Marker: ka,
|
|
5126
5158
|
/** @deprecated */
|
|
5127
|
-
Poi:
|
|
5128
|
-
RoutePainter:
|
|
5159
|
+
Poi: Gi,
|
|
5160
|
+
RoutePainter: Da,
|
|
5129
5161
|
/** @deprecated */
|
|
5130
|
-
BuildingFilterControl:
|
|
5131
|
-
BuildingSelectorHandler:
|
|
5162
|
+
BuildingFilterControl: Yi,
|
|
5163
|
+
BuildingSelectorHandler: Zi,
|
|
5132
5164
|
/** @deprecated */
|
|
5133
|
-
FloorsControl:
|
|
5134
|
-
FloorSelectorHandler:
|
|
5165
|
+
FloorsControl: Ki,
|
|
5166
|
+
FloorSelectorHandler: Ji,
|
|
5135
5167
|
/** @deprecated */
|
|
5136
|
-
SwitchBuildingHandler:
|
|
5168
|
+
SwitchBuildingHandler: er,
|
|
5137
5169
|
/** @deprecated */
|
|
5138
|
-
SwitchOutdoorHandler:
|
|
5139
|
-
IndoorClickSelection:
|
|
5140
|
-
OutdoorClickSelection:
|
|
5141
|
-
VenuesService:
|
|
5142
|
-
BuildingsService:
|
|
5143
|
-
PoisService:
|
|
5144
|
-
RouteService:
|
|
5170
|
+
SwitchOutdoorHandler: tr,
|
|
5171
|
+
IndoorClickSelection: ir,
|
|
5172
|
+
OutdoorClickSelection: rr,
|
|
5173
|
+
VenuesService: yi,
|
|
5174
|
+
BuildingsService: mi,
|
|
5175
|
+
PoisService: gi,
|
|
5176
|
+
RouteService: Va,
|
|
5177
|
+
CategoryService: za
|
|
5145
5178
|
};
|
|
5146
5179
|
export {
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
Br as
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5174
|
-
|
|
5175
|
-
|
|
5180
|
+
Yi as BuildingFilterControl,
|
|
5181
|
+
Zi as BuildingSelectorHandler,
|
|
5182
|
+
mi as BuildingsService,
|
|
5183
|
+
za as CategoryService,
|
|
5184
|
+
wr as DistanceSearchType,
|
|
5185
|
+
Ga as FeatureType,
|
|
5186
|
+
Ji as FloorSelectorHandler,
|
|
5187
|
+
bt as FloorSwitchScope,
|
|
5188
|
+
Ki as FloorsControl,
|
|
5189
|
+
zi as Indoor,
|
|
5190
|
+
ir as IndoorClickSelection,
|
|
5191
|
+
Aa as Map,
|
|
5192
|
+
ka as Marker,
|
|
5193
|
+
pi as OrientationDistanceSearchType,
|
|
5194
|
+
rr as OutdoorClickSelection,
|
|
5195
|
+
Gi as Poi,
|
|
5196
|
+
Br as PoisOrderBy,
|
|
5197
|
+
gi as PoisService,
|
|
5198
|
+
Pr as PoisSortBy,
|
|
5199
|
+
hr as PresetLanguage,
|
|
5200
|
+
Da as RoutePainter,
|
|
5201
|
+
Va as RouteService,
|
|
5202
|
+
er as SwitchBuildingHandler,
|
|
5203
|
+
tr as SwitchOutdoorHandler,
|
|
5204
|
+
Qi as ThemeType,
|
|
5205
|
+
or as VehicleType,
|
|
5206
|
+
yi as VenuesService,
|
|
5207
|
+
Ja as default,
|
|
5208
|
+
Er as omittedBuildingProps,
|
|
5209
|
+
At as omittedPoiProps,
|
|
5210
|
+
Fr as omittedVenueKeys
|
|
5176
5211
|
};
|