@camera.ui/server 2.2.7 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (958) hide show
  1. package/LICENSE.md +8 -1
  2. package/dist/interface/assets/404-C0X5UBF4.js +1 -0
  3. package/dist/interface/assets/About-Ctp_u5qK.js +1 -0
  4. package/dist/interface/assets/Assistant-Bj2bAUHD.css +1 -0
  5. package/dist/interface/assets/Assistant-CDrBV_mg.js +1 -0
  6. package/dist/interface/assets/Automation-Dp6V80Iz.js +3 -0
  7. package/dist/interface/assets/Automation-R5o9sXYY.css +1 -0
  8. package/dist/interface/assets/AutomationImport-DKgg7atE.js +2 -0
  9. package/dist/interface/assets/AutomationStore-CU-m5VC8.js +2 -0
  10. package/dist/interface/assets/AutomationStoreDetail-CiyIs8Iu.js +2 -0
  11. package/dist/interface/assets/Automations-Dljh-sWu.js +2 -0
  12. package/dist/interface/assets/Camera-0p0P_mbp.css +1 -0
  13. package/dist/interface/assets/Camera-Bvovab-8.js +2 -0
  14. package/dist/interface/assets/CameraConsole-D_Fv-MAi.js +7 -0
  15. package/dist/interface/assets/Cameras-Cq7Gw-fk.js +651 -0
  16. package/dist/interface/assets/Camview-Bs2VvmUS.css +1 -0
  17. package/dist/interface/assets/Camview-CP6PA20C.js +1 -0
  18. package/dist/interface/assets/CertificateUpload-DjzNMFc3.js +1 -0
  19. package/dist/interface/assets/Config-Dl2TlyFe.js +2 -0
  20. package/dist/interface/assets/ConfigActionAssistant-DCkJ_Iqq.js +1 -0
  21. package/dist/interface/assets/ConfigActionCameraControl-2pzl59gR.js +1 -0
  22. package/dist/interface/assets/ConfigActionDelay-BAp1dr0N.js +1 -0
  23. package/dist/interface/assets/ConfigActionHttp-_kqgEuun.js +1 -0
  24. package/dist/interface/assets/ConfigActionImageInput-BgtACnCm.js +1 -0
  25. package/dist/interface/assets/ConfigActionMqtt-z7UzccW5.js +1 -0
  26. package/dist/interface/assets/ConfigActionNotification-bhbb5AqU.js +1 -0
  27. package/dist/interface/assets/ConfigActionNotificationControl-BbvX8MFu.js +1 -0
  28. package/dist/interface/assets/ConfigActionOutput-DdgSg3FU.js +1 -0
  29. package/dist/interface/assets/ConfigActionPlugin-DGjZd1L0.js +1 -0
  30. package/dist/interface/assets/ConfigActionSensor-DmImWFAo.js +1 -0
  31. package/dist/interface/assets/ConfigActionSnapshot-hVHSfdtS.js +1 -0
  32. package/dist/interface/assets/ConfigActionVariable-BIpruwsx.js +1 -0
  33. package/dist/interface/assets/ConfigConditionIfElse-DRSpsoR4.js +1 -0
  34. package/dist/interface/assets/ConfigConditionSensorState-C2SNARH7.js +1 -0
  35. package/dist/interface/assets/ConfigConditionSwitch-4SbQcU7N.js +1 -0
  36. package/dist/interface/assets/ConfigConditionTime-ESX3shbg.js +1 -0
  37. package/dist/interface/assets/ConfigSensorValueInput-CTUdAA-R.js +1 -0
  38. package/dist/interface/assets/ConfigTriggerDetection-BRr6ixxQ.js +1 -0
  39. package/dist/interface/assets/ConfigTriggerGeofence-D-xRMGrT.js +1 -0
  40. package/dist/interface/assets/ConfigTriggerManual-aXD6k1qa.js +1 -0
  41. package/dist/interface/assets/ConfigTriggerMqtt-pjHW4yOL.js +1 -0
  42. package/dist/interface/assets/ConfigTriggerSchedule-CYOt57qg.js +1 -0
  43. package/dist/interface/assets/ConfigTriggerSensor-BwJ_cAqd.js +1 -0
  44. package/dist/interface/assets/ConfigTriggerSystem-DBXIrjzU.js +1 -0
  45. package/dist/interface/assets/ConfigTriggerWebhook-CccBmMCb.js +1 -0
  46. package/dist/interface/assets/Console-DWAaz1C6.js +1 -0
  47. package/dist/interface/assets/CuiAssistantConversation-B3xEiNNt.js +5 -0
  48. package/dist/interface/assets/CuiAssistantConversation-C5ca1lgX.css +1 -0
  49. package/dist/interface/assets/CuiAutomationRunsDialog-CfylVPLI.js +1 -0
  50. package/dist/interface/assets/CuiBottomSheet-ACN23VLS.js +1 -0
  51. package/dist/interface/assets/CuiBottomSheet-DEVNeDqa.js +1 -0
  52. package/dist/interface/assets/CuiCameraPipCard-TYTCfwXf.css +1 -0
  53. package/dist/interface/assets/CuiCameraPipCard-rR_FW9zq.js +1 -0
  54. package/dist/interface/assets/CuiCameraRecordings-CnorhPhf.js +1 -0
  55. package/dist/interface/assets/CuiCameraShares-BxUgedC_.js +1 -0
  56. package/dist/interface/assets/CuiCameraTable-C3GB4Q2y.js +2 -0
  57. package/dist/interface/assets/CuiCameraTable-MHfnZSyK.js +1 -0
  58. package/dist/interface/assets/CuiChartTable-TAzZgetO.js +1 -0
  59. package/dist/interface/assets/CuiConsole-Cf5lOCE1.js +5 -0
  60. package/dist/interface/assets/CuiDataTable-DfjXa0C1.js +1 -0
  61. package/dist/interface/assets/CuiLightControl-ChK-SvJp.js +1 -0
  62. package/dist/interface/assets/CuiList-C4fxd9lD.js +1 -0
  63. package/dist/interface/assets/CuiMarkdownContent-Do04YgHe.js +1 -0
  64. package/dist/interface/assets/CuiMarkdownContent-qOPm3VEi.js +1 -0
  65. package/dist/interface/assets/CuiPluginCard-DMpANIQj.js +2 -0
  66. package/dist/interface/assets/CuiPluginCategoryChip-BKxJMid7.js +1 -0
  67. package/dist/interface/assets/CuiPluginOAuthButton-DnQ838JJ.js +2 -0
  68. package/dist/interface/assets/CuiPluginTrustBadge-DyYDUWV6.js +1 -0
  69. package/dist/interface/assets/CuiQRCode-S9fPi0_l.js +1 -0
  70. package/dist/interface/assets/CuiSchema-DScmDQsh.js +1 -0
  71. package/dist/interface/assets/CuiTopNavbarItem-CT10aAlO.js +1 -0
  72. package/dist/interface/assets/Faces-Coy-tUVM.js +1 -0
  73. package/dist/interface/assets/FirstSteps-CrMJC049.js +1 -0
  74. package/dist/interface/assets/Floorplan-Bj_mVrxp.js +1 -0
  75. package/dist/interface/assets/Floorplan-CT5TrMSD.css +1 -0
  76. package/dist/interface/assets/Instances-B_mpKAng.js +1 -0
  77. package/dist/interface/assets/Logs-fY1dpQk4.js +6 -0
  78. package/dist/interface/assets/Menu-Bgi-NLdg.js +1 -0
  79. package/dist/interface/assets/Metrics-DnMeIrkf.css +1 -0
  80. package/dist/interface/assets/Metrics-k9KACiwh.js +12 -0
  81. package/dist/interface/assets/OAuthDeviceFlow-xTh83xmc.js +1 -0
  82. package/dist/interface/assets/Plugin-BB7x7UHw.css +1 -0
  83. package/dist/interface/assets/Plugin-VWq7sONB.js +1 -0
  84. package/dist/interface/assets/PluginConsole-LnnDOVBL.js +7 -0
  85. package/dist/interface/assets/PluginDetail-CKD9sbDx.js +2 -0
  86. package/dist/interface/assets/PluginSchema-BnB0_6Sk.js +1 -0
  87. package/dist/interface/assets/PluginSearch-BoBZLLbr.js +1 -0
  88. package/dist/interface/assets/PluginSearch-kGhweU1J.js +2 -0
  89. package/dist/interface/assets/PluginUpdateProgress-DMx0QlgE.js +1 -0
  90. package/dist/interface/assets/Plugins-Ekmr6aVa.js +1 -0
  91. package/dist/interface/assets/RecentEventsFilter-StLJNuks.js +1 -0
  92. package/dist/interface/assets/Recordings-8PqxJOI3.css +1 -0
  93. package/dist/interface/assets/Recordings-Bvkuk_TV.js +1 -0
  94. package/dist/interface/assets/SensorEdit-CAf9Nb01.js +1 -0
  95. package/dist/interface/assets/SensorHistory-il8bDErX.js +1 -0
  96. package/dist/interface/assets/Sensors-sxQ6HLKo.js +2 -0
  97. package/dist/interface/assets/Settings-Bu0G7Ebx.js +1 -0
  98. package/dist/interface/assets/Settings-DtCSaLPb.css +1 -0
  99. package/dist/interface/assets/SettingsAccount-8OZJLQi-.js +1 -0
  100. package/dist/interface/assets/SettingsAccount-bSfFi9YH.js +1 -0
  101. package/dist/interface/assets/SettingsAppearance-CnvN_Tzr.js +1 -0
  102. package/dist/interface/assets/SettingsAppearance-EvPWgF4c.js +1 -0
  103. package/dist/interface/assets/SettingsAssistant-B6s6pHCx.js +1 -0
  104. package/dist/interface/assets/SettingsBackup-Dd2FaUcN.js +1 -0
  105. package/dist/interface/assets/SettingsList-SvCO_gfG.js +1 -0
  106. package/dist/interface/assets/SettingsMqtt-BXBzHX84.js +1 -0
  107. package/dist/interface/assets/SettingsNotifications-CV-jJwFV.js +1 -0
  108. package/dist/interface/assets/SettingsPermissions-GchFaWjz.js +1 -0
  109. package/dist/interface/assets/SettingsRecordings-C4Ch_jmV.js +1 -0
  110. package/dist/interface/assets/SettingsRemote-CsIGx-LU.css +1 -0
  111. package/dist/interface/assets/SettingsRemote-OZHDJKSq.js +2 -0
  112. package/dist/interface/assets/SettingsSystem-BJlHXwVs.js +2 -0
  113. package/dist/interface/assets/SettingsUsers-RGOkOzx0.js +1 -0
  114. package/dist/interface/assets/Terminal-DX-ECC91.js +4 -0
  115. package/dist/interface/assets/Training-B8my7vka.js +1 -0
  116. package/dist/interface/assets/Training-D1DDjCCD.css +1 -0
  117. package/dist/interface/assets/Updates-DmavyhAn.js +2 -0
  118. package/dist/interface/assets/VariableInput-DQJle67Y.js +1 -0
  119. package/dist/interface/assets/VariableSuggestions-D8V739dF.js +1 -0
  120. package/dist/interface/assets/VersionsHandler-B41TJhgY.js +7 -0
  121. package/dist/interface/assets/VirtualSensorCreate-MfLh-LpH.js +1 -0
  122. package/dist/interface/assets/Workers-CafDeRhH.js +2 -0
  123. package/dist/interface/assets/Workers-Dey1snI4.css +1 -0
  124. package/dist/interface/assets/account-DjBQulDn.js +1 -0
  125. package/dist/interface/assets/ace-BPAekgyf.js +1 -0
  126. package/dist/interface/assets/ace.config-CvKE-yp1.js +1 -0
  127. package/dist/interface/assets/alert-circle-B-JCMbb9.js +1 -0
  128. package/dist/interface/assets/alert-outline-B4ZZowEj.js +1 -0
  129. package/dist/interface/assets/api-By0v6EeA.css +2 -0
  130. package/dist/interface/assets/api-D1iULsSy.js +4 -0
  131. package/dist/interface/assets/api-DbUdfXO_.js +1 -0
  132. package/dist/interface/assets/arrow-left-PeaVwpHd.js +1 -0
  133. package/dist/interface/assets/assistant-7hqP6OpA.js +1 -0
  134. package/dist/interface/assets/assistantModels-D3ncWWu0.js +1 -0
  135. package/dist/interface/assets/auth-CDxrn7fe.js +1 -0
  136. package/dist/interface/assets/automations-CTTQlGCW.js +1 -0
  137. package/dist/interface/assets/back-filled-CJoz7Gkl.js +1 -0
  138. package/dist/interface/assets/bell-ring-CBf0Yn3H.js +1 -0
  139. package/dist/interface/assets/brain-uZ03n3LW.js +1 -0
  140. package/dist/interface/assets/cameraSources-MOiE_1-W.js +1 -0
  141. package/dist/interface/assets/cctv-VgKQ-dBV.js +1 -0
  142. package/dist/interface/assets/check-circle-BU-KNgPB.js +1 -0
  143. package/dist/interface/assets/check-circle-outline-BsxzAMed.js +1 -0
  144. package/dist/interface/assets/chevron-down-CxK4Sfjs.js +1 -0
  145. package/dist/interface/assets/chevron-up-DWfNH8va.js +1 -0
  146. package/dist/interface/assets/clock-outline-BtWx4GaF.js +1 -0
  147. package/dist/interface/assets/close-Be7oB7d_.js +1 -0
  148. package/dist/interface/assets/close-circle-D7Jmhp_7.js +1 -0
  149. package/dist/interface/assets/cloud-check-zCGJxpWI.js +1 -0
  150. package/dist/interface/assets/cloudHandoff-CJzFH7CW.js +1 -0
  151. package/dist/interface/assets/config-6EiGxiYm.js +1 -0
  152. package/dist/interface/assets/content-copy-BcYlfuFc.js +1 -0
  153. package/dist/interface/assets/copy-DuY-M96E.js +1 -0
  154. package/dist/interface/assets/cube-scan-Cae03i_N.js +1 -0
  155. package/dist/interface/assets/database-refresh-outline-B3OEQFF7.js +1 -0
  156. package/dist/interface/assets/delete-BWgOAzKl.js +1 -0
  157. package/dist/interface/assets/dist-DmpuuM9s.js +1 -0
  158. package/dist/interface/assets/dots-vertical-Kby1GY8_.js +1 -0
  159. package/dist/interface/assets/download-C291Yq7I.js +1 -0
  160. package/dist/interface/assets/esm-B2TVBF3B.js +1 -0
  161. package/dist/interface/assets/esm-BEntuCG7.js +1 -0
  162. package/dist/interface/assets/esm-BRnyrFH8.js +1 -0
  163. package/dist/interface/assets/esm-CCwXzd_8.js +1 -0
  164. package/dist/interface/assets/esm-CEjwTsuD.js +1 -0
  165. package/dist/interface/assets/esm-CGGV9tC4.js +1 -0
  166. package/dist/interface/assets/esm-CI2tTOc5.js +1 -0
  167. package/dist/interface/assets/esm-CgxZmMYv.js +1 -0
  168. package/dist/interface/assets/esm-Csc6f5Fy.js +1 -0
  169. package/dist/interface/assets/esm-Qzx3d-Ie.js +1 -0
  170. package/dist/interface/assets/esm-a_w7mTdx.js +1 -0
  171. package/dist/interface/assets/esm-iKfsu7-H.js +1 -0
  172. package/dist/interface/assets/esm-ks5kvk_e.js +1 -0
  173. package/dist/interface/assets/esm-nJfTguKF.js +1 -0
  174. package/dist/interface/assets/eventLabels-idFWh3Y_.js +1 -0
  175. package/dist/interface/assets/eye-off-zGCIHKOK.js +1 -0
  176. package/dist/interface/assets/flowSchema-Dp_-p9WA.js +1 -0
  177. package/dist/interface/assets/help-circle-outline-DXFepDAG.js +1 -0
  178. package/dist/interface/assets/history-D-FlZdKD.js +1 -0
  179. package/dist/interface/assets/home-DPdzRxcM.js +1 -0
  180. package/dist/interface/assets/information-outline-ChOM9qgI.js +1 -0
  181. package/dist/interface/assets/intercomService-BQYzjnAi.js +1 -0
  182. package/dist/interface/assets/lan-DvYEO83l.js +1 -0
  183. package/dist/interface/assets/main-0oXl_8v7.js +3 -0
  184. package/dist/interface/assets/main-CdvAniEp.css +1 -0
  185. package/dist/interface/assets/microphone-D-T9xga4.js +1 -0
  186. package/dist/interface/assets/minus-4T4INuO4.js +1 -0
  187. package/dist/interface/assets/mqtt-ChvXxMhR.js +1 -0
  188. package/dist/interface/assets/native-CtfXrwj5.js +1 -0
  189. package/dist/interface/assets/native-JMtkOkIV.js +1 -0
  190. package/dist/interface/assets/nodeDefinitions-Dp8cnne1.js +1 -0
  191. package/dist/interface/assets/notifications-CbL-1oMs.js +1 -0
  192. package/dist/interface/assets/pause-DHqHYA3V.js +1 -0
  193. package/dist/interface/assets/pencil-outline-D-GmPf8M.js +1 -0
  194. package/dist/interface/assets/pencil-vACi-JzY.js +1 -0
  195. package/dist/interface/assets/plugin-Dt5Xetfz.js +1 -0
  196. package/dist/interface/assets/plugins-lsoAntRQ.js +1 -0
  197. package/dist/interface/assets/plus-BBUb8_uL.js +1 -0
  198. package/dist/interface/assets/plus-BJb7U4bN.js +1 -0
  199. package/dist/interface/assets/power-Dm_aNIz-.js +1 -0
  200. package/dist/interface/assets/radar-Dcvdz--e.js +1 -0
  201. package/dist/interface/assets/refresh-CO4F18Je.js +1 -0
  202. package/dist/interface/assets/restore-xRBt3Grb.js +1 -0
  203. package/dist/interface/assets/rooms-P8WrRIco.js +1 -0
  204. package/dist/interface/assets/round-alt-arrow-left-bold-CZHXzGS5.js +1 -0
  205. package/dist/interface/assets/search-D75YW08B.js +1 -0
  206. package/dist/interface/assets/sensorIcons-BRTtoaHX.js +1 -0
  207. package/dist/interface/assets/sensorSlots-BTj-IM7z.js +1 -0
  208. package/dist/interface/assets/sensors-Dxc7HgjZ.js +1 -0
  209. package/dist/interface/assets/server-DlK8gUoE.js +1 -0
  210. package/dist/interface/assets/settings-DDOgc5BX.js +1 -0
  211. package/dist/interface/assets/source-branch-DVHuYlkZ.js +1 -0
  212. package/dist/interface/assets/theme-BOppzzar.js +1 -0
  213. package/dist/interface/assets/trash-2-DDKPtl2x.js +1 -0
  214. package/dist/interface/assets/trash-can-outline-DVH3zgo0.js +1 -0
  215. package/dist/interface/assets/trash-fill-C_IJ4Vu2.js +1 -0
  216. package/dist/interface/assets/trash2-DY0XTaJD.js +1 -0
  217. package/dist/interface/assets/types-CeruGCb8.js +1 -0
  218. package/dist/interface/assets/types-J1Drrxo1.js +1 -0
  219. package/dist/interface/assets/types-U4AuTNLR.js +1 -0
  220. package/dist/interface/assets/undo-YRkBYCnf.js +1 -0
  221. package/dist/interface/assets/ungrouped-ING_JAuK.js +1 -0
  222. package/dist/interface/assets/updates-DtVp84Y0.js +1 -0
  223. package/dist/interface/assets/upload-2WcHRjTq.js +1 -0
  224. package/dist/interface/assets/upload-BiE7VzTj.js +1 -0
  225. package/dist/interface/assets/useAppVersion-BGgCk5GD.js +1 -0
  226. package/dist/interface/assets/useAssistantActions-C13O5EHU.js +1 -0
  227. package/dist/interface/assets/useBackupRestore-vrhmc9i-.js +1 -0
  228. package/dist/interface/assets/useCameraOptions-CI1baRmm.js +1 -0
  229. package/dist/interface/assets/useKeyboardInset-CvgJp091.js +1 -0
  230. package/dist/interface/assets/useLogsSocket-Bf0BI8ET.js +1 -0
  231. package/dist/interface/assets/useNavLayout-6zM1Y-7B.js +1 -0
  232. package/dist/interface/assets/usePermissions-DZitFsBQ.js +1 -0
  233. package/dist/interface/assets/usePluginUpdates-VZdpJ_Ax.js +1 -0
  234. package/dist/interface/assets/usePushRegistration-vcbMrTxZ.js +2 -0
  235. package/dist/interface/assets/useServerRestart-DrpuNbIu.js +1 -0
  236. package/dist/interface/assets/useStreamStatus-l3Pfk1H4.js +1 -0
  237. package/dist/interface/assets/useTabSwipe-BSpi25WV.js +1 -0
  238. package/dist/interface/assets/useUpdateChannel-kAl-5UNY.js +1 -0
  239. package/dist/interface/assets/useUpdatesSocket-CaFz_fEb.js +1 -0
  240. package/dist/interface/assets/useUserOptions-BKteXnmU.js +1 -0
  241. package/dist/interface/assets/variable-Cp8o-q8t.js +1 -0
  242. package/dist/interface/assets/vendor-Df81FCJz.js +29 -0
  243. package/dist/interface/assets/vendor-ace-QSsGUspX.js +1085 -0
  244. package/dist/interface/assets/vendor-cameraui-K1Nw4PvF.js +2326 -0
  245. package/dist/interface/assets/vendor-capacitor-t5EIN1GG.js +2 -0
  246. package/dist/interface/assets/vendor-chart-BiJYkx5_.js +3 -0
  247. package/dist/interface/assets/vendor-core-CJdfpB0I.js +1 -0
  248. package/dist/interface/assets/vendor-dnd-C1kMh9_t.js +2 -0
  249. package/dist/interface/assets/vendor-draggabilly-Cw1oJ6qc.js +1 -0
  250. package/dist/interface/assets/vendor-leaflet-OSZlONe5.js +1 -0
  251. package/dist/interface/assets/vendor-markdown-DTWiWKBj.js +14 -0
  252. package/dist/interface/assets/vendor-primevue-DoA2Rwcb.js +3942 -0
  253. package/dist/interface/assets/vendor-vueflow-DWU_IzGe.js +26 -0
  254. package/dist/interface/assets/walk-B8FNhXuj.js +1 -0
  255. package/dist/interface/assets/web-B98ahwoP.js +1 -0
  256. package/dist/interface/assets/web-BSsSrRZf.js +1 -0
  257. package/dist/interface/assets/web-BiNRDta4.js +1 -0
  258. package/dist/interface/assets/web-BjKL51lK-CZKmYhby.js +1 -0
  259. package/dist/interface/assets/web-BjtOcquy.js +1 -0
  260. package/dist/interface/assets/web-CkTE9nCG.js +1 -0
  261. package/dist/interface/assets/web-Cvogq5S5.js +1 -0
  262. package/dist/interface/assets/web-D-A4EBKj.js +1 -0
  263. package/dist/interface/assets/web-DVGMBduz.js +1 -0
  264. package/dist/interface/assets/web-SpWB7I6X.js +1 -0
  265. package/dist/interface/assets/web-k0ihT_qK.js +1 -0
  266. package/dist/interface/assets/web-ovBpm7Dl.js +1 -0
  267. package/dist/interface/assets/web-z5Xz9tOQ.js +1 -0
  268. package/dist/interface/assets/web-zfhkFevT.js +1 -0
  269. package/dist/interface/assets/webhook-DIjChTrs.js +1 -0
  270. package/dist/interface/assets/workbox-window.prod.es5-DRKojI0e.js +1 -0
  271. package/dist/interface/assets/zoom-in-rMB152Uz.js +1 -0
  272. package/dist/interface/ha/404-RtgPpD9N.js +60 -0
  273. package/dist/interface/ha/About-0PRv9bU0.js +55 -0
  274. package/dist/interface/ha/Assistant-DbwxVfpl.js +9853 -0
  275. package/dist/interface/ha/Automation-D3HomdH7.js +2029 -0
  276. package/dist/interface/ha/AutomationImport-nQUUvZcv.js +206 -0
  277. package/dist/interface/ha/AutomationStore-BXDD92wZ.js +336 -0
  278. package/dist/interface/ha/AutomationStoreDetail-BYeq7FID.js +122 -0
  279. package/dist/interface/ha/Automations-CJlGqmSP.js +424 -0
  280. package/dist/interface/ha/Camera-Ai4BxVh_.js +747 -0
  281. package/dist/interface/ha/CameraConsole-UMNOX3dE.js +52 -0
  282. package/dist/interface/ha/Cameras-BW-AEXYi.js +1971 -0
  283. package/dist/interface/ha/Camview-jikpVEE0.js +1336 -0
  284. package/dist/interface/ha/Config-BOxwBH2D.js +356 -0
  285. package/dist/interface/ha/ConfigActionAssistant--3iWk9sq.js +182 -0
  286. package/dist/interface/ha/ConfigActionCameraControl-DbVXWTeA.js +152 -0
  287. package/dist/interface/ha/ConfigActionHttp-Du3n2Yj0.js +134 -0
  288. package/dist/interface/ha/ConfigActionImageInput-BrJrTZTY.js +171 -0
  289. package/dist/interface/ha/ConfigActionMqtt-DZd1BNUt.js +81 -0
  290. package/dist/interface/ha/ConfigActionNotification-CJWW10gt.js +199 -0
  291. package/dist/interface/ha/ConfigActionNotificationControl-Bl41AVv1.js +111 -0
  292. package/dist/interface/ha/ConfigActionOutput-OTj7Lwgq.js +98 -0
  293. package/dist/interface/ha/ConfigActionPlugin-B790PEk0.js +172 -0
  294. package/dist/interface/ha/ConfigActionSensor-BG3jZxge.js +139 -0
  295. package/dist/interface/ha/ConfigActionSnapshot-fGmLl6jb.js +48 -0
  296. package/dist/interface/ha/ConfigActionVariable-CK3vYDsr.js +88 -0
  297. package/dist/interface/ha/ConfigConditionIfElse-DyFLGg3y.js +124 -0
  298. package/dist/interface/ha/ConfigConditionSensorState-BUTfeFO2.js +192 -0
  299. package/dist/interface/ha/ConfigConditionSwitch-iDG_ubif.js +128 -0
  300. package/dist/interface/ha/ConfigSensorValueInput-BmRIGUKB.js +170 -0
  301. package/dist/interface/ha/ConfigTriggerDetection-DyPQGt9M.js +241 -0
  302. package/dist/interface/ha/ConfigTriggerGeofence-CGE-bH_t.js +4888 -0
  303. package/dist/interface/ha/ConfigTriggerMqtt-CM3KZqBc.js +134 -0
  304. package/dist/interface/ha/ConfigTriggerSensor-DoHMcwP4.js +73 -0
  305. package/dist/interface/ha/ConfigTriggerSystem-BYKbW4Zr.js +192 -0
  306. package/dist/interface/ha/ConfigTriggerWebhook-5PBAadG8.js +94 -0
  307. package/dist/interface/ha/Console-BEXzl4p1.js +348 -0
  308. package/dist/interface/ha/CuiAutomationRunsDialog-DkK_ar5G.js +130 -0
  309. package/dist/interface/ha/CuiBottomSheet-CYNvQV4T.js +270 -0
  310. package/dist/interface/ha/CuiCameraRecordings-DYjecmE_.js +533 -0
  311. package/dist/interface/ha/CuiCameraShares-C0H60nZS.js +121 -0
  312. package/dist/interface/ha/CuiCameraTable-CQNMyBaq.js +169 -0
  313. package/dist/interface/ha/CuiChartTable-Bhv1p9zj.js +6801 -0
  314. package/dist/interface/ha/CuiConsole-DtXorGF5.js +244 -0
  315. package/dist/interface/ha/CuiDataTable-Cy8EjCk9.js +8732 -0
  316. package/dist/interface/ha/CuiList-DnW6Q5m2.js +57 -0
  317. package/dist/interface/ha/CuiPluginCard-B4SCUblV.js +769 -0
  318. package/dist/interface/ha/CuiPluginOAuthButton-BKg9SftQ.js +79 -0
  319. package/dist/interface/ha/CuiPluginTrustBadge-CEtUJhCJ.js +123 -0
  320. package/dist/interface/ha/CuiQRCode-gp-9hqyk.js +86 -0
  321. package/dist/interface/ha/CuiSchema-CYpr_dD7.js +963 -0
  322. package/dist/interface/ha/CuiTopNavbarItem-CM-1oPxf.js +140 -0
  323. package/dist/interface/ha/Faces-pa60ySng.js +1575 -0
  324. package/dist/interface/ha/FirstSteps-D42yZm7R.js +251 -0
  325. package/dist/interface/ha/Floorplan-BvE546pE.js +3657 -0
  326. package/dist/interface/ha/Instances-CAGCyfbB.js +680 -0
  327. package/dist/interface/ha/Logs-RB3Ba8WM.js +418 -0
  328. package/dist/interface/ha/Menu-hAnHu_jq.js +156 -0
  329. package/dist/interface/ha/Metrics-ChYTebkX.js +1448 -0
  330. package/dist/interface/ha/OAuthDeviceFlow-C05pH-9o.js +112 -0
  331. package/dist/interface/ha/Plugin-D7XwcXkW.js +1752 -0
  332. package/dist/interface/ha/PluginConsole-DphEIOlL.js +56 -0
  333. package/dist/interface/ha/PluginDetail-DfMl-yCl.js +805 -0
  334. package/dist/interface/ha/PluginSearch-BPN4Opg5.js +462 -0
  335. package/dist/interface/ha/PluginUpdateProgress-ByJ0R5sW.js +34 -0
  336. package/dist/interface/ha/Plugins-BhKmjjNn.js +692 -0
  337. package/dist/interface/ha/RecentEventsFilter-BkLMlGVJ.js +78 -0
  338. package/dist/interface/ha/Recordings-BaU7M1OW.js +1836 -0
  339. package/dist/interface/ha/SensorEdit-DWxcCJ0F.js +1462 -0
  340. package/dist/interface/ha/SensorHistory-DuA9E9wT.js +54 -0
  341. package/dist/interface/ha/Sensors-CVpIHcgG.js +1402 -0
  342. package/dist/interface/ha/Settings-BO2eBGEn.js +218 -0
  343. package/dist/interface/ha/SettingsAccount-BQZZfoSM.js +971 -0
  344. package/dist/interface/ha/SettingsAppearance-B_yGl89u.js +220 -0
  345. package/dist/interface/ha/SettingsAssistant-kMOixl9g.js +2025 -0
  346. package/dist/interface/ha/SettingsBackup-BpG-W4j-.js +556 -0
  347. package/dist/interface/ha/SettingsList-Btnkzu94.js +40 -0
  348. package/dist/interface/ha/SettingsMqtt-C4DX9cNC.js +526 -0
  349. package/dist/interface/ha/SettingsNotifications-DI6ImggH.js +529 -0
  350. package/dist/interface/ha/SettingsPermissions-BCDyCFcb.js +84 -0
  351. package/dist/interface/ha/SettingsRecordings-Bq5NkJhd.js +152 -0
  352. package/dist/interface/ha/SettingsRemote-CtncaPIA.js +1813 -0
  353. package/dist/interface/ha/SettingsSystem-BJXuA7xA.js +376 -0
  354. package/dist/interface/ha/SettingsUsers-BF0rDluv.js +379 -0
  355. package/dist/interface/ha/Terminal-kTCe2jP3.js +612 -0
  356. package/dist/interface/ha/Training-BM2Xb8Ef.js +1754 -0
  357. package/dist/interface/ha/Updates-Cv1EY_T0.js +343 -0
  358. package/dist/interface/ha/VariableInput-BO2zZu4N.js +52 -0
  359. package/dist/interface/ha/VersionsHandler-CRnT9-K7.js +216 -0
  360. package/dist/interface/ha/VirtualSensorCreate-6dVRxPjw.js +101 -0
  361. package/dist/interface/ha/Workers-MHia86lu.js +814 -0
  362. package/dist/interface/ha/ace-C9MtBQVV.js +13236 -0
  363. package/dist/interface/ha/ace.config-CSXnaIzV.js +1429 -0
  364. package/dist/interface/ha/api-CH_Y8Hee.js +65411 -0
  365. package/dist/interface/ha/api-DylRa66V.js +29 -0
  366. package/dist/interface/ha/assistant-smRQYA6p.js +349 -0
  367. package/dist/interface/ha/auth-BXj5Fm6s.js +271 -0
  368. package/dist/interface/ha/automationBlueprint-DGjftXFC.js +250 -0
  369. package/dist/interface/ha/cameraui-cards.js +1 -1
  370. package/dist/interface/ha/cards-E0zw1UVg.js +13477 -0
  371. package/dist/interface/ha/config-dG_DA6XL.js +116 -0
  372. package/dist/interface/ha/dist-BQf9ANPx.js +3257 -0
  373. package/dist/interface/ha/dist-euRmladF.js +287 -0
  374. package/dist/interface/ha/eventLabels-B5GrM5jO.js +734 -0
  375. package/dist/interface/ha/intercomService-BtJ_zUNd.js +1400 -0
  376. package/dist/interface/ha/mqtt-CP3vVkRJ.js +56 -0
  377. package/dist/interface/ha/notifications-CZNwSXTg.js +159 -0
  378. package/dist/interface/ha/pinia-CVnHHb-s.js +7696 -0
  379. package/dist/interface/ha/plugins--eatOIaI.js +592 -0
  380. package/dist/interface/ha/protocol-BB4jdtUC-BhEwymva.js +789 -0
  381. package/dist/interface/ha/rooms-D5E6K75d.js +45 -0
  382. package/dist/interface/ha/server-D1BqEY7i.js +239 -0
  383. package/dist/interface/ha/types-CWogEoya.js +1073 -0
  384. package/dist/interface/ha/ungrouped-Ch4UX4dy.js +58 -0
  385. package/dist/interface/ha/updates-B48Owi1w.js +341 -0
  386. package/dist/interface/ha/useAppVersion-D95sKTJR.js +22 -0
  387. package/dist/interface/ha/useAssistantActions-kDwiO-u5.js +29 -0
  388. package/dist/interface/ha/useKeyboardInset-C2R51vsC.js +27 -0
  389. package/dist/interface/ha/useLogsSocket-BzNWa2y2.js +59 -0
  390. package/dist/interface/ha/useNavLayout-228cwwqA.js +125 -0
  391. package/dist/interface/ha/usePermissions-CfA5x7Df.js +72 -0
  392. package/dist/interface/ha/useServerRestart-B0c40zs5.js +23 -0
  393. package/dist/interface/ha/useTabSwipe-CfZg5hWj.js +45 -0
  394. package/dist/interface/ha/useUpdateChannel-DQxI7FrD.js +22 -0
  395. package/dist/interface/ha/useUpdatesSocket-B8LqBBd3.js +34 -0
  396. package/dist/interface/ha/useUserOptions-dZf6ejlz.js +15 -0
  397. package/dist/interface/ha/walk-CsSXaeJw.js +33 -0
  398. package/dist/interface/index.html +71 -72
  399. package/dist/interface/sw.js +1 -1
  400. package/dist/interface/workbox-5f52ac45.js +1 -0
  401. package/dist/server/package.json +23 -23
  402. package/dist/server/requirements.txt +2 -2
  403. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/__init__.py +22 -0
  404. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/config.py +12 -0
  405. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/device.py +5 -1
  406. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/internal/camera_config_internal.py +5 -1
  407. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/manager/__init__.py +2 -1
  408. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/__init__.py +10 -0
  409. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/contract.py +6 -0
  410. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/plugin/interfaces.py +92 -4
  411. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/__init__.py +16 -0
  412. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/base.py +4 -0
  413. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/face_embedder.py +1 -1
  414. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/object.py +3 -3
  415. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/person_embedder.py +65 -0
  416. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/segmenter.py +81 -0
  417. package/dist/server/src/api/controllers/plugins.controller.js +1 -0
  418. package/dist/server/src/api/controllers/plugins.controller.js.map +1 -1
  419. package/dist/server/src/api/controllers/workers.controller.d.ts +2 -2
  420. package/dist/server/src/api/controllers/workers.controller.js +8 -2
  421. package/dist/server/src/api/controllers/workers.controller.js.map +1 -1
  422. package/dist/server/src/api/database/index.d.ts +2 -1
  423. package/dist/server/src/api/database/index.js +31 -7
  424. package/dist/server/src/api/database/index.js.map +1 -1
  425. package/dist/server/src/api/database/migrations/v2-2-9.d.ts +3 -0
  426. package/dist/server/src/api/database/migrations/v2-2-9.js +28 -0
  427. package/dist/server/src/api/database/migrations/v2-2-9.js.map +1 -0
  428. package/dist/server/src/api/database/record-schemas.d.ts +4 -1
  429. package/dist/server/src/api/database/record-schemas.js +1 -0
  430. package/dist/server/src/api/database/record-schemas.js.map +1 -1
  431. package/dist/server/src/api/database/types.d.ts +21 -1
  432. package/dist/server/src/api/routes/workers.routes.js +4 -4
  433. package/dist/server/src/api/routes/workers.routes.js.map +1 -1
  434. package/dist/server/src/api/schemas/assistant.schema.d.ts +1 -1
  435. package/dist/server/src/api/schemas/cameras.schema.d.ts +178 -76
  436. package/dist/server/src/api/schemas/cameras.schema.js +26 -2
  437. package/dist/server/src/api/schemas/cameras.schema.js.map +1 -1
  438. package/dist/server/src/api/schemas/training.schema.d.ts +15 -3
  439. package/dist/server/src/api/schemas/training.schema.js +4 -1
  440. package/dist/server/src/api/schemas/training.schema.js.map +1 -1
  441. package/dist/server/src/api/schemas/users.schema.d.ts +12 -0
  442. package/dist/server/src/api/schemas/users.schema.js +4 -0
  443. package/dist/server/src/api/schemas/users.schema.js.map +1 -1
  444. package/dist/server/src/api/schemas/workers.schema.d.ts +5 -4
  445. package/dist/server/src/api/schemas/workers.schema.js +6 -3
  446. package/dist/server/src/api/schemas/workers.schema.js.map +1 -1
  447. package/dist/server/src/api/services/cameras.service.d.ts +3 -0
  448. package/dist/server/src/api/services/cameras.service.js +47 -2
  449. package/dist/server/src/api/services/cameras.service.js.map +1 -1
  450. package/dist/server/src/api/services/plugins.service.d.ts +1 -0
  451. package/dist/server/src/api/services/plugins.service.js +5 -1
  452. package/dist/server/src/api/services/plugins.service.js.map +1 -1
  453. package/dist/server/src/api/services/workers.service.d.ts +2 -0
  454. package/dist/server/src/api/services/workers.service.js +15 -0
  455. package/dist/server/src/api/services/workers.service.js.map +1 -1
  456. package/dist/server/src/api/types/index.d.ts +3 -2
  457. package/dist/server/src/api/websocket/nsp/worker-perf.js +2 -0
  458. package/dist/server/src/api/websocket/nsp/worker-perf.js.map +1 -1
  459. package/dist/server/src/api/websocket/types.d.ts +1 -0
  460. package/dist/server/src/assistant/pricing.js +39 -10
  461. package/dist/server/src/assistant/pricing.js.map +1 -1
  462. package/dist/server/src/assistant/providers.js +9 -1
  463. package/dist/server/src/assistant/providers.js.map +1 -1
  464. package/dist/server/src/assistant/search.d.ts +17 -0
  465. package/dist/server/src/assistant/search.js +10 -2
  466. package/dist/server/src/assistant/search.js.map +1 -1
  467. package/dist/server/src/assistant/tools/plugins.js +7 -3
  468. package/dist/server/src/assistant/tools/plugins.js.map +1 -1
  469. package/dist/server/src/assistant/types.d.ts +2 -0
  470. package/dist/server/src/automations/actions/plugin.js +5 -9
  471. package/dist/server/src/automations/actions/plugin.js.map +1 -1
  472. package/dist/server/src/automations/pluginMethodRegistry.d.ts +6 -0
  473. package/dist/server/src/automations/pluginMethodRegistry.js +39 -0
  474. package/dist/server/src/automations/pluginMethodRegistry.js.map +1 -1
  475. package/dist/server/src/automations/segment-picture.d.ts +16 -0
  476. package/dist/server/src/automations/segment-picture.js +152 -0
  477. package/dist/server/src/automations/segment-picture.js.map +1 -0
  478. package/dist/server/src/camera/decoder/detection-coordinator.d.ts +5 -2
  479. package/dist/server/src/camera/decoder/detection-coordinator.js +45 -22
  480. package/dist/server/src/camera/decoder/detection-coordinator.js.map +1 -1
  481. package/dist/server/src/camera/decoder/detection-pipeline.d.ts +30 -2
  482. package/dist/server/src/camera/decoder/detection-pipeline.js +81 -21
  483. package/dist/server/src/camera/decoder/detection-pipeline.js.map +1 -1
  484. package/dist/server/src/camera/decoder/event-manager.d.ts +13 -4
  485. package/dist/server/src/camera/decoder/event-manager.js +108 -128
  486. package/dist/server/src/camera/decoder/event-manager.js.map +1 -1
  487. package/dist/server/src/camera/decoder/event-trace.d.ts +41 -1
  488. package/dist/server/src/camera/decoder/event-trace.js +63 -8
  489. package/dist/server/src/camera/decoder/event-trace.js.map +1 -1
  490. package/dist/server/src/camera/decoder/face-tracks.d.ts +26 -0
  491. package/dist/server/src/camera/decoder/face-tracks.js +199 -0
  492. package/dist/server/src/camera/decoder/face-tracks.js.map +1 -0
  493. package/dist/server/src/camera/decoder/frame-scaler.d.ts +3 -1
  494. package/dist/server/src/camera/decoder/frame-scaler.js +36 -8
  495. package/dist/server/src/camera/decoder/frame-scaler.js.map +1 -1
  496. package/dist/server/src/camera/decoder/nvr-sink.d.ts +6 -0
  497. package/dist/server/src/camera/decoder/nvr-sink.js +1 -1
  498. package/dist/server/src/camera/decoder/nvr-sink.js.map +1 -1
  499. package/dist/server/src/camera/decoder/perf-tracker.d.ts +2 -0
  500. package/dist/server/src/camera/decoder/perf-tracker.js +4 -0
  501. package/dist/server/src/camera/decoder/perf-tracker.js.map +1 -1
  502. package/dist/server/src/camera/decoder/ptz/autotracker.d.ts +6 -1
  503. package/dist/server/src/camera/decoder/ptz/autotracker.js +107 -25
  504. package/dist/server/src/camera/decoder/ptz/autotracker.js.map +1 -1
  505. package/dist/server/src/camera/decoder/secondary-stage.d.ts +10 -8
  506. package/dist/server/src/camera/decoder/secondary-stage.js +145 -125
  507. package/dist/server/src/camera/decoder/secondary-stage.js.map +1 -1
  508. package/dist/server/src/camera/decoder/training-sink.d.ts +5 -2
  509. package/dist/server/src/camera/decoder/training-sink.js +30 -6
  510. package/dist/server/src/camera/decoder/training-sink.js.map +1 -1
  511. package/dist/server/src/camera/decoder/types.d.ts +6 -2
  512. package/dist/server/src/camera/decoder/types.js +4 -2
  513. package/dist/server/src/camera/decoder/types.js.map +1 -1
  514. package/dist/server/src/manager/coreManager.d.ts +2 -1
  515. package/dist/server/src/manager/coreManager.js +9 -2
  516. package/dist/server/src/manager/coreManager.js.map +1 -1
  517. package/dist/server/src/manager/trainingCandidateManager.d.ts +2 -1
  518. package/dist/server/src/manager/trainingCandidateManager.js +25 -3
  519. package/dist/server/src/manager/trainingCandidateManager.js.map +1 -1
  520. package/dist/server/src/manager/trainingSubmission.d.ts +5 -0
  521. package/dist/server/src/manager/trainingSubmission.js +73 -0
  522. package/dist/server/src/manager/trainingSubmission.js.map +1 -0
  523. package/dist/server/src/manager/types.d.ts +8 -2
  524. package/dist/server/src/manager/types.js.map +1 -1
  525. package/dist/server/src/plugins/runtime/node/proxy/coreManager.js +1 -1
  526. package/dist/server/src/plugins/runtime/node/proxy/coreManager.js.map +1 -1
  527. package/dist/server/src/plugins/runtime/python/proxy/camera_device.py +3 -0
  528. package/dist/server/src/plugins/runtime/python/proxy/core_manager.py +1 -1
  529. package/dist/server/src/plugins/runtime/python/proxy/sensor.py +2 -0
  530. package/dist/server/src/plugins/runtime/python/rpc/typings.py +1 -1
  531. package/dist/server/src/remote/api/routes/train.d.ts +44 -3
  532. package/dist/server/src/remote/api/routes/train.js +2 -2
  533. package/dist/server/src/remote/api/routes/train.js.map +1 -1
  534. package/dist/server/src/rpc/interfaces/core.d.ts +7 -3
  535. package/dist/server/src/rpc/interfaces/detection.d.ts +20 -3
  536. package/dist/server/src/rpc/server.d.ts +2 -0
  537. package/dist/server/src/rpc/server.js +8 -5
  538. package/dist/server/src/rpc/server.js.map +1 -1
  539. package/dist/server/src/sensors/registry.d.ts +3 -0
  540. package/dist/server/src/sensors/registry.js +44 -11
  541. package/dist/server/src/sensors/registry.js.map +1 -1
  542. package/dist/server/src/sensors/types.d.ts +1 -0
  543. package/dist/server/src/sensors/types.js +3 -0
  544. package/dist/server/src/sensors/types.js.map +1 -1
  545. package/dist/server/src/services/config/index.d.ts +1 -0
  546. package/dist/server/src/services/config/index.js +2 -0
  547. package/dist/server/src/services/config/index.js.map +1 -1
  548. package/dist/server/src/utils/image.d.ts +6 -0
  549. package/dist/server/src/utils/image.js +58 -22
  550. package/dist/server/src/utils/image.js.map +1 -1
  551. package/dist/server/src/workers/agent.js +2 -0
  552. package/dist/server/src/workers/agent.js.map +1 -1
  553. package/dist/server/src/workers/manager.d.ts +1 -0
  554. package/dist/server/src/workers/manager.js +22 -0
  555. package/dist/server/src/workers/manager.js.map +1 -1
  556. package/dist/server/src/workers/types.d.ts +5 -0
  557. package/dist/server/src/workers/types.js.map +1 -1
  558. package/npm-shrinkwrap.json +212 -171
  559. package/package.json +23 -23
  560. package/dist/interface/assets/404-C8EoOtBl.js +0 -1
  561. package/dist/interface/assets/About-Q7ZmOGgl.js +0 -1
  562. package/dist/interface/assets/Assistant-BQ6Ld-bt.css +0 -1
  563. package/dist/interface/assets/Assistant-DFLgklVe.js +0 -1
  564. package/dist/interface/assets/Automation-BSicfOGF.css +0 -1
  565. package/dist/interface/assets/Automation-D__qvx8c.js +0 -3
  566. package/dist/interface/assets/AutomationImport-CLQSdqg9.js +0 -2
  567. package/dist/interface/assets/AutomationStore-Dt6yTQDb.js +0 -2
  568. package/dist/interface/assets/AutomationStoreDetail-DqBrBhUI.js +0 -2
  569. package/dist/interface/assets/Automations-BH_7lYR7.js +0 -2
  570. package/dist/interface/assets/Camera-BW9ikKqh.css +0 -1
  571. package/dist/interface/assets/Camera-aquPHFwb.js +0 -2
  572. package/dist/interface/assets/CameraConsole-rhle_cfW.js +0 -7
  573. package/dist/interface/assets/Cameras-Bzy3P0xN.js +0 -651
  574. package/dist/interface/assets/Camview-Bri_T7Tq.css +0 -1
  575. package/dist/interface/assets/Camview-CjcQbtTl.js +0 -1
  576. package/dist/interface/assets/CertificateUpload-CWVu_52v.js +0 -1
  577. package/dist/interface/assets/Config-Dc1zKIPq.js +0 -2
  578. package/dist/interface/assets/ConfigActionAssistant-AfQfSqHZ.js +0 -1
  579. package/dist/interface/assets/ConfigActionCameraControl-BKQdHxqe.js +0 -1
  580. package/dist/interface/assets/ConfigActionDelay-B52HeJGb.js +0 -1
  581. package/dist/interface/assets/ConfigActionHttp-BP5gvpQc.js +0 -1
  582. package/dist/interface/assets/ConfigActionImageInput-DE2mSost.js +0 -1
  583. package/dist/interface/assets/ConfigActionMqtt-CYgnZjAE.js +0 -1
  584. package/dist/interface/assets/ConfigActionNotification-C3q53I4n.js +0 -1
  585. package/dist/interface/assets/ConfigActionNotificationControl-eDJ8r5ao.js +0 -1
  586. package/dist/interface/assets/ConfigActionOutput-DgYSYvy-.js +0 -1
  587. package/dist/interface/assets/ConfigActionPlugin-utolgAXk.js +0 -1
  588. package/dist/interface/assets/ConfigActionSensor-CmEKQPqs.js +0 -1
  589. package/dist/interface/assets/ConfigActionSnapshot-D7XucxVV.js +0 -1
  590. package/dist/interface/assets/ConfigActionVariable-C-Mjm3gr.js +0 -1
  591. package/dist/interface/assets/ConfigConditionIfElse-B24Rqb8y.js +0 -1
  592. package/dist/interface/assets/ConfigConditionSensorState-42-yFDmK.js +0 -1
  593. package/dist/interface/assets/ConfigConditionSwitch-DezH_nwm.js +0 -1
  594. package/dist/interface/assets/ConfigConditionTime-Cg2Lwznd.js +0 -1
  595. package/dist/interface/assets/ConfigSensorValueInput-YHBDCTZm.js +0 -1
  596. package/dist/interface/assets/ConfigTriggerDetection-DxEpodjG.js +0 -1
  597. package/dist/interface/assets/ConfigTriggerGeofence-Bye8syxc.js +0 -1
  598. package/dist/interface/assets/ConfigTriggerManual-s_lEDTV9.js +0 -1
  599. package/dist/interface/assets/ConfigTriggerMqtt-DqdZj7TU.js +0 -1
  600. package/dist/interface/assets/ConfigTriggerSchedule-Q559hn6g.js +0 -1
  601. package/dist/interface/assets/ConfigTriggerSensor-DIKkdbTF.js +0 -1
  602. package/dist/interface/assets/ConfigTriggerSystem-CwNZ4xEg.js +0 -1
  603. package/dist/interface/assets/ConfigTriggerWebhook-9ZC6X4mK.js +0 -1
  604. package/dist/interface/assets/Console-BqIDZ5vq.js +0 -1
  605. package/dist/interface/assets/CuiAssistantConversation-BmBhwrNh.css +0 -1
  606. package/dist/interface/assets/CuiAssistantConversation-CM7KdaX2.js +0 -5
  607. package/dist/interface/assets/CuiAutomationRunsDialog-CVjCLiVW.js +0 -1
  608. package/dist/interface/assets/CuiBottomSheet-CFohFiO2.js +0 -1
  609. package/dist/interface/assets/CuiBottomSheet-D75L0Zny.js +0 -1
  610. package/dist/interface/assets/CuiCameraPipCard-BQKk4fxY.css +0 -1
  611. package/dist/interface/assets/CuiCameraPipCard-eiJjYZ5W.js +0 -1
  612. package/dist/interface/assets/CuiCameraRecordings-DdEWkJrO.js +0 -1
  613. package/dist/interface/assets/CuiCameraShares-8mtgFsQ_.js +0 -1
  614. package/dist/interface/assets/CuiCameraTable-CmCT-XQF.js +0 -2
  615. package/dist/interface/assets/CuiCameraTable-DHrKoD9s.js +0 -1
  616. package/dist/interface/assets/CuiChartTable-v8sGY6PD.js +0 -1
  617. package/dist/interface/assets/CuiConsole-DYV-FUE0.js +0 -5
  618. package/dist/interface/assets/CuiDataTable-C0gsYYpg.js +0 -1
  619. package/dist/interface/assets/CuiLightControl-CFIwBj3C.js +0 -1
  620. package/dist/interface/assets/CuiList-9TVV8SB6.js +0 -1
  621. package/dist/interface/assets/CuiMarkdownContent-BYBQX_aF.js +0 -1
  622. package/dist/interface/assets/CuiMarkdownContent-DTAm-EDR.js +0 -1
  623. package/dist/interface/assets/CuiPluginCard-DEfqwUhQ.js +0 -2
  624. package/dist/interface/assets/CuiPluginCategoryChip-DhnIBJHa.js +0 -1
  625. package/dist/interface/assets/CuiPluginOAuthButton-DAuzNRAA.js +0 -2
  626. package/dist/interface/assets/CuiPluginTrustBadge-Bz710WwC.js +0 -1
  627. package/dist/interface/assets/CuiQRCode-B8-4GHSY.js +0 -1
  628. package/dist/interface/assets/CuiSchema-C_CHuKuf.js +0 -1
  629. package/dist/interface/assets/CuiTopNavbarItem-CNEnOPSh.js +0 -1
  630. package/dist/interface/assets/Faces-DRHMrrxh.js +0 -1
  631. package/dist/interface/assets/FirstSteps-Ci2Iqbe2.js +0 -1
  632. package/dist/interface/assets/Floorplan-Ci63Zd8W.css +0 -1
  633. package/dist/interface/assets/Floorplan-CqWIbDbh.js +0 -1
  634. package/dist/interface/assets/Instances-gzKFKB1l.js +0 -1
  635. package/dist/interface/assets/Logs-DL1yw_Pe.js +0 -6
  636. package/dist/interface/assets/Menu-C0GQ63aj.js +0 -1
  637. package/dist/interface/assets/Metrics-BYnnb7M0.js +0 -12
  638. package/dist/interface/assets/Metrics-DsHBab6t.css +0 -1
  639. package/dist/interface/assets/OAuthDeviceFlow-Zd6r9IHU.js +0 -1
  640. package/dist/interface/assets/Plugin-DJIrYUnZ.js +0 -1
  641. package/dist/interface/assets/Plugin-Qr_Q_Qfi.css +0 -1
  642. package/dist/interface/assets/PluginConsole-ag0jPZQ_.js +0 -7
  643. package/dist/interface/assets/PluginDetail-DmElwUuV.js +0 -2
  644. package/dist/interface/assets/PluginSchema-CxUujnVs.js +0 -1
  645. package/dist/interface/assets/PluginSearch-B-2zH2Xy.js +0 -1
  646. package/dist/interface/assets/PluginSearch-BqzngVRL.js +0 -2
  647. package/dist/interface/assets/PluginUpdateProgress-CFut0RAe.js +0 -1
  648. package/dist/interface/assets/Plugins-ZFcB_j6v.js +0 -1
  649. package/dist/interface/assets/RecentEventsFilter-CqeHhECT.js +0 -1
  650. package/dist/interface/assets/Recordings-BEKAn6QK.css +0 -1
  651. package/dist/interface/assets/Recordings-BJrtW9eG.js +0 -1
  652. package/dist/interface/assets/SensorEdit-Bi0gg-CL.js +0 -1
  653. package/dist/interface/assets/SensorHistory-q0UR3qMG.js +0 -1
  654. package/dist/interface/assets/Sensors-C_InhcHA.js +0 -2
  655. package/dist/interface/assets/Settings-Cv38rGWn.js +0 -1
  656. package/dist/interface/assets/Settings-D7495zbV.css +0 -1
  657. package/dist/interface/assets/SettingsAccount-B05739dn.js +0 -1
  658. package/dist/interface/assets/SettingsAccount-gm28wtbl.js +0 -1
  659. package/dist/interface/assets/SettingsAppearance-DdyYUgmV.js +0 -1
  660. package/dist/interface/assets/SettingsAppearance-DwUknDPV.js +0 -1
  661. package/dist/interface/assets/SettingsAssistant-ChHfkUKk.js +0 -1
  662. package/dist/interface/assets/SettingsBackup-DKwlPQhD.js +0 -1
  663. package/dist/interface/assets/SettingsList-D6hqnvUo.js +0 -1
  664. package/dist/interface/assets/SettingsMqtt-C01fgLY0.js +0 -1
  665. package/dist/interface/assets/SettingsNotifications-D47cIquQ.js +0 -1
  666. package/dist/interface/assets/SettingsPermissions-BeTCTrAf.js +0 -1
  667. package/dist/interface/assets/SettingsRecordings-mwL6Dalr.js +0 -1
  668. package/dist/interface/assets/SettingsRemote-CtP6Gz9C.css +0 -1
  669. package/dist/interface/assets/SettingsRemote-MhaShPIf.js +0 -2
  670. package/dist/interface/assets/SettingsSystem-BXnzXgqm.js +0 -2
  671. package/dist/interface/assets/SettingsUsers-D2mVlJin.js +0 -1
  672. package/dist/interface/assets/Terminal-C1UoXDRK.js +0 -4
  673. package/dist/interface/assets/Training-A5ynOv_l.js +0 -1
  674. package/dist/interface/assets/Training-C-ToeAl4.css +0 -1
  675. package/dist/interface/assets/Updates-kS_Tm8HD.js +0 -2
  676. package/dist/interface/assets/VariableInput-D9PfI8Ut.js +0 -1
  677. package/dist/interface/assets/VariableSuggestions-DArWzQuE.js +0 -1
  678. package/dist/interface/assets/VersionsHandler-BZVMpB2v.js +0 -7
  679. package/dist/interface/assets/VirtualSensorCreate-Cz-QFo4R.js +0 -1
  680. package/dist/interface/assets/Workers-2sc4VMi9.js +0 -2
  681. package/dist/interface/assets/Workers-DH59zE1C.css +0 -1
  682. package/dist/interface/assets/account-DwW7pBOb.js +0 -1
  683. package/dist/interface/assets/ace-DzzM-RlW.js +0 -1
  684. package/dist/interface/assets/ace.config-CCyX_Ohk.js +0 -1
  685. package/dist/interface/assets/alert-circle-BdUVAt1B.js +0 -1
  686. package/dist/interface/assets/alert-outline-IRxYbw0j.js +0 -1
  687. package/dist/interface/assets/api-CGfJbsTz.css +0 -2
  688. package/dist/interface/assets/api-CzwdnGAH.js +0 -1
  689. package/dist/interface/assets/api-DOpXVpef.js +0 -4
  690. package/dist/interface/assets/arrow-left-Bk-ZrOVr.js +0 -1
  691. package/dist/interface/assets/assistant-hGCAgv-f.js +0 -1
  692. package/dist/interface/assets/assistantModels-BsSgRsws.js +0 -1
  693. package/dist/interface/assets/auth-By-S-WEr.js +0 -1
  694. package/dist/interface/assets/automations-vwIwb2PQ.js +0 -1
  695. package/dist/interface/assets/back-filled-D-X19YMO.js +0 -1
  696. package/dist/interface/assets/bell-ring-DreEHgoT.js +0 -1
  697. package/dist/interface/assets/brain-DuDAg544.js +0 -1
  698. package/dist/interface/assets/cameraSources-BMhXvtFt.js +0 -1
  699. package/dist/interface/assets/cctv-DM-C_8_6.js +0 -1
  700. package/dist/interface/assets/check-circle-Bevuw8-0.js +0 -1
  701. package/dist/interface/assets/check-circle-outline-aMxkvksr.js +0 -1
  702. package/dist/interface/assets/chevron-down-CCFn9Z56.js +0 -1
  703. package/dist/interface/assets/chevron-up-CSImUM3_.js +0 -1
  704. package/dist/interface/assets/clock-outline-DH3WIEJt.js +0 -1
  705. package/dist/interface/assets/close-CMxyM4v9.js +0 -1
  706. package/dist/interface/assets/close-circle-CfgJCZ9A.js +0 -1
  707. package/dist/interface/assets/cloud-check-CbdFLIdR.js +0 -1
  708. package/dist/interface/assets/cloudHandoff-BnzjCpJ2.js +0 -1
  709. package/dist/interface/assets/config-BQxEwrK6.js +0 -1
  710. package/dist/interface/assets/content-copy-Bz49QPOI.js +0 -1
  711. package/dist/interface/assets/copy-DA6QQHRt.js +0 -1
  712. package/dist/interface/assets/cube-scan-IiH8zwm2.js +0 -1
  713. package/dist/interface/assets/database-refresh-outline-CIUDpcuq.js +0 -1
  714. package/dist/interface/assets/delete-Btu-UVx9.js +0 -1
  715. package/dist/interface/assets/dist-D_qWDAKp.js +0 -1
  716. package/dist/interface/assets/dots-vertical-D496SIss.js +0 -1
  717. package/dist/interface/assets/download-BSC7lwq_.js +0 -1
  718. package/dist/interface/assets/esm-Bn9gXwX4.js +0 -1
  719. package/dist/interface/assets/esm-BzM6y2-F.js +0 -1
  720. package/dist/interface/assets/esm-CP3JWrtj.js +0 -1
  721. package/dist/interface/assets/esm-CjAXkqCf.js +0 -1
  722. package/dist/interface/assets/esm-Cqxk-j1S.js +0 -1
  723. package/dist/interface/assets/esm-DFHd3JNU.js +0 -1
  724. package/dist/interface/assets/esm-DfMLJtug.js +0 -1
  725. package/dist/interface/assets/esm-DhDrpq7a.js +0 -1
  726. package/dist/interface/assets/esm-DvhM-SOd.js +0 -1
  727. package/dist/interface/assets/esm-G63bqygQ.js +0 -1
  728. package/dist/interface/assets/esm-Gn-Y59hU.js +0 -1
  729. package/dist/interface/assets/esm-KJSOz2vj.js +0 -1
  730. package/dist/interface/assets/esm-Ryfc94Tm.js +0 -1
  731. package/dist/interface/assets/esm-rSfI5Poy.js +0 -1
  732. package/dist/interface/assets/eventIcons-UQutPG3p.js +0 -1
  733. package/dist/interface/assets/eventLabels-BsPoPWS9.js +0 -1
  734. package/dist/interface/assets/eye-off-CSU0U8g7.js +0 -1
  735. package/dist/interface/assets/eye-off-outline-DCxLRGo_.js +0 -1
  736. package/dist/interface/assets/flowSchema-BPq6iHks.js +0 -1
  737. package/dist/interface/assets/help-circle-outline-Cr_yNhPi.js +0 -1
  738. package/dist/interface/assets/history-anuCbp1T.js +0 -1
  739. package/dist/interface/assets/home-N3bDR1vX.js +0 -1
  740. package/dist/interface/assets/information-outline-CMWIvLNB.js +0 -1
  741. package/dist/interface/assets/intercomService-CXcjcPa9.js +0 -1
  742. package/dist/interface/assets/lan-CYXjdk7L.js +0 -1
  743. package/dist/interface/assets/main-By4L33Im.js +0 -3
  744. package/dist/interface/assets/main-DVa5U7UB.css +0 -1
  745. package/dist/interface/assets/microphone-BB2pATI_.js +0 -1
  746. package/dist/interface/assets/minus-BCp3ZNKO.js +0 -1
  747. package/dist/interface/assets/mqtt-DE1KQ8Td.js +0 -1
  748. package/dist/interface/assets/native-CZJE8bTs.js +0 -1
  749. package/dist/interface/assets/native-DKZwialB.js +0 -1
  750. package/dist/interface/assets/nodeDefinitions-ByrqsENY.js +0 -1
  751. package/dist/interface/assets/notifications-BCyiD-TP.js +0 -1
  752. package/dist/interface/assets/pause-BQlxwAW2.js +0 -1
  753. package/dist/interface/assets/pencil-CDsNnEXi.js +0 -1
  754. package/dist/interface/assets/pencil-outline-CIQL5Kui.js +0 -1
  755. package/dist/interface/assets/plugin-DSEMkqaK.js +0 -1
  756. package/dist/interface/assets/plugins-BJPCV1YL.js +0 -1
  757. package/dist/interface/assets/plus-Bp4q9G7S.js +0 -1
  758. package/dist/interface/assets/plus-CySoovdr.js +0 -1
  759. package/dist/interface/assets/power-WmBLDR0-.js +0 -1
  760. package/dist/interface/assets/radar-CyYAmume.js +0 -1
  761. package/dist/interface/assets/refresh-CHTA3jVN.js +0 -1
  762. package/dist/interface/assets/restore-C8RNM5yX.js +0 -1
  763. package/dist/interface/assets/rooms-Dr4yiakO.js +0 -1
  764. package/dist/interface/assets/round-alt-arrow-left-bold-Gh5mi_yR.js +0 -1
  765. package/dist/interface/assets/search-BajCVmOI.js +0 -1
  766. package/dist/interface/assets/sensorIcons-DofElQ3w.js +0 -1
  767. package/dist/interface/assets/sensorSlots-D2KJGvPw.js +0 -1
  768. package/dist/interface/assets/sensors-3llrL7s3.js +0 -1
  769. package/dist/interface/assets/server-Dw5DD473.js +0 -1
  770. package/dist/interface/assets/settings-DnksaK7m.js +0 -1
  771. package/dist/interface/assets/source-branch-CzqIPffP.js +0 -1
  772. package/dist/interface/assets/theme-C85LJhOY.js +0 -1
  773. package/dist/interface/assets/trash-2-DJeEhHf4.js +0 -1
  774. package/dist/interface/assets/trash-can-outline-DrT6iw7I.js +0 -1
  775. package/dist/interface/assets/trash-fill-Bb_-UicM.js +0 -1
  776. package/dist/interface/assets/trash2-Dsl8gfxq.js +0 -1
  777. package/dist/interface/assets/types-CPhy0Ovw.js +0 -1
  778. package/dist/interface/assets/types-DYKmSGl4.js +0 -1
  779. package/dist/interface/assets/types-i1kTodPP.js +0 -1
  780. package/dist/interface/assets/undo-DoqJW-k7.js +0 -1
  781. package/dist/interface/assets/ungrouped-BlheTJCh.css +0 -1
  782. package/dist/interface/assets/ungrouped-C2CWO39a.js +0 -1
  783. package/dist/interface/assets/updates-C2LhMkNR.js +0 -1
  784. package/dist/interface/assets/upload-C3w1XH-o.js +0 -1
  785. package/dist/interface/assets/upload-DtIcwiNC.js +0 -1
  786. package/dist/interface/assets/useAppVersion-DkazK9Vu.js +0 -1
  787. package/dist/interface/assets/useAssistantActions-BZP6NL18.js +0 -1
  788. package/dist/interface/assets/useBackupRestore-DMQW_CVC.js +0 -1
  789. package/dist/interface/assets/useCameraOptions-DnI0xLrX.js +0 -1
  790. package/dist/interface/assets/useKeyboardInset-Cr7SxKGN.js +0 -1
  791. package/dist/interface/assets/useLogsSocket-C3Y8S0Ar.js +0 -1
  792. package/dist/interface/assets/useNavLayout-C9pcDuVP.js +0 -1
  793. package/dist/interface/assets/usePermissions-CCTxwXF0.js +0 -1
  794. package/dist/interface/assets/usePluginUpdates-DBhLWAua.js +0 -1
  795. package/dist/interface/assets/usePushRegistration-CPRVdLAx.js +0 -2
  796. package/dist/interface/assets/useServerRestart-bScBLJ9r.js +0 -1
  797. package/dist/interface/assets/useStreamStatus-Bfh-WmLH.js +0 -1
  798. package/dist/interface/assets/useTabSwipe-C_QOrvSW.js +0 -1
  799. package/dist/interface/assets/useUpdateChannel-g0h_4c55.js +0 -1
  800. package/dist/interface/assets/useUpdatesSocket-CxrLRETs.js +0 -1
  801. package/dist/interface/assets/useUserOptions-DN0t3gBr.js +0 -1
  802. package/dist/interface/assets/variable-ywTlRfo5.js +0 -1
  803. package/dist/interface/assets/vendor-ace-CvEoip98.js +0 -1085
  804. package/dist/interface/assets/vendor-cameraui-B28aGJJD.js +0 -2326
  805. package/dist/interface/assets/vendor-capacitor-Bs_WzL0Q.js +0 -2
  806. package/dist/interface/assets/vendor-chart-DBK083Hu.js +0 -3
  807. package/dist/interface/assets/vendor-core-DIa0tPNH.js +0 -1
  808. package/dist/interface/assets/vendor-dnd-DGQLvX6Y.js +0 -2
  809. package/dist/interface/assets/vendor-draggabilly-D8CK6M-y.js +0 -1
  810. package/dist/interface/assets/vendor-gFkr2qsZ.js +0 -23
  811. package/dist/interface/assets/vendor-leaflet-DkAk6mAj.js +0 -1
  812. package/dist/interface/assets/vendor-markdown-qHIinIUE.js +0 -14
  813. package/dist/interface/assets/vendor-primevue-CZKUAkMA.js +0 -3942
  814. package/dist/interface/assets/vendor-vueflow-bSwRZ9X8.js +0 -26
  815. package/dist/interface/assets/web-BDNQnMmA.js +0 -1
  816. package/dist/interface/assets/web-B_9Qyt8E.js +0 -1
  817. package/dist/interface/assets/web-BhJykCtq.js +0 -1
  818. package/dist/interface/assets/web-BjKL51lK-wWFeZlLg.js +0 -1
  819. package/dist/interface/assets/web-C7nJwIOa.js +0 -1
  820. package/dist/interface/assets/web-CGJsJQDb.js +0 -1
  821. package/dist/interface/assets/web-CJwASxrl.js +0 -1
  822. package/dist/interface/assets/web-CLe0L31Y.js +0 -1
  823. package/dist/interface/assets/web-DEv1hAn1.js +0 -1
  824. package/dist/interface/assets/web-DaeQvsXT.js +0 -1
  825. package/dist/interface/assets/web-H3-wNunW.js +0 -1
  826. package/dist/interface/assets/web-LCdyqJq1.js +0 -1
  827. package/dist/interface/assets/web-XZWYTK65.js +0 -1
  828. package/dist/interface/assets/web-rU5hlxxW.js +0 -1
  829. package/dist/interface/assets/webhook-CWKf2Qxu.js +0 -1
  830. package/dist/interface/assets/workbox-window.prod.es5-BEYAF-e-.js +0 -1
  831. package/dist/interface/assets/zoom-in-CHkXAWHy.js +0 -1
  832. package/dist/interface/ha/404-tl2VQ3qy.js +0 -60
  833. package/dist/interface/ha/About-Cn7KOblU.js +0 -55
  834. package/dist/interface/ha/Assistant-DG2GGda0.js +0 -9361
  835. package/dist/interface/ha/Automation-D0_WpXx4.js +0 -2025
  836. package/dist/interface/ha/AutomationImport-DdC3dEaC.js +0 -206
  837. package/dist/interface/ha/AutomationStore-BrLn4oBx.js +0 -336
  838. package/dist/interface/ha/AutomationStoreDetail-DoppNsNc.js +0 -122
  839. package/dist/interface/ha/Automations-BaUJ9pVq.js +0 -424
  840. package/dist/interface/ha/Camera-Cj5ImvZG.js +0 -657
  841. package/dist/interface/ha/CameraConsole-7MhlS2VK.js +0 -52
  842. package/dist/interface/ha/Cameras-vHYz8uSO.js +0 -1969
  843. package/dist/interface/ha/Camview-BEglAx26.js +0 -1331
  844. package/dist/interface/ha/Config-CHiK--zP.js +0 -356
  845. package/dist/interface/ha/ConfigActionAssistant-DynduZYV.js +0 -182
  846. package/dist/interface/ha/ConfigActionCameraControl-BEYePssz.js +0 -152
  847. package/dist/interface/ha/ConfigActionHttp-h0vRWqZ5.js +0 -134
  848. package/dist/interface/ha/ConfigActionImageInput-B9GMZYAR.js +0 -171
  849. package/dist/interface/ha/ConfigActionMqtt-BEQpHBgf.js +0 -81
  850. package/dist/interface/ha/ConfigActionNotification-BYsz8_aS.js +0 -199
  851. package/dist/interface/ha/ConfigActionNotificationControl-BxmIWVE8.js +0 -111
  852. package/dist/interface/ha/ConfigActionOutput-DTOQSa1S.js +0 -98
  853. package/dist/interface/ha/ConfigActionPlugin-NOsUs3QI.js +0 -172
  854. package/dist/interface/ha/ConfigActionSensor-YWnsH_LV.js +0 -139
  855. package/dist/interface/ha/ConfigActionSnapshot-DHJnTvin.js +0 -48
  856. package/dist/interface/ha/ConfigActionVariable-C7UFnvW0.js +0 -88
  857. package/dist/interface/ha/ConfigConditionIfElse-CAHbuhH3.js +0 -124
  858. package/dist/interface/ha/ConfigConditionSensorState-CE6okUeb.js +0 -192
  859. package/dist/interface/ha/ConfigConditionSwitch-D5FULaTy.js +0 -128
  860. package/dist/interface/ha/ConfigSensorValueInput-mo6Gs_aZ.js +0 -170
  861. package/dist/interface/ha/ConfigTriggerDetection-Bt-OhHtM.js +0 -241
  862. package/dist/interface/ha/ConfigTriggerGeofence-Cw3jV5qD.js +0 -4888
  863. package/dist/interface/ha/ConfigTriggerMqtt-BXeV82UG.js +0 -134
  864. package/dist/interface/ha/ConfigTriggerSensor-Baqq--nJ.js +0 -73
  865. package/dist/interface/ha/ConfigTriggerSystem-braUVGzW.js +0 -192
  866. package/dist/interface/ha/ConfigTriggerWebhook-Dm45r-1C.js +0 -94
  867. package/dist/interface/ha/Console-q3TCsxYo.js +0 -348
  868. package/dist/interface/ha/CuiAutomationRunsDialog-DO6h5Tc4.js +0 -130
  869. package/dist/interface/ha/CuiBottomSheet-B7ldz0xi.js +0 -270
  870. package/dist/interface/ha/CuiCameraRecordings-Dq1Vh3qA.js +0 -551
  871. package/dist/interface/ha/CuiCameraShares-DBqcpevG.js +0 -121
  872. package/dist/interface/ha/CuiCameraTable-kL8rK-Uv.js +0 -169
  873. package/dist/interface/ha/CuiChartTable-BrFyiSt_.js +0 -6801
  874. package/dist/interface/ha/CuiConsole-DpeXZmJd.js +0 -244
  875. package/dist/interface/ha/CuiDataTable-BtqzIz0o.js +0 -8732
  876. package/dist/interface/ha/CuiList-CU2NJ1K6.js +0 -57
  877. package/dist/interface/ha/CuiPluginCard-lBLypaN4.js +0 -769
  878. package/dist/interface/ha/CuiPluginOAuthButton-CuGauZJA.js +0 -79
  879. package/dist/interface/ha/CuiPluginTrustBadge-BofBmRYc.js +0 -123
  880. package/dist/interface/ha/CuiQRCode-CdK9bwKb.js +0 -86
  881. package/dist/interface/ha/CuiSchema-DqkCLv9Y.js +0 -963
  882. package/dist/interface/ha/CuiTopNavbarItem-C2VZB7WV.js +0 -140
  883. package/dist/interface/ha/Faces-Crfi-75Z.js +0 -1441
  884. package/dist/interface/ha/FirstSteps-CKVG86pf.js +0 -251
  885. package/dist/interface/ha/Floorplan-CH9_-6hk.js +0 -3657
  886. package/dist/interface/ha/Instances-5gZdPPDA.js +0 -680
  887. package/dist/interface/ha/Logs-BkzEM70F.js +0 -418
  888. package/dist/interface/ha/Menu-BuT3_Ggx.js +0 -156
  889. package/dist/interface/ha/Metrics-BGrzu0bu.js +0 -1447
  890. package/dist/interface/ha/OAuthDeviceFlow-BEJtegqy.js +0 -112
  891. package/dist/interface/ha/Plugin-Bnp2jiC2.js +0 -1544
  892. package/dist/interface/ha/PluginConsole-CmsuPVMz.js +0 -56
  893. package/dist/interface/ha/PluginDetail-BCNx7vHr.js +0 -805
  894. package/dist/interface/ha/PluginSearch-DOdhuxgM.js +0 -462
  895. package/dist/interface/ha/PluginUpdateProgress-CwkKc8Tr.js +0 -34
  896. package/dist/interface/ha/Plugins-BrFowCdC.js +0 -692
  897. package/dist/interface/ha/RecentEventsFilter-9ZkDHD1g.js +0 -79
  898. package/dist/interface/ha/Recordings-BZhf39pJ.js +0 -1539
  899. package/dist/interface/ha/SensorEdit-Ds6WbN4A.js +0 -1462
  900. package/dist/interface/ha/SensorHistory-CoTIYTJx.js +0 -54
  901. package/dist/interface/ha/Sensors-DZ2MKdlh.js +0 -1400
  902. package/dist/interface/ha/Settings-D3JKr430.js +0 -218
  903. package/dist/interface/ha/SettingsAccount-cvtlSKZw.js +0 -971
  904. package/dist/interface/ha/SettingsAppearance-CaKuOHRu.js +0 -220
  905. package/dist/interface/ha/SettingsAssistant-vWVjAUqQ.js +0 -2025
  906. package/dist/interface/ha/SettingsBackup-CvzL_bVf.js +0 -556
  907. package/dist/interface/ha/SettingsList-C0Ec8x-H.js +0 -40
  908. package/dist/interface/ha/SettingsMqtt-COnq-QM5.js +0 -526
  909. package/dist/interface/ha/SettingsNotifications-BZ68bQzO.js +0 -529
  910. package/dist/interface/ha/SettingsPermissions-Jh0FuIF7.js +0 -84
  911. package/dist/interface/ha/SettingsRecordings-BPtNNpDa.js +0 -152
  912. package/dist/interface/ha/SettingsRemote-BXG8IYjf.js +0 -1810
  913. package/dist/interface/ha/SettingsSystem-_jHBUhws.js +0 -376
  914. package/dist/interface/ha/SettingsUsers-CzGj_RJN.js +0 -379
  915. package/dist/interface/ha/Terminal-BP3b8IBP.js +0 -612
  916. package/dist/interface/ha/Training-C2-6DgY0.js +0 -1699
  917. package/dist/interface/ha/Updates-BMZsEhmy.js +0 -343
  918. package/dist/interface/ha/VariableInput-DmI7skCD.js +0 -52
  919. package/dist/interface/ha/VersionsHandler-DJd4NqtD.js +0 -216
  920. package/dist/interface/ha/VirtualSensorCreate-DmtGYvAn.js +0 -101
  921. package/dist/interface/ha/Workers-2HTPHgKV.js +0 -765
  922. package/dist/interface/ha/ace-B3bPzJu9.js +0 -13236
  923. package/dist/interface/ha/ace.config-Dt55Nqby.js +0 -1429
  924. package/dist/interface/ha/api-BelbnLQO.js +0 -62346
  925. package/dist/interface/ha/api-sy4rqV2N.js +0 -29
  926. package/dist/interface/ha/assistant-C6KYXJfi.js +0 -349
  927. package/dist/interface/ha/auth-Da66mVEd.js +0 -271
  928. package/dist/interface/ha/automationBlueprint-hlqqM17r.js +0 -250
  929. package/dist/interface/ha/cards-BFRRfuM7.js +0 -13436
  930. package/dist/interface/ha/config-Cd7JNMpD.js +0 -116
  931. package/dist/interface/ha/dist-BIngHzHx.js +0 -287
  932. package/dist/interface/ha/dist-BybVYMVs.js +0 -3248
  933. package/dist/interface/ha/eventIcons-BFNUgeGr.js +0 -676
  934. package/dist/interface/ha/eventLabels-B4C1_4vT.js +0 -42
  935. package/dist/interface/ha/eye-off-outline-ACbzsGuK.js +0 -19
  936. package/dist/interface/ha/intercomService-B7HkLs6z.js +0 -1414
  937. package/dist/interface/ha/mqtt-UZfptWJl.js +0 -56
  938. package/dist/interface/ha/notifications-DTHM8fS-.js +0 -159
  939. package/dist/interface/ha/pinia-BokSpDzj.js +0 -7656
  940. package/dist/interface/ha/plugins-Bwp_GfaX.js +0 -592
  941. package/dist/interface/ha/protocol-BB4jdtUC-DW3jl2tV.js +0 -708
  942. package/dist/interface/ha/rooms-BvaD0r0q.js +0 -45
  943. package/dist/interface/ha/server-OWdtITVa.js +0 -239
  944. package/dist/interface/ha/types-BFJjyMZe.js +0 -1073
  945. package/dist/interface/ha/ungrouped-x00DHNHO.js +0 -1311
  946. package/dist/interface/ha/updates-C03Qf3Il.js +0 -341
  947. package/dist/interface/ha/useAppVersion-CrMd9CC9.js +0 -22
  948. package/dist/interface/ha/useAssistantActions-S1FrNe9b.js +0 -29
  949. package/dist/interface/ha/useKeyboardInset-DwUQCWHC.js +0 -27
  950. package/dist/interface/ha/useLogsSocket-C6k217mW.js +0 -59
  951. package/dist/interface/ha/useNavLayout-DhuQE024.js +0 -125
  952. package/dist/interface/ha/usePermissions-DaE_wFch.js +0 -72
  953. package/dist/interface/ha/useServerRestart-CYaen2r6.js +0 -23
  954. package/dist/interface/ha/useTabSwipe-DAmCFlgg.js +0 -45
  955. package/dist/interface/ha/useUpdateChannel-Dr1EoU2X.js +0 -22
  956. package/dist/interface/ha/useUpdatesSocket-C8Gmhemh.js +0 -34
  957. package/dist/interface/ha/useUserOptions-BB5wk3Bq.js +0 -15
  958. package/dist/interface/workbox-778a14ff.js +0 -1
