@eyeon/map 2.0.36 → 2.0.41
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/assets/MapViewer.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/basemap/GoogleBasemap.d.ts +18 -0
- package/dist/basemap/GoogleBasemap.d.ts.map +1 -0
- package/dist/basemap/SurroundingsPanel.d.ts +14 -0
- package/dist/basemap/SurroundingsPanel.d.ts.map +1 -0
- package/dist/basemap/googleMaps.d.ts +98 -0
- package/dist/basemap/googleMaps.d.ts.map +1 -0
- package/dist/chunks/MapViewer.js +3163 -2536
- package/dist/chunks/MapViewer.js.map +1 -1
- package/dist/chunks/responsive.js +1400 -1266
- package/dist/chunks/responsive.js.map +1 -1
- package/dist/chunks/wheelZoom.js +28 -28
- package/dist/core/georeference.d.ts +19 -0
- package/dist/core/georeference.d.ts.map +1 -0
- package/dist/core/hostChrome.d.ts +7 -4
- package/dist/core/hostChrome.d.ts.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +189 -178
- package/dist/core/publish/index.d.ts +2 -0
- package/dist/core/publish/index.d.ts.map +1 -1
- package/dist/core/types.d.ts +20 -4
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/websiteModal.d.ts +47 -1
- package/dist/core/websiteModal.d.ts.map +1 -1
- package/dist/editor/MapEditor.d.ts +7 -1
- package/dist/editor/MapEditor.d.ts.map +1 -1
- package/dist/editor/draftOps.d.ts +2 -1
- package/dist/editor/draftOps.d.ts.map +1 -1
- package/dist/editor/index.css +695 -152
- package/dist/editor/index.js +5083 -4675
- package/dist/editor/index.js.map +1 -1
- package/dist/editor/panels/LeftRail.d.ts +5 -2
- package/dist/editor/panels/LeftRail.d.ts.map +1 -1
- package/dist/editor/panels/PreviewOverlay.d.ts +8 -2
- package/dist/editor/panels/PreviewOverlay.d.ts.map +1 -1
- package/dist/editor/previewDocument.d.ts.map +1 -1
- package/dist/viewer/MapViewer.d.ts +13 -0
- package/dist/viewer/MapViewer.d.ts.map +1 -1
- package/dist/viewer/camera.d.ts +21 -0
- package/dist/viewer/camera.d.ts.map +1 -1
- package/dist/viewer/components/CameraRig.d.ts +8 -1
- package/dist/viewer/components/CameraRig.d.ts.map +1 -1
- package/dist/viewer/components/MapScene.d.ts +6 -1
- package/dist/viewer/components/MapScene.d.ts.map +1 -1
- package/dist/viewer/index.css +541 -151
- package/dist/viewer/index.js +1 -1
- package/dist/viewer/ui/MapControls.d.ts.map +1 -1
- package/dist/viewer/ui/WebsiteSidebar.d.ts +35 -0
- package/dist/viewer/ui/WebsiteSidebar.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/viewer/ui/WebsiteInfoModal.d.ts +0 -11
- package/dist/viewer/ui/WebsiteInfoModal.d.ts.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
const
|
|
1
|
+
import Nn from "ngraph.graph";
|
|
2
|
+
import Ln from "ngraph.path";
|
|
3
|
+
const Lt = "transparent", Ft = "#94a3b8", vn = 0.28, Dt = 32, Mn = 48, mt = 56;
|
|
4
4
|
function W(t) {
|
|
5
5
|
const n = (t ?? "").trim().toLowerCase();
|
|
6
|
-
return n ===
|
|
6
|
+
return n === Lt || n === "none";
|
|
7
7
|
}
|
|
8
8
|
function Kt(t) {
|
|
9
9
|
const n = t.replace("#", "").trim();
|
|
@@ -23,30 +23,30 @@ function Yt(t, n, e) {
|
|
|
23
23
|
const r = (o) => Math.max(0, Math.min(255, Math.round(o))).toString(16).padStart(2, "0");
|
|
24
24
|
return `#${r(t)}${r(n)}${r(e)}`;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function io(t, n = Ft) {
|
|
27
27
|
const e = W(t) ? n : t, r = Kt(e) ?? Kt(n);
|
|
28
|
-
return r ?
|
|
28
|
+
return r ? Tn(r) : Ft;
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function Tn([t, n, e]) {
|
|
31
31
|
const r = Math.max(t, n, e);
|
|
32
|
-
if (r <
|
|
33
|
-
return Yt(t +
|
|
34
|
-
let o = 1 -
|
|
32
|
+
if (r < Mn)
|
|
33
|
+
return Yt(t + mt, n + mt, e + mt);
|
|
34
|
+
let o = 1 - vn, i = t * o, c = n * o, a = e * o;
|
|
35
35
|
return r - Math.max(i, c, a) < Dt && (o = (r - Dt) / r, i = t * o, c = n * o, a = e * o), Yt(i, c, a);
|
|
36
36
|
}
|
|
37
|
-
const cn = "#E9F7FC",
|
|
37
|
+
const cn = "#E9F7FC", wn = [
|
|
38
38
|
"green-area",
|
|
39
39
|
"water-area",
|
|
40
40
|
"parking-lane",
|
|
41
41
|
"parking-icon",
|
|
42
42
|
"walking-path"
|
|
43
|
-
],
|
|
43
|
+
], Pn = {
|
|
44
44
|
"green-area": "GREEN_AREA_COLOR",
|
|
45
45
|
"water-area": "WATER_COLOR",
|
|
46
46
|
"parking-lane": "PARKING_LANE_COLOR",
|
|
47
47
|
"parking-icon": "PARKING_ICON_COLOR",
|
|
48
48
|
"walking-path": "WALKABLE_COLOR"
|
|
49
|
-
},
|
|
49
|
+
}, Fn = 2, an = {
|
|
50
50
|
"green-area": {
|
|
51
51
|
fill: "#C4DDAB",
|
|
52
52
|
// Same band as other artwork. Parking lanes are pulled under green areas
|
|
@@ -75,39 +75,39 @@ const cn = "#E9F7FC", Tn = [
|
|
|
75
75
|
extrudeHeight: 1
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
function
|
|
78
|
+
function U(t) {
|
|
79
79
|
const n = an[t];
|
|
80
80
|
return n.fill ?? n.stroke ?? "";
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Dn() {
|
|
83
83
|
return {
|
|
84
|
-
GREEN_AREA_COLOR:
|
|
85
|
-
WATER_COLOR:
|
|
86
|
-
PARKING_LANE_COLOR:
|
|
87
|
-
PARKING_ICON_COLOR:
|
|
88
|
-
WALKABLE_COLOR:
|
|
84
|
+
GREEN_AREA_COLOR: U("green-area"),
|
|
85
|
+
WATER_COLOR: U("water-area"),
|
|
86
|
+
PARKING_LANE_COLOR: U("parking-lane"),
|
|
87
|
+
PARKING_ICON_COLOR: U("parking-icon"),
|
|
88
|
+
WALKABLE_COLOR: U("walking-path")
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
|
-
const
|
|
91
|
+
const pt = {
|
|
92
92
|
amenity: "#444444",
|
|
93
93
|
kiosk: "#444444",
|
|
94
94
|
connector: "#0763b1"
|
|
95
|
-
},
|
|
95
|
+
}, so = {
|
|
96
96
|
amenity: "AMENITY_ICON_COLOR",
|
|
97
97
|
kiosk: "KIOSK_ICON_COLOR",
|
|
98
98
|
connector: "CONNECTOR_ICON_COLOR"
|
|
99
99
|
};
|
|
100
|
-
function
|
|
100
|
+
function Kn() {
|
|
101
101
|
return {
|
|
102
|
-
AMENITY_ICON_COLOR:
|
|
103
|
-
KIOSK_ICON_COLOR:
|
|
104
|
-
CONNECTOR_ICON_COLOR:
|
|
102
|
+
AMENITY_ICON_COLOR: pt.amenity,
|
|
103
|
+
KIOSK_ICON_COLOR: pt.kiosk,
|
|
104
|
+
CONNECTOR_ICON_COLOR: pt.connector
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
function ln(t) {
|
|
108
108
|
return t.toLowerCase().replace(/[-_]+/g, " ").replace(/\s+/g, " ").trim();
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function Yn(t, n) {
|
|
111
111
|
const e = ln(n);
|
|
112
112
|
return !!(t === e || t.startsWith(`${e} `) || t === `${e}s` || t.startsWith(`${e}s `));
|
|
113
113
|
}
|
|
@@ -115,24 +115,24 @@ function ut(t) {
|
|
|
115
115
|
if (!t) return null;
|
|
116
116
|
const n = ln(t);
|
|
117
117
|
if (!n) return null;
|
|
118
|
-
const e = [...
|
|
118
|
+
const e = [...wn].sort((r, o) => o.length - r.length);
|
|
119
119
|
for (const r of e)
|
|
120
|
-
if (
|
|
120
|
+
if (Yn(n, r)) return r;
|
|
121
121
|
return null;
|
|
122
122
|
}
|
|
123
|
-
function
|
|
124
|
-
const r =
|
|
123
|
+
function $n(t, n, e) {
|
|
124
|
+
const r = Pn[n];
|
|
125
125
|
if (!r) return t;
|
|
126
126
|
const o = e == null ? void 0 : e[r];
|
|
127
127
|
return typeof o != "string" ? t : W(o) ? t.fill ? { ...t, fill: "transparent" } : t.stroke ? { ...t, stroke: "transparent" } : t : o.trim() ? t.fill ? { ...t, fill: o } : t.stroke ? { ...t, stroke: o } : t : t;
|
|
128
128
|
}
|
|
129
129
|
function ft(t, n) {
|
|
130
130
|
const e = ut(t);
|
|
131
|
-
return e ?
|
|
131
|
+
return e ? $n(an[e], e, n) : null;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function co(t) {
|
|
134
134
|
var n;
|
|
135
|
-
return ((n = ft(t)) == null ? void 0 : n.renderOrder) ??
|
|
135
|
+
return ((n = ft(t)) == null ? void 0 : n.renderOrder) ?? Fn;
|
|
136
136
|
}
|
|
137
137
|
function it(t) {
|
|
138
138
|
return ut(t) === "parking-lane";
|
|
@@ -140,30 +140,30 @@ function it(t) {
|
|
|
140
140
|
function st(t) {
|
|
141
141
|
return ut(t) === "parking-icon";
|
|
142
142
|
}
|
|
143
|
-
function
|
|
143
|
+
function Rt(t) {
|
|
144
144
|
return ut(t) === "green-area";
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function ao(t, n) {
|
|
147
147
|
const e = st(t.layerName), r = st(n.layerName);
|
|
148
148
|
if (e !== r) return e ? 1 : -1;
|
|
149
|
-
const o = it(t.layerName), i = it(n.layerName), c =
|
|
149
|
+
const o = it(t.layerName), i = it(n.layerName), c = Rt(t.layerName), a = Rt(n.layerName);
|
|
150
150
|
return o && a ? -1 : c && i ? 1 : t.index - n.index;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function lo(t, n) {
|
|
153
153
|
const e = t.map((s, h) => ({
|
|
154
154
|
item: s,
|
|
155
155
|
index: h,
|
|
156
156
|
layerName: n(s)
|
|
157
157
|
})), r = e.filter((s) => st(s.layerName)), o = e.filter((s) => it(s.layerName)), i = e.filter(
|
|
158
158
|
(s) => !st(s.layerName) && !it(s.layerName)
|
|
159
|
-
), c = i.findIndex((s) =>
|
|
159
|
+
), c = i.findIndex((s) => Rt(s.layerName));
|
|
160
160
|
return [...c >= 0 ? [
|
|
161
161
|
...i.slice(0, c),
|
|
162
162
|
...o,
|
|
163
163
|
...i.slice(c)
|
|
164
164
|
] : [...i, ...o].sort((s, h) => s.index - h.index), ...r].map((s) => s.item);
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function Bn(t, n) {
|
|
167
167
|
const e = (n == null ? void 0 : n.omitStaticLayers) === !0, r = /* @__PURE__ */ new Set();
|
|
168
168
|
for (const o of t) {
|
|
169
169
|
const i = o.sourceSvgId;
|
|
@@ -171,18 +171,22 @@ function Yn(t, n) {
|
|
|
171
171
|
}
|
|
172
172
|
return r;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
return
|
|
174
|
+
function uo(t) {
|
|
175
|
+
return Bn(
|
|
176
176
|
t.flatMap((n) => [...n.shapes]),
|
|
177
177
|
{ omitStaticLayers: !0 }
|
|
178
178
|
);
|
|
179
179
|
}
|
|
180
|
-
const
|
|
181
|
-
function
|
|
180
|
+
const fo = ["escalator", "elevator"];
|
|
181
|
+
function Gn(t) {
|
|
182
182
|
return t === "escalator" || t === "elevator";
|
|
183
183
|
}
|
|
184
|
-
|
|
184
|
+
function zn(t) {
|
|
185
|
+
return t === "google" ? "google" : "transparent";
|
|
186
|
+
}
|
|
187
|
+
const V = {
|
|
185
188
|
MAP_STYLE: "2D",
|
|
189
|
+
SURROUNDINGS: "transparent",
|
|
186
190
|
MAP_BACKGROUND_COLOR: "#FFFFFF",
|
|
187
191
|
ACCENT_COLOR: "#2563eb",
|
|
188
192
|
ROUTE_COLOR: "#4ea5ff",
|
|
@@ -199,26 +203,26 @@ const U = {
|
|
|
199
203
|
OVERLAY_COLOR: "#000000",
|
|
200
204
|
OVERLAY_OPACITY: 0.15,
|
|
201
205
|
PARKING_ZONE_COLOR: "#cbd5e1",
|
|
202
|
-
...
|
|
203
|
-
...
|
|
206
|
+
...Dn(),
|
|
207
|
+
...Kn(),
|
|
204
208
|
KIOSK_SIZE: 12,
|
|
205
209
|
ZOOM_STEP: 0.5,
|
|
206
210
|
CAMERA_MAX_DISTANCE: 2e3,
|
|
207
211
|
CAMERA_MIN_DISTANCE: 50
|
|
208
|
-
},
|
|
212
|
+
}, Xn = "#f5f5f5", Hn = /* @__PURE__ */ new Set(["#f8fafc", "#f1efea"]), Un = "#86efac", Vn = "#7dd3fc", Wn = "#e2e8f0", Zn = 500, jn = 100;
|
|
209
213
|
function un(t) {
|
|
210
214
|
const n = typeof t == "number" ? t : Number(t);
|
|
211
|
-
return !Number.isFinite(n) || n <= 0 ? 0 : Math.min(n,
|
|
215
|
+
return !Number.isFinite(n) || n <= 0 ? 0 : Math.min(n, Zn);
|
|
212
216
|
}
|
|
213
|
-
function
|
|
217
|
+
function qn(t) {
|
|
214
218
|
const n = typeof t == "number" ? t : Number(t);
|
|
215
|
-
return !Number.isFinite(n) || n <= 0 ?
|
|
219
|
+
return !Number.isFinite(n) || n <= 0 ? V.ROUTE_THICKNESS : Math.min(n, jn);
|
|
216
220
|
}
|
|
217
|
-
function
|
|
218
|
-
const n = Object.assign({},
|
|
219
|
-
return n.MAP_BACKGROUND_COLOR.toLowerCase() ===
|
|
221
|
+
function Qn(...t) {
|
|
222
|
+
const n = Object.assign({}, V, ...t.filter(Boolean));
|
|
223
|
+
return n.SURROUNDINGS = zn(n.SURROUNDINGS), n.MAP_BACKGROUND_COLOR.toLowerCase() === Xn && (n.MAP_BACKGROUND_COLOR = V.MAP_BACKGROUND_COLOR), Hn.has(n.WALKABLE_COLOR.toLowerCase()) && (n.WALKABLE_COLOR = cn), n.GREEN_AREA_COLOR.toLowerCase() === Un && (n.GREEN_AREA_COLOR = V.GREEN_AREA_COLOR), n.WATER_COLOR.toLowerCase() === Vn && (n.WATER_COLOR = V.WATER_COLOR), n.STORE_DEFAULT_COLOR.toLowerCase() === Wn && (n.STORE_DEFAULT_COLOR = V.STORE_DEFAULT_COLOR), n.STORE_RADIUS = un(n.STORE_RADIUS), n.ROUTE_THICKNESS = qn(n.ROUTE_THICKNESS), n;
|
|
220
224
|
}
|
|
221
|
-
const
|
|
225
|
+
const Jn = [
|
|
222
226
|
"unit",
|
|
223
227
|
"amenity",
|
|
224
228
|
"kiosk_screen",
|
|
@@ -226,46 +230,82 @@ const jn = [
|
|
|
226
230
|
"entrance",
|
|
227
231
|
"parking_zone",
|
|
228
232
|
"custom"
|
|
229
|
-
],
|
|
230
|
-
|
|
233
|
+
], Ct = 1e4, ho = 2.5, te = {
|
|
234
|
+
lat: 39.8283,
|
|
235
|
+
lng: -98.5795,
|
|
236
|
+
zoom: 4,
|
|
237
|
+
heading: 0
|
|
238
|
+
};
|
|
239
|
+
function ne(t) {
|
|
240
|
+
if (!t || typeof t != "object") return null;
|
|
241
|
+
const n = t, e = Number(n.lat), r = Number(n.lng), o = Number(n.zoom), i = Number(n.heading);
|
|
242
|
+
if (![e, r, o, i].every((u) => Number.isFinite(u)) || e < -90 || e > 90 || r < -180 || r > 180 || o < 1 || o > 21) return null;
|
|
243
|
+
const c = (i % 360 + 360) % 360, a = Number(n.anchorZoom), s = Number(n.anchorX), h = Number(n.anchorY), y = Number.isFinite(a) && a > 0 ? {
|
|
244
|
+
anchorZoom: Math.round(a * 1e3) / 1e3,
|
|
245
|
+
anchorX: Number.isFinite(s) ? s : 0,
|
|
246
|
+
anchorY: Number.isFinite(h) ? h : 0
|
|
247
|
+
} : {};
|
|
248
|
+
return {
|
|
249
|
+
lat: e,
|
|
250
|
+
lng: r,
|
|
251
|
+
zoom: Math.round(o * 100) / 100,
|
|
252
|
+
heading: Math.round(c * 10) / 10,
|
|
253
|
+
...y
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
function fn(t, n) {
|
|
257
|
+
return Math.abs(t.lat - n.lat) < 2e-5 && Math.abs(t.lng - n.lng) < 2e-5 && Math.abs(t.zoom - n.zoom) < 1e-3 && Math.abs(t.heading - n.heading) < 0.05;
|
|
258
|
+
}
|
|
259
|
+
function ee(t, n) {
|
|
260
|
+
const e = t.anchorZoom != null && t.anchorZoom > 0, r = n.anchorZoom != null && n.anchorZoom > 0;
|
|
261
|
+
return e !== r ? !1 : !e || !r || t.anchorZoom == null || n.anchorZoom == null ? !0 : Math.abs(t.anchorZoom - n.anchorZoom) < 1e-3 && Math.abs((t.anchorX ?? 0) - (n.anchorX ?? 0)) < 0.05 && Math.abs((t.anchorY ?? 0) - (n.anchorY ?? 0)) < 0.05;
|
|
262
|
+
}
|
|
263
|
+
function yo(t, n) {
|
|
264
|
+
return fn(t, n) && ee(t, n);
|
|
265
|
+
}
|
|
266
|
+
function mo(t) {
|
|
267
|
+
return fn(t, te);
|
|
268
|
+
}
|
|
269
|
+
const ct = "entrance", po = 24, re = 8;
|
|
270
|
+
function oe(t) {
|
|
231
271
|
var o;
|
|
232
272
|
if (!t) return !1;
|
|
233
273
|
const n = t.trim();
|
|
234
274
|
return n ? n === ct ? !0 : ((o = (n.split(/[?#]/, 1)[0] ?? n).split("/").filter(Boolean).pop()) == null ? void 0 : o.toLowerCase()) === ct : !1;
|
|
235
275
|
}
|
|
236
|
-
function
|
|
276
|
+
function ie(t) {
|
|
237
277
|
var n;
|
|
238
|
-
return t.kind !== "entrance" ? !1 :
|
|
278
|
+
return t.kind !== "entrance" ? !1 : oe((n = t.label) == null ? void 0 : n.imageKey) ? !0 : t.origin === "manual" && !t.sourceSvgId;
|
|
239
279
|
}
|
|
240
|
-
function
|
|
280
|
+
function dn(t) {
|
|
241
281
|
var n;
|
|
242
|
-
return !
|
|
282
|
+
return !ie(t) || ((n = t.label) == null ? void 0 : n.imageKey) === ct ? t.label : {
|
|
243
283
|
...t.label ?? {},
|
|
244
284
|
imageKey: ct
|
|
245
285
|
};
|
|
246
286
|
}
|
|
247
|
-
function
|
|
287
|
+
function xo(t, n, e) {
|
|
248
288
|
const r = n != null ? { ...t, ...n } : { ...t ?? {} };
|
|
249
|
-
return
|
|
289
|
+
return dn({
|
|
250
290
|
...e,
|
|
251
291
|
kind: e.kind ?? "unit",
|
|
252
292
|
label: r
|
|
253
293
|
}) ?? r;
|
|
254
294
|
}
|
|
255
|
-
function
|
|
256
|
-
return Math.max(
|
|
295
|
+
function bo(t) {
|
|
296
|
+
return Math.max(re, t);
|
|
257
297
|
}
|
|
258
|
-
const
|
|
259
|
-
function
|
|
260
|
-
return t === "left" || t === "right" ? t :
|
|
298
|
+
const Io = ["left", "center", "right"], se = "center";
|
|
299
|
+
function go(t) {
|
|
300
|
+
return t === "left" || t === "right" ? t : se;
|
|
261
301
|
}
|
|
262
|
-
function
|
|
302
|
+
function _o(t, n) {
|
|
263
303
|
return n === "left" ? t.minX : n === "right" ? t.maxX : (t.minX + t.maxX) / 2;
|
|
264
304
|
}
|
|
265
|
-
function
|
|
305
|
+
function ko(t) {
|
|
266
306
|
return t === "left" ? "start" : t === "right" ? "end" : "middle";
|
|
267
307
|
}
|
|
268
|
-
const dt = 12,
|
|
308
|
+
const dt = 12, ce = dt, ae = 4, le = [
|
|
269
309
|
"retail_name",
|
|
270
310
|
"retail_logo",
|
|
271
311
|
"retail_text",
|
|
@@ -274,21 +314,21 @@ const dt = 12, ne = dt, ee = 4, re = [
|
|
|
274
314
|
"connector",
|
|
275
315
|
"custom_text",
|
|
276
316
|
"custom_image"
|
|
277
|
-
],
|
|
317
|
+
], ue = new Set(le);
|
|
278
318
|
function Z(t, n) {
|
|
279
319
|
const e = typeof t == "number" ? t : Number(t);
|
|
280
320
|
return Number.isFinite(e) ? e : n;
|
|
281
321
|
}
|
|
282
|
-
const
|
|
283
|
-
function
|
|
322
|
+
const fe = /^(?:|[+\-]|[+\-]?\.(?:0*)?)$/;
|
|
323
|
+
function de(t) {
|
|
284
324
|
const n = t.trim();
|
|
285
|
-
if (
|
|
325
|
+
if (fe.test(n))
|
|
286
326
|
return { render: 0, complete: !1 };
|
|
287
327
|
const e = Number(n);
|
|
288
328
|
return Number.isFinite(e) ? { render: e, complete: !0 } : { render: 0, complete: !1 };
|
|
289
329
|
}
|
|
290
|
-
function
|
|
291
|
-
const n =
|
|
330
|
+
function Oo(t) {
|
|
331
|
+
const n = de(t);
|
|
292
332
|
return n.complete ? { display: String(n.render), render: n.render } : { display: "0", render: 0 };
|
|
293
333
|
}
|
|
294
334
|
function D(t) {
|
|
@@ -296,23 +336,23 @@ function D(t) {
|
|
|
296
336
|
const n = String(t).trim();
|
|
297
337
|
return n || null;
|
|
298
338
|
}
|
|
299
|
-
function
|
|
339
|
+
function he(t) {
|
|
300
340
|
if (t == null) return null;
|
|
301
341
|
const n = String(t);
|
|
302
342
|
return n === "" ? null : n;
|
|
303
343
|
}
|
|
304
|
-
function
|
|
344
|
+
function xt(t) {
|
|
305
345
|
if (t == null || t === "") return null;
|
|
306
346
|
const n = Number(t);
|
|
307
347
|
return Number.isFinite(n) ? n : null;
|
|
308
348
|
}
|
|
309
|
-
function
|
|
310
|
-
return typeof t == "string" &&
|
|
349
|
+
function ye(t) {
|
|
350
|
+
return typeof t == "string" && ue.has(t);
|
|
311
351
|
}
|
|
312
352
|
function vt(t) {
|
|
313
353
|
return t === "amenity" ? "amenity" : t === "kiosk_screen" ? "kiosk" : t === "connector" ? "connector" : t === "custom" ? "custom_text" : "retail_name";
|
|
314
354
|
}
|
|
315
|
-
function
|
|
355
|
+
function me(t) {
|
|
316
356
|
const n = t == null ? void 0 : t.trim();
|
|
317
357
|
if (!n) return !1;
|
|
318
358
|
try {
|
|
@@ -322,10 +362,10 @@ function le(t) {
|
|
|
322
362
|
return !1;
|
|
323
363
|
}
|
|
324
364
|
}
|
|
325
|
-
function
|
|
365
|
+
function So(t) {
|
|
326
366
|
return t === "amenity" ? "amenity" : t === "kiosk_screen" ? "kiosk" : t === "unit" || t === "parking_zone" ? "retailer" : "none";
|
|
327
367
|
}
|
|
328
|
-
function
|
|
368
|
+
function Ao(t, n) {
|
|
329
369
|
return {
|
|
330
370
|
shapeId: t,
|
|
331
371
|
targetType: "none",
|
|
@@ -345,7 +385,7 @@ function xo(t, n) {
|
|
|
345
385
|
textColor: null
|
|
346
386
|
};
|
|
347
387
|
}
|
|
348
|
-
function
|
|
388
|
+
function Ro(t, n = "unit") {
|
|
349
389
|
const e = t.layerType ?? t.layer_type, r = t.unitStatus ?? t.unit_status ?? "vacant";
|
|
350
390
|
return {
|
|
351
391
|
shapeId: Z(
|
|
@@ -353,26 +393,26 @@ function mo(t, n = "unit") {
|
|
|
353
393
|
0
|
|
354
394
|
),
|
|
355
395
|
targetType: t.targetType ?? t.target_type ?? "none",
|
|
356
|
-
retailerId:
|
|
396
|
+
retailerId: xt(
|
|
357
397
|
t.retailerId ?? t.retailer_id
|
|
358
398
|
),
|
|
359
|
-
amenityId:
|
|
399
|
+
amenityId: xt(
|
|
360
400
|
t.amenityId ?? t.amenity_id
|
|
361
401
|
),
|
|
362
|
-
kioskId:
|
|
402
|
+
kioskId: xt(
|
|
363
403
|
t.kioskId ?? t.kiosk_id
|
|
364
404
|
),
|
|
365
405
|
unitStatus: r || "vacant",
|
|
366
406
|
unitNumber: D(
|
|
367
407
|
t.unitNumber ?? t.unit_number
|
|
368
408
|
),
|
|
369
|
-
customLabel:
|
|
409
|
+
customLabel: he(
|
|
370
410
|
t.customLabel ?? t.custom_label
|
|
371
411
|
),
|
|
372
412
|
customImageKey: D(
|
|
373
413
|
t.customImageKey ?? t.custom_image_key
|
|
374
414
|
),
|
|
375
|
-
layerType:
|
|
415
|
+
layerType: ye(e) ? e : vt(n),
|
|
376
416
|
size: Z(t.size, dt),
|
|
377
417
|
rotate: Z(t.rotate, 0),
|
|
378
418
|
offsetX: Z(
|
|
@@ -389,13 +429,13 @@ function mo(t, n = "unit") {
|
|
|
389
429
|
textColor: D(
|
|
390
430
|
t.textColor ?? t.text_color
|
|
391
431
|
),
|
|
392
|
-
align:
|
|
432
|
+
align: pe(t.align)
|
|
393
433
|
};
|
|
394
434
|
}
|
|
395
|
-
function
|
|
435
|
+
function pe(t) {
|
|
396
436
|
if (t === "left" || t === "right" || t === "center") return t;
|
|
397
437
|
}
|
|
398
|
-
function
|
|
438
|
+
function Co(t, n) {
|
|
399
439
|
const e = (t.location ?? "").trim();
|
|
400
440
|
return n && e && e !== "-" ? `${t.name} (${e})` : t.name;
|
|
401
441
|
}
|
|
@@ -404,102 +444,102 @@ function $t(t, n) {
|
|
|
404
444
|
const e = (r = t == null ? void 0 : t.bgColor) == null ? void 0 : r.trim();
|
|
405
445
|
return W(e) ? "transparent" : e || n;
|
|
406
446
|
}
|
|
407
|
-
function
|
|
447
|
+
function Mt(t) {
|
|
408
448
|
return t === "amenity" || t === "kiosk_screen" || t === "connector";
|
|
409
449
|
}
|
|
410
|
-
function
|
|
411
|
-
return
|
|
450
|
+
function Eo(t, n) {
|
|
451
|
+
return Mt(t) ? Lt : n;
|
|
412
452
|
}
|
|
413
|
-
function
|
|
453
|
+
function No(t, n) {
|
|
414
454
|
var r;
|
|
415
455
|
const e = (r = t == null ? void 0 : t.textColor) == null ? void 0 : r.trim();
|
|
416
456
|
return W(e) ? "transparent" : e || n;
|
|
417
457
|
}
|
|
418
|
-
function
|
|
458
|
+
function xe(t, n, e) {
|
|
419
459
|
const r = (t == null ? void 0 : t.layerType) ?? (e ? vt(e) : void 0);
|
|
420
460
|
return r === "kiosk" ? n.KIOSK_ICON_COLOR : r === "amenity" ? n.AMENITY_ICON_COLOR : r === "connector" ? n.CONNECTOR_ICON_COLOR : n.STORE_TEXT_COLOR;
|
|
421
461
|
}
|
|
422
|
-
function
|
|
462
|
+
function Lo(t, n, e, r) {
|
|
423
463
|
var i;
|
|
424
464
|
const o = (i = e ?? (t == null ? void 0 : t.textColor)) == null ? void 0 : i.trim();
|
|
425
|
-
return W(o) ? "transparent" : o ||
|
|
465
|
+
return W(o) ? "transparent" : o || xe(t, n, r);
|
|
426
466
|
}
|
|
427
|
-
function
|
|
467
|
+
function vo(t) {
|
|
428
468
|
const n = t.trim();
|
|
429
469
|
if (!n || !/^\d+$/.test(n)) return null;
|
|
430
470
|
const e = Number(n);
|
|
431
471
|
return Number.isSafeInteger(e) && e > 0 ? e : null;
|
|
432
472
|
}
|
|
433
|
-
function
|
|
473
|
+
function Mo(t, n) {
|
|
434
474
|
var o;
|
|
435
475
|
const e = n == null ? void 0 : n.trim();
|
|
436
476
|
if (e) return e;
|
|
437
477
|
const r = (o = t == null ? void 0 : t.customLabel) == null ? void 0 : o.trim();
|
|
438
478
|
return r || ((t == null ? void 0 : t.amenityId) != null ? `Amenity ${t.amenityId}` : null);
|
|
439
479
|
}
|
|
440
|
-
function
|
|
480
|
+
function To(t, n) {
|
|
441
481
|
var o;
|
|
442
482
|
const e = (o = t == null ? void 0 : t.customLabel) == null ? void 0 : o.trim();
|
|
443
483
|
if (e) return e;
|
|
444
484
|
const r = n == null ? void 0 : n.trim();
|
|
445
485
|
return r || ((t == null ? void 0 : t.kioskId) != null ? `Kiosk ${t.kioskId}` : null);
|
|
446
486
|
}
|
|
447
|
-
function
|
|
487
|
+
function M(t) {
|
|
448
488
|
var n, e, r;
|
|
449
|
-
return t ? t.targetType === "retailer" ? t.retailerId != null : t.targetType === "amenity" ? t.amenityId != null || !!((n = t.customLabel) != null && n.trim()) : t.targetType === "kiosk" ? t.kioskId != null || !!((e = t.customLabel) != null && e.trim()) : t.targetType === "none" && t.layerType === "custom_text" ? !!((r = t.customLabel) != null && r.trim()) : t.targetType === "none" && t.layerType === "custom_image" ?
|
|
489
|
+
return t ? t.targetType === "retailer" ? t.retailerId != null : t.targetType === "amenity" ? t.amenityId != null || !!((n = t.customLabel) != null && n.trim()) : t.targetType === "kiosk" ? t.kioskId != null || !!((e = t.customLabel) != null && e.trim()) : t.targetType === "none" && t.layerType === "custom_text" ? !!((r = t.customLabel) != null && r.trim()) : t.targetType === "none" && t.layerType === "custom_image" ? me(t.customImageKey) : !1 : !1;
|
|
450
490
|
}
|
|
451
|
-
const
|
|
491
|
+
const be = /* @__PURE__ */ new Set([
|
|
452
492
|
"unit",
|
|
453
493
|
"parking_zone",
|
|
454
494
|
"amenity",
|
|
455
495
|
"kiosk_screen",
|
|
456
496
|
"custom"
|
|
457
497
|
]);
|
|
458
|
-
function
|
|
498
|
+
function hn(t, n, e) {
|
|
459
499
|
var r, o;
|
|
460
|
-
return t.kind === "label" ? t.label : t.kind === "entrance" ?
|
|
500
|
+
return t.kind === "label" ? t.label : t.kind === "entrance" ? dn(t) ?? t.label : t.kind === "connector" || (n == null ? void 0 : n.layerType) === "connector" ? n ? Gt(
|
|
461
501
|
{ style: t.style ?? {}, label: t.label },
|
|
462
502
|
n,
|
|
463
503
|
e
|
|
464
|
-
).label : t.label :
|
|
504
|
+
).label : t.label : be.has(t.kind) ? !n || !M(n) ? !((r = t.label) != null && r.text) && !((o = t.label) != null && o.imageKey) ? t.label : {
|
|
465
505
|
...t.label,
|
|
466
506
|
text: void 0,
|
|
467
507
|
imageKey: void 0
|
|
468
|
-
} :
|
|
508
|
+
} : Gt(
|
|
469
509
|
{ style: t.style ?? {}, label: t.label },
|
|
470
510
|
n,
|
|
471
511
|
e
|
|
472
512
|
).label : t.label;
|
|
473
513
|
}
|
|
474
|
-
function
|
|
475
|
-
if (
|
|
514
|
+
function Ie(t, n) {
|
|
515
|
+
if (M(t)) {
|
|
476
516
|
if (t.layerType === "retail_text" || t.layerType === "custom_text")
|
|
477
517
|
return t.customLabel ?? void 0;
|
|
478
518
|
if (t.layerType === "retail_name")
|
|
479
519
|
return (n == null ? void 0 : n.name) ?? t.customLabel ?? void 0;
|
|
480
520
|
}
|
|
481
521
|
}
|
|
482
|
-
function
|
|
483
|
-
if (!(!
|
|
484
|
-
return
|
|
522
|
+
function yn(t, n, e) {
|
|
523
|
+
if (!(!M(t) || !t) && !(t.layerType !== "retail_logo" && t.layerType !== "custom_image"))
|
|
524
|
+
return _e(t, n) ?? D(e == null ? void 0 : e.imageKey) ?? void 0;
|
|
485
525
|
}
|
|
486
|
-
function
|
|
526
|
+
function wo(t, n) {
|
|
487
527
|
var e, r;
|
|
488
|
-
if (!(!
|
|
528
|
+
if (!(!M(t) || !t)) {
|
|
489
529
|
if (t.layerType === "kiosk") return "kiosk";
|
|
490
530
|
if (t.layerType === "amenity")
|
|
491
531
|
return ((e = n == null ? void 0 : n.find((o) => o.id === t.amenityId)) == null ? void 0 : e.code) ?? ((r = t.customLabel) == null ? void 0 : r.trim()) ?? void 0;
|
|
492
532
|
}
|
|
493
533
|
}
|
|
494
|
-
function
|
|
534
|
+
function ge(t, n) {
|
|
495
535
|
const e = Number.isFinite(t) && t > 0 ? t : dt;
|
|
496
|
-
return (n == null ? void 0 : n.layerType) === "retail_logo" || (n == null ? void 0 : n.layerType) === "custom_image" ? e *
|
|
536
|
+
return (n == null ? void 0 : n.layerType) === "retail_logo" || (n == null ? void 0 : n.layerType) === "custom_image" ? e * ae : e;
|
|
497
537
|
}
|
|
498
|
-
function
|
|
538
|
+
function Po(t) {
|
|
499
539
|
const n = t.assignment, e = t.label;
|
|
500
540
|
return {
|
|
501
|
-
size:
|
|
502
|
-
(n == null ? void 0 : n.size) ?? (e == null ? void 0 : e.size) ??
|
|
541
|
+
size: ge(
|
|
542
|
+
(n == null ? void 0 : n.size) ?? (e == null ? void 0 : e.size) ?? ce
|
|
503
543
|
),
|
|
504
544
|
rotate: (n == null ? void 0 : n.rotate) ?? (e == null ? void 0 : e.rotate) ?? 0,
|
|
505
545
|
offsetX: (n == null ? void 0 : n.offsetX) ?? (e == null ? void 0 : e.offsetX) ?? 0,
|
|
@@ -507,12 +547,12 @@ function Co(t) {
|
|
|
507
547
|
iconColor: (n == null ? void 0 : n.textColor) ?? (e == null ? void 0 : e.color) ?? null
|
|
508
548
|
};
|
|
509
549
|
}
|
|
510
|
-
function
|
|
550
|
+
function Fo(t, n) {
|
|
511
551
|
var e;
|
|
512
|
-
return
|
|
552
|
+
return M(t) ? (t == null ? void 0 : t.layerType) === "kiosk" || (t == null ? void 0 : t.layerType) === "amenity" || yn(t, null, n) ? !0 : !!((e = n == null ? void 0 : n.text) != null && e.trim()) : !1;
|
|
513
553
|
}
|
|
514
|
-
function
|
|
515
|
-
if (
|
|
554
|
+
function _e(t, n) {
|
|
555
|
+
if (M(t)) {
|
|
516
556
|
if (t.layerType === "retail_logo")
|
|
517
557
|
return D(n == null ? void 0 : n.logoKey) ?? D(n == null ? void 0 : n.logoUrl) ?? D(t.customImageKey) ?? void 0;
|
|
518
558
|
if (t.layerType === "custom_image")
|
|
@@ -529,7 +569,7 @@ function Bt(t) {
|
|
|
529
569
|
const n = t[0];
|
|
530
570
|
return t.some((e) => e !== n);
|
|
531
571
|
}
|
|
532
|
-
function
|
|
572
|
+
function Do(t) {
|
|
533
573
|
const n = t.map((r) => r.bgColor ?? ""), e = t.map((r) => r.textColor ?? "");
|
|
534
574
|
return {
|
|
535
575
|
size: bt(t.map((r) => r.size)),
|
|
@@ -539,7 +579,7 @@ function Eo(t) {
|
|
|
539
579
|
textColorMixed: Bt(e)
|
|
540
580
|
};
|
|
541
581
|
}
|
|
542
|
-
function
|
|
582
|
+
function Ko(t, n) {
|
|
543
583
|
return {
|
|
544
584
|
...t,
|
|
545
585
|
...n.size != null ? { size: n.size } : {},
|
|
@@ -547,8 +587,8 @@ function Lo(t, n) {
|
|
|
547
587
|
...n.textColor !== void 0 ? { textColor: n.textColor } : {}
|
|
548
588
|
};
|
|
549
589
|
}
|
|
550
|
-
function
|
|
551
|
-
const r =
|
|
590
|
+
function Gt(t, n, e) {
|
|
591
|
+
const r = yn(n, e, t.label), o = M(n) ? r ? void 0 : Ie(n, e) ?? t.label.text : void 0;
|
|
552
592
|
return {
|
|
553
593
|
style: {
|
|
554
594
|
...t.style,
|
|
@@ -567,7 +607,7 @@ function zt(t, n, e) {
|
|
|
567
607
|
}
|
|
568
608
|
};
|
|
569
609
|
}
|
|
570
|
-
const
|
|
610
|
+
const ke = [
|
|
571
611
|
"floorplate",
|
|
572
612
|
"walkable",
|
|
573
613
|
"decor",
|
|
@@ -576,107 +616,107 @@ const xe = [
|
|
|
576
616
|
"water",
|
|
577
617
|
"parking_zone"
|
|
578
618
|
];
|
|
579
|
-
function
|
|
619
|
+
function Oe(t) {
|
|
580
620
|
return t === "void";
|
|
581
621
|
}
|
|
582
|
-
function
|
|
583
|
-
return
|
|
622
|
+
function Yo(t) {
|
|
623
|
+
return ke.includes(t);
|
|
584
624
|
}
|
|
585
|
-
function
|
|
586
|
-
return
|
|
625
|
+
function mn(t) {
|
|
626
|
+
return Oe(t.kind) && !t.orphanedAt;
|
|
587
627
|
}
|
|
588
|
-
function
|
|
589
|
-
return (t.shapes ?? []).some(
|
|
628
|
+
function Se(t) {
|
|
629
|
+
return (t.shapes ?? []).some(mn);
|
|
590
630
|
}
|
|
591
|
-
function
|
|
631
|
+
function $o(t) {
|
|
592
632
|
var e;
|
|
593
633
|
const n = [];
|
|
594
634
|
for (const r of t.shapes ?? [])
|
|
595
|
-
if (
|
|
635
|
+
if (mn(r))
|
|
596
636
|
for (const o of ((e = r.geometry) == null ? void 0 : e.polygons) ?? [])
|
|
597
637
|
o.length >= 3 && n.push(o);
|
|
598
638
|
return n;
|
|
599
639
|
}
|
|
600
|
-
function
|
|
640
|
+
function zt(t) {
|
|
601
641
|
let n = 0;
|
|
602
642
|
for (let e = 0, r = t.length - 1; e < t.length; r = e++)
|
|
603
643
|
n += t[r].x * t[e].y - t[e].x * t[r].y;
|
|
604
644
|
return n / 2;
|
|
605
645
|
}
|
|
606
|
-
function
|
|
646
|
+
function Ae(t) {
|
|
607
647
|
return t.slice().reverse();
|
|
608
648
|
}
|
|
609
|
-
function
|
|
610
|
-
const e =
|
|
611
|
-
return e === 0 || r === 0 ? n : Math.sign(e) === Math.sign(r) ?
|
|
649
|
+
function Re(t, n) {
|
|
650
|
+
const e = zt(t), r = zt(n);
|
|
651
|
+
return e === 0 || r === 0 ? n : Math.sign(e) === Math.sign(r) ? Ae(n) : n;
|
|
612
652
|
}
|
|
613
|
-
function
|
|
653
|
+
function Xt(t) {
|
|
614
654
|
let n = 1 / 0, e = 1 / 0, r = -1 / 0, o = -1 / 0;
|
|
615
655
|
for (const i of t)
|
|
616
656
|
i.x < n && (n = i.x), i.y < e && (e = i.y), i.x > r && (r = i.x), i.y > o && (o = i.y);
|
|
617
657
|
return { minX: n, minY: e, maxX: r, maxY: o };
|
|
618
658
|
}
|
|
619
|
-
function
|
|
620
|
-
const e =
|
|
659
|
+
function Ce(t, n) {
|
|
660
|
+
const e = Xt(t), r = Xt(n);
|
|
621
661
|
return e.minX <= r.maxX && e.maxX >= r.minX && e.minY <= r.maxY && e.maxY >= r.minY;
|
|
622
662
|
}
|
|
623
|
-
function
|
|
624
|
-
return n.filter((e) => e.length >= 3 &&
|
|
663
|
+
function Bo(t, n) {
|
|
664
|
+
return n.filter((e) => e.length >= 3 && Ce(t, e)).map((e) => Re(t, e));
|
|
625
665
|
}
|
|
626
|
-
const
|
|
627
|
-
function
|
|
666
|
+
const Go = "#e8eef4", zo = "#64748b", Xo = "#475569";
|
|
667
|
+
function Ee(t, n) {
|
|
628
668
|
return t.ordering - n.ordering || t.levelIndex - n.levelIndex;
|
|
629
669
|
}
|
|
630
|
-
function
|
|
670
|
+
function X(t) {
|
|
631
671
|
return t.kind === "outdoor";
|
|
632
672
|
}
|
|
633
|
-
function
|
|
634
|
-
const e = t.filter(
|
|
635
|
-
return !r ||
|
|
673
|
+
function Ne(t, n) {
|
|
674
|
+
const e = t.filter(X), r = n == null ? null : t.find((o) => o.id === n) ?? null;
|
|
675
|
+
return !r || X(r) || e.some((o) => o.id === r.id) ? e : [...e, r];
|
|
636
676
|
}
|
|
637
|
-
function
|
|
677
|
+
function Le(t, n) {
|
|
638
678
|
if (n == null) return [];
|
|
639
679
|
const e = ht(t), r = e.findIndex((c) => c.id === n);
|
|
640
680
|
if (r < 0) return [];
|
|
641
681
|
const o = [];
|
|
642
682
|
let i = e[r];
|
|
643
|
-
for (let c = r; c < e.length - 1 &&
|
|
683
|
+
for (let c = r; c < e.length - 1 && Se(i); c++) {
|
|
644
684
|
const a = e[c + 1];
|
|
645
685
|
if (!a) break;
|
|
646
686
|
o.unshift(a), i = a;
|
|
647
687
|
}
|
|
648
688
|
return o;
|
|
649
689
|
}
|
|
650
|
-
function
|
|
651
|
-
return
|
|
690
|
+
function Ho(t, n) {
|
|
691
|
+
return Le(t, n).at(-1) ?? null;
|
|
652
692
|
}
|
|
653
|
-
function
|
|
693
|
+
function Uo(t, n, e) {
|
|
654
694
|
const r = t.find((i) => i.id === e);
|
|
655
|
-
if (!r || !
|
|
695
|
+
if (!r || !X(r)) return e;
|
|
656
696
|
const o = n == null ? null : t.find((i) => i.id === n) ?? null;
|
|
657
|
-
return o && !
|
|
697
|
+
return o && !X(o) ? o.id : Te(t) ?? e;
|
|
658
698
|
}
|
|
659
699
|
function ht(t) {
|
|
660
|
-
return t.filter((n) => n.kind === "floor").slice().sort(
|
|
700
|
+
return t.filter((n) => n.kind === "floor").slice().sort(Ee);
|
|
661
701
|
}
|
|
662
|
-
function
|
|
702
|
+
function Vo(t) {
|
|
663
703
|
return ht(t);
|
|
664
704
|
}
|
|
665
|
-
function
|
|
705
|
+
function Wo(t) {
|
|
666
706
|
return ht(t).length > 1;
|
|
667
707
|
}
|
|
668
|
-
function
|
|
708
|
+
function ve(t) {
|
|
669
709
|
return t.some((n) => n.kind === "floor");
|
|
670
710
|
}
|
|
671
|
-
function
|
|
672
|
-
return t.some(
|
|
711
|
+
function Me(t) {
|
|
712
|
+
return t.some(X);
|
|
673
713
|
}
|
|
674
|
-
const
|
|
675
|
-
function
|
|
714
|
+
const Zo = "This map doesn’t have any floors yet.";
|
|
715
|
+
function Te(t) {
|
|
676
716
|
var n, e;
|
|
677
717
|
return ((n = ht(t).at(-1)) == null ? void 0 : n.id) ?? ((e = t[0]) == null ? void 0 : e.id) ?? null;
|
|
678
718
|
}
|
|
679
|
-
function
|
|
719
|
+
function Ht(t) {
|
|
680
720
|
return {
|
|
681
721
|
minX: t.x,
|
|
682
722
|
minY: t.y,
|
|
@@ -687,20 +727,20 @@ function Xt(t) {
|
|
|
687
727
|
size: Math.max(t.width, t.height, 100)
|
|
688
728
|
};
|
|
689
729
|
}
|
|
690
|
-
function
|
|
730
|
+
function we(t, n) {
|
|
691
731
|
const e = n.scale || 1, r = (n.rotate || 0) * Math.PI / 180, o = Math.cos(r), i = Math.sin(r), c = t.x * e, a = t.y * e;
|
|
692
732
|
return {
|
|
693
733
|
x: c * o - a * i + (n.translateX || 0),
|
|
694
734
|
y: c * i + a * o + (n.translateY || 0)
|
|
695
735
|
};
|
|
696
736
|
}
|
|
697
|
-
function
|
|
737
|
+
function Pe(t, n) {
|
|
698
738
|
const e = [
|
|
699
739
|
{ x: t.minX, y: t.minY },
|
|
700
740
|
{ x: t.maxX, y: t.minY },
|
|
701
741
|
{ x: t.minX, y: t.maxY },
|
|
702
742
|
{ x: t.maxX, y: t.maxY }
|
|
703
|
-
].map((a) => n ?
|
|
743
|
+
].map((a) => n ? we(a, n) : a), r = Math.min(
|
|
704
744
|
e[0].x,
|
|
705
745
|
e[1].x,
|
|
706
746
|
e[2].x,
|
|
@@ -743,28 +783,28 @@ function Ut(t, n) {
|
|
|
743
783
|
size: Math.max(o - e, i - r, 100)
|
|
744
784
|
};
|
|
745
785
|
}
|
|
746
|
-
function
|
|
747
|
-
let r = e ?
|
|
748
|
-
for (const o of
|
|
786
|
+
function jo(t, n, e) {
|
|
787
|
+
let r = e ? Ht(e) : null;
|
|
788
|
+
for (const o of Ne(t, n)) {
|
|
749
789
|
if (o.viewbox) {
|
|
750
|
-
const i =
|
|
790
|
+
const i = Ht(o.viewbox);
|
|
751
791
|
r = r ? Ut(r, i) : i;
|
|
752
792
|
}
|
|
753
793
|
for (const i of o.shapes) {
|
|
754
|
-
const c =
|
|
794
|
+
const c = Pe(i.bbox);
|
|
755
795
|
r = r ? Ut(r, c) : c;
|
|
756
796
|
}
|
|
757
797
|
}
|
|
758
798
|
return r ?? { minX: 0, minY: 0, maxX: 500, maxY: 500, cx: 250, cy: 250, size: 500 };
|
|
759
799
|
}
|
|
760
|
-
function
|
|
800
|
+
function qo(t, n) {
|
|
761
801
|
if (!t && !n) return { x: 0, y: 0, width: 1e3, height: 800 };
|
|
762
802
|
if (!t) return n;
|
|
763
803
|
if (!n) return t;
|
|
764
804
|
const e = Math.min(t.x, n.x), r = Math.min(t.y, n.y), o = Math.max(t.x + t.width, n.x + n.width), i = Math.max(t.y + t.height, n.y + n.height);
|
|
765
805
|
return { x: e, y: r, width: o - e, height: i - r };
|
|
766
806
|
}
|
|
767
|
-
function
|
|
807
|
+
function Qo(t) {
|
|
768
808
|
return t === "PORTAL" ? "editor" : "viewer";
|
|
769
809
|
}
|
|
770
810
|
const It = {
|
|
@@ -775,10 +815,11 @@ const It = {
|
|
|
775
815
|
kioskOrigin: !1,
|
|
776
816
|
fetchDraft: !1,
|
|
777
817
|
storeModal: !1,
|
|
818
|
+
sidebar: !1,
|
|
778
819
|
hoverTooltip: !1
|
|
779
|
-
},
|
|
820
|
+
}, Fe = {
|
|
780
821
|
/** v1 WP_SITE / MapBox HOST WEBSITE. */
|
|
781
|
-
WEBSITE: { ...It,
|
|
822
|
+
WEBSITE: { ...It, sidebar: !0, hoverTooltip: !0 },
|
|
782
823
|
/** Assign mode: click shapes, no public directory chrome. */
|
|
783
824
|
PORTAL_ASSIGN: It,
|
|
784
825
|
DISPLAY_APP: {
|
|
@@ -788,19 +829,19 @@ const It = {
|
|
|
788
829
|
}
|
|
789
830
|
};
|
|
790
831
|
function pn(t) {
|
|
791
|
-
return
|
|
832
|
+
return Fe[t];
|
|
792
833
|
}
|
|
793
|
-
function
|
|
834
|
+
function Jo(t) {
|
|
794
835
|
return t !== "WEBSITE";
|
|
795
836
|
}
|
|
796
|
-
function
|
|
837
|
+
function ti(t) {
|
|
797
838
|
return t !== "PORTAL";
|
|
798
839
|
}
|
|
799
|
-
function
|
|
840
|
+
function De(t) {
|
|
800
841
|
return t === "WEBSITE" || t === "DISPLAY_APP";
|
|
801
842
|
}
|
|
802
|
-
function
|
|
803
|
-
return
|
|
843
|
+
function ni(t, n) {
|
|
844
|
+
return ve(n) ? !0 : De(t) ? !1 : Me(n);
|
|
804
845
|
}
|
|
805
846
|
function Vt(...t) {
|
|
806
847
|
for (const n of t) {
|
|
@@ -809,34 +850,34 @@ function Vt(...t) {
|
|
|
809
850
|
}
|
|
810
851
|
return null;
|
|
811
852
|
}
|
|
812
|
-
function
|
|
853
|
+
function ei(t) {
|
|
813
854
|
return pn(t).hoverTooltip;
|
|
814
855
|
}
|
|
815
|
-
function
|
|
856
|
+
function ri(t, n = [], e = []) {
|
|
816
857
|
var r, o, i, c, a, s, h;
|
|
817
858
|
if (t.kind === "unit") {
|
|
818
|
-
const y = (r = t.assignment) == null ? void 0 : r.retailerId,
|
|
859
|
+
const y = (r = t.assignment) == null ? void 0 : r.retailerId, u = y != null ? n.find((b) => b.id === y) : void 0;
|
|
819
860
|
return Vt(
|
|
820
|
-
|
|
861
|
+
u == null ? void 0 : u.name,
|
|
821
862
|
(o = t.assignment) == null ? void 0 : o.customLabel,
|
|
822
863
|
(i = t.label) == null ? void 0 : i.text
|
|
823
864
|
);
|
|
824
865
|
}
|
|
825
866
|
if (t.kind === "amenity") {
|
|
826
|
-
const y = (c = t.assignment) == null ? void 0 : c.amenityId,
|
|
827
|
-
return Vt(
|
|
867
|
+
const y = (c = t.assignment) == null ? void 0 : c.amenityId, u = (s = (a = t.assignment) == null ? void 0 : a.customLabel) == null ? void 0 : s.trim(), b = y != null ? e.find((d) => d.id === y) : void 0, l = u ? e.find((d) => d.code === u) : void 0;
|
|
868
|
+
return Vt(b == null ? void 0 : b.name, l == null ? void 0 : l.name, u, (h = t.label) == null ? void 0 : h.text);
|
|
828
869
|
}
|
|
829
870
|
return null;
|
|
830
871
|
}
|
|
831
|
-
function
|
|
872
|
+
function Ke(t, n, e) {
|
|
832
873
|
var r;
|
|
833
874
|
return t === "DISPLAY_APP" && n != null && e.kind === "kiosk_screen" && !e.orphanedAt && ((r = e.assignment) == null ? void 0 : r.kioskId) === n;
|
|
834
875
|
}
|
|
835
|
-
function
|
|
876
|
+
function oi(t, n, e) {
|
|
836
877
|
var r;
|
|
837
878
|
for (const o of t.levels) {
|
|
838
879
|
const i = o.shapes.find(
|
|
839
|
-
(c) =>
|
|
880
|
+
(c) => Ke(n, e, c)
|
|
840
881
|
);
|
|
841
882
|
if (i)
|
|
842
883
|
return {
|
|
@@ -847,7 +888,7 @@ function Zo(t, n, e) {
|
|
|
847
888
|
}
|
|
848
889
|
return null;
|
|
849
890
|
}
|
|
850
|
-
function
|
|
891
|
+
function ii(t) {
|
|
851
892
|
var o, i;
|
|
852
893
|
const n = ((o = t.kioskOrigin) == null ? void 0 : o.anchorId) ?? null;
|
|
853
894
|
if (t.kind === "chrome")
|
|
@@ -865,216 +906,14 @@ function jo(t) {
|
|
|
865
906
|
resetCamera: !r
|
|
866
907
|
};
|
|
867
908
|
}
|
|
868
|
-
function
|
|
869
|
-
if (typeof t != "string") return null;
|
|
870
|
-
const n = t.trim();
|
|
871
|
-
return n || null;
|
|
872
|
-
}
|
|
873
|
-
function tt(t) {
|
|
874
|
-
const n = typeof t == "number" ? t : Number(t);
|
|
875
|
-
return Number.isFinite(n) && n > 0 ? n : null;
|
|
876
|
-
}
|
|
877
|
-
function nt(t) {
|
|
878
|
-
return !t || typeof t != "object" ? null : k(t.url);
|
|
879
|
-
}
|
|
880
|
-
function qo(t, n) {
|
|
881
|
-
var e;
|
|
882
|
-
return !n || !pn(t).storeModal ? !1 : n.kind === "unit" ? ((e = n.assignment) == null ? void 0 : e.retailerId) != null : n.kind === "amenity" ? T(n.assignment) : !1;
|
|
883
|
-
}
|
|
884
|
-
function Me(t, n) {
|
|
885
|
-
for (const e of t.levels) {
|
|
886
|
-
const r = e.shapes.find((o) => o.id === n);
|
|
887
|
-
if (r) return { level: e, shape: r };
|
|
888
|
-
}
|
|
889
|
-
return null;
|
|
890
|
-
}
|
|
891
|
-
function we(t, n) {
|
|
892
|
-
var r, o, i, c;
|
|
893
|
-
const e = ((r = t.assignment) == null ? void 0 : r.amenityId) != null ? n == null ? void 0 : n.find((a) => a.id === t.assignment.amenityId) : void 0;
|
|
894
|
-
return k((o = t.assignment) == null ? void 0 : o.customLabel) || k(e == null ? void 0 : e.name) || k((i = t.label) == null ? void 0 : i.text) || k((c = t.assignment) == null ? void 0 : c.unitNumber) || t.key;
|
|
895
|
-
}
|
|
896
|
-
function Qo(t, n) {
|
|
897
|
-
var i, c;
|
|
898
|
-
const e = Me(t, n);
|
|
899
|
-
if (!e) return null;
|
|
900
|
-
const r = e.shape.kind === "amenity" ? "amenity" : "store", o = e.level.anchors.find((a) => a.shapeId === n);
|
|
901
|
-
return {
|
|
902
|
-
shapeId: n,
|
|
903
|
-
levelId: e.level.id,
|
|
904
|
-
anchorId: (o == null ? void 0 : o.id) ?? null,
|
|
905
|
-
kind: r,
|
|
906
|
-
retailerId: ((i = e.shape.assignment) == null ? void 0 : i.retailerId) ?? null,
|
|
907
|
-
amenityId: ((c = e.shape.assignment) == null ? void 0 : c.amenityId) ?? null,
|
|
908
|
-
name: we(e.shape, t.amenities),
|
|
909
|
-
isExterior: V(e.level)
|
|
910
|
-
};
|
|
911
|
-
}
|
|
912
|
-
const Pe = "Directions are unavailable for this location.";
|
|
913
|
-
function Fe(t) {
|
|
914
|
-
return t ? t.isExterior || t.anchorId == null : !0;
|
|
915
|
-
}
|
|
916
|
-
function Jo(t, n) {
|
|
917
|
-
const e = Fe(n), r = t !== "DISPLAY_APP";
|
|
918
|
-
return {
|
|
919
|
-
showFromRetailers: r && !e,
|
|
920
|
-
showMapIt: r,
|
|
921
|
-
mapItDisabled: e,
|
|
922
|
-
mapItTooltip: r && e ? Pe : null
|
|
923
|
-
};
|
|
924
|
-
}
|
|
925
|
-
function De(t) {
|
|
926
|
-
const n = /* @__PURE__ */ new Map();
|
|
927
|
-
for (const e of t ?? [])
|
|
928
|
-
(e == null ? void 0 : e.id) != null && n.set(e.id, e);
|
|
929
|
-
return n;
|
|
930
|
-
}
|
|
931
|
-
function Ke(t, n) {
|
|
932
|
-
var e, r;
|
|
933
|
-
return k(t == null ? void 0 : t.logoUrl) || k(t == null ? void 0 : t.logoKey) || k((e = n.label) == null ? void 0 : e.imageKey) || k((r = n.assignment) == null ? void 0 : r.customImageKey);
|
|
934
|
-
}
|
|
935
|
-
function ti(t, n) {
|
|
936
|
-
var i, c, a, s;
|
|
937
|
-
const e = De(n ?? t.retailers), r = /* @__PURE__ */ new Map();
|
|
938
|
-
for (const h of t.levels)
|
|
939
|
-
for (const y of h.shapes) {
|
|
940
|
-
const l = (i = y.assignment) == null ? void 0 : i.retailerId;
|
|
941
|
-
if (l == null || y.kind !== "unit") continue;
|
|
942
|
-
const m = e.get(l), u = h.anchors.find((p) => p.shapeId === y.id), d = {
|
|
943
|
-
id: l,
|
|
944
|
-
name: k(m == null ? void 0 : m.name) || k((c = y.label) == null ? void 0 : c.text) || k((a = y.assignment) == null ? void 0 : a.customLabel) || `Store ${l}`,
|
|
945
|
-
location: k(m == null ? void 0 : m.location) || k((s = y.assignment) == null ? void 0 : s.unitNumber),
|
|
946
|
-
phone: k(m == null ? void 0 : m.phone),
|
|
947
|
-
description: k(m == null ? void 0 : m.description),
|
|
948
|
-
logoUrl: Ke(m, y),
|
|
949
|
-
globalRetailerId: (m == null ? void 0 : m.globalRetailerId) ?? null,
|
|
950
|
-
shapeId: y.id,
|
|
951
|
-
levelId: h.id,
|
|
952
|
-
anchorId: (u == null ? void 0 : u.id) ?? null
|
|
953
|
-
}, f = r.get(l);
|
|
954
|
-
(!f || f.anchorId == null && d.anchorId != null) && r.set(l, d);
|
|
955
|
-
}
|
|
956
|
-
return Array.from(r.values()).sort((h, y) => h.name.localeCompare(y.name));
|
|
957
|
-
}
|
|
958
|
-
function ni(t, n) {
|
|
959
|
-
const e = /* @__PURE__ */ new Map();
|
|
960
|
-
for (const r of t)
|
|
961
|
-
r.globalRetailerId != null && e.set(r.globalRetailerId, (e.get(r.globalRetailerId) ?? 0) + 1);
|
|
962
|
-
return t.filter((r) => r.id !== n && r.anchorId != null).map((r) => {
|
|
963
|
-
const o = r.globalRetailerId != null && (e.get(r.globalRetailerId) ?? 0) > 1 && r.location;
|
|
964
|
-
return {
|
|
965
|
-
value: String(r.id),
|
|
966
|
-
label: o ? `${r.name} (${r.location})` : r.name
|
|
967
|
-
};
|
|
968
|
-
});
|
|
969
|
-
}
|
|
970
|
-
function ei(t, n) {
|
|
971
|
-
return (t == null ? void 0 : t.anchorId) == null || (n == null ? void 0 : n.anchorId) == null ? null : {
|
|
972
|
-
fromAnchorId: t.anchorId,
|
|
973
|
-
toAnchorId: n.anchorId,
|
|
974
|
-
toLevelId: n.levelId
|
|
975
|
-
};
|
|
976
|
-
}
|
|
977
|
-
function ri(t) {
|
|
978
|
-
const n = t.replace(/\D/g, "").slice(-10);
|
|
979
|
-
return n.length === 10 ? `${n.slice(0, 3)}.${n.slice(3, 6)}.${n.slice(-4)}` : t;
|
|
980
|
-
}
|
|
981
|
-
function oi(t) {
|
|
982
|
-
if (!t || typeof t != "object") return null;
|
|
983
|
-
const n = t, e = n.global_retailer && typeof n.global_retailer == "object" ? n.global_retailer : null, r = tt(n.id);
|
|
984
|
-
if (r == null) return null;
|
|
985
|
-
const o = k(e == null ? void 0 : e.name) || k(n.name) || `Retailer ${r}`;
|
|
986
|
-
return {
|
|
987
|
-
id: r,
|
|
988
|
-
name: o,
|
|
989
|
-
location: k(n.location),
|
|
990
|
-
phone: k(n.retailer_phone) || k(n.phone),
|
|
991
|
-
description: k(e == null ? void 0 : e.description) || k(n.description) || k(n.local_description),
|
|
992
|
-
logoUrl: nt(e == null ? void 0 : e.media) || nt(e == null ? void 0 : e.featured_image) || nt(n.media) || nt(n.featured_image) || k(n.logoUrl) || k(n.logo),
|
|
993
|
-
logoKey: k(n.logoKey),
|
|
994
|
-
globalRetailerId: tt(e == null ? void 0 : e.id) || tt(n.global_retailer_id) || tt(n.globalRetailerId)
|
|
995
|
-
};
|
|
996
|
-
}
|
|
997
|
-
function xn(t) {
|
|
998
|
-
return t === "WEBSITE" || t === "DISPLAY_APP";
|
|
999
|
-
}
|
|
1000
|
-
function Ye(t) {
|
|
1001
|
-
return t === "PORTAL_ASSIGN";
|
|
1002
|
-
}
|
|
1003
|
-
function $e(t) {
|
|
1004
|
-
return xn(t);
|
|
1005
|
-
}
|
|
1006
|
-
function ii(t, n) {
|
|
1007
|
-
return $e(n) ? T(t.assignment) : !0;
|
|
1008
|
-
}
|
|
1009
|
-
function Be(t) {
|
|
1010
|
-
const n = (t.sourceSvgId ?? t.key ?? "").trim().toLowerCase().replace(/_/g, "-");
|
|
1011
|
-
return n === "escalator" || n.startsWith("escalator-") ? "escalator" : n === "elevator" || n.startsWith("elevator-") ? "elevator" : null;
|
|
1012
|
-
}
|
|
1013
|
-
function ze(t, n) {
|
|
1014
|
-
return Be(t) ? n.has(t.id) : t.kind === "amenity" || t.kind === "kiosk_screen" ? T(t.assignment) : !0;
|
|
1015
|
-
}
|
|
1016
|
-
function si(t, n, e) {
|
|
1017
|
-
return xn(n) ? ze(t, e) : !0;
|
|
1018
|
-
}
|
|
1019
|
-
const mn = "#e2e8f0";
|
|
1020
|
-
function ci(t) {
|
|
1021
|
-
if (!t) return !1;
|
|
1022
|
-
const n = t.toLowerCase();
|
|
1023
|
-
return n === "amenity" || n.startsWith("amenity-");
|
|
1024
|
-
}
|
|
1025
|
-
function Ge(t) {
|
|
1026
|
-
var e;
|
|
1027
|
-
return ((e = t == null ? void 0 : t.GREEN_AREA_COLOR) == null ? void 0 : e.trim()) || X("green-area");
|
|
1028
|
-
}
|
|
1029
|
-
function He(t, n) {
|
|
1030
|
-
return t === "amenity" ? Ge(n) : mn;
|
|
1031
|
-
}
|
|
1032
|
-
function Xe(t, n, e, r) {
|
|
1033
|
-
if (t === "walkable") return n.WALKABLE_COLOR;
|
|
1034
|
-
if (Tt(t))
|
|
1035
|
-
return $t(r, Nt);
|
|
1036
|
-
if (t === "unit" || t === "custom")
|
|
1037
|
-
return $t(r, n.STORE_DEFAULT_COLOR);
|
|
1038
|
-
if (e) return e;
|
|
1039
|
-
switch (t) {
|
|
1040
|
-
case "wall":
|
|
1041
|
-
case "boundary":
|
|
1042
|
-
return n.WALL_COLOR;
|
|
1043
|
-
case "parking_zone":
|
|
1044
|
-
return n.PARKING_ZONE_COLOR;
|
|
1045
|
-
case "green_area":
|
|
1046
|
-
return n.GREEN_AREA_COLOR;
|
|
1047
|
-
case "water":
|
|
1048
|
-
return n.WATER_COLOR;
|
|
1049
|
-
case "floorplate":
|
|
1050
|
-
return n.BASE_COLOR;
|
|
1051
|
-
case "void":
|
|
1052
|
-
return "#00000000";
|
|
1053
|
-
default:
|
|
1054
|
-
return mn;
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
|
-
function ai(t, n, e, r, o) {
|
|
1058
|
-
const i = Xe(t, n, r, o);
|
|
1059
|
-
return Ye(e) && Tt(t) && W(i) ? He(t, n) : i;
|
|
1060
|
-
}
|
|
1061
|
-
function li(t, n) {
|
|
1062
|
-
return t === "amenity" ? 1 : n ?? 1;
|
|
1063
|
-
}
|
|
1064
|
-
function Ue(t) {
|
|
1065
|
-
return /^https?:\/\//i.test(t.trim());
|
|
1066
|
-
}
|
|
1067
|
-
function ui(t, n) {
|
|
1068
|
-
return !n || !Ue(t) ? t : n + encodeURIComponent(t);
|
|
1069
|
-
}
|
|
1070
|
-
function fi(t, n) {
|
|
909
|
+
function si(t, n) {
|
|
1071
910
|
return t.map((e) => ({ x: e.x, y: n - e.y }));
|
|
1072
911
|
}
|
|
1073
912
|
function v(t, n) {
|
|
1074
913
|
const e = t.x - n.x, r = t.y - n.y;
|
|
1075
914
|
return Math.hypot(e, r);
|
|
1076
915
|
}
|
|
1077
|
-
function
|
|
916
|
+
function Ye(t) {
|
|
1078
917
|
if (t.length === 0)
|
|
1079
918
|
return { minX: 0, minY: 0, maxX: 0, maxY: 0 };
|
|
1080
919
|
let n = t[0].x, e = t[0].y, r = t[0].x, o = t[0].y;
|
|
@@ -1084,7 +923,7 @@ function Ve(t) {
|
|
|
1084
923
|
}
|
|
1085
924
|
return { minX: n, minY: e, maxX: r, maxY: o };
|
|
1086
925
|
}
|
|
1087
|
-
function
|
|
926
|
+
function ci(t, n) {
|
|
1088
927
|
return {
|
|
1089
928
|
minX: Math.min(t.minX, n.minX),
|
|
1090
929
|
minY: Math.min(t.minY, n.minY),
|
|
@@ -1092,14 +931,14 @@ function di(t, n) {
|
|
|
1092
931
|
maxY: Math.max(t.maxY, n.maxY)
|
|
1093
932
|
};
|
|
1094
933
|
}
|
|
1095
|
-
function
|
|
934
|
+
function $e(t) {
|
|
1096
935
|
if (t.length === 0) return { x: 0, y: 0 };
|
|
1097
936
|
let n = 0, e = 0;
|
|
1098
937
|
for (const r of t)
|
|
1099
938
|
n += r.x, e += r.y;
|
|
1100
939
|
return { x: n / t.length, y: e / t.length };
|
|
1101
940
|
}
|
|
1102
|
-
function
|
|
941
|
+
function Be(t, n) {
|
|
1103
942
|
let e = !1;
|
|
1104
943
|
for (let r = 0, o = n.length - 1; r < n.length; o = r++) {
|
|
1105
944
|
const i = n[r].x, c = n[r].y, a = n[o].x, s = n[o].y;
|
|
@@ -1107,8 +946,8 @@ function Ze(t, n) {
|
|
|
1107
946
|
}
|
|
1108
947
|
return e;
|
|
1109
948
|
}
|
|
1110
|
-
function
|
|
1111
|
-
return n.some((e) =>
|
|
949
|
+
function ai(t, n) {
|
|
950
|
+
return n.some((e) => Be(t, e));
|
|
1112
951
|
}
|
|
1113
952
|
function at(t, n, e) {
|
|
1114
953
|
const r = e.x - n.x, o = e.y - n.y, i = r * r + o * o;
|
|
@@ -1119,7 +958,7 @@ function at(t, n, e) {
|
|
|
1119
958
|
const a = { x: n.x + c * r, y: n.y + c * o };
|
|
1120
959
|
return { point: a, t: c, distance: v(t, a) };
|
|
1121
960
|
}
|
|
1122
|
-
function
|
|
961
|
+
function li(t, n) {
|
|
1123
962
|
if (n.length < 2) return null;
|
|
1124
963
|
let e = null;
|
|
1125
964
|
for (let r = 0; r < n.length - 1; r++) {
|
|
@@ -1150,37 +989,37 @@ function Wt(t, n, e, r = 6) {
|
|
|
1150
989
|
}
|
|
1151
990
|
return o;
|
|
1152
991
|
}
|
|
1153
|
-
const
|
|
1154
|
-
function
|
|
992
|
+
const Ge = 8;
|
|
993
|
+
function ze(t, n, e, r, o, i, c) {
|
|
1155
994
|
if (t.x === c.x && t.y === c.y) return [{ ...t }];
|
|
1156
995
|
let a = Math.abs(n), s = Math.abs(e);
|
|
1157
996
|
if (a === 0 || s === 0 || !Number.isFinite(a) || !Number.isFinite(s))
|
|
1158
997
|
return [{ ...t }, { ...c }];
|
|
1159
|
-
const h = r % 360 * Math.PI / 180, y = Math.cos(h),
|
|
1160
|
-
if (
|
|
1161
|
-
const P = Math.sqrt(
|
|
998
|
+
const h = r % 360 * Math.PI / 180, y = Math.cos(h), u = Math.sin(h), b = (t.x - c.x) / 2, l = (t.y - c.y) / 2, d = y * b + u * l, f = -u * b + y * l, m = d * d / (a * a) + f * f / (s * s);
|
|
999
|
+
if (m > 1) {
|
|
1000
|
+
const P = Math.sqrt(m);
|
|
1162
1001
|
a *= P, s *= P;
|
|
1163
1002
|
}
|
|
1164
|
-
const
|
|
1165
|
-
let
|
|
1166
|
-
!i &&
|
|
1167
|
-
const $ = Math.abs(
|
|
1003
|
+
const x = a * a, I = s * s, p = x * I - x * f * f - I * d * d, g = x * f * f + I * d * d, _ = Math.sqrt(Math.max(0, p / g)) * (o === i ? -1 : 1), S = _ * a * f / s, O = -_ * s * d / a, A = y * S - u * O + (t.x + c.x) / 2, E = u * S + y * O + (t.y + c.y) / 2, C = (d - S) / a, K = (f - O) / s, T = (-d - S) / a, Y = (-f - O) / s, N = Math.atan2(K, C);
|
|
1004
|
+
let R = Math.atan2(C * Y - K * T, C * T + K * Y);
|
|
1005
|
+
!i && R > 0 ? R -= 2 * Math.PI : i && R < 0 && (R += 2 * Math.PI);
|
|
1006
|
+
const $ = Math.abs(R) / (Math.PI / 2) * Ge, B = Math.max(1, Math.round($)), w = [{ ...t }];
|
|
1168
1007
|
for (let P = 1; P <= B; P++) {
|
|
1169
|
-
const Q =
|
|
1008
|
+
const Q = N + R * P / B, J = Math.cos(Q), Pt = Math.sin(Q);
|
|
1170
1009
|
w.push({
|
|
1171
|
-
x: A + a * y * J - s *
|
|
1172
|
-
y: E + a *
|
|
1010
|
+
x: A + a * y * J - s * u * Pt,
|
|
1011
|
+
y: E + a * u * J + s * y * Pt
|
|
1173
1012
|
});
|
|
1174
1013
|
}
|
|
1175
1014
|
return w[w.length - 1] = { ...c }, w;
|
|
1176
1015
|
}
|
|
1177
|
-
const
|
|
1178
|
-
function
|
|
1016
|
+
const Xe = /[\s,]/;
|
|
1017
|
+
function xn(t) {
|
|
1179
1018
|
const n = [];
|
|
1180
1019
|
let e = 0, r = "", o = 0;
|
|
1181
1020
|
for (; e < t.length; ) {
|
|
1182
1021
|
const i = t[e];
|
|
1183
|
-
if (
|
|
1022
|
+
if (Xe.test(i)) {
|
|
1184
1023
|
e++;
|
|
1185
1024
|
continue;
|
|
1186
1025
|
}
|
|
@@ -1215,91 +1054,91 @@ function bn(t) {
|
|
|
1215
1054
|
}
|
|
1216
1055
|
return n;
|
|
1217
1056
|
}
|
|
1218
|
-
function
|
|
1219
|
-
const n =
|
|
1057
|
+
function bn(t) {
|
|
1058
|
+
const n = xn(t), e = [];
|
|
1220
1059
|
let r = [], o = 0, i = 0, c = 0, a = 0, s = null, h = 0, y = "";
|
|
1221
|
-
const
|
|
1060
|
+
const u = () => Number(n[h++]);
|
|
1222
1061
|
for (; h < n.length; ) {
|
|
1223
|
-
const
|
|
1224
|
-
switch (/[a-zA-Z]/.test(
|
|
1062
|
+
const b = n[h];
|
|
1063
|
+
switch (/[a-zA-Z]/.test(b) && (y = b, h++), y) {
|
|
1225
1064
|
case "M":
|
|
1226
1065
|
case "m": {
|
|
1227
|
-
const
|
|
1228
|
-
o =
|
|
1066
|
+
const l = y === "m", d = u(), f = u();
|
|
1067
|
+
o = l ? o + d : d, i = l ? i + f : f, r.length > 0 && e.push(r), r = [{ x: o, y: i }], c = o, a = i, s = null, y = l ? "l" : "L";
|
|
1229
1068
|
break;
|
|
1230
1069
|
}
|
|
1231
1070
|
case "L":
|
|
1232
1071
|
case "l": {
|
|
1233
|
-
const
|
|
1234
|
-
o =
|
|
1072
|
+
const l = y === "l", d = u(), f = u();
|
|
1073
|
+
o = l ? o + d : d, i = l ? i + f : f, r.push({ x: o, y: i }), s = null;
|
|
1235
1074
|
break;
|
|
1236
1075
|
}
|
|
1237
1076
|
case "H":
|
|
1238
1077
|
case "h": {
|
|
1239
|
-
const
|
|
1240
|
-
o =
|
|
1078
|
+
const l = y === "h", d = u();
|
|
1079
|
+
o = l ? o + d : d, r.push({ x: o, y: i }), s = null;
|
|
1241
1080
|
break;
|
|
1242
1081
|
}
|
|
1243
1082
|
case "V":
|
|
1244
1083
|
case "v": {
|
|
1245
|
-
const
|
|
1246
|
-
i =
|
|
1084
|
+
const l = y === "v", d = u();
|
|
1085
|
+
i = l ? i + d : d, r.push({ x: o, y: i }), s = null;
|
|
1247
1086
|
break;
|
|
1248
1087
|
}
|
|
1249
1088
|
case "C":
|
|
1250
1089
|
case "c": {
|
|
1251
|
-
const
|
|
1090
|
+
const l = y === "c", d = l ? o + u() : u(), f = l ? i + u() : u(), m = l ? o + u() : u(), x = l ? i + u() : u(), I = l ? o + u() : u(), p = l ? i + u() : u(), g = lt(
|
|
1252
1091
|
{ x: o, y: i },
|
|
1253
1092
|
{ x: d, y: f },
|
|
1254
|
-
{ x:
|
|
1255
|
-
{ x: I, y:
|
|
1093
|
+
{ x: m, y: x },
|
|
1094
|
+
{ x: I, y: p }
|
|
1256
1095
|
);
|
|
1257
|
-
r.push(...g.slice(1)), s = { x:
|
|
1096
|
+
r.push(...g.slice(1)), s = { x: m, y: x }, o = I, i = p;
|
|
1258
1097
|
break;
|
|
1259
1098
|
}
|
|
1260
1099
|
case "Q":
|
|
1261
1100
|
case "q": {
|
|
1262
|
-
const
|
|
1101
|
+
const l = y === "q", d = l ? o + u() : u(), f = l ? i + u() : u(), m = l ? o + u() : u(), x = l ? i + u() : u(), I = Wt(
|
|
1263
1102
|
{ x: o, y: i },
|
|
1264
1103
|
{ x: d, y: f },
|
|
1265
|
-
{ x:
|
|
1104
|
+
{ x: m, y: x }
|
|
1266
1105
|
);
|
|
1267
|
-
r.push(...I.slice(1)), s = { x: d, y: f }, o =
|
|
1106
|
+
r.push(...I.slice(1)), s = { x: d, y: f }, o = m, i = x;
|
|
1268
1107
|
break;
|
|
1269
1108
|
}
|
|
1270
1109
|
case "S":
|
|
1271
1110
|
case "s": {
|
|
1272
|
-
const
|
|
1111
|
+
const l = y === "s", d = s ? 2 * o - s.x : o, f = s ? 2 * i - s.y : i, m = l ? o + u() : u(), x = l ? i + u() : u(), I = l ? o + u() : u(), p = l ? i + u() : u(), g = lt(
|
|
1273
1112
|
{ x: o, y: i },
|
|
1274
1113
|
{ x: d, y: f },
|
|
1275
|
-
{ x:
|
|
1276
|
-
{ x: I, y:
|
|
1114
|
+
{ x: m, y: x },
|
|
1115
|
+
{ x: I, y: p }
|
|
1277
1116
|
);
|
|
1278
|
-
r.push(...g.slice(1)), s = { x:
|
|
1117
|
+
r.push(...g.slice(1)), s = { x: m, y: x }, o = I, i = p;
|
|
1279
1118
|
break;
|
|
1280
1119
|
}
|
|
1281
1120
|
case "T":
|
|
1282
1121
|
case "t": {
|
|
1283
|
-
const
|
|
1122
|
+
const l = y === "t", d = s ? 2 * o - s.x : o, f = s ? 2 * i - s.y : i, m = l ? o + u() : u(), x = l ? i + u() : u(), I = Wt(
|
|
1284
1123
|
{ x: o, y: i },
|
|
1285
1124
|
{ x: d, y: f },
|
|
1286
|
-
{ x:
|
|
1125
|
+
{ x: m, y: x }
|
|
1287
1126
|
);
|
|
1288
|
-
r.push(...I.slice(1)), s = { x: d, y: f }, o =
|
|
1127
|
+
r.push(...I.slice(1)), s = { x: d, y: f }, o = m, i = x;
|
|
1289
1128
|
break;
|
|
1290
1129
|
}
|
|
1291
1130
|
case "A":
|
|
1292
1131
|
case "a": {
|
|
1293
|
-
const
|
|
1132
|
+
const l = y === "a", d = u(), f = u(), m = u(), x = u() !== 0, I = u() !== 0, p = l ? o + u() : u(), g = l ? i + u() : u(), _ = ze(
|
|
1294
1133
|
{ x: o, y: i },
|
|
1295
1134
|
d,
|
|
1296
1135
|
f,
|
|
1297
|
-
|
|
1298
|
-
|
|
1136
|
+
m,
|
|
1137
|
+
x,
|
|
1299
1138
|
I,
|
|
1300
|
-
{ x, y: g }
|
|
1139
|
+
{ x: p, y: g }
|
|
1301
1140
|
);
|
|
1302
|
-
r.push(..._.slice(1)), s = null, o =
|
|
1141
|
+
r.push(..._.slice(1)), s = null, o = p, i = g;
|
|
1303
1142
|
break;
|
|
1304
1143
|
}
|
|
1305
1144
|
case "Z":
|
|
@@ -1314,7 +1153,7 @@ function In(t) {
|
|
|
1314
1153
|
}
|
|
1315
1154
|
return r.length > 0 && e.push(r), e;
|
|
1316
1155
|
}
|
|
1317
|
-
function
|
|
1156
|
+
function He(t) {
|
|
1318
1157
|
const n = t.match(
|
|
1319
1158
|
/^\s*M\s*(-?\d*\.?\d+(?:e[-+]?\d+)?)[\s,]+(-?\d*\.?\d+(?:e[-+]?\d+)?)/i
|
|
1320
1159
|
);
|
|
@@ -1322,125 +1161,670 @@ function Je(t) {
|
|
|
1322
1161
|
const e = Number(n[1]), r = Number(n[2]);
|
|
1323
1162
|
return Number.isFinite(e) && Number.isFinite(r) ? { x: e, y: r } : null;
|
|
1324
1163
|
}
|
|
1325
|
-
function
|
|
1164
|
+
function Ue(t) {
|
|
1326
1165
|
var o, i;
|
|
1327
1166
|
const n = (o = t.paths[0]) == null ? void 0 : o.d;
|
|
1328
1167
|
if (!n || t.polygons.length === 0) return !1;
|
|
1329
|
-
const e =
|
|
1168
|
+
const e = He(n), r = (i = t.polygons[0]) == null ? void 0 : i[0];
|
|
1330
1169
|
return !e || !r ? !1 : Math.abs(e.x - r.x) > 0.01 || Math.abs(e.y - r.y) > 0.01;
|
|
1331
1170
|
}
|
|
1332
|
-
function
|
|
1333
|
-
if (!
|
|
1334
|
-
const n = t.paths.flatMap((e) =>
|
|
1171
|
+
function In(t) {
|
|
1172
|
+
if (!Ue(t)) return t;
|
|
1173
|
+
const n = t.paths.flatMap((e) => bn(e.d));
|
|
1335
1174
|
return n.length === 0 ? t : { paths: t.paths, polygons: n };
|
|
1336
1175
|
}
|
|
1337
|
-
function
|
|
1176
|
+
function Ve(t) {
|
|
1338
1177
|
const n = t.map((r) => ({
|
|
1339
1178
|
d: r,
|
|
1340
1179
|
closed: /z/i.test(r)
|
|
1341
|
-
})), e = t.flatMap((r) =>
|
|
1180
|
+
})), e = t.flatMap((r) => bn(r));
|
|
1342
1181
|
return { paths: n, polygons: e };
|
|
1343
1182
|
}
|
|
1344
|
-
function
|
|
1183
|
+
function Tt(t) {
|
|
1345
1184
|
const n = t.polygons.flat();
|
|
1346
|
-
return
|
|
1185
|
+
return Ye(n);
|
|
1347
1186
|
}
|
|
1348
|
-
function
|
|
1349
|
-
return
|
|
1187
|
+
function We(t) {
|
|
1188
|
+
return $e(t.polygons.flat());
|
|
1350
1189
|
}
|
|
1351
|
-
function
|
|
1190
|
+
function ui(t, n, e = 0, r = [15, 45, 90]) {
|
|
1352
1191
|
const o = n.x - t.x, i = n.y - t.y, c = Math.hypot(o, i);
|
|
1353
1192
|
if (c === 0) return { ...n };
|
|
1354
1193
|
const s = Math.atan2(i, o) * 180 / Math.PI - e;
|
|
1355
1194
|
let h = s, y = 1 / 0;
|
|
1356
|
-
for (const
|
|
1357
|
-
const
|
|
1358
|
-
d < y && (y = d, h =
|
|
1195
|
+
for (const b of r) {
|
|
1196
|
+
const l = Math.round(s / b) * b, d = Math.abs(s - l);
|
|
1197
|
+
d < y && (y = d, h = l);
|
|
1359
1198
|
}
|
|
1360
|
-
const
|
|
1199
|
+
const u = (h + e) * Math.PI / 180;
|
|
1361
1200
|
return {
|
|
1362
|
-
x: t.x + Math.cos(
|
|
1363
|
-
y: t.y + Math.sin(
|
|
1201
|
+
x: t.x + Math.cos(u) * c,
|
|
1202
|
+
y: t.y + Math.sin(u) * c
|
|
1364
1203
|
};
|
|
1365
1204
|
}
|
|
1366
|
-
function
|
|
1205
|
+
function fi(t, n) {
|
|
1367
1206
|
return Math.atan2(n.y - t.y, n.x - t.x) * 180 / Math.PI;
|
|
1368
1207
|
}
|
|
1369
|
-
function
|
|
1208
|
+
function Ze(t) {
|
|
1370
1209
|
if (!t) return null;
|
|
1371
1210
|
const n = t.trim().split(/[\s,]+/).map(Number);
|
|
1372
1211
|
return n.length !== 4 || n.some((e) => Number.isNaN(e)) ? null : { x: n[0], y: n[1], width: n[2], height: n[3] };
|
|
1373
1212
|
}
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
"fill-opacity": "fill-opacity",
|
|
1377
|
-
stroke: "stroke",
|
|
1378
|
-
"stroke-width": "stroke-width",
|
|
1379
|
-
"stroke-opacity": "stroke-opacity",
|
|
1380
|
-
opacity: "opacity"
|
|
1381
|
-
};
|
|
1382
|
-
function ir(t) {
|
|
1383
|
-
const n = {};
|
|
1384
|
-
for (const e of t.split(";")) {
|
|
1385
|
-
const r = e.indexOf(":");
|
|
1386
|
-
if (r === -1) continue;
|
|
1387
|
-
const o = e.slice(0, r).trim().toLowerCase(), i = e.slice(r + 1).trim();
|
|
1388
|
-
o && i && (n[o] = i);
|
|
1389
|
-
}
|
|
1390
|
-
return n;
|
|
1213
|
+
function z(t, n, e) {
|
|
1214
|
+
return { x: t.x + (n.x - t.x) * e, y: t.y + (n.y - t.y) * e };
|
|
1391
1215
|
}
|
|
1392
|
-
function
|
|
1393
|
-
|
|
1394
|
-
for (const r of e.matchAll(/([^{]+)\{([^}]*)\}/g)) {
|
|
1395
|
-
const o = r[1].split(",").map((c) => c.trim()), i = ir(r[2]);
|
|
1396
|
-
for (const c of o) {
|
|
1397
|
-
const a = c.match(/^\.([a-zA-Z0-9_-]+)$/);
|
|
1398
|
-
if (!a) continue;
|
|
1399
|
-
const s = a[1];
|
|
1400
|
-
n.set(s, {
|
|
1401
|
-
...n.get(s) || {},
|
|
1402
|
-
...i
|
|
1403
|
-
});
|
|
1404
|
-
}
|
|
1405
|
-
}
|
|
1406
|
-
return n;
|
|
1216
|
+
function tt(t, n) {
|
|
1217
|
+
return { x: t.x + n.x, y: t.y + n.y };
|
|
1407
1218
|
}
|
|
1408
|
-
function
|
|
1409
|
-
|
|
1410
|
-
for (const r of t.split(/\s+/).map((o) => o.trim()).filter(Boolean))
|
|
1411
|
-
Object.assign(e, n.get(r) || {});
|
|
1412
|
-
return e;
|
|
1219
|
+
function Zt(t, n) {
|
|
1220
|
+
return { x: t.x - n.x, y: t.y - n.y };
|
|
1413
1221
|
}
|
|
1414
|
-
function
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1222
|
+
function gt(t, n) {
|
|
1223
|
+
return { x: t.x * n, y: t.y * n };
|
|
1224
|
+
}
|
|
1225
|
+
function q(t) {
|
|
1226
|
+
const n = t == null ? void 0 : t.curve;
|
|
1227
|
+
if (!(n != null && n.c1) || !(n != null && n.c2)) return null;
|
|
1228
|
+
const e = Number(n.c1.x), r = Number(n.c1.y), o = Number(n.c2.x), i = Number(n.c2.y);
|
|
1229
|
+
return [e, r, o, i].every((c) => Number.isFinite(c)) ? {
|
|
1230
|
+
c1: { x: e, y: r },
|
|
1231
|
+
c2: { x: o, y: i }
|
|
1232
|
+
} : null;
|
|
1233
|
+
}
|
|
1234
|
+
function di(t) {
|
|
1235
|
+
const n = q(t);
|
|
1236
|
+
return n || ([t == null ? void 0 : t.c1_x, t == null ? void 0 : t.c1_y, t == null ? void 0 : t.c2_x, t == null ? void 0 : t.c2_y].some(
|
|
1237
|
+
(r) => r == null || !Number.isFinite(Number(r))
|
|
1238
|
+
) ? null : {
|
|
1239
|
+
c1: { x: Number(t.c1_x), y: Number(t.c1_y) },
|
|
1240
|
+
c2: { x: Number(t.c2_x), y: Number(t.c2_y) }
|
|
1241
|
+
});
|
|
1242
|
+
}
|
|
1243
|
+
function je(t) {
|
|
1244
|
+
return {
|
|
1245
|
+
c1: { x: t.c2.x, y: t.c2.y },
|
|
1246
|
+
c2: { x: t.c1.x, y: t.c1.y }
|
|
1247
|
+
};
|
|
1248
|
+
}
|
|
1249
|
+
function hi(t, n, e) {
|
|
1250
|
+
const r = z(t, n, 0.5), o = gt(Zt(e, r), 4 / 3), i = Zt(n, t);
|
|
1251
|
+
return {
|
|
1252
|
+
c1: tt(tt(t, gt(i, 1 / 3)), o),
|
|
1253
|
+
c2: tt(tt(t, gt(i, 2 / 3)), o)
|
|
1254
|
+
};
|
|
1255
|
+
}
|
|
1256
|
+
function yi(t, n, e) {
|
|
1257
|
+
return n === 1 ? { ...t, c1: { x: e.x, y: e.y } } : { ...t, c2: { x: e.x, y: e.y } };
|
|
1258
|
+
}
|
|
1259
|
+
function mi(t, n, e) {
|
|
1260
|
+
const r = q(t);
|
|
1261
|
+
if (!r) return null;
|
|
1262
|
+
const o = t.fromAnchorId === n, i = t.toAnchorId === n;
|
|
1263
|
+
return !o && !i ? null : {
|
|
1264
|
+
c1: o ? { x: r.c1.x + e.x, y: r.c1.y + e.y } : { x: r.c1.x, y: r.c1.y },
|
|
1265
|
+
c2: i ? { x: r.c2.x + e.x, y: r.c2.y + e.y } : { x: r.c2.x, y: r.c2.y }
|
|
1266
|
+
};
|
|
1267
|
+
}
|
|
1268
|
+
function pi(t, n, e) {
|
|
1269
|
+
const r = q(t);
|
|
1270
|
+
if (!r) return null;
|
|
1271
|
+
const o = n.get(t.fromAnchorId), i = n.get(t.toAnchorId), c = e.get(t.fromAnchorId), a = e.get(t.toAnchorId);
|
|
1272
|
+
return !o || !i || !c || !a ? r : {
|
|
1273
|
+
c1: {
|
|
1274
|
+
x: r.c1.x + c.x - o.x,
|
|
1275
|
+
y: r.c1.y + c.y - o.y
|
|
1276
|
+
},
|
|
1277
|
+
c2: {
|
|
1278
|
+
x: r.c2.x + a.x - i.x,
|
|
1279
|
+
y: r.c2.y + a.y - i.y
|
|
1280
|
+
}
|
|
1281
|
+
};
|
|
1282
|
+
}
|
|
1283
|
+
function xi(t, n, e) {
|
|
1284
|
+
return e ? `M ${t.x} ${t.y} C ${e.c1.x} ${e.c1.y} ${e.c2.x} ${e.c2.y} ${n.x} ${n.y}` : `M ${t.x} ${t.y} L ${n.x} ${n.y}`;
|
|
1285
|
+
}
|
|
1286
|
+
function gn(t, n, e) {
|
|
1287
|
+
if (!e) return v(t, n);
|
|
1288
|
+
const r = lt(t, e.c1, e.c2, n, 16);
|
|
1289
|
+
let o = 0;
|
|
1290
|
+
for (let i = 1; i < r.length; i += 1)
|
|
1291
|
+
o += v(r[i - 1], r[i]);
|
|
1292
|
+
return o;
|
|
1293
|
+
}
|
|
1294
|
+
function qe(t, n, e, r) {
|
|
1295
|
+
if (!r) return at(t, n, e);
|
|
1296
|
+
const o = lt(n, r.c1, r.c2, e, 24), i = Math.max(o.length - 1, 1);
|
|
1297
|
+
let c = {
|
|
1298
|
+
point: { x: n.x, y: n.y },
|
|
1299
|
+
t: 0,
|
|
1300
|
+
distance: v(t, n)
|
|
1301
|
+
};
|
|
1302
|
+
for (let a = 1; a < o.length; a += 1) {
|
|
1303
|
+
const s = at(t, o[a - 1], o[a]);
|
|
1304
|
+
s.distance < c.distance && (c = {
|
|
1305
|
+
point: s.point,
|
|
1306
|
+
t: (a - 1 + s.t) / i,
|
|
1307
|
+
distance: s.distance
|
|
1308
|
+
});
|
|
1309
|
+
}
|
|
1310
|
+
return c;
|
|
1311
|
+
}
|
|
1312
|
+
function Qe(t, n, e, r, o) {
|
|
1313
|
+
const i = z(t, n, o), c = z(n, e, o), a = z(e, r, o), s = z(i, c, o), h = z(c, a, o), y = z(s, h, o);
|
|
1314
|
+
return {
|
|
1315
|
+
left: { c1: i, c2: s },
|
|
1316
|
+
right: { c1: h, c2: a },
|
|
1317
|
+
point: y
|
|
1318
|
+
};
|
|
1319
|
+
}
|
|
1320
|
+
function bi(t, n, e, r) {
|
|
1321
|
+
if (!e)
|
|
1322
|
+
return { point: at(r, t, n).point, left: null, right: null };
|
|
1323
|
+
const o = qe(r, t, n, e), i = Math.min(1, Math.max(0, o.t)), c = Qe(t, e.c1, e.c2, n, i);
|
|
1324
|
+
return { point: c.point, left: c.left, right: c.right };
|
|
1325
|
+
}
|
|
1326
|
+
function Je(t, n, e) {
|
|
1327
|
+
const r = t.connectorId ?? n.connectorId;
|
|
1328
|
+
return r == null ? void 0 : e.get(r);
|
|
1329
|
+
}
|
|
1330
|
+
function tr(t, n, e, r) {
|
|
1331
|
+
var o;
|
|
1332
|
+
return n.levelId === e.levelId ? !0 : t.kind !== "connector" ? !1 : Gn(
|
|
1333
|
+
(o = Je(n, e, r)) == null ? void 0 : o.kind
|
|
1334
|
+
);
|
|
1335
|
+
}
|
|
1336
|
+
function nr(t, n, e = []) {
|
|
1337
|
+
const r = Nn(), o = new Map(t.map((s) => [s.id, s])), i = new Map(e.map((s) => [s.id, s])), c = t.map((s) => ({
|
|
1338
|
+
id: s.id,
|
|
1339
|
+
levelId: s.levelId,
|
|
1340
|
+
x: s.x,
|
|
1341
|
+
y: s.y,
|
|
1342
|
+
kind: s.kind,
|
|
1343
|
+
shapeId: s.shapeId,
|
|
1344
|
+
connectorId: s.connectorId
|
|
1345
|
+
}));
|
|
1346
|
+
for (const s of c)
|
|
1347
|
+
r.addNode(s.id, s);
|
|
1348
|
+
const a = [];
|
|
1349
|
+
for (const s of n) {
|
|
1350
|
+
const h = o.get(s.fromAnchorId), y = o.get(s.toAnchorId);
|
|
1351
|
+
if (!h || !y || !tr(s, h, y, i)) continue;
|
|
1352
|
+
const u = q(s);
|
|
1353
|
+
let b = s.weight;
|
|
1354
|
+
b == null && (b = gn(h, y, u), h.levelId !== y.levelId && (b += Ct));
|
|
1355
|
+
let l = s.accessible;
|
|
1356
|
+
if (s.kind === "connector" && h.connectorId != null) {
|
|
1357
|
+
const f = i.get(h.connectorId);
|
|
1358
|
+
f && (l = f.accessible);
|
|
1359
|
+
}
|
|
1360
|
+
const d = {
|
|
1361
|
+
id: s.id,
|
|
1362
|
+
from: s.fromAnchorId,
|
|
1363
|
+
to: s.toAnchorId,
|
|
1364
|
+
weight: b,
|
|
1365
|
+
directed: s.directed,
|
|
1366
|
+
accessible: l,
|
|
1367
|
+
kind: s.kind,
|
|
1368
|
+
curve: u
|
|
1369
|
+
};
|
|
1370
|
+
a.push(d), r.addLink(s.fromAnchorId, s.toAnchorId, d), s.directed || r.addLink(s.toAnchorId, s.fromAnchorId, d);
|
|
1371
|
+
}
|
|
1372
|
+
return { graph: r, nodes: c, edges: a, anchorById: o };
|
|
1373
|
+
}
|
|
1374
|
+
function er(t, n, e, r = {}) {
|
|
1375
|
+
const { graph: o, anchorById: i } = t;
|
|
1376
|
+
if (!i.has(n) || !i.has(e))
|
|
1377
|
+
return null;
|
|
1378
|
+
const a = Ln.nba(o, {
|
|
1379
|
+
oriented: !0,
|
|
1380
|
+
distance(d, f, m) {
|
|
1381
|
+
const x = m.data;
|
|
1382
|
+
return r.accessibleOnly && x && !x.accessible ? Number.POSITIVE_INFINITY : (x == null ? void 0 : x.weight) ?? 1;
|
|
1383
|
+
},
|
|
1384
|
+
heuristic(d, f) {
|
|
1385
|
+
const m = i.get(d.id), x = i.get(f.id);
|
|
1386
|
+
if (!m || !x) return 0;
|
|
1387
|
+
let I = v(m, x);
|
|
1388
|
+
return m.levelId !== x.levelId && (I += Ct), I;
|
|
1389
|
+
}
|
|
1390
|
+
}).find(n, e);
|
|
1391
|
+
if (!a || a.length === 0) return null;
|
|
1392
|
+
const h = a.reverse().map((d) => d.id), y = [], u = [], b = [];
|
|
1393
|
+
let l = 0;
|
|
1394
|
+
for (let d = 0; d < h.length; d++) {
|
|
1395
|
+
const f = i.get(h[d]);
|
|
1396
|
+
if (y.push({ x: f.x, y: f.y, levelId: f.levelId }), d > 0) {
|
|
1397
|
+
const m = h[d - 1], x = i.get(m), I = rr(t, m, h[d]);
|
|
1398
|
+
u.push(I), l += gn(x, f, I), x.levelId !== f.levelId && (l += Ct, b.push({
|
|
1399
|
+
fromLevelId: x.levelId,
|
|
1400
|
+
toLevelId: f.levelId,
|
|
1401
|
+
connectorId: f.connectorId ?? x.connectorId
|
|
1402
|
+
}));
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
return { anchorIds: h, points: y, curves: u, totalWeight: l, levelChanges: b };
|
|
1406
|
+
}
|
|
1407
|
+
function rr(t, n, e) {
|
|
1408
|
+
const r = t.edges.find(
|
|
1409
|
+
(i) => i.from === n && i.to === e || !i.directed && i.from === e && i.to === n
|
|
1410
|
+
), o = q(r);
|
|
1411
|
+
return !o || !r ? null : r.from === n ? o : je(o);
|
|
1412
|
+
}
|
|
1413
|
+
function Et(t) {
|
|
1414
|
+
const n = /* @__PURE__ */ new Set(), e = [];
|
|
1415
|
+
for (const r of t)
|
|
1416
|
+
!Number.isFinite(r) || n.has(r) || (n.add(r), e.push(r));
|
|
1417
|
+
return e;
|
|
1418
|
+
}
|
|
1419
|
+
function Ii(t, n) {
|
|
1420
|
+
return t.filter((e) => e.shapeId === n).map((e) => e.id);
|
|
1421
|
+
}
|
|
1422
|
+
function or(t, n) {
|
|
1423
|
+
const e = [];
|
|
1424
|
+
for (const r of t) {
|
|
1425
|
+
const o = /* @__PURE__ */ new Set();
|
|
1426
|
+
for (const i of r.shapes)
|
|
1427
|
+
n(i) && o.add(i.id);
|
|
1428
|
+
if (o.size !== 0)
|
|
1429
|
+
for (const i of r.anchors)
|
|
1430
|
+
i.shapeId != null && o.has(i.shapeId) && e.push(i.id);
|
|
1431
|
+
}
|
|
1432
|
+
return e;
|
|
1433
|
+
}
|
|
1434
|
+
function ir(t, n) {
|
|
1435
|
+
const e = t.anchorById.get(n);
|
|
1436
|
+
if (!e) return [];
|
|
1437
|
+
if (e.shapeId == null) return [n];
|
|
1438
|
+
const r = t.nodes.filter((o) => o.shapeId === e.shapeId).map((o) => o.id);
|
|
1439
|
+
return r.length > 0 ? r : [n];
|
|
1440
|
+
}
|
|
1441
|
+
function jt(t, n) {
|
|
1442
|
+
const e = /* @__PURE__ */ new Set();
|
|
1443
|
+
for (const r of Et(n))
|
|
1444
|
+
for (const o of ir(t, r))
|
|
1445
|
+
e.add(o);
|
|
1446
|
+
return [...e];
|
|
1447
|
+
}
|
|
1448
|
+
function sr(t, n, e, r = {}) {
|
|
1449
|
+
const o = Et(n), i = Et(e);
|
|
1450
|
+
if (o.length === 0 || i.length === 0) return null;
|
|
1451
|
+
let c = null;
|
|
1452
|
+
for (const a of o)
|
|
1453
|
+
for (const s of i) {
|
|
1454
|
+
const h = er(t, a, s, r);
|
|
1455
|
+
h && (!c || h.totalWeight < c.totalWeight) && (c = h);
|
|
1456
|
+
}
|
|
1457
|
+
return c;
|
|
1458
|
+
}
|
|
1459
|
+
function cr(t, n, e, r = {}) {
|
|
1460
|
+
return sr(
|
|
1461
|
+
t,
|
|
1462
|
+
jt(t, n),
|
|
1463
|
+
jt(t, e),
|
|
1464
|
+
r
|
|
1465
|
+
);
|
|
1466
|
+
}
|
|
1467
|
+
function ar(t, n, e, r = {}) {
|
|
1468
|
+
return cr(
|
|
1469
|
+
t,
|
|
1470
|
+
[n],
|
|
1471
|
+
e,
|
|
1472
|
+
r
|
|
1473
|
+
);
|
|
1474
|
+
}
|
|
1475
|
+
function k(t) {
|
|
1476
|
+
if (typeof t != "string") return null;
|
|
1477
|
+
const n = t.trim();
|
|
1478
|
+
return n || null;
|
|
1479
|
+
}
|
|
1480
|
+
function nt(t) {
|
|
1481
|
+
const n = typeof t == "number" ? t : Number(t);
|
|
1482
|
+
return Number.isFinite(n) && n > 0 ? n : null;
|
|
1483
|
+
}
|
|
1484
|
+
function et(t) {
|
|
1485
|
+
return !t || typeof t != "object" ? null : k(t.url);
|
|
1486
|
+
}
|
|
1487
|
+
function gi(t, n) {
|
|
1488
|
+
var r;
|
|
1489
|
+
const e = pn(t);
|
|
1490
|
+
return !n || !e.storeModal && !e.sidebar ? !1 : n.kind === "unit" ? ((r = n.assignment) == null ? void 0 : r.retailerId) != null : n.kind === "amenity" ? M(n.assignment) : !1;
|
|
1491
|
+
}
|
|
1492
|
+
function lr(t, n) {
|
|
1493
|
+
for (const e of t.levels) {
|
|
1494
|
+
const r = e.shapes.find((o) => o.id === n);
|
|
1495
|
+
if (r) return { level: e, shape: r };
|
|
1496
|
+
}
|
|
1497
|
+
return null;
|
|
1498
|
+
}
|
|
1499
|
+
function ur(t, n) {
|
|
1500
|
+
var r, o, i, c;
|
|
1501
|
+
const e = ((r = t.assignment) == null ? void 0 : r.amenityId) != null ? n == null ? void 0 : n.find((a) => a.id === t.assignment.amenityId) : void 0;
|
|
1502
|
+
return k((o = t.assignment) == null ? void 0 : o.customLabel) || k(e == null ? void 0 : e.name) || k((i = t.label) == null ? void 0 : i.text) || k((c = t.assignment) == null ? void 0 : c.unitNumber) || t.key;
|
|
1503
|
+
}
|
|
1504
|
+
function _i(t, n) {
|
|
1505
|
+
var i, c;
|
|
1506
|
+
const e = lr(t, n);
|
|
1507
|
+
if (!e) return null;
|
|
1508
|
+
const r = e.shape.kind === "amenity" ? "amenity" : "store", o = e.level.anchors.find((a) => a.shapeId === n);
|
|
1509
|
+
return {
|
|
1510
|
+
shapeId: n,
|
|
1511
|
+
levelId: e.level.id,
|
|
1512
|
+
anchorId: (o == null ? void 0 : o.id) ?? null,
|
|
1513
|
+
kind: r,
|
|
1514
|
+
retailerId: ((i = e.shape.assignment) == null ? void 0 : i.retailerId) ?? null,
|
|
1515
|
+
amenityId: ((c = e.shape.assignment) == null ? void 0 : c.amenityId) ?? null,
|
|
1516
|
+
name: ur(e.shape, t.amenities),
|
|
1517
|
+
isExterior: X(e.level)
|
|
1518
|
+
};
|
|
1519
|
+
}
|
|
1520
|
+
const _n = "Directions are unavailable for this location.";
|
|
1521
|
+
function fr(t) {
|
|
1522
|
+
return t ? t.isExterior || t.anchorId == null : !0;
|
|
1523
|
+
}
|
|
1524
|
+
function ki(t, n) {
|
|
1525
|
+
const e = fr(n), r = t !== "DISPLAY_APP";
|
|
1526
|
+
return {
|
|
1527
|
+
showFromRetailers: r && !e,
|
|
1528
|
+
showMapIt: r,
|
|
1529
|
+
mapItDisabled: e,
|
|
1530
|
+
mapItTooltip: r && e ? _n : null
|
|
1531
|
+
};
|
|
1532
|
+
}
|
|
1533
|
+
function dr(t) {
|
|
1534
|
+
const n = /* @__PURE__ */ new Map();
|
|
1535
|
+
for (const e of t ?? [])
|
|
1536
|
+
(e == null ? void 0 : e.id) != null && n.set(e.id, e);
|
|
1537
|
+
return n;
|
|
1538
|
+
}
|
|
1539
|
+
function hr(t, n) {
|
|
1540
|
+
var e, r;
|
|
1541
|
+
return k(t == null ? void 0 : t.logoUrl) || k(t == null ? void 0 : t.logoKey) || k((e = n.label) == null ? void 0 : e.imageKey) || k((r = n.assignment) == null ? void 0 : r.customImageKey);
|
|
1542
|
+
}
|
|
1543
|
+
function Oi(t, n) {
|
|
1544
|
+
var c, a, s, h;
|
|
1545
|
+
const e = dr(n ?? t.retailers), r = /* @__PURE__ */ new Map();
|
|
1546
|
+
for (const y of e.values())
|
|
1547
|
+
y.globalRetailerId != null && r.set(y.globalRetailerId, (r.get(y.globalRetailerId) ?? 0) + 1);
|
|
1548
|
+
const o = /* @__PURE__ */ new Map();
|
|
1549
|
+
for (const y of t.levels)
|
|
1550
|
+
for (const u of y.shapes) {
|
|
1551
|
+
const b = (c = u.assignment) == null ? void 0 : c.retailerId;
|
|
1552
|
+
if (b == null || u.kind !== "unit") continue;
|
|
1553
|
+
const l = e.get(b), d = y.anchors.find((x) => x.shapeId === u.id), f = {
|
|
1554
|
+
id: b,
|
|
1555
|
+
name: k(l == null ? void 0 : l.name) || k((a = u.label) == null ? void 0 : a.text) || k((s = u.assignment) == null ? void 0 : s.customLabel) || `Store ${b}`,
|
|
1556
|
+
location: k(l == null ? void 0 : l.location) || k((h = u.assignment) == null ? void 0 : h.unitNumber),
|
|
1557
|
+
phone: k(l == null ? void 0 : l.phone),
|
|
1558
|
+
description: k(l == null ? void 0 : l.description),
|
|
1559
|
+
logoUrl: hr(l, u),
|
|
1560
|
+
globalRetailerId: (l == null ? void 0 : l.globalRetailerId) ?? null,
|
|
1561
|
+
slug: k(l == null ? void 0 : l.slug),
|
|
1562
|
+
multipleLocations: (l == null ? void 0 : l.globalRetailerId) != null && (r.get(l.globalRetailerId) ?? 0) > 1,
|
|
1563
|
+
shapeId: u.id,
|
|
1564
|
+
levelId: y.id,
|
|
1565
|
+
levelName: y.name,
|
|
1566
|
+
anchorId: (d == null ? void 0 : d.id) ?? null
|
|
1567
|
+
}, m = o.get(b);
|
|
1568
|
+
(!m || m.anchorId == null && f.anchorId != null) && o.set(b, f);
|
|
1569
|
+
}
|
|
1570
|
+
return Array.from(o.values()).sort((y, u) => y.name.localeCompare(u.name));
|
|
1571
|
+
}
|
|
1572
|
+
function Si(t, n) {
|
|
1573
|
+
const e = /* @__PURE__ */ new Map();
|
|
1574
|
+
for (const r of t)
|
|
1575
|
+
r.globalRetailerId != null && e.set(r.globalRetailerId, (e.get(r.globalRetailerId) ?? 0) + 1);
|
|
1576
|
+
return t.filter((r) => r.id !== n && r.anchorId != null).map((r) => {
|
|
1577
|
+
const o = r.globalRetailerId != null && (e.get(r.globalRetailerId) ?? 0) > 1 && r.location;
|
|
1578
|
+
return {
|
|
1579
|
+
value: String(r.id),
|
|
1580
|
+
label: o ? `${r.name} (${r.location})` : r.name
|
|
1581
|
+
};
|
|
1582
|
+
});
|
|
1583
|
+
}
|
|
1584
|
+
function Ai(t, n) {
|
|
1585
|
+
return (t == null ? void 0 : t.anchorId) == null || (n == null ? void 0 : n.anchorId) == null ? null : {
|
|
1586
|
+
fromAnchorId: t.anchorId,
|
|
1587
|
+
toAnchorId: n.anchorId,
|
|
1588
|
+
toLevelId: n.levelId
|
|
1589
|
+
};
|
|
1590
|
+
}
|
|
1591
|
+
function Ri(t, n) {
|
|
1592
|
+
const e = n.trim().toLowerCase();
|
|
1593
|
+
return e ? t.filter(
|
|
1594
|
+
(r) => {
|
|
1595
|
+
var o;
|
|
1596
|
+
return r.name.toLowerCase().includes(e) || (((o = r.location) == null ? void 0 : o.toLowerCase().includes(e)) ?? !1);
|
|
1597
|
+
}
|
|
1598
|
+
) : [];
|
|
1599
|
+
}
|
|
1600
|
+
function Ci(t, n) {
|
|
1601
|
+
var o;
|
|
1602
|
+
const e = t.amenities.find((i) => i.id === n);
|
|
1603
|
+
if (!e) return null;
|
|
1604
|
+
const r = [];
|
|
1605
|
+
for (const i of t.levels)
|
|
1606
|
+
for (const c of i.shapes) {
|
|
1607
|
+
if (c.kind !== "amenity" || ((o = c.assignment) == null ? void 0 : o.amenityId) !== n) continue;
|
|
1608
|
+
const a = i.anchors.find((s) => s.shapeId === c.id);
|
|
1609
|
+
r.push({
|
|
1610
|
+
levelId: i.id,
|
|
1611
|
+
name: i.name,
|
|
1612
|
+
shapeId: c.id,
|
|
1613
|
+
anchorId: (a == null ? void 0 : a.id) ?? null
|
|
1614
|
+
});
|
|
1615
|
+
}
|
|
1616
|
+
return {
|
|
1617
|
+
amenityId: n,
|
|
1618
|
+
name: e.name,
|
|
1619
|
+
code: e.code,
|
|
1620
|
+
floors: r
|
|
1621
|
+
};
|
|
1622
|
+
}
|
|
1623
|
+
function Ei(t, n) {
|
|
1624
|
+
return n ? n.floors.some((e) => {
|
|
1625
|
+
if (e.anchorId == null) return !1;
|
|
1626
|
+
const r = t.levels.find((o) => o.id === e.levelId);
|
|
1627
|
+
return r != null && !X(r);
|
|
1628
|
+
}) : !1;
|
|
1629
|
+
}
|
|
1630
|
+
function Ni(t) {
|
|
1631
|
+
return {
|
|
1632
|
+
showFromRetailers: t,
|
|
1633
|
+
showMapIt: !0,
|
|
1634
|
+
mapItDisabled: !t,
|
|
1635
|
+
mapItTooltip: t ? null : _n
|
|
1636
|
+
};
|
|
1637
|
+
}
|
|
1638
|
+
function Li(t, n) {
|
|
1639
|
+
return or(
|
|
1640
|
+
t.levels,
|
|
1641
|
+
(e) => {
|
|
1642
|
+
var r;
|
|
1643
|
+
return e.kind === "amenity" && ((r = e.assignment) == null ? void 0 : r.amenityId) === n;
|
|
1644
|
+
}
|
|
1645
|
+
);
|
|
1646
|
+
}
|
|
1647
|
+
function vi(t, n, e, r) {
|
|
1648
|
+
if (n == null || e.length === 0) return null;
|
|
1649
|
+
const o = ar(
|
|
1650
|
+
t,
|
|
1651
|
+
n,
|
|
1652
|
+
[...e],
|
|
1653
|
+
r
|
|
1654
|
+
), i = o == null ? void 0 : o.anchorIds.at(-1);
|
|
1655
|
+
return i == null ? null : { fromAnchorId: n, toAnchorId: i };
|
|
1656
|
+
}
|
|
1657
|
+
function Mi(t) {
|
|
1658
|
+
const n = t.replace(/\D/g, "").slice(-10);
|
|
1659
|
+
return n.length === 10 ? `${n.slice(0, 3)}.${n.slice(3, 6)}.${n.slice(-4)}` : t;
|
|
1660
|
+
}
|
|
1661
|
+
function Ti(t) {
|
|
1662
|
+
if (!t || typeof t != "object") return null;
|
|
1663
|
+
const n = t, e = n.global_retailer && typeof n.global_retailer == "object" ? n.global_retailer : null, r = nt(n.id);
|
|
1664
|
+
if (r == null) return null;
|
|
1665
|
+
const o = k(e == null ? void 0 : e.name) || k(n.name) || `Retailer ${r}`;
|
|
1666
|
+
return {
|
|
1667
|
+
id: r,
|
|
1668
|
+
name: o,
|
|
1669
|
+
location: k(n.location),
|
|
1670
|
+
phone: k(n.retailer_phone) || k(n.phone),
|
|
1671
|
+
description: k(e == null ? void 0 : e.description) || k(n.description) || k(n.local_description),
|
|
1672
|
+
logoUrl: et(e == null ? void 0 : e.media) || et(e == null ? void 0 : e.featured_image) || et(n.media) || et(n.featured_image) || k(n.logoUrl) || k(n.logo),
|
|
1673
|
+
logoKey: k(n.logoKey),
|
|
1674
|
+
globalRetailerId: nt(e == null ? void 0 : e.id) || nt(n.global_retailer_id) || nt(n.globalRetailerId),
|
|
1675
|
+
slug: k(e == null ? void 0 : e.slug) || k(n.slug)
|
|
1676
|
+
};
|
|
1677
|
+
}
|
|
1678
|
+
function wi(t, n, e = !1) {
|
|
1679
|
+
var c;
|
|
1680
|
+
const r = (c = t.slug) == null ? void 0 : c.trim(), o = n == null ? void 0 : n.trim();
|
|
1681
|
+
if (!r || !o) return null;
|
|
1682
|
+
const i = `${o.replace(/\/+$/, "")}/${encodeURIComponent(r)}`;
|
|
1683
|
+
return e && t.multipleLocations ? `${i}/${t.id}` : i;
|
|
1684
|
+
}
|
|
1685
|
+
function kn(t) {
|
|
1686
|
+
return t === "WEBSITE" || t === "DISPLAY_APP";
|
|
1687
|
+
}
|
|
1688
|
+
function yr(t) {
|
|
1689
|
+
return t === "PORTAL_ASSIGN";
|
|
1690
|
+
}
|
|
1691
|
+
function mr(t) {
|
|
1692
|
+
return kn(t);
|
|
1693
|
+
}
|
|
1694
|
+
function Pi(t, n) {
|
|
1695
|
+
return mr(n) ? M(t.assignment) : !0;
|
|
1696
|
+
}
|
|
1697
|
+
function pr(t) {
|
|
1698
|
+
const n = (t.sourceSvgId ?? t.key ?? "").trim().toLowerCase().replace(/_/g, "-");
|
|
1699
|
+
return n === "escalator" || n.startsWith("escalator-") ? "escalator" : n === "elevator" || n.startsWith("elevator-") ? "elevator" : null;
|
|
1700
|
+
}
|
|
1701
|
+
function xr(t, n) {
|
|
1702
|
+
return pr(t) ? n.has(t.id) : t.kind === "amenity" || t.kind === "kiosk_screen" ? M(t.assignment) : !0;
|
|
1703
|
+
}
|
|
1704
|
+
function Fi(t, n, e) {
|
|
1705
|
+
return kn(n) ? xr(t, e) : !0;
|
|
1706
|
+
}
|
|
1707
|
+
const On = "#e2e8f0";
|
|
1708
|
+
function Di(t) {
|
|
1709
|
+
if (!t) return !1;
|
|
1710
|
+
const n = t.toLowerCase();
|
|
1711
|
+
return n === "amenity" || n.startsWith("amenity-");
|
|
1712
|
+
}
|
|
1713
|
+
function br(t) {
|
|
1714
|
+
var e;
|
|
1715
|
+
return ((e = t == null ? void 0 : t.GREEN_AREA_COLOR) == null ? void 0 : e.trim()) || U("green-area");
|
|
1716
|
+
}
|
|
1717
|
+
function Ir(t, n) {
|
|
1718
|
+
return t === "amenity" ? br(n) : On;
|
|
1719
|
+
}
|
|
1720
|
+
function gr(t, n, e, r) {
|
|
1721
|
+
if (t === "walkable") return n.WALKABLE_COLOR;
|
|
1722
|
+
if (Mt(t))
|
|
1723
|
+
return $t(r, Lt);
|
|
1724
|
+
if (t === "unit" || t === "custom")
|
|
1725
|
+
return $t(r, n.STORE_DEFAULT_COLOR);
|
|
1726
|
+
if (e) return e;
|
|
1727
|
+
switch (t) {
|
|
1728
|
+
case "wall":
|
|
1729
|
+
case "boundary":
|
|
1730
|
+
return n.WALL_COLOR;
|
|
1731
|
+
case "parking_zone":
|
|
1732
|
+
return n.PARKING_ZONE_COLOR;
|
|
1733
|
+
case "green_area":
|
|
1734
|
+
return n.GREEN_AREA_COLOR;
|
|
1735
|
+
case "water":
|
|
1736
|
+
return n.WATER_COLOR;
|
|
1737
|
+
case "floorplate":
|
|
1738
|
+
return n.BASE_COLOR;
|
|
1739
|
+
case "void":
|
|
1740
|
+
return "#00000000";
|
|
1741
|
+
default:
|
|
1742
|
+
return On;
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
function Ki(t, n, e, r, o) {
|
|
1746
|
+
const i = gr(t, n, r, o);
|
|
1747
|
+
return yr(e) && Mt(t) && W(i) ? Ir(t, n) : i;
|
|
1748
|
+
}
|
|
1749
|
+
function Yi(t, n) {
|
|
1750
|
+
return t === "amenity" ? 1 : n ?? 1;
|
|
1751
|
+
}
|
|
1752
|
+
function _r(t) {
|
|
1753
|
+
return /^https?:\/\//i.test(t.trim());
|
|
1754
|
+
}
|
|
1755
|
+
function $i(t, n) {
|
|
1756
|
+
return !n || !_r(t) ? t : n + encodeURIComponent(t);
|
|
1757
|
+
}
|
|
1758
|
+
const kr = {
|
|
1759
|
+
fill: "fill",
|
|
1760
|
+
"fill-opacity": "fill-opacity",
|
|
1761
|
+
stroke: "stroke",
|
|
1762
|
+
"stroke-width": "stroke-width",
|
|
1763
|
+
"stroke-opacity": "stroke-opacity",
|
|
1764
|
+
opacity: "opacity"
|
|
1765
|
+
};
|
|
1766
|
+
function Or(t) {
|
|
1767
|
+
const n = {};
|
|
1768
|
+
for (const e of t.split(";")) {
|
|
1769
|
+
const r = e.indexOf(":");
|
|
1770
|
+
if (r === -1) continue;
|
|
1771
|
+
const o = e.slice(0, r).trim().toLowerCase(), i = e.slice(r + 1).trim();
|
|
1772
|
+
o && i && (n[o] = i);
|
|
1773
|
+
}
|
|
1774
|
+
return n;
|
|
1775
|
+
}
|
|
1776
|
+
function Sr(t) {
|
|
1777
|
+
const n = /* @__PURE__ */ new Map(), e = t.replace(/\/\*[\s\S]*?\*\//g, "");
|
|
1778
|
+
for (const r of e.matchAll(/([^{]+)\{([^}]*)\}/g)) {
|
|
1779
|
+
const o = r[1].split(",").map((c) => c.trim()), i = Or(r[2]);
|
|
1780
|
+
for (const c of o) {
|
|
1781
|
+
const a = c.match(/^\.([a-zA-Z0-9_-]+)$/);
|
|
1782
|
+
if (!a) continue;
|
|
1783
|
+
const s = a[1];
|
|
1784
|
+
n.set(s, {
|
|
1785
|
+
...n.get(s) || {},
|
|
1786
|
+
...i
|
|
1787
|
+
});
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
return n;
|
|
1791
|
+
}
|
|
1792
|
+
function Ar(t, n) {
|
|
1793
|
+
const e = {};
|
|
1794
|
+
for (const r of t.split(/\s+/).map((o) => o.trim()).filter(Boolean))
|
|
1795
|
+
Object.assign(e, n.get(r) || {});
|
|
1796
|
+
return e;
|
|
1797
|
+
}
|
|
1798
|
+
function Rr(t) {
|
|
1799
|
+
const n = [], e = t.replace(/<!--[\s\S]*?-->/g, "");
|
|
1800
|
+
for (const o of e.matchAll(/<style\b[^>]*>([\s\S]*?)<\/style>/gi))
|
|
1801
|
+
n.push(o[1]);
|
|
1802
|
+
if (n.length === 0) return t;
|
|
1803
|
+
const r = /* @__PURE__ */ new Map();
|
|
1804
|
+
for (const o of n)
|
|
1805
|
+
for (const [i, c] of Sr(o))
|
|
1806
|
+
r.set(i, { ...r.get(i) || {}, ...c });
|
|
1807
|
+
return r.size === 0 ? t : t.replace(
|
|
1424
1808
|
/<(path|polygon|polyline|line|rect|g|circle|ellipse)\b([^>]*)>/gi,
|
|
1425
1809
|
(o, i, c) => {
|
|
1426
1810
|
const a = /\/\s*$/.test(c), s = c.replace(/\/\s*$/, ""), h = s.match(/\bclass\s*=\s*["']([^"']*)["']/i);
|
|
1427
1811
|
if (!h) return o;
|
|
1428
|
-
const y =
|
|
1429
|
-
let
|
|
1430
|
-
for (const [
|
|
1431
|
-
const d =
|
|
1432
|
-
d && (new RegExp(`\\b${d}\\s*=`, "i").test(
|
|
1812
|
+
const y = Ar(h[1], r);
|
|
1813
|
+
let u = s;
|
|
1814
|
+
for (const [b, l] of Object.entries(y)) {
|
|
1815
|
+
const d = kr[b];
|
|
1816
|
+
d && (new RegExp(`\\b${d}\\s*=`, "i").test(u) || (u += ` ${d}="${l}"`));
|
|
1433
1817
|
}
|
|
1434
|
-
return `<${i}${
|
|
1818
|
+
return `<${i}${u}${a ? " /" : ""}>`;
|
|
1435
1819
|
}
|
|
1436
1820
|
);
|
|
1437
1821
|
}
|
|
1438
|
-
function
|
|
1439
|
-
var a, s, h, y,
|
|
1440
|
-
const n = {}, e = (a = t.match(/\bfill\s*=\s*["']([^"']*)["']/i)) == null ? void 0 : a[1], r = (s = t.match(/\bstroke\s*=\s*["']([^"']*)["']/i)) == null ? void 0 : s[1], o = (h = t.match(/\bstroke-width\s*=\s*["']?(-?[\d.]+)/i)) == null ? void 0 : h[1], i = (y = t.match(/\bopacity\s*=\s*["']?(-?[\d.]+)/i)) == null ? void 0 : y[1], c = (
|
|
1822
|
+
function qt(t) {
|
|
1823
|
+
var a, s, h, y, u;
|
|
1824
|
+
const n = {}, e = (a = t.match(/\bfill\s*=\s*["']([^"']*)["']/i)) == null ? void 0 : a[1], r = (s = t.match(/\bstroke\s*=\s*["']([^"']*)["']/i)) == null ? void 0 : s[1], o = (h = t.match(/\bstroke-width\s*=\s*["']?(-?[\d.]+)/i)) == null ? void 0 : h[1], i = (y = t.match(/\bopacity\s*=\s*["']?(-?[\d.]+)/i)) == null ? void 0 : y[1], c = (u = t.match(/\bfill-opacity\s*=\s*["']?(-?[\d.]+)/i)) == null ? void 0 : u[1];
|
|
1441
1825
|
return e && e.toLowerCase() !== "none" && (n.fill = e), r && r.toLowerCase() !== "none" && (n.stroke = r), o != null && !Number.isNaN(Number(o)) && (n.strokeWidth = Number(o)), i != null && !Number.isNaN(Number(i)) ? n.opacity = Number(i) : c != null && !Number.isNaN(Number(c)) && (n.opacity = Number(c)), n;
|
|
1442
1826
|
}
|
|
1443
|
-
function
|
|
1827
|
+
function _t(t, n) {
|
|
1444
1828
|
return {
|
|
1445
1829
|
fill: n.fill ?? t.fill,
|
|
1446
1830
|
stroke: n.stroke ?? t.stroke,
|
|
@@ -1448,7 +1832,7 @@ function gt(t, n) {
|
|
|
1448
1832
|
opacity: n.opacity ?? t.opacity
|
|
1449
1833
|
};
|
|
1450
1834
|
}
|
|
1451
|
-
const
|
|
1835
|
+
const Nt = { a: 1, b: 0, c: 0, d: 1, e: 0, f: 0 };
|
|
1452
1836
|
function j(t, n) {
|
|
1453
1837
|
return {
|
|
1454
1838
|
a: t.a * n.a + t.c * n.b,
|
|
@@ -1459,28 +1843,28 @@ function j(t, n) {
|
|
|
1459
1843
|
f: t.b * n.e + t.d * n.f + t.f
|
|
1460
1844
|
};
|
|
1461
1845
|
}
|
|
1462
|
-
function
|
|
1846
|
+
function Cr(t, n) {
|
|
1463
1847
|
return {
|
|
1464
1848
|
x: t.a * n.x + t.c * n.y + t.e,
|
|
1465
1849
|
y: t.b * n.x + t.d * n.y + t.f
|
|
1466
1850
|
};
|
|
1467
1851
|
}
|
|
1468
|
-
function
|
|
1852
|
+
function Er(t, n = 1e-9) {
|
|
1469
1853
|
return Math.abs(t.a - 1) < n && Math.abs(t.b) < n && Math.abs(t.c) < n && Math.abs(t.d - 1) < n && Math.abs(t.e) < n && Math.abs(t.f) < n;
|
|
1470
1854
|
}
|
|
1471
|
-
function
|
|
1855
|
+
function kt(t, n) {
|
|
1472
1856
|
return { a: 1, b: 0, c: 0, d: 1, e: t, f: n };
|
|
1473
1857
|
}
|
|
1474
|
-
function
|
|
1858
|
+
function Nr(t) {
|
|
1475
1859
|
const n = t * Math.PI / 180, e = Math.cos(n), r = Math.sin(n);
|
|
1476
1860
|
return { a: e, b: r, c: -r, d: e, e: 0, f: 0 };
|
|
1477
1861
|
}
|
|
1478
|
-
function
|
|
1862
|
+
function Lr(t, n) {
|
|
1479
1863
|
switch (t) {
|
|
1480
1864
|
case "matrix":
|
|
1481
1865
|
return n.length < 6 ? null : { a: n[0], b: n[1], c: n[2], d: n[3], e: n[4], f: n[5] };
|
|
1482
1866
|
case "translate":
|
|
1483
|
-
return n.length < 1 ? null :
|
|
1867
|
+
return n.length < 1 ? null : kt(n[0], n[1] ?? 0);
|
|
1484
1868
|
case "scale": {
|
|
1485
1869
|
if (n.length < 1) return null;
|
|
1486
1870
|
const e = n[0], r = n[1] ?? e;
|
|
@@ -1488,12 +1872,12 @@ function dr(t, n) {
|
|
|
1488
1872
|
}
|
|
1489
1873
|
case "rotate": {
|
|
1490
1874
|
if (n.length < 1) return null;
|
|
1491
|
-
const e =
|
|
1875
|
+
const e = Nr(n[0]);
|
|
1492
1876
|
if (n.length < 3) return e;
|
|
1493
1877
|
const r = n[1], o = n[2];
|
|
1494
1878
|
return j(
|
|
1495
|
-
j(
|
|
1496
|
-
|
|
1879
|
+
j(kt(r, o), e),
|
|
1880
|
+
kt(-r, -o)
|
|
1497
1881
|
);
|
|
1498
1882
|
}
|
|
1499
1883
|
case "skewx":
|
|
@@ -1504,16 +1888,16 @@ function dr(t, n) {
|
|
|
1504
1888
|
return null;
|
|
1505
1889
|
}
|
|
1506
1890
|
}
|
|
1507
|
-
const
|
|
1508
|
-
function
|
|
1509
|
-
if (!t) return
|
|
1510
|
-
let n =
|
|
1511
|
-
|
|
1891
|
+
const Qt = /([a-zA-Z]+)\s*\(([^)]*)\)/g;
|
|
1892
|
+
function Jt(t) {
|
|
1893
|
+
if (!t) return Nt;
|
|
1894
|
+
let n = Nt;
|
|
1895
|
+
Qt.lastIndex = 0;
|
|
1512
1896
|
let e;
|
|
1513
|
-
for (; (e =
|
|
1897
|
+
for (; (e = Qt.exec(t)) !== null; ) {
|
|
1514
1898
|
const r = e[1].toLowerCase(), o = e[2].trim().split(/[\s,]+/).filter(Boolean).map(Number);
|
|
1515
1899
|
if (o.some((c) => Number.isNaN(c))) continue;
|
|
1516
|
-
const i =
|
|
1900
|
+
const i = Lr(r, o);
|
|
1517
1901
|
i && (n = j(n, i));
|
|
1518
1902
|
}
|
|
1519
1903
|
return n;
|
|
@@ -1523,79 +1907,79 @@ function H(t) {
|
|
|
1523
1907
|
const n = Math.round(t * 1e4) / 1e4;
|
|
1524
1908
|
return Object.is(n, -0) ? "0" : String(n);
|
|
1525
1909
|
}
|
|
1526
|
-
function
|
|
1527
|
-
const o = r * Math.PI / 180, i = Math.cos(o), c = Math.sin(o), a = i * n, s = c * n, h = -c * e, y = i * e,
|
|
1910
|
+
function vr(t, n, e, r) {
|
|
1911
|
+
const o = r * Math.PI / 180, i = Math.cos(o), c = Math.sin(o), a = i * n, s = c * n, h = -c * e, y = i * e, u = t.a * a + t.c * s, b = t.b * a + t.d * s, l = t.a * h + t.c * y, d = t.b * h + t.d * y, f = (u + d) / 2, m = (u - d) / 2, x = (b + l) / 2, I = (b - l) / 2, p = Math.hypot(f, I), g = Math.hypot(m, x), _ = Math.abs(p + g), S = Math.abs(p - g), O = Math.atan2(x, m), E = (Math.atan2(I, f) + O) / 2 * (180 / Math.PI);
|
|
1528
1912
|
return { rx: _, ry: S, phiDeg: E };
|
|
1529
1913
|
}
|
|
1530
|
-
function
|
|
1531
|
-
if (!t ||
|
|
1532
|
-
const e =
|
|
1914
|
+
function Mr(t, n) {
|
|
1915
|
+
if (!t || Er(n)) return t;
|
|
1916
|
+
const e = xn(t), r = [], o = n.a * n.d - n.b * n.c < 0;
|
|
1533
1917
|
let i = 0, c = "", a = 0, s = 0, h = 0, y = 0;
|
|
1534
|
-
const
|
|
1918
|
+
const u = () => {
|
|
1535
1919
|
const d = Number(e[i++]);
|
|
1536
1920
|
return Number.isNaN(d) ? 0 : d;
|
|
1537
|
-
},
|
|
1921
|
+
}, b = (d, ...f) => {
|
|
1538
1922
|
r.push(d + (f.length ? " " + f.map(H).join(" ") : ""));
|
|
1539
|
-
},
|
|
1540
|
-
const
|
|
1541
|
-
return [
|
|
1923
|
+
}, l = (d, f) => {
|
|
1924
|
+
const m = Cr(n, { x: d, y: f });
|
|
1925
|
+
return [m.x, m.y];
|
|
1542
1926
|
};
|
|
1543
1927
|
for (; i < e.length; ) {
|
|
1544
1928
|
const d = e[i];
|
|
1545
1929
|
switch (/[a-zA-Z]/.test(d) && (c = d, i++), c) {
|
|
1546
1930
|
case "M":
|
|
1547
1931
|
case "m": {
|
|
1548
|
-
const f = c === "m",
|
|
1549
|
-
a = f ? a +
|
|
1932
|
+
const f = c === "m", m = u(), x = u();
|
|
1933
|
+
a = f ? a + m : m, s = f ? s + x : x, h = a, y = s, b("M", ...l(a, s)), c = f ? "l" : "L";
|
|
1550
1934
|
break;
|
|
1551
1935
|
}
|
|
1552
1936
|
case "L":
|
|
1553
1937
|
case "l": {
|
|
1554
|
-
const f = c === "l",
|
|
1555
|
-
a = f ? a +
|
|
1938
|
+
const f = c === "l", m = u(), x = u();
|
|
1939
|
+
a = f ? a + m : m, s = f ? s + x : x, b("L", ...l(a, s));
|
|
1556
1940
|
break;
|
|
1557
1941
|
}
|
|
1558
1942
|
case "H":
|
|
1559
1943
|
case "h": {
|
|
1560
|
-
const f = c === "h",
|
|
1561
|
-
a = f ? a +
|
|
1944
|
+
const f = c === "h", m = u();
|
|
1945
|
+
a = f ? a + m : m, b("L", ...l(a, s));
|
|
1562
1946
|
break;
|
|
1563
1947
|
}
|
|
1564
1948
|
case "V":
|
|
1565
1949
|
case "v": {
|
|
1566
|
-
const f = c === "v",
|
|
1567
|
-
s = f ? s +
|
|
1950
|
+
const f = c === "v", m = u();
|
|
1951
|
+
s = f ? s + m : m, b("L", ...l(a, s));
|
|
1568
1952
|
break;
|
|
1569
1953
|
}
|
|
1570
1954
|
case "C":
|
|
1571
1955
|
case "c": {
|
|
1572
|
-
const f = c === "c",
|
|
1573
|
-
|
|
1956
|
+
const f = c === "c", m = f ? a + u() : u(), x = f ? s + u() : u(), I = f ? a + u() : u(), p = f ? s + u() : u(), g = f ? a + u() : u(), _ = f ? s + u() : u();
|
|
1957
|
+
b("C", ...l(m, x), ...l(I, p), ...l(g, _)), a = g, s = _;
|
|
1574
1958
|
break;
|
|
1575
1959
|
}
|
|
1576
1960
|
case "S":
|
|
1577
1961
|
case "s": {
|
|
1578
|
-
const f = c === "s",
|
|
1579
|
-
|
|
1962
|
+
const f = c === "s", m = f ? a + u() : u(), x = f ? s + u() : u(), I = f ? a + u() : u(), p = f ? s + u() : u();
|
|
1963
|
+
b("S", ...l(m, x), ...l(I, p)), a = I, s = p;
|
|
1580
1964
|
break;
|
|
1581
1965
|
}
|
|
1582
1966
|
case "Q":
|
|
1583
1967
|
case "q": {
|
|
1584
|
-
const f = c === "q",
|
|
1585
|
-
|
|
1968
|
+
const f = c === "q", m = f ? a + u() : u(), x = f ? s + u() : u(), I = f ? a + u() : u(), p = f ? s + u() : u();
|
|
1969
|
+
b("Q", ...l(m, x), ...l(I, p)), a = I, s = p;
|
|
1586
1970
|
break;
|
|
1587
1971
|
}
|
|
1588
1972
|
case "T":
|
|
1589
1973
|
case "t": {
|
|
1590
|
-
const f = c === "t",
|
|
1591
|
-
|
|
1974
|
+
const f = c === "t", m = f ? a + u() : u(), x = f ? s + u() : u();
|
|
1975
|
+
b("T", ...l(m, x)), a = m, s = x;
|
|
1592
1976
|
break;
|
|
1593
1977
|
}
|
|
1594
1978
|
case "A":
|
|
1595
1979
|
case "a": {
|
|
1596
|
-
const f = c === "a",
|
|
1980
|
+
const f = c === "a", m = u(), x = u(), I = u(), p = u(), g = u(), _ = f ? a + u() : u(), S = f ? s + u() : u(), O = vr(n, m, x, I), [A, E] = l(_, S);
|
|
1597
1981
|
r.push(
|
|
1598
|
-
`A ${H(O.rx)} ${H(O.ry)} ${H(O.phiDeg)} ${
|
|
1982
|
+
`A ${H(O.rx)} ${H(O.ry)} ${H(O.phiDeg)} ${p ? 1 : 0} ${(g ? 1 : 0) ^ (o ? 1 : 0)} ${H(A)} ${H(E)}`
|
|
1599
1983
|
), a = _, s = S;
|
|
1600
1984
|
break;
|
|
1601
1985
|
}
|
|
@@ -1611,7 +1995,7 @@ function yr(t, n) {
|
|
|
1611
1995
|
}
|
|
1612
1996
|
return r.join(" ");
|
|
1613
1997
|
}
|
|
1614
|
-
const
|
|
1998
|
+
const Tr = [
|
|
1615
1999
|
{ prefix: "walkable", kind: "walkable" },
|
|
1616
2000
|
{ prefix: "void", kind: "void" },
|
|
1617
2001
|
{ prefix: "unit", kind: "unit" },
|
|
@@ -1638,7 +2022,7 @@ const pr = [
|
|
|
1638
2022
|
{ prefix: "parking-icon", kind: "parking_icon" },
|
|
1639
2023
|
{ prefix: "walking-path", kind: "walkable" },
|
|
1640
2024
|
{ prefix: "water", kind: "water" }
|
|
1641
|
-
],
|
|
2025
|
+
], wr = [
|
|
1642
2026
|
{ prefix: "parking-zone", kind: "parking_zone" },
|
|
1643
2027
|
{ prefix: "parking-lane", kind: "parking_zone" },
|
|
1644
2028
|
{ prefix: "parking-icon", kind: "parking_icon" },
|
|
@@ -1659,26 +2043,26 @@ const pr = [
|
|
|
1659
2043
|
{ prefix: "elevator-", kind: "connector" },
|
|
1660
2044
|
{ prefix: "stairs-", kind: "connector" }
|
|
1661
2045
|
];
|
|
1662
|
-
function
|
|
2046
|
+
function tn(t) {
|
|
1663
2047
|
const n = yt(t);
|
|
1664
2048
|
return n === "route path" || n.startsWith("route path ");
|
|
1665
2049
|
}
|
|
1666
|
-
function
|
|
2050
|
+
function Sn(t) {
|
|
1667
2051
|
return /^routes?( \d+)?$/.test(yt(t));
|
|
1668
2052
|
}
|
|
1669
|
-
function
|
|
2053
|
+
function nn(t, n) {
|
|
1670
2054
|
const e = t.toLowerCase();
|
|
1671
2055
|
return e === "line" || e === "polyline" ? !0 : !(e !== "path" || !n || /[zZ]/.test(n) || /[csqtaCSQTA]/.test(n));
|
|
1672
2056
|
}
|
|
1673
|
-
const
|
|
1674
|
-
...
|
|
2057
|
+
const Pr = [
|
|
2058
|
+
...Jn,
|
|
1675
2059
|
"walkable",
|
|
1676
2060
|
"void"
|
|
1677
|
-
],
|
|
1678
|
-
function
|
|
1679
|
-
if (
|
|
2061
|
+
], Fr = 8;
|
|
2062
|
+
function Dr(t, n = "floor") {
|
|
2063
|
+
if (Cn(t))
|
|
1680
2064
|
return { kind: null, guessed: !1 };
|
|
1681
|
-
const e = t.toLowerCase(), r = n === "base" ?
|
|
2065
|
+
const e = t.toLowerCase(), r = n === "base" ? wr : Tr;
|
|
1682
2066
|
for (const { prefix: o, kind: i } of r)
|
|
1683
2067
|
if (e === o || e.startsWith(o))
|
|
1684
2068
|
return { kind: i, guessed: !1 };
|
|
@@ -1690,39 +2074,39 @@ function yt(t) {
|
|
|
1690
2074
|
function wt(t) {
|
|
1691
2075
|
return /non[-_ ]?interactive/i.test(t);
|
|
1692
2076
|
}
|
|
1693
|
-
function
|
|
2077
|
+
function An(t) {
|
|
1694
2078
|
return wt(t) ? !1 : /^interactive( items)?( \d+)?$/.test(yt(t));
|
|
1695
2079
|
}
|
|
1696
|
-
function
|
|
2080
|
+
function Rn(t) {
|
|
1697
2081
|
const n = yt(t);
|
|
1698
2082
|
return n === "stores" || n === "store layer" || n === "units" || n === "unit layer";
|
|
1699
2083
|
}
|
|
1700
|
-
function
|
|
1701
|
-
return
|
|
2084
|
+
function Cn(t) {
|
|
2085
|
+
return An(t) || wt(t) || Rn(t) || Sn(t);
|
|
1702
2086
|
}
|
|
1703
|
-
function
|
|
2087
|
+
function Ot(t) {
|
|
1704
2088
|
return t.interactiveContainer || t.nonInteractiveContainer || t.storeFolder || t.routeContainer;
|
|
1705
2089
|
}
|
|
1706
2090
|
function F(t, n) {
|
|
1707
2091
|
const e = t.match(new RegExp(`\\b${n}\\s*=\\s*["']([^"']*)["']`, "i"));
|
|
1708
2092
|
return e ? e[1] : null;
|
|
1709
2093
|
}
|
|
1710
|
-
function
|
|
2094
|
+
function G(t, n) {
|
|
1711
2095
|
const e = t.match(new RegExp(`\\b${n}\\s*=\\s*["']?(-?[\\d.]+)`, "i"));
|
|
1712
2096
|
return e ? Number(e[1]) : 0;
|
|
1713
2097
|
}
|
|
1714
|
-
function
|
|
2098
|
+
function en(t) {
|
|
1715
2099
|
return /\bdata-interactive\s*=\s*["']?(true|1|yes)/i.test(t);
|
|
1716
2100
|
}
|
|
1717
|
-
function
|
|
2101
|
+
function Kr(t) {
|
|
1718
2102
|
return [F(t, "id"), F(t, "data-name")].filter(
|
|
1719
2103
|
(n) => !!n
|
|
1720
2104
|
);
|
|
1721
2105
|
}
|
|
1722
|
-
function
|
|
1723
|
-
return t.some(wt) ? { interactiveContainer: !1, nonInteractiveContainer: !0, storeFolder: !1 } : t.some(
|
|
2106
|
+
function Yr(t) {
|
|
2107
|
+
return t.some(wt) ? { interactiveContainer: !1, nonInteractiveContainer: !0, storeFolder: !1 } : t.some(An) ? { interactiveContainer: !0, nonInteractiveContainer: !1, storeFolder: !1 } : t.some(Rn) ? { interactiveContainer: !1, nonInteractiveContainer: !1, storeFolder: !0 } : { interactiveContainer: !1, nonInteractiveContainer: !1, storeFolder: !1 };
|
|
1724
2108
|
}
|
|
1725
|
-
function
|
|
2109
|
+
function $r(t) {
|
|
1726
2110
|
const n = t.trim().split(/[\s,]+/).map(Number);
|
|
1727
2111
|
if (n.length < 4) return "";
|
|
1728
2112
|
let e = `M ${n[0]} ${n[1]}`;
|
|
@@ -1730,192 +2114,192 @@ function kr(t) {
|
|
|
1730
2114
|
e += ` L ${n[r]} ${n[r + 1]}`;
|
|
1731
2115
|
return e += " Z", e;
|
|
1732
2116
|
}
|
|
1733
|
-
function
|
|
2117
|
+
function Br(t, n, e, r) {
|
|
1734
2118
|
return `M ${t} ${n} L ${e} ${r}`;
|
|
1735
2119
|
}
|
|
1736
|
-
function
|
|
2120
|
+
function Gr(t, n) {
|
|
1737
2121
|
if (t === "path")
|
|
1738
2122
|
return F(n, "d") ?? void 0;
|
|
1739
2123
|
if (t === "polygon" || t === "polyline") {
|
|
1740
2124
|
const e = F(n, "points");
|
|
1741
|
-
return e ?
|
|
2125
|
+
return e ? $r(e) : void 0;
|
|
1742
2126
|
}
|
|
1743
2127
|
if (t === "line")
|
|
1744
|
-
return
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
2128
|
+
return Br(
|
|
2129
|
+
G(n, "x1"),
|
|
2130
|
+
G(n, "y1"),
|
|
2131
|
+
G(n, "x2"),
|
|
2132
|
+
G(n, "y2")
|
|
1749
2133
|
);
|
|
1750
2134
|
if (t === "rect") {
|
|
1751
|
-
const e =
|
|
2135
|
+
const e = G(n, "x"), r = G(n, "y"), o = G(n, "width"), i = G(n, "height");
|
|
1752
2136
|
return `M ${e} ${r} L ${e + o} ${r} L ${e + o} ${r + i} L ${e} ${r + i} Z`;
|
|
1753
2137
|
}
|
|
1754
2138
|
}
|
|
1755
|
-
function
|
|
1756
|
-
const n =
|
|
2139
|
+
function zr(t) {
|
|
2140
|
+
const n = Rr(t).replace(/<!--[\s\S]*?-->/g, ""), e = n.match(/viewBox\s*=\s*["']([^"']+)["']/i), r = Ze(e == null ? void 0 : e[1]), o = [], i = [], c = [], a = [];
|
|
1757
2141
|
let s = 0;
|
|
1758
|
-
const h = () => a.some((
|
|
2142
|
+
const h = () => a.some((p) => p.routeContainer), y = () => {
|
|
1759
2143
|
for (let g = a.length - 1; g >= 0; g--) {
|
|
1760
2144
|
const _ = a[g].style;
|
|
1761
2145
|
if (_.fill || _.stroke || _.strokeWidth != null || _.opacity != null)
|
|
1762
2146
|
break;
|
|
1763
2147
|
}
|
|
1764
|
-
let
|
|
2148
|
+
let p = {};
|
|
1765
2149
|
for (const g of a)
|
|
1766
|
-
|
|
1767
|
-
return
|
|
1768
|
-
},
|
|
1769
|
-
for (let
|
|
1770
|
-
if (a[
|
|
1771
|
-
if (a[
|
|
2150
|
+
p = _t(p, g.style);
|
|
2151
|
+
return p;
|
|
2152
|
+
}, u = () => {
|
|
2153
|
+
for (let p = a.length - 1; p >= 0; p--) {
|
|
2154
|
+
if (a[p].nonInteractiveContainer) return !1;
|
|
2155
|
+
if (a[p].interactiveContainer || a[p].storeFolder) return !0;
|
|
1772
2156
|
}
|
|
1773
2157
|
return !1;
|
|
1774
|
-
},
|
|
1775
|
-
for (let
|
|
1776
|
-
const g = a[
|
|
1777
|
-
if (!
|
|
2158
|
+
}, b = () => a.length > 0 ? a[a.length - 1].matrix : Nt, l = () => {
|
|
2159
|
+
for (let p = a.length - 1; p >= 0; p--) {
|
|
2160
|
+
const g = a[p];
|
|
2161
|
+
if (!Ot(g) && g.id) {
|
|
1778
2162
|
g.hasNamedChild = !0;
|
|
1779
2163
|
return;
|
|
1780
2164
|
}
|
|
1781
2165
|
}
|
|
1782
2166
|
}, d = () => {
|
|
1783
|
-
for (let
|
|
1784
|
-
const g = a[
|
|
1785
|
-
if (!
|
|
2167
|
+
for (let p = a.length - 1; p >= 0; p--) {
|
|
2168
|
+
const g = a[p];
|
|
2169
|
+
if (!Ot(g) && g.id)
|
|
1786
2170
|
return g;
|
|
1787
2171
|
}
|
|
1788
2172
|
return null;
|
|
1789
|
-
}, f = (
|
|
1790
|
-
if (
|
|
1791
|
-
for (const g of
|
|
1792
|
-
|
|
2173
|
+
}, f = (p) => {
|
|
2174
|
+
if (p.routeContainer) {
|
|
2175
|
+
for (const g of p.collectedPaths)
|
|
2176
|
+
nn("path", g) && m("path", g);
|
|
1793
2177
|
return;
|
|
1794
2178
|
}
|
|
1795
|
-
|
|
1796
|
-
`Group ${
|
|
2179
|
+
Ot(p) || !p.id || p.collectedPaths.length === 0 || (p.hasNamedChild && c.push(
|
|
2180
|
+
`Group ${p.id} mixes named children with ${p.collectedPaths.length} unnamed path(s); the unnamed paths were merged into a single shape "${p.id}" — give them ids if they are separate shapes`
|
|
1797
2181
|
), o.push({
|
|
1798
|
-
id:
|
|
2182
|
+
id: p.id,
|
|
1799
2183
|
tag: "g",
|
|
1800
|
-
d:
|
|
1801
|
-
interactive:
|
|
1802
|
-
style:
|
|
2184
|
+
d: p.collectedPaths.join(" "),
|
|
2185
|
+
interactive: p.inInteractive,
|
|
2186
|
+
style: _t(y(), p.style)
|
|
1803
2187
|
}));
|
|
1804
|
-
},
|
|
2188
|
+
}, m = (p, g) => {
|
|
1805
2189
|
if (!g) return;
|
|
1806
|
-
const _ =
|
|
2190
|
+
const _ = p === "polyline" || p === "polygon" || p === "path" ? g.replace(/\s*Z\s*$/i, "") : g;
|
|
1807
2191
|
i.includes(_) || i.push(_);
|
|
1808
|
-
},
|
|
2192
|
+
}, x = /<(\/?)(path|polygon|polyline|line|rect|g)\b([^>]*)(\/?)>/gi;
|
|
1809
2193
|
let I;
|
|
1810
|
-
for (; (I =
|
|
1811
|
-
const
|
|
1812
|
-
if (
|
|
2194
|
+
for (; (I = x.exec(n)) !== null; ) {
|
|
2195
|
+
const p = I[1] === "/", g = I[2].toLowerCase(), _ = I[3] ?? "", S = I[4] === "/" || /\/\s*$/.test(_);
|
|
2196
|
+
if (p) {
|
|
1813
2197
|
if (g === "g") {
|
|
1814
|
-
const
|
|
1815
|
-
|
|
2198
|
+
const R = a.pop();
|
|
2199
|
+
R && f(R);
|
|
1816
2200
|
}
|
|
1817
2201
|
continue;
|
|
1818
2202
|
}
|
|
1819
2203
|
if (g === "g") {
|
|
1820
|
-
const
|
|
1821
|
-
|
|
2204
|
+
const R = F(_, "id"), $ = Kr(_), { interactiveContainer: B, nonInteractiveContainer: w, storeFolder: P } = Yr($), Q = u();
|
|
2205
|
+
R && l();
|
|
1822
2206
|
const J = {
|
|
1823
|
-
id:
|
|
2207
|
+
id: R,
|
|
1824
2208
|
interactiveContainer: B,
|
|
1825
2209
|
nonInteractiveContainer: w,
|
|
1826
2210
|
storeFolder: P,
|
|
1827
|
-
inInteractive: B || P ||
|
|
2211
|
+
inInteractive: B || P || en(_) || Q && !w,
|
|
1828
2212
|
collectedPaths: [],
|
|
1829
|
-
style:
|
|
1830
|
-
matrix: j(
|
|
2213
|
+
style: qt(_),
|
|
2214
|
+
matrix: j(b(), Jt(F(_, "transform"))),
|
|
1831
2215
|
hasNamedChild: !1,
|
|
1832
|
-
routeContainer: $.some(
|
|
2216
|
+
routeContainer: $.some(Sn) || h()
|
|
1833
2217
|
};
|
|
1834
2218
|
S || a.push(J);
|
|
1835
2219
|
continue;
|
|
1836
2220
|
}
|
|
1837
|
-
const O = F(_, "id"), A =
|
|
2221
|
+
const O = F(_, "id"), A = Gr(g, _), E = j(b(), Jt(F(_, "transform"))), C = A && Mr(A, E), K = en(_) || u(), T = _t(y(), qt(_)), Y = F(_, "data-name");
|
|
1838
2222
|
if (h()) {
|
|
1839
|
-
|
|
2223
|
+
nn(g, A) && m(g, C);
|
|
1840
2224
|
continue;
|
|
1841
2225
|
}
|
|
1842
|
-
if (O != null &&
|
|
2226
|
+
if (O != null && tn(O) || Y != null && tn(Y))
|
|
1843
2227
|
continue;
|
|
1844
2228
|
if (O) {
|
|
1845
|
-
|
|
2229
|
+
l(), C && o.push({ id: O, tag: g, d: C, interactive: K, style: T });
|
|
1846
2230
|
continue;
|
|
1847
2231
|
}
|
|
1848
|
-
if (!
|
|
1849
|
-
const
|
|
1850
|
-
|
|
2232
|
+
if (!C) continue;
|
|
2233
|
+
const N = d();
|
|
2234
|
+
N ? (N.collectedPaths.push(C), !N.style.fill && T.fill && (N.style = T)) : K && (s += 1, o.push({
|
|
1851
2235
|
id: `interactive-anon-${s}`,
|
|
1852
2236
|
tag: g,
|
|
1853
|
-
d:
|
|
2237
|
+
d: C,
|
|
1854
2238
|
interactive: !0,
|
|
1855
|
-
style:
|
|
2239
|
+
style: T
|
|
1856
2240
|
}));
|
|
1857
2241
|
}
|
|
1858
2242
|
for (; a.length > 0; )
|
|
1859
2243
|
f(a.pop());
|
|
1860
2244
|
return { viewbox: r, elements: o, routePathDs: i, warnings: c };
|
|
1861
2245
|
}
|
|
1862
|
-
function
|
|
2246
|
+
function Xr(t) {
|
|
1863
2247
|
return t.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").slice(0, 80);
|
|
1864
2248
|
}
|
|
1865
|
-
function
|
|
2249
|
+
function Hr(t, n) {
|
|
1866
2250
|
var o, i, c, a;
|
|
1867
2251
|
const e = ft(n), r = {};
|
|
1868
2252
|
return e != null && e.fill ? r.fill = e.fill : (o = t.style) != null && o.fill && (r.fill = t.style.fill), e != null && e.stroke ? r.stroke = e.stroke : (i = t.style) != null && i.stroke && (r.stroke = t.style.stroke), (e == null ? void 0 : e.strokeWidth) != null ? r.strokeWidth = e.strokeWidth : ((c = t.style) == null ? void 0 : c.strokeWidth) != null && (r.strokeWidth = t.style.strokeWidth), ((a = t.style) == null ? void 0 : a.opacity) != null && (r.opacity = t.style.opacity), (e == null ? void 0 : e.extrudeHeight) != null && (r.extrudeHeight = e.extrudeHeight), r;
|
|
1869
2253
|
}
|
|
1870
|
-
function
|
|
2254
|
+
function Ur(t, n) {
|
|
1871
2255
|
return t == null && n == null ? !0 : t == null || n == null ? !1 : Math.abs(t.x - n.x) < 0.01 && Math.abs(t.y - n.y) < 0.01 && Math.abs(t.width - n.width) < 0.01 && Math.abs(t.height - n.height) < 0.01;
|
|
1872
2256
|
}
|
|
1873
|
-
function
|
|
1874
|
-
const r =
|
|
1875
|
-
let h = 0, y = 0,
|
|
1876
|
-
const
|
|
1877
|
-
|
|
2257
|
+
function Bi(t, n = "floor", e = {}) {
|
|
2258
|
+
const r = zr(t), o = [], i = [], c = [], a = [...r.warnings], s = [];
|
|
2259
|
+
let h = 0, y = 0, u = 0;
|
|
2260
|
+
const b = e.previousViewbox != null && r.viewbox != null && !Ur(e.previousViewbox, r.viewbox);
|
|
2261
|
+
b && a.push(
|
|
1878
2262
|
"SVG viewBox differs from the stored artboard — re-upload blocked until the designer restores the original viewBox"
|
|
1879
2263
|
);
|
|
1880
|
-
for (const
|
|
1881
|
-
if (
|
|
1882
|
-
let { kind: d, guessed: f } =
|
|
1883
|
-
|
|
1884
|
-
const
|
|
1885
|
-
sourceSvgId:
|
|
2264
|
+
for (const l of r.elements) {
|
|
2265
|
+
if (Cn(l.id)) continue;
|
|
2266
|
+
let { kind: d, guessed: f } = Dr(l.id, n);
|
|
2267
|
+
l.interactive && !d && (d = "unit", f = !0);
|
|
2268
|
+
const m = {
|
|
2269
|
+
sourceSvgId: l.id,
|
|
1886
2270
|
kind: d,
|
|
1887
2271
|
guessed: f
|
|
1888
2272
|
};
|
|
1889
2273
|
if (!d)
|
|
1890
|
-
if (i.push(
|
|
1891
|
-
d = "decor",
|
|
2274
|
+
if (i.push(l.id), n === "floor")
|
|
2275
|
+
d = "decor", m.kind = "decor", m.message = "No matching prefix; imported as decor (floor mode)";
|
|
1892
2276
|
else {
|
|
1893
|
-
|
|
2277
|
+
m.message = "No matching prefix; skipped (outdoor decor stays in SVG)", o.push(m);
|
|
1894
2278
|
continue;
|
|
1895
2279
|
}
|
|
1896
|
-
if (!
|
|
1897
|
-
a.push(`Element ${
|
|
2280
|
+
if (!l.d) {
|
|
2281
|
+
a.push(`Element ${l.id} has no drawable geometry`);
|
|
1898
2282
|
continue;
|
|
1899
2283
|
}
|
|
1900
2284
|
if (n === "base") {
|
|
1901
|
-
const
|
|
1902
|
-
if (!(!
|
|
2285
|
+
const p = ft(l.id) != null;
|
|
2286
|
+
if (!(!p && (Pr.includes(d) || !!l.interactive))) {
|
|
1903
2287
|
o.push({
|
|
1904
|
-
...
|
|
1905
|
-
message:
|
|
2288
|
+
...m,
|
|
2289
|
+
message: p ? "Static decoration — rendered from outdoor SVG" : "Decoration — not persisted; rendered from outdoor SVG"
|
|
1906
2290
|
});
|
|
1907
2291
|
continue;
|
|
1908
2292
|
}
|
|
1909
2293
|
}
|
|
1910
|
-
f && (c.push(
|
|
1911
|
-
const
|
|
2294
|
+
f && (c.push(m), m.message = m.message ?? "Guessed kind from interactive/fallback rule"), o.push(m), d === "walkable" && h++, d === "void" && y++, d === "unit" && u++;
|
|
2295
|
+
const x = Ve([l.d]), I = Tt(x);
|
|
1912
2296
|
s.push({
|
|
1913
|
-
key:
|
|
2297
|
+
key: Xr(l.id),
|
|
1914
2298
|
kind: d,
|
|
1915
|
-
geometry:
|
|
2299
|
+
geometry: x,
|
|
1916
2300
|
bbox: I,
|
|
1917
|
-
sourceSvgId:
|
|
1918
|
-
style:
|
|
2301
|
+
sourceSvgId: l.id,
|
|
2302
|
+
style: Hr(l, l.id)
|
|
1919
2303
|
});
|
|
1920
2304
|
}
|
|
1921
2305
|
return n === "floor" && h === 0 && a.push(
|
|
@@ -1927,17 +2311,17 @@ function mi(t, n = "floor", e = {}) {
|
|
|
1927
2311
|
guessed: c,
|
|
1928
2312
|
walkableCount: h,
|
|
1929
2313
|
voidCount: y,
|
|
1930
|
-
unitCount:
|
|
2314
|
+
unitCount: u,
|
|
1931
2315
|
warnings: a
|
|
1932
2316
|
},
|
|
1933
2317
|
shapes: s,
|
|
1934
2318
|
viewbox: r.viewbox,
|
|
1935
2319
|
routePathDs: r.routePathDs,
|
|
1936
|
-
viewBoxChanged:
|
|
2320
|
+
viewBoxChanged: b
|
|
1937
2321
|
};
|
|
1938
2322
|
}
|
|
1939
|
-
function
|
|
1940
|
-
const o = r.driftThreshold ??
|
|
2323
|
+
function Gi(t, n, e, r = {}) {
|
|
2324
|
+
const o = r.driftThreshold ?? Fr, i = new Map(
|
|
1941
2325
|
n.filter((s) => s.sourceSvgId).map((s) => [s.sourceSvgId, s])
|
|
1942
2326
|
), c = /* @__PURE__ */ new Set(), a = [];
|
|
1943
2327
|
for (const s of t) {
|
|
@@ -1961,8 +2345,8 @@ function bi(t, n, e, r = {}) {
|
|
|
1961
2345
|
else {
|
|
1962
2346
|
let y = "unchanged";
|
|
1963
2347
|
if (h.bbox) {
|
|
1964
|
-
const
|
|
1965
|
-
Math.hypot(
|
|
2348
|
+
const u = (h.bbox.minX + h.bbox.maxX) / 2, b = (h.bbox.minY + h.bbox.maxY) / 2, l = We(s.geometry);
|
|
2349
|
+
Math.hypot(l.x - u, l.y - b) > o && (y = "moved");
|
|
1966
2350
|
}
|
|
1967
2351
|
a.push({
|
|
1968
2352
|
sourceSvgId: s.sourceSvgId,
|
|
@@ -1989,355 +2373,93 @@ function bi(t, n, e, r = {}) {
|
|
|
1989
2373
|
viewbox: e
|
|
1990
2374
|
};
|
|
1991
2375
|
}
|
|
1992
|
-
const
|
|
1993
|
-
function
|
|
1994
|
-
return Math.abs(t.x - n.x) <
|
|
2376
|
+
const L = 1e-6, Vr = 15 * Math.PI / 180, Wr = 1e-3, rt = Math.PI * 2;
|
|
2377
|
+
function rn(t, n) {
|
|
2378
|
+
return Math.abs(t.x - n.x) < L && Math.abs(t.y - n.y) < L;
|
|
1995
2379
|
}
|
|
1996
|
-
function
|
|
2380
|
+
function St(t, n) {
|
|
1997
2381
|
return { x: t.x + n.x, y: t.y + n.y };
|
|
1998
2382
|
}
|
|
1999
|
-
function
|
|
2383
|
+
function on(t, n) {
|
|
2000
2384
|
return { x: t.x - n.x, y: t.y - n.y };
|
|
2001
2385
|
}
|
|
2002
|
-
function
|
|
2386
|
+
function ot(t, n) {
|
|
2003
2387
|
return { x: t.x * n, y: t.y * n };
|
|
2004
2388
|
}
|
|
2005
|
-
function
|
|
2389
|
+
function At(t, n, e) {
|
|
2006
2390
|
return {
|
|
2007
2391
|
x: t.x + Math.cos(e) * n,
|
|
2008
2392
|
y: t.y + Math.sin(e) * n
|
|
2009
2393
|
};
|
|
2010
2394
|
}
|
|
2011
|
-
function
|
|
2395
|
+
function Zr(t) {
|
|
2012
2396
|
const n = [];
|
|
2013
2397
|
for (const e of t) {
|
|
2014
2398
|
const r = n[n.length - 1];
|
|
2015
|
-
r &&
|
|
2399
|
+
r && rn(r, e) || n.push(e);
|
|
2016
2400
|
}
|
|
2017
|
-
return n.length >= 2 &&
|
|
2401
|
+
return n.length >= 2 && rn(n[0], n[n.length - 1]) && n.pop(), n;
|
|
2018
2402
|
}
|
|
2019
|
-
function
|
|
2020
|
-
const e = un(n), r =
|
|
2403
|
+
function zi(t, n) {
|
|
2404
|
+
const e = un(n), r = Zr(t);
|
|
2021
2405
|
if (r.length < 3 || e <= 0) return t;
|
|
2022
|
-
const o = r.length, i = new Array(o), c = new Array(o), a = new Array(o), s = new Array(o), h = new Array(o).fill(0), y = new Array(o).fill(0),
|
|
2023
|
-
for (let
|
|
2024
|
-
const d = r[(
|
|
2025
|
-
if (a[
|
|
2026
|
-
i[
|
|
2406
|
+
const o = r.length, i = new Array(o), c = new Array(o), a = new Array(o), s = new Array(o), h = new Array(o).fill(0), y = new Array(o).fill(0), u = new Array(o).fill(!1);
|
|
2407
|
+
for (let l = 0; l < o; l++) {
|
|
2408
|
+
const d = r[(l - 1 + o) % o], f = r[l], m = r[(l + 1) % o], x = v(d, f), I = v(f, m);
|
|
2409
|
+
if (a[l] = I, x < L || I < L) {
|
|
2410
|
+
i[l] = { x: 1, y: 0 }, c[l] = { x: 1, y: 0 }, s[l] = 0;
|
|
2027
2411
|
continue;
|
|
2028
2412
|
}
|
|
2029
|
-
i[
|
|
2030
|
-
const
|
|
2031
|
-
s[
|
|
2032
|
-
const _ = Math.abs(s[
|
|
2033
|
-
if (_ <
|
|
2413
|
+
i[l] = ot(on(f, d), 1 / x), c[l] = ot(on(m, f), 1 / I);
|
|
2414
|
+
const p = i[l].x * c[l].y - i[l].y * c[l].x, g = i[l].x * c[l].x + i[l].y * c[l].y;
|
|
2415
|
+
s[l] = Math.atan2(p, g);
|
|
2416
|
+
const _ = Math.abs(s[l]);
|
|
2417
|
+
if (_ < Vr) continue;
|
|
2034
2418
|
const S = Math.PI - _, O = Math.tan(S / 2);
|
|
2035
|
-
if (O <
|
|
2419
|
+
if (O < L || S <= L || S >= Math.PI - L) continue;
|
|
2036
2420
|
const A = e / O;
|
|
2037
|
-
h[
|
|
2421
|
+
h[l] = A, y[l] = A, u[l] = !0;
|
|
2038
2422
|
}
|
|
2039
|
-
for (let
|
|
2040
|
-
const d = (
|
|
2041
|
-
if (f <=
|
|
2042
|
-
const
|
|
2043
|
-
y[
|
|
2423
|
+
for (let l = 0; l < o; l++) {
|
|
2424
|
+
const d = (l + 1) % o, f = y[l] + h[d], m = Math.max(0, a[l] - Wr);
|
|
2425
|
+
if (f <= m || f <= L) continue;
|
|
2426
|
+
const x = m / f;
|
|
2427
|
+
y[l] *= x, h[d] *= x;
|
|
2044
2428
|
}
|
|
2045
|
-
const
|
|
2046
|
-
for (let
|
|
2047
|
-
const d = r[
|
|
2048
|
-
if (!l
|
|
2049
|
-
|
|
2429
|
+
const b = [];
|
|
2430
|
+
for (let l = 0; l < o; l++) {
|
|
2431
|
+
const d = r[l], f = Math.min(h[l], y[l]), m = Math.abs(s[l]), x = Math.PI - m, I = f * Math.tan(x / 2);
|
|
2432
|
+
if (!u[l] || I < L || f < L) {
|
|
2433
|
+
b.push({ ...d });
|
|
2050
2434
|
continue;
|
|
2051
2435
|
}
|
|
2052
|
-
const
|
|
2053
|
-
x: -i[
|
|
2054
|
-
y: i[
|
|
2055
|
-
}), O = Math.atan2(
|
|
2056
|
-
for (let $ = 0; $ <=
|
|
2057
|
-
const B = $ /
|
|
2058
|
-
|
|
2059
|
-
}
|
|
2060
|
-
}
|
|
2061
|
-
return m;
|
|
2062
|
-
}
|
|
2063
|
-
function G(t, n, e) {
|
|
2064
|
-
return { x: t.x + (n.x - t.x) * e, y: t.y + (n.y - t.y) * e };
|
|
2065
|
-
}
|
|
2066
|
-
function ot(t, n) {
|
|
2067
|
-
return { x: t.x + n.x, y: t.y + n.y };
|
|
2068
|
-
}
|
|
2069
|
-
function rn(t, n) {
|
|
2070
|
-
return { x: t.x - n.x, y: t.y - n.y };
|
|
2071
|
-
}
|
|
2072
|
-
function At(t, n) {
|
|
2073
|
-
return { x: t.x * n, y: t.y * n };
|
|
2074
|
-
}
|
|
2075
|
-
function q(t) {
|
|
2076
|
-
const n = t == null ? void 0 : t.curve;
|
|
2077
|
-
if (!(n != null && n.c1) || !(n != null && n.c2)) return null;
|
|
2078
|
-
const e = Number(n.c1.x), r = Number(n.c1.y), o = Number(n.c2.x), i = Number(n.c2.y);
|
|
2079
|
-
return [e, r, o, i].every((c) => Number.isFinite(c)) ? {
|
|
2080
|
-
c1: { x: e, y: r },
|
|
2081
|
-
c2: { x: o, y: i }
|
|
2082
|
-
} : null;
|
|
2083
|
-
}
|
|
2084
|
-
function gi(t) {
|
|
2085
|
-
const n = q(t);
|
|
2086
|
-
return n || ([t == null ? void 0 : t.c1_x, t == null ? void 0 : t.c1_y, t == null ? void 0 : t.c2_x, t == null ? void 0 : t.c2_y].some(
|
|
2087
|
-
(r) => r == null || !Number.isFinite(Number(r))
|
|
2088
|
-
) ? null : {
|
|
2089
|
-
c1: { x: Number(t.c1_x), y: Number(t.c1_y) },
|
|
2090
|
-
c2: { x: Number(t.c2_x), y: Number(t.c2_y) }
|
|
2091
|
-
});
|
|
2092
|
-
}
|
|
2093
|
-
function Tr(t) {
|
|
2094
|
-
return {
|
|
2095
|
-
c1: { x: t.c2.x, y: t.c2.y },
|
|
2096
|
-
c2: { x: t.c1.x, y: t.c1.y }
|
|
2097
|
-
};
|
|
2098
|
-
}
|
|
2099
|
-
function _i(t, n, e) {
|
|
2100
|
-
const r = G(t, n, 0.5), o = At(rn(e, r), 4 / 3), i = rn(n, t);
|
|
2101
|
-
return {
|
|
2102
|
-
c1: ot(ot(t, At(i, 1 / 3)), o),
|
|
2103
|
-
c2: ot(ot(t, At(i, 2 / 3)), o)
|
|
2104
|
-
};
|
|
2105
|
-
}
|
|
2106
|
-
function ki(t, n, e) {
|
|
2107
|
-
return n === 1 ? { ...t, c1: { x: e.x, y: e.y } } : { ...t, c2: { x: e.x, y: e.y } };
|
|
2108
|
-
}
|
|
2109
|
-
function Oi(t, n, e) {
|
|
2110
|
-
const r = q(t);
|
|
2111
|
-
if (!r) return null;
|
|
2112
|
-
const o = t.fromAnchorId === n, i = t.toAnchorId === n;
|
|
2113
|
-
return !o && !i ? null : {
|
|
2114
|
-
c1: o ? { x: r.c1.x + e.x, y: r.c1.y + e.y } : { x: r.c1.x, y: r.c1.y },
|
|
2115
|
-
c2: i ? { x: r.c2.x + e.x, y: r.c2.y + e.y } : { x: r.c2.x, y: r.c2.y }
|
|
2116
|
-
};
|
|
2117
|
-
}
|
|
2118
|
-
function Si(t, n, e) {
|
|
2119
|
-
const r = q(t);
|
|
2120
|
-
if (!r) return null;
|
|
2121
|
-
const o = n.get(t.fromAnchorId), i = n.get(t.toAnchorId), c = e.get(t.fromAnchorId), a = e.get(t.toAnchorId);
|
|
2122
|
-
return !o || !i || !c || !a ? r : {
|
|
2123
|
-
c1: {
|
|
2124
|
-
x: r.c1.x + c.x - o.x,
|
|
2125
|
-
y: r.c1.y + c.y - o.y
|
|
2126
|
-
},
|
|
2127
|
-
c2: {
|
|
2128
|
-
x: r.c2.x + a.x - i.x,
|
|
2129
|
-
y: r.c2.y + a.y - i.y
|
|
2130
|
-
}
|
|
2131
|
-
};
|
|
2132
|
-
}
|
|
2133
|
-
function Ai(t, n, e) {
|
|
2134
|
-
return e ? `M ${t.x} ${t.y} C ${e.c1.x} ${e.c1.y} ${e.c2.x} ${e.c2.y} ${n.x} ${n.y}` : `M ${t.x} ${t.y} L ${n.x} ${n.y}`;
|
|
2135
|
-
}
|
|
2136
|
-
function An(t, n, e) {
|
|
2137
|
-
if (!e) return v(t, n);
|
|
2138
|
-
const r = lt(t, e.c1, e.c2, n, 16);
|
|
2139
|
-
let o = 0;
|
|
2140
|
-
for (let i = 1; i < r.length; i += 1)
|
|
2141
|
-
o += v(r[i - 1], r[i]);
|
|
2142
|
-
return o;
|
|
2143
|
-
}
|
|
2144
|
-
function Mr(t, n, e, r) {
|
|
2145
|
-
if (!r) return at(t, n, e);
|
|
2146
|
-
const o = lt(n, r.c1, r.c2, e, 24), i = Math.max(o.length - 1, 1);
|
|
2147
|
-
let c = {
|
|
2148
|
-
point: { x: n.x, y: n.y },
|
|
2149
|
-
t: 0,
|
|
2150
|
-
distance: v(t, n)
|
|
2151
|
-
};
|
|
2152
|
-
for (let a = 1; a < o.length; a += 1) {
|
|
2153
|
-
const s = at(t, o[a - 1], o[a]);
|
|
2154
|
-
s.distance < c.distance && (c = {
|
|
2155
|
-
point: s.point,
|
|
2156
|
-
t: (a - 1 + s.t) / i,
|
|
2157
|
-
distance: s.distance
|
|
2158
|
-
});
|
|
2159
|
-
}
|
|
2160
|
-
return c;
|
|
2161
|
-
}
|
|
2162
|
-
function wr(t, n, e, r, o) {
|
|
2163
|
-
const i = G(t, n, o), c = G(n, e, o), a = G(e, r, o), s = G(i, c, o), h = G(c, a, o), y = G(s, h, o);
|
|
2164
|
-
return {
|
|
2165
|
-
left: { c1: i, c2: s },
|
|
2166
|
-
right: { c1: h, c2: a },
|
|
2167
|
-
point: y
|
|
2168
|
-
};
|
|
2169
|
-
}
|
|
2170
|
-
function Ci(t, n, e, r) {
|
|
2171
|
-
if (!e)
|
|
2172
|
-
return { point: at(r, t, n).point, left: null, right: null };
|
|
2173
|
-
const o = Mr(r, t, n, e), i = Math.min(1, Math.max(0, o.t)), c = wr(t, e.c1, e.c2, n, i);
|
|
2174
|
-
return { point: c.point, left: c.left, right: c.right };
|
|
2175
|
-
}
|
|
2176
|
-
function Pr(t, n, e) {
|
|
2177
|
-
const r = t.connectorId ?? n.connectorId;
|
|
2178
|
-
return r == null ? void 0 : e.get(r);
|
|
2179
|
-
}
|
|
2180
|
-
function Fr(t, n, e, r) {
|
|
2181
|
-
var o;
|
|
2182
|
-
return n.levelId === e.levelId ? !0 : t.kind !== "connector" ? !1 : $n(
|
|
2183
|
-
(o = Pr(n, e, r)) == null ? void 0 : o.kind
|
|
2184
|
-
);
|
|
2185
|
-
}
|
|
2186
|
-
function Dr(t, n, e = []) {
|
|
2187
|
-
const r = Rn(), o = new Map(t.map((s) => [s.id, s])), i = new Map(e.map((s) => [s.id, s])), c = t.map((s) => ({
|
|
2188
|
-
id: s.id,
|
|
2189
|
-
levelId: s.levelId,
|
|
2190
|
-
x: s.x,
|
|
2191
|
-
y: s.y,
|
|
2192
|
-
kind: s.kind,
|
|
2193
|
-
shapeId: s.shapeId,
|
|
2194
|
-
connectorId: s.connectorId
|
|
2195
|
-
}));
|
|
2196
|
-
for (const s of c)
|
|
2197
|
-
r.addNode(s.id, s);
|
|
2198
|
-
const a = [];
|
|
2199
|
-
for (const s of n) {
|
|
2200
|
-
const h = o.get(s.fromAnchorId), y = o.get(s.toAnchorId);
|
|
2201
|
-
if (!h || !y || !Fr(s, h, y, i)) continue;
|
|
2202
|
-
const l = q(s);
|
|
2203
|
-
let m = s.weight;
|
|
2204
|
-
m == null && (m = An(h, y, l), h.levelId !== y.levelId && (m += Rt));
|
|
2205
|
-
let u = s.accessible;
|
|
2206
|
-
if (s.kind === "connector" && h.connectorId != null) {
|
|
2207
|
-
const f = i.get(h.connectorId);
|
|
2208
|
-
f && (u = f.accessible);
|
|
2209
|
-
}
|
|
2210
|
-
const d = {
|
|
2211
|
-
id: s.id,
|
|
2212
|
-
from: s.fromAnchorId,
|
|
2213
|
-
to: s.toAnchorId,
|
|
2214
|
-
weight: m,
|
|
2215
|
-
directed: s.directed,
|
|
2216
|
-
accessible: u,
|
|
2217
|
-
kind: s.kind,
|
|
2218
|
-
curve: l
|
|
2219
|
-
};
|
|
2220
|
-
a.push(d), r.addLink(s.fromAnchorId, s.toAnchorId, d), s.directed || r.addLink(s.toAnchorId, s.fromAnchorId, d);
|
|
2221
|
-
}
|
|
2222
|
-
return { graph: r, nodes: c, edges: a, anchorById: o };
|
|
2223
|
-
}
|
|
2224
|
-
function Kr(t, n, e, r = {}) {
|
|
2225
|
-
const { graph: o, anchorById: i } = t;
|
|
2226
|
-
if (!i.has(n) || !i.has(e))
|
|
2227
|
-
return null;
|
|
2228
|
-
const a = En.nba(o, {
|
|
2229
|
-
oriented: !0,
|
|
2230
|
-
distance(d, f, p) {
|
|
2231
|
-
const b = p.data;
|
|
2232
|
-
return r.accessibleOnly && b && !b.accessible ? Number.POSITIVE_INFINITY : (b == null ? void 0 : b.weight) ?? 1;
|
|
2233
|
-
},
|
|
2234
|
-
heuristic(d, f) {
|
|
2235
|
-
const p = i.get(d.id), b = i.get(f.id);
|
|
2236
|
-
if (!p || !b) return 0;
|
|
2237
|
-
let I = v(p, b);
|
|
2238
|
-
return p.levelId !== b.levelId && (I += Rt), I;
|
|
2239
|
-
}
|
|
2240
|
-
}).find(n, e);
|
|
2241
|
-
if (!a || a.length === 0) return null;
|
|
2242
|
-
const h = a.reverse().map((d) => d.id), y = [], l = [], m = [];
|
|
2243
|
-
let u = 0;
|
|
2244
|
-
for (let d = 0; d < h.length; d++) {
|
|
2245
|
-
const f = i.get(h[d]);
|
|
2246
|
-
if (y.push({ x: f.x, y: f.y, levelId: f.levelId }), d > 0) {
|
|
2247
|
-
const p = h[d - 1], b = i.get(p), I = Yr(t, p, h[d]);
|
|
2248
|
-
l.push(I), u += An(b, f, I), b.levelId !== f.levelId && (u += Rt, m.push({
|
|
2249
|
-
fromLevelId: b.levelId,
|
|
2250
|
-
toLevelId: f.levelId,
|
|
2251
|
-
connectorId: f.connectorId ?? b.connectorId
|
|
2252
|
-
}));
|
|
2436
|
+
const p = St(d, ot(i[l], -f)), g = St(d, ot(c[l], f)), _ = s[l] > 0 ? 1 : -1, S = St(p, {
|
|
2437
|
+
x: -i[l].y * _ * I,
|
|
2438
|
+
y: i[l].x * _ * I
|
|
2439
|
+
}), O = Math.atan2(p.y - S.y, p.x - S.x), A = Math.atan2(g.y - S.y, g.x - S.x), E = (A - O + rt) % rt, C = (O - A + rt) % rt, K = At(S, I, O + E / 2), T = At(S, I, O - C / 2), Y = v(K, d) <= v(T, d), N = Y ? E : C, R = Math.max(8, Math.min(28, Math.ceil(N * I / 2)));
|
|
2440
|
+
for (let $ = 0; $ <= R; $++) {
|
|
2441
|
+
const B = $ / R, w = Y ? O + N * B : O - N * B;
|
|
2442
|
+
b.push(At(S, I, w));
|
|
2253
2443
|
}
|
|
2254
2444
|
}
|
|
2255
|
-
return
|
|
2256
|
-
}
|
|
2257
|
-
function Yr(t, n, e) {
|
|
2258
|
-
const r = t.edges.find(
|
|
2259
|
-
(i) => i.from === n && i.to === e || !i.directed && i.from === e && i.to === n
|
|
2260
|
-
), o = q(r);
|
|
2261
|
-
return !o || !r ? null : r.from === n ? o : Tr(o);
|
|
2262
|
-
}
|
|
2263
|
-
function Lt(t) {
|
|
2264
|
-
const n = /* @__PURE__ */ new Set(), e = [];
|
|
2265
|
-
for (const r of t)
|
|
2266
|
-
!Number.isFinite(r) || n.has(r) || (n.add(r), e.push(r));
|
|
2267
|
-
return e;
|
|
2268
|
-
}
|
|
2269
|
-
function Ri(t, n) {
|
|
2270
|
-
return t.filter((e) => e.shapeId === n).map((e) => e.id);
|
|
2271
|
-
}
|
|
2272
|
-
function Ei(t, n) {
|
|
2273
|
-
const e = [];
|
|
2274
|
-
for (const r of t) {
|
|
2275
|
-
const o = /* @__PURE__ */ new Set();
|
|
2276
|
-
for (const i of r.shapes)
|
|
2277
|
-
n(i) && o.add(i.id);
|
|
2278
|
-
if (o.size !== 0)
|
|
2279
|
-
for (const i of r.anchors)
|
|
2280
|
-
i.shapeId != null && o.has(i.shapeId) && e.push(i.id);
|
|
2281
|
-
}
|
|
2282
|
-
return e;
|
|
2283
|
-
}
|
|
2284
|
-
function $r(t, n) {
|
|
2285
|
-
const e = t.anchorById.get(n);
|
|
2286
|
-
if (!e) return [];
|
|
2287
|
-
if (e.shapeId == null) return [n];
|
|
2288
|
-
const r = t.nodes.filter((o) => o.shapeId === e.shapeId).map((o) => o.id);
|
|
2289
|
-
return r.length > 0 ? r : [n];
|
|
2290
|
-
}
|
|
2291
|
-
function on(t, n) {
|
|
2292
|
-
const e = /* @__PURE__ */ new Set();
|
|
2293
|
-
for (const r of Lt(n))
|
|
2294
|
-
for (const o of $r(t, r))
|
|
2295
|
-
e.add(o);
|
|
2296
|
-
return [...e];
|
|
2297
|
-
}
|
|
2298
|
-
function Br(t, n, e, r = {}) {
|
|
2299
|
-
const o = Lt(n), i = Lt(e);
|
|
2300
|
-
if (o.length === 0 || i.length === 0) return null;
|
|
2301
|
-
let c = null;
|
|
2302
|
-
for (const a of o)
|
|
2303
|
-
for (const s of i) {
|
|
2304
|
-
const h = Kr(t, a, s, r);
|
|
2305
|
-
h && (!c || h.totalWeight < c.totalWeight) && (c = h);
|
|
2306
|
-
}
|
|
2307
|
-
return c;
|
|
2308
|
-
}
|
|
2309
|
-
function zr(t, n, e, r = {}) {
|
|
2310
|
-
return Br(
|
|
2311
|
-
t,
|
|
2312
|
-
on(t, n),
|
|
2313
|
-
on(t, e),
|
|
2314
|
-
r
|
|
2315
|
-
);
|
|
2316
|
-
}
|
|
2317
|
-
function Li(t, n, e, r = {}) {
|
|
2318
|
-
return zr(
|
|
2319
|
-
t,
|
|
2320
|
-
[n],
|
|
2321
|
-
e,
|
|
2322
|
-
r
|
|
2323
|
-
);
|
|
2445
|
+
return b;
|
|
2324
2446
|
}
|
|
2325
|
-
function
|
|
2326
|
-
const n =
|
|
2447
|
+
function Xi(t) {
|
|
2448
|
+
const n = Qn(t.theme), e = new Map(
|
|
2327
2449
|
t.assignments.map((s) => [s.shapeId, s])
|
|
2328
2450
|
), r = new Map(
|
|
2329
2451
|
(t.retailers ?? []).map((s) => [s.id, s])
|
|
2330
2452
|
), o = t.resolveSvgUrl ?? ((s) => s), i = t.levels.filter((s) => s.isActive).sort((s, h) => s.ordering - h.ordering).map((s) => {
|
|
2331
|
-
const h = t.shapes.filter((
|
|
2332
|
-
const
|
|
2453
|
+
const h = t.shapes.filter((u) => u.levelId === s.id).map((u) => {
|
|
2454
|
+
const b = In(u.geometry), l = e.get(u.id) ?? null, d = (l == null ? void 0 : l.retailerId) != null ? r.get(l.retailerId) ?? null : null, f = d && !t.persistMediaKeys ? { ...d, logoKey: null } : d;
|
|
2333
2455
|
return {
|
|
2334
|
-
...
|
|
2335
|
-
geometry:
|
|
2336
|
-
bbox:
|
|
2337
|
-
assignment:
|
|
2338
|
-
label:
|
|
2456
|
+
...u,
|
|
2457
|
+
geometry: b,
|
|
2458
|
+
bbox: b === u.geometry ? u.bbox : Tt(b),
|
|
2459
|
+
assignment: l,
|
|
2460
|
+
label: hn(u, l, f)
|
|
2339
2461
|
};
|
|
2340
|
-
}), y = t.anchors.filter((
|
|
2462
|
+
}), y = t.anchors.filter((u) => u.levelId === s.id);
|
|
2341
2463
|
return {
|
|
2342
2464
|
id: s.id,
|
|
2343
2465
|
buildingId: s.buildingId,
|
|
@@ -2351,7 +2473,7 @@ function Ni(t) {
|
|
|
2351
2473
|
shapes: h,
|
|
2352
2474
|
anchors: y
|
|
2353
2475
|
};
|
|
2354
|
-
}), { nodes: c, edges: a } =
|
|
2476
|
+
}), { nodes: c, edges: a } = nr(
|
|
2355
2477
|
t.anchors,
|
|
2356
2478
|
t.edges,
|
|
2357
2479
|
t.connectors
|
|
@@ -2370,14 +2492,15 @@ function Ni(t) {
|
|
|
2370
2492
|
connectors: t.connectors,
|
|
2371
2493
|
amenities: t.amenities.filter((s) => s.isActive),
|
|
2372
2494
|
retailers: (t.retailers ?? []).map(
|
|
2373
|
-
(s) =>
|
|
2495
|
+
(s) => jr(s, !!t.persistMediaKeys)
|
|
2374
2496
|
),
|
|
2375
2497
|
graph: { nodes: c, edges: a },
|
|
2376
2498
|
responsiveOverrides: t.responsiveOverrides,
|
|
2499
|
+
georeference: ne(t.georeference),
|
|
2377
2500
|
publishedAt: t.publishedAt ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
2378
2501
|
};
|
|
2379
2502
|
}
|
|
2380
|
-
function
|
|
2503
|
+
function jr(t, n) {
|
|
2381
2504
|
return {
|
|
2382
2505
|
id: t.id,
|
|
2383
2506
|
name: t.name,
|
|
@@ -2389,16 +2512,16 @@ function Gr(t, n) {
|
|
|
2389
2512
|
globalRetailerId: t.globalRetailerId ?? null
|
|
2390
2513
|
};
|
|
2391
2514
|
}
|
|
2392
|
-
function
|
|
2515
|
+
function Hi(t) {
|
|
2393
2516
|
let n = !1;
|
|
2394
2517
|
const e = t.levels.map((r) => {
|
|
2395
2518
|
let o = !1;
|
|
2396
2519
|
const i = r.shapes.map((c) => {
|
|
2397
|
-
const a =
|
|
2520
|
+
const a = In(c.geometry), s = hn(c, c.assignment), h = a !== c.geometry, y = s !== c.label;
|
|
2398
2521
|
return !h && !y ? c : (o = !0, {
|
|
2399
2522
|
...c,
|
|
2400
2523
|
geometry: a,
|
|
2401
|
-
bbox: h ?
|
|
2524
|
+
bbox: h ? Tt(a) : c.bbox,
|
|
2402
2525
|
label: s
|
|
2403
2526
|
});
|
|
2404
2527
|
});
|
|
@@ -2406,48 +2529,48 @@ function vi(t) {
|
|
|
2406
2529
|
});
|
|
2407
2530
|
return n ? { ...t, levels: e } : t;
|
|
2408
2531
|
}
|
|
2409
|
-
const
|
|
2532
|
+
const Ui = [
|
|
2410
2533
|
"admin_portal",
|
|
2411
2534
|
"desktop",
|
|
2412
2535
|
"tablet",
|
|
2413
2536
|
"mobile",
|
|
2414
2537
|
"display_app"
|
|
2415
|
-
],
|
|
2538
|
+
], Vi = [
|
|
2416
2539
|
{ id: "admin_portal", label: "Admin Portal" },
|
|
2417
2540
|
{ id: "desktop", label: "Desktop" },
|
|
2418
2541
|
{ id: "tablet", label: "Tablet" },
|
|
2419
2542
|
{ id: "mobile", label: "Mobile" },
|
|
2420
2543
|
{ id: "display_app", label: "Kiosk App" }
|
|
2421
|
-
],
|
|
2422
|
-
function
|
|
2544
|
+
], qr = 1024, Qr = 767;
|
|
2545
|
+
function Wi(t) {
|
|
2423
2546
|
return t === "admin_portal" || t === "display_app" || t === "desktop" || t === "tablet" || t === "mobile";
|
|
2424
2547
|
}
|
|
2425
|
-
function
|
|
2426
|
-
return t === "PORTAL_ASSIGN" ? "admin_portal" : t === "DISPLAY_APP" ? "display_app" : n >
|
|
2548
|
+
function Zi(t, n) {
|
|
2549
|
+
return t === "PORTAL_ASSIGN" ? "admin_portal" : t === "DISPLAY_APP" ? "display_app" : n > qr ? "desktop" : n > Qr ? "tablet" : "mobile";
|
|
2427
2550
|
}
|
|
2428
|
-
function
|
|
2551
|
+
function Jr(t, n) {
|
|
2429
2552
|
return `${t ?? "none"}:${n}`;
|
|
2430
2553
|
}
|
|
2431
|
-
function
|
|
2432
|
-
return `${e ? "capture" : "viewer"}:${
|
|
2554
|
+
function ji(t, n, e) {
|
|
2555
|
+
return `${e ? "capture" : "viewer"}:${Jr(t, n)}`;
|
|
2433
2556
|
}
|
|
2434
2557
|
function sn(t) {
|
|
2435
2558
|
return t ? t.x === 0 && t.y === 0 && t.z === 0 : !0;
|
|
2436
2559
|
}
|
|
2437
|
-
function
|
|
2560
|
+
function En(t) {
|
|
2438
2561
|
var e;
|
|
2439
2562
|
if (!t) return !0;
|
|
2440
2563
|
const n = (e = t.camera) == null ? void 0 : e.zoom;
|
|
2441
2564
|
return typeof n == "number" && Number.isFinite(n) && n > 0 ? !1 : sn(t.camera) && sn(t.controls);
|
|
2442
2565
|
}
|
|
2443
|
-
function
|
|
2566
|
+
function qi(t, n, e) {
|
|
2444
2567
|
if (!(t != null && t.length) || n == null) return null;
|
|
2445
2568
|
const r = t.find(
|
|
2446
2569
|
(o) => o.levelId === n && o.device === e
|
|
2447
2570
|
);
|
|
2448
|
-
return !r ||
|
|
2571
|
+
return !r || En(r) ? null : r;
|
|
2449
2572
|
}
|
|
2450
|
-
function
|
|
2573
|
+
function Qi(t) {
|
|
2451
2574
|
const n = t.camera.zoom;
|
|
2452
2575
|
return {
|
|
2453
2576
|
zoom: typeof n == "number" && Number.isFinite(n) && n > 0 ? n : 0,
|
|
@@ -2455,7 +2578,7 @@ function Ki(t) {
|
|
|
2455
2578
|
target: [t.controls.x, t.controls.y, t.controls.z]
|
|
2456
2579
|
};
|
|
2457
2580
|
}
|
|
2458
|
-
function
|
|
2581
|
+
function Ji(t) {
|
|
2459
2582
|
return {
|
|
2460
2583
|
camera: {
|
|
2461
2584
|
x: t.position[0],
|
|
@@ -2470,21 +2593,21 @@ function Yi(t) {
|
|
|
2470
2593
|
}
|
|
2471
2594
|
};
|
|
2472
2595
|
}
|
|
2473
|
-
const
|
|
2596
|
+
const to = {
|
|
2474
2597
|
x: 0,
|
|
2475
2598
|
y: 0,
|
|
2476
2599
|
z: 0,
|
|
2477
2600
|
zoom: 0
|
|
2478
|
-
},
|
|
2479
|
-
function
|
|
2601
|
+
}, no = { x: 0, y: 0, z: 0 };
|
|
2602
|
+
function ts(t, n) {
|
|
2480
2603
|
return {
|
|
2481
2604
|
levelId: t,
|
|
2482
2605
|
device: n,
|
|
2483
|
-
camera: { ...
|
|
2484
|
-
controls: { ...
|
|
2606
|
+
camera: { ...to },
|
|
2607
|
+
controls: { ...no }
|
|
2485
2608
|
};
|
|
2486
2609
|
}
|
|
2487
|
-
function
|
|
2610
|
+
function eo(t, n) {
|
|
2488
2611
|
const e = {
|
|
2489
2612
|
id: n.id ?? 0,
|
|
2490
2613
|
mapId: n.mapId ?? 0,
|
|
@@ -2504,257 +2627,268 @@ function Zr(t, n) {
|
|
|
2504
2627
|
mapId: n.mapId ?? t[r].mapId
|
|
2505
2628
|
}, o;
|
|
2506
2629
|
}
|
|
2507
|
-
function
|
|
2630
|
+
function ns(t, n) {
|
|
2508
2631
|
let e = t;
|
|
2509
2632
|
for (const r of n) {
|
|
2510
|
-
if (
|
|
2633
|
+
if (En(r)) {
|
|
2511
2634
|
e = e.filter(
|
|
2512
2635
|
(o) => !(o.levelId === r.levelId && o.device === r.device)
|
|
2513
2636
|
);
|
|
2514
2637
|
continue;
|
|
2515
2638
|
}
|
|
2516
|
-
e =
|
|
2639
|
+
e = eo(e, r);
|
|
2517
2640
|
}
|
|
2518
2641
|
return e;
|
|
2519
2642
|
}
|
|
2520
2643
|
export {
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2644
|
+
ge as $,
|
|
2645
|
+
le as A,
|
|
2646
|
+
br as B,
|
|
2647
|
+
ce as C,
|
|
2525
2648
|
dt as D,
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2649
|
+
to as E,
|
|
2650
|
+
Ct as F,
|
|
2651
|
+
fi as G,
|
|
2652
|
+
Ko as H,
|
|
2653
|
+
so as I,
|
|
2654
|
+
we as J,
|
|
2655
|
+
Cr as K,
|
|
2656
|
+
Io as L,
|
|
2657
|
+
Zo as M,
|
|
2658
|
+
ze as N,
|
|
2659
|
+
Go as O,
|
|
2537
2660
|
lt as P,
|
|
2538
2661
|
Wt as Q,
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2662
|
+
qr as R,
|
|
2663
|
+
ke as S,
|
|
2664
|
+
Lt as T,
|
|
2665
|
+
de as U,
|
|
2666
|
+
fo as V,
|
|
2544
2667
|
cn as W,
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2668
|
+
Ie as X,
|
|
2669
|
+
M as Y,
|
|
2670
|
+
xe as Z,
|
|
2671
|
+
yn as _,
|
|
2672
|
+
po as a,
|
|
2673
|
+
Ue as a$,
|
|
2674
|
+
Fo as a0,
|
|
2675
|
+
Eo as a1,
|
|
2676
|
+
wo as a2,
|
|
2677
|
+
Gt as a3,
|
|
2678
|
+
Ye as a4,
|
|
2679
|
+
ci as a5,
|
|
2680
|
+
hi as a6,
|
|
2681
|
+
jo as a7,
|
|
2682
|
+
Ve as a8,
|
|
2683
|
+
Do as a9,
|
|
2684
|
+
er as aA,
|
|
2685
|
+
lr as aB,
|
|
2686
|
+
qi as aC,
|
|
2687
|
+
sr as aD,
|
|
2688
|
+
cr as aE,
|
|
2689
|
+
oi as aF,
|
|
2690
|
+
si as aG,
|
|
2691
|
+
Vo as aH,
|
|
2569
2692
|
ht as aI,
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2693
|
+
Mi as aJ,
|
|
2694
|
+
Tt as aK,
|
|
2695
|
+
We as aL,
|
|
2696
|
+
ve as aM,
|
|
2697
|
+
Me as aN,
|
|
2698
|
+
Re as aO,
|
|
2699
|
+
Bo as aP,
|
|
2700
|
+
Bi as aQ,
|
|
2701
|
+
Rr as aR,
|
|
2702
|
+
mn as aS,
|
|
2703
|
+
Di as aT,
|
|
2704
|
+
ye as aU,
|
|
2705
|
+
mo as aV,
|
|
2706
|
+
Wi as aW,
|
|
2707
|
+
En as aX,
|
|
2708
|
+
sn as aY,
|
|
2709
|
+
ie as aZ,
|
|
2710
|
+
oe as a_,
|
|
2711
|
+
dn as aa,
|
|
2712
|
+
$e as ab,
|
|
2713
|
+
bo as ac,
|
|
2714
|
+
qn as ad,
|
|
2592
2715
|
un as ae,
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2716
|
+
Dr as af,
|
|
2717
|
+
Oo as ag,
|
|
2718
|
+
Ee as ah,
|
|
2719
|
+
ao as ai,
|
|
2720
|
+
Xi as aj,
|
|
2721
|
+
nr as ak,
|
|
2722
|
+
Po as al,
|
|
2723
|
+
io as am,
|
|
2601
2724
|
vt as an,
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2725
|
+
So as ao,
|
|
2726
|
+
Te as ap,
|
|
2727
|
+
Zi as aq,
|
|
2728
|
+
Gi as ar,
|
|
2729
|
+
pi as as,
|
|
2607
2730
|
v as at,
|
|
2608
|
-
|
|
2609
|
-
|
|
2731
|
+
ts as au,
|
|
2732
|
+
Ao as av,
|
|
2610
2733
|
Ut as aw,
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2734
|
+
jt as ax,
|
|
2735
|
+
zi as ay,
|
|
2736
|
+
ar as az,
|
|
2737
|
+
se as b,
|
|
2738
|
+
No as b$,
|
|
2739
|
+
me as b0,
|
|
2740
|
+
Er as b1,
|
|
2741
|
+
An as b2,
|
|
2742
|
+
Cn as b3,
|
|
2743
|
+
ti as b4,
|
|
2744
|
+
wt as b5,
|
|
2745
|
+
X as b6,
|
|
2746
|
+
Sn as b7,
|
|
2747
|
+
nn as b8,
|
|
2748
|
+
tn as b9,
|
|
2749
|
+
Ti as bA,
|
|
2750
|
+
co as bB,
|
|
2751
|
+
uo as bC,
|
|
2752
|
+
Qi as bD,
|
|
2753
|
+
Kt as bE,
|
|
2754
|
+
vo as bF,
|
|
2755
|
+
ne as bG,
|
|
2756
|
+
Ro as bH,
|
|
2757
|
+
zr as bI,
|
|
2758
|
+
Jt as bJ,
|
|
2636
2759
|
Ze as bK,
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2760
|
+
bn as bL,
|
|
2761
|
+
Be as bM,
|
|
2762
|
+
ai as bN,
|
|
2763
|
+
Xt as bO,
|
|
2764
|
+
zt as bP,
|
|
2765
|
+
Ce as bQ,
|
|
2766
|
+
Ji as bR,
|
|
2767
|
+
qe as bS,
|
|
2768
|
+
at as bT,
|
|
2769
|
+
hn as bU,
|
|
2770
|
+
qt as bV,
|
|
2771
|
+
$i as bW,
|
|
2772
|
+
ft as bX,
|
|
2773
|
+
ut as bY,
|
|
2774
|
+
$t as bZ,
|
|
2775
|
+
Lo as b_,
|
|
2776
|
+
Yo as ba,
|
|
2777
|
+
Rn as bb,
|
|
2778
|
+
W as bc,
|
|
2779
|
+
Mt as bd,
|
|
2780
|
+
Gn as be,
|
|
2781
|
+
Ke as bf,
|
|
2782
|
+
Oe as bg,
|
|
2783
|
+
To as bh,
|
|
2784
|
+
_o as bi,
|
|
2785
|
+
ko as bj,
|
|
2786
|
+
Se as bk,
|
|
2787
|
+
Qo as bl,
|
|
2788
|
+
or as bm,
|
|
2789
|
+
xo as bn,
|
|
2790
|
+
_t as bo,
|
|
2791
|
+
ns as bp,
|
|
2792
|
+
Qn as bq,
|
|
2793
|
+
yi as br,
|
|
2794
|
+
j as bs,
|
|
2795
|
+
li as bt,
|
|
2796
|
+
Ho as bu,
|
|
2797
|
+
In as bv,
|
|
2798
|
+
go as bw,
|
|
2799
|
+
yt as bx,
|
|
2800
|
+
ln as by,
|
|
2801
|
+
Hi as bz,
|
|
2802
|
+
V as c,
|
|
2803
|
+
Ai as c$,
|
|
2804
|
+
gr as c0,
|
|
2805
|
+
Ki as c1,
|
|
2806
|
+
Jr as c2,
|
|
2807
|
+
ji as c3,
|
|
2808
|
+
Co as c4,
|
|
2809
|
+
Le as c5,
|
|
2810
|
+
je as c6,
|
|
2811
|
+
Ae as c7,
|
|
2812
|
+
Yt as c8,
|
|
2813
|
+
di as c9,
|
|
2814
|
+
Jo as cA,
|
|
2815
|
+
ni as cB,
|
|
2816
|
+
pn as cC,
|
|
2817
|
+
kn as cD,
|
|
2818
|
+
mr as cE,
|
|
2819
|
+
ri as cF,
|
|
2820
|
+
Uo as cG,
|
|
2821
|
+
Ne as cH,
|
|
2822
|
+
De as cI,
|
|
2823
|
+
ii as cJ,
|
|
2824
|
+
xr as cK,
|
|
2825
|
+
Yi as cL,
|
|
2826
|
+
Pi as cM,
|
|
2827
|
+
Fi as cN,
|
|
2828
|
+
ei as cO,
|
|
2829
|
+
yr as cP,
|
|
2830
|
+
$o as cQ,
|
|
2831
|
+
Li as cR,
|
|
2832
|
+
Ci as cS,
|
|
2833
|
+
Ei as cT,
|
|
2834
|
+
Ni as cU,
|
|
2835
|
+
gi as cV,
|
|
2836
|
+
_i as cW,
|
|
2837
|
+
fr as cX,
|
|
2838
|
+
Si as cY,
|
|
2839
|
+
ki as cZ,
|
|
2840
|
+
vi as c_,
|
|
2841
|
+
q as ca,
|
|
2842
|
+
gn as cb,
|
|
2843
|
+
xi as cc,
|
|
2844
|
+
yo as cd,
|
|
2845
|
+
Pe as ce,
|
|
2846
|
+
Ii as cf,
|
|
2847
|
+
mi as cg,
|
|
2848
|
+
_r as ch,
|
|
2849
|
+
Wo as ci,
|
|
2850
|
+
ir as cj,
|
|
2851
|
+
ui as ck,
|
|
2852
|
+
lo as cl,
|
|
2853
|
+
bi as cm,
|
|
2854
|
+
Ir as cn,
|
|
2855
|
+
Kn as co,
|
|
2856
|
+
U as cp,
|
|
2857
|
+
Dn as cq,
|
|
2858
|
+
zn as cr,
|
|
2859
|
+
Bn as cs,
|
|
2860
|
+
xn as ct,
|
|
2861
|
+
Mr as cu,
|
|
2862
|
+
qo as cv,
|
|
2863
|
+
Et as cw,
|
|
2864
|
+
Zr as cx,
|
|
2865
|
+
eo as cy,
|
|
2866
|
+
Ht as cz,
|
|
2867
|
+
ho as d,
|
|
2868
|
+
Oi as d0,
|
|
2869
|
+
Ri as d1,
|
|
2870
|
+
wi as d2,
|
|
2871
|
+
_n as e,
|
|
2872
|
+
no as f,
|
|
2739
2873
|
ct as g,
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2874
|
+
Nt as h,
|
|
2875
|
+
Fr as i,
|
|
2876
|
+
Pr as j,
|
|
2877
|
+
Jn as k,
|
|
2878
|
+
re as l,
|
|
2879
|
+
Xo as m,
|
|
2880
|
+
zo as n,
|
|
2881
|
+
Fn as o,
|
|
2882
|
+
Ui as p,
|
|
2883
|
+
Vi as q,
|
|
2884
|
+
Qr as r,
|
|
2885
|
+
ae as s,
|
|
2886
|
+
On as t,
|
|
2887
|
+
pt as u,
|
|
2888
|
+
wn as v,
|
|
2755
2889
|
an as w,
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2890
|
+
Pn as x,
|
|
2891
|
+
tr as y,
|
|
2892
|
+
Mo as z
|
|
2759
2893
|
};
|
|
2760
2894
|
//# sourceMappingURL=responsive.js.map
|