boneio 1.6.0.dev8__tar.gz → 1.6.0.dev10__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 (708) hide show
  1. {boneio-1.6.0.dev8/boneio.egg-info → boneio-1.6.0.dev10}/PKG-INFO +9 -6
  2. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/manifest.json +1 -1
  3. boneio-1.6.0.dev10/boneio/migrations/plans/manifest.sig +1 -0
  4. boneio-1.6.0.dev10/boneio/version.py +2 -0
  5. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/bind.py +41 -3
  6. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/AccountsView-BUm_P1Uw.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/AccountsView-CnpfWttp.js +1 -1
  7. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/ActionFields-B--1CfM2.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/ActionFields-DdxRdghF.js +1 -1
  8. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/BackupSection-BSZn5Skg.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/BackupSection-C-s4grNN.js +1 -1
  9. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/BindingMatrix-CpzvZ7i_.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/BindingMatrix-v4xUWZve.js +1 -1
  10. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/DeviceControlSection-CnyJz996.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/DeviceControlSection-BCbLcOdY.js +1 -1
  11. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/DiagnosticsView-jzQIu7C-.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/DiagnosticsView-S3oihgRt.js +1 -1
  12. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/EditItemDialog-D_EXUFV4.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/EditItemDialog-4MJOMxut.js +1 -1
  13. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/EntityCard-CzrB7v4W.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/EntityCard-DVABYB5e.js +1 -1
  14. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/FactoryResetSection-DU5Xczix.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/FactoryResetSection-JXPSCIxk.js +1 -1
  15. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/FormInputToggle--GD_ZMhY.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/FormInputToggle-rzxH8pqC.js +1 -1
  16. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/HaDashboardWizard-Cjn4NcOy.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/HaDashboardWizard-C-JU3G7o.js +1 -1
  17. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/HostnameSection-CcgeB7c9.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/HostnameSection-7ChfKRnB.js +1 -1
  18. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/InputsView-D7ALwZZ2.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/InputsView-pNQ5bDeL.js +1 -1
  19. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/LocationSection-Dbk0Rss6.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/LocationSection-BYIirRkB.js +2 -2
  20. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/LoggerForm-br7_NVmx.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/LoggerForm-j61zOvFL.js +1 -1
  21. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/MigrationsSection-B0Do-lCH.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/MigrationsSection-CMsxxM8Z.js +1 -1
  22. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/ModbusView-B5YLw-nZ.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/ModbusView-BXWGyG8_.js +1 -1
  23. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/MqttPasswordsSection-B628jQwJ.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/MqttPasswordsSection-B06BwIjN.js +1 -1
  24. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/NodeRedManagement-B6OKfz_P.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/NodeRedManagement-xGq4lRe5.js +1 -1
  25. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/OutputsView-BcttMcsW.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/OutputsView-BJsN8UeA.js +1 -1
  26. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/ScheduleSection-CxiZBMjJ.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/ScheduleSection-C9WBcKXt.js +1 -1
  27. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/SecurityView-Bvk8xFtu.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/SecurityView-0SxjKU8S.js +1 -1
  28. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/SensorView-C--UO0_x.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/SensorView-Swy1YACU.js +1 -1
  29. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/SystemState-DC-bxOGD.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/SystemState-z4xQfIoI.js +1 -1
  30. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/TemplatesView-BgXYpvO7.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/TemplatesView-BS7_4Cl3.js +1 -1
  31. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/TilePicker-BJiurvDz.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/TilePicker-BfaetPZz.js +1 -1
  32. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/TimezoneSection-CQ8UzB3r.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/TimezoneSection-Rb1FiEzP.js +1 -1
  33. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/UISettings-CKiOXI3V.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/UISettings-Dol9Rhqn.js +3 -3
  34. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/index-DTsVYLUw.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/index-b1MgMQ6k.js +4 -4
  35. boneio-1.6.0.dev8/boneio/webui/frontend-dist/assets/monaco-DdPCJ1g6.js → boneio-1.6.0.dev10/boneio/webui/frontend-dist/assets/monaco-DFz5x1Al.js +1 -1
  36. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/index.html +1 -1
  37. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/sw.js +1 -1
  38. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/middleware/auth.py +2 -2
  39. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/websocket_manager.py +2 -2
  40. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10/boneio.egg-info}/PKG-INFO +9 -6
  41. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio.egg-info/SOURCES.txt +30 -30
  42. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio.egg-info/requires.txt +10 -5
  43. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/pyproject.toml +30 -5
  44. boneio-1.6.0.dev8/boneio/migrations/plans/manifest.sig +0 -1
  45. boneio-1.6.0.dev8/boneio/version.py +0 -2
  46. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/LICENSE +0 -0
  47. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/MANIFEST.in +0 -0
  48. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/README.md +0 -0
  49. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/__init__.py +0 -0
  50. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.2/input.yaml +0 -0
  51. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.2/output_24_16.yaml +0 -0
  52. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.2/output_32_10.yaml +0 -0
  53. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.2/output_32_5.yaml +0 -0
  54. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.2/output_cover.yaml +0 -0
  55. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.2/output_cover_mix.yaml +0 -0
  56. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.3/input.yaml +0 -0
  57. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.3/output_24_16.yaml +0 -0
  58. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.3/output_32_10.yaml +0 -0
  59. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.3/output_32_5.yaml +0 -0
  60. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.3/output_cover.yaml +0 -0
  61. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.3/output_cover_mix.yaml +0 -0
  62. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.4/input.yaml +0 -0
  63. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.4/output_24_16.yaml +0 -0
  64. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.4/output_32_10.yaml +0 -0
  65. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.4/output_32_5.yaml +0 -0
  66. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.4/output_cover.yaml +0 -0
  67. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.4/output_cover_mix.yaml +0 -0
  68. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.5/input.yaml +0 -0
  69. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.5/output_24_16.yaml +0 -0
  70. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.5/output_32_10.yaml +0 -0
  71. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.5/output_cover.yaml +0 -0
  72. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.5/output_cover_mix.yaml +0 -0
  73. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.6/input.yaml +0 -0
  74. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.6/output_24_16.yaml +0 -0
  75. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.6/output_32_10.yaml +0 -0
  76. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.6/output_cover.yaml +0 -0
  77. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.6/output_cover_mix.yaml +0 -0
  78. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.7/input.yaml +0 -0
  79. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.7/output_24_16.yaml +0 -0
  80. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.7/output_32_10.yaml +0 -0
  81. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.7/output_48_4.yaml +0 -0
  82. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.7/output_cover.yaml +0 -0
  83. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.7/output_cover_mix.yaml +0 -0
  84. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.8/input.yaml +0 -0
  85. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.8/output_24_16.yaml +0 -0
  86. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.8/output_32_10.yaml +0 -0
  87. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.8/output_48_4.yaml +0 -0
  88. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.8/output_cover.yaml +0 -0
  89. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/0.8/output_cover_mix.yaml +0 -0
  90. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/1.0/input.yaml +0 -0
  91. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/1.0/output_24_16.yaml +0 -0
  92. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/1.0/output_32_10.yaml +0 -0
  93. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/1.0/output_48_4.yaml +0 -0
  94. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/1.0/output_cover.yaml +0 -0
  95. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/boards/1.0/output_cover_mix.yaml +0 -0
  96. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/bonecli.py +0 -0
  97. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/__init__.py +0 -0
  98. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/cover/__init__.py +0 -0
  99. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/cover/cover.py +0 -0
  100. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/cover/remote.py +0 -0
  101. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/cover/time_based.py +0 -0
  102. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/cover/venetian.py +0 -0
  103. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/group/__init__.py +0 -0
  104. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/group/output_group.py +0 -0
  105. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/input/__init__.py +0 -0
  106. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/input/binary_sensor.py +0 -0
  107. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/input/detectors.py +0 -0
  108. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/input/event.py +0 -0
  109. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/input/remote/__init__.py +0 -0
  110. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/input/remote/base.py +0 -0
  111. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/input/remote/esphome.py +0 -0
  112. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/irrigation/__init__.py +0 -0
  113. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/irrigation/controller.py +0 -0
  114. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/irrigation/water_source.py +0 -0
  115. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/output/__init__.py +0 -0
  116. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/output/basic.py +0 -0
  117. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/output/buzzer.py +0 -0
  118. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/output/mcp.py +0 -0
  119. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/output/pca.py +0 -0
  120. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/output/pcf.py +0 -0
  121. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/output/remote.py +0 -0
  122. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/sensor/__init__.py +0 -0
  123. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/sensor/virtual_energy.py +0 -0
  124. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/template/__init__.py +0 -0
  125. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/template/alarm_panel.py +0 -0
  126. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/template/gate_cover.py +0 -0
  127. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/components/template/thermostat.py +0 -0
  128. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/const.py +0 -0
  129. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/__init__.py +0 -0
  130. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/auth/__init__.py +0 -0
  131. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/auth/cli.py +0 -0
  132. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/auth/hashing.py +0 -0
  133. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/auth/migration.py +0 -0
  134. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/auth/models.py +0 -0
  135. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/auth/store.py +0 -0
  136. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/cloud/__init__.py +0 -0
  137. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/cloud/data/__init__.py +0 -0
  138. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/cloud/data/docker-compose-cloud.yaml +0 -0
  139. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/cloud/data/docker-compose.yaml +0 -0
  140. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/cloud/data/init-certs-cloud.sh +0 -0
  141. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/cloud/registration.py +0 -0
  142. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/cloud/secrets.py +0 -0
  143. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/config/__init__.py +0 -0
  144. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/config/config_helper.py +0 -0
  145. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/config/input_bindings.py +0 -0
  146. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/config/migrations/__init__.py +0 -0
  147. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/config/migrations/v1_proxy_port.py +0 -0
  148. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/config/migrations/v2_transition.py +0 -0
  149. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/config/migrations/v4_wled_cache.py +0 -0
  150. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/config/migrations/v5_ina_screen.py +0 -0
  151. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/config/package-lock.json +0 -0
  152. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/config/package.json +0 -0
  153. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/config/provenance.py +0 -0
  154. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/config/schema_converter.py +0 -0
  155. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/config/secret_masking.py +0 -0
  156. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/config/yaml_compat.py +0 -0
  157. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/config/yaml_patch.py +0 -0
  158. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/config/yaml_util.py +0 -0
  159. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/containers.py +0 -0
  160. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/diagnostics/__init__.py +0 -0
  161. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/diagnostics/collect.py +0 -0
  162. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/discovery.py +0 -0
  163. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/events/__init__.py +0 -0
  164. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/events/bus.py +0 -0
  165. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/__init__.py +0 -0
  166. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/action_conditions.py +0 -0
  167. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/canopen.py +0 -0
  168. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/covers.py +0 -0
  169. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/display.py +0 -0
  170. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/inputs.py +0 -0
  171. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/irrigation.py +0 -0
  172. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/manager.py +0 -0
  173. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/modbus.py +0 -0
  174. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/outputs.py +0 -0
  175. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/remote.py +0 -0
  176. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/remote_input_registrar.py +0 -0
  177. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/scheduler.py +0 -0
  178. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/security_alert.py +0 -0
  179. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/sensors.py +0 -0
  180. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/sun.py +0 -0
  181. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/templates/__init__.py +0 -0
  182. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/templates/alarm.py +0 -0
  183. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/templates/gate_cover.py +0 -0
  184. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/templates/thermostat.py +0 -0
  185. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/templates.py +0 -0
  186. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/manager/update.py +0 -0
  187. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/messaging/__init__.py +0 -0
  188. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/messaging/basic.py +0 -0
  189. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/messaging/basic_mqtt.py +0 -0
  190. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/messaging/composite.py +0 -0
  191. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/messaging/local.py +0 -0
  192. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/messaging/lox.py +0 -0
  193. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/messaging/mqtt.py +0 -0
  194. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/messaging/queue.py +0 -0
  195. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/net/__init__.py +0 -0
  196. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/net/discovery_guard.py +0 -0
  197. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/remote/__init__.py +0 -0
  198. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/remote/base.py +0 -0
  199. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/remote/can.py +0 -0
  200. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/remote/esphome.py +0 -0
  201. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/remote/mqtt.py +0 -0
  202. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/remote/wled.py +0 -0
  203. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/remote/wled_cache.py +0 -0
  204. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/security/__init__.py +0 -0
  205. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/security/certificate.py +0 -0
  206. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/security/framing.py +0 -0
  207. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/security/posture.py +0 -0
  208. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/sensor/__init__.py +0 -0
  209. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/sensor/base.py +0 -0
  210. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/sensor/sun.py +0 -0
  211. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/sensor/system.py +0 -0
  212. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/state/__init__.py +0 -0
  213. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/state/manager.py +0 -0
  214. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/system/__init__.py +0 -0
  215. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/system/host_data.py +0 -0
  216. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/system/monitor.py +0 -0
  217. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/system_ops.py +0 -0
  218. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/utils/__init__.py +0 -0
  219. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/utils/async_updater.py +0 -0
  220. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/utils/conditions.py +0 -0
  221. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/utils/filter.py +0 -0
  222. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/utils/font_util.py +0 -0
  223. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/utils/logger.py +0 -0
  224. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/utils/overlay.py +0 -0
  225. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/utils/sun.py +0 -0
  226. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/utils/timeperiod.py +0 -0
  227. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/core/utils/util.py +0 -0
  228. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/24x16/adc.yaml +0 -0
  229. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/24x16/binary_sensor.yaml +0 -0
  230. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/24x16/config.yaml +0 -0
  231. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/24x16/event.yaml +0 -0
  232. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/24x16/mqtt.yaml +0 -0
  233. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/24x16/output24x16A.yaml +0 -0
  234. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/32x10/adc.yaml +0 -0
  235. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/32x10/binary_sensor.yaml +0 -0
  236. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/32x10/config.yaml +0 -0
  237. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/32x10/event.yaml +0 -0
  238. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/32x10/mqtt.yaml +0 -0
  239. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/32x10/output32x10A.yaml +0 -0
  240. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/48x4/adc.yaml +0 -0
  241. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/48x4/binary_sensor.yaml +0 -0
  242. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/48x4/config.yaml +0 -0
  243. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/48x4/event.yaml +0 -0
  244. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/48x4/mqtt.yaml +0 -0
  245. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/48x4/output48x4A.yaml +0 -0
  246. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/__init__.py +0 -0
  247. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/can_master.yaml +0 -0
  248. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/can_slave.yaml +0 -0
  249. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/cover/adc.yaml +0 -0
  250. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/cover/binary_sensor.yaml +0 -0
  251. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/cover/config.yaml +0 -0
  252. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/cover/cover.yaml +0 -0
  253. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/cover/event.yaml +0 -0
  254. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/cover/mqtt.yaml +0 -0
  255. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/cover/outputCover.yaml +0 -0
  256. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/cover_mix/adc.yaml +0 -0
  257. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/cover_mix/binary_sensor.yaml +0 -0
  258. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/cover_mix/config.yaml +0 -0
  259. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/cover_mix/cover.yaml +0 -0
  260. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/cover_mix/event.yaml +0 -0
  261. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/cover_mix/mqtt.yaml +0 -0
  262. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/cover_mix/outputCoverMix.yaml +0 -0
  263. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/different_configs/adc.yaml +0 -0
  264. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/different_configs/all_binary_sensor.yaml +0 -0
  265. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/different_configs/binary_sensor.yaml +0 -0
  266. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/different_configs/binary_sensor_v_0_7.yaml +0 -0
  267. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/different_configs/config_24_16.yaml +0 -0
  268. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/different_configs/event_all.yaml +0 -0
  269. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/different_configs/event_v_0_7.yaml +0 -0
  270. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/different_configs/led32x4A.yaml +0 -0
  271. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/different_configs/output24x16A.yaml +0 -0
  272. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/different_configs/output24x16A_v0.3.yaml +0 -0
  273. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/different_configs/output32x10A.yaml +0 -0
  274. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/example_config/different_configs/output32x5A.yaml +0 -0
  275. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/exceptions.py +0 -0
  276. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/__init__.py +0 -0
  277. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/analog/__init__.py +0 -0
  278. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/analog/adc.py +0 -0
  279. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/can/__init__.py +0 -0
  280. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/can/bridge.py +0 -0
  281. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/can/client.py +0 -0
  282. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/can/interface.py +0 -0
  283. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/can/node.py +0 -0
  284. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/can/node_id.py +0 -0
  285. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/can/test_od.py +0 -0
  286. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/display/__init__.py +0 -0
  287. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/display/early_oled.py +0 -0
  288. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/display/fonts/danube__.ttf +0 -0
  289. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/display/oled.py +0 -0
  290. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/gpio/__init__.py +0 -0
  291. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/gpio/expanders/__init__.py +0 -0
  292. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/gpio/expanders/mcp23017.py +0 -0
  293. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/gpio/expanders/pca9685.py +0 -0
  294. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/gpio/expanders/pcf8575.py +0 -0
  295. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/gpio/input/__init__.py +0 -0
  296. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/gpio/input/base.py +0 -0
  297. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/gpio/input/manager.py +0 -0
  298. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/i2c/__init__.py +0 -0
  299. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/i2c/bus.py +0 -0
  300. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/i2c/ina219.py +0 -0
  301. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/i2c/ina219_driver.py +0 -0
  302. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/i2c/ina226.py +0 -0
  303. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/i2c/ina226_driver.py +0 -0
  304. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/i2c/mcp9808.py +0 -0
  305. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/i2c/pct2075.py +0 -0
  306. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/onewire/__init__.py +0 -0
  307. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/onewire/dallas.py +0 -0
  308. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/sensor/__init__.py +0 -0
  309. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/sensor/temperature/__init__.py +0 -0
  310. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/sensor/temperature/base.py +0 -0
  311. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/sensor/temperature/mcp9808.py +0 -0
  312. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/hardware/sensor/temperature/pct2075.py +0 -0
  313. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/integration/__init__.py +0 -0
  314. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/integration/homeassistant.py +0 -0
  315. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/integration/interlock.py +0 -0
  316. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/integration/lox_template.py +0 -0
  317. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/__init__.py +0 -0
  318. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/actions.py +0 -0
  319. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/MANIFEST.sha256 +0 -0
  320. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/docker/daemon.json +0 -0
  321. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/docker/nodered/caddy/502.html +0 -0
  322. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/docker/nodered/caddy/init-certs.sh +0 -0
  323. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/docker/nodered/docker-compose-cloud.yaml +0 -0
  324. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/docker/nodered/docker-compose.yaml +0 -0
  325. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/docker/nodered/node-red/settings.js +0 -0
  326. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/helpers/boneio-containers +0 -0
  327. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/helpers/boneio-helpers-heal +0 -0
  328. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/helpers/boneio-migrate-v2 +0 -0
  329. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/helpers/boneio-system +0 -0
  330. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/issue.d/10-boneio.issue +0 -0
  331. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/journald/journald.conf +0 -0
  332. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/kernel/postinst-boneio-overlay +0 -0
  333. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/migrations-recovery.pem +0 -0
  334. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/migrations.pem +0 -0
  335. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/modules-load.d/onewire.conf +0 -0
  336. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/mosquitto/boneio.conf +0 -0
  337. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/sshd/10-boneio-hardening.conf +0 -0
  338. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/sudoers/boneio +0 -0
  339. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/sudoers/boneio-helpers +0 -0
  340. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/sudoers/boneio-timedatectl +0 -0
  341. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/systemd/boneio-helpers-heal.service +0 -0
  342. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/systemd/boneio-oled-boot.service +0 -0
  343. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/systemd/boneio-oled-shutdown.service +0 -0
  344. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/systemd/boneio.service +0 -0
  345. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/systemd/dropins/avahi-daemon-defer.conf +0 -0
  346. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/systemd/dropins/bb-usb-gadgets-defer.conf +0 -0
  347. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/systemd/dropins/mosquitto-priority.conf +0 -0
  348. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/systemd/dropins/timer-no-persistent.conf +0 -0
  349. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/systemd/dropins/user-manager-defer.conf +0 -0
  350. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/systemd/linger-marker +0 -0
  351. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/systemd/set-hostname-once.service +0 -0
  352. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/usr-local-bin/set-hostname-once.sh +0 -0
  353. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/usr-sbin/oled_boot_splash.py +0 -0
  354. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/usr-sbin/oled_boot_splash.sh +0 -0
  355. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/usr-sbin/oled_msg.py +0 -0
  356. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/usr-sbin/oled_msg.sh +0 -0
  357. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/assets/wheels/pyyaml-6.0.3-cp313-cp313-linux_armv7l.whl +0 -0
  358. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/bootstrap/boneio-migrate +0 -0
  359. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/bootstrap/install-helper.sh +0 -0
  360. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/bootstrap/sudoers-migrate +0 -0
  361. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.3.0.json +0 -0
  362. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.3.0.sig +0 -0
  363. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.3.1.json +0 -0
  364. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.3.1.sig +0 -0
  365. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.3.2.json +0 -0
  366. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.3.2.sig +0 -0
  367. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.4.0.json +0 -0
  368. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.4.0.sig +0 -0
  369. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.4.3.json +0 -0
  370. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.4.3.sig +0 -0
  371. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.4.4.json +0 -0
  372. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.4.4.sig +0 -0
  373. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.0.json +0 -0
  374. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.0.sig +0 -0
  375. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.1.json +0 -0
  376. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.1.sig +0 -0
  377. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.10.json +0 -0
  378. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.10.sig +0 -0
  379. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.11.json +0 -0
  380. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.11.sig +0 -0
  381. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.12.json +0 -0
  382. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.12.sig +0 -0
  383. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.13.json +0 -0
  384. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.13.sig +0 -0
  385. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.14.json +0 -0
  386. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.14.sig +0 -0
  387. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.15.json +0 -0
  388. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.15.sig +0 -0
  389. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.16.json +0 -0
  390. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.16.sig +0 -0
  391. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.17.json +0 -0
  392. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.17.sig +0 -0
  393. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.18.json +0 -0
  394. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.18.sig +0 -0
  395. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.2.json +0 -0
  396. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.2.sig +0 -0
  397. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.3.json +0 -0
  398. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.3.sig +0 -0
  399. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.4.json +0 -0
  400. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.4.sig +0 -0
  401. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.5.json +0 -0
  402. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.5.sig +0 -0
  403. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.6.json +0 -0
  404. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.6.sig +0 -0
  405. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.7.json +0 -0
  406. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.7.sig +0 -0
  407. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.8.json +0 -0
  408. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.8.sig +0 -0
  409. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.9.json +0 -0
  410. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.5.9.sig +0 -0
  411. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.0.json +0 -0
  412. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.0.sig +0 -0
  413. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.1.json +0 -0
  414. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.1.sig +0 -0
  415. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.10.json +0 -0
  416. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.10.sig +0 -0
  417. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.11.json +0 -0
  418. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.11.sig +0 -0
  419. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.12.json +0 -0
  420. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.12.sig +0 -0
  421. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.13.json +0 -0
  422. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.13.sig +0 -0
  423. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.14.json +0 -0
  424. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.14.sig +0 -0
  425. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.2.json +0 -0
  426. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.2.sig +0 -0
  427. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.3.json +0 -0
  428. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.3.sig +0 -0
  429. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.4.json +0 -0
  430. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.4.sig +0 -0
  431. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.5.json +0 -0
  432. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.5.sig +0 -0
  433. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.6.json +0 -0
  434. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.6.sig +0 -0
  435. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.7.json +0 -0
  436. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.7.sig +0 -0
  437. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.8.json +0 -0
  438. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.8.sig +0 -0
  439. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.9.json +0 -0
  440. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/plans/1.6.9.sig +0 -0
  441. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/runner.py +0 -0
  442. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/__init__.py +0 -0
  443. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_3_0_baseline.py +0 -0
  444. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_3_1_fix_oled_boot.py +0 -0
  445. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_3_2_cleanup_can_sudoers.py +0 -0
  446. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_4_0_fix_mqtt_sudoers.py +0 -0
  447. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_4_3_oled_shutdown.py +0 -0
  448. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_4_4_caddy.py +0 -0
  449. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_0_fix_oled_fifo_permissions.py +0 -0
  450. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_10_disable_console_setup.py +0 -0
  451. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_11_timer_catchup.py +0 -0
  452. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_12_oled_splash_off_critical_path.py +0 -0
  453. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_13_mosquitto_priority.py +0 -0
  454. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_14_journal_apparent_size.py +0 -0
  455. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_15_prune_orphan_journals.py +0 -0
  456. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_16_login_linger.py +0 -0
  457. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_17_defer_user_manager.py +0 -0
  458. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_18_fix_hostname_once.py +0 -0
  459. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_1_ufw_lox_udp.py +0 -0
  460. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_2_libyaml.py +0 -0
  461. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_3_libyaml_retry.py +0 -0
  462. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_4_onewire_modules.py +0 -0
  463. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_5_overlay_kernel_hook.py +0 -0
  464. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_6_boot_service_order.py +0 -0
  465. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_7_journald_limits.py +0 -0
  466. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_8_apparmor_prune.py +0 -0
  467. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_5_9_defer_nonessential.py +0 -0
  468. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_6_0_nodered_admin_auth.py +0 -0
  469. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_6_10_narrow_sudo_rules.py +0 -0
  470. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_6_11_drop_docker_group.py +0 -0
  471. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_6_12_console_shows_ip.py +0 -0
  472. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_6_13_custom_certificate.py +0 -0
  473. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_6_14_certificate_lifetime.py +0 -0
  474. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_6_1_mosquitto_passwd_perms.py +0 -0
  475. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_6_2_drop_build_sudo_rule.py +0 -0
  476. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_6_3_firewall_rule_gaps.py +0 -0
  477. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_6_4_ssh_login_hardening.py +0 -0
  478. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_6_5_trust_transition.py +0 -0
  479. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_6_6_retire_legacy_helper.py +0 -0
  480. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_6_7_timedatectl_sudoers.py +0 -0
  481. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_6_8_system_helper.py +0 -0
  482. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/migrations/versions/v1_6_9_ntp_servers.py +0 -0
  483. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/__init__.py +0 -0
  484. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/cli.py +0 -0
  485. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/client.py +0 -0
  486. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/coordinator.py +0 -0
  487. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/__init__.py +0 -0
  488. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/energy_meters/dts1964_3f.json +0 -0
  489. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/energy_meters/le-03mw.json +0 -0
  490. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/energy_meters/le-03mwct.json +0 -0
  491. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/energy_meters/orno-or-we-517.json +0 -0
  492. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/energy_meters/sdm120.json +0 -0
  493. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/energy_meters/sdm630.json +0 -0
  494. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/energy_meters/socomec_e03.json +0 -0
  495. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/energy_meters/socomec_e23.json +0 -0
  496. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/hvac/defro-drx.json +0 -0
  497. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/hvac/eht-topventil-plus.json +0 -0
  498. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/hvac/fujitsu-ac.json +0 -0
  499. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/hvac/thessla.json +0 -0
  500. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/hvac/ventclear.json +0 -0
  501. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/hvac/wanas415.json +0 -0
  502. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/inverters/sofar.json +0 -0
  503. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/other/esp32_relay_x4_modbus.json +0 -0
  504. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/other/n4dsc08.json +0 -0
  505. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/other/r4dcb08.json +0 -0
  506. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/sensors/boneio-edge-temp.json +0 -0
  507. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/sensors/cwt.json +0 -0
  508. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/sensors/dyp-a12-ultrasonic.json +0 -0
  509. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/sensors/gdfs.json +0 -0
  510. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/sensors/gdfx.json +0 -0
  511. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/sensors/liquid-sensor.json +0 -0
  512. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/sensors/pt100.json +0 -0
  513. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/sensors/qdw90a.json +0 -0
  514. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/sensors/sht20.json +0 -0
  515. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/devices/sensors/sht30.json +0 -0
  516. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/entities/__init__.py +0 -0
  517. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/entities/base.py +0 -0
  518. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/entities/derived/__init__.py +0 -0
  519. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/entities/derived/numeric.py +0 -0
  520. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/entities/derived/select.py +0 -0
  521. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/entities/derived/switch.py +0 -0
  522. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/entities/derived/text.py +0 -0
  523. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/entities/sensor/__init__.py +0 -0
  524. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/entities/sensor/binary.py +0 -0
  525. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/entities/sensor/numeric.py +0 -0
  526. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/entities/sensor/text.py +0 -0
  527. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/entities/writeable/__init__.py +0 -0
  528. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/entities/writeable/binary.py +0 -0
  529. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/entities/writeable/numeric.py +0 -0
  530. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/mock_coordinator.py +0 -0
  531. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/modbus/utils.py +0 -0
  532. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/models/__init__.py +0 -0
  533. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/models/actions.py +0 -0
  534. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/models/events.py +0 -0
  535. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/models/files.py +0 -0
  536. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/models/logs.py +0 -0
  537. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/models/mqtt.py +0 -0
  538. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/models/state.py +0 -0
  539. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/runner.py +0 -0
  540. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/schema/actions.yaml +0 -0
  541. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/schema/actions_sensor.yaml +0 -0
  542. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/schema/actions_switch.yaml +0 -0
  543. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/schema/condition.yaml +0 -0
  544. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/schema/filters.yaml +0 -0
  545. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/schema/filters_adc.yaml +0 -0
  546. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/schema/id.yaml +0 -0
  547. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/schema/remote_devices.yaml +0 -0
  548. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/schema/remote_inputs.yaml +0 -0
  549. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/schema/remote_outputs.yaml +0 -0
  550. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/schema/schema.yaml +0 -0
  551. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/schema/temp_unit.yaml +0 -0
  552. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/schema/update_interval.yaml +0 -0
  553. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/action_validation.py +0 -0
  554. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/app.py +0 -0
  555. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/dashboard_cards.py +0 -0
  556. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/AppInitContext-CsffdB9c.js +0 -0
  557. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/EntityGrid-BDdmT0qN.js +0 -0
  558. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/LongPressWrapper-BKkWvoC1.js +0 -0
  559. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/NodeRedView-Ct08K8xu.js +0 -0
  560. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/Sparkline-D-2-v-7o.js +0 -0
  561. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/ViewToggle-B8OpHNHc.js +0 -0
  562. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/aiConfig-_hPXvgdY.js +0 -0
  563. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/aiWizardPrompt-Dc7dZBzw.js +0 -0
  564. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/axios-uEi8e3Ln.js +0 -0
  565. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/basePath-CxHj-SSK.js +0 -0
  566. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/chunk-QTnfLwEv.js +0 -0
  567. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/clipboard-CCtx29e-.js +0 -0
  568. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/codicon-ngg6Pgfi.ttf +0 -0
  569. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/configCache-CLN4xEny.js +0 -0
  570. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/coverUtils-Cf4Uxn2U.js +0 -0
  571. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/createLucideIcon-BEjh8B3y.js +0 -0
  572. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/editor.worker-Cn2oRESe.js +0 -0
  573. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/fa-BEzM11bH.js +0 -0
  574. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/formatters-zOiGPJLh.js +0 -0
  575. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/gi-tOlGxC0X.js +0 -0
  576. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/index-lVrZSgFS.css +0 -0
  577. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/longPress-Dx7OCSyP.js +0 -0
  578. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/monaco-Br_kD0ds.css +0 -0
  579. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/monaco-DUFfd7ef.js +0 -0
  580. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/monaco-Dpn-hvLa.js +0 -0
  581. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/select-D3PIwbEj.js +0 -0
  582. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/tabs-box-Byn-MOyS.js +0 -0
  583. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/utils-B6KiDbIe.js +0 -0
  584. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/workbox-window.prod.es5-Bd17z0YL.js +0 -0
  585. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/assets/yaml.worker-8qQfrID5.js +0 -0
  586. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/boneio-192.png +0 -0
  587. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/boneio-512.png +0 -0
  588. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/boneio.svg +0 -0
  589. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/boneio_fav.svg +0 -0
  590. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/adc.schema.json +0 -0
  591. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/areas.schema.json +0 -0
  592. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/binary_sensor.schema.json +0 -0
  593. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/boneio.schema.json +0 -0
  594. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/can.schema.json +0 -0
  595. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/config.schema.json +0 -0
  596. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/cover.schema.json +0 -0
  597. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/dallas.schema.json +0 -0
  598. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/ds2482.schema.json +0 -0
  599. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/event.schema.json +0 -0
  600. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/ina219.schema.json +0 -0
  601. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/ina226.schema.json +0 -0
  602. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/irrigation.schema.json +0 -0
  603. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/lm75.schema.json +0 -0
  604. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/location.schema.json +0 -0
  605. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/logger.schema.json +0 -0
  606. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/lox_udp.schema.json +0 -0
  607. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/mcp23017.schema.json +0 -0
  608. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/mcp9808.schema.json +0 -0
  609. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/modbus.schema.json +0 -0
  610. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/modbus_devices.schema.json +0 -0
  611. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/mqtt.schema.json +0 -0
  612. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/oled.schema.json +0 -0
  613. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/output.schema.json +0 -0
  614. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/output_group.schema.json +0 -0
  615. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/pca9685.schema.json +0 -0
  616. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/pcf8575.schema.json +0 -0
  617. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/remote_devices.schema.json +0 -0
  618. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/remote_inputs.schema.json +0 -0
  619. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/remote_outputs.schema.json +0 -0
  620. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/schedule.schema.json +0 -0
  621. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/sensor.schema.json +0 -0
  622. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/template.schema.json +0 -0
  623. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/virtual_energy_sensor.schema.json +0 -0
  624. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/schema/web.schema.json +0 -0
  625. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/frontend-dist/workbox-7e79c025.js +0 -0
  626. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/hvac_svg_templates.py +0 -0
  627. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/middleware/__init__.py +0 -0
  628. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/middleware/csrf.py +0 -0
  629. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/middleware/policy.py +0 -0
  630. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/modbus_card_templates.py +0 -0
  631. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/rate_limit.py +0 -0
  632. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/__init__.py +0 -0
  633. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/accounts.py +0 -0
  634. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/auth.py +0 -0
  635. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/can.py +0 -0
  636. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/config.py +0 -0
  637. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/config_actions.py +0 -0
  638. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/config_backups.py +0 -0
  639. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/config_core.py +0 -0
  640. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/config_discovery.py +0 -0
  641. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/config_files.py +0 -0
  642. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/covers.py +0 -0
  643. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/dashboard.py +0 -0
  644. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/dev_fake_device.py +0 -0
  645. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/diagnostics.py +0 -0
  646. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/irrigation.py +0 -0
  647. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/migrations.py +0 -0
  648. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/modbus.py +0 -0
  649. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/mqtt_reference.py +0 -0
  650. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/nodered.py +0 -0
  651. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/onboarding.py +0 -0
  652. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/outputs.py +0 -0
  653. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/remote_devices.py +0 -0
  654. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/schedule.py +0 -0
  655. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/security.py +0 -0
  656. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/sensors.py +0 -0
  657. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/sun.py +0 -0
  658. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/system.py +0 -0
  659. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/templates.py +0 -0
  660. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/timezone_sudoers.py +0 -0
  661. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/tools.py +0 -0
  662. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/routes/update.py +0 -0
  663. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/adc.schema.json +0 -0
  664. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/areas.schema.json +0 -0
  665. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/binary_sensor.schema.json +0 -0
  666. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/boneio.schema.json +0 -0
  667. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/can.schema.json +0 -0
  668. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/config.schema.json +0 -0
  669. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/cover.schema.json +0 -0
  670. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/dallas.schema.json +0 -0
  671. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/ds2482.schema.json +0 -0
  672. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/event.schema.json +0 -0
  673. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/ina219.schema.json +0 -0
  674. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/ina226.schema.json +0 -0
  675. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/irrigation.schema.json +0 -0
  676. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/lm75.schema.json +0 -0
  677. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/location.schema.json +0 -0
  678. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/logger.schema.json +0 -0
  679. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/lox_udp.schema.json +0 -0
  680. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/mcp23017.schema.json +0 -0
  681. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/mcp9808.schema.json +0 -0
  682. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/modbus.schema.json +0 -0
  683. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/modbus_devices.schema.json +0 -0
  684. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/mqtt.schema.json +0 -0
  685. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/oled.schema.json +0 -0
  686. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/output.schema.json +0 -0
  687. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/output_group.schema.json +0 -0
  688. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/pca9685.schema.json +0 -0
  689. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/pcf8575.schema.json +0 -0
  690. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/remote_devices.schema.json +0 -0
  691. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/remote_inputs.schema.json +0 -0
  692. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/remote_outputs.schema.json +0 -0
  693. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/schedule.schema.json +0 -0
  694. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/sensor.schema.json +0 -0
  695. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/template.schema.json +0 -0
  696. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/virtual_energy_sensor.schema.json +0 -0
  697. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/schema/web.schema.json +0 -0
  698. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/security_headers.py +0 -0
  699. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/services/__init__.py +0 -0
  700. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/services/logs.py +0 -0
  701. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/sudo_rate_limiter.py +0 -0
  702. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio/webui/web_server.py +0 -0
  703. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio.egg-info/dependency_links.txt +0 -0
  704. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio.egg-info/entry_points.txt +0 -0
  705. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/boneio.egg-info/top_level.txt +0 -0
  706. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/setup.cfg +0 -0
  707. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/setup.py +0 -0
  708. {boneio-1.6.0.dev8 → boneio-1.6.0.dev10}/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.dev8
