@eyeon/map 2.0.17 → 2.0.19

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