@camera.ui/server 2.0.19 → 2.0.21
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-CG23ZpFv.js → 404-9YR2yuVi.js} +1 -1
- package/dist/interface/assets/{About-Dawv7dKP.js → About-ClX7-pcf.js} +1 -1
- package/dist/interface/assets/{Adminpanel-529Hf8yC.js → Adminpanel-CKNwF9Ra.js} +1 -1
- package/dist/interface/assets/Automation-C6ag7k7_.js +3 -0
- package/dist/interface/assets/{AutomationImport-CXXYinR0.js → AutomationImport-CXBM_wCp.js} +2 -2
- package/dist/interface/assets/AutomationStore-DynwN8qS.js +2 -0
- package/dist/interface/assets/AutomationStoreDetail-CB671U76.js +2 -0
- package/dist/interface/assets/Automations-Cg4Lzb1M.js +2 -0
- package/dist/interface/assets/Camera-Cqt297Vv.css +1 -0
- package/dist/interface/assets/Camera-Dj4f6jSP.js +2 -0
- package/dist/interface/assets/{CameraConsole-D06gEm91.js → CameraConsole-e5MVc4mo.js} +1 -1
- package/dist/interface/assets/Cameras-BH0Ae5cx.js +652 -0
- package/dist/interface/assets/Camview-BmkHCnIA.js +1 -0
- package/dist/interface/assets/Config-CFNrNWvY.js +2 -0
- package/dist/interface/assets/{ConfigActionCameraControl-4E0E0_fY.js → ConfigActionCameraControl-DdnbHsk0.js} +1 -1
- package/dist/interface/assets/{ConfigActionDelay-Cjmjm7gn.js → ConfigActionDelay-B_8luSRN.js} +1 -1
- package/dist/interface/assets/{ConfigActionHttp-W-_LXPpQ.js → ConfigActionHttp-DIVWD5n0.js} +1 -1
- package/dist/interface/assets/{ConfigActionImageInput-D20ulIj4.js → ConfigActionImageInput-DJLTP_sq.js} +1 -1
- package/dist/interface/assets/{ConfigActionMqtt-PGVLgx6J.js → ConfigActionMqtt-AqfQLoTb.js} +1 -1
- package/dist/interface/assets/{ConfigActionNotification-DtE9vlwt.js → ConfigActionNotification-LSM37AS3.js} +1 -1
- package/dist/interface/assets/ConfigActionNotificationControl-B5vMHnW7.js +1 -0
- package/dist/interface/assets/{ConfigActionOutput-Cb0Ik5Lg.js → ConfigActionOutput-CFZM6M82.js} +1 -1
- package/dist/interface/assets/{ConfigActionPlugin-DeXj_Qku.js → ConfigActionPlugin-BJV2lLwv.js} +1 -1
- package/dist/interface/assets/{ConfigActionSensor-DH03MD04.js → ConfigActionSensor-C7mhQPAm.js} +1 -1
- package/dist/interface/assets/{ConfigActionSnapshot-bEiIuVkE.js → ConfigActionSnapshot-D3FQ7uoq.js} +1 -1
- package/dist/interface/assets/{ConfigActionVariable-6xpPwfGg.js → ConfigActionVariable-KfYkAwtV.js} +1 -1
- package/dist/interface/assets/{ConfigConditionIfElse-CnUdhYBw.js → ConfigConditionIfElse-nYxvbp24.js} +1 -1
- package/dist/interface/assets/{ConfigConditionSensorState-Cpod48bM.js → ConfigConditionSensorState-XERa4yXd.js} +1 -1
- package/dist/interface/assets/{ConfigConditionSwitch-CrcDpdeO.js → ConfigConditionSwitch-BBFppRN1.js} +1 -1
- package/dist/interface/assets/{ConfigConditionTime-BK18wRIR.js → ConfigConditionTime-O3Br_i5I.js} +1 -1
- package/dist/interface/assets/{ConfigSensorValueInput-BDJSe4AD.js → ConfigSensorValueInput-DJom6CJQ.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerDetection-CLY_l8WB.js → ConfigTriggerDetection-CnHj5hHf.js} +1 -1
- package/dist/interface/assets/ConfigTriggerGeofence-Cy2jbqWp.js +1 -0
- package/dist/interface/assets/{ConfigTriggerManual-BifyCaS9.js → ConfigTriggerManual-BoZPeahx.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerMqtt-DVxJJ1Ii.js → ConfigTriggerMqtt-BI6UMyxS.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSchedule-C5apVQ3A.js → ConfigTriggerSchedule-lDIQclYa.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSensor-CtU2-Ebe.js → ConfigTriggerSensor-0-7UpUZY.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerSystem-P_hogQ3_.js → ConfigTriggerSystem-MlzNFTkZ.js} +1 -1
- package/dist/interface/assets/{ConfigTriggerWebhook-D4lYvM7m.js → ConfigTriggerWebhook-CYKc8B5t.js} +1 -1
- package/dist/interface/assets/{Console-DgwnUKDQ.js → Console-DDsPYJgK.js} +1 -1
- package/dist/interface/assets/{CuiAutomationRunsDialog-D8DfgOlE.js → CuiAutomationRunsDialog-ChZWmQGs.js} +1 -1
- package/dist/interface/assets/{CuiBottomSheet-BzKu50hx.js → CuiBottomSheet-BS2_Z135.js} +1 -1
- package/dist/interface/assets/CuiBottomSheet-Ddz-C6EJ.js +1 -0
- package/dist/interface/assets/{CuiCameraPipCard-RB60OEgF.js → CuiCameraPipCard-Bv6mbocY.js} +1 -1
- package/dist/interface/assets/{CuiCameraRecordings-DSeBoMKj.js → CuiCameraRecordings-Ca5wm8TV.js} +1 -1
- package/dist/interface/assets/CuiCameraShares-w6K5-4yH.js +1 -0
- package/dist/interface/assets/{CuiCameraTable-MjJctqrJ.js → CuiCameraTable-Bjiq2y8d.js} +1 -1
- package/dist/interface/assets/{CuiDataTable-DQRKmdcE.js → CuiDataTable-DS3xBLS7.js} +1 -1
- package/dist/interface/assets/{CuiMarkdownContent-BwMdbyad.js → CuiMarkdownContent-DEMo42iT.js} +1 -1
- package/dist/interface/assets/CuiMarkdownContent-Xn_VHwym.js +1 -0
- package/dist/interface/assets/CuiPluginCard-DnarBFVa.js +2 -0
- package/dist/interface/assets/{CuiPluginCategoryChip-AsMNaK01.js → CuiPluginCategoryChip-DZhaWc_S.js} +1 -1
- package/dist/interface/assets/CuiPluginOAuthButton-DyPfV8hY.js +2 -0
- package/dist/interface/assets/{CuiPluginTrustBadge-tIqjoCDz.js → CuiPluginTrustBadge-BJ6pc43x.js} +1 -1
- package/dist/interface/assets/CuiQRCode-C0gdwLUs.js +1 -0
- package/dist/interface/assets/CuiRecordingsGrid-CVll9mg2.js +1 -0
- package/dist/interface/assets/CuiSchema-DXSjz3IR.js +1 -0
- package/dist/interface/assets/{CuiTopNavbarItem-BhUA2MiU.js → CuiTopNavbarItem-Ba6NH5w-.js} +1 -1
- package/dist/interface/assets/Faces-k6xFGoBN.js +1 -0
- package/dist/interface/assets/FirstSteps-DFfg4zRP.js +1 -0
- package/dist/interface/assets/{Instances-Cllek48f.js → Instances-CbK1g4IM.js} +1 -1
- package/dist/interface/assets/{Logs-ic15Mp_h.js → Logs-B-6Ku-as.js} +2 -2
- package/dist/interface/assets/{Menu-By6NRK44.js → Menu-eNDXPuYN.js} +1 -1
- package/dist/interface/assets/OAuthDeviceFlow-BRWgtznM.js +1 -0
- package/dist/interface/assets/Plugin-Cs-vi0ov.js +1 -0
- package/dist/interface/assets/Plugin-wl-2k1zI.css +1 -0
- package/dist/interface/assets/{PluginConsole-BaPz9Ag3.js → PluginConsole-C5QUHag5.js} +1 -1
- package/dist/interface/assets/PluginDetail-BV9q05RH.js +2 -0
- package/dist/interface/assets/{PluginSchema-Cb_F8uew.js → PluginSchema-ZmCo1GfL.js} +1 -1
- package/dist/interface/assets/PluginSearch-CPSS5l_S.js +2 -0
- package/dist/interface/assets/PluginSearch-D2lfdneY.js +1 -0
- package/dist/interface/assets/{Plugins-RVhaBdkA.js → Plugins-BMeUpZis.js} +1 -1
- package/dist/interface/assets/Recordings-oa1jW60s.js +1 -0
- package/dist/interface/assets/{Settings-DQgp2tgH.js → Settings-Cu4k98YQ.js} +1 -1
- package/dist/interface/assets/SettingsAccount-BR97Mvsw.js +1 -0
- package/dist/interface/assets/SettingsAccount-Ce5Kew-X.js +1 -0
- package/dist/interface/assets/SettingsAppearance-CvqBMYa0.js +1 -0
- package/dist/interface/assets/{SettingsAppearance-YNXseOYk.js → SettingsAppearance-sBMROH-9.js} +1 -1
- package/dist/interface/assets/{SettingsBackup-DIWxITfi.js → SettingsBackup-BQZ17oo9.js} +1 -1
- package/dist/interface/assets/SettingsMqtt-CswzO2yF.js +1 -0
- package/dist/interface/assets/SettingsNotifications-BZAmBizt.js +2 -0
- package/dist/interface/assets/SettingsPermissions-BO45j_2T.js +1 -0
- package/dist/interface/assets/{SettingsRecordings-Dxdxayym.js → SettingsRecordings-BlsL_XbW.js} +1 -1
- package/dist/interface/assets/SettingsRemote-PJZ9QEdM.js +1 -0
- package/dist/interface/assets/SettingsSystem-BOovn83d.js +2 -0
- package/dist/interface/assets/SettingsUsers-4PxUV0xb.js +1 -0
- package/dist/interface/assets/Terminal-BW210aW_.js +4 -0
- package/dist/interface/assets/{VariableInput-Br6YY5HX.js → VariableInput-D3XO0sxM.js} +1 -1
- package/dist/interface/assets/{VariableSuggestions-D898dM5K.js → VariableSuggestions-usJlEFx9.js} +1 -1
- package/dist/interface/assets/VersionsHandler-BchMo3gy.js +7 -0
- package/dist/interface/assets/Workers-BaT-k-h7.js +2 -0
- package/dist/interface/assets/{account-jONrhXkE.js → account-sFoKqEOV.js} +1 -1
- package/dist/interface/assets/{alert-circle-CqEfEWD8.js → alert-circle-BQZQ417w.js} +1 -1
- package/dist/interface/assets/{alert-outline-DcXO2ICo.js → alert-outline-BUvdNY2J.js} +1 -1
- package/dist/interface/assets/api-B2zXvFkd.css +2 -0
- package/dist/interface/assets/api-CFvSlLoS.js +2 -0
- package/dist/interface/assets/{api-CkxuZ9lw.js → api-yu63zQdy.js} +1 -1
- package/dist/interface/assets/{arrow-left-DGioEwqJ.js → arrow-left-LdfKbcre.js} +1 -1
- package/dist/interface/assets/{arrow-right-outline-BrpH6MGt.js → arrow-right-outline-BbTEhBJq.js} +1 -1
- package/dist/interface/assets/{auth-Dgn4npDp.js → auth-DpuHVB2f.js} +1 -1
- package/dist/interface/assets/{automations-Dab1-eSY.js → automations-CswkESOL.js} +1 -1
- package/dist/interface/assets/{back-filled-DZmo9cAg.js → back-filled-BdHG6uUx.js} +1 -1
- package/dist/interface/assets/{bell-ring-D0h1GDrU.js → bell-ring-Dua4zXf_.js} +1 -1
- package/dist/interface/assets/{cameras.schema-CwGkDyzk.js → cameras.schema-DQRHRTy7.js} +1 -1
- package/dist/interface/assets/{cctv-CdDfBHME.js → cctv-DEiPL3U8.js} +1 -1
- package/dist/interface/assets/{check-circle-CVNa_reg.js → check-circle-D-utE_P9.js} +1 -1
- package/dist/interface/assets/{chevron-down-BiRUJ9SO.js → chevron-down-OEjMpuec.js} +1 -1
- package/dist/interface/assets/{chevron-right-Crha-j7O.js → chevron-right-B3nxd9UE.js} +1 -1
- package/dist/interface/assets/{clock-outline-dv-kmi60.js → clock-outline-C_f3Ed8x.js} +1 -1
- package/dist/interface/assets/{close-BCRtoBTk.js → close-DNgGJYHi.js} +1 -1
- package/dist/interface/assets/{close-circle-raXx3m4Q.js → close-circle-L5juejMg.js} +1 -1
- package/dist/interface/assets/{cloud-check-CST59Xl_.js → cloud-check-DD7oRzmo.js} +1 -1
- package/dist/interface/assets/cloudHandoff-CnR2gwtj.js +1 -0
- package/dist/interface/assets/{config-BYU9LRQr.js → config-CCcnF9Yx.js} +1 -1
- package/dist/interface/assets/{copy-C53ZJyaU.js → copy-BvSzmsFs.js} +1 -1
- package/dist/interface/assets/{delete-Dvdp44LT.js → delete-B9BZTgya.js} +1 -1
- package/dist/interface/assets/{dist-DZi5AgJB.js → dist-qdWlJrr0.js} +1 -1
- package/dist/interface/assets/{download-Dq82fWLS.js → download-Dp_ssGIE.js} +1 -1
- package/dist/interface/assets/esm-9VMgxuPI.js +1 -0
- package/dist/interface/assets/esm-B69zS8aI.js +1 -0
- package/dist/interface/assets/esm-BF94InGP.js +1 -0
- package/dist/interface/assets/esm-BHdK6hkk.js +1 -0
- package/dist/interface/assets/esm-BYm8JT8N.js +1 -0
- package/dist/interface/assets/esm-BwCmHX2G.js +1 -0
- package/dist/interface/assets/esm-CL6t-XYT.js +1 -0
- package/dist/interface/assets/esm-CXstRMXa.js +1 -0
- package/dist/interface/assets/esm-Ckb9rjlL.js +1 -0
- package/dist/interface/assets/esm-D4insKbc.js +1 -0
- package/dist/interface/assets/esm-DiReJ8YS.js +1 -0
- package/dist/interface/assets/esm-Dt_Neag0.js +1 -0
- package/dist/interface/assets/esm-GspmWlKf.js +1 -0
- package/dist/interface/assets/esm-eezqpB2a.js +1 -0
- package/dist/interface/assets/{flowSchema-BuhMrSRP.js → flowSchema-ByVSVVZM.js} +1 -1
- package/dist/interface/assets/{history--LGIMjNU.js → history-iAZcYg3f.js} +1 -1
- package/dist/interface/assets/{home-C5hRJg9h.js → home-DL94781-.js} +1 -1
- package/dist/interface/assets/{information-outline-CjhiKBjG.js → information-outline-CVsB1bl-.js} +1 -1
- package/dist/interface/assets/{lightbulb-outline-BGFG7wv-.js → lightbulb-outline-nNLyXAIp.js} +1 -1
- package/dist/interface/assets/{main-Dchuz606.css → main-CEYTxpKX.css} +1 -1
- package/dist/interface/assets/main-zSbiCYYG.js +3 -0
- package/dist/interface/assets/{microphone-Dp5Yhz6Z.js → microphone-CU0mFDMh.js} +1 -1
- package/dist/interface/assets/{mqtt-Bj9HWVr-.js → mqtt-BNgvAoK4.js} +1 -1
- package/dist/interface/assets/native-WiRjRKUS.js +1 -0
- package/dist/interface/assets/native-hhip9y-E.js +1 -0
- package/dist/interface/assets/nodeDefinitions-CPyyuw1P.js +1 -0
- package/dist/interface/assets/{notifications-B2GVNEL7.js → notifications-BAnFnX49.js} +1 -1
- package/dist/interface/assets/plugin-DIVM640y.js +1 -0
- package/dist/interface/assets/{plugins-Ct1tFRqH.js → plugins-Ca3OgKn0.js} +1 -1
- package/dist/interface/assets/{plus-C6l_Q-mY.js → plus-CTzaBaTz.js} +1 -1
- package/dist/interface/assets/{plus-DhRnJIfm.js → plus-Ct6WQfM1.js} +1 -1
- package/dist/interface/assets/{power-BfcMaKbx.js → power-CvKGepBP.js} +1 -1
- package/dist/interface/assets/{ring-resize-peEJMXPl.js → ring-resize-CZBThoQC.js} +1 -1
- package/dist/interface/assets/{round-alt-arrow-left-bold-BcL7KVCG.js → round-alt-arrow-left-bold-BlpNMBxm.js} +1 -1
- package/dist/interface/assets/{round-restart-alt-COgLKyfG.js → round-restart-alt-DRs27TY5.js} +1 -1
- package/dist/interface/assets/{search-BTu5ntI6.js → search-M4Rt52Co.js} +1 -1
- package/dist/interface/assets/{server-CmHQA2OF.js → server-gTuqdFby.js} +1 -1
- package/dist/interface/assets/{settings-wRDwvjf-.js → settings-CgToKrFd.js} +1 -1
- package/dist/interface/assets/{source-branch-DejOTyZv.js → source-branch-CoHKTGxb.js} +1 -1
- package/dist/interface/assets/{theme-BdlqMboH.js → theme-DIq9gz97.js} +1 -1
- package/dist/interface/assets/{trash-2-upauF9j0.js → trash-2-BKWfq15D.js} +1 -1
- package/dist/interface/assets/{trash-can-outline-PQys0L3O.js → trash-can-outline-HvqPHpF7.js} +1 -1
- package/dist/interface/assets/{trash-fill-DDHuYpvM.js → trash-fill-yNQsFs0Y.js} +1 -1
- package/dist/interface/assets/{trash2-M6P7YvkH.js → trash2-DjTG9rG-.js} +1 -1
- package/dist/interface/assets/{types-o57RMLy1.js → types-C7L3hjfO.js} +1 -1
- package/dist/interface/assets/types-Cn7DsWzS.js +1 -0
- package/dist/interface/assets/types-YwmhC3Ej.js +1 -0
- package/dist/interface/assets/{upload-DwNCSVAl.js → upload-B6yqOWqz.js} +1 -1
- package/dist/interface/assets/useAppVersion-l__imCkk.js +1 -0
- package/dist/interface/assets/{useBackupRestore-xqzQKAfT.js → useBackupRestore-Cgawtix3.js} +1 -1
- package/dist/interface/assets/{useCameraOptions-CAu9scRL.js → useCameraOptions-C1kW1dA9.js} +1 -1
- package/dist/interface/assets/{useCardSelection-BdYBm23a.js → useCardSelection-CgZ7QTaA.js} +1 -1
- package/dist/interface/assets/useElectron-Dt3r8Pr5.js +1 -0
- package/dist/interface/assets/{useLogsSocket-B_EbSIOU.js → useLogsSocket-DAW77Nal.js} +1 -1
- package/dist/interface/assets/usePermissions-C8pmxROS.js +1 -0
- package/dist/interface/assets/{useServerRestart-CZj3Y0Gh.js → useServerRestart-BX8sVJAR.js} +1 -1
- package/dist/interface/assets/{useStreamStatus-B12LRLX9.js → useStreamStatus-Dzl_vdmR.js} +1 -1
- package/dist/interface/assets/useUserOptions-ChdxzZFg.js +1 -0
- package/dist/interface/assets/{variable-K7DoQHpX.js → variable-Y3IAPnsB.js} +1 -1
- package/dist/interface/assets/vendor-cameraui-Dq4HsgJP.js +2040 -0
- package/dist/interface/assets/{vendor-capacitor-BmJAC1FL.js → vendor-capacitor-D6T-f6Q_.js} +2 -2
- package/dist/interface/assets/{vendor-chart-BDu4sN9x.js → vendor-chart-DpsXMlB-.js} +1 -1
- package/dist/interface/assets/{vendor-core-0Lu3l40a.js → vendor-core-JEiqQGZM.js} +1 -1
- package/dist/interface/assets/{vendor-dnd-BN6m9rq8.js → vendor-dnd-hwiZJHjo.js} +1 -1
- package/dist/interface/assets/{vendor-draggabilly-BLoTmI_a.js → vendor-draggabilly-OrLwQbim.js} +1 -1
- package/dist/interface/assets/{vendor-gridstack-9ka60QnT.js → vendor-gridstack-C6VKsm_r.js} +1 -1
- package/dist/interface/assets/{vendor-gridstack-Chv4ms9g.css → vendor-gridstack-DsRWLz0m.css} +1 -1
- package/dist/interface/assets/{vendor-markdown-D_3Of-Gz.js → vendor-markdown-_OBaDsnU.js} +1 -1
- package/dist/interface/assets/{vendor-CdGy-Xet.js → vendor-nfBMzqgY.js} +10 -10
- package/dist/interface/assets/{vendor-primevue-Cm1rEh62.js → vendor-primevue-0ryUKXNO.js} +1 -1
- package/dist/interface/assets/{vendor-vueflow-D7rAeKHv.js → vendor-vueflow-B1MUSE71.js} +1 -1
- package/dist/interface/assets/web-B-SlpbxK.js +1 -0
- package/dist/interface/assets/web-B6leYIzJ.js +1 -0
- package/dist/interface/assets/web-BLDe3Kn0.js +1 -0
- package/dist/interface/assets/web-BT-51W2W.js +1 -0
- package/dist/interface/assets/web-BjKL51lK-DHLvmMLr.js +1 -0
- package/dist/interface/assets/web-BpRU7MbT.js +1 -0
- package/dist/interface/assets/web-CiaJvmq8.js +1 -0
- package/dist/interface/assets/web-Cnkt61og.js +1 -0
- package/dist/interface/assets/web-CzhM-YH1.js +1 -0
- package/dist/interface/assets/web-Da5rcZ2Q.js +1 -0
- package/dist/interface/assets/web-DdZjFuTb.js +1 -0
- package/dist/interface/assets/web-DnHj9sl9.js +1 -0
- package/dist/interface/assets/web-E4Ew4Xhj.js +1 -0
- package/dist/interface/assets/web-q63OEDhG.js +1 -0
- package/dist/interface/assets/{webhook-CQl989bo.js → webhook-yCryYojY.js} +1 -1
- package/dist/interface/assets/workbox-window.prod.es5-BMiTt6Ad.js +1 -0
- package/dist/interface/assets/{zoom-in-2i20zd_d.js → zoom-in-Da5uRiQq.js} +1 -1
- package/dist/interface/index.html +38 -37
- package/dist/interface/sw.js +1 -1
- package/dist/server/package.json +7 -7
- package/dist/server/requirements.txt +1 -1
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/config.py +2 -0
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/camera/detection.py +2 -0
- package/dist/server/src/_camera_ui_tools/camera_ui_sdk/sensor/base.py +1 -0
- package/dist/server/src/api/controllers/cameras.controller.js +1 -0
- package/dist/server/src/api/controllers/cameras.controller.js.map +1 -1
- package/dist/server/src/api/database/types.d.ts +2 -0
- package/dist/server/src/api/schemas/automations.schema.d.ts +3 -0
- package/dist/server/src/api/schemas/automations.schema.js +1 -0
- package/dist/server/src/api/schemas/automations.schema.js.map +1 -1
- package/dist/server/src/api/schemas/cameras.schema.d.ts +40 -0
- package/dist/server/src/api/schemas/cameras.schema.js +3 -0
- package/dist/server/src/api/schemas/cameras.schema.js.map +1 -1
- package/dist/server/src/api/types/index.d.ts +1 -1
- package/dist/server/src/automations/actions/index.js +2 -0
- package/dist/server/src/automations/actions/index.js.map +1 -1
- package/dist/server/src/automations/actions/notificationControl.d.ts +2 -0
- package/dist/server/src/automations/actions/notificationControl.js +17 -0
- package/dist/server/src/automations/actions/notificationControl.js.map +1 -0
- package/dist/server/src/camera/decoder/detection-coordinator.d.ts +3 -0
- package/dist/server/src/camera/decoder/detection-coordinator.js +80 -22
- package/dist/server/src/camera/decoder/detection-coordinator.js.map +1 -1
- package/dist/server/src/camera/decoder/stationary-suppressor.d.ts +5 -2
- package/dist/server/src/camera/decoder/stationary-suppressor.js +39 -12
- package/dist/server/src/camera/decoder/stationary-suppressor.js.map +1 -1
- package/dist/server/src/camera/sensors/controller.d.ts +2 -0
- package/dist/server/src/camera/sensors/controller.js +19 -4
- package/dist/server/src/camera/sensors/controller.js.map +1 -1
- package/dist/server/src/main.js +1 -1
- package/dist/server/src/main.js.map +1 -1
- package/dist/server/src/manager/notificationManager.d.ts +3 -0
- package/dist/server/src/manager/notificationManager.js +19 -4
- package/dist/server/src/manager/notificationManager.js.map +1 -1
- package/dist/server/src/remote/services/index.d.ts +4 -0
- package/dist/server/src/remote/services/index.js +27 -0
- package/dist/server/src/remote/services/index.js.map +1 -1
- package/dist/server/src/rpc/server.js +2 -0
- package/dist/server/src/rpc/server.js.map +1 -1
- package/package.json +7 -7
- package/dist/interface/assets/Automation-BaF8MdrF.js +0 -3
- package/dist/interface/assets/AutomationStore-DOdwMUIP.js +0 -2
- package/dist/interface/assets/AutomationStoreDetail-CkNGHRNU.js +0 -2
- package/dist/interface/assets/Automations-sO0qi27q.js +0 -2
- package/dist/interface/assets/Camera-DW__aloL.js +0 -2
- package/dist/interface/assets/Camera-Da5zEitE.css +0 -1
- package/dist/interface/assets/Cameras-BNBi1F0q.js +0 -652
- package/dist/interface/assets/Camview-Djtm5hEO.js +0 -1
- package/dist/interface/assets/Config-DioQs8yK.js +0 -2
- package/dist/interface/assets/ConfigTriggerGeofence-CAHirXSm.js +0 -1
- package/dist/interface/assets/CuiBottomSheet-d46jCJeG.js +0 -1
- package/dist/interface/assets/CuiCameraShares-8Mo2XwFD.js +0 -1
- package/dist/interface/assets/CuiMarkdownContent-G916_kVN.js +0 -1
- package/dist/interface/assets/CuiPluginCard-4NsvwvgQ.js +0 -2
- package/dist/interface/assets/CuiPluginOAuthButton-7mwBhBzg.js +0 -2
- package/dist/interface/assets/CuiQRCode-l-PLLptq.js +0 -1
- package/dist/interface/assets/CuiRecordingsGrid-BeOP2hpR.js +0 -1
- package/dist/interface/assets/CuiSchema-TojDO40O.js +0 -1
- package/dist/interface/assets/Faces-DW0RFypU.js +0 -1
- package/dist/interface/assets/FirstSteps-BgNqGgK1.js +0 -1
- package/dist/interface/assets/OAuthDeviceFlow-BpeJI0ad.js +0 -1
- package/dist/interface/assets/Plugin-B_ANQppI.js +0 -1
- package/dist/interface/assets/Plugin-DbSiTjYn.css +0 -1
- package/dist/interface/assets/PluginDetail-j7srfPSY.js +0 -2
- package/dist/interface/assets/PluginSearch-C4JY7Iwj.js +0 -2
- package/dist/interface/assets/PluginSearch-CTAtKAK4.js +0 -1
- package/dist/interface/assets/Recordings-frQ3fb5P.js +0 -1
- package/dist/interface/assets/SettingsAccount-BhCf1XAp.js +0 -1
- package/dist/interface/assets/SettingsAccount-BhseUwL4.js +0 -1
- package/dist/interface/assets/SettingsAppearance--SabFiHj.js +0 -1
- package/dist/interface/assets/SettingsMqtt-Bf23ZOH-.js +0 -1
- package/dist/interface/assets/SettingsNotifications-Dv9Fixz_.js +0 -2
- package/dist/interface/assets/SettingsRemote-CGMwCx4y.js +0 -1
- package/dist/interface/assets/SettingsSystem-ZHz6-3eN.js +0 -2
- package/dist/interface/assets/SettingsUsers-Dxj65vMx.js +0 -1
- package/dist/interface/assets/Terminal-DFGD9NeS.js +0 -4
- package/dist/interface/assets/VersionsHandler-J51M6nHE.js +0 -7
- package/dist/interface/assets/Workers-BHibnYvL.js +0 -2
- package/dist/interface/assets/api-BwUGcpse.js +0 -2
- package/dist/interface/assets/api-Ct6LuJao.css +0 -2
- package/dist/interface/assets/cloudHandoff-CpMzGP4H.js +0 -1
- package/dist/interface/assets/esm-5O0fbEL-.js +0 -1
- package/dist/interface/assets/esm-8JcCIx6p.js +0 -1
- package/dist/interface/assets/esm-BIwkRkap.js +0 -1
- package/dist/interface/assets/esm-Ba1kg7sT.js +0 -1
- package/dist/interface/assets/esm-CI9fumfA.js +0 -1
- package/dist/interface/assets/esm-CfqCZ8Ic.js +0 -1
- package/dist/interface/assets/esm-Cle2K7IB.js +0 -1
- package/dist/interface/assets/esm-DGhY5suq.js +0 -1
- package/dist/interface/assets/esm-D_SYso1m.js +0 -1
- package/dist/interface/assets/esm-Dg-c_Ys9.js +0 -1
- package/dist/interface/assets/esm-IjMpYY_D.js +0 -1
- package/dist/interface/assets/esm-JkR46BGF.js +0 -1
- package/dist/interface/assets/esm-KCb4USia.js +0 -1
- package/dist/interface/assets/esm-fiu1-7Vf.js +0 -1
- package/dist/interface/assets/main-DvYnQiyf.js +0 -3
- package/dist/interface/assets/native-CNOra93F.js +0 -1
- package/dist/interface/assets/native-DAl9Pmov.js +0 -1
- package/dist/interface/assets/nodeDefinitions-DkMCR_zX.js +0 -1
- package/dist/interface/assets/plugin-HHKHhKIh.js +0 -1
- package/dist/interface/assets/types-Du61QgCF.js +0 -1
- package/dist/interface/assets/types-f9LWayxM.js +0 -1
- package/dist/interface/assets/useAppVersion-GqkuhLFI.js +0 -1
- package/dist/interface/assets/useUserOptions-BycuHkS6.js +0 -1
- package/dist/interface/assets/vendor-cameraui-CywDBRLD.js +0 -2040
- package/dist/interface/assets/web-B2hT39CL.js +0 -1
- package/dist/interface/assets/web-BKoMlshd.js +0 -1
- package/dist/interface/assets/web-BjKL51lK-Ut62Hifg.js +0 -1
- package/dist/interface/assets/web-C0ZNZcUJ.js +0 -1
- package/dist/interface/assets/web-CvKW_k8u.js +0 -1
- package/dist/interface/assets/web-CxfYyhSm.js +0 -1
- package/dist/interface/assets/web-CzA5zxEf.js +0 -1
- package/dist/interface/assets/web-D7XF0rfU.js +0 -1
- package/dist/interface/assets/web-DgSunHN1.js +0 -1
- package/dist/interface/assets/web-DpgTK9mR.js +0 -1
- package/dist/interface/assets/web-Hi4guSgN.js +0 -1
- package/dist/interface/assets/web-QaIP1Mop.js +0 -1
- package/dist/interface/assets/web-VGpOPxhq.js +0 -1
- package/dist/interface/assets/web-g-y7DVV1.js +0 -1
- package/dist/interface/assets/workbox-window.prod.es5-YHyKoEMU.js +0 -1
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./cloudHandoff-CpMzGP4H.js","./api-BwUGcpse.js","./rolldown-runtime-DAXXjFlN.js","./vendor-cameraui-CywDBRLD.js","./vendor-CdGy-Xet.js","./vendor-zod-BaT-dXMv.js","./types-Du61QgCF.js","./lightbulb-outline-BGFG7wv-.js","./vendor-core-0Lu3l40a.js","./vendor-primevue-Cm1rEh62.js","./vendor-dnd-BN6m9rq8.js","./close-BCRtoBTk.js","./vendor-draggabilly-BLoTmI_a.js","./api-Ct6LuJao.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{$ as t,At as n,B as r,C as i,Cr as a,Er as o,Et as s,G as c,Gi as l,H as u,Hi as d,J as f,Jn as p,K as m,Ki as h,L as g,Lr as ee,O as te,Ot as _,Pt as v,Q as y,R as b,T as ne,Tr as x,U as S,Ur as re,V as ie,W as ae,Wi as C,X as w,Xn as oe,Y as T,Yn as se,Z as ce,Zn as E,_i as le,_r as D,ar as ue,at as de,br as fe,ci as pe,cr as me,dr as he,et as ge,gi as _e,hi as O,hr as k,ir as ve,it as A,kr as ye,lr as be,mi as xe,mr as Se,ni as Ce,nr as we,nt as j,or as Te,pr as Ee,q as De,qn as Oe,rr as ke,si as Ae,sr as je,t as Me,ti as Ne,tr as Pe,tt as Fe,ur as Ie,vt as Le,w as Re,wt as ze,xr as Be,yr as Ve,yt as He,z as Ue}from"./vendor-cameraui-CywDBRLD.js";import{$n as We,$t as Ge,An as Ke,B as qe,Bn as Je,C as Ye,Ct as Xe,Et as Ze,G as Qe,Gn as $e,Gt as et,Jt as tt,K as nt,Kn as rt,Ln as it,N as at,P as ot,Rn as st,St as ct,Tt as lt,Un as ut,Ut as dt,Vn as ft,W as pt,Wn as mt,Wt as ht,X as gt,Xt as _t,Y as vt,Yn as yt,Yt as bt,Zt as xt,_ as St,_t as Ct,an as wt,at as Tt,b as Et,bn as Dt,bt as Ot,ct as kt,d as At,dn as jt,dt as Mt,et as Nt,f as Pt,fn as Ft,ft as It,g as Lt,gn as Rt,gt as zt,h as Bt,hn as Vt,ht as Ht,i as Ut,ir as Wt,kn as Gt,lt as Kt,mn as qt,mt as Jt,n as Yt,nn as Xt,nr as Zt,nt as Qt,o as $t,on as en,ot as tn,pn as nn,pt as rn,qn as an,r as on,sn,st as cn,t as ln,tr as un,tt as dn,u as fn,un as pn,ut as mn,v as hn,vt as gn,wt as _n,xt as vn,y as yn,yn as bn,yt as xn,zn as Sn}from"./api-BwUGcpse.js";import{$ as Cn,$n as wn,An as Tn,Bn as M,Dn as En,Hn as Dn,I as N,In as On,J as kn,Jn as An,L as P,Ln as jn,Mn,Nn,On as Pn,Q as Fn,Qn as F,Qt as I,R as In,Rn as L,Sr as R,Tn as Ln,Tr as z,Ut as Rn,Wn as zn,Xn as Bn,Z as Vn,_n as B,an as V,bn as H,cr as Hn,dn as U,dr as Un,en as Wn,fn as W,gr as Gn,in as Kn,ir as qn,kn as Jn,ln as G,lr as K,nn as Yn,nr as Xn,pn as q,pr as J,q as Zn,rn as Qn,sn as $n,tr as Y,un as X,v as er,vn as Z,wr as Q,xr as $,y as tr,yr as nr,z as rr}from"./vendor-CdGy-Xet.js";import{C as ir,E as ar,S as or,T as sr,j as cr,w as lr,y as ur}from"./types-Du61QgCF.js";import{t as dr}from"./lightbulb-outline-BGFG7wv-.js";import{d as fr,l as pr,n as mr,p as hr,t as gr,u as _r}from"./vendor-core-0Lu3l40a.js";import{B as vr,D as yr,E as br,G as xr,H as Sr,K as Cr,L as wr,O as Tr,R as Er,S as Dr,U as Or,V as kr,W as Ar,_ as jr,a as Mr,d as Nr,f as Pr,g as Fr,j as Ir,k as Lr,l as Rr,m as zr,n as Br,p as Vr,r as Hr,t as Ur,v as Wr,x as Gr,y as Kr,z as qr}from"./vendor-primevue-Cm1rEh62.js";import{t as Jr}from"./close-BCRtoBTk.js";import{t as Yr}from"./vendor-draggabilly-BLoTmI_a.js";import{n as Xr,t as Zr}from"./useBackupRestore-xqzQKAfT.js";import{n as Qr,t as $r}from"./useServerRestart-CZj3Y0Gh.js";import{t as ei}from"./chevron-down-BiRUJ9SO.js";import{t as ti}from"./power-BfcMaKbx.js";import{t as ni}from"./api-CkxuZ9lw.js";import{t as ri}from"./theme-BdlqMboH.js";import{t as ii}from"./trash2-M6P7YvkH.js";import{t as ai}from"./notifications-B2GVNEL7.js";import{n as oi,t as si}from"./microphone-Dp5Yhz6Z.js";import{a as ci,i as li,r as ui,t as di}from"./CuiSchema-TojDO40O.js";import{t as fi}from"./plugins-Ct1tFRqH.js";import{t as pi}from"./PluginSchema-Cb_F8uew.js";import{t as mi}from"./trash-can-outline-PQys0L3O.js";import{t as hi}from"./information-outline-CjhiKBjG.js";import{t as gi}from"./plus-C6l_Q-mY.js";import{a as _i,i as vi,n as yi,t as bi}from"./cameras.schema-CwGkDyzk.js";import{t as xi}from"./cctv-CdDfBHME.js";import{t as Si}from"./delete-Dvdp44LT.js";import{t as Ci}from"./useStreamStatus-B12LRLX9.js";import{t as wi}from"./bell-ring-D0h1GDrU.js";import{t as Ti}from"./home-C5hRJg9h.js";import{t as Ei}from"./CuiDataTable-DQRKmdcE.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),d(localStorage),h(),typeof window<`u`&&window.addEventListener(`pagehide`,C);async function Di(e,t={}){let n=window.location.hash.startsWith(`#`)?window.location.hash.substring(1):window.location.hash,r=new URLSearchParams(n),i=r.get(`auth`);if(!i)return!1;r.delete(`auth`);let a=r.toString(),o=a?`#${a}`:``;window.history.replaceState(null,``,window.location.pathname+window.location.search+o);let s;try{s=JSON.parse(atob(i))}catch{return!1}s._sourceUrl&&t.onRedirectInfo?.({sourceUrl:s._sourceUrl,instanceName:s._instanceName??`Remote`});let c=!1;if(s.access_token&&s._id&&s.username&&s.role){let n={access:s.access_token,refresh:s.refresh_token,accessExpiresAt:s.access_token_expires_at,refreshExpiresAt:s.refresh_token_expires_at},r={url:Sn(),mode:`direct-lan`,priority:0};await e.seedAndRetry({endpoint:r,tokens:n},`home`),c=!0,t.onUser?.({_id:s._id,username:s.username,email:s.email,role:s.role,firstLogin:s.firstLogin,avatar:s.avatar})}return s._reset&&t.onReset?.(),c}function Oi(e){Cn.setEventListener(t=>F(()=>e.signal.value.kind===`online`||e.signal.value.kind===`degraded`,e=>t(e),{immediate:!0}))}var ki={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Ai(e,t){return L(),q(`svg`,ki,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12 3c-1.97 0-3.85.47-5.56 1.41c-.24.13-.54.04-.68-.2a.506.506 0 0 1 .2-.68C7.82 2.5 9.86 2 12 2s4 .47 6.04 1.5c.25.15.34.45.21.69a.48.48 0 0 1-.44.28M3.5 9.72c-.1 0-.2-.03-.29-.09a.517.517 0 0 1-.12-.7c.99-1.4 2.25-2.5 3.75-3.27C10 4.04 14 4.03 17.15 5.65c1.5.77 2.76 1.85 3.75 3.25c.16.22.1.54-.12.7c-.23.16-.54.11-.7-.1a9.26 9.26 0 0 0-3.39-2.96c-2.87-1.47-6.54-1.47-9.4.01c-1.36.7-2.5 1.7-3.4 2.95c-.08.15-.23.22-.39.22m6.25 12.07c-.13 0-.25-.05-.35-.15c-.87-.87-1.34-1.43-2.01-2.64c-.69-1.23-1.05-2.73-1.05-4.34c0-2.97 2.54-5.39 5.66-5.39s5.66 2.42 5.66 5.39a.5.5 0 0 1-.5.5a.5.5 0 0 1-.5-.5c0-2.42-2.09-4.39-4.66-4.39s-4.66 1.97-4.66 4.39c0 1.44.32 2.77.93 3.84c.64 1.16 1.08 1.65 1.85 2.43c.19.2.19.51 0 .71c-.12.1-.24.15-.37.15m7.17-1.85c-1.19 0-2.24-.3-3.1-.89c-1.49-1.01-2.38-2.65-2.38-4.39a.5.5 0 0 1 .5-.5a.5.5 0 0 1 .5.5c0 1.41.72 2.74 1.94 3.56c.71.48 1.54.71 2.54.71c.24 0 .64-.03 1.04-.1c.27-.05.54.13.58.41c.05.26-.13.53-.41.58c-.57.11-1.07.12-1.21.12M14.91 22h-.13c-1.59-.46-2.63-1.05-3.72-2.12a7.28 7.28 0 0 1-2.17-5.22c0-1.62 1.38-2.94 3.08-2.94s3.08 1.32 3.08 2.94c0 1.07.95 1.94 2.08 1.94c1.15 0 2.08-.87 2.08-1.94c0-3.77-3.25-6.83-7.25-6.83c-2.84 0-5.46 1.58-6.61 4.03c-.39.81-.59 1.76-.59 2.8c0 .78.07 2.01.67 3.61c.1.26-.03.55-.29.64a.504.504 0 0 1-.64-.29c-.5-1.31-.73-2.62-.73-3.96c0-1.2.23-2.29.68-3.24c1.33-2.79 4.28-4.6 7.51-4.6c4.54 0 8.25 3.51 8.25 7.83c0 1.62-1.38 2.94-3.08 2.94s-3.08-1.32-3.08-2.94c0-1.07-.93-1.94-2.08-1.94s-2.08.87-2.08 1.94c0 1.71.66 3.31 1.87 4.51c.95.94 1.86 1.46 3.27 1.84c.27.08.42.36.35.62c-.05.23-.26.38-.47.38`},null,-1)]])}var ji=K({name:`mdi-fingerprint`,render:Ai}),Mi=`cameraui:unlocked`;function Ni(){try{sessionStorage.setItem(Mi,`1`)}catch{}}var Pi=J(!1),Fi=J(!1);function Ii(){return{isLocked:Pi,isAvailable:Fi,unlock:Li,init:Ri}}async function Li(){return Pi.value=!1,Ni(),!0}async function Ri(){}var zi={key:0,class:`app-lock-overlay`},Bi={class:`flex flex-col items-center gap-6 p-8`},Vi={class:`text-center`},Hi={class:`text-lg font-semibold`},Ui={class:`text-sm text-muted mt-2`},Wi=Xt(H({__name:`CuiAppLockOverlay`,setup(e){let{isLocked:t,unlock:n}=Ii(),r=J(!1);async function i(){r.value=!0;try{await n()}finally{r.value=!1}}return F(t,async e=>{e&&(await Tn(),await i())},{immediate:!0}),(e,n)=>{let a=Mt,o=ji,s=_;return $(t)?(L(),q(`div`,zi,[X(`div`,Bi,[Z(a,{class:`w-16 h-16 text-muted`}),X(`div`,Vi,[X(`h2`,Hi,z(e.$t(`views.app_lock.title`)),1),X(`p`,Ui,z(e.$t(`views.app_lock.subtitle`)),1)]),Z(s,{label:e.$t(`views.app_lock.unlock`),loading:$(r),fluid:``,class:`cui-button-medium`,onClick:i},{icon:Y(()=>[Z(o,{class:`mr-2`})]),_:1},8,[`label`,`loading`])])])):W(``,!0)}}}),[[`__scopeId`,`data-v-baef4383`]]),Gi={key:0,class:`cui-restore-overlay`},Ki={class:`cui-restore-overlay__card shadow-xl`},qi={class:`text-lg font-semibold`},Ji={class:`text-sm text-muted`},Yi={class:`text-xs text-muted`},Xi=Xt(H({__name:`CuiRestoreOverlay`,setup(e){let{t}=ye(),{active:n,phase:r,uploadPercent:i}=Xr(),a=G(()=>{switch(r.value){case`uploading`:return t(`restore.phase_uploading`);case`restarting`:return t(`restore.phase_restarting`);default:return t(`restore.phase_restoring`)}});return(e,t)=>{let o=Nr;return L(),U(I,{name:`fade`},{default:Y(()=>[$(n)?(L(),q(`div`,Gi,[X(`div`,Ki,[Z($(rr),{src:$(fn)(`logo_animated.svg`),width:`52px`,height:`58px`,title:`camera.ui`,"aria-label":`camera.ui`},null,8,[`src`]),X(`span`,qi,z(e.$t(`restore.title`)),1),X(`span`,Ji,z($(a)),1),$(r)===`uploading`?(L(),U(o,{key:0,value:$(i),class:`w-full`},null,8,[`value`])):(L(),U(o,{key:1,mode:`indeterminate`,class:`w-full`,style:{height:`6px`}})),X(`span`,Yi,z(e.$t(`restore.dont_close`)),1)])])):W(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-0c1a6c8d`]]),Zi={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Qi(e,t){return L(),q(`svg`,Zi,[...t[0]||=[X(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`1.5`,d:`M6 20h12M12 4v12m0 0l3.5-3.5M12 16l-3.5-3.5`},null,-1)]])}var $i=K({name:`iconoir-download`,render:Qi}),ea={class:`cui-update-indicator__content`},ta={class:`cui-update-indicator__text`},na=Xt(H({__name:`CuiUpdateIndicator`,setup(e){let{t}=ye(),{bottombarHeight:n}=en(),{updateAvailable:r,isApplying:i,applyUpdate:a}=Et(),{isLoggedIn:o}=hr(Bt()),s=an(),c=G(()=>o.value&&r.value&&s.bannerMode.value===null),l=G(()=>`calc(${n.value}px + 1rem + env(safe-area-inset-bottom, 0px))`);function u(){a()}return(e,n)=>{let r=ze,a=$i,o=_;return L(),U(I,{name:`fade`},{default:Y(()=>[$(c)?(L(),q(`div`,{key:0,class:`cui-update-indicator shadow-xl`,style:Q({bottom:$(l)})},[X(`div`,ea,[$(i)?(L(),U(r,{key:0,class:`cui-update-indicator__spinner`,"stroke-width":`5`})):(L(),U(a,{key:1,class:`cui-update-indicator__icon`})),X(`span`,ta,z($(i)?$(t)(`components.toast.update_applying`):$(t)(`components.toast.update_available_title`)),1),$(i)?W(``,!0):(L(),U(o,{key:2,size:`small`,class:`cui-update-indicator__button`,label:$(t)(`components.toast.update_now`),onClick:u},null,8,[`label`]))])],4)):W(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-8ce1000d`]]),ra={class:`cui-connection-indicator__content`},ia={class:`cui-connection-indicator__text`},aa=Xt(H({__name:`CuiConnectionIndicator`,setup(e){let{t}=ye(),{bottombarHeight:n}=en(),{bannerMode:r,inTrouble:i}=an(),{restarting:a}=Qr(),o=on(),{isLoggedIn:s}=hr(Bt()),c=G(()=>`calc(${n.value}px + 1rem + env(safe-area-inset-bottom, 0px))`),l=G(()=>s.value&&(r.value!==null||a.value)),u=G(()=>r.value===`connecting`?t(`connection.connecting_remote`):r.value===`degraded`?t(`connection.degraded`):r.value===null?t(`connection.restarting`):t(`connection.reconnecting`)),d=G(()=>i.value&&o===`cloud`);async function f(){let{bounceToCloudFrontend:e}=await Rn(async()=>{let{bounceToCloudFrontend:e}=await import(`./cloudHandoff-CpMzGP4H.js`);return{bounceToCloudFrontend:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url);await e()}return(e,n)=>{let r=ze,i=ot,a=_;return L(),U(I,{name:`fade`},{default:Y(()=>[$(l)?(L(),q(`div`,{key:0,class:`cui-connection-indicator shadow-xl`,style:Q({bottom:$(c)})},[X(`div`,ra,[Z(r,{class:`!w-5 !h-5 shrink-0`,"stroke-width":`5`}),X(`span`,ia,z($(u)),1),$(d)?(L(),U(a,{key:0,size:`small`,rounded:``,class:`cui-connection-indicator__button`,"aria-label":$(t)(`connection.pick_server`),onClick:f},{default:Y(()=>[Z(i,{class:`w-4 h-4`})]),_:1},8,[`aria-label`])):W(``,!0)])],4)):W(``,!0)]),_:1})}}}),[[`__scopeId`,`data-v-0204ee57`]]),oa={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function sa(e,t){return L(),q(`svg`,oa,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M5.41 7.41L10 12l-4.59 4.59L4 15.17L7.17 12L4 8.83zm13.18 9.18L14 12l4.59-4.58L20 8.83L16.83 12L20 15.17z`},null,-1)]])}var ca=K({name:`mdi-unfold-less-vertical`,render:sa}),la={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ua(e,t){return L(),q(`svg`,la,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M12 18.17L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15M12 5.83L15.17 9l1.41-1.41L12 3L7.41 7.59L8.83 9z`},null,-1)]])}var da=K({name:`mdi-unfold-more-horizontal`,render:ua}),fa={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function pa(e,t){return L(),q(`svg`,fa,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M19 13H5v-2h14z`},null,-1)]])}var ma=K({name:`mdi-minus`,render:pa}),ha={class:`fixed flex flex-row items-center z-[99999] top-0 left-[7px] gap-2 p-2 pl-[0.4rem]! non-draggable-region`},ga=Xt(H({__name:`CuiWindowButtons`,setup(e){let{electron:t}=nt(),n=J(!1),r=J(!1);function i(){r.value||t?.send(`change-window`,`minify`)}function a(){t?.send(`change-window`,`close`)}function o(){t?.send(`change-window`,`expand`)}function s(e,t){r.value=t}return On(()=>{t?.on(`fullscreen`,s)}),Nn(()=>{t?.removeListener(`fullscreen`,s)}),(e,t)=>{let s=Jr,c=ma,l=da,u=ca;return Xn((L(),q(`div`,ha,[X(`div`,{class:`close-button`,onClick:a},[Z(s,{color:`#7f050a`,width:`100%`,height:`100%`,class:R([`transition-opacity opacity-0`,{"opacity-100":$(n)}])},null,8,[`class`])]),X(`div`,{class:R({"disabled-button":$(r),"minify-button":!$(r)}),onClick:i},[$(r)?W(``,!0):(L(),U(c,{key:0,color:`#995712`,width:`100%`,height:`100%`,class:R([`transition-opacity opacity-0`,{"opacity-100":$(n)}])},null,8,[`class`]))],2),X(`div`,{class:`expand-button`,style:Q(`${$(r)?`transform: rotate(45deg)`:`transform: rotate(-45deg)`}`),onClick:o},[$(r)?(L(),U(u,{key:1,color:`#0d650d`,width:`100%`,height:`100%`,class:R([`transition-opacity opacity-0`,{"opacity-100":$(n)}])},null,8,[`class`])):(L(),U(l,{key:0,color:`#0d650d`,width:`100%`,height:`100%`,class:R([`transition-opacity opacity-0`,{"opacity-100":$(n)}])},null,8,[`class`]))],4)])),[[$(gr),e=>n.value=e]])}}}),[[`__scopeId`,`data-v-d1e31a06`]]),_a={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function va(e,t){return L(),q(`svg`,_a,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z`},null,-1)]])}var ya=K({name:`mdi-chevron-up`,render:va}),ba={key:0,class:`shrink-0 relative left-[-9px]`},xa={key:1,class:`shrink-0`},Sa={key:2,class:`shrink-0`},Ca={key:0,class:`overflow-hidden flex-1 ml-10`},wa={class:`flex flex-row items-center justify-between`},Ta={class:`text-start flex-1`},Ea={key:0,class:`text-xs text-muted`},Da=Xt(H({__name:`CuiNavItem`,props:{label:{},to:{},expanded:{type:Boolean},description:{},icon:{},iconSize:{default:24},iconClass:{},labelClass:{},activeIcon:{},avatar:{},avatarSize:{default:24},showLogout:{type:Boolean},darkMode:{type:Boolean},buttonProps:{},showTooltip:{type:Boolean},fallbackActivePath:{},activeColor:{},activeIconColor:{},bottomBar:{type:Boolean}},setup(e){let t=e,n=pr(),r=Bt(),{icon:i,iconSize:a,iconClass:o,activeIcon:s,avatarSize:c,avatar:l,labelClass:u,label:d,description:f,expanded:p,to:m,showLogout:h,darkMode:g,buttonProps:ee,showTooltip:te,fallbackActivePath:y,activeColor:b,activeIconColor:ne,bottomBar:x}=nr(t),S=G(()=>n.path===m.value||m.value!==`/`&&(n.path.startsWith(m.value+`/`)||n.path.startsWith((y.value??m.value)+`/`)));function re(){r.logout()}return(e,t)=>{let n=ht,r=ti,y=_,ie=Dn(`RouterLink`),ae=v;return L(),U(ie,{to:$(m)},{default:Y(({isActive:e})=>[Xn((L(),U(y,Jn({text:``,severity:`secondary`,class:[`cui-button navitem-button w-full h-full flex items-center relative`,{"dark-mode":$(g),"!text-white navitem-active":(e||$(S))&&!$(l),"hover:!text-color active:!text-color focus:!text-color":!e&&!$(S),"navitem-inactive":!e&&!$(S)}],style:$(b)&&(e||$(S))?{"--navitem-active-color":$(b)}:void 0,fluid:``},$(ee)),{default:Y(()=>[X(`div`,{class:R([`flex items-center justify-center h-full`,{"absolute left-[14px]":!$(x)}])},[$(l)?(L(),q(`div`,ba,[Z(n,{src:$(l),size:$(c),style:Q({width:`${$(c)}px`,height:`${$(c)}px`})},null,8,[`src`,`size`,`style`])])):$(i)&&!e&&!$(S)||!$(s)?(L(),q(`div`,xa,[Z($(i),{class:R($(o)),style:Q({width:`${$(a)}px`,height:`${$(a)}px`,color:(e||$(S))&&$(ne)?$(ne):void 0})},null,8,[`class`,`style`])])):$(s)&&(e||$(S))?(L(),q(`div`,Sa,[Z($(s),{style:Q({width:`${$(a)}px`,height:`${$(a)}px`,color:$(ne)})},null,8,[`style`])])):W(``,!0)],2),Z(I,{name:`fade`},{default:Y(()=>[$(p)?(L(),q(`div`,Ca,[X(`div`,wa,[X(`div`,Ta,[X(`div`,{class:R([`text-sm max-w-100 truncate font-semibold`,[$(u),{"text-color font-bold":$(l)}]])},z($(d)),3),$(f)?(L(),q(`div`,Ea,z($(f)),1)):W(``,!0)]),$(h)?(L(),U(y,{key:0,text:``,rounded:``,class:`dark-mode cui-icon-md`,onClick:Kn(re,[`stop`,`prevent`])},{icon:Y(()=>[Z(r,{width:`100%`,height:`100%`})]),_:1})):W(``,!0)])])):W(``,!0)]),_:1})]),_:2},1040,[`class`,`style`])),[[ae,{value:$(te)&&!$(p)?$(d):``,pt:{root:{class:`dark-mode`}}}]])]),_:1},8,[`to`])}}}),[[`__scopeId`,`data-v-9e0c467b`]]),{isElectronApp:Oa}=nt(),ka=Oa?25:0,Aa={CLOSED:0,MINIFIED:60,EXPANDED:288},ja=Un({serverUpdateAvailable:!1,pluginUpdateAvailable:!1,serverUpdate:null,pluginUpdates:[]}),Ma=null,Na=null;async function Pa(){if(Na?.ready.value)try{let e=await Na.request(`get-updates`);ja.pluginUpdates=e.plugins,ja.pluginUpdateAvailable=e.plugins.length>0,ja.serverUpdate=e.server,ja.serverUpdateAvailable=e.server.updateAvailable||e.server.betaUpdateAvailable||!1}catch{}}function Fa(){return Na||(Ma=qn(!0),Ma.run(()=>{let e=it(`/server`);Na=e,e.on(`plugin-updates`,e=>{ja.pluginUpdates=e,ja.pluginUpdateAvailable=e.length>0}),e.on(`server-updates`,e=>{ja.serverUpdate=e,ja.serverUpdateAvailable=e.updateAvailable||e.betaUpdateAvailable||!1}),e.onReady(()=>{Pa()})}),Na)}function Ia(){function e(){Fa()}function t(){}return{isConnected:G(()=>Na?.connected.value??!1),serverUpdateAvailable:G(()=>ja.serverUpdateAvailable),pluginUpdateAvailable:G(()=>ja.pluginUpdateAvailable),serverUpdate:G(()=>ja.serverUpdate),pluginUpdates:G(()=>ja.pluginUpdates),connect:e,disconnect:t,fetchUpdates:Pa}}var La={class:`h-full flex flex-col overflow-y-scroll`},Ra={class:`w-full flex items-center shrink-0 h-[60px]`},za={class:`overflow-hidden w-full pr-4`},Ba={key:0,class:`ml-2 w-full flex flex-row items-center`},Va={class:`flex flex-col flex-1 my-4 px-1`},Ha={class:`flex flex-col space-y-1`},Ua={class:`flex flex-col space-y-1`},Wa={class:`w-full h-[50px]`},Ga={class:`flex items-center justify-center h-full absolute left-[14px]`},Ka={key:0,class:`flex flex-col space-y-1 overflow-hidden`},qa={class:`w-full h-[50px] relative`},Ja=Xt(H({__name:`CuiNavbar`,setup(e,{expose:t}){let r=_r(),{bus:i}=pn(),{mdBreakpoint:a,xlBreakpoint:o}=wt(),{navbarState:s}=en(),{isElectronApp:c,electron:l}=nt(),{user:u}=hr(Bt()),{uiSettings:d}=hr(nn()),f=Ia(),{data:p}=new ni().apiInfoQuery(),m=Bn(`navbarRef`),h=J(`closed`),g=J(!1),te=J(!1),v=J(!1),y=G(()=>p.value?.electron??!1),b=G(()=>c&&y.value),ne=G(()=>{let e=d.value.interface.selectedSettingsView;return Ft.includes(e)?e:`account`}),x=e=>y.value&&!!e.meta?.disabledInElectron,S=G(()=>hn.filter(e=>e.meta?.navbar?.position===`top`&&e.meta&&tt(e)&&!x(e))),re=G(()=>hn.filter(e=>e.meta?.navbar?.position===`bottom`&&tt(e)&&!x(e))),ie=G(()=>re.value.filter(e=>!e.meta?.navbar?.group)),ae=G(()=>re.value.filter(e=>e.meta?.navbar?.group===`more`)),C=G(()=>ae.value.some(e=>r.currentRoute.value.path===e.path||r.currentRoute.value.path.startsWith(e.path+`/`))),w=G(()=>d.value.interface.navbarStayCollapsed&&h.value!==`opened`?`closed`:o.value?`opened`:h.value),oe=G(()=>w.value===`closed`?a.value?Aa.CLOSED:Aa.MINIFIED:Aa.EXPANDED);function T(){v.value=!v.value,v.value?setTimeout(()=>{let e=m.value?.firstElementChild;e&&e.scrollTo({top:e.scrollHeight,behavior:`smooth`})},250):setTimeout(()=>le(),250)}function se(){i.emit({navbarState:`closed`})}function ce(e,t){b.value&&t.channel===`update-check`&&t.status===`available`&&(g.value=!0)}async function E(){if(b.value){l.removeListener(`app-status`,ce),l.on(`app-status`,ce),l.send(`check-for-updates`);try{let e=await l.invoke(`get-update-available`);g.value=e.isUpdateAvailable}catch{}}}function le(){Tn(()=>{let e=m.value?.querySelector(`.navitem-active`);e&&e.scrollIntoView({block:`center`,behavior:`smooth`})})}let D=O(le,100);return ee(m,e=>{if(w.value!==`opened`)return;let t=e.target,n=t.closest(`#menu-icon`),r=t.closest(`#submenu-icon`),i=t.closest(`#navbar-icon`);!n&&!r&&!i&&se()}),Ce(m,()=>{D()}),F(C,e=>{e&&(v.value=!0)},{immediate:!0}),F(f.serverUpdateAvailable,e=>{b.value||(g.value=e)},{immediate:!0}),F(b,e=>{e&&E()},{immediate:!0}),F(f.pluginUpdateAvailable,e=>{te.value=e}),F(s,e=>{e&&e!==h.value&&(h.value=e===`minified`||e===`closed`?`closed`:`opened`)},{immediate:!0}),F(r.currentRoute,(e,t)=>{e.path!==t.path&&se()}),F(u,()=>{u.value?.role===`admin`||u.value?.role===`master`?f.connect():f.disconnect()},{deep:!0,immediate:!0}),On(()=>{le()}),jn(()=>{l?.removeListener(`app-status`,ce)}),t({navbarState:w}),(e,t)=>{let r=Dn(`RouterLink`),i=n,o=Da,s=ei,c=ya,l=_;return L(),q(`nav`,{ref_key:`navbarRef`,ref:m,class:R([`navbar-background fixed transition-[width,left] duration-200 overflow-x-hidden overflow-y-scroll shadow shadow-black/20 overflow-hidden border-[1px] border-base-color rounded-[15px] [clip-path:inset(0_round_15px)] before:content-[''] before:absolute before:top-0 before:left-0 before:right-0 before:h-[20px] before:blur-2xl before:opacity-70 before:bg-primary-500 before:-z-1`,{"shadow-xl":$(a)&&$(oe)===$(Aa).EXPANDED}]),style:Q({top:`calc(max(8px, env(safe-area-inset-top, 0px)) + ${$(ka)}px)`,left:$(oe)===$(Aa).CLOSED?`-2px`:`max(8px, env(safe-area-inset-left, 0px))`,width:`${$(oe)}px`,height:`calc(100dvh - max(8px, env(safe-area-inset-top, 0px)) - max(8px, env(safe-area-inset-bottom, 0px)) - ${$(ka)}px)`,viewTransitionName:`cui-navbar`})},[X(`div`,La,[X(`div`,Ra,[Z(r,{to:`/home`,class:`pl-[13px]`},{default:Y(()=>[Z($(rr),{src:$(fn)(`logo_animated.svg`),width:`32px`,height:`32px`,title:`camera.ui`,"aria-label":`camera.ui`,class:`hover:scale-105 active:scale-105 focus:scale-105 transition-all non-draggable-region`},null,8,[`src`])]),_:1}),X(`div`,za,[Z(I,{name:`fade`},{default:Y(()=>[$(oe)===$(Aa).EXPANDED?(L(),q(`div`,Ba,[Z(r,{to:`/home`,class:`text-white font-bold text-lg text-shadow`},{default:Y(()=>[...t[0]||=[B(`camera.ui`,-1)]]),_:1})])):W(``,!0)]),_:1})])]),X(`div`,Va,[X(`div`,Ha,[(L(!0),q(V,null,M($(S),t=>(L(),q(`div`,{key:t.name,class:`w-full h-[50px] relative`},[$(te)&&t.name===`Plugins`?(L(),U(i,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):W(``,!0),Z(o,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:$(oe)===$(Aa).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:R([`w-[50px] h-[50px]`,{"w-full":$(oe)===$(Aa).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`label`,`expanded`,`class`])]))),128))]),t[2]||=X(`div`,{class:`flex-1 mt-10`},null,-1),X(`div`,Ua,[$(ae).length?(L(),q(V,{key:0},[X(`div`,Wa,[Z(l,{text:``,severity:`secondary`,class:R([`cui-button navitem-button w-full h-full flex items-center justify-center dark-mode`,{"!text-white navitem-active":$(v)||$(C),"hover:!text-color active:!text-color focus:!text-color navitem-inactive":!$(v)&&!$(C)}]),style:{color:`#a4a4a4`},onClick:T},{default:Y(()=>[X(`div`,Ga,[$(v)?(L(),U(s,{key:0,class:`w-[22px] h-[22px]`})):(L(),U(c,{key:1,class:`w-[22px] h-[22px]`}))])]),_:1},8,[`class`])]),Z(I,{name:`navbar-group`},{default:Y(()=>[$(v)?(L(),q(`div`,Ka,[(L(!0),q(V,null,M($(ae),t=>(L(),q(`div`,{key:t.name,class:`w-full h-[50px] relative`},[Z(o,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:$(oe)===$(Aa).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:R([`w-[50px] h-[50px]`,{"w-full":$(oe)===$(Aa).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`label`,`expanded`,`class`])]))),128))])):W(``,!0)]),_:1})],64)):W(``,!0),(L(!0),q(V,null,M($(ie),t=>(L(),q(`div`,{key:t.name,class:`w-full h-[50px] relative`},[$(g)&&t.name===`Settings`?(L(),U(i,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] left-[31px] top-[10px] z-1`})):W(``,!0),Z(o,{icon:t.meta.navbar.icon.default,"active-icon":t.meta.navbar.icon.active,to:t.path===`/settings`?`/settings/${$(ne)}`:t.path,"fallback-active-path":t.path,label:e.$t(`navigation.${t.name.toLowerCase()}`),expanded:$(oe)===$(Aa).EXPANDED,"dark-mode":``,"show-tooltip":``,"icon-size":22,"button-props":{style:{color:`#a4a4a4`}},class:R([`w-[50px] h-[50px]`,{"w-full":$(oe)===$(Aa).EXPANDED}])},null,8,[`icon`,`active-icon`,`to`,`fallback-active-path`,`label`,`expanded`,`class`])]))),128)),t[1]||=X(`div`,{class:`mb-4 mt-2`,style:{borderTop:`1px solid #313131`}},null,-1),X(`div`,qa,[Z(o,{avatar:`avatar`,label:$(u)?.username??`unknown`,description:$(u)?.role??`unknown`,expanded:$(oe)===$(Aa).EXPANDED,"show-logout":``,to:`/settings/account`,"dark-mode":``,"avatar-size":38,class:R([`w-[50px] h-[50px]`,{"w-full":$(oe)===$(Aa).EXPANDED}])},null,8,[`label`,`description`,`expanded`,`class`])])])])])],6)}}}),[[`__scopeId`,`data-v-d2e83278`]]),Ya={class:`px-2 h-full flex items-center justify-around`,style:{paddingBottom:`calc(max(8px, env(safe-area-inset-bottom, 0px)))`}},Xa=Xt(H({__name:`CuiBottombar`,setup(e,{expose:t}){let{bottombarHeight:n}=en(),r=Bn(`bottombarRef`),i=G(()=>hn.filter(e=>e.meta?.bottombar&&e.meta.auth&&tt(e)));return t({bottombarRef:r}),(e,t)=>{let a=Da;return L(),q(`nav`,{ref_key:`bottombarRef`,ref:r,class:`cui-bottombar bottombar-background fixed bottom-0 left-0 right-0 border-t-[1px] border-color bottombar-background`,style:Q({height:`calc(${$(n)}px + env(safe-area-inset-bottom, 0px))`,viewTransitionName:`cui-bottombar`})},[X(`div`,Ya,[(L(!0),q(V,null,M($(i),e=>(L(),U(a,{key:e.name,icon:e.meta.bottombar.icon.default,"active-icon":e.meta.bottombar.icon.active,"active-icon-color":`var(--p-primary-color)`,to:e.path,label:``,expanded:!1,"icon-class":`text-color`,class:`w-[50px] h-[50px] transition-all duration-300`,"bottom-bar":``},null,8,[`icon`,`active-icon`,`to`]))),128))])],4)}}}),[[`__scopeId`,`data-v-b0d768aa`]]),Za={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Qa(e,t){return L(),q(`svg`,Za,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M8.463 15.538Q7 14.075 7 12t1.463-3.537T12 7t3.538 1.463T17 12t-1.463 3.538T12 17t-3.537-1.463M2 13q-.425 0-.712-.288T1 12t.288-.712T2 11h2q.425 0 .713.288T5 12t-.288.713T4 13zm18 0q-.425 0-.712-.288T19 12t.288-.712T20 11h2q.425 0 .713.288T23 12t-.288.713T22 13zm-8.712-8.287Q11 4.425 11 4V2q0-.425.288-.712T12 1t.713.288T13 2v2q0 .425-.288.713T12 5t-.712-.288m0 18Q11 22.426 11 22v-2q0-.425.288-.712T12 19t.713.288T13 20v2q0 .425-.288.713T12 23t-.712-.288M5.65 7.05L4.575 6q-.3-.275-.288-.7t.288-.725q.3-.3.725-.3t.7.3L7.05 5.65q.275.3.275.7t-.275.7t-.687.288t-.713-.288M18 19.425l-1.05-1.075q-.275-.3-.275-.712t.275-.688q.275-.3.688-.287t.712.287L19.425 18q.3.275.288.7t-.288.725q-.3.3-.725.3t-.7-.3M16.95 7.05q-.3-.275-.288-.687t.288-.713L18 4.575q.275-.3.7-.288t.725.288q.3.3.3.725t-.3.7L18.35 7.05q-.3.275-.7.275t-.7-.275M4.575 19.425q-.3-.3-.3-.725t.3-.7l1.075-1.05q.3-.275.712-.275t.688.275q.3.275.288.688t-.288.712L6 19.425q-.275.3-.7.288t-.725-.288`},null,-1)]])}var $a=K({name:`material-symbols-light-mode-rounded`,render:Qa}),eo={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function to(e,t){return L(),q(`svg`,eo,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M12 21q-3.75 0-6.375-2.625T3 12t2.625-6.375T12 3q.35 0 .688.025t.662.075q-1.025.725-1.638 1.888T11.1 7.5q0 2.25 1.575 3.825T16.5 12.9q1.375 0 2.525-.613T20.9 10.65q.05.325.075.662T21 12q0 3.75-2.625 6.375T12 21`},null,-1)]])}var no=K({name:`material-symbols-dark-mode`,render:to}),ro={viewBox:`0 0 48 48`,width:`1.2em`,height:`1.2em`},io=[`id`],ao=[`mask`];function oo(e,t){return L(),q(`svg`,ro,[X(`defs`,null,[X(`mask`,{id:e.idMap.SVGh8KaKdEb},[...t[0]||=[X(`g`,{fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-miterlimit":`10`,"stroke-width":`4`},[X(`path`,{fill:`#fff`,stroke:`#fff`,d:`m24.003 4l5.27 5.27h9.457v9.456l5.27 5.27l-5.27 5.278v9.456h-9.456L24.004 44l-5.278-5.27H9.27v-9.456L4 23.997l5.27-5.27V9.27h9.456z`}),X(`path`,{fill:`#000`,stroke:`#000`,d:`M27 17c0 8-5 9-10 9c0 4 6.5 8 12 4s2-13-2-13`})],-1)]],8,io)]),X(`path`,{fill:`currentColor`,d:`M0 0h48v48H0z`,mask:`url(#`+e.idMap.SVGh8KaKdEb+`)`},null,8,ao)])}var so=K({name:`icon-park-solid-dark-mode`,render:oo,setup(){return{idMap:{SVGh8KaKdEb:`uicons-`+Math.random().toString(36).substr(2,10)}}}}),co=H({__name:`CuiThemeSwitch`,setup(e){let t=ri(),{theme:n,autoMode:r}=hr(t);function i(){t.toggleTheme()}return(e,t)=>{let a=so,o=no,s=$a,c=_;return L(),U(c,{severity:`secondary`,text:``,class:`cui-button p-2 text-color`,onClick:i},{default:Y(()=>[$(r)?(L(),U(a,{key:0,class:`w-6 h-6`})):$(n)===`dark`?(L(),U(o,{key:1,class:`w-6 h-6`})):$(n)===`light`?(L(),U(s,{key:2,class:`w-6 h-6`})):W(``,!0)]),_:1})}}}),lo={class:`relative flex overflow-hidden items-center justify-center w-5 h-5`},uo={class:`flex flex-col justify-between w-4 h-3 transform transition-all duration-100 origin-center overflow-hidden`},fo=H({__name:`CuiNavbarToggle`,setup(e){let{bus:t}=pn(),{navbarState:n}=en(),{xlBreakpoint:r}=wt(),{uiSettings:i}=hr(nn()),a=J(`closed`),o=G(()=>a.value===`opened`);function s(){t.emit({navbarState:a.value===`opened`?`closed`:`opened`})}return F(n,e=>{e&&e!==a.value&&(a.value=e===`minified`||e===`closed`?`closed`:`opened`)},{immediate:!0}),(e,t)=>{let n=_;return!$(r)||$(i).interface.navbarStayCollapsed?(L(),U(n,{key:0,id:`menu-icon`,class:`cui-button relative group p-2 transition-colors duration-100`,severity:`secondary`,text:``,onClick:s},{default:Y(()=>[X(`div`,lo,[X(`div`,uo,[X(`div`,{class:R([`h-0.5 w-2 transform transition-all duration-100 origin-center`,{"w-4 rotate-45 translate-y-[5px]":$(o)}]),style:{backgroundColor:`var(--text-color)`}},null,2),X(`div`,{class:R([`h-0.5 w-4 rounded transform transition-all duration-100`,{"opacity-0":$(o)}]),style:{backgroundColor:`var(--text-color)`}},null,2),X(`div`,{class:R([`h-0.5 w-3 transform transition-all duration-100 origin-center`,{"w-4 -rotate-45 -translate-y-[5px]":$(o)}]),style:{backgroundColor:`var(--text-color)`}},null,2)])])]),_:1})):W(``,!0)}}}),po={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function mo(e,t){return L(),q(`svg`,po,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M.41 13.41L6 19l1.41-1.42L1.83 12m20.41-6.42L11.66 16.17L7.5 12l-1.43 1.41L11.66 19l12-12M18 7l-1.41-1.42l-6.35 6.35l1.42 1.41z`},null,-1)]])}var ho=K({name:`mdi-check-all`,render:mo}),go={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function _o(e,t){return L(),q(`svg`,go,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M22.11 21.46L2.39 1.73L1.11 3l4.72 4.72A7 7 0 0 0 5 11v6l-2 2v1h15.11l2.73 2.73zM7 18v-7c0-.61.11-1.21.34-1.77L16.11 18zm3 3h4a2 2 0 0 1-2 2a2 2 0 0 1-2-2M8.29 5.09c.53-.34 1.11-.59 1.71-.8V4a2 2 0 0 1 2-2a2 2 0 0 1 2 2v.29c2.97.88 5 3.61 5 6.71v4.8l-2-2V11a5 5 0 0 0-5-5c-.78 0-1.55.2-2.24.56z`},null,-1)]])}var vo=K({name:`mdi-bell-off-outline`,render:_o}),yo={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function bo(e,t){return L(),q(`svg`,yo,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M8.352 20.242A4.63 4.63 0 0 0 12 22a4.63 4.63 0 0 0 3.648-1.758a27.2 27.2 0 0 1-7.296 0M18.75 9v.704c0 .845.24 1.671.692 2.374l1.108 1.723c1.011 1.574.239 3.713-1.52 4.21a25.8 25.8 0 0 1-14.06 0c-1.759-.497-2.531-2.636-1.52-4.21l1.108-1.723a4.4 4.4 0 0 0 .693-2.374V9c0-3.866 3.022-7 6.749-7s6.75 3.134 6.75 7`},null,-1)]])}var xo=K({name:`solar-bell-bold`,render:bo}),So=`/pwa/favicon-64.ico`,Co=64,wo=`#ea5455`,To=14,Eo=null,Do=null,Oo=null,ko=!1,Ao=0;function jo(){return Eo??=Array.from(document.querySelectorAll(`link[rel="icon"]`)).map(e=>({el:e,href:e.href,type:e.type})),Eo}function Mo(){return Do??=new Promise((e,t)=>{let n=new Image;n.onload=()=>e(n),n.onerror=()=>t(Error(`failed to load ${So}`)),n.src=So}),Do}function No(e){let t=document.createElement(`canvas`);t.width=Co,t.height=Co;let n=t.getContext(`2d`);return n?(n.drawImage(e,0,0,Co,Co),n.beginPath(),n.arc(Co-To-1,Co-To-1,To,0,Math.PI*2),n.fillStyle=wo,n.fill(),t.toDataURL(`image/png`)):null}async function Po(e){if(typeof document>`u`)return;let t=++Ao;if(e===ko)return;let n=jo();if(n.length!==0){if(!e){ko=!1;for(let{el:e,href:t,type:r}of n)e.href=t,e.type=r;return}if(!Oo)try{Oo=No(await Mo())}catch{return}if(!(!Oo||t!==Ao)){ko=!0;for(let{el:e}of n)e.href=Oo,e.type=`image/png`}}}var Fo=100,Io=Un({notifications:[]}),Lo=null,Ro=null;function zo(){return Ro||(Lo=qn(!0),Lo.run(()=>{let e=it(`/notifications`);Ro=e,e.on(`notification`,e=>{if(e.tag){let t=Io.notifications.findIndex(t=>t.tag===e.tag);t!==-1&&Io.notifications.splice(t,1)}Io.notifications.unshift(e),Io.notifications.length>Fo&&(Io.notifications.length=Fo),Bo(e)}),e.on(`history`,e=>{Io.notifications=e}),e.onReady(()=>{Ho()}),F(()=>Io.notifications.filter(e=>e.seenAt==null).length,e=>{Vo(e),Po(e>0)},{immediate:!0})}),Ro)}function Bo(e){let{isElectronApp:t,electron:n}=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 Vo(e){let{isElectronApp:t,electron:n}=nt();t&&n&&n.send(`set-badge-count`,e)}async function Ho(){if(Ro?.ready.value)try{Io.notifications=await Ro.request(`get-notifications`)}catch{}}function Uo(){function e(){zo()}function t(){}function n(e){let t=Io.notifications.findIndex(t=>t.id===e.id);t!==-1&&Io.notifications.splice(t,1),e.tag&&Ro?.emit(`remove-notification`,e.tag)}function r(){Io.notifications.splice(0,Io.notifications.length),Ro?.emit(`clear-notifications`)}function i(){let e=Date.now();for(let t of Io.notifications)t.seenAt??=e;Ro?.emit(`mark-all-seen`)}function a(e){let t=Io.notifications.find(t=>t.id===e.id);t&&t.seenAt==null&&(t.seenAt=Date.now()),Ro?.emit(`mark-seen`,e.id)}function o(e){Io.notifications.find(t=>t.id===e.id)||Io.notifications.unshift(e)}return{isConnected:G(()=>Ro?.connected.value??!1),notifications:G(()=>Io.notifications),notificationCount:G(()=>Io.notifications.length),unreadCount:G(()=>Io.notifications.filter(e=>e.seenAt==null).length),connect:e,disconnect:t,fetchNotifications:Ho,removeNotification:n,clearNotifications:r,markAllSeen:i,markSeen:a,addLocalNotification:o}}function Wo(){Lo?.stop(),Lo=null,Ro=null,Io.notifications=[]}var Go={key:0,class:`flex items-center justify-center py-8`},Ko={key:1,class:`flex flex-col items-center text-center gap-3 py-6 px-2`},qo={class:`text-sm font-semibold text-color`},Jo={class:`text-xs text-muted mt-1`},Yo={class:`flex justify-between items-center mb-4 h-9`},Xo={class:`flex items-center gap-2`},Zo={class:`text-base font-semibold`},Qo={class:`flex items-center gap-1`},$o={class:`overflow-y-auto`,style:{maxHeight:`234px`}},es={class:`flex gap-3`},ts={class:`flex-1 min-w-0`},ns={class:`flex justify-between items-center gap-2`},rs={class:`flex items-center gap-1.5 shrink-0`},is={key:0,class:`w-2 h-2 rounded-full bg-primary-500`},as={class:`text-xs text-muted`},os={class:`text-xs text-muted mt-1 text-left line-clamp-2 overflow-hidden`},ss={key:0,class:`text-center py-8 text-muted text-sm`},cs=H({__name:`CuiNotificationMenu`,setup(e){let t=_r(),r=Qe(),{t:i}=ye(),{isTouch:a}=sn(),{isElectronApp:o,electron:s}=nt(),c=new ai,l=Uo(),{data:u,isLoading:d}=c.getSettingsQuery(),f=Bn(`notificationsMenuRef`),p=J({}),m=G(()=>l.notifications.value),h=G(()=>l.unreadCount.value),g=G(()=>u.value?.enabled??!1),te=G(()=>!d.value||u.value!==void 0);function y(e,[t]){if(!t.isIntersecting){p.value[e]?.resetFn(),p.value[e]?.stopFn(),delete p.value[e];return}if(p.value[e])return;let n=t.target;if(!n.parentElement)return;let r=ee(n,()=>{p.value[e]&&p.value[e].resetFn()}),i,{direction:o,stop:s}=(a.value?Ae:Ne)(n,{threshold:10,disableTextSelect:!0,onSwipe(){for(let t in p.value)t!==e&&p.value[t]?.resetFn();o.value===`left`?p.value[e]={left:`-75px`,opacity:1,deleteOpacity:1,isSwiping:!0,resetFn(){this.left=`0`,this.opacity=1,this.deleteOpacity=0},stopFn:()=>{delete p.value[e],s(),r(),clearTimeout(i)}}:p.value[e]?.resetFn()},onSwipeEnd(){clearTimeout(i),i=setTimeout(()=>{p.value[e]&&(p.value[e].isSwiping=!1)},10)}})}function b(e){f.value?.toggle(e)}function x(){l.markAllSeen()}function S(e){l.markSeen(e)}function re(){f.value?.hide(),t.push({path:`/settings/notifications`})}function ie(e){let t=Date.now()-e,n=Math.floor(t/(1e3*60)),r=Math.floor(t/(1e3*60*60)),a=Math.floor(t/(1e3*60*60*24));return n<60?`${n}${i(`components.notification_menu.short_minutes`)}`:r<24?`${r}${i(`components.notification_menu.short_hours`)}`:a<7?`${a}${i(`components.notification_menu.short_days`)}`:a<30?`${Math.floor(a/7)}${i(`components.notification_menu.short_weeks`)}`:a<365?`${Math.floor(a/30)}${i(`components.notification_menu.short_months`)}`:`${Math.floor(a/365)}${i(`components.notification_menu.short_years`)}`}function ae(e){let n=e.deepLink;f.value?.hide(),C(e),n&&t.push(n)}function C(e){e&&(p.value[e.id]?.stopFn(),l.removeNotification(e))}function w(){for(let e in p.value)p.value[e]?.stopFn();l.clearNotifications()}function oe(e){switch(e){case Ve.Info:return`rgb(33, 150, 243)`;case Ve.Warn:return`rgb(251, 140, 0)`;case Ve.Error:case Ve.Critical:return`rgb(176, 0, 32)`;default:return`rgb(69, 69, 69)`}}function T(e){if(p.value[e.id]?.isSwiping)return;let t=[e.subtitle,e.body].filter(Boolean).join(`
|
|
3
|
-
`);r.openTextDialog({data:{title:e.title,contentText:t,confirmText:e?.deepLink?i(`components.form.button.go_to_message`):i(`components.form.button.mark_as_read`)},onConfirm:()=>ae(e),onCancel:()=>C(e)})}function se(){for(let e in p.value)p.value[e]?.resetFn(),p.value[e]?.stopFn()}function ce(){return{id:`electron-update`,title:`Update`,body:`New camera.ui app update available`,severity:Ve.Info,deepLink:`/settings/system`,tag:`electron-update`,createdAt:Date.now(),seenAt:null,source:{kind:`system`,id:`system.electron.update_available`}}}function E(e,t){o&&t.channel===`update-check`&&t.status===`available`&&l.addLocalNotification(ce())}async function le(){if(o){s.removeListener(`app-status`,E),s.on(`app-status`,E),s.send(`check-for-updates`);try{(await s.invoke(`get-update-available`)).isUpdateAvailable&&l.addLocalNotification(ce())}catch{}}}return F(g,e=>{e?l.connect():Wo()},{immediate:!0}),On(()=>{o&&le()}),jn(()=>{s?.removeListener(`app-status`,E)}),(e,t)=>{let r=xo,i=n,a=_,o=ze,s=vo,c=ho,l=ii,u=_t,d=Or,ee=ne,ae=v;return L(),q(`div`,null,[Z(a,{severity:`secondary`,text:``,class:`cui-button p-2 text-color`,onClick:b},{icon:Y(()=>[Z(r,{class:`w-6 h-6`}),$(g)&&$(h)?(L(),U(i,{key:0,class:`absolute min-w-[8px] w-[8px] h-[8px] right-[10px] top-[7px]`})):W(``,!0)]),_:1}),Z(ee,{ref_key:`notificationsMenuRef`,ref:f,"append-to":`self`,class:`w-[20rem] shadow-lg cui-rounded-corner notification-menu isolate overscroll-contain non-draggable-region`,onHide:se},{default:Y(()=>[$(te)?$(g)?(L(),q(V,{key:2},[X(`div`,Yo,[X(`div`,Xo,[X(`h3`,Zo,z(e.$t(`components.notification_menu.notifications`)),1),Z(i,{class:`rounded-full text-xs p-1`,value:$(m).length>99?`99+`:String($(m).length)},null,8,[`value`])]),X(`div`,Qo,[$(h)?Xn((L(),U(a,{key:0,severity:`secondary`,text:``,rounded:``,class:`p-2 cui-icon-md`,onClick:x},{icon:Y(()=>[Z(c,{width:`100%`,height:`100%`})]),_:1})),[[ae,{value:e.$t(`components.notification_menu.mark_all_read`)},void 0,{left:!0}]]):W(``,!0),$(m).length?Xn((L(),U(a,{key:1,severity:`danger`,text:``,rounded:``,class:`p-2 cui-icon-md`,onClick:w},{icon:Y(()=>[Z(l,{width:`100%`,height:`100%`})]),_:1})),[[ae,{value:e.$t(`components.notification_menu.clear_notifications`)},void 0,{left:!0}]]):W(``,!0)])]),X(`div`,$o,[(L(!0),q(V,null,M($(m),t=>(L(),q(`div`,{key:t.id,class:`relative overflow-hidden`},[Xn((L(),q(`div`,{class:`relative transition-all duration-200`,style:Q({left:$(p)[t.id]?.left||`0`,opacity:$(p)[t.id]?.opacity||1})},[Z(a,{severity:`secondary`,text:``,class:`cui-button p-2 block w-full`,onClick:e=>T(t)},{default:Y(()=>[X(`div`,es,[X(`div`,{class:`w-2 h-2 rounded-full mt-2`,style:Q({backgroundColor:oe(t.severity)})},null,4),X(`div`,ts,[X(`div`,ns,[X(`h4`,{class:R([`text-sm truncate max-w-[200px]`,t.seenAt==null?`font-semibold text-color`:`font-medium text-muted`])},z(t.title),3),X(`div`,rs,[t.seenAt==null?(L(),q(`span`,is)):W(``,!0),X(`span`,as,z(ie(t.createdAt)),1)])]),X(`p`,os,z(t.subtitle||t.body),1)])])]),_:2},1032,[`onClick`])],4)),[[$(mr),e=>y(t.id,e)]]),X(`div`,{class:`absolute right-0 top-0 h-full flex items-center gap-1 pr-4`,style:Q({opacity:$(p)[t.id]?.deleteOpacity||0,pointerEvents:($(p)[t.id]?.deleteOpacity||0)>0?`auto`:`none`})},[t.seenAt==null?Xn((L(),U(a,{key:0,severity:`secondary`,class:`cui-icon-sm`,text:``,rounded:``,onClick:e=>S(t)},{icon:Y(()=>[Z(u,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[ae,{value:e.$t(`components.notification_menu.mark_read`)},void 0,{left:!0}]]):W(``,!0),Xn((L(),U(a,{severity:`danger`,class:`cui-icon-sm`,text:``,rounded:``,onClick:e=>C(t)},{icon:Y(()=>[Z(l,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[ae,{value:e.$t(`components.notification_menu.delete`)},void 0,{left:!0}]])],4),$(m).indexOf(t)===$(m).length-1?W(``,!0):(L(),U(d,{key:0,class:`my-0 py-1`}))]))),128))]),$(m).length===0?(L(),q(`div`,ss,z(e.$t(`components.notification_menu.no_notifications`)),1)):W(``,!0)],64)):(L(),q(`div`,Ko,[Z(s,{class:`w-8 h-8 text-muted`}),X(`div`,null,[X(`h3`,qo,z(e.$t(`components.notification_menu.disabled`)),1),X(`p`,Jo,z(e.$t(`components.notification_menu.disabled_hint`)),1)]),Z(a,{class:`cui-button-small`,label:e.$t(`components.notification_menu.open_settings`),onClick:re},null,8,[`label`])])):(L(),q(`div`,Go,[Z(o,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})]))]),_:1},512)])}}}),ls={key:0},us={class:`text-sm font-medium truncate max-w-40 pointer-events-none`},ds=H({__name:`CuiInstanceSwitcher`,setup(e){let{t}=ye(),{smBreakpoint:n}=wt(),r=Ye(),i={style:`background: color-mix(in srgb,var(--p-red-500),transparent 84%); color: var(--p-red-400);`},a=Bn(`menuRef`),o=Un({}),s=null,c=G(()=>{let e=r.activeInstance,n=!r.isHomeActive||r.redirectInfo,a={label:e.name,position:`header`,active:!0},s=r.favoriteInstances.filter(e=>e.id!==r.activeId).map(e=>{let t=o[e.id],n=e.hasCredentials&&t===`checking`,a=e.hasCredentials&&t===`offline`,s,c;return a&&(s=`Offline`,c=i),{label:e.name,badge:s,badgeProps:c,loading:n,disabled:n||a,onClick:()=>r.switchInstance(e.id)}}),c=n?[{label:t(`components.instance_switcher.go_back`),icon:at,position:`footer`,onClick:()=>{let e=r.redirectInfo;e?window.location.href=e.sourceUrl:r.switchInstance(null)}}]:[],l={label:t(`components.instance_switcher.manage`),icon:Dt,position:`footer`,to:`/instances`};return[a,...s,...c,l]});function l(){s?.abort(),s=new AbortController;let{signal:e}=s,t=r.favoriteInstances.filter(e=>e.id!==r.activeId&&e.hasCredentials);for(let e of t)o[e.id]=`checking`;for(let n of t)r.probeInstance(n.id,e).then(t=>{e.aborted||(o[n.id]=t?`online`:`offline`)}).catch(()=>{e.aborted||(o[n.id]=`offline`)})}return(e,t)=>{let i=Ke,o=_,s=ei,u=ya,d=dt;return $(r).isMultiInstance?(L(),q(`div`,ls,[$(n)?(L(),U(o,{key:0,severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:$(a)?.toggleMenu},{icon:Y(()=>[Z(i,{class:`w-6 h-6`})]),_:1},8,[`onClick`])):(L(),U(o,{key:1,severity:`secondary`,text:``,class:`cui-button p-2 text-color non-draggable-region`,onClick:$(a)?.toggleMenu},{default:Y(()=>[Z(i,{class:`w-5 h-5 shrink-0 pointer-events-none`}),X(`span`,us,z($(r).activeInstance?.name??`Local`),1),$(a)?.isOpen?$(a)?.isOpen?(L(),U(u,{key:1,class:`w-4 h-4 opacity-60 shrink-0 pointer-events-none`})):W(``,!0):(L(),U(s,{key:0,class:`w-4 h-4 opacity-60 shrink-0 pointer-events-none`}))]),_:1},8,[`onClick`])),Z(d,{ref_key:`menuRef`,ref:a,items:$(c),popover:{appendTo:`body`,pt:{root:{class:`w-[18rem]`},content:{class:`p-0! rounded-xl! overflow-hidden!`}}},onShow:l,dividers:`sections`},null,8,[`items`])])):W(``,!0)}}}),fs={key:0,class:`flex flex-row items-center flex-1 p-2 gap-1`},ps={class:`flex-1 flex items-center justify-start min-w-0`},ms={key:0,class:`cui-topbar-default font-semibold text-xl truncate`},hs={class:`flex-1 flex items-center justify-end min-w-0`},gs={class:`cui-topbar-default`},_s=Xt(H({__name:`CuiTopbar`,props:{offsetLeft:{},animate:{type:Boolean},background:{}},setup(e){let t=e,n=_r(),{smBreakpoint:r}=wt(),{hasSlot:i,scrollToTop:a}=qe(),{minifiedTopbar:o}=jt(),{topbarHeight:s}=en(),{isElectronApp:c}=nt(),{isMultiInstance:l}=hr(Ye()),{offsetLeft:u,animate:d}=nr(t);return(e,t)=>{let f=ds,p=cs,m=fo,h=co;return L(),q(`header`,{class:R([`cui-topbar fixed flex flex-row items-center top-0 left-0 right-0 pt-safe pr-safe draggable-region`,{"!border-none":$(r)}]),style:Q({height:`calc(${$(s)}px + env(safe-area-inset-top, 0px) + ${$(c)?`30px`:`0px`})`,viewTransitionName:`cui-topbar`,background:$(r)?`var(--ground-background)`:void 0,paddingTop:$(c)?`calc(30px + env(safe-area-inset-top, 0px))`:void 0})},[$(r)&&!$(o)?(L(),q(`div`,fs,[X(`div`,ps,[!$(i)(`left`)&&(`hasPermission`in e?e.hasPermission:$(tt))(void 0,`admin`)&&$(n).currentRoute.value.name===`Home`&&$(l)?(L(),U(f,{key:0,class:`cui-topbar-default non-draggable-region`})):W(``,!0),t[1]||=X(`div`,{id:`cui-topbar-left`,class:`cui-topbar-slot non-draggable-region`},null,-1)]),X(`div`,{class:`shrink-0 flex items-center justify-center min-w-0 cursor-pointer`,onClick:t[0]||=(...e)=>$(a)&&$(a)(...e)},[t[2]||=X(`div`,{id:`cui-topbar-center`,class:`cui-topbar-slot truncate non-draggable-region`},null,-1),$(i)(`center`)?W(``,!0):(L(),q(`span`,ms,z(e.$t(`views.${String(e.$route.name).toLowerCase()}.title`)),1))]),X(`div`,hs,[t[3]||=X(`div`,{id:`cui-topbar-right`,class:`cui-topbar-slot non-draggable-region`},null,-1),X(`div`,gs,[Z(p,{class:`non-draggable-region`})])])])):$(o)?W(``,!0):(L(),q(`div`,{key:1,class:`flex flex-row items-center flex-1 p-2`,style:Q({"margin-left":`calc(${$(u)}px + max(8px, env(safe-area-inset-left, 0px)))`,transition:$(d)?`margin-left 200ms`:void 0})},[Z(m,{class:`non-draggable-region`}),(`hasPermission`in e?e.hasPermission:$(tt))(void 0,`admin`)&&$(l)?(L(),U(f,{key:0,class:`non-draggable-region`})):W(``,!0),$(ft)()?W(``,!0):(L(),U(h,{key:1,class:`ml-auto non-draggable-region`})),Z(p,{class:R([`non-draggable-region`,{"ml-auto":$(ft)()}])},null,8,[`class`])],4))],6)}}}),[[`__scopeId`,`data-v-1c767220`]]),vs={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ys(e,t){return L(),q(`svg`,vs,[...t[0]||=[X(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M10 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4m-8-2l8-8m0 0v5m0-5h-5`},null,-1)]])}var bs=K({name:`majesticons-open`,render:ys}),xs={class:`flex flex-col gap-2 w-full`},Ss={for:`sensorDisplayName`,class:`cui-label`},Cs=H({__name:`RenameSensor`,props:{currentDisplayName:{}},setup(e,{expose:t}){let n=J(e.currentDisplayName);return t({onConfirm:async()=>n.value.trim()||null}),(e,t)=>{let r=te;return L(),q(`div`,xs,[X(`label`,Ss,z(e.$t(`components.camera_options.sensor_display_name`)),1),Z(r,{id:`sensorDisplayName`,modelValue:$(n),"onUpdate:modelValue":t[0]||=e=>Hn(n)?n.value=e:null,class:`w-full`,autofocus:``},null,8,[`modelValue`])])}}}),ws={class:`p-4 flex flex-col gap-2`},Ts={key:0,class:`w-full flex items-center justify-center py-8`},Es={class:`cui-label`},Ds={key:0,class:`flex flex-col gap-2`},Os={class:`cui-label`},ks={class:`text-sm text-muted text-center min-h-[30px]`},As={class:`cui-label`},js={class:`cui-label`},Ms={key:0,class:`w-full flex items-center justify-center my-5`},Ns={key:1,class:`text-sm text-muted text-center`},Ps={key:1,class:`flex flex-col gap-2`},Fs={class:`cui-label`},Is={class:`text-sm text-muted text-center min-h-[30px]`},Ls={class:`cui-label`},Rs={class:`cui-label`},zs={key:0,class:`w-full flex items-center justify-center my-5`},Bs={key:1,class:`text-sm text-muted text-center`},Vs={key:2,class:`flex flex-col gap-2`},Hs={class:`cui-label`},Us={class:`text-sm text-muted text-center min-h-[30px]`},Ws={class:`cui-label`},Gs={class:`cui-label`},Ks={class:`cui-label`},qs={key:0,class:`w-full flex items-center justify-center my-5`},Js={key:1,class:`text-sm text-muted text-center`},Ys={class:`cui-label`},Xs={key:2,class:`text-sm text-muted text-center min-h-[30px]`},Zs={class:`cui-label`},Qs={key:0,class:`w-full flex items-center justify-center my-5`},$s={key:1,class:`text-sm text-muted text-center`},ec={key:3,class:`flex flex-col gap-2`},tc={class:`cui-label`},nc={class:`text-sm text-muted text-center min-h-[30px]`},rc={class:`cui-label`},ic={class:`cui-label`},ac={class:`cui-label`},oc={key:0,class:`w-full flex items-center justify-center my-5`},sc={key:1,class:`text-sm text-muted text-center`},cc={class:`cui-label`},lc={key:2,class:`text-sm text-muted text-center min-h-[30px]`},uc={class:`cui-label`},dc={key:0,class:`w-full flex items-center justify-center my-5`},fc={key:1,class:`text-sm text-muted text-center`},pc={key:4,class:`flex flex-col gap-2`},mc={class:`cui-label`},hc={class:`text-sm text-muted text-center min-h-[30px]`},gc={class:`cui-label`},_c={class:`cui-label`},vc={class:`cui-label`},yc={key:0,class:`w-full flex items-center justify-center my-5`},bc={key:1,class:`text-sm text-muted text-center`},xc={class:`cui-label`},Sc={key:2,class:`text-sm text-muted text-center min-h-[30px]`},Cc={class:`cui-label`},wc={key:0,class:`w-full flex items-center justify-center my-5`},Tc={key:1,class:`text-sm text-muted text-center`},Ec={key:5,class:`flex flex-col gap-2`},Dc={class:`cui-label`},Oc={key:0,class:`w-full flex items-center justify-center`},kc={key:1,class:`text-sm text-muted text-center`},Ac={key:1,class:`w-full h-full`},jc={class:`cui-list-item`},Mc=H({__name:`Plugins`,props:{camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},emits:[`close`],setup(e){let t=ar(),n=sr(),r=ir(),i=new Qt,o=new fi,s=e,c=$e(),l=Qe(),{t:u}=ye(),{camera:d,cameraDevice:f,loading:p}=nr(s),{data:m,isBusy:h}=o.getPluginsQuery({page:1,pageSize:-1}),{data:g,isBusy:ee,suspense:te}=i.getCameraExtensionsQuery(d.value.name),{data:y,isBusy:b}=i.getCameraRegisteredSensorsQuery(d.value.name),{data:ne,isBusy:x}=o.getPluginsExtensionsQuery({page:1,pageSize:-1}),{mutateAsync:S,isPending:re}=i.enableCameraExtensionQuery(),{mutateAsync:ie,isPending:ae}=i.disableCameraExtensionQuery(),{mutateAsync:C,isPending:w}=i.activateCameraExtensionQuery(),{mutateAsync:oe,isPending:T}=i.deactivateCameraExtensionQuery(),{sensors:se}=He(f),ce=Bn(`schemaRef`),E=J(`hub`),le=J([`hub`,`detection`,`core`,`accessories`,`more`]),D=J(``),ue=J(),pe=J(),me=J(),he=J(),ge=J(),_e=J(),O=J(),k=J(),ve=J(),A=J(),be=G(()=>{if(!O.value)return``;let e=Ee.value.find(e=>e.id===O.value);return e?.pluginId&&St(e.pluginId)||``}),xe=G(()=>O.value&&Ee.value.find(e=>e.id===O.value)?.pluginId||``),Se=G(()=>g.value?.filter(e=>r.some(t=>e.contract.provides.includes(t)))||[]),Ce=G(()=>{let e=new Set;for(let t of Se.value)for(let n of r)t.contract.provides.includes(n)&&e.add(n);return Array.from(e).filter(xt).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=G(()=>{let e=_e.value;return e?wt(g.value?.filter(t=>t.contract.provides.includes(e)&&bt(t,e))||[]):[]}),j=G(()=>_e.value?cr(_e.value):!1),Te=G(()=>{if(!_e.value)return[];let e=lr(_e.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=we.value.map(e=>e.pluginName);return n.sort((e,t)=>r.indexOf(e)-r.indexOf(t))}),Ee=G(()=>se.value.filter(e=>e.type===_e.value).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))),De=de(f,D),Oe=De.config,ke=De.isLoading,Ae=Le(f,O,xe),je=Ae.config,Me=Ae.isLoading,Ne=G(()=>h.value||x.value||ee.value||b.value),Pe=G(()=>ee.value||x.value||re.value||ae.value||w.value||T.value),Fe=G(()=>Pe.value||p.value||De.isLoading.value||Ae.isLoading.value||it.isLoading.value||st.isLoading.value||ut.isLoading.value||pt.isLoading.value||gt.isLoading.value),Ie=G(()=>(ne.value?.result.filter(e=>fe(e.contract)&&e.pluginName===d.value.pluginInfo?.name)||[])[0]),Re=G(()=>wt(g.value?.filter(e=>a(e.contract))||[])),Ve=G(()=>Ie.value&&Ct(Ie.value.pluginName)?[Ie.value]:[]),Ue=G(()=>g.value?.filter(e=>t.some(t=>e.contract.provides.includes(t)))||[]),We=G(()=>{let e=new Set;for(let n of Ue.value)for(let r of t)n.contract.provides.includes(r)&&e.add(r);return Array.from(e).filter(xt).sort((e,t)=>{let n=u(`components.camera_options.sensor_type_${e}`),r=u(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),Ge=G(()=>{let e=pe.value;return e?wt(g.value?.filter(t=>t.contract.provides.includes(e)&&bt(t,e))||[]):[]}),Ke=G(()=>se.value.filter(e=>e.type===pe.value).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))),qe=G(()=>{if(!k.value)return``;let e=Ke.value.find(e=>e.id===k.value);return e?.pluginId&&St(e.pluginId)||``}),Je=G(()=>k.value&&Ke.value.find(e=>e.id===k.value)?.pluginId||``),Ye=G(()=>g.value?.filter(e=>n.some(t=>e.contract.provides.includes(t)))||[]),Xe=G(()=>{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(xt).sort((e,t)=>{let n=u(`components.camera_options.sensor_type_${e}`),r=u(`components.camera_options.sensor_type_${t}`);return n.localeCompare(r)})}),Ze=G(()=>{let e=he.value;return e?wt(g.value?.filter(t=>t.contract.provides.includes(e)&&bt(t,e))||[]):[]}),tt=G(()=>se.value.filter(e=>e.type===he.value).sort((e,t)=>e.displayName.value.localeCompare(t.displayName.value))),nt=G(()=>{if(!ve.value)return``;let e=tt.value.find(e=>e.id===ve.value);return e?.pluginId&&St(e.pluginId)||``}),rt=G(()=>ve.value&&tt.value.find(e=>e.id===ve.value)?.pluginId||``),it=de(f,G(()=>me.value??``)),at=it.config,ot=it.isLoading,st=Le(f,k,Je),ct=st.config,lt=st.isLoading,ut=de(f,G(()=>ge.value??``)),dt=ut.config,ft=ut.isLoading,pt=Le(f,ve,rt),mt=pt.config,ht=pt.isLoading,gt=de(f,G(()=>A.value??``)),_t=gt.config,vt=gt.isLoading,yt=G(()=>{let e=m.value?.result||[];return(ne.value?.result||[]).filter(t=>{let n=e.find(e=>e.pluginName===t.pluginName),r=t.contract.provides.length>0,i=t.contract.consumes.length>0;return d.value.pluginInfo?.name===t.pluginName||fe(t.contract)&&!Be(t.contract)?!1:n&&(r||i||a(t.contract))})});function bt(e,t){return e.pluginName!==d.value.pluginInfo?.name||(y.value??[]).some(n=>n.type===t&&St(n.pluginId||``)===e.pluginName)}function xt(e){return se.value.some(t=>t.type===e)||(y.value??[]).some(t=>t.type===e)?!0:(g.value??[]).some(t=>t.contract.provides.includes(e)&&t.pluginName!==d.value.pluginInfo?.name)}function St(e){return d.value.plugins.find(t=>t.id===e)?.name}function Ct(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 wt(e){return e.sort((e,t)=>!Ct(e.pluginName)&&Ct(t.pluginName)?1:Ct(e.pluginName)&&!Ct(t.pluginName)?-1:e.displayName.localeCompare(t.displayName))}function Tt(e){let t=lr(e),n=d.value.assignments[t];return Array.isArray(n)?void 0:n}function Et(e){let t=lr(e),n=d.value.assignments[t];return Array.isArray(n)?void 0:n}async function Dt(e){if(e!==void 0)D.value=e;else switch(E.value){case`cameraController`:D.value=Ct(Ie.value?.pluginName)||``;break;case`hub`:D.value=Ct(Re.value[0]?.pluginName)||``;break;case`detection`:{let e=Ct(pe.value?Tt(pe.value):void 0);D.value=e||``,me.value=e||void 0;break}case`core`:{let e=Ct(he.value?Et(he.value):void 0);D.value=e||``,ge.value=e||void 0;break}case`accessories`:D.value=``;break;default:D.value=``;break}D.value&&E.value!==`accessories`&&Ct(D.value)&&await De.getConfig()}function Ot(){switch(E.value){case`cameraController`:Ve.value.length&&!D.value&&(D.value=Ve.value[0].pluginName);break;case`hub`:if(Re.value.length){let e=Re.value.find(e=>Ct(e.pluginName));ue.value=e?.pluginName}break;case`detection`:{We.value.length&&(!pe.value||!We.value.includes(pe.value))&&(pe.value=We.value[0]);let e=pe.value?Tt(pe.value):void 0;e&&Ct(e.name)?me.value=e.name:me.value=void 0,Tn(()=>{Ke.value.length&&!k.value&&(k.value=Ke.value[0].id)});break}case`core`:{Xe.value.length&&(!he.value||!Xe.value.includes(he.value))&&(he.value=Xe.value[0]);let e=he.value?Et(he.value):void 0;e&&Ct(e.name)?ge.value=e.name:ge.value=void 0,Tn(()=>{tt.value.length&&!ve.value&&(ve.value=tt.value[0].id)});break}case`accessories`:Ce.value.length&&(!_e.value||!Ce.value.includes(_e.value))&&(_e.value=Ce.value[0]),Tn(()=>{Te.value.length&&!A.value&&(A.value=Te.value[0])}),Tn(()=>{Ee.value.length&&!O.value&&(O.value=Ee.value[0].id)});break}}async function kt(e){g.value&&(g.value.some(t=>t.pluginName===e.pluginName)?(await oe({cameraname:d.value.name,pluginname:e.pluginName}),ce.value?.reset()):await C({cameraname:d.value.name,pluginname:e.pluginName}))}async function At(e){if(!_e.value)return;let t=Te.value;if(j.value){let n=e,r=t[0];if(n===r)return;r&&(await ie({cameraname:d.value.name,pluginname:r,type:_e.value}),O.value=void 0),n?(await S({cameraname:d.value.name,pluginname:n,type:_e.value}),A.value=n):A.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 S({cameraname:d.value.name,pluginname:e,type:_e.value});for(let e of i){if(await ie({cameraname:d.value.name,pluginname:e,type:_e.value}),O.value){let t=Ee.value.find(e=>e.id===O.value);t&&St(t.pluginId||``)===e&&(O.value=void 0)}A.value===e&&(A.value=void 0)}r.length&&!A.value?A.value=r[0]:n.length&&!A.value&&(A.value=n[0])}async function jt(e,t){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 Mt(e,t){try{let n=await De.submitValue(e.key,e.payload);if(n?.toast){let e=Pt(n.toast.type);c.add({severity:e,detail:n.toast.message,life:3e3})}n?.schema&&n.schema.length&&l.openComponentDialog(pi,{data:{title:u(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:n.schema,config:e.payload},pluginName:t,cameraName:d.value.name,buttonKey:e.key}}})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function Nt(e,t){try{await De.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 Ft(e){if(!(!Je.value||!k.value))try{await st.setValue(e.key,void 0),c.add({severity:`success`,detail:u(`components.toast.config_updated`),life:3e3})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function It(e){if(!(!Je.value||!k.value))try{let t=await st.submitValue(e.key,e.payload);if(t?.toast){let e=Pt(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 Lt(e){if(!(!Je.value||!k.value))try{await st.setConfig(e),c.add({severity:`success`,detail:u(`components.toast.config_updated`),life:3e3})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function Rt(e){if(!(!rt.value||!ve.value))try{await pt.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 zt(e){if(!(!rt.value||!ve.value))try{let t=await pt.submitValue(e.key,e.payload);if(t?.toast){let e=Pt(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 Bt(e){if(!(!rt.value||!ve.value))try{await pt.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(!(!xe.value||!O.value))try{await Ae.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(!(!xe.value||!O.value))try{let t=await Ae.submitValue(e.key,e.payload);if(t?.toast){let e=Pt(t.toast.type);c.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&l.openComponentDialog(pi,{data:{title:u(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:be.value,cameraName:d.value.name,buttonKey:e.key,sensorId:O.value,pluginId:xe.value}}})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function Ut(e){if(!(!xe.value||!O.value))try{await Ae.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 Wt(e){me.value&&await it.setValue(e.key,void 0)}async function Gt(e){if(me.value)try{let t=await it.submitValue(e.key,e.payload);if(t?.toast){let e=Pt(t.toast.type);c.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&l.openComponentDialog(pi,{data:{title:u(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:me.value,cameraName:d.value.name,buttonKey:e.key}}})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function Kt(e){me.value&&await it.setConfig(e)}async function qt(e){ge.value&&await ut.setValue(e.key,void 0)}async function Jt(e){if(ge.value)try{let t=await ut.submitValue(e.key,e.payload);if(t?.toast){let e=Pt(t.toast.type);c.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&l.openComponentDialog(pi,{data:{title:u(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:ge.value,cameraName:d.value.name,buttonKey:e.key}}})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function Yt(e){ge.value&&await ut.setConfig(e)}async function Xt(e){A.value&&await gt.setValue(e.key,void 0)}async function Zt(e){if(A.value)try{let t=await gt.submitValue(e.key,e.payload);if(t?.toast){let e=Pt(t.toast.type);c.add({severity:e,detail:t.toast.message,life:3e3})}t?.schema&&t.schema.length&&l.openComponentDialog(pi,{data:{title:u(`components.dialog.title.config`),hideConfirmButton:!0,contentProps:{schemaConfig:{schema:t.schema,config:e.payload},pluginName:A.value,cameraName:d.value.name,buttonKey:e.key}}})}catch(e){c.add({severity:`error`,detail:e,life:3e3})}}async function $t(e){A.value&&await gt.setConfig(e)}function en(e){e&&l.openComponentDialog(Cs,{data:{title:u(`components.camera_options.sensor_display_name`),confirmText:u(`components.form.button.save`),contentProps:{currentDisplayName:e.displayName.value}},onConfirm:async t=>{t&&t!==e.displayName.value&&await e.setDisplayName(t)}})}return F(E,()=>{Tn(()=>{Ot(),Dt()})},{immediate:!0}),F([Re,m],async([e,t])=>{if(E.value===`hub`&&e.length&&t?.result&&!ue.value){let t=e.find(e=>Ct(e.pluginName));t&&(ue.value=t.pluginName,D.value=t.pluginName,await De.getConfig())}},{immediate:!0}),F([Ve,()=>E.value],async([e,t])=>{t===`cameraController`&&e.length&&!D.value&&(D.value=e[0].pluginName,await De.getConfig())},{immediate:!0}),F(()=>D.value,async(e,t)=>{E.value===`cameraController`&&e&&e!==t&&await De.getConfig()}),F(ue,async(e,t)=>{e&&e!==t&&Ct(e)&&(D.value=e,await De.getConfig())}),F(pe,()=>{if(k.value=void 0,pe.value){let e=Tt(pe.value);e&&Ct(e.name)?me.value=e.name:me.value=void 0}else me.value=void 0;Dt(),Tn(()=>{Ke.value.length&&(k.value=Ke.value[0].id)})}),F(me,async(e,t)=>{if(e!==t&&pe.value){let n=Tt(pe.value);!e&&t?(await ie({cameraname:d.value.name,pluginname:t,type:pe.value}),ce.value?.reset(),k.value=void 0):e&&(n?.name!==e&&await S({cameraname:d.value.name,pluginname:e,type:pe.value}),await it.getConfig()),Tn(()=>Dt(e)),Tn(()=>{Ke.value.length&&(k.value=Ke.value[0].id)})}}),F(he,()=>{if(ve.value=void 0,he.value){let e=Et(he.value);e&&Ct(e.name)?ge.value=e.name:ge.value=void 0}else ge.value=void 0;Dt(),Tn(()=>{tt.value.length&&(ve.value=tt.value[0].id)})}),F(ge,async(e,t)=>{if(e!==t&&he.value){let n=Et(he.value);!e&&t?(await ie({cameraname:d.value.name,pluginname:t,type:he.value}),ce.value?.reset(),ve.value=void 0):e&&(n?.name!==e&&await S({cameraname:d.value.name,pluginname:e,type:he.value}),await ut.getConfig()),Tn(()=>Dt(e)),Tn(()=>{tt.value.length&&(ve.value=tt.value[0].id)})}}),F([k,Je],async([e,t])=>{e&&t&&await st.getConfig()}),F([ve,rt],async([e,t])=>{e&&t&&await pt.getConfig()}),F(_e,()=>{O.value=void 0,Te.value.length?A.value=Te.value[0]:A.value=void 0,Ee.value.length&&(O.value=Ee.value[0].id)}),F(A,async e=>{e&&await gt.getConfig()}),F(O,async e=>{e&&xe.value&&await Ae.getConfig()}),F(Ve,e=>{let t=le.value.indexOf(`cameraController`)!==-1;e.length&&!t?(le.value.unshift(`cameraController`),(!E.value||E.value===`hub`)&&(E.value=`cameraController`,e.length&&!D.value&&(D.value=e[0].pluginName))):!e.length&&t&&(le.value=le.value.filter(e=>e!==`cameraController`),E.value===`cameraController`&&(E.value=`hub`))},{immediate:!0}),Mn(async()=>{await te(),Ot(),Dt()}),(e,t)=>{let n=ze,r=li,i=ci,a=Or,o=oi,s=_,c=Cr,l=et,u=bs,f=v;return L(),q(`div`,ws,[$(Ne)?(L(),q(`div`,Ts,[Z(n,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])):(L(),q(V,{key:1},[X(`span`,Es,z(e.$t(`components.camera_options.categories`)),1),Z(i,{modelValue:$(E),"onUpdate:modelValue":[t[0]||=e=>Hn(E)?E.value=e:null,t[1]||=e=>Dt()],disabled:$(Pe),mandatory:``},{default:Y(()=>[(L(!0),q(V,null,M($(le),t=>(L(),U(r,{key:t,size:`small`,disabled:$(Fe),value:t},{default:Y(()=>[B(z(e.$t(`components.camera_options.chip_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),Z(a,{class:`m-0 py-3`}),$(E)===`cameraController`?(L(),q(`div`,Ds,[$(Ve).length?(L(),q(V,{key:1},[X(`span`,As,z(e.$t(`components.camera_options.chip_plugins`)),1),Z(i,{modelValue:$(D),"onUpdate:modelValue":t[2]||=e=>Hn(D)?D.value=e:null,disabled:$(Pe),mandatory:``,class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(Ve),e=>(L(),U(r,{key:e.pluginName,size:`small`,disabled:!Ct(e.pluginName)||$(Fe),value:e.pluginName},{default:Y(()=>[B(z(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),Z(a,{class:`m-0 py-3`}),X(`span`,js,z(e.$t(`components.camera_options.plugin_settings`)),1),!$(D)||!$(Oe)?.schema?.length?(L(),q(`div`,Ms,[$(ke)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,Ns,z(e.$t(`components.camera_options.no_config`)),1))])):(L(),U(di,{ref_key:`schemaRef`,ref:ce,key:$(D),"schema-form":{schema:$(Oe).schema,config:$(Oe).config},loading:$(Fe),onOnFormSubmit:t[3]||=e=>Nt($(D),e),onOnSubmit:t[4]||=e=>Mt(e,$(D)),onOnAction:t[5]||=e=>jt(e,$(D))},null,8,[`schema-form`,`loading`]))],64)):(L(),q(V,{key:0},[X(`span`,Os,z(e.$t(`components.camera_options.chip_plugins`)),1),X(`span`,ks,z(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):$(E)===`hub`?(L(),q(`div`,Ps,[$(Re).length?(L(),q(V,{key:1},[X(`span`,Ls,z(e.$t(`components.camera_options.chip_plugins`)),1),Z(i,{modelValue:$(ue),"onUpdate:modelValue":t[6]||=e=>Hn(ue)?ue.value=e:null,disabled:$(Pe),mandatory:``,class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(Re),e=>(L(),U(r,{key:e.pluginName,size:`small`,disabled:!Ct(e.pluginName)||$(Fe),value:e.pluginName},{default:Y(()=>[B(z(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),Z(a,{class:`m-0 py-3`}),X(`span`,Rs,z(e.$t(`components.camera_options.plugin_settings`)),1),!$(D)||!$(Oe)?.schema?.length?(L(),q(`div`,zs,[$(ke)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,Bs,z(e.$t(`components.camera_options.no_config`)),1))])):(L(),U(di,{ref_key:`schemaRef`,ref:ce,key:$(D),"schema-form":{schema:$(Oe).schema,config:$(Oe).config},loading:$(Fe),onOnFormSubmit:t[7]||=e=>Nt($(D),e),onOnSubmit:t[8]||=e=>Mt(e,$(D)),onOnAction:t[9]||=e=>jt(e,$(D))},null,8,[`schema-form`,`loading`]))],64)):(L(),q(V,{key:0},[X(`span`,Fs,z(e.$t(`components.camera_options.chip_plugins`)),1),X(`span`,Is,z(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):$(E)===`detection`?(L(),q(`div`,Vs,[$(We).length?(L(),q(V,{key:1},[X(`span`,Ws,z(e.$t(`components.camera_options.sensor_types`)),1),Z(i,{modelValue:$(pe),"onUpdate:modelValue":t[10]||=e=>Hn(pe)?pe.value=e:null,disabled:$(Pe),mandatory:``,class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(We),t=>(L(),U(r,{key:t,size:`small`,disabled:$(Fe),value:t},{default:Y(()=>[B(z(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),$(Ge).length?(L(),q(V,{key:0},[Z(a,{class:`m-0 py-3`}),X(`span`,Gs,z(e.$t(`components.camera_options.chip_plugins`)),1),Z(i,{modelValue:$(me),"onUpdate:modelValue":t[11]||=e=>Hn(me)?me.value=e:null,disabled:$(Pe),class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(Ge),e=>(L(),U(r,{key:e.pluginName,size:`small`,filter:``,disabled:!Ct(e.pluginName)||$(Fe),value:e.pluginName},{default:Y(()=>[B(z(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),$(me)&&$(me)!==$(d).pluginInfo?.name?(L(),q(V,{key:0},[Z(a,{class:`m-0 py-3`}),X(`span`,Ks,z(e.$t(`components.camera_options.plugin_settings`)),1),$(at)?.schema?.length?(L(),U(di,{key:`detection-plugin-${$(me)}`,"schema-form":{schema:$(at).schema,config:$(at).config},loading:$(Fe),onOnFormSubmit:t[12]||=e=>Kt(e),onOnSubmit:t[13]||=e=>Gt(e),onOnAction:t[14]||=e=>Wt(e)},null,8,[`schema-form`,`loading`])):(L(),q(`div`,qs,[$(ot)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,Js,z(e.$t(`components.camera_options.no_config`)),1))]))],64)):W(``,!0),Z(a,{class:`m-0 py-3`}),X(`span`,Ys,z(e.$t(`components.camera_options.sensors`)),1),$(Ke).length?(L(),U(i,{key:1,modelValue:$(k),"onUpdate:modelValue":t[15]||=e=>Hn(k)?k.value=e:null,disabled:$(Pe),mandatory:``,class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(Ke),e=>(L(),U(r,{key:e.id,size:`small`,disabled:$(Fe),value:e.id},{append:Y(()=>[Z(s,{text:$(O)!==e.id,rounded:``,severity:$(O)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:Kn(t=>en(e),[`stop`])},{icon:Y(()=>[Z(o,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:Y(()=>[B(z(e.displayName.value)+` `,1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`])):(L(),q(`span`,Xs,z(e.$t(`components.camera_options.no_sensors`)),1)),$(k)?(L(),q(V,{key:3},[Z(a,{class:`m-0 py-3`}),X(`span`,Zs,z(e.$t(`components.camera_options.sensor_settings`)),1),!$(qe)||!$(ct)?.schema?.length?(L(),q(`div`,Qs,[$(lt)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,$s,z(e.$t(`components.camera_options.no_config`)),1))])):(L(),U(di,{key:`sensor-${$(k)}`,"schema-form":{schema:$(ct).schema,config:$(ct).config},loading:$(Fe),onOnFormSubmit:t[16]||=e=>Lt(e),onOnSubmit:t[17]||=e=>It(e),onOnAction:t[18]||=e=>Ft(e)},null,8,[`schema-form`,`loading`]))],64)):W(``,!0)],64)):W(``,!0)],64)):(L(),q(V,{key:0},[X(`span`,Hs,z(e.$t(`components.camera_options.sensor_types`)),1),X(`span`,Us,z(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):$(E)===`core`?(L(),q(`div`,ec,[$(Xe).length?(L(),q(V,{key:1},[X(`span`,rc,z(e.$t(`components.camera_options.sensor_types`)),1),Z(i,{modelValue:$(he),"onUpdate:modelValue":t[19]||=e=>Hn(he)?he.value=e:null,disabled:$(Pe),mandatory:``,class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(Xe),t=>(L(),U(r,{key:t,size:`small`,disabled:$(Fe),value:t},{default:Y(()=>[B(z(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),$(Ze).length?(L(),q(V,{key:0},[Z(a,{class:`m-0 py-3`}),X(`span`,ic,z(e.$t(`components.camera_options.chip_plugins`)),1),Z(i,{modelValue:$(ge),"onUpdate:modelValue":t[20]||=e=>Hn(ge)?ge.value=e:null,disabled:$(Pe),class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(Ze),e=>(L(),U(r,{key:e.pluginName,size:`small`,filter:``,disabled:!Ct(e.pluginName)||$(Fe),value:e.pluginName},{default:Y(()=>[B(z(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),$(ge)&&$(ge)!==$(d).pluginInfo?.name?(L(),q(V,{key:0},[Z(a,{class:`m-0 py-3`}),X(`span`,ac,z(e.$t(`components.camera_options.plugin_settings`)),1),$(dt)?.schema?.length?(L(),U(di,{key:`core-plugin-${$(ge)}`,"schema-form":{schema:$(dt).schema,config:$(dt).config},loading:$(Fe),onOnFormSubmit:t[21]||=e=>Yt(e),onOnSubmit:t[22]||=e=>Jt(e),onOnAction:t[23]||=e=>qt(e)},null,8,[`schema-form`,`loading`])):(L(),q(`div`,oc,[$(ft)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,sc,z(e.$t(`components.camera_options.no_config`)),1))]))],64)):W(``,!0),Z(a,{class:`m-0 py-3`}),X(`span`,cc,z(e.$t(`components.camera_options.sensors`)),1),$(tt).length?(L(),U(i,{key:1,modelValue:$(ve),"onUpdate:modelValue":t[24]||=e=>Hn(ve)?ve.value=e:null,disabled:$(Pe),mandatory:``,class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(tt),e=>(L(),U(r,{key:e.id,size:`small`,disabled:$(Fe),value:e.id},{append:Y(()=>[Z(s,{text:$(O)!==e.id,rounded:``,severity:$(O)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:Kn(t=>en(e),[`stop`])},{icon:Y(()=>[Z(o,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:Y(()=>[B(z(e.displayName.value)+` `,1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`])):(L(),q(`span`,lc,z(e.$t(`components.camera_options.no_sensors`)),1)),$(ve)?(L(),q(V,{key:3},[Z(a,{class:`m-0 py-3`}),X(`span`,uc,z(e.$t(`components.camera_options.sensor_settings`)),1),!$(nt)||!$(mt)?.schema?.length?(L(),q(`div`,dc,[$(ht)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,fc,z(e.$t(`components.camera_options.no_config`)),1))])):(L(),U(di,{key:`sensor-${$(ve)}`,"schema-form":{schema:$(mt).schema,config:$(mt).config},loading:$(Fe),onOnFormSubmit:t[25]||=e=>Bt(e),onOnSubmit:t[26]||=e=>zt(e),onOnAction:t[27]||=e=>Rt(e)},null,8,[`schema-form`,`loading`]))],64)):W(``,!0)],64)):W(``,!0)],64)):(L(),q(V,{key:0},[X(`span`,tc,z(e.$t(`components.camera_options.sensor_types`)),1),X(`span`,nc,z(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):$(E)===`accessories`?(L(),q(`div`,pc,[$(Ce).length?(L(),q(V,{key:1},[X(`span`,gc,z(e.$t(`components.camera_options.sensor_types`)),1),Z(i,{modelValue:$(_e),"onUpdate:modelValue":t[28]||=e=>Hn(_e)?_e.value=e:null,disabled:$(Pe),mandatory:``,class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(Ce),t=>(L(),U(r,{key:t,size:`small`,disabled:$(Fe),value:t},{default:Y(()=>[B(z(e.$t(`components.camera_options.sensor_type_${t}`)),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`]),$(we).length?(L(),q(V,{key:0},[Z(a,{class:`m-0 py-3`}),X(`span`,_c,z(e.$t(`components.camera_options.chip_plugins`)),1),Z(i,{"model-value":$(j)?$(Te)[0]:$(Te),disabled:$(Pe),multiple:!$(j),class:`min-h-[30px]`,"onUpdate:modelValue":At},{default:Y(()=>[(L(!0),q(V,null,M($(we),e=>(L(),U(r,{key:e.pluginName,size:`small`,filter:``,disabled:!Ct(e.pluginName)||$(Fe),value:e.pluginName},{default:Y(()=>[B(z(e.displayName),1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`model-value`,`disabled`,`multiple`]),$(A)&&$(A)!==$(d).pluginInfo?.name?(L(),q(V,{key:0},[Z(a,{class:`m-0 py-3`}),X(`span`,vc,z(e.$t(`components.camera_options.plugin_settings`)),1),$(_t)?.schema?.length?(L(),U(di,{key:`accessory-plugin-${$(A)}`,"schema-form":{schema:$(_t).schema,config:$(_t).config},loading:$(Fe),onOnFormSubmit:t[29]||=e=>$t(e),onOnSubmit:t[30]||=e=>Zt(e),onOnAction:t[31]||=e=>Xt(e)},null,8,[`schema-form`,`loading`])):(L(),q(`div`,yc,[$(vt)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,bc,z(e.$t(`components.camera_options.no_config`)),1))]))],64)):W(``,!0)],64)):W(``,!0),Z(a,{class:`m-0 py-3`}),X(`span`,xc,z(e.$t(`components.camera_options.sensors`)),1),$(Ee).length?(L(),U(i,{key:1,modelValue:$(O),"onUpdate:modelValue":t[32]||=e=>Hn(O)?O.value=e:null,disabled:$(Pe),mandatory:``,class:`min-h-[30px]`},{default:Y(()=>[(L(!0),q(V,null,M($(Ee),e=>(L(),U(r,{key:e.id,size:`small`,disabled:$(Fe),value:e.id},{append:Y(()=>[Z(s,{text:$(O)!==e.id,rounded:``,severity:$(O)===e.id?`primary`:`secondary`,class:`cui-icon-sm text-white`,onClick:Kn(t=>en(e),[`stop`])},{icon:Y(()=>[Z(o,{width:`100%`,height:`100%`})]),_:1},8,[`text`,`severity`,`onClick`])]),default:Y(()=>[B(z(e.displayName.value)+` `,1)]),_:2},1032,[`disabled`,`value`]))),128))]),_:1},8,[`modelValue`,`disabled`])):(L(),q(`span`,Sc,z(e.$t(`components.camera_options.no_sensors`)),1)),$(O)?(L(),q(V,{key:3},[Z(a,{class:`m-0 py-3`}),X(`span`,Cc,z(e.$t(`components.camera_options.sensor_settings`)),1),!$(be)||!$(je)?.schema?.length?(L(),q(`div`,wc,[$(Me)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,Tc,z(e.$t(`components.camera_options.no_config`)),1))])):(L(),U(di,{key:`sensor-${$(O)}`,"schema-form":{schema:$(je).schema,config:$(je).config},loading:$(Fe),onOnFormSubmit:t[33]||=e=>Ut(e),onOnSubmit:t[34]||=e=>Ht(e),onOnAction:t[35]||=e=>Vt(e)},null,8,[`schema-form`,`loading`]))],64)):W(``,!0)],64)):(L(),q(V,{key:0},[X(`span`,mc,z(e.$t(`components.camera_options.sensor_types`)),1),X(`span`,hc,z(e.$t(`components.camera_options.no_plugins_enabled`)),1)],64))])):$(E)===`more`?(L(),q(`div`,Ec,[X(`span`,Dc,z(e.$t(`components.camera_options.manage_plugins`)),1),$(x)||!$(yt).length?(L(),q(`div`,Oc,[$(x)?(L(),U(n,{key:0,class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})):(L(),q(`span`,kc,z(e.$t(`components.camera_options.no_plugins_found`)),1))])):(L(),q(`div`,Ac,[(L(!0),q(V,null,M($(yt),t=>Xn((L(),q(`div`,{key:t.pluginName,class:`cui-list-item`},[Z(l,{disabled:$(Pe)||!Ct(t.pluginName),class:`h-14`,onClick:n=>e.$router.push(`/plugins/${t.pluginName}`)},{append:Y(()=>[Z(c,{"model-value":$(g)?.some(e=>e.pluginName===t.pluginName),disabled:$(Pe)||!Ct(t.pluginName),"onUpdate:modelValue":e=>kt(t)},null,8,[`model-value`,`disabled`,`onUpdate:modelValue`])]),default:Y(()=>[X(`span`,null,z(t.displayName),1)]),_:2},1032,[`disabled`,`onClick`])])),[[f,{value:Ct(t.pluginName)===void 0?e.$t(`components.form.tooltip.disabled`):``},void 0,{top:!0}]])),128))])),X(`div`,jc,[Z(l,{class:`h-14`,onClick:t[36]||=t=>e.$router.push(`/plugins`)},{append:Y(()=>[Z(s,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-md`},{icon:Y(()=>[Z(u,{width:`100%`,height:`100%`})]),_:1})]),default:Y(()=>[X(`span`,null,z(e.$t(`components.camera_options.more_plugins`)),1)]),_:1})])])):W(``,!0)],64))])}}});async function Nc({signal:e}){return(await We.get(`/virtual-sensors`,{signal:e})).data}async function Pc({data:e}){return(await We.post(`/virtual-sensors`,e)).data}async function Fc({id:e,data:t}){return(await We.patch(`/virtual-sensors/${e}`,t)).data}async function Ic({id:e}){await We.delete(`/virtual-sensors/${e}`)}var Lc=class{_queryClient=Fn();t=rt.global.t;toast=$e();queryActivator=J([{name:`getVirtualSensorsQuery`,enabled:!0}]);getVirtualSensorsQuery(){return ut({queryKey:[`virtualSensorsList`],queryFn:({signal:e})=>Nc({signal:e}),placeholderData:e=>e,enabled:()=>this.queryActivator.value.some(e=>e.name===`getVirtualSensorsQuery`&&e.enabled)})}createVirtualSensorQuery(){return kn({mutationFn:Pc,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`virtualSensorsList`]}),await this._queryClient.refetchQueries({queryKey:[`camerasList`]}),this.toast.add({severity:`success`,detail:this.t(`components.camera_options.virtual_sensor_created`),life:3e3})}})}patchVirtualSensorQuery(){return kn({mutationFn:Fc,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`virtualSensorsList`]})}})}deleteVirtualSensorQuery(){return kn({mutationFn:Ic,onSuccess:async()=>{await this._queryClient.refetchQueries({queryKey:[`virtualSensorsList`]}),await this._queryClient.refetchQueries({queryKey:[`camerasList`]})}})}},Rc={class:`flex flex-col gap-4`},zc={class:`relative w-full bg-black rounded-xl overflow-hidden flex items-center justify-center`,style:{height:`40vh`}},Bc={class:`flex flex-col field-gap`},Vc={class:`cui-label`},Hc={class:`flex flex-col field-gap`},Uc={for:`aspect-ratio-custom`,class:`cui-label`},Wc=H({__name:`AspectRatio`,props:{camera:{},current:{},presets:{}},setup(e,{expose:t}){let n=e,{t:r}=ye(),i=Ln(`dialogRefProps`),a=J(n.current||`16:9`),o=/^(\d+(?:\.\d+)?):(\d+(?:\.\d+)?)$/,s=G(()=>{let e=a.value.match(o);if(!e)return null;let t=Number(e[1]),n=Number(e[2]);return!(t>0)||!(n>0)?null:{w:t,h:n}}),c=G(()=>n.presets.includes(a.value)),l=G(()=>s.value?``:a.value.trim()===``?r(`components.form.hint.aspect_ratio_required`):r(`components.form.hint.aspect_ratio_invalid`)),u=G(()=>!s.value||c.value?r(`components.form.hint.aspect_ratio`):r(`components.form.hint.aspect_ratio_custom`,{ratio:(s.value.w/s.value.h).toFixed(2)})),d=G(()=>{let e=s.value??{w:16,h:9};return{width:`min(100%, calc(40vh * ${e.w/e.h}))`,aspectRatio:`${e.w} / ${e.h}`,transition:`width 0.25s ease, aspect-ratio 0.25s ease`}});wn(()=>{i.disabled&&(i.disabled.value=!s.value)});async function f(){return s.value?a.value:null}return t({onConfirm:f}),(t,n)=>{let i=Re,o=te,s=Er,f=qr;return L(),q(`div`,Rc,[X(`div`,zc,[X(`div`,{class:`relative`,style:Q($(d))},[Z(Ge,{camera:e.camera,"show-loading-screen":!1,"show-timestamp":!0,class:`absolute inset-0`,"image-style":{objectFit:`fill`}},null,8,[`camera`])],4)]),X(`div`,Bc,[X(`label`,Vc,z($(r)(`components.form.label.aspect_ratio`)),1),Z(i,{"model-value":$(c)?$(a):null,options:e.presets,"allow-empty":!0,size:`small`,"onUpdate:modelValue":n[0]||=e=>e&&(a.value=e)},null,8,[`model-value`,`options`])]),X(`div`,Hc,[X(`label`,Uc,z($(r)(`components.form.label.aspect_ratio_custom`)),1),Z(s,null,{default:Y(()=>[Z(o,{id:`aspect-ratio-custom`,modelValue:$(a),"onUpdate:modelValue":n[1]||=e=>Hn(a)?a.value=e:null,modelModifiers:{trim:!0},invalid:!!$(l),placeholder:`16:9`,spellcheck:`false`,onKeydown:n[2]||=Qn(Kn(()=>{},[`prevent`]),[`enter`])},null,8,[`modelValue`,`invalid`])]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[$(l)?(L(),U(f,{key:0,severity:`error`,variant:`simple`,size:`small`,class:`cui-input-error`},{default:Y(()=>[B(z($(l)),1)]),_:1})):W(``,!0)]),_:1}),$(l)?W(``,!0):(L(),U(f,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z($(u)),1)]),_:1}))])])}}}),Gc={for:`virtualSensorType`,class:`cui-label`},Kc={for:`virtualSensorName`,class:`cui-label`},qc=H({__name:`VirtualSensorCreate`,props:{cameraId:{}},setup(e,{expose:t}){let n=e,{t:r}=ye(),i=$e(),a=ur.omit({cameraId:!0}),o=Bn(`formRef`),s=J(or[0]),c=J(``),l=G(()=>or.map(e=>({label:r(`components.camera_options.sensor_type_${e}`),value:e})));return t({onConfirm:async()=>(await o.value?.validate())?.valid?{cameraId:n.cameraId,type:s.value,name:c.value.trim()}:(i.add({severity:`error`,detail:r(`components.toast.validation_failed`),life:3e3}),null)}),(e,t)=>{let n=Ir,r=te;return L(),U($(In),{ref_key:`formRef`,ref:o,class:`flex flex-col gap-4 w-full`,"validation-schema":$(a)},{default:Y(()=>[Z($(P),{"model-value":$(s),name:`type`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:r})=>[X(`label`,Gc,z(e.$t(`components.form.label.type`)),1),Z(n,{id:`virtualSensorType`,"model-value":$(s),options:$(l),"option-label":`label`,"option-value":`value`,invalid:r.length>0,class:`w-full`,onValueChange:t[0]||=e=>s.value=e},null,8,[`model-value`,`options`,`invalid`]),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`type`,class:`cui-input-error`})]),_:1})]),_:1},8,[`model-value`]),Z($(P),{modelValue:$(c),"onUpdate:modelValue":t[1]||=e=>Hn(c)?c.value=e:null,modelModifiers:{trim:!0},name:`name`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:t,errors:n})=>[X(`label`,Kc,z(e.$t(`components.form.label.name`)),1),Z(r,Jn({id:`virtualSensorName`},t,{invalid:n.length>0,class:`w-full`,placeholder:e.$t(`components.camera_options.virtual_sensor_name_placeholder`)}),null,16,[`invalid`,`placeholder`]),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`name`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`])]),_:1},8,[`validation-schema`])}}}),Jc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Yc(e,t){return L(),q(`svg`,Jc,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2m0 16H5V5h14zm-2-2H7V7h10z`},null,-1)]])}var Xc=K({name:`mdi-checkbox-intermediate`,render:Yc}),Zc={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Qc(e,t){return L(),q(`svg`,Zc,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M3.14 1A2.14 2.14 0 0 0 1 3.14V5h2V3h2V1zM7 1v2h3V1zm5 0v2h2v2h2V3.14C16 1.96 15.04 1 13.86 1zM1 7v3h2V7zm8 0c-1.11 0-2 .89-2 2v7h6.86A2.14 2.14 0 0 0 16 13.86V7zm9 0v2h2v2h2V9c0-1.11-.89-2-2-2zM9 9h5v5H9zm-8 3v1.86C1 15.04 1.96 16 3.14 16H5v-2H3v-2zm19 1v3h2v-3zM7 18v2c0 1.11.89 2 2 2h2v-2H9v-2zm13 0v2h-2v2h2c1.11 0 2-.89 2-2v-2zm-7 2v2h3v-2z`},null,-1)]])}var $c=K({name:`mdi-vector-intersection`,render:Qc}),el={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function tl(e,t){return L(),q(`svg`,el,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M4 6v13h16V6zm14 11H6V8h12z`},null,-1)]])}var nl=K({name:`mdi-rectangle-outline`,render:tl}),rl={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function il(e,t){return L(),q(`svg`,rl,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M4 6v13h16V6z`},null,-1)]])}var al=K({name:`mdi-rectangle`,render:il}),ol={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function sl(e,t){return L(),q(`svg`,ol,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M20.84 22.73L18.11 20H17c-1.1 0-2-.9-2-2v-1.11l-2.34-2.34l-.85.49c-.95.55-2.18.22-2.73-.73l-1.5-2.6c-.4-.71-.33-1.53.1-2.14L1.11 3l1.28-1.27l19.72 19.73zM18.5 13c0-.57-.2-1.1-.53-1.5l1.97-1.15c1.01-.59 1.36-1.88.77-2.89l-1.38-2.4a2.125 2.125 0 0 0-2.89-.78l-5.67 3.29l7.09 7.09c.4-.44.64-1.02.64-1.66M2 12.62l3.5 6.06l2.53-3.18l-2-3.47z`},null,-1)]])}var cl=K({name:`mdi-cctv-off`,render:sl}),ll={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ul(e,t){return L(),q(`svg`,ll,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M12 2c5.5 0 10 4.5 10 10s-4.5 10-10 10S2 17.5 2 12S6.5 2 12 2m0 2c-1.9 0-3.6.6-4.9 1.7l11.2 11.2c1-1.4 1.7-3.1 1.7-4.9c0-4.4-3.6-8-8-8m4.9 14.3L5.7 7.1C4.6 8.4 4 10.1 4 12c0 4.4 3.6 8 8 8c1.9 0 3.6-.6 4.9-1.7`},null,-1)]])}var dl=K({name:`mdi-cancel`,render:ul}),fl={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function pl(e,t){return L(),q(`svg`,fl,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88c3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8`},null,-1)]])}var ml=K({name:`mdi-undo`,render:pl}),hl=e(Yr(),1),gl=[`audio`],_l=[`audio`,`motion`],vl={ref:`container`,class:`w-full h-full relative min-w-0`},yl={class:`flex flex-col justify-center items-center`},bl={class:`relative w-full`},xl={class:`relative w-full flex flex-col items-center justify-center`},Sl={class:`absolute top-0 left-0 right-0 bottom-0`},Cl={class:`sandbox w-full h-full`},wl={class:`handles`},Tl=[`data-id`,`data-point`,`data-point-index`,`data-zone-index`,`onDblclick`],El={class:`clipboard`},Dl={width:`100%`,height:`100%`,class:`polygon-container`},Ol=[`d`,`onClick`,`onDblclick`,`onMousedown`,`onTouchstart`],kl=[`id`],Al=[`fill`],jl=[`id`],Ml=[`fill`],Nl=[`x1`,`y1`,`x2`,`y2`,`stroke`],Pl=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-opacity`,`marker-end`,`marker-start`,`onClick`],Fl=[`x`,`y`,`fill`],Il=[`x`,`y`],Ll=[`x`,`y`,`fill`],Rl=[`x`,`y`],zl=[`cx`,`cy`,`fill`,`stroke`,`onMousedown`,`onTouchstart`],Bl=[`cx`,`cy`,`fill`,`stroke`,`onMousedown`,`onTouchstart`],Vl={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`}},Hl={class:`flex flex-col field-gap w-full`},Ul=[`for`],Wl={key:0,class:`cui-input-error`},Gl={class:`flex flex-col field-gap w-full`},Kl=[`for`],ql={class:`flex flex-col field-gap w-full`},Jl=[`for`],Yl={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner mt-auto`},Xl={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner`},Zl={class:`flex flex-col field-gap w-full`},Ql=[`for`],$l={key:0,class:`cui-input-error`},eu={class:`flex flex-col field-gap w-full`},tu=[`for`],nu={class:`flex flex-col field-gap w-full`},ru=[`for`],iu={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner mt-auto`},au={class:`flex flex-row h-[50px] rounded-full overflow-hidden justify-self-center max-w-max border-[1px] border-color-inner`},ou=Xt(H({__name:`ZoneEditor`,props:{cameraName:{},zones:{},lines:{},initialTab:{},initialSelection:{}},setup(e,{expose:t}){let n=new Qt,r=e,i=$e(),{t:a}=ye(),o=Ln(`dialogRefProps`),{mutateAsync:s,isPending:c}=n.patchZonesQuery(),{mutateAsync:l,isPending:u}=n.patchLinesQuery(),{cameraName:d,zones:f}=nr(r),p=Bn(`cameraCardRef`),m=Bn(`container`),h=Bn(`draggablesRef`),g=Bn(`outsideRef`),y=Bn(`playgroundContainerRef`),b=J(r.initialTab??`zones`),ne=Gn([]),x=J([]),S=J([]),ie=J(!1),ae=J([]),C=J(void 0),w=J(-1),oe=J(-1),T=J(-1);r.initialSelection!==void 0&&((r.initialTab??`zones`)===`zones`?w.value=r.initialSelection:T.value=r.initialSelection);let se={x:0,y:0},ce=!1,E=null,le=re(m),D=re(y),ue=yi.element.shape.name,de=bi.element.shape.name,fe=G(()=>{if(w.value<0)return``;let e=x.value[w.value];if(!e||e.isPrivacyMask)return``;let t=ue.safeParse(e.name);return t.success?``:t.error.issues[0]?.message??``}),pe=G(()=>{if(T.value<0)return``;let e=S.value[T.value];if(!e)return``;let t=de.safeParse(e.name);return t.success?``:t.error.issues[0]?.message??``}),me=G(()=>Math.max(0,D.width.value-20)),he=G(()=>Math.max(0,D.height.value-20)),ge=G(()=>[{label:a(`components.zone_editor.tab_zones`),value:`zones`},{label:a(`components.zone_editor.tab_lines`),value:`lines`}]),_e=G(()=>{let e=Ee.filter(e=>!gl.includes(e));return e.length===0?[]:[{label:a(`components.zone_editor.base_labels`),items:e.map(e=>({label:e,value:e}))}]}),O=G(()=>{let e=Ee.filter(e=>!_l.includes(e));return e.length===0?[]:[{label:a(`components.zone_editor.base_labels`),items:e.map(e=>({label:e,value:e}))}]}),k=G(()=>!!(o.loading?.value||c.value||u.value)),ve=G(()=>{let e=[];return ie.value&&e.push(`customizing`),x.value?.length||e.push(`start`),e.join(` `)});function A(){if(x.value){if(x.value.length===0){ae.value=[];return}ae.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 be(e){if(`touches`in e){let t=e.touches[0];return{x:t.clientX,y:t.clientY}}return{x:e.clientX,y:e.clientY}}function xe(e,t){if(e.stopPropagation(),!y.value)return;je(ie.value),ce=!0,w.value=t;let n=y.value.getBoundingClientRect(),{x:r,y:i}=be(e),a=me.value,o=he.value;se.x=(r-n.left-10)/a*100,se.y=(i-n.top-10)/o*100}function Se(e){if(!ce||!y.value||w.value===-1||!x.value.length)return;let t=y.value.getBoundingClientRect(),{x:n,y:r}=be(e),i=me.value,a=he.value,o=(n-t.left-10)/i*100,s=(r-t.top-10)/a*100,c=o-se.x,l=s-se.y,u=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;ne.value.find(t=>t.id===`z${w.value}-p${e}`)?.setPosition(t,n)}se.x=o,se.y=s}function Ce(){setTimeout(()=>{ce=!1},100)}function we(){!x.value.length||w.value===-1||(x.value[w.value].isPrivacyMask=!x.value[w.value].isPrivacyMask)}function j(){x.value[w.value]&&(x.value[w.value].filter=x.value[w.value].filter===`include`?`exclude`:`include`)}function Te(){x.value[w.value]&&(x.value[w.value].type=x.value[w.value].type===`intersect`?`contain`:`intersect`)}function De(e){if(!ie.value||ce)return;let t=C.value===void 0?x.value.length:C.value,n=Math.min(Math.max(Math.round((e.offsetX-10)/me.value*100),0),100),r=Math.min(Math.max(Math.round((e.offsetY-10)/he.value*100),0),100);if(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]),A(),Tn(()=>{let e=x.value[t].points.length-1;Oe({_id:`z${t}-p${e}`,zoneIndex:t,pointIndex:e,point:[n,r]})})}function Oe(e){if(e.zoneIndex===void 0||e.pointIndex===void 0)return;let t=h.value?.filter(t=>t.dataset.pointIndex===e.pointIndex.toString()&&t.dataset.zoneIndex===e.zoneIndex.toString());!t||t.length===0||Ue(t[0],e.point)}function ke(e){if(!x.value.length)return;let t=Math.round(e.point[0]/me.value*100),n=Math.round(e.point[1]/he.value*100);x.value[e.zoneIndex].points[e.pointIndex]=[t,n]}function Ae(){ie.value=!0,C.value=void 0}function je(e){if(C.value===void 0){ie.value=!1;return}ie.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),A()):(h.value?.forEach(e=>Ge(e)),w.value=t),C.value=void 0)}function Me(){ie.value=!0,C.value=w.value}function Ne(){w.value===-1||!x.value.length||(x.value.splice(w.value,1),w.value=Math.max(-1,w.value-1),A(),Tn(()=>{Be()}))}function Pe(){if(x.value?.length){if(ie.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),A());return}x.value.length>0&&(x.value.pop(),A(),Tn(()=>{Be()}))}}function Fe(){ce=!1,ie.value=!1,C.value=void 0,x.value&&(x.value.length=0,ae.value=[],Tn(()=>{Ve()}))}function Ie(){return`#`+[Math.floor(Math.random()*256),Math.floor(Math.random()*256),Math.floor(Math.random()*256)].map(e=>e.toString(16).padStart(2,`0`)).join(``)}function Le(e){if(!e||!e.length)return``;let t=e.map(e=>{let t=Math.round(e[0]/100*me.value),n=Math.round(e[1]/100*he.value);return`${t+10},${n+10}`});if(t.length===0)return``;let n=`M ${t[0]}`;for(let e=1;e<t.length;e++)n+=` L ${t[e]}`;return n+=` Z`,n}function ze(e){ie.value||(w.value=e)}function Be(){Ve(),h.value?.forEach(e=>{if(!e.dataset.zoneIndex||!e.dataset.pointIndex)return;let t=parseInt(e.dataset.zoneIndex),n=parseInt(e.dataset.pointIndex);if(!x.value[t]||!x.value[t].points[n])return;let r=x.value[t].points[n];r&&(Ue(e,r),Ge(e))})}function Ve(){ne.value.forEach(e=>e.destroy()),ne.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),A(),Tn(()=>{Be()}))}function Ue(e,t){Object.assign(e.style,We(t))}function We(e){return{left:Math.round(e[0]/100*me.value)+`px`,top:Math.round(e[1]/100*he.value)+`px`}}function Ge(e){e.classList.add(`draggable`);let t=new hl.default(e,{containment:!0,grid:[0,0]}).on(`pointerDown`,()=>{document.querySelectorAll(`[data-point="${e.dataset.zoneIndex}-${e.dataset.pointIndex}"]`)[0]?.classList.add(`changing`)}).on(`dragMove`,()=>{if(!e.dataset.zoneIndex||!e.dataset.pointIndex||!e.dataset.id)return;let n=t.position.x,r=t.position.y;ke({_id:e.dataset.id,point:[n,r],pointIndex:parseInt(e.dataset.pointIndex),zoneIndex:parseInt(e.dataset.zoneIndex)})}).on(`pointerUp`,()=>{document.querySelectorAll(`.point`).forEach(e=>e.classList.remove(`changing`))});t.id=e.dataset.id,ne.value.push(t)}function Ke(e,t,n){e.preventDefault(),T.value=t,E={lineIndex:t,pointIndex:n};let r=e=>{if(!E||!y.value)return;let t=y.value.getBoundingClientRect(),{x:n,y:r}=be(e),i=Math.min(Math.max((n-t.left-10)/me.value*100,0),100),a=Math.min(Math.max((r-t.top-10)/he.value*100,0),100);S.value[E.lineIndex].points[E.pointIndex]=[Math.round(i),Math.round(a)]},i=()=>{E=null,document.removeEventListener(`mousemove`,r),document.removeEventListener(`mouseup`,i),document.removeEventListener(`touchmove`,r),document.removeEventListener(`touchend`,i)};document.addEventListener(`mousemove`,r),document.addEventListener(`mouseup`,i),document.addEventListener(`touchmove`,r),document.addEventListener(`touchend`,i)}function qe(){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 Je(){T.value<0||!S.value.length||(S.value.splice(T.value,1),T.value=Math.max(-1,T.value-1))}function Ye(){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 Xe(e){let t=me.value,n=he.value,r=e.points[0][0]/100*t+10,i=e.points[0][1]/100*n+10,a=e.points[1][0]/100*t+10,o=e.points[1][1]/100*n+10,s=(r+a)/2,c=(i+o)/2,l=a-r,u=o-i,d=Math.sqrt(l*l+u*u)||1,f=-u,p=l,m=s-f/2,h=c-p/2,g=s+f/2,ee=c+p/2,te=f/d,_=p/d,v=10+t,y=10+n,b=(e,t)=>({x:Math.max(19,Math.min(v-9,e)),y:Math.max(19,Math.min(y-9,t))}),ne=b(m-te*21,h-_*21),x=b(g+te*21,ee+_*21);return{h1x:r,h1y:i,h2x:a,h2y:o,ax:ne.x+te*15,ay:ne.y+_*15,bx:x.x-te*15,by:x.y-_*15,labelAx:ne.x,labelAy:ne.y,labelBx:x.x,labelBy:x.y}}async function Ze(){try{let e=[];e.push(s({cameraname:d.value,zoneData:x.value})),e.push(l({cameraname:d.value,lineData:S.value})),await Promise.all(e)}catch(e){return i.add({severity:`error`,detail:e,life:3e3}),null}}return ee(g,e=>{let t=e.target,n=t.closest(`.polygon`),r=t.closest(`.edit-button`),i=t.closest(`.remove-button`),a=t.closest(`.handle`),o=t.closest(`.zone-buttons`),s=t.closest(`.p-multiselect-list`),c=t.closest(`.p-colorpicker-panel`);!n&&!r&&!i&&!a&&!ie.value&&!o&&!s&&!c&&(w.value=-1)}),F(oe,()=>{oe.value=-1}),F(w,(e,t)=>{if(e===-1&&x.value?.length&&x.value[t]){w.value=t;return}e===-1&&x.value?.length&&(oe.value=0)}),F(f,()=>{x.value=$t(f.value),A()},{deep:!0,immediate:!0}),F(()=>r.lines,()=>{S.value=$t(r.lines)},{deep:!0,immediate:!0}),F(b,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}),F([D.width,D.height],()=>{Be()}),On(async()=>{setTimeout(()=>{Be()})}),t({isLoading:k,onConfirm:Ze}),(e,t)=>{let n=pt,r=Re,i=te,a=Er,o=Rr,s=Dr,c=wr,l=gi,u=_,f=Si,m=_t,ee=oi,ne=ml,re=dl,oe=cl,se=xi,ce=al,E=nl,D=$c,ue=Xc,de=v;return L(),q(`div`,vl,[X(`div`,yl,[X(`div`,bl,[X(`div`,{ref_key:`outsideRef`,ref:g},null,512),X(`div`,{class:R([`w-full flex justify-center gap-3`,{"flex-row items-stretch":$(le).width.value>740,"flex-col":$(le).width.value<=740}])},[X(`div`,xl,[X(`div`,Sl,[X(`div`,{ref_key:`playgroundContainerRef`,ref:y,class:`playground-container flex w-full h-full min-w-0`},[X(`section`,{class:R([`playground w-full h-full`,$(ve)]),onClick:De},[X(`div`,Cl,[X(`div`,wl,[(L(!0),q(V,null,M($(ae),e=>Xn((L(),q(`div`,{key:e._id,ref_for:!0,ref_key:`draggablesRef`,ref:h,class:`handle`,"data-id":e._id,"data-point":`${e.zoneIndex}-${e.pointIndex}`,"data-point-index":e.pointIndex,"data-zone-index":e.zoneIndex,onDblclick:Kn(t=>He(e),[`prevent`])},[...t[8]||=[X(`div`,{class:`delete-point`},null,-1)]],40,Tl)),[[Yn,$(b)===`zones`]])),128)),X(`div`,El,[(L(),q(`svg`,Dl,[$(b)===`zones`?(L(!0),q(V,{key:0},M($(x),(e,t)=>(L(),q(`path`,{key:`zone-${t}`,d:Le(e.points),class:R([`cursor-pointer`,{dash:e.type===`intersect`&&!e.isPrivacyMask,selected:$(w)===t}]),style:Q({fill:e.isPrivacyMask?`rgba(16, 16, 16, 0.9)`:e.filter===`exclude`?`transparent`:`${e.color}4D`,stroke:e.isPrivacyMask?`#333333`:e.color,"stroke-width":`2`}),onClick:e=>ze(t),onDblclick:()=>e.isPrivacyMask=!e.isPrivacyMask,onMousedown:e=>xe(e,t),onMousemove:Se,onMouseup:Ce,onTouchstart:e=>xe(e,t),onTouchmove:Se,onTouchend:Ce},null,46,Ol))),128)):W(``,!0),$(b)===`lines`?(L(),q(V,{key:1},[X(`defs`,null,[(L(!0),q(V,null,M($(S),(e,t)=>(L(),q(`marker`,{id:`editor-arrow-ab-${t}`,key:`marker-ab-${t}`,markerWidth:`6`,markerHeight:`5`,refX:`5`,refY:`2.5`,orient:`auto`,markerUnits:`strokeWidth`},[X(`path`,{d:`M0,0 L6,2.5 L0,5 Z`,fill:e.color},null,8,Al)],8,kl))),128)),(L(!0),q(V,null,M($(S),(e,t)=>(L(),q(`marker`,{id:`editor-arrow-ba-${t}`,key:`marker-ba-${t}`,markerWidth:`6`,markerHeight:`5`,refX:`1`,refY:`2.5`,orient:`auto`,markerUnits:`strokeWidth`},[X(`path`,{d:`M6,0 L0,2.5 L6,5 Z`,fill:e.color},null,8,Ml)],8,jl))),128))]),(L(!0),q(V,null,M($(S),(e,t)=>(L(),q(V,{key:`line-${t}`},[X(`line`,{x1:Xe(e).h1x,y1:Xe(e).h1y,x2:Xe(e).h2x,y2:Xe(e).h2y,stroke:e.color,"stroke-width":`2`,"stroke-dasharray":`6,4`,opacity:`0.6`},null,8,Nl),X(`line`,{x1:Xe(e).ax,y1:Xe(e).ay,x2:Xe(e).bx,y2:Xe(e).by,stroke:e.color,"stroke-width":`3`,class:`cursor-pointer`,"stroke-opacity":$(T)===t?1:.7,"marker-end":e.direction===`b-to-a`?void 0:`url(#editor-arrow-ab-${t})`,"marker-start":e.direction===`a-to-b`?void 0:`url(#editor-arrow-ba-${t})`,onClick:e=>T.value=t},null,8,Pl),X(`rect`,{x:Xe(e).labelAx-9,y:Xe(e).labelAy-9,width:`18`,height:`18`,rx:`4`,fill:e.color},null,8,Fl),X(`text`,{x:Xe(e).labelAx,y:Xe(e).labelAy,fill:`#fff`,"font-size":`11`,"font-weight":`bold`,"text-anchor":`middle`,"dominant-baseline":`central`},` A `,8,Il),X(`rect`,{x:Xe(e).labelBx-9,y:Xe(e).labelBy-9,width:`18`,height:`18`,rx:`4`,fill:e.color},null,8,Ll),X(`text`,{x:Xe(e).labelBx,y:Xe(e).labelBy,fill:`#fff`,"font-size":`11`,"font-weight":`bold`,"text-anchor":`middle`,"dominant-baseline":`central`},` B `,8,Rl),X(`circle`,{cx:Xe(e).h1x,cy:Xe(e).h1y,r:`8`,fill:e.color,stroke:$(T)===t?`#fff`:e.color,"stroke-width":`2`,class:`cursor-grab`,onMousedown:Kn(e=>Ke(e,t,0),[`stop`]),onTouchstart:Kn(e=>Ke(e,t,0),[`stop`])},null,40,zl),X(`circle`,{cx:Xe(e).h2x,cy:Xe(e).h2y,r:`8`,fill:e.color,stroke:$(T)===t?`#fff`:e.color,"stroke-width":`2`,class:`cursor-grab`,onMousedown:Kn(e=>Ke(e,t,1),[`stop`]),onTouchstart:Kn(e=>Ke(e,t,1),[`stop`])},null,40,Bl)],64))),128))],64)):W(``,!0)]))])]),t[9]||=X(`div`,{class:`shadowboard on`},null,-1)])],2)],512)]),X(`div`,Vl,[Z(n,{ref_key:`cameraCardRef`,ref:p,"camera-info":$(d),"source-role":`low-resolution`,"streaming-mode":`webrtc`,toolbar:!1,control:!1,subcontrol:!1,"flat-card":``,class:`w-full h-full border-[1px] border-color-inner`,"card-background-color":`#000`},null,8,[`camera-info`])])]),X(`div`,{class:R([`w-full flex flex-col gap-6 zone-buttons items-center self-stretch`,{"!gap-3":$(le).width.value>740}]),style:Q({"max-width":$(le).width.value>740?`300px`:void 0})},[Z(r,{modelValue:$(b),"onUpdate:modelValue":t[0]||=e=>Hn(b)?b.value=e:null,options:$(ge),"option-label":`label`,"option-value":`value`,class:`w-full`,pt:{root:{class:`flex w-full`},pcToggleButton:{root:{class:`flex-1 !text-sm`}}}},null,8,[`modelValue`,`options`]),$(b)===`lines`?(L(),q(V,{key:0},[X(`div`,Hl,[X(`label`,{for:`line[${$(T)}].name`,class:`cui-label`},z(e.$t(`components.form.label.name`)),9,Ul),Z(a,null,{default:Y(()=>[Z(i,{"model-value":$(S)[$(T)]?.name,invalid:!!$(pe),loading:$(k),disabled:$(T)<0,type:`text`,onValueChange:t[1]||=e=>{$(S)[$(T)]&&($(S)[$(T)].name=e??``)}},null,8,[`model-value`,`invalid`,`loading`,`disabled`])]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[$(pe)?(L(),q(`span`,Wl,z($(pe)),1)):W(``,!0)]),_:1})]),X(`div`,Gl,[X(`label`,{for:`line[${$(T)}].labels`,class:`cui-label`},z(e.$t(`components.form.label.labels`)),9,Kl),Z(a,null,{default:Y(()=>[Z(o,{"model-value":$(S)[$(T)]?.labels,options:$(O),loading:$(k),"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=>{$(S)[$(T)]&&($(S)[$(T)].labels=e)}},null,8,[`model-value`,`options`,`loading`])]),_:1})]),X(`div`,ql,[X(`label`,{for:`line[${$(T)}].color`,class:`cui-label`},z(e.$t(`components.form.label.color`)),9,Jl),Z(a,null,{default:Y(()=>[Z(i,{"model-value":$(S)[$(T)]?.color,loading:$(k),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),Z(c,null,{default:Y(()=>[(L(),U(s,{key:$(T),"model-value":$(S)[$(T)]?.color,format:`hex`,onValueChange:t[3]||=e=>e&&$(S)[$(T)]?$(S)[$(T)].color=`#${e}`:null},null,8,[`model-value`]))]),_:1})]),_:1})]),X(`div`,Yl,[Xn((L(),U(u,{loading:$(k),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:qe},{icon:Y(()=>[Z(l,{width:`20px`,height:`20px`})]),_:1},8,[`loading`])),[[de,{value:e.$t(`components.form.tooltip.new`)},void 0,{top:!0}]]),Xn((L(),U(u,{loading:$(k),disabled:!$(S).length||$(T)<0,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Je},{icon:Y(()=>[Z(f,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[de,{value:e.$t(`components.form.tooltip.delete`)},void 0,{top:!0}]])]),X(`div`,Xl,[Xn((L(),U(u,{loading:$(k),disabled:$(T)<0,severity:`secondary`,class:`!rounded-none !h-full w-[80px] text-sm`,onClick:Ye},{default:Y(()=>[B(z($(S)[$(T)]?.direction===`both`?`A ↔ B`:$(S)[$(T)]?.direction===`a-to-b`?`A → B`:`B → A`),1)]),_:1},8,[`loading`,`disabled`])),[[de,{value:$(S)[$(T)]?.direction===`both`?`A ↔ B`:$(S)[$(T)]?.direction===`a-to-b`?`A → B`:`B → A`},void 0,{top:!0}]])])],64)):W(``,!0),$(b)===`zones`?(L(),q(V,{key:1},[X(`div`,Zl,[X(`label`,{for:`zone[${$(w)}].name`,class:`cui-label`},z(e.$t(`components.form.label.name`)),9,Ql),Z(a,null,{default:Y(()=>[Z(i,{"model-value":$(x)[$(w)]?.name,invalid:!!$(fe),loading:$(k),disabled:$(w)<0||$(x)[$(w)]?.isPrivacyMask,type:`text`,onValueChange:t[4]||=e=>{$(x)[$(w)]&&($(x)[$(w)].name=e??``)}},null,8,[`model-value`,`invalid`,`loading`,`disabled`])]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[$(fe)?(L(),q(`span`,$l,z($(fe)),1)):W(``,!0)]),_:1})]),X(`div`,eu,[X(`label`,{for:`zone[${$(w)}].labels`,class:`cui-label`},z(e.$t(`components.form.label.labels`)),9,tu),Z(a,null,{default:Y(()=>[Z(o,{"model-value":$(x)[$(w)]?.labels,options:$(_e),disabled:$(x)[$(w)]?.isPrivacyMask,loading:$(k),"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=>$(x)[$(w)].labels=e},null,8,[`model-value`,`options`,`disabled`,`loading`])]),_:1})]),X(`div`,nu,[X(`label`,{for:`zone[${$(w)}].color`,class:`cui-label`},z(e.$t(`components.form.label.color`)),9,ru),Z(a,null,{default:Y(()=>[Z(i,{"model-value":$(x)[$(w)]?.color,disabled:$(x)[$(w)]?.isPrivacyMask,loading:$(k),readonly:``,type:`text`},null,8,[`model-value`,`disabled`,`loading`]),Z(c,null,{default:Y(()=>[(L(),U(s,{key:$(w),"model-value":$(x)[$(w)]?.color,format:`hex`,disabled:$(x)[$(w)]?.isPrivacyMask,onValueChange:t[6]||=e=>e?$(x)[$(w)].color=`#${e}`:null},null,8,[`model-value`,`disabled`]))]),_:1})]),_:1})]),X(`div`,iu,[$(ie)?Xn((L(),U(u,{key:1,disabled:$(C)!==void 0&&$(x)[$(C)]?.points?.length<3,loading:$(k),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:t[7]||=e=>je(!1)},{icon:Y(()=>[Z(m,{width:`20px`,height:`20px`})]),_:1},8,[`disabled`,`loading`])),[[de,{value:e.$t(`components.form.tooltip.finish`)},void 0,{top:!0}]]):Xn((L(),U(u,{key:0,loading:$(k),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ae},{icon:Y(()=>[Z(l,{width:`20px`,height:`20px`})]),_:1},8,[`loading`])),[[de,{value:e.$t(`components.form.tooltip.new`)},void 0,{top:!0}]]),Xn((L(),U(u,{loading:$(k),disabled:!$(x).length||$(w)<0||$(ie),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Me},{icon:Y(()=>[Z(ee,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[de,{value:e.$t(`components.form.tooltip.edit`)},void 0,{top:!0}]]),Xn((L(),U(u,{loading:$(k),disabled:!$(x).length||$(w)<0,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Ne},{icon:Y(()=>[Z(f,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[de,{value:e.$t(`components.form.tooltip.delete`)},void 0,{top:!0}]]),Xn((L(),U(u,{loading:$(k),disabled:!$(x).length,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Pe},{icon:Y(()=>[Z(ne,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[de,{value:e.$t(`components.form.tooltip.undo`)},void 0,{top:!0}]]),Xn((L(),U(u,{loading:$(k),disabled:!$(x).length,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Fe},{icon:Y(()=>[Z(re,{width:`20px`,height:`20px`})]),_:1},8,[`loading`,`disabled`])),[[de,{value:e.$t(`components.form.tooltip.clear`)},void 0,{top:!0}]])]),X(`div`,au,[Xn((L(),U(u,{loading:$(k),disabled:!($(x).length&&$(w)>=0&&$(x)[$(w)]),severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:we},{icon:Y(()=>[$(x)[$(w)]?.isPrivacyMask?(L(),U(oe,{key:0,width:`20px`,height:`20px`})):(L(),U(se,{key:1,width:`20px`,height:`20px`}))]),_:1},8,[`loading`,`disabled`])),[[de,{value:$(x)[$(w)]?.isPrivacyMask?e.$t(`components.form.tooltip.privacy_mask`):e.$t(`components.form.tooltip.public_mask`)},void 0,{top:!0}]]),Xn((L(),U(u,{loading:$(k),disabled:$(x)[$(w)]?.isPrivacyMask,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:j},{icon:Y(()=>[$(x)[$(w)]?.filter===`include`?(L(),U(ce,{key:0,width:`20px`,height:`20px`})):(L(),U(E,{key:1,width:`20px`,height:`20px`}))]),_:1},8,[`loading`,`disabled`])),[[de,{value:$(x)[$(w)]?.filter===`include`?e.$t(`components.form.tooltip.include`):e.$t(`components.form.tooltip.exclude`)},void 0,{top:!0}]]),Xn((L(),U(u,{loading:$(k),disabled:$(x)[$(w)]?.isPrivacyMask,severity:`secondary`,class:`!rounded-none !h-full w-[60px]`,onClick:Te},{icon:Y(()=>[$(x)[$(w)]?.type===`intersect`?(L(),U(D,{key:0,width:`20px`,height:`20px`})):(L(),U(ue,{key:1,width:`20px`,height:`20px`}))]),_:1},8,[`loading`,`disabled`])),[[de,{value:$(x)[$(w)]?.type===`intersect`?e.$t(`components.form.tooltip.intersect`):e.$t(`components.form.tooltip.contain`)},void 0,{top:!0}]])])],64)):W(``,!0)],6)],2)])])],512)}}}),[[`__scopeId`,`data-v-5f061a75`]]),su={class:`text-color font-normal`},cu={class:`flex flex-col gap-6`},lu={for:`name`,class:`cui-label`},uu={for:`room`,class:`cui-label`},du={class:`flex gap-2`},fu={for:`type`,class:`cui-label`},pu={class:`w-full flex flex-col gap-2`},mu={class:`flex items-center gap-4`},hu={class:`flex flex-col field-switch-gap`},gu={for:`disabled`,class:`cui-label-switch`},_u={class:`text-color font-normal`},vu={class:`flex flex-col gap-6`},yu={for:`info.manufacturer`,class:`cui-label`},bu={for:`info.model`,class:`cui-label`},xu={for:`info.hardware`,class:`cui-label`},Su={for:`info.serialNumber`,class:`cui-label`},Cu={for:`info.firmwareVersion`,class:`cui-label`},wu={for:`info.supportUrl`,class:`cui-label`},Tu={class:`text-color font-normal`},Eu={class:`flex flex-col gap-6`},Du={for:`interfaceSettings.streamingMode`,class:`cui-label`},Ou={for:`interfaceSettings.streamingSource`,class:`cui-label`},ku={for:`interfaceSettings.aspectRatio`,class:`cui-label`},Au={class:`text-color font-normal`},ju={class:`flex flex-col gap-6`},Mu={class:`w-full flex flex-col gap-2`},Nu={class:`flex items-center gap-4`},Pu={class:`flex flex-col field-switch-gap`},Fu={for:`detectionSettings.snooze`,class:`cui-label-switch`},Iu={class:`section-title mt-2`},Lu={for:`detectionSettings.motion.resolution`,class:`cui-label`},Ru={for:`detectionSettings.motion.timeout`,class:`cui-label`},zu={class:`section-title mt-2`},Bu={for:`detectionSettings.object.confidence`,class:`cui-label`},Vu={class:`flex items-center gap-4`},Hu={class:`flex flex-col field-switch-gap`},Uu={for:`detectionSettings.object.suppressStatic`,class:`cui-label-switch`},Wu={class:`section-title mt-2`},Gu={for:`detectionSettings.audio.minDecibels`,class:`cui-label`},Ku={for:`detectionSettings.audio.timeout`,class:`cui-label`},qu={class:`section-title mt-2`},Ju={for:`detectionSettings.face.confidence`,class:`cui-label`},Yu={class:`section-title mt-2`},Xu={for:`detectionSettings.licensePlate.confidence`,class:`cui-label`},Zu={for:`detectionSettings.licensePlate.minLength`,class:`cui-label`},Qu={class:`section-title mt-2`},$u={for:`detectionSettings.sensor.timeout`,class:`cui-label`},ed={for:`detectionSettings.sensor.triggers`,class:`cui-label`},td={class:`text-color font-normal`},nd={class:`w-full flex flex-col gap-6`},rd={class:`flex items-center gap-4`},id={class:`flex flex-col field-switch-gap`},ad={for:`recordingSettings.enabled`,class:`cui-label-switch`},od={for:`recordingSettings.mode`,class:`cui-label`},sd={for:`recordingSettings.preBuffer`,class:`cui-label`},cd={for:`recordingSettings.sources`,class:`cui-label`},ld={class:`text-color font-normal`},ud={class:`w-full flex flex-col gap-4`},dd={class:`flex items-center gap-4`},fd={class:`flex flex-col field-switch-gap`},pd={for:`ptzAutotrack.enabled`,class:`cui-label-switch`},md={class:`cui-label`},hd={class:`cui-label`},gd={class:`cui-label`},_d={class:`cui-label`},vd={class:`cui-label`},yd={class:`cui-label`},bd={class:`flex items-center gap-4`},xd={class:`flex flex-col field-switch-gap`},Sd={for:`ptzAutotrack.returnToHome`,class:`cui-label-switch`},Cd={class:`cui-label`},wd={class:`text-color font-normal`},Td={class:`flex flex-col gap-6`},Ed={class:`w-full flex flex-col gap-2`},Dd={class:`flex items-center gap-4`},Od={class:`flex flex-col field-switch-gap`},kd={for:`snapshotSettings.autoRefresh`,class:`cui-label-switch`},Ad={for:`snapshotSettings.ttl`,class:`cui-label`},jd={for:`snapshotSettings.interval`,class:`cui-label`},Md={class:`text-color font-normal`},Nd={class:`flex flex-col gap-4`},Pd={key:0,class:`flex flex-col gap-2`},Fd={class:`flex flex-col flex-1 min-w-0`},Id={class:`text-sm font-medium truncate`},Ld={class:`text-xs text-muted`},Rd={key:1,class:`text-sm text-muted text-center min-h-[30px]`},zd={class:`text-color font-normal`},Bd={class:`flex flex-col gap-4`},Vd={key:0,class:`flex flex-col gap-2`},Hd={class:`flex flex-col flex-1 min-w-0`},Ud={class:`text-sm font-medium truncate`},Wd={class:`text-xs text-muted`},Gd={key:1,class:`text-sm text-muted text-center min-h-[30px]`},Kd={class:`text-color font-normal`},qd={class:`flex flex-col gap-6`},Jd={for:`frameWorkerSettings.fps`,class:`cui-label`},Yd={class:`w-full flex flex-col gap-2`},Xd={class:`flex items-center gap-4`},Zd={class:`flex flex-col field-switch-gap`},Qd={for:`frameWorkerSettings.hqSnapshots`,class:`cui-label-switch`},$d=H({__name:`Settings`,props:Pn({camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:Pn([`close`],[`update:modelValue`]),setup(e,{emit:t}){let n=new Set([x.Contact,x.Occupancy,x.Smoke,x.Leak,x.Doorbell,x.Switch,x.Light,x.Siren,x.Lock,x.Garage,x.SecuritySystem]),r=new Qt,i=new Qt,a=new Lc,s=e,c=t,l=An(e,`modelValue`),u=pr(),d=_r(),f=Qe(),{t:p}=ye(),{camera:m,cameraDevice:h,loading:g}=nr(s),{sensors:ee}=He(h),{data:y,isBusy:b}=i.getRoomsQuery(),{data:ne}=r.getCameraExtensionsQuery(l.value.name),{mutateAsync:S,isPending:re}=r.removeCameraQuery(),{mutateAsync:ie,isPending:ae}=r.patchZonesQuery(),{mutateAsync:C,isPending:w}=r.patchLinesQuery(),{data:oe}=a.getVirtualSensorsQuery(),{mutateAsync:T,isPending:se}=a.createVirtualSensorQuery(),{mutateAsync:ce}=a.patchVirtualSensorQuery(),{mutateAsync:E,isPending:le}=a.deleteVirtualSensorQuery(),D=J([`camera`,`doorbell`]),ue=J([`auto`,`mse`,`webrtc`,`webrtc/tcp`]),de=J([`high-resolution`,`mid-resolution`,`low-resolution`]),fe=J([`16:9`,`9:16`,`8:3`,`4:3`,`1:1`]),pe=J([`low`,`medium`,`high`]),me=J([`continuous`,`event`,`adhoc`]),he=J([`high`,`mid`,`low`]),ge=J([]),_e=G(()=>ee.value.some(e=>e.type===x.PTZ)),O=G(()=>(ne.value??[]).some(e=>e.contract.interfaces?.includes(o.NVR))),k=G(()=>(oe.value??[]).filter(e=>e.cameraId===l.value._id)),ve=G(()=>ae.value||w.value),A=G(()=>[...(m.value.detectionZones??[]).map((e,t)=>({kind:`zone`,index:t,name:e.name,color:e.color,typeLabel:e.isPrivacyMask?p(`components.camera_options.zone_entry_privacy_mask`):p(`components.camera_options.zone_entry_zone`)})),...(m.value.detectionLines??[]).map((e,t)=>({kind:`line`,index:t,name:e.name,color:e.color,typeLabel:p(`components.camera_options.zone_entry_line`)}))]),be=G(()=>[{label:p(`components.automation_nodes.label_person`),value:`person`},{label:p(`components.automation_nodes.label_vehicle`),value:`vehicle`},{label:p(`components.automation_nodes.label_animal`),value:`animal`},{label:p(`components.automation_nodes.label_package`),value:`package`}]),xe=G(()=>ee.value.filter(e=>n.has(e.type)).map(e=>({label:e.displayName.value,value:Ee(e.type,e.name,e.pluginId)}))),Se=G(()=>new Set(xe.value.map(e=>e.value))),Ce=G(()=>(l.value.detectionSettings.sensor?.triggers??[]).map(e=>Ee(e.sensorType,e.sensorName,e.pluginId)).filter(e=>Se.value.has(e))),we=G(()=>{let e=y.value??[`Default`],t=new Set(e.map(e=>e.toLowerCase()));return[...e,...ge.value.filter(e=>!t.has(e.toLowerCase()))].map(e=>({label:e===`Default`?p(`components.form.label.room_default`):e,value:e}))}),j=G(()=>g.value||re.value);function Te(e){let t=l.value.recordingSettings??{enabled:!0,mode:`continuous`,preBuffer:10,sources:[`high`,`mid`,`low`]};l.value.recordingSettings={...t,...e}}function Ee(e,t,n){return`${e}::${t}::${n}`}function De(e){let t=(l.value.detectionSettings.sensor?.triggers??[]).filter(e=>!Se.value.has(Ee(e.sensorType,e.sensorName,e.pluginId))),n=e.map(e=>{let[t,n,r]=e.split(`::`);return{sensorType:t,sensorName:n,pluginId:r}});l.value.detectionSettings.sensor||(l.value.detectionSettings.sensor={timeout:30,triggers:[]}),l.value.detectionSettings.sensor.triggers=[...t,...n]}function Oe(){f.openComponentDialog(_i,{data:{title:p(`components.dialog.title.create_room`),confirmText:p(`components.form.button.add`),contentProps:{}},onConfirm:e=>{if(!e)return;let t=we.value.find(t=>t.value.toLowerCase()===e.toLowerCase()),n=t?.value??e;t||ge.value.push(n),l.value.room=n}})}function ke(){f.openComponentDialog(qc,{data:{title:p(`components.camera_options.virtual_sensor_create`),confirmText:p(`components.form.button.save`),loading:se,contentProps:{cameraId:l.value._id}},onConfirm:async e=>{e&&await T({data:e})}})}function Ae(e){f.openComponentDialog(Cs,{data:{title:p(`components.camera_options.sensor_display_name`),confirmText:p(`components.form.button.save`),contentProps:{currentDisplayName:e.displayName||e.name}},onConfirm:async t=>{t&&t!==e.displayName&&await ce({id:e._id,data:{displayName:t}})}})}function je(e){f.openTextDialog({data:{title:p(`components.camera_options.virtual_sensor_delete`),contentText:p(`components.camera_options.virtual_sensor_delete_confirm`),confirmText:p(`components.form.button.remove`),loading:le},onConfirm:async()=>{await E({id:e._id})}})}function Me(){f.openTextDialog({data:{title:p(`components.dialog.title.confirm`),confirmText:p(`components.form.button.remove`),contentText:p(`components.dialog.message.confirm_remove`),confirmButtonProps:{severity:`danger`}},onConfirm:async()=>{try{await S({cameraname:m.value.name}),u.path.includes(m.value.name)&&d.push({path:`/home`}),c(`close`)}catch{}}})}function Ne(e=[]){f.openComponentDialog(ou,{data:{title:p(`components.zone_editor.edit_zones`),loading:j,contentProps:{cameraName:m.value.name,zones:e,lines:m.value.detectionLines??[]}}})}function Pe(){f.openComponentDialog(Wc,{data:{title:p(`components.form.label.aspect_ratio`),contentProps:{camera:m.value,current:l.value.interfaceSettings.aspectRatio,presets:fe.value},confirmText:p(`components.form.button.apply`)},onConfirm:e=>{l.value.interfaceSettings.aspectRatio=e}})}function Fe(e){f.openComponentDialog(ou,{data:{title:p(`components.zone_editor.edit_zones`),loading:j,contentProps:{cameraName:m.value.name,zones:m.value.detectionZones??[],lines:m.value.detectionLines??[],initialTab:e.kind===`line`?`lines`:`zones`,initialSelection:e.index}}})}function Ie(e){f.openTextDialog({data:{title:p(`components.camera_options.zone_entry_delete`),contentText:p(`components.camera_options.zone_entry_delete_confirm`),confirmText:p(`components.form.button.remove`),loading:ve},onConfirm:async()=>{if(e.kind===`zone`){let t=(m.value.detectionZones??[]).filter((t,n)=>n!==e.index);await ie({cameraname:m.value.name,zoneData:t})}else{let t=(m.value.detectionLines??[]).filter((t,n)=>n!==e.index);await C({cameraname:m.value.name,lineData:t})}}})}return(e,t)=>{let n=Tr,r=qr,i=te,a=Er,o=Ir,s=gi,c=_,u=Cr,d=Lr,f=yr,p=Fr,h=Rr,g=hi,ee=oi,y=mi,ne=br,x=v;return L(),U(ne,{multiple:``,class:`p-4`},{default:Y(()=>[Z(f,{value:`general`},{default:Y(()=>[Z(n,{class:`px-0 pt-0`},{default:Y(()=>[X(`span`,su,z(e.$t(`components.camera_options.general`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,cu,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.general_hint`)),1)]),_:1}),Z($(P),{modelValue:l.value.name,"onUpdate:modelValue":t[0]||=e=>l.value.name=e,modelModifiers:{trim:!0},name:`name`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:t,errors:n})=>[X(`label`,lu,z(e.$t(`components.form.label.name`)),1),Z(a,null,{default:Y(()=>[Z(i,Jn(t,{invalid:n.length>0,loading:$(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`name`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Z($(P),{"model-value":l.value.room,name:`room`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,uu,z(e.$t(`components.form.label.room`)),1),X(`div`,du,[Z(o,{"model-value":l.value.room,options:$(we),"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:$(b),class:`w-full`,"onUpdate:modelValue":t[1]||=e=>l.value.room=e},null,8,[`model-value`,`options`,`invalid`,`loading`]),Xn((L(),U(c,{severity:`secondary`,outlined:``,class:`shrink-0 h-[42px] w-[42px] p-0`,onClick:Oe},{icon:Y(()=>[Z(s,{class:`w-4 h-4`})]),_:1})),[[x,e.$t(`components.form.button.create_room`),void 0,{top:!0}]])]),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.room`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.type,name:`type`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,fu,z(e.$t(`components.form.label.type`)),1),Z(a,null,{default:Y(()=>[Z(o,{"model-value":l.value.type,options:$(D),invalid:n.length>0,loading:$(j),type:`text`,onValueChange:t[2]||=e=>l.value.type=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`type`,class:`cui-input-error`})]),_:1})]),_:1},8,[`model-value`]),X(`div`,pu,[Z($(P),{"model-value":l.value.disabled,value:!0,"unchecked-value":!1,type:`checkbox`,name:`disabled`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:i})=>[X(`div`,mu,[X(`div`,hu,[X(`label`,gu,z(e.$t(`components.form.label.disabled`)),1),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.disable_camera`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`disabled`,class:`cui-input-switch-error`})]),_:1})]),Z(u,Jn({"model-value":l.value.disabled},n,{invalid:i.length>0,loading:$(j),class:`ml-auto shrink-0`,onValueChange:t[3]||=e=>l.value.disabled=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),Z(c,{fluid:``,severity:`danger`,loading:$(j),class:`cui-button-medium`,label:e.$t(`components.form.button.remove`),onClick:t[4]||=e=>Me()},null,8,[`loading`,`label`])])]),_:1})]),_:1}),Z(f,{value:`branding`},{default:Y(()=>[Z(n,{class:`px-0`},{default:Y(()=>[X(`span`,_u,z(e.$t(`components.camera_options.branding`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,vu,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.branding_hint`)),1)]),_:1}),Z($(P),{modelValue:l.value.info.manufacturer,"onUpdate:modelValue":t[5]||=e=>l.value.info.manufacturer=e,modelModifiers:{trim:!0},name:`info.manufacturer`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:t,errors:n})=>[X(`label`,yu,z(e.$t(`components.form.label.manufacturer`)),1),Z(a,null,{default:Y(()=>[Z(i,Jn(t,{invalid:n.length>0,loading:$(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`info.manufacturer`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Z($(P),{modelValue:l.value.info.model,"onUpdate:modelValue":t[6]||=e=>l.value.info.model=e,modelModifiers:{trim:!0},name:`info.model`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:t,errors:n})=>[X(`label`,bu,z(e.$t(`components.form.label.model`)),1),Z(a,null,{default:Y(()=>[Z(i,Jn(t,{invalid:n.length>0,loading:$(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`info.model`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Z($(P),{modelValue:l.value.info.hardware,"onUpdate:modelValue":t[7]||=e=>l.value.info.hardware=e,modelModifiers:{trim:!0},name:`info.hardware`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:t,errors:n})=>[X(`label`,xu,z(e.$t(`components.form.label.hardware_version`)),1),Z(a,null,{default:Y(()=>[Z(i,Jn(t,{invalid:n.length>0,loading:$(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`info.hardware`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Z($(P),{modelValue:l.value.info.serialNumber,"onUpdate:modelValue":t[8]||=e=>l.value.info.serialNumber=e,modelModifiers:{trim:!0},name:`info.serialNumber`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:t,errors:n})=>[X(`label`,Su,z(e.$t(`components.form.label.serial_number`)),1),Z(a,null,{default:Y(()=>[Z(i,Jn(t,{invalid:n.length>0,loading:$(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`info.serialNumber`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Z($(P),{modelValue:l.value.info.firmwareVersion,"onUpdate:modelValue":t[9]||=e=>l.value.info.firmwareVersion=e,modelModifiers:{trim:!0},name:`info.firmwareVersion`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:t,errors:n})=>[X(`label`,Cu,z(e.$t(`components.form.label.firmware_version`)),1),Z(a,null,{default:Y(()=>[Z(i,Jn(t,{invalid:n.length>0,loading:$(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`info.firmwareVersion`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`]),Z($(P),{modelValue:l.value.info.supportUrl,"onUpdate:modelValue":t[10]||=e=>l.value.info.supportUrl=e,modelModifiers:{trim:!0},name:`info.supportUrl`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:t,errors:n})=>[X(`label`,wu,z(e.$t(`components.form.label.support_url`)),1),Z(a,null,{default:Y(()=>[Z(i,Jn(t,{invalid:n.length>0,loading:$(j),type:`text`}),null,16,[`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`info.supportUrl`,class:`cui-input-error`})]),_:1})]),_:1},8,[`modelValue`])])]),_:1})]),_:1}),Z(f,{value:`interface`},{default:Y(()=>[Z(n,{class:`px-0`},{default:Y(()=>[X(`span`,Tu,z(e.$t(`components.camera_options.interface`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,Eu,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.interface_hint`)),1)]),_:1}),Z($(P),{"model-value":l.value.interfaceSettings.streamingMode,name:`interfaceSettings.streamingMode`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Du,z(e.$t(`components.form.label.streaming_mode`)),1),Z(a,null,{default:Y(()=>[Z(o,{"model-value":l.value.interfaceSettings.streamingMode,options:$(ue),invalid:n.length>0,loading:$(j),type:`text`,onValueChange:t[11]||=e=>l.value.interfaceSettings.streamingMode=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`interfaceSettings.streamingMode`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.streaming_mode`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.interfaceSettings.streamingSource,name:`interfaceSettings.streamingSource`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Ou,z(e.$t(`components.form.label.streaming_source`)),1),Z(a,null,{default:Y(()=>[Z(o,{"model-value":l.value.interfaceSettings.streamingSource,options:$(de),invalid:n.length>0,loading:$(j),type:`text`,onValueChange:t[12]||=e=>l.value.interfaceSettings.streamingSource=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`interfaceSettings.streamingSource`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.streaming_source`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.interfaceSettings.aspectRatio,name:`interfaceSettings.aspectRatio`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:t})=>[X(`label`,ku,z(e.$t(`components.form.label.aspect_ratio`)),1),Z(a,null,{default:Y(()=>[Z(i,{"model-value":l.value.interfaceSettings.aspectRatio,invalid:t.length>0,readonly:``,tabindex:`-1`,class:`cursor-pointer`,onClick:Pe},null,8,[`model-value`,`invalid`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`interfaceSettings.aspectRatio`,class:`cui-input-error`})]),_:1}),t.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.aspect_ratio`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),Z(f,{value:`detection`},{default:Y(()=>[Z(n,{class:`px-0`},{default:Y(()=>[X(`span`,Au,z(e.$t(`components.camera_options.detection`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,ju,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.detection_hint`)),1)]),_:1}),X(`div`,Mu,[Z($(P),{"model-value":l.value.detectionSettings?.snooze,value:!0,"unchecked-value":!1,type:`checkbox`,name:`detectionSettings.snooze`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:i})=>[X(`div`,Nu,[X(`div`,Pu,[X(`label`,Fu,z(e.$t(`components.form.label.snooze`)),1),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.snooze_camera`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.snooze`,class:`cui-input-switch-error`})]),_:1})]),Z(u,Jn({"model-value":l.value.detectionSettings?.snooze},n,{invalid:i.length>0,loading:$(j),class:`ml-auto shrink-0`,onValueChange:t[13]||=e=>{l.value.detectionSettings&&(l.value.detectionSettings.snooze=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),X(`span`,Iu,z(e.$t(`components.camera_options.sensor_type_motion`)),1),Z($(P),{"model-value":l.value.detectionSettings.motion.resolution,name:`detectionSettings.motion.resolution`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Lu,z(e.$t(`components.form.label.motion_resolution`)),1),Z(a,null,{default:Y(()=>[Z(o,{"model-value":l.value.detectionSettings.motion.resolution,options:$(pe),invalid:n.length>0,loading:$(j),type:`text`,onValueChange:t[14]||=e=>l.value.detectionSettings.motion.resolution=e},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.motion.resolution`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.motion_resolution`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.detectionSettings.motion.timeout,name:`detectionSettings.motion.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Ru,z(e.$t(`components.form.label.motion_timeout`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.detectionSettings.motion.timeout,invalid:n.length>0,loading:$(j),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[15]||=e=>l.value.detectionSettings.motion.timeout=e??void 0,onInput:t[16]||=e=>l.value.detectionSettings.motion.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.motion.timeout`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.motion_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),X(`span`,zu,z(e.$t(`components.camera_options.sensor_type_object`)),1),Z($(P),{"model-value":l.value.detectionSettings.object.confidence,name:`detectionSettings.object.confidence`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Bu,z(e.$t(`components.form.label.confidence`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.detectionSettings.object.confidence,invalid:n.length>0,loading:$(j),"show-buttons":``,step:.01,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[17]||=e=>l.value.detectionSettings.object.confidence=e??void 0,onInput:t[18]||=e=>l.value.detectionSettings.object.confidence=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.object.confidence`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.detectionSettings.object.suppressStatic??!0,value:!0,"unchecked-value":!1,type:`checkbox`,name:`detectionSettings.object.suppressStatic`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:i})=>[X(`div`,Vu,[X(`div`,Hu,[X(`label`,Uu,z(e.$t(`components.form.label.suppress_static`)),1),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.suppress_static`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.object.suppressStatic`,class:`cui-input-switch-error`})]),_:1})]),Z(u,Jn({"model-value":l.value.detectionSettings.object.suppressStatic??!0},n,{invalid:i.length>0,loading:$(j),class:`ml-auto shrink-0`,onValueChange:t[19]||=e=>l.value.detectionSettings.object.suppressStatic=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),X(`span`,Wu,z(e.$t(`components.camera_options.sensor_type_audio`)),1),Z($(P),{"model-value":l.value.detectionSettings.audio.minDecibels,name:`detectionSettings.audio.minDecibels`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Gu,z(e.$t(`components.form.label.audio_min_decibels`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.detectionSettings.audio.minDecibels,invalid:n.length>0,loading:$(j),"show-buttons":``,step:1,min:-100,max:0,mode:`decimal`,"use-grouping":!1,onValueChange:t[20]||=e=>l.value.detectionSettings.audio.minDecibels=e??void 0,onInput:t[21]||=e=>l.value.detectionSettings.audio.minDecibels=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.audio.minDecibels`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.audio_min_decibels`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.detectionSettings.audio.timeout,name:`detectionSettings.audio.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Ku,z(e.$t(`components.form.label.audio_timeout`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.detectionSettings.audio.timeout,invalid:n.length>0,loading:$(j),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[22]||=e=>l.value.detectionSettings.audio.timeout=e??void 0,onInput:t[23]||=e=>l.value.detectionSettings.audio.timeout=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.audio.timeout`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.audio_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),X(`span`,qu,z(e.$t(`components.camera_options.sensor_type_face`)),1),Z($(P),{"model-value":l.value.detectionSettings.face?.confidence,name:`detectionSettings.face.confidence`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Ju,z(e.$t(`components.form.label.face_confidence`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.detectionSettings.face?.confidence,invalid:n.length>0,loading:$(j),"show-buttons":``,step:.01,min:0,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[24]||=e=>l.value.detectionSettings.face={confidence:e??void 0},onInput:t[25]||=e=>l.value.detectionSettings.face={confidence:e.value??void 0}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.face.confidence`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.face_confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),X(`span`,Yu,z(e.$t(`components.camera_options.sensor_type_licensePlate`)),1),Z($(P),{"model-value":l.value.detectionSettings.licensePlate?.confidence,name:`detectionSettings.licensePlate.confidence`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Xu,z(e.$t(`components.form.label.plate_confidence`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.detectionSettings.licensePlate?.confidence,invalid:n.length>0,loading:$(j),"show-buttons":``,step:.01,min:0,max:1,mode:`decimal`,"use-grouping":!1,onValueChange:t[26]||=e=>l.value.detectionSettings.licensePlate={...l.value.detectionSettings.licensePlate,confidence:e??void 0},onInput:t[27]||=e=>l.value.detectionSettings.licensePlate={...l.value.detectionSettings.licensePlate,confidence:e.value??void 0}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.licensePlate.confidence`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.plate_confidence`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.detectionSettings.licensePlate?.minLength,name:`detectionSettings.licensePlate.minLength`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Zu,z(e.$t(`components.form.label.plate_min_length`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.detectionSettings.licensePlate?.minLength,invalid:n.length>0,loading:$(j),"show-buttons":``,step:1,min:1,max:10,"use-grouping":!1,onValueChange:t[28]||=e=>l.value.detectionSettings.licensePlate={...l.value.detectionSettings.licensePlate,minLength:e??void 0},onInput:t[29]||=e=>l.value.detectionSettings.licensePlate={...l.value.detectionSettings.licensePlate,minLength:e.value??void 0}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.licensePlate.minLength`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.plate_min_length`)),1)]),_:1}))]),_:1},8,[`model-value`]),X(`span`,Qu,z(e.$t(`components.camera_options.sensors`)),1),Z($(P),{"model-value":l.value.detectionSettings.sensor?.timeout,name:`detectionSettings.sensor.timeout`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,$u,z(e.$t(`components.form.label.sensor_timeout`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.detectionSettings.sensor?.timeout,invalid:n.length>0,loading:$(j),"show-buttons":``,min:10,"use-grouping":!1,onValueChange:t[30]||=e=>{l.value.detectionSettings.sensor||(l.value.detectionSettings.sensor={timeout:30,triggers:[]}),l.value.detectionSettings.sensor.timeout=e??30},onInput:t[31]||=e=>{l.value.detectionSettings.sensor||(l.value.detectionSettings.sensor={timeout:30,triggers:[]}),l.value.detectionSettings.sensor.timeout=e.value??30}},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.sensor.timeout`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.sensor_timeout`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.detectionSettings.sensor?.triggers??[],name:`detectionSettings.sensor.triggers`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:t})=>[X(`label`,ed,z(e.$t(`components.form.label.sensor_triggers`)),1),Z(h,{"model-value":$(Ce),invalid:t.length>0,options:$(xe),"option-label":`label`,"option-value":`value`,placeholder:e.$t(`components.form.hint.sensor_triggers_placeholder`),class:`w-full`,"show-toggle-all":!1,"onUpdate:modelValue":De},null,8,[`model-value`,`invalid`,`options`,`placeholder`]),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`detectionSettings.sensor.triggers`,class:`cui-input-error`})]),_:1}),t.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.sensor_triggers`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),Z(f,{value:`recording`},{default:Y(()=>[Z(n,{class:`px-0`},{default:Y(()=>[X(`span`,td,z(e.$t(`components.camera_options.recording`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,nd,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.recording_hint`)),1)]),_:1}),$(O)?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-banner cui-banner-warn`},{default:Y(()=>[Z(g,{class:`w-4 h-4 shrink-0 inline-block mr-1`}),B(` `+z(e.$t(`components.camera_options.recording_requires`)),1)]),_:1})),Z($(P),{"model-value":l.value.recordingSettings?.enabled??!0,value:!0,"unchecked-value":!1,type:`checkbox`,name:`recordingSettings.enabled`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:i})=>[X(`div`,rd,[X(`div`,id,[X(`label`,ad,z(e.$t(`components.form.label.recording_enabled`)),1),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.recording_enabled`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`recordingSettings.enabled`,class:`cui-input-switch-error`})]),_:1})]),Z(u,Jn({"model-value":l.value.recordingSettings?.enabled??!0},n,{invalid:i.length>0,loading:$(j),class:`ml-auto shrink-0`,onValueChange:t[32]||=e=>Te({enabled:e})}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),l.value.recordingSettings?.enabled??!0?(L(),q(V,{key:1},[Z($(P),{"model-value":l.value.recordingSettings?.mode,name:`recordingSettings.mode`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,od,z(e.$t(`components.form.label.recording_mode`)),1),Z(a,null,{default:Y(()=>[Z(o,{"model-value":l.value.recordingSettings?.mode??`continuous`,options:$(me),invalid:n.length>0,loading:$(j),type:`text`,onValueChange:t[33]||=e=>Te({mode:e})},null,8,[`model-value`,`options`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`recordingSettings.mode`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.recording_mode`)),1)]),_:1}))]),_:1},8,[`model-value`]),l.value.recordingSettings?.mode===`event`?(L(),U($(P),{key:0,"model-value":l.value.recordingSettings?.preBuffer,name:`recordingSettings.preBuffer`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,sd,z(e.$t(`components.form.label.recording_prebuffer`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.recordingSettings?.preBuffer??10,invalid:n.length>0,loading:$(j),"show-buttons":``,step:1,min:0,max:60,"use-grouping":!1,onValueChange:t[34]||=e=>Te({preBuffer:e??10}),onInput:t[35]||=e=>Te({preBuffer:e.value??10})},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`recordingSettings.preBuffer`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.recording_prebuffer`)),1)]),_:1}))]),_:1},8,[`model-value`])):W(``,!0),Z($(P),{"model-value":l.value.recordingSettings?.sources,name:`recordingSettings.sources`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,cd,z(e.$t(`components.form.label.recording_sources`)),1),Z(h,{"model-value":l.value.recordingSettings?.sources??[`high`,`mid`,`low`],invalid:n.length>0,options:$(he),class:`w-full`,"show-toggle-all":!1,"onUpdate:modelValue":t[36]||=e=>Te({sources:e})},null,8,[`model-value`,`invalid`,`options`]),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`recordingSettings.sources`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.recording_sources`)),1)]),_:1}))]),_:1},8,[`model-value`])],64)):W(``,!0)])]),_:1})]),_:1}),Z(f,{value:`ptzAutotrack`},{default:Y(()=>[Z(n,{class:`px-0`},{default:Y(()=>[X(`span`,ld,z(e.$t(`components.camera_options.ptz_autotrack`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,ud,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.ptz_autotrack_hint`)),1)]),_:1}),$(_e)?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-banner cui-banner-warn`},{default:Y(()=>[Z(g,{class:`w-4 h-4 shrink-0 inline-block mr-1`}),B(` `+z(e.$t(`components.form.hint.ptz_autotrack_requires`)),1)]),_:1})),Z($(P),{"model-value":l.value.ptzAutotrack?.enabled,value:!0,"unchecked-value":!1,type:`checkbox`,name:`ptzAutotrack.enabled`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:i})=>[X(`div`,dd,[X(`div`,fd,[X(`label`,pd,z(e.$t(`components.form.label.ptz_autotrack_enabled`)),1),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.ptz_autotrack`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`ptzAutotrack.enabled`,class:`cui-input-switch-error`})]),_:1})]),Z(u,Jn({"model-value":l.value.ptzAutotrack?.enabled},n,{invalid:i.length>0,loading:$(j),class:`ml-auto shrink-0`,onValueChange:t[37]||=e=>{l.value.ptzAutotrack&&(l.value.ptzAutotrack.enabled=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),l.value.ptzAutotrack?.enabled?(L(),q(V,{key:1},[Z($(P),{"model-value":l.value.ptzAutotrack?.targetLabels,name:`ptzAutotrack.targetLabels`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,md,z(e.$t(`components.form.label.ptz_autotrack_target_labels`)),1),Z(h,{"model-value":l.value.ptzAutotrack?.targetLabels,options:$(be),"option-label":`label`,"option-value":`value`,invalid:n.length>0,loading:$(j),class:`w-full`,onValueChange:t[38]||=e=>{l.value.ptzAutotrack&&(l.value.ptzAutotrack.targetLabels=e)}},null,8,[`model-value`,`options`,`invalid`,`loading`]),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.ptz_autotrack_target_labels`)),1)]),_:1})]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.ptzAutotrack?.minConfidence,name:`ptzAutotrack.minConfidence`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,hd,z(e.$t(`components.form.label.ptz_autotrack_min_confidence`)),1),Z(p,{"model-value":l.value.ptzAutotrack?.minConfidence,min:.3,max:1,step:.05,"min-fraction-digits":2,"max-fraction-digits":2,invalid:n.length>0,loading:$(j),class:`w-full`,onValueChange:t[39]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.minConfidence=e)}},null,8,[`model-value`,`invalid`,`loading`]),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.ptz_autotrack_min_confidence`)),1)]),_:1})]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.ptzAutotrack?.triggerDeadZone,name:`ptzAutotrack.triggerDeadZone`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,gd,z(e.$t(`components.form.label.ptz_autotrack_trigger_dead_zone`)),1),Z(p,{"model-value":l.value.ptzAutotrack?.triggerDeadZone,min:0,max:.3,step:.01,"min-fraction-digits":2,"max-fraction-digits":2,invalid:n.length>0,loading:$(j),class:`w-full`,onValueChange:t[40]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.triggerDeadZone=e)}},null,8,[`model-value`,`invalid`,`loading`]),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.ptz_autotrack_trigger_dead_zone`)),1)]),_:1})]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.ptzAutotrack?.trackingSpeed??2,name:`ptzAutotrack.trackingSpeed`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,_d,z(e.$t(`components.form.label.ptz_autotrack_tracking_speed`)),1),Z(p,{"model-value":l.value.ptzAutotrack?.trackingSpeed??2,min:1,max:5,step:.5,"min-fraction-digits":1,"max-fraction-digits":1,invalid:n.length>0,loading:$(j),class:`w-full`,onValueChange:t[41]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.trackingSpeed=e)}},null,8,[`model-value`,`invalid`,`loading`]),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.ptz_autotrack_tracking_speed`)),1)]),_:1})]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.ptzAutotrack?.leadMs??1800,name:`ptzAutotrack.leadMs`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,vd,z(e.$t(`components.form.label.ptz_autotrack_lead_ms`)),1),Z(p,{"model-value":l.value.ptzAutotrack?.leadMs??1800,min:0,max:4e3,step:100,invalid:n.length>0,loading:$(j),class:`w-full`,onValueChange:t[42]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.leadMs=e)}},null,8,[`model-value`,`invalid`,`loading`]),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.ptz_autotrack_lead_ms`)),1)]),_:1})]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.ptzAutotrack?.panRate??.85,name:`ptzAutotrack.panRate`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,yd,z(e.$t(`components.form.label.ptz_autotrack_pan_rate`)),1),Z(p,{"model-value":l.value.ptzAutotrack?.panRate??.85,min:.1,max:3,step:.05,"min-fraction-digits":2,"max-fraction-digits":2,invalid:n.length>0,loading:$(j),class:`w-full`,onValueChange:t[43]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.panRate=e)}},null,8,[`model-value`,`invalid`,`loading`]),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.ptz_autotrack_pan_rate`)),1)]),_:1})]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.ptzAutotrack?.returnToHome,value:!0,"unchecked-value":!1,type:`checkbox`,name:`ptzAutotrack.returnToHome`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:i})=>[X(`div`,bd,[X(`div`,xd,[X(`label`,Sd,z(e.$t(`components.form.label.ptz_autotrack_return_home`)),1),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.ptz_autotrack_return_home`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`ptzAutotrack.returnToHome`,class:`cui-input-switch-error`})]),_:1})]),Z(u,Jn({"model-value":l.value.ptzAutotrack?.returnToHome},n,{invalid:i.length>0,loading:$(j),class:`ml-auto shrink-0`,onValueChange:t[44]||=e=>{l.value.ptzAutotrack&&(l.value.ptzAutotrack.returnToHome=e)}}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`]),l.value.ptzAutotrack?.returnToHome?(L(),U($(P),{key:0,"model-value":l.value.ptzAutotrack?.homeWaitMs,name:`ptzAutotrack.homeWaitMs`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Cd,z(e.$t(`components.form.label.ptz_autotrack_home_wait`)),1),Z(p,{"model-value":(l.value.ptzAutotrack?.homeWaitMs??0)/1e3,min:1,max:60,step:1,suffix:` s`,invalid:n.length>0,loading:$(j),class:`w-full`,onValueChange:t[45]||=e=>{l.value.ptzAutotrack&&e!=null&&(l.value.ptzAutotrack.homeWaitMs=e*1e3)}},null,8,[`model-value`,`invalid`,`loading`]),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.ptz_autotrack_home_wait`)),1)]),_:1})]),_:1},8,[`model-value`])):W(``,!0)],64)):W(``,!0)])]),_:1})]),_:1}),Z(f,{value:`snapshot`},{default:Y(()=>[Z(n,{class:`px-0`},{default:Y(()=>[X(`span`,wd,z(e.$t(`components.camera_options.snapshot`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,Td,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.snapshot_hint`)),1)]),_:1}),X(`div`,Ed,[Z($(P),{"model-value":l.value.snapshotSettings.autoRefresh,value:!0,"unchecked-value":!1,type:`checkbox`,name:`snapshotSettings.autoRefresh`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:i})=>[X(`div`,Dd,[X(`div`,Od,[X(`label`,kd,z(e.$t(`components.form.label.auto_refresh`)),1),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.auto_refresh`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`snapshotSettings.autoRefresh`,class:`cui-input-switch-error`})]),_:1})]),Z(u,Jn({"model-value":l.value.snapshotSettings.autoRefresh},n,{invalid:i.length>0,loading:$(j),class:`ml-auto shrink-0`,onValueChange:t[46]||=e=>l.value.snapshotSettings.autoRefresh=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])]),Z($(P),{"model-value":l.value.snapshotSettings.ttl,name:`snapshotSettings.ttl`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Ad,z(e.$t(`components.form.label.cache_time`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.snapshotSettings.ttl,invalid:n.length>0,loading:$(j),min:10,"show-buttons":``,"use-grouping":!1,onValueChange:t[47]||=e=>l.value.snapshotSettings.ttl=e??10,onInput:t[48]||=e=>l.value.snapshotSettings.ttl=e.value??10},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`snapshotSettings.ttl`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.cache_time`)),1)]),_:1}))]),_:1},8,[`model-value`]),Z($(P),{"model-value":l.value.snapshotSettings.interval,name:`snapshotSettings.interval`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,jd,z(e.$t(`components.form.label.refresh_interval`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.snapshotSettings.interval,invalid:n.length>0,loading:$(j),min:10,max:60,"show-buttons":``,"use-grouping":!1,onValueChange:t[49]||=e=>l.value.snapshotSettings.interval=e??30,onInput:t[50]||=e=>l.value.snapshotSettings.interval=e.value??30},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`snapshotSettings.interval`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.refresh_interval`)),1)]),_:1}))]),_:1},8,[`model-value`])])]),_:1})]),_:1}),Z(f,{value:`zones`},{default:Y(()=>[Z(n,{class:`px-0`},{default:Y(()=>[X(`span`,Md,z(e.$t(`components.camera_options.zones`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,Nd,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.zones_hint`)),1)]),_:1}),$(A).length?(L(),q(`div`,Pd,[(L(!0),q(V,null,M($(A),t=>(L(),q(`div`,{key:`${t.kind}-${t.index}`,class:`flex items-center gap-2 p-2 rounded-md border-color`},[X(`span`,{class:`w-2.5 h-2.5 rounded-full shrink-0`,style:Q({background:t.color})},null,4),X(`div`,Fd,[X(`span`,Id,z(t.name),1),X(`span`,Ld,z(t.typeLabel),1)]),Xn((L(),U(c,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-sm shrink-0`,onClick:e=>Fe(t)},{icon:Y(()=>[Z(ee,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[x,e.$t(`components.zone_editor.edit_zones`),void 0,{top:!0}]]),Xn((L(),U(c,{text:``,rounded:``,severity:`danger`,class:`cui-icon-sm shrink-0`,onClick:e=>Ie(t)},{icon:Y(()=>[Z(y,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[x,e.$t(`components.camera_options.zone_entry_delete`),void 0,{top:!0}]])]))),128))])):(L(),q(`span`,Rd,z(e.$t(`components.camera_options.zones_empty`)),1)),Z(c,{fluid:``,class:`cui-button-medium`,loading:$(j),label:e.$t(`components.form.button.edit_zones`),onClick:t[51]||=e=>Ne($(m).detectionZones)},null,8,[`loading`,`label`])])]),_:1})]),_:1}),Z(f,{value:`sensors`},{default:Y(()=>[Z(n,{class:`px-0`},{default:Y(()=>[X(`span`,zd,z(e.$t(`components.camera_options.virtual_sensors`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,Bd,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.virtual_sensors_hint`)),1)]),_:1}),$(k).length?(L(),q(`div`,Vd,[(L(!0),q(V,null,M($(k),t=>(L(),q(`div`,{key:t._id,class:`flex items-center gap-2 p-2 rounded-md border-color`},[X(`div`,Hd,[X(`span`,Ud,z(t.displayName||t.name),1),X(`span`,Wd,z(e.$t(`components.camera_options.sensor_type_${t.type}`)),1)]),Xn((L(),U(c,{text:``,rounded:``,severity:`secondary`,class:`cui-icon-sm shrink-0`,onClick:e=>Ae(t)},{icon:Y(()=>[Z(ee,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[x,e.$t(`components.camera_options.sensor_display_name`),void 0,{top:!0}]]),Xn((L(),U(c,{text:``,rounded:``,severity:`danger`,class:`cui-icon-sm shrink-0`,onClick:e=>je(t)},{icon:Y(()=>[Z(y,{width:`100%`,height:`100%`})]),_:1},8,[`onClick`])),[[x,e.$t(`components.camera_options.virtual_sensor_delete`),void 0,{top:!0}]])]))),128))])):(L(),q(`span`,Gd,z(e.$t(`components.camera_options.virtual_sensors_empty`)),1)),Z(c,{fluid:``,class:`cui-button-medium`,label:e.$t(`components.camera_options.virtual_sensor_create`),onClick:ke},null,8,[`label`])])]),_:1})]),_:1}),Z(f,{value:`frameworker`},{default:Y(()=>[Z(n,{class:`px-0`},{default:Y(()=>[X(`span`,Kd,z(e.$t(`components.camera_options.frame_worker`)),1)]),_:1}),Z(d,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,qd,[Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.camera_options.frame_worker_hint`)),1)]),_:1}),Z($(P),{"model-value":l.value.frameWorkerSettings.fps,name:`frameWorkerSettings.fps`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:n})=>[X(`label`,Jd,z(e.$t(`components.form.label.fps`)),1),Z(a,null,{default:Y(()=>[Z(p,{"model-value":l.value.frameWorkerSettings.fps,invalid:n.length>0,loading:$(j),min:0,"show-buttons":``,"use-grouping":!1,onValueChange:t[52]||=e=>l.value.frameWorkerSettings.fps=e??void 0,onInput:t[53]||=e=>l.value.frameWorkerSettings.fps=e.value??void 0},null,8,[`model-value`,`invalid`,`loading`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`frameWorkerSettings.fps`,class:`cui-input-error`})]),_:1}),n.length?W(``,!0):(L(),U(r,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.frameworker_fps`)),1)]),_:1}))]),_:1},8,[`model-value`]),X(`div`,Yd,[Z($(P),{"model-value":l.value.frameWorkerSettings.hqSnapshots,value:!0,"unchecked-value":!1,type:`checkbox`,name:`frameWorkerSettings.hqSnapshots`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:i})=>[X(`div`,Xd,[X(`div`,Zd,[X(`label`,Qd,z(e.$t(`components.form.label.hq_snapshots`)),1),Z(r,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.hq_snapshots`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`frameWorkerSettings.hqSnapshots`,class:`cui-input-switch-error`})]),_:1})]),Z(u,Jn({"model-value":l.value.frameWorkerSettings.hqSnapshots},n,{invalid:i.length>0,loading:$(j),class:`ml-auto shrink-0`,onValueChange:t[54]||=e=>l.value.frameWorkerSettings.hqSnapshots=e}),null,16,[`model-value`,`invalid`,`loading`])])]),_:1},8,[`model-value`])])])]),_:1})]),_:1})]),_:1})}}}),ef={viewBox:`0 0 16 16`,width:`1.2em`,height:`1.2em`};function tf(e,t){return L(),q(`svg`,ef,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M6.97.47a.75.75 0 0 1 1.06 0l1.75 1.75a.75.75 0 0 1 0 1.06L8.03 5.03a.75.75 0 0 1-1.06-1.06l.43-.43a4.5 4.5 0 0 0-2.28 7.918a.75.75 0 0 1-.961 1.152A6 6 0 0 1 7.463 2.024L6.97 1.53a.75.75 0 0 1 0-1.06m3.815 3.016a.75.75 0 0 1 1.056-.096a6 6 0 0 1-3.304 10.586l.493.494a.75.75 0 1 1-1.06 1.06l-1.75-1.75a.75.75 0 0 1 0-1.06l1.75-1.75a.75.75 0 0 1 1.06 1.06l-.43.43a4.5 4.5 0 0 0 2.28-7.918a.75.75 0 0 1-.095-1.056`},null,-1)]])}var nf=K({name:`fluent-arrow-sync-16-filled`,render:tf}),rf={class:`flex items-center justify-between`},af={class:`cui-label`},of={class:`flex flex-col field-gap`},sf={class:`cui-label`},cf={class:`cui-label`},lf={class:`cui-label`},uf={key:0,class:`flex flex-col field-gap`},df={class:`cui-label`},ff={key:1,class:`flex flex-col field-gap`},pf={class:`cui-label`},mf=H({__name:`CameraSource`,props:{cameraId:{},cameraName:{},source:{},loading:{type:Boolean}},setup(e){let t=new Qt,n=e,{t:r}=ye(),{getSourceStatus:i,connect:a}=Ci(),o=Fn(),s=$e(),c=[`probe`,`preload`],{cameraId:l,cameraName:u,source:d,loading:f}=nr(n),p=J(!1),{data:m,isBusy:h}=t.probeCameraSourceQuery(u.value,d.value.name,{video:!0,audio:!0,microphone:!0});a();let g=G(()=>i(l.value,d.value.name)),ee=G(()=>{switch(g.value){case`connected`:return`success`;case`connecting`:return`warn`;case`error`:return`danger`;default:return`secondary`}}),y=G(()=>{switch(g.value){case`connected`:return r(`components.camera_table.online`);case`connecting`:return r(`components.camera_table.connecting`);case`error`:return r(`components.camera_table.error`);default:return r(`components.camera_table.idle`)}}),b=G(()=>!!(f.value||h.value)),ne=G(()=>m.value?.probe.consumers.filter(e=>!c.includes(e.format_name)).length||0),x=G(()=>re(`video`)),S=G(()=>re(`audio`));function re(e){let t=(m.value?.probe.producers??[]).flatMap(e=>e.receivers??[]).filter(t=>t.codec.codec_type===e).map(e=>e.codec.codec_name);return[...new Set(t)]}async function ie(){if(!p.value){p.value=!0;try{let e=await Tt({cameraname:u.value,sourcename:d.value.name,probeConfig:{video:!0,audio:!0,microphone:!0},force:!0});o.setQueryData([`cameras`,u.value,`probe`,d.value.name],e)}catch{s.add({severity:`error`,detail:r(`components.toast.probe_failed`),life:3e3})}finally{p.value=!1}}}return(e,t)=>{let n=Mr,r=te,i=_,a=wr,o=Er,s=qr,c=dn,l=v;return L(),q(V,null,[X(`div`,rf,[X(`label`,af,z(e.$t(`components.form.label.stream_status`)),1),Z(n,{severity:$(ee),value:$(y)},null,8,[`severity`,`value`])]),X(`div`,of,[X(`label`,sf,z(e.$t(`components.form.label.connections`)),1),Z(o,null,{default:Y(()=>[Z(r,{value:$(ne),loading:$(b),readonly:``,type:`text`},null,8,[`value`,`loading`]),Z(a,null,{default:Y(()=>[Xn((L(),U(i,{severity:`secondary`,text:``,loading:$(p),disabled:$(b),onClick:ie},{icon:Y(()=>[Z($(nf),{class:`w-4 h-4`})]),_:1},8,[`loading`,`disabled`])),[[l,e.$t(`components.form.button.reload`),void 0,{left:!0}]])]),_:1})]),_:1}),Z(s,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.connections`)),1)]),_:1})]),(L(!0),q(V,null,M($(x),(t,n)=>(L(),q(`div`,{key:n,class:`flex flex-col field-gap`},[X(`label`,cf,z(e.$t(`components.form.label.video_codec`)),1),Z(o,null,{default:Y(()=>[Z(r,{"model-value":t,loading:$(b),readonly:``,type:`text`},null,8,[`model-value`,`loading`])]),_:2},1024),n===$(x).length-1?(L(),U(s,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.video_codec`)),1)]),_:1})):W(``,!0)]))),128)),(L(!0),q(V,null,M($(S),(t,n)=>(L(),q(`div`,{key:n,class:`flex flex-col field-gap`},[X(`label`,lf,z(e.$t(`components.form.label.audio_codec`)),1),Z(o,null,{default:Y(()=>[Z(r,{"model-value":t,loading:$(b),readonly:``,type:`text`},null,8,[`model-value`,`loading`])]),_:2},1024),n===$(S).length-1?(L(),U(s,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.audio_codec`)),1)]),_:1})):W(``,!0)]))),128)),$(d).role===`snapshot`?W(``,!0):(L(),q(`div`,uf,[X(`label`,df,z(e.$t(`components.form.label.rtsp_url`)),1),Z(o,null,{default:Y(()=>[Z(r,{"model-value":$(m)?.rtspUrl,loading:$(b),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),Z(a,null,{default:Y(()=>[Z(c,{"action-text":e.$t(`components.form.tooltip.copied`),icon:$(Nt),"button-props":{severity:`secondary`,disabled:!$(m)?.rtspUrl,loading:$(b),text:!0},onAction:t[0]||=e=>$(Ut)($(m).rtspUrl)},null,8,[`action-text`,`icon`,`button-props`])]),_:1})]),_:1}),Z(s,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.rtsp_url`)),1)]),_:1})])),$(d).role===`snapshot`?W(``,!0):(L(),q(`div`,ff,[X(`label`,pf,z(e.$t(`components.form.label.onvif_url`)),1),Z(o,null,{default:Y(()=>[Z(r,{"model-value":$(m)?.onvifUrl,loading:$(b),readonly:``,type:`text`},null,8,[`model-value`,`loading`]),Z(a,null,{default:Y(()=>[Z(c,{"action-text":e.$t(`components.form.tooltip.copied`),icon:$(Nt),"button-props":{severity:`secondary`,disabled:!$(m)?.onvifUrl,loading:$(b),text:!0},onAction:t[1]||=e=>$(Ut)($(m).onvifUrl)},null,8,[`action-text`,`icon`,`button-props`])]),_:1})]),_:1}),Z(s,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.onvif_url`)),1)]),_:1})]))],64)}}}),hf={class:`flex gap-2 items-center w-full`},gf={class:`text-color font-normal`},_f={class:`flex flex-col gap-6`},vf=[`for`],yf=[`for`],bf={class:`w-full flex flex-col gap-2`},xf={class:`flex items-center gap-4`},Sf={class:`flex flex-col field-switch-gap`},Cf=[`for`],wf={class:`flex items-center gap-4`},Tf={class:`flex flex-col field-switch-gap`},Ef=[`for`],Df={class:`flex items-center gap-4`},Of={class:`flex flex-col field-switch-gap`},kf=[`for`],Af={class:`flex items-center gap-4`},jf={class:`flex flex-col field-switch-gap`},Mf=[`for`],Nf=[`for`],Pf={class:`flex flex-col gap-6`},Ff={class:`flex flex-col field-gap`},If=[`for`],Lf={class:`w-full flex items-center justify-center my-3`},Rf=H({__name:`Sources`,props:Pn({camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:Pn([`close`],[`update:modelValue`]),setup(e){let t=e,n=An(e,`modelValue`),{t:r}=ye(),i=Qe(),{camera:a,loading:o}=nr(t),s=J([`high-resolution`,`mid-resolution`,`low-resolution`,`snapshot`]);function c(e){return e.name.replace(/ /g,`_`).toLowerCase()}function l(e){let t=[{label:r(`components.form.label.none`),value:void 0}],i=n.value.sources[e],a=n.value;for(let e of a.sources)e.role!==`snapshot`&&e._id!==i._id&&(!e.name||!e._id||t.push({label:e.name,value:e._id}));return t}function u(e){return n.value.sources[e].childSourceId}function d(e,t){t==null?n.value.sources[e].childSourceId=null:n.value.sources[e].childSourceId=t}function f(e){n.value.sources[e].urls.push(``)}function p(e){let t=n.value.sources[e];i.openTextDialog({data:{title:r(`components.camera_options.source_delete`),contentText:r(`components.camera_options.source_delete_confirm`,{name:c(t)}),confirmText:r(`components.form.button.remove`),confirmButtonProps:{severity:`danger`}},onConfirm:()=>{n.value.sources.splice(e,1)}})}function m(e,t){n.value.sources[e].urls.splice(t,1)}function h(e,t){e.role=t,t===`snapshot`&&(e.useForSnapshot=!1,e.hotMode=!1,e.preload=!1)}function g(){n.value&&n.value.sources.push({_id:``,name:``,role:null,urls:[],useForSnapshot:!1,hotMode:!0,preload:!0,muted:!1})}return(e,t)=>{let r=Jr,i=_,ee=Tr,v=te,y=Er,b=qr,ne=mf,x=Ir,S=Cr,re=wr,ie=Lr,ae=yr,C=br,w=ui;return L(),q(V,null,[Z(C,{multiple:``,class:`p-4`},{default:Y(()=>[(L(!0),q(V,null,M(n.value.sources,(t,g)=>(L(),U(ae,{key:g,value:g},{default:Y(()=>[Z(ee,{class:R({"px-0 pt-0":g===0,"px-0":g!==0})},{default:Y(()=>[X(`div`,hf,[X(`span`,gf,z(e.$t(`components.camera_options.source`)+`: `+c(t)),1),Z(i,{text:``,rounded:``,loading:$(o),disabled:n.value.sources.length<2,severity:`danger`,class:`cui-icon-md ml-auto mr-2`,onClick:Kn(e=>p(g),[`stop`])},{icon:Y(()=>[Z(r,{width:`100%`,height:`100%`})]),_:1},8,[`loading`,`disabled`,`onClick`])])]),_:2},1032,[`class`]),Z(ie,{pt:{content:{class:`px-0`}}},{default:Y(()=>[X(`div`,_f,[Z($(P),{modelValue:t.name,"onUpdate:modelValue":e=>t.name=e,modelModifiers:{trim:!0},name:`sources[${g}].name`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:n,errors:r})=>[X(`label`,{for:`sources[${g}].name`,class:`cui-label`},z(e.$t(`components.form.label.source_name`)),9,vf),Z(y,null,{default:Y(()=>[Z(v,Jn({ref_for:!0},n,{invalid:r.length>0,loading:$(o),readonly:$(a).sources.some(e=>e.name===t.name),type:`text`}),null,16,[`invalid`,`loading`,`readonly`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`sources[${g}].name`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),r.length?W(``,!0):(L(),U(b,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.source_name`)),1)]),_:1}))]),_:2},1032,[`modelValue`,`onUpdate:modelValue`,`name`]),t._id?(L(),U(ne,{key:0,"camera-id":$(a)._id,"camera-name":$(a).name,source:t,loading:$(o)},null,8,[`camera-id`,`camera-name`,`source`,`loading`])):W(``,!0),Z($(P),{"model-value":t.role,name:`sources[${g}].role`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:r})=>[X(`label`,{for:`sources[${g}].role`,class:`cui-label`},z(e.$t(`components.form.label.source_role`)),9,yf),Z(y,null,{default:Y(()=>[Z(x,{"model-value":t.role,options:$(s).filter(e=>!n.value.sources.some(n=>n.role===e&&n._id!==t._id)),invalid:r.length>0,loading:$(o),onValueChange:e=>h(t,e)},null,8,[`model-value`,`options`,`invalid`,`loading`,`onValueChange`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`sources[${g}].role`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),r.length?W(``,!0):(L(),U(b,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.source_role`)),1)]),_:1}))]),_:2},1032,[`model-value`,`name`]),X(`div`,bf,[t.role!==`snapshot`&&n.value.sources.length>1?(L(),U($(P),{key:0,"model-value":t.useForSnapshot,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${g}].useForSnapshot`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:r,errors:i})=>[X(`div`,xf,[X(`div`,Sf,[X(`label`,{for:`sources[${g}].useForSnapshot`,class:`cui-label-switch`},z(e.$t(`components.form.label.use_for_snapshot`)),9,Cf),Z(b,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.use_for_snapshot`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`sources[${g}].useForSnapshot`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Z(S,Jn({"model-value":t.useForSnapshot},{ref_for:!0},r,{invalid:i.length>0,loading:$(o),disabled:n.value.sources.some(e=>(e.useForSnapshot||e.role===`snapshot`)&&e._id!==t._id),class:`ml-auto shrink-0`,onValueChange:e=>t.useForSnapshot=e}),null,16,[`model-value`,`invalid`,`loading`,`disabled`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`])):W(``,!0),t.role===`snapshot`?W(``,!0):(L(),U($(P),{key:1,"model-value":t.hotMode,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${g}].hotMode`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:r})=>[X(`div`,wf,[X(`div`,Tf,[X(`label`,{for:`sources[${g}].hotMode`,class:`cui-label-switch`},z(e.$t(`components.form.label.hot_mode`)),9,Ef),Z(b,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.hot_mode`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`sources[${g}].hotMode`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Z(S,Jn({"model-value":t.hotMode},{ref_for:!0},n,{invalid:r.length>0,loading:$(o),class:`ml-auto shrink-0`,onValueChange:e=>t.hotMode=e}),null,16,[`model-value`,`invalid`,`loading`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`])),t.role===`snapshot`?W(``,!0):(L(),U($(P),{key:2,"model-value":t.preload,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${g}].preload`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:r})=>[X(`div`,Df,[X(`div`,Of,[X(`label`,{for:`sources[${g}].preload`,class:`cui-label-switch`},z(e.$t(`components.form.label.preload`)),9,kf),Z(b,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.preload`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`sources[${g}].preload`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Z(S,Jn({"model-value":t.preload},{ref_for:!0},n,{invalid:r.length>0,loading:$(o),class:`ml-auto shrink-0`,onValueChange:e=>t.preload=e}),null,16,[`model-value`,`invalid`,`loading`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`])),t.role===`snapshot`?W(``,!0):(L(),U($(P),{key:3,"model-value":t.muted,value:!0,"unchecked-value":!1,type:`checkbox`,name:`sources[${g}].muted`,as:`div`,class:`flex flex-col field-gap cui-toggle-switch`},{default:Y(({field:n,errors:r})=>[X(`div`,Af,[X(`div`,jf,[X(`label`,{for:`sources[${g}].muted`,class:`cui-label-switch`},z(e.$t(`components.form.label.muted`)),9,Mf),Z(b,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-switch-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.muted`)),1)]),_:1}),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`sources[${g}].muted`,class:`cui-input-switch-error`},null,8,[`name`])]),_:2},1024)]),Z(S,Jn({"model-value":t.muted},{ref_for:!0},n,{invalid:r.length>0,loading:$(o),class:`ml-auto shrink-0`,onValueChange:e=>t.muted=e}),null,16,[`model-value`,`invalid`,`loading`,`onValueChange`])])]),_:2},1032,[`model-value`,`name`]))]),t.role===`snapshot`?W(``,!0):(L(),U($(P),{key:1,"model-value":u(g),name:`sources[${g}].childSourceId`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({errors:t})=>[X(`label`,{for:`sources[${g}].childSourceId`,class:`cui-label`},z(e.$t(`components.form.label.pip_source`)),9,Nf),Z(y,null,{default:Y(()=>[Z(x,{"model-value":u(g),options:l(g),"option-label":`label`,"option-value":`value`,invalid:t.length>0,loading:$(o),placeholder:e.$t(`components.form.label.none`),"show-clear":``,onValueChange:e=>d(g,e)},null,8,[`model-value`,`options`,`invalid`,`loading`,`placeholder`,`onValueChange`])]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`sources[${g}].childSourceId`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024),t.length?W(``,!0):(L(),U(b,{key:0,severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.pip_source`)),1)]),_:1}))]),_:2},1032,[`model-value`,`name`])),X(`div`,Pf,[X(`div`,Ff,[X(`label`,{for:`sources[${g}].urls[]`,class:`cui-label`},z(e.$t(`components.form.label.sources`)),9,If),Z(b,{severity:`secondary`,variant:`simple`,size:`small`,class:`cui-input-hint`},{default:Y(()=>[B(z(e.$t(`components.form.hint.source_urls`)),1)]),_:1})]),(L(!0),q(V,null,M(t.urls,(e,n)=>(L(),U($(P),{key:n,modelValue:t.urls[n],"onUpdate:modelValue":e=>t.urls[n]=e,modelModifiers:{trim:!0},name:`sources[${g}].urls[${n}]`,as:`div`,class:`flex flex-col field-gap`},{default:Y(({field:e,errors:a})=>[Z(y,null,{default:Y(()=>[Z(v,Jn({ref_for:!0},e,{invalid:a.length>0,loading:$(o),type:`text`}),null,16,[`invalid`,`loading`]),t.urls.length>1?(L(),U(re,{key:0},{default:Y(()=>[Z(i,{text:``,severity:`secondary`,loading:$(o),class:`cui-icon-md`,onClick:e=>m(g,n)},{icon:Y(()=>[Z(r,{width:`100%`,height:`100%`})]),_:1},8,[`loading`,`onClick`])]),_:2},1024)):W(``,!0)]),_:2},1024),Z(I,{name:`fade`},{default:Y(()=>[Z($(N),{name:`sources[${g}].urls[${n}]`,class:`cui-input-error`},null,8,[`name`])]),_:2},1024)]),_:2},1032,[`modelValue`,`onUpdate:modelValue`,`name`]))),128)),Z(i,{loading:$(o),label:e.$t(`components.form.button.add_source`),class:`ml-auto cui-button-medium`,onClick:e=>f(g)},null,8,[`loading`,`label`,`onClick`])])])]),_:2},1024)]),_:2},1032,[`value`]))),128))]),_:1}),X(`div`,Lf,[Z(i,{text:``,rounded:``,loading:$(o),class:`cui-icon-xl`,onClick:g},{icon:Y(()=>[Z(w,{width:`100%`,height:`100%`})]),_:1},8,[`loading`])])],64)}}}),zf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Bf(e,t){return L(),q(`svg`,zf,[...t[0]||=[X(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M10 17h.01M10 7v6m4-7h2a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2m8-4v-4M6 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2`},null,-1)]])}var Vf=K({name:`lucide-battery-warning`,render:Bf}),Hf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Uf(e,t){return L(),q(`svg`,Hf,[...t[0]||=[X(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[X(`path`,{d:`M22 14v-4M6 14v-4`}),X(`rect`,{width:`16`,height:`12`,x:`2`,y:`6`,rx:`2`})],-1)]])}var Wf=K({name:`lucide-battery-low`,render:Uf}),Gf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Kf(e,t){return L(),q(`svg`,Gf,[...t[0]||=[X(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[X(`path`,{d:`M10 14v-4m12 4v-4M6 14v-4`}),X(`rect`,{width:`16`,height:`12`,x:`2`,y:`6`,rx:`2`})],-1)]])}var qf=K({name:`lucide-battery-medium`,render:Kf}),Jf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Yf(e,t){return L(),q(`svg`,Jf,[...t[0]||=[X(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`},[X(`path`,{d:`M10 10v4m4-4v4m8 0v-4M6 10v4`}),X(`rect`,{width:`16`,height:`12`,x:`2`,y:`6`,rx:`2`})],-1)]])}var Xf=K({name:`lucide-battery-full`,render:Yf}),Zf={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Qf(e,t){return L(),q(`svg`,Zf,[...t[0]||=[X(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`m11 7l-3 5h4l-3 5m5.856-11H16a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.935M22 14v-4M5.14 18H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2.936`},null,-1)]])}var $f=K({name:`lucide-battery-charging`,render:Qf}),ep={class:`cui-battery-info__header`},tp={class:`cui-battery-info__icon`},np={class:`cui-battery-info__info`},rp={key:0,class:`cui-battery-info__label`},ip={class:`cui-battery-info__bar`},ap=Xt(H({__name:`CuiBatteryInfo`,props:{level:{default:100},charging:{default:`NOT_CHARGING`},low:{type:Boolean,default:!1},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},setup(e){let t=e,{t:n}=ye(),{level:r,label:i,disabled:a,size:o,charging:s,low:c}=nr(t),l=G(()=>s.value===`CHARGING`),u=G(()=>s.value===`FULL`||r.value===100),d=G(()=>c.value||r.value<=20),f=G(()=>s.value===`CHARGING`?n(`components.battery_info.charging`):s.value===`FULL`?n(`components.battery_info.fully_charged`):s.value===`NOT_CHARGEABLE`?n(`components.battery_info.not_chargeable`):r.value<=10?n(`components.battery_info.critically_low`):r.value<=20?n(`components.battery_info.low`):n(`components.battery_info.ready`)),p=G(()=>l.value?`cui-battery-info__status--charging`:u.value?`cui-battery-info__status--full`:r.value<=10?`cui-battery-info__status--critical`:d.value?`cui-battery-info__status--low`:``),m=G(()=>l.value?`cui-battery-info__level--charging`:u.value?`cui-battery-info__level--full`:r.value<=10?`cui-battery-info__level--critical`:d.value?`cui-battery-info__level--low`:``),h=G(()=>({color:`rgb(59, 130, 246)`,filter:`drop-shadow(0 0 6px rgba(59, 130, 246, 0.5))`})),g=G(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.5))`})),ee=G(()=>({color:`rgb(34, 197, 94)`})),te=G(()=>({color:`rgb(234, 179, 8)`})),_=G(()=>({color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 6px rgba(239, 68, 68, 0.5))`})),v=G(()=>{let e=`rgb(34, 197, 94)`;return l.value?e=`rgb(59, 130, 246)`:r.value<=10?e=`rgb(239, 68, 68)`:r.value<=20&&(e=`rgb(234, 179, 8)`),{width:`${r.value}%`,backgroundColor:e}});return(e,t)=>{let n=$f,s=Xf,c=qf,u=Wf,y=Vf;return L(),q(`div`,{class:R([`cui-battery-info`,[`cui-battery-info--${$(o)}`,{"cui-battery-info--disabled":$(a),"cui-battery-info--low":$(d),"cui-battery-info--charging":$(l)}]])},[X(`div`,ep,[X(`div`,tp,[$(l)?(L(),U(n,{key:0,class:`cui-battery-info__icon-svg`,style:Q($(h))},null,8,[`style`])):$(r)>=90?(L(),U(s,{key:1,class:`cui-battery-info__icon-svg`,style:Q($(g))},null,8,[`style`])):$(r)>=50?(L(),U(c,{key:2,class:`cui-battery-info__icon-svg`,style:Q($(ee))},null,8,[`style`])):$(r)>=20?(L(),U(u,{key:3,class:`cui-battery-info__icon-svg`,style:Q($(te))},null,8,[`style`])):(L(),U(y,{key:4,class:`cui-battery-info__icon-svg cui-battery-info__icon-svg--critical`,style:Q($(_))},null,8,[`style`]))]),X(`div`,np,[$(i)?(L(),q(`span`,rp,z($(i)),1)):W(``,!0),X(`span`,{class:R([`cui-battery-info__status`,$(p)])},z($(f)),3)]),X(`div`,{class:R([`cui-battery-info__level`,$(m)])},z($(r))+`%`,3)]),X(`div`,ip,[X(`div`,{class:`cui-battery-info__bar-fill`,style:Q($(v))},null,4)])],2)}}}),[[`__scopeId`,`data-v-c181f3d4`]]),op={class:`cui-humidity-info__header`},sp={class:`cui-humidity-info__icon`},cp={class:`cui-humidity-info__info`},lp={key:0,class:`cui-humidity-info__label`},up=Xt(H({__name:`CuiHumidityInfo`,props:{current:{},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},setup(e){let{label:t,current:n,disabled:r,size:i}=nr(e),a=G(()=>n.value==null?`rgb(156, 163, 175)`:n.value<30?`rgb(251, 146, 60)`:n.value<=60?`rgb(34, 197, 94)`:`rgb(59, 130, 246)`),o=G(()=>({color:a.value,filter:`drop-shadow(0 0 6px ${a.value.replace(`rgb`,`rgba`).replace(`)`,`, 0.5)`)})`})),s=G(()=>({color:a.value}));return(e,c)=>{let l=Jt;return L(),q(`div`,{class:R([`cui-humidity-info`,[`cui-humidity-info--${$(i)}`,{"cui-humidity-info--disabled":$(r)}]])},[X(`div`,op,[X(`div`,sp,[Z(l,{class:`cui-humidity-info__icon-svg`,style:Q($(o))},null,8,[`style`])]),X(`div`,cp,[$(t)?(L(),q(`span`,lp,z($(t)),1)):W(``,!0),X(`span`,{class:`cui-humidity-info__status`,style:Q({color:$(a)})},z($(n)==null?`--`:`${$(n)}%`),5)]),X(`div`,{class:`cui-humidity-info__value`,style:Q($(s))},z($(n)==null?`--`:`${$(n)}%`),5)])],2)}}}),[[`__scopeId`,`data-v-1f41d794`]]),dp={class:`cui-temperature-info__header`},fp={class:`cui-temperature-info__icon`},pp={class:`cui-temperature-info__info`},mp={key:0,class:`cui-temperature-info__label`},hp=Xt(H({__name:`CuiTemperatureInfo`,props:{current:{},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},setup(e){let{label:t,current:n,disabled:r,size:i}=nr(e),a=G(()=>n.value==null?`rgb(156, 163, 175)`:n.value<5?`rgb(59, 130, 246)`:n.value<15?`rgb(6, 182, 212)`:n.value<25?`rgb(34, 197, 94)`:n.value<35?`rgb(251, 146, 60)`:`rgb(239, 68, 68)`),o=G(()=>({color:a.value,filter:`drop-shadow(0 0 6px ${a.value.replace(`rgb`,`rgba`).replace(`)`,`, 0.5)`)})`})),s=G(()=>({color:a.value}));return(e,c)=>{let l=rn;return L(),q(`div`,{class:R([`cui-temperature-info`,[`cui-temperature-info--${$(i)}`,{"cui-temperature-info--disabled":$(r)}]])},[X(`div`,dp,[X(`div`,fp,[Z(l,{class:`cui-temperature-info__icon-svg`,style:Q($(o))},null,8,[`style`])]),X(`div`,pp,[$(t)?(L(),q(`span`,mp,z($(t)),1)):W(``,!0),X(`span`,{class:`cui-temperature-info__status`,style:Q({color:$(a)})},z($(n)==null?`--`:`${$(n)}°C`),5)]),X(`div`,{class:`cui-temperature-info__value`,style:Q($(s))},z($(n)==null?`--`:`${$(n)}°C`),5)])],2)}}}),[[`__scopeId`,`data-v-0edddec9`]]),gp={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function _p(e,t){return L(),q(`svg`,gp,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M20 9v11h-2v-9H2v9H0V9l10-4zm-3 3H3v2h14zm0 3H3v2h14zm5 0v-5h2v5zm0 4v-2h2v2z`},null,-1)]])}var vp=K({name:`mdi-garage-alert-variant`,render:_p}),yp=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}({}),bp=function(e){return e[e.Open=0]=`Open`,e[e.Closed=1]=`Closed`,e}({}),xp={currentState:1,targetState:1,obstructionDetected:!1,disabled:!1,size:`medium`},Sp={class:`cui-garage-control__header`},Cp={class:`cui-garage-control__icon`},wp={key:3,class:`cui-garage-control__obstruction`},Tp={class:`cui-garage-control__info`},Ep={key:0,class:`cui-garage-control__label`},Dp=Xt(H({__name:`CuiGarageControl`,props:En({currentState:{},targetState:{},obstructionDetected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},xp),emits:[`update:targetState`],setup(e,{emit:t}){let n=e,r=t,{t:i}=ye(),{currentState:a}=nr(n),o=G(()=>a.value===yp.Open||a.value===yp.Opening),s=G(()=>{switch(a.value){case yp.Open:return i(`components.garage_control.open`);case yp.Closed:return i(`components.garage_control.closed`);case yp.Opening:return i(`components.garage_control.opening`);case yp.Closing:return i(`components.garage_control.closing`);case yp.Stopped:return i(`components.garage_control.stopped`);default:return``}}),c=G(()=>{switch(a.value){case yp.Open:return`cui-garage-control__status--open`;case yp.Opening:case yp.Closing:return`cui-garage-control__status--transitioning`;case yp.Stopped:return`cui-garage-control__status--stopped`;default:return``}}),l=G(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.5))`})),u=G(()=>({color:`rgb(250, 204, 21)`,filter:`drop-shadow(0 0 8px rgba(250, 204, 21, 0.5))`})),d=G(()=>({color:`rgb(251, 146, 60)`}));function f(e){r(`update:targetState`,e?bp.Open:bp.Closed)}return(t,n)=>{let r=vp,i=vn,p=ct,m=Cr;return L(),q(`div`,{class:R([`cui-garage-control`,[`cui-garage-control--${e.size}`,{"cui-garage-control--disabled":e.disabled}]])},[X(`div`,Sp,[X(`div`,Cp,[$(a)===$(yp).Stopped?(L(),U(r,{key:0,class:`cui-garage-control__icon-svg`,style:Q($(d))},null,8,[`style`])):$(a)===$(yp).Open||$(a)===$(yp).Opening?(L(),U(i,{key:1,class:`cui-garage-control__icon-svg`,style:Q($(a)===$(yp).Open?$(l):$(u))},null,8,[`style`])):(L(),U(p,{key:2,class:`cui-garage-control__icon-svg`,style:Q($(a)===$(yp).Closing?$(u):void 0)},null,8,[`style`])),e.obstructionDetected?(L(),q(`span`,wp)):W(``,!0)]),X(`div`,Tp,[e.label?(L(),q(`span`,Ep,z(e.label),1)):W(``,!0),X(`span`,{class:R([`cui-garage-control__status`,$(c)])},z($(s)),3)]),Z(m,{"model-value":$(o),disabled:e.disabled,class:`ml-auto shrink-0`,"onUpdate:modelValue":f},null,8,[`model-value`,`disabled`])])],2)}}}),[[`__scopeId`,`data-v-4c6505c2`]]),Op={detected:!1,disabled:!1,size:`medium`},kp={class:`cui-leak-sensor__header`},Ap={class:`cui-leak-sensor__icon`},jp={class:`cui-leak-sensor__info`},Mp={key:0,class:`cui-leak-sensor__label`},Np=Xt(H({__name:`CuiLeakSensor`,props:En({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Op),setup(e){let t=e,{t:n}=ye(),{detected:r}=nr(t),i=G(()=>({color:`rgb(59, 130, 246)`,filter:`drop-shadow(0 0 6px rgba(59, 130, 246, 0.5))`})),a=G(()=>({color:`var(--text-secondary-color)`})),o=G(()=>r.value?`cui-leak-sensor__status--detected`:`cui-leak-sensor__status--clear`),s=G(()=>r.value?`cui-leak-sensor__indicator--detected`:`cui-leak-sensor__indicator--clear`);return(t,c)=>{let l=xn,u=Ot;return L(),q(`div`,{class:R([`cui-leak-sensor`,[`cui-leak-sensor--${e.size}`,{"cui-leak-sensor--disabled":e.disabled,"cui-leak-sensor--clear":!$(r),"cui-leak-sensor--detected":$(r)}]])},[X(`div`,kp,[X(`div`,Ap,[$(r)?(L(),U(l,{key:0,class:`cui-leak-sensor__icon-svg`,style:Q($(i))},null,8,[`style`])):(L(),U(u,{key:1,class:`cui-leak-sensor__icon-svg`,style:Q($(a))},null,8,[`style`]))]),X(`div`,jp,[e.label?(L(),q(`span`,Mp,z(e.label),1)):W(``,!0),X(`span`,{class:R([`cui-leak-sensor__status`,$(o)])},z($(r)?$(n)(`components.leak_sensor.detected`):$(n)(`components.leak_sensor.clear`)),3)]),X(`div`,{class:R([`cui-leak-sensor__indicator`,$(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-14a46a3f`]]),Pp={detected:!1,disabled:!1,size:`medium`},Fp={class:`cui-smoke-sensor__header`},Ip={class:`cui-smoke-sensor__icon`},Lp={class:`cui-smoke-sensor__info`},Rp={key:0,class:`cui-smoke-sensor__label`},zp=Xt(H({__name:`CuiSmokeSensor`,props:En({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Pp),setup(e){let t=e,{t:n}=ye(),{detected:r}=nr(t),i=G(()=>({color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 6px rgba(239, 68, 68, 0.5))`})),a=G(()=>({color:`var(--text-secondary-color)`})),o=G(()=>r.value?`cui-smoke-sensor__status--detected`:`cui-smoke-sensor__status--clear`),s=G(()=>r.value?`cui-smoke-sensor__indicator--detected`:`cui-smoke-sensor__indicator--clear`);return(t,c)=>{let l=Ct,u=gn;return L(),q(`div`,{class:R([`cui-smoke-sensor`,[`cui-smoke-sensor--${e.size}`,{"cui-smoke-sensor--disabled":e.disabled,"cui-smoke-sensor--clear":!$(r),"cui-smoke-sensor--detected":$(r)}]])},[X(`div`,Fp,[X(`div`,Ip,[$(r)?(L(),U(l,{key:0,class:`cui-smoke-sensor__icon-svg`,style:Q($(i))},null,8,[`style`])):(L(),U(u,{key:1,class:`cui-smoke-sensor__icon-svg`,style:Q($(a))},null,8,[`style`]))]),X(`div`,Lp,[e.label?(L(),q(`span`,Rp,z(e.label),1)):W(``,!0),X(`span`,{class:R([`cui-smoke-sensor__status`,$(o)])},z($(r)?$(n)(`components.smoke_sensor.detected`):$(n)(`components.smoke_sensor.clear`)),3)]),X(`div`,{class:R([`cui-smoke-sensor__indicator`,$(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-4db50b68`]]),Bp={detected:!1,disabled:!1,size:`medium`},Vp={class:`cui-occupancy-sensor__header`},Hp={class:`cui-occupancy-sensor__icon`},Up={class:`cui-occupancy-sensor__info`},Wp={key:0,class:`cui-occupancy-sensor__label`},Gp=Xt(H({__name:`CuiOccupancySensor`,props:En({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Bp),setup(e){let t=e,{t:n}=ye(),{detected:r}=nr(t),i=G(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.5))`})),a=G(()=>({color:`var(--text-secondary-color)`})),o=G(()=>r.value?`cui-occupancy-sensor__status--occupied`:`cui-occupancy-sensor__status--empty`),s=G(()=>r.value?`cui-occupancy-sensor__indicator--occupied`:`cui-occupancy-sensor__indicator--empty`);return(t,c)=>{let l=Ht,u=zt;return L(),q(`div`,{class:R([`cui-occupancy-sensor`,[`cui-occupancy-sensor--${e.size}`,{"cui-occupancy-sensor--disabled":e.disabled,"cui-occupancy-sensor--empty":!$(r),"cui-occupancy-sensor--occupied":$(r)}]])},[X(`div`,Vp,[X(`div`,Hp,[$(r)?(L(),U(l,{key:0,class:`cui-occupancy-sensor__icon-svg`,style:Q($(i))},null,8,[`style`])):(L(),U(u,{key:1,class:`cui-occupancy-sensor__icon-svg`,style:Q($(a))},null,8,[`style`]))]),X(`div`,Up,[e.label?(L(),q(`span`,Wp,z(e.label),1)):W(``,!0),X(`span`,{class:R([`cui-occupancy-sensor__status`,$(o)])},z($(r)?$(n)(`components.occupancy_sensor.occupied`):$(n)(`components.occupancy_sensor.empty`)),3)]),X(`div`,{class:R([`cui-occupancy-sensor__indicator`,$(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-8ca5a1ce`]]),Kp={detected:!1,disabled:!1,size:`medium`},qp={class:`cui-contact-sensor__header`},Jp={class:`cui-contact-sensor__icon`},Yp={class:`cui-contact-sensor__info`},Xp={key:0,class:`cui-contact-sensor__label`},Zp=Xt(H({__name:`CuiContactSensor`,props:En({detected:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Kp),setup(e){let t=e,{t:n}=ye(),{detected:r}=nr(t),i=G(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 6px rgba(34, 197, 94, 0.5))`})),a=G(()=>({color:`rgb(251, 146, 60)`,filter:`drop-shadow(0 0 8px rgba(251, 146, 60, 0.6))`})),o=G(()=>r.value?`cui-contact-sensor__status--closed`:`cui-contact-sensor__status--open`),s=G(()=>r.value?`cui-contact-sensor__indicator--closed`:`cui-contact-sensor__indicator--open`);return(t,c)=>{let l=cn,u=tn;return L(),q(`div`,{class:R([`cui-contact-sensor`,[`cui-contact-sensor--${e.size}`,{"cui-contact-sensor--disabled":e.disabled,"cui-contact-sensor--open":!$(r),"cui-contact-sensor--closed":$(r)}]])},[X(`div`,qp,[X(`div`,Jp,[$(r)?(L(),U(l,{key:0,class:`cui-contact-sensor__icon-svg`,style:Q($(i))},null,8,[`style`])):(L(),U(u,{key:1,class:`cui-contact-sensor__icon-svg`,style:Q($(a))},null,8,[`style`]))]),X(`div`,Yp,[e.label?(L(),q(`span`,Xp,z(e.label),1)):W(``,!0),X(`span`,{class:R([`cui-contact-sensor__status`,$(o)])},z($(r)?$(n)(`components.contact_sensor.closed`):$(n)(`components.contact_sensor.open`)),3)]),X(`div`,{class:R([`cui-contact-sensor__indicator`,$(s)])},null,2)])],2)}}}),[[`__scopeId`,`data-v-0cc50676`]]),Qp={ring:!1,disabled:!1,size:`medium`},$p={class:`cui-doorbell__header`},em={class:`cui-doorbell__icon`},tm={class:`cui-doorbell__info`},nm={key:0,class:`cui-doorbell__label`},rm=Xt(H({__name:`CuiDoorbellTrigger`,props:En({ring:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Qp),emits:[`update:ring`,`trigger`],setup(e,{emit:t}){let n=e,r=t,{t:i}=ye(),{ring:a}=nr(n),o=G(()=>a.value),s=G(()=>({color:`rgb(234, 179, 8)`,filter:`drop-shadow(0 0 10px rgba(234, 179, 8, 0.8))`}));function c(){r(`update:ring`,!0),r(`trigger`),setTimeout(()=>{r(`update:ring`,!1)},2e3)}return(t,n)=>{let r=Xe,a=wi,l=_;return L(),q(`div`,{class:R([`cui-doorbell`,[`cui-doorbell--${e.size}`,{"cui-doorbell--disabled":e.disabled,"cui-doorbell--ringing":$(o)}]])},[X(`div`,$p,[X(`div`,em,[$(o)?(L(),U(r,{key:0,class:`cui-doorbell__icon-svg cui-doorbell__icon-svg--ringing`,style:Q($(s))},null,8,[`style`])):(L(),U(r,{key:1,class:`cui-doorbell__icon-svg`}))]),X(`div`,tm,[e.label?(L(),q(`span`,nm,z(e.label),1)):W(``,!0),X(`span`,{class:R([`cui-doorbell__status`,{"cui-doorbell__status--ringing":$(o)}])},z($(o)?$(i)(`components.doorbell_trigger.ringing`):$(i)(`components.doorbell_trigger.ready`)),3)]),Z(l,{disabled:e.disabled||$(o),size:`small`,severity:`warn`,class:`cui-doorbell__button`,onClick:c},{icon:Y(()=>[Z(a,{class:`cui-doorbell__button-icon`})]),_:1},8,[`disabled`])])],2)}}}),[[`__scopeId`,`data-v-b227d18a`]]),im={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function am(e,t){return L(),q(`svg`,im,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`m17.75 4.09l-2.53 1.94l.91 3.06l-2.63-1.81l-2.63 1.81l.91-3.06l-2.53-1.94L12.44 4l1.06-3l1.06 3zm3.5 6.91l-1.64 1.25l.59 1.98l-1.7-1.17l-1.7 1.17l.59-1.98L15.75 11l2.06-.05L18.5 9l.69 1.95zm-2.28 4.95c.83-.08 1.72 1.1 1.19 1.85c-.32.45-.66.87-1.08 1.27C15.17 23 8.84 23 4.94 19.07c-3.91-3.9-3.91-10.24 0-14.14c.4-.4.82-.76 1.27-1.08c.75-.53 1.93.36 1.85 1.19c-.27 2.86.69 5.83 2.89 8.02a9.96 9.96 0 0 0 8.02 2.89m-1.64 2.02a12.08 12.08 0 0 1-7.8-3.47c-2.17-2.19-3.33-5-3.49-7.82c-2.81 3.14-2.7 7.96.31 10.98c3.02 3.01 7.84 3.12 10.98.31`},null,-1)]])}var om=K({name:`mdi-weather-night`,render:am}),sm={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function cm(e,t){return L(),q(`svg`,sm,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M13.34 8.17c-.93 0-1.69-.77-1.69-1.7a1.69 1.69 0 0 1 1.69-1.69c.94 0 1.7.76 1.7 1.69s-.76 1.7-1.7 1.7M10.3 19.93l-5.93-1.18l.34-1.7l4.15.85l1.35-6.86l-1.52.6v2.86H7v-3.96l4.4-1.87l.67-.08c.6 0 1.1.34 1.43.85l.86 1.35c.68 1.21 2.03 2.03 3.64 2.03v1.68c-1.86 0-3.56-.83-4.66-2.1l-.5 2.54l1.77 1.69V23h-1.69v-5.1l-1.78-1.69zM21 23h-2V3H6v13.11l-2-.42V1h17zM6 23H4v-3.22l2 .42z`},null,-1)]])}var lm=K({name:`mdi-exit-run`,render:cm}),um=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}({}),dm={class:`cui-security-system__header`},fm={class:`cui-security-system__icon`},pm={class:`cui-security-system__info`},mm={key:0,class:`cui-security-system__label`},hm={key:0,class:`cui-security-system__alarm`},gm={class:`cui-security-system__modes`},_m=[`disabled`],vm=[`disabled`],ym=[`disabled`],bm=[`disabled`],xm=Xt(H({__name:`CuiSecuritySystem`,props:{currentState:{default:um.Disarmed},targetState:{default:um.Disarmed},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},emits:[`update:currentState`,`update:targetState`],setup(e,{emit:t}){let n=e,r=t,{t:i}=ye(),{currentState:a,targetState:o}=nr(n),s=G({get:()=>a.value,set:e=>r(`update:currentState`,e)}),c=G({get:()=>o.value,set:e=>r(`update:targetState`,e)}),l=G(()=>s.value===um.AlarmTriggered),u=G(()=>s.value===um.StayArm||s.value===um.AwayArm||s.value===um.NightArm),d=G(()=>!l.value&&c.value!==s.value),f=G(()=>{if(d.value)return c.value===um.Disarmed?i(`components.security_system.status_disarming`):i(`components.security_system.status_arming`);switch(s.value){case um.StayArm:return i(`components.security_system.status_home_armed`);case um.AwayArm:return i(`components.security_system.status_away_armed`);case um.NightArm:return i(`components.security_system.status_night_armed`);case um.Disarmed:return i(`components.security_system.status_disarmed`);case um.AlarmTriggered:return i(`components.security_system.status_alarm`);default:return i(`components.security_system.status_unknown`)}}),p=G(()=>l.value?`cui-security-system__status--alarm`:d.value?`cui-security-system__status--transitioning`:u.value?`cui-security-system__status--armed`:`cui-security-system__status--disarmed`),m=G(()=>({color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 12px rgba(239, 68, 68, 0.8))`,animation:`pulse 0.5s ease-in-out infinite alternate`})),h=G(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.5))`}));function g(e){c.value=e}function ee(){s.value=c.value}return(t,n)=>{let r=_n,a=Ze,o=lt,s=mn,d=_,te=Ti,v=lm,y=om;return L(),q(`div`,{class:R([`cui-security-system`,[`cui-security-system--${e.size}`,{"cui-security-system--disabled":e.disabled}]])},[X(`div`,dm,[X(`div`,fm,[$(l)?(L(),U(r,{key:0,class:`cui-security-system__icon-svg`,style:Q($(m))},null,8,[`style`])):$(u)?(L(),U(a,{key:1,class:`cui-security-system__icon-svg`,style:Q($(h))},null,8,[`style`])):(L(),U(o,{key:2,class:`cui-security-system__icon-svg`}))]),X(`div`,pm,[e.label?(L(),q(`span`,mm,z(e.label),1)):W(``,!0),X(`span`,{class:R([`cui-security-system__status`,$(p)])},z($(f)),3)])]),$(l)?(L(),q(`div`,hm,[Z(s,{class:`cui-security-system__alarm-icon`}),X(`span`,null,z($(i)(`components.security_system.alarm_triggered`)),1),Z(d,{size:`small`,severity:`danger`,label:$(i)(`components.security_system.reset`),onClick:ee},null,8,[`label`])])):W(``,!0),X(`div`,gm,[X(`button`,{type:`button`,class:R([`cui-security-system__mode`,{"cui-security-system__mode--active":$(c)===$(um).Disarmed}]),disabled:e.disabled||$(l),onClick:n[0]||=e=>g($(um).Disarmed)},[Z(o,{class:`cui-security-system__mode-icon`}),X(`span`,null,z($(i)(`components.security_system.off`)),1)],10,_m),X(`button`,{type:`button`,class:R([`cui-security-system__mode`,{"cui-security-system__mode--active":$(c)===$(um).StayArm}]),disabled:e.disabled||$(l),onClick:n[1]||=e=>g($(um).StayArm)},[Z(te,{class:`cui-security-system__mode-icon`}),X(`span`,null,z($(i)(`components.security_system.home`)),1)],10,vm),X(`button`,{type:`button`,class:R([`cui-security-system__mode`,{"cui-security-system__mode--active":$(c)===$(um).AwayArm}]),disabled:e.disabled||$(l),onClick:n[2]||=e=>g($(um).AwayArm)},[Z(v,{class:`cui-security-system__mode-icon`}),X(`span`,null,z($(i)(`components.security_system.away`)),1)],10,ym),X(`button`,{type:`button`,class:R([`cui-security-system__mode`,{"cui-security-system__mode--active":$(c)===$(um).NightArm}]),disabled:e.disabled||$(l),onClick:n[3]||=e=>g($(um).NightArm)},[Z(y,{class:`cui-security-system__mode-icon`}),X(`span`,null,z($(i)(`components.security_system.night`)),1)],10,bm)])],2)}}}),[[`__scopeId`,`data-v-67cacde3`]]),Sm={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Cm(e,t){return L(),q(`svg`,Sm,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.84-5 6.7v2.07c4-.91 7-4.49 7-8.77s-3-7.86-7-8.77M16.5 12c0-1.77-1-3.29-2.5-4.03V16c1.5-.71 2.5-2.24 2.5-4M3 9v6h4l5 5V4L7 9z`},null,-1)]])}var wm=K({name:`mdi-volume-high`,render:Cm}),Tm={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Em(e,t){return L(),q(`svg`,Tm,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M6 6.9L3.87 4.78l1.41-1.41L7.4 5.5zM13 1v3h-2V1zm7.13 3.78L18 6.9l-1.4-1.4l2.12-2.13zM4.5 10.5v2h-3v-2zm15 0h3v2h-3zM6 20h12a2 2 0 0 1 2 2H4a2 2 0 0 1 2-2m6-15a6 6 0 0 1 6 6v8H6v-8a6 6 0 0 1 6-6m0 2a4 4 0 0 0-4 4v6h8v-6a4 4 0 0 0-4-4`},null,-1)]])}var Dm=K({name:`mdi-alarm-light-outline`,render:Em}),Om={active:!1,volume:100,hasVolume:!1,disabled:!1,size:`medium`},km={class:`cui-siren-control__header`},Am={class:`cui-siren-control__icon`},jm={key:0,class:`cui-siren-control__label`},Mm={key:0,class:`cui-siren-control__volume`},Nm={class:`cui-siren-control__volume-header`},Pm={class:`cui-siren-control__volume-value`},Fm=Xt(H({__name:`CuiSirenControl`,props:En({active:{type:Boolean},volume:{},hasVolume:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},Om),emits:[`update:active`,`update:volume`],setup(e,{emit:t}){let n=e,r=t,{active:a,volume:o,hasVolume:s}=nr(n),c=G({get:()=>a.value,set:e=>r(`update:active`,e)}),l=G({get:()=>o.value,set:e=>r(`update:volume`,e)}),u=G(()=>{let e=(s.value?o.value:100)/100;return{color:`rgb(239, 68, 68)`,filter:`drop-shadow(0 0 ${4+e*12}px rgba(239, 68, 68, ${.3+e*.7}))`,opacity:.4+e*.6}});return(t,n)=>{let r=mn,a=Dm,o=Cr,d=wm,f=i;return L(),q(`div`,{class:R([`cui-siren-control`,[`cui-siren-control--${e.size}`,{"cui-siren-control--disabled":e.disabled}]])},[X(`div`,km,[X(`div`,Am,[$(c)?(L(),U(r,{key:0,class:`cui-siren-control__icon-svg cui-siren-control__icon-svg--active`,style:Q($(u))},null,8,[`style`])):(L(),U(a,{key:1,class:`cui-siren-control__icon-svg`}))]),e.label?(L(),q(`span`,jm,z(e.label),1)):W(``,!0),Z(o,{modelValue:$(c),"onUpdate:modelValue":n[0]||=e=>Hn(c)?c.value=e:null,disabled:e.disabled,class:`cui-siren-control__toggle`},null,8,[`modelValue`,`disabled`])]),$(s)?(L(),q(`div`,Mm,[X(`div`,Nm,[Z(d,{class:`cui-siren-control__volume-icon`}),X(`span`,Pm,z($(l))+`%`,1)]),Z(f,{modelValue:$(l),"onUpdate:modelValue":n[1]||=e=>Hn(l)?l.value=e:null,min:0,max:100,step:1,disabled:e.disabled,class:`cui-siren-control__slider`},null,8,[`modelValue`,`disabled`])])):W(``,!0)],2)}}}),[[`__scopeId`,`data-v-7f88e563`]]),Im=function(e){return e[e.Secured=0]=`Secured`,e[e.Unsecured=1]=`Unsecured`,e[e.Unknown=2]=`Unknown`,e}({}),Lm={currentState:2,targetState:0,disabled:!1,size:`medium`},Rm={class:`cui-lock-control__header`},zm={class:`cui-lock-control__icon`},Bm={class:`cui-lock-control__info`},Vm={key:0,class:`cui-lock-control__label`},Hm=Xt(H({__name:`CuiLockControl`,props:En({currentState:{},targetState:{},label:{},disabled:{type:Boolean},size:{}},Lm),emits:[`update:targetState`],setup(e,{emit:t}){let n=e,r=t,{t:i}=ye(),{currentState:a,targetState:o}=nr(n),s=G(()=>o.value===Im.Secured),c=G(()=>a.value!==o.value&&a.value!==Im.Unknown),l=G(()=>{if(c.value)return o.value===Im.Secured?i(`components.lock.status_locking`):i(`components.lock.status_unlocking`);switch(a.value){case Im.Secured:return i(`components.lock.status_locked`);case Im.Unsecured:return i(`components.lock.status_unlocked`);default:return i(`components.lock.status_unknown`)}}),u=G(()=>c.value?`cui-lock-control__status--transitioning`:a.value===Im.Secured?`cui-lock-control__status--secured`:a.value===Im.Unsecured?`cui-lock-control__status--unsecured`:``),d=G(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 8px rgba(34, 197, 94, 0.5))`}));function f(e){r(`update:targetState`,e?Im.Secured:Im.Unsecured)}return(t,n)=>{let r=Mt,i=It,a=Cr;return L(),q(`div`,{class:R([`cui-lock-control`,[`cui-lock-control--${e.size}`,{"cui-lock-control--disabled":e.disabled}]])},[X(`div`,Rm,[X(`div`,zm,[$(s)?(L(),U(r,{key:0,class:`cui-lock-control__icon-svg`,style:Q($(d))},null,8,[`style`])):(L(),U(i,{key:1,class:`cui-lock-control__icon-svg`}))]),X(`div`,Bm,[e.label?(L(),q(`span`,Vm,z(e.label),1)):W(``,!0),X(`span`,{class:R([`cui-lock-control__status`,$(u)])},z($(l)),3)]),Z(a,{"model-value":$(s),disabled:e.disabled,class:`ml-auto shrink-0`,"onUpdate:modelValue":f},null,8,[`model-value`,`disabled`])])],2)}}}),[[`__scopeId`,`data-v-4b2a60ff`]]),Um={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Wm(e,t){return L(),q(`svg`,Um,[...t[0]||=[X(`path`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"stroke-width":`2`,d:`M18.36 6.64A9 9 0 0 1 20.77 15M6.16 6.16a9 9 0 1 0 12.68 12.68M12 2v4M2 2l20 20`},null,-1)]])}var Gm=K({name:`lucide-power-off`,render:Wm}),Km={class:`cui-switch-control__header`},qm={class:`cui-switch-control__icon`},Jm={key:0,class:`cui-switch-control__label`},Ym=Xt(H({__name:`CuiSwitchControl`,props:{on:{type:Boolean,default:!1},label:{},disabled:{type:Boolean,default:!1},size:{default:`medium`}},emits:[`update:on`],setup(e,{emit:t}){let n=e,r=t,{on:i,size:a}=nr(n),o=G({get:()=>i.value,set:e=>r(`update:on`,e)}),s=G(()=>({color:`rgb(34, 197, 94)`,filter:`drop-shadow(0 0 10px rgba(34, 197, 94, 0.7))`}));return(t,n)=>{let r=Kt,i=Gm,c=Cr;return L(),q(`div`,{class:R([`cui-switch-control`,[`cui-switch-control--${$(a)}`,{"cui-switch-control--disabled":e.disabled}]])},[X(`div`,Km,[X(`div`,qm,[$(o)?(L(),U(r,{key:0,class:`cui-switch-control__icon-svg cui-switch-control__icon-svg--on`,style:Q($(s))},null,8,[`style`])):(L(),U(i,{key:1,class:`cui-switch-control__icon-svg`}))]),e.label?(L(),q(`span`,Jm,z(e.label),1)):W(``,!0),Z(c,{modelValue:$(o),"onUpdate:modelValue":n[0]||=e=>Hn(o)?o.value=e:null,disabled:e.disabled,class:`cui-switch-control__toggle`},null,8,[`modelValue`,`disabled`])])],2)}}}),[[`__scopeId`,`data-v-86992927`]]),Xm={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Zm(e,t){return L(),q(`svg`,Xm,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M12 18V6a6 6 0 0 1 6 6a6 6 0 0 1-6 6m8-2.69L23.31 12L20 8.69V4h-4.69L12 .69L8.69 4H4v4.69L.69 12L4 15.31V20h4.69L12 23.31L15.31 20H20z`},null,-1)]])}var Qm=K({name:`mdi-brightness6`,render:Zm}),$m={on:!1,brightness:100,hasBrightness:!1,disabled:!1,size:`medium`},eh={class:`cui-light-control__header`},th={class:`cui-light-control__icon`},nh={key:0,class:`cui-light-control__label`},rh={key:0,class:`cui-light-control__brightness`},ih={class:`cui-light-control__brightness-header`},ah={class:`cui-light-control__brightness-value`},oh=Xt(H({__name:`CuiLightControl`,props:En({on:{type:Boolean},brightness:{},hasBrightness:{type:Boolean},label:{},disabled:{type:Boolean},size:{}},$m),emits:[`update:on`,`update:brightness`],setup(e,{emit:t}){let n=e,r=t,{on:a,brightness:o,hasBrightness:s}=nr(n),c=J(o.value>0?o.value:100),l=G({get:()=>a.value,set:e=>{r(`update:on`,e),e&&o.value===0&&r(`update:brightness`,c.value)}}),u=G({get:()=>o.value,set:e=>{e>0&&(c.value=e),r(`update:brightness`,e),e===0&&a.value?r(`update:on`,!1):e>0&&!a.value&&r(`update:on`,!0)}}),d=G(()=>{let e=(s.value?o.value:100)/100;return{color:`rgb(250, 204, 21)`,filter:`drop-shadow(0 0 ${4+e*12}px rgba(250, 204, 21, ${.3+e*.7}))`,opacity:.4+e*.6}});return(t,n)=>{let r=kt,a=dr,o=Cr,c=Qm,f=i;return L(),q(`div`,{class:R([`cui-light-control`,[`cui-light-control--${e.size}`,{"cui-light-control--disabled":e.disabled}]])},[X(`div`,eh,[X(`div`,th,[$(l)?(L(),U(r,{key:0,class:`cui-light-control__icon-svg cui-light-control__icon-svg--on`,style:Q($(d))},null,8,[`style`])):(L(),U(a,{key:1,class:`cui-light-control__icon-svg`}))]),e.label?(L(),q(`span`,nh,z(e.label),1)):W(``,!0),Z(o,{modelValue:$(l),"onUpdate:modelValue":n[0]||=e=>Hn(l)?l.value=e:null,disabled:e.disabled,class:`cui-light-control__toggle`},null,8,[`modelValue`,`disabled`])]),$(s)?(L(),q(`div`,rh,[X(`div`,ih,[Z(c,{class:`cui-light-control__brightness-icon`}),X(`span`,ah,z($(u))+`%`,1)]),Z(f,{modelValue:$(u),"onUpdate:modelValue":n[1]||=e=>Hn(u)?u.value=e:null,min:0,max:100,step:1,disabled:e.disabled,class:`cui-light-control__slider`},null,8,[`modelValue`,`disabled`])])):W(``,!0)],2)}}}),[[`__scopeId`,`data-v-231e0be1`]]),sh={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function ch(e,t){return L(),q(`svg`,sh,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`m5 11l1.5-4.5h11L19 11m-1.5 5a1.5 1.5 0 0 1-1.5-1.5a1.5 1.5 0 0 1 1.5-1.5a1.5 1.5 0 0 1 1.5 1.5a1.5 1.5 0 0 1-1.5 1.5m-11 0A1.5 1.5 0 0 1 5 14.5A1.5 1.5 0 0 1 6.5 13A1.5 1.5 0 0 1 8 14.5A1.5 1.5 0 0 1 6.5 16M18.92 6c-.2-.58-.76-1-1.42-1h-11c-.66 0-1.22.42-1.42 1L3 12v8a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-1h12v1a1 1 0 0 0 1 1h1a1 1 0 0 0 1-1v-8z`},null,-1)]])}var lh=K({name:`mdi-car`,render:ch}),uh={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function dh(e,t){return L(),q(`svg`,uh,[...t[0]||=[X(`path`,{fill:`currentColor`,d:`M17 22v-2h3v-3h2v3.5c0 .39-.16.74-.46 1.04s-.65.46-1.04.46zM7 22H3.5c-.39 0-.74-.16-1.04-.46S2 20.89 2 20.5V17h2v3h3zM17 2h3.5c.39 0 .74.16 1.04.46s.46.65.46 1.04V7h-2V4h-3zM7 2v2H4v3H2V3.5c0-.39.16-.74.46-1.04S3.11 2 3.5 2zm6 15.25l4-2.3v-4.59l-4 2.3zm-1-6.33l4-2.29l-4-2.35l-4 2.35zm-5 4.03l4 2.3v-4.59l-4-2.3zm11.23-7.36c.5.32.77.75.77 1.32v6.32c0 .57-.27 1-.77 1.32l-5.48 3.18q-.75.48-1.5 0l-5.48-3.18c-.5-.32-.77-.75-.77-1.32V8.91c0-.57.27-1 .77-1.32l5.48-3.18c.25-.13.5-.19.75-.19s.5.06.75.19z`},null,-1)]])}var fh=K({name:`mdi-cube-scan`,render:dh}),ph={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function mh(e,t){return L(),q(`svg`,ph,[...t[0]||=[X(`g`,{fill:`none`},[X(`path`,{d:`m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z`}),X(`path`,{fill:`currentColor`,d:`M13 2a3 3 0 0 1 .64 5.932l-.171.032l1.436 2.297l1.724-.69a1 1 0 0 1 .848 1.808l-.106.05l-1.723.689a2 2 0 0 1-2.343-.657l-.096-.14l-.163-.26l-.606 2.424a2 2 0 0 1-.256.595l-.09.13l1.653 1.228a2 2 0 0 1 .766 1.202l.029.182l.353 3.178H15a1 1 0 0 1 .117 1.993L15 22h-.91a1.1 1.1 0 0 1-1.074-.861l-.02-.117l-.442-3.979l-3.15-2.34a1 1 0 0 1-.154-.14a2 2 0 0 1-.723-1.891l.033-.157l.794-3.177l-1.57.47l-.835 2.508a1 1 0 0 1-1.928-.52l.03-.112l.836-2.508a2 2 0 0 1 1.17-1.23l.153-.053l3.437-1.031A3 3 0 0 1 13 2M9.6 15.2a1 1 0 0 1 .2 1.4l-1.216 1.622a1.5 1.5 0 0 1-2.032.348l-1.93-1.287a1 1 0 0 1-1.33-1.49l.495-.494a1.01 1.01 0 0 1 1.275-.127l2.206 1.471L8.2 15.4a1 1 0 0 1 1.4-.2`})],-1)]])}var hh=K({name:`mingcute-run-fill`,render:mh}),gh={detected:!1,disabled:!1,size:`medium`},_h={class:`cui-detection__header`},vh={class:`cui-detection__info`},yh={key:0,class:`cui-detection__label`},bh={key:0,class:`cui-detection__detections`},xh=Xt(H({__name:`CuiDetection`,props:En({type:{},label:{},detected:{type:Boolean},detections:{},size:{},disabled:{type:Boolean}},gh),setup(e){let t=e,{t:n}=ye(),{detected:r}=nr(t),i=G(()=>r.value?n(`components.detection.detected`):n(`components.detection.idle`));return(t,n)=>{let a=hh,o=fh,s=si,c=bn,l=lh;return L(),q(`div`,{class:R([`cui-detection`,[`cui-detection--${e.size}`,`cui-detection--${e.type}`,{"cui-detection--disabled":e.disabled,"cui-detection--detected":$(r)}]])},[X(`div`,_h,[X(`div`,{class:R([`cui-detection__icon`,{"cui-detection__icon--detected":$(r)}])},[e.type===`motion`?(L(),U(a,{key:0,class:`cui-detection__icon-svg`})):e.type===`object`?(L(),U(o,{key:1,class:`cui-detection__icon-svg`})):e.type===`audio`?(L(),U(s,{key:2,class:`cui-detection__icon-svg`})):e.type===`face`?(L(),U(c,{key:3,class:`cui-detection__icon-svg`})):e.type===`licensePlate`?(L(),U(l,{key:4,class:`cui-detection__icon-svg`})):W(``,!0)],2),X(`div`,vh,[e.label?(L(),q(`span`,yh,z(e.label),1)):W(``,!0),X(`span`,{class:R([`cui-detection__status`,{"cui-detection__status--detected":$(r)}])},z($(i)),3)]),X(`div`,{class:R([`cui-detection__indicator`,{"cui-detection__indicator--detected":$(r)}])},null,2)]),e.detections&&e.detections.length>0?(L(),q(`div`,bh,[(L(!0),q(V,null,M(e.detections,(e,t)=>(L(),q(`span`,{key:t,class:`cui-detection__detection-tag`},z(e),1))),128))])):W(``,!0)],2)}}}),[[`__scopeId`,`data-v-4bdc871b`]]),Sh={key:0,class:`flex items-center justify-center h-full`},Ch={key:1,class:`overview-container`},wh={class:`relative`},Th={key:0,class:`absolute inset-0 z-2 flex items-center justify-center bg-black/80 pointer-events-none`},Eh={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`},Dh={class:`text-xs text-white/80`},Oh={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`},kh={class:`text-xs text-white/80`},Ah={class:`overview-section`},jh={class:`overview-section-title`},Mh={key:1},Nh={key:0,class:`overview-section`},Ph={class:`overview-section-title`},Fh={class:`flex flex-col gap-2`},Ih={key:1,class:`overview-section`},Lh={class:`overview-section-title`},Rh={class:`flex flex-col gap-2`},zh={key:2,class:`overview-section`},Bh={class:`overview-section-title`},Vh={class:`flex flex-col gap-2`},Hh={key:3,class:`overview-section`},Uh={class:`overview-section-title`},Wh={class:`flex flex-col gap-2`},Gh={key:4,class:`overview-section`},Kh={class:`overview-section-title`},qh={class:`flex flex-col gap-2`},Jh={key:5,class:`overview-section`},Yh={class:`overview-section-title`},Xh={class:`flex flex-col gap-2`},Zh={key:6,class:`overview-section`},Qh={class:`overview-section-title`},$h={class:`flex flex-col gap-2`},eg={key:7,class:`overview-section`},tg={class:`overview-section-title`},ng={class:`flex flex-col gap-2`},rg={key:8,class:`overview-section`},ig={class:`overview-section-title`},ag={class:`flex flex-col gap-2`},og={key:9,class:`overview-section`},sg={class:`overview-section-title`},cg={class:`flex flex-col gap-2`},lg={key:10,class:`overview-section`},ug={class:`overview-section-title`},dg={class:`flex flex-col gap-2`},fg={key:11,class:`overview-section`},pg={class:`overview-section-title`},mg={class:`flex flex-col gap-2`},hg={key:12,class:`overview-section`},gg={class:`overview-section-title`},_g={class:`flex flex-col gap-2`},vg={key:13,class:`overview-section`},yg={class:`overview-section-title`},bg={class:`flex flex-col gap-2`},xg={key:14,class:`overview-section`},Sg={class:`overview-section-title`},Cg={class:`flex flex-col gap-2`},wg={key:15,class:`overview-section`},Tg={class:`no-sensors`},Eg=Xt(H({__name:`Overview`,props:{camera:{},cameraDevice:{},loading:{type:Boolean},latestSnapshotSrc:{}},setup(e){let n=e,{t:i}=ye(),{getCameraStatus:a,connect:o}=Ci(),{cameraDevice:s,latestSnapshotSrc:l}=nr(n),{sensors:d}=He(s);o();let h=G(()=>s.value?.camera.value),g=G(()=>a(h.value?._id)),ee=G(()=>{switch(g.value){case`connected`:return`success`;case`connecting`:return`warn`;case`error`:return`danger`;case`partial`:return`contrast`;default:return`secondary`}}),te=G(()=>{switch(g.value){case`connected`:return i(`components.camera_table.online`);case`connecting`:return i(`components.camera_table.connecting`);case`error`:return i(`components.camera_table.error`);case`partial`:return i(`components.camera_table.partial`);default:return i(`components.camera_table.idle`)}}),_=G(()=>d.value.filter(T)),v=G(()=>d.value.filter(w)),ne=G(()=>d.value.filter(b)),x=G(()=>d.value.filter(u)),re=G(()=>d.value.filter(m)),C=G(()=>d.value.filter(Ue)),le=G(()=>d.value.filter(De)),de=G(()=>d.value.filter(t)),fe=G(()=>d.value.filter(Fe)),_e=G(()=>d.value.filter(f)),O=G(()=>d.value.filter(ie)),A=G(()=>d.value.filter(r)),xe=G(()=>d.value.filter(j)),Ce=G(()=>d.value.filter(ae)),Ee=G(()=>d.value.filter(ce)),Ae=G(()=>d.value.filter(ge)),Me=G(()=>d.value.filter(c)),Ne=G(()=>d.value.filter(S)),Le=G(()=>d.value.filter(y)),Re=G(()=>_.value.some(e=>e.getProperty(ke.Detected))),Be=G(()=>{let e;for(let t of _.value){let n=t.getProperty(ke.LastTriggered);n&&(!e||n>e)&&(e=n)}return e}),Ve=pe(G(()=>new Date(Be.value??0))),We=G(()=>{let e=[{label:i(`components.camera_options.overview_status`),value:te.value,tag:!0,tagSeverity:ee.value},{label:i(`components.camera_options.overview_sources`),value:String(h.value?.sources.length??0)}],t=h.value?.info;return t?.manufacturer&&e.push({label:i(`components.form.label.manufacturer`),value:t.manufacturer}),t?.model&&e.push({label:i(`components.camera_options.model`),value:t.model}),t?.hardware&&e.push({label:i(`components.form.label.hardware_version`),value:t.hardware}),t?.serialNumber&&e.push({label:i(`components.form.label.serial_number`),value:t.serialNumber}),t?.firmwareVersion&&e.push({label:i(`components.form.label.firmware_version`),value:t.firmwareVersion}),t?.supportUrl&&e.push({label:i(`components.form.label.support_url`),value:t.supportUrl}),_.value.length>0&&(Re.value?e.push({label:i(`components.camera_options.overview_last_motion`),value:i(`components.camera_options.overview_motion_active`),tag:!0,tagSeverity:`danger`}):Be.value?e.push({label:i(`components.camera_options.overview_last_motion`),value:Ve.value}):e.push({label:i(`components.camera_options.overview_last_motion`),value:i(`components.camera_options.overview_no_motion`)})),e}),Ke=G(()=>_.value.length>0||v.value.length>0||ne.value.length>0||x.value.length>0||re.value.length>0),qe=G(()=>C.value.length>0||xe.value.length>0||Ce.value.length>0||Ee.value.length>0||Ae.value.length>0||Me.value.length>0||le.value.length>0||_e.value.length>0||Ne.value.length>0||de.value.length>0||fe.value.length>0||O.value.length>0||A.value.length>0||Le.value.length>0);return(e,t)=>{let n=ze,r=bt,i=xt,a=Ge,o=Gr,s=Mr,c=Ei,u=oh,d=Ym,f=Hm,m=Fm,g=xm,ee=rm,te=Zp,y=Gp,b=zp,S=Np,ie=Dp,ae=hp,w=up,T=ap;return $(h)?(L(),q(`div`,Ch,[X(`div`,wh,[$(h)?.disabled?(L(),q(`div`,Th,[Z(r,{class:`w-8 h-8 text-white/60`})])):W(``,!0),$(h)?.disabled?(L(),q(`div`,Eh,[Z(r,{class:`w-3.5 h-3.5 text-red-400`}),X(`span`,Dh,z(e.$t(`views.camera.camera_disabled`)),1)])):$(h)?.detectionSettings?.snooze?(L(),q(`div`,Oh,[Z(i,{class:`w-3.5 h-3.5 text-amber-400`}),X(`span`,kh,z(e.$t(`views.camera.camera_snoozed`)),1)])):W(``,!0),Z(a,{camera:$(h),src:$(l)},null,8,[`camera`,`src`])]),X(`div`,Ah,[X(`h3`,jh,z(e.$t(`components.camera_options.overview`)),1),Z(c,{value:$(We),"striped-rows":``,"show-headers":!1,class:`card-border rounded-lg overflow-hidden`},{default:Y(()=>[Z(o,{field:`label`,class:`p-2 font-medium text-sm`}),Z(o,{field:`value`,class:`p-2 text-muted text-sm text-right`},{body:Y(({data:e})=>[e.tag?(L(),U(s,{key:0,severity:e.tagSeverity,value:e.value},null,8,[`severity`,`value`])):(L(),q(`span`,Mh,z(e.value),1))]),_:1})]),_:1},8,[`value`])]),$(Ke)?(L(),q(`div`,Nh,[X(`h3`,Ph,z(e.$t(`components.camera_options.detection`)),1),X(`div`,Fh,[(L(!0),q(V,null,M($(_),e=>(L(),U(xh,{key:e.id,type:`motion`,label:e.displayName.value,detected:e.getProperty($(ke).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128)),(L(!0),q(V,null,M($(v),e=>(L(),U(xh,{key:e.id,type:`object`,label:e.displayName.value,detected:(e.getProperty($(we).Detections)?.length??0)>0,detections:e.getProperty($(we).Detections)?.map(e=>e.label??e.class??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128)),(L(!0),q(V,null,M($(ne),e=>(L(),U(xh,{key:e.id,type:`audio`,label:e.displayName.value,detected:e.getProperty($(D).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128)),(L(!0),q(V,null,M($(x),e=>(L(),U(xh,{key:e.id,type:`face`,label:e.displayName.value,detected:e.getProperty($(Ie).Detected)??!1,detections:e.getProperty($(Ie).Detections)?.map(e=>e.identity??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128)),(L(!0),q(V,null,M($(re),e=>(L(),U(xh,{key:e.id,type:`licensePlate`,label:e.displayName.value,detected:e.getProperty($(Te).Detected)??!1,detections:e.getProperty($(Te).Detections)?.map(e=>e.plateText??`unknown`),size:`small`,class:`card-border`},null,8,[`label`,`detected`,`detections`]))),128))])])):W(``,!0),$(le).length?(L(),q(`div`,Ih,[X(`h3`,Lh,z(e.$t(`components.camera_options.sensor_type_light`)),1),X(`div`,Rh,[(L(!0),q(V,null,M($(le),e=>(L(),U(u,{key:e.id,label:e.displayName.value,on:e.getProperty($(ue).On)??!1,brightness:e.getProperty($(ue).Brightness)??100,"has-brightness":e.hasCapability(`brightness`),size:`small`,class:`card-border`,"onUpdate:on":t=>e.setProperty($(ue).On,t),"onUpdate:brightness":t=>e.setProperty($(ue).Brightness,t)},null,8,[`label`,`on`,`brightness`,`has-brightness`,`onUpdate:on`,`onUpdate:brightness`]))),128))])])):W(``,!0),$(fe).length?(L(),q(`div`,zh,[X(`h3`,Bh,z(e.$t(`components.camera_options.sensor_type_switch`)),1),X(`div`,Vh,[(L(!0),q(V,null,M($(fe),e=>(L(),U(d,{key:e.id,label:e.displayName.value,on:e.getProperty($(p).On)??!1,size:`small`,class:`card-border`,"onUpdate:on":t=>e.setProperty($(p).On,t)},null,8,[`label`,`on`,`onUpdate:on`]))),128))])])):W(``,!0),$(_e).length?(L(),q(`div`,Hh,[X(`h3`,Uh,z(e.$t(`components.camera_options.sensor_type_lock`)),1),X(`div`,Wh,[(L(!0),q(V,null,M($(_e),e=>(L(),U(f,{key:e.id,label:e.displayName.value,"current-state":e.getProperty($(ve).CurrentState)??2,"target-state":e.getProperty($(ve).TargetState)??0,size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty($(ve).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`onUpdate:targetState`]))),128))])])):W(``,!0),$(de).length?(L(),q(`div`,Gh,[X(`h3`,Kh,z(e.$t(`components.camera_options.sensor_type_siren`)),1),X(`div`,qh,[(L(!0),q(V,null,M($(de),e=>(L(),U(m,{key:e.id,label:e.displayName.value,active:e.getProperty($(oe).Active)??!1,volume:e.getProperty($(oe).Volume)??100,"has-volume":e.hasCapability(`volume`),size:`small`,class:`card-border`,"onUpdate:active":t=>e.setProperty($(oe).Active,t),"onUpdate:volume":t=>e.setProperty($(oe).Volume,t)},null,8,[`label`,`active`,`volume`,`has-volume`,`onUpdate:active`,`onUpdate:volume`]))),128))])])):W(``,!0),$(Le).length?(L(),q(`div`,Jh,[X(`h3`,Yh,z(e.$t(`components.camera_options.sensor_type_securitySystem`)),1),X(`div`,Xh,[(L(!0),q(V,null,M($(Le),e=>(L(),U(g,{key:e.id,label:e.displayName.value,"current-state":e.getProperty($(E).CurrentState)??3,"target-state":e.getProperty($(E).TargetState)??3,size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty($(E).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`onUpdate:targetState`]))),128))])])):W(``,!0),$(O).length?(L(),q(`div`,Zh,[X(`h3`,Qh,z(e.$t(`components.camera_options.sensor_type_doorbell`)),1),X(`div`,$h,[(L(!0),q(V,null,M($(O),e=>(L(),U(ee,{key:e.id,label:e.displayName.value,ring:e.getProperty($(he).Ring)??!1,size:`small`,class:`card-border`,onTrigger:()=>e.setProperty($(he).Ring,!0)},null,8,[`label`,`ring`,`onTrigger`]))),128))])])):W(``,!0),$(A).length?(L(),q(`div`,eg,[X(`h3`,tg,z(e.$t(`components.camera_options.sensor_type_contact`)),1),X(`div`,ng,[(L(!0),q(V,null,M($(A),e=>(L(),U(te,{key:e.id,label:e.displayName.value,detected:e.getProperty($(Se).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):W(``,!0),$(Ee).length?(L(),q(`div`,rg,[X(`h3`,ig,z(e.$t(`components.camera_options.sensor_type_occupancy`)),1),X(`div`,ag,[(L(!0),q(V,null,M($(Ee),e=>(L(),U(y,{key:e.id,label:e.displayName.value,detected:e.getProperty($(Pe).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):W(``,!0),$(Ae).length?(L(),q(`div`,og,[X(`h3`,sg,z(e.$t(`components.camera_options.sensor_type_smoke`)),1),X(`div`,cg,[(L(!0),q(V,null,M($(Ae),e=>(L(),U(b,{key:e.id,label:e.displayName.value,detected:e.getProperty($(se).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):W(``,!0),$(Me).length?(L(),q(`div`,lg,[X(`h3`,ug,z(e.$t(`components.camera_options.sensor_type_leak`)),1),X(`div`,dg,[(L(!0),q(V,null,M($(Me),e=>(L(),U(S,{key:e.id,label:e.displayName.value,detected:e.getProperty($(je).Detected)??!1,size:`small`,class:`card-border`},null,8,[`label`,`detected`]))),128))])])):W(``,!0),$(Ne).length?(L(),q(`div`,fg,[X(`h3`,pg,z(e.$t(`components.camera_options.sensor_type_garage`)),1),X(`div`,mg,[(L(!0),q(V,null,M($(Ne),e=>(L(),U(ie,{key:e.id,label:e.displayName.value,"current-state":e.getProperty($(be).CurrentState)??1,"target-state":e.getProperty($(be).TargetState)??1,"obstruction-detected":e.getProperty($(be).ObstructionDetected)??!1,size:`small`,class:`card-border`,"onUpdate:targetState":t=>e.setProperty($(be).TargetState,t)},null,8,[`label`,`current-state`,`target-state`,`obstruction-detected`,`onUpdate:targetState`]))),128))])])):W(``,!0),$(xe).length?(L(),q(`div`,hg,[X(`h3`,gg,z(e.$t(`components.camera_options.sensor_type_temperature`)),1),X(`div`,_g,[(L(!0),q(V,null,M($(xe),e=>(L(),U(ae,{key:e.id,label:e.displayName.value,current:e.getProperty($(Oe).Current),size:`small`,class:`card-border`},null,8,[`label`,`current`]))),128))])])):W(``,!0),$(Ce).length?(L(),q(`div`,vg,[X(`h3`,yg,z(e.$t(`components.camera_options.sensor_type_humidity`)),1),X(`div`,bg,[(L(!0),q(V,null,M($(Ce),e=>(L(),U(w,{key:e.id,label:e.displayName.value,current:e.getProperty($(me).Current),size:`small`,class:`card-border`},null,8,[`label`,`current`]))),128))])])):W(``,!0),$(C).length?(L(),q(`div`,xg,[X(`h3`,Sg,z(e.$t(`components.camera_options.sensor_type_battery`)),1),X(`div`,Cg,[(L(!0),q(V,null,M($(C),e=>(L(),U(T,{key:e.id,label:e.displayName.value,level:e.getProperty($(k).Level)??100,charging:e.getProperty($(k).Charging)??`NOT_CHARGING`,low:e.getProperty($(k).Low)??!1,size:`small`,class:`card-border`},null,8,[`label`,`level`,`charging`,`low`]))),128))])])):W(``,!0),!$(qe)&&!$(Ke)?(L(),q(`div`,wg,[X(`div`,Tg,z(e.$t(`components.camera_options.no_sensors`)),1)])):W(``,!0)])):(L(),q(`div`,Sh,[Z(n,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})]))}}}),[[`__scopeId`,`data-v-5d86732a`]]),Dg={viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`};function Og(e,t){return L(),q(`svg`,Dg,[...t[0]||=[X(`g`,{fill:`none`,stroke:`currentColor`,"stroke-linecap":`round`,"stroke-linejoin":`round`},[X(`path`,{"stroke-width":`3`,d:`M5 10h.01M5 16h.01`}),X(`path`,{"stroke-width":`2`,d:`m10 17l4-10m2 10l4-10`})],-1)]])}var kg=K({name:`humbleicons-url`,render:Og}),Ag={class:`drawer-header flex items-center w-full h-[45px] border-b-[1px] border-color px-3`},jg={class:`font-semibold text-lg truncate`},Mg=[`onClick`],Ng={class:`text-xs truncate`},Pg={class:`w-full h-full max-h-full overflow-y-scroll`},Fg={key:0,class:`flex w-full h-full items-center justify-center mt-5`},Ig={key:1,class:`w-full h-full`},Lg={key:0,class:`w-full flex items-center justify-center p-4 h-[70px]`},Rg=Xt(H({__name:`CameraOptions`,props:{cameraName:{},latestSnapshotSrc:{}},emits:[`close`],setup(e,{emit:t}){let n=new Qt,r=e,i=t,a=yt(),o=$e(),{t:s}=ye(),{latestSnapshotSrc:c}=nr(r),l=J(r.cameraName),{camera:u,isLoading:d}=A(l),{data:f,isBusy:p}=n.getCameraQuery(l),{mutate:m,isPending:h}=n.patchCameraQuery(),g=Bn(`formRef`),ee=Gn(),te=J(),v=J(`overview`),y=J([{name:`overview`,icon:Gt},{name:`sources`,icon:kg},{name:`settings`,icon:Dt},{name:`plugins`,icon:Rt}]),b=G(()=>p.value||d.value||h.value),ne=G(()=>v.value===`sources`||v.value===`settings`);async function x(){let e=await g.value?.validate();if(e?.valid&&e.values){let t=e.values.name;m({cameraname:l.value,cameraData:e.values},{onSuccess:()=>{t&&t!==l.value&&(l.value=t)}})}else a.error(`Validation failed`,e),o.add({severity:`error`,detail:s(`components.toast.validation_failed`),life:3e3})}return F(u,e=>{e&&(ee.value=e)},{immediate:!0}),F(()=>r.cameraName,e=>{ee.value=void 0,l.value=e}),F(f,e=>{e&&(te.value=$t(e))},{deep:!0,immediate:!0}),(e,t)=>{let n=Jr,r=_,a=vr,o=kr,s=ze,u=Eg,d=Rf,p=$d,m=Mc,h=Sr,S=Ar,re=xr;return L(),q(V,null,[X(`div`,Ag,[X(`span`,jg,z($(l)),1),Z(r,{text:``,rounded:``,severity:`secondary`,class:`ml-auto cui-icon-md shrink-0`,onClick:t[0]||=e=>i(`close`)},{icon:Y(()=>[Z(n,{width:`100%`,height:`100%`})]),_:1})]),Z($(In),{ref_key:`formRef`,ref:g,class:`w-full`,style:Q({height:`calc(100% - 45px - ${$(ne)?`70px`:`0px`})`}),"validation-schema":$(vi)},{default:Y(()=>[Z(re,{value:$(v),"onUpdate:value":t[7]||=e=>Hn(v)?v.value=e:null,scrollable:``,class:`w-full h-full`},{default:Y(()=>[Z(o,{class:`justify-between`,pt:{tablist:{class:`h-[65px]`},activeBar:{class:`!w-auto`}}},{default:Y(()=>[(L(!0),q(V,null,M($(y),(t,n)=>(L(),U(a,{key:n,value:t.name,"as-child":``},{default:Y(n=>[X(`div`,Jn({ref_for:!0},n.a11yAttrs,{class:[`flex flex-col items-center justify-center flex-1 content-background !py-3`,[{"hover:!text-color active:!text-color focus:!text-color":!n.active},n.class]],onClick:n.onClick}),[(L(),U(zn(t.icon),{class:`w-5 h-5`})),X(`span`,Ng,z(e.$t(`components.options_sidebar.segment_tab_${t.name}`)),1)],16,Mg)]),_:2},1032,[`value`]))),128))]),_:1}),Z(S,{class:`p-0 h-[calc(100%-65px)]`},{default:Y(()=>[X(`div`,Pg,[(L(!0),q(V,null,M($(y),(e,n)=>(L(),U(h,{key:n,value:e.name,"as-child":``},{default:Y(e=>[e.active?(L(),q(`div`,Jn({key:0,class:e.class},{ref_for:!0},e.a11yAttrs),[!$(te)||!$(f)||!$(ee)?(L(),q(`div`,Fg,[Z(s,{class:`w-[30px] h-[30px] m-0`,"stroke-width":`5`})])):(L(),q(`div`,Ig,[$(v)===`overview`?(L(),U(u,{key:0,camera:$(f),"camera-device":$(ee),loading:$(b),"latest-snapshot-src":$(c),onClose:t[1]||=e=>i(`close`)},null,8,[`camera`,`camera-device`,`loading`,`latest-snapshot-src`])):W(``,!0),$(v)===`sources`?(L(),U(d,{key:1,modelValue:$(te),"onUpdate:modelValue":t[2]||=e=>Hn(te)?te.value=e:null,camera:$(f),"camera-device":$(ee),loading:$(b),onClose:t[3]||=e=>i(`close`)},null,8,[`modelValue`,`camera`,`camera-device`,`loading`])):W(``,!0),$(v)===`settings`?(L(),U(p,{key:2,modelValue:$(te),"onUpdate:modelValue":t[4]||=e=>Hn(te)?te.value=e:null,camera:$(f),"camera-device":$(ee),loading:$(b),onClose:t[5]||=e=>i(`close`)},null,8,[`modelValue`,`camera`,`camera-device`,`loading`])):W(``,!0),$(v)===`plugins`?(L(),U(m,{key:3,camera:$(f),"camera-device":$(ee),loading:$(b),onClose:t[6]||=e=>i(`close`)},null,8,[`camera`,`camera-device`,`loading`])):W(``,!0)]))],16)):W(``,!0)]),_:1},8,[`value`]))),128))])]),_:1})]),_:1},8,[`value`]),$(ne)?(L(),q(`div`,Lg,[Z(r,{fluid:``,severity:`success`,class:`cui-button-medium`,label:e.$t(`components.form.button.save`),onClick:x},null,8,[`label`])])):W(``,!0)]),_:1},8,[`style`,`validation-schema`])],64)}}}),[[`__scopeId`,`data-v-24ee7633`]]),zg={class:`w-full h-full p-safe !pb-0 md:!pl-0 non-draggable-region`},Bg={class:`w-full h-full border-0 md:border-r-[1px] border-color overflow-y-auto pb-safe`},Vg=H({__name:`CuiCameraDrawer`,setup(e){let t=_r(),n=gt(),r=n.getEventBus(),i=J(!1),a=J(),o=J(),s=G(()=>vt.pt);function c(){i.value=!1,n.close()}return F(t.currentRoute,(e,t)=>{e.path!==t.path&&n.close()}),On(()=>{r.on(e=>{e.type===`open`?(a.value=e.options,o.value=e.props,i.value=!0):e.type===`close`&&(i.value=!1,a.value=void 0)})}),(e,t)=>{let n=Rg,r=Vr;return L(),U(r,Jn({visible:$(i),"onUpdate:visible":t[0]||=e=>Hn(i)?i.value=e:null},$(o),{class:`border-0 md:border-l-[1px]`,pt:$(s),onHide:c}),{container:Y(({closeCallback:e})=>[X(`div`,zg,[X(`div`,Bg,[$(a)?(L(),U(n,Jn({key:0},$(a),{onClose:e}),null,16,[`onClose`])):W(``,!0)])])]),_:1},16,[`visible`,`pt`])}}}),Hg=H({__name:`CuiToast`,setup(e){let t=yt(),{t:n}=ye(),{mdBreakpoint:r}=wt(),{theme:i}=hr(ri()),a={success:tr.success,error:tr.error,warn:tr.warning,warning:tr.warning,info:tr.info};function o(e){return n(`components.toast.title_${e===`warning`?`warn`:e}`)}function s(e){return e.type===`dismiss`}return xe(mt.on(e=>{if(s(e)){tr.dismiss(e.id);return}let r=e,i=a[r.severity]||tr,c=r.summary||o(r.severity),l;if(r.action){let{label:e,loadingLabel:i,onClick:a}=r.action,o=r.id;l={label:e,onClick:r=>{r.preventDefault(),r.stopPropagation();let s=a();s instanceof Promise&&o&&(tr.loading(i??e,{id:o,duration:1/0}),s.catch(e=>{t.error(`action failed`,e),tr.error(n(`components.toast.title_error`),{id:o})}))}}}i(c,{id:r.id,description:r.detail,duration:r.persistent?1/0:r.life??3e3,action:l})})),(e,t)=>(L(),U($(er),{"rich-colors":``,position:$(r)?`top-center`:`bottom-right`,"visible-toasts":3,theme:$(i)},null,8,[`position`,`theme`]))}}),Ug={class:`loader flex flex-col justify-center items-center`},Wg={key:0,class:`absolute flex flex-col items-center justify-center pb-safe bottom-10`},Gg={key:0,class:`offline`},Kg={key:1,class:`text-center text-white text-sm font-bold mt-2`},qg=Xt(H({__name:`CuiLoadingScreen`,props:{reload:{type:Boolean,default:!1},height:{default:`200px`},width:{default:`200px`},text:{},icon:{}},setup(e){let{reload:t,width:n,height:r,text:i,icon:a}=nr(e),{start:o}=le(()=>{document.getElementById(`lens`)?.classList.add(`cameraLens`),document.getElementById(`CameraUI_U`)?.classList.add(`cameraLetter`)},100,{immediate:!1}),{resume:s}=_e(()=>{document.getElementById(`lens`)?.classList.remove(`cameraLens`),document.getElementById(`CameraUI_U`)?.classList.remove(`cameraLetter`),o()},2300,{immediate:!1});return On(()=>{t.value&&s()}),(e,t)=>(L(),q(`div`,Ug,[Z($(rr),{src:$(fn)(`logo_loading_circle.svg`),width:$(n),height:$(r),title:`camera.ui`,"aria-label":`camera.ui`},null,8,[`src`,`width`,`height`]),$(a)||$(i)?(L(),q(`div`,Wg,[$(a)?(L(),q(`div`,Gg,[(L(),U(zn($(a)),{class:`w-8 h-8 text-primary`}))])):W(``,!0),$(i)?(L(),q(`div`,Kg,z($(i)),1)):W(``,!0)])):W(``,!0)]))}}),[[`__scopeId`,`data-v-839ba1ea`]]);yt(`PushHandler`);function Jg(){let e=_r(),{isElectronApp:t,electron:n}=nt();function r(t,n){n?.deepLink&&e.push(n.deepLink)}On(()=>{!t||!n||(n.removeListener(`notification-click`,r),n.on(`notification-click`,r))}),jn(()=>{n?.removeListener(`notification-click`,r)})}function Yg(){let e=_r(),{isElectronApp:t,electron:n}=nt();function r(t,n){n?.path&&e.push(n.path)}On(()=>{!t||!n||(n.removeListener(`deep-link`,r),n.on(`deep-link`,r))}),jn(()=>{n?.removeListener(`deep-link`,r)})}var Xg={key:1,class:`app`},Zg=Xt(H({__name:`App`,setup(e){let{navbarState:t,subbarState:n,showBottombar:r,showNavbar:i,showTopbar:a}=en(),o=jt(),s=pr(),c=_r(),{mdBreakpoint:l}=wt(),{isPWA:u}=sn(),{t:d}=ye(),f=an(),{isElectronApp:p}=nt();Lt(),yn(),Jg(),Yg();let{theme:m}=hr(ri()),{isLoggedIn:h}=hr(Bt()),g=Ye(),ee=Bn(`navbarRef`),te=Bn(`topbarRef`),_=Bn(`bottombarRef`),v=J(!0),y=J(!1),b=re(te,{width:0,height:0},{box:`border-box`}),ne=re(_,{width:0,height:0},{box:`border-box`}),x=G(()=>t.value===`closed`||t.value===`minified`?l.value?Aa.CLOSED:Aa.MINIFIED:Aa.EXPANDED),S=G(()=>t.value===`closed`?0:8),ie=G(()=>!ee.value||l.value?`env(safe-area-inset-left, 0px)`:`calc(${x.value}px + max(${S.value}px, env(safe-area-inset-left, 0px)))`),ae=G(()=>o.showTopbar.value?`var(--topbar-background)`:o.background.value?o.background.value:`var(--ground-background)`),C=G(()=>`calc(100dvh - ${te.value?`${b.height.value}px`:`env(safe-area-inset-top, 0px)`} - ${_.value?`${ne.height.value}px`:o.ignoreSafeAreaBottom.value?`0px`:`env(safe-area-inset-bottom, 0px)`} - ${_.value||!o.disableScroll.value||o.noExtraPadding.value?`0px`:`8px`})`),w=G(()=>s.meta.auth?.requiresAuth&&!h.value||v.value||g.isSwitching),oe=G(()=>{if(!(!g.isSwitching||!g.switchTargetName))return`${d(`components.instance_switcher.switching_to`)} ${g.switchTargetName}...`});async function T(){}return F([h,()=>f.isOnline.value],([e,t],n)=>{if(g.isSwitching)return;let r=n?.[0]===!0&&n?.[1]===!0;e&&t&&!r&&(g.saveCurrentTokens(),g.fetchInstances())},{immediate:!0}),F([ae,m],()=>{Tn(()=>{if(/^var\([^)]+\)$/.test(ae.value)){let e=window.getComputedStyle(document.body),t=ae.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`,ae.value)})},{immediate:!0}),F(()=>o.disableScroll.value,e=>{document.body.classList.toggle(`disable-overflow-scroll`,e),document.documentElement.classList.toggle(`disable-overflow-scroll`,e)},{immediate:!0}),On(async()=>{await c.isReady(),T(),v.value=!1,requestAnimationFrame(()=>{y.value=!0})}),(e,s)=>{let c=qg,d=Hg,f=jr,m=Pr,h=Vg,v=_s,re=Xa,ae=Ja,T=Dn(`RouterView`),se=ga,ce=aa,E=na,le=Xi,D=Wi;return $(w)?(L(),q(`div`,{key:0,class:`flex w-full h-full justify-center items-center absolute z-50`,style:Q({minHeight:$(u)?`100vh !important`:`100dvh !important`})},[Z(c,{reload:``,text:$(oe)},null,8,[`text`])],4)):(L(),q(`div`,Xg,[Z(d),Z(f),Z(m),Z(h),$(a)?(L(),U(v,{key:0,ref_key:`topbarRef`,ref:te,class:`z-2 top-0`,"offset-left":$(l)?0:$(x),animate:$(y)},null,8,[`offset-left`,`animate`])):W(``,!0),$(r)?(L(),U(re,{key:1,ref_key:`bottombarRef`,ref:_,class:`z-2`},null,512)):W(``,!0),$(i)?(L(),U(ae,{key:2,ref_key:`navbarRef`,ref:ee,class:`z-3 top-0 left-0`},null,512)):W(``,!0),X(`main`,{id:`container`,class:`relative w-dvw z-1 overflow-x-hidden`,style:Q({transition:$(y)?`padding-left 200ms`:void 0,paddingTop:$(te)?`${$(b).height.value}px`:`env(safe-area-inset-top, 0px)`,paddingLeft:$(ie),paddingRight:`env(safe-area-inset-right, 0px)`,paddingBottom:$(_)?`${$(ne).height.value}px`:$(o).ignoreSafeAreaBottom.value?`0px`:`env(safe-area-inset-bottom, 0px)`})},[X(`div`,{class:R([`w-full max-w-full h-full grid`,{"p-2":$(o).padding.value,"pt-0":$(o).paddingTop.value===!1,"pb-0":$(o).paddingBottom.value===!1&&!$(_),"pb-4":($(o).paddingBottom.value||$(_))&&!$(o).disableScroll,"pl-0":$(o).paddingLeft.value===!1,"pr-0":$(o).paddingRight.value===!1}]),style:Q({minHeight:$(C),maxHeight:$(o).disableScroll.value?$(C):void 0,height:$(o).disableScroll.value?$(C):void 0,overflow:$(o).disableScroll.value?`hidden`:void 0})},[Z(T,null,{default:Y(({Component:e})=>[(L(),U(zn(e),{key:$(g).switchKey,class:R([`w-full h-full relative min-w-0`,{"overflow-x-hidden":!$(o).allowOverflowX.value}]),"navbar-width":$(x),"navbar-left":$(S)},null,8,[`class`,`navbar-width`,`navbar-left`]))]),_:1})],6)],4),$(p)?(L(),U(se,{key:3})):W(``,!0),$(t)===`opened`||$(n)===`opened`&&$(l)?(L(),U($n,{key:4,to:$(t)===`opened`?`#app`:`#container`,defer:``},[$(l)?(L(),q(`div`,{key:0,class:R([`fixed top-0 left-0 right-0 bottom-0 w-full h-full bg-black/50 z-1`,{"z-2":$(t)===`opened`}])},null,2)):W(``,!0)],8,[`to`])):W(``,!0),X(`div`,{class:`fixed-bg`,style:Q({background:$(o).background.value})},null,4),Z(ce),Z(E),Z(le),Z(D)]))}}}),[[`__scopeId`,`data-v-d25eaf46`]]);function Qg(e){ft()&&window.addEventListener(`message`,t=>{if(t.origin!==window.location.origin)return;let n=t.data;n&&(n.type===`cui:theme`&&(n.mode===`dark`||n.mode===`light`)?e.onTheme?.(n.mode):n.type===`cui:language`&&typeof n.language==`string`&&n.language&&e.onLanguage?.(n.language))})}function $g(e,t){e.use(g({natsTransport:t.nats,target:t.target,wsTransport:t.ws})),e.use(Me({natsTransport:t.nats,target:t.target,wsTransport:t.ws,workerBridge:un(),workerRegistry:Wt}))}var e_=fr(),t_=Br(Ur,{primitive:{borderRadius:{none:`0`,xs:`2px`,sm:`4px`,md:`6px`,lg:`8px`,xl:`12px`},emerald:{50:`#ecfdf5`,100:`#d1fae5`,200:`#a7f3d0`,300:`#6ee7b7`,400:`#34d399`,500:`#10b981`,600:`#059669`,700:`#047857`,800:`#065f46`,900:`#064e3b`,950:`#022c22`},green:{50:`#f0fdf4`,100:`#dcfce7`,200:`#bbf7d0`,300:`#86efac`,400:`#4ade80`,500:`#22c55e`,600:`#16a34a`,700:`#15803d`,800:`#166534`,900:`#14532d`,950:`#052e16`},lime:{50:`#f7fee7`,100:`#ecfccb`,200:`#d9f99d`,300:`#bef264`,400:`#a3e635`,500:`#84cc16`,600:`#65a30d`,700:`#4d7c0f`,800:`#3f6212`,900:`#365314`,950:`#1a2e05`},red:{50:`#fef2f2`,100:`#fee2e2`,200:`#fecaca`,300:`#fca5a5`,400:`#f87171`,500:`#ef4444`,600:`#dc2626`,700:`#b91c1c`,800:`#991b1b`,900:`#7f1d1d`,950:`#450a0a`},orange:{50:`#fff7ed`,100:`#ffedd5`,200:`#fed7aa`,300:`#fdba74`,400:`#fb923c`,500:`#f97316`,600:`#ea580c`,700:`#c2410c`,800:`#9a3412`,900:`#7c2d12`,950:`#431407`},amber:{50:`#fffbeb`,100:`#fef3c7`,200:`#fde68a`,300:`#fcd34d`,400:`#fbbf24`,500:`#f59e0b`,600:`#d97706`,700:`#b45309`,800:`#92400e`,900:`#78350f`,950:`#451a03`},yellow:{50:`#fefce8`,100:`#fef9c3`,200:`#fef08a`,300:`#fde047`,400:`#facc15`,500:`#eab308`,600:`#ca8a04`,700:`#a16207`,800:`#854d0e`,900:`#713f12`,950:`#422006`},teal:{50:`#f0fdfa`,100:`#ccfbf1`,200:`#99f6e4`,300:`#5eead4`,400:`#2dd4bf`,500:`#14b8a6`,600:`#0d9488`,700:`#0f766e`,800:`#115e59`,900:`#134e4a`,950:`#042f2e`},cyan:{50:`#ecfeff`,100:`#cffafe`,200:`#a5f3fc`,300:`#67e8f9`,400:`#22d3ee`,500:`#06b6d4`,600:`#0891b2`,700:`#0e7490`,800:`#155e75`,900:`#164e63`,950:`#083344`},sky:{50:`#f0f9ff`,100:`#e0f2fe`,200:`#bae6fd`,300:`#7dd3fc`,400:`#38bdf8`,500:`#0ea5e9`,600:`#0284c7`,700:`#0369a1`,800:`#075985`,900:`#0c4a6e`,950:`#082f49`},blue:{50:`#eff6ff`,100:`#dbeafe`,200:`#bfdbfe`,300:`#93c5fd`,400:`#60a5fa`,500:`#3b82f6`,600:`#2563eb`,700:`#1d4ed8`,800:`#1e40af`,900:`#1e3a8a`,950:`#172554`},indigo:{50:`#eef2ff`,100:`#e0e7ff`,200:`#c7d2fe`,300:`#a5b4fc`,400:`#818cf8`,500:`#6366f1`,600:`#4f46e5`,700:`#4338ca`,800:`#3730a3`,900:`#312e81`,950:`#1e1b4b`},violet:{50:`#f5f3ff`,100:`#ede9fe`,200:`#ddd6fe`,300:`#c4b5fd`,400:`#a78bfa`,500:`#8b5cf6`,600:`#7c3aed`,700:`#6d28d9`,800:`#5b21b6`,900:`#4c1d95`,950:`#2e1065`},purple:{50:`#faf5ff`,100:`#f3e8ff`,200:`#e9d5ff`,300:`#d8b4fe`,400:`#c084fc`,500:`#a855f7`,600:`#9333ea`,700:`#7e22ce`,800:`#6b21a8`,900:`#581c87`,950:`#3b0764`},fuchsia:{50:`#fdf4ff`,100:`#fae8ff`,200:`#f5d0fe`,300:`#f0abfc`,400:`#e879f9`,500:`#d946ef`,600:`#c026d3`,700:`#a21caf`,800:`#86198f`,900:`#701a75`,950:`#4a044e`},pink:{50:`#fdf2f8`,100:`#fce7f3`,200:`#fbcfe8`,300:`#f9a8d4`,400:`#f472b6`,500:`#ec4899`,600:`#db2777`,700:`#be185d`,800:`#9d174d`,900:`#831843`,950:`#500724`},rose:{50:`#fff1f2`,100:`#ffe4e6`,200:`#fecdd3`,300:`#fda4af`,400:`#fb7185`,500:`#f43f5e`,600:`#e11d48`,700:`#be123c`,800:`#9f1239`,900:`#881337`,950:`#4c0519`},slate:{50:`#f8fafc`,100:`#f1f5f9`,200:`#e2e8f0`,300:`#cbd5e1`,400:`#94a3b8`,500:`#64748b`,600:`#475569`,700:`#334155`,800:`#1e293b`,900:`#0f172a`,950:`#020617`},gray:{50:`#f9fafb`,100:`#f3f4f6`,200:`#e5e7eb`,300:`#d1d5db`,400:`#9ca3af`,500:`#6b7280`,600:`#4b5563`,700:`#374151`,800:`#1f2937`,900:`#111827`,950:`#030712`},zinc:{50:`#fafafa`,100:`#f4f4f5`,200:`#e4e4e7`,300:`#d4d4d8`,400:`#a1a1aa`,500:`#71717a`,600:`#52525b`,700:`#3f3f46`,800:`#27272a`,900:`#18181b`,950:`#09090b`},neutral:{50:`#fafafa`,100:`#f5f5f5`,200:`#e5e5e5`,300:`#d4d4d4`,400:`#a3a3a3`,500:`#737373`,600:`#525252`,700:`#404040`,800:`#262626`,900:`#171717`,950:`#0a0a0a`},stone:{50:`#fafaf9`,100:`#f5f5f4`,200:`#e7e5e4`,300:`#d6d3d1`,400:`#a8a29e`,500:`#78716c`,600:`#57534e`,700:`#44403c`,800:`#292524`,900:`#1c1917`,950:`#0c0a09`}},semantic:{transitionDuration:`0.2s`,focusRing:{width:`1px`,style:`solid`,color:`{primary.color}`,offset:`2px`,shadow:`none`},disabledOpacity:`0.6`,iconSize:`1rem`,anchorGutter:`2px`,primary:{50:`#fdf4f6`,100:`#f7ccd4`,200:`#f1a3b2`,300:`#eb7b90`,400:`#e5526e`,500:`#df2a4c`,600:`#be2441`,700:`#9c1d35`,800:`#7b172a`,900:`#59111e`,950:`#380b13`},formField:{paddingX:`0.75rem`,paddingY:`0.5rem`,sm:{fontSize:`0.875rem`,paddingX:`0.625rem`,paddingY:`0.375rem`},lg:{fontSize:`1.125rem`,paddingX:`0.875rem`,paddingY:`0.625rem`},borderRadius:`{border.radius.md}`,focusRing:{width:`0`,style:`none`,color:`transparent`,offset:`0`,shadow:`none`},transitionDuration:`{transition.duration}`},list:{padding:`0.25rem 0.25rem`,gap:`2px`,header:{padding:`0.5rem 1rem 0.25rem 1rem`},option:{padding:`0.5rem 0.75rem`,borderRadius:`{border.radius.sm}`},optionGroup:{padding:`0.5rem 0.75rem`,fontWeight:`600`}},content:{borderRadius:`{border.radius.md}`},mask:{transitionDuration:`0.15s`},navigation:{list:{padding:`0.25rem 0.25rem`,gap:`2px`},item:{padding:`0.5rem 0.75rem`,borderRadius:`{border.radius.sm}`,gap:`0.5rem`},submenuLabel:{padding:`0.5rem 0.75rem`,fontWeight:`600`},submenuIcon:{size:`0.875rem`}},overlay:{select:{borderRadius:`{border.radius.md}`,shadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`},popover:{borderRadius:`{border.radius.md}`,padding:`0.75rem`,shadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`},modal:{borderRadius:`{border.radius.xl}`,padding:`1.25rem`,shadow:`0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)`},navigation:{shadow:`0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)`}},colorScheme:{light:{surface:{0:`#ffffff`,50:`#f8fafc`,100:`#f1f5f9`,200:`#e2e8f0`,300:`#cbd5e1`,400:`#94a3b8`,500:`#64748b`,600:`#475569`,700:`#334155`,800:`#1e293b`,850:`#0f172a`,900:`#0f172a`,925:`#0c1421`,950:`#020617`,1e3:`#000000`},primary:{color:`{primary.500}`,contrastColor:`#ffffff`,hoverColor:`{primary.600}`,activeColor:`{primary.700}`},highlight:{background:`{primary.50}`,focusBackground:`{primary.100}`,color:`{primary.700}`,focusColor:`{primary.800}`},mask:{background:`rgba(0,0,0,0.4)`,color:`{surface.200}`},formField:{background:`{surface.50}`,disabledBackground:`{surface.200}`,filledBackground:`{surface.50}`,filledHoverBackground:`{surface.50}`,filledFocusBackground:`{surface.50}`,borderColor:`{surface.300}`,hoverBorderColor:`{surface.400}`,focusBorderColor:`{primary.color}`,invalidBorderColor:`{red.400}`,color:`{surface.700}`,disabledColor:`{surface.500}`,placeholderColor:`{surface.500}`,invalidPlaceholderColor:`{red.600}`,floatLabelColor:`{surface.500}`,floatLabelFocusColor:`{primary.600}`,floatLabelActiveColor:`{surface.500}`,floatLabelInvalidColor:`{form.field.invalid.placeholder.color}`,iconColor:`{surface.400}`,shadow:`0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)`},text:{color:`{surface.700}`,hoverColor:`{surface.800}`,mutedColor:`{surface.500}`,hoverMutedColor:`{surface.600}`},content:{background:`{surface.0}`,hoverBackground:`{surface.100}`,borderColor:`{surface.200}`,color:`{text.color}`,hoverColor:`{text.hover.color}`},overlay:{select:{background:`{surface.0}`,borderColor:`{surface.200}`,color:`{text.color}`},popover:{background:`{surface.0}`,borderColor:`{surface.200}`,color:`{text.color}`},modal:{background:`{surface.0}`,borderColor:`{surface.200}`,color:`{text.color}`}},list:{option:{focusBackground:`{surface.100}`,selectedBackground:`{highlight.background}`,selectedFocusBackground:`{highlight.focus.background}`,color:`{text.color}`,focusColor:`{text.hover.color}`,selectedColor:`{highlight.color}`,selectedFocusColor:`{highlight.focus.color}`,icon:{color:`{surface.400}`,focusColor:`{surface.500}`}},optionGroup:{background:`transparent`,color:`{text.muted.color}`}},navigation:{item:{focusBackground:`{surface.100}`,activeBackground:`{surface.100}`,color:`{text.color}`,focusColor:`{text.hover.color}`,activeColor:`{text.hover.color}`,icon:{color:`{surface.400}`,focusColor:`{surface.500}`,activeColor:`{surface.500}`}},submenuLabel:{background:`transparent`,color:`{text.muted.color}`},submenuIcon:{color:`{surface.400}`,focusColor:`{surface.500}`,activeColor:`{surface.500}`}}},dark:{surface:{0:`#ffffff`,50:`#f5f5f5`,100:`#d1d1d1`,200:`#adadad`,300:`#898989`,400:`#646464`,500:`#404040`,600:`#363636`,700:`#2d2d2d`,800:`#232323`,850:`#1d1d1d`,900:`#1a1a1a`,925:`#161616`,950:`#101010`,1e3:`#0d0d0d`},primary:{color:`{primary.500}`,contrastColor:`{surface.900}`,hoverColor:`{primary.600}`,activeColor:`{primary.700}`},highlight:{background:`color-mix(in srgb, {primary.400}, transparent 84%)`,focusBackground:`color-mix(in srgb, {primary.400}, transparent 76%)`,color:`rgba(255,255,255,.87)`,focusColor:`rgba(255,255,255,.87)`},mask:{background:`rgba(0,0,0,0.6)`,color:`{surface.200}`},formField:{background:`{surface.925}`,disabledBackground:`{surface.700}`,filledBackground:`{surface.800}`,filledHoverBackground:`{surface.800}`,filledFocusBackground:`{surface.800}`,borderColor:`{surface.800}`,hoverBorderColor:`{surface.500}`,focusBorderColor:`{primary.color}`,invalidBorderColor:`{red.300}`,color:`{surface.0}`,disabledColor:`{surface.400}`,placeholderColor:`{surface.400}`,invalidPlaceholderColor:`{red.400}`,floatLabelColor:`{surface.400}`,floatLabelFocusColor:`{primary.color}`,floatLabelActiveColor:`{surface.400}`,floatLabelInvalidColor:`{form.field.invalid.placeholder.color}`,iconColor:`{surface.400}`,shadow:`0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)`},text:{color:`{surface.0}`,hoverColor:`{surface.0}`,mutedColor:`{surface.400}`,hoverMutedColor:`{surface.300}`},content:{background:`{surface.900}`,hoverBackground:`{surface.800}`,borderColor:`{surface.700}`,color:`{text.color}`,hoverColor:`{text.hover.color}`},overlay:{select:{background:`{surface.900}`,borderColor:`{surface.700}`,color:`{text.color}`},popover:{background:`{surface.900}`,borderColor:`{surface.700}`,color:`{text.color}`},modal:{background:`{surface.900}`,borderColor:`{surface.700}`,color:`{text.color}`}},list:{option:{focusBackground:`{surface.800}`,selectedBackground:`{highlight.background}`,selectedFocusBackground:`{highlight.focus.background}`,color:`{text.color}`,focusColor:`{text.hover.color}`,selectedColor:`{highlight.color}`,selectedFocusColor:`{highlight.focus.color}`,icon:{color:`{surface.500}`,focusColor:`{surface.400}`}},optionGroup:{background:`transparent`,color:`{text.muted.color}`}},navigation:{item:{focusBackground:`{surface.800}`,activeBackground:`{surface.800}`,color:`{text.color}`,focusColor:`{text.hover.color}`,activeColor:`{text.hover.color}`,icon:{color:`{surface.500}`,focusColor:`{surface.400}`,activeColor:`{surface.400}`}},submenuLabel:{background:`transparent`,color:`{text.muted.color}`},submenuIcon:{color:`{surface.500}`,focusColor:`{surface.400}`,activeColor:`{surface.400}`}}}}}});function n_(e){At(e)||Zr.value||$r.value||$e().add({severity:`error`,detail:e,life:3e3})}function r_(){return{enableDevtoolsV6Plugin:!0,queryClientConfig:{defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!0,gcTime:300*1e3,staleTime:1e4,networkMode:`online`,retry:(e,t)=>i_(t)===401?!1:e<2?!0:(n_(t),!1)},mutations:{retry:0,networkMode:`online`,onError:n_}}}}}function i_(e){if(typeof e==`object`&&e&&`response`in e){let t=e.response;if(typeof t?.status==`number`)return t.status}}function a_(){return{theme:{preset:t_,options:{cssLayer:{name:`primevue`,order:`theme, base, primevue`},darkModeSelector:`.dark-mode`}}}}function o_(e){e.directive(`tooltip`,v).directive(`focustrap`,s),e.use(Hr).use(Wr).use(zr).use(Kr,a_()).use(rt).use(Zn()).use(Vn,r_()).use(e_)}window.addEventListener(`vite:preloadError`,()=>qt(()=>window.location.reload()));var{connection:s_}=await Yt({logger:new l(`Connection`)});ln();var c_=Wn(Zg),l_=new l(`Vue`);c_.config.errorHandler=(e,t,n)=>l_.error(`[${n}]`,e),o_(c_),Oi(s_),$g(c_,s_),Ye().restoreActiveOverride(),Lt(),Qg({onTheme:e=>ri().applyHostTheme(e),onLanguage:e=>Lt().applyHostLanguage(e)});var u_=await Di(s_,{onUser:e=>Bt().setUserFromLogin(e),onRedirectInfo:e=>{Ye().redirectInfo=e},onReset:()=>{Ye().activeId=null,Zt.value=null}});!u_&&Je()&&(u_=await st(s_,{onUser:e=>Bt().setUserFromLogin(e)})),c_.use(St),c_.mount(`#app`),Vt(),u_||s_.boot(`default`);
|