homebridge-config-ui-x 5.4.2-beta.2 → 5.4.2-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/CHANGELOG.md +25 -5
  2. package/dist/core/auth/auth.controller.d.ts +1 -0
  3. package/dist/core/config/config.service.d.ts +3 -1
  4. package/dist/core/config/config.service.js +3 -2
  5. package/dist/core/config/config.service.js.map +1 -1
  6. package/dist/core/config/config.startup.d.ts +1 -0
  7. package/dist/core/config/config.startup.js +13 -3
  8. package/dist/core/config/config.startup.js.map +1 -1
  9. package/dist/core/spa/spa-html.service.d.ts +5 -0
  10. package/dist/core/spa/spa-html.service.js +39 -0
  11. package/dist/core/spa/spa-html.service.js.map +1 -0
  12. package/dist/core/spa/spa.filter.d.ts +2 -0
  13. package/dist/core/spa/spa.filter.js +17 -2
  14. package/dist/core/spa/spa.filter.js.map +1 -1
  15. package/dist/main.js +8 -3
  16. package/dist/main.js.map +1 -1
  17. package/dist/modules/accessories/accessories.service.js +5 -1
  18. package/dist/modules/accessories/accessories.service.js.map +1 -1
  19. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js +1 -1
  20. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js.map +1 -1
  21. package/dist/modules/plugins/plugins.service.d.ts +1 -0
  22. package/dist/modules/plugins/plugins.service.js +27 -15
  23. package/dist/modules/plugins/plugins.service.js.map +1 -1
  24. package/package.json +18 -13
  25. package/public/3rdpartylicenses.txt +91 -91
  26. package/public/assets/monaco/ThirdPartyNotices.txt +448 -0
  27. package/public/assets/monaco/min/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  28. package/public/assets/monaco/min/vs/base/worker/workerMain.js +31 -0
  29. package/public/assets/monaco/min/vs/basic-languages/shell/shell.js +10 -0
  30. package/public/assets/monaco/min/vs/editor/editor.main.css +8 -0
  31. package/public/assets/monaco/min/vs/editor/editor.main.js +798 -0
  32. package/public/assets/monaco/min/vs/language/json/jsonMode.js +19 -0
  33. package/public/assets/monaco/min/vs/language/json/jsonWorker.js +42 -0
  34. package/public/assets/monaco/min/vs/loader.js +11 -0
  35. package/public/chunk-24MFIAJC.js +1 -0
  36. package/public/chunk-2GPXWXUT.js +1 -0
  37. package/public/chunk-3LEW5FOJ.js +5 -0
  38. package/public/chunk-5RI5TLFW.js +1 -0
  39. package/public/{chunk-QX6BFGHZ.js → chunk-5WYRGCHF.js} +1 -1
  40. package/public/chunk-5YEBXXYW.js +1 -0
  41. package/public/{chunk-ZUTM7S4U.js → chunk-7FVJXUCR.js} +1 -1
  42. package/public/chunk-AEEAPTXE.js +1 -0
  43. package/public/chunk-AM53KSWA.js +1 -0
  44. package/public/chunk-ANRLCCQG.js +1 -0
  45. package/public/chunk-BH4JDZF4.js +1 -0
  46. package/public/chunk-BHMKIJVI.js +1 -0
  47. package/public/{chunk-IWFKJHPR.js → chunk-BQMDK4YS.js} +2 -2
  48. package/public/{chunk-3POLSI6J.js → chunk-C64P3A75.js} +1 -1
  49. package/public/{chunk-WCOLHYTR.js → chunk-CCHRGHTT.js} +1 -1
  50. package/public/chunk-CDS2MSIW.js +1 -0
  51. package/public/{chunk-J6CJ26QN.js → chunk-CIVLN3HQ.js} +1 -1
  52. package/public/{chunk-CMOVUX6R.js → chunk-CTYK4ZDT.js} +1 -1
  53. package/public/chunk-DOOSRLOB.js +1 -0
  54. package/public/{chunk-OYULLXTP.js → chunk-E6AE64XW.js} +1 -1
  55. package/public/chunk-EKP4IO3L.js +4 -0
  56. package/public/{chunk-H45DK7IX.js → chunk-EWO5Q2EI.js} +2 -2
  57. package/public/{chunk-FXJWZ2UF.js → chunk-F3ULAZ4E.js} +1 -1
  58. package/public/chunk-F6VJ3EFY.js +1 -0
  59. package/public/chunk-FB6OF4XR.js +1 -0
  60. package/public/chunk-G5PK6IZW.js +2 -0
  61. package/public/chunk-GFPRNM6N.js +1 -0
  62. package/public/chunk-GTGO4A2X.js +1 -0
  63. package/public/chunk-IJXZNORX.js +1 -0
  64. package/public/chunk-KCX2WQ7I.js +20 -0
  65. package/public/{chunk-D7VCPH6W.js → chunk-KNZTEJFP.js} +1 -1
  66. package/public/{chunk-H5WTK5UT.js → chunk-KXMDG63G.js} +1 -1
  67. package/public/chunk-L432DR6J.js +1 -0
  68. package/public/chunk-LNGNBQBM.js +1 -0
  69. package/public/{chunk-2C3X2ESN.js → chunk-M7Q6VBJE.js} +1 -1
  70. package/public/chunk-MCMJ5GFL.js +1 -0
  71. package/public/chunk-MDV2S56W.js +1 -0
  72. package/public/chunk-MIOXSBCB.js +1 -0
  73. package/public/{chunk-TWIBESLE.js → chunk-MKVX26LQ.js} +1 -1
  74. package/public/chunk-MODJOHCZ.js +1 -0
  75. package/public/chunk-MVMZJM7B.js +9 -0
  76. package/public/chunk-NMHMMKMV.js +1 -0
  77. package/public/chunk-NVX4KPO6.js +1 -0
  78. package/public/chunk-OLGI5A27.js +1 -0
  79. package/public/chunk-P6VGWWMV.js +1 -0
  80. package/public/chunk-PCCN3UQI.js +49 -0
  81. package/public/chunk-POHAQOWN.js +1 -0
  82. package/public/chunk-PVFUJ4PR.js +4 -0
  83. package/public/chunk-QZJJX4BS.js +1 -0
  84. package/public/{chunk-WTDK2HE6.js → chunk-RH474C2P.js} +1 -1
  85. package/public/chunk-RN2CW4V7.js +4 -0
  86. package/public/chunk-SEYIRMYP.js +40 -0
  87. package/public/{chunk-6E4QOLAB.js → chunk-SJP6OUG5.js} +1 -1
  88. package/public/chunk-TXNEVPOK.js +14 -0
  89. package/public/chunk-UFFCOH7L.js +1 -0
  90. package/public/chunk-UO7UMJN3.js +1 -0
  91. package/public/{chunk-5E4D6S2D.js → chunk-UUM2722D.js} +1 -1
  92. package/public/chunk-VNH6VAIL.js +1 -0
  93. package/public/chunk-VSICB3TW.js +1 -0
  94. package/public/chunk-W5UULTHE.js +1 -0
  95. package/public/chunk-XBQ6GTWH.js +3 -0
  96. package/public/chunk-XHOBTVZN.js +1 -0
  97. package/public/chunk-XSTH4HOH.js +1 -0
  98. package/public/chunk-YBETHBKT.js +1 -0
  99. package/public/chunk-YGABEALD.js +1 -0
  100. package/public/chunk-YWY6NRRB.js +1 -0
  101. package/public/chunk-ZUW7E67I.js +1 -0
  102. package/public/index.html +2 -2
  103. package/public/main-CVBTY5OH.js +1 -0
  104. package/public/polyfills-5KWHJ7II.js +2 -0
  105. package/public/{styles-LKRXKJ7O.css → styles-AUT3PDLG.css} +1 -1
  106. package/public/assets/hap-icons/light-bulb.svg +0 -25
  107. package/public/assets/hap-icons/outlet.svg +0 -25
  108. package/public/assets/hap-icons/switch.svg +0 -25
  109. package/public/assets/hap-icons/unknown.svg +0 -25
  110. package/public/assets/monaco-0.21.3/README.md +0 -96
  111. package/public/assets/monaco-0.21.3/ThirdPartyNotices.txt +0 -283
  112. package/public/assets/monaco-0.21.3/min/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  113. package/public/assets/monaco-0.21.3/min/vs/base/worker/workerMain.js +0 -160
  114. package/public/assets/monaco-0.21.3/min/vs/basic-languages/shell/shell.js +0 -7
  115. package/public/assets/monaco-0.21.3/min/vs/editor/editor.main.css +0 -6
  116. package/public/assets/monaco-0.21.3/min/vs/editor/editor.main.js +0 -2368
  117. package/public/assets/monaco-0.21.3/min/vs/editor/editor.main.nls.js +0 -39
  118. package/public/assets/monaco-0.21.3/min/vs/language/json/jsonMode.js +0 -7
  119. package/public/assets/monaco-0.21.3/min/vs/language/json/jsonWorker.js +0 -7
  120. package/public/assets/monaco-0.21.3/min/vs/loader.js +0 -38
  121. package/public/assets/monaco-0.21.3/package.json +0 -38
  122. package/public/assets/service-icons/air-purifier.svg +0 -50
  123. package/public/assets/service-icons/air-quality-sensor.svg +0 -30
  124. package/public/assets/service-icons/carbon-dioxide-sensor.svg +0 -53
  125. package/public/assets/service-icons/carbon-monoxide-sensor.svg +0 -53
  126. package/public/assets/service-icons/contact-sensor.svg +0 -45
  127. package/public/assets/service-icons/door.svg +0 -49
  128. package/public/assets/service-icons/doorbell.svg +0 -7
  129. package/public/assets/service-icons/fan.svg +0 -15
  130. package/public/assets/service-icons/filter-maintenance.svg +0 -54
  131. package/public/assets/service-icons/garage-door.svg +0 -120
  132. package/public/assets/service-icons/irrigation-system.svg +0 -34
  133. package/public/assets/service-icons/leak-sensor.svg +0 -42
  134. package/public/assets/service-icons/light-sensor.svg +0 -34
  135. package/public/assets/service-icons/lock-mechanism.svg +0 -39
  136. package/public/assets/service-icons/microphone.svg +0 -12
  137. package/public/assets/service-icons/motion-sensor.svg +0 -84
  138. package/public/assets/service-icons/occupancy-sensor.svg +0 -49
  139. package/public/assets/service-icons/robot-vacuum.svg +0 -76
  140. package/public/assets/service-icons/security-system.svg +0 -19
  141. package/public/assets/service-icons/smoke-sensor.svg +0 -38
  142. package/public/assets/service-icons/speaker.svg +0 -28
  143. package/public/assets/service-icons/stateless-programmable-switch.svg +0 -18
  144. package/public/assets/service-icons/television.svg +0 -17
  145. package/public/assets/service-icons/valve-faucet.svg +0 -22
  146. package/public/assets/service-icons/valve-generic.svg +0 -25
  147. package/public/assets/service-icons/valve-irrigation.svg +0 -34
  148. package/public/assets/service-icons/valve-shower-head.svg +0 -32
  149. package/public/assets/service-icons/washing-machine.svg +0 -34
  150. package/public/assets/service-icons/window-covering.svg +0 -44
  151. package/public/assets/service-icons/window.svg +0 -71
  152. package/public/chunk-2H6KO42L.js +0 -1
  153. package/public/chunk-3M6IUC74.js +0 -1
  154. package/public/chunk-5PN3M3TS.js +0 -1
  155. package/public/chunk-5VJLO72Y.js +0 -1
  156. package/public/chunk-6CQ7JJUY.js +0 -1
  157. package/public/chunk-7EQFLCW4.js +0 -1
  158. package/public/chunk-7ZUAPFH6.js +0 -1
  159. package/public/chunk-A5YMO7NI.js +0 -1
  160. package/public/chunk-BEPC7IPQ.js +0 -23
  161. package/public/chunk-BG7RRQGG.js +0 -1
  162. package/public/chunk-BO3HTTPA.js +0 -1
  163. package/public/chunk-CN4SGKOR.js +0 -1
  164. package/public/chunk-DFFTJVRY.js +0 -1
  165. package/public/chunk-FCJZJIQL.js +0 -1
  166. package/public/chunk-FG5GS755.js +0 -1
  167. package/public/chunk-FMHXNJHJ.js +0 -1
  168. package/public/chunk-FSWVJTPN.js +0 -1
  169. package/public/chunk-FUTRU3DJ.js +0 -4
  170. package/public/chunk-FVKMBZOU.js +0 -9
  171. package/public/chunk-G3JSRG2Q.js +0 -2
  172. package/public/chunk-GHMFFLJG.js +0 -1
  173. package/public/chunk-HT7KLIKB.js +0 -1
  174. package/public/chunk-HWAWBYVQ.js +0 -1
  175. package/public/chunk-IOKYXV5M.js +0 -4
  176. package/public/chunk-JFPT3QXX.js +0 -30
  177. package/public/chunk-JL4UQXPL.js +0 -1
  178. package/public/chunk-KZKL7DGI.js +0 -1
  179. package/public/chunk-LDCR6K2U.js +0 -12
  180. package/public/chunk-LXAXEGMX.js +0 -1
  181. package/public/chunk-MHTCWHP3.js +0 -1
  182. package/public/chunk-NDBMU5RD.js +0 -14
  183. package/public/chunk-NHNGZ4PI.js +0 -1
  184. package/public/chunk-NORBG6QU.js +0 -1
  185. package/public/chunk-OA7Y3E5A.js +0 -2
  186. package/public/chunk-PA5E2G2J.js +0 -4
  187. package/public/chunk-Q3EG5UQP.js +0 -1
  188. package/public/chunk-QE27FJRU.js +0 -1
  189. package/public/chunk-QVCO7S7N.js +0 -20
  190. package/public/chunk-R3KUMAWN.js +0 -1
  191. package/public/chunk-RHZTPEXE.js +0 -1
  192. package/public/chunk-RZXCKXEZ.js +0 -1
  193. package/public/chunk-SL5FI37R.js +0 -1
  194. package/public/chunk-SULJOYSB.js +0 -3
  195. package/public/chunk-TR3AIWBS.js +0 -1
  196. package/public/chunk-V6JVOQNN.js +0 -1
  197. package/public/chunk-WX32WZFA.js +0 -1
  198. package/public/chunk-WYMH5QZG.js +0 -1
  199. package/public/chunk-X5YIKTO6.js +0 -1
  200. package/public/chunk-Z2T4OZ7I.js +0 -1
  201. package/public/chunk-ZAIVLZNZ.js +0 -1
  202. package/public/chunk-ZKQAULZM.js +0 -1
  203. package/public/chunk-ZLYGOSRJ.js +0 -1
  204. package/public/main-ILQAVUPM.js +0 -1
  205. package/public/polyfills-WE4HA5DL.js +0 -2
  206. /package/public/assets/{monaco-0.21.3 → monaco}/LICENSE +0 -0
