@camera.ui/server 2.1.16 → 2.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (345) hide show
  1. package/dist/interface/assets/{404-CqZDSHs_.js → 404-Cg1J2LX8.js} +1 -1
  2. package/dist/interface/assets/{About-Dk4SUTxo.js → About-CW7G6onF.js} +1 -1
  3. package/dist/interface/assets/Automation-CIwBJK1Y.js +3 -0
  4. package/dist/interface/assets/{AutomationImport-DDywNuRK.js → AutomationImport-CHkNv7C-.js} +2 -2
  5. package/dist/interface/assets/{AutomationStore-o0JYwGRr.js → AutomationStore-5bTym-Gl.js} +2 -2
  6. package/dist/interface/assets/{AutomationStoreDetail-DeAGahaF.js → AutomationStoreDetail-BF8UoG_l.js} +2 -2
  7. package/dist/interface/assets/Automations-CaX2fHhJ.js +2 -0
  8. package/dist/interface/assets/Camera-1zdmJnP-.js +2 -0
  9. package/dist/interface/assets/Camera-DSyI4J5-.css +1 -0
  10. package/dist/interface/assets/{CameraConsole-32WtMX1a.js → CameraConsole-CB1HEFKJ.js} +2 -2
  11. package/dist/interface/assets/{Cameras-zffI0fD9.js → Cameras-CyCY0rW9.js} +2 -2
  12. package/dist/interface/assets/Camview-Dia7G1u_.js +1 -0
  13. package/dist/interface/assets/{CertificateUpload-Dg0V9Hei.js → CertificateUpload-jP-JIxmY.js} +1 -1
  14. package/dist/interface/assets/{Config-CKrqFe-g.js → Config-DOa7WHyQ.js} +1 -1
  15. package/dist/interface/assets/{ConfigActionCameraControl-sbvBJQr3.js → ConfigActionCameraControl-BmCE3XLC.js} +1 -1
  16. package/dist/interface/assets/{ConfigActionDelay-CiPxydTn.js → ConfigActionDelay-CfHCZ0uf.js} +1 -1
  17. package/dist/interface/assets/{ConfigActionHttp-UqiZm0kq.js → ConfigActionHttp-DdM7gEb0.js} +1 -1
  18. package/dist/interface/assets/{ConfigActionImageInput-DkGVZ-ti.js → ConfigActionImageInput-CrPPNT4K.js} +1 -1
  19. package/dist/interface/assets/{ConfigActionMqtt-DQu5H4bY.js → ConfigActionMqtt-D7-u4zri.js} +1 -1
  20. package/dist/interface/assets/ConfigActionNotification-BSuUI2FP.js +1 -0
  21. package/dist/interface/assets/{ConfigActionNotificationControl-B_EpM5m9.js → ConfigActionNotificationControl-DfvAxKnx.js} +1 -1
  22. package/dist/interface/assets/{ConfigActionOutput-DeOsk0T1.js → ConfigActionOutput-DPplSpm_.js} +1 -1
  23. package/dist/interface/assets/{ConfigActionPlugin-CSZHcNQ6.js → ConfigActionPlugin-BnRn_p26.js} +1 -1
  24. package/dist/interface/assets/{ConfigActionSensor-Dx7DcDVr.js → ConfigActionSensor-CoEoqFAY.js} +1 -1
  25. package/dist/interface/assets/{ConfigActionSnapshot-Baj-r4Cd.js → ConfigActionSnapshot-wXdFiyU-.js} +1 -1
  26. package/dist/interface/assets/{ConfigActionVariable-Ccu___aS.js → ConfigActionVariable-BqJvOOHH.js} +1 -1
  27. package/dist/interface/assets/{ConfigConditionIfElse-0hU7UW8q.js → ConfigConditionIfElse-DG2Kgqn5.js} +1 -1
  28. package/dist/interface/assets/{ConfigConditionSensorState-BX19KYLJ.js → ConfigConditionSensorState-BytECo6r.js} +1 -1
  29. package/dist/interface/assets/{ConfigConditionSwitch-D-XUhwcE.js → ConfigConditionSwitch-DaSt9uZE.js} +1 -1
  30. package/dist/interface/assets/{ConfigConditionTime-B6OO8cmh.js → ConfigConditionTime-D42OsshU.js} +1 -1
  31. package/dist/interface/assets/{ConfigSensorValueInput-DZHYQez8.js → ConfigSensorValueInput-BtEmtZSm.js} +1 -1
  32. package/dist/interface/assets/{ConfigTriggerDetection-BNyR5aOG.js → ConfigTriggerDetection-CDH2fzsu.js} +1 -1
  33. package/dist/interface/assets/ConfigTriggerGeofence-Dopegic5.js +1 -0
  34. package/dist/interface/assets/{ConfigTriggerManual-DFSTAuUt.js → ConfigTriggerManual-DAtWfH0-.js} +1 -1
  35. package/dist/interface/assets/{ConfigTriggerMqtt-D_O8RyrQ.js → ConfigTriggerMqtt-CB3_PxqD.js} +1 -1
  36. package/dist/interface/assets/{ConfigTriggerSchedule-BFZnBfCM.js → ConfigTriggerSchedule-BUzOrF23.js} +1 -1
  37. package/dist/interface/assets/{ConfigTriggerSensor-D1Tst2wQ.js → ConfigTriggerSensor-D5kRIb7I.js} +1 -1
  38. package/dist/interface/assets/{ConfigTriggerSystem-BNfatCp8.js → ConfigTriggerSystem-Cud77VMR.js} +1 -1
  39. package/dist/interface/assets/{ConfigTriggerWebhook--nEO_Odl.js → ConfigTriggerWebhook-CeG5R3kV.js} +1 -1
  40. package/dist/interface/assets/Console-DdOD6Pd5.js +1 -0
  41. package/dist/interface/assets/{CuiAutomationRunsDialog-CkMRT1C8.js → CuiAutomationRunsDialog-Cym6xMVJ.js} +1 -1
  42. package/dist/interface/assets/CuiBottomSheet-B3QSHp4-.js +1 -0
  43. package/dist/interface/assets/{CuiBottomSheet-mKu68LHd.js → CuiBottomSheet-BSoMhymR.js} +1 -1
  44. package/dist/interface/assets/{CuiCameraPipCard-Djp8qBvZ.js → CuiCameraPipCard-DGgrxZJd.js} +1 -1
  45. package/dist/interface/assets/CuiCameraRecordings-Bu68AFdM.js +1 -0
  46. package/dist/interface/assets/{CuiCameraShares-B73pWIFh.js → CuiCameraShares-BOhfTcxQ.js} +1 -1
  47. package/dist/interface/assets/CuiCameraTable-C1CHYnda.js +1 -0
  48. package/dist/interface/assets/{CuiCameraTable-DripFD6D.js → CuiCameraTable-D0lc0VAJ.js} +2 -2
  49. package/dist/interface/assets/{CuiChartTable-DyyQV7mt.js → CuiChartTable-DcrFI8tT.js} +1 -1
  50. package/dist/interface/assets/{CuiConsole-UxJwQqNG.js → CuiConsole-ICLBq4Q-.js} +2 -2
  51. package/dist/interface/assets/{CuiDataTable-DZm0I8k7.js → CuiDataTable-BooFPsGH.js} +1 -1
  52. package/dist/interface/assets/{CuiLightControl-CB3l0ZLj.js → CuiLightControl-D1ih2hO-.js} +1 -1
  53. package/dist/interface/assets/{CuiList-DMQgYqaU.js → CuiList-ChI82KjI.js} +1 -1
  54. package/dist/interface/assets/{CuiPluginCard-HpQMNND1.js → CuiPluginCard-DqdSWrwb.js} +2 -2
  55. package/dist/interface/assets/{CuiPluginCategoryChip-C6aEP-ug.js → CuiPluginCategoryChip-DsRcMb72.js} +1 -1
  56. package/dist/interface/assets/{CuiPluginOAuthButton-DpGacvsa.js → CuiPluginOAuthButton-BSvRKUSY.js} +2 -2
  57. package/dist/interface/assets/{CuiPluginTrustBadge-Dl1PEsm6.js → CuiPluginTrustBadge-DXL7N1LC.js} +1 -1
  58. package/dist/interface/assets/CuiQRCode-DHln6Lo9.js +1 -0
  59. package/dist/interface/assets/CuiSchema-B7i2O3Fy.js +1 -0
  60. package/dist/interface/assets/{CuiTopNavbarItem-qPj6XwXr.js → CuiTopNavbarItem-TMfTyt8u.js} +1 -1
  61. package/dist/interface/assets/{Faces-DRWIPDfH.js → Faces-CyTkMqMW.js} +1 -1
  62. package/dist/interface/assets/FirstSteps-B4gb7Sgn.js +1 -0
  63. package/dist/interface/assets/Floorplan-DBwWnuys.js +1 -0
  64. package/dist/interface/assets/{Instances-VC4-anOF.js → Instances-D9fnwItz.js} +1 -1
  65. package/dist/interface/assets/{Logs-DROgZxLH.js → Logs-Brk6fJa0.js} +2 -2
  66. package/dist/interface/assets/{Menu-CmTk2or7.js → Menu-CrdBz1Er.js} +1 -1
  67. package/dist/interface/assets/Metrics-DXMgfNIL.js +9 -0
  68. package/dist/interface/assets/{OAuthDeviceFlow-BrdiDoCh.js → OAuthDeviceFlow-D5hSwHeO.js} +1 -1
  69. package/dist/interface/assets/Plugin-C65oNZ9N.js +1 -0
  70. package/dist/interface/assets/{PluginConsole-CxiW1w6K.js → PluginConsole-Bs3Z5u9-.js} +2 -2
  71. package/dist/interface/assets/PluginDetail-C3KUrHvq.js +2 -0
  72. package/dist/interface/assets/{PluginSchema-BgVZ_4if.js → PluginSchema-D22zRDkZ.js} +1 -1
  73. package/dist/interface/assets/PluginSearch-4ngDmZQ2.js +1 -0
  74. package/dist/interface/assets/PluginSearch-D7XYJzl4.js +2 -0
  75. package/dist/interface/assets/{PluginUpdateProgress-DEcle8-x.js → PluginUpdateProgress-MEdR7mID.js} +1 -1
  76. package/dist/interface/assets/Plugins-DQTlb12n.js +1 -0
  77. package/dist/interface/assets/Recordings-CqBwRvn-.js +1 -0
  78. package/dist/interface/assets/SensorEdit-BM2zHAM7.js +1 -0
  79. package/dist/interface/assets/{SensorHistory-H03yZia0.js → SensorHistory-Dbv2ODqn.js} +1 -1
  80. package/dist/interface/assets/Sensors-B4YzyU7R.js +2 -0
  81. package/dist/interface/assets/{Sensors-DzGV2Ngo.css → Sensors-DETviyjO.css} +1 -1
  82. package/dist/interface/assets/{Settings-9nC18KH8.js → Settings--wgPYOyK.js} +1 -1
  83. package/dist/interface/assets/{SettingsAccount-BTYvhCJP.js → SettingsAccount-BF6Cp8Rt.js} +1 -1
  84. package/dist/interface/assets/SettingsAccount-D7CHP0f1.js +1 -0
  85. package/dist/interface/assets/SettingsAppearance-Ba0jbbVW.js +1 -0
  86. package/dist/interface/assets/SettingsAppearance-BpXZwBjO.js +1 -0
  87. package/dist/interface/assets/{SettingsBackup-Bu48xw4v.js → SettingsBackup-qEYm-6De.js} +1 -1
  88. package/dist/interface/assets/{SettingsList-74c5OMQf.js → SettingsList-1brGZ2E_.js} +1 -1
  89. package/dist/interface/assets/{SettingsMqtt-81rJ4zV6.js → SettingsMqtt-Ds8YpoLA.js} +1 -1
  90. package/dist/interface/assets/SettingsNotifications-Diqpfbrh.js +1 -0
  91. package/dist/interface/assets/{SettingsPermissions-DqyVtVKE.js → SettingsPermissions-GmGacrLc.js} +1 -1
  92. package/dist/interface/assets/{SettingsRecordings-Bxn28Frz.js → SettingsRecordings-CtEm_7PE.js} +1 -1
  93. package/dist/interface/assets/SettingsRemote-CENHI51U.js +2 -0
  94. package/dist/interface/assets/SettingsSystem-YkigO2-V.js +2 -0
  95. package/dist/interface/assets/{SettingsUsers-DUOJN7uO.js → SettingsUsers-BNPa87gu.js} +1 -1
  96. package/dist/interface/assets/{Terminal-45QW5yPE.js → Terminal-uxOHZpUp.js} +3 -3
  97. package/dist/interface/assets/Training-BRZKDa8S.js +1 -0
  98. package/dist/interface/assets/Training-DMNjB3uX.css +1 -0
  99. package/dist/interface/assets/{Updates-B32Pra5E.js → Updates-CbscgL60.js} +1 -1
  100. package/dist/interface/assets/{VariableInput-CyTGQFtz.js → VariableInput-Dqg4sqBD.js} +1 -1
  101. package/dist/interface/assets/{VariableSuggestions-BLlD4F87.js → VariableSuggestions-DZCkPAVs.js} +1 -1
  102. package/dist/interface/assets/{VersionsHandler-CIq6v6lE.js → VersionsHandler-BYFshrhO.js} +2 -2
  103. package/dist/interface/assets/{VirtualSensorCreate-Di2IyYAg.js → VirtualSensorCreate-CQ-C4si3.js} +1 -1
  104. package/dist/interface/assets/{Workers-tb039NGc.js → Workers-DC77SjZQ.js} +2 -2
  105. package/dist/interface/assets/api-Cb8_C_se.js +4 -0
  106. package/dist/interface/assets/{api-4JRK8ya0.js → api-CbYNh0N1.js} +1 -1
  107. package/dist/interface/assets/api-DIyogyx5.css +2 -0
  108. package/dist/interface/assets/{auth-ISkWvJbZ.js → auth-Bev1OdHw.js} +1 -1
  109. package/dist/interface/assets/{automations-CeH81DN-.js → automations-DrpESBB_.js} +1 -1
  110. package/dist/interface/assets/cameraSources-QF2xqMxX.js +1 -0
  111. package/dist/interface/assets/cloudHandoff-BknPGUc0.js +1 -0
  112. package/dist/interface/assets/{config-DthCyQJv.js → config-DCK7k2P4.js} +1 -1
  113. package/dist/interface/assets/{flowSchema-DZ2bDhJt.js → flowSchema-D3Ddm5sW.js} +1 -1
  114. package/dist/interface/assets/{intercomService-Bd71KwsB.js → intercomService-DIwpkwG4.js} +1 -1
  115. package/dist/interface/assets/{main-ExPfCNlz.css → main-Cb5Z8N7b.css} +1 -1
  116. package/dist/interface/assets/main-DVwdxi04.js +3 -0
  117. package/dist/interface/assets/{mqtt-oPORDio9.js → mqtt-COWs_r7k.js} +1 -1
  118. package/dist/interface/assets/{notifications-BirFkpbF.js → notifications-sIv1-H85.js} +1 -1
  119. package/dist/interface/assets/{plugins-vyA7MMhx.js → plugins-CXQj6XQt.js} +1 -1
  120. package/dist/interface/assets/{rooms-MfPQPywT.js → rooms-DScX89Ks.js} +1 -1
  121. package/dist/interface/assets/{sensorIcons-B4H11BbT.js → sensorIcons-CvVtOgZB.js} +1 -1
  122. package/dist/interface/assets/sensorSlots-DsfKs8_k.js +1 -0
  123. package/dist/interface/assets/{sensors-xryx8Wvn.js → sensors-Bf_gYmB5.js} +1 -1
  124. package/dist/interface/assets/{server-BK9gwxH8.js → server-CahE6_Pv.js} +1 -1
  125. package/dist/interface/assets/{theme-DQeAzJ1v.js → theme-DmUc7UHl.js} +1 -1
  126. package/dist/interface/assets/{types-Bcj_K26s.js → types-D4kUDpid.js} +1 -1
  127. package/dist/interface/assets/{types-kN1Tn2Og.js → types-Dse8_nTX.js} +1 -1
  128. package/dist/interface/assets/{types-D626ASim.js → types-hwOSxlNg.js} +1 -1
  129. package/dist/interface/assets/ungrouped-Byxe4LNR.js +1 -0
  130. package/dist/interface/assets/ungrouped-n3OnGhCH.css +1 -0
  131. package/dist/interface/assets/{updates-Dzqxen12.js → updates-C4gAnNY6.js} +1 -1
  132. package/dist/interface/assets/{useAppVersion-JY7cdzlr.js → useAppVersion--b5Zj7tl.js} +1 -1
  133. package/dist/interface/assets/{useBackupRestore-CeShFVWy.js → useBackupRestore-Bx13MgrJ.js} +1 -1
  134. package/dist/interface/assets/{useCameraOptions-BeUNT5Rz.js → useCameraOptions-DN4gJjIl.js} +1 -1
  135. package/dist/interface/assets/{useLogsSocket-DDSuX00j.js → useLogsSocket-DqVa6Hky.js} +1 -1
  136. package/dist/interface/assets/{useNavLayout-DgAgRNq2.js → useNavLayout-CuQ9F9cj.js} +1 -1
  137. package/dist/interface/assets/{usePermissions-DFzwIs8L.js → usePermissions-C1L7m3Nc.js} +1 -1
  138. package/dist/interface/assets/{usePluginUpdates-Bb-LOOyL.js → usePluginUpdates-CvQPy02x.js} +1 -1
  139. package/dist/interface/assets/{usePushRegistration-iverdyzz.js → usePushRegistration-BKvefMFq.js} +1 -1
  140. package/dist/interface/assets/{useServerRestart-BchofDLe.js → useServerRestart-ByN6484v.js} +1 -1
  141. package/dist/interface/assets/{useStreamStatus-BOJt1v1c.js → useStreamStatus-BbtTnidZ.js} +1 -1
  142. package/dist/interface/assets/{useTabSwipe-v0Yet-YZ.js → useTabSwipe-D9udGzPx.js} +1 -1
  143. package/dist/interface/assets/{useUpdateChannel-K9ADk5yx.js → useUpdateChannel-8t3W9dNr.js} +1 -1
  144. package/dist/interface/assets/{useUpdatesSocket-sj1-DmFM.js → useUpdatesSocket-D9s_5T3l.js} +1 -1
  145. package/dist/interface/assets/{useUserOptions-BnF_qBdZ.js → useUserOptions-CEPYkuSm.js} +1 -1
  146. package/dist/interface/assets/{vendor-cameraui-BPX4wReW.js → vendor-cameraui-Dlzn4pyz.js} +26 -26
  147. package/dist/interface/assets/vendor-core-COMSlypG.js +1 -0
  148. package/dist/interface/assets/{vendor-primevue-iEFYdXsu.js → vendor-primevue-DF71EsUM.js} +55 -55
  149. package/dist/interface/ha/{404-DlQnv9jN.js → 404-Bm-oxxip.js} +1 -1
  150. package/dist/interface/ha/{About-BLQJmllv.js → About-CDcN0Q2J.js} +3 -3
  151. package/dist/interface/ha/{Automation-DLMPArOd.js → Automation-BQd4b0ym.js} +102 -102
  152. package/dist/interface/ha/{AutomationImport-Qzz3Ta4D.js → AutomationImport-CX1C76Wb.js} +6 -6
  153. package/dist/interface/ha/{AutomationStore-DNXC9s6h.js → AutomationStore-D4B0KpoW.js} +56 -56
  154. package/dist/interface/ha/{AutomationStoreDetail-CTqydRKj.js → AutomationStoreDetail-B53Giz4B.js} +6 -6
  155. package/dist/interface/ha/{Automations-DRxe1fli.js → Automations-BXlwOElS.js} +124 -124
  156. package/dist/interface/ha/{Camera-OrI4Wf4F.js → Camera-CauwMneE.js} +21 -19
  157. package/dist/interface/ha/{CameraConsole-6yGhoHmu.js → CameraConsole-CmsMjuIR.js} +5 -5
  158. package/dist/interface/ha/{Cameras-DpEaKKDG.js → Cameras-CyHDmgs0.js} +259 -259
  159. package/dist/interface/ha/{Camview-CnPz4cGs.js → Camview-BwwvU5k8.js} +70 -70
  160. package/dist/interface/ha/{Config-Bb2ERyAA.js → Config-C_Zuyeoc.js} +10 -10
  161. package/dist/interface/ha/{ConfigActionCameraControl-CC2tWFz2.js → ConfigActionCameraControl-C1_QyuX8.js} +3 -3
  162. package/dist/interface/ha/{ConfigActionHttp-DBsEL44i.js → ConfigActionHttp-C0d433mh.js} +2 -2
  163. package/dist/interface/ha/{ConfigActionImageInput-Rt3AOJ3I.js → ConfigActionImageInput-BYys2FwC.js} +1 -1
  164. package/dist/interface/ha/{ConfigActionMqtt-BYSSc954.js → ConfigActionMqtt-DznDfzze.js} +4 -4
  165. package/dist/interface/ha/{ConfigActionNotification-DKlIsZJd.js → ConfigActionNotification-CC2qfBLm.js} +3 -3
  166. package/dist/interface/ha/{ConfigActionNotificationControl-D5AVW2tR.js → ConfigActionNotificationControl-3jlm7_A4.js} +2 -2
  167. package/dist/interface/ha/{ConfigActionOutput-DIlu8Ujc.js → ConfigActionOutput-BEf1U3_l.js} +1 -1
  168. package/dist/interface/ha/{ConfigActionPlugin-o1YNBh-g.js → ConfigActionPlugin-C57BUrJD.js} +5 -5
  169. package/dist/interface/ha/{ConfigActionSensor-BEvwg0tf.js → ConfigActionSensor-BkoSPCUJ.js} +5 -5
  170. package/dist/interface/ha/{ConfigActionSnapshot-Bnw0JNNj.js → ConfigActionSnapshot-CC3EpmCq.js} +2 -2
  171. package/dist/interface/ha/{ConfigActionVariable-oGPagsvF.js → ConfigActionVariable-JDyDhSzZ.js} +1 -1
  172. package/dist/interface/ha/{ConfigConditionIfElse-7LCDNDvS.js → ConfigConditionIfElse-BVg-TUpv.js} +3 -3
  173. package/dist/interface/ha/{ConfigConditionSensorState-nO-s7wi6.js → ConfigConditionSensorState-YYeWly1H.js} +4 -4
  174. package/dist/interface/ha/{ConfigConditionSwitch-GrIKkY-P.js → ConfigConditionSwitch-DQHXX-4U.js} +5 -5
  175. package/dist/interface/ha/{ConfigSensorValueInput-Cthp3KXt.js → ConfigSensorValueInput-BuuzQ1nJ.js} +4 -4
  176. package/dist/interface/ha/{ConfigTriggerDetection-CJE9QFaK.js → ConfigTriggerDetection-CUvkAmpJ.js} +12 -12
  177. package/dist/interface/ha/{ConfigTriggerGeofence-Cyeu7Cit.js → ConfigTriggerGeofence-CCHELnfy.js} +7 -7
  178. package/dist/interface/ha/{ConfigTriggerMqtt-D5EoOztE.js → ConfigTriggerMqtt-BfLnCiWZ.js} +1 -1
  179. package/dist/interface/ha/{ConfigTriggerSensor-DYg_HRjO.js → ConfigTriggerSensor-Bi-Jld2G.js} +1 -1
  180. package/dist/interface/ha/{ConfigTriggerSystem-DzpajiyS.js → ConfigTriggerSystem-_HXrWjaJ.js} +2 -2
  181. package/dist/interface/ha/{ConfigTriggerWebhook-IE4PVb4O.js → ConfigTriggerWebhook-CFYsVF_r.js} +1 -1
  182. package/dist/interface/ha/{Console-BYgny5Dy.js → Console-CR95JZFd.js} +8 -8
  183. package/dist/interface/ha/{CuiAutomationRunsDialog-CoYgpbW0.js → CuiAutomationRunsDialog--mpkPFmw.js} +2 -2
  184. package/dist/interface/ha/{CuiBottomSheet-C4cK3fYK.js → CuiBottomSheet-DfFzwDjq.js} +1 -1
  185. package/dist/interface/ha/{CuiCameraRecordings-BAxchc71.js → CuiCameraRecordings-DCIFFbFk.js} +17 -18
  186. package/dist/interface/ha/{CuiCameraShares-CfQr1iyX.js → CuiCameraShares-Dwv_XtX4.js} +2 -2
  187. package/dist/interface/ha/{CuiCameraTable-B60mcEl_.js → CuiCameraTable-L6wd-VYz.js} +2 -2
  188. package/dist/interface/ha/{CuiChartTable-CbUVz-Cj.js → CuiChartTable-CxJR8u6U.js} +42 -42
  189. package/dist/interface/ha/{CuiConsole-DEjAQFwC.js → CuiConsole-CvL9TXZY.js} +20 -20
  190. package/dist/interface/ha/{CuiDataTable-005ptLsa.js → CuiDataTable-Bn80WJXi.js} +6 -6
  191. package/dist/interface/ha/{CuiPluginCard-BWwPLJ6m.js → CuiPluginCard-CtOzPAal.js} +18 -18
  192. package/dist/interface/ha/{CuiPluginOAuthButton-CgmDgRY9.js → CuiPluginOAuthButton-1LgNMLII.js} +3 -3
  193. package/dist/interface/ha/{CuiPluginTrustBadge-BWnP1whX.js → CuiPluginTrustBadge-mHuy3ab9.js} +1 -1
  194. package/dist/interface/ha/{CuiQRCode-ONkk6Wqy.js → CuiQRCode-CloepWte.js} +2 -2
  195. package/dist/interface/ha/{CuiSchema-C3uI1GwG.js → CuiSchema-CJsEWewj.js} +19 -19
  196. package/dist/interface/ha/{CuiTopNavbarItem-Bhws0XkE.js → CuiTopNavbarItem-B2EM-tmz.js} +1 -1
  197. package/dist/interface/ha/{Faces-DuxYlZGd.js → Faces-BMkZfxDm.js} +107 -107
  198. package/dist/interface/ha/{FirstSteps-BAlqShSK.js → FirstSteps-BH0mga3u.js} +11 -11
  199. package/dist/interface/ha/{Floorplan-BVwSNFd6.js → Floorplan-CyfIUI4Z.js} +275 -275
  200. package/dist/interface/ha/{Instances-BM9sRNSP.js → Instances-BwNXc91J.js} +70 -70
  201. package/dist/interface/ha/{Logs-KISz4BU-.js → Logs-CcSiN16r.js} +8 -8
  202. package/dist/interface/ha/{Menu-DYI6PeIn.js → Menu-qdN0OBb7.js} +10 -10
  203. package/dist/interface/ha/{Metrics-BjpKFunA.js → Metrics-ClM5lhvC.js} +89 -89
  204. package/dist/interface/ha/{OAuthDeviceFlow-DG-KUGZj.js → OAuthDeviceFlow-BBr-rER_.js} +3 -3
  205. package/dist/interface/ha/{Plugin-BjWyUUhe.js → Plugin-BBkSXygO.js} +50 -50
  206. package/dist/interface/ha/{PluginConsole-BK3cotea.js → PluginConsole-DqrBnXSX.js} +6 -6
  207. package/dist/interface/ha/{PluginDetail-BDzDeShX.js → PluginDetail-Clu6nv-B.js} +9 -9
  208. package/dist/interface/ha/{PluginSearch-DsFUuPC-.js → PluginSearch-Dn-24FLX.js} +32 -32
  209. package/dist/interface/ha/{PluginUpdateProgress-BMrdkjRq.js → PluginUpdateProgress-CzhHUKDg.js} +3 -3
  210. package/dist/interface/ha/{Plugins-3WPnsHXw.js → Plugins-qYJD5ioU.js} +16 -16
  211. package/dist/interface/ha/{Recordings-0wDF4ArK.js → Recordings-CBIt3vL7.js} +354 -355
  212. package/dist/interface/ha/{SensorEdit-B0L2zIha.js → SensorEdit-BbG6apZA.js} +349 -349
  213. package/dist/interface/ha/{SensorHistory-CQJEY1sW.js → SensorHistory-CqGsnQPW.js} +2 -2
  214. package/dist/interface/ha/{Sensors-BYdBTCLo.js → Sensors-mKWkCDF8.js} +474 -448
  215. package/dist/interface/ha/{Settings-BaqGiBCa.js → Settings-C5J4ubiA.js} +10 -10
  216. package/dist/interface/ha/{SettingsAccount-B0Sth0EF.js → SettingsAccount-tCyZsBxG.js} +39 -39
  217. package/dist/interface/ha/{SettingsAppearance-B_oylmTa.js → SettingsAppearance-DqJp4Clt.js} +6 -6
  218. package/dist/interface/ha/{SettingsBackup-BLmoV5AW.js → SettingsBackup-CHnCKYgz.js} +5 -5
  219. package/dist/interface/ha/{SettingsList-CMX7wMye.js → SettingsList-DsQOPeKW.js} +1 -1
  220. package/dist/interface/ha/{SettingsMqtt-C-sGwxOZ.js → SettingsMqtt-TPIsEcXe.js} +180 -180
  221. package/dist/interface/ha/{SettingsNotifications-tc9FCCUF.js → SettingsNotifications-DH3T_xyh.js} +3 -3
  222. package/dist/interface/ha/{SettingsRecordings-DDs16z2A.js → SettingsRecordings-Ay8lj8Lm.js} +4 -4
  223. package/dist/interface/ha/{SettingsRemote-0c0umjFJ.js → SettingsRemote-CHiBADuu.js} +314 -314
  224. package/dist/interface/ha/{SettingsSystem-DfXxWXQk.js → SettingsSystem-tqs40pUW.js} +8 -8
  225. package/dist/interface/ha/{SettingsUsers-CmjC0zsF.js → SettingsUsers-BUbC_Qc7.js} +39 -39
  226. package/dist/interface/ha/{Terminal-nbUX6PPZ.js → Terminal-f_b-089t.js} +4 -4
  227. package/dist/interface/ha/Training-Dcxo9PFi.js +1479 -0
  228. package/dist/interface/ha/{Updates-UaxBGn6D.js → Updates-aGl5hy8Q.js} +11 -11
  229. package/dist/interface/ha/{VariableInput-0bF2H1Bm.js → VariableInput-yJGbaZEo.js} +1 -1
  230. package/dist/interface/ha/{VersionsHandler-CnXVnfBl.js → VersionsHandler-Q4PfRpbs.js} +10 -10
  231. package/dist/interface/ha/{VirtualSensorCreate-BE60rAkJ.js → VirtualSensorCreate-Gbi6aJBh.js} +8 -8
  232. package/dist/interface/ha/{Workers-CaX3Z3w-.js → Workers-BbBqOc0H.js} +129 -129
  233. package/dist/interface/ha/{api-CmcbBFTx.js → api-DBu4gh4_.js} +8390 -8315
  234. package/dist/interface/ha/{api-S-NnjUWl.js → api-DY0z6Sp_.js} +3 -3
  235. package/dist/interface/ha/{auth-CqYE7s1-.js → auth-C2V-kpRp.js} +38 -38
  236. package/dist/interface/ha/{automationBlueprint-Dmp54JD1.js → automationBlueprint-MGUZJTFY.js} +4 -4
  237. package/dist/interface/ha/cameraui-cards.js +1 -1
  238. package/dist/interface/ha/{cards-MnCBmBIR.js → cards-BA6g_9R5.js} +566 -566
  239. package/dist/interface/ha/{config-C94KN4WM.js → config-BGlhgEOa.js} +15 -15
  240. package/dist/interface/ha/{dist-BQFunPaA.js → dist-BqTZri2H.js} +743 -725
  241. package/dist/interface/ha/{mqtt-HDLqlOJt.js → mqtt-BLKZNA-E.js} +15 -15
  242. package/dist/interface/ha/{notifications-C2_2_NRh.js → notifications-BW0RNMnG.js} +22 -22
  243. package/dist/interface/ha/{pinia-DLNUke3Q.js → pinia-DINxhtY-.js} +168 -165
  244. package/dist/interface/ha/{plugins-l2i4DgqO.js → plugins-Cj-B4Nwy.js} +68 -68
  245. package/dist/interface/ha/{rooms-Bp1ZVAzT.js → rooms-C32i51p-.js} +8 -8
  246. package/dist/interface/ha/{server-BsduJDAB.js → server-CfbE_0Z9.js} +32 -32
  247. package/dist/interface/ha/{types-iZUCCt1P.js → types-Ry6RjBNa.js} +17 -17
  248. package/dist/interface/ha/ungrouped-CO29-tSV.js +1320 -0
  249. package/dist/interface/ha/{updates-CDsPvhpo.js → updates-CZPI8XJ1.js} +37 -37
  250. package/dist/interface/ha/{useAppVersion-BJtSGn4X.js → useAppVersion-9jfqRo_z.js} +1 -1
  251. package/dist/interface/ha/{useLogsSocket-Ck-ZQpQD.js → useLogsSocket-B0E7a3ys.js} +1 -1
  252. package/dist/interface/ha/{useNavLayout-Bn6HYs-i.js → useNavLayout-B2wfeha-.js} +2 -2
  253. package/dist/interface/ha/{useServerRestart-fff_KK9Y.js → useServerRestart-CCH-yMWR.js} +1 -1
  254. package/dist/interface/ha/{useTabSwipe-B1CQZuyT.js → useTabSwipe-D2uqGEvR.js} +1 -1
  255. package/dist/interface/ha/{useUpdateChannel-DUBmGEDe.js → useUpdateChannel--SP3Wjym.js} +2 -2
  256. package/dist/interface/ha/{useUpdatesSocket-DoLb2kcJ.js → useUpdatesSocket-BBbUCMU-.js} +1 -1
  257. package/dist/interface/ha/{useUserOptions-D0kNSHFH.js → useUserOptions-Bh54UAkH.js} +1 -1
  258. package/dist/interface/index.html +28 -27
  259. package/dist/interface/sw.js +1 -1
  260. package/dist/server/package.json +1 -1
  261. package/dist/server/src/api/controllers/training.controller.d.ts +4 -2
  262. package/dist/server/src/api/controllers/training.controller.js +2 -2
  263. package/dist/server/src/api/controllers/training.controller.js.map +1 -1
  264. package/dist/server/src/api/database/record-schemas.d.ts +1 -0
  265. package/dist/server/src/api/database/record-schemas.js +1 -0
  266. package/dist/server/src/api/database/record-schemas.js.map +1 -1
  267. package/dist/server/src/api/routes/training.routes.js +3 -2
  268. package/dist/server/src/api/routes/training.routes.js.map +1 -1
  269. package/dist/server/src/api/schemas/training.schema.d.ts +4 -0
  270. package/dist/server/src/api/schemas/training.schema.js +3 -0
  271. package/dist/server/src/api/schemas/training.schema.js.map +1 -1
  272. package/dist/server/src/api/services/sensors.service.d.ts +1 -0
  273. package/dist/server/src/api/services/sensors.service.js +1 -0
  274. package/dist/server/src/api/services/sensors.service.js.map +1 -1
  275. package/dist/server/src/api/types/index.d.ts +2 -1
  276. package/dist/server/src/camera/decoder/detection-coordinator.js +23 -7
  277. package/dist/server/src/camera/decoder/detection-coordinator.js.map +1 -1
  278. package/dist/server/src/camera/decoder/detection-window.d.ts +5 -0
  279. package/dist/server/src/camera/decoder/detection-window.js +5 -5
  280. package/dist/server/src/camera/decoder/detection-window.js.map +1 -1
  281. package/dist/server/src/camera/decoder/event-manager.d.ts +5 -1
  282. package/dist/server/src/camera/decoder/event-manager.js +21 -14
  283. package/dist/server/src/camera/decoder/event-manager.js.map +1 -1
  284. package/dist/server/src/camera/decoder/training-sink.d.ts +14 -3
  285. package/dist/server/src/camera/decoder/training-sink.js +32 -17
  286. package/dist/server/src/camera/decoder/training-sink.js.map +1 -1
  287. package/dist/server/src/camera/decoder/types.d.ts +1 -1
  288. package/dist/server/src/camera/decoder/types.js +2 -6
  289. package/dist/server/src/camera/decoder/types.js.map +1 -1
  290. package/dist/server/src/manager/trainingCandidateManager.d.ts +2 -3
  291. package/dist/server/src/manager/trainingCandidateManager.js +17 -18
  292. package/dist/server/src/manager/trainingCandidateManager.js.map +1 -1
  293. package/dist/server/src/manager/types.d.ts +5 -0
  294. package/dist/server/src/remote/api/routes/train.d.ts +6 -1
  295. package/dist/server/src/remote/api/routes/train.js +6 -2
  296. package/dist/server/src/remote/api/routes/train.js.map +1 -1
  297. package/dist/server/src/sensors/registry.d.ts +1 -0
  298. package/dist/server/src/sensors/registry.js +10 -0
  299. package/dist/server/src/sensors/registry.js.map +1 -1
  300. package/package.json +1 -1
  301. package/dist/interface/assets/Automation-CDvt2MXN.js +0 -3
  302. package/dist/interface/assets/Automations-2K-7hZfK.js +0 -2
  303. package/dist/interface/assets/Camera-B72IU-UF.js +0 -2
  304. package/dist/interface/assets/Camera-Cm9I0H6c.css +0 -1
  305. package/dist/interface/assets/Camview-KzzN0Q1w.js +0 -1
  306. package/dist/interface/assets/ConfigActionNotification-C2uXIMpm.js +0 -1
  307. package/dist/interface/assets/ConfigTriggerGeofence-Cuq1SnOZ.js +0 -1
  308. package/dist/interface/assets/Console-DkylrXI4.js +0 -1
  309. package/dist/interface/assets/CuiBottomSheet-DILQuWKb.js +0 -1
  310. package/dist/interface/assets/CuiCameraRecordings-Bi0I7jeO.js +0 -1
  311. package/dist/interface/assets/CuiCameraTable-CUdAnRJP.js +0 -1
  312. package/dist/interface/assets/CuiQRCode-D04Onyhk.js +0 -1
  313. package/dist/interface/assets/CuiRecordingsGrid-BhATIjIf.css +0 -1
  314. package/dist/interface/assets/CuiRecordingsGrid-BzyJWpFt.js +0 -1
  315. package/dist/interface/assets/CuiSchema-thjfmEWw.js +0 -1
  316. package/dist/interface/assets/FirstSteps-C6GVpZVr.js +0 -1
  317. package/dist/interface/assets/Floorplan-Q-UYDnrE.js +0 -1
  318. package/dist/interface/assets/Metrics-CYZF-em9.js +0 -9
  319. package/dist/interface/assets/Plugin-DuPHiiYJ.js +0 -1
  320. package/dist/interface/assets/PluginDetail-DWP7_hNa.js +0 -2
  321. package/dist/interface/assets/PluginSearch-1djFQUjL.js +0 -1
  322. package/dist/interface/assets/PluginSearch-Ba-hQHxm.js +0 -2
  323. package/dist/interface/assets/Plugins-BZ3U4pcG.js +0 -1
  324. package/dist/interface/assets/Recordings-CI5MIFR-.js +0 -1
  325. package/dist/interface/assets/SensorEdit-B6s-VZ3F.js +0 -1
  326. package/dist/interface/assets/Sensors-DDPUwbb-.js +0 -2
  327. package/dist/interface/assets/SettingsAccount-CKi0z3Bm.js +0 -1
  328. package/dist/interface/assets/SettingsAppearance-CDbQnSvl.js +0 -1
  329. package/dist/interface/assets/SettingsAppearance-D9Y28zzz.js +0 -1
  330. package/dist/interface/assets/SettingsNotifications-xHV5KiZg.js +0 -1
  331. package/dist/interface/assets/SettingsRemote-7h2dKJlF.js +0 -2
  332. package/dist/interface/assets/SettingsSystem-D-MLhCdN.js +0 -2
  333. package/dist/interface/assets/Training-B5SzDUAC.css +0 -1
  334. package/dist/interface/assets/Training-DWrQVSS0.js +0 -1
  335. package/dist/interface/assets/api-CFf063x3.js +0 -4
  336. package/dist/interface/assets/api-eoOLTOnS.css +0 -2
  337. package/dist/interface/assets/cameraSources-CgAEmb37.js +0 -1
  338. package/dist/interface/assets/cloudHandoff-B_kCnm4R.js +0 -1
  339. package/dist/interface/assets/main--lW4P3A4.js +0 -3
  340. package/dist/interface/assets/ungrouped-C6pQb0X4.css +0 -1
  341. package/dist/interface/assets/ungrouped-C_gJm6d7.js +0 -1
  342. package/dist/interface/assets/vendor-core-D0ANiY7g.js +0 -1
  343. package/dist/interface/ha/CuiRecordingsGrid-D6HHyF1D.js +0 -735
  344. package/dist/interface/ha/Training-GMcD4Qg9.js +0 -1440
  345. package/dist/interface/ha/ungrouped-wz-KNJpA.js +0 -426