3
+ Version: 1.6.0.dev10
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
@@ -13,7 +13,7 @@ Description-Content-Type: text/markdown
13
13
  License-File: LICENSE
14
14
  Requires-Dist: smbus2==0.4.3
15
15
  Requires-Dist: aiomqtt==2.4.0
16
- Requires-Dist: aiohttp==3.14.1
16
+ Requires-Dist: aiohttp==3.14.3
17
17
  Requires-Dist: Cerberus==1.3.7
18
18
  Requires-Dist: colorlog==6.9.0
19
19
  Requires-Dist: luma-core==2.5.1
@@ -23,19 +23,22 @@ Requires-Dist: pyserial-asyncio-fast==0.16
23
23
  Requires-Dist: PyYAML==6.0.3
24
24
  Requires-Dist: psutil==7.2.2
25
25
  Requires-Dist: w1thermsensor[async]==2.3.0
26
- Requires-Dist: fastapi==0.118.0
26
+ Requires-Dist: fastapi==0.141.1
27
+ Requires-Dist: starlette>=1.3.1
27
28
  Requires-Dist: pydantic==2.11.9
28
29
  Requires-Dist: hypercorn==0.18.0
29
30
  Requires-Dist: websockets==15.0.1
30
- Requires-Dist: python-jose[cryptography]==3.5.0
31
- Requires-Dist: python-multipart==0.0.22
31
+ Requires-Dist: PyJWT==2.14.0
32
+ Requires-Dist: python-multipart==0.0.31
32
33
  Requires-Dist: qrcode==8.2
33
34
  Requires-Dist: gpiod==2.3.0
34
- Requires-Dist: requests==2.32.5
35
+ Requires-Dist: requests==2.33.0
35
36
  Requires-Dist: packaging==25.0
36
37
  Requires-Dist: aioesphomeapi>=45.0.0
37
38
  Requires-Dist: zeroconf>=0.148.0
38
39
  Requires-Dist: canopen-asyncio>=2.4.1
40
+ Requires-Dist: anyio>=4.14.2
41
+ Requires-Dist: cryptography>=50.0.0; platform_system == "Linux"
39
42
  Dynamic: license-file
40
43
 
41
44
  Example usage:
@@ -1 +1 @@
1
- {"plans":{"1.3.0":"3199d74a6dda33162bbee4fc650a5a0d70d5372258f3305ad92501215e22a7fd","1.3.1":"580381a4f6f40fc1bd4e903e591ad0d5c1db27daaccafc6f79dabf8c3b84259a","1.3.2":"7a69ffaf0c41438be25a656dcdc87783daac0eae79218d023648ef9d708e373f","1.4.0":"41c3a16e7819857a4b826e944fcfb4f79c58e7192cb151b106a3acd7487d5771","1.4.3":"a8cfbabff09d21944a822c4a70f23a7ee14960c4054de151c9fbc7cdb29adff5","1.4.4":"8658ec11d4b2d32e2e5c6154a7b052f518aecdd4d610a99a05a462aded671079","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":"6e4a259795749084d2d01f97750a57528662898edf14a3a990ccfaffd414ac44","1.6.14":"6e4a259795749084d2d01f97750a57528662898edf14a3a990ccfaffd414ac44","1.6.2":"6ef96b5e00a04a929d16f0e4a136bfcc5b8132a466d6907a99b2c8516a8952d5","1.6.3":"5c10db827bcb92b9322d4aa5751076b825da87c6d18d6953847ba72317cca862","1.6.4":"baf2bb1c2ec7c1bfccfc514ef1cef67907e056e4f7153bb5932ecb835c9cff78","1.6.5":"358dacbc8d16b1b665167de3bc1c42d101d82733502048f345184d1841ce03f2","1.6.6":"535bb041b99d5ac1bc9028ea88bc2fbf3dbadc80ea8dea236cc219123c194114","1.6.7":"d59af413e270e6f34b1b9a1c8c4acef35328f00e26fad447cfe214545af78d8f","1.6.8":"7175f827b99c602df80436db588c87277ce50f2734051a444163b048f5d0b23e","1.6.9":"732d5a9bcd2e496a260263a643c78a6346e9f3cef5b48fe59ac6b120bd03ba4e"},"release":"1.6.0.dev8"}
1
+ {"plans":{"1.3.0":"3199d74a6dda33162bbee4fc650a5a0d70d5372258f3305ad92501215e22a7fd","1.3.1":"580381a4f6f40fc1bd4e903e591ad0d5c1db27daaccafc6f79dabf8c3b84259a","1.3.2":"7a69ffaf0c41438be25a656dcdc87783daac0eae79218d023648ef9d708e373f","1.4.0":"41c3a16e7819857a4b826e944fcfb4f79c58e7192cb151b106a3acd7487d5771","1.4.3":"a8cfbabff09d21944a822c4a70f23a7ee14960c4054de151c9fbc7cdb29adff5","1.4.4":"8658ec11d4b2d32e2e5c6154a7b052f518aecdd4d610a99a05a462aded671079","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":"6e4a259795749084d2d01f97750a57528662898edf14a3a990ccfaffd414ac44","1.6.14":"6e4a259795749084d2d01f97750a57528662898edf14a3a990ccfaffd414ac44","1.6.2":"6ef96b5e00a04a929d16f0e4a136bfcc5b8132a466d6907a99b2c8516a8952d5","1.6.3":"5c10db827bcb92b9322d4aa5751076b825da87c6d18d6953847ba72317cca862","1.6.4":"baf2bb1c2ec7c1bfccfc514ef1cef67907e056e4f7153bb5932ecb835c9cff78","1.6.5":"358dacbc8d16b1b665167de3bc1c42d101d82733502048f345184d1841ce03f2","1.6.6":"535bb041b99d5ac1bc9028ea88bc2fbf3dbadc80ea8dea236cc219123c194114","1.6.7":"d59af413e270e6f34b1b9a1c8c4acef35328f00e26fad447cfe214545af78d8f","1.6.8":"7175f827b99c602df80436db588c87277ce50f2734051a444163b048f5d0b23e","1.6.9":"732d5a9bcd2e496a260263a643c78a6346e9f3cef5b48fe59ac6b120bd03ba4e"},"release":"1.6.0.dev10"}
@@ -0,0 +1 @@
1
+ �I8�������m��� ��EF~��:^�i%��CZeUp-Y�f�z$[��g%�ur�����l
@@ -0,0 +1,2 @@
1
+ # flake8: noqa
2
+ __version__ = "1.6.0.dev10"
@@ -36,6 +36,17 @@ _LOGGER = logging.getLogger(__name__)
36
36
  #: is a bridge created for a compose project.
37
37
  _BRIDGE_PREFIXES = ("docker0", "br-")
38
38
 
39
+ #: The USB gadget link — a cable between this controller and one computer,
40
+ #: carrying 192.168.7.2 by default.
41
+ #:
42
+ #: Kept when the panel is taken off the network, because it is not the network:
43
+ #: it is a cable somebody has plugged into the device, which is physical access
44
+ #: they already have. It is also how the factory station reaches a board that
45
+ #: has no other address yet, and how anyone recovers a controller whose
46
+ #: Ethernet is misconfigured. Closing it would take away the way back and
47
+ #: protect nothing.
48
+ _USB_PREFIXES = ("usb",)
49
+
39
50
  LOOPBACK = "127.0.0.1"
40
51
 
41
52
 
@@ -57,10 +68,37 @@ def docker_bridge_addresses() -> list[str]:
57
68
  Returns:
58
69
  Addresses, in a stable order, or an empty list when none can be found.
59
70
  """
71
+ return _addresses_of(_BRIDGE_PREFIXES)
72
+
73
+
74
+ def usb_gadget_addresses() -> list[str]:
75
+ """IPv4 addresses of the USB gadget link, when a cable is connected.
76
+
77
+ systemd-networkd only applies the address once the link comes up, so this
78
+ is empty on a controller with nothing plugged in — which is most of them,
79
+ most of the time. A device switched to proxy-only therefore answers over
80
+ USB when it was started with the cable in, as it is on the factory
81
+ station, and after a restart otherwise.
82
+
83
+ Returns:
84
+ Addresses, or an empty list when no cable is connected.
85
+ """
86
+ return _addresses_of(_USB_PREFIXES)
87
+
88
+
89
+ def _addresses_of(prefixes: tuple[str, ...]) -> list[str]:
90
+ """IPv4 addresses of every interface whose name starts with one of these.
91
+
92
+ Args:
93
+ prefixes: Interface name prefixes to match.
94
+
95
+ Returns:
96
+ Addresses, sorted, without duplicates.
97
+ """
60
98
  addresses: list[str] = []
61
99
  try:
62
100
  for name, addrs in psutil.net_if_addrs().items():
63
- if not name.startswith(_BRIDGE_PREFIXES):
101
+ if not name.startswith(prefixes):
64
102
  continue
65
103
  for addr in addrs:
66
104
  if getattr(addr, "family", None) is not None and addr.address:
@@ -69,7 +107,7 @@ def docker_bridge_addresses() -> list[str]:
69
107
  if int(addr.family) == 2:
70
108
  addresses.append(addr.address)
71
109
  except Exception as err: # noqa: BLE001
72
- _LOGGER.warning("Could not enumerate Docker bridges: %s", err)
110
+ _LOGGER.warning("Could not enumerate network interfaces: %s", err)
73
111
  return sorted(set(addresses))
74
112
 
75
113
 
@@ -126,7 +164,7 @@ def binds_for(exposure: str, port: int, wait: float = BRIDGE_WAIT_SECONDS) -> li
126
164
  if exposure != Exposure.PROXY:
127
165
  return [f"0.0.0.0:{port}"]
128
166
 
129
- hosts = [LOOPBACK, *_wait_for_a_bridge(wait)]
167
+ hosts = [LOOPBACK, *_wait_for_a_bridge(wait), *usb_gadget_addresses()]
130
168
  if len(hosts) == 1:
131
169
  # No bridge found. Binding the loopback alone would leave the panel
132
170
  # unreachable from anywhere but the device itself, so this says what
@@ -1 +1 @@
1
- import{r as e}from"./chunk-QTnfLwEv.js";import{Qt as t,Zt as n,an as r,in as i}from"./fa-BEzM11bH.js";import{n as a}from"./axios-uEi8e3Ln.js";import{F as o,I as s,L as c,P as l,c as u,d,h as f,u as p,x as m}from"./index-DTsVYLUw.js";var h=e(r(),1),g=i();function _(e,t){return e?.response?.data?.detail||t}function v(){let{t:e}=s(),{username:r,isAdmin:i}=c(),[v,y]=(0,h.useState)([]),[b,x]=(0,h.useState)(!0),[S,C]=(0,h.useState)(null),[w,T]=(0,h.useState)(null),[E,D]=(0,h.useState)(``),[O,k]=(0,h.useState)(``),[A,j]=(0,h.useState)(`viewer`),[M,N]=(0,h.useState)(!1),P=O?o(O,E):null,F=P?e(l[P],{min:8}):null,I=(0,h.useCallback)(async()=>{try{let{data:e}=await a.get(`/api/accounts`);y(e.accounts??[]),C(null)}catch(t){C(_(t,e(`accounts.load_failed`)))}finally{x(!1)}},[e]);(0,h.useEffect)(()=>{i&&I()},[i,I]);let L=async t=>{t.preventDefault(),C(null),T(null),N(!0);try{await a.post(`/api/accounts`,{username:E,password:O,role:A}),D(``),k(``),j(`viewer`),T(e(`accounts.created`)),await I()}catch(t){C(_(t,e(`accounts.create_failed`)))}finally{N(!1)}},R=async t=>{if(window.confirm(e(`accounts.confirm_delete`,{username:t.username}))){C(null),T(null);try{await a.delete(`/api/accounts/${encodeURIComponent(t.username)}`),T(e(`accounts.deleted`,{username:t.username})),await I()}catch(t){C(_(t,e(`accounts.delete_failed`)))}}},z=async(t,n)=>{C(null),T(null);try{await a.put(`/api/accounts/${encodeURIComponent(t.username)}/role`,{role:n}),await I()}catch(t){C(_(t,e(`accounts.role_failed`))),await I()}},B=async t=>{let n=window.prompt(e(`accounts.prompt_new_password`,{username:t.username}));if(!n)return;C(null),T(null);let r=o(n,t.username);if(r){C(e(l[r],{min:8}));return}try{await a.put(`/api/accounts/${encodeURIComponent(t.username)}/password`,{password:n}),T(e(`accounts.password_reset`,{username:t.username}))}catch(t){C(_(t,e(`accounts.password_failed`)))}};return i?(0,g.jsxs)(m,{width:`wide`,children:[S&&(0,g.jsx)(u,{variant:`error`,message:S}),w&&(0,g.jsx)(u,{variant:`success`,message:w}),(0,g.jsx)(f,{icon:(0,g.jsx)(t,{}),title:e(`accounts.title`),children:b?(0,g.jsx)(`div`,{className:`flex justify-center py-6`,children:(0,g.jsx)(`span`,{className:`loading loading-spinner loading-md text-primary`})}):(0,g.jsx)(`div`,{className:`stg-inset overflow-x-auto`,children:(0,g.jsxs)(`table`,{className:`table table-sm`,children:[(0,g.jsx)(`thead`,{children:(0,g.jsxs)(`tr`,{children:[(0,g.jsx)(`th`,{children:e(`accounts.username`)}),(0,g.jsx)(`th`,{children:e(`accounts.role`)}),(0,g.jsx)(`th`,{className:`text-right`,children:e(`accounts.actions`)})]})}),(0,g.jsx)(`tbody`,{children:v.map(t=>{let n=t.username.toLowerCase()===(r??``).toLowerCase();return(0,g.jsxs)(`tr`,{children:[(0,g.jsxs)(`td`,{children:[(0,g.jsx)(`span`,{className:`font-medium font-mono`,children:t.username}),n&&(0,g.jsx)(`span`,{className:`ml-2 badge badge-ghost badge-xs`,children:e(`accounts.you`)})]}),(0,g.jsx)(`td`,{children:(0,g.jsxs)(`select`,{className:`select select-xs select-bordered`,value:t.role,disabled:n,onChange:e=>z(t,e.target.value),children:[(0,g.jsx)(`option`,{value:`admin`,children:e(`accounts.role_admin`)}),(0,g.jsx)(`option`,{value:`viewer`,children:e(`accounts.role_viewer`)})]})}),(0,g.jsxs)(`td`,{className:`text-right whitespace-nowrap`,children:[(0,g.jsx)(`button`,{className:`btn btn-ghost btn-xs`,onClick:()=>B(t),children:e(`accounts.reset_password`)}),(0,g.jsx)(`button`,{className:`btn btn-ghost btn-xs text-error ml-1`,disabled:n,onClick:()=>R(t),children:e(`accounts.delete`)})]})]},t.username)})})]})})}),(0,g.jsx)(`form`,{onSubmit:L,children:(0,g.jsx)(f,{icon:(0,g.jsx)(n,{}),title:e(`accounts.add_title`),description:e(`accounts.add_intro`),footer:(0,g.jsx)(p,{children:(0,g.jsxs)(`button`,{type:`submit`,className:`btn btn-primary btn-sm gap-2`,disabled:M||!E||!O||!!F,children:[M&&(0,g.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),e(`accounts.add_button`)]})}),children:(0,g.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-[1fr_1fr_auto] gap-3`,children:[(0,g.jsx)(d,{label:e(`accounts.username`),children:(0,g.jsx)(`input`,{type:`text`,className:`input input-bordered w-full font-mono`,placeholder:e(`accounts.username`),autoComplete:`off`,required:!0,value:E,onChange:e=>D(e.target.value)})}),(0,g.jsx)(d,{label:e(`accounts.password`),error:F||void 0,children:(0,g.jsx)(`input`,{type:`password`,className:`input input-bordered w-full font-mono ${F?`input-error`:``}`,placeholder:e(`accounts.password`),autoComplete:`new-password`,required:!0,minLength:8,"aria-invalid":F?!0:void 0,"aria-describedby":F?`accounts-password-error`:void 0,value:O,onChange:e=>k(e.target.value)})}),(0,g.jsx)(d,{label:e(`accounts.role`),className:`sm:w-40`,children:(0,g.jsxs)(`select`,{className:`select select-bordered w-full`,value:A,onChange:e=>j(e.target.value),children:[(0,g.jsx)(`option`,{value:`viewer`,children:e(`accounts.role_viewer`)}),(0,g.jsx)(`option`,{value:`admin`,children:e(`accounts.role_admin`)})]})})]})})})]}):(0,g.jsx)(m,{width:`wide`,children:(0,g.jsx)(u,{variant:`warning`,message:e(`accounts.admin_only`)})})}export{v as default};
1
+ import{r as e}from"./chunk-QTnfLwEv.js";import{Qt as t,Zt as n,an as r,in as i}from"./fa-BEzM11bH.js";import{n as a}from"./axios-uEi8e3Ln.js";import{F as o,I as s,L as c,P as l,c as u,d,h as f,u as p,x as m}from"./index-b1MgMQ6k.js";var h=e(r(),1),g=i();function _(e,t){return e?.response?.data?.detail||t}function v(){let{t:e}=s(),{username:r,isAdmin:i}=c(),[v,y]=(0,h.useState)([]),[b,x]=(0,h.useState)(!0),[S,C]=(0,h.useState)(null),[w,T]=(0,h.useState)(null),[E,D]=(0,h.useState)(``),[O,k]=(0,h.useState)(``),[A,j]=(0,h.useState)(`viewer`),[M,N]=(0,h.useState)(!1),P=O?o(O,E):null,F=P?e(l[P],{min:8}):null,I=(0,h.useCallback)(async()=>{try{let{data:e}=await a.get(`/api/accounts`);y(e.accounts??[]),C(null)}catch(t){C(_(t,e(`accounts.load_failed`)))}finally{x(!1)}},[e]);(0,h.useEffect)(()=>{i&&I()},[i,I]);let L=async t=>{t.preventDefault(),C(null),T(null),N(!0);try{await a.post(`/api/accounts`,{username:E,password:O,role:A}),D(``),k(``),j(`viewer`),T(e(`accounts.created`)),await I()}catch(t){C(_(t,e(`accounts.create_failed`)))}finally{N(!1)}},R=async t=>{if(window.confirm(e(`accounts.confirm_delete`,{username:t.username}))){C(null),T(null);try{await a.delete(`/api/accounts/${encodeURIComponent(t.username)}`),T(e(`accounts.deleted`,{username:t.username})),await I()}catch(t){C(_(t,e(`accounts.delete_failed`)))}}},z=async(t,n)=>{C(null),T(null);try{await a.put(`/api/accounts/${encodeURIComponent(t.username)}/role`,{role:n}),await I()}catch(t){C(_(t,e(`accounts.role_failed`))),await I()}},B=async t=>{let n=window.prompt(e(`accounts.prompt_new_password`,{username:t.username}));if(!n)return;C(null),T(null);let r=o(n,t.username);if(r){C(e(l[r],{min:8}));return}try{await a.put(`/api/accounts/${encodeURIComponent(t.username)}/password`,{password:n}),T(e(`accounts.password_reset`,{username:t.username}))}catch(t){C(_(t,e(`accounts.password_failed`)))}};return i?(0,g.jsxs)(m,{width:`wide`,children:[S&&(0,g.jsx)(u,{variant:`error`,message:S}),w&&(0,g.jsx)(u,{variant:`success`,message:w}),(0,g.jsx)(f,{icon:(0,g.jsx)(t,{}),title:e(`accounts.title`),children:b?(0,g.jsx)(`div`,{className:`flex justify-center py-6`,children:(0,g.jsx)(`span`,{className:`loading loading-spinner loading-md text-primary`})}):(0,g.jsx)(`div`,{className:`stg-inset overflow-x-auto`,children:(0,g.jsxs)(`table`,{className:`table table-sm`,children:[(0,g.jsx)(`thead`,{children:(0,g.jsxs)(`tr`,{children:[(0,g.jsx)(`th`,{children:e(`accounts.username`)}),(0,g.jsx)(`th`,{children:e(`accounts.role`)}),(0,g.jsx)(`th`,{className:`text-right`,children:e(`accounts.actions`)})]})}),(0,g.jsx)(`tbody`,{children:v.map(t=>{let n=t.username.toLowerCase()===(r??``).toLowerCase();return(0,g.jsxs)(`tr`,{children:[(0,g.jsxs)(`td`,{children:[(0,g.jsx)(`span`,{className:`font-medium font-mono`,children:t.username}),n&&(0,g.jsx)(`span`,{className:`ml-2 badge badge-ghost badge-xs`,children:e(`accounts.you`)})]}),(0,g.jsx)(`td`,{children:(0,g.jsxs)(`select`,{className:`select select-xs select-bordered`,value:t.role,disabled:n,onChange:e=>z(t,e.target.value),children:[(0,g.jsx)(`option`,{value:`admin`,children:e(`accounts.role_admin`)}),(0,g.jsx)(`option`,{value:`viewer`,children:e(`accounts.role_viewer`)})]})}),(0,g.jsxs)(`td`,{className:`text-right whitespace-nowrap`,children:[(0,g.jsx)(`button`,{className:`btn btn-ghost btn-xs`,onClick:()=>B(t),children:e(`accounts.reset_password`)}),(0,g.jsx)(`button`,{className:`btn btn-ghost btn-xs text-error ml-1`,disabled:n,onClick:()=>R(t),children:e(`accounts.delete`)})]})]},t.username)})})]})})}),(0,g.jsx)(`form`,{onSubmit:L,children:(0,g.jsx)(f,{icon:(0,g.jsx)(n,{}),title:e(`accounts.add_title`),description:e(`accounts.add_intro`),footer:(0,g.jsx)(p,{children:(0,g.jsxs)(`button`,{type:`submit`,className:`btn btn-primary btn-sm gap-2`,disabled:M||!E||!O||!!F,children:[M&&(0,g.jsx)(`span`,{className:`loading loading-spinner loading-xs`}),e(`accounts.add_button`)]})}),children:(0,g.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-[1fr_1fr_auto] gap-3`,children:[(0,g.jsx)(d,{label:e(`accounts.username`),children:(0,g.jsx)(`input`,{type:`text`,className:`input input-bordered w-full font-mono`,placeholder:e(`accounts.username`),autoComplete:`off`,required:!0,value:E,onChange:e=>D(e.target.value)})}),(0,g.jsx)(d,{label:e(`accounts.password`),error:F||void 0,children:(0,g.jsx)(`input`,{type:`password`,className:`input input-bordered w-full font-mono ${F?`input-error`:``}`,placeholder:e(`accounts.password`),autoComplete:`new-password`,required:!0,minLength:8,"aria-invalid":F?!0:void 0,"aria-describedby":F?`accounts-password-error`:void 0,value:O,onChange:e=>k(e.target.value)})}),(0,g.jsx)(d,{label:e(`accounts.role`),className:`sm:w-40`,children:(0,g.jsxs)(`select`,{className:`select select-bordered w-full`,value:A,onChange:e=>j(e.target.value),children:[(0,g.jsx)(`option`,{value:`viewer`,children:e(`accounts.role_viewer`)}),(0,g.jsx)(`option`,{value:`admin`,children:e(`accounts.role_admin`)})]})})]})})})]}):(0,g.jsx)(m,{width:`wide`,children:(0,g.jsx)(u,{variant:`warning`,message:e(`accounts.admin_only`)})})}export{v as default};
@@ -1 +1 @@
1
- import{r as e}from"./chunk-QTnfLwEv.js";import{Jt as t,Nt as n,an as r,b as i,en as a,gt as o,in as s,nt as c,vt as l}from"./fa-BEzM11bH.js";import{n as u}from"./axios-uEi8e3Ln.js";import{a as d,i as f,n as p,o as m,r as h,s as g,t as _}from"./select-D3PIwbEj.js";import{f as v}from"./LoggerForm-br7_NVmx.js";import{I as y,c as b,k as x}from"./index-DTsVYLUw.js";import{r as S}from"./FormInputToggle--GD_ZMhY.js";import{a as C,c as w,d as T,i as E,l as D,n as O,o as k,s as A,t as j,u as M}from"./coverUtils-Cf4Uxn2U.js";var N=e(r(),1),P=s(),F=[`time`,`date`,`state`,`sun`],I=[{label:`event_form.condition_sun_group_basic`,anchors:[`sunrise`,`sunset`,`solar_noon`,`solar_midnight`]},{label:`event_form.condition_sun_group_twilight`,anchors:[`civil_dawn`,`civil_dusk`,`nautical_dawn`,`nautical_dusk`,`astronomical_dawn`,`astronomical_dusk`]},{label:`event_form.condition_sun_group_photographic`,anchors:[`golden_hour_morning_start`,`golden_hour_morning_end`,`golden_hour_evening_start`,`golden_hour_evening_end`,`blue_hour_morning_start`,`blue_hour_morning_end`,`blue_hour_evening_start`,`blue_hour_evening_end`]}],L=[`day`,`civil_twilight`,`nautical_twilight`,`astronomical_twilight`,`night`,`golden_hour`,`blue_hour`];function R(e){return e.phase?`phase`:e.above!==void 0||e.below!==void 0?`elevation`:`window`}function z(e){if(e==null||e===``)return``;if(typeof e==`number`)return String(Math.round(e/60));let t=String(e).trim().match(/^([-+]?\d*\.?\d+)\s*(\w*)$/);if(!t)return``;let n=parseFloat(t[1]),r=(t[2]||`s`).toLowerCase(),i=r.startsWith(`h`)?n*3600:r.startsWith(`m`)?n*60:n;return String(Math.round(i/60))}function B(e){let t=e.trim();if(t===``||t===`-`)return;let n=parseInt(t,10);if(!(isNaN(n)||n===0))return`${n}min`}var V=[`binary_sensor`,`cover`,`output`,`remote_output`,`remote_input`],H={binary_sensor:[`is_on`,`is_off`],cover:[`is_open`,`is_closed`],output:[`is_on`,`is_off`],remote_output:[`is_on`,`is_off`],remote_input:[`is_on`,`is_off`]},U=({action:e,onUpdate:n,t:r,allOutputs:i=[],allCovers:a=[],allBinarySensors:o=[],allRemoteInputs:s=[],allAreas:c=[],showValidation:u=!1,excludeEntityId:v})=>{let y=()=>e.conditions?.list?.length?e.conditions.list:e.condition?[e.condition]:[],b=()=>e.conditions?.mode||`and`,C=y(),w=b(),E=C.length>0,D=(e,t)=>{let r=t??w;e.length===0?n(`__batch`,{condition:void 0,conditions:void 0}):e.length===1?n(`__batch`,{condition:e[0],conditions:void 0}):n(`__batch`,{conditions:{mode:r,list:e},condition:void 0})},O=()=>{let e={type:`time`,after:``,before:``};D([...C,e])},k=e=>{D(C.filter((t,n)=>n!==e))},A=(e,t,n)=>{let r=[...C],i={...r[e],[t]:n};t===`type`&&(n===`time`||n===`date`?(delete i.entity,delete i.entity_id,delete i.state,i.after=``,i.before=``):n===`state`?(delete i.after,delete i.before,i.entity=``,i.entity_id=``,i.state=``):n===`sun`&&(delete i.entity,delete i.entity_id,delete i.state,i.after=``,i.before=``),n!==`sun`&&(delete i.after_offset,delete i.before_offset,delete i.phase,delete i.above,delete i.below)),t===`entity`&&(i.entity_id=``,i.state=``),r[e]=i,D(r)},j=e=>{switch(e){case`binary_sensor`:return o.filter(e=>{let t=e.id||e.boneio_input||e.name||``;return!(!t||v&&t===v)}).map(e=>{let t=e.id||e.boneio_input||e.name||``;return{id:t,name:e.name||t,area:e.area}});case`cover`:return a.filter(e=>!!(e.id||e.open_relay)).map(e=>{let t=e.id||(e.open_relay&&e.close_relay?`cover_${e.open_relay}_${e.close_relay}`.toLowerCase():``);return{id:t,name:e.name||t,area:e.area}}).filter(e=>!!e.id);case`output`:return i.filter(e=>!e.remote_source&&(e.boneio_output||e.id)).map(e=>{let t=e.id||e.boneio_output||``;return{id:t,name:e.name||t,area:e.area}}).filter(e=>!!e.id);case`remote_output`:return i.filter(e=>!!e.remote_source&&(e.device_id||e.id)).map(e=>{let t=e.id||`${e.device_id}_${e.output_id}`;return{id:t,name:e.name||t,area:e.area,badge:`📡 ${e.device_id||e.remote_source}`,badgeClass:`badge-info`}}).filter(e=>!!e.id);case`remote_input`:return(s||[]).filter(e=>!!(e.id||`${e.device_id}_${e.input_id}`)).map(e=>{let t=e.id||`${e.device_id}_${e.input_id}`,n=e._device_name||e.device_id||``;return{id:t,name:e.name||t,area:e.area,badge:n?`📡 ${n}`:void 0,badgeClass:`badge-info`}}).filter(e=>!!e.id);default:return[]}},{hasLocation:M}=x(),[U,W]=(0,N.useState)({}),G=(e,t)=>{W(n=>({...n,[e]:t}));let n=[...C],r={...n[e]};delete r.phase,delete r.above,delete r.below,delete r.after_offset,delete r.before_offset,r.after=``,r.before=``,n[e]=r,D(n)},K=(e,n)=>{let i=u?T(e,r):null;return(0,P.jsxs)(`div`,{className:`border rounded-lg p-3 mb-2 bg-base-200/50 ${i?`border-error`:`border-base-300`}`,children:[(0,P.jsxs)(`div`,{className:`flex justify-between items-center mb-2`,children:[(0,P.jsxs)(`span`,{className:`text-sm font-medium`,children:[r(`event_form.condition`),` `,C.length>1?`#${n+1}`:``]}),(0,P.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-xs text-error`,onClick:()=>k(n),title:r(`event_form.remove_condition`),children:(0,P.jsx)(t,{className:`w-3 h-3`})})]}),i&&(0,P.jsx)(`div`,{className:`alert alert-error py-1 px-3 mb-2 text-xs`,children:(0,P.jsx)(`span`,{children:i})}),(0,P.jsxs)(`div`,{className:`form-control mb-2`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_type`)})}),(0,P.jsxs)(_,{value:e.type,onValueChange:e=>A(n,`type`,e),children:[(0,P.jsx)(m,{className:`w-full h-9`,children:(0,P.jsx)(g,{})}),(0,P.jsx)(p,{children:F.map(t=>{let n=t===`sun`&&!M&&e.type!==`sun`;return(0,P.jsxs)(f,{value:t,disabled:n,children:[r(`event_form.condition_type_${t}`),n&&(0,P.jsxs)(`span`,{className:`text-xs opacity-60`,children:[` `,`— `,r(`event_form.condition_sun_needs_location_short`)]})]},t)})})]}),!M&&(0,P.jsx)(`span`,{className:`text-xs opacity-60 mt-1`,children:r(`event_form.condition_sun_needs_location`)})]}),e.type===`time`&&(0,P.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_after`)})}),(0,P.jsx)(`input`,{type:`time`,className:`input input-bordered input-sm w-full ${u&&!e.after&&!e.before?`input-error`:``}`,value:e.after||``,onChange:e=>A(n,`after`,e.target.value),title:r(`event_form.condition_time_after_hint`)})]}),(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_before`)})}),(0,P.jsx)(`input`,{type:`time`,className:`input input-bordered input-sm w-full ${u&&!e.after&&!e.before?`input-error`:``}`,value:e.before||``,onChange:e=>A(n,`before`,e.target.value),title:r(`event_form.condition_time_before_hint`)})]}),(0,P.jsx)(`div`,{className:`col-span-2`,children:(0,P.jsx)(`span`,{className:`text-xs opacity-60`,children:r(`event_form.condition_midnight_crossover`)})})]}),e.type===`date`&&(0,P.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_after`)})}),(0,P.jsx)(`input`,{type:`text`,className:`input input-bordered input-sm w-full ${u&&!e.after&&!e.before?`input-error`:``}`,placeholder:`MM-DD`,value:e.after||``,onChange:e=>A(n,`after`,e.target.value),title:r(`event_form.condition_date_after_hint`),pattern:`\\d{2}-\\d{2}`})]}),(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_before`)})}),(0,P.jsx)(`input`,{type:`text`,className:`input input-bordered input-sm w-full ${u&&!e.after&&!e.before?`input-error`:``}`,placeholder:`MM-DD`,value:e.before||``,onChange:e=>A(n,`before`,e.target.value),title:r(`event_form.condition_date_before_hint`),pattern:`\\d{2}-\\d{2}`})]}),(0,P.jsx)(`div`,{className:`col-span-2`,children:(0,P.jsx)(`span`,{className:`text-xs opacity-60`,children:r(`event_form.condition_year_crossover`)})})]}),e.type===`sun`&&(()=>{let t=U[n]??R(e),i=t=>(0,P.jsxs)(_,{value:e[t]||``,onValueChange:e=>A(n,t,e),children:[(0,P.jsx)(m,{className:`w-full h-9`,children:(0,P.jsx)(g,{placeholder:r(`event_form.condition_sun_anchor`)})}),(0,P.jsx)(p,{children:I.map(e=>(0,P.jsxs)(h,{children:[(0,P.jsx)(d,{children:r(e.label)}),e.anchors.map(e=>(0,P.jsx)(f,{value:e,children:r(`sun.anchor_${e}`)},e))]},e.label))})]}),a=t=>(0,P.jsxs)(`label`,{className:`input input-bordered input-sm flex items-center gap-1 w-full`,children:[(0,P.jsx)(`input`,{type:`number`,className:`grow min-w-0 bg-transparent outline-hidden`,placeholder:`0`,step:5,value:z(e[t]),onChange:e=>A(n,t,B(e.target.value))}),(0,P.jsx)(`span`,{className:`text-xs opacity-60 shrink-0`,children:r(`event_form.condition_sun_minutes`)})]});return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`form-control mb-2`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_sun_mode`)})}),(0,P.jsxs)(_,{value:t,onValueChange:e=>G(n,e),children:[(0,P.jsx)(m,{className:`w-full h-9`,children:(0,P.jsx)(g,{})}),(0,P.jsxs)(p,{children:[(0,P.jsx)(f,{value:`window`,children:r(`event_form.condition_sun_mode_window`)}),(0,P.jsx)(f,{value:`phase`,children:r(`event_form.condition_sun_mode_phase`)}),(0,P.jsx)(f,{value:`elevation`,children:r(`event_form.condition_sun_mode_elevation`)})]})]})]}),t===`window`&&(0,P.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_after`)})}),i(`after`)]}),(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_before`)})}),i(`before`)]}),(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-xs opacity-70`,children:r(`event_form.condition_sun_offset`)})}),a(`after_offset`)]}),(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-xs opacity-70`,children:r(`event_form.condition_sun_offset`)})}),a(`before_offset`)]}),(0,P.jsx)(`div`,{className:`col-span-2`,children:(0,P.jsx)(`span`,{className:`text-xs opacity-60`,children:r(`event_form.condition_sun_window_hint`)})})]}),t===`phase`&&(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_sun_phase`)})}),(0,P.jsxs)(_,{value:e.phase||``,onValueChange:e=>A(n,`phase`,e),children:[(0,P.jsx)(m,{className:`w-full h-9`,children:(0,P.jsx)(g,{placeholder:r(`event_form.condition_sun_phase`)})}),(0,P.jsx)(p,{children:L.map(e=>(0,P.jsx)(f,{value:e,children:r(`sun.phase_${e}`)},e))})]}),(0,P.jsx)(`span`,{className:`text-xs opacity-60 mt-1`,children:r(`event_form.condition_sun_phase_hint`)})]}),t===`elevation`&&(0,P.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_sun_above`)})}),(0,P.jsx)(`input`,{type:`number`,className:`input input-bordered input-sm w-full`,placeholder:`-6`,min:-90,max:90,value:e.above??``,onChange:e=>A(n,`above`,e.target.value===``?void 0:parseFloat(e.target.value))})]}),(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_sun_below`)})}),(0,P.jsx)(`input`,{type:`number`,className:`input input-bordered input-sm w-full`,placeholder:`10`,min:-90,max:90,value:e.below??``,onChange:e=>A(n,`below`,e.target.value===``?void 0:parseFloat(e.target.value))})]}),(0,P.jsx)(`div`,{className:`col-span-2`,children:(0,P.jsx)(`span`,{className:`text-xs opacity-60`,children:r(`event_form.condition_sun_elevation_hint`)})})]})]})})(),e.type===`state`&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`form-control mb-2`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_entity`)})}),(0,P.jsxs)(_,{value:e.entity||``,onValueChange:e=>A(n,`entity`,e),children:[(0,P.jsx)(m,{className:`w-full h-9`,children:(0,P.jsx)(g,{placeholder:r(`event_form.condition_entity`)})}),(0,P.jsx)(p,{children:V.map(e=>(0,P.jsx)(f,{value:e,children:r(`event_form.condition_entity_${e}`)},e))})]})]}),e.entity&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`form-control mb-2`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_entity_id`)})}),j(e.entity).length>0?(0,P.jsx)(S,{value:e.entity_id||``,onChange:e=>A(n,`entity_id`,e),items:j(e.entity),allAreas:c,placeholder:r(`event_form.condition_entity_id`),compact:!0,recentKey:`condition-${e.entity}`}):e.entity===`remote_input`||e.entity===`remote_output`?(0,P.jsxs)(`div`,{className:`alert alert-info py-2 px-3 text-xs`,children:[(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,className:`stroke-current shrink-0 w-4 h-4`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z`})}),(0,P.jsx)(`span`,{children:r(`event_form.condition_entity_${e.entity}_empty`)})]}):(0,P.jsx)(`input`,{type:`text`,className:`input input-bordered input-sm w-full text-only`,value:e.entity_id||``,onChange:e=>A(n,`entity_id`,e.target.value)})]}),(0,P.jsxs)(`div`,{className:`form-control mb-2`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_state`)})}),(0,P.jsxs)(_,{value:e.state||``,onValueChange:e=>A(n,`state`,e),children:[(0,P.jsx)(m,{className:`w-full h-9`,children:(0,P.jsx)(g,{placeholder:r(`event_form.condition_state`)})}),(0,P.jsx)(p,{children:(H[e.entity]||[]).map(e=>(0,P.jsx)(f,{value:e,children:r(`event_form.condition_state_${e}`)},e))})]})]})]})]})]},n)};return(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`div`,{className:`divider text-xs opacity-70 my-1`,children:r(`event_form.conditions`)}),E?(0,P.jsxs)(P.Fragment,{children:[C.length>1&&(0,P.jsxs)(`div`,{className:`form-control mb-2`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm font-medium`,children:r(`event_form.condition_mode`)})}),(0,P.jsxs)(_,{value:w,onValueChange:e=>D(C,e),children:[(0,P.jsx)(m,{className:`w-full h-9`,children:(0,P.jsx)(g,{})}),(0,P.jsxs)(p,{children:[(0,P.jsx)(f,{value:`and`,children:r(`event_form.condition_mode_and`)}),(0,P.jsx)(f,{value:`or`,children:r(`event_form.condition_mode_or`)})]})]})]}),C.map((e,t)=>K(e,t)),(0,P.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-xs text-primary`,onClick:O,children:[(0,P.jsx)(l,{className:`w-3 h-3 mr-1`}),r(`event_form.add_condition`)]})]}):(0,P.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm text-primary w-full`,onClick:O,children:[(0,P.jsx)(l,{className:`w-3 h-3 mr-1`}),r(`event_form.add_condition`)]}),E&&(0,P.jsx)(`p`,{className:`text-xs opacity-50 mt-1`,children:r(`event_form.condition_hint`)})]})},W=({value:e,onChange:t,label:n,required:r=!1,minimum:i=0,maximum:a,allowedUnits:o=[`ms`,`s`,`min`,`h`],unitlessNumberUnit:s=`ms`})=>{let c=e=>e?e>=36e5&&e%36e5==0?{value:e/36e5,unit:`h`}:e>=6e4&&e%6e4==0?{value:e/6e4,unit:`min`}:e>=1e3&&e%1e3==0?{value:e/1e3,unit:`s`}:{value:e,unit:`ms`}:{value:0,unit:`s`},l=e=>{if(!e&&e!==0)return{value:0,unit:`s`};if(typeof e==`string`){let t=e.match(/^(\d+(?:\.\d+)?)\s*(ms|s|sec|min|h|hours?)$/i);if(t){let e=parseFloat(t[1]),n=t[2].toLowerCase();return n===`sec`&&(n=`s`),(n===`hour`||n===`hours`)&&(n=`h`),{value:e,unit:n}}let n=parseFloat(e);return isNaN(n)?{value:0,unit:`s`}:s===`ms`?c(n):{value:n,unit:s}}return typeof e==`number`?c(e):typeof e==`object`&&e?e.hours!==void 0&&e.hours>0?{value:e.hours,unit:`h`}:e.minutes!==void 0&&e.minutes>0?{value:e.minutes,unit:`min`}:e.seconds!==void 0&&e.seconds>0?{value:e.seconds,unit:`s`}:e.milliseconds!==void 0&&e.milliseconds>0?{value:e.milliseconds,unit:`ms`}:e._total_in_seconds===void 0?{value:0,unit:`s`}:c(e._total_in_seconds*1e3):{value:0,unit:`s`}},u=(e,t)=>e==null||isNaN(e)?`0${t||`s`}`:`${e}${t}`,{value:d,unit:f}=l(e),[p,m]=N.useState(d),[h,g]=N.useState(f),_=N.useMemo(()=>typeof e==`object`&&e?JSON.stringify(e):String(e??``),[e]);N.useEffect(()=>{let t=l(e);m(t.value),g(t.unit)},[_]);let y=e=>{let n=parseFloat(e)||0;if(a!==void 0){let e=S(h);n>e&&(n=e)}m(n),t(u(n,h))},b=e=>{g(e),t(u(p,e))},x=e=>Math.ceil(i/(e===`h`?36e5:e===`min`?6e4:e===`s`?1e3:1)),S=e=>a===void 0?1/0:Math.floor(a/(e===`h`?36e5:e===`min`?6e4:e===`s`?1e3:1)),C=x(h),w=a===void 0?void 0:S(h);return(0,P.jsxs)(`div`,{className:`form-control w-full`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsxs)(`span`,{className:`label-text font-medium`,children:[n,r&&(0,P.jsx)(`span`,{className:`text-error ml-1`,children:`*`})]})}),(0,P.jsxs)(`div`,{className:`flex gap-2 w-full`,children:[(0,P.jsx)(v,{value:p,onChange:e=>y(String(e===``?0:e)),min:C,max:w,className:`flex-1 w-3/4 min-h-12`,placeholder:`0`}),(0,P.jsx)(`div`,{className:`join border border-base-300 rounded-lg overflow-hidden shrink-0`,children:o.map(e=>(0,P.jsx)(`button`,{type:`button`,onClick:()=>b(e),className:`btn btn-sm min-h-12 h-12 rounded-none border-0 join-item px-3 font-medium transition-all ${h===e?`btn-primary`:`bg-base-100 hover:bg-base-200/50 text-base-content/70`}`,children:e},e))})]}),(i>0||a!==void 0)&&(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsxs)(`span`,{className:`label-text-alt text-base-content/70`,children:[i>0&&`Min: ${i}ms`,i>0&&a!==void 0&&` | `,a!==void 0&&`Max: ${a}ms`]})})]})},G=[`TOGGLE`,`ON`,`OFF`],K=({action:e,onUpdate:t,t:n,allOutputs:r,allOutputGroups:i,allAreas:a=[],actionOutputOptions:o,savedOutputs:s,savedOutputGroups:c,preferredArea:l})=>{let u=(n,r)=>{e.pin&&t(`pin`,void 0),t(n,r)},d=(e,t)=>t?c?c.some(t=>t.id===e):!0:s?s.some(t=>(t.id||t.boneio_output)===e):!0,h=e=>{if(!(!e||e===`none`))return n(`outputs.output_types.${e}`)||e},v=e=>{switch(e){case`light`:return`badge-warning`;case`switch`:return`badge-info`;case`valve`:return`badge-accent`;case`button`:return`badge-secondary`;default:return`badge-ghost`}},y=(0,N.useMemo)(()=>{let e=r.filter(e=>{let t=e.output_type?.toLowerCase();return e&&typeof e==`object`&&t!==`cover`&&t!==`none`&&(e.id||e.boneio_output)}).map(e=>{let t=e.id||e.boneio_output,r=d(t,!1),i=e.output_type;return{id:t,name:e.name||t,area:e.area,badge:h(i),badgeClass:v(i),disabled:!r,disabledLabel:r?void 0:n(`common.unsaved`)}}),t=i.filter(e=>e&&typeof e==`object`&&e.id).map(e=>{let t=d(e.id,!0);return{id:e.id,name:e.name||e.id,area:e.area,badge:n(`outputs.categories.groups`),badgeClass:`badge-secondary`,disabled:!t,disabledLabel:t?void 0:n(`common.unsaved`)}});return[...e,...t]},[r,i,s,c]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.output`)})}),(0,P.jsx)(S,{value:e.boneio_output||e.pin||``,onChange:e=>u(`boneio_output`,e),items:y,allAreas:a,placeholder:n(`event_form.select_output`),recentKey:`outputs`,preferredArea:l})]}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.action_output`)})}),(0,P.jsxs)(_,{value:e.action_output||`TOGGLE`,onValueChange:e=>t(`action_output`,e),children:[(0,P.jsx)(m,{className:`w-full`,children:(0,P.jsx)(g,{placeholder:`Select action...`})}),(0,P.jsx)(p,{children:G.map(e=>(0,P.jsx)(f,{value:e,children:A(e,n)},e))})]})]})]})},q=[`TILT`,`TILT_OPEN`,`TILT_CLOSE`],ee=({action:e,onUpdate:t,t:n,allCovers:r,allAreas:i,actionCoverOptions:a,isCoverSaved:o,preferredArea:s})=>{let c=(n,r)=>{e.pin&&t(`pin`,void 0),t(n,r)},l=e=>n(e===`venetian`?`covers.type_venetian`:`covers.type_time_based`),u=(0,N.useMemo)(()=>j(r).map(e=>{let t=o(e.id);return{id:e.id,name:e.name||e.id,area:e.area,badge:l(e.platform),badgeClass:e.platform===`venetian`?`badge-accent`:`badge-info`,disabled:!t,disabledLabel:t?void 0:n(`common.unsaved`)}}),[r,o]),d=e.boneio_cover||e.pin||``,h=(0,N.useMemo)(()=>j(r).find(e=>e.id===d),[r,d])?.platform===`venetian`,y=(0,N.useMemo)(()=>h?a:a.filter(e=>!q.includes(e)),[a,h]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.cover`)})}),(0,P.jsx)(S,{value:d,onChange:n=>{c(`boneio_cover`,n),j(r).find(e=>e.id===n)?.platform!==`venetian`&&q.includes(e.action_cover)&&(t(`action_cover`,`TOGGLE`),t(`data`,void 0))},items:u,allAreas:i,placeholder:n(`event_form.select_cover`),recentKey:`covers`,preferredArea:s})]}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.cover_action`)})}),(0,P.jsxs)(_,{value:e.action_cover||`TOGGLE`,onValueChange:n=>{if(t(`action_cover`,n),n!==`TILT`){let n=e.data||{};if(n.tilt_position!==void 0){let{tilt_position:e,...r}=n;t(`data`,Object.keys(r).length>0?r:void 0)}}},children:[(0,P.jsx)(m,{className:`w-full`,children:(0,P.jsx)(g,{placeholder:`Select action...`})}),(0,P.jsx)(p,{children:y.map(e=>(0,P.jsx)(f,{value:e,children:A(e,n)},e))})]})]}),e.action_cover===`TILT`&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsxs)(`span`,{className:`label-text font-medium`,children:[n(`event_form.tilt_position`),` `,(0,P.jsx)(`span`,{className:`text-error`,children:`*`})]})}),(0,P.jsx)(v,{className:e.data?.tilt_position===void 0||e.data?.tilt_position===null||e.data?.tilt_position===``?`input-error`:``,min:0,max:100,placeholder:`50`,value:e.data?.tilt_position??``,onChange:n=>{t(`data`,{...e.data||{},tilt_position:n===``?void 0:n})}}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.tilt_position_hint`)})})]}),e.action_cover===`SMART_TOGGLE`&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.always_open_till`)})}),(0,P.jsx)(v,{min:0,max:100,placeholder:`50`,value:e.data?.always_open_till??50,onChange:n=>{t(`data`,{...e.data||{},always_open_till:n===``?50:n})}}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.always_open_till_hint`)})})]}),h&&(0,P.jsx)(`div`,{className:`form-control mb-3`,children:(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-4`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm`,checked:e.restore_tilt||!1,onChange:e=>t(`restore_tilt`,e.target.checked||void 0)}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.restore_tilt`)}),(0,P.jsx)(`p`,{className:`text-sm text-base-content/70 mt-1`,children:n(`event_form.restore_tilt_hint`)})]})]})})]})},te=({action:e,onUpdate:t,t:n})=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.mqtt_topic`)})}),(0,P.jsx)(`input`,{type:`text`,className:`input input-bordered w-full`,placeholder:n(`event_form.mqtt_topic_placeholder`),value:e.topic||``,onChange:e=>t(`topic`,e.target.value)})]}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.mqtt_message`)})}),(0,P.jsx)(`input`,{type:`text`,className:`input input-bordered w-full`,placeholder:n(`event_form.mqtt_message_placeholder`),value:e.action_mqtt_msg||``,onChange:e=>t(`action_mqtt_msg`,e.target.value)})]})]});function J(e){return e?e.toLowerCase().replace(/ą/g,`a`).replace(/ć/g,`c`).replace(/ę/g,`e`).replace(/ł/g,`l`).replace(/ń/g,`n`).replace(/ó/g,`o`).replace(/ś/g,`s`).replace(/ź/g,`z`).replace(/ż/g,`z`).replace(/\s+/g,`_`).replace(/[^a-z0-9_-]/g,``):``}var ne=[`TOGGLE`,`ON`,`OFF`],re=({action:e,onUpdate:t,t:n,actionOutputOptions:r})=>{let i=(n,r)=>{e.pin&&t(`pin`,void 0),t(n,r)};return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.boneio_id`)})}),(0,P.jsx)(`input`,{type:`text`,className:`input input-bordered w-full`,placeholder:n(`event_form.boneio_id_placeholder`),value:e.boneio_id||``,onChange:e=>t(`boneio_id`,J(e.target.value))}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.boneio_id_hint`)})})]}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.output_id`)})}),(0,P.jsx)(`input`,{type:`text`,className:`input input-bordered w-full`,placeholder:n(`event_form.output_id_placeholder`),value:e.boneio_output||e.pin||``,onChange:e=>i(`boneio_output`,e.target.value)}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.output_id_hint`)})})]}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.action_output`)})}),(0,P.jsxs)(_,{value:e.action_output||`TOGGLE`,onValueChange:e=>t(`action_output`,e),children:[(0,P.jsx)(m,{className:`w-full`,children:(0,P.jsx)(g,{placeholder:`Select action...`})}),(0,P.jsx)(p,{children:ne.map(e=>(0,P.jsx)(f,{value:e,children:A(e,n)},e))})]})]})]})},ie=({action:e,onUpdate:t,t:n,actionCoverOptions:r})=>{let i=(n,r)=>{e.pin&&t(`pin`,void 0),t(n,r)};return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.boneio_id`)})}),(0,P.jsx)(`input`,{type:`text`,className:`input input-bordered w-full`,placeholder:n(`event_form.boneio_id_placeholder`),value:e.boneio_id||``,onChange:e=>t(`boneio_id`,J(e.target.value))}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.boneio_id_hint`)})})]}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.cover_id`)})}),(0,P.jsx)(`input`,{type:`text`,className:`input input-bordered w-full`,placeholder:n(`event_form.cover_id_placeholder`),value:e.boneio_cover||e.pin||``,onChange:e=>i(`boneio_cover`,e.target.value)}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.cover_id_hint`)})})]}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.cover_action`)})}),(0,P.jsxs)(_,{value:e.action_cover||`TOGGLE`,onValueChange:e=>t(`action_cover`,e),children:[(0,P.jsx)(m,{className:`w-full`,children:(0,P.jsx)(g,{placeholder:`Select action...`})}),(0,P.jsx)(p,{children:r.map(e=>(0,P.jsx)(f,{value:e,children:A(e,n)},e))})]})]}),e.action_cover===`TILT`&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsxs)(`span`,{className:`label-text font-medium`,children:[n(`event_form.tilt_position`),` `,(0,P.jsx)(`span`,{className:`text-error`,children:`*`})]})}),(0,P.jsx)(v,{className:e.data?.tilt_position===void 0||e.data?.tilt_position===null||e.data?.tilt_position===``?`input-error`:``,min:0,max:100,placeholder:`50`,value:e.data?.tilt_position??``,onChange:n=>{t(`data`,{...e.data||{},tilt_position:n===``?void 0:n})}}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.tilt_position_hint`)})})]}),e.action_cover===`SMART_TOGGLE`&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.always_open_till`)})}),(0,P.jsx)(v,{min:0,max:100,placeholder:`50`,value:e.data?.always_open_till??50,onChange:n=>{t(`data`,{...e.data||{},always_open_till:n===``?50:n})}}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.always_open_till_hint`)})})]})]})},Y=({value:e,onChange:t,allRemoteDevices:n,placeholder:r=`Select remote device...`,label:i,protocolFilter:a})=>{let o=n.filter(e=>e.id?a&&a.length>0?a.includes(e.protocol||``):!0:!1),s=e=>{switch(e){case`esphome_api`:return`ESPHome`;case`wled`:return`WLED`;default:return`MQTT`}};return(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[i&&(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:i})}),(0,P.jsxs)(_,{value:e||``,onValueChange:t,children:[(0,P.jsx)(m,{className:`w-full`,children:(0,P.jsx)(g,{placeholder:r})}),(0,P.jsx)(p,{children:o.map(e=>(0,P.jsx)(f,{value:e.id,children:(0,P.jsxs)(`div`,{className:`flex flex-col`,children:[(0,P.jsx)(`span`,{children:e.name||e.id}),(0,P.jsx)(`span`,{className:`text-xs opacity-60 protocol text-left`,children:s(e.protocol)})]})},e.id))})]})]})},X=[`BRIGHTNESS_UP`,`BRIGHTNESS_DOWN`,`BRIGHTNESS_UP_CYCLE`,`BRIGHTNESS_DOWN_CYCLE`],ae=e=>{if(!e)return[];let t=e.protocol===`esphome_api`,n=e.protocol===`wled`;if(t){let t=(e.esphome_api?.switches||[]).map(e=>({...e,_type:`switch`})),n=(e.esphome_api?.lights||[]).map(e=>({...e,_type:`light`}));return[...t,...n]}else if(n)return[{id:`main`,name:`All LEDs`,_type:`wled_main`},...(e.wled?.segments||[]).map(e=>({...e,id:String(e.id),name:e.name||`Segment ${e.id}`,_type:`wled_segment`}))];else return e.mqtt?.outputs||[]},oe=({action:e,onUpdate:t,t:n,allRemoteDevices:r,actionOutputOptions:i})=>{let a=r.find(t=>t.id===e.remote_device),o=ae(a),s=o.find(t=>t.id===e.output_id),c=a?.protocol===`esphome_api`,l=a?.protocol===`wled`,u=a?.esphome_api?.lights||[],d=u.find(t=>t.id===e.output_id),h=c&&d,v=[`TOGGLE`,`ON`,`OFF`],y=N.useMemo(()=>{if(!s)return i;let e=s._type;return e===`switch`||e===`light`&&!d?.supports_brightness||!e||![`light`,`wled_main`,`wled_segment`].includes(e)?i.filter(e=>v.includes(e)):i},[s,d,i]),b=e.action_output||`TOGGLE`;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Y,{value:e.remote_device||``,onChange:e=>t(`remote_device`,e),allRemoteDevices:r,label:n(`event_form.remote_device`),placeholder:n(`event_form.select_remote_device`)}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.output_id`)})}),(0,P.jsxs)(_,{value:e.output_id||``,onValueChange:n=>{t(`output_id`,n);let r=o.find(e=>e.id===n);(!r||r._type===`switch`||r._type===`light`&&!u.find(e=>e.id===n)?.supports_brightness||![`light`,`wled_main`,`wled_segment`].includes(r._type))&&e.action_output&&!v.includes(e.action_output)&&t(`action_output`,`TOGGLE`)},disabled:!e.remote_device,children:[(0,P.jsx)(m,{className:`w-full input input-bordered h-auto min-h-12 py-2`,children:(0,P.jsx)(g,{placeholder:n(`event_form.select_output_id`),children:s?(0,P.jsxs)(`div`,{className:`flex flex-col items-start`,children:[(0,P.jsx)(`span`,{className:`font-medium`,children:s.name||s.id}),(0,P.jsx)(`span`,{className:`text-xs opacity-60`,children:s._type===`light`?`💡 Light`:s._type===`switch`?`🔌 Switch`:s._type===`wled_main`?`🌈 WLED All`:s._type===`wled_segment`?`🌈 Segment ${s.len?`(${s.len} LEDs)`:``}`:`ID: ${s.id}`})]}):(0,P.jsx)(`span`,{className:`opacity-50`,children:n(`event_form.select_output_id`)})})}),(0,P.jsx)(p,{children:o.map(e=>(0,P.jsx)(f,{value:e.id,children:(0,P.jsxs)(`div`,{className:`flex flex-col`,children:[(0,P.jsx)(`span`,{className:`font-medium`,children:e.name||e.id}),(0,P.jsx)(`span`,{className:`text-xs opacity-60`,children:e._type===`light`?(0,P.jsxs)(P.Fragment,{children:[`💡 Light `,e.supports_brightness&&`• Dimmable`]}):e._type===`switch`?(0,P.jsx)(P.Fragment,{children:`🔌 Switch`}):e._type===`wled_main`?(0,P.jsx)(P.Fragment,{children:`🌈 Control all LEDs`}):e._type===`wled_segment`?(0,P.jsxs)(P.Fragment,{children:[`🌈 Segment `,e.len?`• ${e.len} LEDs`:``]}):(0,P.jsxs)(P.Fragment,{children:[`ID: `,e.id]})})]})},e.id))})]}),!e.remote_device&&(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt text-warning`,children:n(`event_form.select_device_first`)})})]}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.output_action`)})}),(0,P.jsxs)(_,{value:e.action_output||`TOGGLE`,onValueChange:e=>t(`action_output`,e),children:[(0,P.jsx)(m,{className:`w-full`,children:(0,P.jsx)(g,{placeholder:`Select action...`})}),(0,P.jsx)(p,{children:y.map(e=>(0,P.jsx)(f,{value:e,children:A(e,n)},e))})]})]}),h&&![`CYCLE_COLOR`,`CYCLE_PRESET`].includes(b)&&(0,P.jsx)(se,{action:e,onUpdate:t,t:n,selectedLight:d,effectiveAction:b}),l&&![`CYCLE_COLOR`,`CYCLE_PRESET`].includes(b)&&(0,P.jsx)(ce,{action:e,onUpdate:t,t:n,selectedDevice:a,effectiveAction:b}),b===`CYCLE_COLOR`&&(h||l)&&(0,P.jsx)(de,{action:e,onUpdate:t,t:n}),b===`CYCLE_PRESET`&&(h||l)&&(0,P.jsx)(fe,{action:e,onUpdate:t,t:n,selectedLight:d,selectedDevice:a,isEspHome:!!c,isWled:!!l}),[`CYCLE_COLOR`,`CYCLE_PRESET`].includes(b)&&(h||l)&&(0,P.jsx)($,{action:e,onUpdate:t,t:n})]})},se=({action:e,onUpdate:t,t:n,selectedLight:r,effectiveAction:i})=>{let a=r?.supports_brightness&&[`ON`,`TOGGLE`,`SET_BRIGHTNESS`].includes(i),o=r?.supports_brightness&&X.includes(i),s=r?.supports_color_temp&&[`ON`,`TOGGLE`].includes(i),c=(r?.supports_rgb||r?.supports_rgbw)&&[`ON`,`TOGGLE`].includes(i);return(0,P.jsxs)(P.Fragment,{children:[a&&(0,P.jsx)(Z,{action:e,onUpdate:t,t:n}),o&&(0,P.jsx)(Q,{action:e,onUpdate:t,t:n}),s&&(0,P.jsx)(le,{action:e,onUpdate:t,t:n,minMireds:r?.min_mireds||153,maxMireds:r?.max_mireds||500}),c&&(0,P.jsx)(ue,{action:e,onUpdate:t,t:n}),(0,P.jsx)($,{action:e,onUpdate:t,t:n})]})},ce=({action:e,onUpdate:t,t:n,selectedDevice:r,effectiveAction:i})=>{let a=[`ON`,`TOGGLE`,`SET_BRIGHTNESS`].includes(i),o=X.includes(i),s=[`ON`,`TOGGLE`].includes(i);return(0,P.jsxs)(P.Fragment,{children:[a&&(0,P.jsx)(Z,{action:e,onUpdate:t,t:n}),o&&(0,P.jsx)(Q,{action:e,onUpdate:t,t:n}),s&&(0,P.jsx)(ue,{action:e,onUpdate:t,t:n}),r?.wled?.effects&&r.wled.effects.length>0&&[`ON`,`TOGGLE`].includes(i)&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-2 pb-1`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm checkbox-secondary`,checked:e.effect!==void 0,onChange:e=>t(`effect`,e.target.checked?0:void 0)}),(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.wled_effect`)||`Effect`})]}),e.effect!==void 0&&(0,P.jsx)(`div`,{className:`pl-7`,children:(0,P.jsx)(`select`,{className:`select select-bordered w-full`,value:e.effect??0,onChange:e=>t(`effect`,parseInt(e.target.value)),children:r.wled.effects.map(e=>(0,P.jsx)(`option`,{value:e.id,children:e.name},e.id))})})]}),r?.wled?.palettes&&r.wled.palettes.length>0&&e.effect!==void 0&&e.effect!==0&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-2 pb-1`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm checkbox-secondary`,checked:e.palette!==void 0,onChange:e=>t(`palette`,e.target.checked?0:void 0)}),(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.wled_palette`)||`Color Palette`})]}),e.palette!==void 0&&(0,P.jsx)(`div`,{className:`pl-7`,children:(0,P.jsx)(`select`,{className:`select select-bordered w-full`,value:e.palette??0,onChange:e=>t(`palette`,parseInt(e.target.value)),children:r.wled.palettes.map(e=>(0,P.jsx)(`option`,{value:e.id,children:e.name},e.id))})})]}),e.effect!==void 0&&e.effect!==0&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-2 pb-1`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm checkbox-secondary`,checked:e.effect_speed!==void 0,onChange:e=>t(`effect_speed`,e.target.checked?128:void 0)}),(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.effect_speed`)||`Effect Speed`}),e.effect_speed!==void 0&&(0,P.jsxs)(`span`,{className:`label-text-alt ml-auto`,children:[Math.round(e.effect_speed/255*100),`%`]})]}),e.effect_speed!==void 0&&(0,P.jsx)(`div`,{className:`pl-7`,children:(0,P.jsx)(`input`,{type:`range`,min:`0`,max:`255`,value:e.effect_speed,onChange:e=>t(`effect_speed`,parseInt(e.target.value)),className:`range range-secondary range-sm w-full`})})]}),e.effect!==void 0&&e.effect!==0&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-2 pb-1`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm checkbox-secondary`,checked:e.effect_intensity!==void 0,onChange:e=>t(`effect_intensity`,e.target.checked?128:void 0)}),(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.effect_intensity`)||`Effect Intensity`}),e.effect_intensity!==void 0&&(0,P.jsxs)(`span`,{className:`label-text-alt ml-auto`,children:[Math.round(e.effect_intensity/255*100),`%`]})]}),e.effect_intensity!==void 0&&(0,P.jsx)(`div`,{className:`pl-7`,children:(0,P.jsx)(`input`,{type:`range`,min:`0`,max:`255`,value:e.effect_intensity,onChange:e=>t(`effect_intensity`,parseInt(e.target.value)),className:`range range-secondary range-sm w-full`})})]}),(0,P.jsx)($,{action:e,onUpdate:t,t:n})]})},Z=({action:e,onUpdate:t,t:n})=>(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-2 pb-1`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm checkbox-primary`,checked:e.brightness!==void 0,onChange:e=>t(`brightness`,e.target.checked?255:void 0)}),(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.brightness`)||`Brightness`}),e.brightness!==void 0&&(0,P.jsxs)(`span`,{className:`label-text-alt ml-auto`,children:[Math.round(e.brightness/255*100),`%`]})]}),e.brightness!==void 0&&(0,P.jsxs)(`div`,{className:`pl-7`,children:[(0,P.jsx)(`input`,{type:`range`,min:`1`,max:`255`,value:e.brightness,onChange:e=>t(`brightness`,parseInt(e.target.value)),className:`range range-primary range-sm w-full`}),(0,P.jsxs)(`div`,{className:`w-full flex justify-between text-xs opacity-50`,children:[(0,P.jsx)(`span`,{children:`1%`}),(0,P.jsx)(`span`,{children:`50%`}),(0,P.jsx)(`span`,{children:`100%`})]})]})]}),Q=({action:e,onUpdate:t,t:n})=>(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label justify-start gap-2 pb-1`,children:[(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.brightness_step`)||`Brightness Step`}),(0,P.jsxs)(`span`,{className:`label-text-alt ml-auto`,children:[e.brightness_step??10,`%`]})]}),(0,P.jsxs)(`div`,{className:`px-1`,children:[(0,P.jsx)(`input`,{type:`range`,min:`1`,max:`50`,value:e.brightness_step??10,onChange:e=>{let n=parseInt(e.target.value);t(`brightness_step`,n===10?void 0:n)},className:`range range-primary range-sm w-full`}),(0,P.jsxs)(`div`,{className:`w-full flex justify-between text-xs opacity-50 px-1`,children:[(0,P.jsx)(`span`,{children:`1%`}),(0,P.jsx)(`span`,{children:`25%`}),(0,P.jsx)(`span`,{children:`50%`})]})]})]}),le=({action:e,onUpdate:t,t:n,minMireds:r,maxMireds:i})=>(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-2 pb-1`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm checkbox-warning`,checked:e.color_temp!==void 0,onChange:e=>t(`color_temp`,e.target.checked?r:void 0)}),(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.color_temp`)||`Color Temperature`}),e.color_temp!==void 0&&(0,P.jsxs)(`span`,{className:`label-text-alt ml-auto`,children:[e.color_temp,` mireds`]})]}),e.color_temp!==void 0&&(0,P.jsxs)(`div`,{className:`pl-7`,children:[(0,P.jsx)(`input`,{type:`range`,min:r,max:i,value:e.color_temp,onChange:e=>t(`color_temp`,parseInt(e.target.value)),className:`range range-warning range-sm w-full`}),(0,P.jsxs)(`div`,{className:`w-full flex justify-between text-xs opacity-50`,children:[(0,P.jsx)(`span`,{children:n(`event_form.color_temp_cool`)||`Cool`}),(0,P.jsx)(`span`,{children:n(`event_form.color_temp_warm`)||`Warm`})]})]})]}),ue=({action:e,onUpdate:t,t:n})=>(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-2 pb-1`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm checkbox-accent`,checked:e.rgb!==void 0,onChange:e=>t(`rgb`,e.target.checked?[255,255,255]:void 0)}),(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.rgb_color`)||`RGB Color`}),e.rgb&&(0,P.jsx)(`span`,{className:`w-6 h-6 rounded border border-base-300 ml-auto`,style:{backgroundColor:D(e.rgb)}})]}),e.rgb&&(0,P.jsxs)(`div`,{className:`pl-7 flex items-center gap-3`,children:[(0,P.jsx)(`input`,{type:`color`,value:D(e.rgb),onChange:e=>t(`rgb`,w(e.target.value)),className:`w-12 h-10 cursor-pointer rounded border-0`}),(0,P.jsxs)(`span`,{className:`text-sm opacity-70`,children:[`RGB(`,e.rgb[0],`, `,e.rgb[1],`, `,e.rgb[2],`)`]})]})]}),$=({action:e,onUpdate:t,t:n})=>{let r=N.useMemo(()=>{let t=e.transition;return t==null?``:typeof t==`number`?t===0?``:`${t}s`:t},[e.transition]);return(0,P.jsx)(`div`,{className:`form-control mb-3`,children:(0,P.jsx)(W,{label:n(`event_form.transition`)||`Transition Time`,value:r,onChange:e=>t(`transition`,e===``||e===`0ms`||e===`0s`?void 0:e),maximum:6e4,allowedUnits:[`ms`,`s`]})})},de=({action:e,onUpdate:n,t:r})=>{let i=e.colors||[],a=()=>{let e=[[255,0,0],[0,255,0],[0,0,255],[255,255,0],[255,0,255],[0,255,255],[255,128,0],[128,0,255],[255,255,255]],t=e[i.length%e.length];n(`colors`,[...i,t])},o=(e,t)=>{let r=[...i];r[e]=t,n(`colors`,r)},s=e=>{n(`colors`,i.filter((t,n)=>n!==e))};return(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:r(`event_form.cycle_colors`)})}),(0,P.jsx)(`p`,{className:`text-xs opacity-60 mb-2`,children:r(`event_form.cycle_colors_hint`)}),i.length===0&&(0,P.jsx)(`div`,{className:`text-sm opacity-50 italic mb-2`,children:r(`event_form.cycle_no_colors`)}),(0,P.jsx)(`div`,{className:`flex flex-wrap gap-2 mb-2`,children:i.map((e,n)=>(0,P.jsxs)(`div`,{className:`flex items-center gap-1 bg-base-200 rounded-lg px-2 py-1`,children:[(0,P.jsx)(`span`,{className:`text-xs font-mono opacity-60 mr-1`,children:n+1}),(0,P.jsx)(`input`,{type:`color`,value:D(e),onChange:e=>o(n,w(e.target.value)),className:`w-8 h-8 cursor-pointer rounded border-0 p-0`}),(0,P.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-xs text-error`,onClick:()=>s(n),children:(0,P.jsx)(t,{size:10})})]},n))}),(0,P.jsxs)(`button`,{type:`button`,className:`btn btn-outline btn-sm gap-1`,onClick:a,children:[(0,P.jsx)(l,{size:10}),r(`event_form.cycle_add_color`)]})]})},fe=({action:e,onUpdate:n,t:r,selectedLight:i,selectedDevice:a,isEspHome:o,isWled:s})=>{let c=e.presets||[],l=N.useMemo(()=>o&&i?.effects?i.effects.filter(e=>e).map(e=>({id:e,name:e===`None`?`None (${r(`event_form.static_color`)||`Static`})`:e})):s&&a?.wled?.effects?a.wled.effects.map(e=>({id:e.id,name:e.name})):[],[o,s,i,a]),u=e=>{c.includes(e)||n(`presets`,[...c,e])},d=e=>{n(`presets`,c.filter((t,n)=>n!==e))},f=(e,t)=>{let r=e+t;if(r<0||r>=c.length)return;let i=[...c];[i[e],i[r]]=[i[r],i[e]],n(`presets`,i)},p=e=>{let t=l.find(t=>t.id===e);return t?t.name:String(e)};return(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:r(`event_form.cycle_presets`)})}),(0,P.jsx)(`p`,{className:`text-xs opacity-60 mb-2`,children:r(`event_form.cycle_presets_hint`)}),c.length===0&&(0,P.jsx)(`div`,{className:`text-sm opacity-50 italic mb-2`,children:r(`event_form.cycle_no_presets`)}),c.length>0&&(0,P.jsx)(`div`,{className:`space-y-1 mb-2`,children:c.map((e,n)=>(0,P.jsxs)(`div`,{className:`flex items-center gap-2 bg-base-200 rounded-lg px-3 py-1.5`,children:[(0,P.jsxs)(`span`,{className:`text-xs font-mono opacity-60 w-5`,children:[n+1,`.`]}),(0,P.jsx)(`span`,{className:`text-sm flex-1`,children:p(e)}),(0,P.jsxs)(`div`,{className:`flex gap-0.5`,children:[(0,P.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-xs`,onClick:()=>f(n,-1),disabled:n===0,children:`▲`}),(0,P.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-xs`,onClick:()=>f(n,1),disabled:n===c.length-1,children:`▼`}),(0,P.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-xs text-error`,onClick:()=>d(n),children:(0,P.jsx)(t,{size:10})})]})]},n))}),l.length>0?(0,P.jsx)(`div`,{className:`flex gap-2`,children:(0,P.jsxs)(`select`,{className:`select select-bordered select-sm flex-1`,defaultValue:``,onChange:e=>{let t=e.target.value;t&&(u(s?parseInt(t):t),e.target.value=``)},children:[(0,P.jsx)(`option`,{value:``,children:r(`event_form.cycle_add_preset`)}),l.filter(e=>!c.includes(e.id)).map(e=>(0,P.jsx)(`option`,{value:String(e.id),children:e.name},String(e.id)))]})}):(0,P.jsx)(`div`,{className:`text-xs text-warning`,children:o?`No effects found on this light. Re-discover the device to load effects.`:`No effects available. Re-discover the device to load effects.`})]})},pe=({action:e,onUpdate:t,t:n,allRemoteDevices:r,actionCoverOptions:i})=>{let a=r.find(t=>t.id===e.remote_device),o=a?.protocol===`esphome_api`?a?.esphome_api?.covers||[]:a?.mqtt?.covers||[],s=o.find(t=>t.id===e.cover_id),c=(0,N.useMemo)(()=>k(i,s),[i,s]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Y,{value:e.remote_device||``,onChange:e=>t(`remote_device`,e),allRemoteDevices:r,label:n(`event_form.remote_device`),placeholder:n(`event_form.select_remote_device`)}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.cover_id`)})}),(0,P.jsxs)(_,{value:e.cover_id||``,onValueChange:n=>{t(`cover_id`,n),!C(o.find(e=>e.id===n))&&O.includes(e.action_cover)&&(t(`action_cover`,`TOGGLE`),t(`data`,void 0))},disabled:!e.remote_device,children:[(0,P.jsx)(m,{className:`w-full input input-bordered h-auto min-h-12 py-2`,children:(0,P.jsx)(g,{placeholder:n(`event_form.select_cover_id`),children:s?(0,P.jsxs)(`div`,{className:`flex flex-col items-start`,children:[(0,P.jsxs)(`span`,{className:`font-medium`,children:[`supports_tilt`in s&&(0,P.jsx)(`span`,{className:`badge badge-xs ${s.supports_tilt?`badge-accent`:`badge-info`} mr-1`,children:s.supports_tilt?n(`covers.type_venetian`):n(`covers.type_time_based`)}),s.name||s.id]}),(0,P.jsxs)(`span`,{className:`text-xs opacity-60`,children:[`ID: `,s.id]})]}):(0,P.jsx)(`span`,{className:`opacity-50`,children:n(`event_form.select_cover_id`)})})}),(0,P.jsx)(p,{children:o.map(e=>(0,P.jsx)(f,{value:e.id,children:(0,P.jsxs)(`div`,{className:`flex flex-col`,children:[(0,P.jsxs)(`span`,{className:`font-medium`,children:[`supports_tilt`in e&&(0,P.jsx)(`span`,{className:`badge badge-xs ${e.supports_tilt?`badge-accent`:`badge-info`} mr-1`,children:e.supports_tilt?n(`covers.type_venetian`):n(`covers.type_time_based`)}),e.name||e.id]}),(0,P.jsxs)(`span`,{className:`text-xs opacity-60`,children:[`ID: `,e.id]})]})},e.id))})]}),!e.remote_device&&(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt text-warning`,children:n(`event_form.select_device_first`)})})]}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.cover_action`)})}),(0,P.jsxs)(_,{value:e.action_cover||`TOGGLE`,onValueChange:n=>{if(t(`action_cover`,n),n!==`TILT`){let n=e.data||{};if(n.tilt_position!==void 0){let{tilt_position:e,...r}=n;t(`data`,Object.keys(r).length>0?r:void 0)}}},children:[(0,P.jsx)(m,{className:`w-full`,children:(0,P.jsx)(g,{placeholder:`Select action...`})}),(0,P.jsx)(p,{children:c.map(e=>(0,P.jsx)(f,{value:e,children:A(e,n)},e))})]})]}),e.action_cover===`TILT`&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsxs)(`span`,{className:`label-text font-medium`,children:[n(`event_form.tilt_position`),` `,(0,P.jsx)(`span`,{className:`text-error`,children:`*`})]})}),(0,P.jsx)(v,{className:e.data?.tilt_position===void 0||e.data?.tilt_position===null||e.data?.tilt_position===``?`input-error`:``,min:0,max:100,placeholder:`50`,value:e.data?.tilt_position??``,onChange:n=>{t(`data`,{...e.data||{},tilt_position:n===``?void 0:n})}}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.tilt_position_hint`)})})]}),e.action_cover===`SMART_TOGGLE`&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.always_open_till`)})}),(0,P.jsx)(v,{min:0,max:100,placeholder:`50`,value:e.data?.always_open_till??50,onChange:n=>{t(`data`,{...e.data||{},always_open_till:n===``?50:n})}}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.always_open_till_hint`)})})]}),s&&C(s)&&(0,P.jsx)(`div`,{className:`form-control mb-3`,children:(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-4`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm`,checked:e.restore_tilt||!1,onChange:e=>t(`restore_tilt`,e.target.checked||void 0)}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.restore_tilt`)}),(0,P.jsx)(`p`,{className:`text-sm text-base-content/70 mt-1`,children:n(`event_form.restore_tilt_hint`)})]})]})})]})},me=e=>{switch(e){case`output`:return(0,P.jsx)(c,{className:`text-amber-500 shrink-0 text-sm`});case`cover`:return(0,P.jsx)(n,{className:`text-blue-500 shrink-0 text-sm`});case`mqtt`:return(0,P.jsx)(i,{className:`text-info shrink-0 text-sm`});case`output_over_mqtt`:return(0,P.jsxs)(`div`,{className:`flex gap-0.5 items-center shrink-0`,children:[(0,P.jsx)(i,{className:`text-info text-[10px]`}),(0,P.jsx)(c,{className:`text-amber-500 text-[10px]`})]});case`cover_over_mqtt`:return(0,P.jsxs)(`div`,{className:`flex gap-0.5 items-center shrink-0`,children:[(0,P.jsx)(i,{className:`text-info text-[10px]`}),(0,P.jsx)(n,{className:`text-blue-500 text-[10px]`})]});case`remote_output`:return(0,P.jsxs)(`div`,{className:`flex gap-0.5 items-center shrink-0`,children:[(0,P.jsx)(a,{className:`text-success text-[10px]`}),(0,P.jsx)(c,{className:`text-amber-500 text-[10px]`})]});case`remote_cover`:return(0,P.jsxs)(`div`,{className:`flex gap-0.5 items-center shrink-0`,children:[(0,P.jsx)(a,{className:`text-success text-[10px]`}),(0,P.jsx)(n,{className:`text-blue-500 text-[10px]`})]});default:return null}},he=M,ge=E,_e=({action:e,index:n,onUpdate:r,onRemove:i,allOutputs:a,allOutputGroups:s,allCovers:c,allAreas:l,allRemoteDevices:d=[],actionTypeOptions:h,actionOutputOptions:x,actionCoverOptions:S,showValidation:C=!1,savedOutputs:w,savedOutputGroups:T,savedCovers:E,clickType:D,allBinarySensors:O=[],allRemoteInputs:k=[],excludeEntityId:A,preferredArea:j})=>{let{t:M}=y(),F=e.action||`output`,I=D===`long`||D===`double_then_long`||D===`single_then_long`,L=!!(e.min_duration||e.max_duration),R=!!e.repeat,z=C?he(e,M):null,B=e=>E?E.some(t=>t.id===e||t===e):!0,[V,H]=(0,N.useState)(`idle`),[G,q]=(0,N.useState)(null);return(0,P.jsxs)(`div`,{className:`border border-base-300 rounded-lg p-4 mb-3 bg-base-100`,children:[(0,P.jsxs)(`div`,{className:`flex justify-between items-center mb-3`,children:[(0,P.jsxs)(`span`,{className:`font-medium`,children:[M(`event_form.action`),` `,n+1]}),(0,P.jsxs)(`div`,{className:`flex items-center gap-1`,children:[V===`success`&&(0,P.jsx)(`span`,{className:`text-success text-xs font-medium mr-1`,children:M(`event_form.test_action_success`)}),V===`error`&&(0,P.jsx)(`span`,{className:`text-error text-xs font-medium mr-1`,title:G||``,children:M(`event_form.test_action_error`)}),(0,P.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm ${V===`success`?`text-success`:V===`error`?`text-error`:`text-info`}`,onClick:async()=>{H(`loading`),q(null);try{await u.post(`/api/test-action`,{action:e}),H(`success`),setTimeout(()=>H(`idle`),2e3)}catch(e){q(e?.response?.data?.detail||e.message||`Unknown error`),H(`error`),setTimeout(()=>{H(`idle`),q(null)},4e3)}},disabled:V===`loading`||!!z,title:M(`event_form.test_action`),children:V===`loading`?(0,P.jsx)(`span`,{className:`loading loading-spinner loading-xs`}):(0,P.jsx)(o,{className:`w-3 h-3`})}),(0,P.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm text-error`,onClick:i,children:(0,P.jsx)(t,{})})]})]}),z&&(0,P.jsx)(b,{variant:`error`,className:`mb-3`,message:z}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-semibold`,children:M(`event_form.action_type`)})}),(0,P.jsxs)(_,{value:F,onValueChange:e=>r(`action`,e),children:[(0,P.jsx)(m,{className:`w-full`,children:(0,P.jsx)(g,{placeholder:M(`event_form.action_type`),children:e=>{if(!e)return M(`event_form.action_type`);let t=`actions.type_${e}`,n=M(t),r=n===t?e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `):n;return(0,P.jsxs)(`span`,{className:`flex items-center gap-2`,children:[me(e),r]})}})}),(0,P.jsx)(p,{children:h.map(e=>{let t=`actions.type_${e}`,n=M(t),r=n===t?e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `):n;return(0,P.jsx)(f,{value:e,children:(0,P.jsxs)(`span`,{className:`flex items-center gap-2`,children:[me(e),r]})},e)})})]})]}),F===`cover`&&(0,P.jsx)(ee,{action:e,onUpdate:r,t:M,allCovers:c,allAreas:l,actionCoverOptions:S,savedCovers:E,isCoverSaved:B,preferredArea:j}),F===`output`&&(0,P.jsx)(K,{action:e,onUpdate:r,t:M,allOutputs:a,allOutputGroups:s,allAreas:l,actionOutputOptions:x,savedOutputs:w,savedOutputGroups:T,preferredArea:j}),F===`mqtt`&&(0,P.jsx)(te,{action:e,onUpdate:r,t:M}),F===`output_over_mqtt`&&(0,P.jsx)(re,{action:e,onUpdate:r,t:M,allOutputs:a,allOutputGroups:s,actionOutputOptions:x}),F===`cover_over_mqtt`&&(0,P.jsx)(ie,{action:e,onUpdate:r,t:M,allCovers:c,allAreas:l,actionCoverOptions:S}),F===`remote_output`&&(0,P.jsx)(oe,{action:e,onUpdate:r,t:M,allRemoteDevices:d,actionOutputOptions:x}),F===`remote_cover`&&(0,P.jsx)(pe,{action:e,onUpdate:r,t:M,allRemoteDevices:d,actionCoverOptions:S}),I&&!R&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label`,children:[(0,P.jsx)(`span`,{className:`label-text font-medium`,children:M(`event_form.duration_thresholds`)}),(0,P.jsx)(`span`,{className:`label-text-alt`,children:M(`event_form.duration_thresholds_hint`)})]}),(0,P.jsxs)(`div`,{className:`flex gap-2`,children:[(0,P.jsx)(`div`,{className:`flex-1`,children:(0,P.jsx)(v,{placeholder:M(`event_form.min_duration_ms`),value:e.min_duration||``,onChange:e=>r(`min_duration`,e===``?void 0:e),min:0})}),(0,P.jsx)(`div`,{className:`flex-1`,children:(0,P.jsx)(v,{placeholder:M(`event_form.max_duration_ms`),value:e.max_duration||``,onChange:e=>r(`max_duration`,e===``?void 0:e),min:0})})]})]}),I&&!L&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-3`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-primary`,checked:e.repeat||!1,onChange:e=>{r(`repeat`,e.target.checked||void 0),e.target.checked||r(`repeat_interval`,void 0)}}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`label-text font-medium`,children:M(`event_form.repeat_on_hold`)}),(0,P.jsx)(`p`,{className:`label-text-alt text-xs opacity-70`,children:M(`event_form.repeat_on_hold_hint`)})]})]}),e.repeat&&(0,P.jsxs)(`div`,{className:`mt-2`,children:[(0,P.jsx)(W,{value:e.repeat_interval??`800ms`,onChange:e=>r(`repeat_interval`,e),label:M(`event_form.repeat_interval_ms`),minimum:200,allowedUnits:[`ms`,`s`]}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt text-xs`,children:M(`event_form.repeat_interval_hint`)})})]})]}),(D===`pressed`||D===`released`)&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-3`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-primary`,checked:!!e.delay,onChange:e=>{e.target.checked?r(`__batch`,{delay:`2min`,delay_cancel_on:[D===`released`?`pressed`:`released`]}):r(`__batch`,{delay:void 0,delay_cancel_on:void 0})}}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`label-text font-medium`,children:M(`actions.delay_execution`)}),(0,P.jsx)(`p`,{className:`label-text-alt text-xs opacity-70`,children:M(`actions.delay_execution_hint`)})]})]}),e.delay&&(0,P.jsxs)(`div`,{className:`mt-2 ml-8 space-y-3`,children:[(0,P.jsx)(W,{value:e.delay,onChange:e=>r(`delay`,e),label:M(`actions.delay_time`),minimum:1,allowedUnits:[`s`,`min`]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`label`,{className:`label py-0`,children:(0,P.jsx)(`span`,{className:`label-text text-sm font-medium`,children:M(`actions.delay_cancel_on`)})}),(0,P.jsx)(`p`,{className:`text-xs opacity-60 mb-2 ml-1`,children:M(`actions.delay_cancel_on_hint`)}),(0,P.jsx)(`div`,{className:`flex flex-wrap gap-2 ml-1`,children:[`pressed`,`released`].map(t=>(0,P.jsxs)(`label`,{className:`label cursor-pointer gap-1.5 p-0`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-xs checkbox-primary`,checked:(e.delay_cancel_on||[]).includes(t),onChange:n=>{let i=e.delay_cancel_on||[],a=n.target.checked?[...i,t]:i.filter(e=>e!==t);r(`delay_cancel_on`,a.length>0?a:void 0)}}),(0,P.jsx)(`span`,{className:`label-text text-xs`,children:M(`actions.event_${t}`)})]},t))})]})]})]}),(0,P.jsx)(U,{action:e,onUpdate:r,t:M,allOutputs:a,allCovers:c,allBinarySensors:O,allRemoteInputs:k,allAreas:l,showValidation:C,excludeEntityId:A})]})};export{W as a,J as i,ge as n,U as o,he as r,_e as t};
1
+ import{r as e}from"./chunk-QTnfLwEv.js";import{Jt as t,Nt as n,an as r,b as i,en as a,gt as o,in as s,nt as c,vt as l}from"./fa-BEzM11bH.js";import{n as u}from"./axios-uEi8e3Ln.js";import{a as d,i as f,n as p,o as m,r as h,s as g,t as _}from"./select-D3PIwbEj.js";import{f as v}from"./LoggerForm-j61zOvFL.js";import{I as y,c as b,k as x}from"./index-b1MgMQ6k.js";import{r as S}from"./FormInputToggle-rzxH8pqC.js";import{a as C,c as w,d as T,i as E,l as D,n as O,o as k,s as A,t as j,u as M}from"./coverUtils-Cf4Uxn2U.js";var N=e(r(),1),P=s(),F=[`time`,`date`,`state`,`sun`],I=[{label:`event_form.condition_sun_group_basic`,anchors:[`sunrise`,`sunset`,`solar_noon`,`solar_midnight`]},{label:`event_form.condition_sun_group_twilight`,anchors:[`civil_dawn`,`civil_dusk`,`nautical_dawn`,`nautical_dusk`,`astronomical_dawn`,`astronomical_dusk`]},{label:`event_form.condition_sun_group_photographic`,anchors:[`golden_hour_morning_start`,`golden_hour_morning_end`,`golden_hour_evening_start`,`golden_hour_evening_end`,`blue_hour_morning_start`,`blue_hour_morning_end`,`blue_hour_evening_start`,`blue_hour_evening_end`]}],L=[`day`,`civil_twilight`,`nautical_twilight`,`astronomical_twilight`,`night`,`golden_hour`,`blue_hour`];function R(e){return e.phase?`phase`:e.above!==void 0||e.below!==void 0?`elevation`:`window`}function z(e){if(e==null||e===``)return``;if(typeof e==`number`)return String(Math.round(e/60));let t=String(e).trim().match(/^([-+]?\d*\.?\d+)\s*(\w*)$/);if(!t)return``;let n=parseFloat(t[1]),r=(t[2]||`s`).toLowerCase(),i=r.startsWith(`h`)?n*3600:r.startsWith(`m`)?n*60:n;return String(Math.round(i/60))}function B(e){let t=e.trim();if(t===``||t===`-`)return;let n=parseInt(t,10);if(!(isNaN(n)||n===0))return`${n}min`}var V=[`binary_sensor`,`cover`,`output`,`remote_output`,`remote_input`],H={binary_sensor:[`is_on`,`is_off`],cover:[`is_open`,`is_closed`],output:[`is_on`,`is_off`],remote_output:[`is_on`,`is_off`],remote_input:[`is_on`,`is_off`]},U=({action:e,onUpdate:n,t:r,allOutputs:i=[],allCovers:a=[],allBinarySensors:o=[],allRemoteInputs:s=[],allAreas:c=[],showValidation:u=!1,excludeEntityId:v})=>{let y=()=>e.conditions?.list?.length?e.conditions.list:e.condition?[e.condition]:[],b=()=>e.conditions?.mode||`and`,C=y(),w=b(),E=C.length>0,D=(e,t)=>{let r=t??w;e.length===0?n(`__batch`,{condition:void 0,conditions:void 0}):e.length===1?n(`__batch`,{condition:e[0],conditions:void 0}):n(`__batch`,{conditions:{mode:r,list:e},condition:void 0})},O=()=>{let e={type:`time`,after:``,before:``};D([...C,e])},k=e=>{D(C.filter((t,n)=>n!==e))},A=(e,t,n)=>{let r=[...C],i={...r[e],[t]:n};t===`type`&&(n===`time`||n===`date`?(delete i.entity,delete i.entity_id,delete i.state,i.after=``,i.before=``):n===`state`?(delete i.after,delete i.before,i.entity=``,i.entity_id=``,i.state=``):n===`sun`&&(delete i.entity,delete i.entity_id,delete i.state,i.after=``,i.before=``),n!==`sun`&&(delete i.after_offset,delete i.before_offset,delete i.phase,delete i.above,delete i.below)),t===`entity`&&(i.entity_id=``,i.state=``),r[e]=i,D(r)},j=e=>{switch(e){case`binary_sensor`:return o.filter(e=>{let t=e.id||e.boneio_input||e.name||``;return!(!t||v&&t===v)}).map(e=>{let t=e.id||e.boneio_input||e.name||``;return{id:t,name:e.name||t,area:e.area}});case`cover`:return a.filter(e=>!!(e.id||e.open_relay)).map(e=>{let t=e.id||(e.open_relay&&e.close_relay?`cover_${e.open_relay}_${e.close_relay}`.toLowerCase():``);return{id:t,name:e.name||t,area:e.area}}).filter(e=>!!e.id);case`output`:return i.filter(e=>!e.remote_source&&(e.boneio_output||e.id)).map(e=>{let t=e.id||e.boneio_output||``;return{id:t,name:e.name||t,area:e.area}}).filter(e=>!!e.id);case`remote_output`:return i.filter(e=>!!e.remote_source&&(e.device_id||e.id)).map(e=>{let t=e.id||`${e.device_id}_${e.output_id}`;return{id:t,name:e.name||t,area:e.area,badge:`📡 ${e.device_id||e.remote_source}`,badgeClass:`badge-info`}}).filter(e=>!!e.id);case`remote_input`:return(s||[]).filter(e=>!!(e.id||`${e.device_id}_${e.input_id}`)).map(e=>{let t=e.id||`${e.device_id}_${e.input_id}`,n=e._device_name||e.device_id||``;return{id:t,name:e.name||t,area:e.area,badge:n?`📡 ${n}`:void 0,badgeClass:`badge-info`}}).filter(e=>!!e.id);default:return[]}},{hasLocation:M}=x(),[U,W]=(0,N.useState)({}),G=(e,t)=>{W(n=>({...n,[e]:t}));let n=[...C],r={...n[e]};delete r.phase,delete r.above,delete r.below,delete r.after_offset,delete r.before_offset,r.after=``,r.before=``,n[e]=r,D(n)},K=(e,n)=>{let i=u?T(e,r):null;return(0,P.jsxs)(`div`,{className:`border rounded-lg p-3 mb-2 bg-base-200/50 ${i?`border-error`:`border-base-300`}`,children:[(0,P.jsxs)(`div`,{className:`flex justify-between items-center mb-2`,children:[(0,P.jsxs)(`span`,{className:`text-sm font-medium`,children:[r(`event_form.condition`),` `,C.length>1?`#${n+1}`:``]}),(0,P.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-xs text-error`,onClick:()=>k(n),title:r(`event_form.remove_condition`),children:(0,P.jsx)(t,{className:`w-3 h-3`})})]}),i&&(0,P.jsx)(`div`,{className:`alert alert-error py-1 px-3 mb-2 text-xs`,children:(0,P.jsx)(`span`,{children:i})}),(0,P.jsxs)(`div`,{className:`form-control mb-2`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_type`)})}),(0,P.jsxs)(_,{value:e.type,onValueChange:e=>A(n,`type`,e),children:[(0,P.jsx)(m,{className:`w-full h-9`,children:(0,P.jsx)(g,{})}),(0,P.jsx)(p,{children:F.map(t=>{let n=t===`sun`&&!M&&e.type!==`sun`;return(0,P.jsxs)(f,{value:t,disabled:n,children:[r(`event_form.condition_type_${t}`),n&&(0,P.jsxs)(`span`,{className:`text-xs opacity-60`,children:[` `,`— `,r(`event_form.condition_sun_needs_location_short`)]})]},t)})})]}),!M&&(0,P.jsx)(`span`,{className:`text-xs opacity-60 mt-1`,children:r(`event_form.condition_sun_needs_location`)})]}),e.type===`time`&&(0,P.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_after`)})}),(0,P.jsx)(`input`,{type:`time`,className:`input input-bordered input-sm w-full ${u&&!e.after&&!e.before?`input-error`:``}`,value:e.after||``,onChange:e=>A(n,`after`,e.target.value),title:r(`event_form.condition_time_after_hint`)})]}),(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_before`)})}),(0,P.jsx)(`input`,{type:`time`,className:`input input-bordered input-sm w-full ${u&&!e.after&&!e.before?`input-error`:``}`,value:e.before||``,onChange:e=>A(n,`before`,e.target.value),title:r(`event_form.condition_time_before_hint`)})]}),(0,P.jsx)(`div`,{className:`col-span-2`,children:(0,P.jsx)(`span`,{className:`text-xs opacity-60`,children:r(`event_form.condition_midnight_crossover`)})})]}),e.type===`date`&&(0,P.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_after`)})}),(0,P.jsx)(`input`,{type:`text`,className:`input input-bordered input-sm w-full ${u&&!e.after&&!e.before?`input-error`:``}`,placeholder:`MM-DD`,value:e.after||``,onChange:e=>A(n,`after`,e.target.value),title:r(`event_form.condition_date_after_hint`),pattern:`\\d{2}-\\d{2}`})]}),(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_before`)})}),(0,P.jsx)(`input`,{type:`text`,className:`input input-bordered input-sm w-full ${u&&!e.after&&!e.before?`input-error`:``}`,placeholder:`MM-DD`,value:e.before||``,onChange:e=>A(n,`before`,e.target.value),title:r(`event_form.condition_date_before_hint`),pattern:`\\d{2}-\\d{2}`})]}),(0,P.jsx)(`div`,{className:`col-span-2`,children:(0,P.jsx)(`span`,{className:`text-xs opacity-60`,children:r(`event_form.condition_year_crossover`)})})]}),e.type===`sun`&&(()=>{let t=U[n]??R(e),i=t=>(0,P.jsxs)(_,{value:e[t]||``,onValueChange:e=>A(n,t,e),children:[(0,P.jsx)(m,{className:`w-full h-9`,children:(0,P.jsx)(g,{placeholder:r(`event_form.condition_sun_anchor`)})}),(0,P.jsx)(p,{children:I.map(e=>(0,P.jsxs)(h,{children:[(0,P.jsx)(d,{children:r(e.label)}),e.anchors.map(e=>(0,P.jsx)(f,{value:e,children:r(`sun.anchor_${e}`)},e))]},e.label))})]}),a=t=>(0,P.jsxs)(`label`,{className:`input input-bordered input-sm flex items-center gap-1 w-full`,children:[(0,P.jsx)(`input`,{type:`number`,className:`grow min-w-0 bg-transparent outline-hidden`,placeholder:`0`,step:5,value:z(e[t]),onChange:e=>A(n,t,B(e.target.value))}),(0,P.jsx)(`span`,{className:`text-xs opacity-60 shrink-0`,children:r(`event_form.condition_sun_minutes`)})]});return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`form-control mb-2`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_sun_mode`)})}),(0,P.jsxs)(_,{value:t,onValueChange:e=>G(n,e),children:[(0,P.jsx)(m,{className:`w-full h-9`,children:(0,P.jsx)(g,{})}),(0,P.jsxs)(p,{children:[(0,P.jsx)(f,{value:`window`,children:r(`event_form.condition_sun_mode_window`)}),(0,P.jsx)(f,{value:`phase`,children:r(`event_form.condition_sun_mode_phase`)}),(0,P.jsx)(f,{value:`elevation`,children:r(`event_form.condition_sun_mode_elevation`)})]})]})]}),t===`window`&&(0,P.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_after`)})}),i(`after`)]}),(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_before`)})}),i(`before`)]}),(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-xs opacity-70`,children:r(`event_form.condition_sun_offset`)})}),a(`after_offset`)]}),(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-xs opacity-70`,children:r(`event_form.condition_sun_offset`)})}),a(`before_offset`)]}),(0,P.jsx)(`div`,{className:`col-span-2`,children:(0,P.jsx)(`span`,{className:`text-xs opacity-60`,children:r(`event_form.condition_sun_window_hint`)})})]}),t===`phase`&&(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_sun_phase`)})}),(0,P.jsxs)(_,{value:e.phase||``,onValueChange:e=>A(n,`phase`,e),children:[(0,P.jsx)(m,{className:`w-full h-9`,children:(0,P.jsx)(g,{placeholder:r(`event_form.condition_sun_phase`)})}),(0,P.jsx)(p,{children:L.map(e=>(0,P.jsx)(f,{value:e,children:r(`sun.phase_${e}`)},e))})]}),(0,P.jsx)(`span`,{className:`text-xs opacity-60 mt-1`,children:r(`event_form.condition_sun_phase_hint`)})]}),t===`elevation`&&(0,P.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_sun_above`)})}),(0,P.jsx)(`input`,{type:`number`,className:`input input-bordered input-sm w-full`,placeholder:`-6`,min:-90,max:90,value:e.above??``,onChange:e=>A(n,`above`,e.target.value===``?void 0:parseFloat(e.target.value))})]}),(0,P.jsxs)(`div`,{className:`form-control`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_sun_below`)})}),(0,P.jsx)(`input`,{type:`number`,className:`input input-bordered input-sm w-full`,placeholder:`10`,min:-90,max:90,value:e.below??``,onChange:e=>A(n,`below`,e.target.value===``?void 0:parseFloat(e.target.value))})]}),(0,P.jsx)(`div`,{className:`col-span-2`,children:(0,P.jsx)(`span`,{className:`text-xs opacity-60`,children:r(`event_form.condition_sun_elevation_hint`)})})]})]})})(),e.type===`state`&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`form-control mb-2`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_entity`)})}),(0,P.jsxs)(_,{value:e.entity||``,onValueChange:e=>A(n,`entity`,e),children:[(0,P.jsx)(m,{className:`w-full h-9`,children:(0,P.jsx)(g,{placeholder:r(`event_form.condition_entity`)})}),(0,P.jsx)(p,{children:V.map(e=>(0,P.jsx)(f,{value:e,children:r(`event_form.condition_entity_${e}`)},e))})]})]}),e.entity&&(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`form-control mb-2`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_entity_id`)})}),j(e.entity).length>0?(0,P.jsx)(S,{value:e.entity_id||``,onChange:e=>A(n,`entity_id`,e),items:j(e.entity),allAreas:c,placeholder:r(`event_form.condition_entity_id`),compact:!0,recentKey:`condition-${e.entity}`}):e.entity===`remote_input`||e.entity===`remote_output`?(0,P.jsxs)(`div`,{className:`alert alert-info py-2 px-3 text-xs`,children:[(0,P.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 24 24`,className:`stroke-current shrink-0 w-4 h-4`,children:(0,P.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z`})}),(0,P.jsx)(`span`,{children:r(`event_form.condition_entity_${e.entity}_empty`)})]}):(0,P.jsx)(`input`,{type:`text`,className:`input input-bordered input-sm w-full text-only`,value:e.entity_id||``,onChange:e=>A(n,`entity_id`,e.target.value)})]}),(0,P.jsxs)(`div`,{className:`form-control mb-2`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm`,children:r(`event_form.condition_state`)})}),(0,P.jsxs)(_,{value:e.state||``,onValueChange:e=>A(n,`state`,e),children:[(0,P.jsx)(m,{className:`w-full h-9`,children:(0,P.jsx)(g,{placeholder:r(`event_form.condition_state`)})}),(0,P.jsx)(p,{children:(H[e.entity]||[]).map(e=>(0,P.jsx)(f,{value:e,children:r(`event_form.condition_state_${e}`)},e))})]})]})]})]})]},n)};return(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`div`,{className:`divider text-xs opacity-70 my-1`,children:r(`event_form.conditions`)}),E?(0,P.jsxs)(P.Fragment,{children:[C.length>1&&(0,P.jsxs)(`div`,{className:`form-control mb-2`,children:[(0,P.jsx)(`label`,{className:`label py-1`,children:(0,P.jsx)(`span`,{className:`label-text text-sm font-medium`,children:r(`event_form.condition_mode`)})}),(0,P.jsxs)(_,{value:w,onValueChange:e=>D(C,e),children:[(0,P.jsx)(m,{className:`w-full h-9`,children:(0,P.jsx)(g,{})}),(0,P.jsxs)(p,{children:[(0,P.jsx)(f,{value:`and`,children:r(`event_form.condition_mode_and`)}),(0,P.jsx)(f,{value:`or`,children:r(`event_form.condition_mode_or`)})]})]})]}),C.map((e,t)=>K(e,t)),(0,P.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-xs text-primary`,onClick:O,children:[(0,P.jsx)(l,{className:`w-3 h-3 mr-1`}),r(`event_form.add_condition`)]})]}):(0,P.jsxs)(`button`,{type:`button`,className:`btn btn-ghost btn-sm text-primary w-full`,onClick:O,children:[(0,P.jsx)(l,{className:`w-3 h-3 mr-1`}),r(`event_form.add_condition`)]}),E&&(0,P.jsx)(`p`,{className:`text-xs opacity-50 mt-1`,children:r(`event_form.condition_hint`)})]})},W=({value:e,onChange:t,label:n,required:r=!1,minimum:i=0,maximum:a,allowedUnits:o=[`ms`,`s`,`min`,`h`],unitlessNumberUnit:s=`ms`})=>{let c=e=>e?e>=36e5&&e%36e5==0?{value:e/36e5,unit:`h`}:e>=6e4&&e%6e4==0?{value:e/6e4,unit:`min`}:e>=1e3&&e%1e3==0?{value:e/1e3,unit:`s`}:{value:e,unit:`ms`}:{value:0,unit:`s`},l=e=>{if(!e&&e!==0)return{value:0,unit:`s`};if(typeof e==`string`){let t=e.match(/^(\d+(?:\.\d+)?)\s*(ms|s|sec|min|h|hours?)$/i);if(t){let e=parseFloat(t[1]),n=t[2].toLowerCase();return n===`sec`&&(n=`s`),(n===`hour`||n===`hours`)&&(n=`h`),{value:e,unit:n}}let n=parseFloat(e);return isNaN(n)?{value:0,unit:`s`}:s===`ms`?c(n):{value:n,unit:s}}return typeof e==`number`?c(e):typeof e==`object`&&e?e.hours!==void 0&&e.hours>0?{value:e.hours,unit:`h`}:e.minutes!==void 0&&e.minutes>0?{value:e.minutes,unit:`min`}:e.seconds!==void 0&&e.seconds>0?{value:e.seconds,unit:`s`}:e.milliseconds!==void 0&&e.milliseconds>0?{value:e.milliseconds,unit:`ms`}:e._total_in_seconds===void 0?{value:0,unit:`s`}:c(e._total_in_seconds*1e3):{value:0,unit:`s`}},u=(e,t)=>e==null||isNaN(e)?`0${t||`s`}`:`${e}${t}`,{value:d,unit:f}=l(e),[p,m]=N.useState(d),[h,g]=N.useState(f),_=N.useMemo(()=>typeof e==`object`&&e?JSON.stringify(e):String(e??``),[e]);N.useEffect(()=>{let t=l(e);m(t.value),g(t.unit)},[_]);let y=e=>{let n=parseFloat(e)||0;if(a!==void 0){let e=S(h);n>e&&(n=e)}m(n),t(u(n,h))},b=e=>{g(e),t(u(p,e))},x=e=>Math.ceil(i/(e===`h`?36e5:e===`min`?6e4:e===`s`?1e3:1)),S=e=>a===void 0?1/0:Math.floor(a/(e===`h`?36e5:e===`min`?6e4:e===`s`?1e3:1)),C=x(h),w=a===void 0?void 0:S(h);return(0,P.jsxs)(`div`,{className:`form-control w-full`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsxs)(`span`,{className:`label-text font-medium`,children:[n,r&&(0,P.jsx)(`span`,{className:`text-error ml-1`,children:`*`})]})}),(0,P.jsxs)(`div`,{className:`flex gap-2 w-full`,children:[(0,P.jsx)(v,{value:p,onChange:e=>y(String(e===``?0:e)),min:C,max:w,className:`flex-1 w-3/4 min-h-12`,placeholder:`0`}),(0,P.jsx)(`div`,{className:`join border border-base-300 rounded-lg overflow-hidden shrink-0`,children:o.map(e=>(0,P.jsx)(`button`,{type:`button`,onClick:()=>b(e),className:`btn btn-sm min-h-12 h-12 rounded-none border-0 join-item px-3 font-medium transition-all ${h===e?`btn-primary`:`bg-base-100 hover:bg-base-200/50 text-base-content/70`}`,children:e},e))})]}),(i>0||a!==void 0)&&(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsxs)(`span`,{className:`label-text-alt text-base-content/70`,children:[i>0&&`Min: ${i}ms`,i>0&&a!==void 0&&` | `,a!==void 0&&`Max: ${a}ms`]})})]})},G=[`TOGGLE`,`ON`,`OFF`],K=({action:e,onUpdate:t,t:n,allOutputs:r,allOutputGroups:i,allAreas:a=[],actionOutputOptions:o,savedOutputs:s,savedOutputGroups:c,preferredArea:l})=>{let u=(n,r)=>{e.pin&&t(`pin`,void 0),t(n,r)},d=(e,t)=>t?c?c.some(t=>t.id===e):!0:s?s.some(t=>(t.id||t.boneio_output)===e):!0,h=e=>{if(!(!e||e===`none`))return n(`outputs.output_types.${e}`)||e},v=e=>{switch(e){case`light`:return`badge-warning`;case`switch`:return`badge-info`;case`valve`:return`badge-accent`;case`button`:return`badge-secondary`;default:return`badge-ghost`}},y=(0,N.useMemo)(()=>{let e=r.filter(e=>{let t=e.output_type?.toLowerCase();return e&&typeof e==`object`&&t!==`cover`&&t!==`none`&&(e.id||e.boneio_output)}).map(e=>{let t=e.id||e.boneio_output,r=d(t,!1),i=e.output_type;return{id:t,name:e.name||t,area:e.area,badge:h(i),badgeClass:v(i),disabled:!r,disabledLabel:r?void 0:n(`common.unsaved`)}}),t=i.filter(e=>e&&typeof e==`object`&&e.id).map(e=>{let t=d(e.id,!0);return{id:e.id,name:e.name||e.id,area:e.area,badge:n(`outputs.categories.groups`),badgeClass:`badge-secondary`,disabled:!t,disabledLabel:t?void 0:n(`common.unsaved`)}});return[...e,...t]},[r,i,s,c]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.output`)})}),(0,P.jsx)(S,{value:e.boneio_output||e.pin||``,onChange:e=>u(`boneio_output`,e),items:y,allAreas:a,placeholder:n(`event_form.select_output`),recentKey:`outputs`,preferredArea:l})]}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.action_output`)})}),(0,P.jsxs)(_,{value:e.action_output||`TOGGLE`,onValueChange:e=>t(`action_output`,e),children:[(0,P.jsx)(m,{className:`w-full`,children:(0,P.jsx)(g,{placeholder:`Select action...`})}),(0,P.jsx)(p,{children:G.map(e=>(0,P.jsx)(f,{value:e,children:A(e,n)},e))})]})]})]})},q=[`TILT`,`TILT_OPEN`,`TILT_CLOSE`],ee=({action:e,onUpdate:t,t:n,allCovers:r,allAreas:i,actionCoverOptions:a,isCoverSaved:o,preferredArea:s})=>{let c=(n,r)=>{e.pin&&t(`pin`,void 0),t(n,r)},l=e=>n(e===`venetian`?`covers.type_venetian`:`covers.type_time_based`),u=(0,N.useMemo)(()=>j(r).map(e=>{let t=o(e.id);return{id:e.id,name:e.name||e.id,area:e.area,badge:l(e.platform),badgeClass:e.platform===`venetian`?`badge-accent`:`badge-info`,disabled:!t,disabledLabel:t?void 0:n(`common.unsaved`)}}),[r,o]),d=e.boneio_cover||e.pin||``,h=(0,N.useMemo)(()=>j(r).find(e=>e.id===d),[r,d])?.platform===`venetian`,y=(0,N.useMemo)(()=>h?a:a.filter(e=>!q.includes(e)),[a,h]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.cover`)})}),(0,P.jsx)(S,{value:d,onChange:n=>{c(`boneio_cover`,n),j(r).find(e=>e.id===n)?.platform!==`venetian`&&q.includes(e.action_cover)&&(t(`action_cover`,`TOGGLE`),t(`data`,void 0))},items:u,allAreas:i,placeholder:n(`event_form.select_cover`),recentKey:`covers`,preferredArea:s})]}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.cover_action`)})}),(0,P.jsxs)(_,{value:e.action_cover||`TOGGLE`,onValueChange:n=>{if(t(`action_cover`,n),n!==`TILT`){let n=e.data||{};if(n.tilt_position!==void 0){let{tilt_position:e,...r}=n;t(`data`,Object.keys(r).length>0?r:void 0)}}},children:[(0,P.jsx)(m,{className:`w-full`,children:(0,P.jsx)(g,{placeholder:`Select action...`})}),(0,P.jsx)(p,{children:y.map(e=>(0,P.jsx)(f,{value:e,children:A(e,n)},e))})]})]}),e.action_cover===`TILT`&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsxs)(`span`,{className:`label-text font-medium`,children:[n(`event_form.tilt_position`),` `,(0,P.jsx)(`span`,{className:`text-error`,children:`*`})]})}),(0,P.jsx)(v,{className:e.data?.tilt_position===void 0||e.data?.tilt_position===null||e.data?.tilt_position===``?`input-error`:``,min:0,max:100,placeholder:`50`,value:e.data?.tilt_position??``,onChange:n=>{t(`data`,{...e.data||{},tilt_position:n===``?void 0:n})}}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.tilt_position_hint`)})})]}),e.action_cover===`SMART_TOGGLE`&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.always_open_till`)})}),(0,P.jsx)(v,{min:0,max:100,placeholder:`50`,value:e.data?.always_open_till??50,onChange:n=>{t(`data`,{...e.data||{},always_open_till:n===``?50:n})}}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.always_open_till_hint`)})})]}),h&&(0,P.jsx)(`div`,{className:`form-control mb-3`,children:(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-4`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm`,checked:e.restore_tilt||!1,onChange:e=>t(`restore_tilt`,e.target.checked||void 0)}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.restore_tilt`)}),(0,P.jsx)(`p`,{className:`text-sm text-base-content/70 mt-1`,children:n(`event_form.restore_tilt_hint`)})]})]})})]})},te=({action:e,onUpdate:t,t:n})=>(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.mqtt_topic`)})}),(0,P.jsx)(`input`,{type:`text`,className:`input input-bordered w-full`,placeholder:n(`event_form.mqtt_topic_placeholder`),value:e.topic||``,onChange:e=>t(`topic`,e.target.value)})]}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.mqtt_message`)})}),(0,P.jsx)(`input`,{type:`text`,className:`input input-bordered w-full`,placeholder:n(`event_form.mqtt_message_placeholder`),value:e.action_mqtt_msg||``,onChange:e=>t(`action_mqtt_msg`,e.target.value)})]})]});function J(e){return e?e.toLowerCase().replace(/ą/g,`a`).replace(/ć/g,`c`).replace(/ę/g,`e`).replace(/ł/g,`l`).replace(/ń/g,`n`).replace(/ó/g,`o`).replace(/ś/g,`s`).replace(/ź/g,`z`).replace(/ż/g,`z`).replace(/\s+/g,`_`).replace(/[^a-z0-9_-]/g,``):``}var ne=[`TOGGLE`,`ON`,`OFF`],re=({action:e,onUpdate:t,t:n,actionOutputOptions:r})=>{let i=(n,r)=>{e.pin&&t(`pin`,void 0),t(n,r)};return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.boneio_id`)})}),(0,P.jsx)(`input`,{type:`text`,className:`input input-bordered w-full`,placeholder:n(`event_form.boneio_id_placeholder`),value:e.boneio_id||``,onChange:e=>t(`boneio_id`,J(e.target.value))}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.boneio_id_hint`)})})]}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.output_id`)})}),(0,P.jsx)(`input`,{type:`text`,className:`input input-bordered w-full`,placeholder:n(`event_form.output_id_placeholder`),value:e.boneio_output||e.pin||``,onChange:e=>i(`boneio_output`,e.target.value)}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.output_id_hint`)})})]}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.action_output`)})}),(0,P.jsxs)(_,{value:e.action_output||`TOGGLE`,onValueChange:e=>t(`action_output`,e),children:[(0,P.jsx)(m,{className:`w-full`,children:(0,P.jsx)(g,{placeholder:`Select action...`})}),(0,P.jsx)(p,{children:ne.map(e=>(0,P.jsx)(f,{value:e,children:A(e,n)},e))})]})]})]})},ie=({action:e,onUpdate:t,t:n,actionCoverOptions:r})=>{let i=(n,r)=>{e.pin&&t(`pin`,void 0),t(n,r)};return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.boneio_id`)})}),(0,P.jsx)(`input`,{type:`text`,className:`input input-bordered w-full`,placeholder:n(`event_form.boneio_id_placeholder`),value:e.boneio_id||``,onChange:e=>t(`boneio_id`,J(e.target.value))}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.boneio_id_hint`)})})]}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.cover_id`)})}),(0,P.jsx)(`input`,{type:`text`,className:`input input-bordered w-full`,placeholder:n(`event_form.cover_id_placeholder`),value:e.boneio_cover||e.pin||``,onChange:e=>i(`boneio_cover`,e.target.value)}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.cover_id_hint`)})})]}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.cover_action`)})}),(0,P.jsxs)(_,{value:e.action_cover||`TOGGLE`,onValueChange:e=>t(`action_cover`,e),children:[(0,P.jsx)(m,{className:`w-full`,children:(0,P.jsx)(g,{placeholder:`Select action...`})}),(0,P.jsx)(p,{children:r.map(e=>(0,P.jsx)(f,{value:e,children:A(e,n)},e))})]})]}),e.action_cover===`TILT`&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsxs)(`span`,{className:`label-text font-medium`,children:[n(`event_form.tilt_position`),` `,(0,P.jsx)(`span`,{className:`text-error`,children:`*`})]})}),(0,P.jsx)(v,{className:e.data?.tilt_position===void 0||e.data?.tilt_position===null||e.data?.tilt_position===``?`input-error`:``,min:0,max:100,placeholder:`50`,value:e.data?.tilt_position??``,onChange:n=>{t(`data`,{...e.data||{},tilt_position:n===``?void 0:n})}}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.tilt_position_hint`)})})]}),e.action_cover===`SMART_TOGGLE`&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.always_open_till`)})}),(0,P.jsx)(v,{min:0,max:100,placeholder:`50`,value:e.data?.always_open_till??50,onChange:n=>{t(`data`,{...e.data||{},always_open_till:n===``?50:n})}}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.always_open_till_hint`)})})]})]})},Y=({value:e,onChange:t,allRemoteDevices:n,placeholder:r=`Select remote device...`,label:i,protocolFilter:a})=>{let o=n.filter(e=>e.id?a&&a.length>0?a.includes(e.protocol||``):!0:!1),s=e=>{switch(e){case`esphome_api`:return`ESPHome`;case`wled`:return`WLED`;default:return`MQTT`}};return(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[i&&(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:i})}),(0,P.jsxs)(_,{value:e||``,onValueChange:t,children:[(0,P.jsx)(m,{className:`w-full`,children:(0,P.jsx)(g,{placeholder:r})}),(0,P.jsx)(p,{children:o.map(e=>(0,P.jsx)(f,{value:e.id,children:(0,P.jsxs)(`div`,{className:`flex flex-col`,children:[(0,P.jsx)(`span`,{children:e.name||e.id}),(0,P.jsx)(`span`,{className:`text-xs opacity-60 protocol text-left`,children:s(e.protocol)})]})},e.id))})]})]})},X=[`BRIGHTNESS_UP`,`BRIGHTNESS_DOWN`,`BRIGHTNESS_UP_CYCLE`,`BRIGHTNESS_DOWN_CYCLE`],ae=e=>{if(!e)return[];let t=e.protocol===`esphome_api`,n=e.protocol===`wled`;if(t){let t=(e.esphome_api?.switches||[]).map(e=>({...e,_type:`switch`})),n=(e.esphome_api?.lights||[]).map(e=>({...e,_type:`light`}));return[...t,...n]}else if(n)return[{id:`main`,name:`All LEDs`,_type:`wled_main`},...(e.wled?.segments||[]).map(e=>({...e,id:String(e.id),name:e.name||`Segment ${e.id}`,_type:`wled_segment`}))];else return e.mqtt?.outputs||[]},oe=({action:e,onUpdate:t,t:n,allRemoteDevices:r,actionOutputOptions:i})=>{let a=r.find(t=>t.id===e.remote_device),o=ae(a),s=o.find(t=>t.id===e.output_id),c=a?.protocol===`esphome_api`,l=a?.protocol===`wled`,u=a?.esphome_api?.lights||[],d=u.find(t=>t.id===e.output_id),h=c&&d,v=[`TOGGLE`,`ON`,`OFF`],y=N.useMemo(()=>{if(!s)return i;let e=s._type;return e===`switch`||e===`light`&&!d?.supports_brightness||!e||![`light`,`wled_main`,`wled_segment`].includes(e)?i.filter(e=>v.includes(e)):i},[s,d,i]),b=e.action_output||`TOGGLE`;return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Y,{value:e.remote_device||``,onChange:e=>t(`remote_device`,e),allRemoteDevices:r,label:n(`event_form.remote_device`),placeholder:n(`event_form.select_remote_device`)}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.output_id`)})}),(0,P.jsxs)(_,{value:e.output_id||``,onValueChange:n=>{t(`output_id`,n);let r=o.find(e=>e.id===n);(!r||r._type===`switch`||r._type===`light`&&!u.find(e=>e.id===n)?.supports_brightness||![`light`,`wled_main`,`wled_segment`].includes(r._type))&&e.action_output&&!v.includes(e.action_output)&&t(`action_output`,`TOGGLE`)},disabled:!e.remote_device,children:[(0,P.jsx)(m,{className:`w-full input input-bordered h-auto min-h-12 py-2`,children:(0,P.jsx)(g,{placeholder:n(`event_form.select_output_id`),children:s?(0,P.jsxs)(`div`,{className:`flex flex-col items-start`,children:[(0,P.jsx)(`span`,{className:`font-medium`,children:s.name||s.id}),(0,P.jsx)(`span`,{className:`text-xs opacity-60`,children:s._type===`light`?`💡 Light`:s._type===`switch`?`🔌 Switch`:s._type===`wled_main`?`🌈 WLED All`:s._type===`wled_segment`?`🌈 Segment ${s.len?`(${s.len} LEDs)`:``}`:`ID: ${s.id}`})]}):(0,P.jsx)(`span`,{className:`opacity-50`,children:n(`event_form.select_output_id`)})})}),(0,P.jsx)(p,{children:o.map(e=>(0,P.jsx)(f,{value:e.id,children:(0,P.jsxs)(`div`,{className:`flex flex-col`,children:[(0,P.jsx)(`span`,{className:`font-medium`,children:e.name||e.id}),(0,P.jsx)(`span`,{className:`text-xs opacity-60`,children:e._type===`light`?(0,P.jsxs)(P.Fragment,{children:[`💡 Light `,e.supports_brightness&&`• Dimmable`]}):e._type===`switch`?(0,P.jsx)(P.Fragment,{children:`🔌 Switch`}):e._type===`wled_main`?(0,P.jsx)(P.Fragment,{children:`🌈 Control all LEDs`}):e._type===`wled_segment`?(0,P.jsxs)(P.Fragment,{children:[`🌈 Segment `,e.len?`• ${e.len} LEDs`:``]}):(0,P.jsxs)(P.Fragment,{children:[`ID: `,e.id]})})]})},e.id))})]}),!e.remote_device&&(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt text-warning`,children:n(`event_form.select_device_first`)})})]}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.output_action`)})}),(0,P.jsxs)(_,{value:e.action_output||`TOGGLE`,onValueChange:e=>t(`action_output`,e),children:[(0,P.jsx)(m,{className:`w-full`,children:(0,P.jsx)(g,{placeholder:`Select action...`})}),(0,P.jsx)(p,{children:y.map(e=>(0,P.jsx)(f,{value:e,children:A(e,n)},e))})]})]}),h&&![`CYCLE_COLOR`,`CYCLE_PRESET`].includes(b)&&(0,P.jsx)(se,{action:e,onUpdate:t,t:n,selectedLight:d,effectiveAction:b}),l&&![`CYCLE_COLOR`,`CYCLE_PRESET`].includes(b)&&(0,P.jsx)(ce,{action:e,onUpdate:t,t:n,selectedDevice:a,effectiveAction:b}),b===`CYCLE_COLOR`&&(h||l)&&(0,P.jsx)(de,{action:e,onUpdate:t,t:n}),b===`CYCLE_PRESET`&&(h||l)&&(0,P.jsx)(fe,{action:e,onUpdate:t,t:n,selectedLight:d,selectedDevice:a,isEspHome:!!c,isWled:!!l}),[`CYCLE_COLOR`,`CYCLE_PRESET`].includes(b)&&(h||l)&&(0,P.jsx)($,{action:e,onUpdate:t,t:n})]})},se=({action:e,onUpdate:t,t:n,selectedLight:r,effectiveAction:i})=>{let a=r?.supports_brightness&&[`ON`,`TOGGLE`,`SET_BRIGHTNESS`].includes(i),o=r?.supports_brightness&&X.includes(i),s=r?.supports_color_temp&&[`ON`,`TOGGLE`].includes(i),c=(r?.supports_rgb||r?.supports_rgbw)&&[`ON`,`TOGGLE`].includes(i);return(0,P.jsxs)(P.Fragment,{children:[a&&(0,P.jsx)(Z,{action:e,onUpdate:t,t:n}),o&&(0,P.jsx)(Q,{action:e,onUpdate:t,t:n}),s&&(0,P.jsx)(le,{action:e,onUpdate:t,t:n,minMireds:r?.min_mireds||153,maxMireds:r?.max_mireds||500}),c&&(0,P.jsx)(ue,{action:e,onUpdate:t,t:n}),(0,P.jsx)($,{action:e,onUpdate:t,t:n})]})},ce=({action:e,onUpdate:t,t:n,selectedDevice:r,effectiveAction:i})=>{let a=[`ON`,`TOGGLE`,`SET_BRIGHTNESS`].includes(i),o=X.includes(i),s=[`ON`,`TOGGLE`].includes(i);return(0,P.jsxs)(P.Fragment,{children:[a&&(0,P.jsx)(Z,{action:e,onUpdate:t,t:n}),o&&(0,P.jsx)(Q,{action:e,onUpdate:t,t:n}),s&&(0,P.jsx)(ue,{action:e,onUpdate:t,t:n}),r?.wled?.effects&&r.wled.effects.length>0&&[`ON`,`TOGGLE`].includes(i)&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-2 pb-1`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm checkbox-secondary`,checked:e.effect!==void 0,onChange:e=>t(`effect`,e.target.checked?0:void 0)}),(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.wled_effect`)||`Effect`})]}),e.effect!==void 0&&(0,P.jsx)(`div`,{className:`pl-7`,children:(0,P.jsx)(`select`,{className:`select select-bordered w-full`,value:e.effect??0,onChange:e=>t(`effect`,parseInt(e.target.value)),children:r.wled.effects.map(e=>(0,P.jsx)(`option`,{value:e.id,children:e.name},e.id))})})]}),r?.wled?.palettes&&r.wled.palettes.length>0&&e.effect!==void 0&&e.effect!==0&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-2 pb-1`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm checkbox-secondary`,checked:e.palette!==void 0,onChange:e=>t(`palette`,e.target.checked?0:void 0)}),(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.wled_palette`)||`Color Palette`})]}),e.palette!==void 0&&(0,P.jsx)(`div`,{className:`pl-7`,children:(0,P.jsx)(`select`,{className:`select select-bordered w-full`,value:e.palette??0,onChange:e=>t(`palette`,parseInt(e.target.value)),children:r.wled.palettes.map(e=>(0,P.jsx)(`option`,{value:e.id,children:e.name},e.id))})})]}),e.effect!==void 0&&e.effect!==0&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-2 pb-1`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm checkbox-secondary`,checked:e.effect_speed!==void 0,onChange:e=>t(`effect_speed`,e.target.checked?128:void 0)}),(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.effect_speed`)||`Effect Speed`}),e.effect_speed!==void 0&&(0,P.jsxs)(`span`,{className:`label-text-alt ml-auto`,children:[Math.round(e.effect_speed/255*100),`%`]})]}),e.effect_speed!==void 0&&(0,P.jsx)(`div`,{className:`pl-7`,children:(0,P.jsx)(`input`,{type:`range`,min:`0`,max:`255`,value:e.effect_speed,onChange:e=>t(`effect_speed`,parseInt(e.target.value)),className:`range range-secondary range-sm w-full`})})]}),e.effect!==void 0&&e.effect!==0&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-2 pb-1`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm checkbox-secondary`,checked:e.effect_intensity!==void 0,onChange:e=>t(`effect_intensity`,e.target.checked?128:void 0)}),(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.effect_intensity`)||`Effect Intensity`}),e.effect_intensity!==void 0&&(0,P.jsxs)(`span`,{className:`label-text-alt ml-auto`,children:[Math.round(e.effect_intensity/255*100),`%`]})]}),e.effect_intensity!==void 0&&(0,P.jsx)(`div`,{className:`pl-7`,children:(0,P.jsx)(`input`,{type:`range`,min:`0`,max:`255`,value:e.effect_intensity,onChange:e=>t(`effect_intensity`,parseInt(e.target.value)),className:`range range-secondary range-sm w-full`})})]}),(0,P.jsx)($,{action:e,onUpdate:t,t:n})]})},Z=({action:e,onUpdate:t,t:n})=>(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-2 pb-1`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm checkbox-primary`,checked:e.brightness!==void 0,onChange:e=>t(`brightness`,e.target.checked?255:void 0)}),(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.brightness`)||`Brightness`}),e.brightness!==void 0&&(0,P.jsxs)(`span`,{className:`label-text-alt ml-auto`,children:[Math.round(e.brightness/255*100),`%`]})]}),e.brightness!==void 0&&(0,P.jsxs)(`div`,{className:`pl-7`,children:[(0,P.jsx)(`input`,{type:`range`,min:`1`,max:`255`,value:e.brightness,onChange:e=>t(`brightness`,parseInt(e.target.value)),className:`range range-primary range-sm w-full`}),(0,P.jsxs)(`div`,{className:`w-full flex justify-between text-xs opacity-50`,children:[(0,P.jsx)(`span`,{children:`1%`}),(0,P.jsx)(`span`,{children:`50%`}),(0,P.jsx)(`span`,{children:`100%`})]})]})]}),Q=({action:e,onUpdate:t,t:n})=>(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label justify-start gap-2 pb-1`,children:[(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.brightness_step`)||`Brightness Step`}),(0,P.jsxs)(`span`,{className:`label-text-alt ml-auto`,children:[e.brightness_step??10,`%`]})]}),(0,P.jsxs)(`div`,{className:`px-1`,children:[(0,P.jsx)(`input`,{type:`range`,min:`1`,max:`50`,value:e.brightness_step??10,onChange:e=>{let n=parseInt(e.target.value);t(`brightness_step`,n===10?void 0:n)},className:`range range-primary range-sm w-full`}),(0,P.jsxs)(`div`,{className:`w-full flex justify-between text-xs opacity-50 px-1`,children:[(0,P.jsx)(`span`,{children:`1%`}),(0,P.jsx)(`span`,{children:`25%`}),(0,P.jsx)(`span`,{children:`50%`})]})]})]}),le=({action:e,onUpdate:t,t:n,minMireds:r,maxMireds:i})=>(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-2 pb-1`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm checkbox-warning`,checked:e.color_temp!==void 0,onChange:e=>t(`color_temp`,e.target.checked?r:void 0)}),(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.color_temp`)||`Color Temperature`}),e.color_temp!==void 0&&(0,P.jsxs)(`span`,{className:`label-text-alt ml-auto`,children:[e.color_temp,` mireds`]})]}),e.color_temp!==void 0&&(0,P.jsxs)(`div`,{className:`pl-7`,children:[(0,P.jsx)(`input`,{type:`range`,min:r,max:i,value:e.color_temp,onChange:e=>t(`color_temp`,parseInt(e.target.value)),className:`range range-warning range-sm w-full`}),(0,P.jsxs)(`div`,{className:`w-full flex justify-between text-xs opacity-50`,children:[(0,P.jsx)(`span`,{children:n(`event_form.color_temp_cool`)||`Cool`}),(0,P.jsx)(`span`,{children:n(`event_form.color_temp_warm`)||`Warm`})]})]})]}),ue=({action:e,onUpdate:t,t:n})=>(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-2 pb-1`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm checkbox-accent`,checked:e.rgb!==void 0,onChange:e=>t(`rgb`,e.target.checked?[255,255,255]:void 0)}),(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.rgb_color`)||`RGB Color`}),e.rgb&&(0,P.jsx)(`span`,{className:`w-6 h-6 rounded border border-base-300 ml-auto`,style:{backgroundColor:D(e.rgb)}})]}),e.rgb&&(0,P.jsxs)(`div`,{className:`pl-7 flex items-center gap-3`,children:[(0,P.jsx)(`input`,{type:`color`,value:D(e.rgb),onChange:e=>t(`rgb`,w(e.target.value)),className:`w-12 h-10 cursor-pointer rounded border-0`}),(0,P.jsxs)(`span`,{className:`text-sm opacity-70`,children:[`RGB(`,e.rgb[0],`, `,e.rgb[1],`, `,e.rgb[2],`)`]})]})]}),$=({action:e,onUpdate:t,t:n})=>{let r=N.useMemo(()=>{let t=e.transition;return t==null?``:typeof t==`number`?t===0?``:`${t}s`:t},[e.transition]);return(0,P.jsx)(`div`,{className:`form-control mb-3`,children:(0,P.jsx)(W,{label:n(`event_form.transition`)||`Transition Time`,value:r,onChange:e=>t(`transition`,e===``||e===`0ms`||e===`0s`?void 0:e),maximum:6e4,allowedUnits:[`ms`,`s`]})})},de=({action:e,onUpdate:n,t:r})=>{let i=e.colors||[],a=()=>{let e=[[255,0,0],[0,255,0],[0,0,255],[255,255,0],[255,0,255],[0,255,255],[255,128,0],[128,0,255],[255,255,255]],t=e[i.length%e.length];n(`colors`,[...i,t])},o=(e,t)=>{let r=[...i];r[e]=t,n(`colors`,r)},s=e=>{n(`colors`,i.filter((t,n)=>n!==e))};return(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:r(`event_form.cycle_colors`)})}),(0,P.jsx)(`p`,{className:`text-xs opacity-60 mb-2`,children:r(`event_form.cycle_colors_hint`)}),i.length===0&&(0,P.jsx)(`div`,{className:`text-sm opacity-50 italic mb-2`,children:r(`event_form.cycle_no_colors`)}),(0,P.jsx)(`div`,{className:`flex flex-wrap gap-2 mb-2`,children:i.map((e,n)=>(0,P.jsxs)(`div`,{className:`flex items-center gap-1 bg-base-200 rounded-lg px-2 py-1`,children:[(0,P.jsx)(`span`,{className:`text-xs font-mono opacity-60 mr-1`,children:n+1}),(0,P.jsx)(`input`,{type:`color`,value:D(e),onChange:e=>o(n,w(e.target.value)),className:`w-8 h-8 cursor-pointer rounded border-0 p-0`}),(0,P.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-xs text-error`,onClick:()=>s(n),children:(0,P.jsx)(t,{size:10})})]},n))}),(0,P.jsxs)(`button`,{type:`button`,className:`btn btn-outline btn-sm gap-1`,onClick:a,children:[(0,P.jsx)(l,{size:10}),r(`event_form.cycle_add_color`)]})]})},fe=({action:e,onUpdate:n,t:r,selectedLight:i,selectedDevice:a,isEspHome:o,isWled:s})=>{let c=e.presets||[],l=N.useMemo(()=>o&&i?.effects?i.effects.filter(e=>e).map(e=>({id:e,name:e===`None`?`None (${r(`event_form.static_color`)||`Static`})`:e})):s&&a?.wled?.effects?a.wled.effects.map(e=>({id:e.id,name:e.name})):[],[o,s,i,a]),u=e=>{c.includes(e)||n(`presets`,[...c,e])},d=e=>{n(`presets`,c.filter((t,n)=>n!==e))},f=(e,t)=>{let r=e+t;if(r<0||r>=c.length)return;let i=[...c];[i[e],i[r]]=[i[r],i[e]],n(`presets`,i)},p=e=>{let t=l.find(t=>t.id===e);return t?t.name:String(e)};return(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:r(`event_form.cycle_presets`)})}),(0,P.jsx)(`p`,{className:`text-xs opacity-60 mb-2`,children:r(`event_form.cycle_presets_hint`)}),c.length===0&&(0,P.jsx)(`div`,{className:`text-sm opacity-50 italic mb-2`,children:r(`event_form.cycle_no_presets`)}),c.length>0&&(0,P.jsx)(`div`,{className:`space-y-1 mb-2`,children:c.map((e,n)=>(0,P.jsxs)(`div`,{className:`flex items-center gap-2 bg-base-200 rounded-lg px-3 py-1.5`,children:[(0,P.jsxs)(`span`,{className:`text-xs font-mono opacity-60 w-5`,children:[n+1,`.`]}),(0,P.jsx)(`span`,{className:`text-sm flex-1`,children:p(e)}),(0,P.jsxs)(`div`,{className:`flex gap-0.5`,children:[(0,P.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-xs`,onClick:()=>f(n,-1),disabled:n===0,children:`▲`}),(0,P.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-xs`,onClick:()=>f(n,1),disabled:n===c.length-1,children:`▼`}),(0,P.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-xs text-error`,onClick:()=>d(n),children:(0,P.jsx)(t,{size:10})})]})]},n))}),l.length>0?(0,P.jsx)(`div`,{className:`flex gap-2`,children:(0,P.jsxs)(`select`,{className:`select select-bordered select-sm flex-1`,defaultValue:``,onChange:e=>{let t=e.target.value;t&&(u(s?parseInt(t):t),e.target.value=``)},children:[(0,P.jsx)(`option`,{value:``,children:r(`event_form.cycle_add_preset`)}),l.filter(e=>!c.includes(e.id)).map(e=>(0,P.jsx)(`option`,{value:String(e.id),children:e.name},String(e.id)))]})}):(0,P.jsx)(`div`,{className:`text-xs text-warning`,children:o?`No effects found on this light. Re-discover the device to load effects.`:`No effects available. Re-discover the device to load effects.`})]})},pe=({action:e,onUpdate:t,t:n,allRemoteDevices:r,actionCoverOptions:i})=>{let a=r.find(t=>t.id===e.remote_device),o=a?.protocol===`esphome_api`?a?.esphome_api?.covers||[]:a?.mqtt?.covers||[],s=o.find(t=>t.id===e.cover_id),c=(0,N.useMemo)(()=>k(i,s),[i,s]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(Y,{value:e.remote_device||``,onChange:e=>t(`remote_device`,e),allRemoteDevices:r,label:n(`event_form.remote_device`),placeholder:n(`event_form.select_remote_device`)}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.cover_id`)})}),(0,P.jsxs)(_,{value:e.cover_id||``,onValueChange:n=>{t(`cover_id`,n),!C(o.find(e=>e.id===n))&&O.includes(e.action_cover)&&(t(`action_cover`,`TOGGLE`),t(`data`,void 0))},disabled:!e.remote_device,children:[(0,P.jsx)(m,{className:`w-full input input-bordered h-auto min-h-12 py-2`,children:(0,P.jsx)(g,{placeholder:n(`event_form.select_cover_id`),children:s?(0,P.jsxs)(`div`,{className:`flex flex-col items-start`,children:[(0,P.jsxs)(`span`,{className:`font-medium`,children:[`supports_tilt`in s&&(0,P.jsx)(`span`,{className:`badge badge-xs ${s.supports_tilt?`badge-accent`:`badge-info`} mr-1`,children:s.supports_tilt?n(`covers.type_venetian`):n(`covers.type_time_based`)}),s.name||s.id]}),(0,P.jsxs)(`span`,{className:`text-xs opacity-60`,children:[`ID: `,s.id]})]}):(0,P.jsx)(`span`,{className:`opacity-50`,children:n(`event_form.select_cover_id`)})})}),(0,P.jsx)(p,{children:o.map(e=>(0,P.jsx)(f,{value:e.id,children:(0,P.jsxs)(`div`,{className:`flex flex-col`,children:[(0,P.jsxs)(`span`,{className:`font-medium`,children:[`supports_tilt`in e&&(0,P.jsx)(`span`,{className:`badge badge-xs ${e.supports_tilt?`badge-accent`:`badge-info`} mr-1`,children:e.supports_tilt?n(`covers.type_venetian`):n(`covers.type_time_based`)}),e.name||e.id]}),(0,P.jsxs)(`span`,{className:`text-xs opacity-60`,children:[`ID: `,e.id]})]})},e.id))})]}),!e.remote_device&&(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt text-warning`,children:n(`event_form.select_device_first`)})})]}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.cover_action`)})}),(0,P.jsxs)(_,{value:e.action_cover||`TOGGLE`,onValueChange:n=>{if(t(`action_cover`,n),n!==`TILT`){let n=e.data||{};if(n.tilt_position!==void 0){let{tilt_position:e,...r}=n;t(`data`,Object.keys(r).length>0?r:void 0)}}},children:[(0,P.jsx)(m,{className:`w-full`,children:(0,P.jsx)(g,{placeholder:`Select action...`})}),(0,P.jsx)(p,{children:c.map(e=>(0,P.jsx)(f,{value:e,children:A(e,n)},e))})]})]}),e.action_cover===`TILT`&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsxs)(`span`,{className:`label-text font-medium`,children:[n(`event_form.tilt_position`),` `,(0,P.jsx)(`span`,{className:`text-error`,children:`*`})]})}),(0,P.jsx)(v,{className:e.data?.tilt_position===void 0||e.data?.tilt_position===null||e.data?.tilt_position===``?`input-error`:``,min:0,max:100,placeholder:`50`,value:e.data?.tilt_position??``,onChange:n=>{t(`data`,{...e.data||{},tilt_position:n===``?void 0:n})}}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.tilt_position_hint`)})})]}),e.action_cover===`SMART_TOGGLE`&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.always_open_till`)})}),(0,P.jsx)(v,{min:0,max:100,placeholder:`50`,value:e.data?.always_open_till??50,onChange:n=>{t(`data`,{...e.data||{},always_open_till:n===``?50:n})}}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt`,children:n(`event_form.always_open_till_hint`)})})]}),s&&C(s)&&(0,P.jsx)(`div`,{className:`form-control mb-3`,children:(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-4`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-sm`,checked:e.restore_tilt||!1,onChange:e=>t(`restore_tilt`,e.target.checked||void 0)}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`label-text font-medium`,children:n(`event_form.restore_tilt`)}),(0,P.jsx)(`p`,{className:`text-sm text-base-content/70 mt-1`,children:n(`event_form.restore_tilt_hint`)})]})]})})]})},me=e=>{switch(e){case`output`:return(0,P.jsx)(c,{className:`text-amber-500 shrink-0 text-sm`});case`cover`:return(0,P.jsx)(n,{className:`text-blue-500 shrink-0 text-sm`});case`mqtt`:return(0,P.jsx)(i,{className:`text-info shrink-0 text-sm`});case`output_over_mqtt`:return(0,P.jsxs)(`div`,{className:`flex gap-0.5 items-center shrink-0`,children:[(0,P.jsx)(i,{className:`text-info text-[10px]`}),(0,P.jsx)(c,{className:`text-amber-500 text-[10px]`})]});case`cover_over_mqtt`:return(0,P.jsxs)(`div`,{className:`flex gap-0.5 items-center shrink-0`,children:[(0,P.jsx)(i,{className:`text-info text-[10px]`}),(0,P.jsx)(n,{className:`text-blue-500 text-[10px]`})]});case`remote_output`:return(0,P.jsxs)(`div`,{className:`flex gap-0.5 items-center shrink-0`,children:[(0,P.jsx)(a,{className:`text-success text-[10px]`}),(0,P.jsx)(c,{className:`text-amber-500 text-[10px]`})]});case`remote_cover`:return(0,P.jsxs)(`div`,{className:`flex gap-0.5 items-center shrink-0`,children:[(0,P.jsx)(a,{className:`text-success text-[10px]`}),(0,P.jsx)(n,{className:`text-blue-500 text-[10px]`})]});default:return null}},he=M,ge=E,_e=({action:e,index:n,onUpdate:r,onRemove:i,allOutputs:a,allOutputGroups:s,allCovers:c,allAreas:l,allRemoteDevices:d=[],actionTypeOptions:h,actionOutputOptions:x,actionCoverOptions:S,showValidation:C=!1,savedOutputs:w,savedOutputGroups:T,savedCovers:E,clickType:D,allBinarySensors:O=[],allRemoteInputs:k=[],excludeEntityId:A,preferredArea:j})=>{let{t:M}=y(),F=e.action||`output`,I=D===`long`||D===`double_then_long`||D===`single_then_long`,L=!!(e.min_duration||e.max_duration),R=!!e.repeat,z=C?he(e,M):null,B=e=>E?E.some(t=>t.id===e||t===e):!0,[V,H]=(0,N.useState)(`idle`),[G,q]=(0,N.useState)(null);return(0,P.jsxs)(`div`,{className:`border border-base-300 rounded-lg p-4 mb-3 bg-base-100`,children:[(0,P.jsxs)(`div`,{className:`flex justify-between items-center mb-3`,children:[(0,P.jsxs)(`span`,{className:`font-medium`,children:[M(`event_form.action`),` `,n+1]}),(0,P.jsxs)(`div`,{className:`flex items-center gap-1`,children:[V===`success`&&(0,P.jsx)(`span`,{className:`text-success text-xs font-medium mr-1`,children:M(`event_form.test_action_success`)}),V===`error`&&(0,P.jsx)(`span`,{className:`text-error text-xs font-medium mr-1`,title:G||``,children:M(`event_form.test_action_error`)}),(0,P.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm ${V===`success`?`text-success`:V===`error`?`text-error`:`text-info`}`,onClick:async()=>{H(`loading`),q(null);try{await u.post(`/api/test-action`,{action:e}),H(`success`),setTimeout(()=>H(`idle`),2e3)}catch(e){q(e?.response?.data?.detail||e.message||`Unknown error`),H(`error`),setTimeout(()=>{H(`idle`),q(null)},4e3)}},disabled:V===`loading`||!!z,title:M(`event_form.test_action`),children:V===`loading`?(0,P.jsx)(`span`,{className:`loading loading-spinner loading-xs`}):(0,P.jsx)(o,{className:`w-3 h-3`})}),(0,P.jsx)(`button`,{type:`button`,className:`btn btn-ghost btn-sm text-error`,onClick:i,children:(0,P.jsx)(t,{})})]})]}),z&&(0,P.jsx)(b,{variant:`error`,className:`mb-3`,message:z}),(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text font-semibold`,children:M(`event_form.action_type`)})}),(0,P.jsxs)(_,{value:F,onValueChange:e=>r(`action`,e),children:[(0,P.jsx)(m,{className:`w-full`,children:(0,P.jsx)(g,{placeholder:M(`event_form.action_type`),children:e=>{if(!e)return M(`event_form.action_type`);let t=`actions.type_${e}`,n=M(t),r=n===t?e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `):n;return(0,P.jsxs)(`span`,{className:`flex items-center gap-2`,children:[me(e),r]})}})}),(0,P.jsx)(p,{children:h.map(e=>{let t=`actions.type_${e}`,n=M(t),r=n===t?e.split(`_`).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(` `):n;return(0,P.jsx)(f,{value:e,children:(0,P.jsxs)(`span`,{className:`flex items-center gap-2`,children:[me(e),r]})},e)})})]})]}),F===`cover`&&(0,P.jsx)(ee,{action:e,onUpdate:r,t:M,allCovers:c,allAreas:l,actionCoverOptions:S,savedCovers:E,isCoverSaved:B,preferredArea:j}),F===`output`&&(0,P.jsx)(K,{action:e,onUpdate:r,t:M,allOutputs:a,allOutputGroups:s,allAreas:l,actionOutputOptions:x,savedOutputs:w,savedOutputGroups:T,preferredArea:j}),F===`mqtt`&&(0,P.jsx)(te,{action:e,onUpdate:r,t:M}),F===`output_over_mqtt`&&(0,P.jsx)(re,{action:e,onUpdate:r,t:M,allOutputs:a,allOutputGroups:s,actionOutputOptions:x}),F===`cover_over_mqtt`&&(0,P.jsx)(ie,{action:e,onUpdate:r,t:M,allCovers:c,allAreas:l,actionCoverOptions:S}),F===`remote_output`&&(0,P.jsx)(oe,{action:e,onUpdate:r,t:M,allRemoteDevices:d,actionOutputOptions:x}),F===`remote_cover`&&(0,P.jsx)(pe,{action:e,onUpdate:r,t:M,allRemoteDevices:d,actionCoverOptions:S}),I&&!R&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label`,children:[(0,P.jsx)(`span`,{className:`label-text font-medium`,children:M(`event_form.duration_thresholds`)}),(0,P.jsx)(`span`,{className:`label-text-alt`,children:M(`event_form.duration_thresholds_hint`)})]}),(0,P.jsxs)(`div`,{className:`flex gap-2`,children:[(0,P.jsx)(`div`,{className:`flex-1`,children:(0,P.jsx)(v,{placeholder:M(`event_form.min_duration_ms`),value:e.min_duration||``,onChange:e=>r(`min_duration`,e===``?void 0:e),min:0})}),(0,P.jsx)(`div`,{className:`flex-1`,children:(0,P.jsx)(v,{placeholder:M(`event_form.max_duration_ms`),value:e.max_duration||``,onChange:e=>r(`max_duration`,e===``?void 0:e),min:0})})]})]}),I&&!L&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-3`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-primary`,checked:e.repeat||!1,onChange:e=>{r(`repeat`,e.target.checked||void 0),e.target.checked||r(`repeat_interval`,void 0)}}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`label-text font-medium`,children:M(`event_form.repeat_on_hold`)}),(0,P.jsx)(`p`,{className:`label-text-alt text-xs opacity-70`,children:M(`event_form.repeat_on_hold_hint`)})]})]}),e.repeat&&(0,P.jsxs)(`div`,{className:`mt-2`,children:[(0,P.jsx)(W,{value:e.repeat_interval??`800ms`,onChange:e=>r(`repeat_interval`,e),label:M(`event_form.repeat_interval_ms`),minimum:200,allowedUnits:[`ms`,`s`]}),(0,P.jsx)(`label`,{className:`label`,children:(0,P.jsx)(`span`,{className:`label-text-alt text-xs`,children:M(`event_form.repeat_interval_hint`)})})]})]}),(D===`pressed`||D===`released`)&&(0,P.jsxs)(`div`,{className:`form-control mb-3`,children:[(0,P.jsxs)(`label`,{className:`label cursor-pointer justify-start gap-3`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-primary`,checked:!!e.delay,onChange:e=>{e.target.checked?r(`__batch`,{delay:`2min`,delay_cancel_on:[D===`released`?`pressed`:`released`]}):r(`__batch`,{delay:void 0,delay_cancel_on:void 0})}}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`span`,{className:`label-text font-medium`,children:M(`actions.delay_execution`)}),(0,P.jsx)(`p`,{className:`label-text-alt text-xs opacity-70`,children:M(`actions.delay_execution_hint`)})]})]}),e.delay&&(0,P.jsxs)(`div`,{className:`mt-2 ml-8 space-y-3`,children:[(0,P.jsx)(W,{value:e.delay,onChange:e=>r(`delay`,e),label:M(`actions.delay_time`),minimum:1,allowedUnits:[`s`,`min`]}),(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`label`,{className:`label py-0`,children:(0,P.jsx)(`span`,{className:`label-text text-sm font-medium`,children:M(`actions.delay_cancel_on`)})}),(0,P.jsx)(`p`,{className:`text-xs opacity-60 mb-2 ml-1`,children:M(`actions.delay_cancel_on_hint`)}),(0,P.jsx)(`div`,{className:`flex flex-wrap gap-2 ml-1`,children:[`pressed`,`released`].map(t=>(0,P.jsxs)(`label`,{className:`label cursor-pointer gap-1.5 p-0`,children:[(0,P.jsx)(`input`,{type:`checkbox`,className:`checkbox checkbox-xs checkbox-primary`,checked:(e.delay_cancel_on||[]).includes(t),onChange:n=>{let i=e.delay_cancel_on||[],a=n.target.checked?[...i,t]:i.filter(e=>e!==t);r(`delay_cancel_on`,a.length>0?a:void 0)}}),(0,P.jsx)(`span`,{className:`label-text text-xs`,children:M(`actions.event_${t}`)})]},t))})]})]})]}),(0,P.jsx)(U,{action:e,onUpdate:r,t:M,allOutputs:a,allCovers:c,allBinarySensors:O,allRemoteInputs:k,allAreas:l,showValidation:C,excludeEntityId:A})]})};export{W as a,J as i,ge as n,U as o,he as r,_e as t};
@@ -1 +1 @@
1
- import{r as e}from"./chunk-QTnfLwEv.js";import{A as t,It as n,Jt as r,N as i,R as a,Xt as o,Yt as s,an as c,in as l}from"./fa-BEzM11bH.js";import{n as u}from"./axios-uEi8e3Ln.js";import{C as d,D as f,E as p,I as m,O as h,c as g,h as _,u as v,w as y,x as b}from"./index-DTsVYLUw.js";var x=e(c(),1),S=l();function C(){let{t:e}=m(),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 u.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 u.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 u.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 u.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 u.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 u.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 u.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 u.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 u.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)(b,{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)(_,{icon:(0,S.jsx)(t,{}),title:e(`device_management.configuration_backup`),description:e(`device_management.backup_description`),footer:(0,S.jsxs)(v,{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)(n,{className:`animate-spin`}),e(`device_management.preparing`)]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(t,{}),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)(n,{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 u.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)(_,{icon:(0,S.jsx)(a,{}),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)(n,{className:`animate-spin`}),e(`device_management.preparing`)]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(a,{}),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(n=>(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`td`,{className:`font-mono`,children:n.version}),(0,S.jsx)(`td`,{className:`text-xs font-mono`,children:n.timestamp}),(0,S.jsxs)(`td`,{children:[n.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(n.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(n.path,n.filename),title:e(`device_management.download_config`),children:(0,S.jsx)(t,{})}),(0,S.jsx)(`button`,{className:`btn btn-ghost btn-xs btn-square text-error`,onClick:()=>z(n.path,n.filename),title:e(`device_management.delete`)||`Delete`,children:(0,S.jsx)(r,{})})]})})]},n.path))})]})})]})}),P&&(0,S.jsx)(d,{open:!0,onOpenChange:e=>{e||P.onCancel()},children:(0,S.jsxs)(y,{className:`max-w-md`,children:[(0,S.jsx)(f,{children:(0,S.jsxs)(h,{className:`flex items-center gap-2 text-warning`,children:[(0,S.jsx)(i,{}),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)(i,{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)(p,{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"./chunk-QTnfLwEv.js";import{A as t,It as n,Jt as r,N as i,R as a,Xt as o,Yt as s,an as c,in as l}from"./fa-BEzM11bH.js";import{n as u}from"./axios-uEi8e3Ln.js";import{C as d,D as f,E as p,I as m,O as h,c as g,h as _,u as v,w as y,x as b}from"./index-b1MgMQ6k.js";var x=e(c(),1),S=l();function C(){let{t:e}=m(),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 u.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 u.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 u.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 u.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 u.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 u.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 u.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 u.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 u.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)(b,{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)(_,{icon:(0,S.jsx)(t,{}),title:e(`device_management.configuration_backup`),description:e(`device_management.backup_description`),footer:(0,S.jsxs)(v,{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)(n,{className:`animate-spin`}),e(`device_management.preparing`)]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(t,{}),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)(n,{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 u.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)(_,{icon:(0,S.jsx)(a,{}),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)(n,{className:`animate-spin`}),e(`device_management.preparing`)]}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(a,{}),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(n=>(0,S.jsxs)(`tr`,{children:[(0,S.jsx)(`td`,{className:`font-mono`,children:n.version}),(0,S.jsx)(`td`,{className:`text-xs font-mono`,children:n.timestamp}),(0,S.jsxs)(`td`,{children:[n.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(n.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(n.path,n.filename),title:e(`device_management.download_config`),children:(0,S.jsx)(t,{})}),(0,S.jsx)(`button`,{className:`btn btn-ghost btn-xs btn-square text-error`,onClick:()=>z(n.path,n.filename),title:e(`device_management.delete`)||`Delete`,children:(0,S.jsx)(r,{})})]})})]},n.path))})]})})]})}),P&&(0,S.jsx)(d,{open:!0,onOpenChange:e=>{e||P.onCancel()},children:(0,S.jsxs)(y,{className:`max-w-md`,children:[(0,S.jsx)(f,{children:(0,S.jsxs)(h,{className:`flex items-center gap-2 text-warning`,children:[(0,S.jsx)(i,{}),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)(i,{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)(p,{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};