@@ -1 +1 @@
1
- import{ga as e,n as r}from"./chunk-IOKYXV5M.js";var i=(()=>{class t{raspberryPiThrottled=new r;formAuthEnabled=new r;static \u0275fac=function(o){return new(o||t)};static \u0275prov=e({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{i as a};
1
+ import{ea as e,n as r}from"./chunk-3LEW5FOJ.js";var i=(()=>{class t{raspberryPiThrottled=new r;formAuthEnabled=new r;static \u0275fac=function(o){return new(o||t)};static \u0275prov=e({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{i as a};
@@ -0,0 +1 @@
1
+ import{b as s,d as n}from"./chunk-MDV2S56W.js";import{b as a}from"./chunk-5RI5TLFW.js";import{ea as o,h as r,ja as e,w as i}from"./chunk-3LEW5FOJ.js";var v=(()=>{class t{$route=e(s);$router=e(n);$settings=e(a);canActivate(){return r(this,null,function*(){return this.$settings.settingsLoaded||(yield i(this.$settings.onSettingsLoaded)),this.$settings.env.setupWizardComplete===!1||this.$router.navigate(["/"],{relativeTo:this.$route}),!0})}static \u0275fac=function(c){return new(c||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{v as a};
@@ -0,0 +1 @@
1
+ import{B as at,C as lt,D as Pt,Db as Tt,Fa as Ht,Fb as $t,Ga as gt,Gb as V,Ib as f,L as Mt,La as a,Lc as Ct,Na as Bt,O as P,Qa as L,Sb as $,Ub as v,Vb as b,Wa as mt,X as ut,Xa as vt,Xb as x,Za as Vt,_ as ct,_c as zt,a as c,ab as N,b as F,cb as bt,e as ne,ea as d,fa as ht,ha as Y,hd as qt,ia as S,ja as u,jb as W,ka as Nt,kb as H,n as p,oa as dt,pa as ft,r as k,rb as h,sa as J,sb as g,t as D,ta as pt,tb as m,ub as B,wa as M,x as ot,yb as _t,za as Q,zb as yt,zc as Kt}from"./chunk-3LEW5FOJ.js";var Xt=ne((Li,Ne)=>{Ne.exports={name:"homebridge-config-ui-x",displayName:"Homebridge UI",version:"5.4.2-beta.21",description:"A web based management, configuration and control platform for Homebridge.",author:"oznu <dev@oz.nu>",license:"MIT",funding:[{type:"github",url:"https://github.com/sponsors/oznu"},{type:"paypal",url:"https://paypal.me/oznu"}],repository:{type:"git",url:"git+https://github.com/homebridge/homebridge-config-ui-x.git"},bugs:{url:"https://github.com/homebridge/homebridge-config-ui-x/issues"},keywords:["homebridge-plugin","ui","gui","web","homebridge","homebridge-config-ui-x","ui-x","config-ui-x","homebridge-x","homebridge server","homebridge ui","homebridge-ui","homebridge gui","homebridge-gui","web interface","config ui","management","config editor","linux","macOS","osx","windows","raspberry pi","accessory control","smart home","hb-service"],main:"./dist/index.js",bin:{"hb-service":"dist/bin/hb-service.js"},engines:{node:"^20.19.0 || ^22.12.0 || ^24.0.0",homebridge:"^1.8.0 || ^2.0.0-beta.0"},scripts:{build:"npm run build:server && npm run build:ui","build:server":"rimraf dist && tsc -p tsconfig.build.json","build:ui":"npm run build --prefix ui",check:"npm run check:server && npm run check:ui","check:server":"npm install && npm outdated","check:ui":"npm install --prefix ui && npm outdated --prefix ui","lang-sync":"ts-node scripts/lang-sync.ts",lint:"eslint . --max-warnings=0","lint:fix":"npm run lint -- --fix",prepublishOnly:"npm i --package-lock-only && npm run lint && npm run build",start:"ts-node -r tsconfig-paths/register src/main.ts",test:"vitest run","test-coverage":"npm run test -- --coverage","upgrade-install":"./scripts/upgrade-install.sh",watch:'concurrently "npm run watch:ui" "npm run watch:server"',"watch:server":"nodemon","watch:ui":"npm run start --prefix ui"},dependencies:{"@fastify/helmet":"13.0.1","@fastify/multipart":"9.0.3","@fastify/static":"8.2.0","@homebridge/hap-client":"3.1.1","@homebridge/node-pty-prebuilt-multiarch":"0.13.1","@nestjs/axios":"4.0.1","@nestjs/common":"11.1.6","@nestjs/core":"11.1.6","@nestjs/jwt":"11.0.0","@nestjs/passport":"11.0.5","@nestjs/platform-fastify":"11.1.6","@nestjs/platform-socket.io":"11.1.6","@nestjs/swagger":"11.2.0","@nestjs/websockets":"11.1.6",axios:"1.11.0","bash-color":"0.0.4","class-transformer":"0.5.1","class-validator":"0.14.2",commander:"14.0.0",dayjs:"1.11.13",fastify:"5.5.0","fs-extra":"11.3.1",jsonwebtoken:"9.0.2",lodash:"4.17.21","node-cache":"5.1.2","node-schedule":"2.1.1",ora:"8.2.0",otplib:"12.0.1","p-limit":"7.1.0",passport:"0.7.0","passport-jwt":"4.0.1","reflect-metadata":"0.2.2",rxjs:"7.8.2",semver:"7.7.2",systeminformation:"5.27.7",tail:"2.2.6",tar:"7.4.3","tcp-port-used":"1.0.2",unzipper:"0.12.3"},devDependencies:{"@antfu/eslint-config":"^5.2.1","@nestjs/testing":"^11.1.6","@prettier/plugin-xml":"^3.4.2","@types/fs-extra":"^11.0.4","@types/lodash":"^4.17.20","@types/node":"^24.3.0","@types/node-schedule":"^2.1.8","@types/passport-jwt":"^4.0.1","@types/semver":"^7.7.0","@types/tail":"^2.2.3","@types/tcp-port-used":"^1.0.4","@types/unzipper":"^0.10.11","@vitest/coverage-v8":"^3.2.4",concurrently:"^9.2.0","eslint-plugin-format":"^1.0.1","form-data":"^4.0.4",nodemon:"^3.1.10",rimraf:"^6.0.1","ts-loader":"^9.5.2","ts-node":"^10.9.2","tsconfig-paths":"^4.2.0",typescript:"^5.9.2","unplugin-swc":"^1.5.7",vitest:"^3.2.4"},overrides:{"@nestjs/platform-fastify":{fastify:"^5.5.0"}},maintainers:[{email:"bwp91@icloud.com",name:"bwp91"},{email:"dev@oz.nu",name:"oznu"},{email:"northern.man1@gmail.com",name:"northernman"},{email:"mail@anderl-bauer.de",name:"supereg"},{email:"khaos.tian@gmail.com",name:"khaost"},{email:"erik.baauw@xs4all.nl",name:"ebaauw"},{email:"donavan.becker@icloud.com",name:"donavanbecker"},{email:"dustin.greif@gmail.com",name:"dustin.greif"},{email:"nfarina@gmail.com",name:"nfarina"}],scarfSettings:{enabled:!1}}});var y=(function(e){return e[e.State=0]="State",e[e.Transition=1]="Transition",e[e.Sequence=2]="Sequence",e[e.Group=3]="Group",e[e.Animate=4]="Animate",e[e.Keyframes=5]="Keyframes",e[e.Style=6]="Style",e[e.Trigger=7]="Trigger",e[e.Reference=8]="Reference",e[e.AnimateChild=9]="AnimateChild",e[e.AnimateRef=10]="AnimateRef",e[e.Query=11]="Query",e[e.Stagger=12]="Stagger",e})(y||{}),se="*";function Lt(e,n){return{type:y.Trigger,name:e,definitions:n,options:{}}}function X(e,n=null){return{type:y.Animate,styles:n,timings:e}}function He(e,n=null){return{type:y.Sequence,steps:e,options:n}}function K(e){return{type:y.Style,styles:e,offset:null}}function z(e,n,t){return{type:y.State,name:e,styles:n,options:t}}function tt(e,n,t=null){return{type:y.Transition,expr:e,animation:n,options:t}}var wt=class{_onDoneFns=[];_onStartFns=[];_onDestroyFns=[];_originalOnDoneFns=[];_originalOnStartFns=[];_started=!1;_destroyed=!1;_finished=!1;_position=0;parentPlayer=null;totalTime;constructor(n=0,t=0){this.totalTime=n+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}onStart(n){this._originalOnStartFns.push(n),this._onStartFns.push(n)}onDone(n){this._originalOnDoneFns.push(n),this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(n=>n()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(n){this._position=this.totalTime?n*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(n){let t=n=="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},Dt=class{_onDoneFns=[];_onStartFns=[];_finished=!1;_started=!1;_destroyed=!1;_onDestroyFns=[];parentPlayer=null;totalTime=0;players;constructor(n){this.players=n;let t=0,i=0,s=0,r=this.players.length;r==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(o=>{o.onDone(()=>{++t==r&&this._onFinish()}),o.onDestroy(()=>{++i==r&&this._onDestroy()}),o.onStart(()=>{++s==r&&this._onStart()})}),this.totalTime=this.players.reduce((o,l)=>Math.max(o,l.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(n=>n()),this._onDoneFns=[])}init(){this.players.forEach(n=>n.init())}onStart(n){this._onStartFns.push(n)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(n=>n()),this._onStartFns=[])}onDone(n){this._onDoneFns.push(n)}onDestroy(n){this._onDestroyFns.push(n)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(n=>n.play())}pause(){this.players.forEach(n=>n.pause())}restart(){this.players.forEach(n=>n.restart())}finish(){this._onFinish(),this.players.forEach(n=>n.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(n=>n.destroy()),this._onDestroyFns.forEach(n=>n()),this._onDestroyFns=[])}reset(){this.players.forEach(n=>n.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(n){let t=n*this.totalTime;this.players.forEach(i=>{let s=i.totalTime?Math.min(1,t/i.totalTime):1;i.setPosition(s)})}getPosition(){let n=this.players.reduce((t,i)=>t===null||i.totalTime>t.totalTime?i:t,null);return n!=null?n.getPosition():0}beforeDestroy(){this.players.forEach(n=>{n.beforeDestroy&&n.beforeDestroy()})}triggerCallback(n){let t=n=="start"?this._onStartFns:this._onDoneFns;t.forEach(i=>i()),t.length=0}},re="!";var G=class{},le=(()=>{class e{handle(t){return t.key}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),O=class{},ue=(()=>{class e extends O{compile(t,i){return t}compileTranslations(t,i){return t}static \u0275fac=(()=>{let t;return function(s){return(t||(t=Q(e)))(s||e)}})();static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),E=class{},ce=(()=>{class e extends E{getTranslation(t){return k({})}static \u0275fac=(()=>{let t;return function(s){return(t||(t=Q(e)))(s||e)}})();static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})();function et(e,n){if(e===n)return!0;if(e===null||n===null)return!1;if(e!==e&&n!==n)return!0;let t=typeof e,i=typeof n,s;if(t==i&&t=="object")if(Array.isArray(e)){if(!Array.isArray(n))return!1;if((s=e.length)==n.length){for(let r=0;r<s;r++)if(!et(e[r],n[r]))return!1;return!0}}else{if(Array.isArray(n))return!1;if(_(e)&&_(n)){let r=Object.create(null);for(let o in e){if(!et(e[o],n[o]))return!1;r[o]=!0}for(let o in n)if(!(o in r)&&typeof n[o]<"u")return!1;return!0}}return!1}function T(e){return typeof e<"u"&&e!==null}function Zt(e){return e!==void 0}function _(e){return Z(e)&&!I(e)&&e!==null}function Z(e){return typeof e=="object"&&e!==null}function I(e){return Array.isArray(e)}function it(e){return typeof e=="string"}function he(e){return typeof e=="function"}function nt(e){if(I(e))return e.map(n=>nt(n));if(_(e)){let n={};return Object.keys(e).forEach(t=>{n[t]=nt(e[t])}),n}else return e}function St(e,n){if(!Z(e))return nt(n);let t=nt(e);return Z(t)&&Z(n)&&Object.keys(n).forEach(i=>{_(n[i])?i in e?t[i]=St(e[i],n[i]):Object.assign(t,{[i]:n[i]}):Object.assign(t,{[i]:n[i]})}),t}function Ut(e,n){let t=n.split(".");n="";do{n+=t.shift();let i=!t.length;if(T(e)){if(_(e)&&Zt(e[n])&&(_(e[n])||I(e[n])||i)){e=e[n],n="";continue}if(I(e)){let s=parseInt(n,10);if(Zt(e[s])&&(_(e[s])||I(e[s])||i)){e=e[s],n="";continue}}}if(i){e=void 0;continue}n+="."}while(t.length);return e}function de(e,n,t){return St(e,fe(n,t))}function fe(e,n){return e.split(".").reduceRight((t,i)=>({[i]:t}),n)}var A=class{},pe=(()=>{class e extends A{templateMatcher=/{{\s?([^{}\s]*)\s?}}/g;interpolate(t,i){if(it(t))return this.interpolateString(t,i);if(he(t))return this.interpolateFunction(t,i)}interpolateFunction(t,i){return t(i)}interpolateString(t,i){return i?t.replace(this.templateMatcher,(s,r)=>{let o=this.getInterpolationReplacement(i,r);return o!==void 0?o:s}):t}getInterpolationReplacement(t,i){return this.formatValue(Ut(t,i))}formatValue(t){if(it(t))return t;if(typeof t=="number"||typeof t=="boolean")return t.toString();if(t===null)return"null";if(I(t))return t.join(", ");if(Z(t))return typeof t.toString=="function"&&t.toString!==Object.prototype.toString?t.toString():JSON.stringify(t)}static \u0275fac=(()=>{let t;return function(s){return(t||(t=Q(e)))(s||e)}})();static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),xt=(()=>{class e{_onTranslationChange=new p;_onLangChange=new p;_onFallbackLangChange=new p;fallbackLang=null;currentLang;translations={};languages=[];getTranslations(t){return this.translations[t]}setTranslations(t,i,s){this.translations[t]=s&&this.hasTranslationFor(t)?St(this.translations[t],i):i,this.addLanguages([t]),this._onTranslationChange.next({lang:t,translations:this.getTranslations(t)})}getLanguages(){return this.languages}getCurrentLang(){return this.currentLang}getFallbackLang(){return this.fallbackLang}setFallbackLang(t,i=!0){this.fallbackLang=t,i&&this._onFallbackLangChange.next({lang:t,translations:this.translations[t]})}setCurrentLang(t,i=!0){this.currentLang=t,i&&this._onLangChange.next({lang:t,translations:this.translations[t]})}get onTranslationChange(){return this._onTranslationChange.asObservable()}get onLangChange(){return this._onLangChange.asObservable()}get onFallbackLangChange(){return this._onFallbackLangChange.asObservable()}addLanguages(t){this.languages=Array.from(new Set([...this.languages,...t]))}hasTranslationFor(t){return typeof this.translations[t]<"u"}deleteTranslations(t){delete this.translations[t]}getTranslation(t){let i=this.getValue(this.currentLang,t);return i===void 0&&this.fallbackLang!=null&&this.fallbackLang!==this.currentLang&&(i=this.getValue(this.fallbackLang,t)),i}getValue(t,i){return Ut(this.getTranslations(t),i)}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})(),It=new Y("TRANSLATE_CONFIG"),q=e=>D(e)?e:k(e);var Ft=(()=>{class e{loadingTranslations;pending=!1;_translationRequests={};lastUseLanguage=null;currentLoader=u(E);compiler=u(O);parser=u(A);missingTranslationHandler=u(G);store=u(xt);extend=!1;get onTranslationChange(){return this.store.onTranslationChange}get onLangChange(){return this.store.onLangChange}get onFallbackLangChange(){return this.store.onFallbackLangChange}get onDefaultLangChange(){return this.store.onFallbackLangChange}constructor(){let t=c({extend:!1,fallbackLang:null},u(It,{optional:!0}));t.lang&&this.use(t.lang),t.fallbackLang&&this.setFallbackLang(t.fallbackLang),t.extend&&(this.extend=!0)}setFallbackLang(t){this.getFallbackLang()||this.store.setFallbackLang(t,!1);let i=this.loadOrExtendLanguage(t);return D(i)?(i.pipe(P(1)).subscribe({next:()=>{this.store.setFallbackLang(t)},error:()=>{}}),i):(this.store.setFallbackLang(t),k(this.store.getTranslations(t)))}use(t){this.lastUseLanguage=t,this.getCurrentLang()||this.store.setCurrentLang(t,!1);let i=this.loadOrExtendLanguage(t);return D(i)?(i.pipe(P(1)).subscribe({next:()=>{this.changeLang(t)},error:()=>{}}),i):(this.changeLang(t),k(this.store.getTranslations(t)))}loadOrExtendLanguage(t){if(!this.store.hasTranslationFor(t)||this.extend)return this._translationRequests[t]=this._translationRequests[t]||this.loadAndCompileTranslations(t),this._translationRequests[t]}changeLang(t){t===this.lastUseLanguage&&this.store.setCurrentLang(t)}getCurrentLang(){return this.store.getCurrentLang()}loadAndCompileTranslations(t){this.pending=!0;let i=this.currentLoader.getTranslation(t).pipe(ut(1),P(1));return this.loadingTranslations=i.pipe(ot(s=>this.compiler.compileTranslations(s,t)),ut(1),P(1)),this.loadingTranslations.subscribe({next:s=>{this.store.setTranslations(t,s,this.extend),this.pending=!1},error:s=>{this.pending=!1}}),i}setTranslation(t,i,s=!1){let r=this.compiler.compileTranslations(i,t);this.store.setTranslations(t,r,s||this.extend)}getLangs(){return this.store.getLanguages()}addLangs(t){this.store.addLanguages(t)}getParsedResultForKey(t,i){let s=this.getTextToInterpolate(t);if(T(s))return this.runInterpolation(s,i);let r=this.missingTranslationHandler.handle(c({key:t,translateService:this},i!==void 0&&{interpolateParams:i}));return r!==void 0?r:t}getFallbackLang(){return this.store.getFallbackLang()}getTextToInterpolate(t){return this.store.getTranslation(t)}runInterpolation(t,i){if(T(t))return I(t)?this.runInterpolationOnArray(t,i):_(t)?this.runInterpolationOnDict(t,i):this.parser.interpolate(t,i)}runInterpolationOnArray(t,i){return t.map(s=>this.runInterpolation(s,i))}runInterpolationOnDict(t,i){let s={};for(let r in t){let o=this.runInterpolation(t[r],i);o!==void 0&&(s[r]=o)}return s}getParsedResult(t,i){return t instanceof Array?this.getParsedResultForArray(t,i):this.getParsedResultForKey(t,i)}getParsedResultForArray(t,i){let s={},r=!1;for(let l of t)s[l]=this.getParsedResultForKey(l,i),r=r||D(s[l]);if(!r)return s;let o=t.map(l=>q(s[l]));return Pt(o).pipe(ot(l=>{let C={};return l.forEach((U,w)=>{C[t[w]]=U}),C}))}get(t,i){if(!T(t)||!t.length)throw new Error('Parameter "key" is required and cannot be empty');return this.pending?this.loadingTranslations.pipe(Mt(()=>q(this.getParsedResult(t,i)))):q(this.getParsedResult(t,i))}getStreamOnTranslationChange(t,i){if(!T(t)||!t.length)throw new Error('Parameter "key" is required and cannot be empty');return at(lt(()=>this.get(t,i)),this.onTranslationChange.pipe(ct(()=>{let s=this.getParsedResult(t,i);return q(s)})))}stream(t,i){if(!T(t)||!t.length)throw new Error('Parameter "key" required');return at(lt(()=>this.get(t,i)),this.onLangChange.pipe(ct(()=>{let s=this.getParsedResult(t,i);return q(s)})))}instant(t,i){if(!T(t)||t.length===0)throw new Error('Parameter "key" is required and cannot be empty');let s=this.getParsedResult(t,i);return D(s)?Array.isArray(t)?t.reduce((r,o)=>(r[o]=o,r),{}):t:s}set(t,i,s=this.getCurrentLang()){this.store.setTranslations(s,de(this.store.getTranslations(s),t,it(i)?this.compiler.compile(i,s):this.compiler.compileTranslations(i,s)),!1)}reloadLang(t){return this.resetLang(t),this.loadAndCompileTranslations(t)}resetLang(t){delete this._translationRequests[t],this.store.deleteTranslations(t)}static getBrowserLang(){if(typeof window>"u"||!window.navigator)return;let t=this.getBrowserCultureLang();return t?t.split(/[-_]/)[0]:void 0}static getBrowserCultureLang(){if(!(typeof window>"u"||typeof window.navigator>"u"))return window.navigator.languages?window.navigator.languages[0]:window.navigator.language||window.navigator.browserLanguage||window.navigator.userLanguage}getBrowserLang(){return e.getBrowserLang()}getBrowserCultureLang(){return e.getBrowserCultureLang()}get defaultLang(){return this.getFallbackLang()}get currentLang(){return this.store.getCurrentLang()}get langs(){return this.store.getLanguages()}setDefaultLang(t){return this.setFallbackLang(t)}getDefaultLang(){return this.getFallbackLang()}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})();var Ye=(()=>{class e{translate=u(Ft);_ref=u(Kt);value="";lastKey=null;lastParams=[];onTranslationChange;onLangChange;onFallbackLangChange;updateValue(t,i,s){let r=o=>{this.value=o!==void 0?o:t,this.lastKey=t,this._ref.markForCheck()};if(s){let o=this.translate.getParsedResult(t,i);D(o)?o.subscribe(r):r(o)}this.translate.get(t,i).subscribe(r)}transform(t,...i){if(!t||!t.length)return t;if(et(t,this.lastKey)&&et(i,this.lastParams))return this.value;let s;if(T(i[0])&&i.length)if(it(i[0])&&i[0].length){let r=i[0].replace(/(')?([a-zA-Z0-9_]+)(')?(\s)?:/g,'"$2":').replace(/:(\s)?(')(.*?)(')/g,':"$3"');try{s=JSON.parse(r)}catch(o){throw new SyntaxError(`Wrong parameter in TranslatePipe. Expected a valid Object, received: ${i[0]}`)}}else _(i[0])&&(s=i[0]);return this.lastKey=t,this.lastParams=i,this.updateValue(t,s),this._dispose(),this.onTranslationChange||(this.onTranslationChange=this.translate.onTranslationChange.subscribe(r=>{(this.lastKey&&r.lang===this.translate.getCurrentLang()||r.lang===this.translate.getFallbackLang())&&(this.lastKey=null,this.updateValue(t,s,r.translations))})),this.onLangChange||(this.onLangChange=this.translate.onLangChange.subscribe(r=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,s,r.translations))})),this.onFallbackLangChange||(this.onFallbackLangChange=this.translate.onFallbackLangChange.subscribe(()=>{this.lastKey&&(this.lastKey=null,this.updateValue(t,s))})),this.value}_dispose(){typeof this.onTranslationChange<"u"&&(this.onTranslationChange.unsubscribe(),this.onTranslationChange=void 0),typeof this.onLangChange<"u"&&(this.onLangChange.unsubscribe(),this.onLangChange=void 0),typeof this.onFallbackLangChange<"u"&&(this.onFallbackLangChange.unsubscribe(),this.onFallbackLangChange=void 0)}ngOnDestroy(){this._dispose()}static \u0275fac=function(i){return new(i||e)};static \u0275pipe=Vt({name:"translate",type:e,pure:!1});static \u0275prov=d({token:e,factory:e.\u0275fac})}return e})();function ge(e){return{provide:E,useClass:e}}function me(e){return{provide:O,useClass:e}}function ve(e){return{provide:A,useClass:e}}function be(e){return{provide:G,useClass:e}}function Je(e={}){return _e(c({compiler:me(ue),parser:ve(pe),loader:ge(ce),missingTranslationHandler:be(le)},e),!0)}function _e(e={},n){let t=[];e.loader&&t.push(e.loader),e.compiler&&t.push(e.compiler),e.parser&&t.push(e.parser),e.missingTranslationHandler&&t.push(e.missingTranslationHandler),n&&t.push(xt),(e.useDefaultLang||e.defaultLanguage)&&(console.warn("The `useDefaultLang` and `defaultLanguage` options are deprecated. Please use `fallbackLang` instead."),e.useDefaultLang===!0&&e.defaultLanguage&&(e.fallbackLang=e.defaultLanguage));let i={fallbackLang:e.fallbackLang??null,lang:e.lang,extend:e.extend??!1};return t.push({provide:It,useValue:i}),t.push({provide:Ft,useClass:Ft,deps:[xt,E,O,A,G,It]}),t}var Yt=["toast-component",""];function ye(e,n){if(e&1){let t=Tt();g(0,"button",5),V("click",function(){dt(t);let s=f();return ft(s.remove())}),g(1,"span",6),b(2,"\xD7"),m()()}}function Te(e,n){if(e&1&&(_t(0),b(1),yt()),e&2){let t=f(2);a(),x("[",t.duplicatesCount+1,"]")}}function Ce(e,n){if(e&1&&(g(0,"div"),b(1),N(2,Te,2,1,"ng-container",4),m()),e&2){let t=f();v(t.options.titleClass),H("aria-label",t.title),a(),x(" ",t.title," "),a(),h("ngIf",t.duplicatesCount)}}function we(e,n){if(e&1&&B(0,"div",7),e&2){let t=f();v(t.options.messageClass),h("innerHTML",t.message,gt)}}function De(e,n){if(e&1&&(g(0,"div",8),b(1),m()),e&2){let t=f();v(t.options.messageClass),H("aria-label",t.message),a(),x(" ",t.message," ")}}function Le(e,n){if(e&1&&(g(0,"div"),B(1,"div",9),m()),e&2){let t=f();a(),$("width",t.width()+"%")}}function xe(e,n){if(e&1){let t=Tt();g(0,"button",5),V("click",function(){dt(t);let s=f();return ft(s.remove())}),g(1,"span",6),b(2,"\xD7"),m()()}}function Ie(e,n){if(e&1&&(_t(0),b(1),yt()),e&2){let t=f(2);a(),x("[",t.duplicatesCount+1,"]")}}function Fe(e,n){if(e&1&&(g(0,"div"),b(1),N(2,Ie,2,1,"ng-container",4),m()),e&2){let t=f();v(t.options.titleClass),H("aria-label",t.title),a(),x(" ",t.title," "),a(),h("ngIf",t.duplicatesCount)}}function Se(e,n){if(e&1&&B(0,"div",7),e&2){let t=f();v(t.options.messageClass),h("innerHTML",t.message,gt)}}function Oe(e,n){if(e&1&&(g(0,"div",8),b(1),m()),e&2){let t=f();v(t.options.messageClass),H("aria-label",t.message),a(),x(" ",t.message," ")}}function Ee(e,n){if(e&1&&(g(0,"div"),B(1,"div",9),m()),e&2){let t=f();a(),$("width",t.width()+"%")}}var Ot=class{_attachedHost;component;viewContainerRef;injector;constructor(n,t){this.component=n,this.injector=t}attach(n,t){return this._attachedHost=n,n.attach(this,t)}detach(){let n=this._attachedHost;if(n)return this._attachedHost=void 0,n.detach()}get isAttached(){return this._attachedHost!=null}setAttachedHost(n){this._attachedHost=n}},Et=class{_attachedPortal;_disposeFn;attach(n,t){return this._attachedPortal=n,this.attachComponentPortal(n,t)}detach(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=void 0,this._disposeFn&&(this._disposeFn(),this._disposeFn=void 0)}setDisposeFn(n){this._disposeFn=n}},At=class{_overlayRef;componentInstance;duplicatesCount=0;_afterClosed=new p;_activate=new p;_manualClose=new p;_resetTimeout=new p;_countDuplicate=new p;constructor(n){this._overlayRef=n}manualClose(){this._manualClose.next(),this._manualClose.complete()}manualClosed(){return this._manualClose.asObservable()}timeoutReset(){return this._resetTimeout.asObservable()}countDuplicate(){return this._countDuplicate.asObservable()}close(){this._overlayRef.detach(),this._afterClosed.next(),this._manualClose.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete(),this._resetTimeout.complete(),this._countDuplicate.complete()}afterClosed(){return this._afterClosed.asObservable()}isInactive(){return this._activate.isStopped}activate(){this._activate.next(),this._activate.complete()}afterActivate(){return this._activate.asObservable()}onDuplicate(n,t){n&&this._resetTimeout.next(),t&&this._countDuplicate.next(++this.duplicatesCount)}},R=class{toastId;config;message;title;toastType;toastRef;_onTap=new p;_onAction=new p;constructor(n,t,i,s,r,o){this.toastId=n,this.config=t,this.message=i,this.title=s,this.toastType=r,this.toastRef=o,this.toastRef.afterClosed().subscribe(()=>{this._onAction.complete(),this._onTap.complete()})}triggerTap(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()}onTap(){return this._onTap.asObservable()}triggerAction(n){this._onAction.next(n)}onAction(){return this._onAction.asObservable()}},Jt={maxOpened:0,autoDismiss:!1,newestOnTop:!0,preventDuplicates:!1,countDuplicates:!1,resetTimeoutOnDuplicate:!1,includeTitleDuplicates:!1,iconClasses:{error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},closeButton:!1,disableTimeOut:!1,timeOut:5e3,extendedTimeOut:1e3,enableHtml:!1,progressBar:!1,toastClass:"ngx-toastr",positionClass:"toast-top-right",titleClass:"toast-title",messageClass:"toast-message",easing:"ease-in",easeTime:300,tapToDismiss:!0,onActivateTick:!1,progressAnimation:"decreasing"},Qt=new Y("ToastConfig"),Rt=class extends Et{_hostDomElement;_componentFactoryResolver;_appRef;constructor(n,t,i){super(),this._hostDomElement=n,this._componentFactoryResolver=t,this._appRef=i}attachComponentPortal(n,t){let i=this._componentFactoryResolver.resolveComponentFactory(n.component),s;return s=i.create(n.injector),this._appRef.attachView(s.hostView),this.setDisposeFn(()=>{this._appRef.detachView(s.hostView),s.destroy()}),t?this._hostDomElement.insertBefore(this._getComponentRootNode(s),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(s)),s}_getComponentRootNode(n){return n.hostView.rootNodes[0]}},Ae=(()=>{class e{_document=u(pt);_containerElement;ngOnDestroy(){this._containerElement&&this._containerElement.parentNode&&this._containerElement.parentNode.removeChild(this._containerElement)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let t=this._document.createElement("div");t.classList.add("overlay-container"),t.setAttribute("aria-live","polite"),this._document.body.appendChild(t),this._containerElement=t}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),jt=class{_portalHost;constructor(n){this._portalHost=n}attach(n,t=!0){return this._portalHost.attach(n,t)}detach(){return this._portalHost.detach()}},Re=(()=>{class e{_overlayContainer=u(Ae);_componentFactoryResolver=u(Bt);_appRef=u(W);_document=u(pt);_paneElements=new Map;create(t,i){return this._createOverlayRef(this.getPaneElement(t,i))}getPaneElement(t="",i){return this._paneElements.get(i)||this._paneElements.set(i,{}),this._paneElements.get(i)[t]||(this._paneElements.get(i)[t]=this._createPaneElement(t,i)),this._paneElements.get(i)[t]}_createPaneElement(t,i){let s=this._document.createElement("div");return s.id="toast-container",s.classList.add(t),s.classList.add("toast-container"),i?i.getContainerElement().appendChild(s):this._overlayContainer.getContainerElement().appendChild(s),s}_createPortalHost(t){return new Rt(t,this._componentFactoryResolver,this._appRef)}_createOverlayRef(t){return new jt(this._createPortalHost(t))}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),Wt=(()=>{class e{overlay;_injector;sanitizer;ngZone;toastrConfig;currentlyActive=0;toasts=[];overlayContainer;previousToastMessage;index=0;constructor(t,i,s,r,o){this.overlay=i,this._injector=s,this.sanitizer=r,this.ngZone=o,this.toastrConfig=c(c({},t.default),t.config),t.config.iconClasses&&(this.toastrConfig.iconClasses=c(c({},t.default.iconClasses),t.config.iconClasses))}show(t,i,s={},r=""){return this._preBuildNotification(r,t,i,this.applyConfig(s))}success(t,i,s={}){let r=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}error(t,i,s={}){let r=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}info(t,i,s={}){let r=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}warning(t,i,s={}){let r=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(r,t,i,this.applyConfig(s))}clear(t){for(let i of this.toasts)if(t!==void 0){if(i.toastId===t){i.toastRef.manualClose();return}}else i.toastRef.manualClose()}remove(t){let i=this._findToast(t);if(!i||(i.activeToast.toastRef.close(),this.toasts.splice(i.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length))return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){let s=this.toasts[this.currentlyActive].toastRef;s.isInactive()||(this.currentlyActive=this.currentlyActive+1,s.activate())}return!0}findDuplicate(t="",i="",s,r){let{includeTitleDuplicates:o}=this.toastrConfig;for(let l of this.toasts){let C=o&&l.title===t;if((!o||C)&&l.message===i)return l.toastRef.onDuplicate(s,r),l}return null}applyConfig(t={}){return c(c({},this.toastrConfig),t)}_findToast(t){for(let i=0;i<this.toasts.length;i++)if(this.toasts[i].toastId===t)return{index:i,activeToast:this.toasts[i]};return null}_preBuildNotification(t,i,s,r){return r.onActivateTick?this.ngZone.run(()=>this._buildNotification(t,i,s,r)):this._buildNotification(t,i,s,r)}_buildNotification(t,i,s,r){if(!r.toastComponent)throw new Error("toastComponent required");let o=this.findDuplicate(s,i,this.toastrConfig.resetTimeoutOnDuplicate&&r.timeOut>0,this.toastrConfig.countDuplicates);if((this.toastrConfig.includeTitleDuplicates&&s||i)&&this.toastrConfig.preventDuplicates&&o!==null)return o;this.previousToastMessage=i;let l=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(l=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[0].toastId));let C=this.overlay.create(r.positionClass,this.overlayContainer);this.index=this.index+1;let U=i;i&&r.enableHtml&&(U=this.sanitizer.sanitize(Ht.HTML,i));let w=new At(C),st=new R(this.index,r,U,s,t,w),te=[{provide:R,useValue:st}],ee=J.create({providers:te,parent:this._injector}),ie=new Ot(r.toastComponent,ee),kt=C.attach(ie,r.newestOnTop);w.componentInstance=kt.instance;let rt={toastId:this.index,title:s||"",message:i||"",toastRef:w,onShown:w.afterActivate(),onHidden:w.afterClosed(),onTap:st.onTap(),onAction:st.onAction(),portal:kt};return l||(this.currentlyActive=this.currentlyActive+1,setTimeout(()=>{rt.toastRef.activate()})),this.toasts.push(rt),rt}static \u0275fac=function(i){return new(i||e)(S(Qt),S(Re),S(J),S(qt),S(bt))};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),je=(()=>{class e{toastrService;toastPackage;ngZone;message;title;options;duplicatesCount;originalTimeout;width=M(-1);toastClasses="";state;get _state(){return this.state()}get displayStyle(){if(this.state().value==="inactive")return"none"}timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,i,s){this.toastrService=t,this.toastPackage=i,this.ngZone=s,this.message=i.message,this.title=i.title,this.options=i.config,this.originalTimeout=i.config.timeOut,this.toastClasses=`${i.toastType} ${i.config.toastClass}`,this.sub=i.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=i.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=i.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=i.toastRef.countDuplicate().subscribe(r=>{this.duplicatesCount=r}),this.state=M({value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.update(t=>F(c({},t),{value:"active"})),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.outsideTimeout(()=>this.remove(),this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),i=this.hideTime-t;this.width.set(i/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(s=>100-s),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.update(t=>F(c({},t),{value:"active"})),this.outsideTimeout(()=>this.remove(),this.originalTimeout),this.options.timeOut=this.originalTimeout,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10)}remove(){this.state().value!=="removed"&&(clearTimeout(this.timeout),this.state.update(t=>F(c({},t),{value:"removed"})),this.outsideTimeout(()=>this.toastrService.remove(this.toastPackage.toastId),+this.toastPackage.config.easeTime))}tapToast(){this.state().value!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state().value!=="removed"&&this.options.disableTimeOut!=="extendedTimeOut"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state().value==="removed"||(this.outsideTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&this.outsideInterval(()=>this.updateProgress(),10))}outsideTimeout(t,i){this.ngZone?this.ngZone.runOutsideAngular(()=>this.timeout=setTimeout(()=>this.runInsideAngular(t),i)):this.timeout=setTimeout(()=>t(),i)}outsideInterval(t,i){this.ngZone?this.ngZone.runOutsideAngular(()=>this.intervalId=setInterval(()=>this.runInsideAngular(t),i)):this.intervalId=setInterval(()=>t(),i)}runInsideAngular(t){this.ngZone?this.ngZone.run(()=>t()):t()}static \u0275fac=function(i){return new(i||e)(L(Wt),L(R),L(bt))};static \u0275cmp=mt({type:e,selectors:[["","toast-component",""]],hostVars:5,hostBindings:function(i,s){i&1&&V("click",function(){return s.tapToast()})("mouseenter",function(){return s.stickAround()})("mouseleave",function(){return s.delayedHideToast()}),i&2&&($t("@flyInOut",s._state),v(s.toastClasses),$("display",s.displayStyle))},attrs:Yt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(i,s){i&1&&N(0,ye,3,0,"button",0)(1,Ce,3,5,"div",1)(2,we,1,3,"div",2)(3,De,2,4,"div",3)(4,Le,2,2,"div",4),i&2&&(h("ngIf",s.options.closeButton),a(),h("ngIf",s.title),a(),h("ngIf",s.message&&s.options.enableHtml),a(),h("ngIf",s.message&&!s.options.enableHtml),a(),h("ngIf",s.options.progressBar))},dependencies:[Ct],encapsulation:2,data:{animation:[Lt("flyInOut",[z("inactive",K({opacity:0})),z("active",K({opacity:1})),z("removed",K({opacity:0})),tt("inactive => active",X("{{ easeTime }}ms {{ easing }}")),tt("active => removed",X("{{ easeTime }}ms {{ easing }}"))])]},changeDetection:0})}return e})(),ke=F(c({},Jt),{toastComponent:je}),Pe=(e={})=>Nt([{provide:Qt,useValue:{default:ke,config:e}}]),Ti=(()=>{class e{static forRoot(t={}){return{ngModule:e,providers:[Pe(t)]}}static \u0275fac=function(i){return new(i||e)};static \u0275mod=vt({type:e});static \u0275inj=ht({})}return e})();var Me=(()=>{class e{toastrService;toastPackage;appRef;message;title;options;duplicatesCount;originalTimeout;width=M(-1);toastClasses="";get displayStyle(){return this.state()==="inactive"?"none":null}state=M("inactive");timeout;intervalId;hideTime;sub;sub1;sub2;sub3;constructor(t,i,s){this.toastrService=t,this.toastPackage=i,this.appRef=s,this.message=i.message,this.title=i.title,this.options=i.config,this.originalTimeout=i.config.timeOut,this.toastClasses=`${i.toastType} ${i.config.toastClass}`,this.sub=i.toastRef.afterActivate().subscribe(()=>{this.activateToast()}),this.sub1=i.toastRef.manualClosed().subscribe(()=>{this.remove()}),this.sub2=i.toastRef.timeoutReset().subscribe(()=>{this.resetTimeout()}),this.sub3=i.toastRef.countDuplicate().subscribe(r=>{this.duplicatesCount=r})}ngOnDestroy(){this.sub.unsubscribe(),this.sub1.unsubscribe(),this.sub2.unsubscribe(),this.sub3.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)}activateToast(){this.state.set("active"),!(this.options.disableTimeOut===!0||this.options.disableTimeOut==="timeOut")&&this.options.timeOut&&(this.timeout=setTimeout(()=>{this.remove()},this.options.timeOut),this.hideTime=new Date().getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))),this.options.onActivateTick&&this.appRef.tick()}updateProgress(){if(this.width()===0||this.width()===100||!this.options.timeOut)return;let t=new Date().getTime(),i=this.hideTime-t;this.width.set(i/this.options.timeOut*100),this.options.progressAnimation==="increasing"&&this.width.update(s=>100-s),this.width()<=0&&this.width.set(0),this.width()>=100&&this.width.set(100)}resetTimeout(){clearTimeout(this.timeout),clearInterval(this.intervalId),this.state.set("active"),this.options.timeOut=this.originalTimeout,this.timeout=setTimeout(()=>this.remove(),this.originalTimeout),this.hideTime=new Date().getTime()+(this.originalTimeout||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10))}remove(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.state.set("removed"),this.timeout=setTimeout(()=>this.toastrService.remove(this.toastPackage.toastId)))}tapToast(){this.state()!=="removed"&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())}stickAround(){this.state()!=="removed"&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width.set(0))}delayedHideToast(){this.options.disableTimeOut===!0||this.options.disableTimeOut==="extendedTimeOut"||this.options.extendedTimeOut===0||this.state()==="removed"||(this.timeout=setTimeout(()=>this.remove(),this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=new Date().getTime()+(this.options.timeOut||0),this.width.set(-1),this.options.progressBar&&(this.intervalId=setInterval(()=>this.updateProgress(),10)))}static \u0275fac=function(i){return new(i||e)(L(Wt),L(R),L(W))};static \u0275cmp=mt({type:e,selectors:[["","toast-component",""]],hostVars:4,hostBindings:function(i,s){i&1&&V("click",function(){return s.tapToast()})("mouseenter",function(){return s.stickAround()})("mouseleave",function(){return s.delayedHideToast()}),i&2&&(v(s.toastClasses),$("display",s.displayStyle))},attrs:Yt,decls:5,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[3,"class",4,"ngIf"],["role","alert",3,"class","innerHTML",4,"ngIf"],["role","alert",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alert",3,"innerHTML"],["role","alert"],[1,"toast-progress"]],template:function(i,s){i&1&&N(0,xe,3,0,"button",0)(1,Fe,3,5,"div",1)(2,Se,1,3,"div",2)(3,Oe,2,4,"div",3)(4,Ee,2,2,"div",4),i&2&&(h("ngIf",s.options.closeButton),a(),h("ngIf",s.title),a(),h("ngIf",s.message&&s.options.enableHtml),a(),h("ngIf",s.message&&!s.options.enableHtml),a(),h("ngIf",s.options.progressBar))},dependencies:[Ct],encapsulation:2,changeDetection:0})}return e})(),Ci=F(c({},Jt),{toastComponent:Me});var j={serverTarget:Xt().version,production:!0,socket:"",api:{base:(()=>{let n=document.querySelector("base")?.getAttribute("href")||"/";return n.endsWith("/")?`${n}api`:`${n}/api`})(),socket:`${window.location.protocol==="http:"?"ws://":"wss://"}${window.location.host}`,origin:window.location.origin},jwt:{tokenKey:"access_token",allowedDomains:[document.location.host],disallowedRoutes:[(()=>{let n=document.querySelector("base")?.getAttribute("href")||"/",t=n.endsWith("/")?`${n}api`:`${n}/api`;return`${window.location.protocol}//${document.location.host}${t}/auth/login`})()]},apiHttpOptions:{},owm:{appid:"fec67b55f7f74deaa28df89ba6a60821"}};var Ei=(()=>{class e{$http=u(zt);get(t,i){return this.$http.get(`${j.api.base}${t}`,i)}post(t,i,s){return this.$http.post(`${j.api.base}${t}`,i,s)}put(t,i,s){return this.$http.put(`${j.api.base}${t}`,i,s)}patch(t,i,s){return this.$http.patch(`${j.api.base}${t}`,i,s)}delete(t,i){return this.$http.delete(`${j.api.base}${t}`,i)}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();export{y as a,se as b,Lt as c,X as d,He as e,K as f,tt as g,wt as h,Dt as i,re as j,Ft as k,Ye as l,Je as m,Wt as n,Ti as o,j as p,Ei as q};
@@ -0,0 +1,2 @@
1
+ import{B as Y,C as Z,c as G,d as k,e as j,f as D,g as K,j as $,m as A,q as J,r as Q,y as X}from"./chunk-AM53KSWA.js";import{a as ae}from"./chunk-UO7UMJN3.js";import{b as oe}from"./chunk-BH4JDZF4.js";import{b as re}from"./chunk-5RI5TLFW.js";import{k as ee,l as te,n as ie,p as U,q as ne}from"./chunk-FB6OF4XR.js";import{Db as I,Ga as W,Gb as x,Ib as _,Jc as H,La as n,Mc as N,Sb as O,Vb as l,Wa as V,Wb as f,Wc as R,Xb as g,fc as L,gc as B,gd as q,h as S,hc as E,ja as w,kb as M,lb as z,mb as T,mc as a,nc as s,oa as C,pa as b,rb as m,sb as o,tb as r,ub as u,w as h}from"./chunk-3LEW5FOJ.js";var pe=t=>({background:t}),de=t=>({anim:t}),ce=t=>({"progress-bar-animated":t}),me=()=>["restoring","restarting","restore-complete"],P=(t,d)=>({"is-valid":t,"is-invalid":d});function ue(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),u(4,"div",7),a(5,"translate"),o(6,"button",8),x("click",function(){C(e);let i=_();return b(i.onClickGettingStarted())}),l(7),a(8,"translate"),r(),o(9,"a",9),x("click",function(){C(e);let i=_();return b(i.onClickRestoreBackup())}),l(10),a(11,"translate"),r()()}t&2&&(n(2),f(s(3,4,"setup.welcome_to_homebridge")),n(2),m("innerHTML",s(5,6,"setup.intro"),W),n(3),g(" ",s(8,8,"setup.button_get_started")," "),n(3),f(s(11,10,"setup_wizard_restore")))}function ge(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"div",11)(8,"form",12),x("ngSubmit",function(){C(e);let i=_();return b(i.createFirstUser())}),o(9,"div",13)(10,"span",14),u(11,"i",15),r(),u(12,"input",16),a(13,"translate"),r(),o(14,"div",13)(15,"span",14),u(16,"i",17),r(),u(17,"input",18),a(18,"translate"),r(),o(19,"div",13)(20,"span",14),u(21,"i",17),r(),u(22,"input",19),a(23,"translate"),r(),o(24,"div",20)(25,"button",21),x("click",function(){C(e);let i=_();return b(i.onClickCancelRestore())}),l(26),a(27,"translate"),r(),o(28,"button",22),l(29),a(30,"translate"),r()()()()()}if(t&2){let e=_();n(2),f(s(3,16,"setup.create_account")),n(3),f(s(6,18,"setup_wizard_create_info")),n(3),m("formGroup",e.createUserForm),n(4),m("readonly",e.loading)("ngClass",E(30,P,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid))("placeholder",s(13,20,"users.label_username")),n(5),m("readonly",e.loading)("ngClass",E(33,P,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors))("placeholder",s(18,22,"users.label_password")),n(5),m("readonly",e.loading)("ngClass",E(36,P,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors))("placeholder",s(23,24,"users.label_confirm_password")),n(3),m("disabled",e.restoreUploading),n(),g(" ",s(27,26,"form.button_back")," "),n(2),m("disabled",e.createUserForm.invalid||e.loading),n(),g(" ",s(30,28,"form.button_continue")," ")}}function _e(t,d){t&1&&(u(0,"i",25),l(1),a(2,"translate")),t&2&&(n(),g(" ",s(2,1,"backup.label_uploading")," "))}function fe(t,d){t&1&&(l(0),a(1,"translate")),t&2&&g(" ",s(1,1,"form.button_continue")," ")}function he(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"input",23),x("change",function(i){C(e);let F=_();return b(F.handleRestoreFileInput(i.target.files))}),r(),o(8,"div",20)(9,"button",21),x("click",function(){C(e);let i=_();return b(i.onClickCancelRestore())}),l(10),a(11,"translate"),r(),o(12,"button",24),x("click",function(){C(e);let i=_();return b(i.onRestoreBackupClick())}),z(13,_e,3,3)(14,fe,2,3),r()()()}if(t&2){let e=_();n(2),f(s(3,6,"setup_wizard_restore")),n(3),f(s(6,8,"backup.restore_help_one")),n(4),m("disabled",e.restoreUploading),n(),g(" ",s(11,10,"form.button_back")," "),n(2),m("disabled",e.restoreUploading||!e.selectedFile),n(),T(e.restoreUploading?13:14)}}function we(t,d){t&1&&(l(0),a(1,"translate")),t&2&&g(" ",s(1,1,"setup_wizard_restoring")," ")}function Ce(t,d){t&1&&(l(0),a(1,"translate")),t&2&&g(" ",s(1,1,"setup_wizard_starting")," ")}function be(t,d){t&1&&(l(0),a(1,"translate")),t&2&&g(" ",s(1,1,"setup_wizard_complete")," ")}function xe(t,d){t&1&&(o(0,"a",27),l(1),a(2,"translate"),r()),t&2&&(n(),g(" ",s(2,1,"form.button_continue")," "))}function ve(t,d){if(t&1&&(o(0,"div",5)(1,"h4",6),z(2,we,2,3)(3,Ce,2,3)(4,be,2,3),r(),u(5,"div",26),z(6,xe,3,3,"a",27),r()),t&2){let e=_();n(2),T(e.step==="restoring"?2:e.step==="restarting"?3:e.step==="restore-complete"?4:-1),n(4),T(e.step==="restore-complete"?6:-1)}}function ye(t,d){t&1&&(o(0,"div",5)(1,"h4",28),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"a",29),l(8),a(9,"translate"),r()()),t&2&&(n(2),f(s(3,3,"setup_wizard_complete_title")),n(3),f(s(6,5,"setup_wizard_completed")),n(3),g(" ",s(9,7,"form.button_continue")," "))}var He=(()=>{class t{$api=w(ne);$auth=w(oe);$settings=w(re);$title=w(q);$toastr=w(ie);$translate=w(ee);$ws=w(ae);io;step="welcome";backgroundStyle;progress=1;restoreInProgress=!1;restoreStarted=!1;restoreFailed=!1;loading=!1;selectedFile;restoreUploading=!1;createUserForm=new K({username:new $("",[k.required]),password:new $("",[k.compose([k.required,k.minLength(4)])]),passwordConfirm:new $("",[k.required])},this.matchPassword);ngOnInit(){return S(this,null,function*(){this.$title.setTitle(this.$translate.instant("setup_wizard_page_title")),yield this.setBackground()})}onClickGettingStarted(){this.step="create-account",this.progress=50}onClickRestoreBackup(){this.step="restore-backup",this.progress=20}onClickCancelRestore(){this.selectedFile=null,this.step="welcome",this.progress=1}createFirstUser(){return S(this,null,function*(){this.loading=!0,this.progress=75;let e=this.createUserForm.getRawValue();e.name=e.username;try{yield h(this.$api.post("/setup-wizard/create-first-user",e)),this.$settings.env.setupWizardComplete=!0,this.progress=100,this.loading=!1,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}catch(p){this.loading=!1,this.progress=50,console.error(p),this.$toastr.error(p.message,this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?(this.selectedFile=e[0],this.progress=40):(delete this.selectedFile,this.progress=20)}onRestoreBackupClick(){return S(this,null,function*(){this.restoreUploading=!0,this.step="restoring",this.progress=60;try{let e=yield h(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(U.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token,this.progress=65;let p=new FormData;p.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield h(this.$api.post("/backup/restore",p)),this.progress=70,this.io=this.$ws.connectToNamespace("backup");let i=document.getElementById("output");this.io.socket.on("stdout",c=>{c.split(`
2
+ \r`).forEach(v=>{if(v&&!/^[⠇⠏⠋⠙⠹⠸]+$/.test(v)){let y=document.createElement("div"),le=/\x1B\[(\d{1,2}(;\d{1,2})?)?[mGK]/g;y.innerHTML=v.replace(le,""),v.includes("[0;31m")?y.classList.add("red-text"):v.includes("[0;32m")?y.classList.add("green-text"):v.includes("[0;33m")?y.classList.add("orange-text"):v.includes("[0;36m")&&y.classList.add("cyan-text"),i.appendChild(y),i.scrollTop=i.scrollHeight}})}),this.restoreStarted=!0,this.restoreInProgress=!0,this.progress=75,yield h(this.io.request("do-restore")),this.progress=80,this.restoreInProgress=!1,yield h(this.$api.put("/backup/restart",{})),this.step="restarting",this.progress=85,window.localStorage.removeItem(U.jwt.tokenKey),this.$auth.token=null;let F=document.createElement("div");F.classList.add("orange-text"),F.innerHTML="Starting Homebridge, please wait...",i.appendChild(F),i.scrollTop=i.scrollHeight,yield new Promise(c=>setTimeout(c,3e3)),this.progress=88,yield new Promise(c=>setTimeout(c,3e3)),this.progress=91,yield new Promise(c=>setTimeout(c,3e3)),this.progress=94,yield new Promise(c=>setTimeout(c,3e3)),this.progress=97,yield new Promise(c=>setTimeout(c,3e3)),this.progress=99;let se=setInterval(()=>S(this,null,function*(){try{yield h(this.$api.get("/auth/settings")),clearInterval(se),this.progress=100,this.restoreUploading=!1,this.step="restore-complete"}catch{}}),1e3)}catch(e){console.error(e),this.restoreUploading=!1,this.restoreFailed=!0,this.progress=20,this.step="restore-backup",this.$toastr.error(e.message,this.$translate.instant("toast.title_error"))}finally{this.io&&this.io.end()}})}setBackground(){return S(this,null,function*(){if(this.$settings.settingsLoaded||(yield h(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash){let e=`${U.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`;this.backgroundStyle=`url('${e}') center/cover`}})}matchPassword(e){let p=e.get("password").value,i=e.get("passwordConfirm").value;if(p!==i)e.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=V({type:t,selectors:[["ng-component"]],decls:10,vars:14,consts:[[1,"setup-container","gradient","d-flex","align-items-start","justify-content-center",3,"ngStyle","ngClass"],[1,"w-100","setup-card","d-flex","py-4","flex-column"],["ngSrc","assets/homebridge-color-round.svg","alt","Homebridge Logo","height","100","width","100","priority","true",1,"homebridge-logo","mx-auto","my-3"],[1,"progress","w-100","my-4"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"progress-bar","progress-bar-striped","bg-success",3,"ngClass"],[1,"w-100","d-flex","flex-column","align-items-center","mb-2"],[1,"mb-3","text-center"],[1,"mb-4","small","grey-text","text-center",3,"innerHTML"],["type","button",1,"btn","btn-lg","btn-primary","mb-4",3,"click"],["href","javascript:void(0)",1,"grey-text",3,"click"],[1,"mb-4","small","grey-text","text-center"],[1,"w-100"],["novalidate","",3,"ngSubmit","formGroup"],[1,"input-group","mb-4"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","primary-text","fa-lg"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none","tabindex","1","required","",1,"form-control","custom-input",3,"readonly","ngClass","placeholder"],[1,"fas","fa-fw","fa-lock","primary-text","fa-lg"],["formControlName","password","type","password","id","form-pass","autocomplete","new-password","tabindex","2","required","",1,"form-control","custom-input",3,"readonly","ngClass","placeholder"],["formControlName","passwordConfirm","type","password","id","form-pass-confirm","autocomplete","new-password","tabindex","2","required","",1,"form-control","custom-input",3,"readonly","ngClass","placeholder"],[1,"mt-3","w-100","d-flex","justify-content-between"],["type","button",1,"btn","btn-elegant","ms-0",3,"click","disabled"],["type","submit",1,"btn","btn-primary",3,"disabled"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz",1,"form-control","custom-input","mb-3",3,"change"],["type","button",1,"btn","btn-primary","me-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],["id","output",1,"font-monospace","small","alert","alert-info","w-100","text-start","mt-1","mb-0"],["href","/login",1,"btn","btn-lg","btn-primary","mt-4"],[1,"mb-3"],["href","/",1,"btn","btn-lg","btn-primary"]],template:function(p,i){p&1&&(o(0,"div",0)(1,"div",1),u(2,"img",2),o(3,"div",3),u(4,"div",4),r(),z(5,ue,12,12,"div",5)(6,ge,31,39,"div",5)(7,he,15,12,"div",5)(8,ve,7,2,"div",5)(9,ye,10,9,"div",5),r()()),p&2&&(m("ngStyle",B(7,pe,i.backgroundStyle))("ngClass",B(9,de,!i.backgroundStyle)),n(4),O("width",i.progress+"%"),m("ngClass",B(11,ce,i.loading||i.restoreUploading)),M("aria-valuenow",i.progress),n(),T(i.step==="welcome"?5:i.step==="create-account"?6:i.step==="restore-backup"?7:L(13,me).includes(i.step)?8:i.step==="setup-complete"?9:-1))},dependencies:[H,R,Y,A,G,j,D,X,Z,J,Q,N,te],styles:["body{overflow:scroll!important} body.dark-mode .setup-card{background-color:#2b2b2b;color:#fff}.setup-container[_ngcontent-%COMP%]{z-index:-1;padding-top:2em;padding-bottom:2em;min-height:100%;background-size:300% 300%}.anim[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_gradient 20s ease infinite;-moz-animation:gradient 20s ease infinite;-o-animation:gradient 20s ease infinite;animation:_ngcontent-%COMP%_gradient 20s ease infinite}@keyframes _ngcontent-%COMP%_gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}.setup-card[_ngcontent-%COMP%]{max-width:550px;border-radius:1rem;padding-right:25px;padding-left:25px;background-color:#ffffffe6}.setup-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 575px){.setup-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}}.homebridge-logo[_ngcontent-%COMP%]{margin-bottom:10px}.progress[_ngcontent-%COMP%]{background-color:#ddd}#output[_ngcontent-%COMP%]{height:200px;overflow-y:scroll;white-space:pre-wrap}"]})}return t})();export{He as SetupWizardComponent};
@@ -0,0 +1 @@
1
+ import{a as s}from"./chunk-SJP6OUG5.js";import"./chunk-GTGO4A2X.js";import"./chunk-YGABEALD.js";import"./chunk-CIVLN3HQ.js";import"./chunk-BQMDK4YS.js";import"./chunk-AM53KSWA.js";import"./chunk-UO7UMJN3.js";import"./chunk-BH4JDZF4.js";import{g as i}from"./chunk-MDV2S56W.js";import"./chunk-5RI5TLFW.js";import"./chunk-FB6OF4XR.js";import{Xa as t,fa as e}from"./chunk-3LEW5FOJ.js";var u=[{path:"",loadComponent:()=>import("./chunk-24MFIAJC.js").then(o=>o.AccessoriesComponent)}],c=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[i.forChild(u),i]})}return o})();var l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[s,c]})}return o})();export{l as AccessoriesModule};
@@ -0,0 +1 @@
1
+ import{a as l0}from"./chunk-YGABEALD.js";import{m as i0,n as U}from"./chunk-BQMDK4YS.js";import{B as t0,b as j,c as z,e as J,l as X,s as Z,t as Q,v as e0}from"./chunk-AM53KSWA.js";import{a as B0}from"./chunk-UO7UMJN3.js";import{b as c0}from"./chunk-BH4JDZF4.js";import{b as s0}from"./chunk-5RI5TLFW.js";import{k as n0,l as o0,n as a0,q as r0}from"./chunk-FB6OF4XR.js";import{Db as L,Ga as $,Gb as D,Ib as B,La as o,Vb as a,Wa as q,Wb as u,Xb as C,Za as y,a as G,ac as V,b as Y,bc as w,cc as H,e as E0,ea as K,g as y0,h as b,ja as A,kb as v,lb as _,mb as S,mc as d,n as k,nc as p,oa as R,ob as h,pa as M,pb as x,qb as g,rb as N,sb as l,tb as r,ub as I,w as P}from"./chunk-3LEW5FOJ.js";var d0=E0(T=>{"use strict";Object.defineProperty(T,"__esModule",{value:!0});T.Enums=T.Categories=T.Characteristics=T.Services=void 0;T.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"};T.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"};T.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};T.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 _0=y0(d0(),1);var p0=(()=>{class t{transform(e){if(typeof e!="number")return e;let n=1e6/e,i=Math.round(e),c=Math.round(n);return`${i}M (${c}K)`}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=y({name:"convertMired",type:t,pure:!0})}return t})();var m0=(()=>{class t{$settings=A(s0);transform(e,n=this.$settings.env.temperatureUnits){return n==="f"?e*1.8+32:e}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=y({name:"convertTemp",type:t,pure:!0})}return t})();var u0=(()=>{class t{transform(e){return typeof e!="string"?e:e.replace(/_/g," ").toLowerCase().replace(/\b\w/g,n=>n.toUpperCase()).replace(/([a-z])([A-Z])/g,"$1 $2")}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=y({name:"prettify",type:t,pure:!0})}return t})();var C0=(()=>{class t{transform(e){return typeof e!="string"||!e?e:`accessories.core.${e.replace(/^([A-Z])/,i=>i.toLowerCase()).replace(/([A-Z])/g,i=>`_${i.toLowerCase()}`)}`}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=y({name:"serviceToTranslationString",type:t,pure:!0})}return t})();function h0(t,s){t&1&&(a(0),d(1,"translate")),t&2&&C(" (",p(1,1,"settings.display.menu_default"),") ")}function x0(t,s){if(t&1&&(l(0,"option",30),a(1),d(2,"serviceToTranslationString"),d(3,"translate"),_(4,h0,2,3),r()),t&2){let e=s.$implicit,n=B(2);N("value",e),o(),C(" ",p(3,5,p(2,3,e))," "),o(3),S(e===n.service.type?4:-1)}}function g0(t,s){if(t&1){let e=L();l(0,"li",8)(1,"label",27),a(2),d(3,"translate"),l(4,"span",28),a(5),d(6,"translate"),r()(),l(7,"div",10)(8,"select",29),H("ngModelChange",function(i){R(e);let c=B();return w(c.service.customType,i)||(c.service.customType=i),M(i)}),x(9,x0,5,7,"option",30,h),r()()()}if(t&2){let e=B();o(2),C(" ",p(3,3,"accessories.custom_type")," "),o(3),u(p(6,5,"common.labels.beta")),o(3),V("ngModel",e.service.customType),o(),g(e.customTypeList.sort())}}function I0(t,s){if(t&1){let e=L();l(0,"li",12)(1,"span",13),a(2),d(3,"translate"),r(),l(4,"div",14)(5,"input",31),d(6,"translate"),H("ngModelChange",function(i){R(e);let c=B();return w(c.service.onDashboard,i)||(c.service.onDashboard=i),M(i)}),r(),I(7,"label",32),r()()}if(t&2){let e=B();o(2),u(p(3,3,"accessories.show_on_dashboard")),o(3),V("ngModel",e.service.onDashboard),v("aria-label",p(6,5,"accessories.show_on_dashboard"))}}function v0(t,s){if(t&1){let e=L();l(0,"span",37),D("click",function(){R(e);let i=B().$implicit,c=B();return M(c.toggleDetailsVisibility(i))}),a(1),r()}if(t&2){let e=B().$implicit,n=B();v("aria-expanded",n.isDetailsVisible[e.uuid]),o(),u(e.description)}}function D0(t,s){if(t&1&&a(0),t&2){let e=B().$implicit;C(" ",e.description," ")}}function R0(t,s){if(t&1&&(l(0,"div"),a(1),r()),t&2){let e=B(2).$implicit;o(),C("Step: ",e.minStep)}}function M0(t,s){if(t&1&&(l(0,"div"),a(1),r()),t&2){let e=B(2).$implicit;o(),C("Min: ",e.minValue)}}function L0(t,s){if(t&1&&(l(0,"div"),a(1),r()),t&2){let e=B(2).$implicit;o(),C("Max: ",e.maxValue)}}function F0(t,s){t&1&&a(0," \xB7 ")}function N0(t,s){if(t&1&&(a(0),_(1,F0,1,0)),t&2){let e=s.$implicit,n=s.$index,i=s.$count;C(" ",e," "),o(),S(n!==i-1?1:-1)}}function O0(t,s){if(t&1&&(l(0,"div"),a(1," Valid: "),x(2,N0,2,2,null,null,h),r()),t&2){let e=B(2).$implicit;o(2),g(e.validValues)}}function b0(t,s){if(t&1&&(l(0,"div",34),_(1,R0,2,1,"div"),_(2,M0,2,1,"div"),_(3,L0,2,1,"div"),_(4,O0,4,0,"div"),r()),t&2){let e=B().$implicit;o(),S("minStep"in e?1:-1),o(),S("minValue"in e?2:-1),o(),S("maxValue"in e?3:-1),o(),S("validValues"in e?4:-1)}}function P0(t,s){t&1&&a(0," Value: ")}function V0(t,s){if(t&1&&a(0),t&2){let e=B().$implicit;C(" ",e.value,"% ")}}function w0(t,s){if(t&1&&(a(0),d(1,"convertTemp")),t&2){let e=B().$implicit,n=B();C(" ",p(1,1,n.Number(e.value)),"\xB0 ")}}function H0(t,s){if(t&1&&(a(0),d(1,"convertMired")),t&2){let e=B(2).$implicit;C(" ",p(1,1,e.value)," ")}}function U0(t,s){if(t&1&&a(0),t&2){let e=B(2).$implicit;C(" ",e.value," ")}}function k0(t,s){if(t&1&&_(0,H0,2,3)(1,U0,1,1),t&2){let e,n=B().$implicit;S((e=n.type)==="ColorTemperature"?0:1)}}function $0(t,s){if(t&1&&(a(0),d(1,"prettify")),t&2){let e=B().$implicit,n=B();C(" (",p(1,1,n.enums[e.type][e.value]),") ")}}function W0(t,s){if(t&1&&(a(0),d(1,"translate")),t&2){let e=B().$implicit;C(" (",p(1,1,e.value?"status.widget.info.yes":"status.widget.info.no"),") ")}}function G0(t,s){if(t&1&&a(0),t&2){let e=B().$implicit;C(" ",e.value,"% ")}}function Y0(t,s){if(t&1&&(a(0),d(1,"convertTemp")),t&2){let e=B().$implicit,n=B();C(" ",p(1,1,n.Number(e.value)),"\xB0 ")}}function K0(t,s){if(t&1&&(a(0),d(1,"convertMired")),t&2){let e=B(2).$implicit;C(" ",p(1,1,e.value)," ")}}function q0(t,s){if(t&1&&a(0),t&2){let e=B(2).$implicit;C(" ",e.value," ")}}function j0(t,s){if(t&1&&_(0,K0,2,3)(1,q0,1,1),t&2){let e,n=B().$implicit;S((e=n.type)==="ColorTemperature"?0:1)}}function z0(t,s){if(t&1&&(a(0),d(1,"prettify")),t&2){let e=B().$implicit,n=B();C(" (",p(1,1,n.enums[e.type][e.value]),") ")}}function J0(t,s){if(t&1&&(a(0),d(1,"translate")),t&2){let e=B().$implicit;C(" (",p(1,1,e.value?"status.widget.info.yes":"status.widget.info.no"),") ")}}function X0(t,s){if(t&1&&(l(0,"li",19)(1,"span"),_(2,v0,2,2,"span",33)(3,D0,1,1),_(4,b0,5,4,"div",34),l(5,"div",35),_(6,P0,1,0),_(7,V0,1,1)(8,w0,2,3)(9,k0,2,1),_(10,$0,2,3)(11,W0,2,3),r()(),l(12,"span",36),_(13,G0,1,1)(14,Y0,2,3)(15,j0,2,1),_(16,z0,2,3)(17,J0,2,3),r()()),t&2){let e,n,i=s.$implicit,c=B();o(2),S("minStep"in i||"minValue"in i||"maxValue"in i||"validValues"in i?2:3),o(2),S(c.isDetailsVisible[i.uuid]?4:-1),o(2),S(c.isDetailsVisible[i.uuid]?6:-1),o(),S((e=i.unit)==="percentage"?7:e==="celsius"?8:9),o(3),S(c.enums[i.type]!=null&&c.enums[i.type][i.value]?10:i.format==="bool"?11:-1),o(3),S((n=i.unit)==="percentage"?13:n==="celsius"?14:15),o(3),S(c.enums[i.type]!=null&&c.enums[i.type][i.value]?16:i.format==="bool"?17:-1)}}function Z0(t,s){if(t&1){let e=L();l(0,"span",37),D("click",function(){R(e);let i=B().$implicit,c=B(2);return M(c.toggleDetailsVisibility(i))}),a(1),r()}if(t&2){let e=B().$implicit,n=B(2);v("aria-expanded",n.isDetailsVisible[e.uuid]),o(),u(e.description)}}function Q0(t,s){if(t&1&&a(0),t&2){let e=B().$implicit;C(" ",e.description," ")}}function ee(t,s){if(t&1&&(l(0,"div"),a(1),r()),t&2){let e=B(2).$implicit;o(),C("Step: ",e.minStep)}}function te(t,s){if(t&1&&(l(0,"div"),a(1),r()),t&2){let e=B(2).$implicit;o(),C("Min: ",e.minValue)}}function ie(t,s){if(t&1&&(l(0,"div"),a(1),r()),t&2){let e=B(2).$implicit;o(),C("Max: ",e.maxValue)}}function ne(t,s){t&1&&a(0," \xB7 ")}function oe(t,s){if(t&1&&(a(0),_(1,ne,1,0)),t&2){let e=s.$implicit,n=s.$index,i=s.$count;C(" ",e," "),o(),S(n!==i-1?1:-1)}}function ae(t,s){if(t&1&&(l(0,"div"),a(1," Valid: "),x(2,oe,2,2,null,null,h),r()),t&2){let e=B(2).$implicit;o(2),g(e.validValues)}}function re(t,s){if(t&1&&(l(0,"div",34),_(1,ee,2,1,"div"),_(2,te,2,1,"div"),_(3,ie,2,1,"div"),_(4,ae,4,0,"div"),r()),t&2){let e=B().$implicit;o(),S("minStep"in e?1:-1),o(),S("minValue"in e?2:-1),o(),S("maxValue"in e?3:-1),o(),S("validValues"in e?4:-1)}}function se(t,s){t&1&&a(0," Value: ")}function ce(t,s){if(t&1&&a(0),t&2){let e=B().$implicit;C(" ",e.value,"% ")}}function Be(t,s){if(t&1&&(a(0),d(1,"convertTemp")),t&2){let e=B().$implicit,n=B(2);C(" ",p(1,1,n.Number(e.value)),"\xB0 ")}}function le(t,s){if(t&1&&(a(0),d(1,"convertMired")),t&2){let e=B(2).$implicit;C(" ",p(1,1,e.value)," ")}}function de(t,s){if(t&1&&a(0),t&2){let e=B(2).$implicit;C(" ",e.value," ")}}function pe(t,s){if(t&1&&_(0,le,2,3)(1,de,1,1),t&2){let e,n=B().$implicit;S((e=n.type)==="ColorTemperature"?0:1)}}function me(t,s){if(t&1&&(a(0),d(1,"prettify")),t&2){let e=B().$implicit,n=B(2);C(" (",p(1,1,n.enums[e.type][e.value]),") ")}}function ue(t,s){if(t&1&&(a(0),d(1,"translate")),t&2){let e=B().$implicit;C(" (",p(1,1,e.value?"status.widget.info.yes":"status.widget.info.no"),") ")}}function Ce(t,s){if(t&1&&a(0),t&2){let e=B().$implicit;C(" ",e.value,"% ")}}function _e(t,s){if(t&1&&(a(0),d(1,"convertTemp")),t&2){let e=B().$implicit,n=B(2);C(" ",p(1,1,n.Number(e.value)),"\xB0 ")}}function Se(t,s){if(t&1&&(a(0),d(1,"convertMired")),t&2){let e=B(2).$implicit;C(" ",p(1,1,e.value)," ")}}function fe(t,s){if(t&1&&a(0),t&2){let e=B(2).$implicit;C(" ",e.value," ")}}function Ae(t,s){if(t&1&&_(0,Se,2,3)(1,fe,1,1),t&2){let e,n=B().$implicit;S((e=n.type)==="ColorTemperature"?0:1)}}function Te(t,s){if(t&1&&(a(0),d(1,"prettify")),t&2){let e=B().$implicit,n=B(2);C(" (",p(1,1,n.enums[e.type][e.value]),") ")}}function Ee(t,s){if(t&1&&(a(0),d(1,"translate")),t&2){let e=B().$implicit;C(" (",p(1,1,e.value?"status.widget.info.yes":"status.widget.info.no"),") ")}}function ye(t,s){if(t&1&&(l(0,"li",19)(1,"span"),_(2,Z0,2,2,"span",33)(3,Q0,1,1),_(4,re,5,4,"div",34),l(5,"div",35),_(6,se,1,0),_(7,ce,1,1)(8,Be,2,3)(9,pe,2,1),_(10,me,2,3)(11,ue,2,3),r()(),l(12,"span",36),_(13,Ce,1,1)(14,_e,2,3)(15,Ae,2,1),_(16,Te,2,3)(17,Ee,2,3),r()()),t&2){let e,n,i=s.$implicit,c=B(2);o(2),S("minStep"in i||"minValue"in i||"maxValue"in i||"validValues"in i?2:3),o(2),S(c.isDetailsVisible[i.uuid]?4:-1),o(2),S(c.isDetailsVisible[i.uuid]?6:-1),o(),S((e=i.unit)==="percentage"?7:e==="celsius"?8:9),o(3),S(c.enums[i.type]!=null&&c.enums[i.type][i.value]?10:i.format==="bool"?11:-1),o(3),S((n=i.unit)==="percentage"?13:n==="celsius"?14:15),o(3),S(c.enums[i.type]!=null&&c.enums[i.type][i.value]?16:i.format==="bool"?17:-1)}}function he(t,s){if(t&1&&(l(0,"ul",5)(1,"li",17)(2,"h6",18),a(3),d(4,"translate"),r()(),l(5,"li",19)(6,"span",13),a(7),d(8,"translate"),r(),l(9,"span",20),a(10),r()(),l(11,"li",19)(12,"span",13),a(13),d(14,"translate"),r(),l(15,"span",20),a(16),r()(),x(17,ye,18,7,"li",19,h),r()),t&2){let e=s.$implicit;o(3),u(p(4,5,"accessories.service_info")),o(4),u(p(8,7,"accessories.service")),o(3),u(e.humanType),o(3),u(p(14,9,"accessories.name")),o(3),u(e.serviceName),o(),g(e.serviceCharacteristics)}}function xe(t,s){if(t&1&&(l(0,"li",19)(1,"span",13),a(2),d(3,"translate"),r(),l(4,"span",20),a(5),r()()),t&2){let e=B(2);o(2),u(p(3,2,"child_bridge.config.platform")),o(3),u(e.matchedCachedAccessory.platform)}}function ge(t,s){if(t&1&&(l(0,"li",19)(1,"span",13),a(2),d(3,"translate"),r(),l(4,"span",20),a(5),r()()),t&2){let e=B(2);o(2),u(p(3,2,"child_bridge.config.accessory")),o(3),u(e.matchedCachedAccessory.accessory)}}function Ie(t,s){if(t&1&&(l(0,"li",19)(1,"span",13),a(2),d(3,"translate"),r(),l(4,"span",20),a(5),r()(),_(6,xe,6,4,"li",19),_(7,ge,6,4,"li",19)),t&2){let e=B();o(2),u(p(3,4,"accessories.plugin")),o(3),u(e.matchedCachedAccessory.plugin),o(),S(e.matchedCachedAccessory.platform?6:-1),o(),S(e.matchedCachedAccessory.accessory?7:-1)}}function ve(t,s){if(t&1&&(l(0,"li",19)(1,"span",13),a(2),r(),l(3,"span",20),a(4),r()()),t&2){let e=s.$implicit;o(2),u(e.key),o(2),u(e.value)}}function De(t,s){if(t&1&&(l(0,"li",19)(1,"span",13),a(2),d(3,"translate"),r(),l(4,"span",20),a(5),r()()),t&2){let e=B();o(2),u(p(3,2,"accessories.bridge_name")),o(3),u(e.matchedCachedAccessory.bridge)}}function Re(t,s){if(t&1){let e=L();l(0,"li",19)(1,"span",22),a(2,"UUID"),r(),l(3,"span",20),a(4),r()(),l(5,"li",38)(6,"span",13),a(7),d(8,"translate"),r(),l(9,"button",39),D("click",function(){R(e);let i=B();return M(i.removeSingleCachedAccessories())}),I(10,"i",40),r()()}if(t&2){let e=B();o(4),u(e.matchedCachedAccessory.UUID),o(3),u(p(8,2,"accessories.button_remove"))}}var S0=(()=>{class t{$activeModal=A(i0);$modal=A(U);allCustomTypeList=[["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"]];accessoryCache;pairingCache;service;isDetailsVisible={};accessoryInformation;extraServices=[];matchedCachedAccessory=null;enums=_0.Enums;customTypeList=[];ngOnInit(){this.accessoryInformation=Object.entries(this.service.accessoryInformation).map(([e,n])=>({key:e,value:n})),this.matchedCachedAccessory=this.matchToCachedAccessory(),this.service.type==="LockMechanism"&&Object.values(this.service.linkedServices).filter(e=>e.type==="LockManagement").forEach(e=>this.extraServices.push(e)),this.customTypeList=[...new Set(this.allCustomTypeList.filter(e=>e.includes(this.service.type)).flat())],this.service.customType||(this.service.customType=this.service.type)}removeSingleCachedAccessories(){this.$activeModal.close();let e=this.$modal.open(l0,{size:"lg",backdrop:"static"});e.componentInstance.selectedBridge=this.service.instance.username.replaceAll(":","")}toggleDetailsVisibility(e){("minStep"in e||"minValue"in e||"maxValue"in e||"validValues"in e)&&(this.isDetailsVisible[e.uuid]=!this.isDetailsVisible[e.uuid])}dismissModal(){this.$activeModal.dismiss("Dismiss")}matchToCachedAccessory(){let e=this.service.instance.username,n=this.pairingCache.find(i=>i._username===e);if(n){let i=n._main?"cachedAccessories":`cachedAccessories.${n._id}`,c=this.accessoryCache.filter(m=>m.$cacheFile===i);if(c.length){let m=this.service.accessoryInformation.Name,f=this.service.accessoryInformation["Serial Number"],E=c.filter(f0=>{let W=f0.services.find(F=>F.constructorName==="AccessoryInformation"),A0=W.characteristics.find(F=>F.displayName==="Name"),T0=W.characteristics.find(F=>F.displayName==="Serial Number");return A0.value===m&&T0.value===f});if(E.length===1)return Y(G({},E[0]),{bridge:n.name})}}}Number=Number;static \u0275fac=function(n){return new(n||t)};static \u0275cmp=q({type:t,selectors:[["ng-component"]],inputs:{accessoryCache:"accessoryCache",pairingCache:"pairingCache",service:"service"},decls:97,vars:60,consts:[[1,"modal-content"],[1,"modal-header"],[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-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,"list-group","list-group-box","mb-0"],[1,"text-start","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,"badge","badge-primary","ms-1"],[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,"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,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"btn","btn-primary","m-0","ms-3",3,"click"],[1,"fas","fa-fw","fa-arrow-right"]],template:function(n,i){n&1&&(l(0,"div",0)(1,"div",1)(2,"h5",2),a(3),r(),l(4,"button",3),d(5,"translate"),D("click",function(){return i.dismissModal()}),r()(),l(6,"div",4)(7,"ul",5)(8,"li",6),I(9,"span",7),d(10,"translate"),I(11,"br")(12,"span",7),d(13,"translate"),r(),l(14,"li",8)(15,"label",9),a(16),d(17,"translate"),r(),l(18,"div",10)(19,"input",11),D("ngModelChange",function(m){return i.service.customName=m}),r()()(),_(20,g0,11,7,"li",8),l(21,"li",12)(22,"span",13),a(23),d(24,"translate"),r(),l(25,"div",14)(26,"input",15),d(27,"translate"),H("ngModelChange",function(m){return w(i.service.hidden,m)||(i.service.hidden=m),m}),r(),I(28,"label",16),r()(),_(29,I0,8,7,"li",12),r(),l(30,"ul",5)(31,"li",17)(32,"h6",18),a(33),d(34,"translate"),r()(),l(35,"li",19)(36,"span",13),a(37),d(38,"translate"),r(),l(39,"span",20),a(40),r()(),l(41,"li",19)(42,"span",13),a(43),d(44,"translate"),r(),l(45,"span",20),a(46),r()(),x(47,X0,18,7,"li",19,h),r(),x(49,he,19,11,"ul",5,h),l(51,"ul",21)(52,"li",17)(53,"h6",18),a(54),d(55,"translate"),r()(),_(56,Ie,8,6),x(57,ve,5,2,"li",19,h),l(59,"li",19)(60,"span",13),a(61),d(62,"translate"),r(),l(63,"span",20),a(64),r()(),_(65,De,6,4,"li",19),l(66,"li",19)(67,"span",13),a(68),d(69,"translate"),r(),l(70,"span",20),a(71),r()(),l(72,"li",19)(73,"span",13),a(74),d(75,"translate"),r(),l(76,"span",20),a(77),r()(),l(78,"li",19)(79,"span",22),a(80,"aid"),r(),l(81,"span",20),a(82),r()(),l(83,"li",19)(84,"span",22),a(85,"iid"),r(),l(86,"span",20),a(87),r()(),_(88,Re,11,4),r()(),l(89,"div",23),I(90,"div",13),l(91,"div",24)(92,"button",25),d(93,"translate"),D("click",function(){return i.dismissModal()}),a(94),d(95,"translate"),r()(),I(96,"div",26),r()()),n&2&&(o(3),u(i.service.customName||i.service.serviceName),o(),v("aria-label",p(5,30,"form.button_close")),o(5),N("innerHTML",p(10,32,"accessories.only_ui"),$),o(3),N("innerHTML",p(13,34,"accessories.only_ui_2"),$),o(4),u(p(17,36,"accessories.custom_name")),o(3),N("ngModel",i.service.customName||i.service.serviceName),o(),S(i.customTypeList.length?20:-1),o(3),u(p(24,38,"accessories.hide_this_accessory")),o(3),V("ngModel",i.service.hidden),v("aria-label",p(27,40,"accessories.hide_this_accessory")),o(3),S(i.service.hidden?-1:29),o(4),u(p(34,42,"accessories.service_info")),o(4),u(p(38,44,"accessories.service")),o(3),u(i.service.humanType),o(3),u(p(44,46,"accessories.name")),o(3),u(i.service.serviceName),o(),g(i.service.serviceCharacteristics),o(2),g(i.extraServices),o(5),u(p(55,48,"accessories.accessory_info")),o(2),S(i.matchedCachedAccessory?56:-1),o(),g(i.accessoryInformation),o(4),u(p(62,50,"accessories.bridge_username")),o(3),u(i.service.instance.username),o(),S(i.matchedCachedAccessory?65:-1),o(3),u(p(69,52,"accessories.bridge_ip")),o(3),u(i.service.instance.ipAddress),o(3),u(p(75,54,"accessories.bridge_port")),o(3),u(i.service.instance.port),o(5),u(i.service.aid),o(5),u(i.service.iid),o(),S(i.matchedCachedAccessory?88:-1),o(4),v("aria-label",p(93,56,"form.button_close")),o(2),C(" ",p(95,58,"form.button_close")," "))},dependencies:[t0,Q,e0,z,j,Z,J,X,o0,m0,u0,p0,C0],encapsulation:2})}return t})();var ct=(()=>{class t{$api=A(r0);$auth=A(c0);$modal=A(U);$toastr=A(a0);$translate=A(n0);$ws=A(B0);accessoryCache=[];pairingCache=[];io;roomsOrdered=!1;hiddenTypes=["InputSource","LockManagement","CameraRTPStreamManagement","ProtocolInformation"];layoutSaved=new k;accessoryData=new k;readyForControl=!1;accessories={services:[]};rooms=[];accessoryLayout;originalLayout;constructor(){this.$auth.user.admin&&(P(this.$api.get("/server/cached-accessories")).then(e=>{this.accessoryCache=e}).catch(e=>console.error(e)),P(this.$api.get("/server/pairings")).then(e=>{this.pairingCache=e}).catch(e=>console.error(e)))}showAccessoryInformation(e){let n=this.$modal.open(S0,{size:"lg",backdrop:"static"});return n.componentInstance.service=e,n.componentInstance.accessoryCache=this.accessoryCache,n.componentInstance.pairingCache=this.pairingCache,n.result.then(()=>this.saveLayout()).catch(()=>this.saveLayout()),!1}stop(){this.io.end(),this.rooms=[],this.accessories={services:[]},this.roomsOrdered=!1,delete this.accessoryLayout,delete this.originalLayout}start(){return b(this,null,function*(){this.readyForControl=!1,this.io=this.$ws.connectToNamespace("accessories"),yield this.loadLayout(),this.io.connected?(this.io.socket.emit("get-accessories"),setTimeout(()=>{this.io.connected.subscribe(()=>{this.io.socket.emit("get-accessories")})},1e3)):this.io.connected.subscribe(()=>{this.io.socket.emit("get-accessories")}),this.io.socket.on("accessories-data",e=>{this.parseServices(e),this.generateHelpers(),this.sortIntoRooms(),this.roomsOrdered||(this.orderRooms(),this.applyCustomAttributes(),this.roomsOrdered=!0),this.accessoryData.next(e)}),this.io.socket.on("accessories-reload-required",()=>b(this,null,function*(){this.stop(),yield this.start()})),this.io.socket.on("accessory-control-failure",e=>{console.error(e),this.$toastr.error(e,this.$translate.instant("toast.title_error"))}),this.io.socket.on("accessories-ready-for-control",()=>{this.readyForControl=!0})})}saveLayout(){let e=this.rooms.map(n=>({name:n.name,services:n.services.map(i=>({uniqueId:i.uniqueId,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(e),this.io.request("save-layout",{user:this.$auth.user.username,layout:this.accessoryLayout}).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 b(this,null,function*(){this.accessoryLayout=yield P(this.io.request("get-layout",{user:this.$auth.user.username})),this.originalLayout=JSON.parse(JSON.stringify(this.accessoryLayout)),this.rooms=this.accessoryLayout.map(e=>({name:e.name,services:[]}))})}mergeWithUndiscoveredServices(e){if(!this.originalLayout)return e;let n=new Set;e.forEach(c=>{c.services.forEach(m=>{n.add(m.uniqueId)})});let i=JSON.parse(JSON.stringify(e));return this.originalLayout.forEach(c=>{c.services.forEach(m=>{if(n.has(m.uniqueId))return;let f=i.find(E=>E.name===c.name);f||(f={name:c.name,services:[]},i.push(f)),f.services.push({uniqueId:m.uniqueId,aid:m.aid,iid:m.iid,uuid:m.uuid,customName:m.customName,customType:m.customType,hidden:m.hidden,onDashboard:m.onDashboard})})}),i.filter(c=>c.services.length)}parseServices(e){if(!this.accessories.services.length){this.accessories.services=e;return}e.forEach(n=>{let i=this.accessories.services.find(c=>c.uniqueId===n.uniqueId);n.type==="LockMechanism"&&this.attachLockManagementToMechanism(n),i?Object.assign(i,n):this.accessories.services.push(n)})}sortIntoRooms(){let e=new Set(this.hiddenTypes);this.accessories.services.forEach(n=>{if(e.has(n.type))return;if(n.linked&&(n.linkedServices={},n.linked.forEach(c=>{n.linkedServices[c]=this.accessories.services.find(m=>m.aid===n.aid&&m.iid===c&&m.instance.username===n.instance.username)})),!this.rooms.find(c=>c.services.find(m=>m.uniqueId===n.uniqueId))){let c=this.accessoryLayout.find(m=>m.services.find(f=>f.uniqueId===n.uniqueId));if(c)this.rooms.find(m=>m.name===c.name).services.push(n);else{let m=this.rooms.find(f=>f.name==="Default Room");m?m.services.push(n):this.rooms.push({name:"Default Room",services:[n]})}}})}orderRooms(){this.rooms.forEach(e=>{let n=this.accessoryLayout.find(i=>i.name===e.name);e.services.sort((i,c)=>{let m=n.services.findIndex(E=>E.uniqueId===i.uniqueId),f=n.services.findIndex(E=>E.uniqueId===c.uniqueId);return m<f?-1:m>f?1:0})})}applyCustomAttributes(){this.rooms.forEach(e=>{let n=this.accessoryLayout.find(i=>i.name===e.name);e.services.forEach(i=>{let c=n.services.find(m=>m.uniqueId===i.uniqueId);Object.assign(i,c)})})}generateHelpers(){this.accessories.services.forEach(e=>{e.getCharacteristic||(e.getCharacteristic=n=>{let i=e.serviceCharacteristics.find(c=>c.type===n);return i?(i.setValue=c=>new Promise(m=>(this.readyForControl||m(void 0),this.io.socket.emit("accessory-control",{set:{uniqueId:e.uniqueId,aid:e.aid,siid:e.iid,iid:i.iid,value:c}}),m(void 0))),i):null})})}attachLockManagementToMechanism(e){let n=[],i=[];for(let c of this.accessories.services)c.type==="LockMechanism"&&c.accessoryInformation.Name===e.accessoryInformation.Name&&c.accessoryInformation["Serial Number"]===e.accessoryInformation["Serial Number"]?n.push(c):c.type==="LockManagement"&&c.accessoryInformation.Name===e.accessoryInformation.Name&&c.accessoryInformation["Serial Number"]===e.accessoryInformation["Serial Number"]&&i.push(c);if(n.length===1&&i.length===1){let c=i[0];e.linkedServices||(e.linkedServices={}),e.linkedServices[c.iid]=c}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=K({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{p0 as a,m0 as b,ct as c};
@@ -0,0 +1 @@
1
+ import{g as i}from"./chunk-MDV2S56W.js";import{Xa as e,fa as t}from"./chunk-3LEW5FOJ.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-P6VGWWMV.js").then(o=>o.DockerModule)},{path:"linux",loadChildren:()=>import("./chunk-MODJOHCZ.js").then(o=>o.LinuxModule)},{path:"terminal",loadChildren:()=>import("./chunk-YWY6NRRB.js").then(o=>o.TerminalModule)}],l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[i.forChild(d),i]})}return o})();var p=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[l]})}return o})();export{p as PlatformToolsModule};
@@ -0,0 +1,20 @@
1
+ import{a as xe}from"./chunk-5WYRGCHF.js";import{b as B,e as Ce,f as ve,g as Pe}from"./chunk-TXNEVPOK.js";import{a as be,b as _e}from"./chunk-M7Q6VBJE.js";import{a as we}from"./chunk-KNZTEJFP.js";import{a as je}from"./chunk-KXMDG63G.js";import{m as ue,n as he,t as D}from"./chunk-BQMDK4YS.js";import{B as pe,C as ge,c as ce,e as me,l as fe}from"./chunk-AM53KSWA.js";import{b as I,d as O}from"./chunk-MDV2S56W.js";import{b as ye}from"./chunk-5RI5TLFW.js";import{k as R,l as j,n as P,q as H}from"./chunk-FB6OF4XR.js";import{Db as S,Gb as b,Ib as m,Jc as le,La as r,Pa as ee,Qc as de,Tb as ne,Vb as _,Wa as A,Wb as k,Xb as T,a as G,ac as re,b as Q,bc as se,cc as ae,d as X,g as Z,h as C,hc as z,ja as p,kb as w,lb as v,mb as x,mc as s,nc as l,oa as u,ob as te,oc as K,pa as h,pb as ie,qb as oe,rb as g,sb as a,tb as d,ub as f,w as $}from"./chunk-3LEW5FOJ.js";var $e=Z(Pe(),1);var Ee=Z(je(),1);var Se=(n,y)=>({"fa-trash":n,"fa-cog fa-spin":y});function Oe(n,y){n&1&&(a(0,"div",13),f(1,"i",20),d())}function He(n,y){if(n&1){let e=S();a(0,"li",9)(1,"span"),_(2),s(3,"date"),f(4,"br"),a(5,"span",21),_(6),s(7,"date"),d()(),a(8,"span",22)(9,"button",25),s(10,"translate"),s(11,"translate"),b("click",function(){let i=u(e).$implicit,o=m(2);return h(o.restore(i.id))}),f(12,"i",26),d(),a(13,"button",27),s(14,"translate"),s(15,"translate"),b("click",function(){let i=u(e).$implicit,o=m(2);return h(o.download(i.id))}),f(16,"i",28),d(),a(17,"button",23),s(18,"translate"),s(19,"translate"),b("click",function(){let i=u(e).$implicit,o=m(2);return h(o.delete(i.id))}),f(20,"i",24),d()()()}if(n&2){let e=y.$implicit,t=m(2);r(2),T(" ",K(3,15,e.timestamp,"mediumDate")),r(4),k(K(7,18,e.timestamp,"shortTime")),r(3),g("disabled",t.clicked||t.deleting)("ngbTooltip",l(10,21,"config.restore.copy_to_editor"))("openDelay",150),w("aria-label",l(11,23,"config.restore.copy_to_editor")),r(4),g("disabled",t.clicked||t.deleting)("ngbTooltip",l(14,25,"form.button_download"))("openDelay",150),w("aria-label",l(15,27,"form.button_download")),r(4),g("disabled",t.clicked||t.deleting)("ngbTooltip",l(18,29,"form.button_delete"))("openDelay",150),w("aria-label",l(19,31,"form.button_delete")),r(3),g("ngClass",z(33,Se,e.id!==t.deleting,e.id===t.deleting))}}function Ne(n,y){if(n&1){let e=S();a(0,"ul",14),ie(1,He,21,36,"li",9,te),a(3,"li",9)(4,"span"),_(5),s(6,"translate"),f(7,"br"),a(8,"span",21),_(9),s(10,"translate"),d()(),a(11,"span",22)(12,"button",23),s(13,"translate"),s(14,"translate"),b("click",function(){u(e);let i=m();return h(i.deleteAllBackups())}),f(15,"i",24),d()()()()}if(n&2){let e=m();r(),oe(e.backupList),r(4),T(" ",l(6,7,"form.button_delete_all")),r(4),T(" ",l(10,9,"common.labels.no_confirmation")," "),r(3),g("disabled",e.clicked||e.deleting)("ngbTooltip",l(13,11,"form.button_delete_all"))("openDelay",150),w("aria-label",l(14,13,"form.button_delete")),r(3),g("ngClass",z(15,Se,e.deleting!=="all",e.deleting==="all"))}}var ke=(()=>{class n{$activeModal=p(ue);$api=p(H);$route=p(I);$router=p(O);$toastr=p(P);$translate=p(R);currentConfig;fromSettings=!1;loading=!0;backupList=[];clicked=!1;deleting=null;ngOnInit(){this.getConfigBackups()}getConfigBackups(){return C(this,null,function*(){try{let e=yield $(this.$api.get("/config-editor/backups"));this.loading=!1,this.backupList=e}catch(e){this.loading=!1,console.error(e),this.$toastr.error(e.error?.message||e.message,this.$translate.instant("toast.title_error")),this.dismissModal()}})}restore(e){return this.$activeModal.close(e)}download(e){return C(this,null,function*(){this.clicked=!0;try{let t=yield $(this.$api.get(`/config-editor/backups/${e}`)),i=JSON.stringify(t,null,4),o=new Blob([i],{type:"application/json"}),E=`config-backup-${e}.json`;(0,Ee.saveAs)(o,E),this.clicked=!1}catch(t){this.clicked=!1,this.$toastr.error(t.error?.message||t.message,this.$translate.instant("toast.title_error")),console.error(t)}})}downloadCurrentConfig(){let e=`data:text/json;charset=utf-8,${encodeURIComponent(this.currentConfig)}`,t=document.createElement("a");t.setAttribute("href",e),t.setAttribute("download","config.json"),document.body.appendChild(t),t.click(),t.remove()}delete(e){return C(this,null,function*(){this.deleting=e;try{yield $(this.$api.delete(`/config-editor/backups/${e}`)),yield this.getConfigBackups(),this.deleting=null}catch(t){this.deleting=null,this.$toastr.error(t.error?.message||t.message,this.$translate.instant("toast.title_error")),console.error(t)}})}deleteAllBackups(){return C(this,null,function*(){this.deleting="all";try{yield $(this.$api.delete("/config-editor/backups")),this.$toastr.success(this.$translate.instant("config.restore.toast_backups_deleted"),this.$translate.instant("toast.title_success")),this.backupList=[],this.deleting=null}catch(e){this.$toastr.error(e.error?.message||e.message,this.$translate.instant("toast.title_error")),console.error(e),this.deleting=null}})}dismissModal(){this.fromSettings&&this.$router.navigate(["/settings"],{relativeTo:this.$route}),this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=A({type:n,selectors:[["ng-component"]],inputs:{currentConfig:"currentConfig",fromSettings:"fromSettings"},decls:40,vars:31,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click","disabled"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-history","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"grey-text"],[1,"btn","btn-primary","m-0","ms-3",3,"click","disabled"],[1,"fas","fa-fw","fa-arrow-right"],[1,"text-center","primary-text"],[1,"list-group","list-group-box","mt-3"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-end"],[1,"fa","fa-fw","fa-cog","fa-spin","mt-3",2,"font-size","75px"],[1,"grey-text","small"],[2,"display","flex","flex-wrap","nowrap"],["placement","bottom","container","modal","triggers","hover",1,"btn","btn-danger","m-0","ms-2",3,"click","disabled","ngbTooltip","openDelay"],[1,"fas","fa-fw",3,"ngClass"],["placement","bottom","container","modal","triggers","hover",1,"btn","btn-primary","m-0","ms-3",3,"click","disabled","ngbTooltip","openDelay"],[1,"fas","fa-fw","fa-history"],["placement","bottom","container","modal","triggers","hover",1,"btn","btn-primary","m-0","ms-2",3,"click","disabled","ngbTooltip","openDelay"],[1,"fas","fa-fw","fa-download"]],template:function(t,i){t&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),_(3),s(4,"translate"),d(),a(5,"button",3),s(6,"translate"),b("click",function(){return i.dismissModal()}),d()(),a(7,"div",4)(8,"div",5),f(9,"i",6),d(),a(10,"ul",7)(11,"li"),_(12),s(13,"translate"),d(),a(14,"li"),_(15),s(16,"translate"),d()(),a(17,"ul",8)(18,"li",9)(19,"div")(20,"span"),_(21),s(22,"translate"),d(),f(23,"br"),a(24,"small",10),_(25),s(26,"translate"),d()(),a(27,"button",11),s(28,"translate"),b("click",function(){return i.downloadCurrentConfig()}),f(29,"i",12),d()()(),v(30,Oe,2,0,"div",13)(31,Ne,16,18,"ul",14),d(),a(32,"div",15),f(33,"div",16),a(34,"div",17)(35,"button",18),s(36,"translate"),b("click",function(){return i.dismissModal()}),_(37),s(38,"translate"),d()(),f(39,"div",19),d()()),t&2&&(r(3),k(l(4,13,"config.restore.title")),r(2),g("disabled",i.clicked||i.deleting),w("aria-label",l(6,15,"form.button_close")),r(7),k(l(13,17,"config.restore.help_1")),r(3),k(l(16,19,"config.restore.help_2")),r(6),k(l(22,21,"form.button_download")),r(4),k(l(26,23,"config.restore.download")),r(2),g("disabled",i.clicked||i.deleting),w("aria-label",l(28,25,"backup.backup_now")),r(3),x(i.loading?30:i.backupList.length?31:-1),r(5),g("disabled",i.clicked||i.deleting),w("aria-label",l(36,27,"form.button_close")),r(2),T(" ",l(38,29,"form.button_close")," "))},dependencies:[D,le,ge,de,j],encapsulation:2})}return n})();function qe(n,y){if(n&1){let e=S();a(0,"button",13),s(1,"translate"),s(2,"translate"),b("click",function(){u(e);let i=m();return h(i.onCancelRestore())}),f(3,"i",14),d()}if(n&2){let e=m();g("disabled",e.saveInProgress)("openDelay",150)("ngbTooltip",l(1,4,"form.button_cancel")),w("aria-label",l(2,6,"form.button_cancel"))}}function Fe(n,y){if(n&1){let e=S();a(0,"button",15),s(1,"translate"),s(2,"translate"),b("click",function(){u(e);let i=m();return h(i.onRestore())}),f(3,"i",16),d()}n&2&&(g("openDelay",150)("ngbTooltip",l(1,3,"form.button_restore")),w("aria-label",l(2,5,"form.button_restore")))}function Je(n,y){if(n&1){let e=S();a(0,"button",15),s(1,"translate"),s(2,"translate"),b("click",function(){u(e);let i=m();return h(i.toggleSideBySide())}),f(3,"i",17),d()}if(n&2){let e=m();g("openDelay",150)("ngbTooltip",l(1,7,e.renderSideBySide?"config.restore.view_inline":"config.restore.view_side_by_side")),w("aria-label",l(2,9,e.renderSideBySide?"config.restore.view_inline":"config.restore.view_side_by_side")),r(3),ne("fa-columns",!e.renderSideBySide)("fa-bars",e.renderSideBySide)}}function Le(n,y){n&1&&f(0,"i",8)}function Ue(n,y){n&1&&f(0,"i",9)}function ze(n,y){if(n&1){let e=S();a(0,"ngx-monaco-editor",18),b("onInit",function(i){u(e);let o=m();return h(o.onEditorInit(i))})("keydown.control.s",function(i){u(e);let o=m();return i.preventDefault(),h(o.onSave())})("keydown.meta.s",function(i){u(e);let o=m();return i.preventDefault(),h(o.onSave())}),d()}if(n&2){let e=m();g("options",e.editorOptions)("model",e.monacoEditorModel)}}function Ke(n,y){if(n&1){let e=S();a(0,"ngx-monaco-diff-editor",19),b("onInit",function(i){u(e);let o=m();return h(o.onInitDiffEditor(i))})("keydown.control.s",function(i){u(e);let o=m();return i.preventDefault(),h(o.onSave())})("keydown.meta.s",function(i){u(e);let o=m();return i.preventDefault(),h(o.onSave())}),d()}if(n&2){let e=m();g("options",e.editorOptions)("originalModel",e.diffOriginalModel)("modifiedModel",e.diffModifiedModel)}}function We(n,y){if(n&1){let e=S();a(0,"textarea",20),ae("ngModelChange",function(i){u(e);let o=m();return se(o.homebridgeConfig,i)||(o.homebridgeConfig=i),h(i)}),_(1," "),d()}if(n&2){let e=m();re("ngModel",e.homebridgeConfig)}}var $t=(()=>{class n{$api=p(H);$md=p(we);$modal=p(he);$monacoEditor=p(xe);$route=p(I);$renderer=p(ee);$router=p(O);$settings=p(ye);$toastr=p(P);$translate=p(R);editorDecorations=[];lastHeight;visualViewPortEventCallback;latestSavedConfig;childBridgesToRestart=[];hbPendingRestart=!1;homebridgeConfig;originalConfig;saveInProgress;isMobile=!1;monacoEditor;editorOptions;monacoEditorModel;diffOriginalModel;diffModifiedModel;renderSideBySide=!1;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"json",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light",renderSideBySide:this.renderSideBySide,renderIndicators:!0,ignoreTrimWhitespace:!1,glyphMargin:!0};let e=document.querySelector(".content");this.$renderer.setStyle(e,"height","100%"),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(i=>{this.homebridgeConfig=i.config,this.latestSavedConfig=JSON.parse(i.config),this.diffModifiedModel&&this.updateDiffModels()}),this.monacoEditorModel={value:"{}",language:"json",uri:window.monaco?window.monaco.Uri.parse("a://homebridge/config.json"):void 0},this.diffOriginalModel={code:"",language:"json"},this.diffModifiedModel={code:this.homebridgeConfig||"{}",language:"json"},window.monaco?this.setMonacoEditorModel():this.$monacoEditor.readyEvent.subscribe({next:()=>this.setMonacoEditorModel()});let{action:t}=this.$router.parseUrl(this.$router.url).queryParams;if(t){switch(t){case"restore":{this.onRestore(!0);break}}this.$router.navigate([],{queryParams:{},replaceUrl:!0,queryParamsHandling:"",relativeTo:this.$route})}}onEditorInit(e){window.editor=e,this.monacoEditor=e,this.monacoEditor.getModel().setValue(this.homebridgeConfig)}onInitDiffEditor(e){this.monacoEditor=e.getModifiedEditor(),this.updateDiffModels(),window.editor=e}updateDiffModels(){if(this.diffOriginalModel&&(this.diffOriginalModel.code=this.originalConfig||""),this.diffModifiedModel&&(this.diffModifiedModel.code=this.homebridgeConfig||"{}"),window.editor&&window.editor.getOriginalEditor){let e=window.editor.getOriginalEditor(),t=window.editor.getModifiedEditor();if(e&&t){let i=e.getModel(),o=t.getModel();i&&i.setValue(this.originalConfig||""),o&&o.setValue(this.homebridgeConfig||"{}")}}}onSave(){return C(this,null,function*(){if(!this.saveInProgress){this.monacoEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[])),this.saveInProgress=!0;try{if(!this.isMobile){yield this.monacoEditor.getAction("editor.action.formatDocument").run();let t=window.monaco.editor.getModelMarkers({owner:"json"});for(let i of t)if(i.message==="Duplicate object key"){this.saveInProgress=!1,this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"));return}this.homebridgeConfig=this.monacoEditor.getModel().getValue()}let e=this.parseConfigFromEditor();this.homebridgeConfig=JSON.stringify(e,null,4),typeof e.bridge!="object"?this.$toastr.error(this.$translate.instant("config.config_bridge_missing"),this.$translate.instant("toast.title_error")):/^(?:[0-9A-F]{2}:){5}[0-9A-F]{2}$/i.test(e.bridge.username)?e.accessories&&!Array.isArray(e.accessories)?this.$toastr.error(this.$translate.instant("config.config_accessory_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&!Array.isArray(e.platforms)?this.$toastr.error(this.$translate.instant("config.config_platform_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&Array.isArray(e.platforms)&&!this.validateSection(e.platforms,"platform")||e.accessories&&Array.isArray(e.accessories)&&!this.validateSection(e.accessories,"accessory")||e.plugins&&Array.isArray(e.plugins)&&!this.validatePlugins(e.plugins,"plugins")||e.disabledPlugins&&Array.isArray(e.disabledPlugins)&&!this.validatePlugins(e.disabledPlugins,"disabledPlugins")||(yield this.saveConfig(e),this.originalConfig=""):this.$toastr.error(this.$translate.instant("config.config_username_error"),this.$translate.instant("toast.title_error"))}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}onRestore(e=!1){let t=this.$modal.open(ke,{size:"lg",backdrop:"static"});t.componentInstance.currentConfig=this.homebridgeConfig,t.componentInstance.fromSettings=e,t.result.then(i=>{this.originalConfig||(this.originalConfig=this.homebridgeConfig,this.updateDiffModels()),this.$api.get(`/config-editor/backups/${i}`).subscribe({next:o=>{this.$toastr.info(this.$translate.instant("config.restore.confirm"),this.$translate.instant("config.title_backup_loaded")),this.homebridgeConfig=JSON.stringify(o,null,4),this.updateDiffModels(),this.monacoEditor&&window.editor.modifiedEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[]),this.monacoEditor.executeEdits("beautifier",[{identifier:"delete",range:new monaco.Range(1,1,this.monacoEditor.getModel().getLineCount()+10,1),text:"",forceMoveMarkers:!0}]),this.monacoEditor.executeEdits("beautifier",[{identifier:"insert",range:new monaco.Range(1,1,1,1),text:this.homebridgeConfig,forceMoveMarkers:!0}]))},error:o=>{console.error(o),this.$toastr.error(o.error?.message||this.$translate.instant("backup.load_error"),this.$translate.instant("toast.title_error"))}})}).catch(()=>{})}onCancelRestore(){if(window.editor&&window.editor.dispose)try{window.editor.dispose(),window.editor=void 0}catch{}this.homebridgeConfig=this.originalConfig,this.originalConfig="",this.renderSideBySide&&this.toggleSideBySide(),this.updateDiffModels(),this.onRestore()}toggleSideBySide(){this.renderSideBySide=!this.renderSideBySide,this.editorOptions=Q(G({},this.editorOptions),{renderSideBySide:this.renderSideBySide})}ngOnDestroy(){let e=document.querySelector(".content");this.$renderer.removeStyle(e,"height"),window.visualViewport&&(window.visualViewport.removeEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.enableTouchMove());try{if(window.editor&&window.editor.dispose&&(window.editor.dispose(),window.editor=void 0),window.monaco){let t=window.monaco.Uri.parse("file:///original.json"),i=window.monaco.Uri.parse("file:///modified.json"),o=window.monaco.editor.getModel(t);o&&o.dispose();let E=window.monaco.editor.getModel(i);E&&E.dispose()}this.monacoEditor&&this.monacoEditor.dispose()}catch{}}validateSection(e,t){for(let i of e){if(typeof i!="object"||Array.isArray(i))return this.$toastr.error(this.$translate.instant("config.error_blocks_objects",{type:t}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(i),!1;if(!i[t])return this.$toastr.error(this.$translate.instant("config.error_blocks_type",{type:t}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(i),!1;if(typeof i[t]!="string")return this.$toastr.error(this.$translate.instant("config.error_string_type",{type:t}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(i),!1}return!0}validatePlugins(e,t){for(let i of e)if(typeof i!="string")return this.$toastr.error(this.$translate.instant("config.error_string_array",{key:t}),this.$translate.instant("toast.title_error")),!1;return!0}highlightOffendingArrayItem(e){this.monacoEditor&&(e=JSON.stringify(e,null,4).split(`
2
+ `).map(t=>` ${t}`).join(`
3
+ `),setTimeout(()=>{let t=this.monacoEditor.getModel().findMatches(e);if(t.length){let i=t[0].range,o=new monaco.Range(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn);this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[{range:o,options:{isWholeLine:!0,linesDecorationsClassName:"hb-monaco-editor-line-error"}}])}},200))}setMonacoEditorModel(){if(window.monaco.languages.json.jsonDefaults.diagnosticsOptions.schemas.some(t=>t.uri==="http://homebridge/config.json"))return;let e=monaco.Uri.parse("a://homebridge/config.json");window.monaco.languages.json.jsonDefaults.setDiagnosticsOptions({allowComments:!1,validate:!0,schemas:[{uri:"http://homebridge/config.json",fileMatch:[e.toString()],schema:{type:"object",required:["bridge"],properties:{bridge:{type:"object",required:["name","username","port","pin"],properties:{name:{type:"string",description:`The Homebridge instance name.
4
+ This should be unique if you are running multiple instances of Homebridge.`,default:"Homebridge"},username:{type:"string",description:`Homebridge username must be 6 pairs of colon-separated hexadecimal characters (A-F 0-9).
5
+ You should change this pin if you need to re-pair your instance with HomeKit.
6
+ Example: 0E:89:49:64:91:86`,default:"0E:89:49:64:91:86",pattern:"^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$"},port:{type:"number",description:`The port Homebridge listens on.
7
+ If running more than one instance of Homebridge on the same server make sure each instance is given a unique port.`,default:51173,minimum:1025,maximum:65534},pin:{type:"string",description:`The Homebridge instance pin.
8
+ This is used when pairing Homebridge to HomeKit.
9
+ Example: 630-27-655`,default:"630-27-655",pattern:"^([0-9]{3}-[0-9]{2}-[0-9]{3})$"},manufacturer:{type:"string",description:"The bridge manufacturer to be displayed in HomeKit"},firmwareRevision:{type:"string",description:"The bridge firmware version to be displayed in HomeKit"},model:{type:"string",description:"The bridge model to be displayed in HomeKit"},bind:{description:`A string or an array of strings with the name(s) of the network interface(s) Homebridge should bind to.
10
+
11
+ Requires Homebridge v1.3 or later.`,type:["string","array"],items:{type:"string",description:"Network Interface name that Homebridge should bind to."}}},default:{name:"Homebridge",username:"0E:89:49:64:91:86",port:51173,pin:"6302-7655"}},mdns:{type:"object",properties:{interface:{type:"string",description:`The interface or IP address of the interface you want Homebridge to listen on. This is useful if your server has multiple interfaces.
12
+
13
+ Deprecated as of Homebridge v1.3.0 - use bridge.bind instead.`},legacyAdvertiser:{type:"boolean",description:"Set to `false` to use the new mdns library, ciao."}},default:{legacyAdvertiser:!1}},plugins:{type:"array",description:"An array of plugins that should be selectively enabled. Remove this array to enable all plugins.",items:{type:"string",description:`The full plugin npm package name.
14
+ Example: homebridge-dummy`},default:["homebridge-config-ui-x"]},disabledPlugins:{type:"array",description:`An array of plugins that should be disabled.
15
+
16
+ Requires Homebridge v1.3 or later.`,items:{type:"string",description:`The full plugin npm package name.
17
+ Example: homebridge-dummy`},default:[]},ports:{type:"object",description:"The range of ports that should be used for certain accessories like cameras and TVs",required:["start","end"],properties:{start:{type:"number",default:52100,minimum:1025,maximum:65534},end:{type:"number",default:52150,minimum:1025,maximum:65534}},default:{start:52100,end:52150}},platforms:{type:"array",description:`Any plugin that exposes a platform should have its config entered in this array.
18
+ Separate each plugin config block using a comma.`,items:{type:"object",required:["platform"],anyOf:[{type:"object",required:["platform"],properties:{platform:{type:"string",description:"This is used by Homebridge to identify which plugin this platform belongs to.",not:{enum:["config"]}},name:{type:"string",description:"The name of the platform."}}},{type:"object",properties:{platform:{type:"string",description:`Homebridge UI platform name must be set to "config".
19
+ Do Not Change!`,oneOf:[{enum:"config"}]},name:{type:"string",description:"The name used in the Homebridge log."}}}]}},accessories:{type:"array",description:`Any plugin that exposes an accessory should have its config entered in this array.
20
+ Separate each plugin config block using a comma.`,items:{type:"object",required:["accessory","name"],properties:{accessory:{type:"string",description:"This is used by Homebridge to identify which plugin this accessory belongs to."},name:{type:"string",description:"The name of the accessory."}}}}}}}]}),this.monacoEditorModel.uri=monaco.Uri.parse("a://homebridge/config.json")}visualViewPortChanged(){this.lastHeight<window.visualViewport.height&&document.activeElement.blur(),window.visualViewport.height<window.innerHeight?(this.$md.enableTouchMove(),this.lastHeight=window.visualViewport.height):window.visualViewport.height===window.innerHeight&&(this.$md.disableTouchMove(),this.lastHeight=window.visualViewport.height)}saveConfig(e){return C(this,null,function*(){try{let t=yield $(this.$api.post("/config-editor",e));this.homebridgeConfig=JSON.stringify(t,null,4),yield this.detectSavesChangesForRestart()}catch(t){console.error(t),this.$toastr.error(this.$translate.instant("config.failed_to_save_config"),this.$translate.instant("toast.title_error"))}})}validateArraysEqual(e,t){if(e.length!==t.length)return!1;let i=[...e].sort(),o=[...t].sort();return i.every((E,N)=>E===o[N])}removePlatformsAndAccessories(e){let E=e,{accessories:t,platforms:i}=E;return X(E,["accessories","platforms"])}removeEmptyBridges(e){return e.filter(t=>t._bridge&&Object.keys(t._bridge).length>0).map(t=>t._bridge)}validateBridgesEqual(e,t){return e.length!==t.length?!1:e.every(i=>t.some(o=>B(i,o)))}detectSavesChangesForRestart(){return C(this,null,function*(){let e=yield this.determineRestartType();e==="full"?yield this.performFullRestart():e==="child"&&(yield this.performChildBridgeRestart()),this.latestSavedConfig=JSON.parse(this.homebridgeConfig)})}determineRestartType(){return C(this,null,function*(){if(this.hbPendingRestart)return"full";let e=this.latestSavedConfig,t=JSON.stringify(e,null,4),i=JSON.parse(this.homebridgeConfig),o=this.homebridgeConfig;if(t===o&&!this.childBridgesToRestart.length)return this.$toastr.info(this.$translate.instant("config.no_restart"),this.$translate.instant("config.config_saved")),"none";if(!this.validateArraysEqual(Object.keys(e),Object.keys(i))||[...i.platforms||[],...i.accessories||[]].every(c=>!c._bridge||!Object.keys(c._bridge).length))return"full";let N=this.removePlatformsAndAccessories(e),Me=this.removePlatformsAndAccessories(i);if(!B(N,Me))return"full";let q=e.platforms||[],F=i.platforms||[],Te=q.map(c=>c.platform),Be=F.map(c=>c.platform);if(!this.validateArraysEqual(Te,Be))return"full";let J=e.accessories||[],L=i.accessories||[],Ve=J.map(c=>c.accessory),Ae=L.map(c=>c.accessory);if(!this.validateArraysEqual(Ve,Ae)||!this.validateBridgesEqual(this.removeEmptyBridges(q),this.removeEmptyBridges(F))||!this.validateBridgesEqual(this.removeEmptyBridges(J),this.removeEmptyBridges(L)))return"full";let W=q.filter(c=>!B(c,F.find(M=>M.platform===c.platform))),De=J.filter(c=>!B(c,L.find(M=>M.accessory===c.accessory))),Y=[...W,...De];if(W.some(c=>c.platform==="config")||Y.some(c=>c.platform==="config"?!1:!c._bridge||Object.keys(c._bridge).length===0))return"full";try{let c=yield $(this.$api.get("/status/homebridge/child-bridges"));return Y.forEach(M=>{let Re=M._bridge.username.toUpperCase(),V=c.find(({username:U})=>U===Re);if(V)this.childBridgesToRestart.some(U=>U.username===V.username)||this.childBridgesToRestart.push({name:V.name,username:V.username});else return"full"}),"child"}catch(c){return console.error("Error fetching child bridges:",c),"full"}})}performChildBridgeRestart(){return C(this,null,function*(){let e=this.$modal.open(Ce,{size:"lg",backdrop:"static"});e.componentInstance.bridges=this.childBridgesToRestart;try{yield e.result,this.childBridgesToRestart=[]}catch{}})}performFullRestart(){return C(this,null,function*(){let e=this.$modal.open(ve,{size:"lg",backdrop:"static"});try{yield e.result,this.hbPendingRestart=!1,this.childBridgesToRestart=[]}catch{this.hbPendingRestart=!0}})}parseConfigFromEditor(){try{return JSON.parse(this.homebridgeConfig)}catch{let t=$e.default.parse(this.homebridgeConfig);return this.homebridgeConfig=JSON.stringify(t,null,4),this.monacoEditor&&this.monacoEditor.getModel().setValue(this.homebridgeConfig),t}}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=A({type:n,selectors:[["ng-component"]],decls:18,vars:19,consts:[[1,"flex-column","d-flex","align-items-stretch","h-100"],[1,"row"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],["container","body","placement","bottom","triggers","hover",1,"btn","btn-danger","waves-effect","my-0","me-2",3,"disabled","openDelay","ngbTooltip"],["container","body","placement","bottom","triggers","hover",1,"btn","btn-elegant","waves-effect","my-0","me-2",3,"openDelay","ngbTooltip"],["container","body","placement","bottom","triggers","hover",1,"btn","btn-elegant","waves-effect","my-0","me-0",3,"click","disabled","openDelay","ngbTooltip"],[1,"fas","fa-fw","fa-floppy-disk"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"options","model"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"options","originalModel","modifiedModel"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-3",3,"ngModel"],["container","body","placement","bottom","triggers","hover",1,"btn","btn-danger","waves-effect","my-0","me-2",3,"click","disabled","openDelay","ngbTooltip"],[1,"fas","fa-fw","fa-times"],["container","body","placement","bottom","triggers","hover",1,"btn","btn-elegant","waves-effect","my-0","me-2",3,"click","openDelay","ngbTooltip"],[1,"fas","fa-fw","fa-history"],[1,"fas","fa-fw"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"onInit","keydown.control.s","keydown.meta.s","options","model"],[1,"flex-grow-1","h-100","w-100","mt-3","mb-0",3,"onInit","keydown.control.s","keydown.meta.s","options","originalModel","modifiedModel"],["wrap","off","autocomplete","off","autocorrect","off","autocapitalize","off","spellcheck","false",1,"hb-plain-text-editor","align-self-end","h-100","w-100","my-3",3,"ngModelChange","ngModel"]],template:function(t,i){t&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"h3",3),_(4),s(5,"translate"),d()(),a(6,"div",4),v(7,qe,4,8,"button",5),v(8,Fe,4,7,"button",6),v(9,Je,4,11,"button",6),a(10,"button",7),s(11,"translate"),s(12,"translate"),b("click",function(){return i.onSave()}),v(13,Le,1,0,"i",8),v(14,Ue,1,0,"i",9),d()()(),v(15,ze,1,2,"ngx-monaco-editor",10),v(16,Ke,1,3,"ngx-monaco-diff-editor",11),v(17,We,2,1,"textarea",12),d()),t&2&&(r(4),k(l(5,13,"menu.config_json_editor")),r(3),x(i.originalConfig?7:-1),r(),x(i.originalConfig?-1:8),r(),x(!i.isMobile&&i.originalConfig?9:-1),r(),g("disabled",i.saveInProgress)("openDelay",150)("ngbTooltip",l(11,15,"form.button_save")),w("aria-label",l(12,17,"form.button_save")),r(3),x(i.saveInProgress?-1:13),r(),x(i.saveInProgress?14:-1),r(),x(!i.isMobile&&!i.originalConfig?15:-1),r(),x(!i.isMobile&&i.originalConfig?16:-1),r(),x(i.isMobile?17:-1))},dependencies:[D,be,_e,pe,ce,me,fe,j],encapsulation:2})}return n})();export{$t as ConfigEditorComponent};