boneio 1.6.0.dev28__tar.gz → 1.6.0.dev29__tar.gz

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 (891) hide show
  1. {boneio-1.6.0.dev28/boneio.egg-info → boneio-1.6.0.dev29}/PKG-INFO +1 -1
  2. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/manifest.json +1 -1
  3. boneio-1.6.0.dev29/boneio/migrations/plans/manifest.sig +0 -0
  4. boneio-1.6.0.dev29/boneio/version.py +2 -0
  5. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/AccountsView-CwOdnmil.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/AccountsView-hSkFhGZn.js +1 -1
  6. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/AccountsView-hSkFhGZn.js.gz +0 -0
  7. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/AppInitContext-tiTdTRoP.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/AppInitContext-XnlT3sSY.js +1 -1
  8. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/AppInitContext-XnlT3sSY.js.gz +0 -0
  9. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/BackupSection-C-WeucjY.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/BackupSection-CdrNqwc2.js +1 -1
  10. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/BackupSection-CdrNqwc2.js.gz +0 -0
  11. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/BindingMatrix-nmGVXRo7.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/BindingMatrix-Dyyc2Plw.js +1 -1
  12. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/BindingMatrix-Dyyc2Plw.js.gz +0 -0
  13. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/DeviceControlSection-DbWqlxg_.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/DeviceControlSection-BI2Gx_ht.js +1 -1
  14. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/DeviceControlSection-BI2Gx_ht.js.gz +0 -0
  15. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/DiagnosticsView-DVFMNJGF.js +5 -0
  16. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/DiagnosticsView-DVFMNJGF.js.gz +0 -0
  17. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/EntityGrid-CeSXRbdp.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/EntityGrid-D1gJhSPK.js +1 -1
  18. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/EntityGrid-D1gJhSPK.js.gz +0 -0
  19. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/FactoryResetSection-DeZS3i5H.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/FactoryResetSection-B6zeFfLF.js +1 -1
  20. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/FactoryResetSection-B6zeFfLF.js.gz +0 -0
  21. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/FormInputToggle-B9vctUNt.js +11 -0
  22. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/FormInputToggle-B9vctUNt.js.gz +0 -0
  23. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/HaDashboardWizard-D2UBDlbK.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/HaDashboardWizard-BtouQnje.js +1 -1
  24. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/HaDashboardWizard-BtouQnje.js.gz +0 -0
  25. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/HostnameSection-xP2XDYAQ.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/HostnameSection-h9UyWAS0.js +1 -1
  26. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/HostnameSection-h9UyWAS0.js.gz +0 -0
  27. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/InputsView-SyKSOUxy.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/InputsView-DHMMyEtN.js +1 -1
  28. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/InputsView-DHMMyEtN.js.gz +0 -0
  29. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/LoadingState-CkHBGP1B.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/LoadingState-BnMjvLnH.js +1 -1
  30. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/LocationSection-1ZoXNKbo.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/LocationSection-BWJEPzOe.js +2 -2
  31. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/LocationSection-BWJEPzOe.js.gz +0 -0
  32. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/LoggerForm-BtyRB-wI.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/LoggerForm-B4wgrOCg.js +1 -1
  33. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/LoggerForm-B4wgrOCg.js.gz +0 -0
  34. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/LongPressWrapper-DlHsPr8x.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/LongPressWrapper-BuYVn91a.js +1 -1
  35. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/LongPressWrapper-BuYVn91a.js.gz +0 -0
  36. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/MigrationsSection-Cjh8VBhv.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/MigrationsSection-CyxjY5qf.js +1 -1
  37. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/MigrationsSection-CyxjY5qf.js.gz +0 -0
  38. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/ModbusView-BxYXQCJV.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/ModbusView-3TzfMJLo.js +1 -1
  39. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/ModbusView-3TzfMJLo.js.gz +0 -0
  40. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/MqttPasswordsSection-BUHmOzZa.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/MqttPasswordsSection-BJUmLN6j.js +1 -1
  41. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/MqttPasswordsSection-BJUmLN6j.js.gz +0 -0
  42. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/NodeRedManagement-DI0Xdclv.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/NodeRedManagement-BVfo9HUs.js +1 -1
  43. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/NodeRedManagement-BVfo9HUs.js.gz +0 -0
  44. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/OutputsView-hB9mXMLS.js +1 -0
  45. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/OutputsView-hB9mXMLS.js.gz +0 -0
  46. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/SecurityView-DxbLaDjP.js +1 -0
  47. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/SecurityView-DxbLaDjP.js.gz +0 -0
  48. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/SensorView-BG8YDyB2.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/SensorView-BA_6vwE1.js +1 -1
  49. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/SensorView-BA_6vwE1.js.gz +0 -0
  50. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/SystemState-CFOj23m2.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/SystemState-CLMEarw1.js +2 -2
  51. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/SystemState-CLMEarw1.js.gz +0 -0
  52. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/TemplatesView-B7Hx_815.js +1 -0
  53. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/TemplatesView-B7Hx_815.js.gz +0 -0
  54. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/TilePicker-CALjT63r.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/TilePicker-u6F0_WYh.js +1 -1
  55. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/TilePicker-u6F0_WYh.js.gz +0 -0
  56. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/TimezoneSection-DdVTrf3S.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/TimezoneSection-D2NOMHRt.js +1 -1
  57. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/TimezoneSection-D2NOMHRt.js.gz +0 -0
  58. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/UISettings-Xu1AKFVe.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/UISettings-D09Ovoxp.js +6 -6
  59. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/UISettings-D09Ovoxp.js.gz +0 -0
  60. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/UpdateSafetyNotice-B4oH5vDm.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/UpdateSafetyNotice-5anVj_YS.js +1 -1
  61. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/UpdateSafetyNotice-5anVj_YS.js.gz +0 -0
  62. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/aiConfig-B3Ed_0sO.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/aiConfig-AbhmFxmh.js +1 -1
  63. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/aiConfig-AbhmFxmh.js.gz +0 -0
  64. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/aiWizardPrompt-BNhHHYET.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/aiWizardPrompt-DROK5vS0.js +1 -1
  65. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/aiWizardPrompt-DROK5vS0.js.gz +0 -0
  66. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/groupByArea-kSZWQsOr.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/groupByArea-S-fs_0iK.js +1 -1
  67. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/groupByArea-S-fs_0iK.js.gz +0 -0
  68. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/index-CxoiGDl4.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/index-DULLFI0R.js +8 -8
  69. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/index-DULLFI0R.js.gz +0 -0
  70. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/monaco-Dy4VLLTM.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/monaco-C_baIGg_.js +1 -1
  71. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/monaco-C_baIGg_.js.gz +0 -0
  72. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/monaco-B8Od_2aK.js → boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/monaco-sF_y08LI.js +2 -2
  73. boneio-1.6.0.dev29/boneio/webui/frontend-dist/assets/monaco-sF_y08LI.js.gz +0 -0
  74. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/index.html +2 -2
  75. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/sw.js +1 -1
  76. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29/boneio.egg-info}/PKG-INFO +1 -1
  77. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio.egg-info/SOURCES.txt +69 -69
  78. boneio-1.6.0.dev28/boneio/migrations/plans/manifest.sig +0 -1
  79. boneio-1.6.0.dev28/boneio/version.py +0 -2
  80. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/AccountsView-CwOdnmil.js.gz +0 -0
  81. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/AppInitContext-tiTdTRoP.js.gz +0 -0
  82. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/BackupSection-C-WeucjY.js.gz +0 -0
  83. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/BindingMatrix-nmGVXRo7.js.gz +0 -0
  84. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/DeviceControlSection-DbWqlxg_.js.gz +0 -0
  85. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/DiagnosticsView-f18E4uFC.js +0 -5
  86. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/DiagnosticsView-f18E4uFC.js.gz +0 -0
  87. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/EntityGrid-CeSXRbdp.js.gz +0 -0
  88. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/FactoryResetSection-DeZS3i5H.js.gz +0 -0
  89. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/FormInputToggle-ChBenc7y.js +0 -11
  90. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/FormInputToggle-ChBenc7y.js.gz +0 -0
  91. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/HaDashboardWizard-D2UBDlbK.js.gz +0 -0
  92. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/HostnameSection-xP2XDYAQ.js.gz +0 -0
  93. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/InputsView-SyKSOUxy.js.gz +0 -0
  94. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/LocationSection-1ZoXNKbo.js.gz +0 -0
  95. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/LoggerForm-BtyRB-wI.js.gz +0 -0
  96. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/LongPressWrapper-DlHsPr8x.js.gz +0 -0
  97. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/MigrationsSection-Cjh8VBhv.js.gz +0 -0
  98. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/ModbusView-BxYXQCJV.js.gz +0 -0
  99. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/MqttPasswordsSection-BUHmOzZa.js.gz +0 -0
  100. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/NodeRedManagement-DI0Xdclv.js.gz +0 -0
  101. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/OutputsView-CLtj4S-E.js +0 -1
  102. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/OutputsView-CLtj4S-E.js.gz +0 -0
  103. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/SecurityView-APfECroK.js +0 -1
  104. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/SecurityView-APfECroK.js.gz +0 -0
  105. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/SensorView-BG8YDyB2.js.gz +0 -0
  106. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/SystemState-CFOj23m2.js.gz +0 -0
  107. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/TemplatesView-OqilVmcG.js +0 -1
  108. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/TemplatesView-OqilVmcG.js.gz +0 -0
  109. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/TilePicker-CALjT63r.js.gz +0 -0
  110. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/TimezoneSection-DdVTrf3S.js.gz +0 -0
  111. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/UISettings-Xu1AKFVe.js.gz +0 -0
  112. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/UpdateSafetyNotice-B4oH5vDm.js.gz +0 -0
  113. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/aiConfig-B3Ed_0sO.js.gz +0 -0
  114. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/aiWizardPrompt-BNhHHYET.js.gz +0 -0
  115. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/groupByArea-kSZWQsOr.js.gz +0 -0
  116. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/index-CxoiGDl4.js.gz +0 -0
  117. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/monaco-B8Od_2aK.js.gz +0 -0
  118. boneio-1.6.0.dev28/boneio/webui/frontend-dist/assets/monaco-Dy4VLLTM.js.gz +0 -0
  119. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/LICENSE +0 -0
  120. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/MANIFEST.in +0 -0
  121. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/README.md +0 -0
  122. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/__init__.py +0 -0
  123. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.2/input.yaml +0 -0
  124. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.2/output_24_16.yaml +0 -0
  125. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.2/output_32_10.yaml +0 -0
  126. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.2/output_32_5.yaml +0 -0
  127. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.2/output_cover.yaml +0 -0
  128. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.2/output_cover_mix.yaml +0 -0
  129. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.3/input.yaml +0 -0
  130. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.3/output_24_16.yaml +0 -0
  131. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.3/output_32_10.yaml +0 -0
  132. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.3/output_32_5.yaml +0 -0
  133. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.3/output_cover.yaml +0 -0
  134. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.3/output_cover_mix.yaml +0 -0
  135. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.4/input.yaml +0 -0
  136. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.4/output_24_16.yaml +0 -0
  137. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.4/output_32_10.yaml +0 -0
  138. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.4/output_32_5.yaml +0 -0
  139. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.4/output_cover.yaml +0 -0
  140. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.4/output_cover_mix.yaml +0 -0
  141. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.5/input.yaml +0 -0
  142. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.5/output_24_16.yaml +0 -0
  143. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.5/output_32_10.yaml +0 -0
  144. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.5/output_cover.yaml +0 -0
  145. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.5/output_cover_mix.yaml +0 -0
  146. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.6/input.yaml +0 -0
  147. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.6/output_24_16.yaml +0 -0
  148. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.6/output_32_10.yaml +0 -0
  149. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.6/output_cover.yaml +0 -0
  150. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.6/output_cover_mix.yaml +0 -0
  151. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.7/input.yaml +0 -0
  152. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.7/output_24_16.yaml +0 -0
  153. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.7/output_32_10.yaml +0 -0
  154. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.7/output_48_4.yaml +0 -0
  155. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.7/output_cover.yaml +0 -0
  156. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.7/output_cover_mix.yaml +0 -0
  157. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.8/input.yaml +0 -0
  158. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.8/output_24_16.yaml +0 -0
  159. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.8/output_32_10.yaml +0 -0
  160. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.8/output_48_4.yaml +0 -0
  161. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.8/output_cover.yaml +0 -0
  162. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/0.8/output_cover_mix.yaml +0 -0
  163. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/1.0/input.yaml +0 -0
  164. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/1.0/output_24_16.yaml +0 -0
  165. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/1.0/output_32_10.yaml +0 -0
  166. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/1.0/output_48_4.yaml +0 -0
  167. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/1.0/output_cover.yaml +0 -0
  168. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/1.0/output_cover_mix.yaml +0 -0
  169. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/1.1/input.yaml +0 -0
  170. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/1.1/output_24_16.yaml +0 -0
  171. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/1.1/output_32_10.yaml +0 -0
  172. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/1.1/output_48_4.yaml +0 -0
  173. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/1.1/output_cover.yaml +0 -0
  174. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/boards/1.1/output_cover_mix.yaml +0 -0
  175. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/bonecli.py +0 -0
  176. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/__init__.py +0 -0
  177. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/cover/__init__.py +0 -0
  178. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/cover/cover.py +0 -0
  179. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/cover/remote.py +0 -0
  180. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/cover/time_based.py +0 -0
  181. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/cover/venetian.py +0 -0
  182. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/group/__init__.py +0 -0
  183. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/group/output_group.py +0 -0
  184. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/input/__init__.py +0 -0
  185. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/input/binary_sensor.py +0 -0
  186. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/input/detectors.py +0 -0
  187. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/input/event.py +0 -0
  188. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/input/remote/__init__.py +0 -0
  189. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/input/remote/base.py +0 -0
  190. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/input/remote/esphome.py +0 -0
  191. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/input/remote/mqtt.py +0 -0
  192. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/irrigation/__init__.py +0 -0
  193. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/irrigation/controller.py +0 -0
  194. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/irrigation/water_source.py +0 -0
  195. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/output/__init__.py +0 -0
  196. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/output/basic.py +0 -0
  197. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/output/buzzer.py +0 -0
  198. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/output/mcp.py +0 -0
  199. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/output/pca.py +0 -0
  200. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/output/pcf.py +0 -0
  201. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/output/remote.py +0 -0
  202. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/sensor/__init__.py +0 -0
  203. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/sensor/virtual_energy.py +0 -0
  204. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/template/__init__.py +0 -0
  205. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/template/alarm_panel.py +0 -0
  206. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/template/gate_cover.py +0 -0
  207. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/template/thermostat.py +0 -0
  208. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/components/virtual_switch.py +0 -0
  209. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/const.py +0 -0
  210. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/__init__.py +0 -0
  211. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/atomic_file.py +0 -0
  212. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/auth/__init__.py +0 -0
  213. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/auth/cli.py +0 -0
  214. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/auth/hashing.py +0 -0
  215. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/auth/jwt_secret.py +0 -0
  216. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/auth/migration.py +0 -0
  217. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/auth/models.py +0 -0
  218. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/auth/store.py +0 -0
  219. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/cloud/__init__.py +0 -0
  220. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/cloud/data/__init__.py +0 -0
  221. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/cloud/data/docker-compose.yaml +0 -0
  222. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/cloud/data/init-certs-cloud.sh +0 -0
  223. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/cloud/registration.py +0 -0
  224. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/cloud/secrets.py +0 -0
  225. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/__init__.py +0 -0
  226. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/config_helper.py +0 -0
  227. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/input_bindings.py +0 -0
  228. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/migrations/__init__.py +0 -0
  229. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/migrations/v1_proxy_port.py +0 -0
  230. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/migrations/v2_transition.py +0 -0
  231. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/migrations/v4_wled_cache.py +0 -0
  232. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/migrations/v5_ina_screen.py +0 -0
  233. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/migrations/v6_input_keys.py +0 -0
  234. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/migrations/v7_mqtt_password_secret.py +0 -0
  235. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/package-lock.json +0 -0
  236. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/package.json +0 -0
  237. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/provenance.py +0 -0
  238. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/schema_converter.py +0 -0
  239. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/secret_masking.py +0 -0
  240. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/write_lock.py +0 -0
  241. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/yaml_compat.py +0 -0
  242. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/yaml_patch.py +0 -0
  243. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/config/yaml_util.py +0 -0
  244. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/containers.py +0 -0
  245. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/diagnostics/__init__.py +0 -0
  246. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/diagnostics/collect.py +0 -0
  247. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/discovery.py +0 -0
  248. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/events/__init__.py +0 -0
  249. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/events/bus.py +0 -0
  250. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/__init__.py +0 -0
  251. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/action_conditions.py +0 -0
  252. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/canopen.py +0 -0
  253. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/covers.py +0 -0
  254. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/display.py +0 -0
  255. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/inputs.py +0 -0
  256. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/irrigation.py +0 -0
  257. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/manager.py +0 -0
  258. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/modbus.py +0 -0
  259. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/outputs.py +0 -0
  260. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/remote.py +0 -0
  261. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/remote_input_registrar.py +0 -0
  262. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/scheduler.py +0 -0
  263. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/security_alert.py +0 -0
  264. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/sensors.py +0 -0
  265. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/sun.py +0 -0
  266. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/templates/__init__.py +0 -0
  267. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/templates/alarm.py +0 -0
  268. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/templates/gate_cover.py +0 -0
  269. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/templates/thermostat.py +0 -0
  270. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/templates.py +0 -0
  271. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/update.py +0 -0
  272. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/manager/virtual_switches.py +0 -0
  273. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/messaging/__init__.py +0 -0
  274. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/messaging/basic.py +0 -0
  275. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/messaging/basic_mqtt.py +0 -0
  276. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/messaging/broker_tls.py +0 -0
  277. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/messaging/composite.py +0 -0
  278. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/messaging/local.py +0 -0
  279. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/messaging/lox.py +0 -0
  280. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/messaging/mqtt.py +0 -0
  281. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/messaging/mqtt_tls.py +0 -0
  282. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/messaging/queue.py +0 -0
  283. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/net/__init__.py +0 -0
  284. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/net/discovery_guard.py +0 -0
  285. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/recovery.py +0 -0
  286. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/remote/__init__.py +0 -0
  287. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/remote/base.py +0 -0
  288. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/remote/can.py +0 -0
  289. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/remote/esphome.py +0 -0
  290. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/remote/mqtt.py +0 -0
  291. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/remote/wled.py +0 -0
  292. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/remote/wled_cache.py +0 -0
  293. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/security/__init__.py +0 -0
  294. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/security/certificate.py +0 -0
  295. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/security/framing.py +0 -0
  296. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/security/posture.py +0 -0
  297. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/sensor/__init__.py +0 -0
  298. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/sensor/base.py +0 -0
  299. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/sensor/sun.py +0 -0
  300. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/sensor/system.py +0 -0
  301. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/state/__init__.py +0 -0
  302. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/state/manager.py +0 -0
  303. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/system/__init__.py +0 -0
  304. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/system/host_data.py +0 -0
  305. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/system/monitor.py +0 -0
  306. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/system_ops.py +0 -0
  307. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/utils/__init__.py +0 -0
  308. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/utils/async_updater.py +0 -0
  309. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/utils/conditions.py +0 -0
  310. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/utils/filter.py +0 -0
  311. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/utils/font_util.py +0 -0
  312. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/utils/logger.py +0 -0
  313. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/utils/naming.py +0 -0
  314. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/utils/overlay.py +0 -0
  315. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/utils/sun.py +0 -0
  316. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/utils/timeperiod.py +0 -0
  317. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/core/utils/util.py +0 -0
  318. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/24x16/adc.yaml +0 -0
  319. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/24x16/binary_sensor.yaml +0 -0
  320. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/24x16/config.yaml +0 -0
  321. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/24x16/event.yaml +0 -0
  322. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/24x16/mqtt.yaml +0 -0
  323. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/24x16/output24x16A.yaml +0 -0
  324. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/32x10/adc.yaml +0 -0
  325. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/32x10/binary_sensor.yaml +0 -0
  326. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/32x10/config.yaml +0 -0
  327. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/32x10/event.yaml +0 -0
  328. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/32x10/mqtt.yaml +0 -0
  329. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/32x10/output32x10A.yaml +0 -0
  330. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/48x4/adc.yaml +0 -0
  331. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/48x4/binary_sensor.yaml +0 -0
  332. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/48x4/config.yaml +0 -0
  333. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/48x4/event.yaml +0 -0
  334. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/48x4/mqtt.yaml +0 -0
  335. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/48x4/output48x4A.yaml +0 -0
  336. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/__init__.py +0 -0
  337. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/can_master.yaml +0 -0
  338. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/can_slave.yaml +0 -0
  339. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/cover/adc.yaml +0 -0
  340. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/cover/binary_sensor.yaml +0 -0
  341. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/cover/config.yaml +0 -0
  342. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/cover/cover.yaml +0 -0
  343. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/cover/event.yaml +0 -0
  344. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/cover/mqtt.yaml +0 -0
  345. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/cover/outputCover.yaml +0 -0
  346. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/cover_mix/adc.yaml +0 -0
  347. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/cover_mix/binary_sensor.yaml +0 -0
  348. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/cover_mix/config.yaml +0 -0
  349. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/cover_mix/cover.yaml +0 -0
  350. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/cover_mix/event.yaml +0 -0
  351. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/cover_mix/mqtt.yaml +0 -0
  352. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/cover_mix/outputCoverMix.yaml +0 -0
  353. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/different_configs/adc.yaml +0 -0
  354. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/different_configs/all_binary_sensor.yaml +0 -0
  355. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/different_configs/binary_sensor.yaml +0 -0
  356. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/different_configs/binary_sensor_v_0_7.yaml +0 -0
  357. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/different_configs/config_24_16.yaml +0 -0
  358. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/different_configs/event_all.yaml +0 -0
  359. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/different_configs/event_v_0_7.yaml +0 -0
  360. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/different_configs/led32x4A.yaml +0 -0
  361. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/different_configs/output24x16A.yaml +0 -0
  362. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/different_configs/output24x16A_v0.3.yaml +0 -0
  363. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/different_configs/output32x10A.yaml +0 -0
  364. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/example_config/different_configs/output32x5A.yaml +0 -0
  365. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/exceptions.py +0 -0
  366. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/__init__.py +0 -0
  367. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/analog/__init__.py +0 -0
  368. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/analog/adc.py +0 -0
  369. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/can/__init__.py +0 -0
  370. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/can/bridge.py +0 -0
  371. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/can/client.py +0 -0
  372. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/can/interface.py +0 -0
  373. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/can/node.py +0 -0
  374. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/can/node_id.py +0 -0
  375. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/can/test_od.py +0 -0
  376. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/display/__init__.py +0 -0
  377. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/display/early_oled.py +0 -0
  378. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/display/fonts/danube__.ttf +0 -0
  379. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/display/oled.py +0 -0
  380. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/gpio/__init__.py +0 -0
  381. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/gpio/expanders/__init__.py +0 -0
  382. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/gpio/expanders/mcp23017.py +0 -0
  383. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/gpio/expanders/pca9685.py +0 -0
  384. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/gpio/expanders/pcf8575.py +0 -0
  385. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/gpio/input/__init__.py +0 -0
  386. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/gpio/input/base.py +0 -0
  387. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/gpio/input/manager.py +0 -0
  388. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/i2c/__init__.py +0 -0
  389. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/i2c/bus.py +0 -0
  390. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/i2c/ina219.py +0 -0
  391. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/i2c/ina219_driver.py +0 -0
  392. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/i2c/ina226.py +0 -0
  393. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/i2c/ina226_driver.py +0 -0
  394. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/i2c/mcp9808.py +0 -0
  395. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/i2c/pct2075.py +0 -0
  396. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/onewire/__init__.py +0 -0
  397. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/onewire/dallas.py +0 -0
  398. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/sensor/__init__.py +0 -0
  399. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/sensor/temperature/__init__.py +0 -0
  400. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/sensor/temperature/base.py +0 -0
  401. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/sensor/temperature/mcp9808.py +0 -0
  402. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/sensor/temperature/pct2075.py +0 -0
  403. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/hardware/udev_wait.py +0 -0
  404. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/integration/__init__.py +0 -0
  405. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/integration/homeassistant.py +0 -0
  406. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/integration/interlock.py +0 -0
  407. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/integration/lox_template.py +0 -0
  408. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/__init__.py +0 -0
  409. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/actions.py +0 -0
  410. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/MANIFEST.sha256 +0 -0
  411. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/apt/52boneio-periodic +0 -0
  412. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/apt/52boneio-unattended +0 -0
  413. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/docker/daemon.json +0 -0
  414. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/docker/nodered/caddy/502.html +0 -0
  415. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/docker/nodered/caddy/init-certs.sh +0 -0
  416. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/docker/nodered/docker-compose-cloud.yaml +0 -0
  417. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/docker/nodered/docker-compose.yaml +0 -0
  418. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/docker/nodered/node-red/settings.js +0 -0
  419. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/helpers/boneio-containers +0 -0
  420. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/helpers/boneio-helpers-heal +0 -0
  421. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/helpers/boneio-migrate-v2 +0 -0
  422. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/helpers/boneio-system +0 -0
  423. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/issue.d/10-boneio.issue +0 -0
  424. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/journald/boneio-console.conf +0 -0
  425. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/journald/journald.conf +0 -0
  426. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/kernel/postinst-boneio-overlay +0 -0
  427. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/migrations-recovery.pem +0 -0
  428. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/migrations.pem +0 -0
  429. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/modules-load.d/onewire.conf +0 -0
  430. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/mosquitto/boneio.conf +0 -0
  431. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/motd/20-boneio +0 -0
  432. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/overlays/BONEIO-BLACK-PINS-v0.2-v0.3.dtbo +0 -0
  433. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/sshd/10-boneio-hardening.conf +0 -0
  434. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/sshd/20-boneio-banner.conf +0 -0
  435. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/sshd/boneio-banner +0 -0
  436. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/sudoers/boneio +0 -0
  437. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/sudoers/boneio-helpers +0 -0
  438. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/sudoers/boneio-timedatectl +0 -0
  439. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/systemd/boneio-dpkg-recover.service +0 -0
  440. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/systemd/boneio-helpers-heal.service +0 -0
  441. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/systemd/boneio-oled-boot.service +0 -0
  442. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/systemd/boneio-oled-shutdown.service +0 -0
  443. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/systemd/boneio.service +0 -0
  444. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/systemd/dropins/apt-daily-priority.conf +0 -0
  445. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/systemd/dropins/avahi-daemon-defer.conf +0 -0
  446. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/systemd/dropins/bb-usb-gadgets-defer.conf +0 -0
  447. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/systemd/dropins/mosquitto-priority.conf +0 -0
  448. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/systemd/dropins/timer-no-persistent.conf +0 -0
  449. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/systemd/dropins/user-manager-defer.conf +0 -0
  450. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/systemd/linger-marker +0 -0
  451. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/systemd/set-hostname-once.service +0 -0
  452. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/usr-local-bin/set-hostname-once.sh +0 -0
  453. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/usr-sbin/oled_boot_splash.py +0 -0
  454. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/usr-sbin/oled_boot_splash.sh +0 -0
  455. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/usr-sbin/oled_msg.py +0 -0
  456. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/usr-sbin/oled_msg.sh +0 -0
  457. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/assets/wheels/pyyaml-6.0.3-cp313-cp313-linux_armv7l.whl +0 -0
  458. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/bootstrap/boneio-migrate +0 -0
  459. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/bootstrap/install-helper.sh +0 -0
  460. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/bootstrap/sudoers-migrate +0 -0
  461. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.3.0.json +0 -0
  462. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.3.0.sig +0 -0
  463. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.3.1.json +0 -0
  464. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.3.1.sig +0 -0
  465. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.3.2.json +0 -0
  466. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.3.2.sig +0 -0
  467. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.4.0.json +0 -0
  468. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.4.0.sig +0 -0
  469. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.4.3.json +0 -0
  470. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.4.3.sig +0 -0
  471. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.4.4.json +0 -0
  472. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.4.4.sig +0 -0
  473. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.0.json +0 -0
  474. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.0.sig +0 -0
  475. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.1.json +0 -0
  476. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.1.sig +0 -0
  477. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.10.json +0 -0
  478. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.10.sig +0 -0
  479. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.11.json +0 -0
  480. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.11.sig +0 -0
  481. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.12.json +0 -0
  482. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.12.sig +0 -0
  483. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.13.json +0 -0
  484. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.13.sig +0 -0
  485. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.14.json +0 -0
  486. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.14.sig +0 -0
  487. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.15.json +0 -0
  488. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.15.sig +0 -0
  489. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.16.json +0 -0
  490. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.16.sig +0 -0
  491. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.17.json +0 -0
  492. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.17.sig +0 -0
  493. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.18.json +0 -0
  494. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.18.sig +0 -0
  495. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.2.json +0 -0
  496. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.2.sig +0 -0
  497. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.3.json +0 -0
  498. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.3.sig +0 -0
  499. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.4.json +0 -0
  500. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.4.sig +0 -0
  501. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.5.json +0 -0
  502. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.5.sig +0 -0
  503. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.6.json +0 -0
  504. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.6.sig +0 -0
  505. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.7.json +0 -0
  506. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.7.sig +0 -0
  507. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.8.json +0 -0
  508. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.8.sig +0 -0
  509. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.9.json +0 -0
  510. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.5.9.sig +0 -0
  511. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.0.json +0 -0
  512. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.0.sig +0 -0
  513. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.1.json +0 -0
  514. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.1.sig +0 -0
  515. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.10.json +0 -0
  516. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.10.sig +0 -0
  517. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.11.json +0 -0
  518. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.11.sig +0 -0
  519. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.12.json +0 -0
  520. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.12.sig +0 -0
  521. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.13.json +0 -0
  522. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.13.sig +0 -0
  523. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.14.json +0 -0
  524. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.14.sig +0 -0
  525. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.15.json +0 -0
  526. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.15.sig +0 -0
  527. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.16.json +0 -0
  528. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.16.sig +0 -0
  529. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.17.json +0 -0
  530. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.17.sig +0 -0
  531. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.18.json +0 -0
  532. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.18.sig +0 -0
  533. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.19.json +0 -0
  534. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.19.sig +0 -0
  535. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.2.json +0 -0
  536. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.2.sig +0 -0
  537. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.20.json +0 -0
  538. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.20.sig +0 -0
  539. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.21.json +0 -0
  540. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.21.sig +0 -0
  541. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.22.json +0 -0
  542. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.22.sig +0 -0
  543. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.23.json +0 -0
  544. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.23.sig +0 -0
  545. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.24.json +0 -0
  546. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.24.sig +0 -0
  547. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.25.json +0 -0
  548. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.25.sig +0 -0
  549. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.26.json +0 -0
  550. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.26.sig +0 -0
  551. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.27.json +0 -0
  552. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.27.sig +0 -0
  553. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.28.json +0 -0
  554. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.28.sig +0 -0
  555. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.29.json +0 -0
  556. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.29.sig +0 -0
  557. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.3.json +0 -0
  558. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.3.sig +0 -0
  559. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.30.json +0 -0
  560. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.30.sig +0 -0
  561. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.31.json +0 -0
  562. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.31.sig +0 -0
  563. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.32.json +0 -0
  564. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.32.sig +0 -0
  565. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.33.json +0 -0
  566. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.33.sig +0 -0
  567. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.4.json +0 -0
  568. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.4.sig +0 -0
  569. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.5.json +0 -0
  570. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.5.sig +0 -0
  571. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.6.json +0 -0
  572. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.6.sig +0 -0
  573. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.7.json +0 -0
  574. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.7.sig +0 -0
  575. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.8.json +0 -0
  576. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.8.sig +0 -0
  577. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.9.json +0 -0
  578. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/plans/1.6.9.sig +0 -0
  579. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/runner.py +0 -0
  580. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/__init__.py +0 -0
  581. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_3_0_baseline.py +0 -0
  582. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_3_1_fix_oled_boot.py +0 -0
  583. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_3_2_cleanup_can_sudoers.py +0 -0
  584. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_4_0_fix_mqtt_sudoers.py +0 -0
  585. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_4_3_oled_shutdown.py +0 -0
  586. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_4_4_caddy.py +0 -0
  587. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_0_fix_oled_fifo_permissions.py +0 -0
  588. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_10_disable_console_setup.py +0 -0
  589. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_11_timer_catchup.py +0 -0
  590. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_12_oled_splash_off_critical_path.py +0 -0
  591. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_13_mosquitto_priority.py +0 -0
  592. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_14_journal_apparent_size.py +0 -0
  593. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_15_prune_orphan_journals.py +0 -0
  594. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_16_login_linger.py +0 -0
  595. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_17_defer_user_manager.py +0 -0
  596. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_18_fix_hostname_once.py +0 -0
  597. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_1_ufw_lox_udp.py +0 -0
  598. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_2_libyaml.py +0 -0
  599. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_3_libyaml_retry.py +0 -0
  600. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_4_onewire_modules.py +0 -0
  601. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_5_overlay_kernel_hook.py +0 -0
  602. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_6_boot_service_order.py +0 -0
  603. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_7_journald_limits.py +0 -0
  604. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_8_apparmor_prune.py +0 -0
  605. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_5_9_defer_nonessential.py +0 -0
  606. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_0_nodered_admin_auth.py +0 -0
  607. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_10_narrow_sudo_rules.py +0 -0
  608. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_11_drop_docker_group.py +0 -0
  609. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_12_console_shows_ip.py +0 -0
  610. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_13_custom_certificate.py +0 -0
  611. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_14_certificate_lifetime.py +0 -0
  612. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_15_web_port_reaches_caddy.py +0 -0
  613. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_16_release_floor_ordering.py +0 -0
  614. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_17_service_password.py +0 -0
  615. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_18_os_updates.py +0 -0
  616. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_19_helper_apt_purge.py +0 -0
  617. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_1_mosquitto_passwd_perms.py +0 -0
  618. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_20_drop_packagekit.py +0 -0
  619. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_21_caddy_pinned.py +0 -0
  620. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_22_security_autoupdates.py +0 -0
  621. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_23_helper_fstab_options.py +0 -0
  622. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_24_boot_partition_nofail.py +0 -0
  623. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_25_journal_to_serial_console.py +0 -0
  624. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_26_kernel_check_old_images.py +0 -0
  625. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_27_startup_overlay_repair.py +0 -0
  626. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_28_ssh_login_screen.py +0 -0
  627. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_29_service_password_change.py +0 -0
  628. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_2_drop_build_sudo_rule.py +0 -0
  629. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_30_os_update_apt_cache.py +0 -0
  630. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_31_overlay_v02_v03_inputs.py +0 -0
  631. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_32_mqtt_broker_tls.py +0 -0
  632. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_33_os_update_measured_space.py +0 -0
  633. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_3_firewall_rule_gaps.py +0 -0
  634. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_4_ssh_login_hardening.py +0 -0
  635. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_5_trust_transition.py +0 -0
  636. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_6_retire_legacy_helper.py +0 -0
  637. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_7_timedatectl_sudoers.py +0 -0
  638. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_8_system_helper.py +0 -0
  639. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/migrations/versions/v1_6_9_ntp_servers.py +0 -0
  640. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/__init__.py +0 -0
  641. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/cli.py +0 -0
  642. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/client.py +0 -0
  643. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/coordinator.py +0 -0
  644. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/__init__.py +0 -0
  645. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/energy_meters/dts1964_3f.json +0 -0
  646. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/energy_meters/le-03mw.json +0 -0
  647. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/energy_meters/le-03mwct.json +0 -0
  648. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/energy_meters/orno-or-we-517.json +0 -0
  649. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/energy_meters/sdm120.json +0 -0
  650. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/energy_meters/sdm630.json +0 -0
  651. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/energy_meters/socomec_e03.json +0 -0
  652. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/energy_meters/socomec_e23.json +0 -0
  653. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/hvac/defro-drx.json +0 -0
  654. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/hvac/eht-topventil-plus.json +0 -0
  655. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/hvac/fujitsu-ac.json +0 -0
  656. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/hvac/thessla.json +0 -0
  657. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/hvac/ventclear.json +0 -0
  658. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/hvac/wanas415.json +0 -0
  659. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/inverters/sofar.json +0 -0
  660. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/other/esp32_relay_x4_modbus.json +0 -0
  661. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/other/n4dsc08.json +0 -0
  662. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/other/r4dcb08.json +0 -0
  663. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/sensors/boneio-edge-temp.json +0 -0
  664. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/sensors/cwt.json +0 -0
  665. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/sensors/dyp-a12-ultrasonic.json +0 -0
  666. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/sensors/gdfs.json +0 -0
  667. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/sensors/gdfx.json +0 -0
  668. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/sensors/liquid-sensor.json +0 -0
  669. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/sensors/pt100.json +0 -0
  670. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/sensors/qdw90a.json +0 -0
  671. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/sensors/sht20.json +0 -0
  672. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/devices/sensors/sht30.json +0 -0
  673. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/entities/__init__.py +0 -0
  674. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/entities/base.py +0 -0
  675. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/entities/derived/__init__.py +0 -0
  676. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/entities/derived/numeric.py +0 -0
  677. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/entities/derived/select.py +0 -0
  678. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/entities/derived/switch.py +0 -0
  679. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/entities/derived/text.py +0 -0
  680. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/entities/sensor/__init__.py +0 -0
  681. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/entities/sensor/binary.py +0 -0
  682. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/entities/sensor/numeric.py +0 -0
  683. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/entities/sensor/text.py +0 -0
  684. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/entities/writeable/__init__.py +0 -0
  685. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/entities/writeable/binary.py +0 -0
  686. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/entities/writeable/numeric.py +0 -0
  687. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/mock_coordinator.py +0 -0
  688. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/modbus/utils.py +0 -0
  689. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/models/__init__.py +0 -0
  690. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/models/actions.py +0 -0
  691. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/models/events.py +0 -0
  692. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/models/files.py +0 -0
  693. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/models/logs.py +0 -0
  694. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/models/mqtt.py +0 -0
  695. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/models/state.py +0 -0
  696. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/runner.py +0 -0
  697. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/schema/actions.yaml +0 -0
  698. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/schema/actions_sensor.yaml +0 -0
  699. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/schema/actions_switch.yaml +0 -0
  700. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/schema/condition.yaml +0 -0
  701. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/schema/filters.yaml +0 -0
  702. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/schema/filters_adc.yaml +0 -0
  703. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/schema/id.yaml +0 -0
  704. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/schema/remote_devices.yaml +0 -0
  705. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/schema/remote_inputs.yaml +0 -0
  706. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/schema/remote_outputs.yaml +0 -0
  707. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/schema/schema.yaml +0 -0
  708. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/schema/temp_unit.yaml +0 -0
  709. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/schema/update_interval.yaml +0 -0
  710. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/action_validation.py +0 -0
  711. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/app.py +0 -0
  712. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/bind.py +0 -0
  713. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/dashboard_cards.py +0 -0
  714. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/NodeRedView-CP86NnC4.js +0 -0
  715. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/NodeRedView-CP86NnC4.js.gz +0 -0
  716. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/NumericInput-CrVNlFps.js +0 -0
  717. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/NumericInput-CrVNlFps.js.gz +0 -0
  718. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/Sparkline-6iDv_8hd.js +0 -0
  719. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/Sparkline-6iDv_8hd.js.gz +0 -0
  720. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/ViewToggle-CVWoIKqI.js +0 -0
  721. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/axios-DyqbZVcF.js +0 -0
  722. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/axios-DyqbZVcF.js.gz +0 -0
  723. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/basePath-CxHj-SSK.js +0 -0
  724. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/clipboard-CCtx29e-.js +0 -0
  725. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/codicon-ngg6Pgfi.ttf +0 -0
  726. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/codicon-ngg6Pgfi.ttf.gz +0 -0
  727. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/configCache-DZ0vWq_Z.js +0 -0
  728. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/dialog-DMaCttcv.js +0 -0
  729. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/dialog-DMaCttcv.js.gz +0 -0
  730. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/editor.worker-O-CH8JUO.js +0 -0
  731. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/editor.worker-O-CH8JUO.js.gz +0 -0
  732. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/fa-ChDOCx3T.js +0 -0
  733. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/fa-ChDOCx3T.js.gz +0 -0
  734. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/formatters-Cc0QIRxb.js +0 -0
  735. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/gi-DiFRP1nv.js +0 -0
  736. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/index-Mmx3ZGXj.css +0 -0
  737. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/index-Mmx3ZGXj.css.gz +0 -0
  738. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/monaco-Br_kD0ds.css +0 -0
  739. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/monaco-Br_kD0ds.css.gz +0 -0
  740. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/rolldown-runtime-hePW80VL.js +0 -0
  741. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/select-iQAUlBVk.js +0 -0
  742. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/select-iQAUlBVk.js.gz +0 -0
  743. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/utils-DOQQTBMN.js +0 -0
  744. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/utils-DOQQTBMN.js.gz +0 -0
  745. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/workbox-window.prod.es5-Bd17z0YL.js +0 -0
  746. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/workbox-window.prod.es5-Bd17z0YL.js.gz +0 -0
  747. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/yaml.worker-CeS-z5zL.js +0 -0
  748. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/assets/yaml.worker-CeS-z5zL.js.gz +0 -0
  749. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/boneio-192.png +0 -0
  750. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/boneio-512.png +0 -0
  751. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/boneio.svg +0 -0
  752. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/boneio_fav.svg +0 -0
  753. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/adc.schema.json +0 -0
  754. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/areas.schema.json +0 -0
  755. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/binary_sensor.schema.json +0 -0
  756. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/boneio.schema.json +0 -0
  757. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/can.schema.json +0 -0
  758. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/config.schema.json +0 -0
  759. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/cover.schema.json +0 -0
  760. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/dallas.schema.json +0 -0
  761. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/ds2482.schema.json +0 -0
  762. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/event.schema.json +0 -0
  763. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/ina219.schema.json +0 -0
  764. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/ina226.schema.json +0 -0
  765. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/irrigation.schema.json +0 -0
  766. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/lm75.schema.json +0 -0
  767. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/location.schema.json +0 -0
  768. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/logger.schema.json +0 -0
  769. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/lox_udp.schema.json +0 -0
  770. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/mcp23017.schema.json +0 -0
  771. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/mcp9808.schema.json +0 -0
  772. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/modbus.schema.json +0 -0
  773. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/modbus_devices.schema.json +0 -0
  774. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/mqtt.schema.json +0 -0
  775. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/oled.schema.json +0 -0
  776. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/osdp.schema.json +0 -0
  777. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/output.schema.json +0 -0
  778. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/output_group.schema.json +0 -0
  779. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/pca9685.schema.json +0 -0
  780. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/pcf8575.schema.json +0 -0
  781. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/remote_devices.schema.json +0 -0
  782. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/remote_inputs.schema.json +0 -0
  783. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/remote_outputs.schema.json +0 -0
  784. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/schedule.schema.json +0 -0
  785. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/sensor.schema.json +0 -0
  786. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/template.schema.json +0 -0
  787. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/virtual_energy_sensor.schema.json +0 -0
  788. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/virtual_switch.schema.json +0 -0
  789. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/schema/web.schema.json +0 -0
  790. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/frontend-dist/workbox-7e79c025.js +0 -0
  791. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/hvac_svg_templates.py +0 -0
  792. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/input_validation.py +0 -0
  793. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/middleware/__init__.py +0 -0
  794. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/middleware/auth.py +0 -0
  795. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/middleware/csrf.py +0 -0
  796. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/middleware/policy.py +0 -0
  797. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/middleware/proxy.py +0 -0
  798. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/modbus_card_templates.py +0 -0
  799. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/rate_limit.py +0 -0
  800. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/recovery/__init__.py +0 -0
  801. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/recovery/app.py +0 -0
  802. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/recovery/server.py +0 -0
  803. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/recovery/static/index.html +0 -0
  804. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/recovery/static/recovery.css +0 -0
  805. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/recovery/static/recovery.js +0 -0
  806. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/__init__.py +0 -0
  807. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/accounts.py +0 -0
  808. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/auth.py +0 -0
  809. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/can.py +0 -0
  810. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/config.py +0 -0
  811. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/config_actions.py +0 -0
  812. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/config_backups.py +0 -0
  813. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/config_core.py +0 -0
  814. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/config_discovery.py +0 -0
  815. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/config_files.py +0 -0
  816. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/covers.py +0 -0
  817. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/dashboard.py +0 -0
  818. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/dev_fake_device.py +0 -0
  819. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/diagnostics.py +0 -0
  820. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/irrigation.py +0 -0
  821. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/migrations.py +0 -0
  822. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/modbus.py +0 -0
  823. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/mqtt_reference.py +0 -0
  824. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/mqtt_tls.py +0 -0
  825. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/nodered.py +0 -0
  826. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/onboarding.py +0 -0
  827. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/os_update.py +0 -0
  828. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/outputs.py +0 -0
  829. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/remote_devices.py +0 -0
  830. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/schedule.py +0 -0
  831. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/security.py +0 -0
  832. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/sensors.py +0 -0
  833. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/sun.py +0 -0
  834. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/system.py +0 -0
  835. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/templates.py +0 -0
  836. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/timezone_sudoers.py +0 -0
  837. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/tools.py +0 -0
  838. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/routes/update.py +0 -0
  839. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/adc.schema.json +0 -0
  840. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/areas.schema.json +0 -0
  841. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/binary_sensor.schema.json +0 -0
  842. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/boneio.schema.json +0 -0
  843. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/can.schema.json +0 -0
  844. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/config.schema.json +0 -0
  845. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/cover.schema.json +0 -0
  846. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/dallas.schema.json +0 -0
  847. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/ds2482.schema.json +0 -0
  848. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/event.schema.json +0 -0
  849. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/ina219.schema.json +0 -0
  850. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/ina226.schema.json +0 -0
  851. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/irrigation.schema.json +0 -0
  852. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/lm75.schema.json +0 -0
  853. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/location.schema.json +0 -0
  854. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/logger.schema.json +0 -0
  855. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/lox_udp.schema.json +0 -0
  856. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/mcp23017.schema.json +0 -0
  857. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/mcp9808.schema.json +0 -0
  858. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/modbus.schema.json +0 -0
  859. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/modbus_devices.schema.json +0 -0
  860. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/mqtt.schema.json +0 -0
  861. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/oled.schema.json +0 -0
  862. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/osdp.schema.json +0 -0
  863. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/output.schema.json +0 -0
  864. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/output_group.schema.json +0 -0
  865. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/pca9685.schema.json +0 -0
  866. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/pcf8575.schema.json +0 -0
  867. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/remote_devices.schema.json +0 -0
  868. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/remote_inputs.schema.json +0 -0
  869. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/remote_outputs.schema.json +0 -0
  870. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/schedule.schema.json +0 -0
  871. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/sensor.schema.json +0 -0
  872. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/template.schema.json +0 -0
  873. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/virtual_energy_sensor.schema.json +0 -0
  874. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/virtual_switch.schema.json +0 -0
  875. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/schema/web.schema.json +0 -0
  876. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/security_events.py +0 -0
  877. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/security_headers.py +0 -0
  878. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/services/__init__.py +0 -0
  879. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/services/logs.py +0 -0
  880. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/static_assets.py +0 -0
  881. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/sudo_rate_limiter.py +0 -0
  882. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/web_server.py +0 -0
  883. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio/webui/websocket_manager.py +0 -0
  884. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio.egg-info/dependency_links.txt +0 -0
  885. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio.egg-info/entry_points.txt +0 -0
  886. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio.egg-info/requires.txt +0 -0
  887. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/boneio.egg-info/top_level.txt +0 -0
  888. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/pyproject.toml +0 -0
  889. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/setup.cfg +0 -0
  890. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/setup.py +0 -0
  891. {boneio-1.6.0.dev28 → boneio-1.6.0.dev29}/tests/test_py313_compatibility.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boneio
3
- Version: 1.6.0.dev28
3
+ Version: 1.6.0.dev29
4
4
  Summary: Python App for BoneIO
5
5
  Author-email: Paweł Szafer <pszafer@gmail.com>
6
6
  License: GNU General Public License v3.0
@@ -1 +1 @@
1
- {"plans":{"1.3.0":"645ac6bdda8dc0a73c219aa3684a29df4bdd4032aad97a833b259de489b2ce32","1.3.1":"580381a4f6f40fc1bd4e903e591ad0d5c1db27daaccafc6f79dabf8c3b84259a","1.3.2":"7a69ffaf0c41438be25a656dcdc87783daac0eae79218d023648ef9d708e373f","1.4.0":"41c3a16e7819857a4b826e944fcfb4f79c58e7192cb151b106a3acd7487d5771","1.4.3":"a8cfbabff09d21944a822c4a70f23a7ee14960c4054de151c9fbc7cdb29adff5","1.4.4":"19508f66d84f1e16bd24932aaa17d45417912ffd1c20d326b2f003b931ac2f8c","1.5.0":"52d9d118da099abda0e0153cd16892e201681f6e4d3c6e5790284d1ac469a407","1.5.1":"d283cb8c01024338fb614ae2199744d883379f59579423e4eb9234f5c59ebdd8","1.5.10":"889e2f12614e6e67d342571c1c3bab8940659bfbbf43fa30a6847e73decb85d1","1.5.11":"4906e4de2b3a9c2f0b0181817c9dc168cb910ba6941691d4e86b8387802b624a","1.5.12":"c0a0dc085bb33d9718e869ed5effc2c1581deffd7ed0d5adc119b94312181625","1.5.13":"bfe58c8756f9b5f5e55d5acbb6f7cfc469d201004d312c14e022eb7c52369b7d","1.5.14":"a0464f11e05128cba8881e6295e591fce1ed1e8d43ab0e16710effb8e543d810","1.5.15":"0687a735cb4aaf8f8f74ad6e228ca1b14e045cba8821991c7d19fc9beaeac766","1.5.16":"3544ac754f39d56ecf2b06300b7cca1b6f8723f99885cd11bd690f1a704d3728","1.5.17":"cf1e9e0ff6812cb7092a82dd588392d625decbe3680fe003dfc554f9045809d3","1.5.18":"1fd873effa66b632217d674745722f712a48b36bb79957fefae722757a74bc30","1.5.2":"39fccb7582e13e7e3436861fde7b83ddb8057788cbde792f2f0cf7003f068850","1.5.3":"39fccb7582e13e7e3436861fde7b83ddb8057788cbde792f2f0cf7003f068850","1.5.4":"e86174ba5aff6f257f8a3f4721c7942885cd203469a9d8ddc15dbe6c704e0f45","1.5.5":"f93ed2d4342e447eb9900a0150331113918f2a8b3baeeb795c07231d80f0337c","1.5.6":"e3d90e6ceb20d760f1e9fa63224c5a070a16b3ca6e7dc4cc2c594138e929cce8","1.5.7":"a0464f11e05128cba8881e6295e591fce1ed1e8d43ab0e16710effb8e543d810","1.5.8":"f075b84fb04f4043658a28402d963494dd58481f164c0b371cec94322fe6d131","1.5.9":"ac170fc924019fc2acd69a90a82ba5c2552dce7a2c01a05e5407443e7a9e5af7","1.6.0":"c8286514d1a4f1805e727e13d3c350bb390378c6f31ad6920030412d61ec9b3f","1.6.1":"aa1d3934091853fc21208993930c1bf92e17136428d1d0baaefabfa65d13e7fa","1.6.10":"41c3a16e7819857a4b826e944fcfb4f79c58e7192cb151b106a3acd7487d5771","1.6.11":"d136203e08e3b052254403815d4ccedb555b0a297686fe97952d275eb1f322eb","1.6.12":"c328d4e36bd6277e01cef0140993e23970f4dff84425f3eba236cdd9a8954355","1.6.13":"f1f8b091d054a08665f047b5ad91f1f309f729a8aa30a2992d6ffdbd7f9fa7e4","1.6.14":"f1f8b091d054a08665f047b5ad91f1f309f729a8aa30a2992d6ffdbd7f9fa7e4","1.6.15":"8cfaeae24ceefe171d40241549c1f62527ce41821e5fd2904c0df1973596c0c7","1.6.16":"4b7e00dbe218a173ee83dd9cb32103f7129520352bdb4b11172d62e55df519c1","1.6.17":"7f87b537e2d2618d0fed97683c9db9b13143025f63aae7fa6bf6ee2534d9cf68","1.6.18":"7f87b537e2d2618d0fed97683c9db9b13143025f63aae7fa6bf6ee2534d9cf68","1.6.19":"4b7e00dbe218a173ee83dd9cb32103f7129520352bdb4b11172d62e55df519c1","1.6.2":"6ef96b5e00a04a929d16f0e4a136bfcc5b8132a466d6907a99b2c8516a8952d5","1.6.20":"28027c836eef19b21b95500760961e181f6078d22cccf8cca62b77bbbb11a0c5","1.6.21":"b0d0777e81edc8532d42bcd3b6d518fecd6078153dfe9f5f859469d2c13b369d","1.6.22":"6600f96197356bdc676e9cd7d2d40b18c9d8838323f8cae0892f056175396313","1.6.23":"4b7e00dbe218a173ee83dd9cb32103f7129520352bdb4b11172d62e55df519c1","1.6.24":"701460ed5e3ed236c8c7273ba0a98a0235786b4a04bd6c7aa6088fb835549aa6","1.6.25":"efa09d1677148bdfe4639273479c9a1fa527d4cf5d2ca9af6dd876883652ba22","1.6.26":"7f87b537e2d2618d0fed97683c9db9b13143025f63aae7fa6bf6ee2534d9cf68","1.6.27":"7f87b537e2d2618d0fed97683c9db9b13143025f63aae7fa6bf6ee2534d9cf68","1.6.28":"6e219d09a06a5de8162a521c9b3c3b54067e6bb4d1d15b3b47a8ec522fd76b5c","1.6.29":"7f87b537e2d2618d0fed97683c9db9b13143025f63aae7fa6bf6ee2534d9cf68","1.6.3":"5c10db827bcb92b9322d4aa5751076b825da87c6d18d6953847ba72317cca862","1.6.30":"7f87b537e2d2618d0fed97683c9db9b13143025f63aae7fa6bf6ee2534d9cf68","1.6.31":"fe5e93397dfe4e459cb7c19bfb09153707ebe4b6c92a60a279bf61b0fbc482fb","1.6.32":"c5dbc5a513107d179d55c2f7360e66299167107acd92bc1f5c3a6b19bc7b6e31","1.6.33":"7f87b537e2d2618d0fed97683c9db9b13143025f63aae7fa6bf6ee2534d9cf68","1.6.4":"baf2bb1c2ec7c1bfccfc514ef1cef67907e056e4f7153bb5932ecb835c9cff78","1.6.5":"65a083182affb9a2beef674bb17dee390bec0007441f1ee71b92e05117c65937","1.6.6":"535bb041b99d5ac1bc9028ea88bc2fbf3dbadc80ea8dea236cc219123c194114","1.6.7":"d59af413e270e6f34b1b9a1c8c4acef35328f00e26fad447cfe214545af78d8f","1.6.8":"5c03d447037a48211f0223bb9ecc8cdc1fa84b93bec8e61b1a3073188ac7ea4e","1.6.9":"978c88cc23a2ce07fe419d40a4f9aaf1a1388d01c6b43235e6f08fc09a03a96f"},"release":"1.6.0.dev28"}
1
+ {"plans":{"1.3.0":"645ac6bdda8dc0a73c219aa3684a29df4bdd4032aad97a833b259de489b2ce32","1.3.1":"580381a4f6f40fc1bd4e903e591ad0d5c1db27daaccafc6f79dabf8c3b84259a","1.3.2":"7a69ffaf0c41438be25a656dcdc87783daac0eae79218d023648ef9d708e373f","1.4.0":"41c3a16e7819857a4b826e944fcfb4f79c58e7192cb151b106a3acd7487d5771","1.4.3":"a8cfbabff09d21944a822c4a70f23a7ee14960c4054de151c9fbc7cdb29adff5","1.4.4":"19508f66d84f1e16bd24932aaa17d45417912ffd1c20d326b2f003b931ac2f8c","1.5.0":"52d9d118da099abda0e0153cd16892e201681f6e4d3c6e5790284d1ac469a407","1.5.1":"d283cb8c01024338fb614ae2199744d883379f59579423e4eb9234f5c59ebdd8","1.5.10":"889e2f12614e6e67d342571c1c3bab8940659bfbbf43fa30a6847e73decb85d1","1.5.11":"4906e4de2b3a9c2f0b0181817c9dc168cb910ba6941691d4e86b8387802b624a","1.5.12":"c0a0dc085bb33d9718e869ed5effc2c1581deffd7ed0d5adc119b94312181625","1.5.13":"bfe58c8756f9b5f5e55d5acbb6f7cfc469d201004d312c14e022eb7c52369b7d","1.5.14":"a0464f11e05128cba8881e6295e591fce1ed1e8d43ab0e16710effb8e543d810","1.5.15":"0687a735cb4aaf8f8f74ad6e228ca1b14e045cba8821991c7d19fc9beaeac766","1.5.16":"3544ac754f39d56ecf2b06300b7cca1b6f8723f99885cd11bd690f1a704d3728","1.5.17":"cf1e9e0ff6812cb7092a82dd588392d625decbe3680fe003dfc554f9045809d3","1.5.18":"1fd873effa66b632217d674745722f712a48b36bb79957fefae722757a74bc30","1.5.2":"39fccb7582e13e7e3436861fde7b83ddb8057788cbde792f2f0cf7003f068850","1.5.3":"39fccb7582e13e7e3436861fde7b83ddb8057788cbde792f2f0cf7003f068850","1.5.4":"e86174ba5aff6f257f8a3f4721c7942885cd203469a9d8ddc15dbe6c704e0f45","1.5.5":"f93ed2d4342e447eb9900a0150331113918f2a8b3baeeb795c07231d80f0337c","1.5.6":"e3d90e6ceb20d760f1e9fa63224c5a070a16b3ca6e7dc4cc2c594138e929cce8","1.5.7":"a0464f11e05128cba8881e6295e591fce1ed1e8d43ab0e16710effb8e543d810","1.5.8":"f075b84fb04f4043658a28402d963494dd58481f164c0b371cec94322fe6d131","1.5.9":"ac170fc924019fc2acd69a90a82ba5c2552dce7a2c01a05e5407443e7a9e5af7","1.6.0":"c8286514d1a4f1805e727e13d3c350bb390378c6f31ad6920030412d61ec9b3f","1.6.1":"aa1d3934091853fc21208993930c1bf92e17136428d1d0baaefabfa65d13e7fa","1.6.10":"41c3a16e7819857a4b826e944fcfb4f79c58e7192cb151b106a3acd7487d5771","1.6.11":"d136203e08e3b052254403815d4ccedb555b0a297686fe97952d275eb1f322eb","1.6.12":"c328d4e36bd6277e01cef0140993e23970f4dff84425f3eba236cdd9a8954355","1.6.13":"f1f8b091d054a08665f047b5ad91f1f309f729a8aa30a2992d6ffdbd7f9fa7e4","1.6.14":"f1f8b091d054a08665f047b5ad91f1f309f729a8aa30a2992d6ffdbd7f9fa7e4","1.6.15":"8cfaeae24ceefe171d40241549c1f62527ce41821e5fd2904c0df1973596c0c7","1.6.16":"4b7e00dbe218a173ee83dd9cb32103f7129520352bdb4b11172d62e55df519c1","1.6.17":"7f87b537e2d2618d0fed97683c9db9b13143025f63aae7fa6bf6ee2534d9cf68","1.6.18":"7f87b537e2d2618d0fed97683c9db9b13143025f63aae7fa6bf6ee2534d9cf68","1.6.19":"4b7e00dbe218a173ee83dd9cb32103f7129520352bdb4b11172d62e55df519c1","1.6.2":"6ef96b5e00a04a929d16f0e4a136bfcc5b8132a466d6907a99b2c8516a8952d5","1.6.20":"28027c836eef19b21b95500760961e181f6078d22cccf8cca62b77bbbb11a0c5","1.6.21":"b0d0777e81edc8532d42bcd3b6d518fecd6078153dfe9f5f859469d2c13b369d","1.6.22":"6600f96197356bdc676e9cd7d2d40b18c9d8838323f8cae0892f056175396313","1.6.23":"4b7e00dbe218a173ee83dd9cb32103f7129520352bdb4b11172d62e55df519c1","1.6.24":"701460ed5e3ed236c8c7273ba0a98a0235786b4a04bd6c7aa6088fb835549aa6","1.6.25":"efa09d1677148bdfe4639273479c9a1fa527d4cf5d2ca9af6dd876883652ba22","1.6.26":"7f87b537e2d2618d0fed97683c9db9b13143025f63aae7fa6bf6ee2534d9cf68","1.6.27":"7f87b537e2d2618d0fed97683c9db9b13143025f63aae7fa6bf6ee2534d9cf68","1.6.28":"6e219d09a06a5de8162a521c9b3c3b54067e6bb4d1d15b3b47a8ec522fd76b5c","1.6.29":"7f87b537e2d2618d0fed97683c9db9b13143025f63aae7fa6bf6ee2534d9cf68","1.6.3":"5c10db827bcb92b9322d4aa5751076b825da87c6d18d6953847ba72317cca862","1.6.30":"7f87b537e2d2618d0fed97683c9db9b13143025f63aae7fa6bf6ee2534d9cf68","1.6.31":"fe5e93397dfe4e459cb7c19bfb09153707ebe4b6c92a60a279bf61b0fbc482fb","1.6.32":"c5dbc5a513107d179d55c2f7360e66299167107acd92bc1f5c3a6b19bc7b6e31","1.6.33":"7f87b537e2d2618d0fed97683c9db9b13143025f63aae7fa6bf6ee2534d9cf68","1.6.4":"baf2bb1c2ec7c1bfccfc514ef1cef67907e056e4f7153bb5932ecb835c9cff78","1.6.5":"65a083182affb9a2beef674bb17dee390bec0007441f1ee71b92e05117c65937","1.6.6":"535bb041b99d5ac1bc9028ea88bc2fbf3dbadc80ea8dea236cc219123c194114","1.6.7":"d59af413e270e6f34b1b9a1c8c4acef35328f00e26fad447cfe214545af78d8f","1.6.8":"5c03d447037a48211f0223bb9ecc8cdc1fa84b93bec8e61b1a3073188ac7ea4e","1.6.9":"978c88cc23a2ce07fe419d40a4f9aaf1a1388d01c6b43235e6f08fc09a03a96f"},"release":"1.6.0.dev29"}
@@ -0,0 +1,2 @@
1
+ # flake8: noqa
2
+ __version__ = "1.6.0.dev29"
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{H as t,Qt as n,V as r,fn as i,ln as a,ot as o,un as s,vn as c,yn as l}from"./fa-ChDOCx3T.js";import{a as u,i as d,n as f,o as p,r as m,t as h}from"./dialog-DMaCttcv.js";import{n as g}from"./axios-DyqbZVcF.js";import{F as _,I as v,L as y,N as b,P as x,T as S,h as C,m as w,y as T,z as E}from"./index-CxoiGDl4.js";import{t as D}from"./LoadingState-CkHBGP1B.js";var O=e(l(),1),k=c(),A=3;function j({id:e,label:n,value:i,onChange:a,autoComplete:o,error:s,autoFocus:c}){let{t:l}=y(),[u,d]=(0,O.useState)(!1);return(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsx)(`label`,{htmlFor:e,className:`text-sm font-medium`,children:n}),(0,k.jsxs)(`div`,{className:`input w-full pr-1 ${s?`input-error`:``}`,children:[(0,k.jsx)(`input`,{id:e,type:u?`text`:`password`,autoComplete:o,autoFocus:c,required:!0,className:`grow font-mono`,"aria-invalid":s?!0:void 0,"aria-describedby":s?`${e}-error`:void 0,value:i,onChange:e=>a(e.target.value)}),(0,k.jsx)(`button`,{type:`button`,onClick:()=>d(e=>!e),className:`btn btn-ghost btn-square btn-sm`,"aria-label":l(u?`login.hide_password`:`login.show_password`),"aria-pressed":u,title:l(u?`login.hide_password`:`login.show_password`),children:u?(0,k.jsx)(t,{className:`h-4 w-4 opacity-70`}):(0,k.jsx)(r,{className:`h-4 w-4 opacity-70`})})]}),s&&(0,k.jsx)(`p`,{id:`${e}-error`,role:`alert`,className:`text-error text-xs`,children:s})]})}function M({username:e,isSelf:t,onClose:n,onChanged:r}){let{t:i}=y(),[a,s]=(0,O.useState)(``),[c,l]=(0,O.useState)(``),[v,b]=(0,O.useState)(``),[S,C]=(0,O.useState)(null),[w,T]=(0,O.useState)(null),[E,D]=(0,O.useState)(!1),M=_(c,v,e??``),N=c&&M&&M!==`mismatch`?i(x[M],{min:8}):null,P=v&&M===`mismatch`?i(`accounts.password_mismatch`):null,F=async n=>{if(n.preventDefault(),!(!e||M||t&&!a)){C(null),T(null),D(!0);try{let{data:n}=t?await g.put(`/api/account/password`,{current_password:a,new_password:c},{timeout:6e4}):await g.put(`/api/accounts/${encodeURIComponent(e)}/password`,{password:c},{timeout:6e4});typeof n?.token==`string`&&localStorage.setItem(`token`,n.token),r(e)}catch(e){let t=e.response;if(t?.status===403&&t.data?.code===`current_password_wrong`){let e=t.data.attempts_left;C(typeof e==`number`&&e<=A?`${i(`accounts.current_password_wrong`)} ${i(`reauth.attempts_left`,{count:e})}`:i(`accounts.current_password_wrong`))}else t?.status===429?T(i(`reauth.throttled`)):t?.status!==401&&T(t?.data?.detail||i(`accounts.password_failed`))}finally{D(!1)}}},I=t?i(`accounts.change_own_password_title`):i(`accounts.change_password_title`,{username:e??``});return(0,k.jsx)(h,{open:e!==null,onOpenChange:e=>!e&&!E&&n(),children:(0,k.jsx)(f,{className:`sm:max-w-md`,children:(0,k.jsxs)(`form`,{onSubmit:F,className:`flex flex-col gap-4`,children:[(0,k.jsxs)(u,{children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,k.jsx)(`span`,{className:`stg-chip w-10 h-10 rounded-xl flex items-center justify-center shrink-0`,children:(0,k.jsx)(o,{})}),(0,k.jsx)(p,{children:I})]}),(0,k.jsx)(m,{children:i(t?`accounts.change_own_password_intro`:`accounts.change_password_intro`)})]}),t&&(0,k.jsx)(j,{id:`account-current-password`,label:i(`accounts.current_password`),value:a,onChange:e=>{s(e),C(null)},autoComplete:`current-password`,error:S,autoFocus:!0}),(0,k.jsx)(j,{id:`account-new-password`,label:i(`accounts.new_password`),value:c,onChange:l,autoComplete:`new-password`,error:N,autoFocus:!t}),(0,k.jsx)(j,{id:`account-repeat-password`,label:i(`accounts.repeat_password`),value:v,onChange:b,autoComplete:`new-password`,error:P}),(0,k.jsx)(`p`,{className:`text-xs opacity-70`,children:i(`accounts.ssh_password_separate`)}),w&&(0,k.jsx)(`p`,{role:`alert`,className:`text-error text-sm`,children:w}),(0,k.jsxs)(d,{children:[(0,k.jsx)(`button`,{type:`button`,className:`btn btn-ghost max-sm:btn-lg`,onClick:n,disabled:E,children:i(`common.cancel`)}),(0,k.jsxs)(`button`,{type:`submit`,className:`btn btn-primary max-sm:btn-lg`,disabled:E||!!M||t&&!a,children:[E&&(0,k.jsx)(`span`,{className:`loading loading-spinner loading-sm`}),i(`accounts.change_password_button`)]})]})]})})})}function N({username:e,onClose:t,onConfirm:n}){let{t:r}=y(),[i,o]=(0,O.useState)(!1);return(0,k.jsx)(h,{open:e!==null,onOpenChange:e=>!e&&!i&&t(),children:(0,k.jsxs)(f,{className:`sm:max-w-sm`,children:[(0,k.jsxs)(u,{children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,k.jsx)(`span`,{className:`stg-chip w-10 h-10 rounded-xl flex items-center justify-center shrink-0 text-error`,children:(0,k.jsx)(a,{})}),(0,k.jsx)(p,{children:r(`accounts.confirm_delete`,{username:e??``})})]}),(0,k.jsx)(m,{children:r(`accounts.confirm_delete_intro`)})]}),(0,k.jsxs)(d,{children:[(0,k.jsx)(`button`,{type:`button`,className:`btn btn-ghost max-sm:btn-lg`,onClick:t,disabled:i,children:r(`common.cancel`)}),(0,k.jsxs)(`button`,{type:`button`,className:`btn btn-error max-sm:btn-lg`,onClick:async()=>{if(e){o(!0);try{await n(e)}finally{o(!1)}}},disabled:i,children:[i&&(0,k.jsx)(`span`,{className:`loading loading-spinner loading-sm`}),r(`accounts.delete`)]})]})]})})}function P(e,t){return e===`locked`||e===`empty`?e:e===`set`||e===`shipped`?t?`form`:`outdated`:`unknown`}var F=`boneio`,I=3;function L({open:e,shipped:t,onClose:r,onChanged:i,onStale:a}){let{t:o}=y(),[s,c]=(0,O.useState)(``),[l,v]=(0,O.useState)(``),[b,S]=(0,O.useState)(``),[C,w]=(0,O.useState)(null),[T,E]=(0,O.useState)(null),[D,A]=(0,O.useState)(!1),M=_(l,b,F),N=l&&M&&M!==`mismatch`?o(x[M],{min:8}):null,P=b&&M===`mismatch`?o(`accounts.password_mismatch`):null;return(0,k.jsx)(h,{open:e,onOpenChange:e=>!e&&!D&&r(),children:(0,k.jsx)(f,{className:`sm:max-w-md`,children:(0,k.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),!M&&s){w(null),E(null),A(!0);try{await g.put(`/api/accounts/ssh-password`,{current_password:s,new_password:l},{timeout:6e4}),i()}catch(e){let t=e.response,n=t?.data?.code;if(t?.status===403&&n===`current_password_wrong`){let e=t.data?.attempts_left;w(typeof e==`number`&&e<=I?`${o(`accounts.ssh_current_wrong`)} ${o(`accounts.ssh_attempts_left`,{count:e})}`:o(`accounts.ssh_current_wrong`))}else if(t?.status===429){let e=t.data?.retry_after;E(o(`accounts.ssh_throttled`,{minutes:Math.max(1,Math.ceil((typeof e==`number`?e:900)/60))}))}else n===`helper_outdated`||n===`ssh_password_not_set`?a():t?.status!==401&&E(t?.data?.detail||o(`accounts.ssh_failed`))}finally{A(!1)}}},className:`flex flex-col gap-4`,children:[(0,k.jsxs)(u,{children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,k.jsx)(`span`,{className:`stg-chip w-10 h-10 rounded-xl flex items-center justify-center shrink-0`,children:(0,k.jsx)(n,{})}),(0,k.jsx)(p,{children:o(`accounts.ssh_dialog_title`)})]}),(0,k.jsx)(m,{children:o(t?`accounts.ssh_dialog_intro_shipped`:`accounts.ssh_dialog_intro`)})]}),(0,k.jsx)(j,{id:`ssh-current-password`,label:o(`accounts.ssh_current`),value:s,onChange:e=>{c(e),w(null)},autoComplete:`current-password`,error:C,autoFocus:!0}),(0,k.jsx)(j,{id:`ssh-new-password`,label:o(`accounts.ssh_new`),value:l,onChange:v,autoComplete:`new-password`,error:N}),(0,k.jsx)(j,{id:`ssh-repeat-password`,label:o(`accounts.ssh_repeat`),value:b,onChange:S,autoComplete:`new-password`,error:P}),T&&(0,k.jsx)(`p`,{role:`alert`,className:`text-error text-sm`,children:T}),(0,k.jsxs)(d,{children:[(0,k.jsx)(`button`,{type:`button`,className:`btn btn-ghost max-sm:btn-lg`,onClick:r,disabled:D,children:o(`common.cancel`)}),(0,k.jsxs)(`button`,{type:`submit`,className:`btn btn-primary max-sm:btn-lg`,disabled:D||!!M||!s,children:[D&&(0,k.jsx)(`span`,{className:`loading loading-spinner loading-sm`}),o(`accounts.ssh_button`)]})]})]})})})}function R(){let{t:e}=y(),[t,r]=(0,O.useState)(null),[i,a]=(0,O.useState)(!1),[o,s]=(0,O.useState)(!0),[c,l]=(0,O.useState)(null),[u,d]=(0,O.useState)(0),[f,p]=(0,O.useState)(!1),m=(0,O.useCallback)(async()=>{try{let{data:e}=await g.get(`/api/accounts/ssh-password`,{timeout:3e4});r(e?.state??null),a(!!e?.supported)}catch{r(null)}finally{s(!1)}},[]);(0,O.useEffect)(()=>{m()},[m]);let h=P(t,i),_=()=>o?(0,k.jsx)(D,{className:`py-2`}):h===`form`?t===`shipped`?(0,k.jsx)(b,{variant:`warning`,message:e(`accounts.ssh_shipped`)}):null:(0,k.jsx)(b,{variant:h===`empty`?`warning`:`info`,message:e(`accounts.ssh_${h}`)});return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(T,{icon:(0,k.jsx)(n,{}),title:e(`accounts.ssh_title`),description:e(`accounts.ssh_intro`),action:h===`form`&&!o?(0,k.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,onClick:()=>{l(null),d(e=>e+1),p(!0)},children:e(`accounts.ssh_button`)}):void 0,children:(c||_())&&(0,k.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[c&&(0,k.jsx)(b,{variant:`success`,message:c}),_()]})}),(0,k.jsx)(L,{open:f,shipped:t===`shipped`,onClose:()=>p(!1),onChanged:()=>{p(!1),l(e(`accounts.ssh_changed`)),m()},onStale:()=>{p(!1),m()}},u)]})}function z(e,t){return e?.response?.data?.detail||t}function B(){let{t:e}=y(),{username:t,isAdmin:n}=E(),[r,a]=(0,O.useState)([]),[o,c]=(0,O.useState)(!0),[l,u]=(0,O.useState)(null),[d,f]=(0,O.useState)(null),[p,m]=(0,O.useState)(``),[h,_]=(0,O.useState)(``),[A,j]=(0,O.useState)(`viewer`),[P,F]=(0,O.useState)(!1),[I,L]=(0,O.useState)(null),[B,V]=(0,O.useState)(null),H=h?v(h,p):null,U=H?e(x[H],{min:8}):null,W=(0,O.useCallback)(async()=>{try{let{data:e}=await g.get(`/api/accounts`);a(e.accounts??[]),u(null)}catch(t){u(z(t,e(`accounts.load_failed`)))}finally{c(!1)}},[e]);(0,O.useEffect)(()=>{n&&W()},[n,W]);let G=async t=>{t.preventDefault(),u(null),f(null),F(!0);try{await g.post(`/api/accounts`,{username:p,password:h,role:A}),m(``),_(``),j(`viewer`),f(e(`accounts.created`)),await W()}catch(t){u(z(t,e(`accounts.create_failed`)))}finally{F(!1)}},K=async t=>{u(null),f(null);try{await g.delete(`/api/accounts/${encodeURIComponent(t)}`),f(e(`accounts.deleted`,{username:t})),await W()}catch(t){u(z(t,e(`accounts.delete_failed`)))}finally{V(null)}},q=async(t,n)=>{u(null),f(null);try{await g.put(`/api/accounts/${encodeURIComponent(t.username)}/role`,{role:n}),await W()}catch(t){u(z(t,e(`accounts.role_failed`))),await W()}},J=t=>{L(null),u(null),f(e(`accounts.password_reset`,{username:t}))},Y=e=>e.toLowerCase()===(t??``).toLowerCase();return n?(0,k.jsxs)(S,{width:`wide`,children:[l&&(0,k.jsx)(b,{variant:`error`,message:l}),d&&(0,k.jsx)(b,{variant:`success`,message:d}),(0,k.jsx)(T,{icon:(0,k.jsx)(i,{}),title:e(`accounts.title`),children:o?(0,k.jsx)(D,{className:`py-6`}):(0,k.jsx)(`ul`,{className:`stg-inset divide-y divide-base-content/10`,children:r.map(t=>{let n=Y(t.username);return(0,k.jsxs)(`li`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2 px-3 py-2.5`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0 flex-1`,children:[(0,k.jsx)(`span`,{className:`font-medium font-mono truncate`,children:t.username}),n&&(0,k.jsx)(`span`,{className:`badge badge-ghost badge-xs shrink-0`,children:e(`accounts.you`)})]}),(0,k.jsxs)(`select`,{className:`select select-xs select-bordered w-auto`,"aria-label":e(`accounts.role`),value:t.role,disabled:n,onChange:e=>q(t,e.target.value),children:[(0,k.jsx)(`option`,{value:`admin`,children:e(`accounts.role_admin`)}),(0,k.jsx)(`option`,{value:`viewer`,children:e(`accounts.role_viewer`)})]}),(0,k.jsxs)(`div`,{className:`flex justify-end gap-1 w-full sm:w-auto`,children:[(0,k.jsx)(`button`,{className:`btn btn-ghost btn-xs`,onClick:()=>{f(null),L(t.username)},children:e(`accounts.reset_password`)}),(0,k.jsx)(`button`,{className:`btn btn-ghost btn-xs text-error`,disabled:n,onClick:()=>V(t.username),children:e(`accounts.delete`)})]})]},t.username)})})}),(0,k.jsx)(`form`,{onSubmit:G,children:(0,k.jsx)(T,{icon:(0,k.jsx)(s,{}),title:e(`accounts.add_title`),description:e(`accounts.add_intro`),footer:(0,k.jsx)(w,{children:(0,k.jsxs)(`button`,{type:`submit`,className:`btn btn-primary btn-sm gap-2`,disabled:P||!p||!h||!!U,children:[P&&(0,k.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),e(`accounts.add_button`)]})}),children:(0,k.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-[1fr_1fr_auto] gap-3`,children:[(0,k.jsx)(C,{label:e(`accounts.username`),children:(0,k.jsx)(`input`,{type:`text`,className:`input input-bordered w-full font-mono`,placeholder:e(`accounts.username`),autoComplete:`off`,required:!0,value:p,onChange:e=>m(e.target.value)})}),(0,k.jsx)(C,{label:e(`accounts.password`),error:U||void 0,children:(0,k.jsx)(`input`,{type:`password`,className:`input input-bordered w-full font-mono ${U?`input-error`:``}`,placeholder:e(`accounts.password`),autoComplete:`new-password`,required:!0,minLength:8,"aria-invalid":U?!0:void 0,"aria-describedby":U?`accounts-password-error`:void 0,value:h,onChange:e=>_(e.target.value)})}),(0,k.jsx)(C,{label:e(`accounts.role`),className:`sm:w-40`,children:(0,k.jsxs)(`select`,{className:`select select-bordered w-full`,value:A,onChange:e=>j(e.target.value),children:[(0,k.jsx)(`option`,{value:`viewer`,children:e(`accounts.role_viewer`)}),(0,k.jsx)(`option`,{value:`admin`,children:e(`accounts.role_admin`)})]})})]})})}),(0,k.jsx)(R,{}),(0,k.jsx)(M,{username:I,isSelf:I!==null&&Y(I),onClose:()=>L(null),onChanged:J},I??``),(0,k.jsx)(N,{username:B,onClose:()=>V(null),onConfirm:K})]}):(0,k.jsx)(S,{width:`wide`,children:(0,k.jsx)(b,{variant:`warning`,message:e(`accounts.admin_only`)})})}export{B as default};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{H as t,Qt as n,V as r,fn as i,ln as a,ot as o,un as s,vn as c,yn as l}from"./fa-ChDOCx3T.js";import{a as u,i as d,n as f,o as p,r as m,t as h}from"./dialog-DMaCttcv.js";import{n as g}from"./axios-DyqbZVcF.js";import{B as _,F as v,I as y,N as b,P as x,R as S,T as C,h as w,m as T,y as E}from"./index-DULLFI0R.js";import{t as D}from"./LoadingState-BnMjvLnH.js";var O=e(l(),1),k=c(),A=3;function j({id:e,label:n,value:i,onChange:a,autoComplete:o,error:s,autoFocus:c}){let{t:l}=S(),[u,d]=(0,O.useState)(!1);return(0,k.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,k.jsx)(`label`,{htmlFor:e,className:`text-sm font-medium`,children:n}),(0,k.jsxs)(`div`,{className:`input w-full pr-1 ${s?`input-error`:``}`,children:[(0,k.jsx)(`input`,{id:e,type:u?`text`:`password`,autoComplete:o,autoFocus:c,required:!0,className:`grow font-mono`,"aria-invalid":s?!0:void 0,"aria-describedby":s?`${e}-error`:void 0,value:i,onChange:e=>a(e.target.value)}),(0,k.jsx)(`button`,{type:`button`,onClick:()=>d(e=>!e),className:`btn btn-ghost btn-square btn-sm`,"aria-label":l(u?`login.hide_password`:`login.show_password`),"aria-pressed":u,title:l(u?`login.hide_password`:`login.show_password`),children:u?(0,k.jsx)(t,{className:`h-4 w-4 opacity-70`}):(0,k.jsx)(r,{className:`h-4 w-4 opacity-70`})})]}),s&&(0,k.jsx)(`p`,{id:`${e}-error`,role:`alert`,className:`text-error text-xs`,children:s})]})}function M({username:e,isSelf:t,onClose:n,onChanged:r}){let{t:i}=S(),[a,s]=(0,O.useState)(``),[c,l]=(0,O.useState)(``),[_,y]=(0,O.useState)(``),[b,C]=(0,O.useState)(null),[w,T]=(0,O.useState)(null),[E,D]=(0,O.useState)(!1),M=v(c,_,e??``),N=c&&M&&M!==`mismatch`?i(x[M],{min:8}):null,P=_&&M===`mismatch`?i(`accounts.password_mismatch`):null,F=async n=>{if(n.preventDefault(),!(!e||M||t&&!a)){C(null),T(null),D(!0);try{let{data:n}=t?await g.put(`/api/account/password`,{current_password:a,new_password:c},{timeout:6e4}):await g.put(`/api/accounts/${encodeURIComponent(e)}/password`,{password:c},{timeout:6e4});typeof n?.token==`string`&&localStorage.setItem(`token`,n.token),r(e)}catch(e){let t=e.response;if(t?.status===403&&t.data?.code===`current_password_wrong`){let e=t.data.attempts_left;C(typeof e==`number`&&e<=A?`${i(`accounts.current_password_wrong`)} ${i(`reauth.attempts_left`,{count:e})}`:i(`accounts.current_password_wrong`))}else t?.status===429?T(i(`reauth.throttled`)):t?.status!==401&&T(t?.data?.detail||i(`accounts.password_failed`))}finally{D(!1)}}},I=t?i(`accounts.change_own_password_title`):i(`accounts.change_password_title`,{username:e??``});return(0,k.jsx)(h,{open:e!==null,onOpenChange:e=>!e&&!E&&n(),children:(0,k.jsx)(f,{className:`sm:max-w-md`,children:(0,k.jsxs)(`form`,{onSubmit:F,className:`flex flex-col gap-4`,children:[(0,k.jsxs)(u,{children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,k.jsx)(`span`,{className:`stg-chip w-10 h-10 rounded-xl flex items-center justify-center shrink-0`,children:(0,k.jsx)(o,{})}),(0,k.jsx)(p,{children:I})]}),(0,k.jsx)(m,{children:i(t?`accounts.change_own_password_intro`:`accounts.change_password_intro`)})]}),t&&(0,k.jsx)(j,{id:`account-current-password`,label:i(`accounts.current_password`),value:a,onChange:e=>{s(e),C(null)},autoComplete:`current-password`,error:b,autoFocus:!0}),(0,k.jsx)(j,{id:`account-new-password`,label:i(`accounts.new_password`),value:c,onChange:l,autoComplete:`new-password`,error:N,autoFocus:!t}),(0,k.jsx)(j,{id:`account-repeat-password`,label:i(`accounts.repeat_password`),value:_,onChange:y,autoComplete:`new-password`,error:P}),(0,k.jsx)(`p`,{className:`text-xs opacity-70`,children:i(`accounts.ssh_password_separate`)}),w&&(0,k.jsx)(`p`,{role:`alert`,className:`text-error text-sm`,children:w}),(0,k.jsxs)(d,{children:[(0,k.jsx)(`button`,{type:`button`,className:`btn btn-ghost max-sm:btn-lg`,onClick:n,disabled:E,children:i(`common.cancel`)}),(0,k.jsxs)(`button`,{type:`submit`,className:`btn btn-primary max-sm:btn-lg`,disabled:E||!!M||t&&!a,children:[E&&(0,k.jsx)(`span`,{className:`loading loading-spinner loading-sm`}),i(`accounts.change_password_button`)]})]})]})})})}function N({username:e,onClose:t,onConfirm:n}){let{t:r}=S(),[i,o]=(0,O.useState)(!1);return(0,k.jsx)(h,{open:e!==null,onOpenChange:e=>!e&&!i&&t(),children:(0,k.jsxs)(f,{className:`sm:max-w-sm`,children:[(0,k.jsxs)(u,{children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,k.jsx)(`span`,{className:`stg-chip w-10 h-10 rounded-xl flex items-center justify-center shrink-0 text-error`,children:(0,k.jsx)(a,{})}),(0,k.jsx)(p,{children:r(`accounts.confirm_delete`,{username:e??``})})]}),(0,k.jsx)(m,{children:r(`accounts.confirm_delete_intro`)})]}),(0,k.jsxs)(d,{children:[(0,k.jsx)(`button`,{type:`button`,className:`btn btn-ghost max-sm:btn-lg`,onClick:t,disabled:i,children:r(`common.cancel`)}),(0,k.jsxs)(`button`,{type:`button`,className:`btn btn-error max-sm:btn-lg`,onClick:async()=>{if(e){o(!0);try{await n(e)}finally{o(!1)}}},disabled:i,children:[i&&(0,k.jsx)(`span`,{className:`loading loading-spinner loading-sm`}),r(`accounts.delete`)]})]})]})})}function P(e,t){return e===`locked`||e===`empty`?e:e===`set`||e===`shipped`?t?`form`:`outdated`:`unknown`}var F=`boneio`,I=3;function L({open:e,shipped:t,onClose:r,onChanged:i,onStale:a}){let{t:o}=S(),[s,c]=(0,O.useState)(``),[l,_]=(0,O.useState)(``),[y,b]=(0,O.useState)(``),[C,w]=(0,O.useState)(null),[T,E]=(0,O.useState)(null),[D,A]=(0,O.useState)(!1),M=v(l,y,F),N=l&&M&&M!==`mismatch`?o(x[M],{min:8}):null,P=y&&M===`mismatch`?o(`accounts.password_mismatch`):null;return(0,k.jsx)(h,{open:e,onOpenChange:e=>!e&&!D&&r(),children:(0,k.jsx)(f,{className:`sm:max-w-md`,children:(0,k.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),!M&&s){w(null),E(null),A(!0);try{await g.put(`/api/accounts/ssh-password`,{current_password:s,new_password:l},{timeout:6e4}),i()}catch(e){let t=e.response,n=t?.data?.code;if(t?.status===403&&n===`current_password_wrong`){let e=t.data?.attempts_left;w(typeof e==`number`&&e<=I?`${o(`accounts.ssh_current_wrong`)} ${o(`accounts.ssh_attempts_left`,{count:e})}`:o(`accounts.ssh_current_wrong`))}else if(t?.status===429){let e=t.data?.retry_after;E(o(`accounts.ssh_throttled`,{minutes:Math.max(1,Math.ceil((typeof e==`number`?e:900)/60))}))}else n===`helper_outdated`||n===`ssh_password_not_set`?a():t?.status!==401&&E(t?.data?.detail||o(`accounts.ssh_failed`))}finally{A(!1)}}},className:`flex flex-col gap-4`,children:[(0,k.jsxs)(u,{children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,k.jsx)(`span`,{className:`stg-chip w-10 h-10 rounded-xl flex items-center justify-center shrink-0`,children:(0,k.jsx)(n,{})}),(0,k.jsx)(p,{children:o(`accounts.ssh_dialog_title`)})]}),(0,k.jsx)(m,{children:o(t?`accounts.ssh_dialog_intro_shipped`:`accounts.ssh_dialog_intro`)})]}),(0,k.jsx)(j,{id:`ssh-current-password`,label:o(`accounts.ssh_current`),value:s,onChange:e=>{c(e),w(null)},autoComplete:`current-password`,error:C,autoFocus:!0}),(0,k.jsx)(j,{id:`ssh-new-password`,label:o(`accounts.ssh_new`),value:l,onChange:_,autoComplete:`new-password`,error:N}),(0,k.jsx)(j,{id:`ssh-repeat-password`,label:o(`accounts.ssh_repeat`),value:y,onChange:b,autoComplete:`new-password`,error:P}),T&&(0,k.jsx)(`p`,{role:`alert`,className:`text-error text-sm`,children:T}),(0,k.jsxs)(d,{children:[(0,k.jsx)(`button`,{type:`button`,className:`btn btn-ghost max-sm:btn-lg`,onClick:r,disabled:D,children:o(`common.cancel`)}),(0,k.jsxs)(`button`,{type:`submit`,className:`btn btn-primary max-sm:btn-lg`,disabled:D||!!M||!s,children:[D&&(0,k.jsx)(`span`,{className:`loading loading-spinner loading-sm`}),o(`accounts.ssh_button`)]})]})]})})})}function R(){let{t:e}=S(),[t,r]=(0,O.useState)(null),[i,a]=(0,O.useState)(!1),[o,s]=(0,O.useState)(!0),[c,l]=(0,O.useState)(null),[u,d]=(0,O.useState)(0),[f,p]=(0,O.useState)(!1),m=(0,O.useCallback)(async()=>{try{let{data:e}=await g.get(`/api/accounts/ssh-password`,{timeout:3e4});r(e?.state??null),a(!!e?.supported)}catch{r(null)}finally{s(!1)}},[]);(0,O.useEffect)(()=>{m()},[m]);let h=P(t,i),_=()=>o?(0,k.jsx)(D,{className:`py-2`}):h===`form`?t===`shipped`?(0,k.jsx)(b,{variant:`warning`,message:e(`accounts.ssh_shipped`)}):null:(0,k.jsx)(b,{variant:h===`empty`?`warning`:`info`,message:e(`accounts.ssh_${h}`)});return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(E,{icon:(0,k.jsx)(n,{}),title:e(`accounts.ssh_title`),description:e(`accounts.ssh_intro`),action:h===`form`&&!o?(0,k.jsx)(`button`,{type:`button`,className:`btn btn-primary btn-sm`,onClick:()=>{l(null),d(e=>e+1),p(!0)},children:e(`accounts.ssh_button`)}):void 0,children:(c||_())&&(0,k.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[c&&(0,k.jsx)(b,{variant:`success`,message:c}),_()]})}),(0,k.jsx)(L,{open:f,shipped:t===`shipped`,onClose:()=>p(!1),onChanged:()=>{p(!1),l(e(`accounts.ssh_changed`)),m()},onStale:()=>{p(!1),m()}},u)]})}function z(e,t){return e?.response?.data?.detail||t}function B(){let{t:e}=S(),{username:t,isAdmin:n}=_(),[r,a]=(0,O.useState)([]),[o,c]=(0,O.useState)(!0),[l,u]=(0,O.useState)(null),[d,f]=(0,O.useState)(null),[p,m]=(0,O.useState)(``),[h,v]=(0,O.useState)(``),[A,j]=(0,O.useState)(`viewer`),[P,F]=(0,O.useState)(!1),[I,L]=(0,O.useState)(null),[B,V]=(0,O.useState)(null),H=h?y(h,p):null,U=H?e(x[H],{min:8}):null,W=(0,O.useCallback)(async()=>{try{let{data:e}=await g.get(`/api/accounts`);a(e.accounts??[]),u(null)}catch(t){u(z(t,e(`accounts.load_failed`)))}finally{c(!1)}},[e]);(0,O.useEffect)(()=>{n&&W()},[n,W]);let G=async t=>{t.preventDefault(),u(null),f(null),F(!0);try{await g.post(`/api/accounts`,{username:p,password:h,role:A}),m(``),v(``),j(`viewer`),f(e(`accounts.created`)),await W()}catch(t){u(z(t,e(`accounts.create_failed`)))}finally{F(!1)}},K=async t=>{u(null),f(null);try{await g.delete(`/api/accounts/${encodeURIComponent(t)}`),f(e(`accounts.deleted`,{username:t})),await W()}catch(t){u(z(t,e(`accounts.delete_failed`)))}finally{V(null)}},q=async(t,n)=>{u(null),f(null);try{await g.put(`/api/accounts/${encodeURIComponent(t.username)}/role`,{role:n}),await W()}catch(t){u(z(t,e(`accounts.role_failed`))),await W()}},J=t=>{L(null),u(null),f(e(`accounts.password_reset`,{username:t}))},Y=e=>e.toLowerCase()===(t??``).toLowerCase();return n?(0,k.jsxs)(C,{width:`wide`,children:[l&&(0,k.jsx)(b,{variant:`error`,message:l}),d&&(0,k.jsx)(b,{variant:`success`,message:d}),(0,k.jsx)(E,{icon:(0,k.jsx)(i,{}),title:e(`accounts.title`),children:o?(0,k.jsx)(D,{className:`py-6`}):(0,k.jsx)(`ul`,{className:`stg-inset divide-y divide-base-content/10`,children:r.map(t=>{let n=Y(t.username);return(0,k.jsxs)(`li`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2 px-3 py-2.5`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0 flex-1`,children:[(0,k.jsx)(`span`,{className:`font-medium font-mono truncate`,children:t.username}),n&&(0,k.jsx)(`span`,{className:`badge badge-ghost badge-xs shrink-0`,children:e(`accounts.you`)})]}),(0,k.jsxs)(`select`,{className:`select select-xs select-bordered w-auto`,"aria-label":e(`accounts.role`),value:t.role,disabled:n,onChange:e=>q(t,e.target.value),children:[(0,k.jsx)(`option`,{value:`admin`,children:e(`accounts.role_admin`)}),(0,k.jsx)(`option`,{value:`viewer`,children:e(`accounts.role_viewer`)})]}),(0,k.jsxs)(`div`,{className:`flex justify-end gap-1 w-full sm:w-auto`,children:[(0,k.jsx)(`button`,{className:`btn btn-ghost btn-xs`,onClick:()=>{f(null),L(t.username)},children:e(`accounts.reset_password`)}),(0,k.jsx)(`button`,{className:`btn btn-ghost btn-xs text-error`,disabled:n,onClick:()=>V(t.username),children:e(`accounts.delete`)})]})]},t.username)})})}),(0,k.jsx)(`form`,{onSubmit:G,children:(0,k.jsx)(E,{icon:(0,k.jsx)(s,{}),title:e(`accounts.add_title`),description:e(`accounts.add_intro`),footer:(0,k.jsx)(T,{children:(0,k.jsxs)(`button`,{type:`submit`,className:`btn btn-primary btn-sm gap-2`,disabled:P||!p||!h||!!U,children:[P&&(0,k.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),e(`accounts.add_button`)]})}),children:(0,k.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-[1fr_1fr_auto] gap-3`,children:[(0,k.jsx)(w,{label:e(`accounts.username`),children:(0,k.jsx)(`input`,{type:`text`,className:`input input-bordered w-full font-mono`,placeholder:e(`accounts.username`),autoComplete:`off`,required:!0,value:p,onChange:e=>m(e.target.value)})}),(0,k.jsx)(w,{label:e(`accounts.password`),error:U||void 0,children:(0,k.jsx)(`input`,{type:`password`,className:`input input-bordered w-full font-mono ${U?`input-error`:``}`,placeholder:e(`accounts.password`),autoComplete:`new-password`,required:!0,minLength:8,"aria-invalid":U?!0:void 0,"aria-describedby":U?`accounts-password-error`:void 0,value:h,onChange:e=>v(e.target.value)})}),(0,k.jsx)(w,{label:e(`accounts.role`),className:`sm:w-40`,children:(0,k.jsxs)(`select`,{className:`select select-bordered w-full`,value:A,onChange:e=>j(e.target.value),children:[(0,k.jsx)(`option`,{value:`viewer`,children:e(`accounts.role_viewer`)}),(0,k.jsx)(`option`,{value:`admin`,children:e(`accounts.role_admin`)})]})})]})})}),(0,k.jsx)(R,{}),(0,k.jsx)(M,{username:I,isSelf:I!==null&&Y(I),onClose:()=>L(null),onChanged:J},I??``),(0,k.jsx)(N,{username:B,onClose:()=>V(null),onConfirm:K})]}):(0,k.jsx)(C,{width:`wide`,children:(0,k.jsx)(b,{variant:`warning`,message:e(`accounts.admin_only`)})})}export{B as default};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{vn as t,yn as n}from"./fa-ChDOCx3T.js";import{n as r}from"./axios-DyqbZVcF.js";import{i}from"./configCache-DZ0vWq_Z.js";var a=e(n(),1),o=`boneio-provisioned`;function s(e){let t=e?.match(/\/(proxy\/\d+)\/?$/);return t?`${o}-${t[1].replace(`/`,`-`)}`:o}function c(e,t){try{return e?.getItem(s(t))===`1`}catch{return!1}}function l(e,t,n){try{e?.setItem(s(t),n?`0`:`1`)}catch{}}var u=`boneio-update`,d=`boneio-stale-reload`;function f(e,t){let n=t?.match(/\/(proxy\/\d+)\/?$/);return n?`${e}-${n[1].replace(`/`,`-`)}`:e}function p(e){if(!e)return null;let t=e.trim();return t.startsWith(`v`)?t.slice(1):t}function m(e,t,n){try{let r=e?.getItem(f(u,t));if(!r)return null;let i=JSON.parse(r);return typeof i?.startedAt!=`number`||typeof i.fromVersion!=`string`||n-i.startedAt>36e5||i.startedAt>n+6e4?null:i}catch{return null}}function h(e,t,n){try{e?.setItem(f(u,t),JSON.stringify(n))}catch{}}function g(e,t){try{e?.removeItem(f(u,t))}catch{}}function _(e,t,n){if(t)return e.wentDown||e.downSince===void 0?e:{...e,downSince:void 0};let r=e.downSince??n,i=!!e.wentDown||n-r>=15e3;return r===e.downSince&&i===!!e.wentDown?e:{...e,downSince:r,wentDown:i}}function v(e,t){let n=p(t);if(!n)return!1;let r=p(e.toVersion);return r?n===r:n!==p(e.fromVersion)}function y(e){let{reachable:t,serverVersion:n,panelVersion:r,mark:i}=e;if(!t)return i?`updating`:`probably_updating`;let a=p(n),o=p(r);return a&&o&&a!==o?`stale_panel`:i&&i.wentDown&&a&&!v(i,a)&&a===p(i.fromVersion)?`update_failed`:`ok`}function b(e,t){try{return e?.getItem(d)===t}catch{return!0}}function x(e,t){try{e?.setItem(d,t)}catch{}}var S=t(),C=(0,a.createContext)({data:null,isLoading:!0,isApiAvailable:!0,needsOnboarding:!1,panelState:`ok`,dismissPanelState:()=>{},refetch:async()=>{}});function w(){return(0,a.useContext)(C)}function T(e,t){return e||!!t?.needs_onboarding}var E=2,D=1e3,O=3e4,k=5e3,A=`boneio-stale-bypass`,j=`1.6.0.dev28`;function M(e){try{return window.sessionStorage.getItem(e)}catch{return null}}function N({children:e}){let[t,n]=(0,a.useState)(null),[o,s]=(0,a.useState)(!0),[c,u]=(0,a.useState)(!0),[d,f]=(0,a.useState)(!1),[p,b]=(0,a.useState)(`ok`),x=(0,a.useCallback)((e,t)=>{let n=window.__BONEIO_BASE_PATH__,r=Date.now(),i=m(window.localStorage,n,r);if(i){let t=_(i,e,r);t!==i&&h(window.localStorage,n,t),i=t}i&&e&&v(i,t)&&(g(window.localStorage,n),i=null);let a=y({reachable:e,serverVersion:t,panelVersion:j,mark:i});a===`stale_panel`&&t&&M(A)===t&&(a=`ok`),b(a)},[]),w=(0,a.useCallback)(()=>{g(window.localStorage,window.__BONEIO_BASE_PATH__);let e=t?.version;if(p===`stale_panel`&&e)try{window.sessionStorage.setItem(A,e)}catch{}b(`ok`)},[t?.version,p]),N=(0,a.useCallback)(async()=>{for(let e=0;e<=E;e++)try{let{data:e}=await r.get(`/api/init`);n(t=>t&&JSON.stringify(t)===JSON.stringify(e)?t:e),f(t=>T(t,e)),l(window.localStorage,window.__BONEIO_BASE_PATH__,!!e?.needs_onboarding),x(!0,e?.version??null),u(!0),s(!1),i();return}catch{e<E&&await new Promise(e=>setTimeout(e,D))}x(!1,null),u(!1),s(!1)},[x]);(0,a.useEffect)(()=>{N()},[N]);let P=!c||p===`stale_panel`;return(0,a.useEffect)(()=>{let e=setInterval(N,P?k:O);return()=>clearInterval(e)},[N,P]),(0,a.useEffect)(()=>{let e=()=>{document.visibilityState===`visible`&&N()};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[N]),(0,S.jsx)(C.Provider,{value:{data:t,isLoading:o,isApiAvailable:c,needsOnboarding:d,panelState:p,dismissPanelState:w,refetch:N},children:e})}export{p as a,v as c,g as i,h as l,w as n,x as o,b as r,m as s,N as t,c as u};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{vn as t,yn as n}from"./fa-ChDOCx3T.js";import{n as r}from"./axios-DyqbZVcF.js";import{i}from"./configCache-DZ0vWq_Z.js";var a=e(n(),1),o=`boneio-provisioned`;function s(e){let t=e?.match(/\/(proxy\/\d+)\/?$/);return t?`${o}-${t[1].replace(`/`,`-`)}`:o}function c(e,t){try{return e?.getItem(s(t))===`1`}catch{return!1}}function l(e,t,n){try{e?.setItem(s(t),n?`0`:`1`)}catch{}}var u=`boneio-update`,d=`boneio-stale-reload`;function f(e,t){let n=t?.match(/\/(proxy\/\d+)\/?$/);return n?`${e}-${n[1].replace(`/`,`-`)}`:e}function p(e){if(!e)return null;let t=e.trim();return t.startsWith(`v`)?t.slice(1):t}function m(e,t,n){try{let r=e?.getItem(f(u,t));if(!r)return null;let i=JSON.parse(r);return typeof i?.startedAt!=`number`||typeof i.fromVersion!=`string`||n-i.startedAt>36e5||i.startedAt>n+6e4?null:i}catch{return null}}function h(e,t,n){try{e?.setItem(f(u,t),JSON.stringify(n))}catch{}}function g(e,t){try{e?.removeItem(f(u,t))}catch{}}function _(e,t,n){if(t)return e.wentDown||e.downSince===void 0?e:{...e,downSince:void 0};let r=e.downSince??n,i=!!e.wentDown||n-r>=15e3;return r===e.downSince&&i===!!e.wentDown?e:{...e,downSince:r,wentDown:i}}function v(e,t){let n=p(t);if(!n)return!1;let r=p(e.toVersion);return r?n===r:n!==p(e.fromVersion)}function y(e){let{reachable:t,serverVersion:n,panelVersion:r,mark:i}=e;if(!t)return i?`updating`:`probably_updating`;let a=p(n),o=p(r);return a&&o&&a!==o?`stale_panel`:i&&i.wentDown&&a&&!v(i,a)&&a===p(i.fromVersion)?`update_failed`:`ok`}function b(e,t){try{return e?.getItem(d)===t}catch{return!0}}function x(e,t){try{e?.setItem(d,t)}catch{}}var S=t(),C=(0,a.createContext)({data:null,isLoading:!0,isApiAvailable:!0,needsOnboarding:!1,panelState:`ok`,dismissPanelState:()=>{},refetch:async()=>{}});function w(){return(0,a.useContext)(C)}function T(e,t){return e||!!t?.needs_onboarding}var E=2,D=1e3,O=3e4,k=5e3,A=`boneio-stale-bypass`,j=`1.6.0.dev29`;function M(e){try{return window.sessionStorage.getItem(e)}catch{return null}}function N({children:e}){let[t,n]=(0,a.useState)(null),[o,s]=(0,a.useState)(!0),[c,u]=(0,a.useState)(!0),[d,f]=(0,a.useState)(!1),[p,b]=(0,a.useState)(`ok`),x=(0,a.useCallback)((e,t)=>{let n=window.__BONEIO_BASE_PATH__,r=Date.now(),i=m(window.localStorage,n,r);if(i){let t=_(i,e,r);t!==i&&h(window.localStorage,n,t),i=t}i&&e&&v(i,t)&&(g(window.localStorage,n),i=null);let a=y({reachable:e,serverVersion:t,panelVersion:j,mark:i});a===`stale_panel`&&t&&M(A)===t&&(a=`ok`),b(a)},[]),w=(0,a.useCallback)(()=>{g(window.localStorage,window.__BONEIO_BASE_PATH__);let e=t?.version;if(p===`stale_panel`&&e)try{window.sessionStorage.setItem(A,e)}catch{}b(`ok`)},[t?.version,p]),N=(0,a.useCallback)(async()=>{for(let e=0;e<=E;e++)try{let{data:e}=await r.get(`/api/init`);n(t=>t&&JSON.stringify(t)===JSON.stringify(e)?t:e),f(t=>T(t,e)),l(window.localStorage,window.__BONEIO_BASE_PATH__,!!e?.needs_onboarding),x(!0,e?.version??null),u(!0),s(!1),i();return}catch{e<E&&await new Promise(e=>setTimeout(e,D))}x(!1,null),u(!1),s(!1)},[x]);(0,a.useEffect)(()=>{N()},[N]);let P=!c||p===`stale_panel`;return(0,a.useEffect)(()=>{let e=setInterval(N,P?k:O);return()=>clearInterval(e)},[N,P]),(0,a.useEffect)(()=>{let e=()=>{document.visibilityState===`visible`&&N()};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[N]),(0,S.jsx)(C.Provider,{value:{data:t,isLoading:o,isApiAvailable:c,needsOnboarding:d,panelState:p,dismissPanelState:w,refetch:N},children:e})}export{p as a,v as c,g as i,h as l,w as n,x as o,b as r,m as s,N as t,c as u};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Kt as t,N as n,R as r,U as i,an as a,cn as o,on as s,vn as c,yn as l}from"./fa-ChDOCx3T.js";import{a as u,i as d,n as f,o as p,t as m}from"./dialog-DMaCttcv.js";import{n as h}from"./axios-DyqbZVcF.js";import{L as g,N as _,T as v,m as y,y as b}from"./index-CxoiGDl4.js";var x=e(l(),1),S=c();function C(){let{t:e}=g(),c=(0,x.useRef)(null),[l,C]=(0,x.useState)(!1),[w,T]=(0,x.useState)(!1),[E,D]=(0,x.useState)(null),[O,k]=(0,x.useState)(null),[A,j]=(0,x.useState)([]),[M,N]=(0,x.useState)(!1),[P,F]=(0,x.useState)(null),I=(0,x.useCallback)(async()=>{try{let{data:e}=await h.get(`/api/config/backups`);j(e.backups||[])}catch(e){console.error(`Error fetching available backups:`,e)}},[]);(0,x.useEffect)(()=>{I()},[I]);let L=async()=>{C(!0),k(null);try{let{data:e}=await h.post(`/api/config/create_backup`);e.status===`success`?(await I(),alert(e.message)):k(e.message)}catch(t){k(e(`backup.error`)),console.error(`Error creating backup:`,t)}finally{C(!1)}},R=async(t,n)=>{try{let e=(await h.get(`/api/config/download_backup?backup_path=${encodeURIComponent(t)}`,{responseType:`blob`})).data,r=window.URL.createObjectURL(e),i=document.createElement(`a`);i.href=r,i.download=n,document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(r),document.body.removeChild(i)}catch(t){k(e(`backup.error`)),console.error(`Error downloading backup:`,t)}},z=async(t,n)=>{if(confirm(`${e(`device_management.confirm_delete_backup`)||`Delete backup`} ${n}?`))try{let{data:e}=await h.delete(`/api/config/delete_backup`,{data:{backup_path:t}});e.status===`success`?(await I(),alert(e.message)):k(e.message)}catch(t){k(e(`backup.error`)),console.error(`Error deleting backup:`,t)}},B=async t=>{t.status===`success`?(D(t),confirm(e(`device_management.restore_success_restart`))&&(await h.post(`/api/restart`),setTimeout(()=>window.location.reload(),3e3))):k(t.message||e(`device_management.restore_failed`))},V=async(t,n)=>{T(!0);try{let{data:e}=await h.post(`/api/config/restore_backup`,{backup_path:t,override_serial:n},{timeout:3e4});await B(e)}catch(t){k(e(`device_management.restore_failed`)),console.error(`Error restoring config:`,t)}finally{T(!1)}},H=async t=>{T(!0),k(null),D(null);try{let{data:n}=await h.post(`/api/config/inspect_backup_path`,{backup_path:t});n.serial_mismatch?F({backupMeta:n.backup_meta,currentSerial:n.current_serial,onConfirm:e=>{F(null),V(t,e)},onCancel:()=>{F(null),T(!1)}}):confirm(e(`device_management.confirm_restore`))?await V(t,!1):T(!1)}catch(t){k(e(`device_management.restore_failed`)),console.error(`Error inspecting backup path:`,t),T(!1)}},U=async()=>{C(!0),k(null);try{let e=await h.get(`/api/config/download`,{responseType:`blob`}),t=e.headers[`content-disposition`],n=`boneio_config.tar.gz`;if(t){let e=t.match(/filename=(.+)/);e&&(n=e[1])}let r=e.data,i=window.URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=n,document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(i),document.body.removeChild(a)}catch(t){k(e(`backup.error`)),console.error(`Error downloading config:`,t)}finally{C(!1)}},W=async(t,n)=>{T(!0);try{let e=new FormData;e.append(`file`,t),e.append(`override_serial`,n?`true`:`false`);let{data:r}=await h.post(`/api/config/restore`,e,{headers:{"Content-Type":`multipart/form-data`},timeout:3e4});await B(r)}catch(t){k(e(`device_management.restore_failed`)),console.error(`Error restoring config:`,t)}finally{T(!1)}};return(0,S.jsxs)(v,{width:`wide`,children:[O&&(0,S.jsx)(_,{variant:`error`,message:O,action:(0,S.jsx)(`button`,{className:`btn btn-ghost btn-xs btn-circle`,onClick:()=>k(null),children:`×`})}),(0,S.jsx)(b,{icon:(0,S.jsx)(n,{}),title:e(`device_management.configuration_backup`),description:e(`device_management.backup_description`),footer:(0,S.jsxs)(y,{children:[(0,S.jsx)(`button`,{className:`btn btn-primary btn-sm gap-2`,onClick:U,disabled:l||w,children:l?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(t,{className:`animate-spin`}),e(`device_management.preparing`)]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(n,{}),e(`device_management.download_config`)]})}),(0,S.jsx)(`button`,{className:`btn btn-outline btn-sm gap-2`,onClick:()=>c.current?.click(),disabled:l||w,children:w?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(t,{className:`animate-spin`}),e(`device_management.restoring`)]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(o,{}),e(`device_management.restore_config`)]})})]}),children:(0,S.jsxs)(`div`,{className:`space-y-3`,children:[(0,S.jsx)(`input`,{ref:c,type:`file`,accept:`.tar.gz,.tgz`,onChange:async t=>{let n=t.target.files?.[0];if(n){T(!0),k(null),D(null);try{let t=new FormData;t.append(`file`,n);let{data:r}=await h.post(`/api/config/inspect_backup_file`,t,{headers:{"Content-Type":`multipart/form-data`}});r.serial_mismatch?F({backupMeta:r.backup_meta,currentSerial:r.current_serial,onConfirm:e=>{F(null),W(n,e)},onCancel:()=>{F(null),T(!1)}}):confirm(e(`device_management.confirm_restore`))?await W(n,!1):T(!1)}catch(t){k(e(`device_management.restore_failed`)),console.error(`Error inspecting backup file:`,t),T(!1)}}c.current&&(c.current.value=``)},style:{display:`none`}}),(0,S.jsx)(_,{variant:`info`,message:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`span`,{className:`block`,children:e(`device_management.backup_info_1`)}),(0,S.jsx)(`span`,{className:`block`,children:e(`device_management.backup_info_2`)}),(0,S.jsx)(`span`,{className:`block font-semibold mt-1`,children:e(`device_management.restore_info`)})]})}),E&&(0,S.jsx)(_,{variant:E.validation_status===`success`?`success`:`warning`,message:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`span`,{className:`block`,children:E.message}),(0,S.jsxs)(`span`,{className:`block text-xs opacity-70 mt-1 break-all`,children:[e(`device_management.backup_created`),`: `,E.backup_path]}),E.validation_status===`warning`&&(0,S.jsx)(`span`,{className:`block text-xs mt-1`,children:E.validation_message})]})})]})}),(0,S.jsx)(b,{icon:(0,S.jsx)(i,{}),title:e(`device_management.config_backups`),collapsible:A.length>0,open:M,onOpenChange:e=>{N(e),e&&I()},summary:A.length,action:(0,S.jsx)(`button`,{className:`btn btn-primary btn-sm gap-2`,onClick:L,disabled:l||w,children:l?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(t,{className:`animate-spin`}),e(`device_management.preparing`)]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(i,{}),e(`device_management.create_backup`)||`Create Backup`]})}),children:(0,S.jsxs)(`div`,{className:`space-y-3`,children:[(0,S.jsx)(_,{variant:`neutral`,message:e(`device_management.backup_limit_info`)||`Maximum 10 backups are kept. Oldest backups are automatically removed when creating new ones.`}),M&&A.length>0&&(0,S.jsx)(`div`,{className:`stg-inset overflow-x-auto`,children:(0,S.jsxs)(`table`,{className:`table table-sm`,children:[(0,S.jsx)(`thead`,{children:(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`th`,{children:e(`device_management.version`)}),(0,S.jsx)(`th`,{children:e(`device_management.date`)}),(0,S.jsx)(`th`,{children:e(`device_management.files`)}),(0,S.jsx)(`th`,{className:`text-right`,children:e(`device_management.actions`)})]})}),(0,S.jsx)(`tbody`,{children:A.map(t=>(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`td`,{className:`font-mono`,children:t.version}),(0,S.jsx)(`td`,{className:`text-xs font-mono`,children:t.timestamp}),(0,S.jsxs)(`td`,{children:[t.file_count,` `,e(`device_management.yaml_files`)]}),(0,S.jsx)(`td`,{children:(0,S.jsxs)(`div`,{className:`flex gap-1 justify-end`,children:[(0,S.jsxs)(`button`,{className:`btn btn-warning btn-xs gap-1.5`,onClick:()=>H(t.path),disabled:w,title:e(`device_management.restore`),children:[(0,S.jsx)(s,{}),e(`device_management.restore`)]}),(0,S.jsx)(`button`,{className:`btn btn-ghost btn-xs btn-square`,onClick:()=>R(t.path,t.filename),title:e(`device_management.download_config`),children:(0,S.jsx)(n,{})}),(0,S.jsx)(`button`,{className:`btn btn-ghost btn-xs btn-square text-error`,onClick:()=>z(t.path,t.filename),title:e(`device_management.delete`)||`Delete`,children:(0,S.jsx)(a,{})})]})})]},t.path))})]})})]})}),P&&(0,S.jsx)(m,{open:!0,onOpenChange:e=>{e||P.onCancel()},children:(0,S.jsxs)(f,{className:`max-w-md`,children:[(0,S.jsx)(u,{children:(0,S.jsxs)(p,{className:`flex items-center gap-2 text-warning`,children:[(0,S.jsx)(r,{}),e(`device_management.serial_mismatch_title`)||`Serial Number Mismatch`]})}),(0,S.jsxs)(`div`,{className:`py-4 text-sm space-y-4`,children:[(0,S.jsx)(`p`,{children:e(`device_management.serial_mismatch_desc`)||`The uploaded configuration backup was created on a device with a different serial number:`}),(0,S.jsxs)(`div`,{className:`bg-base-300 p-3 rounded-lg font-mono text-xs space-y-1`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`span`,{className:`opacity-60`,children:[e(`device_management.backup_serial`)||`Backup Serial`,`:`]}),` `,(0,S.jsx)(`span`,{className:`text-warning font-semibold`,children:P.backupMeta?.effective_serial||`Unknown`})]}),P.backupMeta?.hostname&&(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`span`,{className:`opacity-60`,children:[e(`device_management.backup_hostname`)||`Backup Hostname`,`:`]}),` `,(0,S.jsx)(`span`,{children:P.backupMeta.hostname})]}),P.backupMeta?.created_at&&(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`span`,{className:`opacity-60`,children:[e(`device_management.backup_created_at`)||`Created At`,`:`]}),` `,(0,S.jsx)(`span`,{children:new Date(P.backupMeta.created_at).toLocaleString()})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`span`,{className:`opacity-60`,children:[e(`device_management.current_serial`)||`Current Serial`,`:`]}),` `,(0,S.jsx)(`span`,{className:`text-info font-semibold`,children:P.currentSerial})]})]}),(0,S.jsxs)(`div`,{className:`alert alert-warning text-xs`,children:[(0,S.jsx)(r,{className:`shrink-0`}),(0,S.jsx)(`span`,{children:e(`device_management.serial_override_warning`)||`WARNING: If both controllers are running at the same time on the same MQTT broker with the same serial number, conflicts will occur!`})]})]}),(0,S.jsxs)(d,{className:`flex flex-col sm:flex-row gap-2`,children:[(0,S.jsx)(`button`,{className:`btn btn-warning btn-sm`,onClick:()=>P.onConfirm(!0),children:e(`device_management.keep_old_serial`)||`Keep Old Serial`}),(0,S.jsx)(`button`,{className:`btn btn-outline btn-sm`,onClick:()=>P.onConfirm(!1),children:e(`device_management.use_new_serial`)||`Use New Serial`}),(0,S.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:P.onCancel,children:e(`common.cancel`)||`Cancel`})]})]})})]})}export{C as default};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Kt as t,N as n,R as r,U as i,an as a,cn as o,on as s,vn as c,yn as l}from"./fa-ChDOCx3T.js";import{a as u,i as d,n as f,o as p,t as m}from"./dialog-DMaCttcv.js";import{n as h}from"./axios-DyqbZVcF.js";import{N as g,R as _,T as v,m as y,y as b}from"./index-DULLFI0R.js";var x=e(l(),1),S=c();function C(){let{t:e}=_(),c=(0,x.useRef)(null),[l,C]=(0,x.useState)(!1),[w,T]=(0,x.useState)(!1),[E,D]=(0,x.useState)(null),[O,k]=(0,x.useState)(null),[A,j]=(0,x.useState)([]),[M,N]=(0,x.useState)(!1),[P,F]=(0,x.useState)(null),I=(0,x.useCallback)(async()=>{try{let{data:e}=await h.get(`/api/config/backups`);j(e.backups||[])}catch(e){console.error(`Error fetching available backups:`,e)}},[]);(0,x.useEffect)(()=>{I()},[I]);let L=async()=>{C(!0),k(null);try{let{data:e}=await h.post(`/api/config/create_backup`);e.status===`success`?(await I(),alert(e.message)):k(e.message)}catch(t){k(e(`backup.error`)),console.error(`Error creating backup:`,t)}finally{C(!1)}},R=async(t,n)=>{try{let e=(await h.get(`/api/config/download_backup?backup_path=${encodeURIComponent(t)}`,{responseType:`blob`})).data,r=window.URL.createObjectURL(e),i=document.createElement(`a`);i.href=r,i.download=n,document.body.appendChild(i),i.click(),window.URL.revokeObjectURL(r),document.body.removeChild(i)}catch(t){k(e(`backup.error`)),console.error(`Error downloading backup:`,t)}},z=async(t,n)=>{if(confirm(`${e(`device_management.confirm_delete_backup`)||`Delete backup`} ${n}?`))try{let{data:e}=await h.delete(`/api/config/delete_backup`,{data:{backup_path:t}});e.status===`success`?(await I(),alert(e.message)):k(e.message)}catch(t){k(e(`backup.error`)),console.error(`Error deleting backup:`,t)}},B=async t=>{t.status===`success`?(D(t),confirm(e(`device_management.restore_success_restart`))&&(await h.post(`/api/restart`),setTimeout(()=>window.location.reload(),3e3))):k(t.message||e(`device_management.restore_failed`))},V=async(t,n)=>{T(!0);try{let{data:e}=await h.post(`/api/config/restore_backup`,{backup_path:t,override_serial:n},{timeout:3e4});await B(e)}catch(t){k(e(`device_management.restore_failed`)),console.error(`Error restoring config:`,t)}finally{T(!1)}},H=async t=>{T(!0),k(null),D(null);try{let{data:n}=await h.post(`/api/config/inspect_backup_path`,{backup_path:t});n.serial_mismatch?F({backupMeta:n.backup_meta,currentSerial:n.current_serial,onConfirm:e=>{F(null),V(t,e)},onCancel:()=>{F(null),T(!1)}}):confirm(e(`device_management.confirm_restore`))?await V(t,!1):T(!1)}catch(t){k(e(`device_management.restore_failed`)),console.error(`Error inspecting backup path:`,t),T(!1)}},U=async()=>{C(!0),k(null);try{let e=await h.get(`/api/config/download`,{responseType:`blob`}),t=e.headers[`content-disposition`],n=`boneio_config.tar.gz`;if(t){let e=t.match(/filename=(.+)/);e&&(n=e[1])}let r=e.data,i=window.URL.createObjectURL(r),a=document.createElement(`a`);a.href=i,a.download=n,document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(i),document.body.removeChild(a)}catch(t){k(e(`backup.error`)),console.error(`Error downloading config:`,t)}finally{C(!1)}},W=async(t,n)=>{T(!0);try{let e=new FormData;e.append(`file`,t),e.append(`override_serial`,n?`true`:`false`);let{data:r}=await h.post(`/api/config/restore`,e,{headers:{"Content-Type":`multipart/form-data`},timeout:3e4});await B(r)}catch(t){k(e(`device_management.restore_failed`)),console.error(`Error restoring config:`,t)}finally{T(!1)}};return(0,S.jsxs)(v,{width:`wide`,children:[O&&(0,S.jsx)(g,{variant:`error`,message:O,action:(0,S.jsx)(`button`,{className:`btn btn-ghost btn-xs btn-circle`,onClick:()=>k(null),children:`×`})}),(0,S.jsx)(b,{icon:(0,S.jsx)(n,{}),title:e(`device_management.configuration_backup`),description:e(`device_management.backup_description`),footer:(0,S.jsxs)(y,{children:[(0,S.jsx)(`button`,{className:`btn btn-primary btn-sm gap-2`,onClick:U,disabled:l||w,children:l?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(t,{className:`animate-spin`}),e(`device_management.preparing`)]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(n,{}),e(`device_management.download_config`)]})}),(0,S.jsx)(`button`,{className:`btn btn-outline btn-sm gap-2`,onClick:()=>c.current?.click(),disabled:l||w,children:w?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(t,{className:`animate-spin`}),e(`device_management.restoring`)]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(o,{}),e(`device_management.restore_config`)]})})]}),children:(0,S.jsxs)(`div`,{className:`space-y-3`,children:[(0,S.jsx)(`input`,{ref:c,type:`file`,accept:`.tar.gz,.tgz`,onChange:async t=>{let n=t.target.files?.[0];if(n){T(!0),k(null),D(null);try{let t=new FormData;t.append(`file`,n);let{data:r}=await h.post(`/api/config/inspect_backup_file`,t,{headers:{"Content-Type":`multipart/form-data`}});r.serial_mismatch?F({backupMeta:r.backup_meta,currentSerial:r.current_serial,onConfirm:e=>{F(null),W(n,e)},onCancel:()=>{F(null),T(!1)}}):confirm(e(`device_management.confirm_restore`))?await W(n,!1):T(!1)}catch(t){k(e(`device_management.restore_failed`)),console.error(`Error inspecting backup file:`,t),T(!1)}}c.current&&(c.current.value=``)},style:{display:`none`}}),(0,S.jsx)(g,{variant:`info`,message:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`span`,{className:`block`,children:e(`device_management.backup_info_1`)}),(0,S.jsx)(`span`,{className:`block`,children:e(`device_management.backup_info_2`)}),(0,S.jsx)(`span`,{className:`block font-semibold mt-1`,children:e(`device_management.restore_info`)})]})}),E&&(0,S.jsx)(g,{variant:E.validation_status===`success`?`success`:`warning`,message:(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(`span`,{className:`block`,children:E.message}),(0,S.jsxs)(`span`,{className:`block text-xs opacity-70 mt-1 break-all`,children:[e(`device_management.backup_created`),`: `,E.backup_path]}),E.validation_status===`warning`&&(0,S.jsx)(`span`,{className:`block text-xs mt-1`,children:E.validation_message})]})})]})}),(0,S.jsx)(b,{icon:(0,S.jsx)(i,{}),title:e(`device_management.config_backups`),collapsible:A.length>0,open:M,onOpenChange:e=>{N(e),e&&I()},summary:A.length,action:(0,S.jsx)(`button`,{className:`btn btn-primary btn-sm gap-2`,onClick:L,disabled:l||w,children:l?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(t,{className:`animate-spin`}),e(`device_management.preparing`)]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(i,{}),e(`device_management.create_backup`)||`Create Backup`]})}),children:(0,S.jsxs)(`div`,{className:`space-y-3`,children:[(0,S.jsx)(g,{variant:`neutral`,message:e(`device_management.backup_limit_info`)||`Maximum 10 backups are kept. Oldest backups are automatically removed when creating new ones.`}),M&&A.length>0&&(0,S.jsx)(`div`,{className:`stg-inset overflow-x-auto`,children:(0,S.jsxs)(`table`,{className:`table table-sm`,children:[(0,S.jsx)(`thead`,{children:(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`th`,{children:e(`device_management.version`)}),(0,S.jsx)(`th`,{children:e(`device_management.date`)}),(0,S.jsx)(`th`,{children:e(`device_management.files`)}),(0,S.jsx)(`th`,{className:`text-right`,children:e(`device_management.actions`)})]})}),(0,S.jsx)(`tbody`,{children:A.map(t=>(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`td`,{className:`font-mono`,children:t.version}),(0,S.jsx)(`td`,{className:`text-xs font-mono`,children:t.timestamp}),(0,S.jsxs)(`td`,{children:[t.file_count,` `,e(`device_management.yaml_files`)]}),(0,S.jsx)(`td`,{children:(0,S.jsxs)(`div`,{className:`flex gap-1 justify-end`,children:[(0,S.jsxs)(`button`,{className:`btn btn-warning btn-xs gap-1.5`,onClick:()=>H(t.path),disabled:w,title:e(`device_management.restore`),children:[(0,S.jsx)(s,{}),e(`device_management.restore`)]}),(0,S.jsx)(`button`,{className:`btn btn-ghost btn-xs btn-square`,onClick:()=>R(t.path,t.filename),title:e(`device_management.download_config`),children:(0,S.jsx)(n,{})}),(0,S.jsx)(`button`,{className:`btn btn-ghost btn-xs btn-square text-error`,onClick:()=>z(t.path,t.filename),title:e(`device_management.delete`)||`Delete`,children:(0,S.jsx)(a,{})})]})})]},t.path))})]})})]})}),P&&(0,S.jsx)(m,{open:!0,onOpenChange:e=>{e||P.onCancel()},children:(0,S.jsxs)(f,{className:`max-w-md`,children:[(0,S.jsx)(u,{children:(0,S.jsxs)(p,{className:`flex items-center gap-2 text-warning`,children:[(0,S.jsx)(r,{}),e(`device_management.serial_mismatch_title`)||`Serial Number Mismatch`]})}),(0,S.jsxs)(`div`,{className:`py-4 text-sm space-y-4`,children:[(0,S.jsx)(`p`,{children:e(`device_management.serial_mismatch_desc`)||`The uploaded configuration backup was created on a device with a different serial number:`}),(0,S.jsxs)(`div`,{className:`bg-base-300 p-3 rounded-lg font-mono text-xs space-y-1`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`span`,{className:`opacity-60`,children:[e(`device_management.backup_serial`)||`Backup Serial`,`:`]}),` `,(0,S.jsx)(`span`,{className:`text-warning font-semibold`,children:P.backupMeta?.effective_serial||`Unknown`})]}),P.backupMeta?.hostname&&(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`span`,{className:`opacity-60`,children:[e(`device_management.backup_hostname`)||`Backup Hostname`,`:`]}),` `,(0,S.jsx)(`span`,{children:P.backupMeta.hostname})]}),P.backupMeta?.created_at&&(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`span`,{className:`opacity-60`,children:[e(`device_management.backup_created_at`)||`Created At`,`:`]}),` `,(0,S.jsx)(`span`,{children:new Date(P.backupMeta.created_at).toLocaleString()})]}),(0,S.jsxs)(`div`,{children:[(0,S.jsxs)(`span`,{className:`opacity-60`,children:[e(`device_management.current_serial`)||`Current Serial`,`:`]}),` `,(0,S.jsx)(`span`,{className:`text-info font-semibold`,children:P.currentSerial})]})]}),(0,S.jsxs)(`div`,{className:`alert alert-warning text-xs`,children:[(0,S.jsx)(r,{className:`shrink-0`}),(0,S.jsx)(`span`,{children:e(`device_management.serial_override_warning`)||`WARNING: If both controllers are running at the same time on the same MQTT broker with the same serial number, conflicts will occur!`})]})]}),(0,S.jsxs)(d,{className:`flex flex-col sm:flex-row gap-2`,children:[(0,S.jsx)(`button`,{className:`btn btn-warning btn-sm`,onClick:()=>P.onConfirm(!0),children:e(`device_management.keep_old_serial`)||`Keep Old Serial`}),(0,S.jsx)(`button`,{className:`btn btn-outline btn-sm`,onClick:()=>P.onConfirm(!1),children:e(`device_management.use_new_serial`)||`Use New Serial`}),(0,S.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:P.onCancel,children:e(`common.cancel`)||`Cancel`})]})]})})]})}export{C as default};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{H as t,K as n,M as r,R as i,St as a,V as o,ct as s,g as c,gn as l,h as u,in as d,nn as f,vn as p,y as m,yn as h}from"./fa-ChDOCx3T.js";import{i as g}from"./LoggerForm-BtyRB-wI.js";import{n as _}from"./utils-DOQQTBMN.js";import{L as v,T as y,y as b}from"./index-CxoiGDl4.js";import{r as x}from"./UISettings-Xu1AKFVe.js";var S=e(h(),1),C=p();function w({outputType:e,className:t}){switch(e){case`light`:return(0,C.jsx)(s,{className:_(`text-warning`,t)});case`switch`:return(0,C.jsx)(d,{className:_(`text-info`,t)});case`valve`:return(0,C.jsx)(g,{className:_(`text-accent`,t)});case`cover`:return(0,C.jsx)(r,{className:_(`text-secondary`,t)});case`shutter`:case`blind`:case`curtain`:return(0,C.jsx)(l,{className:_(`text-secondary`,t)});default:return null}}var T={single:`1×`,double:`2×`,triple:`3×`,long:`L`,pressed:`P`,released:`R`,double_then_long:`2×L`,single_then_long:`1×L`,double_then_single:`2×1`},E={TOGGLE:`short_toggle`,ON:`short_on`,OFF:`short_off`,OPEN:`short_open`,CLOSE:`short_close`,STOP:`short_stop`,SET_POSITION:`short_set_position`},D={event:{header:`bg-[color-mix(in_oklab,var(--color-primary)_13%,var(--color-base-100))] shadow-[inset_3px_0_0_var(--color-primary)]`,headerHover:`bg-[color-mix(in_oklab,var(--color-primary)_22%,var(--color-base-100))] shadow-[inset_3px_0_0_var(--color-primary)]`,card:`border-l-4 border-l-primary`,dot:`bg-primary`,labelKey:`sections.event`},binary_sensor:{header:`bg-[color-mix(in_oklab,var(--color-warning)_15%,var(--color-base-100))] shadow-[inset_3px_0_0_var(--color-warning)]`,headerHover:`bg-[color-mix(in_oklab,var(--color-warning)_25%,var(--color-base-100))] shadow-[inset_3px_0_0_var(--color-warning)]`,card:`border-l-4 border-l-warning`,dot:`bg-warning`,labelKey:`sections.binary_sensor`}},O=[{key:`single`,labelKey:`binding_matrix.legend_single`,icon:`1×`},{key:`double`,labelKey:`binding_matrix.legend_double`,icon:`2×`},{key:`triple`,labelKey:`binding_matrix.legend_triple`,icon:`3×`},{key:`long`,labelKey:`binding_matrix.legend_long`,icon:`L`},{key:`pressed`,labelKey:`binding_matrix.legend_pressed`,icon:`P`},{key:`released`,labelKey:`binding_matrix.legend_released`,icon:`R`}],k=[{labelKey:`actions.toggle`,shortKey:`actions.short_toggle`},{labelKey:`actions.on`,shortKey:`actions.short_on`},{labelKey:`actions.off`,shortKey:`actions.short_off`},{labelKey:`actions.open`,shortKey:`actions.short_open`},{labelKey:`actions.close`,shortKey:`actions.short_close`},{labelKey:`actions.stop`,shortKey:`actions.short_stop`}],A={single:`single`,double:`double`,triple:`triple`,long:`long`,pressed:`pressed`,released:`released`,double_then_long:`sequences`,single_then_long:`sequences`,double_then_single:`sequences`};function j(e,t){let n=T[e.clickType]||e.clickType,r=E[e.actionValue];return`${n} ${r?t(`actions.${r}`):e.actionValue}`}function M(e,t){let n=`actions.${e.actionValue.toLowerCase()}`,r=t(n),i=r===n?e.actionValue:r;return`${e.clickType} → ${i}`}function N(e){let t=e.action||`output`,n=``,r=``,i;switch(t){case`output`:n=e.boneio_output||``,r=e.action_output||`TOGGLE`;break;case`cover`:n=e.boneio_cover||``,r=e.action_cover||`TOGGLE`;break;case`remote_output`:i=e.boneio_id||``,n=i?`${i}/${e.output_id||``}`:e.output_id||``,r=e.action_output||`TOGGLE`;break;case`remote_cover`:i=e.boneio_id||``,n=i?`${i}/${e.cover_id||``}`:e.cover_id||``,r=e.action_cover||`TOGGLE`;break;default:n=``,r=e.action_output||e.action_cover||``}return{targetId:n,actionType:t,actionValue:r,remoteDevice:i}}function P(e){let t=[],n=[`single`,`double`,`triple`,`long`,`pressed`,`released`,`double_then_long`,`single_then_long`,`double_then_single`],r=e.local_inputs||[];for(let e=0;e<r.length;e++){let i=r[e],a=i.id||i.boneio_input||i.pin||`local_${e}`,o=[];for(let e of n){let t=i.actions?.[e]||[];for(let n of t){let{targetId:t,actionType:r,actionValue:i,remoteDevice:a}=N(n);t&&o.push({clickType:e,actionType:r,targetId:t,actionValue:i,remoteDevice:a})}}t.push({id:a,name:i.name||i.id||i.boneio_input||i.pin||a,area:i.area||void 0,type:`local`,inputKind:i._type===`binary_sensor`?`binary_sensor`:`event`,bindings:o})}let i=e.remote_inputs||[];for(let e=0;e<i.length;e++){let r=i[e],a=r.boneio_id||r.remote_device||``,o=r.id||r.entity_id||``,s=a?`${a}/${o}`:o||`remote_${e}`,c=[];for(let e of n){let t=r.actions?.[e]||[];for(let n of t){let{targetId:t,actionType:r,actionValue:i,remoteDevice:a}=N(n);t&&c.push({clickType:e,actionType:r,targetId:t,actionValue:i,remoteDevice:a})}}t.push({id:s,name:r.name||r.id||o,area:r.area||void 0,type:`remote`,inputKind:r._type===`binary_sensor`?`binary_sensor`:`event`,remoteDevice:a,bindings:c})}return t}function F(e){let t=[],n=e.output||[];for(let e=0;e<n.length;e++){let r=n[e];if(r.output_type===`cover`||r.output_type===`none`)continue;let i=r.id||`output_${e}`;t.push({id:i,name:r.name||r.id||i,area:r.area||void 0,type:`output`,outputType:r.output_type})}let r=e.cover||[];for(let e=0;e<r.length;e++){let n=r[e],i=n.id||`cover_${e}`;t.push({id:i,name:n.name||n.id||i,area:n.area||void 0,type:`cover`,outputType:n.device_class||`cover`})}let i=e.remote_outputs||[];for(let e=0;e<i.length;e++){let n=i[e],r=n.boneio_id||n.remote_device||``,a=n.id||n.output_id||``,o=r?`${r}/${a}`:a||`remote_out_${e}`,s=(n.output_type||``).toLowerCase()===`cover`;t.push({id:o,name:n.name||n.id||a,area:n.area||void 0,type:s?`cover`:`remote_output`,remoteDevice:r,outputType:n.output_type})}return t}function I({inputs:e,outputs:t,t:n}){let r=e.filter(e=>e.type===`local`),i=e.filter(e=>e.type===`remote`),a=t.filter(e=>e.type===`output`),o=t.filter(e=>e.type===`cover`),s=t.filter(e=>e.type===`remote_output`||e.type===`remote_cover`),c=r.filter(e=>e.bindings.length>0),l=i.filter(e=>e.bindings.length>0),u=new Set(e.flatMap(e=>e.bindings.map(e=>e.targetId))),d=a.filter(e=>u.has(e.id)),f=o.filter(e=>u.has(e.id)),p=s.filter(e=>u.has(e.id)),m=e.reduce((e,t)=>e+t.bindings.length,0);return(0,C.jsxs)(`div`,{className:`gap-3 grid grid-cols-1 md:grid-cols-4 mb-4`,children:[(0,C.jsxs)(`div`,{className:`stg-inset space-y-1 p-3`,children:[(0,C.jsx)(`h4`,{className:`font-semibold text-[11px] text-base-content/50 uppercase tracking-[0.08em]`,children:n(`binding_matrix.local`)}),(0,C.jsxs)(`p`,{className:`text-xs text-base-content/70`,children:[`📥 `,n(`binding_matrix.inputs`),`: `,r.length,(0,C.jsxs)(`span`,{className:`ml-1 text-success`,children:[`(`,c.length,` ✓)`]}),(0,C.jsxs)(`span`,{className:`ml-1 text-warning`,children:[`(`,r.length-c.length,` ○)`]})]}),(0,C.jsxs)(`p`,{className:`text-xs text-base-content/70`,children:[`💡 `,n(`binding_matrix.outputs`),`: `,a.length,(0,C.jsxs)(`span`,{className:`ml-1 text-success`,children:[`(`,d.length,` ✓)`]}),(0,C.jsxs)(`span`,{className:`ml-1 text-warning`,children:[`(`,a.length-d.length,` ○)`]})]}),(0,C.jsxs)(`p`,{className:`text-xs text-base-content/70`,children:[`🚪 `,n(`binding_matrix.covers`),`: `,o.length,(0,C.jsxs)(`span`,{className:`ml-1 text-success`,children:[`(`,f.length,` ✓)`]}),(0,C.jsxs)(`span`,{className:`ml-1 text-warning`,children:[`(`,o.length-f.length,` ○)`]})]})]}),(i.length>0||s.length>0)&&(0,C.jsxs)(`div`,{className:`space-y-1 rounded-xl border border-info/25 bg-info/8 p-3`,children:[(0,C.jsx)(`h4`,{className:`font-semibold text-[11px] text-info uppercase tracking-[0.08em]`,children:n(`binding_matrix.remote`)}),(0,C.jsxs)(`p`,{className:`text-xs text-base-content/70`,children:[`📥 `,n(`binding_matrix.inputs`),`: `,i.length,(0,C.jsxs)(`span`,{className:`ml-1 text-success`,children:[`(`,l.length,` ✓)`]}),(0,C.jsxs)(`span`,{className:`ml-1 text-warning`,children:[`(`,i.length-l.length,` ○)`]})]}),(0,C.jsxs)(`p`,{className:`text-xs text-base-content/70`,children:[`📡 `,n(`binding_matrix.outputs`),`: `,s.length,(0,C.jsxs)(`span`,{className:`ml-1 text-success`,children:[`(`,p.length,` ✓)`]}),(0,C.jsxs)(`span`,{className:`ml-1 text-warning`,children:[`(`,s.length-p.length,` ○)`]})]})]}),(0,C.jsxs)(`div`,{className:`flex flex-col justify-center rounded-xl border border-primary/25 bg-primary/8 p-3`,children:[(0,C.jsx)(`p`,{className:`font-extrabold text-primary text-2xl`,children:m}),(0,C.jsx)(`p`,{className:`font-medium text-primary/70 text-xs`,children:n(`binding_matrix.total_bindings`)})]}),(0,C.jsxs)(`div`,{className:`stg-inset p-3`,children:[(0,C.jsx)(`h4`,{className:`mb-1.5 font-semibold text-[11px] text-base-content/50 uppercase tracking-[0.08em]`,children:n(`binding_matrix.legend`)}),(0,C.jsx)(`div`,{className:`flex flex-wrap gap-x-3 gap-y-0.5`,children:O.map(e=>(0,C.jsxs)(`span`,{className:`text-xxs text-base-content/60 whitespace-nowrap`,children:[(0,C.jsx)(`span`,{className:`font-mono font-bold text-base-content/80`,children:e.icon}),` `,n(e.labelKey)]},e.key))}),(0,C.jsx)(`div`,{className:`flex flex-wrap gap-x-3 gap-y-0.5 mt-1.5 pt-1.5 border-base-content/10 border-t`,children:k.map(e=>(0,C.jsxs)(`span`,{className:`text-xxs text-base-content/60 whitespace-nowrap`,children:[(0,C.jsx)(`span`,{className:`font-mono font-bold text-base-content/80`,children:n(e.shortKey)}),` `,n(e.labelKey)]},e.shortKey))}),(0,C.jsx)(`div`,{className:`flex flex-wrap gap-x-3 gap-y-0.5 mt-1.5 pt-1.5 border-base-content/10 border-t`,children:Object.values(D).map(e=>(0,C.jsxs)(`span`,{className:`flex items-center gap-1 text-xxs text-base-content/60 whitespace-nowrap`,children:[(0,C.jsx)(`span`,{className:_(`inline-block rounded-sm w-2.5 h-2.5`,e.dot)}),` `,n(e.labelKey)]},e.labelKey))})]})]})}function L(e){let t=e?.parentElement??null;for(;t&&t!==document.body;){let e=getComputedStyle(t).overflowY;if((e===`auto`||e===`scroll`)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null}function R({inputs:e,outputs:t,t:n}){let[r,a]=(0,S.useState)(!0),[o,s]=(0,S.useState)(!0),l=new Set(e.flatMap(e=>e.bindings.map(e=>e.targetId))),u=e.filter(e=>e.type===`local`&&e.bindings.length===0),d=t.filter(e=>e.type===`output`&&!l.has(e.id)),f=t.filter(e=>e.type===`cover`&&!l.has(e.id)),p=e.filter(e=>e.type===`remote`&&e.bindings.length===0),h=t.filter(e=>(e.type===`remote_output`||e.type===`remote_cover`)&&!l.has(e.id)),g=u.length>0||d.length>0||f.length>0,_=p.length>0||h.length>0;return!g&&!_?null:(0,C.jsxs)(`div`,{className:`space-y-3 mt-4`,children:[g&&(0,C.jsxs)(`div`,{className:`bg-warning/5 border border-warning/20 rounded-xl overflow-hidden`,children:[(0,C.jsxs)(`button`,{className:`flex justify-between items-center hover:bg-warning/10 p-3 w-full font-semibold text-warning text-sm transition-colors`,onClick:()=>a(!r),children:[(0,C.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,C.jsx)(i,{className:`w-3.5 h-3.5`}),n(`binding_matrix.unconfigured_local`)]}),r?(0,C.jsx)(m,{className:`w-3 h-3`}):(0,C.jsx)(c,{className:`w-3 h-3`})]}),r&&(0,C.jsxs)(`div`,{className:`space-y-2 p-3 pt-0`,children:[u.length>0&&(0,C.jsx)(z,{title:`📥 ${n(`binding_matrix.free_inputs`)} (${u.length})`,items:u.map(e=>({id:e.id,name:e.name,area:e.area}))}),d.length>0&&(0,C.jsx)(z,{title:`💡 ${n(`binding_matrix.free_outputs`)} (${d.length})`,items:d.map(e=>({id:e.id,name:e.name,area:e.area}))}),f.length>0&&(0,C.jsx)(z,{title:`🚪 ${n(`binding_matrix.free_covers`)} (${f.length})`,items:f.map(e=>({id:e.id,name:e.name,area:e.area}))})]})]}),_&&(0,C.jsxs)(`div`,{className:`bg-info/5 border border-info/20 rounded-xl overflow-hidden`,children:[(0,C.jsxs)(`button`,{className:`flex justify-between items-center hover:bg-info/10 p-3 w-full font-semibold text-info text-sm transition-colors`,onClick:()=>s(!o),children:[(0,C.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,C.jsx)(i,{className:`w-3.5 h-3.5`}),n(`binding_matrix.unconfigured_remote`)]}),o?(0,C.jsx)(m,{className:`w-3 h-3`}):(0,C.jsx)(c,{className:`w-3 h-3`})]}),o&&(0,C.jsxs)(`div`,{className:`space-y-2 p-3 pt-0`,children:[p.length>0&&(0,C.jsx)(z,{title:`📥 ${n(`binding_matrix.free_remote_inputs`)} (${p.length})`,items:p.map(e=>({id:e.id,name:e.name,area:e.area,badge:e.remoteDevice}))}),h.length>0&&(0,C.jsx)(z,{title:`📡 ${n(`binding_matrix.free_remote_outputs`)} (${h.length})`,items:h.map(e=>({id:e.id,name:e.name,area:e.area,badge:e.remoteDevice}))})]})]})]})}function z({title:e,items:t}){return(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`p`,{className:`mb-1 font-semibold text-xs text-base-content/60`,children:e}),(0,C.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:t.map(e=>(0,C.jsxs)(`span`,{className:`gap-1 font-mono text-xxs badge badge-sm badge-ghost`,title:e.id,children:[e.name,e.area&&(0,C.jsxs)(`span`,{className:`text-base-content/40`,children:[`(`,e.area,`)`]}),e.badge&&(0,C.jsxs)(`span`,{className:`text-info/60`,children:[`[`,e.badge,`]`]})]},e.id))})]})}function B({inputs:e,outputs:t,areaFilter:n,hideEmpty:r,t:i,onEditInput:o,onEditOutput:s}){let[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null),f=(0,S.useRef)(null),p=(0,S.useRef)(!1),m=(0,S.useRef)(!1),h=(0,S.useRef)(0),g=(0,S.useRef)(0),v=(0,S.useRef)(0),y=(0,S.useRef)(0),b=(0,S.useRef)(null),[x,T]=(0,S.useState)(null),E=(0,S.useRef)(null),k=(0,S.useCallback)((e,t,n)=>{n||(e.preventDefault(),T({x:e.clientX,y:e.clientY,row:t}))},[]),A=(0,S.useCallback)((e,t,n)=>{if(n)return;let r=`touches`in e?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY};E.current=setTimeout(()=>{T({...r,row:t}),E.current=null},500)},[]),N=(0,S.useCallback)(()=>{E.current&&=(clearTimeout(E.current),null)},[]);(0,S.useEffect)(()=>{if(!x)return;let e=null,t=requestAnimationFrame(()=>{let t=()=>T(null);window.addEventListener(`click`,t),window.addEventListener(`contextmenu`,t,{capture:!0}),window.addEventListener(`scroll`,t,!0),e=()=>{window.removeEventListener(`click`,t),window.removeEventListener(`contextmenu`,t,{capture:!0}),window.removeEventListener(`scroll`,t,!0)}});return()=>{cancelAnimationFrame(t),e?.()}},[x]);let P=(0,S.useMemo)(()=>{let e=new Map;for(let n of t)e.set(n.id,n.area);return e},[t]),F=(0,S.useMemo)(()=>{let t=e;return n.size>0&&(t=t.filter(e=>{let t=e.area||`__none__`;return n.has(t)?!0:e.bindings.some(e=>{let t=P.get(e.targetId)||`__none__`;return n.has(t)})})),r&&(t=t.filter(e=>e.bindings.length>0)),t},[e,n,r,P]),I=(0,S.useMemo)(()=>new Set(e.flatMap(e=>e.bindings.map(e=>e.targetId))),[e]),R=(0,S.useMemo)(()=>{let t=new Map;for(let n of e){let e=n.area||`__none__`;for(let r of n.bindings)t.has(r.targetId)||t.set(r.targetId,new Set),t.get(r.targetId).add(e)}return t},[e]),z=(0,S.useMemo)(()=>{let e=t;return n.size>0&&(e=e.filter(e=>{let t=e.area||`__none__`;if(n.has(t))return!0;let r=R.get(e.id);if(r){for(let e of r)if(n.has(e))return!0}return!1})),r&&(e=e.filter(e=>I.has(e.id))),e},[t,n,r,I,R]),B=(0,S.useMemo)(()=>{let e=new Map;for(let t of F){let n=new Map;for(let e of t.bindings){let t=n.get(e.targetId)||[];t.push(e),n.set(e.targetId,t)}e.set(t.id,n)}return e},[F]);return F.length===0||z.length===0?(0,C.jsx)(`div`,{className:`py-12 text-base-content/40 text-center`,children:(0,C.jsx)(`p`,{className:`text-sm`,children:i(`binding_matrix.no_data`)})}):(0,C.jsxs)(`div`,{ref:f,className:`border border-base-300 rounded-xl overflow-x-auto cursor-grab active:cursor-grabbing select-none`,onPointerDown:e=>{e.pointerType===`mouse`&&e.button===0&&(p.current=!0,m.current=!1,h.current=e.clientX,g.current=e.clientY,v.current=f.current?.scrollLeft||0,b.current=L(f.current),y.current=b.current?.scrollTop||0)},onPointerMove:e=>{if(!p.current||!f.current)return;let t=e.clientX-h.current,n=e.clientY-g.current;if(!m.current&&(Math.abs(t)>5||Math.abs(n)>5)){m.current=!0;try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}}m.current&&(f.current.scrollLeft=v.current-t,b.current&&(b.current.scrollTop=y.current-n))},onPointerUp:e=>{e.currentTarget.hasPointerCapture?.(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),p.current=!1,m.current=!1},onPointerCancel:()=>{p.current=!1,m.current=!1},onPointerLeave:()=>{m.current||(p.current=!1)},onClickCapture:e=>{m.current&&(e.stopPropagation(),e.preventDefault())},children:[(0,C.jsxs)(`table`,{className:`table table-xs w-auto`,children:[(0,C.jsx)(`thead`,{children:(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`th`,{className:`left-0 z-20 sticky bg-base-200 border-base-300 border-r min-w-30`}),z.map(e=>(0,C.jsxs)(`th`,{className:_(`group/col bg-base-200 px-2 py-2 border-base-300 border-r min-w-20 font-bold text-xxs text-center whitespace-nowrap cursor-pointer`,u===e.id&&`bg-primary/10`),onMouseEnter:()=>d(e.id),onMouseLeave:()=>d(null),onClick:()=>s(e),title:i(`binding_matrix.click_to_edit`),children:[(0,C.jsxs)(`div`,{className:`flex justify-center items-center gap-1`,children:[(0,C.jsx)(w,{outputType:e.outputType,className:`w-3 h-3 shrink-0`}),(0,C.jsx)(`span`,{className:`whitespace-nowrap`,children:e.name}),(0,C.jsx)(a,{className:`opacity-0 group-hover/col:opacity-40 w-2 h-2 transition-opacity shrink-0`})]}),e.area?(0,C.jsx)(`div`,{className:`font-normal text-xxs text-base-content/40 truncate`,children:e.area}):(0,C.jsx)(`div`,{className:`font-normal text-xxs text-base-content/20`,children:`—`}),e.remoteDevice&&(0,C.jsx)(`div`,{className:`font-normal text-info/50 text-xxs truncate`,children:e.remoteDevice})]},e.id))]})}),(0,C.jsx)(`tbody`,{children:F.map(e=>{let t=B.get(e.id);return(0,C.jsxs)(`tr`,{className:_(`hover:bg-base-200/50`,c===e.id&&`bg-base-200/40`),onMouseEnter:()=>l(e.id),onMouseLeave:()=>l(null),children:[(0,C.jsxs)(`td`,{className:_(`group/row left-0 z-10 sticky border-base-300 border-r font-medium text-xs cursor-pointer`,c===e.id?D[e.inputKind].headerHover:D[e.inputKind].header,e.bindings.length===0&&`text-base-content/30`),onClick:()=>o(e),title:`${i(D[e.inputKind].labelKey)}\n${i(`binding_matrix.click_to_edit`)}`,children:[(0,C.jsxs)(`div`,{className:`flex items-center gap-1 max-w-30 font-bold truncate`,title:e.id,children:[e.name,(0,C.jsx)(a,{className:`opacity-0 group-hover/row:opacity-40 w-2.5 h-2.5 transition-opacity shrink-0`})]}),e.area&&(0,C.jsx)(`div`,{className:`text-xxs text-base-content/40`,children:e.area}),e.remoteDevice&&(0,C.jsx)(`div`,{className:`text-info/50 text-xxs`,children:e.remoteDevice})]}),z.map(n=>{let r=t?.get(n.id)||[],a=c===e.id||u===n.id;return(0,C.jsx)(`td`,{className:_(`px-1 py-1 border-base-300 border-r text-xs text-center`,r.length>0?`bg-success/15 text-success font-medium`:`text-base-content/30`,a&&r.length>0&&`bg-success/25`,a&&r.length===0&&`bg-base-200/40`),onMouseEnter:()=>d(n.id),onMouseLeave:()=>{d(null),N()},onContextMenu:t=>k(t,e,r.length>0),onMouseDown:t=>{t.button===0&&A(t,e,r.length>0)},onMouseUp:N,onTouchStart:t=>A(t,e,r.length>0),onTouchEnd:N,onTouchMove:N,children:r.length>0&&(0,C.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:r.map((t,n)=>(0,C.jsx)(`button`,{className:`hover:bg-success/30 px-0.5 rounded text-left whitespace-nowrap transition-colors cursor-pointer`,onClick:()=>o(e,t.clickType),title:`${M(t,i)}\n${i(`binding_matrix.click_to_edit`)}`,children:j(t,i)},n))})},n.id)})]},e.id)})})]}),x&&(0,C.jsxs)(`div`,{className:`z-50 fixed bg-base-100 shadow-xl py-1 border border-base-300 rounded-lg min-w-45 animate-in duration-100 fade-in zoom-in-95`,style:{left:x.x,top:x.y},onClick:e=>e.stopPropagation(),children:[(0,C.jsx)(`div`,{className:`px-3 py-1.5 font-semibold text-xxs text-base-content/40 uppercase tracking-wider`,children:i(`binding_matrix.add_action`)}),O.filter(e=>x.row.inputKind===`binary_sensor`?e.key===`pressed`||e.key===`released`:e.key!==`pressed`&&e.key!==`released`).map(e=>(0,C.jsxs)(`button`,{className:`flex items-center gap-2 hover:bg-primary/10 px-3 py-1.5 w-full text-sm text-left transition-colors`,onClick:()=>{o(x.row,e.key),T(null)},children:[(0,C.jsx)(`span`,{className:`font-mono text-base-content/70`,children:e.icon}),i(`binding_matrix.legend_${e.key}`)]},e.key))]})]})}function ee({inputs:e,areaFilter:t,hideEmpty:n,t:r,onEditInput:i}){let[o,s]=(0,S.useState)(null),l=(0,S.useMemo)(()=>{let r=e;return t.size>0&&(r=r.filter(e=>{let n=e.area||`__none__`;return t.has(n)})),n&&(r=r.filter(e=>e.bindings.length>0)),r},[e,t,n]),d=(0,S.useCallback)(e=>{s(t=>t===e?null:e)},[]);return l.length===0?(0,C.jsx)(`div`,{className:`py-12 text-base-content/40 text-center`,children:(0,C.jsx)(`p`,{className:`text-sm`,children:r(`binding_matrix.no_data`)})}):(0,C.jsx)(`div`,{className:`space-y-1.5`,children:l.map(e=>{let t=o===e.id,n=e.bindings.length>0,s=new Map;for(let t of e.bindings){let e=s.get(t.targetId)||[];e.push(t),s.set(t.targetId,e)}return(0,C.jsxs)(`div`,{className:_(`border rounded-xl overflow-hidden transition-colors`,n?`border-success/20 bg-success/5`:`border-base-300 bg-base-200/30`,D[e.inputKind].card),children:[(0,C.jsxs)(`button`,{className:`flex justify-between items-center hover:bg-base-200/30 p-3 w-full text-sm transition-colors`,onClick:()=>n&&d(e.id),disabled:!n,children:[(0,C.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[n?(0,C.jsx)(u,{className:`w-3.5 h-3.5 text-success shrink-0`}):(0,C.jsx)(f,{className:`w-3.5 h-3.5 text-base-content/20 shrink-0`}),(0,C.jsxs)(`div`,{className:`min-w-0 text-left`,children:[(0,C.jsx)(`span`,{className:_(`block font-semibold truncate`,!n&&`text-base-content/30`),children:e.name}),e.area&&(0,C.jsx)(`span`,{className:`text-xxs text-base-content/40`,children:e.area})]})]}),(0,C.jsxs)(`div`,{className:`flex items-center gap-2`,children:[n&&(0,C.jsx)(`span`,{className:`font-bold badge badge-sm badge-success`,children:e.bindings.length}),e.type===`remote`&&(0,C.jsx)(`span`,{className:`font-mono badge badge-xs badge-info`,children:e.remoteDevice}),n&&(t?(0,C.jsx)(m,{className:`w-3 h-3 text-base-content/30`}):(0,C.jsx)(c,{className:`w-3 h-3 text-base-content/30`}))]})]}),t&&n&&(0,C.jsxs)(`div`,{className:`space-y-2 bg-base-100/50 p-3 border-base-300 border-t`,children:[[...s.entries()].map(([e,t])=>(0,C.jsxs)(`div`,{className:`flex items-start gap-2 text-xs`,children:[(0,C.jsx)(`span`,{className:`mt-0.5 font-mono font-bold text-base-content/70 shrink-0`,children:`→`}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`span`,{className:`font-semibold`,children:e}),(0,C.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-0.5`,children:t.map((e,t)=>(0,C.jsx)(`span`,{className:`gap-0.5 font-mono badge badge-xs badge-success`,children:j(e,r)},t))})]})]},e)),(0,C.jsxs)(`button`,{className:`gap-1 mt-1 btn-outline btn btn-xs btn-primary`,onClick:t=>{t.stopPropagation(),i(e)},children:[(0,C.jsx)(a,{className:`w-2.5 h-2.5`}),r(`binding_matrix.edit_input`)]})]})]},e.id)})})}var V=({formData:e,sections:r,onSaveSection:i,onUpdateFormData:a})=>{let{t:s}=v(),[l,u]=(0,S.useState)(new Set),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(!1),[_,w]=(0,S.useState)(null),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(-1),[k,j]=(0,S.useState)(`basic`),[M,N]=(0,S.useState)(!1),[L,z]=(0,S.useState)(!1),V=(0,S.useRef)(null),[te,H]=(0,S.useState)(!1),[U,W]=(0,S.useState)(null),[G,ne]=(0,S.useState)(``),[K,re]=(0,S.useState)(-1),[ie,q]=(0,S.useState)(!1),J=(0,S.useRef)(null),Y=(0,S.useCallback)((t,n)=>{let r=t.type===`remote`?`remote_inputs`:`local_inputs`,i=e[r]||[],a=i.findIndex((e,n)=>{if(t.type===`remote`){let r=e.boneio_id||e.remote_device||``,i=e.id||e.entity_id||``;return(r?`${r}/${i}`:i||`remote_${n}`)===t.id}return(e.id||e.boneio_input||e.pin||`local_${n}`)===t.id});a<0||(E(r),O(a),w(JSON.parse(JSON.stringify(i[a]))),V.current=JSON.stringify(i[a]),j(n&&A[n]||`basic`),N(!1),g(!0))},[e]),ae=(0,S.useCallback)(async()=>{if(M||D<0||!_)return;let t=[...e[T]||[]];t[D]=_,z(!0);try{a(T,t),await i(T,t),g(!1),w(null)}catch(e){console.error(`Failed to save input:`,e)}finally{z(!1)}},[_,D,T,e,M,i,a]),oe=(0,S.useCallback)(()=>{g(!1),w(null)},[]),X=(0,S.useMemo)(()=>P(e),[e]),Z=(0,S.useMemo)(()=>F(e),[e]),se=(0,S.useMemo)(()=>{let e=new Set;return X.forEach(t=>{t.area&&e.add(t.area)}),Z.forEach(t=>{t.area&&e.add(t.area)}),[...e].sort()},[X,Z]),ce=(0,S.useMemo)(()=>X.some(e=>!e.area)||Z.some(e=>!e.area),[X,Z]),Q=(0,S.useMemo)(()=>e.output||[],[e.output]),$=(0,S.useMemo)(()=>e.cover||[],[e.cover]),le=(0,S.useMemo)(()=>e.output_group||[],[e.output_group]),ue=(0,S.useMemo)(()=>e.remote_devices||[],[e.remote_devices]),de=(0,S.useMemo)(()=>e.remote_inputs||[],[e.remote_inputs]),fe=(0,S.useMemo)(()=>(e.local_inputs||[]).filter(e=>e._inputType===`binary_sensor`),[e.local_inputs]),pe=(0,S.useMemo)(()=>(e.local_inputs||[]).filter(e=>e._inputType!==`binary_sensor`),[e.local_inputs]),me=(0,S.useMemo)(()=>e.areas||[],[e.areas]),he=(0,S.useMemo)(()=>{let e=r.find(e=>e.name===`local_inputs`);return e?.schema||e?.normalizedSchema||{}},[r]),ge=(0,S.useMemo)(()=>{let e=r.find(e=>e.name===`output`);return e?.schema||e?.normalizedSchema||{}},[r]),_e=(0,S.useMemo)(()=>r.find(e=>e.name===`output`)?.uiSchema||{},[r]),ve=(0,S.useMemo)(()=>{let e=r.find(e=>e.name===`cover`);return e?.schema||e?.normalizedSchema||{}},[r]),ye=(0,S.useCallback)(t=>{let n={output:`output`,cover:`cover`,remote_output:`remote_outputs`,remote_cover:`remote_covers`}[t.type]||`output`,r=e[n]||[],i=r.findIndex((e,n)=>{if(t.type===`remote_output`||t.type===`remote_cover`){let r=e.boneio_id||e.remote_device||``,i=e.id||e.output_id||``;return(r?`${r}/${i}`:i||`remote_out_${n}`)===t.id}return(e.id||``)===t.id});i<0||(ne(n),re(i),W(JSON.parse(JSON.stringify(r[i]))),J.current=JSON.stringify(r[i]),H(!0))},[e]),be=(0,S.useCallback)(async()=>{if(K<0||!U)return;let t=[...e[G]||[]];t[K]=U,q(!0);try{a(G,t),await i(G,t),H(!1),W(null)}catch(e){console.error(`Failed to save output:`,e)}finally{q(!1)}},[U,K,G,e,i,a]),xe=(0,S.useCallback)(()=>{H(!1),W(null)},[]),Se=_&&V.current&&JSON.stringify(_)!==V.current,Ce=U&&J.current&&JSON.stringify(U)!==J.current;return(0,C.jsxs)(y,{width:`full`,children:[(0,C.jsxs)(b,{children:[(0,C.jsx)(I,{inputs:X,outputs:Z,t:s}),(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 mb-4`,children:[(0,C.jsxs)(`div`,{className:`relative flex items-center gap-2`,children:[(0,C.jsx)(n,{className:`w-3 h-3 text-base-content/40`}),(0,C.jsxs)(`button`,{className:`justify-between gap-1 btn-outline min-w-40 btn btn-sm`,onClick:()=>f(e=>!e),children:[(0,C.jsx)(`span`,{className:`text-xs truncate`,children:l.size===0?s(`binding_matrix.all_areas`):l.size===1?l.has(`__none__`)?s(`binding_matrix.no_area`):[...l][0]:s(`binding_matrix.areas_selected`,{count:l.size})}),(0,C.jsx)(c,{className:`w-2.5 h-2.5 shrink-0`})]}),d&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`div`,{className:`z-40 fixed inset-0`,onClick:()=>f(!1)}),(0,C.jsxs)(`div`,{className:`top-full left-0 z-50 absolute bg-base-100 shadow-xl mt-1 py-1 border border-base-300 rounded-lg min-w-50 max-h-75 overflow-y-auto`,children:[(0,C.jsxs)(`label`,{className:`flex items-center gap-2 hover:bg-base-200/60 px-3 py-1.5 transition-colors cursor-pointer`,children:[(0,C.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-xs checkbox-primary`,checked:l.size===0,onChange:()=>u(new Set)}),(0,C.jsx)(`span`,{className:`font-semibold text-xs`,children:s(`binding_matrix.all_areas`)})]}),(0,C.jsx)(`div`,{className:`my-0.5 border-base-300 border-t`}),ce&&(0,C.jsxs)(`label`,{className:`flex items-center gap-2 hover:bg-base-200/60 px-3 py-1.5 transition-colors cursor-pointer`,children:[(0,C.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-xs checkbox-primary`,checked:l.has(`__none__`),onChange:()=>{let e=new Set(l);e.has(`__none__`)?e.delete(`__none__`):e.add(`__none__`),u(e)}}),(0,C.jsx)(`span`,{className:`text-xs text-base-content/50 italic`,children:s(`binding_matrix.no_area`)})]}),se.map(e=>(0,C.jsxs)(`label`,{className:`flex items-center gap-2 hover:bg-base-200/60 px-3 py-1.5 transition-colors cursor-pointer`,children:[(0,C.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-xs checkbox-primary`,checked:l.has(e),onChange:()=>{let t=new Set(l);t.has(e)?t.delete(e):t.add(e),u(t)}}),(0,C.jsx)(`span`,{className:`text-xs`,children:e})]},e))]})]})]}),(0,C.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer`,children:[(0,C.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm checkbox-primary`,checked:p,onChange:e=>m(e.target.checked)}),(0,C.jsxs)(`span`,{className:`flex items-center gap-1 font-medium text-xs text-base-content/60`,children:[p?(0,C.jsx)(t,{className:`w-3 h-3`}):(0,C.jsx)(o,{className:`w-3 h-3`}),s(`binding_matrix.hide_empty`)]})]})]}),(0,C.jsx)(`div`,{className:`hidden md:block`,children:(0,C.jsx)(B,{inputs:X,outputs:Z,areaFilter:l,hideEmpty:p,t:s,onEditInput:Y,onEditOutput:ye})}),(0,C.jsx)(`div`,{className:`md:hidden`,children:(0,C.jsx)(ee,{inputs:X,areaFilter:l,hideEmpty:p,t:s,onEditInput:Y})}),(0,C.jsx)(R,{inputs:X,outputs:Z,t:s})]}),(0,C.jsx)(x,{open:h,onOpenChange:g,editingItem:_,editingIndex:D,sectionType:T,schema:T===`remote_inputs`?r.find(e=>e.name===`remote_inputs`)?.schema||r.find(e=>e.name===`remote_inputs`)?.normalizedSchema||{}:he,allBinarySensors:fe,allEvents:pe,allOutputs:Q,allOutputGroups:le,allCovers:$,allAreas:me,allRemoteDevices:ue,allRemoteInputs:de,savedOutputs:Q,savedOutputGroups:le,savedCovers:$,onChange:w,onSave:ae,onCancel:oe,onValidationChange:N,saveDisabled:M||!Se,isSaving:L,initialTab:k}),(0,C.jsx)(x,{open:te,onOpenChange:H,editingItem:U,editingIndex:K,sectionType:G,schema:G===`cover`?ve:ge,uiSchema:G===`cover`?void 0:_e,allOutputs:Q,allCovers:$,allAreas:me,onChange:W,onSave:be,onCancel:xe,saveDisabled:!Ce,isSaving:ie})]})};export{V as default};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{H as t,K as n,M as r,R as i,St as a,V as o,ct as s,g as c,gn as l,h as u,in as d,nn as f,vn as p,y as m,yn as h}from"./fa-ChDOCx3T.js";import{i as g}from"./LoggerForm-B4wgrOCg.js";import{n as _}from"./utils-DOQQTBMN.js";import{R as v,T as y,y as b}from"./index-DULLFI0R.js";import{r as x}from"./UISettings-D09Ovoxp.js";var S=e(h(),1),C=p();function w({outputType:e,className:t}){switch(e){case`light`:return(0,C.jsx)(s,{className:_(`text-warning`,t)});case`switch`:return(0,C.jsx)(d,{className:_(`text-info`,t)});case`valve`:return(0,C.jsx)(g,{className:_(`text-accent`,t)});case`cover`:return(0,C.jsx)(r,{className:_(`text-secondary`,t)});case`shutter`:case`blind`:case`curtain`:return(0,C.jsx)(l,{className:_(`text-secondary`,t)});default:return null}}var T={single:`1×`,double:`2×`,triple:`3×`,long:`L`,pressed:`P`,released:`R`,double_then_long:`2×L`,single_then_long:`1×L`,double_then_single:`2×1`},E={TOGGLE:`short_toggle`,ON:`short_on`,OFF:`short_off`,OPEN:`short_open`,CLOSE:`short_close`,STOP:`short_stop`,SET_POSITION:`short_set_position`},D={event:{header:`bg-[color-mix(in_oklab,var(--color-primary)_13%,var(--color-base-100))] shadow-[inset_3px_0_0_var(--color-primary)]`,headerHover:`bg-[color-mix(in_oklab,var(--color-primary)_22%,var(--color-base-100))] shadow-[inset_3px_0_0_var(--color-primary)]`,card:`border-l-4 border-l-primary`,dot:`bg-primary`,labelKey:`sections.event`},binary_sensor:{header:`bg-[color-mix(in_oklab,var(--color-warning)_15%,var(--color-base-100))] shadow-[inset_3px_0_0_var(--color-warning)]`,headerHover:`bg-[color-mix(in_oklab,var(--color-warning)_25%,var(--color-base-100))] shadow-[inset_3px_0_0_var(--color-warning)]`,card:`border-l-4 border-l-warning`,dot:`bg-warning`,labelKey:`sections.binary_sensor`}},O=[{key:`single`,labelKey:`binding_matrix.legend_single`,icon:`1×`},{key:`double`,labelKey:`binding_matrix.legend_double`,icon:`2×`},{key:`triple`,labelKey:`binding_matrix.legend_triple`,icon:`3×`},{key:`long`,labelKey:`binding_matrix.legend_long`,icon:`L`},{key:`pressed`,labelKey:`binding_matrix.legend_pressed`,icon:`P`},{key:`released`,labelKey:`binding_matrix.legend_released`,icon:`R`}],k=[{labelKey:`actions.toggle`,shortKey:`actions.short_toggle`},{labelKey:`actions.on`,shortKey:`actions.short_on`},{labelKey:`actions.off`,shortKey:`actions.short_off`},{labelKey:`actions.open`,shortKey:`actions.short_open`},{labelKey:`actions.close`,shortKey:`actions.short_close`},{labelKey:`actions.stop`,shortKey:`actions.short_stop`}],A={single:`single`,double:`double`,triple:`triple`,long:`long`,pressed:`pressed`,released:`released`,double_then_long:`sequences`,single_then_long:`sequences`,double_then_single:`sequences`};function j(e,t){let n=T[e.clickType]||e.clickType,r=E[e.actionValue];return`${n} ${r?t(`actions.${r}`):e.actionValue}`}function M(e,t){let n=`actions.${e.actionValue.toLowerCase()}`,r=t(n),i=r===n?e.actionValue:r;return`${e.clickType} → ${i}`}function N(e){let t=e.action||`output`,n=``,r=``,i;switch(t){case`output`:n=e.boneio_output||``,r=e.action_output||`TOGGLE`;break;case`cover`:n=e.boneio_cover||``,r=e.action_cover||`TOGGLE`;break;case`remote_output`:i=e.boneio_id||``,n=i?`${i}/${e.output_id||``}`:e.output_id||``,r=e.action_output||`TOGGLE`;break;case`remote_cover`:i=e.boneio_id||``,n=i?`${i}/${e.cover_id||``}`:e.cover_id||``,r=e.action_cover||`TOGGLE`;break;default:n=``,r=e.action_output||e.action_cover||``}return{targetId:n,actionType:t,actionValue:r,remoteDevice:i}}function P(e){let t=[],n=[`single`,`double`,`triple`,`long`,`pressed`,`released`,`double_then_long`,`single_then_long`,`double_then_single`],r=e.local_inputs||[];for(let e=0;e<r.length;e++){let i=r[e],a=i.id||i.boneio_input||i.pin||`local_${e}`,o=[];for(let e of n){let t=i.actions?.[e]||[];for(let n of t){let{targetId:t,actionType:r,actionValue:i,remoteDevice:a}=N(n);t&&o.push({clickType:e,actionType:r,targetId:t,actionValue:i,remoteDevice:a})}}t.push({id:a,name:i.name||i.id||i.boneio_input||i.pin||a,area:i.area||void 0,type:`local`,inputKind:i._type===`binary_sensor`?`binary_sensor`:`event`,bindings:o})}let i=e.remote_inputs||[];for(let e=0;e<i.length;e++){let r=i[e],a=r.boneio_id||r.remote_device||``,o=r.id||r.entity_id||``,s=a?`${a}/${o}`:o||`remote_${e}`,c=[];for(let e of n){let t=r.actions?.[e]||[];for(let n of t){let{targetId:t,actionType:r,actionValue:i,remoteDevice:a}=N(n);t&&c.push({clickType:e,actionType:r,targetId:t,actionValue:i,remoteDevice:a})}}t.push({id:s,name:r.name||r.id||o,area:r.area||void 0,type:`remote`,inputKind:r._type===`binary_sensor`?`binary_sensor`:`event`,remoteDevice:a,bindings:c})}return t}function F(e){let t=[],n=e.output||[];for(let e=0;e<n.length;e++){let r=n[e];if(r.output_type===`cover`||r.output_type===`none`)continue;let i=r.id||`output_${e}`;t.push({id:i,name:r.name||r.id||i,area:r.area||void 0,type:`output`,outputType:r.output_type})}let r=e.cover||[];for(let e=0;e<r.length;e++){let n=r[e],i=n.id||`cover_${e}`;t.push({id:i,name:n.name||n.id||i,area:n.area||void 0,type:`cover`,outputType:n.device_class||`cover`})}let i=e.remote_outputs||[];for(let e=0;e<i.length;e++){let n=i[e],r=n.boneio_id||n.remote_device||``,a=n.id||n.output_id||``,o=r?`${r}/${a}`:a||`remote_out_${e}`,s=(n.output_type||``).toLowerCase()===`cover`;t.push({id:o,name:n.name||n.id||a,area:n.area||void 0,type:s?`cover`:`remote_output`,remoteDevice:r,outputType:n.output_type})}return t}function I({inputs:e,outputs:t,t:n}){let r=e.filter(e=>e.type===`local`),i=e.filter(e=>e.type===`remote`),a=t.filter(e=>e.type===`output`),o=t.filter(e=>e.type===`cover`),s=t.filter(e=>e.type===`remote_output`||e.type===`remote_cover`),c=r.filter(e=>e.bindings.length>0),l=i.filter(e=>e.bindings.length>0),u=new Set(e.flatMap(e=>e.bindings.map(e=>e.targetId))),d=a.filter(e=>u.has(e.id)),f=o.filter(e=>u.has(e.id)),p=s.filter(e=>u.has(e.id)),m=e.reduce((e,t)=>e+t.bindings.length,0);return(0,C.jsxs)(`div`,{className:`gap-3 grid grid-cols-1 md:grid-cols-4 mb-4`,children:[(0,C.jsxs)(`div`,{className:`stg-inset space-y-1 p-3`,children:[(0,C.jsx)(`h4`,{className:`font-semibold text-[11px] text-base-content/50 uppercase tracking-[0.08em]`,children:n(`binding_matrix.local`)}),(0,C.jsxs)(`p`,{className:`text-xs text-base-content/70`,children:[`📥 `,n(`binding_matrix.inputs`),`: `,r.length,(0,C.jsxs)(`span`,{className:`ml-1 text-success`,children:[`(`,c.length,` ✓)`]}),(0,C.jsxs)(`span`,{className:`ml-1 text-warning`,children:[`(`,r.length-c.length,` ○)`]})]}),(0,C.jsxs)(`p`,{className:`text-xs text-base-content/70`,children:[`💡 `,n(`binding_matrix.outputs`),`: `,a.length,(0,C.jsxs)(`span`,{className:`ml-1 text-success`,children:[`(`,d.length,` ✓)`]}),(0,C.jsxs)(`span`,{className:`ml-1 text-warning`,children:[`(`,a.length-d.length,` ○)`]})]}),(0,C.jsxs)(`p`,{className:`text-xs text-base-content/70`,children:[`🚪 `,n(`binding_matrix.covers`),`: `,o.length,(0,C.jsxs)(`span`,{className:`ml-1 text-success`,children:[`(`,f.length,` ✓)`]}),(0,C.jsxs)(`span`,{className:`ml-1 text-warning`,children:[`(`,o.length-f.length,` ○)`]})]})]}),(i.length>0||s.length>0)&&(0,C.jsxs)(`div`,{className:`space-y-1 rounded-xl border border-info/25 bg-info/8 p-3`,children:[(0,C.jsx)(`h4`,{className:`font-semibold text-[11px] text-info uppercase tracking-[0.08em]`,children:n(`binding_matrix.remote`)}),(0,C.jsxs)(`p`,{className:`text-xs text-base-content/70`,children:[`📥 `,n(`binding_matrix.inputs`),`: `,i.length,(0,C.jsxs)(`span`,{className:`ml-1 text-success`,children:[`(`,l.length,` ✓)`]}),(0,C.jsxs)(`span`,{className:`ml-1 text-warning`,children:[`(`,i.length-l.length,` ○)`]})]}),(0,C.jsxs)(`p`,{className:`text-xs text-base-content/70`,children:[`📡 `,n(`binding_matrix.outputs`),`: `,s.length,(0,C.jsxs)(`span`,{className:`ml-1 text-success`,children:[`(`,p.length,` ✓)`]}),(0,C.jsxs)(`span`,{className:`ml-1 text-warning`,children:[`(`,s.length-p.length,` ○)`]})]})]}),(0,C.jsxs)(`div`,{className:`flex flex-col justify-center rounded-xl border border-primary/25 bg-primary/8 p-3`,children:[(0,C.jsx)(`p`,{className:`font-extrabold text-primary text-2xl`,children:m}),(0,C.jsx)(`p`,{className:`font-medium text-primary/70 text-xs`,children:n(`binding_matrix.total_bindings`)})]}),(0,C.jsxs)(`div`,{className:`stg-inset p-3`,children:[(0,C.jsx)(`h4`,{className:`mb-1.5 font-semibold text-[11px] text-base-content/50 uppercase tracking-[0.08em]`,children:n(`binding_matrix.legend`)}),(0,C.jsx)(`div`,{className:`flex flex-wrap gap-x-3 gap-y-0.5`,children:O.map(e=>(0,C.jsxs)(`span`,{className:`text-xxs text-base-content/60 whitespace-nowrap`,children:[(0,C.jsx)(`span`,{className:`font-mono font-bold text-base-content/80`,children:e.icon}),` `,n(e.labelKey)]},e.key))}),(0,C.jsx)(`div`,{className:`flex flex-wrap gap-x-3 gap-y-0.5 mt-1.5 pt-1.5 border-base-content/10 border-t`,children:k.map(e=>(0,C.jsxs)(`span`,{className:`text-xxs text-base-content/60 whitespace-nowrap`,children:[(0,C.jsx)(`span`,{className:`font-mono font-bold text-base-content/80`,children:n(e.shortKey)}),` `,n(e.labelKey)]},e.shortKey))}),(0,C.jsx)(`div`,{className:`flex flex-wrap gap-x-3 gap-y-0.5 mt-1.5 pt-1.5 border-base-content/10 border-t`,children:Object.values(D).map(e=>(0,C.jsxs)(`span`,{className:`flex items-center gap-1 text-xxs text-base-content/60 whitespace-nowrap`,children:[(0,C.jsx)(`span`,{className:_(`inline-block rounded-sm w-2.5 h-2.5`,e.dot)}),` `,n(e.labelKey)]},e.labelKey))})]})]})}function L(e){let t=e?.parentElement??null;for(;t&&t!==document.body;){let e=getComputedStyle(t).overflowY;if((e===`auto`||e===`scroll`)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null}function R({inputs:e,outputs:t,t:n}){let[r,a]=(0,S.useState)(!0),[o,s]=(0,S.useState)(!0),l=new Set(e.flatMap(e=>e.bindings.map(e=>e.targetId))),u=e.filter(e=>e.type===`local`&&e.bindings.length===0),d=t.filter(e=>e.type===`output`&&!l.has(e.id)),f=t.filter(e=>e.type===`cover`&&!l.has(e.id)),p=e.filter(e=>e.type===`remote`&&e.bindings.length===0),h=t.filter(e=>(e.type===`remote_output`||e.type===`remote_cover`)&&!l.has(e.id)),g=u.length>0||d.length>0||f.length>0,_=p.length>0||h.length>0;return!g&&!_?null:(0,C.jsxs)(`div`,{className:`space-y-3 mt-4`,children:[g&&(0,C.jsxs)(`div`,{className:`bg-warning/5 border border-warning/20 rounded-xl overflow-hidden`,children:[(0,C.jsxs)(`button`,{className:`flex justify-between items-center hover:bg-warning/10 p-3 w-full font-semibold text-warning text-sm transition-colors`,onClick:()=>a(!r),children:[(0,C.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,C.jsx)(i,{className:`w-3.5 h-3.5`}),n(`binding_matrix.unconfigured_local`)]}),r?(0,C.jsx)(m,{className:`w-3 h-3`}):(0,C.jsx)(c,{className:`w-3 h-3`})]}),r&&(0,C.jsxs)(`div`,{className:`space-y-2 p-3 pt-0`,children:[u.length>0&&(0,C.jsx)(z,{title:`📥 ${n(`binding_matrix.free_inputs`)} (${u.length})`,items:u.map(e=>({id:e.id,name:e.name,area:e.area}))}),d.length>0&&(0,C.jsx)(z,{title:`💡 ${n(`binding_matrix.free_outputs`)} (${d.length})`,items:d.map(e=>({id:e.id,name:e.name,area:e.area}))}),f.length>0&&(0,C.jsx)(z,{title:`🚪 ${n(`binding_matrix.free_covers`)} (${f.length})`,items:f.map(e=>({id:e.id,name:e.name,area:e.area}))})]})]}),_&&(0,C.jsxs)(`div`,{className:`bg-info/5 border border-info/20 rounded-xl overflow-hidden`,children:[(0,C.jsxs)(`button`,{className:`flex justify-between items-center hover:bg-info/10 p-3 w-full font-semibold text-info text-sm transition-colors`,onClick:()=>s(!o),children:[(0,C.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,C.jsx)(i,{className:`w-3.5 h-3.5`}),n(`binding_matrix.unconfigured_remote`)]}),o?(0,C.jsx)(m,{className:`w-3 h-3`}):(0,C.jsx)(c,{className:`w-3 h-3`})]}),o&&(0,C.jsxs)(`div`,{className:`space-y-2 p-3 pt-0`,children:[p.length>0&&(0,C.jsx)(z,{title:`📥 ${n(`binding_matrix.free_remote_inputs`)} (${p.length})`,items:p.map(e=>({id:e.id,name:e.name,area:e.area,badge:e.remoteDevice}))}),h.length>0&&(0,C.jsx)(z,{title:`📡 ${n(`binding_matrix.free_remote_outputs`)} (${h.length})`,items:h.map(e=>({id:e.id,name:e.name,area:e.area,badge:e.remoteDevice}))})]})]})]})}function z({title:e,items:t}){return(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`p`,{className:`mb-1 font-semibold text-xs text-base-content/60`,children:e}),(0,C.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:t.map(e=>(0,C.jsxs)(`span`,{className:`gap-1 font-mono text-xxs badge badge-sm badge-ghost`,title:e.id,children:[e.name,e.area&&(0,C.jsxs)(`span`,{className:`text-base-content/40`,children:[`(`,e.area,`)`]}),e.badge&&(0,C.jsxs)(`span`,{className:`text-info/60`,children:[`[`,e.badge,`]`]})]},e.id))})]})}function B({inputs:e,outputs:t,areaFilter:n,hideEmpty:r,t:i,onEditInput:o,onEditOutput:s}){let[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null),f=(0,S.useRef)(null),p=(0,S.useRef)(!1),m=(0,S.useRef)(!1),h=(0,S.useRef)(0),g=(0,S.useRef)(0),v=(0,S.useRef)(0),y=(0,S.useRef)(0),b=(0,S.useRef)(null),[x,T]=(0,S.useState)(null),E=(0,S.useRef)(null),k=(0,S.useCallback)((e,t,n)=>{n||(e.preventDefault(),T({x:e.clientX,y:e.clientY,row:t}))},[]),A=(0,S.useCallback)((e,t,n)=>{if(n)return;let r=`touches`in e?{x:e.touches[0].clientX,y:e.touches[0].clientY}:{x:e.clientX,y:e.clientY};E.current=setTimeout(()=>{T({...r,row:t}),E.current=null},500)},[]),N=(0,S.useCallback)(()=>{E.current&&=(clearTimeout(E.current),null)},[]);(0,S.useEffect)(()=>{if(!x)return;let e=null,t=requestAnimationFrame(()=>{let t=()=>T(null);window.addEventListener(`click`,t),window.addEventListener(`contextmenu`,t,{capture:!0}),window.addEventListener(`scroll`,t,!0),e=()=>{window.removeEventListener(`click`,t),window.removeEventListener(`contextmenu`,t,{capture:!0}),window.removeEventListener(`scroll`,t,!0)}});return()=>{cancelAnimationFrame(t),e?.()}},[x]);let P=(0,S.useMemo)(()=>{let e=new Map;for(let n of t)e.set(n.id,n.area);return e},[t]),F=(0,S.useMemo)(()=>{let t=e;return n.size>0&&(t=t.filter(e=>{let t=e.area||`__none__`;return n.has(t)?!0:e.bindings.some(e=>{let t=P.get(e.targetId)||`__none__`;return n.has(t)})})),r&&(t=t.filter(e=>e.bindings.length>0)),t},[e,n,r,P]),I=(0,S.useMemo)(()=>new Set(e.flatMap(e=>e.bindings.map(e=>e.targetId))),[e]),R=(0,S.useMemo)(()=>{let t=new Map;for(let n of e){let e=n.area||`__none__`;for(let r of n.bindings)t.has(r.targetId)||t.set(r.targetId,new Set),t.get(r.targetId).add(e)}return t},[e]),z=(0,S.useMemo)(()=>{let e=t;return n.size>0&&(e=e.filter(e=>{let t=e.area||`__none__`;if(n.has(t))return!0;let r=R.get(e.id);if(r){for(let e of r)if(n.has(e))return!0}return!1})),r&&(e=e.filter(e=>I.has(e.id))),e},[t,n,r,I,R]),B=(0,S.useMemo)(()=>{let e=new Map;for(let t of F){let n=new Map;for(let e of t.bindings){let t=n.get(e.targetId)||[];t.push(e),n.set(e.targetId,t)}e.set(t.id,n)}return e},[F]);return F.length===0||z.length===0?(0,C.jsx)(`div`,{className:`py-12 text-base-content/40 text-center`,children:(0,C.jsx)(`p`,{className:`text-sm`,children:i(`binding_matrix.no_data`)})}):(0,C.jsxs)(`div`,{ref:f,className:`border border-base-300 rounded-xl overflow-x-auto cursor-grab active:cursor-grabbing select-none`,onPointerDown:e=>{e.pointerType===`mouse`&&e.button===0&&(p.current=!0,m.current=!1,h.current=e.clientX,g.current=e.clientY,v.current=f.current?.scrollLeft||0,b.current=L(f.current),y.current=b.current?.scrollTop||0)},onPointerMove:e=>{if(!p.current||!f.current)return;let t=e.clientX-h.current,n=e.clientY-g.current;if(!m.current&&(Math.abs(t)>5||Math.abs(n)>5)){m.current=!0;try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}}m.current&&(f.current.scrollLeft=v.current-t,b.current&&(b.current.scrollTop=y.current-n))},onPointerUp:e=>{e.currentTarget.hasPointerCapture?.(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId),p.current=!1,m.current=!1},onPointerCancel:()=>{p.current=!1,m.current=!1},onPointerLeave:()=>{m.current||(p.current=!1)},onClickCapture:e=>{m.current&&(e.stopPropagation(),e.preventDefault())},children:[(0,C.jsxs)(`table`,{className:`table table-xs w-auto`,children:[(0,C.jsx)(`thead`,{children:(0,C.jsxs)(`tr`,{children:[(0,C.jsx)(`th`,{className:`left-0 z-20 sticky bg-base-200 border-base-300 border-r min-w-30`}),z.map(e=>(0,C.jsxs)(`th`,{className:_(`group/col bg-base-200 px-2 py-2 border-base-300 border-r min-w-20 font-bold text-xxs text-center whitespace-nowrap cursor-pointer`,u===e.id&&`bg-primary/10`),onMouseEnter:()=>d(e.id),onMouseLeave:()=>d(null),onClick:()=>s(e),title:i(`binding_matrix.click_to_edit`),children:[(0,C.jsxs)(`div`,{className:`flex justify-center items-center gap-1`,children:[(0,C.jsx)(w,{outputType:e.outputType,className:`w-3 h-3 shrink-0`}),(0,C.jsx)(`span`,{className:`whitespace-nowrap`,children:e.name}),(0,C.jsx)(a,{className:`opacity-0 group-hover/col:opacity-40 w-2 h-2 transition-opacity shrink-0`})]}),e.area?(0,C.jsx)(`div`,{className:`font-normal text-xxs text-base-content/40 truncate`,children:e.area}):(0,C.jsx)(`div`,{className:`font-normal text-xxs text-base-content/20`,children:`—`}),e.remoteDevice&&(0,C.jsx)(`div`,{className:`font-normal text-info/50 text-xxs truncate`,children:e.remoteDevice})]},e.id))]})}),(0,C.jsx)(`tbody`,{children:F.map(e=>{let t=B.get(e.id);return(0,C.jsxs)(`tr`,{className:_(`hover:bg-base-200/50`,c===e.id&&`bg-base-200/40`),onMouseEnter:()=>l(e.id),onMouseLeave:()=>l(null),children:[(0,C.jsxs)(`td`,{className:_(`group/row left-0 z-10 sticky border-base-300 border-r font-medium text-xs cursor-pointer`,c===e.id?D[e.inputKind].headerHover:D[e.inputKind].header,e.bindings.length===0&&`text-base-content/30`),onClick:()=>o(e),title:`${i(D[e.inputKind].labelKey)}\n${i(`binding_matrix.click_to_edit`)}`,children:[(0,C.jsxs)(`div`,{className:`flex items-center gap-1 max-w-30 font-bold truncate`,title:e.id,children:[e.name,(0,C.jsx)(a,{className:`opacity-0 group-hover/row:opacity-40 w-2.5 h-2.5 transition-opacity shrink-0`})]}),e.area&&(0,C.jsx)(`div`,{className:`text-xxs text-base-content/40`,children:e.area}),e.remoteDevice&&(0,C.jsx)(`div`,{className:`text-info/50 text-xxs`,children:e.remoteDevice})]}),z.map(n=>{let r=t?.get(n.id)||[],a=c===e.id||u===n.id;return(0,C.jsx)(`td`,{className:_(`px-1 py-1 border-base-300 border-r text-xs text-center`,r.length>0?`bg-success/15 text-success font-medium`:`text-base-content/30`,a&&r.length>0&&`bg-success/25`,a&&r.length===0&&`bg-base-200/40`),onMouseEnter:()=>d(n.id),onMouseLeave:()=>{d(null),N()},onContextMenu:t=>k(t,e,r.length>0),onMouseDown:t=>{t.button===0&&A(t,e,r.length>0)},onMouseUp:N,onTouchStart:t=>A(t,e,r.length>0),onTouchEnd:N,onTouchMove:N,children:r.length>0&&(0,C.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:r.map((t,n)=>(0,C.jsx)(`button`,{className:`hover:bg-success/30 px-0.5 rounded text-left whitespace-nowrap transition-colors cursor-pointer`,onClick:()=>o(e,t.clickType),title:`${M(t,i)}\n${i(`binding_matrix.click_to_edit`)}`,children:j(t,i)},n))})},n.id)})]},e.id)})})]}),x&&(0,C.jsxs)(`div`,{className:`z-50 fixed bg-base-100 shadow-xl py-1 border border-base-300 rounded-lg min-w-45 animate-in duration-100 fade-in zoom-in-95`,style:{left:x.x,top:x.y},onClick:e=>e.stopPropagation(),children:[(0,C.jsx)(`div`,{className:`px-3 py-1.5 font-semibold text-xxs text-base-content/40 uppercase tracking-wider`,children:i(`binding_matrix.add_action`)}),O.filter(e=>x.row.inputKind===`binary_sensor`?e.key===`pressed`||e.key===`released`:e.key!==`pressed`&&e.key!==`released`).map(e=>(0,C.jsxs)(`button`,{className:`flex items-center gap-2 hover:bg-primary/10 px-3 py-1.5 w-full text-sm text-left transition-colors`,onClick:()=>{o(x.row,e.key),T(null)},children:[(0,C.jsx)(`span`,{className:`font-mono text-base-content/70`,children:e.icon}),i(`binding_matrix.legend_${e.key}`)]},e.key))]})]})}function ee({inputs:e,areaFilter:t,hideEmpty:n,t:r,onEditInput:i}){let[o,s]=(0,S.useState)(null),l=(0,S.useMemo)(()=>{let r=e;return t.size>0&&(r=r.filter(e=>{let n=e.area||`__none__`;return t.has(n)})),n&&(r=r.filter(e=>e.bindings.length>0)),r},[e,t,n]),d=(0,S.useCallback)(e=>{s(t=>t===e?null:e)},[]);return l.length===0?(0,C.jsx)(`div`,{className:`py-12 text-base-content/40 text-center`,children:(0,C.jsx)(`p`,{className:`text-sm`,children:r(`binding_matrix.no_data`)})}):(0,C.jsx)(`div`,{className:`space-y-1.5`,children:l.map(e=>{let t=o===e.id,n=e.bindings.length>0,s=new Map;for(let t of e.bindings){let e=s.get(t.targetId)||[];e.push(t),s.set(t.targetId,e)}return(0,C.jsxs)(`div`,{className:_(`border rounded-xl overflow-hidden transition-colors`,n?`border-success/20 bg-success/5`:`border-base-300 bg-base-200/30`,D[e.inputKind].card),children:[(0,C.jsxs)(`button`,{className:`flex justify-between items-center hover:bg-base-200/30 p-3 w-full text-sm transition-colors`,onClick:()=>n&&d(e.id),disabled:!n,children:[(0,C.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[n?(0,C.jsx)(u,{className:`w-3.5 h-3.5 text-success shrink-0`}):(0,C.jsx)(f,{className:`w-3.5 h-3.5 text-base-content/20 shrink-0`}),(0,C.jsxs)(`div`,{className:`min-w-0 text-left`,children:[(0,C.jsx)(`span`,{className:_(`block font-semibold truncate`,!n&&`text-base-content/30`),children:e.name}),e.area&&(0,C.jsx)(`span`,{className:`text-xxs text-base-content/40`,children:e.area})]})]}),(0,C.jsxs)(`div`,{className:`flex items-center gap-2`,children:[n&&(0,C.jsx)(`span`,{className:`font-bold badge badge-sm badge-success`,children:e.bindings.length}),e.type===`remote`&&(0,C.jsx)(`span`,{className:`font-mono badge badge-xs badge-info`,children:e.remoteDevice}),n&&(t?(0,C.jsx)(m,{className:`w-3 h-3 text-base-content/30`}):(0,C.jsx)(c,{className:`w-3 h-3 text-base-content/30`}))]})]}),t&&n&&(0,C.jsxs)(`div`,{className:`space-y-2 bg-base-100/50 p-3 border-base-300 border-t`,children:[[...s.entries()].map(([e,t])=>(0,C.jsxs)(`div`,{className:`flex items-start gap-2 text-xs`,children:[(0,C.jsx)(`span`,{className:`mt-0.5 font-mono font-bold text-base-content/70 shrink-0`,children:`→`}),(0,C.jsxs)(`div`,{children:[(0,C.jsx)(`span`,{className:`font-semibold`,children:e}),(0,C.jsx)(`div`,{className:`flex flex-wrap gap-1 mt-0.5`,children:t.map((e,t)=>(0,C.jsx)(`span`,{className:`gap-0.5 font-mono badge badge-xs badge-success`,children:j(e,r)},t))})]})]},e)),(0,C.jsxs)(`button`,{className:`gap-1 mt-1 btn-outline btn btn-xs btn-primary`,onClick:t=>{t.stopPropagation(),i(e)},children:[(0,C.jsx)(a,{className:`w-2.5 h-2.5`}),r(`binding_matrix.edit_input`)]})]})]},e.id)})})}var V=({formData:e,sections:r,onSaveSection:i,onUpdateFormData:a})=>{let{t:s}=v(),[l,u]=(0,S.useState)(new Set),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)(!1),[h,g]=(0,S.useState)(!1),[_,w]=(0,S.useState)(null),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(-1),[k,j]=(0,S.useState)(`basic`),[M,N]=(0,S.useState)(!1),[L,z]=(0,S.useState)(!1),V=(0,S.useRef)(null),[te,H]=(0,S.useState)(!1),[U,W]=(0,S.useState)(null),[G,ne]=(0,S.useState)(``),[K,re]=(0,S.useState)(-1),[ie,q]=(0,S.useState)(!1),J=(0,S.useRef)(null),Y=(0,S.useCallback)((t,n)=>{let r=t.type===`remote`?`remote_inputs`:`local_inputs`,i=e[r]||[],a=i.findIndex((e,n)=>{if(t.type===`remote`){let r=e.boneio_id||e.remote_device||``,i=e.id||e.entity_id||``;return(r?`${r}/${i}`:i||`remote_${n}`)===t.id}return(e.id||e.boneio_input||e.pin||`local_${n}`)===t.id});a<0||(E(r),O(a),w(JSON.parse(JSON.stringify(i[a]))),V.current=JSON.stringify(i[a]),j(n&&A[n]||`basic`),N(!1),g(!0))},[e]),ae=(0,S.useCallback)(async()=>{if(M||D<0||!_)return;let t=[...e[T]||[]];t[D]=_,z(!0);try{a(T,t),await i(T,t),g(!1),w(null)}catch(e){console.error(`Failed to save input:`,e)}finally{z(!1)}},[_,D,T,e,M,i,a]),oe=(0,S.useCallback)(()=>{g(!1),w(null)},[]),X=(0,S.useMemo)(()=>P(e),[e]),Z=(0,S.useMemo)(()=>F(e),[e]),se=(0,S.useMemo)(()=>{let e=new Set;return X.forEach(t=>{t.area&&e.add(t.area)}),Z.forEach(t=>{t.area&&e.add(t.area)}),[...e].sort()},[X,Z]),ce=(0,S.useMemo)(()=>X.some(e=>!e.area)||Z.some(e=>!e.area),[X,Z]),Q=(0,S.useMemo)(()=>e.output||[],[e.output]),$=(0,S.useMemo)(()=>e.cover||[],[e.cover]),le=(0,S.useMemo)(()=>e.output_group||[],[e.output_group]),ue=(0,S.useMemo)(()=>e.remote_devices||[],[e.remote_devices]),de=(0,S.useMemo)(()=>e.remote_inputs||[],[e.remote_inputs]),fe=(0,S.useMemo)(()=>(e.local_inputs||[]).filter(e=>e._inputType===`binary_sensor`),[e.local_inputs]),pe=(0,S.useMemo)(()=>(e.local_inputs||[]).filter(e=>e._inputType!==`binary_sensor`),[e.local_inputs]),me=(0,S.useMemo)(()=>e.areas||[],[e.areas]),he=(0,S.useMemo)(()=>{let e=r.find(e=>e.name===`local_inputs`);return e?.schema||e?.normalizedSchema||{}},[r]),ge=(0,S.useMemo)(()=>{let e=r.find(e=>e.name===`output`);return e?.schema||e?.normalizedSchema||{}},[r]),_e=(0,S.useMemo)(()=>r.find(e=>e.name===`output`)?.uiSchema||{},[r]),ve=(0,S.useMemo)(()=>{let e=r.find(e=>e.name===`cover`);return e?.schema||e?.normalizedSchema||{}},[r]),ye=(0,S.useCallback)(t=>{let n={output:`output`,cover:`cover`,remote_output:`remote_outputs`,remote_cover:`remote_covers`}[t.type]||`output`,r=e[n]||[],i=r.findIndex((e,n)=>{if(t.type===`remote_output`||t.type===`remote_cover`){let r=e.boneio_id||e.remote_device||``,i=e.id||e.output_id||``;return(r?`${r}/${i}`:i||`remote_out_${n}`)===t.id}return(e.id||``)===t.id});i<0||(ne(n),re(i),W(JSON.parse(JSON.stringify(r[i]))),J.current=JSON.stringify(r[i]),H(!0))},[e]),be=(0,S.useCallback)(async()=>{if(K<0||!U)return;let t=[...e[G]||[]];t[K]=U,q(!0);try{a(G,t),await i(G,t),H(!1),W(null)}catch(e){console.error(`Failed to save output:`,e)}finally{q(!1)}},[U,K,G,e,i,a]),xe=(0,S.useCallback)(()=>{H(!1),W(null)},[]),Se=_&&V.current&&JSON.stringify(_)!==V.current,Ce=U&&J.current&&JSON.stringify(U)!==J.current;return(0,C.jsxs)(y,{width:`full`,children:[(0,C.jsxs)(b,{children:[(0,C.jsx)(I,{inputs:X,outputs:Z,t:s}),(0,C.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 mb-4`,children:[(0,C.jsxs)(`div`,{className:`relative flex items-center gap-2`,children:[(0,C.jsx)(n,{className:`w-3 h-3 text-base-content/40`}),(0,C.jsxs)(`button`,{className:`justify-between gap-1 btn-outline min-w-40 btn btn-sm`,onClick:()=>f(e=>!e),children:[(0,C.jsx)(`span`,{className:`text-xs truncate`,children:l.size===0?s(`binding_matrix.all_areas`):l.size===1?l.has(`__none__`)?s(`binding_matrix.no_area`):[...l][0]:s(`binding_matrix.areas_selected`,{count:l.size})}),(0,C.jsx)(c,{className:`w-2.5 h-2.5 shrink-0`})]}),d&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`div`,{className:`z-40 fixed inset-0`,onClick:()=>f(!1)}),(0,C.jsxs)(`div`,{className:`top-full left-0 z-50 absolute bg-base-100 shadow-xl mt-1 py-1 border border-base-300 rounded-lg min-w-50 max-h-75 overflow-y-auto`,children:[(0,C.jsxs)(`label`,{className:`flex items-center gap-2 hover:bg-base-200/60 px-3 py-1.5 transition-colors cursor-pointer`,children:[(0,C.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-xs checkbox-primary`,checked:l.size===0,onChange:()=>u(new Set)}),(0,C.jsx)(`span`,{className:`font-semibold text-xs`,children:s(`binding_matrix.all_areas`)})]}),(0,C.jsx)(`div`,{className:`my-0.5 border-base-300 border-t`}),ce&&(0,C.jsxs)(`label`,{className:`flex items-center gap-2 hover:bg-base-200/60 px-3 py-1.5 transition-colors cursor-pointer`,children:[(0,C.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-xs checkbox-primary`,checked:l.has(`__none__`),onChange:()=>{let e=new Set(l);e.has(`__none__`)?e.delete(`__none__`):e.add(`__none__`),u(e)}}),(0,C.jsx)(`span`,{className:`text-xs text-base-content/50 italic`,children:s(`binding_matrix.no_area`)})]}),se.map(e=>(0,C.jsxs)(`label`,{className:`flex items-center gap-2 hover:bg-base-200/60 px-3 py-1.5 transition-colors cursor-pointer`,children:[(0,C.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-xs checkbox-primary`,checked:l.has(e),onChange:()=>{let t=new Set(l);t.has(e)?t.delete(e):t.add(e),u(t)}}),(0,C.jsx)(`span`,{className:`text-xs`,children:e})]},e))]})]})]}),(0,C.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer`,children:[(0,C.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm checkbox-primary`,checked:p,onChange:e=>m(e.target.checked)}),(0,C.jsxs)(`span`,{className:`flex items-center gap-1 font-medium text-xs text-base-content/60`,children:[p?(0,C.jsx)(t,{className:`w-3 h-3`}):(0,C.jsx)(o,{className:`w-3 h-3`}),s(`binding_matrix.hide_empty`)]})]})]}),(0,C.jsx)(`div`,{className:`hidden md:block`,children:(0,C.jsx)(B,{inputs:X,outputs:Z,areaFilter:l,hideEmpty:p,t:s,onEditInput:Y,onEditOutput:ye})}),(0,C.jsx)(`div`,{className:`md:hidden`,children:(0,C.jsx)(ee,{inputs:X,areaFilter:l,hideEmpty:p,t:s,onEditInput:Y})}),(0,C.jsx)(R,{inputs:X,outputs:Z,t:s})]}),(0,C.jsx)(x,{open:h,onOpenChange:g,editingItem:_,editingIndex:D,sectionType:T,schema:T===`remote_inputs`?r.find(e=>e.name===`remote_inputs`)?.schema||r.find(e=>e.name===`remote_inputs`)?.normalizedSchema||{}:he,allBinarySensors:fe,allEvents:pe,allOutputs:Q,allOutputGroups:le,allCovers:$,allAreas:me,allRemoteDevices:ue,allRemoteInputs:de,savedOutputs:Q,savedOutputGroups:le,savedCovers:$,onChange:w,onSave:ae,onCancel:oe,onValidationChange:N,saveDisabled:M||!Se,isSaving:L,initialTab:k}),(0,C.jsx)(x,{open:te,onOpenChange:H,editingItem:U,editingIndex:K,sectionType:G,schema:G===`cover`?ve:ge,uiSchema:G===`cover`?void 0:_e,allOutputs:Q,allCovers:$,allAreas:me,onChange:W,onSave:be,onCancel:xe,saveDisabled:!Ce,isSaving:ie})]})};export{V as default};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Dt as t,Kt as n,Mt as r,vn as i,yn as a}from"./fa-ChDOCx3T.js";import{n as o}from"./axios-DyqbZVcF.js";import{L as s,N as c,T as l,m as u,y as d}from"./index-CxoiGDl4.js";var f=e(a(),1),p=i();function m(){let{t:e}=s(),[i,a]=(0,f.useState)(!1),[m,h]=(0,f.useState)(null),[g,_]=(0,f.useState)(!1),[v,y]=(0,f.useState)(null);return(0,p.jsxs)(l,{children:[(0,p.jsx)(d,{icon:(0,p.jsx)(r,{}),title:e(`settings.reboot_device`),description:e(`settings.reboot_description`),footer:(0,p.jsx)(u,{children:(0,p.jsx)(`button`,{className:`btn btn-warning btn-sm gap-2`,onClick:async()=>{if(confirm(e(`settings.confirm_reboot`))){a(!0),h(null);try{let{data:t}=await o.post(`/api/reboot`);h({status:`success`,message:t.message||e(`settings.device_rebooting`)})}catch(t){h({status:`error`,message:t.message||e(`settings.reboot_failed`)}),a(!1)}}},disabled:i,children:i?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(n,{className:`animate-spin`}),e(`settings.rebooting`)]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(r,{}),e(`settings.reboot_device`)]})})}),children:(0,p.jsxs)(`div`,{className:`space-y-3`,children:[(0,p.jsx)(c,{variant:`warning`,message:e(`settings.reboot_warning`)}),m&&(0,p.jsx)(c,{variant:m.status===`success`?`success`:`error`,message:m.message})]})}),(0,p.jsx)(d,{variant:`danger`,icon:(0,p.jsx)(t,{}),title:e(`settings.shutdown_device`),description:e(`settings.shutdown_description`),footer:(0,p.jsx)(u,{children:(0,p.jsx)(`button`,{className:`btn btn-error btn-sm gap-2`,onClick:async()=>{if(confirm(e(`settings.confirm_shutdown`))){_(!0),y(null);try{let{data:t}=await o.post(`/api/shutdown`);y({status:`success`,message:t.message||e(`settings.device_shutting_down`)})}catch(t){y({status:`error`,message:t.message||e(`settings.shutdown_failed`)}),_(!1)}}},disabled:g,children:g?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(n,{className:`animate-spin`}),e(`settings.shutting_down`)]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(t,{}),e(`settings.shutdown_device`)]})})}),children:(0,p.jsxs)(`div`,{className:`space-y-3`,children:[(0,p.jsx)(c,{variant:`error`,message:e(`settings.shutdown_warning`)}),v&&(0,p.jsx)(c,{variant:v.status===`success`?`success`:`error`,message:v.message})]})})]})}export{m as default};
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{Dt as t,Kt as n,Mt as r,vn as i,yn as a}from"./fa-ChDOCx3T.js";import{n as o}from"./axios-DyqbZVcF.js";import{N as s,R as c,T as l,m as u,y as d}from"./index-DULLFI0R.js";var f=e(a(),1),p=i();function m(){let{t:e}=c(),[i,a]=(0,f.useState)(!1),[m,h]=(0,f.useState)(null),[g,_]=(0,f.useState)(!1),[v,y]=(0,f.useState)(null);return(0,p.jsxs)(l,{children:[(0,p.jsx)(d,{icon:(0,p.jsx)(r,{}),title:e(`settings.reboot_device`),description:e(`settings.reboot_description`),footer:(0,p.jsx)(u,{children:(0,p.jsx)(`button`,{className:`btn btn-warning btn-sm gap-2`,onClick:async()=>{if(confirm(e(`settings.confirm_reboot`))){a(!0),h(null);try{let{data:t}=await o.post(`/api/reboot`);h({status:`success`,message:t.message||e(`settings.device_rebooting`)})}catch(t){h({status:`error`,message:t.message||e(`settings.reboot_failed`)}),a(!1)}}},disabled:i,children:i?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(n,{className:`animate-spin`}),e(`settings.rebooting`)]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(r,{}),e(`settings.reboot_device`)]})})}),children:(0,p.jsxs)(`div`,{className:`space-y-3`,children:[(0,p.jsx)(s,{variant:`warning`,message:e(`settings.reboot_warning`)}),m&&(0,p.jsx)(s,{variant:m.status===`success`?`success`:`error`,message:m.message})]})}),(0,p.jsx)(d,{variant:`danger`,icon:(0,p.jsx)(t,{}),title:e(`settings.shutdown_device`),description:e(`settings.shutdown_description`),footer:(0,p.jsx)(u,{children:(0,p.jsx)(`button`,{className:`btn btn-error btn-sm gap-2`,onClick:async()=>{if(confirm(e(`settings.confirm_shutdown`))){_(!0),y(null);try{let{data:t}=await o.post(`/api/shutdown`);y({status:`success`,message:t.message||e(`settings.device_shutting_down`)})}catch(t){y({status:`error`,message:t.message||e(`settings.shutdown_failed`)}),_(!1)}}},disabled:g,children:g?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(n,{className:`animate-spin`}),e(`settings.shutting_down`)]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(t,{}),e(`settings.shutdown_device`)]})})}),children:(0,p.jsxs)(`div`,{className:`space-y-3`,children:[(0,p.jsx)(s,{variant:`error`,message:e(`settings.shutdown_warning`)}),v&&(0,p.jsx)(s,{variant:v.status===`success`?`success`:`error`,message:v.message})]})})]})}export{m as default};
@@ -0,0 +1,5 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,C as n,Et as r,H as i,Ht as a,Jt as o,K as s,Kt as c,Lt as l,N as u,O as d,P as f,R as p,Rt as m,St as h,Tt as g,Xt as _,_n as v,an as ee,bt as y,cn as b,d as x,et as S,f as te,h as ne,i as C,m as w,nn as re,on as ie,p as T,pt as ae,q as E,rt as D,t as oe,tn as O,u as k,vn as A,wt as se,xt as ce,yn as j,zt as M}from"./fa-ChDOCx3T.js";import{a as N,i as le,n as ue,o as de,r as fe,t as pe}from"./dialog-DMaCttcv.js";import{n as P}from"./axios-DyqbZVcF.js";import{n as me,r as he}from"./configCache-DZ0vWq_Z.js";import{i as F,n as I,o as L,s as R,t as z}from"./select-iQAUlBVk.js";import{a as ge,c as _e,h as ve,m as ye,r as be,t as B}from"./LoggerForm-B4wgrOCg.js";import{t as xe}from"./utils-DOQQTBMN.js";import{B as Se,C as Ce,D as we,M as Te,N as V,Q as Ee,R as H,T as De,Z as U,h as W,m as G,y as K}from"./index-DULLFI0R.js";import{t as Oe}from"./clipboard-CCtx29e-.js";import{t as q}from"./NumericInput-CrVNlFps.js";var J=e(j(),1),ke={active:!1,seconds_remaining:0,started:null,busy:!1,error:null},Y=ke,X=new Set,Ae=null;function Z(e){Y={...Y,...e},X.forEach(e=>e()),je()}function je(){Y.active&&Ae===null?Ae=setInterval(()=>{let e=Y.seconds_remaining-1;Z(e<=0?{active:!1,seconds_remaining:0,started:null}:{seconds_remaining:e})},1e3):!Y.active&&Ae!==null&&(clearInterval(Ae),Ae=null)}function Me(e){return X.add(e),()=>{X.delete(e)}}async function Ne(e){Z({busy:!0,error:null});try{let{data:t}=await e();Z({...t,busy:!1})}catch{Z({busy:!1,error:`failed`})}}async function Pe(){try{let{data:e}=await P.get(`/api/diagnostics/capture`);Z({...e,error:null})}catch{Z(ke)}}function Fe(e=10){let t=(0,J.useSyncExternalStore)(Me,()=>Y,()=>Y);(0,J.useEffect)(()=>{Pe()},[]);let n=(0,J.useCallback)((t=e)=>Ne(()=>P.post(`/api/diagnostics/capture`,{minutes:t})),[e]),r=(0,J.useCallback)(()=>Ne(()=>P.delete(`/api/diagnostics/capture`)),[]),i=t.seconds_remaining;return{state:t,clock:`${Math.floor(i/60)}:${String(i%60).padStart(2,`0`)}`,busy:t.busy,error:t.error,open:n,close:r,refresh:Pe}}var Ie=[{name:`log`,icon:`📜`,titleKey:`diagnostics.group_log`},{name:`buses`,icon:`🔍`,titleKey:`diagnostics.group_buses`}],Le=[{name:`log`,icon:`📜`,titleKey:`diagnostics.section_log`,descriptionKey:`diagnostics.section_log_desc`,group:`log`,width:`full`},{name:`support`,icon:`🛟`,titleKey:`diagnostics.section_support`,descriptionKey:`diagnostics.section_support_desc`,group:`log`},{name:`modbus`,icon:`🔌`,titleKey:`diagnostics.section_modbus`,descriptionKey:`diagnostics.section_modbus_desc`,group:`buses`},{name:`i2c`,icon:`🧩`,titleKey:`diagnostics.section_i2c`,descriptionKey:`diagnostics.section_i2c_desc`,group:`buses`},{name:`can_network`,icon:`⚡`,titleKey:`diagnostics.section_can_network`,descriptionKey:`diagnostics.section_can_network_desc`,group:`buses`,requiresCan:!0},{name:`can_sniffer`,icon:`📡`,titleKey:`diagnostics.section_can_sniffer`,descriptionKey:`diagnostics.section_can_sniffer_desc`,group:`buses`,requiresCan:!0}],Q=A();function Re({section:e,isActive:t,disabled:n,badge:r,onClick:i}){let{t:a}=H();return(0,Q.jsxs)(`button`,{onClick:i,disabled:n,className:xe(`w-full text-left px-3 py-2.5 rounded-xl transition-colors duration-150 flex items-start gap-3`,t?`bg-primary text-primary-content shadow-sm`:`text-base-content hover:bg-base-content/6`,n&&`opacity-40 cursor-not-allowed hover:bg-transparent`),children:[(0,Q.jsx)(`span`,{className:`text-lg leading-6 shrink-0`,"aria-hidden":`true`,children:e.icon}),(0,Q.jsx)(`span`,{className:`font-medium min-w-0 flex-1 wrap-break-word leading-6`,children:a(e.titleKey)}),r]})}function ze({activeSection:e,onNavigate:t}){let{t:n}=H(),{canSupported:r}=we(),{state:i,clock:a}=Fe();return(0,Q.jsx)(Q.Fragment,{children:Ie.map(o=>{let s=Le.filter(e=>e.group===o.name),c=s.some(t=>t.name===e);return(0,Q.jsxs)(`div`,{className:xe(`mb-2 rounded-xl border`,c?`border-primary/30 bg-primary/5`:`border-base-content/8 bg-base-100/70`),children:[(0,Q.jsxs)(`h3`,{className:`flex items-center gap-2 px-3 py-2.5 text-sm font-semibold opacity-80`,children:[(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:o.icon}),(0,Q.jsx)(`span`,{className:`flex-1 wrap-break-word`,children:n(o.titleKey)})]}),(0,Q.jsx)(`div`,{className:`px-3 pb-3 space-y-1`,children:s.map(n=>(0,Q.jsx)(Re,{section:n,isActive:e===n.name,disabled:!!n.requiresCan&&!r,badge:n.name===`support`&&i.active?(0,Q.jsx)(`span`,{className:`badge badge-warning badge-sm font-mono shrink-0`,children:a}):void 0,onClick:()=>t(n.name)},n.name))})]},o.name)})})}function Be({activeSection:e,onNavigate:t,isSheetOpen:n,onSheetOpenChange:r}){let{t:i}=H(),a=Le.find(t=>t.name===e);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(ve,{open:n,onOpenChange:r,icon:a?.icon??`🩺`,label:i(a?a.titleKey:`diagnostics.page_title`),sheetTitle:i(`diagnostics.sections`),children:(0,Q.jsx)(ze,{activeSection:e,onNavigate:e=>{t(e),r(!1)}})}),(0,Q.jsx)(`div`,{className:`hidden lg:block w-72 shrink-0 stg-canvas border-r border-base-content/8 overflow-y-auto`,children:(0,Q.jsxs)(`div`,{className:`p-4`,children:[(0,Q.jsx)(`h2`,{className:`text-[11px] font-semibold uppercase tracking-[0.1em] text-base-content/45 mb-3 px-1`,children:i(`diagnostics.sections`)}),(0,Q.jsx)(ze,{activeSection:e,onNavigate:t})]})})]})}function Ve(e){return e.replace(/\([A-Za-z_]+[\w]*\)/g,`(...)`).replace(/\d+\.\d+\s*(seconds?|s\b)/gi,`... $1`)}function He(e,t=Ve){let n=new Map,r=new Map;return e.forEach((e,i)=>{let a=`${e.level} ${t(e.message)}`,o=n.get(a);o?(o.count+=1,o.timestamp=e.timestamp):n.set(a,{timestamp:e.timestamp,firstTimestamp:e.timestamp,message:e.message,level:e.level,count:1}),r.set(a,i)}),Array.from(n.entries()).sort(([e],[t])=>(r.get(e)??0)-(r.get(t)??0)).map(([,e])=>e)}var Ue=new Intl.DateTimeFormat(`sv-SE`,{year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1}),We=e=>{if(/^\d+$/.test(e)){let t=Math.floor(parseInt(e)/1e3);return Ue.format(t)}return e},Ge=[{value:`3`,label:`ERROR`,color:`var(--log-error)`,activeColor:`var(--log-error-bg)`},{value:`4`,label:`WARNING`,color:`var(--log-warning)`,activeColor:`var(--log-warning-bg)`},{value:`6`,label:`INFO`,color:`var(--log-info)`,activeColor:`transparent`},{value:`7`,label:`DEBUG`,color:`var(--log-debug)`,activeColor:`transparent`}],Ke=200;function $(){let{t:e}=H(),[n,r]=(0,J.useState)([]),[a,o]=(0,J.useState)(!1),[c,l]=(0,J.useState)(!1),[u,f]=(0,J.useState)(!1),[p,h]=(0,J.useState)(!0),g=(0,J.useRef)(null),[v,ee]=(0,J.useState)(!0),[y,b]=(0,J.useState)(!0),[x,S]=(0,J.useState)(new Set),[ne,w]=(0,J.useState)(null),[re,ie]=(0,J.useState)(!1),ae=(0,J.useRef)(!1),E=(0,J.useRef)(null),[D,O]=(0,J.useState)(new Set),k=(0,J.useRef)(null),A=(0,J.useRef)(!1),[se,ce]=(0,J.useState)(!1),j=(0,J.useRef)(null),[M,N]=(0,J.useState)(new Set),[le,ue]=(0,J.useState)(!1),de=(0,J.useRef)(null),[fe,pe]=(0,J.useState)(new Set),{state:me,clock:he,busy:F,open:I,close:L}=Fe(),R=me.active,[z,ge]=(0,J.useState)(null),[_e,ve]=(0,J.useState)(null),[ye,be]=(0,J.useState)(``),[B,xe]=(0,J.useState)(``),[Se,Ce]=(0,J.useState)(!1),we=(0,J.useRef)(null),[Te,V]=(0,J.useState)(``),[Ee,De]=(0,J.useState)(``),U=(0,J.useRef)(null),W=z===`systemd`,G=(0,J.useCallback)((e={})=>{let t=new URLSearchParams;t.set(`limit`,String(Ke)),_e&&t.set(`priority`,_e),ye&&t.set(`since`,ye),B&&t.set(`until`,B),Ee&&t.set(`grep`,Ee);for(let[n,r]of Object.entries(e))r&&t.set(n,r);return t.toString()},[_e,ye,B,Ee]),K=(0,J.useCallback)(async()=>{try{o(!0);let e=await P.get(`/api/logs?${G()}`,{timeout:3e4});r(e.data.logs),f(e.data.has_more),ge(e.data.source||`standalone`)}catch(e){console.error(`Error fetching logs:`,e)}finally{o(!1)}},[G]),q=(0,J.useCallback)(async()=>{if(c||!u||n.length===0)return;let e=n[0]?.timestamp;if(e)try{l(!0);let t=g.current,n=t?.scrollHeight||0,i=await P.get(`/api/logs?${G({before:e})}`,{timeout:3e4}),a=i.data.logs;f(i.data.has_more),a.length>0&&(r(e=>[...a,...e]),requestAnimationFrame(()=>{if(t){let e=t.scrollHeight;t.scrollTop+=e-n}}))}catch(e){console.error(`Error fetching older logs:`,e)}finally{l(!1)}},[c,u,n,G]),ke=(0,J.useCallback)(()=>{R?L():I()},[R,I,L]);(0,J.useEffect)(()=>{K()},[]),(0,J.useEffect)(()=>{if(p){let e=setInterval(K,5e3);return()=>clearInterval(e)}},[K,p]),(0,J.useEffect)(()=>{let e=e=>{j.current&&!j.current.contains(e.target)&&ce(!1),de.current&&!de.current.contains(e.target)&&ue(!1),we.current&&!we.current.contains(e.target)&&Ce(!1)},t=()=>{ae.current=!1};return document.addEventListener(`mousedown`,e),document.addEventListener(`mouseup`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`mouseup`,t)}},[]),(0,J.useEffect)(()=>{let e=()=>{let e=window.getSelection();if(!e||e.isCollapsed||!e.toString().trim()){ie(!1);return}g.current&&e.anchorNode&&g.current.contains(e.anchorNode)&&(ie(!0),S(e=>e.size>0?new Set:e))};return document.addEventListener(`selectionchange`,e),()=>{document.removeEventListener(`selectionchange`,e)}},[]);let Y=e=>{let t=e.match(/\[([\w.]+)\]/);return t?t[1]:null},X=(0,J.useMemo)(()=>{let e=new Set;for(let t of n){let n=Y(t.message);n&&e.add(n)}return Array.from(e).sort((e,t)=>e.localeCompare(t))},[n]),Ae=e=>parseInt(e)<=3?`3`:e,Z=(0,J.useMemo)(()=>He(n.filter(e=>{if(D.size>0){let t=Y(e.message);if(t===null||!D.has(t))return!1}if(M.size>0){let t=Y(e.message);if(t!==null&&M.has(t))return!1}return!(fe.size>0&&!fe.has(Ae(e.level)))})),[n,D,M,fe]);(0,J.useEffect)(()=>{S(new Set),w(null)},[D,M,fe]);let je=e=>{W?ve(t=>t===e?null:e):pe(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})};(0,J.useEffect)(()=>{z!==null&&K()},[_e,Ee]);let Me=e=>{O(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},Ne=e=>{N(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},Pe=e=>{switch(parseInt(e)){case 0:case 1:case 2:case 3:return{color:`var(--log-error)`};case 4:return{color:`var(--log-warning)`};case 6:return{color:`var(--log-info)`};case 7:return{color:`var(--log-debug)`};default:return{}}},Ie=e=>{switch(parseInt(e)){case 0:case 1:case 2:case 3:return{borderLeft:`2px solid var(--log-error-border)`,backgroundColor:`var(--log-error-bg)`};case 4:return{borderLeft:`2px solid var(--log-warning-border)`,backgroundColor:`var(--log-warning-bg)`};default:return{borderLeft:`2px solid transparent`}}},Le=(0,J.useCallback)(()=>{if(!v||!g.current)return;let e=window.getSelection(),t=!!(e&&!e.isCollapsed&&e.toString().trim().length>0);ae.current||t||x.size>0||(g.current.scrollTop=g.current.scrollHeight)},[v,x]),Re=()=>{if(g.current){let{scrollTop:e,scrollHeight:t,clientHeight:n}=g.current,r=t-e-n<100;ee(r),b(e<(t-n)/2),e<200&&u&&!c&&q()}},ze=()=>{g.current&&g.current.scroll({top:y?g.current.scrollHeight:0,behavior:`smooth`})};(0,J.useEffect)(()=>{Le()},[n,Le]);let Be=(e,t)=>{if(E.current&&Math.hypot(e.clientX-E.current.x,e.clientY-E.current.y)>5)return;let n=window.getSelection();if(!(n&&!n.isCollapsed&&n.toString().trim().length>0)){if(e.shiftKey&&ne!==null){let e=Math.min(ne,t),n=Math.max(ne,t),r=new Set;for(let t=e;t<=n;t++)r.add(t);S(r)}else e.ctrlKey||e.metaKey?(S(e=>{let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}),w(t)):(S(e=>e.size===1&&e.has(t)?new Set:new Set([t])),w(t))}},Ve=2e3,Ue=(0,J.useCallback)(()=>{let e=window.getSelection();if(e&&!e.isCollapsed){let t=e.toString().trim();if(t.length>0&&g.current&&e.anchorNode&&g.current.contains(e.anchorNode))return t}return x.size>0?Array.from(x).sort((e,t)=>e-t).filter(e=>e<Z.length).map(e=>{let t=Z[e];return`${We(t.timestamp)} ${t.message}`}).join(`
2
+ `):``},[x,Z]),$=re||x.size>0,qe=Ue(),Je=(0,J.useMemo)(()=>!$||!qe?0:qe.length+12,[$,qe]),Ye=Je>Ve,Xe=()=>{let t=Ue();t&&Oe(t).then(()=>{Qe(e(`log_viewer.copied_clipboard`))})},Ze=()=>{let t=Ue();if(!t)return;let n="```bash\n"+t+"\n```";Oe(n).then(()=>{Qe(e(`log_viewer.copied_discord`))})},Qe=e=>{let t=document.getElementById(`toast`),n=document.getElementById(`toast-text`);t&&n&&(n.textContent=e,t.classList.remove(`hidden`),setTimeout(()=>{t.classList.add(`hidden`)},2e3))};return(0,Q.jsxs)(`div`,{className:`h-full min-h-0 flex flex-col overflow-hidden`,children:[(0,Q.jsx)(`div`,{className:`bg-base-200 px-2 sm:px-4 pt-2 sm:pt-4`,children:(0,Q.jsxs)(`div`,{className:`relative flex items-center w-full`,children:[(0,Q.jsx)(m,{className:`absolute left-3 w-4 h-4 text-base-content/40 pointer-events-none`}),(0,Q.jsx)(`input`,{type:`text`,className:`input input-bordered pl-9 w-full font-mono text-sm`,placeholder:e(`log_viewer.search_placeholder`),value:Te,onChange:e=>{let t=e.target.value;V(t),U.current&&clearTimeout(U.current),U.current=setTimeout(()=>{De(t.trim())},600)},onKeyDown:e=>{e.key===`Enter`&&(U.current&&clearTimeout(U.current),De(Te.trim()))}}),Te&&(0,Q.jsx)(`button`,{onClick:()=>{V(``),U.current&&clearTimeout(U.current),De(``)},className:`absolute right-2 btn btn-ghost btn-sm px-2 text-base-content/40 hover:text-base-content`,children:`✕`})]})}),(0,Q.jsxs)(`div`,{className:`bg-base-200 p-2 sm:p-4 border-b border-base-content/10 flex flex-wrap items-center gap-2 sm:gap-4`,children:[(0,Q.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer`,children:[(0,Q.jsx)(`input`,{type:`checkbox`,className:`toggle toggle-sm`,checked:p,onChange:e=>h(e.target.checked)}),(0,Q.jsx)(`span`,{className:`text-sm`,children:e(`log_viewer.auto_refresh`)})]}),(0,Q.jsx)(`button`,{className:`btn btn-sm ${v?`btn-primary btn-soft`:``}`,onClick:()=>ee(!v),children:e(v?`log_viewer.auto_scroll_on`:`log_viewer.auto_scroll_off`)}),(0,Q.jsx)(`div`,{className:`flex items-center gap-1`,title:!W&&z!==null?e(`log_viewer.filter_client_only`):``,children:Ge.map(t=>{let n=W?_e===t.value:fe.has(t.value);return(0,Q.jsx)(`button`,{onClick:()=>je(t.value),className:`btn btn-xs font-mono ${n?``:`opacity-60`}`,style:n?{color:t.color,borderColor:t.color,backgroundColor:t.activeColor}:{},title:W?`${t.label} (${e(`log_viewer.filter_server`)})`:z===null?t.label:`${t.label} (${e(`log_viewer.filter_client_only`)})`,children:t.label},t.value)})}),(0,Q.jsxs)(`div`,{className:`relative`,ref:we,children:[(0,Q.jsxs)(`button`,{onClick:()=>Ce(!Se),className:`btn btn-sm gap-1 ${ye||B?`btn-primary btn-soft`:``}`,title:e(`log_viewer.date_range`),children:[(0,Q.jsx)(T,{className:`w-3 h-3`}),e(ye||B?`log_viewer.date_active`:`log_viewer.date_range`)]}),Se&&(0,Q.jsxs)(`div`,{className:`absolute top-full left-0 mt-1 z-50 bg-base-100 border border-base-content/20 rounded-lg shadow-xl p-3 w-72 flex flex-col gap-2`,children:[(0,Q.jsx)(`label`,{className:`text-xs font-semibold text-base-content/70`,children:e(`log_viewer.date_from`)}),(0,Q.jsx)(`input`,{type:`datetime-local`,className:`input input-sm input-bordered w-full`,value:ye,onChange:e=>be(e.target.value)}),(0,Q.jsx)(`label`,{className:`text-xs font-semibold text-base-content/70`,children:e(`log_viewer.date_to`)}),(0,Q.jsx)(`input`,{type:`datetime-local`,className:`input input-sm input-bordered w-full`,value:B,onChange:e=>xe(e.target.value)}),(0,Q.jsxs)(`div`,{className:`flex gap-1 mt-1`,children:[(0,Q.jsx)(`button`,{onClick:()=>{K(),Ce(!1)},className:`btn btn-sm btn-primary flex-1`,children:e(`log_viewer.date_apply`)}),(0,Q.jsx)(`button`,{onClick:()=>{be(``),xe(``)},className:`btn btn-sm btn-ghost flex-1`,children:e(`log_viewer.clear`)})]})]})]}),(0,Q.jsxs)(`div`,{className:`relative`,ref:j,children:[(0,Q.jsxs)(`button`,{onClick:()=>ce(!se),className:`btn btn-sm gap-1 ${D.size>0?`btn-primary btn-soft`:``}`,children:[(0,Q.jsx)(s,{className:`w-3 h-3`}),D.size>0?e(D.size===1?`log_viewer.modules_count_one`:`log_viewer.modules_count_other`,{count:D.size}):e(`log_viewer.modules`)]}),se&&(0,Q.jsxs)(`div`,{className:`absolute top-full left-0 mt-1 z-50 bg-base-100 border border-base-content/20 rounded-lg shadow-xl w-72 max-h-80 flex flex-col`,children:[(0,Q.jsxs)(`div`,{className:`p-2 border-b border-base-content/10 flex gap-1`,children:[(0,Q.jsx)(`button`,{onClick:()=>O(new Set(X)),className:`btn btn-ghost btn-xs flex-1`,children:e(`log_viewer.select_all`)}),(0,Q.jsx)(`button`,{onClick:()=>O(new Set),className:`btn btn-ghost btn-xs flex-1`,children:e(`log_viewer.clear`)})]}),(0,Q.jsxs)(`div`,{className:`overflow-y-auto p-1`,children:[X.map(e=>(0,Q.jsxs)(`label`,{className:`flex items-center gap-2 px-2 py-1 rounded cursor-pointer hover:bg-base-200 text-xs`,children:[(0,Q.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-xs checkbox-primary`,checked:D.has(e),onChange:()=>Me(e)}),(0,Q.jsx)(`span`,{className:`font-mono truncate`,children:e})]},e)),X.length===0&&(0,Q.jsx)(`div`,{className:`text-xs text-base-content/50 p-2 text-center`,children:e(`log_viewer.no_modules_found`)})]})]})]}),(0,Q.jsxs)(`div`,{className:`relative`,ref:de,children:[(0,Q.jsxs)(`button`,{onClick:()=>ue(!le),className:`btn btn-sm gap-1 ${M.size>0?`btn-error btn-soft`:``}`,children:[(0,Q.jsx)(i,{className:`w-3 h-3`}),M.size>0?e(M.size===1?`log_viewer.excluded_count_one`:`log_viewer.excluded_count_other`,{count:M.size}):e(`log_viewer.exclude_modules`)]}),le&&(0,Q.jsxs)(`div`,{className:`absolute top-full left-0 mt-1 z-50 bg-base-100 border border-base-content/20 rounded-lg shadow-xl w-72 max-h-80 flex flex-col`,children:[(0,Q.jsx)(`div`,{className:`p-2 border-b border-base-content/10 flex gap-1`,children:(0,Q.jsx)(`button`,{onClick:()=>N(new Set),className:`btn btn-ghost btn-xs flex-1`,children:e(`log_viewer.clear`)})}),(0,Q.jsxs)(`div`,{className:`overflow-y-auto p-1`,children:[X.map(e=>(0,Q.jsxs)(`label`,{className:`flex items-center gap-2 px-2 py-1 rounded cursor-pointer hover:bg-base-200 text-xs`,children:[(0,Q.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-xs checkbox-error`,checked:M.has(e),onChange:()=>Ne(e)}),(0,Q.jsx)(`span`,{className:`font-mono truncate ${M.has(e)?`line-through opacity-50`:``}`,children:e})]},e)),X.length===0&&(0,Q.jsx)(`div`,{className:`text-xs text-base-content/50 p-2 text-center`,children:e(`log_viewer.no_modules_found`)})]})]})]}),(0,Q.jsxs)(`div`,{className:`relative group`,children:[(0,Q.jsxs)(`button`,{onClick:ke,disabled:F,className:`btn btn-sm gap-1 ${R?`btn-warning btn-soft`:``}`,title:e(R?`log_viewer.debug_disable`:`log_viewer.debug_enable`),children:[(0,Q.jsx)(te,{className:`w-3 h-3 ${F?`animate-pulse`:``}`}),R?`${e(`log_viewer.debug_on`)} ${he}`:e(`log_viewer.debug_off`)]}),R&&(0,Q.jsx)(`div`,{className:`absolute top-full left-0 mt-1 z-50 hidden group-hover:block bg-warning text-warning-content text-xs rounded px-2 py-1 shadow-lg whitespace-nowrap`,children:e(`log_viewer.debug_warning`)})]}),(0,Q.jsx)(`span`,{className:`text-xs text-base-content/50 ml-auto`,children:e(`log_viewer.log_count`,{count:n.length})}),(0,Q.jsx)(`button`,{onClick:K,disabled:a,className:`btn btn-sm btn-square`,children:(0,Q.jsx)(_,{className:`${a?`animate-spin`:``}`})})]}),(0,Q.jsxs)(`div`,{ref:g,onScroll:Re,onMouseDown:()=>{ae.current=!0},className:`flex-1 overflow-auto p-2 sm:p-4 font-mono text-xs sm:text-sm relative min-w-0 select-text`,children:[a&&n.length===0&&(0,Q.jsxs)(`div`,{className:`flex flex-col items-center justify-center h-full gap-3`,children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-lg text-primary`}),(0,Q.jsx)(`span`,{className:`text-sm text-base-content/50`,children:e(`log_viewer.loading`)})]}),c&&(0,Q.jsxs)(`div`,{className:`flex justify-center py-2`,children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-sm`}),(0,Q.jsx)(`span`,{className:`ml-2 text-sm text-base-content/50`,children:e(`log_viewer.loading_older`)})]}),u&&!c&&(0,Q.jsx)(`div`,{className:`flex justify-center py-2`,children:(0,Q.jsx)(`button`,{onClick:q,className:`btn btn-sm`,children:e(`log_viewer.load_more`)})}),(0,Q.jsx)(`div`,{className:`flex flex-col gap-0.5`,children:Z.map((t,n)=>(0,Q.jsxs)(`div`,{className:`flex gap-2 sm:gap-4 px-1 sm:px-2 rounded transition-colors select-text cursor-pointer ${x.has(n)?``:`hover:bg-base-200`}`,style:x.has(n)?{backgroundColor:`var(--log-selected-bg)`,color:`var(--log-selected-text)`}:Ie(t.level),onMouseDown:e=>{E.current={x:e.clientX,y:e.clientY}},onClick:e=>Be(e,n),onTouchStart:()=>{A.current=!1,k.current=setTimeout(()=>{A.current=!0,Oe(t.message).then(()=>{Qe(e(`log_viewer.copied_line`))})},500)},onTouchEnd:()=>{k.current&&=(clearTimeout(k.current),null)},onTouchMove:()=>{k.current&&=(clearTimeout(k.current),null)},children:[(0,Q.jsx)(`span`,{className:`whitespace-nowrap shrink-0 hidden sm:inline select-text`,style:{color:x.has(n)?`var(--log-selected-timestamp)`:`var(--log-timestamp)`},children:We(t.timestamp)}),(0,Q.jsx)(`span`,{className:`whitespace-nowrap shrink-0 sm:hidden select-text`,style:{color:x.has(n)?`var(--log-selected-timestamp)`:`var(--log-timestamp)`},children:We(t.timestamp).split(` `)[1]||We(t.timestamp)}),(0,Q.jsx)(`span`,{className:`flex-1 whitespace-pre-wrap break-all min-w-0 select-text`,style:x.has(n)?{color:`var(--log-selected-text)`}:Pe(t.level),children:t.message}),t.count>1&&(0,Q.jsxs)(`span`,{className:`shrink-0 self-center badge badge-sm font-mono opacity-80 select-none`,style:{backgroundColor:`var(--log-error-bg, oklch(0.3 0.05 25))`,color:`var(--log-error, oklch(0.8 0.15 25))`,borderColor:`var(--log-error-border, oklch(0.5 0.1 25))`},title:t.count>1&&t.firstTimestamp!==t.timestamp?e(`log_viewer.first_seen`,{first:We(t.firstTimestamp),last:We(t.timestamp)}):void 0,children:[`×`,t.count]})]},n))}),(0,Q.jsxs)(`div`,{className:`fixed bottom-6 right-6 flex flex-col items-end gap-2`,children:[$&&Ye&&(0,Q.jsx)(`div`,{className:`text-xs text-base-content/40 bg-base-200 rounded px-2 py-1 shadow`,children:e(`log_viewer.discord_max_chars`,{max:Ve,current:Je})}),(0,Q.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Q.jsx)(`button`,{onClick:Ze,disabled:!$||Ye,className:`btn btn-circle btn-sm shadow-lg hover:shadow-xl ${$&&!Ye?`bg-[#5865F2] hover:bg-[#4752C4] text-white border-none`:`bg-base-200`}`,title:Ye?e(`log_viewer.discord_max_chars`,{max:Ve,current:Je}):e(`log_viewer.share_discord`),children:(0,Q.jsx)(t,{})}),(0,Q.jsx)(`button`,{onClick:Xe,disabled:!$,className:`btn btn-circle btn-sm shadow-lg hover:shadow-xl ${$?`btn-primary`:`bg-base-200`}`,title:e(`log_viewer.copy_selected`),children:(0,Q.jsx)(d,{})}),(0,Q.jsx)(`button`,{onClick:ze,className:`btn btn-circle btn-sm bg-base-200 shadow-lg hover:shadow-xl`,title:e(y?`log_viewer.scroll_to_bottom`:`log_viewer.scroll_to_top`),children:y?(0,Q.jsx)(oe,{}):(0,Q.jsx)(C,{})})]})]}),(0,Q.jsx)(`div`,{id:`toast`,className:`toast toast-end hidden`,children:(0,Q.jsx)(`div`,{className:`alert alert-success`,children:(0,Q.jsx)(`span`,{id:`toast-text`,children:`Copied to clipboard!`})})})]})]})}var qe=[{value:`sensors`,label:`Sensors`},{value:`energy_meters`,label:`Energy Meters`},{value:`hvac`,label:`HVAC`},{value:`inverters`,label:`Inverters`},{value:`other`,label:`Other`}],Je=[`U_WORD`,`S_WORD`,`U_DWORD`,`S_DWORD`,`U_DWORD_R`,`S_DWORD_R`,`U_QWORD`,`S_QWORD`,`U_QWORD_R`,`FP32`,`FP32_R`],Ye=[``,`temperature`,`humidity`,`voltage`,`current`,`power`,`energy`,`frequency`,`distance`,`pressure`,`speed`],Xe=[`measurement`,`total`,`total_increasing`],Ze=[`holding`,`input`],Qe=[``,`°C`,`%`,`V`,`A`,`W`,`kW`,`VA`,`kVA`,`var`,`kvar`,`kWh`,`kvarh`,`Hz`,`mm`,`cm`,`m³/h`,`L`,`min`,`Ohm`,`°`],$e=()=>Math.random().toString(36).substring(2,9),et=`modbus_device_creator_draft`,tt=e=>{let t={modelName:e.model,registers:[]};e.set_base&&(e.set_base.set_address_address!==void 0&&(t.enableSetAddress=!0,t.setAddressAddress=e.set_base.set_address_address),e.set_base.set_baudrate&&(t.enableSetBaudrate=!0,t.baudrateAddress=e.set_base.set_baudrate.address,t.baudrateMappings=e.set_base.set_baudrate.possible_baudrates));for(let n of e.registers_base)for(let e of n.registers)t.registers.push({id:$e(),name:e.name,address:e.address,register_type:n.register_type,unit_of_measurement:e.unit_of_measurement,state_class:e.state_class,device_class:e.device_class||``,value_type:e.value_type,filters:e.filters||[]});return t},nt=e=>[`U_DWORD`,`S_DWORD`,`U_DWORD_R`,`S_DWORD_R`,`FP32`,`FP32_R`].includes(e)?2:[`U_QWORD`,`S_QWORD`,`U_QWORD_R`].includes(e)?4:1,rt=10,it=e=>{let t={};for(let n of e)t[n.register_type]||(t[n.register_type]=[]),t[n.register_type].push(n);let n=[];for(let[e,r]of Object.entries(t)){if(r.length===0)continue;let t=[...r].sort((e,t)=>e.address-t.address),i=[],a=[t[0]];for(let e=1;e<t.length;e++){let n=t[e-1],r=t[e],o=n.address+nt(n.value_type);r.address-o>rt?(i.push(a),a=[r]):a.push(r)}i.push(a);for(let t of i){let r=t[0].address,i=t[t.length-1],a=i.address-r+nt(i.value_type);n.push({base:r,length:a,register_type:e,registers:t.map(e=>{let t={name:e.name,address:e.address,unit_of_measurement:e.unit_of_measurement,state_class:e.state_class,value_type:e.value_type};return e.device_class&&(t.device_class=e.device_class),e.filters.length>0&&(t.filters=e.filters),t})})}}return n};function at({modelName:e,setModelName:t,fileName:n,setFileName:r,category:i,setCategory:a,testDeviceAddress:o,setTestDeviceAddress:s}){let{t:c}=H();return(0,Q.jsx)(`div`,{className:`stg-inset`,children:(0,Q.jsxs)(`div`,{className:`card-body`,children:[(0,Q.jsx)(`h3`,{className:`card-title text-lg`,children:c(`modbus_creator.device_info`)}),(0,Q.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-4`,children:[(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label`,children:(0,Q.jsxs)(`span`,{className:`label-text`,children:[c(`modbus_creator.model_name`),` *`]})}),(0,Q.jsx)(`input`,{type:`text`,className:`input input-bordered`,value:e,onChange:e=>t(e.target.value),placeholder:`SHT30 Temp and Humidity sensor`})]}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label`,children:(0,Q.jsx)(`span`,{className:`label-text`,children:c(`modbus_creator.file_name`)})}),(0,Q.jsx)(`input`,{type:`text`,className:`input input-bordered`,value:n,onChange:e=>r(e.target.value),placeholder:`sht30`})]}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label`,children:(0,Q.jsx)(`span`,{className:`label-text`,children:c(`modbus_creator.category`)})}),(0,Q.jsx)(`select`,{className:`select select-bordered`,value:i,onChange:e=>a(e.target.value),children:qe.map(e=>(0,Q.jsx)(`option`,{value:e.value,children:e.label},e.value))})]})]}),(0,Q.jsxs)(`div`,{className:`form-control mt-2`,children:[(0,Q.jsxs)(`label`,{className:`label`,children:[(0,Q.jsx)(`span`,{className:`label-text`,children:c(`modbus_creator.test_device_address`)}),(0,Q.jsx)(`span`,{className:`label-text-alt`,children:c(`modbus_creator.test_device_hint`)})]}),(0,Q.jsx)(q,{className:`w-32`,value:o,onChange:e=>s(e===``?1:e),min:1,max:247})]})]})})}function ot({enableSetAddress:e,setEnableSetAddress:t,setAddressAddress:n,setSetAddressAddress:i,enableSetBaudrate:a,setEnableSetBaudrate:o,baudrateAddress:s,setBaudrateAddress:c,baudrateMappings:l,setBaudrateMappings:u}){let{t:d}=H(),f=()=>{let e=prompt(`Enter baudrate (e.g., 9600):`),t=prompt(`Enter register value for this baudrate:`);e&&t&&u({...l,[e]:parseInt(t,10)})},p=e=>{let t={...l};delete t[e],u(t)};return(0,Q.jsx)(`div`,{className:`stg-inset`,children:(0,Q.jsxs)(`div`,{className:`card-body`,children:[(0,Q.jsx)(`h3`,{className:`card-title text-lg`,children:d(`modbus_creator.set_base_config`)}),(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-2`,children:[(0,Q.jsx)(`input`,{type:`checkbox`,className:`checkbox`,checked:e,onChange:e=>t(e.target.checked)}),(0,Q.jsx)(`span`,{className:`label-text`,children:d(`modbus_creator.enable_set_address`)})]}),e&&(0,Q.jsxs)(`div`,{className:`ml-8 mt-2`,children:[(0,Q.jsx)(`label`,{className:`label`,children:(0,Q.jsx)(`span`,{className:`label-text`,children:d(`modbus_creator.address_register`)})}),(0,Q.jsx)(q,{className:`input-sm w-32`,value:n,onChange:e=>i(e===``?0:e)})]})]}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-2`,children:[(0,Q.jsx)(`input`,{type:`checkbox`,className:`checkbox`,checked:a,onChange:e=>o(e.target.checked)}),(0,Q.jsx)(`span`,{className:`label-text`,children:d(`modbus_creator.enable_set_baudrate`)})]}),a&&(0,Q.jsxs)(`div`,{className:`ml-8 mt-2 space-y-2`,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`label`,{className:`label`,children:(0,Q.jsx)(`span`,{className:`label-text`,children:d(`modbus_creator.baudrate_register`)})}),(0,Q.jsx)(q,{className:`input-sm w-32`,value:s,onChange:e=>c(e===``?0:e)})]}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`label`,{className:`label`,children:(0,Q.jsx)(`span`,{className:`label-text`,children:d(`modbus_creator.baudrate_mappings`)})}),(0,Q.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[Object.entries(l).map(([e,t])=>(0,Q.jsxs)(`div`,{className:`badge badge-outline gap-1`,children:[e,`: `,t,(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs p-0`,onClick:()=>p(e),children:(0,Q.jsx)(O,{size:8})})]},e)),(0,Q.jsxs)(`button`,{className:`btn btn-outline btn-xs`,onClick:f,children:[(0,Q.jsx)(r,{size:10}),` Add`]})]})]})]})]})]})]})})}function st({register:e,testing:t,onUpdate:n,onRemove:i,onTest:a}){let{t:o}=H(),s=t=>{n({filters:e.filters.filter((e,n)=>n!==t)})};return(0,Q.jsx)(`div`,{className:`card bg-base-300`,children:(0,Q.jsxs)(`div`,{className:`card-body p-4`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Q.jsxs)(`div`,{className:`grid grid-cols-3 gap-2`,children:[(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label py-0`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:o(`modbus_creator.name`)})}),(0,Q.jsx)(`input`,{type:`text`,className:`input input-bordered input-sm w-full ${e.name?``:`input-error`}`,value:e.name,onChange:e=>n({name:e.target.value}),placeholder:`Temperature`})]}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label py-0`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:o(`modbus_creator.address`)})}),(0,Q.jsx)(q,{className:`input-sm`,value:e.address,onChange:e=>n({address:e===``?0:e})})]}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label py-0`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:o(`modbus_creator.register_type`)})}),(0,Q.jsx)(`select`,{className:`select select-bordered select-sm w-full`,value:e.register_type,onChange:e=>n({register_type:e.target.value}),children:Ze.map(e=>(0,Q.jsx)(`option`,{value:e,children:e},e))})]})]}),(0,Q.jsxs)(`div`,{className:`flex gap-2 items-end`,children:[(0,Q.jsxs)(`div`,{className:`grid grid-cols-4 gap-2 flex-1`,children:[(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label py-0`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:o(`modbus_creator.unit`)})}),(0,Q.jsxs)(`select`,{className:`select select-bordered select-sm w-full ${e.unit_of_measurement?``:`select-error`}`,value:Qe.includes(e.unit_of_measurement)?e.unit_of_measurement:`__custom__`,onChange:e=>{if(e.target.value===`__custom__`){let e=prompt(o(`modbus_creator.enter_custom_unit`));e!==null&&n({unit_of_measurement:e})}else n({unit_of_measurement:e.target.value})},children:[(0,Q.jsx)(`option`,{value:``,disabled:!0,children:o(`modbus_creator.select_unit`)}),Qe.filter(e=>e!==``).map(e=>(0,Q.jsx)(`option`,{value:e,children:e},e)),(0,Q.jsx)(`option`,{value:`__custom__`,children:e.unit_of_measurement&&!Qe.includes(e.unit_of_measurement)?e.unit_of_measurement:o(`modbus_creator.custom_unit`)})]})]}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label py-0`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:o(`modbus_creator.value_type`)})}),(0,Q.jsx)(`select`,{className:`select select-bordered select-sm w-full`,value:e.value_type,onChange:e=>n({value_type:e.target.value}),children:Je.map(e=>(0,Q.jsx)(`option`,{value:e,children:e},e))})]}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label py-0`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:o(`modbus_creator.device_class`)})}),(0,Q.jsx)(`select`,{className:`select select-bordered select-sm w-full`,value:e.device_class,onChange:e=>n({device_class:e.target.value}),children:Ye.map(e=>(0,Q.jsx)(`option`,{value:e,children:e||`(none)`},e))})]}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label py-0`,children:(0,Q.jsx)(`span`,{className:`label-text text-xs`,children:o(`modbus_creator.state_class`)})}),(0,Q.jsx)(`select`,{className:`select select-bordered select-sm w-full`,value:e.state_class,onChange:e=>n({state_class:e.target.value}),children:Xe.map(e=>(0,Q.jsx)(`option`,{value:e,children:e},e))})]})]}),(0,Q.jsxs)(`div`,{className:`flex gap-1`,children:[(0,Q.jsx)(`button`,{className:`btn btn-sm ${e.tested?`btn-success`:`btn-ghost`}`,onClick:a,disabled:t===e.id,title:o(`modbus_creator.test_register`),children:t===e.id?(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}):e.tested?(0,Q.jsx)(w,{}):(0,Q.jsx)(se,{})}),(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-sm text-error`,onClick:i,title:o(`modbus_creator.remove_register`),children:(0,Q.jsx)(ee,{})})]})]})]}),(e.testResult||e.testError)&&(0,Q.jsx)(`div`,{className:`text-xs mt-2 ${e.testError?`text-error`:`text-success`}`,children:e.testResult||e.testError}),(0,Q.jsx)(`div`,{className:`mt-2`,children:(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,Q.jsxs)(`span`,{className:`text-xs font-medium`,children:[o(`modbus_creator.filters`),`:`]}),e.filters.map((e,t)=>(0,Q.jsxs)(`div`,{className:`badge badge-outline gap-1`,children:[e.multiply!==void 0&&`×${e.multiply}`,e.offset!==void 0&&`+${e.offset}`,(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-xs p-0`,onClick:()=>s(t),children:(0,Q.jsx)(O,{size:8})})]},t)),(0,Q.jsxs)(`div`,{className:`dropdown dropdown-end`,children:[(0,Q.jsx)(`label`,{tabIndex:0,className:`btn btn-ghost btn-xs`,children:(0,Q.jsx)(r,{size:10})}),(0,Q.jsxs)(`ul`,{tabIndex:0,className:`dropdown-content z-10 menu p-2 shadow bg-base-100 rounded-box w-40`,children:[(0,Q.jsx)(`li`,{children:(0,Q.jsx)(`button`,{onClick:()=>{let t=prompt(`Multiply by:`);t&&n({filters:[...e.filters,{multiply:parseFloat(t)}]})},children:`Multiply`})}),(0,Q.jsx)(`li`,{children:(0,Q.jsx)(`button`,{onClick:()=>{let t=prompt(`Offset:`);t&&n({filters:[...e.filters,{offset:parseFloat(t)}]})},children:`Offset`})})]})]})]})})]})})}function ct({registers:e,testing:t,onAddRegister:n,onUpdateRegister:i,onRemoveRegister:a,onTestRegister:o}){let{t:s}=H();return(0,Q.jsx)(`div`,{className:`stg-inset`,children:(0,Q.jsxs)(`div`,{className:`card-body`,children:[(0,Q.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`h3`,{className:`card-title text-lg`,children:s(`modbus_creator.registers`)}),e.length>0&&(0,Q.jsxs)(`div`,{className:`text-sm text-base-content/70 mt-1`,children:[s(`modbus_creator.calculated`),`: `,it(e).map(e=>`${e.register_type}: base=${e.base}, length=${e.length}`).join(` | `)]})]}),(0,Q.jsxs)(`button`,{className:`btn btn-primary btn-sm`,onClick:n,children:[(0,Q.jsx)(r,{className:`mr-1`}),` `,s(`modbus_creator.add_register`)]})]}),e.length===0?(0,Q.jsx)(`div`,{className:`text-base-content/50 text-center py-8`,children:s(`modbus_creator.no_registers`)}):(0,Q.jsx)(`div`,{className:`space-y-3 mt-4`,children:e.map(e=>(0,Q.jsx)(st,{register:e,testing:t,onUpdate:t=>i(e.id,t),onRemove:()=>a(e.id),onTest:()=>o(e)},e.id))})]})})}function lt({showPreview:e,setShowPreview:t,copied:n,isValid:r,generateJSON:i,onCopyJSON:a,onDownloadJSON:o}){let{t:s}=H();return(0,Q.jsx)(`div`,{className:`stg-inset`,children:(0,Q.jsxs)(`div`,{className:`card-body`,children:[(0,Q.jsxs)(`div`,{className:`flex flex-wrap gap-2 justify-between items-center`,children:[(0,Q.jsx)(`div`,{className:`flex gap-2`,children:(0,Q.jsx)(`button`,{className:`btn btn-outline`,onClick:()=>t(!e),children:s(e?`modbus_creator.hide_preview`:`modbus_creator.show_preview`)})}),(0,Q.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Q.jsxs)(`button`,{className:`btn btn-outline`,onClick:a,disabled:!r,children:[n?(0,Q.jsx)(w,{className:`mr-1`}):(0,Q.jsx)(d,{className:`mr-1`}),s(n?`modbus_creator.copied`:`modbus_creator.copy_json`)]}),(0,Q.jsxs)(`button`,{className:`btn btn-primary`,onClick:o,disabled:!r,children:[(0,Q.jsx)(u,{className:`mr-1`}),` `,s(`modbus_creator.download_json`)]})]})]}),e&&(0,Q.jsx)(`div`,{className:`mt-4`,children:(0,Q.jsx)(`pre`,{className:`bg-base-300 p-4 rounded-lg overflow-auto max-h-96 text-sm`,children:JSON.stringify(i(),null,2)})})]})})}function ut(){let{t:e}=H(),t=(0,J.useRef)(null),[n,r]=(0,J.useState)(``),[i,a]=(0,J.useState)(``),[o,s]=(0,J.useState)(`sensors`),[c,l]=(0,J.useState)(1),[u,d]=(0,J.useState)(!1),[f,p]=(0,J.useState)(256),[m,h]=(0,J.useState)(!1),[g,_]=(0,J.useState)(257),[v,y]=(0,J.useState)({9600:9600,19200:19200}),[x,S]=(0,J.useState)([]),[te,ne]=(0,J.useState)(!1),[C,w]=(0,J.useState)(!1),[re,T]=(0,J.useState)(null),[ae,E]=(0,J.useState)(!1);(0,J.useEffect)(()=>{let e=localStorage.getItem(et);if(e)try{let t=JSON.parse(e);t.registers&&t.registers.length>0&&E(!0)}catch{}},[]);let D=(0,J.useRef)(!0);(0,J.useEffect)(()=>{if(D.current){D.current=!1;return}let e={modelName:n,fileName:i,category:o,enableSetAddress:u,setAddressAddress:f,enableSetBaudrate:m,baudrateAddress:g,baudrateMappings:v,registers:x};localStorage.setItem(et,JSON.stringify(e))},[n,i,o,u,f,m,g,v,x]);let oe=e=>{e.modelName!==void 0&&r(e.modelName),e.fileName!==void 0&&a(e.fileName),e.category!==void 0&&s(e.category),e.enableSetAddress!==void 0&&d(e.enableSetAddress),e.setAddressAddress!==void 0&&p(e.setAddressAddress),e.enableSetBaudrate!==void 0&&h(e.enableSetBaudrate),e.baudrateAddress!==void 0&&_(e.baudrateAddress),e.baudrateMappings!==void 0&&y(e.baudrateMappings),e.registers!==void 0&&S(e.registers),E(!1)},O=()=>{let e=localStorage.getItem(et);if(e)try{let t=JSON.parse(e);oe(t)}catch{}},k=()=>{localStorage.removeItem(et),E(!1),r(``),a(``),s(`sensors`),d(!1),p(256),h(!1),_(257),y({9600:9600,19200:19200}),S([])},A=t=>{let n=t.target.files?.[0];if(!n)return;let r=new FileReader;r.onload=t=>{try{let e=t.target?.result,r=tt(JSON.parse(e));oe(r);let i=n.name.replace(/\.json$/,``);a(i)}catch{alert(e(`modbus_creator.invalid_json_file`))}},r.readAsText(n),t.target.value=``},se=()=>{if(!n||x.length===0)return!1;for(let e of x)if(!e.name||!e.unit_of_measurement)return!1;return!0},ce=()=>{let e=x.length>0?Math.max(...x.map(e=>e.address))+1:0;S([...x,{id:$e(),name:``,address:e,register_type:`holding`,unit_of_measurement:``,state_class:`measurement`,device_class:``,value_type:`S_WORD`,filters:[]}])},j=e=>{S(x.filter(t=>t.id!==e))},M=(e,t)=>{S(x.map(n=>n.id===e?{...n,...t}:n))},N=async e=>{T(e.id);try{let{data:t}=await P.post(`/api/modbus/get`,{address:c,register_address:e.address,register_type:e.register_type,value_type:e.value_type});if(t.success){let n=t.value;for(let t of e.filters)t.multiply&&(n*=t.multiply),t.offset&&(n+=t.offset);M(e.id,{tested:!0,testResult:`Raw: ${t.value}, Filtered: ${n.toFixed(2)}`,testError:void 0})}else M(e.id,{tested:!1,testResult:void 0,testError:t.error||`No response`})}catch(t){M(e.id,{tested:!1,testResult:void 0,testError:String(t)})}finally{T(null)}},le=()=>{let e={model:n,registers_base:it(x)};return(u||m)&&(e.set_base={},u&&(e.set_base.set_address_address=f),m&&(e.set_base.set_baudrate={address:g,possible_baudrates:v})),e};return(0,Q.jsxs)(`div`,{className:`space-y-6`,children:[ae&&x.length===0&&(0,Q.jsxs)(`div`,{className:`alert alert-info`,children:[(0,Q.jsx)(`span`,{children:e(`modbus_creator.draft_found`)}),(0,Q.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Q.jsxs)(`button`,{className:`btn btn-sm btn-primary`,onClick:O,children:[(0,Q.jsx)(ie,{className:`mr-1`}),` `,e(`modbus_creator.restore_draft`)]}),(0,Q.jsxs)(`button`,{className:`btn btn-sm btn-ghost`,onClick:k,children:[(0,Q.jsx)(ee,{className:`mr-1`}),` `,e(`modbus_creator.discard_draft`)]})]})]}),(0,Q.jsxs)(`div`,{className:`flex gap-2 justify-end`,children:[(0,Q.jsx)(`input`,{ref:t,type:`file`,accept:`.json`,onChange:A,className:`hidden`}),(0,Q.jsxs)(`button`,{className:`btn btn-outline btn-sm`,onClick:()=>t.current?.click(),children:[(0,Q.jsx)(b,{className:`mr-1`}),` `,e(`modbus_creator.load_json`)]}),x.length>0&&(0,Q.jsxs)(`button`,{className:`btn btn-outline btn-sm btn-error`,onClick:k,children:[(0,Q.jsx)(ee,{className:`mr-1`}),` `,e(`modbus_creator.clear_all`)]})]}),(0,Q.jsx)(at,{modelName:n,setModelName:r,fileName:i,setFileName:a,category:o,setCategory:s,testDeviceAddress:c,setTestDeviceAddress:l}),(0,Q.jsx)(ot,{enableSetAddress:u,setEnableSetAddress:d,setAddressAddress:f,setSetAddressAddress:p,enableSetBaudrate:m,setEnableSetBaudrate:h,baudrateAddress:g,setBaudrateAddress:_,baudrateMappings:v,setBaudrateMappings:y}),(0,Q.jsx)(ct,{registers:x,testing:re,onAddRegister:ce,onUpdateRegister:M,onRemoveRegister:j,onTestRegister:N}),(0,Q.jsx)(lt,{showPreview:te,setShowPreview:ne,copied:C,isValid:se(),generateJSON:le,onCopyJSON:async()=>{let e=JSON.stringify(le(),null,2);await Oe(e),w(!0),setTimeout(()=>w(!1),2e3)},onDownloadJSON:()=>{let e=JSON.stringify(le(),null,2),t=new Blob([e],{type:`application/json`}),r=URL.createObjectURL(t),a=document.createElement(`a`);a.href=r,a.download=`${i||n.toLowerCase().replace(/\s+/g,`-`)}.json`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(r)}})]})}function dt(){let{t:e}=H(),[t,i]=(0,J.useState)(`get`),[s,c]=(0,J.useState)(!1),[l,u]=(0,J.useState)(null),[f,p]=(0,J.useState)(null),[g,_]=(0,J.useState)(!1),[v,y]=(0,J.useState)(1),[b,x]=(0,J.useState)(0),[S,te]=(0,J.useState)(`holding`),[C,ie]=(0,J.useState)(`S_WORD`),[T,oe]=(0,J.useState)(`fc06`),[O,A]=(0,J.useState)(0),[j,M]=(0,J.useState)(``),[N,le]=(0,J.useState)(``),[ue,de]=(0,J.useState)(0),[fe,pe]=(0,J.useState)(`input`),[me,he]=(0,J.useState)(1),[ge,_e]=(0,J.useState)(247),[ve,be]=(0,J.useState)(.3),[B,Se]=(0,J.useState)(`boneio-edge-temp`),[Ce,we]=(0,J.useState)(`uart4`),[Ee,U]=(0,J.useState)(1),[Oe,ke]=(0,J.useState)(9600),[Y,X]=(0,J.useState)(`address`),[Ae,Z]=(0,J.useState)(``),[je,Me]=(0,J.useState)(9600),[Ne,Pe]=(0,J.useState)(!1),[Fe,Ie]=(0,J.useState)(!1),[Le,Re]=(0,J.useState)([]),[ze,Be]=(0,J.useState)(`wanas415`),[Ve,He]=(0,J.useState)(1),[Ue,We]=(0,J.useState)(null),[Ge,Ke]=(0,J.useState)(``),[$,qe]=(0,J.useState)(!1),Je=async()=>{try{let{data:e}=await P.get(`/api/dev/fake-devices`);Array.isArray(e)?(Re(e),Ie(!0)):(Re([]),Ie(!1))}catch{Re([]),Ie(!1)}};(0,J.useEffect)(()=>{P.get(`/api/modbus/config`).then(e=>p(e.data)).catch(e=>console.error(`Failed to load modbus config:`,e)),Je()},[]),(0,J.useEffect)(()=>{let e=!1;return(async()=>{try{let{data:t}=await P.post(`/api/modbus/pause`);!e&&t.success&&_(!0)}catch(e){console.error(`Failed to pause Modbus polling:`,e)}})(),()=>{e=!0,P.post(`/api/modbus/resume`).catch(()=>{}),_(!1)}},[]);let Ye=async()=>{c(!0),u(null);try{let{data:e}=await P.post(`/api/modbus/get`,{address:v,register_address:b,register_type:S,value_type:C});u(e)}catch(e){u({success:!1,error:String(e)})}finally{c(!1)}},Xe=async()=>{if(j===``){u({success:!1,error:`Value is required`});return}c(!0),u(null);try{let{data:e}=await P.post(`/api/modbus/set`,{address:v,register_address:O,value:j});u(e)}catch(e){u({success:!1,error:String(e)})}finally{c(!1)}},Ze=e=>{let t=e.trim();if(!t)return null;let n=t.split(`,`).map(e=>e.trim()).filter(e=>e!==``),r=[];for(let e of n){let t=parseInt(e,10);if(isNaN(t)||t<0||t>65535)return null;r.push(t)}return r.length>0?r:null},Qe=async()=>{let t=Ze(N);if(!t){u({success:!1,error:e(`modbus_helper.fc16_invalid_values`)});return}c(!0),u(null);try{let{data:e}=await P.post(`/api/modbus/set_multiple`,{address:v,register_address:O,values:t});u(e)}catch(e){u({success:!1,error:String(e)})}finally{c(!1)}},$e=async()=>{c(!0),u(null);let e=new URLSearchParams({start_address:me.toString(),end_address:ge.toString(),register_address:ue.toString(),register_type:fe,timeout:ve.toString()}),t=localStorage.getItem(`token`);t&&e.set(`token`,t);try{let t=new EventSource(`/api/modbus/search/stream?${e}`);t.onmessage=e=>{let n=JSON.parse(e.data);switch(n.type){case`start`:u({success:!0,devices:[],count:0,scanned:0,total:n.total});break;case`progress`:u(e=>e&&{...e,scanned:n.scanned,total:n.total});break;case`found`:u({success:!0,devices:[...n.devices],count:n.devices.length,scanned:n.scanned,total:n.total});break;case`complete`:u({success:!0,devices:n.devices,count:n.count,scanned:n.scanned,total:n.total,cancelled:!1}),t.close(),c(!1);break;case`cancelled`:u({success:!0,devices:n.devices,count:n.devices.length,scanned:n.scanned,total:n.total,cancelled:!0}),t.close(),c(!1);break;case`error`:u({success:!1,error:n.error}),t.close(),c(!1)}},t.onerror=()=>{t.close(),c(!1)}}catch(e){u({success:!1,error:String(e)}),c(!1)}},et=async()=>{try{await P.post(`/api/modbus/search/cancel`)}catch(e){console.error(`Failed to cancel search:`,e)}},tt=async()=>{c(!0),u(null);try{let e=Ne?0:Ee,{data:t}=await P.post(`/api/modbus/configure-device`,{device:B,uart:Ce,current_address:e,current_baudrate:Oe,new_address:Y===`address`&&!Ne&&Ae||null,new_baudrate:Y===`baudrate`&&je||null});u(t)}catch(e){u({success:!1,error:String(e)})}finally{c(!1)}},nt=async()=>{c(!0),u(null);try{await P.post(`/api/dev/fake-device/${ze}?address=${Ve}`),await Je(),u({success:!0,message:`Created simulated device ${Ve}_${ze} in HA`})}catch(e){u({success:!1,error:e.response?.data?.error||String(e)})}finally{c(!1)}},rt=async e=>{let t=e.match(/^(\d+)_(.+)$/);if(!t)return;let n=Number(t[1]),r=t[2];c(!0),u(null);try{await P.post(`/api/dev/fake-device/${r}/update?address=${n}`),await Je(),u({success:!0,message:`Sent updated simulated data for ${e}`})}catch(e){u({success:!1,error:e.response?.data?.error||String(e)})}finally{c(!1)}},it=async e=>{let t=e.match(/^(\d+)_(.+)$/);if(!t)return;let n=Number(t[1]),r=t[2];c(!0),u(null);try{await P.delete(`/api/dev/fake-device/${r}?address=${n}`),await Je(),u({success:!0,message:`Removed simulated device ${e} from HA`})}catch(e){u({success:!1,error:e.response?.data?.error||String(e)})}finally{c(!1)}},at=async(e,t=`standard`)=>{let n=e.match(/^(\d+)_(.+)$/);if(!n)return;let r=Number(n[1]),i=n[2];c(!0),u(null);try{let{data:e}=await P.get(`/api/dev/fake-device/${i}/dashboard?address=${r}&style=${t}`);e.error?u({success:!1,error:e.error}):(We(e.yaml),Ke(e.model||i),qe(!1))}catch(e){u({success:!1,error:e.response?.data?.error||String(e)})}finally{c(!1)}},ot=async()=>{if(Ue)try{await navigator.clipboard.writeText(Ue),qe(!0),setTimeout(()=>qe(!1),2e3)}catch{let e=document.getElementById(`dashboard-yaml-textarea`);e&&(e.select(),document.execCommand(`copy`),qe(!0),setTimeout(()=>qe(!1),2e3))}};if(f&&!f.configured)return(0,Q.jsx)(De,{children:(0,Q.jsx)(V,{variant:`warning`,message:e(`modbus_helper.not_configured`)})});let st=(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(F,{value:`2400`,children:`2400`}),(0,Q.jsx)(F,{value:`4800`,children:`4800`}),(0,Q.jsx)(F,{value:`9600`,children:`9600`}),(0,Q.jsx)(F,{value:`19200`,children:`19200`})]}),ct=(0,Q.jsx)(W,{label:e(`modbus_helper.address`),children:(0,Q.jsx)(q,{value:v,onChange:e=>y(e===``?1:e),min:1,max:247})}),lt=[{id:`get`,label:e(`modbus_helper.get`),icon:(0,Q.jsx)(k,{})},{id:`set`,label:e(`modbus_helper.set`),icon:(0,Q.jsx)(h,{})},{id:`search`,label:e(`modbus_helper.search`),icon:(0,Q.jsx)(m,{})},{id:`configure`,label:e(`modbus_helper.configure`),icon:(0,Q.jsx)(a,{})},{id:`creator`,label:e(`modbus_helper.creator`),icon:(0,Q.jsx)(ae,{})},...Fe?[{id:`simulator`,label:e(`modbus_helper.simulator`),icon:(0,Q.jsx)(E,{})}]:[]];return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(De,{children:[g&&(0,Q.jsx)(V,{variant:`info`,icon:(0,Q.jsx)(ce,{}),message:e(`tools.modbus_paused`)}),(0,Q.jsx)(`div`,{role:`tablist`,className:`stg-card flex gap-1 overflow-x-auto no-scrollbar p-1.5`,children:lt.map(e=>{let n=t===e.id;return(0,Q.jsxs)(`button`,{type:`button`,role:`tab`,"aria-selected":n,onClick:()=>i(e.id),className:xe(`flex flex-1 items-center justify-center gap-2 whitespace-nowrap rounded-lg px-3 py-2 text-[13px] font-medium transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30`,n?`bg-primary/10 text-primary`:`text-base-content/55 hover:bg-base-content/5 hover:text-base-content/85`),children:[(0,Q.jsx)(`span`,{className:`text-[12px]`,children:e.icon}),e.label]},e.id)})}),t===`get`&&(0,Q.jsx)(K,{icon:(0,Q.jsx)(k,{}),title:e(`modbus_helper.read_register`),description:e(`modbus_helper.read_register_desc`),footer:(0,Q.jsx)(G,{className:`w-full`,children:(0,Q.jsxs)(`button`,{className:`btn btn-primary btn-sm`,onClick:Ye,disabled:s,children:[s?(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}):(0,Q.jsx)(se,{}),e(`modbus_helper.read`)]})}),children:(0,Q.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4`,children:[ct,(0,Q.jsx)(W,{label:e(`modbus_helper.register_address`),children:(0,Q.jsx)(q,{value:b,onChange:e=>x(e===``?0:e),min:0})}),(0,Q.jsx)(W,{label:e(`modbus_helper.register_type`),children:(0,Q.jsxs)(z,{value:S,onValueChange:te,children:[(0,Q.jsx)(L,{className:`w-full`,children:(0,Q.jsx)(R,{})}),(0,Q.jsx)(I,{children:f?.register_types.map(e=>(0,Q.jsx)(F,{value:e,children:e},e))})]})}),(0,Q.jsx)(W,{label:e(`modbus_helper.value_type`),children:(0,Q.jsxs)(z,{value:C,onValueChange:ie,children:[(0,Q.jsx)(L,{className:`w-full`,children:(0,Q.jsx)(R,{})}),(0,Q.jsx)(I,{children:f?.value_types.map(e=>(0,Q.jsx)(F,{value:e,children:e},e))})]})})]})}),t===`set`&&(0,Q.jsxs)(K,{icon:(0,Q.jsx)(h,{}),title:e(`modbus_helper.write_register`),description:e(`modbus_helper.write_register_desc`),action:(0,Q.jsx)(`div`,{className:`flex gap-1 rounded-lg bg-base-content/5 p-1`,children:[`fc06`,`fc16`].map(t=>(0,Q.jsx)(`button`,{type:`button`,className:xe(`rounded-md px-2.5 py-1 text-xs font-medium transition-colors whitespace-nowrap`,T===t?`bg-base-100 text-base-content shadow-sm`:`text-base-content/55 hover:text-base-content/85`),onClick:()=>oe(t),children:t===`fc06`?`FC06 – ${e(`modbus_helper.fc06_single`)}`:`FC16 – ${e(`modbus_helper.fc16_multiple`)}`},t))}),footer:(0,Q.jsx)(G,{className:`w-full`,children:T===`fc06`?(0,Q.jsxs)(`button`,{className:`btn btn-warning btn-sm`,onClick:Xe,disabled:s||j===``,children:[s?(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}):(0,Q.jsx)(h,{}),e(`modbus_helper.write`)]}):(0,Q.jsxs)(`button`,{className:`btn btn-warning btn-sm`,onClick:Qe,disabled:s||!Ze(N),children:[s?(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}):(0,Q.jsx)(h,{}),e(`modbus_helper.fc16_write_button`)]})}),children:[T===`fc06`&&(0,Q.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-4`,children:[ct,(0,Q.jsx)(W,{label:e(`modbus_helper.register_address`),children:(0,Q.jsx)(q,{value:O,onChange:e=>A(e===``?0:e),min:0})}),(0,Q.jsx)(W,{label:e(`modbus_helper.custom_value`),children:(0,Q.jsx)(q,{value:j,onChange:e=>M(e),decimal:!0,placeholder:e(`modbus_helper.fc06_value_placeholder`)})})]}),T===`fc16`&&(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsx)(`p`,{className:`text-[13px] text-base-content/60 leading-relaxed`,children:e(`modbus_helper.fc16_hint`)}),(0,Q.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-3 gap-4`,children:[ct,(0,Q.jsx)(W,{label:e(`modbus_helper.fc16_start_register`),className:`md:col-span-2`,children:(0,Q.jsx)(q,{value:O,onChange:e=>A(e===``?0:e),min:0})})]}),(0,Q.jsx)(W,{label:e(`modbus_helper.fc16_values`),error:N&&!Ze(N)?e(`modbus_helper.fc16_invalid_values`):void 0,help:N&&Ze(N)?`${e(`modbus_helper.fc16_registers_count`)}: ${Ze(N).length}`:e(`modbus_helper.fc16_values_hint`),children:(0,Q.jsx)(`input`,{type:`text`,className:`input input-bordered w-full`,value:N,onChange:e=>le(e.target.value),placeholder:e(`modbus_helper.fc16_values_placeholder`)})})]})]}),t===`search`&&(0,Q.jsxs)(K,{icon:(0,Q.jsx)(m,{}),title:e(`modbus_helper.search_devices`),description:e(`modbus_helper.search_hint`),footer:(0,Q.jsx)(G,{className:`w-full`,hint:e(`modbus_helper.search_time_warning`),children:s?(0,Q.jsxs)(`button`,{className:`btn btn-error btn-sm`,onClick:et,children:[(0,Q.jsx)(o,{}),` `,e(`modbus_helper.stop`)]}):(0,Q.jsxs)(`button`,{className:`btn btn-primary btn-sm`,onClick:$e,children:[(0,Q.jsx)(m,{}),` `,e(`modbus_helper.search`)]})}),children:[(0,Q.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-5 gap-4`,children:[(0,Q.jsx)(W,{label:e(`modbus_helper.start_address`),children:(0,Q.jsx)(q,{value:me,onChange:e=>he(e===``?1:e),min:1,max:247})}),(0,Q.jsx)(W,{label:e(`modbus_helper.end_address`),children:(0,Q.jsx)(q,{value:ge,onChange:e=>_e(e===``?247:e),min:1,max:247})}),(0,Q.jsx)(W,{label:e(`modbus_helper.register_address`),children:(0,Q.jsx)(q,{value:ue,onChange:e=>de(e===``?0:e),min:0})}),(0,Q.jsx)(W,{label:e(`modbus_helper.register_type`),children:(0,Q.jsxs)(z,{value:fe,onValueChange:pe,children:[(0,Q.jsx)(L,{className:`w-full`,children:(0,Q.jsx)(R,{})}),(0,Q.jsx)(I,{children:f?.register_types.map(e=>(0,Q.jsx)(F,{value:e,children:e},e))})]})}),(0,Q.jsx)(W,{label:e(`modbus_helper.timeout`),children:(0,Q.jsxs)(z,{value:String(ve),onValueChange:e=>be(parseFloat(e)),children:[(0,Q.jsx)(L,{className:`w-full`,children:(0,Q.jsx)(R,{})}),(0,Q.jsxs)(I,{children:[(0,Q.jsx)(F,{value:`0.2`,children:`0.2s`}),(0,Q.jsx)(F,{value:`0.3`,children:`0.3s`}),(0,Q.jsx)(F,{value:`0.5`,children:`0.5s`}),(0,Q.jsx)(F,{value:`1`,children:`1.0s`})]})]})})]}),s&&l?.total?(0,Q.jsxs)(`div`,{className:`stg-inset mt-4 p-4`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center justify-between mb-2 text-[13px]`,children:[(0,Q.jsxs)(`span`,{className:`font-medium`,children:[e(`modbus_helper.scanning`),`…`]}),(0,Q.jsxs)(`span`,{className:`font-mono text-base-content/60`,children:[l.scanned,`/`,l.total]})]}),(0,Q.jsx)(`progress`,{className:`progress progress-primary w-full`,value:l.scanned||0,max:l.total}),l.devices&&l.devices.length>0&&(0,Q.jsx)(`div`,{className:`flex flex-wrap gap-2 mt-3`,children:l.devices.map((t,n)=>(0,Q.jsxs)(`span`,{className:`badge badge-primary animate-pulse`,children:[e(`modbus_helper.address`),`: `,t]},n))})]}):null]}),l&&!s&&(0,Q.jsx)(K,{variant:l.success?`default`:`danger`,icon:l.success?(0,Q.jsx)(ne,{className:`text-success`}):(0,Q.jsx)(re,{}),title:e(`modbus_helper.result`),children:(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[l.value!==void 0&&(0,Q.jsxs)(`div`,{className:`stg-inset px-4 py-3`,children:[(0,Q.jsx)(`div`,{className:`text-xs font-medium text-base-content/55`,children:e(`modbus_helper.value`)}),(0,Q.jsx)(`div`,{className:`text-3xl font-semibold tracking-tight text-primary mt-0.5`,children:l.value}),l.raw_registers&&(0,Q.jsxs)(`div`,{className:`text-xs font-mono text-base-content/50 mt-1`,children:[`Raw: [`,l.raw_registers.join(`, `),`]`]})]}),l.message&&(0,Q.jsx)(`p`,{className:`text-sm text-base-content`,children:l.message}),l.message_key&&(0,Q.jsx)(`p`,{className:`text-sm text-base-content`,children:e(`modbus_helper.${l.message_key}`)}),l.error&&(0,Q.jsx)(`p`,{className:`text-sm text-error`,children:l.error}),l.error_key&&(0,Q.jsxs)(`p`,{className:`text-sm text-error`,children:[e(`modbus_helper.${l.error_key}`),l.error_params?.supported&&` ${l.error_params.supported}`]}),l.cancelled&&(0,Q.jsx)(V,{variant:`warning`,message:`${e(`modbus_helper.search_cancelled`)} (${l.scanned}/${l.total})`}),l.devices&&l.devices.length>0&&(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`p`,{className:`text-sm font-medium mb-2`,children:[e(`modbus_helper.found_devices`),`: `,l.count,l.scanned!==void 0&&l.total!==void 0&&(0,Q.jsxs)(`span`,{className:`text-base-content/60 font-normal ml-2`,children:[`(`,l.scanned,`/`,l.total,` `,e(`modbus_helper.scanned`),`)`]})]}),(0,Q.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:l.devices.map(t=>(0,Q.jsxs)(`span`,{className:`badge badge-primary`,children:[e(`modbus_helper.address`),`: `,t]},t))})]}),l.devices&&l.devices.length===0&&l.success&&!l.cancelled&&(0,Q.jsx)(`p`,{className:`text-sm text-base-content/60`,children:e(`modbus_helper.no_devices_found`)})]})}),t===`configure`&&(0,Q.jsx)(K,{icon:(0,Q.jsx)(a,{}),title:e(`modbus_helper.configure_device`),description:e(`modbus_helper.configure_desc`),footer:(0,Q.jsx)(G,{className:`w-full`,children:(0,Q.jsxs)(`button`,{className:`btn btn-primary btn-sm`,onClick:tt,disabled:s||Y===`address`&&!Ae||Y===`baudrate`&&!je,children:[s?(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}):(0,Q.jsx)(a,{}),e(Y===`address`?`modbus_helper.set_new_address`:`modbus_helper.set_new_baudrate`)]})}),children:(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsx)(V,{variant:`warning`,message:e(`modbus_helper.configure_warning`)}),(0,Q.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[(0,Q.jsx)(W,{label:e(`modbus_helper.device_model`),children:(0,Q.jsxs)(z,{value:B,onValueChange:e=>{Se(e),Pe(!1),e===`dyp-a12-ultrasonic`?(X(`address`),ke(9600)):e===`boneio-edge-temp`&&ke(9600)},children:[(0,Q.jsx)(L,{className:`w-full`,children:(0,Q.jsx)(R,{})}),(0,Q.jsxs)(I,{children:[(0,Q.jsx)(F,{value:`boneio-edge-temp`,children:`boneIO Edge Sensor (Temp & Humidity)`}),(0,Q.jsx)(F,{value:`cwt`,children:`CWT (Temp & Humidity)`}),(0,Q.jsx)(F,{value:`sht30`,children:`SHT30 (Temp & Humidity)`}),(0,Q.jsx)(F,{value:`dyp-a12-ultrasonic`,children:`DYP-A12 (Ultrasonic Distance)`})]})]})}),(0,Q.jsx)(W,{label:e(`modbus_helper.uart`),children:(0,Q.jsxs)(z,{value:Ce,onValueChange:we,children:[(0,Q.jsx)(L,{className:`w-full`,children:(0,Q.jsx)(R,{})}),(0,Q.jsxs)(I,{children:[(0,Q.jsx)(F,{value:`uart1`,children:`UART1`}),(0,Q.jsx)(F,{value:`uart2`,children:`UART2`}),(0,Q.jsx)(F,{value:`uart4`,children:`UART4`}),(0,Q.jsx)(F,{value:`uart5`,children:`UART5`})]})]})})]}),B===`boneio-edge-temp`&&(0,Q.jsxs)(`div`,{className:`space-y-2`,children:[(0,Q.jsx)(Te,{checked:Ne,tone:`warning`,label:e(`modbus_helper.broadcast_mode`)||`Broadcast Mode (address 0)`,onChange:e=>{Pe(e),e?(X(`baudrate`),U(0)):U(1)}}),Ne&&(0,Q.jsx)(V,{variant:`error`,message:e(`modbus_helper.broadcast_warning`)||`Broadcast mode will change settings on ALL devices connected to this UART bus!`})]}),(0,Q.jsx)(W,{label:e(`modbus_helper.select_operation`),children:(0,Q.jsxs)(`div`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[!Ne&&(0,Q.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer text-sm`,children:[(0,Q.jsx)(`input`,{type:`radio`,name:`operation`,className:`radio radio-primary radio-sm`,checked:Y===`address`,onChange:()=>X(`address`)}),e(`modbus_helper.change_address`)]}),B!==`dyp-a12-ultrasonic`&&(0,Q.jsxs)(`label`,{className:`flex items-center gap-2 cursor-pointer text-sm`,children:[(0,Q.jsx)(`input`,{type:`radio`,name:`operation`,className:`radio radio-primary radio-sm`,checked:Y===`baudrate`,onChange:()=>X(`baudrate`)}),e(`modbus_helper.change_baudrate`)]})]})}),(0,Q.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[(0,Q.jsx)(W,{label:e(`modbus_helper.current_address`),children:(0,Q.jsx)(q,{value:Ee,onChange:e=>U(e===``?1:e),min:1,max:247})}),(0,Q.jsx)(W,{label:e(`modbus_helper.current_baudrate`),children:Y===`address`&&B===`dyp-a12-ultrasonic`?(0,Q.jsx)(`input`,{type:`text`,className:`input input-bordered w-full`,value:`9600`,disabled:!0}):(0,Q.jsxs)(z,{value:String(Oe),onValueChange:e=>ke(Number(e)),children:[(0,Q.jsx)(L,{className:`w-full`,children:(0,Q.jsx)(R,{})}),(0,Q.jsx)(I,{children:st})]})}),Y===`address`&&(0,Q.jsx)(W,{label:e(`modbus_helper.new_address`),required:!0,className:`md:col-span-2`,children:(0,Q.jsx)(q,{value:Ae,onChange:e=>Z(e),min:1,max:247,placeholder:e(`modbus_helper.new_address_placeholder`)})}),Y===`baudrate`&&(0,Q.jsx)(W,{label:e(`modbus_helper.new_baudrate`),required:!0,className:`md:col-span-2`,children:(0,Q.jsxs)(z,{value:je?String(je):void 0,onValueChange:e=>Me(e?Number(e):``),children:[(0,Q.jsx)(L,{className:`w-full`,children:(0,Q.jsx)(R,{placeholder:e(`modbus_helper.new_baudrate_placeholder`)})}),(0,Q.jsx)(I,{children:st})]})})]}),(0,Q.jsx)(V,{variant:`neutral`,title:e(`modbus_helper.configure_important`),message:(0,Q.jsxs)(`ol`,{className:`list-decimal pl-4 space-y-0.5`,children:[(0,Q.jsx)(`li`,{children:e(`modbus_helper.configure_step1`)}),(0,Q.jsx)(`li`,{children:e(`modbus_helper.configure_step2`)})]})})]})}),t===`creator`&&(0,Q.jsx)(K,{icon:(0,Q.jsx)(ae,{}),title:e(`modbus_helper.device_creator`),description:e(`modbus_helper.creator_desc`),children:(0,Q.jsx)(ut,{})}),t===`simulator`&&Fe&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(K,{icon:(0,Q.jsx)(E,{}),title:e(`modbus_helper.simulator_title`),description:e(`modbus_helper.simulator_hint`),children:(0,Q.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-[1fr_6rem_auto] gap-4 items-end`,children:[(0,Q.jsx)(W,{label:e(`modbus_wizard.step2_title`),children:(0,Q.jsxs)(z,{value:ze,onValueChange:Be,children:[(0,Q.jsx)(L,{className:`w-full`,children:(0,Q.jsx)(R,{})}),(0,Q.jsx)(I,{children:Object.values(ye).map(e=>(0,Q.jsxs)(F,{value:e.modelKey,children:[e.displayName,` (`,e.manufacturer,`)`]},e.modelKey))})]})}),(0,Q.jsx)(W,{label:e(`modbus_wizard.address`),children:(0,Q.jsx)(q,{value:Ve,onChange:e=>He(e===``?1:e),min:1,max:247})}),(0,Q.jsxs)(`button`,{className:`btn btn-primary w-full md:w-auto whitespace-nowrap`,onClick:nt,disabled:s,children:[s?(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}):(0,Q.jsx)(r,{}),e(`modbus_helper.simulator_create`)]})]})}),Array.isArray(Le)&&Le.length>0&&(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[(0,Q.jsxs)(`div`,{className:`px-1`,children:[(0,Q.jsx)(`h3`,{className:`text-[11px] font-semibold uppercase tracking-wider text-base-content/50`,children:e(`modbus_helper.active_simulations`)}),(0,Q.jsx)(`p`,{className:`text-xs text-base-content/50 mt-0.5`,children:e(`modbus_helper.active_simulations_desc`)})]}),Le.map(t=>(0,Q.jsx)(K,{title:t.model,description:(0,Q.jsxs)(Q.Fragment,{children:[t.manufacturer,(0,Q.jsxs)(`span`,{className:`font-mono text-base-content/45 ml-2`,children:[`ID: `,t.device_id]})]}),action:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`badge badge-outline badge-sm capitalize`,children:t.category}),(0,Q.jsxs)(`span`,{className:`badge badge-ghost badge-sm font-mono`,children:[t.entity_count,` entities`]})]}),footer:(0,Q.jsxs)(`div`,{className:`flex flex-wrap gap-2 w-full`,children:[(0,Q.jsxs)(`button`,{className:`btn btn-sm btn-primary`,onClick:()=>rt(t.device_id),disabled:s,children:[(0,Q.jsx)(se,{}),` `,e(`modbus_helper.simulation_send_update`)]}),(0,Q.jsxs)(`button`,{className:`btn btn-sm btn-outline`,onClick:()=>at(t.device_id),disabled:s,children:[(0,Q.jsx)(n,{}),` `,e(`modbus_helper.simulation_dashboard`)]}),(0,Q.jsxs)(`button`,{className:`btn btn-sm btn-outline`,onClick:()=>at(t.device_id,`visual`),disabled:s,children:[(0,Q.jsx)(D,{}),` `,e(`modbus_helper.simulation_visual`)]}),(0,Q.jsxs)(`button`,{className:`btn btn-sm btn-outline btn-error sm:ml-auto`,onClick:()=>it(t.device_id),disabled:s,children:[(0,Q.jsx)(ee,{}),` `,e(`modbus_helper.simulation_delete`)]})]})},t.device_id))]})]})]}),Ue&&(0,Q.jsx)(`dialog`,{className:`modal modal-open`,onClick:e=>{e.target===e.currentTarget&&We(null)},children:(0,Q.jsxs)(`div`,{className:`modal-box max-w-4xl w-full`,children:[(0,Q.jsxs)(`h3`,{className:`font-bold text-lg mb-2`,children:[(0,Q.jsx)(n,{className:`inline mr-2`}),e(`modbus_helper.simulation_dashboard_title`,{model:Ge})]}),(0,Q.jsx)(`p`,{className:`text-sm text-base-content/70 mb-4`,children:e(`modbus_helper.simulation_dashboard_hint`)}),(0,Q.jsx)(`textarea`,{id:`dashboard-yaml-textarea`,className:`textarea textarea-bordered w-full font-mono text-xs leading-relaxed`,rows:20,readOnly:!0,value:Ue}),(0,Q.jsxs)(`div`,{className:`modal-action`,children:[(0,Q.jsx)(`button`,{className:`btn ${$?`btn-success`:`btn-primary`}`,onClick:ot,children:$?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(w,{className:`mr-2`}),` `,e(`modbus_helper.simulation_dashboard_copied`)]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(d,{className:`mr-2`}),` `,e(`modbus_helper.simulation_dashboard_copy`)]})}),(0,Q.jsx)(`button`,{className:`btn`,onClick:()=>We(null),children:e(`modbus_helper.simulation_dashboard_close`)})]})]})})]})}function ft(){let{t:e}=H(),[t,n]=(0,J.useState)(`can0`),[r,i]=(0,J.useState)(125e3),[a,s]=(0,J.useState)(null),[l,u]=(0,J.useState)(!1),[f,m]=(0,J.useState)(null),[h,_]=(0,J.useState)(!1),[v,b]=(0,J.useState)(!1),[te,ne]=(0,J.useState)(30),[C,re]=(0,J.useState)([]),ie=(0,J.useRef)(null),T=(0,J.useRef)(null),[ae,E]=(0,J.useState)(!1),[D,oe]=(0,J.useState)(``),[O,k]=(0,J.useState)(null),[A,ce]=(0,J.useState)(!1);(0,J.useEffect)(()=>{T.current&&v&&T.current.scrollIntoView({behavior:`smooth`})},[C,v]);let j=(0,J.useCallback)(async()=>{u(!0);try{let{data:e}=await P.get(`/api/can/status?interface=${t}`);s(e)}catch{s(null)}finally{u(!1)}},[t]);(0,J.useEffect)(()=>{j()},[j]);let M=(0,J.useCallback)(async()=>{_(!0),m(null);try{let{data:e}=await P.post(`/api/can/interface-up`,{interface:t,bitrate:r});m(e),e.status===`success`&&j()}catch(e){m({status:`error`,message:e.message||`Request failed`})}finally{_(!1)}},[t,r,j]),N=(0,J.useCallback)(()=>{re([]),b(!0);let e=new AbortController;ie.current=e;let n=`${P.defaults.baseURL||``}/api/can/dump?interface=${t}&duration=${te}`;fetch(n,{signal:e.signal,credentials:`include`}).then(async e=>{let t=e.body?.getReader();if(!t){b(!1);return}let n=new TextDecoder,r=``;for(;;){let{done:e,value:i}=await t.read();if(e)break;r+=n.decode(i,{stream:!0});let a=r.split(`
3
+ `);r=a.pop()||``;for(let e of a){let t=e.trim();if(t.startsWith(`data: `)){let e=t.slice(6);if(e===`[DONE]`){b(!1);return}re(t=>[...t,e])}}}b(!1)}).catch(e=>{e.name!==`AbortError`&&re(t=>[...t,`[ERROR] ${e.message}`]),b(!1)})},[t,te]),le=(0,J.useCallback)(()=>{ie.current?.abort(),ie.current=null,b(!1)},[]),ue=()=>{Oe(C.join(`
4
+ `)).then(()=>{E(!0),setTimeout(()=>E(!1),2e3)})},de=(0,J.useCallback)(async()=>{if(D){ce(!0),k(null);try{let{data:e}=await P.post(`/api/can/send`,{interface:t,frame:D});k(e)}catch(e){let t=e;k({status:`error`,message:t.response?.data?.detail||t.message})}finally{ce(!1)}}},[t,D]),fe=[{label:`Heartbeat (node 1)`,icon:(0,Q.jsx)(S,{className:`w-3 h-3`}),frame:`701#05`,hint:`NMT Operational heartbeat, COB-ID 0x701`},{label:`Discovery blk`,icon:(0,Q.jsx)(x,{className:`w-3 h-3`}),frame:`7FF#446973636F766572`,hint:`Broadcast discovery message on COB-ID 0x7FF`}];return(0,Q.jsxs)(`div`,{className:`space-y-6`,children:[(0,Q.jsx)(`div`,{className:`stg-card`,children:(0,Q.jsxs)(`div`,{className:`card-body`,children:[(0,Q.jsxs)(`h2`,{className:`card-title text-lg`,children:[(0,Q.jsx)(g,{className:`text-primary`}),` CAN Interface`]}),(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-end gap-4`,children:[(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label`,children:(0,Q.jsx)(`span`,{className:`label-text`,children:`Interface`})}),(0,Q.jsxs)(`select`,{className:`select select-bordered select-sm`,value:t,onChange:e=>n(e.target.value),children:[(0,Q.jsx)(`option`,{value:`can0`,children:`can0`}),(0,Q.jsx)(`option`,{value:`can1`,children:`can1`}),(0,Q.jsx)(`option`,{value:`vcan0`,children:`vcan0 (virtual)`})]})]}),(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label`,children:(0,Q.jsx)(`span`,{className:`label-text`,children:`Bitrate`})}),(0,Q.jsxs)(`select`,{className:`select select-bordered select-sm`,value:r,onChange:e=>i(parseInt(e.target.value)),children:[(0,Q.jsx)(`option`,{value:125e3,children:`125 kbps (boneIO default)`}),(0,Q.jsx)(`option`,{value:25e4,children:`250 kbps`}),(0,Q.jsx)(`option`,{value:5e5,children:`500 kbps`}),(0,Q.jsx)(`option`,{value:1e6,children:`1 Mbps`})]})]}),(0,Q.jsx)(`button`,{className:`btn btn-sm gap-1 ${l?`loading`:``}`,onClick:j,disabled:l,children:`Status`})]}),a&&(0,Q.jsx)(`div`,{className:`mt-3`,children:a.is_up?(0,Q.jsxs)(`div`,{className:`badge badge-success gap-1`,children:[(0,Q.jsx)(w,{className:`w-3 h-3`}),` `,t,` UP`,a.bitrate&&` @ ${a.bitrate/1e3} kbps`]}):(0,Q.jsxs)(`div`,{className:`badge badge-error gap-1`,children:[(0,Q.jsx)(p,{className:`w-3 h-3`}),` `,t,` `,a.exists?`DOWN`:`not found`]})}),a&&!a.is_up&&(0,Q.jsxs)(`div`,{className:`mt-3 p-3 bg-base-300 rounded-lg`,children:[(0,Q.jsxs)(`p`,{className:`text-sm mb-2`,children:[`Bring `,(0,Q.jsx)(`code`,{className:`font-mono`,children:t}),` up at`,` `,(0,Q.jsx)(`code`,{className:`font-mono`,children:r}),` bps:`]}),(0,Q.jsx)(`div`,{className:`flex gap-2 items-center`,children:(0,Q.jsxs)(`button`,{className:`btn btn-sm btn-primary gap-1 ${h?`loading`:``}`,onClick:M,disabled:h,children:[h?(0,Q.jsx)(c,{className:`animate-spin`}):(0,Q.jsx)(g,{}),`Bring Up`]})}),f&&(0,Q.jsxs)(`p`,{className:`mt-2 text-xs ${f.status===`success`?`text-success`:`text-error`}`,children:[f.status===`success`?(0,Q.jsx)(w,{className:`inline mr-1`}):(0,Q.jsx)(p,{className:`inline mr-1`}),f.message]})]})]})}),(0,Q.jsx)(`div`,{className:`stg-card`,children:(0,Q.jsxs)(`div`,{className:`card-body`,children:[(0,Q.jsx)(`h2`,{className:`card-title text-lg`,children:`candump`}),(0,Q.jsxs)(`p`,{className:`text-sm text-base-content/70`,children:[`Capture CAN bus traffic in real-time. Requires `,(0,Q.jsx)(`code`,{children:`can-utils`}),` package.`]}),(0,Q.jsxs)(`div`,{className:`flex flex-wrap items-end gap-4 mt-2`,children:[(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label`,children:(0,Q.jsx)(`span`,{className:`label-text`,children:`Duration (s)`})}),(0,Q.jsx)(q,{className:`input-sm w-24`,value:te,onChange:e=>ne(e===``?30:e),min:5,max:120,disabled:v})]}),v?(0,Q.jsxs)(`button`,{className:`btn btn-sm btn-error gap-1`,onClick:le,children:[(0,Q.jsx)(o,{className:`w-3 h-3`}),` Stop`]}):(0,Q.jsxs)(`button`,{className:`btn btn-sm btn-primary gap-1`,onClick:N,disabled:!a?.is_up,children:[(0,Q.jsx)(se,{className:`w-3 h-3`}),` Start Capture`]}),C.length>0&&!v&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`button`,{className:`btn btn-sm btn-ghost gap-1`,onClick:ue,children:[(0,Q.jsx)(d,{className:`w-3 h-3`}),ae?`Copied!`:`Copy`]}),(0,Q.jsxs)(`button`,{className:`btn btn-sm btn-ghost gap-1`,onClick:()=>re([]),children:[(0,Q.jsx)(ee,{className:`w-3 h-3`}),` Clear`]})]})]}),(C.length>0||v)&&(0,Q.jsxs)(`div`,{className:`mt-3 bg-base-300 rounded-lg p-3 font-mono text-xs max-h-80 overflow-y-auto`,children:[C.length===0&&v&&(0,Q.jsxs)(`div`,{className:`text-base-content/50 flex items-center gap-2`,children:[(0,Q.jsx)(c,{className:`animate-spin`}),` Waiting for CAN frames...`]}),C.map((e,t)=>(0,Q.jsx)(`div`,{className:`whitespace-pre select-all hover:bg-base-100/30`,children:e},t)),(0,Q.jsx)(`div`,{ref:T})]}),v&&(0,Q.jsxs)(`div`,{className:`text-xs text-base-content/50 mt-1`,children:[C.length,` frames captured`]})]})}),(0,Q.jsx)(`div`,{className:`stg-card`,children:(0,Q.jsxs)(`div`,{className:`card-body`,children:[(0,Q.jsx)(`h2`,{className:`card-title text-lg`,children:`cansend`}),(0,Q.jsxs)(`p`,{className:`text-sm text-base-content/70`,children:[`Send CAN frames. Format: `,(0,Q.jsx)(`code`,{children:`COB-ID#DATA`}),` (hex), e.g.`,` `,(0,Q.jsx)(`code`,{children:`701#05`})]}),(0,Q.jsx)(`div`,{className:`flex flex-wrap gap-2 mt-2`,children:fe.map(e=>(0,Q.jsxs)(`button`,{className:`btn btn-sm btn-outline gap-1`,onClick:()=>{oe(e.frame),k(null)},title:e.hint,children:[e.icon,` `,e.label]},e.frame))}),(0,Q.jsxs)(`div`,{className:`flex gap-2 items-end mt-3`,children:[(0,Q.jsxs)(`div`,{className:`form-control flex-1`,children:[(0,Q.jsx)(`label`,{className:`label`,children:(0,Q.jsx)(`span`,{className:`label-text`,children:`CAN Frame`})}),(0,Q.jsx)(`input`,{type:`text`,className:`input input-bordered input-sm font-mono`,value:D,onChange:e=>{oe(e.target.value.toUpperCase()),k(null)},placeholder:`701#05`,disabled:A,onKeyDown:e=>{e.key===`Enter`&&D&&de()}})]}),(0,Q.jsxs)(`button`,{className:`btn btn-sm btn-primary gap-1 ${A?`loading`:``}`,onClick:de,disabled:!D||A||!a?.is_up,children:[A?(0,Q.jsx)(c,{className:`animate-spin`}):(0,Q.jsx)(y,{className:`w-3 h-3`}),`Send`]})]}),O&&(0,Q.jsxs)(`div`,{className:`alert text-sm mt-3 ${O.status===`success`?`alert-success`:`alert-error`}`,children:[O.status===`success`?(0,Q.jsx)(w,{}):(0,Q.jsx)(p,{}),(0,Q.jsx)(`span`,{children:O.message})]}),(0,Q.jsxs)(`div`,{className:`text-xs text-base-content/50 mt-3 space-y-1`,children:[(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`COB-ID reference:`}),` 0x000=NMT, 0x080+N=SYNC/Emergency, 0x180+N=TPDO1, 0x200+N=RPDO1, 0x580+N=SDO TX, 0x600+N=SDO RX, 0x700+N=Heartbeat, 0x7FF=Broadcast`]}),(0,Q.jsxs)(`p`,{children:[(0,Q.jsx)(`strong`,{children:`Example heartbeats:`}),` 701#05 (node 1 operational), 702#00 (node 2 boot-up), 701#7F (node 1 pre-operational)`]})]})]})})]})}function pt(){let[e,t]=(0,J.useState)([]),[n,i]=(0,J.useState)(!1),[a,o]=(0,J.useState)(null),[s,c]=(0,J.useState)(null),[u,d]=(0,J.useState)(2),[m,h]=(0,J.useState)(null),[g,_]=(0,J.useState)(``),[v,ee]=(0,J.useState)(!1),[y,b]=(0,J.useState)(null),x=(0,J.useCallback)(async()=>{i(!0),o(null);try{let{data:e}=await P.get(`/api/can/nodes`);t(e.nodes||[])}catch(e){let t=e;o(t.response?.data?.detail||t.message||`Failed to fetch CAN nodes`)}finally{i(!1)}},[]);(0,J.useEffect)(()=>{x();let e=setInterval(x,5e3);return()=>clearInterval(e)},[x]);let S=async e=>{c(e);try{await P.post(`/api/can/nodes/assign`,{target_node_id:e,new_node_id:u}),d(e=>e+1),x()}catch(e){let t=e;alert(`Failed to assign ID: `+(t.response?.data?.detail||t.message))}finally{c(null)}},te=async()=>{if(m!==null){ee(!0),b(null);try{let{data:e}=await P.post(`/api/can/nodes/${m}/config`,{config_yaml:g});b({status:`success`,message:e.message}),setTimeout(()=>b(null),3e3)}catch(e){let t=e;b({status:`error`,message:t.response?.data?.detail||t.message})}finally{ee(!1)}}},ne=e.filter(e=>e.node_id===127),C=e.filter(e=>e.node_id!==127&&e.node_id!==1);return(0,Q.jsxs)(`div`,{className:`space-y-6`,children:[(0,Q.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,Q.jsx)(`h2`,{className:`text-xl font-bold`,children:`CAN Network Management`}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-outline gap-2 ${n?`loading`:``}`,onClick:x,disabled:n,children:`Refresh`})]}),a&&(0,Q.jsxs)(`div`,{className:`alert alert-error`,children:[(0,Q.jsx)(p,{}),(0,Q.jsx)(`span`,{children:a})]}),(0,Q.jsx)(`div`,{className:`stg-card`,children:(0,Q.jsxs)(`div`,{className:`card-body`,children:[(0,Q.jsxs)(`h2`,{className:`card-title text-lg text-warning`,children:[(0,Q.jsx)(r,{}),` Pending Devices (Unconfigured)`]}),(0,Q.jsx)(`p`,{className:`text-sm text-base-content/70`,children:`Devices with Node ID 127 waiting to be assigned a permanent ID.`}),ne.length===0?(0,Q.jsx)(`p`,{className:`text-sm italic opacity-50`,children:`No pending devices found.`}):(0,Q.jsx)(`div`,{className:`overflow-x-auto mt-4`,children:(0,Q.jsxs)(`table`,{className:`table table-sm`,children:[(0,Q.jsx)(`thead`,{children:(0,Q.jsxs)(`tr`,{children:[(0,Q.jsx)(`th`,{children:`Current ID`}),(0,Q.jsx)(`th`,{children:`State`}),(0,Q.jsx)(`th`,{children:`Action`})]})}),(0,Q.jsx)(`tbody`,{children:ne.map(e=>(0,Q.jsxs)(`tr`,{children:[(0,Q.jsx)(`td`,{children:e.node_id}),(0,Q.jsx)(`td`,{children:(0,Q.jsx)(`div`,{className:`badge ${e.is_online?`badge-success`:`badge-error`}`,children:e.nmt_state})}),(0,Q.jsx)(`td`,{children:(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(q,{className:`input-sm w-20`,value:u,onChange:e=>d(e===``?2:e),min:2,max:126}),(0,Q.jsx)(`button`,{className:`btn btn-sm btn-primary ${s===e.node_id?`loading`:``}`,onClick:()=>S(e.node_id),disabled:s!==null,children:`Assign ID`})]})})]},e.node_id))})]})})]})}),(0,Q.jsx)(`div`,{className:`stg-card`,children:(0,Q.jsxs)(`div`,{className:`card-body`,children:[(0,Q.jsxs)(`h2`,{className:`card-title text-lg text-success`,children:[(0,Q.jsx)(M,{}),` Active Slaves`]}),C.length===0?(0,Q.jsx)(`p`,{className:`text-sm italic opacity-50`,children:`No active slaves found on the bus.`}):(0,Q.jsx)(`div`,{className:`overflow-x-auto mt-4`,children:(0,Q.jsxs)(`table`,{className:`table table-sm`,children:[(0,Q.jsx)(`thead`,{children:(0,Q.jsxs)(`tr`,{children:[(0,Q.jsx)(`th`,{children:`Node ID`}),(0,Q.jsx)(`th`,{children:`State`}),(0,Q.jsx)(`th`,{children:`Config`})]})}),(0,Q.jsx)(`tbody`,{children:C.map(e=>(0,Q.jsxs)(`tr`,{children:[(0,Q.jsx)(`td`,{className:`font-bold`,children:e.node_id}),(0,Q.jsx)(`td`,{children:(0,Q.jsx)(`div`,{className:`badge ${e.is_online?`badge-success`:`badge-error`}`,children:e.nmt_state})}),(0,Q.jsx)(`td`,{children:(0,Q.jsxs)(`button`,{className:`btn btn-sm btn-outline gap-2`,onClick:()=>{h(e.node_id),_(`# Write YAML configuration here for Node `+e.node_id+`
5
+ `)},children:[(0,Q.jsx)(f,{}),` Edit Config`]})})]},e.node_id))})]})})]})}),m!==null&&(0,Q.jsx)(`div`,{className:`modal modal-open`,children:(0,Q.jsxs)(`div`,{className:`modal-box w-11/12 max-w-5xl`,children:[(0,Q.jsxs)(`h3`,{className:`font-bold text-lg mb-4`,children:[`Edit Configuration for Node `,m]}),(0,Q.jsx)(`div`,{className:`form-control mb-4`,children:(0,Q.jsx)(`textarea`,{className:`textarea textarea-bordered font-mono h-64`,value:g,onChange:e=>_(e.target.value),placeholder:`event:\\n - id: IN_01\\n...`})}),y&&(0,Q.jsxs)(`div`,{className:`alert ${y.status===`success`?`alert-success`:`alert-error`} mb-4`,children:[y.status===`success`?(0,Q.jsx)(w,{}):(0,Q.jsx)(p,{}),(0,Q.jsx)(`span`,{children:y.message})]}),(0,Q.jsxs)(`div`,{className:`modal-action`,children:[(0,Q.jsxs)(`button`,{className:`btn btn-primary gap-2 ${v?`loading`:``}`,onClick:te,disabled:v,children:[!v&&(0,Q.jsx)(l,{}),` Save & Push to Slave`]}),(0,Q.jsx)(`button`,{className:`btn btn-ghost`,onClick:()=>{h(null),b(null)},disabled:v,children:`Close`})]})]})})]})}function mt(e){return v({tag:`svg`,attr:{viewBox:`0 0 512 512`},child:[{tag:`path`,attr:{d:`M449.07 399.08 278.64 82.58c-12.08-22.44-44.26-22.44-56.35 0L51.87 399.08A32 32 0 0 0 80 446.25h340.89a32 32 0 0 0 28.18-47.17m-198.6-1.83a20 20 0 1 1 20-20 20 20 0 0 1-20 20m21.72-201.15-5.74 122a16 16 0 0 1-32 0l-5.74-121.95a21.73 21.73 0 0 1 21.5-22.69h.21a21.74 21.74 0 0 1 21.73 22.7z`},child:[]}]})(e)}function ht({boardVersion:e}){let{t}=H();return(0,Q.jsxs)(`div`,{className:`alert alert-warning shadow-lg`,children:[(0,Q.jsx)(mt,{className:`w-6 h-6 shrink-0`}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`h3`,{className:`font-bold`,children:t(`tools.can_not_supported_title`)}),(0,Q.jsx)(`div`,{className:`text-sm`,children:t(`tools.can_not_supported_desc`,{version:e||`?`})})]})]})}function gt(){let{t:e}=H(),[t,n]=(0,J.useState)(2),[r,i]=(0,J.useState)(!1),[a,o]=(0,J.useState)(null),[s,c]=(0,J.useState)(!1),l=(0,J.useCallback)(async()=>{i(!0),o(null);try{let{data:e}=await P.get(`/api/i2c/scan?bus=${t}`,{timeout:15e3});o(e)}catch(e){o({bus:t,devices:[],raw_output:``,error:String(e)})}finally{i(!1)}},[t]);return(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{className:`stg-card mb-4`,children:(0,Q.jsx)(`div`,{className:`card-body p-4 sm:p-5`,children:(0,Q.jsxs)(`div`,{className:`flex items-end gap-4`,children:[(0,Q.jsxs)(`div`,{className:`form-control`,children:[(0,Q.jsx)(`label`,{className:`label`,children:(0,Q.jsx)(`span`,{className:`label-text`,children:e(`tools.i2c_bus`)})}),(0,Q.jsxs)(`select`,{className:`select select-bordered`,value:t,onChange:e=>n(parseInt(e.target.value)),children:[(0,Q.jsx)(`option`,{value:0,children:`I2C-0`}),(0,Q.jsx)(`option`,{value:1,children:`I2C-1`}),(0,Q.jsxs)(`option`,{value:2,children:[`I2C-2 (`,e(`tools.i2c_default`),`)`]})]})]}),(0,Q.jsxs)(`button`,{className:`btn btn-primary gap-2 ${r?`loading`:``}`,onClick:l,disabled:r,children:[!r&&(0,Q.jsx)(m,{}),e(r?`tools.i2c_scanning`:`tools.i2c_scan_btn`)]})]})})}),a&&(0,Q.jsxs)(Q.Fragment,{children:[a.error&&(0,Q.jsx)(`div`,{className:`mb-4 flex items-start gap-3 rounded-xl border border-l-[3px] border-error/25 border-l-error bg-error/8 p-3.5 text-[13px]`,children:(0,Q.jsx)(`span`,{children:a.error})}),a.devices.length>0&&(0,Q.jsx)(`div`,{className:`stg-card mb-4`,children:(0,Q.jsxs)(`div`,{className:`card-body p-4 sm:p-5`,children:[(0,Q.jsx)(`h2`,{className:`font-semibold text-[15px] tracking-tight mb-2`,children:e(`tools.i2c_found`,{count:a.devices.length})}),(0,Q.jsx)(`div`,{className:`overflow-x-auto`,children:(0,Q.jsxs)(`table`,{className:`table table-sm`,children:[(0,Q.jsx)(`thead`,{children:(0,Q.jsxs)(`tr`,{children:[(0,Q.jsx)(`th`,{children:e(`tools.i2c_address`)}),(0,Q.jsx)(`th`,{children:e(`tools.i2c_decimal`)}),(0,Q.jsx)(`th`,{children:e(`tools.i2c_possible_devices`)})]})}),(0,Q.jsx)(`tbody`,{children:a.devices.map(t=>(0,Q.jsxs)(`tr`,{className:`hover`,children:[(0,Q.jsx)(`td`,{className:`font-mono font-bold text-primary`,children:t.address_hex}),(0,Q.jsx)(`td`,{className:`font-mono text-base-content/70`,children:t.address}),(0,Q.jsx)(`td`,{children:t.known_devices.length>0?(0,Q.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:t.known_devices.map((e,n)=>(0,Q.jsx)(`span`,{className:`badge badge-sm ${t.is_boneio?`badge-success`:`badge-info`}`,children:e},n))}):(0,Q.jsx)(`span`,{className:`text-base-content/40 italic`,children:e(`tools.i2c_unknown`)})})]},t.address))})]})})]})}),!a.error&&a.devices.length===0&&(0,Q.jsx)(`div`,{className:`alert alert-warning mb-6`,children:(0,Q.jsx)(`span`,{children:e(`tools.i2c_no_devices`)})}),a.raw_output&&(0,Q.jsx)(`div`,{className:`stg-card mb-4`,children:(0,Q.jsxs)(`div`,{className:`card-body p-4 sm:p-5`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,Q.jsx)(`h2`,{className:`font-semibold text-[15px] tracking-tight`,children:e(`tools.i2c_raw_output`)}),(0,Q.jsxs)(`button`,{className:`btn btn-sm gap-1`,onClick:()=>{a?.raw_output&&Oe(a.raw_output).then(()=>{c(!0),setTimeout(()=>c(!1),2e3)})},children:[(0,Q.jsx)(d,{className:`w-3 h-3`}),e(s?`tools.copied`:`tools.copy`)]})]}),(0,Q.jsx)(`pre`,{className:`stg-inset stg-inset-strong p-3 font-mono text-xs overflow-x-auto whitespace-pre select-all`,children:a.raw_output})]})})]})]})}function _t({open:e,onOpenChange:t}){let{t:n}=H(),[r,i]=(0,J.useState)(null),[a,o]=(0,J.useState)(!1),[s,c]=(0,J.useState)(null),[l,u]=(0,J.useState)(!1);(0,J.useEffect)(()=>{if(!e)return;let t=!1;return(async()=>{try{let e=await me();if(t)return;c(null),u(!1);let n=e?.config?.logger??{};i(n)}catch(e){t||c(String(e))}})(),()=>{t=!0}},[e]);let d=async()=>{if(r){o(!0),c(null);try{await P.put(`/api/config/logger`,r,{timeout:3e4}),await P.post(`/api/config/reload`,[`logger`],{timeout:3e4}),he(),u(!1),t(!1)}catch(e){let t=e;c(t?.response?.data?.detail||t?.message||String(e))}finally{o(!1)}}};return(0,Q.jsx)(pe,{open:e,onOpenChange:t,children:(0,Q.jsxs)(ue,{className:`sm:max-w-2xl flex flex-col max-h-[85vh]`,children:[(0,Q.jsxs)(N,{children:[(0,Q.jsxs)(de,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:`📝`}),n(`sections.logger`)]}),(0,Q.jsx)(fe,{className:`text-[13px]`,children:n(`diagnostics.logger_dialog_intro`)})]}),(0,Q.jsxs)(`div`,{className:`flex-1 min-h-0 overflow-y-auto -mx-6 px-6 py-2`,children:[r===null&&!s?(0,Q.jsx)(`div`,{className:`flex justify-center py-10`,children:(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-md text-primary`})}):(0,Q.jsx)(B,{data:r??{},onChange:e=>{i(e),u(!0)}}),s&&(0,Q.jsx)(V,{variant:`error`,className:`mt-3`,message:s})]}),(0,Q.jsxs)(le,{children:[(0,Q.jsx)(`button`,{className:`btn btn-ghost btn-sm`,onClick:()=>t(!1),children:n(`common.cancel`)}),(0,Q.jsxs)(`button`,{className:`btn btn-primary btn-sm gap-2`,onClick:()=>void d(),disabled:!l||a,children:[a&&(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),n(`common.save`)]})]})]})})}async function vt(e,t){let n=e;if(n?.code===`ECONNABORTED`)return t;let r=n?.response?.data;if(r instanceof Blob)try{let e=await r.text(),t=JSON.parse(e);if(t?.detail)return t.detail}catch{}else if(r&&typeof r==`object`&&`detail`in r){let e=r.detail;if(e)return e}return t}function yt(){let{t:e}=H(),{state:t,clock:n,busy:r,open:i,close:a}=Fe(),[o,s]=(0,J.useState)(10),[c,l]=(0,J.useState)(!1),[u,d]=(0,J.useState)(null),[f,p]=(0,J.useState)(!1),m=async()=>{l(!0),d(null);try{let e=await P.get(`/api/diagnostics/bundle`,{responseType:`blob`,timeout:12e4}),t=String(e.headers[`content-disposition`]??``).match(/filename="([^"]+)"/),n=URL.createObjectURL(e.data),r=document.createElement(`a`);r.href=n,r.download=t?.[1]??`boneio-diagnostics.tar.gz`,document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(n)}catch(t){d(await vt(t,e(`diagnostics.download_failed`)))}finally{l(!1)}};return(0,Q.jsxs)(De,{children:[(0,Q.jsx)(K,{icon:(0,Q.jsx)(_e,{}),title:e(`diagnostics.capture_title`),description:e(`diagnostics.capture_help`),footer:t.active?(0,Q.jsx)(G,{hint:e(`diagnostics.capture_active`,{time:n}),children:(0,Q.jsx)(`button`,{className:`btn btn-warning btn-sm`,onClick:()=>void a(),disabled:r,children:e(`diagnostics.capture_stop`)})}):(0,Q.jsxs)(G,{children:[(0,Q.jsx)(`select`,{className:`select select-bordered select-sm`,value:o,onChange:e=>s(Number(e.target.value)),"aria-label":e(`diagnostics.capture_length`),children:[5,10,15,30].map(t=>(0,Q.jsx)(`option`,{value:t,children:e(`diagnostics.capture_minutes`,{count:t})},t))}),(0,Q.jsx)(`button`,{className:`btn btn-primary btn-sm`,onClick:()=>void i(o),disabled:r,children:e(`diagnostics.capture_start`)})]}),children:t.active&&(0,Q.jsx)(V,{variant:`warning`,message:e(`diagnostics.capture_active`,{time:n})})}),(0,Q.jsx)(K,{icon:(0,Q.jsx)(ge,{}),title:e(`sections.logger`),description:e(`diagnostics.logger_card_desc`),footer:(0,Q.jsx)(G,{children:(0,Q.jsx)(`button`,{className:`btn btn-outline btn-sm`,onClick:()=>p(!0),children:e(`diagnostics.logger_open`)})})}),(0,Q.jsx)(K,{icon:(0,Q.jsx)(be,{}),title:e(`diagnostics.title`),description:e(`diagnostics.intro`),footer:(0,Q.jsx)(G,{children:(0,Q.jsx)(`button`,{className:`btn btn-primary btn-sm gap-2`,onClick:()=>void m(),disabled:c,children:c?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),e(`diagnostics.building`)]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(be,{}),e(`diagnostics.download`)]})})}),children:(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[(0,Q.jsxs)(`div`,{className:`stg-inset p-3.5`,children:[(0,Q.jsx)(`h4`,{className:`text-[11px] font-semibold uppercase tracking-[0.08em] text-base-content/50 mb-1.5`,children:e(`diagnostics.contains_title`)}),(0,Q.jsxs)(`ul`,{className:`list-disc list-inside text-[13px] text-base-content/75 space-y-0.5`,children:[(0,Q.jsx)(`li`,{children:e(`diagnostics.contains_config`)}),(0,Q.jsx)(`li`,{children:e(`diagnostics.contains_logs`)}),(0,Q.jsx)(`li`,{children:e(`diagnostics.contains_status`)})]})]}),(0,Q.jsx)(V,{variant:`neutral`,message:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`span`,{className:`block`,children:e(`diagnostics.excluded`)}),(0,Q.jsx)(`span`,{className:`block mt-1`,children:e(`diagnostics.privacy`)})]})}),u&&(0,Q.jsx)(V,{variant:`error`,message:u})]})}),(0,Q.jsx)(_t,{open:f,onOpenChange:p})]})}function bt(){let{t:e}=H(),{isAdmin:t}=Se(),{canSupported:n,boardVersion:r}=we(),{section:i}=Ee(),a=U(),[o,s]=(0,J.useState)(!1),c=Le.some(e=>e.name===i)?i:`log`,l=Le.find(e=>e.name===c),u=(0,J.useCallback)(e=>a(`/diagnostics/${e}`),[a]),d=!!l.requiresCan&&!n;return t?(0,Q.jsxs)(`div`,{className:`settings-scope flex h-full flex-col lg:flex-row overflow-hidden`,children:[(0,Q.jsx)(Be,{activeSection:c,onNavigate:u,isSheetOpen:o,onSheetOpenChange:s}),(0,Q.jsxs)(`div`,{className:`flex-1 flex flex-col overflow-hidden min-w-0 pb-14 lg:pb-0`,children:[(0,Q.jsx)(`div`,{className:`stg-header shrink-0 px-4 py-3.5 sm:px-6 lg:px-8 lg:py-4 z-20`,children:(0,Q.jsxs)(`div`,{className:xe(`w-full mx-auto flex items-start gap-3.5 min-w-0`,Ce[l.width??`form`]),children:[(0,Q.jsx)(`div`,{className:`stg-chip w-11 h-11 rounded-xl hidden sm:flex items-center justify-center text-xl shrink-0`,children:(0,Q.jsx)(`span`,{"aria-hidden":`true`,children:l.icon})}),(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsx)(`h1`,{className:`text-xl lg:text-[26px] font-bold tracking-tight text-base-content leading-tight`,children:e(l.titleKey)}),(0,Q.jsx)(`p`,{className:`text-[13px] text-base-content/60 mt-1 leading-relaxed max-w-2xl`,children:e(l.descriptionKey)})]})]})}),c===`log`?(0,Q.jsx)(`div`,{className:`stg-canvas flex-1 min-h-0 overflow-hidden p-4 sm:p-6 lg:p-8`,children:(0,Q.jsx)(`div`,{className:`stg-card h-full overflow-hidden`,children:(0,Q.jsx)($,{})})}):c===`support`?(0,Q.jsx)(`div`,{className:`stg-canvas flex-1 min-h-0 overflow-y-auto p-4 sm:p-6 lg:p-8`,children:(0,Q.jsx)(yt,{})}):(0,Q.jsx)(`div`,{className:`stg-canvas flex-1 min-h-0 overflow-y-auto p-4 sm:p-6 lg:p-8`,children:(0,Q.jsx)(`div`,{className:`w-full mx-auto max-w-5xl 2xl:max-w-6xl`,children:d?(0,Q.jsx)(ht,{boardVersion:r}):(0,Q.jsxs)(Q.Fragment,{children:[c===`modbus`&&(0,Q.jsx)(dt,{}),c===`i2c`&&(0,Q.jsx)(gt,{}),c===`can_network`&&(0,Q.jsx)(pt,{}),c===`can_sniffer`&&(0,Q.jsx)(ft,{})]})})})]})]}):(0,Q.jsx)(`div`,{className:`settings-scope stg-canvas h-full overflow-y-auto p-4 sm:p-6 lg:p-8`,children:(0,Q.jsx)(De,{width:`wide`,children:(0,Q.jsx)(V,{variant:`warning`,message:e(`diagnostics.admin_only`)})})})}export{bt as default};