@camera.ui/server 2.0.10 → 2.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/interface/assets/{404-ChR2IVti.js → 404-Dfyzm8bF.js} +1 -1
- package/dist/interface/assets/{About-CDQ55crC.js → About-B4Y3WP7T.js} +1 -1
- package/dist/interface/assets/{Adminpanel-CiJGwx7_.js → Adminpanel-DSk1uh2x.js} +1 -1
- package/dist/interface/assets/Automation-CTSfLcmF.js +2 -0
- package/dist/interface/assets/AutomationImport-B1P0T0Pe.js +2 -0
- package/dist/interface/assets/AutomationStore-ZaaXPPbd.js +2 -0
- package/dist/interface/assets/AutomationStoreDetail-B2vc7mTZ.js +2 -0
- package/dist/interface/assets/Automations-Bvw-jTKi.js +2 -0
- package/dist/interface/assets/Camera-BxmJXk11.js +2 -0
- package/dist/interface/assets/{CameraConsole-dx9vB5ht.js → CameraConsole-CVqgED5u.js} +2 -2
- package/dist/interface/assets/Cameras-DT62fcZK.js +652 -0
- package/dist/interface/assets/Camview-CqSckgLr.js +1 -0
- package/dist/interface/assets/Config-p9t9zgly.js +2 -0
- package/dist/interface/assets/{ConfigActionCameraControl-CrWmGvdE.js → ConfigActionCameraControl-BLROOU0q.js} +1 -1
- package/dist/interface/assets/{ConfigActionDelay-1kd69ysm.js → ConfigActionDelay-q0pOTOzh.js} +1 -1
- package/dist/interface/assets/{ConfigActionHttp-XY-r_hEX.js → ConfigActionHttp-DiMXKRGz.js} +1 -1
- package/dist/interface/assets/ConfigActionImageInput-u5xX9t3-.js +1 -0
- package/dist/interface/assets/{ConfigActionMqtt-DsX-q9M_.js → ConfigActionMqtt-BkZl3uYq.js} +1 -1
- package/dist/interface/assets/ConfigActionNotification-DIkFNlKe.js +1 -0
- package/dist/interface/assets/{ConfigActionOutput-DMYPThT1.js → ConfigActionOutput-CJF0F4cT.js} +1 -1
- package/dist/interface/assets/{ConfigActionPlugin-rCaB0HjK.js → ConfigActionPlugin-rQeJ4umG.js} +1 -1
- package/dist/interface/assets/ConfigActionSensor-BWHpkoMs.js +1 -0
- package/dist/interface/assets/{ConfigActionSnapshot-8vrwtN10.js → ConfigActionSnapshot-BlvQZl1R.js} +1 -1
- package/dist/interface/assets/{ConfigActionVariable-Dy8ZnhCO.js → ConfigActionVariable-BMV-BDAk.js} +1 -1
- package/dist/interface/assets/{ConfigConditionIfElse-DK9Z6-kN.js → ConfigConditionIfElse-C5geCT1S.js} +1 -1
- package/dist/interface/assets/ConfigConditionSensorState-8bIGEhQd.js +1 -0
- package/dist/interface/assets/{ConfigConditionSwitch-_Gxu6OYc.js → ConfigConditionSwitch-PwrCSnTQ.js} +1 -1
- package/dist/interface/assets/{ConfigConditionTime-Ce8AortY.js → ConfigConditionTime-DUt_dsr9.js} +1 -1
- package/dist/interface/assets/{ConfigSensorValueInput-BIiQ8NN6.js → ConfigSensorValueInput-CgZWxOMu.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerDetection-CCCi-Tof.js → ConfigTriggerDetection-D4UitpXI.js} +1 -1
- package/dist/interface/assets/ConfigTriggerGeofence-Ci-gkmjS.js +1 -0
- package/dist/interface/assets/{ConfigTriggerManual-DZPdLXoe.js → ConfigTriggerManual-_PAVLJxz.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerMqtt-4Gp-qhCg.js → ConfigTriggerMqtt-BtfXQ_Bh.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSchedule-DQX6czW4.js → ConfigTriggerSchedule-CHyW4YQ1.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSensor-CLnC2yvE.js → ConfigTriggerSensor-CZMplCYs.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSystem-Gae5o59O.js → ConfigTriggerSystem-OOffe8rK.js} +1 -1
- package/dist/interface/assets/ConfigTriggerWebhook-Baul6M1Y.js +1 -0
- package/dist/interface/assets/Console-MXiL0z_X.js +1 -0
- package/dist/interface/assets/{CuiActionButton-BAlSwXzv.js → CuiActionButton-WFz5I80P.js} +1 -1
- package/dist/interface/assets/{CuiAvatar-DeBKq6dT.js → CuiAvatar-BUwQnIaI.js} +1 -1
- package/dist/interface/assets/{CuiBBoxPlayground-yYOBCXTq.js → CuiBBoxPlayground-J7_8dCvo.js} +1 -1
- package/dist/interface/assets/CuiBottomSheet-BA-u9UtN.js +1 -0
- package/dist/interface/assets/{CuiBottomSheet-udULz0wI.js → CuiBottomSheet-CzG0n4Oa.js} +1 -1
- package/dist/interface/assets/CuiCameraCard-GH-DR5_s.js +1 -0
- package/dist/interface/assets/{CuiCameraPipCard-BxbUK-93.js → CuiCameraPipCard-CL_wj05b.js} +1 -1
- package/dist/interface/assets/CuiCameraRecordings-BjErk9Gl.js +1 -0
- package/dist/interface/assets/CuiCameraShares-qrJhZMEt.js +1 -0
- package/dist/interface/assets/CuiCameraSnapshot-Dn1QSGrr.js +1 -0
- package/dist/interface/assets/CuiCameraTable-or8VpE34.js +2 -0
- package/dist/interface/assets/{CuiDataTable-CB7aMmp9.js → CuiDataTable-CjXiUFiJ.js} +1 -1
- package/dist/interface/assets/CuiFloatingButton-BjpU1EHv.js +1 -0
- package/dist/interface/assets/CuiImage-BM4g6edi.css +1 -0
- package/dist/interface/assets/CuiImage-Bq3bxOOL.js +1 -0
- package/dist/interface/assets/CuiMenu-DtnIPhcr.js +1 -0
- package/dist/interface/assets/CuiPluginCard-DKNWUFpR.js +2 -0
- package/dist/interface/assets/{CuiPluginCategoryChip-yMnZpSGr.js → CuiPluginCategoryChip-cmfKx-dU.js} +1 -1
- package/dist/interface/assets/CuiPluginOAuthButton-C6FQiVkt.js +2 -0
- package/dist/interface/assets/CuiPluginTrustBadge-PVZMP1rI.js +1 -0
- package/dist/interface/assets/{CuiQRCode-D9QNUEmx.js → CuiQRCode-uQygC1dP.js} +1 -1
- package/dist/interface/assets/CuiRecordingsGrid-Cuwd4L67.js +1 -0
- package/dist/interface/assets/CuiSchema-CH0GXMWV.js +1 -0
- package/dist/interface/assets/{CuiTopNavbarItem--MOi9UUw.js → CuiTopNavbarItem-nGcC2em4.js} +1 -1
- package/dist/interface/assets/{CuiTopbarSlot-Bcw46PzA.js → CuiTopbarSlot-B6UMqYZl.js} +1 -1
- package/dist/interface/assets/Faces-cpO5vJbp.js +1 -0
- package/dist/interface/assets/FirstSteps-BHTcbs9O.js +1 -0
- package/dist/interface/assets/Instances-BXiVG2Dm.js +1 -0
- package/dist/interface/assets/Logs-hMg2QOGj.js +6 -0
- package/dist/interface/assets/{Menu-GbuCaA_6.js → Menu-BiPBCi8Z.js} +1 -1
- package/dist/interface/assets/OAuthDeviceFlow-Bia9UA3I.js +1 -0
- package/dist/interface/assets/Plugin-DfRaHAsi.js +1 -0
- package/dist/interface/assets/{PluginConsole-CLGkDl1F.js → PluginConsole-CRw4zTRM.js} +2 -2
- package/dist/interface/assets/PluginDetail-BYqji8yN.css +1 -0
- package/dist/interface/assets/PluginDetail-BqRoLZc7.js +2 -0
- package/dist/interface/assets/{PluginSchema-Dy9kDPML.js → PluginSchema-TtBJPR_R.js} +1 -1
- package/dist/interface/assets/PluginSearch-B_NYpJi3.js +2 -0
- package/dist/interface/assets/{PluginSearch-NuKgD1r3.css → PluginSearch-Bbp8D7BJ.css} +1 -1
- package/dist/interface/assets/PluginSearch-DnJgg6-6.js +1 -0
- package/dist/interface/assets/Plugins-DVFEGtj3.js +1 -0
- package/dist/interface/assets/Recordings-dwm6lAoJ.js +1 -0
- package/dist/interface/assets/{Settings-is528I5i2.js → Settings-BpBmrGpS.js} +1 -1
- package/dist/interface/assets/SettingsAccount-8Kh1uQqn.js +1 -0
- package/dist/interface/assets/{SettingsAccount-Y7hpH8Y3.css → SettingsAccount-CBJ_h7eM.css} +1 -1
- package/dist/interface/assets/SettingsAccount-CjgYe5mF.js +1 -0
- package/dist/interface/assets/SettingsAppearance-3i3Ix7j-.js +1 -0
- package/dist/interface/assets/{SettingsAppearance-CGaG9lml.js → SettingsAppearance-EoBxclgt.js} +1 -1
- package/dist/interface/assets/SettingsBackup-Bpsbg6Pm.js +1 -0
- package/dist/interface/assets/SettingsMqtt-ZQolc9lR.js +1 -0
- package/dist/interface/assets/SettingsNotifications-BOoMt1Er.js +2 -0
- package/dist/interface/assets/SettingsRecordings-BQhxLCgM.js +1 -0
- package/dist/interface/assets/SettingsRemote-Cvcmpdgb.js +1 -0
- package/dist/interface/assets/SettingsRemote-DYld6-1F.css +1 -0
- package/dist/interface/assets/SettingsSystem-B-yhq40t.js +2 -0
- package/dist/interface/assets/SettingsUsers-CezygBk8.js +1 -0
- package/dist/interface/assets/Terminal-CDQJGwb_.js +4 -0
- package/dist/interface/assets/{VariableInput-DW39Zo4d.js → VariableInput-CnmqCHf7.js} +1 -1
- package/dist/interface/assets/{VariableSuggestions-DwhFBKzJ.js → VariableSuggestions-D6IlwBqV.js} +1 -1
- package/dist/interface/assets/VersionsHandler-BHR1k9zz.js +7 -0
- package/dist/interface/assets/Workers-Bv-bWBC-.js +2 -0
- package/dist/interface/assets/{Workers-E6LM_yAl.css → Workers-DmcQx0L8.css} +1 -1
- package/dist/interface/assets/{api-Br3Jmdj6.js → api-BhOwzvxK.js} +1 -1
- package/dist/interface/assets/api-Cea16mc8.js +2 -0
- package/dist/interface/assets/api-GMfqGYqQ.css +2 -0
- package/dist/interface/assets/auth-CNPkdTXX.js +1 -0
- package/dist/interface/assets/{automations-Dd-6vvka.js → automations-CHengR-B.js} +1 -1
- package/dist/interface/assets/automations-DhLADBhd.js +1 -0
- package/dist/interface/assets/bell-outline-CHhIZudN.js +1 -0
- package/dist/interface/assets/{cameras-DCMMwuui.js → cameras-DyF2T0be.js} +1 -1
- package/dist/interface/assets/{cameras.schema-99F6GE0u.js → cameras.schema-DBzgU4m6.js} +1 -1
- package/dist/interface/assets/cloudHandoff-LxdvSi1a.js +1 -0
- package/dist/interface/assets/{config-BiEjYldh.js → config-c7o4sJrQ.js} +1 -1
- package/dist/interface/assets/{circular-connection-Fq-Vqe3X.js → delete-outline-CbGU9XWz.js} +1 -1
- package/dist/interface/assets/{deviceId-sq3mLBKa.js → deviceId-BYu9Q8Ay.js} +1 -1
- package/dist/interface/assets/{hasPermission-Dm18Z17u.js → hasPermission-CgyWyOhQ.js} +1 -1
- package/dist/interface/assets/instances-CRYtaTQS.js +1 -0
- package/dist/interface/assets/main-CgXkx5UO.js +3 -0
- package/dist/interface/assets/nodeDefinitions-DUlwYSC1.js +1 -0
- package/dist/interface/assets/{notifications-D87Lhlir.js → notifications-sejZCb0L.js} +1 -1
- package/dist/interface/assets/plugins-CCLFcD4c.js +1 -0
- package/dist/interface/assets/round-restart-alt-PDSZur-0.js +1 -0
- package/dist/interface/assets/{router-qrIK2v9X.css → router-C7b6u3Zu.css} +1 -1
- package/dist/interface/assets/router-DkMUvvnP.js +2 -0
- package/dist/interface/assets/{routerState-B08WcvfU.js → routerState-BR88YV1H.js} +1 -1
- package/dist/interface/assets/{server-D7bl4wSy.js → server-C7SETTy9.js} +1 -1
- package/dist/interface/assets/shares-Cy1SLL98.js +1 -0
- package/dist/interface/assets/{theme-BG6n3TRA.js → theme-DqbhRu7y.js} +1 -1
- package/dist/interface/assets/transit-connection-variant-DfztpRMW.js +1 -0
- package/dist/interface/assets/types-v8L66UlA.js +1 -0
- package/dist/interface/assets/{ui-Cv0M3koY.js → ui-g5rCwxUE.js} +1 -1
- package/dist/interface/assets/{useAppVersion-DCmhFeIs.js → useAppVersion-WfdoG9Ji.js} +1 -1
- package/dist/interface/assets/useBackupRestore-ootsFhdF.js +1 -0
- package/dist/interface/assets/{useBiometricCredentials-Tq1nEG8V.js → useBiometricCredentials-Ca75xEru.js} +1 -1
- package/dist/interface/assets/useCameraOptions-BpL2zbfV.js +1 -0
- package/dist/interface/assets/{useCuiCameraDrawer-BcAYizqy.js → useCuiCameraDrawer-BHUHw6W6.js} +1 -1
- package/dist/interface/assets/useCuiDialog-yVh5UWKF.js +2 -0
- package/dist/interface/assets/{useFileDownload-C5quSdZR.js → useFileDownload-BcaNWndS.js} +1 -1
- package/dist/interface/assets/useLogsSocket-BRSsUNqv.js +5 -0
- package/dist/interface/assets/useLogsSocket-CoA-Nq-_.css +1 -0
- package/dist/interface/assets/{useServerRestart-DnT0ZOYm.js → useServerRestart-PZhND5H_.js} +1 -1
- package/dist/interface/assets/{useSharedComposables-ffwWlpSL.js → useSharedComposables-USqd05AG.js} +1 -1
- package/dist/interface/assets/{useStreamStatus-CD18kTqt.js → useStreamStatus-nCx5ux1-.js} +1 -1
- package/dist/interface/assets/{useUpdateChannel-DbBXpySY.js → useUpdateChannel-3eHk3KXZ.js} +1 -1
- package/dist/interface/assets/{useUserOptions-Bb0ACtxn.js → useUserOptions-DVC4k8Zs.js} +1 -1
- package/dist/interface/assets/{users.schema-BGeyXreN.js → users.schema-B4fEuoKZ.js} +1 -1
- package/dist/interface/assets/vendor-cameraui-QuTJKoXE.js +2039 -0
- package/dist/interface/assets/vendor-core-CCcu_nmz.js +1 -0
- package/dist/interface/assets/{vendor-primevue-DB14kOh6.js → vendor-primevue-BdB7McKg.js} +84 -145
- package/dist/interface/assets/view-grid-BWJS0bBD.js +1 -0
- package/dist/interface/index.html +49 -48
- package/dist/interface/sw.js +1 -1
- package/dist/server/package.json +10 -10
- package/dist/server/requirements.txt +1 -1
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/__init__.py +2 -0
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/detection.py +3 -0
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/__init__.py +2 -0
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/base.py +10 -2
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/ptz.py +45 -2
- package/dist/server/src/api/controllers/instances.controller.d.ts +2 -2
- package/dist/server/src/api/controllers/instances.controller.js +7 -7
- package/dist/server/src/api/controllers/instances.controller.js.map +1 -1
- package/dist/server/src/api/controllers/plugins.controller.js +1 -1
- package/dist/server/src/api/controllers/plugins.controller.js.map +1 -1
- package/dist/server/src/api/database/backfill.d.ts +5 -0
- package/dist/server/src/api/database/backfill.js +89 -0
- package/dist/server/src/api/database/backfill.js.map +1 -0
- package/dist/server/src/api/database/index.d.ts +1 -0
- package/dist/server/src/api/database/index.js +29 -43
- package/dist/server/src/api/database/index.js.map +1 -1
- package/dist/server/src/api/database/record-schemas.d.ts +231 -0
- package/dist/server/src/api/database/record-schemas.js +194 -0
- package/dist/server/src/api/database/record-schemas.js.map +1 -0
- package/dist/server/src/api/database/types.d.ts +8 -0
- package/dist/server/src/api/routes/instances.routes.js +2 -1
- package/dist/server/src/api/routes/instances.routes.js.map +1 -1
- package/dist/server/src/api/schemas/cameras.schema.d.ts +265 -1
- package/dist/server/src/api/schemas/cameras.schema.js +10 -0
- package/dist/server/src/api/schemas/cameras.schema.js.map +1 -1
- package/dist/server/src/api/schemas/config.schema.d.ts +2 -0
- package/dist/server/src/api/schemas/config.schema.js +1 -0
- package/dist/server/src/api/schemas/config.schema.js.map +1 -1
- package/dist/server/src/api/schemas/instances.schema.d.ts +4 -0
- package/dist/server/src/api/schemas/instances.schema.js +5 -0
- package/dist/server/src/api/schemas/instances.schema.js.map +1 -1
- package/dist/server/src/api/schemas/remote.schema.d.ts +1 -1
- package/dist/server/src/api/services/backupScheduler.service.js +1 -1
- package/dist/server/src/api/services/backupScheduler.service.js.map +1 -1
- package/dist/server/src/api/services/cameras.service.d.ts +1 -0
- package/dist/server/src/api/services/cameras.service.js +18 -1
- package/dist/server/src/api/services/cameras.service.js.map +1 -1
- package/dist/server/src/api/services/instances.service.d.ts +12 -3
- package/dist/server/src/api/services/instances.service.js +123 -36
- package/dist/server/src/api/services/instances.service.js.map +1 -1
- package/dist/server/src/api/services/plugins.service.js +29 -6
- package/dist/server/src/api/services/plugins.service.js.map +1 -1
- package/dist/server/src/api/services/virtualsensors.service.js +2 -2
- package/dist/server/src/api/services/virtualsensors.service.js.map +1 -1
- package/dist/server/src/api/types/index.d.ts +4 -1
- package/dist/server/src/api/websocket/nsp/main.js +3 -0
- package/dist/server/src/api/websocket/nsp/main.js.map +1 -1
- package/dist/server/src/api/websocket/nsp/server.d.ts +1 -0
- package/dist/server/src/api/websocket/nsp/server.js +3 -1
- package/dist/server/src/api/websocket/nsp/server.js.map +1 -1
- package/dist/server/src/camera/controller.d.ts +2 -1
- package/dist/server/src/camera/controller.js +19 -16
- package/dist/server/src/camera/controller.js.map +1 -1
- package/dist/server/src/camera/decoder/audio-loop.d.ts +25 -0
- package/dist/server/src/camera/decoder/audio-loop.js +163 -0
- package/dist/server/src/camera/decoder/audio-loop.js.map +1 -0
- package/dist/server/src/camera/decoder/cascade-manager.js +1 -4
- package/dist/server/src/camera/decoder/cascade-manager.js.map +1 -1
- package/dist/server/src/camera/decoder/detection-coordinator.d.ts +37 -97
- package/dist/server/src/camera/decoder/detection-coordinator.js +492 -1369
- package/dist/server/src/camera/decoder/detection-coordinator.js.map +1 -1
- package/dist/server/src/camera/decoder/detection-pipeline.d.ts +4 -0
- package/dist/server/src/camera/decoder/detection-pipeline.js +14 -24
- package/dist/server/src/camera/decoder/detection-pipeline.js.map +1 -1
- package/dist/server/src/camera/decoder/dwell-manager.js +1 -1
- package/dist/server/src/camera/decoder/dwell-manager.js.map +1 -1
- package/dist/server/src/camera/decoder/event-manager.js +15 -28
- package/dist/server/src/camera/decoder/event-manager.js.map +1 -1
- package/dist/server/src/camera/decoder/event-thumbnailer.d.ts +38 -0
- package/dist/server/src/camera/decoder/event-thumbnailer.js +192 -0
- package/dist/server/src/camera/decoder/event-thumbnailer.js.map +1 -0
- package/dist/server/src/camera/decoder/plugin-registry.d.ts +31 -0
- package/dist/server/src/camera/decoder/plugin-registry.js +114 -0
- package/dist/server/src/camera/decoder/plugin-registry.js.map +1 -0
- package/dist/server/src/camera/decoder/{ptz-autotracker.d.ts → ptz/autotracker.d.ts} +19 -0
- package/dist/server/src/camera/decoder/ptz/autotracker.js +537 -0
- package/dist/server/src/camera/decoder/ptz/autotracker.js.map +1 -0
- package/dist/server/src/camera/decoder/reconnect-backoff.d.ts +6 -0
- package/dist/server/src/camera/decoder/reconnect-backoff.js +17 -0
- package/dist/server/src/camera/decoder/reconnect-backoff.js.map +1 -0
- package/dist/server/src/camera/decoder/secondary-stage.d.ts +37 -0
- package/dist/server/src/camera/decoder/secondary-stage.js +445 -0
- package/dist/server/src/camera/decoder/secondary-stage.js.map +1 -0
- package/dist/server/src/camera/decoder/{audio-source.js → sources/audio-source.js} +2 -2
- package/dist/server/src/camera/decoder/sources/audio-source.js.map +1 -0
- package/dist/server/src/camera/decoder/{frame-source.d.ts → sources/frame-source.d.ts} +4 -0
- package/dist/server/src/camera/decoder/{frame-source.js → sources/frame-source.js} +30 -12
- package/dist/server/src/camera/decoder/sources/frame-source.js.map +1 -0
- package/dist/server/src/camera/decoder/{snapshot-source.d.ts → sources/snapshot-source.d.ts} +2 -5
- package/dist/server/src/camera/decoder/{snapshot-source.js → sources/snapshot-source.js} +11 -15
- package/dist/server/src/camera/decoder/sources/snapshot-source.js.map +1 -0
- package/dist/server/src/camera/decoder/stationary-suppressor.d.ts +21 -0
- package/dist/server/src/camera/decoder/stationary-suppressor.js +141 -0
- package/dist/server/src/camera/decoder/stationary-suppressor.js.map +1 -0
- package/dist/server/src/camera/decoder/types.d.ts +6 -1
- package/dist/server/src/camera/decoder/types.js +1 -0
- package/dist/server/src/camera/decoder/types.js.map +1 -1
- package/dist/server/src/camera/decoder/worker.d.ts +1 -0
- package/dist/server/src/camera/decoder/worker.js +11 -7
- package/dist/server/src/camera/decoder/worker.js.map +1 -1
- package/dist/server/src/camera/index.d.ts +5 -1
- package/dist/server/src/camera/index.js.map +1 -1
- package/dist/server/src/camera/sensors/controller.js +4 -3
- package/dist/server/src/camera/sensors/controller.js.map +1 -1
- package/dist/server/src/go2rtc/api/routes/discover.js +2 -1
- package/dist/server/src/go2rtc/api/routes/discover.js.map +1 -1
- package/dist/server/src/go2rtc/api/routes/snapshot.d.ts +3 -3
- package/dist/server/src/go2rtc/api/routes/snapshot.js +1 -1
- package/dist/server/src/go2rtc/api/routes/snapshot.js.map +1 -1
- package/dist/server/src/go2rtc/types.d.ts +3 -0
- package/dist/server/src/go2rtc/types.js.map +1 -1
- package/dist/server/src/main.js +26 -3
- package/dist/server/src/main.js.map +1 -1
- package/dist/server/src/manager/downloadManager.js +0 -2
- package/dist/server/src/manager/downloadManager.js.map +1 -1
- package/dist/server/src/mqtt/bridge.js +1 -1
- package/dist/server/src/mqtt/bridge.js.map +1 -1
- package/dist/server/src/plugins/schema.js +1 -1
- package/dist/server/src/plugins/schema.js.map +1 -1
- package/dist/server/src/remote/services/cloudflare-managed.js +16 -5
- package/dist/server/src/remote/services/cloudflare-managed.js.map +1 -1
- package/dist/server/src/remote/services/cloudflare.d.ts +2 -2
- package/dist/server/src/remote/services/cloudflare.js +16 -17
- package/dist/server/src/remote/services/cloudflare.js.map +1 -1
- package/dist/server/src/remote/services/cloudflaredBinary.d.ts +2 -0
- package/dist/server/src/remote/services/cloudflaredBinary.js +20 -0
- package/dist/server/src/remote/services/cloudflaredBinary.js.map +1 -0
- package/dist/server/src/remote/services/index.d.ts +1 -0
- package/dist/server/src/remote/services/index.js +20 -5
- package/dist/server/src/remote/services/index.js.map +1 -1
- package/dist/server/src/remote/services/urlReadiness.d.ts +11 -0
- package/dist/server/src/remote/services/urlReadiness.js +129 -0
- package/dist/server/src/remote/services/urlReadiness.js.map +1 -0
- package/dist/server/src/rpc/interfaces/device.d.ts +6 -0
- package/dist/server/src/services/config/defaults.js +1 -0
- package/dist/server/src/services/config/defaults.js.map +1 -1
- package/dist/server/src/services/config/types.d.ts +1 -0
- package/dist/server/src/utils/npm/index.d.ts +11 -2
- package/dist/server/src/utils/npm/index.js +14 -4
- package/dist/server/src/utils/npm/index.js.map +1 -1
- package/dist/server/src/utils/pythonInstaller.js +3 -3
- package/dist/server/src/utils/pythonInstaller.js.map +1 -1
- package/dist/server/src/workers/capabilities/plugin-host.js +4 -1
- package/dist/server/src/workers/capabilities/plugin-host.js.map +1 -1
- package/package.json +10 -10
- package/dist/interface/assets/Automation-Kt6pl4MS.js +0 -2
- package/dist/interface/assets/AutomationImport-DWQkfeuR.js +0 -2
- package/dist/interface/assets/AutomationStore-FbQdggSq.js +0 -2
- package/dist/interface/assets/AutomationStoreDetail-D15G_MQy.js +0 -2
- package/dist/interface/assets/Automations-urwh-nzl.js +0 -2
- package/dist/interface/assets/Camera-Brp9vdg2.js +0 -2
- package/dist/interface/assets/Cameras-DDut77Xv.js +0 -652
- package/dist/interface/assets/Camview-ChimIRuL.js +0 -1
- package/dist/interface/assets/Config-Cy5j6yf_.js +0 -2
- package/dist/interface/assets/ConfigActionImageInput-DJovQd4V.js +0 -1
- package/dist/interface/assets/ConfigActionNotification-BM2X-K-D.js +0 -1
- package/dist/interface/assets/ConfigActionSensor-gxpOX2DC.js +0 -1
- package/dist/interface/assets/ConfigConditionSensorState-BaFj9WYl.js +0 -1
- package/dist/interface/assets/ConfigTriggerGeofence-DOxaQSWM.js +0 -1
- package/dist/interface/assets/ConfigTriggerWebhook-Czyo2Bs-.js +0 -1
- package/dist/interface/assets/Console-DBJHlPg2.js +0 -1
- package/dist/interface/assets/CuiBottomSheet-B1jcfI0o.js +0 -1
- package/dist/interface/assets/CuiCameraCard-HEi3Hoe-.js +0 -1
- package/dist/interface/assets/CuiCameraRecordings-C5bd4VAf.js +0 -1
- package/dist/interface/assets/CuiCameraShares-BNjnm9yr.js +0 -1
- package/dist/interface/assets/CuiCameraSnapshot-C-iPOB3g.js +0 -1
- package/dist/interface/assets/CuiCameraTable-CDpfm8fi.js +0 -2
- package/dist/interface/assets/CuiFloatingButton-DdI-E8dh.js +0 -1
- package/dist/interface/assets/CuiImage-Bxf7z2N4.css +0 -1
- package/dist/interface/assets/CuiImage-DBQAYfn1.js +0 -1
- package/dist/interface/assets/CuiMenu--tB8FqMF.js +0 -1
- package/dist/interface/assets/CuiPluginCard-Cb0XSLIr.js +0 -2
- package/dist/interface/assets/CuiPluginOAuthButton-CuppMPTq.js +0 -2
- package/dist/interface/assets/CuiPluginTrustBadge-Bcnptf84.js +0 -1
- package/dist/interface/assets/CuiRecordingsGrid-DlKUfbeS.js +0 -1
- package/dist/interface/assets/CuiSchema-B6q285jE.js +0 -1
- package/dist/interface/assets/Faces-DtJmIku2.js +0 -1
- package/dist/interface/assets/FirstSteps-CsMSK_YI.js +0 -1
- package/dist/interface/assets/Instances-BTNzUfGz.js +0 -1
- package/dist/interface/assets/Logs-Bic2YIta.js +0 -6
- package/dist/interface/assets/OAuthDeviceFlow-DwSJHrqc.js +0 -1
- package/dist/interface/assets/Plugin-B8656Gzo.js +0 -1
- package/dist/interface/assets/PluginDetail-BsIkPUY8.css +0 -1
- package/dist/interface/assets/PluginDetail-DS8wUbYr.js +0 -2
- package/dist/interface/assets/PluginSearch-DBdp5Ifo.js +0 -1
- package/dist/interface/assets/PluginSearch-DFtTwd_R.js +0 -2
- package/dist/interface/assets/Plugins-C_kdqAp4.js +0 -1
- package/dist/interface/assets/Recordings-Cz4uWsI9.js +0 -1
- package/dist/interface/assets/SettingsAccount-CALY2rH0.js +0 -1
- package/dist/interface/assets/SettingsAccount-_zSgGuBE.js +0 -1
- package/dist/interface/assets/SettingsAppearance-z9tBty3q.js +0 -1
- package/dist/interface/assets/SettingsBackup-JI_xqcVS.js +0 -1
- package/dist/interface/assets/SettingsMqtt-B_tzet_5.js +0 -1
- package/dist/interface/assets/SettingsNotifications-FWWveQMH.js +0 -2
- package/dist/interface/assets/SettingsRecordings-D-S7rofE.js +0 -1
- package/dist/interface/assets/SettingsRemote-CVuDUBMM.js +0 -1
- package/dist/interface/assets/SettingsRemote-T38YVHal.css +0 -1
- package/dist/interface/assets/SettingsSystem-J7ZT7oRr.js +0 -2
- package/dist/interface/assets/SettingsUsers-DvuiYjNg.js +0 -1
- package/dist/interface/assets/Terminal-CNzw8wk3.js +0 -4
- package/dist/interface/assets/VersionsHandler-CsXazSWK.js +0 -7
- package/dist/interface/assets/Workers-BXH8IccG.js +0 -2
- package/dist/interface/assets/api-C31uUd3g.css +0 -2
- package/dist/interface/assets/api-DR6W2XWy.js +0 -2
- package/dist/interface/assets/auth-BJf6VFls.js +0 -1
- package/dist/interface/assets/automations-Dt5J3kkY.js +0 -1
- package/dist/interface/assets/cloudHandoff-Yc4FJv_l.js +0 -1
- package/dist/interface/assets/instances-MscZjRfc.js +0 -1
- package/dist/interface/assets/main-4pJkMgxg.js +0 -3
- package/dist/interface/assets/nodeDefinitions-5BjF3SJ8.js +0 -1
- package/dist/interface/assets/plugins-VeCjoaEi.js +0 -1
- package/dist/interface/assets/round-restart-alt-CcJGggln.js +0 -1
- package/dist/interface/assets/router-BFG1ClJo.js +0 -2
- package/dist/interface/assets/shares-D5xo0sht.js +0 -1
- package/dist/interface/assets/transit-connection-variant-CXkATe8I.js +0 -1
- package/dist/interface/assets/types-Dyn_Sb2s.js +0 -1
- package/dist/interface/assets/useBackupRestore-B-yCV4DL.js +0 -1
- package/dist/interface/assets/useCameraOptions-B2lIc9JO.js +0 -1
- package/dist/interface/assets/useCuiDialog-DLoFzodG.js +0 -2
- package/dist/interface/assets/useLogsSocket-4F2-d9fa.css +0 -1
- package/dist/interface/assets/useLogsSocket-B1sCzRXK.js +0 -5
- package/dist/interface/assets/vendor-cameraui-DDdtrYBn.js +0 -1978
- package/dist/interface/assets/vendor-core-CZuWsjWr.js +0 -1
- package/dist/interface/assets/view-grid-DRwNJzxD.js +0 -1
- package/dist/server/src/camera/decoder/audio-source.js.map +0 -1
- package/dist/server/src/camera/decoder/frame-source.js.map +0 -1
- package/dist/server/src/camera/decoder/ptz-autotracker.js +0 -342
- package/dist/server/src/camera/decoder/ptz-autotracker.js.map +0 -1
- package/dist/server/src/camera/decoder/snapshot-source.js.map +0 -1
- /package/dist/server/src/camera/decoder/{audio-source.d.ts → sources/audio-source.d.ts} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/cloudHandoff-LxdvSi1a.js","assets/api-Cea16mc8.js","assets/rolldown-runtime-DAXXjFlN.js","assets/vendor-cameraui-QuTJKoXE.js","assets/vendor-ClrOISZp.js","assets/vendor-zod-XsuaxHRY.js","assets/vendor-core-CCcu_nmz.js","assets/vendor-primevue-BdB7McKg.js","assets/api-GMfqGYqQ.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{$ as t,$t as n,Ai as r,Ar as i,At as a,B as o,Bi as s,Bt as c,C as l,Dt as u,Ft as d,G as f,H as p,Ht as m,It as h,J as g,K as _,Kt as v,L as y,Li as b,Lt as x,O as ee,Ot as S,Q as te,R as ne,Ri as C,Rt as w,T as re,Ti as T,U as ie,Ut as ae,V as oe,Vt as E,W as se,Wt as ce,X as le,Xt as ue,Y as de,Yt as D,Z as O,Zt as k,_n as fe,an as pe,at as me,bn as A,da as he,dn as ge,et as j,fa as _e,fi as ve,in as ye,it as be,ji as xe,jt as Se,kt as Ce,la as we,nn as Te,nt as Ee,oi as De,pa as Oe,pn as ke,q as Ae,qt as je,rn as Me,sn as Ne,tt as Pe,vn as Fe,vt as Ie,w as Le,wi as Re,x as ze,yt as Be,z as Ve,zi as He}from"./vendor-cameraui-QuTJKoXE.js";import{$ as Ue,C as We,Ct as Ge,D as Ke,E as qe,Mt as Je,O as Ye,Pt as Xe,Q as Ze,T as Qe,Tt as $e,X as et,Z as tt,_ as nt,d as rt,et as it,f as at,g as ot,h as st,i as ct,jt as lt,kt as ut,n as dt,nt as ft,o as pt,q as mt,r as ht,t as gt,u as _t}from"./api-Cea16mc8.js";import{$ as vt,$n as M,$t as N,An as yt,Cr as P,En as bt,Er as F,F as I,G as xt,Gn as St,I as Ct,J as wt,Ln as Tt,Nn as Et,On as Dt,P as L,Pn as Ot,Q as kt,Rn as At,Sr as R,Tr as z,Un as jt,Vn as B,W as Mt,Wt as Nt,Yn as Pt,Z as Ft,Zn as It,_r as Lt,an as Rt,ar as zt,br as Bt,cn as Vt,dn as V,fn as H,fr as Ht,jn as Ut,kn as Wt,lr as Gt,mn as U,mr as W,nr as G,on as K,pn as q,rn as Kt,rr as qt,tn as Jt,un as J,ur as Y,v as Yt,vn as X,xn as Z,y as Xt,yn as Q,zn as $}from"./vendor-ClrOISZp.js";import{c as Zt,f as Qt,l as $t,n as en,t as tn,u as nn}from"./vendor-core-CCcu_nmz.js";import{B as rn,C as an,E as on,F as sn,G as cn,H as ln,I as un,L as dn,N as fn,O as pn,P as mn,R as hn,T as gn,V as _n,W as vn,_ as yn,a as bn,d as xn,f as Sn,g as Cn,h as wn,l as Tn,n as En,p as Dn,r as On,t as kn,v as An,w as jn,y as Mn,z as Nn}from"./vendor-primevue-BdB7McKg.js";import{F as Pn,I as Fn,R as In,_ as Ln,a as Rn,b as zn,c as Bn,d as Vn,f as Hn,g as Un,h as Wn,i as Gn,l as Kn,m as qn,o as Jn,p as Yn,r as Xn,s as Zn,t as Qn,u as $n,v as er,y as tr}from"./CuiCameraCard-GH-DR5_s.js";import{t as nr}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as rr,t as ir}from"./useBackupRestore-ootsFhdF.js";import{n as ar,t as or}from"./useServerRestart-PZhND5H_.js";import{n as sr,o as cr,r as lr,s as ur,t as dr}from"./useSharedComposables-USqd05AG.js";import{n as fr,t as pr}from"./ui-g5rCwxUE.js";import{a as mr,i as hr,n as gr,o as _r,r as vr,t as yr}from"./router-DkMUvvnP.js";import{t as br}from"./cloud-outline-BooRVJGO.js";import{t as xr}from"./close-BTPBtoEq.js";import{t as Sr}from"./chevron-down-Bu7d-Y9N.js";import{t as Cr}from"./power-CH_DVgfm.js";import{t as wr}from"./CuiAvatar-BUwQnIaI.js";import{t as Tr}from"./api-BhOwzvxK.js";import{t as Er}from"./instances-CRYtaTQS.js";import{t as Dr}from"./cctv-DbFrrwEm.js";import{t as Or}from"./cog-BOiZ8Brk.js";import{t as kr}from"./face-recognition-CPwwcApe.js";import{t as Ar}from"./puzzle-filled-BsJvAZrD.js";import{t as jr}from"./CuiCameraSnapshot-Dn1QSGrr.js";import{t as Mr}from"./check-COWE52r_.js";import{t as Nr}from"./hasPermission-CgyWyOhQ.js";import{n as Pr,t as Fr}from"./CuiMenu-DtnIPhcr.js";import{t as Ir}from"./shield-check-0hUJRszq.js";import{t as Lr}from"./motion-sensor-D9ErhY-p.js";import{t as Rr}from"./lightbulb-outline-DPjpJn5F.js";import{t as zr}from"./vendor-draggabilly-CPB8E5_r.js";import{c as Br,t as Vr}from"./cameras-DyF2T0be.js";import{t as Hr}from"./CuiActionButton-WFz5I80P.js";import{t as Ur}from"./copy-16-filled-DfOe7jyi.js";import{n as Wr,t as Gr}from"./useCuiCameraDrawer-BHUHw6W6.js";import{t as Kr}from"./useCuiDialog-yVh5UWKF.js";import{n as qr}from"./CuiTopbarSlot-B6UMqYZl.js";import{t as Jr}from"./theme-DqbhRu7y.js";import{t as Yr}from"./trash2-tuK9V5bO.js";import{t as Xr}from"./notifications-sejZCb0L.js";import{n as Zr,t as Qr}from"./microphone-DJsihw9n.js";import{a as $r,i as ei,r as ti,t as ni}from"./CuiSchema-CH0GXMWV.js";import{t as ri}from"./plugins-CCLFcD4c.js";import{t as ii}from"./PluginSchema-TtBJPR_R.js";import{t as ai}from"./information-outline-BaVRQ1WL.js";import{t as oi}from"./trash-can-outline-gVM4WyHG.js";import{t as si}from"./plus-CJzoaVfR.js";import{a as ci,i as li,n as ui,t as di}from"./cameras.schema-DBzgU4m6.js";import{t as fi}from"./cctv-BZIDJlxZ.js";import{t as pi}from"./delete-BEupTYe7.js";import{t as mi}from"./useStreamStatus-nCx5ux1-.js";import{t as hi}from"./bell-ring-DgLkBDcU.js";import{t as gi}from"./home-DTNk2yog.js";import{t as _i}from"./CuiDataTable-CjXiUFiJ.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)}})(),we(localStorage),Oe(),typeof window<`u`&&window.addEventListener(`pagehide`,he);async function vi(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:window.location.origin,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 yi(e){vt.setEventListener(t=>M(()=>e.phase.value.kind===`online`,e=>t(e),{immediate:!0}))}var bi={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function xi(e,t){return $(),U(`svg`,bi,[...t[0]||=[V(`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 Si=Y({name:`mdi-fingerprint`,render:xi}),Ci=`cameraui:unlocked`;function wi(){try{sessionStorage.setItem(Ci,`1`)}catch{}}var Ti=W(!1),Ei=W(!1);function Di(){return{isLocked:Ti,isAvailable:Ei,unlock:Oi,init:ki}}async function Oi(){return Ti.value=!1,wi(),!0}async function ki(){}var Ai={key:0,class:`app-lock-overlay`},ji={class:`flex flex-col items-center gap-6 p-8`},Mi={class:`text-center`},Ni={class:`text-lg font-semibold`},Pi={class:`text-sm text-muted mt-2`},Fi=nr(Z({__name:`CuiAppLockOverlay`,setup(e){let{isLocked:t,unlock:n}=Di(),r=W(!1);async function i(){r.value=!0;try{await n()}finally{r.value=!1}}return M(t,async e=>{e&&(await Ut(),await i())},{immediate:!0}),(e,n)=>{let a=In,o=Si,s=Fe;return R(t)?($(),U(`div`,Ai,[V(`div`,ji,[Q(a,{class:`w-16 h-16 text-muted`}),V(`div`,Mi,[V(`h2`,Ni,F(e.$t(`views.app_lock.title`)),1),V(`p`,Pi,F(e.$t(`views.app_lock.subtitle`)),1)]),Q(s,{label:e.$t(`views.app_lock.unlock`),loading:R(r),fluid:``,class:`cui-button-medium`,onClick:i},{icon:G(()=>[Q(o,{class:`mr-2`})]),_:1},8,[`label`,`loading`])])])):q(``,!0)}}}),[[`__scopeId`,`data-v-baef4383`]]),Ii={key:0,class:`cui-restore-overlay`},Li={class:`cui-restore-overlay__card shadow-xl`},Ri={class:`text-lg font-semibold`},zi={class:`text-sm text-muted`},Bi={class:`text-xs text-muted`},Vi=nr(Z({__name:`CuiRestoreOverlay`,setup(e){let{t}=i(),{active:n,phase:r,uploadPercent:a}=rr(),o=J(()=>{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 i=vn;return $(),H(N,{name:`fade`},{default:G(()=>[R(n)?($(),U(`div`,Ii,[V(`div`,Li,[Q(R(xt),{src:R(_t)(`logo_animated.svg`),width:`52px`,height:`58px`,title:`camera.ui`,"aria-label":`camera.ui`},null,8,[`src`]),V(`span`,Ri,F(e.$t(`restore.title`)),1),V(`span`,zi,F(R(o)),1),R(r)===`uploading`?($(),H(i,{key:0,value:R(a),class:`w-full`},null,8,[`value`])):($(),H(i,{key:1,mode:`indeterminate`,class:`w-full`,style:{height:`6px`}})),V(`span`,Bi,F(e.$t(`restore.dont_close`)),1)])])):q(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-0c1a6c8d`]]),Hi={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ui(e,t){return $(),U(`svg`,Hi,[...t[0]||=[V(`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 Wi=Y({name:`iconoir-download`,render:Ui}),Gi={class:`cui-update-indicator__content`},Ki={class:`cui-update-indicator__text`},qi=nr(Z({__name:`CuiUpdateIndicator`,setup(e){let{t}=i(),{bottombarHeight:n}=sr(),{updateAvailable:r,isApplying:a,applyUpdate:o}=_r(),{isLoggedIn:s}=Qt(st()),c=Ge(),l=J(()=>s.value&&r.value&&c.bannerMode.value===null),u=J(()=>`calc(${n.value}px + 1rem + env(safe-area-inset-bottom, 0px))`);function d(){o()}return(e,n)=>{let r=fe,i=Wi,o=Fe;return $(),H(N,{name:`fade`},{default:G(()=>[R(l)?($(),U(`div`,{key:0,class:`cui-update-indicator shadow-xl`,style:z({bottom:R(u)})},[V(`div`,Gi,[R(a)?($(),H(r,{key:0,class:`cui-update-indicator__spinner`,"stroke-width":`5`})):($(),H(i,{key:1,class:`cui-update-indicator__icon`})),V(`span`,Ki,F(R(a)?R(t)(`components.toast.update_applying`):R(t)(`components.toast.update_available_title`)),1),R(a)?q(``,!0):($(),H(o,{key:2,size:`small`,class:`cui-update-indicator__button`,label:R(t)(`components.toast.update_now`),onClick:d},null,8,[`label`]))])],4)):q(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-8ce1000d`]]),Ji={class:`cui-connection-indicator__content`},Yi={class:`cui-connection-indicator__text`},Xi=nr(Z({__name:`CuiConnectionIndicator`,setup(e){let{t}=i(),{bottombarHeight:n}=sr(),{bannerMode:r,inTrouble:a}=Ge(),{restarting:o}=ar(),s=ht(),{isLoggedIn:c}=Qt(st()),l=J(()=>`calc(${n.value}px + 1rem + env(safe-area-inset-bottom, 0px))`),u=J(()=>c.value&&(r.value!==null||o.value)),d=J(()=>r.value===`connecting`?t(`connection.connecting_remote`):r.value===null?t(`connection.restarting`):t(`connection.reconnecting`)),f=J(()=>a.value&&s===`cloud`);async function p(){let{bounceToCloudFrontend:e}=await Nt(async()=>{let{bounceToCloudFrontend:e}=await import(`./cloudHandoff-LxdvSi1a.js`);return{bounceToCloudFrontend:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8]));await e()}return(e,n)=>{let r=fe,i=br,a=Fe;return $(),H(N,{name:`fade`},{default:G(()=>[R(u)?($(),U(`div`,{key:0,class:`cui-connection-indicator shadow-xl`,style:z({bottom:R(l)})},[V(`div`,Ji,[Q(r,{class:`!w-5 !h-5 shrink-0`,"stroke-width":`5`}),V(`span`,Yi,F(R(d)),1),R(f)?($(),H(a,{key:0,size:`small`,rounded:``,class:`cui-connection-indicator__button`,"aria-label":R(t)(`connection.pick_server`),onClick:p},{default:G(()=>[Q(i,{class:`w-4 h-4`})]),_:1},8,[`aria-label`])):q(``,!0)])],4)):q(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-7f082560`]]),Zi={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Qi(e,t){return $(),U(`svg`,Zi,[...t[0]||=[V(`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 $i=Y({name:`mdi-unfold-less-vertical`,render:Qi}),ea={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ta(e,t){return $(),U(`svg`,ea,[...t[0]||=[V(`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 na=Y({name:`mdi-unfold-more-horizontal`,render:ta}),ra={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ia(e,t){return $(),U(`svg`,ra,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M19 13H5v-2h14z`},null,-1)]])}var aa=Y({name:`mdi-minus`,render:ia}),oa={class:`fixed flex flex-row items-center z-[99999] top-0 left-[7px] gap-2 p-2 pl-[0.4rem]! non-draggable-region`},sa=nr(Z({__name:`CuiWindowButtons`,setup(e){let{electron:t}=nt(),n=W(!1),r=W(!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 Tt(()=>{t?.on(`fullscreen`,s)}),Ot(()=>{t?.removeListener(`fullscreen`,s)}),(e,t)=>{let s=xr,c=aa,l=na,u=$i;return qt(($(),U(`div`,oa,[V(`div`,{class:`close-button`,onClick:a},[Q(s,{color:`#7f050a`,width:`100%`,height:`100%`,class:P([`transition-opacity opacity-0`,{"opacity-100":R(n)}])},null,8,[`class`])]),V(`div`,{class:P({"disabled-button":R(r),"minify-button":!R(r)}),onClick:i},[R(r)?q(``,!0):($(),H(c,{key:0,color:`#995712`,width:`100%`,height:`100%`,class:P([`transition-opacity opacity-0`,{"opacity-100":R(n)}])},null,8,[`class`]))],2),V(`div`,{class:`expand-button`,style:z(`${R(r)?`transform: rotate(45deg)`:`transform: rotate(-45deg)`}`),onClick:o},[R(r)?($(),H(u,{key:1,color:`#0d650d`,width:`100%`,height:`100%`,class:P([`transition-opacity opacity-0`,{"opacity-100":R(n)}])},null,8,[`class`])):($(),H(l,{key:0,color:`#0d650d`,width:`100%`,height:`100%`,class:P([`transition-opacity opacity-0`,{"opacity-100":R(n)}])},null,8,[`class`]))],4)])),[[R(tn),e=>n.value=e]])}}}),[[`__scopeId`,`data-v-d1e31a06`]]),ca={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function la(e,t){return $(),U(`svg`,ca,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z`},null,-1)]])}var ua=Y({name:`mdi-chevron-up`,render:la}),da={key:0,class:`shrink-0 relative left-[-9px]`},fa={key:1,class:`shrink-0`},pa={key:2,class:`shrink-0`},ma={key:0,class:`overflow-hidden flex-1 ml-10`},ha={class:`flex flex-row items-center justify-between`},ga={class:`text-start flex-1`},_a={key:0,class:`text-xs text-muted`},va=nr(Z({__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=Zt(),r=st(),{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:_,showTooltip:v,fallbackActivePath:y,activeColor:b,activeIconColor:x,bottomBar:ee}=Bt(t),S=J(()=>n.path===m.value||m.value!==`/`&&(n.path.startsWith(m.value+`/`)||n.path.startsWith((y.value??m.value)+`/`)));function te(){r.logout()}return(e,t)=>{let n=wr,r=Cr,y=Fe,ne=jt(`RouterLink`),C=ke;return $(),H(ne,{to:R(m)},{default:G(({isActive:e})=>[qt(($(),H(y,yt({text:``,severity:`secondary`,class:[`cui-button navitem-button w-full h-full flex items-center relative`,{"dark-mode":R(g),"!text-white navitem-active":(e||R(S))&&!R(l),"hover:!text-color active:!text-color focus:!text-color":!e&&!R(S),"navitem-inactive":!e&&!R(S)}],style:R(b)&&(e||R(S))?{"--navitem-active-color":R(b)}:void 0,fluid:``},R(_)),{default:G(()=>[V(`div`,{class:P([`flex items-center justify-center h-full`,{"absolute left-[14px]":!R(ee)}])},[R(l)?($(),U(`div`,da,[Q(n,{src:R(l),size:R(c),style:z({width:`${R(c)}px`,height:`${R(c)}px`})},null,8,[`src`,`size`,`style`])])):R(i)&&!e&&!R(S)||!R(s)?($(),U(`div`,fa,[Q(R(i),{class:P(R(o)),style:z({width:`${R(a)}px`,height:`${R(a)}px`,color:(e||R(S))&&R(x)?R(x):void 0})},null,8,[`class`,`style`])])):R(s)&&(e||R(S))?($(),U(`div`,pa,[Q(R(s),{style:z({width:`${R(a)}px`,height:`${R(a)}px`,color:R(x)})},null,8,[`style`])])):q(``,!0)],2),Q(N,{name:`fade`},{default:G(()=>[R(p)?($(),U(`div`,ma,[V(`div`,ha,[V(`div`,ga,[V(`div`,{class:P([`text-sm max-w-100 truncate font-semibold`,[R(u),{"text-color font-bold":R(l)}]])},F(R(d)),3),R(f)?($(),U(`div`,_a,F(R(f)),1)):q(``,!0)]),R(h)?($(),H(y,{key:0,text:``,rounded:``,class:`dark-mode cui-icon-md`,onClick:Rt(te,[`stop`,`prevent`])},{icon:G(()=>[Q(r,{width:`100%`,height:`100%`})]),_:1})):q(``,!0)])])):q(``,!0)]),_:1})]),_:2},1040,[`class`,`style`])),[[C,{value:R(v)&&!R(p)?R(d):``,pt:{root:{class:`dark-mode`}}}]])]),_:1},8,[`to`])}}}),[[`__scopeId`,`data-v-9e0c467b`]]),{isElectronApp:ya}=nt(),ba=ya?25:0,xa={CLOSED:0,MINIFIED:60,EXPANDED:288},Sa=Ht({serverUpdateAvailable:!1,pluginUpdateAvailable:!1,serverUpdate:null,pluginUpdates:[]}),Ca=null,wa=null;async function Ta(){if(wa?.ready.value)try{let e=await wa.request(`get-updates`);Sa.pluginUpdates=e.plugins,Sa.pluginUpdateAvailable=e.plugins.length>0,Sa.serverUpdate=e.server,Sa.serverUpdateAvailable=e.server.updateAvailable||e.server.betaUpdateAvailable||!1}catch{}}function Ea(){return wa||(Ca=zt(!0),Ca.run(()=>{let e=We(`/server`);wa=e,e.on(`plugin-updates`,e=>{Sa.pluginUpdates=e,Sa.pluginUpdateAvailable=e.length>0}),e.on(`server-updates`,e=>{Sa.serverUpdate=e,Sa.serverUpdateAvailable=e.updateAvailable||e.betaUpdateAvailable||!1}),e.onReady(()=>{Ta()})}),wa)}function Da(){function e(){Ea()}function t(){}return{isConnected:J(()=>wa?.connected.value??!1),serverUpdateAvailable:J(()=>Sa.serverUpdateAvailable),pluginUpdateAvailable:J(()=>Sa.pluginUpdateAvailable),serverUpdate:J(()=>Sa.serverUpdate),pluginUpdates:J(()=>Sa.pluginUpdates),connect:e,disconnect:t,fetchUpdates:Ta}}var Oa={class:`h-full flex flex-col overflow-y-scroll`},ka={class:`w-full flex items-center shrink-0 h-[60px]`},Aa={class:`overflow-hidden w-full pr-4`},ja={key:0,class:`ml-2 w-full flex flex-row items-center`},Ma={class:`flex flex-col flex-1 my-4 px-1`},Na={class:`flex flex-col space-y-1`},Pa={class:`flex flex-col space-y-1`},Fa={class:`w-full h-[50px]`},Ia={class:`flex items-center justify-center h-full absolute left-[14px]`},La={key:0,class:`flex flex-col space-y-1 overflow-hidden`},Ra={class:`w-full h-[50px] relative`},za=nr(Z({__name:`CuiNavbar`,setup(e,{expose:t}){let n=$t(),{bus:r}=cr(),{mdBreakpoint:i,xlBreakpoint:a}=dr(),{navbarState:o}=sr(),{isElectronApp:s,electron:c}=nt(),{user:l}=Qt(st()),{uiSettings:u}=Qt(fr()),d=Da(),{data:f}=new Tr().apiInfoQuery(),p=It(`navbarRef`),m=W(`closed`),h=W(!1),g=W(!1),_=W(!1),v=J(()=>f.value?.electron??!1),y=J(()=>s&&v.value),b=J(()=>{let e=u.value.interface.selectedSettingsView;return pr.includes(e)?e:`account`}),x=e=>v.value&&!!e.meta?.disabledInElectron,ee=J(()=>gr.filter(e=>e.meta?.navbar?.position===`top`&&e.meta&&Nr(e)&&!x(e))),S=J(()=>gr.filter(e=>e.meta?.navbar?.position===`bottom`&&Nr(e)&&!x(e))),te=J(()=>S.value.filter(e=>!e.meta?.navbar?.group)),ne=J(()=>S.value.filter(e=>e.meta?.navbar?.group===`more`)),w=J(()=>ne.value.some(e=>n.currentRoute.value.path===e.path||n.currentRoute.value.path.startsWith(e.path+`/`))),re=J(()=>u.value.interface.navbarStayCollapsed&&m.value!==`opened`?`closed`:a.value?`opened`:m.value),ie=J(()=>re.value===`closed`?i.value?xa.CLOSED:xa.MINIFIED:xa.EXPANDED);function ae(){_.value=!_.value,_.value?setTimeout(()=>{let e=p.value?.firstElementChild;e&&e.scrollTo({top:e.scrollHeight,behavior:`smooth`})},250):setTimeout(()=>ce(),250)}function oe(){r.emit({navbarState:`closed`})}function E(e,t){y.value&&t.channel===`update-check`&&t.status===`available`&&(h.value=!0)}async function se(){if(y.value){c.removeListener(`app-status`,E),c.on(`app-status`,E),c.send(`check-for-updates`);try{let e=await c.invoke(`get-update-available`);h.value=e.isUpdateAvailable}catch{}}}function ce(){Ut(()=>{let e=p.value?.querySelector(`.navitem-active`);e&&e.scrollIntoView({block:`center`,behavior:`smooth`})})}let le=C(ce,100);return De(p,e=>{if(re.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&&oe()}),T(p,()=>{le()}),M(w,e=>{e&&(_.value=!0)},{immediate:!0}),M(d.serverUpdateAvailable,e=>{y.value||(h.value=e)},{immediate:!0}),M(y,e=>{e&&se()},{immediate:!0}),M(d.pluginUpdateAvailable,e=>{g.value=e}),M(o,e=>{e&&e!==m.value&&(m.value=e===`minified`||e===`closed`?`closed`:`opened`)}),M(n.currentRoute,(e,t)=>{e.path!==t.path&&oe()}),M(l,()=>{l.value?.role===`admin`||l.value?.role===`master`?d.connect():d.disconnect()},{deep:!0,immediate:!0}),Tt(()=>{ce()}),At(()=>{c?.removeListener(`app-status`,E)}),t({navbarState:re}),(e,t)=>{let n=jt(`RouterLink`),r=A,a=va,o=Sr,s=ua,c=Fe;return $(),U(`nav`,{ref_key:`navbarRef`,ref:p,class:P([`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":R(i)&&R(ie)===R(xa).EXPANDED}]),style:z({top:`calc(max(8px, env(safe-area-inset-top, 0px)) + ${R(ba)}px)`,left:R(ie)===R(xa).CLOSED?`-2px`:`max(8px, env(safe-area-inset-left, 0px))`,width:`${R(ie)}px`,height:`calc(100dvh - max(8px, env(safe-area-inset-top, 0px)) - max(8px, env(safe-area-inset-bottom, 0px)) - ${R(ba)}px)`,viewTransitionName:`cui-navbar`})},[V(`div`,Oa,[V(`div`,ka,[Q(n,{to:`/home`,class:`pl-[13px]`},{default:G(()=>[Q(R(xt),{src:R(_t)(`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}),V(`div`,Aa,[Q(N,{name:`fade`},{default:G(()=>[R(ie)===R(xa).EXPANDED?($(),U(`div`,ja,[Q(n,{to:`/home`,class:`text-white font-bold text-lg text-shadow`},{default:G(()=>[...t[0]||=[X(`camera.ui`,-1)]]),_:1})])):q(``,!0)]),_:1})])]),V(`div`,Ma,[V(`div`,Na,[($(!0),U(K,null,B(R(ee),t=>($(),U(`div`,{key:t.name,class:`w-full h-[50px] relative`},[R(g)&&t.name===`Plugins`?($(),H(r,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):q(``,!0),Q(a,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:R(ie)===R(xa).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:P([`w-[50px] h-[50px]`,{"w-full":R(ie)===R(xa).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`label`,`expanded`,`class`])]))),128))]),t[2]||=V(`div`,{class:`flex-1 mt-10`},null,-1),V(`div`,Pa,[R(ne).length?($(),U(K,{key:0},[V(`div`,Fa,[Q(c,{text:``,severity:`secondary`,class:P([`cui-button navitem-button w-full h-full flex items-center justify-center dark-mode`,{"!text-white navitem-active":R(_)||R(w),"hover:!text-color active:!text-color focus:!text-color navitem-inactive":!R(_)&&!R(w)}]),style:{color:`#a4a4a4`},onClick:ae},{default:G(()=>[V(`div`,Ia,[R(_)?($(),H(o,{key:0,class:`w-[22px] h-[22px]`})):($(),H(s,{key:1,class:`w-[22px] h-[22px]`}))])]),_:1},8,[`class`])]),Q(N,{name:`navbar-group`},{default:G(()=>[R(_)?($(),U(`div`,La,[($(!0),U(K,null,B(R(ne),t=>($(),U(`div`,{key:t.name,class:`w-full h-[50px] relative`},[Q(a,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:R(ie)===R(xa).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:P([`w-[50px] h-[50px]`,{"w-full":R(ie)===R(xa).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`label`,`expanded`,`class`])]))),128))])):q(``,!0)]),_:1})],64)):q(``,!0),($(!0),U(K,null,B(R(te),t=>($(),U(`div`,{key:t.name,class:`w-full h-[50px] relative`},[R(h)&&t.name===`Settings`?($(),H(r,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):q(``,!0),Q(a,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path===`/settings`?`/settings/${R(b)}`:t.path,"fallback-active-path":t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:R(ie)===R(xa).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:P([`w-[50px] h-[50px]`,{"w-full":R(ie)===R(xa).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`fallback-active-path`,`label`,`expanded`,`class`])]))),128)),t[1]||=V(`div`,{class:`mb-4 mt-2`,style:{borderTop:`1px solid #313131`}},null,-1),V(`div`,Ra,[Q(a,{avatar:`avatar`,label:R(l)?.username??`unknown`,description:R(l)?.role??`unknown`,expanded:R(ie)===R(xa).EXPANDED,"show-logout":``,to:`/settings/account`,"dark-mode":``,"avatar-size":38,class:P([`w-[50px] h-[50px]`,{"w-full":R(ie)===R(xa).EXPANDED}])},null,8,[`label`,`description`,`expanded`,`class`])])])])])],6)}}}),[[`__scopeId`,`data-v-ea8e8020`]]),Ba={class:`px-2 h-full flex items-center justify-around`,style:{paddingBottom:`calc(max(8px, env(safe-area-inset-bottom, 0px)))`}},Va=nr(Z({__name:`CuiBottombar`,setup(e,{expose:t}){let{bottombarHeight:n}=sr(),r=It(`bottombarRef`),i=J(()=>gr.filter(e=>e.meta?.bottombar&&e.meta.auth&&Nr(e)));return t({bottombarRef:r}),(e,t)=>{let a=va;return $(),U(`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:z({height:`calc(${R(n)}px + env(safe-area-inset-bottom, 0px))`,viewTransitionName:`cui-bottombar`})},[V(`div`,Ba,[($(!0),U(K,null,B(R(i),e=>($(),H(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`]]),Ha={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ua(e,t){return $(),U(`svg`,Ha,[...t[0]||=[V(`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 Wa=Y({name:`material-symbols-light-mode-rounded`,render:Ua}),Ga={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ka(e,t){return $(),U(`svg`,Ga,[...t[0]||=[V(`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 qa=Y({name:`material-symbols-dark-mode`,render:Ka}),Ja={viewBox:`0 0 48 48`,width:`1.2em`,height:`1.2em`},Ya=[`id`],Xa=[`mask`];function Za(e,t){return $(),U(`svg`,Ja,[V(`defs`,null,[V(`mask`,{id:e.idMap.SVGh8KaKdEb},[...t[0]||=[V(`g`,{fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`4`},[V(`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`}),V(`path`,{fill:`#000`,stroke:`#000`,d:`M27 17c0 8-5 9-10 9c0 4 6.5 8 12 4s2-13-2-13`})],-1)]],8,Ya)]),V(`path`,{fill:`currentColor`,d:`M0 0h48v48H0z`,mask:`url(#`+e.idMap.SVGh8KaKdEb+`)`},null,8,Xa)])}var Qa=Y({name:`icon-park-solid-dark-mode`,render:Za,setup(){return{idMap:{SVGh8KaKdEb:`uicons-`+Math.random().toString(36).substr(2,10)}}}}),$a=Z({__name:`CuiThemeSwitch`,setup(e){let t=Jr(),{theme:n,autoMode:r}=Qt(t);function i(){t.toggleTheme()}return(e,t)=>{let a=Qa,o=qa,s=Wa,c=Fe;return $(),H(c,{severity:`secondary`,text:``,class:`cui-button p-2 text-color`,onClick:i},{default:G(()=>[R(r)?($(),H(a,{key:0,class:`w-6 h-6`})):R(n)===`dark`?($(),H(o,{key:1,class:`w-6 h-6`})):R(n)===`light`?($(),H(s,{key:2,class:`w-6 h-6`})):q(``,!0)]),_:1})}}}),eo={class:`relative flex overflow-hidden items-center justify-center w-5 h-5`},to={class:`flex flex-col justify-between w-4 h-3 transform transition-all duration-100 origin-center overflow-hidden`},no=Z({__name:`CuiNavbarToggle`,setup(e){let{bus:t}=cr(),{navbarState:n}=sr(),{xlBreakpoint:r}=dr(),{uiSettings:i}=Qt(fr()),a=W(`closed`),o=J(()=>a.value===`opened`);function s(){t.emit({navbarState:a.value===`opened`?`closed`:`opened`})}return M(n,e=>{e&&e!==a.value&&(a.value=e===`minified`||e===`closed`?`closed`:`opened`)}),(e,t)=>{let n=Fe;return!R(r)||R(i).interface.navbarStayCollapsed?($(),H(n,{key:0,id:`menu-icon`,class:`cui-button relative group p-2 transition-colors duration-100`,severity:`secondary`,text:``,onClick:s},{default:G(()=>[V(`div`,eo,[V(`div`,to,[V(`div`,{class:P([`h-0.5 w-2 transform transition-all duration-100 origin-center`,{"w-4 rotate-45 translate-y-[5px]":R(o)}]),style:{backgroundColor:`var(--text-color)`}},null,2),V(`div`,{class:P([`h-0.5 w-4 rounded transform transition-all duration-100`,{"opacity-0":R(o)}]),style:{backgroundColor:`var(--text-color)`}},null,2),V(`div`,{class:P([`h-0.5 w-3 transform transition-all duration-100 origin-center`,{"w-4 -rotate-45 -translate-y-[5px]":R(o)}]),style:{backgroundColor:`var(--text-color)`}},null,2)])])]),_:1})):q(``,!0)}}}),ro={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function io(e,t){return $(),U(`svg`,ro,[...t[0]||=[V(`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 ao=Y({name:`mdi-check-all`,render:io}),oo={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function so(e,t){return $(),U(`svg`,oo,[...t[0]||=[V(`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 co=Y({name:`mdi-bell-off-outline`,render:so}),lo={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function uo(e,t){return $(),U(`svg`,lo,[...t[0]||=[V(`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 fo=Y({name:`solar-bell-bold`,render:uo}),po=`/pwa/favicon-64.ico`,mo=64,ho=`#ea5455`,go=14,_o=null,vo=null,yo=null,bo=!1,xo=0;function So(){return _o??=Array.from(document.querySelectorAll(`link[rel="icon"]`)).map(e=>({el:e,href:e.href,type:e.type})),_o}function Co(){return vo??=new Promise((e,t)=>{let n=new Image;n.onload=()=>e(n),n.onerror=()=>t(Error(`failed to load ${po}`)),n.src=po}),vo}function wo(e){let t=document.createElement(`canvas`);t.width=mo,t.height=mo;let n=t.getContext(`2d`);return n?(n.drawImage(e,0,0,mo,mo),n.beginPath(),n.arc(mo-go-1,mo-go-1,go,0,Math.PI*2),n.fillStyle=ho,n.fill(),t.toDataURL(`image/png`)):null}async function To(e){if(typeof document>`u`)return;let t=++xo;if(e===bo)return;let n=So();if(n.length!==0){if(!e){bo=!1;for(let{el:e,href:t,type:r}of n)e.href=t,e.type=r;return}if(!yo)try{yo=wo(await Co())}catch{return}if(!(!yo||t!==xo)){bo=!0;for(let{el:e}of n)e.href=yo,e.type=`image/png`}}}var Eo=100,Do=Ht({notifications:[]}),Oo=null,ko=null;function Ao(){return ko||(Oo=zt(!0),Oo.run(()=>{let e=We(`/notifications`);ko=e,e.on(`notification`,e=>{if(e.tag){let t=Do.notifications.findIndex(t=>t.tag===e.tag);t!==-1&&Do.notifications.splice(t,1)}Do.notifications.unshift(e),Do.notifications.length>Eo&&(Do.notifications.length=Eo),jo(e)}),e.on(`history`,e=>{Do.notifications=e}),e.onReady(()=>{No()}),M(()=>Do.notifications.filter(e=>e.seenAt==null).length,e=>{Mo(e),To(e>0)},{immediate:!0})}),ko)}function jo(e){let{isElectronApp:t,electron:n}=nt();!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 Mo(e){let{isElectronApp:t,electron:n}=nt();t&&n&&n.send(`set-badge-count`,e)}async function No(){if(ko?.ready.value)try{Do.notifications=await ko.request(`get-notifications`)}catch{}}function Po(){function e(){Ao()}function t(){}function n(e){let t=Do.notifications.findIndex(t=>t.id===e.id);t!==-1&&Do.notifications.splice(t,1),e.tag&&ko?.emit(`remove-notification`,e.tag)}function r(){Do.notifications.splice(0,Do.notifications.length),ko?.emit(`clear-notifications`)}function i(){let e=Date.now();for(let t of Do.notifications)t.seenAt??=e;ko?.emit(`mark-all-seen`)}function a(e){let t=Do.notifications.find(t=>t.id===e.id);t&&t.seenAt==null&&(t.seenAt=Date.now()),ko?.emit(`mark-seen`,e.id)}function o(e){Do.notifications.find(t=>t.id===e.id)||Do.notifications.unshift(e)}return{isConnected:J(()=>ko?.connected.value??!1),notifications:J(()=>Do.notifications),notificationCount:J(()=>Do.notifications.length),unreadCount:J(()=>Do.notifications.filter(e=>e.seenAt==null).length),connect:e,disconnect:t,fetchNotifications:No,removeNotification:n,clearNotifications:r,markAllSeen:i,markSeen:a,addLocalNotification:o}}function Fo(){Oo?.stop(),Oo=null,ko=null,Do.notifications=[]}var Io={key:0,class:`flex items-center justify-center py-8`},Lo={key:1,class:`flex flex-col items-center text-center gap-3 py-6 px-2`},Ro={class:`text-sm font-semibold text-color`},zo={class:`text-xs text-muted mt-1`},Bo={class:`flex justify-between items-center mb-4 h-9`},Vo={class:`flex items-center gap-2`},Ho={class:`text-base font-semibold`},Uo={class:`flex items-center gap-1`},Wo={class:`overflow-y-auto`,style:{maxHeight:`234px`}},Go={class:`flex gap-3`},Ko={class:`flex-1 min-w-0`},qo={class:`flex justify-between items-center gap-2`},Jo={class:`flex items-center gap-1.5 shrink-0`},Yo={key:0,class:`w-2 h-2 rounded-full bg-primary-500`},Xo={class:`text-xs text-muted`},Zo={class:`text-xs text-muted mt-1 text-left line-clamp-2 overflow-hidden`},Qo={key:0,class:`text-center py-8 text-muted text-sm`},$o=Z({__name:`CuiNotificationMenu`,setup(e){let t=$t(),n=Kr(),{t:a}=i(),{isTouch:o}=lr(),{isElectronApp:s,electron:c}=nt(),l=new Xr,u=Po(),{data:d,isLoading:f}=l.getSettingsQuery(),p=It(`notificationsMenuRef`),m=W({}),h=J(()=>u.notifications.value),g=J(()=>u.unreadCount.value),_=J(()=>d.value?.enabled??!1),v=J(()=>!f.value||d.value!==void 0);function y(e,[t]){if(!t.isIntersecting){m.value[e]?.resetFn(),m.value[e]?.stopFn(),delete m.value[e];return}if(m.value[e])return;let n=t.target;if(!n.parentElement)return;let i=De(n,()=>{m.value[e]&&m.value[e].resetFn()}),a,{direction:s,stop:c}=(o.value?r:Re)(n,{threshold:10,disableTextSelect:!0,onSwipe(){for(let t in m.value)t!==e&&m.value[t]?.resetFn();s.value===`left`?m.value[e]={left:`-75px`,opacity:1,deleteOpacity:1,isSwiping:!0,resetFn(){this.left=`0`,this.opacity=1,this.deleteOpacity=0},stopFn:()=>{delete m.value[e],c(),i(),clearTimeout(a)}}:m.value[e]?.resetFn()},onSwipeEnd(){clearTimeout(a),a=setTimeout(()=>{m.value[e]&&(m.value[e].isSwiping=!1)},10)}})}function b(e){p.value?.toggle(e)}function x(){u.markAllSeen()}function ee(e){u.markSeen(e)}function S(){p.value?.hide(),t.push({path:`/settings/notifications`})}function te(e){let t=Date.now()-e,n=Math.floor(t/(1e3*60)),r=Math.floor(t/(1e3*60*60)),i=Math.floor(t/(1e3*60*60*24));return n<60?`${n}${a(`components.notification_menu.short_minutes`)}`:r<24?`${r}${a(`components.notification_menu.short_hours`)}`:i<7?`${i}${a(`components.notification_menu.short_days`)}`:i<30?`${Math.floor(i/7)}${a(`components.notification_menu.short_weeks`)}`:i<365?`${Math.floor(i/30)}${a(`components.notification_menu.short_months`)}`:`${Math.floor(i/365)}${a(`components.notification_menu.short_years`)}`}function ne(e){let n=e.deepLink;p.value?.hide(),C(e),n&&t.push(n)}function C(e){e&&(m.value[e.id]?.stopFn(),u.removeNotification(e))}function w(){for(let e in m.value)m.value[e]?.stopFn();u.clearNotifications()}function T(e){switch(e){case Me.Info:return`rgb(33, 150, 243)`;case Me.Warn:return`rgb(251, 140, 0)`;case Me.Error:case Me.Critical:return`rgb(176, 0, 32)`;default:return`rgb(69, 69, 69)`}}function ie(e){if(m.value[e.id]?.isSwiping)return;let t=[e.subtitle,e.body].filter(Boolean).join(`
|
|
3
|
+
`);n.openTextDialog({data:{title:e.title,contentText:t,confirmText:e?.deepLink?a(`components.form.button.go_to_message`):a(`components.form.button.mark_as_read`)},onConfirm:()=>ne(e),onCancel:()=>C(e)})}function ae(){for(let e in m.value)m.value[e]?.resetFn(),m.value[e]?.stopFn()}function oe(){return{id:`electron-update`,title:`Update`,body:`New camera.ui app update available`,severity:Me.Info,deepLink:`/settings/system`,tag:`electron-update`,createdAt:Date.now(),seenAt:null,source:{kind:`system`,id:`system.electron.update_available`}}}function E(e,t){s&&t.channel===`update-check`&&t.status===`available`&&u.addLocalNotification(oe())}async function se(){if(s){c.removeListener(`app-status`,E),c.on(`app-status`,E),c.send(`check-for-updates`);try{(await c.invoke(`get-update-available`)).isUpdateAvailable&&u.addLocalNotification(oe())}catch{}}}return M(_,e=>{e?u.connect():Fo()},{immediate:!0}),Tt(()=>{s&&se()}),At(()=>{c?.removeListener(`app-status`,E)}),(e,t)=>{let n=fo,r=A,i=Fe,a=fe,o=co,s=ao,c=Yr,l=Mr,u=Nn,d=re,f=ke;return $(),U(`div`,null,[Q(i,{severity:`secondary`,text:``,class:`cui-button p-2 text-color`,onClick:b},{icon:G(()=>[Q(n,{class:`w-6 h-6`}),R(_)&&R(g)?($(),H(r,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] right-[10px] top-[7px]`})):q(``,!0)]),_:1}),Q(d,{ref_key:`notificationsMenuRef`,ref:p,"append-to":`self`,class:`w-[20rem] shadow-lg cui-rounded-corner notification-menu isolate overscroll-contain non-draggable-region`,onHide:ae},{default:G(()=>[R(v)?R(_)?($(),U(K,{key:2},[V(`div`,Bo,[V(`div`,Vo,[V(`h3`,Ho,F(e.$t(`components.notification_menu.notifications`)),1),Q(r,{class:`rounded-full text-xs p-1`,value:R(h).length>99?`99+`:String(R(h).length)},null,8,[`value`])]),V(`div`,Uo,[R(g)?qt(($(),H(i,{key:0,severity:`secondary`,text:``,rounded:``,class:`p-2 cui-icon-md`,onClick:x},{icon:G(()=>[Q(s,{width:`100%`,height:`100%`})]),_:1})),[[f,{value:e.$t(`components.notification_menu.mark_all_read`)},void 0,{left:!0}]]):q(``,!0),R(h).length?qt(($(),H(i,{key:1,severity:`danger`,text:``,rounded:``,class:`p-2 cui-icon-md`,onClick:w},{icon:G(()=>[Q(c,{width:`100%`,height:`100%`})]),_:1})),[[f,{value:e.$t(`components.notification_menu.clear_notifications`)},void 0,{left:!0}]]):q(``,!0)])]),V(`div`,Wo,[($(!0),U(K,null,B(R(h),t=>($(),U(`div`,{key:t.id,class:`relative overflow-hidden`},[qt(($(),U(`div`,{class:`relative transition-all duration-200`,style:z({left:R(m)[t.id]?.left||`0`,opacity:R(m)[t.id]?.opacity||1})},[Q(i,{severity:`secondary`,text:``,class:`cui-button p-2 block w-full`,onClick:e=>ie(t)},{default:G(()=>[V(`div`,Go,[V(`div`,{class:`w-2 h-2 rounded-full mt-2`,style:z({backgroundColor:T(t.severity)})},null,4),V(`div`,Ko,[V(`div`,qo,[V(`h4`,{class:P([`text-sm truncate max-w-[200px]`,t.seenAt==null?`font-semibold text-color`:`font-medium text-muted`])},F(t.title),3),V(`div`,Jo,[t.seenAt==null?($(),U(`span`,Yo)):q(``,!0),V(`span`,Xo,F(te(t.createdAt)),1)])]),V(`p`,Zo,F(t.subtitle||t.body),1)])])]),_:2},1032,[`onClick`])],4)),[[R(en),e=>y(t.id,e)]]),V(`div`,{class:`absolute right-0 top-0 h-full flex items-center gap-1 pr-4`,style:z({opacity:R(m)[t.id]?.deleteOpacity||0,pointerEvents:(R(m)[t.id]?.deleteOpacity||0)>0?`auto`:`none`})},[t.seenAt==null?qt(($(),H(i,{key:0,severity:`secondary`,class:`cui-icon-sm`,text:``,rounded:``,onClick:e=>ee(t)},{icon:G(()=>[Q(l,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[f,{value:e.$t(`components.notification_menu.mark_read`)},void 0,{left:!0}]]):q(``,!0),qt(($(),H(i,{severity:`danger`,class:`cui-icon-sm`,text:``,rounded:``,onClick:e=>C(t)},{icon:G(()=>[Q(c,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[f,{value:e.$t(`components.notification_menu.delete`)},void 0,{left:!0}]])],4),R(h).indexOf(t)===R(h).length-1?q(``,!0):($(),H(u,{key:0,class:`my-0 py-1`}))]))),128))]),R(h).length===0?($(),U(`div`,Qo,F(e.$t(`components.notification_menu.no_notifications`)),1)):q(``,!0)],64)):($(),U(`div`,Lo,[Q(o,{class:`w-8 h-8 text-muted`}),V(`div`,null,[V(`h3`,Ro,F(e.$t(`components.notification_menu.disabled`)),1),V(`p`,zo,F(e.$t(`components.notification_menu.disabled_hint`)),1)]),Q(i,{class:`cui-button-small`,label:e.$t(`components.notification_menu.open_settings`),onClick:S},null,8,[`label`])])):($(),U(`div`,Io,[Q(a,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})]))]),_:1},512)])}}}),es={key:0},ts={class:`text-sm font-medium truncate max-w-40 pointer-events-none`},ns=Z({__name:`CuiInstanceSwitcher`,setup(e){let{t}=i(),{smBreakpoint:n}=dr(),r=Er(),a={style:`background: color-mix(in srgb,var(--p-red-500),transparent 84%); color: var(--p-red-400);`},o=It(`menuRef`),s=Ht({}),c=null,l=J(()=>{let e=r.activeInstance,n=!r.isHomeActive||r.redirectInfo,i={label:e.name,position:`header`,active:!0},o=r.favoriteInstances.filter(e=>e.id!==r.activeId).map(e=>{let t=s[e.id],n=e.hasCredentials&&t===`checking`,i=e.hasCredentials&&t===`offline`,o,c;return i&&(o=`Offline`,c=a),{label:e.name,badge:o,badgeProps:c,loading:n,disabled:n||i,onClick:()=>r.switchInstance(e.id)}}),c=n?[{label:t(`components.instance_switcher.go_back`),icon:vr,position:`footer`,onClick:()=>{let e=r.redirectInfo;e?window.location.href=e.sourceUrl:r.switchInstance(null)}}]:[],l={label:t(`components.instance_switcher.manage`),icon:Or,position:`footer`,to:`/instances`};return[i,...o,...c,l]});function u(){c?.abort(),c=new AbortController;let{signal:e}=c,t=r.favoriteInstances.filter(e=>e.id!==r.activeId&&e.hasCredentials);for(let e of t)s[e.id]=`checking`;for(let n of t)r.probeInstance(n.id,e).then(t=>{e.aborted||(s[n.id]=t?`online`:`offline`)}).catch(()=>{e.aborted||(s[n.id]=`offline`)})}return(e,t)=>{let i=hr,a=Fe,s=Sr,c=ua,d=Fr;return R(r).isMultiInstance?($(),U(`div`,es,[R(n)?($(),H(a,{key:0,severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:R(o)?.toggleMenu},{icon:G(()=>[Q(i,{class:`w-6 h-6`})]),_:1},8,[`onClick`])):($(),H(a,{key:1,severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:R(o)?.toggleMenu},{default:G(()=>[Q(i,{class:`w-5 h-5 shrink-0 pointer-events-none`}),V(`span`,ts,F(R(r).activeInstance?.name??`Local`),1),R(o)?.isOpen?R(o)?.isOpen?($(),H(c,{key:1,class:`w-4 h-4 opacity-60 shrink-0 pointer-events-none`})):q(``,!0):($(),H(s,{key:0,class:`w-4 h-4 opacity-60 shrink-0 pointer-events-none`}))]),_:1},8,[`onClick`])),Q(d,{ref_key:`menuRef`,ref:o,items:R(l),popover:{appendTo:`body`,pt:{root:{class:`w-[18rem]`},content:{class:`p-0! rounded-xl! overflow-hidden!`}}},onShow:u,dividers:`sections`},null,8,[`items`])])):q(``,!0)}}}),rs={key:0,class:`flex flex-row items-center flex-1 p-2 gap-1`},is={class:`flex-1 flex items-center justify-start min-w-0`},as={key:0,class:`cui-topbar-default font-semibold text-xl truncate`},os={class:`flex-1 flex items-center justify-end min-w-0`},ss={class:`cui-topbar-default`},cs=nr(Z({__name:`CuiTopbar`,props:{offsetLeft:{},animate:{type:Boolean},background:{}},setup(e){let t=e,n=$t(),{smBreakpoint:r}=dr(),{hasSlot:i,scrollToTop:a}=qr(),{minifiedTopbar:o}=ur(),{topbarHeight:s}=sr(),{isElectronApp:c}=nt(),{isMultiInstance:l}=Qt(Er()),{offsetLeft:u,animate:d}=Bt(t);return(e,t)=>{let f=ns,p=$o,m=no,h=$a;return $(),U(`header`,{class:P([`cui-topbar fixed flex flex-row items-center top-0 left-0 right-0 pt-safe pr-safe draggable-region`,{"!border-none":R(r)}]),style:z({height:`calc(${R(s)}px + env(safe-area-inset-top, 0px) + ${R(c)?`30px`:`0px`})`,viewTransitionName:`cui-topbar`,background:R(r)?`var(--ground-background)`:void 0,paddingTop:R(c)?`calc(30px + env(safe-area-inset-top, 0px))`:void 0})},[R(r)&&!R(o)?($(),U(`div`,rs,[V(`div`,is,[!R(i)(`left`)&&(`hasPermission`in e?e.hasPermission:R(Nr))(void 0,`admin`)&&R(n).currentRoute.value.name===`Home`&&R(l)?($(),H(f,{key:0,class:`cui-topbar-default non-draggable-region`})):q(``,!0),t[1]||=V(`div`,{id:`cui-topbar-left`,class:`cui-topbar-slot non-draggable-region`},null,-1)]),V(`div`,{class:`shrink-0 flex items-center justify-center min-w-0 cursor-pointer`,onClick:t[0]||=(...e)=>R(a)&&R(a)(...e)},[t[2]||=V(`div`,{id:`cui-topbar-center`,class:`cui-topbar-slot truncate non-draggable-region`},null,-1),R(i)(`center`)?q(``,!0):($(),U(`span`,as,F(e.$t(`views.${String(e.$route.name).toLowerCase()}.title`)),1))]),V(`div`,os,[t[3]||=V(`div`,{id:`cui-topbar-right`,class:`cui-topbar-slot non-draggable-region`},null,-1),V(`div`,ss,[Q(p,{class:`non-draggable-region`})])])])):R(o)?q(``,!0):($(),U(`div`,{key:1,class:`flex flex-row items-center flex-1 p-2`,style:z({"margin-left":`calc(${R(u)}px + max(8px, env(safe-area-inset-left, 0px)))`,transition:R(d)?`margin-left 200ms`:void 0})},[Q(m,{class:`non-draggable-region`}),(`hasPermission`in e?e.hasPermission:R(Nr))(void 0,`admin`)&&R(l)?($(),H(f,{key:0,class:`non-draggable-region`})):q(``,!0),Q(h,{class:`ml-auto non-draggable-region`}),Q(p,{class:`non-draggable-region`})],4))],6)}}}),[[`__scopeId`,`data-v-20013c43`]]),ls={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function us(e,t){return $(),U(`svg`,ls,[...t[0]||=[V(`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 ds=Y({name:`majesticons-open`,render:us}),fs={class:`flex flex-col gap-2 w-full`},ps={for:`sensorDisplayName`,class:`cui-label`},ms=Z({__name:`RenameSensor`,props:{currentDisplayName:{}},setup(e,{expose:t}){let n=W(e.currentDisplayName);return t({onConfirm:async()=>n.value.trim()||null}),(e,t)=>{let r=ee;return $(),U(`div`,fs,[V(`label`,ps,F(e.$t(`components.camera_options.sensor_display_name`)),1),Q(r,{id:`sensorDisplayName`,modelValue:R(n),"onUpdate:modelValue":t[0]||=e=>Gt(n)?n.value=e:null,class:`w-full`,autofocus:``},null,8,[`modelValue`])])}}}),hs={class:`p-4 flex flex-col gap-2`},gs={key:0,class:`w-full flex items-center justify-center py-8`},_s={class:`cui-label`},vs={key:0,class:`flex flex-col gap-2`},ys={class:`cui-label`},bs={class:`text-sm text-muted text-center min-h-[30px]`},xs={class:`cui-label`},Ss={class:`cui-label`},Cs={key:0,class:`w-full flex items-center justify-center my-5`},ws={key:1,class:`text-sm text-muted text-center`},Ts={key:1,class:`flex flex-col gap-2`},Es={class:`cui-label`},Ds={class:`text-sm text-muted text-center min-h-[30px]`},Os={class:`cui-label`},ks={class:`cui-label`},As={key:0,class:`w-full flex items-center justify-center my-5`},js={key:1,class:`text-sm text-muted text-center`},Ms={key:2,class:`flex flex-col gap-2`},Ns={class:`cui-label`},Ps={class:`text-sm text-muted text-center min-h-[30px]`},Fs={class:`cui-label`},Is={class:`cui-label`},Ls={class:`cui-label`},Rs={key:0,class:`w-full flex items-center justify-center my-5`},zs={key:1,class:`text-sm text-muted text-center`},Bs={class:`cui-label`},Vs={key:2,class:`text-sm text-muted text-center min-h-[30px]`},Hs={class:`cui-label`},Us={key:0,class:`w-full flex items-center justify-center my-5`},Ws={key:1,class:`text-sm text-muted text-center`},Gs={key:3,class:`flex flex-col gap-2`},Ks={class:`cui-label`},qs={class:`text-sm text-muted text-center min-h-[30px]`},Js={class:`cui-label`},Ys={class:`cui-label`},Xs={class:`cui-label`},Zs={key:0,class:`w-full flex items-center justify-center my-5`},Qs={key:1,class:`text-sm text-muted text-center`},$s={class:`cui-label`},ec={key:2,class:`text-sm text-muted text-center min-h-[30px]`},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:4,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:5,class:`flex flex-col gap-2`},vc={class:`cui-label`},yc={key:0,class:`w-full flex items-center justify-center`},bc={key:1,class:`text-sm text-muted text-center`},xc={key:1,class:`w-full h-full`},Sc={class:`cui-list-item`},Cc=Z({__name:`Plugins`,props:{camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},emits:[`close`],setup(e){let t=it(),n=Ue(),r=tt(),a=new Vr,o=new ri,s=e,c=Ke(),l=Kr(),{t:u}=i(),{camera:d,cameraDevice:f,loading:p}=Bt(s),{data:m,isBusy:h}=o.getPluginsQuery({page:1,pageSize:-1}),{data:g,isBusy:_,suspense:v}=a.getCameraExtensionsQuery(d.value.name),{data:y,isBusy:b}=o.getPluginsExtensionsQuery({page:1,pageSize:-1}),{mutateAsync:x,isPending:ee}=a.enableCameraExtensionQuery(),{mutateAsync:S,isPending:te}=a.disableCameraExtensionQuery(),{mutateAsync:ne,isPending:C}=a.activateCameraExtensionQuery(),{mutateAsync:w,isPending:re}=a.deactivateCameraExtensionQuery(),{sensors:T}=Be(f),ie=It(`schemaRef`),ae=W(`hub`),oe=W([`hub`,`detection`,`core`,`accessories`,`more`]),E=W(``),se=W(),ce=W(),le=W(),ue=W(),de=W(),D=W(),O=W(),k=W(),A=W(),he=W(),ge=J(()=>{if(!O.value)return``;let e=Ce.value.find(e=>e.id===O.value);return e?.pluginId&&xt(e.pluginId)||``}),j=J(()=>O.value&&Ce.value.find(e=>e.id===O.value)?.pluginId||``),_e=J(()=>g.value?.filter(e=>r.some(t=>e.contract.provides.includes(t)))||[]),ve=J(()=>{let e=new Set;for(let t of _e.value)for(let n of r)t.contract.provides.includes(n)&&e.add(n);return Array.from(e).filter(I).sort((e,t)=>{let n=u(`components.camera_options.sensor_type_${e}`),r=u(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),be=J(()=>{let e=D.value;return e?Ct(g.value?.filter(t=>t.contract.provides.includes(e)&&bt(t,e))||[]):[]}),xe=J(()=>D.value?ft(D.value):!1),Se=J(()=>{if(!D.value)return[];let e=Ze(D.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=be.value.map(e=>e.pluginName);return n.sort((e,t)=>r.indexOf(e)-r.indexOf(t))}),Ce=J(()=>T.value.filter(e=>e.type===D.value).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))),we=me(f,E),Te=we.config,Ee=we.isLoading,De=Ie(f,O,j),Oe=De.config,Ae=De.isLoading,je=J(()=>h.value||b.value||_.value),Me=J(()=>_.value||b.value||ee.value||te.value||C.value||re.value),Pe=J(()=>Me.value||p.value||we.isLoading.value||De.isLoading.value||rt.isLoading.value||ct.isLoading.value||dt.isLoading.value||ht.isLoading.value||vt.isLoading.value),Le=J(()=>(y.value?.result.filter(e=>ye(e.contract)&&e.pluginName===d.value.pluginInfo?.name)||[])[0]),Re=J(()=>Ct(g.value?.filter(e=>Ne(e.contract))||[])),ze=J(()=>Le.value&&St(Le.value.pluginName)?[Le.value]:[]),Ve=J(()=>g.value?.filter(e=>t.some(t=>e.contract.provides.includes(t)))||[]),He=J(()=>{let e=new Set;for(let n of Ve.value)for(let r of t)n.contract.provides.includes(r)&&e.add(r);return Array.from(e).filter(I).sort((e,t)=>{let n=u(`components.camera_options.sensor_type_${e}`),r=u(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),We=J(()=>{let e=ce.value;return e?Ct(g.value?.filter(t=>t.contract.provides.includes(e)&&bt(t,e))||[]):[]}),Ge=J(()=>T.value.filter(e=>e.type===ce.value).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))),qe=J(()=>{if(!k.value)return``;let e=Ge.value.find(e=>e.id===k.value);return e?.pluginId&&xt(e.pluginId)||``}),Je=J(()=>k.value&&Ge.value.find(e=>e.id===k.value)?.pluginId||``),Ye=J(()=>g.value?.filter(e=>n.some(t=>e.contract.provides.includes(t)))||[]),Xe=J(()=>{let e=new Set;for(let t of Ye.value)for(let r of n)t.contract.provides.includes(r)&&e.add(r);return Array.from(e).filter(I).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=J(()=>{let e=ue.value;return e?Ct(g.value?.filter(t=>t.contract.provides.includes(e)&&bt(t,e))||[]):[]}),$e=J(()=>T.value.filter(e=>e.type===ue.value).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))),et=J(()=>{if(!A.value)return``;let e=$e.value.find(e=>e.id===A.value);return e?.pluginId&&xt(e.pluginId)||``}),nt=J(()=>A.value&&$e.value.find(e=>e.id===A.value)?.pluginId||``),rt=me(f,J(()=>le.value??``)),ot=rt.config,st=rt.isLoading,ct=Ie(f,k,Je),lt=ct.config,ut=ct.isLoading,dt=me(f,J(()=>de.value??``)),pt=dt.config,mt=dt.isLoading,ht=Ie(f,A,nt),gt=ht.config,_t=ht.isLoading,vt=me(f,J(()=>he.value??``)),N=vt.config,yt=vt.isLoading,P=J(()=>{let e=m.value?.result||[];return(y.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||ye(t.contract)&&!pe(t.contract)?!1:n&&(r||i||Ne(t.contract))})});function bt(e,t){return e.pluginName!==d.value.pluginInfo?.name||T.value.some(n=>n.type===t&&xt(n.pluginId||``)===e.pluginName)}function I(e){return T.value.some(t=>t.type===e)?!0:(g.value??[]).some(t=>t.contract.provides.includes(e)&&t.pluginName!==d.value.pluginInfo?.name)}function xt(e){return d.value.plugins.find(t=>t.id===e)?.name}function St(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 Ct(e){return e.sort((e,t)=>!St(e.pluginName)&&St(t.pluginName)?1:St(e.pluginName)&&!St(t.pluginName)?-1:e.displayName.localeCompare(t.displayName))}function wt(e){let t=Ze(e),n=d.value.assignments[t];return Array.isArray(n)?void 0:n}function Tt(e){let t=Ze(e),n=d.value.assignments[t];return Array.isArray(n)?void 0:n}async function Dt(e){if(e!==void 0)E.value=e;else switch(ae.value){case`cameraController`:E.value=St(Le.value?.pluginName)||``;break;case`hub`:E.value=St(Re.value[0]?.pluginName)||``;break;case`detection`:{let e=St(ce.value?wt(ce.value):void 0);E.value=e||``,le.value=e||void 0;break}case`core`:{let e=St(ue.value?Tt(ue.value):void 0);E.value=e||``,de.value=e||void 0;break}case`accessories`:E.value=``;break;default:E.value=``;break}E.value&&ae.value!==`accessories`&&St(E.value)&&await we.getConfig()}function L(){switch(ae.value){case`cameraController`:ze.value.length&&!E.value&&(E.value=ze.value[0].pluginName);break;case`hub`:if(Re.value.length){let e=Re.value.find(e=>St(e.pluginName));se.value=e?.pluginName}break;case`detection`:{He.value.length&&(!ce.value||!He.value.includes(ce.value))&&(ce.value=He.value[0]);let e=ce.value?wt(ce.value):void 0;e&&St(e.name)?le.value=e.name:le.value=void 0,Ut(()=>{Ge.value.length&&!k.value&&(k.value=Ge.value[0].id)});break}case`core`:{Xe.value.length&&(!ue.value||!Xe.value.includes(ue.value))&&(ue.value=Xe.value[0]);let e=ue.value?Tt(ue.value):void 0;e&&St(e.name)?de.value=e.name:de.value=void 0,Ut(()=>{$e.value.length&&!A.value&&(A.value=$e.value[0].id)});break}case`accessories`:ve.value.length&&(!D.value||!ve.value.includes(D.value))&&(D.value=ve.value[0]),Ut(()=>{Se.value.length&&!he.value&&(he.value=Se.value[0])}),Ut(()=>{Ce.value.length&&!O.value&&(O.value=Ce.value[0].id)});break}}async function Ot(e){g.value&&(g.value.some(t=>t.pluginName===e.pluginName)?(await w({cameraname:d.value.name,pluginname:e.pluginName}),ie.value?.reset()):await ne({cameraname:d.value.name,pluginname:e.pluginName}))}async function kt(e){if(!D.value)return;let t=Se.value;if(xe.value){let n=e,r=t[0];if(n===r)return;r&&(await S({cameraname:d.value.name,pluginname:r,type:D.value}),O.value=void 0),n?(await x({cameraname:d.value.name,pluginname:n,type:D.value}),he.value=n):he.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 x({cameraname:d.value.name,pluginname:e,type:D.value});for(let e of i){if(await S({cameraname:d.value.name,pluginname:e,type:D.value}),O.value){let t=Ce.value.find(e=>e.id===O.value);t&&xt(t.pluginId||``)===e&&(O.value=void 0)}he.value===e&&(he.value=void 0)}r.length&&!he.value?he.value=r[0]:n.length&&!he.value&&(he.value=n[0])}async function At(e,t){try{await we.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 z(e,t){try{let n=await we.submitValue(e.key,e.payload);if(n?.toast){let e=at(n.toast.type);c.add({severity:e,detail:n.toast.message,life:3e3})}n?.schema&&n.schema.length&&l.openComponentDialog(ii,{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 jt(e,t){try{await we.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 Mt(e){if(!(!Je.value||!k.value))try{await ct.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 Nt(e){if(!(!Je.value||!k.value))try{let t=await ct.submitValue(e.key,e.payload);if(t?.toast){let e=at(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 Pt(e){if(!(!Je.value||!k.value))try{await ct.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 Ft(e){if(!(!nt.value||!A.value))try{await ht.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 Lt(e){if(!(!nt.value||!A.value))try{let t=await ht.submitValue(e.key,e.payload);if(t?.toast){let e=at(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 zt(e){if(!(!nt.value||!A.value))try{await ht.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 Vt(e){if(!(!j.value||!O.value))try{await De.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){if(!(!j.value||!O.value))try{let t=await De.submitValue(e.key,e.payload);if(t?.toast){let e=at(t.toast.type);c.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&l.openComponentDialog(ii,{data:{title:u(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:ge.value,cameraName:d.value.name,buttonKey:e.key,sensorId:O.value,pluginId:j.value}}})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function Wt(e){if(!(!j.value||!O.value))try{await De.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 Kt(e){le.value&&await rt.setValue(e.key,void 0)}async function Jt(e){if(le.value)try{let t=await rt.submitValue(e.key,e.payload);if(t?.toast){let e=at(t.toast.type);c.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&l.openComponentDialog(ii,{data:{title:u(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:le.value,cameraName:d.value.name,buttonKey:e.key}}})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function Y(e){le.value&&await rt.setConfig(e)}async function Yt(e){de.value&&await dt.setValue(e.key,void 0)}async function Z(e){if(de.value)try{let t=await dt.submitValue(e.key,e.payload);if(t?.toast){let e=at(t.toast.type);c.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&l.openComponentDialog(ii,{data:{title:u(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:de.value,cameraName:d.value.name,buttonKey:e.key}}})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function Xt(e){de.value&&await dt.setConfig(e)}async function Zt(e){he.value&&await vt.setValue(e.key,void 0)}async function Qt(e){if(he.value)try{let t=await vt.submitValue(e.key,e.payload);if(t?.toast){let e=at(t.toast.type);c.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&l.openComponentDialog(ii,{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 $t(e){he.value&&await vt.setConfig(e)}function en(e){e&&l.openComponentDialog(ms,{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 M(ae,()=>{Ut(()=>{L(),Dt()})},{immediate:!0}),M([Re,m],async([e,t])=>{if(ae.value===`hub`&&e.length&&t?.result&&!se.value){let t=e.find(e=>St(e.pluginName));t&&(se.value=t.pluginName,E.value=t.pluginName,await we.getConfig())}},{immediate:!0}),M([ze,()=>ae.value],async([e,t])=>{t===`cameraController`&&e.length&&!E.value&&(E.value=e[0].pluginName,await we.getConfig())},{immediate:!0}),M(()=>E.value,async(e,t)=>{ae.value===`cameraController`&&e&&e!==t&&await we.getConfig()}),M(se,async(e,t)=>{e&&e!==t&&St(e)&&(E.value=e,await we.getConfig())}),M(ce,()=>{if(k.value=void 0,ce.value){let e=wt(ce.value);e&&St(e.name)?le.value=e.name:le.value=void 0}else le.value=void 0;Dt(),Ut(()=>{Ge.value.length&&(k.value=Ge.value[0].id)})}),M(le,async(e,t)=>{if(e!==t&&ce.value){let n=wt(ce.value);!e&&t?(await S({cameraname:d.value.name,pluginname:t,type:ce.value}),ie.value?.reset(),k.value=void 0):e&&(n?.name!==e&&await x({cameraname:d.value.name,pluginname:e,type:ce.value}),await rt.getConfig()),Ut(()=>Dt(e)),Ut(()=>{Ge.value.length&&(k.value=Ge.value[0].id)})}}),M(ue,()=>{if(A.value=void 0,ue.value){let e=Tt(ue.value);e&&St(e.name)?de.value=e.name:de.value=void 0}else de.value=void 0;Dt(),Ut(()=>{$e.value.length&&(A.value=$e.value[0].id)})}),M(de,async(e,t)=>{if(e!==t&&ue.value){let n=Tt(ue.value);!e&&t?(await S({cameraname:d.value.name,pluginname:t,type:ue.value}),ie.value?.reset(),A.value=void 0):e&&(n?.name!==e&&await x({cameraname:d.value.name,pluginname:e,type:ue.value}),await dt.getConfig()),Ut(()=>Dt(e)),Ut(()=>{$e.value.length&&(A.value=$e.value[0].id)})}}),M([k,Je],async([e,t])=>{e&&t&&await ct.getConfig()}),M([A,nt],async([e,t])=>{e&&t&&await ht.getConfig()}),M(D,()=>{O.value=void 0,Se.value.length?he.value=Se.value[0]:he.value=void 0,Ce.value.length&&(O.value=Ce.value[0].id)}),M(he,async e=>{e&&await vt.getConfig()}),M(O,async e=>{e&&j.value&&await De.getConfig()}),M(ze,e=>{let t=oe.value.indexOf(`cameraController`)!==-1;e.length&&!t?(oe.value.unshift(`cameraController`),(!ae.value||ae.value===`hub`)&&(ae.value=`cameraController`,e.length&&!E.value&&(E.value=e[0].pluginName))):!e.length&&t&&(oe.value=oe.value.filter(e=>e!==`cameraController`),ae.value===`cameraController`&&(ae.value=`hub`))},{immediate:!0}),Et(async()=>{await v(),L(),Dt()}),(e,t)=>{let n=fe,r=ei,i=$r,a=Nn,o=Zr,s=Fe,c=ln,l=Pr,u=ds,f=ke;return $(),U(`div`,hs,[R(je)?($(),U(`div`,gs,[Q(n,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])):($(),U(K,{key:1},[V(`span`,_s,F(e.$t(`components.camera_options.categories`)),1),Q(i,{modelValue:R(ae),"onUpdate:modelValue":[t[0]||=e=>Gt(ae)?ae.value=e:null,t[1]||=e=>Dt()],disabled:R(Me),mandatory:``},{default:G(()=>[($(!0),U(K,null,B(R(oe),t=>($(),H(r,{key:t,size:`small`,disabled:R(Pe),value:t},{default:G(()=>[X(F(e.$t(`components.camera_options.chip_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),Q(a,{class:`m-0 py-3`}),R(ae)===`cameraController`?($(),U(`div`,vs,[R(ze).length?($(),U(K,{key:1},[V(`span`,xs,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(i,{modelValue:R(E),"onUpdate:modelValue":t[2]||=e=>Gt(E)?E.value=e:null,disabled:R(Me),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(ze),e=>($(),H(r,{key:e.pluginName,size:`small`,disabled:!St(e.pluginName)||R(Pe),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),Q(a,{class:`m-0 py-3`}),V(`span`,Ss,F(e.$t(`components.camera_options.plugin_settings`)),1),!R(E)||!R(Te)?.schema?.length?($(),U(`div`,Cs,[R(Ee)?($(),H(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,ws,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(ni,{ref_key:`schemaRef`,ref:ie,key:R(E),"schema-form":{schema:R(Te).schema,config:R(Te).config},loading:R(Pe),onOnFormSubmit:t[3]||=e=>jt(R(E),e),onOnSubmit:t[4]||=e=>z(e,R(E)),onOnAction:t[5]||=e=>At(e,R(E))},null,8,[`schema-form`,`loading`]))],64)):($(),U(K,{key:0},[V(`span`,ys,F(e.$t(`components.camera_options.chip_plugins`)),1),V(`span`,bs,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(ae)===`hub`?($(),U(`div`,Ts,[R(Re).length?($(),U(K,{key:1},[V(`span`,Os,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(i,{modelValue:R(se),"onUpdate:modelValue":t[6]||=e=>Gt(se)?se.value=e:null,disabled:R(Me),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Re),e=>($(),H(r,{key:e.pluginName,size:`small`,disabled:!St(e.pluginName)||R(Pe),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),Q(a,{class:`m-0 py-3`}),V(`span`,ks,F(e.$t(`components.camera_options.plugin_settings`)),1),!R(E)||!R(Te)?.schema?.length?($(),U(`div`,As,[R(Ee)?($(),H(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,js,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(ni,{ref_key:`schemaRef`,ref:ie,key:R(E),"schema-form":{schema:R(Te).schema,config:R(Te).config},loading:R(Pe),onOnFormSubmit:t[7]||=e=>jt(R(E),e),onOnSubmit:t[8]||=e=>z(e,R(E)),onOnAction:t[9]||=e=>At(e,R(E))},null,8,[`schema-form`,`loading`]))],64)):($(),U(K,{key:0},[V(`span`,Es,F(e.$t(`components.camera_options.chip_plugins`)),1),V(`span`,Ds,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(ae)===`detection`?($(),U(`div`,Ms,[R(He).length?($(),U(K,{key:1},[V(`span`,Fs,F(e.$t(`components.camera_options.sensor_types`)),1),Q(i,{modelValue:R(ce),"onUpdate:modelValue":t[10]||=e=>Gt(ce)?ce.value=e:null,disabled:R(Me),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(He),t=>($(),H(r,{key:t,size:`small`,disabled:R(Pe),value:t},{default:G(()=>[X(F(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(We).length?($(),U(K,{key:0},[Q(a,{class:`m-0 py-3`}),V(`span`,Is,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(i,{modelValue:R(le),"onUpdate:modelValue":t[11]||=e=>Gt(le)?le.value=e:null,disabled:R(Me),class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(We),e=>($(),H(r,{key:e.pluginName,size:`small`,filter:``,disabled:!St(e.pluginName)||R(Pe),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(le)&&R(le)!==R(d).pluginInfo?.name?($(),U(K,{key:0},[Q(a,{class:`m-0 py-3`}),V(`span`,Ls,F(e.$t(`components.camera_options.plugin_settings`)),1),R(ot)?.schema?.length?($(),H(ni,{key:`detection-plugin-${R(le)}`,"schema-form":{schema:R(ot).schema,config:R(ot).config},loading:R(Pe),onOnFormSubmit:t[12]||=e=>Y(e),onOnSubmit:t[13]||=e=>Jt(e),onOnAction:t[14]||=e=>Kt(e)},null,8,[`schema-form`,`loading`])):($(),U(`div`,Rs,[R(st)?($(),H(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,zs,F(e.$t(`components.camera_options.no_config`)),1))]))],64)):q(``,!0),Q(a,{class:`m-0 py-3`}),V(`span`,Bs,F(e.$t(`components.camera_options.sensors`)),1),R(Ge).length?($(),H(i,{key:1,modelValue:R(k),"onUpdate:modelValue":t[15]||=e=>Gt(k)?k.value=e:null,disabled:R(Me),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Ge),e=>($(),H(r,{key:e.id,size:`small`,disabled:R(Pe),value:e.id},{append:G(()=>[Q(s,{text:R(O)!==e.id,rounded:``,severity:R(O)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:Rt(t=>en(e),[`stop`])},{icon:G(()=>[Q(o,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:G(()=>[X(F(e.displayName.value)+` `,1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`])):($(),U(`span`,Vs,F(e.$t(`components.camera_options.no_sensors`)),1)),R(k)?($(),U(K,{key:3},[Q(a,{class:`m-0 py-3`}),V(`span`,Hs,F(e.$t(`components.camera_options.sensor_settings`)),1),!R(qe)||!R(lt)?.schema?.length?($(),U(`div`,Us,[R(ut)?($(),H(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,Ws,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(ni,{key:`sensor-${R(k)}`,"schema-form":{schema:R(lt).schema,config:R(lt).config},loading:R(Pe),onOnFormSubmit:t[16]||=e=>Pt(e),onOnSubmit:t[17]||=e=>Nt(e),onOnAction:t[18]||=e=>Mt(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):q(``,!0)],64)):($(),U(K,{key:0},[V(`span`,Ns,F(e.$t(`components.camera_options.sensor_types`)),1),V(`span`,Ps,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(ae)===`core`?($(),U(`div`,Gs,[R(Xe).length?($(),U(K,{key:1},[V(`span`,Js,F(e.$t(`components.camera_options.sensor_types`)),1),Q(i,{modelValue:R(ue),"onUpdate:modelValue":t[19]||=e=>Gt(ue)?ue.value=e:null,disabled:R(Me),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Xe),t=>($(),H(r,{key:t,size:`small`,disabled:R(Pe),value:t},{default:G(()=>[X(F(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(Qe).length?($(),U(K,{key:0},[Q(a,{class:`m-0 py-3`}),V(`span`,Ys,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(i,{modelValue:R(de),"onUpdate:modelValue":t[20]||=e=>Gt(de)?de.value=e:null,disabled:R(Me),class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Qe),e=>($(),H(r,{key:e.pluginName,size:`small`,filter:``,disabled:!St(e.pluginName)||R(Pe),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(de)&&R(de)!==R(d).pluginInfo?.name?($(),U(K,{key:0},[Q(a,{class:`m-0 py-3`}),V(`span`,Xs,F(e.$t(`components.camera_options.plugin_settings`)),1),R(pt)?.schema?.length?($(),H(ni,{key:`core-plugin-${R(de)}`,"schema-form":{schema:R(pt).schema,config:R(pt).config},loading:R(Pe),onOnFormSubmit:t[21]||=e=>Xt(e),onOnSubmit:t[22]||=e=>Z(e),onOnAction:t[23]||=e=>Yt(e)},null,8,[`schema-form`,`loading`])):($(),U(`div`,Zs,[R(mt)?($(),H(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,Qs,F(e.$t(`components.camera_options.no_config`)),1))]))],64)):q(``,!0),Q(a,{class:`m-0 py-3`}),V(`span`,$s,F(e.$t(`components.camera_options.sensors`)),1),R($e).length?($(),H(i,{key:1,modelValue:R(A),"onUpdate:modelValue":t[24]||=e=>Gt(A)?A.value=e:null,disabled:R(Me),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R($e),e=>($(),H(r,{key:e.id,size:`small`,disabled:R(Pe),value:e.id},{append:G(()=>[Q(s,{text:R(O)!==e.id,rounded:``,severity:R(O)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:Rt(t=>en(e),[`stop`])},{icon:G(()=>[Q(o,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:G(()=>[X(F(e.displayName.value)+` `,1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`])):($(),U(`span`,ec,F(e.$t(`components.camera_options.no_sensors`)),1)),R(A)?($(),U(K,{key:3},[Q(a,{class:`m-0 py-3`}),V(`span`,tc,F(e.$t(`components.camera_options.sensor_settings`)),1),!R(et)||!R(gt)?.schema?.length?($(),U(`div`,nc,[R(_t)?($(),H(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,rc,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(ni,{key:`sensor-${R(A)}`,"schema-form":{schema:R(gt).schema,config:R(gt).config},loading:R(Pe),onOnFormSubmit:t[25]||=e=>zt(e),onOnSubmit:t[26]||=e=>Lt(e),onOnAction:t[27]||=e=>Ft(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):q(``,!0)],64)):($(),U(K,{key:0},[V(`span`,Ks,F(e.$t(`components.camera_options.sensor_types`)),1),V(`span`,qs,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(ae)===`accessories`?($(),U(`div`,ic,[R(ve).length?($(),U(K,{key:1},[V(`span`,sc,F(e.$t(`components.camera_options.sensor_types`)),1),Q(i,{modelValue:R(D),"onUpdate:modelValue":t[28]||=e=>Gt(D)?D.value=e:null,disabled:R(Me),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(ve),t=>($(),H(r,{key:t,size:`small`,disabled:R(Pe),value:t},{default:G(()=>[X(F(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),R(be).length?($(),U(K,{key:0},[Q(a,{class:`m-0 py-3`}),V(`span`,cc,F(e.$t(`components.camera_options.chip_plugins`)),1),Q(i,{"model-value":R(xe)?R(Se)[0]:R(Se),disabled:R(Me),multiple:!R(xe),class:`min-h-[30px]`,"onUpdate:modelValue":kt},{default:G(()=>[($(!0),U(K,null,B(R(be),e=>($(),H(r,{key:e.pluginName,size:`small`,filter:``,disabled:!St(e.pluginName)||R(Pe),value:e.pluginName},{default:G(()=>[X(F(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`model-value`,`disabled`,`multiple`]),R(he)&&R(he)!==R(d).pluginInfo?.name?($(),U(K,{key:0},[Q(a,{class:`m-0 py-3`}),V(`span`,lc,F(e.$t(`components.camera_options.plugin_settings`)),1),R(N)?.schema?.length?($(),H(ni,{key:`accessory-plugin-${R(he)}`,"schema-form":{schema:R(N).schema,config:R(N).config},loading:R(Pe),onOnFormSubmit:t[29]||=e=>$t(e),onOnSubmit:t[30]||=e=>Qt(e),onOnAction:t[31]||=e=>Zt(e)},null,8,[`schema-form`,`loading`])):($(),U(`div`,uc,[R(yt)?($(),H(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,dc,F(e.$t(`components.camera_options.no_config`)),1))]))],64)):q(``,!0)],64)):q(``,!0),Q(a,{class:`m-0 py-3`}),V(`span`,fc,F(e.$t(`components.camera_options.sensors`)),1),R(Ce).length?($(),H(i,{key:1,modelValue:R(O),"onUpdate:modelValue":t[32]||=e=>Gt(O)?O.value=e:null,disabled:R(Me),mandatory:``,class:`min-h-[30px]`},{default:G(()=>[($(!0),U(K,null,B(R(Ce),e=>($(),H(r,{key:e.id,size:`small`,disabled:R(Pe),value:e.id},{append:G(()=>[Q(s,{text:R(O)!==e.id,rounded:``,severity:R(O)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:Rt(t=>en(e),[`stop`])},{icon:G(()=>[Q(o,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:G(()=>[X(F(e.displayName.value)+` `,1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`])):($(),U(`span`,pc,F(e.$t(`components.camera_options.no_sensors`)),1)),R(O)?($(),U(K,{key:3},[Q(a,{class:`m-0 py-3`}),V(`span`,mc,F(e.$t(`components.camera_options.sensor_settings`)),1),!R(ge)||!R(Oe)?.schema?.length?($(),U(`div`,hc,[R(Ae)?($(),H(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,gc,F(e.$t(`components.camera_options.no_config`)),1))])):($(),H(ni,{key:`sensor-${R(O)}`,"schema-form":{schema:R(Oe).schema,config:R(Oe).config},loading:R(Pe),onOnFormSubmit:t[33]||=e=>Wt(e),onOnSubmit:t[34]||=e=>Ht(e),onOnAction:t[35]||=e=>Vt(e)},null,8,[`schema-form`,`loading`]))],64)):q(``,!0)],64)):($(),U(K,{key:0},[V(`span`,ac,F(e.$t(`components.camera_options.sensor_types`)),1),V(`span`,oc,F(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):R(ae)===`more`?($(),U(`div`,_c,[V(`span`,vc,F(e.$t(`components.camera_options.manage_plugins`)),1),R(b)||!R(P).length?($(),U(`div`,yc,[R(b)?($(),H(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):($(),U(`span`,bc,F(e.$t(`components.camera_options.no_plugins_found`)),1))])):($(),U(`div`,xc,[($(!0),U(K,null,B(R(P),t=>qt(($(),U(`div`,{key:t.pluginName,class:`cui-list-item`},[Q(l,{disabled:R(Me)||!St(t.pluginName),class:`h-14`,onClick:n=>e.$router.push(`/plugins/${t.pluginName}`)},{append:G(()=>[Q(c,{"model-value":R(g)?.some(e=>e.pluginName===t.pluginName),disabled:R(Me)||!St(t.pluginName),"onUpdate:modelValue":e=>Ot(t)},null,8,[`model-value`,`disabled`,`onUpdate:modelValue`])]),default:G(()=>[V(`span`,null,F(t.displayName),1)]),_:2},1032,[`disabled`,`onClick`])])),[[f,{value:St(t.pluginName)===void 0?e.$t(`components.form.tooltip.disabled`):``},void 0,{top:!0}]])),128))])),V(`div`,Sc,[Q(l,{class:`h-14`,onClick:t[36]||=t=>e.$router.push(`/plugins`)},{append:G(()=>[Q(s,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-md`},{icon:G(()=>[Q(u,{width:`100%`,height:`100%`})]),_:1})]),default:G(()=>[V(`span`,null,F(e.$t(`components.camera_options.more_plugins`)),1)]),_:1})])])):q(``,!0)],64))])}}});async function wc({signal:e}){return(await ut.get(`/virtual-sensors`,{signal:e})).data}async function Tc({data:e}){return(await ut.post(`/virtual-sensors`,e)).data}async function Ec({id:e,data:t}){return(await ut.patch(`/virtual-sensors/${e}`,t)).data}async function Dc({id:e}){await ut.delete(`/virtual-sensors/${e}`)}var Oc=class{_queryClient=kt();t=Ye.global.t;toast=Ke();queryActivator=W([{name:`getVirtualSensorsQuery`,enabled:!0}]);getVirtualSensorsQuery(){return Qe({queryKey:[`virtualSensorsList`],queryFn:({signal:e})=>wc({signal:e}),placeholderData:e=>e,enabled:()=>this.queryActivator.value.some(e=>e.name===`getVirtualSensorsQuery`&&e.enabled)})}createVirtualSensorQuery(){return wt({mutationFn:Tc,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 wt({mutationFn:Ec,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`virtualSensorsList`]})}})}deleteVirtualSensorQuery(){return wt({mutationFn:Dc,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`virtualSensorsList`]}),await this._queryClient.refetchQueries({queryKey:[`camerasList`]})}})}},kc={for:`virtualSensorType`,class:`cui-label`},Ac={for:`virtualSensorName`,class:`cui-label`},jc=Z({__name:`VirtualSensorCreate`,props:{cameraId:{}},setup(e,{expose:t}){let n=e,{t:r}=i(),a=Ke(),o=mt.omit({cameraId:!0}),s=It(`formRef`),c=W(et[0]),l=W(``),u=J(()=>et.map(e=>({label:r(`components.camera_options.sensor_type_${e}`),value:e})));return t({onConfirm:async()=>(await s.value?.validate())?.valid?{cameraId:n.cameraId,type:c.value,name:l.value.trim()}:(a.add({severity:`error`,detail:r(`components.toast.validation_failed`),life:3e3}),null)}),(e,t)=>{let n=pn,r=ee;return $(),H(R(Ct),{ref_key:`formRef`,ref:s,class:`flex flex-col gap-4 w-full`,"validation-schema":R(o)},{default:G(()=>[Q(R(I),{"model-value":R(c),name:`type`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:r})=>[V(`label`,kc,F(e.$t(`components.form.label.type`)),1),Q(n,{id:`virtualSensorType`,"model-value":R(c),options:R(u),"option-label":`label`,"option-value":`value`,invalid:r.length>0,class:`w-full`,onValueChange:t[0]||=e=>c.value=e},null,8,[`model-value`,`options`,`invalid`]),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`type`,class:`cui-input-error`})]),_:1})]),_:1},8,[`model-value`]),Q(R(I),{modelValue:R(l),"onUpdate:modelValue":t[1]||=e=>Gt(l)?l.value=e:null,modelModifiers:{trim:!0},name:`name`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:t,errors:n})=>[V(`label`,Ac,F(e.$t(`components.form.label.name`)),1),Q(r,yt({id:`virtualSensorName`},t,{invalid:n.length>0,class:`w-full`,placeholder:e.$t(`components.camera_options.virtual_sensor_name_placeholder`)}),null,16,[`invalid`,`placeholder`]),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`name`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`])]),_:1},8,[`validation-schema`])}}}),Mc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Nc(e,t){return $(),U(`svg`,Mc,[...t[0]||=[V(`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 Pc=Y({name:`mdi-checkbox-intermediate`,render:Nc}),Fc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ic(e,t){return $(),U(`svg`,Fc,[...t[0]||=[V(`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 Lc=Y({name:`mdi-vector-intersection`,render:Ic}),Rc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function zc(e,t){return $(),U(`svg`,Rc,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M4 6v13h16V6zm14 11H6V8h12z`},null,-1)]])}var Bc=Y({name:`mdi-rectangle-outline`,render:zc}),Vc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Hc(e,t){return $(),U(`svg`,Vc,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M4 6v13h16V6z`},null,-1)]])}var Uc=Y({name:`mdi-rectangle`,render:Hc}),Wc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Gc(e,t){return $(),U(`svg`,Wc,[...t[0]||=[V(`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 Kc=Y({name:`mdi-cctv-off`,render:Gc}),qc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Jc(e,t){return $(),U(`svg`,qc,[...t[0]||=[V(`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 Yc=Y({name:`mdi-cancel`,render:Jc}),Xc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Zc(e,t){return $(),U(`svg`,Xc,[...t[0]||=[V(`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 Qc=Y({name:`mdi-undo`,render:Zc}),$c=e(zr(),1),el=[`audio`],tl=[`audio`,`motion`],nl={ref:`container`,class:`w-full h-full relative min-w-0`},rl={class:`flex flex-col justify-center items-center`},il={class:`relative w-full`},al={class:`relative w-full flex flex-col items-center justify-center`},ol={class:`absolute top-0 left-0 right-0 bottom-0`},sl={class:`sandbox w-full h-full`},cl={class:`handles`},ll=[`data-id`,`data-point`,`data-point-index`,`data-zone-index`,`onDblclick`],ul={class:`clipboard`},dl={width:`100%`,height:`100%`,class:`polygon-container`},fl=[`d`,`onClick`,`onDblclick`,`onMousedown`,`onTouchstart`],pl=[`id`],ml=[`fill`],hl=[`id`],gl=[`fill`],_l=[`x1`,`y1`,`x2`,`y2`,`stroke`],vl=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-opacity`,`marker-end`,`marker-start`,`onClick`],yl=[`x`,`y`,`fill`],bl=[`x`,`y`],xl=[`x`,`y`,`fill`],Sl=[`x`,`y`],Cl=[`cx`,`cy`,`fill`,`stroke`,`onMousedown`,`onTouchstart`],wl=[`cx`,`cy`,`fill`,`stroke`,`onMousedown`,`onTouchstart`],Tl={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`}},El={class:`flex flex-col field-gap w-full`},Dl=[`for`],Ol={key:0,class:`cui-input-error`},kl={class:`flex flex-col field-gap w-full`},Al=[`for`],jl={class:`flex flex-col field-gap w-full`},Ml=[`for`],Nl={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner mt-auto`},Pl={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner`},Fl={class:`flex flex-col field-gap w-full`},Il=[`for`],Ll={key:0,class:`cui-input-error`},Rl={class:`flex flex-col field-gap w-full`},zl=[`for`],Bl={class:`flex flex-col field-gap w-full`},Vl=[`for`],Hl={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner mt-auto`},Ul={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner`},Wl=nr(Z({__name:`ZoneEditor`,props:{cameraName:{},zones:{},lines:{},initialTab:{},initialSelection:{}},setup(e,{expose:t}){let n=new Vr,r=e,a=Ke(),{t:o}=i(),s=bt(`dialogRefProps`),{mutateAsync:c,isPending:l}=n.patchZonesQuery(),{mutateAsync:u,isPending:d}=n.patchLinesQuery(),{cameraName:f,zones:p}=Bt(r),m=It(`cameraCardRef`),h=It(`container`),g=It(`draggablesRef`),_=It(`outsideRef`),v=It(`playgroundContainerRef`),y=W(r.initialTab??`zones`),b=Lt([]),x=W([]),S=W([]),te=W(!1),ne=W([]),C=W(void 0),w=W(-1),re=W(-1),T=W(-1);r.initialSelection!==void 0&&((r.initialTab??`zones`)===`zones`?w.value=r.initialSelection:T.value=r.initialSelection);let ie={x:0,y:0},ae=!1,oe=null,E=ve(h),se=ve(v),ce=ui.element.shape.name,le=di.element.shape.name,ue=J(()=>{if(w.value<0)return``;let e=x.value[w.value];if(!e||e.isPrivacyMask)return``;let t=ce.safeParse(e.name);return t.success?``:t.error.issues[0]?.message??``}),de=J(()=>{if(T.value<0)return``;let e=S.value[T.value];if(!e)return``;let t=le.safeParse(e.name);return t.success?``:t.error.issues[0]?.message??``}),O=J(()=>Math.max(0,se.width.value-20)),k=J(()=>Math.max(0,se.height.value-20)),fe=J(()=>[{label:o(`components.zone_editor.tab_zones`),value:`zones`},{label:o(`components.zone_editor.tab_lines`),value:`lines`}]),pe=J(()=>{let e=D.filter(e=>!el.includes(e));return e.length===0?[]:[{label:o(`components.zone_editor.base_labels`),items:e.map(e=>({label:e,value:e}))}]}),me=J(()=>{let e=D.filter(e=>!tl.includes(e));return e.length===0?[]:[{label:o(`components.zone_editor.base_labels`),items:e.map(e=>({label:e,value:e}))}]}),A=J(()=>!!(s.loading?.value||l.value||d.value)),he=J(()=>{let e=[];return te.value&&e.push(`customizing`),x.value?.length||e.push(`start`),e.join(` `)});function ge(){if(x.value){if(x.value.length===0){ne.value=[];return}ne.value=x.value.flatMap((e,t)=>e.points.map((e,n)=>({_id:`z${t}-p${n}`,zoneIndex:t,pointIndex:n,point:[e[0],e[1]]})))}}function j(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 _e(e,t){if(e.stopPropagation(),!v.value)return;Ae(te.value),ae=!0,w.value=t;let n=v.value.getBoundingClientRect(),{x:r,y:i}=j(e),a=O.value,o=k.value;ie.x=(r-n.left-10)/a*100,ie.y=(i-n.top-10)/o*100}function ye(e){if(!ae||!v.value||w.value===-1||!x.value.length)return;let t=v.value.getBoundingClientRect(),{x:n,y:r}=j(e),i=O.value,a=k.value,o=(n-t.left-10)/i*100,s=(r-t.top-10)/a*100,c=o-ie.x,l=s-ie.y,u=x.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;b.value.find(t=>t.id===`z${w.value}-p${e}`)?.setPosition(t,n)}ie.x=o,ie.y=s}function be(){setTimeout(()=>{ae=!1},100)}function xe(){!x.value.length||w.value===-1||(x.value[w.value].isPrivacyMask=!x.value[w.value].isPrivacyMask)}function Se(){x.value[w.value]&&(x.value[w.value].filter=x.value[w.value].filter===`include`?`exclude`:`include`)}function Ce(){x.value[w.value]&&(x.value[w.value].type=x.value[w.value].type===`intersect`?`contain`:`intersect`)}function we(e){if(!te.value||ae)return;let t=C.value===void 0?x.value.length:C.value,n=Math.min(Math.max(Math.round((e.offsetX-10)/O.value*100),0),100),r=Math.min(Math.max(Math.round((e.offsetY-10)/k.value*100),0),100);if(C.value===void 0){let e=`zone-${Date.now()}`;x.value.push({name:e,points:[],filter:`include`,type:`contain`,labels:[`motion`,`person`,`vehicle`,`animal`],isPrivacyMask:!1,color:Ie()}),C.value=x.value.length-1}x.value[t].points.push([n,r]),ge(),Ut(()=>{let e=x.value[t].points.length-1;Te({_id:`z${t}-p${e}`,zoneIndex:t,pointIndex:e,point:[n,r]})})}function Te(e){if(e.zoneIndex===void 0||e.pointIndex===void 0)return;let t=g.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 Ee(e){if(!x.value.length)return;let t=Math.round(e.point[0]/O.value*100),n=Math.round(e.point[1]/k.value*100);x.value[e.zoneIndex].points[e.pointIndex]=[t,n]}function Oe(){te.value=!0,C.value=void 0}function Ae(e){if(C.value===void 0){te.value=!1;return}te.value=e||!1;let t=C.value;!x.value[t]||!x.value[t].points||(x.value[t].points.length<3?(x.value.splice(t,1),ge()):(g.value?.forEach(e=>Ge(e)),w.value=t),C.value=void 0)}function je(){te.value=!0,C.value=w.value}function Me(){w.value===-1||!x.value.length||(x.value.splice(w.value,1),w.value=Math.max(-1,w.value-1),ge(),Ut(()=>{Be()}))}function Ne(){if(x.value?.length){if(te.value&&C.value!==void 0){let e=x.value[C.value];e.points.length&&(e.points.pop(),e.points.length===0&&(x.value.splice(C.value,1),C.value=void 0),ge());return}x.value.length>0&&(x.value.pop(),ge(),Ut(()=>{Be()}))}}function Pe(){ae=!1,te.value=!1,C.value=void 0,x.value&&(x.value.length=0,ne.value=[],Ut(()=>{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 Re(e){if(!e||!e.length)return``;let t=e.map(e=>{let t=Math.round(e[0]/100*O.value),n=Math.round(e[1]/100*k.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){te.value||(w.value=e)}function Be(){Ve(),g.value?.forEach(e=>{if(!e.dataset.zoneIndex||!e.dataset.pointIndex)return;let t=parseInt(e.dataset.zoneIndex),n=parseInt(e.dataset.pointIndex);if(!x.value[t]||!x.value[t].points[n])return;let r=x.value[t].points[n];r&&(Ue(e,r),Ge(e))})}function Ve(){b.value.forEach(e=>e.destroy()),b.value=[]}function He(e){!x.value.length||!x.value[e.zoneIndex]||x.value[e.zoneIndex].points.length<4||(x.value[e.zoneIndex].points.splice(e.pointIndex,1),ge(),Ut(()=>{Be()}))}function Ue(e,t){Object.assign(e.style,We(t))}function We(e){return{left:Math.round(e[0]/100*O.value)+`px`,top:Math.round(e[1]/100*k.value)+`px`}}function Ge(e){e.classList.add(`draggable`);let t=new $c.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;Ee({_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,b.value.push(t)}function qe(e,t,n){e.preventDefault(),T.value=t,oe={lineIndex:t,pointIndex:n};let r=e=>{if(!oe||!v.value)return;let t=v.value.getBoundingClientRect(),{x:n,y:r}=j(e),i=Math.min(Math.max((n-t.left-10)/O.value*100,0),100),a=Math.min(Math.max((r-t.top-10)/k.value*100,0),100);S.value[oe.lineIndex].points[oe.pointIndex]=[Math.round(i),Math.round(a)]},i=()=>{oe=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 Je(){S.value.push({name:`line-${Date.now()}`,points:[[40,30],[60,70]],direction:`both`,labels:[`person`,`vehicle`,`animal`,`package`],color:Ie()}),T.value=S.value.length-1}function Ye(){T.value<0||!S.value.length||(S.value.splice(T.value,1),T.value=Math.max(-1,T.value-1))}function Xe(){if(T.value<0)return;let e=S.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 Ze(e){let t=O.value,n=k.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,_=c+p/2,v=f/d,y=p/d,b=10+t,x=10+n,ee=(e,t)=>({x:Math.max(19,Math.min(b-9,e)),y:Math.max(19,Math.min(x-9,t))}),S=ee(m-v*21,h-y*21),te=ee(g+v*21,_+y*21);return{h1x:r,h1y:i,h2x:a,h2y:o,ax:S.x+v*15,ay:S.y+y*15,bx:te.x-v*15,by:te.y-y*15,labelAx:S.x,labelAy:S.y,labelBx:te.x,labelBy:te.y}}async function Qe(){try{let e=[];e.push(c({cameraname:f.value,zoneData:x.value})),e.push(u({cameraname:f.value,lineData:S.value})),await Promise.all(e)}catch(e){return a.add({severity:`error`,detail:e,life:3e3}),null}}return De(_,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&&!te.value&&!o&&!s&&!c&&(w.value=-1)}),M(re,()=>{re.value=-1}),M(w,(e,t)=>{if(e===-1&&x.value?.length&&x.value[t]){w.value=t;return}e===-1&&x.value?.length&&(re.value=0)}),M(p,()=>{x.value=pt(p.value),ge()},{deep:!0,immediate:!0}),M(()=>r.lines,()=>{S.value=pt(r.lines)},{deep:!0,immediate:!0}),M(y,e=>{e===`zones`?x.value.length&&(w.value<0||w.value>=x.value.length)&&(w.value=0):S.value.length&&(T.value<0||T.value>=S.value.length)&&(T.value=0)},{immediate:!0}),M([se.width,se.height],()=>{Be()}),Tt(async()=>{setTimeout(()=>{Be()})}),t({isLoading:A,onConfirm:Qe}),(e,t)=>{let n=Qn,r=Le,i=ee,a=mn,o=Tn,s=Mn,c=fn,l=si,u=Fe,d=pi,p=Mr,h=Zr,b=Qc,re=Yc,ie=Kc,ae=fi,oe=Uc,se=Bc,ce=Lc,le=Pc,D=ke;return $(),U(`div`,nl,[V(`div`,rl,[V(`div`,il,[V(`div`,{ref_key:`outsideRef`,ref:_},null,512),V(`div`,{class:P([`w-full flex justify-center gap-3`,{"flex-row items-stretch":R(E).width.value>740,"flex-col":R(E).width.value<=740}])},[V(`div`,al,[V(`div`,ol,[V(`div`,{ref_key:`playgroundContainerRef`,ref:v,class:`playground-container flex w-full h-full min-w-0`},[V(`section`,{class:P([`playground w-full h-full`,R(he)]),onClick:we},[V(`div`,sl,[V(`div`,cl,[($(!0),U(K,null,B(R(ne),e=>qt(($(),U(`div`,{key:e._id,ref_for:!0,ref_key:`draggablesRef`,ref:g,class:`handle`,"data-id":e._id,"data-point":`${e.zoneIndex}-${e.pointIndex}`,"data-point-index":e.pointIndex,"data-zone-index":e.zoneIndex,onDblclick:Rt(t=>He(e),[`prevent`])},[...t[8]||=[V(`div`,{class:`delete-point`},null,-1)]],40,ll)),[[Kt,R(y)===`zones`]])),128)),V(`div`,ul,[($(),U(`svg`,dl,[R(y)===`zones`?($(!0),U(K,{key:0},B(R(x),(e,t)=>($(),U(`path`,{key:`zone-${t}`,d:Re(e.points),class:P([`cursor-pointer`,{dash:e.type===`intersect`&&!e.isPrivacyMask,selected:R(w)===t}]),style:z({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=>_e(e,t),onMousemove:ye,onMouseup:be,onTouchstart:e=>_e(e,t),onTouchmove:ye,onTouchend:be},null,46,fl))),128)):q(``,!0),R(y)===`lines`?($(),U(K,{key:1},[V(`defs`,null,[($(!0),U(K,null,B(R(S),(e,t)=>($(),U(`marker`,{id:`editor-arrow-ab-${t}`,key:`marker-ab-${t}`,markerWidth:`6`,markerHeight:`5`,refX:`5`,refY:`2.5`,orient:`auto`,markerUnits:`strokeWidth`},[V(`path`,{d:`M0,0 L6,2.5 L0,5 Z`,fill:e.color},null,8,ml)],8,pl))),128)),($(!0),U(K,null,B(R(S),(e,t)=>($(),U(`marker`,{id:`editor-arrow-ba-${t}`,key:`marker-ba-${t}`,markerWidth:`6`,markerHeight:`5`,refX:`1`,refY:`2.5`,orient:`auto`,markerUnits:`strokeWidth`},[V(`path`,{d:`M6,0 L0,2.5 L6,5 Z`,fill:e.color},null,8,gl)],8,hl))),128))]),($(!0),U(K,null,B(R(S),(e,t)=>($(),U(K,{key:`line-${t}`},[V(`line`,{x1:Ze(e).h1x,y1:Ze(e).h1y,x2:Ze(e).h2x,y2:Ze(e).h2y,stroke:e.color,"stroke-width":`2`,"stroke-dasharray":`6,4`,opacity:`0.6`},null,8,_l),V(`line`,{x1:Ze(e).ax,y1:Ze(e).ay,x2:Ze(e).bx,y2:Ze(e).by,stroke:e.color,"stroke-width":`3`,class:`cursor-pointer`,"stroke-opacity":R(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,vl),V(`rect`,{x:Ze(e).labelAx-9,y:Ze(e).labelAy-9,width:`18`,height:`18`,rx:`4`,fill:e.color},null,8,yl),V(`text`,{x:Ze(e).labelAx,y:Ze(e).labelAy,fill:`#fff`,"font-size":`11`,"font-weight":`bold`,"text-anchor":`middle`,"dominant-baseline":`central`},` A `,8,bl),V(`rect`,{x:Ze(e).labelBx-9,y:Ze(e).labelBy-9,width:`18`,height:`18`,rx:`4`,fill:e.color},null,8,xl),V(`text`,{x:Ze(e).labelBx,y:Ze(e).labelBy,fill:`#fff`,"font-size":`11`,"font-weight":`bold`,"text-anchor":`middle`,"dominant-baseline":`central`},` B `,8,Sl),V(`circle`,{cx:Ze(e).h1x,cy:Ze(e).h1y,r:`8`,fill:e.color,stroke:R(T)===t?`#fff`:e.color,"stroke-width":`2`,class:`cursor-grab`,onMousedown:Rt(e=>qe(e,t,0),[`stop`]),onTouchstart:Rt(e=>qe(e,t,0),[`stop`])},null,40,Cl),V(`circle`,{cx:Ze(e).h2x,cy:Ze(e).h2y,r:`8`,fill:e.color,stroke:R(T)===t?`#fff`:e.color,"stroke-width":`2`,class:`cursor-grab`,onMousedown:Rt(e=>qe(e,t,1),[`stop`]),onTouchstart:Rt(e=>qe(e,t,1),[`stop`])},null,40,wl)],64))),128))],64)):q(``,!0)]))])]),t[9]||=V(`div`,{class:`shadowboard on`},null,-1)])],2)],512)]),V(`div`,Tl,[Q(n,{ref_key:`cameraCardRef`,ref:m,"camera-info":R(f),"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`])])]),V(`div`,{class:P([`w-full flex flex-col gap-6 zone-buttons items-center self-stretch`,{"!gap-3":R(E).width.value>740}]),style:z({"max-width":R(E).width.value>740?`300px`:void 0})},[Q(r,{modelValue:R(y),"onUpdate:modelValue":t[0]||=e=>Gt(y)?y.value=e:null,options:R(fe),"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`]),R(y)===`lines`?($(),U(K,{key:0},[V(`div`,El,[V(`label`,{for:`line[${R(T)}].name`,class:`cui-label`},F(e.$t(`components.form.label.name`)),9,Dl),Q(a,null,{default:G(()=>[Q(i,{"model-value":R(S)[R(T)]?.name,invalid:!!R(de),loading:R(A),disabled:R(T)<0,type:`text`,onValueChange:t[1]||=e=>{R(S)[R(T)]&&(R(S)[R(T)].name=e??``)}},null,8,[`model-value`,`invalid`,`loading`,`disabled`])]),_:1}),Q(N,{name:`fade`},{default:G(()=>[R(de)?($(),U(`span`,Ol,F(R(de)),1)):q(``,!0)]),_:1})]),V(`div`,kl,[V(`label`,{for:`line[${R(T)}].labels`,class:`cui-label`},F(e.$t(`components.form.label.labels`)),9,Al),Q(a,null,{default:G(()=>[Q(o,{"model-value":R(S)[R(T)]?.labels,options:R(me),loading:R(A),"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=>{R(S)[R(T)]&&(R(S)[R(T)].labels=e)}},null,8,[`model-value`,`options`,`loading`])]),_:1})]),V(`div`,jl,[V(`label`,{for:`line[${R(T)}].color`,class:`cui-label`},F(e.$t(`components.form.label.color`)),9,Ml),Q(a,null,{default:G(()=>[Q(i,{"model-value":R(S)[R(T)]?.color,loading:R(A),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),Q(c,null,{default:G(()=>[($(),H(s,{key:R(T),"model-value":R(S)[R(T)]?.color,format:`hex`,onValueChange:t[3]||=e=>e&&R(S)[R(T)]?R(S)[R(T)].color=`#${e}`:null},null,8,[`model-value`]))]),_:1})]),_:1})]),V(`div`,Nl,[qt(($(),H(u,{loading:R(A),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Je},{icon:G(()=>[Q(l,{width:`20px`,height:`20px`})]),_:1},8,[`loading`])),[[D,{value:e.$t(`components.form.tooltip.new`)},void 0,{top:!0}]]),qt(($(),H(u,{loading:R(A),disabled:!R(S).length||R(T)<0,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ye},{icon:G(()=>[Q(d,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[D,{value:e.$t(`components.form.tooltip.delete`)},void 0,{top:!0}]])]),V(`div`,Pl,[qt(($(),H(u,{loading:R(A),disabled:R(T)<0,severity:`secondary`,class:`!rounded-none !h-full w-[80px] text-sm`,onClick:Xe},{default:G(()=>[X(F(R(S)[R(T)]?.direction===`both`?`A ↔ B`:R(S)[R(T)]?.direction===`a-to-b`?`A → B`:`B → A`),1)]),_:1},8,[`loading`,`disabled`])),[[D,{value:R(S)[R(T)]?.direction===`both`?`A ↔ B`:R(S)[R(T)]?.direction===`a-to-b`?`A → B`:`B → A`},void 0,{top:!0}]])])],64)):q(``,!0),R(y)===`zones`?($(),U(K,{key:1},[V(`div`,Fl,[V(`label`,{for:`zone[${R(w)}].name`,class:`cui-label`},F(e.$t(`components.form.label.name`)),9,Il),Q(a,null,{default:G(()=>[Q(i,{"model-value":R(x)[R(w)]?.name,invalid:!!R(ue),loading:R(A),disabled:R(w)<0||R(x)[R(w)]?.isPrivacyMask,type:`text`,onValueChange:t[4]||=e=>{R(x)[R(w)]&&(R(x)[R(w)].name=e??``)}},null,8,[`model-value`,`invalid`,`loading`,`disabled`])]),_:1}),Q(N,{name:`fade`},{default:G(()=>[R(ue)?($(),U(`span`,Ll,F(R(ue)),1)):q(``,!0)]),_:1})]),V(`div`,Rl,[V(`label`,{for:`zone[${R(w)}].labels`,class:`cui-label`},F(e.$t(`components.form.label.labels`)),9,zl),Q(a,null,{default:G(()=>[Q(o,{"model-value":R(x)[R(w)]?.labels,options:R(pe),disabled:R(x)[R(w)]?.isPrivacyMask,loading:R(A),"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=>R(x)[R(w)].labels=e},null,8,[`model-value`,`options`,`disabled`,`loading`])]),_:1})]),V(`div`,Bl,[V(`label`,{for:`zone[${R(w)}].color`,class:`cui-label`},F(e.$t(`components.form.label.color`)),9,Vl),Q(a,null,{default:G(()=>[Q(i,{"model-value":R(x)[R(w)]?.color,disabled:R(x)[R(w)]?.isPrivacyMask,loading:R(A),readonly:``,type:`text`},null,8,[`model-value`,`disabled`,`loading`]),Q(c,null,{default:G(()=>[($(),H(s,{key:R(w),"model-value":R(x)[R(w)]?.color,format:`hex`,disabled:R(x)[R(w)]?.isPrivacyMask,onValueChange:t[6]||=e=>e?R(x)[R(w)].color=`#${e}`:null},null,8,[`model-value`,`disabled`]))]),_:1})]),_:1})]),V(`div`,Hl,[R(te)?qt(($(),H(u,{key:1,disabled:R(C)!==void 0&&R(x)[R(C)]?.points?.length<3,loading:R(A),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:t[7]||=e=>Ae(!1)},{icon:G(()=>[Q(p,{width:`20px`,height:`20px`})]),_:1},8,[`disabled`,`loading`])),[[D,{value:e.$t(`components.form.tooltip.finish`)},void 0,{top:!0}]]):qt(($(),H(u,{key:0,loading:R(A),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Oe},{icon:G(()=>[Q(l,{width:`20px`,height:`20px`})]),_:1},8,[`loading`])),[[D,{value:e.$t(`components.form.tooltip.new`)},void 0,{top:!0}]]),qt(($(),H(u,{loading:R(A),disabled:!R(x).length||R(w)<0||R(te),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:je},{icon:G(()=>[Q(h,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[D,{value:e.$t(`components.form.tooltip.edit`)},void 0,{top:!0}]]),qt(($(),H(u,{loading:R(A),disabled:!R(x).length||R(w)<0,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Me},{icon:G(()=>[Q(d,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[D,{value:e.$t(`components.form.tooltip.delete`)},void 0,{top:!0}]]),qt(($(),H(u,{loading:R(A),disabled:!R(x).length,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ne},{icon:G(()=>[Q(b,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[D,{value:e.$t(`components.form.tooltip.undo`)},void 0,{top:!0}]]),qt(($(),H(u,{loading:R(A),disabled:!R(x).length,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Pe},{icon:G(()=>[Q(re,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[D,{value:e.$t(`components.form.tooltip.clear`)},void 0,{top:!0}]])]),V(`div`,Ul,[qt(($(),H(u,{loading:R(A),disabled:!(R(x).length&&R(w)>=0&&R(x)[R(w)]),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:xe},{icon:G(()=>[R(x)[R(w)]?.isPrivacyMask?($(),H(ie,{key:0,width:`20px`,height:`20px`})):($(),H(ae,{key:1,width:`20px`,height:`20px`}))]),_:1},8,[`loading`,`disabled`])),[[D,{value:R(x)[R(w)]?.isPrivacyMask?e.$t(`components.form.tooltip.privacy_mask`):e.$t(`components.form.tooltip.public_mask`)},void 0,{top:!0}]]),qt(($(),H(u,{loading:R(A),disabled:R(x)[R(w)]?.isPrivacyMask,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Se},{icon:G(()=>[R(x)[R(w)]?.filter===`include`?($(),H(oe,{key:0,width:`20px`,height:`20px`})):($(),H(se,{key:1,width:`20px`,height:`20px`}))]),_:1},8,[`loading`,`disabled`])),[[D,{value:R(x)[R(w)]?.filter===`include`?e.$t(`components.form.tooltip.include`):e.$t(`components.form.tooltip.exclude`)},void 0,{top:!0}]]),qt(($(),H(u,{loading:R(A),disabled:R(x)[R(w)]?.isPrivacyMask,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ce},{icon:G(()=>[R(x)[R(w)]?.type===`intersect`?($(),H(ce,{key:0,width:`20px`,height:`20px`})):($(),H(le,{key:1,width:`20px`,height:`20px`}))]),_:1},8,[`loading`,`disabled`])),[[D,{value:R(x)[R(w)]?.type===`intersect`?e.$t(`components.form.tooltip.intersect`):e.$t(`components.form.tooltip.contain`)},void 0,{top:!0}]])])],64)):q(``,!0)],6)],2)])])],512)}}}),[[`__scopeId`,`data-v-5f061a75`]]),Gl={class:`text-color font-normal`},Kl={class:`flex flex-col gap-6`},ql={for:`name`,class:`cui-label`},Jl={for:`room`,class:`cui-label`},Yl={class:`flex gap-2`},Xl={for:`type`,class:`cui-label`},Zl={class:`w-full flex flex-col gap-2`},Ql={class:`flex items-center gap-4`},$l={class:`flex flex-col field-switch-gap`},eu={for:`disabled`,class:`cui-label-switch`},tu={class:`text-color font-normal`},nu={class:`flex flex-col gap-6`},ru={for:`info.manufacturer`,class:`cui-label`},iu={for:`info.model`,class:`cui-label`},au={for:`info.hardware`,class:`cui-label`},ou={for:`info.serialNumber`,class:`cui-label`},su={for:`info.firmwareVersion`,class:`cui-label`},cu={for:`info.supportUrl`,class:`cui-label`},lu={class:`text-color font-normal`},uu={class:`flex flex-col gap-6`},du={for:`interfaceSettings.streamingMode`,class:`cui-label`},fu={for:`interfaceSettings.streamingSource`,class:`cui-label`},pu={for:`interfaceSettings.aspectRatio`,class:`cui-label`},mu={class:`text-color font-normal`},hu={class:`flex flex-col gap-6`},gu={class:`w-full flex flex-col gap-2`},_u={class:`flex items-center gap-4`},vu={class:`flex flex-col field-switch-gap`},yu={for:`detectionSettings.snooze`,class:`cui-label-switch`},bu={for:`detectionSettings.motion.resolution`,class:`cui-label`},xu={for:`detectionSettings.motion.timeout`,class:`cui-label`},Su={for:`detectionSettings.object.confidence`,class:`cui-label`},Cu={class:`flex items-center gap-4`},wu={class:`flex flex-col field-switch-gap`},Tu={for:`detectionSettings.object.suppressStatic`,class:`cui-label-switch`},Eu={for:`detectionSettings.audio.minDecibels`,class:`cui-label`},Du={for:`detectionSettings.audio.timeout`,class:`cui-label`},Ou={for:`detectionSettings.sensor.timeout`,class:`cui-label`},ku={for:`detectionSettings.sensor.triggers`,class:`cui-label`},Au={class:`text-color font-normal`},ju={class:`flex flex-col gap-4`},Mu={key:0,class:`flex flex-col gap-2`},Nu={class:`flex flex-col flex-1 min-w-0`},Pu={class:`text-sm font-medium truncate`},Fu={class:`text-xs text-muted`},Iu={key:1,class:`text-sm text-muted text-center min-h-[30px]`},Lu={class:`text-color font-normal`},Ru={class:`flex flex-col gap-4`},zu={key:0,class:`flex flex-col gap-2`},Bu={class:`flex flex-col flex-1 min-w-0`},Vu={class:`text-sm font-medium truncate`},Hu={class:`text-xs text-muted`},Uu={key:1,class:`text-sm text-muted text-center min-h-[30px]`},Wu={class:`text-color font-normal`},Gu={class:`w-full flex flex-col gap-4`},Ku={class:`flex items-center gap-4`},qu={class:`flex flex-col field-switch-gap`},Ju={for:`ptzAutotrack.enabled`,class:`cui-label-switch`},Yu={class:`cui-label`},Xu={class:`cui-label`},Zu={class:`cui-label`},Qu={class:`cui-label`},$u={class:`cui-label`},ed={class:`cui-label`},td={class:`flex items-center gap-4`},nd={class:`flex flex-col field-switch-gap`},rd={for:`ptzAutotrack.returnToHome`,class:`cui-label-switch`},id={class:`cui-label`},ad={class:`text-color font-normal`},od={class:`flex flex-col gap-6`},sd={class:`w-full flex flex-col gap-2`},cd={class:`flex items-center gap-4`},ld={class:`flex flex-col field-switch-gap`},ud={for:`snapshotSettings.autoRefresh`,class:`cui-label-switch`},dd={for:`snapshotSettings.ttl`,class:`cui-label`},fd={for:`snapshotSettings.interval`,class:`cui-label`},pd={class:`text-color font-normal`},md={class:`flex flex-col gap-6`},hd={for:`frameWorkerSettings.fps`,class:`cui-label`},gd={class:`w-full flex flex-col gap-2`},_d={class:`flex items-center gap-4`},vd={class:`flex flex-col field-switch-gap`},yd={for:`frameWorkerSettings.hqSnapshots`,class:`cui-label-switch`},bd=Z({__name:`Settings`,props:Wt({camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:Wt([`close`],[`update:modelValue`]),setup(e,{emit:t}){let n=new Set([Te.Contact,Te.Occupancy,Te.Smoke,Te.Leak,Te.Doorbell,Te.Switch,Te.Light,Te.Siren,Te.Lock,Te.Garage,Te.SecuritySystem]),r=new Vr,a=new Vr,o=new Oc,s=e,c=t,l=Pt(e,`modelValue`),u=Zt(),d=$t(),f=Kr(),{t:p}=i(),{camera:m,cameraDevice:h,loading:g}=Bt(s),{sensors:_}=Be(h),{data:v,isBusy:y}=a.getRoomsQuery(),{mutateAsync:b,isPending:x}=r.removeCameraQuery(),{mutateAsync:S,isPending:te}=r.patchZonesQuery(),{mutateAsync:ne,isPending:C}=r.patchLinesQuery(),{data:w}=o.getVirtualSensorsQuery(),{mutateAsync:re,isPending:T}=o.createVirtualSensorQuery(),{mutateAsync:ie}=o.patchVirtualSensorQuery(),{mutateAsync:ae,isPending:oe}=o.deleteVirtualSensorQuery(),E=W([`camera`,`doorbell`]),se=W([`auto`,`mse`,`webrtc`,`webrtc/tcp`]),ce=W([`high-resolution`,`mid-resolution`,`low-resolution`]),le=W([`16:9`,`9:16`,`8:3`,`4:3`,`1:1`]),ue=W([`low`,`medium`,`high`]),de=W([]),D=J(()=>_.value.some(e=>e.type===Te.PTZ)),O=J(()=>(w.value??[]).filter(e=>e.cameraId===l.value._id)),k=J(()=>te.value||C.value),fe=J(()=>[...(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`)}))]),pe=J(()=>[{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`}]),me=J(()=>_.value.filter(e=>n.has(e.type)).map(e=>({label:e.displayName.value,value:_e(e.type,e.name,e.pluginId)}))),A=J(()=>new Set(me.value.map(e=>e.value))),he=J(()=>(l.value.detectionSettings.sensor?.triggers??[]).map(e=>_e(e.sensorType,e.sensorName,e.pluginId)).filter(e=>A.value.has(e))),ge=J(()=>{let e=v.value??[`Default`],t=new Set(e.map(e=>e.toLowerCase()));return[...e,...de.value.filter(e=>!t.has(e.toLowerCase()))].map(e=>({label:e===`Default`?p(`components.form.label.room_default`):e,value:e}))}),j=J(()=>g.value||x.value);function _e(e,t,n){return`${e}::${t}::${n}`}function ve(e){let t=(l.value.detectionSettings.sensor?.triggers??[]).filter(e=>!A.value.has(_e(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 ye(){f.openComponentDialog(ci,{data:{title:p(`components.dialog.title.create_room`),confirmText:p(`components.form.button.add`),contentProps:{}},onConfirm:e=>{if(!e)return;let t=ge.value.find(t=>t.value.toLowerCase()===e.toLowerCase()),n=t?.value??e;t||de.value.push(n),l.value.room=n}})}function be(){f.openComponentDialog(jc,{data:{title:p(`components.camera_options.virtual_sensor_create`),confirmText:p(`components.form.button.save`),loading:T,contentProps:{cameraId:l.value._id}},onConfirm:async e=>{e&&await re({data:e})}})}function xe(e){f.openComponentDialog(ms,{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 ie({id:e._id,data:{displayName:t}})}})}function Se(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:oe},onConfirm:async()=>{await ae({id:e._id})}})}function Ce(){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 b({cameraname:m.value.name}),u.path.includes(m.value.name)&&d.push({path:`/home`}),c(`close`)}catch{}}})}function we(e=[]){f.openComponentDialog(Wl,{data:{title:p(`components.zone_editor.edit_zones`),loading:j,contentProps:{cameraName:m.value.name,zones:e,lines:m.value.detectionLines??[]}}})}function Ee(e){f.openComponentDialog(Wl,{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 De(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 S({cameraname:m.value.name,zoneData:t})}else{let t=(m.value.detectionLines??[]).filter((t,n)=>n!==e.index);await ne({cameraname:m.value.name,lineData:t})}}})}return(e,t)=>{let n=gn,r=sn,i=ee,a=mn,o=pn,s=si,c=Fe,u=ln,d=on,f=jn,p=wn,h=Tn,g=Zr,_=oi,v=ai,b=an,x=ke;return $(),H(b,{multiple:``,class:`p-4`},{default:G(()=>[Q(f,{value:`general`},{default:G(()=>[Q(n,{class:`px-0 pt-0`},{default:G(()=>[V(`span`,Gl,F(e.$t(`components.camera_options.general`)),1)]),_:1}),Q(d,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,Kl,[Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.camera_options.general_hint`)),1)]),_:1}),Q(R(I),{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:G(({field:t,errors:n})=>[V(`label`,ql,F(e.$t(`components.form.label.name`)),1),Q(a,null,{default:G(()=>[Q(i,yt(t,{invalid:n.length>0,loading:R(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`name`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(I),{"model-value":l.value.room,name:`room`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Jl,F(e.$t(`components.form.label.room`)),1),V(`div`,Yl,[Q(o,{"model-value":l.value.room,options:R(ge),"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:R(y),class:`w-full`,"onUpdate:modelValue":t[1]||=e=>l.value.room=e},null,8,[`model-value`,`options`,`invalid`,`loading`]),qt(($(),H(c,{severity:`secondary`,outlined:``,class:`shrink-0 h-[42px] w-[42px] p-0`,onClick:ye},{icon:G(()=>[Q(s,{class:`w-4 h-4`})]),_:1})),[[x,e.$t(`components.form.button.create_room`),void 0,{top:!0}]])]),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.room`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":l.value.type,name:`type`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Xl,F(e.$t(`components.form.label.type`)),1),Q(a,null,{default:G(()=>[Q(o,{"model-value":l.value.type,options:R(E),invalid:n.length>0,loading:R(j),type:`text`,onValueChange:t[2]||=e=>l.value.type=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`type`,class:`cui-input-error`})]),_:1})]),_:1},8,[`model-value`]),V(`div`,Zl,[Q(R(I),{"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:G(({field:n,errors:i})=>[V(`div`,Ql,[V(`div`,$l,[V(`label`,eu,F(e.$t(`components.form.label.disabled`)),1),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.disable_camera`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`disabled`,class:`cui-input-switch-error`})]),_:1})]),Q(u,yt({"model-value":l.value.disabled},n,{invalid:i.length>0,loading:R(j),class:`ml-auto shrink-0`,onValueChange:t[3]||=e=>l.value.disabled=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),Q(c,{fluid:``,severity:`danger`,loading:R(j),class:`cui-button-medium`,label:e.$t(`components.form.button.remove`),onClick:t[4]||=e=>Ce()},null,8,[`loading`,`label`])])]),_:1})]),_:1}),Q(f,{value:`branding`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,tu,F(e.$t(`components.camera_options.branding`)),1)]),_:1}),Q(d,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,nu,[Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.camera_options.branding_hint`)),1)]),_:1}),Q(R(I),{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:G(({field:t,errors:n})=>[V(`label`,ru,F(e.$t(`components.form.label.manufacturer`)),1),Q(a,null,{default:G(()=>[Q(i,yt(t,{invalid:n.length>0,loading:R(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`info.manufacturer`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(I),{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:G(({field:t,errors:n})=>[V(`label`,iu,F(e.$t(`components.form.label.model`)),1),Q(a,null,{default:G(()=>[Q(i,yt(t,{invalid:n.length>0,loading:R(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`info.model`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(I),{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:G(({field:t,errors:n})=>[V(`label`,au,F(e.$t(`components.form.label.hardware_version`)),1),Q(a,null,{default:G(()=>[Q(i,yt(t,{invalid:n.length>0,loading:R(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`info.hardware`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(I),{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:G(({field:t,errors:n})=>[V(`label`,ou,F(e.$t(`components.form.label.serial_number`)),1),Q(a,null,{default:G(()=>[Q(i,yt(t,{invalid:n.length>0,loading:R(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`info.serialNumber`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(I),{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:G(({field:t,errors:n})=>[V(`label`,su,F(e.$t(`components.form.label.firmware_version`)),1),Q(a,null,{default:G(()=>[Q(i,yt(t,{invalid:n.length>0,loading:R(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`info.firmwareVersion`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Q(R(I),{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:G(({field:t,errors:n})=>[V(`label`,cu,F(e.$t(`components.form.label.support_url`)),1),Q(a,null,{default:G(()=>[Q(i,yt(t,{invalid:n.length>0,loading:R(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`info.supportUrl`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`])])]),_:1})]),_:1}),Q(f,{value:`interface`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,lu,F(e.$t(`components.camera_options.interface`)),1)]),_:1}),Q(d,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,uu,[Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.camera_options.interface_hint`)),1)]),_:1}),Q(R(I),{"model-value":l.value.interfaceSettings.streamingMode,name:`interfaceSettings.streamingMode`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,du,F(e.$t(`components.form.label.streaming_mode`)),1),Q(a,null,{default:G(()=>[Q(o,{"model-value":l.value.interfaceSettings.streamingMode,options:R(se),invalid:n.length>0,loading:R(j),type:`text`,onValueChange:t[11]||=e=>l.value.interfaceSettings.streamingMode=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`interfaceSettings.streamingMode`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.streaming_mode`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":l.value.interfaceSettings.streamingSource,name:`interfaceSettings.streamingSource`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,fu,F(e.$t(`components.form.label.streaming_source`)),1),Q(a,null,{default:G(()=>[Q(o,{"model-value":l.value.interfaceSettings.streamingSource,options:R(ce),invalid:n.length>0,loading:R(j),type:`text`,onValueChange:t[12]||=e=>l.value.interfaceSettings.streamingSource=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`interfaceSettings.streamingSource`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.streaming_source`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":l.value.interfaceSettings.aspectRatio,name:`interfaceSettings.aspectRatio`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,pu,F(e.$t(`components.form.label.aspect_ratio`)),1),Q(a,null,{default:G(()=>[Q(o,{"model-value":l.value.interfaceSettings.aspectRatio,options:R(le),invalid:n.length>0,loading:R(j),type:`text`,onValueChange:t[13]||=e=>l.value.interfaceSettings.aspectRatio=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`interfaceSettings.aspectRatio`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.aspect_ratio`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),Q(f,{value:`detection`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,mu,F(e.$t(`components.camera_options.detection`)),1)]),_:1}),Q(d,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,hu,[Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.camera_options.detection_hint`)),1)]),_:1}),V(`div`,gu,[Q(R(I),{"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:G(({field:n,errors:i})=>[V(`div`,_u,[V(`div`,vu,[V(`label`,yu,F(e.$t(`components.form.label.snooze`)),1),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.snooze_camera`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`detectionSettings.snooze`,class:`cui-input-switch-error`})]),_:1})]),Q(u,yt({"model-value":l.value.detectionSettings?.snooze},n,{invalid:i.length>0,loading:R(j),class:`ml-auto shrink-0`,onValueChange:t[14]||=e=>{l.value.detectionSettings&&(l.value.detectionSettings.snooze=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),Q(R(I),{"model-value":l.value.detectionSettings.motion.resolution,name:`detectionSettings.motion.resolution`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,bu,F(e.$t(`components.form.label.motion_resolution`)),1),Q(a,null,{default:G(()=>[Q(o,{"model-value":l.value.detectionSettings.motion.resolution,options:R(ue),invalid:n.length>0,loading:R(j),type:`text`,onValueChange:t[15]||=e=>l.value.detectionSettings.motion.resolution=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`detectionSettings.motion.resolution`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.motion_resolution`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":l.value.detectionSettings.motion.timeout,name:`detectionSettings.motion.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,xu,F(e.$t(`components.form.label.motion_timeout`)),1),Q(a,null,{default:G(()=>[Q(p,{"model-value":l.value.detectionSettings.motion.timeout,invalid:n.length>0,loading:R(j),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[16]||=e=>l.value.detectionSettings.motion.timeout=e??void 0,onInput:t[17]||=e=>l.value.detectionSettings.motion.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`detectionSettings.motion.timeout`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.motion_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":l.value.detectionSettings.object.confidence,name:`detectionSettings.object.confidence`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Su,F(e.$t(`components.form.label.confidence`)),1),Q(a,null,{default:G(()=>[Q(p,{"model-value":l.value.detectionSettings.object.confidence,invalid:n.length>0,loading:R(j),"show-buttons":``,step:.01,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[18]||=e=>l.value.detectionSettings.object.confidence=e??void 0,onInput:t[19]||=e=>l.value.detectionSettings.object.confidence=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`detectionSettings.object.confidence`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"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:G(({field:n,errors:i})=>[V(`div`,Cu,[V(`div`,wu,[V(`label`,Tu,F(e.$t(`components.form.label.suppress_static`)),1),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.suppress_static`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`detectionSettings.object.suppressStatic`,class:`cui-input-switch-error`})]),_:1})]),Q(u,yt({"model-value":l.value.detectionSettings.object.suppressStatic??!0},n,{invalid:i.length>0,loading:R(j),class:`ml-auto shrink-0`,onValueChange:t[20]||=e=>l.value.detectionSettings.object.suppressStatic=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),Q(R(I),{"model-value":l.value.detectionSettings.audio.minDecibels,name:`detectionSettings.audio.minDecibels`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Eu,F(e.$t(`components.form.label.audio_min_decibels`)),1),Q(a,null,{default:G(()=>[Q(p,{"model-value":l.value.detectionSettings.audio.minDecibels,invalid:n.length>0,loading:R(j),"show-buttons":``,step:1,min:-100,max:0,mode:`decimal`,"use-grouping":!1,onValueChange:t[21]||=e=>l.value.detectionSettings.audio.minDecibels=e??void 0,onInput:t[22]||=e=>l.value.detectionSettings.audio.minDecibels=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`detectionSettings.audio.minDecibels`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.audio_min_decibels`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":l.value.detectionSettings.audio.timeout,name:`detectionSettings.audio.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Du,F(e.$t(`components.form.label.audio_timeout`)),1),Q(a,null,{default:G(()=>[Q(p,{"model-value":l.value.detectionSettings.audio.timeout,invalid:n.length>0,loading:R(j),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[23]||=e=>l.value.detectionSettings.audio.timeout=e??void 0,onInput:t[24]||=e=>l.value.detectionSettings.audio.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`detectionSettings.audio.timeout`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.audio_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":l.value.detectionSettings.sensor?.timeout,name:`detectionSettings.sensor.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Ou,F(e.$t(`components.form.label.sensor_timeout`)),1),Q(a,null,{default:G(()=>[Q(p,{"model-value":l.value.detectionSettings.sensor?.timeout,invalid:n.length>0,loading:R(j),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[25]||=e=>{l.value.detectionSettings.sensor||(l.value.detectionSettings.sensor={timeout:30,triggers:[]}),l.value.detectionSettings.sensor.timeout=e??30},onInput:t[26]||=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),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`detectionSettings.sensor.timeout`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.sensor_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":l.value.detectionSettings.sensor?.triggers??[],name:`detectionSettings.sensor.triggers`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:t})=>[V(`label`,ku,F(e.$t(`components.form.label.sensor_triggers`)),1),Q(h,{"model-value":R(he),invalid:t.length>0,options:R(me),"option-label":`label`,"option-value":`value`,placeholder:e.$t(`components.form.hint.sensor_triggers_placeholder`),class:`w-full`,"show-toggle-all":!1,"onUpdate:modelValue":ve},null,8,[`model-value`,`invalid`,`options`,`placeholder`]),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`detectionSettings.sensor.triggers`,class:`cui-input-error`})]),_:1}),t.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.sensor_triggers`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),Q(f,{value:`sensors`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,Au,F(e.$t(`components.camera_options.virtual_sensors`)),1)]),_:1}),Q(d,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,ju,[Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.camera_options.virtual_sensors_hint`)),1)]),_:1}),R(O).length?($(),U(`div`,Mu,[($(!0),U(K,null,B(R(O),t=>($(),U(`div`,{key:t._id,class:`flex items-center gap-2 p-2 rounded-md border-color`},[V(`div`,Nu,[V(`span`,Pu,F(t.displayName||t.name),1),V(`span`,Fu,F(e.$t(`components.camera_options.sensor_type_${t.type}`)),1)]),qt(($(),H(c,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-sm shrink-0`,onClick:e=>xe(t)},{icon:G(()=>[Q(g,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[x,e.$t(`components.camera_options.sensor_display_name`),void 0,{top:!0}]]),qt(($(),H(c,{text:``,rounded:``,severity:`danger`,class:`cui-icon-sm shrink-0`,onClick:e=>Se(t)},{icon:G(()=>[Q(_,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[x,e.$t(`components.camera_options.virtual_sensor_delete`),void 0,{top:!0}]])]))),128))])):($(),U(`span`,Iu,F(e.$t(`components.camera_options.virtual_sensors_empty`)),1)),Q(c,{fluid:``,class:`cui-button-medium`,label:e.$t(`components.camera_options.virtual_sensor_create`),onClick:be},null,8,[`label`])])]),_:1})]),_:1}),Q(f,{value:`zones`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,Lu,F(e.$t(`components.camera_options.zones`)),1)]),_:1}),Q(d,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,Ru,[Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.camera_options.zones_hint`)),1)]),_:1}),R(fe).length?($(),U(`div`,zu,[($(!0),U(K,null,B(R(fe),t=>($(),U(`div`,{key:`${t.kind}-${t.index}`,class:`flex items-center gap-2 p-2 rounded-md border-color`},[V(`span`,{class:`w-2.5 h-2.5 rounded-full shrink-0`,style:z({background:t.color})},null,4),V(`div`,Bu,[V(`span`,Vu,F(t.name),1),V(`span`,Hu,F(t.typeLabel),1)]),qt(($(),H(c,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-sm shrink-0`,onClick:e=>Ee(t)},{icon:G(()=>[Q(g,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[x,e.$t(`components.zone_editor.edit_zones`),void 0,{top:!0}]]),qt(($(),H(c,{text:``,rounded:``,severity:`danger`,class:`cui-icon-sm shrink-0`,onClick:e=>De(t)},{icon:G(()=>[Q(_,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[x,e.$t(`components.camera_options.zone_entry_delete`),void 0,{top:!0}]])]))),128))])):($(),U(`span`,Uu,F(e.$t(`components.camera_options.zones_empty`)),1)),Q(c,{fluid:``,class:`cui-button-medium`,loading:R(j),label:e.$t(`components.form.button.edit_zones`),onClick:t[27]||=e=>we(R(m).detectionZones)},null,8,[`loading`,`label`])])]),_:1})]),_:1}),Q(f,{value:`ptzAutotrack`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,Wu,F(e.$t(`components.camera_options.ptz_autotrack`)),1)]),_:1}),Q(d,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,Gu,[Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.camera_options.ptz_autotrack_hint`)),1)]),_:1}),R(D)?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-banner cui-banner-warn`},{default:G(()=>[Q(v,{class:`w-4 h-4 shrink-0 inline-block mr-1`}),X(` `+F(e.$t(`components.form.hint.ptz_autotrack_requires`)),1)]),_:1})),Q(R(I),{"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:G(({field:n,errors:i})=>[V(`div`,Ku,[V(`div`,qu,[V(`label`,Ju,F(e.$t(`components.form.label.ptz_autotrack_enabled`)),1),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`ptzAutotrack.enabled`,class:`cui-input-switch-error`})]),_:1})]),Q(u,yt({"model-value":l.value.ptzAutotrack?.enabled},n,{invalid:i.length>0,loading:R(j),disabled:!R(D),class:`ml-auto shrink-0`,onValueChange:t[28]||=e=>{l.value.ptzAutotrack&&(l.value.ptzAutotrack.enabled=e)}}),null,16,[`model-value`,`invalid`,`loading`,`disabled`])])]),_:1},8,[`model-value`]),l.value.ptzAutotrack?.enabled&&R(D)?($(),U(K,{key:1},[Q(R(I),{"model-value":l.value.ptzAutotrack?.targetLabels,name:`ptzAutotrack.targetLabels`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Yu,F(e.$t(`components.form.label.ptz_autotrack_target_labels`)),1),Q(h,{"model-value":l.value.ptzAutotrack?.targetLabels,options:R(pe),"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:R(j),class:`w-full`,onValueChange:t[29]||=e=>{l.value.ptzAutotrack&&(l.value.ptzAutotrack.targetLabels=e)}},null,8,[`model-value`,`options`,`invalid`,`loading`]),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_target_labels`)),1)]),_:1})]),_:1},8,[`model-value`]),Q(R(I),{"model-value":l.value.ptzAutotrack?.minConfidence,name:`ptzAutotrack.minConfidence`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Xu,F(e.$t(`components.form.label.ptz_autotrack_min_confidence`)),1),Q(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:R(j),class:`w-full`,onValueChange:t[30]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.minConfidence=e)}},null,8,[`model-value`,`invalid`,`loading`]),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_min_confidence`)),1)]),_:1})]),_:1},8,[`model-value`]),Q(R(I),{"model-value":l.value.ptzAutotrack?.triggerDeadZone,name:`ptzAutotrack.triggerDeadZone`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Zu,F(e.$t(`components.form.label.ptz_autotrack_trigger_dead_zone`)),1),Q(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:R(j),class:`w-full`,onValueChange:t[31]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.triggerDeadZone=e)}},null,8,[`model-value`,`invalid`,`loading`]),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_trigger_dead_zone`)),1)]),_:1})]),_:1},8,[`model-value`]),Q(R(I),{"model-value":l.value.ptzAutotrack?.trackingSpeed??2,name:`ptzAutotrack.trackingSpeed`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,Qu,F(e.$t(`components.form.label.ptz_autotrack_tracking_speed`)),1),Q(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:R(j),class:`w-full`,onValueChange:t[32]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.trackingSpeed=e)}},null,8,[`model-value`,`invalid`,`loading`]),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_tracking_speed`)),1)]),_:1})]),_:1},8,[`model-value`]),Q(R(I),{"model-value":l.value.ptzAutotrack?.leadFrames??3,name:`ptzAutotrack.leadFrames`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,$u,F(e.$t(`components.form.label.ptz_autotrack_lead_frames`)),1),Q(p,{"model-value":l.value.ptzAutotrack?.leadFrames??3,min:0,max:6,step:1,invalid:n.length>0,loading:R(j),class:`w-full`,onValueChange:t[33]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.leadFrames=e)}},null,8,[`model-value`,`invalid`,`loading`]),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_lead_frames`)),1)]),_:1})]),_:1},8,[`model-value`]),Q(R(I),{"model-value":l.value.ptzAutotrack?.panRate??.85,name:`ptzAutotrack.panRate`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,ed,F(e.$t(`components.form.label.ptz_autotrack_pan_rate`)),1),Q(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:R(j),class:`w-full`,onValueChange:t[34]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.panRate=e)}},null,8,[`model-value`,`invalid`,`loading`]),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_pan_rate`)),1)]),_:1})]),_:1},8,[`model-value`]),Q(R(I),{"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:G(({field:n,errors:i})=>[V(`div`,td,[V(`div`,nd,[V(`label`,rd,F(e.$t(`components.form.label.ptz_autotrack_return_home`)),1),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_return_home`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`ptzAutotrack.returnToHome`,class:`cui-input-switch-error`})]),_:1})]),Q(u,yt({"model-value":l.value.ptzAutotrack?.returnToHome},n,{invalid:i.length>0,loading:R(j),class:`ml-auto shrink-0`,onValueChange:t[35]||=e=>{l.value.ptzAutotrack&&(l.value.ptzAutotrack.returnToHome=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),l.value.ptzAutotrack?.returnToHome?($(),H(R(I),{key:0,"model-value":l.value.ptzAutotrack?.homeWaitMs,name:`ptzAutotrack.homeWaitMs`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,id,F(e.$t(`components.form.label.ptz_autotrack_home_wait`)),1),Q(p,{"model-value":(l.value.ptzAutotrack?.homeWaitMs??0)/1e3,min:1,max:60,step:1,suffix:` s`,invalid:n.length>0,loading:R(j),class:`w-full`,onValueChange:t[36]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.homeWaitMs=e*1e3)}},null,8,[`model-value`,`invalid`,`loading`]),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.ptz_autotrack_home_wait`)),1)]),_:1})]),_:1},8,[`model-value`])):q(``,!0)],64)):q(``,!0)])]),_:1})]),_:1}),Q(f,{value:`snapshot`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,ad,F(e.$t(`components.camera_options.snapshot`)),1)]),_:1}),Q(d,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,od,[Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.camera_options.snapshot_hint`)),1)]),_:1}),V(`div`,sd,[Q(R(I),{"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:G(({field:n,errors:i})=>[V(`div`,cd,[V(`div`,ld,[V(`label`,ud,F(e.$t(`components.form.label.auto_refresh`)),1),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.auto_refresh`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`snapshotSettings.autoRefresh`,class:`cui-input-switch-error`})]),_:1})]),Q(u,yt({"model-value":l.value.snapshotSettings.autoRefresh},n,{invalid:i.length>0,loading:R(j),class:`ml-auto shrink-0`,onValueChange:t[37]||=e=>l.value.snapshotSettings.autoRefresh=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),Q(R(I),{"model-value":l.value.snapshotSettings.ttl,name:`snapshotSettings.ttl`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,dd,F(e.$t(`components.form.label.cache_time`)),1),Q(a,null,{default:G(()=>[Q(p,{"model-value":l.value.snapshotSettings.ttl,invalid:n.length>0,loading:R(j),min:10,"show-buttons":``,"use-grouping":!1,onValueChange:t[38]||=e=>l.value.snapshotSettings.ttl=e??10,onInput:t[39]||=e=>l.value.snapshotSettings.ttl=e.value??10},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`snapshotSettings.ttl`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.cache_time`)),1)]),_:1}))]),_:1},8,[`model-value`]),Q(R(I),{"model-value":l.value.snapshotSettings.interval,name:`snapshotSettings.interval`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,fd,F(e.$t(`components.form.label.refresh_interval`)),1),Q(a,null,{default:G(()=>[Q(p,{"model-value":l.value.snapshotSettings.interval,invalid:n.length>0,loading:R(j),min:10,max:60,"show-buttons":``,"use-grouping":!1,onValueChange:t[40]||=e=>l.value.snapshotSettings.interval=e??30,onInput:t[41]||=e=>l.value.snapshotSettings.interval=e.value??30},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`snapshotSettings.interval`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.refresh_interval`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),Q(f,{value:`frameworker`},{default:G(()=>[Q(n,{class:`px-0`},{default:G(()=>[V(`span`,pd,F(e.$t(`components.camera_options.frame_worker`)),1)]),_:1}),Q(d,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,md,[Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.camera_options.frame_worker_hint`)),1)]),_:1}),Q(R(I),{"model-value":l.value.frameWorkerSettings.fps,name:`frameWorkerSettings.fps`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:n})=>[V(`label`,hd,F(e.$t(`components.form.label.fps`)),1),Q(a,null,{default:G(()=>[Q(p,{"model-value":l.value.frameWorkerSettings.fps,invalid:n.length>0,loading:R(j),min:0,"show-buttons":``,"use-grouping":!1,onValueChange:t[42]||=e=>l.value.frameWorkerSettings.fps=e??void 0,onInput:t[43]||=e=>l.value.frameWorkerSettings.fps=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`frameWorkerSettings.fps`,class:`cui-input-error`})]),_:1}),n.length?q(``,!0):($(),H(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.frameworker_fps`)),1)]),_:1}))]),_:1},8,[`model-value`]),V(`div`,gd,[Q(R(I),{"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:G(({field:n,errors:i})=>[V(`div`,_d,[V(`div`,vd,[V(`label`,yd,F(e.$t(`components.form.label.hq_snapshots`)),1),Q(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.hq_snapshots`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`frameWorkerSettings.hqSnapshots`,class:`cui-input-switch-error`})]),_:1})]),Q(u,yt({"model-value":l.value.frameWorkerSettings.hqSnapshots},n,{invalid:i.length>0,loading:R(j),class:`ml-auto shrink-0`,onValueChange:t[44]||=e=>l.value.frameWorkerSettings.hqSnapshots=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])])])]),_:1})]),_:1})]),_:1})}}}),xd={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function Sd(e,t){return $(),U(`svg`,xd,[...t[0]||=[V(`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 Cd=Y({name:`fluent-arrow-sync-16-filled`,render:Sd}),wd={class:`flex items-center justify-between`},Td={class:`cui-label`},Ed={class:`flex flex-col field-gap`},Dd={class:`cui-label`},Od={class:`cui-label`},kd={class:`cui-label`},Ad={key:0,class:`flex flex-col field-gap`},jd={class:`cui-label`},Md={key:1,class:`flex flex-col field-gap`},Nd={class:`cui-label`},Pd=Z({__name:`CameraSource`,props:{cameraId:{},cameraName:{},source:{},loading:{type:Boolean}},setup(e){let t=new Vr,n=e,{t:r}=i(),{getSourceStatus:a,connect:o}=mi(),s=kt(),c=Ke(),l=[`probe`,`preload`],{cameraId:u,cameraName:d,source:f,loading:p}=Bt(n),m=W(!1),{data:h,isBusy:g}=t.probeCameraSourceQuery(d.value,f.value.name,{video:!0,audio:!0,microphone:!0});o();let _=J(()=>a(u.value,f.value.name)),v=J(()=>{switch(_.value){case`connected`:return`success`;case`connecting`:return`warn`;case`error`:return`danger`;default:return`secondary`}}),y=J(()=>{switch(_.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`)}}),b=J(()=>!!(p.value||g.value)),x=J(()=>h.value?.probe.consumers.filter(e=>!l.includes(e.format_name)).length||0),S=J(()=>ne(`video`)),te=J(()=>ne(`audio`));function ne(e){let t=(h.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 C(){if(!m.value){m.value=!0;try{let e=await Br({cameraname:d.value,sourcename:f.value.name,probeConfig:{video:!0,audio:!0,microphone:!0},force:!0});s.setQueryData([`cameras`,d.value,`probe`,f.value.name],e)}catch{c.add({severity:`error`,detail:r(`components.toast.probe_failed`),life:3e3})}finally{m.value=!1}}}return(e,t)=>{let n=bn,r=ee,i=Fe,a=fn,o=mn,s=sn,c=Hr,l=ke;return $(),U(K,null,[V(`div`,wd,[V(`label`,Td,F(e.$t(`components.form.label.stream_status`)),1),Q(n,{severity:R(v),value:R(y)},null,8,[`severity`,`value`])]),V(`div`,Ed,[V(`label`,Dd,F(e.$t(`components.form.label.connections`)),1),Q(o,null,{default:G(()=>[Q(r,{value:R(x),loading:R(b),readonly:``,type:`text`},null,8,[`value`,`loading`]),Q(a,null,{default:G(()=>[qt(($(),H(i,{severity:`secondary`,text:``,loading:R(m),disabled:R(b),onClick:C},{icon:G(()=>[Q(R(Cd),{class:`w-4 h-4`})]),_:1},8,[`loading`,`disabled`])),[[l,e.$t(`components.form.button.reload`),void 0,{left:!0}]])]),_:1})]),_:1}),Q(s,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.connections`)),1)]),_:1})]),($(!0),U(K,null,B(R(S),(t,n)=>($(),U(`div`,{key:n,class:`flex flex-col field-gap`},[V(`label`,Od,F(e.$t(`components.form.label.video_codec`)),1),Q(o,null,{default:G(()=>[Q(r,{"model-value":t,loading:R(b),readonly:``,type:`text`},null,8,[`model-value`,`loading`])]),_:2},1024),n===R(S).length-1?($(),H(s,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.video_codec`)),1)]),_:1})):q(``,!0)]))),128)),($(!0),U(K,null,B(R(te),(t,n)=>($(),U(`div`,{key:n,class:`flex flex-col field-gap`},[V(`label`,kd,F(e.$t(`components.form.label.audio_codec`)),1),Q(o,null,{default:G(()=>[Q(r,{"model-value":t,loading:R(b),readonly:``,type:`text`},null,8,[`model-value`,`loading`])]),_:2},1024),n===R(te).length-1?($(),H(s,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.audio_codec`)),1)]),_:1})):q(``,!0)]))),128)),R(f).role===`snapshot`?q(``,!0):($(),U(`div`,Ad,[V(`label`,jd,F(e.$t(`components.form.label.rtsp_url`)),1),Q(o,null,{default:G(()=>[Q(r,{"model-value":R(h)?.rtspUrl,loading:R(b),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),Q(a,null,{default:G(()=>[Q(c,{"action-text":e.$t(`components.form.tooltip.copied`),icon:R(Ur),"button-props":{severity:`secondary`,disabled:!R(h)?.rtspUrl,loading:R(b),text:!0},onAction:t[0]||=e=>R(ct)(R(h).rtspUrl)},null,8,[`action-text`,`icon`,`button-props`])]),_:1})]),_:1}),Q(s,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.rtsp_url`)),1)]),_:1})])),R(f).role===`snapshot`?q(``,!0):($(),U(`div`,Md,[V(`label`,Nd,F(e.$t(`components.form.label.onvif_url`)),1),Q(o,null,{default:G(()=>[Q(r,{"model-value":R(h)?.onvifUrl,loading:R(b),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),Q(a,null,{default:G(()=>[Q(c,{"action-text":e.$t(`components.form.tooltip.copied`),icon:R(Ur),"button-props":{severity:`secondary`,disabled:!R(h)?.onvifUrl,loading:R(b),text:!0},onAction:t[1]||=e=>R(ct)(R(h).onvifUrl)},null,8,[`action-text`,`icon`,`button-props`])]),_:1})]),_:1}),Q(s,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.onvif_url`)),1)]),_:1})]))],64)}}}),Fd={class:`flex gap-2 items-center w-full`},Id={class:`text-color font-normal`},Ld={class:`flex flex-col gap-6`},Rd=[`for`],zd=[`for`],Bd={class:`w-full flex flex-col gap-2`},Vd={class:`flex items-center gap-4`},Hd={class:`flex flex-col field-switch-gap`},Ud=[`for`],Wd={class:`flex items-center gap-4`},Gd={class:`flex flex-col field-switch-gap`},Kd=[`for`],qd={class:`flex items-center gap-4`},Jd={class:`flex flex-col field-switch-gap`},Yd=[`for`],Xd={class:`flex items-center gap-4`},Zd={class:`flex flex-col field-switch-gap`},Qd=[`for`],$d=[`for`],ef={class:`flex flex-col gap-6`},tf={class:`flex flex-col field-gap`},nf=[`for`],rf={class:`w-full flex items-center justify-center my-3`},af=Z({__name:`Sources`,props:Wt({camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:Wt([`close`],[`update:modelValue`]),setup(e){let t=e,n=Pt(e,`modelValue`),{t:r}=i(),{camera:a,loading:o}=Bt(t),s=W([`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){n.value.sources.splice(e,1)}function m(e,t){n.value.sources[e].urls.splice(t,1)}function h(){n.value&&n.value.sources.push({_id:``,name:``,role:null,urls:[],useForSnapshot:!1,hotMode:!0,preload:!0,muted:!1})}return(e,t)=>{let r=xr,i=Fe,g=gn,_=ee,v=mn,y=sn,b=Pd,x=pn,S=ln,te=fn,ne=on,C=jn,w=an,re=ti;return $(),U(K,null,[Q(w,{multiple:``,class:`p-4`},{default:G(()=>[($(!0),U(K,null,B(n.value.sources,(t,h)=>($(),H(C,{key:h,value:h},{default:G(()=>[Q(g,{class:P({"px-0 pt-0":h===0,"px-0":h!==0})},{default:G(()=>[V(`div`,Fd,[V(`span`,Id,F(e.$t(`components.camera_options.source`)+`: `+c(t)),1),Q(i,{text:``,rounded:``,loading:R(o),disabled:n.value.sources.length<2,severity:`danger`,class:`cui-icon-md ml-auto mr-2`,onClick:e=>p(h)},{icon:G(()=>[Q(r,{width:`100%`,height:`100%`})]),_:1},8,[`loading`,`disabled`,`onClick`])])]),_:2},1032,[`class`]),Q(ne,{pt:{content:{class:`px-0`}}},{default:G(()=>[V(`div`,Ld,[Q(R(I),{modelValue:t.name,"onUpdate:modelValue":e=>t.name=e,modelModifiers:{trim:!0},name:`sources[${h}].name`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:n,errors:r})=>[V(`label`,{for:`sources[${h}].name`,class:`cui-label`},F(e.$t(`components.form.label.source_name`)),9,Rd),Q(v,null,{default:G(()=>[Q(_,yt({ref_for:!0},n,{invalid:r.length>0,loading:R(o),readonly:R(a).sources.some(e=>e.name===t.name),type:`text`}),null,16,[`invalid`,`loading`,`readonly`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`sources[${h}].name`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),r.length?q(``,!0):($(),H(y,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.source_name`)),1)]),_:1}))]),_:2},1032,[`modelValue`,`onUpdate:modelValue`,`name`]),t._id?($(),H(b,{key:0,"camera-id":R(a)._id,"camera-name":R(a).name,source:t,loading:R(o)},null,8,[`camera-id`,`camera-name`,`source`,`loading`])):q(``,!0),Q(R(I),{"model-value":t.role,name:`sources[${h}].role`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:r})=>[V(`label`,{for:`sources[${h}].role`,class:`cui-label`},F(e.$t(`components.form.label.source_role`)),9,zd),Q(v,null,{default:G(()=>[Q(x,{"model-value":t.role,options:R(s).filter(e=>!n.value.sources.some(n=>n.role===e&&n._id!==t._id)),invalid:r.length>0,loading:R(o),onValueChange:e=>t.role=e},null,8,[`model-value`,`options`,`invalid`,`loading`,`onValueChange`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`sources[${h}].role`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),r.length?q(``,!0):($(),H(y,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.source_role`)),1)]),_:1}))]),_:2},1032,[`model-value`,`name`]),V(`div`,Bd,[t.role!==`snapshot`&&n.value.sources.length>1?($(),H(R(I),{key:0,"model-value":t.useForSnapshot,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${h}].useForSnapshot`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:r,errors:i})=>[V(`div`,Vd,[V(`div`,Hd,[V(`label`,{for:`sources[${h}].useForSnapshot`,class:`cui-label-switch`},F(e.$t(`components.form.label.use_for_snapshot`)),9,Ud),Q(y,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.use_for_snapshot`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`sources[${h}].useForSnapshot`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Q(S,yt({"model-value":t.useForSnapshot},{ref_for:!0},r,{invalid:i.length>0,loading:R(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`])):q(``,!0),t.role===`snapshot`?q(``,!0):($(),H(R(I),{key:1,"model-value":t.hotMode,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${h}].hotMode`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,Wd,[V(`div`,Gd,[V(`label`,{for:`sources[${h}].hotMode`,class:`cui-label-switch`},F(e.$t(`components.form.label.hot_mode`)),9,Kd),Q(y,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.hot_mode`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`sources[${h}].hotMode`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Q(S,yt({"model-value":t.hotMode},{ref_for:!0},n,{invalid:r.length>0,loading:R(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`?q(``,!0):($(),H(R(I),{key:2,"model-value":t.preload,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${h}].preload`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,qd,[V(`div`,Jd,[V(`label`,{for:`sources[${h}].preload`,class:`cui-label-switch`},F(e.$t(`components.form.label.preload`)),9,Yd),Q(y,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.preload`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`sources[${h}].preload`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Q(S,yt({"model-value":t.preload},{ref_for:!0},n,{invalid:r.length>0,loading:R(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`?q(``,!0):($(),H(R(I),{key:3,"model-value":t.muted,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${h}].muted`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:G(({field:n,errors:r})=>[V(`div`,Xd,[V(`div`,Zd,[V(`label`,{for:`sources[${h}].muted`,class:`cui-label-switch`},F(e.$t(`components.form.label.muted`)),9,Qd),Q(y,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.muted`)),1)]),_:1}),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`sources[${h}].muted`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Q(S,yt({"model-value":t.muted},{ref_for:!0},n,{invalid:r.length>0,loading:R(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`?q(``,!0):($(),H(R(I),{key:1,"model-value":u(h),name:`sources[${h}].childSourceId`,as:`div`,class:`flex flex-col field-gap`},{default:G(({errors:t})=>[V(`label`,{for:`sources[${h}].childSourceId`,class:`cui-label`},F(e.$t(`components.form.label.pip_source`)),9,$d),Q(v,null,{default:G(()=>[Q(x,{"model-value":u(h),options:l(h),"option-label":`label`,"option-value":`value`,invalid:t.length>0,loading:R(o),placeholder:e.$t(`components.form.label.none`),"show-clear":``,onValueChange:e=>d(h,e)},null,8,[`model-value`,`options`,`invalid`,`loading`,`placeholder`,`onValueChange`])]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`sources[${h}].childSourceId`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),t.length?q(``,!0):($(),H(y,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.pip_source`)),1)]),_:1}))]),_:2},1032,[`model-value`,`name`])),V(`div`,ef,[V(`div`,tf,[V(`label`,{for:`sources[${h}].urls[]`,class:`cui-label`},F(e.$t(`components.form.label.sources`)),9,nf),Q(y,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:G(()=>[X(F(e.$t(`components.form.hint.source_urls`)),1)]),_:1})]),($(!0),U(K,null,B(t.urls,(e,n)=>($(),H(R(I),{key:n,modelValue:t.urls[n],"onUpdate:modelValue":e=>t.urls[n]=e,modelModifiers:{trim:!0},name:`sources[${h}].urls[${n}]`,as:`div`,class:`flex flex-col field-gap`},{default:G(({field:e,errors:a})=>[Q(v,null,{default:G(()=>[Q(_,yt({ref_for:!0},e,{invalid:a.length>0,loading:R(o),type:`text`}),null,16,[`invalid`,`loading`]),t.urls.length>1?($(),H(te,{key:0},{default:G(()=>[Q(i,{text:``,severity:`secondary`,loading:R(o),class:`cui-icon-md`,onClick:e=>m(h,n)},{icon:G(()=>[Q(r,{width:`100%`,height:`100%`})]),_:1},8,[`loading`,`onClick`])]),_:2},1024)):q(``,!0)]),_:2},1024),Q(N,{name:`fade`},{default:G(()=>[Q(R(L),{name:`sources[${h}].urls[${n}]`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`,`name`]))),128)),Q(i,{loading:R(o),label:e.$t(`components.form.button.add_source`),class:`ml-auto cui-button-medium`,onClick:e=>f(h)},null,8,[`loading`,`label`,`onClick`])])])]),_:2},1024)]),_:2},1032,[`value`]))),128))]),_:1}),V(`div`,rf,[Q(i,{text:``,rounded:``,loading:R(o),class:`cui-icon-xl`,onClick:h},{icon:G(()=>[Q(re,{width:`100%`,height:`100%`})]),_:1},8,[`loading`])])],64)}}}),of={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function sf(e,t){return $(),U(`svg`,of,[...t[0]||=[V(`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 cf=Y({name:`lucide-battery-warning`,render:sf}),lf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function uf(e,t){return $(),U(`svg`,lf,[...t[0]||=[V(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[V(`path`,{d:`M22 14v-4M6 14v-4`}),V(`rect`,{width:`16`,height:`12`,x:`2`,y:`6`,rx:`2`})],-1)]])}var df=Y({name:`lucide-battery-low`,render:uf}),ff={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function pf(e,t){return $(),U(`svg`,ff,[...t[0]||=[V(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[V(`path`,{d:`M10 14v-4m12 4v-4M6 14v-4`}),V(`rect`,{width:`16`,height:`12`,x:`2`,y:`6`,rx:`2`})],-1)]])}var mf=Y({name:`lucide-battery-medium`,render:pf}),hf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function gf(e,t){return $(),U(`svg`,hf,[...t[0]||=[V(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[V(`path`,{d:`M10 10v4m4-4v4m8 0v-4M6 10v4`}),V(`rect`,{width:`16`,height:`12`,x:`2`,y:`6`,rx:`2`})],-1)]])}var _f=Y({name:`lucide-battery-full`,render:gf}),vf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function yf(e,t){return $(),U(`svg`,vf,[...t[0]||=[V(`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 bf=Y({name:`lucide-battery-charging`,render:yf}),xf={class:`cui-battery-info__header`},Sf={class:`cui-battery-info__icon`},Cf={class:`cui-battery-info__info`},wf={key:0,class:`cui-battery-info__label`},Tf={class:`cui-battery-info__bar`},Ef=nr(Z({__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}=i(),{level:r,label:a,disabled:o,size:s,charging:c,low:l}=Bt(t),u=J(()=>c.value===`CHARGING`),d=J(()=>c.value===`FULL`||r.value===100),f=J(()=>l.value||r.value<=20),p=J(()=>c.value===`CHARGING`?n(`components.battery_info.charging`):c.value===`FULL`?n(`components.battery_info.fully_charged`):c.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`)),m=J(()=>u.value?`cui-battery-info__status--charging`:d.value?`cui-battery-info__status--full`:r.value<=10?`cui-battery-info__status--critical`:f.value?`cui-battery-info__status--low`:``),h=J(()=>u.value?`cui-battery-info__level--charging`:d.value?`cui-battery-info__level--full`:r.value<=10?`cui-battery-info__level--critical`:f.value?`cui-battery-info__level--low`:``),g=J(()=>({color:`rgb(59, 130, 246)`,filter:`drop-shadow(0 0 6px rgba(59, 130, 246, 0.5))`})),_=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.5))`})),v=J(()=>({color:`rgb(34, 197, 94)`})),y=J(()=>({color:`rgb(234, 179, 8)`})),b=J(()=>({color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 6px rgba(239, 68, 68, 0.5))`})),x=J(()=>{let e=`rgb(34, 197, 94)`;return u.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=bf,i=_f,c=mf,l=df,d=cf;return $(),U(`div`,{class:P([`cui-battery-info`,[`cui-battery-info--${R(s)}`,{"cui-battery-info--disabled":R(o),"cui-battery-info--low":R(f),"cui-battery-info--charging":R(u)}]])},[V(`div`,xf,[V(`div`,Sf,[R(u)?($(),H(n,{key:0,class:`cui-battery-info__icon-svg`,style:z(R(g))},null,8,[`style`])):R(r)>=90?($(),H(i,{key:1,class:`cui-battery-info__icon-svg`,style:z(R(_))},null,8,[`style`])):R(r)>=50?($(),H(c,{key:2,class:`cui-battery-info__icon-svg`,style:z(R(v))},null,8,[`style`])):R(r)>=20?($(),H(l,{key:3,class:`cui-battery-info__icon-svg`,style:z(R(y))},null,8,[`style`])):($(),H(d,{key:4,class:`cui-battery-info__icon-svg cui-battery-info__icon-svg--critical`,style:z(R(b))},null,8,[`style`]))]),V(`div`,Cf,[R(a)?($(),U(`span`,wf,F(R(a)),1)):q(``,!0),V(`span`,{class:P([`cui-battery-info__status`,R(m)])},F(R(p)),3)]),V(`div`,{class:P([`cui-battery-info__level`,R(h)])},F(R(r))+`%`,3)]),V(`div`,Tf,[V(`div`,{class:`cui-battery-info__bar-fill`,style:z(R(x))},null,4)])],2)}}}),[[`__scopeId`,`data-v-c181f3d4`]]),Df={class:`cui-humidity-info__header`},Of={class:`cui-humidity-info__icon`},kf={class:`cui-humidity-info__info`},Af={key:0,class:`cui-humidity-info__label`},jf=nr(Z({__name:`CuiHumidityInfo`,props:{current:{},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},setup(e){let{label:t,current:n,disabled:r,size:i}=Bt(e),a=J(()=>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=J(()=>({color:a.value,filter:`drop-shadow(0 0 6px ${a.value.replace(`rgb`,`rgba`).replace(`)`,`, 0.5)`)})`})),s=J(()=>({color:a.value}));return(e,c)=>{let l=$n;return $(),U(`div`,{class:P([`cui-humidity-info`,[`cui-humidity-info--${R(i)}`,{"cui-humidity-info--disabled":R(r)}]])},[V(`div`,Df,[V(`div`,Of,[Q(l,{class:`cui-humidity-info__icon-svg`,style:z(R(o))},null,8,[`style`])]),V(`div`,kf,[R(t)?($(),U(`span`,Af,F(R(t)),1)):q(``,!0),V(`span`,{class:`cui-humidity-info__status`,style:z({color:R(a)})},F(R(n)==null?`--`:`${R(n)}%`),5)]),V(`div`,{class:`cui-humidity-info__value`,style:z(R(s))},F(R(n)==null?`--`:`${R(n)}%`),5)])],2)}}}),[[`__scopeId`,`data-v-1f41d794`]]),Mf={class:`cui-temperature-info__header`},Nf={class:`cui-temperature-info__icon`},Pf={class:`cui-temperature-info__info`},Ff={key:0,class:`cui-temperature-info__label`},If=nr(Z({__name:`CuiTemperatureInfo`,props:{current:{},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},setup(e){let{label:t,current:n,disabled:r,size:i}=Bt(e),a=J(()=>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=J(()=>({color:a.value,filter:`drop-shadow(0 0 6px ${a.value.replace(`rgb`,`rgba`).replace(`)`,`, 0.5)`)})`})),s=J(()=>({color:a.value}));return(e,c)=>{let l=Kn;return $(),U(`div`,{class:P([`cui-temperature-info`,[`cui-temperature-info--${R(i)}`,{"cui-temperature-info--disabled":R(r)}]])},[V(`div`,Mf,[V(`div`,Nf,[Q(l,{class:`cui-temperature-info__icon-svg`,style:z(R(o))},null,8,[`style`])]),V(`div`,Pf,[R(t)?($(),U(`span`,Ff,F(R(t)),1)):q(``,!0),V(`span`,{class:`cui-temperature-info__status`,style:z({color:R(a)})},F(R(n)==null?`--`:`${R(n)}°C`),5)]),V(`div`,{class:`cui-temperature-info__value`,style:z(R(s))},F(R(n)==null?`--`:`${R(n)}°C`),5)])],2)}}}),[[`__scopeId`,`data-v-0edddec9`]]),Lf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Rf(e,t){return $(),U(`svg`,Lf,[...t[0]||=[V(`path`,{fill:`currentColor`,d:`M20 9v11h-2v-9H2v9H0V9l10-4zm-3 3H3v2h14zm0 3H3v2h14zm5 0v-5h2v5zm0 4v-2h2v2z`},null,-1)]])}var zf=Y({name:`mdi-garage-alert-variant`,render:Rf}),Bf=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}({}),Vf=function(e){return e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e}({}),Hf={currentState:1,targetState:1,obstructionDetected:!1,disabled:!1,size:`medium`},Uf={class:`cui-garage-control__header`},Wf={class:`cui-garage-control__icon`},Gf={key:3,class:`cui-garage-control__obstruction`},Kf={class:`cui-garage-control__info`},qf={key:0,class:`cui-garage-control__label`},Jf=nr(Z({__name:`CuiGarageControl`,props:Dt({currentState:{},targetState:{},obstructionDetected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Hf),emits:[`update:targetState`],setup(e,{emit:t}){let n=e,r=t,{t:a}=i(),{currentState:o}=Bt(n),s=J(()=>o.value===Bf.Open||o.value===Bf.Opening),c=J(()=>{switch(o.value){case Bf.Open:return a(`components.garage_control.open`);case Bf.Closed:return a(`components.garage_control.closed`);case Bf.Opening:return a(`components.garage_control.opening`);case Bf.Closing:return a(`components.garage_control.closing`);case Bf.Stopped:return a(`components.garage_control.stopped`);default:return``}}),l=J(()=>{switch(o.value){case Bf.Open:return`cui-garage-control__status--open`;case Bf.Opening:case Bf.Closing:return`cui-garage-control__status--transitioning`;case Bf.Stopped:return`cui-garage-control__status--stopped`;default:return``}}),u=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.5))`})),d=J(()=>({color:`rgb(250, 204, 21)`,filter:`drop-shadow(0 0 8px rgba(250, 204, 21, 0.5))`})),f=J(()=>({color:`rgb(251, 146, 60)`}));function p(e){r(`update:targetState`,e?Vf.Open:Vf.Closed)}return(t,n)=>{let r=zf,i=Un,a=Ln,m=ln;return $(),U(`div`,{class:P([`cui-garage-control`,[`cui-garage-control--${e.size}`,{"cui-garage-control--disabled":e.disabled}]])},[V(`div`,Uf,[V(`div`,Wf,[R(o)===R(Bf).Stopped?($(),H(r,{key:0,class:`cui-garage-control__icon-svg`,style:z(R(f))},null,8,[`style`])):R(o)===R(Bf).Open||R(o)===R(Bf).Opening?($(),H(i,{key:1,class:`cui-garage-control__icon-svg`,style:z(R(o)===R(Bf).Open?R(u):R(d))},null,8,[`style`])):($(),H(a,{key:2,class:`cui-garage-control__icon-svg`,style:z(R(o)===R(Bf).Closing?R(d):void 0)},null,8,[`style`])),e.obstructionDetected?($(),U(`span`,Gf)):q(``,!0)]),V(`div`,Kf,[e.label?($(),U(`span`,qf,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-garage-control__status`,R(l)])},F(R(c)),3)]),Q(m,{"model-value":R(s),disabled:e.disabled,class:`ml-auto shrink-0`,"onUpdate:modelValue":p},null,8,[`model-value`,`disabled`])])],2)}}}),[[`__scopeId`,`data-v-4c6505c2`]]),Yf={detected:!1,disabled:!1,size:`medium`},Xf={class:`cui-leak-sensor__header`},Zf={class:`cui-leak-sensor__icon`},Qf={class:`cui-leak-sensor__info`},$f={key:0,class:`cui-leak-sensor__label`},ep=nr(Z({__name:`CuiLeakSensor`,props:Dt({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Yf),setup(e){let t=e,{t:n}=i(),{detected:r}=Bt(t),a=J(()=>({color:`rgb(59, 130, 246)`,filter:`drop-shadow(0 0 6px rgba(59, 130, 246, 0.5))`})),o=J(()=>({color:`var(--text-secondary-color)`})),s=J(()=>r.value?`cui-leak-sensor__status--detected`:`cui-leak-sensor__status--clear`),c=J(()=>r.value?`cui-leak-sensor__indicator--detected`:`cui-leak-sensor__indicator--clear`);return(t,i)=>{let l=qn,u=Wn;return $(),U(`div`,{class:P([`cui-leak-sensor`,[`cui-leak-sensor--${e.size}`,{"cui-leak-sensor--disabled":e.disabled,"cui-leak-sensor--clear":!R(r),"cui-leak-sensor--detected":R(r)}]])},[V(`div`,Xf,[V(`div`,Zf,[R(r)?($(),H(l,{key:0,class:`cui-leak-sensor__icon-svg`,style:z(R(a))},null,8,[`style`])):($(),H(u,{key:1,class:`cui-leak-sensor__icon-svg`,style:z(R(o))},null,8,[`style`]))]),V(`div`,Qf,[e.label?($(),U(`span`,$f,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-leak-sensor__status`,R(s)])},F(R(r)?R(n)(`components.leak_sensor.detected`):R(n)(`components.leak_sensor.clear`)),3)]),V(`div`,{class:P([`cui-leak-sensor__indicator`,R(c)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-14a46a3f`]]),tp={detected:!1,disabled:!1,size:`medium`},np={class:`cui-smoke-sensor__header`},rp={class:`cui-smoke-sensor__icon`},ip={class:`cui-smoke-sensor__info`},ap={key:0,class:`cui-smoke-sensor__label`},op=nr(Z({__name:`CuiSmokeSensor`,props:Dt({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},tp),setup(e){let t=e,{t:n}=i(),{detected:r}=Bt(t),a=J(()=>({color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 6px rgba(239, 68, 68, 0.5))`})),o=J(()=>({color:`var(--text-secondary-color)`})),s=J(()=>r.value?`cui-smoke-sensor__status--detected`:`cui-smoke-sensor__status--clear`),c=J(()=>r.value?`cui-smoke-sensor__indicator--detected`:`cui-smoke-sensor__indicator--clear`);return(t,i)=>{let l=Hn,u=Yn;return $(),U(`div`,{class:P([`cui-smoke-sensor`,[`cui-smoke-sensor--${e.size}`,{"cui-smoke-sensor--disabled":e.disabled,"cui-smoke-sensor--clear":!R(r),"cui-smoke-sensor--detected":R(r)}]])},[V(`div`,np,[V(`div`,rp,[R(r)?($(),H(l,{key:0,class:`cui-smoke-sensor__icon-svg`,style:z(R(a))},null,8,[`style`])):($(),H(u,{key:1,class:`cui-smoke-sensor__icon-svg`,style:z(R(o))},null,8,[`style`]))]),V(`div`,ip,[e.label?($(),U(`span`,ap,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-smoke-sensor__status`,R(s)])},F(R(r)?R(n)(`components.smoke_sensor.detected`):R(n)(`components.smoke_sensor.clear`)),3)]),V(`div`,{class:P([`cui-smoke-sensor__indicator`,R(c)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-4db50b68`]]),sp={detected:!1,disabled:!1,size:`medium`},cp={class:`cui-occupancy-sensor__header`},lp={class:`cui-occupancy-sensor__icon`},up={class:`cui-occupancy-sensor__info`},dp={key:0,class:`cui-occupancy-sensor__label`},fp=nr(Z({__name:`CuiOccupancySensor`,props:Dt({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},sp),setup(e){let t=e,{t:n}=i(),{detected:r}=Bt(t),a=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.5))`})),o=J(()=>({color:`var(--text-secondary-color)`})),s=J(()=>r.value?`cui-occupancy-sensor__status--occupied`:`cui-occupancy-sensor__status--empty`),c=J(()=>r.value?`cui-occupancy-sensor__indicator--occupied`:`cui-occupancy-sensor__indicator--empty`);return(t,i)=>{let l=Lr,u=Vn;return $(),U(`div`,{class:P([`cui-occupancy-sensor`,[`cui-occupancy-sensor--${e.size}`,{"cui-occupancy-sensor--disabled":e.disabled,"cui-occupancy-sensor--empty":!R(r),"cui-occupancy-sensor--occupied":R(r)}]])},[V(`div`,cp,[V(`div`,lp,[R(r)?($(),H(l,{key:0,class:`cui-occupancy-sensor__icon-svg`,style:z(R(a))},null,8,[`style`])):($(),H(u,{key:1,class:`cui-occupancy-sensor__icon-svg`,style:z(R(o))},null,8,[`style`]))]),V(`div`,up,[e.label?($(),U(`span`,dp,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-occupancy-sensor__status`,R(s)])},F(R(r)?R(n)(`components.occupancy_sensor.occupied`):R(n)(`components.occupancy_sensor.empty`)),3)]),V(`div`,{class:P([`cui-occupancy-sensor__indicator`,R(c)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-8ca5a1ce`]]),pp={detected:!1,disabled:!1,size:`medium`},mp={class:`cui-contact-sensor__header`},hp={class:`cui-contact-sensor__icon`},gp={class:`cui-contact-sensor__info`},_p={key:0,class:`cui-contact-sensor__label`},vp=nr(Z({__name:`CuiContactSensor`,props:Dt({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},pp),setup(e){let t=e,{t:n}=i(),{detected:r}=Bt(t),a=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.5))`})),o=J(()=>({color:`rgb(251, 146, 60)`,filter:`drop-shadow(0 0 8px rgba(251, 146, 60, 0.6))`})),s=J(()=>r.value?`cui-contact-sensor__status--closed`:`cui-contact-sensor__status--open`),c=J(()=>r.value?`cui-contact-sensor__indicator--closed`:`cui-contact-sensor__indicator--open`);return(t,i)=>{let l=Gn,u=Xn;return $(),U(`div`,{class:P([`cui-contact-sensor`,[`cui-contact-sensor--${e.size}`,{"cui-contact-sensor--disabled":e.disabled,"cui-contact-sensor--open":!R(r),"cui-contact-sensor--closed":R(r)}]])},[V(`div`,mp,[V(`div`,hp,[R(r)?($(),H(l,{key:0,class:`cui-contact-sensor__icon-svg`,style:z(R(a))},null,8,[`style`])):($(),H(u,{key:1,class:`cui-contact-sensor__icon-svg`,style:z(R(o))},null,8,[`style`]))]),V(`div`,gp,[e.label?($(),U(`span`,_p,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-contact-sensor__status`,R(s)])},F(R(r)?R(n)(`components.contact_sensor.closed`):R(n)(`components.contact_sensor.open`)),3)]),V(`div`,{class:P([`cui-contact-sensor__indicator`,R(c)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-0cc50676`]]),yp={ring:!1,disabled:!1,size:`medium`},bp={class:`cui-doorbell__header`},xp={class:`cui-doorbell__icon`},Sp={class:`cui-doorbell__info`},Cp={key:0,class:`cui-doorbell__label`},wp=nr(Z({__name:`CuiDoorbellTrigger`,props:Dt({ring:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},yp),emits:[`update:ring`,`trigger`],setup(e,{emit:t}){let n=e,r=t,{t:a}=i(),{ring:o}=Bt(n),s=J(()=>o.value),c=J(()=>({color:`rgb(234, 179, 8)`,filter:`drop-shadow(0 0 10px rgba(234, 179, 8, 0.8))`}));function l(){r(`update:ring`,!0),r(`trigger`),setTimeout(()=>{r(`update:ring`,!1)},2e3)}return(t,n)=>{let r=er,i=hi,o=Fe;return $(),U(`div`,{class:P([`cui-doorbell`,[`cui-doorbell--${e.size}`,{"cui-doorbell--disabled":e.disabled,"cui-doorbell--ringing":R(s)}]])},[V(`div`,bp,[V(`div`,xp,[R(s)?($(),H(r,{key:0,class:`cui-doorbell__icon-svg cui-doorbell__icon-svg--ringing`,style:z(R(c))},null,8,[`style`])):($(),H(r,{key:1,class:`cui-doorbell__icon-svg`}))]),V(`div`,Sp,[e.label?($(),U(`span`,Cp,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-doorbell__status`,{"cui-doorbell__status--ringing":R(s)}])},F(R(s)?R(a)(`components.doorbell_trigger.ringing`):R(a)(`components.doorbell_trigger.ready`)),3)]),Q(o,{disabled:e.disabled||R(s),size:`small`,severity:`warn`,class:`cui-doorbell__button`,onClick:l},{icon:G(()=>[Q(i,{class:`cui-doorbell__button-icon`})]),_:1},8,[`disabled`])])],2)}}}),[[`__scopeId`,`data-v-b227d18a`]]),Tp={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ep(e,t){return $(),U(`svg`,Tp,[...t[0]||=[V(`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 Dp=Y({name:`mdi-weather-night`,render:Ep}),Op={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function kp(e,t){return $(),U(`svg`,Op,[...t[0]||=[V(`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 Ap=Y({name:`mdi-exit-run`,render:kp}),jp=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}({}),Mp={class:`cui-security-system__header`},Np={class:`cui-security-system__icon`},Pp={class:`cui-security-system__info`},Fp={key:0,class:`cui-security-system__label`},Ip={key:0,class:`cui-security-system__alarm`},Lp={class:`cui-security-system__modes`},Rp=[`disabled`],zp=[`disabled`],Bp=[`disabled`],Vp=[`disabled`],Hp=nr(Z({__name:`CuiSecuritySystem`,props:{currentState:{default:jp.Disarmed},targetState:{default:jp.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:a}=i(),{currentState:o,targetState:s}=Bt(n),c=J({get:()=>o.value,set:e=>r(`update:currentState`,e)}),l=J({get:()=>s.value,set:e=>r(`update:targetState`,e)}),u=J(()=>c.value===jp.AlarmTriggered),d=J(()=>c.value===jp.StayArm||c.value===jp.AwayArm||c.value===jp.NightArm),f=J(()=>!u.value&&l.value!==c.value),p=J(()=>{if(f.value)return l.value===jp.Disarmed?a(`components.security_system.status_disarming`):a(`components.security_system.status_arming`);switch(c.value){case jp.StayArm:return a(`components.security_system.status_home_armed`);case jp.AwayArm:return a(`components.security_system.status_away_armed`);case jp.NightArm:return a(`components.security_system.status_night_armed`);case jp.Disarmed:return a(`components.security_system.status_disarmed`);case jp.AlarmTriggered:return a(`components.security_system.status_alarm`);default:return a(`components.security_system.status_unknown`)}}),m=J(()=>u.value?`cui-security-system__status--alarm`:f.value?`cui-security-system__status--transitioning`:d.value?`cui-security-system__status--armed`:`cui-security-system__status--disarmed`),h=J(()=>({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`})),g=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.5))`}));function _(e){l.value=e}function v(){c.value=l.value}return(t,n)=>{let r=tr,i=Ir,o=zn,s=Zn,c=Fe,f=gi,y=Ap,b=Dp;return $(),U(`div`,{class:P([`cui-security-system`,[`cui-security-system--${e.size}`,{"cui-security-system--disabled":e.disabled}]])},[V(`div`,Mp,[V(`div`,Np,[R(u)?($(),H(r,{key:0,class:`cui-security-system__icon-svg`,style:z(R(h))},null,8,[`style`])):R(d)?($(),H(i,{key:1,class:`cui-security-system__icon-svg`,style:z(R(g))},null,8,[`style`])):($(),H(o,{key:2,class:`cui-security-system__icon-svg`}))]),V(`div`,Pp,[e.label?($(),U(`span`,Fp,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-security-system__status`,R(m)])},F(R(p)),3)])]),R(u)?($(),U(`div`,Ip,[Q(s,{class:`cui-security-system__alarm-icon`}),V(`span`,null,F(R(a)(`components.security_system.alarm_triggered`)),1),Q(c,{size:`small`,severity:`danger`,label:R(a)(`components.security_system.reset`),onClick:v},null,8,[`label`])])):q(``,!0),V(`div`,Lp,[V(`button`,{type:`button`,class:P([`cui-security-system__mode`,{"cui-security-system__mode--active":R(l)===R(jp).Disarmed}]),disabled:e.disabled||R(u),onClick:n[0]||=e=>_(R(jp).Disarmed)},[Q(o,{class:`cui-security-system__mode-icon`}),V(`span`,null,F(R(a)(`components.security_system.off`)),1)],10,Rp),V(`button`,{type:`button`,class:P([`cui-security-system__mode`,{"cui-security-system__mode--active":R(l)===R(jp).StayArm}]),disabled:e.disabled||R(u),onClick:n[1]||=e=>_(R(jp).StayArm)},[Q(f,{class:`cui-security-system__mode-icon`}),V(`span`,null,F(R(a)(`components.security_system.home`)),1)],10,zp),V(`button`,{type:`button`,class:P([`cui-security-system__mode`,{"cui-security-system__mode--active":R(l)===R(jp).AwayArm}]),disabled:e.disabled||R(u),onClick:n[2]||=e=>_(R(jp).AwayArm)},[Q(y,{class:`cui-security-system__mode-icon`}),V(`span`,null,F(R(a)(`components.security_system.away`)),1)],10,Bp),V(`button`,{type:`button`,class:P([`cui-security-system__mode`,{"cui-security-system__mode--active":R(l)===R(jp).NightArm}]),disabled:e.disabled||R(u),onClick:n[3]||=e=>_(R(jp).NightArm)},[Q(b,{class:`cui-security-system__mode-icon`}),V(`span`,null,F(R(a)(`components.security_system.night`)),1)],10,Vp)])],2)}}}),[[`__scopeId`,`data-v-67cacde3`]]),Up={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Wp(e,t){return $(),U(`svg`,Up,[...t[0]||=[V(`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 Gp=Y({name:`mdi-volume-high`,render:Wp}),Kp={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function qp(e,t){return $(),U(`svg`,Kp,[...t[0]||=[V(`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 Jp=Y({name:`mdi-alarm-light-outline`,render:qp}),Yp={active:!1,volume:100,hasVolume:!1,disabled:!1,size:`medium`},Xp={class:`cui-siren-control__header`},Zp={class:`cui-siren-control__icon`},Qp={key:0,class:`cui-siren-control__label`},$p={key:0,class:`cui-siren-control__volume`},em={class:`cui-siren-control__volume-header`},tm={class:`cui-siren-control__volume-value`},nm=nr(Z({__name:`CuiSirenControl`,props:Dt({active:{type:Boolean},volume:{},hasVolume:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Yp),emits:[`update:active`,`update:volume`],setup(e,{emit:t}){let n=e,r=t,{active:i,volume:a,hasVolume:o}=Bt(n),s=J({get:()=>i.value,set:e=>r(`update:active`,e)}),c=J({get:()=>a.value,set:e=>r(`update:volume`,e)}),u=J(()=>{let e=(o.value?a.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=Zn,i=Jp,a=ln,d=Gp,f=l;return $(),U(`div`,{class:P([`cui-siren-control`,[`cui-siren-control--${e.size}`,{"cui-siren-control--disabled":e.disabled}]])},[V(`div`,Xp,[V(`div`,Zp,[R(s)?($(),H(r,{key:0,class:`cui-siren-control__icon-svg cui-siren-control__icon-svg--active`,style:z(R(u))},null,8,[`style`])):($(),H(i,{key:1,class:`cui-siren-control__icon-svg`}))]),e.label?($(),U(`span`,Qp,F(e.label),1)):q(``,!0),Q(a,{modelValue:R(s),"onUpdate:modelValue":n[0]||=e=>Gt(s)?s.value=e:null,disabled:e.disabled,class:`cui-siren-control__toggle`},null,8,[`modelValue`,`disabled`])]),R(o)?($(),U(`div`,$p,[V(`div`,em,[Q(d,{class:`cui-siren-control__volume-icon`}),V(`span`,tm,F(R(c))+`%`,1)]),Q(f,{modelValue:R(c),"onUpdate:modelValue":n[1]||=e=>Gt(c)?c.value=e:null,min:0,max:100,step:1,disabled:e.disabled,class:`cui-siren-control__slider`},null,8,[`modelValue`,`disabled`])])):q(``,!0)],2)}}}),[[`__scopeId`,`data-v-7f88e563`]]),rm=function(e){return e[e.Secured=0]=`Secured`,e[e.Unsecured=1]=`Unsecured`,e[e.Unknown=2]=`Unknown`,e}({}),im={currentState:2,targetState:0,disabled:!1,size:`medium`},am={class:`cui-lock-control__header`},om={class:`cui-lock-control__icon`},sm={class:`cui-lock-control__info`},cm={key:0,class:`cui-lock-control__label`},lm=nr(Z({__name:`CuiLockControl`,props:Dt({currentState:{},targetState:{},label:{},disabled:{type:Boolean},size:{}},im),emits:[`update:targetState`],setup(e,{emit:t}){let n=e,r=t,{t:a}=i(),{currentState:o,targetState:s}=Bt(n),c=J(()=>s.value===rm.Secured),l=J(()=>o.value!==s.value&&o.value!==rm.Unknown),u=J(()=>{if(l.value)return s.value===rm.Secured?a(`components.lock.status_locking`):a(`components.lock.status_unlocking`);switch(o.value){case rm.Secured:return a(`components.lock.status_locked`);case rm.Unsecured:return a(`components.lock.status_unlocked`);default:return a(`components.lock.status_unknown`)}}),d=J(()=>l.value?`cui-lock-control__status--transitioning`:o.value===rm.Secured?`cui-lock-control__status--secured`:o.value===rm.Unsecured?`cui-lock-control__status--unsecured`:``),f=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.5))`}));function p(e){r(`update:targetState`,e?rm.Secured:rm.Unsecured)}return(t,n)=>{let r=In,i=Bn,a=ln;return $(),U(`div`,{class:P([`cui-lock-control`,[`cui-lock-control--${e.size}`,{"cui-lock-control--disabled":e.disabled}]])},[V(`div`,am,[V(`div`,om,[R(c)?($(),H(r,{key:0,class:`cui-lock-control__icon-svg`,style:z(R(f))},null,8,[`style`])):($(),H(i,{key:1,class:`cui-lock-control__icon-svg`}))]),V(`div`,sm,[e.label?($(),U(`span`,cm,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-lock-control__status`,R(d)])},F(R(u)),3)]),Q(a,{"model-value":R(c),disabled:e.disabled,class:`ml-auto shrink-0`,"onUpdate:modelValue":p},null,8,[`model-value`,`disabled`])])],2)}}}),[[`__scopeId`,`data-v-4b2a60ff`]]),um={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function dm(e,t){return $(),U(`svg`,um,[...t[0]||=[V(`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 fm=Y({name:`lucide-power-off`,render:dm}),pm={class:`cui-switch-control__header`},mm={class:`cui-switch-control__icon`},hm={key:0,class:`cui-switch-control__label`},gm=nr(Z({__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}=Bt(n),o=J({get:()=>i.value,set:e=>r(`update:on`,e)}),s=J(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 10px rgba(34, 197, 94, 0.7))`}));return(t,n)=>{let r=Jn,i=fm,c=ln;return $(),U(`div`,{class:P([`cui-switch-control`,[`cui-switch-control--${R(a)}`,{"cui-switch-control--disabled":e.disabled}]])},[V(`div`,pm,[V(`div`,mm,[R(o)?($(),H(r,{key:0,class:`cui-switch-control__icon-svg cui-switch-control__icon-svg--on`,style:z(R(s))},null,8,[`style`])):($(),H(i,{key:1,class:`cui-switch-control__icon-svg`}))]),e.label?($(),U(`span`,hm,F(e.label),1)):q(``,!0),Q(c,{modelValue:R(o),"onUpdate:modelValue":n[0]||=e=>Gt(o)?o.value=e:null,disabled:e.disabled,class:`cui-switch-control__toggle`},null,8,[`modelValue`,`disabled`])])],2)}}}),[[`__scopeId`,`data-v-86992927`]]),_m={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function vm(e,t){return $(),U(`svg`,_m,[...t[0]||=[V(`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 ym=Y({name:`mdi-brightness6`,render:vm}),bm={on:!1,brightness:100,hasBrightness:!1,disabled:!1,size:`medium`},xm={class:`cui-light-control__header`},Sm={class:`cui-light-control__icon`},Cm={key:0,class:`cui-light-control__label`},wm={key:0,class:`cui-light-control__brightness`},Tm={class:`cui-light-control__brightness-header`},Em={class:`cui-light-control__brightness-value`},Dm=nr(Z({__name:`CuiLightControl`,props:Dt({on:{type:Boolean},brightness:{},hasBrightness:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},bm),emits:[`update:on`,`update:brightness`],setup(e,{emit:t}){let n=e,r=t,{on:i,brightness:a,hasBrightness:o}=Bt(n),s=W(a.value>0?a.value:100),c=J({get:()=>i.value,set:e=>{r(`update:on`,e),e&&a.value===0&&r(`update:brightness`,s.value)}}),u=J({get:()=>a.value,set:e=>{e>0&&(s.value=e),r(`update:brightness`,e),e===0&&i.value?r(`update:on`,!1):e>0&&!i.value&&r(`update:on`,!0)}}),d=J(()=>{let e=(o.value?a.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=Rn,i=Rr,a=ln,s=ym,f=l;return $(),U(`div`,{class:P([`cui-light-control`,[`cui-light-control--${e.size}`,{"cui-light-control--disabled":e.disabled}]])},[V(`div`,xm,[V(`div`,Sm,[R(c)?($(),H(r,{key:0,class:`cui-light-control__icon-svg cui-light-control__icon-svg--on`,style:z(R(d))},null,8,[`style`])):($(),H(i,{key:1,class:`cui-light-control__icon-svg`}))]),e.label?($(),U(`span`,Cm,F(e.label),1)):q(``,!0),Q(a,{modelValue:R(c),"onUpdate:modelValue":n[0]||=e=>Gt(c)?c.value=e:null,disabled:e.disabled,class:`cui-light-control__toggle`},null,8,[`modelValue`,`disabled`])]),R(o)?($(),U(`div`,wm,[V(`div`,Tm,[Q(s,{class:`cui-light-control__brightness-icon`}),V(`span`,Em,F(R(u))+`%`,1)]),Q(f,{modelValue:R(u),"onUpdate:modelValue":n[1]||=e=>Gt(u)?u.value=e:null,min:0,max:100,step:1,disabled:e.disabled,class:`cui-light-control__slider`},null,8,[`modelValue`,`disabled`])])):q(``,!0)],2)}}}),[[`__scopeId`,`data-v-231e0be1`]]),Om={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function km(e,t){return $(),U(`svg`,Om,[...t[0]||=[V(`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 Am=Y({name:`mdi-car`,render:km}),jm={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Mm(e,t){return $(),U(`svg`,jm,[...t[0]||=[V(`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 Nm=Y({name:`mdi-cube-scan`,render:Mm}),Pm={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Fm(e,t){return $(),U(`svg`,Pm,[...t[0]||=[V(`g`,{fill:`none`},[V(`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`}),V(`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 Im=Y({name:`mingcute-run-fill`,render:Fm}),Lm={detected:!1,disabled:!1,size:`medium`},Rm={class:`cui-detection__header`},zm={class:`cui-detection__info`},Bm={key:0,class:`cui-detection__label`},Vm={key:0,class:`cui-detection__detections`},Hm=nr(Z({__name:`CuiDetection`,props:Dt({type:{},label:{},detected:{type:Boolean},detections:{},size:{},disabled:{type:Boolean}},Lm),setup(e){let t=e,{t:n}=i(),{detected:r}=Bt(t),a=J(()=>r.value?n(`components.detection.detected`):n(`components.detection.idle`));return(t,n)=>{let i=Im,o=Nm,s=Qr,c=kr,l=Am;return $(),U(`div`,{class:P([`cui-detection`,[`cui-detection--${e.size}`,`cui-detection--${e.type}`,{"cui-detection--disabled":e.disabled,"cui-detection--detected":R(r)}]])},[V(`div`,Rm,[V(`div`,{class:P([`cui-detection__icon`,{"cui-detection__icon--detected":R(r)}])},[e.type===`motion`?($(),H(i,{key:0,class:`cui-detection__icon-svg`})):e.type===`object`?($(),H(o,{key:1,class:`cui-detection__icon-svg`})):e.type===`audio`?($(),H(s,{key:2,class:`cui-detection__icon-svg`})):e.type===`face`?($(),H(c,{key:3,class:`cui-detection__icon-svg`})):e.type===`licensePlate`?($(),H(l,{key:4,class:`cui-detection__icon-svg`})):q(``,!0)],2),V(`div`,zm,[e.label?($(),U(`span`,Bm,F(e.label),1)):q(``,!0),V(`span`,{class:P([`cui-detection__status`,{"cui-detection__status--detected":R(r)}])},F(R(a)),3)]),V(`div`,{class:P([`cui-detection__indicator`,{"cui-detection__indicator--detected":R(r)}])},null,2)]),e.detections&&e.detections.length>0?($(),U(`div`,Vm,[($(!0),U(K,null,B(e.detections,(e,t)=>($(),U(`span`,{key:t,class:`cui-detection__detection-tag`},F(e),1))),128))])):q(``,!0)],2)}}}),[[`__scopeId`,`data-v-4bdc871b`]]),Um={key:0,class:`flex items-center justify-center h-full`},Wm={key:1,class:`overview-container`},Gm={class:`relative`},Km={key:0,class:`absolute inset-0 z-2 flex items-center justify-center bg-black/80 pointer-events-none`},qm={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`},Jm={class:`text-xs text-white/80`},Ym={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`},Xm={class:`text-xs text-white/80`},Zm={class:`overview-section`},Qm={class:`overview-section-title`},$m={key:1},eh={key:0,class:`overview-section`},th={class:`overview-section-title`},nh={class:`flex flex-col gap-2`},rh={key:1,class:`overview-section`},ih={class:`overview-section-title`},ah={class:`flex flex-col gap-2`},oh={key:2,class:`overview-section`},sh={class:`overview-section-title`},ch={class:`flex flex-col gap-2`},lh={key:3,class:`overview-section`},uh={class:`overview-section-title`},dh={class:`flex flex-col gap-2`},fh={key:4,class:`overview-section`},ph={class:`overview-section-title`},mh={class:`flex flex-col gap-2`},hh={key:5,class:`overview-section`},gh={class:`overview-section-title`},_h={class:`flex flex-col gap-2`},vh={key:6,class:`overview-section`},yh={class:`overview-section-title`},bh={class:`flex flex-col gap-2`},xh={key:7,class:`overview-section`},Sh={class:`overview-section-title`},Ch={class:`flex flex-col gap-2`},wh={key:8,class:`overview-section`},Th={class:`overview-section-title`},Eh={class:`flex flex-col gap-2`},Dh={key:9,class:`overview-section`},Oh={class:`overview-section-title`},kh={class:`flex flex-col gap-2`},Ah={key:10,class:`overview-section`},jh={class:`overview-section-title`},Mh={class:`flex flex-col gap-2`},Nh={key:11,class:`overview-section`},Ph={class:`overview-section-title`},Fh={class:`flex flex-col gap-2`},Ih={key:12,class:`overview-section`},Lh={class:`overview-section-title`},Rh={class:`flex flex-col gap-2`},zh={key:13,class:`overview-section`},Bh={class:`overview-section-title`},Vh={class:`flex flex-col gap-2`},Hh={key:14,class:`overview-section`},Uh={class:`overview-section-title`},Wh={class:`flex flex-col gap-2`},Gh={key:15,class:`overview-section`},Kh={class:`no-sensors`},qh=nr(Z({__name:`Overview`,props:{camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},setup(e){let r=e,{t:s}=i(),{getCameraStatus:l,connect:y}=mi(),{cameraDevice:b,latestSnapshotSrc:ee}=Bt(r),{sensors:C}=Be(b);y();let re=J(()=>b.value?.camera.value),T=J(()=>l(re.value?._id)),D=J(()=>{switch(T.value){case`connected`:return`success`;case`connecting`:return`warn`;case`error`:return`danger`;case`partial`:return`contrast`;default:return`secondary`}}),pe=J(()=>{switch(T.value){case`connected`:return s(`components.camera_table.online`);case`connecting`:return s(`components.camera_table.connecting`);case`error`:return s(`components.camera_table.error`);case`partial`:return s(`components.camera_table.partial`);default:return s(`components.camera_table.idle`)}}),me=J(()=>C.value.filter(de)),A=J(()=>C.value.filter(le)),he=J(()=>C.value.filter(ne)),ge=J(()=>C.value.filter(p)),_e=J(()=>C.value.filter(_)),ve=J(()=>C.value.filter(Ve)),ye=J(()=>C.value.filter(Ae)),be=J(()=>C.value.filter(t)),we=J(()=>C.value.filter(Pe)),Te=J(()=>C.value.filter(g)),De=J(()=>C.value.filter(oe)),Oe=J(()=>C.value.filter(o)),ke=J(()=>C.value.filter(Ee)),Me=J(()=>C.value.filter(se)),Ne=J(()=>C.value.filter(O)),Fe=J(()=>C.value.filter(j)),Ie=J(()=>C.value.filter(f)),Le=J(()=>C.value.filter(ie)),Re=J(()=>C.value.filter(te)),ze=J(()=>me.value.some(e=>e.getProperty(x.Detected))),He=J(()=>{let e;for(let t of me.value){let n=t.getProperty(x.LastTriggered);n&&(!e||n>e)&&(e=n)}return e}),Ue=xe(J(()=>new Date(He.value??0))),We=J(()=>{let e=[{label:s(`components.camera_options.overview_status`),value:pe.value,tag:!0,tagSeverity:D.value},{label:s(`components.camera_options.overview_sources`),value:String(re.value?.sources.length??0)}],t=re.value?.info;return t?.manufacturer&&e.push({label:s(`components.form.label.manufacturer`),value:t.manufacturer}),t?.model&&e.push({label:s(`components.camera_options.model`),value:t.model}),t?.hardware&&e.push({label:s(`components.form.label.hardware_version`),value:t.hardware}),t?.serialNumber&&e.push({label:s(`components.form.label.serial_number`),value:t.serialNumber}),t?.firmwareVersion&&e.push({label:s(`components.form.label.firmware_version`),value:t.firmwareVersion}),t?.supportUrl&&e.push({label:s(`components.form.label.support_url`),value:t.supportUrl}),me.value.length>0&&(ze.value?e.push({label:s(`components.camera_options.overview_last_motion`),value:s(`components.camera_options.overview_motion_active`),tag:!0,tagSeverity:`danger`}):He.value?e.push({label:s(`components.camera_options.overview_last_motion`),value:Ue.value}):e.push({label:s(`components.camera_options.overview_last_motion`),value:s(`components.camera_options.overview_no_motion`)})),e}),Ge=J(()=>me.value.length>0||A.value.length>0||he.value.length>0||ge.value.length>0||_e.value.length>0),Ke=J(()=>ve.value.length>0||ke.value.length>0||Me.value.length>0||Ne.value.length>0||Fe.value.length>0||Ie.value.length>0||ye.value.length>0||Te.value.length>0||Le.value.length>0||be.value.length>0||we.value.length>0||De.value.length>0||Oe.value.length>0||Re.value.length>0);return(e,t)=>{let r=fe,i=Pn,o=Fn,s=jr,l=An,f=bn,p=_i,g=Dm,_=gm,y=lm,b=nm,te=Hp,ne=wp,C=vp,T=fp,ie=op,oe=ep,se=Jf,le=If,de=jf,D=Ef;return R(re)?($(),U(`div`,Wm,[V(`div`,Gm,[R(re)?.disabled?($(),U(`div`,Km,[Q(i,{class:`w-8 h-8 text-white/60`})])):q(``,!0),R(re)?.disabled?($(),U(`div`,qm,[Q(i,{class:`w-3.5 h-3.5 text-red-400`}),V(`span`,Jm,F(e.$t(`views.camera.camera_disabled`)),1)])):R(re)?.detectionSettings?.snooze?($(),U(`div`,Ym,[Q(o,{class:`w-3.5 h-3.5 text-amber-400`}),V(`span`,Xm,F(e.$t(`views.camera.camera_snoozed`)),1)])):q(``,!0),Q(s,{camera:R(re),src:R(ee)},null,8,[`camera`,`src`])]),V(`div`,Zm,[V(`h3`,Qm,F(e.$t(`components.camera_options.overview`)),1),Q(p,{value:R(We),"striped-rows":``,"show-headers":!1,class:`card-border rounded-lg overflow-hidden`},{default:G(()=>[Q(l,{field:`label`,class:`p-2 font-medium text-sm`}),Q(l,{field:`value`,class:`p-2 text-muted text-sm text-right`},{body:G(({data:e})=>[e.tag?($(),H(f,{key:0,severity:e.tagSeverity,value:e.value},null,8,[`severity`,`value`])):($(),U(`span`,$m,F(e.value),1))]),_:1})]),_:1},8,[`value`])]),R(Ge)?($(),U(`div`,eh,[V(`h3`,th,F(e.$t(`components.camera_options.detection`)),1),V(`div`,nh,[($(!0),U(K,null,B(R(me),e=>($(),H(Hm,{key:e.id,type:`motion`,label:e.displayName.value,detected:e.getProperty(R(x).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128)),($(!0),U(K,null,B(R(A),e=>($(),H(Hm,{key:e.id,type:`object`,label:e.displayName.value,detected:(e.getProperty(R(h).Detections)?.length??0)>0,detections:e.getProperty(R(h).Detections)?.map(e=>e.label??e.class??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128)),($(!0),U(K,null,B(R(he),e=>($(),H(Hm,{key:e.id,type:`audio`,label:e.displayName.value,detected:e.getProperty(R(n).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128)),($(!0),U(K,null,B(R(ge),e=>($(),H(Hm,{key:e.id,type:`face`,label:e.displayName.value,detected:e.getProperty(R(v).Detected)??!1,detections:e.getProperty(R(v).Detections)?.map(e=>e.identity??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128)),($(!0),U(K,null,B(R(_e),e=>($(),H(Hm,{key:e.id,type:`licensePlate`,label:e.displayName.value,detected:e.getProperty(R(E).Detected)??!1,detections:e.getProperty(R(E).Detections)?.map(e=>e.plateText??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128))])])):q(``,!0),R(ye).length?($(),U(`div`,rh,[V(`h3`,ih,F(e.$t(`components.camera_options.sensor_type_light`)),1),V(`div`,ah,[($(!0),U(K,null,B(R(ye),e=>($(),H(g,{key:e.id,label:e.displayName.value,on:e.getProperty(R(c).On)??!1,brightness:e.getProperty(R(c).Brightness)??100,"has-brightness":e.hasCapability(`brightness`),size:`small`,class:`card-border`,"onUpdate:on":t=>e.setProperty(R(c).On,t),"onUpdate:brightness":t=>e.setProperty(R(c).Brightness,t)},null,8,[`label`,`on`,`brightness`,`has-brightness`,`onUpdate:on`,`onUpdate:brightness`]))),128))])])):q(``,!0),R(we).length?($(),U(`div`,oh,[V(`h3`,sh,F(e.$t(`components.camera_options.sensor_type_switch`)),1),V(`div`,ch,[($(!0),U(K,null,B(R(we),e=>($(),H(_,{key:e.id,label:e.displayName.value,on:e.getProperty(R(S).On)??!1,size:`small`,class:`card-border`,"onUpdate:on":t=>e.setProperty(R(S).On,t)},null,8,[`label`,`on`,`onUpdate:on`]))),128))])])):q(``,!0),R(Te).length?($(),U(`div`,lh,[V(`h3`,uh,F(e.$t(`components.camera_options.sensor_type_lock`)),1),V(`div`,dh,[($(!0),U(K,null,B(R(Te),e=>($(),H(y,{key:e.id,label:e.displayName.value,"current-state":e.getProperty(R(w).CurrentState)??2,"target-state":e.getProperty(R(w).TargetState)??0,size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty(R(w).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`onUpdate:targetState`]))),128))])])):q(``,!0),R(be).length?($(),U(`div`,fh,[V(`h3`,ph,F(e.$t(`components.camera_options.sensor_type_siren`)),1),V(`div`,mh,[($(!0),U(K,null,B(R(be),e=>($(),H(b,{key:e.id,label:e.displayName.value,active:e.getProperty(R(a).Active)??!1,volume:e.getProperty(R(a).Volume)??100,"has-volume":e.hasCapability(`volume`),size:`small`,class:`card-border`,"onUpdate:active":t=>e.setProperty(R(a).Active,t),"onUpdate:volume":t=>e.setProperty(R(a).Volume,t)},null,8,[`label`,`active`,`volume`,`has-volume`,`onUpdate:active`,`onUpdate:volume`]))),128))])])):q(``,!0),R(Re).length?($(),U(`div`,hh,[V(`h3`,gh,F(e.$t(`components.camera_options.sensor_type_securitySystem`)),1),V(`div`,_h,[($(!0),U(K,null,B(R(Re),e=>($(),H(te,{key:e.id,label:e.displayName.value,"current-state":e.getProperty(R(Se).CurrentState)??3,"target-state":e.getProperty(R(Se).TargetState)??3,size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty(R(Se).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`onUpdate:targetState`]))),128))])])):q(``,!0),R(De).length?($(),U(`div`,vh,[V(`h3`,yh,F(e.$t(`components.camera_options.sensor_type_doorbell`)),1),V(`div`,bh,[($(!0),U(K,null,B(R(De),e=>($(),H(ne,{key:e.id,label:e.displayName.value,ring:e.getProperty(R(je).Ring)??!1,size:`small`,class:`card-border`,onTrigger:()=>e.setProperty(R(je).Ring,!0)},null,8,[`label`,`ring`,`onTrigger`]))),128))])])):q(``,!0),R(Oe).length?($(),U(`div`,xh,[V(`h3`,Sh,F(e.$t(`components.camera_options.sensor_type_contact`)),1),V(`div`,Ch,[($(!0),U(K,null,B(R(Oe),e=>($(),H(C,{key:e.id,label:e.displayName.value,detected:e.getProperty(R(ue).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),R(Ne).length?($(),U(`div`,wh,[V(`h3`,Th,F(e.$t(`components.camera_options.sensor_type_occupancy`)),1),V(`div`,Eh,[($(!0),U(K,null,B(R(Ne),e=>($(),H(T,{key:e.id,label:e.displayName.value,detected:e.getProperty(R(d).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),R(Fe).length?($(),U(`div`,Dh,[V(`h3`,Oh,F(e.$t(`components.camera_options.sensor_type_smoke`)),1),V(`div`,kh,[($(!0),U(K,null,B(R(Fe),e=>($(),H(ie,{key:e.id,label:e.displayName.value,detected:e.getProperty(R(Ce).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),R(Ie).length?($(),U(`div`,Ah,[V(`h3`,jh,F(e.$t(`components.camera_options.sensor_type_leak`)),1),V(`div`,Mh,[($(!0),U(K,null,B(R(Ie),e=>($(),H(oe,{key:e.id,label:e.displayName.value,detected:e.getProperty(R(m).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):q(``,!0),R(Le).length?($(),U(`div`,Nh,[V(`h3`,Ph,F(e.$t(`components.camera_options.sensor_type_garage`)),1),V(`div`,Fh,[($(!0),U(K,null,B(R(Le),e=>($(),H(se,{key:e.id,label:e.displayName.value,"current-state":e.getProperty(R(ce).CurrentState)??1,"target-state":e.getProperty(R(ce).TargetState)??1,"obstruction-detected":e.getProperty(R(ce).ObstructionDetected)??!1,size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty(R(ce).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`obstruction-detected`,`onUpdate:targetState`]))),128))])])):q(``,!0),R(ke).length?($(),U(`div`,Ih,[V(`h3`,Lh,F(e.$t(`components.camera_options.sensor_type_temperature`)),1),V(`div`,Rh,[($(!0),U(K,null,B(R(ke),e=>($(),H(le,{key:e.id,label:e.displayName.value,current:e.getProperty(R(u).Current),size:`small`,class:`card-border`},null,8,[`label`,`current`]))),128))])])):q(``,!0),R(Me).length?($(),U(`div`,zh,[V(`h3`,Bh,F(e.$t(`components.camera_options.sensor_type_humidity`)),1),V(`div`,Vh,[($(!0),U(K,null,B(R(Me),e=>($(),H(de,{key:e.id,label:e.displayName.value,current:e.getProperty(R(ae).Current),size:`small`,class:`card-border`},null,8,[`label`,`current`]))),128))])])):q(``,!0),R(ve).length?($(),U(`div`,Hh,[V(`h3`,Uh,F(e.$t(`components.camera_options.sensor_type_battery`)),1),V(`div`,Wh,[($(!0),U(K,null,B(R(ve),e=>($(),H(D,{key:e.id,label:e.displayName.value,level:e.getProperty(R(k).Level)??100,charging:e.getProperty(R(k).Charging)??`NOT_CHARGING`,low:e.getProperty(R(k).Low)??!1,size:`small`,class:`card-border`},null,8,[`label`,`level`,`charging`,`low`]))),128))])])):q(``,!0),!R(Ke)&&!R(Ge)?($(),U(`div`,Gh,[V(`div`,Kh,F(e.$t(`components.camera_options.no_sensors`)),1)])):q(``,!0)])):($(),U(`div`,Um,[Q(r,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})]))}}}),[[`__scopeId`,`data-v-5d86732a`]]),Jh={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Yh(e,t){return $(),U(`svg`,Jh,[...t[0]||=[V(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[V(`path`,{"stroke-width":`3`,d:`M5 10h.01M5 16h.01`}),V(`path`,{"stroke-width":`2`,d:`m10 17l4-10m2 10l4-10`})],-1)]])}var Xh=Y({name:`humbleicons-url`,render:Yh}),Zh={class:`drawer-header flex items-center w-full h-[45px] border-b-[1px] border-color px-3`},Qh={class:`font-semibold text-lg truncate`},$h=[`onClick`],eg={class:`text-xs truncate`},tg={class:`w-full h-full max-h-full overflow-y-scroll`},ng={key:0,class:`flex w-full h-full items-center justify-center mt-5`},rg={key:1,class:`w-full h-full`},ig={key:0,class:`w-full flex items-center justify-center p-4 h-[70px]`},ag=nr(Z({__name:`CameraOptions`,props:{cameraName:{},latestSnapshotSrc:{}},emits:[`close`],setup(e,{emit:t}){let n=new Vr,r=e,a=t,o=$e(),s=Ke(),{t:c}=i(),{cameraName:l,latestSnapshotSrc:u}=Bt(r),{camera:d,isLoading:f}=be(l),{data:p,isBusy:m}=n.getCameraQuery(l),{mutate:h,isPending:g}=n.patchCameraQuery(),_=It(`formRef`),v=W(),y=W(`overview`),b=W([{name:`overview`,icon:Dr},{name:`sources`,icon:Xh},{name:`settings`,icon:Or},{name:`plugins`,icon:Ar}]),x=J(()=>m.value||f.value||g.value),ee=J(()=>y.value===`sources`||y.value===`settings`);async function S(){let e=await _.value?.validate();e?.valid&&e.values?h({cameraname:l.value,cameraData:e.values}):(o.error(`Validation failed`,e),s.add({severity:`error`,detail:c(`components.toast.validation_failed`),life:3e3}))}return M(p,e=>{e&&(v.value=pt(e))},{deep:!0,immediate:!0}),(e,t)=>{let n=xr,r=Fe,i=un,o=dn,s=fe,c=qh,f=af,m=bd,h=Cc,g=hn,te=rn,ne=_n;return $(),U(K,null,[V(`div`,Zh,[V(`span`,Qh,F(R(l)),1),Q(r,{text:``,rounded:``,severity:`secondary`,class:`ml-auto cui-icon-md shrink-0`,onClick:t[0]||=e=>a(`close`)},{icon:G(()=>[Q(n,{width:`100%`,height:`100%`})]),_:1})]),Q(R(Ct),{ref_key:`formRef`,ref:_,class:`w-full`,style:z({height:`calc(100% - 45px - ${R(ee)?`70px`:`0px`})`}),"validation-schema":R(li)},{default:G(()=>[Q(ne,{value:R(y),"onUpdate:value":t[7]||=e=>Gt(y)?y.value=e:null,scrollable:``,class:`w-full h-full`},{default:G(()=>[Q(o,{class:`justify-between`,pt:{tablist:{class:`h-[65px]`},activeBar:{class:`!w-auto`}}},{default:G(()=>[($(!0),U(K,null,B(R(b),(t,n)=>($(),H(i,{key:n,value:t.name,"as-child":``},{default:G(n=>[V(`div`,yt({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}),[($(),H(St(t.icon),{class:`w-5 h-5`})),V(`span`,eg,F(e.$t(`components.options_sidebar.segment_tab_${t.name}`)),1)],16,$h)]),_:2},1032,[`value`]))),128))]),_:1}),Q(te,{class:`p-0 h-[calc(100%-65px)]`},{default:G(()=>[V(`div`,tg,[($(!0),U(K,null,B(R(b),(e,n)=>($(),H(g,{key:n,value:e.name,"as-child":``},{default:G(e=>[e.active?($(),U(`div`,yt({key:0,class:e.class},{ref_for:!0},e.a11yAttrs),[!R(v)||!R(p)||!R(d)?($(),U(`div`,ng,[Q(s,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])):($(),U(`div`,rg,[R(y)===`overview`?($(),H(c,{key:0,camera:R(p),"camera-device":R(d),loading:R(x),"latest-snapshot-src":R(u),onClose:t[1]||=e=>a(`close`)},null,8,[`camera`,`camera-device`,`loading`,`latest-snapshot-src`])):q(``,!0),R(y)===`sources`?($(),H(f,{key:1,modelValue:R(v),"onUpdate:modelValue":t[2]||=e=>Gt(v)?v.value=e:null,camera:R(p),"camera-device":R(d),loading:R(x),onClose:t[3]||=e=>a(`close`)},null,8,[`modelValue`,`camera`,`camera-device`,`loading`])):q(``,!0),R(y)===`settings`?($(),H(m,{key:2,modelValue:R(v),"onUpdate:modelValue":t[4]||=e=>Gt(v)?v.value=e:null,camera:R(p),"camera-device":R(d),loading:R(x),onClose:t[5]||=e=>a(`close`)},null,8,[`modelValue`,`camera`,`camera-device`,`loading`])):q(``,!0),R(y)===`plugins`?($(),H(h,{key:3,camera:R(p),"camera-device":R(d),loading:R(x),onClose:t[6]||=e=>a(`close`)},null,8,[`camera`,`camera-device`,`loading`])):q(``,!0)]))],16)):q(``,!0)]),_:1},8,[`value`]))),128))])]),_:1})]),_:1},8,[`value`]),R(ee)?($(),U(`div`,ig,[Q(r,{fluid:``,severity:`success`,class:`cui-button-medium`,label:e.$t(`components.form.button.save`),onClick:S},null,8,[`label`])])):q(``,!0)]),_:1},8,[`style`,`validation-schema`])],64)}}}),[[`__scopeId`,`data-v-38cd7548`]]),og={class:`w-full h-full p-safe !pb-0 md:!pl-0 non-draggable-region`},sg={class:`w-full h-full border-0 md:border-r-[1px] border-color overflow-y-auto pb-safe`},cg=Z({__name:`CuiCameraDrawer`,setup(e){let t=$t(),n=Wr(),r=n.getEventBus(),i=W(!1),a=W(),o=W(),s=J(()=>Gr.pt);function c(){i.value=!1,n.close()}return M(t.currentRoute,(e,t)=>{e.path!==t.path&&n.close()}),Tt(()=>{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=ag,r=Sn;return $(),H(r,yt({visible:R(i),"onUpdate:visible":t[0]||=e=>Gt(i)?i.value=e:null},R(o),{class:`border-0 md:border-l-[1px]`,pt:R(s),onHide:c}),{container:G(({closeCallback:e})=>[V(`div`,og,[V(`div`,sg,[R(a)?($(),H(n,yt({key:0},R(a),{onClose:e}),null,16,[`onClose`])):q(``,!0)])])]),_:1},16,[`visible`,`pt`])}}}),lg=Z({__name:`CuiToast`,setup(e){let t=$e(),{t:n}=i(),{mdBreakpoint:r}=dr(),{theme:a}=Qt(Jr()),o={success:Xt.success,error:Xt.error,warn:Xt.warning,warning:Xt.warning,info:Xt.info};function s(e){return n(`components.toast.title_${e===`warning`?`warn`:e}`)}function c(e){return e.type===`dismiss`}return b(qe.on(e=>{if(c(e)){Xt.dismiss(e.id);return}let r=e,i=o[r.severity]||Xt,a=r.summary||s(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&&(Xt.loading(i??e,{id:o,duration:1/0}),s.catch(e=>{t.error(`action failed`,e),Xt.error(n(`components.toast.title_error`),{id:o})}))}}}i(a,{id:r.id,description:r.detail,duration:r.persistent?1/0:r.life??3e3,action:l})})),(e,t)=>($(),H(R(Yt),{"rich-colors":``,position:R(r)?`top-center`:`bottom-right`,"visible-toasts":3,theme:R(a)},null,8,[`position`,`theme`]))}}),ug={class:`loader flex flex-col justify-center items-center`},dg={key:0,class:`absolute flex flex-col items-center justify-center pb-safe bottom-10`},fg={key:0,class:`offline`},pg={key:1,class:`text-center text-white text-sm font-bold mt-2`},mg=nr(Z({__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}=Bt(e),{start:o}=s(()=>{document.getElementById(`lens`)?.classList.add(`cameraLens`),document.getElementById(`CameraUI_U`)?.classList.add(`cameraLetter`)},100,{immediate:!1}),{resume:c}=He(()=>{document.getElementById(`lens`)?.classList.remove(`cameraLens`),document.getElementById(`CameraUI_U`)?.classList.remove(`cameraLetter`),o()},2300,{immediate:!1});return Tt(()=>{t.value&&c()}),(e,t)=>($(),U(`div`,ug,[Q(R(xt),{src:R(_t)(`logo_loading_circle.svg`),width:R(n),height:R(r),title:`camera.ui`,"aria-label":`camera.ui`},null,8,[`src`,`width`,`height`]),R(a)||R(i)?($(),U(`div`,dg,[R(a)?($(),U(`div`,fg,[($(),H(St(R(a)),{class:`w-8 h-8 text-primary`}))])):q(``,!0),R(i)?($(),U(`div`,pg,F(R(i)),1)):q(``,!0)])):q(``,!0)]))}}),[[`__scopeId`,`data-v-839ba1ea`]]);$e(`PushHandler`);function hg(){let e=$t(),{isElectronApp:t,electron:n}=nt();function r(t,n){n?.deepLink&&e.push(n.deepLink)}Tt(()=>{!t||!n||(n.removeListener(`notification-click`,r),n.on(`notification-click`,r))}),At(()=>{n?.removeListener(`notification-click`,r)})}function gg(){let e=$t(),{isElectronApp:t,electron:n}=nt();function r(t,n){n?.path&&e.push(n.path)}Tt(()=>{!t||!n||(n.removeListener(`deep-link`,r),n.on(`deep-link`,r))}),At(()=>{n?.removeListener(`deep-link`,r)})}var _g={key:1,class:`app`},vg=nr(Z({__name:`App`,setup(e){let{navbarState:t,subbarState:n,showBottombar:r,showNavbar:a,showTopbar:o}=sr(),s=ur(),c=Zt(),l=$t(),{mdBreakpoint:u}=dr(),{isPWA:d}=lr(),{t:f}=i(),p=Ge(),{isElectronApp:m}=nt();ot(),mr(),hg(),gg();let{theme:h}=Qt(Jr()),{isLoggedIn:g}=Qt(st()),_=Er(),v=It(`navbarRef`),y=It(`topbarRef`),b=It(`bottombarRef`),x=W(!0),ee=W(!1),S=ve(y,{width:0,height:0},{box:`border-box`}),te=ve(b,{width:0,height:0},{box:`border-box`}),ne=J(()=>t.value===`closed`||t.value===`minified`?u.value?xa.CLOSED:xa.MINIFIED:xa.EXPANDED),C=J(()=>t.value===`closed`?0:8),w=J(()=>!v.value||u.value?`env(safe-area-inset-left, 0px)`:`calc(${ne.value}px + max(${C.value}px, env(safe-area-inset-left, 0px)))`),re=J(()=>s.showTopbar.value?`var(--topbar-background)`:s.background.value?s.background.value:`var(--ground-background)`),T=J(()=>`calc(100dvh - ${y.value?`${S.height.value}px`:`env(safe-area-inset-top, 0px)`} - ${b.value?`${te.height.value}px`:s.ignoreSafeAreaBottom.value?`0px`:`env(safe-area-inset-bottom, 0px)`} - ${b.value||!s.disableScroll.value||s.noExtraPadding.value?`0px`:`8px`})`),ie=J(()=>c.meta.auth?.requiresAuth&&!g.value||x.value||_.isSwitching),ae=J(()=>{if(!(!_.isSwitching||!_.switchTargetName))return`${f(`components.instance_switcher.switching_to`)} ${_.switchTargetName}...`});async function oe(){}return M([g,()=>p.isOnline.value],([e,t],n)=>{if(_.isSwitching)return;let r=n?.[0]===!0&&n?.[1]===!0;e&&t&&!r&&(_.saveCurrentTokens(),_.fetchInstances())},{immediate:!0}),M([re,h],()=>{Ut(()=>{if(/^var\([^)]+\)$/.test(re.value)){let e=window.getComputedStyle(document.body),t=re.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`,re.value)})},{immediate:!0}),M(()=>s.disableScroll.value,e=>{document.body.classList.toggle(`disable-overflow-scroll`,e),document.documentElement.classList.toggle(`disable-overflow-scroll`,e)},{immediate:!0}),Tt(async()=>{await l.isReady(),oe(),x.value=!1,requestAnimationFrame(()=>{ee.value=!0})}),(e,i)=>{let c=mg,l=lg,f=Cn,p=xn,h=cg,g=cs,x=Va,re=za,oe=jt(`RouterView`),E=sa,se=Xi,ce=qi,le=Vi,ue=Fi;return R(ie)?($(),U(`div`,{key:0,class:`flex w-full h-full justify-center items-center absolute z-50`,style:z({minHeight:R(d)?`100vh !important`:`100dvh !important`})},[Q(c,{reload:``,text:R(ae)},null,8,[`text`])],4)):($(),U(`div`,_g,[Q(l),Q(f),Q(p),Q(h),R(o)?($(),H(g,{key:0,ref_key:`topbarRef`,ref:y,class:`z-2 top-0`,"offset-left":R(u)?0:R(ne),animate:R(ee)},null,8,[`offset-left`,`animate`])):q(``,!0),R(r)?($(),H(x,{key:1,ref_key:`bottombarRef`,ref:b,class:`z-2`},null,512)):q(``,!0),R(a)?($(),H(re,{key:2,ref_key:`navbarRef`,ref:v,class:`z-3 top-0 left-0`},null,512)):q(``,!0),V(`main`,{id:`container`,class:`relative w-dvw z-1 overflow-x-hidden`,style:z({transition:R(ee)?`padding-left 200ms`:void 0,paddingTop:R(y)?`${R(S).height.value}px`:`env(safe-area-inset-top, 0px)`,paddingLeft:R(w),paddingRight:`env(safe-area-inset-right, 0px)`,paddingBottom:R(b)?`${R(te).height.value}px`:R(s).ignoreSafeAreaBottom.value?`0px`:`env(safe-area-inset-bottom, 0px)`})},[V(`div`,{class:P([`w-full max-w-full h-full grid`,{"p-2":R(s).padding.value,"pt-0":R(s).paddingTop.value===!1,"pb-0":R(s).paddingBottom.value===!1&&!R(b),"pb-4":(R(s).paddingBottom.value||R(b))&&!R(s).disableScroll,"pl-0":R(s).paddingLeft.value===!1,"pr-0":R(s).paddingRight.value===!1}]),style:z({minHeight:R(T),maxHeight:R(s).disableScroll.value?R(T):void 0,height:R(s).disableScroll.value?R(T):void 0,overflow:R(s).disableScroll.value?`hidden`:void 0})},[Q(oe,null,{default:G(({Component:e})=>[($(),H(St(e),{key:R(_).switchKey,class:P([`w-full h-full relative min-w-0`,{"overflow-x-hidden":!R(s).allowOverflowX.value}]),"navbar-width":R(ne),"navbar-left":R(C)},null,8,[`class`,`navbar-width`,`navbar-left`]))]),_:1})],6)],4),R(m)?($(),H(E,{key:3})):q(``,!0),R(t)===`opened`||R(n)===`opened`&&R(u)?($(),H(Vt,{key:4,to:R(t)===`opened`?`#app`:`#container`,defer:``},[R(u)?($(),U(`div`,{key:0,class:P([`fixed top-0 left-0 right-0 bottom-0 w-full h-full bg-black/50 z-1`,{"z-2":R(t)===`opened`}])},null,2)):q(``,!0)],8,[`to`])):q(``,!0),V(`div`,{class:`fixed-bg`,style:z({background:R(s).background.value})},null,4),Q(se),Q(ce),Q(le),Q(ue)]))}}}),[[`__scopeId`,`data-v-d25eaf46`]]);function yg(e,t){e.use(y({natsTransport:t.nats,target:t.target,wsTransport:t.ws})),e.use(ze({natsTransport:t.nats,target:t.target,wsTransport:t.ws,workerBridge:lt(),workerRegistry:Xe}))}var bg=nn(),xg=En(kn,{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 Sg(e){rt(e)||ir.value||or.value||Ke().add({severity:`error`,detail:e,life:3e3})}function Cg(){return{enableDevtoolsV6Plugin:!0,queryClientConfig:{defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!0,gcTime:300*1e3,staleTime:1e4,networkMode:`online`,retry:(e,t)=>wg(t)===401?!1:e<2?!0:(Sg(t),!1)},mutations:{retry:0,networkMode:`online`,onError:Sg}}}}}function wg(e){if(typeof e==`object`&&e&&`response`in e){let t=e.response;if(typeof t?.status==`number`)return t.status}}function Tg(){return{theme:{preset:xg,options:{cssLayer:{name:`primevue`,order:`theme, base, primevue`},darkModeSelector:`.dark-mode`}}}}function Eg(e){e.directive(`tooltip`,ke).directive(`focustrap`,ge),e.use(On).use(yn).use(Dn).use(cn,Tg()).use(Ye).use(Mt()).use(Ft,Cg()).use(bg)}window.addEventListener(`vite:preloadError`,()=>{sessionStorage.getItem(`cui-chunk-reload`)||(sessionStorage.setItem(`cui-chunk-reload`,`1`),window.location.reload())});var{connection:Dg}=await dt({logger:new _e(`Connection`)});gt();var Og=Jt(vg),kg=new _e(`Vue`);Og.config.errorHandler=(e,t,n)=>kg.error(`[${n}]`,e),Eg(Og),yi(Dg),yg(Og,Dg),Og.use(yr),Er().restoreActiveOverride();var Ag=await vi(Dg,{onUser:e=>st().setUserFromLogin(e),onRedirectInfo:e=>{Er().redirectInfo=e},onReset:()=>{Er().activeId=null,Je.value=null}});Og.mount(`#app`),Ag||Dg.boot(`default`);
|