@camera.ui/server 2.0.20 → 2.0.22

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 (355) hide show
  1. package/dist/interface/assets/{404-DVIgoIOM.js → 404-0d936klL.js} +1 -1
  2. package/dist/interface/assets/{About-I7CYGBLL.js → About-BMwYrGrl.js} +1 -1
  3. package/dist/interface/assets/Adminpanel-DBsOmAuo.js +1 -0
  4. package/dist/interface/assets/Automation-BLndVfqR.js +3 -0
  5. package/dist/interface/assets/{AutomationImport-DOdFWPX5.js → AutomationImport-Ba33juY0.js} +2 -2
  6. package/dist/interface/assets/AutomationStore-Bjf1x7go.js +2 -0
  7. package/dist/interface/assets/AutomationStoreDetail-Ko3n3U1U.js +2 -0
  8. package/dist/interface/assets/Automations-BfC8bvkT.js +2 -0
  9. package/dist/interface/assets/Camera-BYDPeH6d.js +2 -0
  10. package/dist/interface/assets/Camera-yUrhUGmO.css +1 -0
  11. package/dist/interface/assets/{CameraConsole-DXtIR7hw.js → CameraConsole-pVCj1xXI.js} +2 -2
  12. package/dist/interface/assets/{Cameras-DwFpaiFD.js → Cameras-DdokAe_Q.js} +2 -2
  13. package/dist/interface/assets/Camview-DmuGSzal.js +1 -0
  14. package/dist/interface/assets/Config-DvVqB0_Y.js +2 -0
  15. package/dist/interface/assets/{ConfigActionCameraControl-ne90-Fez.js → ConfigActionCameraControl-DFdb4xzq.js} +1 -1
  16. package/dist/interface/assets/{ConfigActionDelay-BRYGWPTP.js → ConfigActionDelay-B1JjI6bg.js} +1 -1
  17. package/dist/interface/assets/{ConfigActionHttp-D1m69rJz.js → ConfigActionHttp-BzGIbeVo.js} +1 -1
  18. package/dist/interface/assets/{ConfigActionImageInput-Dm_P4Q7V.js → ConfigActionImageInput-C6m2-s8z.js} +1 -1
  19. package/dist/interface/assets/{ConfigActionMqtt-CmRxXG4V.js → ConfigActionMqtt-ByZNQKsg.js} +1 -1
  20. package/dist/interface/assets/{ConfigActionNotification-BipubH-a.js → ConfigActionNotification-YmdMddoN.js} +1 -1
  21. package/dist/interface/assets/{ConfigActionNotificationControl-HDZVn3cx.js → ConfigActionNotificationControl-2hWDRBpq.js} +1 -1
  22. package/dist/interface/assets/{ConfigActionOutput-vD4dohGk.js → ConfigActionOutput-D9k1-jfI.js} +1 -1
  23. package/dist/interface/assets/{ConfigActionPlugin-ug-TKeyw.js → ConfigActionPlugin-DjD_94EX.js} +1 -1
  24. package/dist/interface/assets/{ConfigActionSensor-CBNs37pL.js → ConfigActionSensor-fak8jYSC.js} +1 -1
  25. package/dist/interface/assets/{ConfigActionSnapshot-BhrCn6PJ.js → ConfigActionSnapshot-mwEHXqyk.js} +1 -1
  26. package/dist/interface/assets/{ConfigActionVariable-BabtvdZx.js → ConfigActionVariable-kBxNfyOV.js} +1 -1
  27. package/dist/interface/assets/{ConfigConditionIfElse-CAWJ-gg2.js → ConfigConditionIfElse-CkjmImTD.js} +1 -1
  28. package/dist/interface/assets/{ConfigConditionSensorState-BxTrOTpB.js → ConfigConditionSensorState-FE3mFjRe.js} +1 -1
  29. package/dist/interface/assets/{ConfigConditionSwitch-aJ-w67SY.js → ConfigConditionSwitch-msqWizIt.js} +1 -1
  30. package/dist/interface/assets/{ConfigConditionTime-HKC4eK68.js → ConfigConditionTime-ifPV135b.js} +1 -1
  31. package/dist/interface/assets/{ConfigSensorValueInput-C4msc9Se.js → ConfigSensorValueInput-Bg3SEbSh.js} +1 -1
  32. package/dist/interface/assets/{ConfigTriggerDetection-NwOPfWsQ.js → ConfigTriggerDetection-Cjes6g7x.js} +1 -1
  33. package/dist/interface/assets/{ConfigTriggerGeofence-CmX_4WIJ.js → ConfigTriggerGeofence-CemaUwl5.js} +1 -1
  34. package/dist/interface/assets/{ConfigTriggerManual-BuJQbcOo.js → ConfigTriggerManual-DWuiq7PC.js} +1 -1
  35. package/dist/interface/assets/{ConfigTriggerMqtt-R0VWW5up.js → ConfigTriggerMqtt-DxAoDh2Z.js} +1 -1
  36. package/dist/interface/assets/{ConfigTriggerSchedule-D21piX-w.js → ConfigTriggerSchedule-DDqgMGvp.js} +1 -1
  37. package/dist/interface/assets/{ConfigTriggerSensor-Cl-mz7nd.js → ConfigTriggerSensor-M6bXqz4k.js} +1 -1
  38. package/dist/interface/assets/{ConfigTriggerSystem-CPPe9gXo.js → ConfigTriggerSystem-NaaBopYq.js} +1 -1
  39. package/dist/interface/assets/{ConfigTriggerWebhook-BVKRs9Pr.js → ConfigTriggerWebhook-CxOXgcJi.js} +1 -1
  40. package/dist/interface/assets/Console-CMuW2_8s.js +1 -0
  41. package/dist/interface/assets/{CuiAutomationRunsDialog-B1HvXwOc.js → CuiAutomationRunsDialog-yh1qHzmS.js} +1 -1
  42. package/dist/interface/assets/{CuiBottomSheet-BMLuWNPf.js → CuiBottomSheet-BshiVWqw.js} +1 -1
  43. package/dist/interface/assets/CuiBottomSheet-DSNyVg5P.js +1 -0
  44. package/dist/interface/assets/{CuiCameraPipCard-CS8nuRgX.js → CuiCameraPipCard-Cmk0jl6M.js} +1 -1
  45. package/dist/interface/assets/CuiCameraRecordings-KU1wIai4.js +1 -0
  46. package/dist/interface/assets/{CuiCameraShares-7OhxbeqJ.js → CuiCameraShares-BoR3YQWj.js} +1 -1
  47. package/dist/interface/assets/{CuiCameraTable-CggOjNka.js → CuiCameraTable-BRPBqU8V.js} +2 -2
  48. package/dist/interface/assets/{CuiDataTable-VRoxHf0R.js → CuiDataTable-BGY4VBtv.js} +1 -1
  49. package/dist/interface/assets/CuiList-BSOMR296.js +1 -0
  50. package/dist/interface/assets/{CuiMarkdownContent-BwMdbyad.js → CuiMarkdownContent-DEMo42iT.js} +1 -1
  51. package/dist/interface/assets/CuiMarkdownContent-Xn_VHwym.js +1 -0
  52. package/dist/interface/assets/{CuiPluginCard-C_HSpNve.js → CuiPluginCard-CgJb8B1W.js} +2 -2
  53. package/dist/interface/assets/{CuiPluginCategoryChip-iszX6Lqh.js → CuiPluginCategoryChip-D9Vi1SEP.js} +1 -1
  54. package/dist/interface/assets/CuiPluginOAuthButton-XpEyqoRm.js +2 -0
  55. package/dist/interface/assets/{CuiPluginTrustBadge-BtP_jlV6.js → CuiPluginTrustBadge-D0rUX2i6.js} +1 -1
  56. package/dist/interface/assets/CuiQRCode-QBkbmvRA.js +1 -0
  57. package/dist/interface/assets/CuiRecordingsGrid-CuEl_hhu.js +1 -0
  58. package/dist/interface/assets/CuiSchema-D_cg-H5i.js +1 -0
  59. package/dist/interface/assets/{CuiTopNavbarItem-qqxqB8Cc.js → CuiTopNavbarItem-CXijnkK9.js} +1 -1
  60. package/dist/interface/assets/Faces-C95mlWaW.js +1 -0
  61. package/dist/interface/assets/FirstSteps-Cpbg7fng.js +1 -0
  62. package/dist/interface/assets/Instances-BgJtM1Xl.js +1 -0
  63. package/dist/interface/assets/{Logs-BiEohM1x.js → Logs-BWXYqm5T.js} +2 -2
  64. package/dist/interface/assets/Menu-BO9Zjy1w.js +1 -0
  65. package/dist/interface/assets/{OAuthDeviceFlow-Cg1RWZ2r.js → OAuthDeviceFlow-NnwqdmBM.js} +1 -1
  66. package/dist/interface/assets/Plugin-BLqyZrJP.css +1 -0
  67. package/dist/interface/assets/Plugin-DQq3xjhe.js +1 -0
  68. package/dist/interface/assets/{PluginConsole-DNZYZcf-.js → PluginConsole-BTsVAsKf.js} +2 -2
  69. package/dist/interface/assets/PluginDetail-CTyzzZVU.js +2 -0
  70. package/dist/interface/assets/{PluginSchema-CBh-9WZs.js → PluginSchema-Bn3pHjQA.js} +1 -1
  71. package/dist/interface/assets/PluginSearch-DbXCyUF0.js +1 -0
  72. package/dist/interface/assets/PluginSearch-z0z8Z1gP.js +2 -0
  73. package/dist/interface/assets/Plugins-Cy7e-ty2.js +1 -0
  74. package/dist/interface/assets/Recordings-CWBpGEUf.js +1 -0
  75. package/dist/interface/assets/Settings-CUIORSmm.js +1 -0
  76. package/dist/interface/assets/SettingsAccount-CeJBKpzp.js +1 -0
  77. package/dist/interface/assets/SettingsAccount-CnwVrQx1.js +1 -0
  78. package/dist/interface/assets/SettingsAppearance-BraaC0WF.js +1 -0
  79. package/dist/interface/assets/SettingsAppearance-CZrOTBki.js +1 -0
  80. package/dist/interface/assets/{SettingsBackup-By22p7wO.js → SettingsBackup-y9mb8XZZ.js} +1 -1
  81. package/dist/interface/assets/SettingsList-DsKncveQ.js +1 -0
  82. package/dist/interface/assets/{SettingsMqtt-DIUaZT6Y.js → SettingsMqtt-DTyyctmQ.js} +1 -1
  83. package/dist/interface/assets/SettingsNotifications-SFMt4Yuj.js +2 -0
  84. package/dist/interface/assets/SettingsPermissions-CktJaQzL.js +1 -0
  85. package/dist/interface/assets/{SettingsRecordings-Dis1Nbho.js → SettingsRecordings-Bqguyt6u.js} +1 -1
  86. package/dist/interface/assets/SettingsRemote-CTv7bb4g.js +1 -0
  87. package/dist/interface/assets/SettingsSystem-CkCnB34r.js +2 -0
  88. package/dist/interface/assets/SettingsUsers-D8LAGd6F.js +1 -0
  89. package/dist/interface/assets/Terminal-DaR9Ur0_.js +4 -0
  90. package/dist/interface/assets/{VariableInput-B9OmFO4i.js → VariableInput-D0TP_Lmo.js} +1 -1
  91. package/dist/interface/assets/{VariableSuggestions-B1-MhuJO.js → VariableSuggestions--vq7928F.js} +1 -1
  92. package/dist/interface/assets/{VersionsHandler-DGHOWAbq.js → VersionsHandler-D9GDdcXr.js} +1 -1
  93. package/dist/interface/assets/Workers-CUyRzwJG.js +2 -0
  94. package/dist/interface/assets/{Workers-DmcQx0L8.css → Workers-CzAz4N2_.css} +1 -1
  95. package/dist/interface/assets/{account-jONrhXkE.js → account-sFoKqEOV.js} +1 -1
  96. package/dist/interface/assets/{alert-circle-CqEfEWD8.js → alert-circle-BQZQ417w.js} +1 -1
  97. package/dist/interface/assets/{alert-outline-DcXO2ICo.js → alert-outline-BUvdNY2J.js} +1 -1
  98. package/dist/interface/assets/{api-iqP3iqyL.js → api-DEaXK1Kq.js} +1 -1
  99. package/dist/interface/assets/api-DxrxNyIH.js +2 -0
  100. package/dist/interface/assets/api-VZ_wVUpU.css +2 -0
  101. package/dist/interface/assets/{arrow-left-DGioEwqJ.js → arrow-left-LdfKbcre.js} +1 -1
  102. package/dist/interface/assets/{arrow-right-outline-BrpH6MGt.js → arrow-right-outline-BbTEhBJq.js} +1 -1
  103. package/dist/interface/assets/{auth-DKeGdKLU.js → auth-XA5zkqwW.js} +1 -1
  104. package/dist/interface/assets/{automations-C5--KLWD.js → automations-51-JMUWD.js} +1 -1
  105. package/dist/interface/assets/{back-filled-DZmo9cAg.js → back-filled-BdHG6uUx.js} +1 -1
  106. package/dist/interface/assets/{bell-ring-D0h1GDrU.js → bell-ring-Dua4zXf_.js} +1 -1
  107. package/dist/interface/assets/{cameras.schema-BEG-W9JW.js → cameras.schema-1a2URPGd.js} +1 -1
  108. package/dist/interface/assets/{cctv-CdDfBHME.js → cctv-DEiPL3U8.js} +1 -1
  109. package/dist/interface/assets/{check-circle-CVNa_reg.js → check-circle-D-utE_P9.js} +1 -1
  110. package/dist/interface/assets/{chevron-down-BiRUJ9SO.js → chevron-down-OEjMpuec.js} +1 -1
  111. package/dist/interface/assets/{chevron-right-Crha-j7O.js → chevron-right-B3nxd9UE.js} +1 -1
  112. package/dist/interface/assets/{clock-outline-dv-kmi60.js → clock-outline-C_f3Ed8x.js} +1 -1
  113. package/dist/interface/assets/{close-BCRtoBTk.js → close-DNgGJYHi.js} +1 -1
  114. package/dist/interface/assets/{close-circle-raXx3m4Q.js → close-circle-L5juejMg.js} +1 -1
  115. package/dist/interface/assets/{cloud-check-CST59Xl_.js → cloud-check-DD7oRzmo.js} +1 -1
  116. package/dist/interface/assets/cloudHandoff-BktPB9rt.js +1 -0
  117. package/dist/interface/assets/{config-DJDQ4YbG.js → config-C2hgXHyj.js} +1 -1
  118. package/dist/interface/assets/{copy-C53ZJyaU.js → copy-BvSzmsFs.js} +1 -1
  119. package/dist/interface/assets/{delete-Dvdp44LT.js → delete-B9BZTgya.js} +1 -1
  120. package/dist/interface/assets/{dist-DZi5AgJB.js → dist-qdWlJrr0.js} +1 -1
  121. package/dist/interface/assets/{download-Dq82fWLS.js → download-Dp_ssGIE.js} +1 -1
  122. package/dist/interface/assets/esm-9VMgxuPI.js +1 -0
  123. package/dist/interface/assets/esm-B69zS8aI.js +1 -0
  124. package/dist/interface/assets/esm-BF94InGP.js +1 -0
  125. package/dist/interface/assets/esm-BHdK6hkk.js +1 -0
  126. package/dist/interface/assets/esm-BYm8JT8N.js +1 -0
  127. package/dist/interface/assets/esm-BwCmHX2G.js +1 -0
  128. package/dist/interface/assets/esm-CL6t-XYT.js +1 -0
  129. package/dist/interface/assets/esm-CXstRMXa.js +1 -0
  130. package/dist/interface/assets/esm-Ckb9rjlL.js +1 -0
  131. package/dist/interface/assets/esm-D4insKbc.js +1 -0
  132. package/dist/interface/assets/esm-DiReJ8YS.js +1 -0
  133. package/dist/interface/assets/esm-Dt_Neag0.js +1 -0
  134. package/dist/interface/assets/esm-GspmWlKf.js +1 -0
  135. package/dist/interface/assets/esm-eezqpB2a.js +1 -0
  136. package/dist/interface/assets/{flowSchema-ByS8_PvM.js → flowSchema-Ckr7CEbZ.js} +1 -1
  137. package/dist/interface/assets/{history--LGIMjNU.js → history-iAZcYg3f.js} +1 -1
  138. package/dist/interface/assets/{home-C5hRJg9h.js → home-DL94781-.js} +1 -1
  139. package/dist/interface/assets/{information-outline-CjhiKBjG.js → information-outline-CVsB1bl-.js} +1 -1
  140. package/dist/interface/assets/{lightbulb-outline-BGFG7wv-.js → lightbulb-outline-nNLyXAIp.js} +1 -1
  141. package/dist/interface/assets/{main-Dchuz606.css → main-BxM81wMi.css} +1 -1
  142. package/dist/interface/assets/main-DOjghmGX.js +3 -0
  143. package/dist/interface/assets/{microphone-Dp5Yhz6Z.js → microphone-CU0mFDMh.js} +1 -1
  144. package/dist/interface/assets/{mqtt-D2bsWeKE.js → mqtt-COazyb4A.js} +1 -1
  145. package/dist/interface/assets/native-WiRjRKUS.js +1 -0
  146. package/dist/interface/assets/native-hhip9y-E.js +1 -0
  147. package/dist/interface/assets/{nodeDefinitions-B3j6RajL.js → nodeDefinitions-CPyyuw1P.js} +1 -1
  148. package/dist/interface/assets/{notifications-CafZ2-zM.js → notifications-BHQN6WD4.js} +1 -1
  149. package/dist/interface/assets/pencil-outline-BQxLTlZx.js +1 -0
  150. package/dist/interface/assets/plugin-DIVM640y.js +1 -0
  151. package/dist/interface/assets/{plugins-CIT9775i.js → plugins-C0RtyBHQ.js} +1 -1
  152. package/dist/interface/assets/{plus-C6l_Q-mY.js → plus-CTzaBaTz.js} +1 -1
  153. package/dist/interface/assets/{plus-DhRnJIfm.js → plus-Ct6WQfM1.js} +1 -1
  154. package/dist/interface/assets/{power-BfcMaKbx.js → power-CvKGepBP.js} +1 -1
  155. package/dist/interface/assets/{ring-resize-peEJMXPl.js → ring-resize-CZBThoQC.js} +1 -1
  156. package/dist/interface/assets/{round-alt-arrow-left-bold-BcL7KVCG.js → round-alt-arrow-left-bold-BlpNMBxm.js} +1 -1
  157. package/dist/interface/assets/round-restart-alt-D3iswthu.js +1 -0
  158. package/dist/interface/assets/{search-BTu5ntI6.js → search-M4Rt52Co.js} +1 -1
  159. package/dist/interface/assets/{server-hEeNagJk.js → server-CVSOthzT.js} +1 -1
  160. package/dist/interface/assets/{settings-wRDwvjf-.js → settings-CgToKrFd.js} +1 -1
  161. package/dist/interface/assets/{source-branch-DejOTyZv.js → source-branch-CoHKTGxb.js} +1 -1
  162. package/dist/interface/assets/{theme-BJfyZiCo.js → theme-BZi7VV10.js} +1 -1
  163. package/dist/interface/assets/{trash-2-upauF9j0.js → trash-2-BKWfq15D.js} +1 -1
  164. package/dist/interface/assets/{trash-can-outline-PQys0L3O.js → trash-can-outline-HvqPHpF7.js} +1 -1
  165. package/dist/interface/assets/{trash-fill-DDHuYpvM.js → trash-fill-yNQsFs0Y.js} +1 -1
  166. package/dist/interface/assets/{trash2-M6P7YvkH.js → trash2-DjTG9rG-.js} +1 -1
  167. package/dist/interface/assets/{types-DBGjHKw2.js → types-Bw8H-UB4.js} +1 -1
  168. package/dist/interface/assets/types-CDJiWcQ7.js +1 -0
  169. package/dist/interface/assets/{upload-DwNCSVAl.js → upload-B6yqOWqz.js} +1 -1
  170. package/dist/interface/assets/useAppVersion-CDTrwxkp.js +1 -0
  171. package/dist/interface/assets/useBackupRestore-QuXkc5ZG.js +1 -0
  172. package/dist/interface/assets/{useCameraOptions-CL_7DfoJ.js → useCameraOptions-D5-bI-e6.js} +1 -1
  173. package/dist/interface/assets/{useCardSelection-BdYBm23a.js → useCardSelection-CgZ7QTaA.js} +1 -1
  174. package/dist/interface/assets/useElectron-CgLWOhcS.js +1 -0
  175. package/dist/interface/assets/{useLogsSocket-DH7pUHng.js → useLogsSocket-BlAo-xcw.js} +1 -1
  176. package/dist/interface/assets/usePermissions-tzi2t12h.js +1 -0
  177. package/dist/interface/assets/{useServerRestart-Bp_KEXEn.js → useServerRestart-DctcFWWh.js} +1 -1
  178. package/dist/interface/assets/{useStreamStatus-M9pF0vGv.js → useStreamStatus-BV_L7pxB.js} +1 -1
  179. package/dist/interface/assets/useUserOptions-nuBRgAEk.js +1 -0
  180. package/dist/interface/assets/{variable-K7DoQHpX.js → variable-Y3IAPnsB.js} +1 -1
  181. package/dist/interface/assets/{vendor-cameraui-CxG00gaf.js → vendor-cameraui-B_OCKNGw.js} +24 -24
  182. package/dist/interface/assets/{vendor-capacitor-BmJAC1FL.js → vendor-capacitor-D6T-f6Q_.js} +2 -2
  183. package/dist/interface/assets/{vendor-chart-BDu4sN9x.js → vendor-chart-DpsXMlB-.js} +1 -1
  184. package/dist/interface/assets/{vendor-core-C6srgzh_.js → vendor-core-zLmLhSHM.js} +1 -1
  185. package/dist/interface/assets/{vendor-dnd-BN6m9rq8.js → vendor-dnd-hwiZJHjo.js} +1 -1
  186. package/dist/interface/assets/{vendor-draggabilly-BLoTmI_a.js → vendor-draggabilly-OrLwQbim.js} +1 -1
  187. package/dist/interface/assets/{vendor-gridstack-BJlwi692.js → vendor-gridstack-C6VKsm_r.js} +1 -1
  188. package/dist/interface/assets/{vendor-markdown-D_3Of-Gz.js → vendor-markdown-_OBaDsnU.js} +1 -1
  189. package/dist/interface/assets/{vendor-CdGy-Xet.js → vendor-nfBMzqgY.js} +10 -10
  190. package/dist/interface/assets/{vendor-primevue-DZljZRZZ.js → vendor-primevue-C6wcTjtT.js} +1 -1
  191. package/dist/interface/assets/{vendor-vueflow-D7rAeKHv.js → vendor-vueflow-B1MUSE71.js} +1 -1
  192. package/dist/interface/assets/web-B-SlpbxK.js +1 -0
  193. package/dist/interface/assets/web-B6leYIzJ.js +1 -0
  194. package/dist/interface/assets/web-BLDe3Kn0.js +1 -0
  195. package/dist/interface/assets/web-BT-51W2W.js +1 -0
  196. package/dist/interface/assets/web-BjKL51lK-DHLvmMLr.js +1 -0
  197. package/dist/interface/assets/web-BpRU7MbT.js +1 -0
  198. package/dist/interface/assets/web-CiaJvmq8.js +1 -0
  199. package/dist/interface/assets/web-Cnkt61og.js +1 -0
  200. package/dist/interface/assets/web-CzhM-YH1.js +1 -0
  201. package/dist/interface/assets/web-Da5rcZ2Q.js +1 -0
  202. package/dist/interface/assets/web-DdZjFuTb.js +1 -0
  203. package/dist/interface/assets/web-DnHj9sl9.js +1 -0
  204. package/dist/interface/assets/web-E4Ew4Xhj.js +1 -0
  205. package/dist/interface/assets/web-q63OEDhG.js +1 -0
  206. package/dist/interface/assets/{webhook-CQl989bo.js → webhook-yCryYojY.js} +1 -1
  207. package/dist/interface/assets/workbox-window.prod.es5-BMiTt6Ad.js +1 -0
  208. package/dist/interface/assets/{zoom-in-2i20zd_d.js → zoom-in-Da5uRiQq.js} +1 -1
  209. package/dist/interface/index.html +38 -37
  210. package/dist/interface/sw.js +1 -1
  211. package/dist/server/package.json +7 -7
  212. package/dist/server/requirements.txt +1 -1
  213. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/__init__.py +4 -0
  214. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/__init__.py +4 -0
  215. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/config.py +8 -0
  216. package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/frames.py +29 -1
  217. package/dist/server/src/api/controllers/plugins.controller.js +2 -0
  218. package/dist/server/src/api/controllers/plugins.controller.js.map +1 -1
  219. package/dist/server/src/api/controllers/workers.controller.d.ts +2 -1
  220. package/dist/server/src/api/controllers/workers.controller.js +9 -0
  221. package/dist/server/src/api/controllers/workers.controller.js.map +1 -1
  222. package/dist/server/src/api/database/types.d.ts +1 -0
  223. package/dist/server/src/api/routes/workers.routes.js +13 -1
  224. package/dist/server/src/api/routes/workers.routes.js.map +1 -1
  225. package/dist/server/src/api/schemas/cameras.schema.d.ts +106 -0
  226. package/dist/server/src/api/schemas/cameras.schema.js +7 -0
  227. package/dist/server/src/api/schemas/cameras.schema.js.map +1 -1
  228. package/dist/server/src/api/schemas/workers.schema.d.ts +4 -0
  229. package/dist/server/src/api/schemas/workers.schema.js +3 -0
  230. package/dist/server/src/api/schemas/workers.schema.js.map +1 -1
  231. package/dist/server/src/api/services/cameras.service.js +5 -0
  232. package/dist/server/src/api/services/cameras.service.js.map +1 -1
  233. package/dist/server/src/api/services/workers.service.d.ts +2 -0
  234. package/dist/server/src/api/services/workers.service.js +12 -0
  235. package/dist/server/src/api/services/workers.service.js.map +1 -1
  236. package/dist/server/src/api/types/index.d.ts +10 -1
  237. package/dist/server/src/api/websocket/nsp/server.js +8 -2
  238. package/dist/server/src/api/websocket/nsp/server.js.map +1 -1
  239. package/dist/server/src/automations/engine.js +24 -14
  240. package/dist/server/src/automations/engine.js.map +1 -1
  241. package/dist/server/src/camera/codecCache.d.ts +10 -0
  242. package/dist/server/src/camera/codecCache.js +14 -0
  243. package/dist/server/src/camera/codecCache.js.map +1 -0
  244. package/dist/server/src/camera/controller.d.ts +1 -0
  245. package/dist/server/src/camera/controller.js +22 -0
  246. package/dist/server/src/camera/controller.js.map +1 -1
  247. package/dist/server/src/camera/decoder/detection-coordinator.d.ts +1 -0
  248. package/dist/server/src/camera/decoder/detection-coordinator.js +24 -7
  249. package/dist/server/src/camera/decoder/detection-coordinator.js.map +1 -1
  250. package/dist/server/src/camera/decoder/event-thumbnailer.d.ts +2 -0
  251. package/dist/server/src/camera/decoder/event-thumbnailer.js +1 -1
  252. package/dist/server/src/camera/decoder/event-thumbnailer.js.map +1 -1
  253. package/dist/server/src/camera/decoder/hardware.d.ts +4 -0
  254. package/dist/server/src/camera/decoder/hardware.js +17 -0
  255. package/dist/server/src/camera/decoder/hardware.js.map +1 -0
  256. package/dist/server/src/camera/decoder/plugin-registry.d.ts +1 -0
  257. package/dist/server/src/camera/decoder/plugin-registry.js +5 -0
  258. package/dist/server/src/camera/decoder/plugin-registry.js.map +1 -1
  259. package/dist/server/src/camera/decoder/sources/frame-source.d.ts +3 -1
  260. package/dist/server/src/camera/decoder/sources/frame-source.js +6 -2
  261. package/dist/server/src/camera/decoder/sources/frame-source.js.map +1 -1
  262. package/dist/server/src/camera/decoder/sources/snapshot-source.d.ts +2 -0
  263. package/dist/server/src/camera/decoder/sources/snapshot-source.js +3 -2
  264. package/dist/server/src/camera/decoder/sources/snapshot-source.js.map +1 -1
  265. package/dist/server/src/camera/decoder/worker.js +4 -1
  266. package/dist/server/src/camera/decoder/worker.js.map +1 -1
  267. package/dist/server/src/rpc/server.js +2 -0
  268. package/dist/server/src/rpc/server.js.map +1 -1
  269. package/dist/server/src/utils/camera.js +2 -1
  270. package/dist/server/src/utils/camera.js.map +1 -1
  271. package/dist/server/src/workers/manager.d.ts +1 -0
  272. package/dist/server/src/workers/manager.js +10 -2
  273. package/dist/server/src/workers/manager.js.map +1 -1
  274. package/dist/server/src/workers/types.d.ts +1 -0
  275. package/package.json +7 -7
  276. package/dist/interface/assets/Adminpanel-hjxjbIls.js +0 -1
  277. package/dist/interface/assets/Automation-BD6i5cCJ.js +0 -3
  278. package/dist/interface/assets/AutomationStore-CiCQsvdr.js +0 -2
  279. package/dist/interface/assets/AutomationStoreDetail-C8GdQfDw.js +0 -2
  280. package/dist/interface/assets/Automations-Dam6L6IJ.js +0 -2
  281. package/dist/interface/assets/Camera-Da5zEitE.css +0 -1
  282. package/dist/interface/assets/Camera-DpK373mr.js +0 -2
  283. package/dist/interface/assets/Camview-BXVRXt1q.js +0 -1
  284. package/dist/interface/assets/Config-FNZhCKP3.js +0 -2
  285. package/dist/interface/assets/Console-C8WGObIS.js +0 -1
  286. package/dist/interface/assets/CuiBottomSheet-VFweBZsl.js +0 -1
  287. package/dist/interface/assets/CuiCameraRecordings-Cbv9O2mI.js +0 -1
  288. package/dist/interface/assets/CuiMarkdownContent-G916_kVN.js +0 -1
  289. package/dist/interface/assets/CuiPluginOAuthButton-CD_cP8Sg.js +0 -2
  290. package/dist/interface/assets/CuiQRCode-TwHpMVmz.js +0 -1
  291. package/dist/interface/assets/CuiRecordingsGrid-DFWeOQom.js +0 -1
  292. package/dist/interface/assets/CuiSchema-sba3GEON.js +0 -1
  293. package/dist/interface/assets/Faces-DKuJfnrx.js +0 -1
  294. package/dist/interface/assets/FirstSteps-VH2JpKh5.js +0 -1
  295. package/dist/interface/assets/Instances-B9R41nUI.js +0 -1
  296. package/dist/interface/assets/Menu-CauhLfRy.js +0 -1
  297. package/dist/interface/assets/Plugin-D83B_edv.js +0 -1
  298. package/dist/interface/assets/Plugin-wl-2k1zI.css +0 -1
  299. package/dist/interface/assets/PluginDetail-olQafOof.js +0 -2
  300. package/dist/interface/assets/PluginSearch-BRTEBxyD.js +0 -2
  301. package/dist/interface/assets/PluginSearch-BeRuXfue.js +0 -1
  302. package/dist/interface/assets/Plugins-kIuGHw0l.js +0 -1
  303. package/dist/interface/assets/Recordings-DCMz1eso.js +0 -1
  304. package/dist/interface/assets/Settings-Di_XJPuI.js +0 -1
  305. package/dist/interface/assets/SettingsAccount-B50Vw6rp.js +0 -1
  306. package/dist/interface/assets/SettingsAccount-DwPmXX3f.js +0 -1
  307. package/dist/interface/assets/SettingsAppearance-Bt5mV6iW.js +0 -1
  308. package/dist/interface/assets/SettingsAppearance-CiwV01fK.js +0 -1
  309. package/dist/interface/assets/SettingsNotifications-pL4a8qGr.js +0 -2
  310. package/dist/interface/assets/SettingsRemote-DtqxKJ72.js +0 -1
  311. package/dist/interface/assets/SettingsSystem-Bmu_mIzP.js +0 -2
  312. package/dist/interface/assets/SettingsUsers-DSrT7URM.js +0 -1
  313. package/dist/interface/assets/Terminal-rBjP4aPW.js +0 -4
  314. package/dist/interface/assets/Workers-BIrXPPcm.js +0 -2
  315. package/dist/interface/assets/api-C4TatJmj.js +0 -2
  316. package/dist/interface/assets/api-LLscRp6O.css +0 -2
  317. package/dist/interface/assets/cloudHandoff-CHuMYunO.js +0 -1
  318. package/dist/interface/assets/esm-5O0fbEL-.js +0 -1
  319. package/dist/interface/assets/esm-8JcCIx6p.js +0 -1
  320. package/dist/interface/assets/esm-BIwkRkap.js +0 -1
  321. package/dist/interface/assets/esm-Ba1kg7sT.js +0 -1
  322. package/dist/interface/assets/esm-CI9fumfA.js +0 -1
  323. package/dist/interface/assets/esm-CfqCZ8Ic.js +0 -1
  324. package/dist/interface/assets/esm-Cle2K7IB.js +0 -1
  325. package/dist/interface/assets/esm-DGhY5suq.js +0 -1
  326. package/dist/interface/assets/esm-D_SYso1m.js +0 -1
  327. package/dist/interface/assets/esm-Dg-c_Ys9.js +0 -1
  328. package/dist/interface/assets/esm-IjMpYY_D.js +0 -1
  329. package/dist/interface/assets/esm-JkR46BGF.js +0 -1
  330. package/dist/interface/assets/esm-KCb4USia.js +0 -1
  331. package/dist/interface/assets/esm-fiu1-7Vf.js +0 -1
  332. package/dist/interface/assets/main-LNc3C34P.js +0 -3
  333. package/dist/interface/assets/native-CNOra93F.js +0 -1
  334. package/dist/interface/assets/native-DAl9Pmov.js +0 -1
  335. package/dist/interface/assets/plugin-HHKHhKIh.js +0 -1
  336. package/dist/interface/assets/round-restart-alt-CeS-sqUQ.js +0 -1
  337. package/dist/interface/assets/types-DeSkG3t-.js +0 -1
  338. package/dist/interface/assets/useAppVersion-0AZfrSWk.js +0 -1
  339. package/dist/interface/assets/useBackupRestore-BSKF4lS5.js +0 -1
  340. package/dist/interface/assets/useUserOptions-8pJY90z8.js +0 -1
  341. package/dist/interface/assets/web-B2hT39CL.js +0 -1
  342. package/dist/interface/assets/web-BKoMlshd.js +0 -1
  343. package/dist/interface/assets/web-BjKL51lK-Ut62Hifg.js +0 -1
  344. package/dist/interface/assets/web-C0ZNZcUJ.js +0 -1
  345. package/dist/interface/assets/web-CvKW_k8u.js +0 -1
  346. package/dist/interface/assets/web-CxfYyhSm.js +0 -1
  347. package/dist/interface/assets/web-CzA5zxEf.js +0 -1
  348. package/dist/interface/assets/web-D7XF0rfU.js +0 -1
  349. package/dist/interface/assets/web-DgSunHN1.js +0 -1
  350. package/dist/interface/assets/web-DpgTK9mR.js +0 -1
  351. package/dist/interface/assets/web-Hi4guSgN.js +0 -1
  352. package/dist/interface/assets/web-QaIP1Mop.js +0 -1
  353. package/dist/interface/assets/web-VGpOPxhq.js +0 -1
  354. package/dist/interface/assets/web-g-y7DVV1.js +0 -1
  355. package/dist/interface/assets/workbox-window.prod.es5-YHyKoEMU.js +0 -1
@@ -1,3 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./cloudHandoff-CHuMYunO.js","./api-C4TatJmj.js","./rolldown-runtime-DAXXjFlN.js","./vendor-cameraui-CxG00gaf.js","./vendor-CdGy-Xet.js","./vendor-zod-BaT-dXMv.js","./types-DeSkG3t-.js","./lightbulb-outline-BGFG7wv-.js","./vendor-core-C6srgzh_.js","./vendor-primevue-DZljZRZZ.js","./vendor-dnd-BN6m9rq8.js","./close-BCRtoBTk.js","./vendor-draggabilly-BLoTmI_a.js","./api-LLscRp6O.css"])))=>i.map(i=>d[i]);
2
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{$ as t,At as n,B as r,C as i,Cr as a,Er as o,Et as s,G as c,Gi as l,H as u,Hi as d,J as f,Jn as p,K as m,Ki as h,L as g,Lr as ee,O as _,Ot as v,Pt as y,Q as b,R as x,T as te,Tr as S,U as C,Ur as ne,V as re,W as ie,Wi as ae,X as w,Xn as oe,Y as T,Yn as se,Z as ce,Zn as le,_i as E,_r as ue,ar as D,at as de,br as fe,ci as pe,cr as me,dr as he,et as ge,gi as _e,hi as ve,hr as O,ir as k,it as A,kr as ye,lr as be,mi as xe,mr as Se,ni as Ce,nr as we,nt as j,or as Te,pr as Ee,q as De,qn as Oe,rr as ke,si as Ae,sr as je,t as Me,ti as Ne,tr as Pe,tt as Fe,ur as Ie,vt as Le,w as Re,wt as ze,xr as Be,yr as Ve,yt as He,z as Ue}from"./vendor-cameraui-CxG00gaf.js";import{$t as We,B as Ge,Bn as Ke,C as qe,Ct as Je,Et as Ye,G as Xe,Gn as Ze,Gt as Qe,Hn as $e,Jn as et,K as tt,Kn as nt,Kt as rt,Mn as it,N as at,P as ot,Qt as st,Sn as ct,St as lt,Tt as ut,Un as dt,Vn as ft,W as pt,X as mt,Xt as ht,Y as gt,Yn as _t,Zn as vt,Zt as yt,_ as bt,_n as xt,_t as St,at as Ct,b as wt,bt as Tt,cn as Et,ct as Dt,d as Ot,dt as kt,et as At,f as jt,fn as Mt,ft as Nt,g as Pt,gn as Ft,gt as It,h as Lt,hn as Rt,ht as zt,i as Bt,in as Vt,ir as Ht,jn as Ut,ln as Wt,lt as Gt,mn as Kt,mt as qt,n as Jt,nt as Yt,o as Xt,or as Zt,ot as Qt,pn as $t,pt as en,qn as tn,qt as nn,r as rn,rr as an,sn as on,st as sn,t as cn,tn as ln,tr as un,tt as dn,u as fn,ut as pn,v as mn,vn as hn,vt as gn,wt as _n,xn as vn,xt as yn,y as bn,yt as xn,zn as Sn}from"./api-C4TatJmj.js";import{$ as Cn,$n as wn,An as Tn,Bn as M,Dn as En,Hn as Dn,I as N,In as On,J as kn,Jn as An,L as P,Ln as jn,Mn,Nn,On as Pn,Q as Fn,Qn as F,Qt as I,R as In,Rn as L,Sr as R,Tn as Ln,Tr as z,Ut as Rn,Wn as zn,Xn as Bn,Z as Vn,_n as B,an as V,bn as H,cr as Hn,dn as U,dr as Un,en as Wn,fn as W,gr as Gn,in as Kn,ir as qn,kn as Jn,ln as G,lr as K,nn as Yn,nr as Xn,pn as q,pr as J,q as Zn,rn as Qn,sn as $n,tr as Y,un as X,v as er,vn as Z,wr as Q,xr as $,y as tr,yr as nr,z as rr}from"./vendor-CdGy-Xet.js";import{C as ir,E as ar,S as or,T as sr,j as cr,w as lr,y as ur}from"./types-DeSkG3t-.js";import{t as dr}from"./lightbulb-outline-BGFG7wv-.js";import{d as fr,l as pr,n as mr,p as hr,t as gr,u as _r}from"./vendor-core-C6srgzh_.js";import{B as vr,D as yr,E as br,G as xr,H as Sr,K as Cr,L as wr,O as Tr,R as Er,S as Dr,U as Or,V as kr,W as Ar,_ as jr,a as Mr,d as Nr,f as Pr,g as Fr,j as Ir,k as Lr,l as Rr,m as zr,n as Br,p as Vr,r as Hr,t as Ur,v as Wr,x as Gr,y as Kr,z as qr}from"./vendor-primevue-DZljZRZZ.js";import{t as Jr}from"./close-BCRtoBTk.js";import{t as Yr}from"./vendor-draggabilly-BLoTmI_a.js";import{n as Xr,t as Zr}from"./useBackupRestore-BSKF4lS5.js";import{n as Qr,t as $r}from"./useServerRestart-Bp_KEXEn.js";import{t as ei}from"./chevron-down-BiRUJ9SO.js";import{t as ti}from"./power-BfcMaKbx.js";import{t as ni}from"./api-iqP3iqyL.js";import{t as ri}from"./theme-BJfyZiCo.js";import{t as ii}from"./trash2-M6P7YvkH.js";import{t as ai}from"./notifications-CafZ2-zM.js";import{n as oi,t as si}from"./microphone-Dp5Yhz6Z.js";import{a as ci,i as li,r as ui,t as di}from"./CuiSchema-sba3GEON.js";import{t as fi}from"./plugins-CIT9775i.js";import{t as pi}from"./PluginSchema-CBh-9WZs.js";import{t as mi}from"./trash-can-outline-PQys0L3O.js";import{t as hi}from"./information-outline-CjhiKBjG.js";import{t as gi}from"./plus-C6l_Q-mY.js";import{a as _i,i as vi,n as yi,t as bi}from"./cameras.schema-BEG-W9JW.js";import{t as xi}from"./cctv-CdDfBHME.js";import{t as Si}from"./delete-Dvdp44LT.js";import{t as Ci}from"./useStreamStatus-M9pF0vGv.js";import{t as wi}from"./bell-ring-D0h1GDrU.js";import{t as Ti}from"./home-C5hRJg9h.js";import{t as Ei}from"./CuiDataTable-VRoxHf0R.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),d(localStorage),h(),typeof window<`u`&&window.addEventListener(`pagehide`,ae);async function Di(e,t={}){let n=window.location.hash.startsWith(`#`)?window.location.hash.substring(1):window.location.hash,r=new URLSearchParams(n),i=r.get(`auth`);if(!i)return!1;r.delete(`auth`);let a=r.toString(),o=a?`#${a}`:``;window.history.replaceState(null,``,window.location.pathname+window.location.search+o);let s;try{s=JSON.parse(atob(i))}catch{return!1}s._sourceUrl&&t.onRedirectInfo?.({sourceUrl:s._sourceUrl,instanceName:s._instanceName??`Remote`});let c=!1;if(s.access_token&&s._id&&s.username&&s.role){let n={access:s.access_token,refresh:s.refresh_token,accessExpiresAt:s.access_token_expires_at,refreshExpiresAt:s.refresh_token_expires_at},r={url:ft(),mode:`direct-lan`,priority:0};await e.seedAndRetry({endpoint:r,tokens:n},`home`),c=!0,t.onUser?.({_id:s._id,username:s.username,email:s.email,role:s.role,firstLogin:s.firstLogin,avatar:s.avatar})}return s._reset&&t.onReset?.(),c}function Oi(e){Cn.setEventListener(t=>F(()=>e.signal.value.kind===`online`||e.signal.value.kind===`degraded`,e=>t(e),{immediate:!0}))}var ki={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ai(e,t){return L(),q(`svg`,ki,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12 3c-1.97 0-3.85.47-5.56 1.41c-.24.13-.54.04-.68-.2a.506.506 0 0 1 .2-.68C7.82 2.5 9.86 2 12 2s4 .47 6.04 1.5c.25.15.34.45.21.69a.48.48 0 0 1-.44.28M3.5 9.72c-.1 0-.2-.03-.29-.09a.517.517 0 0 1-.12-.7c.99-1.4 2.25-2.5 3.75-3.27C10 4.04 14 4.03 17.15 5.65c1.5.77 2.76 1.85 3.75 3.25c.16.22.1.54-.12.7c-.23.16-.54.11-.7-.1a9.26 9.26 0 0 0-3.39-2.96c-2.87-1.47-6.54-1.47-9.4.01c-1.36.7-2.5 1.7-3.4 2.95c-.08.15-.23.22-.39.22m6.25 12.07c-.13 0-.25-.05-.35-.15c-.87-.87-1.34-1.43-2.01-2.64c-.69-1.23-1.05-2.73-1.05-4.34c0-2.97 2.54-5.39 5.66-5.39s5.66 2.42 5.66 5.39a.5.5 0 0 1-.5.5a.5.5 0 0 1-.5-.5c0-2.42-2.09-4.39-4.66-4.39s-4.66 1.97-4.66 4.39c0 1.44.32 2.77.93 3.84c.64 1.16 1.08 1.65 1.85 2.43c.19.2.19.51 0 .71c-.12.1-.24.15-.37.15m7.17-1.85c-1.19 0-2.24-.3-3.1-.89c-1.49-1.01-2.38-2.65-2.38-4.39a.5.5 0 0 1 .5-.5a.5.5 0 0 1 .5.5c0 1.41.72 2.74 1.94 3.56c.71.48 1.54.71 2.54.71c.24 0 .64-.03 1.04-.1c.27-.05.54.13.58.41c.05.26-.13.53-.41.58c-.57.11-1.07.12-1.21.12M14.91 22h-.13c-1.59-.46-2.63-1.05-3.72-2.12a7.28 7.28 0 0 1-2.17-5.22c0-1.62 1.38-2.94 3.08-2.94s3.08 1.32 3.08 2.94c0 1.07.95 1.94 2.08 1.94c1.15 0 2.08-.87 2.08-1.94c0-3.77-3.25-6.83-7.25-6.83c-2.84 0-5.46 1.58-6.61 4.03c-.39.81-.59 1.76-.59 2.8c0 .78.07 2.01.67 3.61c.1.26-.03.55-.29.64a.504.504 0 0 1-.64-.29c-.5-1.31-.73-2.62-.73-3.96c0-1.2.23-2.29.68-3.24c1.33-2.79 4.28-4.6 7.51-4.6c4.54 0 8.25 3.51 8.25 7.83c0 1.62-1.38 2.94-3.08 2.94s-3.08-1.32-3.08-2.94c0-1.07-.93-1.94-2.08-1.94s-2.08.87-2.08 1.94c0 1.71.66 3.31 1.87 4.51c.95.94 1.86 1.46 3.27 1.84c.27.08.42.36.35.62c-.05.23-.26.38-.47.38`},null,-1)]])}var ji=K({name:`mdi-fingerprint`,render:Ai}),Mi=`cameraui:unlocked`;function Ni(){try{sessionStorage.setItem(Mi,`1`)}catch{}}var Pi=J(!1),Fi=J(!1);function Ii(){return{isLocked:Pi,isAvailable:Fi,unlock:Li,init:Ri}}async function Li(){return Pi.value=!1,Ni(),!0}async function Ri(){}var zi={key:0,class:`app-lock-overlay`},Bi={class:`flex flex-col items-center gap-6 p-8`},Vi={class:`text-center`},Hi={class:`text-lg font-semibold`},Ui={class:`text-sm text-muted mt-2`},Wi=Vt(H({__name:`CuiAppLockOverlay`,setup(e){let{isLocked:t,unlock:n}=Ii(),r=J(!1);async function i(){r.value=!0;try{await n()}finally{r.value=!1}}return F(t,async e=>{e&&(await Tn(),await i())},{immediate:!0}),(e,n)=>{let a=kt,o=ji,s=v;return $(t)?(L(),q(`div`,zi,[X(`div`,Bi,[Z(a,{class:`w-16 h-16 text-muted`}),X(`div`,Vi,[X(`h2`,Hi,z(e.$t(`views.app_lock.title`)),1),X(`p`,Ui,z(e.$t(`views.app_lock.subtitle`)),1)]),Z(s,{label:e.$t(`views.app_lock.unlock`),loading:$(r),fluid:``,class:`cui-button-medium`,onClick:i},{icon:Y(()=>[Z(o,{class:`mr-2`})]),_:1},8,[`label`,`loading`])])])):W(``,!0)}}}),[[`__scopeId`,`data-v-baef4383`]]),Gi={key:0,class:`cui-restore-overlay`},Ki={class:`cui-restore-overlay__card shadow-xl`},qi={class:`text-lg font-semibold`},Ji={class:`text-sm text-muted`},Yi={class:`text-xs text-muted`},Xi=Vt(H({__name:`CuiRestoreOverlay`,setup(e){let{t}=ye(),{active:n,phase:r,uploadPercent:i}=Xr(),a=G(()=>{switch(r.value){case`uploading`:return t(`restore.phase_uploading`);case`restarting`:return t(`restore.phase_restarting`);default:return t(`restore.phase_restoring`)}});return(e,t)=>{let o=Nr;return L(),U(I,{name:`fade`},{default:Y(()=>[$(n)?(L(),q(`div`,Gi,[X(`div`,Ki,[Z($(rr),{src:$(fn)(`logo_animated.svg`),width:`52px`,height:`58px`,title:`camera.ui`,"aria-label":`camera.ui`},null,8,[`src`]),X(`span`,qi,z(e.$t(`restore.title`)),1),X(`span`,Ji,z($(a)),1),$(r)===`uploading`?(L(),U(o,{key:0,value:$(i),class:`w-full`},null,8,[`value`])):(L(),U(o,{key:1,mode:`indeterminate`,class:`w-full`,style:{height:`6px`}})),X(`span`,Yi,z(e.$t(`restore.dont_close`)),1)])])):W(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-0c1a6c8d`]]),Zi={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Qi(e,t){return L(),q(`svg`,Zi,[...t[0]||=[X(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M6 20h12M12 4v12m0 0l3.5-3.5M12 16l-3.5-3.5`},null,-1)]])}var $i=K({name:`iconoir-download`,render:Qi}),ea={class:`cui-update-indicator__content`},ta={class:`cui-update-indicator__text`},na=Vt(H({__name:`CuiUpdateIndicator`,setup(e){let{t}=ye(),{bottombarHeight:n}=Et(),{updateAvailable:r,isApplying:i,applyUpdate:a}=wt(),{isLoggedIn:o}=hr(Lt()),s=_t(),c=G(()=>o.value&&r.value&&s.bannerMode.value===null),l=G(()=>`calc(${n.value}px + 1rem + env(safe-area-inset-bottom, 0px))`);function u(){a()}return(e,n)=>{let r=ze,a=$i,o=v;return L(),U(I,{name:`fade`},{default:Y(()=>[$(c)?(L(),q(`div`,{key:0,class:`cui-update-indicator shadow-xl`,style:Q({bottom:$(l)})},[X(`div`,ea,[$(i)?(L(),U(r,{key:0,class:`cui-update-indicator__spinner`,"stroke-width":`5`})):(L(),U(a,{key:1,class:`cui-update-indicator__icon`})),X(`span`,ta,z($(i)?$(t)(`components.toast.update_applying`):$(t)(`components.toast.update_available_title`)),1),$(i)?W(``,!0):(L(),U(o,{key:2,size:`small`,class:`cui-update-indicator__button`,label:$(t)(`components.toast.update_now`),onClick:u},null,8,[`label`]))])],4)):W(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-8ce1000d`]]),ra={class:`cui-connection-indicator__content`},ia={class:`cui-connection-indicator__text`},aa=Vt(H({__name:`CuiConnectionIndicator`,setup(e){let{t}=ye(),{bottombarHeight:n}=Et(),{bannerMode:r,inTrouble:i}=_t(),{restarting:a}=Qr(),o=rn(),{isLoggedIn:s}=hr(Lt()),c=G(()=>`calc(${n.value}px + 1rem + env(safe-area-inset-bottom, 0px))`),l=G(()=>s.value&&(r.value!==null||a.value)),u=G(()=>r.value===`connecting`?t(`connection.connecting_remote`):r.value===`degraded`?t(`connection.degraded`):r.value===null?t(`connection.restarting`):t(`connection.reconnecting`)),d=G(()=>i.value&&o===`cloud`);async function f(){let{bounceToCloudFrontend:e}=await Rn(async()=>{let{bounceToCloudFrontend:e}=await import(`./cloudHandoff-CHuMYunO.js`);return{bounceToCloudFrontend:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url);await e()}return(e,n)=>{let r=ze,i=ot,a=v;return L(),U(I,{name:`fade`},{default:Y(()=>[$(l)?(L(),q(`div`,{key:0,class:`cui-connection-indicator shadow-xl`,style:Q({bottom:$(c)})},[X(`div`,ra,[Z(r,{class:`!w-5 !h-5 shrink-0`,"stroke-width":`5`}),X(`span`,ia,z($(u)),1),$(d)?(L(),U(a,{key:0,size:`small`,rounded:``,class:`cui-connection-indicator__button`,"aria-label":$(t)(`connection.pick_server`),onClick:f},{default:Y(()=>[Z(i,{class:`w-4 h-4`})]),_:1},8,[`aria-label`])):W(``,!0)])],4)):W(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-0204ee57`]]),oa={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function sa(e,t){return L(),q(`svg`,oa,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M5.41 7.41L10 12l-4.59 4.59L4 15.17L7.17 12L4 8.83zm13.18 9.18L14 12l4.59-4.58L20 8.83L16.83 12L20 15.17z`},null,-1)]])}var ca=K({name:`mdi-unfold-less-vertical`,render:sa}),la={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ua(e,t){return L(),q(`svg`,la,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M12 18.17L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15M12 5.83L15.17 9l1.41-1.41L12 3L7.41 7.59L8.83 9z`},null,-1)]])}var da=K({name:`mdi-unfold-more-horizontal`,render:ua}),fa={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function pa(e,t){return L(),q(`svg`,fa,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M19 13H5v-2h14z`},null,-1)]])}var ma=K({name:`mdi-minus`,render:pa}),ha={class:`fixed flex flex-row items-center z-[99999] top-0 left-[7px] gap-2 p-2 pl-[0.4rem]! non-draggable-region`},ga=Vt(H({__name:`CuiWindowButtons`,setup(e){let{electron:t}=tt(),n=J(!1),r=J(!1);function i(){r.value||t?.send(`change-window`,`minify`)}function a(){t?.send(`change-window`,`close`)}function o(){t?.send(`change-window`,`expand`)}function s(e,t){r.value=t}return On(()=>{t?.on(`fullscreen`,s)}),Nn(()=>{t?.removeListener(`fullscreen`,s)}),(e,t)=>{let s=Jr,c=ma,l=da,u=ca;return Xn((L(),q(`div`,ha,[X(`div`,{class:`close-button`,onClick:a},[Z(s,{color:`#7f050a`,width:`100%`,height:`100%`,class:R([`transition-opacity opacity-0`,{"opacity-100":$(n)}])},null,8,[`class`])]),X(`div`,{class:R({"disabled-button":$(r),"minify-button":!$(r)}),onClick:i},[$(r)?W(``,!0):(L(),U(c,{key:0,color:`#995712`,width:`100%`,height:`100%`,class:R([`transition-opacity opacity-0`,{"opacity-100":$(n)}])},null,8,[`class`]))],2),X(`div`,{class:`expand-button`,style:Q(`${$(r)?`transform: rotate(45deg)`:`transform: rotate(-45deg)`}`),onClick:o},[$(r)?(L(),U(u,{key:1,color:`#0d650d`,width:`100%`,height:`100%`,class:R([`transition-opacity opacity-0`,{"opacity-100":$(n)}])},null,8,[`class`])):(L(),U(l,{key:0,color:`#0d650d`,width:`100%`,height:`100%`,class:R([`transition-opacity opacity-0`,{"opacity-100":$(n)}])},null,8,[`class`]))],4)])),[[$(gr),e=>n.value=e]])}}}),[[`__scopeId`,`data-v-d1e31a06`]]),_a={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function va(e,t){return L(),q(`svg`,_a,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z`},null,-1)]])}var ya=K({name:`mdi-chevron-up`,render:va}),ba={key:0,class:`shrink-0 relative left-[-9px]`},xa={key:1,class:`shrink-0`},Sa={key:2,class:`shrink-0`},Ca={key:0,class:`overflow-hidden flex-1 ml-10`},wa={class:`flex flex-row items-center justify-between`},Ta={class:`text-start flex-1`},Ea={key:0,class:`text-xs text-muted`},Da=Vt(H({__name:`CuiNavItem`,props:{label:{},to:{},expanded:{type:Boolean},description:{},icon:{},iconSize:{default:24},iconClass:{},labelClass:{},activeIcon:{},avatar:{},avatarSize:{default:24},showLogout:{type:Boolean},darkMode:{type:Boolean},buttonProps:{},showTooltip:{type:Boolean},fallbackActivePath:{},activeColor:{},activeIconColor:{},bottomBar:{type:Boolean}},setup(e){let t=e,n=pr(),r=Lt(),{icon:i,iconSize:a,iconClass:o,activeIcon:s,avatarSize:c,avatar:l,labelClass:u,label:d,description:f,expanded:p,to:m,showLogout:h,darkMode:g,buttonProps:ee,showTooltip:_,fallbackActivePath:b,activeColor:x,activeIconColor:te,bottomBar:S}=nr(t),C=G(()=>n.path===m.value||m.value!==`/`&&(n.path.startsWith(m.value+`/`)||n.path.startsWith((b.value??m.value)+`/`)));function ne(){r.logout()}return(e,t)=>{let n=rt,r=ti,b=v,re=Dn(`RouterLink`),ie=y;return L(),U(re,{to:$(m)},{default:Y(({isActive:e})=>[Xn((L(),U(b,Jn({text:``,severity:`secondary`,class:[`cui-button navitem-button w-full h-full flex items-center relative`,{"dark-mode":$(g),"!text-white navitem-active":(e||$(C))&&!$(l),"hover:!text-color active:!text-color focus:!text-color":!e&&!$(C),"navitem-inactive":!e&&!$(C)}],style:$(x)&&(e||$(C))?{"--navitem-active-color":$(x)}:void 0,fluid:``},$(ee)),{default:Y(()=>[X(`div`,{class:R([`flex items-center justify-center h-full`,{"absolute left-[14px]":!$(S)}])},[$(l)?(L(),q(`div`,ba,[Z(n,{src:$(l),size:$(c),style:Q({width:`${$(c)}px`,height:`${$(c)}px`})},null,8,[`src`,`size`,`style`])])):$(i)&&!e&&!$(C)||!$(s)?(L(),q(`div`,xa,[Z($(i),{class:R($(o)),style:Q({width:`${$(a)}px`,height:`${$(a)}px`,color:(e||$(C))&&$(te)?$(te):void 0})},null,8,[`class`,`style`])])):$(s)&&(e||$(C))?(L(),q(`div`,Sa,[Z($(s),{style:Q({width:`${$(a)}px`,height:`${$(a)}px`,color:$(te)})},null,8,[`style`])])):W(``,!0)],2),Z(I,{name:`fade`},{default:Y(()=>[$(p)?(L(),q(`div`,Ca,[X(`div`,wa,[X(`div`,Ta,[X(`div`,{class:R([`text-sm max-w-100 truncate font-semibold`,[$(u),{"text-color font-bold":$(l)}]])},z($(d)),3),$(f)?(L(),q(`div`,Ea,z($(f)),1)):W(``,!0)]),$(h)?(L(),U(b,{key:0,text:``,rounded:``,class:`dark-mode cui-icon-md`,onClick:Kn(ne,[`stop`,`prevent`])},{icon:Y(()=>[Z(r,{width:`100%`,height:`100%`})]),_:1})):W(``,!0)])])):W(``,!0)]),_:1})]),_:2},1040,[`class`,`style`])),[[ie,{value:$(_)&&!$(p)?$(d):``,pt:{root:{class:`dark-mode`}}}]])]),_:1},8,[`to`])}}}),[[`__scopeId`,`data-v-9e0c467b`]]),{isElectronApp:Oa}=tt(),ka=Oa?25:0,Aa={CLOSED:0,MINIFIED:60,EXPANDED:288},ja=Un({serverUpdateAvailable:!1,pluginUpdateAvailable:!1,serverUpdate:null,pluginUpdates:[]}),Ma=null,Na=null;async function Pa(){if(Na?.ready.value)try{let e=await Na.request(`get-updates`);ja.pluginUpdates=e.plugins,ja.pluginUpdateAvailable=e.plugins.length>0,ja.serverUpdate=e.server,ja.serverUpdateAvailable=e.server.updateAvailable||e.server.betaUpdateAvailable||!1}catch{}}function Fa(){return Na||(Ma=qn(!0),Ma.run(()=>{let e=Sn(`/server`);Na=e,e.on(`plugin-updates`,e=>{ja.pluginUpdates=e,ja.pluginUpdateAvailable=e.length>0}),e.on(`server-updates`,e=>{ja.serverUpdate=e,ja.serverUpdateAvailable=e.updateAvailable||e.betaUpdateAvailable||!1}),e.onReady(()=>{Pa()})}),Na)}function Ia(){function e(){Fa()}function t(){}return{isConnected:G(()=>Na?.connected.value??!1),serverUpdateAvailable:G(()=>ja.serverUpdateAvailable),pluginUpdateAvailable:G(()=>ja.pluginUpdateAvailable),serverUpdate:G(()=>ja.serverUpdate),pluginUpdates:G(()=>ja.pluginUpdates),connect:e,disconnect:t,fetchUpdates:Pa}}var La={class:`h-full flex flex-col overflow-y-scroll`},Ra={class:`w-full flex items-center shrink-0 h-[60px]`},za={class:`overflow-hidden w-full pr-4`},Ba={key:0,class:`ml-2 w-full flex flex-row items-center`},Va={class:`flex flex-col flex-1 my-4 px-1`},Ha={class:`flex flex-col space-y-1`},Ua={class:`flex flex-col space-y-1`},Wa={class:`w-full h-[50px]`},Ga={class:`flex items-center justify-center h-full absolute left-[14px]`},Ka={key:0,class:`flex flex-col space-y-1 overflow-hidden`},qa={class:`w-full h-[50px] relative`},Ja=Vt(H({__name:`CuiNavbar`,setup(e,{expose:t}){let r=_r(),{bus:i}=Mt(),{mdBreakpoint:a,xlBreakpoint:o}=on(),{navbarState:s}=Et(),{isElectronApp:c,electron:l}=tt(),{user:u}=hr(Lt()),{uiSettings:d}=hr(Rt()),f=Ia(),{data:p}=new ni().apiInfoQuery(),m=Bn(`navbarRef`),h=J(`closed`),g=J(!1),_=J(!1),y=J(!1),b=G(()=>p.value?.electron??!1),x=G(()=>c&&b.value),te=G(()=>{let e=d.value.interface.selectedSettingsView;return Kt.includes(e)?e:`account`}),S=e=>b.value&&!!e.meta?.disabledInElectron,C=G(()=>mn.filter(e=>e.meta?.navbar?.position===`top`&&e.meta&&ht(e)&&!S(e))),ne=G(()=>mn.filter(e=>e.meta?.navbar?.position===`bottom`&&ht(e)&&!S(e))),re=G(()=>ne.value.filter(e=>!e.meta?.navbar?.group)),ie=G(()=>ne.value.filter(e=>e.meta?.navbar?.group===`more`)),ae=G(()=>ie.value.some(e=>r.currentRoute.value.path===e.path||r.currentRoute.value.path.startsWith(e.path+`/`))),w=G(()=>d.value.interface.navbarStayCollapsed&&h.value!==`opened`?`closed`:o.value?`opened`:h.value),oe=G(()=>w.value===`closed`?a.value?Aa.CLOSED:Aa.MINIFIED:Aa.EXPANDED);function T(){y.value=!y.value,y.value?setTimeout(()=>{let e=m.value?.firstElementChild;e&&e.scrollTo({top:e.scrollHeight,behavior:`smooth`})},250):setTimeout(()=>E(),250)}function se(){i.emit({navbarState:`closed`})}function ce(e,t){x.value&&t.channel===`update-check`&&t.status===`available`&&(g.value=!0)}async function le(){if(x.value){l.removeListener(`app-status`,ce),l.on(`app-status`,ce),l.send(`check-for-updates`);try{let e=await l.invoke(`get-update-available`);g.value=e.isUpdateAvailable}catch{}}}function E(){Tn(()=>{let e=m.value?.querySelector(`.navitem-active`);e&&e.scrollIntoView({block:`center`,behavior:`smooth`})})}let ue=ve(E,100);return ee(m,e=>{if(w.value!==`opened`)return;let t=e.target,n=t.closest(`#menu-icon`),r=t.closest(`#submenu-icon`),i=t.closest(`#navbar-icon`);!n&&!r&&!i&&se()}),Ce(m,()=>{ue()}),F(ae,e=>{e&&(y.value=!0)},{immediate:!0}),F(f.serverUpdateAvailable,e=>{x.value||(g.value=e)},{immediate:!0}),F(x,e=>{e&&le()},{immediate:!0}),F(f.pluginUpdateAvailable,e=>{_.value=e}),F(s,e=>{e&&e!==h.value&&(h.value=e===`minified`||e===`closed`?`closed`:`opened`)},{immediate:!0}),F(r.currentRoute,(e,t)=>{e.path!==t.path&&se()}),F(u,()=>{u.value?.role===`admin`||u.value?.role===`master`?f.connect():f.disconnect()},{deep:!0,immediate:!0}),On(()=>{E()}),jn(()=>{l?.removeListener(`app-status`,ce)}),t({navbarState:w}),(e,t)=>{let r=Dn(`RouterLink`),i=n,o=Da,s=ei,c=ya,l=v;return L(),q(`nav`,{ref_key:`navbarRef`,ref:m,class:R([`navbar-background fixed transition-[width,left] duration-200 overflow-x-hidden overflow-y-scroll shadow shadow-black/20 overflow-hidden border-[1px] border-base-color rounded-[15px] [clip-path:inset(0_round_15px)] before:content-[''] before:absolute before:top-0 before:left-0 before:right-0 before:h-[20px] before:blur-2xl before:opacity-70 before:bg-primary-500 before:-z-1`,{"shadow-xl":$(a)&&$(oe)===$(Aa).EXPANDED}]),style:Q({top:`calc(max(8px, env(safe-area-inset-top, 0px)) + ${$(ka)}px)`,left:$(oe)===$(Aa).CLOSED?`-2px`:`max(8px, env(safe-area-inset-left, 0px))`,width:`${$(oe)}px`,height:`calc(100dvh - max(8px, env(safe-area-inset-top, 0px)) - max(8px, env(safe-area-inset-bottom, 0px)) - ${$(ka)}px)`,viewTransitionName:`cui-navbar`})},[X(`div`,La,[X(`div`,Ra,[Z(r,{to:`/home`,class:`pl-[13px]`},{default:Y(()=>[Z($(rr),{src:$(fn)(`logo_animated.svg`),width:`32px`,height:`32px`,title:`camera.ui`,"aria-label":`camera.ui`,class:`hover:scale-105 active:scale-105 focus:scale-105 transition-all non-draggable-region`},null,8,[`src`])]),_:1}),X(`div`,za,[Z(I,{name:`fade`},{default:Y(()=>[$(oe)===$(Aa).EXPANDED?(L(),q(`div`,Ba,[Z(r,{to:`/home`,class:`text-white font-bold text-lg text-shadow`},{default:Y(()=>[...t[0]||=[B(`camera.ui`,-1)]]),_:1})])):W(``,!0)]),_:1})])]),X(`div`,Va,[X(`div`,Ha,[(L(!0),q(V,null,M($(C),t=>(L(),q(`div`,{key:t.name,class:`w-full h-[50px] relative`},[$(_)&&t.name===`Plugins`?(L(),U(i,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):W(``,!0),Z(o,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:$(oe)===$(Aa).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:R([`w-[50px] h-[50px]`,{"w-full":$(oe)===$(Aa).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`label`,`expanded`,`class`])]))),128))]),t[2]||=X(`div`,{class:`flex-1 mt-10`},null,-1),X(`div`,Ua,[$(ie).length?(L(),q(V,{key:0},[X(`div`,Wa,[Z(l,{text:``,severity:`secondary`,class:R([`cui-button navitem-button w-full h-full flex items-center justify-center dark-mode`,{"!text-white navitem-active":$(y)||$(ae),"hover:!text-color active:!text-color focus:!text-color navitem-inactive":!$(y)&&!$(ae)}]),style:{color:`#a4a4a4`},onClick:T},{default:Y(()=>[X(`div`,Ga,[$(y)?(L(),U(s,{key:0,class:`w-[22px] h-[22px]`})):(L(),U(c,{key:1,class:`w-[22px] h-[22px]`}))])]),_:1},8,[`class`])]),Z(I,{name:`navbar-group`},{default:Y(()=>[$(y)?(L(),q(`div`,Ka,[(L(!0),q(V,null,M($(ie),t=>(L(),q(`div`,{key:t.name,class:`w-full h-[50px] relative`},[Z(o,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:$(oe)===$(Aa).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:R([`w-[50px] h-[50px]`,{"w-full":$(oe)===$(Aa).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`label`,`expanded`,`class`])]))),128))])):W(``,!0)]),_:1})],64)):W(``,!0),(L(!0),q(V,null,M($(re),t=>(L(),q(`div`,{key:t.name,class:`w-full h-[50px] relative`},[$(g)&&t.name===`Settings`?(L(),U(i,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):W(``,!0),Z(o,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path===`/settings`?`/settings/${$(te)}`:t.path,"fallback-active-path":t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:$(oe)===$(Aa).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:R([`w-[50px] h-[50px]`,{"w-full":$(oe)===$(Aa).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`fallback-active-path`,`label`,`expanded`,`class`])]))),128)),t[1]||=X(`div`,{class:`mb-4 mt-2`,style:{borderTop:`1px solid #313131`}},null,-1),X(`div`,qa,[Z(o,{avatar:`avatar`,label:$(u)?.username??`unknown`,description:$(u)?.role??`unknown`,expanded:$(oe)===$(Aa).EXPANDED,"show-logout":``,to:`/settings/account`,"dark-mode":``,"avatar-size":38,class:R([`w-[50px] h-[50px]`,{"w-full":$(oe)===$(Aa).EXPANDED}])},null,8,[`label`,`description`,`expanded`,`class`])])])])])],6)}}}),[[`__scopeId`,`data-v-d2e83278`]]),Ya={class:`px-2 h-full flex items-center justify-around`,style:{paddingBottom:`calc(max(8px, env(safe-area-inset-bottom, 0px)))`}},Xa=Vt(H({__name:`CuiBottombar`,setup(e,{expose:t}){let{bottombarHeight:n}=Et(),r=Bn(`bottombarRef`),i=G(()=>mn.filter(e=>e.meta?.bottombar&&e.meta.auth&&ht(e)));return t({bottombarRef:r}),(e,t)=>{let a=Da;return L(),q(`nav`,{ref_key:`bottombarRef`,ref:r,class:`cui-bottombar bottombar-background fixed bottom-0 left-0 right-0 border-t-[1px] border-color bottombar-background`,style:Q({height:`calc(${$(n)}px + env(safe-area-inset-bottom, 0px))`,viewTransitionName:`cui-bottombar`})},[X(`div`,Ya,[(L(!0),q(V,null,M($(i),e=>(L(),U(a,{key:e.name,icon:e.meta.bottombar.icon.default,"active-icon":e.meta.bottombar.icon.active,"active-icon-color":`var(--p-primary-color)`,to:e.path,label:``,expanded:!1,"icon-class":`text-color`,class:`w-[50px] h-[50px] transition-all duration-300`,"bottom-bar":``},null,8,[`icon`,`active-icon`,`to`]))),128))])],4)}}}),[[`__scopeId`,`data-v-b0d768aa`]]),Za={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Qa(e,t){return L(),q(`svg`,Za,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M8.463 15.538Q7 14.075 7 12t1.463-3.537T12 7t3.538 1.463T17 12t-1.463 3.538T12 17t-3.537-1.463M2 13q-.425 0-.712-.288T1 12t.288-.712T2 11h2q.425 0 .713.288T5 12t-.288.713T4 13zm18 0q-.425 0-.712-.288T19 12t.288-.712T20 11h2q.425 0 .713.288T23 12t-.288.713T22 13zm-8.712-8.287Q11 4.425 11 4V2q0-.425.288-.712T12 1t.713.288T13 2v2q0 .425-.288.713T12 5t-.712-.288m0 18Q11 22.426 11 22v-2q0-.425.288-.712T12 19t.713.288T13 20v2q0 .425-.288.713T12 23t-.712-.288M5.65 7.05L4.575 6q-.3-.275-.288-.7t.288-.725q.3-.3.725-.3t.7.3L7.05 5.65q.275.3.275.7t-.275.7t-.687.288t-.713-.288M18 19.425l-1.05-1.075q-.275-.3-.275-.712t.275-.688q.275-.3.688-.287t.712.287L19.425 18q.3.275.288.7t-.288.725q-.3.3-.725.3t-.7-.3M16.95 7.05q-.3-.275-.288-.687t.288-.713L18 4.575q.275-.3.7-.288t.725.288q.3.3.3.725t-.3.7L18.35 7.05q-.3.275-.7.275t-.7-.275M4.575 19.425q-.3-.3-.3-.725t.3-.7l1.075-1.05q.3-.275.712-.275t.688.275q.3.275.288.688t-.288.712L6 19.425q-.275.3-.7.288t-.725-.288`},null,-1)]])}var $a=K({name:`material-symbols-light-mode-rounded`,render:Qa}),eo={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function to(e,t){return L(),q(`svg`,eo,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M12 21q-3.75 0-6.375-2.625T3 12t2.625-6.375T12 3q.35 0 .688.025t.662.075q-1.025.725-1.638 1.888T11.1 7.5q0 2.25 1.575 3.825T16.5 12.9q1.375 0 2.525-.613T20.9 10.65q.05.325.075.662T21 12q0 3.75-2.625 6.375T12 21`},null,-1)]])}var no=K({name:`material-symbols-dark-mode`,render:to}),ro={viewBox:`0 0 48 48`,width:`1.2em`,height:`1.2em`},io=[`id`],ao=[`mask`];function oo(e,t){return L(),q(`svg`,ro,[X(`defs`,null,[X(`mask`,{id:e.idMap.SVGh8KaKdEb},[...t[0]||=[X(`g`,{fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`4`},[X(`path`,{fill:`#fff`,stroke:`#fff`,d:`m24.003 4l5.27 5.27h9.457v9.456l5.27 5.27l-5.27 5.278v9.456h-9.456L24.004 44l-5.278-5.27H9.27v-9.456L4 23.997l5.27-5.27V9.27h9.456z`}),X(`path`,{fill:`#000`,stroke:`#000`,d:`M27 17c0 8-5 9-10 9c0 4 6.5 8 12 4s2-13-2-13`})],-1)]],8,io)]),X(`path`,{fill:`currentColor`,d:`M0 0h48v48H0z`,mask:`url(#`+e.idMap.SVGh8KaKdEb+`)`},null,8,ao)])}var so=K({name:`icon-park-solid-dark-mode`,render:oo,setup(){return{idMap:{SVGh8KaKdEb:`uicons-`+Math.random().toString(36).substr(2,10)}}}}),co=H({__name:`CuiThemeSwitch`,setup(e){let t=ri(),{theme:n,autoMode:r}=hr(t);function i(){t.toggleTheme()}return(e,t)=>{let a=so,o=no,s=$a,c=v;return L(),U(c,{severity:`secondary`,text:``,class:`cui-button p-2 text-color`,onClick:i},{default:Y(()=>[$(r)?(L(),U(a,{key:0,class:`w-6 h-6`})):$(n)===`dark`?(L(),U(o,{key:1,class:`w-6 h-6`})):$(n)===`light`?(L(),U(s,{key:2,class:`w-6 h-6`})):W(``,!0)]),_:1})}}}),lo={class:`relative flex overflow-hidden items-center justify-center w-5 h-5`},uo={class:`flex flex-col justify-between w-4 h-3 transform transition-all duration-100 origin-center overflow-hidden`},fo=H({__name:`CuiNavbarToggle`,setup(e){let{bus:t}=Mt(),{navbarState:n}=Et(),{xlBreakpoint:r}=on(),{uiSettings:i}=hr(Rt()),a=J(`closed`),o=G(()=>a.value===`opened`);function s(){t.emit({navbarState:a.value===`opened`?`closed`:`opened`})}return F(n,e=>{e&&e!==a.value&&(a.value=e===`minified`||e===`closed`?`closed`:`opened`)},{immediate:!0}),(e,t)=>{let n=v;return!$(r)||$(i).interface.navbarStayCollapsed?(L(),U(n,{key:0,id:`menu-icon`,class:`cui-button relative group p-2 transition-colors duration-100`,severity:`secondary`,text:``,onClick:s},{default:Y(()=>[X(`div`,lo,[X(`div`,uo,[X(`div`,{class:R([`h-0.5 w-2 transform transition-all duration-100 origin-center`,{"w-4 rotate-45 translate-y-[5px]":$(o)}]),style:{backgroundColor:`var(--text-color)`}},null,2),X(`div`,{class:R([`h-0.5 w-4 rounded transform transition-all duration-100`,{"opacity-0":$(o)}]),style:{backgroundColor:`var(--text-color)`}},null,2),X(`div`,{class:R([`h-0.5 w-3 transform transition-all duration-100 origin-center`,{"w-4 -rotate-45 -translate-y-[5px]":$(o)}]),style:{backgroundColor:`var(--text-color)`}},null,2)])])]),_:1})):W(``,!0)}}}),po={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function mo(e,t){return L(),q(`svg`,po,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M.41 13.41L6 19l1.41-1.42L1.83 12m20.41-6.42L11.66 16.17L7.5 12l-1.43 1.41L11.66 19l12-12M18 7l-1.41-1.42l-6.35 6.35l1.42 1.41z`},null,-1)]])}var ho=K({name:`mdi-check-all`,render:mo}),go={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function _o(e,t){return L(),q(`svg`,go,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M22.11 21.46L2.39 1.73L1.11 3l4.72 4.72A7 7 0 0 0 5 11v6l-2 2v1h15.11l2.73 2.73zM7 18v-7c0-.61.11-1.21.34-1.77L16.11 18zm3 3h4a2 2 0 0 1-2 2a2 2 0 0 1-2-2M8.29 5.09c.53-.34 1.11-.59 1.71-.8V4a2 2 0 0 1 2-2a2 2 0 0 1 2 2v.29c2.97.88 5 3.61 5 6.71v4.8l-2-2V11a5 5 0 0 0-5-5c-.78 0-1.55.2-2.24.56z`},null,-1)]])}var vo=K({name:`mdi-bell-off-outline`,render:_o}),yo={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function bo(e,t){return L(),q(`svg`,yo,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M8.352 20.242A4.63 4.63 0 0 0 12 22a4.63 4.63 0 0 0 3.648-1.758a27.2 27.2 0 0 1-7.296 0M18.75 9v.704c0 .845.24 1.671.692 2.374l1.108 1.723c1.011 1.574.239 3.713-1.52 4.21a25.8 25.8 0 0 1-14.06 0c-1.759-.497-2.531-2.636-1.52-4.21l1.108-1.723a4.4 4.4 0 0 0 .693-2.374V9c0-3.866 3.022-7 6.749-7s6.75 3.134 6.75 7`},null,-1)]])}var xo=K({name:`solar-bell-bold`,render:bo}),So=`/pwa/favicon-64.ico`,Co=64,wo=`#ea5455`,To=14,Eo=null,Do=null,Oo=null,ko=!1,Ao=0;function jo(){return Eo??=Array.from(document.querySelectorAll(`link[rel="icon"]`)).map(e=>({el:e,href:e.href,type:e.type})),Eo}function Mo(){return Do??=new Promise((e,t)=>{let n=new Image;n.onload=()=>e(n),n.onerror=()=>t(Error(`failed to load ${So}`)),n.src=So}),Do}function No(e){let t=document.createElement(`canvas`);t.width=Co,t.height=Co;let n=t.getContext(`2d`);return n?(n.drawImage(e,0,0,Co,Co),n.beginPath(),n.arc(Co-To-1,Co-To-1,To,0,Math.PI*2),n.fillStyle=wo,n.fill(),t.toDataURL(`image/png`)):null}async function Po(e){if(typeof document>`u`)return;let t=++Ao;if(e===ko)return;let n=jo();if(n.length!==0){if(!e){ko=!1;for(let{el:e,href:t,type:r}of n)e.href=t,e.type=r;return}if(!Oo)try{Oo=No(await Mo())}catch{return}if(!(!Oo||t!==Ao)){ko=!0;for(let{el:e}of n)e.href=Oo,e.type=`image/png`}}}var Fo=100,Io=Un({notifications:[]}),Lo=null,Ro=null;function zo(){return Ro||(Lo=qn(!0),Lo.run(()=>{let e=Sn(`/notifications`);Ro=e,e.on(`notification`,e=>{if(e.tag){let t=Io.notifications.findIndex(t=>t.tag===e.tag);t!==-1&&Io.notifications.splice(t,1)}Io.notifications.unshift(e),Io.notifications.length>Fo&&(Io.notifications.length=Fo),Bo(e)}),e.on(`history`,e=>{Io.notifications=e}),e.onReady(()=>{Ho()}),F(()=>Io.notifications.filter(e=>e.seenAt==null).length,e=>{Vo(e),Po(e>0)},{immediate:!0})}),Ro)}function Bo(e){let{isElectronApp:t,electron:n}=tt();!t||!n||n.send(`show-notification`,{id:e.id,title:e.title,subtitle:e.subtitle,body:e.body,deepLink:e.deepLink,tag:e.tag,severity:e.severity})}async function Vo(e){let{isElectronApp:t,electron:n}=tt();t&&n&&n.send(`set-badge-count`,e)}async function Ho(){if(Ro?.ready.value)try{Io.notifications=await Ro.request(`get-notifications`)}catch{}}function Uo(){function e(){zo()}function t(){}function n(e){let t=Io.notifications.findIndex(t=>t.id===e.id);t!==-1&&Io.notifications.splice(t,1),e.tag&&Ro?.emit(`remove-notification`,e.tag)}function r(){Io.notifications.splice(0,Io.notifications.length),Ro?.emit(`clear-notifications`)}function i(){let e=Date.now();for(let t of Io.notifications)t.seenAt??=e;Ro?.emit(`mark-all-seen`)}function a(e){let t=Io.notifications.find(t=>t.id===e.id);t&&t.seenAt==null&&(t.seenAt=Date.now()),Ro?.emit(`mark-seen`,e.id)}function o(e){Io.notifications.find(t=>t.id===e.id)||Io.notifications.unshift(e)}return{isConnected:G(()=>Ro?.connected.value??!1),notifications:G(()=>Io.notifications),notificationCount:G(()=>Io.notifications.length),unreadCount:G(()=>Io.notifications.filter(e=>e.seenAt==null).length),connect:e,disconnect:t,fetchNotifications:Ho,removeNotification:n,clearNotifications:r,markAllSeen:i,markSeen:a,addLocalNotification:o}}function Wo(){Lo?.stop(),Lo=null,Ro=null,Io.notifications=[]}var Go={key:0,class:`flex items-center justify-center py-8`},Ko={key:1,class:`flex flex-col items-center text-center gap-3 py-6 px-2`},qo={class:`text-sm font-semibold text-color`},Jo={class:`text-xs text-muted mt-1`},Yo={class:`flex justify-between items-center mb-4 h-9`},Xo={class:`flex items-center gap-2`},Zo={class:`text-base font-semibold`},Qo={class:`flex items-center gap-1`},$o={class:`overflow-y-auto`,style:{maxHeight:`234px`}},es={class:`flex gap-3`},ts={class:`flex-1 min-w-0`},ns={class:`flex justify-between items-center gap-2`},rs={class:`flex items-center gap-1.5 shrink-0`},is={key:0,class:`w-2 h-2 rounded-full bg-primary-500`},as={class:`text-xs text-muted`},os={class:`text-xs text-muted mt-1 text-left line-clamp-2 overflow-hidden`},ss={key:0,class:`text-center py-8 text-muted text-sm`},cs=H({__name:`CuiNotificationMenu`,setup(e){let t=_r(),r=Xe(),{t:i}=ye(),{isTouch:a}=Wt(),{isElectronApp:o,electron:s}=tt(),c=new ai,l=Uo(),{data:u,isLoading:d}=c.getSettingsQuery(),f=Bn(`notificationsMenuRef`),p=J({}),m=G(()=>l.notifications.value),h=G(()=>l.unreadCount.value),g=G(()=>u.value?.enabled??!1),_=G(()=>!d.value||u.value!==void 0);function b(e,[t]){if(!t.isIntersecting){p.value[e]?.resetFn(),p.value[e]?.stopFn(),delete p.value[e];return}if(p.value[e])return;let n=t.target;if(!n.parentElement)return;let r=ee(n,()=>{p.value[e]&&p.value[e].resetFn()}),i,{direction:o,stop:s}=(a.value?Ae:Ne)(n,{threshold:10,disableTextSelect:!0,onSwipe(){for(let t in p.value)t!==e&&p.value[t]?.resetFn();o.value===`left`?p.value[e]={left:`-75px`,opacity:1,deleteOpacity:1,isSwiping:!0,resetFn(){this.left=`0`,this.opacity=1,this.deleteOpacity=0},stopFn:()=>{delete p.value[e],s(),r(),clearTimeout(i)}}:p.value[e]?.resetFn()},onSwipeEnd(){clearTimeout(i),i=setTimeout(()=>{p.value[e]&&(p.value[e].isSwiping=!1)},10)}})}function x(e){f.value?.toggle(e)}function S(){l.markAllSeen()}function C(e){l.markSeen(e)}function ne(){f.value?.hide(),t.push({path:`/settings/notifications`})}function re(e){let t=Date.now()-e,n=Math.floor(t/(1e3*60)),r=Math.floor(t/(1e3*60*60)),a=Math.floor(t/(1e3*60*60*24));return n<60?`${n}${i(`components.notification_menu.short_minutes`)}`:r<24?`${r}${i(`components.notification_menu.short_hours`)}`:a<7?`${a}${i(`components.notification_menu.short_days`)}`:a<30?`${Math.floor(a/7)}${i(`components.notification_menu.short_weeks`)}`:a<365?`${Math.floor(a/30)}${i(`components.notification_menu.short_months`)}`:`${Math.floor(a/365)}${i(`components.notification_menu.short_years`)}`}function ie(e){let n=e.deepLink;f.value?.hide(),ae(e),n&&t.push(n)}function ae(e){e&&(p.value[e.id]?.stopFn(),l.removeNotification(e))}function w(){for(let e in p.value)p.value[e]?.stopFn();l.clearNotifications()}function oe(e){switch(e){case Ve.Info:return`rgb(33, 150, 243)`;case Ve.Warn:return`rgb(251, 140, 0)`;case Ve.Error:case Ve.Critical:return`rgb(176, 0, 32)`;default:return`rgb(69, 69, 69)`}}function T(e){if(p.value[e.id]?.isSwiping)return;let t=[e.subtitle,e.body].filter(Boolean).join(`
3
- `);r.openTextDialog({data:{title:e.title,contentText:t,confirmText:e?.deepLink?i(`components.form.button.go_to_message`):i(`components.form.button.mark_as_read`)},onConfirm:()=>ie(e),onCancel:()=>ae(e)})}function se(){for(let e in p.value)p.value[e]?.resetFn(),p.value[e]?.stopFn()}function ce(){return{id:`electron-update`,title:`Update`,body:`New camera.ui app update available`,severity:Ve.Info,deepLink:`/settings/system`,tag:`electron-update`,createdAt:Date.now(),seenAt:null,source:{kind:`system`,id:`system.electron.update_available`}}}function le(e,t){o&&t.channel===`update-check`&&t.status===`available`&&l.addLocalNotification(ce())}async function E(){if(o){s.removeListener(`app-status`,le),s.on(`app-status`,le),s.send(`check-for-updates`);try{(await s.invoke(`get-update-available`)).isUpdateAvailable&&l.addLocalNotification(ce())}catch{}}}return F(g,e=>{e?l.connect():Wo()},{immediate:!0}),On(()=>{o&&E()}),jn(()=>{s?.removeListener(`app-status`,le)}),(e,t)=>{let r=xo,i=n,a=v,o=ze,s=vo,c=ho,l=ii,u=st,d=Or,ee=te,ie=y;return L(),q(`div`,null,[Z(a,{severity:`secondary`,text:``,class:`cui-button p-2 text-color`,onClick:x},{icon:Y(()=>[Z(r,{class:`w-6 h-6`}),$(g)&&$(h)?(L(),U(i,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] right-[10px] top-[7px]`})):W(``,!0)]),_:1}),Z(ee,{ref_key:`notificationsMenuRef`,ref:f,"append-to":`self`,class:`w-[20rem] shadow-lg cui-rounded-corner notification-menu isolate overscroll-contain non-draggable-region`,onHide:se},{default:Y(()=>[$(_)?$(g)?(L(),q(V,{key:2},[X(`div`,Yo,[X(`div`,Xo,[X(`h3`,Zo,z(e.$t(`components.notification_menu.notifications`)),1),Z(i,{class:`rounded-full text-xs p-1`,value:$(m).length>99?`99+`:String($(m).length)},null,8,[`value`])]),X(`div`,Qo,[$(h)?Xn((L(),U(a,{key:0,severity:`secondary`,text:``,rounded:``,class:`p-2 cui-icon-md`,onClick:S},{icon:Y(()=>[Z(c,{width:`100%`,height:`100%`})]),_:1})),[[ie,{value:e.$t(`components.notification_menu.mark_all_read`)},void 0,{left:!0}]]):W(``,!0),$(m).length?Xn((L(),U(a,{key:1,severity:`danger`,text:``,rounded:``,class:`p-2 cui-icon-md`,onClick:w},{icon:Y(()=>[Z(l,{width:`100%`,height:`100%`})]),_:1})),[[ie,{value:e.$t(`components.notification_menu.clear_notifications`)},void 0,{left:!0}]]):W(``,!0)])]),X(`div`,$o,[(L(!0),q(V,null,M($(m),t=>(L(),q(`div`,{key:t.id,class:`relative overflow-hidden`},[Xn((L(),q(`div`,{class:`relative transition-all duration-200`,style:Q({left:$(p)[t.id]?.left||`0`,opacity:$(p)[t.id]?.opacity||1})},[Z(a,{severity:`secondary`,text:``,class:`cui-button p-2 block w-full`,onClick:e=>T(t)},{default:Y(()=>[X(`div`,es,[X(`div`,{class:`w-2 h-2 rounded-full mt-2`,style:Q({backgroundColor:oe(t.severity)})},null,4),X(`div`,ts,[X(`div`,ns,[X(`h4`,{class:R([`text-sm truncate max-w-[200px]`,t.seenAt==null?`font-semibold text-color`:`font-medium text-muted`])},z(t.title),3),X(`div`,rs,[t.seenAt==null?(L(),q(`span`,is)):W(``,!0),X(`span`,as,z(re(t.createdAt)),1)])]),X(`p`,os,z(t.subtitle||t.body),1)])])]),_:2},1032,[`onClick`])],4)),[[$(mr),e=>b(t.id,e)]]),X(`div`,{class:`absolute right-0 top-0 h-full flex items-center gap-1 pr-4`,style:Q({opacity:$(p)[t.id]?.deleteOpacity||0,pointerEvents:($(p)[t.id]?.deleteOpacity||0)>0?`auto`:`none`})},[t.seenAt==null?Xn((L(),U(a,{key:0,severity:`secondary`,class:`cui-icon-sm`,text:``,rounded:``,onClick:e=>C(t)},{icon:Y(()=>[Z(u,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[ie,{value:e.$t(`components.notification_menu.mark_read`)},void 0,{left:!0}]]):W(``,!0),Xn((L(),U(a,{severity:`danger`,class:`cui-icon-sm`,text:``,rounded:``,onClick:e=>ae(t)},{icon:Y(()=>[Z(l,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[ie,{value:e.$t(`components.notification_menu.delete`)},void 0,{left:!0}]])],4),$(m).indexOf(t)===$(m).length-1?W(``,!0):(L(),U(d,{key:0,class:`my-0 py-1`}))]))),128))]),$(m).length===0?(L(),q(`div`,ss,z(e.$t(`components.notification_menu.no_notifications`)),1)):W(``,!0)],64)):(L(),q(`div`,Ko,[Z(s,{class:`w-8 h-8 text-muted`}),X(`div`,null,[X(`h3`,qo,z(e.$t(`components.notification_menu.disabled`)),1),X(`p`,Jo,z(e.$t(`components.notification_menu.disabled_hint`)),1)]),Z(a,{class:`cui-button-small`,label:e.$t(`components.notification_menu.open_settings`),onClick:ne},null,8,[`label`])])):(L(),q(`div`,Go,[Z(o,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})]))]),_:1},512)])}}}),ls={key:0},us={class:`text-sm font-medium truncate max-w-40 pointer-events-none`},ds=H({__name:`CuiInstanceSwitcher`,setup(e){let{t}=ye(),{smBreakpoint:n}=on(),r=qe(),i={style:`background: color-mix(in srgb,var(--p-red-500),transparent 84%); color: var(--p-red-400);`},a=Bn(`menuRef`),o=Un({}),s=null,c=G(()=>{let e=r.activeInstance,n=!r.isHomeActive||r.redirectInfo,a={label:e.name,position:`header`,active:!0},s=r.favoriteInstances.filter(e=>e.id!==r.activeId).map(e=>{let t=o[e.id],n=e.hasCredentials&&t===`checking`,a=e.hasCredentials&&t===`offline`,s,c;return a&&(s=`Offline`,c=i),{label:e.name,badge:s,badgeProps:c,loading:n,disabled:n||a,onClick:()=>r.switchInstance(e.id)}}),c=n?[{label:t(`components.instance_switcher.go_back`),icon:at,position:`footer`,onClick:()=>{let e=r.redirectInfo;e?window.location.href=e.sourceUrl:r.switchInstance(null)}}]:[],l={label:t(`components.instance_switcher.manage`),icon:ct,position:`footer`,to:`/instances`};return[a,...s,...c,l]});function l(){s?.abort(),s=new AbortController;let{signal:e}=s,t=r.favoriteInstances.filter(e=>e.id!==r.activeId&&e.hasCredentials);for(let e of t)o[e.id]=`checking`;for(let n of t)r.probeInstance(n.id,e).then(t=>{e.aborted||(o[n.id]=t?`online`:`offline`)}).catch(()=>{e.aborted||(o[n.id]=`offline`)})}return(e,t)=>{let i=it,o=v,s=ei,u=ya,d=Qe;return $(r).isMultiInstance?(L(),q(`div`,ls,[$(n)?(L(),U(o,{key:0,severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:$(a)?.toggleMenu},{icon:Y(()=>[Z(i,{class:`w-6 h-6`})]),_:1},8,[`onClick`])):(L(),U(o,{key:1,severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:$(a)?.toggleMenu},{default:Y(()=>[Z(i,{class:`w-5 h-5 shrink-0 pointer-events-none`}),X(`span`,us,z($(r).activeInstance?.name??`Local`),1),$(a)?.isOpen?$(a)?.isOpen?(L(),U(u,{key:1,class:`w-4 h-4 opacity-60 shrink-0 pointer-events-none`})):W(``,!0):(L(),U(s,{key:0,class:`w-4 h-4 opacity-60 shrink-0 pointer-events-none`}))]),_:1},8,[`onClick`])),Z(d,{ref_key:`menuRef`,ref:a,items:$(c),popover:{appendTo:`body`,pt:{root:{class:`w-[18rem]`},content:{class:`p-0! rounded-xl! overflow-hidden!`}}},onShow:l,dividers:`sections`},null,8,[`items`])])):W(``,!0)}}}),fs={key:0,class:`flex flex-row items-center flex-1 p-2 gap-1`},ps={class:`flex-1 flex items-center justify-start min-w-0`},ms={key:0,class:`cui-topbar-default font-semibold text-xl truncate`},hs={class:`flex-1 flex items-center justify-end min-w-0`},gs={class:`cui-topbar-default`},_s=Vt(H({__name:`CuiTopbar`,props:{offsetLeft:{},animate:{type:Boolean},background:{}},setup(e){let t=e,n=_r(),{smBreakpoint:r}=on(),{hasSlot:i,scrollToTop:a}=Ge(),{minifiedTopbar:o}=$t(),{topbarHeight:s}=Et(),{isElectronApp:c}=tt(),{isMultiInstance:l}=hr(qe()),{offsetLeft:u,animate:d}=nr(t);return(e,t)=>{let f=ds,p=cs,m=fo,h=co;return L(),q(`header`,{class:R([`cui-topbar fixed flex flex-row items-center top-0 left-0 right-0 pt-safe pr-safe draggable-region`,{"!border-none":$(r)}]),style:Q({height:`calc(${$(s)}px + env(safe-area-inset-top, 0px) + ${$(c)?`30px`:`0px`})`,viewTransitionName:`cui-topbar`,background:$(r)?`var(--ground-background)`:void 0,paddingTop:$(c)?`calc(30px + env(safe-area-inset-top, 0px))`:void 0})},[$(r)&&!$(o)?(L(),q(`div`,fs,[X(`div`,ps,[!$(i)(`left`)&&(`hasPermission`in e?e.hasPermission:$(ht))(void 0,`admin`)&&$(n).currentRoute.value.name===`Home`&&$(l)?(L(),U(f,{key:0,class:`cui-topbar-default non-draggable-region`})):W(``,!0),t[1]||=X(`div`,{id:`cui-topbar-left`,class:`cui-topbar-slot non-draggable-region`},null,-1)]),X(`div`,{class:`shrink-0 flex items-center justify-center min-w-0 cursor-pointer`,onClick:t[0]||=(...e)=>$(a)&&$(a)(...e)},[t[2]||=X(`div`,{id:`cui-topbar-center`,class:`cui-topbar-slot truncate non-draggable-region`},null,-1),$(i)(`center`)?W(``,!0):(L(),q(`span`,ms,z(e.$t(`views.${String(e.$route.name).toLowerCase()}.title`)),1))]),X(`div`,hs,[t[3]||=X(`div`,{id:`cui-topbar-right`,class:`cui-topbar-slot non-draggable-region`},null,-1),X(`div`,gs,[Z(p,{class:`non-draggable-region`})])])])):$(o)?W(``,!0):(L(),q(`div`,{key:1,class:`flex flex-row items-center flex-1 p-2`,style:Q({"margin-left":`calc(${$(u)}px + max(8px, env(safe-area-inset-left, 0px)))`,transition:$(d)?`margin-left 200ms`:void 0})},[Z(m,{class:`non-draggable-region`}),(`hasPermission`in e?e.hasPermission:$(ht))(void 0,`admin`)&&$(l)?(L(),U(f,{key:0,class:`non-draggable-region`})):W(``,!0),$(dt)()?W(``,!0):(L(),U(h,{key:1,class:`ml-auto non-draggable-region`})),Z(p,{class:R([`non-draggable-region`,{"ml-auto":$(dt)()}])},null,8,[`class`])],4))],6)}}}),[[`__scopeId`,`data-v-1c767220`]]),vs={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ys(e,t){return L(),q(`svg`,vs,[...t[0]||=[X(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M10 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4m-8-2l8-8m0 0v5m0-5h-5`},null,-1)]])}var bs=K({name:`majesticons-open`,render:ys}),xs={class:`flex flex-col gap-2 w-full`},Ss={for:`sensorDisplayName`,class:`cui-label`},Cs=H({__name:`RenameSensor`,props:{currentDisplayName:{}},setup(e,{expose:t}){let n=J(e.currentDisplayName);return t({onConfirm:async()=>n.value.trim()||null}),(e,t)=>{let r=_;return L(),q(`div`,xs,[X(`label`,Ss,z(e.$t(`components.camera_options.sensor_display_name`)),1),Z(r,{id:`sensorDisplayName`,modelValue:$(n),"onUpdate:modelValue":t[0]||=e=>Hn(n)?n.value=e:null,class:`w-full`,autofocus:``},null,8,[`modelValue`])])}}}),ws={class:`p-4 flex flex-col gap-2`},Ts={key:0,class:`w-full flex items-center justify-center py-8`},Es={class:`cui-label`},Ds={key:0,class:`flex flex-col gap-2`},Os={class:`cui-label`},ks={class:`text-sm text-muted text-center min-h-[30px]`},As={class:`cui-label`},js={class:`cui-label`},Ms={key:0,class:`w-full flex items-center justify-center my-5`},Ns={key:1,class:`text-sm text-muted text-center`},Ps={key:1,class:`flex flex-col gap-2`},Fs={class:`cui-label`},Is={class:`text-sm text-muted text-center min-h-[30px]`},Ls={class:`cui-label`},Rs={class:`cui-label`},zs={key:0,class:`w-full flex items-center justify-center my-5`},Bs={key:1,class:`text-sm text-muted text-center`},Vs={key:2,class:`flex flex-col gap-2`},Hs={class:`cui-label`},Us={class:`text-sm text-muted text-center min-h-[30px]`},Ws={class:`cui-label`},Gs={class:`cui-label`},Ks={class:`cui-label`},qs={key:0,class:`w-full flex items-center justify-center my-5`},Js={key:1,class:`text-sm text-muted text-center`},Ys={class:`cui-label`},Xs={key:2,class:`text-sm text-muted text-center min-h-[30px]`},Zs={class:`cui-label`},Qs={key:0,class:`w-full flex items-center justify-center my-5`},$s={key:1,class:`text-sm text-muted text-center`},ec={class:`cui-label`},tc={class:`cui-label`},nc={key:0,class:`w-full flex items-center justify-center my-5`},rc={key:1,class:`text-sm text-muted text-center`},ic={key:3,class:`flex flex-col gap-2`},ac={class:`cui-label`},oc={class:`text-sm text-muted text-center min-h-[30px]`},sc={class:`cui-label`},cc={class:`cui-label`},lc={class:`cui-label`},uc={key:0,class:`w-full flex items-center justify-center my-5`},dc={key:1,class:`text-sm text-muted text-center`},fc={class:`cui-label`},pc={key:2,class:`text-sm text-muted text-center min-h-[30px]`},mc={class:`cui-label`},hc={key:0,class:`w-full flex items-center justify-center my-5`},gc={key:1,class:`text-sm text-muted text-center`},_c={key:4,class:`flex flex-col gap-2`},vc={class:`cui-label`},yc={class:`text-sm text-muted text-center min-h-[30px]`},bc={class:`cui-label`},xc={class:`cui-label`},Sc={class:`cui-label`},Cc={key:0,class:`w-full flex items-center justify-center my-5`},wc={key:1,class:`text-sm text-muted text-center`},Tc={class:`cui-label`},Ec={key:2,class:`text-sm text-muted text-center min-h-[30px]`},Dc={class:`cui-label`},Oc={key:0,class:`w-full flex items-center justify-center my-5`},kc={key:1,class:`text-sm text-muted text-center`},Ac={key:5,class:`flex flex-col gap-2`},jc={class:`cui-label`},Mc={key:0,class:`w-full flex items-center justify-center`},Nc={key:1,class:`text-sm text-muted text-center`},Pc={key:1,class:`w-full h-full`},Fc={class:`cui-list-item`},Ic=H({__name:`Plugins`,props:{camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},emits:[`close`],setup(e){let t=ar().filter(e=>e!==S.ObjectAssist),n=sr(),r=ir(),i=new Yt,o=new fi,s=e,c=tn(),l=Xe(),{t:u}=ye(),{camera:d,cameraDevice:f,loading:p}=nr(s),{data:m,isBusy:h}=o.getPluginsQuery({page:1,pageSize:-1}),{data:g,isBusy:ee,suspense:_}=i.getCameraExtensionsQuery(d.value.name),{data:b,isBusy:x}=i.getCameraRegisteredSensorsQuery(d.value.name),{data:te,isBusy:C}=o.getPluginsExtensionsQuery({page:1,pageSize:-1}),{mutateAsync:ne,isPending:re}=i.enableCameraExtensionQuery(),{mutateAsync:ie,isPending:ae}=i.disableCameraExtensionQuery(),{mutateAsync:w,isPending:oe}=i.activateCameraExtensionQuery(),{mutateAsync:T,isPending:se}=i.deactivateCameraExtensionQuery(),{sensors:ce}=He(f),le=Bn(`schemaRef`),E=J(`hub`),ue=J([`hub`,`detection`,`core`,`accessories`,`more`]),D=J(``),pe=J(),me=J(),he=J(),ge=J(),_e=J(),ve=J(),O=J(),k=J(),A=J(),be=J(),xe=J(),Se=G(()=>{if(!k.value)return``;let e=Oe.value.find(e=>e.id===k.value);return e?.pluginId&&Mt(e.pluginId)||``}),Ce=G(()=>k.value&&Oe.value.find(e=>e.id===k.value)?.pluginId||``),we=G(()=>g.value?.filter(e=>r.some(t=>e.contract.provides.includes(t)))||[]),j=G(()=>{let e=new Set;for(let t of we.value)for(let n of r)t.contract.provides.includes(n)&&e.add(n);return Array.from(e).filter(At).sort((e,t)=>{let n=u(`components.camera_options.sensor_type_${e}`),r=u(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),Te=G(()=>{let e=O.value;return e?Pt(g.value?.filter(t=>t.contract.provides.includes(e)&&kt(t,e))||[]):[]}),Ee=G(()=>O.value?cr(O.value):!1),De=G(()=>{if(!O.value)return[];let e=lr(O.value),t=d.value.assignments[e],n=[];Array.isArray(t)?n=t.map(e=>e.name):t&&typeof t==`object`&&`name`in t&&(n=[t.name]);let r=Te.value.map(e=>e.pluginName);return n.sort((e,t)=>r.indexOf(e)-r.indexOf(t))}),Oe=G(()=>ce.value.filter(e=>e.type===O.value).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))),ke=de(f,D),Ae=ke.config,je=ke.isLoading,Me=Le(f,k,Ce),Ne=Me.config,Pe=Me.isLoading,Fe=G(()=>h.value||C.value||ee.value||x.value),Ie=G(()=>ee.value||C.value||re.value||ae.value||oe.value||se.value),Re=G(()=>Ie.value||p.value||ke.isLoading.value||Me.isLoading.value||ct.isLoading.value||dt.isLoading.value||yt.isLoading.value||St.isLoading.value||Tt.isLoading.value),Ve=G(()=>(te.value?.result.filter(e=>fe(e.contract)&&e.pluginName===d.value.pluginInfo?.name)||[])[0]),Ue=G(()=>Pt(g.value?.filter(e=>a(e.contract))||[])),We=G(()=>Ve.value&&Nt(Ve.value.pluginName)?[Ve.value]:[]),Ge=G(()=>g.value?.filter(e=>t.some(t=>e.contract.provides.includes(t)))||[]),Ke=G(()=>{let e=new Set;for(let n of Ge.value)for(let r of t)n.contract.provides.includes(r)&&e.add(r);return Array.from(e).filter(At).sort((e,t)=>{let n=u(`components.camera_options.sensor_type_${e}`),r=u(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),qe=G(()=>{let e=me.value;return e?Pt(g.value?.filter(t=>t.contract.provides.includes(e)&&kt(t,e))||[]):[]}),Je=G(()=>ce.value.filter(e=>e.type===me.value&&e.id!==mt.value?.id).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))),Ye=G(()=>{if(!A.value)return``;let e=Je.value.find(e=>e.id===A.value);return e?.pluginId&&Mt(e.pluginId)||``}),Ze=G(()=>{let e=Ft(S.ObjectAssist);return e&&Nt(e.name)?e.name:void 0}),Qe=G(()=>{let e=Ft(S.Object);return e?(b.value??[]).find(t=>t.type===S.Object&&Mt(t.pluginId||``)===e.name)?.requiresFrames===!1:!1}),$e=G(()=>{let e=Ft(S.Object)?.name,t=new Set((b.value??[]).filter(e=>e.type===S.Object&&e.requiresFrames===!0).map(e=>Mt(e.pluginId||``)).filter(e=>e!==void 0));return Pt(g.value?.filter(n=>n.pluginName!==e&&t.has(n.pluginName))||[])}),et=G(()=>me.value===S.Object&&Qe.value&&$e.value.length>0),tt=G(()=>A.value&&Je.value.find(e=>e.id===A.value)?.pluginId||``),nt=G(()=>g.value?.filter(e=>n.some(t=>e.contract.provides.includes(t)))||[]),rt=G(()=>{let e=new Set;for(let t of nt.value)for(let r of n)t.contract.provides.includes(r)&&e.add(r);return Array.from(e).filter(At).sort((e,t)=>{let n=u(`components.camera_options.sensor_type_${e}`),r=u(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),it=G(()=>{let e=_e.value;return e?Pt(g.value?.filter(t=>t.contract.provides.includes(e)&&kt(t,e))||[]):[]}),at=G(()=>ce.value.filter(e=>e.type===_e.value).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))),ot=G(()=>{if(!be.value)return``;let e=at.value.find(e=>e.id===be.value);return e?.pluginId&&Mt(e.pluginId)||``}),st=G(()=>be.value&&at.value.find(e=>e.id===be.value)?.pluginId||``),ct=de(f,G(()=>he.value??``)),lt=ct.config,ut=ct.isLoading,dt=Le(f,A,tt),ft=dt.config,pt=dt.isLoading,mt=G(()=>{let e=ge.value;if(!(!e||e===Ft(S.Object)?.name))return ce.value.find(t=>t.type===S.Object&&Mt(t.pluginId||``)===e)}),ht=G(()=>mt.value?.id??``),gt=Le(f,ht,G(()=>mt.value?.pluginId??``)),_t=gt.config,vt=gt.isLoading,yt=de(f,G(()=>ve.value??``)),bt=yt.config,xt=yt.isLoading,St=Le(f,be,st),Ct=St.config,wt=St.isLoading,Tt=de(f,G(()=>xe.value??``)),Et=Tt.config,Dt=Tt.isLoading,Ot=G(()=>{let e=m.value?.result||[];return(te.value?.result||[]).filter(t=>{let n=e.find(e=>e.pluginName===t.pluginName),r=t.contract.provides.length>0,i=t.contract.consumes.length>0;return d.value.pluginInfo?.name===t.pluginName||fe(t.contract)&&!Be(t.contract)?!1:n&&(r||i||a(t.contract))})});function kt(e,t){return e.pluginName!==d.value.pluginInfo?.name||(b.value??[]).some(n=>n.type===t&&Mt(n.pluginId||``)===e.pluginName)}function At(e){return ce.value.some(t=>t.type===e)||(b.value??[]).some(t=>t.type===e)?!0:(g.value??[]).some(t=>t.contract.provides.includes(e)&&t.pluginName!==d.value.pluginInfo?.name)}function Mt(e){return d.value.plugins.find(t=>t.id===e)?.name}function Nt(e){let t=typeof e==`string`?e:e?.name;if(t&&m.value&&m.value.result.some(e=>e.pluginName===t&&!e.disabled))return t}function Pt(e){return e.sort((e,t)=>!Nt(e.pluginName)&&Nt(t.pluginName)?1:Nt(e.pluginName)&&!Nt(t.pluginName)?-1:e.displayName.localeCompare(t.displayName))}function Ft(e){let t=lr(e),n=d.value.assignments[t];return Array.isArray(n)?void 0:n}function It(e){let t=lr(e),n=d.value.assignments[t];return Array.isArray(n)?void 0:n}async function Lt(e){if(e!==void 0)D.value=e;else switch(E.value){case`cameraController`:D.value=Nt(Ve.value?.pluginName)||``;break;case`hub`:D.value=Nt(Ue.value[0]?.pluginName)||``;break;case`detection`:{let e=Nt(me.value?Ft(me.value):void 0);D.value=e||``,he.value=e||void 0;break}case`core`:{let e=Nt(_e.value?It(_e.value):void 0);D.value=e||``,ve.value=e||void 0;break}case`accessories`:D.value=``;break;default:D.value=``;break}D.value&&E.value!==`accessories`&&Nt(D.value)&&await ke.getConfig()}function Rt(){switch(E.value){case`cameraController`:We.value.length&&!D.value&&(D.value=We.value[0].pluginName);break;case`hub`:if(Ue.value.length){let e=Ue.value.find(e=>Nt(e.pluginName));pe.value=e?.pluginName}break;case`detection`:{Ke.value.length&&(!me.value||!Ke.value.includes(me.value))&&(me.value=Ke.value[0]);let e=me.value?Ft(me.value):void 0;e&&Nt(e.name)?he.value=e.name:he.value=void 0,Tn(()=>{Je.value.length&&!A.value&&(A.value=Je.value[0].id)});break}case`core`:{rt.value.length&&(!_e.value||!rt.value.includes(_e.value))&&(_e.value=rt.value[0]);let e=_e.value?It(_e.value):void 0;e&&Nt(e.name)?ve.value=e.name:ve.value=void 0,Tn(()=>{at.value.length&&!be.value&&(be.value=at.value[0].id)});break}case`accessories`:j.value.length&&(!O.value||!j.value.includes(O.value))&&(O.value=j.value[0]),Tn(()=>{De.value.length&&!xe.value&&(xe.value=De.value[0])}),Tn(()=>{Oe.value.length&&!k.value&&(k.value=Oe.value[0].id)});break}}async function zt(e){g.value&&(g.value.some(t=>t.pluginName===e.pluginName)?(await T({cameraname:d.value.name,pluginname:e.pluginName}),le.value?.reset()):await w({cameraname:d.value.name,pluginname:e.pluginName}))}async function Bt(e){if(!O.value)return;let t=De.value;if(Ee.value){let n=e,r=t[0];if(n===r)return;r&&(await ie({cameraname:d.value.name,pluginname:r,type:O.value}),k.value=void 0),n?(await ne({cameraname:d.value.name,pluginname:n,type:O.value}),xe.value=n):xe.value=void 0;return}let n=e||[],r=n.filter(e=>!t.includes(e)),i=t.filter(e=>!n.includes(e));for(let e of r)await ne({cameraname:d.value.name,pluginname:e,type:O.value});for(let e of i){if(await ie({cameraname:d.value.name,pluginname:e,type:O.value}),k.value){let t=Oe.value.find(e=>e.id===k.value);t&&Mt(t.pluginId||``)===e&&(k.value=void 0)}xe.value===e&&(xe.value=void 0)}r.length&&!xe.value?xe.value=r[0]:n.length&&!xe.value&&(xe.value=n[0])}async function Vt(e,t){try{await ke.setValue(e.key,void 0),c.add({severity:`success`,detail:u(`components.toast.config_updated`),life:3e3})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function Ht(e,t){try{let n=await ke.submitValue(e.key,e.payload);if(n?.toast){let e=jt(n.toast.type);c.add({severity:e,detail:n.toast.message,life:3e3})}n?.schema&&n.schema.length&&l.openComponentDialog(pi,{data:{title:u(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:n.schema,config:e.payload},pluginName:t,cameraName:d.value.name,buttonKey:e.key}}})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function Ut(e,t){try{await ke.setConfig(t),c.add({severity:`success`,detail:u(`components.toast.config_updated`),life:3e3})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function Wt(e){if(!(!tt.value||!A.value))try{await dt.setValue(e.key,void 0),c.add({severity:`success`,detail:u(`components.toast.config_updated`),life:3e3})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function Gt(e){if(!(!tt.value||!A.value))try{let t=await dt.submitValue(e.key,e.payload);if(t?.toast){let e=jt(t.toast.type);c.add({severity:e,detail:t.toast.message,life:3e3})}}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function Kt(e){if(!(!tt.value||!A.value))try{await dt.setConfig(e),c.add({severity:`success`,detail:u(`components.toast.config_updated`),life:3e3})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function qt(e){if(ht.value)try{await gt.setValue(e.key,void 0),c.add({severity:`success`,detail:u(`components.toast.config_updated`),life:3e3})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function Jt(e){if(ht.value)try{let t=await gt.submitValue(e.key,e.payload);if(t?.toast){let e=jt(t.toast.type);c.add({severity:e,detail:t.toast.message,life:3e3})}}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function Xt(e){if(ht.value)try{await gt.setConfig(e),c.add({severity:`success`,detail:u(`components.toast.config_updated`),life:3e3})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function Zt(e){if(!(!st.value||!be.value))try{await St.setValue(e.key,void 0),c.add({severity:`success`,detail:u(`components.toast.config_updated`),life:3e3})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function Qt(e){if(!(!st.value||!be.value))try{let t=await St.submitValue(e.key,e.payload);if(t?.toast){let e=jt(t.toast.type);c.add({severity:e,detail:t.toast.message,life:3e3})}}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function $t(e){if(!(!st.value||!be.value))try{await St.setConfig(e),c.add({severity:`success`,detail:u(`components.toast.config_updated`),life:3e3})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function en(e){if(!(!Ce.value||!k.value))try{await Me.setValue(e.key,void 0),c.add({severity:`success`,detail:u(`components.toast.config_updated`),life:3e3})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function rn(e){if(!(!Ce.value||!k.value))try{let t=await Me.submitValue(e.key,e.payload);if(t?.toast){let e=jt(t.toast.type);c.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&l.openComponentDialog(pi,{data:{title:u(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:Se.value,cameraName:d.value.name,buttonKey:e.key,sensorId:k.value,pluginId:Ce.value}}})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function an(e){if(!(!Ce.value||!k.value))try{await Me.setConfig(e),c.add({severity:`success`,detail:u(`components.toast.config_updated`),life:3e3})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function on(e){he.value&&await ct.setValue(e.key,void 0)}async function sn(e){if(he.value)try{let t=await ct.submitValue(e.key,e.payload);if(t?.toast){let e=jt(t.toast.type);c.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&l.openComponentDialog(pi,{data:{title:u(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:he.value,cameraName:d.value.name,buttonKey:e.key}}})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function cn(e){he.value&&await ct.setConfig(e)}async function ln(e){ve.value&&await yt.setValue(e.key,void 0)}async function un(e){if(ve.value)try{let t=await yt.submitValue(e.key,e.payload);if(t?.toast){let e=jt(t.toast.type);c.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&l.openComponentDialog(pi,{data:{title:u(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:ve.value,cameraName:d.value.name,buttonKey:e.key}}})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function dn(e){ve.value&&await yt.setConfig(e)}async function fn(e){xe.value&&await Tt.setValue(e.key,void 0)}async function pn(e){if(xe.value)try{let t=await Tt.submitValue(e.key,e.payload);if(t?.toast){let e=jt(t.toast.type);c.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&l.openComponentDialog(pi,{data:{title:u(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:xe.value,cameraName:d.value.name,buttonKey:e.key}}})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function mn(e){xe.value&&await Tt.setConfig(e)}function hn(e){e&&l.openComponentDialog(Cs,{data:{title:u(`components.camera_options.sensor_display_name`),confirmText:u(`components.form.button.save`),contentProps:{currentDisplayName:e.displayName.value}},onConfirm:async t=>{t&&t!==e.displayName.value&&await e.setDisplayName(t)}})}return F(E,()=>{Tn(()=>{Rt(),Lt()})},{immediate:!0}),F([Ue,m],async([e,t])=>{if(E.value===`hub`&&e.length&&t?.result&&!pe.value){let t=e.find(e=>Nt(e.pluginName));t&&(pe.value=t.pluginName,D.value=t.pluginName,await ke.getConfig())}},{immediate:!0}),F([We,()=>E.value],async([e,t])=>{t===`cameraController`&&e.length&&!D.value&&(D.value=e[0].pluginName,await ke.getConfig())},{immediate:!0}),F(()=>D.value,async(e,t)=>{E.value===`cameraController`&&e&&e!==t&&await ke.getConfig()}),F(pe,async(e,t)=>{e&&e!==t&&Nt(e)&&(D.value=e,await ke.getConfig())}),F(me,()=>{if(A.value=void 0,me.value){let e=Ft(me.value);e&&Nt(e.name)?he.value=e.name:he.value=void 0}else he.value=void 0;Lt(),Tn(()=>{Je.value.length&&(A.value=Je.value[0].id)})}),F(he,async(e,t)=>{if(e!==t&&me.value){let n=Ft(me.value);!e&&t?(await ie({cameraname:d.value.name,pluginname:t,type:me.value}),le.value?.reset(),A.value=void 0):e&&(n?.name!==e&&await ne({cameraname:d.value.name,pluginname:e,type:me.value}),await ct.getConfig()),Tn(()=>Lt(e)),Tn(()=>{Je.value.length&&(A.value=Je.value[0].id)})}}),F(Ze,e=>ge.value=e,{immediate:!0}),F(ge,async(e,t)=>{e===t||e===Ze.value||(!e&&t?await ie({cameraname:d.value.name,pluginname:t,type:S.ObjectAssist}):e&&await ne({cameraname:d.value.name,pluginname:e,type:S.ObjectAssist}))}),F(_e,()=>{if(be.value=void 0,_e.value){let e=It(_e.value);e&&Nt(e.name)?ve.value=e.name:ve.value=void 0}else ve.value=void 0;Lt(),Tn(()=>{at.value.length&&(be.value=at.value[0].id)})}),F(ve,async(e,t)=>{if(e!==t&&_e.value){let n=It(_e.value);!e&&t?(await ie({cameraname:d.value.name,pluginname:t,type:_e.value}),le.value?.reset(),be.value=void 0):e&&(n?.name!==e&&await ne({cameraname:d.value.name,pluginname:e,type:_e.value}),await yt.getConfig()),Tn(()=>Lt(e)),Tn(()=>{at.value.length&&(be.value=at.value[0].id)})}}),F([A,tt],async([e,t])=>{e&&t&&await dt.getConfig()}),F([be,st],async([e,t])=>{e&&t&&await St.getConfig()}),F(O,()=>{k.value=void 0,De.value.length?xe.value=De.value[0]:xe.value=void 0,Oe.value.length&&(k.value=Oe.value[0].id)}),F(xe,async e=>{e&&await Tt.getConfig()}),F(k,async e=>{e&&Ce.value&&await Me.getConfig()}),F(We,e=>{let t=ue.value.indexOf(`cameraController`)!==-1;e.length&&!t?(ue.value.unshift(`cameraController`),(!E.value||E.value===`hub`)&&(E.value=`cameraController`,e.length&&!D.value&&(D.value=e[0].pluginName))):!e.length&&t&&(ue.value=ue.value.filter(e=>e!==`cameraController`),E.value===`cameraController`&&(E.value=`hub`))},{immediate:!0}),Mn(async()=>{await _(),Rt(),Lt()}),(e,t)=>{let n=ze,r=li,i=ci,a=Or,o=oi,s=v,c=Cr,l=nn,u=bs,f=y;return L(),q(`div`,ws,[$(Fe)?(L(),q(`div`,Ts,[Z(n,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])):(L(),q(V,{key:1},[X(`span`,Es,z(e.$t(`components.camera_options.categories`)),1),Z(i,{modelValue:$(E),"onUpdate:modelValue":[t[0]||=e=>Hn(E)?E.value=e:null,t[1]||=e=>Lt()],disabled:$(Ie),mandatory:``},{default:Y(()=>[(L(!0),q(V,null,M($(ue),t=>(L(),U(r,{key:t,size:`small`,disabled:$(Re),value:t},{default:Y(()=>[B(z(e.$t(`components.camera_options.chip_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),Z(a,{class:`m-0 py-3`}),$(E)===`cameraController`?(L(),q(`div`,Ds,[$(We).length?(L(),q(V,{key:1},[X(`span`,As,z(e.$t(`components.camera_options.chip_plugins`)),1),Z(i,{modelValue:$(D),"onUpdate:modelValue":t[2]||=e=>Hn(D)?D.value=e:null,disabled:$(Ie),mandatory:``,class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(We),e=>(L(),U(r,{key:e.pluginName,size:`small`,disabled:!Nt(e.pluginName)||$(Re),value:e.pluginName},{default:Y(()=>[B(z(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),Z(a,{class:`m-0 py-3`}),X(`span`,js,z(e.$t(`components.camera_options.plugin_settings`)),1),!$(D)||!$(Ae)?.schema?.length?(L(),q(`div`,Ms,[$(je)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,Ns,z(e.$t(`components.camera_options.no_config`)),1))])):(L(),U(di,{ref_key:`schemaRef`,ref:le,key:$(D),"schema-form":{schema:$(Ae).schema,config:$(Ae).config},loading:$(Re),onOnFormSubmit:t[3]||=e=>Ut($(D),e),onOnSubmit:t[4]||=e=>Ht(e,$(D)),onOnAction:t[5]||=e=>Vt(e,$(D))},null,8,[`schema-form`,`loading`]))],64)):(L(),q(V,{key:0},[X(`span`,Os,z(e.$t(`components.camera_options.chip_plugins`)),1),X(`span`,ks,z(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):$(E)===`hub`?(L(),q(`div`,Ps,[$(Ue).length?(L(),q(V,{key:1},[X(`span`,Ls,z(e.$t(`components.camera_options.chip_plugins`)),1),Z(i,{modelValue:$(pe),"onUpdate:modelValue":t[6]||=e=>Hn(pe)?pe.value=e:null,disabled:$(Ie),mandatory:``,class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(Ue),e=>(L(),U(r,{key:e.pluginName,size:`small`,disabled:!Nt(e.pluginName)||$(Re),value:e.pluginName},{default:Y(()=>[B(z(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),Z(a,{class:`m-0 py-3`}),X(`span`,Rs,z(e.$t(`components.camera_options.plugin_settings`)),1),!$(D)||!$(Ae)?.schema?.length?(L(),q(`div`,zs,[$(je)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,Bs,z(e.$t(`components.camera_options.no_config`)),1))])):(L(),U(di,{ref_key:`schemaRef`,ref:le,key:$(D),"schema-form":{schema:$(Ae).schema,config:$(Ae).config},loading:$(Re),onOnFormSubmit:t[7]||=e=>Ut($(D),e),onOnSubmit:t[8]||=e=>Ht(e,$(D)),onOnAction:t[9]||=e=>Vt(e,$(D))},null,8,[`schema-form`,`loading`]))],64)):(L(),q(V,{key:0},[X(`span`,Fs,z(e.$t(`components.camera_options.chip_plugins`)),1),X(`span`,Is,z(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):$(E)===`detection`?(L(),q(`div`,Vs,[$(Ke).length?(L(),q(V,{key:1},[X(`span`,Ws,z(e.$t(`components.camera_options.sensor_types`)),1),Z(i,{modelValue:$(me),"onUpdate:modelValue":t[10]||=e=>Hn(me)?me.value=e:null,disabled:$(Ie),mandatory:``,class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(Ke),t=>(L(),U(r,{key:t,size:`small`,disabled:$(Re),value:t},{default:Y(()=>[B(z(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),$(qe).length?(L(),q(V,{key:0},[Z(a,{class:`m-0 py-3`}),X(`span`,Gs,z(e.$t(`components.camera_options.chip_plugins`)),1),Z(i,{modelValue:$(he),"onUpdate:modelValue":t[11]||=e=>Hn(he)?he.value=e:null,disabled:$(Ie),class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(qe),e=>(L(),U(r,{key:e.pluginName,size:`small`,filter:``,disabled:!Nt(e.pluginName)||$(Re),value:e.pluginName},{default:Y(()=>[B(z(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),$(he)&&$(he)!==$(d).pluginInfo?.name?(L(),q(V,{key:0},[Z(a,{class:`m-0 py-3`}),X(`span`,Ks,z(e.$t(`components.camera_options.plugin_settings`)),1),$(lt)?.schema?.length?(L(),U(di,{key:`detection-plugin-${$(he)}`,"schema-form":{schema:$(lt).schema,config:$(lt).config},loading:$(Re),onOnFormSubmit:t[12]||=e=>cn(e),onOnSubmit:t[13]||=e=>sn(e),onOnAction:t[14]||=e=>on(e)},null,8,[`schema-form`,`loading`])):(L(),q(`div`,qs,[$(ut)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,Js,z(e.$t(`components.camera_options.no_config`)),1))]))],64)):W(``,!0),Z(a,{class:`m-0 py-3`}),X(`span`,Ys,z(e.$t(`components.camera_options.sensors`)),1),$(Je).length?(L(),U(i,{key:1,modelValue:$(A),"onUpdate:modelValue":t[15]||=e=>Hn(A)?A.value=e:null,disabled:$(Ie),mandatory:``,class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(Je),e=>(L(),U(r,{key:e.id,size:`small`,disabled:$(Re),value:e.id},{append:Y(()=>[Z(s,{text:$(k)!==e.id,rounded:``,severity:$(k)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:Kn(t=>hn(e),[`stop`])},{icon:Y(()=>[Z(o,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:Y(()=>[B(z(e.displayName.value)+` `,1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`])):(L(),q(`span`,Xs,z(e.$t(`components.camera_options.no_sensors`)),1)),$(A)?(L(),q(V,{key:3},[Z(a,{class:`m-0 py-3`}),X(`span`,Zs,z(e.$t(`components.camera_options.sensor_settings`)),1),!$(Ye)||!$(ft)?.schema?.length?(L(),q(`div`,Qs,[$(pt)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,$s,z(e.$t(`components.camera_options.no_config`)),1))])):(L(),U(di,{key:`sensor-${$(A)}`,"schema-form":{schema:$(ft).schema,config:$(ft).config},loading:$(Re),onOnFormSubmit:t[16]||=e=>Kt(e),onOnSubmit:t[17]||=e=>Gt(e),onOnAction:t[18]||=e=>Wt(e)},null,8,[`schema-form`,`loading`]))],64)):W(``,!0)],64)):W(``,!0),$(et)?(L(),q(V,{key:1},[Z(a,{class:`m-0 py-3`}),X(`span`,ec,z(e.$t(`components.camera_options.object_assist`)),1),Z(i,{modelValue:$(ge),"onUpdate:modelValue":t[19]||=e=>Hn(ge)?ge.value=e:null,disabled:$(Ie),class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($($e),e=>(L(),U(r,{key:e.pluginName,size:`small`,filter:``,disabled:!Nt(e.pluginName)||$(Re),value:e.pluginName},{default:Y(()=>[B(z(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),$(ht)?(L(),q(V,{key:0},[Z(a,{class:`m-0 py-3`}),X(`span`,tc,z(e.$t(`components.camera_options.sensor_settings`)),1),$(_t)?.schema?.length?(L(),U(di,{key:`object-assist-${$(ht)}`,"schema-form":{schema:$(_t).schema,config:$(_t).config},loading:$(Re),onOnFormSubmit:t[20]||=e=>Xt(e),onOnSubmit:t[21]||=e=>Jt(e),onOnAction:t[22]||=e=>qt(e)},null,8,[`schema-form`,`loading`])):(L(),q(`div`,nc,[$(vt)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,rc,z(e.$t(`components.camera_options.no_config`)),1))]))],64)):W(``,!0)],64)):W(``,!0)],64)):(L(),q(V,{key:0},[X(`span`,Hs,z(e.$t(`components.camera_options.sensor_types`)),1),X(`span`,Us,z(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):$(E)===`core`?(L(),q(`div`,ic,[$(rt).length?(L(),q(V,{key:1},[X(`span`,sc,z(e.$t(`components.camera_options.sensor_types`)),1),Z(i,{modelValue:$(_e),"onUpdate:modelValue":t[23]||=e=>Hn(_e)?_e.value=e:null,disabled:$(Ie),mandatory:``,class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(rt),t=>(L(),U(r,{key:t,size:`small`,disabled:$(Re),value:t},{default:Y(()=>[B(z(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),$(it).length?(L(),q(V,{key:0},[Z(a,{class:`m-0 py-3`}),X(`span`,cc,z(e.$t(`components.camera_options.chip_plugins`)),1),Z(i,{modelValue:$(ve),"onUpdate:modelValue":t[24]||=e=>Hn(ve)?ve.value=e:null,disabled:$(Ie),class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(it),e=>(L(),U(r,{key:e.pluginName,size:`small`,filter:``,disabled:!Nt(e.pluginName)||$(Re),value:e.pluginName},{default:Y(()=>[B(z(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),$(ve)&&$(ve)!==$(d).pluginInfo?.name?(L(),q(V,{key:0},[Z(a,{class:`m-0 py-3`}),X(`span`,lc,z(e.$t(`components.camera_options.plugin_settings`)),1),$(bt)?.schema?.length?(L(),U(di,{key:`core-plugin-${$(ve)}`,"schema-form":{schema:$(bt).schema,config:$(bt).config},loading:$(Re),onOnFormSubmit:t[25]||=e=>dn(e),onOnSubmit:t[26]||=e=>un(e),onOnAction:t[27]||=e=>ln(e)},null,8,[`schema-form`,`loading`])):(L(),q(`div`,uc,[$(xt)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,dc,z(e.$t(`components.camera_options.no_config`)),1))]))],64)):W(``,!0),Z(a,{class:`m-0 py-3`}),X(`span`,fc,z(e.$t(`components.camera_options.sensors`)),1),$(at).length?(L(),U(i,{key:1,modelValue:$(be),"onUpdate:modelValue":t[28]||=e=>Hn(be)?be.value=e:null,disabled:$(Ie),mandatory:``,class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(at),e=>(L(),U(r,{key:e.id,size:`small`,disabled:$(Re),value:e.id},{append:Y(()=>[Z(s,{text:$(k)!==e.id,rounded:``,severity:$(k)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:Kn(t=>hn(e),[`stop`])},{icon:Y(()=>[Z(o,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:Y(()=>[B(z(e.displayName.value)+` `,1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`])):(L(),q(`span`,pc,z(e.$t(`components.camera_options.no_sensors`)),1)),$(be)?(L(),q(V,{key:3},[Z(a,{class:`m-0 py-3`}),X(`span`,mc,z(e.$t(`components.camera_options.sensor_settings`)),1),!$(ot)||!$(Ct)?.schema?.length?(L(),q(`div`,hc,[$(wt)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,gc,z(e.$t(`components.camera_options.no_config`)),1))])):(L(),U(di,{key:`sensor-${$(be)}`,"schema-form":{schema:$(Ct).schema,config:$(Ct).config},loading:$(Re),onOnFormSubmit:t[29]||=e=>$t(e),onOnSubmit:t[30]||=e=>Qt(e),onOnAction:t[31]||=e=>Zt(e)},null,8,[`schema-form`,`loading`]))],64)):W(``,!0)],64)):W(``,!0)],64)):(L(),q(V,{key:0},[X(`span`,ac,z(e.$t(`components.camera_options.sensor_types`)),1),X(`span`,oc,z(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):$(E)===`accessories`?(L(),q(`div`,_c,[$(j).length?(L(),q(V,{key:1},[X(`span`,bc,z(e.$t(`components.camera_options.sensor_types`)),1),Z(i,{modelValue:$(O),"onUpdate:modelValue":t[32]||=e=>Hn(O)?O.value=e:null,disabled:$(Ie),mandatory:``,class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(j),t=>(L(),U(r,{key:t,size:`small`,disabled:$(Re),value:t},{default:Y(()=>[B(z(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),$(Te).length?(L(),q(V,{key:0},[Z(a,{class:`m-0 py-3`}),X(`span`,xc,z(e.$t(`components.camera_options.chip_plugins`)),1),Z(i,{"model-value":$(Ee)?$(De)[0]:$(De),disabled:$(Ie),multiple:!$(Ee),class:`min-h-[30px]`,"onUpdate:modelValue":Bt},{default:Y(()=>[(L(!0),q(V,null,M($(Te),e=>(L(),U(r,{key:e.pluginName,size:`small`,filter:``,disabled:!Nt(e.pluginName)||$(Re),value:e.pluginName},{default:Y(()=>[B(z(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`model-value`,`disabled`,`multiple`]),$(xe)&&$(xe)!==$(d).pluginInfo?.name?(L(),q(V,{key:0},[Z(a,{class:`m-0 py-3`}),X(`span`,Sc,z(e.$t(`components.camera_options.plugin_settings`)),1),$(Et)?.schema?.length?(L(),U(di,{key:`accessory-plugin-${$(xe)}`,"schema-form":{schema:$(Et).schema,config:$(Et).config},loading:$(Re),onOnFormSubmit:t[33]||=e=>mn(e),onOnSubmit:t[34]||=e=>pn(e),onOnAction:t[35]||=e=>fn(e)},null,8,[`schema-form`,`loading`])):(L(),q(`div`,Cc,[$(Dt)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,wc,z(e.$t(`components.camera_options.no_config`)),1))]))],64)):W(``,!0)],64)):W(``,!0),Z(a,{class:`m-0 py-3`}),X(`span`,Tc,z(e.$t(`components.camera_options.sensors`)),1),$(Oe).length?(L(),U(i,{key:1,modelValue:$(k),"onUpdate:modelValue":t[36]||=e=>Hn(k)?k.value=e:null,disabled:$(Ie),mandatory:``,class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(Oe),e=>(L(),U(r,{key:e.id,size:`small`,disabled:$(Re),value:e.id},{append:Y(()=>[Z(s,{text:$(k)!==e.id,rounded:``,severity:$(k)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:Kn(t=>hn(e),[`stop`])},{icon:Y(()=>[Z(o,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:Y(()=>[B(z(e.displayName.value)+` `,1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`])):(L(),q(`span`,Ec,z(e.$t(`components.camera_options.no_sensors`)),1)),$(k)?(L(),q(V,{key:3},[Z(a,{class:`m-0 py-3`}),X(`span`,Dc,z(e.$t(`components.camera_options.sensor_settings`)),1),!$(Se)||!$(Ne)?.schema?.length?(L(),q(`div`,Oc,[$(Pe)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,kc,z(e.$t(`components.camera_options.no_config`)),1))])):(L(),U(di,{key:`sensor-${$(k)}`,"schema-form":{schema:$(Ne).schema,config:$(Ne).config},loading:$(Re),onOnFormSubmit:t[37]||=e=>an(e),onOnSubmit:t[38]||=e=>rn(e),onOnAction:t[39]||=e=>en(e)},null,8,[`schema-form`,`loading`]))],64)):W(``,!0)],64)):(L(),q(V,{key:0},[X(`span`,vc,z(e.$t(`components.camera_options.sensor_types`)),1),X(`span`,yc,z(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):$(E)===`more`?(L(),q(`div`,Ac,[X(`span`,jc,z(e.$t(`components.camera_options.manage_plugins`)),1),$(C)||!$(Ot).length?(L(),q(`div`,Mc,[$(C)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,Nc,z(e.$t(`components.camera_options.no_plugins_found`)),1))])):(L(),q(`div`,Pc,[(L(!0),q(V,null,M($(Ot),t=>Xn((L(),q(`div`,{key:t.pluginName,class:`cui-list-item`},[Z(l,{disabled:$(Ie)||!Nt(t.pluginName),class:`h-14`,onClick:n=>e.$router.push(`/plugins/${t.pluginName}`)},{append:Y(()=>[Z(c,{"model-value":$(g)?.some(e=>e.pluginName===t.pluginName),disabled:$(Ie)||!Nt(t.pluginName),"onUpdate:modelValue":e=>zt(t)},null,8,[`model-value`,`disabled`,`onUpdate:modelValue`])]),default:Y(()=>[X(`span`,null,z(t.displayName),1)]),_:2},1032,[`disabled`,`onClick`])])),[[f,{value:Nt(t.pluginName)===void 0?e.$t(`components.form.tooltip.disabled`):``},void 0,{top:!0}]])),128))])),X(`div`,Fc,[Z(l,{class:`h-14`,onClick:t[40]||=t=>e.$router.push(`/plugins`)},{append:Y(()=>[Z(s,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-md`},{icon:Y(()=>[Z(u,{width:`100%`,height:`100%`})]),_:1})]),default:Y(()=>[X(`span`,null,z(e.$t(`components.camera_options.more_plugins`)),1)]),_:1})])])):W(``,!0)],64))])}}});async function Lc({signal:e}){return(await un.get(`/virtual-sensors`,{signal:e})).data}async function Rc({data:e}){return(await un.post(`/virtual-sensors`,e)).data}async function zc({id:e,data:t}){return(await un.patch(`/virtual-sensors/${e}`,t)).data}async function Bc({id:e}){await un.delete(`/virtual-sensors/${e}`)}var Vc=class{_queryClient=Fn();t=et.global.t;toast=tn();queryActivator=J([{name:`getVirtualSensorsQuery`,enabled:!0}]);getVirtualSensorsQuery(){return Ze({queryKey:[`virtualSensorsList`],queryFn:({signal:e})=>Lc({signal:e}),placeholderData:e=>e,enabled:()=>this.queryActivator.value.some(e=>e.name===`getVirtualSensorsQuery`&&e.enabled)})}createVirtualSensorQuery(){return kn({mutationFn:Rc,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`virtualSensorsList`]}),await this._queryClient.refetchQueries({queryKey:[`camerasList`]}),this.toast.add({severity:`success`,detail:this.t(`components.camera_options.virtual_sensor_created`),life:3e3})}})}patchVirtualSensorQuery(){return kn({mutationFn:zc,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`virtualSensorsList`]})}})}deleteVirtualSensorQuery(){return kn({mutationFn:Bc,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`virtualSensorsList`]}),await this._queryClient.refetchQueries({queryKey:[`camerasList`]})}})}},Hc={class:`flex flex-col gap-4`},Uc={class:`relative w-full bg-black rounded-xl overflow-hidden flex items-center justify-center`,style:{height:`40vh`}},Wc={class:`flex flex-col field-gap`},Gc={class:`cui-label`},Kc={class:`flex flex-col field-gap`},qc={for:`aspect-ratio-custom`,class:`cui-label`},Jc=H({__name:`AspectRatio`,props:{camera:{},current:{},presets:{}},setup(e,{expose:t}){let n=e,{t:r}=ye(),i=Ln(`dialogRefProps`),a=J(n.current||`16:9`),o=/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?)$/,s=G(()=>{let e=a.value.match(o);if(!e)return null;let t=Number(e[1]),n=Number(e[2]);return!(t>0)||!(n>0)?null:{w:t,h:n}}),c=G(()=>n.presets.includes(a.value)),l=G(()=>s.value?``:a.value.trim()===``?r(`components.form.hint.aspect_ratio_required`):r(`components.form.hint.aspect_ratio_invalid`)),u=G(()=>!s.value||c.value?r(`components.form.hint.aspect_ratio`):r(`components.form.hint.aspect_ratio_custom`,{ratio:(s.value.w/s.value.h).toFixed(2)})),d=G(()=>{let e=s.value??{w:16,h:9};return{width:`min(100%, calc(40vh * ${e.w/e.h}))`,aspectRatio:`${e.w} / ${e.h}`,transition:`width 0.25s ease, aspect-ratio 0.25s ease`}});wn(()=>{i.disabled&&(i.disabled.value=!s.value)});async function f(){return s.value?a.value:null}return t({onConfirm:f}),(t,n)=>{let i=Re,o=_,s=Er,f=qr;return L(),q(`div`,Hc,[X(`div`,Uc,[X(`div`,{class:`relative`,style:Q($(d))},[Z(ln,{camera:e.camera,"show-loading-screen":!1,"show-timestamp":!0,class:`absolute inset-0`,"image-style":{objectFit:`fill`}},null,8,[`camera`])],4)]),X(`div`,Wc,[X(`label`,Gc,z($(r)(`components.form.label.aspect_ratio`)),1),Z(i,{"model-value":$(c)?$(a):null,options:e.presets,"allow-empty":!0,size:`small`,"onUpdate:modelValue":n[0]||=e=>e&&(a.value=e)},null,8,[`model-value`,`options`])]),X(`div`,Kc,[X(`label`,qc,z($(r)(`components.form.label.aspect_ratio_custom`)),1),Z(s,null,{default:Y(()=>[Z(o,{id:`aspect-ratio-custom`,modelValue:$(a),"onUpdate:modelValue":n[1]||=e=>Hn(a)?a.value=e:null,modelModifiers:{trim:!0},invalid:!!$(l),placeholder:`16:9`,spellcheck:`false`,onKeydown:n[2]||=Qn(Kn(()=>{},[`prevent`]),[`enter`])},null,8,[`modelValue`,`invalid`])]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[$(l)?(L(),U(f,{key:0,severity:`error`,variant:`simple`,size:`small`,class:`cui-input-error`},{default:Y(()=>[B(z($(l)),1)]),_:1})):W(``,!0)]),_:1}),$(l)?W(``,!0):(L(),U(f,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z($(u)),1)]),_:1}))])])}}}),Yc={for:`virtualSensorType`,class:`cui-label`},Xc={for:`virtualSensorName`,class:`cui-label`},Zc=H({__name:`VirtualSensorCreate`,props:{cameraId:{}},setup(e,{expose:t}){let n=e,{t:r}=ye(),i=tn(),a=ur.omit({cameraId:!0}),o=Bn(`formRef`),s=J(or[0]),c=J(``),l=G(()=>or.map(e=>({label:r(`components.camera_options.sensor_type_${e}`),value:e})));return t({onConfirm:async()=>(await o.value?.validate())?.valid?{cameraId:n.cameraId,type:s.value,name:c.value.trim()}:(i.add({severity:`error`,detail:r(`components.toast.validation_failed`),life:3e3}),null)}),(e,t)=>{let n=Ir,r=_;return L(),U($(In),{ref_key:`formRef`,ref:o,class:`flex flex-col gap-4 w-full`,"validation-schema":$(a)},{default:Y(()=>[Z($(P),{"model-value":$(s),name:`type`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:r})=>[X(`label`,Yc,z(e.$t(`components.form.label.type`)),1),Z(n,{id:`virtualSensorType`,"model-value":$(s),options:$(l),"option-label":`label`,"option-value":`value`,invalid:r.length>0,class:`w-full`,onValueChange:t[0]||=e=>s.value=e},null,8,[`model-value`,`options`,`invalid`]),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`type`,class:`cui-input-error`})]),_:1})]),_:1},8,[`model-value`]),Z($(P),{modelValue:$(c),"onUpdate:modelValue":t[1]||=e=>Hn(c)?c.value=e:null,modelModifiers:{trim:!0},name:`name`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:t,errors:n})=>[X(`label`,Xc,z(e.$t(`components.form.label.name`)),1),Z(r,Jn({id:`virtualSensorName`},t,{invalid:n.length>0,class:`w-full`,placeholder:e.$t(`components.camera_options.virtual_sensor_name_placeholder`)}),null,16,[`invalid`,`placeholder`]),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`name`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`])]),_:1},8,[`validation-schema`])}}}),Qc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function $c(e,t){return L(),q(`svg`,Qc,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m0 16H5V5h14zm-2-2H7V7h10z`},null,-1)]])}var el=K({name:`mdi-checkbox-intermediate`,render:$c}),tl={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function nl(e,t){return L(),q(`svg`,tl,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M3.14 1A2.14 2.14 0 0 0 1 3.14V5h2V3h2V1zM7 1v2h3V1zm5 0v2h2v2h2V3.14C16 1.96 15.04 1 13.86 1zM1 7v3h2V7zm8 0c-1.11 0-2 .89-2 2v7h6.86A2.14 2.14 0 0 0 16 13.86V7zm9 0v2h2v2h2V9c0-1.11-.89-2-2-2zM9 9h5v5H9zm-8 3v1.86C1 15.04 1.96 16 3.14 16H5v-2H3v-2zm19 1v3h2v-3zM7 18v2c0 1.11.89 2 2 2h2v-2H9v-2zm13 0v2h-2v2h2c1.11 0 2-.89 2-2v-2zm-7 2v2h3v-2z`},null,-1)]])}var rl=K({name:`mdi-vector-intersection`,render:nl}),il={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function al(e,t){return L(),q(`svg`,il,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M4 6v13h16V6zm14 11H6V8h12z`},null,-1)]])}var ol=K({name:`mdi-rectangle-outline`,render:al}),sl={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function cl(e,t){return L(),q(`svg`,sl,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M4 6v13h16V6z`},null,-1)]])}var ll=K({name:`mdi-rectangle`,render:cl}),ul={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function dl(e,t){return L(),q(`svg`,ul,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M20.84 22.73L18.11 20H17c-1.1 0-2-.9-2-2v-1.11l-2.34-2.34l-.85.49c-.95.55-2.18.22-2.73-.73l-1.5-2.6c-.4-.71-.33-1.53.1-2.14L1.11 3l1.28-1.27l19.72 19.73zM18.5 13c0-.57-.2-1.1-.53-1.5l1.97-1.15c1.01-.59 1.36-1.88.77-2.89l-1.38-2.4a2.125 2.125 0 0 0-2.89-.78l-5.67 3.29l7.09 7.09c.4-.44.64-1.02.64-1.66M2 12.62l3.5 6.06l2.53-3.18l-2-3.47z`},null,-1)]])}var fl=K({name:`mdi-cctv-off`,render:dl}),pl={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ml(e,t){return L(),q(`svg`,pl,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M12 2c5.5 0 10 4.5 10 10s-4.5 10-10 10S2 17.5 2 12S6.5 2 12 2m0 2c-1.9 0-3.6.6-4.9 1.7l11.2 11.2c1-1.4 1.7-3.1 1.7-4.9c0-4.4-3.6-8-8-8m4.9 14.3L5.7 7.1C4.6 8.4 4 10.1 4 12c0 4.4 3.6 8 8 8c1.9 0 3.6-.6 4.9-1.7`},null,-1)]])}var hl=K({name:`mdi-cancel`,render:ml}),gl={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function _l(e,t){return L(),q(`svg`,gl,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88c3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8`},null,-1)]])}var vl=K({name:`mdi-undo`,render:_l}),yl=e(Yr(),1),bl=[`audio`],xl=[`audio`,`motion`],Sl={ref:`container`,class:`w-full h-full relative min-w-0`},Cl={class:`flex flex-col justify-center items-center`},wl={class:`relative w-full`},Tl={class:`relative w-full flex flex-col items-center justify-center`},El={class:`absolute top-0 left-0 right-0 bottom-0`},Dl={class:`sandbox w-full h-full`},Ol={class:`handles`},kl=[`data-id`,`data-point`,`data-point-index`,`data-zone-index`,`onDblclick`],Al={class:`clipboard`},jl={width:`100%`,height:`100%`,class:`polygon-container`},Ml=[`d`,`onClick`,`onDblclick`,`onMousedown`,`onTouchstart`],Nl=[`id`],Pl=[`fill`],Fl=[`id`],Il=[`fill`],Ll=[`x1`,`y1`,`x2`,`y2`,`stroke`],Rl=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-opacity`,`marker-end`,`marker-start`,`onClick`],zl=[`x`,`y`,`fill`],Bl=[`x`,`y`],Vl=[`x`,`y`,`fill`],Hl=[`x`,`y`],Ul=[`cx`,`cy`,`fill`,`stroke`,`onMousedown`,`onTouchstart`],Wl=[`cx`,`cy`,`fill`,`stroke`,`onMousedown`,`onTouchstart`],Gl={class:`w-full h-full flex flex-col items-center justify-center min-w-0`,style:{width:`calc(100% - 20px)`,"margin-top":`10px`,"margin-bottom":`10px`}},Kl={class:`flex flex-col field-gap w-full`},ql=[`for`],Jl={key:0,class:`cui-input-error`},Yl={class:`flex flex-col field-gap w-full`},Xl=[`for`],Zl={class:`flex flex-col field-gap w-full`},Ql=[`for`],$l={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner mt-auto`},eu={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner`},tu={class:`flex flex-col field-gap w-full`},nu=[`for`],ru={key:0,class:`cui-input-error`},iu={class:`flex flex-col field-gap w-full`},au=[`for`],ou={class:`flex flex-col field-gap w-full`},su=[`for`],cu={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner mt-auto`},lu={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner`},uu=Vt(H({__name:`ZoneEditor`,props:{cameraName:{},zones:{},lines:{},initialTab:{},initialSelection:{}},setup(e,{expose:t}){let n=new Yt,r=e,i=tn(),{t:a}=ye(),o=Ln(`dialogRefProps`),{mutateAsync:s,isPending:c}=n.patchZonesQuery(),{mutateAsync:l,isPending:u}=n.patchLinesQuery(),{cameraName:d,zones:f}=nr(r),p=Bn(`cameraCardRef`),m=Bn(`container`),h=Bn(`draggablesRef`),g=Bn(`outsideRef`),b=Bn(`playgroundContainerRef`),x=J(r.initialTab??`zones`),te=Gn([]),S=J([]),C=J([]),re=J(!1),ie=J([]),ae=J(void 0),w=J(-1),oe=J(-1),T=J(-1);r.initialSelection!==void 0&&((r.initialTab??`zones`)===`zones`?w.value=r.initialSelection:T.value=r.initialSelection);let se={x:0,y:0},ce=!1,le=null,E=ne(m),ue=ne(b),D=yi.element.shape.name,de=bi.element.shape.name,fe=G(()=>{if(w.value<0)return``;let e=S.value[w.value];if(!e||e.isPrivacyMask)return``;let t=D.safeParse(e.name);return t.success?``:t.error.issues[0]?.message??``}),pe=G(()=>{if(T.value<0)return``;let e=C.value[T.value];if(!e)return``;let t=de.safeParse(e.name);return t.success?``:t.error.issues[0]?.message??``}),me=G(()=>Math.max(0,ue.width.value-20)),he=G(()=>Math.max(0,ue.height.value-20)),ge=G(()=>[{label:a(`components.zone_editor.tab_zones`),value:`zones`},{label:a(`components.zone_editor.tab_lines`),value:`lines`}]),_e=G(()=>{let e=Ee.filter(e=>!bl.includes(e));return e.length===0?[]:[{label:a(`components.zone_editor.base_labels`),items:e.map(e=>({label:e,value:e}))}]}),ve=G(()=>{let e=Ee.filter(e=>!xl.includes(e));return e.length===0?[]:[{label:a(`components.zone_editor.base_labels`),items:e.map(e=>({label:e,value:e}))}]}),O=G(()=>!!(o.loading?.value||c.value||u.value)),k=G(()=>{let e=[];return re.value&&e.push(`customizing`),S.value?.length||e.push(`start`),e.join(` `)});function A(){if(S.value){if(S.value.length===0){ie.value=[];return}ie.value=S.value.flatMap((e,t)=>e.points.map((e,n)=>({_id:`z${t}-p${n}`,zoneIndex:t,pointIndex:n,point:[e[0],e[1]]})))}}function be(e){if(`touches`in e){let t=e.touches[0];return{x:t.clientX,y:t.clientY}}return{x:e.clientX,y:e.clientY}}function xe(e,t){if(e.stopPropagation(),!b.value)return;je(re.value),ce=!0,w.value=t;let n=b.value.getBoundingClientRect(),{x:r,y:i}=be(e),a=me.value,o=he.value;se.x=(r-n.left-10)/a*100,se.y=(i-n.top-10)/o*100}function Se(e){if(!ce||!b.value||w.value===-1||!S.value.length)return;let t=b.value.getBoundingClientRect(),{x:n,y:r}=be(e),i=me.value,a=he.value,o=(n-t.left-10)/i*100,s=(r-t.top-10)/a*100,c=o-se.x,l=s-se.y,u=S.value[w.value].points,d=!1;for(let e=0;e<u.length;e++){let t=u[e][0]+c,n=u[e][1]+l;if(t<0||t>100||n<0||n>100){d=!0;break}}if(!d)for(let e=0;e<u.length;e++){u[e][0]+=c,u[e][1]+=l,u[e][0]=Math.max(0,Math.min(100,u[e][0])),u[e][1]=Math.max(0,Math.min(100,u[e][1]));let t=u[e][0]/100*i,n=u[e][1]/100*a;te.value.find(t=>t.id===`z${w.value}-p${e}`)?.setPosition(t,n)}se.x=o,se.y=s}function Ce(){setTimeout(()=>{ce=!1},100)}function we(){!S.value.length||w.value===-1||(S.value[w.value].isPrivacyMask=!S.value[w.value].isPrivacyMask)}function j(){S.value[w.value]&&(S.value[w.value].filter=S.value[w.value].filter===`include`?`exclude`:`include`)}function Te(){S.value[w.value]&&(S.value[w.value].type=S.value[w.value].type===`intersect`?`contain`:`intersect`)}function De(e){if(!re.value||ce)return;let t=ae.value===void 0?S.value.length:ae.value,n=Math.min(Math.max(Math.round((e.offsetX-10)/me.value*100),0),100),r=Math.min(Math.max(Math.round((e.offsetY-10)/he.value*100),0),100);if(ae.value===void 0){let e=`zone-${Date.now()}`;S.value.push({name:e,points:[],filter:`include`,type:`contain`,labels:[`motion`,`person`,`vehicle`,`animal`],isPrivacyMask:!1,color:Ie()}),ae.value=S.value.length-1}S.value[t].points.push([n,r]),A(),Tn(()=>{let e=S.value[t].points.length-1;Oe({_id:`z${t}-p${e}`,zoneIndex:t,pointIndex:e,point:[n,r]})})}function Oe(e){if(e.zoneIndex===void 0||e.pointIndex===void 0)return;let t=h.value?.filter(t=>t.dataset.pointIndex===e.pointIndex.toString()&&t.dataset.zoneIndex===e.zoneIndex.toString());!t||t.length===0||Ue(t[0],e.point)}function ke(e){if(!S.value.length)return;let t=Math.round(e.point[0]/me.value*100),n=Math.round(e.point[1]/he.value*100);S.value[e.zoneIndex].points[e.pointIndex]=[t,n]}function Ae(){re.value=!0,ae.value=void 0}function je(e){if(ae.value===void 0){re.value=!1;return}re.value=e||!1;let t=ae.value;!S.value[t]||!S.value[t].points||(S.value[t].points.length<3?(S.value.splice(t,1),A()):(h.value?.forEach(e=>Ge(e)),w.value=t),ae.value=void 0)}function Me(){re.value=!0,ae.value=w.value}function Ne(){w.value===-1||!S.value.length||(S.value.splice(w.value,1),w.value=Math.max(-1,w.value-1),A(),Tn(()=>{Be()}))}function Pe(){if(S.value?.length){if(re.value&&ae.value!==void 0){let e=S.value[ae.value];e.points.length&&(e.points.pop(),e.points.length===0&&(S.value.splice(ae.value,1),ae.value=void 0),A());return}S.value.length>0&&(S.value.pop(),A(),Tn(()=>{Be()}))}}function Fe(){ce=!1,re.value=!1,ae.value=void 0,S.value&&(S.value.length=0,ie.value=[],Tn(()=>{Ve()}))}function Ie(){return`#`+[Math.floor(Math.random()*256),Math.floor(Math.random()*256),Math.floor(Math.random()*256)].map(e=>e.toString(16).padStart(2,`0`)).join(``)}function Le(e){if(!e||!e.length)return``;let t=e.map(e=>{let t=Math.round(e[0]/100*me.value),n=Math.round(e[1]/100*he.value);return`${t+10},${n+10}`});if(t.length===0)return``;let n=`M ${t[0]}`;for(let e=1;e<t.length;e++)n+=` L ${t[e]}`;return n+=` Z`,n}function ze(e){re.value||(w.value=e)}function Be(){Ve(),h.value?.forEach(e=>{if(!e.dataset.zoneIndex||!e.dataset.pointIndex)return;let t=parseInt(e.dataset.zoneIndex),n=parseInt(e.dataset.pointIndex);if(!S.value[t]||!S.value[t].points[n])return;let r=S.value[t].points[n];r&&(Ue(e,r),Ge(e))})}function Ve(){te.value.forEach(e=>e.destroy()),te.value=[]}function He(e){!S.value.length||!S.value[e.zoneIndex]||S.value[e.zoneIndex].points.length<4||(S.value[e.zoneIndex].points.splice(e.pointIndex,1),A(),Tn(()=>{Be()}))}function Ue(e,t){Object.assign(e.style,We(t))}function We(e){return{left:Math.round(e[0]/100*me.value)+`px`,top:Math.round(e[1]/100*he.value)+`px`}}function Ge(e){e.classList.add(`draggable`);let t=new yl.default(e,{containment:!0,grid:[0,0]}).on(`pointerDown`,()=>{document.querySelectorAll(`[data-point="${e.dataset.zoneIndex}-${e.dataset.pointIndex}"]`)[0]?.classList.add(`changing`)}).on(`dragMove`,()=>{if(!e.dataset.zoneIndex||!e.dataset.pointIndex||!e.dataset.id)return;let n=t.position.x,r=t.position.y;ke({_id:e.dataset.id,point:[n,r],pointIndex:parseInt(e.dataset.pointIndex),zoneIndex:parseInt(e.dataset.zoneIndex)})}).on(`pointerUp`,()=>{document.querySelectorAll(`.point`).forEach(e=>e.classList.remove(`changing`))});t.id=e.dataset.id,te.value.push(t)}function Ke(e,t,n){e.preventDefault(),T.value=t,le={lineIndex:t,pointIndex:n};let r=e=>{if(!le||!b.value)return;let t=b.value.getBoundingClientRect(),{x:n,y:r}=be(e),i=Math.min(Math.max((n-t.left-10)/me.value*100,0),100),a=Math.min(Math.max((r-t.top-10)/he.value*100,0),100);C.value[le.lineIndex].points[le.pointIndex]=[Math.round(i),Math.round(a)]},i=()=>{le=null,document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i),document.removeEventListener(`touchmove`,r),document.removeEventListener(`touchend`,i)};document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i),document.addEventListener(`touchmove`,r),document.addEventListener(`touchend`,i)}function qe(){C.value.push({name:`line-${Date.now()}`,points:[[40,30],[60,70]],direction:`both`,labels:[`person`,`vehicle`,`animal`,`package`],color:Ie()}),T.value=C.value.length-1}function Je(){T.value<0||!C.value.length||(C.value.splice(T.value,1),T.value=Math.max(-1,T.value-1))}function Ye(){if(T.value<0)return;let e=C.value[T.value];if(!e)return;let t=[`both`,`a-to-b`,`b-to-a`];e.direction=t[(t.indexOf(e.direction)+1)%t.length]}function Xe(e){let t=me.value,n=he.value,r=e.points[0][0]/100*t+10,i=e.points[0][1]/100*n+10,a=e.points[1][0]/100*t+10,o=e.points[1][1]/100*n+10,s=(r+a)/2,c=(i+o)/2,l=a-r,u=o-i,d=Math.sqrt(l*l+u*u)||1,f=-u,p=l,m=s-f/2,h=c-p/2,g=s+f/2,ee=c+p/2,_=f/d,v=p/d,y=10+t,b=10+n,x=(e,t)=>({x:Math.max(19,Math.min(y-9,e)),y:Math.max(19,Math.min(b-9,t))}),te=x(m-_*21,h-v*21),S=x(g+_*21,ee+v*21);return{h1x:r,h1y:i,h2x:a,h2y:o,ax:te.x+_*15,ay:te.y+v*15,bx:S.x-_*15,by:S.y-v*15,labelAx:te.x,labelAy:te.y,labelBx:S.x,labelBy:S.y}}async function Ze(){try{let e=[];e.push(s({cameraname:d.value,zoneData:S.value})),e.push(l({cameraname:d.value,lineData:C.value})),await Promise.all(e)}catch(e){return i.add({severity:`error`,detail:e,life:3e3}),null}}return ee(g,e=>{let t=e.target,n=t.closest(`.polygon`),r=t.closest(`.edit-button`),i=t.closest(`.remove-button`),a=t.closest(`.handle`),o=t.closest(`.zone-buttons`),s=t.closest(`.p-multiselect-list`),c=t.closest(`.p-colorpicker-panel`);!n&&!r&&!i&&!a&&!re.value&&!o&&!s&&!c&&(w.value=-1)}),F(oe,()=>{oe.value=-1}),F(w,(e,t)=>{if(e===-1&&S.value?.length&&S.value[t]){w.value=t;return}e===-1&&S.value?.length&&(oe.value=0)}),F(f,()=>{S.value=Xt(f.value),A()},{deep:!0,immediate:!0}),F(()=>r.lines,()=>{C.value=Xt(r.lines)},{deep:!0,immediate:!0}),F(x,e=>{e===`zones`?S.value.length&&(w.value<0||w.value>=S.value.length)&&(w.value=0):C.value.length&&(T.value<0||T.value>=C.value.length)&&(T.value=0)},{immediate:!0}),F([ue.width,ue.height],()=>{Be()}),On(async()=>{setTimeout(()=>{Be()})}),t({isLoading:O,onConfirm:Ze}),(e,t)=>{let n=pt,r=Re,i=_,a=Er,o=Rr,s=Dr,c=wr,l=gi,u=v,f=Si,m=st,ee=oi,te=vl,ne=hl,oe=fl,se=xi,ce=ll,le=ol,ue=rl,D=el,de=y;return L(),q(`div`,Sl,[X(`div`,Cl,[X(`div`,wl,[X(`div`,{ref_key:`outsideRef`,ref:g},null,512),X(`div`,{class:R([`w-full flex justify-center gap-3`,{"flex-row items-stretch":$(E).width.value>740,"flex-col":$(E).width.value<=740}])},[X(`div`,Tl,[X(`div`,El,[X(`div`,{ref_key:`playgroundContainerRef`,ref:b,class:`playground-container flex w-full h-full min-w-0`},[X(`section`,{class:R([`playground w-full h-full`,$(k)]),onClick:De},[X(`div`,Dl,[X(`div`,Ol,[(L(!0),q(V,null,M($(ie),e=>Xn((L(),q(`div`,{key:e._id,ref_for:!0,ref_key:`draggablesRef`,ref:h,class:`handle`,"data-id":e._id,"data-point":`${e.zoneIndex}-${e.pointIndex}`,"data-point-index":e.pointIndex,"data-zone-index":e.zoneIndex,onDblclick:Kn(t=>He(e),[`prevent`])},[...t[8]||=[X(`div`,{class:`delete-point`},null,-1)]],40,kl)),[[Yn,$(x)===`zones`]])),128)),X(`div`,Al,[(L(),q(`svg`,jl,[$(x)===`zones`?(L(!0),q(V,{key:0},M($(S),(e,t)=>(L(),q(`path`,{key:`zone-${t}`,d:Le(e.points),class:R([`cursor-pointer`,{dash:e.type===`intersect`&&!e.isPrivacyMask,selected:$(w)===t}]),style:Q({fill:e.isPrivacyMask?`rgba(16, 16, 16, 0.9)`:e.filter===`exclude`?`transparent`:`${e.color}4D`,stroke:e.isPrivacyMask?`#333333`:e.color,"stroke-width":`2`}),onClick:e=>ze(t),onDblclick:()=>e.isPrivacyMask=!e.isPrivacyMask,onMousedown:e=>xe(e,t),onMousemove:Se,onMouseup:Ce,onTouchstart:e=>xe(e,t),onTouchmove:Se,onTouchend:Ce},null,46,Ml))),128)):W(``,!0),$(x)===`lines`?(L(),q(V,{key:1},[X(`defs`,null,[(L(!0),q(V,null,M($(C),(e,t)=>(L(),q(`marker`,{id:`editor-arrow-ab-${t}`,key:`marker-ab-${t}`,markerWidth:`6`,markerHeight:`5`,refX:`5`,refY:`2.5`,orient:`auto`,markerUnits:`strokeWidth`},[X(`path`,{d:`M0,0 L6,2.5 L0,5 Z`,fill:e.color},null,8,Pl)],8,Nl))),128)),(L(!0),q(V,null,M($(C),(e,t)=>(L(),q(`marker`,{id:`editor-arrow-ba-${t}`,key:`marker-ba-${t}`,markerWidth:`6`,markerHeight:`5`,refX:`1`,refY:`2.5`,orient:`auto`,markerUnits:`strokeWidth`},[X(`path`,{d:`M6,0 L0,2.5 L6,5 Z`,fill:e.color},null,8,Il)],8,Fl))),128))]),(L(!0),q(V,null,M($(C),(e,t)=>(L(),q(V,{key:`line-${t}`},[X(`line`,{x1:Xe(e).h1x,y1:Xe(e).h1y,x2:Xe(e).h2x,y2:Xe(e).h2y,stroke:e.color,"stroke-width":`2`,"stroke-dasharray":`6,4`,opacity:`0.6`},null,8,Ll),X(`line`,{x1:Xe(e).ax,y1:Xe(e).ay,x2:Xe(e).bx,y2:Xe(e).by,stroke:e.color,"stroke-width":`3`,class:`cursor-pointer`,"stroke-opacity":$(T)===t?1:.7,"marker-end":e.direction===`b-to-a`?void 0:`url(#editor-arrow-ab-${t})`,"marker-start":e.direction===`a-to-b`?void 0:`url(#editor-arrow-ba-${t})`,onClick:e=>T.value=t},null,8,Rl),X(`rect`,{x:Xe(e).labelAx-9,y:Xe(e).labelAy-9,width:`18`,height:`18`,rx:`4`,fill:e.color},null,8,zl),X(`text`,{x:Xe(e).labelAx,y:Xe(e).labelAy,fill:`#fff`,"font-size":`11`,"font-weight":`bold`,"text-anchor":`middle`,"dominant-baseline":`central`},` A `,8,Bl),X(`rect`,{x:Xe(e).labelBx-9,y:Xe(e).labelBy-9,width:`18`,height:`18`,rx:`4`,fill:e.color},null,8,Vl),X(`text`,{x:Xe(e).labelBx,y:Xe(e).labelBy,fill:`#fff`,"font-size":`11`,"font-weight":`bold`,"text-anchor":`middle`,"dominant-baseline":`central`},` B `,8,Hl),X(`circle`,{cx:Xe(e).h1x,cy:Xe(e).h1y,r:`8`,fill:e.color,stroke:$(T)===t?`#fff`:e.color,"stroke-width":`2`,class:`cursor-grab`,onMousedown:Kn(e=>Ke(e,t,0),[`stop`]),onTouchstart:Kn(e=>Ke(e,t,0),[`stop`])},null,40,Ul),X(`circle`,{cx:Xe(e).h2x,cy:Xe(e).h2y,r:`8`,fill:e.color,stroke:$(T)===t?`#fff`:e.color,"stroke-width":`2`,class:`cursor-grab`,onMousedown:Kn(e=>Ke(e,t,1),[`stop`]),onTouchstart:Kn(e=>Ke(e,t,1),[`stop`])},null,40,Wl)],64))),128))],64)):W(``,!0)]))])]),t[9]||=X(`div`,{class:`shadowboard on`},null,-1)])],2)],512)]),X(`div`,Gl,[Z(n,{ref_key:`cameraCardRef`,ref:p,"camera-info":$(d),"source-role":`low-resolution`,"streaming-mode":`webrtc`,toolbar:!1,control:!1,subcontrol:!1,"flat-card":``,class:`w-full h-full border-[1px] border-color-inner`,"card-background-color":`#000`},null,8,[`camera-info`])])]),X(`div`,{class:R([`w-full flex flex-col gap-6 zone-buttons items-center self-stretch`,{"!gap-3":$(E).width.value>740}]),style:Q({"max-width":$(E).width.value>740?`300px`:void 0})},[Z(r,{modelValue:$(x),"onUpdate:modelValue":t[0]||=e=>Hn(x)?x.value=e:null,options:$(ge),"option-label":`label`,"option-value":`value`,class:`w-full`,pt:{root:{class:`flex w-full`},pcToggleButton:{root:{class:`flex-1 !text-sm`}}}},null,8,[`modelValue`,`options`]),$(x)===`lines`?(L(),q(V,{key:0},[X(`div`,Kl,[X(`label`,{for:`line[${$(T)}].name`,class:`cui-label`},z(e.$t(`components.form.label.name`)),9,ql),Z(a,null,{default:Y(()=>[Z(i,{"model-value":$(C)[$(T)]?.name,invalid:!!$(pe),loading:$(O),disabled:$(T)<0,type:`text`,onValueChange:t[1]||=e=>{$(C)[$(T)]&&($(C)[$(T)].name=e??``)}},null,8,[`model-value`,`invalid`,`loading`,`disabled`])]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[$(pe)?(L(),q(`span`,Jl,z($(pe)),1)):W(``,!0)]),_:1})]),X(`div`,Yl,[X(`label`,{for:`line[${$(T)}].labels`,class:`cui-label`},z(e.$t(`components.form.label.labels`)),9,Xl),Z(a,null,{default:Y(()=>[Z(o,{"model-value":$(C)[$(T)]?.labels,options:$(ve),loading:$(O),"max-selected-labels":2,"show-toggle-all":!1,"option-label":`label`,"option-value":`value`,"option-group-label":`label`,"option-group-children":`items`,"show-clear":``,type:`text`,onValueChange:t[2]||=e=>{$(C)[$(T)]&&($(C)[$(T)].labels=e)}},null,8,[`model-value`,`options`,`loading`])]),_:1})]),X(`div`,Zl,[X(`label`,{for:`line[${$(T)}].color`,class:`cui-label`},z(e.$t(`components.form.label.color`)),9,Ql),Z(a,null,{default:Y(()=>[Z(i,{"model-value":$(C)[$(T)]?.color,loading:$(O),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),Z(c,null,{default:Y(()=>[(L(),U(s,{key:$(T),"model-value":$(C)[$(T)]?.color,format:`hex`,onValueChange:t[3]||=e=>e&&$(C)[$(T)]?$(C)[$(T)].color=`#${e}`:null},null,8,[`model-value`]))]),_:1})]),_:1})]),X(`div`,$l,[Xn((L(),U(u,{loading:$(O),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:qe},{icon:Y(()=>[Z(l,{width:`20px`,height:`20px`})]),_:1},8,[`loading`])),[[de,{value:e.$t(`components.form.tooltip.new`)},void 0,{top:!0}]]),Xn((L(),U(u,{loading:$(O),disabled:!$(C).length||$(T)<0,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Je},{icon:Y(()=>[Z(f,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[de,{value:e.$t(`components.form.tooltip.delete`)},void 0,{top:!0}]])]),X(`div`,eu,[Xn((L(),U(u,{loading:$(O),disabled:$(T)<0,severity:`secondary`,class:`!rounded-none !h-full w-[80px] text-sm`,onClick:Ye},{default:Y(()=>[B(z($(C)[$(T)]?.direction===`both`?`A ↔ B`:$(C)[$(T)]?.direction===`a-to-b`?`A → B`:`B → A`),1)]),_:1},8,[`loading`,`disabled`])),[[de,{value:$(C)[$(T)]?.direction===`both`?`A ↔ B`:$(C)[$(T)]?.direction===`a-to-b`?`A → B`:`B → A`},void 0,{top:!0}]])])],64)):W(``,!0),$(x)===`zones`?(L(),q(V,{key:1},[X(`div`,tu,[X(`label`,{for:`zone[${$(w)}].name`,class:`cui-label`},z(e.$t(`components.form.label.name`)),9,nu),Z(a,null,{default:Y(()=>[Z(i,{"model-value":$(S)[$(w)]?.name,invalid:!!$(fe),loading:$(O),disabled:$(w)<0||$(S)[$(w)]?.isPrivacyMask,type:`text`,onValueChange:t[4]||=e=>{$(S)[$(w)]&&($(S)[$(w)].name=e??``)}},null,8,[`model-value`,`invalid`,`loading`,`disabled`])]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[$(fe)?(L(),q(`span`,ru,z($(fe)),1)):W(``,!0)]),_:1})]),X(`div`,iu,[X(`label`,{for:`zone[${$(w)}].labels`,class:`cui-label`},z(e.$t(`components.form.label.labels`)),9,au),Z(a,null,{default:Y(()=>[Z(o,{"model-value":$(S)[$(w)]?.labels,options:$(_e),disabled:$(S)[$(w)]?.isPrivacyMask,loading:$(O),"max-selected-labels":2,"show-toggle-all":!1,"option-label":`label`,"option-value":`value`,"option-group-label":`label`,"option-group-children":`items`,"show-clear":``,type:`text`,onValueChange:t[5]||=e=>$(S)[$(w)].labels=e},null,8,[`model-value`,`options`,`disabled`,`loading`])]),_:1})]),X(`div`,ou,[X(`label`,{for:`zone[${$(w)}].color`,class:`cui-label`},z(e.$t(`components.form.label.color`)),9,su),Z(a,null,{default:Y(()=>[Z(i,{"model-value":$(S)[$(w)]?.color,disabled:$(S)[$(w)]?.isPrivacyMask,loading:$(O),readonly:``,type:`text`},null,8,[`model-value`,`disabled`,`loading`]),Z(c,null,{default:Y(()=>[(L(),U(s,{key:$(w),"model-value":$(S)[$(w)]?.color,format:`hex`,disabled:$(S)[$(w)]?.isPrivacyMask,onValueChange:t[6]||=e=>e?$(S)[$(w)].color=`#${e}`:null},null,8,[`model-value`,`disabled`]))]),_:1})]),_:1})]),X(`div`,cu,[$(re)?Xn((L(),U(u,{key:1,disabled:$(ae)!==void 0&&$(S)[$(ae)]?.points?.length<3,loading:$(O),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:t[7]||=e=>je(!1)},{icon:Y(()=>[Z(m,{width:`20px`,height:`20px`})]),_:1},8,[`disabled`,`loading`])),[[de,{value:e.$t(`components.form.tooltip.finish`)},void 0,{top:!0}]]):Xn((L(),U(u,{key:0,loading:$(O),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ae},{icon:Y(()=>[Z(l,{width:`20px`,height:`20px`})]),_:1},8,[`loading`])),[[de,{value:e.$t(`components.form.tooltip.new`)},void 0,{top:!0}]]),Xn((L(),U(u,{loading:$(O),disabled:!$(S).length||$(w)<0||$(re),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Me},{icon:Y(()=>[Z(ee,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[de,{value:e.$t(`components.form.tooltip.edit`)},void 0,{top:!0}]]),Xn((L(),U(u,{loading:$(O),disabled:!$(S).length||$(w)<0,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ne},{icon:Y(()=>[Z(f,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[de,{value:e.$t(`components.form.tooltip.delete`)},void 0,{top:!0}]]),Xn((L(),U(u,{loading:$(O),disabled:!$(S).length,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Pe},{icon:Y(()=>[Z(te,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[de,{value:e.$t(`components.form.tooltip.undo`)},void 0,{top:!0}]]),Xn((L(),U(u,{loading:$(O),disabled:!$(S).length,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Fe},{icon:Y(()=>[Z(ne,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[de,{value:e.$t(`components.form.tooltip.clear`)},void 0,{top:!0}]])]),X(`div`,lu,[Xn((L(),U(u,{loading:$(O),disabled:!($(S).length&&$(w)>=0&&$(S)[$(w)]),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:we},{icon:Y(()=>[$(S)[$(w)]?.isPrivacyMask?(L(),U(oe,{key:0,width:`20px`,height:`20px`})):(L(),U(se,{key:1,width:`20px`,height:`20px`}))]),_:1},8,[`loading`,`disabled`])),[[de,{value:$(S)[$(w)]?.isPrivacyMask?e.$t(`components.form.tooltip.privacy_mask`):e.$t(`components.form.tooltip.public_mask`)},void 0,{top:!0}]]),Xn((L(),U(u,{loading:$(O),disabled:$(S)[$(w)]?.isPrivacyMask,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:j},{icon:Y(()=>[$(S)[$(w)]?.filter===`include`?(L(),U(ce,{key:0,width:`20px`,height:`20px`})):(L(),U(le,{key:1,width:`20px`,height:`20px`}))]),_:1},8,[`loading`,`disabled`])),[[de,{value:$(S)[$(w)]?.filter===`include`?e.$t(`components.form.tooltip.include`):e.$t(`components.form.tooltip.exclude`)},void 0,{top:!0}]]),Xn((L(),U(u,{loading:$(O),disabled:$(S)[$(w)]?.isPrivacyMask,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Te},{icon:Y(()=>[$(S)[$(w)]?.type===`intersect`?(L(),U(ue,{key:0,width:`20px`,height:`20px`})):(L(),U(D,{key:1,width:`20px`,height:`20px`}))]),_:1},8,[`loading`,`disabled`])),[[de,{value:$(S)[$(w)]?.type===`intersect`?e.$t(`components.form.tooltip.intersect`):e.$t(`components.form.tooltip.contain`)},void 0,{top:!0}]])])],64)):W(``,!0)],6)],2)])])],512)}}}),[[`__scopeId`,`data-v-5f061a75`]]),du={class:`text-color font-normal`},fu={class:`flex flex-col gap-6`},pu={for:`name`,class:`cui-label`},mu={for:`room`,class:`cui-label`},hu={class:`flex gap-2`},gu={for:`type`,class:`cui-label`},_u={class:`w-full flex flex-col gap-2`},vu={class:`flex items-center gap-4`},yu={class:`flex flex-col field-switch-gap`},bu={for:`disabled`,class:`cui-label-switch`},xu={class:`text-color font-normal`},Su={class:`flex flex-col gap-6`},Cu={for:`info.manufacturer`,class:`cui-label`},wu={for:`info.model`,class:`cui-label`},Tu={for:`info.hardware`,class:`cui-label`},Eu={for:`info.serialNumber`,class:`cui-label`},Du={for:`info.firmwareVersion`,class:`cui-label`},Ou={for:`info.supportUrl`,class:`cui-label`},ku={class:`text-color font-normal`},Au={class:`flex flex-col gap-6`},ju={for:`interfaceSettings.streamingMode`,class:`cui-label`},Mu={for:`interfaceSettings.streamingSource`,class:`cui-label`},Nu={for:`interfaceSettings.aspectRatio`,class:`cui-label`},Pu={class:`text-color font-normal`},Fu={class:`flex flex-col gap-6`},Iu={class:`w-full flex flex-col gap-2`},Lu={class:`flex items-center gap-4`},Ru={class:`flex flex-col field-switch-gap`},zu={for:`detectionSettings.snooze`,class:`cui-label-switch`},Bu={class:`section-title mt-2`},Vu={for:`detectionSettings.motion.resolution`,class:`cui-label`},Hu={for:`detectionSettings.motion.timeout`,class:`cui-label`},Uu={class:`section-title mt-2`},Wu={for:`detectionSettings.object.confidence`,class:`cui-label`},Gu={class:`flex items-center gap-4`},Ku={class:`flex flex-col field-switch-gap`},qu={for:`detectionSettings.object.suppressStatic`,class:`cui-label-switch`},Ju={class:`section-title mt-2`},Yu={for:`detectionSettings.audio.confidence`,class:`cui-label`},Xu={for:`detectionSettings.audio.minDecibels`,class:`cui-label`},Zu={for:`detectionSettings.audio.timeout`,class:`cui-label`},Qu={class:`section-title mt-2`},$u={for:`detectionSettings.face.confidence`,class:`cui-label`},ed={class:`section-title mt-2`},td={for:`detectionSettings.licensePlate.confidence`,class:`cui-label`},nd={for:`detectionSettings.licensePlate.minLength`,class:`cui-label`},rd={class:`section-title mt-2`},id={for:`detectionSettings.sensor.timeout`,class:`cui-label`},ad={for:`detectionSettings.sensor.triggers`,class:`cui-label`},od={class:`text-color font-normal`},sd={class:`w-full flex flex-col gap-6`},cd={class:`flex items-center gap-4`},ld={class:`flex flex-col field-switch-gap`},ud={for:`recordingSettings.enabled`,class:`cui-label-switch`},dd={for:`recordingSettings.mode`,class:`cui-label`},fd={for:`recordingSettings.preBuffer`,class:`cui-label`},pd={for:`recordingSettings.sources`,class:`cui-label`},md={class:`text-color font-normal`},hd={class:`w-full flex flex-col gap-4`},gd={class:`flex items-center gap-4`},_d={class:`flex flex-col field-switch-gap`},vd={for:`ptzAutotrack.enabled`,class:`cui-label-switch`},yd={class:`cui-label`},bd={class:`cui-label`},xd={class:`cui-label`},Sd={class:`cui-label`},Cd={class:`cui-label`},wd={class:`cui-label`},Td={class:`flex items-center gap-4`},Ed={class:`flex flex-col field-switch-gap`},Dd={for:`ptzAutotrack.returnToHome`,class:`cui-label-switch`},Od={class:`cui-label`},kd={class:`text-color font-normal`},Ad={class:`flex flex-col gap-6`},jd={class:`w-full flex flex-col gap-2`},Md={class:`flex items-center gap-4`},Nd={class:`flex flex-col field-switch-gap`},Pd={for:`snapshotSettings.autoRefresh`,class:`cui-label-switch`},Fd={for:`snapshotSettings.ttl`,class:`cui-label`},Id={for:`snapshotSettings.interval`,class:`cui-label`},Ld={class:`text-color font-normal`},Rd={class:`flex flex-col gap-4`},zd={key:0,class:`flex flex-col gap-2`},Bd={class:`flex flex-col flex-1 min-w-0`},Vd={class:`text-sm font-medium truncate`},Hd={class:`text-xs text-muted`},Ud={key:1,class:`text-sm text-muted text-center min-h-[30px]`},Wd={class:`text-color font-normal`},Gd={class:`flex flex-col gap-4`},Kd={key:0,class:`flex flex-col gap-2`},qd={class:`flex flex-col flex-1 min-w-0`},Jd={class:`text-sm font-medium truncate`},Yd={class:`text-xs text-muted`},Xd={key:1,class:`text-sm text-muted text-center min-h-[30px]`},Zd={class:`text-color font-normal`},Qd={class:`flex flex-col gap-6`},$d={for:`frameWorkerSettings.fps`,class:`cui-label`},ef={class:`w-full flex flex-col gap-2`},tf={class:`flex items-center gap-4`},nf={class:`flex flex-col field-switch-gap`},rf={for:`frameWorkerSettings.hqSnapshots`,class:`cui-label-switch`},af=H({__name:`Settings`,props:Pn({camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:Pn([`close`],[`update:modelValue`]),setup(e,{emit:t}){let n=new Set([S.Contact,S.Occupancy,S.Smoke,S.Leak,S.Doorbell,S.Switch,S.Light,S.Siren,S.Lock,S.Garage,S.SecuritySystem]),r=new Yt,i=new Yt,a=new Vc,s=e,c=t,l=An(e,`modelValue`),u=pr(),d=_r(),f=Xe(),{t:p}=ye(),{camera:m,cameraDevice:h,loading:g}=nr(s),{sensors:ee}=He(h),{data:b,isBusy:x}=i.getRoomsQuery(),{data:te}=r.getCameraExtensionsQuery(l.value.name),{mutateAsync:C,isPending:ne}=r.removeCameraQuery(),{mutateAsync:re,isPending:ie}=r.patchZonesQuery(),{mutateAsync:ae,isPending:w}=r.patchLinesQuery(),{data:oe}=a.getVirtualSensorsQuery(),{mutateAsync:T,isPending:se}=a.createVirtualSensorQuery(),{mutateAsync:ce}=a.patchVirtualSensorQuery(),{mutateAsync:le,isPending:E}=a.deleteVirtualSensorQuery(),ue=J([`camera`,`doorbell`]),D=J([`auto`,`mse`,`webrtc`,`webrtc/tcp`]),de=J([`high-resolution`,`mid-resolution`,`low-resolution`]),fe=J([`16:9`,`9:16`,`8:3`,`4:3`,`1:1`]),pe=J([`low`,`medium`,`high`]),me=J([`continuous`,`event`,`adhoc`]),he=J([`high`,`mid`,`low`]),ge=J([]),_e=G(()=>ee.value.some(e=>e.type===S.PTZ)),ve=G(()=>(te.value??[]).some(e=>e.contract.interfaces?.includes(o.NVR))),O=G(()=>(oe.value??[]).filter(e=>e.cameraId===l.value._id)),k=G(()=>ie.value||w.value),A=G(()=>[...(m.value.detectionZones??[]).map((e,t)=>({kind:`zone`,index:t,name:e.name,color:e.color,typeLabel:e.isPrivacyMask?p(`components.camera_options.zone_entry_privacy_mask`):p(`components.camera_options.zone_entry_zone`)})),...(m.value.detectionLines??[]).map((e,t)=>({kind:`line`,index:t,name:e.name,color:e.color,typeLabel:p(`components.camera_options.zone_entry_line`)}))]),be=G(()=>[{label:p(`components.automation_nodes.label_person`),value:`person`},{label:p(`components.automation_nodes.label_vehicle`),value:`vehicle`},{label:p(`components.automation_nodes.label_animal`),value:`animal`},{label:p(`components.automation_nodes.label_package`),value:`package`}]),xe=G(()=>ee.value.filter(e=>n.has(e.type)).map(e=>({label:e.displayName.value,value:Ee(e.type,e.name,e.pluginId)}))),Se=G(()=>new Set(xe.value.map(e=>e.value))),Ce=G(()=>(l.value.detectionSettings.sensor?.triggers??[]).map(e=>Ee(e.sensorType,e.sensorName,e.pluginId)).filter(e=>Se.value.has(e))),we=G(()=>{let e=b.value??[`Default`],t=new Set(e.map(e=>e.toLowerCase()));return[...e,...ge.value.filter(e=>!t.has(e.toLowerCase()))].map(e=>({label:e===`Default`?p(`components.form.label.room_default`):e,value:e}))}),j=G(()=>g.value||ne.value);function Te(e){let t=l.value.recordingSettings??{enabled:!0,mode:`continuous`,preBuffer:10,sources:[`high`,`mid`,`low`]};l.value.recordingSettings={...t,...e}}function Ee(e,t,n){return`${e}::${t}::${n}`}function De(e){let t=(l.value.detectionSettings.sensor?.triggers??[]).filter(e=>!Se.value.has(Ee(e.sensorType,e.sensorName,e.pluginId))),n=e.map(e=>{let[t,n,r]=e.split(`::`);return{sensorType:t,sensorName:n,pluginId:r}});l.value.detectionSettings.sensor||(l.value.detectionSettings.sensor={timeout:30,triggers:[]}),l.value.detectionSettings.sensor.triggers=[...t,...n]}function Oe(){f.openComponentDialog(_i,{data:{title:p(`components.dialog.title.create_room`),confirmText:p(`components.form.button.add`),contentProps:{}},onConfirm:e=>{if(!e)return;let t=we.value.find(t=>t.value.toLowerCase()===e.toLowerCase()),n=t?.value??e;t||ge.value.push(n),l.value.room=n}})}function ke(){f.openComponentDialog(Zc,{data:{title:p(`components.camera_options.virtual_sensor_create`),confirmText:p(`components.form.button.save`),loading:se,contentProps:{cameraId:l.value._id}},onConfirm:async e=>{e&&await T({data:e})}})}function Ae(e){f.openComponentDialog(Cs,{data:{title:p(`components.camera_options.sensor_display_name`),confirmText:p(`components.form.button.save`),contentProps:{currentDisplayName:e.displayName||e.name}},onConfirm:async t=>{t&&t!==e.displayName&&await ce({id:e._id,data:{displayName:t}})}})}function je(e){f.openTextDialog({data:{title:p(`components.camera_options.virtual_sensor_delete`),contentText:p(`components.camera_options.virtual_sensor_delete_confirm`),confirmText:p(`components.form.button.remove`),loading:E},onConfirm:async()=>{await le({id:e._id})}})}function Me(){f.openTextDialog({data:{title:p(`components.dialog.title.confirm`),confirmText:p(`components.form.button.remove`),contentText:p(`components.dialog.message.confirm_remove`),confirmButtonProps:{severity:`danger`}},onConfirm:async()=>{try{await C({cameraname:m.value.name}),u.path.includes(m.value.name)&&d.push({path:`/home`}),c(`close`)}catch{}}})}function Ne(e=[]){f.openComponentDialog(uu,{data:{title:p(`components.zone_editor.edit_zones`),loading:j,contentProps:{cameraName:m.value.name,zones:e,lines:m.value.detectionLines??[]}}})}function Pe(){f.openComponentDialog(Jc,{data:{title:p(`components.form.label.aspect_ratio`),contentProps:{camera:m.value,current:l.value.interfaceSettings.aspectRatio,presets:fe.value},confirmText:p(`components.form.button.apply`)},onConfirm:e=>{l.value.interfaceSettings.aspectRatio=e}})}function Fe(e){f.openComponentDialog(uu,{data:{title:p(`components.zone_editor.edit_zones`),loading:j,contentProps:{cameraName:m.value.name,zones:m.value.detectionZones??[],lines:m.value.detectionLines??[],initialTab:e.kind===`line`?`lines`:`zones`,initialSelection:e.index}}})}function Ie(e){f.openTextDialog({data:{title:p(`components.camera_options.zone_entry_delete`),contentText:p(`components.camera_options.zone_entry_delete_confirm`),confirmText:p(`components.form.button.remove`),loading:k},onConfirm:async()=>{if(e.kind===`zone`){let t=(m.value.detectionZones??[]).filter((t,n)=>n!==e.index);await re({cameraname:m.value.name,zoneData:t})}else{let t=(m.value.detectionLines??[]).filter((t,n)=>n!==e.index);await ae({cameraname:m.value.name,lineData:t})}}})}return(e,t)=>{let n=Tr,r=qr,i=_,a=Er,o=Ir,s=gi,c=v,u=Cr,d=Lr,f=yr,p=Fr,h=Rr,g=hi,ee=oi,b=mi,te=br,S=y;return L(),U(te,{multiple:``,class:`p-4`},{default:Y(()=>[Z(f,{value:`general`},{default:Y(()=>[Z(n,{class:`px-0 pt-0`},{default:Y(()=>[X(`span`,du,z(e.$t(`components.camera_options.general`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,fu,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.general_hint`)),1)]),_:1}),Z($(P),{modelValue:l.value.name,"onUpdate:modelValue":t[0]||=e=>l.value.name=e,modelModifiers:{trim:!0},name:`name`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:t,errors:n})=>[X(`label`,pu,z(e.$t(`components.form.label.name`)),1),Z(a,null,{default:Y(()=>[Z(i,Jn(t,{invalid:n.length>0,loading:$(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`name`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Z($(P),{"model-value":l.value.room,name:`room`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,mu,z(e.$t(`components.form.label.room`)),1),X(`div`,hu,[Z(o,{"model-value":l.value.room,options:$(we),"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:$(x),class:`w-full`,"onUpdate:modelValue":t[1]||=e=>l.value.room=e},null,8,[`model-value`,`options`,`invalid`,`loading`]),Xn((L(),U(c,{severity:`secondary`,outlined:``,class:`shrink-0 h-[42px] w-[42px] p-0`,onClick:Oe},{icon:Y(()=>[Z(s,{class:`w-4 h-4`})]),_:1})),[[S,e.$t(`components.form.button.create_room`),void 0,{top:!0}]])]),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.room`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.type,name:`type`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,gu,z(e.$t(`components.form.label.type`)),1),Z(a,null,{default:Y(()=>[Z(o,{"model-value":l.value.type,options:$(ue),invalid:n.length>0,loading:$(j),type:`text`,onValueChange:t[2]||=e=>l.value.type=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`type`,class:`cui-input-error`})]),_:1})]),_:1},8,[`model-value`]),X(`div`,_u,[Z($(P),{"model-value":l.value.disabled,value:!0,"unchecked-value":!1,type:`checkbox`,name:`disabled`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:i})=>[X(`div`,vu,[X(`div`,yu,[X(`label`,bu,z(e.$t(`components.form.label.disabled`)),1),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.disable_camera`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`disabled`,class:`cui-input-switch-error`})]),_:1})]),Z(u,Jn({"model-value":l.value.disabled},n,{invalid:i.length>0,loading:$(j),class:`ml-auto shrink-0`,onValueChange:t[3]||=e=>l.value.disabled=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),Z(c,{fluid:``,severity:`danger`,loading:$(j),class:`cui-button-medium`,label:e.$t(`components.form.button.remove`),onClick:t[4]||=e=>Me()},null,8,[`loading`,`label`])])]),_:1})]),_:1}),Z(f,{value:`branding`},{default:Y(()=>[Z(n,{class:`px-0`},{default:Y(()=>[X(`span`,xu,z(e.$t(`components.camera_options.branding`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,Su,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.branding_hint`)),1)]),_:1}),Z($(P),{modelValue:l.value.info.manufacturer,"onUpdate:modelValue":t[5]||=e=>l.value.info.manufacturer=e,modelModifiers:{trim:!0},name:`info.manufacturer`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:t,errors:n})=>[X(`label`,Cu,z(e.$t(`components.form.label.manufacturer`)),1),Z(a,null,{default:Y(()=>[Z(i,Jn(t,{invalid:n.length>0,loading:$(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`info.manufacturer`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Z($(P),{modelValue:l.value.info.model,"onUpdate:modelValue":t[6]||=e=>l.value.info.model=e,modelModifiers:{trim:!0},name:`info.model`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:t,errors:n})=>[X(`label`,wu,z(e.$t(`components.form.label.model`)),1),Z(a,null,{default:Y(()=>[Z(i,Jn(t,{invalid:n.length>0,loading:$(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`info.model`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Z($(P),{modelValue:l.value.info.hardware,"onUpdate:modelValue":t[7]||=e=>l.value.info.hardware=e,modelModifiers:{trim:!0},name:`info.hardware`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:t,errors:n})=>[X(`label`,Tu,z(e.$t(`components.form.label.hardware_version`)),1),Z(a,null,{default:Y(()=>[Z(i,Jn(t,{invalid:n.length>0,loading:$(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`info.hardware`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Z($(P),{modelValue:l.value.info.serialNumber,"onUpdate:modelValue":t[8]||=e=>l.value.info.serialNumber=e,modelModifiers:{trim:!0},name:`info.serialNumber`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:t,errors:n})=>[X(`label`,Eu,z(e.$t(`components.form.label.serial_number`)),1),Z(a,null,{default:Y(()=>[Z(i,Jn(t,{invalid:n.length>0,loading:$(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`info.serialNumber`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Z($(P),{modelValue:l.value.info.firmwareVersion,"onUpdate:modelValue":t[9]||=e=>l.value.info.firmwareVersion=e,modelModifiers:{trim:!0},name:`info.firmwareVersion`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:t,errors:n})=>[X(`label`,Du,z(e.$t(`components.form.label.firmware_version`)),1),Z(a,null,{default:Y(()=>[Z(i,Jn(t,{invalid:n.length>0,loading:$(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`info.firmwareVersion`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Z($(P),{modelValue:l.value.info.supportUrl,"onUpdate:modelValue":t[10]||=e=>l.value.info.supportUrl=e,modelModifiers:{trim:!0},name:`info.supportUrl`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:t,errors:n})=>[X(`label`,Ou,z(e.$t(`components.form.label.support_url`)),1),Z(a,null,{default:Y(()=>[Z(i,Jn(t,{invalid:n.length>0,loading:$(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`info.supportUrl`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`])])]),_:1})]),_:1}),Z(f,{value:`interface`},{default:Y(()=>[Z(n,{class:`px-0`},{default:Y(()=>[X(`span`,ku,z(e.$t(`components.camera_options.interface`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,Au,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.interface_hint`)),1)]),_:1}),Z($(P),{"model-value":l.value.interfaceSettings.streamingMode,name:`interfaceSettings.streamingMode`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,ju,z(e.$t(`components.form.label.streaming_mode`)),1),Z(a,null,{default:Y(()=>[Z(o,{"model-value":l.value.interfaceSettings.streamingMode,options:$(D),invalid:n.length>0,loading:$(j),type:`text`,onValueChange:t[11]||=e=>l.value.interfaceSettings.streamingMode=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`interfaceSettings.streamingMode`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.streaming_mode`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.interfaceSettings.streamingSource,name:`interfaceSettings.streamingSource`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Mu,z(e.$t(`components.form.label.streaming_source`)),1),Z(a,null,{default:Y(()=>[Z(o,{"model-value":l.value.interfaceSettings.streamingSource,options:$(de),invalid:n.length>0,loading:$(j),type:`text`,onValueChange:t[12]||=e=>l.value.interfaceSettings.streamingSource=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`interfaceSettings.streamingSource`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.streaming_source`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.interfaceSettings.aspectRatio,name:`interfaceSettings.aspectRatio`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:t})=>[X(`label`,Nu,z(e.$t(`components.form.label.aspect_ratio`)),1),Z(a,null,{default:Y(()=>[Z(i,{"model-value":l.value.interfaceSettings.aspectRatio,invalid:t.length>0,readonly:``,tabindex:`-1`,class:`cursor-pointer`,onClick:Pe},null,8,[`model-value`,`invalid`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`interfaceSettings.aspectRatio`,class:`cui-input-error`})]),_:1}),t.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.aspect_ratio`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),Z(f,{value:`detection`},{default:Y(()=>[Z(n,{class:`px-0`},{default:Y(()=>[X(`span`,Pu,z(e.$t(`components.camera_options.detection`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,Fu,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.detection_hint`)),1)]),_:1}),X(`div`,Iu,[Z($(P),{"model-value":l.value.detectionSettings?.snooze,value:!0,"unchecked-value":!1,type:`checkbox`,name:`detectionSettings.snooze`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:i})=>[X(`div`,Lu,[X(`div`,Ru,[X(`label`,zu,z(e.$t(`components.form.label.snooze`)),1),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.snooze_camera`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.snooze`,class:`cui-input-switch-error`})]),_:1})]),Z(u,Jn({"model-value":l.value.detectionSettings?.snooze},n,{invalid:i.length>0,loading:$(j),class:`ml-auto shrink-0`,onValueChange:t[13]||=e=>{l.value.detectionSettings&&(l.value.detectionSettings.snooze=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),X(`span`,Bu,z(e.$t(`components.camera_options.sensor_type_motion`)),1),Z($(P),{"model-value":l.value.detectionSettings.motion.resolution,name:`detectionSettings.motion.resolution`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Vu,z(e.$t(`components.form.label.motion_resolution`)),1),Z(a,null,{default:Y(()=>[Z(o,{"model-value":l.value.detectionSettings.motion.resolution,options:$(pe),invalid:n.length>0,loading:$(j),type:`text`,onValueChange:t[14]||=e=>l.value.detectionSettings.motion.resolution=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.motion.resolution`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.motion_resolution`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.detectionSettings.motion.timeout,name:`detectionSettings.motion.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Hu,z(e.$t(`components.form.label.motion_timeout`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.detectionSettings.motion.timeout,invalid:n.length>0,loading:$(j),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[15]||=e=>l.value.detectionSettings.motion.timeout=e??void 0,onInput:t[16]||=e=>l.value.detectionSettings.motion.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.motion.timeout`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.motion_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),X(`span`,Uu,z(e.$t(`components.camera_options.sensor_type_object`)),1),Z($(P),{"model-value":l.value.detectionSettings.object.confidence,name:`detectionSettings.object.confidence`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Wu,z(e.$t(`components.form.label.confidence`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.detectionSettings.object.confidence,invalid:n.length>0,loading:$(j),"show-buttons":``,step:.01,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[17]||=e=>l.value.detectionSettings.object.confidence=e??void 0,onInput:t[18]||=e=>l.value.detectionSettings.object.confidence=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.object.confidence`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.detectionSettings.object.suppressStatic??!0,value:!0,"unchecked-value":!1,type:`checkbox`,name:`detectionSettings.object.suppressStatic`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:i})=>[X(`div`,Gu,[X(`div`,Ku,[X(`label`,qu,z(e.$t(`components.form.label.suppress_static`)),1),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.suppress_static`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.object.suppressStatic`,class:`cui-input-switch-error`})]),_:1})]),Z(u,Jn({"model-value":l.value.detectionSettings.object.suppressStatic??!0},n,{invalid:i.length>0,loading:$(j),class:`ml-auto shrink-0`,onValueChange:t[19]||=e=>l.value.detectionSettings.object.suppressStatic=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),X(`span`,Ju,z(e.$t(`components.camera_options.sensor_type_audio`)),1),Z($(P),{"model-value":l.value.detectionSettings.audio.confidence,name:`detectionSettings.audio.confidence`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Yu,z(e.$t(`components.form.label.audio_confidence`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.detectionSettings.audio.confidence,invalid:n.length>0,loading:$(j),"show-buttons":``,step:.05,min:0,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[20]||=e=>l.value.detectionSettings.audio.confidence=e??void 0,onInput:t[21]||=e=>l.value.detectionSettings.audio.confidence=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.audio.confidence`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.audio_confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.detectionSettings.audio.minDecibels,name:`detectionSettings.audio.minDecibels`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Xu,z(e.$t(`components.form.label.audio_min_decibels`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.detectionSettings.audio.minDecibels,invalid:n.length>0,loading:$(j),"show-buttons":``,step:1,min:-100,max:0,mode:`decimal`,"use-grouping":!1,onValueChange:t[22]||=e=>l.value.detectionSettings.audio.minDecibels=e??void 0,onInput:t[23]||=e=>l.value.detectionSettings.audio.minDecibels=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.audio.minDecibels`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.audio_min_decibels`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.detectionSettings.audio.timeout,name:`detectionSettings.audio.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Zu,z(e.$t(`components.form.label.audio_timeout`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.detectionSettings.audio.timeout,invalid:n.length>0,loading:$(j),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[24]||=e=>l.value.detectionSettings.audio.timeout=e??void 0,onInput:t[25]||=e=>l.value.detectionSettings.audio.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.audio.timeout`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.audio_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),X(`span`,Qu,z(e.$t(`components.camera_options.sensor_type_face`)),1),Z($(P),{"model-value":l.value.detectionSettings.face?.confidence,name:`detectionSettings.face.confidence`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,$u,z(e.$t(`components.form.label.face_confidence`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.detectionSettings.face?.confidence,invalid:n.length>0,loading:$(j),"show-buttons":``,step:.01,min:0,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[26]||=e=>l.value.detectionSettings.face={confidence:e??void 0},onInput:t[27]||=e=>l.value.detectionSettings.face={confidence:e.value??void 0}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.face.confidence`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.face_confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),X(`span`,ed,z(e.$t(`components.camera_options.sensor_type_licensePlate`)),1),Z($(P),{"model-value":l.value.detectionSettings.licensePlate?.confidence,name:`detectionSettings.licensePlate.confidence`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,td,z(e.$t(`components.form.label.plate_confidence`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.detectionSettings.licensePlate?.confidence,invalid:n.length>0,loading:$(j),"show-buttons":``,step:.01,min:0,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[28]||=e=>l.value.detectionSettings.licensePlate={...l.value.detectionSettings.licensePlate,confidence:e??void 0},onInput:t[29]||=e=>l.value.detectionSettings.licensePlate={...l.value.detectionSettings.licensePlate,confidence:e.value??void 0}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.licensePlate.confidence`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.plate_confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.detectionSettings.licensePlate?.minLength,name:`detectionSettings.licensePlate.minLength`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,nd,z(e.$t(`components.form.label.plate_min_length`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.detectionSettings.licensePlate?.minLength,invalid:n.length>0,loading:$(j),"show-buttons":``,step:1,min:1,max:10,"use-grouping":!1,onValueChange:t[30]||=e=>l.value.detectionSettings.licensePlate={...l.value.detectionSettings.licensePlate,minLength:e??void 0},onInput:t[31]||=e=>l.value.detectionSettings.licensePlate={...l.value.detectionSettings.licensePlate,minLength:e.value??void 0}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.licensePlate.minLength`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.plate_min_length`)),1)]),_:1}))]),_:1},8,[`model-value`]),X(`span`,rd,z(e.$t(`components.camera_options.sensors`)),1),Z($(P),{"model-value":l.value.detectionSettings.sensor?.timeout,name:`detectionSettings.sensor.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,id,z(e.$t(`components.form.label.sensor_timeout`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.detectionSettings.sensor?.timeout,invalid:n.length>0,loading:$(j),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[32]||=e=>{l.value.detectionSettings.sensor||(l.value.detectionSettings.sensor={timeout:30,triggers:[]}),l.value.detectionSettings.sensor.timeout=e??30},onInput:t[33]||=e=>{l.value.detectionSettings.sensor||(l.value.detectionSettings.sensor={timeout:30,triggers:[]}),l.value.detectionSettings.sensor.timeout=e.value??30}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.sensor.timeout`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.sensor_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.detectionSettings.sensor?.triggers??[],name:`detectionSettings.sensor.triggers`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:t})=>[X(`label`,ad,z(e.$t(`components.form.label.sensor_triggers`)),1),Z(h,{"model-value":$(Ce),invalid:t.length>0,options:$(xe),"option-label":`label`,"option-value":`value`,placeholder:e.$t(`components.form.hint.sensor_triggers_placeholder`),class:`w-full`,"show-toggle-all":!1,"onUpdate:modelValue":De},null,8,[`model-value`,`invalid`,`options`,`placeholder`]),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.sensor.triggers`,class:`cui-input-error`})]),_:1}),t.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.sensor_triggers`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),Z(f,{value:`recording`},{default:Y(()=>[Z(n,{class:`px-0`},{default:Y(()=>[X(`span`,od,z(e.$t(`components.camera_options.recording`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,sd,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.recording_hint`)),1)]),_:1}),$(ve)?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-banner cui-banner-warn`},{default:Y(()=>[Z(g,{class:`w-4 h-4 shrink-0 inline-block mr-1`}),B(` `+z(e.$t(`components.camera_options.recording_requires`)),1)]),_:1})),Z($(P),{"model-value":l.value.recordingSettings?.enabled??!0,value:!0,"unchecked-value":!1,type:`checkbox`,name:`recordingSettings.enabled`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:i})=>[X(`div`,cd,[X(`div`,ld,[X(`label`,ud,z(e.$t(`components.form.label.recording_enabled`)),1),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.recording_enabled`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`recordingSettings.enabled`,class:`cui-input-switch-error`})]),_:1})]),Z(u,Jn({"model-value":l.value.recordingSettings?.enabled??!0},n,{invalid:i.length>0,loading:$(j),class:`ml-auto shrink-0`,onValueChange:t[34]||=e=>Te({enabled:e})}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),l.value.recordingSettings?.enabled??!0?(L(),q(V,{key:1},[Z($(P),{"model-value":l.value.recordingSettings?.mode,name:`recordingSettings.mode`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,dd,z(e.$t(`components.form.label.recording_mode`)),1),Z(a,null,{default:Y(()=>[Z(o,{"model-value":l.value.recordingSettings?.mode??`continuous`,options:$(me),invalid:n.length>0,loading:$(j),type:`text`,onValueChange:t[35]||=e=>Te({mode:e})},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`recordingSettings.mode`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.recording_mode`)),1)]),_:1}))]),_:1},8,[`model-value`]),l.value.recordingSettings?.mode===`event`?(L(),U($(P),{key:0,"model-value":l.value.recordingSettings?.preBuffer,name:`recordingSettings.preBuffer`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,fd,z(e.$t(`components.form.label.recording_prebuffer`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.recordingSettings?.preBuffer??10,invalid:n.length>0,loading:$(j),"show-buttons":``,step:1,min:0,max:60,"use-grouping":!1,onValueChange:t[36]||=e=>Te({preBuffer:e??10}),onInput:t[37]||=e=>Te({preBuffer:e.value??10})},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`recordingSettings.preBuffer`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.recording_prebuffer`)),1)]),_:1}))]),_:1},8,[`model-value`])):W(``,!0),Z($(P),{"model-value":l.value.recordingSettings?.sources,name:`recordingSettings.sources`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,pd,z(e.$t(`components.form.label.recording_sources`)),1),Z(h,{"model-value":l.value.recordingSettings?.sources??[`high`,`mid`,`low`],invalid:n.length>0,options:$(he),class:`w-full`,"show-toggle-all":!1,"onUpdate:modelValue":t[38]||=e=>Te({sources:e})},null,8,[`model-value`,`invalid`,`options`]),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`recordingSettings.sources`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.recording_sources`)),1)]),_:1}))]),_:1},8,[`model-value`])],64)):W(``,!0)])]),_:1})]),_:1}),Z(f,{value:`ptzAutotrack`},{default:Y(()=>[Z(n,{class:`px-0`},{default:Y(()=>[X(`span`,md,z(e.$t(`components.camera_options.ptz_autotrack`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,hd,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.ptz_autotrack_hint`)),1)]),_:1}),$(_e)?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-banner cui-banner-warn`},{default:Y(()=>[Z(g,{class:`w-4 h-4 shrink-0 inline-block mr-1`}),B(` `+z(e.$t(`components.form.hint.ptz_autotrack_requires`)),1)]),_:1})),Z($(P),{"model-value":l.value.ptzAutotrack?.enabled,value:!0,"unchecked-value":!1,type:`checkbox`,name:`ptzAutotrack.enabled`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:i})=>[X(`div`,gd,[X(`div`,_d,[X(`label`,vd,z(e.$t(`components.form.label.ptz_autotrack_enabled`)),1),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.ptz_autotrack`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`ptzAutotrack.enabled`,class:`cui-input-switch-error`})]),_:1})]),Z(u,Jn({"model-value":l.value.ptzAutotrack?.enabled},n,{invalid:i.length>0,loading:$(j),class:`ml-auto shrink-0`,onValueChange:t[39]||=e=>{l.value.ptzAutotrack&&(l.value.ptzAutotrack.enabled=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),l.value.ptzAutotrack?.enabled?(L(),q(V,{key:1},[Z($(P),{"model-value":l.value.ptzAutotrack?.targetLabels,name:`ptzAutotrack.targetLabels`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,yd,z(e.$t(`components.form.label.ptz_autotrack_target_labels`)),1),Z(h,{"model-value":l.value.ptzAutotrack?.targetLabels,options:$(be),"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:$(j),class:`w-full`,onValueChange:t[40]||=e=>{l.value.ptzAutotrack&&(l.value.ptzAutotrack.targetLabels=e)}},null,8,[`model-value`,`options`,`invalid`,`loading`]),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.ptz_autotrack_target_labels`)),1)]),_:1})]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.ptzAutotrack?.minConfidence,name:`ptzAutotrack.minConfidence`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,bd,z(e.$t(`components.form.label.ptz_autotrack_min_confidence`)),1),Z(p,{"model-value":l.value.ptzAutotrack?.minConfidence,min:.3,max:1,step:.05,"min-fraction-digits":2,"max-fraction-digits":2,invalid:n.length>0,loading:$(j),class:`w-full`,onValueChange:t[41]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.minConfidence=e)}},null,8,[`model-value`,`invalid`,`loading`]),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.ptz_autotrack_min_confidence`)),1)]),_:1})]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.ptzAutotrack?.triggerDeadZone,name:`ptzAutotrack.triggerDeadZone`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,xd,z(e.$t(`components.form.label.ptz_autotrack_trigger_dead_zone`)),1),Z(p,{"model-value":l.value.ptzAutotrack?.triggerDeadZone,min:0,max:.3,step:.01,"min-fraction-digits":2,"max-fraction-digits":2,invalid:n.length>0,loading:$(j),class:`w-full`,onValueChange:t[42]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.triggerDeadZone=e)}},null,8,[`model-value`,`invalid`,`loading`]),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.ptz_autotrack_trigger_dead_zone`)),1)]),_:1})]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.ptzAutotrack?.trackingSpeed??2,name:`ptzAutotrack.trackingSpeed`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Sd,z(e.$t(`components.form.label.ptz_autotrack_tracking_speed`)),1),Z(p,{"model-value":l.value.ptzAutotrack?.trackingSpeed??2,min:1,max:5,step:.5,"min-fraction-digits":1,"max-fraction-digits":1,invalid:n.length>0,loading:$(j),class:`w-full`,onValueChange:t[43]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.trackingSpeed=e)}},null,8,[`model-value`,`invalid`,`loading`]),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.ptz_autotrack_tracking_speed`)),1)]),_:1})]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.ptzAutotrack?.leadMs??1800,name:`ptzAutotrack.leadMs`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Cd,z(e.$t(`components.form.label.ptz_autotrack_lead_ms`)),1),Z(p,{"model-value":l.value.ptzAutotrack?.leadMs??1800,min:0,max:4e3,step:100,invalid:n.length>0,loading:$(j),class:`w-full`,onValueChange:t[44]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.leadMs=e)}},null,8,[`model-value`,`invalid`,`loading`]),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.ptz_autotrack_lead_ms`)),1)]),_:1})]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.ptzAutotrack?.panRate??.85,name:`ptzAutotrack.panRate`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,wd,z(e.$t(`components.form.label.ptz_autotrack_pan_rate`)),1),Z(p,{"model-value":l.value.ptzAutotrack?.panRate??.85,min:.1,max:3,step:.05,"min-fraction-digits":2,"max-fraction-digits":2,invalid:n.length>0,loading:$(j),class:`w-full`,onValueChange:t[45]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.panRate=e)}},null,8,[`model-value`,`invalid`,`loading`]),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.ptz_autotrack_pan_rate`)),1)]),_:1})]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.ptzAutotrack?.returnToHome,value:!0,"unchecked-value":!1,type:`checkbox`,name:`ptzAutotrack.returnToHome`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:i})=>[X(`div`,Td,[X(`div`,Ed,[X(`label`,Dd,z(e.$t(`components.form.label.ptz_autotrack_return_home`)),1),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.ptz_autotrack_return_home`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`ptzAutotrack.returnToHome`,class:`cui-input-switch-error`})]),_:1})]),Z(u,Jn({"model-value":l.value.ptzAutotrack?.returnToHome},n,{invalid:i.length>0,loading:$(j),class:`ml-auto shrink-0`,onValueChange:t[46]||=e=>{l.value.ptzAutotrack&&(l.value.ptzAutotrack.returnToHome=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),l.value.ptzAutotrack?.returnToHome?(L(),U($(P),{key:0,"model-value":l.value.ptzAutotrack?.homeWaitMs,name:`ptzAutotrack.homeWaitMs`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Od,z(e.$t(`components.form.label.ptz_autotrack_home_wait`)),1),Z(p,{"model-value":(l.value.ptzAutotrack?.homeWaitMs??0)/1e3,min:1,max:60,step:1,suffix:` s`,invalid:n.length>0,loading:$(j),class:`w-full`,onValueChange:t[47]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.homeWaitMs=e*1e3)}},null,8,[`model-value`,`invalid`,`loading`]),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.ptz_autotrack_home_wait`)),1)]),_:1})]),_:1},8,[`model-value`])):W(``,!0)],64)):W(``,!0)])]),_:1})]),_:1}),Z(f,{value:`snapshot`},{default:Y(()=>[Z(n,{class:`px-0`},{default:Y(()=>[X(`span`,kd,z(e.$t(`components.camera_options.snapshot`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,Ad,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.snapshot_hint`)),1)]),_:1}),X(`div`,jd,[Z($(P),{"model-value":l.value.snapshotSettings.autoRefresh,value:!0,"unchecked-value":!1,type:`checkbox`,name:`snapshotSettings.autoRefresh`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:i})=>[X(`div`,Md,[X(`div`,Nd,[X(`label`,Pd,z(e.$t(`components.form.label.auto_refresh`)),1),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.auto_refresh`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`snapshotSettings.autoRefresh`,class:`cui-input-switch-error`})]),_:1})]),Z(u,Jn({"model-value":l.value.snapshotSettings.autoRefresh},n,{invalid:i.length>0,loading:$(j),class:`ml-auto shrink-0`,onValueChange:t[48]||=e=>l.value.snapshotSettings.autoRefresh=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),Z($(P),{"model-value":l.value.snapshotSettings.ttl,name:`snapshotSettings.ttl`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Fd,z(e.$t(`components.form.label.cache_time`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.snapshotSettings.ttl,invalid:n.length>0,loading:$(j),min:10,"show-buttons":``,"use-grouping":!1,onValueChange:t[49]||=e=>l.value.snapshotSettings.ttl=e??10,onInput:t[50]||=e=>l.value.snapshotSettings.ttl=e.value??10},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`snapshotSettings.ttl`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.cache_time`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.snapshotSettings.interval,name:`snapshotSettings.interval`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Id,z(e.$t(`components.form.label.refresh_interval`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.snapshotSettings.interval,invalid:n.length>0,loading:$(j),min:10,max:60,"show-buttons":``,"use-grouping":!1,onValueChange:t[51]||=e=>l.value.snapshotSettings.interval=e??30,onInput:t[52]||=e=>l.value.snapshotSettings.interval=e.value??30},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`snapshotSettings.interval`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.refresh_interval`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),Z(f,{value:`zones`},{default:Y(()=>[Z(n,{class:`px-0`},{default:Y(()=>[X(`span`,Ld,z(e.$t(`components.camera_options.zones`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,Rd,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.zones_hint`)),1)]),_:1}),$(A).length?(L(),q(`div`,zd,[(L(!0),q(V,null,M($(A),t=>(L(),q(`div`,{key:`${t.kind}-${t.index}`,class:`flex items-center gap-2 p-2 rounded-md border-color`},[X(`span`,{class:`w-2.5 h-2.5 rounded-full shrink-0`,style:Q({background:t.color})},null,4),X(`div`,Bd,[X(`span`,Vd,z(t.name),1),X(`span`,Hd,z(t.typeLabel),1)]),Xn((L(),U(c,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-sm shrink-0`,onClick:e=>Fe(t)},{icon:Y(()=>[Z(ee,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[S,e.$t(`components.zone_editor.edit_zones`),void 0,{top:!0}]]),Xn((L(),U(c,{text:``,rounded:``,severity:`danger`,class:`cui-icon-sm shrink-0`,onClick:e=>Ie(t)},{icon:Y(()=>[Z(b,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[S,e.$t(`components.camera_options.zone_entry_delete`),void 0,{top:!0}]])]))),128))])):(L(),q(`span`,Ud,z(e.$t(`components.camera_options.zones_empty`)),1)),Z(c,{fluid:``,class:`cui-button-medium`,loading:$(j),label:e.$t(`components.form.button.edit_zones`),onClick:t[53]||=e=>Ne($(m).detectionZones)},null,8,[`loading`,`label`])])]),_:1})]),_:1}),Z(f,{value:`sensors`},{default:Y(()=>[Z(n,{class:`px-0`},{default:Y(()=>[X(`span`,Wd,z(e.$t(`components.camera_options.virtual_sensors`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,Gd,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.virtual_sensors_hint`)),1)]),_:1}),$(O).length?(L(),q(`div`,Kd,[(L(!0),q(V,null,M($(O),t=>(L(),q(`div`,{key:t._id,class:`flex items-center gap-2 p-2 rounded-md border-color`},[X(`div`,qd,[X(`span`,Jd,z(t.displayName||t.name),1),X(`span`,Yd,z(e.$t(`components.camera_options.sensor_type_${t.type}`)),1)]),Xn((L(),U(c,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-sm shrink-0`,onClick:e=>Ae(t)},{icon:Y(()=>[Z(ee,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[S,e.$t(`components.camera_options.sensor_display_name`),void 0,{top:!0}]]),Xn((L(),U(c,{text:``,rounded:``,severity:`danger`,class:`cui-icon-sm shrink-0`,onClick:e=>je(t)},{icon:Y(()=>[Z(b,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[S,e.$t(`components.camera_options.virtual_sensor_delete`),void 0,{top:!0}]])]))),128))])):(L(),q(`span`,Xd,z(e.$t(`components.camera_options.virtual_sensors_empty`)),1)),Z(c,{fluid:``,class:`cui-button-medium`,label:e.$t(`components.camera_options.virtual_sensor_create`),onClick:ke},null,8,[`label`])])]),_:1})]),_:1}),Z(f,{value:`frameworker`},{default:Y(()=>[Z(n,{class:`px-0`},{default:Y(()=>[X(`span`,Zd,z(e.$t(`components.camera_options.frame_worker`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,Qd,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.frame_worker_hint`)),1)]),_:1}),Z($(P),{"model-value":l.value.frameWorkerSettings.fps,name:`frameWorkerSettings.fps`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,$d,z(e.$t(`components.form.label.fps`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.frameWorkerSettings.fps,invalid:n.length>0,loading:$(j),min:0,"show-buttons":``,"use-grouping":!1,onValueChange:t[54]||=e=>l.value.frameWorkerSettings.fps=e??void 0,onInput:t[55]||=e=>l.value.frameWorkerSettings.fps=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`frameWorkerSettings.fps`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.frameworker_fps`)),1)]),_:1}))]),_:1},8,[`model-value`]),X(`div`,ef,[Z($(P),{"model-value":l.value.frameWorkerSettings.hqSnapshots,value:!0,"unchecked-value":!1,type:`checkbox`,name:`frameWorkerSettings.hqSnapshots`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:i})=>[X(`div`,tf,[X(`div`,nf,[X(`label`,rf,z(e.$t(`components.form.label.hq_snapshots`)),1),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.hq_snapshots`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`frameWorkerSettings.hqSnapshots`,class:`cui-input-switch-error`})]),_:1})]),Z(u,Jn({"model-value":l.value.frameWorkerSettings.hqSnapshots},n,{invalid:i.length>0,loading:$(j),class:`ml-auto shrink-0`,onValueChange:t[56]||=e=>l.value.frameWorkerSettings.hqSnapshots=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])])])]),_:1})]),_:1})]),_:1})}}}),of={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function sf(e,t){return L(),q(`svg`,of,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M6.97.47a.75.75 0 0 1 1.06 0l1.75 1.75a.75.75 0 0 1 0 1.06L8.03 5.03a.75.75 0 0 1-1.06-1.06l.43-.43a4.5 4.5 0 0 0-2.28 7.918a.75.75 0 0 1-.961 1.152A6 6 0 0 1 7.463 2.024L6.97 1.53a.75.75 0 0 1 0-1.06m3.815 3.016a.75.75 0 0 1 1.056-.096a6 6 0 0 1-3.304 10.586l.493.494a.75.75 0 1 1-1.06 1.06l-1.75-1.75a.75.75 0 0 1 0-1.06l1.75-1.75a.75.75 0 0 1 1.06 1.06l-.43.43a4.5 4.5 0 0 0 2.28-7.918a.75.75 0 0 1-.095-1.056`},null,-1)]])}var cf=K({name:`fluent-arrow-sync-16-filled`,render:sf}),lf={class:`flex items-center justify-between`},uf={class:`cui-label`},df={class:`flex flex-col field-gap`},ff={class:`cui-label`},pf={class:`cui-label`},mf={class:`cui-label`},hf={key:0,class:`flex flex-col field-gap`},gf={class:`cui-label`},_f={key:1,class:`flex flex-col field-gap`},vf={class:`cui-label`},yf=H({__name:`CameraSource`,props:{cameraId:{},cameraName:{},source:{},loading:{type:Boolean}},setup(e){let t=new Yt,n=e,{t:r}=ye(),{getSourceStatus:i,connect:a}=Ci(),o=Fn(),s=tn(),c=[`probe`,`preload`],{cameraId:l,cameraName:u,source:d,loading:f}=nr(n),p=J(!1),{data:m,isBusy:h}=t.probeCameraSourceQuery(u.value,d.value.name,{video:!0,audio:!0,microphone:!0});a();let g=G(()=>i(l.value,d.value.name)),ee=G(()=>{switch(g.value){case`connected`:return`success`;case`connecting`:return`warn`;case`error`:return`danger`;default:return`secondary`}}),b=G(()=>{switch(g.value){case`connected`:return r(`components.camera_table.online`);case`connecting`:return r(`components.camera_table.connecting`);case`error`:return r(`components.camera_table.error`);default:return r(`components.camera_table.idle`)}}),x=G(()=>!!(f.value||h.value)),te=G(()=>m.value?.probe.consumers.filter(e=>!c.includes(e.format_name)).length||0),S=G(()=>ne(`video`)),C=G(()=>ne(`audio`));function ne(e){let t=(m.value?.probe.producers??[]).flatMap(e=>e.receivers??[]).filter(t=>t.codec.codec_type===e).map(e=>e.codec.codec_name);return[...new Set(t)]}async function re(){if(!p.value){p.value=!0;try{let e=await Ct({cameraname:u.value,sourcename:d.value.name,probeConfig:{video:!0,audio:!0,microphone:!0},force:!0});o.setQueryData([`cameras`,u.value,`probe`,d.value.name],e)}catch{s.add({severity:`error`,detail:r(`components.toast.probe_failed`),life:3e3})}finally{p.value=!1}}}return(e,t)=>{let n=Mr,r=_,i=v,a=wr,o=Er,s=qr,c=dn,l=y;return L(),q(V,null,[X(`div`,lf,[X(`label`,uf,z(e.$t(`components.form.label.stream_status`)),1),Z(n,{severity:$(ee),value:$(b)},null,8,[`severity`,`value`])]),X(`div`,df,[X(`label`,ff,z(e.$t(`components.form.label.connections`)),1),Z(o,null,{default:Y(()=>[Z(r,{value:$(te),loading:$(x),readonly:``,type:`text`},null,8,[`value`,`loading`]),Z(a,null,{default:Y(()=>[Xn((L(),U(i,{severity:`secondary`,text:``,loading:$(p),disabled:$(x),onClick:re},{icon:Y(()=>[Z($(cf),{class:`w-4 h-4`})]),_:1},8,[`loading`,`disabled`])),[[l,e.$t(`components.form.button.reload`),void 0,{left:!0}]])]),_:1})]),_:1}),Z(s,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.connections`)),1)]),_:1})]),(L(!0),q(V,null,M($(S),(t,n)=>(L(),q(`div`,{key:n,class:`flex flex-col field-gap`},[X(`label`,pf,z(e.$t(`components.form.label.video_codec`)),1),Z(o,null,{default:Y(()=>[Z(r,{"model-value":t,loading:$(x),readonly:``,type:`text`},null,8,[`model-value`,`loading`])]),_:2},1024),n===$(S).length-1?(L(),U(s,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.video_codec`)),1)]),_:1})):W(``,!0)]))),128)),(L(!0),q(V,null,M($(C),(t,n)=>(L(),q(`div`,{key:n,class:`flex flex-col field-gap`},[X(`label`,mf,z(e.$t(`components.form.label.audio_codec`)),1),Z(o,null,{default:Y(()=>[Z(r,{"model-value":t,loading:$(x),readonly:``,type:`text`},null,8,[`model-value`,`loading`])]),_:2},1024),n===$(C).length-1?(L(),U(s,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.audio_codec`)),1)]),_:1})):W(``,!0)]))),128)),$(d).role===`snapshot`?W(``,!0):(L(),q(`div`,hf,[X(`label`,gf,z(e.$t(`components.form.label.rtsp_url`)),1),Z(o,null,{default:Y(()=>[Z(r,{"model-value":$(m)?.rtspUrl,loading:$(x),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),Z(a,null,{default:Y(()=>[Z(c,{"action-text":e.$t(`components.form.tooltip.copied`),icon:$(At),"button-props":{severity:`secondary`,disabled:!$(m)?.rtspUrl,loading:$(x),text:!0},onAction:t[0]||=e=>$(Bt)($(m).rtspUrl)},null,8,[`action-text`,`icon`,`button-props`])]),_:1})]),_:1}),Z(s,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.rtsp_url`)),1)]),_:1})])),$(d).role===`snapshot`?W(``,!0):(L(),q(`div`,_f,[X(`label`,vf,z(e.$t(`components.form.label.onvif_url`)),1),Z(o,null,{default:Y(()=>[Z(r,{"model-value":$(m)?.onvifUrl,loading:$(x),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),Z(a,null,{default:Y(()=>[Z(c,{"action-text":e.$t(`components.form.tooltip.copied`),icon:$(At),"button-props":{severity:`secondary`,disabled:!$(m)?.onvifUrl,loading:$(x),text:!0},onAction:t[1]||=e=>$(Bt)($(m).onvifUrl)},null,8,[`action-text`,`icon`,`button-props`])]),_:1})]),_:1}),Z(s,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.onvif_url`)),1)]),_:1})]))],64)}}}),bf={class:`flex gap-2 items-center w-full`},xf={class:`text-color font-normal`},Sf={class:`flex flex-col gap-6`},Cf=[`for`],wf=[`for`],Tf={class:`w-full flex flex-col gap-2`},Ef={class:`flex items-center gap-4`},Df={class:`flex flex-col field-switch-gap`},Of=[`for`],kf={class:`flex items-center gap-4`},Af={class:`flex flex-col field-switch-gap`},jf=[`for`],Mf={class:`flex items-center gap-4`},Nf={class:`flex flex-col field-switch-gap`},Pf=[`for`],Ff={class:`flex items-center gap-4`},If={class:`flex flex-col field-switch-gap`},Lf=[`for`],Rf=[`for`],zf={class:`flex flex-col gap-6`},Bf={class:`flex flex-col field-gap`},Vf=[`for`],Hf={class:`w-full flex items-center justify-center my-3`},Uf=H({__name:`Sources`,props:Pn({camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:Pn([`close`],[`update:modelValue`]),setup(e){let t=e,n=An(e,`modelValue`),{t:r}=ye(),i=Xe(),{camera:a,loading:o}=nr(t),s=J([`high-resolution`,`mid-resolution`,`low-resolution`,`snapshot`]);function c(e){return e.name.replace(/ /g,`_`).toLowerCase()}function l(e){let t=[{label:r(`components.form.label.none`),value:void 0}],i=n.value.sources[e],a=n.value;for(let e of a.sources)e.role!==`snapshot`&&e._id!==i._id&&(!e.name||!e._id||t.push({label:e.name,value:e._id}));return t}function u(e){return n.value.sources[e].childSourceId}function d(e,t){t==null?n.value.sources[e].childSourceId=null:n.value.sources[e].childSourceId=t}function f(e){n.value.sources[e].urls.push(``)}function p(e){let t=n.value.sources[e];i.openTextDialog({data:{title:r(`components.camera_options.source_delete`),contentText:r(`components.camera_options.source_delete_confirm`,{name:c(t)}),confirmText:r(`components.form.button.remove`),confirmButtonProps:{severity:`danger`}},onConfirm:()=>{n.value.sources.splice(e,1)}})}function m(e,t){n.value.sources[e].urls.splice(t,1)}function h(e,t){e.role=t,t===`snapshot`&&(e.useForSnapshot=!1,e.hotMode=!1,e.preload=!1)}function g(){n.value&&n.value.sources.push({_id:``,name:``,role:null,urls:[],useForSnapshot:!1,hotMode:!0,preload:!0,muted:!1})}return(e,t)=>{let r=Jr,i=v,ee=Tr,y=_,b=Er,x=qr,te=yf,S=Ir,C=Cr,ne=wr,re=Lr,ie=yr,ae=br,w=ui;return L(),q(V,null,[Z(ae,{multiple:``,class:`p-4`},{default:Y(()=>[(L(!0),q(V,null,M(n.value.sources,(t,g)=>(L(),U(ie,{key:g,value:g},{default:Y(()=>[Z(ee,{class:R({"px-0 pt-0":g===0,"px-0":g!==0})},{default:Y(()=>[X(`div`,bf,[X(`span`,xf,z(e.$t(`components.camera_options.source`)+`: `+c(t)),1),Z(i,{text:``,rounded:``,loading:$(o),disabled:n.value.sources.length<2,severity:`danger`,class:`cui-icon-md ml-auto mr-2`,onClick:Kn(e=>p(g),[`stop`])},{icon:Y(()=>[Z(r,{width:`100%`,height:`100%`})]),_:1},8,[`loading`,`disabled`,`onClick`])])]),_:2},1032,[`class`]),Z(re,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,Sf,[Z($(P),{modelValue:t.name,"onUpdate:modelValue":e=>t.name=e,modelModifiers:{trim:!0},name:`sources[${g}].name`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:n,errors:r})=>[X(`label`,{for:`sources[${g}].name`,class:`cui-label`},z(e.$t(`components.form.label.source_name`)),9,Cf),Z(b,null,{default:Y(()=>[Z(y,Jn({ref_for:!0},n,{invalid:r.length>0,loading:$(o),readonly:$(a).sources.some(e=>e.name===t.name),type:`text`}),null,16,[`invalid`,`loading`,`readonly`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`sources[${g}].name`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),r.length?W(``,!0):(L(),U(x,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.source_name`)),1)]),_:1}))]),_:2},1032,[`modelValue`,`onUpdate:modelValue`,`name`]),t._id?(L(),U(te,{key:0,"camera-id":$(a)._id,"camera-name":$(a).name,source:t,loading:$(o)},null,8,[`camera-id`,`camera-name`,`source`,`loading`])):W(``,!0),Z($(P),{"model-value":t.role,name:`sources[${g}].role`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:r})=>[X(`label`,{for:`sources[${g}].role`,class:`cui-label`},z(e.$t(`components.form.label.source_role`)),9,wf),Z(b,null,{default:Y(()=>[Z(S,{"model-value":t.role,options:$(s).filter(e=>!n.value.sources.some(n=>n.role===e&&n._id!==t._id)),invalid:r.length>0,loading:$(o),onValueChange:e=>h(t,e)},null,8,[`model-value`,`options`,`invalid`,`loading`,`onValueChange`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`sources[${g}].role`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),r.length?W(``,!0):(L(),U(x,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.source_role`)),1)]),_:1}))]),_:2},1032,[`model-value`,`name`]),X(`div`,Tf,[t.role!==`snapshot`&&n.value.sources.length>1?(L(),U($(P),{key:0,"model-value":t.useForSnapshot,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${g}].useForSnapshot`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:r,errors:i})=>[X(`div`,Ef,[X(`div`,Df,[X(`label`,{for:`sources[${g}].useForSnapshot`,class:`cui-label-switch`},z(e.$t(`components.form.label.use_for_snapshot`)),9,Of),Z(x,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.use_for_snapshot`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`sources[${g}].useForSnapshot`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Z(C,Jn({"model-value":t.useForSnapshot},{ref_for:!0},r,{invalid:i.length>0,loading:$(o),disabled:n.value.sources.some(e=>(e.useForSnapshot||e.role===`snapshot`)&&e._id!==t._id),class:`ml-auto shrink-0`,onValueChange:e=>t.useForSnapshot=e}),null,16,[`model-value`,`invalid`,`loading`,`disabled`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`])):W(``,!0),t.role===`snapshot`?W(``,!0):(L(),U($(P),{key:1,"model-value":t.hotMode,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${g}].hotMode`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:r})=>[X(`div`,kf,[X(`div`,Af,[X(`label`,{for:`sources[${g}].hotMode`,class:`cui-label-switch`},z(e.$t(`components.form.label.hot_mode`)),9,jf),Z(x,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.hot_mode`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`sources[${g}].hotMode`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Z(C,Jn({"model-value":t.hotMode},{ref_for:!0},n,{invalid:r.length>0,loading:$(o),class:`ml-auto shrink-0`,onValueChange:e=>t.hotMode=e}),null,16,[`model-value`,`invalid`,`loading`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`])),t.role===`snapshot`?W(``,!0):(L(),U($(P),{key:2,"model-value":t.preload,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${g}].preload`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:r})=>[X(`div`,Mf,[X(`div`,Nf,[X(`label`,{for:`sources[${g}].preload`,class:`cui-label-switch`},z(e.$t(`components.form.label.preload`)),9,Pf),Z(x,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.preload`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`sources[${g}].preload`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Z(C,Jn({"model-value":t.preload},{ref_for:!0},n,{invalid:r.length>0,loading:$(o),class:`ml-auto shrink-0`,onValueChange:e=>t.preload=e}),null,16,[`model-value`,`invalid`,`loading`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`])),t.role===`snapshot`?W(``,!0):(L(),U($(P),{key:3,"model-value":t.muted,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${g}].muted`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:r})=>[X(`div`,Ff,[X(`div`,If,[X(`label`,{for:`sources[${g}].muted`,class:`cui-label-switch`},z(e.$t(`components.form.label.muted`)),9,Lf),Z(x,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.muted`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`sources[${g}].muted`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Z(C,Jn({"model-value":t.muted},{ref_for:!0},n,{invalid:r.length>0,loading:$(o),class:`ml-auto shrink-0`,onValueChange:e=>t.muted=e}),null,16,[`model-value`,`invalid`,`loading`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`]))]),t.role===`snapshot`?W(``,!0):(L(),U($(P),{key:1,"model-value":u(g),name:`sources[${g}].childSourceId`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:t})=>[X(`label`,{for:`sources[${g}].childSourceId`,class:`cui-label`},z(e.$t(`components.form.label.pip_source`)),9,Rf),Z(b,null,{default:Y(()=>[Z(S,{"model-value":u(g),options:l(g),"option-label":`label`,"option-value":`value`,invalid:t.length>0,loading:$(o),placeholder:e.$t(`components.form.label.none`),"show-clear":``,onValueChange:e=>d(g,e)},null,8,[`model-value`,`options`,`invalid`,`loading`,`placeholder`,`onValueChange`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`sources[${g}].childSourceId`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),t.length?W(``,!0):(L(),U(x,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.pip_source`)),1)]),_:1}))]),_:2},1032,[`model-value`,`name`])),X(`div`,zf,[X(`div`,Bf,[X(`label`,{for:`sources[${g}].urls[]`,class:`cui-label`},z(e.$t(`components.form.label.sources`)),9,Vf),Z(x,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.source_urls`)),1)]),_:1})]),(L(!0),q(V,null,M(t.urls,(e,n)=>(L(),U($(P),{key:n,modelValue:t.urls[n],"onUpdate:modelValue":e=>t.urls[n]=e,modelModifiers:{trim:!0},name:`sources[${g}].urls[${n}]`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:e,errors:a})=>[Z(b,null,{default:Y(()=>[Z(y,Jn({ref_for:!0},e,{invalid:a.length>0,loading:$(o),type:`text`}),null,16,[`invalid`,`loading`]),t.urls.length>1?(L(),U(ne,{key:0},{default:Y(()=>[Z(i,{text:``,severity:`secondary`,loading:$(o),class:`cui-icon-md`,onClick:e=>m(g,n)},{icon:Y(()=>[Z(r,{width:`100%`,height:`100%`})]),_:1},8,[`loading`,`onClick`])]),_:2},1024)):W(``,!0)]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`sources[${g}].urls[${n}]`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`,`name`]))),128)),Z(i,{loading:$(o),label:e.$t(`components.form.button.add_source`),class:`ml-auto cui-button-medium`,onClick:e=>f(g)},null,8,[`loading`,`label`,`onClick`])])])]),_:2},1024)]),_:2},1032,[`value`]))),128))]),_:1}),X(`div`,Hf,[Z(i,{text:``,rounded:``,loading:$(o),class:`cui-icon-xl`,onClick:g},{icon:Y(()=>[Z(w,{width:`100%`,height:`100%`})]),_:1},8,[`loading`])])],64)}}}),Wf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Gf(e,t){return L(),q(`svg`,Wf,[...t[0]||=[X(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M10 17h.01M10 7v6m4-7h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2m8-4v-4M6 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2`},null,-1)]])}var Kf=K({name:`lucide-battery-warning`,render:Gf}),qf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Jf(e,t){return L(),q(`svg`,qf,[...t[0]||=[X(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[X(`path`,{d:`M22 14v-4M6 14v-4`}),X(`rect`,{width:`16`,height:`12`,x:`2`,y:`6`,rx:`2`})],-1)]])}var Yf=K({name:`lucide-battery-low`,render:Jf}),Xf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Zf(e,t){return L(),q(`svg`,Xf,[...t[0]||=[X(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[X(`path`,{d:`M10 14v-4m12 4v-4M6 14v-4`}),X(`rect`,{width:`16`,height:`12`,x:`2`,y:`6`,rx:`2`})],-1)]])}var Qf=K({name:`lucide-battery-medium`,render:Zf}),$f={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ep(e,t){return L(),q(`svg`,$f,[...t[0]||=[X(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[X(`path`,{d:`M10 10v4m4-4v4m8 0v-4M6 10v4`}),X(`rect`,{width:`16`,height:`12`,x:`2`,y:`6`,rx:`2`})],-1)]])}var tp=K({name:`lucide-battery-full`,render:ep}),np={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function rp(e,t){return L(),q(`svg`,np,[...t[0]||=[X(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m11 7l-3 5h4l-3 5m5.856-11H16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.935M22 14v-4M5.14 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2.936`},null,-1)]])}var ip=K({name:`lucide-battery-charging`,render:rp}),ap={class:`cui-battery-info__header`},op={class:`cui-battery-info__icon`},sp={class:`cui-battery-info__info`},cp={key:0,class:`cui-battery-info__label`},lp={class:`cui-battery-info__bar`},up=Vt(H({__name:`CuiBatteryInfo`,props:{level:{default:100},charging:{default:`NOT_CHARGING`},low:{type:Boolean,default:!1},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},setup(e){let t=e,{t:n}=ye(),{level:r,label:i,disabled:a,size:o,charging:s,low:c}=nr(t),l=G(()=>s.value===`CHARGING`),u=G(()=>s.value===`FULL`||r.value===100),d=G(()=>c.value||r.value<=20),f=G(()=>s.value===`CHARGING`?n(`components.battery_info.charging`):s.value===`FULL`?n(`components.battery_info.fully_charged`):s.value===`NOT_CHARGEABLE`?n(`components.battery_info.not_chargeable`):r.value<=10?n(`components.battery_info.critically_low`):r.value<=20?n(`components.battery_info.low`):n(`components.battery_info.ready`)),p=G(()=>l.value?`cui-battery-info__status--charging`:u.value?`cui-battery-info__status--full`:r.value<=10?`cui-battery-info__status--critical`:d.value?`cui-battery-info__status--low`:``),m=G(()=>l.value?`cui-battery-info__level--charging`:u.value?`cui-battery-info__level--full`:r.value<=10?`cui-battery-info__level--critical`:d.value?`cui-battery-info__level--low`:``),h=G(()=>({color:`rgb(59, 130, 246)`,filter:`drop-shadow(0 0 6px rgba(59, 130, 246, 0.5))`})),g=G(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.5))`})),ee=G(()=>({color:`rgb(34, 197, 94)`})),_=G(()=>({color:`rgb(234, 179, 8)`})),v=G(()=>({color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 6px rgba(239, 68, 68, 0.5))`})),y=G(()=>{let e=`rgb(34, 197, 94)`;return l.value?e=`rgb(59, 130, 246)`:r.value<=10?e=`rgb(239, 68, 68)`:r.value<=20&&(e=`rgb(234, 179, 8)`),{width:`${r.value}%`,backgroundColor:e}});return(e,t)=>{let n=ip,s=tp,c=Qf,u=Yf,b=Kf;return L(),q(`div`,{class:R([`cui-battery-info`,[`cui-battery-info--${$(o)}`,{"cui-battery-info--disabled":$(a),"cui-battery-info--low":$(d),"cui-battery-info--charging":$(l)}]])},[X(`div`,ap,[X(`div`,op,[$(l)?(L(),U(n,{key:0,class:`cui-battery-info__icon-svg`,style:Q($(h))},null,8,[`style`])):$(r)>=90?(L(),U(s,{key:1,class:`cui-battery-info__icon-svg`,style:Q($(g))},null,8,[`style`])):$(r)>=50?(L(),U(c,{key:2,class:`cui-battery-info__icon-svg`,style:Q($(ee))},null,8,[`style`])):$(r)>=20?(L(),U(u,{key:3,class:`cui-battery-info__icon-svg`,style:Q($(_))},null,8,[`style`])):(L(),U(b,{key:4,class:`cui-battery-info__icon-svg cui-battery-info__icon-svg--critical`,style:Q($(v))},null,8,[`style`]))]),X(`div`,sp,[$(i)?(L(),q(`span`,cp,z($(i)),1)):W(``,!0),X(`span`,{class:R([`cui-battery-info__status`,$(p)])},z($(f)),3)]),X(`div`,{class:R([`cui-battery-info__level`,$(m)])},z($(r))+`%`,3)]),X(`div`,lp,[X(`div`,{class:`cui-battery-info__bar-fill`,style:Q($(y))},null,4)])],2)}}}),[[`__scopeId`,`data-v-c181f3d4`]]),dp={class:`cui-humidity-info__header`},fp={class:`cui-humidity-info__icon`},pp={class:`cui-humidity-info__info`},mp={key:0,class:`cui-humidity-info__label`},hp=Vt(H({__name:`CuiHumidityInfo`,props:{current:{},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},setup(e){let{label:t,current:n,disabled:r,size:i}=nr(e),a=G(()=>n.value==null?`rgb(156, 163, 175)`:n.value<30?`rgb(251, 146, 60)`:n.value<=60?`rgb(34, 197, 94)`:`rgb(59, 130, 246)`),o=G(()=>({color:a.value,filter:`drop-shadow(0 0 6px ${a.value.replace(`rgb`,`rgba`).replace(`)`,`, 0.5)`)})`})),s=G(()=>({color:a.value}));return(e,c)=>{let l=qt;return L(),q(`div`,{class:R([`cui-humidity-info`,[`cui-humidity-info--${$(i)}`,{"cui-humidity-info--disabled":$(r)}]])},[X(`div`,dp,[X(`div`,fp,[Z(l,{class:`cui-humidity-info__icon-svg`,style:Q($(o))},null,8,[`style`])]),X(`div`,pp,[$(t)?(L(),q(`span`,mp,z($(t)),1)):W(``,!0),X(`span`,{class:`cui-humidity-info__status`,style:Q({color:$(a)})},z($(n)==null?`--`:`${$(n)}%`),5)]),X(`div`,{class:`cui-humidity-info__value`,style:Q($(s))},z($(n)==null?`--`:`${$(n)}%`),5)])],2)}}}),[[`__scopeId`,`data-v-1f41d794`]]),gp={class:`cui-temperature-info__header`},_p={class:`cui-temperature-info__icon`},vp={class:`cui-temperature-info__info`},yp={key:0,class:`cui-temperature-info__label`},bp=Vt(H({__name:`CuiTemperatureInfo`,props:{current:{},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},setup(e){let{label:t,current:n,disabled:r,size:i}=nr(e),a=G(()=>n.value==null?`rgb(156, 163, 175)`:n.value<5?`rgb(59, 130, 246)`:n.value<15?`rgb(6, 182, 212)`:n.value<25?`rgb(34, 197, 94)`:n.value<35?`rgb(251, 146, 60)`:`rgb(239, 68, 68)`),o=G(()=>({color:a.value,filter:`drop-shadow(0 0 6px ${a.value.replace(`rgb`,`rgba`).replace(`)`,`, 0.5)`)})`})),s=G(()=>({color:a.value}));return(e,c)=>{let l=en;return L(),q(`div`,{class:R([`cui-temperature-info`,[`cui-temperature-info--${$(i)}`,{"cui-temperature-info--disabled":$(r)}]])},[X(`div`,gp,[X(`div`,_p,[Z(l,{class:`cui-temperature-info__icon-svg`,style:Q($(o))},null,8,[`style`])]),X(`div`,vp,[$(t)?(L(),q(`span`,yp,z($(t)),1)):W(``,!0),X(`span`,{class:`cui-temperature-info__status`,style:Q({color:$(a)})},z($(n)==null?`--`:`${$(n)}°C`),5)]),X(`div`,{class:`cui-temperature-info__value`,style:Q($(s))},z($(n)==null?`--`:`${$(n)}°C`),5)])],2)}}}),[[`__scopeId`,`data-v-0edddec9`]]),xp={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Sp(e,t){return L(),q(`svg`,xp,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M20 9v11h-2v-9H2v9H0V9l10-4zm-3 3H3v2h14zm0 3H3v2h14zm5 0v-5h2v5zm0 4v-2h2v2z`},null,-1)]])}var Cp=K({name:`mdi-garage-alert-variant`,render:Sp}),wp=function(e){return e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e[e.Opening=2]=`Opening`,e[e.Closing=3]=`Closing`,e[e.Stopped=4]=`Stopped`,e}({}),Tp=function(e){return e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e}({}),Ep={currentState:1,targetState:1,obstructionDetected:!1,disabled:!1,size:`medium`},Dp={class:`cui-garage-control__header`},Op={class:`cui-garage-control__icon`},kp={key:3,class:`cui-garage-control__obstruction`},Ap={class:`cui-garage-control__info`},jp={key:0,class:`cui-garage-control__label`},Mp=Vt(H({__name:`CuiGarageControl`,props:En({currentState:{},targetState:{},obstructionDetected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Ep),emits:[`update:targetState`],setup(e,{emit:t}){let n=e,r=t,{t:i}=ye(),{currentState:a}=nr(n),o=G(()=>a.value===wp.Open||a.value===wp.Opening),s=G(()=>{switch(a.value){case wp.Open:return i(`components.garage_control.open`);case wp.Closed:return i(`components.garage_control.closed`);case wp.Opening:return i(`components.garage_control.opening`);case wp.Closing:return i(`components.garage_control.closing`);case wp.Stopped:return i(`components.garage_control.stopped`);default:return``}}),c=G(()=>{switch(a.value){case wp.Open:return`cui-garage-control__status--open`;case wp.Opening:case wp.Closing:return`cui-garage-control__status--transitioning`;case wp.Stopped:return`cui-garage-control__status--stopped`;default:return``}}),l=G(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.5))`})),u=G(()=>({color:`rgb(250, 204, 21)`,filter:`drop-shadow(0 0 8px rgba(250, 204, 21, 0.5))`})),d=G(()=>({color:`rgb(251, 146, 60)`}));function f(e){r(`update:targetState`,e?Tp.Open:Tp.Closed)}return(t,n)=>{let r=Cp,i=yn,p=lt,m=Cr;return L(),q(`div`,{class:R([`cui-garage-control`,[`cui-garage-control--${e.size}`,{"cui-garage-control--disabled":e.disabled}]])},[X(`div`,Dp,[X(`div`,Op,[$(a)===$(wp).Stopped?(L(),U(r,{key:0,class:`cui-garage-control__icon-svg`,style:Q($(d))},null,8,[`style`])):$(a)===$(wp).Open||$(a)===$(wp).Opening?(L(),U(i,{key:1,class:`cui-garage-control__icon-svg`,style:Q($(a)===$(wp).Open?$(l):$(u))},null,8,[`style`])):(L(),U(p,{key:2,class:`cui-garage-control__icon-svg`,style:Q($(a)===$(wp).Closing?$(u):void 0)},null,8,[`style`])),e.obstructionDetected?(L(),q(`span`,kp)):W(``,!0)]),X(`div`,Ap,[e.label?(L(),q(`span`,jp,z(e.label),1)):W(``,!0),X(`span`,{class:R([`cui-garage-control__status`,$(c)])},z($(s)),3)]),Z(m,{"model-value":$(o),disabled:e.disabled,class:`ml-auto shrink-0`,"onUpdate:modelValue":f},null,8,[`model-value`,`disabled`])])],2)}}}),[[`__scopeId`,`data-v-4c6505c2`]]),Np={detected:!1,disabled:!1,size:`medium`},Pp={class:`cui-leak-sensor__header`},Fp={class:`cui-leak-sensor__icon`},Ip={class:`cui-leak-sensor__info`},Lp={key:0,class:`cui-leak-sensor__label`},Rp=Vt(H({__name:`CuiLeakSensor`,props:En({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Np),setup(e){let t=e,{t:n}=ye(),{detected:r}=nr(t),i=G(()=>({color:`rgb(59, 130, 246)`,filter:`drop-shadow(0 0 6px rgba(59, 130, 246, 0.5))`})),a=G(()=>({color:`var(--text-secondary-color)`})),o=G(()=>r.value?`cui-leak-sensor__status--detected`:`cui-leak-sensor__status--clear`),s=G(()=>r.value?`cui-leak-sensor__indicator--detected`:`cui-leak-sensor__indicator--clear`);return(t,c)=>{let l=xn,u=Tt;return L(),q(`div`,{class:R([`cui-leak-sensor`,[`cui-leak-sensor--${e.size}`,{"cui-leak-sensor--disabled":e.disabled,"cui-leak-sensor--clear":!$(r),"cui-leak-sensor--detected":$(r)}]])},[X(`div`,Pp,[X(`div`,Fp,[$(r)?(L(),U(l,{key:0,class:`cui-leak-sensor__icon-svg`,style:Q($(i))},null,8,[`style`])):(L(),U(u,{key:1,class:`cui-leak-sensor__icon-svg`,style:Q($(a))},null,8,[`style`]))]),X(`div`,Ip,[e.label?(L(),q(`span`,Lp,z(e.label),1)):W(``,!0),X(`span`,{class:R([`cui-leak-sensor__status`,$(o)])},z($(r)?$(n)(`components.leak_sensor.detected`):$(n)(`components.leak_sensor.clear`)),3)]),X(`div`,{class:R([`cui-leak-sensor__indicator`,$(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-14a46a3f`]]),zp={detected:!1,disabled:!1,size:`medium`},Bp={class:`cui-smoke-sensor__header`},Vp={class:`cui-smoke-sensor__icon`},Hp={class:`cui-smoke-sensor__info`},Up={key:0,class:`cui-smoke-sensor__label`},Wp=Vt(H({__name:`CuiSmokeSensor`,props:En({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},zp),setup(e){let t=e,{t:n}=ye(),{detected:r}=nr(t),i=G(()=>({color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 6px rgba(239, 68, 68, 0.5))`})),a=G(()=>({color:`var(--text-secondary-color)`})),o=G(()=>r.value?`cui-smoke-sensor__status--detected`:`cui-smoke-sensor__status--clear`),s=G(()=>r.value?`cui-smoke-sensor__indicator--detected`:`cui-smoke-sensor__indicator--clear`);return(t,c)=>{let l=St,u=gn;return L(),q(`div`,{class:R([`cui-smoke-sensor`,[`cui-smoke-sensor--${e.size}`,{"cui-smoke-sensor--disabled":e.disabled,"cui-smoke-sensor--clear":!$(r),"cui-smoke-sensor--detected":$(r)}]])},[X(`div`,Bp,[X(`div`,Vp,[$(r)?(L(),U(l,{key:0,class:`cui-smoke-sensor__icon-svg`,style:Q($(i))},null,8,[`style`])):(L(),U(u,{key:1,class:`cui-smoke-sensor__icon-svg`,style:Q($(a))},null,8,[`style`]))]),X(`div`,Hp,[e.label?(L(),q(`span`,Up,z(e.label),1)):W(``,!0),X(`span`,{class:R([`cui-smoke-sensor__status`,$(o)])},z($(r)?$(n)(`components.smoke_sensor.detected`):$(n)(`components.smoke_sensor.clear`)),3)]),X(`div`,{class:R([`cui-smoke-sensor__indicator`,$(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-4db50b68`]]),Gp={detected:!1,disabled:!1,size:`medium`},Kp={class:`cui-occupancy-sensor__header`},qp={class:`cui-occupancy-sensor__icon`},Jp={class:`cui-occupancy-sensor__info`},Yp={key:0,class:`cui-occupancy-sensor__label`},Xp=Vt(H({__name:`CuiOccupancySensor`,props:En({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Gp),setup(e){let t=e,{t:n}=ye(),{detected:r}=nr(t),i=G(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.5))`})),a=G(()=>({color:`var(--text-secondary-color)`})),o=G(()=>r.value?`cui-occupancy-sensor__status--occupied`:`cui-occupancy-sensor__status--empty`),s=G(()=>r.value?`cui-occupancy-sensor__indicator--occupied`:`cui-occupancy-sensor__indicator--empty`);return(t,c)=>{let l=zt,u=It;return L(),q(`div`,{class:R([`cui-occupancy-sensor`,[`cui-occupancy-sensor--${e.size}`,{"cui-occupancy-sensor--disabled":e.disabled,"cui-occupancy-sensor--empty":!$(r),"cui-occupancy-sensor--occupied":$(r)}]])},[X(`div`,Kp,[X(`div`,qp,[$(r)?(L(),U(l,{key:0,class:`cui-occupancy-sensor__icon-svg`,style:Q($(i))},null,8,[`style`])):(L(),U(u,{key:1,class:`cui-occupancy-sensor__icon-svg`,style:Q($(a))},null,8,[`style`]))]),X(`div`,Jp,[e.label?(L(),q(`span`,Yp,z(e.label),1)):W(``,!0),X(`span`,{class:R([`cui-occupancy-sensor__status`,$(o)])},z($(r)?$(n)(`components.occupancy_sensor.occupied`):$(n)(`components.occupancy_sensor.empty`)),3)]),X(`div`,{class:R([`cui-occupancy-sensor__indicator`,$(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-8ca5a1ce`]]),Zp={detected:!1,disabled:!1,size:`medium`},Qp={class:`cui-contact-sensor__header`},$p={class:`cui-contact-sensor__icon`},em={class:`cui-contact-sensor__info`},tm={key:0,class:`cui-contact-sensor__label`},nm=Vt(H({__name:`CuiContactSensor`,props:En({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Zp),setup(e){let t=e,{t:n}=ye(),{detected:r}=nr(t),i=G(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.5))`})),a=G(()=>({color:`rgb(251, 146, 60)`,filter:`drop-shadow(0 0 8px rgba(251, 146, 60, 0.6))`})),o=G(()=>r.value?`cui-contact-sensor__status--closed`:`cui-contact-sensor__status--open`),s=G(()=>r.value?`cui-contact-sensor__indicator--closed`:`cui-contact-sensor__indicator--open`);return(t,c)=>{let l=sn,u=Qt;return L(),q(`div`,{class:R([`cui-contact-sensor`,[`cui-contact-sensor--${e.size}`,{"cui-contact-sensor--disabled":e.disabled,"cui-contact-sensor--open":!$(r),"cui-contact-sensor--closed":$(r)}]])},[X(`div`,Qp,[X(`div`,$p,[$(r)?(L(),U(l,{key:0,class:`cui-contact-sensor__icon-svg`,style:Q($(i))},null,8,[`style`])):(L(),U(u,{key:1,class:`cui-contact-sensor__icon-svg`,style:Q($(a))},null,8,[`style`]))]),X(`div`,em,[e.label?(L(),q(`span`,tm,z(e.label),1)):W(``,!0),X(`span`,{class:R([`cui-contact-sensor__status`,$(o)])},z($(r)?$(n)(`components.contact_sensor.closed`):$(n)(`components.contact_sensor.open`)),3)]),X(`div`,{class:R([`cui-contact-sensor__indicator`,$(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-0cc50676`]]),rm={ring:!1,disabled:!1,size:`medium`},im={class:`cui-doorbell__header`},am={class:`cui-doorbell__icon`},om={class:`cui-doorbell__info`},sm={key:0,class:`cui-doorbell__label`},cm=Vt(H({__name:`CuiDoorbellTrigger`,props:En({ring:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},rm),emits:[`update:ring`,`trigger`],setup(e,{emit:t}){let n=e,r=t,{t:i}=ye(),{ring:a}=nr(n),o=G(()=>a.value),s=G(()=>({color:`rgb(234, 179, 8)`,filter:`drop-shadow(0 0 10px rgba(234, 179, 8, 0.8))`}));function c(){r(`update:ring`,!0),r(`trigger`),setTimeout(()=>{r(`update:ring`,!1)},2e3)}return(t,n)=>{let r=Je,a=wi,l=v;return L(),q(`div`,{class:R([`cui-doorbell`,[`cui-doorbell--${e.size}`,{"cui-doorbell--disabled":e.disabled,"cui-doorbell--ringing":$(o)}]])},[X(`div`,im,[X(`div`,am,[$(o)?(L(),U(r,{key:0,class:`cui-doorbell__icon-svg cui-doorbell__icon-svg--ringing`,style:Q($(s))},null,8,[`style`])):(L(),U(r,{key:1,class:`cui-doorbell__icon-svg`}))]),X(`div`,om,[e.label?(L(),q(`span`,sm,z(e.label),1)):W(``,!0),X(`span`,{class:R([`cui-doorbell__status`,{"cui-doorbell__status--ringing":$(o)}])},z($(o)?$(i)(`components.doorbell_trigger.ringing`):$(i)(`components.doorbell_trigger.ready`)),3)]),Z(l,{disabled:e.disabled||$(o),size:`small`,severity:`warn`,class:`cui-doorbell__button`,onClick:c},{icon:Y(()=>[Z(a,{class:`cui-doorbell__button-icon`})]),_:1},8,[`disabled`])])],2)}}}),[[`__scopeId`,`data-v-b227d18a`]]),lm={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function um(e,t){return L(),q(`svg`,lm,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`m17.75 4.09l-2.53 1.94l.91 3.06l-2.63-1.81l-2.63 1.81l.91-3.06l-2.53-1.94L12.44 4l1.06-3l1.06 3zm3.5 6.91l-1.64 1.25l.59 1.98l-1.7-1.17l-1.7 1.17l.59-1.98L15.75 11l2.06-.05L18.5 9l.69 1.95zm-2.28 4.95c.83-.08 1.72 1.1 1.19 1.85c-.32.45-.66.87-1.08 1.27C15.17 23 8.84 23 4.94 19.07c-3.91-3.9-3.91-10.24 0-14.14c.4-.4.82-.76 1.27-1.08c.75-.53 1.93.36 1.85 1.19c-.27 2.86.69 5.83 2.89 8.02a9.96 9.96 0 0 0 8.02 2.89m-1.64 2.02a12.08 12.08 0 0 1-7.8-3.47c-2.17-2.19-3.33-5-3.49-7.82c-2.81 3.14-2.7 7.96.31 10.98c3.02 3.01 7.84 3.12 10.98.31`},null,-1)]])}var dm=K({name:`mdi-weather-night`,render:um}),fm={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function pm(e,t){return L(),q(`svg`,fm,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M13.34 8.17c-.93 0-1.69-.77-1.69-1.7a1.69 1.69 0 0 1 1.69-1.69c.94 0 1.7.76 1.7 1.69s-.76 1.7-1.7 1.7M10.3 19.93l-5.93-1.18l.34-1.7l4.15.85l1.35-6.86l-1.52.6v2.86H7v-3.96l4.4-1.87l.67-.08c.6 0 1.1.34 1.43.85l.86 1.35c.68 1.21 2.03 2.03 3.64 2.03v1.68c-1.86 0-3.56-.83-4.66-2.1l-.5 2.54l1.77 1.69V23h-1.69v-5.1l-1.78-1.69zM21 23h-2V3H6v13.11l-2-.42V1h17zM6 23H4v-3.22l2 .42z`},null,-1)]])}var mm=K({name:`mdi-exit-run`,render:pm}),hm=function(e){return e[e.StayArm=0]=`StayArm`,e[e.AwayArm=1]=`AwayArm`,e[e.NightArm=2]=`NightArm`,e[e.Disarmed=3]=`Disarmed`,e[e.AlarmTriggered=4]=`AlarmTriggered`,e}({}),gm={class:`cui-security-system__header`},_m={class:`cui-security-system__icon`},vm={class:`cui-security-system__info`},ym={key:0,class:`cui-security-system__label`},bm={key:0,class:`cui-security-system__alarm`},xm={class:`cui-security-system__modes`},Sm=[`disabled`],Cm=[`disabled`],wm=[`disabled`],Tm=[`disabled`],Em=Vt(H({__name:`CuiSecuritySystem`,props:{currentState:{default:hm.Disarmed},targetState:{default:hm.Disarmed},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},emits:[`update:currentState`,`update:targetState`],setup(e,{emit:t}){let n=e,r=t,{t:i}=ye(),{currentState:a,targetState:o}=nr(n),s=G({get:()=>a.value,set:e=>r(`update:currentState`,e)}),c=G({get:()=>o.value,set:e=>r(`update:targetState`,e)}),l=G(()=>s.value===hm.AlarmTriggered),u=G(()=>s.value===hm.StayArm||s.value===hm.AwayArm||s.value===hm.NightArm),d=G(()=>!l.value&&c.value!==s.value),f=G(()=>{if(d.value)return c.value===hm.Disarmed?i(`components.security_system.status_disarming`):i(`components.security_system.status_arming`);switch(s.value){case hm.StayArm:return i(`components.security_system.status_home_armed`);case hm.AwayArm:return i(`components.security_system.status_away_armed`);case hm.NightArm:return i(`components.security_system.status_night_armed`);case hm.Disarmed:return i(`components.security_system.status_disarmed`);case hm.AlarmTriggered:return i(`components.security_system.status_alarm`);default:return i(`components.security_system.status_unknown`)}}),p=G(()=>l.value?`cui-security-system__status--alarm`:d.value?`cui-security-system__status--transitioning`:u.value?`cui-security-system__status--armed`:`cui-security-system__status--disarmed`),m=G(()=>({color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 12px rgba(239, 68, 68, 0.8))`,animation:`pulse 0.5s ease-in-out infinite alternate`})),h=G(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.5))`}));function g(e){c.value=e}function ee(){s.value=c.value}return(t,n)=>{let r=_n,a=Ye,o=ut,s=pn,d=v,_=Ti,y=mm,b=dm;return L(),q(`div`,{class:R([`cui-security-system`,[`cui-security-system--${e.size}`,{"cui-security-system--disabled":e.disabled}]])},[X(`div`,gm,[X(`div`,_m,[$(l)?(L(),U(r,{key:0,class:`cui-security-system__icon-svg`,style:Q($(m))},null,8,[`style`])):$(u)?(L(),U(a,{key:1,class:`cui-security-system__icon-svg`,style:Q($(h))},null,8,[`style`])):(L(),U(o,{key:2,class:`cui-security-system__icon-svg`}))]),X(`div`,vm,[e.label?(L(),q(`span`,ym,z(e.label),1)):W(``,!0),X(`span`,{class:R([`cui-security-system__status`,$(p)])},z($(f)),3)])]),$(l)?(L(),q(`div`,bm,[Z(s,{class:`cui-security-system__alarm-icon`}),X(`span`,null,z($(i)(`components.security_system.alarm_triggered`)),1),Z(d,{size:`small`,severity:`danger`,label:$(i)(`components.security_system.reset`),onClick:ee},null,8,[`label`])])):W(``,!0),X(`div`,xm,[X(`button`,{type:`button`,class:R([`cui-security-system__mode`,{"cui-security-system__mode--active":$(c)===$(hm).Disarmed}]),disabled:e.disabled||$(l),onClick:n[0]||=e=>g($(hm).Disarmed)},[Z(o,{class:`cui-security-system__mode-icon`}),X(`span`,null,z($(i)(`components.security_system.off`)),1)],10,Sm),X(`button`,{type:`button`,class:R([`cui-security-system__mode`,{"cui-security-system__mode--active":$(c)===$(hm).StayArm}]),disabled:e.disabled||$(l),onClick:n[1]||=e=>g($(hm).StayArm)},[Z(_,{class:`cui-security-system__mode-icon`}),X(`span`,null,z($(i)(`components.security_system.home`)),1)],10,Cm),X(`button`,{type:`button`,class:R([`cui-security-system__mode`,{"cui-security-system__mode--active":$(c)===$(hm).AwayArm}]),disabled:e.disabled||$(l),onClick:n[2]||=e=>g($(hm).AwayArm)},[Z(y,{class:`cui-security-system__mode-icon`}),X(`span`,null,z($(i)(`components.security_system.away`)),1)],10,wm),X(`button`,{type:`button`,class:R([`cui-security-system__mode`,{"cui-security-system__mode--active":$(c)===$(hm).NightArm}]),disabled:e.disabled||$(l),onClick:n[3]||=e=>g($(hm).NightArm)},[Z(b,{class:`cui-security-system__mode-icon`}),X(`span`,null,z($(i)(`components.security_system.night`)),1)],10,Tm)])],2)}}}),[[`__scopeId`,`data-v-67cacde3`]]),Dm={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Om(e,t){return L(),q(`svg`,Dm,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.84-5 6.7v2.07c4-.91 7-4.49 7-8.77s-3-7.86-7-8.77M16.5 12c0-1.77-1-3.29-2.5-4.03V16c1.5-.71 2.5-2.24 2.5-4M3 9v6h4l5 5V4L7 9z`},null,-1)]])}var km=K({name:`mdi-volume-high`,render:Om}),Am={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function jm(e,t){return L(),q(`svg`,Am,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M6 6.9L3.87 4.78l1.41-1.41L7.4 5.5zM13 1v3h-2V1zm7.13 3.78L18 6.9l-1.4-1.4l2.12-2.13zM4.5 10.5v2h-3v-2zm15 0h3v2h-3zM6 20h12a2 2 0 0 1 2 2H4a2 2 0 0 1 2-2m6-15a6 6 0 0 1 6 6v8H6v-8a6 6 0 0 1 6-6m0 2a4 4 0 0 0-4 4v6h8v-6a4 4 0 0 0-4-4`},null,-1)]])}var Mm=K({name:`mdi-alarm-light-outline`,render:jm}),Nm={active:!1,volume:100,hasVolume:!1,disabled:!1,size:`medium`},Pm={class:`cui-siren-control__header`},Fm={class:`cui-siren-control__icon`},Im={key:0,class:`cui-siren-control__label`},Lm={key:0,class:`cui-siren-control__volume`},Rm={class:`cui-siren-control__volume-header`},zm={class:`cui-siren-control__volume-value`},Bm=Vt(H({__name:`CuiSirenControl`,props:En({active:{type:Boolean},volume:{},hasVolume:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Nm),emits:[`update:active`,`update:volume`],setup(e,{emit:t}){let n=e,r=t,{active:a,volume:o,hasVolume:s}=nr(n),c=G({get:()=>a.value,set:e=>r(`update:active`,e)}),l=G({get:()=>o.value,set:e=>r(`update:volume`,e)}),u=G(()=>{let e=(s.value?o.value:100)/100;return{color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 ${4+e*12}px rgba(239, 68, 68, ${.3+e*.7}))`,opacity:.4+e*.6}});return(t,n)=>{let r=pn,a=Mm,o=Cr,d=km,f=i;return L(),q(`div`,{class:R([`cui-siren-control`,[`cui-siren-control--${e.size}`,{"cui-siren-control--disabled":e.disabled}]])},[X(`div`,Pm,[X(`div`,Fm,[$(c)?(L(),U(r,{key:0,class:`cui-siren-control__icon-svg cui-siren-control__icon-svg--active`,style:Q($(u))},null,8,[`style`])):(L(),U(a,{key:1,class:`cui-siren-control__icon-svg`}))]),e.label?(L(),q(`span`,Im,z(e.label),1)):W(``,!0),Z(o,{modelValue:$(c),"onUpdate:modelValue":n[0]||=e=>Hn(c)?c.value=e:null,disabled:e.disabled,class:`cui-siren-control__toggle`},null,8,[`modelValue`,`disabled`])]),$(s)?(L(),q(`div`,Lm,[X(`div`,Rm,[Z(d,{class:`cui-siren-control__volume-icon`}),X(`span`,zm,z($(l))+`%`,1)]),Z(f,{modelValue:$(l),"onUpdate:modelValue":n[1]||=e=>Hn(l)?l.value=e:null,min:0,max:100,step:1,disabled:e.disabled,class:`cui-siren-control__slider`},null,8,[`modelValue`,`disabled`])])):W(``,!0)],2)}}}),[[`__scopeId`,`data-v-7f88e563`]]),Vm=function(e){return e[e.Secured=0]=`Secured`,e[e.Unsecured=1]=`Unsecured`,e[e.Unknown=2]=`Unknown`,e}({}),Hm={currentState:2,targetState:0,disabled:!1,size:`medium`},Um={class:`cui-lock-control__header`},Wm={class:`cui-lock-control__icon`},Gm={class:`cui-lock-control__info`},Km={key:0,class:`cui-lock-control__label`},qm=Vt(H({__name:`CuiLockControl`,props:En({currentState:{},targetState:{},label:{},disabled:{type:Boolean},size:{}},Hm),emits:[`update:targetState`],setup(e,{emit:t}){let n=e,r=t,{t:i}=ye(),{currentState:a,targetState:o}=nr(n),s=G(()=>o.value===Vm.Secured),c=G(()=>a.value!==o.value&&a.value!==Vm.Unknown),l=G(()=>{if(c.value)return o.value===Vm.Secured?i(`components.lock.status_locking`):i(`components.lock.status_unlocking`);switch(a.value){case Vm.Secured:return i(`components.lock.status_locked`);case Vm.Unsecured:return i(`components.lock.status_unlocked`);default:return i(`components.lock.status_unknown`)}}),u=G(()=>c.value?`cui-lock-control__status--transitioning`:a.value===Vm.Secured?`cui-lock-control__status--secured`:a.value===Vm.Unsecured?`cui-lock-control__status--unsecured`:``),d=G(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.5))`}));function f(e){r(`update:targetState`,e?Vm.Secured:Vm.Unsecured)}return(t,n)=>{let r=kt,i=Nt,a=Cr;return L(),q(`div`,{class:R([`cui-lock-control`,[`cui-lock-control--${e.size}`,{"cui-lock-control--disabled":e.disabled}]])},[X(`div`,Um,[X(`div`,Wm,[$(s)?(L(),U(r,{key:0,class:`cui-lock-control__icon-svg`,style:Q($(d))},null,8,[`style`])):(L(),U(i,{key:1,class:`cui-lock-control__icon-svg`}))]),X(`div`,Gm,[e.label?(L(),q(`span`,Km,z(e.label),1)):W(``,!0),X(`span`,{class:R([`cui-lock-control__status`,$(u)])},z($(l)),3)]),Z(a,{"model-value":$(s),disabled:e.disabled,class:`ml-auto shrink-0`,"onUpdate:modelValue":f},null,8,[`model-value`,`disabled`])])],2)}}}),[[`__scopeId`,`data-v-4b2a60ff`]]),Jm={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ym(e,t){return L(),q(`svg`,Jm,[...t[0]||=[X(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M18.36 6.64A9 9 0 0 1 20.77 15M6.16 6.16a9 9 0 1 0 12.68 12.68M12 2v4M2 2l20 20`},null,-1)]])}var Xm=K({name:`lucide-power-off`,render:Ym}),Zm={class:`cui-switch-control__header`},Qm={class:`cui-switch-control__icon`},$m={key:0,class:`cui-switch-control__label`},eh=Vt(H({__name:`CuiSwitchControl`,props:{on:{type:Boolean,default:!1},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},emits:[`update:on`],setup(e,{emit:t}){let n=e,r=t,{on:i,size:a}=nr(n),o=G({get:()=>i.value,set:e=>r(`update:on`,e)}),s=G(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 10px rgba(34, 197, 94, 0.7))`}));return(t,n)=>{let r=Gt,i=Xm,c=Cr;return L(),q(`div`,{class:R([`cui-switch-control`,[`cui-switch-control--${$(a)}`,{"cui-switch-control--disabled":e.disabled}]])},[X(`div`,Zm,[X(`div`,Qm,[$(o)?(L(),U(r,{key:0,class:`cui-switch-control__icon-svg cui-switch-control__icon-svg--on`,style:Q($(s))},null,8,[`style`])):(L(),U(i,{key:1,class:`cui-switch-control__icon-svg`}))]),e.label?(L(),q(`span`,$m,z(e.label),1)):W(``,!0),Z(c,{modelValue:$(o),"onUpdate:modelValue":n[0]||=e=>Hn(o)?o.value=e:null,disabled:e.disabled,class:`cui-switch-control__toggle`},null,8,[`modelValue`,`disabled`])])],2)}}}),[[`__scopeId`,`data-v-86992927`]]),th={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function nh(e,t){return L(),q(`svg`,th,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M12 18V6a6 6 0 0 1 6 6a6 6 0 0 1-6 6m8-2.69L23.31 12L20 8.69V4h-4.69L12 .69L8.69 4H4v4.69L.69 12L4 15.31V20h4.69L12 23.31L15.31 20H20z`},null,-1)]])}var rh=K({name:`mdi-brightness6`,render:nh}),ih={on:!1,brightness:100,hasBrightness:!1,disabled:!1,size:`medium`},ah={class:`cui-light-control__header`},oh={class:`cui-light-control__icon`},sh={key:0,class:`cui-light-control__label`},ch={key:0,class:`cui-light-control__brightness`},lh={class:`cui-light-control__brightness-header`},uh={class:`cui-light-control__brightness-value`},dh=Vt(H({__name:`CuiLightControl`,props:En({on:{type:Boolean},brightness:{},hasBrightness:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},ih),emits:[`update:on`,`update:brightness`],setup(e,{emit:t}){let n=e,r=t,{on:a,brightness:o,hasBrightness:s}=nr(n),c=J(o.value>0?o.value:100),l=G({get:()=>a.value,set:e=>{r(`update:on`,e),e&&o.value===0&&r(`update:brightness`,c.value)}}),u=G({get:()=>o.value,set:e=>{e>0&&(c.value=e),r(`update:brightness`,e),e===0&&a.value?r(`update:on`,!1):e>0&&!a.value&&r(`update:on`,!0)}}),d=G(()=>{let e=(s.value?o.value:100)/100;return{color:`rgb(250, 204, 21)`,filter:`drop-shadow(0 0 ${4+e*12}px rgba(250, 204, 21, ${.3+e*.7}))`,opacity:.4+e*.6}});return(t,n)=>{let r=Dt,a=dr,o=Cr,c=rh,f=i;return L(),q(`div`,{class:R([`cui-light-control`,[`cui-light-control--${e.size}`,{"cui-light-control--disabled":e.disabled}]])},[X(`div`,ah,[X(`div`,oh,[$(l)?(L(),U(r,{key:0,class:`cui-light-control__icon-svg cui-light-control__icon-svg--on`,style:Q($(d))},null,8,[`style`])):(L(),U(a,{key:1,class:`cui-light-control__icon-svg`}))]),e.label?(L(),q(`span`,sh,z(e.label),1)):W(``,!0),Z(o,{modelValue:$(l),"onUpdate:modelValue":n[0]||=e=>Hn(l)?l.value=e:null,disabled:e.disabled,class:`cui-light-control__toggle`},null,8,[`modelValue`,`disabled`])]),$(s)?(L(),q(`div`,ch,[X(`div`,lh,[Z(c,{class:`cui-light-control__brightness-icon`}),X(`span`,uh,z($(u))+`%`,1)]),Z(f,{modelValue:$(u),"onUpdate:modelValue":n[1]||=e=>Hn(u)?u.value=e:null,min:0,max:100,step:1,disabled:e.disabled,class:`cui-light-control__slider`},null,8,[`modelValue`,`disabled`])])):W(``,!0)],2)}}}),[[`__scopeId`,`data-v-231e0be1`]]),fh={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ph(e,t){return L(),q(`svg`,fh,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`m5 11l1.5-4.5h11L19 11m-1.5 5a1.5 1.5 0 0 1-1.5-1.5a1.5 1.5 0 0 1 1.5-1.5a1.5 1.5 0 0 1 1.5 1.5a1.5 1.5 0 0 1-1.5 1.5m-11 0A1.5 1.5 0 0 1 5 14.5A1.5 1.5 0 0 1 6.5 13A1.5 1.5 0 0 1 8 14.5A1.5 1.5 0 0 1 6.5 16M18.92 6c-.2-.58-.76-1-1.42-1h-11c-.66 0-1.22.42-1.42 1L3 12v8a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1h12v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-8z`},null,-1)]])}var mh=K({name:`mdi-car`,render:ph}),hh={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function gh(e,t){return L(),q(`svg`,hh,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M17 22v-2h3v-3h2v3.5c0 .39-.16.74-.46 1.04s-.65.46-1.04.46zM7 22H3.5c-.39 0-.74-.16-1.04-.46S2 20.89 2 20.5V17h2v3h3zM17 2h3.5c.39 0 .74.16 1.04.46s.46.65.46 1.04V7h-2V4h-3zM7 2v2H4v3H2V3.5c0-.39.16-.74.46-1.04S3.11 2 3.5 2zm6 15.25l4-2.3v-4.59l-4 2.3zm-1-6.33l4-2.29l-4-2.35l-4 2.35zm-5 4.03l4 2.3v-4.59l-4-2.3zm11.23-7.36c.5.32.77.75.77 1.32v6.32c0 .57-.27 1-.77 1.32l-5.48 3.18q-.75.48-1.5 0l-5.48-3.18c-.5-.32-.77-.75-.77-1.32V8.91c0-.57.27-1 .77-1.32l5.48-3.18c.25-.13.5-.19.75-.19s.5.06.75.19z`},null,-1)]])}var _h=K({name:`mdi-cube-scan`,render:gh}),vh={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function yh(e,t){return L(),q(`svg`,vh,[...t[0]||=[X(`g`,{fill:`none`},[X(`path`,{d:`m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z`}),X(`path`,{fill:`currentColor`,d:`M13 2a3 3 0 0 1 .64 5.932l-.171.032l1.436 2.297l1.724-.69a1 1 0 0 1 .848 1.808l-.106.05l-1.723.689a2 2 0 0 1-2.343-.657l-.096-.14l-.163-.26l-.606 2.424a2 2 0 0 1-.256.595l-.09.13l1.653 1.228a2 2 0 0 1 .766 1.202l.029.182l.353 3.178H15a1 1 0 0 1 .117 1.993L15 22h-.91a1.1 1.1 0 0 1-1.074-.861l-.02-.117l-.442-3.979l-3.15-2.34a1 1 0 0 1-.154-.14a2 2 0 0 1-.723-1.891l.033-.157l.794-3.177l-1.57.47l-.835 2.508a1 1 0 0 1-1.928-.52l.03-.112l.836-2.508a2 2 0 0 1 1.17-1.23l.153-.053l3.437-1.031A3 3 0 0 1 13 2M9.6 15.2a1 1 0 0 1 .2 1.4l-1.216 1.622a1.5 1.5 0 0 1-2.032.348l-1.93-1.287a1 1 0 0 1-1.33-1.49l.495-.494a1.01 1.01 0 0 1 1.275-.127l2.206 1.471L8.2 15.4a1 1 0 0 1 1.4-.2`})],-1)]])}var bh=K({name:`mingcute-run-fill`,render:yh}),xh={detected:!1,disabled:!1,size:`medium`},Sh={class:`cui-detection__header`},Ch={class:`cui-detection__info`},wh={key:0,class:`cui-detection__label`},Th={key:0,class:`cui-detection__detections`},Eh=Vt(H({__name:`CuiDetection`,props:En({type:{},label:{},detected:{type:Boolean},detections:{},size:{},disabled:{type:Boolean}},xh),setup(e){let t=e,{t:n}=ye(),{detected:r}=nr(t),i=G(()=>r.value?n(`components.detection.detected`):n(`components.detection.idle`));return(t,n)=>{let a=bh,o=_h,s=si,c=vn,l=mh;return L(),q(`div`,{class:R([`cui-detection`,[`cui-detection--${e.size}`,`cui-detection--${e.type}`,{"cui-detection--disabled":e.disabled,"cui-detection--detected":$(r)}]])},[X(`div`,Sh,[X(`div`,{class:R([`cui-detection__icon`,{"cui-detection__icon--detected":$(r)}])},[e.type===`motion`?(L(),U(a,{key:0,class:`cui-detection__icon-svg`})):e.type===`object`?(L(),U(o,{key:1,class:`cui-detection__icon-svg`})):e.type===`audio`?(L(),U(s,{key:2,class:`cui-detection__icon-svg`})):e.type===`face`?(L(),U(c,{key:3,class:`cui-detection__icon-svg`})):e.type===`licensePlate`?(L(),U(l,{key:4,class:`cui-detection__icon-svg`})):W(``,!0)],2),X(`div`,Ch,[e.label?(L(),q(`span`,wh,z(e.label),1)):W(``,!0),X(`span`,{class:R([`cui-detection__status`,{"cui-detection__status--detected":$(r)}])},z($(i)),3)]),X(`div`,{class:R([`cui-detection__indicator`,{"cui-detection__indicator--detected":$(r)}])},null,2)]),e.detections&&e.detections.length>0?(L(),q(`div`,Th,[(L(!0),q(V,null,M(e.detections,(e,t)=>(L(),q(`span`,{key:t,class:`cui-detection__detection-tag`},z(e),1))),128))])):W(``,!0)],2)}}}),[[`__scopeId`,`data-v-4bdc871b`]]),Dh={key:0,class:`flex items-center justify-center h-full`},Oh={key:1,class:`overview-container`},kh={class:`relative`},Ah={key:0,class:`absolute inset-0 z-2 flex items-center justify-center bg-black/80 pointer-events-none`},jh={key:1,class:`absolute top-2 right-2 z-3 flex items-center gap-1 px-2 py-1 bg-black/60 rounded-full pointer-events-none`},Mh={class:`text-xs text-white/80`},Nh={key:2,class:`absolute top-2 right-2 z-2 flex items-center gap-1 px-2 py-1 bg-black/60 rounded-full pointer-events-none`},Ph={class:`text-xs text-white/80`},Fh={class:`overview-section`},Ih={class:`overview-section-title`},Lh={key:1},Rh={key:0,class:`overview-section`},zh={class:`overview-section-title`},Bh={class:`flex flex-col gap-2`},Vh={key:1,class:`overview-section`},Hh={class:`overview-section-title`},Uh={class:`flex flex-col gap-2`},Wh={key:2,class:`overview-section`},Gh={class:`overview-section-title`},Kh={class:`flex flex-col gap-2`},qh={key:3,class:`overview-section`},Jh={class:`overview-section-title`},Yh={class:`flex flex-col gap-2`},Xh={key:4,class:`overview-section`},Zh={class:`overview-section-title`},Qh={class:`flex flex-col gap-2`},$h={key:5,class:`overview-section`},eg={class:`overview-section-title`},tg={class:`flex flex-col gap-2`},ng={key:6,class:`overview-section`},rg={class:`overview-section-title`},ig={class:`flex flex-col gap-2`},ag={key:7,class:`overview-section`},og={class:`overview-section-title`},sg={class:`flex flex-col gap-2`},cg={key:8,class:`overview-section`},lg={class:`overview-section-title`},ug={class:`flex flex-col gap-2`},dg={key:9,class:`overview-section`},fg={class:`overview-section-title`},pg={class:`flex flex-col gap-2`},mg={key:10,class:`overview-section`},hg={class:`overview-section-title`},gg={class:`flex flex-col gap-2`},_g={key:11,class:`overview-section`},vg={class:`overview-section-title`},yg={class:`flex flex-col gap-2`},bg={key:12,class:`overview-section`},xg={class:`overview-section-title`},Sg={class:`flex flex-col gap-2`},Cg={key:13,class:`overview-section`},wg={class:`overview-section-title`},Tg={class:`flex flex-col gap-2`},Eg={key:14,class:`overview-section`},Dg={class:`overview-section-title`},Og={class:`flex flex-col gap-2`},kg={key:15,class:`overview-section`},Ag={class:`no-sensors`},jg=Vt(H({__name:`Overview`,props:{camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},setup(e){let n=e,{t:i}=ye(),{getCameraStatus:a,connect:o}=Ci(),{cameraDevice:s,latestSnapshotSrc:l}=nr(n),{sensors:d}=He(s);o();let h=G(()=>s.value?.camera.value),g=G(()=>a(h.value?._id)),ee=G(()=>{switch(g.value){case`connected`:return`success`;case`connecting`:return`warn`;case`error`:return`danger`;case`partial`:return`contrast`;default:return`secondary`}}),_=G(()=>{switch(g.value){case`connected`:return i(`components.camera_table.online`);case`connecting`:return i(`components.camera_table.connecting`);case`error`:return i(`components.camera_table.error`);case`partial`:return i(`components.camera_table.partial`);default:return i(`components.camera_table.idle`)}}),v=G(()=>d.value.filter(T)),y=G(()=>d.value.filter(w)),te=G(()=>d.value.filter(x)),S=G(()=>d.value.filter(u)),ne=G(()=>d.value.filter(m)),ae=G(()=>d.value.filter(Ue)),E=G(()=>d.value.filter(De)),de=G(()=>d.value.filter(t)),fe=G(()=>d.value.filter(Fe)),_e=G(()=>d.value.filter(f)),ve=G(()=>d.value.filter(re)),A=G(()=>d.value.filter(r)),xe=G(()=>d.value.filter(j)),Ce=G(()=>d.value.filter(ie)),Ee=G(()=>d.value.filter(ce)),Ae=G(()=>d.value.filter(ge)),Me=G(()=>d.value.filter(c)),Ne=G(()=>d.value.filter(C)),Le=G(()=>d.value.filter(b)),Re=G(()=>v.value.some(e=>e.getProperty(ke.Detected))),Be=G(()=>{let e;for(let t of v.value){let n=t.getProperty(ke.LastTriggered);n&&(!e||n>e)&&(e=n)}return e}),Ve=pe(G(()=>new Date(Be.value??0))),Ge=G(()=>{let e=[{label:i(`components.camera_options.overview_status`),value:_.value,tag:!0,tagSeverity:ee.value},{label:i(`components.camera_options.overview_sources`),value:String(h.value?.sources.length??0)}],t=h.value?.info;return t?.manufacturer&&e.push({label:i(`components.form.label.manufacturer`),value:t.manufacturer}),t?.model&&e.push({label:i(`components.camera_options.model`),value:t.model}),t?.hardware&&e.push({label:i(`components.form.label.hardware_version`),value:t.hardware}),t?.serialNumber&&e.push({label:i(`components.form.label.serial_number`),value:t.serialNumber}),t?.firmwareVersion&&e.push({label:i(`components.form.label.firmware_version`),value:t.firmwareVersion}),t?.supportUrl&&e.push({label:i(`components.form.label.support_url`),value:t.supportUrl}),v.value.length>0&&(Re.value?e.push({label:i(`components.camera_options.overview_last_motion`),value:i(`components.camera_options.overview_motion_active`),tag:!0,tagSeverity:`danger`}):Be.value?e.push({label:i(`components.camera_options.overview_last_motion`),value:Ve.value}):e.push({label:i(`components.camera_options.overview_last_motion`),value:i(`components.camera_options.overview_no_motion`)})),e}),Ke=G(()=>v.value.length>0||y.value.length>0||te.value.length>0||S.value.length>0||ne.value.length>0),qe=G(()=>ae.value.length>0||xe.value.length>0||Ce.value.length>0||Ee.value.length>0||Ae.value.length>0||Me.value.length>0||E.value.length>0||_e.value.length>0||Ne.value.length>0||de.value.length>0||fe.value.length>0||ve.value.length>0||A.value.length>0||Le.value.length>0);return(e,t)=>{let n=ze,r=yt,i=We,a=ln,o=Gr,s=Mr,c=Ei,u=dh,d=eh,f=qm,m=Bm,g=Em,ee=cm,_=nm,b=Xp,x=Wp,C=Rp,re=Mp,ie=bp,w=hp,T=up;return $(h)?(L(),q(`div`,Oh,[X(`div`,kh,[$(h)?.disabled?(L(),q(`div`,Ah,[Z(r,{class:`w-8 h-8 text-white/60`})])):W(``,!0),$(h)?.disabled?(L(),q(`div`,jh,[Z(r,{class:`w-3.5 h-3.5 text-red-400`}),X(`span`,Mh,z(e.$t(`views.camera.camera_disabled`)),1)])):$(h)?.detectionSettings?.snooze?(L(),q(`div`,Nh,[Z(i,{class:`w-3.5 h-3.5 text-amber-400`}),X(`span`,Ph,z(e.$t(`views.camera.camera_snoozed`)),1)])):W(``,!0),Z(a,{camera:$(h),src:$(l)},null,8,[`camera`,`src`])]),X(`div`,Fh,[X(`h3`,Ih,z(e.$t(`components.camera_options.overview`)),1),Z(c,{value:$(Ge),"striped-rows":``,"show-headers":!1,class:`card-border rounded-lg overflow-hidden`},{default:Y(()=>[Z(o,{field:`label`,class:`p-2 font-medium text-sm`}),Z(o,{field:`value`,class:`p-2 text-muted text-sm text-right`},{body:Y(({data:e})=>[e.tag?(L(),U(s,{key:0,severity:e.tagSeverity,value:e.value},null,8,[`severity`,`value`])):(L(),q(`span`,Lh,z(e.value),1))]),_:1})]),_:1},8,[`value`])]),$(Ke)?(L(),q(`div`,Rh,[X(`h3`,zh,z(e.$t(`components.camera_options.detection`)),1),X(`div`,Bh,[(L(!0),q(V,null,M($(v),e=>(L(),U(Eh,{key:e.id,type:`motion`,label:e.displayName.value,detected:e.getProperty($(ke).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128)),(L(!0),q(V,null,M($(y),e=>(L(),U(Eh,{key:e.id,type:`object`,label:e.displayName.value,detected:(e.getProperty($(we).Detections)?.length??0)>0,detections:e.getProperty($(we).Detections)?.map(e=>e.label??e.class??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128)),(L(!0),q(V,null,M($(te),e=>(L(),U(Eh,{key:e.id,type:`audio`,label:e.displayName.value,detected:e.getProperty($(ue).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128)),(L(!0),q(V,null,M($(S),e=>(L(),U(Eh,{key:e.id,type:`face`,label:e.displayName.value,detected:e.getProperty($(Ie).Detected)??!1,detections:e.getProperty($(Ie).Detections)?.map(e=>e.identity??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128)),(L(!0),q(V,null,M($(ne),e=>(L(),U(Eh,{key:e.id,type:`licensePlate`,label:e.displayName.value,detected:e.getProperty($(Te).Detected)??!1,detections:e.getProperty($(Te).Detections)?.map(e=>e.plateText??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128))])])):W(``,!0),$(E).length?(L(),q(`div`,Vh,[X(`h3`,Hh,z(e.$t(`components.camera_options.sensor_type_light`)),1),X(`div`,Uh,[(L(!0),q(V,null,M($(E),e=>(L(),U(u,{key:e.id,label:e.displayName.value,on:e.getProperty($(D).On)??!1,brightness:e.getProperty($(D).Brightness)??100,"has-brightness":e.hasCapability(`brightness`),size:`small`,class:`card-border`,"onUpdate:on":t=>e.setProperty($(D).On,t),"onUpdate:brightness":t=>e.setProperty($(D).Brightness,t)},null,8,[`label`,`on`,`brightness`,`has-brightness`,`onUpdate:on`,`onUpdate:brightness`]))),128))])])):W(``,!0),$(fe).length?(L(),q(`div`,Wh,[X(`h3`,Gh,z(e.$t(`components.camera_options.sensor_type_switch`)),1),X(`div`,Kh,[(L(!0),q(V,null,M($(fe),e=>(L(),U(d,{key:e.id,label:e.displayName.value,on:e.getProperty($(p).On)??!1,size:`small`,class:`card-border`,"onUpdate:on":t=>e.setProperty($(p).On,t)},null,8,[`label`,`on`,`onUpdate:on`]))),128))])])):W(``,!0),$(_e).length?(L(),q(`div`,qh,[X(`h3`,Jh,z(e.$t(`components.camera_options.sensor_type_lock`)),1),X(`div`,Yh,[(L(!0),q(V,null,M($(_e),e=>(L(),U(f,{key:e.id,label:e.displayName.value,"current-state":e.getProperty($(k).CurrentState)??2,"target-state":e.getProperty($(k).TargetState)??0,size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty($(k).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`onUpdate:targetState`]))),128))])])):W(``,!0),$(de).length?(L(),q(`div`,Xh,[X(`h3`,Zh,z(e.$t(`components.camera_options.sensor_type_siren`)),1),X(`div`,Qh,[(L(!0),q(V,null,M($(de),e=>(L(),U(m,{key:e.id,label:e.displayName.value,active:e.getProperty($(oe).Active)??!1,volume:e.getProperty($(oe).Volume)??100,"has-volume":e.hasCapability(`volume`),size:`small`,class:`card-border`,"onUpdate:active":t=>e.setProperty($(oe).Active,t),"onUpdate:volume":t=>e.setProperty($(oe).Volume,t)},null,8,[`label`,`active`,`volume`,`has-volume`,`onUpdate:active`,`onUpdate:volume`]))),128))])])):W(``,!0),$(Le).length?(L(),q(`div`,$h,[X(`h3`,eg,z(e.$t(`components.camera_options.sensor_type_securitySystem`)),1),X(`div`,tg,[(L(!0),q(V,null,M($(Le),e=>(L(),U(g,{key:e.id,label:e.displayName.value,"current-state":e.getProperty($(le).CurrentState)??3,"target-state":e.getProperty($(le).TargetState)??3,size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty($(le).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`onUpdate:targetState`]))),128))])])):W(``,!0),$(ve).length?(L(),q(`div`,ng,[X(`h3`,rg,z(e.$t(`components.camera_options.sensor_type_doorbell`)),1),X(`div`,ig,[(L(!0),q(V,null,M($(ve),e=>(L(),U(ee,{key:e.id,label:e.displayName.value,ring:e.getProperty($(he).Ring)??!1,size:`small`,class:`card-border`,onTrigger:()=>e.setProperty($(he).Ring,!0)},null,8,[`label`,`ring`,`onTrigger`]))),128))])])):W(``,!0),$(A).length?(L(),q(`div`,ag,[X(`h3`,og,z(e.$t(`components.camera_options.sensor_type_contact`)),1),X(`div`,sg,[(L(!0),q(V,null,M($(A),e=>(L(),U(_,{key:e.id,label:e.displayName.value,detected:e.getProperty($(Se).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):W(``,!0),$(Ee).length?(L(),q(`div`,cg,[X(`h3`,lg,z(e.$t(`components.camera_options.sensor_type_occupancy`)),1),X(`div`,ug,[(L(!0),q(V,null,M($(Ee),e=>(L(),U(b,{key:e.id,label:e.displayName.value,detected:e.getProperty($(Pe).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):W(``,!0),$(Ae).length?(L(),q(`div`,dg,[X(`h3`,fg,z(e.$t(`components.camera_options.sensor_type_smoke`)),1),X(`div`,pg,[(L(!0),q(V,null,M($(Ae),e=>(L(),U(x,{key:e.id,label:e.displayName.value,detected:e.getProperty($(se).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):W(``,!0),$(Me).length?(L(),q(`div`,mg,[X(`h3`,hg,z(e.$t(`components.camera_options.sensor_type_leak`)),1),X(`div`,gg,[(L(!0),q(V,null,M($(Me),e=>(L(),U(C,{key:e.id,label:e.displayName.value,detected:e.getProperty($(je).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):W(``,!0),$(Ne).length?(L(),q(`div`,_g,[X(`h3`,vg,z(e.$t(`components.camera_options.sensor_type_garage`)),1),X(`div`,yg,[(L(!0),q(V,null,M($(Ne),e=>(L(),U(re,{key:e.id,label:e.displayName.value,"current-state":e.getProperty($(be).CurrentState)??1,"target-state":e.getProperty($(be).TargetState)??1,"obstruction-detected":e.getProperty($(be).ObstructionDetected)??!1,size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty($(be).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`obstruction-detected`,`onUpdate:targetState`]))),128))])])):W(``,!0),$(xe).length?(L(),q(`div`,bg,[X(`h3`,xg,z(e.$t(`components.camera_options.sensor_type_temperature`)),1),X(`div`,Sg,[(L(!0),q(V,null,M($(xe),e=>(L(),U(ie,{key:e.id,label:e.displayName.value,current:e.getProperty($(Oe).Current),size:`small`,class:`card-border`},null,8,[`label`,`current`]))),128))])])):W(``,!0),$(Ce).length?(L(),q(`div`,Cg,[X(`h3`,wg,z(e.$t(`components.camera_options.sensor_type_humidity`)),1),X(`div`,Tg,[(L(!0),q(V,null,M($(Ce),e=>(L(),U(w,{key:e.id,label:e.displayName.value,current:e.getProperty($(me).Current),size:`small`,class:`card-border`},null,8,[`label`,`current`]))),128))])])):W(``,!0),$(ae).length?(L(),q(`div`,Eg,[X(`h3`,Dg,z(e.$t(`components.camera_options.sensor_type_battery`)),1),X(`div`,Og,[(L(!0),q(V,null,M($(ae),e=>(L(),U(T,{key:e.id,label:e.displayName.value,level:e.getProperty($(O).Level)??100,charging:e.getProperty($(O).Charging)??`NOT_CHARGING`,low:e.getProperty($(O).Low)??!1,size:`small`,class:`card-border`},null,8,[`label`,`level`,`charging`,`low`]))),128))])])):W(``,!0),!$(qe)&&!$(Ke)?(L(),q(`div`,kg,[X(`div`,Ag,z(e.$t(`components.camera_options.no_sensors`)),1)])):W(``,!0)])):(L(),q(`div`,Dh,[Z(n,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})]))}}}),[[`__scopeId`,`data-v-5d86732a`]]),Mg={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ng(e,t){return L(),q(`svg`,Mg,[...t[0]||=[X(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[X(`path`,{"stroke-width":`3`,d:`M5 10h.01M5 16h.01`}),X(`path`,{"stroke-width":`2`,d:`m10 17l4-10m2 10l4-10`})],-1)]])}var Pg=K({name:`humbleicons-url`,render:Ng}),Fg={class:`drawer-header flex items-center w-full h-[45px] border-b-[1px] border-color px-3`},Ig={class:`font-semibold text-lg truncate`},Lg=[`onClick`],Rg={class:`text-xs truncate`},zg={class:`w-full h-full max-h-full overflow-y-scroll`},Bg={key:0,class:`flex w-full h-full items-center justify-center mt-5`},Vg={key:1,class:`w-full h-full`},Hg={key:0,class:`w-full flex items-center justify-center p-4 h-[70px]`},Ug=Vt(H({__name:`CameraOptions`,props:{cameraName:{},latestSnapshotSrc:{}},emits:[`close`],setup(e,{emit:t}){let n=new Yt,r=e,i=t,a=vt(),o=tn(),{t:s}=ye(),{latestSnapshotSrc:c}=nr(r),l=J(r.cameraName),{camera:u,isLoading:d}=A(l),{data:f,isBusy:p}=n.getCameraQuery(l),{mutate:m,isPending:h}=n.patchCameraQuery(),g=Bn(`formRef`),ee=Gn(),_=J(),y=J(`overview`),b=J([{name:`overview`,icon:Ut},{name:`sources`,icon:Pg},{name:`settings`,icon:ct},{name:`plugins`,icon:hn}]),x=G(()=>p.value||d.value||h.value),te=G(()=>y.value===`sources`||y.value===`settings`);async function S(){let e=await g.value?.validate();if(e?.valid&&e.values){let t=e.values.name;m({cameraname:l.value,cameraData:e.values},{onSuccess:()=>{t&&t!==l.value&&(l.value=t)}})}else a.error(`Validation failed`,e),o.add({severity:`error`,detail:s(`components.toast.validation_failed`),life:3e3})}return F(u,e=>{e&&(ee.value=e)},{immediate:!0}),F(()=>r.cameraName,e=>{ee.value=void 0,l.value=e}),F(f,e=>{e&&(_.value=Xt(e))},{deep:!0,immediate:!0}),(e,t)=>{let n=Jr,r=v,a=vr,o=kr,s=ze,u=jg,d=Uf,p=af,m=Ic,h=Sr,C=Ar,ne=xr;return L(),q(V,null,[X(`div`,Fg,[X(`span`,Ig,z($(l)),1),Z(r,{text:``,rounded:``,severity:`secondary`,class:`ml-auto cui-icon-md shrink-0`,onClick:t[0]||=e=>i(`close`)},{icon:Y(()=>[Z(n,{width:`100%`,height:`100%`})]),_:1})]),Z($(In),{ref_key:`formRef`,ref:g,class:`w-full`,style:Q({height:`calc(100% - 45px - ${$(te)?`70px`:`0px`})`}),"validation-schema":$(vi)},{default:Y(()=>[Z(ne,{value:$(y),"onUpdate:value":t[7]||=e=>Hn(y)?y.value=e:null,scrollable:``,class:`w-full h-full`},{default:Y(()=>[Z(o,{class:`justify-between`,pt:{tablist:{class:`h-[65px]`},activeBar:{class:`!w-auto`}}},{default:Y(()=>[(L(!0),q(V,null,M($(b),(t,n)=>(L(),U(a,{key:n,value:t.name,"as-child":``},{default:Y(n=>[X(`div`,Jn({ref_for:!0},n.a11yAttrs,{class:[`flex flex-col items-center justify-center flex-1 content-background !py-3`,[{"hover:!text-color active:!text-color focus:!text-color":!n.active},n.class]],onClick:n.onClick}),[(L(),U(zn(t.icon),{class:`w-5 h-5`})),X(`span`,Rg,z(e.$t(`components.options_sidebar.segment_tab_${t.name}`)),1)],16,Lg)]),_:2},1032,[`value`]))),128))]),_:1}),Z(C,{class:`p-0 h-[calc(100%-65px)]`},{default:Y(()=>[X(`div`,zg,[(L(!0),q(V,null,M($(b),(e,n)=>(L(),U(h,{key:n,value:e.name,"as-child":``},{default:Y(e=>[e.active?(L(),q(`div`,Jn({key:0,class:e.class},{ref_for:!0},e.a11yAttrs),[!$(_)||!$(f)||!$(ee)?(L(),q(`div`,Bg,[Z(s,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])):(L(),q(`div`,Vg,[$(y)===`overview`?(L(),U(u,{key:0,camera:$(f),"camera-device":$(ee),loading:$(x),"latest-snapshot-src":$(c),onClose:t[1]||=e=>i(`close`)},null,8,[`camera`,`camera-device`,`loading`,`latest-snapshot-src`])):W(``,!0),$(y)===`sources`?(L(),U(d,{key:1,modelValue:$(_),"onUpdate:modelValue":t[2]||=e=>Hn(_)?_.value=e:null,camera:$(f),"camera-device":$(ee),loading:$(x),onClose:t[3]||=e=>i(`close`)},null,8,[`modelValue`,`camera`,`camera-device`,`loading`])):W(``,!0),$(y)===`settings`?(L(),U(p,{key:2,modelValue:$(_),"onUpdate:modelValue":t[4]||=e=>Hn(_)?_.value=e:null,camera:$(f),"camera-device":$(ee),loading:$(x),onClose:t[5]||=e=>i(`close`)},null,8,[`modelValue`,`camera`,`camera-device`,`loading`])):W(``,!0),$(y)===`plugins`?(L(),U(m,{key:3,camera:$(f),"camera-device":$(ee),loading:$(x),onClose:t[6]||=e=>i(`close`)},null,8,[`camera`,`camera-device`,`loading`])):W(``,!0)]))],16)):W(``,!0)]),_:1},8,[`value`]))),128))])]),_:1})]),_:1},8,[`value`]),$(te)?(L(),q(`div`,Hg,[Z(r,{fluid:``,severity:`success`,class:`cui-button-medium`,label:e.$t(`components.form.button.save`),onClick:S},null,8,[`label`])])):W(``,!0)]),_:1},8,[`style`,`validation-schema`])],64)}}}),[[`__scopeId`,`data-v-24ee7633`]]),Wg={class:`w-full h-full p-safe !pb-0 md:!pl-0 non-draggable-region`},Gg={class:`w-full h-full border-0 md:border-r-[1px] border-color overflow-y-auto pb-safe`},Kg=H({__name:`CuiCameraDrawer`,setup(e){let t=_r(),n=mt(),r=n.getEventBus(),i=J(!1),a=J(),o=J(),s=G(()=>gt.pt);function c(){i.value=!1,n.close()}return F(t.currentRoute,(e,t)=>{e.path!==t.path&&n.close()}),On(()=>{r.on(e=>{e.type===`open`?(a.value=e.options,o.value=e.props,i.value=!0):e.type===`close`&&(i.value=!1,a.value=void 0)})}),(e,t)=>{let n=Ug,r=Vr;return L(),U(r,Jn({visible:$(i),"onUpdate:visible":t[0]||=e=>Hn(i)?i.value=e:null},$(o),{class:`border-0 md:border-l-[1px]`,pt:$(s),onHide:c}),{container:Y(({closeCallback:e})=>[X(`div`,Wg,[X(`div`,Gg,[$(a)?(L(),U(n,Jn({key:0},$(a),{onClose:e}),null,16,[`onClose`])):W(``,!0)])])]),_:1},16,[`visible`,`pt`])}}}),qg=H({__name:`CuiToast`,setup(e){let t=vt(),{t:n}=ye(),{mdBreakpoint:r}=on(),{theme:i}=hr(ri()),a={success:tr.success,error:tr.error,warn:tr.warning,warning:tr.warning,info:tr.info};function o(e){return n(`components.toast.title_${e===`warning`?`warn`:e}`)}function s(e){return e.type===`dismiss`}return xe(nt.on(e=>{if(s(e)){tr.dismiss(e.id);return}let r=e,i=a[r.severity]||tr,c=r.summary||o(r.severity),l;if(r.action){let{label:e,loadingLabel:i,onClick:a}=r.action,o=r.id;l={label:e,onClick:r=>{r.preventDefault(),r.stopPropagation();let s=a();s instanceof Promise&&o&&(tr.loading(i??e,{id:o,duration:1/0}),s.catch(e=>{t.error(`action failed`,e),tr.error(n(`components.toast.title_error`),{id:o})}))}}}i(c,{id:r.id,description:r.detail,duration:r.persistent?1/0:r.life??3e3,action:l})})),(e,t)=>(L(),U($(er),{"rich-colors":``,position:$(r)?`top-center`:`bottom-right`,"visible-toasts":3,theme:$(i)},null,8,[`position`,`theme`]))}}),Jg={class:`loader flex flex-col justify-center items-center`},Yg={key:0,class:`absolute flex flex-col items-center justify-center pb-safe bottom-10`},Xg={key:0,class:`offline`},Zg={key:1,class:`text-center text-white text-sm font-bold mt-2`},Qg=Vt(H({__name:`CuiLoadingScreen`,props:{reload:{type:Boolean,default:!1},height:{default:`200px`},width:{default:`200px`},text:{},icon:{}},setup(e){let{reload:t,width:n,height:r,text:i,icon:a}=nr(e),{start:o}=E(()=>{document.getElementById(`lens`)?.classList.add(`cameraLens`),document.getElementById(`CameraUI_U`)?.classList.add(`cameraLetter`)},100,{immediate:!1}),{resume:s}=_e(()=>{document.getElementById(`lens`)?.classList.remove(`cameraLens`),document.getElementById(`CameraUI_U`)?.classList.remove(`cameraLetter`),o()},2300,{immediate:!1});return On(()=>{t.value&&s()}),(e,t)=>(L(),q(`div`,Jg,[Z($(rr),{src:$(fn)(`logo_loading_circle.svg`),width:$(n),height:$(r),title:`camera.ui`,"aria-label":`camera.ui`},null,8,[`src`,`width`,`height`]),$(a)||$(i)?(L(),q(`div`,Yg,[$(a)?(L(),q(`div`,Xg,[(L(),U(zn($(a)),{class:`w-8 h-8 text-primary`}))])):W(``,!0),$(i)?(L(),q(`div`,Zg,z($(i)),1)):W(``,!0)])):W(``,!0)]))}}),[[`__scopeId`,`data-v-839ba1ea`]]);vt(`PushHandler`);function $g(){let e=_r(),{isElectronApp:t,electron:n}=tt();function r(t,n){n?.deepLink&&e.push(n.deepLink)}On(()=>{!t||!n||(n.removeListener(`notification-click`,r),n.on(`notification-click`,r))}),jn(()=>{n?.removeListener(`notification-click`,r)})}function e_(){let e=_r(),{isElectronApp:t,electron:n}=tt();function r(t,n){n?.path&&e.push(n.path)}On(()=>{!t||!n||(n.removeListener(`deep-link`,r),n.on(`deep-link`,r))}),jn(()=>{n?.removeListener(`deep-link`,r)})}var t_={key:1,class:`app`},n_=Vt(H({__name:`App`,setup(e){let{navbarState:t,subbarState:n,showBottombar:r,showNavbar:i,showTopbar:a}=Et(),o=$t(),s=pr(),c=_r(),{mdBreakpoint:l}=on(),{isPWA:u}=Wt(),{t:d}=ye(),f=_t(),{isElectronApp:p}=tt();Pt(),bn(),$g(),e_();let{theme:m}=hr(ri()),{isLoggedIn:h}=hr(Lt()),g=qe(),ee=Bn(`navbarRef`),_=Bn(`topbarRef`),v=Bn(`bottombarRef`),y=J(!0),b=J(!1),x=ne(_,{width:0,height:0},{box:`border-box`}),te=ne(v,{width:0,height:0},{box:`border-box`}),S=G(()=>t.value===`closed`||t.value===`minified`?l.value?Aa.CLOSED:Aa.MINIFIED:Aa.EXPANDED),C=G(()=>t.value===`closed`?0:8),re=G(()=>!ee.value||l.value?`env(safe-area-inset-left, 0px)`:`calc(${S.value}px + max(${C.value}px, env(safe-area-inset-left, 0px)))`),ie=G(()=>o.showTopbar.value?`var(--topbar-background)`:o.background.value?o.background.value:`var(--ground-background)`),ae=G(()=>`calc(100dvh - ${_.value?`${x.height.value}px`:`env(safe-area-inset-top, 0px)`} - ${v.value?`${te.height.value}px`:o.ignoreSafeAreaBottom.value?`0px`:`env(safe-area-inset-bottom, 0px)`} - ${v.value||!o.disableScroll.value||o.noExtraPadding.value?`0px`:`8px`})`),w=G(()=>s.meta.auth?.requiresAuth&&!h.value||y.value||g.isSwitching),oe=G(()=>{if(!(!g.isSwitching||!g.switchTargetName))return`${d(`components.instance_switcher.switching_to`)} ${g.switchTargetName}...`});async function T(){}return F([h,()=>f.isOnline.value],([e,t],n)=>{if(g.isSwitching)return;let r=n?.[0]===!0&&n?.[1]===!0;e&&t&&!r&&(g.saveCurrentTokens(),g.fetchInstances())},{immediate:!0}),F([ie,m],()=>{Tn(()=>{if(/^var\([^)]+\)$/.test(ie.value)){let e=window.getComputedStyle(document.body),t=ie.value.split(`var(`)[1].split(`)`)[0],n=e.getPropertyValue(t);document.querySelector(`meta[name="theme-color"]`)?.setAttribute(`content`,n)}else document.querySelector(`meta[name="theme-color"]`)?.setAttribute(`content`,ie.value)})},{immediate:!0}),F(()=>o.disableScroll.value,e=>{document.body.classList.toggle(`disable-overflow-scroll`,e),document.documentElement.classList.toggle(`disable-overflow-scroll`,e)},{immediate:!0}),On(async()=>{await c.isReady(),T(),y.value=!1,requestAnimationFrame(()=>{b.value=!0})}),(e,s)=>{let c=Qg,d=qg,f=jr,m=Pr,h=Kg,y=_s,ne=Xa,ie=Ja,T=Dn(`RouterView`),se=ga,ce=aa,le=na,E=Xi,ue=Wi;return $(w)?(L(),q(`div`,{key:0,class:`flex w-full h-full justify-center items-center absolute z-50`,style:Q({minHeight:$(u)?`100vh !important`:`100dvh !important`})},[Z(c,{reload:``,text:$(oe)},null,8,[`text`])],4)):(L(),q(`div`,t_,[Z(d),Z(f),Z(m),Z(h),$(a)?(L(),U(y,{key:0,ref_key:`topbarRef`,ref:_,class:`z-2 top-0`,"offset-left":$(l)?0:$(S),animate:$(b)},null,8,[`offset-left`,`animate`])):W(``,!0),$(r)?(L(),U(ne,{key:1,ref_key:`bottombarRef`,ref:v,class:`z-2`},null,512)):W(``,!0),$(i)?(L(),U(ie,{key:2,ref_key:`navbarRef`,ref:ee,class:`z-3 top-0 left-0`},null,512)):W(``,!0),X(`main`,{id:`container`,class:`relative w-dvw z-1 overflow-x-hidden`,style:Q({transition:$(b)?`padding-left 200ms`:void 0,paddingTop:$(_)?`${$(x).height.value}px`:`env(safe-area-inset-top, 0px)`,paddingLeft:$(re),paddingRight:`env(safe-area-inset-right, 0px)`,paddingBottom:$(v)?`${$(te).height.value}px`:$(o).ignoreSafeAreaBottom.value?`0px`:`env(safe-area-inset-bottom, 0px)`})},[X(`div`,{class:R([`w-full max-w-full h-full grid`,{"p-2":$(o).padding.value,"pt-0":$(o).paddingTop.value===!1,"pb-0":$(o).paddingBottom.value===!1&&!$(v),"pb-4":($(o).paddingBottom.value||$(v))&&!$(o).disableScroll,"pl-0":$(o).paddingLeft.value===!1,"pr-0":$(o).paddingRight.value===!1}]),style:Q({minHeight:$(ae),maxHeight:$(o).disableScroll.value?$(ae):void 0,height:$(o).disableScroll.value?$(ae):void 0,overflow:$(o).disableScroll.value?`hidden`:void 0})},[Z(T,null,{default:Y(({Component:e})=>[(L(),U(zn(e),{key:$(g).switchKey,class:R([`w-full h-full relative min-w-0`,{"overflow-x-hidden":!$(o).allowOverflowX.value}]),"navbar-width":$(S),"navbar-left":$(C)},null,8,[`class`,`navbar-width`,`navbar-left`]))]),_:1})],6)],4),$(p)?(L(),U(se,{key:3})):W(``,!0),$(t)===`opened`||$(n)===`opened`&&$(l)?(L(),U($n,{key:4,to:$(t)===`opened`?`#app`:`#container`,defer:``},[$(l)?(L(),q(`div`,{key:0,class:R([`fixed top-0 left-0 right-0 bottom-0 w-full h-full bg-black/50 z-1`,{"z-2":$(t)===`opened`}])},null,2)):W(``,!0)],8,[`to`])):W(``,!0),X(`div`,{class:`fixed-bg`,style:Q({background:$(o).background.value})},null,4),Z(ce),Z(le),Z(E),Z(ue)]))}}}),[[`__scopeId`,`data-v-d25eaf46`]]);function r_(e){dt()&&window.addEventListener(`message`,t=>{if(t.origin!==window.location.origin)return;let n=t.data;n&&(n.type===`cui:theme`&&(n.mode===`dark`||n.mode===`light`)?e.onTheme?.(n.mode):n.type===`cui:language`&&typeof n.language==`string`&&n.language&&e.onLanguage?.(n.language))})}function i_(e,t){e.use(g({natsTransport:t.nats,target:t.target,wsTransport:t.ws})),e.use(Me({natsTransport:t.nats,target:t.target,wsTransport:t.ws,workerBridge:an(),workerRegistry:Zt}))}var a_=fr(),o_=Br(Ur,{primitive:{borderRadius:{none:`0`,xs:`2px`,sm:`4px`,md:`6px`,lg:`8px`,xl:`12px`},emerald:{50:`#ecfdf5`,100:`#d1fae5`,200:`#a7f3d0`,300:`#6ee7b7`,400:`#34d399`,500:`#10b981`,600:`#059669`,700:`#047857`,800:`#065f46`,900:`#064e3b`,950:`#022c22`},green:{50:`#f0fdf4`,100:`#dcfce7`,200:`#bbf7d0`,300:`#86efac`,400:`#4ade80`,500:`#22c55e`,600:`#16a34a`,700:`#15803d`,800:`#166534`,900:`#14532d`,950:`#052e16`},lime:{50:`#f7fee7`,100:`#ecfccb`,200:`#d9f99d`,300:`#bef264`,400:`#a3e635`,500:`#84cc16`,600:`#65a30d`,700:`#4d7c0f`,800:`#3f6212`,900:`#365314`,950:`#1a2e05`},red:{50:`#fef2f2`,100:`#fee2e2`,200:`#fecaca`,300:`#fca5a5`,400:`#f87171`,500:`#ef4444`,600:`#dc2626`,700:`#b91c1c`,800:`#991b1b`,900:`#7f1d1d`,950:`#450a0a`},orange:{50:`#fff7ed`,100:`#ffedd5`,200:`#fed7aa`,300:`#fdba74`,400:`#fb923c`,500:`#f97316`,600:`#ea580c`,700:`#c2410c`,800:`#9a3412`,900:`#7c2d12`,950:`#431407`},amber:{50:`#fffbeb`,100:`#fef3c7`,200:`#fde68a`,300:`#fcd34d`,400:`#fbbf24`,500:`#f59e0b`,600:`#d97706`,700:`#b45309`,800:`#92400e`,900:`#78350f`,950:`#451a03`},yellow:{50:`#fefce8`,100:`#fef9c3`,200:`#fef08a`,300:`#fde047`,400:`#facc15`,500:`#eab308`,600:`#ca8a04`,700:`#a16207`,800:`#854d0e`,900:`#713f12`,950:`#422006`},teal:{50:`#f0fdfa`,100:`#ccfbf1`,200:`#99f6e4`,300:`#5eead4`,400:`#2dd4bf`,500:`#14b8a6`,600:`#0d9488`,700:`#0f766e`,800:`#115e59`,900:`#134e4a`,950:`#042f2e`},cyan:{50:`#ecfeff`,100:`#cffafe`,200:`#a5f3fc`,300:`#67e8f9`,400:`#22d3ee`,500:`#06b6d4`,600:`#0891b2`,700:`#0e7490`,800:`#155e75`,900:`#164e63`,950:`#083344`},sky:{50:`#f0f9ff`,100:`#e0f2fe`,200:`#bae6fd`,300:`#7dd3fc`,400:`#38bdf8`,500:`#0ea5e9`,600:`#0284c7`,700:`#0369a1`,800:`#075985`,900:`#0c4a6e`,950:`#082f49`},blue:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#93c5fd`,400:`#60a5fa`,500:`#3b82f6`,600:`#2563eb`,700:`#1d4ed8`,800:`#1e40af`,900:`#1e3a8a`,950:`#172554`},indigo:{50:`#eef2ff`,100:`#e0e7ff`,200:`#c7d2fe`,300:`#a5b4fc`,400:`#818cf8`,500:`#6366f1`,600:`#4f46e5`,700:`#4338ca`,800:`#3730a3`,900:`#312e81`,950:`#1e1b4b`},violet:{50:`#f5f3ff`,100:`#ede9fe`,200:`#ddd6fe`,300:`#c4b5fd`,400:`#a78bfa`,500:`#8b5cf6`,600:`#7c3aed`,700:`#6d28d9`,800:`#5b21b6`,900:`#4c1d95`,950:`#2e1065`},purple:{50:`#faf5ff`,100:`#f3e8ff`,200:`#e9d5ff`,300:`#d8b4fe`,400:`#c084fc`,500:`#a855f7`,600:`#9333ea`,700:`#7e22ce`,800:`#6b21a8`,900:`#581c87`,950:`#3b0764`},fuchsia:{50:`#fdf4ff`,100:`#fae8ff`,200:`#f5d0fe`,300:`#f0abfc`,400:`#e879f9`,500:`#d946ef`,600:`#c026d3`,700:`#a21caf`,800:`#86198f`,900:`#701a75`,950:`#4a044e`},pink:{50:`#fdf2f8`,100:`#fce7f3`,200:`#fbcfe8`,300:`#f9a8d4`,400:`#f472b6`,500:`#ec4899`,600:`#db2777`,700:`#be185d`,800:`#9d174d`,900:`#831843`,950:`#500724`},rose:{50:`#fff1f2`,100:`#ffe4e6`,200:`#fecdd3`,300:`#fda4af`,400:`#fb7185`,500:`#f43f5e`,600:`#e11d48`,700:`#be123c`,800:`#9f1239`,900:`#881337`,950:`#4c0519`},slate:{50:`#f8fafc`,100:`#f1f5f9`,200:`#e2e8f0`,300:`#cbd5e1`,400:`#94a3b8`,500:`#64748b`,600:`#475569`,700:`#334155`,800:`#1e293b`,900:`#0f172a`,950:`#020617`},gray:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#1f2937`,900:`#111827`,950:`#030712`},zinc:{50:`#fafafa`,100:`#f4f4f5`,200:`#e4e4e7`,300:`#d4d4d8`,400:`#a1a1aa`,500:`#71717a`,600:`#52525b`,700:`#3f3f46`,800:`#27272a`,900:`#18181b`,950:`#09090b`},neutral:{50:`#fafafa`,100:`#f5f5f5`,200:`#e5e5e5`,300:`#d4d4d4`,400:`#a3a3a3`,500:`#737373`,600:`#525252`,700:`#404040`,800:`#262626`,900:`#171717`,950:`#0a0a0a`},stone:{50:`#fafaf9`,100:`#f5f5f4`,200:`#e7e5e4`,300:`#d6d3d1`,400:`#a8a29e`,500:`#78716c`,600:`#57534e`,700:`#44403c`,800:`#292524`,900:`#1c1917`,950:`#0c0a09`}},semantic:{transitionDuration:`0.2s`,focusRing:{width:`1px`,style:`solid`,color:`{primary.color}`,offset:`2px`,shadow:`none`},disabledOpacity:`0.6`,iconSize:`1rem`,anchorGutter:`2px`,primary:{50:`#fdf4f6`,100:`#f7ccd4`,200:`#f1a3b2`,300:`#eb7b90`,400:`#e5526e`,500:`#df2a4c`,600:`#be2441`,700:`#9c1d35`,800:`#7b172a`,900:`#59111e`,950:`#380b13`},formField:{paddingX:`0.75rem`,paddingY:`0.5rem`,sm:{fontSize:`0.875rem`,paddingX:`0.625rem`,paddingY:`0.375rem`},lg:{fontSize:`1.125rem`,paddingX:`0.875rem`,paddingY:`0.625rem`},borderRadius:`{border.radius.md}`,focusRing:{width:`0`,style:`none`,color:`transparent`,offset:`0`,shadow:`none`},transitionDuration:`{transition.duration}`},list:{padding:`0.25rem 0.25rem`,gap:`2px`,header:{padding:`0.5rem 1rem 0.25rem 1rem`},option:{padding:`0.5rem 0.75rem`,borderRadius:`{border.radius.sm}`},optionGroup:{padding:`0.5rem 0.75rem`,fontWeight:`600`}},content:{borderRadius:`{border.radius.md}`},mask:{transitionDuration:`0.15s`},navigation:{list:{padding:`0.25rem 0.25rem`,gap:`2px`},item:{padding:`0.5rem 0.75rem`,borderRadius:`{border.radius.sm}`,gap:`0.5rem`},submenuLabel:{padding:`0.5rem 0.75rem`,fontWeight:`600`},submenuIcon:{size:`0.875rem`}},overlay:{select:{borderRadius:`{border.radius.md}`,shadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`},popover:{borderRadius:`{border.radius.md}`,padding:`0.75rem`,shadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`},modal:{borderRadius:`{border.radius.xl}`,padding:`1.25rem`,shadow:`0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)`},navigation:{shadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`}},colorScheme:{light:{surface:{0:`#ffffff`,50:`#f8fafc`,100:`#f1f5f9`,200:`#e2e8f0`,300:`#cbd5e1`,400:`#94a3b8`,500:`#64748b`,600:`#475569`,700:`#334155`,800:`#1e293b`,850:`#0f172a`,900:`#0f172a`,925:`#0c1421`,950:`#020617`,1e3:`#000000`},primary:{color:`{primary.500}`,contrastColor:`#ffffff`,hoverColor:`{primary.600}`,activeColor:`{primary.700}`},highlight:{background:`{primary.50}`,focusBackground:`{primary.100}`,color:`{primary.700}`,focusColor:`{primary.800}`},mask:{background:`rgba(0,0,0,0.4)`,color:`{surface.200}`},formField:{background:`{surface.50}`,disabledBackground:`{surface.200}`,filledBackground:`{surface.50}`,filledHoverBackground:`{surface.50}`,filledFocusBackground:`{surface.50}`,borderColor:`{surface.300}`,hoverBorderColor:`{surface.400}`,focusBorderColor:`{primary.color}`,invalidBorderColor:`{red.400}`,color:`{surface.700}`,disabledColor:`{surface.500}`,placeholderColor:`{surface.500}`,invalidPlaceholderColor:`{red.600}`,floatLabelColor:`{surface.500}`,floatLabelFocusColor:`{primary.600}`,floatLabelActiveColor:`{surface.500}`,floatLabelInvalidColor:`{form.field.invalid.placeholder.color}`,iconColor:`{surface.400}`,shadow:`0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)`},text:{color:`{surface.700}`,hoverColor:`{surface.800}`,mutedColor:`{surface.500}`,hoverMutedColor:`{surface.600}`},content:{background:`{surface.0}`,hoverBackground:`{surface.100}`,borderColor:`{surface.200}`,color:`{text.color}`,hoverColor:`{text.hover.color}`},overlay:{select:{background:`{surface.0}`,borderColor:`{surface.200}`,color:`{text.color}`},popover:{background:`{surface.0}`,borderColor:`{surface.200}`,color:`{text.color}`},modal:{background:`{surface.0}`,borderColor:`{surface.200}`,color:`{text.color}`}},list:{option:{focusBackground:`{surface.100}`,selectedBackground:`{highlight.background}`,selectedFocusBackground:`{highlight.focus.background}`,color:`{text.color}`,focusColor:`{text.hover.color}`,selectedColor:`{highlight.color}`,selectedFocusColor:`{highlight.focus.color}`,icon:{color:`{surface.400}`,focusColor:`{surface.500}`}},optionGroup:{background:`transparent`,color:`{text.muted.color}`}},navigation:{item:{focusBackground:`{surface.100}`,activeBackground:`{surface.100}`,color:`{text.color}`,focusColor:`{text.hover.color}`,activeColor:`{text.hover.color}`,icon:{color:`{surface.400}`,focusColor:`{surface.500}`,activeColor:`{surface.500}`}},submenuLabel:{background:`transparent`,color:`{text.muted.color}`},submenuIcon:{color:`{surface.400}`,focusColor:`{surface.500}`,activeColor:`{surface.500}`}}},dark:{surface:{0:`#ffffff`,50:`#f5f5f5`,100:`#d1d1d1`,200:`#adadad`,300:`#898989`,400:`#646464`,500:`#404040`,600:`#363636`,700:`#2d2d2d`,800:`#232323`,850:`#1d1d1d`,900:`#1a1a1a`,925:`#161616`,950:`#101010`,1e3:`#0d0d0d`},primary:{color:`{primary.500}`,contrastColor:`{surface.900}`,hoverColor:`{primary.600}`,activeColor:`{primary.700}`},highlight:{background:`color-mix(in srgb, {primary.400}, transparent 84%)`,focusBackground:`color-mix(in srgb, {primary.400}, transparent 76%)`,color:`rgba(255,255,255,.87)`,focusColor:`rgba(255,255,255,.87)`},mask:{background:`rgba(0,0,0,0.6)`,color:`{surface.200}`},formField:{background:`{surface.925}`,disabledBackground:`{surface.700}`,filledBackground:`{surface.800}`,filledHoverBackground:`{surface.800}`,filledFocusBackground:`{surface.800}`,borderColor:`{surface.800}`,hoverBorderColor:`{surface.500}`,focusBorderColor:`{primary.color}`,invalidBorderColor:`{red.300}`,color:`{surface.0}`,disabledColor:`{surface.400}`,placeholderColor:`{surface.400}`,invalidPlaceholderColor:`{red.400}`,floatLabelColor:`{surface.400}`,floatLabelFocusColor:`{primary.color}`,floatLabelActiveColor:`{surface.400}`,floatLabelInvalidColor:`{form.field.invalid.placeholder.color}`,iconColor:`{surface.400}`,shadow:`0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)`},text:{color:`{surface.0}`,hoverColor:`{surface.0}`,mutedColor:`{surface.400}`,hoverMutedColor:`{surface.300}`},content:{background:`{surface.900}`,hoverBackground:`{surface.800}`,borderColor:`{surface.700}`,color:`{text.color}`,hoverColor:`{text.hover.color}`},overlay:{select:{background:`{surface.900}`,borderColor:`{surface.700}`,color:`{text.color}`},popover:{background:`{surface.900}`,borderColor:`{surface.700}`,color:`{text.color}`},modal:{background:`{surface.900}`,borderColor:`{surface.700}`,color:`{text.color}`}},list:{option:{focusBackground:`{surface.800}`,selectedBackground:`{highlight.background}`,selectedFocusBackground:`{highlight.focus.background}`,color:`{text.color}`,focusColor:`{text.hover.color}`,selectedColor:`{highlight.color}`,selectedFocusColor:`{highlight.focus.color}`,icon:{color:`{surface.500}`,focusColor:`{surface.400}`}},optionGroup:{background:`transparent`,color:`{text.muted.color}`}},navigation:{item:{focusBackground:`{surface.800}`,activeBackground:`{surface.800}`,color:`{text.color}`,focusColor:`{text.hover.color}`,activeColor:`{text.hover.color}`,icon:{color:`{surface.500}`,focusColor:`{surface.400}`,activeColor:`{surface.400}`}},submenuLabel:{background:`transparent`,color:`{text.muted.color}`},submenuIcon:{color:`{surface.500}`,focusColor:`{surface.400}`,activeColor:`{surface.400}`}}}}}});function s_(e){Ot(e)||Zr.value||$r.value||tn().add({severity:`error`,detail:e,life:3e3})}function c_(){return{enableDevtoolsV6Plugin:!0,queryClientConfig:{defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!0,gcTime:300*1e3,staleTime:1e4,networkMode:`online`,retry:(e,t)=>l_(t)===401?!1:e<2?!0:(s_(t),!1)},mutations:{retry:0,networkMode:`online`,onError:s_}}}}}function l_(e){if(typeof e==`object`&&e&&`response`in e){let t=e.response;if(typeof t?.status==`number`)return t.status}}function u_(){return{theme:{preset:o_,options:{cssLayer:{name:`primevue`,order:`theme, base, primevue`},darkModeSelector:`.dark-mode`}}}}function d_(e){e.directive(`tooltip`,y).directive(`focustrap`,s),e.use(Hr).use(Wr).use(zr).use(Kr,u_()).use(et).use(Zn()).use(Vn,c_()).use(a_)}window.addEventListener(`vite:preloadError`,()=>Ft(()=>window.location.reload()));var{connection:f_}=await Jt({logger:new l(`Connection`)});cn();var p_=Wn(n_),m_=new l(`Vue`);p_.config.errorHandler=(e,t,n)=>m_.error(`[${n}]`,e),d_(p_),Oi(f_),i_(p_,f_),qe().restoreActiveOverride(),Pt(),r_({onTheme:e=>ri().applyHostTheme(e),onLanguage:e=>Pt().applyHostLanguage(e)});var h_=await Di(f_,{onUser:e=>Lt().setUserFromLogin(e),onRedirectInfo:e=>{qe().redirectInfo=e},onReset:()=>{qe().activeId=null,Ht.value=null}});!h_&&$e()&&(h_=await Ke(f_,{onUser:e=>Lt().setUserFromLogin(e)})),p_.use(bt),p_.mount(`#app`),xt(),h_||f_.boot(`default`);