@@ -0,0 +1,1479 @@
1
+ import { m as e } from "./ripple-BilzxWfY.js";
2
+ import { G as t, H as n, I as r, Jt as i, Wt as a, Y as o, _t as s, d as c, f as l, ft as u, gt as ee, kt as d, l as f, lt as p, ot as te, p as m, qt as h, r as g, rt as _, u as v, ut as y, v as b, x, xt as S, y as C, yt as w } from "./runtime-core.esm-bundler-D8slQ3BU.js";
3
+ import { t as ne } from "./tooltip-BIrD_hC8.js";
4
+ import { t as T } from "./chevron-down-P5MtUhJO.js";
5
+ import { t as re } from "./tag-CXgC9OZ6.js";
6
+ import { Ar as E, B as D, Ci as ie, Cr as O, G as k, L as A, Mn as ae, Mr as j, Mt as M, Nt as oe, Qt as N, R as P, Sr as se, V as F, Vi as I, c as ce, d as L, da as le, dr as ue, ea as R, fr as de, jt as z, kr as fe, mi as B, nt as pe, p as me, ti as he, ut as V, wi as H, xi as U, yn as ge, z as _e } from "./api-DBu4gh4_.js";
7
+ import { S as W, _ as ve, b as ye, i as be, w as xe } from "./intercomService-jB2mTgsn.js";
8
+ import { n as Se } from "./vue-i18n-Dcb07o5U.js";
9
+ import { t as Ce } from "./button-BlYuI0Q7.js";
10
+ import { n as we, t as Te } from "./inputicon-6-vaPLbw.js";
11
+ import { t as Ee } from "./inputtext-DGIESrd0.js";
12
+ import { a as De } from "./datepicker-BuvKhBWJ.js";
13
+ import { t as Oe } from "./close-Eq3txTBS.js";
14
+ import { t as ke } from "./progressbar-CIoPoMSe.js";
15
+ import { t as Ae } from "./ring-resize-VS4MSeBv.js";
16
+ import { t as G } from "./search-CoOsbgeb.js";
17
+ import { n as je, t as Me } from "./cloud-check-BFJzoUtz.js";
18
+ import { t as Ne } from "./trash-can-outline-DCqsCOd2.js";
19
+ import { t as Pe } from "./back-filled-Cxzg5vQg.js";
20
+ import { t as Fe } from "./settings-EKkSQLzv.js";
21
+ //#region ~icons/mdi/cloud-check-outline
22
+ var Ie = {
23
+ viewBox: "0 0 24 24",
24
+ width: "1.2em",
25
+ height: "1.2em"
26
+ };
27
+ function Le(e, t) {
28
+ return n(), m("svg", Ie, [...t[0] ||= [v("path", {
29
+ fill: "currentColor",
30
+ d: "M13 19c0 .34.04.67.09 1H6.5c-1.5 0-2.81-.5-3.89-1.57C1.54 17.38 1 16.09 1 14.58q0-1.95 1.17-3.48C3.34 9.57 4 9.43 5.25 9.15c.42-1.53 1.25-2.77 2.5-3.72S10.42 4 12 4c1.95 0 3.6.68 4.96 2.04S19 9.05 19 11c1.15.13 2.1.63 2.86 1.5c.51.57.84 1.21 1 1.92A5.9 5.9 0 0 0 19 13h-2v-2c0-1.38-.5-2.56-1.46-3.54C14.56 6.5 13.38 6 12 6s-2.56.5-3.54 1.46C7.5 8.44 7 9.62 7 11h-.5c-.97 0-1.79.34-2.47 1.03c-.69.68-1.03 1.5-1.03 2.47s.34 1.79 1.03 2.5c.68.66 1.5 1 2.47 1h6.59c-.05.33-.09.66-.09 1m4.75.43l-1.59-1.59L15 19l2.75 3l4.75-4.75l-1.16-1.41z"
31
+ }, null, -1)]]);
32
+ }
33
+ var Re = s({
34
+ name: "mdi-cloud-check-outline",
35
+ render: Le
36
+ }), ze = {
37
+ viewBox: "0 0 24 24",
38
+ width: "1.2em",
39
+ height: "1.2em"
40
+ };
41
+ function Be(e, t) {
42
+ return n(), m("svg", ze, [...t[0] ||= [v("path", {
43
+ fill: "currentColor",
44
+ d: "M6.5 20q-2.28 0-3.89-1.57Q1 16.85 1 14.58q0-1.95 1.17-3.48q1.18-1.53 3.08-1.95q.63-2.3 2.5-3.72Q9.63 4 12 4q2.93 0 4.96 2.04Q19 8.07 19 11q1.73.2 2.86 1.5q1.14 1.28 1.14 3q0 1.88-1.31 3.19T18.5 20H13q-.82 0-1.41-.59Q11 18.83 11 18v-5.15L9.4 14.4L8 13l4-4l4 4l-1.4 1.4l-1.6-1.55V18h5.5q1.05 0 1.77-.73q.73-.72.73-1.77t-.73-1.77Q19.55 13 18.5 13H17v-2q0-2.07-1.46-3.54Q14.08 6 12 6Q9.93 6 8.46 7.46Q7 8.93 7 11h-.5q-1.45 0-2.47 1.03Q3 13.05 3 14.5T4.03 17q1.02 1 2.47 1H9v2m3-7"
45
+ }, null, -1)]]);
46
+ }
47
+ var Ve = s({
48
+ name: "mdi-cloud-upload-outline",
49
+ render: Be
50
+ });
51
+ //#endregion
52
+ //#region src/api/routes/training.ts
53
+ async function K(e = {}, { signal: t } = {}) {
54
+ return (await R.get("/training/candidates", {
55
+ params: e,
56
+ signal: t
57
+ })).data;
58
+ }
59
+ async function q(e, t) {
60
+ return (await R.patch(`/training/candidates/${e}`, t)).data;
61
+ }
62
+ async function He(e) {
63
+ await R.delete(`/training/candidates/${e}`);
64
+ }
65
+ async function Ue(e) {
66
+ return (await R.post("/training/candidates/submit", { ids: e })).data;
67
+ }
68
+ async function J({ cursor: e, signal: t } = {}) {
69
+ return (await R.get("/training/submissions", {
70
+ params: e ? { cursor: e } : void 0,
71
+ signal: t
72
+ })).data;
73
+ }
74
+ async function Y(e) {
75
+ await R.delete(`/training/submissions/${e}`);
76
+ }
77
+ async function X({ signal: e } = {}) {
78
+ return (await R.get("/training/settings", { signal: e })).data;
79
+ }
80
+ async function Z(e) {
81
+ return (await R.patch("/training/settings", e)).data;
82
+ }
83
+ var We = class {
84
+ queryClient = I();
85
+ getCandidatesQuery() {
86
+ return U({
87
+ queryKey: ["training-candidates"],
88
+ queryFn: ({ signal: e }) => K({}, { signal: e }),
89
+ staleTime: 5e3
90
+ });
91
+ }
92
+ getSettingsQuery() {
93
+ return U({
94
+ queryKey: ["training-settings"],
95
+ queryFn: ({ signal: e }) => X({ signal: e }),
96
+ staleTime: 3e4
97
+ });
98
+ }
99
+ patchCandidateMutation() {
100
+ return H({
101
+ mutationFn: ({ id: e, patch: t }) => q(e, t),
102
+ onSuccess: async () => {
103
+ await this.queryClient.refetchQueries({
104
+ queryKey: ["training-candidates"],
105
+ exact: !0
106
+ });
107
+ }
108
+ });
109
+ }
110
+ deleteCandidateMutation() {
111
+ return H({
112
+ mutationFn: He,
113
+ onSuccess: async () => {
114
+ await this.queryClient.refetchQueries({
115
+ queryKey: ["training-candidates"],
116
+ exact: !0
117
+ });
118
+ }
119
+ });
120
+ }
121
+ deleteSubmissionMutation() {
122
+ return H({ mutationFn: Y });
123
+ }
124
+ submitCandidatesMutation() {
125
+ return H({
126
+ mutationFn: Ue,
127
+ onSuccess: async () => {
128
+ await this.queryClient.refetchQueries({
129
+ queryKey: ["training-candidates"],
130
+ exact: !0
131
+ });
132
+ }
133
+ });
134
+ }
135
+ patchSettingsMutation() {
136
+ return H({
137
+ mutationFn: Z,
138
+ onSuccess: async () => {
139
+ await this.queryClient.refetchQueries({
140
+ queryKey: ["training-settings"],
141
+ exact: !0
142
+ });
143
+ }
144
+ });
145
+ }
146
+ }, Ge = {
147
+ viewBox: "0 0 24 24",
148
+ width: "1.2em",
149
+ height: "1.2em"
150
+ };
151
+ function Ke(e, t) {
152
+ return n(), m("svg", Ge, [...t[0] ||= [v("path", {
153
+ fill: "currentColor",
154
+ d: "M11 18h2v-2h-2zm1-16A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8m0-14a4 4 0 0 0-4 4h2a2 2 0 0 1 2-2a2 2 0 0 1 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5a4 4 0 0 0-4-4"
155
+ }, null, -1)]]);
156
+ }
157
+ var qe = s({
158
+ name: "mdi-help-circle-outline",
159
+ render: Ke
160
+ }), Je = [
161
+ "person",
162
+ "vehicle",
163
+ "animal",
164
+ "package",
165
+ "face",
166
+ "license_plate"
167
+ ], Ye = { desktop: {
168
+ maxWidth: "1280px",
169
+ width: "85vw"
170
+ } }, Xe = { class: "flex items-center justify-between gap-2 text-sm" }, Ze = { class: "min-w-0 flex items-center gap-2" }, Qe = { class: "font-medium truncate" }, $e = { class: "text-muted shrink-0" }, et = { class: "text-muted tabular-nums shrink-0" }, tt = ["data-stage-zoom"], nt = ["src"], rt = [
171
+ "x",
172
+ "y",
173
+ "width",
174
+ "height",
175
+ "stroke",
176
+ "fill",
177
+ "fill-opacity",
178
+ "stroke-width",
179
+ "onPointerdown"
180
+ ], it = ["onPointerdown"], at = ["cx", "cy"], ot = [
181
+ "cx",
182
+ "cy",
183
+ "fill"
184
+ ], st = [
185
+ "x",
186
+ "y",
187
+ "width",
188
+ "height",
189
+ "stroke",
190
+ "fill"
191
+ ], ct = ["data-box-label", "onClick"], lt = { class: "bbox-label-text" }, ut = {
192
+ key: 0,
193
+ class: "bbox-label-confidence"
194
+ }, dt = {
195
+ key: 1,
196
+ class: "bbox-label-confidence"
197
+ }, ft = ["src"], pt = { class: "absolute inset-0 w-full h-full" }, mt = [
198
+ "x",
199
+ "y",
200
+ "width",
201
+ "height",
202
+ "stroke",
203
+ "fill"
204
+ ], ht = [
205
+ "x",
206
+ "y",
207
+ "width",
208
+ "height",
209
+ "stroke",
210
+ "fill"
211
+ ], gt = {
212
+ key: 2,
213
+ class: "absolute left-2 top-1/2 -translate-y-1/2 z-[5] dark-mode"
214
+ }, _t = {
215
+ key: 3,
216
+ class: "absolute right-2 top-1/2 -translate-y-1/2 z-[5] dark-mode"
217
+ }, vt = {
218
+ key: 0,
219
+ class: "flex items-center justify-center gap-2"
220
+ }, yt = {
221
+ class: "text-muted text-sm",
222
+ for: "plate-text"
223
+ }, bt = { class: "flex items-center justify-center gap-1.5" }, xt = { class: "text-muted text-sm text-center" }, St = {
224
+ key: 1,
225
+ class: "grid grid-cols-[auto_1fr] gap-x-3 gap-y-1 justify-center mx-auto text-sm text-muted"
226
+ }, Ct = .01, wt = .006, Tt = 26, Et = 60, Dt = 400, Ot = 110, kt = 2, At = 80, jt = 50, Mt = .003, Nt = /*#__PURE__*/ O(/* @__PURE__ */ x({
227
+ __name: "TrainingBoxEditor",
228
+ props: {
229
+ candidates: {},
230
+ startId: {},
231
+ cameraName: { type: Function },
232
+ imageUrl: { type: Function },
233
+ onSave: { type: Function },
234
+ onDelete: { type: Function }
235
+ },
236
+ setup(r, { expose: s }) {
237
+ let u = r, { t: y, te: x } = Se(), ne = [
238
+ "nw",
239
+ "ne",
240
+ "sw",
241
+ "se"
242
+ ], T = /* @__PURE__ */ new Map(), E = w(/* @__PURE__ */ new Set()), D = w(/* @__PURE__ */ new Set()), ie = Math.max(0, u.candidates.findIndex((e) => e.id === u.startId)), O = me(), k = _("rootRef"), A = _("labelMenuRef"), j = _("stageRef"), M = _("frameRef"), N = _("svgRef"), P = S(u.candidates[ie]?.boxes.map((e) => ({ ...e })) ?? []), se = S({
243
+ w: 16,
244
+ h: 9
245
+ }), F = S(null), I = S(null), L = S(-1), le = S(!1), R = xe("(any-pointer: fine)"), z = S(null), fe = null, B = S(-1), he = S("person"), V = S(ie), { zoom: H, pan: U, constraining: _e, minimapStyle: W, minimapBoxStyle: be, onZoomPan: we, onDoubleClick: Te, onTouchStart: De, onTouchEnd: Oe, reset: ke } = pe(j, M), { height: Ae } = ve(M), G = f(() => u.candidates[V.value]), je = f(() => u.candidates.slice(0, V.value + 1).filter((e) => !E.has(e.id)).length), Me = f(() => u.candidates.filter((e) => !E.has(e.id)).length), Pe = f(() => u.candidates.slice(0, V.value).some((e) => !E.has(e.id))), Fe = f(() => u.candidates.slice(V.value + 1).some((e) => !E.has(e.id))), Ie = f(() => D.has(G.value.id) ? "verified" : G.value.status), Le = f(() => {
246
+ let e = P.value[L.value];
247
+ return e?.label === "license_plate" ? e : null;
248
+ }), Re = f(() => [...Je.map((e) => ({
249
+ key: e,
250
+ label: Ve(e),
251
+ icon: ge(e).icon,
252
+ iconProps: { style: { color: ge(e).color } },
253
+ active: P.value[B.value]?.label === e,
254
+ onClick: () => Vt(e)
255
+ })), {
256
+ key: "remove",
257
+ label: y("components.training_editor.remove_box"),
258
+ icon: Ne,
259
+ iconProps: { class: "text-red-500" },
260
+ labelProps: { class: "text-red-500" },
261
+ onClick: () => Ut(B.value)
262
+ }]), ze = f(() => (e) => {
263
+ let t = Ae.value || 360;
264
+ return e.y * t >= Tt ? "above" : t - (e.y + e.height) * t >= Tt ? "below" : "inside";
265
+ }), Be = f(() => (e) => e.x > .7);
266
+ function Ve(e) {
267
+ let t = `components.training_editor.labels.${e}`;
268
+ return x(t) ? y(t) : e;
269
+ }
270
+ function K(e) {
271
+ return ge(e);
272
+ }
273
+ function q(e) {
274
+ return `${e * 100}%`;
275
+ }
276
+ function He(e, t) {
277
+ return q(t === "nw" || t === "sw" ? e.x : e.x + e.width);
278
+ }
279
+ function Ue(e, t) {
280
+ return q(t === "nw" || t === "ne" ? e.y : e.y + e.height);
281
+ }
282
+ function J(e) {
283
+ let t = { backgroundColor: K(e.label).color };
284
+ Be.value(e) ? t.right = q(1 - e.x - e.width) : t.left = q(e.x);
285
+ let n = ze.value(e);
286
+ return t.top = n === "above" ? q(e.y) : n === "below" ? q(e.y + e.height) : `calc(${q(e.y)} + 2px)`, t;
287
+ }
288
+ function Y(e) {
289
+ let t = e.target;
290
+ t.naturalWidth && t.naturalHeight && (se.value = {
291
+ w: t.naturalWidth,
292
+ h: t.naturalHeight
293
+ });
294
+ }
295
+ function X(e) {
296
+ let t = N.value?.getBoundingClientRect();
297
+ return !t || t.width === 0 || t.height === 0 ? {
298
+ x: 0,
299
+ y: 0
300
+ } : {
301
+ x: Math.min(1, Math.max(0, (e.clientX - t.left) / t.width)),
302
+ y: Math.min(1, Math.max(0, (e.clientY - t.top) / t.height))
303
+ };
304
+ }
305
+ function Z(e, t) {
306
+ F.value = {
307
+ ...t,
308
+ moved: !1
309
+ }, N.value?.setPointerCapture(e.pointerId);
310
+ }
311
+ function We(e) {
312
+ if (H.value > 1 || !e.isPrimary) return;
313
+ let { x: t, y: n } = X(e);
314
+ Z(e, {
315
+ mode: "draw",
316
+ index: -1,
317
+ startX: t,
318
+ startY: n,
319
+ origin: {
320
+ label: he.value,
321
+ confidence: 1,
322
+ x: t,
323
+ y: n,
324
+ width: 0,
325
+ height: 0
326
+ }
327
+ });
328
+ }
329
+ function Ge(e, t) {
330
+ if (!t.isPrimary) return;
331
+ let { x: n, y: r } = X(t);
332
+ L.value = e, Z(t, {
333
+ mode: "move",
334
+ index: e,
335
+ startX: n,
336
+ startY: r,
337
+ origin: { ...P.value[e] }
338
+ });
339
+ }
340
+ function Ke(e, t, n) {
341
+ if (!n.isPrimary) return;
342
+ let { x: r, y: i } = X(n);
343
+ L.value = e, Z(n, {
344
+ mode: "resize",
345
+ index: e,
346
+ corner: t,
347
+ startX: r,
348
+ startY: i,
349
+ origin: { ...P.value[e] }
350
+ });
351
+ }
352
+ function Ye(e) {
353
+ e.touches.length > 1 && F.value && (F.value = null, I.value = null, z.value = null), De(e);
354
+ }
355
+ function Nt(e) {
356
+ let t = F.value;
357
+ if (!t) return;
358
+ let { x: n, y: r } = X(e);
359
+ if (Math.hypot(n - t.startX, r - t.startY) > wt && (t.moved = !0), e.pointerType === "touch" && t.moved && (Pt(t) ? Ft(e) : z.value = null), t.mode === "draw") {
360
+ if (t.moved) {
361
+ let e = zt(t.startX, t.startY, n, r);
362
+ I.value = e.width >= Ct && e.height >= Ct ? {
363
+ label: he.value,
364
+ confidence: 1,
365
+ ...e
366
+ } : null;
367
+ }
368
+ return;
369
+ }
370
+ if (t.mode === "move") {
371
+ if (!t.moved) return;
372
+ let e = P.value[t.index];
373
+ e.x = Math.min(1 - t.origin.width, Math.max(0, t.origin.x + (n - t.startX))), e.y = Math.min(1 - t.origin.height, Math.max(0, t.origin.y + (r - t.startY)));
374
+ return;
375
+ }
376
+ let i = t.corner === "nw" || t.corner === "sw" ? t.origin.x + t.origin.width : t.origin.x, a = t.corner === "nw" || t.corner === "ne" ? t.origin.y + t.origin.height : t.origin.y;
377
+ Object.assign(P.value[t.index], zt(i, a, n, r));
378
+ }
379
+ function Q(e) {
380
+ let t = F.value;
381
+ if (F.value = null, z.value = null, t) {
382
+ if (t.mode === "draw") {
383
+ I.value && I.value.width >= Ct && I.value.height >= Ct ? (P.value.push({ ...I.value }), L.value = P.value.length - 1) : t.moved || (L.value = -1), I.value = null;
384
+ return;
385
+ }
386
+ t.mode === "move" && !t.moved && Bt(t.index, e);
387
+ }
388
+ }
389
+ function Pt(e) {
390
+ let t = N.value?.getBoundingClientRect();
391
+ if (!t || t.width === 0) return !1;
392
+ let n = e.mode === "draw" ? I.value : P.value[e.index];
393
+ return !n || Math.max(n.width * t.width, n.height * t.height) <= jt;
394
+ }
395
+ function Ft(e) {
396
+ let t = M.value?.getBoundingClientRect(), n = j.value?.getBoundingClientRect();
397
+ if (!t || !n || t.width === 0 || t.height === 0) {
398
+ z.value = null;
399
+ return;
400
+ }
401
+ let r = Ot / 2, i = Math.min(Math.max(e.clientX - n.left, 59), n.width - r - 4), a = e.clientY - n.top - At;
402
+ a - r < 4 && (a = e.clientY - n.top + At), z.value = {
403
+ x: i,
404
+ y: a,
405
+ frameW: t.width,
406
+ frameH: t.height,
407
+ tx: r - (e.clientX - t.left) * kt,
408
+ ty: r - (e.clientY - t.top) * kt
409
+ };
410
+ }
411
+ function It(e) {
412
+ let t = e instanceof HTMLElement || e instanceof SVGElement ? e : null;
413
+ if (!t || j.value?.contains(t) || t.closest(".p-dialog-header") || t.closest("button")) return !1;
414
+ let n = k.value?.closest(".p-dialog-content")?.lastElementChild;
415
+ return !(n && n !== k.value && n.contains(t));
416
+ }
417
+ function Lt(e) {
418
+ if (fe = null, e.touches.length !== 1 || !It(e.target)) return;
419
+ let t = e.touches[0];
420
+ fe = {
421
+ x: t.clientX,
422
+ y: t.clientY,
423
+ at: Date.now()
424
+ };
425
+ }
426
+ function Rt(e) {
427
+ let t = fe;
428
+ if (fe = null, !t || e.changedTouches.length !== 1) return;
429
+ let n = e.changedTouches[0], r = n.clientX - t.x, i = n.clientY - t.y;
430
+ Date.now() - t.at <= Dt && Math.abs(r) >= Et && Math.abs(r) > 2 * Math.abs(i) && $(r < 0 ? 1 : -1);
431
+ }
432
+ function zt(e, t, n, r) {
433
+ return {
434
+ x: Math.min(e, n),
435
+ y: Math.min(t, r),
436
+ width: Math.abs(n - e),
437
+ height: Math.abs(r - t)
438
+ };
439
+ }
440
+ function Bt(e, t) {
441
+ B.value = e;
442
+ let n = M.value?.querySelector(`[data-box-label="${e}"]`);
443
+ A.value?.toggleMenu(t, n ?? void 0);
444
+ }
445
+ function Vt(e) {
446
+ let t = P.value[B.value];
447
+ t && (t.label = e, t.confidence = 1, he.value = e);
448
+ }
449
+ function Ht(e) {
450
+ let t = P.value[L.value];
451
+ t && (t.text = (e ?? "").toUpperCase().replace(/[^A-Z0-9ÄÖÜ\- ]/g, "") || void 0);
452
+ }
453
+ function Ut(e) {
454
+ e < 0 || e >= P.value.length || (P.value.splice(e, 1), L.value = -1);
455
+ }
456
+ function Wt(e, t = !0) {
457
+ e < 0 || e >= u.candidates.length || (t && T.set(G.value.id, P.value.map((e) => ({ ...e }))), V.value = e, P.value = (T.get(G.value.id) ?? G.value.boxes).map((e) => ({ ...e })), I.value = null, F.value = null, z.value = null, L.value = -1, B.value = -1, A.value?.hide(), ke());
458
+ }
459
+ async function Gt(e) {
460
+ return await u.onSave(G.value.id, P.value.map((e) => ({ ...e })), e), T.set(G.value.id, P.value.map((e) => ({ ...e }))), e === "verified" && D.add(G.value.id), $(1, !1) ? null : void 0;
461
+ }
462
+ function $(e, t = !0) {
463
+ let n = V.value + e;
464
+ for (; n >= 0 && n < u.candidates.length && E.has(u.candidates[n].id);) n += e;
465
+ return n < 0 || n >= u.candidates.length ? !1 : (Wt(n, t), !0);
466
+ }
467
+ async function Kt() {
468
+ let e = G.value.id;
469
+ return await u.onDelete(e), T.delete(e), E.add(e), $(1, !1) || $(-1, !1) ? null : void 0;
470
+ }
471
+ function qt() {
472
+ for (let e of [1, -1]) {
473
+ let t = V.value + e;
474
+ for (; t >= 0 && t < u.candidates.length && E.has(u.candidates[t].id);) t += e;
475
+ let n = u.candidates[t];
476
+ n && (new Image().src = u.imageUrl(n.id));
477
+ }
478
+ }
479
+ function Jt(e) {
480
+ P.value.length && (L.value = (L.value + e + P.value.length) % P.value.length);
481
+ }
482
+ function Yt(e) {
483
+ let t = P.value[L.value];
484
+ if (!t) return;
485
+ let n = Je, r = n[(n.indexOf(t.label) + e + n.length) % n.length];
486
+ t.label = r, t.confidence = 1, he.value = r;
487
+ }
488
+ function Xt(e, t, n) {
489
+ let r = P.value[L.value];
490
+ r && (n ? (r.width = Math.min(1 - r.x, Math.max(Ct, r.width + e)), r.height = Math.min(1 - r.y, Math.max(Ct, r.height + t))) : (r.x = Math.min(1 - r.width, Math.max(0, r.x + e)), r.y = Math.min(1 - r.height, Math.max(0, r.y + t))));
491
+ }
492
+ return te(V, qt, { immediate: !0 }), ye(window, "keydown", (e) => {
493
+ if (e.target?.closest?.("input, textarea")) return;
494
+ let t = {
495
+ ArrowLeft: [-.003, 0],
496
+ ArrowRight: [Mt, 0],
497
+ ArrowUp: [0, -.003],
498
+ ArrowDown: [0, Mt]
499
+ };
500
+ if (t[e.key]) {
501
+ if (L.value >= 0) {
502
+ e.preventDefault();
503
+ let [n, r] = t[e.key];
504
+ Xt(n, r, e.shiftKey);
505
+ } else !e.repeat && e.key === "ArrowLeft" ? $(-1) : !e.repeat && e.key === "ArrowRight" && $(1);
506
+ return;
507
+ }
508
+ e.repeat || (e.key === "Tab" ? (e.preventDefault(), Jt(e.shiftKey ? -1 : 1)) : e.key === "Escape" ? (L.value = -1, A.value?.hide()) : (e.key === "Delete" || e.key === "Backspace") && L.value >= 0 ? Ut(L.value) : e.key === "s" || e.key === "S" ? Yt(e.shiftKey ? -1 : 1) : e.key === " " && !A.value?.isOpen && (e.preventDefault(), Gt("verified")));
509
+ }), ye(() => k.value?.closest(".p-dialog-content") ?? void 0, "touchstart", Lt, { passive: !0 }), ye(() => k.value?.closest(".p-dialog-content") ?? void 0, "touchend", Rt, { passive: !0 }), s({
510
+ onConfirm: () => Gt("verified"),
511
+ onCancel: () => Kt()
512
+ }), (s, u) => {
513
+ let f = re, te = ue, _ = Ce, y = de, x = Ee, S = qe;
514
+ return n(), m("div", {
515
+ ref_key: "rootRef",
516
+ ref: k,
517
+ class: "flex flex-col gap-3 h-full min-h-0"
518
+ }, [
519
+ v("div", Xe, [v("div", Ze, [
520
+ C(f, {
521
+ severity: d(Ie) === "verified" ? "success" : "info",
522
+ value: s.$t(`views.training.status_${d(Ie)}`),
523
+ class: "shrink-0"
524
+ }, null, 8, ["severity", "value"]),
525
+ v("span", Qe, i(r.cameraName(d(G).cameraId)), 1),
526
+ v("span", $e, i(d(ce)(d(G).createdAt)), 1)
527
+ ]), v("span", et, i(d(je)) + " / " + i(d(Me)), 1)]),
528
+ v("div", {
529
+ ref_key: "stageRef",
530
+ ref: j,
531
+ class: "stage relative w-full bg-black rounded-lg shrink-0 overflow-hidden select-none"
532
+ }, [
533
+ C(d(oe), {
534
+ pan: d(U),
535
+ "onUpdate:pan": u[7] ||= (e) => ee(U) ? U.value = e : null,
536
+ zoom: d(H),
537
+ "onUpdate:zoom": u[8] ||= (e) => ee(H) ? H.value = e : null,
538
+ "pan-enabled": d(H) > 1 && !d(F),
539
+ "enable-control-button": !1,
540
+ "dbl-click-enabled": !1,
541
+ "min-zoom": 1,
542
+ "max-zoom": d(5),
543
+ selector: `[data-stage-zoom='${d(O)}']`,
544
+ "zoom-origin": "pointer",
545
+ class: a(["absolute inset-0 flex items-center justify-center", { "zoom-constraining": d(_e) }]),
546
+ onPanned: d(we),
547
+ onZoom: d(we),
548
+ onDblclick: d(Te),
549
+ onTouchstart: Ye,
550
+ onTouchend: d(Oe)
551
+ }, {
552
+ default: p(() => [v("div", {
553
+ ref_key: "frameRef",
554
+ ref: M,
555
+ "data-stage-zoom": d(O),
556
+ class: "frame relative",
557
+ style: h({
558
+ "--ar-w": d(se).w,
559
+ "--ar-h": d(se).h
560
+ })
561
+ }, [
562
+ v("img", {
563
+ src: r.imageUrl(d(G).id),
564
+ class: "absolute inset-0 w-full h-full",
565
+ draggable: "false",
566
+ onLoad: Y
567
+ }, null, 40, nt),
568
+ (n(), m("svg", {
569
+ ref_key: "svgRef",
570
+ ref: N,
571
+ class: a(["absolute inset-0 w-full h-full touch-none", d(H) > 1 ? "cursor-grab" : "cursor-crosshair"]),
572
+ onPointerdown: We,
573
+ onPointermove: Nt,
574
+ onPointerup: Q,
575
+ onPointercancel: Q
576
+ }, [(n(!0), m(g, null, t(d(P), (r, i) => (n(), m("g", { key: i }, [v("rect", {
577
+ x: q(r.x),
578
+ y: q(r.y),
579
+ width: q(r.width),
580
+ height: q(r.height),
581
+ stroke: K(r.label).color,
582
+ fill: K(r.label).color,
583
+ "fill-opacity": i === d(L) ? .22 : .12,
584
+ "stroke-width": i === d(L) ? 3.5 : 2,
585
+ "vector-effect": "non-scaling-stroke",
586
+ class: "cursor-move",
587
+ onPointerdown: e((e) => Ge(i, e), ["stop"]),
588
+ onTouchstart: u[0] ||= e(() => {}, ["stop"]),
589
+ onMousedown: u[1] ||= e(() => {}, ["stop"])
590
+ }, null, 40, rt), (n(), m(g, null, t(ne, (t) => v("g", {
591
+ key: t,
592
+ class: "cursor-nwse-resize",
593
+ onPointerdown: e((e) => Ke(i, t, e), ["stop"]),
594
+ onTouchstart: u[2] ||= e(() => {}, ["stop"]),
595
+ onMousedown: u[3] ||= e(() => {}, ["stop"])
596
+ }, [v("circle", {
597
+ cx: He(r, t),
598
+ cy: Ue(r, t),
599
+ r: "14",
600
+ fill: "transparent"
601
+ }, null, 8, at), v("circle", {
602
+ cx: He(r, t),
603
+ cy: Ue(r, t),
604
+ r: "4.5",
605
+ fill: K(r.label).color
606
+ }, null, 8, ot)], 40, it)), 64))]))), 128)), d(I) ? (n(), m("rect", {
607
+ key: 0,
608
+ x: q(d(I).x),
609
+ y: q(d(I).y),
610
+ width: q(d(I).width),
611
+ height: q(d(I).height),
612
+ stroke: K(d(I).label).color,
613
+ fill: K(d(I).label).color,
614
+ "fill-opacity": "0.1",
615
+ "stroke-dasharray": "6 4",
616
+ "stroke-width": "2",
617
+ "vector-effect": "non-scaling-stroke"
618
+ }, null, 8, st)) : l("", !0)], 34)),
619
+ (n(!0), m(g, null, t(d(P), (t, r) => (n(), m("div", {
620
+ key: `label-${r}`,
621
+ class: a(["bbox-label cursor-pointer", {
622
+ "label-bottom": d(ze)(t) === "below",
623
+ "label-inside": d(ze)(t) === "inside",
624
+ "label-right": d(Be)(t)
625
+ }]),
626
+ "data-box-label": r,
627
+ onPointerdown: u[4] ||= e(() => {}, ["stop"]),
628
+ onTouchstart: u[5] ||= e(() => {}, ["stop"]),
629
+ onMousedown: u[6] ||= e(() => {}, ["stop"]),
630
+ onClick: e((e) => Bt(r, e), ["stop"]),
631
+ style: h(J(t))
632
+ }, [
633
+ (n(), c(o(K(t.label).icon), { class: "bbox-label-icon" })),
634
+ v("span", lt, i(Ve(t.label)), 1),
635
+ t.text ? (n(), m("span", ut, i(t.text), 1)) : t.confidence < 1 ? (n(), m("span", dt, i(Math.round(t.confidence * 100)) + "%", 1)) : l("", !0)
636
+ ], 46, ct))), 128))
637
+ ], 12, tt)]),
638
+ _: 1
639
+ }, 8, [
640
+ "pan",
641
+ "zoom",
642
+ "pan-enabled",
643
+ "max-zoom",
644
+ "selector",
645
+ "class",
646
+ "onPanned",
647
+ "onZoom",
648
+ "onDblclick",
649
+ "onTouchend"
650
+ ]),
651
+ d(W) ? (n(), m("div", {
652
+ key: 0,
653
+ class: "zoom-minimap",
654
+ style: h(d(be) ?? void 0)
655
+ }, [v("div", {
656
+ class: "zoom-minimap-viewport",
657
+ style: h(d(W))
658
+ }, null, 4)], 4)) : l("", !0),
659
+ d(z) ? (n(), m("div", {
660
+ key: 1,
661
+ class: "loupe",
662
+ style: h({
663
+ left: `${d(z).x}px`,
664
+ top: `${d(z).y}px`
665
+ })
666
+ }, [v("div", {
667
+ class: "loupe-content",
668
+ style: h({
669
+ width: `${d(z).frameW}px`,
670
+ height: `${d(z).frameH}px`,
671
+ transform: `translate(${d(z).tx}px, ${d(z).ty}px) scale(${kt})`
672
+ })
673
+ }, [v("img", {
674
+ src: r.imageUrl(d(G).id),
675
+ class: "absolute inset-0 w-full h-full",
676
+ draggable: "false"
677
+ }, null, 8, ft), (n(), m("svg", pt, [(n(!0), m(g, null, t(d(P), (e, t) => (n(), m("rect", {
678
+ key: t,
679
+ x: q(e.x),
680
+ y: q(e.y),
681
+ width: q(e.width),
682
+ height: q(e.height),
683
+ stroke: K(e.label).color,
684
+ fill: K(e.label).color,
685
+ "fill-opacity": "0.1",
686
+ "stroke-width": "1.5"
687
+ }, null, 8, mt))), 128)), d(I) ? (n(), m("rect", {
688
+ key: 0,
689
+ x: q(d(I).x),
690
+ y: q(d(I).y),
691
+ width: q(d(I).width),
692
+ height: q(d(I).height),
693
+ stroke: K(d(I).label).color,
694
+ fill: K(d(I).label).color,
695
+ "fill-opacity": "0.1",
696
+ "stroke-dasharray": "4 3",
697
+ "stroke-width": "1.5"
698
+ }, null, 8, ht)) : l("", !0)]))], 4), u[12] ||= v("div", { class: "loupe-crosshair" }, null, -1)], 4)) : l("", !0),
699
+ d(Pe) ? (n(), m("div", gt, [C(_, {
700
+ severity: "secondary",
701
+ rounded: "",
702
+ class: "cui-icon-md opacity-60 hover:opacity-100",
703
+ onClick: u[9] ||= e((e) => $(-1), ["stop"])
704
+ }, {
705
+ icon: p(() => [C(te, {
706
+ width: "100%",
707
+ height: "100%"
708
+ })]),
709
+ _: 1
710
+ })])) : l("", !0),
711
+ d(Fe) ? (n(), m("div", _t, [C(_, {
712
+ severity: "secondary",
713
+ rounded: "",
714
+ class: "cui-icon-md opacity-60 hover:opacity-100",
715
+ onClick: u[10] ||= e((e) => $(1), ["stop"])
716
+ }, {
717
+ icon: p(() => [C(y, {
718
+ width: "100%",
719
+ height: "100%"
720
+ })]),
721
+ _: 1
722
+ })])) : l("", !0)
723
+ ], 512),
724
+ d(Le) ? (n(), m("div", vt, [v("label", yt, i(s.$t("components.training_editor.plate_text")), 1), C(x, {
725
+ id: "plate-text",
726
+ "model-value": d(Le).text ?? "",
727
+ size: "small",
728
+ maxlength: "12",
729
+ class: "w-40 uppercase",
730
+ placeholder: "ABC 1234",
731
+ "onUpdate:modelValue": Ht
732
+ }, null, 8, ["model-value"])])) : l("", !0),
733
+ v("div", bt, [v("span", xt, i(s.$t("components.training_editor.hint")), 1), d(R) ? (n(), c(_, {
734
+ key: 0,
735
+ severity: "secondary",
736
+ text: "",
737
+ rounded: "",
738
+ class: "cui-icon-sm shrink-0",
739
+ onClick: u[11] ||= (e) => le.value = !d(le)
740
+ }, {
741
+ icon: p(() => [C(S, { class: "w-4 h-4" })]),
742
+ _: 1
743
+ })) : l("", !0)]),
744
+ d(R) && d(le) ? (n(), m("div", St, [
745
+ u[13] ||= v("span", null, [v("kbd", null, "Tab")], -1),
746
+ v("span", null, i(s.$t("components.training_editor.sc_select")), 1),
747
+ u[14] ||= b(),
748
+ u[15] ||= v("span", null, [v("kbd", null, "←↑→↓")], -1),
749
+ v("span", null, i(s.$t("components.training_editor.sc_move")), 1),
750
+ u[16] ||= b(),
751
+ u[17] ||= v("span", null, [
752
+ v("kbd", null, "Shift"),
753
+ b(" + "),
754
+ v("kbd", null, "←↑→↓")
755
+ ], -1),
756
+ v("span", null, i(s.$t("components.training_editor.sc_resize")), 1),
757
+ u[18] ||= b(),
758
+ u[19] ||= v("span", null, [v("kbd", null, "S")], -1),
759
+ v("span", null, i(s.$t("components.training_editor.sc_label")), 1),
760
+ u[20] ||= b(),
761
+ u[21] ||= v("span", null, [v("kbd", null, "Del")], -1),
762
+ v("span", null, i(s.$t("components.training_editor.sc_delete")), 1),
763
+ u[22] ||= b(),
764
+ u[23] ||= v("span", null, [v("kbd", null, "Esc")], -1),
765
+ v("span", null, i(s.$t("components.training_editor.sc_deselect")), 1),
766
+ u[24] ||= b(),
767
+ u[25] ||= v("span", null, [v("kbd", null, "Space")], -1),
768
+ v("span", null, i(s.$t("components.training_editor.sc_verify")), 1),
769
+ u[26] ||= b(),
770
+ u[27] ||= v("span", null, [
771
+ v("kbd", null, "←"),
772
+ b(" / "),
773
+ v("kbd", null, "→")
774
+ ], -1),
775
+ v("span", null, i(s.$t("components.training_editor.sc_nav")), 1)
776
+ ])) : l("", !0),
777
+ C(ae, {
778
+ ref_key: "labelMenuRef",
779
+ ref: A,
780
+ items: d(Re),
781
+ popover: { pt: { content: { class: "p-0! rounded-xl! overflow-hidden!" } } }
782
+ }, null, 8, ["items"])
783
+ ], 512);
784
+ };
785
+ }
786
+ }), [["__scopeId", "data-v-41ae024e"]]), Q = w({ progress: null }), Pt = null, Ft = null, It = /* @__PURE__ */ new Set(), Lt = /* @__PURE__ */ new Set();
787
+ function Rt(e) {
788
+ for (let t of e) try {
789
+ t();
790
+ } catch {}
791
+ }
792
+ async function zt() {
793
+ if (Ft?.ready.value) try {
794
+ let e = await Ft.request("get-submit-progress");
795
+ e.active ? Q.progress = e : Q.progress?.active && (Q.progress = null);
796
+ } catch {}
797
+ }
798
+ function Bt() {
799
+ zt(), Rt(It), Rt(Lt);
800
+ }
801
+ function Vt() {
802
+ return Ft || (Pt = u(!0), Pt.run(() => {
803
+ let e = B("/training");
804
+ Ft = e, e.on("candidates-changed", () => Rt(It)), e.on("submit-progress", (e) => {
805
+ Q.progress = e, Rt(It);
806
+ }), e.onReady(Bt);
807
+ }), Ft);
808
+ }
809
+ function Ht() {
810
+ function e() {
811
+ Vt();
812
+ }
813
+ function t(e) {
814
+ return It.add(e), () => It.delete(e);
815
+ }
816
+ function n(e) {
817
+ return Lt.add(e), () => Lt.delete(e);
818
+ }
819
+ function r() {
820
+ Q.progress = null;
821
+ }
822
+ return {
823
+ submitProgress: f(() => Q.progress),
824
+ connect: e,
825
+ onCandidatesChanged: t,
826
+ onResync: n,
827
+ dismissProgress: r
828
+ };
829
+ }
830
+ //#endregion
831
+ //#region src/components/CuiDialog/templates/TrainingSubmissions/TrainingSubmissions.vue?vue&type=script&setup=true&lang.ts
832
+ var Ut = { class: "flex flex-col gap-3" }, Wt = {
833
+ key: 0,
834
+ class: "flex flex-col gap-2"
835
+ }, Gt = {
836
+ key: 1,
837
+ class: "flex flex-col items-center gap-3 py-10"
838
+ }, $ = { class: "text-muted text-sm text-center max-w-sm" }, Kt = {
839
+ key: 2,
840
+ class: "flex flex-col items-center gap-3 py-10"
841
+ }, qt = { class: "text-muted text-sm text-center max-w-sm" }, Jt = { class: "text-muted text-sm" }, Yt = { class: "w-24 aspect-video rounded-lg overflow-hidden bg-black/5 dark:bg-black/30 shrink-0" }, Xt = { class: "flex-1 min-w-0" }, Zt = { class: "flex flex-wrap items-center gap-1" }, Qt = { class: "text-xs text-muted mt-1" }, $t = {
842
+ key: 0,
843
+ class: "flex justify-center py-2"
844
+ }, en = /* @__PURE__ */ x({
845
+ __name: "TrainingSubmissions",
846
+ setup(e) {
847
+ let a = new We(), { t: o, te: s } = Se(), u = ie(), ee = Ht(), f = a.deleteSubmissionMutation(), b = S(""), x = S([]), w = S(0), T = S(), E = S(!0), D = S(!1), O = S(!1), k = _("loadMoreRef");
848
+ function ae(e) {
849
+ let t = {};
850
+ for (let n of e.labels) t[n.label] = (t[n.label] ?? 0) + 1;
851
+ return t;
852
+ }
853
+ function j(e) {
854
+ let t = `components.training_editor.labels.${e}`;
855
+ return s(t) ? o(t) : e;
856
+ }
857
+ async function M() {
858
+ E.value = x.value.length === 0;
859
+ try {
860
+ let e = await J();
861
+ x.value = e.items, w.value = e.total ?? e.items.length, T.value = e.nextCursor, O.value = !1;
862
+ } catch {
863
+ O.value = !0;
864
+ } finally {
865
+ E.value = !1;
866
+ }
867
+ }
868
+ async function oe() {
869
+ let e = T.value;
870
+ if (!(!e || D.value)) {
871
+ D.value = !0;
872
+ try {
873
+ let t = await J({ cursor: e }), n = new Set(x.value.map((e) => e.id));
874
+ x.value.push(...t.items.filter((e) => !n.has(e.id))), T.value = t.nextCursor;
875
+ } catch (e) {
876
+ u.add({
877
+ severity: "error",
878
+ detail: e?.message ?? String(e),
879
+ life: 5e3
880
+ });
881
+ } finally {
882
+ D.value = !1;
883
+ }
884
+ }
885
+ }
886
+ async function N(e) {
887
+ b.value = e;
888
+ try {
889
+ await f.mutateAsync(e), x.value = x.value.filter((t) => t.id !== e), w.value = Math.max(0, w.value - 1);
890
+ } catch (e) {
891
+ u.add({
892
+ severity: "error",
893
+ detail: e?.message ?? String(e),
894
+ life: 5e3
895
+ });
896
+ } finally {
897
+ b.value = "";
898
+ }
899
+ }
900
+ W(k, ([e]) => {
901
+ e?.isIntersecting && oe();
902
+ }), te(() => ee.submitProgress.value?.active, (e, t) => {
903
+ t && !e && M();
904
+ });
905
+ let P = ee.onResync(() => {
906
+ M();
907
+ });
908
+ return r(() => {
909
+ P();
910
+ }), M(), (e, r) => {
911
+ let a = le, o = je, s = A, u = se, ee = re, te = Ne, _ = Ce, S = Ae, ie = ne;
912
+ return n(), m("div", Ut, [d(E) ? (n(), m("div", Wt, [(n(), m(g, null, t(4, (e) => C(a, {
913
+ key: e,
914
+ height: "72px",
915
+ "border-radius": "12px"
916
+ })), 64))])) : d(O) ? (n(), m("div", Gt, [C(o, { class: "w-10 h-10 text-muted" }), v("span", $, i(e.$t("components.training_submissions.load_failed")), 1)])) : d(x).length ? (n(), m(g, { key: 3 }, [
917
+ v("span", Jt, i(e.$t("components.training_submissions.count", d(w))), 1),
918
+ (n(!0), m(g, null, t(d(x), (r) => (n(), m("div", {
919
+ key: r.id,
920
+ class: "cui-card h-auto! shrink-0 p-2 flex items-center gap-3"
921
+ }, [
922
+ v("div", Yt, [C(u, {
923
+ src: r.imageUrl,
924
+ "image-container-class": "w-full h-full",
925
+ "image-style": { objectFit: "cover" }
926
+ }, null, 8, ["src"])]),
927
+ v("div", Xt, [v("div", Zt, [(n(!0), m(g, null, t(ae(r), (e, t) => (n(), m("span", {
928
+ key: t,
929
+ class: "px-1.5 py-0.5 rounded text-xs font-medium text-white",
930
+ style: h({ backgroundColor: d(ge)(String(t)).color })
931
+ }, i(j(String(t))) + " ×" + i(e), 5))), 128))]), v("div", Qt, i(d(ce)(new Date(r.createdAt).getTime())), 1)]),
932
+ C(ee, {
933
+ severity: r.usedInWave ? "success" : "info",
934
+ value: r.usedInWave ? e.$t("components.training_submissions.status_trained") : e.$t("components.training_submissions.status_pool"),
935
+ class: "shrink-0"
936
+ }, null, 8, ["severity", "value"]),
937
+ y((n(), c(_, {
938
+ severity: "danger",
939
+ text: "",
940
+ rounded: "",
941
+ class: "cui-icon-sm shrink-0",
942
+ loading: d(f).isPending.value && d(b) === r.id,
943
+ onClick: (e) => N(r.id)
944
+ }, {
945
+ icon: p(() => [C(te, {
946
+ width: "100%",
947
+ height: "100%"
948
+ })]),
949
+ _: 1
950
+ }, 8, ["loading", "onClick"])), [[
951
+ ie,
952
+ e.$t("components.training_submissions.delete"),
953
+ void 0,
954
+ { left: !0 }
955
+ ]])
956
+ ]))), 128)),
957
+ d(D) ? (n(), m("div", $t, [C(S, { class: "w-5 h-5 text-primary" })])) : d(T) ? (n(), m("div", {
958
+ key: 1,
959
+ ref_key: "loadMoreRef",
960
+ ref: k,
961
+ class: "h-px"
962
+ }, null, 512)) : l("", !0)
963
+ ], 64)) : (n(), m("div", Kt, [C(s, { class: "w-10 h-10 text-muted" }), v("span", qt, i(e.$t("components.training_submissions.empty")), 1)]))]);
964
+ };
965
+ }
966
+ }), tn = { desktop: {
967
+ maxWidth: "720px",
968
+ width: "90vw"
969
+ } }, nn = { class: "flex flex-col" }, rn = {
970
+ key: 0,
971
+ class: "page-title"
972
+ }, an = { class: "font-semibold text-xl truncate" }, on = { class: "flex gap-2 mb-4" }, sn = {
973
+ key: 1,
974
+ class: "cui-card h-auto! shrink-0 px-3 py-2 mb-4 flex items-center gap-3"
975
+ }, cn = { class: "flex-1 min-w-0" }, ln = { class: "text-sm" }, un = { class: "flex-1 text-sm" }, dn = { class: "p-3" }, fn = {
976
+ key: 3,
977
+ class: "flex flex-1 min-h-0 flex-col items-center justify-center w-full gap-4 py-16"
978
+ }, pn = { class: "text-muted text-sm text-center max-w-md" }, mn = { class: "relative flex-1 min-h-0 overflow-hidden bg-black/5 dark:bg-black/30" }, hn = { class: "absolute top-1.5 left-1.5 flex flex-wrap gap-1" }, gn = {
979
+ key: 0,
980
+ class: "absolute bottom-1.5 left-1.5"
981
+ }, _n = {
982
+ key: 1,
983
+ class: "absolute top-1.5 right-1.5 dark-mode"
984
+ }, vn = { class: "flex items-center justify-between gap-2" }, yn = { class: "flex items-center gap-2 min-w-0" }, bn = { class: "min-w-0" }, xn = { class: "font-medium truncate" }, Sn = { class: "text-xs text-muted" }, Cn = 40, wn = /* @__PURE__ */ x({
985
+ __name: "Training",
986
+ setup(o) {
987
+ let s = new N(), u = new We(), { t: x, te: w } = Se(), O = V(), A = ie(), { smBreakpoint: oe } = j(), I = u.getCandidatesQuery(), ue = u.getSettingsQuery(), R = u.patchCandidateMutation(), de = u.deleteCandidateMutation(), B = u.patchSettingsMutation(), pe = u.submitCandidatesMutation(), me = Ht(), { data: H } = s.getCamerasQuery({
988
+ page: 1,
989
+ pageSize: -1
990
+ }), U = S(""), ve = S(Cn), ye = _("cameraMenuRef"), xe = _("settingsMenuRef"), Ie = _("loadMoreRef"), Le = f(() => ({ gridTemplateColumns: `repeat(auto-fill, minmax(${oe.value ? "220px" : "260px"}, 1fr))` })), ze = f(() => {
991
+ let e = [...new Set((I.data.value ?? []).map((e) => et(e.cameraId)))].sort((e, t) => e.localeCompare(t));
992
+ return [{
993
+ key: "all",
994
+ label: x("views.training.all_cameras"),
995
+ active: U.value === "",
996
+ onClick: () => {
997
+ U.value = "";
998
+ }
999
+ }, ...e.map((e) => ({
1000
+ key: e,
1001
+ label: e,
1002
+ active: U.value === e,
1003
+ onClick: () => {
1004
+ U.value = e;
1005
+ }
1006
+ }))];
1007
+ }), Be = f(() => [{
1008
+ key: "collect",
1009
+ label: x("views.training.collection_enabled"),
1010
+ description: x("views.training.collection_hint"),
1011
+ toggle: !0,
1012
+ toggleState: ue.data.value?.enabled ?? !0,
1013
+ onClick: () => {
1014
+ ft(!(ue.data.value?.enabled ?? !0));
1015
+ }
1016
+ }]), K = f(() => {
1017
+ let e = U.value.trim().toLowerCase();
1018
+ return e ? (I.data.value ?? []).filter((t) => et(t.cameraId).toLowerCase().includes(e)) : I.data.value ?? [];
1019
+ }), q = f(() => K.value.slice(0, ve.value)), He = f(() => K.value.length > q.value.length), Ue = f(() => (I.data.value ?? []).filter((e) => X(e)).length), J = f(() => me.submitProgress.value ? me.submitProgress.value : Ue.value > 0 ? {
1020
+ active: !0,
1021
+ total: Ue.value,
1022
+ done: 0,
1023
+ failed: 0
1024
+ } : null), Y = f(() => K.value.filter((e) => !X(e)));
1025
+ function X(e) {
1026
+ return e.upload === "queued" || e.upload === "uploading";
1027
+ }
1028
+ let { selectionMode: Z, selectedIds: Ge, allSelected: Ke, bulkBusy: qe, enterSelectionMode: Je, exitSelectionMode: Xe, toggleSelectAll: Ze, toggleSelection: Qe } = P(Y, (e) => e.id), $e = f(() => [...Ge.value].filter((e) => I.data.value?.find((t) => t.id === e)?.status === "verified"));
1029
+ function et(e) {
1030
+ return H.value?.result?.find((t) => t._id === e)?.name ?? e;
1031
+ }
1032
+ function tt(e) {
1033
+ return L(`/api/training/candidates/${e}/image`) ?? "";
1034
+ }
1035
+ function nt(e) {
1036
+ let t = `components.training_editor.labels.${e}`;
1037
+ return w(t) ? x(t) : e;
1038
+ }
1039
+ function rt(e) {
1040
+ let t = {};
1041
+ for (let n of e.boxes) t[n.label] = (t[n.label] ?? 0) + 1;
1042
+ return t;
1043
+ }
1044
+ function it(e) {
1045
+ return e === "verified" ? "success" : "info";
1046
+ }
1047
+ function at() {
1048
+ ve.value += Cn;
1049
+ }
1050
+ function ot(e) {
1051
+ if (!X(e)) {
1052
+ if (Z.value) {
1053
+ Qe(e.id);
1054
+ return;
1055
+ }
1056
+ st(e);
1057
+ }
1058
+ }
1059
+ function st(e) {
1060
+ O.openComponentDialog(Nt, {
1061
+ data: {
1062
+ title: x("views.training.title"),
1063
+ cancelText: x("components.form.button.remove"),
1064
+ confirmText: x("components.training_editor.verify"),
1065
+ cancelButtonProps: { severity: "danger" },
1066
+ contentProps: {
1067
+ candidates: K.value.map((e) => ({ ...e })),
1068
+ startId: e.id,
1069
+ cameraName: et,
1070
+ imageUrl: tt,
1071
+ onSave: async (e, t, n) => {
1072
+ await R.mutateAsync({
1073
+ id: e,
1074
+ patch: {
1075
+ boxes: t,
1076
+ status: n
1077
+ }
1078
+ });
1079
+ },
1080
+ onDelete: async (e) => {
1081
+ await de.mutateAsync(e);
1082
+ }
1083
+ }
1084
+ },
1085
+ dialogSize: Ye
1086
+ });
1087
+ }
1088
+ function ct() {
1089
+ O.openComponentDialog(en, {
1090
+ data: {
1091
+ title: x("views.training.submissions"),
1092
+ hideConfirmButton: !0,
1093
+ cancelText: x("components.form.button.close"),
1094
+ contentProps: {}
1095
+ },
1096
+ dialogSize: tn
1097
+ });
1098
+ }
1099
+ function lt() {
1100
+ let e = $e.value;
1101
+ !e.length || pe.isPending.value || O.openTextDialog({
1102
+ data: {
1103
+ title: x("components.dialog.title.confirm"),
1104
+ contentText: x("views.training.submit_confirm", { count: e.length }),
1105
+ confirmText: x("views.training.submit")
1106
+ },
1107
+ onConfirm: async () => {
1108
+ try {
1109
+ await pe.mutateAsync(e), Xe();
1110
+ } catch (e) {
1111
+ A.add({
1112
+ severity: "error",
1113
+ detail: e?.message ?? String(e),
1114
+ life: 8e3
1115
+ });
1116
+ }
1117
+ }
1118
+ });
1119
+ }
1120
+ function ut() {
1121
+ let e = [...Ge.value];
1122
+ !e.length || qe.value || O.openTextDialog({
1123
+ data: {
1124
+ title: x("components.dialog.title.confirm"),
1125
+ contentText: x("views.training.delete_selected_confirm", { count: e.length }),
1126
+ confirmText: x("components.form.button.remove"),
1127
+ confirmButtonProps: { severity: "danger" }
1128
+ },
1129
+ onConfirm: async () => {
1130
+ qe.value = !0;
1131
+ try {
1132
+ for (let t of e) await de.mutateAsync(t);
1133
+ Xe(), A.add({
1134
+ severity: "success",
1135
+ detail: x("views.training.delete_selected_done", { count: e.length }),
1136
+ life: 5e3
1137
+ });
1138
+ } catch (e) {
1139
+ A.add({
1140
+ severity: "error",
1141
+ detail: e?.message ?? String(e),
1142
+ life: 5e3
1143
+ });
1144
+ } finally {
1145
+ qe.value = !1;
1146
+ }
1147
+ }
1148
+ });
1149
+ }
1150
+ async function dt(e) {
1151
+ await de.mutateAsync(e.id);
1152
+ }
1153
+ async function ft(e) {
1154
+ await B.mutateAsync({ enabled: e });
1155
+ }
1156
+ te(U, () => {
1157
+ ve.value = Cn;
1158
+ }), W(Ie, ([e]) => {
1159
+ e?.isIntersecting && at();
1160
+ }), me.connect();
1161
+ let pt = me.onCandidatesChanged(() => {
1162
+ I.refetch();
1163
+ });
1164
+ return r(() => {
1165
+ pt();
1166
+ }), (r, o) => {
1167
+ let s = Pe, u = Ce, f = k, te = G, _ = Te, S = Ee, w = we, ie = T, O = z, A = M, j = Re, N = Fe, P = Ae, L = ke, ue = je, R = Me, de = Oe, B = le, V = he, H = se, W = re, ve = Ne, Se = De, Ue = be, Y = fe, We = E, Ye = ne;
1168
+ return n(), m("div", nn, [
1169
+ d(oe) ? l("", !0) : (n(), m("h1", rn, i(r.$t("views.training.title")), 1)),
1170
+ C(f, { position: "left" }, {
1171
+ default: p(() => [C(u, {
1172
+ severity: "secondary",
1173
+ text: "",
1174
+ class: "cui-button p-2 text-color non-draggable-region",
1175
+ onClick: o[0] ||= (e) => r.$router.push("/menu")
1176
+ }, {
1177
+ icon: p(() => [C(s, { class: "w-6 h-6" })]),
1178
+ _: 1
1179
+ })]),
1180
+ _: 1
1181
+ }),
1182
+ C(f, { position: "center" }, {
1183
+ default: p(() => [v("span", an, i(r.$t("views.training.title")), 1)]),
1184
+ _: 1
1185
+ }),
1186
+ v("div", on, [
1187
+ C(A, { class: "flex-1" }, {
1188
+ default: p(() => [C(w, { class: "flex-1" }, {
1189
+ default: p(() => [C(_, null, {
1190
+ default: p(() => [C(te, { class: "w-4 h-4" })]),
1191
+ _: 1
1192
+ }), C(S, {
1193
+ modelValue: d(U),
1194
+ "onUpdate:modelValue": o[1] ||= (e) => ee(U) ? U.value = e : null,
1195
+ placeholder: d(x)("views.training.search"),
1196
+ class: "w-full"
1197
+ }, null, 8, ["modelValue", "placeholder"])]),
1198
+ _: 1
1199
+ }), C(O, null, {
1200
+ default: p(() => [C(u, {
1201
+ severity: "secondary",
1202
+ text: "",
1203
+ class: "text-color",
1204
+ onClick: o[2] ||= (e) => d(ye)?.toggleMenu(e)
1205
+ }, {
1206
+ icon: p(() => [C(ie, { class: a(["w-4 h-4 transform transition-transform duration-300", { "rotate-180": d(ye)?.isOpen }]) }, null, 8, ["class"])]),
1207
+ _: 1
1208
+ })]),
1209
+ _: 1
1210
+ })]),
1211
+ _: 1
1212
+ }),
1213
+ y((n(), c(u, {
1214
+ severity: "secondary",
1215
+ outlined: "",
1216
+ class: "cui-button shrink-0",
1217
+ onClick: ct
1218
+ }, {
1219
+ icon: p(() => [C(j, { class: "w-4.5 h-4.5" })]),
1220
+ _: 1
1221
+ })), [[
1222
+ Ye,
1223
+ { value: r.$t("views.training.submissions") },
1224
+ void 0,
1225
+ { left: !0 }
1226
+ ]]),
1227
+ y((n(), c(u, {
1228
+ severity: "secondary",
1229
+ outlined: "",
1230
+ class: "cui-button shrink-0",
1231
+ onClick: o[3] ||= (e) => d(xe)?.toggleMenu(e)
1232
+ }, {
1233
+ icon: p(() => [C(N, { class: "w-4.5 h-4.5" })]),
1234
+ _: 1
1235
+ })), [[
1236
+ Ye,
1237
+ { value: r.$t("views.training.collection") },
1238
+ void 0,
1239
+ { left: !0 }
1240
+ ]])
1241
+ ]),
1242
+ d(J) ? (n(), m("div", sn, [d(J).active ? (n(), m(g, { key: 0 }, [C(P, { class: "w-4 h-4 text-primary shrink-0" }), v("div", cn, [v("div", ln, i(r.$t("views.training.upload_progress", {
1243
+ done: d(J).done + d(J).failed,
1244
+ total: d(J).total
1245
+ })), 1), C(L, {
1246
+ value: d(J).total ? Math.round((d(J).done + d(J).failed) / d(J).total * 100) : 0,
1247
+ "show-value": !1,
1248
+ style: { height: "6px" },
1249
+ class: "mt-1.5"
1250
+ }, null, 8, ["value"])])], 64)) : (n(), m(g, { key: 1 }, [
1251
+ d(J).failed ? (n(), c(ue, {
1252
+ key: 0,
1253
+ class: "w-5 h-5 text-red-500 shrink-0"
1254
+ })) : (n(), c(R, {
1255
+ key: 1,
1256
+ class: "w-5 h-5 text-green-500 shrink-0"
1257
+ })),
1258
+ v("span", un, [b(i(r.$t("views.training.submit_done", d(J).done)), 1), d(J).failed ? (n(), m(g, { key: 0 }, [b(" · " + i(r.$t("views.training.upload_failed_summary", { count: d(J).failed })), 1)], 64)) : l("", !0)]),
1259
+ C(u, {
1260
+ severity: "secondary",
1261
+ text: "",
1262
+ rounded: "",
1263
+ class: "cui-icon-sm shrink-0",
1264
+ onClick: o[4] ||= (e) => d(me).dismissProgress()
1265
+ }, {
1266
+ icon: p(() => [C(de, { class: "w-4 h-4" })]),
1267
+ _: 1
1268
+ })
1269
+ ], 64))])) : l("", !0),
1270
+ d(I).isLoading.value && !d(I).data.value ? (n(), m("div", {
1271
+ key: 2,
1272
+ class: "grid w-full gap-3 p-px",
1273
+ style: h(d(Le))
1274
+ }, [(n(), m(g, null, t(8, (e) => v("div", {
1275
+ key: e,
1276
+ class: "cui-card overflow-hidden"
1277
+ }, [C(B, {
1278
+ class: "aspect-video",
1279
+ width: "100%",
1280
+ height: "100%"
1281
+ }), v("div", dn, [C(B, {
1282
+ height: "14px",
1283
+ width: "70%",
1284
+ class: "mb-1"
1285
+ }), C(B, {
1286
+ height: "12px",
1287
+ width: "40%"
1288
+ })])])), 64))], 4)) : d(K).length === 0 ? (n(), m("div", fn, [C(V, { class: "w-12 h-12 text-muted" }), v("span", pn, i(r.$t("views.training.no_candidates")), 1)])) : (n(), m(g, { key: 4 }, [v("div", {
1289
+ class: "grid w-full gap-3 p-px",
1290
+ style: h(d(Le))
1291
+ }, [(n(!0), m(g, null, t(d(q), (a) => (n(), c(Ue, {
1292
+ key: a.id,
1293
+ class: "cui-card overflow-hidden transition-shadow cursor-pointer hover:shadow-md aspect-[1.17] flex flex-col",
1294
+ pt: {
1295
+ header: { class: "flex-1 min-h-0 flex" },
1296
+ body: {
1297
+ class: "shrink-0",
1298
+ style: "height: auto"
1299
+ }
1300
+ },
1301
+ onClick: (e) => ot(a)
1302
+ }, {
1303
+ header: p(() => [v("div", mn, [
1304
+ C(H, {
1305
+ class: "absolute inset-0",
1306
+ src: tt(a.id),
1307
+ alt: et(a.cameraId),
1308
+ "image-container-class": "w-full h-full",
1309
+ "image-style": { objectFit: "cover" }
1310
+ }, null, 8, ["src", "alt"]),
1311
+ v("div", hn, [(n(!0), m(g, null, t(rt(a), (e, t) => (n(), m("span", {
1312
+ key: t,
1313
+ class: "px-1.5 py-0.5 rounded text-xs font-medium text-white",
1314
+ style: h({ backgroundColor: d(ge)(String(t)).color })
1315
+ }, i(nt(String(t))) + " ×" + i(e), 5))), 128))]),
1316
+ a.upload ? (n(), m("div", gn, [a.upload === "failed" ? y((n(), c(W, {
1317
+ key: 0,
1318
+ severity: "danger",
1319
+ value: r.$t("views.training.upload_failed")
1320
+ }, null, 8, ["value"])), [[
1321
+ Ye,
1322
+ a.uploadError,
1323
+ void 0,
1324
+ { top: !0 }
1325
+ ]]) : a.upload === "uploading" ? (n(), c(W, {
1326
+ key: 1,
1327
+ severity: "info",
1328
+ value: r.$t("views.training.upload_uploading")
1329
+ }, null, 8, ["value"])) : (n(), c(W, {
1330
+ key: 2,
1331
+ severity: "secondary",
1332
+ value: r.$t("views.training.upload_queued")
1333
+ }, null, 8, ["value"]))])) : l("", !0),
1334
+ !d(Z) && !X(a) ? (n(), m("div", _n, [y((n(), c(u, {
1335
+ severity: "secondary",
1336
+ rounded: "",
1337
+ size: "small",
1338
+ class: "cui-icon-sm text-white",
1339
+ onClick: e((e) => dt(a), ["stop"])
1340
+ }, {
1341
+ icon: p(() => [C(ve, {
1342
+ width: "100%",
1343
+ height: "100%"
1344
+ })]),
1345
+ _: 1
1346
+ }, 8, ["onClick"])), [[
1347
+ Ye,
1348
+ r.$t("views.training.delete_candidate"),
1349
+ void 0,
1350
+ { top: !0 }
1351
+ ]])])) : l("", !0)
1352
+ ])]),
1353
+ content: p(() => [v("div", vn, [v("div", yn, [d(Z) && !X(a) ? (n(), c(Se, {
1354
+ key: 0,
1355
+ "model-value": d(Ge).has(a.id),
1356
+ binary: "",
1357
+ size: "small",
1358
+ onClick: o[5] ||= e(() => {}, ["stop"]),
1359
+ "onUpdate:modelValue": (e) => d(Qe)(a.id)
1360
+ }, null, 8, ["model-value", "onUpdate:modelValue"])) : l("", !0), v("div", bn, [v("div", xn, i(et(a.cameraId)), 1), v("div", Sn, i(d(ce)(a.createdAt)), 1)])]), C(W, {
1361
+ severity: it(a.status),
1362
+ value: r.$t(`views.training.status_${a.status}`)
1363
+ }, null, 8, ["severity", "value"])])]),
1364
+ _: 2
1365
+ }, 1032, ["onClick"]))), 128))], 4), d(He) ? (n(), m("div", {
1366
+ key: 0,
1367
+ ref_key: "loadMoreRef",
1368
+ ref: Ie,
1369
+ class: "h-px"
1370
+ }, null, 512)) : l("", !0)], 64)),
1371
+ d(K).length || d(Z) ? (n(), c(We, {
1372
+ key: 5,
1373
+ "force-visible": d(Z)
1374
+ }, {
1375
+ default: p(() => [d(Z) ? (n(), m(g, { key: 1 }, [
1376
+ C(Y, {
1377
+ grouped: "",
1378
+ "tooltip-props": { value: r.$t("components.form.tooltip.cancel_selection") },
1379
+ "button-props": { severity: "secondary" },
1380
+ icon: d(Oe),
1381
+ "icon-props": {
1382
+ width: "100%",
1383
+ height: "100%"
1384
+ },
1385
+ onClick: d(Xe)
1386
+ }, null, 8, [
1387
+ "tooltip-props",
1388
+ "icon",
1389
+ "onClick"
1390
+ ]),
1391
+ C(Y, {
1392
+ grouped: "",
1393
+ "tooltip-props": { value: d(Ke) ? r.$t("views.training.deselect_all") : r.$t("views.training.select_all") },
1394
+ "button-props": { severity: d(Ke) ? "primary" : "secondary" },
1395
+ icon: d(F),
1396
+ "icon-props": {
1397
+ width: "100%",
1398
+ height: "100%"
1399
+ },
1400
+ onClick: d(Ze)
1401
+ }, null, 8, [
1402
+ "tooltip-props",
1403
+ "button-props",
1404
+ "icon",
1405
+ "onClick"
1406
+ ]),
1407
+ C(Y, {
1408
+ grouped: "",
1409
+ "tooltip-props": { value: r.$t("views.training.submit_selected") },
1410
+ "button-props": { disabled: !d($e).length || d(pe).isPending.value },
1411
+ icon: d(Ve),
1412
+ "icon-props": {
1413
+ width: "100%",
1414
+ height: "100%"
1415
+ },
1416
+ onClick: lt
1417
+ }, null, 8, [
1418
+ "tooltip-props",
1419
+ "button-props",
1420
+ "icon"
1421
+ ]),
1422
+ C(Y, {
1423
+ grouped: "",
1424
+ "tooltip-props": { value: r.$t("views.training.delete_selected") },
1425
+ "button-props": {
1426
+ severity: "danger",
1427
+ disabled: !d(Ge).size || d(qe)
1428
+ },
1429
+ icon: d(D),
1430
+ "icon-props": {
1431
+ width: "100%",
1432
+ height: "100%"
1433
+ },
1434
+ onClick: ut
1435
+ }, null, 8, [
1436
+ "tooltip-props",
1437
+ "button-props",
1438
+ "icon"
1439
+ ])
1440
+ ], 64)) : (n(), c(Y, {
1441
+ key: 0,
1442
+ grouped: "",
1443
+ "tooltip-props": { value: r.$t("views.training.select") },
1444
+ "button-props": { severity: "secondary" },
1445
+ icon: d(_e),
1446
+ "icon-props": {
1447
+ width: "100%",
1448
+ height: "100%"
1449
+ },
1450
+ onClick: d(Je)
1451
+ }, null, 8, [
1452
+ "tooltip-props",
1453
+ "icon",
1454
+ "onClick"
1455
+ ]))]),
1456
+ _: 1
1457
+ }, 8, ["force-visible"])) : l("", !0),
1458
+ C(ae, {
1459
+ ref_key: "cameraMenuRef",
1460
+ ref: ye,
1461
+ items: d(ze),
1462
+ popover: { pt: { content: { class: "p-0! rounded-xl! overflow-hidden!" } } }
1463
+ }, null, 8, ["items"]),
1464
+ C(ae, {
1465
+ ref_key: "settingsMenuRef",
1466
+ ref: xe,
1467
+ items: d(Be),
1468
+ "auto-hide": !1,
1469
+ popover: { pt: {
1470
+ root: { class: "w-[22rem]" },
1471
+ content: { class: "p-0! rounded-xl! overflow-hidden!" }
1472
+ } }
1473
+ }, null, 8, ["items"])
1474
+ ]);
1475
+ };
1476
+ }
1477
+ });
1478
+ //#endregion
1479
+ export { wn as default };