floor-editor-ts 1.4.5 → 1.4.6
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/floor-editor.es.js +511 -353
- package/dist/floor-editor.es.js.map +1 -1
- package/package.json +1 -1
package/dist/floor-editor.es.js
CHANGED
|
@@ -10706,7 +10706,7 @@ function drawWindowDistanceDimensions(cs, wall, window, dimSettings) {
|
|
|
10706
10706
|
}
|
|
10707
10707
|
}
|
|
10708
10708
|
function drawFurnitureItem(cs, item, selected, options) {
|
|
10709
|
-
var _item$scale$x, _item$scale, _item$scale$y, _item$scale2, _item$width, _item$depth, _options$
|
|
10709
|
+
var _item$scale$x, _item$scale, _item$scale$y, _item$scale2, _item$width, _item$depth, _options$showCameraLa, _options$cameraHeatma, _item$color;
|
|
10710
10710
|
const { ctx, zoom } = cs;
|
|
10711
10711
|
const cat = getCatalogItem(item.catalogId);
|
|
10712
10712
|
if (!cat) return;
|
|
@@ -10717,13 +10717,13 @@ function drawFurnitureItem(cs, item, selected, options) {
|
|
|
10717
10717
|
const d = ((_item$depth = item.depth) !== null && _item$depth !== void 0 ? _item$depth : cat.depth) * Math.abs(sy) * zoom;
|
|
10718
10718
|
const angle = item.rotation * Math.PI / 180;
|
|
10719
10719
|
const highlighted = !!((options === null || options === void 0 ? void 0 : options.selectedCameraSerial) && item.serial && item.serial === options.selectedCameraSerial);
|
|
10720
|
-
|
|
10720
|
+
options === null || options === void 0 || options.showCameraCones;
|
|
10721
10721
|
const showCameraLabels = (_options$showCameraLa = options === null || options === void 0 ? void 0 : options.showCameraLabels) !== null && _options$showCameraLa !== void 0 ? _options$showCameraLa : true;
|
|
10722
10722
|
const isCamera = item.catalogId === "camera";
|
|
10723
10723
|
const useConfigHeatmap = isCamera && highlighted && !!(options === null || options === void 0 || (_options$cameraHeatma = options.cameraHeatmapMatrix) === null || _options$cameraHeatma === void 0 ? void 0 : _options$cameraHeatma.length);
|
|
10724
10724
|
const drawHeatmapMatrix = useConfigHeatmap ? options.cameraHeatmapMatrix : item.heatmapMatrix;
|
|
10725
10725
|
const drawShowHeatmap = item.showHeatmap || useConfigHeatmap;
|
|
10726
|
-
const drawCone = isCamera &&
|
|
10726
|
+
const drawCone = isCamera && selected;
|
|
10727
10727
|
ctx.save();
|
|
10728
10728
|
ctx.translate(s.x, s.y);
|
|
10729
10729
|
ctx.rotate(angle);
|
|
@@ -11325,20 +11325,19 @@ function drawZones(cs, floor, selectedZoneId) {
|
|
|
11325
11325
|
function drawZoneDraft(cs, points, color, closed, cursor) {
|
|
11326
11326
|
if (!points.length && !cursor) return;
|
|
11327
11327
|
const { ctx, zoom } = cs;
|
|
11328
|
-
const pts = [...points];
|
|
11329
|
-
if (cursor) pts.push(cursor);
|
|
11330
11328
|
ctx.save();
|
|
11331
11329
|
ctx.strokeStyle = color;
|
|
11332
11330
|
ctx.fillStyle = hexToRgba(color, .12);
|
|
11333
|
-
ctx.lineWidth = 2;
|
|
11331
|
+
ctx.lineWidth = 2.5;
|
|
11334
11332
|
ctx.lineJoin = "round";
|
|
11335
|
-
ctx.
|
|
11336
|
-
if (
|
|
11333
|
+
ctx.lineCap = "round";
|
|
11334
|
+
if (points.length >= 2) {
|
|
11335
|
+
ctx.setLineDash([]);
|
|
11337
11336
|
ctx.beginPath();
|
|
11338
|
-
const first = wts(cs,
|
|
11337
|
+
const first = wts(cs, points[0].x, points[0].y);
|
|
11339
11338
|
ctx.moveTo(first.x, first.y);
|
|
11340
|
-
for (let i = 1; i <
|
|
11341
|
-
const s = wts(cs,
|
|
11339
|
+
for (let i = 1; i < points.length; i++) {
|
|
11340
|
+
const s = wts(cs, points[i].x, points[i].y);
|
|
11342
11341
|
ctx.lineTo(s.x, s.y);
|
|
11343
11342
|
}
|
|
11344
11343
|
if (closed && points.length >= 3) {
|
|
@@ -11347,17 +11346,19 @@ function drawZoneDraft(cs, points, color, closed, cursor) {
|
|
|
11347
11346
|
}
|
|
11348
11347
|
ctx.stroke();
|
|
11349
11348
|
}
|
|
11350
|
-
if (!closed && cursor && points.length >=
|
|
11351
|
-
const
|
|
11352
|
-
const
|
|
11353
|
-
|
|
11349
|
+
if (!closed && cursor && points.length >= 1) {
|
|
11350
|
+
const last = points[points.length - 1];
|
|
11351
|
+
const a = wts(cs, last.x, last.y);
|
|
11352
|
+
const b = wts(cs, cursor.x, cursor.y);
|
|
11353
|
+
ctx.setLineDash([6 * Math.max(.6, zoom), 4 * Math.max(.6, zoom)]);
|
|
11354
|
+
ctx.globalAlpha = .85;
|
|
11354
11355
|
ctx.beginPath();
|
|
11355
11356
|
ctx.moveTo(a.x, a.y);
|
|
11356
11357
|
ctx.lineTo(b.x, b.y);
|
|
11357
11358
|
ctx.stroke();
|
|
11358
11359
|
ctx.globalAlpha = 1;
|
|
11360
|
+
ctx.setLineDash([]);
|
|
11359
11361
|
}
|
|
11360
|
-
ctx.setLineDash([]);
|
|
11361
11362
|
for (let i = 0; i < points.length; i++) {
|
|
11362
11363
|
const s = wts(cs, points[i].x, points[i].y);
|
|
11363
11364
|
drawVertexIndexBadge(ctx, s.x, s.y, i, color, 9);
|
|
@@ -60152,9 +60153,9 @@ var themePreference = createThemeStore();
|
|
|
60152
60153
|
init_client();
|
|
60153
60154
|
var root_2$13 = /* @__PURE__ */ from_html(`<div class="absolute bottom-0 left-0 right-0 h-0.5 bg-slate-700 dark:bg-slate-300 rounded-t"></div>`);
|
|
60154
60155
|
var root_3$12 = /* @__PURE__ */ from_html(`<div class="absolute bottom-0 left-0 right-0 h-0.5 bg-slate-700 dark:bg-slate-300 rounded-t"></div>`);
|
|
60155
|
-
var root_4$
|
|
60156
|
+
var root_4$10 = /* @__PURE__ */ from_html(`<div class="absolute bottom-0 left-0 right-0 h-0.5 bg-slate-700 dark:bg-slate-300 rounded-t"></div>`);
|
|
60156
60157
|
var root_5$8 = /* @__PURE__ */ from_html(`<div class="absolute bottom-0 left-0 right-0 h-0.5 bg-slate-700 dark:bg-slate-300 rounded-t"></div>`);
|
|
60157
|
-
var root_6$
|
|
60158
|
+
var root_6$5 = /* @__PURE__ */ from_html(`<div class="space-y-4"><label class="block"><span class="text-sm font-medium text-gray-700 dark:text-gray-300">Project Name</span> <input type="text" class="mt-1 w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg text-sm focus:ring-2 focus:ring-slate-500 focus:border-slate-500 outline-none bg-white dark:bg-gray-700 dark:text-gray-100" placeholder="Untitled Project"/></label> <label class="block"><span class="text-sm font-medium text-gray-700 dark:text-gray-300">Description</span> <textarea rows="3" class="mt-1 w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg text-sm focus:ring-2 focus:ring-slate-500 focus:border-slate-500 outline-none resize-none bg-white dark:bg-gray-700 dark:text-gray-100" placeholder="Add a description for this project..."></textarea></label></div>`);
|
|
60158
60159
|
var root_7$7 = /* @__PURE__ */ from_html(`<div class="flex items-center justify-between mb-5"><span class="text-sm font-medium text-gray-700 dark:text-gray-300">Metrics unit</span> <div class="flex rounded-lg border border-gray-300 dark:border-gray-600 overflow-hidden"><button>m, cm</button> <button>ft, inch</button></div></div> <div class="bg-gray-50 dark:bg-gray-700/50 rounded-xl divide-y divide-gray-200 dark:divide-gray-600"><label class="flex items-center justify-between px-4 py-3.5 cursor-pointer"><span class="text-sm text-gray-700">Dimensions</span> <input type="checkbox" class="w-10 h-5 rounded-full appearance-none cursor-pointer bg-gray-300 checked:bg-slate-700 relative transition-colors
|
|
60159
60160
|
before:content-[''] before:absolute before:w-4 before:h-4 before:rounded-full before:bg-white before:top-0.5 before:left-0.5 before:transition-transform checked:before:translate-x-5"/></label> <label class="flex items-center justify-between px-4 py-3.5 cursor-pointer"><span class="text-sm text-gray-700">External Dimensions</span> <input type="checkbox" class="w-10 h-5 rounded-full appearance-none cursor-pointer bg-gray-300 checked:bg-slate-700 relative transition-colors
|
|
60160
60161
|
before:content-[''] before:absolute before:w-4 before:h-4 before:rounded-full before:bg-white before:top-0.5 before:left-0.5 before:transition-transform checked:before:translate-x-5"/></label> <label class="flex items-center justify-between px-4 py-3.5 cursor-pointer"><span class="text-sm text-gray-700">Internal Dimensions</span> <input type="checkbox" class="w-10 h-5 rounded-full appearance-none cursor-pointer bg-gray-300 checked:bg-slate-700 relative transition-colors
|
|
@@ -60296,7 +60297,7 @@ function SettingsDialog($$anchor, $$props) {
|
|
|
60296
60297
|
var button_3 = sibling(button_2, 2);
|
|
60297
60298
|
var node_3 = sibling(child(button_3));
|
|
60298
60299
|
var consequent_2 = ($$anchor) => {
|
|
60299
|
-
append($$anchor, root_4$
|
|
60300
|
+
append($$anchor, root_4$10());
|
|
60300
60301
|
};
|
|
60301
60302
|
if_block(node_3, ($$render) => {
|
|
60302
60303
|
if (get(activeTab) === "appearance") $$render(consequent_2);
|
|
@@ -60315,7 +60316,7 @@ function SettingsDialog($$anchor, $$props) {
|
|
|
60315
60316
|
var div_8 = sibling(div_3, 2);
|
|
60316
60317
|
var node_5 = child(div_8);
|
|
60317
60318
|
var consequent_4 = ($$anchor) => {
|
|
60318
|
-
var div_9 = root_6$
|
|
60319
|
+
var div_9 = root_6$5();
|
|
60319
60320
|
var label_1 = child(div_9);
|
|
60320
60321
|
var input = sibling(child(label_1), 2);
|
|
60321
60322
|
remove_input_defaults(input);
|
|
@@ -60560,7 +60561,7 @@ delegate([
|
|
|
60560
60561
|
init_client();
|
|
60561
60562
|
var root_2$12 = /* @__PURE__ */ from_html(`<div class="flex items-center justify-between text-xs bg-gray-50 rounded px-2 py-1.5"><span class="text-gray-700"> <span class="text-gray-400"> </span></span> <span class="font-medium text-gray-800"> </span></div>`);
|
|
60562
60563
|
var root_1$13 = /* @__PURE__ */ from_html(`<div><h4 class="text-xs font-semibold text-gray-500 uppercase mb-1.5">By Category</h4> <div class="space-y-1"></div></div>`);
|
|
60563
|
-
var root_4$
|
|
60564
|
+
var root_4$9 = /* @__PURE__ */ from_html(`<div class="flex items-center gap-1.5 text-xs px-1 py-1"><div class="flex-1 min-w-0"><div class="flex items-center justify-between"><span class="text-gray-700 truncate"> </span> <span class="text-gray-500 ml-1 shrink-0"> </span></div> <div class="w-full bg-gray-200 rounded-full h-1 mt-0.5"><div class="bg-blue-400 h-1 rounded-full"></div></div></div> <span class="text-[10px] text-gray-400 w-8 text-right shrink-0"> </span></div>`);
|
|
60564
60565
|
var root_3$11 = /* @__PURE__ */ from_html(`<div><h4 class="text-xs font-semibold text-gray-500 uppercase mb-1.5">Room Breakdown</h4> <div class="space-y-0.5"></div></div>`);
|
|
60565
60566
|
var root_5$7 = /* @__PURE__ */ from_html(`<p class="text-xs text-gray-400 text-center py-4">No rooms detected yet.<br/>Draw walls to create rooms.</p>`);
|
|
60566
60567
|
var root$6 = /* @__PURE__ */ from_html(`<div class="space-y-3"><div class="grid grid-cols-2 gap-2"><div class="bg-blue-50 rounded-lg p-2 text-center"><div class="text-lg font-bold text-blue-700"> </div> <div class="text-[10px] text-blue-500">Rooms</div></div> <div class="bg-green-50 rounded-lg p-2 text-center"><div class="text-lg font-bold text-green-700"> </div> <div class="text-[10px] text-green-500">Total Area</div></div> <div class="bg-amber-50 rounded-lg p-2 text-center"><div class="text-sm font-bold text-amber-700"> </div> <div class="text-[10px] text-amber-500">Doors / Windows</div></div> <div class="bg-purple-50 rounded-lg p-2 text-center"><div class="text-sm font-bold text-purple-700"> </div> <div class="text-[10px] text-purple-500">Wall Length</div></div></div> <!> <!></div>`);
|
|
@@ -60711,7 +60712,7 @@ function AreaSummaryPanel($$anchor, $$props) {
|
|
|
60711
60712
|
var div_14 = sibling(child(div_13), 2);
|
|
60712
60713
|
each(div_14, 21, () => get(allRooms), index$1, ($$anchor, room) => {
|
|
60713
60714
|
const pct = /* @__PURE__ */ user_derived(() => get(totalArea) > 0 ? get(room).area / get(totalArea) * 100 : 0);
|
|
60714
|
-
var div_15 = root_4$
|
|
60715
|
+
var div_15 = root_4$9();
|
|
60715
60716
|
var div_16 = child(div_15);
|
|
60716
60717
|
var div_17 = child(div_16);
|
|
60717
60718
|
var span_3 = child(div_17);
|
|
@@ -60915,7 +60916,7 @@ function markClean() {
|
|
|
60915
60916
|
//#region src/lib/components/toolbar/VersionHistoryPanel.svelte
|
|
60916
60917
|
init_client();
|
|
60917
60918
|
var root_2$11 = /* @__PURE__ */ from_html(`<p class="text-sm text-gray-400 text-center py-8">No snapshots yet.<br/>Versions are saved automatically every 5 minutes.</p>`);
|
|
60918
|
-
var root_4$
|
|
60919
|
+
var root_4$8 = /* @__PURE__ */ from_html(`<div class="flex items-center justify-between py-2 px-2 rounded-lg hover:bg-gray-50 group transition-colors"><div class="flex-1 min-w-0"><div class="text-sm font-medium text-gray-700 truncate"> </div> <div class="text-xs text-gray-400"> </div></div> <button class="text-xs px-2.5 py-1 bg-blue-50 text-blue-600 rounded-md hover:bg-blue-100 transition-colors opacity-0 group-hover:opacity-100 font-medium shrink-0 ml-2">Restore</button></div>`);
|
|
60919
60920
|
var root_3$10 = /* @__PURE__ */ from_html(`<div class="space-y-1"></div>`);
|
|
60920
60921
|
var root_5$6 = /* @__PURE__ */ from_html(`<div class="px-4 py-2 border-t border-gray-100"><button class="text-xs text-red-400 hover:text-red-600 transition-colors">Clear all versions</button></div>`);
|
|
60921
60922
|
var root_1$12 = /* @__PURE__ */ from_html(`<div class="fixed inset-0 bg-black/40 z-50 flex items-center justify-center"><div class="bg-white rounded-xl shadow-2xl w-96 max-h-[70vh] flex flex-col"><div class="flex items-center justify-between px-4 py-3 border-b border-gray-100"><h2 class="text-sm font-semibold text-gray-800 flex items-center gap-2"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg> Version History</h2> <button class="text-gray-400 hover:text-gray-600 transition-colors" aria-label="Close"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button></div> <div class="flex-1 overflow-y-auto px-4 py-2"><!></div> <!></div></div>`);
|
|
@@ -60970,7 +60971,7 @@ function VersionHistoryPanel($$anchor, $$props) {
|
|
|
60970
60971
|
var div_4 = root_3$10();
|
|
60971
60972
|
each(div_4, 21, () => [...get(snapshots)].reverse(), index$1, ($$anchor, snap, i) => {
|
|
60972
60973
|
const realIndex = /* @__PURE__ */ user_derived(() => get(snapshots).length - 1 - i);
|
|
60973
|
-
var div_5 = root_4$
|
|
60974
|
+
var div_5 = root_4$8();
|
|
60974
60975
|
var div_6 = child(div_5);
|
|
60975
60976
|
var div_7 = child(div_6);
|
|
60976
60977
|
var text = child(div_7, true);
|
|
@@ -61031,9 +61032,9 @@ init_client();
|
|
|
61031
61032
|
init_index_client();
|
|
61032
61033
|
init_onboarding_svelte();
|
|
61033
61034
|
var root_3$9 = /* @__PURE__ */ from_svg(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3v3a2 2 0 0 1-2 2H3"></path><path d="M21 8h-3a2 2 0 0 1-2-2V3"></path><path d="M3 16h3a2 2 0 0 1 2 2v3"></path><path d="M16 21v-3a2 2 0 0 1 2-2h3"></path></svg>`);
|
|
61034
|
-
var root_4$
|
|
61035
|
+
var root_4$7 = /* @__PURE__ */ from_svg(`<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8 3H5a2 2 0 0 0-2 2v3"></path><path d="M21 8V5a2 2 0 0 0-2-2h-3"></path><path d="M3 16v3a2 2 0 0 0 2 2h3"></path><path d="M16 21h3a2 2 0 0 0 2-2v-3"></path></svg>`);
|
|
61035
61036
|
var root_5$5 = /* @__PURE__ */ from_html(`<input type="text" class="bg-white/20 text-white font-semibold px-2 py-0.5 rounded border border-white/30 outline-none text-sm w-40"/>`);
|
|
61036
|
-
var root_6$
|
|
61037
|
+
var root_6$4 = /* @__PURE__ */ from_html(`<button class="font-semibold text-white text-sm hover:bg-white/10 px-2 py-0.5 rounded transition-colors" title="Click to rename"> </button>`);
|
|
61037
61038
|
var root_7$6 = /* @__PURE__ */ from_html(`<button> </button>`);
|
|
61038
61039
|
var root_8$3 = /* @__PURE__ */ from_html(`<button aria-label="Snap to Grid"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg></button>`);
|
|
61039
61040
|
var root_9$3 = /* @__PURE__ */ from_html(`<div class="flex bg-white/15 rounded-full p-0.5 shrink-0"><button title="Select mode (V)" aria-label="Select mode"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg></button> <button title="Pan mode (H)" aria-label="Pan mode"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 11V6a2 2 0 0 0-4 0v1"></path><path d="M14 10V4a2 2 0 0 0-4 0v2"></path><path d="M10 10.5V6a2 2 0 0 0-4 0v8"></path><path d="M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15"></path></svg></button></div>`);
|
|
@@ -61312,7 +61313,7 @@ function TopBar($$anchor, $$props) {
|
|
|
61312
61313
|
append($$anchor, root_3$9());
|
|
61313
61314
|
};
|
|
61314
61315
|
var alternate = ($$anchor) => {
|
|
61315
|
-
append($$anchor, root_4$
|
|
61316
|
+
append($$anchor, root_4$7());
|
|
61316
61317
|
};
|
|
61317
61318
|
if_block(node_1, ($$render) => {
|
|
61318
61319
|
if (get(isFullscreen)) $$render(consequent);
|
|
@@ -61329,7 +61330,7 @@ function TopBar($$anchor, $$props) {
|
|
|
61329
61330
|
append($$anchor, input_1);
|
|
61330
61331
|
};
|
|
61331
61332
|
var alternate_1 = ($$anchor) => {
|
|
61332
|
-
var button_2 = root_6$
|
|
61333
|
+
var button_2 = root_6$4();
|
|
61333
61334
|
var text_1 = child(button_2, true);
|
|
61334
61335
|
reset(button_2);
|
|
61335
61336
|
template_effect(() => set_text(text_1, get(projectName)));
|
|
@@ -62226,7 +62227,7 @@ function placeRoomTemplate(preset, origin, template, w = 400, h = 300) {
|
|
|
62226
62227
|
//#region src/lib/components/editor/UndoHistoryPanel.svelte
|
|
62227
62228
|
init_client();
|
|
62228
62229
|
var root_2$9 = /* @__PURE__ */ from_html(`<div class="px-3 py-6 text-center text-xs text-gray-400">No history yet</div>`);
|
|
62229
|
-
var root_4$
|
|
62230
|
+
var root_4$6 = /* @__PURE__ */ from_html(`<button><span class="w-5 text-[10px] text-gray-400 text-right shrink-0"></span> <span class="truncate flex-1"> </span> <span class="text-[10px] text-gray-300 shrink-0"> </span></button>`);
|
|
62230
62231
|
var root_3$8 = /* @__PURE__ */ from_html(`<div class="py-1"><!> <div><span class="w-5 text-[10px] text-gray-400 text-right shrink-0">●</span> <span class="truncate flex-1 font-medium">Current state</span></div></div>`);
|
|
62231
62232
|
var root_1$10 = /* @__PURE__ */ from_html(`<div class="fixed bottom-12 left-4 w-64 max-h-80 bg-white rounded-xl shadow-2xl border border-gray-200 z-50 flex flex-col overflow-hidden"><div class="flex items-center justify-between px-3 py-2 border-b border-gray-100 bg-gray-50"><div class="flex items-center gap-1.5"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="text-slate-500"><polyline points="1 4 1 10 7 10"></polyline><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path></svg> <span class="text-xs font-semibold text-slate-700">Undo History</span></div> <div class="flex items-center gap-2"><span class="text-[10px] text-slate-400"> </span> <button class="text-gray-400 hover:text-gray-600 text-sm leading-none" aria-label="Close history">✕</button></div></div> <div class="flex-1 overflow-y-auto"><!></div></div>`);
|
|
62232
62233
|
function UndoHistoryPanel($$anchor, $$props) {
|
|
@@ -62270,7 +62271,7 @@ function UndoHistoryPanel($$anchor, $$props) {
|
|
|
62270
62271
|
var div_5 = root_3$8();
|
|
62271
62272
|
var node_2 = child(div_5);
|
|
62272
62273
|
each(node_2, 17, () => get(history).entries, index$1, ($$anchor, entry, i) => {
|
|
62273
|
-
var button_1 = root_4$
|
|
62274
|
+
var button_1 = root_4$6();
|
|
62274
62275
|
let classes;
|
|
62275
62276
|
var span_1 = child(button_1);
|
|
62276
62277
|
span_1.textContent = i + 1;
|
|
@@ -62328,12 +62329,10 @@ delegate(["click"]);
|
|
|
62328
62329
|
//#region src/lib/components/sidebar/BuildPanel.svelte
|
|
62329
62330
|
init_client();
|
|
62330
62331
|
init_index_client();
|
|
62331
|
-
var root_4$6 = /* @__PURE__ */ from_html(`Click path · nhấn <strong>✓</strong> trên toolbar để đóng · 🗑 xoá`, 1);
|
|
62332
62332
|
var root_7$5 = /* @__PURE__ */ from_html(`<button draggable="true"><div class="w-9 h-9 rounded-lg bg-amber-50 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#92400e" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path></path></svg></div> <span class="text-xs font-medium text-gray-600"> </span> <span class="text-[10px] text-gray-400"> </span></button>`);
|
|
62333
62333
|
var root_8$2 = /* @__PURE__ */ from_html(`<button draggable="true"><div class="w-9 h-9 rounded-lg bg-cyan-50 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#0e7490" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="16" rx="1"></rect><line x1="12" y1="4" x2="12" y2="20"></line><line x1="3" y1="12" x2="21" y2="12"></line></svg></div> <span class="text-xs font-medium text-gray-600"> </span> <span class="text-[10px] text-gray-400"> </span></button>`);
|
|
62334
|
-
var root_6$
|
|
62335
|
-
var root_1$9 = /* @__PURE__ */ from_html(`<div class="space-y-1"><h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Tools</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg></div> <div class="text-left"><div class="font-medium">Select <span class="text-gray-400 text-xs ml-1">V</span></div> <div class="text-xs text-gray-400">Click to select elements</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="8" width="18" height="8" rx="1"></rect><line x1="7" y1="8" x2="7" y2="16"></line><line x1="12" y1="8" x2="12" y2="16"></line><line x1="17" y1="8" x2="17" y2="16"></line></svg></div> <div class="text-left"><div class="font-medium">Draw Wall <span class="text-gray-400 text-xs ml-1">W</span></div> <div class="text-xs text-gray-400">Click to draw, dbl-click to finish</div></div></button> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Camera FOV</h3> <button type="button"><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><path d="M7 4 L17 6 L20 14 L12 20 L4 12 Z"></path></svg></div> <div class="text-left"><div class="font-medium">Draw
|
|
62336
|
-
Nhấn ✓ đóng polygon · 🗑 xoá. Click polygon để hiện lại toolbar.</p> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Zone</h3> <div class="grid grid-cols-3 gap-1.5 mb-1"><button type="button" title="Drag to create rectangle area"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><rect x="4" y="6" width="16" height="12" rx="1"></rect></svg> Rect</button> <button type="button" title="Click to place triangle area"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><path d="M12 4 L20 19 L4 19 Z"></path></svg> Triangle</button> <button type="button" title="Click vertices; double-click or Enter to finish"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><path d="M7 4 L17 6 L20 14 L12 20 L4 12 Z"></path></svg> Polygon</button></div> <p class="text-[10px] text-gray-400 mb-2 px-0.5"><!></p> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Structure</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 5h-5V2h-3v6h-4V5H7v6H2v3h5v3h3v-3h4v3h3v-6h5z"></path></svg></div> <div class="text-left"><div class="font-medium">Add Stairs</div> <div class="text-xs text-gray-400">Click to place stairs</div></div></button> <div class="flex gap-2"><button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="6"></circle><line x1="6" y1="6" x2="18" y2="18"></line><line x1="18" y1="6" x2="6" y2="18"></line></svg></div> <div class="text-left"><div class="font-medium text-xs">Round Column</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="6" y="6" width="12" height="12"></rect><line x1="6" y1="6" x2="18" y2="18"></line><line x1="18" y1="6" x2="6" y2="18"></line></svg></div> <div class="text-left"><div class="font-medium text-xs">Square Column</div></div></button></div> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Annotate</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7V4h16v3"></path><line x1="12" y1="4" x2="12" y2="20"></line><line x1="8" y1="20" x2="16" y2="20"></line></svg></div> <div class="text-left"><div class="font-medium">Text Label</div> <div class="text-xs text-gray-400">Add text annotations (T)</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><line x1="16" y1="5" x2="22" y2="5"></line><line x1="19" y1="2" x2="19" y2="8"></line><line x1="3" y1="12" x2="12" y2="12"></line></svg></div> <div class="text-left"><div class="font-medium">Dimension</div> <div class="text-xs text-gray-400">Add dimension annotations (N)</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12h5l2-7 4 14 2-7h7"></path></svg></div> <div class="text-left"><div class="font-medium">Measure</div> <div class="text-xs text-gray-400">Measure distances (M)</div></div></button> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Import</h3> <button class="w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors hover:bg-gray-50 text-gray-700"><div class="w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="9" cy="9" r="2"></circle><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"></path></svg></div> <div class="text-left"><div class="font-medium">Import Image</div> <div class="text-xs text-gray-400">Floor plan background</div></div></button> <button class="w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors hover:bg-gray-50 text-gray-700"><div class="w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg></div> <div class="text-left"><div class="font-medium">Import RoomPlan</div> <div class="text-xs text-gray-400">iOS LiDAR scan (.json/.zip)</div></div></button> <button class="w-full flex items-center justify-between px-1 py-2 mt-3"><h3 class="text-xs font-semibold text-gray-400 uppercase">Doors</h3> <span class="text-gray-400 text-xs"> </span></button> <!></div>`);
|
|
62334
|
+
var root_6$3 = /* @__PURE__ */ from_html(`<div class="grid grid-cols-2 gap-2 mb-3"></div> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Windows</h3> <div class="grid grid-cols-2 gap-2"></div>`, 1);
|
|
62335
|
+
var root_1$9 = /* @__PURE__ */ from_html(`<div class="space-y-1"><h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Tools</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg></div> <div class="text-left"><div class="font-medium">Select <span class="text-gray-400 text-xs ml-1">V</span></div> <div class="text-xs text-gray-400">Click to select elements</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="8" width="18" height="8" rx="1"></rect><line x1="7" y1="8" x2="7" y2="16"></line><line x1="12" y1="8" x2="12" y2="16"></line><line x1="17" y1="8" x2="17" y2="16"></line></svg></div> <div class="text-left"><div class="font-medium">Draw Wall <span class="text-gray-400 text-xs ml-1">W</span></div> <div class="text-xs text-gray-400">Click to draw, dbl-click to finish</div></div></button> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Camera FOV</h3> <button type="button"><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><path d="M7 4 L17 6 L20 14 L12 20 L4 12 Z"></path></svg></div> <div class="text-left min-w-0"><div class="font-medium truncate whitespace-nowrap">Draw FOV · ✓ finish · 🗑 delete</div></div></button> <p class="text-[10px] text-gray-400 mb-3 px-0.5 whitespace-nowrap overflow-hidden text-ellipsis">Select camera, draw on floor → <code class="font-mono">mapCoordinates</code></p> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Zone</h3> <div class="grid grid-cols-3 gap-1.5 mb-1"><button type="button" title="Drag to create rectangle area"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><rect x="4" y="6" width="16" height="12" rx="1"></rect></svg> Rect</button> <button type="button" title="Click to place triangle area"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><path d="M12 4 L20 19 L4 19 Z"></path></svg> Triangle</button> <button type="button" title="Click vertices; double-click or Enter to finish"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><path d="M7 4 L17 6 L20 14 L12 20 L4 12 Z"></path></svg> Polygon</button></div> <p class="text-[10px] text-gray-400 mb-2 px-0.5"><!></p> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Structure</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 5h-5V2h-3v6h-4V5H7v6H2v3h5v3h3v-3h4v3h3v-6h5z"></path></svg></div> <div class="text-left"><div class="font-medium">Add Stairs</div> <div class="text-xs text-gray-400">Click to place stairs</div></div></button> <div class="flex gap-2"><button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="6"></circle><line x1="6" y1="6" x2="18" y2="18"></line><line x1="18" y1="6" x2="6" y2="18"></line></svg></div> <div class="text-left"><div class="font-medium text-xs">Round Column</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="6" y="6" width="12" height="12"></rect><line x1="6" y1="6" x2="18" y2="18"></line><line x1="18" y1="6" x2="6" y2="18"></line></svg></div> <div class="text-left"><div class="font-medium text-xs">Square Column</div></div></button></div> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Annotate</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7V4h16v3"></path><line x1="12" y1="4" x2="12" y2="20"></line><line x1="8" y1="20" x2="16" y2="20"></line></svg></div> <div class="text-left"><div class="font-medium">Text Label</div> <div class="text-xs text-gray-400">Add text annotations (T)</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><line x1="16" y1="5" x2="22" y2="5"></line><line x1="19" y1="2" x2="19" y2="8"></line><line x1="3" y1="12" x2="12" y2="12"></line></svg></div> <div class="text-left"><div class="font-medium">Dimension</div> <div class="text-xs text-gray-400">Add dimension annotations (N)</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12h5l2-7 4 14 2-7h7"></path></svg></div> <div class="text-left"><div class="font-medium">Measure</div> <div class="text-xs text-gray-400">Measure distances (M)</div></div></button> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Import</h3> <button class="w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors hover:bg-gray-50 text-gray-700"><div class="w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="9" cy="9" r="2"></circle><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"></path></svg></div> <div class="text-left"><div class="font-medium">Import Image</div> <div class="text-xs text-gray-400">Floor plan background</div></div></button> <button class="w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors hover:bg-gray-50 text-gray-700"><div class="w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg></div> <div class="text-left"><div class="font-medium">Import RoomPlan</div> <div class="text-xs text-gray-400">iOS LiDAR scan (.json/.zip)</div></div></button> <button class="w-full flex items-center justify-between px-1 py-2 mt-3"><h3 class="text-xs font-semibold text-gray-400 uppercase">Doors</h3> <span class="text-gray-400 text-xs"> </span></button> <!></div>`);
|
|
62337
62336
|
var root_10$3 = /* @__PURE__ */ from_html(`<button class="flex flex-col items-center gap-1.5 p-3 rounded-lg border-2 border-gray-100 hover:border-blue-300 hover:bg-blue-50 transition-colors cursor-grab active:cursor-grabbing" draggable="true"><div class="w-12 h-12 rounded-lg bg-gray-50 flex items-center justify-center text-2xl font-mono"> </div> <span class="text-xs font-medium text-gray-600"> </span></button>`);
|
|
62338
62337
|
var root_11$3 = /* @__PURE__ */ from_html(`<button class="flex flex-col items-center gap-1.5 p-3 rounded-lg border-2 border-gray-100 hover:border-green-300 hover:bg-green-50 transition-colors cursor-grab active:cursor-grabbing" draggable="true"><div class="w-12 h-12 rounded-lg bg-green-50 flex items-center justify-center text-lg"><!></div> <span class="text-xs font-medium text-gray-600"> </span> <span class="text-[10px] text-gray-400"> </span></button>`);
|
|
62339
62338
|
var root_9$2 = /* @__PURE__ */ from_html(`<div class="space-y-2"><h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Room Presets</h3> <p class="text-xs text-gray-400 mb-3">Click to add a room shape to the canvas</p> <div class="grid grid-cols-2 gap-2"></div> <hr class="my-3 border-gray-200"/> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Room Templates</h3> <p class="text-xs text-gray-400 mb-3">Pre-furnished rooms — walls + furniture in one click</p> <div class="grid grid-cols-2 gap-2"></div></div>`);
|
|
@@ -62706,9 +62705,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62706
62705
|
append($$anchor, text$1("Click to place · then drag vertices"));
|
|
62707
62706
|
};
|
|
62708
62707
|
var consequent_2 = ($$anchor) => {
|
|
62709
|
-
|
|
62710
|
-
next(2);
|
|
62711
|
-
append($$anchor, fragment_1);
|
|
62708
|
+
append($$anchor, text$1("Click path · ✓ to finish · 🗑 to delete"));
|
|
62712
62709
|
};
|
|
62713
62710
|
var alternate = ($$anchor) => {
|
|
62714
62711
|
append($$anchor, text$1("Select a camera first, then draw its Zone"));
|
|
@@ -62750,13 +62747,13 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62750
62747
|
var button_16 = sibling(button_15, 2);
|
|
62751
62748
|
var button_17 = sibling(button_16, 2);
|
|
62752
62749
|
var span = sibling(child(button_17), 2);
|
|
62753
|
-
var
|
|
62750
|
+
var text_5 = child(span, true);
|
|
62754
62751
|
reset(span);
|
|
62755
62752
|
reset(button_17);
|
|
62756
62753
|
var node_2 = sibling(button_17, 2);
|
|
62757
62754
|
var consequent_3 = ($$anchor) => {
|
|
62758
|
-
var
|
|
62759
|
-
var div_15 = first_child(
|
|
62755
|
+
var fragment_1 = root_6$3();
|
|
62756
|
+
var div_15 = first_child(fragment_1);
|
|
62760
62757
|
each(div_15, 21, () => doorCatalog, index$1, ($$anchor, dc) => {
|
|
62761
62758
|
var button_18 = root_7$5();
|
|
62762
62759
|
var div_16 = child(button_18);
|
|
@@ -62765,17 +62762,17 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62765
62762
|
reset(svg);
|
|
62766
62763
|
reset(div_16);
|
|
62767
62764
|
var span_1 = sibling(div_16, 2);
|
|
62768
|
-
var
|
|
62765
|
+
var text_6 = child(span_1, true);
|
|
62769
62766
|
reset(span_1);
|
|
62770
62767
|
var span_2 = sibling(span_1, 2);
|
|
62771
|
-
var
|
|
62768
|
+
var text_7 = child(span_2, true);
|
|
62772
62769
|
reset(span_2);
|
|
62773
62770
|
reset(button_18);
|
|
62774
62771
|
template_effect(() => {
|
|
62775
62772
|
set_class(button_18, 1, `flex flex-col items-center gap-1 p-2.5 rounded-lg border-2 transition-colors cursor-grab active:cursor-grabbing ${get(currentTool) === "door" && get(selectedDoorType) === get(dc).type ? "border-blue-400 bg-blue-50" : "border-gray-100 hover:border-gray-200"}`);
|
|
62776
62773
|
set_attribute(path, "d", get(dc).icon);
|
|
62777
|
-
set_text(
|
|
62778
|
-
set_text(
|
|
62774
|
+
set_text(text_6, get(dc).name);
|
|
62775
|
+
set_text(text_7, get(dc).desc);
|
|
62779
62776
|
});
|
|
62780
62777
|
delegated("click", button_18, () => setDoorType(get(dc).type));
|
|
62781
62778
|
event("dragstart", button_18, (e) => {
|
|
@@ -62790,16 +62787,16 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62790
62787
|
each(div_17, 21, () => windowCatalog, index$1, ($$anchor, wc) => {
|
|
62791
62788
|
var button_19 = root_8$2();
|
|
62792
62789
|
var span_3 = sibling(child(button_19), 2);
|
|
62793
|
-
var
|
|
62790
|
+
var text_8 = child(span_3, true);
|
|
62794
62791
|
reset(span_3);
|
|
62795
62792
|
var span_4 = sibling(span_3, 2);
|
|
62796
|
-
var
|
|
62793
|
+
var text_9 = child(span_4, true);
|
|
62797
62794
|
reset(span_4);
|
|
62798
62795
|
reset(button_19);
|
|
62799
62796
|
template_effect(() => {
|
|
62800
62797
|
set_class(button_19, 1, `flex flex-col items-center gap-1 p-2.5 rounded-lg border-2 transition-colors cursor-grab active:cursor-grabbing ${get(currentTool) === "window" && get(selectedWindowType) === get(wc).type ? "border-blue-400 bg-blue-50" : "border-gray-100 hover:border-gray-200"}`);
|
|
62801
|
-
set_text(
|
|
62802
|
-
set_text(
|
|
62798
|
+
set_text(text_8, get(wc).name);
|
|
62799
|
+
set_text(text_9, get(wc).desc);
|
|
62803
62800
|
});
|
|
62804
62801
|
delegated("click", button_19, () => setWindowType(get(wc).type));
|
|
62805
62802
|
event("dragstart", button_19, (e) => {
|
|
@@ -62810,7 +62807,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62810
62807
|
append($$anchor, button_19);
|
|
62811
62808
|
});
|
|
62812
62809
|
reset(div_17);
|
|
62813
|
-
append($$anchor,
|
|
62810
|
+
append($$anchor, fragment_1);
|
|
62814
62811
|
};
|
|
62815
62812
|
if_block(node_2, ($$render) => {
|
|
62816
62813
|
if (get(constructionOpen)) $$render(consequent_3);
|
|
@@ -62838,7 +62835,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62838
62835
|
set_class(div_13, 1, `w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center ${get(currentTool) === "annotate" ? "bg-blue-100" : ""}`);
|
|
62839
62836
|
set_class(button_14, 1, `w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors ${get(currentTool) === "measure" ? "bg-blue-50 text-slate-800 ring-1 ring-blue-200" : "hover:bg-gray-50 text-gray-700"}`);
|
|
62840
62837
|
set_class(div_14, 1, `w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center ${get(currentTool) === "measure" ? "bg-blue-100" : ""}`);
|
|
62841
|
-
set_text(
|
|
62838
|
+
set_text(text_5, get(constructionOpen) ? "▼" : "▶");
|
|
62842
62839
|
});
|
|
62843
62840
|
delegated("click", button_3, () => setTool("select"));
|
|
62844
62841
|
delegated("click", button_4, () => setTool("wall"));
|
|
@@ -62863,15 +62860,15 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62863
62860
|
each(div_19, 21, () => roomPresets, index$1, ($$anchor, preset) => {
|
|
62864
62861
|
var button_20 = root_10$3();
|
|
62865
62862
|
var div_20 = child(button_20);
|
|
62866
|
-
var
|
|
62863
|
+
var text_10 = child(div_20, true);
|
|
62867
62864
|
reset(div_20);
|
|
62868
62865
|
var span_5 = sibling(div_20, 2);
|
|
62869
|
-
var
|
|
62866
|
+
var text_11 = child(span_5, true);
|
|
62870
62867
|
reset(span_5);
|
|
62871
62868
|
reset(button_20);
|
|
62872
62869
|
template_effect(() => {
|
|
62873
|
-
set_text(
|
|
62874
|
-
set_text(
|
|
62870
|
+
set_text(text_10, get(preset).icon);
|
|
62871
|
+
set_text(text_11, get(preset).name);
|
|
62875
62872
|
});
|
|
62876
62873
|
delegated("click", button_20, () => onPresetClick(get(preset).id));
|
|
62877
62874
|
event("dragstart", button_20, (e) => {
|
|
@@ -62919,16 +62916,16 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62919
62916
|
});
|
|
62920
62917
|
reset(div_22);
|
|
62921
62918
|
var span_6 = sibling(div_22, 2);
|
|
62922
|
-
var
|
|
62919
|
+
var text_19 = child(span_6, true);
|
|
62923
62920
|
reset(span_6);
|
|
62924
62921
|
var span_7 = sibling(span_6, 2);
|
|
62925
|
-
var
|
|
62922
|
+
var text_20 = child(span_7);
|
|
62926
62923
|
reset(span_7);
|
|
62927
62924
|
reset(button_21);
|
|
62928
62925
|
template_effect(() => {
|
|
62929
62926
|
var _$$get$furniture$leng;
|
|
62930
|
-
set_text(
|
|
62931
|
-
set_text(
|
|
62927
|
+
set_text(text_19, get(tmpl).name);
|
|
62928
|
+
set_text(text_20, `${(_$$get$furniture$leng = get(tmpl).furniture.length) !== null && _$$get$furniture$leng !== void 0 ? _$$get$furniture$leng : ""} items`);
|
|
62932
62929
|
});
|
|
62933
62930
|
delegated("click", button_21, () => onPresetClick(get(tmpl).presetId, get(tmpl).name));
|
|
62934
62931
|
event("dragstart", button_21, (e) => {
|
|
@@ -62960,11 +62957,11 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62960
62957
|
var node_5 = sibling(div_24, 2);
|
|
62961
62958
|
var consequent_13 = ($$anchor) => {
|
|
62962
62959
|
var div_25 = root_21$2();
|
|
62963
|
-
var
|
|
62960
|
+
var text_21 = child(div_25);
|
|
62964
62961
|
reset(div_25);
|
|
62965
62962
|
template_effect(() => {
|
|
62966
62963
|
var _$$get$length, _$$get;
|
|
62967
|
-
return set_text(
|
|
62964
|
+
return set_text(text_21, `${(_$$get$length = get(filtered).length) !== null && _$$get$length !== void 0 ? _$$get$length : ""} result${get(filtered).length !== 1 ? "s" : ""} for "${(_$$get = get(search)) !== null && _$$get !== void 0 ? _$$get : ""}"`);
|
|
62968
62965
|
});
|
|
62969
62966
|
append($$anchor, div_25);
|
|
62970
62967
|
};
|
|
@@ -62974,17 +62971,17 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62974
62971
|
var div_26 = sibling(node_5, 2);
|
|
62975
62972
|
var button_23 = child(div_26);
|
|
62976
62973
|
var button_24 = sibling(button_23, 2);
|
|
62977
|
-
var
|
|
62974
|
+
var text_22 = child(button_24);
|
|
62978
62975
|
reset(button_24);
|
|
62979
62976
|
each(sibling(button_24, 2), 17, () => furnitureCategories, index$1, ($$anchor, cat) => {
|
|
62980
62977
|
var button_25 = root_22$2();
|
|
62981
|
-
var
|
|
62978
|
+
var text_23 = child(button_25, true);
|
|
62982
62979
|
reset(button_25);
|
|
62983
62980
|
template_effect(() => {
|
|
62984
62981
|
var _categoryColors$$$get;
|
|
62985
62982
|
set_class(button_25, 1, `px-2 py-0.5 rounded-full text-[10px] font-medium ${get(selectedCategory) === get(cat) ? "text-white" : "text-gray-600 hover:bg-gray-200"}`);
|
|
62986
62983
|
set_style(button_25, get(selectedCategory) === get(cat) ? `background-color: ${(_categoryColors$$$get = categoryColors[get(cat)]) !== null && _categoryColors$$$get !== void 0 ? _categoryColors$$$get : "#6b7280"}` : "background-color: #f3f4f6");
|
|
62987
|
-
set_text(
|
|
62984
|
+
set_text(text_23, get(cat));
|
|
62988
62985
|
});
|
|
62989
62986
|
delegated("click", button_25, () => set(selectedCategory, get(cat), true));
|
|
62990
62987
|
append($$anchor, button_25);
|
|
@@ -62992,19 +62989,19 @@ function BuildPanel($$anchor, $$props) {
|
|
|
62992
62989
|
reset(div_26);
|
|
62993
62990
|
var node_7 = sibling(div_26, 2);
|
|
62994
62991
|
var consequent_14 = ($$anchor) => {
|
|
62995
|
-
var
|
|
62996
|
-
var div_27 = first_child(
|
|
62992
|
+
var fragment_2 = root_23$1();
|
|
62993
|
+
var div_27 = first_child(fragment_2);
|
|
62997
62994
|
var div_28 = sibling(child(div_27), 2);
|
|
62998
62995
|
each(div_28, 21, () => get(recentItems), index$1, ($$anchor, item) => {
|
|
62999
62996
|
var button_26 = root_24$2();
|
|
63000
62997
|
var span_8 = child(button_26);
|
|
63001
|
-
var
|
|
62998
|
+
var text_24 = child(span_8, true);
|
|
63002
62999
|
reset(span_8);
|
|
63003
63000
|
var div_29 = sibling(span_8, 2);
|
|
63004
63001
|
var div_30 = child(div_29);
|
|
63005
63002
|
reset(div_29);
|
|
63006
63003
|
var span_9 = sibling(div_29, 2);
|
|
63007
|
-
var
|
|
63004
|
+
var text_25 = child(span_9, true);
|
|
63008
63005
|
reset(span_9);
|
|
63009
63006
|
reset(button_26);
|
|
63010
63007
|
template_effect(($0, $1, $2) => {
|
|
@@ -63012,10 +63009,10 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63012
63009
|
set_class(button_26, 1, `relative flex flex-col items-center gap-1 p-2.5 rounded-lg border-2 transition-colors cursor-grab active:cursor-grabbing ${get(currentPlacing) === get(item).id ? "border-blue-400 bg-blue-50 ring-1 ring-blue-300" : "border-gray-100 hover:border-blue-300 hover:bg-blue-50"}`);
|
|
63013
63010
|
set_class(span_8, 1, `absolute top-1 right-1 text-[12px] leading-none cursor-pointer ${$0 !== null && $0 !== void 0 ? $0 : ""}`);
|
|
63014
63011
|
set_attribute(span_8, "title", $1);
|
|
63015
|
-
set_text(
|
|
63012
|
+
set_text(text_24, $2);
|
|
63016
63013
|
set_style(div_29, `background-color: ${(_$$get$color = get(item).color) !== null && _$$get$color !== void 0 ? _$$get$color : ""}20`);
|
|
63017
63014
|
set_style(div_30, `background-color: ${(_$$get$color2 = get(item).color) !== null && _$$get$color2 !== void 0 ? _$$get$color2 : ""}; opacity: 0.7`);
|
|
63018
|
-
set_text(
|
|
63015
|
+
set_text(text_25, get(item).name);
|
|
63019
63016
|
}, [
|
|
63020
63017
|
() => get(favoriteIds).includes(get(item).id) ? "text-pink-500" : "text-gray-300 hover:text-pink-400",
|
|
63021
63018
|
() => get(favoriteIds).includes(get(item).id) ? "Remove from favorites" : "Add to favorites",
|
|
@@ -63046,7 +63043,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63046
63043
|
reset(div_28);
|
|
63047
63044
|
reset(div_27);
|
|
63048
63045
|
next(2);
|
|
63049
|
-
append($$anchor,
|
|
63046
|
+
append($$anchor, fragment_2);
|
|
63050
63047
|
};
|
|
63051
63048
|
if_block(node_7, ($$render) => {
|
|
63052
63049
|
if (!get(search) && get(selectedCategory) === "All" && get(recentItems).length > 0) $$render(consequent_14);
|
|
@@ -63056,7 +63053,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63056
63053
|
const s = /* @__PURE__ */ user_derived(() => get(search).toLowerCase());
|
|
63057
63054
|
var button_27 = root_25$1();
|
|
63058
63055
|
var span_10 = child(button_27);
|
|
63059
|
-
var
|
|
63056
|
+
var text_26 = child(span_10, true);
|
|
63060
63057
|
reset(span_10);
|
|
63061
63058
|
var div_32 = sibling(span_10, 2);
|
|
63062
63059
|
var div_33 = child(div_32);
|
|
@@ -63065,16 +63062,16 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63065
63062
|
var consequent_15 = ($$anchor) => {
|
|
63066
63063
|
const idx = /* @__PURE__ */ user_derived(() => get(item).name.toLowerCase().indexOf(get(s)));
|
|
63067
63064
|
var span_11 = root_26$1();
|
|
63068
|
-
var
|
|
63069
|
-
var mark = sibling(
|
|
63070
|
-
var
|
|
63065
|
+
var text_27 = child(span_11, true);
|
|
63066
|
+
var mark = sibling(text_27);
|
|
63067
|
+
var text_28 = child(mark, true);
|
|
63071
63068
|
reset(mark);
|
|
63072
|
-
var
|
|
63069
|
+
var text_29 = sibling(mark, 1, true);
|
|
63073
63070
|
reset(span_11);
|
|
63074
63071
|
template_effect(($0, $1, $2) => {
|
|
63075
|
-
set_text(
|
|
63076
|
-
set_text(
|
|
63077
|
-
set_text(
|
|
63072
|
+
set_text(text_27, $0);
|
|
63073
|
+
set_text(text_28, $1);
|
|
63074
|
+
set_text(text_29, $2);
|
|
63078
63075
|
}, [
|
|
63079
63076
|
() => get(item).name.slice(0, get(idx)),
|
|
63080
63077
|
() => get(item).name.slice(get(idx), get(idx) + get(s).length),
|
|
@@ -63085,9 +63082,9 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63085
63082
|
var d = /* @__PURE__ */ user_derived(() => get(s) && get(item).name.toLowerCase().includes(get(s)));
|
|
63086
63083
|
var alternate_2 = ($$anchor) => {
|
|
63087
63084
|
var span_12 = root_27$1();
|
|
63088
|
-
var
|
|
63085
|
+
var text_30 = child(span_12, true);
|
|
63089
63086
|
reset(span_12);
|
|
63090
|
-
template_effect(() => set_text(
|
|
63087
|
+
template_effect(() => set_text(text_30, get(item).name));
|
|
63091
63088
|
append($$anchor, span_12);
|
|
63092
63089
|
};
|
|
63093
63090
|
if_block(node_8, ($$render) => {
|
|
@@ -63095,7 +63092,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63095
63092
|
else $$render(alternate_2, -1);
|
|
63096
63093
|
});
|
|
63097
63094
|
var span_13 = sibling(node_8, 2);
|
|
63098
|
-
var
|
|
63095
|
+
var text_31 = child(span_13);
|
|
63099
63096
|
reset(span_13);
|
|
63100
63097
|
reset(button_27);
|
|
63101
63098
|
template_effect(($0, $1, $2) => {
|
|
@@ -63103,10 +63100,10 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63103
63100
|
set_class(button_27, 1, `relative flex flex-col items-center gap-1 p-3 rounded-lg border-2 transition-colors cursor-grab active:cursor-grabbing ${get(currentPlacing) === get(item).id ? "border-blue-400 bg-blue-50 ring-1 ring-blue-300" : "border-gray-100 hover:border-blue-300 hover:bg-blue-50"}`);
|
|
63104
63101
|
set_class(span_10, 1, `absolute top-1 right-1 text-[12px] leading-none cursor-pointer ${$0 !== null && $0 !== void 0 ? $0 : ""}`);
|
|
63105
63102
|
set_attribute(span_10, "title", $1);
|
|
63106
|
-
set_text(
|
|
63103
|
+
set_text(text_26, $2);
|
|
63107
63104
|
set_style(div_32, `background-color: ${(_$$get$color3 = get(item).color) !== null && _$$get$color3 !== void 0 ? _$$get$color3 : ""}20`);
|
|
63108
63105
|
set_style(div_33, `background-color: ${(_$$get$color4 = get(item).color) !== null && _$$get$color4 !== void 0 ? _$$get$color4 : ""}; opacity: 0.7`);
|
|
63109
|
-
set_text(
|
|
63106
|
+
set_text(text_31, `${(_$$get$width = get(item).width) !== null && _$$get$width !== void 0 ? _$$get$width : ""}×${(_$$get$depth = get(item).depth) !== null && _$$get$depth !== void 0 ? _$$get$depth : ""}cm`);
|
|
63110
63107
|
}, [
|
|
63111
63108
|
() => get(favoriteIds).includes(get(item).id) ? "text-pink-500" : "text-gray-300 hover:text-pink-400",
|
|
63112
63109
|
() => get(favoriteIds).includes(get(item).id) ? "Remove from favorites" : "Add to favorites",
|
|
@@ -63139,7 +63136,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63139
63136
|
template_effect(() => {
|
|
63140
63137
|
set_class(button_23, 1, `px-2 py-0.5 rounded-full text-[10px] font-medium ${get(selectedCategory) === "All" ? "bg-blue-600 text-white" : "bg-gray-100 text-gray-600 hover:bg-gray-200"}`);
|
|
63141
63138
|
set_class(button_24, 1, `px-2 py-0.5 rounded-full text-[10px] font-medium ${get(selectedCategory) === "Favorites" ? "bg-pink-500 text-white" : "bg-gray-100 text-gray-600 hover:bg-gray-200"}`);
|
|
63142
|
-
set_text(
|
|
63139
|
+
set_text(text_22, `♥ Favorites${get(favoriteIds).length ? ` (${get(favoriteIds).length})` : ""}`);
|
|
63143
63140
|
});
|
|
63144
63141
|
bind_value(input_1, () => get(search), ($$value) => set(search, $$value));
|
|
63145
63142
|
delegated("click", button_23, () => set(selectedCategory, "All"));
|
|
@@ -63171,14 +63168,14 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63171
63168
|
var div_39 = sibling(div_36, 2);
|
|
63172
63169
|
var div_40 = child(div_39);
|
|
63173
63170
|
var span_14 = child(div_40);
|
|
63174
|
-
var
|
|
63171
|
+
var text_32 = child(span_14, true);
|
|
63175
63172
|
reset(span_14);
|
|
63176
63173
|
var span_15 = sibling(span_14, 2);
|
|
63177
|
-
var
|
|
63174
|
+
var text_33 = child(span_15, true);
|
|
63178
63175
|
reset(span_15);
|
|
63179
63176
|
reset(div_40);
|
|
63180
63177
|
var div_41 = sibling(div_40, 2);
|
|
63181
|
-
var
|
|
63178
|
+
var text_34 = child(div_41);
|
|
63182
63179
|
reset(div_41);
|
|
63183
63180
|
reset(div_39);
|
|
63184
63181
|
reset(div_35);
|
|
@@ -63188,10 +63185,10 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63188
63185
|
set_style(div_34, `left: ${(_$$get$x = get(hoverPos).x) !== null && _$$get$x !== void 0 ? _$$get$x : ""}px; top: ${(_$$get$y = get(hoverPos).y) !== null && _$$get$y !== void 0 ? _$$get$y : ""}px;`);
|
|
63189
63186
|
set_style(div_37, `background-color: ${(_$$get$color5 = get(item).color) !== null && _$$get$color5 !== void 0 ? _$$get$color5 : ""}20`);
|
|
63190
63187
|
set_style(div_38, `background-color: ${(_$$get$color6 = get(item).color) !== null && _$$get$color6 !== void 0 ? _$$get$color6 : ""}; opacity: 0.7`);
|
|
63191
|
-
set_text(
|
|
63188
|
+
set_text(text_32, get(item).name);
|
|
63192
63189
|
set_style(span_15, `background-color: ${(_ref = (_categoryColors$$$get2 = categoryColors[get(item).category]) !== null && _categoryColors$$$get2 !== void 0 ? _categoryColors$$$get2 : "#6b7280") !== null && _ref !== void 0 ? _ref : ""}`);
|
|
63193
|
-
set_text(
|
|
63194
|
-
set_text(
|
|
63190
|
+
set_text(text_33, get(item).category);
|
|
63191
|
+
set_text(text_34, `${(_$$get$width2 = get(item).width) !== null && _$$get$width2 !== void 0 ? _$$get$width2 : ""} × ${(_$$get$depth2 = get(item).depth) !== null && _$$get$depth2 !== void 0 ? _$$get$depth2 : ""} × ${(_$$get$height = get(item).height) !== null && _$$get$height !== void 0 ? _$$get$height : ""} cm`);
|
|
63195
63192
|
});
|
|
63196
63193
|
append($$anchor, div_34);
|
|
63197
63194
|
};
|
|
@@ -63203,7 +63200,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63203
63200
|
var div_42 = root_29$1();
|
|
63204
63201
|
var div_43 = child(div_42);
|
|
63205
63202
|
var p_2 = sibling(child(div_43), 2);
|
|
63206
|
-
var
|
|
63203
|
+
var text_35 = child(p_2, true);
|
|
63207
63204
|
reset(p_2);
|
|
63208
63205
|
var div_44 = sibling(p_2, 2);
|
|
63209
63206
|
var label = child(div_44);
|
|
@@ -63217,7 +63214,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63217
63214
|
var div_45 = sibling(input_3, 2);
|
|
63218
63215
|
var div_46 = child(div_45);
|
|
63219
63216
|
var span_16 = sibling(child(div_46));
|
|
63220
|
-
var
|
|
63217
|
+
var text_36 = child(span_16, true);
|
|
63221
63218
|
reset(span_16);
|
|
63222
63219
|
reset(div_46);
|
|
63223
63220
|
next(2);
|
|
@@ -63235,8 +63232,8 @@ function BuildPanel($$anchor, $$props) {
|
|
|
63235
63232
|
reset(div_43);
|
|
63236
63233
|
reset(div_42);
|
|
63237
63234
|
template_effect(() => {
|
|
63238
|
-
set_text(
|
|
63239
|
-
set_text(
|
|
63235
|
+
set_text(text_35, get(importFileName));
|
|
63236
|
+
set_text(text_36, "v5");
|
|
63240
63237
|
});
|
|
63241
63238
|
delegated("click", div_42, cancelImport);
|
|
63242
63239
|
delegated("click", div_43, (e) => e.stopPropagation());
|
|
@@ -63659,15 +63656,15 @@ init_client();
|
|
|
63659
63656
|
init_index_client();
|
|
63660
63657
|
var root_3$7 = /* @__PURE__ */ from_html(`<button type="button" class="text-[10px] px-1.5 py-0.5 rounded border border-blue-300 text-blue-700 bg-blue-50 hover:bg-blue-100"> </button>`);
|
|
63661
63658
|
var root_2$8 = /* @__PURE__ */ from_html(`<div class="flex items-center justify-between gap-2"><span class="text-xs font-medium text-gray-600">Camera FOV (image)</span> <!></div>`);
|
|
63662
|
-
var root_6$3 = /* @__PURE__ */ from_html(`Click vertices · nhấn <strong>✓</strong> `, 1);
|
|
63663
63659
|
var root_7$4 = /* @__PURE__ */ from_html(` <!>`, 1);
|
|
63664
63660
|
var root_10$2 = /* @__PURE__ */ from_html(`<p class="text-[10px] text-amber-700 bg-amber-50 border border-amber-200 rounded px-1.5 py-1"> </p>`);
|
|
63665
63661
|
var root_5$4 = /* @__PURE__ */ from_html(`<p class="text-[10px] text-gray-500 leading-snug"><!></p> <!>`, 1);
|
|
63666
|
-
var root_1$7 = /* @__PURE__ */ from_html(`<div class="border border-gray-200 rounded-lg p-2 bg-gray-50 space-y-2"><!> <div class="relative
|
|
63662
|
+
var root_1$7 = /* @__PURE__ */ from_html(`<div class="border border-gray-200 rounded-lg p-2 bg-gray-50 space-y-2"><!> <div class="relative w-full"><canvas style="height: auto;"></canvas> <!></div> <!></div>`);
|
|
63667
63663
|
var root_11$2 = /* @__PURE__ */ from_html(`<p class="text-xs text-gray-400">No thumbnail URL from host.</p>`);
|
|
63668
63664
|
function CameraFovEditor($$anchor, $$props) {
|
|
63669
63665
|
push($$props, true);
|
|
63670
|
-
let coordinates = prop($$props, "coordinates", 3, ""), mapCoordinates = prop($$props, "mapCoordinates", 3, ""), readOnly = prop($$props, "readOnly", 3, false);
|
|
63666
|
+
let coordinates = prop($$props, "coordinates", 3, ""), mapCoordinates = prop($$props, "mapCoordinates", 3, ""), readOnly = prop($$props, "readOnly", 3, false), strokeColor = prop($$props, "strokeColor", 3, "#22c55e");
|
|
63667
|
+
/** Match floor FOV / zoneColor */
|
|
63671
63668
|
let canvasEl = /* @__PURE__ */ state(void 0);
|
|
63672
63669
|
let imgEl = /* @__PURE__ */ state(null);
|
|
63673
63670
|
let imgSize = /* @__PURE__ */ state(null);
|
|
@@ -63675,9 +63672,39 @@ function CameraFovEditor($$anchor, $$props) {
|
|
|
63675
63672
|
let cursor = /* @__PURE__ */ state(null);
|
|
63676
63673
|
let draggingIdx = /* @__PURE__ */ state(null);
|
|
63677
63674
|
let editing = /* @__PURE__ */ state(false);
|
|
63678
|
-
/**
|
|
63679
|
-
|
|
63680
|
-
|
|
63675
|
+
/** Track panel width so thumbnail scales when Properties is resized. */
|
|
63676
|
+
let wrapEl = /* @__PURE__ */ state(void 0);
|
|
63677
|
+
let displayW = /* @__PURE__ */ state(380);
|
|
63678
|
+
user_effect(() => {
|
|
63679
|
+
const el = get(wrapEl);
|
|
63680
|
+
if (!el || typeof ResizeObserver === "undefined") return;
|
|
63681
|
+
const ro = new ResizeObserver((entries) => {
|
|
63682
|
+
var _entries$0$contentRec, _entries$;
|
|
63683
|
+
const w = (_entries$0$contentRec = (_entries$ = entries[0]) === null || _entries$ === void 0 || (_entries$ = _entries$.contentRect) === null || _entries$ === void 0 ? void 0 : _entries$.width) !== null && _entries$0$contentRec !== void 0 ? _entries$0$contentRec : 0;
|
|
63684
|
+
const next = Math.max(160, Math.floor(w));
|
|
63685
|
+
if (next !== get(displayW)) set(displayW, next, true);
|
|
63686
|
+
});
|
|
63687
|
+
ro.observe(el);
|
|
63688
|
+
set(displayW, Math.max(160, Math.floor(el.clientWidth) || 380), true);
|
|
63689
|
+
return () => ro.disconnect();
|
|
63690
|
+
});
|
|
63691
|
+
let FOV_COLOR = /* @__PURE__ */ user_derived(() => {
|
|
63692
|
+
var _strokeColor;
|
|
63693
|
+
return ((_strokeColor = strokeColor()) === null || _strokeColor === void 0 ? void 0 : _strokeColor.trim()) || "#22c55e";
|
|
63694
|
+
});
|
|
63695
|
+
function hexToRgba(hex, alpha) {
|
|
63696
|
+
const c = hex.trim();
|
|
63697
|
+
const short = c.match(/^#([0-9a-f]{3})$/i);
|
|
63698
|
+
let h = c;
|
|
63699
|
+
if (short) {
|
|
63700
|
+
const s = short[1];
|
|
63701
|
+
h = `#${s[0]}${s[0]}${s[1]}${s[1]}${s[2]}${s[2]}`;
|
|
63702
|
+
}
|
|
63703
|
+
const m = h.match(/^#([0-9a-f]{6})$/i);
|
|
63704
|
+
if (!m) return `rgba(34,197,94,${alpha})`;
|
|
63705
|
+
const n = parseInt(m[1], 16);
|
|
63706
|
+
return `rgba(${n >> 16 & 255},${n >> 8 & 255},${n & 255},${alpha})`;
|
|
63707
|
+
}
|
|
63681
63708
|
let matchOk = /* @__PURE__ */ user_derived(() => fovPointCountsMatch(coordinates(), mapCoordinates()));
|
|
63682
63709
|
let mapN = /* @__PURE__ */ user_derived(() => countCoordinatePoints(mapCoordinates()));
|
|
63683
63710
|
let imgN = /* @__PURE__ */ user_derived(() => countCoordinatePoints(coordinates()));
|
|
@@ -63732,6 +63759,7 @@ function CameraFovEditor($$anchor, $$props) {
|
|
|
63732
63759
|
const size = get(imgSize);
|
|
63733
63760
|
const el = get(canvasEl);
|
|
63734
63761
|
const isEditing = get(editing);
|
|
63762
|
+
get(FOV_COLOR);
|
|
63735
63763
|
if (!size || !el) return;
|
|
63736
63764
|
untrack(() => {
|
|
63737
63765
|
if (!isEditing) {
|
|
@@ -63743,7 +63771,7 @@ function CameraFovEditor($$anchor, $$props) {
|
|
|
63743
63771
|
});
|
|
63744
63772
|
function scale() {
|
|
63745
63773
|
if (!get(imgSize)) return 1;
|
|
63746
|
-
return displayW / get(imgSize).w;
|
|
63774
|
+
return get(displayW) / get(imgSize).w;
|
|
63747
63775
|
}
|
|
63748
63776
|
function canvasH() {
|
|
63749
63777
|
if (!get(imgSize)) return 135;
|
|
@@ -63761,7 +63789,7 @@ function CameraFovEditor($$anchor, $$props) {
|
|
|
63761
63789
|
function redraw() {
|
|
63762
63790
|
if (!get(canvasEl) || !get(imgEl) || !get(imgSize)) return;
|
|
63763
63791
|
const s = scale();
|
|
63764
|
-
const w = displayW;
|
|
63792
|
+
const w = get(displayW);
|
|
63765
63793
|
const h = canvasH();
|
|
63766
63794
|
if (get(canvasEl).width !== w || get(canvasEl).height !== h) {
|
|
63767
63795
|
get(canvasEl).width = w;
|
|
@@ -63772,36 +63800,37 @@ function CameraFovEditor($$anchor, $$props) {
|
|
|
63772
63800
|
ctx.clearRect(0, 0, w, h);
|
|
63773
63801
|
ctx.drawImage(get(imgEl), 0, 0, w, h);
|
|
63774
63802
|
const placed = get(draft);
|
|
63775
|
-
const
|
|
63776
|
-
if (
|
|
63777
|
-
if (pts.length >= 1) {
|
|
63803
|
+
const color = get(FOV_COLOR);
|
|
63804
|
+
if (placed.length >= 1) {
|
|
63778
63805
|
ctx.save();
|
|
63779
|
-
ctx.strokeStyle =
|
|
63780
|
-
ctx.fillStyle =
|
|
63781
|
-
ctx.lineWidth = 2;
|
|
63806
|
+
ctx.strokeStyle = color;
|
|
63807
|
+
ctx.fillStyle = hexToRgba(color, .28);
|
|
63808
|
+
ctx.lineWidth = 2.5;
|
|
63782
63809
|
ctx.lineJoin = "round";
|
|
63783
|
-
|
|
63810
|
+
ctx.lineCap = "round";
|
|
63811
|
+
if (placed.length >= 2) {
|
|
63812
|
+
ctx.setLineDash([]);
|
|
63784
63813
|
ctx.beginPath();
|
|
63785
|
-
ctx.moveTo(
|
|
63786
|
-
for (let i = 1; i <
|
|
63814
|
+
ctx.moveTo(placed[0].x * s, placed[0].y * s);
|
|
63815
|
+
for (let i = 1; i < placed.length; i++) ctx.lineTo(placed[i].x * s, placed[i].y * s);
|
|
63787
63816
|
if (!get(editing) && placed.length >= 3) {
|
|
63788
63817
|
ctx.closePath();
|
|
63789
63818
|
ctx.fill();
|
|
63790
|
-
}
|
|
63819
|
+
}
|
|
63791
63820
|
ctx.stroke();
|
|
63792
|
-
ctx.setLineDash([]);
|
|
63793
63821
|
}
|
|
63794
|
-
if (get(editing) && get(cursor) && placed.length >=
|
|
63795
|
-
|
|
63796
|
-
ctx.setLineDash([
|
|
63822
|
+
if (get(editing) && get(cursor) && placed.length >= 1) {
|
|
63823
|
+
const last = placed[placed.length - 1];
|
|
63824
|
+
ctx.setLineDash([6, 4]);
|
|
63825
|
+
ctx.globalAlpha = .85;
|
|
63797
63826
|
ctx.beginPath();
|
|
63798
|
-
ctx.moveTo(
|
|
63799
|
-
ctx.lineTo(
|
|
63827
|
+
ctx.moveTo(last.x * s, last.y * s);
|
|
63828
|
+
ctx.lineTo(get(cursor).x * s, get(cursor).y * s);
|
|
63800
63829
|
ctx.stroke();
|
|
63801
63830
|
ctx.setLineDash([]);
|
|
63802
63831
|
ctx.globalAlpha = 1;
|
|
63803
63832
|
}
|
|
63804
|
-
for (let i = 0; i < placed.length; i++) drawVertexIndexBadge(ctx, placed[i].x * s, placed[i].y * s, i,
|
|
63833
|
+
for (let i = 0; i < placed.length; i++) drawVertexIndexBadge(ctx, placed[i].x * s, placed[i].y * s, i, color, 10);
|
|
63805
63834
|
ctx.restore();
|
|
63806
63835
|
}
|
|
63807
63836
|
}
|
|
@@ -63950,7 +63979,6 @@ function CameraFovEditor($$anchor, $$props) {
|
|
|
63950
63979
|
});
|
|
63951
63980
|
var div_2 = sibling(node_1, 2);
|
|
63952
63981
|
var canvas = child(div_2);
|
|
63953
|
-
set_style(canvas, "max-width: 380px; height: auto;");
|
|
63954
63982
|
bind_this(canvas, ($$value) => set(canvasEl, $$value), () => get(canvasEl));
|
|
63955
63983
|
var node_3 = sibling(canvas, 2);
|
|
63956
63984
|
var consequent_2 = ($$anchor) => {
|
|
@@ -63978,16 +64006,16 @@ function CameraFovEditor($$anchor, $$props) {
|
|
|
63978
64006
|
if (get(showFloatTb) && get(floatTbPos)) $$render(consequent_2);
|
|
63979
64007
|
});
|
|
63980
64008
|
reset(div_2);
|
|
64009
|
+
bind_this(div_2, ($$value) => set(wrapEl, $$value), () => get(wrapEl));
|
|
63981
64010
|
var node_4 = sibling(div_2, 2);
|
|
63982
64011
|
var consequent_7 = ($$anchor) => {
|
|
63983
64012
|
var fragment_2 = root_5$4();
|
|
63984
64013
|
var p_1 = first_child(fragment_2);
|
|
63985
64014
|
var node_5 = child(p_1);
|
|
63986
64015
|
var consequent_3 = ($$anchor) => {
|
|
63987
|
-
var
|
|
63988
|
-
|
|
63989
|
-
|
|
63990
|
-
append($$anchor, fragment_3);
|
|
64016
|
+
var text_1 = text$1();
|
|
64017
|
+
template_effect(() => set_text(text_1, `Click vertices · ✓ finish (≥3) · 🗑 delete`));
|
|
64018
|
+
append($$anchor, text_1);
|
|
63991
64019
|
};
|
|
63992
64020
|
var consequent_5 = ($$anchor) => {
|
|
63993
64021
|
var fragment_4 = root_7$4();
|
|
@@ -64006,7 +64034,7 @@ function CameraFovEditor($$anchor, $$props) {
|
|
|
64006
64034
|
});
|
|
64007
64035
|
template_effect(() => {
|
|
64008
64036
|
var _$$get2;
|
|
64009
|
-
return set_text(text_2, `${(_$$get2 = get(imgN)) !== null && _$$get2 !== void 0 ? _$$get2 : ""} points — click polygon
|
|
64037
|
+
return set_text(text_2, `${(_$$get2 = get(imgN)) !== null && _$$get2 !== void 0 ? _$$get2 : ""} points — click polygon for toolbar `);
|
|
64010
64038
|
});
|
|
64011
64039
|
append($$anchor, fragment_4);
|
|
64012
64040
|
};
|
|
@@ -64041,7 +64069,7 @@ function CameraFovEditor($$anchor, $$props) {
|
|
|
64041
64069
|
if (!readOnly()) $$render(consequent_7);
|
|
64042
64070
|
});
|
|
64043
64071
|
reset(div);
|
|
64044
|
-
template_effect(() => set_class(canvas, 1, `w-full rounded border border-gray-200 bg-black/5 touch-none ${readOnly() ? "cursor-default" : "cursor-crosshair"}`));
|
|
64072
|
+
template_effect(() => set_class(canvas, 1, `w-full rounded border border-gray-200 bg-black/5 touch-none ${readOnly() || !get(editing) ? "cursor-default" : "cursor-crosshair"}`));
|
|
64045
64073
|
delegated("mousedown", canvas, function(...$$args) {
|
|
64046
64074
|
var _ref;
|
|
64047
64075
|
(_ref = readOnly() ? void 0 : onDown) === null || _ref === void 0 || _ref.apply(this, $$args);
|
|
@@ -64100,8 +64128,8 @@ var root_9$1 = /* @__PURE__ */ from_html(`<h3 class="text-sm font-semibold text-
|
|
|
64100
64128
|
var root_13$1 = /* @__PURE__ */ from_html(`<option> </option>`);
|
|
64101
64129
|
var root_12$1 = /* @__PURE__ */ from_html(`<label class="block"><span class="text-xs text-gray-500">Camera</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm bg-white"><option>Select camera...</option><!></select></label>`);
|
|
64102
64130
|
var root_14$1 = /* @__PURE__ */ from_html(`<label class="block"><span class="text-xs text-gray-500"> </span> <input type="text"/></label>`);
|
|
64103
|
-
var root_15$1 = /* @__PURE__ */ from_html(`<p class="text-[10px] text-gray-400 mt-2 leading-snug">FOV
|
|
64104
|
-
FOV
|
|
64131
|
+
var root_15$1 = /* @__PURE__ */ from_html(`<p class="text-[10px] text-gray-400 mt-2 leading-snug">Floor FOV: <strong>Camera FOV</strong> tool → <code class="font-mono">mapCoordinates</code>.
|
|
64132
|
+
Image FOV: draw on thumbnail (vertices 0…n) · ✓ to finish.</p>`);
|
|
64105
64133
|
var root_16 = /* @__PURE__ */ from_html(`<div class="pt-1 space-y-1.5"><div class="text-xs font-semibold text-gray-700">Camera thumbnail</div> <!></div>`);
|
|
64106
64134
|
var root_17$1 = /* @__PURE__ */ from_html(`<p class="text-[10px] text-amber-700 bg-amber-50 border border-amber-100 rounded px-1.5 py-1">Host chưa gửi <code class="font-mono">cameraThumbnail</code> cho cam này.</p>`);
|
|
64107
64135
|
var root_11$1 = /* @__PURE__ */ from_html(`<!> <!> <!> <!>`, 1);
|
|
@@ -64121,7 +64149,7 @@ var root_31 = /* @__PURE__ */ from_html(`<button type="button"></button>`);
|
|
|
64121
64149
|
var root_29 = /* @__PURE__ */ from_html(`<div class="space-y-3"><h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 rounded flex items-center justify-center text-xs">⬡</span> Zone</h3> <label class="block"><span class="text-xs text-gray-500">Name</span> <input type="text" class="w-full px-2 py-1 border border-gray-200 rounded text-sm" title="From assignedCameras.zone when linked"/></label> <!> <div class="text-xs text-gray-500">Shape: <span class="text-gray-700 capitalize"> </span></div> <label class="block"><span class="text-xs text-gray-500">Color</span> <div class="flex flex-wrap gap-1.5 mt-1"><!> <input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/></div></label> <label class="block"><span class="text-xs text-gray-500">Fill opacity</span> <input type="range" min="0" max="0.4" step="0.02" class="w-full"/></label></div>`);
|
|
64122
64150
|
var root_32 = /* @__PURE__ */ from_html(`<div class="space-y-3"><h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-emerald-100 rounded flex items-center justify-center text-xs">🏷️</span> Text Annotation</h3> <label class="block"><span class="text-xs text-gray-500">Text</span> <input type="text" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500">Font Size</span> <input type="number" min="8" max="72" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500">Color</span> <div class="flex items-center gap-2"><input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/> <span class="text-xs text-gray-400"> </span></div></label> <label class="block"><span class="text-xs text-gray-500">Rotation (°)</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500">X</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500">Y</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label></div>`);
|
|
64123
64151
|
var root_33 = /* @__PURE__ */ from_html(`<div class="mt-4 pt-3 border-t border-gray-200"><h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-blue-100 rounded flex items-center justify-center text-xs">🖼️</span> Background Image</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Opacity</span> <input type="range" min="0.05" max="1" step="0.05" class="w-full"/></label> <label class="block"><span class="text-xs text-gray-500">Scale</span> <input type="range" min="0.1" max="5" step="0.05" class="w-full"/></label> <label class="block"><span class="text-xs text-gray-500">Rotation</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <div class="flex gap-2"><button> </button> <button class="flex-1 px-2 py-1.5 border rounded text-sm border-gray-200 hover:bg-gray-50">📏 Set Scale</button></div> <button class="w-full px-2 py-1.5 border border-red-300 rounded text-sm text-red-600 hover:bg-red-50">Remove Image</button></div></div>`);
|
|
64124
|
-
var root$3 = /* @__PURE__ */ from_html(`<div data-properties-panel=""
|
|
64152
|
+
var root$3 = /* @__PURE__ */ from_html(`<div data-properties-panel=""><div role="separator" aria-orientation="vertical" aria-label="Resize properties panel" tabindex="0" style="cursor: col-resize;" title="Drag to resize"><div></div></div> <!> <!></div>`);
|
|
64125
64153
|
function PropertiesPanel($$anchor, $$props) {
|
|
64126
64154
|
push($$props, true);
|
|
64127
64155
|
const $projectSettings = () => store_get(projectSettings, "$projectSettings", $$stores);
|
|
@@ -64159,54 +64187,118 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64159
64187
|
return get(settings).units === "imperial" ? "in" : "cm";
|
|
64160
64188
|
}
|
|
64161
64189
|
let is3D = prop($$props, "is3D", 3, false), siteCameras = prop($$props, "siteCameras", 19, () => []), cameraThumbnail = prop($$props, "cameraThumbnail", 3, "");
|
|
64190
|
+
const PANEL_MIN_W = 420;
|
|
64191
|
+
const PANEL_WIDTH_KEY = "floor-editor-properties-width";
|
|
64192
|
+
let panelEl = /* @__PURE__ */ state(void 0);
|
|
64193
|
+
let panelWidth = /* @__PURE__ */ state(PANEL_MIN_W);
|
|
64194
|
+
let resizing = /* @__PURE__ */ state(false);
|
|
64162
64195
|
let wallSideTab = /* @__PURE__ */ state("interior");
|
|
64196
|
+
function clampPanelWidth(w) {
|
|
64197
|
+
var _$$get;
|
|
64198
|
+
const parentW = ((_$$get = get(panelEl)) === null || _$$get === void 0 || (_$$get = _$$get.parentElement) === null || _$$get === void 0 ? void 0 : _$$get.clientWidth) || (typeof window !== "undefined" ? window.innerWidth : PANEL_MIN_W * 2);
|
|
64199
|
+
const maxW = Math.max(PANEL_MIN_W, Math.floor(parentW * .5));
|
|
64200
|
+
return Math.min(maxW, Math.max(PANEL_MIN_W, Math.round(w)));
|
|
64201
|
+
}
|
|
64202
|
+
function loadSavedWidth() {
|
|
64203
|
+
try {
|
|
64204
|
+
const raw = localStorage.getItem(PANEL_WIDTH_KEY);
|
|
64205
|
+
const n = raw ? Number(raw) : NaN;
|
|
64206
|
+
if (Number.isFinite(n)) set(panelWidth, clampPanelWidth(n), true);
|
|
64207
|
+
} catch (_unused) {}
|
|
64208
|
+
}
|
|
64209
|
+
function persistWidth(w) {
|
|
64210
|
+
try {
|
|
64211
|
+
localStorage.setItem(PANEL_WIDTH_KEY, String(w));
|
|
64212
|
+
} catch (_unused2) {}
|
|
64213
|
+
}
|
|
64214
|
+
user_effect(() => {
|
|
64215
|
+
loadSavedWidth();
|
|
64216
|
+
});
|
|
64217
|
+
function onResizePointerDown(e) {
|
|
64218
|
+
if (e.button !== 0) return;
|
|
64219
|
+
e.preventDefault();
|
|
64220
|
+
e.stopPropagation();
|
|
64221
|
+
const handle = e.currentTarget;
|
|
64222
|
+
handle.setPointerCapture(e.pointerId);
|
|
64223
|
+
set(resizing, true);
|
|
64224
|
+
document.body.style.cursor = "col-resize";
|
|
64225
|
+
document.body.style.userSelect = "none";
|
|
64226
|
+
let raf = 0;
|
|
64227
|
+
let latestX = e.clientX;
|
|
64228
|
+
const apply = () => {
|
|
64229
|
+
raf = 0;
|
|
64230
|
+
if (!get(panelEl)) return;
|
|
64231
|
+
const right = get(panelEl).getBoundingClientRect().right;
|
|
64232
|
+
set(panelWidth, clampPanelWidth(right - latestX), true);
|
|
64233
|
+
};
|
|
64234
|
+
const onMove = (ev) => {
|
|
64235
|
+
latestX = ev.clientX;
|
|
64236
|
+
if (raf) return;
|
|
64237
|
+
raf = requestAnimationFrame(apply);
|
|
64238
|
+
};
|
|
64239
|
+
const onUp = (ev) => {
|
|
64240
|
+
handle.releasePointerCapture(ev.pointerId);
|
|
64241
|
+
handle.removeEventListener("pointermove", onMove);
|
|
64242
|
+
handle.removeEventListener("pointerup", onUp);
|
|
64243
|
+
handle.removeEventListener("pointercancel", onUp);
|
|
64244
|
+
if (raf) cancelAnimationFrame(raf);
|
|
64245
|
+
apply();
|
|
64246
|
+
set(resizing, false);
|
|
64247
|
+
document.body.style.cursor = "";
|
|
64248
|
+
document.body.style.userSelect = "";
|
|
64249
|
+
persistWidth(get(panelWidth));
|
|
64250
|
+
};
|
|
64251
|
+
handle.addEventListener("pointermove", onMove);
|
|
64252
|
+
handle.addEventListener("pointerup", onUp);
|
|
64253
|
+
handle.addEventListener("pointercancel", onUp);
|
|
64254
|
+
}
|
|
64163
64255
|
let selectedWall = /* @__PURE__ */ user_derived(() => {
|
|
64164
|
-
var _$$get$walls$find, _$$
|
|
64165
|
-
return (_$$get$walls$find = (_$$
|
|
64256
|
+
var _$$get$walls$find, _$$get2;
|
|
64257
|
+
return (_$$get$walls$find = (_$$get2 = get(floor)) === null || _$$get2 === void 0 || (_$$get2 = _$$get2.walls) === null || _$$get2 === void 0 ? void 0 : _$$get2.find((w) => w.id === get(selId))) !== null && _$$get$walls$find !== void 0 ? _$$get$walls$find : null;
|
|
64166
64258
|
});
|
|
64167
64259
|
let selectedDoor = /* @__PURE__ */ user_derived(() => {
|
|
64168
|
-
var _$$get$doors$find, _$$
|
|
64169
|
-
return (_$$get$doors$find = (_$$
|
|
64260
|
+
var _$$get$doors$find, _$$get3;
|
|
64261
|
+
return (_$$get$doors$find = (_$$get3 = get(floor)) === null || _$$get3 === void 0 || (_$$get3 = _$$get3.doors) === null || _$$get3 === void 0 ? void 0 : _$$get3.find((d) => d.id === get(selId))) !== null && _$$get$doors$find !== void 0 ? _$$get$doors$find : null;
|
|
64170
64262
|
});
|
|
64171
64263
|
let selectedWindow = /* @__PURE__ */ user_derived(() => {
|
|
64172
|
-
var _$$get$windows$find, _$$
|
|
64173
|
-
return (_$$get$windows$find = (_$$
|
|
64264
|
+
var _$$get$windows$find, _$$get4;
|
|
64265
|
+
return (_$$get$windows$find = (_$$get4 = get(floor)) === null || _$$get4 === void 0 || (_$$get4 = _$$get4.windows) === null || _$$get4 === void 0 ? void 0 : _$$get4.find((w) => w.id === get(selId))) !== null && _$$get$windows$find !== void 0 ? _$$get$windows$find : null;
|
|
64174
64266
|
});
|
|
64175
64267
|
let selectedFurniture = /* @__PURE__ */ user_derived(() => {
|
|
64176
|
-
var _$$get$furniture$find, _$$
|
|
64177
|
-
return (_$$get$furniture$find = (_$$
|
|
64268
|
+
var _$$get$furniture$find, _$$get5;
|
|
64269
|
+
return (_$$get$furniture$find = (_$$get5 = get(floor)) === null || _$$get5 === void 0 || (_$$get5 = _$$get5.furniture) === null || _$$get5 === void 0 ? void 0 : _$$get5.find((f) => f.id === get(selId))) !== null && _$$get$furniture$find !== void 0 ? _$$get$furniture$find : null;
|
|
64178
64270
|
});
|
|
64179
64271
|
let selectedStair = /* @__PURE__ */ user_derived(() => {
|
|
64180
|
-
var _$$get$stairs$find, _$$
|
|
64181
|
-
return (_$$get$stairs$find = (_$$
|
|
64272
|
+
var _$$get$stairs$find, _$$get6;
|
|
64273
|
+
return (_$$get$stairs$find = (_$$get6 = get(floor)) === null || _$$get6 === void 0 || (_$$get6 = _$$get6.stairs) === null || _$$get6 === void 0 ? void 0 : _$$get6.find((s) => s.id === get(selId))) !== null && _$$get$stairs$find !== void 0 ? _$$get$stairs$find : null;
|
|
64182
64274
|
});
|
|
64183
64275
|
let selectedColumn = /* @__PURE__ */ user_derived(() => {
|
|
64184
|
-
var _$$get$columns$find, _$$
|
|
64185
|
-
return (_$$get$columns$find = (_$$
|
|
64276
|
+
var _$$get$columns$find, _$$get7;
|
|
64277
|
+
return (_$$get$columns$find = (_$$get7 = get(floor)) === null || _$$get7 === void 0 || (_$$get7 = _$$get7.columns) === null || _$$get7 === void 0 ? void 0 : _$$get7.find((c) => c.id === get(selId))) !== null && _$$get$columns$find !== void 0 ? _$$get$columns$find : null;
|
|
64186
64278
|
});
|
|
64187
64279
|
let selectedTextAnnotation = /* @__PURE__ */ user_derived(() => {
|
|
64188
|
-
var _$$get$textAnnotation, _$$
|
|
64189
|
-
return (_$$get$textAnnotation = (_$$
|
|
64280
|
+
var _$$get$textAnnotation, _$$get8;
|
|
64281
|
+
return (_$$get$textAnnotation = (_$$get8 = get(floor)) === null || _$$get8 === void 0 || (_$$get8 = _$$get8.textAnnotations) === null || _$$get8 === void 0 ? void 0 : _$$get8.find((t) => t.id === get(selId))) !== null && _$$get$textAnnotation !== void 0 ? _$$get$textAnnotation : null;
|
|
64190
64282
|
});
|
|
64191
64283
|
let selectedZone = /* @__PURE__ */ user_derived(() => {
|
|
64192
|
-
var _$$get$zones$find, _$$
|
|
64193
|
-
return (_$$get$zones$find = (_$$
|
|
64284
|
+
var _$$get$zones$find, _$$get9;
|
|
64285
|
+
return (_$$get$zones$find = (_$$get9 = get(floor)) === null || _$$get9 === void 0 || (_$$get9 = _$$get9.zones) === null || _$$get9 === void 0 ? void 0 : _$$get9.find((z) => z.id === get(selId))) !== null && _$$get$zones$find !== void 0 ? _$$get$zones$find : null;
|
|
64194
64286
|
});
|
|
64195
64287
|
let hasBgImage = /* @__PURE__ */ user_derived(() => {
|
|
64196
|
-
var _$$
|
|
64197
|
-
return !!((_$$
|
|
64288
|
+
var _$$get10;
|
|
64289
|
+
return !!((_$$get10 = get(floor)) === null || _$$get10 === void 0 ? void 0 : _$$get10.backgroundImage);
|
|
64198
64290
|
});
|
|
64199
64291
|
let selectedRoom = /* @__PURE__ */ user_derived(() => {
|
|
64200
|
-
var _ref, _$$get$rooms$find, _$$
|
|
64201
|
-
return (_ref = (_$$get$rooms$find = (_$$
|
|
64292
|
+
var _ref, _$$get$rooms$find, _$$get11;
|
|
64293
|
+
return (_ref = (_$$get$rooms$find = (_$$get11 = get(floor)) === null || _$$get11 === void 0 || (_$$get11 = _$$get11.rooms) === null || _$$get11 === void 0 ? void 0 : _$$get11.find((r) => r.id === get(selRoomId))) !== null && _$$get$rooms$find !== void 0 ? _$$get$rooms$find : get(detectedRooms).find((r) => r.id === get(selRoomId))) !== null && _ref !== void 0 ? _ref : null;
|
|
64202
64294
|
});
|
|
64203
64295
|
let selectedDoorWall = /* @__PURE__ */ user_derived(() => {
|
|
64204
|
-
var _ref2, _$$
|
|
64205
|
-
return (_ref2 = get(selectedDoor) && ((_$$
|
|
64296
|
+
var _ref2, _$$get12;
|
|
64297
|
+
return (_ref2 = get(selectedDoor) && ((_$$get12 = get(floor)) === null || _$$get12 === void 0 || (_$$get12 = _$$get12.walls) === null || _$$get12 === void 0 ? void 0 : _$$get12.find((w) => w.id === get(selectedDoor).wallId))) !== null && _ref2 !== void 0 ? _ref2 : null;
|
|
64206
64298
|
});
|
|
64207
64299
|
let selectedWindowWall = /* @__PURE__ */ user_derived(() => {
|
|
64208
|
-
var _ref3, _$$
|
|
64209
|
-
return (_ref3 = get(selectedWindow) && ((_$$
|
|
64300
|
+
var _ref3, _$$get13;
|
|
64301
|
+
return (_ref3 = get(selectedWindow) && ((_$$get13 = get(floor)) === null || _$$get13 === void 0 || (_$$get13 = _$$get13.walls) === null || _$$get13 === void 0 ? void 0 : _$$get13.find((w) => w.id === get(selectedWindow).wallId))) !== null && _ref3 !== void 0 ? _ref3 : null;
|
|
64210
64302
|
});
|
|
64211
64303
|
function calcWallLength(wall) {
|
|
64212
64304
|
if (wall.curvePoint) {
|
|
@@ -64323,14 +64415,14 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64323
64415
|
});
|
|
64324
64416
|
/** Host-assigned camera fields are read-only; package fields (color/size/…) stay editable. */
|
|
64325
64417
|
const cameraPropsLocked = /* @__PURE__ */ user_derived(() => {
|
|
64326
|
-
var _$$
|
|
64327
|
-
return !!(((_$$
|
|
64418
|
+
var _$$get14;
|
|
64419
|
+
return !!(((_$$get14 = get(selectedFurniture)) === null || _$$get14 === void 0 ? void 0 : _$$get14.catalogId) === "camera" && get(selectedFurniture).props && Object.keys(get(selectedFurniture).props).length > 0);
|
|
64328
64420
|
});
|
|
64329
64421
|
const useSiteCameraSelect = /* @__PURE__ */ user_derived(() => siteCameras().length > 0);
|
|
64330
64422
|
const usedCameraSerials = /* @__PURE__ */ user_derived(() => {
|
|
64331
|
-
var _$$
|
|
64423
|
+
var _$$get15;
|
|
64332
64424
|
const used = /* @__PURE__ */ new Set();
|
|
64333
|
-
if (!((_$$
|
|
64425
|
+
if (!((_$$get15 = get(floor)) === null || _$$get15 === void 0 ? void 0 : _$$get15.furniture) || !get(selectedFurniture)) return used;
|
|
64334
64426
|
for (const item of get(floor).furniture) {
|
|
64335
64427
|
if (item.catalogId !== "camera" || item.id === get(selectedFurniture).id) continue;
|
|
64336
64428
|
if (item.serial) used.add(item.serial);
|
|
@@ -64640,16 +64732,21 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64640
64732
|
];
|
|
64641
64733
|
let hasSelection = /* @__PURE__ */ user_derived(() => !!get(selectedWall) || !!get(selectedDoor) || !!get(selectedWindow) || !!get(selectedFurniture) || !!get(selectedRoom) || !!get(selectedStair) || !!get(selectedColumn) || !!get(selectedTextAnnotation) || !!get(selectedZone) || !is3D() && get(hasBgImage));
|
|
64642
64734
|
let showCameraThumbnail = /* @__PURE__ */ user_derived(() => {
|
|
64643
|
-
var _$$
|
|
64644
|
-
return ((_$$
|
|
64735
|
+
var _$$get16, _cameraThumbnail;
|
|
64736
|
+
return ((_$$get16 = get(selectedFurniture)) === null || _$$get16 === void 0 ? void 0 : _$$get16.catalogId) === "camera" && !!((_cameraThumbnail = cameraThumbnail()) === null || _cameraThumbnail === void 0 ? void 0 : _cameraThumbnail.trim());
|
|
64645
64737
|
});
|
|
64646
64738
|
var div = root$3();
|
|
64647
64739
|
let classes;
|
|
64648
|
-
var
|
|
64740
|
+
var div_1 = child(div);
|
|
64741
|
+
set_attribute(div_1, "aria-valuemin", PANEL_MIN_W);
|
|
64742
|
+
let classes_1;
|
|
64743
|
+
var div_2 = child(div_1);
|
|
64744
|
+
reset(div_1);
|
|
64745
|
+
var node = sibling(div_1, 2);
|
|
64649
64746
|
var consequent_1 = ($$anchor) => {
|
|
64650
64747
|
var fragment = root_1$6();
|
|
64651
|
-
var
|
|
64652
|
-
var label = child(
|
|
64748
|
+
var div_3 = sibling(first_child(fragment), 2);
|
|
64749
|
+
var label = child(div_3);
|
|
64653
64750
|
var span = child(label);
|
|
64654
64751
|
var text = child(span);
|
|
64655
64752
|
reset(span);
|
|
@@ -64670,23 +64767,23 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64670
64767
|
var input_2 = sibling(span_2, 2);
|
|
64671
64768
|
remove_input_defaults(input_2);
|
|
64672
64769
|
reset(label_2);
|
|
64673
|
-
var
|
|
64674
|
-
var button = sibling(child(
|
|
64770
|
+
var div_4 = sibling(label_2, 2);
|
|
64771
|
+
var button = sibling(child(div_4), 2);
|
|
64675
64772
|
var text_3 = child(button, true);
|
|
64676
64773
|
reset(button);
|
|
64677
|
-
reset(div_2);
|
|
64678
|
-
var div_3 = sibling(div_2, 2);
|
|
64679
|
-
var div_4 = child(div_3);
|
|
64680
|
-
var button_1 = child(div_4);
|
|
64681
|
-
var button_2 = sibling(button_1, 2);
|
|
64682
64774
|
reset(div_4);
|
|
64683
|
-
var
|
|
64775
|
+
var div_5 = sibling(div_4, 2);
|
|
64776
|
+
var div_6 = child(div_5);
|
|
64777
|
+
var button_1 = child(div_6);
|
|
64778
|
+
var button_2 = sibling(button_1, 2);
|
|
64779
|
+
reset(div_6);
|
|
64780
|
+
var node_1 = sibling(div_6, 2);
|
|
64684
64781
|
var consequent = ($$anchor) => {
|
|
64685
64782
|
const sideColor = /* @__PURE__ */ user_derived(() => get(selectedWall).interiorColor || get(selectedWall).color);
|
|
64686
64783
|
const sideTex = /* @__PURE__ */ user_derived(() => get(selectedWall).interiorTexture === "none" ? void 0 : get(selectedWall).interiorTexture || get(selectedWall).texture);
|
|
64687
|
-
var
|
|
64688
|
-
var
|
|
64689
|
-
each(
|
|
64784
|
+
var div_7 = root_2$7();
|
|
64785
|
+
var div_8 = sibling(child(div_7), 2);
|
|
64786
|
+
each(div_8, 21, () => wallColors, index$1, ($$anchor, wc) => {
|
|
64690
64787
|
var button_3 = root_3$6();
|
|
64691
64788
|
template_effect(() => {
|
|
64692
64789
|
var _$$get$color;
|
|
@@ -64699,13 +64796,13 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64699
64796
|
});
|
|
64700
64797
|
append($$anchor, button_3);
|
|
64701
64798
|
});
|
|
64702
|
-
reset(
|
|
64703
|
-
var label_3 = sibling(
|
|
64799
|
+
reset(div_8);
|
|
64800
|
+
var label_3 = sibling(div_8, 2);
|
|
64704
64801
|
var input_3 = sibling(child(label_3), 2);
|
|
64705
64802
|
remove_input_defaults(input_3);
|
|
64706
64803
|
reset(label_3);
|
|
64707
|
-
var
|
|
64708
|
-
var button_4 = child(
|
|
64804
|
+
var div_9 = sibling(label_3, 4);
|
|
64805
|
+
var button_4 = child(div_9);
|
|
64709
64806
|
each(sibling(button_4, 2), 17, () => wallColors.filter((wc) => wc.texture), index$1, ($$anchor, wc) => {
|
|
64710
64807
|
const texPath = /* @__PURE__ */ user_derived(() => {
|
|
64711
64808
|
var _redBrick$exposedBr;
|
|
@@ -64736,8 +64833,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64736
64833
|
});
|
|
64737
64834
|
append($$anchor, button_5);
|
|
64738
64835
|
});
|
|
64836
|
+
reset(div_9);
|
|
64739
64837
|
reset(div_7);
|
|
64740
|
-
reset(div_5);
|
|
64741
64838
|
template_effect(() => {
|
|
64742
64839
|
set_value(input_3, get(sideColor));
|
|
64743
64840
|
set_class(button_4, 1, `p-1.5 rounded-md border-2 text-[10px] text-center h-14 ${!get(sideTex) ? "border-blue-500 ring-1 ring-blue-200" : "border-gray-200 hover:border-gray-300"}`);
|
|
@@ -64748,14 +64845,14 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64748
64845
|
delegated("click", button_4, () => {
|
|
64749
64846
|
if (get(selectedWall)) updateWall(get(selectedWall).id, { interiorTexture: "none" });
|
|
64750
64847
|
});
|
|
64751
|
-
append($$anchor,
|
|
64848
|
+
append($$anchor, div_7);
|
|
64752
64849
|
};
|
|
64753
64850
|
var alternate = ($$anchor) => {
|
|
64754
64851
|
const sideColor = /* @__PURE__ */ user_derived(() => get(selectedWall).exteriorColor || get(selectedWall).color);
|
|
64755
64852
|
const sideTex = /* @__PURE__ */ user_derived(() => get(selectedWall).exteriorTexture === "none" ? void 0 : get(selectedWall).exteriorTexture || get(selectedWall).texture);
|
|
64756
|
-
var
|
|
64757
|
-
var
|
|
64758
|
-
each(
|
|
64853
|
+
var div_10 = root_5$3();
|
|
64854
|
+
var div_11 = sibling(child(div_10), 2);
|
|
64855
|
+
each(div_11, 21, () => wallColors, index$1, ($$anchor, wc) => {
|
|
64759
64856
|
var button_6 = root_6$2();
|
|
64760
64857
|
template_effect(() => {
|
|
64761
64858
|
var _$$get$color2;
|
|
@@ -64768,13 +64865,13 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64768
64865
|
});
|
|
64769
64866
|
append($$anchor, button_6);
|
|
64770
64867
|
});
|
|
64771
|
-
reset(
|
|
64772
|
-
var label_4 = sibling(
|
|
64868
|
+
reset(div_11);
|
|
64869
|
+
var label_4 = sibling(div_11, 2);
|
|
64773
64870
|
var input_4 = sibling(child(label_4), 2);
|
|
64774
64871
|
remove_input_defaults(input_4);
|
|
64775
64872
|
reset(label_4);
|
|
64776
|
-
var
|
|
64777
|
-
var button_7 = child(
|
|
64873
|
+
var div_12 = sibling(label_4, 4);
|
|
64874
|
+
var button_7 = child(div_12);
|
|
64778
64875
|
each(sibling(button_7, 2), 17, () => wallColors.filter((wc) => wc.texture), index$1, ($$anchor, wc) => {
|
|
64779
64876
|
const texPath = /* @__PURE__ */ user_derived(() => {
|
|
64780
64877
|
var _redBrick$exposedBr2;
|
|
@@ -64805,8 +64902,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64805
64902
|
});
|
|
64806
64903
|
append($$anchor, button_8);
|
|
64807
64904
|
});
|
|
64905
|
+
reset(div_12);
|
|
64808
64906
|
reset(div_10);
|
|
64809
|
-
reset(div_8);
|
|
64810
64907
|
template_effect(() => {
|
|
64811
64908
|
set_value(input_4, get(sideColor));
|
|
64812
64909
|
set_class(button_7, 1, `p-1.5 rounded-md border-2 text-[10px] text-center h-14 ${!get(sideTex) ? "border-blue-500 ring-1 ring-blue-200" : "border-gray-200 hover:border-gray-300"}`);
|
|
@@ -64817,14 +64914,14 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64817
64914
|
delegated("click", button_7, () => {
|
|
64818
64915
|
if (get(selectedWall)) updateWall(get(selectedWall).id, { exteriorTexture: "none" });
|
|
64819
64916
|
});
|
|
64820
|
-
append($$anchor,
|
|
64917
|
+
append($$anchor, div_10);
|
|
64821
64918
|
};
|
|
64822
64919
|
if_block(node_1, ($$render) => {
|
|
64823
64920
|
if (get(wallSideTab) === "interior") $$render(consequent);
|
|
64824
64921
|
else $$render(alternate, -1);
|
|
64825
64922
|
});
|
|
64923
|
+
reset(div_5);
|
|
64826
64924
|
reset(div_3);
|
|
64827
|
-
reset(div_1);
|
|
64828
64925
|
template_effect(($0, $1, $2, $3, $4, $5) => {
|
|
64829
64926
|
set_text(text, `Length (${$0 !== null && $0 !== void 0 ? $0 : ""})`);
|
|
64830
64927
|
set_value(input, $1);
|
|
@@ -64866,8 +64963,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64866
64963
|
};
|
|
64867
64964
|
var consequent_2 = ($$anchor) => {
|
|
64868
64965
|
var fragment_1 = root_8$1();
|
|
64869
|
-
var
|
|
64870
|
-
var label_5 = child(
|
|
64966
|
+
var div_13 = sibling(first_child(fragment_1), 2);
|
|
64967
|
+
var label_5 = child(div_13);
|
|
64871
64968
|
var span_5 = child(label_5);
|
|
64872
64969
|
var text_6 = child(span_5);
|
|
64873
64970
|
reset(span_5);
|
|
@@ -64914,20 +65011,20 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64914
65011
|
init_select(select);
|
|
64915
65012
|
reset(label_9);
|
|
64916
65013
|
var label_10 = sibling(label_9, 2);
|
|
64917
|
-
var
|
|
64918
|
-
var button_9 = child(
|
|
65014
|
+
var div_14 = sibling(child(label_10), 2);
|
|
65015
|
+
var button_9 = child(div_14);
|
|
64919
65016
|
var button_10 = sibling(button_9, 2);
|
|
64920
|
-
reset(
|
|
65017
|
+
reset(div_14);
|
|
64921
65018
|
reset(label_10);
|
|
64922
65019
|
var label_11 = sibling(label_10, 2);
|
|
64923
|
-
var
|
|
64924
|
-
var button_11 = child(
|
|
65020
|
+
var div_15 = sibling(child(label_11), 2);
|
|
65021
|
+
var button_11 = child(div_15);
|
|
64925
65022
|
var button_12 = sibling(button_11, 2);
|
|
64926
|
-
reset(
|
|
65023
|
+
reset(div_15);
|
|
64927
65024
|
reset(label_11);
|
|
64928
|
-
reset(
|
|
65025
|
+
reset(div_13);
|
|
64929
65026
|
template_effect(($0, $1, $2, $3, $4, $5, $6, $7) => {
|
|
64930
|
-
var _$$
|
|
65027
|
+
var _$$get17, _$$get18, _$$get19, _$$get20;
|
|
64931
65028
|
set_text(text_6, `Width (${$0 !== null && $0 !== void 0 ? $0 : ""})`);
|
|
64932
65029
|
set_value(input_5, $1);
|
|
64933
65030
|
set_text(text_7, `Distance from A (${$2 !== null && $2 !== void 0 ? $2 : ""})`);
|
|
@@ -64940,10 +65037,10 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64940
65037
|
var _select$__value;
|
|
64941
65038
|
select.value = (_select$__value = select.__value = get(selectedDoor).type) !== null && _select$__value !== void 0 ? _select$__value : "", select_option(select, get(selectedDoor).type);
|
|
64942
65039
|
}
|
|
64943
|
-
set_class(button_9, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$
|
|
64944
|
-
set_class(button_10, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$
|
|
64945
|
-
set_class(button_11, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${!((_$$
|
|
64946
|
-
set_class(button_12, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$
|
|
65040
|
+
set_class(button_9, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get17 = get(selectedDoor)) === null || _$$get17 === void 0 ? void 0 : _$$get17.swingDirection) === "left" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
|
|
65041
|
+
set_class(button_10, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get18 = get(selectedDoor)) === null || _$$get18 === void 0 ? void 0 : _$$get18.swingDirection) === "right" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
|
|
65042
|
+
set_class(button_11, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${!((_$$get19 = get(selectedDoor)) === null || _$$get19 === void 0 ? void 0 : _$$get19.flipSide) ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
|
|
65043
|
+
set_class(button_12, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get20 = get(selectedDoor)) === null || _$$get20 === void 0 ? void 0 : _$$get20.flipSide) ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
|
|
64947
65044
|
}, [
|
|
64948
65045
|
() => unitLabel(),
|
|
64949
65046
|
() => displayValue(get(selectedDoor).width),
|
|
@@ -64978,8 +65075,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
64978
65075
|
};
|
|
64979
65076
|
var consequent_3 = ($$anchor) => {
|
|
64980
65077
|
var fragment_2 = root_9$1();
|
|
64981
|
-
var
|
|
64982
|
-
var label_12 = child(
|
|
65078
|
+
var div_16 = sibling(first_child(fragment_2), 2);
|
|
65079
|
+
var label_12 = child(div_16);
|
|
64983
65080
|
var select_1 = sibling(child(label_12), 2);
|
|
64984
65081
|
var option_6 = child(select_1);
|
|
64985
65082
|
option_6.value = option_6.__value = "standard";
|
|
@@ -65030,7 +65127,7 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65030
65127
|
var input_13 = sibling(span_13, 2);
|
|
65031
65128
|
remove_input_defaults(input_13);
|
|
65032
65129
|
reset(label_17);
|
|
65033
|
-
reset(
|
|
65130
|
+
reset(div_16);
|
|
65034
65131
|
template_effect(($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) => {
|
|
65035
65132
|
var _$$get$type;
|
|
65036
65133
|
if (select_1_value !== (select_1_value = (_$$get$type = get(selectedWindow).type) !== null && _$$get$type !== void 0 ? _$$get$type : "standard")) {
|
|
@@ -65078,8 +65175,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65078
65175
|
var text_17 = child(button_13, true);
|
|
65079
65176
|
reset(button_13);
|
|
65080
65177
|
reset(h3);
|
|
65081
|
-
var
|
|
65082
|
-
var node_4 = child(
|
|
65178
|
+
var div_17 = sibling(h3, 2);
|
|
65179
|
+
var node_4 = child(div_17);
|
|
65083
65180
|
var consequent_8 = ($$anchor) => {
|
|
65084
65181
|
var fragment_4 = root_11$1();
|
|
65085
65182
|
var node_5 = first_child(fragment_4);
|
|
@@ -65139,8 +65236,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65139
65236
|
});
|
|
65140
65237
|
var node_9 = sibling(node_8, 2);
|
|
65141
65238
|
var consequent_6 = ($$anchor) => {
|
|
65142
|
-
var
|
|
65143
|
-
var node_10 = sibling(child(
|
|
65239
|
+
var div_18 = root_16();
|
|
65240
|
+
var node_10 = sibling(child(div_18), 2);
|
|
65144
65241
|
{
|
|
65145
65242
|
let $0 = /* @__PURE__ */ user_derived(() => {
|
|
65146
65243
|
var _$$get$props$coordina, _$$get$props2;
|
|
@@ -65150,6 +65247,10 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65150
65247
|
var _$$get$props$mapCoord, _$$get$props3;
|
|
65151
65248
|
return (_$$get$props$mapCoord = (_$$get$props3 = get(selectedFurniture).props) === null || _$$get$props3 === void 0 ? void 0 : _$$get$props3.mapCoordinates) !== null && _$$get$props$mapCoord !== void 0 ? _$$get$props$mapCoord : "";
|
|
65152
65249
|
});
|
|
65250
|
+
let $2 = /* @__PURE__ */ user_derived(() => {
|
|
65251
|
+
var _$$get$props4;
|
|
65252
|
+
return ((_$$get$props4 = get(selectedFurniture).props) === null || _$$get$props4 === void 0 ? void 0 : _$$get$props4.zoneColor) || get(selectedFurniture).color || "#22c55e";
|
|
65253
|
+
});
|
|
65153
65254
|
CameraFovEditor(node_10, {
|
|
65154
65255
|
get serial() {
|
|
65155
65256
|
return get(selectedFurniture).serial;
|
|
@@ -65162,11 +65263,14 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65162
65263
|
},
|
|
65163
65264
|
get mapCoordinates() {
|
|
65164
65265
|
return get($1);
|
|
65266
|
+
},
|
|
65267
|
+
get strokeColor() {
|
|
65268
|
+
return get($2);
|
|
65165
65269
|
}
|
|
65166
65270
|
});
|
|
65167
65271
|
}
|
|
65168
|
-
reset(
|
|
65169
|
-
append($$anchor,
|
|
65272
|
+
reset(div_18);
|
|
65273
|
+
append($$anchor, div_18);
|
|
65170
65274
|
};
|
|
65171
65275
|
var consequent_7 = ($$anchor) => {
|
|
65172
65276
|
append($$anchor, root_17$1());
|
|
@@ -65184,9 +65288,9 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65184
65288
|
if_block(node_4, ($$render) => {
|
|
65185
65289
|
if (get(selectedFurniture).catalogId === "camera") $$render(consequent_8);
|
|
65186
65290
|
});
|
|
65187
|
-
var
|
|
65188
|
-
var
|
|
65189
|
-
each(
|
|
65291
|
+
var div_19 = sibling(node_4, 2);
|
|
65292
|
+
var div_20 = sibling(child(div_19), 2);
|
|
65293
|
+
each(div_20, 20, () => [
|
|
65190
65294
|
"#ffffff",
|
|
65191
65295
|
"#f5f5dc",
|
|
65192
65296
|
"#d2b48c",
|
|
@@ -65210,13 +65314,13 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65210
65314
|
delegated("click", button_14, () => onFurnitureColor(color));
|
|
65211
65315
|
append($$anchor, button_14);
|
|
65212
65316
|
});
|
|
65213
|
-
reset(
|
|
65214
|
-
var
|
|
65215
|
-
var input_15 = sibling(child(
|
|
65317
|
+
reset(div_20);
|
|
65318
|
+
var div_21 = sibling(div_20, 2);
|
|
65319
|
+
var input_15 = sibling(child(div_21), 2);
|
|
65216
65320
|
remove_input_defaults(input_15);
|
|
65321
|
+
reset(div_21);
|
|
65217
65322
|
reset(div_19);
|
|
65218
|
-
|
|
65219
|
-
var label_20 = sibling(div_17, 2);
|
|
65323
|
+
var label_20 = sibling(div_19, 2);
|
|
65220
65324
|
var span_16 = child(label_20);
|
|
65221
65325
|
var text_20 = child(span_16);
|
|
65222
65326
|
reset(span_16);
|
|
@@ -65263,16 +65367,16 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65263
65367
|
var input_19 = sibling(child(label_24), 2);
|
|
65264
65368
|
remove_input_defaults(input_19);
|
|
65265
65369
|
reset(label_24);
|
|
65266
|
-
var
|
|
65267
|
-
var button_15 = child(
|
|
65370
|
+
var div_22 = sibling(label_24, 2);
|
|
65371
|
+
var button_15 = child(div_22);
|
|
65268
65372
|
var button_16 = sibling(button_15, 2);
|
|
65269
|
-
reset(
|
|
65270
|
-
var
|
|
65271
|
-
var button_17 = child(
|
|
65373
|
+
reset(div_22);
|
|
65374
|
+
var div_23 = sibling(div_22, 2);
|
|
65375
|
+
var button_17 = child(div_23);
|
|
65272
65376
|
var button_18 = sibling(button_17, 2);
|
|
65273
|
-
reset(
|
|
65274
|
-
var button_19 = sibling(
|
|
65275
|
-
reset(
|
|
65377
|
+
reset(div_23);
|
|
65378
|
+
var button_19 = sibling(div_23, 2);
|
|
65379
|
+
reset(div_17);
|
|
65276
65380
|
template_effect(($0, $1, $2, $3, $4, $5, $6, $7, $8, $9) => {
|
|
65277
65381
|
var _$$get$material;
|
|
65278
65382
|
set_text(text_15, $0);
|
|
@@ -65362,8 +65466,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65362
65466
|
};
|
|
65363
65467
|
var consequent_11 = ($$anchor) => {
|
|
65364
65468
|
var fragment_5 = root_19$1();
|
|
65365
|
-
var
|
|
65366
|
-
var label_25 = child(
|
|
65469
|
+
var div_24 = sibling(first_child(fragment_5), 2);
|
|
65470
|
+
var label_25 = child(div_24);
|
|
65367
65471
|
var select_4 = sibling(child(label_25), 2);
|
|
65368
65472
|
each(select_4, 21, () => roomTypes, index$1, ($$anchor, rt) => {
|
|
65369
65473
|
var option_21 = root_20$1();
|
|
@@ -65402,14 +65506,14 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65402
65506
|
var select_5_value;
|
|
65403
65507
|
init_select(select_5);
|
|
65404
65508
|
reset(label_27);
|
|
65405
|
-
var
|
|
65406
|
-
var p_2 = sibling(child(
|
|
65509
|
+
var div_25 = sibling(label_27, 2);
|
|
65510
|
+
var p_2 = sibling(child(div_25), 2);
|
|
65407
65511
|
var text_24 = child(p_2, true);
|
|
65408
65512
|
reset(p_2);
|
|
65409
|
-
reset(
|
|
65410
|
-
var
|
|
65411
|
-
var
|
|
65412
|
-
each(
|
|
65513
|
+
reset(div_25);
|
|
65514
|
+
var div_26 = sibling(div_25, 2);
|
|
65515
|
+
var div_27 = sibling(child(div_26), 2);
|
|
65516
|
+
each(div_27, 21, () => roomColorPresets, index$1, ($$anchor, preset) => {
|
|
65413
65517
|
var button_20 = root_21$1();
|
|
65414
65518
|
template_effect(() => {
|
|
65415
65519
|
var _$$get$color5;
|
|
@@ -65420,21 +65524,21 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65420
65524
|
delegated("click", button_20, () => onRoomColor(get(preset).color));
|
|
65421
65525
|
append($$anchor, button_20);
|
|
65422
65526
|
});
|
|
65423
|
-
reset(
|
|
65424
|
-
var
|
|
65425
|
-
var input_21 = sibling(child(
|
|
65527
|
+
reset(div_27);
|
|
65528
|
+
var div_28 = sibling(div_27, 2);
|
|
65529
|
+
var input_21 = sibling(child(div_28), 2);
|
|
65426
65530
|
remove_input_defaults(input_21);
|
|
65531
|
+
reset(div_28);
|
|
65427
65532
|
reset(div_26);
|
|
65428
|
-
|
|
65429
|
-
var
|
|
65430
|
-
|
|
65431
|
-
|
|
65432
|
-
var
|
|
65433
|
-
var span_19 = child(div_29);
|
|
65533
|
+
var div_29 = sibling(div_26, 2);
|
|
65534
|
+
var div_30 = sibling(child(div_29), 2);
|
|
65535
|
+
each(div_30, 21, () => textureGroups, index$1, ($$anchor, group) => {
|
|
65536
|
+
var div_31 = root_22$1();
|
|
65537
|
+
var span_19 = child(div_31);
|
|
65434
65538
|
var text_25 = child(span_19, true);
|
|
65435
65539
|
reset(span_19);
|
|
65436
|
-
var
|
|
65437
|
-
each(
|
|
65540
|
+
var div_32 = sibling(span_19, 2);
|
|
65541
|
+
each(div_32, 21, () => get(group).ids, index$1, ($$anchor, matId) => {
|
|
65438
65542
|
const mat = /* @__PURE__ */ user_derived(() => floorMaterials.find((m) => m.id === get(matId)));
|
|
65439
65543
|
var fragment_6 = comment();
|
|
65440
65544
|
var node_11 = first_child(fragment_6);
|
|
@@ -65444,15 +65548,15 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65444
65548
|
return (_floorTexPaths$$$get$ = floorTexPaths[get(mat).id]) !== null && _floorTexPaths$$$get$ !== void 0 ? _floorTexPaths$$$get$ : "";
|
|
65445
65549
|
});
|
|
65446
65550
|
var button_21 = root_24$1();
|
|
65447
|
-
var
|
|
65448
|
-
var
|
|
65449
|
-
var text_26 = child(
|
|
65450
|
-
reset(
|
|
65551
|
+
var div_33 = child(button_21);
|
|
65552
|
+
var div_34 = sibling(div_33, 2);
|
|
65553
|
+
var text_26 = child(div_34, true);
|
|
65554
|
+
reset(div_34);
|
|
65451
65555
|
reset(button_21);
|
|
65452
65556
|
template_effect(() => {
|
|
65453
65557
|
set_class(button_21, 1, `p-1 rounded-lg border-2 hover:border-gray-300 transition-all text-xs ${get(selectedRoom).floorTexture === get(mat).id ? "border-blue-500 ring-2 ring-blue-200 shadow-sm" : "border-gray-200"}`);
|
|
65454
65558
|
set_attribute(button_21, "title", get(mat).name);
|
|
65455
|
-
set_style(
|
|
65559
|
+
set_style(div_33, get(texPath) ? `background-image: url(${get(texPath)}); background-size: cover; background-position: center;` : `background-color: ${get(mat).color}`);
|
|
65456
65560
|
set_text(text_26, get(mat).name);
|
|
65457
65561
|
});
|
|
65458
65562
|
delegated("click", button_21, () => onRoomFloor(get(mat).id));
|
|
@@ -65463,14 +65567,14 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65463
65567
|
});
|
|
65464
65568
|
append($$anchor, fragment_6);
|
|
65465
65569
|
});
|
|
65466
|
-
reset(
|
|
65467
|
-
reset(
|
|
65570
|
+
reset(div_32);
|
|
65571
|
+
reset(div_31);
|
|
65468
65572
|
template_effect(() => set_text(text_25, get(group).label));
|
|
65469
|
-
append($$anchor,
|
|
65573
|
+
append($$anchor, div_31);
|
|
65470
65574
|
});
|
|
65471
|
-
reset(
|
|
65472
|
-
reset(
|
|
65473
|
-
reset(
|
|
65575
|
+
reset(div_30);
|
|
65576
|
+
reset(div_29);
|
|
65577
|
+
reset(div_24);
|
|
65474
65578
|
template_effect(($0) => {
|
|
65475
65579
|
var _$$get$roomType, _$$get$color6;
|
|
65476
65580
|
if (select_4_value !== (select_4_value = get(selectedRoomType))) {
|
|
@@ -65499,8 +65603,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65499
65603
|
};
|
|
65500
65604
|
var consequent_12 = ($$anchor) => {
|
|
65501
65605
|
var fragment_7 = root_25();
|
|
65502
|
-
var
|
|
65503
|
-
var label_28 = child(
|
|
65606
|
+
var div_35 = sibling(first_child(fragment_7), 2);
|
|
65607
|
+
var label_28 = child(div_35);
|
|
65504
65608
|
var select_6 = sibling(child(label_28), 2);
|
|
65505
65609
|
var option_26 = child(select_6);
|
|
65506
65610
|
option_26.value = option_26.__value = "straight";
|
|
@@ -65533,16 +65637,16 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65533
65637
|
remove_input_defaults(input_24);
|
|
65534
65638
|
reset(label_31);
|
|
65535
65639
|
var label_32 = sibling(label_31, 2);
|
|
65536
|
-
var
|
|
65537
|
-
var button_22 = child(
|
|
65640
|
+
var div_36 = sibling(child(label_32), 2);
|
|
65641
|
+
var button_22 = child(div_36);
|
|
65538
65642
|
var button_23 = sibling(button_22, 2);
|
|
65539
|
-
reset(
|
|
65643
|
+
reset(div_36);
|
|
65540
65644
|
reset(label_32);
|
|
65541
65645
|
var label_33 = sibling(label_32, 2);
|
|
65542
65646
|
var input_25 = sibling(child(label_33), 2);
|
|
65543
65647
|
remove_input_defaults(input_25);
|
|
65544
65648
|
reset(label_33);
|
|
65545
|
-
reset(
|
|
65649
|
+
reset(div_35);
|
|
65546
65650
|
template_effect(($0, $1, $2, $3) => {
|
|
65547
65651
|
if (select_6_value !== (select_6_value = get(selectedStair).stairType || "straight")) {
|
|
65548
65652
|
var _select_6$__value;
|
|
@@ -65573,12 +65677,12 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65573
65677
|
};
|
|
65574
65678
|
var consequent_14 = ($$anchor) => {
|
|
65575
65679
|
var fragment_8 = root_26();
|
|
65576
|
-
var
|
|
65577
|
-
var label_34 = child(
|
|
65578
|
-
var
|
|
65579
|
-
var button_24 = child(
|
|
65680
|
+
var div_37 = sibling(first_child(fragment_8), 2);
|
|
65681
|
+
var label_34 = child(div_37);
|
|
65682
|
+
var div_38 = sibling(child(label_34), 2);
|
|
65683
|
+
var button_24 = child(div_38);
|
|
65580
65684
|
var button_25 = sibling(button_24, 2);
|
|
65581
|
-
reset(
|
|
65685
|
+
reset(div_38);
|
|
65582
65686
|
reset(label_34);
|
|
65583
65687
|
var label_35 = sibling(label_34, 2);
|
|
65584
65688
|
var span_22 = child(label_35);
|
|
@@ -65594,9 +65698,9 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65594
65698
|
var input_27 = sibling(span_23, 2);
|
|
65595
65699
|
remove_input_defaults(input_27);
|
|
65596
65700
|
reset(label_36);
|
|
65597
|
-
var
|
|
65598
|
-
var
|
|
65599
|
-
each(
|
|
65701
|
+
var div_39 = sibling(label_36, 2);
|
|
65702
|
+
var div_40 = sibling(child(div_39), 2);
|
|
65703
|
+
each(div_40, 21, () => columnColorPresets, index$1, ($$anchor, preset) => {
|
|
65600
65704
|
var button_26 = root_27();
|
|
65601
65705
|
template_effect(() => {
|
|
65602
65706
|
var _$$get$color7;
|
|
@@ -65607,13 +65711,13 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65607
65711
|
delegated("click", button_26, () => updateColumn(get(selectedColumn).id, { color: get(preset).color }));
|
|
65608
65712
|
append($$anchor, button_26);
|
|
65609
65713
|
});
|
|
65610
|
-
reset(
|
|
65611
|
-
var
|
|
65612
|
-
var input_28 = sibling(child(
|
|
65714
|
+
reset(div_40);
|
|
65715
|
+
var div_41 = sibling(div_40, 2);
|
|
65716
|
+
var input_28 = sibling(child(div_41), 2);
|
|
65613
65717
|
remove_input_defaults(input_28);
|
|
65718
|
+
reset(div_41);
|
|
65614
65719
|
reset(div_39);
|
|
65615
|
-
|
|
65616
|
-
var node_12 = sibling(div_37, 2);
|
|
65720
|
+
var node_12 = sibling(div_39, 2);
|
|
65617
65721
|
var consequent_13 = ($$anchor) => {
|
|
65618
65722
|
var label_37 = root_28();
|
|
65619
65723
|
var input_29 = sibling(child(label_37), 2);
|
|
@@ -65626,7 +65730,7 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65626
65730
|
if_block(node_12, ($$render) => {
|
|
65627
65731
|
if (get(selectedColumn).shape === "square") $$render(consequent_13);
|
|
65628
65732
|
});
|
|
65629
|
-
reset(
|
|
65733
|
+
reset(div_37);
|
|
65630
65734
|
template_effect(($0, $1, $2, $3) => {
|
|
65631
65735
|
set_class(button_24, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${get(selectedColumn).shape === "round" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
|
|
65632
65736
|
set_class(button_25, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${get(selectedColumn).shape === "square" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
|
|
@@ -65649,8 +65753,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65649
65753
|
append($$anchor, fragment_8);
|
|
65650
65754
|
};
|
|
65651
65755
|
var consequent_16 = ($$anchor) => {
|
|
65652
|
-
var
|
|
65653
|
-
var h3_1 = child(
|
|
65756
|
+
var div_42 = root_29();
|
|
65757
|
+
var h3_1 = child(div_42);
|
|
65654
65758
|
var span_24 = child(h3_1);
|
|
65655
65759
|
next();
|
|
65656
65760
|
reset(h3_1);
|
|
@@ -65660,44 +65764,44 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65660
65764
|
reset(label_38);
|
|
65661
65765
|
var node_13 = sibling(label_38, 2);
|
|
65662
65766
|
var consequent_15 = ($$anchor) => {
|
|
65663
|
-
var
|
|
65664
|
-
var span_25 = sibling(child(
|
|
65767
|
+
var div_43 = root_30();
|
|
65768
|
+
var span_25 = sibling(child(div_43));
|
|
65665
65769
|
var text_31 = child(span_25, true);
|
|
65666
65770
|
reset(span_25);
|
|
65667
|
-
reset(
|
|
65771
|
+
reset(div_43);
|
|
65668
65772
|
template_effect(() => set_text(text_31, get(selectedZone).cameraSerial));
|
|
65669
|
-
append($$anchor,
|
|
65773
|
+
append($$anchor, div_43);
|
|
65670
65774
|
};
|
|
65671
65775
|
if_block(node_13, ($$render) => {
|
|
65672
65776
|
if (get(selectedZone).cameraSerial) $$render(consequent_15);
|
|
65673
65777
|
});
|
|
65674
|
-
var
|
|
65675
|
-
var span_26 = sibling(child(
|
|
65778
|
+
var div_44 = sibling(node_13, 2);
|
|
65779
|
+
var span_26 = sibling(child(div_44));
|
|
65676
65780
|
var text_32 = child(span_26, true);
|
|
65677
65781
|
reset(span_26);
|
|
65678
|
-
reset(
|
|
65679
|
-
var label_39 = sibling(
|
|
65680
|
-
var
|
|
65681
|
-
var node_14 = child(
|
|
65782
|
+
reset(div_44);
|
|
65783
|
+
var label_39 = sibling(div_44, 2);
|
|
65784
|
+
var div_45 = sibling(child(label_39), 2);
|
|
65785
|
+
var node_14 = child(div_45);
|
|
65682
65786
|
each(node_14, 17, () => ZONE_COLOR_PALETTE, index$1, ($$anchor, c) => {
|
|
65683
65787
|
var button_27 = root_31();
|
|
65684
65788
|
template_effect(() => {
|
|
65685
|
-
var _$$
|
|
65789
|
+
var _$$get21;
|
|
65686
65790
|
set_class(button_27, 1, `w-6 h-6 rounded border-2 ${get(selectedZone).color === get(c) ? "border-slate-800" : "border-transparent"}`);
|
|
65687
|
-
set_style(button_27, `background:${(_$$
|
|
65791
|
+
set_style(button_27, `background:${(_$$get21 = get(c)) !== null && _$$get21 !== void 0 ? _$$get21 : ""}`);
|
|
65688
65792
|
});
|
|
65689
65793
|
delegated("click", button_27, () => updateZone(get(selectedZone).id, { color: get(c) }));
|
|
65690
65794
|
append($$anchor, button_27);
|
|
65691
65795
|
});
|
|
65692
65796
|
var input_31 = sibling(node_14, 2);
|
|
65693
65797
|
remove_input_defaults(input_31);
|
|
65694
|
-
reset(
|
|
65798
|
+
reset(div_45);
|
|
65695
65799
|
reset(label_39);
|
|
65696
65800
|
var label_40 = sibling(label_39, 2);
|
|
65697
65801
|
var input_32 = sibling(child(label_40), 2);
|
|
65698
65802
|
remove_input_defaults(input_32);
|
|
65699
65803
|
reset(label_40);
|
|
65700
|
-
reset(
|
|
65804
|
+
reset(div_42);
|
|
65701
65805
|
template_effect(() => {
|
|
65702
65806
|
var _$$get$color8, _$$get$color9, _$$get$fillOpacity;
|
|
65703
65807
|
set_style(span_24, `background:${(_$$get$color8 = get(selectedZone).color) !== null && _$$get$color8 !== void 0 ? _$$get$color8 : ""}22;color:${(_$$get$color9 = get(selectedZone).color) !== null && _$$get$color9 !== void 0 ? _$$get$color9 : ""}`);
|
|
@@ -65709,11 +65813,11 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65709
65813
|
delegated("input", input_30, (e) => updateZone(get(selectedZone).id, { name: e.target.value }));
|
|
65710
65814
|
delegated("input", input_31, (e) => updateZone(get(selectedZone).id, { color: e.target.value }));
|
|
65711
65815
|
delegated("input", input_32, (e) => updateZone(get(selectedZone).id, { fillOpacity: Number(e.target.value) }));
|
|
65712
|
-
append($$anchor,
|
|
65816
|
+
append($$anchor, div_42);
|
|
65713
65817
|
};
|
|
65714
65818
|
var consequent_17 = ($$anchor) => {
|
|
65715
|
-
var
|
|
65716
|
-
var label_41 = sibling(child(
|
|
65819
|
+
var div_46 = root_32();
|
|
65820
|
+
var label_41 = sibling(child(div_46), 2);
|
|
65717
65821
|
var input_33 = sibling(child(label_41), 2);
|
|
65718
65822
|
remove_input_defaults(input_33);
|
|
65719
65823
|
reset(label_41);
|
|
@@ -65722,13 +65826,13 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65722
65826
|
remove_input_defaults(input_34);
|
|
65723
65827
|
reset(label_42);
|
|
65724
65828
|
var label_43 = sibling(label_42, 2);
|
|
65725
|
-
var
|
|
65726
|
-
var input_35 = child(
|
|
65829
|
+
var div_47 = sibling(child(label_43), 2);
|
|
65830
|
+
var input_35 = child(div_47);
|
|
65727
65831
|
remove_input_defaults(input_35);
|
|
65728
65832
|
var span_27 = sibling(input_35, 2);
|
|
65729
65833
|
var text_33 = child(span_27, true);
|
|
65730
65834
|
reset(span_27);
|
|
65731
|
-
reset(
|
|
65835
|
+
reset(div_47);
|
|
65732
65836
|
reset(label_43);
|
|
65733
65837
|
var label_44 = sibling(label_43, 2);
|
|
65734
65838
|
var input_36 = sibling(child(label_44), 2);
|
|
@@ -65742,7 +65846,7 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65742
65846
|
var input_38 = sibling(child(label_46), 2);
|
|
65743
65847
|
remove_input_defaults(input_38);
|
|
65744
65848
|
reset(label_46);
|
|
65745
|
-
reset(
|
|
65849
|
+
reset(div_46);
|
|
65746
65850
|
template_effect(($0, $1) => {
|
|
65747
65851
|
set_value(input_33, get(selectedTextAnnotation).text);
|
|
65748
65852
|
set_value(input_34, get(selectedTextAnnotation).fontSize);
|
|
@@ -65758,7 +65862,7 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65758
65862
|
delegated("input", input_36, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { rotation: Number(e.target.value) }));
|
|
65759
65863
|
delegated("input", input_37, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { x: Number(e.target.value) }));
|
|
65760
65864
|
delegated("input", input_38, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { y: Number(e.target.value) }));
|
|
65761
|
-
append($$anchor,
|
|
65865
|
+
append($$anchor, div_46);
|
|
65762
65866
|
};
|
|
65763
65867
|
if_block(node, ($$render) => {
|
|
65764
65868
|
if (get(selectedWall)) $$render(consequent_1);
|
|
@@ -65773,9 +65877,9 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65773
65877
|
});
|
|
65774
65878
|
var node_15 = sibling(node, 2);
|
|
65775
65879
|
var consequent_18 = ($$anchor) => {
|
|
65776
|
-
var
|
|
65777
|
-
var
|
|
65778
|
-
var label_47 = child(
|
|
65880
|
+
var div_48 = root_33();
|
|
65881
|
+
var div_49 = sibling(child(div_48), 2);
|
|
65882
|
+
var label_47 = child(div_49);
|
|
65779
65883
|
var input_39 = sibling(child(label_47), 2);
|
|
65780
65884
|
remove_input_defaults(input_39);
|
|
65781
65885
|
reset(label_47);
|
|
@@ -65787,15 +65891,15 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65787
65891
|
var input_41 = sibling(child(label_49), 2);
|
|
65788
65892
|
remove_input_defaults(input_41);
|
|
65789
65893
|
reset(label_49);
|
|
65790
|
-
var
|
|
65791
|
-
var button_28 = child(
|
|
65894
|
+
var div_50 = sibling(label_49, 2);
|
|
65895
|
+
var button_28 = child(div_50);
|
|
65792
65896
|
var text_34 = child(button_28, true);
|
|
65793
65897
|
reset(button_28);
|
|
65794
65898
|
var button_29 = sibling(button_28, 2);
|
|
65899
|
+
reset(div_50);
|
|
65900
|
+
var button_30 = sibling(div_50, 2);
|
|
65901
|
+
reset(div_49);
|
|
65795
65902
|
reset(div_48);
|
|
65796
|
-
var button_30 = sibling(div_48, 2);
|
|
65797
|
-
reset(div_47);
|
|
65798
|
-
reset(div_46);
|
|
65799
65903
|
template_effect(() => {
|
|
65800
65904
|
set_value(input_39, get(floor).backgroundImage.opacity);
|
|
65801
65905
|
set_value(input_40, get(floor).backgroundImage.scale);
|
|
@@ -65812,22 +65916,32 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
65812
65916
|
calibrationMode.set(true);
|
|
65813
65917
|
});
|
|
65814
65918
|
delegated("click", button_30, () => setBackgroundImage(void 0));
|
|
65815
|
-
append($$anchor,
|
|
65919
|
+
append($$anchor, div_48);
|
|
65816
65920
|
};
|
|
65817
65921
|
if_block(node_15, ($$render) => {
|
|
65818
|
-
var _$$
|
|
65819
|
-
if (get(hasBgImage) && ((_$$
|
|
65922
|
+
var _$$get22;
|
|
65923
|
+
if (get(hasBgImage) && ((_$$get22 = get(floor)) === null || _$$get22 === void 0 ? void 0 : _$$get22.backgroundImage)) $$render(consequent_18);
|
|
65820
65924
|
});
|
|
65821
65925
|
reset(div);
|
|
65822
|
-
|
|
65926
|
+
bind_this(div, ($$value) => set(panelEl, $$value), () => get(panelEl));
|
|
65927
|
+
template_effect(() => {
|
|
65928
|
+
var _$$get23;
|
|
65929
|
+
classes = set_class(div, 1, "shrink-0 bg-white border-l border-gray-200 flex flex-col overflow-y-auto p-3 absolute right-0 z-40 shadow-lg", null, classes, { hidden: !get(hasSelection) });
|
|
65930
|
+
set_style(div, `top: 0; bottom: 0; width: ${(_$$get23 = get(panelWidth)) !== null && _$$get23 !== void 0 ? _$$get23 : ""}px; ${get(resizing) ? "will-change: width;" : ""}`);
|
|
65931
|
+
set_attribute(div_1, "aria-valuenow", get(panelWidth));
|
|
65932
|
+
classes_1 = set_class(div_1, 1, "absolute left-0 top-0 bottom-0 w-1.5 -ml-0.5 z-50 group touch-none", null, classes_1, { "bg-blue-400": get(resizing) });
|
|
65933
|
+
set_class(div_2, 1, `absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent group-hover:bg-blue-400/70 transition-colors ${get(resizing) ? "bg-blue-500" : ""}`);
|
|
65934
|
+
});
|
|
65823
65935
|
delegated("keydown", div, stopShortcutBubble);
|
|
65824
65936
|
event("keydown", div, stopShortcutBubble, true);
|
|
65937
|
+
delegated("pointerdown", div_1, onResizePointerDown);
|
|
65825
65938
|
append($$anchor, div);
|
|
65826
65939
|
pop();
|
|
65827
65940
|
$$cleanup();
|
|
65828
65941
|
}
|
|
65829
65942
|
delegate([
|
|
65830
65943
|
"keydown",
|
|
65944
|
+
"pointerdown",
|
|
65831
65945
|
"input",
|
|
65832
65946
|
"click",
|
|
65833
65947
|
"change"
|
|
@@ -66644,6 +66758,12 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
66644
66758
|
let fovCursor = /* @__PURE__ */ state(null);
|
|
66645
66759
|
/** Selected committed floor FOV (by camera serial) — shows float toolbar */
|
|
66646
66760
|
let selectedFovSerial = /* @__PURE__ */ state(null);
|
|
66761
|
+
/**
|
|
66762
|
+
* true = camera selected via FOV polygon click (toolbar/properties OK,
|
|
66763
|
+
* but no resize/rotate handles / yellow cone).
|
|
66764
|
+
*/
|
|
66765
|
+
let fovSelectionOnly = /* @__PURE__ */ state(false);
|
|
66766
|
+
let draggingFovVertex = /* @__PURE__ */ state(null);
|
|
66647
66767
|
let editingTextAnnotationId = /* @__PURE__ */ state(null);
|
|
66648
66768
|
let editingTextAnnotationPos = /* @__PURE__ */ state(proxy({
|
|
66649
66769
|
x: 0,
|
|
@@ -67106,6 +67226,11 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
67106
67226
|
}
|
|
67107
67227
|
if (tb.mode === "fov") clearSelectedFovMap();
|
|
67108
67228
|
}
|
|
67229
|
+
function findFovVertexAt(wp, pts) {
|
|
67230
|
+
const tol = 12 / get(zoom);
|
|
67231
|
+
for (let i = 0; i < pts.length; i++) if (isNearPoint(wp, pts[i], tol)) return i;
|
|
67232
|
+
return -1;
|
|
67233
|
+
}
|
|
67109
67234
|
function drawCameraFovOverlays() {
|
|
67110
67235
|
if (!ctx || !get(currentFloor)) return;
|
|
67111
67236
|
const bounds = getInteriorFloorBounds(get(currentFloor));
|
|
@@ -67118,7 +67243,7 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
67118
67243
|
if (!mapStr) continue;
|
|
67119
67244
|
const pts = mapCoordinatesToWorldPoints(mapStr, bounds);
|
|
67120
67245
|
if (pts.length < 2) continue;
|
|
67121
|
-
const isActive = (active === null || active === void 0 ? void 0 : active.id) === fi.id;
|
|
67246
|
+
const isActive = get(selectedFovSerial) === fi.serial || (active === null || active === void 0 ? void 0 : active.id) === fi.id;
|
|
67122
67247
|
const color = ((_fi$props3 = fi.props) === null || _fi$props3 === void 0 ? void 0 : _fi$props3.zoneColor) || fi.color || "#22c55e";
|
|
67123
67248
|
ctx.save();
|
|
67124
67249
|
ctx.strokeStyle = color;
|
|
@@ -67146,36 +67271,36 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
67146
67271
|
}
|
|
67147
67272
|
if (get(currentTool) === "cameraFov" && (get(fovPolyDraft).length || get(fovCursor))) {
|
|
67148
67273
|
var _active$props;
|
|
67149
|
-
const
|
|
67150
|
-
if (get(fovCursor)) pts.push(get(fovCursor));
|
|
67151
|
-
const color = (active === null || active === void 0 || (_active$props = active.props) === null || _active$props === void 0 ? void 0 : _active$props.zoneColor) || "#22c55e";
|
|
67274
|
+
const color = (active === null || active === void 0 || (_active$props = active.props) === null || _active$props === void 0 ? void 0 : _active$props.zoneColor) || (active === null || active === void 0 ? void 0 : active.color) || "#22c55e";
|
|
67152
67275
|
ctx.save();
|
|
67153
67276
|
ctx.strokeStyle = color;
|
|
67154
|
-
ctx.
|
|
67155
|
-
ctx.
|
|
67156
|
-
ctx.
|
|
67157
|
-
|
|
67158
|
-
|
|
67277
|
+
ctx.lineWidth = 2.5;
|
|
67278
|
+
ctx.lineJoin = "round";
|
|
67279
|
+
ctx.lineCap = "round";
|
|
67280
|
+
if (get(fovPolyDraft).length >= 2) {
|
|
67281
|
+
ctx.setLineDash([]);
|
|
67159
67282
|
ctx.beginPath();
|
|
67160
|
-
const a = worldToScreen(
|
|
67283
|
+
const a = worldToScreen(get(fovPolyDraft)[0].x, get(fovPolyDraft)[0].y);
|
|
67161
67284
|
ctx.moveTo(a.x, a.y);
|
|
67162
|
-
for (let i = 1; i <
|
|
67163
|
-
const s = worldToScreen(
|
|
67285
|
+
for (let i = 1; i < get(fovPolyDraft).length; i++) {
|
|
67286
|
+
const s = worldToScreen(get(fovPolyDraft)[i].x, get(fovPolyDraft)[i].y);
|
|
67164
67287
|
ctx.lineTo(s.x, s.y);
|
|
67165
67288
|
}
|
|
67166
67289
|
ctx.stroke();
|
|
67167
67290
|
}
|
|
67168
|
-
if (get(fovCursor) && get(fovPolyDraft).length >=
|
|
67169
|
-
const
|
|
67170
|
-
const
|
|
67171
|
-
|
|
67291
|
+
if (get(fovCursor) && get(fovPolyDraft).length >= 1) {
|
|
67292
|
+
const last = get(fovPolyDraft)[get(fovPolyDraft).length - 1];
|
|
67293
|
+
const a = worldToScreen(last.x, last.y);
|
|
67294
|
+
const b = worldToScreen(get(fovCursor).x, get(fovCursor).y);
|
|
67295
|
+
ctx.setLineDash([6, 4]);
|
|
67296
|
+
ctx.globalAlpha = .85;
|
|
67172
67297
|
ctx.beginPath();
|
|
67173
67298
|
ctx.moveTo(a.x, a.y);
|
|
67174
67299
|
ctx.lineTo(b.x, b.y);
|
|
67175
67300
|
ctx.stroke();
|
|
67301
|
+
ctx.globalAlpha = 1;
|
|
67302
|
+
ctx.setLineDash([]);
|
|
67176
67303
|
}
|
|
67177
|
-
ctx.globalAlpha = 1;
|
|
67178
|
-
ctx.setLineDash([]);
|
|
67179
67304
|
for (let i = 0; i < get(fovPolyDraft).length; i++) {
|
|
67180
67305
|
const s = worldToScreen(get(fovPolyDraft)[i].x, get(fovPolyDraft)[i].y);
|
|
67181
67306
|
drawVertexIndexBadge(ctx, s.x, s.y, i, color, 9);
|
|
@@ -67426,7 +67551,8 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
67426
67551
|
drawWindowOnWall(getCS(), wall, win);
|
|
67427
67552
|
}
|
|
67428
67553
|
function drawFurniture(item, selected) {
|
|
67429
|
-
|
|
67554
|
+
const showChrome = selected && !(item.catalogId === "camera" && get(fovSelectionOnly) && item.serial === get(selectedFovSerial));
|
|
67555
|
+
drawFurnitureItem(getCS(), item, showChrome, {
|
|
67430
67556
|
selectedCameraSerial: selectedCameraSerial(),
|
|
67431
67557
|
showCameraCones: showCameraCones(),
|
|
67432
67558
|
showCameraLabels: showCameraLabels(),
|
|
@@ -67858,7 +67984,7 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
67858
67984
|
else zoomToFit();
|
|
67859
67985
|
needsFitToCanvas = false;
|
|
67860
67986
|
}
|
|
67861
|
-
if (get(wallStart) || get(draggingFurnitureId) || get(draggingDoorId) || get(draggingWindowId) || get(draggingStairId) || get(draggingColumnId) || get(draggingWallEndpoint) || get(draggingWallParallel) || get(draggingCurveHandle) || get(draggingHandle) || get(draggingMultiSelect) || get(draggingRoomId) || get(draggingRoomLabelId) || get(draggingTextAnnotationId) || get(draggingGuideId) || get(draggingZoneId) || get(zoneRectDragStart) || get(zonePolyDraft).length > 0 || get(fovPolyDraft).length > 0 || get(measuring) || get(annotating) || get(currentPlacingId) || get(isPlacingStair) || get(isPlacingColumn) || get(marqueeStart) || get(isPanning)) canvasDirty = true;
|
|
67987
|
+
if (get(wallStart) || get(draggingFurnitureId) || get(draggingDoorId) || get(draggingWindowId) || get(draggingStairId) || get(draggingColumnId) || get(draggingWallEndpoint) || get(draggingWallParallel) || get(draggingCurveHandle) || get(draggingHandle) || get(draggingMultiSelect) || get(draggingRoomId) || get(draggingRoomLabelId) || get(draggingTextAnnotationId) || get(draggingGuideId) || get(draggingZoneId) || get(draggingFovVertex) != null || get(zoneRectDragStart) || get(zonePolyDraft).length > 0 || get(fovPolyDraft).length > 0 || get(currentTool) === "cameraFov" || get(measuring) || get(annotating) || get(currentPlacingId) || get(isPlacingStair) || get(isPlacingColumn) || get(marqueeStart) || get(isPanning)) canvasDirty = true;
|
|
67862
67988
|
updateDetectedRooms();
|
|
67863
67989
|
const selId = get(currentSelectedId);
|
|
67864
67990
|
const multiIds = get(currentSelectedIds);
|
|
@@ -68958,11 +69084,8 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
68958
69084
|
x: snap(wp.x),
|
|
68959
69085
|
y: snap(wp.y)
|
|
68960
69086
|
};
|
|
68961
|
-
if (get(fovPolyDraft).length >= 3 && isNearPoint(snapped, get(fovPolyDraft)[0], 15 / get(zoom))) {
|
|
68962
|
-
commitFovFloorPolygon(get(fovPolyDraft));
|
|
68963
|
-
return;
|
|
68964
|
-
}
|
|
68965
69087
|
set(fovPolyDraft, [...get(fovPolyDraft), snapped], true);
|
|
69088
|
+
markDirty();
|
|
68966
69089
|
return;
|
|
68967
69090
|
}
|
|
68968
69091
|
if (tool === "select") {
|
|
@@ -68974,6 +69097,7 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
68974
69097
|
if (zHit) {
|
|
68975
69098
|
set(selectedZoneId, zHit.id, true);
|
|
68976
69099
|
set(selectedFovSerial, null);
|
|
69100
|
+
set(fovSelectionOnly, false);
|
|
68977
69101
|
selectedElementId.set(zHit.id);
|
|
68978
69102
|
set(selectedTextAnnotationId, null);
|
|
68979
69103
|
set(selectedAnnotationId, null);
|
|
@@ -68996,17 +69120,27 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
68996
69120
|
}
|
|
68997
69121
|
const fovHit = findFovCameraAt(wp);
|
|
68998
69122
|
if (fovHit === null || fovHit === void 0 ? void 0 : fovHit.serial) {
|
|
69123
|
+
var _fovHit$props;
|
|
69124
|
+
const bounds = getInteriorFloorBounds(get(currentFloor));
|
|
69125
|
+
const pts = bounds ? mapCoordinatesToWorldPoints((_fovHit$props = fovHit.props) === null || _fovHit$props === void 0 ? void 0 : _fovHit$props.mapCoordinates, bounds) : [];
|
|
69126
|
+
const vIdx = pts.length ? findFovVertexAt(wp, pts) : -1;
|
|
68999
69127
|
set(selectedFovSerial, fovHit.serial, true);
|
|
69128
|
+
set(fovSelectionOnly, true);
|
|
69129
|
+
set(draggingFovVertex, vIdx >= 0 ? vIdx : null, true);
|
|
69000
69130
|
set(selectedZoneId, null);
|
|
69001
69131
|
selectedElementId.set(fovHit.id);
|
|
69002
69132
|
set(selectedTextAnnotationId, null);
|
|
69003
69133
|
set(selectedAnnotationId, null);
|
|
69004
69134
|
set(selectedMeasurementId, null);
|
|
69135
|
+
if (vIdx >= 0) beginUndoGroup();
|
|
69005
69136
|
return;
|
|
69006
69137
|
}
|
|
69007
69138
|
}
|
|
69008
69139
|
set(selectedZoneId, null);
|
|
69009
|
-
if (!objectAboveZone)
|
|
69140
|
+
if (!objectAboveZone) {
|
|
69141
|
+
set(selectedFovSerial, null);
|
|
69142
|
+
set(fovSelectionOnly, false);
|
|
69143
|
+
}
|
|
69010
69144
|
}
|
|
69011
69145
|
if (tool === "select" && ((_$$get10 = get(currentFloor)) === null || _$$get10 === void 0 ? void 0 : _$$get10.guides)) {
|
|
69012
69146
|
const GUIDE_HIT = 6 / get(zoom);
|
|
@@ -69228,20 +69362,22 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69228
69362
|
}
|
|
69229
69363
|
}
|
|
69230
69364
|
}
|
|
69231
|
-
|
|
69232
|
-
|
|
69233
|
-
|
|
69234
|
-
|
|
69235
|
-
|
|
69236
|
-
|
|
69237
|
-
|
|
69238
|
-
|
|
69239
|
-
|
|
69240
|
-
|
|
69241
|
-
|
|
69242
|
-
|
|
69243
|
-
|
|
69244
|
-
|
|
69365
|
+
if (!get(fovSelectionOnly)) {
|
|
69366
|
+
const handle = findHandleAt$1(wp);
|
|
69367
|
+
if (handle && get(currentSelectedId) && get(currentFloor)) {
|
|
69368
|
+
const fi = get(currentFloor).furniture.find((f) => f.id === get(currentSelectedId));
|
|
69369
|
+
if (fi) {
|
|
69370
|
+
var _fi$scale$x, _fi$scale, _fi$scale$y, _fi$scale2;
|
|
69371
|
+
set(draggingHandle, handle, true);
|
|
69372
|
+
({ ...wp });
|
|
69373
|
+
handleOrigScale = {
|
|
69374
|
+
x: (_fi$scale$x = (_fi$scale = fi.scale) === null || _fi$scale === void 0 ? void 0 : _fi$scale.x) !== null && _fi$scale$x !== void 0 ? _fi$scale$x : 1,
|
|
69375
|
+
y: (_fi$scale$y = (_fi$scale2 = fi.scale) === null || _fi$scale2 === void 0 ? void 0 : _fi$scale2.y) !== null && _fi$scale$y !== void 0 ? _fi$scale$y : 1
|
|
69376
|
+
};
|
|
69377
|
+
fi.rotation;
|
|
69378
|
+
commitFurnitureMove();
|
|
69379
|
+
return;
|
|
69380
|
+
}
|
|
69245
69381
|
}
|
|
69246
69382
|
}
|
|
69247
69383
|
function selectElement(id, isShift, isCtrl = false) {
|
|
@@ -69308,6 +69444,7 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69308
69444
|
if (fi) {
|
|
69309
69445
|
var _fi$props4;
|
|
69310
69446
|
selectElement(fi.id, e.shiftKey, e.ctrlKey || e.metaKey);
|
|
69447
|
+
set(fovSelectionOnly, false);
|
|
69311
69448
|
if (fi.catalogId === "camera" && fi.serial && ((_fi$props4 = fi.props) === null || _fi$props4 === void 0 ? void 0 : _fi$props4.mapCoordinates)) {
|
|
69312
69449
|
set(selectedFovSerial, fi.serial, true);
|
|
69313
69450
|
set(selectedZoneId, null);
|
|
@@ -69369,6 +69506,7 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69369
69506
|
selectedElementId.set(null);
|
|
69370
69507
|
selectedElementIds.set(/* @__PURE__ */ new Set());
|
|
69371
69508
|
set(selectedFovSerial, null);
|
|
69509
|
+
set(fovSelectionOnly, false);
|
|
69372
69510
|
set(selectedZoneId, null);
|
|
69373
69511
|
}
|
|
69374
69512
|
selectedRoomId.set(null);
|
|
@@ -69489,6 +69627,22 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69489
69627
|
x: snap(get(mousePos).x),
|
|
69490
69628
|
y: snap(get(mousePos).y)
|
|
69491
69629
|
}, true);
|
|
69630
|
+
if (get(draggingFovVertex) != null && get(selectedFovSerial) && get(currentFloor)) {
|
|
69631
|
+
const bounds = getInteriorFloorBounds(get(currentFloor));
|
|
69632
|
+
const cam = get(currentFloor).furniture.find((f) => f.catalogId === "camera" && f.serial === get(selectedFovSerial));
|
|
69633
|
+
if (cam && bounds) {
|
|
69634
|
+
var _cam$props2;
|
|
69635
|
+
const pts = mapCoordinatesToWorldPoints((_cam$props2 = cam.props) === null || _cam$props2 === void 0 ? void 0 : _cam$props2.mapCoordinates, bounds);
|
|
69636
|
+
if (pts[get(draggingFovVertex)]) {
|
|
69637
|
+
const next = pts.map((p) => ({ ...p }));
|
|
69638
|
+
next[get(draggingFovVertex)] = {
|
|
69639
|
+
x: snap(get(mousePos).x),
|
|
69640
|
+
y: snap(get(mousePos).y)
|
|
69641
|
+
};
|
|
69642
|
+
setCameraMapCoordinatesFromWorld(get(selectedFovSerial), next);
|
|
69643
|
+
}
|
|
69644
|
+
}
|
|
69645
|
+
}
|
|
69492
69646
|
if (get(draggingZoneId) && ((_$$get12 = get(currentFloor)) === null || _$$get12 === void 0 ? void 0 : _$$get12.zones)) {
|
|
69493
69647
|
const z = get(currentFloor).zones.find((z) => z.id === get(draggingZoneId));
|
|
69494
69648
|
if (z) {
|
|
@@ -69815,6 +69969,10 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69815
69969
|
set(draggingZoneVertex, null);
|
|
69816
69970
|
set(zoneDragLast, null);
|
|
69817
69971
|
}
|
|
69972
|
+
if (get(draggingFovVertex) != null) {
|
|
69973
|
+
endUndoGroup();
|
|
69974
|
+
set(draggingFovVertex, null);
|
|
69975
|
+
}
|
|
69818
69976
|
if (get(draggingRoomLabelId)) {
|
|
69819
69977
|
const dx = get(mousePos).x - roomLabelDragStart.x;
|
|
69820
69978
|
const dy = get(mousePos).y - roomLabelDragStart.y;
|