@@ -0,0 +1,3657 @@
1
+ import { m as e } from "./ripple-ZDATPc2w.js";
2
+ import { B as t, G as n, H as r, Jt as i, M as a, N as o, Wt as s, Y as c, _t as l, d as u, f as d, ft as f, gt as p, kt as m, l as h, lt as g, ot as ee, p as _, qt as v, r as y, rt as te, u as b, ut as x, v as S, wt as ne, x as C, xt as w, y as T, yt as E, z as re } from "./runtime-core.esm-bundler-_TfE0DWz.js";
3
+ import { t as D } from "./tooltip-BDrlgLof.js";
4
+ import { t as ie } from "./message-D6dIy_hz.js";
5
+ import { t as O } from "./chevron-down-BNj8w2js.js";
6
+ import { Ar as ae, Ct as oe, Dt as se, Ei as ce, En as le, Et as ue, Fr as de, Jt as fe, Kr as pe, Or as k, Ot as me, Pr as A, St as he, Tt as j, Ur as M, aa as ge, br as _e, bt as ve, en as ye, gi as be, hn as xe, o as Se, p as N, q as P, rt as Ce, sr as we, ur as F, wt as Te, xn as I, xt as Ee, yr as L, yt as De } from "./api-CH_Y8Hee.js";
7
+ import { n as Oe } from "./vue-i18n-D5EAy78K.js";
8
+ import { o as R } from "./dist-euRmladF.js";
9
+ import { t as ke } from "./button-BouAFgf5.js";
10
+ import { v as Ae } from "./dist-BQf9ANPx.js";
11
+ import { t as je } from "./inputtext-C_ygnPrC.js";
12
+ import { t as Me } from "./select-DV7p2EDj.js";
13
+ import { t as Ne } from "./close-CxFbonhd.js";
14
+ import { t as Pe } from "./divider-DeFEXTGs.js";
15
+ import { i as Fe, n as Ie, r as Le, t as Re } from "./accordion-BylV-jUK.js";
16
+ import { t as ze } from "./speeddial-B5p0fuqL.js";
17
+ import { t as Be } from "./textarea-ByXnzJzx.js";
18
+ import { t as Ve } from "./CuiBottomSheet-CYNvQV4T.js";
19
+ import { t as He } from "./cctv-BD2g3nbO.js";
20
+ import { u as Ue } from "./cards-E0zw1UVg.js";
21
+ import { t as We } from "./restore-BxzmXRET.js";
22
+ import { t as Ge } from "./pencil-outline-SN9ingm5.js";
23
+ import { t as Ke } from "./trash-can-outline-CBwv40Ck.js";
24
+ import { t as qe } from "./back-filled-CaxrZv0Q.js";
25
+ import { t as Je } from "./chevron-up-DDKj43BW.js";
26
+ import { a as z, d as Ye, f as Xe, l as B, p as Ze, t as V, u as Qe } from "./vue-flow-background-8ZUqhPBF.js";
27
+ import { n as $e } from "./rooms-D5E6K75d.js";
28
+ import { t as H } from "./minus-D3V6azhV.js";
29
+ //#region ~icons/mdi/open-in-new
30
+ var U = {
31
+ viewBox: "0 0 24 24",
32
+ width: "1.2em",
33
+ height: "1.2em"
34
+ };
35
+ function W(e, t) {
36
+ return r(), _("svg", U, [...t[0] ||= [b("path", {
37
+ fill: "currentColor",
38
+ d: "M14 3v2h3.59l-9.83 9.83l1.41 1.41L19 6.41V10h2V3m-2 16H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7h-2z"
39
+ }, null, -1)]]);
40
+ }
41
+ var et = l({
42
+ name: "mdi-open-in-new",
43
+ render: W
44
+ }), tt = {
45
+ viewBox: "0 0 24 24",
46
+ width: "1.2em",
47
+ height: "1.2em"
48
+ };
49
+ function G(e, t) {
50
+ return r(), _("svg", tt, [...t[0] ||= [b("path", {
51
+ fill: "currentColor",
52
+ d: "M2 2h6v2h8V2h6v6h-2v8h2v6h-6v-2H8v2H2v-6h2V8H2zm14 6V6H8v2H6v8h2v2h8v-2h2V8zM4 4v2h2V4zm14 0v2h2V4zM4 18v2h2v-2zm14 0v2h2v-2z"
53
+ }, null, -1)]]);
54
+ }
55
+ var nt = l({
56
+ name: "mdi-vector-square",
57
+ render: G
58
+ }), rt = {
59
+ viewBox: "0 0 24 24",
60
+ width: "1.2em",
61
+ height: "1.2em"
62
+ };
63
+ function it(e, t) {
64
+ return r(), _("svg", rt, [...t[0] ||= [b("path", {
65
+ fill: "currentColor",
66
+ d: "M12 3c-1.11 0-2 .89-2 2H3v14H2v2h20v-2h-1V5c0-1.11-.89-2-2-2zm0 2h7v14h-7zm-7 6h2v2H5z"
67
+ }, null, -1)]]);
68
+ }
69
+ var at = l({
70
+ name: "mdi-door-open",
71
+ render: it
72
+ }), ot = .55, st = {
73
+ min: .2,
74
+ max: 3
75
+ }, K = {
76
+ min: 100,
77
+ max: 3e3
78
+ }, ct = [
79
+ "door",
80
+ "opening",
81
+ "stairs"
82
+ ], q = {
83
+ min: 40,
84
+ max: 400
85
+ }, lt = "application/floorplanitem";
86
+ //#endregion
87
+ //#region src/components/CuiFloorplan/utils.ts
88
+ function J(e) {
89
+ return e / 100;
90
+ }
91
+ function ut(e, t = 2) {
92
+ return `${J(e).toFixed(t)} m`;
93
+ }
94
+ function dt(e) {
95
+ return {
96
+ x: e.x + e.width / 2,
97
+ y: e.y + e.height / 2
98
+ };
99
+ }
100
+ function ft(e, t) {
101
+ let n = Math.min(e.y + e.height, t.y + t.height) - Math.max(e.y, t.y), r = Math.min(e.x + e.width, t.x + t.width) - Math.max(e.x, t.x);
102
+ if (n > 0 && (e.x + e.width === t.x || t.x + t.width === e.x)) return {
103
+ x: e.x + e.width === t.x ? t.x : e.x,
104
+ y: Math.max(e.y, t.y),
105
+ stepX: 0,
106
+ stepY: 1,
107
+ length: n
108
+ };
109
+ if (r > 0 && (e.y + e.height === t.y || t.y + t.height === e.y)) {
110
+ let n = e.y + e.height === t.y ? t.y : e.y;
111
+ return {
112
+ x: Math.max(e.x, t.x),
113
+ y: n,
114
+ stepX: 1,
115
+ stepY: 0,
116
+ length: r
117
+ };
118
+ }
119
+ return null;
120
+ }
121
+ function pt(e, t, n) {
122
+ let r = Math.min(n, e.length) / 2, i = Math.min(Math.max(t ?? e.length / 2, r), e.length - r);
123
+ return {
124
+ x1: e.x + e.stepX * (i - r),
125
+ y1: e.y + e.stepY * (i - r),
126
+ x2: e.x + e.stepX * (i + r),
127
+ y2: e.y + e.stepY * (i + r)
128
+ };
129
+ }
130
+ function mt(e, t, n) {
131
+ let r = t.filter((t) => t.roomId === e.fromRoomId), i = t.filter((t) => t.roomId === e.toRoomId);
132
+ if (!r.length || !i.length) return null;
133
+ let a = r.some((e) => e.levelId === n), o = i.some((e) => e.levelId === n);
134
+ if (!a && !o) return null;
135
+ if (a !== o) {
136
+ let t = a ? e.fromShapeId : e.toShapeId, n = a ? r : i;
137
+ return {
138
+ kind: "badge",
139
+ roomId: a ? e.fromRoomId : e.toRoomId,
140
+ shapeId: n.find((e) => e.id === t)?.id ?? n[0].id
141
+ };
142
+ }
143
+ let s = r.find((t) => t.id === e.fromShapeId), c = i.find((t) => t.id === e.toShapeId), l = s && c ? [[s, c]] : r.flatMap((e) => i.map((t) => [e, t]));
144
+ for (let [t, n] of l) {
145
+ let r = ft(t, n);
146
+ if (r) return {
147
+ kind: "edge",
148
+ ...pt(r, e.offset, e.width),
149
+ wall: r
150
+ };
151
+ }
152
+ let u = dt(r[0]), d = dt(i[0]);
153
+ return {
154
+ kind: "link",
155
+ x1: u.x,
156
+ y1: u.y,
157
+ x2: d.x,
158
+ y2: d.y
159
+ };
160
+ }
161
+ function ht(e, t, n) {
162
+ let r = gt(e);
163
+ return {
164
+ fill: r.map((e) => _t(e, t, [])).join(" "),
165
+ wall: r.map((e) => _t(e, t, n)).join(" ")
166
+ };
167
+ }
168
+ function gt(e) {
169
+ if (!e.length) return [];
170
+ let t = [...new Set(e.flatMap((e) => [e.x, e.x + e.width]))].sort((e, t) => e - t), n = [...new Set(e.flatMap((e) => [e.y, e.y + e.height]))].sort((e, t) => e - t), r = (r, i) => {
171
+ if (r < 0 || i < 0 || r >= t.length - 1 || i >= n.length - 1) return !1;
172
+ let a = (t[r] + t[r + 1]) / 2, o = (n[i] + n[i + 1]) / 2;
173
+ return e.some((e) => a > e.x && a < e.x + e.width && o > e.y && o < e.y + e.height);
174
+ }, i = (e) => `${e.x},${e.y}`, a = /* @__PURE__ */ new Map();
175
+ for (let e = 0; e < t.length - 1; e++) for (let o = 0; o < n.length - 1; o++) {
176
+ if (!r(e, o)) continue;
177
+ let s = t[e], c = t[e + 1], l = n[o], u = n[o + 1];
178
+ r(e, o - 1) || a.set(i({
179
+ x: s,
180
+ y: l
181
+ }), {
182
+ x: c,
183
+ y: l
184
+ }), r(e + 1, o) || a.set(i({
185
+ x: c,
186
+ y: l
187
+ }), {
188
+ x: c,
189
+ y: u
190
+ }), r(e, o + 1) || a.set(i({
191
+ x: c,
192
+ y: u
193
+ }), {
194
+ x: s,
195
+ y: u
196
+ }), r(e - 1, o) || a.set(i({
197
+ x: s,
198
+ y: u
199
+ }), {
200
+ x: s,
201
+ y: l
202
+ });
203
+ }
204
+ let o = [];
205
+ for (; a.size;) {
206
+ let [e] = a.keys(), t = [], n = {
207
+ x: Number(e.split(",")[0]),
208
+ y: Number(e.split(",")[1])
209
+ };
210
+ for (; n;) {
211
+ let e = a.get(i(n));
212
+ if (!e) break;
213
+ a.delete(i(n)), t.push(n), n = a.has(i(e)) ? e : void 0;
214
+ }
215
+ t.length > 2 && o.push(Y(t));
216
+ }
217
+ return o;
218
+ }
219
+ function Y(e) {
220
+ return e.filter((t, n) => {
221
+ let r = e[(n - 1 + e.length) % e.length], i = e[(n + 1) % e.length];
222
+ return (r.x !== t.x || i.x !== t.x) && (r.y !== t.y || i.y !== t.y);
223
+ });
224
+ }
225
+ function _t(e, t, n) {
226
+ let r = [], i = [], a = [];
227
+ for (let n = 0; n < e.length; n++) {
228
+ let o = e[n], s = e[(n - 1 + e.length) % e.length], c = e[(n + 1) % e.length], l = yt(s, o), u = yt(o, c), d = Math.min(t, l / 2, u / 2);
229
+ r.push({
230
+ x: o.x + (s.x - o.x) / l * d,
231
+ y: o.y + (s.y - o.y) / l * d
232
+ }), i.push({
233
+ x: o.x + (c.x - o.x) / u * d,
234
+ y: o.y + (c.y - o.y) / u * d
235
+ }), a.push(d);
236
+ }
237
+ let o = n.length === 0, s = [], c = !1;
238
+ for (let t = 0; t < e.length; t++) {
239
+ let l = (t + 1) % e.length;
240
+ for (let e of vt(i[t], r[l], n)) (!c || !o) && s.push(`M ${X(e.x1)} ${X(e.y1)}`), s.push(`L ${X(e.x2)} ${X(e.y2)}`), c = !0;
241
+ if (a[l] > 0) {
242
+ let n = e[(l + 1) % e.length], o = (e[l].x - e[t].x) * (n.y - e[l].y) - (e[l].y - e[t].y) * (n.x - e[l].x);
243
+ c || s.push(`M ${X(r[l].x)} ${X(r[l].y)}`), s.push(`A ${X(a[l])} ${X(a[l])} 0 0 ${+(o > 0)} ${X(i[l].x)} ${X(i[l].y)}`), c = !0;
244
+ }
245
+ }
246
+ return o ? `${s.join(" ")} Z` : s.join(" ");
247
+ }
248
+ function vt(e, t, n) {
249
+ let r = yt(e, t);
250
+ if (r === 0) return [];
251
+ let i = (t.x - e.x) / r, a = (t.y - e.y) / r, o = (t) => ({
252
+ x: e.x + i * t,
253
+ y: e.y + a * t
254
+ }), s = (t) => (t.x - e.x) * i + (t.y - e.y) * a, c = [];
255
+ for (let i of n) {
256
+ let n = e.x === t.x && i.x1 === i.x2 && Math.abs(i.x1 - e.x) < 1, a = e.y === t.y && i.y1 === i.y2 && Math.abs(i.y1 - e.y) < 1;
257
+ if (!n && !a) continue;
258
+ let o = s({
259
+ x: i.x1,
260
+ y: i.y1
261
+ }), l = s({
262
+ x: i.x2,
263
+ y: i.y2
264
+ }), u = Math.max(0, Math.min(o, l)), d = Math.min(r, Math.max(o, l));
265
+ d > u && c.push({
266
+ start: u,
267
+ end: d
268
+ });
269
+ }
270
+ c.sort((e, t) => e.start - t.start);
271
+ let l = [], u = 0;
272
+ for (let e of c) {
273
+ if (e.start > u) {
274
+ let t = o(u), n = o(e.start);
275
+ l.push({
276
+ x1: t.x,
277
+ y1: t.y,
278
+ x2: n.x,
279
+ y2: n.y
280
+ });
281
+ }
282
+ u = Math.max(u, e.end);
283
+ }
284
+ if (u < r) {
285
+ let e = o(u), t = o(r);
286
+ l.push({
287
+ x1: e.x,
288
+ y1: e.y,
289
+ x2: t.x,
290
+ y2: t.y
291
+ });
292
+ }
293
+ return l;
294
+ }
295
+ function yt(e, t) {
296
+ return Math.abs(t.x - e.x) + Math.abs(t.y - e.y);
297
+ }
298
+ function X(e) {
299
+ return Math.round(e * 100) / 100;
300
+ }
301
+ //#endregion
302
+ //#region src/components/CuiFloorplan/CuiFloorplanInspector.vue?vue&type=script&setup=true&lang.ts
303
+ var bt = { class: "h-full flex flex-col overflow-hidden" }, Z = { class: "flex items-center gap-2 px-4 py-3 border-bottom-color" }, xt = { class: "flex items-center justify-center w-8 h-8 rounded-md shrink-0 inspector-icon" }, St = { class: "flex-1 min-w-0" }, Ct = { class: "text-sm font-semibold truncate text-color" }, wt = { class: "text-xs text-muted truncate" }, Tt = { class: "text-color font-normal text-sm" }, Et = { class: "flex flex-col gap-6" }, Dt = {
304
+ key: 0,
305
+ class: "flex flex-col field-gap"
306
+ }, Ot = { class: "cui-label" }, kt = { class: "flex flex-col field-gap" }, At = { class: "cui-label" }, jt = { class: "flex flex-col field-gap" }, Mt = { class: "cui-label" }, Nt = { class: "flex flex-col field-gap" }, Pt = { class: "cui-label" }, Ft = { class: "flex flex-col field-gap" }, It = { class: "cui-label" }, Lt = { class: "flex flex-col field-gap" }, Rt = { class: "cui-label" }, Q = { class: "text-sm text-muted" }, zt = { class: "text-color font-normal text-sm" }, Bt = { class: "flex flex-col field-gap" }, Vt = { class: "cui-label" }, Ht = {
307
+ key: 1,
308
+ class: "text-sm text-color"
309
+ }, Ut = {
310
+ key: 0,
311
+ class: "flex flex-col field-gap mt-6"
312
+ }, Wt = { class: "cui-label" }, Gt = { class: "flex flex-col field-gap mt-6" }, Kt = { class: "cui-label" }, qt = { class: "text-color font-normal text-sm" }, Jt = { class: "flex flex-col gap-6" }, Yt = { class: "flex flex-col field-gap" }, Xt = { class: "cui-label" }, Zt = {
313
+ key: 0,
314
+ class: "flex flex-col field-gap"
315
+ }, Qt = { class: "cui-label" }, $t = { class: "flex flex-col field-gap" }, en = { class: "cui-label" }, $ = { class: "text-color font-normal text-sm" }, tn = { class: "flex flex-col gap-6" }, nn = { class: "flex flex-col field-gap" }, rn = { class: "cui-label" }, an = { class: "flex flex-col field-gap" }, on = { class: "cui-label" }, sn = { class: "text-color font-normal text-sm" }, cn = { class: "flex flex-col gap-6" }, ln = { class: "flex flex-col field-gap" }, un = { class: "cui-label" }, dn = { class: "flex flex-col field-gap" }, fn = { class: "cui-label" }, pn = { class: "flex flex-col field-gap" }, mn = { class: "cui-label" }, hn = {
316
+ key: 0,
317
+ class: "px-4 pt-4 pb-[max(1rem,var(--cui-bottom-gap))] border-top-color"
318
+ }, gn = /*#__PURE__*/ ae(/* @__PURE__ */ C({
319
+ __name: "CuiFloorplanInspector",
320
+ props: {
321
+ fluid: { type: Boolean },
322
+ rooms: {},
323
+ connections: {},
324
+ cameras: {},
325
+ sensors: {},
326
+ levels: {},
327
+ selection: {},
328
+ readOnly: { type: Boolean }
329
+ },
330
+ emits: [
331
+ "close",
332
+ "update-room",
333
+ "update-camera",
334
+ "update-sensor",
335
+ "update-connection",
336
+ "remove"
337
+ ],
338
+ setup(e, { emit: t }) {
339
+ let n = e, a = t, { t: o } = Oe(), c = w(["general", "view"]), l = h(() => n.selection?.kind === "room" ? n.rooms.find((e) => e.id === n.selection?.id) : void 0), f = h(() => n.selection?.kind === "camera" ? n.cameras.find((e) => e.id === n.selection?.id) : void 0), p = h(() => n.levels.map((e) => ({
340
+ label: e.name,
341
+ value: e.id
342
+ }))), ee = h(() => l.value?.outdoor ? l.value.publicSpace ? "public" : "outdoor" : "indoor"), v = h(() => [
343
+ "indoor",
344
+ "outdoor",
345
+ "public"
346
+ ].map((e) => ({
347
+ label: o(`views.floorplan.room_kind_${e}`),
348
+ value: e
349
+ }))), te = h(() => l.value ? n.rooms.filter((e) => e.roomId === l.value?.roomId).length : 0), x = h(() => {
350
+ let e = l.value;
351
+ if (!e) return [];
352
+ let t = /* @__PURE__ */ new Set(), r = [{
353
+ label: e.name,
354
+ value: e.roomId
355
+ }];
356
+ t.add(e.roomId);
357
+ for (let i of n.rooms) i.roomId === e.roomId || t.has(i.roomId) || i.levelId !== e.levelId || ft(e, i) && (t.add(i.roomId), r.push({
358
+ label: i.name,
359
+ value: i.roomId
360
+ }));
361
+ return r;
362
+ }), ne = h(() => {
363
+ let e = /* @__PURE__ */ new Set();
364
+ return n.rooms.filter((t) => t.levelId === f.value?.levelId && !e.has(t.roomId) && e.add(t.roomId)).map((e) => ({
365
+ label: e.name,
366
+ value: e.roomId
367
+ }));
368
+ }), C = h(() => n.selection?.kind === "sensor" ? n.sensors.find((e) => e.id === n.selection?.id) : void 0), E = h(() => {
369
+ let e = /* @__PURE__ */ new Set();
370
+ return n.rooms.filter((t) => t.levelId === C.value?.levelId && !e.has(t.roomId) && e.add(t.roomId)).map((e) => ({
371
+ label: e.name,
372
+ value: e.roomId
373
+ }));
374
+ }), re = h(() => C.value ? n.connections.filter((e) => e.fromRoomId === C.value?.roomId || e.toRoomId === C.value?.roomId).map((e) => {
375
+ let t = e.fromRoomId === C.value?.roomId ? e.toRoomId : e.fromRoomId;
376
+ return {
377
+ label: n.rooms.find((e) => e.roomId === t)?.name ?? t,
378
+ value: e.id
379
+ };
380
+ }) : []), D = h(() => n.selection?.kind === "connection" ? n.connections.find((e) => e.id === n.selection?.id) : void 0), O = h(() => {
381
+ if (!D.value) return !1;
382
+ let e = n.rooms.find((e) => e.roomId === D.value?.fromRoomId), t = n.rooms.find((e) => e.roomId === D.value?.toRoomId);
383
+ return !!e && !!t && e.levelId !== t.levelId;
384
+ }), ae = h(() => ct.filter((e) => e !== "stairs").map((e) => ({
385
+ label: o(`views.floorplan.connection_${e}`),
386
+ value: e
387
+ }))), oe = h(() => D.value ? `${n.rooms.find((e) => e.roomId === D.value?.fromRoomId)?.name ?? ""} · ${n.rooms.find((e) => e.roomId === D.value?.toRoomId)?.name ?? ""}` : ""), se = h(() => ((f.value?.rotation ?? 0) % 360 + 360) % 360), ce = h(() => C.value ? C.value.owner || (n.rooms.find((e) => e.roomId === C.value?.roomId)?.name ?? "") : l.value ? n.levels.find((e) => e.id === l.value?.levelId)?.name ?? "" : D.value ? o(`views.floorplan.connection_${D.value.type}`) : f.value ? n.rooms.find((e) => e.roomId === f.value?.roomId)?.name ?? o("views.floorplan.no_room") : "");
388
+ function le(e) {
389
+ C.value && a("update-sensor", {
390
+ id: C.value.id,
391
+ patch: e
392
+ });
393
+ }
394
+ function ue(e) {
395
+ return {
396
+ outdoor: e !== "indoor",
397
+ publicSpace: e === "public"
398
+ };
399
+ }
400
+ function de(e) {
401
+ l.value && a("update-room", {
402
+ id: l.value.id,
403
+ patch: e
404
+ });
405
+ }
406
+ function fe(e) {
407
+ f.value && a("update-camera", {
408
+ id: f.value.id,
409
+ patch: e
410
+ });
411
+ }
412
+ function pe() {
413
+ l.value ? a("remove", {
414
+ kind: "room",
415
+ id: l.value.id
416
+ }) : C.value ? a("remove", {
417
+ kind: "sensor",
418
+ id: C.value.id
419
+ }) : f.value ? a("remove", {
420
+ kind: "camera",
421
+ id: f.value.id
422
+ }) : D.value && a("remove", {
423
+ kind: "connection",
424
+ id: D.value.id
425
+ });
426
+ }
427
+ return (t, n) => {
428
+ let o = He, h = at, w = nt, k = Ne, me = ke, A = Le, he = Me, j = ie, M = je, ge = Be, _e = Fe, ve = Ie, ye = we, be = Re;
429
+ return r(), _("div", bt, [
430
+ b("div", Z, [
431
+ b("div", xt, [m(f) ? (r(), u(o, {
432
+ key: 0,
433
+ class: "w-4 h-4"
434
+ })) : m(D) ? (r(), u(h, {
435
+ key: 1,
436
+ class: "w-4 h-4"
437
+ })) : (r(), u(w, {
438
+ key: 2,
439
+ class: "w-4 h-4"
440
+ }))]),
441
+ b("div", St, [b("div", Ct, i(m(l)?.name ?? m(f)?.name ?? m(C)?.name ?? m(oe)), 1), b("div", wt, i(m(ce)), 1)]),
442
+ T(me, {
443
+ severity: "secondary",
444
+ text: "",
445
+ rounded: "",
446
+ class: "shrink-0 cui-icon-sm",
447
+ onClick: n[0] ||= (e) => a("close")
448
+ }, {
449
+ icon: g(() => [T(k, {
450
+ width: "100%",
451
+ height: "100%"
452
+ })]),
453
+ _: 1
454
+ })
455
+ ]),
456
+ b("div", { class: s(["flex-1 overflow-y-auto", { "pb-[var(--cui-bottom-gap)]": e.readOnly }]) }, [T(be, {
457
+ multiple: "",
458
+ value: m(c),
459
+ class: s(e.fluid ? "w-full" : "w-[300px]")
460
+ }, {
461
+ default: g(() => [
462
+ m(l) ? (r(), u(ve, {
463
+ key: 0,
464
+ value: "general"
465
+ }, {
466
+ default: g(() => [T(A, { class: "px-4 rounded-none!" }, {
467
+ default: g(() => [b("span", Tt, i(t.$t("views.floorplan.section_room")), 1)]),
468
+ _: 1
469
+ }), T(_e, { pt: { content: { class: e.fluid ? "px-4 w-full" : "px-4 w-[300px]" } } }, {
470
+ default: g(() => [b("div", Et, [
471
+ m(x).length > 1 ? (r(), _("div", Dt, [
472
+ b("label", Ot, i(t.$t("views.floorplan.belongs_to")), 1),
473
+ T(he, {
474
+ "model-value": m(l).roomId,
475
+ options: m(x),
476
+ "option-label": "label",
477
+ "option-value": "value",
478
+ disabled: e.readOnly,
479
+ "onUpdate:modelValue": n[1] ||= (e) => e && de({ roomId: e })
480
+ }, null, 8, [
481
+ "model-value",
482
+ "options",
483
+ "disabled"
484
+ ]),
485
+ T(j, {
486
+ severity: "secondary",
487
+ variant: "simple",
488
+ size: "small",
489
+ class: "cui-input-hint"
490
+ }, {
491
+ default: g(() => [S(i(t.$t("views.floorplan.belongs_to_hint")), 1)]),
492
+ _: 1
493
+ })
494
+ ])) : d("", !0),
495
+ b("div", kt, [
496
+ b("label", At, i(t.$t("views.floorplan.room_name")), 1),
497
+ T(M, {
498
+ "model-value": m(l).name,
499
+ disabled: e.readOnly,
500
+ "onUpdate:modelValue": n[2] ||= (e) => de({ name: e ?? "" })
501
+ }, null, 8, ["model-value", "disabled"]),
502
+ m(te) > 1 ? (r(), u(j, {
503
+ key: 0,
504
+ severity: "secondary",
505
+ variant: "simple",
506
+ size: "small",
507
+ class: "cui-input-hint"
508
+ }, {
509
+ default: g(() => [S(i(t.$t("views.floorplan.room_parts", { count: m(te) })), 1)]),
510
+ _: 1
511
+ })) : d("", !0)
512
+ ]),
513
+ b("div", jt, [b("label", Mt, i(t.$t("views.floorplan.level")), 1), T(he, {
514
+ "model-value": m(l).levelId,
515
+ options: m(p),
516
+ "option-label": "label",
517
+ "option-value": "value",
518
+ disabled: e.readOnly,
519
+ "onUpdate:modelValue": n[3] ||= (e) => de({ levelId: e })
520
+ }, null, 8, [
521
+ "model-value",
522
+ "options",
523
+ "disabled"
524
+ ])]),
525
+ b("div", Nt, [
526
+ b("label", Pt, i(t.$t("views.floorplan.room_kind")), 1),
527
+ T(he, {
528
+ "model-value": m(ee),
529
+ options: m(v),
530
+ "option-label": "label",
531
+ "option-value": "value",
532
+ disabled: e.readOnly,
533
+ "onUpdate:modelValue": n[4] ||= (e) => de(ue(e))
534
+ }, null, 8, [
535
+ "model-value",
536
+ "options",
537
+ "disabled"
538
+ ]),
539
+ T(j, {
540
+ severity: "secondary",
541
+ variant: "simple",
542
+ size: "small",
543
+ class: "cui-input-hint"
544
+ }, {
545
+ default: g(() => [S(i(t.$t(`views.floorplan.room_kind_${m(ee)}_hint`)), 1)]),
546
+ _: 1
547
+ })
548
+ ]),
549
+ b("div", Ft, [
550
+ b("label", It, i(t.$t("views.floorplan.note")), 1),
551
+ T(ge, {
552
+ "model-value": m(l).note,
553
+ disabled: e.readOnly,
554
+ maxlength: m(240),
555
+ rows: "3",
556
+ "auto-resize": "",
557
+ "onUpdate:modelValue": n[5] ||= (e) => de({ note: e ?? "" })
558
+ }, null, 8, [
559
+ "model-value",
560
+ "disabled",
561
+ "maxlength"
562
+ ]),
563
+ T(j, {
564
+ severity: "secondary",
565
+ variant: "simple",
566
+ size: "small",
567
+ class: "cui-input-hint"
568
+ }, {
569
+ default: g(() => [S(i(t.$t("views.floorplan.note_hint")), 1)]),
570
+ _: 1
571
+ })
572
+ ]),
573
+ b("div", Lt, [b("label", Rt, i(t.$t("views.floorplan.size")), 1), b("span", Q, i(m(ut)(m(l).width)) + " x " + i(m(ut)(m(l).height)), 1)])
574
+ ])]),
575
+ _: 1
576
+ }, 8, ["pt"])]),
577
+ _: 1
578
+ })) : d("", !0),
579
+ m(D) ? (r(), u(ve, {
580
+ key: 1,
581
+ value: "general"
582
+ }, {
583
+ default: g(() => [T(A, { class: "px-4 rounded-none!" }, {
584
+ default: g(() => [b("span", zt, i(t.$t("views.floorplan.section_connection")), 1)]),
585
+ _: 1
586
+ }), T(_e, { pt: { content: { class: e.fluid ? "px-4 w-full" : "px-4 w-[300px]" } } }, {
587
+ default: g(() => [
588
+ b("div", Bt, [
589
+ b("label", Vt, i(t.$t("views.floorplan.connection_type")), 1),
590
+ m(O) ? (r(), _("span", Ht, i(t.$t("views.floorplan.connection_stairs")), 1)) : (r(), u(he, {
591
+ key: 0,
592
+ "model-value": m(D).type,
593
+ options: m(ae),
594
+ "option-label": "label",
595
+ "option-value": "value",
596
+ disabled: e.readOnly,
597
+ "onUpdate:modelValue": n[6] ||= (e) => a("update-connection", {
598
+ id: m(D).id,
599
+ patch: { type: e }
600
+ })
601
+ }, null, 8, [
602
+ "model-value",
603
+ "options",
604
+ "disabled"
605
+ ])),
606
+ T(j, {
607
+ severity: "secondary",
608
+ variant: "simple",
609
+ size: "small",
610
+ class: "cui-input-hint"
611
+ }, {
612
+ default: g(() => [S(i(m(O) ? t.$t("views.floorplan.connection_level_hint") : t.$t("views.floorplan.connection_type_hint")), 1)]),
613
+ _: 1
614
+ })
615
+ ]),
616
+ m(O) ? d("", !0) : (r(), _("div", Ut, [
617
+ b("label", Wt, i(t.$t("views.floorplan.connection_width", { value: m(J)(m(D).width).toFixed(2) })), 1),
618
+ T(ye, {
619
+ "model-value": m(D).width,
620
+ disabled: e.readOnly,
621
+ min: m(q).min,
622
+ max: m(q).max,
623
+ step: 5,
624
+ "onUpdate:modelValue": n[7] ||= (e) => a("update-connection", {
625
+ id: m(D).id,
626
+ patch: { width: Number(e) }
627
+ })
628
+ }, null, 8, [
629
+ "model-value",
630
+ "disabled",
631
+ "min",
632
+ "max"
633
+ ]),
634
+ T(j, {
635
+ severity: "secondary",
636
+ variant: "simple",
637
+ size: "small",
638
+ class: "cui-input-hint"
639
+ }, {
640
+ default: g(() => [S(i(t.$t("views.floorplan.connection_width_hint")), 1)]),
641
+ _: 1
642
+ })
643
+ ])),
644
+ b("div", Gt, [
645
+ b("label", Kt, i(t.$t("views.floorplan.note")), 1),
646
+ T(ge, {
647
+ "model-value": m(D).note,
648
+ disabled: e.readOnly,
649
+ maxlength: m(240),
650
+ rows: "3",
651
+ "auto-resize": "",
652
+ "onUpdate:modelValue": n[8] ||= (e) => a("update-connection", {
653
+ id: m(D).id,
654
+ patch: { note: e ?? "" }
655
+ })
656
+ }, null, 8, [
657
+ "model-value",
658
+ "disabled",
659
+ "maxlength"
660
+ ]),
661
+ T(j, {
662
+ severity: "secondary",
663
+ variant: "simple",
664
+ size: "small",
665
+ class: "cui-input-hint"
666
+ }, {
667
+ default: g(() => [S(i(t.$t("views.floorplan.note_hint")), 1)]),
668
+ _: 1
669
+ })
670
+ ])
671
+ ]),
672
+ _: 1
673
+ }, 8, ["pt"])]),
674
+ _: 1
675
+ })) : d("", !0),
676
+ m(C) ? (r(), u(ve, {
677
+ key: 2,
678
+ value: "general"
679
+ }, {
680
+ default: g(() => [T(A, { class: "px-4 rounded-none!" }, {
681
+ default: g(() => [b("span", qt, i(t.$t("views.floorplan.section_sensor")), 1)]),
682
+ _: 1
683
+ }), T(_e, { pt: { content: { class: e.fluid ? "px-4 w-full" : "px-4 w-[300px]" } } }, {
684
+ default: g(() => [b("div", Jt, [
685
+ b("div", Yt, [b("label", Xt, i(t.$t("views.floorplan.assigned_room")), 1), T(he, {
686
+ "model-value": m(C).roomId,
687
+ options: m(E),
688
+ disabled: e.readOnly,
689
+ "option-label": "label",
690
+ "option-value": "value",
691
+ "onUpdate:modelValue": n[9] ||= (e) => e && le({ roomId: e })
692
+ }, null, 8, [
693
+ "model-value",
694
+ "options",
695
+ "disabled"
696
+ ])]),
697
+ m(re).length ? (r(), _("div", Zt, [
698
+ b("label", Qt, i(t.$t("views.floorplan.sensor_passage")), 1),
699
+ T(he, {
700
+ "model-value": m(C).connectionId,
701
+ options: m(re),
702
+ disabled: e.readOnly,
703
+ "option-label": "label",
704
+ "option-value": "value",
705
+ "show-clear": "",
706
+ "onUpdate:modelValue": n[10] ||= (e) => le({ connectionId: e ?? null })
707
+ }, null, 8, [
708
+ "model-value",
709
+ "options",
710
+ "disabled"
711
+ ]),
712
+ T(j, {
713
+ severity: "secondary",
714
+ variant: "simple",
715
+ size: "small",
716
+ class: "cui-input-hint"
717
+ }, {
718
+ default: g(() => [S(i(t.$t("views.floorplan.sensor_passage_hint")), 1)]),
719
+ _: 1
720
+ })
721
+ ])) : d("", !0),
722
+ b("div", $t, [
723
+ b("label", en, i(t.$t("views.floorplan.note")), 1),
724
+ T(ge, {
725
+ "model-value": m(C).note,
726
+ disabled: e.readOnly,
727
+ maxlength: m(240),
728
+ rows: "3",
729
+ "auto-resize": "",
730
+ "onUpdate:modelValue": n[11] ||= (e) => le({ note: e ?? "" })
731
+ }, null, 8, [
732
+ "model-value",
733
+ "disabled",
734
+ "maxlength"
735
+ ]),
736
+ T(j, {
737
+ severity: "secondary",
738
+ variant: "simple",
739
+ size: "small",
740
+ class: "cui-input-hint"
741
+ }, {
742
+ default: g(() => [S(i(t.$t("views.floorplan.note_hint")), 1)]),
743
+ _: 1
744
+ })
745
+ ])
746
+ ])]),
747
+ _: 1
748
+ }, 8, ["pt"])]),
749
+ _: 1
750
+ })) : d("", !0),
751
+ m(f) ? (r(), _(y, { key: 3 }, [T(ve, { value: "general" }, {
752
+ default: g(() => [T(A, { class: "px-4 rounded-none!" }, {
753
+ default: g(() => [b("span", $, i(t.$t("views.floorplan.section_camera")), 1)]),
754
+ _: 1
755
+ }), T(_e, { pt: { content: { class: e.fluid ? "px-4 w-full" : "px-4 w-[300px]" } } }, {
756
+ default: g(() => [b("div", tn, [b("div", nn, [
757
+ b("label", rn, i(t.$t("views.floorplan.assigned_room")), 1),
758
+ T(he, {
759
+ "model-value": m(f).roomId,
760
+ options: m(ne),
761
+ disabled: e.readOnly,
762
+ "option-label": "label",
763
+ "option-value": "value",
764
+ "onUpdate:modelValue": n[12] ||= (e) => e && fe({ roomId: e })
765
+ }, null, 8, [
766
+ "model-value",
767
+ "options",
768
+ "disabled"
769
+ ]),
770
+ T(j, {
771
+ severity: "secondary",
772
+ variant: "simple",
773
+ size: "small",
774
+ class: "cui-input-hint"
775
+ }, {
776
+ default: g(() => [S(i(t.$t("views.floorplan.assigned_room_hint")), 1)]),
777
+ _: 1
778
+ })
779
+ ]), b("div", an, [
780
+ b("label", on, i(t.$t("views.floorplan.note")), 1),
781
+ T(ge, {
782
+ "model-value": m(f).note,
783
+ disabled: e.readOnly,
784
+ maxlength: m(240),
785
+ rows: "3",
786
+ "auto-resize": "",
787
+ "onUpdate:modelValue": n[13] ||= (e) => fe({ note: e ?? "" })
788
+ }, null, 8, [
789
+ "model-value",
790
+ "disabled",
791
+ "maxlength"
792
+ ]),
793
+ T(j, {
794
+ severity: "secondary",
795
+ variant: "simple",
796
+ size: "small",
797
+ class: "cui-input-hint"
798
+ }, {
799
+ default: g(() => [S(i(t.$t("views.floorplan.note_hint")), 1)]),
800
+ _: 1
801
+ })
802
+ ])])]),
803
+ _: 1
804
+ }, 8, ["pt"])]),
805
+ _: 1
806
+ }), T(ve, { value: "view" }, {
807
+ default: g(() => [T(A, { class: "px-4 rounded-none!" }, {
808
+ default: g(() => [b("span", sn, i(t.$t("views.floorplan.section_view")), 1)]),
809
+ _: 1
810
+ }), T(_e, { pt: { content: { class: e.fluid ? "px-4 w-full" : "px-4 w-[300px]" } } }, {
811
+ default: g(() => [b("div", cn, [
812
+ b("div", ln, [b("label", un, i(t.$t("views.floorplan.direction", { value: m(se) })), 1), T(ye, {
813
+ "model-value": m(se),
814
+ disabled: e.readOnly,
815
+ min: 0,
816
+ max: 359,
817
+ "onUpdate:modelValue": n[14] ||= (e) => fe({ rotation: Number(e) })
818
+ }, null, 8, ["model-value", "disabled"])]),
819
+ b("div", dn, [b("label", fn, i(t.$t("views.floorplan.fov", { value: m(f).fov })), 1), T(ye, {
820
+ "model-value": m(f).fov,
821
+ disabled: e.readOnly,
822
+ min: 30,
823
+ max: 180,
824
+ "onUpdate:modelValue": n[15] ||= (e) => fe({ fov: Number(e) })
825
+ }, null, 8, ["model-value", "disabled"])]),
826
+ b("div", pn, [b("label", mn, i(t.$t("views.floorplan.range", { value: m(J)(m(f).range).toFixed(1) })), 1), T(ye, {
827
+ disabled: e.readOnly,
828
+ "model-value": m(f).range,
829
+ min: m(K).min,
830
+ max: m(K).max,
831
+ step: 50,
832
+ "onUpdate:modelValue": n[16] ||= (e) => fe({ range: Number(e) })
833
+ }, null, 8, [
834
+ "disabled",
835
+ "model-value",
836
+ "min",
837
+ "max"
838
+ ])])
839
+ ])]),
840
+ _: 1
841
+ }, 8, ["pt"])]),
842
+ _: 1
843
+ })], 64)) : d("", !0)
844
+ ]),
845
+ _: 1
846
+ }, 8, ["value", "class"])], 2),
847
+ e.readOnly ? d("", !0) : (r(), _("div", hn, [T(me, {
848
+ severity: "danger",
849
+ fluid: "",
850
+ class: "w-full cui-button-medium",
851
+ label: m(l) ? t.$t("views.floorplan.delete_room") : m(D) ? t.$t("views.floorplan.remove_connection") : m(C) ? t.$t("views.floorplan.remove_sensor") : t.$t("views.floorplan.remove_camera"),
852
+ onClick: pe
853
+ }, null, 8, ["label"])]))
854
+ ]);
855
+ };
856
+ }
857
+ }), [["__scopeId", "data-v-79c10243"]]), _n = {
858
+ viewBox: "0 0 24 24",
859
+ width: "1.2em",
860
+ height: "1.2em"
861
+ };
862
+ function vn(e, t) {
863
+ return r(), _("svg", _n, [...t[0] ||= [b("path", {
864
+ fill: "currentColor",
865
+ d: "M10 13a2 2 0 0 1 2 2c0 1.11-.89 2-2 2s-2-.89-2-2s.9-2 2-2m8-12c-2.76 0-5 2.24-5 5v2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2h-1V6c0-1.66 1.34-3 3-3s3 1.34 3 3v2h2V6c0-2.76-2.24-5-5-5m-2 9v10H4V10z"
866
+ }, null, -1)]]);
867
+ }
868
+ var yn = l({
869
+ name: "mdi-lock-open-variant-outline",
870
+ render: vn
871
+ }), bn = {
872
+ viewBox: "0 0 24 24",
873
+ width: "1.2em",
874
+ height: "1.2em"
875
+ };
876
+ function xn(e, t) {
877
+ return r(), _("svg", bn, [...t[0] ||= [b("path", {
878
+ fill: "currentColor",
879
+ d: "M17 4h3c1.1 0 2 .9 2 2v2h-2V6h-3zM4 8V6h3V4H4c-1.1 0-2 .9-2 2v2zm16 8v2h-3v2h3c1.1 0 2-.9 2-2v-2zM7 18H4v-2H2v2c0 1.1.9 2 2 2h3zm9-8v4H8v-4zm2-2H6v8h12z"
880
+ }, null, -1)]]);
881
+ }
882
+ var Sn = l({
883
+ name: "mdi-fit-to-screen-outline",
884
+ render: xn
885
+ }), Cn = ["width", "height"], wn = ["width", "height"], Tn = ["y2", "stroke-width"], En = ["id"], Dn = ["d"], On = ["width", "height"], kn = ["y2", "stroke-width"], An = [
886
+ "x",
887
+ "y",
888
+ "width",
889
+ "height"
890
+ ], jn = ["d"], Mn = ["clip-path"], Nn = ["d", "transform"], Pn = ["transform"], Fn = ["d"], In = ["d", "stroke-width"], Ln = ["clip-path"], Rn = ["d", "transform"], zn = [
891
+ "x",
892
+ "y",
893
+ "width",
894
+ "height"
895
+ ], Bn = [
896
+ "x",
897
+ "y",
898
+ "width",
899
+ "height",
900
+ "onPointerdown"
901
+ ], Vn = [
902
+ "x",
903
+ "y",
904
+ "font-size",
905
+ "transform"
906
+ ], Hn = ["onPointerdown"], Un = ["d", "stroke-width"], Wn = ["d", "stroke-width"], Gn = [
907
+ "cx",
908
+ "cy",
909
+ "r",
910
+ "stroke-width",
911
+ "onPointerdown"
912
+ ], Kn = [
913
+ "d",
914
+ "stroke-width",
915
+ "onPointerdown"
916
+ ], qn = ["onPointerdown", "onPointerenter"], Jn = [
917
+ "cx",
918
+ "cy",
919
+ "r",
920
+ "stroke-width"
921
+ ], Yn = [
922
+ "cx",
923
+ "cy",
924
+ "r"
925
+ ], Xn = {
926
+ key: 0,
927
+ class: "camera-chip"
928
+ }, Zn = [
929
+ "x",
930
+ "y",
931
+ "width",
932
+ "height",
933
+ "rx"
934
+ ], Qn = [
935
+ "x",
936
+ "y",
937
+ "width",
938
+ "height"
939
+ ], $n = [
940
+ "x",
941
+ "y",
942
+ "font-size"
943
+ ], er = [
944
+ "cx",
945
+ "cy",
946
+ "r",
947
+ "stroke-width",
948
+ "onPointerdown"
949
+ ], tr = ["d", "stroke-width"], nr = ["onPointerdown", "onPointerenter"], rr = [
950
+ "cx",
951
+ "cy",
952
+ "r",
953
+ "stroke-width"
954
+ ], ir = [
955
+ "x",
956
+ "y",
957
+ "width",
958
+ "height"
959
+ ], ar = {
960
+ key: 0,
961
+ class: "camera-chip"
962
+ }, or = [
963
+ "x",
964
+ "y",
965
+ "width",
966
+ "height",
967
+ "rx"
968
+ ], sr = [
969
+ "x",
970
+ "y",
971
+ "font-size"
972
+ ], cr = ["onPointerenter"], lr = [
973
+ "cx",
974
+ "cy",
975
+ "r",
976
+ "stroke-width"
977
+ ], ur = [
978
+ "cx",
979
+ "cy",
980
+ "r"
981
+ ], dr = {
982
+ key: 0,
983
+ class: "camera-chip"
984
+ }, fr = [
985
+ "x",
986
+ "y",
987
+ "width",
988
+ "height",
989
+ "rx"
990
+ ], pr = [
991
+ "x",
992
+ "y",
993
+ "font-size"
994
+ ], mr = ["onPointerdown"], hr = [
995
+ "cx",
996
+ "cy",
997
+ "r",
998
+ "stroke-width"
999
+ ], gr = ["d", "stroke-width"], _r = [
1000
+ "x",
1001
+ "y",
1002
+ "font-size"
1003
+ ], vr = {
1004
+ key: 1,
1005
+ class: "camera-chip"
1006
+ }, yr = [
1007
+ "x",
1008
+ "y",
1009
+ "width",
1010
+ "height",
1011
+ "rx"
1012
+ ], br = [
1013
+ "x",
1014
+ "y",
1015
+ "font-size"
1016
+ ], xr = ["d", "stroke-width"], Sr = ["d", "stroke-width"], Cr = [
1017
+ "x",
1018
+ "y",
1019
+ "width",
1020
+ "height",
1021
+ "rx",
1022
+ "stroke-width"
1023
+ ], wr = [
1024
+ "cx",
1025
+ "cy",
1026
+ "r",
1027
+ "stroke-width"
1028
+ ], Tr = {
1029
+ width: "46",
1030
+ height: "46",
1031
+ viewBox: "0 0 46 46"
1032
+ }, Er = ["transform"], Dr = { class: "flex flex-col overflow-hidden floorplan-controls" }, Or = { class: "floorplan-scale flex items-center gap-2 px-2 py-1" }, kr = ["width"], Ar = ["d"], jr = { class: "text-xs text-muted whitespace-nowrap" }, Mr = 60, Nr = /*#__PURE__*/ ae(/* @__PURE__ */ C({
1033
+ __name: "CuiFloorplanCanvas",
1034
+ props: {
1035
+ mobile: { type: Boolean },
1036
+ bottomInset: {},
1037
+ bottomInsetDragging: { type: Boolean },
1038
+ levels: {},
1039
+ rooms: {},
1040
+ connections: {},
1041
+ cameras: {},
1042
+ sensors: {},
1043
+ levelId: {},
1044
+ selection: {},
1045
+ north: {},
1046
+ readOnly: { type: Boolean }
1047
+ },
1048
+ emits: [
1049
+ "select",
1050
+ "history",
1051
+ "move-room",
1052
+ "resize-room",
1053
+ "move-camera",
1054
+ "rotate-camera",
1055
+ "create-connection",
1056
+ "move-connection",
1057
+ "resize-connection",
1058
+ "drop",
1059
+ "update-north",
1060
+ "request-stairs",
1061
+ "settle-room",
1062
+ "hover-camera",
1063
+ "move-sensor",
1064
+ "hover-sensor"
1065
+ ],
1066
+ setup(a, { expose: l, emit: f }) {
1067
+ let p = a, S = f, ne = te("wrapperRef"), C = w(!1), E = w(!1), ie = te("compassRef"), O = w({
1068
+ x: null,
1069
+ y: null
1070
+ }), ae = w(null), se = w(null), ce = w(null), le = w(null), de = /* @__PURE__ */ new Set(["motion", "audio"]), pe = /* @__PURE__ */ new Set([
1071
+ "object",
1072
+ "face",
1073
+ "licensePlate",
1074
+ "classifier",
1075
+ "objectAssist",
1076
+ "clip"
1077
+ ]), k = null, me = !1, A = null, { viewport: j, zoomIn: M, zoomOut: ge, fitBounds: ve } = B(), { sensors: be } = Ae(), xe = h(() => p.sensors.filter((e) => e.levelId === p.levelId)), Se = h(() => {
1078
+ let e = /* @__PURE__ */ new Map();
1079
+ for (let t of be.value) {
1080
+ let n = String(t.type), r = de.has(n), i = pe.has(n);
1081
+ if (!r && !i || t.getProperty("detected") !== !0) continue;
1082
+ let a = Ke(t, n);
1083
+ for (let n of t.assignedCameraIds.value) {
1084
+ let t = e.get(n);
1085
+ e.set(n, {
1086
+ level: t?.level === "detection" || i ? "detection" : "motion",
1087
+ labels: [.../* @__PURE__ */ new Set([...t?.labels ?? [], ...a])]
1088
+ });
1089
+ }
1090
+ }
1091
+ return e;
1092
+ }), N = h(() => {
1093
+ let e = I.value.find((e) => e.id === le.value);
1094
+ if (!e) return null;
1095
+ let t = `${ut(e.width, 1)} x ${ut(e.height, 1)}`;
1096
+ return {
1097
+ text: t,
1098
+ width: it(t),
1099
+ x: e.x + e.width / 2,
1100
+ y: e.y + e.height + 10 / P.value
1101
+ };
1102
+ }), P = h(() => j.value.zoom), Ce = h(() => ({
1103
+ x: j.value.x,
1104
+ y: j.value.y
1105
+ })), we = h(() => p.north ?? 0), F = h(() => p.readOnly === !0 || C.value), I = h(() => p.rooms.filter((e) => e.levelId === p.levelId)), Ee = h(() => p.cameras.filter((e) => e.levelId === p.levelId)), L = h(() => {
1106
+ let e = 4e3, t = [0], n = [0];
1107
+ for (let e of I.value) t.push(e.x, e.x + e.width), n.push(e.y, e.y + e.height);
1108
+ for (let e of Ee.value) t.push(e.x - e.range, e.x + e.range), n.push(e.y - e.range, e.y + e.range);
1109
+ let r = Math.min(...t) - e, i = Math.min(...n) - e;
1110
+ return {
1111
+ x: r,
1112
+ y: i,
1113
+ width: Math.max(...t) + e - r,
1114
+ height: Math.max(...n) + e - i
1115
+ };
1116
+ }), De = [{
1117
+ id: "scene",
1118
+ type: "scene",
1119
+ position: {
1120
+ x: 0,
1121
+ y: 0
1122
+ },
1123
+ draggable: !1,
1124
+ selectable: !1,
1125
+ data: {}
1126
+ }], Oe = h(() => p.selection?.kind === "room" ? I.value.find((e) => e.id === p.selection?.id) : void 0), R = h(() => p.selection?.kind === "camera" ? Ee.value.find((e) => e.id === p.selection?.id) : void 0), ke = h(() => P.value >= .45), je = h(() => {
1127
+ let e = [
1128
+ .5,
1129
+ 1,
1130
+ 2,
1131
+ 5,
1132
+ 10,
1133
+ 20,
1134
+ 50
1135
+ ], t = e.filter((e) => e * 100 * P.value <= 130).pop() ?? e[0];
1136
+ return {
1137
+ meters: t,
1138
+ width: Math.round(t * 100 * P.value),
1139
+ label: `${t} m`
1140
+ };
1141
+ }), Me = h(() => p.connections.map((e) => ({
1142
+ connection: e,
1143
+ geometry: mt(e, p.rooms, p.levelId)
1144
+ })).filter((e) => e.geometry !== null)), Ne = h(() => new Map([...Pe.value].map(([e, t]) => [e, G(t.reduce((e, t) => t.width * t.height > e.width * e.height ? t : e))]))), Pe = h(() => {
1145
+ let e = /* @__PURE__ */ new Map();
1146
+ for (let t of I.value) e.set(t.roomId, [...e.get(t.roomId) ?? [], t]);
1147
+ return e;
1148
+ }), Fe = h(() => {
1149
+ let e = /* @__PURE__ */ new Map();
1150
+ for (let t of Me.value) {
1151
+ if (t.geometry.kind !== "edge") continue;
1152
+ let n = {
1153
+ x1: t.geometry.x1,
1154
+ y1: t.geometry.y1,
1155
+ x2: t.geometry.x2,
1156
+ y2: t.geometry.y2
1157
+ };
1158
+ for (let r of [t.connection.fromRoomId, t.connection.toRoomId]) e.set(r, [...e.get(r) ?? [], n]);
1159
+ }
1160
+ return e;
1161
+ }), Ie = h(() => [...Pe.value].map(([e, t]) => ({
1162
+ roomId: e,
1163
+ parts: t,
1164
+ ...ht(t, 8 / P.value, Fe.value.get(e) ?? []),
1165
+ outdoor: t.every((e) => e.outdoor),
1166
+ publicSpace: t.every((e) => e.publicSpace),
1167
+ selected: t.some((e) => J("room", e.id))
1168
+ })).sort((e, t) => Number(e.selected) - Number(t.selected))), Le = h(() => {
1169
+ let e = /* @__PURE__ */ new Map();
1170
+ for (let t of Pe.value.keys()) e.set(t, t);
1171
+ let t = (t) => {
1172
+ let n = t;
1173
+ for (; e.get(n) !== n;) n = e.get(n);
1174
+ return n;
1175
+ }, n = (e) => (Pe.value.get(e) ?? []).every((e) => e.outdoor);
1176
+ for (let r of p.connections) {
1177
+ if (!e.has(r.fromRoomId) || !e.has(r.toRoomId) || !n(r.fromRoomId) || !n(r.toRoomId)) continue;
1178
+ let i = t(r.fromRoomId), a = t(r.toRoomId);
1179
+ i !== a && e.set(i, a);
1180
+ }
1181
+ let r = /* @__PURE__ */ new Map();
1182
+ for (let [e, n] of Pe.value) {
1183
+ let i = t(e);
1184
+ r.set(i, [...r.get(i) ?? [], ...n]);
1185
+ }
1186
+ let i = /* @__PURE__ */ new Map();
1187
+ for (let [e, t] of r) i.set(e, ht(t, 8 / P.value, []).fill);
1188
+ return [...Pe.value.keys()].map((e) => ({
1189
+ roomId: e,
1190
+ path: i.get(t(e)) ?? ""
1191
+ }));
1192
+ }), Re = h(() => Me.value.flatMap((e) => {
1193
+ if (e.geometry.kind !== "edge") return [];
1194
+ let { x1: t, y1: n, x2: r, y2: i, wall: a } = e.geometry;
1195
+ return [{
1196
+ id: e.connection.id,
1197
+ type: e.connection.type,
1198
+ wall: a,
1199
+ line: `M ${t} ${n} L ${r} ${i}`,
1200
+ handles: [{
1201
+ x: t,
1202
+ y: n
1203
+ }, {
1204
+ x: r,
1205
+ y: i
1206
+ }]
1207
+ }];
1208
+ })), ze = h(() => {
1209
+ let e = Oe.value;
1210
+ return !e || F.value ? [] : I.value.filter((t) => t.roomId !== e.roomId).map((t) => ({
1211
+ other: t,
1212
+ wall: ft(e, t)
1213
+ })).filter((e) => e.wall !== null).map((t) => ({
1214
+ fromRoomId: e.roomId,
1215
+ fromShapeId: e.id,
1216
+ roomId: t.other.roomId,
1217
+ shapeId: t.other.id,
1218
+ x: t.wall.x + t.wall.stepX * t.wall.length / 2,
1219
+ y: t.wall.y + t.wall.stepY * t.wall.length / 2
1220
+ }));
1221
+ }), Be = h(() => {
1222
+ let e = /* @__PURE__ */ new Map(), t = (t) => {
1223
+ for (; e.get(t) !== t;) t = e.get(t);
1224
+ return t;
1225
+ };
1226
+ for (let n of p.connections) if (n.type === "stairs") {
1227
+ for (let t of [n.fromRoomId, n.toRoomId]) e.has(t) || e.set(t, t);
1228
+ e.set(t(n.fromRoomId), t(n.toRoomId));
1229
+ }
1230
+ let n = [];
1231
+ for (let r of I.value) {
1232
+ if (!e.has(r.roomId)) continue;
1233
+ let i = t(r.roomId), a = p.cameras.filter((n) => n.roomId !== r.roomId && e.has(n.roomId) && t(n.roomId) === i);
1234
+ a.length && n.push({
1235
+ key: `${r.id}-flight`,
1236
+ label: a.map((e) => e.name).join(", "),
1237
+ x: r.x + r.width / 2,
1238
+ y: r.y + r.height / 2
1239
+ });
1240
+ }
1241
+ return n;
1242
+ }), Ve = h(() => {
1243
+ let e = [], t = /* @__PURE__ */ new Map(), n = (n, r, i, a) => {
1244
+ let o = I.value.find((e) => e.id === r) ?? I.value.find((e) => e.roomId === n);
1245
+ if (!o || o.width * P.value < 80 || o.height * P.value < 60) return;
1246
+ let s = t.get(o.id) ?? 0;
1247
+ t.set(o.id, s + 1), e.push({
1248
+ key: i ?? `stairs-${n}`,
1249
+ roomId: n,
1250
+ connectionId: i,
1251
+ direction: a,
1252
+ x: o.x + o.width - (16 + s * 30) / P.value,
1253
+ y: o.y + 16 / P.value
1254
+ });
1255
+ };
1256
+ for (let e of Me.value) e.geometry.kind === "badge" && n(e.geometry.roomId, e.geometry.shapeId, e.connection.id, W(e.connection, e.geometry.roomId));
1257
+ return He.value && n(He.value.roomId, He.value.shapeId, void 0, void 0), e;
1258
+ }), He = h(() => {
1259
+ let e = Oe.value;
1260
+ if (!e || F.value) return null;
1261
+ let t = new Set(p.connections.flatMap((e) => [e.fromRoomId, e.toRoomId].join("|")));
1262
+ return p.rooms.some((n) => n.levelId !== e.levelId && !t.has([e.roomId, n.roomId].join("|")) && !t.has([n.roomId, e.roomId].join("|"))) ? {
1263
+ roomId: e.roomId,
1264
+ shapeId: e.id
1265
+ } : null;
1266
+ }), We = h(() => {
1267
+ let e = ne.value?.getBoundingClientRect(), t = e?.width ?? 0, n = e?.height ?? 0;
1268
+ return {
1269
+ left: -Ce.value.x / P.value,
1270
+ top: -Ce.value.y / P.value,
1271
+ right: (t - Ce.value.x) / P.value,
1272
+ bottom: (n - Ce.value.y) / P.value
1273
+ };
1274
+ }), Ge = h(() => new Set(Ee.value.filter((e) => Se.value.has(e.id)).map((e) => e.roomId)));
1275
+ function Ke(e, t) {
1276
+ switch (t) {
1277
+ case "object":
1278
+ case "classifier": {
1279
+ let t = e.getProperty("labels");
1280
+ return Array.isArray(t) && t.length ? t : ["other"];
1281
+ }
1282
+ case "face": return ["face"];
1283
+ case "licensePlate": return ["license_plate"];
1284
+ case "motion":
1285
+ case "audio": return ["motion"];
1286
+ case "clip":
1287
+ case "objectAssist": return [];
1288
+ default: return ["other"];
1289
+ }
1290
+ }
1291
+ function qe(e) {
1292
+ return Se.value.get(e)?.level;
1293
+ }
1294
+ function Je(e) {
1295
+ return Se.value.get(e.id)?.labels ?? [];
1296
+ }
1297
+ function Ye(e) {
1298
+ let t = (8 + Je(e).length * 17) / P.value;
1299
+ return {
1300
+ width: t + it(e.name) - 10 / P.value,
1301
+ textOffset: t
1302
+ };
1303
+ }
1304
+ function Xe(e, t) {
1305
+ ce.value = t.id, e.pointerType === "mouse" && S("hover-sensor", {
1306
+ sensorId: t.id,
1307
+ x: e.clientX,
1308
+ y: e.clientY
1309
+ });
1310
+ }
1311
+ function Ze() {
1312
+ ce.value = null, S("hover-sensor", null);
1313
+ }
1314
+ function Qe(e) {
1315
+ return be.value.find((t) => t.id === e);
1316
+ }
1317
+ function $e(e) {
1318
+ return ue(e.sensorType, Te(Qe(e.id)));
1319
+ }
1320
+ function U(e) {
1321
+ let t = oe(Qe(e.id));
1322
+ return t ? `${e.name} · ${t}` : e.name;
1323
+ }
1324
+ function W(e, t) {
1325
+ let n = e.fromRoomId === t ? e.toRoomId : e.fromRoomId, r = p.rooms.find((e) => e.roomId === t)?.levelId, i = p.rooms.find((e) => e.roomId === n)?.levelId;
1326
+ if (!r || !i) return;
1327
+ let a = p.levels.findIndex((e) => e.id === r), o = p.levels.findIndex((e) => e.id === i);
1328
+ if (!(a < 0 || o < 0 || a === o)) return o > a ? "↑" : "↓";
1329
+ }
1330
+ function et(e, t) {
1331
+ if (t.connectionId) return xt(e, t.connectionId);
1332
+ S("request-stairs", {
1333
+ roomId: t.roomId,
1334
+ event: e
1335
+ });
1336
+ }
1337
+ function tt(e) {
1338
+ let t = Ne.value.get(e.roomId);
1339
+ return t ? [t] : [];
1340
+ }
1341
+ function G(e) {
1342
+ let t = e.width >= e.height, n = t ? e.width : e.height, r = t ? e.height : e.width, i = 9 / P.value, a = Math.max(Math.min(15, r * .3), i);
1343
+ if (a > r) return null;
1344
+ let o = n - a, s = a * ot, c = e.name;
1345
+ if (s * c.length > o) {
1346
+ let e = Math.floor(o / s) - 1;
1347
+ if (e < 2) return null;
1348
+ c = `${c.slice(0, e)}…`;
1349
+ }
1350
+ return {
1351
+ text: c,
1352
+ size: a,
1353
+ x: e.x + e.width / 2,
1354
+ y: e.y + e.height / 2 + a * .35,
1355
+ upright: t
1356
+ };
1357
+ }
1358
+ function nt(e, t) {
1359
+ e.pointerType === "mouse" && (ae.value = t.id, S("hover-camera", {
1360
+ cameraId: t.id,
1361
+ x: e.clientX,
1362
+ y: e.clientY
1363
+ }));
1364
+ }
1365
+ function rt() {
1366
+ ae.value = null, S("hover-camera", null);
1367
+ }
1368
+ function it(e) {
1369
+ return (e.length * 7 + 20) / P.value;
1370
+ }
1371
+ function at(e, t) {
1372
+ let n = 4 / P.value;
1373
+ return `M ${e - n * 2} ${t + n * 1.5} L ${e - n} ${t + n * 1.5} L ${e - n} ${t} L ${e + n} ${t} L ${e + n} ${t - n * 1.5} L ${e + n * 2} ${t - n * 1.5}`;
1374
+ }
1375
+ function ct(e) {
1376
+ return e * Math.PI / 180;
1377
+ }
1378
+ function J(e, t) {
1379
+ return p.selection?.kind === e && p.selection.id === t;
1380
+ }
1381
+ function dt(e) {
1382
+ let t = ct(e.fov / 2), n = Math.cos(-t) * e.range, r = Math.sin(-t) * e.range, i = Math.cos(t) * e.range, a = Math.sin(t) * e.range, o = +(e.fov > 180);
1383
+ return `M 0 0 L ${n} ${r} A ${e.range} ${e.range} 0 ${o} 1 ${i} ${a} Z`;
1384
+ }
1385
+ function gt(e) {
1386
+ let t = ne.value?.getBoundingClientRect();
1387
+ return t ? {
1388
+ x: (e.clientX - t.left - Ce.value.x) / P.value,
1389
+ y: (e.clientY - t.top - Ce.value.y) / P.value
1390
+ } : {
1391
+ x: 0,
1392
+ y: 0
1393
+ };
1394
+ }
1395
+ function Y(e) {
1396
+ return Math.round(e / 10) * 10;
1397
+ }
1398
+ function _t(e, t) {
1399
+ return I.value.some((n) => n.id !== t && e.x < n.x + n.width && e.x + e.width > n.x && e.y < n.y + n.height && e.y + e.height > n.y);
1400
+ }
1401
+ function vt(e, t, n) {
1402
+ let r = 10 / P.value, i = n === "end" ? [e.x + e.width] : [e.x, e.x + e.width], a = n === "end" ? [e.y + e.height] : [e.y, e.y + e.height], o, s;
1403
+ for (let e of I.value) if (e.id !== t) {
1404
+ for (let t of i) for (let n of [e.x, e.x + e.width]) {
1405
+ let e = n - t;
1406
+ Math.abs(e) <= r && (o === void 0 || Math.abs(e) < Math.abs(o)) && (o = e);
1407
+ }
1408
+ for (let t of a) for (let n of [e.y, e.y + e.height]) {
1409
+ let e = n - t;
1410
+ Math.abs(e) <= r && (s === void 0 || Math.abs(e) < Math.abs(s)) && (s = e);
1411
+ }
1412
+ }
1413
+ return O.value = {
1414
+ x: o === void 0 ? null : (n === "end" ? e.x + e.width : e.x) + o,
1415
+ y: s === void 0 ? null : (n === "end" ? e.y + e.height : e.y) + s
1416
+ }, n === "end" ? {
1417
+ ...e,
1418
+ width: e.width + (o ?? 0),
1419
+ height: e.height + (s ?? 0)
1420
+ } : {
1421
+ ...e,
1422
+ x: e.x + (o ?? 0),
1423
+ y: e.y + (s ?? 0)
1424
+ };
1425
+ }
1426
+ function yt(e, t, n) {
1427
+ return Math.min(Math.max(e, t), n);
1428
+ }
1429
+ function X(e, t, n) {
1430
+ let r = Pe.value.get(e);
1431
+ if (!r?.length || r.some((e) => t >= e.x && t <= e.x + e.width && n >= e.y && n <= e.y + e.height)) return {
1432
+ x: t,
1433
+ y: n
1434
+ };
1435
+ let i = {
1436
+ x: t,
1437
+ y: n
1438
+ }, a = Infinity;
1439
+ for (let e of r) {
1440
+ let r = {
1441
+ x: yt(t, e.x, e.x + e.width),
1442
+ y: yt(n, e.y, e.y + e.height)
1443
+ }, o = Math.hypot(r.x - t, r.y - n);
1444
+ o < a && (a = o, i = r);
1445
+ }
1446
+ return i;
1447
+ }
1448
+ function bt(e) {
1449
+ return Ee.value.filter((t) => t.roomId === e);
1450
+ }
1451
+ function Z(e) {
1452
+ ne.value?.setPointerCapture?.(e.pointerId);
1453
+ }
1454
+ function xt(e, t) {
1455
+ Pt(e, {
1456
+ kind: "connection",
1457
+ id: t
1458
+ });
1459
+ }
1460
+ function St(e, t) {
1461
+ if (Pt(e, {
1462
+ kind: "room",
1463
+ id: t.id
1464
+ }), F.value) return;
1465
+ e.stopPropagation();
1466
+ let n = gt(e);
1467
+ k = {
1468
+ mode: "room",
1469
+ id: t.id,
1470
+ offsetX: n.x - t.x,
1471
+ offsetY: n.y - t.y
1472
+ }, Z(e);
1473
+ }
1474
+ function Ct(e, t) {
1475
+ S("select", {
1476
+ kind: "room",
1477
+ id: t.id
1478
+ }), !F.value && (e.stopPropagation(), le.value = t.id, k = {
1479
+ mode: "resize",
1480
+ id: t.id,
1481
+ originX: t.x,
1482
+ originY: t.y
1483
+ }, Z(e));
1484
+ }
1485
+ function wt(e, t) {
1486
+ if (Pt(e, {
1487
+ kind: "camera",
1488
+ id: t.id
1489
+ }), F.value) return;
1490
+ e.stopPropagation();
1491
+ let n = gt(e);
1492
+ k = {
1493
+ mode: "camera",
1494
+ id: t.id,
1495
+ offsetX: n.x - t.x,
1496
+ offsetY: n.y - t.y
1497
+ }, Z(e);
1498
+ }
1499
+ function Tt(e, t) {
1500
+ S("select", {
1501
+ kind: "camera",
1502
+ id: t.id
1503
+ }), !F.value && (e.stopPropagation(), k = {
1504
+ mode: "rotate",
1505
+ id: t.id
1506
+ }, Z(e));
1507
+ }
1508
+ function Et(e) {
1509
+ if (!k) return;
1510
+ if (k.mode === "north") {
1511
+ let t = ie.value?.getBoundingClientRect();
1512
+ if (!t) return;
1513
+ let n = Math.atan2(e.clientY - (t.top + t.height / 2), e.clientX - (t.left + t.width / 2)) * 180 / Math.PI;
1514
+ S("update-north", Math.round((n + 450) % 360));
1515
+ return;
1516
+ }
1517
+ me || (me = !0, S("history"));
1518
+ let t = gt(e);
1519
+ if (k.mode === "room") {
1520
+ let e = k.id, n = I.value.find((t) => t.id === e);
1521
+ if (!n) return;
1522
+ let r = vt({
1523
+ x: Y(t.x - k.offsetX),
1524
+ y: Y(t.y - k.offsetY),
1525
+ width: n.width,
1526
+ height: n.height
1527
+ }, n.id, "both"), i = _t(n, n.id) ? {
1528
+ x: r.x,
1529
+ y: r.y
1530
+ } : Dt(n, r);
1531
+ i && S("move-room", {
1532
+ id: n.id,
1533
+ x: i.x,
1534
+ y: i.y
1535
+ });
1536
+ return;
1537
+ }
1538
+ if (k.mode === "resize") {
1539
+ let e = k.id, n = I.value.find((t) => t.id === e);
1540
+ if (!n) return;
1541
+ let r = vt({
1542
+ x: n.x,
1543
+ y: n.y,
1544
+ width: Math.max(60, Y(t.x - k.originX)),
1545
+ height: Math.max(60, Y(t.y - k.originY))
1546
+ }, n.id, "end"), i = _t({
1547
+ ...r,
1548
+ height: n.height
1549
+ }, n.id) ? n.width : Math.max(60, r.width), a = _t({
1550
+ ...r,
1551
+ width: i
1552
+ }, n.id) ? n.height : Math.max(60, r.height);
1553
+ S("resize-room", {
1554
+ id: n.id,
1555
+ width: i,
1556
+ height: a
1557
+ });
1558
+ return;
1559
+ }
1560
+ if (k.mode === "passage") {
1561
+ let e = k, n = p.connections.find((t) => t.id === e.id);
1562
+ if (!n) return;
1563
+ let r = pt(e.wall, n.offset, n.width), i = Nt(e.wall, {
1564
+ x: (r.x1 + r.x2) / 2,
1565
+ y: (r.y1 + r.y2) / 2
1566
+ }), a = Nt(e.wall, t);
1567
+ S("move-connection", {
1568
+ id: e.id,
1569
+ offset: Math.round(i + (a - e.grab))
1570
+ }), e.grab = a;
1571
+ return;
1572
+ }
1573
+ if (k.mode === "passage-resize") {
1574
+ let e = k, n = p.connections.find((t) => t.id === e.id);
1575
+ if (!n) return;
1576
+ let r = pt(e.wall, n.offset, n.width), i = Nt(e.wall, e.end === 0 ? {
1577
+ x: r.x2,
1578
+ y: r.y2
1579
+ } : {
1580
+ x: r.x1,
1581
+ y: r.y1
1582
+ }), a = Math.min(Math.max(Nt(e.wall, t), 0), e.wall.length), o = Math.min(Math.max(Math.abs(a - i), q.min), q.max), s = a < i ? i - o : i;
1583
+ S("resize-connection", {
1584
+ id: e.id,
1585
+ offset: Math.round(s + o / 2),
1586
+ width: Math.round(o)
1587
+ });
1588
+ return;
1589
+ }
1590
+ if (k.mode === "sensor") {
1591
+ let e = k.id, n = X(xe.value.find((t) => t.id === e)?.roomId ?? "", Y(t.x - k.offsetX), Y(t.y - k.offsetY));
1592
+ S("move-sensor", {
1593
+ id: e,
1594
+ ...n
1595
+ });
1596
+ return;
1597
+ }
1598
+ if (k.mode === "camera") {
1599
+ let e = k.id, n = X(Ee.value.find((t) => t.id === e)?.roomId ?? "", Y(t.x - k.offsetX), Y(t.y - k.offsetY));
1600
+ S("move-camera", {
1601
+ id: e,
1602
+ ...n
1603
+ });
1604
+ return;
1605
+ }
1606
+ let n = k.id, r = Ee.value.find((e) => e.id === n);
1607
+ if (!r) return;
1608
+ let i = t.x - r.x, a = t.y - r.y;
1609
+ S("rotate-camera", {
1610
+ id: n,
1611
+ rotation: Math.round(Math.atan2(a, i) * 180 / Math.PI),
1612
+ range: Math.round(yt(Math.hypot(i, a), K.min, K.max))
1613
+ });
1614
+ }
1615
+ function Dt(e, t) {
1616
+ for (let n of [
1617
+ t,
1618
+ {
1619
+ ...t,
1620
+ y: e.y
1621
+ },
1622
+ {
1623
+ ...t,
1624
+ x: e.x
1625
+ }
1626
+ ]) if (!_t(n, e.id)) return {
1627
+ x: n.x,
1628
+ y: n.y
1629
+ };
1630
+ }
1631
+ function Ot(e) {
1632
+ F.value || (e.stopPropagation(), S("history"), k = { mode: "north" }, ie.value?.setPointerCapture?.(e.pointerId));
1633
+ }
1634
+ function kt(e) {
1635
+ let t = e.dataTransfer?.getData(lt);
1636
+ if (!t || p.readOnly) return;
1637
+ e.preventDefault();
1638
+ let n = JSON.parse(t), r = ne.value?.getBoundingClientRect();
1639
+ r && S("drop", {
1640
+ ...n,
1641
+ x: Y((e.clientX - r.left - Ce.value.x) / P.value),
1642
+ y: Y((e.clientY - r.top - Ce.value.y) / P.value)
1643
+ });
1644
+ }
1645
+ function At(e, t) {
1646
+ if (Pt(e, {
1647
+ kind: "sensor",
1648
+ id: t.id
1649
+ }), F.value) return;
1650
+ e.stopPropagation();
1651
+ let n = gt(e);
1652
+ k = {
1653
+ mode: "sensor",
1654
+ id: t.id,
1655
+ offsetX: n.x - t.x,
1656
+ offsetY: n.y - t.y
1657
+ }, Z(e);
1658
+ }
1659
+ function jt(e, t) {
1660
+ Pt(e, {
1661
+ kind: "connection",
1662
+ id: t.id
1663
+ }), !F.value && (e.stopPropagation(), k = {
1664
+ mode: "passage",
1665
+ id: t.id,
1666
+ wall: t.wall,
1667
+ grab: Nt(t.wall, gt(e))
1668
+ }, Z(e));
1669
+ }
1670
+ function Mt(e, t, n) {
1671
+ F.value || (e.stopPropagation(), k = {
1672
+ mode: "passage-resize",
1673
+ id: t.id,
1674
+ wall: t.wall,
1675
+ end: n
1676
+ }, Z(e));
1677
+ }
1678
+ function Nt(e, t) {
1679
+ return (t.x - e.x) * e.stepX + (t.y - e.y) * e.stepY;
1680
+ }
1681
+ function Pt(e, t) {
1682
+ A = {
1683
+ target: t,
1684
+ x: e.clientX,
1685
+ y: e.clientY
1686
+ };
1687
+ }
1688
+ function Ft(e) {
1689
+ le.value = null, A &&= (e && Math.abs(e.clientX - A.x) < 4 && Math.abs(e.clientY - A.y) < 4 && S("select", A.target), null), k?.mode === "room" && me && S("settle-room", k.id), k = null, me = !1, O.value = {
1690
+ x: null,
1691
+ y: null
1692
+ };
1693
+ }
1694
+ function It() {
1695
+ let e = [], t = [];
1696
+ for (let n of I.value) e.push(n.x, n.x + n.width), t.push(n.y, n.y + n.height);
1697
+ for (let n of Ee.value) e.push(n.x - Mr, n.x + Mr), t.push(n.y - Mr, n.y + Mr);
1698
+ if (!e.length) return;
1699
+ let n = Math.min(...e), r = Math.min(...t);
1700
+ ve({
1701
+ x: n,
1702
+ y: r,
1703
+ width: Math.max(Math.max(...e) - n, 1),
1704
+ height: Math.max(Math.max(...t) - r, 1)
1705
+ }, { padding: .15 });
1706
+ }
1707
+ return ee(() => p.levelId, () => o(It)), re(() => {
1708
+ window.addEventListener("pointerup", Ft), o(It);
1709
+ }), t(() => window.removeEventListener("pointerup", Ft)), l({ fit: It }), (t, o) => {
1710
+ let l = Ue, f = H, p = Sn, h = fe, ee = yn, te = _e, w = D;
1711
+ return r(), _("div", {
1712
+ ref_key: "wrapperRef",
1713
+ ref: ne,
1714
+ class: s(["floorplan-canvas relative w-full h-full overflow-hidden border-left-color border-bottom-color border-right-color rounded-b-xl", { "rounded-none! border-0!": a.mobile }]),
1715
+ onPointermove: Et,
1716
+ onPointerup: Ft,
1717
+ onPointercancel: Ft,
1718
+ onDrop: kt,
1719
+ onDragover: o[14] ||= e(() => {}, ["prevent"]),
1720
+ onDragenter: o[15] ||= e(() => {}, ["prevent"])
1721
+ }, [
1722
+ T(m(z), {
1723
+ nodes: De,
1724
+ "nodes-draggable": !1,
1725
+ "nodes-connectable": !1,
1726
+ "elements-selectable": !1,
1727
+ "zoom-on-double-click": !1,
1728
+ "min-zoom": m(st).min,
1729
+ "max-zoom": m(st).max,
1730
+ "default-viewport": {
1731
+ x: 0,
1732
+ y: 0,
1733
+ zoom: 1
1734
+ },
1735
+ class: "floorplan-flow",
1736
+ onPaneClick: o[3] ||= (e) => S("select", null)
1737
+ }, {
1738
+ "node-scene": g(() => [(r(), _("svg", {
1739
+ class: "floorplan-scene",
1740
+ style: v({
1741
+ left: `${m(L).x}px`,
1742
+ top: `${m(L).y}px`,
1743
+ width: `${m(L).width}px`,
1744
+ height: `${m(L).height}px`
1745
+ })
1746
+ }, [b("defs", null, [
1747
+ b("pattern", {
1748
+ id: "floorplan-public",
1749
+ width: 14 / m(P),
1750
+ height: 14 / m(P),
1751
+ patternUnits: "userSpaceOnUse",
1752
+ patternTransform: "rotate(45)"
1753
+ }, [b("rect", {
1754
+ width: 14 / m(P),
1755
+ height: 14 / m(P),
1756
+ class: "public-base"
1757
+ }, null, 8, wn), b("line", {
1758
+ x1: "0",
1759
+ y1: "0",
1760
+ x2: "0",
1761
+ y2: 14 / m(P),
1762
+ class: "public-hatch",
1763
+ "stroke-width": 1.5 / m(P)
1764
+ }, null, 8, Tn)], 8, Cn),
1765
+ (r(!0), _(y, null, n(m(Le), (e) => (r(), _("clipPath", {
1766
+ id: `floorplan-sight-${e.roomId}`,
1767
+ key: e.roomId
1768
+ }, [b("path", { d: e.path }, null, 8, Dn)], 8, En))), 128)),
1769
+ b("pattern", {
1770
+ id: "floorplan-gaps-hatch",
1771
+ width: 10 / m(P),
1772
+ height: 10 / m(P),
1773
+ patternUnits: "userSpaceOnUse",
1774
+ patternTransform: "rotate(-45)"
1775
+ }, [b("line", {
1776
+ x1: "0",
1777
+ y1: "0",
1778
+ x2: "0",
1779
+ y2: 10 / m(P),
1780
+ class: "gaps-hatch",
1781
+ "stroke-width": 1.5 / m(P)
1782
+ }, null, 8, kn)], 8, On),
1783
+ m(E) ? (r(), _("mask", {
1784
+ key: 0,
1785
+ id: "floorplan-gaps",
1786
+ maskUnits: "userSpaceOnUse",
1787
+ x: m(L).x,
1788
+ y: m(L).y,
1789
+ width: m(L).width,
1790
+ height: m(L).height
1791
+ }, [(r(!0), _(y, null, n(m(Ie), (e) => (r(), _(y, { key: `gap-room-${e.roomId}` }, [e.publicSpace ? d("", !0) : (r(), _("path", {
1792
+ key: 0,
1793
+ d: e.fill,
1794
+ fill: "white"
1795
+ }, null, 8, jn))], 64))), 128)), (r(!0), _(y, null, n(m(Le), (e) => (r(), _("g", {
1796
+ key: `gap-sight-${e.roomId}`,
1797
+ "clip-path": `url(#floorplan-sight-${e.roomId})`
1798
+ }, [(r(!0), _(y, null, n(bt(e.roomId), (e) => (r(), _("path", {
1799
+ key: `gap-cone-${e.id}`,
1800
+ d: dt(e),
1801
+ fill: "black",
1802
+ transform: `translate(${e.x} ${e.y}) rotate(${e.rotation})`
1803
+ }, null, 8, Nn))), 128))], 8, Mn))), 128))], 8, An)) : d("", !0)
1804
+ ]), b("g", { transform: `translate(${-m(L).x} ${-m(L).y})` }, [
1805
+ (r(!0), _(y, null, n(m(Ie), (e) => (r(), _("g", { key: e.roomId }, [b("path", {
1806
+ d: e.fill,
1807
+ class: s(["room", {
1808
+ "room-outdoor": e.outdoor && !e.publicSpace,
1809
+ "room-public": e.publicSpace,
1810
+ "room-active": m(Ge).has(e.roomId)
1811
+ }])
1812
+ }, null, 10, Fn), b("path", {
1813
+ d: e.wall,
1814
+ class: s(["room-wall", {
1815
+ "room-selected": e.selected,
1816
+ "room-public-wall": e.publicSpace
1817
+ }]),
1818
+ "stroke-width": (e.selected ? 2.5 : 1.5) / m(P)
1819
+ }, null, 10, In)]))), 128)),
1820
+ (r(!0), _(y, null, n(m(Le), (e) => (r(), _("g", {
1821
+ key: `sight-${e.roomId}`,
1822
+ "clip-path": `url(#floorplan-sight-${e.roomId})`
1823
+ }, [(r(!0), _(y, null, n(bt(e.roomId), (e) => (r(), _("path", {
1824
+ key: e.id,
1825
+ d: dt(e),
1826
+ class: s(["cone", [`cone-${qe(e.id) ?? "idle"}`, { "cone-selected": J("camera", e.id) }]]),
1827
+ transform: `translate(${e.x} ${e.y}) rotate(${e.rotation})`
1828
+ }, null, 10, Rn))), 128))], 8, Ln))), 128)),
1829
+ m(E) ? (r(), _("rect", {
1830
+ key: 0,
1831
+ x: m(L).x,
1832
+ y: m(L).y,
1833
+ width: m(L).width,
1834
+ height: m(L).height,
1835
+ fill: "url(#floorplan-gaps-hatch)",
1836
+ mask: "url(#floorplan-gaps)",
1837
+ class: "gaps-layer"
1838
+ }, null, 8, zn)) : d("", !0),
1839
+ (r(!0), _(y, null, n(m(Ie), (e) => (r(), _("g", { key: `hits-${e.roomId}` }, [(r(!0), _(y, null, n(e.parts, (e) => (r(), _("rect", {
1840
+ key: e.id,
1841
+ x: e.x,
1842
+ y: e.y,
1843
+ width: e.width,
1844
+ height: e.height,
1845
+ class: s(["room-hit", { nopan: !m(F) }]),
1846
+ onPointerdown: (t) => St(t, e)
1847
+ }, null, 42, Bn))), 128)), (r(!0), _(y, null, n(tt(e), (e) => (r(), _("text", {
1848
+ key: e.text,
1849
+ x: e.x,
1850
+ y: e.y,
1851
+ "font-size": e.size,
1852
+ transform: e.upright ? void 0 : `rotate(-90 ${e.x} ${e.y})`,
1853
+ class: "room-label",
1854
+ "text-anchor": "middle"
1855
+ }, i(e.text), 9, Vn))), 128))]))), 128)),
1856
+ (r(!0), _(y, null, n(m(Re), (e) => (r(), _("g", {
1857
+ key: e.id,
1858
+ class: s({ nopan: !m(F) }),
1859
+ onPointerdown: (t) => jt(t, e)
1860
+ }, [
1861
+ b("path", {
1862
+ d: e.line,
1863
+ class: "connection-hit",
1864
+ "stroke-width": 24 / m(P)
1865
+ }, null, 8, Un),
1866
+ b("path", {
1867
+ d: e.line,
1868
+ class: s(["connection", [`connection-${e.type}`, { "connection-selected": J("connection", e.id) }]]),
1869
+ "stroke-width": 7 / m(P)
1870
+ }, null, 10, Wn),
1871
+ (r(!0), _(y, null, n(J("connection", e.id) && !m(F) ? e.handles : [], (t, n) => (r(), _("circle", {
1872
+ key: n,
1873
+ cx: t.x,
1874
+ cy: t.y,
1875
+ r: 7 / m(P),
1876
+ class: "passage-handle nopan",
1877
+ "stroke-width": 2 / m(P),
1878
+ onPointerdown: (t) => Mt(t, e, n)
1879
+ }, null, 40, Gn))), 128))
1880
+ ], 42, Hn))), 128)),
1881
+ (r(!0), _(y, null, n(m(Me), (e) => (r(), _(y, { key: e.connection.id }, [e.geometry.kind === "link" ? (r(), _("path", {
1882
+ key: 0,
1883
+ d: `M ${e.geometry.x1} ${e.geometry.y1} L ${e.geometry.x2} ${e.geometry.y2}`,
1884
+ class: s(["connection connection-stairs", { "connection-selected": J("connection", e.connection.id) }]),
1885
+ "stroke-width": 2 / m(P),
1886
+ onPointerdown: (t) => xt(t, e.connection.id)
1887
+ }, null, 42, Kn)) : d("", !0)], 64))), 128)),
1888
+ (r(!0), _(y, null, n(m(Ee), (e) => (r(), _("g", {
1889
+ key: e.id,
1890
+ class: s({ nopan: !m(F) }),
1891
+ onPointerdown: (t) => wt(t, e),
1892
+ onPointerenter: (t) => nt(t, e),
1893
+ onPointerleave: rt
1894
+ }, [
1895
+ b("circle", {
1896
+ cx: e.x,
1897
+ cy: e.y,
1898
+ r: 13 / m(P),
1899
+ class: s(["camera-body", [`camera-${qe(e.id) ?? "idle"}`, { "camera-selected": J("camera", e.id) }]]),
1900
+ "stroke-width": 2 / m(P)
1901
+ }, null, 10, Jn),
1902
+ b("circle", {
1903
+ cx: e.x,
1904
+ cy: e.y,
1905
+ r: 4 / m(P),
1906
+ class: "camera-lens"
1907
+ }, null, 8, Yn),
1908
+ m(ae) === e.id || J("camera", e.id) || m(Se).has(e.id) ? (r(), _("g", Xn, [
1909
+ b("rect", {
1910
+ x: e.x - Ye(e).width / 2,
1911
+ y: e.y - 42 / m(P),
1912
+ width: Ye(e).width,
1913
+ height: 20 / m(P),
1914
+ rx: 10 / m(P)
1915
+ }, null, 8, Zn),
1916
+ (r(!0), _(y, null, n(Je(e), (t, n) => (r(), _("foreignObject", {
1917
+ key: t,
1918
+ x: e.x - Ye(e).width / 2 + (8 + n * 17) / m(P),
1919
+ y: e.y - 39.5 / m(P),
1920
+ width: 15 / m(P),
1921
+ height: 15 / m(P),
1922
+ class: "chip-glyph"
1923
+ }, [(r(), u(c(m(ye)(t).icon), {
1924
+ width: "100%",
1925
+ height: "100%"
1926
+ }))], 8, Qn))), 128)),
1927
+ b("text", {
1928
+ x: e.x - Ye(e).width / 2 + Ye(e).textOffset,
1929
+ y: e.y - 28 / m(P),
1930
+ "font-size": 12 / m(P)
1931
+ }, i(e.name), 9, $n)
1932
+ ])) : d("", !0)
1933
+ ], 42, qn))), 128)),
1934
+ (r(!0), _(y, null, n(m(ke) ? m(ze) : [], (t) => (r(), _("g", { key: t.roomId }, [b("circle", {
1935
+ cx: t.x,
1936
+ cy: t.y,
1937
+ r: 11 / m(P),
1938
+ class: "connection-ghost nopan",
1939
+ "stroke-width": 1.5 / m(P),
1940
+ onPointerdown: e((e) => S("create-connection", {
1941
+ fromRoomId: t.fromRoomId,
1942
+ toRoomId: t.roomId,
1943
+ fromShapeId: t.fromShapeId,
1944
+ toShapeId: t.shapeId
1945
+ }), ["stop"])
1946
+ }, null, 40, er), b("path", {
1947
+ d: `M ${t.x - 5 / m(P)} ${t.y} L ${t.x + 5 / m(P)} ${t.y} M ${t.x} ${t.y - 5 / m(P)} L ${t.x} ${t.y + 5 / m(P)}`,
1948
+ class: "connection-ghost-plus",
1949
+ "stroke-width": 1.5 / m(P)
1950
+ }, null, 8, tr)]))), 128)),
1951
+ (r(!0), _(y, null, n(m(xe), (e) => (r(), _("g", {
1952
+ key: `sensor-${e.id}`,
1953
+ class: s({ nopan: !m(F) }),
1954
+ onPointerdown: (t) => At(t, e),
1955
+ onPointerenter: (t) => Xe(t, e),
1956
+ onPointerleave: Ze
1957
+ }, [
1958
+ b("circle", {
1959
+ cx: e.x,
1960
+ cy: e.y,
1961
+ r: 11 / m(P),
1962
+ class: s(["sensor-body", { "sensor-selected": J("sensor", e.id) }]),
1963
+ "stroke-width": 2 / m(P)
1964
+ }, null, 10, rr),
1965
+ (r(), _("foreignObject", {
1966
+ x: e.x - 7 / m(P),
1967
+ y: e.y - 7 / m(P),
1968
+ width: 14 / m(P),
1969
+ height: 14 / m(P),
1970
+ class: "sensor-glyph"
1971
+ }, [(r(), u(c(m(he)(e.sensorType, Qe(e.id))), {
1972
+ width: "100%",
1973
+ height: "100%",
1974
+ style: v($e(e))
1975
+ }, null, 8, ["style"]))], 8, ir)),
1976
+ m(ce) === e.id || J("sensor", e.id) ? (r(), _("g", ar, [b("rect", {
1977
+ x: e.x - it(U(e)) / 2,
1978
+ y: e.y - 42 / m(P),
1979
+ width: it(U(e)),
1980
+ height: 20 / m(P),
1981
+ rx: 10 / m(P)
1982
+ }, null, 8, or), b("text", {
1983
+ x: e.x,
1984
+ y: e.y - 28 / m(P),
1985
+ "text-anchor": "middle",
1986
+ "font-size": 12 / m(P)
1987
+ }, i(U(e)), 9, sr)])) : d("", !0)
1988
+ ], 42, nr))), 128)),
1989
+ (r(!0), _(y, null, n(m(Be), (e) => (r(), _("g", {
1990
+ key: e.key,
1991
+ class: "flight-camera",
1992
+ onPointerenter: (t) => se.value = e.key,
1993
+ onPointerleave: o[0] ||= (e) => se.value = null
1994
+ }, [
1995
+ b("circle", {
1996
+ cx: e.x,
1997
+ cy: e.y,
1998
+ r: 11 / m(P),
1999
+ class: "flight-camera-body",
2000
+ "stroke-width": 1.5 / m(P)
2001
+ }, null, 8, lr),
2002
+ b("circle", {
2003
+ cx: e.x,
2004
+ cy: e.y,
2005
+ r: 3.5 / m(P),
2006
+ class: "flight-camera-lens"
2007
+ }, null, 8, ur),
2008
+ m(se) === e.key ? (r(), _("g", dr, [b("rect", {
2009
+ x: e.x - it(e.label) / 2,
2010
+ y: e.y - 42 / m(P),
2011
+ width: it(e.label),
2012
+ height: 20 / m(P),
2013
+ rx: 10 / m(P)
2014
+ }, null, 8, fr), b("text", {
2015
+ x: e.x,
2016
+ y: e.y - 28 / m(P),
2017
+ "text-anchor": "middle",
2018
+ "font-size": 12 / m(P)
2019
+ }, i(e.label), 9, pr)])) : d("", !0)
2020
+ ], 40, cr))), 128)),
2021
+ (r(!0), _(y, null, n(m(Ve), (e) => (r(), _("g", {
2022
+ key: e.key,
2023
+ class: s({ nopan: !m(F) }),
2024
+ onPointerdown: (t) => et(t, e)
2025
+ }, [
2026
+ b("circle", {
2027
+ cx: e.x,
2028
+ cy: e.y,
2029
+ r: 12 / m(P),
2030
+ class: s([e.connectionId ? "connection-badge" : "connection-ghost", { "connection-selected": e.connectionId && J("connection", e.connectionId) }]),
2031
+ "stroke-width": (e.connectionId ? 2 : 1.5) / m(P)
2032
+ }, null, 10, hr),
2033
+ b("path", {
2034
+ d: at(e.x, e.y),
2035
+ class: "badge-glyph",
2036
+ "stroke-width": 1.5 / m(P),
2037
+ fill: "none",
2038
+ "stroke-linejoin": "round"
2039
+ }, null, 8, gr),
2040
+ e.direction ? (r(), _("text", {
2041
+ key: 0,
2042
+ x: e.x + 13 / m(P),
2043
+ y: e.y - 7 / m(P),
2044
+ class: "badge-direction",
2045
+ "font-size": 12 / m(P)
2046
+ }, i(e.direction), 9, _r)) : d("", !0),
2047
+ m(N) ? (r(), _("g", vr, [b("rect", {
2048
+ x: m(N).x - m(N).width / 2,
2049
+ y: m(N).y,
2050
+ width: m(N).width,
2051
+ height: 20 / m(P),
2052
+ rx: 10 / m(P)
2053
+ }, null, 8, yr), b("text", {
2054
+ x: m(N).x,
2055
+ y: m(N).y + 14 / m(P),
2056
+ "text-anchor": "middle",
2057
+ "font-size": 12 / m(P)
2058
+ }, i(m(N).text), 9, br)])) : d("", !0)
2059
+ ], 42, mr))), 128)),
2060
+ m(O).x === null ? d("", !0) : (r(), _("path", {
2061
+ key: 1,
2062
+ d: `M ${m(O).x} ${m(We).top} L ${m(O).x} ${m(We).bottom}`,
2063
+ class: "guide",
2064
+ "stroke-width": 1 / m(P)
2065
+ }, null, 8, xr)),
2066
+ m(O).y === null ? d("", !0) : (r(), _("path", {
2067
+ key: 2,
2068
+ d: `M ${m(We).left} ${m(O).y} L ${m(We).right} ${m(O).y}`,
2069
+ class: "guide",
2070
+ "stroke-width": 1 / m(P)
2071
+ }, null, 8, Sr)),
2072
+ m(Oe) && !m(F) ? (r(), _("rect", {
2073
+ key: 3,
2074
+ x: m(Oe).x + m(Oe).width - 7 / m(P),
2075
+ y: m(Oe).y + m(Oe).height - 7 / m(P),
2076
+ width: 14 / m(P),
2077
+ height: 14 / m(P),
2078
+ rx: 3 / m(P),
2079
+ class: "handle nopan",
2080
+ "stroke-width": 1.5 / m(P),
2081
+ onPointerdown: o[1] ||= (e) => Ct(e, m(Oe))
2082
+ }, null, 40, Cr)) : d("", !0),
2083
+ m(R) && !m(F) ? (r(), _("circle", {
2084
+ key: 4,
2085
+ cx: m(R).x + Math.cos(ct(m(R).rotation)) * m(R).range,
2086
+ cy: m(R).y + Math.sin(ct(m(R).rotation)) * m(R).range,
2087
+ r: 9 / m(P),
2088
+ class: "handle nopan",
2089
+ "stroke-width": 1.5 / m(P),
2090
+ onPointerdown: o[2] ||= (e) => Tt(e, m(R))
2091
+ }, null, 40, wr)) : d("", !0)
2092
+ ], 8, Pn)], 4))]),
2093
+ default: g(() => [T(m(V), {
2094
+ gap: m(16),
2095
+ size: m(1),
2096
+ "pattern-color": "#81818a"
2097
+ }, null, 8, ["gap", "size"])]),
2098
+ _: 1
2099
+ }, 8, ["min-zoom", "max-zoom"]),
2100
+ x((r(), _("div", {
2101
+ ref_key: "compassRef",
2102
+ ref: ie,
2103
+ class: s(["floorplan-compass absolute top-3 right-3", { "cursor-grab active:cursor-grabbing": !m(F) }]),
2104
+ onPointerdown: e(Ot, ["stop"])
2105
+ }, [(r(), _("svg", Tr, [o[17] ||= b("circle", {
2106
+ cx: "23",
2107
+ cy: "23",
2108
+ r: "21",
2109
+ class: "compass-ring",
2110
+ "stroke-width": "1"
2111
+ }, null, -1), b("g", { transform: `rotate(${m(we)} 23 23)` }, [...o[16] ||= [b("path", {
2112
+ d: "M 23 6 L 27 23 L 23 19 L 19 23 Z",
2113
+ class: "compass-needle"
2114
+ }, null, -1), b("text", {
2115
+ x: "23",
2116
+ y: "41",
2117
+ "text-anchor": "middle",
2118
+ class: "compass-label",
2119
+ "font-size": "9"
2120
+ }, "N", -1)]], 8, Er)]))], 34)), [[
2121
+ w,
2122
+ { value: m(F) ? t.$t("views.floorplan.north_reading", { value: m(we) }) : t.$t("views.floorplan.north_hint") },
2123
+ void 0,
2124
+ { left: !0 }
2125
+ ]]),
2126
+ b("div", {
2127
+ class: "absolute left-3 flex flex-col gap-2 items-start",
2128
+ style: v({
2129
+ bottom: `${12 + (a.bottomInset ?? 0)}px`,
2130
+ transition: a.bottomInsetDragging ? "none" : "bottom 0.2s ease-in-out"
2131
+ })
2132
+ }, [b("div", Dr, [
2133
+ x((r(), _("button", {
2134
+ type: "button",
2135
+ class: "control-button",
2136
+ onPointerdown: o[4] ||= e(() => {}, ["stop"]),
2137
+ onClick: o[5] ||= e((e) => m(M)(), ["stop"])
2138
+ }, [T(l, { class: "w-4 h-4" })], 32)), [[
2139
+ w,
2140
+ { value: t.$t("views.floorplan.zoom_in") },
2141
+ void 0,
2142
+ { right: !0 }
2143
+ ]]),
2144
+ x((r(), _("button", {
2145
+ type: "button",
2146
+ class: "control-button",
2147
+ onPointerdown: o[6] ||= e(() => {}, ["stop"]),
2148
+ onClick: o[7] ||= e((e) => m(ge)(), ["stop"])
2149
+ }, [T(f, { class: "w-4 h-4" })], 32)), [[
2150
+ w,
2151
+ { value: t.$t("views.floorplan.zoom_out") },
2152
+ void 0,
2153
+ { right: !0 }
2154
+ ]]),
2155
+ x((r(), _("button", {
2156
+ type: "button",
2157
+ class: "control-button",
2158
+ onPointerdown: o[8] ||= e(() => {}, ["stop"]),
2159
+ onClick: o[9] ||= e((e) => It(), ["stop"])
2160
+ }, [T(p, { class: "w-4 h-4" })], 32)), [[
2161
+ w,
2162
+ { value: t.$t("views.floorplan.fit") },
2163
+ void 0,
2164
+ { right: !0 }
2165
+ ]]),
2166
+ x((r(), _("button", {
2167
+ type: "button",
2168
+ class: s(["control-button", { "control-active": m(C) }]),
2169
+ onPointerdown: o[10] ||= e(() => {}, ["stop"]),
2170
+ onClick: o[11] ||= e((e) => C.value = !m(C), ["stop"])
2171
+ }, [m(C) ? (r(), u(h, {
2172
+ key: 0,
2173
+ class: "w-4 h-4"
2174
+ })) : (r(), u(ee, {
2175
+ key: 1,
2176
+ class: "w-4 h-4"
2177
+ }))], 34)), [[
2178
+ w,
2179
+ { value: m(C) ? t.$t("views.floorplan.unlock") : t.$t("views.floorplan.lock") },
2180
+ void 0,
2181
+ { right: !0 }
2182
+ ]]),
2183
+ x((r(), _("button", {
2184
+ type: "button",
2185
+ class: s(["control-button", { "control-active": m(E) }]),
2186
+ onPointerdown: o[12] ||= e(() => {}, ["stop"]),
2187
+ onClick: o[13] ||= e((e) => E.value = !m(E), ["stop"])
2188
+ }, [T(te, { class: "w-4 h-4" })], 34)), [[
2189
+ w,
2190
+ { value: t.$t("views.floorplan.blind_spots") },
2191
+ void 0,
2192
+ { right: !0 }
2193
+ ]])
2194
+ ]), b("div", Or, [(r(), _("svg", {
2195
+ width: m(je).width,
2196
+ height: "10",
2197
+ class: "shrink-0"
2198
+ }, [b("path", {
2199
+ d: `M 1 1 L 1 9 M 1 5 L ${m(je).width - 1} 5 M ${m(je).width - 1} 1 L ${m(je).width - 1} 9`,
2200
+ class: "scale-line",
2201
+ "stroke-width": "1"
2202
+ }, null, 8, Ar)], 8, kr)), b("span", jr, i(m(je).label), 1)])], 4)
2203
+ ], 34);
2204
+ };
2205
+ }
2206
+ }), [["__scopeId", "data-v-27e461bb"]]), Pr = {
2207
+ viewBox: "0 0 24 24",
2208
+ width: "1.2em",
2209
+ height: "1.2em"
2210
+ };
2211
+ function Fr(e, t) {
2212
+ return r(), _("svg", Pr, [...t[0] ||= [b("path", {
2213
+ fill: "currentColor",
2214
+ d: "M13 19c0-.3 0-.7.1-1H8v-2H6V8h2V6h8v2h2v5.1c.3-.1.7-.1 1-.1s.7 0 1 .1V8h2V2h-6v2H8V2H2v6h2v8H2v6h6v-2h5.1c-.1-.3-.1-.7-.1-1m5-15h2v2h-2zM4 4h2v2H4zm2 16H4v-2h2zm14-5v3h3v2h-3v3h-2v-3h-3v-2h3v-3z"
2215
+ }, null, -1)]]);
2216
+ }
2217
+ var Ir = l({
2218
+ name: "mdi-vector-square-plus",
2219
+ render: Fr
2220
+ }), Lr = {
2221
+ key: 0,
2222
+ class: "text-xs font-semibold text-muted uppercase tracking-wider mb-3"
2223
+ }, Rr = { class: "mb-4" }, zr = { class: "text-xs font-medium text-muted mb-2" }, Br = ["draggable"], Vr = { class: "flex items-center gap-2.5 flex-1 min-w-0 px-3 py-2.5" }, Hr = { class: "flex items-center justify-center w-8 h-8 rounded-lg shrink-0 palette-icon" }, Ur = { class: "text-[13px] font-medium truncate text-color leading-tight" }, Wr = {
2224
+ key: 0,
2225
+ class: "flex flex-col gap-1.5 mt-1.5"
2226
+ }, Gr = [
2227
+ "draggable",
2228
+ "onDragstart",
2229
+ "onClick"
2230
+ ], Kr = { class: "flex items-center gap-2.5 flex-1 min-w-0 px-3 py-2.5" }, qr = { class: "flex items-center justify-center w-8 h-8 rounded-lg shrink-0 palette-icon" }, Jr = { class: "text-[13px] font-medium truncate text-color leading-tight" }, Yr = { class: "mb-4" }, Xr = { class: "text-xs font-medium text-muted mb-2" }, Zr = {
2231
+ key: 0,
2232
+ class: "text-xs text-muted px-1"
2233
+ }, Qr = {
2234
+ key: 1,
2235
+ class: "flex flex-col gap-1.5"
2236
+ }, $r = [
2237
+ "draggable",
2238
+ "onDragstart",
2239
+ "onClick"
2240
+ ], ei = { class: "flex items-center gap-2.5 flex-1 min-w-0 px-3 py-2.5" }, ti = { class: "flex items-center justify-center w-8 h-8 rounded-lg shrink-0 palette-icon" }, ni = { class: "text-[13px] font-medium truncate text-color leading-tight" }, ri = { class: "text-xs font-medium text-muted mb-2" }, ii = {
2241
+ key: 0,
2242
+ class: "text-xs text-muted px-1"
2243
+ }, ai = {
2244
+ key: 1,
2245
+ class: "flex flex-col gap-1.5"
2246
+ }, oi = [
2247
+ "draggable",
2248
+ "onDragstart",
2249
+ "onClick"
2250
+ ], si = { class: "flex items-center gap-2.5 flex-1 min-w-0 px-3 py-2.5" }, ci = { class: "flex items-center justify-center w-8 h-8 rounded-lg shrink-0 palette-icon" }, li = { class: "flex flex-col min-w-0" }, ui = { class: "text-[13px] font-medium truncate text-color leading-tight" }, di = {
2251
+ key: 0,
2252
+ class: "text-[11px] text-muted truncate leading-tight"
2253
+ }, fi = /*#__PURE__*/ ae(/* @__PURE__ */ C({
2254
+ __name: "CuiFloorplanPalette",
2255
+ props: {
2256
+ cameras: {},
2257
+ sensors: {},
2258
+ rooms: {},
2259
+ mode: { default: "drag" },
2260
+ disabled: { type: Boolean }
2261
+ },
2262
+ emits: ["pick"],
2263
+ setup(e, { emit: t }) {
2264
+ let a = e, o = t;
2265
+ function l(e, t, n, r, i) {
2266
+ !a.disabled && e.dataTransfer && (e.dataTransfer.setData(lt, JSON.stringify({
2267
+ kind: t,
2268
+ cameraId: n,
2269
+ roomId: r,
2270
+ sensorId: i?.id,
2271
+ sensorType: i?.sensorType
2272
+ })), e.dataTransfer.effectAllowed = "move");
2273
+ }
2274
+ return (t, a) => {
2275
+ let f = ie, p = nt, h = Ir, ee = He, v = D;
2276
+ return r(), _("div", { class: s(["overflow-y-auto p-3", e.mode === "drag" ? "h-full pb-[var(--cui-bottom-gap)]" : "pb-0"]) }, [
2277
+ e.mode === "drag" ? (r(), _("div", Lr, i(t.$t("views.floorplan.palette")), 1)) : d("", !0),
2278
+ e.disabled ? (r(), u(f, {
2279
+ key: 1,
2280
+ severity: "secondary",
2281
+ variant: "simple",
2282
+ size: "small",
2283
+ class: "cui-input-hint mb-3"
2284
+ }, {
2285
+ default: g(() => [S(i(t.$t("views.floorplan.needs_level")), 1)]),
2286
+ _: 1
2287
+ })) : d("", !0),
2288
+ b("div", Rr, [
2289
+ b("div", zr, i(t.$t("views.floorplan.section_room")), 1),
2290
+ b("div", {
2291
+ class: s(["floorplan-palette-item", [e.mode === "drag" ? "cursor-grab active:cursor-grabbing" : "cursor-pointer", { "palette-disabled": e.disabled }]]),
2292
+ draggable: e.mode === "drag" && !e.disabled,
2293
+ onDragstart: a[0] ||= (e) => l(e, "room"),
2294
+ onClick: a[1] ||= (t) => !e.disabled && o("pick", { kind: "room" })
2295
+ }, [b("div", Vr, [b("div", Hr, [T(p, { class: "w-4 h-4" })]), b("span", Ur, i(t.$t("views.floorplan.new_room")), 1)])], 42, Br),
2296
+ e.rooms.length ? (r(), _("div", Wr, [(r(!0), _(y, null, n(e.rooms, (n) => x((r(), _("div", {
2297
+ key: n.id,
2298
+ class: s(["floorplan-palette-item", [e.mode === "drag" ? "cursor-grab active:cursor-grabbing" : "cursor-pointer", { "palette-disabled": e.disabled }]]),
2299
+ draggable: e.mode === "drag" && !e.disabled,
2300
+ onDragstart: (e) => l(e, "room", void 0, n.id),
2301
+ onClick: (t) => !e.disabled && o("pick", {
2302
+ kind: "room",
2303
+ roomId: n.id
2304
+ })
2305
+ }, [b("div", Kr, [b("div", qr, [T(h, { class: "w-4 h-4" })]), b("span", Jr, i(n.name), 1)])], 42, Gr)), [[
2306
+ v,
2307
+ { value: t.$t("views.floorplan.room_not_drawn") },
2308
+ void 0,
2309
+ { right: !0 }
2310
+ ]])), 128))])) : d("", !0)
2311
+ ]),
2312
+ b("div", Yr, [b("div", Xr, i(t.$t("views.floorplan.section_cameras")), 1), e.cameras.length ? (r(), _("div", Qr, [(r(!0), _(y, null, n(e.cameras, (t) => (r(), _("div", {
2313
+ key: t.id,
2314
+ class: s(["floorplan-palette-item", [e.mode === "drag" ? "cursor-grab active:cursor-grabbing" : "cursor-pointer", { "palette-disabled": e.disabled }]]),
2315
+ draggable: e.mode === "drag" && !e.disabled,
2316
+ onDragstart: (e) => l(e, "camera", t.id),
2317
+ onClick: (n) => !e.disabled && o("pick", {
2318
+ kind: "camera",
2319
+ cameraId: t.id
2320
+ })
2321
+ }, [b("div", ei, [b("div", ti, [T(ee, { class: "w-4 h-4" })]), b("span", ni, i(t.name), 1)])], 42, $r))), 128))])) : (r(), _("span", Zr, i(t.$t("views.floorplan.all_cameras_placed")), 1))]),
2322
+ b("div", null, [b("div", ri, i(t.$t("views.floorplan.section_sensors")), 1), e.sensors.length ? (r(), _("div", ai, [(r(!0), _(y, null, n(e.sensors, (t) => (r(), _("div", {
2323
+ key: t.id,
2324
+ class: s(["floorplan-palette-item", [e.mode === "drag" ? "cursor-grab active:cursor-grabbing" : "cursor-pointer", { "palette-disabled": e.disabled }]]),
2325
+ draggable: e.mode === "drag" && !e.disabled,
2326
+ onDragstart: (e) => l(e, "sensor", void 0, void 0, t),
2327
+ onClick: (n) => !e.disabled && o("pick", {
2328
+ kind: "sensor",
2329
+ sensorId: t.id,
2330
+ sensorType: t.sensorType
2331
+ })
2332
+ }, [b("div", si, [b("div", ci, [(r(), u(c(m(he)(t.sensorType, void 0)), { class: "w-4 h-4" }))]), b("div", li, [b("span", ui, i(t.name), 1), t.subtitle ? (r(), _("span", di, i(t.subtitle), 1)) : d("", !0)])])], 42, oi))), 128))])) : (r(), _("span", ii, i(t.$t("views.floorplan.all_sensors_placed")), 1))])
2333
+ ], 2);
2334
+ };
2335
+ }
2336
+ }), [["__scopeId", "data-v-bc16fdc2"]]), pi = {
2337
+ viewBox: "0 0 24 24",
2338
+ width: "1.2em",
2339
+ height: "1.2em"
2340
+ };
2341
+ function mi(e, t) {
2342
+ return r(), _("svg", pi, [...t[0] ||= [b("path", {
2343
+ fill: "currentColor",
2344
+ d: "m12 18.54l7.37-5.74L21 14.07l-9 7l-9-7l1.62-1.26zM12 16L3 9l9-7l9 7zm0-11.47L6.26 9L12 13.47L17.74 9z"
2345
+ }, null, -1)]]);
2346
+ }
2347
+ var hi = l({
2348
+ name: "mdi-layers-outline",
2349
+ render: mi
2350
+ }), gi = {
2351
+ viewBox: "0 0 24 24",
2352
+ width: "1.2em",
2353
+ height: "1.2em"
2354
+ };
2355
+ function _i(e, t) {
2356
+ return r(), _("svg", gi, [...t[0] ||= [b("path", {
2357
+ fill: "currentColor",
2358
+ d: "M15 5v4h-4v4H7v4H3v3h7v-4h4v-4h4V8h4V5z"
2359
+ }, null, -1)]]);
2360
+ }
2361
+ var vi = l({
2362
+ name: "mdi-stairs",
2363
+ render: _i
2364
+ });
2365
+ //#endregion
2366
+ //#region src/api/routes/floorplan.ts
2367
+ async function yi({ signal: e } = {}) {
2368
+ return (await ge.get("/floorplan", { signal: e })).data;
2369
+ }
2370
+ async function bi(e) {
2371
+ return (await ge.put("/floorplan", e)).data;
2372
+ }
2373
+ //#endregion
2374
+ //#region src/components/CuiDialog/templates/FloorplanLevel/FloorplanLevel.vue?vue&type=script&setup=true&lang.ts
2375
+ var xi = { class: "flex flex-col gap-2 w-full" }, Si = {
2376
+ for: "floorplanLevelName",
2377
+ class: "cui-label"
2378
+ }, Ci = /* @__PURE__ */ C({
2379
+ __name: "FloorplanLevel",
2380
+ props: { name: { default: "" } },
2381
+ setup(e, { expose: t }) {
2382
+ let n = w(e.name);
2383
+ return t({ onConfirm: async () => n.value.trim() || null }), (e, t) => {
2384
+ let a = je;
2385
+ return r(), _("div", xi, [b("label", Si, i(e.$t("components.form.label.name")), 1), T(a, {
2386
+ id: "floorplanLevelName",
2387
+ modelValue: m(n),
2388
+ "onUpdate:modelValue": t[0] ||= (e) => p(n) ? n.value = e : null,
2389
+ class: "w-full",
2390
+ placeholder: e.$t("views.floorplan.level_name_placeholder"),
2391
+ autofocus: ""
2392
+ }, null, 8, ["modelValue", "placeholder"])]);
2393
+ };
2394
+ }
2395
+ }), wi = E({ plan: null }), Ti = null, Ei = null, Di = /* @__PURE__ */ new Set();
2396
+ function Oi() {
2397
+ Ei || (Ti = f(!0), Ti.run(() => {
2398
+ let e = be("/camera.ui");
2399
+ Ei = e, e.on("floorplan-changed", (e) => {
2400
+ wi.plan = e;
2401
+ for (let t of Di) try {
2402
+ t(e);
2403
+ } catch {}
2404
+ });
2405
+ }));
2406
+ }
2407
+ function ki() {
2408
+ function e() {
2409
+ Oi();
2410
+ }
2411
+ function t(e) {
2412
+ return Di.add(e), () => Di.delete(e);
2413
+ }
2414
+ return {
2415
+ plan: h(() => wi.plan),
2416
+ connect: e,
2417
+ onPlan: t
2418
+ };
2419
+ }
2420
+ //#endregion
2421
+ //#region src/views/Floorplan.vue?vue&type=script&setup=true&lang.ts
2422
+ var Ai = { class: "h-full w-full relative overflow-hidden flex flex-col" }, ji = { class: "flex items-center gap-2 px-3 py-2 border-bottom-color card-background min-h-[48px]" }, Mi = {
2423
+ key: 0,
2424
+ class: "flex-1 flex items-center justify-center"
2425
+ }, Ni = {
2426
+ key: 1,
2427
+ class: "flex flex-1 min-h-0"
2428
+ }, Pi = { class: "relative w-6 h-6" }, Fi = { class: "flex items-center gap-2.5" }, Ii = { class: "flex items-center justify-center w-8 h-8 rounded-lg shrink-0 palette-icon" }, Li = { class: "flex-1 min-w-0" }, Ri = { class: "text-sm font-semibold truncate text-color" }, zi = {
2429
+ key: 0,
2430
+ class: "text-[11px] text-muted truncate"
2431
+ }, Bi = { class: "text-xs text-muted truncate" }, Vi = {
2432
+ key: 0,
2433
+ class: "text-xs text-muted"
2434
+ }, Hi = {
2435
+ key: 1,
2436
+ class: "flex flex-col gap-1"
2437
+ }, Ui = { class: "flex items-center justify-center" }, Wi = {
2438
+ key: 0,
2439
+ class: "flex items-center gap-2 pl-3 pr-2 py-1.5"
2440
+ }, Gi = { class: "flex-1 min-w-0 text-sm font-semibold truncate text-color" }, Ki = 50, qi = 92, Ji = /*#__PURE__*/ ae(/* @__PURE__ */ C({
2441
+ __name: "Floorplan",
2442
+ setup(e) {
2443
+ let { t: f } = Oe(), { smBreakpoint: S } = A(), { bottombarHeight: C } = de(), E = I(), ie = ce(), ae = pe(), oe = ki(), ue = new xe(), { sensors: fe } = Ae(), { data: ge } = ue.getCamerasQuery({
2444
+ page: 1,
2445
+ pageSize: -1
2446
+ }), _e = w(), ye = w(), be = w(null), we = w(null), Te = w({
2447
+ x: 0,
2448
+ y: 0
2449
+ }), je = w(null), Me = w({
2450
+ x: 0,
2451
+ y: 0
2452
+ }), Ne = w(), Fe = w(null), Ie = w({
2453
+ x: 0,
2454
+ y: 0
2455
+ }), Le = w(), Re = w(null), Be = w(null), He = w({
2456
+ version: 0,
2457
+ updatedAt: 0,
2458
+ levels: [],
2459
+ rooms: []
2460
+ }), z = w([]), B = w([]), V = w([]), H = w([]), U = w([]), W = w(""), tt = w(null), G = w(null), nt = w(!1), rt = w(!0), it = w(!1), at = w(""), ot = te("sheetRef"), st = w(0), K = w(0), ct = w(!1), q = ne([]), lt = ne([]), J = [
2461
+ {
2462
+ value: R.Disarmed,
2463
+ labelKey: "views.floorplan.security_disarmed"
2464
+ },
2465
+ {
2466
+ value: R.StayArm,
2467
+ labelKey: "views.floorplan.security_stay"
2468
+ },
2469
+ {
2470
+ value: R.AwayArm,
2471
+ labelKey: "views.floorplan.security_away"
2472
+ },
2473
+ {
2474
+ value: R.NightArm,
2475
+ labelKey: "views.floorplan.security_night"
2476
+ }
2477
+ ], ut = 0, dt = !1, mt, ht, gt, Y = L(void 0, "admin"), _t = h(() => Math.max(st.value - qi, 0)), vt = h(() => q.value.length > 0), yt = h(() => lt.value.length > 0), X = h(() => (ge.value?.result ?? []).find((e) => e._id === Be.value)), bt = h(() => z.value.find((e) => e.id === W.value)), Z = h(() => Ft() !== at.value), xt = h(() => new Map((ge.value?.result ?? []).map((e) => [e._id, e.name]))), St = h(() => fe.value.filter((e) => ve.has(String(e.type)))), Ct = h(() => new Map(St.value.map((e) => [e.id, {
2478
+ name: Nt(e),
2479
+ owner: Pt(e)
2480
+ }]))), wt = h(() => {
2481
+ let e = new Set(U.value.map((e) => e.id));
2482
+ return St.value.filter((t) => !e.has(t.id)).map((e) => ({
2483
+ id: e.id,
2484
+ name: Nt(e),
2485
+ subtitle: Pt(e),
2486
+ sensorType: String(e.type)
2487
+ }));
2488
+ }), Tt = h(() => {
2489
+ let e = new Set(B.value.map((e) => e.roomId));
2490
+ return He.value.rooms.filter((t) => !e.has(t.id)).map((e) => ({
2491
+ id: e.id,
2492
+ name: e.name
2493
+ }));
2494
+ }), Et = h(() => {
2495
+ let e = new Set(H.value.map((e) => e.id));
2496
+ return (ge.value?.result ?? []).filter((t) => !e.has(t._id)).map((e) => ({
2497
+ id: e._id,
2498
+ name: e.name
2499
+ }));
2500
+ }), Dt = h(() => S.value || !G.value ? void 0 : "calc(300px + 1.25rem + var(--safe-area-inset-right))"), Ot = h(() => z.value.findIndex((e) => e.id === W.value)), kt = h(() => [...z.value].reverse().map((e) => ({
2501
+ key: e.id,
2502
+ label: e.name,
2503
+ icon: l(hi),
2504
+ active: e.id === W.value,
2505
+ onClick: () => W.value = e.id
2506
+ }))), At = h(() => [
2507
+ {
2508
+ label: f("views.floorplan.undo"),
2509
+ icon: Qe,
2510
+ buttonProps: { disabled: !vt.value },
2511
+ command: zt
2512
+ },
2513
+ {
2514
+ label: f("views.floorplan.redo"),
2515
+ icon: Xe,
2516
+ buttonProps: { disabled: !yt.value },
2517
+ command: Bt
2518
+ },
2519
+ {
2520
+ label: f("views.floorplan.clear_level"),
2521
+ icon: Ze,
2522
+ buttonProps: { disabled: !z.value.length },
2523
+ command: Mn
2524
+ },
2525
+ {
2526
+ label: f("views.floorplan.revert"),
2527
+ icon: We,
2528
+ buttonProps: { disabled: !Z.value },
2529
+ command: In
2530
+ }
2531
+ ]), jt = h(() => {
2532
+ let e = B.value.find((e) => e.roomId === be.value);
2533
+ if (!e) return [];
2534
+ let t = new Set(V.value.flatMap((e) => [e.fromRoomId, e.toRoomId].join("|"))), n = /* @__PURE__ */ new Set();
2535
+ return B.value.filter((r) => r.levelId === e.levelId || n.has(r.roomId) || t.has([e.roomId, r.roomId].join("|")) || t.has([r.roomId, e.roomId].join("|")) ? !1 : (n.add(r.roomId), !0)).map((t) => ({
2536
+ key: t.roomId,
2537
+ label: t.name,
2538
+ description: z.value.find((e) => e.id === t.levelId)?.name,
2539
+ icon: l(vi),
2540
+ onClick: () => mn({
2541
+ fromRoomId: e.roomId,
2542
+ toRoomId: t.roomId
2543
+ })
2544
+ }));
2545
+ }), Mt = h(() => {
2546
+ let e = B.value.filter((e) => e.levelId === W.value);
2547
+ if (!e.length) return {
2548
+ x: 0,
2549
+ y: 0
2550
+ };
2551
+ let t = Math.min(...e.map((e) => e.x)), n = Math.min(...e.map((e) => e.y)), r = Math.max(...e.map((e) => e.x + e.width)), i = Math.max(...e.map((e) => e.y + e.height));
2552
+ return {
2553
+ x: Math.round((t + r) / 2),
2554
+ y: Math.round((n + i) / 2)
2555
+ };
2556
+ });
2557
+ function Nt(e) {
2558
+ return e.displayName.value || e.name;
2559
+ }
2560
+ function Pt(e) {
2561
+ return e.assignedCameraIds.value.map((e) => xt.value.get(e)).filter(Boolean).join(", ");
2562
+ }
2563
+ function Ft() {
2564
+ return JSON.stringify(It());
2565
+ }
2566
+ function It() {
2567
+ return {
2568
+ catalogVersion: He.value.version,
2569
+ north: tt.value,
2570
+ levels: z.value.map((e, t) => ({
2571
+ id: e.id,
2572
+ name: e.name,
2573
+ order: t
2574
+ })),
2575
+ rooms: B.value.map((e) => ({
2576
+ id: e.id,
2577
+ roomId: e.roomId,
2578
+ name: e.name,
2579
+ note: e.note,
2580
+ publicSpace: e.publicSpace,
2581
+ levelId: e.levelId,
2582
+ outdoor: e.outdoor,
2583
+ x: e.x,
2584
+ y: e.y,
2585
+ width: e.width,
2586
+ height: e.height
2587
+ })),
2588
+ connections: V.value.map((e) => ({ ...e })),
2589
+ sensors: U.value.map((e) => ({
2590
+ sensorId: e.id,
2591
+ sensorType: e.sensorType,
2592
+ roomId: e.roomId,
2593
+ connectionId: e.connectionId,
2594
+ note: e.note,
2595
+ x: e.x,
2596
+ y: e.y
2597
+ })),
2598
+ cameras: H.value.map((e) => ({
2599
+ cameraId: e.id,
2600
+ roomId: e.roomId,
2601
+ note: e.note,
2602
+ x: e.x,
2603
+ y: e.y,
2604
+ rotation: e.rotation,
2605
+ fov: e.fov,
2606
+ range: e.range
2607
+ }))
2608
+ };
2609
+ }
2610
+ function Lt(e) {
2611
+ tt.value = e.north, z.value = e.levels.map((e) => ({
2612
+ id: e.id,
2613
+ name: e.name
2614
+ })), B.value = e.rooms.map((e) => ({ ...e }));
2615
+ let t = new Map(B.value.map((e) => [e.roomId, e.levelId]));
2616
+ V.value = e.connections.map((e) => Ht({ ...e })), H.value = e.cameras.map((e) => ({
2617
+ id: e.cameraId,
2618
+ name: xt.value.get(e.cameraId) ?? e.cameraId,
2619
+ levelId: t.get(e.roomId) ?? "",
2620
+ roomId: e.roomId,
2621
+ note: e.note ?? "",
2622
+ x: e.x,
2623
+ y: e.y,
2624
+ rotation: e.rotation,
2625
+ fov: e.fov,
2626
+ range: e.range
2627
+ })), U.value = e.sensors.map((e) => ({
2628
+ id: e.sensorId,
2629
+ name: Ct.value.get(e.sensorId)?.name ?? e.sensorId,
2630
+ owner: Ct.value.get(e.sensorId)?.owner ?? "",
2631
+ sensorType: e.sensorType,
2632
+ levelId: t.get(e.roomId) ?? "",
2633
+ roomId: e.roomId,
2634
+ connectionId: e.connectionId,
2635
+ note: e.note ?? "",
2636
+ x: e.x,
2637
+ y: e.y
2638
+ })), z.value.some((e) => e.id === W.value) || (W.value = z.value[0]?.id ?? ""), G.value = null;
2639
+ }
2640
+ function Rt(e, t) {
2641
+ He.value = t;
2642
+ let n = new Map(t.rooms.map((e) => [e.id, e]));
2643
+ Lt({
2644
+ catalogVersion: t.version,
2645
+ north: e.north,
2646
+ levels: [...t.levels].sort((e, t) => e.order - t.order),
2647
+ rooms: e.rooms.flatMap((e) => {
2648
+ let t = n.get(e.roomId);
2649
+ return t?.levelId ? [{
2650
+ id: e.id,
2651
+ roomId: t.id,
2652
+ name: t.name,
2653
+ note: t.note ?? "",
2654
+ levelId: t.levelId,
2655
+ outdoor: t.outdoor,
2656
+ publicSpace: t.publicSpace ?? !1,
2657
+ x: e.x,
2658
+ y: e.y,
2659
+ width: e.width,
2660
+ height: e.height
2661
+ }] : [];
2662
+ }),
2663
+ connections: e.connections,
2664
+ cameras: e.cameras,
2665
+ sensors: e.sensors ?? []
2666
+ }), at.value = Ft(), q.value = [], lt.value = [];
2667
+ }
2668
+ function Q(e = !1) {
2669
+ let t = Date.now();
2670
+ if (e && t - ut < 600) return;
2671
+ ut = t;
2672
+ let n = [...q.value, Ft()];
2673
+ n.length > Ki && n.shift(), q.value = n, lt.value = [];
2674
+ }
2675
+ function zt() {
2676
+ let e = [...q.value], t = e.pop();
2677
+ t && (lt.value = [...lt.value, Ft()], q.value = e, ut = 0, Lt(JSON.parse(t)));
2678
+ }
2679
+ function Bt() {
2680
+ let e = [...lt.value], t = e.pop();
2681
+ t && (q.value = [...q.value, Ft()], lt.value = e, ut = 0, Lt(JSON.parse(t)));
2682
+ }
2683
+ function Vt(e) {
2684
+ return B.value.find((t) => t.id === e);
2685
+ }
2686
+ function Ht(e) {
2687
+ if (e.width ||= 90, e.offset ??= null, e.note ??= "", e.fromShapeId && e.toShapeId) return e;
2688
+ let t = B.value.filter((t) => t.roomId === e.fromRoomId), n = B.value.filter((t) => t.roomId === e.toRoomId);
2689
+ for (let r of t) for (let t of n) if (ft(r, t)) return {
2690
+ ...e,
2691
+ fromShapeId: r.id,
2692
+ toShapeId: t.id
2693
+ };
2694
+ return {
2695
+ ...e,
2696
+ fromShapeId: t[0]?.id ?? null,
2697
+ toShapeId: n[0]?.id ?? null
2698
+ };
2699
+ }
2700
+ function Ut(e) {
2701
+ return B.value.filter((t) => t.roomId === e);
2702
+ }
2703
+ function Wt(e) {
2704
+ let t = Vt(e);
2705
+ if (!t) return;
2706
+ let n = Ut(t.roomId).filter((e) => e.id !== t.id);
2707
+ if (!n.length || n.some((e) => ft(t, e))) return;
2708
+ let r = new Set(B.value.map((e) => e.name.toLowerCase())), i = t.name;
2709
+ for (let e = 2; r.has(i.toLowerCase()); e++) i = `${t.name} ${e}`;
2710
+ let a = N();
2711
+ for (let e of H.value) e.roomId === t.roomId && yn(t, e) && (e.roomId = a);
2712
+ Object.assign(t, {
2713
+ roomId: a,
2714
+ name: i
2715
+ }), ie.add({
2716
+ severity: "info",
2717
+ detail: f("views.floorplan.room_detached", { name: i }),
2718
+ life: 4e3
2719
+ });
2720
+ }
2721
+ function Gt(e, t) {
2722
+ let n = Ut(t)[0];
2723
+ if (!n) return;
2724
+ let r = e.roomId;
2725
+ Object.assign(e, {
2726
+ roomId: t,
2727
+ name: n.name,
2728
+ note: n.note,
2729
+ levelId: n.levelId,
2730
+ outdoor: n.outdoor,
2731
+ publicSpace: n.publicSpace
2732
+ });
2733
+ for (let n of H.value) n.roomId === r && yn(e, n) && (n.roomId = t);
2734
+ Ut(r).length || (H.value = H.value.filter((e) => e.roomId !== r), V.value = V.value.filter((e) => e.fromRoomId !== r && e.toRoomId !== r));
2735
+ }
2736
+ function Kt(e) {
2737
+ return H.value.find((t) => t.id === e);
2738
+ }
2739
+ function qt({ id: e, x: t, y: n }) {
2740
+ let r = Vt(e);
2741
+ if (!r) return;
2742
+ let i = t - r.x, a = n - r.y;
2743
+ r.x = t, r.y = n;
2744
+ for (let e of H.value) e.roomId === r.roomId && yn(r, e) && (e.x += i, e.y += a);
2745
+ }
2746
+ function Jt({ id: e, width: t, height: n }) {
2747
+ let r = Vt(e);
2748
+ if (r) {
2749
+ r.width = t, r.height = n;
2750
+ for (let e of H.value) e.roomId === r.id && (e.x = Math.min(Math.max(e.x, r.x), r.x + r.width), e.y = Math.min(Math.max(e.y, r.y), r.y + r.height));
2751
+ }
2752
+ }
2753
+ function Yt({ id: e, x: t, y: n }) {
2754
+ let r = Kt(e);
2755
+ r && (r.x = t, r.y = n);
2756
+ }
2757
+ function Xt({ id: e, rotation: t, range: n }) {
2758
+ let r = Kt(e);
2759
+ r && (r.rotation = t, r.range = n);
2760
+ }
2761
+ function Zt({ id: e, patch: t }) {
2762
+ Q(!0);
2763
+ let n = Vt(e);
2764
+ if (!n) return;
2765
+ if (t.roomId && t.roomId !== n.roomId) {
2766
+ Gt(n, t.roomId);
2767
+ return;
2768
+ }
2769
+ let r = {
2770
+ name: t.name,
2771
+ note: t.note,
2772
+ levelId: t.levelId,
2773
+ outdoor: t.outdoor,
2774
+ publicSpace: t.publicSpace
2775
+ }, i = Object.fromEntries(Object.entries(r).filter(([, e]) => e !== void 0));
2776
+ if (Object.assign(n, t), Object.keys(i).length) {
2777
+ for (let e of Ut(n.roomId)) Object.assign(e, i);
2778
+ if (t.levelId) for (let e of H.value) e.roomId === n.roomId && (e.levelId = t.levelId);
2779
+ }
2780
+ }
2781
+ function Qt({ id: e, patch: t }) {
2782
+ Q(!0);
2783
+ let n = Kt(e);
2784
+ if (n && (Object.assign(n, t), t.roomId)) {
2785
+ let e = Ut(t.roomId), r = e.find((e) => yn(e, n)) ?? e[0];
2786
+ r && !yn(r, n) && (n.x = Math.round(r.x + r.width / 2), n.y = Math.round(r.y + r.height / 2), n.levelId = r.levelId);
2787
+ }
2788
+ }
2789
+ function $t({ id: e, x: t, y: n }) {
2790
+ let r = U.value.find((t) => t.id === e);
2791
+ r && Object.assign(r, {
2792
+ x: t,
2793
+ y: n
2794
+ });
2795
+ }
2796
+ function en({ id: e, patch: t }) {
2797
+ Q(!0);
2798
+ let n = U.value.find((t) => t.id === e);
2799
+ n && Object.assign(n, t);
2800
+ }
2801
+ let $ = h(() => U.value.find((e) => e.id === Re.value));
2802
+ function tn(e) {
2803
+ return fe.value.find((t) => t.id === e);
2804
+ }
2805
+ function nn(e) {
2806
+ return Y && !De.has(e);
2807
+ }
2808
+ async function rn(e) {
2809
+ Y && await me(tn(e));
2810
+ }
2811
+ async function an(e, t) {
2812
+ Y && await se(tn(e), t);
2813
+ }
2814
+ function on() {
2815
+ clearTimeout(ht);
2816
+ }
2817
+ function sn() {
2818
+ clearTimeout(ht), ht = setTimeout(() => {
2819
+ Re.value = null, Le.value?.hide();
2820
+ }, 220);
2821
+ }
2822
+ function cn(e) {
2823
+ if (!e) return sn();
2824
+ on(), Re.value = e.sensorId, Ie.value = {
2825
+ x: e.x,
2826
+ y: e.y
2827
+ }, o(() => {
2828
+ Fe.value && Le.value?.show({ currentTarget: Fe.value });
2829
+ });
2830
+ }
2831
+ function ln(e) {
2832
+ if (clearTimeout(mt), !e) {
2833
+ dn();
2834
+ return;
2835
+ }
2836
+ Me.value = {
2837
+ x: e.x,
2838
+ y: e.y
2839
+ }, Be.value = e.cameraId, mt = setTimeout(() => {
2840
+ je.value && Ne.value?.show({ currentTarget: je.value });
2841
+ }, 350);
2842
+ }
2843
+ function un() {
2844
+ clearTimeout(mt);
2845
+ }
2846
+ function dn() {
2847
+ mt = setTimeout(() => {
2848
+ Ne.value?.hide(), Be.value = null;
2849
+ }, 200);
2850
+ }
2851
+ function fn({ roomId: e, event: t }) {
2852
+ be.value = e, Te.value = {
2853
+ x: t.clientX,
2854
+ y: t.clientY
2855
+ }, o(() => ye.value?.toggleMenu(t, we.value));
2856
+ }
2857
+ function pn({ id: e, patch: t }) {
2858
+ Q(!0);
2859
+ let n = V.value.find((t) => t.id === e);
2860
+ n && Object.assign(n, t);
2861
+ }
2862
+ function mn({ fromRoomId: e, toRoomId: t, fromShapeId: n, toShapeId: r }) {
2863
+ Q();
2864
+ let i = B.value.find((e) => e.id === n) ?? Ut(e)[0], a = B.value.find((e) => e.id === r) ?? Ut(t)[0], o = i && a ? ft(i, a) : null, s = {
2865
+ id: N(),
2866
+ fromRoomId: e,
2867
+ toRoomId: t,
2868
+ fromShapeId: i?.id ?? null,
2869
+ toShapeId: a?.id ?? null,
2870
+ offset: o ? hn(o, i?.id, a?.id) : null,
2871
+ width: 90,
2872
+ note: "",
2873
+ type: i && a && i.levelId !== a.levelId ? "stairs" : "door"
2874
+ };
2875
+ V.value.push(s), G.value = {
2876
+ kind: "connection",
2877
+ id: s.id
2878
+ };
2879
+ }
2880
+ function hn(e, t, n) {
2881
+ let r = V.value.filter((e) => e.fromShapeId === t && e.toShapeId === n).map((t) => pt(e, t.offset, t.width)).map((t) => {
2882
+ let n = (t.x1 - e.x) * e.stepX + (t.y1 - e.y) * e.stepY, r = (t.x2 - e.x) * e.stepX + (t.y2 - e.y) * e.stepY;
2883
+ return {
2884
+ start: Math.min(n, r),
2885
+ end: Math.max(n, r)
2886
+ };
2887
+ }).sort((e, t) => e.start - t.start), i = Math.min(90, e.length) / 2, a = 0;
2888
+ for (let e of r) {
2889
+ if (e.start - a >= i * 2) break;
2890
+ a = Math.max(a, e.end);
2891
+ }
2892
+ return Math.round(Math.min(Math.max(a + i, i), e.length - i));
2893
+ }
2894
+ function _n({ id: e, offset: t }) {
2895
+ Q(!0);
2896
+ let n = V.value.find((t) => t.id === e);
2897
+ n && (n.offset = t);
2898
+ }
2899
+ function vn({ id: e, offset: t, width: n }) {
2900
+ Q(!0);
2901
+ let r = V.value.find((t) => t.id === e);
2902
+ r && Object.assign(r, {
2903
+ offset: t,
2904
+ width: n
2905
+ });
2906
+ }
2907
+ function yn(e, t) {
2908
+ return t.x >= e.x && t.x <= e.x + e.width && t.y >= e.y && t.y <= e.y + e.height;
2909
+ }
2910
+ function bn(e) {
2911
+ if (Q(), e.kind === "room") {
2912
+ let t = Vt(e.id);
2913
+ if (!t) return;
2914
+ B.value = B.value.filter((t) => t.id !== e.id), H.value = H.value.filter((e) => e.roomId !== t.roomId || !yn(t, e)), Ut(t.roomId).length || (H.value = H.value.filter((e) => e.roomId !== t.roomId), V.value = V.value.filter((e) => e.fromRoomId !== t.roomId && e.toRoomId !== t.roomId));
2915
+ } else e.kind === "connection" ? V.value = V.value.filter((t) => t.id !== e.id) : e.kind === "sensor" ? U.value = U.value.filter((t) => t.id !== e.id) : H.value = H.value.filter((t) => t.id !== e.id);
2916
+ G.value = null;
2917
+ }
2918
+ function xn(e, t, n) {
2919
+ Q();
2920
+ let r = Sn(Math.round(e - 120), Math.round(t - 100), 240, 200), i = n ? He.value.rooms.find((e) => e.id === n) : void 0, a = {
2921
+ id: N(),
2922
+ roomId: i?.id ?? N(),
2923
+ name: i?.name ?? f("views.floorplan.new_room"),
2924
+ note: i?.note ?? "",
2925
+ publicSpace: i?.publicSpace ?? !1,
2926
+ levelId: W.value,
2927
+ outdoor: i?.outdoor ?? !1,
2928
+ x: r.x,
2929
+ y: r.y,
2930
+ width: 240,
2931
+ height: 200
2932
+ };
2933
+ B.value.push(a), G.value = {
2934
+ kind: "room",
2935
+ id: a.id
2936
+ };
2937
+ }
2938
+ function Sn(e, t, n, r) {
2939
+ let i = B.value.filter((e) => e.levelId === W.value), a = (e, t) => i.some((i) => e < i.x + i.width && e + n > i.x && t < i.y + i.height && t + r > i.y);
2940
+ if (!a(e, t)) return {
2941
+ x: e,
2942
+ y: t
2943
+ };
2944
+ for (let i = 1; i <= 12; i++) for (let [o, s] of [
2945
+ [1, 0],
2946
+ [0, 1],
2947
+ [-1, 0],
2948
+ [0, -1],
2949
+ [1, 1],
2950
+ [-1, 1],
2951
+ [1, -1],
2952
+ [-1, -1]
2953
+ ]) {
2954
+ let c = e + o * i * (n + 20), l = t + s * i * (r + 20);
2955
+ if (!a(c, l)) return {
2956
+ x: c,
2957
+ y: l
2958
+ };
2959
+ }
2960
+ return {
2961
+ x: e,
2962
+ y: t
2963
+ };
2964
+ }
2965
+ function Cn(e, t, n) {
2966
+ let r = B.value.find((e) => e.levelId === W.value && t >= e.x && t <= e.x + e.width && n >= e.y && n <= e.y + e.height);
2967
+ if (!r) return;
2968
+ Q();
2969
+ let i = {
2970
+ id: e,
2971
+ name: xt.value.get(e) ?? e,
2972
+ levelId: W.value,
2973
+ roomId: r.roomId,
2974
+ note: "",
2975
+ x: Math.round(t),
2976
+ y: Math.round(n),
2977
+ rotation: 0,
2978
+ fov: 90,
2979
+ range: 800
2980
+ };
2981
+ H.value.push(i), G.value = {
2982
+ kind: "camera",
2983
+ id: i.id
2984
+ };
2985
+ }
2986
+ function wn(e, t, n, r) {
2987
+ let i = B.value.find((e) => e.levelId === W.value && n >= e.x && n <= e.x + e.width && r >= e.y && r <= e.y + e.height);
2988
+ if (!i) return;
2989
+ Q();
2990
+ let a = {
2991
+ id: e,
2992
+ name: Ct.value.get(e)?.name ?? e,
2993
+ owner: Ct.value.get(e)?.owner ?? "",
2994
+ sensorType: t,
2995
+ levelId: W.value,
2996
+ roomId: i.roomId,
2997
+ connectionId: null,
2998
+ note: "",
2999
+ x: Math.round(n),
3000
+ y: Math.round(r)
3001
+ };
3002
+ U.value.push(a), G.value = {
3003
+ kind: "sensor",
3004
+ id: a.id
3005
+ };
3006
+ }
3007
+ function Tn({ kind: e, cameraId: t, sensorId: n, sensorType: r, roomId: i, x: a, y: o }) {
3008
+ z.value.length && (e === "room" ? xn(a, o, i) : e === "sensor" && n && r ? wn(n, r, a, o) : t && Cn(t, a, o));
3009
+ }
3010
+ function En(e) {
3011
+ Tn({
3012
+ ...e,
3013
+ x: Mt.value.x,
3014
+ y: Mt.value.y
3015
+ });
3016
+ }
3017
+ function Dn(e) {
3018
+ nt.value = !1, En(e);
3019
+ }
3020
+ function On() {
3021
+ E.openComponentDialog(Ci, {
3022
+ data: {
3023
+ title: f("views.floorplan.add_level"),
3024
+ confirmText: f("components.form.button.add"),
3025
+ contentProps: {}
3026
+ },
3027
+ onConfirm: (e) => {
3028
+ if (!e) return;
3029
+ Q();
3030
+ let t = {
3031
+ id: N(),
3032
+ name: e
3033
+ };
3034
+ z.value.push(t), W.value = t.id, G.value = null;
3035
+ }
3036
+ });
3037
+ }
3038
+ function kn() {
3039
+ let e = bt.value;
3040
+ e && E.openComponentDialog(Ci, {
3041
+ data: {
3042
+ title: f("views.floorplan.rename_level"),
3043
+ confirmText: f("components.form.button.save"),
3044
+ contentProps: { name: e.name }
3045
+ },
3046
+ onConfirm: (t) => {
3047
+ t && (Q(), e.name = t);
3048
+ }
3049
+ });
3050
+ }
3051
+ function An() {
3052
+ if (!bt.value) return;
3053
+ Q();
3054
+ let e = W.value, t = new Set(B.value.filter((t) => t.levelId === e).map((e) => e.id));
3055
+ z.value = z.value.filter((t) => t.id !== e), B.value = B.value.filter((t) => t.levelId !== e), H.value = H.value.filter((t) => t.levelId !== e), V.value = V.value.filter((e) => !t.has(e.fromRoomId) && !t.has(e.toRoomId)), W.value = z.value[0]?.id ?? "", G.value = null;
3056
+ }
3057
+ function jn(e) {
3058
+ let t = Ot.value, n = t + e;
3059
+ if (t < 0 || n < 0 || n >= z.value.length) return;
3060
+ Q();
3061
+ let r = [...z.value];
3062
+ [r[t], r[n]] = [r[n], r[t]], z.value = r;
3063
+ }
3064
+ function Mn() {
3065
+ Q();
3066
+ let e = new Set(B.value.filter((e) => e.levelId === W.value).map((e) => e.id));
3067
+ B.value = B.value.filter((e) => e.levelId !== W.value), H.value = H.value.filter((e) => e.levelId !== W.value), V.value = V.value.filter((t) => !e.has(t.fromRoomId) && !e.has(t.toRoomId)), G.value = null;
3068
+ }
3069
+ async function Nn() {
3070
+ it.value = !0;
3071
+ try {
3072
+ Rt(await bi(It()), await $e()), await Pn(), ie.add({
3073
+ severity: "success",
3074
+ detail: f("views.floorplan.saved"),
3075
+ life: 3e3
3076
+ });
3077
+ } catch (e) {
3078
+ ie.add({
3079
+ severity: "error",
3080
+ detail: Se(e),
3081
+ life: 5e3
3082
+ });
3083
+ } finally {
3084
+ it.value = !1;
3085
+ }
3086
+ }
3087
+ async function Pn() {
3088
+ await Promise.all([
3089
+ ue.queryClient.refetchQueries({ queryKey: ["camerasList"] }),
3090
+ ue.queryClient.refetchQueries({ queryKey: ["cameras"] }),
3091
+ ue.queryClient.refetchQueries({
3092
+ queryKey: ["rooms"],
3093
+ exact: !0
3094
+ })
3095
+ ]);
3096
+ }
3097
+ async function Fn() {
3098
+ try {
3099
+ let [e, t] = await Promise.all([yi(), $e()]);
3100
+ Rt(e, t);
3101
+ } catch (e) {
3102
+ ie.add({
3103
+ severity: "error",
3104
+ detail: Se(e),
3105
+ life: 5e3
3106
+ });
3107
+ } finally {
3108
+ rt.value = !1;
3109
+ }
3110
+ }
3111
+ async function In() {
3112
+ await Fn();
3113
+ }
3114
+ function Ln(e) {
3115
+ if (!Y) return;
3116
+ let t = e.target;
3117
+ if (t?.isContentEditable || [
3118
+ "INPUT",
3119
+ "TEXTAREA",
3120
+ "SELECT"
3121
+ ].includes(t?.tagName ?? "")) return;
3122
+ let n = e.metaKey || e.ctrlKey;
3123
+ if (n && e.key.toLowerCase() === "z") {
3124
+ e.preventDefault(), e.shiftKey ? Bt() : zt();
3125
+ return;
3126
+ }
3127
+ if (n && e.key.toLowerCase() === "y") {
3128
+ e.preventDefault(), Bt();
3129
+ return;
3130
+ }
3131
+ (e.key === "Delete" || e.key === "Backspace") && G.value && (e.preventDefault(), bn(G.value));
3132
+ }
3133
+ let Rn = oe.onPlan(async (e) => {
3134
+ Z.value || (Rt(e, await $e()), await Pn());
3135
+ });
3136
+ function zn(e) {
3137
+ let t = e.clientY, n = K.value, r = !1;
3138
+ ct.value = !0, e.currentTarget.setPointerCapture(e.pointerId);
3139
+ let i = (e) => {
3140
+ Math.abs(e.clientY - t) > 3 && (r = !0), K.value = Math.min(Math.max(n + (e.clientY - t), 0), _t.value);
3141
+ }, a = () => {
3142
+ window.removeEventListener("pointermove", i), window.removeEventListener("pointerup", a), window.removeEventListener("pointercancel", a), ct.value = !1, r ? K.value = K.value > _t.value * .35 ? _t.value : 0 : K.value = n > 0 ? 0 : _t.value;
3143
+ };
3144
+ window.addEventListener("pointermove", i), window.addEventListener("pointerup", a), window.addEventListener("pointercancel", a);
3145
+ }
3146
+ return ee(xt, (e) => {
3147
+ for (let t of H.value) t.name = e.get(t.id) ?? t.id;
3148
+ }), ee(Ct, (e) => {
3149
+ for (let t of U.value) t.name = e.get(t.id)?.name ?? t.id, t.owner = e.get(t.id)?.owner ?? "";
3150
+ }), ee(ot, (e) => {
3151
+ if (gt?.disconnect(), !e) {
3152
+ st.value = 0;
3153
+ return;
3154
+ }
3155
+ gt = new ResizeObserver(([e]) => st.value = Math.round(e.contentRect.height)), gt.observe(e);
3156
+ }), ee(() => G.value && `${G.value.kind}:${G.value.id}`, () => K.value = 0), re(() => {
3157
+ oe.connect(), window.addEventListener("keydown", Ln), Fn();
3158
+ }), M((e) => !Z.value || dt ? !0 : (E.openTextDialog({
3159
+ data: {
3160
+ title: f("views.floorplan.unsaved_title"),
3161
+ contentText: f("views.floorplan.unsaved_message"),
3162
+ confirmText: f("views.floorplan.discard")
3163
+ },
3164
+ onConfirm: async () => {
3165
+ dt = !0, ae.push(e.fullPath);
3166
+ }
3167
+ }), !1)), t(() => {
3168
+ clearTimeout(mt), clearTimeout(ht), Rn(), gt?.disconnect(), window.removeEventListener("keydown", Ln);
3169
+ }), (e, t) => {
3170
+ let o = qe, l = ke, f = P, h = hi, ee = O, te = Je, ne = Pe, w = Ke, E = Ge, re = Ue, ie = k, ae = fi, oe = Nr, se = gn, ce = ze, ue = Ye, de = Ve, fe = F, pe = Ce, me = et, A = le, M = D;
3171
+ return r(), _("div", Ai, [
3172
+ T(f, { position: "left" }, {
3173
+ default: g(() => [T(l, {
3174
+ severity: "secondary",
3175
+ text: "",
3176
+ class: "cui-button p-2 text-color non-draggable-region",
3177
+ onClick: t[0] ||= (t) => e.$router.push("/menu")
3178
+ }, {
3179
+ icon: g(() => [T(o, { class: "w-6 h-6" })]),
3180
+ _: 1
3181
+ })]),
3182
+ _: 1
3183
+ }),
3184
+ b("div", ji, [
3185
+ T(l, {
3186
+ severity: "secondary",
3187
+ text: "",
3188
+ class: "cui-button-medium shrink-0",
3189
+ label: m(bt)?.name ?? e.$t("views.floorplan.no_levels"),
3190
+ disabled: !m(z).length,
3191
+ onClick: t[1] ||= (e) => m(_e)?.toggleMenu(e)
3192
+ }, {
3193
+ icon: g(() => [T(h)]),
3194
+ _: 1
3195
+ }, 8, ["label", "disabled"]),
3196
+ t[13] ||= b("div", { class: "flex-1" }, null, -1),
3197
+ m(Y) ? (r(), _(y, { key: 0 }, [
3198
+ x((r(), u(l, {
3199
+ severity: "secondary",
3200
+ text: "",
3201
+ rounded: "",
3202
+ class: "cui-icon-md shrink-0",
3203
+ disabled: m(Ot) < 1,
3204
+ onClick: t[2] ||= (e) => jn(-1)
3205
+ }, {
3206
+ icon: g(() => [T(ee, {
3207
+ width: "100%",
3208
+ height: "100%"
3209
+ })]),
3210
+ _: 1
3211
+ }, 8, ["disabled"])), [[
3212
+ M,
3213
+ { value: e.$t("views.floorplan.level_down") },
3214
+ void 0,
3215
+ { bottom: !0 }
3216
+ ]]),
3217
+ x((r(), u(l, {
3218
+ severity: "secondary",
3219
+ text: "",
3220
+ rounded: "",
3221
+ class: "cui-icon-md shrink-0",
3222
+ disabled: m(Ot) < 0 || m(Ot) >= m(z).length - 1,
3223
+ onClick: t[3] ||= (e) => jn(1)
3224
+ }, {
3225
+ icon: g(() => [T(te, {
3226
+ width: "100%",
3227
+ height: "100%"
3228
+ })]),
3229
+ _: 1
3230
+ }, 8, ["disabled"])), [[
3231
+ M,
3232
+ { value: e.$t("views.floorplan.level_up") },
3233
+ void 0,
3234
+ { bottom: !0 }
3235
+ ]]),
3236
+ T(ne, {
3237
+ layout: "vertical",
3238
+ class: "floorplan-divider"
3239
+ }),
3240
+ x((r(), u(l, {
3241
+ severity: "secondary",
3242
+ text: "",
3243
+ rounded: "",
3244
+ class: "cui-icon-md shrink-0",
3245
+ disabled: !m(z).length,
3246
+ onClick: An
3247
+ }, {
3248
+ icon: g(() => [T(w, {
3249
+ width: "100%",
3250
+ height: "100%"
3251
+ })]),
3252
+ _: 1
3253
+ }, 8, ["disabled"])), [[
3254
+ M,
3255
+ { value: e.$t("views.floorplan.remove_level") },
3256
+ void 0,
3257
+ { bottom: !0 }
3258
+ ]]),
3259
+ x((r(), u(l, {
3260
+ severity: "secondary",
3261
+ text: "",
3262
+ rounded: "",
3263
+ class: "cui-icon-md shrink-0",
3264
+ disabled: !m(z).length,
3265
+ onClick: kn
3266
+ }, {
3267
+ icon: g(() => [T(E, {
3268
+ width: "100%",
3269
+ height: "100%"
3270
+ })]),
3271
+ _: 1
3272
+ }, 8, ["disabled"])), [[
3273
+ M,
3274
+ { value: e.$t("views.floorplan.rename_level") },
3275
+ void 0,
3276
+ { bottom: !0 }
3277
+ ]]),
3278
+ x((r(), u(l, {
3279
+ severity: "secondary",
3280
+ text: "",
3281
+ rounded: "",
3282
+ class: "cui-icon-md shrink-0",
3283
+ onClick: On
3284
+ }, {
3285
+ icon: g(() => [T(re, {
3286
+ width: "100%",
3287
+ height: "100%"
3288
+ })]),
3289
+ _: 1
3290
+ })), [[
3291
+ M,
3292
+ { value: e.$t("views.floorplan.add_level") },
3293
+ void 0,
3294
+ { bottom: !0 }
3295
+ ]])
3296
+ ], 64)) : d("", !0)
3297
+ ]),
3298
+ m(rt) ? (r(), _("div", Mi, [T(ie, {
3299
+ class: "w-[30px] h-[30px] m-0",
3300
+ "stroke-width": "5"
3301
+ })])) : (r(), _("div", Ni, [
3302
+ m(Y) && !m(S) ? (r(), u(ae, {
3303
+ key: 0,
3304
+ cameras: m(Et),
3305
+ sensors: m(wt),
3306
+ rooms: m(Tt),
3307
+ disabled: !m(z).length,
3308
+ class: "w-[240px] shrink-0",
3309
+ onPick: En
3310
+ }, null, 8, [
3311
+ "cameras",
3312
+ "sensors",
3313
+ "rooms",
3314
+ "disabled"
3315
+ ])) : d("", !0),
3316
+ T(oe, {
3317
+ mobile: m(S),
3318
+ "bottom-inset": m(S) && m(G) ? Math.max(m(st) - m(K), 0) : 0,
3319
+ "bottom-inset-dragging": m(ct),
3320
+ levels: m(z),
3321
+ rooms: m(B),
3322
+ connections: m(V),
3323
+ cameras: m(H),
3324
+ sensors: m(U),
3325
+ "level-id": m(W),
3326
+ selection: m(G),
3327
+ "read-only": !m(Y),
3328
+ north: m(tt),
3329
+ class: s(["flex-1 min-w-0", { "mb-[var(--cui-bottom-gap)] h-auto!": !m(S) }]),
3330
+ onSelect: t[4] ||= (e) => G.value = e,
3331
+ onHistory: t[5] ||= (e) => Q(),
3332
+ onCreateConnection: mn,
3333
+ onDrop: Tn,
3334
+ onUpdateNorth: t[6] ||= (e) => tt.value = e,
3335
+ onRequestStairs: fn,
3336
+ onHoverCamera: ln,
3337
+ onMoveRoom: qt,
3338
+ onResizeRoom: Jt,
3339
+ onSettleRoom: Wt,
3340
+ onMoveCamera: Yt,
3341
+ onMoveSensor: $t,
3342
+ onHoverSensor: cn,
3343
+ onRotateCamera: Xt,
3344
+ onMoveConnection: _n,
3345
+ onResizeConnection: vn
3346
+ }, null, 8, [
3347
+ "mobile",
3348
+ "bottom-inset",
3349
+ "bottom-inset-dragging",
3350
+ "levels",
3351
+ "rooms",
3352
+ "connections",
3353
+ "cameras",
3354
+ "sensors",
3355
+ "level-id",
3356
+ "selection",
3357
+ "read-only",
3358
+ "north",
3359
+ "class"
3360
+ ]),
3361
+ m(S) ? d("", !0) : (r(), _("div", {
3362
+ key: 1,
3363
+ class: "shrink-0 overflow-hidden transition-[width] duration-200 ease-in-out",
3364
+ style: v({ width: m(G) ? "300px" : "0px" })
3365
+ }, [m(G) ? (r(), u(se, {
3366
+ key: 0,
3367
+ rooms: m(B),
3368
+ connections: m(V),
3369
+ cameras: m(H),
3370
+ sensors: m(U),
3371
+ levels: m(z),
3372
+ selection: m(G),
3373
+ "read-only": !m(Y),
3374
+ class: "w-[300px]",
3375
+ onClose: t[7] ||= (e) => G.value = null,
3376
+ onUpdateRoom: Zt,
3377
+ onUpdateCamera: Qt,
3378
+ onUpdateSensor: en,
3379
+ onUpdateConnection: pn,
3380
+ onRemove: bn
3381
+ }, null, 8, [
3382
+ "rooms",
3383
+ "connections",
3384
+ "cameras",
3385
+ "sensors",
3386
+ "levels",
3387
+ "selection",
3388
+ "read-only"
3389
+ ])) : d("", !0)], 4))
3390
+ ])),
3391
+ m(S) && m(G) ? (r(), _("div", {
3392
+ key: 2,
3393
+ ref_key: "sheetRef",
3394
+ ref: ot,
3395
+ class: "fixed inset-x-0 z-[16] rounded-t-xl overflow-hidden shadow-lg border-top-color card-background",
3396
+ style: v({
3397
+ bottom: `calc(${m(C)}px + var(--safe-area-inset-bottom))`,
3398
+ transform: `translateY(${m(K)}px)`,
3399
+ transition: m(ct) ? "none" : "transform 0.2s ease-in-out"
3400
+ })
3401
+ }, [b("div", {
3402
+ class: "flex justify-center py-2 cursor-grab active:cursor-grabbing sheet-grip",
3403
+ onPointerdown: zn
3404
+ }, [...t[14] ||= [b("div", { class: "w-10 h-1 rounded-full sheet-grip-bar" }, null, -1)]], 32), T(se, {
3405
+ rooms: m(B),
3406
+ connections: m(V),
3407
+ cameras: m(H),
3408
+ sensors: m(U),
3409
+ levels: m(z),
3410
+ selection: m(G),
3411
+ "read-only": !m(Y),
3412
+ fluid: "",
3413
+ class: "max-h-[55vh]",
3414
+ onClose: t[8] ||= (e) => G.value = null,
3415
+ onUpdateRoom: Zt,
3416
+ onUpdateCamera: Qt,
3417
+ onUpdateSensor: en,
3418
+ onUpdateConnection: pn,
3419
+ onRemove: bn
3420
+ }, null, 8, [
3421
+ "rooms",
3422
+ "connections",
3423
+ "cameras",
3424
+ "sensors",
3425
+ "levels",
3426
+ "selection",
3427
+ "read-only"
3428
+ ])], 4)) : d("", !0),
3429
+ m(Y) && !m(rt) ? (r(), u(ce, {
3430
+ key: 3,
3431
+ model: m(At),
3432
+ direction: "up",
3433
+ "transition-delay": 80,
3434
+ "tooltip-options": {
3435
+ position: "left",
3436
+ event: void 0
3437
+ },
3438
+ style: v({
3439
+ position: "fixed",
3440
+ zIndex: 15,
3441
+ bottom: `calc(${m(C)}px + ${m(Z) ? "4.25rem" : "1.25rem"} + var(--safe-area-inset-bottom))`,
3442
+ right: m(Dt) || "calc(1.25rem + var(--safe-area-inset-right))",
3443
+ transition: "right 0.2s ease-in-out, bottom 0.2s ease-in-out"
3444
+ }),
3445
+ pt: { root: { style: "pointer-events: none" } }
3446
+ }, {
3447
+ button: g(({ visible: e, toggleCallback: t }) => [T(l, {
3448
+ rounded: "",
3449
+ severity: "secondary",
3450
+ class: "pointer-events-auto",
3451
+ onClick: t
3452
+ }, {
3453
+ icon: g(() => [b("div", Pi, [
3454
+ b("div", {
3455
+ class: s(["absolute top-0.5 left-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full transform transition-all duration-100 origin-center", { "w-4 h-[2px] rotate-45 top-1/2 -translate-y-1/2 rounded-none": e }]),
3456
+ style: { backgroundColor: "var(--text-color)" }
3457
+ }, null, 2),
3458
+ b("div", {
3459
+ class: s(["absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-1.5 h-1.5 rounded-full transition-all duration-100", { "opacity-0 scale-0": e }]),
3460
+ style: { backgroundColor: "var(--text-color)" }
3461
+ }, null, 2),
3462
+ b("div", {
3463
+ class: s(["absolute bottom-0.5 left-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full transform transition-all duration-100 origin-center", { "w-4 h-[2px] -rotate-45 bottom-1/2 translate-y-1/2 rounded-none": e }]),
3464
+ style: { backgroundColor: "var(--text-color)" }
3465
+ }, null, 2)
3466
+ ])]),
3467
+ _: 2
3468
+ }, 1032, ["onClick"])]),
3469
+ item: g(({ item: e, toggleCallback: t }) => [x((r(), u(l, a({ severity: "secondary" }, e.buttonProps, {
3470
+ rounded: "",
3471
+ class: "pointer-events-auto",
3472
+ onClick: t
3473
+ }), {
3474
+ icon: g(() => [(r(), u(c(e.icon)))]),
3475
+ _: 2
3476
+ }, 1040, ["onClick"])), [[M, { value: e.label }]])]),
3477
+ _: 1
3478
+ }, 8, ["model", "style"])) : d("", !0),
3479
+ m(Y) && m(Z) ? x((r(), u(l, {
3480
+ key: 4,
3481
+ rounded: "",
3482
+ severity: "success",
3483
+ class: "text-white",
3484
+ loading: m(it),
3485
+ style: v({
3486
+ position: "fixed",
3487
+ zIndex: 15,
3488
+ bottom: `calc(${m(C)}px + ${Math.max(m(st) - m(K), 0)}px + 1.25rem + var(--safe-area-inset-bottom))`,
3489
+ right: m(Dt) || "calc(1.25rem + var(--safe-area-inset-right))",
3490
+ transition: m(ct) ? "right 0.2s ease-in-out" : "right 0.2s ease-in-out, bottom 0.2s ease-in-out"
3491
+ }),
3492
+ onClick: Nn
3493
+ }, {
3494
+ icon: g(() => [T(ue, { class: "w-5 h-5" })]),
3495
+ _: 1
3496
+ }, 8, ["loading", "style"])), [[M, { value: e.$t("views.floorplan.save") }]]) : d("", !0),
3497
+ m(Y) && m(S) && !m(rt) ? x((r(), u(l, {
3498
+ key: 5,
3499
+ rounded: "",
3500
+ class: "pointer-events-auto text-white",
3501
+ style: v({
3502
+ position: "fixed",
3503
+ zIndex: 15,
3504
+ bottom: `calc(${m(C)}px + 1.25rem + var(--safe-area-inset-bottom))`,
3505
+ right: "calc(4.75rem + var(--safe-area-inset-right))"
3506
+ }),
3507
+ onClick: t[9] ||= (e) => nt.value = !0
3508
+ }, {
3509
+ icon: g(() => [T(re, { class: "w-5 h-5" })]),
3510
+ _: 1
3511
+ }, 8, ["style"])), [[M, { value: e.$t("views.floorplan.palette") }]]) : d("", !0),
3512
+ T(de, {
3513
+ modelValue: m(nt),
3514
+ "onUpdate:modelValue": t[10] ||= (e) => p(nt) ? nt.value = e : null,
3515
+ title: e.$t("views.floorplan.palette"),
3516
+ "max-height": "70vh"
3517
+ }, {
3518
+ default: g(() => [T(ae, {
3519
+ cameras: m(Et),
3520
+ sensors: m(wt),
3521
+ rooms: m(Tt),
3522
+ disabled: !m(z).length,
3523
+ mode: "click",
3524
+ onPick: Dn
3525
+ }, null, 8, [
3526
+ "cameras",
3527
+ "sensors",
3528
+ "rooms",
3529
+ "disabled"
3530
+ ])]),
3531
+ _: 1
3532
+ }, 8, ["modelValue", "title"]),
3533
+ b("div", {
3534
+ ref_key: "menuAnchorRef",
3535
+ ref: we,
3536
+ class: "fixed w-0 h-0",
3537
+ style: v({
3538
+ left: `${m(Te).x}px`,
3539
+ top: `${m(Te).y}px`
3540
+ })
3541
+ }, null, 4),
3542
+ b("div", {
3543
+ ref_key: "previewAnchorRef",
3544
+ ref: je,
3545
+ class: "fixed w-0 h-0",
3546
+ style: v({
3547
+ left: `${m(Me).x}px`,
3548
+ top: `${m(Me).y}px`
3549
+ })
3550
+ }, null, 4),
3551
+ b("div", {
3552
+ ref_key: "sensorAnchorRef",
3553
+ ref: Fe,
3554
+ class: "fixed w-0 h-0",
3555
+ style: v({
3556
+ left: `${m(Ie).x}px`,
3557
+ top: `${m(Ie).y}px`
3558
+ })
3559
+ }, null, 4),
3560
+ T(fe, {
3561
+ ref_key: "sensorPopoverRef",
3562
+ ref: Le,
3563
+ class: "shadow-lg cui-rounded-corner",
3564
+ pt: { content: { class: "p-3" } }
3565
+ }, {
3566
+ default: g(() => [m($) ? (r(), _("div", {
3567
+ key: 0,
3568
+ class: "w-[220px] flex flex-col gap-3",
3569
+ onPointerenter: on,
3570
+ onPointerleave: sn
3571
+ }, [
3572
+ b("div", Fi, [b("div", Ii, [(r(), u(c(m(he)(m($).sensorType, tn(m($).id))), { class: "w-4 h-4" }))]), b("div", Li, [
3573
+ b("div", Ri, i(m($).name), 1),
3574
+ m($).owner ? (r(), _("div", zi, i(m($).owner), 1)) : d("", !0),
3575
+ b("div", Bi, i(m(j)(m($).sensorType, tn(m($).id))), 1)
3576
+ ])]),
3577
+ m($).note ? (r(), _("div", Vi, i(m($).note), 1)) : d("", !0),
3578
+ m($).sensorType === "securitySystem" ? (r(), _("div", Hi, [(r(), _(y, null, n(J, (t) => T(l, {
3579
+ key: t.value,
3580
+ severity: "secondary",
3581
+ outlined: m(Ee)(tn(m($).id)) !== t.value,
3582
+ size: "small",
3583
+ class: "cui-button-medium",
3584
+ label: e.$t(t.labelKey),
3585
+ onClick: (e) => an(m($).id, t.value)
3586
+ }, null, 8, [
3587
+ "outlined",
3588
+ "label",
3589
+ "onClick"
3590
+ ])), 64))])) : nn(m($).sensorType) ? (r(), u(l, {
3591
+ key: 2,
3592
+ severity: "secondary",
3593
+ size: "small",
3594
+ class: "cui-button-medium",
3595
+ label: e.$t("views.floorplan.sensor_toggle"),
3596
+ onClick: t[11] ||= (e) => rn(m($).id)
3597
+ }, null, 8, ["label"])) : d("", !0)
3598
+ ], 32)) : d("", !0)]),
3599
+ _: 1
3600
+ }, 512),
3601
+ T(fe, {
3602
+ ref_key: "previewRef",
3603
+ ref: Ne,
3604
+ class: "shadow-lg cui-rounded-corner overflow-hidden",
3605
+ pt: { content: { class: "p-0" } }
3606
+ }, {
3607
+ default: g(() => [b("div", {
3608
+ class: "w-[280px] flex flex-col",
3609
+ onPointerenter: un,
3610
+ onPointerleave: dn
3611
+ }, [b("div", Ui, [m(X) ? (r(), u(pe, {
3612
+ key: 0,
3613
+ "camera-info": m(X),
3614
+ "source-role": "low-resolution",
3615
+ "streaming-mode": "auto",
3616
+ toolbar: !1,
3617
+ control: !1,
3618
+ subcontrol: !1,
3619
+ "isolated-stream": !0,
3620
+ "live-indicator-overlay": "",
3621
+ class: "w-full",
3622
+ "flat-card": ""
3623
+ }, null, 8, ["camera-info"])) : d("", !0)]), m(X) ? (r(), _("div", Wi, [b("span", Gi, i(m(X).name), 1), x((r(), u(l, {
3624
+ severity: "secondary",
3625
+ text: "",
3626
+ class: "cui-button p-1.5",
3627
+ onClick: t[12] ||= (t) => e.$router.push(`/cameras/${m(X).name}`)
3628
+ }, {
3629
+ icon: g(() => [T(me, { class: "w-4 h-4" })]),
3630
+ _: 1
3631
+ })), [[
3632
+ M,
3633
+ { value: e.$t("views.floorplan.open_camera") },
3634
+ void 0,
3635
+ { top: !0 }
3636
+ ]])])) : d("", !0)], 32)]),
3637
+ _: 1
3638
+ }, 512),
3639
+ T(A, {
3640
+ ref_key: "stairsMenuRef",
3641
+ ref: ye,
3642
+ items: m(jt),
3643
+ "max-height": "320px",
3644
+ popover: { pt: { content: { class: "p-0! rounded-xl! overflow-hidden!" } } }
3645
+ }, null, 8, ["items"]),
3646
+ T(A, {
3647
+ ref_key: "levelMenuRef",
3648
+ ref: _e,
3649
+ items: m(kt),
3650
+ popover: { pt: { content: { class: "p-0! rounded-xl! overflow-hidden!" } } }
3651
+ }, null, 8, ["items"])
3652
+ ]);
3653
+ };
3654
+ }
3655
+ }), [["__scopeId", "data-v-f7cfb4c4"]]);
3656
+ //#endregion
3657
+ export { Ji as default };