homebridge-config-ui-x 5.11.1 → 5.11.2-alpha.1

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 (245) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/core/auth/auth.controller.d.ts +4 -0
  3. package/dist/core/config/config.interfaces.d.ts +14 -0
  4. package/dist/core/config/config.service.d.ts +6 -0
  5. package/dist/core/config/config.service.js +8 -0
  6. package/dist/core/config/config.service.js.map +1 -1
  7. package/dist/core/config/config.startup.js +48 -17
  8. package/dist/core/config/config.startup.js.map +1 -1
  9. package/dist/core/feature-flags/feature-flags.registry.js +5 -0
  10. package/dist/core/feature-flags/feature-flags.registry.js.map +1 -1
  11. package/dist/core/homebridge-ipc/homebridge-ipc.service.js +1 -0
  12. package/dist/core/homebridge-ipc/homebridge-ipc.service.js.map +1 -1
  13. package/dist/core/spa/spa-html.service.d.ts +5 -0
  14. package/dist/core/spa/spa-html.service.js +32 -0
  15. package/dist/core/spa/spa-html.service.js.map +1 -0
  16. package/dist/core/spa/spa.filter.d.ts +3 -0
  17. package/dist/core/spa/spa.filter.js +22 -2
  18. package/dist/core/spa/spa.filter.js.map +1 -1
  19. package/dist/core/ssl/ssl-cert-generator.service.d.ts +15 -0
  20. package/dist/core/ssl/ssl-cert-generator.service.js +125 -0
  21. package/dist/core/ssl/ssl-cert-generator.service.js.map +1 -0
  22. package/dist/globalDefaults.js +3 -0
  23. package/dist/globalDefaults.js.map +1 -1
  24. package/dist/main.js +18 -4
  25. package/dist/main.js.map +1 -1
  26. package/dist/modules/accessories/accessories.controller.d.ts +1 -1
  27. package/dist/modules/accessories/accessories.interfaces.d.ts +94 -0
  28. package/dist/modules/accessories/accessories.interfaces.js +2 -0
  29. package/dist/modules/accessories/accessories.interfaces.js.map +1 -0
  30. package/dist/modules/accessories/accessories.module.js +2 -0
  31. package/dist/modules/accessories/accessories.module.js.map +1 -1
  32. package/dist/modules/accessories/accessories.service.d.ts +21 -3
  33. package/dist/modules/accessories/accessories.service.js +280 -17
  34. package/dist/modules/accessories/accessories.service.js.map +1 -1
  35. package/dist/modules/child-bridges/child-bridges.interfaces.d.ts +9 -0
  36. package/dist/modules/config-editor/config-editor.controller.d.ts +4 -0
  37. package/dist/modules/config-editor/config-editor.controller.js +64 -0
  38. package/dist/modules/config-editor/config-editor.controller.js.map +1 -1
  39. package/dist/modules/config-editor/config-editor.service.d.ts +6 -1
  40. package/dist/modules/config-editor/config-editor.service.js +45 -1
  41. package/dist/modules/config-editor/config-editor.service.js.map +1 -1
  42. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js +1 -1
  43. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js.map +1 -1
  44. package/dist/modules/plugins/plugins.service.js +15 -0
  45. package/dist/modules/plugins/plugins.service.js.map +1 -1
  46. package/dist/modules/server/server.controller.d.ts +50 -0
  47. package/dist/modules/server/server.controller.js +201 -2
  48. package/dist/modules/server/server.controller.js.map +1 -1
  49. package/dist/modules/server/server.service.d.ts +48 -0
  50. package/dist/modules/server/server.service.js +502 -14
  51. package/dist/modules/server/server.service.js.map +1 -1
  52. package/dist/modules/status/status.gateway.d.ts +2 -0
  53. package/dist/modules/status/status.interfaces.d.ts +11 -0
  54. package/dist/modules/status/status.service.d.ts +4 -1
  55. package/dist/modules/status/status.service.js +21 -2
  56. package/dist/modules/status/status.service.js.map +1 -1
  57. package/docs/matter-todo.md +15 -0
  58. package/docs/ssl-upload-pr.md +103 -0
  59. package/package.json +3 -1
  60. package/public/3rdpartylicenses.txt +558 -636
  61. package/public/assets/matter.svg +8 -0
  62. package/public/assets/plugin-ui-utils/ui.js +3 -0
  63. package/public/assets/plugin-ui-utils/ui.js.map +1 -1
  64. package/public/chunk-2AZ4IAJX.js +1 -0
  65. package/public/chunk-2W47TKRP.js +8 -0
  66. package/public/chunk-32NSGOWJ.js +1 -0
  67. package/public/chunk-3AXKQX7N.js +1 -0
  68. package/public/chunk-3ND4FTJL.js +1 -0
  69. package/public/chunk-3SLVSNU6.js +1 -0
  70. package/public/chunk-4FBWT2PG.js +1 -0
  71. package/public/chunk-4HRXISNZ.js +1 -0
  72. package/public/chunk-4KYVPUTG.js +1 -0
  73. package/public/chunk-56AT4EBV.js +1 -0
  74. package/public/chunk-5INR7MRZ.js +1 -0
  75. package/public/chunk-5IRYX3WN.js +1 -0
  76. package/public/chunk-5N6BZ66K.js +1 -0
  77. package/public/chunk-5USVC2CC.js +3 -0
  78. package/public/chunk-6G6325AZ.js +1 -0
  79. package/public/chunk-6IPZ57S4.js +1 -0
  80. package/public/chunk-74KAKFTX.js +1 -0
  81. package/public/chunk-77KQMZKD.js +1 -0
  82. package/public/chunk-7IMDRRHF.js +50 -0
  83. package/public/chunk-7MHPXFPT.js +1 -0
  84. package/public/chunk-A2VBYQGU.js +1 -0
  85. package/public/chunk-AASDOQGB.js +1 -0
  86. package/public/chunk-AM2AGROH.js +68 -0
  87. package/public/chunk-AU6YJ4VB.js +1 -0
  88. package/public/chunk-B2R3BKIF.js +1 -0
  89. package/public/chunk-B4AJQJMI.js +1 -0
  90. package/public/chunk-BCAWAC5S.js +19 -0
  91. package/public/chunk-BMH5GPEB.js +1 -0
  92. package/public/{chunk-KI6BE77G.js → chunk-BMOLDRJ3.js} +1 -1
  93. package/public/chunk-BOVXKVZC.js +1 -0
  94. package/public/chunk-BRUFPV4S.js +1 -0
  95. package/public/chunk-C2W3HONU.js +1 -0
  96. package/public/chunk-CAB2VD3D.js +1 -0
  97. package/public/chunk-CB6OGKHG.js +1 -0
  98. package/public/chunk-CBSLCVSR.js +1 -0
  99. package/public/chunk-CQHE4TU3.js +1 -0
  100. package/public/chunk-CYSSAU76.js +1 -0
  101. package/public/chunk-CZBBUBTH.js +1 -0
  102. package/public/chunk-E2INCMIB.js +1 -0
  103. package/public/chunk-F344NE7H.js +2 -0
  104. package/public/{chunk-75KR2TK6.js → chunk-FARCNAHH.js} +1 -1
  105. package/public/chunk-FDD3SM5M.js +1 -0
  106. package/public/chunk-FJCRSYAB.js +1 -0
  107. package/public/{chunk-BKCIVF4W.js → chunk-FL4D5IR7.js} +52 -2
  108. package/public/chunk-FNIVJEH2.js +1 -0
  109. package/public/chunk-FOAHTHQO.js +1 -0
  110. package/public/chunk-FW2NZE2W.js +1 -0
  111. package/public/chunk-GAI5J4YQ.js +5 -0
  112. package/public/chunk-GHNACZX3.js +1 -0
  113. package/public/chunk-GIPFJVAC.js +1 -0
  114. package/public/chunk-GQMGUEFI.js +1 -0
  115. package/public/chunk-GRUJENQH.js +1 -0
  116. package/public/chunk-GV5JF2YJ.js +16 -0
  117. package/public/chunk-GWQFQK2F.js +2 -0
  118. package/public/{chunk-OMFNURQZ.js → chunk-H7F7H5MW.js} +1 -1
  119. package/public/chunk-HRBBCSGX.js +1 -0
  120. package/public/chunk-I7UZENUE.js +1 -0
  121. package/public/chunk-IIAESTI5.js +1 -0
  122. package/public/chunk-IUXXJEPG.js +1 -0
  123. package/public/chunk-JEWURKW3.js +1 -0
  124. package/public/chunk-JH5W4II7.js +1 -0
  125. package/public/chunk-JLNKCN3A.js +1 -0
  126. package/public/chunk-JTGLNZVD.js +1 -0
  127. package/public/chunk-KSP343GE.js +1 -0
  128. package/public/chunk-KTE7SASZ.js +1 -0
  129. package/public/chunk-KTLG6VZT.js +1 -0
  130. package/public/chunk-L2BEQFIA.js +1 -0
  131. package/public/chunk-L6LSM43U.js +1 -0
  132. package/public/chunk-MKCBNPFH.js +1 -0
  133. package/public/chunk-MKFXR7SP.js +1 -0
  134. package/public/chunk-MW6H5Z5G.js +2 -0
  135. package/public/chunk-MYJVEYXW.js +1 -0
  136. package/public/chunk-NDBIOJ3K.js +1 -0
  137. package/public/chunk-NMM246IB.js +1 -0
  138. package/public/chunk-NPWYNB2M.js +1 -0
  139. package/public/chunk-O6MJC7P2.js +1 -0
  140. package/public/chunk-OB3JM574.js +1 -0
  141. package/public/chunk-OKQK5WGA.js +1 -0
  142. package/public/{chunk-RKUILXRL.js → chunk-OWEBBEZA.js} +1 -1
  143. package/public/chunk-OYHGZQRR.js +1 -0
  144. package/public/chunk-QB4JVFF7.js +1 -0
  145. package/public/chunk-QIW6VVBV.js +1 -0
  146. package/public/chunk-QPYSLZDC.js +5 -0
  147. package/public/chunk-QRWK7JO5.js +1 -0
  148. package/public/chunk-R24RQS2V.js +3 -0
  149. package/public/chunk-R3PJ6UT3.js +4 -0
  150. package/public/chunk-RRYSODYJ.js +1 -0
  151. package/public/chunk-SIIM6WZ6.js +12 -0
  152. package/public/chunk-TCWZ7ASJ.js +1 -0
  153. package/public/chunk-TNQQAZ6Z.js +1 -0
  154. package/public/chunk-TWVOLPMB.js +1 -0
  155. package/public/chunk-TXOHSX6R.js +1 -0
  156. package/public/chunk-UR2DRSIX.js +1 -0
  157. package/public/chunk-UTCW7GEG.js +1 -0
  158. package/public/chunk-UXXY7XNH.js +1 -0
  159. package/public/chunk-VHK6V2IY.js +1 -0
  160. package/public/chunk-VNSIIEIM.js +1 -0
  161. package/public/chunk-VQBGFNDB.js +1 -0
  162. package/public/chunk-VTSSBPGB.js +4 -0
  163. package/public/chunk-VVINUJOQ.js +1 -0
  164. package/public/chunk-W2OS6MJH.js +1 -0
  165. package/public/chunk-W546I2QX.js +1 -0
  166. package/public/chunk-X6NYM4NC.js +1 -0
  167. package/public/chunk-XEOYEVJE.js +1 -0
  168. package/public/chunk-XM3BXRQJ.js +1 -0
  169. package/public/chunk-YI2ZMXIQ.js +1 -0
  170. package/public/chunk-YJWJIJMQ.js +1 -0
  171. package/public/chunk-ZAKTSIL5.js +1 -0
  172. package/public/chunk-ZCGZM7LU.js +1 -0
  173. package/public/chunk-ZPXACREZ.js +4 -0
  174. package/public/index.html +2 -2
  175. package/public/main-HATN2V6Z.js +1 -0
  176. package/public/media/matter-P563JGDL.svg +8 -0
  177. package/public/polyfills-34U4WL3Z.js +1 -0
  178. package/public/styles-CT2LPGES.css +1 -0
  179. package/scripts/extract-plugin-alias.js +53 -2
  180. package/public/chunk-23BCCFJ5.js +0 -1
  181. package/public/chunk-2WBRY5UH.js +0 -1
  182. package/public/chunk-3BW6ZOEY.js +0 -1
  183. package/public/chunk-3F6KNL45.js +0 -5
  184. package/public/chunk-42GW3RJL.js +0 -1
  185. package/public/chunk-5GRM2PNI.js +0 -8
  186. package/public/chunk-66LEC5UY.js +0 -1
  187. package/public/chunk-66QXUNEP.js +0 -1
  188. package/public/chunk-6LTVSYZW.js +0 -1
  189. package/public/chunk-6VK3QZGU.js +0 -1
  190. package/public/chunk-73C4I43L.js +0 -1
  191. package/public/chunk-7OASQ2AG.js +0 -1
  192. package/public/chunk-7WU4X6RM.js +0 -1
  193. package/public/chunk-ADWZU2CD.js +0 -1
  194. package/public/chunk-AJFDU7Z7.js +0 -1
  195. package/public/chunk-APNLFZE3.js +0 -1
  196. package/public/chunk-B6MBMYJR.js +0 -1
  197. package/public/chunk-BKFWDZA6.js +0 -1
  198. package/public/chunk-BON2K2BD.js +0 -2
  199. package/public/chunk-BROGM6SY.js +0 -3
  200. package/public/chunk-CA3TZ6PQ.js +0 -1
  201. package/public/chunk-EH36LHRK.js +0 -1
  202. package/public/chunk-EI7FRBF5.js +0 -1
  203. package/public/chunk-END7FY3E.js +0 -4
  204. package/public/chunk-FIMBNRF3.js +0 -1
  205. package/public/chunk-FYJ5B755.js +0 -1
  206. package/public/chunk-GYXHUBV3.js +0 -1
  207. package/public/chunk-HIUHYFSQ.js +0 -1
  208. package/public/chunk-I6OSTXHH.js +0 -1
  209. package/public/chunk-IEAPUTEM.js +0 -4
  210. package/public/chunk-IT6PLC4W.js +0 -1
  211. package/public/chunk-IYHUB3D3.js +0 -1
  212. package/public/chunk-JCCE2HYA.js +0 -1
  213. package/public/chunk-JMI4ETRQ.js +0 -4
  214. package/public/chunk-K27TBISE.js +0 -16
  215. package/public/chunk-KGF7IKOW.js +0 -1
  216. package/public/chunk-KIQBLIB2.js +0 -8
  217. package/public/chunk-MAY7B34T.js +0 -1
  218. package/public/chunk-MCMS4UYL.js +0 -1
  219. package/public/chunk-MMBLECEN.js +0 -1
  220. package/public/chunk-MNWNSJ2K.js +0 -5
  221. package/public/chunk-NK5MY45D.js +0 -1
  222. package/public/chunk-OOM2PIRM.js +0 -5
  223. package/public/chunk-ORRSUOEI.js +0 -1
  224. package/public/chunk-QSG34JA4.js +0 -1
  225. package/public/chunk-QXD4RXA4.js +0 -1
  226. package/public/chunk-R7Q4CXAE.js +0 -1
  227. package/public/chunk-RMH5OYGC.js +0 -1
  228. package/public/chunk-SIVMM2JG.js +0 -1
  229. package/public/chunk-SMWVFNSN.js +0 -1
  230. package/public/chunk-U5K3GAHN.js +0 -1
  231. package/public/chunk-UUDMBNOI.js +0 -1
  232. package/public/chunk-V5LQ5DCH.js +0 -1
  233. package/public/chunk-VAYELJWR.js +0 -50
  234. package/public/chunk-VIRYWO5H.js +0 -40
  235. package/public/chunk-WYUCIHNO.js +0 -1
  236. package/public/chunk-XDFBUXFD.js +0 -1
  237. package/public/chunk-XX2HF46Y.js +0 -1
  238. package/public/chunk-YY4RH27F.js +0 -1
  239. package/public/chunk-ZCLW5Y7D.js +0 -19
  240. package/public/chunk-ZOOWBXGT.js +0 -1
  241. package/public/chunk-ZPKW4S77.js +0 -2
  242. package/public/chunk-ZXUIFQS4.js +0 -51
  243. package/public/main-BAQKIXE4.js +0 -1
  244. package/public/polyfills-5KWHJ7II.js +0 -2
  245. package/public/styles-7EFV5QBG.css +0 -1
@@ -0,0 +1,68 @@
1
+ import{a as Dn}from"./chunk-6G6325AZ.js";import{a as En}from"./chunk-74KAKFTX.js";import{m as De,n as X}from"./chunk-GAI5J4YQ.js";import{a as fe}from"./chunk-JLNKCN3A.js";import{b as Sn}from"./chunk-KTLG6VZT.js";import{C as ne,a as kn,b as bn,c as Tn,e as ae,l as se,t as Mn,u as Bn,w as wn}from"./chunk-O6MJC7P2.js";import{b as Te}from"./chunk-CAB2VD3D.js";import{E as yn,F as w,H as Le,K as xn,i as He,k as _n,l as Ee}from"./chunk-MW6H5Z5G.js";import{Aa as dn,Ab as C,Ac as Bt,Bc as wt,Cb as tt,Cc as hn,Db as Ye,Dc as Cn,Eb as Qe,Ec as l,F as Ge,Fb as b,Fc as d,Gb as s,Gc as ce,Hb as c,I as rn,Ib as f,Jb as x,Kb as k,Lb as L,Mb as un,Nb as fn,Nc as Ti,Oc as B,Rb as j,Rc as Fe,Sb as qe,Ua as je,W as an,X as Yt,Xb as S,Yb as Ce,Za as o,Zb as u,aa as D,d as ee,e as Xi,ga as V,ha as P,hb as pn,hc as st,ia as I,ib as Qt,ic as U,ja as N,jc as F,kc as p,lc as v,ma as ye,mc as g,n as en,nb as M,nc as $,oa as vt,oc as Je,pa as sn,pb as mn,pc as vn,qb as et,qc as Mt,rc as Z,sa as ln,sb as me,sc as Y,tc as Q,w as tn,wc as gn,x as nn,xa as cn,xc as be,ya as pe,yb as y,z as on,zb as h,zc as O}from"./chunk-ZPXACREZ.js";import{a as bt,b as Tt,e as x0,g as S0,h as oe}from"./chunk-B4AJQJMI.js";var An=x0(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.Enums=it.Categories=it.Characteristics=it.Services=void 0;it.Services={"00000260-0000-1000-8000-0026BB765291":"AccessCode",AccessCode:"00000260-0000-1000-8000-0026BB765291","000000DA-0000-1000-8000-0026BB765291":"AccessControl",AccessControl:"000000DA-0000-1000-8000-0026BB765291","0000003E-0000-1000-8000-0026BB765291":"AccessoryInformation",AccessoryInformation:"0000003E-0000-1000-8000-0026BB765291","00000270-0000-1000-8000-0026BB765291":"AccessoryMetrics",AccessoryMetrics:"00000270-0000-1000-8000-0026BB765291","00000239-0000-1000-8000-0026BB765291":"AccessoryRuntimeInformation",AccessoryRuntimeInformation:"00000239-0000-1000-8000-0026BB765291","000000BB-0000-1000-8000-0026BB765291":"AirPurifier",AirPurifier:"000000BB-0000-1000-8000-0026BB765291","0000008D-0000-1000-8000-0026BB765291":"AirQualitySensor",AirQualitySensor:"0000008D-0000-1000-8000-0026BB765291","00000267-0000-1000-8000-0026BB765291":"AssetUpdate",AssetUpdate:"00000267-0000-1000-8000-0026BB765291","0000026A-0000-1000-8000-0026BB765291":"Assistant",Assistant:"0000026A-0000-1000-8000-0026BB765291","00000127-0000-1000-8000-0026BB765291":"AudioStreamManagement",AudioStreamManagement:"00000127-0000-1000-8000-0026BB765291","00000096-0000-1000-8000-0026BB765291":"Battery",Battery:"00000096-0000-1000-8000-0026BB765291","0000021A-0000-1000-8000-0026BB765291":"CameraOperatingMode",CameraOperatingMode:"0000021A-0000-1000-8000-0026BB765291","00000204-0000-1000-8000-0026BB765291":"CameraRecordingManagement",CameraRecordingManagement:"00000204-0000-1000-8000-0026BB765291","00000110-0000-1000-8000-0026BB765291":"CameraRTPStreamManagement",CameraRTPStreamManagement:"00000110-0000-1000-8000-0026BB765291","00000097-0000-1000-8000-0026BB765291":"CarbonDioxideSensor",CarbonDioxideSensor:"00000097-0000-1000-8000-0026BB765291","0000007F-0000-1000-8000-0026BB765291":"CarbonMonoxideSensor",CarbonMonoxideSensor:"0000007F-0000-1000-8000-0026BB765291","0000005A-0000-1000-8000-0026BB765291":"CloudRelay",CloudRelay:"0000005A-0000-1000-8000-0026BB765291","00000080-0000-1000-8000-0026BB765291":"ContactSensor",ContactSensor:"00000080-0000-1000-8000-0026BB765291","00000129-0000-1000-8000-0026BB765291":"DataStreamTransportManagement",DataStreamTransportManagement:"00000129-0000-1000-8000-0026BB765291","00000237-0000-1000-8000-0026BB765291":"Diagnostics",Diagnostics:"00000237-0000-1000-8000-0026BB765291","00000081-0000-1000-8000-0026BB765291":"Door",Door:"00000081-0000-1000-8000-0026BB765291","00000121-0000-1000-8000-0026BB765291":"Doorbell",Doorbell:"00000121-0000-1000-8000-0026BB765291","00000040-0000-1000-8000-0026BB765291":"Fan",Fan:"00000040-0000-1000-8000-0026BB765291","000000B7-0000-1000-8000-0026BB765291":"Fanv2",Fanv2:"000000B7-0000-1000-8000-0026BB765291","000000D7-0000-1000-8000-0026BB765291":"Faucet",Faucet:"000000D7-0000-1000-8000-0026BB765291","000000BA-0000-1000-8000-0026BB765291":"FilterMaintenance",FilterMaintenance:"000000BA-0000-1000-8000-0026BB765291","00000236-0000-1000-8000-0026BB765291":"FirmwareUpdate",FirmwareUpdate:"00000236-0000-1000-8000-0026BB765291","00000041-0000-1000-8000-0026BB765291":"GarageDoorOpener",GarageDoorOpener:"00000041-0000-1000-8000-0026BB765291","000000BC-0000-1000-8000-0026BB765291":"HeaterCooler",HeaterCooler:"000000BC-0000-1000-8000-0026BB765291","000000BD-0000-1000-8000-0026BB765291":"HumidifierDehumidifier",HumidifierDehumidifier:"000000BD-0000-1000-8000-0026BB765291","00000082-0000-1000-8000-0026BB765291":"HumiditySensor",HumiditySensor:"00000082-0000-1000-8000-0026BB765291","000000D9-0000-1000-8000-0026BB765291":"InputSource",InputSource:"000000D9-0000-1000-8000-0026BB765291","000000CF-0000-1000-8000-0026BB765291":"IrrigationSystem",IrrigationSystem:"000000CF-0000-1000-8000-0026BB765291","00000083-0000-1000-8000-0026BB765291":"LeakSensor",LeakSensor:"00000083-0000-1000-8000-0026BB765291","00000043-0000-1000-8000-0026BB765291":"Lightbulb",Lightbulb:"00000043-0000-1000-8000-0026BB765291","00000084-0000-1000-8000-0026BB765291":"LightSensor",LightSensor:"00000084-0000-1000-8000-0026BB765291","00000044-0000-1000-8000-0026BB765291":"LockManagement",LockManagement:"00000044-0000-1000-8000-0026BB765291","00000045-0000-1000-8000-0026BB765291":"LockMechanism",LockMechanism:"00000045-0000-1000-8000-0026BB765291","00000112-0000-1000-8000-0026BB765291":"Microphone",Microphone:"00000112-0000-1000-8000-0026BB765291","00000085-0000-1000-8000-0026BB765291":"MotionSensor",MotionSensor:"00000085-0000-1000-8000-0026BB765291","00000266-0000-1000-8000-0026BB765291":"NFCAccess",NFCAccess:"00000266-0000-1000-8000-0026BB765291","00000086-0000-1000-8000-0026BB765291":"OccupancySensor",OccupancySensor:"00000086-0000-1000-8000-0026BB765291","00000047-0000-1000-8000-0026BB765291":"Outlet",Outlet:"00000047-0000-1000-8000-0026BB765291","00000055-0000-1000-8000-0026BB765291":"Pairing",Pairing:"00000055-0000-1000-8000-0026BB765291","00000221-0000-1000-8000-0026BB765291":"PowerManagement",PowerManagement:"00000221-0000-1000-8000-0026BB765291","000000A2-0000-1000-8000-0026BB765291":"ProtocolInformation",ProtocolInformation:"000000A2-0000-1000-8000-0026BB765291","0000007E-0000-1000-8000-0026BB765291":"SecuritySystem",SecuritySystem:"0000007E-0000-1000-8000-0026BB765291","000000CC-0000-1000-8000-0026BB765291":"ServiceLabel",ServiceLabel:"000000CC-0000-1000-8000-0026BB765291","00000133-0000-1000-8000-0026BB765291":"Siri",Siri:"00000133-0000-1000-8000-0026BB765291","00000253-0000-1000-8000-0026BB765291":"SiriEndpoint",SiriEndpoint:"00000253-0000-1000-8000-0026BB765291","000000B9-0000-1000-8000-0026BB765291":"Slats",Slats:"000000B9-0000-1000-8000-0026BB765291","00000228-0000-1000-8000-0026BB765291":"SmartSpeaker",SmartSpeaker:"00000228-0000-1000-8000-0026BB765291","00000087-0000-1000-8000-0026BB765291":"SmokeSensor",SmokeSensor:"00000087-0000-1000-8000-0026BB765291","00000113-0000-1000-8000-0026BB765291":"Speaker",Speaker:"00000113-0000-1000-8000-0026BB765291","00000088-0000-1000-8000-0026BB765291":"StatefulProgrammableSwitch",StatefulProgrammableSwitch:"00000088-0000-1000-8000-0026BB765291","00000089-0000-1000-8000-0026BB765291":"StatelessProgrammableSwitch",StatelessProgrammableSwitch:"00000089-0000-1000-8000-0026BB765291","00000049-0000-1000-8000-0026BB765291":"Switch",Switch:"00000049-0000-1000-8000-0026BB765291","0000022E-0000-1000-8000-0026BB765291":"TapManagement",TapManagement:"0000022E-0000-1000-8000-0026BB765291","00000125-0000-1000-8000-0026BB765291":"TargetControl",TargetControl:"00000125-0000-1000-8000-0026BB765291","00000122-0000-1000-8000-0026BB765291":"TargetControlManagement",TargetControlManagement:"00000122-0000-1000-8000-0026BB765291","000000D8-0000-1000-8000-0026BB765291":"Television",Television:"000000D8-0000-1000-8000-0026BB765291",TelevisionSpeaker:"00000113-0000-1000-8000-0026BB765291","0000008A-0000-1000-8000-0026BB765291":"TemperatureSensor",TemperatureSensor:"0000008A-0000-1000-8000-0026BB765291","0000004A-0000-1000-8000-0026BB765291":"Thermostat",Thermostat:"0000004A-0000-1000-8000-0026BB765291","00000701-0000-1000-8000-0026BB765291":"ThreadTransport",ThreadTransport:"00000701-0000-1000-8000-0026BB765291","00000203-0000-1000-8000-0026BB765291":"TransferTransportManagement",TransferTransportManagement:"00000203-0000-1000-8000-0026BB765291","00000056-0000-1000-8000-0026BB765291":"Tunnel",Tunnel:"00000056-0000-1000-8000-0026BB765291","000000D0-0000-1000-8000-0026BB765291":"Valve",Valve:"000000D0-0000-1000-8000-0026BB765291","0000020A-0000-1000-8000-0026BB765291":"WiFiRouter",WiFiRouter:"0000020A-0000-1000-8000-0026BB765291","0000020F-0000-1000-8000-0026BB765291":"WiFiSatellite",WiFiSatellite:"0000020F-0000-1000-8000-0026BB765291","0000022A-0000-1000-8000-0026BB765291":"WiFiTransport",WiFiTransport:"0000022A-0000-1000-8000-0026BB765291","0000008B-0000-1000-8000-0026BB765291":"Window",Window:"0000008B-0000-1000-8000-0026BB765291","0000008C-0000-1000-8000-0026BB765291":"WindowCovering",WindowCovering:"0000008C-0000-1000-8000-0026BB765291"};it.Characteristics={"00000262-0000-1000-8000-0026BB765291":"AccessCodeControlPoint",AccessCodeControlPoint:"00000262-0000-1000-8000-0026BB765291","00000261-0000-1000-8000-0026BB765291":"AccessCodeSupportedConfiguration",AccessCodeSupportedConfiguration:"00000261-0000-1000-8000-0026BB765291","000000E5-0000-1000-8000-0026BB765291":"AccessControlLevel",AccessControlLevel:"000000E5-0000-1000-8000-0026BB765291","000000A6-0000-1000-8000-0026BB765291":"AccessoryFlags",AccessoryFlags:"000000A6-0000-1000-8000-0026BB765291","00000057-0000-1000-8000-0026BB765291":"AccessoryIdentifier",AccessoryIdentifier:"00000057-0000-1000-8000-0026BB765291","000000B0-0000-1000-8000-0026BB765291":"Active",Active:"000000B0-0000-1000-8000-0026BB765291","000000E7-0000-1000-8000-0026BB765291":"ActiveIdentifier",ActiveIdentifier:"000000E7-0000-1000-8000-0026BB765291","0000023B-0000-1000-8000-0026BB765291":"ActivityInterval",ActivityInterval:"0000023B-0000-1000-8000-0026BB765291","00000001-0000-1000-8000-0026BB765291":"AdministratorOnlyAccess",AdministratorOnlyAccess:"00000001-0000-1000-8000-0026BB765291","00000064-0000-1000-8000-0026BB765291":"AirParticulateDensity",AirParticulateDensity:"00000064-0000-1000-8000-0026BB765291","00000065-0000-1000-8000-0026BB765291":"AirParticulateSize",AirParticulateSize:"00000065-0000-1000-8000-0026BB765291","0000025B-0000-1000-8000-0026BB765291":"AirPlayEnable",AirPlayEnable:"0000025B-0000-1000-8000-0026BB765291","00000095-0000-1000-8000-0026BB765291":"AirQuality",AirQuality:"00000095-0000-1000-8000-0026BB765291","000000A4-0000-1000-8000-0026BB765291":"AppMatchingIdentifier",AppMatchingIdentifier:"000000A4-0000-1000-8000-0026BB765291","00000269-0000-1000-8000-0026BB765291":"AssetUpdateReadiness",AssetUpdateReadiness:"00000269-0000-1000-8000-0026BB765291","00000005-0000-1000-8000-0026BB765291":"AudioFeedback",AudioFeedback:"00000005-0000-1000-8000-0026BB765291","00000068-0000-1000-8000-0026BB765291":"BatteryLevel",BatteryLevel:"00000068-0000-1000-8000-0026BB765291","00000008-0000-1000-8000-0026BB765291":"Brightness",Brightness:"00000008-0000-1000-8000-0026BB765291","00000126-0000-1000-8000-0026BB765291":"ButtonEvent",ButtonEvent:"00000126-0000-1000-8000-0026BB765291","0000021D-0000-1000-8000-0026BB765291":"CameraOperatingModeIndicator",CameraOperatingModeIndicator:"0000021D-0000-1000-8000-0026BB765291","00000092-0000-1000-8000-0026BB765291":"CarbonDioxideDetected",CarbonDioxideDetected:"00000092-0000-1000-8000-0026BB765291","00000093-0000-1000-8000-0026BB765291":"CarbonDioxideLevel",CarbonDioxideLevel:"00000093-0000-1000-8000-0026BB765291","00000094-0000-1000-8000-0026BB765291":"CarbonDioxidePeakLevel",CarbonDioxidePeakLevel:"00000094-0000-1000-8000-0026BB765291","00000069-0000-1000-8000-0026BB765291":"CarbonMonoxideDetected",CarbonMonoxideDetected:"00000069-0000-1000-8000-0026BB765291","00000090-0000-1000-8000-0026BB765291":"CarbonMonoxideLevel",CarbonMonoxideLevel:"00000090-0000-1000-8000-0026BB765291","00000091-0000-1000-8000-0026BB765291":"CarbonMonoxidePeakLevel",CarbonMonoxidePeakLevel:"00000091-0000-1000-8000-0026BB765291","00000246-0000-1000-8000-0026BB765291":"CCAEnergyDetectThreshold",CCAEnergyDetectThreshold:"00000246-0000-1000-8000-0026BB765291","00000245-0000-1000-8000-0026BB765291":"CCASignalDetectThreshold",CCASignalDetectThreshold:"00000245-0000-1000-8000-0026BB765291","0000024B-0000-1000-8000-0026BB765291":"CharacteristicValueActiveTransitionCount",CharacteristicValueActiveTransitionCount:"0000024B-0000-1000-8000-0026BB765291","00000143-0000-1000-8000-0026BB765291":"CharacteristicValueTransitionControl",CharacteristicValueTransitionControl:"00000143-0000-1000-8000-0026BB765291","0000008F-0000-1000-8000-0026BB765291":"ChargingState",ChargingState:"0000008F-0000-1000-8000-0026BB765291","000000DD-0000-1000-8000-0026BB765291":"ClosedCaptions",ClosedCaptions:"000000DD-0000-1000-8000-0026BB765291","000000CE-0000-1000-8000-0026BB765291":"ColorTemperature",ColorTemperature:"000000CE-0000-1000-8000-0026BB765291","00000263-0000-1000-8000-0026BB765291":"ConfigurationState",ConfigurationState:"00000263-0000-1000-8000-0026BB765291","000000E3-0000-1000-8000-0026BB765291":"ConfiguredName",ConfiguredName:"000000E3-0000-1000-8000-0026BB765291","0000006A-0000-1000-8000-0026BB765291":"ContactSensorState",ContactSensorState:"0000006A-0000-1000-8000-0026BB765291","0000000D-0000-1000-8000-0026BB765291":"CoolingThresholdTemperature",CoolingThresholdTemperature:"0000000D-0000-1000-8000-0026BB765291","00000250-0000-1000-8000-0026BB765291":"CryptoHash",CryptoHash:"00000250-0000-1000-8000-0026BB765291","000000A9-0000-1000-8000-0026BB765291":"CurrentAirPurifierState",CurrentAirPurifierState:"000000A9-0000-1000-8000-0026BB765291","0000006B-0000-1000-8000-0026BB765291":"CurrentAmbientLightLevel",CurrentAmbientLightLevel:"0000006B-0000-1000-8000-0026BB765291","0000000E-0000-1000-8000-0026BB765291":"CurrentDoorState",CurrentDoorState:"0000000E-0000-1000-8000-0026BB765291","000000AF-0000-1000-8000-0026BB765291":"CurrentFanState",CurrentFanState:"000000AF-0000-1000-8000-0026BB765291","000000B1-0000-1000-8000-0026BB765291":"CurrentHeaterCoolerState",CurrentHeaterCoolerState:"000000B1-0000-1000-8000-0026BB765291","0000000F-0000-1000-8000-0026BB765291":"CurrentHeatingCoolingState",CurrentHeatingCoolingState:"0000000F-0000-1000-8000-0026BB765291","0000006C-0000-1000-8000-0026BB765291":"CurrentHorizontalTiltAngle",CurrentHorizontalTiltAngle:"0000006C-0000-1000-8000-0026BB765291","000000B3-0000-1000-8000-0026BB765291":"CurrentHumidifierDehumidifierState",CurrentHumidifierDehumidifierState:"000000B3-0000-1000-8000-0026BB765291","000000E0-0000-1000-8000-0026BB765291":"CurrentMediaState",CurrentMediaState:"000000E0-0000-1000-8000-0026BB765291","0000006D-0000-1000-8000-0026BB765291":"CurrentPosition",CurrentPosition:"0000006D-0000-1000-8000-0026BB765291","00000010-0000-1000-8000-0026BB765291":"CurrentRelativeHumidity",CurrentRelativeHumidity:"00000010-0000-1000-8000-0026BB765291","000000AA-0000-1000-8000-0026BB765291":"CurrentSlatState",CurrentSlatState:"000000AA-0000-1000-8000-0026BB765291","00000011-0000-1000-8000-0026BB765291":"CurrentTemperature",CurrentTemperature:"00000011-0000-1000-8000-0026BB765291","000000C1-0000-1000-8000-0026BB765291":"CurrentTiltAngle",CurrentTiltAngle:"000000C1-0000-1000-8000-0026BB765291","0000022B-0000-1000-8000-0026BB765291":"CurrentTransport",CurrentTransport:"0000022B-0000-1000-8000-0026BB765291","0000006E-0000-1000-8000-0026BB765291":"CurrentVerticalTiltAngle",CurrentVerticalTiltAngle:"0000006E-0000-1000-8000-0026BB765291","00000135-0000-1000-8000-0026BB765291":"CurrentVisibilityState",CurrentVisibilityState:"00000135-0000-1000-8000-0026BB765291","00000138-0000-1000-8000-0026BB765291":"DataStreamHAPTransport",DataStreamHAPTransport:"00000138-0000-1000-8000-0026BB765291","00000139-0000-1000-8000-0026BB765291":"DataStreamHAPTransportInterrupt",DataStreamHAPTransportInterrupt:"00000139-0000-1000-8000-0026BB765291","00000224-0000-1000-8000-0026BB765291":"DiagonalFieldOfView",DiagonalFieldOfView:"00000224-0000-1000-8000-0026BB765291","0000011D-0000-1000-8000-0026BB765291":"DigitalZoom",DigitalZoom:"0000011D-0000-1000-8000-0026BB765291","00000136-0000-1000-8000-0026BB765291":"DisplayOrder",DisplayOrder:"00000136-0000-1000-8000-0026BB765291","0000023D-0000-1000-8000-0026BB765291":"EventRetransmissionMaximum",EventRetransmissionMaximum:"0000023D-0000-1000-8000-0026BB765291","00000223-0000-1000-8000-0026BB765291":"EventSnapshotsActive",EventSnapshotsActive:"00000223-0000-1000-8000-0026BB765291","0000023E-0000-1000-8000-0026BB765291":"EventTransmissionCounters",EventTransmissionCounters:"0000023E-0000-1000-8000-0026BB765291","000000AC-0000-1000-8000-0026BB765291":"FilterChangeIndication",FilterChangeIndication:"000000AC-0000-1000-8000-0026BB765291","000000AB-0000-1000-8000-0026BB765291":"FilterLifeLevel",FilterLifeLevel:"000000AB-0000-1000-8000-0026BB765291","00000052-0000-1000-8000-0026BB765291":"FirmwareRevision",FirmwareRevision:"00000052-0000-1000-8000-0026BB765291","00000234-0000-1000-8000-0026BB765291":"FirmwareUpdateReadiness",FirmwareUpdateReadiness:"00000234-0000-1000-8000-0026BB765291","00000235-0000-1000-8000-0026BB765291":"FirmwareUpdateStatus",FirmwareUpdateStatus:"00000235-0000-1000-8000-0026BB765291","0000026C-0000-1000-8000-0026BB765291":"HardwareFinish",HardwareFinish:"0000026C-0000-1000-8000-0026BB765291","00000053-0000-1000-8000-0026BB765291":"HardwareRevision",HardwareRevision:"00000053-0000-1000-8000-0026BB765291","0000024A-0000-1000-8000-0026BB765291":"HeartBeat",HeartBeat:"0000024A-0000-1000-8000-0026BB765291","00000012-0000-1000-8000-0026BB765291":"HeatingThresholdTemperature",HeatingThresholdTemperature:"00000012-0000-1000-8000-0026BB765291","0000006F-0000-1000-8000-0026BB765291":"HoldPosition",HoldPosition:"0000006F-0000-1000-8000-0026BB765291","0000021B-0000-1000-8000-0026BB765291":"HomeKitCameraActive",HomeKitCameraActive:"0000021B-0000-1000-8000-0026BB765291","00000013-0000-1000-8000-0026BB765291":"Hue",Hue:"00000013-0000-1000-8000-0026BB765291","000000E6-0000-1000-8000-0026BB765291":"Identifier",Identifier:"000000E6-0000-1000-8000-0026BB765291","00000014-0000-1000-8000-0026BB765291":"Identify",Identify:"00000014-0000-1000-8000-0026BB765291","0000011F-0000-1000-8000-0026BB765291":"ImageMirroring",ImageMirroring:"0000011F-0000-1000-8000-0026BB765291","0000011E-0000-1000-8000-0026BB765291":"ImageRotation",ImageRotation:"0000011E-0000-1000-8000-0026BB765291","000000DC-0000-1000-8000-0026BB765291":"InputDeviceType",InputDeviceType:"000000DC-0000-1000-8000-0026BB765291","000000DB-0000-1000-8000-0026BB765291":"InputSourceType",InputSourceType:"000000DB-0000-1000-8000-0026BB765291","000000D2-0000-1000-8000-0026BB765291":"InUse",InUse:"000000D2-0000-1000-8000-0026BB765291","000000D6-0000-1000-8000-0026BB765291":"IsConfigured",IsConfigured:"000000D6-0000-1000-8000-0026BB765291","00000070-0000-1000-8000-0026BB765291":"LeakDetected",LeakDetected:"00000070-0000-1000-8000-0026BB765291","00000050-0000-1000-8000-0026BB765291":"ListPairings",ListPairings:"00000050-0000-1000-8000-0026BB765291","00000019-0000-1000-8000-0026BB765291":"LockControlPoint",LockControlPoint:"00000019-0000-1000-8000-0026BB765291","0000001D-0000-1000-8000-0026BB765291":"LockCurrentState",LockCurrentState:"0000001D-0000-1000-8000-0026BB765291","0000001C-0000-1000-8000-0026BB765291":"LockLastKnownAction",LockLastKnownAction:"0000001C-0000-1000-8000-0026BB765291","0000001A-0000-1000-8000-0026BB765291":"LockManagementAutoSecurityTimeout",LockManagementAutoSecurityTimeout:"0000001A-0000-1000-8000-0026BB765291","000000A7-0000-1000-8000-0026BB765291":"LockPhysicalControls",LockPhysicalControls:"000000A7-0000-1000-8000-0026BB765291","0000001E-0000-1000-8000-0026BB765291":"LockTargetState",LockTargetState:"0000001E-0000-1000-8000-0026BB765291","0000001F-0000-1000-8000-0026BB765291":"Logs",Logs:"0000001F-0000-1000-8000-0026BB765291","00000247-0000-1000-8000-0026BB765291":"MACRetransmissionMaximum",MACRetransmissionMaximum:"00000247-0000-1000-8000-0026BB765291","00000248-0000-1000-8000-0026BB765291":"MACTransmissionCounters",MACTransmissionCounters:"00000248-0000-1000-8000-0026BB765291","00000215-0000-1000-8000-0026BB765291":"ManagedNetworkEnable",ManagedNetworkEnable:"00000215-0000-1000-8000-0026BB765291","00000227-0000-1000-8000-0026BB765291":"ManuallyDisabled",ManuallyDisabled:"00000227-0000-1000-8000-0026BB765291","00000020-0000-1000-8000-0026BB765291":"Manufacturer",Manufacturer:"00000020-0000-1000-8000-0026BB765291","0000026D-0000-1000-8000-0026BB765291":"MatterFirmwareRevisionNumber",MatterFirmwareRevisionNumber:"0000026D-0000-1000-8000-0026BB765291","0000026E-0000-1000-8000-0026BB765291":"MatterFirmwareUpdateStatus",MatterFirmwareUpdateStatus:"0000026E-0000-1000-8000-0026BB765291","00000243-0000-1000-8000-0026BB765291":"MaximumTransmitPower",MaximumTransmitPower:"00000243-0000-1000-8000-0026BB765291","00000272-0000-1000-8000-0026BB765291":"MetricsBufferFullState",MetricsBufferFullState:"00000272-0000-1000-8000-0026BB765291","00000021-0000-1000-8000-0026BB765291":"Model",Model:"00000021-0000-1000-8000-0026BB765291","00000022-0000-1000-8000-0026BB765291":"MotionDetected",MotionDetected:"00000022-0000-1000-8000-0026BB765291","0000026B-0000-1000-8000-0026BB765291":"MultifunctionButton",MultifunctionButton:"0000026B-0000-1000-8000-0026BB765291","0000011A-0000-1000-8000-0026BB765291":"Mute",Mute:"0000011A-0000-1000-8000-0026BB765291","00000023-0000-1000-8000-0026BB765291":"Name",Name:"00000023-0000-1000-8000-0026BB765291","0000021F-0000-1000-8000-0026BB765291":"NetworkAccessViolationControl",NetworkAccessViolationControl:"0000021F-0000-1000-8000-0026BB765291","0000020C-0000-1000-8000-0026BB765291":"NetworkClientProfileControl",NetworkClientProfileControl:"0000020C-0000-1000-8000-0026BB765291","0000020D-0000-1000-8000-0026BB765291":"NetworkClientStatusControl",NetworkClientStatusControl:"0000020D-0000-1000-8000-0026BB765291","00000264-0000-1000-8000-0026BB765291":"NFCAccessControlPoint",NFCAccessControlPoint:"00000264-0000-1000-8000-0026BB765291","00000265-0000-1000-8000-0026BB765291":"NFCAccessSupportedConfiguration",NFCAccessSupportedConfiguration:"00000265-0000-1000-8000-0026BB765291","0000011B-0000-1000-8000-0026BB765291":"NightVision",NightVision:"0000011B-0000-1000-8000-0026BB765291","000000C4-0000-1000-8000-0026BB765291":"NitrogenDioxideDensity",NitrogenDioxideDensity:"000000C4-0000-1000-8000-0026BB765291","00000024-0000-1000-8000-0026BB765291":"ObstructionDetected",ObstructionDetected:"00000024-0000-1000-8000-0026BB765291","00000071-0000-1000-8000-0026BB765291":"OccupancyDetected",OccupancyDetected:"00000071-0000-1000-8000-0026BB765291","00000025-0000-1000-8000-0026BB765291":"On",On:"00000025-0000-1000-8000-0026BB765291","00000232-0000-1000-8000-0026BB765291":"OperatingStateResponse",OperatingStateResponse:"00000232-0000-1000-8000-0026BB765291","0000011C-0000-1000-8000-0026BB765291":"OpticalZoom",OpticalZoom:"0000011C-0000-1000-8000-0026BB765291","00000026-0000-1000-8000-0026BB765291":"OutletInUse",OutletInUse:"00000026-0000-1000-8000-0026BB765291","000000C3-0000-1000-8000-0026BB765291":"OzoneDensity",OzoneDensity:"000000C3-0000-1000-8000-0026BB765291","0000004F-0000-1000-8000-0026BB765291":"PairingFeatures",PairingFeatures:"0000004F-0000-1000-8000-0026BB765291","0000004C-0000-1000-8000-0026BB765291":"PairSetup",PairSetup:"0000004C-0000-1000-8000-0026BB765291","0000004E-0000-1000-8000-0026BB765291":"PairVerify",PairVerify:"0000004E-0000-1000-8000-0026BB765291","000000E4-0000-1000-8000-0026BB765291":"PasswordSetting",PasswordSetting:"000000E4-0000-1000-8000-0026BB765291","00000225-0000-1000-8000-0026BB765291":"PeriodicSnapshotsActive",PeriodicSnapshotsActive:"00000225-0000-1000-8000-0026BB765291","000000E2-0000-1000-8000-0026BB765291":"PictureMode",PictureMode:"000000E2-0000-1000-8000-0026BB765291","0000023C-0000-1000-8000-0026BB765291":"Ping",Ping:"0000023C-0000-1000-8000-0026BB765291","000000C7-0000-1000-8000-0026BB765291":"PM10Density",PM10Density:"000000C7-0000-1000-8000-0026BB765291","000000C6-0000-1000-8000-0026BB765291":"PM2_5Density",PM2_5Density:"000000C6-0000-1000-8000-0026BB765291","00000072-0000-1000-8000-0026BB765291":"PositionState",PositionState:"00000072-0000-1000-8000-0026BB765291","000000DF-0000-1000-8000-0026BB765291":"PowerModeSelection",PowerModeSelection:"000000DF-0000-1000-8000-0026BB765291","00000220-0000-1000-8000-0026BB765291":"ProductData",ProductData:"00000220-0000-1000-8000-0026BB765291","00000073-0000-1000-8000-0026BB765291":"ProgrammableSwitchEvent",ProgrammableSwitchEvent:"00000073-0000-1000-8000-0026BB765291","00000074-0000-1000-8000-0026BB765291":"ProgrammableSwitchOutputState",ProgrammableSwitchOutputState:"00000074-0000-1000-8000-0026BB765291","000000D1-0000-1000-8000-0026BB765291":"ProgramMode",ProgramMode:"000000D1-0000-1000-8000-0026BB765291","0000023F-0000-1000-8000-0026BB765291":"ReceivedSignalStrengthIndication",ReceivedSignalStrengthIndication:"0000023F-0000-1000-8000-0026BB765291","00000244-0000-1000-8000-0026BB765291":"ReceiverSensitivity",ReceiverSensitivity:"00000244-0000-1000-8000-0026BB765291","00000226-0000-1000-8000-0026BB765291":"RecordingAudioActive",RecordingAudioActive:"00000226-0000-1000-8000-0026BB765291","000000C9-0000-1000-8000-0026BB765291":"RelativeHumidityDehumidifierThreshold",RelativeHumidityDehumidifierThreshold:"000000C9-0000-1000-8000-0026BB765291","000000CA-0000-1000-8000-0026BB765291":"RelativeHumidityHumidifierThreshold",RelativeHumidityHumidifierThreshold:"000000CA-0000-1000-8000-0026BB765291","0000005E-0000-1000-8000-0026BB765291":"RelayControlPoint",RelayControlPoint:"0000005E-0000-1000-8000-0026BB765291","0000005B-0000-1000-8000-0026BB765291":"RelayEnabled",RelayEnabled:"0000005B-0000-1000-8000-0026BB765291","0000005C-0000-1000-8000-0026BB765291":"RelayState",RelayState:"0000005C-0000-1000-8000-0026BB765291","000000D4-0000-1000-8000-0026BB765291":"RemainingDuration",RemainingDuration:"000000D4-0000-1000-8000-0026BB765291","000000E1-0000-1000-8000-0026BB765291":"RemoteKey",RemoteKey:"000000E1-0000-1000-8000-0026BB765291","000000AD-0000-1000-8000-0026BB765291":"ResetFilterIndication",ResetFilterIndication:"000000AD-0000-1000-8000-0026BB765291","00000028-0000-1000-8000-0026BB765291":"RotationDirection",RotationDirection:"00000028-0000-1000-8000-0026BB765291","00000029-0000-1000-8000-0026BB765291":"RotationSpeed",RotationSpeed:"00000029-0000-1000-8000-0026BB765291","0000020E-0000-1000-8000-0026BB765291":"RouterStatus",RouterStatus:"0000020E-0000-1000-8000-0026BB765291","0000002F-0000-1000-8000-0026BB765291":"Saturation",Saturation:"0000002F-0000-1000-8000-0026BB765291","0000008E-0000-1000-8000-0026BB765291":"SecuritySystemAlarmType",SecuritySystemAlarmType:"0000008E-0000-1000-8000-0026BB765291","00000066-0000-1000-8000-0026BB765291":"SecuritySystemCurrentState",SecuritySystemCurrentState:"00000066-0000-1000-8000-0026BB765291","00000067-0000-1000-8000-0026BB765291":"SecuritySystemTargetState",SecuritySystemTargetState:"00000067-0000-1000-8000-0026BB765291","00000128-0000-1000-8000-0026BB765291":"SelectedAudioStreamConfiguration",SelectedAudioStreamConfiguration:"00000128-0000-1000-8000-0026BB765291","00000209-0000-1000-8000-0026BB765291":"SelectedCameraRecordingConfiguration",SelectedCameraRecordingConfiguration:"00000209-0000-1000-8000-0026BB765291","0000024D-0000-1000-8000-0026BB765291":"SelectedDiagnosticsModes",SelectedDiagnosticsModes:"0000024D-0000-1000-8000-0026BB765291","00000117-0000-1000-8000-0026BB765291":"SelectedRTPStreamConfiguration",SelectedRTPStreamConfiguration:"00000117-0000-1000-8000-0026BB765291","00000252-0000-1000-8000-0026BB765291":"SelectedSleepConfiguration",SelectedSleepConfiguration:"00000252-0000-1000-8000-0026BB765291","00000030-0000-1000-8000-0026BB765291":"SerialNumber",SerialNumber:"00000030-0000-1000-8000-0026BB765291","000000CB-0000-1000-8000-0026BB765291":"ServiceLabelIndex",ServiceLabelIndex:"000000CB-0000-1000-8000-0026BB765291","000000CD-0000-1000-8000-0026BB765291":"ServiceLabelNamespace",ServiceLabelNamespace:"000000CD-0000-1000-8000-0026BB765291","000000D3-0000-1000-8000-0026BB765291":"SetDuration",SetDuration:"000000D3-0000-1000-8000-0026BB765291","00000131-0000-1000-8000-0026BB765291":"SetupDataStreamTransport",SetupDataStreamTransport:"00000131-0000-1000-8000-0026BB765291","00000118-0000-1000-8000-0026BB765291":"SetupEndpoints",SetupEndpoints:"00000118-0000-1000-8000-0026BB765291","00000201-0000-1000-8000-0026BB765291":"SetupTransferTransport",SetupTransferTransport:"00000201-0000-1000-8000-0026BB765291","00000241-0000-1000-8000-0026BB765291":"SignalToNoiseRatio",SignalToNoiseRatio:"00000241-0000-1000-8000-0026BB765291","00000255-0000-1000-8000-0026BB765291":"SiriEnable",SiriEnable:"00000255-0000-1000-8000-0026BB765291","00000254-0000-1000-8000-0026BB765291":"SiriEndpointSessionStatus",SiriEndpointSessionStatus:"00000254-0000-1000-8000-0026BB765291","0000025A-0000-1000-8000-0026BB765291":"SiriEngineVersion",SiriEngineVersion:"0000025A-0000-1000-8000-0026BB765291","00000132-0000-1000-8000-0026BB765291":"SiriInputType",SiriInputType:"00000132-0000-1000-8000-0026BB765291","00000258-0000-1000-8000-0026BB765291":"SiriLightOnUse",SiriLightOnUse:"00000258-0000-1000-8000-0026BB765291","00000256-0000-1000-8000-0026BB765291":"SiriListening",SiriListening:"00000256-0000-1000-8000-0026BB765291","00000257-0000-1000-8000-0026BB765291":"SiriTouchToUse",SiriTouchToUse:"00000257-0000-1000-8000-0026BB765291","000000C0-0000-1000-8000-0026BB765291":"SlatType",SlatType:"000000C0-0000-1000-8000-0026BB765291","000000E8-0000-1000-8000-0026BB765291":"SleepDiscoveryMode",SleepDiscoveryMode:"000000E8-0000-1000-8000-0026BB765291","0000023A-0000-1000-8000-0026BB765291":"SleepInterval",SleepInterval:"0000023A-0000-1000-8000-0026BB765291","00000076-0000-1000-8000-0026BB765291":"SmokeDetected",SmokeDetected:"00000076-0000-1000-8000-0026BB765291","00000054-0000-1000-8000-0026BB765291":"SoftwareRevision",SoftwareRevision:"00000054-0000-1000-8000-0026BB765291","00000249-0000-1000-8000-0026BB765291":"StagedFirmwareVersion",StagedFirmwareVersion:"00000249-0000-1000-8000-0026BB765291","00000075-0000-1000-8000-0026BB765291":"StatusActive",StatusActive:"00000075-0000-1000-8000-0026BB765291","00000077-0000-1000-8000-0026BB765291":"StatusFault",StatusFault:"00000077-0000-1000-8000-0026BB765291","00000078-0000-1000-8000-0026BB765291":"StatusJammed",StatusJammed:"00000078-0000-1000-8000-0026BB765291","00000079-0000-1000-8000-0026BB765291":"StatusLowBattery",StatusLowBattery:"00000079-0000-1000-8000-0026BB765291","0000007A-0000-1000-8000-0026BB765291":"StatusTampered",StatusTampered:"0000007A-0000-1000-8000-0026BB765291","00000120-0000-1000-8000-0026BB765291":"StreamingStatus",StreamingStatus:"00000120-0000-1000-8000-0026BB765291","000000C5-0000-1000-8000-0026BB765291":"SulphurDioxideDensity",SulphurDioxideDensity:"000000C5-0000-1000-8000-0026BB765291","00000268-0000-1000-8000-0026BB765291":"SupportedAssetTypes",SupportedAssetTypes:"00000268-0000-1000-8000-0026BB765291","00000207-0000-1000-8000-0026BB765291":"SupportedAudioRecordingConfiguration",SupportedAudioRecordingConfiguration:"00000207-0000-1000-8000-0026BB765291","00000115-0000-1000-8000-0026BB765291":"SupportedAudioStreamConfiguration",SupportedAudioStreamConfiguration:"00000115-0000-1000-8000-0026BB765291","00000205-0000-1000-8000-0026BB765291":"SupportedCameraRecordingConfiguration",SupportedCameraRecordingConfiguration:"00000205-0000-1000-8000-0026BB765291","00000144-0000-1000-8000-0026BB765291":"SupportedCharacteristicValueTransitionConfiguration",SupportedCharacteristicValueTransitionConfiguration:"00000144-0000-1000-8000-0026BB765291","00000130-0000-1000-8000-0026BB765291":"SupportedDataStreamTransportConfiguration",SupportedDataStreamTransportConfiguration:"00000130-0000-1000-8000-0026BB765291","0000024C-0000-1000-8000-0026BB765291":"SupportedDiagnosticsModes",SupportedDiagnosticsModes:"0000024C-0000-1000-8000-0026BB765291","00000238-0000-1000-8000-0026BB765291":"SupportedDiagnosticsSnapshot",SupportedDiagnosticsSnapshot:"00000238-0000-1000-8000-0026BB765291","00000233-0000-1000-8000-0026BB765291":"SupportedFirmwareUpdateConfiguration",SupportedFirmwareUpdateConfiguration:"00000233-0000-1000-8000-0026BB765291","00000271-0000-1000-8000-0026BB765291":"SupportedMetrics",SupportedMetrics:"00000271-0000-1000-8000-0026BB765291","00000210-0000-1000-8000-0026BB765291":"SupportedRouterConfiguration",SupportedRouterConfiguration:"00000210-0000-1000-8000-0026BB765291","00000116-0000-1000-8000-0026BB765291":"SupportedRTPConfiguration",SupportedRTPConfiguration:"00000116-0000-1000-8000-0026BB765291","00000251-0000-1000-8000-0026BB765291":"SupportedSleepConfiguration",SupportedSleepConfiguration:"00000251-0000-1000-8000-0026BB765291","00000202-0000-1000-8000-0026BB765291":"SupportedTransferTransportConfiguration",SupportedTransferTransportConfiguration:"00000202-0000-1000-8000-0026BB765291","00000206-0000-1000-8000-0026BB765291":"SupportedVideoRecordingConfiguration",SupportedVideoRecordingConfiguration:"00000206-0000-1000-8000-0026BB765291","00000114-0000-1000-8000-0026BB765291":"SupportedVideoStreamConfiguration",SupportedVideoStreamConfiguration:"00000114-0000-1000-8000-0026BB765291","000000B6-0000-1000-8000-0026BB765291":"SwingMode",SwingMode:"000000B6-0000-1000-8000-0026BB765291","0000022F-0000-1000-8000-0026BB765291":"TapType",TapType:"0000022F-0000-1000-8000-0026BB765291","000000A8-0000-1000-8000-0026BB765291":"TargetAirPurifierState",TargetAirPurifierState:"000000A8-0000-1000-8000-0026BB765291","00000124-0000-1000-8000-0026BB765291":"TargetControlList",TargetControlList:"00000124-0000-1000-8000-0026BB765291","00000123-0000-1000-8000-0026BB765291":"TargetControlSupportedConfiguration",TargetControlSupportedConfiguration:"00000123-0000-1000-8000-0026BB765291","00000032-0000-1000-8000-0026BB765291":"TargetDoorState",TargetDoorState:"00000032-0000-1000-8000-0026BB765291","000000BF-0000-1000-8000-0026BB765291":"TargetFanState",TargetFanState:"000000BF-0000-1000-8000-0026BB765291","000000B2-0000-1000-8000-0026BB765291":"TargetHeaterCoolerState",TargetHeaterCoolerState:"000000B2-0000-1000-8000-0026BB765291","00000033-0000-1000-8000-0026BB765291":"TargetHeatingCoolingState",TargetHeatingCoolingState:"00000033-0000-1000-8000-0026BB765291","0000007B-0000-1000-8000-0026BB765291":"TargetHorizontalTiltAngle",TargetHorizontalTiltAngle:"0000007B-0000-1000-8000-0026BB765291","000000B4-0000-1000-8000-0026BB765291":"TargetHumidifierDehumidifierState",TargetHumidifierDehumidifierState:"000000B4-0000-1000-8000-0026BB765291","00000137-0000-1000-8000-0026BB765291":"TargetMediaState",TargetMediaState:"00000137-0000-1000-8000-0026BB765291","0000007C-0000-1000-8000-0026BB765291":"TargetPosition",TargetPosition:"0000007C-0000-1000-8000-0026BB765291","00000034-0000-1000-8000-0026BB765291":"TargetRelativeHumidity",TargetRelativeHumidity:"00000034-0000-1000-8000-0026BB765291","00000035-0000-1000-8000-0026BB765291":"TargetTemperature",TargetTemperature:"00000035-0000-1000-8000-0026BB765291","000000C2-0000-1000-8000-0026BB765291":"TargetTiltAngle",TargetTiltAngle:"000000C2-0000-1000-8000-0026BB765291","0000007D-0000-1000-8000-0026BB765291":"TargetVerticalTiltAngle",TargetVerticalTiltAngle:"0000007D-0000-1000-8000-0026BB765291","00000134-0000-1000-8000-0026BB765291":"TargetVisibilityState",TargetVisibilityState:"00000134-0000-1000-8000-0026BB765291","00000036-0000-1000-8000-0026BB765291":"TemperatureDisplayUnits",TemperatureDisplayUnits:"00000036-0000-1000-8000-0026BB765291","0000021C-0000-1000-8000-0026BB765291":"ThirdPartyCameraActive",ThirdPartyCameraActive:"0000021C-0000-1000-8000-0026BB765291","00000704-0000-1000-8000-0026BB765291":"ThreadControlPoint",ThreadControlPoint:"00000704-0000-1000-8000-0026BB765291","00000702-0000-1000-8000-0026BB765291":"ThreadNodeCapabilities",ThreadNodeCapabilities:"00000702-0000-1000-8000-0026BB765291","00000706-0000-1000-8000-0026BB765291":"ThreadOpenThreadVersion",ThreadOpenThreadVersion:"00000706-0000-1000-8000-0026BB765291","00000703-0000-1000-8000-0026BB765291":"ThreadStatus",ThreadStatus:"00000703-0000-1000-8000-0026BB765291","00000231-0000-1000-8000-0026BB765291":"Token",Token:"00000231-0000-1000-8000-0026BB765291","00000242-0000-1000-8000-0026BB765291":"TransmitPower",TransmitPower:"00000242-0000-1000-8000-0026BB765291","00000061-0000-1000-8000-0026BB765291":"TunnelConnectionTimeout",TunnelConnectionTimeout:"00000061-0000-1000-8000-0026BB765291","00000060-0000-1000-8000-0026BB765291":"TunneledAccessoryAdvertising",TunneledAccessoryAdvertising:"00000060-0000-1000-8000-0026BB765291","00000059-0000-1000-8000-0026BB765291":"TunneledAccessoryConnected",TunneledAccessoryConnected:"00000059-0000-1000-8000-0026BB765291","00000058-0000-1000-8000-0026BB765291":"TunneledAccessoryStateNumber",TunneledAccessoryStateNumber:"00000058-0000-1000-8000-0026BB765291","000000D5-0000-1000-8000-0026BB765291":"ValveType",ValveType:"000000D5-0000-1000-8000-0026BB765291","00000037-0000-1000-8000-0026BB765291":"Version",Version:"00000037-0000-1000-8000-0026BB765291","00000229-0000-1000-8000-0026BB765291":"VideoAnalysisActive",VideoAnalysisActive:"00000229-0000-1000-8000-0026BB765291","000000C8-0000-1000-8000-0026BB765291":"VOCDensity",VOCDensity:"000000C8-0000-1000-8000-0026BB765291","00000119-0000-1000-8000-0026BB765291":"Volume",Volume:"00000119-0000-1000-8000-0026BB765291","000000E9-0000-1000-8000-0026BB765291":"VolumeControlType",VolumeControlType:"000000E9-0000-1000-8000-0026BB765291","000000EA-0000-1000-8000-0026BB765291":"VolumeSelector",VolumeSelector:"000000EA-0000-1000-8000-0026BB765291","00000222-0000-1000-8000-0026BB765291":"WakeConfiguration",WakeConfiguration:"00000222-0000-1000-8000-0026BB765291","00000211-0000-1000-8000-0026BB765291":"WANConfigurationList",WANConfigurationList:"00000211-0000-1000-8000-0026BB765291","00000212-0000-1000-8000-0026BB765291":"WANStatusList",WANStatusList:"00000212-0000-1000-8000-0026BB765291","000000B5-0000-1000-8000-0026BB765291":"WaterLevel",WaterLevel:"000000B5-0000-1000-8000-0026BB765291","0000022C-0000-1000-8000-0026BB765291":"WiFiCapabilities",WiFiCapabilities:"0000022C-0000-1000-8000-0026BB765291","0000022D-0000-1000-8000-0026BB765291":"WiFiConfigurationControl",WiFiConfigurationControl:"0000022D-0000-1000-8000-0026BB765291","0000021E-0000-1000-8000-0026BB765291":"WiFiSatelliteStatus",WiFiSatelliteStatus:"0000021E-0000-1000-8000-0026BB765291"};it.Categories={OTHER:1,BRIDGE:2,FAN:3,GARAGE_DOOR_OPENER:4,LIGHTBULB:5,DOOR_LOCK:6,OUTLET:7,SWITCH:8,THERMOSTAT:9,SENSOR:10,ALARM_SYSTEM:11,SECURITY_SYSTEM:11,DOOR:12,WINDOW:13,WINDOW_COVERING:14,PROGRAMMABLE_SWITCH:15,RANGE_EXTENDER:16,CAMERA:17,IP_CAMERA:17,VIDEO_DOORBELL:18,AIR_PURIFIER:19,AIR_HEATER:20,AIR_CONDITIONER:21,AIR_HUMIDIFIER:22,AIR_DEHUMIDIFIER:23,APPLE_TV:24,HOMEPOD:25,SPEAKER:26,AIRPORT:27,SPRINKLER:28,FAUCET:29,SHOWER_HEAD:30,TELEVISION:31,TARGET_CONTROLLER:32,ROUTER:33,AUDIO_RECEIVER:34,TV_SET_TOP_BOX:35,TV_STREAMING_STICK:36};it.Enums={AccessoryFlags:{1:"REQUIRES_ADDITIONAL_SETUP_BIT_MASK"},Active:{0:"INACTIVE",1:"ACTIVE"},AirParticulateSize:{0:"_2_5_M",1:"_10_M"},AirQuality:{0:"UNKNOWN",1:"EXCELLENT",2:"GOOD",3:"FAIR",4:"INFERIOR",5:"POOR"},CameraOperatingModeIndicator:{0:"DISABLE",1:"ENABLE"},CarbonDioxideDetected:{0:"CO2_LEVELS_NORMAL",1:"CO2_LEVELS_ABNORMAL"},CarbonMonoxideDetected:{0:"CO_LEVELS_NORMAL",1:"CO_LEVELS_ABNORMAL"},ChargingState:{0:"NOT_CHARGING",1:"CHARGING",2:"NOT_CHARGEABLE"},ClosedCaptions:{0:"DISABLED",1:"ENABLED"},ContactSensorState:{0:"CONTACT_DETECTED",1:"CONTACT_NOT_DETECTED"},CurrentAirPurifierState:{0:"INACTIVE",1:"IDLE",2:"PURIFYING_AIR"},CurrentDoorState:{0:"OPEN",1:"CLOSED",2:"OPENING",3:"CLOSING",4:"STOPPED"},CurrentFanState:{0:"INACTIVE",1:"IDLE",2:"BLOWING_AIR"},CurrentHeaterCoolerState:{0:"INACTIVE",1:"IDLE",2:"HEATING",3:"COOLING"},CurrentHeatingCoolingState:{0:"OFF",1:"HEAT",2:"COOL"},CurrentHumidifierDehumidifierState:{0:"INACTIVE",1:"IDLE",2:"HUMIDIFYING",3:"DEHUMIDIFYING"},CurrentMediaState:{0:"PLAY",1:"PAUSE",2:"STOP",4:"LOADING",5:"INTERRUPTED"},CurrentSlatState:{0:"FIXED",1:"JAMMED",2:"SWINGING"},CurrentVisibilityState:{0:"SHOWN",1:"HIDDEN"},EventSnapshotsActive:{0:"DISABLE",1:"ENABLE"},FilterChangeIndication:{0:"FILTER_OK",1:"CHANGE_FILTER"},HomeKitCameraActive:{0:"OFF",1:"ON"},InputDeviceType:{0:"OTHER",1:"TV",2:"RECORDING",3:"TUNER",4:"PLAYBACK",5:"AUDIO_SYSTEM"},InputSourceType:{0:"OTHER",1:"HOME_SCREEN",2:"TUNER",3:"HDMI",4:"COMPOSITE_VIDEO",5:"S_VIDEO",6:"COMPONENT_VIDEO",7:"DVI",8:"AIRPLAY",9:"USB",10:"APPLICATION"},InUse:{0:"NOT_IN_USE",1:"IN_USE"},IsConfigured:{0:"NOT_CONFIGURED",1:"CONFIGURED"},LeakDetected:{0:"LEAK_NOT_DETECTED",1:"LEAK_DETECTED"},LockCurrentState:{0:"UNSECURED",1:"SECURED",2:"JAMMED",3:"UNKNOWN"},LockLastKnownAction:{0:"SECURED_PHYSICALLY_INTERIOR",1:"UNSECURED_PHYSICALLY_INTERIOR",2:"SECURED_PHYSICALLY_EXTERIOR",3:"UNSECURED_PHYSICALLY_EXTERIOR",4:"SECURED_BY_KEYPAD",5:"UNSECURED_BY_KEYPAD",6:"SECURED_REMOTELY",7:"UNSECURED_REMOTELY",8:"SECURED_BY_AUTO_SECURE_TIMEOUT",9:"SECURED_PHYSICALLY",10:"UNSECURED_PHYSICALLY"},LockPhysicalControls:{0:"CONTROL_LOCK_DISABLED",1:"CONTROL_LOCK_ENABLED"},LockTargetState:{0:"UNSECURED",1:"SECURED"},ManagedNetworkEnable:{0:"DISABLED",1:"ENABLED"},ManuallyDisabled:{0:"ENABLED",1:"DISABLED"},OccupancyDetected:{0:"OCCUPANCY_NOT_DETECTED",1:"OCCUPANCY_DETECTED"},PeriodicSnapshotsActive:{0:"DISABLE",1:"ENABLE"},PictureMode:{0:"OTHER",1:"STANDARD",2:"CALIBRATED",3:"CALIBRATED_DARK",4:"VIVID",5:"GAME",6:"COMPUTER",7:"CUSTOM"},PositionState:{0:"DECREASING",1:"INCREASING",2:"STOPPED"},PowerModeSelection:{0:"SHOW",1:"HIDE"},ProgrammableSwitchEvent:{0:"SINGLE_PRESS",1:"DOUBLE_PRESS",2:"LONG_PRESS"},ProgramMode:{0:"NO_PROGRAM_SCHEDULED",1:"PROGRAM_SCHEDULED",2:"PROGRAM_SCHEDULED_MANUAL_MODE"},RecordingAudioActive:{0:"DISABLE",1:"ENABLE"},RemoteKey:{0:"REWIND",1:"FAST_FORWARD",2:"NEXT_TRACK",3:"PREVIOUS_TRACK",4:"ARROW_UP",5:"ARROW_DOWN",6:"ARROW_LEFT",7:"ARROW_RIGHT",8:"SELECT",9:"BACK",10:"EXIT",11:"PLAY_PAUSE",15:"INFORMATION"},RotationDirection:{0:"CLOCKWISE",1:"COUNTER_CLOCKWISE"},RouterStatus:{0:"READY",1:"NOT_READY"},SecuritySystemAlarmType:{0:"NO_ALARM",1:"UNKNOWN"},SecuritySystemCurrentState:{0:"STAY_ARM",1:"AWAY_ARM",2:"NIGHT_ARM",3:"DISARMED",4:"ALARM_TRIGGERED"},SecuritySystemTargetState:{0:"STAY_ARM",1:"AWAY_ARM",2:"NIGHT_ARM",3:"DISARM"},ServiceLabelNamespace:{0:"DOTS",1:"ARABIC_NUMERALS"},SiriInputType:{0:"PUSH_BUTTON_TRIGGERED_APPLE_TV"},SlatType:{0:"HORIZONTAL",1:"VERTICAL"},SleepDiscoveryMode:{0:"NOT_DISCOVERABLE",1:"ALWAYS_DISCOVERABLE"},SmokeDetected:{0:"SMOKE_NOT_DETECTED",1:"SMOKE_DETECTED"},StatusFault:{0:"NO_FAULT",1:"GENERAL_FAULT"},StatusJammed:{0:"NOT_JAMMED",1:"JAMMED"},StatusLowBattery:{0:"BATTERY_LEVEL_NORMAL",1:"BATTERY_LEVEL_LOW"},StatusTampered:{0:"NOT_TAMPERED",1:"TAMPERED"},SwingMode:{0:"SWING_DISABLED",1:"SWING_ENABLED"},TargetAirPurifierState:{0:"MANUAL",1:"AUTO"},TargetDoorState:{0:"OPEN",1:"CLOSED"},TargetFanState:{0:"MANUAL",1:"AUTO"},TargetHeaterCoolerState:{0:"AUTO",1:"HEAT",2:"COOL"},TargetHeatingCoolingState:{0:"OFF",1:"HEAT",2:"COOL",3:"AUTO"},TargetHumidifierDehumidifierState:{0:"HUMIDIFIER_OR_DEHUMIDIFIER",1:"HUMIDIFIER",2:"DEHUMIDIFIER"},TargetMediaState:{0:"PLAY",1:"PAUSE",2:"STOP"},TargetVisibilityState:{0:"SHOWN",1:"HIDDEN"},TemperatureDisplayUnits:{0:"CELSIUS",1:"FAHRENHEIT"},ThirdPartyCameraActive:{0:"OFF",1:"ON"},ValveType:{0:"GENERIC_VALVE",1:"IRRIGATION",2:"SHOWER_HEAD",3:"WATER_FAUCET"},VolumeControlType:{0:"NONE",1:"RELATIVE",2:"RELATIVE_WITH_CURRENT",3:"ABSOLUTE"},VolumeSelector:{0:"INCREMENT",1:"DECREMENT"},WiFiSatelliteStatus:{0:"UNKNOWN",1:"CONNECTED",2:"NOT_CONNECTED"}}});var Ln=S0(An(),1);var lt=(()=>{class e{transform(t){if(typeof t!="number")return t;let n=1e6/t,i=Math.round(t),a=Math.round(n);return`${i}M (${a}K)`}static \u0275fac=function(n){return new(n||e)};static \u0275pipe=et({name:"convertMired",type:e,pure:!0})}return e})();var Ve=(()=>{class e{$settings=D(Te);transform(t,n=this.$settings.env.temperatureUnits){return n==="f"?Math.round((t*1.8+32)*10)/10:Math.round(t*10)/10}static \u0275fac=function(n){return new(n||e)};static \u0275pipe=et({name:"convertTemp",type:e,pure:!0})}return e})();var In=(()=>{class e{transform(t){return typeof t!="string"?t:t.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase().replace(/\b\w/g,n=>n.toUpperCase()).trim()}static \u0275fac=function(n){return new(n||e)};static \u0275pipe=et({name:"prettify",type:e,pure:!0})}return e})();var Fn=(()=>{class e{transform(t){return typeof t!="string"||!t?t:`accessories.core.${t.replace(/^([A-Z])/,i=>i.toLowerCase()).replace(/([A-Z])/g,i=>`_${i.toLowerCase()}`)}`}static \u0275fac=function(n){return new(n||e)};static \u0275pipe=et({name:"serviceToTranslationString",type:e,pure:!0})}return e})();var k0=(e,r)=>r.name,b0=(e,r)=>r.key;function T0(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" (",d(1,1,"settings.display.menu_default"),") ")}function M0(e,r){if(e&1&&(s(0,"option",28),p(1),l(2,"serviceToTranslationString"),l(3,"translate"),h(4,T0,2,3),c()),e&2){let t=r.$implicit,n=u(2);b("value",t),o(),g(" ",d(3,5,d(2,3,t))," "),o(3),C(n.isDefaultType(t)?4:-1)}}function B0(e,r){if(e&1){let t=j();s(0,"li",8)(1,"label",26),p(2),l(3,"translate"),c(),s(4,"div",10)(5,"select",27),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.service().customType,i)||(a.service().customType=i),P(i)}),Ye(6,M0,5,7,"option",28,tt),c()()()}if(e&2){let t=u();o(2),v(d(3,2,"accessories.custom_type")),o(3),Z("ngModel",t.service().customType),o(),Qe(t.customTypeList.sort())}}function w0(e,r){if(e&1){let t=j();s(0,"li",12)(1,"span",13),p(2),l(3,"translate"),c(),s(4,"div",14)(5,"input",29),l(6,"translate"),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.service().onDashboard,i)||(a.service().onDashboard=i),P(i)}),c(),f(7,"label",30),c()()}if(e&2){let t=u();o(2),v(d(3,3,"accessories.show_on_dashboard")),o(3),Z("ngModel",t.service().onDashboard),y("aria-label",d(6,5,"accessories.show_on_dashboard"))}}function E0(e,r){if(e&1&&(s(0,"small"),p(1),c()),e&2){let t=u().$implicit,n=u(3);o(),v(n.JSON.stringify(t.value,null,2))}}function D0(e,r){if(e&1&&p(0),e&2){let t=u().$implicit;g(" ",t.value," ")}}function A0(e,r){if(e&1&&(s(0,"li",32)(1,"span",33),p(2),l(3,"prettify"),c(),s(4,"span",21),h(5,E0,2,1,"small")(6,D0,1,1),c()()),e&2){let t=r.$implicit;o(2),v(d(3,2,t.key)),o(3),C(typeof t.value=="object"?5:6)}}function I0(e,r){if(e&1&&(s(0,"li",18)(1,"span",31),p(2),l(3,"prettify"),c()(),Ye(4,A0,7,4,"li",32,b0),l(6,"keyvalue")),e&2){let t=r.$implicit;o(2),v(d(3,1,t.name)),o(2),Qe(d(6,3,t.attributes))}}function F0(e,r){if(e&1&&(s(0,"li",18)(1,"h6",19),p(2),l(3,"translate"),c()(),Ye(4,I0,7,5,null,null,k0)),e&2){let t=u();o(2),v(d(3,1,"accessories.service_info")),o(2),Qe(t.clusterInfo)}}function L0(e,r){if(e&1){let t=j();s(0,"span",38),S("click",function(){V(t);let i=u().$implicit,a=u(2);return P(a.toggleDetailsVisibility(i))}),p(1),c()}if(e&2){let t=u().$implicit,n=u(2);y("aria-expanded",n.isDetailsVisible[t.uuid]),o(),v(t.description)}}function V0(e,r){if(e&1&&p(0),e&2){let t=u().$implicit;g(" ",t.description," ")}}function P0(e,r){if(e&1&&(s(0,"div"),p(1),c()),e&2){let t=u(2).$implicit;o(),g("Step: ",t.minStep)}}function O0(e,r){if(e&1&&(s(0,"div"),p(1),c()),e&2){let t=u(2).$implicit;o(),g("Min: ",t.minValue)}}function N0(e,r){if(e&1&&(s(0,"div"),p(1),c()),e&2){let t=u(2).$implicit;o(),g("Max: ",t.maxValue)}}function H0(e,r){e&1&&p(0," \xB7 ")}function R0(e,r){if(e&1&&(p(0),h(1,H0,1,0)),e&2){let t=r.$implicit,n=r.$index,i=r.$count;g(" ",t," "),o(),C(n!==i-1?1:-1)}}function $0(e,r){if(e&1&&(s(0,"div"),p(1," Valid: "),Ye(2,R0,2,2,null,null,tt),c()),e&2){let t=u(2).$implicit;o(2),Qe(t.validValues)}}function U0(e,r){if(e&1&&(s(0,"div",35),h(1,P0,2,1,"div"),h(2,O0,2,1,"div"),h(3,N0,2,1,"div"),h(4,$0,4,0,"div"),c()),e&2){let t=u().$implicit;o(),C("minStep"in t?1:-1),o(),C("minValue"in t?2:-1),o(),C("maxValue"in t?3:-1),o(),C("validValues"in t?4:-1)}}function W0(e,r){e&1&&p(0," Value: ")}function G0(e,r){if(e&1&&p(0),e&2){let t=u().$implicit;g(" ",t.value,"% ")}}function j0(e,r){if(e&1&&(p(0),l(1,"convertTemp")),e&2){let t=u().$implicit,n=u(2);g(" ",d(1,1,n.Number(t.value)),"\xB0 ")}}function q0(e,r){if(e&1&&(p(0),l(1,"convertMired")),e&2){let t=u(2).$implicit;g(" ",d(1,1,t.value)," ")}}function z0(e,r){if(e&1&&p(0),e&2){let t=u(2).$implicit;g(" ",t.value," ")}}function K0(e,r){if(e&1&&h(0,q0,2,3)(1,z0,1,1),e&2){let t,n=u().$implicit;C((t=n.type)==="ColorTemperature"?0:1)}}function Z0(e,r){if(e&1&&(p(0),l(1,"prettify")),e&2){let t=u().$implicit,n=u(2);g(" (",d(1,1,n.enums[t.type][t.value]),") ")}}function Y0(e,r){if(e&1&&(p(0),l(1,"translate")),e&2){let t=u().$implicit;g(" (",d(1,1,t.value?"status.widget.info.yes":"status.widget.info.no"),") ")}}function Q0(e,r){if(e&1&&p(0),e&2){let t=u().$implicit;g(" ",t.value,"% ")}}function J0(e,r){if(e&1&&(p(0),l(1,"convertTemp")),e&2){let t=u().$implicit,n=u(2);g(" ",d(1,1,n.Number(t.value)),"\xB0 ")}}function X0(e,r){if(e&1&&(p(0),l(1,"convertMired")),e&2){let t=u(2).$implicit;g(" ",d(1,1,t.value)," ")}}function ea(e,r){if(e&1&&p(0),e&2){let t=u(2).$implicit;g(" ",t.value," ")}}function ta(e,r){if(e&1&&h(0,X0,2,3)(1,ea,1,1),e&2){let t,n=u().$implicit;C((t=n.type)==="ColorTemperature"?0:1)}}function ia(e,r){if(e&1&&(p(0),l(1,"prettify")),e&2){let t=u().$implicit,n=u(2);g(" (",d(1,1,n.enums[t.type][t.value]),") ")}}function na(e,r){if(e&1&&(p(0),l(1,"translate")),e&2){let t=u().$implicit;g(" (",d(1,1,t.value?"status.widget.info.yes":"status.widget.info.no"),") ")}}function oa(e,r){if(e&1&&(s(0,"li",20)(1,"span"),h(2,L0,2,2,"span",34)(3,V0,1,1),h(4,U0,5,4,"div",35),s(5,"div",36),h(6,W0,1,0),h(7,G0,1,1)(8,j0,2,3)(9,K0,2,1),h(10,Z0,2,3)(11,Y0,2,3),c()(),s(12,"span",37),h(13,Q0,1,1)(14,J0,2,3)(15,ta,2,1),h(16,ia,2,3)(17,na,2,3),c()()),e&2){let t,n,i=r.$implicit,a=u(2);o(2),C("minStep"in i||"minValue"in i||"maxValue"in i||"validValues"in i?2:3),o(2),C(a.isDetailsVisible[i.uuid]?4:-1),o(2),C(a.isDetailsVisible[i.uuid]?6:-1),o(),C((t=i.unit)==="percentage"?7:t==="celsius"?8:9),o(3),C(a.enums[i.type]!=null&&a.enums[i.type][i.value]?10:i.format==="bool"?11:-1),o(3),C((n=i.unit)==="percentage"?13:n==="celsius"?14:15),o(3),C(a.enums[i.type]!=null&&a.enums[i.type][i.value]?16:i.format==="bool"?17:-1)}}function ra(e,r){if(e&1&&(s(0,"li",18)(1,"h6",19),p(2),l(3,"translate"),c()(),s(4,"li",20)(5,"span",13),p(6),l(7,"translate"),c(),s(8,"span",21),p(9),c()(),s(10,"li",20)(11,"span",13),p(12),l(13,"translate"),c(),s(14,"span",21),p(15),c()(),Ye(16,oa,18,7,"li",20,tt)),e&2){let t=u();o(2),v(d(3,5,"accessories.service_info")),o(4),v(d(7,7,"accessories.service")),o(3),v(t.service().humanType),o(3),v(d(13,9,"accessories.name")),o(3),v(t.service().serviceName),o(),Qe(t.service().serviceCharacteristics)}}function aa(e,r){if(e&1){let t=j();s(0,"span",38),S("click",function(){V(t);let i=u().$implicit,a=u(2);return P(a.toggleDetailsVisibility(i))}),p(1),c()}if(e&2){let t=u().$implicit,n=u(2);y("aria-expanded",n.isDetailsVisible[t.uuid]),o(),v(t.description)}}function sa(e,r){if(e&1&&p(0),e&2){let t=u().$implicit;g(" ",t.description," ")}}function la(e,r){if(e&1&&(s(0,"div"),p(1),c()),e&2){let t=u(2).$implicit;o(),g("Step: ",t.minStep)}}function ca(e,r){if(e&1&&(s(0,"div"),p(1),c()),e&2){let t=u(2).$implicit;o(),g("Min: ",t.minValue)}}function da(e,r){if(e&1&&(s(0,"div"),p(1),c()),e&2){let t=u(2).$implicit;o(),g("Max: ",t.maxValue)}}function pa(e,r){e&1&&p(0," \xB7 ")}function ma(e,r){if(e&1&&(p(0),h(1,pa,1,0)),e&2){let t=r.$implicit,n=r.$index,i=r.$count;g(" ",t," "),o(),C(n!==i-1?1:-1)}}function ua(e,r){if(e&1&&(s(0,"div"),p(1," Valid: "),Ye(2,ma,2,2,null,null,tt),c()),e&2){let t=u(2).$implicit;o(2),Qe(t.validValues)}}function fa(e,r){if(e&1&&(s(0,"div",35),h(1,la,2,1,"div"),h(2,ca,2,1,"div"),h(3,da,2,1,"div"),h(4,ua,4,0,"div"),c()),e&2){let t=u().$implicit;o(),C("minStep"in t?1:-1),o(),C("minValue"in t?2:-1),o(),C("maxValue"in t?3:-1),o(),C("validValues"in t?4:-1)}}function va(e,r){e&1&&p(0," Value: ")}function ga(e,r){if(e&1&&p(0),e&2){let t=u().$implicit;g(" ",t.value,"% ")}}function ha(e,r){if(e&1&&(p(0),l(1,"convertTemp")),e&2){let t=u().$implicit,n=u(2);g(" ",d(1,1,n.Number(t.value)),"\xB0 ")}}function Ca(e,r){if(e&1&&(p(0),l(1,"convertMired")),e&2){let t=u(2).$implicit;g(" ",d(1,1,t.value)," ")}}function _a(e,r){if(e&1&&p(0),e&2){let t=u(2).$implicit;g(" ",t.value," ")}}function ya(e,r){if(e&1&&h(0,Ca,2,3)(1,_a,1,1),e&2){let t,n=u().$implicit;C((t=n.type)==="ColorTemperature"?0:1)}}function xa(e,r){if(e&1&&(p(0),l(1,"prettify")),e&2){let t=u().$implicit,n=u(2);g(" (",d(1,1,n.enums[t.type][t.value]),") ")}}function Sa(e,r){if(e&1&&(p(0),l(1,"translate")),e&2){let t=u().$implicit;g(" (",d(1,1,t.value?"status.widget.info.yes":"status.widget.info.no"),") ")}}function ka(e,r){if(e&1&&p(0),e&2){let t=u().$implicit;g(" ",t.value,"% ")}}function ba(e,r){if(e&1&&(p(0),l(1,"convertTemp")),e&2){let t=u().$implicit,n=u(2);g(" ",d(1,1,n.Number(t.value)),"\xB0 ")}}function Ta(e,r){if(e&1&&(p(0),l(1,"convertMired")),e&2){let t=u(2).$implicit;g(" ",d(1,1,t.value)," ")}}function Ma(e,r){if(e&1&&p(0),e&2){let t=u(2).$implicit;g(" ",t.value," ")}}function Ba(e,r){if(e&1&&h(0,Ta,2,3)(1,Ma,1,1),e&2){let t,n=u().$implicit;C((t=n.type)==="ColorTemperature"?0:1)}}function wa(e,r){if(e&1&&(p(0),l(1,"prettify")),e&2){let t=u().$implicit,n=u(2);g(" (",d(1,1,n.enums[t.type][t.value]),") ")}}function Ea(e,r){if(e&1&&(p(0),l(1,"translate")),e&2){let t=u().$implicit;g(" (",d(1,1,t.value?"status.widget.info.yes":"status.widget.info.no"),") ")}}function Da(e,r){if(e&1&&(s(0,"li",20)(1,"span"),h(2,aa,2,2,"span",34)(3,sa,1,1),h(4,fa,5,4,"div",35),s(5,"div",36),h(6,va,1,0),h(7,ga,1,1)(8,ha,2,3)(9,ya,2,1),h(10,xa,2,3)(11,Sa,2,3),c()(),s(12,"span",37),h(13,ka,1,1)(14,ba,2,3)(15,Ba,2,1),h(16,wa,2,3)(17,Ea,2,3),c()()),e&2){let t,n,i=r.$implicit,a=u(2);o(2),C("minStep"in i||"minValue"in i||"maxValue"in i||"validValues"in i?2:3),o(2),C(a.isDetailsVisible[i.uuid]?4:-1),o(2),C(a.isDetailsVisible[i.uuid]?6:-1),o(),C((t=i.unit)==="percentage"?7:t==="celsius"?8:9),o(3),C(a.enums[i.type]!=null&&a.enums[i.type][i.value]?10:i.format==="bool"?11:-1),o(3),C((n=i.unit)==="percentage"?13:n==="celsius"?14:15),o(3),C(a.enums[i.type]!=null&&a.enums[i.type][i.value]?16:i.format==="bool"?17:-1)}}function Aa(e,r){if(e&1&&(s(0,"ul",5)(1,"li",18)(2,"h6",19),p(3),l(4,"translate"),c()(),s(5,"li",20)(6,"span",13),p(7),l(8,"translate"),c(),s(9,"span",21),p(10),c()(),s(11,"li",20)(12,"span",13),p(13),l(14,"translate"),c(),s(15,"span",21),p(16),c()(),Ye(17,Da,18,7,"li",20,tt),c()),e&2){let t=r.$implicit;o(3),v(d(4,5,"accessories.service_info")),o(4),v(d(8,7,"accessories.service")),o(3),v(t.humanType),o(3),v(d(14,9,"accessories.name")),o(3),v(t.serviceName),o(),Qe(t.serviceCharacteristics)}}function Ia(e,r){if(e&1&&(s(0,"li",20)(1,"span",13),p(2),l(3,"translate"),c(),s(4,"span",21),p(5),c()()),e&2){let t=u(2);o(2),v(d(3,2,"child_bridge.config.platform")),o(3),v(t.matchedCachedAccessory.platform)}}function Fa(e,r){if(e&1&&(s(0,"li",20)(1,"span",13),p(2),l(3,"translate"),c(),s(4,"span",21),p(5),c()()),e&2){let t=u(2);o(2),v(d(3,2,"child_bridge.config.accessory")),o(3),v(t.matchedCachedAccessory.accessory)}}function La(e,r){if(e&1&&(s(0,"li",20)(1,"span",13),p(2),l(3,"translate"),c(),s(4,"span",21),p(5),c()(),h(6,Ia,6,4,"li",20),h(7,Fa,6,4,"li",20)),e&2){let t=u();o(2),v(d(3,4,"accessories.plugin")),o(3),v(t.matchedCachedAccessory.plugin),o(),C(t.matchedCachedAccessory.platform?6:-1),o(),C(t.matchedCachedAccessory.accessory?7:-1)}}function Va(e,r){if(e&1&&(s(0,"li",20)(1,"span",13),p(2),c(),s(3,"span",21),p(4),c()()),e&2){let t=r.$implicit;o(2),v(t.key),o(2),v(t.value)}}function Pa(e,r){if(e&1&&(s(0,"li",20)(1,"span",13),p(2,"Protocol"),c(),s(3,"span",21),p(4,"Matter"),c()(),s(5,"li",20)(6,"span",13),p(7,"Bridge"),c(),s(8,"span",21),p(9),c()()),e&2){let t=u();o(9),v(t.service().instance.name)}}function Oa(e,r){if(e&1&&(s(0,"li",20)(1,"span",13),p(2),l(3,"translate"),c(),s(4,"span",21),p(5),c()()),e&2){let t=u();o(2),v(d(3,2,"child_bridge.config.name")),o(3),v(t.matchedCachedAccessory.bridge)}}function Na(e,r){if(e&1&&(s(0,"li",20)(1,"span",13),p(2),l(3,"translate"),c(),s(4,"span",21),p(5),c()(),s(6,"li",20)(7,"span",13),p(8),l(9,"translate"),c(),s(10,"span",21),p(11),c()(),s(12,"li",20)(13,"span",39),p(14,"aid"),c(),s(15,"span",21),p(16),c()(),s(17,"li",20)(18,"span",39),p(19,"iid"),c(),s(20,"span",21),p(21),c()()),e&2){let t=u();o(2),v(d(3,6,"accessories.bridge_ip")),o(3),v(t.service().instance.ipAddress),o(3),v(d(9,8,"accessories.bridge_port")),o(3),v(t.service().instance.port),o(5),v(t.service().aid),o(5),v(t.service().iid)}}function Ha(e,r){if(e&1){let t=j();s(0,"li",20)(1,"span",39),p(2,"UUID"),c(),s(3,"span",21),p(4),c()(),s(5,"li",40)(6,"span",13),p(7),l(8,"translate"),c(),s(9,"button",41),S("click",function(){V(t);let i=u();return P(i.removeSingleCachedAccessories())}),f(10,"i",42),c()()}if(e&2){let t=u();o(4),v(t.matchedCachedAccessory.UUID),o(3),v(d(8,2,"accessories.button_remove"))}}var Vn=(()=>{class e{$activeModal=D(De);$modal=D(X);hapCustomTypeList=[["AirPurifier","Switch","Outlet","Fan","Lightbulb","Heater","Cooler","Humidifier","Dehumidifier","Television","Valve","RobotVacuum","WashingMachine"],["Switch","Outlet","LockMechanism"],["Switch","Outlet","GarageDoorOpener"],["Door","Window","WindowCovering"],["Doorbell","Speaker","SmartSpeaker","Microphone"]];matterCustomTypeList=[["OnOffLight","OnOffLightSwitch","OnOffPlugInUnit","RoboticVacuumCleaner"],["Door","Window","WindowCovering"],["Fan"],["Thermostat"]];accessoryCache=B.required({});pairingCache=B.required({});service=B.required({});isDetailsVisible={};accessoryInformation;extraServices=[];matchedCachedAccessory=null;enums=Ln.Enums;customTypeList=[];isMatterAccessory=!1;clusterInfo=[];ngOnInit(){if(this.isMatterAccessory=this.service().protocol==="matter",this.isMatterAccessory){this.customTypeList=[...new Set(this.matterCustomTypeList.filter(n=>n.includes(this.service().deviceType)).flat())];let t=this.service().clusters||{};this.clusterInfo=Object.entries(t).map(([n,i])=>({name:n,attributes:i})),this.accessoryInformation=Object.entries(this.service().accessoryInformation||{}).map(([n,i])=>({key:n,value:i})),this.accessoryInformation.unshift({key:"Device Type",value:this.service().deviceType||"Unknown"}),this.service().customType||(this.service().customType=this.service().deviceType)}else this.customTypeList=[...new Set(this.hapCustomTypeList.filter(t=>t.includes(this.service().type)).flat())],this.accessoryInformation=Object.entries(this.service().accessoryInformation).map(([t,n])=>({key:t,value:n})),this.matchedCachedAccessory=this.matchToCachedAccessory(),this.service().type==="LockMechanism"&&Object.values(this.service().linkedServices).filter(t=>t.type==="LockManagement").forEach(t=>this.extraServices.push(t)),this.service().customType||(this.service().customType=this.service().type)}removeSingleCachedAccessories(){this.$activeModal.close();let t=this.$modal.open(Dn,{size:"lg",backdrop:"static"});t.componentInstance.selectedBridge=this.service().instance.username.replaceAll(":","")}isDefaultType(t){return this.isMatterAccessory?t===this.service().deviceType:t===this.service().type}toggleDetailsVisibility(t){("minStep"in t||"minValue"in t||"maxValue"in t||"validValues"in t)&&(this.isDetailsVisible[t.uuid]=!this.isDetailsVisible[t.uuid])}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchToCachedAccessory(){let t=this.service().instance.username,n=this.pairingCache().find(i=>i._username===t);if(n){let i=n._main?"cachedAccessories":`cachedAccessories.${n._id}`,a=this.accessoryCache().filter(m=>m.$cacheFile===i);if(a.length){let m=this.service().accessoryInformation.Name,A=this.service().accessoryInformation["Serial Number"],z=a.filter(q=>{let re=q.services.find(de=>de.constructorName==="AccessoryInformation"),_e=re.characteristics.find(de=>de.displayName==="Name"),Ae=re.characteristics.find(de=>de.displayName==="Serial Number");return _e.value===m&&Ae.value===A});if(z.length===1)return Tt(bt({},z[0]),{bridge:n.name})}}}Number=Number;JSON=JSON;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{accessoryCache:[1,"accessoryCache"],pairingCache:[1,"pairingCache"],service:[1,"service"]},decls:61,vars:43,consts:[["role","dialog","aria-modal","true",1,"modal-content"],[1,"modal-header"],["id","accessory-info-modal-title",1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"list-group","list-group-box","mb-3"],[1,"list-group-item","text-center","grey-text","small"],[3,"innerHTML"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","text","id","form-name","autocomplete","off",1,"form-control","custom-input",3,"ngModelChange","ngModel"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","id","hide-accessory",1,"rendux-input",3,"ngModelChange","ngModel"],["for","hide-accessory",1,"rendux-label","ms-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item"],[1,"mb-0","text-center"],[1,"list-group-item","d-flex","justify-content-between","align-items-left","flex-column","flex-md-row"],[1,"text-start","text-md-end","grey-text","font-monospace"],[1,"modal-footer","justify-content-between"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"custom-select",3,"ngModelChange","ngModel"],[3,"value"],["type","checkbox","id","show-on-dashboard",1,"rendux-input","mb-0",3,"ngModelChange","ngModel"],["for","show-on-dashboard",1,"rendux-label","ms-3"],[1,"fw-bold"],[1,"list-group-item","d-flex","justify-content-between","align-items-start","align-items-md-center","flex-column","flex-md-row"],[1,"text-start","me-2"],[1,"hover-pointer"],[1,"grey-text","m-0","p-0","font-monospace"],[1,"d-block","d-md-none","font-monospace","grey-text"],[1,"text-start","text-md-end","grey-text","font-monospace","d-none","d-md-block","align-content-center"],[1,"hover-pointer",3,"click"],[1,"text-start","font-monospace"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"btn","btn-primary","m-0","ms-3","py-1",3,"click"],[1,"fas","fa-arrow-right"]],template:function(n,i){n&1&&(s(0,"div",0)(1,"div",1)(2,"h5",2),p(3),c(),s(4,"button",3),l(5,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(6,"div",4)(7,"ul",5)(8,"li",6),f(9,"span",7),l(10,"translate"),f(11,"br")(12,"span",7),l(13,"translate"),c(),s(14,"li",8)(15,"label",9),p(16),l(17,"translate"),c(),s(18,"div",10)(19,"input",11),S("ngModelChange",function(m){return i.service().customName=m}),c()()(),h(20,B0,8,4,"li",8),s(21,"li",12)(22,"span",13),p(23),l(24,"translate"),c(),s(25,"div",14)(26,"input",15),l(27,"translate"),Q("ngModelChange",function(m){return Y(i.service().hidden,m)||(i.service().hidden=m),m}),c(),f(28,"label",16),c()(),h(29,w0,8,7,"li",12),c(),s(30,"ul",5),h(31,F0,6,3)(32,ra,18,11),c(),Ye(33,Aa,19,11,"ul",5,tt),s(35,"ul",17)(36,"li",18)(37,"h6",19),p(38),l(39,"translate"),c()(),h(40,La,8,6),Ye(41,Va,5,2,"li",20,tt),h(43,Pa,10,1),s(44,"li",20)(45,"span",13),p(46),l(47,"translate"),c(),s(48,"span",21),p(49),c()(),h(50,Oa,6,4,"li",20),h(51,Na,22,10),h(52,Ha,11,4),c()(),s(53,"div",22),f(54,"div",13),s(55,"div",23)(56,"button",24),l(57,"translate"),S("click",function(){return i.dismissModal()}),p(58),l(59,"translate"),c()(),f(60,"div",25),c()()),n&2&&(y("aria-labelledby","accessory-info-modal-title"),o(3),v(i.service().customName||i.service().serviceName),o(),y("aria-label",d(5,23,"form.button_close")),o(5),b("innerHTML",d(10,25,"accessories.only_ui"),je),o(3),b("innerHTML",d(13,27,"accessories.only_ui_2"),je),o(4),v(d(17,29,"accessories.custom_name")),o(3),b("ngModel",i.service().customName||i.service().serviceName),o(),C(i.customTypeList.length?20:-1),o(3),v(d(24,31,"accessories.hide_this_accessory")),o(3),Z("ngModel",i.service().hidden),y("aria-label",d(27,33,"accessories.hide_this_accessory")),o(3),C(i.service().hidden?-1:29),o(2),C(i.isMatterAccessory?31:32),o(2),Qe(i.extraServices),o(5),v(d(39,35,"accessories.accessory_info")),o(2),C(i.matchedCachedAccessory?40:-1),o(),Qe(i.accessoryInformation),o(2),C(i.isMatterAccessory?43:-1),o(3),v(d(47,37,"users.label_username")),o(3),v(i.service().instance.username),o(),C(i.matchedCachedAccessory?50:-1),o(),C(i.isMatterAccessory?-1:51),o(),C(i.matchedCachedAccessory?52:-1),o(4),y("aria-label",d(57,39,"form.button_close")),o(2),g(" ",d(59,41,"form.button_close")," "))},dependencies:[ne,Bn,wn,Tn,bn,Mn,ae,se,_n,w,Ve,In,lt,Fn],encapsulation:2})}return e})();var ie=(()=>{class e{$api=D(xn);$auth=D(Sn);$destroyRef=D(ye);$modal=D(X);$toastr=D(Le);$translate=D(yn);$ws=D(En);accessoryCache=[];pairingCache=[];customAttributesApplied=new Set;io;connectedSubscription;connectedSubscription2;saveLayoutSubscription;hiddenTypes=["InputSource","LockManagement","CameraRTPStreamManagement","ProtocolInformation"];layoutSaved=new ee;accessoryData=new ee;readyForControl=!1;hapReadyForControl=!1;matterReadyForControl=!1;accessories={services:[]};rooms=ln([],{});accessoryLayout;originalLayout;constructor(){this.$auth.user.admin&&(this.$api.get("/server/cached-accessories").then(t=>{this.accessoryCache=t}).catch(t=>console.error(t)),this.$api.get("/server/pairings").then(t=>{this.pairingCache=t}).catch(t=>console.error(t)))}showAccessoryInformation(t){let n=this.$modal.open(Vn,{size:"lg",backdrop:"static"});return n.componentInstance.service=t,n.componentInstance.accessoryCache=this.accessoryCache,n.componentInstance.pairingCache=this.pairingCache,n.result.then(()=>this.saveLayout()).catch(()=>this.saveLayout()),!1}stop(){this.connectedSubscription&&(this.connectedSubscription.unsubscribe(),this.connectedSubscription=null),this.connectedSubscription2&&(this.connectedSubscription2.unsubscribe(),this.connectedSubscription2=null),this.saveLayoutSubscription&&(this.saveLayoutSubscription.unsubscribe(),this.saveLayoutSubscription=null),this.io.end(),this.rooms.set([]),this.accessories={services:[]},this.customAttributesApplied.clear(),delete this.accessoryLayout,delete this.originalLayout}start(){return oe(this,null,function*(){this.readyForControl=!1,this.hapReadyForControl=!1,this.matterReadyForControl=!1,this.io=this.$ws.connectToNamespace("accessories"),yield this.loadLayout(),this.io.connected?(this.io.socket.emit("get-accessories"),setTimeout(()=>{this.connectedSubscription=this.io.connected.subscribe(()=>{this.io.socket.emit("get-accessories")})},1e3)):this.connectedSubscription2=this.io.connected.subscribe(()=>{this.io.socket.emit("get-accessories")}),this.io.socket.on("accessories-data",t=>{this.parseServices(t),this.generateHelpers(),this.sortIntoRooms(),this.orderRooms(),this.applyCustomAttributes(),this.accessoryData.next(t)}),this.io.socket.on("accessories-reload-required",()=>oe(this,null,function*(){this.stop(),yield this.start()})),this.io.socket.on("matter-accessories-reload-required",()=>oe(this,null,function*(){this.matterReadyForControl=!1,this.io.socket.emit("accessory-control",{refresh:!0})})),this.io.socket.on("accessory-control-failure",t=>{console.error(t),this.$toastr.error(t,this.$translate.instant("toast.title_error"))}),this.io.socket.on("accessories-ready-for-control",()=>{this.readyForControl=!0}),this.io.socket.on("hap-accessories-ready-for-control",()=>{this.hapReadyForControl=!0}),this.io.socket.on("matter-accessories-ready-for-control",()=>{this.matterReadyForControl=!0})})}saveLayout(){let t=this.rooms().map(n=>({name:n.name,services:n.services.map(i=>({uniqueId:i.uniqueId,name:i.serviceName,serial:i.accessoryInformation["Serial Number"],bridge:i.instance.username,aid:i.aid,iid:i.iid,uuid:i.uuid,customName:i.customName||void 0,customType:i.customType||void 0,hidden:i.hidden||void 0,onDashboard:i.onDashboard||void 0}))})).filter(n=>n.services.length);this.accessoryLayout=this.mergeWithUndiscoveredServices(t),this.saveLayoutSubscription&&this.saveLayoutSubscription.unsubscribe(),this.saveLayoutSubscription=this.io.request("save-layout",{user:this.$auth.user.username,layout:this.accessoryLayout}).pipe(fe(this.$destroyRef)).subscribe({next:()=>this.layoutSaved.next(void 0),error:n=>{console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error"))}})}loadLayout(){return oe(this,null,function*(){this.accessoryLayout=yield en(this.io.request("get-layout",{user:this.$auth.user.username})),this.originalLayout=JSON.parse(JSON.stringify(this.accessoryLayout)),this.rooms.set(this.accessoryLayout.map(t=>({name:t.name,services:[]})))})}servicesMatch(t,n){return n.protocol==="matter"||n.uniqueId?.startsWith("matter:")?t.uniqueId===n.uniqueId&&t.bridge===(n.instance?.username||n.bridge):t.uniqueId===n.uniqueId?!0:t.name===(n.serviceName||n.name)&&t.serial===(n.accessoryInformation?.["Serial Number"]||n.serial)&&t.bridge===(n.instance?.username||n.bridge)&&t.uuid===n.uuid}mergeWithUndiscoveredServices(t){if(!this.originalLayout)return t;let n=JSON.parse(JSON.stringify(t)),i=new Set;return n.forEach(a=>{a.services.forEach(m=>{let A=null;for(let z of this.originalLayout){for(let q of z.services)if(q.name&&this.servicesMatch(q,m)){A=q;break}if(A)break}A&&i.add(A.uniqueId)})}),this.originalLayout.forEach(a=>{a.services.forEach(m=>{if(i.has(m.uniqueId)||!m.name)return;let A=n.find(z=>z.name===a.name);A||(A={name:a.name,services:[]},n.push(A)),A.services.push({uniqueId:m.uniqueId,name:m.name,bridge:m.bridge,serial:m.serial,aid:m.aid,iid:m.iid,uuid:m.uuid,customName:m.customName,customType:m.customType,hidden:m.hidden,onDashboard:m.onDashboard})})}),n.filter(a=>a.services.length)}parseServices(t){if(!this.accessories.services.length){this.accessories.services=t;return}t.forEach(n=>{let i=this.accessories.services.find(a=>a.uniqueId===n.uniqueId);n.type==="LockMechanism"&&this.attachLockManagementToMechanism(n),i?Object.assign(i,n):this.accessories.services.push(n)})}sortIntoRooms(){let t=new Set(this.hiddenTypes);this.accessories.services.forEach(n=>{if(t.has(n.type))return;if(n.linked&&(n.linkedServices={},n.linked.forEach(a=>{n.linkedServices[a]=this.accessories.services.find(m=>m.aid===n.aid&&m.iid===a&&m.instance.username===n.instance.username)})),!this.rooms().find(a=>a.services.find(m=>m.uniqueId===n.uniqueId))){let a=null,m=null;for(let A of this.accessoryLayout)if(m=A.services.find(z=>this.servicesMatch(z,n)),m){a=A;break}a&&m?(m.customType&&(n.customType=m.customType),m.customName&&(n.customName=m.customName),m.hidden&&(n.hidden=m.hidden),m.onDashboard&&(n.onDashboard=m.onDashboard),this.customAttributesApplied.add(n.uniqueId),this.rooms.update(A=>A.map(z=>z.name===a.name?Tt(bt({},z),{services:[...z.services,n]}):z))):(this.customAttributesApplied.add(n.uniqueId),this.rooms().some(z=>z.name==="Default Room")?this.rooms.update(z=>z.map(q=>q.name==="Default Room"?Tt(bt({},q),{services:[...q.services,n]}):q)):this.rooms.update(z=>[...z,{name:"Default Room",services:[n]}]))}})}orderRooms(){this.rooms.update(t=>t.map(n=>{let i=this.accessoryLayout.find(m=>m.name===n.name),a=[...n.services].sort((m,A)=>{let z=i.services.findIndex(re=>re.uniqueId===m.uniqueId),q=i.services.findIndex(re=>re.uniqueId===A.uniqueId);return z<q?-1:z>q?1:0});return Tt(bt({},n),{services:a})}))}applyCustomAttributes(){this.rooms().forEach(t=>{let n=this.accessoryLayout.find(i=>i.name===t.name);n&&t.services.forEach(i=>{if(this.customAttributesApplied.has(i.uniqueId))return;let a=n.services.find(A=>A.uniqueId===i.uniqueId);if(!a)return;let m=i;a.customType&&(m.customType=a.customType),a.customName&&(m.customName=a.customName),a.hidden&&(m.hidden=a.hidden),a.onDashboard&&(m.onDashboard=a.onDashboard),this.customAttributesApplied.add(i.uniqueId)})})}generateHelpers(){this.accessories.services.forEach(t=>{let n=t;n.protocol==="matter"?n.getCluster||(n.getCluster=i=>{let a=n.clusters||{};return a[i]?{attributes:a[i],setAttributes:m=>new Promise(A=>{if(!this.matterReadyForControl){console.warn("Matter control attempted but not ready for control:",{matterReadyForControl:this.matterReadyForControl,uniqueId:t.uniqueId,cluster:i}),A(void 0);return}return this.io.socket.emit("accessory-control",{set:{uniqueId:t.uniqueId,cluster:i,attributes:m}}),A(void 0)})}:null}):t.getCharacteristic||(t.getCharacteristic=i=>{let a=t.serviceCharacteristics.find(m=>m.type===i);return a?(a.setValue=m=>new Promise(A=>(this.readyForControl||A(void 0),this.io.socket.emit("accessory-control",{set:{uniqueId:t.uniqueId,aid:t.aid,siid:t.iid,iid:a.iid,value:m}}),A(void 0))),a):null})})}attachLockManagementToMechanism(t){let n=[],i=[];for(let a of this.accessories.services)a.type==="LockMechanism"&&a.accessoryInformation.Name===t.accessoryInformation.Name&&a.accessoryInformation["Serial Number"]===t.accessoryInformation["Serial Number"]?n.push(a):a.type==="LockManagement"&&a.accessoryInformation.Name===t.accessoryInformation.Name&&a.accessoryInformation["Serial Number"]===t.accessoryInformation["Serial Number"]&&i.push(a);if(n.length===1&&i.length===1){let a=i[0];t.linkedServices||(t.linkedServices={}),t.linkedServices[a.iid]=a}}static \u0275fac=function(n){return new(n||e)};static \u0275prov=Yt({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var gt=(function(e){return e.Range="range",e.Steps="steps",e.Positions="positions",e.Count="count",e.Values="values",e})(gt||{}),ze=(function(e){return e[e.None=-1]="None",e[e.NoValue=0]="NoValue",e[e.LargeValue=1]="LargeValue",e[e.SmallValue=2]="SmallValue",e})(ze||{});function Ra(e){return Xt(e)&&typeof e.from=="function"}function Xt(e){return typeof e=="object"&&typeof e.to=="function"}function Pn(e){e.parentElement.removeChild(e)}function Mi(e){return e!=null}function On(e){e.preventDefault()}function $a(e){return e.filter(function(r){return this[r]?!1:this[r]=!0},{})}function Ua(e,r){return Math.round(e/r)*r}function Wa(e,r){var t=e.getBoundingClientRect(),n=e.ownerDocument,i=n.documentElement,a=$n(n);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(a.x=0),r?t.top+a.y-i.clientTop:t.left+a.x-i.clientLeft}function Xe(e){return typeof e=="number"&&!isNaN(e)&&isFinite(e)}function Nn(e,r,t){t>0&&(Re(e,r),setTimeout(function(){Jt(e,r)},t))}function Hn(e){return Math.max(Math.min(e,100),0)}function ei(e){return Array.isArray(e)?e:[e]}function Ga(e){e=String(e);var r=e.split(".");return r.length>1?r[1].length:0}function Re(e,r){e.classList&&!/\s/.test(r)?e.classList.add(r):e.className+=" "+r}function Jt(e,r){e.classList&&!/\s/.test(r)?e.classList.remove(r):e.className=e.className.replace(new RegExp("(^|\\b)"+r.split(" ").join("|")+"(\\b|$)","gi")," ")}function ja(e,r){return e.classList?e.classList.contains(r):new RegExp("\\b"+r+"\\b").test(e.className)}function $n(e){var r=window.pageXOffset!==void 0,t=(e.compatMode||"")==="CSS1Compat",n=r?window.pageXOffset:t?e.documentElement.scrollLeft:e.body.scrollLeft,i=r?window.pageYOffset:t?e.documentElement.scrollTop:e.body.scrollTop;return{x:n,y:i}}function qa(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function za(){var e=!1;try{var r=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,r)}catch{}return e}function Ka(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function wi(e,r){return 100/(r-e)}function Bi(e,r,t){return r*100/(e[t+1]-e[t])}function Za(e,r){return Bi(e,e[0]<0?r+Math.abs(e[0]):r-e[0],0)}function Ya(e,r){return r*(e[1]-e[0])/100+e[0]}function Ht(e,r){for(var t=1;e>=r[t];)t+=1;return t}function Qa(e,r,t){if(t>=e.slice(-1)[0])return 100;var n=Ht(t,e),i=e[n-1],a=e[n],m=r[n-1],A=r[n];return m+Za([i,a],t)/wi(m,A)}function Ja(e,r,t){if(t>=100)return e.slice(-1)[0];var n=Ht(t,r),i=e[n-1],a=e[n],m=r[n-1],A=r[n];return Ya([i,a],(t-m)*wi(m,A))}function Xa(e,r,t,n){if(n===100)return n;var i=Ht(n,e),a=e[i-1],m=e[i];return t?n-a>(m-a)/2?m:a:r[i-1]?e[i-1]+Ua(n-e[i-1],r[i-1]):n}var es=(function(){function e(r,t,n){this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[n||!1],this.xNumSteps=[!1],this.snap=t;var i,a=[];for(Object.keys(r).forEach(function(m){a.push([ei(r[m]),m])}),a.sort(function(m,A){return m[0][0]-A[0][0]}),i=0;i<a.length;i++)this.handleEntryPoint(a[i][1],a[i][0]);for(this.xNumSteps=this.xSteps.slice(0),i=0;i<this.xNumSteps.length;i++)this.handleStepPoint(i,this.xNumSteps[i])}return e.prototype.getDistance=function(r){for(var t=[],n=0;n<this.xNumSteps.length-1;n++)t[n]=Bi(this.xVal,r,n);return t},e.prototype.getAbsoluteDistance=function(r,t,n){var i=0;if(r<this.xPct[this.xPct.length-1])for(;r>this.xPct[i+1];)i++;else r===this.xPct[this.xPct.length-1]&&(i=this.xPct.length-2);!n&&r===this.xPct[i+1]&&i++,t===null&&(t=[]);var a,m=1,A=t[i],z=0,q=0,re=0,_e=0;for(n?a=(r-this.xPct[i])/(this.xPct[i+1]-this.xPct[i]):a=(this.xPct[i+1]-r)/(this.xPct[i+1]-this.xPct[i]);A>0;)z=this.xPct[i+1+_e]-this.xPct[i+_e],t[i+_e]*m+100-a*100>100?(q=z*a,m=(A-100*a)/t[i+_e],a=1):(q=t[i+_e]*z/100*m,m=0),n?(re=re-q,this.xPct.length+_e>=1&&_e--):(re=re+q,this.xPct.length-_e>=1&&_e++),A=t[i+_e]*m;return r+re},e.prototype.toStepping=function(r){return r=Qa(this.xVal,this.xPct,r),r},e.prototype.fromStepping=function(r){return Ja(this.xVal,this.xPct,r)},e.prototype.getStep=function(r){return r=Xa(this.xPct,this.xSteps,this.snap,r),r},e.prototype.getDefaultStep=function(r,t,n){var i=Ht(r,this.xPct);return(r===100||t&&r===this.xPct[i-1])&&(i=Math.max(i-1,1)),(this.xVal[i]-this.xVal[i-1])/n},e.prototype.getNearbySteps=function(r){var t=Ht(r,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t],step:this.xNumSteps[t],highestStep:this.xHighestCompleteStep[t]}}},e.prototype.countStepDecimals=function(){var r=this.xNumSteps.map(Ga);return Math.max.apply(null,r)},e.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},e.prototype.convert=function(r){return this.getStep(this.toStepping(r))},e.prototype.handleEntryPoint=function(r,t){var n;if(r==="min"?n=0:r==="max"?n=100:n=parseFloat(r),!Xe(n)||!Xe(t[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(n),this.xVal.push(t[0]);var i=Number(t[1]);n?this.xSteps.push(isNaN(i)?!1:i):isNaN(i)||(this.xSteps[0]=i),this.xHighestCompleteStep.push(0)},e.prototype.handleStepPoint=function(r,t){if(t){if(this.xVal[r]===this.xVal[r+1]){this.xSteps[r]=this.xHighestCompleteStep[r]=this.xVal[r];return}this.xSteps[r]=Bi([this.xVal[r],this.xVal[r+1]],t,0)/wi(this.xPct[r],this.xPct[r+1]);var n=(this.xVal[r+1]-this.xVal[r])/this.xNumSteps[r],i=Math.ceil(Number(n.toFixed(3))-1),a=this.xVal[r]+this.xNumSteps[r]*i;this.xHighestCompleteStep[r]=a}},e})(),Rn={to:function(e){return e===void 0?"":e.toFixed(2)},from:Number},ts={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},ct={tooltips:".__tooltips",aria:".__aria"};function is(e,r){if(!Xe(r))throw new Error("noUiSlider: 'step' is not numeric.");e.singleStep=r}function ns(e,r){if(!Xe(r))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");e.keyboardPageMultiplier=r}function os(e,r){if(!Xe(r))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");e.keyboardMultiplier=r}function rs(e,r){if(!Xe(r))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");e.keyboardDefaultStep=r}function as(e,r){if(typeof r!="object"||Array.isArray(r))throw new Error("noUiSlider: 'range' is not an object.");if(r.min===void 0||r.max===void 0)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");e.spectrum=new es(r,e.snap||!1,e.singleStep)}function ss(e,r){if(r=ei(r),!Array.isArray(r)||!r.length)throw new Error("noUiSlider: 'start' option is incorrect.");e.handles=r.length,e.start=r}function ls(e,r){if(typeof r!="boolean")throw new Error("noUiSlider: 'snap' option must be a boolean.");e.snap=r}function cs(e,r){if(typeof r!="boolean")throw new Error("noUiSlider: 'animate' option must be a boolean.");e.animate=r}function ds(e,r){if(typeof r!="number")throw new Error("noUiSlider: 'animationDuration' option must be a number.");e.animationDuration=r}function Un(e,r){var t=[!1],n;if(r==="lower"?r=[!0,!1]:r==="upper"&&(r=[!1,!0]),r===!0||r===!1){for(n=1;n<e.handles;n++)t.push(r);t.push(!1)}else{if(!Array.isArray(r)||!r.length||r.length!==e.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");t=r}e.connect=t}function ps(e,r){switch(r){case"horizontal":e.ort=0;break;case"vertical":e.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function Wn(e,r){if(!Xe(r))throw new Error("noUiSlider: 'margin' option must be numeric.");r!==0&&(e.margin=e.spectrum.getDistance(r))}function ms(e,r){if(!Xe(r))throw new Error("noUiSlider: 'limit' option must be numeric.");if(e.limit=e.spectrum.getDistance(r),!e.limit||e.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function us(e,r){var t;if(!Xe(r)&&!Array.isArray(r))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(r)&&!(r.length===2||Xe(r[0])||Xe(r[1])))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(r!==0){for(Array.isArray(r)||(r=[r,r]),e.padding=[e.spectrum.getDistance(r[0]),e.spectrum.getDistance(r[1])],t=0;t<e.spectrum.xNumSteps.length-1;t++)if(e.padding[0][t]<0||e.padding[1][t]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var n=r[0]+r[1],i=e.spectrum.xVal[0],a=e.spectrum.xVal[e.spectrum.xVal.length-1];if(n/(a-i)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function fs(e,r){switch(r){case"ltr":e.dir=0;break;case"rtl":e.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function vs(e,r){if(typeof r!="string")throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var t=r.indexOf("tap")>=0,n=r.indexOf("drag")>=0,i=r.indexOf("fixed")>=0,a=r.indexOf("snap")>=0,m=r.indexOf("hover")>=0,A=r.indexOf("unconstrained")>=0,z=r.indexOf("invert-connects")>=0,q=r.indexOf("drag-all")>=0,re=r.indexOf("smooth-steps")>=0;if(i){if(e.handles!==2)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");Wn(e,e.start[1]-e.start[0])}if(z&&e.handles!==2)throw new Error("noUiSlider: 'invert-connects' behaviour must be used with 2 handles");if(A&&(e.margin||e.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");e.events={tap:t||a,drag:n,dragAll:q,smoothSteps:re,fixed:i,snap:a,hover:m,unconstrained:A,invertConnects:z}}function gs(e,r){if(r!==!1)if(r===!0||Xt(r)){e.tooltips=[];for(var t=0;t<e.handles;t++)e.tooltips.push(r)}else{if(r=ei(r),r.length!==e.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");r.forEach(function(n){if(typeof n!="boolean"&&!Xt(n))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),e.tooltips=r}}function hs(e,r){if(r.length!==e.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");e.handleAttributes=r}function Cs(e,r){if(!Xt(r))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");e.ariaFormat=r}function _s(e,r){if(!Ra(r))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");e.format=r}function ys(e,r){if(typeof r!="boolean")throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");e.keyboardSupport=r}function xs(e,r){e.documentElement=r}function Ss(e,r){if(typeof r!="string"&&r!==!1)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");e.cssPrefix=r}function ks(e,r){if(typeof r!="object")throw new Error("noUiSlider: 'cssClasses' must be an object.");typeof e.cssPrefix=="string"?(e.cssClasses={},Object.keys(r).forEach(function(t){e.cssClasses[t]=e.cssPrefix+r[t]})):e.cssClasses=r}function Gn(e){var r={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:Rn,format:Rn},t={step:{r:!1,t:is},keyboardPageMultiplier:{r:!1,t:ns},keyboardMultiplier:{r:!1,t:os},keyboardDefaultStep:{r:!1,t:rs},start:{r:!0,t:ss},connect:{r:!0,t:Un},direction:{r:!0,t:fs},snap:{r:!1,t:ls},animate:{r:!1,t:cs},animationDuration:{r:!1,t:ds},range:{r:!0,t:as},orientation:{r:!1,t:ps},margin:{r:!1,t:Wn},limit:{r:!1,t:ms},padding:{r:!1,t:us},behaviour:{r:!0,t:vs},ariaFormat:{r:!1,t:Cs},format:{r:!1,t:_s},tooltips:{r:!1,t:gs},keyboardSupport:{r:!0,t:ys},documentElement:{r:!1,t:xs},cssPrefix:{r:!0,t:Ss},cssClasses:{r:!0,t:ks},handleAttributes:{r:!1,t:hs}},n={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:ts,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(t).forEach(function(z){if(!Mi(e[z])&&n[z]===void 0){if(t[z].r)throw new Error("noUiSlider: '"+z+"' is required.");return}t[z].t(r,Mi(e[z])?e[z]:n[z])}),r.pips=e.pips;var i=document.createElement("div"),a=i.style.msTransform!==void 0,m=i.style.transform!==void 0;r.transformRule=m?"transform":a?"msTransform":"webkitTransform";var A=[["left","top"],["right","bottom"]];return r.style=A[r.dir][r.ort],r}function bs(e,r,t){var n=qa(),i=Ka(),a=i&&za(),m=e,A,z,q,re,_e,Ae,de=r.spectrum,ot=[],xe=[],We=[],di=0,rt={},Pt=!1,kt=e.ownerDocument,jt=r.documentElement||kt.documentElement,qt=kt.body,Kr=kt.dir==="rtl"||r.ort===1?0:100;function at(_,T){var E=kt.createElement("div");return T&&Re(E,T),_.appendChild(E),E}function Zr(_,T){var E=at(_,r.cssClasses.origin),H=at(E,r.cssClasses.handle);if(at(H,r.cssClasses.touchArea),H.setAttribute("data-handle",String(T)),r.keyboardSupport&&(H.setAttribute("tabindex","0"),H.addEventListener("keydown",function(G){return p0(G,T)})),r.handleAttributes!==void 0){var W=r.handleAttributes[T];Object.keys(W).forEach(function(G){H.setAttribute(G,W[G])})}return H.setAttribute("role","slider"),H.setAttribute("aria-orientation",r.ort?"vertical":"horizontal"),T===0?Re(H,r.cssClasses.handleLower):T===r.handles-1&&Re(H,r.cssClasses.handleUpper),E.handle=H,E}function pi(_,T){return T?at(_,r.cssClasses.connect):!1}function Yr(_,T){z=at(T,r.cssClasses.connects),q=[],re=[],re.push(pi(z,_[0]));for(var E=0;E<r.handles;E++)q.push(Zr(T,E)),We[E]=E,re.push(pi(z,_[E+1]))}function Qr(_){Re(_,r.cssClasses.target),r.dir===0?Re(_,r.cssClasses.ltr):Re(_,r.cssClasses.rtl),r.ort===0?Re(_,r.cssClasses.horizontal):Re(_,r.cssClasses.vertical);var T=getComputedStyle(_).direction;return T==="rtl"?Re(_,r.cssClasses.textDirectionRtl):Re(_,r.cssClasses.textDirectionLtr),at(_,r.cssClasses.base)}function Jr(_,T){return!r.tooltips||!r.tooltips[T]?!1:at(_.firstChild,r.cssClasses.tooltip)}function Ni(){return m.hasAttribute("disabled")}function mi(_){var T=q[_];return T.hasAttribute("disabled")}function Xr(_){_!=null?(q[_].setAttribute("disabled",""),q[_].handle.removeAttribute("tabindex")):(m.setAttribute("disabled",""),q.forEach(function(T){T.handle.removeAttribute("tabindex")}))}function e0(_){_!=null?(q[_].removeAttribute("disabled"),q[_].handle.setAttribute("tabindex","0")):(m.removeAttribute("disabled"),q.forEach(function(T){T.removeAttribute("disabled"),T.handle.setAttribute("tabindex","0")}))}function ui(){Ae&&(Ot("update"+ct.tooltips),Ae.forEach(function(_){_&&Pn(_)}),Ae=null)}function Hi(){ui(),Ae=q.map(Jr),Ci("update"+ct.tooltips,function(_,T,E){if(!(!Ae||!r.tooltips)&&Ae[T]!==!1){var H=_[T];r.tooltips[T]!==!0&&(H=r.tooltips[T].to(E[T])),Ae[T].innerHTML=H}})}function t0(){Ot("update"+ct.aria),Ci("update"+ct.aria,function(_,T,E,H,W){We.forEach(function(G){var te=q[G],K=zt(xe,G,0,!0,!0,!0),ge=zt(xe,G,100,!0,!0,!0),he=W[G],Se=String(r.ariaFormat.to(E[G]));K=de.fromStepping(K).toFixed(1),ge=de.fromStepping(ge).toFixed(1),he=de.fromStepping(he).toFixed(1),te.children[0].setAttribute("aria-valuemin",K),te.children[0].setAttribute("aria-valuemax",ge),te.children[0].setAttribute("aria-valuenow",he),te.children[0].setAttribute("aria-valuetext",Se)})})}function i0(_){if(_.mode===gt.Range||_.mode===gt.Steps)return de.xVal;if(_.mode===gt.Count){if(_.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var T=_.values-1,E=100/T,H=[];T--;)H[T]=T*E;return H.push(100),Ri(H,_.stepped)}return _.mode===gt.Positions?Ri(_.values,_.stepped):_.mode===gt.Values?_.stepped?_.values.map(function(W){return de.fromStepping(de.getStep(de.toStepping(W)))}):_.values:[]}function Ri(_,T){return _.map(function(E){return de.fromStepping(T?de.getStep(E):E)})}function n0(_){function T(he,Se){return Number((he+Se).toFixed(7))}var E=i0(_),H={},W=de.xVal[0],G=de.xVal[de.xVal.length-1],te=!1,K=!1,ge=0;return E=$a(E.slice().sort(function(he,Se){return he-Se})),E[0]!==W&&(E.unshift(W),te=!0),E[E.length-1]!==G&&(E.push(G),K=!0),E.forEach(function(he,Se){var ke,ve,we,Ne=he,Ie=E[Se+1],Pe,xi,Si,ki,Yi,bi,Qi,Ji=_.mode===gt.Steps;for(Ji&&(ke=de.xNumSteps[Se]),ke||(ke=Ie-Ne),Ie===void 0&&(Ie=Ne),ke=Math.max(ke,1e-7),ve=Ne;ve<=Ie;ve=T(ve,ke)){for(Pe=de.toStepping(ve),xi=Pe-ge,Yi=xi/(_.density||1),bi=Math.round(Yi),Qi=xi/bi,we=1;we<=bi;we+=1)Si=ge+we*Qi,H[Si.toFixed(5)]=[de.fromStepping(Si),0];ki=E.indexOf(ve)>-1?ze.LargeValue:Ji?ze.SmallValue:ze.NoValue,!Se&&te&&ve!==Ie&&(ki=0),ve===Ie&&K||(H[Pe.toFixed(5)]=[ve,ki]),ge=Pe}}),H}function o0(_,T,E){var H,W,G=kt.createElement("div"),te=(H={},H[ze.None]="",H[ze.NoValue]=r.cssClasses.valueNormal,H[ze.LargeValue]=r.cssClasses.valueLarge,H[ze.SmallValue]=r.cssClasses.valueSub,H),K=(W={},W[ze.None]="",W[ze.NoValue]=r.cssClasses.markerNormal,W[ze.LargeValue]=r.cssClasses.markerLarge,W[ze.SmallValue]=r.cssClasses.markerSub,W),ge=[r.cssClasses.valueHorizontal,r.cssClasses.valueVertical],he=[r.cssClasses.markerHorizontal,r.cssClasses.markerVertical];Re(G,r.cssClasses.pips),Re(G,r.ort===0?r.cssClasses.pipsHorizontal:r.cssClasses.pipsVertical);function Se(ve,we){var Ne=we===r.cssClasses.value,Ie=Ne?ge:he,Pe=Ne?te:K;return we+" "+Ie[r.ort]+" "+Pe[ve]}function ke(ve,we,Ne){if(Ne=T?T(we,Ne):Ne,Ne!==ze.None){var Ie=at(G,!1);Ie.className=Se(Ne,r.cssClasses.marker),Ie.style[r.style]=ve+"%",Ne>ze.NoValue&&(Ie=at(G,!1),Ie.className=Se(Ne,r.cssClasses.value),Ie.setAttribute("data-value",String(we)),Ie.style[r.style]=ve+"%",Ie.innerHTML=String(E.to(we)))}}return Object.keys(_).forEach(function(ve){ke(ve,_[ve][0],_[ve][1])}),G}function fi(){_e&&(Pn(_e),_e=null)}function vi(_){fi();var T=n0(_),E=_.filter,H=_.format||{to:function(W){return String(Math.round(W))}};return _e=m.appendChild(o0(T,E,H)),_e}function $i(){var _=A.getBoundingClientRect(),T="offset"+["Width","Height"][r.ort];return r.ort===0?_.width||A[T]:_.height||A[T]}function ut(_,T,E,H){var W=function(te){var K=r0(te,H.pageOffset,H.target||T);if(!K||Ni()&&!H.doNotReject||ja(m,r.cssClasses.tap)&&!H.doNotReject||_===n.start&&K.buttons!==void 0&&K.buttons>1||H.hover&&K.buttons)return!1;a||K.preventDefault(),K.calcPoint=K.points[r.ort],E(K,H)},G=[];return _.split(" ").forEach(function(te){T.addEventListener(te,W,a?{passive:!0}:!1),G.push([te,W])}),G}function r0(_,T,E){var H=_.type.indexOf("touch")===0,W=_.type.indexOf("mouse")===0,G=_.type.indexOf("pointer")===0,te=0,K=0;if(_.type.indexOf("MSPointer")===0&&(G=!0),_.type==="mousedown"&&!_.buttons&&!_.touches)return!1;if(H){var ge=function(ke){var ve=ke.target;return ve===E||E.contains(ve)||_.composed&&_.composedPath().shift()===E};if(_.type==="touchstart"){var he=Array.prototype.filter.call(_.touches,ge);if(he.length>1)return!1;te=he[0].pageX,K=he[0].pageY}else{var Se=Array.prototype.find.call(_.changedTouches,ge);if(!Se)return!1;te=Se.pageX,K=Se.pageY}}return T=T||$n(kt),(W||G)&&(te=_.clientX+T.x,K=_.clientY+T.y),_.pageOffset=T,_.points=[te,K],_.cursor=W||G,_}function Ui(_){var T=_-Wa(A,r.ort),E=T*100/$i();return E=Hn(E),r.dir?100-E:E}function a0(_){var T=100,E=!1;return q.forEach(function(H,W){if(!mi(W)){var G=xe[W],te=Math.abs(G-_),K=te===100&&T===100,ge=te<T,he=te<=T&&_>G;(ge||he||K)&&(E=W,T=te)}}),E}function s0(_,T){_.type==="mouseout"&&_.target.nodeName==="HTML"&&_.relatedTarget===null&&gi(_,T)}function l0(_,T){if(navigator.appVersion.indexOf("MSIE 9")===-1&&_.buttons===0&&T.buttonsProperty!==0)return gi(_,T);var E=(r.dir?-1:1)*(_.calcPoint-T.startCalcPoint),H=E*100/T.baseSize;Gi(E>0,H,T.locations,T.handleNumbers,T.connect)}function gi(_,T){T.handle&&(Jt(T.handle,r.cssClasses.active),di-=1),T.listeners.forEach(function(E){jt.removeEventListener(E[0],E[1])}),di===0&&(Jt(m,r.cssClasses.drag),yi(),_.cursor&&(qt.style.cursor="",qt.removeEventListener("selectstart",On))),r.events.smoothSteps&&(T.handleNumbers.forEach(function(E){ft(E,xe[E],!0,!0,!1,!1)}),T.handleNumbers.forEach(function(E){Me("update",E)})),T.handleNumbers.forEach(function(E){Me("change",E),Me("set",E),Me("end",E)})}function hi(_,T){if(!T.handleNumbers.some(mi)){var E;if(T.handleNumbers.length===1){var H=q[T.handleNumbers[0]];E=H.children[0],di+=1,Re(E,r.cssClasses.active)}_.stopPropagation();var W=[],G=ut(n.move,jt,l0,{target:_.target,handle:E,connect:T.connect,listeners:W,startCalcPoint:_.calcPoint,baseSize:$i(),pageOffset:_.pageOffset,handleNumbers:T.handleNumbers,buttonsProperty:_.buttons,locations:xe.slice()}),te=ut(n.end,jt,gi,{target:_.target,handle:E,listeners:W,doNotReject:!0,handleNumbers:T.handleNumbers}),K=ut("mouseout",jt,s0,{target:_.target,handle:E,listeners:W,doNotReject:!0,handleNumbers:T.handleNumbers});W.push.apply(W,G.concat(te,K)),_.cursor&&(qt.style.cursor=getComputedStyle(_.target).cursor,q.length>1&&Re(m,r.cssClasses.drag),qt.addEventListener("selectstart",On,!1)),T.handleNumbers.forEach(function(ge){Me("start",ge)})}}function c0(_){_.stopPropagation();var T=Ui(_.calcPoint),E=a0(T);E!==!1&&(r.events.snap||Nn(m,r.cssClasses.tap,r.animationDuration),ft(E,T,!0,!0),yi(),Me("slide",E,!0),Me("update",E,!0),r.events.snap?hi(_,{handleNumbers:[E]}):(Me("change",E,!0),Me("set",E,!0)))}function d0(_){var T=Ui(_.calcPoint),E=de.getStep(T),H=de.fromStepping(E);Object.keys(rt).forEach(function(W){W.split(".")[0]==="hover"&&rt[W].forEach(function(G){G.call(Zt,H)})})}function p0(_,T){if(Ni()||mi(T))return!1;var E=["Left","Right"],H=["Down","Up"],W=["PageDown","PageUp"],G=["Home","End"];r.dir&&!r.ort?E.reverse():r.ort&&!r.dir&&(H.reverse(),W.reverse());var te=_.key.replace("Arrow",""),K=te===W[0],ge=te===W[1],he=te===H[0]||te===E[0]||K,Se=te===H[1]||te===E[1]||ge,ke=te===G[0],ve=te===G[1];if(!he&&!Se&&!ke&&!ve)return!0;_.preventDefault();var we;if(Se||he){var Ne=he?0:1,Ie=Ki(T),Pe=Ie[Ne];if(Pe===null)return!1;Pe===!1&&(Pe=de.getDefaultStep(xe[T],he,r.keyboardDefaultStep)),ge||K?Pe*=r.keyboardPageMultiplier:Pe*=r.keyboardMultiplier,Pe=Math.max(Pe,1e-7),Pe=(he?-1:1)*Pe,we=ot[T]+Pe}else ve?we=r.spectrum.xVal[r.spectrum.xVal.length-1]:we=r.spectrum.xVal[0];return ft(T,de.toStepping(we),!0,!0),Me("slide",T),Me("update",T),Me("change",T),Me("set",T),!1}function Wi(_){_.fixed||q.forEach(function(T,E){ut(n.start,T.children[0],hi,{handleNumbers:[E]})}),_.tap&&ut(n.start,A,c0,{}),_.hover&&ut(n.move,A,d0,{hover:!0}),_.drag&&re.forEach(function(T,E){if(!(T===!1||E===0||E===re.length-1)){var H=q[E-1],W=q[E],G=[T],te=[H,W],K=[E-1,E];Re(T,r.cssClasses.draggable),_.fixed&&(G.push(H.children[0]),G.push(W.children[0])),_.dragAll&&(te=q,K=We),G.forEach(function(ge){ut(n.start,ge,hi,{handles:te,handleNumbers:K,connect:T})})}})}function Ci(_,T){rt[_]=rt[_]||[],rt[_].push(T),_.split(".")[0]==="update"&&q.forEach(function(E,H){Me("update",H)})}function m0(_){return _===ct.aria||_===ct.tooltips}function Ot(_){var T=_&&_.split(".")[0],E=T?_.substring(T.length):_;Object.keys(rt).forEach(function(H){var W=H.split(".")[0],G=H.substring(W.length);(!T||T===W)&&(!E||E===G)&&(!m0(G)||E===G)&&delete rt[H]})}function Me(_,T,E){Object.keys(rt).forEach(function(H){var W=H.split(".")[0];_===W&&rt[H].forEach(function(G){G.call(Zt,ot.map(r.format.to),T,ot.slice(),E||!1,xe.slice(),Zt)})})}function zt(_,T,E,H,W,G,te){var K;return q.length>1&&!r.events.unconstrained&&(H&&T>0&&(K=de.getAbsoluteDistance(_[T-1],r.margin,!1),E=Math.max(E,K)),W&&T<q.length-1&&(K=de.getAbsoluteDistance(_[T+1],r.margin,!0),E=Math.min(E,K))),q.length>1&&r.limit&&(H&&T>0&&(K=de.getAbsoluteDistance(_[T-1],r.limit,!1),E=Math.min(E,K)),W&&T<q.length-1&&(K=de.getAbsoluteDistance(_[T+1],r.limit,!0),E=Math.max(E,K))),r.padding&&(T===0&&(K=de.getAbsoluteDistance(0,r.padding[0],!1),E=Math.max(E,K)),T===q.length-1&&(K=de.getAbsoluteDistance(100,r.padding[1],!0),E=Math.min(E,K))),te||(E=de.getStep(E)),E=Hn(E),E===_[T]&&!G?!1:E}function _i(_,T){var E=r.ort;return(E?T:_)+", "+(E?_:T)}function Gi(_,T,E,H,W){var G=E.slice(),te=H[0],K=r.events.smoothSteps,ge=[!_,_],he=[_,!_];H=H.slice(),_&&H.reverse(),H.length>1?H.forEach(function(ke,ve){var we=zt(G,ke,G[ke]+T,ge[ve],he[ve],!1,K);we===!1?T=0:(T=we-G[ke],G[ke]=we)}):ge=he=[!0];var Se=!1;H.forEach(function(ke,ve){Se=ft(ke,E[ke]+T,ge[ve],he[ve],!1,K)||Se}),Se&&(H.forEach(function(ke){Me("update",ke),Me("slide",ke)}),W!=null&&Me("drag",te))}function ji(_,T){return r.dir?100-_-T:_}function u0(_,T){xe[_]=T,ot[_]=de.fromStepping(T);var E=ji(T,0)-Kr,H="translate("+_i(E+"%","0")+")";if(q[_].style[r.transformRule]=H,r.events.invertConnects&&xe.length>1){var W=xe.every(function(G,te,K){return te===0||G>=K[te-1]});if(Pt!==!W){_0();return}}Nt(_),Nt(_+1),Pt&&(Nt(_-1),Nt(_+2))}function yi(){We.forEach(function(_){var T=xe[_]>50?-1:1,E=3+(q.length+T*_);q[_].style.zIndex=String(E)})}function ft(_,T,E,H,W,G){return W||(T=zt(xe,_,T,E,H,!1,G)),T===!1?!1:(u0(_,T),!0)}function Nt(_){if(re[_]){var T=xe.slice();Pt&&T.sort(function(K,ge){return K-ge});var E=0,H=100;_!==0&&(E=T[_-1]),_!==re.length-1&&(H=T[_]);var W=H-E,G="translate("+_i(ji(E,W)+"%","0")+")",te="scale("+_i(W/100,"1")+")";re[_].style[r.transformRule]=G+" "+te}}function qi(_,T){return _===null||_===!1||_===void 0||(typeof _=="number"&&(_=String(_)),_=r.format.from(_),_!==!1&&(_=de.toStepping(_)),_===!1||isNaN(_))?xe[T]:_}function Kt(_,T,E){var H=ei(_),W=xe[0]===void 0;T=T===void 0?!0:T,r.animate&&!W&&Nn(m,r.cssClasses.tap,r.animationDuration),We.forEach(function(K){ft(K,qi(H[K],K),!0,!1,E)});var G=We.length===1?0:1;if(W&&de.hasNoSize()&&(E=!0,xe[0]=0,We.length>1)){var te=100/(We.length-1);We.forEach(function(K){xe[K]=K*te})}for(;G<We.length;++G)We.forEach(function(K){ft(K,xe[K],!0,!0,E)});yi(),We.forEach(function(K){Me("update",K),H[K]!==null&&T&&Me("set",K)})}function f0(_){Kt(r.start,_)}function v0(_,T,E,H){if(_=Number(_),!(_>=0&&_<We.length))throw new Error("noUiSlider: invalid handle number, got: "+_);ft(_,qi(T,_),!0,!0,H),Me("update",_),E&&Me("set",_)}function zi(_){if(_===void 0&&(_=!1),_)return ot.length===1?ot[0]:ot.slice(0);var T=ot.map(r.format.to);return T.length===1?T[0]:T}function g0(){for(Ot(ct.aria),Ot(ct.tooltips),Object.keys(r.cssClasses).forEach(function(_){Jt(m,r.cssClasses[_])});m.firstChild;)m.removeChild(m.firstChild);delete m.noUiSlider}function Ki(_){var T=xe[_],E=de.getNearbySteps(T),H=ot[_],W=E.thisStep.step,G=null;if(r.snap)return[H-E.stepBefore.startValue||null,E.stepAfter.startValue-H||null];W!==!1&&H+W>E.stepAfter.startValue&&(W=E.stepAfter.startValue-H),H>E.thisStep.startValue?G=E.thisStep.step:E.stepBefore.step===!1?G=!1:G=H-E.stepBefore.highestStep,T===100?W=null:T===0&&(G=null);var te=de.countStepDecimals();return W!==null&&W!==!1&&(W=Number(W.toFixed(te))),G!==null&&G!==!1&&(G=Number(G.toFixed(te))),[G,W]}function h0(){return We.map(Ki)}function C0(_,T){var E=zi(),H=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips","connect"];H.forEach(function(G){_[G]!==void 0&&(t[G]=_[G])});var W=Gn(t);H.forEach(function(G){_[G]!==void 0&&(r[G]=W[G])}),de=W.spectrum,r.margin=W.margin,r.limit=W.limit,r.padding=W.padding,r.pips?vi(r.pips):fi(),r.tooltips?Hi():ui(),xe=[],Kt(Mi(_.start)?_.start:E,T),_.connect&&Zi()}function Zi(){for(;z.firstChild;)z.removeChild(z.firstChild);for(var _=0;_<=r.handles;_++)re[_]=pi(z,r.connect[_]),Nt(_);Wi({drag:r.events.drag,fixed:!0})}function _0(){Pt=!Pt,Un(r,r.connect.map(function(_){return!_})),Zi()}function y0(){A=Qr(m),Yr(r.connect,A),Wi(r.events),Kt(r.start),r.pips&&vi(r.pips),r.tooltips&&Hi(),t0()}y0();var Zt={destroy:g0,steps:h0,on:Ci,off:Ot,get:zi,set:Kt,setHandle:v0,reset:f0,disable:Xr,enable:e0,__moveHandles:function(_,T,E){Gi(_,T,xe,E)},options:t,updateOptions:C0,target:m,removePips:fi,removeTooltips:ui,getPositions:function(){return xe.slice()},getTooltips:function(){return Ae},getOrigins:function(){return q},pips:vi};return Zt}function jn(e,r){if(!e||!e.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+e);if(e.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var t=Gn(r),n=bs(e,t,r);return e.noUiSlider=n,n}var Ei=class{to(r){return String(parseFloat(parseFloat(String(r)).toFixed(2)))}from(r){return parseFloat(r)}},le=(()=>{class e{constructor(t,n,i){this.ngZone=t,this.el=n,this.renderer=i,this.handles=[],this.config={},this.change=new vt(!0),this.update=new vt(!0),this.slide=new vt(!0),this.set=new vt(!0),this.start=new vt(!0),this.end=new vt(!0),this.onChange=Function.prototype,this.cleanups=[],this.eventHandler=(a,m,A,z)=>{let q=this.toValues(m),re=!1;if(this.value===void 0){this.value=q;return}Array.isArray(q)&&this.value[A]!=q[A]&&(re=!0),!Array.isArray(q)&&this.value!=q&&(re=!0),re&&this.ngZone.run(()=>{a.observers.length>0&&a.emit(q),this.onChange(q)}),Array.isArray(q)?this.value[A]=q[A]:this.value=q},this.defaultKeyHandler=a=>{let m=this.slider.steps(),A=parseInt(a.target.getAttribute("data-handle")),z=1,q=1,re=0,_e=0;switch(a.which){case 34:q=this.config.pageSteps;break;case 40:case 37:z=-1,re=m[A][0],a.preventDefault();break;case 33:q=this.config.pageSteps;break;case 38:case 39:re=m[A][1],a.preventDefault();break;default:break}_e=z*q*re;let Ae;Array.isArray(this.value)?(Ae=[...this.value],Ae[A]=Ae[A]+_e):Ae=this.value+_e,this.slider.set(Ae)}}ngOnChanges(t){this.slider&&(t.min||t.max||t.step||t.range)&&this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.slider.updateOptions({range:Object.assign({},{min:this.min,max:this.max},this.range||{}),step:this.step})})})}ngOnDestroy(){for(this.slider.destroy();this.cleanups.length;)this.cleanups.pop()?.()}toValues(t){let n=t.map(this.config.format.from);return n.length==1?n[0]:n}writeValue(t){this.slider?this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.slider.set(t)})}):t!==null&&(this.value=t,this.createSlider(t))}registerOnChange(t){this.onChange=t}registerOnTouched(t){}setDisabledState(t){t?this.renderer.setAttribute(this.el.nativeElement.childNodes[0],"disabled","true"):this.renderer.removeAttribute(this.el.nativeElement.childNodes[0],"disabled")}createSlider(t){let n=JSON.parse(JSON.stringify({behaviour:this.behaviour,connect:this.connect,limit:this.limit,start:t,step:this.step,pageSteps:this.pageSteps,keyboard:this.keyboard,onKeydown:this.onKeydown,range:this.range||this.config.range||{min:this.min,max:this.max},tooltips:this.tooltips,snap:this.snap,animate:this.animate}));if(n.tooltips=this.tooltips||this.config.tooltips,n.format=this.format||this.config.format||new Ei,this.ngZone.runOutsideAngular(()=>{this.slider=jn(this.el.nativeElement.querySelector("div"),Object.assign(this.config,n))}),this.handles=[].slice.call(this.el.nativeElement.querySelectorAll(".noUi-handle")),this.config.keyboard){this.config.pageSteps===void 0&&(this.config.pageSteps=10);for(let i of this.handles){i.setAttribute("tabindex",0);let a=this.config.onKeydown||this.defaultKeyHandler;this.ngZone.runOutsideAngular(()=>{this.cleanups.push(this.renderer.listen(i,"keydown",a),this.renderer.listen(i,"click",()=>{i.focus()}))})}}this.slider.on("set",(i,a,m)=>{this.eventHandler(this.set,i,a,m)}),this.slider.on("update",(i,a,m)=>{this.update.observers.length>0&&this.ngZone.run(()=>{this.update.emit(this.toValues(i))})}),this.slider.on("change",(i,a,m)=>{this.change.observers.length>0&&this.ngZone.run(()=>{this.change.emit(this.toValues(i))})}),this.slider.on("slide",(i,a,m)=>{this.eventHandler(this.slide,i,a,m)}),this.slider.on("start",(i,a,m)=>{this.start.observers.length>0&&this.ngZone.run(()=>{this.start.emit(this.toValues(i))})}),this.slider.on("end",(i,a,m)=>{this.end.observers.length>0&&this.ngZone.run(()=>{this.end.emit(this.toValues(i))})})}}return e.\u0275fac=function(t){return new(t||e)(Qt(sn),Qt(dn),Qt(pn))},e.\u0275cmp=M({type:e,selectors:[["nouislider"]],hostVars:2,hostBindings:function(t,n){t&2&&U("ng2-nouislider",!0)},inputs:{disabled:"disabled",behaviour:"behaviour",connect:"connect",limit:"limit",min:"min",max:"max",snap:"snap",animate:"animate",range:"range",step:"step",format:"format",pageSteps:"pageSteps",config:"config",keyboard:"keyboard",onKeydown:"onKeydown",tooltips:"tooltips"},outputs:{change:"change",update:"update",slide:"slide",set:"set",start:"start",end:"end"},features:[gn([{provide:kn,useExisting:an(()=>e),multi:!0}]),cn],decls:1,vars:1,template:function(t,n){t&1&&L(0,"div"),t&2&&y("disabled",n.disabled?!0:void 0)},styles:["[_nghost-%COMP%]{display:block;margin-top:1rem;margin-bottom:1rem}"]}),e})();var ue=(()=>{class e{destroyRef=D(ye);$activeModal=D(De);cdr=D(Fe);service=B.required({});$accessories=B.required({});ngOnInit(){this.setupComponent(),this.subscribeToAccessoryUpdates()}dismissModal(){this.$activeModal.dismiss("Dismiss")}subscribeToAccessoryUpdates(){this.$accessories()&&this.$accessories().accessoryData.pipe(fe(this.destroyRef)).subscribe(()=>{this.handleAccessoryUpdate(),this.cdr.markForCheck()})}createDebouncedSubscription(t,n,i=500){t.pipe(Ge(i),fe(this.destroyRef)).subscribe(n)}applySliderGradient(t,n=".noUi-target"){requestAnimationFrame(()=>{document.querySelectorAll(n).forEach(a=>{a.style.background=t})})}blurTarget(t){t.target.blur()}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:[1,"service"],$accessories:[1,"$accessories"]},decls:0,vars:0,template:function(n,i){},encapsulation:2,changeDetection:0})}return e})();var ti=(e,r)=>({"fa-check-circle":e,"fa-blank":r});function Ms(e,r){if(e&1){let t=j();s(0,"button",6),S("click",function(i){V(t);let a=u(2);return P(a.setTargetMode(0,i))}),s(1,"div",7),f(2,"i",8),c(),p(3),l(4,"translate"),s(5,"div",9),f(6,"i",10),c()()}if(e&2){let t=u(2);o(2),F(O(5,ti,t.targetMode===0,t.targetMode!==0)),o(),g(" ",d(4,3,"accessories.control.manual")," ")}}function Bs(e,r){if(e&1){let t=j();s(0,"button",6),S("click",function(i){V(t);let a=u(2);return P(a.setTargetMode(1,i))}),s(1,"div",7),f(2,"i",8),c(),p(3),l(4,"translate"),s(5,"div",9),f(6,"i",10),c()()}if(e&2){let t=u(2);o(2),F(O(5,ti,t.targetMode===1,t.targetMode!==1)),o(),g(" ",d(4,3,"accessories.control.auto")," ")}}function ws(e,r){if(e&1&&(s(0,"h6",12),p(1),l(2,"translate"),c(),s(3,"div",5),l(4,"translate"),h(5,Ms,7,8,"button",13),h(6,Bs,7,8,"button",13),c()),e&2){let t=u();o(),v(d(2,4,"accessories.control.mode")),o(2),y("aria-label",d(4,6,"accessories.control.mode_control")),o(2),C(t.targetModeValidValues.includes(0)?5:-1),o(),C(t.targetModeValidValues.includes(1)?6:-1)}}function Es(e,r){if(e&1){let t=j();s(0,"h6",12),p(1),l(2,"translate"),c(),s(3,"nouislider",14),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.targetRotationSpeed.value,i)||(a.targetRotationSpeed.value=i),P(i)}),S("ngModelChange",function(){V(t);let i=u();return P(i.onTargetRotationSpeedChange())}),c()}if(e&2){let t=u();o(),$("",d(2,6,"accessories.control.rotation_speed"),": ",t.targetRotationSpeed.value,"%"),o(2),b("min",t.targetRotationSpeed.min)("max",t.targetRotationSpeed.max)("step",t.targetRotationSpeed.step),Z("ngModel",t.targetRotationSpeed.value)}}var qn=(()=>{class e extends ue{targetState;targetMode;targetModeValidValues=[];targetRotationSpeed;targetRotationSpeedChanged=new ee;setupComponent(){this.createDebouncedSubscription(this.targetRotationSpeedChanged,()=>{this.service().getCharacteristic("RotationSpeed").setValue(this.targetRotationSpeed.value),this.targetRotationSpeed.value&&!this.targetState?(this.targetState=1,"Active"in this.service().values?this.service().getCharacteristic("Active").setValue(1):"On"in this.service().values&&this.service().getCharacteristic("On").setValue(!0)):!this.targetRotationSpeed.value&&this.targetState&&(this.targetState=0,"Active"in this.service().values?this.service().getCharacteristic("Active").setValue(0):"On"in this.service().values&&this.service().getCharacteristic("On").setValue(!1))}),this.targetState="Active"in this.service().values?this.service().values.Active:this.service().values.On?1:0,this.targetMode=this.service().values.TargetAirPurifierState,"TargetAirPurifierState"in this.service().values&&(this.targetModeValidValues=this.service().getCharacteristic("TargetAirPurifierState").validValues),this.loadRotationSpeed()}handleAccessoryUpdate(){this.targetState="Active"in this.service().values?this.service().values.Active:this.service().values.On?1:0,this.targetMode=this.service().values.TargetAirPurifierState,this.targetRotationSpeed&&(this.targetRotationSpeed.value=this.service().getCharacteristic("RotationSpeed")?.value)}setTargetState(t,n){this.targetState=t,"Active"in this.service().values?this.service().getCharacteristic("Active").setValue(this.targetState):"On"in this.service().values&&this.service().getCharacteristic("On").setValue(this.targetState===1),this.blurTarget(n)}setTargetMode(t,n){this.targetMode=t,this.service().getCharacteristic("TargetAirPurifierState").setValue(this.targetMode),this.blurTarget(n)}onTargetRotationSpeedChange(){this.targetRotationSpeedChanged.next(this.targetRotationSpeed.value)}loadRotationSpeed(){let t=this.service().getCharacteristic("RotationSpeed");t&&(this.targetRotationSpeed={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},this.applySliderGradient("linear-gradient(to right, #add8e6, #416bdf)"))}static \u0275fac=(()=>{let t;return function(i){return(t||(t=pe(e)))(i||e)}})();static \u0275cmp=M({type:e,selectors:[["ng-component"]],features:[me],decls:25,vars:25,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(n,i){n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4)(6,"div",5),l(7,"translate"),s(8,"button",6),S("click",function(m){return i.setTargetState(0,m)}),s(9,"div",7),f(10,"i",8),c(),p(11),l(12,"translate"),s(13,"div",9),f(14,"i",10),c()(),s(15,"button",6),S("click",function(m){return i.setTargetState(1,m)}),s(16,"div",7),f(17,"i",8),c(),p(18),l(19,"translate"),s(20,"div",9),f(21,"i",10),c()()(),h(22,ws,7,8),h(23,Es,4,8),c(),f(24,"div",11),c()),n&2&&(o(2),b("innerText",i.service().customName||i.service().serviceName),o(),y("aria-label",d(4,11,"form.button_close")),o(3),y("aria-label",d(7,13,"accessories.control.state_control")),o(4),F(O(19,ti,i.targetState===0,i.targetState!==0)),o(),g(" ",d(12,15,"accessories.control.off")," "),o(6),F(O(22,ti,i.targetState===1,i.targetState!==1)),o(),g(" ",d(19,17,"accessories.control.on")," "),o(4),C(i.targetModeValidValues.length?22:-1),o(),C(i.targetRotationSpeed?23:-1))},dependencies:[ne,ae,se,le,w],styles:[".purifying svg .air-wave{animation:_ngcontent-%COMP%_wave-motion 5s ease-in-out infinite;stroke:#1976d2;stroke-opacity:.5} .purifying svg .bottom-line{animation-delay:.4s}@keyframes _ngcontent-%COMP%_wave-motion{0%,to{transform:translateY(0);stroke-opacity:.5}50%{transform:translateY(2px);stroke-opacity:1}}"],changeDetection:0})}return e})();var J=(()=>{class e{downTimeout;done=!1;touchInProgress=!1;touchStartTime=0;duration=B(350,{});longClick=Ti();shortClick=Ti();onEnter(t){this.shortClick.emit(t)}onMouseUp(t){!this.touchInProgress&&!this.isSyntheticEvent()&&(clearTimeout(this.downTimeout),this.done||(this.done=!0,this.shortClick.emit(t)))}onTouchEnd(t){clearTimeout(this.downTimeout),this.done||(this.done=!0,this.shortClick.emit(t)),setTimeout(()=>{this.touchInProgress=!1},150)}onMouseDown(t){if("touches"in t){this.touchInProgress=!0,this.done=!1,this.touchStartTime=Date.now(),t.cancelable&&this.isSafariMobile()&&t.preventDefault(),this.downTimeout=setTimeout(()=>{this.done||(this.done=!0,this.longClick.emit(t))},this.duration());return}!this.touchInProgress&&!this.isSyntheticEvent()&&t.button===0&&(this.done=!1,this.downTimeout=setTimeout(()=>{this.done||(this.done=!0,this.longClick.emit(t))},this.duration()))}onMouseMove(){this.done=!0,clearTimeout(this.downTimeout)}isSyntheticEvent(){let t=Date.now()-this.touchStartTime;return this.touchInProgress&&t<300}isSafariMobile(){let t=navigator.userAgent;return/iPad|iPhone|iPod/.test(t)&&/Safari/.test(t)&&!/Chrome|CriOS|FxiOS|EdgiOS/.test(t)}ngOnDestroy(){clearTimeout(this.downTimeout),this.touchInProgress=!1}static \u0275fac=function(n){return new(n||e)};static \u0275dir=mn({type:e,selectors:[["","shortClick",""],["","longClick",""]],hostBindings:function(n,i){n&1&&S("keyup.enter",function(m){return i.onEnter(m)})("mouseup",function(m){return i.onMouseUp(m)})("touchend",function(m){return i.onTouchEnd(m)})("touchstart",function(m){return i.onMouseDown(m)})("mousedown",function(m){return i.onMouseDown(m)})("mousemove",function(){return i.onMouseMove()})("touchmove",function(){return i.onMouseMove()})},inputs:{duration:[1,"duration"]},outputs:{longClick:"longClick",shortClick:"shortClick"}})}return e})();var Ds=(e,r)=>({"accessory-on":e,purifying:r});function As(e,r){if(e&1&&(s(0,"div",18),p(1),c()),e&2){let t,n=u(2);o(),g("",(t=n.service().values)==null?null:t.RotationSpeed,"%")}}function Is(e,r){e&1&&(s(0,"div",18),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.on")))}function Fs(e,r){if(e&1&&h(0,As,2,1,"div",18)(1,Is,3,3,"div",18),e&2){let t=u();C("RotationSpeed"in t.service().values?0:1)}}function Ls(e,r){e&1&&(s(0,"div",18),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.idle")))}function Vs(e,r){e&1&&(s(0,"div",18),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.off")))}var zn=(()=>{class e{$accessories=D(ie);$modal=D(X);hasTargetValidValues=!1;service=B.required({});readyForControl=B(!1,{});ngOnInit(){"TargetAirPurifierState"in this.service().values&&(this.hasTargetValidValues=this.service().getCharacteristic("TargetAirPurifierState").validValues.length>0)}onClick(){this.readyForControl()&&("Active"in this.service().values?this.service().getCharacteristic("Active").setValue(this.service().values.Active?0:1):"On"in this.service().values&&this.service().getCharacteristic("On").setValue(!this.service().values.On))}onLongClick(){if(this.readyForControl()&&(this.hasTargetValidValues||"RotationSpeed"in this.service().values)){let t=this.$modal.open(qn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-air-purifier"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:23,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["d","M3,3.0706147 C3.28945166,3.8007217 5.978098,4.1773883 10.0660175,4.2006147 C12.5085124,4.2144929 18.5053297,1.8514837 22.4060749,1.1943647 C24.1588716,0.898084 26.5955382,1.1756219 28.716875,2.0221772","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-wave"],["d","M3,9.0706147 C3.28945166,9.8007217 5.978098,10.1773883 10.0660175,10.2006147 C12.5085124,10.2144929 18.5053297,7.8514837 22.4060749,7.1943647 C24.1588716,6.898084 26.5955382,7.1756219 28.716875,8.0221772","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-wave","bottom-line"],["x1","7","y1","14","x2","25","y2","14","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","7","y1","14","x2","2","y2","23","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","25","y1","14","x2","30","y2","23","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","8","y1","16.5","x2","24","y2","16.5","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round"],["x1","7","y1","18.5","x2","25","y2","18.5","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round"],["x1","6","y1","20.5","x2","26","y2","20.5","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round"],["x1","2","y1","23","x2","30","y2","23","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","30","y1","23","x2","30","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","2","y1","23","x2","2","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["cx","15.5","cy","27","r","2.5","stroke","#7f7f7f","stroke-width","1","fill","#1976d2","fill-opacity","0.5"],["x1","2","y1","31","x2","30","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"path",4)(6,"path",5)(7,"line",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"circle",15)(17,"line",16),c()(),N(),s(18,"div",17),p(19),c(),h(20,Fs,2,1)(21,Ls,3,3,"div",18)(22,Vs,3,3,"div",18),c()()),n&2){let a,m;F(O(7,Ds,((a=i.service().values)==null?null:a.Active)&&!("CurrentAirPurifierState"in i.service().values)||((a=i.service().values)==null?null:a.Active)&&"CurrentAirPurifierState"in i.service().values&&((a=i.service().values)==null?null:a.CurrentAirPurifierState)!==0||((a=i.service().values)==null?null:a.On),((a=i.service().values)==null?null:a.Active)&&!("CurrentAirPurifierState"in i.service().values)||((a=i.service().values)==null?null:a.Active)&&"CurrentAirPurifierState"in i.service().values&&((a=i.service().values)==null?null:a.CurrentAirPurifierState)===2||((a=i.service().values)==null?null:a.On))),o(2),y("aria-label",d(3,5,"accessories.core.air_purifier")),o(17),v(i.service().customName||i.service().serviceName),o(),C((m=i.service().values)!=null&&m.Active&&!("CurrentAirPurifierState"in i.service().values)||(m=i.service().values)!=null&&m.Active&&"CurrentAirPurifierState"in i.service().values&&((m=i.service().values)==null?null:m.CurrentAirPurifierState)===2||(m=i.service().values)!=null&&m.On?20:(m=i.service().values)!=null&&m.Active&&!("CurrentAirPurifierState"in i.service().values)||(m=i.service().values)!=null&&m.Active&&"CurrentAirPurifierState"in i.service().values&&((m=i.service().values)==null?null:m.CurrentAirPurifierState)===1||(m=i.service().values)!=null&&m.On?21:22)}},dependencies:[J,w],styles:[".purifying svg .air-wave{animation:_ngcontent-%COMP%_wave-motion 5s ease-in-out infinite;stroke:#1976d2;stroke-opacity:.5} .purifying svg .bottom-line{animation-delay:.4s}@keyframes _ngcontent-%COMP%_wave-motion{0%,to{transform:translateY(0);stroke-opacity:.5}50%{transform:translateY(2px);stroke-opacity:1}}"]})}return e})();var Ps=()=>[3,4],Os=()=>[1,2],Ns=(e,r,t,n)=>({"accessory-on":e,"fill-red":r,"fill-orange":t,"fill-green":n}),Hs=(e,r)=>({"grey-text":e,"red-text":r}),Kn=(()=>{class e{service=B.required({});labels=["Unknown","Excellent","Good","Fair","Inferior","Poor"];static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-air-quality-sensor"]],inputs:{service:[1,"service"]},decls:25,vars:19,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["transform","translate(5.1, 3) scale(0.68)"],["fill","#7f7f7f","d","M10.1435881,25.4905179 C10.286009,26.7050605 10.531254,27.9706077 10.8919121,29.2887103 C6.25942062,27.4175104 3.57173247,24.180341 2.39781526,19.889403 C1.54190101,16.760839 1.56931096,13.3702525 2.13724518,10.1783222 C2.1501971,10.1055292 2.17646546,9.96330988 2.17646546,9.96330988 C2.17646546,9.96330988 2.33770347,10.0208429 2.92620872,10.2769757 C4.60998953,11.0098007 6.29364519,11.9318703 7.85704035,13.0517448 C9.19214306,14.0080913 10.3087445,15.0188915 11.223018,16.0899229 L11.223018,16.0899229 C10.426841,18.1910249 9.96797687,20.5297906 9.99206994,23.1241613 L5.43414987,14.7605739 C5.30203551,14.5181498 4.99858593,14.4288208 4.75637627,14.5610522 C4.51416661,14.6932836 4.42491674,14.9970019 4.5570311,15.2394261 L10.1435881,25.4905179 Z M13.0333542,29.4136738 C10.9912074,19.9059085 11.088992,14.922477 21.5133004,6.73565972 C23.6127007,5.0868782 25.9746706,4.01306759 28.2881453,3.03596757 C29.0967374,2.69445726 29.3182746,2.61774651 29.3182746,2.61774651 C29.3182746,2.61774651 29.3543667,2.80737221 29.3721623,2.90442957 C30.1524904,7.1603367 30.190151,11.6811187 29.0141452,15.8525373 C27.1508473,22.4618551 22.5118613,27.1961122 14.1841552,29.413553 L25.4116309,9.74806947 C25.5485147,9.50831075 25.46529,9.20288341 25.2257434,9.06587843 C24.9861969,8.92887344 24.6810398,9.01217181 24.544156,9.25193053 L13.0333542,29.4136738 Z M13.4880693,32 C38.9655056,25.5 30.755735,0 30.755735,0 C30.755735,0 17.0308715,3.72274828 11.9893965,14.5 C7.99293593,9 0.873098889,8 0.873098889,8 C-3.99644586,30.5 13.4880693,32 13.4880693,32 Z",1,"leaves"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label"]],template:function(n,i){if(n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4),x(6,"g",5),L(7,"path",6),k(),L(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19),k()(),N(),x(21,"div",20),p(22),k(),x(23,"div",21),p(24),k()()()),n&2){let a,m,A;F(wt(11,Ns,((a=i.service().values)==null?null:a.AirQuality)===5,((a=i.service().values)==null?null:a.AirQuality)===5,be(9,Ps).includes((a=i.service().values)==null?null:a.AirQuality),be(10,Os).includes((a=i.service().values)==null?null:a.AirQuality))),o(2),y("aria-label",d(3,7,"accessories.core.air_quality_sensor")),o(20),v(i.service().customName||i.service().serviceName),o(),F(O(16,Hs,((m=i.service().values)==null?null:m.AirQuality)<5,((m=i.service().values)==null?null:m.AirQuality)===5)),o(),g(" ",i.labels[((A=i.service().values)==null?null:A.AirQuality)||0]," ")}},dependencies:[w],styles:[".fill-red svg .leaves{fill:#d32f2f!important;fill-opacity:.5!important} .fill-orange svg .leaves{fill:#ff9800!important;fill-opacity:.5!important} .fill-green svg .leaves{fill:#4caf50!important;fill-opacity:.5!important}"]})}return e})();function Rs(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.battery_notcharging")," ")}function $s(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.battery_charging")," ")}function Us(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.battery_notchargeable")," ")}function Ws(e,r){e&1&&(x(0,"span",10),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.battery_low")))}function Gs(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.battery_charged")," ")}function js(e,r){if(e&1&&h(0,Us,2,3)(1,Ws,3,3,"span",10)(2,Gs,2,3),e&2){let t,n=u(2);C(((t=n.service().values)==null?null:t.ChargingState)===2?0:((t=n.service().values)==null?null:t.StatusLowBattery)===1||((t=n.service().values)==null?null:t.BatteryLevel)===0?1:2)}}function qs(e,r){if(e&1&&h(0,$s,2,3)(1,js,3,1),e&2){let t,n=u();C(((t=n.service().values)==null?null:t.ChargingState)===1?0:1)}}var Zn=(()=>{class e{service=B.required({});Math=Math;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-battery"]],inputs:{service:[1,"service"]},decls:15,vars:11,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","5","height","13","rx","2","stroke","none","stroke-width","0"],["x","29.5","y","8","width","2","height","7","rx","2","stroke","none","fill","#7f7f7f","stroke-width","1"],["x","1","y","5","width","29","height","13","rx","2","stroke","#7f7f7f","fill","none","stroke-width","0.75"],["x","16","y","28","font-size","9","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"red-text"]],template:function(n,i){if(n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4)(6,"rect",5)(7,"rect",6),x(8,"text",7),p(9),k()()(),N(),x(10,"div",8),p(11),k(),x(12,"div",9),h(13,Rs,2,3)(14,qs,2,1),k()()()),n&2){let a,m,A,z,q,re;U("accessory-on",((a=i.service().values)==null?null:a.ChargingState)===1),o(2),y("aria-label",d(3,9,"accessories.core.battery")),o(3),y("width",i.Math.round(29/100*(((m=i.service().values)==null?null:m.BatteryLevel)||0)))("fill",((A=i.service().values)==null?null:A.ChargingState)===1?"#4caf50":((A=i.service().values)==null?null:A.StatusLowBattery)===1?"#e69533":"#808080")("fill-opacity",((z=i.service().values)==null?null:z.ChargingState)===1||((z=i.service().values)==null?null:z.StatusLowBattery)===1?"0.5":"1"),o(4),g(" ",((q=i.service().values)==null?null:q.BatteryLevel)||0,"% "),o(2),v(i.service().customName||i.service().serviceName),o(2),C(((re=i.service().values)==null?null:re.ChargingState)===0?13:14)}},dependencies:[w],styles:['.batterylevel-battery[_ngcontent-%COMP%]{position:relative;width:75px;height:30px;border:1px solid rgb(128,128,128);border-radius:4px;margin-bottom:6px;text-align:center;display:flex;align-items:center;justify-content:center;color:#d3d3d3;font-size:14px}.batterylevel-battery[_ngcontent-%COMP%]:after{content:"";position:absolute;top:7px;right:-6px;width:6px;height:13px;background-color:gray;border-radius:2px}.batterylevel-battery[_ngcontent-%COMP%] .battery-level-fill[_ngcontent-%COMP%]{position:absolute;top:0;left:0;height:100%;background-color:gray;z-index:1;transition:width .3s ease-in-out}.batterylevel-battery[_ngcontent-%COMP%] .battery-text[_ngcontent-%COMP%]{position:relative;z-index:2}.batterylevel-battery[_ngcontent-%COMP%] .battery-over[_ngcontent-%COMP%]{color:#d3d3d3}.batterylevel-battery[_ngcontent-%COMP%] .battery-under[_ngcontent-%COMP%]{color:gray}@media(max-width:575px){.batterylevel-battery[_ngcontent-%COMP%]{width:50px;height:25px;font-size:12px}.batterylevel-battery[_ngcontent-%COMP%]:after{top:4px}}.lowbattery[_ngcontent-%COMP%] .battery-level-fill[_ngcontent-%COMP%]{background-color:#e69533}.charging[_ngcontent-%COMP%] .battery-level-fill[_ngcontent-%COMP%]{background-color:#4caf50}']})}return e})();function zs(e,r){e&1&&(x(0,"div",16),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.detected")))}function Ks(e,r){e&1&&(x(0,"div",17),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.not_detected")))}var Yn=(()=>{class e{service=B.required({});static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-carbon-dioxide-sensor"]],inputs:{service:[1,"service"]},decls:21,vars:7,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","12","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.25"],["text-anchor","middle","dominant-baseline","middle","font-family","Arial","font-size","7.5","x","16","y","7.7","fill","#7f7f7f","stroke-width","0.6","font-weight","900",1,"type"],["x1","6","y1","14.5","x2","25.5","y2","14.5","stroke","#1976d2","stroke-opacity","0.5","stroke-width","2"],["stroke-linecap","round","x1","5","y1","13","x2","6.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","13","x2","11","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","15.5","y1","13","x2","15.5","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","20","y1","13","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","26","y1","13","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","6.5","y1","16","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["d","M3,24.0706147 C3.28945166,24.8007217 5.978098,25.1773883 10.0660175,25.2006147 C12.5085124,25.2144929 18.5053297,22.8514837 22.4060749,22.1943647 C24.1588716,21.898084 26.5955382,22.1756219 28.716875,23.0221772","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-line"],["d","M3,30.0706147 C3.28945166,30.8007217 5.978098,31.1773883 10.0660175,31.2006147 C12.5085124,31.2144929 18.5053297,28.8514837 22.4060749,28.1943647 C24.1588716,27.898084 26.5955382,28.1756219 28.716875,29.0221772","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-line"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(n,i){if(n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4),x(6,"text",5),p(7," CO2 "),k(),L(8,"line",6)(9,"line",7)(10,"line",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"path",13)(16,"path",14),k()(),N(),x(17,"div",15),p(18),k(),h(19,zs,3,3,"div",16)(20,Ks,3,3,"div",17),k()()),n&2){let a,m;U("accessory-on",(a=i.service().values)==null?null:a.CarbonDioxideDetected),o(2),y("aria-label",d(3,5,"accessories.core.carbon_dioxide_sensor")),o(16),v(i.service().customName||i.service().serviceName),o(),C((m=i.service().values)!=null&&m.CarbonDioxideDetected?19:20)}},dependencies:[w],styles:[".accessory-on svg .air-line{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite} .accessory-on svg .type{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();function Zs(e,r){e&1&&(x(0,"div",16),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.detected")))}function Ys(e,r){e&1&&(x(0,"div",17),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.not_detected")))}var Qn=(()=>{class e{service=B.required({});static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-carbon-monoxide-sensor"]],inputs:{service:[1,"service"]},decls:21,vars:7,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","12","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.25"],["text-anchor","middle","dominant-baseline","middle","font-family","Arial","font-size","7.5","x","16","y","7.7","fill","#7f7f7f","stroke-width","0.6","font-weight","900",1,"type"],["x1","6","y1","14.5","x2","25.5","y2","14.5","stroke","#1976d2","stroke-opacity","0.5","stroke-width","2"],["stroke-linecap","round","x1","5","y1","13","x2","6.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","13","x2","11","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","15.5","y1","13","x2","15.5","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","20","y1","13","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","26","y1","13","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","6.5","y1","16","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["d","M3,23 C6,25 9,21 12,23 C15,25 18,21 21,23 C24,25 27,21 30,23","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-line"],["d","M3,30 C6,32 9,28 12,30 C15,32 18,28 21,30 C24,32 27,28 30,30","stroke","#7f7f7f","fill","transparent","stroke-width","1.5","stroke-linecap","round",1,"air-line"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(n,i){if(n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4),x(6,"text",5),p(7," CO "),k(),L(8,"line",6)(9,"line",7)(10,"line",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"path",13)(16,"path",14),k()(),N(),x(17,"div",15),p(18),k(),h(19,Zs,3,3,"div",16)(20,Ys,3,3,"div",17),k()()),n&2){let a,m;U("accessory-on",(a=i.service().values)==null?null:a.CarbonMonoxideDetected),o(2),y("aria-label",d(3,5,"accessories.core.carbon_monoxide_sensor")),o(16),v(i.service().customName||i.service().serviceName),o(),C((m=i.service().values)!=null&&m.CarbonMonoxideDetected?19:20)}},dependencies:[w],styles:[".accessory-on svg .air-line{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite} .accessory-on svg .type{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();function Qs(e,r){e&1&&(x(0,"div",9),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.open")))}function Js(e,r){e&1&&(x(0,"div",10),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.closed")))}var Jn=(()=>{class e{service=B.required({});static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-contact-sensor"]],inputs:{service:[1,"service"]},decls:13,vars:7,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","15","height","30","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.5",1,"left-object"],["x","16","y","1","width","15","height","30","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.5",1,"right-object"],["x","10","y","11","width","6","height","10","rx","1","stroke","#7f7f7f","fill","#4caf50","fill-opacity","0.5","stroke-width","0.5",1,"left-sensor"],["x","16","y","11","width","6","height","10","rx","1","stroke","#7f7f7f","fill","#4caf50","fill-opacity","0.5","stroke-width","0.5",1,"right-sensor"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(n,i){if(n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7),k()(),N(),x(9,"div",8),p(10),k(),h(11,Qs,3,3,"div",9)(12,Js,3,3,"div",10),k()()),n&2){let a,m;U("accessory-on",(a=i.service().values)==null?null:a.ContactSensorState),o(2),y("aria-label",d(3,5,"accessories.core.contact_sensor")),o(8),v(i.service().customName||i.service().serviceName),o(),C((m=i.service().values)!=null&&m.ContactSensorState?11:12)}},dependencies:[w],styles:[".accessory-on svg .left-sensor{fill:#ff9800;fill-opacity:.5} .accessory-on svg .right-object{x:24px} .accessory-on svg .right-sensor{x:24px;fill:#ff9800;fill-opacity:.5}"]})}return e})();function Xs(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.closed")," ")}function el(e,r){if(e&1&&(p(0),l(1,"translate")),e&2){let t=u(2);$(" ",d(1,2,"accessories.control.open")," ",t.service().getCharacteristic("CurrentPosition").value,"% ")}}function tl(e,r){if(e&1&&h(0,Xs,2,3)(1,el,2,4),e&2){let t,n=u();C(((t=n.service().values)==null?null:t.CurrentPosition)===0?0:1)}}function il(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.opening"),"... ")}function nl(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.closing"),"... ")}var Xn=(()=>{class e extends ue{targetMode;targetPositionChanged=new ee;targetPosition;setupComponent(){this.createDebouncedSubscription(this.targetPositionChanged,()=>{this.service().getCharacteristic("CurrentPosition").value<this.targetPosition.value?this.service().values.PositionState=1:this.service().getCharacteristic("CurrentPosition").value>this.targetPosition.value&&(this.service().values.PositionState=0),this.service().getCharacteristic("TargetPosition").setValue(this.targetPosition.value)}),this.targetMode=this.service().values.On,this.loadTargetPosition()}handleAccessoryUpdate(){this.targetMode=this.service().values.On,this.targetPosition&&(this.targetPosition.value=this.service().getCharacteristic("TargetPosition")?.value)}onTargetPositionChange(){this.targetPositionChanged.next(this.targetPosition.value)}loadTargetPosition(){let t=this.service().getCharacteristic("TargetPosition");t&&(this.targetPosition={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},this.applySliderGradient("linear-gradient(to right, #242424, #ffd6aa)"))}static \u0275fac=(()=>{let t;return function(i){return(t||(t=pe(e)))(i||e)}})();static \u0275cmp=M({type:e,selectors:[["ng-component"]],features:[me],decls:34,vars:34,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"d-flex","justify-content-center","mb-0","p-0"],[1,"mb-0","mx-0","p-3","btn-read","w-100"],[1,"mt-4"],[1,"mb-1",3,"ngModelChange","min","max","step","ngModel"],[1,"d-flex","justify-content-between","align-items-center","mt-0","mb-1"],[1,"grey-text","small"],[1,"mb-1",3,"ngModelChange","min","max","step","disabled","ngModel"],[1,"modal-footer"]],template:function(n,i){if(n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4)(6,"div",5)(7,"div",6),h(8,tl,2,1)(9,il,2,3)(10,nl,2,3),c()(),s(11,"h6",7),p(12),l(13,"translate"),c(),s(14,"nouislider",8),Q("ngModelChange",function(m){return Y(i.targetPosition.value,m)||(i.targetPosition.value=m),m}),S("ngModelChange",function(){return i.onTargetPositionChange()}),c(),s(15,"div",9)(16,"span",10),p(17),l(18,"translate"),c(),s(19,"span",10),p(20),l(21,"translate"),c()(),s(22,"h6",7),p(23),l(24,"translate"),c(),s(25,"nouislider",11),Q("ngModelChange",function(m){return Y(i.service().getCharacteristic("CurrentPosition").value,m)||(i.service().getCharacteristic("CurrentPosition").value=m),m}),c(),s(26,"div",9)(27,"span",10),p(28),l(29,"translate"),c(),s(30,"span",10),p(31),l(32,"translate"),c()()(),f(33,"div",12),c()),n&2){let a;o(2),b("innerText",i.service().customName||i.service().serviceName),o(),y("aria-label",d(4,20,"form.button_close")),o(5),C(((a=i.service().values)==null?null:a.PositionState)===2?8:((a=i.service().values)==null?null:a.PositionState)===1?9:((a=i.service().values)==null?null:a.PositionState)===0?10:-1),o(4),$("",d(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),o(2),b("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),Z("ngModel",i.targetPosition.value),o(3),v(d(18,24,"accessories.control.closed")),o(3),v(d(21,26,"accessories.control.open")),o(3),$(" ",d(24,28,"accessories.control.current"),": ",i.service().getCharacteristic("CurrentPosition").value,"% "),o(2),b("min",0)("max",100)("step",1)("disabled",!0),Z("ngModel",i.service().getCharacteristic("CurrentPosition").value),o(3),v(d(29,30,"accessories.control.closed")),o(3),v(d(32,32,"accessories.control.open"))}},dependencies:[le,ne,ae,se,w],encapsulation:2,changeDetection:0})}return e})();function ol(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.closed")," ")}function rl(e,r){if(e&1&&(p(0),l(1,"translate")),e&2){let t,n=u(2);$(" ",d(1,2,"accessories.control.open")," ",(t=n.service().values)==null?null:t.CurrentPosition,"% ")}}function al(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.open")," ")}function sl(e,r){if(e&1&&(s(0,"div",11),h(1,ol,2,3),h(2,rl,2,4),h(3,al,2,3),c()),e&2){let t,n,i,a=u();o(),C(((t=a.service().values)==null?null:t.CurrentPosition)===0?1:-1),o(),C(((n=a.service().values)==null?null:n.CurrentPosition)>0&&((n=a.service().values)==null?null:n.CurrentPosition)<100?2:-1),o(),C(((i=a.service().values)==null?null:i.CurrentPosition)===100?3:-1)}}function ll(e,r){e&1&&(s(0,"div",12),p(1),l(2,"translate"),c()),e&2&&(o(),g("",d(2,1,"accessories.control.opening"),"..."))}function cl(e,r){e&1&&(s(0,"div",12),p(1),l(2,"translate"),c()),e&2&&(o(),g("",d(2,1,"accessories.control.closing"),"..."))}var eo=(()=>{class e{$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&(this.service().values.TargetPosition?this.service().getCharacteristic("TargetPosition").setValue(0):this.service().getCharacteristic("TargetPosition").setValue(100))}onLongClick(){if(!this.readyForControl())return;let t=this.$modal.open(Xn,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-door"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:16,vars:7,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","7.8","y","0.8","width","16.4","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","9.6","y","2.6","width","12.8","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline"],["x","11.2","y","4.2","width","9.6","height","10.8","stroke","#7f7f7f","fill-opacity","0","stroke-width","0.5","rx","0.25",1,"panel"],["x","11.2","y","16.8","width","9.6","height","10.8","stroke","#7f7f7f","fill-opacity","0","stroke-width","0.5","rx","0.25",1,"panel"],["x1","0","y1","31","x2","32","y2","31","stroke","#7f7f7f","stroke-width","1.5"],["x","19.25","y","15.87","width","1.55","height","0.05","stroke","#1976d2","fill","none","stroke-width","0.5","rx","10",1,"handle"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"line",8)(10,"rect",9),c()(),N(),s(11,"div",10),p(12),c(),h(13,sl,4,3,"div",11)(14,ll,3,3,"div",12)(15,cl,3,3,"div",12),c()()),n&2){let a,m;U("accessory-on",(a=i.service().values)==null?null:a.CurrentPosition),o(2),y("aria-label",d(3,5,"accessories.core.door")),o(10),v(i.service().customName||i.service().serviceName),o(),C(((m=i.service().values)==null?null:m.PositionState)===2?13:((m=i.service().values)==null?null:m.PositionState)===1?14:((m=i.service().values)==null?null:m.PositionState)===0?15:-1)}},dependencies:[J,w],styles:["svg .outline{transition:width 3s ease;width:12.8px} svg .panel{transition:width 3s ease;width:9.6px} svg .handle{visibility:visible;opacity:1;transition:opacity 3s ease,visibility 0s linear 3s} .accessory-on svg .outline{transition:width 3s ease;width:3.8px} .accessory-on svg .panel{transition:width 3s ease;width:.6px} .accessory-on svg .handle{visibility:hidden;opacity:0;transition:opacity 3s ease,visibility 0s linear 0s}"]})}return e})();var ht=(e,r)=>({"fa-check-circle":e,"fa-blank":r});function dl(e,r){if(e&1){let t=j();s(0,"div",5),l(1,"translate"),s(2,"button",7),S("click",function(i){V(t);let a=u();return P(a.setActive(0,i))}),s(3,"div",8),f(4,"i",9),c(),p(5),l(6,"translate"),s(7,"div",10),f(8,"i",11),c()(),s(9,"button",7),S("click",function(i){V(t);let a=u();return P(a.setActive(1,i))}),s(10,"div",8),f(11,"i",9),c(),p(12),l(13,"translate"),s(14,"div",10),f(15,"i",11),c()()()}if(e&2){let t,n,i=u();y("aria-label",d(1,7,"accessories.control.mode_control")),o(4),F(O(13,ht,((t=i.service().values)==null?null:t.Active)===0,((t=i.service().values)==null?null:t.Active)!==0)),o(),g(" ",d(6,9,"accessories.control.off")," "),o(6),F(O(16,ht,((n=i.service().values)==null?null:n.Active)===1,((n=i.service().values)==null?null:n.Active)!==1)),o(),g(" ",d(13,11,"accessories.control.on")," ")}}function pl(e,r){if(e&1){let t=j();s(0,"div",5),l(1,"translate"),s(2,"button",7),S("click",function(i){V(t);let a=u();return P(a.setTargetState(0,i))}),s(3,"div",8),f(4,"i",9),c(),p(5),l(6,"translate"),s(7,"div",10),f(8,"i",11),c()(),s(9,"button",7),S("click",function(i){V(t);let a=u();return P(a.setTargetState(1,i))}),s(10,"div",8),f(11,"i",9),c(),p(12),l(13,"translate"),s(14,"div",10),f(15,"i",11),c()(),s(16,"button",7),S("click",function(i){V(t);let a=u();return P(a.setTargetState(2,i))}),s(17,"div",8),f(18,"i",9),c(),p(19),l(20,"translate"),s(21,"div",10),f(22,"i",11),c()()()}if(e&2){let t,n,i,a=u();y("aria-label",d(1,10,"accessories.control.media_control")),o(4),F(O(18,ht,((t=a.service().values)==null?null:t.CurrentMediaState)===0,((t=a.service().values)==null?null:t.CurrentMediaState)!==0)),o(),g(" ",d(6,12,"accessories.control.play")," "),o(6),F(O(21,ht,((n=a.service().values)==null?null:n.CurrentMediaState)===1,((n=a.service().values)==null?null:n.CurrentMediaState)!==1)),o(),g(" ",d(13,14,"accessories.control.pause")," "),o(6),F(O(24,ht,((i=a.service().values)==null?null:i.CurrentMediaState)===2,((i=a.service().values)==null?null:i.CurrentMediaState)!==2)),o(),g(" ",d(20,16,"accessories.control.stop")," ")}}function ml(e,r){if(e&1){let t=j();s(0,"h6"),p(1),l(2,"translate"),c(),s(3,"div",12),l(4,"translate"),s(5,"button",7),S("click",function(i){V(t);let a=u();return P(a.setTargetMode(!1,i))}),s(6,"div",8),f(7,"i",9),c(),p(8),l(9,"translate"),s(10,"div",10),f(11,"i",11),c()(),s(12,"button",7),S("click",function(i){V(t);let a=u();return P(a.setTargetMode(!0,i))}),s(13,"div",8),f(14,"i",9),c(),p(15),l(16,"translate"),s(17,"div",10),f(18,"i",11),c()()()}if(e&2){let t=u();o(),g(" ",d(2,8,"Active"in t.service().values||"TargetMediaState"in t.service().values?"accessories.control.speaker_volume":"menu.label_status")," "),o(2),y("aria-label",d(4,10,"accessories.control.mute_control")),o(4),F(O(16,ht,!t.targetMode,t.targetMode)),o(),g(" ",d(9,12,"accessories.control.not_mute")," "),o(6),F(O(19,ht,t.targetMode,!t.targetMode)),o(),g(" ",d(16,14,"accessories.control.mute")," ")}}function ul(e,r){if(e&1){let t=j();s(0,"h6",13),p(1),l(2,"translate"),c(),s(3,"nouislider",14),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.targetVolume.value,i)||(a.targetVolume.value=i),P(i)}),S("ngModelChange",function(){V(t);let i=u();return P(i.onVolumeStateChange())}),c()}if(e&2){let t=u();o(),$("",d(2,6,"accessories.control.speaker_volume"),": ",t.targetVolume.value,"%"),o(2),b("min",t.targetVolume.min)("max",t.targetVolume.max)("step",t.targetVolume.step),Z("ngModel",t.targetVolume.value)}}var to=(()=>{class e extends ue{targetMode;targetVolume;targetVolumeChanged=new ee;setupComponent(){this.createDebouncedSubscription(this.targetVolumeChanged,()=>{this.service().getCharacteristic("Volume").setValue(this.targetVolume.value)}),this.targetMode=this.service().values.Mute,this.loadTargetVolume()}handleAccessoryUpdate(){this.targetMode=this.service().values.Mute,this.targetVolume&&(this.targetVolume.value=this.service().getCharacteristic("Volume")?.value)}setTargetMode(t,n){this.targetMode=t,this.service().getCharacteristic("Mute").setValue(this.targetMode),this.blurTarget(n)}setActive(t,n){this.service().getCharacteristic("Active").setValue(t),this.blurTarget(n)}setTargetState(t,n){this.service().getCharacteristic("TargetMediaState").setValue(t),this.blurTarget(n)}onVolumeStateChange(){this.targetVolumeChanged.next(this.targetVolume.value)}loadTargetVolume(){let t=this.service().getCharacteristic("Volume");t&&(this.targetVolume={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},this.applySliderGradient("linear-gradient(to right, #ffffff, #ffd966, #ff0000)"))}static \u0275fac=(()=>{let t;return function(i){return(t||(t=pe(e)))(i||e)}})();static \u0275cmp=M({type:e,selectors:[["ng-component"]],features:[me],decls:11,vars:7,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],[1,"mt-4","mb-0"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(n,i){n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4),h(6,dl,16,19,"div",5)(7,pl,23,27,"div",5),h(8,ml,19,22),h(9,ul,4,8),c(),f(10,"div",6),c()),n&2&&(o(2),b("innerText",i.service().customName||i.service().serviceName),o(),y("aria-label",d(4,5,"form.button_close")),o(3),C("Active"in i.service().values?6:"TargetMediaState"in i.service().values?7:-1),o(2),C("Mute"in i.service().values?8:-1),o(),C(i.targetVolume?9:-1))},dependencies:[ne,ae,se,le,w],encapsulation:2,changeDetection:0})}return e})();var fl=()=>[0,1],vl=(e,r)=>({"accessory-on":e,paused:r}),gl=()=>["Speaker","SmartSpeaker"];function hl(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.play")," ")}function Cl(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.pause")," ")}function _l(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.stop")," ")}function yl(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" \xB7 ",d(1,1,"accessories.control.mute")," ")}function xl(e,r){if(e&1&&p(0),e&2){let t,n=u(3);g(" \xB7 ",(t=n.service().values)==null?null:t.Volume,"% ")}}function Sl(e,r){if(e&1&&h(0,xl,1,1),e&2){let t=u(2);C("Volume"in t.service().values?0:-1)}}function kl(e,r){if(e&1&&(s(0,"div",7),h(1,hl,2,3)(2,Cl,2,3)(3,_l,2,3),h(4,yl,2,3)(5,Sl,1,1),c()),e&2){let t,n,i=u();o(),C((t=(t=i.service().values)==null?null:t.CurrentMediaState)===0?1:t===1?2:t===2?3:-1),o(3),C("Mute"in i.service().values&&((n=i.service().values)!=null&&n.Mute)?4:5)}}function bl(e,r){e&1&&(f(0,"div",8),l(1,"translate")),e&2&&b("innerText",d(1,1,"accessories.control.off"))}function Tl(e,r){e&1&&(f(0,"div",8),l(1,"translate")),e&2&&b("innerText",d(1,1,"accessories.control.mute"))}function Ml(e,r){if(e&1&&(s(0,"div",7),p(1),c()),e&2){let t,n=u();o(),g("",(t=n.service().values)==null?null:t.Volume,"%")}}function Bl(e,r){e&1&&(s(0,"div",7),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.on")))}function wl(e,r){e&1&&(s(0,"div",7),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.core.doorbell")))}var io=(()=>{class e{$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&("Active"in this.service().values?this.service().getCharacteristic("Active").setValue(this.service().values.Active===0?1:0):"TargetMediaState"in this.service().values?this.service().getCharacteristic("TargetMediaState").setValue(this.service().values.TargetMediaState===0?1:0):"Mute"in this.service().values&&this.service().getCharacteristic("Mute").setValue(!this.service().values.Mute))}onLongClick(){if(this.readyForControl()&&("Active"in this.service().values||"TargetMediaState"in this.service().values||"Volume"in this.service().values||"Mute"in this.service().values)){let t=this.$modal.open(to,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-doorbell"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:15,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","6","y","1","width","18","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","2"],["cx","15","cy","16","r","5","stroke","#7f7f7f","stroke-width","2","fill","#1976d2","fill-opacity","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"rect",4)(6,"circle",5),c()(),N(),s(7,"div",6),p(8),c(),h(9,kl,6,2,"div",7)(10,bl,2,3,"div",8)(11,Tl,2,3,"div",8)(12,Ml,2,1,"div",7)(13,Bl,3,3,"div",7)(14,wl,3,3,"div",7),c()()),n&2){let a,m;F(O(8,vl,"Active"in i.service().values?(a=i.service().values)==null?null:a.Active:"CurrentMediaState"in i.service().values?be(7,fl).includes((a=i.service().values)==null?null:a.CurrentMediaState):"Mute"in i.service().values&&"Volume"in i.service().values?!((a=i.service().values)!=null&&a.Mute)&&((a=i.service().values)==null?null:a.Volume)>0:"Mute"in i.service().values&&!((a=i.service().values)!=null&&a.Mute),"CurrentMediaState"in i.service().values&&((a=i.service().values)==null?null:a.CurrentMediaState)===1)),o(2),y("aria-label",d(3,5,"accessories.core.doorbell")),o(6),v(i.service().customName||i.service().serviceName),o(),C("CurrentMediaState"in i.service().values?9:"Active"in i.service().values&&!((m=i.service().values)!=null&&m.Active)?10:"Mute"in i.service().values&&((m=i.service().values)!=null&&m.Mute)?11:"Volume"in i.service().values?12:be(11,gl).includes(i.service().customType||i.service().type)?13:14)}},dependencies:[J,w],encapsulation:2})}return e})();var ii=(e,r)=>({"fa-check-circle":e,"fa-blank":r});function El(e,r){if(e&1){let t=j();s(0,"h6",12),p(1),l(2,"translate"),c(),s(3,"div",13),l(4,"translate"),s(5,"button",6),S("click",function(i){V(t);let a=u();return P(a.setRotationDirection(0,i))}),s(6,"div",7),f(7,"i",8),c(),p(8),l(9,"translate"),s(10,"div",9),f(11,"i",10),c()(),s(12,"button",6),S("click",function(i){V(t);let a=u();return P(a.setRotationDirection(1,i))}),s(13,"div",7),f(14,"i",8),c(),p(15),l(16,"translate"),s(17,"div",9),f(18,"i",10),c()()()}if(e&2){let t,n,i=u();o(),v(d(2,8,"accessories.control.rotation_direction")),o(2),y("aria-label",d(4,10,"accessories.control.direction_control")),o(4),F(O(16,ii,((t=i.service().values)==null?null:t.RotationDirection)===0,((t=i.service().values)==null?null:t.RotationDirection)!==0)),o(),g(" ",d(9,12,"accessories.control.rotation_clockwise")," "),o(6),F(O(19,ii,((n=i.service().values)==null?null:n.RotationDirection)===1,((n=i.service().values)==null?null:n.RotationDirection)!==1)),o(),g(" ",d(16,14,"accessories.control.rotation_c_clockwise")," ")}}function Dl(e,r){e&1&&p(0,"%")}function Al(e,r){if(e&1){let t=j();s(0,"h6",12),p(1),l(2,"translate"),h(3,Dl,1,0),c(),s(4,"nouislider",14),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.targetRotationSpeed.value,i)||(a.targetRotationSpeed.value=i),P(i)}),S("ngModelChange",function(){V(t);let i=u();return P(i.onTargetRotationSpeedChange())}),c()}if(e&2){let t=u();o(),$(" ",d(2,7,"accessories.control.rotation_speed"),": ",t.targetRotationSpeed.value),o(2),C(t.targetRotationSpeed.unit==="percentage"?3:-1),o(),b("min",t.targetRotationSpeed.min)("max",t.targetRotationSpeed.max)("step",t.targetRotationSpeed.step),Z("ngModel",t.targetRotationSpeed.value)}}var no=(()=>{class e extends ue{targetMode;targetRotationSpeed;targetRotationSpeedChanged=new ee;hasRotationDirection=!1;setupComponent(){this.createDebouncedSubscription(this.targetRotationSpeedChanged,()=>{this.service().getCharacteristic("RotationSpeed").setValue(this.targetRotationSpeed.value),this.targetRotationSpeed.value&&!this.targetMode?(this.targetMode=!0,"On"in this.service().values?this.service().getCharacteristic("On").setValue(this.targetMode):"Active"in this.service().values&&this.service().getCharacteristic("Active").setValue(this.targetMode?1:0)):!this.targetRotationSpeed.value&&this.targetMode&&(this.targetMode=!1,"On"in this.service().values?this.service().getCharacteristic("On").setValue(this.targetMode):"Active"in this.service().values&&this.service().getCharacteristic("Active").setValue(this.targetMode?1:0))}),this.targetMode="On"in this.service().values?this.service().values.On:this.service().values.Active===1,this.loadRotationSpeed(),"RotationDirection"in this.service().values&&(this.hasRotationDirection=!0)}handleAccessoryUpdate(){this.targetMode="On"in this.service().values?this.service().values.On:this.service().values.Active===1,this.targetRotationSpeed&&(this.targetRotationSpeed.value=this.service().getCharacteristic("RotationSpeed")?.value)}setTargetMode(t,n){this.targetMode=t,"On"in this.service().values?this.service().getCharacteristic("On").setValue(this.targetMode):"Active"in this.service().values&&this.service().getCharacteristic("Active").setValue(this.targetMode?1:0),this.targetMode&&this.targetRotationSpeed&&!this.targetRotationSpeed.value&&(this.targetRotationSpeed.value=this.service().getCharacteristic("RotationSpeed").maxValue),this.blurTarget(n)}onTargetRotationSpeedChange(){this.targetRotationSpeedChanged.next(this.targetRotationSpeed.value)}setRotationDirection(t,n){this.service().getCharacteristic("RotationDirection").setValue(t),this.blurTarget(n)}loadRotationSpeed(){let t=this.service().getCharacteristic("RotationSpeed");t&&(this.targetRotationSpeed={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep,unit:t.unit},this.applySliderGradient("linear-gradient(to right, #add8e6, #416bdf)"))}static \u0275fac=(()=>{let t;return function(i){return(t||(t=pe(e)))(i||e)}})();static \u0275cmp=M({type:e,selectors:[["ng-component"]],features:[me],decls:25,vars:25,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(n,i){n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4)(6,"div",5),l(7,"translate"),s(8,"button",6),S("click",function(m){return i.setTargetMode(!1,m)}),s(9,"div",7),f(10,"i",8),c(),p(11),l(12,"translate"),s(13,"div",9),f(14,"i",10),c()(),s(15,"button",6),S("click",function(m){return i.setTargetMode(!0,m)}),s(16,"div",7),f(17,"i",8),c(),p(18),l(19,"translate"),s(20,"div",9),f(21,"i",10),c()()(),h(22,El,19,22),h(23,Al,5,9),c(),f(24,"div",11),c()),n&2&&(o(2),b("innerText",i.service().customName||i.service().serviceName),o(),y("aria-label",d(4,11,"form.button_close")),o(3),y("aria-label",d(7,13,"accessories.control.mode_control")),o(4),F(O(19,ii,!i.targetMode,i.targetMode)),o(),g(" ",d(12,15,"accessories.control.off")," "),o(6),F(O(22,ii,i.targetMode,!i.targetMode)),o(),g(" ",d(19,17,"accessories.control.on")," "),o(4),C(i.hasRotationDirection?22:-1),o(),C(i.targetRotationSpeed?23:-1))},dependencies:[ne,ae,se,le,w],encapsulation:2,changeDetection:0})}return e})();var Il=(e,r)=>({spin:e,"spin-counter":r});function Fl(e,r){if(e&1&&(s(0,"div",8),p(1),c()),e&2){let t,n=u();o(),$("",(t=n.service().values)==null?null:t.RotationSpeed,"",n.rotationSpeedUnit)}}function Ll(e,r){if(e&1&&(f(0,"div",9),l(1,"translate")),e&2){let t,n=u();b("innerText",d(1,1,(t=n.service().values)!=null&&t.On||(t=n.service().values)!=null&&t.Active?"accessories.control.on":"accessories.control.off"))}}var oo=(()=>{class e{$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});rotationSpeedUnit="";hasRotationDirection=!1;ngOnInit(){"RotationSpeed"in this.service().values&&this.service().serviceCharacteristics.find(n=>n.type==="RotationSpeed").unit==="percentage"&&(this.rotationSpeedUnit="%"),"RotationDirection"in this.service().values&&(this.hasRotationDirection=!0)}onClick(){this.readyForControl()&&("On"in this.service().values?this.service().getCharacteristic("On").setValue(!this.service().values.On):"Active"in this.service().values&&this.service().getCharacteristic("Active").setValue(this.service().values.Active?0:1),"RotationSpeed"in this.service().values&&!this.service().values.On&&!this.service().values.RotationSpeed&&(this.service().values.RotationSpeed=this.service().getCharacteristic("RotationSpeed").maxValue))}onLongClick(){if(this.readyForControl()&&("RotationSpeed"in this.service().values||"RotationDirection"in this.service().values)){let t=this.$modal.open(no,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-fan"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:12,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["transform","translate(-0.85, 0.2) scale(0.99)"],["fill","#7f7f7f","fill-rule","evenodd","clip-rule","evenodd","d","M20.988 10.265c.382-.596.951-1.424 1.844-2.71C25.462 3.61 23.456 0 18 0c-6.263 0-10.09 5.649-6.835 11.923-.594-.382-1.416-.948-2.682-1.826-3.945-2.63-7.555-.625-7.555 4.832 0 6.308 5.73 10.145 12.057 6.763-.383.599-.958 1.436-1.872 2.753C8.485 28.39 10.49 32 15.947 32c6.267 0 10.095-5.655 6.83-11.932.593.382 1.412.946 2.668 1.818 3.945 2.63 7.555.625 7.555-4.832 0-6.293-5.703-10.127-12.012-6.788Zm-.407 2.602C26.101 8.924 31 11.805 31 17.053c0 3.877-1.845 4.902-4.445 3.169-2.525-1.761-3.46-2.385-4.406-2.763a7.87 7.87 0 0 0-1.01-.317c.105-.382.161-.785.161-1.2 0-1.327-.919-3.134-.919-3.134ZM18.405 10.85c.378-.946 1.001-1.88 2.763-4.405C22.902 3.845 21.877 2 18 2c-5.247 0-8.129 4.899-4.186 10.419 0 0 1.89-.919 3.186-.919.398 0 .783.052 1.15.149.064-.269.149-.533.255-.798ZM11.78 14.524c-.946-.378-1.88-1.001-4.405-2.763-2.6-1.734-4.445-.709-4.445 3.168 0 5.247 4.899 8.129 10.419 4.186 0 0-.848-1.812-.848-3.115 0-.416.057-.819.163-1.201a7.81 7.81 0 0 0-1.183-.275Zm3.763 6.625c-.378.946-1.001 1.88-2.763 4.405-1.734 2.6-.709 4.445 3.168 4.445 5.248 0 8.13-4.899 4.187-10.419 0 0-1.831.919-3.133.919-.416 0-.819-.057-1.201-.162a7.802 7.802 0 0 0-.258.812ZM17 19.5c-1.933 0-3.5-1.567-3.5-3.5s1.567-3.5 3.5-3.5 3.5 1.567 3.5 3.5-1.567 3.5-3.5 3.5Z",1,"fan-blades"],["cx","16","cy","16","r","3.6","stroke","#7f7f7f","stroke-width","2","fill","#1976d2","fill-opacity","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3)(5,"g",4),f(6,"path",5),c(),f(7,"circle",6),c()(),N(),s(8,"div",7),p(9),c(),h(10,Fl,2,2,"div",8)(11,Ll,2,3,"div",9),c()()),n&2){let a,m,A;U("accessory-on",((a=i.service().values)==null?null:a.On)||((a=i.service().values)==null?null:a.Active)),o(2),F(O(9,Il,(((m=i.service().values)==null?null:m.On)||((m=i.service().values)==null?null:m.Active))&&(!i.hasRotationDirection||i.hasRotationDirection&&((m=i.service().values)==null?null:m.RotationDirection)===0),(((m=i.service().values)==null?null:m.On)||((m=i.service().values)==null?null:m.Active))&&i.hasRotationDirection&&((m=i.service().values)==null?null:m.RotationDirection)===1)),y("aria-label",d(3,7,"accessories.core.fan")),o(7),v(i.service().customName||i.service().serviceName),o(),C((A=i.service().values)!=null&&A.On&&((A=i.service().values)!=null&&A.RotationSpeed)?10:11)}},dependencies:[J,w],styles:[".spin svg g .fan-blades{animation:_ngcontent-%COMP%_fa-spin 2s infinite linear;transform-origin:53.5% 50%} .spin-counter svg g .fan-blades{animation:_ngcontent-%COMP%_fa-spin-counter 2s infinite linear;transform-origin:53.5% 50%}@keyframes _ngcontent-%COMP%_fa-spin{0%{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_fa-spin-counter{0%{transform:rotate(0)}to{transform:rotate(-359deg)}}"]})}return e})();var ro=(()=>{class e extends ue{targetMode;setupComponent(){this.applySliderGradient("linear-gradient(to right, #d32f2f, #e69533, #42d672, #42d672)")}handleAccessoryUpdate(){}resetFilterLife(t){this.service().getCharacteristic("ResetFilterIndication").setValue(1),this.blurTarget(t)}static \u0275fac=(()=>{let t;return function(i){return(t||(t=pe(e)))(i||e)}})();static \u0275cmp=M({type:e,selectors:[["ng-component"]],features:[me],decls:16,vars:19,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mb-4"],[3,"min","max","step","disabled","ngModel"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mt-5","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"modal-footer"]],template:function(n,i){if(n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4)(6,"h6",5),p(7),l(8,"translate"),c(),f(9,"nouislider",6),s(10,"div",7),l(11,"translate"),s(12,"button",8),S("click",function(m){return i.resetFilterLife(m)}),p(13),l(14,"translate"),c()()(),f(15,"div",9),c()),n&2){let a,m;o(2),b("innerText",i.service().customName||i.service().serviceName),o(),y("aria-label",d(4,11,"form.button_close")),o(4),$("",d(8,13,"accessories.control.filter_level"),": ",(a=i.service().values)==null?null:a.FilterLifeLevel,"%"),o(2),b("min",0)("max",100)("step",1)("disabled",!0)("ngModel",(m=i.service().values)==null?null:m.FilterLifeLevel),o(),y("aria-label",d(11,15,"accessories.core.filter_maintenance")),o(3),g(" ",d(14,17,"form.button_reset")," ")}},dependencies:[ne,ae,se,le,w],encapsulation:2,changeDetection:0})}return e})();var Vl=(e,r)=>({replace:e,dirty:r});function Pl(e,r){e&1&&(p(0," \xB7 "),s(1,"span",27),p(2),l(3,"translate"),c()),e&2&&(o(2),v(d(3,1,"accessories.control.replace")))}var ao=(()=>{class e{$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});onClick(){if(!this.readyForControl())return;let t=this.$modal.open(ro,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-filter-maintenance"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:32,vars:13,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","16","cy","7","rx","11","ry","5","stroke","#7f7f7f","stroke-width","1.75","fill","#4caf50","fill-opacity","0.5",1,"status"],["cx","16","cy","7","rx","6","ry","2","stroke","#7f7f7f","stroke-width","1","fill","#e0e0e0","fill-opacity","1",1,"back"],["x1","5","y1","7","x2","5","y2","27.7","stroke","#7f7f7f","stroke-width","1.75"],["x1","27","y1","7","x2","27","y2","27.7","stroke","#7f7f7f","stroke-width","1.75"],["d","M4.7,27 A13,6.9 0 0,0 27.3,27","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["x1","7","y1","10","x2","7","y2","29","stroke","#7f7f7f","stroke-width","1"],["x1","9","y1","11","x2","9","y2","29","stroke","#7f7f7f","stroke-width","1"],["x1","11","y1","12","x2","11","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","13","y1","12","x2","13","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","15","y1","12","x2","15","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","17","y1","12","x2","17","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","19","y1","12","x2","19","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","21","y1","12","x2","21","y2","30","stroke","#7f7f7f","stroke-width","1"],["x1","23","y1","11","x2","23","y2","29","stroke","#7f7f7f","stroke-width","1"],["x1","25","y1","10","x2","25","y2","29","stroke","#7f7f7f","stroke-width","1"],["x1","11","y1","6","x2","11","y2","8","stroke","#7f7f7f","stroke-width","1"],["x1","13","y1","5","x2","13","y2","9","stroke","#7f7f7f","stroke-width","1"],["x1","15","y1","5","x2","15","y2","9","stroke","#7f7f7f","stroke-width","1"],["x1","17","y1","5","x2","17","y2","9","stroke","#7f7f7f","stroke-width","1"],["x1","19","y1","5","x2","19","y2","9","stroke","#7f7f7f","stroke-width","1"],["x1","21","y1","6","x2","21","y2","8","stroke","#7f7f7f","stroke-width","1"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"red-text"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"ellipse",4)(6,"ellipse",5)(7,"line",6)(8,"line",7)(9,"path",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24),c()(),N(),s(26,"div",25),p(27),c(),s(28,"div",26)(29,"span"),p(30),c(),h(31,Pl,4,3),c()()()),n&2){let a,m,A,z;F(O(10,Vl,((a=i.service().values)==null?null:a.FilterChangeIndication)===1||((a=i.service().values)==null?null:a.FilterLifeLevel)<10,((a=i.service().values)==null?null:a.FilterChangeIndication)!==1&&((a=i.service().values)==null?null:a.FilterLifeLevel)<50)),o(2),y("aria-label",d(3,8,"accessories.core.filter_maintenance")),o(25),v(i.service().customName||i.service().serviceName),o(2),U("red-text",((m=i.service().values)==null?null:m.FilterChangeIndication)===1),o(),g(" ",(A=i.service().values)==null?null:A.FilterLifeLevel,"% "),o(),C(((z=i.service().values)==null?null:z.FilterChangeIndication)===1?31:-1)}},dependencies:[J,w],styles:[".dirty svg .status{fill:#e69533!important} .replace svg .status{fill:#d32f2f!important} body.dark-mode svg .back{fill:#2b2b2b!important}"]})}return e})();var Ol=()=>[0,2,3,4],Nl=(e,r,t,n,i,a,m)=>({"accessory-on":e,opening:r,open:t,closing:n,closed:i,stopped:a,obstructed:m});function Hl(e,r){e&1&&(s(0,"div",30),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.obstructed")))}function Rl(e,r){e&1&&(s(0,"div",30),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.open")))}function $l(e,r){e&1&&(s(0,"div",31),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.closed")))}function Ul(e,r){e&1&&(s(0,"div",30),p(1),l(2,"translate"),c()),e&2&&(o(),g("",d(2,1,"accessories.control.opening"),"..."))}function Wl(e,r){e&1&&(s(0,"div",30),p(1),l(2,"translate"),c()),e&2&&(o(),g("",d(2,1,"accessories.control.closing"),"..."))}function Gl(e,r){e&1&&(s(0,"div",30),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.stopped")))}function jl(e,r){if(e&1&&h(0,Rl,3,3,"div",30)(1,$l,3,3,"div",31)(2,Ul,3,3,"div",30)(3,Wl,3,3,"div",30)(4,Gl,3,3,"div",30),e&2){let t,n=u();C((t=(t=n.service().values)==null?null:t.CurrentDoorState)===0?0:t===1?1:t===2?2:t===3?3:t===4?4:-1)}}function ql(e,r){e&1&&(s(0,"div",30),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.open")))}function zl(e,r){e&1&&(s(0,"div",31),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.closed")))}function Kl(e,r){if(e&1&&h(0,ql,3,3,"div",30)(1,zl,3,3,"div",31),e&2){let t,n=u();C((t=n.service().values)!=null&&t.On||(t=n.service().values)!=null&&t.Active?0:1)}}var so=(()=>{class e{service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&("TargetDoorState"in this.service().values?this.service().getCharacteristic("TargetDoorState").setValue(this.service().values.TargetDoorState?0:1):"On"in this.service().values?this.service().getCharacteristic("On").setValue(!this.service().values.On):"Active"in this.service().values&&this.service().getCharacteristic("Active").setValue(!this.service().values.Active))}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-garage-door-opener"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:35,vars:16,consts:[["tabindex","0",1,"accessory-box",3,"shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","15.5","cy","10.25","r","3","stroke","#7f7f7f","stroke-width","0.5","fill","#1976d2","fill-opacity","0.5",1,"window"],["x1","1","y1","12","x2","15","y2","1","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","31","y1","12","x2","16","y2","1","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["cx","15.5","cy","1.3","r","0.5","stroke","#7f7f7f","stroke-width","1.5"],["x1","3","y1","11","x2","3","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","29","y1","11","x2","29","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","3","y1","31","x2","6","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","26","y1","31","x2","29","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap","round"],["x1","6","y1","17","x2","6","y2","31","stroke","#7f7f7f","stroke-width","1.5","stroke-linecap",""],["x1","26","y1","17","x2","26","y2","31","stroke","#7f7f7f","stroke-width","1.5"],["x1","5.25","y1","17","x2","26.75","y2","17","stroke","#7f7f7f","stroke-width","1"],["x1","6.75","y1","18","x2","25.25","y2","18","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line1"],["x1","5.25","y1","19","x2","26.75","y2","19","stroke","#7f7f7f","stroke-width","1",1,"line","line2"],["x1","6.75","y1","20","x2","25.25","y2","20","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line3"],["x1","5.25","y1","21","x2","26.75","y2","21","stroke","#7f7f7f","stroke-width","1",1,"line","line4"],["x1","6.75","y1","22","x2","25.25","y2","22","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line5"],["x1","5.25","y1","23","x2","26.75","y2","23","stroke","#7f7f7f","stroke-width","1",1,"line","line6"],["x1","6.75","y1","24","x2","25.25","y2","24","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line7"],["x1","5.25","y1","25","x2","26.75","y2","25","stroke","#7f7f7f","stroke-width","1",1,"line","line8"],["x1","6.75","y1","26","x2","25.25","y2","26","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line9"],["x1","5.25","y1","27","x2","26.75","y2","27","stroke","#7f7f7f","stroke-width","1",1,"line","line10"],["x1","6.75","y1","28","x2","25.25","y2","28","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line11"],["x1","5.25","y1","29","x2","26.75","y2","29","stroke","#7f7f7f","stroke-width","1",1,"line","line12"],["x1","6.75","y1","30","x2","25.25","y2","30","stroke","#1976d2","stroke-width","1","stroke-opacity","0.5",1,"line","line13"],["x1","5.25","y1","31","x2","26.75","y2","31","stroke","#7f7f7f","stroke-width","1",1,"line","line14"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"circle",4)(6,"line",5)(7,"line",6)(8,"circle",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24)(26,"line",25)(27,"line",26)(28,"line",27)(29,"line",28),c()(),N(),s(30,"div",29),p(31),c(),h(32,Hl,3,3,"div",30)(33,jl,5,1)(34,Kl,2,1),c()()),n&2){let a,m;F(Cn(8,Nl,((a=i.service().values)==null?null:a.ObstructionDetected)||be(7,Ol).includes((a=i.service().values)==null?null:a.CurrentDoorState)||((a=i.service().values)==null?null:a.On)||((a=i.service().values)==null?null:a.Active),((a=i.service().values)==null?null:a.CurrentDoorState)===2&&!((a=i.service().values)!=null&&a.ObstructionDetected),((a=i.service().values)==null?null:a.CurrentDoorState)===0&&!((a=i.service().values)!=null&&a.ObstructionDetected),((a=i.service().values)==null?null:a.CurrentDoorState)===3&&!((a=i.service().values)!=null&&a.ObstructionDetected),((a=i.service().values)==null?null:a.CurrentDoorState)===1&&!((a=i.service().values)!=null&&a.ObstructionDetected),((a=i.service().values)==null?null:a.CurrentDoorState)===4&&!((a=i.service().values)!=null&&a.ObstructionDetected),(a=i.service().values)==null?null:a.ObstructionDetected)),o(2),y("aria-label",d(3,5,"accessories.core.garage_door_opener")),o(29),v(i.service().customName||i.service().serviceName),o(),C((m=i.service().values)!=null&&m.ObstructionDetected?32:"CurrentDoorState"in i.service().values?33:34)}},dependencies:[J,w],styles:[".opening svg .window{fill:#ff9800!important;fill-opacity:.5!important} .opening svg .line{animation:_ngcontent-%COMP%_fade-out .5s ease-in-out forwards} .opening svg .line1{animation-delay:9.282s} .opening svg .line2{animation-delay:8.568s} .opening svg .line3{animation-delay:7.854s} .opening svg .line4{animation-delay:7.14s} .opening svg .line5{animation-delay:6.426s} .opening svg .line6{animation-delay:5.712s} .opening svg .line7{animation-delay:4.998s} .opening svg .line8{animation-delay:4.284s} .opening svg .line9{animation-delay:3.57s} .opening svg .line10{animation-delay:2.856s} .opening svg .line11{animation-delay:2.142s} .opening svg .line12{animation-delay:1.428s} .opening svg .line13{animation-delay:.714s} .opening svg .line14{animation-delay:0s}@keyframes _ngcontent-%COMP%_fade-out{to{opacity:0}} .open .window{fill:#d32f2f!important;fill-opacity:.5!important} .open .line{opacity:0} .closing svg .window{fill:#ff9800!important;fill-opacity:.5!important} .closing svg .line{opacity:0;animation:_ngcontent-%COMP%_fade-in .5s ease-in-out forwards} .closing svg .line1{animation-delay:0s} .closing svg .line2{animation-delay:.714s} .closing svg .line3{animation-delay:1.428s} .closing svg .line4{animation-delay:2.142s} .closing svg .line5{animation-delay:2.856s} .closing svg .line6{animation-delay:3.57s} .closing svg .line7{animation-delay:4.284s} .closing svg .line8{animation-delay:4.998s} .closing svg .line9{animation-delay:5.712s} .closing svg .line10{animation-delay:6.426s} .closing svg .line11{animation-delay:7.14s} .closing svg .line12{animation-delay:7.854s} .closing svg .line13{animation-delay:8.568s} .closing svg .line14{animation-delay:9.282s}@keyframes _ngcontent-%COMP%_fade-in{to{opacity:1}} .closed .window{fill:#4caf50!important;fill-opacity:.5!important} .closed .line{opacity:1} .stopped .window{fill:#d32f2f!important} .stopped .line7, .stopped .line8, .stopped .line9, .stopped .line10, .stopped .line11, .stopped .line12, .stopped .line13, .stopped .line14{opacity:0} .obstructed .window{animation:_ngcontent-%COMP%_flash 2s infinite;fill:#d32f2f!important}@keyframes _ngcontent-%COMP%_flash{0%,to{fill-opacity:.5}50%{fill-opacity:.1}} .obstructed .line7, .obstructed .line8, .obstructed .line9, .obstructed .line10, .obstructed .line11, .obstructed .line12, .obstructed .line13, .obstructed .line14{opacity:0}"]})}return e})();var Rt=(e,r)=>({"fa-check-circle":e,"fa-blank":r});function Zl(e,r){if(e&1){let t=j();s(0,"button",8),S("click",function(i){V(t);let a=u(2);return P(a.setTargetMode(0,i))}),s(1,"div",9),f(2,"i",10),c(),p(3),l(4,"translate"),s(5,"div",11),f(6,"i",12),c()()}if(e&2){let t=u(2);o(2),F(O(5,Rt,t.targetMode===0,t.targetMode!==0)),o(),g(" ",d(4,3,"accessories.control.auto")," ")}}function Yl(e,r){if(e&1){let t=j();s(0,"button",8),S("click",function(i){V(t);let a=u(2);return P(a.setTargetMode(1,i))}),s(1,"div",9),f(2,"i",10),c(),p(3),l(4,"translate"),s(5,"div",11),f(6,"i",12),c()()}if(e&2){let t=u(2);o(2),F(O(5,Rt,t.targetMode===1,t.targetMode!==1)),o(),g(" ",d(4,3,"accessories.control.heat")," ")}}function Ql(e,r){if(e&1){let t=j();s(0,"button",8),S("click",function(i){V(t);let a=u(2);return P(a.setTargetMode(2,i))}),s(1,"div",9),f(2,"i",10),c(),p(3),l(4,"translate"),s(5,"div",11),f(6,"i",12),c()()}if(e&2){let t=u(2);o(2),F(O(5,Rt,t.targetMode===2,t.targetMode!==2)),o(),g(" ",d(4,3,"accessories.control.cool")," ")}}function Jl(e,r){if(e&1&&(s(0,"h6",14),p(1),l(2,"translate"),c(),s(3,"div",15),l(4,"translate"),h(5,Zl,7,8,"button",16),h(6,Yl,7,8,"button",16),h(7,Ql,7,8,"button",16),c()),e&2){let t=u();o(),v(d(2,5,"accessories.control.mode")),o(2),y("aria-label",d(4,7,"accessories.control.mode_control")),o(2),C(t.targetStateValidValues.includes(0)?5:-1),o(),C(t.targetStateValidValues.includes(1)?6:-1),o(),C(t.targetStateValidValues.includes(2)?7:-1)}}function Xl(e,r){if(e&1){let t=j();s(0,"h6",17),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),l(6,"convertTemp"),l(7,"number"),l(8,"uppercase"),c(),s(9,"nouislider",18),Q("ngModelChange",function(i){V(t);let a=u(2);return Y(a.autoTemp,i)||(a.autoTemp=i),P(i)}),S("ngModelChange",function(){V(t);let i=u(2);return P(i.onAutoTemperatureStateChange())}),c()}if(e&2){let t=u(2);o(),Mt(" ",d(2,9,"accessories.control.target_auto"),": ",ce(4,13,d(3,11,t.autoTemp[0]),"1.0-1"),"\xB0",d(5,16,t.temperatureUnits)," - ",ce(7,20,d(6,18,t.autoTemp[1]),"1.0-1"),"\xB0",d(8,23,t.temperatureUnits)," "),o(8),b("min",t.HeatingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),Z("ngModel",t.autoTemp)}}function ec(e,r){if(e&1){let t=j();s(0,"h6",14),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),c(),s(6,"nouislider",18),Q("ngModelChange",function(i){V(t);let a=u(2);return Y(a.targetHeatingTemp,i)||(a.targetHeatingTemp=i),P(i)}),S("ngModelChange",function(){V(t);let i=u(2);return P(i.onTemperatureStateChange())}),c()}if(e&2){let t=u(2);o(),Je(" ",d(2,7,"accessories.control.target_auto"),": ",ce(4,11,d(3,9,t.targetHeatingTemp),"1.0-1"),"\xB0",d(5,14,t.temperatureUnits)," "),o(5),b("min",t.HeatingThresholdTemperature.minValue)("max",t.HeatingThresholdTemperature.maxValue)("step",t.HeatingThresholdTemperature.minStep),Z("ngModel",t.targetHeatingTemp)}}function tc(e,r){if(e&1){let t=j();s(0,"h6",14),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),c(),s(6,"nouislider",18),Q("ngModelChange",function(i){V(t);let a=u(2);return Y(a.targetCoolingTemp,i)||(a.targetCoolingTemp=i),P(i)}),S("ngModelChange",function(){V(t);let i=u(2);return P(i.onTemperatureStateChange())}),c()}if(e&2){let t=u(2);o(),Je(" ",d(2,7,"accessories.control.target_auto"),": ",ce(4,11,d(3,9,t.targetCoolingTemp),"1.0-1"),"\xB0",d(5,14,t.temperatureUnits)," "),o(5),b("min",t.CoolingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),Z("ngModel",t.targetCoolingTemp)}}function ic(e,r){if(e&1&&h(0,Xl,10,25)(1,ec,7,16)(2,tc,7,16),e&2){let t=u();C(t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?0:t.HeatingThresholdTemperature&&!t.CoolingThresholdTemperature?1:!t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?2:-1)}}var lo=(()=>{class e extends ue{$settings=D(Te);type=B.required({});temperatureUnits=this.$settings.env.temperatureUnits;targetState;targetMode;targetTemperatureChanged=new ee;targetStateValidValues=[];CoolingThresholdTemperature;HeatingThresholdTemperature;targetCoolingTemp;targetHeatingTemp;autoTemp;setupComponent(){this.createDebouncedSubscription(this.targetTemperatureChanged,()=>{this.HeatingThresholdTemperature&&this.service().getCharacteristic("HeatingThresholdTemperature").setValue(this.targetHeatingTemp),this.CoolingThresholdTemperature&&this.service().getCharacteristic("CoolingThresholdTemperature").setValue(this.targetCoolingTemp)}),this.targetState=this.service().values.Active,this.targetMode=this.service().values.TargetHeaterCoolerState,this.CoolingThresholdTemperature=this.service().getCharacteristic("CoolingThresholdTemperature"),this.HeatingThresholdTemperature=this.service().getCharacteristic("HeatingThresholdTemperature"),this.targetStateValidValues=this.service().getCharacteristic("TargetHeaterCoolerState").validValues,this.loadTargetTemperature(),this.applySliderGradient("linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))")}handleAccessoryUpdate(){this.targetState=this.service().values.Active,this.targetMode=this.service().values.TargetHeaterCoolerState,this.targetCoolingTemp=this.service().getCharacteristic("CoolingThresholdTemperature")?.value,this.targetHeatingTemp=this.service().getCharacteristic("HeatingThresholdTemperature")?.value,this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.applySliderGradient("linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))")}setTargetState(t,n){this.targetState=t,this.service().getCharacteristic("Active").setValue(this.targetState),this.loadTargetTemperature(),this.blurTarget(n)}setTargetMode(t,n){this.targetMode=t,this.service().getCharacteristic("TargetHeaterCoolerState").setValue(this.targetMode),this.loadTargetTemperature(),this.blurTarget(n),this.applySliderGradient("linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))")}onTemperatureStateChange(){this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.targetTemperatureChanged.next(void 0)}onAutoTemperatureStateChange(){this.targetHeatingTemp=this.autoTemp[0],this.targetCoolingTemp=this.autoTemp[1],this.targetTemperatureChanged.next(void 0)}loadTargetTemperature(){this.targetCoolingTemp=this.service().getCharacteristic("CoolingThresholdTemperature")?.value,this.targetHeatingTemp=this.service().getCharacteristic("HeatingThresholdTemperature")?.value,this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp]}static \u0275fac=(()=>{let t;return function(i){return(t||(t=pe(e)))(i||e)}})();static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{type:[1,"type"]},features:[me],decls:31,vars:36,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mt-2","mb-4","fs-4"],[1,"fas","fa-temperature-full"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[1,"mt-4","mb-1"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(n,i){if(n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4)(6,"h6",5),f(7,"i",6),p(8),l(9,"convertTemp"),l(10,"number"),l(11,"uppercase"),c(),s(12,"div",7),l(13,"translate"),s(14,"button",8),S("click",function(m){return i.setTargetState(0,m)}),s(15,"div",9),f(16,"i",10),c(),p(17),l(18,"translate"),s(19,"div",11),f(20,"i",12),c()(),s(21,"button",8),S("click",function(m){return i.setTargetState(1,m)}),s(22,"div",9),f(23,"i",10),c(),p(24),l(25,"translate"),s(26,"div",11),f(27,"i",12),c()()(),h(28,Jl,8,9),h(29,ic,3,1),c(),f(30,"div",13),c()),n&2){let a,m;o(2),b("innerText",i.service().customName||i.service().serviceName),o(),y("aria-label",d(4,15,"form.button_close")),o(4),st("color",((a=i.service().values)==null?null:a.CurrentHeaterCoolerState)===3&&((a=i.service().values)==null?null:a.Active)===1||i.type()==="cooler"&&((a=i.service().values)!=null&&a.Active||(a=i.service().values)!=null&&a.On)?"#1e8bbd":((a=i.service().values)==null?null:a.CurrentHeaterCoolerState)===2&&((a=i.service().values)==null?null:a.Active)===1||i.type()==="heater"&&((a=i.service().values)!=null&&a.Active||(a=i.service().values)!=null&&a.On)?"#e69533":(a=i.service().values)!=null&&a.Active||(a=i.service().values)!=null&&a.On?"#42d672":"#7b7b7b"),o(),$("",ce(10,19,d(9,17,(m=i.service().values)==null?null:m.CurrentTemperature),"1.0-1"),"\xB0",d(11,22,i.temperatureUnits)," "),o(4),y("aria-label",d(13,24,"accessories.control.state_control")),o(4),F(O(30,Rt,i.targetState===0,i.targetState!==0)),o(),g(" ",d(18,26,"accessories.control.off")," "),o(6),F(O(33,Rt,i.targetState===1,i.targetState!==1)),o(),g(" ",d(25,28,"accessories.control.on")," "),o(4),C(i.targetStateValidValues.length?28:-1),o(),C(i.targetStateValidValues.includes(0)?29:-1)}},dependencies:[ne,ae,se,le,Ee,w,Ve,He],encapsulation:2,changeDetection:0})}return e})();function nc(e,r){if(e&1&&(I(),s(0,"text",23),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase"),c()),e&2){let t,n=u();o(),$(" ",ce(3,4,d(2,2,(t=n.service().values)==null?null:t.CurrentTemperature),"1.0-1"),"\xB0",d(4,7,n.temperatureUnits)," ")}}function oc(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.off")," ")}function rc(e,r){if(e&1&&(f(0,"i",26),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase"),l(5,"convertTemp"),l(6,"number"),l(7,"uppercase")),e&2){let t,n=u(2);o(),vn(" ",ce(3,6,d(2,4,(t=n.service().values)==null?null:t.HeatingThresholdTemperature),"1.0-1"),"\xB0",d(4,9,n.temperatureUnits)," - ",ce(6,13,d(5,11,(t=n.service().values)==null?null:t.CoolingThresholdTemperature),"1.0-1"),"\xB0",d(7,16,n.temperatureUnits)," ")}}function ac(e,r){if(e&1&&(f(0,"i",26),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase")),e&2){let t,n=u(2);o(),$(" ",ce(3,4,d(2,2,(t=n.service().values)==null?null:t.HeatingThresholdTemperature),"1.0-1"),"\xB0",d(4,7,n.temperatureUnits)," ")}}function sc(e,r){if(e&1&&(f(0,"i",26),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase")),e&2){let t,n=u(2);o(),$(" ",ce(3,4,d(2,2,(t=n.service().values)==null?null:t.CoolingThresholdTemperature),"1.0-1"),"\xB0",d(4,7,n.temperatureUnits)," ")}}function lc(e,r){if(e&1&&h(0,rc,8,18)(1,ac,5,9)(2,sc,5,9),e&2){let t=u();C(t.hasHeating&&t.hasCooling?0:t.hasHeating&&!t.hasCooling?1:!t.hasHeating&&t.hasCooling?2:-1)}}function cc(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.heat")," ")}function dc(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.cool")," ")}function pc(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.on")," ")}var co=(()=>{class e{$modal=D(X);$settings=D(Te);$accessories=D(ie);service=B.required({});readyForControl=B(!1,{});type=B.required({});temperatureUnits=this.$settings.env.temperatureUnits;hasHeating=!1;hasCooling=!1;ngOnInit(){this.hasHeating="HeatingThresholdTemperature"in this.service().values,this.hasCooling="CoolingThresholdTemperature"in this.service().values}onClick(){this.readyForControl()&&("Active"in this.service().values?this.service().getCharacteristic("Active").setValue(this.service().values.Active?0:1):"On"in this.service().values&&this.service().getCharacteristic("On").setValue(!this.service().values.On))}onLongClick(){if(this.readyForControl()&&"TargetHeaterCoolerState"in this.service().values){let t=this.$modal.open(lo,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.type=this.type,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-heater-cooler"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"],type:[1,"type"]},decls:36,vars:9,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","coolingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#1e8bbd"],["attributeName","stop-color","values","#1e8bbd;#66d6d6;#1e8bbd","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#66d6d6"],["attributeName","stop-color","values","#66d6d6;#1e8bbd;#66d6d6","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#1e8bbd"],["id","heatingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#cc5e00"],["attributeName","stop-color","values","#cc5e00;#e69533;#cc5e00;#e69533","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#e69533"],["attributeName","stop-color","values","#e69533;#cc5e00;#e69533;#cc5e00","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#cc5e00"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x1","8","y1","7","x2","8","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","12","y1","7","x2","12","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","16","y1","7","x2","16","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","20","y1","7","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","24","y1","7","x2","24","y2","16","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x","3.5","y","4","width","25","height","15","rx","0","stroke","#7f7f7f","stroke-width","1.2","fill-opacity","0.5"],["x","16","y","27.5","font-size","7","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"fa","fas","fa-bullseye"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),f(8,"animate",6),c(),s(9,"stop",7),f(10,"animate",8),c(),s(11,"stop",9),f(12,"animate",6),c()(),s(13,"linearGradient",10)(14,"stop",11),f(15,"animate",12),c(),s(16,"stop",13),f(17,"animate",14),c(),s(18,"stop",15),f(19,"animate",12),c()()(),f(20,"rect",16)(21,"line",17)(22,"line",18)(23,"line",19)(24,"line",20)(25,"line",21)(26,"rect",22),h(27,nc,5,9,":svg:text",23),c()(),N(),s(28,"div",24),p(29),c(),s(30,"div",25),h(31,oc,2,3)(32,lc,3,1)(33,cc,2,3)(34,dc,2,3)(35,pc,2,3),c()()()),n&2){let a,m,A;U("accessory-on",((a=i.service().values)==null?null:a.Active)||((a=i.service().values)==null?null:a.On)),o(2),y("aria-label",d(3,7,"accessories.core.heater_cooler")),o(24),y("fill",((m=i.service().values)==null?null:m.CurrentHeaterCoolerState)===3&&((m=i.service().values)==null?null:m.Active)===1||i.type()==="cooler"&&((m=i.service().values)!=null&&m.Active||(m=i.service().values)!=null&&m.On)?"url(#coolingGradient)":((m=i.service().values)==null?null:m.CurrentHeaterCoolerState)===2&&((m=i.service().values)==null?null:m.Active)===1||i.type()==="heater"&&((m=i.service().values)!=null&&m.Active||(m=i.service().values)!=null&&m.On)?"url(#heatingGradient)":(m=i.service().values)!=null&&m.Active||(m=i.service().values)!=null&&m.On?"#42d672":"#7b7b7b"),o(),C("CurrentTemperature"in i.service().values?27:-1),o(2),v(i.service().customName||i.service().serviceName),o(2),C("Active"in i.service().values&&!((A=i.service().values)!=null&&A.Active)||"On"in i.service().values&&!((A=i.service().values)!=null&&A.On)?31:((A=i.service().values)==null?null:A.TargetHeaterCoolerState)===0&&(i.hasHeating||i.hasCooling)?32:((A=i.service().values)==null?null:A.TargetHeaterCoolerState)===1?33:((A=i.service().values)==null?null:A.TargetHeaterCoolerState)===2?34:35)}},dependencies:[J,Ee,w,Ve,He],encapsulation:2})}return e})();var $t=(e,r)=>({"fa-check-circle":e,"fa-blank":r});function mc(e,r){if(e&1){let t=j();s(0,"button",8),S("click",function(i){V(t);let a=u(2);return P(a.setTargetMode(0,i))}),s(1,"div",9),f(2,"i",10),c(),p(3),l(4,"translate"),s(5,"div",11),f(6,"i",12),c()()}if(e&2){let t=u(2);o(2),F(O(5,$t,t.targetMode===0,t.targetMode!==0)),o(),g(" ",d(4,3,"accessories.control.auto")," ")}}function uc(e,r){if(e&1){let t=j();s(0,"button",8),S("click",function(i){V(t);let a=u(2);return P(a.setTargetMode(1,i))}),s(1,"div",9),f(2,"i",10),c(),p(3),l(4,"translate"),s(5,"div",11),f(6,"i",12),c()()}if(e&2){let t=u(2);o(2),F(O(5,$t,t.targetMode===1,t.targetMode!==1)),o(),g(" ",d(4,3,"accessories.control.humidify")," ")}}function fc(e,r){if(e&1){let t=j();s(0,"button",8),S("click",function(i){V(t);let a=u(2);return P(a.setTargetMode(2,i))}),s(1,"div",9),f(2,"i",10),c(),p(3),l(4,"translate"),s(5,"div",11),f(6,"i",12),c()()}if(e&2){let t=u(2);o(2),F(O(5,$t,t.targetMode===2,t.targetMode!==2)),o(),g(" ",d(4,3,"accessories.control.dehumidify")," ")}}function vc(e,r){if(e&1&&(s(0,"h6",14),p(1),l(2,"translate"),c(),s(3,"div",15),l(4,"translate"),h(5,mc,7,8,"button",16),h(6,uc,7,8,"button",16),h(7,fc,7,8,"button",16),c()),e&2){let t=u();o(),v(d(2,5,"accessories.control.mode")),o(2),y("aria-label",d(4,7,"accessories.control.mode_control")),o(2),C(t.targetStateValidValues.includes(0)?5:-1),o(),C(t.targetStateValidValues.includes(1)?6:-1),o(),C(t.targetStateValidValues.includes(2)?7:-1)}}function gc(e,r){if(e&1){let t=j();s(0,"h6",14),p(1),l(2,"translate"),c(),s(3,"nouislider",17),Q("ngModelChange",function(i){V(t);let a=u(2);return Y(a.autoHumidity,i)||(a.autoHumidity=i),P(i)}),S("ngModelChange",function(){V(t);let i=u(2);return P(i.onAutoHumidityStateChange())}),c()}if(e&2){let t=u(2);o(),Je(" ",d(2,7,"accessories.control.target_auto"),": ",t.autoHumidity[0],"% - ",t.autoHumidity[1],"% "),o(2),b("min",t.RelativeHumidityHumidifierThreshold.minValue)("max",t.RelativeHumidityDehumidifierThreshold.maxValue)("step",t.RelativeHumidityDehumidifierThreshold.minStep),Z("ngModel",t.autoHumidity)}}function hc(e,r){if(e&1){let t=j();s(0,"h6",14),p(1),l(2,"translate"),c(),s(3,"nouislider",17),Q("ngModelChange",function(i){V(t);let a=u(2);return Y(a.targetHumidifierHumidity,i)||(a.targetHumidifierHumidity=i),P(i)}),S("ngModelChange",function(){V(t);let i=u(2);return P(i.onHumidityStateChange())}),c()}if(e&2){let t=u(2);o(),$("",d(2,6,"accessories.control.target_auto"),": ",t.targetHumidifierHumidity,"%"),o(2),b("min",t.RelativeHumidityHumidifierThreshold.minValue)("max",t.RelativeHumidityHumidifierThreshold.maxValue)("step",t.RelativeHumidityHumidifierThreshold.minStep),Z("ngModel",t.targetHumidifierHumidity)}}function Cc(e,r){if(e&1){let t=j();s(0,"h6",14),p(1),l(2,"translate"),c(),s(3,"nouislider",17),Q("ngModelChange",function(i){V(t);let a=u(2);return Y(a.targetDehumidifierHumidity,i)||(a.targetDehumidifierHumidity=i),P(i)}),S("ngModelChange",function(){V(t);let i=u(2);return P(i.onHumidityStateChange())}),c()}if(e&2){let t=u(2);o(),$("",d(2,6,"accessories.control.target_auto"),": ",t.targetDehumidifierHumidity,"%"),o(2),b("min",t.RelativeHumidityDehumidifierThreshold.minValue)("max",t.RelativeHumidityDehumidifierThreshold.maxValue)("step",t.RelativeHumidityDehumidifierThreshold.minStep),Z("ngModel",t.targetDehumidifierHumidity)}}function _c(e,r){if(e&1&&h(0,gc,4,9)(1,hc,4,8)(2,Cc,4,8),e&2){let t=u();C(t.RelativeHumidityHumidifierThreshold&&t.RelativeHumidityDehumidifierThreshold?0:t.RelativeHumidityHumidifierThreshold&&!t.RelativeHumidityDehumidifierThreshold?1:!t.RelativeHumidityHumidifierThreshold&&t.RelativeHumidityDehumidifierThreshold?2:-1)}}var po=(()=>{class e extends ue{type=B.required({});targetState;targetMode;targetHumidityChanged=new ee;targetStateValidValues=[];RelativeHumidityDehumidifierThreshold;RelativeHumidityHumidifierThreshold;targetDehumidifierHumidity;targetHumidifierHumidity;autoHumidity;setupComponent(){this.createDebouncedSubscription(this.targetHumidityChanged,()=>{this.RelativeHumidityHumidifierThreshold&&this.service().getCharacteristic("RelativeHumidityHumidifierThreshold").setValue(this.targetHumidifierHumidity),this.RelativeHumidityDehumidifierThreshold&&this.service().getCharacteristic("RelativeHumidityDehumidifierThreshold").setValue(this.targetDehumidifierHumidity)}),this.targetState=this.service().values.Active,this.targetMode=this.service().values.TargetHumidifierDehumidifierState,this.RelativeHumidityDehumidifierThreshold=this.service().getCharacteristic("RelativeHumidityDehumidifierThreshold"),this.RelativeHumidityHumidifierThreshold=this.service().getCharacteristic("RelativeHumidityHumidifierThreshold"),this.targetStateValidValues=this.service().getCharacteristic("TargetHumidifierDehumidifierState").validValues,this.loadTargetHumidity(),this.applySliderGradient("linear-gradient(to left, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))")}handleAccessoryUpdate(){this.targetState=this.service().values.Active,this.targetMode=this.service().values.TargetHumidifierDehumidifierState,this.targetDehumidifierHumidity=this.service().getCharacteristic("RelativeHumidityDehumidifierThreshold")?.value,this.targetHumidifierHumidity=this.service().getCharacteristic("RelativeHumidityHumidifierThreshold")?.value,this.autoHumidity=[this.targetHumidifierHumidity,this.targetDehumidifierHumidity],this.applySliderGradient("linear-gradient(to left, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))")}loadTargetHumidity(){this.targetDehumidifierHumidity=this.service().getCharacteristic("RelativeHumidityDehumidifierThreshold")?.value,this.targetHumidifierHumidity=this.service().getCharacteristic("RelativeHumidityHumidifierThreshold")?.value,this.autoHumidity=[this.targetHumidifierHumidity,this.targetDehumidifierHumidity]}setTargetState(t,n){this.targetState=t,this.service().getCharacteristic("Active").setValue(this.targetState),this.loadTargetHumidity(),this.blurTarget(n)}setTargetMode(t,n){this.targetMode=t,this.service().getCharacteristic("TargetHumidifierDehumidifierState").setValue(this.targetMode),this.loadTargetHumidity(),this.blurTarget(n),this.applySliderGradient("linear-gradient(to left, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))")}onHumidityStateChange(){this.autoHumidity=[this.targetHumidifierHumidity,this.targetDehumidifierHumidity],this.targetHumidityChanged.next(void 0)}onAutoHumidityStateChange(){this.targetHumidifierHumidity=this.autoHumidity[0],this.targetDehumidifierHumidity=this.autoHumidity[1],this.targetHumidityChanged.next(void 0)}static \u0275fac=(()=>{let t;return function(i){return(t||(t=pe(e)))(i||e)}})();static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{type:[1,"type"]},features:[me],decls:28,vars:28,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mt-2","mb-4","fs-4"],[1,"fas","fa-temperature-full"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(n,i){if(n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4)(6,"h6",5),f(7,"i",6),p(8),c(),s(9,"div",7),l(10,"translate"),s(11,"button",8),S("click",function(m){return i.setTargetState(0,m)}),s(12,"div",9),f(13,"i",10),c(),p(14),l(15,"translate"),s(16,"div",11),f(17,"i",12),c()(),s(18,"button",8),S("click",function(m){return i.setTargetState(1,m)}),s(19,"div",9),f(20,"i",10),c(),p(21),l(22,"translate"),s(23,"div",11),f(24,"i",12),c()()(),h(25,vc,8,9),h(26,_c,3,1),c(),f(27,"div",13),c()),n&2){let a,m;o(2),b("innerText",i.service().customName||i.service().serviceName),o(),y("aria-label",d(4,14,"form.button_close")),o(4),st("color",((a=i.service().values)==null?null:a.CurrentHumidifierDehumidifierState)===2&&((a=i.service().values)==null?null:a.Active)===1||i.type()==="humidifier"&&((a=i.service().values)!=null&&a.Active||(a=i.service().values)!=null&&a.On)?"#1e8bbd":((a=i.service().values)==null?null:a.CurrentHumidifierDehumidifierState)===3&&((a=i.service().values)==null?null:a.Active)===1||i.type()==="dehumidifier"&&((a=i.service().values)!=null&&a.Active||(a=i.service().values)!=null&&a.On)?"#e69533":(a=i.service().values)!=null&&a.Active||(a=i.service().values)!=null&&a.On?"#42d672":"#7b7b7b"),o(),g("",(m=i.service().values)==null?null:m.CurrentRelativeHumidity,"% "),o(),y("aria-label",d(10,16,"accessories.control.state_control")),o(4),F(O(22,$t,i.targetState===0,i.targetState!==0)),o(),g(" ",d(15,18,"accessories.control.off")," "),o(6),F(O(25,$t,i.targetState===1,i.targetState!==1)),o(),g(" ",d(22,20,"accessories.control.on")," "),o(4),C(i.targetStateValidValues.length?25:-1),o(),C(i.targetStateValidValues.includes(0)?26:-1)}},dependencies:[ne,ae,se,le,w],encapsulation:2,changeDetection:0})}return e})();function yc(e,r){if(e&1&&(I(),s(0,"text",36),p(1),c()),e&2){let t,n=u();o(),g(" ",(t=n.service().values)==null?null:t.CurrentRelativeHumidity,"% ")}}function xc(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.off")," ")}function Sc(e,r){if(e&1&&(f(0,"i",39),p(1)),e&2){let t,n=u(2);o(),$(" ",(t=n.service().values)==null?null:t.RelativeHumidityHumidifierThreshold,"% - ",(t=n.service().values)==null?null:t.RelativeHumidityDehumidifierThreshold,"% ")}}function kc(e,r){if(e&1&&(f(0,"i",39),p(1)),e&2){let t,n=u(2);o(),g(" ",(t=n.service().values)==null?null:t.RelativeHumidityHumidifierThreshold,"% ")}}function bc(e,r){if(e&1&&(f(0,"i",39),p(1)),e&2){let t,n=u(2);o(),g(" ",(t=n.service().values)==null?null:t.RelativeHumidityDehumidifierThreshold,"% ")}}function Tc(e,r){if(e&1&&h(0,Sc,2,2)(1,kc,2,1)(2,bc,2,1),e&2){let t=u();C(t.hasHumidifier&&t.hasDehumidifier?0:t.hasHumidifier&&!t.hasDehumidifier?1:!t.hasHumidifier&&t.hasDehumidifier?2:-1)}}function Mc(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.humidify")," ")}function Bc(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.dehumidify")," ")}function wc(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.on")," ")}function Ec(e,r){if(e&1&&h(0,Bc,2,3)(1,wc,2,3),e&2){let t,n=u();C(((t=n.service().values)==null?null:t.TargetHumidifierDehumidifierState)===2?0:1)}}var mo=(()=>{class e{$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});type=B.required({});hasHumidifier=!1;hasDehumidifier=!1;ngOnInit(){this.hasHumidifier="RelativeHumidityHumidifierThreshold"in this.service().values,this.hasDehumidifier="RelativeHumidityDehumidifierThreshold"in this.service().values}onClick(){this.readyForControl()&&("Active"in this.service().values?this.service().getCharacteristic("Active").setValue(this.service().values.Active?0:1):"On"in this.service().values&&this.service().getCharacteristic("On").setValue(!this.service().values.On))}onLongClick(){if(this.readyForControl()&&"TargetHumidifierDehumidifierState"in this.service().values){let t=this.$modal.open(po,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.type=this.type,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-humidifier-dehumidifier"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"],type:[1,"type"]},decls:48,vars:9,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","humidifyingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#1e8bbd"],["attributeName","stop-color","values","#1e8bbd;#66d6d6;#1e8bbd","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#66d6d6"],["attributeName","stop-color","values","#66d6d6;#1e8bbd;#66d6d6","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#1e8bbd"],["id","dehumidifyingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#cc5e00"],["attributeName","stop-color","values","#cc5e00;#e69533;#cc5e00;#e69533","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#e69533"],["attributeName","stop-color","values","#e69533;#cc5e00;#e69533;#cc5e00","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#cc5e00"],["x","1","y","3.5","width","30","height","25","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x1","6","y1","10","x2","6","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","6","y1","12","x2","6","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","6","y1","14","x2","6","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","10","y1","10","x2","10","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","10","y1","12","x2","10","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","10","y1","14","x2","10","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","14","y1","10","x2","14","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","14","y1","12","x2","14","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","14","y1","14","x2","14","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","18","y1","10","x2","18","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","18","y1","12","x2","18","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","18","y1","14","x2","18","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","22","y1","10","x2","22","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","22","y1","12","x2","22","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","22","y1","14","x2","22","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","26","y1","10","x2","26","y2","10","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","26","y1","12","x2","26","y2","12","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x1","26","y1","14","x2","26","y2","14","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["x","1","y","7","width","30","height","10","rx","0","stroke","#7f7f7f","stroke-width","1.2","fill-opacity","0.5"],["x","16.5","y","25.5","font-size","7","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"fa","fas","fa-bullseye"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),f(8,"animate",6),c(),s(9,"stop",7),f(10,"animate",8),c(),s(11,"stop",9),f(12,"animate",6),c()(),s(13,"linearGradient",10)(14,"stop",11),f(15,"animate",12),c(),s(16,"stop",13),f(17,"animate",14),c(),s(18,"stop",15),f(19,"animate",12),c()()(),f(20,"rect",16)(21,"line",17)(22,"line",18)(23,"line",19)(24,"line",20)(25,"line",21)(26,"line",22)(27,"line",23)(28,"line",24)(29,"line",25)(30,"line",26)(31,"line",27)(32,"line",28)(33,"line",29)(34,"line",30)(35,"line",31)(36,"line",32)(37,"line",33)(38,"line",34)(39,"rect",35),h(40,yc,2,1,":svg:text",36),c()(),N(),s(41,"div",37),p(42),c(),s(43,"div",38),h(44,xc,2,3)(45,Tc,3,1)(46,Mc,2,3)(47,Ec,2,1),c()()()),n&2){let a,m,A;U("accessory-on",((a=i.service().values)==null?null:a.Active)||((a=i.service().values)==null?null:a.On)),o(2),y("aria-label",d(3,7,"accessories.core.humidifier_dehumidifier")),o(37),y("fill",((m=i.service().values)==null?null:m.CurrentHumidifierDehumidifierState)===2&&((m=i.service().values)==null?null:m.Active)===1||i.type()==="humidifier"&&((m=i.service().values)!=null&&m.Active||(m=i.service().values)!=null&&m.On)?"url(#humidifyingGradient)":((m=i.service().values)==null?null:m.CurrentHumidifierDehumidifierState)===3&&((m=i.service().values)==null?null:m.Active)===1||i.type()==="dehumidifier"&&((m=i.service().values)!=null&&m.Active||(m=i.service().values)!=null&&m.On)?"url(#dehumidifyingGradient)":(m=i.service().values)!=null&&m.Active||(m=i.service().values)!=null&&m.On?"#42d672":"#7b7b7b"),o(),C("CurrentRelativeHumidity"in i.service().values?40:-1),o(2),v(i.service().customName||i.service().serviceName),o(2),C("Active"in i.service().values&&!((A=i.service().values)!=null&&A.Active)||"On"in i.service().values&&!((A=i.service().values)!=null&&A.On)?44:((A=i.service().values)==null?null:A.TargetHumidifierDehumidifierState)===0&&(i.hasHumidifier||i.hasDehumidifier)?45:((A=i.service().values)==null?null:A.TargetHumidifierDehumidifierState)===1?46:47)}},dependencies:[J,w],encapsulation:2})}return e})();function Dc(e,r){if(e&1&&p(0),e&2){let t,n=u();g(" ",(t=n.service().values)==null?null:t.CurrentRelativeHumidity,"% ")}}function Ac(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.no_data")," ")}var uo=(()=>{class e{service=B.required({});static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-humidity-sensor"]],inputs:{service:[1,"service"]},decls:26,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["transform","translate(1.8, -4.3), scale(0.85)"],["d","M23.61 24.58C23.61 28.67 20.44 31.99 16.56 31.99C12.68 31.99 9.52 28.67 9.52 24.58C9.52 20.49 12.68 17.13 16.56 10.87C20.44 17.13 23.61 20.49 23.61 24.58Z","fill","#1976d2","fill-opacity","0.4","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(n,i){n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4),x(6,"g",5),L(7,"path",6),k(),L(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19),k()(),N(),x(21,"div",20),p(22),k(),x(23,"div",21),h(24,Dc,1,1)(25,Ac,2,3),k()()()),n&2&&(o(2),y("aria-label",d(3,3,"accessories.core.humidity_sensor")),o(20),v(i.service().customName||i.service().serviceName),o(2),C("CurrentRelativeHumidity"in i.service().values?24:25))},dependencies:[w],styles:[".humidity-drop[_ngcontent-%COMP%]{position:relative;display:inline-block;width:50px;height:50px;line-height:42px;border-radius:5% 55% 70%;font-size:14px;text-align:center;margin-bottom:6px;margin-top:9px;background-color:gray;color:#d3d3d3;transform:rotate(45deg)}@media(max-width:575px){.humidity-drop-collapse[_ngcontent-%COMP%]{width:31px;height:31px;line-height:28px;font-size:10px;margin-bottom:7px;margin-top:5px}.humidity-drop-collapse[_ngcontent-%COMP%] .humidity-drop-text[_ngcontent-%COMP%]{margin-left:-2px}}.humidity-drop-text[_ngcontent-%COMP%]{transform:rotate(-45deg);margin-left:-5px}"]})}return e})();function Ic(e,r){e&1&&(x(0,"div",14),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.running")))}function Fc(e,r){e&1&&(x(0,"div",14),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.off")))}var fo=(()=>{class e{service=B.required({});static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-irrigation-system"]],inputs:{service:[1,"service"]},decls:18,vars:7,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","9","y","1","width","14","height","6.5","rx","2","fill","#1976d2","stroke","#7b7b7b","stroke-width","0.5","fill-opacity","0.5"],["x1","16","y1","8","x2","16","y2","31","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round",1,"pipe"],["x1","1","y1","9","x2","31","y2","9","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round",1,"pipe"],["x1","1","y1","20","x2","31","y2","20","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round",1,"pipe"],["x1","1","y1","31","x2","31","y2","31","stroke","#7f7f7f","stroke-width","1","stroke-linecap","round",1,"pipe"],["x","1","y","10","width","14","height","9","rx","0","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"field"],["x","17","y","10","width","14","height","9","rx","0","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"field"],["x","1","y","21","width","14","height","9","rx","0","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"field"],["x","17","y","21","width","14","height","9","rx","0","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"field"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(n,i){if(n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8)(10,"rect",9)(11,"rect",10)(12,"rect",11)(13,"rect",12),k()(),N(),x(14,"div",13),p(15),k(),h(16,Ic,3,3,"div",14)(17,Fc,3,3,"div",14),k()()),n&2){let a,m,A;U("accessory-on",(a=i.service().values)==null?null:a.InUse),o(2),y("aria-label",d(3,5,"accessories.core.irrigation_system")),o(13),g(" ",i.service().customName||((m=i.service().values)==null?null:m.ConfiguredName)||i.service().serviceName," "),o(),C((A=i.service().values)!=null&&A.InUse?16:17)}},dependencies:[w],styles:[".accessory-on svg .field{fill:#4caf50} .accessory-on svg .pipe{animation:_ngcontent-%COMP%_pulse 5s infinite}@keyframes _ngcontent-%COMP%_pulse{0%,to{stroke:#7f7f7f;stroke-opacity:.5}50%{stroke:#1976d2;stroke-opacity:1}}"]})}return e})();function Lc(e,r){e&1&&(x(0,"div",23),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.detected")))}function Vc(e,r){e&1&&(x(0,"div",24),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.not_detected")))}var vo=(()=>{class e{service=B.required({});static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-leak-sensor"]],inputs:{service:[1,"service"]},decls:28,vars:7,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"red-outline"],["transform","translate(7, 0), scale(0.35)"],["d","M23.61 24.58C23.61 28.67 20.44 31.99 16.56 31.99C12.68 31.99 9.52 28.67 9.52 24.58C9.52 20.49 12.68 17.13 16.56 10.87C20.44 17.13 23.61 20.49 23.61 24.58Z","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","1"],["transform","translate(13, 7), scale(0.35)"],["cx","16","cy","22","rx","10","ry","2","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","0.35"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(n,i){if(n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4),x(6,"g",5),L(7,"path",6),k(),x(8,"g",7),L(9,"path",6),k(),L(10,"ellipse",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"line",13)(16,"line",14)(17,"line",15)(18,"line",16)(19,"line",17)(20,"line",18)(21,"line",19)(22,"line",20)(23,"line",21),k()(),N(),x(24,"div",22),p(25),k(),h(26,Lc,3,3,"div",23)(27,Vc,3,3,"div",24),k()()),n&2){let a,m;U("accessory-on",(a=i.service().values)==null?null:a.LeakDetected),o(2),y("aria-label",d(3,5,"accessories.core.leak_sensor")),o(23),v(i.service().customName||i.service().serviceName),o(),C((m=i.service().values)!=null&&m.LeakDetected?26:27)}},dependencies:[w],styles:[".accessory-on svg .red-outline{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();function Pc(e,r){if(e&1&&(x(0,"div",28),p(1),l(2,"number"),k()),e&2){let t,n=u();o(),g("",ce(2,1,(t=n.service().values)==null?null:t.CurrentAmbientLightLevel,"0.1-1")," lux")}}function Oc(e,r){if(e&1&&(x(0,"div",28),p(1),l(2,"number"),k()),e&2){let t,n=u();o(),g("",ce(2,1,(t=n.service().values)==null?null:t.CurrentAmbientLightLevel,"1.0-0")," lux")}}var go=(()=>{class e{service=B.required({});static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-light-sensor"]],inputs:{service:[1,"service"]},decls:32,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["cx","16","cy","13.75","r","5","stroke","#ff9800","fill","none","stroke-width","1.2","stroke-opacity","0.5"],["x1","16","y1","3","x2","16","y2","7","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","23.5","y1","6","x2","20.5","y2","9","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","22.75","y1","13.5","x2","26.75","y2","13.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","20.75","y1","18.25","x2","23.75","y2","21.25","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","16","y1","20.5","x2","16","y2","24.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","11.25","y1","18.25","x2","8.25","y2","21.25","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","5.25","y1","13.5","x2","9.25","y2","13.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","8.5","y1","6","x2","11.5","y2","9","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(n,i){if(n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4)(6,"circle",5)(7,"line",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24)(26,"line",25)(27,"line",26),k()(),N(),x(28,"div",27),p(29),k(),h(30,Pc,3,4,"div",28)(31,Oc,3,4,"div",28),k()()),n&2){let a;o(2),y("aria-label",d(3,3,"accessories.core.light_sensor")),o(27),v(i.service().customName||i.service().serviceName),o(),C(((a=i.service().values)==null?null:a.CurrentAmbientLightLevel)<1?30:31)}},dependencies:[Ee,w],encapsulation:2})}return e})();var nt=(()=>{class e{miredToKelvin(t){return Math.round(1e6/t)}kelvinToMired(t){return Math.round(1e6/t)}kelvinToHsl(t){let n=t/100,i,a,m;n<=66?(i=255,a=Math.min(99.4708025861*Math.log(n)-161.1195681661,255),m=n<=19?0:Math.min(138.5177312231*Math.log(n-10)-305.0447927307,255)):(i=Math.min(329.698727446*(n-60)**-.1332047592,255),a=Math.min(288.1221695283*(n-60)**-.0755148492,255),m=255),i/=255,a/=255,m/=255;let A=Math.max(i,a,m),z=Math.min(i,a,m),q=A-z,re=0;q!==0&&(A===i?re=(a-m)/q%6:A===a?re=(m-i)/q+2:re=(i-a)/q+4,re=Math.round(re*60),re<0&&(re+=360));let _e=(A+z)/2,Ae=q===0?0:q/(1-Math.abs(2*_e-1));return`hsl(${Math.round(re)}, ${Math.round(Ae*100)}%, ${Math.round(_e*100)}%)`}static \u0275fac=function(n){return new(n||e)};static \u0275prov=Yt({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var ho=(e,r)=>({"fa-check-circle":e,"fa-blank":r}),Nc=(e,r)=>({"off-text":e,"on-text":r}),Di=(e,r)=>({"mb-1":e,"":r});function Hc(e,r){e&1&&f(0,"div")}function Rc(e,r){if(e&1&&(s(0,"div",11)(1,"div",13)(2,"div",7),f(3,"i",14),c(),p(4),l(5,"translate"),s(6,"div",9),f(7,"i",10),c()()()),e&2){let t=u();o(3),F(O(6,Nc,!t.isAdaptiveLightingEnabled,t.isAdaptiveLightingEnabled)),o(),$(" ",d(5,4,"accessories.control.adaptive_lighting"),": ",t.isAdaptiveLightingEnabled?"ON":"OFF"," ")}}function $c(e,r){if(e&1){let t=j();s(0,"h6",15),p(1),l(2,"translate"),c(),s(3,"nouislider",16),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.targetBrightness.value,i)||(a.targetBrightness.value=i),P(i)}),S("ngModelChange",function(){V(t);let i=u();return P(i.onBrightnessStateChange())}),c()}if(e&2){let t=u();o(),$("",d(2,6,"accessories.control.brightness"),": ",t.targetBrightness.value,"%"),o(2),b("min",t.targetBrightness.min)("max",t.targetBrightness.max)("step",t.targetBrightness.step),Z("ngModel",t.targetBrightness.value)}}function Uc(e,r){e&1&&(s(0,"div",17)(1,"span",18),p(2),l(3,"translate"),c()()),e&2&&(o(2),v(d(3,1,"accessories.control.adaptive_lighting_note")))}function Wc(e,r){if(e&1){let t=j();s(0,"h6",15),p(1),l(2,"translate"),c(),s(3,"nouislider",16),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.targetHue.value,i)||(a.targetHue.value=i),P(i)}),S("ngModelChange",function(){V(t);let i=u();return P(i.onHueStateChange())}),c(),h(4,Uc,4,3,"div",17)}if(e&2){let t=u();o(),$("",d(2,9,"accessories.control.hue"),": ",t.targetHue.value,"\xB0"),o(2),F(O(11,Di,t.isAdaptiveLightingEnabled,!t.isAdaptiveLightingEnabled)),b("min",0)("max",360)("step",1),Z("ngModel",t.targetHue.value),o(),C(t.isAdaptiveLightingEnabled?4:-1)}}function Gc(e,r){e&1&&(s(0,"div",17)(1,"span",18),p(2),l(3,"translate"),c()()),e&2&&(o(2),v(d(3,1,"accessories.control.adaptive_lighting_note")))}function jc(e,r){if(e&1){let t=j();s(0,"h6",15),p(1),l(2,"translate"),c(),s(3,"nouislider",16),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.targetSaturation.value,i)||(a.targetSaturation.value=i),P(i)}),S("ngModelChange",function(){V(t);let i=u();return P(i.onSaturationStateChange())}),c(),h(4,Gc,4,3,"div",17)}if(e&2){let t=u();o(),$("",d(2,9,"accessories.control.saturation"),": ",t.targetSaturation.value,"%"),o(2),F(O(11,Di,t.isAdaptiveLightingEnabled,!t.isAdaptiveLightingEnabled)),b("min",0)("max",100)("step",1),Z("ngModel",t.targetSaturation.value),o(),C(t.isAdaptiveLightingEnabled?4:-1)}}function qc(e,r){e&1&&(s(0,"div",17)(1,"span",18),p(2),l(3,"translate"),c()()),e&2&&(o(2),v(d(3,1,"accessories.control.adaptive_lighting_note")))}function zc(e,r){if(e&1){let t=j();s(0,"h6",15),p(1),l(2,"translate"),l(3,"convertMired"),c(),s(4,"nouislider",16),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.targetColorTemperature.value,i)||(a.targetColorTemperature.value=i),P(i)}),S("ngModelChange",function(){V(t);let i=u();return P(i.onColorTemperatureStateChange())}),c(),h(5,qc,4,3,"div",17)}if(e&2){let t=u();o(),$(" ",d(2,9,"accessories.control.color_temperature"),": ",d(3,11,t.targetColorTemperature.mired)," "),o(3),F(O(13,Di,t.isAdaptiveLightingEnabled,!t.isAdaptiveLightingEnabled)),b("min",t.targetColorTemperature.min)("max",t.targetColorTemperature.max)("step",t.targetColorTemperature.step),Z("ngModel",t.targetColorTemperature.value),o(),C(t.isAdaptiveLightingEnabled?5:-1)}}var Co=(()=>{class e extends ue{$colour=D(nt);isAdaptiveLightingEnabled$=B.required({});targetMode;targetBrightness;targetBrightnessChanged=new ee;targetHue;targetHueChanged=new ee;targetSaturation;targetSaturationChanged=new ee;targetColorTemperature;targetColorTemperatureChanged=new ee;hasAdaptiveLighting=!1;isAdaptiveLightingEnabled=!1;sliderIndex=0;setupComponent(){this.createDebouncedSubscription(this.targetBrightnessChanged,()=>{this.service().getCharacteristic("Brightness").setValue(this.targetBrightness.value),this.targetBrightness.value&&!this.service().values.On?(this.targetMode=!0,this.service().getCharacteristic("On").setValue(this.targetMode)):!this.targetBrightness.value&&this.service().values.On&&(this.targetMode=!1,this.service().getCharacteristic("On").setValue(this.targetMode))}),this.createDebouncedSubscription(this.targetHueChanged,()=>{this.service().getCharacteristic("Hue").setValue(this.targetHue.value)}),this.createDebouncedSubscription(this.targetSaturationChanged,()=>{this.service().getCharacteristic("Saturation").setValue(this.targetSaturation.value)}),this.createDebouncedSubscription(this.targetColorTemperatureChanged,t=>{this.service().getCharacteristic("ColorTemperature").setValue(t)}),this.targetMode=this.service().values.On,this.loadTargetBrightness(),this.loadTargetHue(),this.loadTargetSaturation(),this.loadTargetColorTemperature()}handleAccessoryUpdate(){if(this.targetMode=this.service().values.On,this.targetBrightness&&(this.targetBrightness.value=this.service().getCharacteristic("Brightness")?.value),this.targetHue&&(this.targetHue.value=this.service().getCharacteristic("Hue")?.value),this.targetSaturation&&(this.targetSaturation.value=this.service().getCharacteristic("Saturation")?.value),this.targetColorTemperature){let t=this.service().getCharacteristic("ColorTemperature")?.value;this.targetColorTemperature.value=this.$colour.miredToKelvin(t),this.targetColorTemperature.mired=t}}setTargetMode(t,n){this.targetMode=t,this.service().getCharacteristic("On").setValue(this.targetMode),this.targetMode&&this.targetBrightness&&!this.targetBrightness.value&&(this.targetBrightness.value=this.service().getCharacteristic("Brightness").maxValue),this.blurTarget(n)}onBrightnessStateChange(){this.targetBrightnessChanged.next(this.targetBrightness.value)}onHueStateChange(){this.targetHueChanged.next(this.targetHue.value);let t=document.querySelectorAll(".noUi-target")[this.sliderIndex-1];if(t){let n=this.targetHue.value;t.style.background=`linear-gradient(to right,
2
+ hsl(${n}, 0%, 50%),
3
+ hsl(${n}, 100%, 50%))`}}onSaturationStateChange(){this.targetSaturationChanged.next(this.targetSaturation.value)}onColorTemperatureStateChange(){let t=this.$colour.kelvinToMired(this.targetColorTemperature.value);this.targetColorTemperature.mired=t,this.targetColorTemperatureChanged.next(t)}loadTargetBrightness(){let t=this.service().getCharacteristic("Brightness");t&&(this.targetBrightness={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},this.applySliderGradient("linear-gradient(to right, #242424, #ffd6aa)",`.noUi-target:nth-of-type(${this.sliderIndex+1})`),this.sliderIndex+=1)}loadTargetHue(){let t=this.service().getCharacteristic("Hue");t&&(this.targetHue={value:t.value},this.applySliderGradient(`linear-gradient(to right,
4
+ hsl(0, 100%, 50%),
5
+ hsl(60, 100%, 50%),
6
+ hsl(120, 100%, 50%),
7
+ hsl(180, 100%, 50%),
8
+ hsl(240, 100%, 50%),
9
+ hsl(300, 100%, 50%),
10
+ hsl(360, 100%, 50%))`,`.noUi-target:nth-of-type(${this.sliderIndex+1})`),this.sliderIndex+=1)}loadTargetSaturation(){let t=this.service().getCharacteristic("Saturation");if(t){this.targetSaturation={value:t.value};let n=this.targetHue.value||0;this.applySliderGradient(`linear-gradient(to right,
11
+ hsl(${n}, 0%, 50%),
12
+ hsl(${n}, 100%, 50%))`,`.noUi-target:nth-of-type(${this.sliderIndex+1})`),this.sliderIndex+=1}}loadTargetColorTemperature(){let t=this.service().getCharacteristic("ColorTemperature");if(t){this.targetColorTemperature={value:this.$colour.miredToKelvin(t.value),mired:t.value,min:this.$colour.miredToKelvin(t.maxValue),max:this.$colour.miredToKelvin(t.minValue),step:t.minStep};let n=this.$colour.kelvinToHsl(this.targetColorTemperature.min),i=this.$colour.kelvinToHsl(this.targetColorTemperature.max);this.applySliderGradient(`linear-gradient(to right, ${n}, ${i})`,`.noUi-target:nth-of-type(${this.sliderIndex+1})`),this.isAdaptiveLightingEnabled$()&&(this.hasAdaptiveLighting=!0,this.isAdaptiveLightingEnabled$().subscribe(a=>{this.isAdaptiveLightingEnabled=a}))}}static \u0275fac=(()=>{let t;return function(i){return(t||(t=pe(e)))(i||e)}})();static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{isAdaptiveLightingEnabled$:[1,"isAdaptiveLightingEnabled$"]},features:[me],decls:29,vars:29,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"d-flex","justify-content-center","mb-0","p-0","mt-0","grey-outline"],[1,"modal-footer"],[1,"mb-0","mx-0","p-3","btn-read","w-100","no-round-top"],[1,"fas","fa-xl","fa-sun"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[1,"d-flex","text-center","mt-0","mb-1"],[1,"grey-text","small"]],template:function(n,i){n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4)(6,"div",5),l(7,"translate"),s(8,"button",6),S("click",function(m){return i.setTargetMode(!1,m)}),s(9,"div",7),f(10,"i",8),c(),p(11),l(12,"translate"),s(13,"div",9),f(14,"i",10),c()(),s(15,"button",6),S("click",function(m){return i.setTargetMode(!0,m)}),s(16,"div",7),f(17,"i",8),c(),p(18),l(19,"translate"),s(20,"div",9),f(21,"i",10),c()(),h(22,Hc,1,0,"div"),c(),h(23,Rc,8,9,"div",11),h(24,$c,4,8),h(25,Wc,5,14),h(26,jc,5,14),h(27,zc,6,16),c(),f(28,"div",12),c()),n&2&&(o(2),b("innerText",i.service().customName||i.service().serviceName),o(),y("aria-label",d(4,15,"form.button_close")),o(3),y("aria-label",d(7,17,"accessories.control.mode_control")),o(4),F(O(23,ho,!i.targetMode,i.targetMode)),o(),g(" ",d(12,19,"accessories.control.off")," "),o(6),F(O(26,ho,i.targetMode,!i.targetMode)),o(),g(" ",d(19,21,"accessories.control.on")," "),o(4),C(i.hasAdaptiveLighting?22:-1),o(),C(i.hasAdaptiveLighting?23:-1),o(),C(i.targetBrightness?24:-1),o(),C(i.targetHue?25:-1),o(),C(i.targetSaturation?26:-1),o(),C(i.targetColorTemperature?27:-1))},dependencies:[ne,ae,se,le,w,lt],encapsulation:2,changeDetection:0})}return e})();function Kc(e,r){if(e&1&&(f(0,"div",10),l(1,"translate")),e&2){let t,n=u();b("innerHTML",(t=n.service().values)!=null&&t.On?((t=n.service().values)==null?null:t.Brightness)+"%"+(n.hasAdaptiveLighting?" \xB7 <i class='fa fa-sun "+(n.isAdaptiveLightingEnabled?"on-text":"grey-text")+"'></i>":""):d(1,1,"accessories.control.off"),je)}}function Zc(e,r){if(e&1&&(f(0,"div",10),l(1,"translate")),e&2){let t,n=u();b("innerHTML",d(1,1,(t=n.service().values)!=null&&t.On||(t=n.service().values)!=null&&t.Active?"accessories.control.on"+(n.hasAdaptiveLighting?" \xB7 <i class='fa fa-sun "+(n.isAdaptiveLightingEnabled?"on-text":"grey-text")+"'></i>":""):"accessories.control.off"),je)}}var _o=(()=>{class e{destroyRef=D(ye);$accessories=D(ie);$modal=D(X);intervalId;$colour=D(nt);service=B.required({});readyForControl=B(!1,{});hasAdaptiveLighting=!1;isAdaptiveLightingEnabled=!1;isAdaptiveLightingEnabled$=new Xi(!1);ngOnInit(){this.loadAdaptiveLighting()}ngOnDestroy(){this.intervalId&&clearInterval(this.intervalId)}onClick(){this.readyForControl()&&("On"in this.service().values?this.service().getCharacteristic("On").setValue(!this.service().values.On):"Active"in this.service().values&&this.service().getCharacteristic("Active").setValue(this.service().values.Active?0:1),"Brightness"in this.service().values&&!this.service().values.On&&!this.service().values.Brightness&&(this.service().values.Brightness=this.service().getCharacteristic("Brightness").maxValue))}onLongClick(){if(this.readyForControl()&&("Brightness"in this.service().values||"Hue"in this.service().values||"Saturation"in this.service().values||"ColorTemperature"in this.service().values)){let t=this.$modal.open(Co,{size:"md",backdrop:"static"});if(t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories,this.hasAdaptiveLighting){t.componentInstance.isAdaptiveLightingEnabled$=this.isAdaptiveLightingEnabled$,this.intervalId&&clearInterval(this.intervalId),this.intervalId=setInterval(()=>{this.isAdaptiveLightingEnabled$.next(!!this.service().values.CharacteristicValueActiveTransitionCount)},3e3);let n=this.isAdaptiveLightingEnabled$.subscribe(i=>{this.isAdaptiveLightingEnabled=i});t.result.finally(()=>{this.intervalId&&clearInterval(this.intervalId),n.unsubscribe(),this.intervalId=setInterval(()=>{this.isAdaptiveLightingEnabled$.next(!!this.service().values.CharacteristicValueActiveTransitionCount)},3e4)})}}}kelvinToHex(t){t=Math.max(1e3,Math.min(4e4,t));let n=t/100,i,a,m;return n<=66?(i=255,a=n,a=99.4708025861*Math.log(a)-161.1195681661,m=n<=19?0:138.5177312231*Math.log(n-10)-305.0447927307):(i=329.698727446*(n-60)**-.1332047592,a=288.1221695283*(n-60)**-.0755148492,m=255),i=Math.round(Math.min(Math.max(i,0),255)),a=Math.round(Math.min(Math.max(a,0),255)),m=Math.round(Math.min(Math.max(m,0),255)),`#${i.toString(16).padStart(2,"0")}${a.toString(16).padStart(2,"0")}${m.toString(16).padStart(2,"0")}`}loadAdaptiveLighting(){"CharacteristicValueActiveTransitionCount"in this.service().values&&(this.hasAdaptiveLighting=!0,this.isAdaptiveLightingEnabled$.next(!!this.service().values.CharacteristicValueActiveTransitionCount),this.intervalId=setInterval(()=>{this.isAdaptiveLightingEnabled$.next(!!this.service().values.CharacteristicValueActiveTransitionCount)},3e4),this.isAdaptiveLightingEnabled$.pipe(fe(this.destroyRef)).subscribe(t=>{this.isAdaptiveLightingEnabled=t}))}Math=Math;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-lightbulb"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:14,vars:9,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["stroke","#7f7f7f","stroke-width","1.5","d","M8 21c-2.8-2.2-4.5-5.4-4.5-9 0-6.1 5-11 11.5-11S27.5 5.9 27.5 12c0 3.5-1.7 6.7-4.5 8.9-1.2 1-1.8 4.8-3 7.3-.9 2-2.2 2.7-4.5 2.7s-3.6-.7-4.5-2.7c-1.2-2.5-1.8-6.3-3-7.3z"],["stroke","#7f7f7f","stroke-width","1.5","x1","8","y1","21.5","x2","23","y2","21.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","23","x2","21","y2","24"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","25.5","x2","21","y2","26.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","11","y1","28","x2","20","y2","29"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerHTML"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),c()(),N(),s(10,"div",9),p(11),c(),h(12,Kc,2,3,"div",10)(13,Zc,2,3,"div",10),c()()),n&2){let a,m,A,z;U("accessory-on",((a=i.service().values)==null?null:a.On)||((a=i.service().values)==null?null:a.Active)),o(2),y("aria-label",d(3,7,"accessories.core.lightbulb")),o(3),y("fill",(m=i.service().values)!=null&&m.On||(m=i.service().values)!=null&&m.Active?"Hue"in i.service().values?"hsl("+((m=i.service().values)==null?null:m.Hue)+", "+((m=i.service().values)==null?null:m.Saturation)+"%, 50%)":"ColorTemperature"in i.service().values?i.$colour.kelvinToHsl(i.$colour.miredToKelvin((m=i.service().values)==null?null:m.ColorTemperature)):"#ffcf55":"none")("fill-opacity","Brightness"in i.service().values?.25+((A=i.service().values)==null?null:A.Brightness)/100*.5:.75),o(6),v(i.service().customName||i.service().serviceName),o(),C((z=i.service().values)!=null&&z.Brightness?12:13)}},dependencies:[J,w],encapsulation:2})}return e})();var ni=(()=>{class e{transform(t){if(typeof t!="number"||Number.isNaN(t))return"";let n=Math.floor(t/60),i=t%60;return[n>0?`${n.toString()}m`:"",i>0?`${i.toString()}s`:""].filter(Boolean).join(" ")}static \u0275fac=function(n){return new(n||e)};static \u0275pipe=et({name:"duration",type:e,pure:!0})}return e})();var yo=(e,r)=>({"fa-check-circle":e,"fa-blank":r});function Yc(e,r){if(e&1){let t=j();s(0,"h6",12),p(1),l(2,"translate"),l(3,"duration"),c(),s(4,"nouislider",13),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.targetLockManagementAutoSecurityTimeout.value,i)||(a.targetLockManagementAutoSecurityTimeout.value=i),P(i)}),S("ngModelChange",function(){V(t);let i=u();return P(i.onLockManagementAutoSecurityTimeoutStateChange())}),c()}if(e&2){let t=u();o(),$(" ",d(2,6,"accessories.control.lock_auto"),": ",t.targetLockManagementAutoSecurityTimeout.value===0?"\u221E":d(3,8,t.targetLockManagementAutoSecurityTimeout.value)," "),o(3),b("min",t.targetLockManagementAutoSecurityTimeout.min)("max",t.targetLockManagementAutoSecurityTimeout.max)("step",10),Z("ngModel",t.targetLockManagementAutoSecurityTimeout.value)}}var xo=(()=>{class e extends ue{lockTimeoutSubscription=null;serviceManagement;targetMode;targetLockManagementAutoSecurityTimeout;targetLockManagementAutoSecurityTimeoutChanged=new ee;setupComponent(){this.targetMode=this.service().values.LockTargetState,this.service().linkedServices&&(this.serviceManagement=Object.values(this.service().linkedServices).find(t=>t.type==="LockManagement")),this.serviceManagement&&(this.targetLockManagementAutoSecurityTimeoutChanged.pipe(rn()).subscribe(()=>{this.serviceManagement.getCharacteristic("LockManagementAutoSecurityTimeout").setValue(this.targetLockManagementAutoSecurityTimeout.value)}),this.createDebouncedSubscription(this.targetLockManagementAutoSecurityTimeoutChanged,()=>{this.serviceManagement.getCharacteristic("LockManagementAutoSecurityTimeout").setValue(this.targetLockManagementAutoSecurityTimeout.value)},300),this.loadTargetLockManagementAutoSecurityTimeout())}handleAccessoryUpdate(){this.targetMode=this.service().values.LockTargetState,this.targetLockManagementAutoSecurityTimeout&&this.serviceManagement&&(this.targetLockManagementAutoSecurityTimeout.value=this.serviceManagement.getCharacteristic("LockManagementAutoSecurityTimeout")?.value)}setTargetMode(t,n){this.targetMode=t,this.service().getCharacteristic("LockTargetState").setValue(this.targetMode),this.lockTimeoutSubscription&&(this.lockTimeoutSubscription.unsubscribe(),this.lockTimeoutSubscription=null),this.targetMode===0&&this.targetLockManagementAutoSecurityTimeout?.value>0&&(this.lockTimeoutSubscription=tn((this.targetLockManagementAutoSecurityTimeout.value+.3)*1e3).pipe(fe(this.destroyRef)).subscribe(()=>{this.targetMode=1,this.cdr.markForCheck()})),this.blurTarget(n)}onLockManagementAutoSecurityTimeoutStateChange(){this.targetLockManagementAutoSecurityTimeoutChanged.next(this.targetLockManagementAutoSecurityTimeout.value)}loadTargetLockManagementAutoSecurityTimeout(){let t=this.serviceManagement.getCharacteristic("LockManagementAutoSecurityTimeout");t&&(this.targetLockManagementAutoSecurityTimeout={value:t.value||0,min:t.minValue||0,max:t.maxValue||3600,step:t.minStep||10},this.applySliderGradient("linear-gradient(to right, #ffffff, #ffd966, #ff0000)"))}static \u0275fac=(()=>{let t;return function(i){return(t||(t=pe(e)))(i||e)}})();static \u0275cmp=M({type:e,selectors:[["ng-component"]],features:[me],decls:24,vars:24,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(n,i){n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4)(6,"div",5),l(7,"translate"),s(8,"button",6),S("click",function(m){return i.setTargetMode(1,m)}),s(9,"div",7),f(10,"i",8),c(),p(11),l(12,"translate"),s(13,"div",9),f(14,"i",10),c()(),s(15,"button",6),S("click",function(m){return i.setTargetMode(0,m)}),s(16,"div",7),f(17,"i",8),c(),p(18),l(19,"translate"),s(20,"div",9),f(21,"i",10),c()()(),h(22,Yc,5,10),c(),f(23,"div",11),c()),n&2&&(o(2),b("innerText",i.service().customName||i.service().serviceName),o(),y("aria-label",d(4,10,"form.button_close")),o(3),y("aria-label",d(7,12,"accessories.control.mode_control")),o(4),F(O(18,yo,i.targetMode===1,i.targetMode!==1)),o(),g(" ",d(12,14,"accessories.control.locked")," "),o(6),F(O(21,yo,i.targetMode===0,i.targetMode!==0)),o(),g(" ",d(19,16,"accessories.control.unlocked")," "),o(4),C(i.serviceManagement?22:-1))},dependencies:[ne,ae,se,le,w,ni],encapsulation:2,changeDetection:0})}return e})();var Qc=(e,r,t,n)=>({"accessory-on":e,unlocked:r,jammed:t,error:n}),Jc=(e,r)=>({"red-text":e,"grey-text":r});function Xc(e,r){if(e&1&&(f(0,"div",11),l(1,"translate")),e&2){let t,n,i=u();F(O(5,Jc,!((t=i.service().values)!=null&&t.LockCurrentState),(t=i.service().values)==null?null:t.LockCurrentState)),b("innerText",d(1,3,(n=i.service().values)!=null&&n.LockCurrentState?"accessories.control.locked":"accessories.control.unlocked"))}}function e1(e,r){e&1&&(s(0,"div",10),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.jammed")))}function t1(e,r){e&1&&(s(0,"div",10),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.unknown")))}var So=(()=>{class e{$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&("LockTargetState"in this.service().values?this.service().getCharacteristic("LockTargetState").setValue(this.service().values.LockTargetState?0:1):"On"in this.service().values&&this.service().getCharacteristic("On").setValue(!this.service().values.On))}onLongClick(){if(this.readyForControl()&&"LockTargetState"in this.service().values){let t=this.$modal.open(xo,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-lock-mechanism"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:14,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","longClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["d","M8 16 C6 -4, 26 -4, 24 16","fill","none","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"shackle-locked"],["d","M8 16 C6 -2, 22 -2, 24 7","fill","none","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","stroke-opacity","0",1,"shackle-unlocked"],["x","5","y","16","width","22","height","15","rx","3","fill","none","stroke","#7f7f7f","stroke-width","2"],["cx","16","cy","23.5","r","3","stroke","#7f7f7f","stroke-width","0.5","fill","#4caf50","fill-opacity","0.5",1,"keyhole"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText","class"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("shortClick",function(){return i.onClick()})("longClick",function(){return i.onLongClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"path",4)(6,"path",5)(7,"rect",6)(8,"circle",7),c()(),N(),s(9,"div",8),p(10),c(),h(11,Xc,2,8,"div",9)(12,e1,3,3,"div",10)(13,t1,3,3,"div",10),c()()),n&2){let a,m;F(wt(7,Qc,"LockCurrentState"in i.service().values&&((a=i.service().values)==null?null:a.LockCurrentState)!==1||((a=i.service().values)==null?null:a.On)===1,((a=i.service().values)==null?null:a.LockCurrentState)===0||((a=i.service().values)==null?null:a.On)===1,((a=i.service().values)==null?null:a.LockCurrentState)===2,((a=i.service().values)==null?null:a.LockCurrentState)===3)),o(2),y("aria-label",d(3,5,"accessories.core.lock_mechanism")),o(8),v(i.service().customName||i.service().serviceName),o(),C(((m=i.service().values)==null?null:m.LockCurrentState)<2?11:((m=i.service().values)==null?null:m.LockCurrentState)===2?12:((m=i.service().values)==null?null:m.LockCurrentState)===3?13:-1)}},dependencies:[J,w],styles:["@keyframes _ngcontent-%COMP%_blink{0%,to{fill-opacity:1}50%{fill-opacity:.2}} .unlocked svg .shackle-locked{stroke-opacity:0!important} .unlocked svg .shackle-unlocked{stroke-opacity:1!important} .unlocked svg .keyhole{fill:#ff9800!important} .jammed svg .shackle-locked{stroke-opacity:0!important} .jammed svg .shackle-unlocked{stroke-opacity:1!important} .jammed svg .keyhole{fill:#d32f2f!important;animation:_ngcontent-%COMP%_blink 1s infinite} .error svg .shackle-locked{stroke-opacity:0!important} .error svg .shackle-unlocked{stroke-opacity:1!important} .error svg .keyhole{fill:#d32f2f!important;animation:_ngcontent-%COMP%_blink 1s infinite}"]})}return e})();var Ct=(e,r)=>({"fa-check-circle":e,"fa-blank":r});function i1(e,r){if(e&1){let t=j();s(0,"div",5),l(1,"translate"),s(2,"button",7),S("click",function(i){V(t);let a=u();return P(a.setActive(0,i))}),s(3,"div",8),f(4,"i",9),c(),p(5),l(6,"translate"),s(7,"div",10),f(8,"i",11),c()(),s(9,"button",7),S("click",function(i){V(t);let a=u();return P(a.setActive(1,i))}),s(10,"div",8),f(11,"i",9),c(),p(12),l(13,"translate"),s(14,"div",10),f(15,"i",11),c()()()}if(e&2){let t,n,i=u();y("aria-label",d(1,7,"accessories.control.mode_control")),o(4),F(O(13,Ct,((t=i.service().values)==null?null:t.Active)===0,((t=i.service().values)==null?null:t.Active)!==0)),o(),g(" ",d(6,9,"accessories.control.off")," "),o(6),F(O(16,Ct,((n=i.service().values)==null?null:n.Active)===1,((n=i.service().values)==null?null:n.Active)!==1)),o(),g(" ",d(13,11,"accessories.control.on")," ")}}function n1(e,r){if(e&1){let t=j();s(0,"div",5),l(1,"translate"),s(2,"button",7),S("click",function(i){V(t);let a=u();return P(a.setTargetState(0,i))}),s(3,"div",8),f(4,"i",9),c(),p(5),l(6,"translate"),s(7,"div",10),f(8,"i",11),c()(),s(9,"button",7),S("click",function(i){V(t);let a=u();return P(a.setTargetState(1,i))}),s(10,"div",8),f(11,"i",9),c(),p(12),l(13,"translate"),s(14,"div",10),f(15,"i",11),c()(),s(16,"button",7),S("click",function(i){V(t);let a=u();return P(a.setTargetState(2,i))}),s(17,"div",8),f(18,"i",9),c(),p(19),l(20,"translate"),s(21,"div",10),f(22,"i",11),c()()()}if(e&2){let t,n,i,a=u();y("aria-label",d(1,10,"accessories.control.media_control")),o(4),F(O(18,Ct,((t=a.service().values)==null?null:t.CurrentMediaState)===0,((t=a.service().values)==null?null:t.CurrentMediaState)!==0)),o(),g(" ",d(6,12,"accessories.control.play")," "),o(6),F(O(21,Ct,((n=a.service().values)==null?null:n.CurrentMediaState)===1,((n=a.service().values)==null?null:n.CurrentMediaState)!==1)),o(),g(" ",d(13,14,"accessories.control.pause")," "),o(6),F(O(24,Ct,((i=a.service().values)==null?null:i.CurrentMediaState)===2,((i=a.service().values)==null?null:i.CurrentMediaState)!==2)),o(),g(" ",d(20,16,"accessories.control.stop")," ")}}function o1(e,r){if(e&1){let t=j();s(0,"h6"),p(1),l(2,"translate"),c(),s(3,"div",12),l(4,"translate"),s(5,"button",7),S("click",function(i){V(t);let a=u();return P(a.setTargetMode(!1,i))}),s(6,"div",8),f(7,"i",9),c(),p(8),l(9,"translate"),s(10,"div",10),f(11,"i",11),c()(),s(12,"button",7),S("click",function(i){V(t);let a=u();return P(a.setTargetMode(!0,i))}),s(13,"div",8),f(14,"i",9),c(),p(15),l(16,"translate"),s(17,"div",10),f(18,"i",11),c()()()}if(e&2){let t=u();o(),g(" ",d(2,8,"Active"in t.service().values||"TargetMediaState"in t.service().values?"accessories.control.speaker_volume":"menu.label_status")," "),o(2),y("aria-label",d(4,10,"accessories.control.mute_control")),o(4),F(O(16,Ct,!t.targetMode,t.targetMode)),o(),g(" ",d(9,12,"accessories.control.not_mute")," "),o(6),F(O(19,Ct,t.targetMode,!t.targetMode)),o(),g(" ",d(16,14,"accessories.control.mute")," ")}}function r1(e,r){if(e&1){let t=j();s(0,"h6",13),p(1),l(2,"translate"),c(),s(3,"nouislider",14),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.targetVolume.value,i)||(a.targetVolume.value=i),P(i)}),S("ngModelChange",function(){V(t);let i=u();return P(i.onVolumeStateChange())}),c()}if(e&2){let t=u();o(),$("",d(2,6,"accessories.control.speaker_volume"),": ",t.targetVolume.value,"%"),o(2),b("min",t.targetVolume.min)("max",t.targetVolume.max)("step",t.targetVolume.step),Z("ngModel",t.targetVolume.value)}}var ko=(()=>{class e extends ue{targetMode;targetVolume;targetVolumeChanged=new ee;setupComponent(){this.createDebouncedSubscription(this.targetVolumeChanged,()=>{this.service().getCharacteristic("Volume").setValue(this.targetVolume.value)}),this.targetMode=this.service().values.Mute,this.loadTargetVolume()}handleAccessoryUpdate(){this.targetMode=this.service().values.Mute,this.targetVolume&&(this.targetVolume.value=this.service().getCharacteristic("Volume")?.value)}setTargetMode(t,n){this.targetMode=t,this.service().getCharacteristic("Mute").setValue(this.targetMode),this.blurTarget(n)}setActive(t,n){this.service().getCharacteristic("Active").setValue(t),this.blurTarget(n)}setTargetState(t,n){this.service().getCharacteristic("TargetMediaState").setValue(t),this.blurTarget(n)}onVolumeStateChange(){this.targetVolumeChanged.next(this.targetVolume.value)}loadTargetVolume(){let t=this.service().getCharacteristic("Volume");t&&(this.targetVolume={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},this.applySliderGradient("linear-gradient(to right, #ffffff, #ffd966, #ff0000)"))}static \u0275fac=(()=>{let t;return function(i){return(t||(t=pe(e)))(i||e)}})();static \u0275cmp=M({type:e,selectors:[["ng-component"]],features:[me],decls:11,vars:7,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],[1,"mt-4","mb-0"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(n,i){n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4),h(6,i1,16,19,"div",5)(7,n1,23,27,"div",5),h(8,o1,19,22),h(9,r1,4,8),c(),f(10,"div",6),c()),n&2&&(o(2),b("innerText",i.service().customName||i.service().serviceName),o(),y("aria-label",d(4,5,"form.button_close")),o(3),C("Active"in i.service().values?6:"TargetMediaState"in i.service().values?7:-1),o(2),C("Mute"in i.service().values?8:-1),o(),C(i.targetVolume?9:-1))},dependencies:[ne,ae,se,le,w],encapsulation:2,changeDetection:0})}return e})();var a1=()=>[0,1],s1=(e,r)=>({"accessory-on":e,paused:r}),l1=()=>["Speaker","SmartSpeaker"];function c1(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.play")," ")}function d1(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.pause")," ")}function p1(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.stop")," ")}function m1(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" \xB7 ",d(1,1,"accessories.control.mute")," ")}function u1(e,r){if(e&1&&p(0),e&2){let t,n=u(3);g(" \xB7 ",(t=n.service().values)==null?null:t.Volume,"% ")}}function f1(e,r){if(e&1&&h(0,u1,1,1),e&2){let t=u(2);C("Volume"in t.service().values?0:-1)}}function v1(e,r){if(e&1&&(s(0,"div",10),h(1,c1,2,3)(2,d1,2,3)(3,p1,2,3),h(4,m1,2,3)(5,f1,1,1),c()),e&2){let t,n,i=u();o(),C((t=(t=i.service().values)==null?null:t.CurrentMediaState)===0?1:t===1?2:t===2?3:-1),o(3),C("Mute"in i.service().values&&((n=i.service().values)!=null&&n.Mute)?4:5)}}function g1(e,r){e&1&&(f(0,"div",11),l(1,"translate")),e&2&&b("innerText",d(1,1,"accessories.control.off"))}function h1(e,r){e&1&&(f(0,"div",11),l(1,"translate")),e&2&&b("innerText",d(1,1,"accessories.control.mute"))}function C1(e,r){if(e&1&&(s(0,"div",10),p(1),c()),e&2){let t,n=u();o(),g("",(t=n.service().values)==null?null:t.Volume,"%")}}function _1(e,r){e&1&&(s(0,"div",10),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.on")))}function y1(e,r){e&1&&(s(0,"div",10),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.microphone")))}var bo=(()=>{class e{$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&("Active"in this.service().values?this.service().getCharacteristic("Active").setValue(this.service().values.Active===0?1:0):"TargetMediaState"in this.service().values?this.service().getCharacteristic("TargetMediaState").setValue(this.service().values.TargetMediaState===0?1:0):"Mute"in this.service().values&&this.service().getCharacteristic("Mute").setValue(!this.service().values.Mute))}onLongClick(){if(this.readyForControl()&&("Active"in this.service().values||"TargetMediaState"in this.service().values||"Volume"in this.service().values||"Mute"in this.service().values)){let t=this.$modal.open(ko,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-microphone"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:18,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","6","y","1","width","18","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","2"],["stroke-linecap","round","x1","10","y1","6","x2","20","y2","6","stroke","#7f7f7f","stroke-width","2"],["stroke-linecap","round","x1","10","y1","10","x2","20","y2","10","stroke","#7f7f7f","stroke-width","2"],["stroke-linecap","round","x1","10","y1","14","x2","20","y2","14","stroke","#7f7f7f","stroke-width","2"],["cx","15","cy","23","r","3","stroke","#7f7f7f","stroke-width","2","fill","#1976d2","fill-opacity","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"rect",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"circle",8),c()(),N(),s(10,"div",9),p(11),c(),h(12,v1,6,2,"div",10)(13,g1,2,3,"div",11)(14,h1,2,3,"div",11)(15,C1,2,1,"div",10)(16,_1,3,3,"div",10)(17,y1,3,3,"div",10),c()()),n&2){let a,m;F(O(8,s1,"Active"in i.service().values?(a=i.service().values)==null?null:a.Active:"CurrentMediaState"in i.service().values?be(7,a1).includes((a=i.service().values)==null?null:a.CurrentMediaState):"Mute"in i.service().values&&"Volume"in i.service().values?!((a=i.service().values)!=null&&a.Mute)&&((a=i.service().values)==null?null:a.Volume)>0:"Mute"in i.service().values&&!((a=i.service().values)!=null&&a.Mute),"CurrentMediaState"in i.service().values&&((a=i.service().values)==null?null:a.CurrentMediaState)===1)),o(2),y("aria-label",d(3,5,"accessories.core.microphone")),o(9),v(i.service().customName||i.service().serviceName),o(),C("CurrentMediaState"in i.service().values?12:"Active"in i.service().values&&!((m=i.service().values)!=null&&m.Active)?13:"Mute"in i.service().values&&((m=i.service().values)!=null&&m.Mute)?14:"Volume"in i.service().values?15:be(11,l1).includes(i.service().customType||i.service().type)?16:17)}},dependencies:[J,w],encapsulation:2})}return e})();function x1(e,r){e&1&&(x(0,"div",25),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.detected")))}function S1(e,r){e&1&&(x(0,"div",26),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.not_detected")))}var To=(()=>{class e{service=B.required({});static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-motion-sensor"]],inputs:{service:[1,"service"]},decls:29,vars:7,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"orange-outline"],["transform","translate(7, -0.75), scale(0.075)"],["d","M190.85 83.94C190.85 70.36 180.09 59.24 166.93 59.24C153.78 59.24 143.02 70.36 143.02 83.94C143.02 97.53 153.78 108.65 166.93 108.65C180.09 108.65 190.85 97.53 190.85 83.94Z","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["d","M232.24 175.95C210.12 175.95 190.98 163.6 180.22 145.69C179.08 143.72 169.99 127.91 168.86 125.93C164.67 118.52 156.9 114.2 148.53 114.2C145.54 114.2 142.55 114.81 139.56 116.05C135.37 117.82 114.45 126.67 76.78 142.6L76.78 200.66L100.69 200.66L100.69 159.28L121.62 150.02L88.73 324.17L113.85 324.17L134.78 225.36L160.49 250.06L160.49 324.17L184.4 324.17L184.4 230.92L159.89 205.6C164.19 183.36 166.59 171.01 167.06 168.54C182.61 188.3 205.93 200.66 232.24 200.66C232.24 195.72 232.24 178.42 232.24 175.95Z","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["x","9","y","9","width","2","height","1","rx","0.2","stroke","#7f7f7f","fill","#1976d2","fill-opacity","0.25","stroke-width","0.25"],["x","7","y","13","width","3","height","1","rx","0.2","stroke","#7f7f7f","fill","#1976d2","fill-opacity","0.25","stroke-width","0.25"],["x","8","y","17","width","4","height","1","rx","0.2","stroke","#7f7f7f","fill","#1976d2","fill-opacity","0.25","stroke-width","0.25"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(n,i){if(n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4),x(6,"g",5),L(7,"path",6)(8,"path",7),k(),L(9,"rect",8)(10,"rect",9)(11,"rect",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23),k()(),N(),x(25,"div",24),p(26),k(),h(27,x1,3,3,"div",25)(28,S1,3,3,"div",26),k()()),n&2){let a,m;U("accessory-on",(a=i.service().values)==null?null:a.MotionDetected),o(2),y("aria-label",d(3,5,"accessories.core.motion_sensor")),o(24),v(i.service().customName||i.service().serviceName),o(),C((m=i.service().values)!=null&&m.MotionDetected?27:28)}},dependencies:[w],styles:[".accessory-on svg .orange-outline{stroke:#ff9800;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();function k1(e,r){e&1&&(x(0,"div",22),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.detected")))}function b1(e,r){e&1&&(x(0,"div",23),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.not_detected")))}var Mo=(()=>{class e{service=B.required({});static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-occupancy-sensor"]],inputs:{service:[1,"service"]},decls:26,vars:7,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"orange-outline"],["transform","translate(4.75, -0.75), scale(0.075)"],["d","M190.85 83.94C190.85 70.36 180.09 59.24 166.93 59.24C153.78 59.24 143.02 70.36 143.02 83.94C143.02 97.53 153.78 108.65 166.93 108.65C180.09 108.65 190.85 97.53 190.85 83.94Z","fill","#ff9800","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["d","M232.24 175.95C210.12 175.95 190.98 163.6 180.22 145.69C179.08 143.72 169.99 127.91 168.86 125.93C164.67 118.52 156.9 114.2 148.53 114.2C145.54 114.2 142.55 114.81 139.56 116.05C135.37 117.82 114.45 126.67 76.78 142.6L76.78 200.66L100.69 200.66L100.69 159.28L121.62 150.02L88.73 324.17L113.85 324.17L134.78 225.36L160.49 250.06L160.49 324.17L184.4 324.17L184.4 230.92L159.89 205.6C164.19 183.36 166.59 171.01 167.06 168.54C182.61 188.3 205.93 200.66 232.24 200.66C232.24 195.72 232.24 178.42 232.24 175.95Z","fill","#ff9800","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(n,i){if(n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4),x(6,"g",5),L(7,"path",6)(8,"path",7),k(),L(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20),k()(),N(),x(22,"div",21),p(23),k(),h(24,k1,3,3,"div",22)(25,b1,3,3,"div",23),k()()),n&2){let a,m;U("accessory-on",(a=i.service().values)==null?null:a.OccupancyDetected),o(2),y("aria-label",d(3,5,"accessories.core.occupancy_sensor")),o(21),v(i.service().customName||i.service().serviceName),o(),C((m=i.service().values)!=null&&m.OccupancyDetected?24:25)}},dependencies:[w],styles:[".accessory-on svg .orange-outline{stroke:#ff9800;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();var Bo=()=>[0,2];function T1(e,r){e&1&&(I(),f(0,"line",8)(1,"line",9)(2,"line",10))}function M1(e,r){e&1&&(I(),f(0,"line",11)(1,"line",12)(2,"line",13))}function B1(e,r){e&1&&(I(),f(0,"line",13)(1,"line",14)(2,"line",15))}var wo=(()=>{class e{$settings=D(Te);service=B.required({});readyForControl=B(!1,{});browserLang=this.$settings.browserLang;onClick(){this.readyForControl()&&("On"in this.service().values?this.service().getCharacteristic("On").setValue(!this.service().values.On):"Active"in this.service().values?this.service().getCharacteristic("Active").setValue(this.service().values.Active?0:1):"LockTargetState"in this.service().values?this.service().getCharacteristic("LockTargetState").setValue(this.service().values.LockTargetState?0:1):"TargetDoorState"in this.service().values&&this.service().getCharacteristic("TargetDoorState").setValue(this.service().values.TargetDoorState?0:1))}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-outlet"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:14,vars:12,consts:[["tabindex","0",1,"accessory-box",3,"shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","30","rx","6","ry","6","fill","none","stroke","#7f7f7f","stroke-width","1.5",1,"outer"],["cx","16","cy","16","r","10","fill","none","stroke","#7f7f7f","stroke-width","1.5",1,"inner"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"],["x1","16","y1","10","x2","16","y2","13","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","10","y1","19","x2","13","y2","19","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","19","y1","19","x2","22","y2","19","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","11.5","y1","14.5","x2","13.5","y2","11.5","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","18.5","y1","11.5","x2","20.5","y2","14.5","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","16","y1","19","x2","16","y2","22","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","10","y1","14","x2","13","y2","14","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","19","y1","14","x2","22","y2","14","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"rect",4)(6,"circle",5),h(7,T1,3,0)(8,M1,3,0)(9,B1,3,0),c()(),N(),s(10,"div",6),p(11),c(),f(12,"div",7),l(13,"translate"),c()()),n&2){let a,m;U("accessory-on",((a=i.service().values)==null?null:a.On)||((a=i.service().values)==null?null:a.Active)||"LockTargetState"in i.service().values&&!((a=i.service().values)!=null&&a.LockTargetState)||"CurrentDoorState"in i.service().values&&be(10,Bo).includes((a=i.service().values)==null?null:a.CurrentDoorState)),o(2),y("aria-label",d(3,6,"accessories.core.outlet")),o(5),C(i.browserLang==="en-GB"?7:i.browserLang==="en-AU"||i.browserLang==="en-NZ"?8:9),o(4),v(i.service().customName||i.service().serviceName),o(),b("innerText",d(13,8,(m=i.service().values)!=null&&m.On||(m=i.service().values)!=null&&m.Active||"LockTargetState"in i.service().values&&!((m=i.service().values)!=null&&m.LockTargetState)||"CurrentDoorState"in i.service().values&&be(11,Bo).includes((m=i.service().values)==null?null:m.CurrentDoorState)?"accessories.control.on":"accessories.control.off"))}},dependencies:[J,w],styles:[".accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] .outer[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75;stroke-width:2.5}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75}"]})}return e})();var Eo=(()=>{class e{service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&("On"in this.service().values?this.service().getCharacteristic("On").setValue(!this.service().values.On):"Active"in this.service().values&&this.service().getCharacteristic("Active").setValue(this.service().values.Active?0:1))}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-robot-vacuum"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:36,vars:9,consts:[["tabindex","0",1,"accessory-box",3,"shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","motionClip"],["x","0","y","-0.5","width","32","height","8"],["transform","translate(0, 5)"],["cx","16","cy","10","rx","14","ry","8.4","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["x1","2","y1","10","x2","2","y2","16","stroke","#7f7f7f","stroke-width","1.75"],["x1","30","y1","10","x2","30","y2","16","stroke","#7f7f7f","stroke-width","1.75"],["d","M2,16 A14,6.9 0 0,0 30,16","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["cx","16","cy","10","rx","4.2","ry","2.5","stroke","#7f7f7f","stroke-width","1","fill","#1976d2","fill-opacity","0.5"],["cx","16","cy","15","r","0.9","fill","#7f7f7f"],["x1","2","y1","16","x2","0.5","y2","18.5","stroke","#7f7f7f","stroke-width","1"],["x1","2","y1","16","x2","0.5","y2","14","stroke","#7f7f7f","stroke-width","1"],["x1","30","y1","16","x2","31.5","y2","18.5","stroke","#7f7f7f","stroke-width","1"],["x1","30","y1","16","x2","31.5","y2","14","stroke","#7f7f7f","stroke-width","1"],["clip-path","url(#motionClip)","stroke","#7f7f7f","stroke-linecap","round",1,"motion-lines",2,"display","none"],["x1","12","y1","8","x2","12","y2","14","stroke-width","2.1","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.3s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.3s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.3s","repeatCount","indefinite"],["x1","16","y1","8","x2","16","y2","14","stroke-width","2.5","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.6s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.6s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.6s","repeatCount","indefinite"],["x1","20","y1","8","x2","20","y2","14","stroke-width","2.1","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.9s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.9s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.9s","repeatCount","indefinite"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3)(5,"defs")(6,"clipPath",4),f(7,"rect",5),c()(),s(8,"g",6),f(9,"ellipse",7)(10,"line",8)(11,"line",9)(12,"path",10)(13,"ellipse",11)(14,"circle",12)(15,"line",13)(16,"line",14)(17,"line",15)(18,"line",16),c(),s(19,"g",17)(20,"line",18),f(21,"animate",19)(22,"animate",20)(23,"animate",21),c(),s(24,"line",22),f(25,"animate",23)(26,"animate",24)(27,"animate",25),c(),s(28,"line",26),f(29,"animate",27)(30,"animate",28)(31,"animate",29),c()()()(),N(),s(32,"div",30),p(33),c(),f(34,"div",31),l(35,"translate"),c()()),n&2){let a,m;U("accessory-on",((a=i.service().values)==null?null:a.On)||((a=i.service().values)==null?null:a.Active)),o(2),y("aria-label",d(3,5,"accessories.core.robot_vacuum")),o(31),v(i.service().customName||i.service().serviceName),o(),b("innerText",d(35,7,(m=i.service().values)!=null&&m.On||(m=i.service().values)!=null&&m.Active?"accessories.control.on":"accessories.control.off"))}},dependencies:[J,w],styles:[".accessory-on svg .motion-lines{display:inline!important}"]})}return e})();var oi=(e,r)=>({"fa-check-circle":e,"fa-blank":r});function w1(e,r){if(e&1){let t=j();x(0,"button",8),Ce("click",function(i){V(t);let a=u();return P(a.setTargetMode(3,i))}),x(1,"div",9),L(2,"i",10),k(),p(3),l(4,"translate"),x(5,"div",11),L(6,"i",12),k()()}if(e&2){let t=u();o(2),F(O(5,oi,t.targetMode===3,t.targetMode!==3)),o(),g(" ",d(4,3,"accessories.control.off")," ")}}function E1(e,r){if(e&1){let t=j();x(0,"button",8),Ce("click",function(i){V(t);let a=u();return P(a.setTargetMode(0,i))}),x(1,"div",9),L(2,"i",10),k(),p(3),l(4,"translate"),x(5,"div",11),L(6,"i",12),k()()}if(e&2){let t=u();o(2),F(O(5,oi,t.targetMode===0,t.targetMode!==0)),o(),g(" ",d(4,3,"accessories.control.home")," ")}}function D1(e,r){if(e&1){let t=j();x(0,"button",8),Ce("click",function(i){V(t);let a=u();return P(a.setTargetMode(1,i))}),x(1,"div",9),L(2,"i",10),k(),p(3),l(4,"translate"),x(5,"div",11),L(6,"i",12),k()()}if(e&2){let t=u();o(2),F(O(5,oi,t.targetMode===1,t.targetMode!==1)),o(),g(" ",d(4,3,"accessories.control.away")," ")}}function A1(e,r){if(e&1){let t=j();x(0,"button",8),Ce("click",function(i){V(t);let a=u();return P(a.setTargetMode(2,i))}),x(1,"div",9),L(2,"i",10),k(),p(3),l(4,"translate"),x(5,"div",11),L(6,"i",12),k()()}if(e&2){let t=u();o(2),F(O(5,oi,t.targetMode===2,t.targetMode!==2)),o(),g(" ",d(4,3,"accessories.control.night")," ")}}var Do=(()=>{class e extends ue{targetMode;targetModeValidValues=[];setupComponent(){this.targetMode=this.service().values.SecuritySystemTargetState,this.targetModeValidValues=this.service().getCharacteristic("SecuritySystemTargetState").validValues}handleAccessoryUpdate(){this.targetMode=this.service().values.SecuritySystemTargetState}setTargetMode(t,n){this.targetMode=t,this.service().getCharacteristic("SecuritySystemTargetState").setValue(this.targetMode),this.blurTarget(n)}static \u0275fac=(()=>{let t;return function(i){return(t||(t=pe(e)))(i||e)}})();static \u0275cmp=M({type:e,selectors:[["ng-component"]],features:[me],decls:13,vars:11,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"]],template:function(n,i){n&1&&(x(0,"div",0)(1,"div",1),L(2,"h5",2),x(3,"button",3),l(4,"translate"),Ce("click",function(){return i.dismissModal()}),k()(),x(5,"div",4)(6,"div",5),l(7,"translate"),h(8,w1,7,8,"button",6),h(9,E1,7,8,"button",6),h(10,D1,7,8,"button",6),h(11,A1,7,8,"button",6),k()(),L(12,"div",7),k()),n&2&&(o(2),qe("innerText",i.service().customName||i.service().serviceName),o(),y("aria-label",d(4,7,"form.button_close")),o(3),y("aria-label",d(7,9,"accessories.control.mode_control")),o(2),C(i.targetModeValidValues.includes(3)?8:-1),o(),C(i.targetModeValidValues.includes(0)?9:-1),o(),C(i.targetModeValidValues.includes(1)?10:-1),o(),C(i.targetModeValidValues.includes(2)?11:-1))},dependencies:[ne,w],encapsulation:2,changeDetection:0})}return e})();var I1=(e,r,t,n,i)=>({"accessory-on":e,home:r,away:t,night:n,triggered:i});function F1(e,r){e&1&&(s(0,"div",10),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.home")))}function L1(e,r){e&1&&(s(0,"div",10),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.away")))}function V1(e,r){e&1&&(s(0,"div",10),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.night")))}function P1(e,r){e&1&&(s(0,"div",11),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.off")))}function O1(e,r){e&1&&(s(0,"div",11),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.triggered")))}var Ao=(()=>{class e{$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});onClick(){if(!this.readyForControl())return;let t=this.$modal.open(Do,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-security-system"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:17,vars:13,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["d","M7 18 C7 5, 25 5, 25 18 V26 H7 V18 Z","fill","none","stroke","#7f7f7f","stroke-width","1.5","fill-opacity","0.5",1,"dome"],["x","2","y","26","width","28","height","4","fill","none","stroke","#7f7f7f","stroke-width","1.5","rx","1"],["x1","6","y1","3","x2","10","y2","7","stroke-width","3",1,"ray"],["x1","16","y1","0","x2","16","y2","5","stroke-width","3",1,"ray"],["x1","26","y1","3","x2","22","y2","7","stroke-width","3",1,"ray"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"path",4)(6,"rect",5)(7,"line",6)(8,"line",7)(9,"line",8),c()(),N(),s(10,"div",9),p(11),c(),h(12,F1,3,3,"div",10)(13,L1,3,3,"div",10)(14,V1,3,3,"div",10)(15,P1,3,3,"div",11)(16,O1,3,3,"div",11),c()()),n&2){let a,m;F(hn(7,I1,((a=i.service().values)==null?null:a.SecuritySystemCurrentState)!==3,((a=i.service().values)==null?null:a.SecuritySystemCurrentState)===0,((a=i.service().values)==null?null:a.SecuritySystemCurrentState)===1,((a=i.service().values)==null?null:a.SecuritySystemCurrentState)===2,((a=i.service().values)==null?null:a.SecuritySystemCurrentState)===4)),o(2),y("aria-label",d(3,5,"accessories.core.security_system")),o(9),v(i.service().customName||i.service().serviceName),o(),C((m=(m=i.service().values)==null?null:m.SecuritySystemCurrentState)===0?12:m===1?13:m===2?14:m===3?15:m===4?16:-1)}},dependencies:[J,w],styles:[".home svg .dome{fill:#1976d2!important} .away svg .dome{fill:#ff9800!important} .night svg .dome{fill:#673ab7!important} .triggered svg .dome{fill:#d32f2f!important} .triggered svg .ray{stroke:#d32f2f;stroke-opacity:.5;animation:_ngcontent-%COMP%_blink 1s infinite}@keyframes _ngcontent-%COMP%_blink{0%,to{stroke-opacity:1}50%{stroke-opacity:.2}}"]})}return e})();function N1(e,r){e&1&&(x(0,"div",17),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.detected")))}function H1(e,r){e&1&&(x(0,"div",18),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.not_detected")))}var Io=(()=>{class e{service=B.required({});static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-smoke-sensor"]],inputs:{service:[1,"service"]},decls:22,vars:7,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","12","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.25"],["text-anchor","middle","dominant-baseline","middle","font-family","Arial","font-size","7.5","x","16","y","7.7","fill","#7f7f7f","stroke-width","0.6","font-weight","900",1,"type"],["x1","6","y1","14.5","x2","25.5","y2","14.5","stroke","#1976d2","stroke-opacity","0.5","stroke-width","2"],["stroke-linecap","round","x1","5","y1","13","x2","6.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","13","x2","11","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","15.5","y1","13","x2","15.5","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","20","y1","13","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","26","y1","13","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","6.5","y1","16","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","21","x2","6","y2","27","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["stroke-linecap","round","x1","16","y1","21","x2","16","y2","31","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["stroke-linecap","round","x1","21","y1","21","x2","26","y2","27","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(n,i){if(n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4),x(6,"text",5),p(7," SMOKE "),k(),L(8,"line",6)(9,"line",7)(10,"line",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"line",13)(16,"line",14)(17,"line",15),k()(),N(),x(18,"div",16),p(19),k(),h(20,N1,3,3,"div",17)(21,H1,3,3,"div",18),k()()),n&2){let a,m;U("accessory-on",(a=i.service().values)==null?null:a.SmokeDetected),o(2),y("aria-label",d(3,5,"accessories.core.smoke_sensor")),o(17),v(i.service().customName||i.service().serviceName),o(),C((m=i.service().values)!=null&&m.SmokeDetected?20:21)}},dependencies:[w],styles:[".accessory-on svg .air-line{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite} .accessory-on svg .type{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();var _t=(e,r)=>({"fa-check-circle":e,"fa-blank":r});function R1(e,r){if(e&1){let t=j();s(0,"div",5),l(1,"translate"),s(2,"button",7),S("click",function(i){V(t);let a=u();return P(a.setActive(0,i))}),s(3,"div",8),f(4,"i",9),c(),p(5),l(6,"translate"),s(7,"div",10),f(8,"i",11),c()(),s(9,"button",7),S("click",function(i){V(t);let a=u();return P(a.setActive(1,i))}),s(10,"div",8),f(11,"i",9),c(),p(12),l(13,"translate"),s(14,"div",10),f(15,"i",11),c()()()}if(e&2){let t,n,i=u();y("aria-label",d(1,7,"accessories.control.mode_control")),o(4),F(O(13,_t,((t=i.service().values)==null?null:t.Active)===0,((t=i.service().values)==null?null:t.Active)!==0)),o(),g(" ",d(6,9,"accessories.control.off")," "),o(6),F(O(16,_t,((n=i.service().values)==null?null:n.Active)===1,((n=i.service().values)==null?null:n.Active)!==1)),o(),g(" ",d(13,11,"accessories.control.on")," ")}}function $1(e,r){if(e&1){let t=j();s(0,"div",5),l(1,"translate"),s(2,"button",7),S("click",function(i){V(t);let a=u();return P(a.setTargetState(0,i))}),s(3,"div",8),f(4,"i",9),c(),p(5),l(6,"translate"),s(7,"div",10),f(8,"i",11),c()(),s(9,"button",7),S("click",function(i){V(t);let a=u();return P(a.setTargetState(1,i))}),s(10,"div",8),f(11,"i",9),c(),p(12),l(13,"translate"),s(14,"div",10),f(15,"i",11),c()(),s(16,"button",7),S("click",function(i){V(t);let a=u();return P(a.setTargetState(2,i))}),s(17,"div",8),f(18,"i",9),c(),p(19),l(20,"translate"),s(21,"div",10),f(22,"i",11),c()()()}if(e&2){let t,n,i,a=u();y("aria-label",d(1,10,"accessories.control.media_control")),o(4),F(O(18,_t,((t=a.service().values)==null?null:t.CurrentMediaState)===0,((t=a.service().values)==null?null:t.CurrentMediaState)!==0)),o(),g(" ",d(6,12,"accessories.control.play")," "),o(6),F(O(21,_t,((n=a.service().values)==null?null:n.CurrentMediaState)===1,((n=a.service().values)==null?null:n.CurrentMediaState)!==1)),o(),g(" ",d(13,14,"accessories.control.pause")," "),o(6),F(O(24,_t,((i=a.service().values)==null?null:i.CurrentMediaState)===2,((i=a.service().values)==null?null:i.CurrentMediaState)!==2)),o(),g(" ",d(20,16,"accessories.control.stop")," ")}}function U1(e,r){if(e&1){let t=j();s(0,"h6"),p(1),l(2,"translate"),c(),s(3,"div",12),l(4,"translate"),s(5,"button",7),S("click",function(i){V(t);let a=u();return P(a.setTargetMode(!1,i))}),s(6,"div",8),f(7,"i",9),c(),p(8),l(9,"translate"),s(10,"div",10),f(11,"i",11),c()(),s(12,"button",7),S("click",function(i){V(t);let a=u();return P(a.setTargetMode(!0,i))}),s(13,"div",8),f(14,"i",9),c(),p(15),l(16,"translate"),s(17,"div",10),f(18,"i",11),c()()()}if(e&2){let t=u();o(),g(" ",d(2,8,"Active"in t.service().values||"TargetMediaState"in t.service().values?"accessories.control.speaker_volume":"menu.label_status")," "),o(2),y("aria-label",d(4,10,"accessories.control.mute_control")),o(4),F(O(16,_t,!t.targetMode,t.targetMode)),o(),g(" ",d(9,12,"accessories.control.not_mute")," "),o(6),F(O(19,_t,t.targetMode,!t.targetMode)),o(),g(" ",d(16,14,"accessories.control.mute")," ")}}function W1(e,r){if(e&1){let t=j();s(0,"h6",13),p(1),l(2,"translate"),c(),s(3,"nouislider",14),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.targetVolume.value,i)||(a.targetVolume.value=i),P(i)}),S("ngModelChange",function(){V(t);let i=u();return P(i.onVolumeStateChange())}),c()}if(e&2){let t=u();o(),$("",d(2,6,"accessories.control.speaker_volume"),": ",t.targetVolume.value,"%"),o(2),b("min",t.targetVolume.min)("max",t.targetVolume.max)("step",t.targetVolume.step),Z("ngModel",t.targetVolume.value)}}var Fo=(()=>{class e extends ue{targetMode;targetVolume;targetVolumeChanged=new ee;setupComponent(){this.createDebouncedSubscription(this.targetVolumeChanged,()=>{this.service().getCharacteristic("Volume").setValue(this.targetVolume.value)}),this.targetMode=this.service().values.Mute,this.loadTargetVolume()}handleAccessoryUpdate(){this.targetMode=this.service().values.Mute,this.targetVolume&&"Volume"in this.service().values&&(this.targetVolume.value=this.service().getCharacteristic("Volume").value)}setTargetMode(t,n){this.targetMode=t,this.service().getCharacteristic("Mute").setValue(this.targetMode),this.blurTarget(n)}setActive(t,n){this.service().getCharacteristic("Active").setValue(t),this.blurTarget(n)}setTargetState(t,n){this.service().getCharacteristic("TargetMediaState").setValue(t),this.blurTarget(n)}onVolumeStateChange(){this.targetVolumeChanged.next(this.targetVolume.value)}loadTargetVolume(){let t=this.service().getCharacteristic("Volume");t&&(this.targetVolume={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},this.applySliderGradient("linear-gradient(to right, #ffffff, #ffd966, #ff0000)"))}static \u0275fac=(()=>{let t;return function(i){return(t||(t=pe(e)))(i||e)}})();static \u0275cmp=M({type:e,selectors:[["ng-component"]],features:[me],decls:11,vars:7,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],[1,"mt-4","mb-0"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(n,i){n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4),h(6,R1,16,19,"div",5)(7,$1,23,27,"div",5),h(8,U1,19,22),h(9,W1,4,8),c(),f(10,"div",6),c()),n&2&&(o(2),b("innerText",i.service().customName||i.service().serviceName),o(),y("aria-label",d(4,5,"form.button_close")),o(3),C("Active"in i.service().values?6:"TargetMediaState"in i.service().values?7:-1),o(2),C("Mute"in i.service().values?8:-1),o(),C(i.targetVolume?9:-1))},dependencies:[ne,ae,se,le,w],encapsulation:2,changeDetection:0})}return e})();var G1=()=>[0,1],j1=(e,r,t)=>({"accessory-on":e,paused:r,muted:t}),q1=()=>["Speaker","SmartSpeaker"];function z1(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.play")," ")}function K1(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.pause")," ")}function Z1(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.stop")," ")}function Y1(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" \xB7 ",d(1,1,"accessories.control.mute")," ")}function Q1(e,r){if(e&1&&p(0),e&2){let t,n=u(3);g(" \xB7 ",(t=n.service().values)==null?null:t.Volume,"% ")}}function J1(e,r){if(e&1&&h(0,Q1,1,1),e&2){let t=u(2);C("Volume"in t.service().values?0:-1)}}function X1(e,r){if(e&1&&(s(0,"div",14),h(1,z1,2,3)(2,K1,2,3)(3,Z1,2,3),h(4,Y1,2,3)(5,J1,1,1),c()),e&2){let t,n,i=u();o(),C((t=(t=i.service().values)==null?null:t.CurrentMediaState)===0?1:t===1?2:t===2?3:-1),o(3),C("Mute"in i.service().values&&((n=i.service().values)!=null&&n.Mute)?4:5)}}function ed(e,r){e&1&&(f(0,"div",15),l(1,"translate")),e&2&&b("innerText",d(1,1,"accessories.control.off"))}function td(e,r){e&1&&(f(0,"div",15),l(1,"translate")),e&2&&b("innerText",d(1,1,"accessories.control.mute"))}function id(e,r){if(e&1&&(s(0,"div",14),p(1),c()),e&2){let t,n=u();o(),g("",(t=n.service().values)==null?null:t.Volume,"%")}}function nd(e,r){e&1&&(s(0,"div",14),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.on")))}function od(e,r){e&1&&(s(0,"div",14),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.speaker")))}var Lo=(()=>{class e{$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&("Active"in this.service().values?this.service().getCharacteristic("Active").setValue(this.service().values.Active===0?1:0):"TargetMediaState"in this.service().values?this.service().getCharacteristic("TargetMediaState").setValue(this.service().values.TargetMediaState===0?1:0):"Mute"in this.service().values&&this.service().getCharacteristic("Mute").setValue(!this.service().values.Mute))}onLongClick(){if(this.readyForControl()&&("Active"in this.service().values||"TargetMediaState"in this.service().values||"Volume"in this.service().values||"Mute"in this.service().values)){let t=this.$modal.open(Fo,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-speaker"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:22,vars:13,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","6","y","1","width","20","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1"],["cx","16","cy","9","r","4.5","stroke","#7f7f7f","stroke-width","0","fill","#7f7f7f"],["cx","16","cy","9","r","1.5","stroke","#7f7f7f","stroke-width","0","fill","#e1e1e1",1,"inner"],["cx","16","cy","22","r","6","stroke","#7f7f7f","stroke-width","0","fill","#7f7f7f"],["cx","16","cy","22","r","2","stroke","#7f7f7f","stroke-width","0","fill","#e1e1e1",1,"inner"],["d","M4,12 Q1,16 4,20","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-inner"],["d","M3,10 Q-2,16 3,22","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-outer"],["d","M28,12 Q31,16 28,20","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-inner"],["d","M29,10 Q34,16 29,22","stroke","#1976d2","fill","none","stroke-width","1","stroke-opacity","0",1,"wave-outer"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"rect",4)(6,"circle",5)(7,"circle",6)(8,"circle",7)(9,"circle",8)(10,"path",9)(11,"path",10)(12,"path",11)(13,"path",12),c()(),N(),s(14,"div",13),p(15),c(),h(16,X1,6,2,"div",14)(17,ed,2,3,"div",15)(18,td,2,3,"div",15)(19,id,2,1,"div",14)(20,nd,3,3,"div",14)(21,od,3,3,"div",14),c()()),n&2){let a,m;F(Bt(8,j1,"Active"in i.service().values?(a=i.service().values)==null?null:a.Active:"CurrentMediaState"in i.service().values?be(7,G1).includes((a=i.service().values)==null?null:a.CurrentMediaState):"Mute"in i.service().values&&"Volume"in i.service().values?!((a=i.service().values)!=null&&a.Mute)&&((a=i.service().values)==null?null:a.Volume)>0:"Mute"in i.service().values&&!((a=i.service().values)!=null&&a.Mute),"CurrentMediaState"in i.service().values&&((a=i.service().values)==null?null:a.CurrentMediaState)===1,"Mute"in i.service().values&&((a=i.service().values)==null?null:a.Mute))),o(2),y("aria-label",d(3,5,"accessories.core.speaker")),o(13),v(i.service().customName||i.service().serviceName),o(),C("CurrentMediaState"in i.service().values?16:"Active"in i.service().values&&!((m=i.service().values)!=null&&m.Active)?17:"Mute"in i.service().values&&((m=i.service().values)!=null&&m.Mute)?18:"Volume"in i.service().values?19:be(12,q1).includes(i.service().customType||i.service().type)?20:21)}},dependencies:[J,w],styles:[".accessory-on:not(.paused):not(.muted) svg .wave-inner{animation:_ngcontent-%COMP%_pulse-inner 2s infinite} .accessory-on:not(.paused):not(.muted) svg .wave-outer{animation:_ngcontent-%COMP%_pulse-outer 2s infinite}@keyframes _ngcontent-%COMP%_pulse-inner{0%{stroke-opacity:.5}50%{stroke-opacity:1}to{stroke-opacity:.5}}@keyframes _ngcontent-%COMP%_pulse-outer{0%{stroke-opacity:.3}50%{stroke-opacity:.8}to{stroke-opacity:.3}} body.dark-mode div.accessory-box:not(.accessory-on) svg .inner{fill:#2b2b2b!important}"]})}return e})();var rd=(e,r,t)=>({"press-single":e,"press-double":r,"press-long":t}),Vo=(()=>{class e{service=B.required({});static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-stateless-programmable-switch"]],inputs:{service:[1,"service"]},decls:17,vars:13,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","2"],["cx","8.5","cy","9.5","r","5","stroke","#7f7f7f","stroke-width","1","fill","none","fill-opacity","0.5",1,"single"],["cx","23.5","cy","9.5","r","5","stroke","#7f7f7f","stroke-width","1","fill","none","fill-opacity","0.5",1,"double"],["cx","23.5","cy","9.5","r","3","stroke","#7f7f7f","stroke-width","1","fill","none"],["cx","16","cy","23.5","r","5","stroke","#7f7f7f","stroke-width","1","fill","none","fill-opacity","0.5",1,"long"],["x1","5","y1","23.5","x2","11","y2","23.5","stroke","#7f7f7f","stroke-width","0.5","stroke-linecap","round"],["x1","21","y1","23.5","x2","27","y2","23.5","stroke","#7f7f7f","stroke-width","0.5","stroke-linecap","round"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(n,i){if(n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4)(6,"circle",5)(7,"circle",6)(8,"circle",7)(9,"circle",8)(10,"line",9)(11,"line",10),k()(),N(),x(12,"div",11),p(13),k(),x(14,"div",12),p(15),l(16,"translate"),k()()()),n&2){let a;F(Bt(9,rd,((a=i.service().values)==null?null:a.ProgrammableSwitchEvent)===0,((a=i.service().values)==null?null:a.ProgrammableSwitchEvent)===1,((a=i.service().values)==null?null:a.ProgrammableSwitchEvent)===2)),o(2),y("aria-label",d(3,5,"accessories.core.stateless_programmable_switch")),o(11),v(i.service().customName||i.service().serviceName),o(2),v(d(16,7,"accessories.control.stateless"))}},dependencies:[w],styles:[".press-single svg .single{fill:#1976d2!important} .press-double svg .double{fill:#1976d2!important} .press-long svg .long{fill:#1976d2!important}"]})}return e})();var Po=()=>[0,2],Oo=(()=>{class e{service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&("On"in this.service().values?this.service().getCharacteristic("On").setValue(!this.service().values.On):"Active"in this.service().values?this.service().getCharacteristic("Active").setValue(this.service().values.Active?0:1):"LockTargetState"in this.service().values?this.service().getCharacteristic("LockTargetState").setValue(this.service().values.LockTargetState?0:1):"TargetDoorState"in this.service().values&&this.service().getCharacteristic("TargetDoorState").setValue(this.service().values.TargetDoorState?0:1))}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-switch"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:12,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","16","cy","16","r","14","fill","none","stroke","#7f7f7f","stroke-width","2"],["x1","16","y1","8","x2","16","y2","14","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["fill","#7f7f7f","d",`M21.4589329,9.49999998
13
+ C21,9.97698687 21.1735519,10.8351 21.4589326,11.2029426
14
+ C22.4505994,12.4811551 23,14.065977 23,15.7447101
15
+ C23,19.7640218 19.8532802,23 16,23
16
+ C12.1467198,23 9,19.7640218 9,15.7447101
17
+ C9,14.0415493 9.56560927,12.4352187 10.5838497,11.1483389
18
+ C10.8725653,10.7834523 11,9.9670534 10.5,9.49999999
19
+ C10,9.03294657 9.01543812,9.9073372 9.01543812,9.9073372
20
+ C7.75536735,11.4998488 7,13.5315645 7,15.7447101
21
+ C7,20.8562656 11.0294373,25 16,25
22
+ C20.9705627,25 25,20.8562656 25,15.7447101
23
+ C25,13.5637007 24.2664101,11.5588905 23.0391328,9.97698685
24
+ C23.0391328,9.97698685 21.9178658,9.0230131 21.4589329,9.49999998 Z`],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"circle",4)(6,"line",5)(7,"path",6),c()(),N(),s(8,"div",7),p(9),c(),f(10,"div",8),l(11,"translate"),c()()),n&2){let a,m;U("accessory-on",((a=i.service().values)==null?null:a.On)||((a=i.service().values)==null?null:a.Active)||"LockTargetState"in i.service().values&&!((a=i.service().values)!=null&&a.LockTargetState)||"CurrentDoorState"in i.service().values&&be(9,Po).includes((a=i.service().values)==null?null:a.CurrentDoorState)),o(2),y("aria-label",d(3,5,"accessories.core.switch")),o(7),v(i.service().customName||i.service().serviceName),o(),b("innerText",d(11,7,(m=i.service().values)!=null&&m.On||(m=i.service().values)!=null&&m.Active||"LockTargetState"in i.service().values&&!((m=i.service().values)!=null&&m.LockTargetState)||"CurrentDoorState"in i.service().values&&be(10,Po).includes((m=i.service().values)==null?null:m.CurrentDoorState)?"accessories.control.on":"accessories.control.off"))}},dependencies:[J,w],styles:[".accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] circle[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75;stroke-width:2.5}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] line[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:#1976d2;fill-opacity:.75}"]})}return e})();var ad=(e,r)=>({"mb-4":e,"mb-0":r}),Ai=(e,r)=>({"fa-check-circle":e,"fa-blank":r});function sd(e,r){if(e&1){let t=j();x(0,"div",7),l(1,"translate"),x(2,"button",8),Ce("click",function(i){V(t);let a=u();return P(a.setActive(0,i))}),x(3,"div",9),L(4,"i",10),k(),p(5),l(6,"translate"),x(7,"div",11),L(8,"i",12),k()(),x(9,"button",8),Ce("click",function(i){V(t);let a=u();return P(a.setActive(1,i))}),x(10,"div",9),L(11,"i",10),k(),p(12),l(13,"translate"),x(14,"div",11),L(15,"i",12),k()()()}if(e&2){let t,n,i=u();F(O(15,ad,i.sourceList.length,!i.sourceList.length)),y("aria-label",d(1,9,"accessories.control.mode_control")),o(4),F(O(18,Ai,((t=i.service().values)==null?null:t.Active)===0,((t=i.service().values)==null?null:t.Active)!==0)),o(),g(" ",d(6,11,"accessories.control.off")," "),o(6),F(O(21,Ai,((n=i.service().values)==null?null:n.Active)===1,((n=i.service().values)==null?null:n.Active)!==1)),o(),g(" ",d(13,13,"accessories.control.on")," ")}}function ld(e,r){e&1&&(x(0,"h6"),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.input")))}function cd(e,r){if(e&1){let t=j();x(0,"button",8),Ce("click",function(i){let a=V(t).$implicit,m=u(2);return P(m.setInput(a.identifier,i))}),x(1,"div",9),L(2,"i",10),k(),p(3),x(4,"div",11),L(5,"i",12),k()()}if(e&2){let t,n=r.$implicit,i=u(2);o(2),F(O(3,Ai,((t=i.service().values)==null?null:t.ActiveIdentifier)===n.identifier,((t=i.service().values)==null?null:t.ActiveIdentifier)!==n.identifier)),o(),g(" ",n.name," ")}}function dd(e,r){if(e&1&&(h(0,ld,3,3,"h6"),x(1,"div",13),l(2,"translate"),Ye(3,cd,6,6,"button",14,tt),k()),e&2){let t=u();C(t.hasActive?0:-1),o(),y("aria-label",d(2,2,"accessories.control.input_control")),o(2),Qe(t.sourceList)}}var No=(()=>{class e extends ue{inputList=B.required({});hasActive=!1;sourceList=[];setupComponent(){"Active"in this.service().values&&(this.hasActive=!0),Object.keys(this.inputList).length&&Object.entries(this.inputList).forEach(([t,n])=>{this.sourceList.push({identifier:Number.parseInt(t,10),name:n})})}handleAccessoryUpdate(){"Active"in this.service().values&&(this.hasActive=!0)}setActive(t,n){this.service().getCharacteristic("Active").setValue(t),this.blurTarget(n)}setInput(t,n){this.service().getCharacteristic("ActiveIdentifier").setValue(t),this.blurTarget(n)}static \u0275fac=(()=>{let t;return function(i){return(t||(t=pe(e)))(i||e)}})();static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{inputList:[1,"inputList"]},features:[me],decls:9,vars:6,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0",3,"class"],[1,"modal-footer"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"]],template:function(n,i){n&1&&(x(0,"div",0)(1,"div",1),L(2,"h5",2),x(3,"button",3),l(4,"translate"),Ce("click",function(){return i.dismissModal()}),k()(),x(5,"div",4),h(6,sd,16,24,"div",5),h(7,dd,5,4),k(),L(8,"div",6),k()),n&2&&(o(2),qe("innerText",i.service().customName||i.service().serviceName),o(),y("aria-label",d(4,4,"form.button_close")),o(3),C(i.hasActive?6:-1),o(),C(i.sourceList.length?7:-1))},dependencies:[ne,w],encapsulation:2,changeDetection:0})}return e})();function pd(e,r){if(e&1&&(s(0,"div",7),p(1),l(2,"translate"),c()),e&2){let t,n=u();o(),g(" ",n.channelList[(t=n.service().values)==null?null:t.ActiveIdentifier]||d(2,1,"accessories.control.on")," ")}}function md(e,r){e&1&&(s(0,"div",7),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.off")))}var Ho=(()=>{class e{$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});channelList={};ngOnInit(){if(this.service().linkedServices)for(let[,t]of Object.entries(this.service().linkedServices))t.type==="InputSource"&&(this.channelList[t.values.Identifier]=t.values.ConfiguredName||`Input ${t.values.Identifier}`)}onClick(){this.readyForControl()&&("Active"in this.service().values?this.service().getCharacteristic("Active").setValue(this.service().values.Active?0:1):"On"in this.service().values&&this.service().getCharacteristic("On").setValue(!this.service().values.On))}onLongClick(){if(this.readyForControl()&&("Active"in this.service().values||Object.keys(this.channelList).length)){let t=this.$modal.open(No,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.inputList=this.channelList,t.componentInstance.$accessories=this.$accessories}}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-television"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:11,vars:7,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x1","10","y1","27.25","x2","22","y2","27.25","stroke","#d32f2f","stroke-width","4","stroke-linecap","round","stroke-opacity","0.75",1,"stand"],["x","1","y","6","width","30","height","20","rx","2","stroke","#7f7f7f","fill","#808080","stroke-width","1.5",1,"screen"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"line",4)(6,"rect",5),c()(),N(),s(7,"div",6),p(8),c(),h(9,pd,3,3,"div",7)(10,md,3,3,"div",7),c()()),n&2){let a,m,A;U("accessory-on",((a=i.service().values)==null?null:a.Active)||((a=i.service().values)==null?null:a.On)),o(2),y("aria-label",d(3,5,"accessories.core.television")),o(6),g(" ",i.service().customName||((m=i.service().values)==null?null:m.ConfiguredName)||i.service().serviceName," "),o(),C((A=i.service().values)!=null&&A.On||(A=i.service().values)!=null&&A.Active?9:10)}},dependencies:[J,w],styles:["body.dark-mode .screen{fill:#2b2b2b;stroke:#7f7f7f} .accessory-on svg .screen{animation:_ngcontent-%COMP%_color-change 3s infinite alternate} .accessory-on svg .stand{stroke:#7f7f7f;stroke-opacity:1}@keyframes _ngcontent-%COMP%_color-change{0%{fill:#4fc3f7}to{fill:#0288d1}}"]})}return e})();function ud(e,r){if(e&1&&(p(0),l(1,"convertTemp"),l(2,"number"),l(3,"uppercase")),e&2){let t,n=u();$(" ",ce(2,4,d(1,2,(t=n.service().values)==null?null:t.CurrentTemperature),"1.0-1"),"\xB0",d(3,7,n.temperatureUnits)," ")}}function fd(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.no_data")," ")}var Ro=(()=>{class e{$settings=D(Te);service=B.required({});temperatureUnits=this.$settings.env.temperatureUnits;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-temperature-sensor"]],inputs:{service:[1,"service"]},decls:34,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x1","16","y1","5","x2","16","y2","17","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["cx","16","cy","20","r","3","stroke","#7f7f7f","stroke-width","1.2","fill","#1976d2","fill-opacity","0.5"],["x1","9","y1","6","x2","13","y2","6","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","9","x2","13","y2","9","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","12","x2","13","y2","12","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","15","x2","13","y2","15","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","6","x2","23","y2","6","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","9","x2","23","y2","9","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","12","x2","23","y2","12","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","15","x2","23","y2","15","stroke","#7f7f7f","stroke-width","0.8"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(n,i){n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4)(6,"line",5)(7,"circle",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24)(26,"line",25)(27,"line",26)(28,"line",27),k()(),N(),x(29,"div",28),p(30),k(),x(31,"div",29),h(32,ud,4,9)(33,fd,2,3),k()()()),n&2&&(o(2),y("aria-label",d(3,3,"accessories.core.temperature_sensor")),o(28),v(i.service().customName||i.service().serviceName),o(2),C("CurrentTemperature"in i.service().values?32:33))},dependencies:[Ee,Ve,He,w],styles:[".temperature-circle[_ngcontent-%COMP%]{position:relative;display:inline-block;width:50px;height:50px;line-height:50px;border-radius:50%;font-size:14px;text-align:center;margin-bottom:6px;background-color:gray;color:#d3d3d3}@media(max-width:575px){.temperature-circle-collapse[_ngcontent-%COMP%]{width:31px;height:31px;line-height:31px;font-size:10px;margin-bottom:7px}}"]})}return e})();var ri=(e,r)=>({"fa-check-circle":e,"fa-blank":r});function vd(e,r){if(e&1&&p(0),e&2){let t,n=u();g(" \xB7 ",(t=n.service().values)==null?null:t.CurrentRelativeHumidity,"% ")}}function gd(e,r){if(e&1){let t=j();s(0,"button",10),S("click",function(i){V(t);let a=u();return P(a.setTargetMode(0,i))}),s(1,"div",11),f(2,"i",12),c(),p(3),l(4,"translate"),s(5,"div",13),f(6,"i",14),c()()}if(e&2){let t=u();o(2),F(O(5,ri,t.targetMode===0,t.targetMode!==0)),o(),g(" ",d(4,3,"accessories.control.off")," ")}}function hd(e,r){if(e&1){let t=j();s(0,"button",10),S("click",function(i){V(t);let a=u();return P(a.setTargetMode(3,i))}),s(1,"div",11),f(2,"i",12),c(),p(3),l(4,"translate"),s(5,"div",13),f(6,"i",14),c()()}if(e&2){let t=u();o(2),F(O(5,ri,t.targetMode===3,t.targetMode!==3)),o(),g(" ",d(4,3,"accessories.control.auto")," ")}}function Cd(e,r){if(e&1){let t=j();s(0,"button",10),S("click",function(i){V(t);let a=u();return P(a.setTargetMode(1,i))}),s(1,"div",11),f(2,"i",12),c(),p(3),l(4,"translate"),s(5,"div",13),f(6,"i",14),c()()}if(e&2){let t=u();o(2),F(O(5,ri,t.targetMode===1,t.targetMode!==1)),o(),g(" ",d(4,3,"accessories.control.heat")," ")}}function _d(e,r){if(e&1){let t=j();s(0,"button",10),S("click",function(i){V(t);let a=u();return P(a.setTargetMode(2,i))}),s(1,"div",11),f(2,"i",12),c(),p(3),l(4,"translate"),s(5,"div",13),f(6,"i",14),c()()}if(e&2){let t=u();o(2),F(O(5,ri,t.targetMode===2,t.targetMode!==2)),o(),g(" ",d(4,3,"accessories.control.cool")," ")}}function yd(e,r){if(e&1){let t=j();s(0,"h6",15),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),c(),s(6,"nouislider",16),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.targetTemperature.value,i)||(a.targetTemperature.value=i),P(i)}),S("ngModelChange",function(){V(t);let i=u();return P(i.onTemperatureStateChange())}),c()}if(e&2){let t=u();o(),Je(" ",d(2,7,"accessories.control.target"),": ",ce(4,11,d(3,9,t.targetTemperature.value),"1.0-1"),"\xB0",d(5,14,t.temperatureUnits)," "),o(5),b("min",t.targetTemperature.min)("max",t.targetTemperature.max)("step",t.targetTemperature.step),Z("ngModel",t.targetTemperature.value)}}function xd(e,r){if(e&1){let t=j();s(0,"h6",17),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),l(6,"convertTemp"),l(7,"number"),l(8,"uppercase"),c(),s(9,"nouislider",16),Q("ngModelChange",function(i){V(t);let a=u(2);return Y(a.autoTemp,i)||(a.autoTemp=i),P(i)}),S("ngModelChange",function(){V(t);let i=u(2);return P(i.onAutoThresholdStateChange())}),c()}if(e&2){let t=u(2);o(),Mt(" ",d(2,9,"accessories.control.threshold_auto"),": ",ce(4,13,d(3,11,t.autoTemp[0]),"1.0-1"),"\xB0",d(5,16,t.temperatureUnits)," - ",ce(7,20,d(6,18,t.autoTemp[1]),"1.0-1"),"\xB0",d(8,23,t.temperatureUnits)," "),o(8),b("min",t.HeatingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),Z("ngModel",t.autoTemp)}}function Sd(e,r){if(e&1){let t=j();s(0,"h6",15),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),c(),s(6,"nouislider",16),Q("ngModelChange",function(i){V(t);let a=u(2);return Y(a.targetHeatingTemp,i)||(a.targetHeatingTemp=i),P(i)}),S("ngModelChange",function(){V(t);let i=u(2);return P(i.onThresholdStateChange())}),c()}if(e&2){let t=u(2);o(),Je(" ",d(2,7,"accessories.control.threshold_auto"),": ",ce(4,11,d(3,9,t.targetHeatingTemp),"1.0-1"),"\xB0",d(5,14,t.temperatureUnits)," "),o(5),b("min",t.HeatingThresholdTemperature.minValue)("max",t.HeatingThresholdTemperature.maxValue)("step",t.HeatingThresholdTemperature.minStep),Z("ngModel",t.targetHeatingTemp)}}function kd(e,r){if(e&1){let t=j();s(0,"h6",15),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),c(),s(6,"nouislider",16),Q("ngModelChange",function(i){V(t);let a=u(2);return Y(a.targetCoolingTemp,i)||(a.targetCoolingTemp=i),P(i)}),S("ngModelChange",function(){V(t);let i=u(2);return P(i.onThresholdStateChange())}),c()}if(e&2){let t=u(2);o(),Je(" ",d(2,7,"accessories.control.threshold_auto"),": ",ce(4,11,d(3,9,t.targetCoolingTemp),"1.0-1"),"\xB0",d(5,14,t.temperatureUnits)," "),o(5),b("min",t.CoolingThresholdTemperature.minValue)("max",t.CoolingThresholdTemperature.maxValue)("step",t.CoolingThresholdTemperature.minStep),Z("ngModel",t.targetCoolingTemp)}}function bd(e,r){if(e&1&&h(0,xd,10,25)(1,Sd,7,16)(2,kd,7,16),e&2){let t=u();C(t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?0:t.HeatingThresholdTemperature&&!t.CoolingThresholdTemperature?1:!t.HeatingThresholdTemperature&&t.CoolingThresholdTemperature?2:-1)}}var $o=(()=>{class e extends ue{$settings=D(Te);targetMode;targetTemperature;targetTemperatureChanged=new ee;targetThresholdChanged=new ee;targetStateValidValues=[];CoolingThresholdTemperature;HeatingThresholdTemperature;targetCoolingTemp;targetHeatingTemp;autoTemp;hasHumidity=!1;temperatureUnits=this.$settings.env.temperatureUnits;setupComponent(){this.createDebouncedSubscription(this.targetTemperatureChanged,()=>{this.service().getCharacteristic("TargetTemperature").setValue(this.targetTemperature.value)}),this.createDebouncedSubscription(this.targetThresholdChanged,()=>{this.HeatingThresholdTemperature&&this.service().getCharacteristic("HeatingThresholdTemperature").setValue(this.targetHeatingTemp),this.CoolingThresholdTemperature&&this.service().getCharacteristic("CoolingThresholdTemperature").setValue(this.targetCoolingTemp)}),this.targetMode=this.service().values.TargetHeatingCoolingState,this.CoolingThresholdTemperature=this.service().getCharacteristic("CoolingThresholdTemperature"),this.HeatingThresholdTemperature=this.service().getCharacteristic("HeatingThresholdTemperature"),this.targetStateValidValues=this.service().getCharacteristic("TargetHeatingCoolingState").validValues,this.loadTargetTemperature(),this.service().getCharacteristic("CurrentRelativeHumidity")&&(this.hasHumidity=!0),this.applyThermostatGradient()}handleAccessoryUpdate(){this.targetMode=this.service().values.TargetHeatingCoolingState,this.targetTemperature&&(this.targetTemperature.value=this.service().getCharacteristic("TargetTemperature").value),this.CoolingThresholdTemperature&&(this.targetCoolingTemp=this.service().getCharacteristic("CoolingThresholdTemperature").value),this.HeatingThresholdTemperature&&(this.targetHeatingTemp=this.service().getCharacteristic("HeatingThresholdTemperature").value),this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.applyThermostatGradient()}setTargetMode(t,n){this.targetMode=t,this.service().getCharacteristic("TargetHeatingCoolingState").setValue(this.targetMode),this.blurTarget(n),this.applyThermostatGradient()}onTemperatureStateChange(){this.targetTemperatureChanged.next(this.targetTemperature.value)}onThresholdStateChange(){this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.targetThresholdChanged.next(void 0)}onAutoThresholdStateChange(){this.targetHeatingTemp=this.autoTemp[0],this.targetCoolingTemp=this.autoTemp[1],this.targetThresholdChanged.next(void 0)}loadTargetTemperature(){let t=this.service().getCharacteristic("TargetTemperature");this.targetTemperature={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep||.5},this.targetCoolingTemp=this.service().getCharacteristic("CoolingThresholdTemperature")?.value,this.targetHeatingTemp=this.service().getCharacteristic("HeatingThresholdTemperature")?.value,this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp]}applyThermostatGradient(){this.applySliderGradient("linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))")}static \u0275fac=(()=>{let t;return function(i){return(t||(t=pe(e)))(i||e)}})();static \u0275cmp=M({type:e,selectors:[["ng-component"]],features:[me],decls:22,vars:25,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mt-2","mb-4","fs-4"],[1,"fas","fa-temperature-full"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control"],[1,"modal-footer"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[1,"mt-4","mb-1"]],template:function(n,i){if(n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4)(6,"h6",5),f(7,"i",6),p(8),l(9,"convertTemp"),l(10,"number"),l(11,"uppercase"),h(12,vd,1,1),c(),s(13,"div",7),l(14,"translate"),h(15,gd,7,8,"button",8),h(16,hd,7,8,"button",8),h(17,Cd,7,8,"button",8),h(18,_d,7,8,"button",8),c(),h(19,yd,7,16),h(20,bd,3,1),c(),f(21,"div",9),c()),n&2){let a,m;o(2),b("innerText",i.service().customName||i.service().serviceName),o(),y("aria-label",d(4,14,"form.button_close")),o(4),st("color",((a=i.service().values)==null?null:a.CurrentHeatingCoolingState)===2?"#1e8bbd":((a=i.service().values)==null?null:a.CurrentHeatingCoolingState)===1?"#e69533":((a=i.service().values)==null?null:a.TargetHeatingCoolingState)===3?"#42d672":"#7b7b7b"),o(),$("",ce(10,18,d(9,16,(m=i.service().values)==null?null:m.CurrentTemperature),"1.0-1"),"\xB0",d(11,21,i.temperatureUnits)," "),o(4),C(i.hasHumidity?12:-1),o(),y("aria-label",d(14,23,"accessories.control.mode_control")),o(2),C(i.targetStateValidValues.includes(0)?15:-1),o(),C(i.targetStateValidValues.includes(3)?16:-1),o(),C(i.targetStateValidValues.includes(1)?17:-1),o(),C(i.targetStateValidValues.includes(2)?18:-1),o(),C("TargetTemperature"in i.service().values?19:-1),o(),C(i.targetStateValidValues.includes(3)?20:-1)}},dependencies:[ne,ae,se,le,Ee,w,Ve,He],encapsulation:2,changeDetection:0})}return e})();function Td(e,r){if(e&1&&(I(),s(0,"text",18),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase"),c()),e&2){let t,n=u();o(),$(" ",ce(3,4,d(2,2,(t=n.service().values)==null?null:t.CurrentTemperature),"1.0-1"),"\xB0",d(4,7,n.temperatureUnits)," ")}}function Md(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.off")," ")}function Bd(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.heat")," ")}function wd(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.cool")," ")}function Ed(e,r){if(e&1&&(f(0,"i",21),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase")),e&2){let t,n=u();o(),$(" ",ce(3,4,d(2,2,(t=n.service().values)==null?null:t.TargetTemperature),"1.0-1"),"\xB0",d(4,7,n.temperatureUnits)," ")}}var Uo=(()=>{class e{$modal=D(X);$settings=D(Te);$accessories=D(ie);service=B.required({});readyForControl=B(!1,{});temperatureUnits=this.$settings.env.temperatureUnits;onClick(){if(!this.readyForControl())return;let t=this.$modal.open($o,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-thermostat"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:30,vars:9,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","coolingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#1e8bbd"],["attributeName","stop-color","values","#1e8bbd;#66d6d6;#1e8bbd","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#66d6d6"],["attributeName","stop-color","values","#66d6d6;#1e8bbd;#66d6d6","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#1e8bbd"],["id","heatingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#cc5e00"],["attributeName","stop-color","values","#cc5e00;#e69533;#cc5e00;#e69533","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#e69533"],["attributeName","stop-color","values","#e69533;#cc5e00;#e69533;#cc5e00","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#cc5e00"],["x","1","y","1","width","30","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x","1","y","19","width","30","height","8","rx","0","stroke","#7f7f7f","stroke-width","0.75","fill-opacity","0.5"],["x","16","y","13","font-size","8","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"fa","fas","fa-bullseye"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),f(8,"animate",6),c(),s(9,"stop",7),f(10,"animate",8),c(),s(11,"stop",9),f(12,"animate",6),c()(),s(13,"linearGradient",10)(14,"stop",11),f(15,"animate",12),c(),s(16,"stop",13),f(17,"animate",14),c(),s(18,"stop",15),f(19,"animate",12),c()()(),f(20,"rect",16)(21,"rect",17),h(22,Td,5,9,":svg:text",18),c()(),N(),s(23,"div",19),p(24),c(),s(25,"div",20),h(26,Md,2,3)(27,Bd,2,3)(28,wd,2,3)(29,Ed,5,9),c()()()),n&2){let a,m,A;U("accessory-on",((a=i.service().values)==null?null:a.TargetHeatingCoolingState)>0),o(2),y("aria-label",d(3,7,"accessories.core.thermostat")),o(19),y("fill",((m=i.service().values)==null?null:m.CurrentHeatingCoolingState)===2?"url(#coolingGradient)":((m=i.service().values)==null?null:m.CurrentHeatingCoolingState)===1?"url(#heatingGradient)":((m=i.service().values)==null?null:m.TargetHeatingCoolingState)===3?"#42d672":"#7b7b7b"),o(),C("CurrentTemperature"in i.service().values?22:-1),o(2),v(i.service().customName||i.service().serviceName),o(2),C(((A=i.service().values)==null?null:A.TargetHeatingCoolingState)===0?26:((A=i.service().values)==null?null:A.CurrentHeatingCoolingState)===1?27:((A=i.service().values)==null?null:A.CurrentHeatingCoolingState)===2?28:((A=i.service().values)==null?null:A.TargetHeatingCoolingState)===3?29:-1)}},dependencies:[J,Ee,w,Ve,He],encapsulation:2})}return e})();var Wo=(()=>{class e{service=B.required({});static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-unknown"]],inputs:{service:[1,"service"]},decls:10,vars:3,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","16","cy","16","r","14","fill","none","stroke","#7f7f7f","stroke-width","1.5"],["d",`M12.2575393,17.7112593
25
+ L12.1868707,17.7112593
26
+ C11.0779698,17.7112593 10.6478221,16.9467914 11.2212184,16.0037726
27
+ L16.4805582,7.35415962
28
+ C17.67876,5.38357359 18.0624739,5.55948915 17.3376772,7.746963
29
+ L15.7252918,12.6132252
30
+ C15.3772095,13.6637556 15.9942825,14.5048291 17.0992511,14.5048291
31
+ L20.1977772,14.5048291
32
+ L20.1846183,14.5177121
33
+ L20.2552868,14.5177121
34
+ C21.3641878,14.5177121 21.7943355,15.2821799 21.2209392,16.2251988
35
+ L16.1844844,24.5082506
36
+ C14.864477,26.6791606 14.4411534,26.4839632 15.241777,24.0676402
37
+ L16.7168658,19.6157462
38
+ C17.0649481,18.5652158 16.447875,17.7241422 15.3429064,17.7241422
39
+ L12.2443804,17.7241422
40
+ L12.2575393,17.7112593 Z`,"fill","#7f7f7f"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(n,i){n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),I(),x(3,"svg",3),L(4,"circle",4)(5,"path",5),k()(),N(),x(6,"div",6),p(7),k(),x(8,"div",7),p(9),k()()()),n&2&&(o(2),y("aria-label",i.service().humanType),o(5),v(i.service().customName||i.service().serviceName),o(2),v(i.service().humanType))},encapsulation:2})}return e})();var Go=(e,r)=>({"fa-check-circle":e,"fa-blank":r});function Dd(e,r){if(e&1){let t=j();s(0,"h6"),p(1),l(2,"translate"),l(3,"duration"),c(),s(4,"nouislider",12),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.targetSetDuration.value,i)||(a.targetSetDuration.value=i),P(i)}),S("ngModelChange",function(){V(t);let i=u();return P(i.onSetDurationStateChange())}),c()}if(e&2){let t=u();o(),$(" ",d(2,6,"accessories.control.set_duration"),": ",t.targetSetDuration.value===0?"\u221E":d(3,8,t.targetSetDuration.value)," "),o(3),b("min",t.targetSetDuration.min)("max",t.targetSetDuration.max)("step",15),Z("ngModel",t.targetSetDuration.value)}}var jo=(()=>{class e extends ue{targetMode;targetSetDuration;targetSetDurationChanged=new ee;setupComponent(){this.createDebouncedSubscription(this.targetSetDurationChanged,()=>{this.service().getCharacteristic("SetDuration").setValue(this.targetSetDuration.value)}),this.targetMode=this.service().values.Active,this.loadTargetSetDuration()}handleAccessoryUpdate(){this.targetMode=this.service().values.Active,this.targetSetDuration&&"SetDuration"in this.service().values&&(this.targetSetDuration.value=this.service().getCharacteristic("SetDuration").value)}setTargetMode(t,n){this.targetMode=t,this.service().getCharacteristic("Active").setValue(this.targetMode),this.blurTarget(n)}onSetDurationStateChange(){this.targetSetDurationChanged.next(this.targetSetDuration.value)}loadTargetSetDuration(){let t=this.service().getCharacteristic("SetDuration");t&&(this.targetSetDuration={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},this.applySliderGradient("linear-gradient(to right, #add8e6, #416bdf)",".noUi-target"))}static \u0275fac=(()=>{let t;return function(i){return(t||(t=pe(e)))(i||e)}})();static \u0275cmp=M({type:e,selectors:[["ng-component"]],features:[me],decls:24,vars:24,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-4","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(n,i){n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4)(6,"div",5),l(7,"translate"),s(8,"button",6),S("click",function(m){return i.setTargetMode(!1,m)}),s(9,"div",7),f(10,"i",8),c(),p(11),l(12,"translate"),s(13,"div",9),f(14,"i",10),c()(),s(15,"button",6),S("click",function(m){return i.setTargetMode(!0,m)}),s(16,"div",7),f(17,"i",8),c(),p(18),l(19,"translate"),s(20,"div",9),f(21,"i",10),c()()(),h(22,Dd,5,10),c(),f(23,"div",11),c()),n&2&&(o(2),b("innerText",i.service().customName||i.service().serviceName),o(),y("aria-label",d(4,10,"form.button_close")),o(3),y("aria-label",d(7,12,"accessories.control.mode_control")),o(4),F(O(18,Go,!i.targetMode,i.targetMode)),o(),g(" ",d(12,14,"accessories.control.off")," "),o(6),F(O(21,Go,i.targetMode,!i.targetMode)),o(),g(" ",d(19,16,"accessories.control.on")," "),o(4),C(i.targetSetDuration?22:-1))},dependencies:[ne,ae,se,le,w,ni],encapsulation:2,changeDetection:0})}return e})();function Ad(e,r){e&1&&(s(0,"div",2),l(1,"translate"),I(),s(2,"svg",5),f(3,"line",6)(4,"line",7)(5,"line",8)(6,"line",9)(7,"circle",10)(8,"circle",11)(9,"circle",12)(10,"circle",13)(11,"circle",14)(12,"circle",15),c()()),e&2&&y("aria-label",d(1,1,"accessories.core.generic_valve"))}function Id(e,r){e&1&&(s(0,"div",2),l(1,"translate"),I(),s(2,"svg",5),f(3,"circle",16)(4,"circle",17)(5,"circle",18)(6,"circle",19)(7,"circle",20)(8,"circle",21)(9,"circle",22)(10,"circle",23)(11,"circle",24)(12,"circle",25)(13,"line",26)(14,"line",27)(15,"line",28),c()()),e&2&&y("aria-label",d(1,1,"accessories.core.irrigation_valve"))}function Fd(e,r){e&1&&(s(0,"div",2),l(1,"translate"),I(),s(2,"svg",5),f(3,"line",29)(4,"line",30)(5,"line",31)(6,"path",32)(7,"line",33)(8,"circle",34)(9,"circle",35)(10,"circle",36)(11,"circle",37)(12,"circle",38)(13,"circle",39)(14,"circle",40)(15,"circle",41)(16,"circle",42)(17,"circle",43)(18,"circle",44)(19,"circle",45),c()()),e&2&&y("aria-label",d(1,1,"accessories.core.shower_head_valve"))}function Ld(e,r){e&1&&(s(0,"div",2),l(1,"translate"),I(),s(2,"svg",5),f(3,"rect",46)(4,"line",47)(5,"line",48)(6,"rect",49)(7,"path",50)(8,"line",51)(9,"line",52),c()()),e&2&&y("aria-label",d(1,1,"accessories.core.faucet_valve"))}function Vd(e,r){if(e&1&&(s(0,"div",4),p(1),c()),e&2){let t=u();o(),v(t.remainingDuration)}}function Pd(e,r){e&1&&(s(0,"div",4),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.running")))}function Od(e,r){e&1&&(s(0,"div",4),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.off")))}var qo=(()=>{class e{destroyRef=D(ye);$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});secondsActive=0;remainingDuration;remainingDurationInterval=nn(1e3).pipe(on(()=>this.isActive()));ngOnInit(){"SetDuration"in this.service().values&&this.setupRemainingDurationCounter()}onClick(){this.readyForControl()&&("Active"in this.service().values?this.service().getCharacteristic("Active").setValue(this.service().values.Active?0:1):"On"in this.service().values&&this.service().getCharacteristic("On").setValue(!this.service().values.On))}onLongClick(){if(this.readyForControl()&&"SetDuration"in this.service().values){let t=this.$modal.open(jo,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}}isActive(){return this.service().values.Active?!0:(this.resetRemainingDuration(),!1)}setupRemainingDurationCounter(){this.remainingDurationInterval.pipe(fe(this.destroyRef)).subscribe(()=>{this.secondsActive++;let t=this.service().getCharacteristic("RemainingDuration").value-this.secondsActive;t>0?this.remainingDuration=t<3600?new Date(t*1e3).toISOString().substring(14,19):new Date(t*1e3).toISOString().substring(11,19):this.remainingDuration=""})}resetRemainingDuration(){this.secondsActive=0,this.service().getCharacteristic("RemainingDuration")&&(this.remainingDuration="")}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-valve"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:11,vars:5,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x1","8","y1","3","x2","14","y2","3","stroke","#7f7f7f","stroke-width","3","stroke-linecap","round"],["x1","11","y1","8","x2","11","y2","3","stroke","#7f7f7f","stroke-width","3","stroke-linecap","round"],["x1","0","y1","9","x2","21","y2","9","stroke","#7f7f7f","stroke-width","4","stroke-linecap","round"],["x1","21","y1","9","x2","21","y2","14","stroke","#7f7f7f","stroke-width","4","stroke-linecap","round"],["fill","#1976d2","fill-opacity","0","cx","21","cy","19","r","1.5",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","17","cy","24","r","1.5",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","25","cy","24","r","1.5",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","13","cy","29","r","1.5",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","21","cy","29","r","1.5",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","29","cy","29","r","1.5",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","1","cy","16","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","6","cy","8","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","16","cy","4","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","26","cy","8","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","31","cy","16","r","1",1,"drop","drop-out"],["fill","#1976d2","fill-opacity","0","cx","7","cy","16","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","25","cy","16","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","10.5","cy","11.5","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","21.5","cy","11.5","r","1.5",1,"drop","drop-in"],["fill","#1976d2","fill-opacity","0","cx","16","cy","9","r","1.5",1,"drop","drop-in"],["x1","16","y1","16","x2","16","y2","31","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["x1","14","y1","16","x2","18","y2","16","stroke","#7f7f7f","stroke-width","4","stroke-linecap","round"],["x1","4","y1","31","x2","28","y2","31","stroke","#7f7f7f","stroke-opacity","0.5","stroke-width","10","stroke-linecap","round",1,"grass"],["x1","1","y1","1","x2","16","y2","1","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["x1","1","y1","1","x2","1","y2","31","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["x1","16","y1","1","x2","16","y2","3","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["d","M8 11 A8 7 0 0 1 24 11","fill","none","stroke","#7f7f7f","stroke-width","2"],["x1","7","y1","11","x2","25","y2","11","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["fill","#1976d2","fill-opacity","0","cx","8","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","13.3","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","18.6","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","24","cy","16","r","1.25",1,"drop","drop-top"],["fill","#1976d2","fill-opacity","0","cx","8","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","13.3","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","18.6","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","24","cy","22","r","1",1,"drop","drop-middle"],["fill","#1976d2","fill-opacity","0","cx","8","cy","28","r","0.75",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","13.3","cy","28","r","0.75",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","18.6","cy","28","r","0.75",1,"drop","drop-bottom"],["fill","#1976d2","fill-opacity","0","cx","24","cy","28","r","0.75",1,"drop","drop-bottom"],["x","-3","y","28","width","21","height","6.5","fill","#7f7f7f","stroke-width","0","fill-opacity","0.5",1,"sink"],["stroke-linecap","round","x1","24","y1","18","x2","26","y2","18","stroke","#1976d2","stroke-width","3","stroke-opacity","0.5"],["stroke-linecap","round","x1","20","y1","18","x2","22","y2","18","stroke","#d32f2f","stroke-width","3","stroke-opacity","0.5"],["x","19","y","16.5","rx","1","width","8","height","3","fill","none","stroke-width","1","stroke","#7f7f7f"],["d","M10 9 C10 -1, 23 -1, 23 10 V26","fill","none","stroke","#7f7f7f","stroke-width","2"],["x1","10","y1","9","x2","10","y2","28","stroke","#1976d2","stroke-opacity","0","stroke-width","1.5",1,"stream"],["x1","20","y1","31","x2","26","y2","31","stroke","#7f7f7f","stroke-width","10","stroke-linecap","round"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1),h(2,Ad,13,3,"div",2)(3,Id,16,3,"div",2)(4,Fd,20,3,"div",2)(5,Ld,10,3,"div",2),s(6,"div",3),p(7),c(),h(8,Vd,2,1,"div",4)(9,Pd,3,3,"div",4)(10,Od,3,3,"div",4),c()()),n&2){let a,m,A,z;U("accessory-on",((a=i.service().values)==null?null:a.Active)||((a=i.service().values)==null?null:a.On)),o(2),C(((m=i.service().values)==null?null:m.ValveType)===0||!((m=i.service().values)!=null&&m.ValveType)?2:((m=i.service().values)==null?null:m.ValveType)===1?3:((m=i.service().values)==null?null:m.ValveType)===2?4:((m=i.service().values)==null?null:m.ValveType)===3?5:-1),o(5),g(" ",i.service().customName||((A=i.service().values)==null?null:A.ConfiguredName)||i.service().serviceName," "),o(),C((z=i.service().values)!=null&&z.Active&&i.remainingDuration?8:(z=i.service().values)!=null&&z.Active&&!i.remainingDuration||(z=i.service().values)!=null&&z.On?9:10)}},dependencies:[J,w],styles:[".accessory-on svg .grass{stroke:#4caf50!important} .accessory-on svg .drop{fill-opacity:.5} .accessory-on svg .drop-in{animation:_ngcontent-%COMP%_blink 1.5s infinite} .accessory-on svg .drop-out{animation:_ngcontent-%COMP%_blink 1.5s infinite;animation-delay:.75s} .accessory-on svg .drop-top{animation:_ngcontent-%COMP%_blink 1.5s infinite} .accessory-on svg .drop-middle{animation:_ngcontent-%COMP%_blink 1.5s infinite;animation-delay:.5s} .accessory-on svg .drop-bottom{animation:_ngcontent-%COMP%_blink 1.5s infinite;animation-delay:1s}@keyframes _ngcontent-%COMP%_blink{0%,to{opacity:1}50%{opacity:0}}@keyframes _ngcontent-%COMP%_blink-on-off{0%,to{opacity:1}50%{opacity:.5}} .accessory-on svg .stream{stroke-opacity:.5;animation:_ngcontent-%COMP%_blink-on-off 4s infinite} .accessory-on svg .sink{fill:#1976d2}"]})}return e})();var zo=(()=>{class e{service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&("On"in this.service().values?this.service().getCharacteristic("On").setValue(!this.service().values.On):"Active"in this.service().values&&this.service().getCharacteristic("Active").setValue(this.service().values.Active?0:1))}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-washing-machine"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:22,vars:9,consts:[["tabindex","0",1,"accessory-box",3,"shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3","y","1","width","25","height","30","rx","2","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x","6","y","4","width","5","rx","0.5","height","4","stroke","#7f7f7f","fill","none","stroke-width","0.5"],["x","7","y","6","width","3","rx","0.25","height","1","stroke","#7f7f7f","fill","none","stroke-width","0.25"],["x","14","y","4","width","11","height","4","rx","0.5","fill","none","stroke","#7f7f7f","stroke-width","0.5"],["x","19","y","5","width","5","height","2","rx","0.25","fill","#1976d2","fill-opacity","0.5","stroke","#7f7f7f","stroke-width","0.25"],["x","15","y","5","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","16","y","5","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","17","y","5","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","15","y","6","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","16","y","6","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","17","y","6","width","1","height","1","rx","0.25","fill","none","stroke","#7f7f7f","stroke-width","0.25"],["x","19","y","15.5","rx","1","width","3","height","3","fill","#7f7f7f",1,"handle"],["cx","15.5","cy","17","r","6.5","stroke","#7f7f7f","fill","none","stroke-width","1.2"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"rect",8)(10,"rect",9)(11,"rect",10)(12,"rect",11)(13,"rect",12)(14,"rect",13)(15,"rect",14)(16,"rect",15)(17,"circle",16),c()(),N(),s(18,"div",17),p(19),c(),f(20,"div",18),l(21,"translate"),c()()),n&2){let a,m;U("accessory-on",((a=i.service().values)==null?null:a.On)||((a=i.service().values)==null?null:a.Active)),o(2),y("aria-label",d(3,5,"accessories.core.washing_machine")),o(17),v(i.service().customName||i.service().serviceName),o(),b("innerText",d(21,7,(m=i.service().values)!=null&&m.On||(m=i.service().values)!=null&&m.Active?"accessories.control.on":"accessories.control.off"))}},dependencies:[J,w],styles:[".accessory-on svg .handle{fill:#1976d2;fill-opacity:.5;transform-origin:48% 53%;animation:_ngcontent-%COMP%_rotate-handle 2s linear infinite}@keyframes _ngcontent-%COMP%_rotate-handle{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"]})}return e})();function Nd(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.closed")," ")}function Hd(e,r){if(e&1&&(p(0),l(1,"translate")),e&2){let t=u(2);$(" ",d(1,2,"accessories.control.open")," ",t.service().getCharacteristic("CurrentPosition").value,"% ")}}function Rd(e,r){if(e&1&&h(0,Nd,2,3)(1,Hd,2,4),e&2){let t,n=u();C(((t=n.service().values)==null?null:t.CurrentPosition)===0?0:1)}}function $d(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.opening"),"... ")}function Ud(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.closing"),"... ")}var Ko=(()=>{class e extends ue{targetMode;targetPositionChanged=new ee;targetPosition;setupComponent(){this.createDebouncedSubscription(this.targetPositionChanged,()=>{this.service().getCharacteristic("CurrentPosition").value<this.targetPosition.value?this.service().values.PositionState=1:this.service().getCharacteristic("CurrentPosition").value>this.targetPosition.value&&(this.service().values.PositionState=0),this.service().getCharacteristic("TargetPosition").setValue(this.targetPosition.value)}),this.targetMode=this.service().values.On,this.loadTargetPosition()}handleAccessoryUpdate(){this.targetMode=this.service().values.On,this.targetPosition&&"TargetPosition"in this.service().values&&(this.targetPosition.value=this.service().getCharacteristic("TargetPosition").value)}onTargetPositionChange(){this.targetPositionChanged.next(this.targetPosition.value)}loadTargetPosition(){let t=this.service().getCharacteristic("TargetPosition");t&&(this.targetPosition={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},this.applySliderGradient("linear-gradient(to right, #242424, #ffd6aa)"))}static \u0275fac=(()=>{let t;return function(i){return(t||(t=pe(e)))(i||e)}})();static \u0275cmp=M({type:e,selectors:[["ng-component"]],features:[me],decls:34,vars:34,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"d-flex","justify-content-center","mb-0","p-0"],[1,"mb-0","mx-0","p-3","btn-read","w-100"],[1,"mt-4"],[1,"mb-1",3,"ngModelChange","min","max","step","ngModel"],[1,"d-flex","justify-content-between","align-items-center","mt-0","mb-1"],[1,"grey-text","small"],[1,"mb-1",3,"ngModelChange","min","max","step","disabled","ngModel"],[1,"modal-footer"]],template:function(n,i){if(n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4)(6,"div",5)(7,"div",6),h(8,Rd,2,1)(9,$d,2,3)(10,Ud,2,3),c()(),s(11,"h6",7),p(12),l(13,"translate"),c(),s(14,"nouislider",8),Q("ngModelChange",function(m){return Y(i.targetPosition.value,m)||(i.targetPosition.value=m),m}),S("ngModelChange",function(){return i.onTargetPositionChange()}),c(),s(15,"div",9)(16,"span",10),p(17),l(18,"translate"),c(),s(19,"span",10),p(20),l(21,"translate"),c()(),s(22,"h6",7),p(23),l(24,"translate"),c(),s(25,"nouislider",11),Q("ngModelChange",function(m){return Y(i.service().getCharacteristic("CurrentPosition").value,m)||(i.service().getCharacteristic("CurrentPosition").value=m),m}),c(),s(26,"div",9)(27,"span",10),p(28),l(29,"translate"),c(),s(30,"span",10),p(31),l(32,"translate"),c()()(),f(33,"div",12),c()),n&2){let a;o(2),b("innerText",i.service().customName||i.service().serviceName),o(),y("aria-label",d(4,20,"form.button_close")),o(5),C(((a=i.service().values)==null?null:a.PositionState)===2?8:((a=i.service().values)==null?null:a.PositionState)===1?9:((a=i.service().values)==null?null:a.PositionState)===0?10:-1),o(4),$("",d(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),o(2),b("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),Z("ngModel",i.targetPosition.value),o(3),v(d(18,24,"accessories.control.closed")),o(3),v(d(21,26,"accessories.control.open")),o(3),$(" ",d(24,28,"accessories.control.current"),": ",i.service().getCharacteristic("CurrentPosition").value,"% "),o(2),b("min",0)("max",100)("step",1)("disabled",!0),Z("ngModel",i.service().getCharacteristic("CurrentPosition").value),o(3),v(d(29,30,"accessories.control.closed")),o(3),v(d(32,32,"accessories.control.open"))}},dependencies:[le,ne,ae,se,w],encapsulation:2,changeDetection:0})}return e})();function Wd(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.closed")," ")}function Gd(e,r){if(e&1&&(p(0),l(1,"translate")),e&2){let t,n=u(2);$(" ",d(1,2,"accessories.control.open")," ",(t=n.service().values)==null?null:t.CurrentPosition,"% ")}}function jd(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.open")," ")}function qd(e,r){if(e&1&&(s(0,"div",12),h(1,Wd,2,3),h(2,Gd,2,4),h(3,jd,2,3),c()),e&2){let t,n,i,a=u();o(),C(((t=a.service().values)==null?null:t.CurrentPosition)===0?1:-1),o(),C(((n=a.service().values)==null?null:n.CurrentPosition)>0&&((n=a.service().values)==null?null:n.CurrentPosition)<100?2:-1),o(),C(((i=a.service().values)==null?null:i.CurrentPosition)===100?3:-1)}}function zd(e,r){e&1&&(s(0,"div",13),p(1),l(2,"translate"),c()),e&2&&(o(),g("",d(2,1,"accessories.control.opening"),"..."))}function Kd(e,r){e&1&&(s(0,"div",13),p(1),l(2,"translate"),c()),e&2&&(o(),g("",d(2,1,"accessories.control.closing"),"..."))}var Zo=(()=>{class e{$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&(this.service().values.TargetPosition?this.service().getCharacteristic("TargetPosition").setValue(0):this.service().getCharacteristic("TargetPosition").setValue(100))}onLongClick(){if(!this.readyForControl())return;let t=this.$modal.open(Ko,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-window-covering"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:17,vars:7,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","0.8","width","30","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","2.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1"],["x","3.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","rx","2"],["x","16.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1"],["x","17.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","rx","2"],["x","2.3","y","2.1","width","27.4","height","27.6","stroke","#808080","fill","#808080","stroke-width","0.5","stroke-opacity","0.9","fill-opacity","0.9",1,"c-blinds"],["x","2.05","y","29.9","width","27.9","height","0","stroke","#ffffff","fill","#ffffff","stroke-width","0.5","stroke-opacity","0","fill-opacity","0.5",1,"c-light"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"rect",8)(10,"rect",9)(11,"rect",10),c()(),N(),s(12,"div",11),p(13),c(),h(14,qd,4,3,"div",12)(15,zd,3,3,"div",13)(16,Kd,3,3,"div",13),c()()),n&2){let a,m;U("accessory-on",(a=i.service().values)==null?null:a.CurrentPosition),o(2),y("aria-label",d(3,5,"accessories.core.window_covering")),o(11),v(i.service().customName||i.service().serviceName),o(),C(((m=i.service().values)==null?null:m.PositionState)===2?14:((m=i.service().values)==null?null:m.PositionState)===1?15:((m=i.service().values)==null?null:m.PositionState)===0?16:-1)}},dependencies:[J,w],styles:["body.dark-mode .c-blinds{fill:#2b2b2b;stroke:#2b2b2b;stroke-opacity:.8;fill-opacity:.8} svg .c-blinds{transition:height 3s ease;height:27.6px} svg .c-light{transition:y 3s ease,height 3s ease;y:29.9px;height:0} .accessory-on svg .c-blinds{transition:height 3s ease;height:.3px} .accessory-on svg .c-light{transition:y 3s ease,height 3s ease;y:2.65px;height:27.3px}"]})}return e})();function Zd(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.closed")," ")}function Yd(e,r){if(e&1&&(p(0),l(1,"translate")),e&2){let t=u(2);$(" ",d(1,2,"accessories.control.open")," ",t.service().getCharacteristic("CurrentPosition").value,"% ")}}function Qd(e,r){if(e&1&&h(0,Zd,2,3)(1,Yd,2,4),e&2){let t,n=u();C(((t=n.service().values)==null?null:t.CurrentPosition)===0?0:1)}}function Jd(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.opening"),"... ")}function Xd(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.closing"),"... ")}var Yo=(()=>{class e extends ue{targetMode;targetPositionChanged=new ee;targetPosition;setupComponent(){this.createDebouncedSubscription(this.targetPositionChanged,()=>{this.service().getCharacteristic("CurrentPosition").value<this.targetPosition.value?this.service().values.PositionState=1:this.service().getCharacteristic("CurrentPosition").value>this.targetPosition.value&&(this.service().values.PositionState=0),this.service().getCharacteristic("TargetPosition").setValue(this.targetPosition.value)}),this.targetMode=this.service().values.On,this.loadTargetPosition()}handleAccessoryUpdate(){this.targetMode=this.service().values.On,this.targetPosition&&"TargetPosition"in this.service().values&&(this.targetPosition.value=this.service().getCharacteristic("TargetPosition").value)}onTargetPositionChange(){this.targetPositionChanged.next(this.targetPosition.value)}loadTargetPosition(){let t=this.service().getCharacteristic("TargetPosition");t&&(this.targetPosition={value:t.value,min:t.minValue,max:t.maxValue,step:t.minStep},this.applySliderGradient("linear-gradient(to right, #242424, #ffd6aa)"))}static \u0275fac=(()=>{let t;return function(i){return(t||(t=pe(e)))(i||e)}})();static \u0275cmp=M({type:e,selectors:[["ng-component"]],features:[me],decls:34,vars:34,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"d-flex","justify-content-center","mb-0","p-0"],[1,"mb-0","mx-0","p-3","btn-read","w-100"],[1,"mt-4"],[1,"mb-1",3,"ngModelChange","min","max","step","ngModel"],[1,"d-flex","justify-content-between","align-items-center","mt-0","mb-1"],[1,"grey-text","small"],[1,"mb-1",3,"ngModelChange","min","max","step","disabled","ngModel"],[1,"modal-footer"]],template:function(n,i){if(n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4)(6,"div",5)(7,"div",6),h(8,Qd,2,1)(9,Jd,2,3)(10,Xd,2,3),c()(),s(11,"h6",7),p(12),l(13,"translate"),c(),s(14,"nouislider",8),Q("ngModelChange",function(m){return Y(i.targetPosition.value,m)||(i.targetPosition.value=m),m}),S("ngModelChange",function(){return i.onTargetPositionChange()}),c(),s(15,"div",9)(16,"span",10),p(17),l(18,"translate"),c(),s(19,"span",10),p(20),l(21,"translate"),c()(),s(22,"h6",7),p(23),l(24,"translate"),c(),s(25,"nouislider",11),Q("ngModelChange",function(m){return Y(i.service().getCharacteristic("CurrentPosition").value,m)||(i.service().getCharacteristic("CurrentPosition").value=m),m}),c(),s(26,"div",9)(27,"span",10),p(28),l(29,"translate"),c(),s(30,"span",10),p(31),l(32,"translate"),c()()(),f(33,"div",12),c()),n&2){let a;o(2),b("innerText",i.service().customName||i.service().serviceName),o(),y("aria-label",d(4,20,"form.button_close")),o(5),C(((a=i.service().values)==null?null:a.PositionState)===2?8:((a=i.service().values)==null?null:a.PositionState)===1?9:((a=i.service().values)==null?null:a.PositionState)===0?10:-1),o(4),$("",d(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),o(2),b("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),Z("ngModel",i.targetPosition.value),o(3),v(d(18,24,"accessories.control.closed")),o(3),v(d(21,26,"accessories.control.open")),o(3),$(" ",d(24,28,"accessories.control.current"),": ",i.service().getCharacteristic("CurrentPosition").value,"% "),o(2),b("min",0)("max",100)("step",1)("disabled",!0),Z("ngModel",i.service().getCharacteristic("CurrentPosition").value),o(3),v(d(29,30,"accessories.control.closed")),o(3),v(d(32,32,"accessories.control.open"))}},dependencies:[le,ne,ae,se,w],encapsulation:2,changeDetection:0})}return e})();function ep(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.closed")," ")}function tp(e,r){if(e&1&&(p(0),l(1,"translate")),e&2){let t,n=u(2);$(" ",d(1,2,"accessories.control.open")," ",(t=n.service().values)==null?null:t.CurrentPosition,"% ")}}function ip(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.open")," ")}function np(e,r){if(e&1&&(s(0,"div",12),h(1,ep,2,3),h(2,tp,2,4),h(3,ip,2,3),c()),e&2){let t,n,i,a=u();o(),C(((t=a.service().values)==null?null:t.CurrentPosition)===0?1:-1),o(),C(((n=a.service().values)==null?null:n.CurrentPosition)>0&&((n=a.service().values)==null?null:n.CurrentPosition)<100?2:-1),o(),C(((i=a.service().values)==null?null:i.CurrentPosition)===100?3:-1)}}function op(e,r){e&1&&(s(0,"div",13),p(1),l(2,"translate"),c()),e&2&&(o(),g("",d(2,1,"accessories.control.opening"),"..."))}function rp(e,r){e&1&&(s(0,"div",13),p(1),l(2,"translate"),c()),e&2&&(o(),g("",d(2,1,"accessories.control.closing"),"..."))}var Qo=(()=>{class e{$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&(this.service().values.TargetPosition?this.service().getCharacteristic("TargetPosition").setValue(0):this.service().getCharacteristic("TargetPosition").setValue(100))}onLongClick(){if(!this.readyForControl())return;let t=this.$modal.open(Yo,{size:"md",backdrop:"static"});t.componentInstance.service=this.service,t.componentInstance.$accessories=this.$accessories}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-window"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:17,vars:7,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","0.8","width","30","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","2.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline-left"],["x","3.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","ry","2",1,"divider-left"],["x","15.16","y","13.6","width","0.1","height","4.6","stroke","#1976d2","fill","none","stroke-width","0.5","ry","2",1,"handle-left"],["x","16.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline-right"],["x","17.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","ry","2",1,"divider-right"],["x","16.76","y","13.6","width","0.1","height","4.6","stroke","#1976d2","fill","none","stroke-width","0.5","ry","2",1,"handle-right"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7)(9,"rect",8)(10,"rect",9)(11,"rect",10),c()(),N(),s(12,"div",11),p(13),c(),h(14,np,4,3,"div",12)(15,op,3,3,"div",13)(16,rp,3,3,"div",13),c()()),n&2){let a,m;U("accessory-on",(a=i.service().values)==null?null:a.CurrentPosition),o(2),y("aria-label",d(3,5,"accessories.core.window")),o(11),v(i.service().customName||i.service().serviceName),o(),C(((m=i.service().values)==null?null:m.PositionState)===2?14:((m=i.service().values)==null?null:m.PositionState)===1?15:((m=i.service().values)==null?null:m.PositionState)===0?16:-1)}},dependencies:[J,w],styles:["svg .outline-left{x:2.8px;width:12.4px} svg .divider-left{x:3.66px;width:10.68px} svg .handle-left{x:15.16px;width:.1px} svg .outline-right{x:16.8px;width:12.4px} svg .divider-right{x:17.66px;width:10.68px} svg .handle-right{x:16.76px;width:.1px} .accessory-on svg .outline-left{x:2.8px;width:2.4px} .accessory-on svg .divider-left{x:3.66px;width:.68px} .accessory-on svg .handle-left{x:5.16px;width:.1px} .accessory-on svg .outline-right{x:26.8px;width:2.4px} .accessory-on svg .divider-right{x:27.66px;width:.68px} .accessory-on svg .handle-right{x:26.76px;width:.1px}"]})}return e})();var Ut={OnOffLight:"OnOffLight",OnOffLightSwitch:"OnOffLightSwitch",OnOffPlugInUnit:"OnOffPlugInUnit",DimmableLight:"DimmableLight",ColorTemperatureLight:"ColorTemperatureLight",ExtendedColorLight:"ExtendedColorLight",RoboticVacuumCleaner:"RoboticVacuumCleaner",ContactSensor:"ContactSensor",OccupancySensor:"OccupancySensor",LightSensor:"LightSensor",TemperatureSensor:"TemperatureSensor",HumiditySensor:"HumiditySensor",SmokeCoAlarm:"SmokeCoAlarm",WaterLeakDetector:"WaterLeakDetector",AirQualitySensor:"AirQualitySensor",DoorLock:"DoorLock",WindowCovering:"WindowCovering",Door:"Door",Window:"Window",Fan:"Fan",Thermostat:"Thermostat"},$e=(function(e){return e[e.Stopped=0]="Stopped",e[e.Running=1]="Running",e[e.Paused=2]="Paused",e[e.Error=3]="Error",e[e.SeekingCharger=64]="SeekingCharger",e[e.Charging=65]="Charging",e[e.Docked=66]="Docked",e})($e||{}),Ii=(function(e){return e[e.Idle=0]="Idle",e[e.Cleaning=1]="Cleaning",e})(Ii||{}),Oe={Min:0,Max:254},Et={MinMired:147,MaxMired:500};function Jo(e){return e.deviceType===Ut.OnOffLight||e.deviceType===Ut.OnOffLightSwitch||e.deviceType===Ut.OnOffPlugInUnit}function Fi(e){return e.deviceType===Ut.RoboticVacuumCleaner}function Li(e){return e.clusters?.rvcOperationalState?.operationalState??$e.Stopped}function ap(e){let r=Li(e);return r===$e.Running||r===$e.Paused}function sp(e){return oe(this,null,function*(){let r=Li(e);if(r===$e.Running){let t=e.getCluster?.("rvcOperationalState");if(!t){let n=new Error("RVC operational state cluster not found");throw console.error(n.message),n}try{yield t.setAttributes({operationalState:$e.Paused})}catch(n){throw console.error("Failed to pause Matter robotic vacuum:",n),n}}else if(r===$e.Paused){let t=e.getCluster?.("rvcOperationalState");if(!t){let n=new Error("RVC operational state cluster not found");throw console.error(n.message),n}try{yield t.setAttributes({operationalState:$e.Running})}catch(n){throw console.error("Failed to resume Matter robotic vacuum:",n),n}}else{let t=e.getCluster?.("rvcRunMode");if(!t){let n=new Error("RvcRunMode cluster not found");throw console.error(n.message),n}try{yield t.setAttributes({currentMode:Ii.Cleaning})}catch(n){throw console.error("Failed to start Matter robotic vacuum:",n),n}}})}function lp(e){return oe(this,null,function*(){let t=!(e.clusters?.onOff?.onOff??!1),n=e.getCluster?.("onOff");if(!n){let i=new Error("OnOff cluster not found");throw console.error(i.message),i}try{yield n.setAttributes({onOff:t})}catch(i){throw console.error("Failed to control Matter device:",i),i}})}function Ze(e){return e.clusters?.onOff?.onOff??!1}function cp(e){return e.clusters?.levelControl!==void 0}function Ke(e){if(Fi(e))return ap(e);if(cp(e)){let r=Ze(e),t=Ue(e)>0;return r&&t}return Ze(e)}function dt(e){Fi(e)?sp(e):lp(e)}function dp(e){switch(Li(e)){case $e.Running:return"accessories.control.cleaning";case $e.Paused:return"accessories.control.paused";case $e.SeekingCharger:return"Seeking Charger";case $e.Charging:return"Charging";case $e.Docked:return"Docked";case $e.Stopped:default:return"accessories.control.stopped"}}function pp(e){return Ze(e)?"accessories.control.on":"accessories.control.off"}function Xo(e){return Fi(e)?dp(e):pp(e)}function Ue(e){return e.clusters?.levelControl?.currentLevel??Oe.Min}function Dt(e){let r=Ue(e);return Math.round(r/Oe.Max*100)}function At(e){return Math.round(e/Oe.Max*100)}function It(e){return oe(this,null,function*(){let r=Ue(e);if(Ze(e)){let n=e.getCluster?.("onOff");if(!n){let i=new Error("OnOff cluster not found");throw console.error(i.message),i}try{yield n.setAttributes({onOff:!1})}catch(i){throw console.error("Failed to turn Matter light off:",i),i}}else{let n=r||Oe.Max,i=e.getCluster?.("levelControl");if(!i){let a=new Error("LevelControl cluster not found");throw console.error(a.message),a}try{yield i.setAttributes({currentLevel:n})}catch(a){throw console.error("Failed to turn Matter light on:",a),a}}})}function pt(e){return e.clusters?.colorControl?.colorTemperatureMireds??250}function er(e){return e.clusters?.colorControl?.colorTemperatureMireds!==void 0}function yt(e){return e.clusters?.colorControl?.currentHue??0}function xt(e){return e.clusters?.colorControl?.currentSaturation??0}function tr(e){return!(e.clusters?.booleanState?.stateValue??!1)}function ir(e){return e.clusters?.occupancySensing?.occupancy?.occupied??!1}function nr(e){let r=e.clusters?.illuminanceMeasurement?.measuredValue??0;return r===0||r===null?0:10**((r-1)/1e4)}function or(e){let r=e.clusters?.temperatureMeasurement?.measuredValue;return r==null?null:r/100}function rr(e){let r=e.clusters?.relativeHumidityMeasurement?.measuredValue;return r==null?null:r/100}function mp(e){return e.clusters?.smokeCoAlarm?.smokeState??0}function up(e){return e.clusters?.smokeCoAlarm?.coState??0}function ar(e){let r=mp(e),t=up(e);return r>0||t>0}function sr(e){return e.clusters?.booleanState?.stateValue??!1}function lr(e){return e.clusters?.airQuality?.airQuality??0}function Ft(e){return e.clusters?.doorLock?.lockState??1}function cr(e){return oe(this,null,function*(){let r=Ft(e),t=e.getCluster?.("doorLock");if(!t){let n=new Error("Door lock cluster not found");throw console.error(n.message),n}try{r===1?yield t.setAttributes({lockState:2}):yield t.setAttributes({lockState:1})}catch(n){throw console.error(`Failed to ${r===1?"unlock":"lock"} door:`,n),n}})}function dr(e,r){return oe(this,null,function*(){let t=e.getCluster?.("doorLock");if(!t){let i=new Error("Door lock cluster not found");throw console.error(i.message),i}let n=r?1:2;try{yield t.setAttributes({lockState:n})}catch(i){throw console.error("Failed to set door lock state:",i),i}})}function fp(e){return e.clusters?.windowCovering?.currentPositionLiftPercent100ths??0}function vp(e){return Math.round(100-e/100)}function gp(e){return Math.round((100-e)*100)}function mt(e){let r=fp(e);return vp(r)}function ai(e,r){return oe(this,null,function*(){let t=e.getCluster?.("windowCovering");if(!t){let i=new Error("Window covering cluster not found");throw console.error(i.message),i}let n=gp(r);try{yield t.setAttributes({targetPositionLiftPercent100ths:n})}catch(i){throw console.error("Failed to set window covering position:",i),i}})}function pr(e){return oe(this,null,function*(){mt(e)>50?yield ai(e,0):yield ai(e,100)})}function hp(e){return e.clusters?.fanControl?.fanMode??0}function St(e){return e.clusters?.fanControl?.percentSetting??0}function Lt(e){let r=hp(e),t=St(e);return r>0||t>0}function mr(e){return oe(this,null,function*(){let r=Lt(e),t=e.getCluster?.("fanControl");if(!t){let n=new Error("Fan control cluster not found");throw console.error(n.message),n}try{r?yield t.setAttributes({percentSetting:0}):yield t.setAttributes({percentSetting:100})}catch(n){throw console.error(`Failed to turn fan ${r?"off":"on"}:`,n),n}})}function si(e,r){return oe(this,null,function*(){let t=e.getCluster?.("fanControl");if(!t){let n=new Error("Fan control cluster not found");throw console.error(n.message),n}try{yield t.setAttributes({percentSetting:r})}catch(n){throw console.error("Failed to set fan speed:",n),n}})}function li(e){let r=e.clusters?.thermostat?.externalMeasuredIndoorTemperature;return r==null?null:r/100}function Vt(e){return e.clusters?.thermostat?.systemMode??0}function Wt(e){return(e.clusters?.thermostat?.occupiedHeatingSetpoint??2e3)/100}function Gt(e){return(e.clusters?.thermostat?.occupiedCoolingSetpoint??2400)/100}function ur(e){return Vt(e)>0}function fr(e,r){return oe(this,null,function*(){let t=e.getCluster?.("thermostat");if(!t){let n=new Error("Thermostat cluster not found");throw console.error(n.message),n}try{yield t.setAttributes({systemMode:r})}catch(n){throw console.error("Failed to set thermostat system mode:",n),n}})}function Vi(e,r){return oe(this,null,function*(){let t=e.getCluster?.("thermostat");if(!t){let i=new Error("Thermostat cluster not found");throw console.error(i.message),i}let n=Math.round(r*100);try{yield t.setAttributes({occupiedHeatingSetpoint:n})}catch(i){throw console.error("Failed to set heating setpoint:",i),i}})}function Pi(e,r){return oe(this,null,function*(){let t=e.getCluster?.("thermostat");if(!t){let i=new Error("Thermostat cluster not found");throw console.error(i.message),i}let n=Math.round(r*100);try{yield t.setAttributes({occupiedCoolingSetpoint:n})}catch(i){throw console.error("Failed to set cooling setpoint:",i),i}})}var Cp=()=>[3,4],_p=()=>[1,2],yp=(e,r,t,n)=>({"accessory-on":e,"fill-red":r,"fill-orange":t,"fill-green":n}),xp=(e,r)=>({"grey-text":e,"red-text":r}),vr=(()=>{class e{service=B.required({});labels=["Unknown","Good","Fair","Moderate","Poor","Very Poor","Extremely Poor"];get airQuality(){return lr(this.service())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-air-quality-sensor"]],inputs:{service:[1,"service"]},decls:25,vars:19,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["transform","translate(5.1, 3) scale(0.68)"],["fill","#7f7f7f","d","M10.1435881,25.4905179 C10.286009,26.7050605 10.531254,27.9706077 10.8919121,29.2887103 C6.25942062,27.4175104 3.57173247,24.180341 2.39781526,19.889403 C1.54190101,16.760839 1.56931096,13.3702525 2.13724518,10.1783222 C2.1501971,10.1055292 2.17646546,9.96330988 2.17646546,9.96330988 C2.17646546,9.96330988 2.33770347,10.0208429 2.92620872,10.2769757 C4.60998953,11.0098007 6.29364519,11.9318703 7.85704035,13.0517448 C9.19214306,14.0080913 10.3087445,15.0188915 11.223018,16.0899229 L11.223018,16.0899229 C10.426841,18.1910249 9.96797687,20.5297906 9.99206994,23.1241613 L5.43414987,14.7605739 C5.30203551,14.5181498 4.99858593,14.4288208 4.75637627,14.5610522 C4.51416661,14.6932836 4.42491674,14.9970019 4.5570311,15.2394261 L10.1435881,25.4905179 Z M13.0333542,29.4136738 C10.9912074,19.9059085 11.088992,14.922477 21.5133004,6.73565972 C23.6127007,5.0868782 25.9746706,4.01306759 28.2881453,3.03596757 C29.0967374,2.69445726 29.3182746,2.61774651 29.3182746,2.61774651 C29.3182746,2.61774651 29.3543667,2.80737221 29.3721623,2.90442957 C30.1524904,7.1603367 30.190151,11.6811187 29.0141452,15.8525373 C27.1508473,22.4618551 22.5118613,27.1961122 14.1841552,29.413553 L25.4116309,9.74806947 C25.5485147,9.50831075 25.46529,9.20288341 25.2257434,9.06587843 C24.9861969,8.92887344 24.6810398,9.01217181 24.544156,9.25193053 L13.0333542,29.4136738 Z M13.4880693,32 C38.9655056,25.5 30.755735,0 30.755735,0 C30.755735,0 17.0308715,3.72274828 11.9893965,14.5 C7.99293593,9 0.873098889,8 0.873098889,8 C-3.99644586,30.5 13.4880693,32 13.4880693,32 Z",1,"leaves"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label"]],template:function(n,i){n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4),x(6,"g",5),L(7,"path",6),k(),L(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19),k()(),N(),x(21,"div",20),p(22),k(),x(23,"div",21),p(24),k()()()),n&2&&(F(wt(11,yp,i.airQuality===5,i.airQuality===5,be(9,Cp).includes(i.airQuality),be(10,_p).includes(i.airQuality))),o(2),y("aria-label",d(3,7,"accessories.core.air_quality_sensor")),o(20),v(i.service().customName||i.service().displayName),o(),F(O(16,xp,i.airQuality<5,i.airQuality===5)),o(),g(" ",i.labels[i.airQuality||0]," "))},dependencies:[w],styles:[".fill-red svg .leaves{fill:#d32f2f!important;fill-opacity:.5!important} .fill-orange svg .leaves{fill:#ff9800!important;fill-opacity:.5!important} .fill-green svg .leaves{fill:#4caf50!important;fill-opacity:.5!important}"]})}return e})();var gr=(e,r)=>({"fa-check-circle":e,"fa-blank":r}),hr=(()=>{class e{destroyRef=D(ye);$activeModal=D(De);cdr=D(Fe);$colour=D(nt);$toastr=D(Le);service;$accessories;targetMode;targetBrightness;targetBrightnessChanged=new ee;targetColorTemperature;targetColorTemperatureChanged=new ee;sliderIndex=0;ngOnInit(){this.setupComponent(),this.subscribeToAccessoryUpdates()}dismissModal(){this.$activeModal.dismiss("Dismiss")}setupComponent(){this.createDebouncedSubscription(this.targetBrightnessChanged,()=>oe(this,null,function*(){let t=Ue(this.service);try{if(this.targetBrightness.value===Oe.Min){let n=this.service.getCluster?.("onOff");if(!n)throw new Error("OnOff cluster not found");yield n.setAttributes({onOff:!1})}else{let n=this.service.getCluster?.("levelControl");if(!n)throw new Error("LevelControl cluster not found");yield n.setAttributes({currentLevel:this.targetBrightness.value})}this.targetMode=this.targetBrightness.value>0}catch{this.$toastr.error("Failed to set light brightness","Error"),this.targetBrightness.value=t,this.targetMode=t>0,this.cdr.markForCheck()}}),300),this.createDebouncedSubscription(this.targetColorTemperatureChanged,t=>oe(this,null,function*(){let n=pt(this.service);try{let i=this.service.getCluster?.("colorControl");if(!i)throw new Error("ColorControl cluster not found");yield i.setAttributes({colorTemperatureMireds:t})}catch{this.$toastr.error("Failed to set light color temperature","Error"),this.targetColorTemperature.mired=n,this.targetColorTemperature.value=this.$colour.miredToKelvin(n),this.cdr.markForCheck()}}),300),this.targetMode=Ze(this.service),this.loadTargetBrightness(),this.loadTargetColorTemperature()}subscribeToAccessoryUpdates(){this.$accessories&&this.$accessories.accessoryData.pipe(fe(this.destroyRef)).subscribe(()=>{this.handleAccessoryUpdate(),this.cdr.markForCheck()})}handleAccessoryUpdate(){this.targetMode=Ze(this.service),this.targetBrightness.value=Ue(this.service);let t=pt(this.service);this.targetColorTemperature.mired=t,this.targetColorTemperature.value=this.$colour.miredToKelvin(t)}setTargetMode(t,n){return oe(this,null,function*(){let i=this.targetMode,a=this.targetBrightness.value;try{if(this.targetMode=t,t){let m=this.targetBrightness.value||this.targetBrightness.max;this.targetBrightness.value=m;let A=this.service.getCluster?.("levelControl");if(!A)throw new Error("LevelControl cluster not found");yield A.setAttributes({currentLevel:m})}else{let m=this.service.getCluster?.("onOff");if(!m)throw new Error("OnOff cluster not found");yield m.setAttributes({onOff:!1})}this.blurTarget(n)}catch{this.$toastr.error(`Failed to turn light ${t?"on":"off"}`,"Error"),this.targetMode=i,this.targetBrightness.value=a,this.cdr.markForCheck()}})}onBrightnessStateChange(){this.targetBrightnessChanged.next(this.targetBrightness.value)}onColorTemperatureStateChange(){let t=this.$colour.kelvinToMired(this.targetColorTemperature.value);this.targetColorTemperature.mired=t,this.targetColorTemperatureChanged.next(t)}createDebouncedSubscription(t,n,i=500){t.pipe(Ge(i),fe(this.destroyRef)).subscribe(n)}applySliderGradient(t,n=".noUi-target"){requestAnimationFrame(()=>{document.querySelectorAll(n).forEach(a=>{a.style.background=t})})}blurTarget(t){t.target.blur()}loadTargetBrightness(){let t=Ue(this.service);this.targetBrightness={value:t,min:Oe.Min,max:Oe.Max,step:1},this.applySliderGradient("linear-gradient(to right, #242424, #ffd6aa)",`.noUi-target:nth-of-type(${this.sliderIndex+1})`),this.sliderIndex+=1}loadTargetColorTemperature(){let t=pt(this.service);this.targetColorTemperature={value:this.$colour.miredToKelvin(t),mired:t,min:this.$colour.miredToKelvin(Et.MaxMired),max:this.$colour.miredToKelvin(Et.MinMired),step:10};let n=this.$colour.kelvinToHsl(this.targetColorTemperature.min),i=this.$colour.kelvinToHsl(this.targetColorTemperature.max);this.applySliderGradient(`linear-gradient(to right, ${n}, ${i})`,`.noUi-target:nth-of-type(${this.sliderIndex+1})`)}get brightnessPercentage(){return At(this.targetBrightness.value)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:32,vars:41,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[1,"modal-footer"]],template:function(n,i){n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4)(6,"div",5),l(7,"translate"),s(8,"button",6),S("click",function(m){return i.setTargetMode(!1,m)}),s(9,"div",7),f(10,"i",8),c(),p(11),l(12,"translate"),s(13,"div",9),f(14,"i",10),c()(),s(15,"button",6),S("click",function(m){return i.setTargetMode(!0,m)}),s(16,"div",7),f(17,"i",8),c(),p(18),l(19,"translate"),s(20,"div",9),f(21,"i",10),c()()(),s(22,"h6",11),p(23),l(24,"translate"),c(),s(25,"nouislider",12),Q("ngModelChange",function(m){return Y(i.targetBrightness.value,m)||(i.targetBrightness.value=m),m}),S("ngModelChange",function(){return i.onBrightnessStateChange()}),c(),s(26,"h6",11),p(27),l(28,"translate"),l(29,"convertMired"),c(),s(30,"nouislider",12),Q("ngModelChange",function(m){return Y(i.targetColorTemperature.value,m)||(i.targetColorTemperature.value=m),m}),S("ngModelChange",function(){return i.onColorTemperatureStateChange()}),c()(),f(31,"div",13),c()),n&2&&(o(2),b("innerText",i.service.customName||i.service.serviceName||i.service.displayName),o(),y("aria-label",d(4,21,"form.button_close")),o(3),y("aria-label",d(7,23,"accessories.control.mode_control")),o(4),F(O(35,gr,!i.targetMode,i.targetMode)),o(),g(" ",d(12,25,"accessories.control.off")," "),o(6),F(O(38,gr,i.targetMode,!i.targetMode)),o(),g(" ",d(19,27,"accessories.control.on")," "),o(5),$("",d(24,29,"accessories.control.brightness"),": ",i.brightnessPercentage,"%"),o(2),b("min",i.targetBrightness.min)("max",i.targetBrightness.max)("step",i.targetBrightness.step),Z("ngModel",i.targetBrightness.value),o(2),$(" ",d(28,31,"accessories.control.color_temperature"),": ",d(29,33,i.targetColorTemperature.mired)," "),o(3),b("min",i.targetColorTemperature.min)("max",i.targetColorTemperature.max)("step",i.targetColorTemperature.step),Z("ngModel",i.targetColorTemperature.value))},dependencies:[ne,ae,se,le,w,lt],encapsulation:2,changeDetection:0})}return e})();var Cr=(()=>{class e{$accessories=D(ie);$modal=D(X);$colour=D(nt);service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&It(this.service())}onLongClick(){if(!this.readyForControl())return;let t=this.$modal.open(hr,{size:"md",backdrop:"static"});t.componentInstance.service=this.service(),t.componentInstance.$accessories=this.$accessories}get isOn(){return Ke(this.service())}get brightness(){return Dt(this.service())}kelvinToHex(t){t=Math.max(1e3,Math.min(4e4,t));let n=t/100,i,a,m;return n<=66?(i=255,a=n,a=99.4708025861*Math.log(a)-161.1195681661,m=n<=19?0:138.5177312231*Math.log(n-10)-305.0447927307):(i=329.698727446*(n-60)**-.1332047592,a=288.1221695283*(n-60)**-.0755148492,m=255),i=Math.round(Math.min(Math.max(i,0),255)),a=Math.round(Math.min(Math.max(a,0),255)),m=Math.round(Math.min(Math.max(m,0),255)),`#${i.toString(16).padStart(2,"0")}${a.toString(16).padStart(2,"0")}${m.toString(16).padStart(2,"0")}`}Math=Math;static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-color-temperature-light"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:14,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["stroke","#7f7f7f","stroke-width","1.5","d","M8 21c-2.8-2.2-4.5-5.4-4.5-9 0-6.1 5-11 11.5-11S27.5 5.9 27.5 12c0 3.5-1.7 6.7-4.5 8.9-1.2 1-1.8 4.8-3 7.3-.9 2-2.2 2.7-4.5 2.7s-3.6-.7-4.5-2.7c-1.2-2.5-1.8-6.3-3-7.3z"],["stroke","#7f7f7f","stroke-width","1.5","x1","8","y1","21.5","x2","23","y2","21.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","23","x2","21","y2","24"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","25.5","x2","21","y2","26.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","11","y1","28","x2","20","y2","29"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerHTML"]],template:function(n,i){if(n&1&&(s(0,"div",0),S("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),c()(),N(),s(10,"div",9),p(11),c(),f(12,"div",10),l(13,"translate"),c()()),n&2){let a;U("accessory-on",i.isOn),o(2),y("aria-label",d(3,7,"accessories.core.lightbulb")),o(3),y("fill",i.isOn?i.kelvinToHex(i.$colour.miredToKelvin(((a=i.service().clusters)==null||a.colorControl==null?null:a.colorControl.colorTemperatureMireds)||250)):"none")("fill-opacity",.25+i.brightness/100*.5),o(6),g(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),o(),b("innerHTML",i.isOn?i.brightness+"%":d(13,9,"accessories.control.off"),je)}},dependencies:[J,w],encapsulation:2})}return e})();function Sp(e,r){e&1&&(x(0,"div",9),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.open")))}function kp(e,r){e&1&&(x(0,"div",10),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.closed")))}var _r=(()=>{class e{service=B.required({});get isOpen(){return tr(this.service())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-contact-sensor"]],inputs:{service:[1,"service"]},decls:13,vars:7,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","15","height","30","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.5",1,"left-object"],["x","16","y","1","width","15","height","30","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.5",1,"right-object"],["x","10","y","11","width","6","height","10","rx","1","stroke","#7f7f7f","fill","#4caf50","fill-opacity","0.5","stroke-width","0.5",1,"left-sensor"],["x","16","y","11","width","6","height","10","rx","1","stroke","#7f7f7f","fill","#4caf50","fill-opacity","0.5","stroke-width","0.5",1,"right-sensor"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(n,i){n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4)(6,"rect",5)(7,"rect",6)(8,"rect",7),k()(),N(),x(9,"div",8),p(10),k(),h(11,Sp,3,3,"div",9)(12,kp,3,3,"div",10),k()()),n&2&&(U("accessory-on",i.isOpen),o(2),y("aria-label",d(3,5,"accessories.core.contact_sensor")),o(8),v(i.service().customName||i.service().serviceName),o(),C(i.isOpen?11:12))},dependencies:[w],styles:[".accessory-on svg .left-sensor{fill:#ff9800;fill-opacity:.5} .accessory-on svg .right-object{x:24px} .accessory-on svg .right-sensor{x:24px;fill:#ff9800;fill-opacity:.5}"]})}return e})();var yr=(e,r)=>({"fa-check-circle":e,"fa-blank":r}),xr=(()=>{class e{destroyRef=D(ye);$activeModal=D(De);cdr=D(Fe);$toastr=D(Le);service;$accessories;targetMode;targetBrightness;targetBrightnessChanged=new ee;ngOnInit(){this.setupComponent(),this.subscribeToAccessoryUpdates()}dismissModal(){this.$activeModal.dismiss("Dismiss")}setupComponent(){this.createDebouncedSubscription(this.targetBrightnessChanged,()=>oe(this,null,function*(){let t=Ue(this.service);try{if(this.targetBrightness.value===Oe.Min){let n=this.service.getCluster?.("onOff");if(!n)throw new Error("OnOff cluster not found");yield n.setAttributes({onOff:!1})}else{let n=this.service.getCluster?.("levelControl");if(!n)throw new Error("LevelControl cluster not found");yield n.setAttributes({currentLevel:this.targetBrightness.value})}this.targetMode=this.targetBrightness.value>0}catch{this.$toastr.error("Failed to set light brightness","Error"),this.targetBrightness.value=t,this.targetMode=t>0,this.cdr.markForCheck()}}),300),this.targetMode=Ze(this.service),this.loadTargetBrightness()}subscribeToAccessoryUpdates(){this.$accessories&&this.$accessories.accessoryData.pipe(fe(this.destroyRef)).subscribe(()=>{this.handleAccessoryUpdate(),this.cdr.markForCheck()})}handleAccessoryUpdate(){this.targetMode=Ze(this.service),this.targetBrightness.value=Ue(this.service)}setTargetMode(t,n){return oe(this,null,function*(){let i=this.targetMode,a=this.targetBrightness.value;try{if(this.targetMode=t,t){let m=this.targetBrightness.value||this.targetBrightness.max;this.targetBrightness.value=m;let A=this.service.getCluster?.("levelControl");if(!A)throw new Error("LevelControl cluster not found");yield A.setAttributes({currentLevel:m})}else{let m=this.service.getCluster?.("onOff");if(!m)throw new Error("OnOff cluster not found");yield m.setAttributes({onOff:!1})}this.blurTarget(n)}catch{this.$toastr.error(`Failed to turn light ${t?"on":"off"}`,"Error"),this.targetMode=i,this.targetBrightness.value=a,this.cdr.markForCheck()}})}onBrightnessStateChange(){this.targetBrightnessChanged.next(this.targetBrightness.value)}createDebouncedSubscription(t,n,i=500){t.pipe(Ge(i),fe(this.destroyRef)).subscribe(n)}applySliderGradient(t,n=".noUi-target"){requestAnimationFrame(()=>{document.querySelectorAll(n).forEach(a=>{a.style.background=t})})}blurTarget(t){t.target.blur()}loadTargetBrightness(){let t=Ue(this.service);this.targetBrightness={value:t,min:Oe.Min,max:Oe.Max,step:1},this.applySliderGradient("linear-gradient(to right, #242424, #ffd6aa)")}get brightnessPercentage(){return At(this.targetBrightness.value)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:27,vars:31,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[1,"modal-footer"]],template:function(n,i){n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4)(6,"div",5),l(7,"translate"),s(8,"button",6),S("click",function(m){return i.setTargetMode(!1,m)}),s(9,"div",7),f(10,"i",8),c(),p(11),l(12,"translate"),s(13,"div",9),f(14,"i",10),c()(),s(15,"button",6),S("click",function(m){return i.setTargetMode(!0,m)}),s(16,"div",7),f(17,"i",8),c(),p(18),l(19,"translate"),s(20,"div",9),f(21,"i",10),c()()(),s(22,"h6",11),p(23),l(24,"translate"),c(),s(25,"nouislider",12),Q("ngModelChange",function(m){return Y(i.targetBrightness.value,m)||(i.targetBrightness.value=m),m}),S("ngModelChange",function(){return i.onBrightnessStateChange()}),c()(),f(26,"div",13),c()),n&2&&(o(2),b("innerText",i.service.customName||i.service.serviceName||i.service.displayName),o(),y("aria-label",d(4,15,"form.button_close")),o(3),y("aria-label",d(7,17,"accessories.control.mode_control")),o(4),F(O(25,yr,!i.targetMode,i.targetMode)),o(),g(" ",d(12,19,"accessories.control.off")," "),o(6),F(O(28,yr,i.targetMode,!i.targetMode)),o(),g(" ",d(19,21,"accessories.control.on")," "),o(5),$("",d(24,23,"accessories.control.brightness"),": ",i.brightnessPercentage,"%"),o(2),b("min",i.targetBrightness.min)("max",i.targetBrightness.max)("step",i.targetBrightness.step),Z("ngModel",i.targetBrightness.value))},dependencies:[ne,ae,se,le,w],encapsulation:2,changeDetection:0})}return e})();var Sr=(()=>{class e{$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&It(this.service())}onLongClick(){if(!this.readyForControl())return;let t=this.$modal.open(xr,{size:"md",backdrop:"static"});t.componentInstance.service=this.service(),t.componentInstance.$accessories=this.$accessories}get isOn(){return Ke(this.service())}get brightness(){return Dt(this.service())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-dimmable-light"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:14,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["stroke","#7f7f7f","stroke-width","1.5","d","M8 21c-2.8-2.2-4.5-5.4-4.5-9 0-6.1 5-11 11.5-11S27.5 5.9 27.5 12c0 3.5-1.7 6.7-4.5 8.9-1.2 1-1.8 4.8-3 7.3-.9 2-2.2 2.7-4.5 2.7s-3.6-.7-4.5-2.7c-1.2-2.5-1.8-6.3-3-7.3z"],["stroke","#7f7f7f","stroke-width","1.5","x1","8","y1","21.5","x2","23","y2","21.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","23","x2","21","y2","24"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","25.5","x2","21","y2","26.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","11","y1","28","x2","20","y2","29"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerHTML"]],template:function(n,i){n&1&&(s(0,"div",0),S("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),c()(),N(),s(10,"div",9),p(11),c(),f(12,"div",10),l(13,"translate"),c()()),n&2&&(U("accessory-on",i.isOn),o(2),y("aria-label",d(3,7,"accessories.core.lightbulb")),o(3),y("fill",i.isOn?"#ffcf55":"none")("fill-opacity",.25+i.brightness/100*.5),o(6),g(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),o(),b("innerHTML",i.isOn?i.brightness+"%":d(13,9,"accessories.control.off"),je))},dependencies:[J,w],encapsulation:2})}return e})();var kr=(e,r)=>({"fa-check-circle":e,"fa-blank":r}),br=(()=>{class e{destroyRef=D(ye);$activeModal=D(De);cdr=D(Fe);$toastr=D(Le);service;$accessories;targetMode;ngOnInit(){this.setupComponent(),this.subscribeToAccessoryUpdates()}dismissModal(){this.$activeModal.dismiss("Dismiss")}setupComponent(){this.targetMode=Ft(this.service)}subscribeToAccessoryUpdates(){this.$accessories&&this.$accessories.accessoryData.pipe(fe(this.destroyRef)).subscribe(()=>{this.handleAccessoryUpdate(),this.cdr.markForCheck()})}handleAccessoryUpdate(){this.targetMode=Ft(this.service)}setTargetMode(t,n){return oe(this,null,function*(){let i=this.targetMode;try{this.targetMode=t,this.cdr.markForCheck();let a=t===1;yield dr(this.service,a),this.blurTarget(n)}catch{this.$toastr.error(`Failed to ${t===1?"lock":"unlock"} door`,"Error"),this.targetMode=i,this.cdr.markForCheck()}})}blurTarget(t){t.target.blur()}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:23,vars:23,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"]],template:function(n,i){n&1&&(x(0,"div",0)(1,"div",1),L(2,"h5",2),x(3,"button",3),l(4,"translate"),Ce("click",function(){return i.dismissModal()}),k()(),x(5,"div",4)(6,"div",5),l(7,"translate"),x(8,"button",6),Ce("click",function(m){return i.setTargetMode(1,m)}),x(9,"div",7),L(10,"i",8),k(),p(11),l(12,"translate"),x(13,"div",9),L(14,"i",10),k()(),x(15,"button",6),Ce("click",function(m){return i.setTargetMode(2,m)}),x(16,"div",7),L(17,"i",8),k(),p(18),l(19,"translate"),x(20,"div",9),L(21,"i",10),k()()()(),L(22,"div",11),k()),n&2&&(o(2),qe("innerText",i.service.customName||i.service.serviceName||i.service.displayName),o(),y("aria-label",d(4,9,"form.button_close")),o(3),y("aria-label",d(7,11,"accessories.control.mode_control")),o(4),F(O(17,kr,i.targetMode===1,i.targetMode!==1)),o(),g(" ",d(12,13,"accessories.control.locked")," "),o(6),F(O(20,kr,i.targetMode===2,i.targetMode!==2)),o(),g(" ",d(19,15,"accessories.control.unlocked")," "))},dependencies:[w],encapsulation:2,changeDetection:0})}return e})();var bp=(e,r,t)=>({"accessory-on":e,unlocked:r,jammed:t});function Tp(e,r){e&1&&(s(0,"div",9),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.locked")))}function Mp(e,r){e&1&&(s(0,"div",10),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.unlocked")))}function Bp(e,r){e&1&&(s(0,"div",10),p(1),l(2,"translate"),c()),e&2&&(o(),v(d(2,1,"accessories.control.jammed")))}var Tr=(()=>{class e{$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&cr(this.service())}onLongClick(){if(!this.readyForControl())return;let t=this.$modal.open(br,{size:"md",backdrop:"static"});t.componentInstance.service=this.service(),t.componentInstance.$accessories=this.$accessories}get lockState(){return Ft(this.service())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-door-lock"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:14,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"shortClick","longClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["d","M8 16 C6 -4, 26 -4, 24 16","fill","none","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"shackle-locked"],["d","M8 16 C6 -2, 22 -2, 24 7","fill","none","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round","stroke-linejoin","round","stroke-opacity","0",1,"shackle-unlocked"],["x","5","y","16","width","22","height","15","rx","3","fill","none","stroke","#7f7f7f","stroke-width","2"],["cx","16","cy","23.5","r","3","stroke","#7f7f7f","stroke-width","0.5","fill","#4caf50","fill-opacity","0.5",1,"keyhole"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","red-text"]],template:function(n,i){n&1&&(s(0,"div",0),S("shortClick",function(){return i.onClick()})("longClick",function(){return i.onLongClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"path",4)(6,"path",5)(7,"rect",6)(8,"circle",7),c()(),N(),s(9,"div",8),p(10),c(),h(11,Tp,3,3,"div",9)(12,Mp,3,3,"div",10)(13,Bp,3,3,"div",10),c()()),n&2&&(F(Bt(7,bp,i.lockState!==1,i.lockState===2,i.lockState===0)),o(2),y("aria-label",d(3,5,"accessories.core.lock_mechanism")),o(8),g(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),o(),C(i.lockState===1?11:i.lockState===2?12:i.lockState===0?13:-1))},dependencies:[J,w],styles:["@keyframes _ngcontent-%COMP%_blink{0%,to{fill-opacity:1}50%{fill-opacity:.2}} .unlocked svg .shackle-locked{stroke-opacity:0!important} .unlocked svg .shackle-unlocked{stroke-opacity:1!important} .unlocked svg .keyhole{fill:#ff9800!important} .jammed svg .shackle-locked{stroke-opacity:0!important} .jammed svg .shackle-unlocked{stroke-opacity:1!important} .jammed svg .keyhole{fill:#d32f2f!important;animation:_ngcontent-%COMP%_blink 1s infinite} .error svg .shackle-locked{stroke-opacity:0!important} .error svg .shackle-unlocked{stroke-opacity:1!important} .error svg .keyhole{fill:#d32f2f!important;animation:_ngcontent-%COMP%_blink 1s infinite}"]})}return e})();var Mr=(e,r)=>({"fa-check-circle":e,"fa-blank":r});function wp(e,r){if(e&1){let t=j();s(0,"h6",11),p(1),l(2,"translate"),l(3,"convertMired"),c(),s(4,"nouislider",12),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.targetColorTemperature.value,i)||(a.targetColorTemperature.value=i),P(i)}),S("ngModelChange",function(){V(t);let i=u();return P(i.onColorTemperatureStateChange())}),c()}if(e&2){let t=u();o(),$(" ",d(2,6,"accessories.control.color_temperature"),": ",d(3,8,t.targetColorTemperature.mired)," "),o(3),b("min",t.targetColorTemperature.min)("max",t.targetColorTemperature.max)("step",t.targetColorTemperature.step),Z("ngModel",t.targetColorTemperature.value)}}var Br=(()=>{class e{destroyRef=D(ye);$activeModal=D(De);cdr=D(Fe);$colour=D(nt);$toastr=D(Le);service;$accessories;targetMode;targetBrightness;targetBrightnessChanged=new ee;targetColorTemperature;targetColorTemperatureChanged=new ee;targetHue;targetHueChanged=new ee;targetSaturation;targetSaturationChanged=new ee;sliderIndex=0;ngOnInit(){this.setupComponent(),this.subscribeToAccessoryUpdates()}dismissModal(){this.$activeModal.dismiss("Dismiss")}setupComponent(){this.createDebouncedSubscription(this.targetBrightnessChanged,()=>oe(this,null,function*(){let t=Ue(this.service);try{if(this.targetBrightness.value===Oe.Min){let n=this.service.getCluster?.("onOff");if(!n)throw new Error("OnOff cluster not found");yield n.setAttributes({onOff:!1})}else{let n=this.service.getCluster?.("levelControl");if(!n)throw new Error("LevelControl cluster not found");yield n.setAttributes({currentLevel:this.targetBrightness.value})}this.targetMode=this.targetBrightness.value>0}catch{this.$toastr.error("Failed to set light brightness","Error"),this.targetBrightness.value=t,this.targetMode=t>0,this.cdr.markForCheck()}}),300),this.createDebouncedSubscription(this.targetColorTemperatureChanged,t=>oe(this,null,function*(){let n=pt(this.service);try{let i=this.service.getCluster?.("colorControl");if(!i)throw new Error("ColorControl cluster not found");yield i.setAttributes({colorTemperatureMireds:t})}catch{this.$toastr.error("Failed to set light color temperature","Error"),this.targetColorTemperature.mired=n,this.targetColorTemperature.value=this.$colour.miredToKelvin(n),this.cdr.markForCheck()}}),300),this.createDebouncedSubscription(this.targetHueChanged,()=>oe(this,null,function*(){let t=yt(this.service),n=xt(this.service);try{let i=this.service.getCluster?.("colorControl");if(!i)throw new Error("ColorControl cluster not found");yield i.setAttributes({currentHue:this.targetHue.value,currentSaturation:this.targetSaturation.value})}catch{this.$toastr.error("Failed to set light hue","Error"),this.targetHue.value=t,this.targetSaturation.value=n,this.updateSaturationSliderGradient(),this.cdr.markForCheck()}}),300),this.createDebouncedSubscription(this.targetSaturationChanged,()=>oe(this,null,function*(){let t=yt(this.service),n=xt(this.service);try{let i=this.service.getCluster?.("colorControl");if(!i)throw new Error("ColorControl cluster not found");yield i.setAttributes({currentHue:this.targetHue.value,currentSaturation:this.targetSaturation.value})}catch{this.$toastr.error("Failed to set light saturation","Error"),this.targetHue.value=t,this.targetSaturation.value=n,this.cdr.markForCheck()}}),300),this.targetMode=Ze(this.service),this.loadTargetBrightness(),this.supportsColorTemperature&&this.loadTargetColorTemperature(),this.loadTargetHueSaturation()}subscribeToAccessoryUpdates(){this.$accessories&&this.$accessories.accessoryData.pipe(fe(this.destroyRef)).subscribe(()=>{this.handleAccessoryUpdate(),this.cdr.markForCheck()})}handleAccessoryUpdate(){if(this.targetMode=Ze(this.service),this.targetBrightness.value=Ue(this.service),this.supportsColorTemperature){let n=pt(this.service);this.targetColorTemperature.mired=n,this.targetColorTemperature.value=this.$colour.miredToKelvin(n)}let t=yt(this.service);this.targetHue.value!==t&&(this.targetHue.value=t,this.updateSaturationSliderGradient()),this.targetSaturation.value=xt(this.service)}setTargetMode(t,n){return oe(this,null,function*(){let i=this.targetMode,a=this.targetBrightness.value;try{if(this.targetMode=t,t){let m=this.targetBrightness.value||this.targetBrightness.max;this.targetBrightness.value=m;let A=this.service.getCluster?.("levelControl");if(!A)throw new Error("LevelControl cluster not found");yield A.setAttributes({currentLevel:m})}else{let m=this.service.getCluster?.("onOff");if(!m)throw new Error("OnOff cluster not found");yield m.setAttributes({onOff:!1})}this.blurTarget(n)}catch{this.$toastr.error(`Failed to turn light ${t?"on":"off"}`,"Error"),this.targetMode=i,this.targetBrightness.value=a,this.cdr.markForCheck()}})}onBrightnessStateChange(){this.targetBrightnessChanged.next(this.targetBrightness.value)}onColorTemperatureStateChange(){let t=this.$colour.kelvinToMired(this.targetColorTemperature.value);this.targetColorTemperature.mired=t,this.targetColorTemperatureChanged.next(t)}onHueStateChange(){this.targetHueChanged.next(this.targetHue.value),this.updateSaturationSliderGradient()}onSaturationStateChange(){this.targetSaturationChanged.next(this.targetSaturation.value)}createDebouncedSubscription(t,n,i=500){t.pipe(Ge(i),fe(this.destroyRef)).subscribe(n)}applySliderGradient(t,n=".noUi-target"){requestAnimationFrame(()=>{document.querySelectorAll(n).forEach(a=>{a.style.background=t})})}blurTarget(t){t.target.blur()}loadTargetBrightness(){let t=Ue(this.service);this.targetBrightness={value:t,min:Oe.Min,max:Oe.Max,step:1},this.applySliderGradient("linear-gradient(to right, #242424, #ffd6aa)",`.noUi-target:nth-of-type(${this.sliderIndex+1})`),this.sliderIndex+=1}loadTargetColorTemperature(){let t=pt(this.service);this.targetColorTemperature={value:this.$colour.miredToKelvin(t),mired:t,min:this.$colour.miredToKelvin(Et.MaxMired),max:this.$colour.miredToKelvin(Et.MinMired),step:10};let n=this.$colour.kelvinToHsl(this.targetColorTemperature.min),i=this.$colour.kelvinToHsl(this.targetColorTemperature.max);this.applySliderGradient(`linear-gradient(to right, ${n}, ${i})`,`.noUi-target:nth-of-type(${this.sliderIndex+1})`),this.sliderIndex+=1}loadTargetHueSaturation(){let t=yt(this.service),n=xt(this.service);this.targetHue={value:t,min:0,max:254,step:1},this.targetSaturation={value:n,min:0,max:254,step:1},this.applySliderGradient("linear-gradient(to right, hsl(0, 100%, 50%), hsl(60, 100%, 50%), hsl(120, 100%, 50%), hsl(180, 100%, 50%), hsl(240, 100%, 50%), hsl(300, 100%, 50%), hsl(360, 100%, 50%))",`.noUi-target:nth-of-type(${this.sliderIndex+1})`),this.sliderIndex+=1;let i=t/254*360;this.applySliderGradient(`linear-gradient(to right, hsl(${i}, 0%, 50%), hsl(${i}, 100%, 50%))`,`.noUi-target:nth-of-type(${this.sliderIndex+1})`),this.sliderIndex+=1}get brightnessPercentage(){return At(this.targetBrightness.value)}get huePercentage(){return Math.round(this.targetHue.value/254*100)}get saturationPercentage(){return Math.round(this.targetSaturation.value/254*100)}get previewColor(){let t=this.targetHue.value/254*360,n=this.targetSaturation.value/254*100;return`hsl(${t}, ${n}%, 50%)`}get supportsColorTemperature(){return er(this.service)}updateSaturationSliderGradient(){let t=this.supportsColorTemperature?3:2,n=this.targetHue.value/254*360;this.applySliderGradient(`linear-gradient(to right, hsl(${n}, 0%, 50%), hsl(${n}, 100%, 50%))`,`.noUi-target:nth-of-type(${t+1})`)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:36,vars:48,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"],[1,"mt-3"],[1,"modal-footer"]],template:function(n,i){n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4)(6,"div",5),l(7,"translate"),s(8,"button",6),S("click",function(m){return i.setTargetMode(!1,m)}),s(9,"div",7),f(10,"i",8),c(),p(11),l(12,"translate"),s(13,"div",9),f(14,"i",10),c()(),s(15,"button",6),S("click",function(m){return i.setTargetMode(!0,m)}),s(16,"div",7),f(17,"i",8),c(),p(18),l(19,"translate"),s(20,"div",9),f(21,"i",10),c()()(),s(22,"h6",11),p(23),l(24,"translate"),c(),s(25,"nouislider",12),Q("ngModelChange",function(m){return Y(i.targetBrightness.value,m)||(i.targetBrightness.value=m),m}),S("ngModelChange",function(){return i.onBrightnessStateChange()}),c(),h(26,wp,5,10),s(27,"h6",13),p(28),l(29,"translate"),c(),s(30,"nouislider",12),Q("ngModelChange",function(m){return Y(i.targetHue.value,m)||(i.targetHue.value=m),m}),S("ngModelChange",function(){return i.onHueStateChange()}),c(),s(31,"h6",13),p(32),l(33,"translate"),c(),s(34,"nouislider",12),Q("ngModelChange",function(m){return Y(i.targetSaturation.value,m)||(i.targetSaturation.value=m),m}),S("ngModelChange",function(){return i.onSaturationStateChange()}),c()(),f(35,"div",14),c()),n&2&&(o(2),b("innerText",i.service.customName||i.service.serviceName||i.service.displayName),o(),y("aria-label",d(4,28,"form.button_close")),o(3),y("aria-label",d(7,30,"accessories.control.mode_control")),o(4),F(O(42,Mr,!i.targetMode,i.targetMode)),o(),g(" ",d(12,32,"accessories.control.off")," "),o(6),F(O(45,Mr,i.targetMode,!i.targetMode)),o(),g(" ",d(19,34,"accessories.control.on")," "),o(5),$("",d(24,36,"accessories.control.brightness"),": ",i.brightnessPercentage,"%"),o(2),b("min",i.targetBrightness.min)("max",i.targetBrightness.max)("step",i.targetBrightness.step),Z("ngModel",i.targetBrightness.value),o(),C(i.supportsColorTemperature?26:-1),o(2),$("",d(29,38,"accessories.control.hue"),": ",i.huePercentage,"%"),o(2),b("min",i.targetHue.min)("max",i.targetHue.max)("step",i.targetHue.step),Z("ngModel",i.targetHue.value),o(2),$("",d(33,40,"accessories.control.saturation"),": ",i.saturationPercentage,"%"),o(2),b("min",i.targetSaturation.min)("max",i.targetSaturation.max)("step",i.targetSaturation.step),Z("ngModel",i.targetSaturation.value))},dependencies:[ne,ae,se,le,w,lt],encapsulation:2,changeDetection:0})}return e})();var wr=(()=>{class e{$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&It(this.service())}onLongClick(){if(!this.readyForControl())return;let t=this.$modal.open(Br,{size:"md",backdrop:"static"});t.componentInstance.service=this.service(),t.componentInstance.$accessories=this.$accessories}get isOn(){return Ke(this.service())}get brightness(){return Dt(this.service())}get lightColor(){let t=yt(this.service()),n=xt(this.service()),i=t/254*360,a=n/254*100;return`hsl(${i}, ${a}%, 50%)`}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-extended-color-light"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:14,vars:11,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["stroke","#7f7f7f","stroke-width","1.5","d","M8 21c-2.8-2.2-4.5-5.4-4.5-9 0-6.1 5-11 11.5-11S27.5 5.9 27.5 12c0 3.5-1.7 6.7-4.5 8.9-1.2 1-1.8 4.8-3 7.3-.9 2-2.2 2.7-4.5 2.7s-3.6-.7-4.5-2.7c-1.2-2.5-1.8-6.3-3-7.3z"],["stroke","#7f7f7f","stroke-width","1.5","x1","8","y1","21.5","x2","23","y2","21.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","23","x2","21","y2","24"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","25.5","x2","21","y2","26.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","11","y1","28","x2","20","y2","29"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerHTML"]],template:function(n,i){n&1&&(s(0,"div",0),S("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3),f(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),c()(),N(),s(10,"div",9),p(11),c(),f(12,"div",10),l(13,"translate"),c()()),n&2&&(U("accessory-on",i.isOn),o(2),y("aria-label",d(3,7,"accessories.core.lightbulb")),o(3),y("fill",i.isOn?i.lightColor:"none")("fill-opacity",.25+i.brightness/100*.5),o(6),g(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),o(),b("innerHTML",i.isOn?i.brightness+"%":d(13,9,"accessories.control.off"),je))},dependencies:[J,w],encapsulation:2})}return e})();var Er=(e,r)=>({"fa-check-circle":e,"fa-blank":r});function Ep(e,r){if(e&1){let t=j();s(0,"h6",12),p(1),l(2,"translate"),c(),s(3,"nouislider",13),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.targetSpeed.value,i)||(a.targetSpeed.value=i),P(i)}),S("ngModelChange",function(){V(t);let i=u();return P(i.onTargetSpeedChange())}),c()}if(e&2){let t=u();o(),$("",d(2,6,"accessories.control.rotation_speed"),": ",t.targetSpeed.value,"%"),o(2),b("min",t.targetSpeed.min)("max",t.targetSpeed.max)("step",t.targetSpeed.step),Z("ngModel",t.targetSpeed.value)}}var Dr=(()=>{class e{destroyRef=D(ye);$activeModal=D(De);cdr=D(Fe);$toastr=D(Le);service;$accessories;targetMode;targetSpeed;targetSpeedChanged=new ee;ngOnInit(){this.setupComponent(),this.subscribeToAccessoryUpdates()}dismissModal(){this.$activeModal.dismiss("Dismiss")}setupComponent(){this.createDebouncedSubscription(this.targetSpeedChanged,()=>oe(this,null,function*(){let t=St(this.service);try{yield si(this.service,this.targetSpeed.value)}catch{this.$toastr.error("Failed to set fan speed","Error"),this.targetSpeed.value=t,this.targetMode=t>0,this.cdr.markForCheck()}})),this.targetMode=Lt(this.service),this.loadSpeed()}subscribeToAccessoryUpdates(){this.$accessories&&this.$accessories.accessoryData.pipe(fe(this.destroyRef)).subscribe(()=>{this.handleAccessoryUpdate(),this.cdr.markForCheck()})}handleAccessoryUpdate(){this.targetMode=Lt(this.service),this.targetSpeed&&(this.targetSpeed.value=St(this.service))}setTargetMode(t,n){return oe(this,null,function*(){let i=this.targetMode,a=this.targetSpeed.value;try{if(this.targetMode=t,t){let m=this.targetSpeed.value||100;yield si(this.service,m),this.targetSpeed.value=m}else yield si(this.service,0),this.targetSpeed.value=0;this.blurTarget(n)}catch{this.$toastr.error(`Failed to turn fan ${t?"on":"off"}`,"Error"),this.targetMode=i,this.targetSpeed.value=a,this.cdr.markForCheck()}})}onTargetSpeedChange(){this.targetSpeedChanged.next(this.targetSpeed.value),this.targetMode=this.targetSpeed.value>0}createDebouncedSubscription(t,n,i=500){t.pipe(Ge(i),fe(this.destroyRef)).subscribe(n)}applySliderGradient(t,n=".noUi-target"){requestAnimationFrame(()=>{document.querySelectorAll(n).forEach(a=>{a.style.background=t})})}blurTarget(t){t.target.blur()}loadSpeed(){this.targetSpeed={value:St(this.service),min:0,max:100,step:1},this.applySliderGradient("linear-gradient(to right, #add8e6, #416bdf)")}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:24,vars:24,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"mt-4"],[3,"ngModelChange","min","max","step","ngModel"]],template:function(n,i){n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4)(6,"div",5),l(7,"translate"),s(8,"button",6),S("click",function(m){return i.setTargetMode(!1,m)}),s(9,"div",7),f(10,"i",8),c(),p(11),l(12,"translate"),s(13,"div",9),f(14,"i",10),c()(),s(15,"button",6),S("click",function(m){return i.setTargetMode(!0,m)}),s(16,"div",7),f(17,"i",8),c(),p(18),l(19,"translate"),s(20,"div",9),f(21,"i",10),c()()(),h(22,Ep,4,8),c(),f(23,"div",11),c()),n&2&&(o(2),b("innerText",i.service.customName||i.service.serviceName||i.service.displayName),o(),y("aria-label",d(4,10,"form.button_close")),o(3),y("aria-label",d(7,12,"accessories.control.mode_control")),o(4),F(O(18,Er,!i.targetMode,i.targetMode)),o(),g(" ",d(12,14,"accessories.control.off")," "),o(6),F(O(21,Er,i.targetMode,!i.targetMode)),o(),g(" ",d(19,16,"accessories.control.on")," "),o(4),C(i.targetSpeed?22:-1))},dependencies:[ne,ae,se,le,w],encapsulation:2,changeDetection:0})}return e})();function Dp(e,r){if(e&1&&(s(0,"div",8),p(1),c()),e&2){let t=u();o(),g("",t.fanSpeed,"%")}}function Ap(e,r){if(e&1&&(f(0,"div",9),l(1,"translate")),e&2){let t=u();b("innerText",d(1,1,t.isOn?"accessories.control.on":"accessories.control.off"))}}var Ar=(()=>{class e{$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&mr(this.service())}onLongClick(){if(!this.readyForControl())return;let t=this.$modal.open(Dr,{size:"md",backdrop:"static"});t.componentInstance.service=this.service(),t.componentInstance.$accessories=this.$accessories}get isOn(){return Lt(this.service())}get fanSpeed(){return St(this.service())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-fan"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:12,vars:9,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["transform","translate(-0.85, 0.2) scale(0.99)"],["fill","#7f7f7f","fill-rule","evenodd","clip-rule","evenodd","d","M20.988 10.265c.382-.596.951-1.424 1.844-2.71C25.462 3.61 23.456 0 18 0c-6.263 0-10.09 5.649-6.835 11.923-.594-.382-1.416-.948-2.682-1.826-3.945-2.63-7.555-.625-7.555 4.832 0 6.308 5.73 10.145 12.057 6.763-.383.599-.958 1.436-1.872 2.753C8.485 28.39 10.49 32 15.947 32c6.267 0 10.095-5.655 6.83-11.932.593.382 1.412.946 2.668 1.818 3.945 2.63 7.555.625 7.555-4.832 0-6.293-5.703-10.127-12.012-6.788Zm-.407 2.602C26.101 8.924 31 11.805 31 17.053c0 3.877-1.845 4.902-4.445 3.169-2.525-1.761-3.46-2.385-4.406-2.763a7.87 7.87 0 0 0-1.01-.317c.105-.382.161-.785.161-1.2 0-1.327-.919-3.134-.919-3.134ZM18.405 10.85c.378-.946 1.001-1.88 2.763-4.405C22.902 3.845 21.877 2 18 2c-5.247 0-8.129 4.899-4.186 10.419 0 0 1.89-.919 3.186-.919.398 0 .783.052 1.15.149.064-.269.149-.533.255-.798ZM11.78 14.524c-.946-.378-1.88-1.001-4.405-2.763-2.6-1.734-4.445-.709-4.445 3.168 0 5.247 4.899 8.129 10.419 4.186 0 0-.848-1.812-.848-3.115 0-.416.057-.819.163-1.201a7.81 7.81 0 0 0-1.183-.275Zm3.763 6.625c-.378.946-1.001 1.88-2.763 4.405-1.734 2.6-.709 4.445 3.168 4.445 5.248 0 8.13-4.899 4.187-10.419 0 0-1.831.919-3.133.919-.416 0-.819-.057-1.201-.162a7.802 7.802 0 0 0-.258.812ZM17 19.5c-1.933 0-3.5-1.567-3.5-3.5s1.567-3.5 3.5-3.5 3.5 1.567 3.5 3.5-1.567 3.5-3.5 3.5Z",1,"fan-blades"],["cx","16","cy","16","r","3.6","stroke","#7f7f7f","stroke-width","2","fill","#1976d2","fill-opacity","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(n,i){n&1&&(s(0,"div",0),S("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3)(5,"g",4),f(6,"path",5),c(),f(7,"circle",6),c()(),N(),s(8,"div",7),p(9),c(),h(10,Dp,2,1,"div",8)(11,Ap,2,3,"div",9),c()()),n&2&&(U("accessory-on",i.isOn),o(2),U("spin",i.isOn),y("aria-label",d(3,7,"accessories.core.fan")),o(7),g(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),o(),C(i.isOn&&i.fanSpeed>0?10:11))},dependencies:[J,w],styles:[".spin svg g .fan-blades{animation:_ngcontent-%COMP%_fa-spin 2s infinite linear;transform-origin:53.5% 50%} .spin-counter svg g .fan-blades{animation:_ngcontent-%COMP%_fa-spin-counter 2s infinite linear;transform-origin:53.5% 50%}@keyframes _ngcontent-%COMP%_fa-spin{0%{transform:rotate(0)}to{transform:rotate(359deg)}}@keyframes _ngcontent-%COMP%_fa-spin-counter{0%{transform:rotate(0)}to{transform:rotate(-359deg)}}"]})}return e})();function Ip(e,r){if(e&1&&p(0),e&2){let t=u();g(" ",t.humidity,"% ")}}function Fp(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.no_data")," ")}var Ir=(()=>{class e{service=B.required({});get humidity(){return rr(this.service())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-humidity-sensor"]],inputs:{service:[1,"service"]},decls:26,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["transform","translate(1.8, -4.3), scale(0.85)"],["d","M23.61 24.58C23.61 28.67 20.44 31.99 16.56 31.99C12.68 31.99 9.52 28.67 9.52 24.58C9.52 20.49 12.68 17.13 16.56 10.87C20.44 17.13 23.61 20.49 23.61 24.58Z","fill","#1976d2","fill-opacity","0.4","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(n,i){n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4),x(6,"g",5),L(7,"path",6),k(),L(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19),k()(),N(),x(21,"div",20),p(22),k(),x(23,"div",21),h(24,Ip,1,1)(25,Fp,2,3),k()()()),n&2&&(o(2),y("aria-label",d(3,3,"accessories.core.humidity_sensor")),o(20),v(i.service().customName||i.service().serviceName),o(2),C(i.humidity!==null?24:25))},dependencies:[w],encapsulation:2})}return e})();function Lp(e,r){if(e&1&&(x(0,"div",28),p(1),l(2,"number"),k()),e&2){let t=u();o(),g("",ce(2,1,t.illuminance,"0.1-1")," lux")}}function Vp(e,r){if(e&1&&(x(0,"div",28),p(1),l(2,"number"),k()),e&2){let t=u();o(),g("",ce(2,1,t.illuminance,"1.0-0")," lux")}}var Fr=(()=>{class e{service=B.required({});get illuminance(){return nr(this.service())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-light-sensor"]],inputs:{service:[1,"service"]},decls:32,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["cx","16","cy","13.75","r","5","stroke","#ff9800","fill","none","stroke-width","1.2","stroke-opacity","0.5"],["x1","16","y1","3","x2","16","y2","7","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","23.5","y1","6","x2","20.5","y2","9","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","22.75","y1","13.5","x2","26.75","y2","13.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","20.75","y1","18.25","x2","23.75","y2","21.25","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","16","y1","20.5","x2","16","y2","24.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","11.25","y1","18.25","x2","8.25","y2","21.25","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","5.25","y1","13.5","x2","9.25","y2","13.5","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["x1","8.5","y1","6","x2","11.5","y2","9","stroke","#ff9800","stroke-width","1.2","stroke-opacity","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(n,i){n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4)(6,"circle",5)(7,"line",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24)(26,"line",25)(27,"line",26),k()(),N(),x(28,"div",27),p(29),k(),h(30,Lp,3,4,"div",28)(31,Vp,3,4,"div",28),k()()),n&2&&(o(2),y("aria-label",d(3,3,"accessories.core.light_sensor")),o(27),v(i.service().customName||i.service().serviceName),o(),C(i.illuminance<1?30:31))},dependencies:[Ee,w],encapsulation:2})}return e})();function Pp(e,r){e&1&&(x(0,"div",22),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.detected")))}function Op(e,r){e&1&&(x(0,"div",23),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.not_detected")))}var Lr=(()=>{class e{service=B.required({});get isOccupied(){return ir(this.service())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-occupancy-sensor"]],inputs:{service:[1,"service"]},decls:26,vars:7,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"orange-outline"],["transform","translate(4.75, -0.75), scale(0.075)"],["d","M190.85 83.94C190.85 70.36 180.09 59.24 166.93 59.24C153.78 59.24 143.02 70.36 143.02 83.94C143.02 97.53 153.78 108.65 166.93 108.65C180.09 108.65 190.85 97.53 190.85 83.94Z","fill","#ff9800","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["d","M232.24 175.95C210.12 175.95 190.98 163.6 180.22 145.69C179.08 143.72 169.99 127.91 168.86 125.93C164.67 118.52 156.9 114.2 148.53 114.2C145.54 114.2 142.55 114.81 139.56 116.05C135.37 117.82 114.45 126.67 76.78 142.6L76.78 200.66L100.69 200.66L100.69 159.28L121.62 150.02L88.73 324.17L113.85 324.17L134.78 225.36L160.49 250.06L160.49 324.17L184.4 324.17L184.4 230.92L159.89 205.6C164.19 183.36 166.59 171.01 167.06 168.54C182.61 188.3 205.93 200.66 232.24 200.66C232.24 195.72 232.24 178.42 232.24 175.95Z","fill","#ff9800","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","7"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(n,i){n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4),x(6,"g",5),L(7,"path",6)(8,"path",7),k(),L(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20),k()(),N(),x(22,"div",21),p(23),k(),h(24,Pp,3,3,"div",22)(25,Op,3,3,"div",23),k()()),n&2&&(U("accessory-on",i.isOccupied),o(2),y("aria-label",d(3,5,"accessories.core.occupancy_sensor")),o(21),v(i.service().customName||i.service().serviceName),o(),C(i.isOccupied?24:25))},dependencies:[w],styles:[".accessory-on svg .orange-outline{stroke:#ff9800;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();var Vr=(()=>{class e{service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&dt(this.service())}get isOn(){return Ke(this.service())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-on-off-light-switch"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:12,vars:9,consts:[["tabindex","0",1,"accessory-box",3,"click"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","16","cy","16","r","14","fill","none","stroke","#7f7f7f","stroke-width","2"],["x1","16","y1","8","x2","16","y2","14","stroke","#7f7f7f","stroke-width","2","stroke-linecap","round"],["fill","#7f7f7f","d",`M21.4589329,9.49999998
41
+ C21,9.97698687 21.1735519,10.8351 21.4589326,11.2029426
42
+ C22.4505994,12.4811551 23,14.065977 23,15.7447101
43
+ C23,19.7640218 19.8532802,23 16,23
44
+ C12.1467198,23 9,19.7640218 9,15.7447101
45
+ C9,14.0415493 9.56560927,12.4352187 10.5838497,11.1483389
46
+ C10.8725653,10.7834523 11,9.9670534 10.5,9.49999999
47
+ C10,9.03294657 9.01543812,9.9073372 9.01543812,9.9073372
48
+ C7.75536735,11.4998488 7,13.5315645 7,15.7447101
49
+ C7,20.8562656 11.0294373,25 16,25
50
+ C20.9705627,25 25,20.8562656 25,15.7447101
51
+ C25,13.5637007 24.2664101,11.5588905 23.0391328,9.97698685
52
+ C23.0391328,9.97698685 21.9178658,9.0230131 21.4589329,9.49999998 Z`],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(n,i){n&1&&(x(0,"div",0),Ce("click",function(){return i.onClick()}),x(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"circle",4)(6,"line",5)(7,"path",6),k()(),N(),x(8,"div",7),p(9),k(),L(10,"div",8),l(11,"translate"),k()()),n&2&&(U("accessory-on",i.isOn),o(2),y("aria-label",d(3,5,"accessories.core.switch")),o(7),g(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),o(),qe("innerText",d(11,7,i.isOn?"accessories.control.on":"accessories.control.off")))},dependencies:[w],encapsulation:2})}return e})();var Pr=(()=>{class e{service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&dt(this.service())}get isOn(){return Ke(this.service())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-on-off-light"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:14,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"click"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["fill-opacity","0.75","stroke","#7f7f7f","stroke-width","1.5","d","M8 21c-2.8-2.2-4.5-5.4-4.5-9 0-6.1 5-11 11.5-11S27.5 5.9 27.5 12c0 3.5-1.7 6.7-4.5 8.9-1.2 1-1.8 4.8-3 7.3-.9 2-2.2 2.7-4.5 2.7s-3.6-.7-4.5-2.7c-1.2-2.5-1.8-6.3-3-7.3z"],["stroke","#7f7f7f","stroke-width","1.5","x1","8","y1","21.5","x2","23","y2","21.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","23","x2","21","y2","24"],["stroke","#7f7f7f","stroke-width","0.75","x1","10","y1","25.5","x2","21","y2","26.5"],["stroke","#7f7f7f","stroke-width","0.75","x1","11","y1","28","x2","20","y2","29"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerHTML"]],template:function(n,i){n&1&&(x(0,"div",0),Ce("click",function(){return i.onClick()}),x(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"path",4)(6,"line",5)(7,"line",6)(8,"line",7)(9,"line",8),k()(),N(),x(10,"div",9),p(11),k(),L(12,"div",10),l(13,"translate"),k()()),n&2&&(U("accessory-on",i.isOn),o(2),y("aria-label",d(3,6,"accessories.core.lightbulb")),o(3),y("fill",i.isOn?"#ffcf55":"none"),o(6),g(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),o(),qe("innerHTML",d(13,8,i.isOn?"accessories.control.on":"accessories.control.off"),je))},dependencies:[w],encapsulation:2})}return e})();function Np(e,r){e&1&&(I(),L(0,"line",8)(1,"line",9)(2,"line",10))}function Hp(e,r){e&1&&(I(),L(0,"line",11)(1,"line",12)(2,"line",13))}function Rp(e,r){e&1&&(I(),L(0,"line",13)(1,"line",14)(2,"line",15))}var Or=(()=>{class e{$settings=D(Te);service=B.required({});readyForControl=B(!1,{});browserLang=this.$settings.browserLang;onClick(){this.readyForControl()&&dt(this.service())}get isOn(){return Ke(this.service())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-on-off-plug-in-unit"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:14,vars:10,consts:[["tabindex","0",1,"accessory-box",3,"click"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32","height","32","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","30","rx","6","ry","6","fill","none","stroke","#7f7f7f","stroke-width","1.5",1,"outer"],["cx","16","cy","16","r","10","fill","none","stroke","#7f7f7f","stroke-width","1.5",1,"inner"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"],["x1","16","y1","10","x2","16","y2","13","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","10","y1","19","x2","13","y2","19","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","19","y1","19","x2","22","y2","19","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","11.5","y1","14.5","x2","13.5","y2","11.5","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","18.5","y1","11.5","x2","20.5","y2","14.5","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","16","y1","19","x2","16","y2","22","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","10","y1","14","x2","13","y2","14","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"],["x1","19","y1","14","x2","22","y2","14","stroke","#7f7f7f","stroke-linecap","round","stroke-width","1.5"]],template:function(n,i){n&1&&(x(0,"div",0),Ce("click",function(){return i.onClick()}),x(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4)(6,"circle",5),h(7,Np,3,0)(8,Hp,3,0)(9,Rp,3,0),k()(),N(),x(10,"div",6),p(11),k(),L(12,"div",7),l(13,"translate"),k()()),n&2&&(U("accessory-on",i.isOn),o(2),y("aria-label",d(3,6,"accessories.core.outlet")),o(5),C(i.browserLang==="en-GB"?7:i.browserLang==="en-AU"||i.browserLang==="en-NZ"?8:9),o(4),g(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),o(),qe("innerText",d(13,8,i.isOn?"accessories.control.on":"accessories.control.off")))},dependencies:[w],styles:[".accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] .outer[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75;stroke-width:2.5}.accessory-on[_ngcontent-%COMP%] .accessory-svg[_ngcontent-%COMP%] .inner[_ngcontent-%COMP%]{stroke:#1976d2;stroke-opacity:.75}"]})}return e})();var Oi=(e,r)=>({"fa-check-circle":e,"fa-blank":r}),Nr=(()=>{class e{destroyRef=D(ye);$activeModal=D(De);cdr=D(Fe);$toastr=D(Le);service;$accessories;currentMode=0;ngOnInit(){this.setupComponent(),this.subscribeToAccessoryUpdates()}dismissModal(){this.$activeModal.dismiss("Dismiss")}setupComponent(){this.updateModeFromService()}subscribeToAccessoryUpdates(){this.$accessories&&this.$accessories.accessoryData.pipe(fe(this.destroyRef)).subscribe(()=>{this.handleAccessoryUpdate(),this.cdr.markForCheck()})}handleAccessoryUpdate(){this.updateModeFromService()}updateModeFromService(){let t=this.service.clusters?.rvcOperationalState?.operationalState??0;t===1?this.currentMode=1:t===2?this.currentMode=2:this.currentMode=0}setMode(t,n){return oe(this,null,function*(){if(t===2&&this.currentMode===0)return;let i=this.currentMode;try{if(this.currentMode=t,this.cdr.markForCheck(),t===0){let a=this.service.getCluster?.("rvcRunMode");if(!a)throw new Error("RvcRunMode cluster not found");yield a.setAttributes({currentMode:0})}else if(t===1){let a=this.service.getCluster?.("rvcRunMode");if(!a)throw new Error("RvcRunMode cluster not found");yield a.setAttributes({currentMode:1})}else if(t===2){let a=this.service.getCluster?.("rvcOperationalState");if(!a)throw new Error("RvcOperationalState cluster not found");yield a.setAttributes({operationalState:2})}this.blurTarget(n)}catch{let m=t===0?"stop":t===1?"start":"pause";this.$toastr.error(`Failed to ${m} robotic vacuum`,"Error"),this.currentMode=i,this.cdr.markForCheck()}})}blurTarget(t){t.target.blur()}get isPauseDisabled(){return this.currentMode===0}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:30,vars:33,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"]],template:function(n,i){n&1&&(x(0,"div",0)(1,"div",1),L(2,"h5",2),x(3,"button",3),l(4,"translate"),Ce("click",function(){return i.dismissModal()}),k()(),x(5,"div",4)(6,"div",5),l(7,"translate"),x(8,"button",6),Ce("click",function(m){return i.setMode(0,m)}),x(9,"div",7),L(10,"i",8),k(),p(11),l(12,"translate"),x(13,"div",9),L(14,"i",10),k()(),x(15,"button",6),Ce("click",function(m){return i.setMode(2,m)}),x(16,"div",7),L(17,"i",8),k(),p(18),l(19,"translate"),x(20,"div",9),L(21,"i",10),k()(),x(22,"button",6),Ce("click",function(m){return i.setMode(1,m)}),x(23,"div",7),L(24,"i",8),k(),p(25),l(26,"translate"),x(27,"div",9),L(28,"i",10),k()()()(),L(29,"div",11),k()),n&2&&(o(2),qe("innerText",i.service.customName||i.service.serviceName),o(),y("aria-label",d(4,14,"form.button_close")),o(3),y("aria-label",d(7,16,"accessories.control.mode_control")),o(4),F(O(24,Oi,i.currentMode===0,i.currentMode!==0)),o(),g(" ",d(12,18,"accessories.control.stopped")," "),o(4),U("btn-pause-disabled",i.isPauseDisabled),o(2),F(O(27,Oi,i.currentMode===2,i.currentMode!==2)),o(),g(" ",d(19,20,"accessories.control.paused")," "),o(6),F(O(30,Oi,i.currentMode===1,i.currentMode!==1)),o(),g(" ",d(26,22,"accessories.control.cleaning")," "))},dependencies:[w],styles:[".btn-control.btn-pause-disabled[_ngcontent-%COMP%]{opacity:.5;cursor:not-allowed!important;pointer-events:auto!important}.btn-control.btn-pause-disabled[_ngcontent-%COMP%]:hover{cursor:not-allowed!important}"],changeDetection:0})}return e})();var Hr=(()=>{class e{$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});onClick(){if(!this.readyForControl()){console.warn("Robotic vacuum: Not ready for control");return}dt(this.service())}onLongClick(){if(!this.readyForControl()||!this.canShowModal)return;let t=this.$modal.open(Nr,{size:"md",backdrop:"static"});t.componentInstance.service=this.service(),t.componentInstance.$accessories=this.$accessories}get isActive(){return Ke(this.service())}get statusText(){return Xo(this.service())}get canShowModal(){return!Jo(this.service())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-robotic-vacuum-cleaner"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:36,vars:9,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","motionClip"],["x","0","y","-0.5","width","32","height","8"],["transform","translate(0, 5)"],["cx","16","cy","10","rx","14","ry","8.4","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["x1","2","y1","10","x2","2","y2","16","stroke","#7f7f7f","stroke-width","1.75"],["x1","30","y1","10","x2","30","y2","16","stroke","#7f7f7f","stroke-width","1.75"],["d","M2,16 A14,6.9 0 0,0 30,16","stroke","#7f7f7f","stroke-width","1.75","fill","none"],["cx","16","cy","10","rx","4.2","ry","2.5","stroke","#7f7f7f","stroke-width","1","fill","#1976d2","fill-opacity","0.5"],["cx","16","cy","15","r","0.9","fill","#7f7f7f"],["x1","2","y1","16","x2","0.5","y2","18.5","stroke","#7f7f7f","stroke-width","1"],["x1","2","y1","16","x2","0.5","y2","14","stroke","#7f7f7f","stroke-width","1"],["x1","30","y1","16","x2","31.5","y2","18.5","stroke","#7f7f7f","stroke-width","1"],["x1","30","y1","16","x2","31.5","y2","14","stroke","#7f7f7f","stroke-width","1"],["clip-path","url(#motionClip)","stroke","#7f7f7f","stroke-linecap","round",1,"motion-lines",2,"display","none"],["x1","12","y1","8","x2","12","y2","14","stroke-width","2.1","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.3s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.3s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.3s","repeatCount","indefinite"],["x1","16","y1","8","x2","16","y2","14","stroke-width","2.5","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.6s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.6s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.6s","repeatCount","indefinite"],["x1","20","y1","8","x2","20","y2","14","stroke-width","2.1","opacity","0"],["attributeName","y1","values","8;0","dur","3s","begin","0.9s","repeatCount","indefinite"],["attributeName","y2","values","14;6","dur","3s","begin","0.9s","repeatCount","indefinite"],["attributeName","opacity","values","0;1;1;0","keyTimes","0;0.2;0.8;1","dur","3s","begin","0.9s","repeatCount","indefinite"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text",3,"innerText"]],template:function(n,i){n&1&&(s(0,"div",0),S("longClick",function(){return i.canShowModal&&i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3)(5,"defs")(6,"clipPath",4),f(7,"rect",5),c()(),s(8,"g",6),f(9,"ellipse",7)(10,"line",8)(11,"line",9)(12,"path",10)(13,"ellipse",11)(14,"circle",12)(15,"line",13)(16,"line",14)(17,"line",15)(18,"line",16),c(),s(19,"g",17)(20,"line",18),f(21,"animate",19)(22,"animate",20)(23,"animate",21),c(),s(24,"line",22),f(25,"animate",23)(26,"animate",24)(27,"animate",25),c(),s(28,"line",26),f(29,"animate",27)(30,"animate",28)(31,"animate",29),c()()()(),N(),s(32,"div",30),p(33),c(),f(34,"div",31),l(35,"translate"),c()()),n&2&&(U("accessory-on",i.isActive),o(2),y("aria-label",d(3,5,"accessories.core.robotic_vacuum_cleaner")),o(31),v(i.service().customName||i.service().serviceName),o(),b("innerText",d(35,7,i.statusText)))},dependencies:[J,w],styles:[".accessory-box.accessory-on[_ngcontent-%COMP%] .motion-lines[_ngcontent-%COMP%]{display:block!important}"]})}return e})();function $p(e,r){e&1&&(x(0,"div",17),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.detected")))}function Up(e,r){e&1&&(x(0,"div",18),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.not_detected")))}var Rr=(()=>{class e{service=B.required({});get isTriggered(){return ar(this.service())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-smoke-co-alarm"]],inputs:{service:[1,"service"]},decls:22,vars:7,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","1","width","30","height","12","rx","1","stroke","#7f7f7f","fill","none","stroke-width","1.25"],["text-anchor","middle","dominant-baseline","middle","font-family","Arial","font-size","7.5","x","16","y","7.7","fill","#7f7f7f","stroke-width","0.6","font-weight","900",1,"type"],["x1","6","y1","14.5","x2","25.5","y2","14.5","stroke","#1976d2","stroke-opacity","0.5","stroke-width","2"],["stroke-linecap","round","x1","5","y1","13","x2","6.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","13","x2","11","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","15.5","y1","13","x2","15.5","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","20","y1","13","x2","20","y2","16","stroke","#7f7f7f","stroke-width","1"],["stroke-linecap","round","x1","26","y1","13","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","6.5","y1","16","x2","24.5","y2","16","stroke","#7f7f7f","stroke-width","1.25"],["stroke-linecap","round","x1","11","y1","21","x2","6","y2","27","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["stroke-linecap","round","x1","16","y1","21","x2","16","y2","31","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],["stroke-linecap","round","x1","21","y1","21","x2","26","y2","27","stroke","#7f7f7f","stroke-width","1.25",1,"air-line"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(n,i){n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4),x(6,"text",5),p(7," ALARM "),k(),L(8,"line",6)(9,"line",7)(10,"line",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"line",13)(16,"line",14)(17,"line",15),k()(),N(),x(18,"div",16),p(19),k(),h(20,$p,3,3,"div",17)(21,Up,3,3,"div",18),k()()),n&2&&(U("accessory-on",i.isTriggered),o(2),y("aria-label",d(3,5,"accessories.core.smoke_sensor")),o(17),v(i.service().customName||i.service().serviceName),o(),C(i.isTriggered?20:21))},dependencies:[w],styles:[".accessory-on svg .air-line{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite} .accessory-on svg .type{fill:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{opacity:1}50%{opacity:.2}}"]})}return e})();function Wp(e,r){if(e&1&&(p(0),l(1,"convertTemp"),l(2,"number"),l(3,"uppercase")),e&2){let t=u();$(" ",ce(2,4,d(1,2,t.temperature),"1.0-1"),"\xB0",d(3,7,t.temperatureUnits)," ")}}function Gp(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.no_data")," ")}var $r=(()=>{class e{$settings=D(Te);service=B.required({});temperatureUnits=this.$settings.env.temperatureUnits;get temperature(){return or(this.service())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-temperature-sensor"]],inputs:{service:[1,"service"]},decls:34,vars:5,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x1","16","y1","5","x2","16","y2","17","stroke","#7f7f7f","stroke-width","1.2","stroke-linecap","round"],["cx","16","cy","20","r","3","stroke","#7f7f7f","stroke-width","1.2","fill","#1976d2","fill-opacity","0.5"],["x1","9","y1","6","x2","13","y2","6","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","9","x2","13","y2","9","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","12","x2","13","y2","12","stroke","#7f7f7f","stroke-width","0.8"],["x1","9","y1","15","x2","13","y2","15","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","6","x2","23","y2","6","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","9","x2","23","y2","9","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","12","x2","23","y2","12","stroke","#7f7f7f","stroke-width","0.8"],["x1","19","y1","15","x2","23","y2","15","stroke","#7f7f7f","stroke-width","0.8"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(n,i){n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4)(6,"line",5)(7,"circle",6)(8,"line",7)(9,"line",8)(10,"line",9)(11,"line",10)(12,"line",11)(13,"line",12)(14,"line",13)(15,"line",14)(16,"line",15)(17,"line",16)(18,"line",17)(19,"line",18)(20,"line",19)(21,"line",20)(22,"line",21)(23,"line",22)(24,"line",23)(25,"line",24)(26,"line",25)(27,"line",26)(28,"line",27),k()(),N(),x(29,"div",28),p(30),k(),x(31,"div",29),h(32,Wp,4,9)(33,Gp,2,3),k()()()),n&2&&(o(2),y("aria-label",d(3,3,"accessories.core.temperature_sensor")),o(28),v(i.service().customName||i.service().serviceName),o(2),C(i.temperature!==null?32:33))},dependencies:[Ee,Ve,He,w],encapsulation:2})}return e})();var ci=(e,r)=>({"fa-check-circle":e,"fa-blank":r});function jp(e,r){if(e&1&&(s(0,"h6",5),f(1,"i",13),p(2),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),c()),e&2){let t=u();o(),st("color",t.targetMode===3?"#1e8bbd":t.targetMode===4?"#e69533":t.targetMode===1?"#42d672":"#7b7b7b"),o(),$("",ce(4,6,d(3,4,t.currentTemperature),"1.0-1"),"\xB0",d(5,9,t.temperatureUnits)," ")}}function qp(e,r){if(e&1){let t=j();s(0,"h6",14),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),l(6,"convertTemp"),l(7,"number"),l(8,"uppercase"),c(),s(9,"nouislider",15),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.autoTemp,i)||(a.autoTemp=i),P(i)}),S("ngModelChange",function(){V(t);let i=u();return P(i.onAutoTempChange())}),c()}if(e&2){let t=u();o(),Mt(" ",d(2,9,"accessories.control.threshold_auto"),": ",ce(4,13,d(3,11,t.autoTemp[0]),"1.0-1"),"\xB0",d(5,16,t.temperatureUnits)," - ",ce(7,20,d(6,18,t.autoTemp[1]),"1.0-1"),"\xB0",d(8,23,t.temperatureUnits)," "),o(8),b("min",t.minHeatSetpoint)("max",t.maxCoolSetpoint)("step",.5),Z("ngModel",t.autoTemp)}}function zp(e,r){if(e&1){let t=j();s(0,"h6",16),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),c(),s(6,"nouislider",15),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.targetHeatingTemp,i)||(a.targetHeatingTemp=i),P(i)}),S("ngModelChange",function(){V(t);let i=u();return P(i.onHeatingTempChange())}),c()}if(e&2){let t=u();o(),Je(" ",d(2,7,"accessories.control.target"),": ",ce(4,11,d(3,9,t.targetHeatingTemp),"1.0-1"),"\xB0",d(5,14,t.temperatureUnits)," "),o(5),b("min",t.minHeatSetpoint)("max",t.maxHeatSetpoint)("step",.5),Z("ngModel",t.targetHeatingTemp)}}function Kp(e,r){if(e&1){let t=j();s(0,"h6",16),p(1),l(2,"translate"),l(3,"convertTemp"),l(4,"number"),l(5,"uppercase"),c(),s(6,"nouislider",15),Q("ngModelChange",function(i){V(t);let a=u();return Y(a.targetCoolingTemp,i)||(a.targetCoolingTemp=i),P(i)}),S("ngModelChange",function(){V(t);let i=u();return P(i.onCoolingTempChange())}),c()}if(e&2){let t=u();o(),Je(" ",d(2,7,"accessories.control.target"),": ",ce(4,11,d(3,9,t.targetCoolingTemp),"1.0-1"),"\xB0",d(5,14,t.temperatureUnits)," "),o(5),b("min",t.minCoolSetpoint)("max",t.maxCoolSetpoint)("step",.5),Z("ngModel",t.targetCoolingTemp)}}var Ur=(()=>{class e{destroyRef=D(ye);$activeModal=D(De);cdr=D(Fe);$settings=D(Te);$toastr=D(Le);service;$accessories;targetMode;targetHeatingTemp;targetCoolingTemp;autoTemp;temperatureUnits=this.$settings.env.temperatureUnits;heatingTempChanged=new ee;coolingTempChanged=new ee;autoTempChanged=new ee;minHeatSetpoint=7;maxHeatSetpoint=30;minCoolSetpoint=10;maxCoolSetpoint=35;ngOnInit(){this.setupComponent(),this.subscribeToAccessoryUpdates()}dismissModal(){this.$activeModal.dismiss("Dismiss")}setupComponent(){this.createDebouncedSubscription(this.heatingTempChanged,()=>oe(this,null,function*(){try{yield Vi(this.service,this.targetHeatingTemp)}catch{this.$toastr.error("Failed to set heating temperature","Error"),this.targetHeatingTemp=Wt(this.service),this.cdr.markForCheck()}})),this.createDebouncedSubscription(this.coolingTempChanged,()=>oe(this,null,function*(){try{yield Pi(this.service,this.targetCoolingTemp)}catch{this.$toastr.error("Failed to set cooling temperature","Error"),this.targetCoolingTemp=Gt(this.service),this.cdr.markForCheck()}})),this.createDebouncedSubscription(this.autoTempChanged,()=>oe(this,null,function*(){try{yield Vi(this.service,this.autoTemp[0]),yield Pi(this.service,this.autoTemp[1])}catch{this.$toastr.error("Failed to set temperature range","Error"),this.targetHeatingTemp=Wt(this.service),this.targetCoolingTemp=Gt(this.service),this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.cdr.markForCheck()}})),this.targetMode=Vt(this.service),this.targetHeatingTemp=Wt(this.service),this.targetCoolingTemp=Gt(this.service),this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp];let t=this.service.clusters?.thermostat;t&&(this.minHeatSetpoint=t.minHeatSetpointLimit?t.minHeatSetpointLimit/100:7,this.maxHeatSetpoint=t.maxHeatSetpointLimit?t.maxHeatSetpointLimit/100:30,this.minCoolSetpoint=t.minCoolSetpointLimit?t.minCoolSetpointLimit/100:10,this.maxCoolSetpoint=t.maxCoolSetpointLimit?t.maxCoolSetpointLimit/100:35),this.applySliderGradient("linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))")}subscribeToAccessoryUpdates(){this.$accessories&&this.$accessories.accessoryData.pipe(fe(this.destroyRef)).subscribe(()=>{this.handleAccessoryUpdate(),this.cdr.markForCheck()})}createDebouncedSubscription(t,n,i=500){t.pipe(Ge(i),fe(this.destroyRef)).subscribe(n)}applySliderGradient(t,n=".noUi-target"){requestAnimationFrame(()=>{document.querySelectorAll(n).forEach(a=>{a.style.background=t})})}blurTarget(t){t.target.blur()}handleAccessoryUpdate(){this.targetMode=Vt(this.service),this.targetHeatingTemp=Wt(this.service),this.targetCoolingTemp=Gt(this.service),this.autoTemp=[this.targetHeatingTemp,this.targetCoolingTemp],this.applySliderGradient("linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))")}setTargetMode(t,n){return oe(this,null,function*(){let i=this.targetMode;try{this.targetMode=t,this.cdr.markForCheck(),yield fr(this.service,this.targetMode),this.blurTarget(n),this.applySliderGradient("linear-gradient(to right, rgb(80, 80, 179), rgb(173, 216, 230), rgb(255, 185, 120), rgb(139, 90, 60))")}catch{this.$toastr.error("Failed to set thermostat mode","Error"),this.targetMode=i,this.cdr.markForCheck()}})}onHeatingTempChange(){this.heatingTempChanged.next(this.targetHeatingTemp)}onCoolingTempChange(){this.coolingTempChanged.next(this.targetCoolingTemp)}onAutoTempChange(){this.targetHeatingTemp=this.autoTemp[0],this.targetCoolingTemp=this.autoTemp[1],this.autoTempChanged.next(this.autoTemp)}get currentTemperature(){return li(this.service)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:41,vars:43,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"mt-2","mb-4","fs-4"],["role","group",1,"btn-group-vertical","d-flex","justify-content-center","mb-0","p-0"],["type","button",1,"btn","mb-0","mx-0","p-3","btn-control",3,"click"],[1,"float-start","primary-text"],[1,"fas","fa-xl"],[1,"float-end"],[1,"fas","fa-xl","fa-blank"],[1,"modal-footer"],[1,"fas","fa-temperature-full"],[1,"mt-4","mb-1"],[3,"ngModelChange","min","max","step","ngModel"],[1,"mt-4"]],template:function(n,i){n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4),h(6,jp,6,11,"h6",5),s(7,"div",6),l(8,"translate"),s(9,"button",7),S("click",function(m){return i.setTargetMode(0,m)}),s(10,"div",8),f(11,"i",9),c(),p(12),l(13,"translate"),s(14,"div",10),f(15,"i",11),c()(),s(16,"button",7),S("click",function(m){return i.setTargetMode(1,m)}),s(17,"div",8),f(18,"i",9),c(),p(19),l(20,"translate"),s(21,"div",10),f(22,"i",11),c()(),s(23,"button",7),S("click",function(m){return i.setTargetMode(4,m)}),s(24,"div",8),f(25,"i",9),c(),p(26),l(27,"translate"),s(28,"div",10),f(29,"i",11),c()(),s(30,"button",7),S("click",function(m){return i.setTargetMode(3,m)}),s(31,"div",8),f(32,"i",9),c(),p(33),l(34,"translate"),s(35,"div",10),f(36,"i",11),c()()(),h(37,qp,10,25),h(38,zp,7,16),h(39,Kp,7,16),c(),f(40,"div",12),c()),n&2&&(o(2),b("innerText",i.service.customName||i.service.serviceName||i.service.displayName),o(),y("aria-label",d(4,19,"form.button_close")),o(3),C(i.currentTemperature!==null?6:-1),o(),y("aria-label",d(8,21,"accessories.control.mode_control")),o(4),F(O(31,ci,i.targetMode===0,i.targetMode!==0)),o(),g(" ",d(13,23,"accessories.control.off")," "),o(6),F(O(34,ci,i.targetMode===1,i.targetMode!==1)),o(),g(" ",d(20,25,"accessories.control.auto")," "),o(6),F(O(37,ci,i.targetMode===4,i.targetMode!==4)),o(),g(" ",d(27,27,"accessories.control.heat")," "),o(6),F(O(40,ci,i.targetMode===3,i.targetMode!==3)),o(),g(" ",d(34,29,"accessories.control.cool")," "),o(4),C(i.targetMode===1?37:-1),o(),C(i.targetMode===4?38:-1),o(),C(i.targetMode===3?39:-1))},dependencies:[ne,ae,se,le,Ee,w,Ve,He],encapsulation:2,changeDetection:0})}return e})();function Zp(e,r){if(e&1&&(I(),s(0,"text",18),p(1),l(2,"convertTemp"),l(3,"number"),l(4,"uppercase"),c()),e&2){let t=u();o(),$(" ",ce(3,4,d(2,2,t.currentTemperature),"1.0-1"),"\xB0",d(4,7,t.temperatureUnits)," ")}}function Yp(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.off")," ")}function Qp(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.cool")," ")}function Jp(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.heat")," ")}function Xp(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.auto")," ")}var Wr=(()=>{class e{$modal=D(X);$settings=D(Te);$accessories=D(ie);service=B.required({});readyForControl=B(!1,{});temperatureUnits=this.$settings.env.temperatureUnits;onClick(){if(!this.readyForControl())return;let t=this.$modal.open(Ur,{size:"md",backdrop:"static"});t.componentInstance.service=this.service(),t.componentInstance.$accessories=this.$accessories}get isOn(){return ur(this.service())}get systemMode(){return Vt(this.service())}get currentTemperature(){return li(this.service())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-thermostat"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:30,vars:9,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["id","coolingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#1e8bbd"],["attributeName","stop-color","values","#1e8bbd;#66d6d6;#1e8bbd","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#66d6d6"],["attributeName","stop-color","values","#66d6d6;#1e8bbd;#66d6d6","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#1e8bbd"],["id","heatingGradient","x1","0","y1","1","x2","0","y2","0"],["offset","0%","stop-color","#cc5e00"],["attributeName","stop-color","values","#cc5e00;#e69533;#cc5e00;#e69533","dur","5s","repeatCount","indefinite"],["offset","50%","stop-color","#e69533"],["attributeName","stop-color","values","#e69533;#cc5e00;#e69533;#cc5e00","dur","5s","repeatCount","indefinite"],["offset","100%","stop-color","#cc5e00"],["x","1","y","1","width","30","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2"],["x","1","y","19","width","30","height","8","rx","0","stroke","#7f7f7f","stroke-width","0.75","fill-opacity","0.5"],["x","16","y","13","font-size","8","text-anchor","middle","fill","#7f7f7f","font-family","Arial, sans-serif"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(n,i){n&1&&(s(0,"div",0),S("longClick",function(){return i.onClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1)(2,"div",2),l(3,"translate"),I(),s(4,"svg",3)(5,"defs")(6,"linearGradient",4)(7,"stop",5),f(8,"animate",6),c(),s(9,"stop",7),f(10,"animate",8),c(),s(11,"stop",9),f(12,"animate",6),c()(),s(13,"linearGradient",10)(14,"stop",11),f(15,"animate",12),c(),s(16,"stop",13),f(17,"animate",14),c(),s(18,"stop",15),f(19,"animate",12),c()()(),f(20,"rect",16)(21,"rect",17),h(22,Zp,5,9,":svg:text",18),c()(),N(),s(23,"div",19),p(24),c(),s(25,"div",20),h(26,Yp,2,3)(27,Qp,2,3)(28,Jp,2,3)(29,Xp,2,3),c()()()),n&2&&(U("accessory-on",i.isOn),o(2),y("aria-label",d(3,7,"accessories.core.thermostat")),o(19),y("fill",i.systemMode===3?"url(#coolingGradient)":i.systemMode===4?"url(#heatingGradient)":i.systemMode===1?"#42d672":"#7b7b7b"),o(),C(i.currentTemperature!==null?22:-1),o(2),g(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),o(2),C(i.systemMode===0?26:i.systemMode===3?27:i.systemMode===4?28:i.systemMode===1?29:-1))},dependencies:[J,Ee,w,Ve,He],encapsulation:2})}return e})();var Gr=(()=>{class e{service=B.required({});static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-unknown"]],inputs:{service:[1,"service"]},decls:10,vars:3,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["cx","16","cy","16","r","14","fill","none","stroke","#7f7f7f","stroke-width","1.5"],["d",`M12.2575393,17.7112593
53
+ L12.1868707,17.7112593
54
+ C11.0779698,17.7112593 10.6478221,16.9467914 11.2212184,16.0037726
55
+ L16.4805582,7.35415962
56
+ C17.67876,5.38357359 18.0624739,5.55948915 17.3376772,7.746963
57
+ L15.7252918,12.6132252
58
+ C15.3772095,13.6637556 15.9942825,14.5048291 17.0992511,14.5048291
59
+ L20.1977772,14.5048291
60
+ L20.1846183,14.5177121
61
+ L20.2552868,14.5177121
62
+ C21.3641878,14.5177121 21.7943355,15.2821799 21.2209392,16.2251988
63
+ L16.1844844,24.5082506
64
+ C14.864477,26.6791606 14.4411534,26.4839632 15.241777,24.0676402
65
+ L16.7168658,19.6157462
66
+ C17.0649481,18.5652158 16.447875,17.7241422 15.3429064,17.7241422
67
+ L12.2443804,17.7241422
68
+ L12.2575393,17.7112593 Z`,"fill","#7f7f7f"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"]],template:function(n,i){n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),I(),x(3,"svg",3),L(4,"circle",4)(5,"path",5),k()(),N(),x(6,"div",6),p(7),k(),x(8,"div",7),p(9),k()()()),n&2&&(o(2),y("aria-label",i.service().humanType),o(5),v(i.service().customName||i.service().serviceName),o(2),v(i.service().humanType))},encapsulation:2})}return e})();function em(e,r){e&1&&(x(0,"div",23),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.detected")))}function tm(e,r){e&1&&(x(0,"div",24),p(1),l(2,"translate"),k()),e&2&&(o(),v(d(2,1,"accessories.control.not_detected")))}var jr=(()=>{class e{service=B.required({});get isLeaking(){return sr(this.service())}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-water-leak-detector"]],inputs:{service:[1,"service"]},decls:28,vars:7,consts:[[1,"accessory-box"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","3.5","y","1","width","25","height","30","rx","3","stroke","#7f7f7f","fill","none","stroke-width","1.2",1,"red-outline"],["transform","translate(7, 0), scale(0.35)"],["d","M23.61 24.58C23.61 28.67 20.44 31.99 16.56 31.99C12.68 31.99 9.52 28.67 9.52 24.58C9.52 20.49 12.68 17.13 16.56 10.87C20.44 17.13 23.61 20.49 23.61 24.58Z","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","1"],["transform","translate(13, 7), scale(0.35)"],["cx","16","cy","22","rx","10","ry","2","fill","#1976d2","fill-opacity","0.25","stroke","#7f7f7f","stroke-width","0.35"],["stroke-linecap","round","x1","7","y1","26","x2","25","y2","26","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","27.5","x2","25","y2","27.5","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","29","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","7","y1","26","x2","7","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","9","y1","26","x2","9","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","11","y1","26","x2","11","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","13","y1","26","x2","13","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","15","y1","26","x2","15","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","17","y1","26","x2","17","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","19","y1","26","x2","19","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","21","y1","26","x2","21","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","23","y1","26","x2","23","y2","29","stroke","#7f7f7f","stroke-width","0.5"],["stroke-linecap","round","x1","25","y1","26","x2","25","y2","29","stroke","#7f7f7f","stroke-width","0.5"],[1,"accessory-label","mt-auto"],[1,"accessory-label","red-text"],[1,"accessory-label","grey-text"]],template:function(n,i){n&1&&(x(0,"div",0)(1,"div",1)(2,"div",2),l(3,"translate"),I(),x(4,"svg",3),L(5,"rect",4),x(6,"g",5),L(7,"path",6),k(),x(8,"g",7),L(9,"path",6),k(),L(10,"ellipse",8)(11,"line",9)(12,"line",10)(13,"line",11)(14,"line",12)(15,"line",13)(16,"line",14)(17,"line",15)(18,"line",16)(19,"line",17)(20,"line",18)(21,"line",19)(22,"line",20)(23,"line",21),k()(),N(),x(24,"div",22),p(25),k(),h(26,em,3,3,"div",23)(27,tm,3,3,"div",24),k()()),n&2&&(U("accessory-on",i.isLeaking),o(2),y("aria-label",d(3,5,"accessories.core.leak_sensor")),o(23),v(i.service().customName||i.service().serviceName),o(),C(i.isLeaking?26:27))},dependencies:[w],styles:[".accessory-on svg .red-outline{stroke:#d32f2f;animation:_ngcontent-%COMP%_flash 1s infinite}@keyframes _ngcontent-%COMP%_flash{0%,to{stroke-opacity:.8}50%{stroke-opacity:.2}}"]})}return e})();function im(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.closed")," ")}function nm(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.open")," ")}function om(e,r){if(e&1&&(p(0),l(1,"translate")),e&2){let t=u();$(" ",d(1,2,"accessories.control.open")," ",t.currentPosition,"% ")}}var qr=(()=>{class e{destroyRef=D(ye);$activeModal=D(De);cdr=D(Fe);$toastr=D(Le);service;$accessories;targetPositionChanged=new ee;targetPosition;ngOnInit(){this.setupComponent(),this.subscribeToAccessoryUpdates()}dismissModal(){this.$activeModal.dismiss("Dismiss")}setupComponent(){this.loadTargetPosition(),this.createDebouncedSubscription(this.targetPositionChanged,()=>oe(this,null,function*(){let t=mt(this.service);try{yield ai(this.service,this.targetPosition.value)}catch{this.$toastr.error("Failed to set window covering position","Error"),this.targetPosition.value=t,this.cdr.markForCheck()}}))}subscribeToAccessoryUpdates(){this.$accessories&&this.$accessories.accessoryData.pipe(fe(this.destroyRef)).subscribe(()=>{this.handleAccessoryUpdate(),this.cdr.markForCheck()})}handleAccessoryUpdate(){this.targetPosition&&(this.targetPosition.value=mt(this.service))}onTargetPositionChange(){this.targetPositionChanged.next(this.targetPosition.value)}createDebouncedSubscription(t,n,i=500){t.pipe(Ge(i),fe(this.destroyRef)).subscribe(n)}applySliderGradient(t,n=".noUi-target"){requestAnimationFrame(()=>{document.querySelectorAll(n).forEach(a=>{a.style.background=t})})}loadTargetPosition(){this.targetPosition={value:mt(this.service),min:0,max:100,step:1},this.applySliderGradient("linear-gradient(to right, #242424, #ffd6aa)")}get currentPosition(){return mt(this.service)}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["ng-component"]],inputs:{service:"service",$accessories:"$accessories"},decls:34,vars:34,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title",3,"innerText"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center","px-5"],[1,"d-flex","justify-content-center","mb-0","p-0"],[1,"mb-0","mx-0","p-3","btn-read","w-100"],[1,"mt-4"],[1,"mb-1",3,"ngModelChange","min","max","step","ngModel"],[1,"d-flex","justify-content-between","align-items-center","mt-0","mb-1"],[1,"grey-text","small"],[1,"mb-1",3,"ngModelChange","min","max","step","disabled","ngModel"],[1,"modal-footer"]],template:function(n,i){n&1&&(s(0,"div",0)(1,"div",1),f(2,"h5",2),s(3,"button",3),l(4,"translate"),S("click",function(){return i.dismissModal()}),c()(),s(5,"div",4)(6,"div",5)(7,"div",6),h(8,im,2,3)(9,nm,2,3)(10,om,2,4),c()(),s(11,"h6",7),p(12),l(13,"translate"),c(),s(14,"nouislider",8),Q("ngModelChange",function(m){return Y(i.targetPosition.value,m)||(i.targetPosition.value=m),m}),S("ngModelChange",function(){return i.onTargetPositionChange()}),c(),s(15,"div",9)(16,"span",10),p(17),l(18,"translate"),c(),s(19,"span",10),p(20),l(21,"translate"),c()(),s(22,"h6",7),p(23),l(24,"translate"),c(),s(25,"nouislider",11),Q("ngModelChange",function(m){return Y(i.currentPosition,m)||(i.currentPosition=m),m}),c(),s(26,"div",9)(27,"span",10),p(28),l(29,"translate"),c(),s(30,"span",10),p(31),l(32,"translate"),c()()(),f(33,"div",12),c()),n&2&&(o(2),b("innerText",i.service.customName||i.service.serviceName||i.service.displayName),o(),y("aria-label",d(4,20,"form.button_close")),o(5),C(i.currentPosition===0?8:i.currentPosition===100?9:10),o(4),$("",d(13,22,"accessories.control.target"),": ",i.targetPosition.value,"%"),o(2),b("min",i.targetPosition.min)("max",i.targetPosition.max)("step",i.targetPosition.step),Z("ngModel",i.targetPosition.value),o(3),v(d(18,24,"accessories.control.closed")),o(3),v(d(21,26,"accessories.control.open")),o(3),$("",d(24,28,"accessories.control.current"),": ",i.currentPosition,"%"),o(2),b("min",0)("max",100)("step",1)("disabled",!0),Z("ngModel",i.currentPosition),o(3),v(d(29,30,"accessories.control.closed")),o(3),v(d(32,32,"accessories.control.open")))},dependencies:[le,ne,ae,se,w],encapsulation:2,changeDetection:0})}return e})();function rm(e,r){e&1&&(s(0,"div",2),l(1,"translate"),I(),s(2,"svg",5),f(3,"rect",6)(4,"rect",7)(5,"rect",8)(6,"rect",9)(7,"rect",10)(8,"rect",11)(9,"rect",12),c()()),e&2&&y("aria-label",d(1,1,"accessories.core.window_covering"))}function am(e,r){e&1&&(s(0,"div",2),l(1,"translate"),I(),s(2,"svg",5),f(3,"rect",13)(4,"rect",14)(5,"rect",15)(6,"rect",16)(7,"line",17)(8,"rect",18),c()()),e&2&&y("aria-label",d(1,1,"accessories.core.door"))}function sm(e,r){e&1&&(s(0,"div",2),l(1,"translate"),I(),s(2,"svg",5),f(3,"rect",6)(4,"rect",19)(5,"rect",20)(6,"rect",21)(7,"rect",22)(8,"rect",23)(9,"rect",24),c()()),e&2&&y("aria-label",d(1,1,"accessories.core.window"))}function lm(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.closed")," ")}function cm(e,r){e&1&&(p(0),l(1,"translate")),e&2&&g(" ",d(1,1,"accessories.control.open")," ")}function dm(e,r){if(e&1&&(p(0),l(1,"translate")),e&2){let t=u();$(" ",d(1,2,"accessories.control.open")," ",t.currentPosition,"% ")}}var zr=(()=>{class e{$accessories=D(ie);$modal=D(X);service=B.required({});readyForControl=B(!1,{});onClick(){this.readyForControl()&&pr(this.service())}onLongClick(){if(!this.readyForControl())return;let t=this.$modal.open(qr,{size:"md",backdrop:"static"});t.componentInstance.service=this.service(),t.componentInstance.$accessories=this.$accessories}get currentPosition(){return mt(this.service())}get deviceType(){return this.service().customType||this.service().deviceType||"WindowCovering"}get isWindowCovering(){return this.deviceType==="WindowCovering"}get isDoor(){return this.deviceType==="Door"}get isWindow(){return this.deviceType==="Window"}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-matter-window-covering"]],inputs:{service:[1,"service"],readyForControl:[1,"readyForControl"]},decls:11,vars:7,consts:[["tabindex","0",1,"accessory-box",3,"longClick","shortClick"],[1,"d-flex","flex-column","h-100"],[1,"accessory-svg"],[1,"accessory-label","mt-auto"],[1,"accessory-label","grey-text"],["width","32px","height","32px","viewBox","0 0 32 32","xmlns","http://www.w3.org/2000/svg"],["x","1","y","0.8","width","30","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","2.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1"],["x","3.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","rx","2"],["x","16.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1"],["x","17.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","rx","2"],["x","2.3","y","2.1","width","27.4","height","27.6","stroke","#808080","fill","#808080","stroke-width","0.5","stroke-opacity","0.9","fill-opacity","0.9",1,"c-blinds"],["x","2.05","y","29.9","width","27.9","height","0","stroke","#ffffff","fill","#ffffff","stroke-width","0.5","stroke-opacity","0","fill-opacity","0.5",1,"c-light"],["x","7.8","y","0.8","width","16.4","height","30.2","rx","0.5","stroke","#7f7f7f","fill","none","stroke-width","1.5"],["x","9.6","y","2.6","width","12.8","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline"],["x","11.2","y","4.2","width","9.6","height","10.8","stroke","#7f7f7f","fill-opacity","0","stroke-width","0.5","rx","0.25",1,"panel"],["x","11.2","y","16.8","width","9.6","height","10.8","stroke","#7f7f7f","fill-opacity","0","stroke-width","0.5","rx","0.25",1,"panel"],["x1","0","y1","31","x2","32","y2","31","stroke","#7f7f7f","stroke-width","1.5"],["x","19.25","y","15.87","width","1.55","height","0.05","stroke","#1976d2","fill","none","stroke-width","0.5","rx","10",1,"handle"],["x","2.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline-left"],["x","3.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","ry","2",1,"divider-left"],["x","15.16","y","13.6","width","0.1","height","4.6","stroke","#1976d2","fill","none","stroke-width","0.5","ry","2",1,"handle-left"],["x","16.8","y","2.6","width","12.4","height","26.6","stroke","#7f7f7f","fill","none","stroke-width","1",1,"outline-right"],["x","17.66","y","15.65","width","10.68","height","0.5","stroke","#7f7f7f","fill","none","stroke-width","0.5","ry","2",1,"divider-right"],["x","16.76","y","13.6","width","0.1","height","4.6","stroke","#1976d2","fill","none","stroke-width","0.5","ry","2",1,"handle-right"]],template:function(n,i){n&1&&(s(0,"div",0),S("longClick",function(){return i.onLongClick()})("shortClick",function(){return i.onClick()}),s(1,"div",1),h(2,rm,10,3,"div",2),h(3,am,9,3,"div",2),h(4,sm,10,3,"div",2),s(5,"div",3),p(6),c(),s(7,"div",4),h(8,lm,2,3)(9,cm,2,3)(10,dm,2,4),c()()()),n&2&&(U("accessory-on",i.currentPosition>0),o(2),C(i.isWindowCovering?2:-1),o(),C(i.isDoor?3:-1),o(),C(i.isWindow?4:-1),o(2),g(" ",i.service().customName||i.service().serviceName||i.service().displayName," "),o(2),C(i.currentPosition===0?8:i.currentPosition===100?9:10))},dependencies:[J,w],styles:["body.dark-mode .c-blinds{fill:#2b2b2b;stroke:#2b2b2b;stroke-opacity:.8;fill-opacity:.8} svg .c-blinds{transition:height 3s ease;height:27.6px} svg .c-light{transition:y 3s ease,height 3s ease;y:29.9px;height:0} .accessory-on svg .c-blinds{transition:height 3s ease;height:.3px} .accessory-on svg .c-light{transition:y 3s ease,height 3s ease;y:2.65px;height:27.3px} svg .outline{transition:width 3s ease;width:12.8px} svg .panel{transition:width 3s ease;width:9.6px} svg .handle{visibility:visible;opacity:1;transition:opacity 3s ease,visibility 0s linear 3s} .accessory-on svg .outline{transition:width 3s ease;width:3.8px} .accessory-on svg .panel{transition:width 3s ease;width:.6px} .accessory-on svg .handle{visibility:hidden;opacity:0;transition:opacity 3s ease,visibility 0s linear 0s} svg .outline-left{x:2.8px;width:12.4px} svg .divider-left{x:3.66px;width:10.68px} svg .handle-left{x:15.16px;width:.1px} svg .outline-right{x:16.8px;width:12.4px} svg .divider-right{x:17.66px;width:10.68px} svg .handle-right{x:16.76px;width:.1px} .accessory-on svg .outline-left{x:2.8px;width:2.4px} .accessory-on svg .divider-left{x:3.66px;width:.68px} .accessory-on svg .handle-left{x:5.16px;width:.1px} .accessory-on svg .outline-right{x:26.8px;width:2.4px} .accessory-on svg .divider-right{x:27.66px;width:.68px} .accessory-on svg .handle-right{x:26.76px;width:.1px}"]})}return e})();function pm(e,r){if(e&1){let t=j();s(0,"button",2),l(1,"translate"),S("click",function(){V(t);let i=u();return P(i.$accessories.showAccessoryInformation(i.service))}),f(2,"i",3),c()}e&2&&y("aria-label",d(1,1,"accessories.service_info"))}function mm(e,r){e&1&&f(0,"i",1)}function um(e,r){if(e&1&&(s(0,"app-on-off-light",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),o(),v(d(2,3,"accessories.core.on_off_light"))}}function fm(e,r){if(e&1&&(s(0,"app-dimmable-light",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),o(),v(d(2,3,"accessories.core.dimmable_light"))}}function vm(e,r){if(e&1&&(s(0,"app-color-temperature-light",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),o(),v(d(2,3,"accessories.core.color_temperature_light"))}}function gm(e,r){if(e&1&&(s(0,"app-extended-color-light",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),o(),v(d(2,3,"accessories.core.extended_color_light"))}}function hm(e,r){if(e&1&&(s(0,"app-on-off-plug-in-unit",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),o(),v(d(2,3,"accessories.core.on_off_plug_in_unit"))}}function Cm(e,r){if(e&1&&(s(0,"app-on-off-light-switch",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),o(),v(d(2,3,"accessories.core.on_off_light_switch"))}}function _m(e,r){if(e&1&&(s(0,"app-robotic-vacuum-cleaner",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),o(),v(d(2,3,"accessories.core.robotic_vacuum_cleaner"))}}function ym(e,r){if(e&1&&(s(0,"app-matter-contact-sensor",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.contact_sensor"))}}function xm(e,r){if(e&1&&(s(0,"app-matter-occupancy-sensor",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.occupancy_sensor"))}}function Sm(e,r){if(e&1&&(s(0,"app-matter-light-sensor",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.light_sensor"))}}function km(e,r){if(e&1&&(s(0,"app-matter-temperature-sensor",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.temperature_sensor"))}}function bm(e,r){if(e&1&&(s(0,"app-matter-humidity-sensor",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.humidity_sensor"))}}function Tm(e,r){if(e&1&&(s(0,"app-matter-smoke-co-alarm",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.smoke_co_alarm"))}}function Mm(e,r){if(e&1&&(s(0,"app-matter-water-leak-detector",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.leak_sensor"))}}function Bm(e,r){if(e&1&&(s(0,"app-matter-air-quality-sensor",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.air_quality_sensor"))}}function wm(e,r){if(e&1&&(s(0,"app-matter-door-lock",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),o(),v(d(2,3,"accessories.core.lock_mechanism"))}}function Em(e,r){if(e&1&&(s(0,"app-matter-window-covering",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),o(),v(d(2,3,"accessories.core.window_covering"))}}function Dm(e,r){if(e&1&&(s(0,"app-matter-window-covering",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),o(),v(d(2,3,"accessories.core.door"))}}function Am(e,r){if(e&1&&(s(0,"app-matter-window-covering",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),o(),v(d(2,3,"accessories.core.window"))}}function Im(e,r){if(e&1&&(s(0,"app-matter-fan",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),o(),v(d(2,3,"accessories.core.fan"))}}function Fm(e,r){if(e&1&&(s(0,"app-matter-thermostat",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.matterReadyForControl),o(),v(d(2,3,"accessories.core.thermostat"))}}function Lm(e,r){if(e&1&&(s(0,"app-matter-unknown",5),p(1),c()),e&2){let t=u(2);b("service",t.service()),o(),v(t.service().humanType)}}function Vm(e,r){if(e&1&&h(0,um,3,5,"app-on-off-light",4)(1,fm,3,5,"app-dimmable-light",4)(2,vm,3,5,"app-color-temperature-light",4)(3,gm,3,5,"app-extended-color-light",4)(4,hm,3,5,"app-on-off-plug-in-unit",4)(5,Cm,3,5,"app-on-off-light-switch",4)(6,_m,3,5,"app-robotic-vacuum-cleaner",4)(7,ym,3,4,"app-matter-contact-sensor",5)(8,xm,3,4,"app-matter-occupancy-sensor",5)(9,Sm,3,4,"app-matter-light-sensor",5)(10,km,3,4,"app-matter-temperature-sensor",5)(11,bm,3,4,"app-matter-humidity-sensor",5)(12,Tm,3,4,"app-matter-smoke-co-alarm",5)(13,Mm,3,4,"app-matter-water-leak-detector",5)(14,Bm,3,4,"app-matter-air-quality-sensor",5)(15,wm,3,5,"app-matter-door-lock",4)(16,Em,3,5,"app-matter-window-covering",4)(17,Dm,3,5,"app-matter-window-covering",4)(18,Am,3,5,"app-matter-window-covering",4)(19,Im,3,5,"app-matter-fan",4)(20,Fm,3,5,"app-matter-thermostat",4)(21,Lm,2,2,"app-matter-unknown",5),e&2){let t,n=u();C((t=n.service().customType||n.service().deviceType)==="OnOffLight"?0:t==="DimmableLight"?1:t==="ColorTemperatureLight"?2:t==="ExtendedColorLight"?3:t==="OnOffPlugInUnit"?4:t==="OnOffLightSwitch"?5:t==="RoboticVacuumCleaner"?6:t==="ContactSensor"?7:t==="OccupancySensor"?8:t==="LightSensor"?9:t==="TemperatureSensor"?10:t==="HumiditySensor"?11:t==="SmokeCoAlarm"?12:t==="WaterLeakDetector"?13:t==="AirQualitySensor"?14:t==="DoorLock"?15:t==="WindowCovering"?16:t==="Door"?17:t==="Window"?18:t==="Fan"?19:t==="Thermostat"?20:21)}}function Pm(e,r){if(e&1&&(s(0,"app-switch",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.switch"))}}function Om(e,r){if(e&1&&(s(0,"app-thermostat",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.thermostat"))}}function Nm(e,r){if(e&1&&(s(0,"app-outlet",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.outlet"))}}function Hm(e,r){if(e&1&&(s(0,"app-fan",6),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.fan"))}}function Rm(e,r){if(e&1&&(s(0,"app-fan",6),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.fan"))}}function $m(e,r){if(e&1&&(s(0,"app-air-purifier",6),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.air_purifier"))}}function Um(e,r){if(e&1&&(s(0,"app-lightbulb",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.lightbulb"))}}function Wm(e,r){if(e&1&&(s(0,"app-light-sensor",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.light_sensor"))}}function Gm(e,r){if(e&1&&(s(0,"app-lock-mechanism",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.lock_mechanism"))}}function jm(e,r){if(e&1&&(s(0,"app-temperature-sensor",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.temperature_sensor"))}}function qm(e,r){if(e&1&&(s(0,"app-garage-door-opener",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.garage_door_opener"))}}function zm(e,r){if(e&1&&(s(0,"app-motion-sensor",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.motion_sensor"))}}function Km(e,r){if(e&1&&(s(0,"app-occupancy-sensor",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.occupancy_sensor"))}}function Zm(e,r){if(e&1&&(s(0,"app-contact-sensor",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.contact_sensor"))}}function Ym(e,r){if(e&1&&(s(0,"app-humidity-sensor",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.humidity_sensor"))}}function Qm(e,r){if(e&1&&(s(0,"app-air-quality-sensor",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.air_quality_sensor"))}}function Jm(e,r){if(e&1&&(s(0,"app-window-covering",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.window_covering"))}}function Xm(e,r){if(e&1&&(s(0,"app-window",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.window"))}}function eu(e,r){if(e&1&&(s(0,"app-door",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.door"))}}function tu(e,r){if(e&1&&(s(0,"app-television",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.television"))}}function iu(e,r){if(e&1&&(s(0,"app-battery",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.battery"))}}function nu(e,r){if(e&1&&(s(0,"app-battery",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.battery"))}}function ou(e,r){if(e&1&&(s(0,"app-speaker",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.speaker"))}}function ru(e,r){if(e&1&&(s(0,"app-speaker",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.speaker"))}}function au(e,r){if(e&1&&(s(0,"app-doorbell",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.doorbell"))}}function su(e,r){if(e&1&&(s(0,"app-microphone",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.microphone"))}}function lu(e,r){if(e&1&&(s(0,"app-security-system",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.security_system"))}}function cu(e,r){if(e&1&&(s(0,"app-leak-sensor",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.leak_sensor"))}}function du(e,r){if(e&1&&(s(0,"app-smoke-sensor",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.smoke_sensor"))}}function pu(e,r){if(e&1&&(s(0,"app-carbon-monoxide-sensor",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.carbon_monoxide_sensor"))}}function mu(e,r){if(e&1&&(s(0,"app-carbon-dioxide-sensor",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.carbon_dioxide_sensor"))}}function uu(e,r){if(e&1&&(s(0,"app-valve",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.valve"))}}function fu(e,r){if(e&1&&(s(0,"app-irrigation-system",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.irrigation_system"))}}function vu(e,r){if(e&1&&(s(0,"app-heater-cooler",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.heater_cooler"))}}function gu(e,r){if(e&1&&(s(0,"app-heater-cooler",7),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("type","heater")("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,4,"accessories.core.heater"))}}function hu(e,r){if(e&1&&(s(0,"app-heater-cooler",7),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("type","cooler")("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,4,"accessories.core.cooler"))}}function Cu(e,r){if(e&1&&(s(0,"app-humidifier-dehumidifier",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.humidifier_dehumidifier"))}}function _u(e,r){if(e&1&&(s(0,"app-humidifier-dehumidifier",7),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("type","humidifier")("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,4,"accessories.core.humidifier"))}}function yu(e,r){if(e&1&&(s(0,"app-humidifier-dehumidifier",7),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("type","dehumidifier")("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,4,"accessories.core.dehumidifier"))}}function xu(e,r){if(e&1&&(s(0,"app-stateless-programmable-switch",5),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service()),o(),v(d(2,2,"accessories.core.stateless_programmable_switch"))}}function Su(e,r){if(e&1&&(s(0,"app-filter-maintenance",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.filter_maintenance"))}}function ku(e,r){if(e&1&&(s(0,"app-robot-vacuum",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.robot_vacuum"))}}function bu(e,r){if(e&1&&(s(0,"app-washing-machine",4),p(1),l(2,"translate"),c()),e&2){let t=u(2);b("service",t.service())("readyForControl",t.$accessories.hapReadyForControl),o(),v(d(2,3,"accessories.core.washing_machine"))}}function Tu(e,r){if(e&1&&(s(0,"app-unknown",5),p(1),c()),e&2){let t=u(2);b("service",t.service()),o(),v(t.service().humanType)}}function Mu(e,r){if(e&1&&h(0,Pm,3,5,"app-switch",4)(1,Om,3,5,"app-thermostat",4)(2,Nm,3,5,"app-outlet",4)(3,Hm,3,5,"app-fan",6)(4,Rm,3,5,"app-fan",6)(5,$m,3,5,"app-air-purifier",6)(6,Um,3,5,"app-lightbulb",4)(7,Wm,3,4,"app-light-sensor",5)(8,Gm,3,5,"app-lock-mechanism",4)(9,jm,3,4,"app-temperature-sensor",5)(10,qm,3,5,"app-garage-door-opener",4)(11,zm,3,4,"app-motion-sensor",5)(12,Km,3,4,"app-occupancy-sensor",5)(13,Zm,3,4,"app-contact-sensor",5)(14,Ym,3,4,"app-humidity-sensor",5)(15,Qm,3,4,"app-air-quality-sensor",5)(16,Jm,3,5,"app-window-covering",4)(17,Xm,3,5,"app-window",4)(18,eu,3,5,"app-door",4)(19,tu,3,5,"app-television",4)(20,iu,3,4,"app-battery",5)(21,nu,3,4,"app-battery",5)(22,ou,3,5,"app-speaker",4)(23,ru,3,5,"app-speaker",4)(24,au,3,5,"app-doorbell",4)(25,su,3,5,"app-microphone",4)(26,lu,3,5,"app-security-system",4)(27,cu,3,4,"app-leak-sensor",5)(28,du,3,4,"app-smoke-sensor",5)(29,pu,3,4,"app-carbon-monoxide-sensor",5)(30,mu,3,4,"app-carbon-dioxide-sensor",5)(31,uu,3,5,"app-valve",4)(32,fu,3,4,"app-irrigation-system",5)(33,vu,3,5,"app-heater-cooler",4)(34,gu,3,6,"app-heater-cooler",7)(35,hu,3,6,"app-heater-cooler",7)(36,Cu,3,5,"app-humidifier-dehumidifier",4)(37,_u,3,6,"app-humidifier-dehumidifier",7)(38,yu,3,6,"app-humidifier-dehumidifier",7)(39,xu,3,4,"app-stateless-programmable-switch",5)(40,Su,3,5,"app-filter-maintenance",4)(41,ku,3,5,"app-robot-vacuum",4)(42,bu,3,5,"app-washing-machine",4)(43,Tu,2,2,"app-unknown",5),e&2){let t,n=u();C((t=n.service().customType||n.service().type||n.service().deviceType)==="Switch"?0:t==="Thermostat"?1:t==="Outlet"?2:t==="Fan"?3:t==="Fanv2"?4:t==="AirPurifier"?5:t==="Lightbulb"?6:t==="LightSensor"?7:t==="LockMechanism"?8:t==="TemperatureSensor"?9:t==="GarageDoorOpener"?10:t==="MotionSensor"?11:t==="OccupancySensor"?12:t==="ContactSensor"?13:t==="HumiditySensor"?14:t==="AirQualitySensor"?15:t==="WindowCovering"?16:t==="Window"?17:t==="Door"?18:t==="Television"?19:t==="Battery"?20:t==="BatteryService"?21:t==="Speaker"?22:t==="SmartSpeaker"?23:t==="Doorbell"?24:t==="Microphone"?25:t==="SecuritySystem"?26:t==="LeakSensor"?27:t==="SmokeSensor"?28:t==="CarbonMonoxideSensor"?29:t==="CarbonDioxideSensor"?30:t==="Valve"?31:t==="IrrigationSystem"?32:t==="HeaterCooler"?33:t==="Heater"?34:t==="Cooler"?35:t==="HumidifierDehumidifier"?36:t==="Humidifier"?37:t==="Dehumidifier"?38:t==="StatelessProgrammableSwitch"?39:t==="FilterMaintenance"?40:t==="RobotVacuum"?41:t==="WashingMachine"?42:43)}}var fS=(()=>{class e{$accessories=D(ie);service=B.required({});static \u0275fac=function(n){return new(n||e)};static \u0275cmp=M({type:e,selectors:[["app-accessory-tile"]],inputs:{service:[1,"service"]},decls:5,vars:2,consts:[["type","button",1,"manage-accessory-button"],[1,"fas","fa-spin","fa-sync-alt","refreshing-accessory-status-icon","grey-text"],["type","button",1,"manage-accessory-button",3,"click"],["aria-hidden","true",1,"fas","fa-bars","grey-text"],[3,"service","readyForControl"],[3,"service"],[1,"w-100",3,"service","readyForControl"],[3,"service","type","readyForControl"]],template:function(n,i){n&1&&(un(0),h(1,pm,3,3,"button",0)(2,mm,1,0,"i",1),h(3,Vm,22,1)(4,Mu,44,1),fn()),n&2&&(o(),C(i.service().protocol==="matter"&&i.$accessories.matterReadyForControl||i.service().protocol!=="matter"&&i.$accessories.hapReadyForControl?1:2),o(2),C(i.service().protocol==="matter"?3:4))},dependencies:[Oo,Uo,wo,oo,zn,_o,go,So,Ro,so,To,Mo,Jn,uo,Kn,Zo,Qo,eo,Ho,Zn,Lo,Ao,vo,Io,Qn,Yn,qo,fo,co,mo,Vo,ao,io,Wo,bo,Eo,zo,Pr,Or,Vr,Sr,Cr,wr,Hr,_r,Lr,Fr,$r,Ir,Rr,jr,vr,Tr,zr,Ar,Wr,Gr,w],encapsulation:2})}return e})();export{Ve as a,ie as b,fS as c};