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