floor-editor-ts 1.3.8 → 1.3.9

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.
@@ -5963,6 +5963,98 @@ if (typeof window !== "undefined") {
5963
5963
  var _window$__svelte, _window$__svelte$v, _window, _window$__svelte2;
5964
5964
  ((_window$__svelte$v = (_window$__svelte = (_window$__svelte2 = (_window = window).__svelte) !== null && _window$__svelte2 !== void 0 ? _window$__svelte2 : _window.__svelte = {}).v) !== null && _window$__svelte$v !== void 0 ? _window$__svelte$v : _window$__svelte.v = /* @__PURE__ */ new Set()).add("5");
5965
5965
  }
5966
+ //#endregion
5967
+ //#region src/lib/utils/zoneGeometry.ts
5968
+ var ZONE_COLOR_PALETTE = [
5969
+ "#F97316",
5970
+ "#22C55E",
5971
+ "#3B82F6",
5972
+ "#EF4444",
5973
+ "#A855F7",
5974
+ "#EAB308"
5975
+ ];
5976
+ var DEFAULT_ZONE_FILL_OPACITY = .1;
5977
+ function nextZoneColor(existingCount) {
5978
+ return ZONE_COLOR_PALETTE[existingCount % ZONE_COLOR_PALETTE.length];
5979
+ }
5980
+ function rectPoints(x1, y1, x2, y2) {
5981
+ const minX = Math.min(x1, x2);
5982
+ const maxX = Math.max(x1, x2);
5983
+ const minY = Math.min(y1, y2);
5984
+ const maxY = Math.max(y1, y2);
5985
+ return [
5986
+ {
5987
+ x: minX,
5988
+ y: minY
5989
+ },
5990
+ {
5991
+ x: maxX,
5992
+ y: minY
5993
+ },
5994
+ {
5995
+ x: maxX,
5996
+ y: maxY
5997
+ },
5998
+ {
5999
+ x: minX,
6000
+ y: maxY
6001
+ }
6002
+ ];
6003
+ }
6004
+ /** Isosceles triangle pointing up, centered at `c`. */
6005
+ function trianglePoints(c, size = 200) {
6006
+ const h = size * .866;
6007
+ return [
6008
+ {
6009
+ x: c.x,
6010
+ y: c.y - h / 2
6011
+ },
6012
+ {
6013
+ x: c.x + size / 2,
6014
+ y: c.y + h / 2
6015
+ },
6016
+ {
6017
+ x: c.x - size / 2,
6018
+ y: c.y + h / 2
6019
+ }
6020
+ ];
6021
+ }
6022
+ function zoneBounds(points) {
6023
+ if (!points.length) return null;
6024
+ let minX = points[0].x, minY = points[0].y, maxX = points[0].x, maxY = points[0].y;
6025
+ for (let i = 1; i < points.length; i++) {
6026
+ const p = points[i];
6027
+ if (p.x < minX) minX = p.x;
6028
+ if (p.y < minY) minY = p.y;
6029
+ if (p.x > maxX) maxX = p.x;
6030
+ if (p.y > maxY) maxY = p.y;
6031
+ }
6032
+ return {
6033
+ minX,
6034
+ minY,
6035
+ maxX,
6036
+ maxY
6037
+ };
6038
+ }
6039
+ function translatePoints(points, dx, dy) {
6040
+ return points.map((p) => ({
6041
+ x: p.x + dx,
6042
+ y: p.y + dy
6043
+ }));
6044
+ }
6045
+ /** Axis-aligned resize: keep opposite corner fixed when dragging corner index. */
6046
+ function resizeRectCorner(points, cornerIndex, to) {
6047
+ if (points.length !== 4) {
6048
+ const next = points.map((p) => ({ ...p }));
6049
+ if (next[cornerIndex]) next[cornerIndex] = { ...to };
6050
+ return next;
6051
+ }
6052
+ const fixed = points[(cornerIndex + 2) % 4];
6053
+ return rectPoints(fixed.x, fixed.y, to.x, to.y);
6054
+ }
6055
+ function isNearPoint(a, b, threshold) {
6056
+ return Math.hypot(a.x - b.x, a.y - b.y) <= threshold;
6057
+ }
5966
6058
  /** True while host → package assignedCameras sync is mutating furniture. */
5967
6059
  var assignedCamerasSyncing = false;
5968
6060
  function setAssignedCamerasSyncing(value) {
@@ -6076,6 +6168,7 @@ function createDefaultFloor(level = 0) {
6076
6168
  measurements: [],
6077
6169
  annotations: [],
6078
6170
  textAnnotations: [],
6171
+ zones: [],
6079
6172
  groups: []
6080
6173
  };
6081
6174
  }
@@ -6097,6 +6190,8 @@ var activeFloor = derived$1(currentProject, ($p) => {
6097
6190
  return (_ref = (_$p$floors$find = $p.floors.find((f) => f.id === $p.activeFloorId)) !== null && _$p$floors$find !== void 0 ? _$p$floors$find : $p.floors[0]) !== null && _ref !== void 0 ? _ref : null;
6098
6191
  });
6099
6192
  var selectedTool = writable("select");
6193
+ /** Subtype when selectedTool === 'zone' */
6194
+ var placingZoneShape = writable("rectangle");
6100
6195
  var snapEnabled = writable(true);
6101
6196
  /** When true, left-click drag pans the canvas instead of selecting */
6102
6197
  var panMode = writable(false);
@@ -6537,6 +6632,7 @@ function removeElement(id) {
6537
6632
  if (f.stairs) f.stairs = f.stairs.filter((s) => s.id !== id);
6538
6633
  if (f.columns) f.columns = f.columns.filter((c) => c.id !== id);
6539
6634
  if (f.textAnnotations) f.textAnnotations = f.textAnnotations.filter((t) => t.id !== id);
6635
+ if (f.zones) f.zones = f.zones.filter((z) => z.id !== id);
6540
6636
  }, "Deleted element");
