@eyeon/map 2.0.10 → 2.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/MapViewer.js +1 -1
- package/dist/chunks/MapViewer.js.map +1 -1
- package/dist/chunks/stacking.js +312 -308
- package/dist/chunks/stacking.js.map +1 -1
- package/dist/core/index.js +46 -45
- package/dist/core/mediaUrl.d.ts +6 -1
- package/dist/core/mediaUrl.d.ts.map +1 -1
- package/dist/editor/MapEditor.d.ts +3 -3
- package/dist/editor/index.js +1 -1
- package/dist/editor/index.js.map +1 -1
- package/dist/viewer/MapViewer.d.ts +3 -3
- package/dist/viewer/components/LevelMeshes.d.ts +1 -1
- package/dist/viewer/components/LevelMeshes.d.ts.map +1 -1
- package/dist/viewer/index.js +4 -4
- package/package.json +1 -1
package/dist/chunks/stacking.js
CHANGED
|
@@ -91,7 +91,7 @@ function ee(t, e) {
|
|
|
91
91
|
}
|
|
92
92
|
return o;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function vn(t) {
|
|
95
95
|
return ee(
|
|
96
96
|
t.flatMap((e) => [...e.shapes]),
|
|
97
97
|
{ omitStaticLayers: !0 }
|
|
@@ -134,22 +134,22 @@ const le = [
|
|
|
134
134
|
"connector",
|
|
135
135
|
"entrance",
|
|
136
136
|
"parking_zone"
|
|
137
|
-
], ut = 1e4,
|
|
138
|
-
function
|
|
137
|
+
], ut = 1e4, Nn = 2.5, ue = "entrance", Tn = 36, fe = 8;
|
|
138
|
+
function wn(t) {
|
|
139
139
|
var e;
|
|
140
140
|
return t.kind === "entrance" && ((e = t.label) == null ? void 0 : e.imageKey) === ue;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function Pn(t) {
|
|
143
143
|
return Math.max(fe, t);
|
|
144
144
|
}
|
|
145
|
-
const
|
|
146
|
-
function
|
|
145
|
+
const Fn = ["left", "center", "right"], de = "center";
|
|
146
|
+
function Yn(t) {
|
|
147
147
|
return t === "left" || t === "right" ? t : de;
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function Dn(t, e) {
|
|
150
150
|
return e === "left" ? t.minX : e === "right" ? t.maxX : (t.minX + t.maxX) / 2;
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function Bn(t) {
|
|
153
153
|
return t === "left" ? "start" : t === "right" ? "end" : "middle";
|
|
154
154
|
}
|
|
155
155
|
const J = 12, he = J, ye = 4, xe = [
|
|
@@ -167,15 +167,15 @@ function U(t, e) {
|
|
|
167
167
|
return Number.isFinite(n) ? n : e;
|
|
168
168
|
}
|
|
169
169
|
const me = /^(?:|[+\-]|[+\-]?\.(?:0*)?)$/;
|
|
170
|
-
function
|
|
170
|
+
function be(t) {
|
|
171
171
|
const e = t.trim();
|
|
172
172
|
if (me.test(e))
|
|
173
173
|
return { render: 0, complete: !1 };
|
|
174
174
|
const n = Number(e);
|
|
175
175
|
return Number.isFinite(n) ? { render: n, complete: !0 } : { render: 0, complete: !1 };
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
const e =
|
|
177
|
+
function Xn(t) {
|
|
178
|
+
const e = be(t);
|
|
179
179
|
return e.complete ? { display: String(e.render), render: e.render } : { display: "0", render: 0 };
|
|
180
180
|
}
|
|
181
181
|
function w(t) {
|
|
@@ -183,7 +183,7 @@ function w(t) {
|
|
|
183
183
|
const e = String(t).trim();
|
|
184
184
|
return e || null;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function ge(t) {
|
|
187
187
|
if (t == null) return null;
|
|
188
188
|
const e = String(t);
|
|
189
189
|
return e === "" ? null : e;
|
|
@@ -199,10 +199,10 @@ function ke(t) {
|
|
|
199
199
|
function Pt(t) {
|
|
200
200
|
return t === "amenity" ? "amenity" : t === "kiosk_screen" ? "kiosk" : t === "connector" ? "connector" : "retail_name";
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function Kn(t) {
|
|
203
203
|
return t === "amenity" ? "amenity" : t === "kiosk_screen" ? "kiosk" : t === "unit" || t === "parking_zone" ? "retailer" : "none";
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function Gn(t, e) {
|
|
206
206
|
return {
|
|
207
207
|
shapeId: t,
|
|
208
208
|
targetType: "none",
|
|
@@ -222,7 +222,7 @@ function Kn(t, e) {
|
|
|
222
222
|
textColor: null
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function $n(t, e = "unit") {
|
|
226
226
|
const n = t.layerType ?? t.layer_type, o = t.unitStatus ?? t.unit_status ?? "vacant";
|
|
227
227
|
return {
|
|
228
228
|
shapeId: U(
|
|
@@ -243,7 +243,7 @@ function Gn(t, e = "unit") {
|
|
|
243
243
|
unitNumber: w(
|
|
244
244
|
t.unitNumber ?? t.unit_number
|
|
245
245
|
),
|
|
246
|
-
customLabel:
|
|
246
|
+
customLabel: ge(
|
|
247
247
|
t.customLabel ?? t.custom_label
|
|
248
248
|
),
|
|
249
249
|
customImageKey: w(
|
|
@@ -272,34 +272,34 @@ function Gn(t, e = "unit") {
|
|
|
272
272
|
function Ie(t) {
|
|
273
273
|
if (t === "left" || t === "right" || t === "center") return t;
|
|
274
274
|
}
|
|
275
|
-
function
|
|
275
|
+
function zn(t, e) {
|
|
276
276
|
const n = (t.location ?? "").trim();
|
|
277
277
|
return e && n && n !== "-" ? `${t.name} (${n})` : t.name;
|
|
278
278
|
}
|
|
279
|
-
function
|
|
279
|
+
function Wn(t, e) {
|
|
280
280
|
var o;
|
|
281
281
|
const n = (o = t == null ? void 0 : t.bgColor) == null ? void 0 : o.trim();
|
|
282
282
|
return ht(n) ? "transparent" : n || e;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function Un(t, e) {
|
|
285
285
|
var o;
|
|
286
286
|
const n = (o = t == null ? void 0 : t.textColor) == null ? void 0 : o.trim();
|
|
287
287
|
return ht(n) ? "transparent" : n || e;
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function Vn(t) {
|
|
290
290
|
const e = t.trim();
|
|
291
291
|
if (!e || !/^\d+$/.test(e)) return null;
|
|
292
292
|
const n = Number(e);
|
|
293
293
|
return Number.isSafeInteger(n) && n > 0 ? n : null;
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function Hn(t, e) {
|
|
296
296
|
var r;
|
|
297
297
|
const n = e == null ? void 0 : e.trim();
|
|
298
298
|
if (n) return n;
|
|
299
299
|
const o = (r = t == null ? void 0 : t.customLabel) == null ? void 0 : r.trim();
|
|
300
300
|
return o || ((t == null ? void 0 : t.amenityId) != null ? `Amenity ${t.amenityId}` : null);
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function Zn(t, e) {
|
|
303
303
|
var r;
|
|
304
304
|
const n = (r = t == null ? void 0 : t.customLabel) == null ? void 0 : r.trim();
|
|
305
305
|
if (n) return n;
|
|
@@ -318,7 +318,7 @@ const _e = /* @__PURE__ */ new Set([
|
|
|
318
318
|
]);
|
|
319
319
|
function Ft(t, e, n) {
|
|
320
320
|
var o, r;
|
|
321
|
-
return t.kind === "label" || t.kind === "entrance" ? t.label : t.kind === "connector" || (e == null ? void 0 : e.layerType) === "connector" ? e ?
|
|
321
|
+
return t.kind === "label" || t.kind === "entrance" ? t.label : t.kind === "connector" || (e == null ? void 0 : e.layerType) === "connector" ? e ? bt(
|
|
322
322
|
{ style: t.style ?? {}, label: t.label },
|
|
323
323
|
e,
|
|
324
324
|
n
|
|
@@ -326,7 +326,7 @@ function Ft(t, e, n) {
|
|
|
326
326
|
...t.label,
|
|
327
327
|
text: void 0,
|
|
328
328
|
imageKey: void 0
|
|
329
|
-
} :
|
|
329
|
+
} : bt(
|
|
330
330
|
{ style: t.style ?? {}, label: t.label },
|
|
331
331
|
e,
|
|
332
332
|
n
|
|
@@ -344,7 +344,7 @@ function Yt(t, e, n) {
|
|
|
344
344
|
if (!(!X(t) || !t) && !(t.layerType !== "retail_logo" && t.layerType !== "custom_image"))
|
|
345
345
|
return Se(t, e) ?? w(n == null ? void 0 : n.imageKey) ?? void 0;
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function jn(t, e) {
|
|
348
348
|
var n, o;
|
|
349
349
|
if (!(!X(t) || !t)) {
|
|
350
350
|
if (t.layerType === "kiosk") return "kiosk";
|
|
@@ -356,7 +356,7 @@ function Ae(t, e) {
|
|
|
356
356
|
const n = Number.isFinite(t) && t > 0 ? t : J;
|
|
357
357
|
return (e == null ? void 0 : e.layerType) === "retail_logo" ? n * ye : n;
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function qn(t) {
|
|
360
360
|
const e = t.assignment, n = t.label;
|
|
361
361
|
return {
|
|
362
362
|
size: Ae(
|
|
@@ -368,7 +368,7 @@ function jn(t) {
|
|
|
368
368
|
iconColor: (e == null ? void 0 : e.textColor) ?? (n == null ? void 0 : n.color) ?? null
|
|
369
369
|
};
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function Qn(t, e) {
|
|
372
372
|
var n;
|
|
373
373
|
return X(t) ? (t == null ? void 0 : t.layerType) === "kiosk" || (t == null ? void 0 : t.layerType) === "amenity" || Yt(t, null, e) ? !0 : !!((n = e == null ? void 0 : e.text) != null && n.trim()) : !1;
|
|
374
374
|
}
|
|
@@ -390,7 +390,7 @@ function mt(t) {
|
|
|
390
390
|
const e = t[0];
|
|
391
391
|
return t.some((n) => n !== e);
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function Jn(t) {
|
|
394
394
|
const e = t.map((o) => o.bgColor ?? ""), n = t.map((o) => o.textColor ?? "");
|
|
395
395
|
return {
|
|
396
396
|
size: ot(t.map((o) => o.size)),
|
|
@@ -400,7 +400,7 @@ function Qn(t) {
|
|
|
400
400
|
textColorMixed: mt(n)
|
|
401
401
|
};
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function to(t, e) {
|
|
404
404
|
return {
|
|
405
405
|
...t,
|
|
406
406
|
...e.size != null ? { size: e.size } : {},
|
|
@@ -408,7 +408,7 @@ function Jn(t, e) {
|
|
|
408
408
|
...e.textColor !== void 0 ? { textColor: e.textColor } : {}
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function bt(t, e, n) {
|
|
412
412
|
const o = Yt(e, n, t.label), r = X(e) ? o ? void 0 : Ce(e, n) ?? t.label.text : void 0;
|
|
413
413
|
return {
|
|
414
414
|
style: {
|
|
@@ -428,7 +428,7 @@ function gt(t, e, n) {
|
|
|
428
428
|
}
|
|
429
429
|
};
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function eo(t) {
|
|
432
432
|
return t === "PORTAL" ? "editor" : "viewer";
|
|
433
433
|
}
|
|
434
434
|
const rt = {
|
|
@@ -448,23 +448,26 @@ const rt = {
|
|
|
448
448
|
kioskOrigin: !0
|
|
449
449
|
}
|
|
450
450
|
};
|
|
451
|
-
function
|
|
451
|
+
function no(t) {
|
|
452
452
|
return Le[t];
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function oo(t) {
|
|
455
455
|
return t !== "PORTAL";
|
|
456
456
|
}
|
|
457
|
-
function
|
|
458
|
-
return
|
|
457
|
+
function Oe(t) {
|
|
458
|
+
return /^https?:\/\//i.test(t.trim());
|
|
459
459
|
}
|
|
460
460
|
function ro(t, e) {
|
|
461
|
+
return !e || !Oe(t) ? t : e + encodeURIComponent(t);
|
|
462
|
+
}
|
|
463
|
+
function io(t, e) {
|
|
461
464
|
return t.map((n) => ({ x: n.x, y: e - n.y }));
|
|
462
465
|
}
|
|
463
466
|
function P(t, e) {
|
|
464
467
|
const n = t.x - e.x, o = t.y - e.y;
|
|
465
468
|
return Math.hypot(n, o);
|
|
466
469
|
}
|
|
467
|
-
function
|
|
470
|
+
function Me(t) {
|
|
468
471
|
if (t.length === 0)
|
|
469
472
|
return { minX: 0, minY: 0, maxX: 0, maxY: 0 };
|
|
470
473
|
let e = t[0].x, n = t[0].y, o = t[0].x, r = t[0].y;
|
|
@@ -474,7 +477,7 @@ function Oe(t) {
|
|
|
474
477
|
}
|
|
475
478
|
return { minX: e, minY: n, maxX: o, maxY: r };
|
|
476
479
|
}
|
|
477
|
-
function
|
|
480
|
+
function so(t, e) {
|
|
478
481
|
return {
|
|
479
482
|
minX: Math.min(t.minX, e.minX),
|
|
480
483
|
minY: Math.min(t.minY, e.minY),
|
|
@@ -482,14 +485,14 @@ function io(t, e) {
|
|
|
482
485
|
maxY: Math.max(t.maxY, e.maxY)
|
|
483
486
|
};
|
|
484
487
|
}
|
|
485
|
-
function
|
|
488
|
+
function Ee(t) {
|
|
486
489
|
if (t.length === 0) return { x: 0, y: 0 };
|
|
487
490
|
let e = 0, n = 0;
|
|
488
491
|
for (const o of t)
|
|
489
492
|
e += o.x, n += o.y;
|
|
490
493
|
return { x: e / t.length, y: n / t.length };
|
|
491
494
|
}
|
|
492
|
-
function
|
|
495
|
+
function Re(t, e) {
|
|
493
496
|
let n = !1;
|
|
494
497
|
for (let o = 0, r = e.length - 1; o < e.length; r = o++) {
|
|
495
498
|
const s = e[o].x, u = e[o].y, a = e[r].x, i = e[r].y;
|
|
@@ -497,10 +500,10 @@ function Ee(t, e) {
|
|
|
497
500
|
}
|
|
498
501
|
return n;
|
|
499
502
|
}
|
|
500
|
-
function
|
|
501
|
-
return e.some((n) =>
|
|
503
|
+
function co(t, e) {
|
|
504
|
+
return e.some((n) => Re(t, n));
|
|
502
505
|
}
|
|
503
|
-
function
|
|
506
|
+
function ve(t, e, n) {
|
|
504
507
|
const o = n.x - e.x, r = n.y - e.y, s = o * o + r * r;
|
|
505
508
|
if (s === 0)
|
|
506
509
|
return { point: { ...e }, t: 0, distance: P(t, e) };
|
|
@@ -509,16 +512,16 @@ function Re(t, e, n) {
|
|
|
509
512
|
const a = { x: e.x + u * o, y: e.y + u * r };
|
|
510
513
|
return { point: a, t: u, distance: P(t, a) };
|
|
511
514
|
}
|
|
512
|
-
function
|
|
515
|
+
function ao(t, e) {
|
|
513
516
|
if (e.length < 2) return null;
|
|
514
517
|
let n = null;
|
|
515
518
|
for (let o = 0; o < e.length - 1; o++) {
|
|
516
|
-
const r =
|
|
519
|
+
const r = ve(t, e[o], e[o + 1]);
|
|
517
520
|
(!n || r.distance < n.distance) && (n = { point: r.point, segmentIndex: o, distance: r.distance });
|
|
518
521
|
}
|
|
519
522
|
return n;
|
|
520
523
|
}
|
|
521
|
-
function
|
|
524
|
+
function gt(t, e, n, o, r = 8) {
|
|
522
525
|
const s = [];
|
|
523
526
|
for (let u = 0; u <= r; u++) {
|
|
524
527
|
const a = u / r, i = 1 - a;
|
|
@@ -540,8 +543,8 @@ function kt(t, e, n, o = 6) {
|
|
|
540
543
|
}
|
|
541
544
|
return r;
|
|
542
545
|
}
|
|
543
|
-
const
|
|
544
|
-
function
|
|
546
|
+
const Ne = 8;
|
|
547
|
+
function Te(t, e, n, o, r, s, u) {
|
|
545
548
|
if (t.x === u.x && t.y === u.y) return [{ ...t }];
|
|
546
549
|
let a = Math.abs(e), i = Math.abs(n);
|
|
547
550
|
if (a === 0 || i === 0 || !Number.isFinite(a) || !Number.isFinite(i))
|
|
@@ -551,10 +554,10 @@ function Ne(t, e, n, o, r, s, u) {
|
|
|
551
554
|
const N = Math.sqrt(h);
|
|
552
555
|
a *= N, i *= N;
|
|
553
556
|
}
|
|
554
|
-
const m = a * a,
|
|
557
|
+
const m = a * a, g = i * i, x = m * g - m * f * f - g * d * d, b = m * f * f + g * d * d, I = Math.sqrt(Math.max(0, x / b)) * (r === s ? -1 : 1), C = I * a * f / i, _ = -I * i * d / a, A = p * C - l * _ + (t.x + u.x) / 2, M = l * C + p * _ + (t.y + u.y) / 2, L = (d - C) / a, F = (f - _) / i, R = (-d - C) / a, Y = (-f - _) / i, K = Math.atan2(F, L);
|
|
555
558
|
let S = Math.atan2(L * Y - F * R, L * R + F * Y);
|
|
556
559
|
!s && S > 0 ? S -= 2 * Math.PI : s && S < 0 && (S += 2 * Math.PI);
|
|
557
|
-
const O = Math.abs(S) / (Math.PI / 2) *
|
|
560
|
+
const O = Math.abs(S) / (Math.PI / 2) * Ne, D = Math.max(1, Math.round(O)), v = [{ ...t }];
|
|
558
561
|
for (let N = 1; N <= D; N++) {
|
|
559
562
|
const $ = K + S * N / D, H = Math.cos($), Z = Math.sin($);
|
|
560
563
|
v.push({
|
|
@@ -564,13 +567,13 @@ function Ne(t, e, n, o, r, s, u) {
|
|
|
564
567
|
}
|
|
565
568
|
return v[v.length - 1] = { ...u }, v;
|
|
566
569
|
}
|
|
567
|
-
const
|
|
570
|
+
const we = /[\s,]/;
|
|
568
571
|
function Dt(t) {
|
|
569
572
|
const e = [];
|
|
570
573
|
let n = 0, o = "", r = 0;
|
|
571
574
|
for (; n < t.length; ) {
|
|
572
575
|
const s = t[n];
|
|
573
|
-
if (
|
|
576
|
+
if (we.test(s)) {
|
|
574
577
|
n++;
|
|
575
578
|
continue;
|
|
576
579
|
}
|
|
@@ -638,58 +641,58 @@ function Bt(t) {
|
|
|
638
641
|
}
|
|
639
642
|
case "C":
|
|
640
643
|
case "c": {
|
|
641
|
-
const c = p === "c", d = c ? r + l() : l(), f = c ? s + l() : l(), h = c ? r + l() : l(), m = c ? s + l() : l(),
|
|
644
|
+
const c = p === "c", d = c ? r + l() : l(), f = c ? s + l() : l(), h = c ? r + l() : l(), m = c ? s + l() : l(), g = c ? r + l() : l(), x = c ? s + l() : l(), b = gt(
|
|
642
645
|
{ x: r, y: s },
|
|
643
646
|
{ x: d, y: f },
|
|
644
647
|
{ x: h, y: m },
|
|
645
|
-
{ x:
|
|
648
|
+
{ x: g, y: x }
|
|
646
649
|
);
|
|
647
|
-
o.push(...
|
|
650
|
+
o.push(...b.slice(1)), i = { x: h, y: m }, r = g, s = x;
|
|
648
651
|
break;
|
|
649
652
|
}
|
|
650
653
|
case "Q":
|
|
651
654
|
case "q": {
|
|
652
|
-
const c = p === "q", d = c ? r + l() : l(), f = c ? s + l() : l(), h = c ? r + l() : l(), m = c ? s + l() : l(),
|
|
655
|
+
const c = p === "q", d = c ? r + l() : l(), f = c ? s + l() : l(), h = c ? r + l() : l(), m = c ? s + l() : l(), g = kt(
|
|
653
656
|
{ x: r, y: s },
|
|
654
657
|
{ x: d, y: f },
|
|
655
658
|
{ x: h, y: m }
|
|
656
659
|
);
|
|
657
|
-
o.push(...
|
|
660
|
+
o.push(...g.slice(1)), i = { x: d, y: f }, r = h, s = m;
|
|
658
661
|
break;
|
|
659
662
|
}
|
|
660
663
|
case "S":
|
|
661
664
|
case "s": {
|
|
662
|
-
const c = p === "s", d = i ? 2 * r - i.x : r, f = i ? 2 * s - i.y : s, h = c ? r + l() : l(), m = c ? s + l() : l(),
|
|
665
|
+
const c = p === "s", d = i ? 2 * r - i.x : r, f = i ? 2 * s - i.y : s, h = c ? r + l() : l(), m = c ? s + l() : l(), g = c ? r + l() : l(), x = c ? s + l() : l(), b = gt(
|
|
663
666
|
{ x: r, y: s },
|
|
664
667
|
{ x: d, y: f },
|
|
665
668
|
{ x: h, y: m },
|
|
666
|
-
{ x:
|
|
669
|
+
{ x: g, y: x }
|
|
667
670
|
);
|
|
668
|
-
o.push(...
|
|
671
|
+
o.push(...b.slice(1)), i = { x: h, y: m }, r = g, s = x;
|
|
669
672
|
break;
|
|
670
673
|
}
|
|
671
674
|
case "T":
|
|
672
675
|
case "t": {
|
|
673
|
-
const c = p === "t", d = i ? 2 * r - i.x : r, f = i ? 2 * s - i.y : s, h = c ? r + l() : l(), m = c ? s + l() : l(),
|
|
676
|
+
const c = p === "t", d = i ? 2 * r - i.x : r, f = i ? 2 * s - i.y : s, h = c ? r + l() : l(), m = c ? s + l() : l(), g = kt(
|
|
674
677
|
{ x: r, y: s },
|
|
675
678
|
{ x: d, y: f },
|
|
676
679
|
{ x: h, y: m }
|
|
677
680
|
);
|
|
678
|
-
o.push(...
|
|
681
|
+
o.push(...g.slice(1)), i = { x: d, y: f }, r = h, s = m;
|
|
679
682
|
break;
|
|
680
683
|
}
|
|
681
684
|
case "A":
|
|
682
685
|
case "a": {
|
|
683
|
-
const c = p === "a", d = l(), f = l(), h = l(), m = l() !== 0,
|
|
686
|
+
const c = p === "a", d = l(), f = l(), h = l(), m = l() !== 0, g = l() !== 0, x = c ? r + l() : l(), b = c ? s + l() : l(), I = Te(
|
|
684
687
|
{ x: r, y: s },
|
|
685
688
|
d,
|
|
686
689
|
f,
|
|
687
690
|
h,
|
|
688
691
|
m,
|
|
689
|
-
|
|
690
|
-
{ x, y:
|
|
692
|
+
g,
|
|
693
|
+
{ x, y: b }
|
|
691
694
|
);
|
|
692
|
-
o.push(...I.slice(1)), i = null, r = x, s =
|
|
695
|
+
o.push(...I.slice(1)), i = null, r = x, s = b;
|
|
693
696
|
break;
|
|
694
697
|
}
|
|
695
698
|
case "Z":
|
|
@@ -704,7 +707,7 @@ function Bt(t) {
|
|
|
704
707
|
}
|
|
705
708
|
return o.length > 0 && n.push(o), n;
|
|
706
709
|
}
|
|
707
|
-
function
|
|
710
|
+
function Pe(t) {
|
|
708
711
|
const e = t.match(
|
|
709
712
|
/^\s*M\s*(-?\d*\.?\d+(?:e[-+]?\d+)?)[\s,]+(-?\d*\.?\d+(?:e[-+]?\d+)?)/i
|
|
710
713
|
);
|
|
@@ -712,19 +715,19 @@ function we(t) {
|
|
|
712
715
|
const n = Number(e[1]), o = Number(e[2]);
|
|
713
716
|
return Number.isFinite(n) && Number.isFinite(o) ? { x: n, y: o } : null;
|
|
714
717
|
}
|
|
715
|
-
function
|
|
718
|
+
function Fe(t) {
|
|
716
719
|
var r, s;
|
|
717
720
|
const e = (r = t.paths[0]) == null ? void 0 : r.d;
|
|
718
721
|
if (!e || t.polygons.length === 0) return !1;
|
|
719
|
-
const n =
|
|
722
|
+
const n = Pe(e), o = (s = t.polygons[0]) == null ? void 0 : s[0];
|
|
720
723
|
return !n || !o ? !1 : Math.abs(n.x - o.x) > 0.01 || Math.abs(n.y - o.y) > 0.01;
|
|
721
724
|
}
|
|
722
725
|
function Xt(t) {
|
|
723
|
-
if (!
|
|
726
|
+
if (!Fe(t)) return t;
|
|
724
727
|
const e = t.paths.flatMap((n) => Bt(n.d));
|
|
725
728
|
return e.length === 0 ? t : { paths: t.paths, polygons: e };
|
|
726
729
|
}
|
|
727
|
-
function
|
|
730
|
+
function Ye(t) {
|
|
728
731
|
const e = t.map((o) => ({
|
|
729
732
|
d: o,
|
|
730
733
|
closed: /z/i.test(o)
|
|
@@ -733,12 +736,12 @@ function Fe(t) {
|
|
|
733
736
|
}
|
|
734
737
|
function xt(t) {
|
|
735
738
|
const e = t.polygons.flat();
|
|
736
|
-
return
|
|
739
|
+
return Me(e);
|
|
737
740
|
}
|
|
738
|
-
function
|
|
739
|
-
return
|
|
741
|
+
function De(t) {
|
|
742
|
+
return Ee(t.polygons.flat());
|
|
740
743
|
}
|
|
741
|
-
function
|
|
744
|
+
function lo(t, e, n = 0, o = [15, 45, 90]) {
|
|
742
745
|
const r = e.x - t.x, s = e.y - t.y, u = Math.hypot(r, s);
|
|
743
746
|
if (u === 0) return { ...e };
|
|
744
747
|
const i = Math.atan2(s, r) * 180 / Math.PI - n;
|
|
@@ -753,15 +756,15 @@ function ao(t, e, n = 0, o = [15, 45, 90]) {
|
|
|
753
756
|
y: t.y + Math.sin(l) * u
|
|
754
757
|
};
|
|
755
758
|
}
|
|
756
|
-
function
|
|
759
|
+
function uo(t, e) {
|
|
757
760
|
return Math.atan2(e.y - t.y, e.x - t.x) * 180 / Math.PI;
|
|
758
761
|
}
|
|
759
|
-
function
|
|
762
|
+
function Be(t) {
|
|
760
763
|
if (!t) return null;
|
|
761
764
|
const e = t.trim().split(/[\s,]+/).map(Number);
|
|
762
765
|
return e.length !== 4 || e.some((n) => Number.isNaN(n)) ? null : { x: e[0], y: e[1], width: e[2], height: e[3] };
|
|
763
766
|
}
|
|
764
|
-
const
|
|
767
|
+
const Xe = {
|
|
765
768
|
fill: "fill",
|
|
766
769
|
"fill-opacity": "fill-opacity",
|
|
767
770
|
stroke: "stroke",
|
|
@@ -769,7 +772,7 @@ const Be = {
|
|
|
769
772
|
"stroke-opacity": "stroke-opacity",
|
|
770
773
|
opacity: "opacity"
|
|
771
774
|
};
|
|
772
|
-
function
|
|
775
|
+
function Ke(t) {
|
|
773
776
|
const e = {};
|
|
774
777
|
for (const n of t.split(";")) {
|
|
775
778
|
const o = n.indexOf(":");
|
|
@@ -779,10 +782,10 @@ function Xe(t) {
|
|
|
779
782
|
}
|
|
780
783
|
return e;
|
|
781
784
|
}
|
|
782
|
-
function
|
|
785
|
+
function Ge(t) {
|
|
783
786
|
const e = /* @__PURE__ */ new Map(), n = t.replace(/\/\*[\s\S]*?\*\//g, "");
|
|
784
787
|
for (const o of n.matchAll(/([^{]+)\{([^}]*)\}/g)) {
|
|
785
|
-
const r = o[1].split(",").map((u) => u.trim()), s =
|
|
788
|
+
const r = o[1].split(",").map((u) => u.trim()), s = Ke(o[2]);
|
|
786
789
|
for (const u of r) {
|
|
787
790
|
const a = u.match(/^\.([a-zA-Z0-9_-]+)$/);
|
|
788
791
|
if (!a) continue;
|
|
@@ -795,30 +798,30 @@ function Ke(t) {
|
|
|
795
798
|
}
|
|
796
799
|
return e;
|
|
797
800
|
}
|
|
798
|
-
function
|
|
801
|
+
function $e(t, e) {
|
|
799
802
|
const n = {};
|
|
800
803
|
for (const o of t.split(/\s+/).map((r) => r.trim()).filter(Boolean))
|
|
801
804
|
Object.assign(n, e.get(o) || {});
|
|
802
805
|
return n;
|
|
803
806
|
}
|
|
804
|
-
function
|
|
807
|
+
function ze(t) {
|
|
805
808
|
const e = [], n = t.replace(/<!--[\s\S]*?-->/g, "");
|
|
806
809
|
for (const r of n.matchAll(/<style\b[^>]*>([\s\S]*?)<\/style>/gi))
|
|
807
810
|
e.push(r[1]);
|
|
808
811
|
if (e.length === 0) return t;
|
|
809
812
|
const o = /* @__PURE__ */ new Map();
|
|
810
813
|
for (const r of e)
|
|
811
|
-
for (const [s, u] of
|
|
814
|
+
for (const [s, u] of Ge(r))
|
|
812
815
|
o.set(s, { ...o.get(s) || {}, ...u });
|
|
813
816
|
return o.size === 0 ? t : t.replace(
|
|
814
817
|
/<(path|polygon|polyline|line|rect|g|circle|ellipse)\b([^>]*)>/gi,
|
|
815
818
|
(r, s, u) => {
|
|
816
819
|
const a = /\/\s*$/.test(u), i = u.replace(/\/\s*$/, ""), y = i.match(/\bclass\s*=\s*["']([^"']*)["']/i);
|
|
817
820
|
if (!y) return r;
|
|
818
|
-
const p =
|
|
821
|
+
const p = $e(y[1], o);
|
|
819
822
|
let l = i;
|
|
820
823
|
for (const [k, c] of Object.entries(p)) {
|
|
821
|
-
const d =
|
|
824
|
+
const d = Xe[k];
|
|
822
825
|
d && (new RegExp(`\\b${d}\\s*=`, "i").test(l) || (l += ` ${d}="${c}"`));
|
|
823
826
|
}
|
|
824
827
|
return `<${s}${l}${a ? " /" : ""}>`;
|
|
@@ -849,23 +852,23 @@ function V(t, e) {
|
|
|
849
852
|
f: t.b * e.e + t.d * e.f + t.f
|
|
850
853
|
};
|
|
851
854
|
}
|
|
852
|
-
function
|
|
855
|
+
function We(t, e) {
|
|
853
856
|
return {
|
|
854
857
|
x: t.a * e.x + t.c * e.y + t.e,
|
|
855
858
|
y: t.b * e.x + t.d * e.y + t.f
|
|
856
859
|
};
|
|
857
860
|
}
|
|
858
|
-
function
|
|
861
|
+
function Ue(t, e = 1e-9) {
|
|
859
862
|
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;
|
|
860
863
|
}
|
|
861
864
|
function st(t, e) {
|
|
862
865
|
return { a: 1, b: 0, c: 0, d: 1, e: t, f: e };
|
|
863
866
|
}
|
|
864
|
-
function
|
|
867
|
+
function Ve(t) {
|
|
865
868
|
const e = t * Math.PI / 180, n = Math.cos(e), o = Math.sin(e);
|
|
866
869
|
return { a: n, b: o, c: -o, d: n, e: 0, f: 0 };
|
|
867
870
|
}
|
|
868
|
-
function
|
|
871
|
+
function He(t, e) {
|
|
869
872
|
switch (t) {
|
|
870
873
|
case "matrix":
|
|
871
874
|
return e.length < 6 ? null : { a: e[0], b: e[1], c: e[2], d: e[3], e: e[4], f: e[5] };
|
|
@@ -878,7 +881,7 @@ function Ve(t, e) {
|
|
|
878
881
|
}
|
|
879
882
|
case "rotate": {
|
|
880
883
|
if (e.length < 1) return null;
|
|
881
|
-
const n =
|
|
884
|
+
const n = Ve(e[0]);
|
|
882
885
|
if (e.length < 3) return n;
|
|
883
886
|
const o = e[1], r = e[2];
|
|
884
887
|
return V(
|
|
@@ -903,7 +906,7 @@ function Ct(t) {
|
|
|
903
906
|
for (; (n = _t.exec(t)) !== null; ) {
|
|
904
907
|
const o = n[1].toLowerCase(), r = n[2].trim().split(/[\s,]+/).filter(Boolean).map(Number);
|
|
905
908
|
if (r.some((u) => Number.isNaN(u))) continue;
|
|
906
|
-
const s =
|
|
909
|
+
const s = He(o, r);
|
|
907
910
|
s && (e = V(e, s));
|
|
908
911
|
}
|
|
909
912
|
return e;
|
|
@@ -913,12 +916,12 @@ function G(t) {
|
|
|
913
916
|
const e = Math.round(t * 1e4) / 1e4;
|
|
914
917
|
return Object.is(e, -0) ? "0" : String(e);
|
|
915
918
|
}
|
|
916
|
-
function
|
|
917
|
-
const r = o * Math.PI / 180, s = Math.cos(r), u = Math.sin(r), a = s * e, i = u * e, y = -u * n, p = s * n, l = t.a * a + t.c * i, k = t.b * a + t.d * i, c = t.a * y + t.c * p, d = t.b * y + t.d * p, f = (l + d) / 2, h = (l - d) / 2, m = (k + c) / 2,
|
|
919
|
+
function Ze(t, e, n, o) {
|
|
920
|
+
const r = o * Math.PI / 180, s = Math.cos(r), u = Math.sin(r), a = s * e, i = u * e, y = -u * n, p = s * n, l = t.a * a + t.c * i, k = t.b * a + t.d * i, c = t.a * y + t.c * p, d = t.b * y + t.d * p, f = (l + d) / 2, h = (l - d) / 2, m = (k + c) / 2, g = (k - c) / 2, x = Math.hypot(f, g), b = Math.hypot(h, m), I = Math.abs(x + b), C = Math.abs(x - b), _ = Math.atan2(m, h), M = (Math.atan2(g, f) + _) / 2 * (180 / Math.PI);
|
|
918
921
|
return { rx: I, ry: C, phiDeg: M };
|
|
919
922
|
}
|
|
920
|
-
function
|
|
921
|
-
if (!t ||
|
|
923
|
+
function je(t, e) {
|
|
924
|
+
if (!t || Ue(e)) return t;
|
|
922
925
|
const n = Dt(t), o = [], r = e.a * e.d - e.b * e.c < 0;
|
|
923
926
|
let s = 0, u = "", a = 0, i = 0, y = 0, p = 0;
|
|
924
927
|
const l = () => {
|
|
@@ -927,7 +930,7 @@ function Ze(t, e) {
|
|
|
927
930
|
}, k = (d, ...f) => {
|
|
928
931
|
o.push(d + (f.length ? " " + f.map(G).join(" ") : ""));
|
|
929
932
|
}, c = (d, f) => {
|
|
930
|
-
const h =
|
|
933
|
+
const h = We(e, { x: d, y: f });
|
|
931
934
|
return [h.x, h.y];
|
|
932
935
|
};
|
|
933
936
|
for (; s < n.length; ) {
|
|
@@ -959,20 +962,20 @@ function Ze(t, e) {
|
|
|
959
962
|
}
|
|
960
963
|
case "C":
|
|
961
964
|
case "c": {
|
|
962
|
-
const f = u === "c", h = f ? a + l() : l(), m = f ? i + l() : l(),
|
|
963
|
-
k("C", ...c(h, m), ...c(
|
|
965
|
+
const f = u === "c", h = f ? a + l() : l(), m = f ? i + l() : l(), g = f ? a + l() : l(), x = f ? i + l() : l(), b = f ? a + l() : l(), I = f ? i + l() : l();
|
|
966
|
+
k("C", ...c(h, m), ...c(g, x), ...c(b, I)), a = b, i = I;
|
|
964
967
|
break;
|
|
965
968
|
}
|
|
966
969
|
case "S":
|
|
967
970
|
case "s": {
|
|
968
|
-
const f = u === "s", h = f ? a + l() : l(), m = f ? i + l() : l(),
|
|
969
|
-
k("S", ...c(h, m), ...c(
|
|
971
|
+
const f = u === "s", h = f ? a + l() : l(), m = f ? i + l() : l(), g = f ? a + l() : l(), x = f ? i + l() : l();
|
|
972
|
+
k("S", ...c(h, m), ...c(g, x)), a = g, i = x;
|
|
970
973
|
break;
|
|
971
974
|
}
|
|
972
975
|
case "Q":
|
|
973
976
|
case "q": {
|
|
974
|
-
const f = u === "q", h = f ? a + l() : l(), m = f ? i + l() : l(),
|
|
975
|
-
k("Q", ...c(h, m), ...c(
|
|
977
|
+
const f = u === "q", h = f ? a + l() : l(), m = f ? i + l() : l(), g = f ? a + l() : l(), x = f ? i + l() : l();
|
|
978
|
+
k("Q", ...c(h, m), ...c(g, x)), a = g, i = x;
|
|
976
979
|
break;
|
|
977
980
|
}
|
|
978
981
|
case "T":
|
|
@@ -983,9 +986,9 @@ function Ze(t, e) {
|
|
|
983
986
|
}
|
|
984
987
|
case "A":
|
|
985
988
|
case "a": {
|
|
986
|
-
const f = u === "a", h = l(), m = l(),
|
|
989
|
+
const f = u === "a", h = l(), m = l(), g = l(), x = l(), b = l(), I = f ? a + l() : l(), C = f ? i + l() : l(), _ = Ze(e, h, m, g), [A, M] = c(I, C);
|
|
987
990
|
o.push(
|
|
988
|
-
`A ${G(_.rx)} ${G(_.ry)} ${G(_.phiDeg)} ${x ? 1 : 0} ${(
|
|
991
|
+
`A ${G(_.rx)} ${G(_.ry)} ${G(_.phiDeg)} ${x ? 1 : 0} ${(b ? 1 : 0) ^ (r ? 1 : 0)} ${G(A)} ${G(M)}`
|
|
989
992
|
), a = I, i = C;
|
|
990
993
|
break;
|
|
991
994
|
}
|
|
@@ -1001,7 +1004,7 @@ function Ze(t, e) {
|
|
|
1001
1004
|
}
|
|
1002
1005
|
return o.join(" ");
|
|
1003
1006
|
}
|
|
1004
|
-
const
|
|
1007
|
+
const qe = [
|
|
1005
1008
|
{ prefix: "walkable", kind: "walkable" },
|
|
1006
1009
|
{ prefix: "void", kind: "void" },
|
|
1007
1010
|
{ prefix: "unit", kind: "unit" },
|
|
@@ -1028,7 +1031,7 @@ const je = [
|
|
|
1028
1031
|
{ prefix: "parking-icon", kind: "parking_icon" },
|
|
1029
1032
|
{ prefix: "walking-path", kind: "walkable" },
|
|
1030
1033
|
{ prefix: "water", kind: "water" }
|
|
1031
|
-
],
|
|
1034
|
+
], Qe = [
|
|
1032
1035
|
{ prefix: "parking-zone", kind: "parking_zone" },
|
|
1033
1036
|
{ prefix: "parking-lane", kind: "parking_zone" },
|
|
1034
1037
|
{ prefix: "parking-icon", kind: "parking_icon" },
|
|
@@ -1057,15 +1060,15 @@ function Kt(t) {
|
|
|
1057
1060
|
const e = tt(t);
|
|
1058
1061
|
return e === "routes" || e === "route" || e === "wayfinding" || e === "wayfinding routes" || dt(t);
|
|
1059
1062
|
}
|
|
1060
|
-
const
|
|
1063
|
+
const Je = [
|
|
1061
1064
|
...le,
|
|
1062
1065
|
"walkable",
|
|
1063
1066
|
"void"
|
|
1064
|
-
],
|
|
1065
|
-
function
|
|
1067
|
+
], tn = 8;
|
|
1068
|
+
function en(t, e = "floor") {
|
|
1066
1069
|
if (zt(t))
|
|
1067
1070
|
return { kind: null, guessed: !1 };
|
|
1068
|
-
const n = t.toLowerCase(), o = e === "base" ?
|
|
1071
|
+
const n = t.toLowerCase(), o = e === "base" ? Qe : qe;
|
|
1069
1072
|
for (const { prefix: r, kind: s } of o)
|
|
1070
1073
|
if (n === r || n.startsWith(r))
|
|
1071
1074
|
return { kind: s, guessed: !1 };
|
|
@@ -1101,15 +1104,15 @@ function B(t, e) {
|
|
|
1101
1104
|
function At(t) {
|
|
1102
1105
|
return /\bdata-interactive\s*=\s*["']?(true|1|yes)/i.test(t);
|
|
1103
1106
|
}
|
|
1104
|
-
function
|
|
1107
|
+
function nn(t) {
|
|
1105
1108
|
return [T(t, "id"), T(t, "data-name")].filter(
|
|
1106
1109
|
(e) => !!e
|
|
1107
1110
|
);
|
|
1108
1111
|
}
|
|
1109
|
-
function
|
|
1112
|
+
function on(t) {
|
|
1110
1113
|
return t.some(pt) ? { interactiveContainer: !1, nonInteractiveContainer: !0, storeFolder: !1 } : t.some(Gt) ? { interactiveContainer: !0, nonInteractiveContainer: !1, storeFolder: !1 } : t.some($t) ? { interactiveContainer: !1, nonInteractiveContainer: !1, storeFolder: !0 } : { interactiveContainer: !1, nonInteractiveContainer: !1, storeFolder: !1 };
|
|
1111
1114
|
}
|
|
1112
|
-
function
|
|
1115
|
+
function rn(t) {
|
|
1113
1116
|
const e = t.trim().split(/[\s,]+/).map(Number);
|
|
1114
1117
|
if (e.length < 4) return "";
|
|
1115
1118
|
let n = `M ${e[0]} ${e[1]}`;
|
|
@@ -1117,18 +1120,18 @@ function on(t) {
|
|
|
1117
1120
|
n += ` L ${e[o]} ${e[o + 1]}`;
|
|
1118
1121
|
return n += " Z", n;
|
|
1119
1122
|
}
|
|
1120
|
-
function
|
|
1123
|
+
function sn(t, e, n, o) {
|
|
1121
1124
|
return `M ${t} ${e} L ${n} ${o}`;
|
|
1122
1125
|
}
|
|
1123
|
-
function
|
|
1126
|
+
function cn(t, e) {
|
|
1124
1127
|
if (t === "path")
|
|
1125
1128
|
return T(e, "d") ?? void 0;
|
|
1126
1129
|
if (t === "polygon" || t === "polyline") {
|
|
1127
1130
|
const n = T(e, "points");
|
|
1128
|
-
return n ?
|
|
1131
|
+
return n ? rn(n) : void 0;
|
|
1129
1132
|
}
|
|
1130
1133
|
if (t === "line")
|
|
1131
|
-
return
|
|
1134
|
+
return sn(
|
|
1132
1135
|
B(e, "x1"),
|
|
1133
1136
|
B(e, "y1"),
|
|
1134
1137
|
B(e, "x2"),
|
|
@@ -1139,18 +1142,18 @@ function sn(t, e) {
|
|
|
1139
1142
|
return `M ${n} ${o} L ${n + r} ${o} L ${n + r} ${o + s} L ${n} ${o + s} Z`;
|
|
1140
1143
|
}
|
|
1141
1144
|
}
|
|
1142
|
-
function
|
|
1143
|
-
const e =
|
|
1145
|
+
function an(t) {
|
|
1146
|
+
const e = ze(t).replace(/<!--[\s\S]*?-->/g, ""), n = e.match(/viewBox\s*=\s*["']([^"']+)["']/i), o = Be(n == null ? void 0 : n[1]), r = [], s = [], u = [], a = [];
|
|
1144
1147
|
let i = 0;
|
|
1145
1148
|
const y = () => a.some((x) => x.routeContainer), p = () => {
|
|
1146
|
-
for (let
|
|
1147
|
-
const I = a[
|
|
1149
|
+
for (let b = a.length - 1; b >= 0; b--) {
|
|
1150
|
+
const I = a[b].style;
|
|
1148
1151
|
if (I.fill || I.stroke || I.strokeWidth != null || I.opacity != null)
|
|
1149
1152
|
break;
|
|
1150
1153
|
}
|
|
1151
1154
|
let x = {};
|
|
1152
|
-
for (const
|
|
1153
|
-
x = it(x,
|
|
1155
|
+
for (const b of a)
|
|
1156
|
+
x = it(x, b.style);
|
|
1154
1157
|
return x;
|
|
1155
1158
|
}, l = () => {
|
|
1156
1159
|
for (let x = a.length - 1; x >= 0; x--) {
|
|
@@ -1160,22 +1163,22 @@ function cn(t) {
|
|
|
1160
1163
|
return !1;
|
|
1161
1164
|
}, k = () => a.length > 0 ? a[a.length - 1].matrix : ft, c = () => {
|
|
1162
1165
|
for (let x = a.length - 1; x >= 0; x--) {
|
|
1163
|
-
const
|
|
1164
|
-
if (!ct(
|
|
1165
|
-
|
|
1166
|
+
const b = a[x];
|
|
1167
|
+
if (!ct(b) && b.id) {
|
|
1168
|
+
b.hasNamedChild = !0;
|
|
1166
1169
|
return;
|
|
1167
1170
|
}
|
|
1168
1171
|
}
|
|
1169
1172
|
}, d = () => {
|
|
1170
1173
|
for (let x = a.length - 1; x >= 0; x--) {
|
|
1171
|
-
const
|
|
1172
|
-
if (!ct(
|
|
1173
|
-
return
|
|
1174
|
+
const b = a[x];
|
|
1175
|
+
if (!ct(b) && b.id)
|
|
1176
|
+
return b;
|
|
1174
1177
|
}
|
|
1175
1178
|
return null;
|
|
1176
1179
|
}, f = (x) => {
|
|
1177
1180
|
if (x.routeContainer) {
|
|
1178
|
-
for (const
|
|
1181
|
+
for (const b of x.collectedPaths) h("path", b);
|
|
1179
1182
|
return;
|
|
1180
1183
|
}
|
|
1181
1184
|
ct(x) || !x.id || x.collectedPaths.length === 0 || (x.hasNamedChild && u.push(
|
|
@@ -1187,23 +1190,23 @@ function cn(t) {
|
|
|
1187
1190
|
interactive: x.inInteractive,
|
|
1188
1191
|
style: it(p(), x.style)
|
|
1189
1192
|
}));
|
|
1190
|
-
}, h = (x,
|
|
1191
|
-
if (!
|
|
1192
|
-
const I = x === "polyline" || x === "polygon" || x === "path" ?
|
|
1193
|
+
}, h = (x, b) => {
|
|
1194
|
+
if (!b) return;
|
|
1195
|
+
const I = x === "polyline" || x === "polygon" || x === "path" ? b.replace(/\s*Z\s*$/i, "") : b;
|
|
1193
1196
|
s.includes(I) || s.push(I);
|
|
1194
1197
|
}, m = /<(\/?)(path|polygon|polyline|line|rect|g)\b([^>]*)(\/?)>/gi;
|
|
1195
|
-
let
|
|
1196
|
-
for (; (
|
|
1197
|
-
const x =
|
|
1198
|
+
let g;
|
|
1199
|
+
for (; (g = m.exec(e)) !== null; ) {
|
|
1200
|
+
const x = g[1] === "/", b = g[2].toLowerCase(), I = g[3] ?? "", C = g[4] === "/" || /\/\s*$/.test(I);
|
|
1198
1201
|
if (x) {
|
|
1199
|
-
if (
|
|
1202
|
+
if (b === "g") {
|
|
1200
1203
|
const O = a.pop();
|
|
1201
1204
|
O && f(O);
|
|
1202
1205
|
}
|
|
1203
1206
|
continue;
|
|
1204
1207
|
}
|
|
1205
|
-
if (
|
|
1206
|
-
const O = T(I, "id"), D =
|
|
1208
|
+
if (b === "g") {
|
|
1209
|
+
const O = T(I, "id"), D = nn(I), { interactiveContainer: v, nonInteractiveContainer: N, storeFolder: $ } = on(D), H = l();
|
|
1207
1210
|
O && c();
|
|
1208
1211
|
const Z = {
|
|
1209
1212
|
id: O,
|
|
@@ -1220,20 +1223,20 @@ function cn(t) {
|
|
|
1220
1223
|
C || a.push(Z);
|
|
1221
1224
|
continue;
|
|
1222
1225
|
}
|
|
1223
|
-
const _ = T(I, "id"), A =
|
|
1226
|
+
const _ = T(I, "id"), A = cn(b, I), M = V(k(), Ct(T(I, "transform"))), L = A && je(A, M), F = At(I) || l(), R = it(p(), It(I)), Y = T(I, "data-name");
|
|
1224
1227
|
if (_ != null && dt(_) || Y != null && dt(Y) || !_ && y()) {
|
|
1225
|
-
h(
|
|
1228
|
+
h(b, L);
|
|
1226
1229
|
continue;
|
|
1227
1230
|
}
|
|
1228
1231
|
if (_) {
|
|
1229
|
-
c(), L && r.push({ id: _, tag:
|
|
1232
|
+
c(), L && r.push({ id: _, tag: b, d: L, interactive: F, style: R });
|
|
1230
1233
|
continue;
|
|
1231
1234
|
}
|
|
1232
1235
|
if (!L) continue;
|
|
1233
1236
|
const S = d();
|
|
1234
1237
|
S ? (S.collectedPaths.push(L), !S.style.fill && R.fill && (S.style = R)) : F && (i += 1, r.push({
|
|
1235
1238
|
id: `interactive-anon-${i}`,
|
|
1236
|
-
tag:
|
|
1239
|
+
tag: b,
|
|
1237
1240
|
d: L,
|
|
1238
1241
|
interactive: !0,
|
|
1239
1242
|
style: R
|
|
@@ -1243,27 +1246,27 @@ function cn(t) {
|
|
|
1243
1246
|
f(a.pop());
|
|
1244
1247
|
return { viewbox: o, elements: r, routePathDs: s, warnings: u };
|
|
1245
1248
|
}
|
|
1246
|
-
function
|
|
1249
|
+
function ln(t) {
|
|
1247
1250
|
return t.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").slice(0, 80);
|
|
1248
1251
|
}
|
|
1249
|
-
function
|
|
1252
|
+
function un(t, e) {
|
|
1250
1253
|
var r, s, u, a;
|
|
1251
1254
|
const n = yt(e), o = {};
|
|
1252
1255
|
return n != null && n.fill ? o.fill = n.fill : (r = t.style) != null && r.fill && (o.fill = t.style.fill), n != null && n.stroke ? o.stroke = n.stroke : (s = t.style) != null && s.stroke && (o.stroke = t.style.stroke), (n == null ? void 0 : n.strokeWidth) != null ? o.strokeWidth = n.strokeWidth : ((u = t.style) == null ? void 0 : u.strokeWidth) != null && (o.strokeWidth = t.style.strokeWidth), ((a = t.style) == null ? void 0 : a.opacity) != null && (o.opacity = t.style.opacity), (n == null ? void 0 : n.extrudeHeight) != null && (o.extrudeHeight = n.extrudeHeight), o;
|
|
1253
1256
|
}
|
|
1254
|
-
function
|
|
1257
|
+
function fn(t, e) {
|
|
1255
1258
|
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;
|
|
1256
1259
|
}
|
|
1257
|
-
function
|
|
1258
|
-
const o =
|
|
1260
|
+
function fo(t, e = "floor", n = {}) {
|
|
1261
|
+
const o = an(t), r = [], s = [], u = [], a = [...o.warnings], i = [];
|
|
1259
1262
|
let y = 0, p = 0, l = 0;
|
|
1260
|
-
const k = n.previousViewbox != null && o.viewbox != null && !
|
|
1263
|
+
const k = n.previousViewbox != null && o.viewbox != null && !fn(n.previousViewbox, o.viewbox);
|
|
1261
1264
|
k && a.push(
|
|
1262
1265
|
"SVG viewBox differs from the stored artboard — re-upload blocked until the designer restores the original viewBox"
|
|
1263
1266
|
);
|
|
1264
1267
|
for (const c of o.elements) {
|
|
1265
1268
|
if (zt(c.id)) continue;
|
|
1266
|
-
let { kind: d, guessed: f } =
|
|
1269
|
+
let { kind: d, guessed: f } = en(c.id, e);
|
|
1267
1270
|
c.interactive && !d && (d = "unit", f = !0);
|
|
1268
1271
|
const h = {
|
|
1269
1272
|
sourceSvgId: c.id,
|
|
@@ -1283,7 +1286,7 @@ function uo(t, e = "floor", n = {}) {
|
|
|
1283
1286
|
}
|
|
1284
1287
|
if (e === "base") {
|
|
1285
1288
|
const x = yt(c.id) != null;
|
|
1286
|
-
if (!(!x && (
|
|
1289
|
+
if (!(!x && (Je.includes(d) || !!c.interactive))) {
|
|
1287
1290
|
r.push({
|
|
1288
1291
|
...h,
|
|
1289
1292
|
message: x ? "Static decoration — rendered from outdoor SVG" : "Decoration — not persisted; rendered from outdoor SVG"
|
|
@@ -1292,14 +1295,14 @@ function uo(t, e = "floor", n = {}) {
|
|
|
1292
1295
|
}
|
|
1293
1296
|
}
|
|
1294
1297
|
f && (u.push(h), h.message = h.message ?? "Guessed kind from interactive/fallback rule"), r.push(h), d === "walkable" && y++, d === "void" && p++, d === "unit" && l++;
|
|
1295
|
-
const m =
|
|
1298
|
+
const m = Ye([c.d]), g = xt(m);
|
|
1296
1299
|
i.push({
|
|
1297
|
-
key:
|
|
1300
|
+
key: ln(c.id),
|
|
1298
1301
|
kind: d,
|
|
1299
1302
|
geometry: m,
|
|
1300
|
-
bbox:
|
|
1303
|
+
bbox: g,
|
|
1301
1304
|
sourceSvgId: c.id,
|
|
1302
|
-
style:
|
|
1305
|
+
style: un(c, c.id)
|
|
1303
1306
|
});
|
|
1304
1307
|
}
|
|
1305
1308
|
return e === "floor" && y === 0 && a.push(
|
|
@@ -1320,8 +1323,8 @@ function uo(t, e = "floor", n = {}) {
|
|
|
1320
1323
|
viewBoxChanged: k
|
|
1321
1324
|
};
|
|
1322
1325
|
}
|
|
1323
|
-
function
|
|
1324
|
-
const r = o.driftThreshold ??
|
|
1326
|
+
function ho(t, e, n, o = {}) {
|
|
1327
|
+
const r = o.driftThreshold ?? tn, s = new Map(
|
|
1325
1328
|
e.filter((i) => i.sourceSvgId).map((i) => [i.sourceSvgId, i])
|
|
1326
1329
|
), u = /* @__PURE__ */ new Set(), a = [];
|
|
1327
1330
|
for (const i of t) {
|
|
@@ -1345,7 +1348,7 @@ function fo(t, e, n, o = {}) {
|
|
|
1345
1348
|
else {
|
|
1346
1349
|
let p = "unchanged";
|
|
1347
1350
|
if (y.bbox) {
|
|
1348
|
-
const l = (y.bbox.minX + y.bbox.maxX) / 2, k = (y.bbox.minY + y.bbox.maxY) / 2, c =
|
|
1351
|
+
const l = (y.bbox.minX + y.bbox.maxX) / 2, k = (y.bbox.minY + y.bbox.maxY) / 2, c = De(i.geometry);
|
|
1349
1352
|
Math.hypot(c.x - l, c.y - k) > r && (p = "moved");
|
|
1350
1353
|
}
|
|
1351
1354
|
a.push({
|
|
@@ -1373,7 +1376,7 @@ function fo(t, e, n, o = {}) {
|
|
|
1373
1376
|
viewbox: n
|
|
1374
1377
|
};
|
|
1375
1378
|
}
|
|
1376
|
-
const E = 1e-6,
|
|
1379
|
+
const E = 1e-6, dn = 15 * Math.PI / 180, hn = 1e-3, j = Math.PI * 2;
|
|
1377
1380
|
function St(t, e) {
|
|
1378
1381
|
return Math.abs(t.x - e.x) < E && Math.abs(t.y - e.y) < E;
|
|
1379
1382
|
}
|
|
@@ -1392,7 +1395,7 @@ function lt(t, e, n) {
|
|
|
1392
1395
|
y: t.y + Math.sin(n) * e
|
|
1393
1396
|
};
|
|
1394
1397
|
}
|
|
1395
|
-
function
|
|
1398
|
+
function yn(t) {
|
|
1396
1399
|
const e = [];
|
|
1397
1400
|
for (const n of t) {
|
|
1398
1401
|
const o = e[e.length - 1];
|
|
@@ -1400,51 +1403,51 @@ function hn(t) {
|
|
|
1400
1403
|
}
|
|
1401
1404
|
return e.length >= 2 && St(e[0], e[e.length - 1]) && e.pop(), e;
|
|
1402
1405
|
}
|
|
1403
|
-
function
|
|
1404
|
-
const n = wt(e), o =
|
|
1406
|
+
function yo(t, e) {
|
|
1407
|
+
const n = wt(e), o = yn(t);
|
|
1405
1408
|
if (o.length < 3 || n <= 0) return t;
|
|
1406
1409
|
const r = o.length, s = new Array(r), u = new Array(r), a = new Array(r), i = new Array(r), y = new Array(r).fill(0), p = new Array(r).fill(0), l = new Array(r).fill(!1);
|
|
1407
1410
|
for (let c = 0; c < r; c++) {
|
|
1408
|
-
const d = o[(c - 1 + r) % r], f = o[c], h = o[(c + 1) % r], m = P(d, f),
|
|
1409
|
-
if (a[c] =
|
|
1411
|
+
const d = o[(c - 1 + r) % r], f = o[c], h = o[(c + 1) % r], m = P(d, f), g = P(f, h);
|
|
1412
|
+
if (a[c] = g, m < E || g < E) {
|
|
1410
1413
|
s[c] = { x: 1, y: 0 }, u[c] = { x: 1, y: 0 }, i[c] = 0;
|
|
1411
1414
|
continue;
|
|
1412
1415
|
}
|
|
1413
|
-
s[c] = q(Lt(f, d), 1 / m), u[c] = q(Lt(h, f), 1 /
|
|
1414
|
-
const x = s[c].x * u[c].y - s[c].y * u[c].x,
|
|
1415
|
-
i[c] = Math.atan2(x,
|
|
1416
|
+
s[c] = q(Lt(f, d), 1 / m), u[c] = q(Lt(h, f), 1 / g);
|
|
1417
|
+
const x = s[c].x * u[c].y - s[c].y * u[c].x, b = s[c].x * u[c].x + s[c].y * u[c].y;
|
|
1418
|
+
i[c] = Math.atan2(x, b);
|
|
1416
1419
|
const I = Math.abs(i[c]);
|
|
1417
|
-
if (I <
|
|
1420
|
+
if (I < dn) continue;
|
|
1418
1421
|
const C = Math.PI - I, _ = Math.tan(C / 2);
|
|
1419
1422
|
if (_ < E || C <= E || C >= Math.PI - E) continue;
|
|
1420
1423
|
const A = n / _;
|
|
1421
1424
|
y[c] = A, p[c] = A, l[c] = !0;
|
|
1422
1425
|
}
|
|
1423
1426
|
for (let c = 0; c < r; c++) {
|
|
1424
|
-
const d = (c + 1) % r, f = p[c] + y[d], h = Math.max(0, a[c] -
|
|
1427
|
+
const d = (c + 1) % r, f = p[c] + y[d], h = Math.max(0, a[c] - hn);
|
|
1425
1428
|
if (f <= h || f <= E) continue;
|
|
1426
1429
|
const m = h / f;
|
|
1427
1430
|
p[c] *= m, y[d] *= m;
|
|
1428
1431
|
}
|
|
1429
1432
|
const k = [];
|
|
1430
1433
|
for (let c = 0; c < r; c++) {
|
|
1431
|
-
const d = o[c], f = Math.min(y[c], p[c]), h = Math.abs(i[c]), m = Math.PI - h,
|
|
1432
|
-
if (!l[c] ||
|
|
1434
|
+
const d = o[c], f = Math.min(y[c], p[c]), h = Math.abs(i[c]), m = Math.PI - h, g = f * Math.tan(m / 2);
|
|
1435
|
+
if (!l[c] || g < E || f < E) {
|
|
1433
1436
|
k.push({ ...d });
|
|
1434
1437
|
continue;
|
|
1435
1438
|
}
|
|
1436
|
-
const x = at(d, q(s[c], -f)),
|
|
1437
|
-
x: -s[c].y * I *
|
|
1438
|
-
y: s[c].x * I *
|
|
1439
|
-
}), _ = Math.atan2(x.y - C.y, x.x - C.x), A = Math.atan2(
|
|
1439
|
+
const x = at(d, q(s[c], -f)), b = at(d, q(u[c], f)), I = i[c] > 0 ? 1 : -1, C = at(x, {
|
|
1440
|
+
x: -s[c].y * I * g,
|
|
1441
|
+
y: s[c].x * I * g
|
|
1442
|
+
}), _ = Math.atan2(x.y - C.y, x.x - C.x), A = Math.atan2(b.y - C.y, b.x - C.x), M = (A - _ + j) % j, L = (_ - A + j) % j, F = lt(C, g, _ + M / 2), R = lt(C, g, _ - L / 2), Y = P(F, d) <= P(R, d), K = Y ? M : L, S = Math.max(8, Math.min(28, Math.ceil(K * g / 2)));
|
|
1440
1443
|
for (let O = 0; O <= S; O++) {
|
|
1441
1444
|
const D = O / S, v = Y ? _ + K * D : _ - K * D;
|
|
1442
|
-
k.push(lt(C,
|
|
1445
|
+
k.push(lt(C, g, v));
|
|
1443
1446
|
}
|
|
1444
1447
|
}
|
|
1445
1448
|
return k;
|
|
1446
1449
|
}
|
|
1447
|
-
function
|
|
1450
|
+
function xn(t, e, n = []) {
|
|
1448
1451
|
const o = Ut(), r = new Map(t.map((i) => [i.id, i])), s = new Map(n.map((i) => [i.id, i])), u = t.map((i) => ({
|
|
1449
1452
|
id: i.id,
|
|
1450
1453
|
levelId: i.levelId,
|
|
@@ -1480,7 +1483,7 @@ function yn(t, e, n = []) {
|
|
|
1480
1483
|
}
|
|
1481
1484
|
return { graph: o, nodes: u, edges: a, anchorById: r };
|
|
1482
1485
|
}
|
|
1483
|
-
function
|
|
1486
|
+
function pn(t, e, n, o = {}) {
|
|
1484
1487
|
const { graph: r, anchorById: s } = t;
|
|
1485
1488
|
if (!s.has(e) || !s.has(n))
|
|
1486
1489
|
return null;
|
|
@@ -1513,15 +1516,15 @@ function xn(t, e, n, o = {}) {
|
|
|
1513
1516
|
}
|
|
1514
1517
|
return { anchorIds: y, points: p, totalWeight: k, levelChanges: l };
|
|
1515
1518
|
}
|
|
1516
|
-
function
|
|
1519
|
+
function xo(t, e, n, o = {}) {
|
|
1517
1520
|
let r = null;
|
|
1518
1521
|
for (const s of n) {
|
|
1519
|
-
const u =
|
|
1522
|
+
const u = pn(t, e, s, o);
|
|
1520
1523
|
u && (!r || u.totalWeight < r.totalWeight) && (r = u);
|
|
1521
1524
|
}
|
|
1522
1525
|
return r;
|
|
1523
1526
|
}
|
|
1524
|
-
function
|
|
1527
|
+
function po(t) {
|
|
1525
1528
|
const e = ae(t.theme), n = new Map(
|
|
1526
1529
|
t.assignments.map((i) => [i.shapeId, i])
|
|
1527
1530
|
), o = new Map(
|
|
@@ -1550,7 +1553,7 @@ function xo(t) {
|
|
|
1550
1553
|
shapes: y,
|
|
1551
1554
|
anchors: p
|
|
1552
1555
|
};
|
|
1553
|
-
}), { nodes: u, edges: a } =
|
|
1556
|
+
}), { nodes: u, edges: a } = xn(
|
|
1554
1557
|
t.anchors,
|
|
1555
1558
|
t.edges,
|
|
1556
1559
|
t.connectors
|
|
@@ -1573,7 +1576,7 @@ function xo(t) {
|
|
|
1573
1576
|
publishedAt: t.publishedAt ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
1574
1577
|
};
|
|
1575
1578
|
}
|
|
1576
|
-
function
|
|
1579
|
+
function mo(t) {
|
|
1577
1580
|
let e = !1;
|
|
1578
1581
|
const n = t.levels.map((o) => {
|
|
1579
1582
|
let r = !1;
|
|
@@ -1590,7 +1593,7 @@ function po(t) {
|
|
|
1590
1593
|
});
|
|
1591
1594
|
return e ? { ...t, levels: n } : t;
|
|
1592
1595
|
}
|
|
1593
|
-
const
|
|
1596
|
+
const mn = [
|
|
1594
1597
|
"floorplate",
|
|
1595
1598
|
"walkable",
|
|
1596
1599
|
"decor",
|
|
@@ -1599,14 +1602,14 @@ const pn = [
|
|
|
1599
1602
|
"water",
|
|
1600
1603
|
"parking_zone"
|
|
1601
1604
|
];
|
|
1602
|
-
function
|
|
1605
|
+
function bn(t) {
|
|
1603
1606
|
return t === "void";
|
|
1604
1607
|
}
|
|
1605
|
-
function
|
|
1606
|
-
return
|
|
1608
|
+
function bo(t) {
|
|
1609
|
+
return mn.includes(t);
|
|
1607
1610
|
}
|
|
1608
1611
|
function Wt(t) {
|
|
1609
|
-
return
|
|
1612
|
+
return bn(t.kind) && !t.orphanedAt;
|
|
1610
1613
|
}
|
|
1611
1614
|
function gn(t) {
|
|
1612
1615
|
return (t.shapes ?? []).some(Wt);
|
|
@@ -1626,12 +1629,12 @@ function Ot(t) {
|
|
|
1626
1629
|
e += t[o].x * t[n].y - t[n].x * t[o].y;
|
|
1627
1630
|
return e / 2;
|
|
1628
1631
|
}
|
|
1629
|
-
function
|
|
1632
|
+
function kn(t) {
|
|
1630
1633
|
return t.slice().reverse();
|
|
1631
1634
|
}
|
|
1632
|
-
function
|
|
1635
|
+
function In(t, e) {
|
|
1633
1636
|
const n = Ot(t), o = Ot(e);
|
|
1634
|
-
return n === 0 || o === 0 ? e : Math.sign(n) === Math.sign(o) ?
|
|
1637
|
+
return n === 0 || o === 0 ? e : Math.sign(n) === Math.sign(o) ? kn(e) : e;
|
|
1635
1638
|
}
|
|
1636
1639
|
function Mt(t) {
|
|
1637
1640
|
let e = 1 / 0, n = 1 / 0, o = -1 / 0, r = -1 / 0;
|
|
@@ -1639,25 +1642,25 @@ function Mt(t) {
|
|
|
1639
1642
|
s.x < e && (e = s.x), s.y < n && (n = s.y), s.x > o && (o = s.x), s.y > r && (r = s.y);
|
|
1640
1643
|
return { minX: e, minY: n, maxX: o, maxY: r };
|
|
1641
1644
|
}
|
|
1642
|
-
function
|
|
1645
|
+
function _n(t, e) {
|
|
1643
1646
|
const n = Mt(t), o = Mt(e);
|
|
1644
1647
|
return n.minX <= o.maxX && n.maxX >= o.minX && n.minY <= o.maxY && n.maxY >= o.minY;
|
|
1645
1648
|
}
|
|
1646
|
-
function
|
|
1647
|
-
return e.filter((n) => n.length >= 3 &&
|
|
1649
|
+
function ko(t, e) {
|
|
1650
|
+
return e.filter((n) => n.length >= 3 && _n(t, n)).map((n) => In(t, n));
|
|
1648
1651
|
}
|
|
1649
|
-
const
|
|
1650
|
-
function
|
|
1652
|
+
const Io = "#e8eef4", _o = "#64748b", Co = "#475569";
|
|
1653
|
+
function Cn(t, e) {
|
|
1651
1654
|
return t.ordering - e.ordering || t.levelIndex - e.levelIndex;
|
|
1652
1655
|
}
|
|
1653
1656
|
function Q(t) {
|
|
1654
1657
|
return t.kind === "outdoor";
|
|
1655
1658
|
}
|
|
1656
|
-
function
|
|
1659
|
+
function An(t, e) {
|
|
1657
1660
|
const n = t.filter(Q), o = e == null ? null : t.find((r) => r.id === e) ?? null;
|
|
1658
1661
|
return !o || Q(o) || n.some((r) => r.id === o.id) ? n : [...n, o];
|
|
1659
1662
|
}
|
|
1660
|
-
function
|
|
1663
|
+
function Sn(t, e) {
|
|
1661
1664
|
if (e == null) return [];
|
|
1662
1665
|
const n = et(t), o = n.findIndex((u) => u.id === e);
|
|
1663
1666
|
if (o < 0) return [];
|
|
@@ -1670,29 +1673,29 @@ function An(t, e) {
|
|
|
1670
1673
|
}
|
|
1671
1674
|
return r;
|
|
1672
1675
|
}
|
|
1673
|
-
function
|
|
1674
|
-
return
|
|
1676
|
+
function Ao(t, e) {
|
|
1677
|
+
return Sn(t, e).at(-1) ?? null;
|
|
1675
1678
|
}
|
|
1676
|
-
function
|
|
1679
|
+
function So(t, e, n) {
|
|
1677
1680
|
const o = t.find((s) => s.id === n);
|
|
1678
1681
|
if (!o || !Q(o)) return n;
|
|
1679
1682
|
const r = e == null ? null : t.find((s) => s.id === e) ?? null;
|
|
1680
|
-
return r && !Q(r) ? r.id :
|
|
1683
|
+
return r && !Q(r) ? r.id : Ln(t) ?? n;
|
|
1681
1684
|
}
|
|
1682
1685
|
function et(t) {
|
|
1683
|
-
return t.filter((e) => e.kind === "floor").slice().sort(
|
|
1686
|
+
return t.filter((e) => e.kind === "floor").slice().sort(Cn);
|
|
1684
1687
|
}
|
|
1685
|
-
function
|
|
1688
|
+
function Lo(t) {
|
|
1686
1689
|
return et(t);
|
|
1687
1690
|
}
|
|
1688
|
-
function
|
|
1691
|
+
function Oo(t) {
|
|
1689
1692
|
return et(t).length > 1;
|
|
1690
1693
|
}
|
|
1691
|
-
function
|
|
1694
|
+
function Mo(t) {
|
|
1692
1695
|
return t.some((e) => e.kind === "floor");
|
|
1693
1696
|
}
|
|
1694
|
-
const
|
|
1695
|
-
function
|
|
1697
|
+
const Eo = "This map doesn’t have any floors yet.";
|
|
1698
|
+
function Ln(t) {
|
|
1696
1699
|
var e, n;
|
|
1697
1700
|
return ((e = et(t).at(-1)) == null ? void 0 : e.id) ?? ((n = t[0]) == null ? void 0 : n.id) ?? null;
|
|
1698
1701
|
}
|
|
@@ -1707,20 +1710,20 @@ function Et(t) {
|
|
|
1707
1710
|
size: Math.max(t.width, t.height, 100)
|
|
1708
1711
|
};
|
|
1709
1712
|
}
|
|
1710
|
-
function
|
|
1713
|
+
function On(t, e) {
|
|
1711
1714
|
const n = e.scale || 1, o = (e.rotate || 0) * Math.PI / 180, r = Math.cos(o), s = Math.sin(o), u = t.x * n, a = t.y * n;
|
|
1712
1715
|
return {
|
|
1713
1716
|
x: u * r - a * s + (e.translateX || 0),
|
|
1714
1717
|
y: u * s + a * r + (e.translateY || 0)
|
|
1715
1718
|
};
|
|
1716
1719
|
}
|
|
1717
|
-
function
|
|
1720
|
+
function Mn(t, e) {
|
|
1718
1721
|
const n = [
|
|
1719
1722
|
{ x: t.minX, y: t.minY },
|
|
1720
1723
|
{ x: t.maxX, y: t.minY },
|
|
1721
1724
|
{ x: t.minX, y: t.maxY },
|
|
1722
1725
|
{ x: t.maxX, y: t.maxY }
|
|
1723
|
-
].map((a) => e ?
|
|
1726
|
+
].map((a) => e ? On(a, e) : a), o = Math.min(
|
|
1724
1727
|
n[0].x,
|
|
1725
1728
|
n[1].x,
|
|
1726
1729
|
n[2].x,
|
|
@@ -1763,21 +1766,21 @@ function Rt(t, e) {
|
|
|
1763
1766
|
size: Math.max(r - n, s - o, 100)
|
|
1764
1767
|
};
|
|
1765
1768
|
}
|
|
1766
|
-
function
|
|
1769
|
+
function Ro(t, e, n) {
|
|
1767
1770
|
let o = n ? Et(n) : null;
|
|
1768
|
-
for (const r of
|
|
1771
|
+
for (const r of An(t, e)) {
|
|
1769
1772
|
if (r.viewbox) {
|
|
1770
1773
|
const s = Et(r.viewbox);
|
|
1771
1774
|
o = o ? Rt(o, s) : s;
|
|
1772
1775
|
}
|
|
1773
1776
|
for (const s of r.shapes) {
|
|
1774
|
-
const u =
|
|
1777
|
+
const u = Mn(s.bbox);
|
|
1775
1778
|
o = o ? Rt(o, u) : u;
|
|
1776
1779
|
}
|
|
1777
1780
|
}
|
|
1778
1781
|
return o ?? { minX: 0, minY: 0, maxX: 500, maxY: 500, cx: 250, cy: 250, size: 500 };
|
|
1779
1782
|
}
|
|
1780
|
-
function
|
|
1783
|
+
function vo(t, e) {
|
|
1781
1784
|
if (!t && !e) return { x: 0, y: 0, width: 1e3, height: 800 };
|
|
1782
1785
|
if (!t) return e;
|
|
1783
1786
|
if (!e) return t;
|
|
@@ -1785,147 +1788,148 @@ function Ro(t, e) {
|
|
|
1785
1788
|
return { x: n, y: o, width: r - n, height: s - o };
|
|
1786
1789
|
}
|
|
1787
1790
|
export {
|
|
1788
|
-
|
|
1791
|
+
po as $,
|
|
1789
1792
|
xe as A,
|
|
1790
|
-
|
|
1793
|
+
Qn as B,
|
|
1791
1794
|
he as C,
|
|
1792
1795
|
J as D,
|
|
1793
1796
|
ue as E,
|
|
1794
1797
|
ut as F,
|
|
1795
|
-
|
|
1796
|
-
|
|
1798
|
+
jn as G,
|
|
1799
|
+
bt as H,
|
|
1797
1800
|
ft as I,
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1801
|
+
Me as J,
|
|
1802
|
+
so as K,
|
|
1803
|
+
Fn as L,
|
|
1804
|
+
Eo as M,
|
|
1805
|
+
Ro as N,
|
|
1806
|
+
Io as O,
|
|
1807
|
+
Ye as P,
|
|
1808
|
+
Jn as Q,
|
|
1806
1809
|
ye as R,
|
|
1807
|
-
|
|
1810
|
+
mn as S,
|
|
1808
1811
|
Ht as T,
|
|
1809
|
-
|
|
1810
|
-
|
|
1812
|
+
Ee as U,
|
|
1813
|
+
Pn as V,
|
|
1811
1814
|
vt as W,
|
|
1812
1815
|
wt as X,
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1816
|
+
en as Y,
|
|
1817
|
+
Xn as Z,
|
|
1818
|
+
Cn as _,
|
|
1819
|
+
Tn as a,
|
|
1817
1820
|
Ot as a$,
|
|
1818
|
-
|
|
1819
|
-
|
|
1821
|
+
xn as a0,
|
|
1822
|
+
qn as a1,
|
|
1820
1823
|
Pt as a2,
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
+
Kn as a3,
|
|
1825
|
+
Ln as a4,
|
|
1826
|
+
ho as a5,
|
|
1824
1827
|
P as a6,
|
|
1825
|
-
|
|
1828
|
+
Gn as a7,
|
|
1826
1829
|
Rt as a8,
|
|
1827
|
-
|
|
1830
|
+
yo as a9,
|
|
1828
1831
|
ht as aA,
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1832
|
+
bn as aB,
|
|
1833
|
+
Zn as aC,
|
|
1834
|
+
Dn as aD,
|
|
1835
|
+
Bn as aE,
|
|
1833
1836
|
gn as aF,
|
|
1834
|
-
|
|
1837
|
+
eo as aG,
|
|
1835
1838
|
it as aH,
|
|
1836
1839
|
ae as aI,
|
|
1837
1840
|
V as aJ,
|
|
1838
|
-
|
|
1839
|
-
|
|
1841
|
+
ao as aK,
|
|
1842
|
+
Ao as aL,
|
|
1840
1843
|
Xt as aM,
|
|
1841
|
-
|
|
1844
|
+
Yn as aN,
|
|
1842
1845
|
tt as aO,
|
|
1843
1846
|
Tt as aP,
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1847
|
+
mo as aQ,
|
|
1848
|
+
vn as aR,
|
|
1849
|
+
Vn as aS,
|
|
1850
|
+
$n as aT,
|
|
1851
|
+
an as aU,
|
|
1849
1852
|
Ct as aV,
|
|
1850
|
-
|
|
1853
|
+
Be as aW,
|
|
1851
1854
|
Bt as aX,
|
|
1852
|
-
|
|
1853
|
-
|
|
1855
|
+
Re as aY,
|
|
1856
|
+
co as aZ,
|
|
1854
1857
|
Mt as a_,
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1858
|
+
xo as aa,
|
|
1859
|
+
pn as ab,
|
|
1860
|
+
io as ac,
|
|
1861
|
+
Lo as ad,
|
|
1859
1862
|
et as ae,
|
|
1860
1863
|
xt as af,
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1864
|
+
De as ag,
|
|
1865
|
+
Mo as ah,
|
|
1866
|
+
In as ai,
|
|
1867
|
+
ko as aj,
|
|
1868
|
+
fo as ak,
|
|
1869
|
+
ze as al,
|
|
1867
1870
|
Wt as am,
|
|
1868
1871
|
ke as an,
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
+
wn as ao,
|
|
1873
|
+
Fe as ap,
|
|
1874
|
+
Ue as aq,
|
|
1872
1875
|
Gt as ar,
|
|
1873
1876
|
zt as as,
|
|
1874
|
-
|
|
1877
|
+
oo as at,
|
|
1875
1878
|
pt as au,
|
|
1876
1879
|
Q as av,
|
|
1877
1880
|
Kt as aw,
|
|
1878
1881
|
dt as ax,
|
|
1879
|
-
|
|
1882
|
+
bo as ay,
|
|
1880
1883
|
$t as az,
|
|
1881
1884
|
de as b,
|
|
1882
|
-
|
|
1883
|
-
|
|
1885
|
+
_n as b0,
|
|
1886
|
+
ve as b1,
|
|
1884
1887
|
Ft as b2,
|
|
1885
1888
|
It as b3,
|
|
1886
|
-
|
|
1889
|
+
ro as b4,
|
|
1887
1890
|
yt as b5,
|
|
1888
1891
|
Jt as b6,
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1892
|
+
Wn as b7,
|
|
1893
|
+
Un as b8,
|
|
1894
|
+
zn as b9,
|
|
1895
|
+
Sn as ba,
|
|
1896
|
+
kn as bb,
|
|
1897
|
+
Mn as bc,
|
|
1898
|
+
Oe as bd,
|
|
1899
|
+
Oo as be,
|
|
1900
|
+
lo as bf,
|
|
1901
|
+
z as bg,
|
|
1902
|
+
qt as bh,
|
|
1903
|
+
ee as bi,
|
|
1904
|
+
Dt as bj,
|
|
1905
|
+
je as bk,
|
|
1906
|
+
vo as bl,
|
|
1907
|
+
yn as bm,
|
|
1908
|
+
Et as bn,
|
|
1909
|
+
no as bo,
|
|
1910
|
+
So as bp,
|
|
1911
|
+
An as bq,
|
|
1912
|
+
go as br,
|
|
1909
1913
|
W as c,
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1914
|
+
Nn as d,
|
|
1915
|
+
tn as e,
|
|
1916
|
+
Je as f,
|
|
1913
1917
|
le as g,
|
|
1914
1918
|
fe as h,
|
|
1915
|
-
|
|
1916
|
-
|
|
1919
|
+
Co as i,
|
|
1920
|
+
_o as j,
|
|
1917
1921
|
Zt as k,
|
|
1918
1922
|
Nt as l,
|
|
1919
1923
|
jt as m,
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1924
|
+
Hn as n,
|
|
1925
|
+
uo as o,
|
|
1926
|
+
to as p,
|
|
1927
|
+
On as q,
|
|
1928
|
+
We as r,
|
|
1929
|
+
Te as s,
|
|
1930
|
+
gt as t,
|
|
1927
1931
|
kt as u,
|
|
1928
|
-
|
|
1932
|
+
be as v,
|
|
1929
1933
|
Ce as w,
|
|
1930
1934
|
X as x,
|
|
1931
1935
|
Yt as y,
|