6541
6637
  if ((removedCamera === null || removedCamera === void 0 ? void 0 : removedCamera.serial) && !isAssignedCamerasSyncing()) {
6542
6638
  const props = cameraItemToCallbackProps(removedCamera);
@@ -6639,6 +6735,7 @@ function addFloor(name, copyCurrentLayout = false) {
6639
6735
  measurements: [],
6640
6736
  annotations: [],
6641
6737
  textAnnotations: [],
6738
+ zones: [],
6642
6739
  groups: []
6643
6740
  };
6644
6741
  if (copyCurrentLayout) {
@@ -6947,6 +7044,55 @@ function moveTextAnnotation(id, position) {
6947
7044
  p.updatedAt = /* @__PURE__ */ new Date();
6948
7045
  currentProject.set({ ...p });
6949
7046
  }
7047
+ function addZone(shape, points, name, color) {
7048
+ const id = uid$1();
7049
+ mutate((f) => {
7050
+ if (!f.zones) f.zones = [];
7051
+ const count = f.zones.length;
7052
+ f.zones.push({
7053
+ id,
7054
+ name: (name === null || name === void 0 ? void 0 : name.trim()) || `Zone ${count + 1}`,
7055
+ shape,
7056
+ points: points.map((p) => ({
7057
+ x: p.x,
7058
+ y: p.y
7059
+ })),
7060
+ color: color || nextZoneColor(count),
7061
+ fillOpacity: .1
7062
+ });
7063
+ }, "Added zone");
7064
+ return id;
7065
+ }
7066
+ function updateZone(id, updates) {
7067
+ mutate((f) => {
7068
+ if (!f.zones) return;
7069
+ const z = f.zones.find((z) => z.id === id);
7070
+ if (!z) return;
7071
+ if (updates.name != null) z.name = updates.name;
7072
+ if (updates.color != null) z.color = updates.color;
7073
+ if (updates.fillOpacity != null) z.fillOpacity = updates.fillOpacity;
7074
+ if (updates.shape != null) z.shape = updates.shape;
7075
+ if (updates.points) z.points = updates.points.map((p) => ({
7076
+ x: p.x,
7077
+ y: p.y
7078
+ }));
7079
+ }, "Updated zone");
7080
+ }
7081
+ /** Live drag without undo snapshot (commit with updateZone / endUndoGroup). */
7082
+ function moveZonePoints(id, points) {
7083
+ const p = get$1(currentProject);
7084
+ if (!p) return;
7085
+ const floor = p.floors.find((f) => f.id === p.activeFloorId);
7086
+ if (!(floor === null || floor === void 0 ? void 0 : floor.zones)) return;
7087
+ const z = floor.zones.find((z) => z.id === id);
7088
+ if (!z) return;
7089
+ z.points = points.map((pt) => ({
7090
+ x: pt.x,
7091
+ y: pt.y
7092
+ }));
7093
+ p.updatedAt = /* @__PURE__ */ new Date();
7094
+ currentProject.set({ ...p });
7095
+ }
6950
7096
  var layerVisibility = writable({
6951
7097
  walls: true,
6952
7098
  doors: true,
@@ -6956,7 +7102,8 @@ var layerVisibility = writable({
6956
7102
  columns: true,
6957
7103
  guides: true,
6958
7104
  measurements: true,
6959
- annotations: true
7105
+ annotations: true,
7106
+ zones: true
6960
7107
  });
6961
7108
  function toggleFurnitureLock(id) {
6962
7109
  mutate((f) => {
@@ -56376,9 +56523,9 @@ var themePreference = createThemeStore();
56376
56523
  //#endregion
56377
56524
  //#region src/lib/components/toolbar/SettingsDialog.svelte
56378
56525
  init_client();
56379
- 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>`);
56380
- 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>`);
56381
- var root_4$11 = /* @__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>`);
56526
+ var root_2$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>`);
56527
+ var root_3$11 = /* @__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>`);
56528
+ 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>`);
56382
56529
  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>`);
56383
56530
  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>`);
56384
56531
  var root_7$6 = /* @__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
@@ -56387,11 +56534,11 @@ var root_7$6 = /* @__PURE__ */ from_html(`<div class="flex items-center justify-
56387
56534
  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">Extension Lines</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
56388
56535
  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">Object Distance</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
56389
56536
  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> <div class="flex items-center justify-between px-4 py-3.5"><span class="text-sm text-gray-700">Line Color</span> <div class="flex items-center gap-2"><button style="background-color: #ffffff" aria-label="White line color"></button> <span class="text-gray-300">|</span> <button style="background-color: #1e293b" aria-label="Dark line color"></button></div></div></div>`, 1);
56390
- var root_9$3 = /* @__PURE__ */ from_html(`<button><span class="text-2xl"> </span> <span class="text-xs font-medium text-gray-700 dark:text-gray-300"> </span></button>`);
56391
- var root_8$3 = /* @__PURE__ */ from_html(`<div class="space-y-4"><div><span class="text-sm font-medium text-gray-700 dark:text-gray-300 block mb-3">Theme</span> <div class="flex gap-3"></div></div></div>`);
56537
+ var root_9$4 = /* @__PURE__ */ from_html(`<button><span class="text-2xl"> </span> <span class="text-xs font-medium text-gray-700 dark:text-gray-300"> </span></button>`);
56538
+ var root_8$4 = /* @__PURE__ */ from_html(`<div class="space-y-4"><div><span class="text-sm font-medium text-gray-700 dark:text-gray-300 block mb-3">Theme</span> <div class="flex gap-3"></div></div></div>`);
56392
56539
  var root_11$3 = /* @__PURE__ */ from_html(`<button class="px-4 py-2 text-sm font-medium text-red-600 dark:text-red-400 border border-red-300 dark:border-red-600 rounded-lg hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors">Remove</button>`);
56393
56540
  var root_12$3 = /* @__PURE__ */ from_html(`<button class="px-4 py-2 text-sm font-medium text-red-600 dark:text-red-400 border border-red-300 dark:border-red-600 rounded-lg hover:bg-red-50 dark:hover:bg-red-900/20 transition-colors">Remove</button>`);
56394
- var root_10$3 = /* @__PURE__ */ from_html(`<div class="space-y-4"><div><span class="text-sm font-medium text-gray-700 dark:text-gray-300 block mb-1">Gemini API Key</span> <p class="text-xs text-gray-500 dark:text-gray-400 mb-3">Required for AI-powered photorealistic rendering. Your key is stored locally in your browser only - never sent to our servers.</p> <div class="flex gap-2"><div class="relative flex-1"><input class="w-full px-3 py-2 pr-10 border border-gray-300 dark:border-gray-600 rounded-lg text-sm font-mono focus:ring-2 focus:ring-slate-500 focus:border-slate-500 outline-none bg-white dark:bg-gray-700 dark:text-gray-100" placeholder="AIza..."/> <button class="absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 text-sm"> </button></div></div> <div class="flex gap-2 mt-3"><button class="px-4 py-2 text-sm font-medium bg-slate-700 text-white rounded-lg hover:bg-slate-600 transition-colors"> </button> <!></div></div> <div class="border-t border-gray-200 dark:border-gray-700 pt-4"><span class="text-sm font-medium text-gray-700 dark:text-gray-300 block mb-2">How to get a Gemini key</span> <ol class="text-xs text-gray-500 dark:text-gray-400 space-y-1 list-decimal list-inside"><li>Go to <a href="https://aistudio.google.com/apikey" target="_blank" rel="noopener" class="text-blue-500 hover:underline">Google AI Studio</a></li> <li>Click "Create API Key"</li> <li>Copy and paste it above</li></ol></div> <div class="border-t border-gray-200 dark:border-gray-700 pt-4"><span class="text-sm font-medium text-gray-700 dark:text-gray-300 block mb-1">OpenAI API Key</span> <p class="text-xs text-gray-500 dark:text-gray-400 mb-3">Optional — enables OpenAI image generation as an alternative to Gemini. Stored locally only.</p> <div class="flex gap-2"><div class="relative flex-1"><input class="w-full px-3 py-2 pr-10 border border-gray-300 dark:border-gray-600 rounded-lg text-sm font-mono focus:ring-2 focus:ring-slate-500 focus:border-slate-500 outline-none bg-white dark:bg-gray-700 dark:text-gray-100" placeholder="sk-..."/> <button class="absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 text-sm"> </button></div></div> <div class="flex gap-2 mt-3"><button class="px-4 py-2 text-sm font-medium bg-slate-700 text-white rounded-lg hover:bg-slate-600 transition-colors"> </button> <!></div> <div class="mt-3"><span class="text-sm font-medium text-gray-700 dark:text-gray-300 block mb-2">How to get an OpenAI key</span> <ol class="text-xs text-gray-500 dark:text-gray-400 space-y-1 list-decimal list-inside"><li>Go to <a href="https://platform.openai.com/api-keys" target="_blank" rel="noopener" class="text-blue-500 hover:underline">OpenAI Platform</a></li> <li>Click "Create new secret key"</li> <li>Copy and paste it above</li></ol></div></div></div>`);
56541
+ var root_10$4 = /* @__PURE__ */ from_html(`<div class="space-y-4"><div><span class="text-sm font-medium text-gray-700 dark:text-gray-300 block mb-1">Gemini API Key</span> <p class="text-xs text-gray-500 dark:text-gray-400 mb-3">Required for AI-powered photorealistic rendering. Your key is stored locally in your browser only - never sent to our servers.</p> <div class="flex gap-2"><div class="relative flex-1"><input class="w-full px-3 py-2 pr-10 border border-gray-300 dark:border-gray-600 rounded-lg text-sm font-mono focus:ring-2 focus:ring-slate-500 focus:border-slate-500 outline-none bg-white dark:bg-gray-700 dark:text-gray-100" placeholder="AIza..."/> <button class="absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 text-sm"> </button></div></div> <div class="flex gap-2 mt-3"><button class="px-4 py-2 text-sm font-medium bg-slate-700 text-white rounded-lg hover:bg-slate-600 transition-colors"> </button> <!></div></div> <div class="border-t border-gray-200 dark:border-gray-700 pt-4"><span class="text-sm font-medium text-gray-700 dark:text-gray-300 block mb-2">How to get a Gemini key</span> <ol class="text-xs text-gray-500 dark:text-gray-400 space-y-1 list-decimal list-inside"><li>Go to <a href="https://aistudio.google.com/apikey" target="_blank" rel="noopener" class="text-blue-500 hover:underline">Google AI Studio</a></li> <li>Click "Create API Key"</li> <li>Copy and paste it above</li></ol></div> <div class="border-t border-gray-200 dark:border-gray-700 pt-4"><span class="text-sm font-medium text-gray-700 dark:text-gray-300 block mb-1">OpenAI API Key</span> <p class="text-xs text-gray-500 dark:text-gray-400 mb-3">Optional — enables OpenAI image generation as an alternative to Gemini. Stored locally only.</p> <div class="flex gap-2"><div class="relative flex-1"><input class="w-full px-3 py-2 pr-10 border border-gray-300 dark:border-gray-600 rounded-lg text-sm font-mono focus:ring-2 focus:ring-slate-500 focus:border-slate-500 outline-none bg-white dark:bg-gray-700 dark:text-gray-100" placeholder="sk-..."/> <button class="absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 text-sm"> </button></div></div> <div class="flex gap-2 mt-3"><button class="px-4 py-2 text-sm font-medium bg-slate-700 text-white rounded-lg hover:bg-slate-600 transition-colors"> </button> <!></div> <div class="mt-3"><span class="text-sm font-medium text-gray-700 dark:text-gray-300 block mb-2">How to get an OpenAI key</span> <ol class="text-xs text-gray-500 dark:text-gray-400 space-y-1 list-decimal list-inside"><li>Go to <a href="https://platform.openai.com/api-keys" target="_blank" rel="noopener" class="text-blue-500 hover:underline">OpenAI Platform</a></li> <li>Click "Create new secret key"</li> <li>Copy and paste it above</li></ol></div></div></div>`);
56395
56542
  var root_1$13 = /* @__PURE__ */ from_html(`<div class="fixed inset-0 bg-black/50 z-50 flex items-center justify-center" role="dialog" tabindex="-1" aria-label="Settings"><div class="bg-white dark:bg-gray-800 rounded-xl shadow-2xl w-[420px] max-h-[80vh] flex flex-col" role="document"><div class="flex items-center justify-between px-5 pt-4 pb-2"><h2 class="text-lg font-bold text-gray-800 dark:text-gray-100">Settings</h2> <button class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 text-xl leading-none" aria-label="Close settings">✕</button></div> <div class="flex border-b border-gray-200 dark:border-gray-700 px-5"><button>Project <!></button> <button>Dimensions <!></button> <button>Appearance <!></button> <button>AI <!></button></div> <div class="p-5 overflow-y-auto"><!></div></div></div>`);
56396
56543
  function SettingsDialog($$anchor, $$props) {
56397
56544
  push($$props, true);
@@ -56504,7 +56651,7 @@ function SettingsDialog($$anchor, $$props) {
56504
56651
  var button_1 = child(div_3);
56505
56652
  var node_1 = sibling(child(button_1));
56506
56653
  var consequent = ($$anchor) => {
56507
- append($$anchor, root_2$13());
56654
+ append($$anchor, root_2$12());
56508
56655
  };
56509
56656
  if_block(node_1, ($$render) => {
56510
56657
  if (get(activeTab) === "project") $$render(consequent);
@@ -56513,7 +56660,7 @@ function SettingsDialog($$anchor, $$props) {
56513
56660
  var button_2 = sibling(button_1, 2);
56514
56661
  var node_2 = sibling(child(button_2));
56515
56662
  var consequent_1 = ($$anchor) => {
56516
- append($$anchor, root_3$12());
56663
+ append($$anchor, root_3$11());
56517
56664
  };
56518
56665
  if_block(node_2, ($$render) => {
56519
56666
  if (get(activeTab) === "dimensions") $$render(consequent_1);
@@ -56522,7 +56669,7 @@ function SettingsDialog($$anchor, $$props) {
56522
56669
  var button_3 = sibling(button_2, 2);
56523
56670
  var node_3 = sibling(child(button_3));
56524
56671
  var consequent_2 = ($$anchor) => {
56525
- append($$anchor, root_4$11());
56672
+ append($$anchor, root_4$10());
56526
56673
  };
56527
56674
  if_block(node_3, ($$render) => {
56528
56675
  if (get(activeTab) === "appearance") $$render(consequent_2);
@@ -56618,7 +56765,7 @@ function SettingsDialog($$anchor, $$props) {
56618
56765
  append($$anchor, fragment_1);
56619
56766
  };
56620
56767
  var consequent_6 = ($$anchor) => {
56621
- var div_15 = root_8$3();
56768
+ var div_15 = root_8$4();
56622
56769
  var div_16 = child(div_15);
56623
56770
  var div_17 = sibling(child(div_16), 2);
56624
56771
  each(div_17, 20, () => [
@@ -56642,7 +56789,7 @@ function SettingsDialog($$anchor, $$props) {
56642
56789
  let value = () => get($$array)[0];
56643
56790
  let icon = () => get($$array)[1];
56644
56791
  let label = () => get($$array)[2];
56645
- var button_9 = root_9$3();
56792
+ var button_9 = root_9$4();
56646
56793
  var span = child(button_9);
56647
56794
  var text = child(span, true);
56648
56795
  reset(span);
@@ -56664,7 +56811,7 @@ function SettingsDialog($$anchor, $$props) {
56664
56811
  append($$anchor, div_15);
56665
56812
  };
56666
56813
  var consequent_9 = ($$anchor) => {
56667
- var div_18 = root_10$3();
56814
+ var div_18 = root_10$4();
56668
56815
  var div_19 = child(div_18);
56669
56816
  var div_20 = sibling(child(div_19), 4);
56670
56817
  var div_21 = child(div_20);
@@ -56784,10 +56931,10 @@ delegate([
56784
56931
  //#endregion
56785
56932
  //#region src/lib/components/sidebar/AreaSummaryPanel.svelte
56786
56933
  init_client();
56787
- 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>`);
56934
+ var root_2$11 = /* @__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>`);
56788
56935
  var root_1$12 = /* @__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>`);
56789
- var root_4$10 = /* @__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>`);
56790
- 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>`);
56936
+ 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>`);
56937
+ var root_3$10 = /* @__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>`);
56791
56938
  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>`);
56792
56939
  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>`);
56793
56940
  function AreaSummaryPanel($$anchor, $$props) {
@@ -56905,7 +57052,7 @@ function AreaSummaryPanel($$anchor, $$props) {
56905
57052
  var div_10 = root_1$12();
56906
57053
  var div_11 = sibling(child(div_10), 2);
56907
57054
  each(div_11, 21, () => get(categoryTotals), index$1, ($$anchor, cat) => {
56908
- var div_12 = root_2$12();
57055
+ var div_12 = root_2$11();
56909
57056
  var span = child(div_12);
56910
57057
  var text_4 = child(span);
56911
57058
  var span_1 = sibling(text_4);
@@ -56933,11 +57080,11 @@ function AreaSummaryPanel($$anchor, $$props) {
56933
57080
  });
56934
57081
  var node_1 = sibling(node, 2);
56935
57082
  var consequent_1 = ($$anchor) => {
56936
- var div_13 = root_3$11();
57083
+ var div_13 = root_3$10();
56937
57084
  var div_14 = sibling(child(div_13), 2);
56938
57085
  each(div_14, 21, () => get(allRooms), index$1, ($$anchor, room) => {
56939
57086
  const pct = /* @__PURE__ */ user_derived(() => get(totalArea) > 0 ? get(room).area / get(totalArea) * 100 : 0);
56940
- var div_15 = root_4$10();
57087
+ var div_15 = root_4$9();
56941
57088
  var div_16 = child(div_15);
56942
57089
  var div_17 = child(div_16);
56943
57090
  var span_3 = child(div_17);
@@ -57133,9 +57280,9 @@ async function autoSave(onDispatch) {
57133
57280
  //#endregion
57134
57281
  //#region src/lib/components/toolbar/VersionHistoryPanel.svelte
57135
57282
  init_client();
57136
- 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>`);
57137
- var root_4$9 = /* @__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>`);
57138
- var root_3$10 = /* @__PURE__ */ from_html(`<div class="space-y-1"></div>`);
57283
+ var root_2$10 = /* @__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>`);
57284
+ 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>`);
57285
+ var root_3$9 = /* @__PURE__ */ from_html(`<div class="space-y-1"></div>`);
57139
57286
  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>`);
57140
57287
  var root_1$11 = /* @__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>`);
57141
57288
  function VersionHistoryPanel($$anchor, $$props) {
@@ -57183,13 +57330,13 @@ function VersionHistoryPanel($$anchor, $$props) {
57183
57330
  var div_3 = sibling(div_2, 2);
57184
57331
  var node_1 = child(div_3);
57185
57332
  var consequent = ($$anchor) => {
57186
- append($$anchor, root_2$11());
57333
+ append($$anchor, root_2$10());
57187
57334
  };
57188
57335
  var alternate = ($$anchor) => {
57189
- var div_4 = root_3$10();
57336
+ var div_4 = root_3$9();
57190
57337
  each(div_4, 21, () => [...get(snapshots)].reverse(), index$1, ($$anchor, snap, i) => {
57191
57338
  const realIndex = /* @__PURE__ */ user_derived(() => get(snapshots).length - 1 - i);
57192
- var div_5 = root_4$9();
57339
+ var div_5 = root_4$8();
57193
57340
  var div_6 = child(div_5);
57194
57341
  var div_7 = child(div_6);
57195
57342
  var text = child(div_7, true);
@@ -57249,21 +57396,21 @@ delegate(["click", "keydown"]);
57249
57396
  init_client();
57250
57397
  init_index_client();
57251
57398
  init_onboarding_svelte();
57252
- var root_2$10 = /* @__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"/>`);
57253
- var root_3$9 = /* @__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>`);
57254
- var root_4$8 = /* @__PURE__ */ from_html(`<button> </button>`);
57399
+ var root_2$9 = /* @__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"/>`);
57400
+ var root_3$8 = /* @__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>`);
57401
+ var root_4$7 = /* @__PURE__ */ from_html(`<button> </button>`);
57255
57402
  var root_5$5 = /* @__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>`);
57256
57403
  var root_6$4 = /* @__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>`);
57257
57404
  var root_7$5 = /* @__PURE__ */ from_html(`<button aria-label="Toggle Furniture"><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="2" y="12" width="20" height="8" rx="1"></rect><path d="M4 12V7a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v5"></path><line x1="12" y1="12" x2="12" y2="20"></line></svg></button>`);
57258
- var root_8$2 = /* @__PURE__ */ from_html(`<div class="flex items-center gap-1 bg-white/15 rounded-full p-0.5 shrink-0"><button class="w-7 h-7 flex items-center justify-center text-white/80 hover:text-white hover:bg-white/10 rounded-full transition-colors text-sm font-bold" title="Zoom Out (−)" aria-label="Zoom Out">−</button> <button class="px-2 py-1 text-xs font-medium text-white/80 hover:text-white hover:bg-white/10 rounded-full transition-colors min-w-[3rem] text-center" title="Reset Zoom (100%)"> </button> <button class="w-7 h-7 flex items-center justify-center text-white/80 hover:text-white hover:bg-white/10 rounded-full transition-colors text-sm font-bold" title="Zoom In (+)" aria-label="Zoom In">+</button></div>`);
57259
- var root_10$2 = /* @__PURE__ */ from_html(`<div class="absolute right-0 top-full mt-1 bg-white rounded-lg shadow-lg border border-gray-200 py-1 w-56 z-50" role="menu"><button type="button" role="menuitemcheckbox" class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center justify-between gap-2"><span>Snap to grid</span> <span> </span></button> <button type="button" role="menuitemcheckbox" class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center justify-between gap-2"><span>Show furniture</span> <span> </span></button> <div class="h-px bg-gray-100 my-1"></div> <button type="button" role="menuitem" class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left">Version history</button> <button type="button" role="menuitem" class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left">Area summary</button> <div class="h-px bg-gray-100 my-1"></div> <button type="button" role="menuitem" class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left">Settings…</button></div>`);
57260
- var root_9$2 = /* @__PURE__ */ from_html(`<div class="relative shrink-0"><button title="Settings &amp; tools" aria-label="Settings &amp; tools"><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="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg></button> <!></div>`);
57405
+ var root_8$3 = /* @__PURE__ */ from_html(`<div class="flex items-center gap-1 bg-white/15 rounded-full p-0.5 shrink-0"><button class="w-7 h-7 flex items-center justify-center text-white/80 hover:text-white hover:bg-white/10 rounded-full transition-colors text-sm font-bold" title="Zoom Out (−)" aria-label="Zoom Out">−</button> <button class="px-2 py-1 text-xs font-medium text-white/80 hover:text-white hover:bg-white/10 rounded-full transition-colors min-w-[3rem] text-center" title="Reset Zoom (100%)"> </button> <button class="w-7 h-7 flex items-center justify-center text-white/80 hover:text-white hover:bg-white/10 rounded-full transition-colors text-sm font-bold" title="Zoom In (+)" aria-label="Zoom In">+</button></div>`);
57406
+ var root_10$3 = /* @__PURE__ */ from_html(`<div class="absolute right-0 top-full mt-1 bg-white rounded-lg shadow-lg border border-gray-200 py-1 w-56 z-50" role="menu"><button type="button" role="menuitemcheckbox" class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center justify-between gap-2"><span>Snap to grid</span> <span> </span></button> <button type="button" role="menuitemcheckbox" class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center justify-between gap-2"><span>Show furniture</span> <span> </span></button> <div class="h-px bg-gray-100 my-1"></div> <button type="button" role="menuitem" class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left">Version history</button> <button type="button" role="menuitem" class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left">Area summary</button> <div class="h-px bg-gray-100 my-1"></div> <button type="button" role="menuitem" class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left">Settings…</button></div>`);
57407
+ var root_9$3 = /* @__PURE__ */ from_html(`<div class="relative shrink-0"><button title="Settings &amp; tools" aria-label="Settings &amp; tools"><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="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg></button> <!></div>`);
57261
57408
  var root_11$2 = /* @__PURE__ */ from_html(`<button class="p-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Version History" aria-label="Version History"><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></button> <button class="px-2 py-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Area Summary" aria-label="Area Summary"><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="18" height="18" rx="2"></rect><path d="M3 9h18"></path><path d="M9 3v18"></path></svg></button> <button class="px-2 py-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Settings" aria-label="Settings"><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="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg></button>`, 1);
57262
57409
  var root_13$2 = /* @__PURE__ */ from_html(`<button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg> Import JSON</button>`);
57263
57410
  var root_12$2 = /* @__PURE__ */ from_html(`<div class="absolute right-0 top-full mt-1 bg-white rounded-lg shadow-lg border border-gray-200 py-1 w-48 z-50"><button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect></svg> Print Layout</button> <div class="h-px bg-gray-100 my-1"></div> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><path d="M21 15l-5-5L5 21"></path></svg> Export 2D as PNG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2L2 7l10 5 10-5-10-5z"></path><path d="M2 17l10 5 10-5"></path><path d="M2 12l10 5 10-5"></path></svg> Export 3D as PNG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 19V5"></path><path d="M5 12l7-7 7 7"></path></svg> Export as SVG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path><path d="M8 16h2"></path><path d="M14 16h2"></path></svg> Export as DXF</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path><path d="M9 16h6"></path></svg> Export as DWG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path><path d="M16 11v6"></path><path d="M8 11v6"></path><path d="M12 11v6"></path></svg> Export as PDF</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path></svg> Download JSON</button> <div class="h-px bg-gray-100 my-1"></div> <!> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg> New Project</button></div>`);
57264
57411
  var root_1$10 = /* @__PURE__ */ from_html(`<div class="h-12 bg-gradient-to-r from-slate-800 to-slate-700 flex items-center px-4 gap-3 shrink-0 shadow-sm overflow-hidden"><button type="button"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="3" width="18" height="18" rx="2.5"></rect><path d="M9 3v18"></path></svg></button> <!> <div class="h-5 w-px bg-white/20"></div> <div class="flex items-center gap-1"><!> <button class="text-white/80 hover:text-white text-xs hover:bg-white/10 px-1.5 py-0.5 rounded transition-colors" title="Add Floor" aria-label="Add Floor">+</button> <span class="text-white/40 text-[10px] ml-1"> </span></div> <div class="flex-1"></div> <button class="p-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Undo (Ctrl+Z)" aria-label="Undo"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><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></button> <button class="p-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Redo (Ctrl+Y)" aria-label="Redo"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.13-9.36L23 10"></path></svg></button> <div class="h-5 w-px bg-white/20"></div> <!> <!> <!> <div class="h-5 w-px bg-white/20"></div> <!> <!> <div class="h-5 w-px bg-white/20 shrink-0"></div> <div class="relative"><button class="px-3 py-1.5 text-sm text-white/90 hover:text-white hover:bg-white/10 rounded transition-colors flex items-center gap-1.5"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg> Export</button> <!></div> <span><!></span> <button class="px-3 py-1.5 text-sm bg-white text-slate-800 font-semibold rounded-lg hover:bg-blue-50 transition-colors shadow-sm">Save</button></div>`);
57265
57412
  var root_18$3 = /* @__PURE__ */ from_html(`<div class="absolute right-0 top-full mt-1 bg-white rounded-lg shadow-lg border border-gray-200 py-1 w-48 z-50"><button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect></svg> Print Layout</button> <div class="h-px bg-gray-100 my-1"></div> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><path d="M21 15l-5-5L5 21"></path></svg> Export 2D as PNG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2L2 7l10 5 10-5-10-5z"></path><path d="M2 17l10 5 10-5"></path><path d="M2 12l10 5 10-5"></path></svg> Export 3D as PNG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 19V5"></path><path d="M5 12l7-7 7 7"></path></svg> Export as SVG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path><path d="M8 16h2"></path><path d="M14 16h2"></path></svg> Export as DXF</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path><path d="M9 16h6"></path></svg> Export as DWG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path><path d="M16 11v6"></path><path d="M8 11v6"></path><path d="M12 11v6"></path></svg> Export as PDF</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path></svg> Download JSON</button> <div class="h-px bg-gray-100 my-1"></div> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg> Import JSON</button></div>`);
57266
- var root_17$3 = /* @__PURE__ */ from_html(`<div class="h-12 bg-gradient-to-r from-slate-800 to-slate-700 flex items-center justify-between px-4 gap-3 shrink-0 shadow-sm"><span class="font-semibold text-white text-sm px-2 py-0.5 rounded transition-colors"> </span> <div class="relative"><button class="px-3 py-1.5 text-sm text-white/90 hover:text-white hover:bg-white/10 rounded transition-colors flex items-center gap-1.5"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg> Import</button> <!></div></div>`);
57413
+ var root_17$2 = /* @__PURE__ */ from_html(`<div class="h-12 bg-gradient-to-r from-slate-800 to-slate-700 flex items-center justify-between px-4 gap-3 shrink-0 shadow-sm"><span class="font-semibold text-white text-sm px-2 py-0.5 rounded transition-colors"> </span> <div class="relative"><button class="px-3 py-1.5 text-sm text-white/90 hover:text-white hover:bg-white/10 rounded transition-colors flex items-center gap-1.5"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg> Import</button> <!></div></div>`);
57267
57414
  var root_19$3 = /* @__PURE__ */ from_html(`<div class="fixed inset-0 z-50 flex items-center justify-center bg-black/40"><div class="bg-white rounded-xl shadow-2xl w-[420px] max-h-[80vh] overflow-hidden"><div class="flex items-center justify-between px-5 py-3 border-b border-gray-200"><h2 class="text-base font-semibold text-gray-800">📐 Area Summary</h2> <button class="text-gray-400 hover:text-gray-600 text-xl leading-none">&times;</button></div> <div class="overflow-y-auto max-h-[calc(80vh-52px)] p-1"><!></div></div></div>`);
57268
57415
  var root$5 = /* @__PURE__ */ from_html(`<!> <!> <!> <!>`, 1);
57269
57416
  function TopBar($$anchor, $$props) {
@@ -57318,6 +57465,7 @@ function TopBar($$anchor, $$props) {
57318
57465
  }
57319
57466
  async function save() {
57320
57467
  const p = get$1(currentProject);
57468
+ console.log("🚀 ~ save ~ p:", p);
57321
57469
  if (!p) return;
57322
57470
  const thumbnail = captureThumbnail(p.id);
57323
57471
  $$props.onDispatch("floor:callbackEvent", {
@@ -57500,7 +57648,7 @@ function TopBar($$anchor, $$props) {
57500
57648
  var button = child(div);
57501
57649
  var node_1 = sibling(button, 2);
57502
57650
  var consequent = ($$anchor) => {
57503
- var input_1 = root_2$10();
57651
+ var input_1 = root_2$9();
57504
57652
  remove_input_defaults(input_1);
57505
57653
  event("blur", input_1, onNameBlur);
57506
57654
  delegated("keydown", input_1, onNameKeydown);
@@ -57508,7 +57656,7 @@ function TopBar($$anchor, $$props) {
57508
57656
  append($$anchor, input_1);
57509
57657
  };
57510
57658
  var alternate = ($$anchor) => {
57511
- var button_1 = root_3$9();
57659
+ var button_1 = root_3$8();
57512
57660
  var text_1 = child(button_1, true);
57513
57661
  reset(button_1);
57514
57662
  template_effect(() => set_text(text_1, get(projectName)));
@@ -57522,7 +57670,7 @@ function TopBar($$anchor, $$props) {
57522
57670
  var div_1 = sibling(node_1, 4);
57523
57671
  var node_2 = child(div_1);
57524
57672
  each(node_2, 17, () => get(floors), index$1, ($$anchor, fl) => {
57525
- var button_2 = root_4$8();
57673
+ var button_2 = root_4$7();
57526
57674
  var text_2 = child(button_2, true);
57527
57675
  reset(button_2);
57528
57676
  template_effect(() => {
@@ -57586,7 +57734,7 @@ function TopBar($$anchor, $$props) {
57586
57734
  });
57587
57735
  var node_6 = sibling(node_5, 4);
57588
57736
  var consequent_4 = ($$anchor) => {
57589
- var div_3 = root_8$2();
57737
+ var div_3 = root_8$3();
57590
57738
  var button_10 = child(div_3);
57591
57739
  var button_11 = sibling(button_10, 2);
57592
57740
  var text_4 = child(button_11);
@@ -57604,11 +57752,11 @@ function TopBar($$anchor, $$props) {
57604
57752
  });
57605
57753
  var node_7 = sibling(node_6, 2);
57606
57754
  var consequent_6 = ($$anchor) => {
57607
- var div_4 = root_9$2();
57755
+ var div_4 = root_9$3();
57608
57756
  var button_13 = child(div_4);
57609
57757
  var node_8 = sibling(button_13, 2);
57610
57758
  var consequent_5 = ($$anchor) => {
57611
- var div_5 = root_10$2();
57759
+ var div_5 = root_10$3();
57612
57760
  var button_14 = child(div_5);
57613
57761
  var span_1 = sibling(child(button_14), 2);
57614
57762
  var text_5 = child(span_1, true);
@@ -57765,7 +57913,7 @@ function TopBar($$anchor, $$props) {
57765
57913
  append($$anchor, div);
57766
57914
  };
57767
57915
  var alternate_3 = ($$anchor) => {
57768
- var div_8 = root_17$3();
57916
+ var div_8 = root_17$2();
57769
57917
  var span_4 = child(div_8);
57770
57918
  var text_10 = child(span_4, true);
57771
57919
  reset(span_4);
@@ -58399,9 +58547,9 @@ function placeRoomTemplate(preset, origin, template, w = 400, h = 300) {
58399
58547
  //#endregion
58400
58548
  //#region src/lib/components/editor/UndoHistoryPanel.svelte
58401
58549
  init_client();
58402
- var root_2$9 = /* @__PURE__ */ from_html(`<div class="px-3 py-6 text-center text-xs text-gray-400">No history yet</div>`);
58403
- var root_4$7 = /* @__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>`);
58404
- 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>`);
58550
+ var root_2$8 = /* @__PURE__ */ from_html(`<div class="px-3 py-6 text-center text-xs text-gray-400">No history yet</div>`);
58551
+ 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>`);
58552
+ var root_3$7 = /* @__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>`);
58405
58553
  var root_1$9 = /* @__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>`);
58406
58554
  function UndoHistoryPanel($$anchor, $$props) {
58407
58555
  push($$props, true);
@@ -58438,13 +58586,13 @@ function UndoHistoryPanel($$anchor, $$props) {
58438
58586
  var div_3 = sibling(div_1, 2);
58439
58587
  var node_1 = child(div_3);
58440
58588
  var consequent = ($$anchor) => {
58441
- append($$anchor, root_2$9());
58589
+ append($$anchor, root_2$8());
58442
58590
  };
58443
58591
  var alternate = ($$anchor) => {
58444
- var div_5 = root_3$8();
58592
+ var div_5 = root_3$7();
58445
58593
  var node_2 = child(div_5);
58446
58594
  each(node_2, 17, () => get(history).entries, index$1, ($$anchor, entry, i) => {
58447
- var button_1 = root_4$7();
58595
+ var button_1 = root_4$6();
58448
58596
  let classes;
58449
58597
  var span_1 = child(button_1);
58450
58598
  span_1.textContent = i + 1;
@@ -58502,24 +58650,24 @@ delegate(["click"]);
58502
58650
  //#region src/lib/components/sidebar/BuildPanel.svelte
58503
58651
  init_client();
58504
58652
  init_index_client();
58505
- var root_3$7 = /* @__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>`);
58506
- var root_4$6 = /* @__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>`);
58507
- var root_2$8 = /* @__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);
58508
- var root_1$8 = /* @__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">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>`);
58509
- var root_6$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>`);
58510
- var root_7$4 = /* @__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>`);
58511
- var root_5$4 = /* @__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>`);
58512
- var root_16$1 = /* @__PURE__ */ from_html(`<button class="absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 w-5 h-5 flex items-center justify-center rounded-full hover:bg-gray-100" title="Clear search"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button>`);
58513
- var root_17$2 = /* @__PURE__ */ from_html(`<div class="text-[10px] text-gray-400 px-1"> </div>`);
58514
- var root_18$2 = /* @__PURE__ */ from_html(`<button> </button>`);
58515
- var root_20$2 = /* @__PURE__ */ from_html(`<button draggable="true"><span role="button" tabindex="0"> </span> <div class="w-8 h-8 rounded-lg flex items-center justify-center"><div class="w-4 h-4 rounded-sm"></div></div> <span class="text-[10px] font-medium text-gray-600 leading-tight text-center"> </span></button>`);
58516
- var root_19$2 = /* @__PURE__ */ from_html(`<div class="mt-1"><h4 class="text-[10px] font-semibold text-gray-400 uppercase mb-1.5">Recent</h4> <div class="grid grid-cols-2 gap-2"></div></div> <hr class="border-gray-100"/>`, 1);
58517
- var root_22$2 = /* @__PURE__ */ from_html(`<span class="text-xs font-medium text-gray-600"> <mark class="bg-yellow-200 text-gray-800 rounded-sm px-0.5"> </mark> </span>`);
58518
- var root_23$2 = /* @__PURE__ */ from_html(`<span class="text-xs font-medium text-gray-600"> </span>`);
58519
- var root_21$1 = /* @__PURE__ */ from_html(`<button draggable="true"><span role="button" tabindex="0"> </span> <div class="w-10 h-10 rounded-lg flex items-center justify-center"><div class="w-5 h-5 rounded-sm"></div></div> <!> <span class="text-[10px] text-gray-400"> </span></button>`);
58520
- var root_15$2 = /* @__PURE__ */ from_html(`<div class="space-y-2"><div class="relative"><input type="text" placeholder="Search furniture..." class="w-full px-3 py-2 pr-8 border border-gray-200 rounded-lg text-sm focus:ring-2 focus:ring-blue-200 focus:border-blue-400 outline-none"/> <!></div> <!> <div class="flex flex-wrap gap-1 max-h-24 overflow-y-auto"><button>All</button> <button> </button> <!></div> <!> <div class="grid grid-cols-2 gap-2 mt-2"></div></div>`);
58521
- var root_24$2 = /* @__PURE__ */ from_html(`<div class="fixed z-50 pointer-events-none"><div class="bg-white rounded-xl shadow-2xl border border-gray-200 overflow-hidden" style="width: 220px;"><div class="w-full h-[120px] bg-gray-50 flex items-center justify-center p-3"><div class="w-16 h-16 rounded-xl flex items-center justify-center"><div class="w-10 h-10 rounded-md"></div></div></div> <div class="p-3 space-y-1.5"><div class="flex items-center gap-2"><span class="text-sm font-semibold text-gray-800"> </span> <span class="px-1.5 py-0.5 rounded-full text-[9px] font-semibold text-white"> </span></div> <div class="text-xs text-gray-500"> </div></div></div></div>`);
58522
- var root_25$1 = /* @__PURE__ */ from_html(`<div class="fixed inset-0 bg-black/50 z-50 flex items-center justify-center"><div class="bg-white rounded-xl shadow-2xl w-80 p-5"><h3 class="text-sm font-bold text-gray-800 mb-1">Import RoomPlan</h3> <p class="text-xs text-gray-400 mb-4"> </p> <div class="space-y-3"><label class="flex items-start gap-2.5 cursor-pointer"><input type="checkbox" class="accent-blue-500 mt-0.5"/> <div><div class="text-sm font-medium text-gray-700">Straighten walls</div> <div class="text-xs text-gray-400">Snap near-horizontal/vertical walls to axis</div></div></label> <label class="flex items-start gap-2.5 cursor-pointer"><input type="checkbox" class="accent-blue-500 mt-0.5"/> <div><div class="text-sm font-medium text-gray-700">Enforce orthogonal <span class="text-xs text-blue-400 font-mono"> </span></div> <div class="text-xs text-gray-400">Force all walls to 90°/180° angles</div></div></label> <label class="block"><div class="text-xs text-gray-500 mb-1">Corner merge distance (cm)</div> <input type="number" min="0" max="50" step="5" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label></div> <div class="flex gap-2 mt-5"><button class="flex-1 px-3 py-2 border border-gray-200 rounded-lg text-sm text-gray-600 hover:bg-gray-50 transition-colors">Cancel</button> <button class="flex-1 px-3 py-2 bg-blue-500 text-white rounded-lg text-sm font-medium hover:bg-blue-600 transition-colors">Import</button></div></div></div>`);
58653
+ var root_6$3 = /* @__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>`);
58654
+ var root_7$4 = /* @__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>`);
58655
+ var root_5$4 = /* @__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);
58656
+ var root_1$8 = /* @__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">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">Zones</h3> <div class="grid grid-cols-3 gap-1.5 mb-1"><button type="button" title="Drag to create rectangle zone"><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 zone"><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 points; click first point or Enter to close"><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">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>`);
58657
+ var root_9$2 = /* @__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>`);
58658
+ var root_10$2 = /* @__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>`);
58659
+ var root_8$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>`);
58660
+ var root_19$2 = /* @__PURE__ */ from_html(`<button class="absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 w-5 h-5 flex items-center justify-center rounded-full hover:bg-gray-100" title="Clear search"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button>`);
58661
+ var root_20$2 = /* @__PURE__ */ from_html(`<div class="text-[10px] text-gray-400 px-1"> </div>`);
58662
+ var root_21$1 = /* @__PURE__ */ from_html(`<button> </button>`);
58663
+ var root_23$2 = /* @__PURE__ */ from_html(`<button draggable="true"><span role="button" tabindex="0"> </span> <div class="w-8 h-8 rounded-lg flex items-center justify-center"><div class="w-4 h-4 rounded-sm"></div></div> <span class="text-[10px] font-medium text-gray-600 leading-tight text-center"> </span></button>`);
58664
+ var root_22$2 = /* @__PURE__ */ from_html(`<div class="mt-1"><h4 class="text-[10px] font-semibold text-gray-400 uppercase mb-1.5">Recent</h4> <div class="grid grid-cols-2 gap-2"></div></div> <hr class="border-gray-100"/>`, 1);
58665
+ var root_25$1 = /* @__PURE__ */ from_html(`<span class="text-xs font-medium text-gray-600"> <mark class="bg-yellow-200 text-gray-800 rounded-sm px-0.5"> </mark> </span>`);
58666
+ var root_26$1 = /* @__PURE__ */ from_html(`<span class="text-xs font-medium text-gray-600"> </span>`);
58667
+ var root_24$1 = /* @__PURE__ */ from_html(`<button draggable="true"><span role="button" tabindex="0"> </span> <div class="w-10 h-10 rounded-lg flex items-center justify-center"><div class="w-5 h-5 rounded-sm"></div></div> <!> <span class="text-[10px] text-gray-400"> </span></button>`);
58668
+ var root_18$2 = /* @__PURE__ */ from_html(`<div class="space-y-2"><div class="relative"><input type="text" placeholder="Search furniture..." class="w-full px-3 py-2 pr-8 border border-gray-200 rounded-lg text-sm focus:ring-2 focus:ring-blue-200 focus:border-blue-400 outline-none"/> <!></div> <!> <div class="flex flex-wrap gap-1 max-h-24 overflow-y-auto"><button>All</button> <button> </button> <!></div> <!> <div class="grid grid-cols-2 gap-2 mt-2"></div></div>`);
58669
+ var root_27$1 = /* @__PURE__ */ from_html(`<div class="fixed z-50 pointer-events-none"><div class="bg-white rounded-xl shadow-2xl border border-gray-200 overflow-hidden" style="width: 220px;"><div class="w-full h-[120px] bg-gray-50 flex items-center justify-center p-3"><div class="w-16 h-16 rounded-xl flex items-center justify-center"><div class="w-10 h-10 rounded-md"></div></div></div> <div class="p-3 space-y-1.5"><div class="flex items-center gap-2"><span class="text-sm font-semibold text-gray-800"> </span> <span class="px-1.5 py-0.5 rounded-full text-[9px] font-semibold text-white"> </span></div> <div class="text-xs text-gray-500"> </div></div></div></div>`);
58670
+ var root_28$1 = /* @__PURE__ */ from_html(`<div class="fixed inset-0 bg-black/50 z-50 flex items-center justify-center"><div class="bg-white rounded-xl shadow-2xl w-80 p-5"><h3 class="text-sm font-bold text-gray-800 mb-1">Import RoomPlan</h3> <p class="text-xs text-gray-400 mb-4"> </p> <div class="space-y-3"><label class="flex items-start gap-2.5 cursor-pointer"><input type="checkbox" class="accent-blue-500 mt-0.5"/> <div><div class="text-sm font-medium text-gray-700">Straighten walls</div> <div class="text-xs text-gray-400">Snap near-horizontal/vertical walls to axis</div></div></label> <label class="flex items-start gap-2.5 cursor-pointer"><input type="checkbox" class="accent-blue-500 mt-0.5"/> <div><div class="text-sm font-medium text-gray-700">Enforce orthogonal <span class="text-xs text-blue-400 font-mono"> </span></div> <div class="text-xs text-gray-400">Force all walls to 90°/180° angles</div></div></label> <label class="block"><div class="text-xs text-gray-500 mb-1">Corner merge distance (cm)</div> <input type="number" min="0" max="50" step="5" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label></div> <div class="flex gap-2 mt-5"><button class="flex-1 px-3 py-2 border border-gray-200 rounded-lg text-sm text-gray-600 hover:bg-gray-50 transition-colors">Cancel</button> <button class="flex-1 px-3 py-2 bg-blue-500 text-white rounded-lg text-sm font-medium hover:bg-blue-600 transition-colors">Import</button></div></div></div>`);
58523
58671
  var root$4 = /* @__PURE__ */ from_html(`<div class="relative w-64 bg-white border-r border-gray-200 flex flex-col h-full overflow-hidden"><div class="flex border-b border-gray-200"><button>Build</button> <button>Rooms</button> <button>Objects</button></div> <div class="flex-1 overflow-y-auto p-3"><!></div> <button title="Layers Panel (L)" aria-label="Toggle Layers Panel">🗂</button> <button title="Undo History" aria-label="Toggle Undo History">⟲</button> <button class="absolute bottom-4 left-4 w-8 h-8 rounded-full bg-slate-700 text-white text-sm font-bold shadow-lg hover:bg-slate-600 transition-colors z-50" title="Keyboard Shortcuts (?)" aria-label="Keyboard Shortcuts">?</button></div> <!> <!>`, 1);
58524
58672
  function BuildPanel($$anchor, $$props) {
58525
58673
  push($$props, true);
@@ -58538,10 +58686,21 @@ function BuildPanel($$anchor, $$props) {
58538
58686
  selectedTool.set(tool);
58539
58687
  placingFurnitureId.set(null);
58540
58688
  }
58689
+ function setZoneTool(shape) {
58690
+ placingZoneShape.set(shape);
58691
+ placingFurnitureId.set(null);
58692
+ placingStair.set(false);
58693
+ placingColumn.set(false);
58694
+ selectedTool.set("zone");
58695
+ }
58541
58696
  let currentTool = /* @__PURE__ */ state("select");
58542
58697
  selectedTool.subscribe((t) => {
58543
58698
  set(currentTool, t, true);
58544
58699
  });
58700
+ let currentZoneShape = /* @__PURE__ */ state("rectangle");
58701
+ placingZoneShape.subscribe((s) => {
58702
+ set(currentZoneShape, s, true);
58703
+ });
58545
58704
  let currentPlacing = /* @__PURE__ */ state(null);
58546
58705
  placingFurnitureId.subscribe((id) => {
58547
58706
  set(currentPlacing, id, true);
@@ -58839,7 +58998,7 @@ function BuildPanel($$anchor, $$props) {
58839
58998
  reset(div_1);
58840
58999
  var div_2 = sibling(div_1, 2);
58841
59000
  var node = child(div_2);
58842
- var consequent_1 = ($$anchor) => {
59001
+ var consequent_4 = ($$anchor) => {
58843
59002
  var div_3 = root_1$8();
58844
59003
  var button_3 = sibling(child(div_3), 2);
58845
59004
  var div_4 = child(button_3);
@@ -58863,86 +59022,108 @@ function BuildPanel($$anchor, $$props) {
58863
59022
  next(2);
58864
59023
  reset(button_7);
58865
59024
  reset(div_7);
58866
- var button_8 = sibling(div_7, 4);
58867
- var div_10 = child(button_8);
58868
- next(2);
58869
- reset(button_8);
59025
+ var div_10 = sibling(div_7, 4);
59026
+ var button_8 = child(div_10);
58870
59027
  var button_9 = sibling(button_8, 2);
58871
- var div_11 = child(button_9);
58872
- next(2);
58873
- reset(button_9);
58874
59028
  var button_10 = sibling(button_9, 2);
58875
- var div_12 = child(button_10);
59029
+ reset(div_10);
59030
+ var p_1 = sibling(div_10, 2);
59031
+ var node_1 = child(p_1);
59032
+ var consequent = ($$anchor) => {
59033
+ append($$anchor, text$1("Drag on canvas to draw a rectangle"));
59034
+ };
59035
+ var consequent_1 = ($$anchor) => {
59036
+ append($$anchor, text$1("Click to place a triangle, then drag vertices"));
59037
+ };
59038
+ var consequent_2 = ($$anchor) => {
59039
+ append($$anchor, text$1("Click vertices · Enter / click first point to close"));
59040
+ };
59041
+ if_block(node_1, ($$render) => {
59042
+ if (get(currentTool) === "zone" && get(currentZoneShape) === "rectangle") $$render(consequent);
59043
+ else if (get(currentTool) === "zone" && get(currentZoneShape) === "triangle") $$render(consequent_1, 1);
59044
+ else if (get(currentTool) === "zone" && get(currentZoneShape) === "polygon") $$render(consequent_2, 2);
59045
+ });
59046
+ reset(p_1);
59047
+ var button_11 = sibling(p_1, 4);
59048
+ var div_11 = child(button_11);
58876
59049
  next(2);
58877
- reset(button_10);
58878
- var button_11 = sibling(button_10, 4);
59050
+ reset(button_11);
58879
59051
  var button_12 = sibling(button_11, 2);
59052
+ var div_12 = child(button_12);
59053
+ next(2);
59054
+ reset(button_12);
58880
59055
  var button_13 = sibling(button_12, 2);
58881
- var span = sibling(child(button_13), 2);
58882
- var text_1 = child(span, true);
58883
- reset(span);
59056
+ var div_13 = child(button_13);
59057
+ next(2);
58884
59058
  reset(button_13);
58885
- var node_1 = sibling(button_13, 2);
58886
- var consequent = ($$anchor) => {
58887
- var fragment_1 = root_2$8();
58888
- var div_13 = first_child(fragment_1);
58889
- each(div_13, 21, () => doorCatalog, index$1, ($$anchor, dc) => {
58890
- var button_14 = root_3$7();
58891
- var div_14 = child(button_14);
58892
- var svg = child(div_14);
59059
+ var button_14 = sibling(button_13, 4);
59060
+ var button_15 = sibling(button_14, 2);
59061
+ var button_16 = sibling(button_15, 2);
59062
+ var span = sibling(child(button_16), 2);
59063
+ var text_4 = child(span, true);
59064
+ reset(span);
59065
+ reset(button_16);
59066
+ var node_2 = sibling(button_16, 2);
59067
+ var consequent_3 = ($$anchor) => {
59068
+ var fragment_1 = root_5$4();
59069
+ var div_14 = first_child(fragment_1);
59070
+ each(div_14, 21, () => doorCatalog, index$1, ($$anchor, dc) => {
59071
+ var button_17 = root_6$3();
59072
+ var div_15 = child(button_17);
59073
+ var svg = child(div_15);
58893
59074
  var path = child(svg);
58894
59075
  reset(svg);
58895
- reset(div_14);
58896
- var span_1 = sibling(div_14, 2);
58897
- var text_2 = child(span_1, true);
59076
+ reset(div_15);
59077
+ var span_1 = sibling(div_15, 2);
59078
+ var text_5 = child(span_1, true);
58898
59079
  reset(span_1);
58899
59080
  var span_2 = sibling(span_1, 2);
58900
- var text_3 = child(span_2, true);
59081
+ var text_6 = child(span_2, true);
58901
59082
  reset(span_2);
58902
- reset(button_14);
59083
+ reset(button_17);
58903
59084
  template_effect(() => {
58904
- set_class(button_14, 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"}`);
59085
+ set_class(button_17, 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"}`);
58905
59086
  set_attribute(path, "d", get(dc).icon);
58906
- set_text(text_2, get(dc).name);
58907
- set_text(text_3, get(dc).desc);
59087
+ set_text(text_5, get(dc).name);
59088
+ set_text(text_6, get(dc).desc);
58908
59089
  });
58909
- delegated("click", button_14, () => setDoorType(get(dc).type));
58910
- event("dragstart", button_14, (e) => {
59090
+ delegated("click", button_17, () => setDoorType(get(dc).type));
59091
+ event("dragstart", button_17, (e) => {
58911
59092
  var _e$dataTransfer, _e$dataTransfer2;
58912
59093
  (_e$dataTransfer = e.dataTransfer) === null || _e$dataTransfer === void 0 || _e$dataTransfer.setData("application/o3d-type", "door");
58913
59094
  (_e$dataTransfer2 = e.dataTransfer) === null || _e$dataTransfer2 === void 0 || _e$dataTransfer2.setData("application/o3d-id", get(dc).type);
58914
59095
  });
58915
- append($$anchor, button_14);
59096
+ append($$anchor, button_17);
58916
59097
  });
58917
- reset(div_13);
58918
- var div_15 = sibling(div_13, 4);
58919
- each(div_15, 21, () => windowCatalog, index$1, ($$anchor, wc) => {
58920
- var button_15 = root_4$6();
58921
- var span_3 = sibling(child(button_15), 2);
58922
- var text_4 = child(span_3, true);
59098
+ reset(div_14);
59099
+ var div_16 = sibling(div_14, 4);
59100
+ each(div_16, 21, () => windowCatalog, index$1, ($$anchor, wc) => {
59101
+ var button_18 = root_7$4();
59102
+ var span_3 = sibling(child(button_18), 2);
59103
+ var text_7 = child(span_3, true);
58923
59104
  reset(span_3);
58924
59105
  var span_4 = sibling(span_3, 2);
58925
- var text_5 = child(span_4, true);
59106
+ var text_8 = child(span_4, true);
58926
59107
  reset(span_4);
58927
- reset(button_15);
59108
+ reset(button_18);
58928
59109
  template_effect(() => {
58929
- set_class(button_15, 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"}`);
58930
- set_text(text_4, get(wc).name);
58931
- set_text(text_5, get(wc).desc);
59110
+ 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) === "window" && get(selectedWindowType) === get(wc).type ? "border-blue-400 bg-blue-50" : "border-gray-100 hover:border-gray-200"}`);
59111
+ set_text(text_7, get(wc).name);
59112
+ set_text(text_8, get(wc).desc);
58932
59113
  });
58933
- delegated("click", button_15, () => setWindowType(get(wc).type));
58934
- event("dragstart", button_15, (e) => {
59114
+ delegated("click", button_18, () => setWindowType(get(wc).type));
59115
+ event("dragstart", button_18, (e) => {
58935
59116
  var _e$dataTransfer3, _e$dataTransfer4;
58936
59117
  (_e$dataTransfer3 = e.dataTransfer) === null || _e$dataTransfer3 === void 0 || _e$dataTransfer3.setData("application/o3d-type", "window");
58937
59118
  (_e$dataTransfer4 = e.dataTransfer) === null || _e$dataTransfer4 === void 0 || _e$dataTransfer4.setData("application/o3d-id", get(wc).type);
58938
59119
  });
58939
- append($$anchor, button_15);
59120
+ append($$anchor, button_18);
58940
59121
  });
58941
- reset(div_15);
59122
+ reset(div_16);
58942
59123
  append($$anchor, fragment_1);
58943
59124
  };
58944
- if_block(node_1, ($$render) => {
58945
- if (get(constructionOpen)) $$render(consequent);
59125
+ if_block(node_2, ($$render) => {
59126
+ if (get(constructionOpen)) $$render(consequent_3);
58946
59127
  });
58947
59128
  reset(div_3);
58948
59129
  template_effect(() => {
@@ -58956,200 +59137,206 @@ function BuildPanel($$anchor, $$props) {
58956
59137
  set_class(div_8, 1, `w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center ${get(isPlacingColumn) ? "bg-blue-100" : ""}`);
58957
59138
  set_class(button_7, 1, `flex-1 flex items-center gap-2 px-3 py-2.5 rounded-lg text-sm transition-colors ${get(isPlacingColumn) ? "bg-blue-50 text-slate-800 ring-1 ring-blue-200" : "hover:bg-gray-50 text-gray-700"}`);
58958
59139
  set_class(div_9, 1, `w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center ${get(isPlacingColumn) ? "bg-blue-100" : ""}`);
58959
- set_class(button_8, 1, `w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors ${get(currentTool) === "text" ? "bg-blue-50 text-slate-800 ring-1 ring-blue-200" : "hover:bg-gray-50 text-gray-700"}`);
58960
- set_class(div_10, 1, `w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center ${get(currentTool) === "text" ? "bg-blue-100" : ""}`);
58961
- set_class(button_9, 1, `w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors ${get(currentTool) === "annotate" ? "bg-blue-50 text-slate-800 ring-1 ring-blue-200" : "hover:bg-gray-50 text-gray-700"}`);
58962
- set_class(div_11, 1, `w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center ${get(currentTool) === "annotate" ? "bg-blue-100" : ""}`);
58963
- set_class(button_10, 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"}`);
58964
- set_class(div_12, 1, `w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center ${get(currentTool) === "measure" ? "bg-blue-100" : ""}`);
58965
- set_text(text_1, get(constructionOpen) ? "▼" : "▶");
59140
+ set_class(button_8, 1, `flex flex-col items-center gap-1 p-2 rounded-lg border-2 text-xs transition-colors ${get(currentTool) === "zone" && get(currentZoneShape) === "rectangle" ? "border-orange-400 bg-orange-50" : "border-gray-100 hover:border-gray-200"}`);
59141
+ set_class(button_9, 1, `flex flex-col items-center gap-1 p-2 rounded-lg border-2 text-xs transition-colors ${get(currentTool) === "zone" && get(currentZoneShape) === "triangle" ? "border-orange-400 bg-orange-50" : "border-gray-100 hover:border-gray-200"}`);
59142
+ set_class(button_10, 1, `flex flex-col items-center gap-1 p-2 rounded-lg border-2 text-xs transition-colors ${get(currentTool) === "zone" && get(currentZoneShape) === "polygon" ? "border-orange-400 bg-orange-50" : "border-gray-100 hover:border-gray-200"}`);
59143
+ set_class(button_11, 1, `w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors ${get(currentTool) === "text" ? "bg-blue-50 text-slate-800 ring-1 ring-blue-200" : "hover:bg-gray-50 text-gray-700"}`);
59144
+ set_class(div_11, 1, `w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center ${get(currentTool) === "text" ? "bg-blue-100" : ""}`);
59145
+ set_class(button_12, 1, `w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors ${get(currentTool) === "annotate" ? "bg-blue-50 text-slate-800 ring-1 ring-blue-200" : "hover:bg-gray-50 text-gray-700"}`);
59146
+ set_class(div_12, 1, `w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center ${get(currentTool) === "annotate" ? "bg-blue-100" : ""}`);
59147
+ set_class(button_13, 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"}`);
59148
+ set_class(div_13, 1, `w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center ${get(currentTool) === "measure" ? "bg-blue-100" : ""}`);
59149
+ set_text(text_4, get(constructionOpen) ? "▼" : "▶");
58966
59150
  });
58967
59151
  delegated("click", button_3, () => setTool("select"));
58968
59152
  delegated("click", button_4, () => setTool("wall"));
58969
59153
  delegated("click", button_5, onPlaceStair);
58970
59154
  delegated("click", button_6, () => onPlaceColumn("round"));
58971
59155
  delegated("click", button_7, () => onPlaceColumn("square"));
58972
- delegated("click", button_8, () => setTool("text"));
58973
- delegated("click", button_9, () => setTool("annotate"));
58974
- delegated("click", button_10, () => setTool("measure"));
58975
- delegated("click", button_11, onImportImage);
58976
- delegated("click", button_12, onImportRoomPlan);
58977
- delegated("click", button_13, () => set(constructionOpen, !get(constructionOpen)));
59156
+ delegated("click", button_8, () => setZoneTool("rectangle"));
59157
+ delegated("click", button_9, () => setZoneTool("triangle"));
59158
+ delegated("click", button_10, () => setZoneTool("polygon"));
59159
+ delegated("click", button_11, () => setTool("text"));
59160
+ delegated("click", button_12, () => setTool("annotate"));
59161
+ delegated("click", button_13, () => setTool("measure"));
59162
+ delegated("click", button_14, onImportImage);
59163
+ delegated("click", button_15, onImportRoomPlan);
59164
+ delegated("click", button_16, () => set(constructionOpen, !get(constructionOpen)));
58978
59165
  append($$anchor, div_3);
58979
59166
  };
58980
- var consequent_8 = ($$anchor) => {
58981
- var div_16 = root_5$4();
58982
- var div_17 = sibling(child(div_16), 4);
58983
- each(div_17, 21, () => roomPresets, index$1, ($$anchor, preset) => {
58984
- var button_16 = root_6$3();
58985
- var div_18 = child(button_16);
58986
- var text_6 = child(div_18, true);
58987
- reset(div_18);
58988
- var span_5 = sibling(div_18, 2);
58989
- var text_7 = child(span_5, true);
59167
+ var consequent_11 = ($$anchor) => {
59168
+ var div_17 = root_8$2();
59169
+ var div_18 = sibling(child(div_17), 4);
59170
+ each(div_18, 21, () => roomPresets, index$1, ($$anchor, preset) => {
59171
+ var button_19 = root_9$2();
59172
+ var div_19 = child(button_19);
59173
+ var text_9 = child(div_19, true);
59174
+ reset(div_19);
59175
+ var span_5 = sibling(div_19, 2);
59176
+ var text_10 = child(span_5, true);
58990
59177
  reset(span_5);
58991
- reset(button_16);
59178
+ reset(button_19);
58992
59179
  template_effect(() => {
58993
- set_text(text_6, get(preset).icon);
58994
- set_text(text_7, get(preset).name);
59180
+ set_text(text_9, get(preset).icon);
59181
+ set_text(text_10, get(preset).name);
58995
59182
  });
58996
- delegated("click", button_16, () => onPresetClick(get(preset).id));
58997
- event("dragstart", button_16, (e) => {
59183
+ delegated("click", button_19, () => onPresetClick(get(preset).id));
59184
+ event("dragstart", button_19, (e) => {
58998
59185
  var _e$dataTransfer5, _e$dataTransfer6;
58999
59186
  (_e$dataTransfer5 = e.dataTransfer) === null || _e$dataTransfer5 === void 0 || _e$dataTransfer5.setData("application/o3d-type", "room");
59000
59187
  (_e$dataTransfer6 = e.dataTransfer) === null || _e$dataTransfer6 === void 0 || _e$dataTransfer6.setData("application/o3d-id", get(preset).id);
59001
59188
  });
59002
- append($$anchor, button_16);
59189
+ append($$anchor, button_19);
59003
59190
  });
59004
- reset(div_17);
59005
- var div_19 = sibling(div_17, 8);
59006
- each(div_19, 21, () => roomTemplates, index$1, ($$anchor, tmpl) => {
59007
- var button_17 = root_7$4();
59008
- var div_20 = child(button_17);
59009
- var node_2 = child(div_20);
59010
- var consequent_2 = ($$anchor) => {
59191
+ reset(div_18);
59192
+ var div_20 = sibling(div_18, 8);
59193
+ each(div_20, 21, () => roomTemplates, index$1, ($$anchor, tmpl) => {
59194
+ var button_20 = root_10$2();
59195
+ var div_21 = child(button_20);
59196
+ var node_3 = child(div_21);
59197
+ var consequent_5 = ($$anchor) => {
59011
59198
  append($$anchor, text$1("🛋️"));
59012
59199
  };
59013
- var consequent_3 = ($$anchor) => {
59200
+ var consequent_6 = ($$anchor) => {
59014
59201
  append($$anchor, text$1("🛏️"));
59015
59202
  };
59016
- var consequent_4 = ($$anchor) => {
59203
+ var consequent_7 = ($$anchor) => {
59017
59204
  append($$anchor, text$1("🍳"));
59018
59205
  };
59019
- var consequent_5 = ($$anchor) => {
59206
+ var consequent_8 = ($$anchor) => {
59020
59207
  append($$anchor, text$1("🛁"));
59021
59208
  };
59022
- var consequent_6 = ($$anchor) => {
59209
+ var consequent_9 = ($$anchor) => {
59023
59210
  append($$anchor, text$1("🖥️"));
59024
59211
  };
59025
- var consequent_7 = ($$anchor) => {
59212
+ var consequent_10 = ($$anchor) => {
59026
59213
  append($$anchor, text$1("🍽️"));
59027
59214
  };
59028
59215
  var alternate = ($$anchor) => {
59029
59216
  append($$anchor, text$1("🏠"));
59030
59217
  };
59031
- if_block(node_2, ($$render) => {
59032
- if (get(tmpl).name === "Living Room") $$render(consequent_2);
59033
- else if (get(tmpl).name === "Bedroom") $$render(consequent_3, 1);
59034
- else if (get(tmpl).name === "Kitchen") $$render(consequent_4, 2);
59035
- else if (get(tmpl).name === "Bathroom") $$render(consequent_5, 3);
59036
- else if (get(tmpl).name === "Office") $$render(consequent_6, 4);
59037
- else if (get(tmpl).name === "Dining Room") $$render(consequent_7, 5);
59218
+ if_block(node_3, ($$render) => {
59219
+ if (get(tmpl).name === "Living Room") $$render(consequent_5);
59220
+ else if (get(tmpl).name === "Bedroom") $$render(consequent_6, 1);
59221
+ else if (get(tmpl).name === "Kitchen") $$render(consequent_7, 2);
59222
+ else if (get(tmpl).name === "Bathroom") $$render(consequent_8, 3);
59223
+ else if (get(tmpl).name === "Office") $$render(consequent_9, 4);
59224
+ else if (get(tmpl).name === "Dining Room") $$render(consequent_10, 5);
59038
59225
  else $$render(alternate, -1);
59039
59226
  });
59040
- reset(div_20);
59041
- var span_6 = sibling(div_20, 2);
59042
- var text_15 = child(span_6, true);
59227
+ reset(div_21);
59228
+ var span_6 = sibling(div_21, 2);
59229
+ var text_18 = child(span_6, true);
59043
59230
  reset(span_6);
59044
59231
  var span_7 = sibling(span_6, 2);
59045
- var text_16 = child(span_7);
59232
+ var text_19 = child(span_7);
59046
59233
  reset(span_7);
59047
- reset(button_17);
59234
+ reset(button_20);
59048
59235
  template_effect(() => {
59049
59236
  var _$$get$furniture$leng;
59050
- set_text(text_15, get(tmpl).name);
59051
- set_text(text_16, `${(_$$get$furniture$leng = get(tmpl).furniture.length) !== null && _$$get$furniture$leng !== void 0 ? _$$get$furniture$leng : ""} items`);
59237
+ set_text(text_18, get(tmpl).name);
59238
+ set_text(text_19, `${(_$$get$furniture$leng = get(tmpl).furniture.length) !== null && _$$get$furniture$leng !== void 0 ? _$$get$furniture$leng : ""} items`);
59052
59239
  });
59053
- delegated("click", button_17, () => onPresetClick(get(tmpl).presetId, get(tmpl).name));
59054
- event("dragstart", button_17, (e) => {
59240
+ delegated("click", button_20, () => onPresetClick(get(tmpl).presetId, get(tmpl).name));
59241
+ event("dragstart", button_20, (e) => {
59055
59242
  var _e$dataTransfer7, _e$dataTransfer8;
59056
59243
  (_e$dataTransfer7 = e.dataTransfer) === null || _e$dataTransfer7 === void 0 || _e$dataTransfer7.setData("application/o3d-type", "room-template");
59057
59244
  (_e$dataTransfer8 = e.dataTransfer) === null || _e$dataTransfer8 === void 0 || _e$dataTransfer8.setData("application/o3d-id", get(tmpl).name);
59058
59245
  });
59059
- append($$anchor, button_17);
59246
+ append($$anchor, button_20);
59060
59247
  });
59061
- reset(div_19);
59062
- reset(div_16);
59063
- append($$anchor, div_16);
59248
+ reset(div_20);
59249
+ reset(div_17);
59250
+ append($$anchor, div_17);
59064
59251
  };
59065
- var consequent_13 = ($$anchor) => {
59066
- var div_21 = root_15$2();
59067
- var div_22 = child(div_21);
59068
- var input_1 = child(div_22);
59252
+ var consequent_16 = ($$anchor) => {
59253
+ var div_22 = root_18$2();
59254
+ var div_23 = child(div_22);
59255
+ var input_1 = child(div_23);
59069
59256
  remove_input_defaults(input_1);
59070
- var node_3 = sibling(input_1, 2);
59071
- var consequent_9 = ($$anchor) => {
59072
- var button_18 = root_16$1();
59073
- delegated("click", button_18, () => set(search, ""));
59074
- append($$anchor, button_18);
59257
+ var node_4 = sibling(input_1, 2);
59258
+ var consequent_12 = ($$anchor) => {
59259
+ var button_21 = root_19$2();
59260
+ delegated("click", button_21, () => set(search, ""));
59261
+ append($$anchor, button_21);
59075
59262
  };
59076
- if_block(node_3, ($$render) => {
59077
- if (get(search)) $$render(consequent_9);
59263
+ if_block(node_4, ($$render) => {
59264
+ if (get(search)) $$render(consequent_12);
59078
59265
  });
59079
- reset(div_22);
59080
- var node_4 = sibling(div_22, 2);
59081
- var consequent_10 = ($$anchor) => {
59082
- var div_23 = root_17$2();
59083
- var text_17 = child(div_23);
59084
- reset(div_23);
59266
+ reset(div_23);
59267
+ var node_5 = sibling(div_23, 2);
59268
+ var consequent_13 = ($$anchor) => {
59269
+ var div_24 = root_20$2();
59270
+ var text_20 = child(div_24);
59271
+ reset(div_24);
59085
59272
  template_effect(() => {
59086
59273
  var _$$get$length, _$$get;
59087
- return set_text(text_17, `${(_$$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 : ""}"`);
59274
+ return set_text(text_20, `${(_$$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 : ""}"`);
59088
59275
  });
59089
- append($$anchor, div_23);
59276
+ append($$anchor, div_24);
59090
59277
  };
59091
- if_block(node_4, ($$render) => {
59092
- if (get(search)) $$render(consequent_10);
59278
+ if_block(node_5, ($$render) => {
59279
+ if (get(search)) $$render(consequent_13);
59093
59280
  });
59094
- var div_24 = sibling(node_4, 2);
59095
- var button_19 = child(div_24);
59096
- var button_20 = sibling(button_19, 2);
59097
- var text_18 = child(button_20);
59098
- reset(button_20);
59099
- each(sibling(button_20, 2), 17, () => furnitureCategories, index$1, ($$anchor, cat) => {
59100
- var button_21 = root_18$2();
59101
- var text_19 = child(button_21, true);
59102
- reset(button_21);
59281
+ var div_25 = sibling(node_5, 2);
59282
+ var button_22 = child(div_25);
59283
+ var button_23 = sibling(button_22, 2);
59284
+ var text_21 = child(button_23);
59285
+ reset(button_23);
59286
+ each(sibling(button_23, 2), 17, () => furnitureCategories, index$1, ($$anchor, cat) => {
59287
+ var button_24 = root_21$1();
59288
+ var text_22 = child(button_24, true);
59289
+ reset(button_24);
59103
59290
  template_effect(() => {
59104
59291
  var _categoryColors$$$get;
59105
- set_class(button_21, 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"}`);
59106
- set_style(button_21, get(selectedCategory) === get(cat) ? `background-color: ${(_categoryColors$$$get = categoryColors[get(cat)]) !== null && _categoryColors$$$get !== void 0 ? _categoryColors$$$get : "#6b7280"}` : "background-color: #f3f4f6");
59107
- set_text(text_19, get(cat));
59292
+ set_class(button_24, 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"}`);
59293
+ set_style(button_24, get(selectedCategory) === get(cat) ? `background-color: ${(_categoryColors$$$get = categoryColors[get(cat)]) !== null && _categoryColors$$$get !== void 0 ? _categoryColors$$$get : "#6b7280"}` : "background-color: #f3f4f6");
59294
+ set_text(text_22, get(cat));
59108
59295
  });
59109
- delegated("click", button_21, () => set(selectedCategory, get(cat), true));
59110
- append($$anchor, button_21);
59296
+ delegated("click", button_24, () => set(selectedCategory, get(cat), true));
59297
+ append($$anchor, button_24);
59111
59298
  });
59112
- reset(div_24);
59113
- var node_6 = sibling(div_24, 2);
59114
- var consequent_11 = ($$anchor) => {
59115
- var fragment_2 = root_19$2();
59116
- var div_25 = first_child(fragment_2);
59117
- var div_26 = sibling(child(div_25), 2);
59118
- each(div_26, 21, () => get(recentItems), index$1, ($$anchor, item) => {
59119
- var button_22 = root_20$2();
59120
- var span_8 = child(button_22);
59121
- var text_20 = child(span_8, true);
59299
+ reset(div_25);
59300
+ var node_7 = sibling(div_25, 2);
59301
+ var consequent_14 = ($$anchor) => {
59302
+ var fragment_2 = root_22$2();
59303
+ var div_26 = first_child(fragment_2);
59304
+ var div_27 = sibling(child(div_26), 2);
59305
+ each(div_27, 21, () => get(recentItems), index$1, ($$anchor, item) => {
59306
+ var button_25 = root_23$2();
59307
+ var span_8 = child(button_25);
59308
+ var text_23 = child(span_8, true);
59122
59309
  reset(span_8);
59123
- var div_27 = sibling(span_8, 2);
59124
- var div_28 = child(div_27);
59125
- reset(div_27);
59126
- var span_9 = sibling(div_27, 2);
59127
- var text_21 = child(span_9, true);
59310
+ var div_28 = sibling(span_8, 2);
59311
+ var div_29 = child(div_28);
59312
+ reset(div_28);
59313
+ var span_9 = sibling(div_28, 2);
59314
+ var text_24 = child(span_9, true);
59128
59315
  reset(span_9);
59129
- reset(button_22);
59316
+ reset(button_25);
59130
59317
  template_effect(($0, $1, $2) => {
59131
59318
  var _$$get$color, _$$get$color2;
59132
- set_class(button_22, 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"}`);
59319
+ set_class(button_25, 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"}`);
59133
59320
  set_class(span_8, 1, `absolute top-1 right-1 text-[12px] leading-none cursor-pointer ${$0 !== null && $0 !== void 0 ? $0 : ""}`);
59134
59321
  set_attribute(span_8, "title", $1);
59135
- set_text(text_20, $2);
59136
- set_style(div_27, `background-color: ${(_$$get$color = get(item).color) !== null && _$$get$color !== void 0 ? _$$get$color : ""}20`);
59137
- set_style(div_28, `background-color: ${(_$$get$color2 = get(item).color) !== null && _$$get$color2 !== void 0 ? _$$get$color2 : ""}; opacity: 0.7`);
59138
- set_text(text_21, get(item).name);
59322
+ set_text(text_23, $2);
59323
+ set_style(div_28, `background-color: ${(_$$get$color = get(item).color) !== null && _$$get$color !== void 0 ? _$$get$color : ""}20`);
59324
+ set_style(div_29, `background-color: ${(_$$get$color2 = get(item).color) !== null && _$$get$color2 !== void 0 ? _$$get$color2 : ""}; opacity: 0.7`);
59325
+ set_text(text_24, get(item).name);
59139
59326
  }, [
59140
59327
  () => get(favoriteIds).includes(get(item).id) ? "text-pink-500" : "text-gray-300 hover:text-pink-400",
59141
59328
  () => get(favoriteIds).includes(get(item).id) ? "Remove from favorites" : "Add to favorites",
59142
59329
  () => get(favoriteIds).includes(get(item).id) ? "♥" : "♡"
59143
59330
  ]);
59144
- delegated("click", button_22, () => onFurnitureClick(get(item)));
59145
- event("dragstart", button_22, (e) => {
59331
+ delegated("click", button_25, () => onFurnitureClick(get(item)));
59332
+ event("dragstart", button_25, (e) => {
59146
59333
  var _e$dataTransfer9, _e$dataTransfer10;
59147
59334
  (_e$dataTransfer9 = e.dataTransfer) === null || _e$dataTransfer9 === void 0 || _e$dataTransfer9.setData("application/o3d-type", "furniture");
59148
59335
  (_e$dataTransfer10 = e.dataTransfer) === null || _e$dataTransfer10 === void 0 || _e$dataTransfer10.setData("application/o3d-id", get(item).id);
59149
59336
  });
59150
- event("mouseenter", button_22, (e) => onItemMouseEnter(e, get(item)));
59151
- delegated("mousemove", button_22, onItemMouseMove);
59152
- event("mouseleave", button_22, onItemMouseLeave);
59337
+ event("mouseenter", button_25, (e) => onItemMouseEnter(e, get(item)));
59338
+ delegated("mousemove", button_25, onItemMouseMove);
59339
+ event("mouseleave", button_25, onItemMouseLeave);
59153
59340
  delegated("click", span_8, (e) => {
59154
59341
  e.stopPropagation();
59155
59342
  e.preventDefault();
@@ -59161,40 +59348,40 @@ function BuildPanel($$anchor, $$props) {
59161
59348
  toggleFavorite(get(item).id);
59162
59349
  }
59163
59350
  });
59164
- append($$anchor, button_22);
59351
+ append($$anchor, button_25);
59165
59352
  });
59353
+ reset(div_27);
59166
59354
  reset(div_26);
59167
- reset(div_25);
59168
59355
  next(2);
59169
59356
  append($$anchor, fragment_2);
59170
59357
  };
59171
- if_block(node_6, ($$render) => {
59172
- if (!get(search) && get(selectedCategory) === "All" && get(recentItems).length > 0) $$render(consequent_11);
59358
+ if_block(node_7, ($$render) => {
59359
+ if (!get(search) && get(selectedCategory) === "All" && get(recentItems).length > 0) $$render(consequent_14);
59173
59360
  });
59174
- var div_29 = sibling(node_6, 2);
59175
- each(div_29, 21, () => get(filtered), index$1, ($$anchor, item) => {
59361
+ var div_30 = sibling(node_7, 2);
59362
+ each(div_30, 21, () => get(filtered), index$1, ($$anchor, item) => {
59176
59363
  const s = /* @__PURE__ */ user_derived(() => get(search).toLowerCase());
59177
- var button_23 = root_21$1();
59178
- var span_10 = child(button_23);
59179
- var text_22 = child(span_10, true);
59364
+ var button_26 = root_24$1();
59365
+ var span_10 = child(button_26);
59366
+ var text_25 = child(span_10, true);
59180
59367
  reset(span_10);
59181
- var div_30 = sibling(span_10, 2);
59182
- var div_31 = child(div_30);
59183
- reset(div_30);
59184
- var node_7 = sibling(div_30, 2);
59185
- var consequent_12 = ($$anchor) => {
59368
+ var div_31 = sibling(span_10, 2);
59369
+ var div_32 = child(div_31);
59370
+ reset(div_31);
59371
+ var node_8 = sibling(div_31, 2);
59372
+ var consequent_15 = ($$anchor) => {
59186
59373
  const idx = /* @__PURE__ */ user_derived(() => get(item).name.toLowerCase().indexOf(get(s)));
59187
- var span_11 = root_22$2();
59188
- var text_23 = child(span_11, true);
59189
- var mark = sibling(text_23);
59190
- var text_24 = child(mark, true);
59374
+ var span_11 = root_25$1();
59375
+ var text_26 = child(span_11, true);
59376
+ var mark = sibling(text_26);
59377
+ var text_27 = child(mark, true);
59191
59378
  reset(mark);
59192
- var text_25 = sibling(mark, 1, true);
59379
+ var text_28 = sibling(mark, 1, true);
59193
59380
  reset(span_11);
59194
59381
  template_effect(($0, $1, $2) => {
59195
- set_text(text_23, $0);
59196
- set_text(text_24, $1);
59197
- set_text(text_25, $2);
59382
+ set_text(text_26, $0);
59383
+ set_text(text_27, $1);
59384
+ set_text(text_28, $2);
59198
59385
  }, [
59199
59386
  () => get(item).name.slice(0, get(idx)),
59200
59387
  () => get(item).name.slice(get(idx), get(idx) + get(s).length),
@@ -59204,43 +59391,43 @@ function BuildPanel($$anchor, $$props) {
59204
59391
  };
59205
59392
  var d = /* @__PURE__ */ user_derived(() => get(s) && get(item).name.toLowerCase().includes(get(s)));
59206
59393
  var alternate_1 = ($$anchor) => {
59207
- var span_12 = root_23$2();
59208
- var text_26 = child(span_12, true);
59394
+ var span_12 = root_26$1();
59395
+ var text_29 = child(span_12, true);
59209
59396
  reset(span_12);
59210
- template_effect(() => set_text(text_26, get(item).name));
59397
+ template_effect(() => set_text(text_29, get(item).name));
59211
59398
  append($$anchor, span_12);
59212
59399
  };
59213
- if_block(node_7, ($$render) => {
59214
- if (get(d)) $$render(consequent_12);
59400
+ if_block(node_8, ($$render) => {
59401
+ if (get(d)) $$render(consequent_15);
59215
59402
  else $$render(alternate_1, -1);
59216
59403
  });
59217
- var span_13 = sibling(node_7, 2);
59218
- var text_27 = child(span_13);
59404
+ var span_13 = sibling(node_8, 2);
59405
+ var text_30 = child(span_13);
59219
59406
  reset(span_13);
59220
- reset(button_23);
59407
+ reset(button_26);
59221
59408
  template_effect(($0, $1, $2) => {
59222
59409
  var _$$get$color3, _$$get$color4, _$$get$width, _$$get$depth;
59223
- set_class(button_23, 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"}`);
59410
+ set_class(button_26, 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"}`);
59224
59411
  set_class(span_10, 1, `absolute top-1 right-1 text-[12px] leading-none cursor-pointer ${$0 !== null && $0 !== void 0 ? $0 : ""}`);
59225
59412
  set_attribute(span_10, "title", $1);
59226
- set_text(text_22, $2);
59227
- set_style(div_30, `background-color: ${(_$$get$color3 = get(item).color) !== null && _$$get$color3 !== void 0 ? _$$get$color3 : ""}20`);
59228
- set_style(div_31, `background-color: ${(_$$get$color4 = get(item).color) !== null && _$$get$color4 !== void 0 ? _$$get$color4 : ""}; opacity: 0.7`);
59229
- set_text(text_27, `${(_$$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`);
59413
+ set_text(text_25, $2);
59414
+ set_style(div_31, `background-color: ${(_$$get$color3 = get(item).color) !== null && _$$get$color3 !== void 0 ? _$$get$color3 : ""}20`);
59415
+ set_style(div_32, `background-color: ${(_$$get$color4 = get(item).color) !== null && _$$get$color4 !== void 0 ? _$$get$color4 : ""}; opacity: 0.7`);
59416
+ set_text(text_30, `${(_$$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`);
59230
59417
  }, [
59231
59418
  () => get(favoriteIds).includes(get(item).id) ? "text-pink-500" : "text-gray-300 hover:text-pink-400",
59232
59419
  () => get(favoriteIds).includes(get(item).id) ? "Remove from favorites" : "Add to favorites",
59233
59420
  () => get(favoriteIds).includes(get(item).id) ? "♥" : "♡"
59234
59421
  ]);
59235
- delegated("click", button_23, () => onFurnitureClick(get(item)));
59236
- event("dragstart", button_23, (e) => {
59422
+ delegated("click", button_26, () => onFurnitureClick(get(item)));
59423
+ event("dragstart", button_26, (e) => {
59237
59424
  var _e$dataTransfer11, _e$dataTransfer12;
59238
59425
  (_e$dataTransfer11 = e.dataTransfer) === null || _e$dataTransfer11 === void 0 || _e$dataTransfer11.setData("application/o3d-type", "furniture");
59239
59426
  (_e$dataTransfer12 = e.dataTransfer) === null || _e$dataTransfer12 === void 0 || _e$dataTransfer12.setData("application/o3d-id", get(item).id);
59240
59427
  });
59241
- event("mouseenter", button_23, (e) => onItemMouseEnter(e, get(item)));
59242
- delegated("mousemove", button_23, onItemMouseMove);
59243
- event("mouseleave", button_23, onItemMouseLeave);
59428
+ event("mouseenter", button_26, (e) => onItemMouseEnter(e, get(item)));
59429
+ delegated("mousemove", button_26, onItemMouseMove);
59430
+ event("mouseleave", button_26, onItemMouseLeave);
59244
59431
  delegated("click", span_10, (e) => {
59245
59432
  e.stopPropagation();
59246
59433
  e.preventDefault();
@@ -59252,81 +59439,81 @@ function BuildPanel($$anchor, $$props) {
59252
59439
  toggleFavorite(get(item).id);
59253
59440
  }
59254
59441
  });
59255
- append($$anchor, button_23);
59442
+ append($$anchor, button_26);
59256
59443
  });
59257
- reset(div_29);
59258
- reset(div_21);
59444
+ reset(div_30);
59445
+ reset(div_22);
59259
59446
  template_effect(() => {
59260
- set_class(button_19, 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"}`);
59261
- set_class(button_20, 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"}`);
59262
- set_text(text_18, `♥ Favorites${get(favoriteIds).length ? ` (${get(favoriteIds).length})` : ""}`);
59447
+ set_class(button_22, 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"}`);
59448
+ set_class(button_23, 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"}`);
59449
+ set_text(text_21, `♥ Favorites${get(favoriteIds).length ? ` (${get(favoriteIds).length})` : ""}`);
59263
59450
  });
59264
59451
  bind_value(input_1, () => get(search), ($$value) => set(search, $$value));
59265
- delegated("click", button_19, () => set(selectedCategory, "All"));
59266
- delegated("click", button_20, () => set(selectedCategory, "Favorites"));
59267
- append($$anchor, div_21);
59452
+ delegated("click", button_22, () => set(selectedCategory, "All"));
59453
+ delegated("click", button_23, () => set(selectedCategory, "Favorites"));
59454
+ append($$anchor, div_22);
59268
59455
  };
59269
59456
  if_block(node, ($$render) => {
59270
- if (get(activeTab) === "draw") $$render(consequent_1);
59271
- else if (get(activeTab) === "rooms") $$render(consequent_8, 1);
59272
- else if (get(activeTab) === "objects") $$render(consequent_13, 2);
59457
+ if (get(activeTab) === "draw") $$render(consequent_4);
59458
+ else if (get(activeTab) === "rooms") $$render(consequent_11, 1);
59459
+ else if (get(activeTab) === "objects") $$render(consequent_16, 2);
59273
59460
  });
59274
59461
  reset(div_2);
59275
- var button_24 = sibling(div_2, 2);
59462
+ var button_27 = sibling(div_2, 2);
59276
59463
  let classes;
59277
- var button_25 = sibling(button_24, 2);
59464
+ var button_28 = sibling(button_27, 2);
59278
59465
  let classes_1;
59279
- var button_26 = sibling(button_25, 2);
59466
+ var button_29 = sibling(button_28, 2);
59280
59467
  reset(div);
59281
- var node_8 = sibling(div, 2);
59282
- var consequent_14 = ($$anchor) => {
59468
+ var node_9 = sibling(div, 2);
59469
+ var consequent_17 = ($$anchor) => {
59283
59470
  const item = /* @__PURE__ */ user_derived(() => get(hoveredItem));
59284
- var div_32 = root_24$2();
59285
- var div_33 = child(div_32);
59471
+ var div_33 = root_27$1();
59286
59472
  var div_34 = child(div_33);
59287
59473
  var div_35 = child(div_34);
59288
59474
  var div_36 = child(div_35);
59475
+ var div_37 = child(div_36);
59476
+ reset(div_36);
59289
59477
  reset(div_35);
59290
- reset(div_34);
59291
- var div_37 = sibling(div_34, 2);
59292
- var div_38 = child(div_37);
59293
- var span_14 = child(div_38);
59294
- var text_28 = child(span_14, true);
59478
+ var div_38 = sibling(div_35, 2);
59479
+ var div_39 = child(div_38);
59480
+ var span_14 = child(div_39);
59481
+ var text_31 = child(span_14, true);
59295
59482
  reset(span_14);
59296
59483
  var span_15 = sibling(span_14, 2);
59297
- var text_29 = child(span_15, true);
59484
+ var text_32 = child(span_15, true);
59298
59485
  reset(span_15);
59299
- reset(div_38);
59300
- var div_39 = sibling(div_38, 2);
59301
- var text_30 = child(div_39);
59302
59486
  reset(div_39);
59303
- reset(div_37);
59487
+ var div_40 = sibling(div_39, 2);
59488
+ var text_33 = child(div_40);
59489
+ reset(div_40);
59490
+ reset(div_38);
59491
+ reset(div_34);
59304
59492
  reset(div_33);
59305
- reset(div_32);
59306
59493
  template_effect(() => {
59307
59494
  var _$$get$x, _$$get$y, _$$get$color5, _$$get$color6, _ref, _categoryColors$$$get2, _$$get$width2, _$$get$depth2, _$$get$height;
59308
- set_style(div_32, `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;`);
59309
- set_style(div_35, `background-color: ${(_$$get$color5 = get(item).color) !== null && _$$get$color5 !== void 0 ? _$$get$color5 : ""}20`);
59310
- set_style(div_36, `background-color: ${(_$$get$color6 = get(item).color) !== null && _$$get$color6 !== void 0 ? _$$get$color6 : ""}; opacity: 0.7`);
59311
- set_text(text_28, get(item).name);
59495
+ set_style(div_33, `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;`);
59496
+ set_style(div_36, `background-color: ${(_$$get$color5 = get(item).color) !== null && _$$get$color5 !== void 0 ? _$$get$color5 : ""}20`);
59497
+ set_style(div_37, `background-color: ${(_$$get$color6 = get(item).color) !== null && _$$get$color6 !== void 0 ? _$$get$color6 : ""}; opacity: 0.7`);
59498
+ set_text(text_31, get(item).name);
59312
59499
  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 : ""}`);
59313
- set_text(text_29, get(item).category);
59314
- set_text(text_30, `${(_$$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`);
59500
+ set_text(text_32, get(item).category);
59501
+ set_text(text_33, `${(_$$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`);
59315
59502
  });
59316
- append($$anchor, div_32);
59503
+ append($$anchor, div_33);
59317
59504
  };
59318
- if_block(node_8, ($$render) => {
59319
- if (get(showPreview) && get(hoveredItem)) $$render(consequent_14);
59505
+ if_block(node_9, ($$render) => {
59506
+ if (get(showPreview) && get(hoveredItem)) $$render(consequent_17);
59320
59507
  });
59321
- var node_9 = sibling(node_8, 2);
59322
- var consequent_15 = ($$anchor) => {
59323
- var div_40 = root_25$1();
59324
- var div_41 = child(div_40);
59325
- var p_1 = sibling(child(div_41), 2);
59326
- var text_31 = child(p_1, true);
59327
- reset(p_1);
59328
- var div_42 = sibling(p_1, 2);
59329
- var label = child(div_42);
59508
+ var node_10 = sibling(node_9, 2);
59509
+ var consequent_18 = ($$anchor) => {
59510
+ var div_41 = root_28$1();
59511
+ var div_42 = child(div_41);
59512
+ var p_2 = sibling(child(div_42), 2);
59513
+ var text_34 = child(p_2, true);
59514
+ reset(p_2);
59515
+ var div_43 = sibling(p_2, 2);
59516
+ var label = child(div_43);
59330
59517
  var input_2 = child(label);
59331
59518
  remove_input_defaults(input_2);
59332
59519
  next(2);
@@ -59334,53 +59521,53 @@ function BuildPanel($$anchor, $$props) {
59334
59521
  var label_1 = sibling(label, 2);
59335
59522
  var input_3 = child(label_1);
59336
59523
  remove_input_defaults(input_3);
59337
- var div_43 = sibling(input_3, 2);
59338
- var div_44 = child(div_43);
59339
- var span_16 = sibling(child(div_44));
59340
- var text_32 = child(span_16, true);
59524
+ var div_44 = sibling(input_3, 2);
59525
+ var div_45 = child(div_44);
59526
+ var span_16 = sibling(child(div_45));
59527
+ var text_35 = child(span_16, true);
59341
59528
  reset(span_16);
59342
- reset(div_44);
59529
+ reset(div_45);
59343
59530
  next(2);
59344
- reset(div_43);
59531
+ reset(div_44);
59345
59532
  reset(label_1);
59346
59533
  var label_2 = sibling(label_1, 2);
59347
59534
  var input_4 = sibling(child(label_2), 2);
59348
59535
  remove_input_defaults(input_4);
59349
59536
  reset(label_2);
59537
+ reset(div_43);
59538
+ var div_46 = sibling(div_43, 2);
59539
+ var button_30 = child(div_46);
59540
+ var button_31 = sibling(button_30, 2);
59541
+ reset(div_46);
59350
59542
  reset(div_42);
59351
- var div_45 = sibling(div_42, 2);
59352
- var button_27 = child(div_45);
59353
- var button_28 = sibling(button_27, 2);
59354
- reset(div_45);
59355
59543
  reset(div_41);
59356
- reset(div_40);
59357
59544
  template_effect(() => {
59358
- set_text(text_31, get(importFileName));
59359
- set_text(text_32, "v5");
59545
+ set_text(text_34, get(importFileName));
59546
+ set_text(text_35, "v5");
59360
59547
  });
59361
- delegated("click", div_40, cancelImport);
59362
- delegated("click", div_41, (e) => e.stopPropagation());
59548
+ delegated("click", div_41, cancelImport);
59549
+ delegated("click", div_42, (e) => e.stopPropagation());
59363
59550
  bind_checked(input_2, () => get(optStraighten), ($$value) => set(optStraighten, $$value));
59364
59551
  bind_checked(input_3, () => get(optOrthogonal), ($$value) => set(optOrthogonal, $$value));
59365
59552
  bind_value(input_4, () => get(optMergeDistance), ($$value) => set(optMergeDistance, $$value));
59366
- delegated("click", button_27, cancelImport);
59367
- delegated("click", button_28, confirmImport);
59368
- append($$anchor, div_40);
59553
+ delegated("click", button_30, cancelImport);
59554
+ delegated("click", button_31, confirmImport);
59555
+ append($$anchor, div_41);
59369
59556
  };
59370
- if_block(node_9, ($$render) => {
59371
- if (get(showImportDialog)) $$render(consequent_15);
59557
+ if_block(node_10, ($$render) => {
59558
+ if (get(showImportDialog)) $$render(consequent_18);
59372
59559
  });
59373
59560
  template_effect(() => {
59374
59561
  set_class(button, 1, `flex-1 py-2.5 text-xs font-semibold uppercase tracking-wide ${get(activeTab) === "draw" ? "text-slate-800 border-b-2 border-blue-500 bg-blue-50" : "text-gray-500 hover:text-gray-700"}`);
59375
59562
  set_class(button_1, 1, `flex-1 py-2.5 text-xs font-semibold uppercase tracking-wide ${get(activeTab) === "rooms" ? "text-slate-800 border-b-2 border-blue-500 bg-blue-50" : "text-gray-500 hover:text-gray-700"}`);
59376
59563
  set_class(button_2, 1, `flex-1 py-2.5 text-xs font-semibold uppercase tracking-wide ${get(activeTab) === "objects" ? "text-slate-800 border-b-2 border-blue-500 bg-blue-50" : "text-gray-500 hover:text-gray-700"}`);
59377
- classes = set_class(button_24, 1, "absolute bottom-4 left-14 w-8 h-8 rounded-full shadow-lg hover:bg-slate-600 transition-colors z-50 text-sm", null, classes, {
59564
+ classes = set_class(button_27, 1, "absolute bottom-4 left-14 w-8 h-8 rounded-full shadow-lg hover:bg-slate-600 transition-colors z-50 text-sm", null, classes, {
59378
59565
  "bg-blue-600": showLayers(),
59379
59566
  "text-white": showLayers(),
59380
59567
  "bg-slate-700": !showLayers(),
59381
59568
  "text-gray-300": !showLayers()
59382
59569
  });
59383
- classes_1 = set_class(button_25, 1, "absolute bottom-4 left-24 w-8 h-8 rounded-full shadow-lg hover:bg-slate-600 transition-colors z-50 text-sm", null, classes_1, {
59570
+ classes_1 = set_class(button_28, 1, "absolute bottom-4 left-24 w-8 h-8 rounded-full shadow-lg hover:bg-slate-600 transition-colors z-50 text-sm", null, classes_1, {
59384
59571
  "bg-blue-600": showUndoHistory(),
59385
59572
  "text-white": showUndoHistory(),
59386
59573
  "bg-slate-700": !showUndoHistory(),
@@ -59390,9 +59577,9 @@ function BuildPanel($$anchor, $$props) {
59390
59577
  delegated("click", button, () => set(activeTab, "draw"));
59391
59578
  delegated("click", button_1, () => set(activeTab, "rooms"));
59392
59579
  delegated("click", button_2, () => set(activeTab, "objects"));
59393
- delegated("click", button_24, () => showLayers(!showLayers()));
59394
- delegated("click", button_25, () => showUndoHistory(!showUndoHistory()));
59395
- delegated("click", button_26, () => showHelp(!showHelp()));
59580
+ delegated("click", button_27, () => showLayers(!showLayers()));
59581
+ delegated("click", button_28, () => showUndoHistory(!showUndoHistory()));
59582
+ delegated("click", button_29, () => showHelp(!showHelp()));
59396
59583
  append($$anchor, fragment);
59397
59584
  pop();
59398
59585
  }
@@ -59765,20 +59952,22 @@ var root_13$1 = /* @__PURE__ */ from_html(`<option> </option>`);
59765
59952
  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>`);
59766
59953
  var root_14$1 = /* @__PURE__ */ from_html(`<label class="block"><span class="text-xs text-gray-500"> </span> <input type="text"/></label>`);
59767
59954
  var root_11$1 = /* @__PURE__ */ from_html(`<!> <!>`, 1);
59768
- var root_15$1 = /* @__PURE__ */ from_html(`<button></button>`);
59955
+ var root_15 = /* @__PURE__ */ from_html(`<button></button>`);
59769
59956
  var root_10$1 = /* @__PURE__ */ from_html(`<h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-purple-100 rounded flex items-center justify-center text-xs"> </span> <button> </button></h3> <div class="space-y-3"><!> <div><div class="flex items-center gap-1 mb-2"><span class="text-xs text-gray-500">Color</span> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="text-gray-400"><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="grid grid-cols-5 gap-1.5 mb-2"></div> <div class="flex items-center gap-2"><span class="text-xs text-gray-500">Custom:</span> <input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/></div></div> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" min="1" 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"> </span> <input type="number" min="1" 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"> </span> <input type="number" min="1" 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">Material</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"><option>Wood</option><option>Metal</option><option>Fabric</option><option>Leather</option><option>Glass</option><option>Plastic</option><option>Stone</option><option>Ceramic</option></select></label> <label class="block"><span class="text-xs text-gray-500">Rotation (degrees)</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <div class="flex gap-1"><button class="flex-1 px-2 py-1.5 border border-gray-200 rounded text-sm hover:bg-gray-50 transition-colors" title="Rotate 90° left">↺ 90°</button> <button class="flex-1 px-2 py-1.5 border border-gray-200 rounded text-sm hover:bg-gray-50 transition-colors" title="Rotate 90° right">↻ 90°</button></div> <div class="flex gap-1"><button class="flex-1 px-2 py-1.5 border border-gray-200 rounded text-sm hover:bg-gray-50 transition-colors" title="Flip horizontally">↔ Flip H</button> <button class="flex-1 px-2 py-1.5 border border-gray-200 rounded text-sm hover:bg-gray-50 transition-colors" title="Flip vertically">↕ Flip V</button></div> <button class="w-full px-2 py-1.5 border border-gray-300 rounded text-sm text-gray-600 hover:bg-gray-50 transition-colors">Reset to defaults</button></div>`, 1);
59770
59957
  var root_17$1 = /* @__PURE__ */ from_html(`<label class="block pb-3 border-b border-gray-200"><span class="text-xs text-gray-500"> </span> <input type="range" min="0.05" max="1" step="0.05" class="w-full"/></label>`);
59771
59958
  var root_18$1 = /* @__PURE__ */ from_html(`<option> </option>`);
59772
59959
  var root_19$1 = /* @__PURE__ */ from_html(`<button></button>`);
59773
59960
  var root_22$1 = /* @__PURE__ */ from_html(`<button><div class="w-full h-12 rounded-md mb-1 overflow-hidden"></div> <div class="text-center leading-3 text-[10px] text-gray-600 truncate"> </div></button>`);
59774
59961
  var root_20$1 = /* @__PURE__ */ from_html(`<div><span class="text-xs font-medium text-gray-600 mb-1.5 block"> </span> <div class="grid grid-cols-3 gap-1.5"></div></div>`);
59775
- var root_16 = /* @__PURE__ */ from_html(`<h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-green-100 rounded flex items-center justify-center text-xs">⬜</span> Room Properties</h3> <div class="space-y-3"><!> <label class="block"><span class="text-xs text-gray-500">Room Type</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"></select></label> <label class="block"><span class="text-xs text-gray-500">Room Name</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">Category</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"><option>🏠 Indoor</option><option>🌳 Outdoor</option><option>🚗 Garage</option><option>🔧 Utility</option></select></label> <div><span class="text-xs text-gray-500">Area</span> <p class="text-sm text-gray-700"> </p></div> <div><span class="text-xs text-gray-500 mb-1.5 block">Room Color</span> <div class="grid grid-cols-5 gap-1.5 mb-2"></div> <div class="flex items-center gap-2"><span class="text-xs text-gray-500">Custom:</span> <input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/></div></div> <div><div class="flex items-center gap-1 mb-2"><span class="text-xs text-gray-500">Floor Material</span> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="text-gray-400"><path d="M3 3h18v18H3z"></path><path d="M8 8h8v8H8z"></path></svg></div> <div class="space-y-3"></div></div></div>`, 1);
59962
+ var root_16$1 = /* @__PURE__ */ from_html(`<h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-green-100 rounded flex items-center justify-center text-xs">⬜</span> Room Properties</h3> <div class="space-y-3"><!> <label class="block"><span class="text-xs text-gray-500">Room Type</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"></select></label> <label class="block"><span class="text-xs text-gray-500">Room Name</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">Category</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"><option>🏠 Indoor</option><option>🌳 Outdoor</option><option>🚗 Garage</option><option>🔧 Utility</option></select></label> <div><span class="text-xs text-gray-500">Area</span> <p class="text-sm text-gray-700"> </p></div> <div><span class="text-xs text-gray-500 mb-1.5 block">Room Color</span> <div class="grid grid-cols-5 gap-1.5 mb-2"></div> <div class="flex items-center gap-2"><span class="text-xs text-gray-500">Custom:</span> <input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/></div></div> <div><div class="flex items-center gap-1 mb-2"><span class="text-xs text-gray-500">Floor Material</span> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="text-gray-400"><path d="M3 3h18v18H3z"></path><path d="M8 8h8v8H8z"></path></svg></div> <div class="space-y-3"></div></div></div>`, 1);
59776
59963
  var root_23$1 = /* @__PURE__ */ from_html(`<h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-gray-200 rounded flex items-center justify-center text-xs">🪜</span> Stair Properties</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Type</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"><option>Straight</option><option>L-Shaped</option><option>U-Shaped</option><option>Spiral</option></select></label> <label class="block"><span class="text-xs text-gray-500"> </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"> </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">Risers</span> <input type="number" min="3" max="30" 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">Direction</span> <div class="flex gap-2"><button>Up ↑</button> <button>Down ↓</button></div></label> <label class="block"><span class="text-xs text-gray-500">Rotation (degrees)</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label></div>`, 1);
59777
59964
  var root_25 = /* @__PURE__ */ from_html(`<button></button>`);
59778
59965
  var root_26 = /* @__PURE__ */ from_html(`<label class="block"><span class="text-xs text-gray-500">Rotation (degrees)</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label>`);
59779
- var root_24$1 = /* @__PURE__ */ from_html(`<h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-gray-200 rounded flex items-center justify-center text-xs">🏛️</span> Column Properties</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Shape</span> <div class="flex gap-2"><button>⭕ Round</button> <button>⬜ Square</button></div></label> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" min="10" max="200" 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"> </span> <input type="number" min="50" max="1000" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <div><span class="text-xs text-gray-500 mb-1.5 block">Color</span> <div class="grid grid-cols-5 gap-1.5 mb-2"></div> <div class="flex items-center gap-2"><span class="text-xs text-gray-500">Custom:</span> <input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/></div></div> <!></div>`, 1);
59780
- var root_27 = /* @__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>`);
59781
- var root_28 = /* @__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>`);
59966
+ var root_24 = /* @__PURE__ */ from_html(`<h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-gray-200 rounded flex items-center justify-center text-xs">🏛️</span> Column Properties</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Shape</span> <div class="flex gap-2"><button>⭕ Round</button> <button>⬜ Square</button></div></label> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" min="10" max="200" 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"> </span> <input type="number" min="50" max="1000" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <div><span class="text-xs text-gray-500 mb-1.5 block">Color</span> <div class="grid grid-cols-5 gap-1.5 mb-2"></div> <div class="flex items-center gap-2"><span class="text-xs text-gray-500">Custom:</span> <input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/></div></div> <!></div>`, 1);
59967
+ var root_28 = /* @__PURE__ */ from_html(`<button type="button"></button>`);
59968
+ var root_27 = /* @__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"/></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>`);
59969
+ 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 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>`);
59970
+ var root_30 = /* @__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>`);
59782
59971
  var root$3 = /* @__PURE__ */ from_html(`<div data-properties-panel="" style="top: 0; bottom: 0;"><!> <!></div>`);
59783
59972
  function PropertiesPanel($$anchor, $$props) {
59784
59973
  push($$props, true);
@@ -59846,29 +60035,33 @@ function PropertiesPanel($$anchor, $$props) {
59846
60035
  var _$$get$textAnnotation, _$$get7;
59847
60036
  return (_$$get$textAnnotation = (_$$get7 = get(floor)) === null || _$$get7 === void 0 || (_$$get7 = _$$get7.textAnnotations) === null || _$$get7 === void 0 ? void 0 : _$$get7.find((t) => t.id === get(selId))) !== null && _$$get$textAnnotation !== void 0 ? _$$get$textAnnotation : null;
59848
60037
  });
60038
+ let selectedZone = /* @__PURE__ */ user_derived(() => {
60039
+ var _$$get$zones$find, _$$get8;
60040
+ return (_$$get$zones$find = (_$$get8 = get(floor)) === null || _$$get8 === void 0 || (_$$get8 = _$$get8.zones) === null || _$$get8 === void 0 ? void 0 : _$$get8.find((z) => z.id === get(selId))) !== null && _$$get$zones$find !== void 0 ? _$$get$zones$find : null;
60041
+ });
59849
60042
  let hasBgImage = /* @__PURE__ */ user_derived(() => {
59850
- var _$$get8;
59851
- return !!((_$$get8 = get(floor)) === null || _$$get8 === void 0 ? void 0 : _$$get8.backgroundImage);
60043
+ var _$$get9;
60044
+ return !!((_$$get9 = get(floor)) === null || _$$get9 === void 0 ? void 0 : _$$get9.backgroundImage);
59852
60045
  });
59853
60046
  let hasCameraThumbnailOverlay = /* @__PURE__ */ user_derived(() => {
59854
- var _cameraThumbnail, _$$get9;
59855
- return !!((_cameraThumbnail = cameraThumbnail()) === null || _cameraThumbnail === void 0 ? void 0 : _cameraThumbnail.trim()) && !((_$$get9 = get(floor)) === null || _$$get9 === void 0 ? void 0 : _$$get9.backgroundImage);
60047
+ var _cameraThumbnail, _$$get10;
60048
+ return !!((_cameraThumbnail = cameraThumbnail()) === null || _cameraThumbnail === void 0 ? void 0 : _cameraThumbnail.trim()) && !((_$$get10 = get(floor)) === null || _$$get10 === void 0 ? void 0 : _$$get10.backgroundImage);
59856
60049
  });
59857
60050
  let thumbOpacity = /* @__PURE__ */ state(.65);
59858
60051
  cameraThumbnailOpacity.subscribe((v) => {
59859
60052
  set(thumbOpacity, v, true);
59860
60053
  });
59861
60054
  let selectedRoom = /* @__PURE__ */ user_derived(() => {
59862
- var _ref, _$$get$rooms$find, _$$get10;
59863
- return (_ref = (_$$get$rooms$find = (_$$get10 = get(floor)) === null || _$$get10 === void 0 || (_$$get10 = _$$get10.rooms) === null || _$$get10 === void 0 ? void 0 : _$$get10.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;
60055
+ var _ref, _$$get$rooms$find, _$$get11;
60056
+ 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;
59864
60057
  });
59865
60058
  let selectedDoorWall = /* @__PURE__ */ user_derived(() => {
59866
- var _ref2, _$$get11;
59867
- return (_ref2 = get(selectedDoor) && ((_$$get11 = get(floor)) === null || _$$get11 === void 0 || (_$$get11 = _$$get11.walls) === null || _$$get11 === void 0 ? void 0 : _$$get11.find((w) => w.id === get(selectedDoor).wallId))) !== null && _ref2 !== void 0 ? _ref2 : null;
60059
+ var _ref2, _$$get12;
60060
+ 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;
59868
60061
  });
59869
60062
  let selectedWindowWall = /* @__PURE__ */ user_derived(() => {
59870
- var _ref3, _$$get12;
59871
- return (_ref3 = get(selectedWindow) && ((_$$get12 = get(floor)) === null || _$$get12 === void 0 || (_$$get12 = _$$get12.walls) === null || _$$get12 === void 0 ? void 0 : _$$get12.find((w) => w.id === get(selectedWindow).wallId))) !== null && _ref3 !== void 0 ? _ref3 : null;
60063
+ var _ref3, _$$get13;
60064
+ 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;
59872
60065
  });
59873
60066
  function calcWallLength(wall) {
59874
60067
  if (wall.curvePoint) {
@@ -59986,14 +60179,14 @@ function PropertiesPanel($$anchor, $$props) {
59986
60179
  });
59987
60180
  /** Host-assigned camera fields are read-only; package fields (color/size/…) stay editable. */
59988
60181
  const cameraPropsLocked = /* @__PURE__ */ user_derived(() => {
59989
- var _$$get13;
59990
- return !!(((_$$get13 = get(selectedFurniture)) === null || _$$get13 === void 0 ? void 0 : _$$get13.catalogId) === "camera" && get(selectedFurniture).props && Object.keys(get(selectedFurniture).props).length > 0);
60182
+ var _$$get14;
60183
+ return !!(((_$$get14 = get(selectedFurniture)) === null || _$$get14 === void 0 ? void 0 : _$$get14.catalogId) === "camera" && get(selectedFurniture).props && Object.keys(get(selectedFurniture).props).length > 0);
59991
60184
  });
59992
60185
  const useSiteCameraSelect = /* @__PURE__ */ user_derived(() => siteCameras().length > 0);
59993
60186
  const usedCameraSerials = /* @__PURE__ */ user_derived(() => {
59994
- var _$$get14;
60187
+ var _$$get15;
59995
60188
  const used = /* @__PURE__ */ new Set();
59996
- if (!((_$$get14 = get(floor)) === null || _$$get14 === void 0 ? void 0 : _$$get14.furniture) || !get(selectedFurniture)) return used;
60189
+ if (!((_$$get15 = get(floor)) === null || _$$get15 === void 0 ? void 0 : _$$get15.furniture) || !get(selectedFurniture)) return used;
59997
60190
  for (const item of get(floor).furniture) {
59998
60191
  if (item.catalogId !== "camera" || item.id === get(selectedFurniture).id) continue;
59999
60192
  if (item.serial) used.add(item.serial);
@@ -60586,7 +60779,7 @@ function PropertiesPanel($$anchor, $$props) {
60586
60779
  reset(label_11);
60587
60780
  reset(div_11);
60588
60781
  template_effect(($0, $1, $2, $3, $4, $5, $6, $7) => {
60589
- var _$$get15, _$$get16, _$$get17, _$$get18;
60782
+ var _$$get16, _$$get17, _$$get18, _$$get19;
60590
60783
  set_text(text_6, `Width (${$0 !== null && $0 !== void 0 ? $0 : ""})`);
60591
60784
  set_value(input_5, $1);
60592
60785
  set_text(text_7, `Distance from A (${$2 !== null && $2 !== void 0 ? $2 : ""})`);
@@ -60599,10 +60792,10 @@ function PropertiesPanel($$anchor, $$props) {
60599
60792
  var _select$__value;
60600
60793
  select.value = (_select$__value = select.__value = get(selectedDoor).type) !== null && _select$__value !== void 0 ? _select$__value : "", select_option(select, get(selectedDoor).type);
60601
60794
  }
60602
- set_class(button_9, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get15 = get(selectedDoor)) === null || _$$get15 === void 0 ? void 0 : _$$get15.swingDirection) === "left" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60603
- set_class(button_10, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get16 = get(selectedDoor)) === null || _$$get16 === void 0 ? void 0 : _$$get16.swingDirection) === "right" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60604
- set_class(button_11, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${!((_$$get17 = get(selectedDoor)) === null || _$$get17 === void 0 ? void 0 : _$$get17.flipSide) ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60605
- set_class(button_12, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get18 = get(selectedDoor)) === null || _$$get18 === void 0 ? void 0 : _$$get18.flipSide) ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60795
+ set_class(button_9, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${((_$$get16 = get(selectedDoor)) === null || _$$get16 === void 0 ? void 0 : _$$get16.swingDirection) === "left" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60796
+ set_class(button_10, 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) === "right" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60797
+ set_class(button_11, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${!((_$$get18 = get(selectedDoor)) === null || _$$get18 === void 0 ? void 0 : _$$get18.flipSide) ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
60798
+ set_class(button_12, 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"}`);
60606
60799
  }, [
60607
60800
  () => unitLabel(),
60608
60801
  () => displayValue(get(selectedDoor).width),
@@ -60807,7 +61000,7 @@ function PropertiesPanel($$anchor, $$props) {
60807
61000
  "#dc143c",
60808
61001
  "#228b22"
60809
61002
  ], index$1, ($$anchor, color) => {
60810
- var button_14 = root_15$1();
61003
+ var button_14 = root_15();
60811
61004
  template_effect(($0) => {
60812
61005
  set_class(button_14, 1, `w-6 h-6 rounded border-2 hover:border-gray-300 transition-colors ${$0 !== null && $0 !== void 0 ? $0 : ""}`);
60813
61006
  set_style(button_14, `background-color: ${color !== null && color !== void 0 ? color : ""}`);
@@ -60970,7 +61163,7 @@ function PropertiesPanel($$anchor, $$props) {
60970
61163
  append($$anchor, fragment_3);
60971
61164
  };
60972
61165
  var consequent_9 = ($$anchor) => {
60973
- var fragment_5 = root_16();
61166
+ var fragment_5 = root_16$1();
60974
61167
  var div_21 = sibling(first_child(fragment_5), 2);
60975
61168
  var node_8 = child(div_21);
60976
61169
  var consequent_7 = ($$anchor) => {
@@ -61200,7 +61393,7 @@ function PropertiesPanel($$anchor, $$props) {
61200
61393
  append($$anchor, fragment_7);
61201
61394
  };
61202
61395
  var consequent_12 = ($$anchor) => {
61203
- var fragment_8 = root_24$1();
61396
+ var fragment_8 = root_24();
61204
61397
  var div_34 = sibling(first_child(fragment_8), 2);
61205
61398
  var label_35 = child(div_34);
61206
61399
  var div_35 = sibling(child(label_35), 2);
@@ -61278,24 +61471,57 @@ function PropertiesPanel($$anchor, $$props) {
61278
61471
  };
61279
61472
  var consequent_13 = ($$anchor) => {
61280
61473
  var div_39 = root_27();
61281
- var label_39 = sibling(child(div_39), 2);
61474
+ var h3_1 = child(div_39);
61475
+ var span_25 = child(h3_1);
61476
+ next();
61477
+ reset(h3_1);
61478
+ var label_39 = sibling(h3_1, 2);
61282
61479
  var input_31 = sibling(child(label_39), 2);
61283
61480
  remove_input_defaults(input_31);
61284
61481
  reset(label_39);
61285
- var label_40 = sibling(label_39, 2);
61286
- var input_32 = sibling(child(label_40), 2);
61482
+ var div_40 = sibling(label_39, 2);
61483
+ var span_26 = sibling(child(div_40));
61484
+ var text_32 = child(span_26, true);
61485
+ reset(span_26);
61486
+ reset(div_40);
61487
+ var label_40 = sibling(div_40, 2);
61488
+ var div_41 = sibling(child(label_40), 2);
61489
+ var node_11 = child(div_41);
61490
+ each(node_11, 17, () => ZONE_COLOR_PALETTE, index$1, ($$anchor, c) => {
61491
+ var button_27 = root_28();
61492
+ template_effect(() => {
61493
+ var _$$get20;
61494
+ set_class(button_27, 1, `w-6 h-6 rounded border-2 ${get(selectedZone).color === get(c) ? "border-slate-800" : "border-transparent"}`);
61495
+ set_style(button_27, `background:${(_$$get20 = get(c)) !== null && _$$get20 !== void 0 ? _$$get20 : ""}`);
61496
+ });
61497
+ delegated("click", button_27, () => updateZone(get(selectedZone).id, { color: get(c) }));
61498
+ append($$anchor, button_27);
61499
+ });
61500
+ var input_32 = sibling(node_11, 2);
61287
61501
  remove_input_defaults(input_32);
61502
+ reset(div_41);
61288
61503
  reset(label_40);
61289
61504
  var label_41 = sibling(label_40, 2);
61290
- var div_40 = sibling(child(label_41), 2);
61291
- var input_33 = child(div_40);
61505
+ var input_33 = sibling(child(label_41), 2);
61292
61506
  remove_input_defaults(input_33);
61293
- var span_25 = sibling(input_33, 2);
61294
- var text_32 = child(span_25, true);
61295
- reset(span_25);
61296
- reset(div_40);
61297
61507
  reset(label_41);
61298
- var label_42 = sibling(label_41, 2);
61508
+ reset(div_39);
61509
+ template_effect(() => {
61510
+ var _$$get$color8, _$$get$color9, _$$get$fillOpacity;
61511
+ set_style(span_25, `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 : ""}`);
61512
+ set_value(input_31, get(selectedZone).name);
61513
+ set_text(text_32, get(selectedZone).shape);
61514
+ set_value(input_32, get(selectedZone).color);
61515
+ set_value(input_33, (_$$get$fillOpacity = get(selectedZone).fillOpacity) !== null && _$$get$fillOpacity !== void 0 ? _$$get$fillOpacity : .1);
61516
+ });
61517
+ delegated("input", input_31, (e) => updateZone(get(selectedZone).id, { name: e.target.value }));
61518
+ delegated("input", input_32, (e) => updateZone(get(selectedZone).id, { color: e.target.value }));
61519
+ delegated("input", input_33, (e) => updateZone(get(selectedZone).id, { fillOpacity: Number(e.target.value) }));
61520
+ append($$anchor, div_39);
61521
+ };
61522
+ var consequent_14 = ($$anchor) => {
61523
+ var div_42 = root_29();
61524
+ var label_42 = sibling(child(div_42), 2);
61299
61525
  var input_34 = sibling(child(label_42), 2);
61300
61526
  remove_input_defaults(input_34);
61301
61527
  reset(label_42);
@@ -61304,42 +61530,15 @@ function PropertiesPanel($$anchor, $$props) {
61304
61530
  remove_input_defaults(input_35);
61305
61531
  reset(label_43);
61306
61532
  var label_44 = sibling(label_43, 2);
61307
- var input_36 = sibling(child(label_44), 2);
61533
+ var div_43 = sibling(child(label_44), 2);
61534
+ var input_36 = child(div_43);
61308
61535
  remove_input_defaults(input_36);
61536
+ var span_27 = sibling(input_36, 2);
61537
+ var text_33 = child(span_27, true);
61538
+ reset(span_27);
61539
+ reset(div_43);
61309
61540
  reset(label_44);
61310
- reset(div_39);
61311
- template_effect(($0, $1) => {
61312
- set_value(input_31, get(selectedTextAnnotation).text);
61313
- set_value(input_32, get(selectedTextAnnotation).fontSize);
61314
- set_value(input_33, get(selectedTextAnnotation).color);
61315
- set_text(text_32, get(selectedTextAnnotation).color);
61316
- set_value(input_34, get(selectedTextAnnotation).rotation);
61317
- set_value(input_35, $0);
61318
- set_value(input_36, $1);
61319
- }, [() => Math.round(get(selectedTextAnnotation).x), () => Math.round(get(selectedTextAnnotation).y)]);
61320
- delegated("input", input_31, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { text: e.target.value }));
61321
- delegated("input", input_32, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { fontSize: Number(e.target.value) }));
61322
- delegated("input", input_33, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { color: e.target.value }));
61323
- delegated("input", input_34, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { rotation: Number(e.target.value) }));
61324
- delegated("input", input_35, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { x: Number(e.target.value) }));
61325
- delegated("input", input_36, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { y: Number(e.target.value) }));
61326
- append($$anchor, div_39);
61327
- };
61328
- if_block(node, ($$render) => {
61329
- if (get(selectedWall)) $$render(consequent_1);
61330
- else if (get(selectedDoor)) $$render(consequent_2, 1);
61331
- else if (get(selectedWindow)) $$render(consequent_3, 2);
61332
- else if (get(selectedFurniture)) $$render(consequent_6, 3);
61333
- else if (get(selectedRoom)) $$render(consequent_9, 4);
61334
- else if (get(selectedStair)) $$render(consequent_10, 5);
61335
- else if (get(selectedColumn)) $$render(consequent_12, 6);
61336
- else if (get(selectedTextAnnotation)) $$render(consequent_13, 7);
61337
- });
61338
- var node_11 = sibling(node, 2);
61339
- var consequent_14 = ($$anchor) => {
61340
- var div_41 = root_28();
61341
- var div_42 = sibling(child(div_41), 2);
61342
- var label_45 = child(div_42);
61541
+ var label_45 = sibling(label_44, 2);
61343
61542
  var input_37 = sibling(child(label_45), 2);
61344
61543
  remove_input_defaults(input_37);
61345
61544
  reset(label_45);
@@ -61351,36 +61550,81 @@ function PropertiesPanel($$anchor, $$props) {
61351
61550
  var input_39 = sibling(child(label_47), 2);
61352
61551
  remove_input_defaults(input_39);
61353
61552
  reset(label_47);
61354
- var div_43 = sibling(label_47, 2);
61355
- var button_27 = child(div_43);
61356
- var text_33 = child(button_27, true);
61357
- reset(button_27);
61358
- var button_28 = sibling(button_27, 2);
61359
- reset(div_43);
61360
- var button_29 = sibling(div_43, 2);
61361
61553
  reset(div_42);
61362
- reset(div_41);
61554
+ template_effect(($0, $1) => {
61555
+ set_value(input_34, get(selectedTextAnnotation).text);
61556
+ set_value(input_35, get(selectedTextAnnotation).fontSize);
61557
+ set_value(input_36, get(selectedTextAnnotation).color);
61558
+ set_text(text_33, get(selectedTextAnnotation).color);
61559
+ set_value(input_37, get(selectedTextAnnotation).rotation);
61560
+ set_value(input_38, $0);
61561
+ set_value(input_39, $1);
61562
+ }, [() => Math.round(get(selectedTextAnnotation).x), () => Math.round(get(selectedTextAnnotation).y)]);
61563
+ delegated("input", input_34, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { text: e.target.value }));
61564
+ delegated("input", input_35, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { fontSize: Number(e.target.value) }));
61565
+ delegated("input", input_36, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { color: e.target.value }));
61566
+ delegated("input", input_37, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { rotation: Number(e.target.value) }));
61567
+ delegated("input", input_38, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { x: Number(e.target.value) }));
61568
+ delegated("input", input_39, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { y: Number(e.target.value) }));
61569
+ append($$anchor, div_42);
61570
+ };
61571
+ if_block(node, ($$render) => {
61572
+ if (get(selectedWall)) $$render(consequent_1);
61573
+ else if (get(selectedDoor)) $$render(consequent_2, 1);
61574
+ else if (get(selectedWindow)) $$render(consequent_3, 2);
61575
+ else if (get(selectedFurniture)) $$render(consequent_6, 3);
61576
+ else if (get(selectedRoom)) $$render(consequent_9, 4);
61577
+ else if (get(selectedStair)) $$render(consequent_10, 5);
61578
+ else if (get(selectedColumn)) $$render(consequent_12, 6);
61579
+ else if (get(selectedZone)) $$render(consequent_13, 7);
61580
+ else if (get(selectedTextAnnotation)) $$render(consequent_14, 8);
61581
+ });
61582
+ var node_12 = sibling(node, 2);
61583
+ var consequent_15 = ($$anchor) => {
61584
+ var div_44 = root_30();
61585
+ var div_45 = sibling(child(div_44), 2);
61586
+ var label_48 = child(div_45);
61587
+ var input_40 = sibling(child(label_48), 2);
61588
+ remove_input_defaults(input_40);
61589
+ reset(label_48);
61590
+ var label_49 = sibling(label_48, 2);
61591
+ var input_41 = sibling(child(label_49), 2);
61592
+ remove_input_defaults(input_41);
61593
+ reset(label_49);
61594
+ var label_50 = sibling(label_49, 2);
61595
+ var input_42 = sibling(child(label_50), 2);
61596
+ remove_input_defaults(input_42);
61597
+ reset(label_50);
61598
+ var div_46 = sibling(label_50, 2);
61599
+ var button_28 = child(div_46);
61600
+ var text_34 = child(button_28, true);
61601
+ reset(button_28);
61602
+ var button_29 = sibling(button_28, 2);
61603
+ reset(div_46);
61604
+ var button_30 = sibling(div_46, 2);
61605
+ reset(div_45);
61606
+ reset(div_44);
61363
61607
  template_effect(() => {
61364
- set_value(input_37, get(floor).backgroundImage.opacity);
61365
- set_value(input_38, get(floor).backgroundImage.scale);
61366
- set_value(input_39, get(floor).backgroundImage.rotation);
61367
- set_class(button_27, 1, `flex-1 px-2 py-1.5 border rounded text-sm ${get(floor).backgroundImage.locked ? "bg-amber-100 border-amber-400 text-amber-700" : "border-gray-200 hover:bg-gray-50"}`);
61368
- set_text(text_33, get(floor).backgroundImage.locked ? "🔒 Locked" : "🔓 Unlocked");
61608
+ set_value(input_40, get(floor).backgroundImage.opacity);
61609
+ set_value(input_41, get(floor).backgroundImage.scale);
61610
+ set_value(input_42, get(floor).backgroundImage.rotation);
61611
+ set_class(button_28, 1, `flex-1 px-2 py-1.5 border rounded text-sm ${get(floor).backgroundImage.locked ? "bg-amber-100 border-amber-400 text-amber-700" : "border-gray-200 hover:bg-gray-50"}`);
61612
+ set_text(text_34, get(floor).backgroundImage.locked ? "🔒 Locked" : "🔓 Unlocked");
61369
61613
  });
61370
- delegated("input", input_37, (e) => updateBackgroundImage({ opacity: Number(e.target.value) }));
61371
- delegated("input", input_38, (e) => updateBackgroundImage({ scale: Number(e.target.value) }));
61372
- delegated("input", input_39, (e) => updateBackgroundImage({ rotation: Number(e.target.value) }));
61373
- delegated("click", button_27, () => updateBackgroundImage({ locked: !get(floor).backgroundImage.locked }));
61374
- delegated("click", button_28, () => {
61614
+ delegated("input", input_40, (e) => updateBackgroundImage({ opacity: Number(e.target.value) }));
61615
+ delegated("input", input_41, (e) => updateBackgroundImage({ scale: Number(e.target.value) }));
61616
+ delegated("input", input_42, (e) => updateBackgroundImage({ rotation: Number(e.target.value) }));
61617
+ delegated("click", button_28, () => updateBackgroundImage({ locked: !get(floor).backgroundImage.locked }));
61618
+ delegated("click", button_29, () => {
61375
61619
  calibrationPoints.set([]);
61376
61620
  calibrationMode.set(true);
61377
61621
  });
61378
- delegated("click", button_29, () => setBackgroundImage(void 0));
61379
- append($$anchor, div_41);
61622
+ delegated("click", button_30, () => setBackgroundImage(void 0));
61623
+ append($$anchor, div_44);
61380
61624
  };
61381
- if_block(node_11, ($$render) => {
61382
- var _$$get19;
61383
- if (get(hasBgImage) && ((_$$get19 = get(floor)) === null || _$$get19 === void 0 ? void 0 : _$$get19.backgroundImage)) $$render(consequent_14);
61625
+ if_block(node_12, ($$render) => {
61626
+ var _$$get21;
61627
+ if (get(hasBgImage) && ((_$$get21 = get(floor)) === null || _$$get21 === void 0 ? void 0 : _$$get21.backgroundImage)) $$render(consequent_15);
61384
61628
  });
61385
61629
  reset(div);
61386
61630
  template_effect(() => classes = set_class(div, 1, `${is3D() ? "w-80" : "w-64"} 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) }));
@@ -61424,10 +61668,14 @@ function LayersPanel($$anchor, $$props) {
61424
61668
  columns: true,
61425
61669
  guides: true,
61426
61670
  measurements: true,
61427
- annotations: true
61671
+ annotations: true,
61672
+ zones: true
61428
61673
  }));
61429
61674
  layerVisibility.subscribe((v) => {
61430
- set(vis, v, true);
61675
+ set(vis, {
61676
+ zones: true,
61677
+ ...v
61678
+ }, true);
61431
61679
  });
61432
61680
  let collapsed = proxy({});
61433
61681
  function toggle(cat) {
@@ -61443,7 +61691,7 @@ function LayersPanel($$anchor, $$props) {
61443
61691
  selectedElementId.set(id);
61444
61692
  }
61445
61693
  let categories = /* @__PURE__ */ user_derived(() => {
61446
- var _$$get$stairs, _$$get$columns, _$$get$guides, _$$get$measurements, _$$get$annotations;
61694
+ var _$$get$stairs, _$$get$columns, _$$get$zones, _$$get$guides, _$$get$measurements, _$$get$annotations;
61447
61695
  if (!get(floor)) return [];
61448
61696
  const cats = [];
61449
61697
  cats.push({
@@ -61510,6 +61758,16 @@ function LayersPanel($$anchor, $$props) {
61510
61758
  icon: "🏛️"
61511
61759
  }))
61512
61760
  });
61761
+ if ((_$$get$zones = get(floor).zones) === null || _$$get$zones === void 0 ? void 0 : _$$get$zones.length) cats.push({
61762
+ key: "zones",
61763
+ label: "Zones",
61764
+ icon: "⬡",
61765
+ items: get(floor).zones.map((z) => ({
61766
+ id: z.id,
61767
+ label: z.name || z.shape,
61768
+ icon: "⬡"
61769
+ }))
61770
+ });
61513
61771
  if ((_$$get$guides = get(floor).guides) === null || _$$get$guides === void 0 ? void 0 : _$$get$guides.length) cats.push({
61514
61772
  key: "guides",
61515
61773
  label: "Guides",
@@ -64456,6 +64714,120 @@ function drawTextAnnotations(cs, floor, selectedTextAnnotationId, currentSelecte
64456
64714
  ctx.restore();
64457
64715
  }
64458
64716
  }
64717
+ function hexToRgba(hex, alpha) {
64718
+ const c = hex.trim();
64719
+ const short = c.match(/^#([0-9a-f]{3})$/i);
64720
+ let h = c;
64721
+ if (short) {
64722
+ const s = short[1];
64723
+ h = `#${s[0]}${s[0]}${s[1]}${s[1]}${s[2]}${s[2]}`;
64724
+ }
64725
+ const m = h.match(/^#([0-9a-f]{6})$/i);
64726
+ if (!m) return `rgba(249, 115, 22, ${alpha})`;
64727
+ const n = parseInt(m[1], 16);
64728
+ return `rgba(${n >> 16 & 255}, ${n >> 8 & 255}, ${n & 255}, ${alpha})`;
64729
+ }
64730
+ function pathZonePolygon(ctx, cs, points) {
64731
+ if (points.length < 2) return;
64732
+ const first = wts(cs, points[0].x, points[0].y);
64733
+ ctx.moveTo(first.x, first.y);
64734
+ for (let i = 1; i < points.length; i++) {
64735
+ const s = wts(cs, points[i].x, points[i].y);
64736
+ ctx.lineTo(s.x, s.y);
64737
+ }
64738
+ ctx.closePath();
64739
+ }
64740
+ function drawZoneShape(cs, zone, selected) {
64741
+ const pts = zone.points;
64742
+ if (!pts || pts.length < 2) return;
64743
+ const { ctx, zoom } = cs;
64744
+ const color = zone.color || "#F97316";
64745
+ const fillA = typeof zone.fillOpacity === "number" ? zone.fillOpacity : DEFAULT_ZONE_FILL_OPACITY;
64746
+ ctx.save();
64747
+ ctx.beginPath();
64748
+ pathZonePolygon(ctx, cs, pts);
64749
+ ctx.fillStyle = hexToRgba(color, fillA);
64750
+ ctx.fill();
64751
+ ctx.setLineDash([8 * Math.max(.6, zoom), 6 * Math.max(.6, zoom)]);
64752
+ ctx.strokeStyle = color;
64753
+ ctx.lineWidth = selected ? 2.5 : 1.75;
64754
+ ctx.lineJoin = "round";
64755
+ ctx.stroke();
64756
+ ctx.setLineDash([]);
64757
+ const b = zoneBounds(pts);
64758
+ if (b && zone.name) {
64759
+ const pad = 6;
64760
+ const labelPos = wts(cs, b.minX, b.minY);
64761
+ const fontSize = Math.max(11, 12 * Math.min(1.2, Math.max(.75, zoom)));
64762
+ ctx.font = `600 ${fontSize}px system-ui, sans-serif`;
64763
+ ctx.textAlign = "left";
64764
+ ctx.textBaseline = "top";
64765
+ const tw = ctx.measureText(zone.name).width;
64766
+ const bx = labelPos.x + pad;
64767
+ const by = labelPos.y + pad;
64768
+ const bw = tw + 12;
64769
+ const bh = fontSize + 8;
64770
+ ctx.fillStyle = hexToRgba(color, .22);
64771
+ ctx.beginPath();
64772
+ ctx.roundRect(bx, by, bw, bh, 4);
64773
+ ctx.fill();
64774
+ ctx.fillStyle = color;
64775
+ ctx.fillText(zone.name, bx + 6, by + 4);
64776
+ }
64777
+ if (selected) for (const p of pts) {
64778
+ const s = wts(cs, p.x, p.y);
64779
+ ctx.fillStyle = "#ffffff";
64780
+ ctx.strokeStyle = color;
64781
+ ctx.lineWidth = 1.5;
64782
+ ctx.beginPath();
64783
+ ctx.arc(s.x, s.y, 5, 0, Math.PI * 2);
64784
+ ctx.fill();
64785
+ ctx.stroke();
64786
+ }
64787
+ ctx.restore();
64788
+ }
64789
+ function drawZones(cs, floor, selectedZoneId) {
64790
+ var _floor$zones;
64791
+ if (!((_floor$zones = floor.zones) === null || _floor$zones === void 0 ? void 0 : _floor$zones.length)) return;
64792
+ for (const z of floor.zones) drawZoneShape(cs, z, z.id === selectedZoneId);
64793
+ }
64794
+ /** Preview while drawing polygon / dragging rect. */
64795
+ function drawZoneDraft(cs, points, color, closed, cursor) {
64796
+ if (!points.length && !cursor) return;
64797
+ const { ctx, zoom } = cs;
64798
+ const pts = [...points];
64799
+ if (cursor) pts.push(cursor);
64800
+ ctx.save();
64801
+ ctx.strokeStyle = color;
64802
+ ctx.fillStyle = hexToRgba(color, .08);
64803
+ ctx.lineWidth = 1.5;
64804
+ ctx.setLineDash([6 * Math.max(.6, zoom), 4 * Math.max(.6, zoom)]);
64805
+ if (pts.length >= 2) {
64806
+ ctx.beginPath();
64807
+ const first = wts(cs, pts[0].x, pts[0].y);
64808
+ ctx.moveTo(first.x, first.y);
64809
+ for (let i = 1; i < pts.length; i++) {
64810
+ const s = wts(cs, pts[i].x, pts[i].y);
64811
+ ctx.lineTo(s.x, s.y);
64812
+ }
64813
+ if (closed && pts.length >= 3) {
64814
+ ctx.closePath();
64815
+ ctx.fill();
64816
+ }
64817
+ ctx.stroke();
64818
+ }
64819
+ for (const p of points) {
64820
+ const s = wts(cs, p.x, p.y);
64821
+ ctx.setLineDash([]);
64822
+ ctx.fillStyle = "#fff";
64823
+ ctx.strokeStyle = color;
64824
+ ctx.beginPath();
64825
+ ctx.arc(s.x, s.y, 4, 0, Math.PI * 2);
64826
+ ctx.fill();
64827
+ ctx.stroke();
64828
+ }
64829
+ ctx.restore();
64830
+ }
64459
64831
  function drawAnnotation(cs, a, selected, dimSettings) {
64460
64832
  const { ctx, zoom } = cs;
64461
64833
  const offset = a.offset || 40;
@@ -65215,35 +65587,59 @@ function hitTestTextAnnotation(wp, floor, ctx, zoom) {
65215
65587
  }
65216
65588
  return null;
65217
65589
  }
65590
+ /** Hit zone vertex; returns index or -1. */
65591
+ function findZoneVertexAt(wp, zone, zoom) {
65592
+ const threshold = 10 / zoom;
65593
+ for (let i = 0; i < zone.points.length; i++) {
65594
+ const p = zone.points[i];
65595
+ if (Math.hypot(wp.x - p.x, wp.y - p.y) <= threshold) return i;
65596
+ }
65597
+ return -1;
65598
+ }
65599
+ /** Top-most zone under point (fill or near edge). */
65600
+ function findZoneAt(wp, zones, zoom) {
65601
+ if (!(zones === null || zones === void 0 ? void 0 : zones.length)) return null;
65602
+ const edgeTol = 8 / zoom;
65603
+ for (let i = zones.length - 1; i >= 0; i--) {
65604
+ const z = zones[i];
65605
+ if (!z.points || z.points.length < 2) continue;
65606
+ if (pointInPolygon(wp, z.points)) return z;
65607
+ for (let j = 0; j < z.points.length; j++) {
65608
+ const a = z.points[j];
65609
+ const b = z.points[(j + 1) % z.points.length];
65610
+ if (pointToSegmentDist(wp, a, b) <= edgeTol) return z;
65611
+ }
65612
+ }
65613
+ return null;
65614
+ }
65218
65615
  //#endregion
65219
65616
  //#region src/lib/components/editor/FloorPlanCanvas.svelte
65220
65617
  init_client();
65221
65618
  init_index_client();
65222
- var root_1$4 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-2 z-10 px-2 py-1 bg-white/85 rounded text-sm font-semibold text-gray-700 shadow pointer-events-none"> </div>`);
65619
+ var root_2$4 = /* @__PURE__ */ from_html(`<input type="text" class="absolute bg-white border-2 border-blue-500 rounded px-2 py-1 text-sm text-center shadow-lg outline-none"/>`);
65223
65620
  var root_3$3 = /* @__PURE__ */ from_html(`<input type="text" class="absolute bg-white border-2 border-blue-500 rounded px-2 py-1 text-sm text-center shadow-lg outline-none"/>`);
65224
- var root_4$2 = /* @__PURE__ */ from_html(`<input type="text" class="absolute bg-white border-2 border-blue-500 rounded px-2 py-1 text-sm text-center shadow-lg outline-none"/>`);
65225
- var root_5 = /* @__PURE__ */ from_html(`<div class="absolute inset-0 flex items-center justify-center pointer-events-none"><div class="text-center opacity-60"><div class="text-5xl mb-3">🏠</div> <div class="text-sm font-medium text-gray-500">Start building your floor plan</div> <div class="text-xs text-gray-400 mt-1">Draw walls with <span class="font-mono bg-gray-100 px-1 rounded">W</span> or drag items from the sidebar</div></div></div>`);
65226
- var root_6 = /* @__PURE__ */ from_html(`<canvas width="180" height="120" class="absolute bottom-10 right-2 rounded-lg shadow-lg border border-gray-300 cursor-crosshair bg-white" style="z-index: 15;"></canvas>`);
65227
- var root_8 = /* @__PURE__ */ from_html(`<span> </span> <span> </span> <span class="text-gray-300">|</span>`, 1);
65621
+ var root_4$2 = /* @__PURE__ */ from_html(`<div class="absolute inset-0 flex items-center justify-center pointer-events-none"><div class="text-center opacity-60"><div class="text-5xl mb-3">🏠</div> <div class="text-sm font-medium text-gray-500">Start building your floor plan</div> <div class="text-xs text-gray-400 mt-1">Draw walls with <span class="font-mono bg-gray-100 px-1 rounded">W</span> or drag items from the sidebar</div></div></div>`);
65622
+ var root_5 = /* @__PURE__ */ from_html(`<canvas width="180" height="120" class="absolute bottom-10 right-2 rounded-lg shadow-lg border border-gray-300 cursor-crosshair bg-white" style="z-index: 15;"></canvas>`);
65623
+ var root_7$1 = /* @__PURE__ */ from_html(`<span> </span> <span> </span> <span class="text-gray-300">|</span>`, 1);
65624
+ var root_9 = /* @__PURE__ */ from_html(`<span> </span>`);
65228
65625
  var root_10 = /* @__PURE__ */ from_html(`<span> </span>`);
65229
65626
  var root_11 = /* @__PURE__ */ from_html(`<span> </span>`);
65230
- var root_12 = /* @__PURE__ */ from_html(`<span> </span>`);
65231
- var root_9 = /* @__PURE__ */ from_html(`<span> </span> <!> <!> <!> <span class="text-gray-300">|</span>`, 1);
65232
- var root_13 = /* @__PURE__ */ from_html(`<span class="text-blue-600 font-medium"> </span> <span class="text-gray-300">|</span>`, 1);
65233
- var root_7$1 = /* @__PURE__ */ from_html(`<div class="absolute bottom-2 right-2 bg-white/80 rounded px-2 py-1 text-xs text-gray-500 flex gap-3"><!> <!> <!> <span> </span> <button class="hover:text-gray-700" title="Zoom to Fit (F)">⊞ Fit</button> <button class="hover:text-gray-700" title="Toggle Grid (G)"> </button> <button class="hover:text-gray-700" title="Toggle Snap to Grid (S)"> </button> <button class="hover:text-gray-700" title="Toggle Furniture"> </button> <button class="hover:text-gray-700" title="Layer Visibility">🗂 Layers</button> <button class="hover:text-gray-700" title="Toggle Rulers"> </button> <button class="hover:text-gray-700" title="Toggle Mini-map"> </button></div>`);
65234
- var root_15 = /* @__PURE__ */ from_html(`<label class="flex items-center gap-2 py-0.5 cursor-pointer hover:bg-gray-50 rounded px-1"><input type="checkbox" class="accent-blue-500"/> <span> </span></label>`);
65235
- var root_14 = /* @__PURE__ */ from_html(`<div class="absolute bottom-12 right-2 z-20 bg-white rounded-lg shadow-lg border border-gray-200 p-3 text-xs min-w-[160px]"><div class="font-semibold text-gray-700 mb-2">Layers</div> <!> <hr class="my-1 border-gray-100"/> <label class="flex items-center gap-2 py-0.5 cursor-pointer hover:bg-gray-50 rounded px-1"><input type="checkbox" class="accent-blue-500"/> <span>Room Labels</span></label> <label class="flex items-center gap-2 py-0.5 cursor-pointer hover:bg-gray-50 rounded px-1"><input type="checkbox" class="accent-blue-500"/> <span>Dimensions</span></label></div>`);
65236
- var root_18 = /* @__PURE__ */ from_html(`<button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500 hover:text-gray-700" title="Flip swing" aria-label="Flip swing"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M7 16V4m0 0L3 8m4-4l4 4M17 8v12m0 0l4-4m-4 4l-4-4"></path></svg></button>`);
65237
- var root_19 = /* @__PURE__ */ from_html(`<button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500 hover:text-gray-700" title="Split wall at midpoint" aria-label="Split wall at midpoint"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2v20M4 12h4M16 12h4"></path></svg></button>`);
65238
- var root_17 = /* @__PURE__ */ from_html(`<div class="absolute z-40 flex items-center gap-0.5 bg-white rounded-lg shadow-lg border border-gray-200 px-1 py-0.5"><button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500 hover:text-gray-700" title="Duplicate" aria-label="Duplicate"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path></svg></button> <!> <!> <div class="w-px h-5 bg-gray-200 mx-0.5"></div> <button class="w-7 h-7 flex items-center justify-center rounded hover:bg-red-50 text-gray-400 hover:text-red-600" title="Delete" aria-label="Delete"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M8 6V4a2 2 0 012-2h4a2 2 0 012 2v2m3 0v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6h14"></path></svg></button></div>`);
65239
- var root_20 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -translate-x-1/2 bg-blue-600 text-white px-3 py-1 rounded-full text-xs shadow">Click to add wall segment · Double-click to finish · C to close loop ·
65627
+ var root_8 = /* @__PURE__ */ from_html(`<span> </span> <!> <!> <!> <span class="text-gray-300">|</span>`, 1);
65628
+ var root_12 = /* @__PURE__ */ from_html(`<span class="text-blue-600 font-medium"> </span> <span class="text-gray-300">|</span>`, 1);
65629
+ var root_6 = /* @__PURE__ */ from_html(`<div class="absolute bottom-2 right-2 bg-white/80 rounded px-2 py-1 text-xs text-gray-500 flex gap-3"><!> <!> <!> <span> </span> <button class="hover:text-gray-700" title="Zoom to Fit (F)">⊞ Fit</button> <button class="hover:text-gray-700" title="Toggle Grid (G)"> </button> <button class="hover:text-gray-700" title="Toggle Snap to Grid (S)"> </button> <button class="hover:text-gray-700" title="Toggle Furniture"> </button> <button class="hover:text-gray-700" title="Layer Visibility">🗂 Layers</button> <button class="hover:text-gray-700" title="Toggle Rulers"> </button> <button class="hover:text-gray-700" title="Toggle Mini-map"> </button></div>`);
65630
+ var root_14 = /* @__PURE__ */ from_html(`<label class="flex items-center gap-2 py-0.5 cursor-pointer hover:bg-gray-50 rounded px-1"><input type="checkbox" class="accent-blue-500"/> <span> </span></label>`);
65631
+ var root_13 = /* @__PURE__ */ from_html(`<div class="absolute bottom-12 right-2 z-20 bg-white rounded-lg shadow-lg border border-gray-200 p-3 text-xs min-w-[160px]"><div class="font-semibold text-gray-700 mb-2">Layers</div> <!> <hr class="my-1 border-gray-100"/> <label class="flex items-center gap-2 py-0.5 cursor-pointer hover:bg-gray-50 rounded px-1"><input type="checkbox" class="accent-blue-500"/> <span>Room Labels</span></label> <label class="flex items-center gap-2 py-0.5 cursor-pointer hover:bg-gray-50 rounded px-1"><input type="checkbox" class="accent-blue-500"/> <span>Dimensions</span></label></div>`);
65632
+ var root_17 = /* @__PURE__ */ from_html(`<button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500 hover:text-gray-700" title="Flip swing" aria-label="Flip swing"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M7 16V4m0 0L3 8m4-4l4 4M17 8v12m0 0l4-4m-4 4l-4-4"></path></svg></button>`);
65633
+ var root_18 = /* @__PURE__ */ from_html(`<button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500 hover:text-gray-700" title="Split wall at midpoint" aria-label="Split wall at midpoint"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2v20M4 12h4M16 12h4"></path></svg></button>`);
65634
+ var root_16 = /* @__PURE__ */ from_html(`<div class="absolute z-40 flex items-center gap-0.5 bg-white rounded-lg shadow-lg border border-gray-200 px-1 py-0.5"><button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500 hover:text-gray-700" title="Duplicate" aria-label="Duplicate"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path></svg></button> <!> <!> <div class="w-px h-5 bg-gray-200 mx-0.5"></div> <button class="w-7 h-7 flex items-center justify-center rounded hover:bg-red-50 text-gray-400 hover:text-red-600" title="Delete" aria-label="Delete"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M8 6V4a2 2 0 012-2h4a2 2 0 012 2v2m3 0v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6h14"></path></svg></button></div>`);
65635
+ var root_19 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -translate-x-1/2 bg-blue-600 text-white px-3 py-1 rounded-full text-xs shadow">Click to add wall segment · Double-click to finish · C to close loop ·
65240
65636
  Esc to cancel</div>`);
65241
- var root_21 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -translate-x-1/2 bg-purple-600 text-white px-3 py-1 rounded-full text-xs shadow"> </div>`);
65242
- var root_22 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -translate-x-1/2 bg-red-600 text-white px-3 py-1 rounded-full text-xs shadow">Right-click two points to measure · M to exit · Esc to cancel</div>`);
65243
- var root_23 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -translate-x-1/2 bg-emerald-600 text-white px-3 py-1 rounded-full text-xs shadow">Click to place text label · Esc to cancel</div>`);
65244
- var root_24 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -translate-x-1/2 bg-indigo-600 text-white px-3 py-1 rounded-full text-xs shadow"> </div>`);
65245
- var root_2$4 = /* @__PURE__ */ from_html(`<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="absolute bottom-3 left-3 z-20 flex items-center gap-1 bg-white rounded-lg shadow-lg border border-gray-200 px-1 py-0.5"><button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-600 hover:text-gray-800 font-bold text-lg" title="Zoom Out (−)" aria-label="Zoom out">−</button> <button class="min-w-[3.5rem] h-7 flex items-center justify-center rounded hover:bg-gray-100 text-xs font-medium text-gray-600 hover:text-gray-800 tabular-nums" title="Reset to 100%" aria-label="Zoom to 100%"> </button> <button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-600 hover:text-gray-800 font-bold text-lg" title="Zoom In (+)" aria-label="Zoom in">+</button> <div class="w-px h-5 bg-gray-200"></div> <button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500 hover:text-gray-700 text-sm" title="Zoom to Fit (F)" aria-label="Zoom to fit">⊞</button></div> <!>`, 1);
65246
- var root$1 = /* @__PURE__ */ from_html(`<div class="w-full h-full relative overflow-hidden" role="application"><div class="w-full h-full"><canvas aria-label="Floor plan editor canvas"></canvas></div> <!> <!></div>`);
65637
+ var root_20 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -translate-x-1/2 bg-purple-600 text-white px-3 py-1 rounded-full text-xs shadow"> </div>`);
65638
+ var root_21 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -translate-x-1/2 bg-red-600 text-white px-3 py-1 rounded-full text-xs shadow">Right-click two points to measure · M to exit · Esc to cancel</div>`);
65639
+ var root_22 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -translate-x-1/2 bg-emerald-600 text-white px-3 py-1 rounded-full text-xs shadow">Click to place text label · Esc to cancel</div>`);
65640
+ var root_23 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -translate-x-1/2 bg-indigo-600 text-white px-3 py-1 rounded-full text-xs shadow"> </div>`);
65641
+ var root_1$4 = /* @__PURE__ */ from_html(`<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <div class="absolute bottom-3 left-3 z-20 flex items-center gap-1 bg-white rounded-lg shadow-lg border border-gray-200 px-1 py-0.5"><button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-600 hover:text-gray-800 font-bold text-lg" title="Zoom Out (−)" aria-label="Zoom out">−</button> <button class="min-w-[3.5rem] h-7 flex items-center justify-center rounded hover:bg-gray-100 text-xs font-medium text-gray-600 hover:text-gray-800 tabular-nums" title="Reset to 100%" aria-label="Zoom to 100%"> </button> <button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-600 hover:text-gray-800 font-bold text-lg" title="Zoom In (+)" aria-label="Zoom in">+</button> <div class="w-px h-5 bg-gray-200"></div> <button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500 hover:text-gray-700 text-sm" title="Zoom to Fit (F)" aria-label="Zoom to fit">⊞</button></div> <!>`, 1);
65642
+ var root$1 = /* @__PURE__ */ from_html(`<div class="w-full h-full relative overflow-hidden" role="application"><div class="w-full h-full"><canvas aria-label="Floor plan editor canvas"></canvas></div> <!></div>`);
65247
65643
  function FloorPlanCanvas($$anchor, $$props) {
65248
65644
  push($$props, true);
65249
65645
  const $panMode = () => store_get(panMode, "$panMode", $$stores);
@@ -65320,6 +65716,15 @@ function FloorPlanCanvas($$anchor, $$props) {
65320
65716
  let annotationStart = /* @__PURE__ */ state(null);
65321
65717
  let selectedAnnotationId = /* @__PURE__ */ state(null);
65322
65718
  let textAnnotationMode = /* @__PURE__ */ state(false);
65719
+ let currentZoneShape = /* @__PURE__ */ state("rectangle");
65720
+ let selectedZoneId = /* @__PURE__ */ state(null);
65721
+ let zonePolyDraft = /* @__PURE__ */ state(proxy([]));
65722
+ let zoneRectDragStart = /* @__PURE__ */ state(null);
65723
+ let zoneRectDragCurrent = /* @__PURE__ */ state(null);
65724
+ let draggingZoneId = /* @__PURE__ */ state(null);
65725
+ let draggingZoneVertex = /* @__PURE__ */ state(null);
65726
+ let zoneDragLast = /* @__PURE__ */ state(null);
65727
+ let zoneCursor = /* @__PURE__ */ state(null);
65323
65728
  let editingTextAnnotationId = /* @__PURE__ */ state(null);
65324
65729
  let editingTextAnnotationPos = /* @__PURE__ */ state(proxy({
65325
65730
  x: 0,
@@ -65351,7 +65756,6 @@ function FloorPlanCanvas($$anchor, $$props) {
65351
65756
  cameraThumbnail();
65352
65757
  canvasBackground();
65353
65758
  floorPlateBackground();
65354
- $$props.projectName;
65355
65759
  $$props.heatmapEnabled;
65356
65760
  $$props.heatmapMatrix;
65357
65761
  heatmapColorScale();
@@ -65366,7 +65770,8 @@ function FloorPlanCanvas($$anchor, $$props) {
65366
65770
  columns: true,
65367
65771
  guides: true,
65368
65772
  measurements: true,
65369
- annotations: true
65773
+ annotations: true,
65774
+ zones: true
65370
65775
  }));
65371
65776
  let showFurniture = /* @__PURE__ */ user_derived(() => get(layerVis).furniture);
65372
65777
  user_effect(() => {
@@ -66283,6 +66688,7 @@ function FloorPlanCanvas($$anchor, $$props) {
66283
66688
  return "width: 100%; height: 100%";
66284
66689
  }
66285
66690
  function draw() {
66691
+ var _floor$zones;
66286
66692
  if (!ctx) return;
66287
66693
  if (!canvasDirty) {
66288
66694
  requestAnimationFrame(draw);
@@ -66305,7 +66711,7 @@ function FloorPlanCanvas($$anchor, $$props) {
66305
66711
  else zoomToFit();
66306
66712
  needsFitToCanvas = false;
66307
66713
  }
66308
- 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(measuring) || get(annotating) || get(currentPlacingId) || get(isPlacingStair) || get(isPlacingColumn) || get(marqueeStart) || get(isPanning)) canvasDirty = true;
66714
+ 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(measuring) || get(annotating) || get(currentPlacingId) || get(isPlacingStair) || get(isPlacingColumn) || get(marqueeStart) || get(isPanning)) canvasDirty = true;
66309
66715
  updateDetectedRooms();
66310
66716
  const selId = get(currentSelectedId);
66311
66717
  const multiIds = get(currentSelectedIds);
@@ -66938,6 +67344,17 @@ function FloorPlanCanvas($$anchor, $$props) {
66938
67344
  ctx.restore();
66939
67345
  }
66940
67346
  drawFloorHeatmapLayer();
67347
+ if (get(layerVis).zones && (floor === null || floor === void 0 || (_floor$zones = floor.zones) === null || _floor$zones === void 0 ? void 0 : _floor$zones.length)) {
67348
+ var _$$get6;
67349
+ const zoneSel = (_$$get6 = get(selectedZoneId)) !== null && _$$get6 !== void 0 ? _$$get6 : floor.zones.some((z) => z.id === get(currentSelectedId)) ? get(currentSelectedId) : null;
67350
+ drawZones(getCS(), floor, zoneSel);
67351
+ }
67352
+ if (get(currentTool) === "zone") {
67353
+ var _floor$zones$length, _floor$zones2;
67354
+ const draftColor = nextZoneColor((_floor$zones$length = floor === null || floor === void 0 || (_floor$zones2 = floor.zones) === null || _floor$zones2 === void 0 ? void 0 : _floor$zones2.length) !== null && _floor$zones$length !== void 0 ? _floor$zones$length : 0);
67355
+ if (get(zoneRectDragStart) && get(zoneRectDragCurrent)) drawZoneDraft(getCS(), rectPoints(get(zoneRectDragStart).x, get(zoneRectDragStart).y, get(zoneRectDragCurrent).x, get(zoneRectDragCurrent).y), draftColor, true);
67356
+ else if (get(zonePolyDraft).length || get(zoneCursor)) drawZoneDraft(getCS(), get(zonePolyDraft), draftColor, false, get(zoneCursor));
67357
+ }
66941
67358
  drawMinimap$1();
66942
67359
  requestAnimationFrame(draw);
66943
67360
  }
@@ -66978,6 +67395,18 @@ function FloorPlanCanvas($$anchor, $$props) {
66978
67395
  set(currentTool, t, true);
66979
67396
  set(textAnnotationMode, t === "text");
66980
67397
  if (t !== "text") set(editingTextAnnotationId, null);
67398
+ if (t !== "zone") {
67399
+ set(zonePolyDraft, [], true);
67400
+ set(zoneRectDragStart, null);
67401
+ set(zoneRectDragCurrent, null);
67402
+ }
67403
+ markDirty();
67404
+ });
67405
+ const unsubZoneShape = placingZoneShape.subscribe((s) => {
67406
+ set(currentZoneShape, s, true);
67407
+ set(zonePolyDraft, [], true);
67408
+ set(zoneRectDragStart, null);
67409
+ set(zoneRectDragCurrent, null);
66981
67410
  markDirty();
66982
67411
  });
66983
67412
  const unsub7 = detectedRoomsStore.subscribe((rooms) => {
@@ -67081,6 +67510,7 @@ function FloorPlanCanvas($$anchor, $$props) {
67081
67510
  unsub4();
67082
67511
  unsub5();
67083
67512
  unsub6();
67513
+ unsubZoneShape();
67084
67514
  unsub7();
67085
67515
  unsub8();
67086
67516
  unsub9();
@@ -67263,7 +67693,7 @@ function FloorPlanCanvas($$anchor, $$props) {
67263
67693
  return findRoomAt(p, get(detectedRooms), get(currentFloor).walls);
67264
67694
  }
67265
67695
  function onMouseDown(e) {
67266
- var _$$get6;
67696
+ var _$$get7, _$$get8;
67267
67697
  if ($$props.viewOnly) return;
67268
67698
  markDirty();
67269
67699
  if (e.button === 1 || e.button === 0 && (get(spaceDown) || $panMode() || e.shiftKey && get(currentTool) === "select")) {
@@ -67344,7 +67774,61 @@ function FloorPlanCanvas($$anchor, $$props) {
67344
67774
  placingStair.set(false);
67345
67775
  return;
67346
67776
  }
67347
- if (tool === "select" && ((_$$get6 = get(currentFloor)) === null || _$$get6 === void 0 ? void 0 : _$$get6.guides)) {
67777
+ if (tool === "zone") {
67778
+ const snapped = {
67779
+ x: snap(wp.x),
67780
+ y: snap(wp.y)
67781
+ };
67782
+ if (get(currentZoneShape) === "rectangle") {
67783
+ set(zoneRectDragStart, snapped, true);
67784
+ set(zoneRectDragCurrent, snapped, true);
67785
+ return;
67786
+ }
67787
+ if (get(currentZoneShape) === "triangle") {
67788
+ const id = addZone("triangle", trianglePoints(snapped));
67789
+ set(selectedZoneId, id, true);
67790
+ selectedElementId.set(id);
67791
+ selectedTool.set("select");
67792
+ return;
67793
+ }
67794
+ if (get(zonePolyDraft).length >= 3 && isNearPoint(snapped, get(zonePolyDraft)[0], 15 / get(zoom))) {
67795
+ const id = addZone("polygon", get(zonePolyDraft));
67796
+ set(zonePolyDraft, [], true);
67797
+ set(zoneCursor, null);
67798
+ set(selectedZoneId, id, true);
67799
+ selectedElementId.set(id);
67800
+ selectedTool.set("select");
67801
+ return;
67802
+ }
67803
+ set(zonePolyDraft, [...get(zonePolyDraft), snapped], true);
67804
+ return;
67805
+ }
67806
+ if (tool === "select" && ((_$$get7 = get(currentFloor)) === null || _$$get7 === void 0 || (_$$get7 = _$$get7.zones) === null || _$$get7 === void 0 ? void 0 : _$$get7.length) && get(layerVis).zones) {
67807
+ const zHit = findZoneAt(wp, get(currentFloor).zones, get(zoom));
67808
+ if (zHit) {
67809
+ set(selectedZoneId, zHit.id, true);
67810
+ selectedElementId.set(zHit.id);
67811
+ set(selectedTextAnnotationId, null);
67812
+ set(selectedAnnotationId, null);
67813
+ set(selectedMeasurementId, null);
67814
+ const vIdx = findZoneVertexAt(wp, zHit, get(zoom));
67815
+ beginUndoGroup();
67816
+ if (vIdx >= 0) {
67817
+ set(draggingZoneId, zHit.id, true);
67818
+ set(draggingZoneVertex, vIdx, true);
67819
+ } else {
67820
+ set(draggingZoneId, zHit.id, true);
67821
+ set(draggingZoneVertex, null);
67822
+ set(zoneDragLast, {
67823
+ x: wp.x,
67824
+ y: wp.y
67825
+ }, true);
67826
+ }
67827
+ return;
67828
+ }
67829
+ set(selectedZoneId, null);
67830
+ }
67831
+ if (tool === "select" && ((_$$get8 = get(currentFloor)) === null || _$$get8 === void 0 ? void 0 : _$$get8.guides)) {
67348
67832
  const GUIDE_HIT = 6 / get(zoom);
67349
67833
  for (const g of get(currentFloor).guides) {
67350
67834
  if (g.orientation === "horizontal" && Math.abs(wp.y - g.position) < GUIDE_HIT) {
@@ -67413,9 +67897,9 @@ function FloorPlanCanvas($$anchor, $$props) {
67413
67897
  const dist = Math.hypot(newPts[1].x - newPts[0].x, newPts[1].y - newPts[0].y);
67414
67898
  const realDist = prompt("Enter the real-world distance between these two points (in cm):");
67415
67899
  if (realDist && Number(realDist) > 0) {
67416
- var _$$get7;
67900
+ var _$$get9;
67417
67901
  const pixelsPerCm = dist / Number(realDist);
67418
- if ((_$$get7 = get(currentFloor)) === null || _$$get7 === void 0 ? void 0 : _$$get7.backgroundImage) updateBackgroundImage({ scale: get(currentFloor).backgroundImage.scale * (1 / pixelsPerCm) });
67902
+ if ((_$$get9 = get(currentFloor)) === null || _$$get9 === void 0 ? void 0 : _$$get9.backgroundImage) updateBackgroundImage({ scale: get(currentFloor).backgroundImage.scale * (1 / pixelsPerCm) });
67419
67903
  }
67420
67904
  calibrationMode.set(false);
67421
67905
  return [];
@@ -67765,6 +68249,15 @@ function FloorPlanCanvas($$anchor, $$props) {
67765
68249
  return;
67766
68250
  }
67767
68251
  }
68252
+ if (get(currentTool) === "zone" && get(currentZoneShape) === "polygon" && get(zonePolyDraft).length >= 3) {
68253
+ const id = addZone("polygon", get(zonePolyDraft));
68254
+ set(zonePolyDraft, [], true);
68255
+ set(zoneCursor, null);
68256
+ set(selectedZoneId, id, true);
68257
+ selectedElementId.set(id);
68258
+ selectedTool.set("select");
68259
+ return;
68260
+ }
67768
68261
  if (get(currentTool) === "select") {
67769
68262
  const wp = screenToWorld(sx, sy);
67770
68263
  const wall = findWallAt$1(wp);
@@ -67785,11 +68278,47 @@ function FloorPlanCanvas($$anchor, $$props) {
67785
68278
  }
67786
68279
  }
67787
68280
  function onMouseMove(e) {
67788
- var _$$get8, _$$get9, _$$get10, _$$get11;
68281
+ var _$$get10, _$$get11, _$$get12, _$$get13, _$$get14;
67789
68282
  if ($$props.viewOnly) return;
67790
68283
  markDirty();
67791
68284
  const rect = canvas.getBoundingClientRect();
67792
68285
  set(mousePos, screenToWorld(e.clientX - rect.left, e.clientY - rect.top), true);
68286
+ if (get(zoneRectDragStart) && get(currentTool) === "zone") {
68287
+ set(zoneRectDragCurrent, {
68288
+ x: snap(get(mousePos).x),
68289
+ y: snap(get(mousePos).y)
68290
+ }, true);
68291
+ return;
68292
+ }
68293
+ if (get(currentTool) === "zone" && get(currentZoneShape) === "polygon") set(zoneCursor, {
68294
+ x: snap(get(mousePos).x),
68295
+ y: snap(get(mousePos).y)
68296
+ }, true);
68297
+ if (get(draggingZoneId) && ((_$$get10 = get(currentFloor)) === null || _$$get10 === void 0 ? void 0 : _$$get10.zones)) {
68298
+ const z = get(currentFloor).zones.find((z) => z.id === get(draggingZoneId));
68299
+ if (z) {
68300
+ const snapped = {
68301
+ x: snap(get(mousePos).x),
68302
+ y: snap(get(mousePos).y)
68303
+ };
68304
+ if (get(draggingZoneVertex) != null) if (z.shape === "rectangle" && z.points.length === 4) moveZonePoints(z.id, resizeRectCorner(z.points, get(draggingZoneVertex), snapped));
68305
+ else {
68306
+ const next = z.points.map((p) => ({ ...p }));
68307
+ next[get(draggingZoneVertex)] = snapped;
68308
+ moveZonePoints(z.id, next);
68309
+ }
68310
+ else if (get(zoneDragLast)) {
68311
+ const dx = get(mousePos).x - get(zoneDragLast).x;
68312
+ const dy = get(mousePos).y - get(zoneDragLast).y;
68313
+ set(zoneDragLast, {
68314
+ x: get(mousePos).x,
68315
+ y: get(mousePos).y
68316
+ }, true);
68317
+ moveZonePoints(z.id, translatePoints(z.points, dx, dy));
68318
+ }
68319
+ }
68320
+ return;
68321
+ }
67793
68322
  if (get(draggingRoomLabelId)) {
67794
68323
  const dx = get(mousePos).x - roomLabelDragStart.x;
67795
68324
  const dy = get(mousePos).y - roomLabelDragStart.y;
@@ -67803,7 +68332,7 @@ function FloorPlanCanvas($$anchor, $$props) {
67803
68332
  } : r));
67804
68333
  return;
67805
68334
  }
67806
- if (get(draggingGuideId) && ((_$$get8 = get(currentFloor)) === null || _$$get8 === void 0 ? void 0 : _$$get8.guides)) {
68335
+ if (get(draggingGuideId) && ((_$$get11 = get(currentFloor)) === null || _$$get11 === void 0 ? void 0 : _$$get11.guides)) {
67807
68336
  const g = get(currentFloor).guides.find((g) => g.id === get(draggingGuideId));
67808
68337
  if (g) {
67809
68338
  const newPos = g.orientation === "horizontal" ? get(mousePos).y : get(mousePos).x;
@@ -67959,7 +68488,7 @@ function FloorPlanCanvas($$anchor, $$props) {
67959
68488
  }
67960
68489
  }
67961
68490
  }
67962
- if (get(draggingTextAnnotationId) && ((_$$get9 = get(currentFloor)) === null || _$$get9 === void 0 ? void 0 : _$$get9.textAnnotations)) {
68491
+ if (get(draggingTextAnnotationId) && ((_$$get12 = get(currentFloor)) === null || _$$get12 === void 0 ? void 0 : _$$get12.textAnnotations)) {
67963
68492
  const basePos = {
67964
68493
  x: get(mousePos).x - textAnnotationDragOffset.x,
67965
68494
  y: get(mousePos).y - textAnnotationDragOffset.y
@@ -67976,7 +68505,7 @@ function FloorPlanCanvas($$anchor, $$props) {
67976
68505
  }, true);
67977
68506
  }
67978
68507
  }
67979
- if (get(draggingColumnId) && ((_$$get10 = get(currentFloor)) === null || _$$get10 === void 0 ? void 0 : _$$get10.columns)) {
68508
+ if (get(draggingColumnId) && ((_$$get13 = get(currentFloor)) === null || _$$get13 === void 0 ? void 0 : _$$get13.columns)) {
67980
68509
  const basePos = {
67981
68510
  x: get(mousePos).x - columnDragOffset.x,
67982
68511
  y: get(mousePos).y - columnDragOffset.y
@@ -67986,7 +68515,7 @@ function FloorPlanCanvas($$anchor, $$props) {
67986
68515
  y: snap(basePos.y)
67987
68516
  });
67988
68517
  }
67989
- if (get(draggingStairId) && ((_$$get11 = get(currentFloor)) === null || _$$get11 === void 0 ? void 0 : _$$get11.stairs)) {
68518
+ if (get(draggingStairId) && ((_$$get14 = get(currentFloor)) === null || _$$get14 === void 0 ? void 0 : _$$get14.stairs)) {
67990
68519
  const basePos = {
67991
68520
  x: get(mousePos).x - stairDragOffset.x,
67992
68521
  y: get(mousePos).y - stairDragOffset.y
@@ -67997,12 +68526,12 @@ function FloorPlanCanvas($$anchor, $$props) {
67997
68526
  });
67998
68527
  }
67999
68528
  if (get(draggingFurnitureId)) {
68000
- var _$$get12;
68529
+ var _$$get15;
68001
68530
  const basePos = {
68002
68531
  x: get(mousePos).x - dragOffset.x,
68003
68532
  y: get(mousePos).y - dragOffset.y
68004
68533
  };
68005
- const fi = (_$$get12 = get(currentFloor)) === null || _$$get12 === void 0 ? void 0 : _$$get12.furniture.find((f) => f.id === get(draggingFurnitureId));
68534
+ const fi = (_$$get15 = get(currentFloor)) === null || _$$get15 === void 0 ? void 0 : _$$get15.furniture.find((f) => f.id === get(draggingFurnitureId));
68006
68535
  if (fi) {
68007
68536
  const wallSnap = snapFurnitureToWall(basePos, fi.catalogId, fi.rotation);
68008
68537
  if (wallSnap) {
@@ -68015,13 +68544,13 @@ function FloorPlanCanvas($$anchor, $$props) {
68015
68544
  wallAngle: wallSnap.wallAngle
68016
68545
  }, true);
68017
68546
  } else {
68018
- var _$$get13;
68547
+ var _$$get16;
68019
68548
  const snapped = {
68020
68549
  x: snap(basePos.x),
68021
68550
  y: snap(basePos.y)
68022
68551
  };
68023
68552
  const GUIDE_SNAP = 10;
68024
- if ((_$$get13 = get(currentFloor)) === null || _$$get13 === void 0 ? void 0 : _$$get13.guides) for (const g of get(currentFloor).guides) {
68553
+ if ((_$$get16 = get(currentFloor)) === null || _$$get16 === void 0 ? void 0 : _$$get16.guides) for (const g of get(currentFloor).guides) {
68025
68554
  if (g.orientation === "horizontal" && Math.abs(snapped.y - g.position) < GUIDE_SNAP) snapped.y = g.position;
68026
68555
  if (g.orientation === "vertical" && Math.abs(snapped.x - g.position) < GUIDE_SNAP) snapped.x = g.position;
68027
68556
  }
@@ -68071,6 +68600,26 @@ function FloorPlanCanvas($$anchor, $$props) {
68071
68600
  markDirty();
68072
68601
  set(isPanning, false);
68073
68602
  set(draggingGuideId, null);
68603
+ if (get(zoneRectDragStart) && get(zoneRectDragCurrent) && get(currentTool) === "zone") {
68604
+ const pts = rectPoints(get(zoneRectDragStart).x, get(zoneRectDragStart).y, get(zoneRectDragCurrent).x, get(zoneRectDragCurrent).y);
68605
+ const w = Math.abs(get(zoneRectDragCurrent).x - get(zoneRectDragStart).x);
68606
+ const h = Math.abs(get(zoneRectDragCurrent).y - get(zoneRectDragStart).y);
68607
+ set(zoneRectDragStart, null);
68608
+ set(zoneRectDragCurrent, null);
68609
+ if (w > 5 && h > 5) {
68610
+ const id = addZone("rectangle", pts);
68611
+ set(selectedZoneId, id, true);
68612
+ selectedElementId.set(id);
68613
+ selectedTool.set("select");
68614
+ }
68615
+ return;
68616
+ }
68617
+ if (get(draggingZoneId)) {
68618
+ endUndoGroup();
68619
+ set(draggingZoneId, null);
68620
+ set(draggingZoneVertex, null);
68621
+ set(zoneDragLast, null);
68622
+ }
68074
68623
  if (get(draggingRoomLabelId)) {
68075
68624
  const dx = get(mousePos).x - roomLabelDragStart.x;
68076
68625
  const dy = get(mousePos).y - roomLabelDragStart.y;
@@ -68239,6 +68788,20 @@ function FloorPlanCanvas($$anchor, $$props) {
68239
68788
  set(annotationStart, null);
68240
68789
  set(marqueeStart, null);
68241
68790
  set(marqueeEnd, null);
68791
+ set(zonePolyDraft, [], true);
68792
+ set(zoneCursor, null);
68793
+ set(zoneRectDragStart, null);
68794
+ set(zoneRectDragCurrent, null);
68795
+ }
68796
+ if (e.key === "Enter" && get(currentTool) === "zone" && get(currentZoneShape) === "polygon" && get(zonePolyDraft).length >= 3) {
68797
+ const id = addZone("polygon", get(zonePolyDraft));
68798
+ set(zonePolyDraft, [], true);
68799
+ set(zoneCursor, null);
68800
+ set(selectedZoneId, id, true);
68801
+ selectedElementId.set(id);
68802
+ selectedTool.set("select");
68803
+ e.preventDefault();
68804
+ return;
68242
68805
  }
68243
68806
  if ((e.ctrlKey || e.metaKey) && e.key === "a" && !e.shiftKey) {
68244
68807
  e.preventDefault();
@@ -68717,8 +69280,8 @@ function FloorPlanCanvas($$anchor, $$props) {
68717
69280
  }
68718
69281
  }
68719
69282
  let cursorStyle = /* @__PURE__ */ user_derived(() => {
68720
- var _$$get14;
68721
- return get(spaceDown) || get(isPanning) || $panMode() || get(shiftDown) && get(currentTool) === "select" ? "grab" : get(draggingFurnitureId) ? "move" : get(draggingRoomId) ? "move" : get(draggingMultiSelect) ? "move" : get(draggingDoorId) ? "move" : get(draggingWindowId) ? "move" : get(draggingStairId) ? "move" : get(draggingColumnId) ? "move" : get(draggingTextAnnotationId) ? "move" : get(draggingWallParallel) ? "move" : get(draggingCurveHandle) ? "crosshair" : get(draggingWallEndpoint) ? "crosshair" : get(draggingHandle) === "rotate" ? "grabbing" : get(draggingHandle) === "resize-t" || get(draggingHandle) === "resize-b" ? "ns-resize" : get(draggingHandle) === "resize-l" || get(draggingHandle) === "resize-r" ? "ew-resize" : ((_$$get14 = get(draggingHandle)) === null || _$$get14 === void 0 ? void 0 : _$$get14.startsWith("resize")) ? "nwse-resize" : get(currentTool) === "text" ? "text" : get(currentTool) === "select" ? "default" : get(currentTool) === "furniture" ? "copy" : get(currentTool) === "door" || get(currentTool) === "window" ? get(placementPreview) ? "crosshair" : "not-allowed" : "crosshair";
69283
+ var _$$get17;
69284
+ return get(spaceDown) || get(isPanning) || $panMode() || get(shiftDown) && get(currentTool) === "select" ? "grab" : get(draggingFurnitureId) ? "move" : get(draggingRoomId) ? "move" : get(draggingMultiSelect) ? "move" : get(draggingDoorId) ? "move" : get(draggingWindowId) ? "move" : get(draggingStairId) ? "move" : get(draggingColumnId) ? "move" : get(draggingTextAnnotationId) ? "move" : get(draggingZoneId) ? "move" : get(draggingWallParallel) ? "move" : get(draggingCurveHandle) ? "crosshair" : get(draggingWallEndpoint) ? "crosshair" : get(draggingHandle) === "rotate" ? "grabbing" : get(draggingHandle) === "resize-t" || get(draggingHandle) === "resize-b" ? "ns-resize" : get(draggingHandle) === "resize-l" || get(draggingHandle) === "resize-r" ? "ew-resize" : ((_$$get17 = get(draggingHandle)) === null || _$$get17 === void 0 ? void 0 : _$$get17.startsWith("resize")) ? "nwse-resize" : get(currentTool) === "text" ? "text" : get(currentTool) === "select" ? "default" : get(currentTool) === "furniture" ? "copy" : get(currentTool) === "door" || get(currentTool) === "window" ? get(placementPreview) ? "crosshair" : "not-allowed" : "crosshair";
68722
69285
  });
68723
69286
  var div = root$1();
68724
69287
  event("keydown", $window, onKeyDown);
@@ -68730,22 +69293,11 @@ function FloorPlanCanvas($$anchor, $$props) {
68730
69293
  reset(div_1);
68731
69294
  bind_this(div_1, ($$value) => canvasFrame = $$value, () => canvasFrame);
68732
69295
  var node = sibling(div_1, 2);
68733
- var consequent = ($$anchor) => {
68734
- var div_2 = root_1$4();
68735
- var text_1 = child(div_2, true);
68736
- reset(div_2);
68737
- template_effect(() => set_text(text_1, $$props.projectName));
68738
- append($$anchor, div_2);
68739
- };
68740
- if_block(node, ($$render) => {
68741
- if ($$props.viewOnly && $$props.projectName) $$render(consequent);
68742
- });
68743
- var node_1 = sibling(node, 2);
68744
- var consequent_22 = ($$anchor) => {
68745
- var fragment = root_2$4();
68746
- var node_2 = first_child(fragment);
68747
- var consequent_1 = ($$anchor) => {
68748
- var input = root_3$3();
69296
+ var consequent_21 = ($$anchor) => {
69297
+ var fragment = root_1$4();
69298
+ var node_1 = first_child(fragment);
69299
+ var consequent = ($$anchor) => {
69300
+ var input = root_2$4();
68749
69301
  remove_input_defaults(input);
68750
69302
  autofocus(input, true);
68751
69303
  template_effect(() => {
@@ -68778,12 +69330,12 @@ function FloorPlanCanvas($$anchor, $$props) {
68778
69330
  });
68779
69331
  append($$anchor, input);
68780
69332
  };
68781
- if_block(node_2, ($$render) => {
68782
- if (get(editingRoomId)) $$render(consequent_1);
69333
+ if_block(node_1, ($$render) => {
69334
+ if (get(editingRoomId)) $$render(consequent);
68783
69335
  });
68784
- var node_3 = sibling(node_2, 2);
68785
- var consequent_2 = ($$anchor) => {
68786
- var input_1 = root_4$2();
69336
+ var node_2 = sibling(node_1, 2);
69337
+ var consequent_1 = ($$anchor) => {
69338
+ var input_1 = root_3$3();
68787
69339
  remove_input_defaults(input_1);
68788
69340
  autofocus(input_1, true);
68789
69341
  template_effect(() => {
@@ -68805,8 +69357,8 @@ function FloorPlanCanvas($$anchor, $$props) {
68805
69357
  }
68806
69358
  set(editingTextAnnotationId, null);
68807
69359
  } else if (e.key === "Escape") {
68808
- var _$$get15;
68809
- if ((_$$get15 = get(currentFloor)) === null || _$$get15 === void 0 ? void 0 : _$$get15.textAnnotations) {
69360
+ var _$$get18;
69361
+ if ((_$$get18 = get(currentFloor)) === null || _$$get18 === void 0 ? void 0 : _$$get18.textAnnotations) {
68810
69362
  const ta = get(currentFloor).textAnnotations.find((t) => t.id === get(editingTextAnnotationId));
68811
69363
  if (ta && ta.text === "Text" && !get(editingTextAnnotationValue).trim()) {
68812
69364
  removeTextAnnotation(get(editingTextAnnotationId));
@@ -68830,151 +69382,151 @@ function FloorPlanCanvas($$anchor, $$props) {
68830
69382
  });
68831
69383
  append($$anchor, input_1);
68832
69384
  };
69385
+ if_block(node_2, ($$render) => {
69386
+ if (get(editingTextAnnotationId)) $$render(consequent_1);
69387
+ });
69388
+ var node_3 = sibling(node_2, 2);
69389
+ var consequent_2 = ($$anchor) => {
69390
+ append($$anchor, root_4$2());
69391
+ };
68833
69392
  if_block(node_3, ($$render) => {
68834
- if (get(editingTextAnnotationId)) $$render(consequent_2);
69393
+ if (get(currentFloor) && get(currentFloor).walls.length === 0 && get(currentFloor).furniture.length === 0 && get(currentFloor).doors.length === 0 && !$$props.viewOnly) $$render(consequent_2);
68835
69394
  });
68836
69395
  var node_4 = sibling(node_3, 2);
68837
69396
  var consequent_3 = ($$anchor) => {
68838
- append($$anchor, root_5());
68839
- };
68840
- if_block(node_4, ($$render) => {
68841
- if (get(currentFloor) && get(currentFloor).walls.length === 0 && get(currentFloor).furniture.length === 0 && get(currentFloor).doors.length === 0 && !$$props.viewOnly) $$render(consequent_3);
68842
- });
68843
- var node_5 = sibling(node_4, 2);
68844
- var consequent_4 = ($$anchor) => {
68845
- var canvas_2 = root_6();
69397
+ var canvas_2 = root_5();
68846
69398
  bind_this(canvas_2, ($$value) => minimapCanvas = $$value, () => minimapCanvas);
68847
69399
  delegated("click", canvas_2, onMinimapClick);
68848
69400
  append($$anchor, canvas_2);
68849
69401
  };
68850
- if_block(node_5, ($$render) => {
68851
- if (!$$props.viewOnly && get(showMinimap) && get(currentFloor) && get(currentFloor).walls.length > 0) $$render(consequent_4);
69402
+ if_block(node_4, ($$render) => {
69403
+ if (!$$props.viewOnly && get(showMinimap) && get(currentFloor) && get(currentFloor).walls.length > 0) $$render(consequent_3);
68852
69404
  });
68853
- var node_6 = sibling(node_5, 2);
68854
- var consequent_11 = ($$anchor) => {
68855
- var div_4 = root_7$1();
68856
- var node_7 = child(div_4);
68857
- var consequent_5 = ($$anchor) => {
68858
- var fragment_1 = root_8();
69405
+ var node_5 = sibling(node_4, 2);
69406
+ var consequent_10 = ($$anchor) => {
69407
+ var div_3 = root_6();
69408
+ var node_6 = child(div_3);
69409
+ var consequent_4 = ($$anchor) => {
69410
+ var fragment_1 = root_7$1();
68859
69411
  var span = first_child(fragment_1);
68860
- var text_2 = child(span);
69412
+ var text_1 = child(span);
68861
69413
  reset(span);
68862
69414
  var span_1 = sibling(span, 2);
68863
- var text_3 = child(span_1, true);
69415
+ var text_2 = child(span_1, true);
68864
69416
  reset(span_1);
68865
69417
  next(2);
68866
69418
  template_effect(($0) => {
68867
69419
  var _$$get$length;
68868
- set_text(text_2, `${(_$$get$length = get(detectedRooms).length) !== null && _$$get$length !== void 0 ? _$$get$length : ""} room${get(detectedRooms).length !== 1 ? "s" : ""}`);
68869
- set_text(text_3, $0);
69420
+ set_text(text_1, `${(_$$get$length = get(detectedRooms).length) !== null && _$$get$length !== void 0 ? _$$get$length : ""} room${get(detectedRooms).length !== 1 ? "s" : ""}`);
69421
+ set_text(text_2, $0);
68870
69422
  }, [() => formatArea(get(detectedRooms).reduce((s, r) => s + r.area, 0), $projectSettings().units)]);
68871
69423
  append($$anchor, fragment_1);
68872
69424
  };
68873
- if_block(node_7, ($$render) => {
68874
- if (get(detectedRooms).length > 0) $$render(consequent_5);
69425
+ if_block(node_6, ($$render) => {
69426
+ if (get(detectedRooms).length > 0) $$render(consequent_4);
68875
69427
  });
68876
- var node_8 = sibling(node_7, 2);
68877
- var consequent_9 = ($$anchor) => {
68878
- var fragment_2 = root_9();
69428
+ var node_7 = sibling(node_6, 2);
69429
+ var consequent_8 = ($$anchor) => {
69430
+ var fragment_2 = root_8();
68879
69431
  var span_2 = first_child(fragment_2);
68880
- var text_4 = child(span_2);
69432
+ var text_3 = child(span_2);
68881
69433
  reset(span_2);
68882
- var node_9 = sibling(span_2, 2);
68883
- var consequent_6 = ($$anchor) => {
68884
- var span_3 = root_10();
68885
- var text_5 = child(span_3);
69434
+ var node_8 = sibling(span_2, 2);
69435
+ var consequent_5 = ($$anchor) => {
69436
+ var span_3 = root_9();
69437
+ var text_4 = child(span_3);
68886
69438
  reset(span_3);
68887
69439
  template_effect(() => {
68888
69440
  var _$$get$doors$length;
68889
- return set_text(text_5, `${(_$$get$doors$length = get(currentFloor).doors.length) !== null && _$$get$doors$length !== void 0 ? _$$get$doors$length : ""} door${get(currentFloor).doors.length !== 1 ? "s" : ""}`);
69441
+ return set_text(text_4, `${(_$$get$doors$length = get(currentFloor).doors.length) !== null && _$$get$doors$length !== void 0 ? _$$get$doors$length : ""} door${get(currentFloor).doors.length !== 1 ? "s" : ""}`);
68890
69442
  });
68891
69443
  append($$anchor, span_3);
68892
69444
  };
68893
- if_block(node_9, ($$render) => {
68894
- if (get(currentFloor).doors.length > 0) $$render(consequent_6);
69445
+ if_block(node_8, ($$render) => {
69446
+ if (get(currentFloor).doors.length > 0) $$render(consequent_5);
68895
69447
  });
68896
- var node_10 = sibling(node_9, 2);
68897
- var consequent_7 = ($$anchor) => {
68898
- var span_4 = root_11();
68899
- var text_6 = child(span_4);
69448
+ var node_9 = sibling(node_8, 2);
69449
+ var consequent_6 = ($$anchor) => {
69450
+ var span_4 = root_10();
69451
+ var text_5 = child(span_4);
68900
69452
  reset(span_4);
68901
69453
  template_effect(() => {
68902
69454
  var _$$get$windows$length;
68903
- return set_text(text_6, `${(_$$get$windows$length = get(currentFloor).windows.length) !== null && _$$get$windows$length !== void 0 ? _$$get$windows$length : ""} window${get(currentFloor).windows.length !== 1 ? "s" : ""}`);
69455
+ return set_text(text_5, `${(_$$get$windows$length = get(currentFloor).windows.length) !== null && _$$get$windows$length !== void 0 ? _$$get$windows$length : ""} window${get(currentFloor).windows.length !== 1 ? "s" : ""}`);
68904
69456
  });
68905
69457
  append($$anchor, span_4);
68906
69458
  };
68907
- if_block(node_10, ($$render) => {
68908
- if (get(currentFloor).windows.length > 0) $$render(consequent_7);
69459
+ if_block(node_9, ($$render) => {
69460
+ if (get(currentFloor).windows.length > 0) $$render(consequent_6);
68909
69461
  });
68910
- var node_11 = sibling(node_10, 2);
68911
- var consequent_8 = ($$anchor) => {
68912
- var span_5 = root_12();
68913
- var text_7 = child(span_5);
69462
+ var node_10 = sibling(node_9, 2);
69463
+ var consequent_7 = ($$anchor) => {
69464
+ var span_5 = root_11();
69465
+ var text_6 = child(span_5);
68914
69466
  reset(span_5);
68915
69467
  template_effect(() => {
68916
69468
  var _$$get$furniture$leng;
68917
- return set_text(text_7, `${(_$$get$furniture$leng = get(currentFloor).furniture.length) !== null && _$$get$furniture$leng !== void 0 ? _$$get$furniture$leng : ""} object${get(currentFloor).furniture.length !== 1 ? "s" : ""}`);
69469
+ return set_text(text_6, `${(_$$get$furniture$leng = get(currentFloor).furniture.length) !== null && _$$get$furniture$leng !== void 0 ? _$$get$furniture$leng : ""} object${get(currentFloor).furniture.length !== 1 ? "s" : ""}`);
68918
69470
  });
68919
69471
  append($$anchor, span_5);
68920
69472
  };
68921
- if_block(node_11, ($$render) => {
68922
- if (get(currentFloor).furniture.length > 0) $$render(consequent_8);
69473
+ if_block(node_10, ($$render) => {
69474
+ if (get(currentFloor).furniture.length > 0) $$render(consequent_7);
68923
69475
  });
68924
69476
  next(2);
68925
69477
  template_effect(() => {
68926
69478
  var _$$get$walls$length;
68927
- return set_text(text_4, `${(_$$get$walls$length = get(currentFloor).walls.length) !== null && _$$get$walls$length !== void 0 ? _$$get$walls$length : ""} wall${get(currentFloor).walls.length !== 1 ? "s" : ""}`);
69479
+ return set_text(text_3, `${(_$$get$walls$length = get(currentFloor).walls.length) !== null && _$$get$walls$length !== void 0 ? _$$get$walls$length : ""} wall${get(currentFloor).walls.length !== 1 ? "s" : ""}`);
68928
69480
  });
68929
69481
  append($$anchor, fragment_2);
68930
69482
  };
68931
- if_block(node_8, ($$render) => {
68932
- if (get(currentFloor)) $$render(consequent_9);
69483
+ if_block(node_7, ($$render) => {
69484
+ if (get(currentFloor)) $$render(consequent_8);
68933
69485
  });
68934
- var node_12 = sibling(node_8, 2);
68935
- var consequent_10 = ($$anchor) => {
68936
- var fragment_3 = root_13();
69486
+ var node_11 = sibling(node_7, 2);
69487
+ var consequent_9 = ($$anchor) => {
69488
+ var fragment_3 = root_12();
68937
69489
  var span_6 = first_child(fragment_3);
68938
- var text_8 = child(span_6);
69490
+ var text_7 = child(span_6);
68939
69491
  reset(span_6);
68940
69492
  next(2);
68941
69493
  template_effect(() => {
68942
69494
  var _$$get$size;
68943
- return set_text(text_8, `${(_$$get$size = get(currentSelectedIds).size) !== null && _$$get$size !== void 0 ? _$$get$size : ""} selected`);
69495
+ return set_text(text_7, `${(_$$get$size = get(currentSelectedIds).size) !== null && _$$get$size !== void 0 ? _$$get$size : ""} selected`);
68944
69496
  });
68945
69497
  append($$anchor, fragment_3);
68946
69498
  };
68947
- if_block(node_12, ($$render) => {
68948
- if (get(currentSelectedIds).size > 1) $$render(consequent_10);
69499
+ if_block(node_11, ($$render) => {
69500
+ if (get(currentSelectedIds).size > 1) $$render(consequent_9);
68949
69501
  });
68950
- var span_7 = sibling(node_12, 2);
68951
- var text_9 = child(span_7);
69502
+ var span_7 = sibling(node_11, 2);
69503
+ var text_8 = child(span_7);
68952
69504
  reset(span_7);
68953
69505
  var button = sibling(span_7, 2);
68954
69506
  var button_1 = sibling(button, 2);
68955
- var text_10 = child(button_1);
69507
+ var text_9 = child(button_1);
68956
69508
  reset(button_1);
68957
69509
  var button_2 = sibling(button_1, 2);
68958
- var text_11 = child(button_2);
69510
+ var text_10 = child(button_2);
68959
69511
  reset(button_2);
68960
69512
  var button_3 = sibling(button_2, 2);
68961
- var text_12 = child(button_3);
69513
+ var text_11 = child(button_3);
68962
69514
  reset(button_3);
68963
69515
  var button_4 = sibling(button_3, 2);
68964
69516
  var button_5 = sibling(button_4, 2);
68965
- var text_13 = child(button_5);
69517
+ var text_12 = child(button_5);
68966
69518
  reset(button_5);
68967
69519
  var button_6 = sibling(button_5, 2);
68968
- var text_14 = child(button_6);
68969
- text_14.nodeValue = "🗺 Map";
69520
+ var text_13 = child(button_6);
69521
+ text_13.nodeValue = "🗺 Map";
68970
69522
  reset(button_6);
68971
- reset(div_4);
69523
+ reset(div_3);
68972
69524
  template_effect(($0) => {
68973
- set_text(text_9, `Zoom: ${$0 !== null && $0 !== void 0 ? $0 : ""}%`);
68974
- set_text(text_10, `${get(showGrid) ? "▦" : "▢"} Grid`);
68975
- set_text(text_11, `${get(currentSnapToGrid) ? "🧲" : "↔"} Snap`);
68976
- set_text(text_12, `${get(showFurniture) ? "🪑" : "👻"} Furniture`);
68977
- set_text(text_13, `${get(showRulers) ? "📏" : "📐"} Rulers`);
69525
+ set_text(text_8, `Zoom: ${$0 !== null && $0 !== void 0 ? $0 : ""}%`);
69526
+ set_text(text_9, `${get(showGrid) ? "▦" : "▢"} Grid`);
69527
+ set_text(text_10, `${get(currentSnapToGrid) ? "🧲" : "↔"} Snap`);
69528
+ set_text(text_11, `${get(showFurniture) ? "🪑" : "👻"} Furniture`);
69529
+ set_text(text_12, `${get(showRulers) ? "📏" : "📐"} Rulers`);
68978
69530
  }, [() => Math.round(get(zoom) * 100)]);
68979
69531
  delegated("click", button, () => zoomToFit());
68980
69532
  delegated("click", button_1, () => set(showGrid, !get(showGrid)));
@@ -68989,38 +69541,39 @@ function FloorPlanCanvas($$anchor, $$props) {
68989
69541
  delegated("click", button_4, () => set(showLayerPanel, !get(showLayerPanel)));
68990
69542
  delegated("click", button_5, () => set(showRulers, !get(showRulers)));
68991
69543
  delegated("click", button_6, () => set(showMinimap, !get(showMinimap)));
68992
- append($$anchor, div_4);
69544
+ append($$anchor, div_3);
68993
69545
  };
68994
- if_block(node_6, ($$render) => {
68995
- if (!$$props.viewOnly) $$render(consequent_11);
69546
+ if_block(node_5, ($$render) => {
69547
+ if (!$$props.viewOnly) $$render(consequent_10);
68996
69548
  });
68997
- var node_13 = sibling(node_6, 2);
68998
- var consequent_12 = ($$anchor) => {
68999
- var div_5 = root_14();
69000
- var node_14 = sibling(child(div_5), 2);
69001
- each(node_14, 16, () => [
69549
+ var node_12 = sibling(node_5, 2);
69550
+ var consequent_11 = ($$anchor) => {
69551
+ var div_4 = root_13();
69552
+ var node_13 = sibling(child(div_4), 2);
69553
+ each(node_13, 16, () => [
69002
69554
  ["walls", "Walls"],
69003
69555
  ["doors", "Doors"],
69004
69556
  ["windows", "Windows"],
69005
69557
  ["furniture", "Furniture"],
69006
69558
  ["stairs", "Stairs"],
69007
69559
  ["columns", "Columns"],
69560
+ ["zones", "Zones"],
69008
69561
  ["guides", "Guides"],
69009
69562
  ["measurements", "Measurements"]
69010
69563
  ], index$1, ($$anchor, $$item) => {
69011
69564
  var $$array = /* @__PURE__ */ user_derived(() => to_array($$item, 2));
69012
69565
  let key = () => get($$array)[0];
69013
69566
  let label = () => get($$array)[1];
69014
- var label_1 = root_15();
69567
+ var label_1 = root_14();
69015
69568
  var input_2 = child(label_1);
69016
69569
  remove_input_defaults(input_2);
69017
69570
  var span_8 = sibling(input_2, 2);
69018
- var text_15 = child(span_8, true);
69571
+ var text_14 = child(span_8, true);
69019
69572
  reset(span_8);
69020
69573
  reset(label_1);
69021
69574
  template_effect(() => {
69022
69575
  set_checked(input_2, get(layerVis)[key()]);
69023
- set_text(text_15, label());
69576
+ set_text(text_14, label());
69024
69577
  });
69025
69578
  delegated("change", input_2, () => layerVisibility.update((v) => ({
69026
69579
  ...v,
@@ -69028,7 +69581,7 @@ function FloorPlanCanvas($$anchor, $$props) {
69028
69581
  })));
69029
69582
  append($$anchor, label_1);
69030
69583
  });
69031
- var label_2 = sibling(node_14, 4);
69584
+ var label_2 = sibling(node_13, 4);
69032
69585
  var input_3 = child(label_2);
69033
69586
  remove_input_defaults(input_3);
69034
69587
  next(2);
@@ -69038,16 +69591,16 @@ function FloorPlanCanvas($$anchor, $$props) {
69038
69591
  remove_input_defaults(input_4);
69039
69592
  next(2);
69040
69593
  reset(label_3);
69041
- reset(div_5);
69594
+ reset(div_4);
69042
69595
  bind_checked(input_3, () => get(showRoomLabels), ($$value) => set(showRoomLabels, $$value));
69043
69596
  bind_checked(input_4, () => get(showDimensions), ($$value) => set(showDimensions, $$value));
69044
- append($$anchor, div_5);
69597
+ append($$anchor, div_4);
69045
69598
  };
69046
- if_block(node_13, ($$render) => {
69047
- if (get(showLayerPanel)) $$render(consequent_12);
69599
+ if_block(node_12, ($$render) => {
69600
+ if (get(showLayerPanel)) $$render(consequent_11);
69048
69601
  });
69049
- var node_15 = sibling(node_13, 2);
69050
- var consequent_16 = ($$anchor) => {
69602
+ var node_14 = sibling(node_12, 2);
69603
+ var consequent_15 = ($$anchor) => {
69051
69604
  const el = /* @__PURE__ */ user_derived(() => (() => {
69052
69605
  const f = get(currentFloor);
69053
69606
  const wall = f.walls.find((w) => w.id === get(currentSelectedId));
@@ -69080,24 +69633,24 @@ function FloorPlanCanvas($$anchor, $$props) {
69080
69633
  return null;
69081
69634
  })());
69082
69635
  var fragment_4 = comment();
69083
- var node_16 = first_child(fragment_4);
69084
- var consequent_15 = ($$anchor) => {
69085
- var div_6 = root_17();
69086
- var button_7 = child(div_6);
69087
- var node_17 = sibling(button_7, 2);
69088
- var consequent_13 = ($$anchor) => {
69089
- var button_8 = root_18();
69636
+ var node_15 = first_child(fragment_4);
69637
+ var consequent_14 = ($$anchor) => {
69638
+ var div_5 = root_16();
69639
+ var button_7 = child(div_5);
69640
+ var node_16 = sibling(button_7, 2);
69641
+ var consequent_12 = ($$anchor) => {
69642
+ var button_8 = root_17();
69090
69643
  delegated("click", button_8, () => {
69091
69644
  if (get(el).door) updateDoor(get(el).door.id, { swingDirection: get(el).door.swingDirection === "left" ? "right" : "left" });
69092
69645
  });
69093
69646
  append($$anchor, button_8);
69094
69647
  };
69095
- if_block(node_17, ($$render) => {
69096
- if (get(el).type === "door" && get(el).door) $$render(consequent_13);
69648
+ if_block(node_16, ($$render) => {
69649
+ if (get(el).type === "door" && get(el).door) $$render(consequent_12);
69097
69650
  });
69098
- var node_18 = sibling(node_17, 2);
69099
- var consequent_14 = ($$anchor) => {
69100
- var button_9 = root_19();
69651
+ var node_17 = sibling(node_16, 2);
69652
+ var consequent_13 = ($$anchor) => {
69653
+ var button_9 = root_18();
69101
69654
  delegated("click", button_9, () => {
69102
69655
  if (get(currentSelectedId)) {
69103
69656
  if (splitWall(get(currentSelectedId), .5)) selectedElementId.set(null);
@@ -69105,14 +69658,14 @@ function FloorPlanCanvas($$anchor, $$props) {
69105
69658
  });
69106
69659
  append($$anchor, button_9);
69107
69660
  };
69108
- if_block(node_18, ($$render) => {
69109
- if (get(el).type === "wall" && get(currentSelectedId) && get(currentSelectedIds).size === 0) $$render(consequent_14);
69661
+ if_block(node_17, ($$render) => {
69662
+ if (get(el).type === "wall" && get(currentSelectedId) && get(currentSelectedIds).size === 0) $$render(consequent_13);
69110
69663
  });
69111
- var button_10 = sibling(node_18, 4);
69112
- reset(div_6);
69664
+ var button_10 = sibling(node_17, 4);
69665
+ reset(div_5);
69113
69666
  template_effect(() => {
69114
69667
  var _$$get$pos$x;
69115
- return set_style(div_6, `left: ${(_$$get$pos$x = get(el).pos.x) !== null && _$$get$pos$x !== void 0 ? _$$get$pos$x : ""}px; top: ${get(el).pos.y - 44}px; transform: translateX(-50%);`);
69668
+ return set_style(div_5, `left: ${(_$$get$pos$x = get(el).pos.x) !== null && _$$get$pos$x !== void 0 ? _$$get$pos$x : ""}px; top: ${get(el).pos.y - 44}px; transform: translateX(-50%);`);
69116
69669
  });
69117
69670
  delegated("click", button_7, () => {
69118
69671
  if (!get(currentSelectedId) || !get(currentFloor)) return;
@@ -69135,72 +69688,72 @@ function FloorPlanCanvas($$anchor, $$props) {
69135
69688
  selectedElementId.set(null);
69136
69689
  }
69137
69690
  });
69138
- append($$anchor, div_6);
69691
+ append($$anchor, div_5);
69139
69692
  };
69140
- if_block(node_16, ($$render) => {
69141
- if (get(el)) $$render(consequent_15);
69693
+ if_block(node_15, ($$render) => {
69694
+ if (get(el)) $$render(consequent_14);
69142
69695
  });
69143
69696
  append($$anchor, fragment_4);
69144
69697
  };
69145
- if_block(node_15, ($$render) => {
69146
- if ((get(currentSelectedId) || get(currentSelectedIds).size > 0) && get(currentFloor) && get(currentTool) === "select") $$render(consequent_16);
69698
+ if_block(node_14, ($$render) => {
69699
+ if ((get(currentSelectedId) || get(currentSelectedIds).size > 0) && get(currentFloor) && get(currentTool) === "select") $$render(consequent_15);
69700
+ });
69701
+ var node_18 = sibling(node_14, 2);
69702
+ var consequent_16 = ($$anchor) => {
69703
+ append($$anchor, root_19());
69704
+ };
69705
+ if_block(node_18, ($$render) => {
69706
+ if (get(currentTool) === "wall" && get(wallStart)) $$render(consequent_16);
69147
69707
  });
69148
- var node_19 = sibling(node_15, 2);
69708
+ var node_19 = sibling(node_18, 2);
69149
69709
  var consequent_17 = ($$anchor) => {
69150
- append($$anchor, root_20());
69710
+ var div_7 = root_20();
69711
+ var text_15 = child(div_7);
69712
+ reset(div_7);
69713
+ template_effect(() => {
69714
+ var _$$get19;
69715
+ return set_text(text_15, `Click to place · Scroll or R to rotate (${(_$$get19 = get(currentPlacingRotation)) !== null && _$$get19 !== void 0 ? _$$get19 : ""}°) · Esc
69716
+ to cancel`);
69717
+ });
69718
+ append($$anchor, div_7);
69151
69719
  };
69152
69720
  if_block(node_19, ($$render) => {
69153
- if (get(currentTool) === "wall" && get(wallStart)) $$render(consequent_17);
69721
+ if (get(currentPlacingId) && get(currentTool) === "furniture") $$render(consequent_17);
69154
69722
  });
69155
69723
  var node_20 = sibling(node_19, 2);
69156
69724
  var consequent_18 = ($$anchor) => {
69157
- var div_8 = root_21();
69158
- var text_16 = child(div_8);
69159
- reset(div_8);
69160
- template_effect(() => {
69161
- var _$$get16;
69162
- return set_text(text_16, `Click to place · Scroll or R to rotate (${(_$$get16 = get(currentPlacingRotation)) !== null && _$$get16 !== void 0 ? _$$get16 : ""}°) · Esc
69163
- to cancel`);
69164
- });
69165
- append($$anchor, div_8);
69725
+ append($$anchor, root_21());
69166
69726
  };
69167
69727
  if_block(node_20, ($$render) => {
69168
- if (get(currentPlacingId) && get(currentTool) === "furniture") $$render(consequent_18);
69728
+ if (get(measuring)) $$render(consequent_18);
69169
69729
  });
69170
69730
  var node_21 = sibling(node_20, 2);
69171
69731
  var consequent_19 = ($$anchor) => {
69172
69732
  append($$anchor, root_22());
69173
69733
  };
69174
69734
  if_block(node_21, ($$render) => {
69175
- if (get(measuring)) $$render(consequent_19);
69735
+ if (get(textAnnotationMode)) $$render(consequent_19);
69176
69736
  });
69177
69737
  var node_22 = sibling(node_21, 2);
69178
69738
  var consequent_20 = ($$anchor) => {
69179
- append($$anchor, root_23());
69739
+ var div_10 = root_23();
69740
+ var text_16 = child(div_10);
69741
+ reset(div_10);
69742
+ template_effect(() => set_text(text_16, `${get(annotationStart) ? "Click second point to create annotation" : "Click first point"} · N to exit · Esc to cancel`));
69743
+ append($$anchor, div_10);
69180
69744
  };
69181
69745
  if_block(node_22, ($$render) => {
69182
- if (get(textAnnotationMode)) $$render(consequent_20);
69183
- });
69184
- var node_23 = sibling(node_22, 2);
69185
- var consequent_21 = ($$anchor) => {
69186
- var div_11 = root_24();
69187
- var text_17 = child(div_11);
69188
- reset(div_11);
69189
- template_effect(() => set_text(text_17, `${get(annotationStart) ? "Click second point to create annotation" : "Click first point"} · N to exit · Esc to cancel`));
69190
- append($$anchor, div_11);
69191
- };
69192
- if_block(node_23, ($$render) => {
69193
- if (get(annotating)) $$render(consequent_21);
69746
+ if (get(annotating)) $$render(consequent_20);
69194
69747
  });
69195
- var div_12 = sibling(node_23, 2);
69196
- var button_11 = child(div_12);
69748
+ var div_11 = sibling(node_22, 2);
69749
+ var button_11 = child(div_11);
69197
69750
  var button_12 = sibling(button_11, 2);
69198
- var text_18 = child(button_12);
69751
+ var text_17 = child(button_12);
69199
69752
  reset(button_12);
69200
69753
  var button_13 = sibling(button_12, 2);
69201
69754
  var button_14 = sibling(button_13, 4);
69202
- reset(div_12);
69203
- ContextMenu(sibling(div_12, 2), {
69755
+ reset(div_11);
69756
+ ContextMenu(sibling(div_11, 2), {
69204
69757
  get x() {
69205
69758
  return get(ctxMenuX);
69206
69759
  },
@@ -69233,7 +69786,7 @@ function FloorPlanCanvas($$anchor, $$props) {
69233
69786
  },
69234
69787
  onaction: handleContextMenuAction
69235
69788
  });
69236
- template_effect(($0) => set_text(text_18, `${$0 !== null && $0 !== void 0 ? $0 : ""}%`), [() => Math.round(get(zoom) * 100)]);
69789
+ template_effect(($0) => set_text(text_17, `${$0 !== null && $0 !== void 0 ? $0 : ""}%`), [() => Math.round(get(zoom) * 100)]);
69237
69790
  delegated("click", button_11, () => {
69238
69791
  const newZoom = Math.max(.1, get(zoom) * .8);
69239
69792
  const worldCX = (get(width) / 2 - get(width) / 2) / get(zoom) + get(camX);
@@ -69254,8 +69807,8 @@ function FloorPlanCanvas($$anchor, $$props) {
69254
69807
  delegated("click", button_14, () => zoomToFit());
69255
69808
  append($$anchor, fragment);
69256
69809
  };
69257
- if_block(node_1, ($$render) => {
69258
- if (!$$props.viewOnly) $$render(consequent_22);
69810
+ if_block(node, ($$render) => {
69811
+ if (!$$props.viewOnly) $$render(consequent_21);
69259
69812
  });
69260
69813
  reset(div);
69261
69814
  template_effect(($0) => {
@@ -70575,35 +71128,31 @@ function App($$anchor, $$props) {
70575
71128
  });
70576
71129
  let $6 = /* @__PURE__ */ user_derived(() => {
70577
71130
  var _$$get8;
70578
- return (_$$get8 = get(config)) === null || _$$get8 === void 0 ? void 0 : _$$get8.projectName;
71131
+ return (_$$get8 = get(config)) === null || _$$get8 === void 0 ? void 0 : _$$get8.selectedCameraSerial;
70579
71132
  });
70580
71133
  let $7 = /* @__PURE__ */ user_derived(() => {
70581
71134
  var _$$get9;
70582
- return (_$$get9 = get(config)) === null || _$$get9 === void 0 ? void 0 : _$$get9.selectedCameraSerial;
71135
+ return (_$$get9 = get(config)) === null || _$$get9 === void 0 ? void 0 : _$$get9.showCameraCones;
70583
71136
  });
70584
71137
  let $8 = /* @__PURE__ */ user_derived(() => {
70585
71138
  var _$$get10;
70586
- return (_$$get10 = get(config)) === null || _$$get10 === void 0 ? void 0 : _$$get10.showCameraCones;
71139
+ return (_$$get10 = get(config)) === null || _$$get10 === void 0 ? void 0 : _$$get10.showCameraLabels;
70587
71140
  });
70588
71141
  let $9 = /* @__PURE__ */ user_derived(() => {
70589
71142
  var _$$get11;
70590
- return (_$$get11 = get(config)) === null || _$$get11 === void 0 ? void 0 : _$$get11.showCameraLabels;
71143
+ return (_$$get11 = get(config)) === null || _$$get11 === void 0 ? void 0 : _$$get11.cameraHeatmapMatrix;
70591
71144
  });
70592
71145
  let $10 = /* @__PURE__ */ user_derived(() => {
70593
71146
  var _$$get12;
70594
- return (_$$get12 = get(config)) === null || _$$get12 === void 0 ? void 0 : _$$get12.cameraHeatmapMatrix;
71147
+ return ((_$$get12 = get(config)) === null || _$$get12 === void 0 ? void 0 : _$$get12.cameraThumbnail) || "";
70595
71148
  });
70596
71149
  let $11 = /* @__PURE__ */ user_derived(() => {
70597
71150
  var _$$get13;
70598
- return ((_$$get13 = get(config)) === null || _$$get13 === void 0 ? void 0 : _$$get13.cameraThumbnail) || "";
71151
+ return (_$$get13 = get(config)) === null || _$$get13 === void 0 ? void 0 : _$$get13.canvasBackground;
70599
71152
  });
70600
71153
  let $12 = /* @__PURE__ */ user_derived(() => {
70601
71154
  var _$$get14;
70602
- return (_$$get14 = get(config)) === null || _$$get14 === void 0 ? void 0 : _$$get14.canvasBackground;
70603
- });
70604
- let $13 = /* @__PURE__ */ user_derived(() => {
70605
- var _$$get15;
70606
- return (_$$get15 = get(config)) === null || _$$get15 === void 0 ? void 0 : _$$get15.floorPlateBackground;
71155
+ return (_$$get14 = get(config)) === null || _$$get14 === void 0 ? void 0 : _$$get14.floorPlateBackground;
70607
71156
  });
70608
71157
  FloorPlanCanvas(node_4, {
70609
71158
  get viewOnly() {
@@ -70624,29 +71173,26 @@ function App($$anchor, $$props) {
70624
71173
  get heatmapColorScale() {
70625
71174
  return get($5);
70626
71175
  },
70627
- get projectName() {
70628
- return get($6);
70629
- },
70630
71176
  get selectedCameraSerial() {
70631
- return get($7);
71177
+ return get($6);
70632
71178
  },
70633
71179
  get showCameraCones() {
70634
- return get($8);
71180
+ return get($7);
70635
71181
  },
70636
71182
  get showCameraLabels() {
70637
- return get($9);
71183
+ return get($8);
70638
71184
  },
70639
71185
  get cameraHeatmapMatrix() {
70640
- return get($10);
71186
+ return get($9);
70641
71187
  },
70642
71188
  get cameraThumbnail() {
70643
- return get($11);
71189
+ return get($10);
70644
71190
  },
70645
71191
  get canvasBackground() {
70646
- return get($12);
71192
+ return get($11);
70647
71193
  },
70648
71194
  get floorPlateBackground() {
70649
- return get($13);
71195
+ return get($12);
70650
71196
  }
70651
71197
  });
70652
71198
  }
@@ -70675,12 +71221,12 @@ function App($$anchor, $$props) {
70675
71221
  {
70676
71222
  let $0 = /* @__PURE__ */ user_derived(() => get(mode) === "3d");
70677
71223
  let $1 = /* @__PURE__ */ user_derived(() => {
70678
- var _$$get$siteCameras, _$$get16;
70679
- return (_$$get$siteCameras = (_$$get16 = get(config)) === null || _$$get16 === void 0 ? void 0 : _$$get16.siteCameras) !== null && _$$get$siteCameras !== void 0 ? _$$get$siteCameras : [];
71224
+ var _$$get$siteCameras, _$$get15;
71225
+ return (_$$get$siteCameras = (_$$get15 = get(config)) === null || _$$get15 === void 0 ? void 0 : _$$get15.siteCameras) !== null && _$$get$siteCameras !== void 0 ? _$$get$siteCameras : [];
70680
71226
  });
70681
71227
  let $2 = /* @__PURE__ */ user_derived(() => {
70682
- var _$$get$cameraThumbnai, _$$get17;
70683
- return (_$$get$cameraThumbnai = (_$$get17 = get(config)) === null || _$$get17 === void 0 ? void 0 : _$$get17.cameraThumbnail) !== null && _$$get$cameraThumbnai !== void 0 ? _$$get$cameraThumbnai : "";
71228
+ var _$$get$cameraThumbnai, _$$get16;
71229
+ return (_$$get$cameraThumbnai = (_$$get16 = get(config)) === null || _$$get16 === void 0 ? void 0 : _$$get16.cameraThumbnail) !== null && _$$get$cameraThumbnai !== void 0 ? _$$get$cameraThumbnai : "";
70684
71230
  });
70685
71231
  PropertiesPanel($$anchor, {
70686
71232
  get is3D() {