homebridge-config-ui-x 5.10.1-beta.1 → 5.11.0

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 (243) hide show
  1. package/CHANGELOG.md +17 -4
  2. package/README.md +3 -3
  3. package/dist/core/auth/auth.controller.d.ts +0 -4
  4. package/dist/core/config/config.interfaces.d.ts +0 -14
  5. package/dist/core/config/config.service.d.ts +0 -6
  6. package/dist/core/config/config.service.js +0 -8
  7. package/dist/core/config/config.service.js.map +1 -1
  8. package/dist/core/config/config.startup.js +17 -48
  9. package/dist/core/config/config.startup.js.map +1 -1
  10. package/dist/core/feature-flags/feature-flags.registry.js +0 -5
  11. package/dist/core/feature-flags/feature-flags.registry.js.map +1 -1
  12. package/dist/core/homebridge-ipc/homebridge-ipc.service.js +0 -1
  13. package/dist/core/homebridge-ipc/homebridge-ipc.service.js.map +1 -1
  14. package/dist/core/spa/spa.filter.d.ts +0 -3
  15. package/dist/core/spa/spa.filter.js +2 -22
  16. package/dist/core/spa/spa.filter.js.map +1 -1
  17. package/dist/globalDefaults.js +0 -3
  18. package/dist/globalDefaults.js.map +1 -1
  19. package/dist/main.js +4 -18
  20. package/dist/main.js.map +1 -1
  21. package/dist/modules/accessories/accessories.controller.d.ts +1 -1
  22. package/dist/modules/accessories/accessories.module.js +0 -2
  23. package/dist/modules/accessories/accessories.module.js.map +1 -1
  24. package/dist/modules/accessories/accessories.service.d.ts +3 -21
  25. package/dist/modules/accessories/accessories.service.js +17 -280
  26. package/dist/modules/accessories/accessories.service.js.map +1 -1
  27. package/dist/modules/child-bridges/child-bridges.interfaces.d.ts +0 -9
  28. package/dist/modules/config-editor/config-editor.controller.d.ts +0 -4
  29. package/dist/modules/config-editor/config-editor.controller.js +0 -64
  30. package/dist/modules/config-editor/config-editor.controller.js.map +1 -1
  31. package/dist/modules/config-editor/config-editor.service.d.ts +1 -6
  32. package/dist/modules/config-editor/config-editor.service.js +1 -45
  33. package/dist/modules/config-editor/config-editor.service.js.map +1 -1
  34. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js +1 -1
  35. package/dist/modules/custom-plugins/plugins-settings-ui/plugins-settings-ui.service.js.map +1 -1
  36. package/dist/modules/plugins/plugins.service.js +2 -16
  37. package/dist/modules/plugins/plugins.service.js.map +1 -1
  38. package/dist/modules/server/server.controller.d.ts +0 -50
  39. package/dist/modules/server/server.controller.js +2 -201
  40. package/dist/modules/server/server.controller.js.map +1 -1
  41. package/dist/modules/server/server.service.d.ts +0 -48
  42. package/dist/modules/server/server.service.js +14 -502
  43. package/dist/modules/server/server.service.js.map +1 -1
  44. package/dist/modules/status/status.gateway.d.ts +0 -2
  45. package/dist/modules/status/status.interfaces.d.ts +0 -11
  46. package/dist/modules/status/status.service.d.ts +1 -4
  47. package/dist/modules/status/status.service.js +2 -21
  48. package/dist/modules/status/status.service.js.map +1 -1
  49. package/package.json +4 -9
  50. package/public/3rdpartylicenses.txt +606 -554
  51. package/public/assets/plugin-ui-utils/ui.js +0 -3
  52. package/public/assets/plugin-ui-utils/ui.js.map +1 -1
  53. package/public/chunk-227QDXDT.js +1 -0
  54. package/public/chunk-2AF3WD4J.js +2 -0
  55. package/public/chunk-3WJDQQZL.js +4 -0
  56. package/public/chunk-4EKX3Z76.js +8 -0
  57. package/public/{chunk-U4YCHJUJ.js → chunk-53KE3XPC.js} +2 -2
  58. package/public/chunk-53KNB3HO.js +1 -0
  59. package/public/chunk-5KQ5PHZY.js +1 -0
  60. package/public/chunk-5RSQ3VKF.js +1 -0
  61. package/public/chunk-7G4CXD2O.js +5 -0
  62. package/public/chunk-A6U6HYY3.js +1 -0
  63. package/public/chunk-APMBCXUH.js +1 -0
  64. package/public/chunk-AW3MY6EQ.js +3 -0
  65. package/public/chunk-C46IEABJ.js +1 -0
  66. package/public/chunk-DEAIAR5T.js +1 -0
  67. package/public/chunk-DOEUREPX.js +1 -0
  68. package/public/chunk-E7RYLM5U.js +1 -0
  69. package/public/chunk-FDR4RMWN.js +1 -0
  70. package/public/{chunk-BMOLDRJ3.js → chunk-FHGIL4GK.js} +1 -1
  71. package/public/chunk-FK57KJRX.js +1 -0
  72. package/public/chunk-FYY57EXZ.js +5 -0
  73. package/public/chunk-G6G4X3LL.js +1 -0
  74. package/public/chunk-G6VVYCFK.js +1 -0
  75. package/public/chunk-G7S7J6DQ.js +1 -0
  76. package/public/chunk-GZU7FSYR.js +1 -0
  77. package/public/chunk-HGQJCJDV.js +1 -0
  78. package/public/chunk-HIFUKISS.js +1 -0
  79. package/public/chunk-IKDCH6SV.js +1 -0
  80. package/public/chunk-IWRD5BS2.js +1 -0
  81. package/public/{chunk-T4IEJNVJ.js → chunk-J3GNTL4X.js} +1 -1
  82. package/public/chunk-KK5HST3W.js +1 -0
  83. package/public/chunk-KO7OKSD4.js +51 -0
  84. package/public/chunk-KY3N6RBR.js +4 -0
  85. package/public/chunk-L5OY5K3Z.js +1 -0
  86. package/public/chunk-LQSXNQRY.js +1 -0
  87. package/public/chunk-NIVC55QC.js +1 -0
  88. package/public/{chunk-MS6AXMT2.js → chunk-NLVJP2FS.js} +2 -52
  89. package/public/chunk-NVYUCMZB.js +1 -0
  90. package/public/chunk-NXM6LODP.js +1 -0
  91. package/public/chunk-O5PYZ4PG.js +16 -0
  92. package/public/chunk-OQAG4MQB.js +1 -0
  93. package/public/chunk-OQLCIKGK.js +1 -0
  94. package/public/chunk-OT3OZVNB.js +50 -0
  95. package/public/chunk-PA2FLQHK.js +1 -0
  96. package/public/chunk-PD4EFNCS.js +1 -0
  97. package/public/chunk-PHY7W3BQ.js +1 -0
  98. package/public/chunk-PKVKTMRP.js +19 -0
  99. package/public/chunk-PPU3W2KO.js +1 -0
  100. package/public/chunk-QIJ6OIDU.js +1 -0
  101. package/public/chunk-REIZTIW4.js +2 -0
  102. package/public/chunk-RQOGW4OS.js +1 -0
  103. package/public/chunk-RS6FC3D3.js +1 -0
  104. package/public/chunk-S5CZBBHY.js +1 -0
  105. package/public/chunk-SQSP77TI.js +1 -0
  106. package/public/chunk-TAJT2XQ6.js +1 -0
  107. package/public/{chunk-FE43ULOM.js → chunk-U73PAFR5.js} +1 -1
  108. package/public/chunk-U77IESKH.js +1 -0
  109. package/public/chunk-UBWU2SEH.js +1 -0
  110. package/public/chunk-UGNUDJ75.js +1 -0
  111. package/public/{chunk-H7F7H5MW.js → chunk-UPB765LT.js} +1 -1
  112. package/public/chunk-W4NH2DJW.js +1 -0
  113. package/public/chunk-W5BUXVY6.js +5 -0
  114. package/public/chunk-WPMRJABD.js +1 -0
  115. package/public/{chunk-7CDYTG4I.js → chunk-WYCRIQDH.js} +1 -1
  116. package/public/chunk-YRC6JINT.js +1 -0
  117. package/public/chunk-ZC4YICGQ.js +1 -0
  118. package/public/chunk-ZUOL6YC4.js +1 -0
  119. package/public/chunk-ZWGNHKFK.js +1 -0
  120. package/public/chunk-ZXKMLKZT.js +40 -0
  121. package/public/index.html +2 -2
  122. package/public/main-WC4DXWXF.js +1 -0
  123. package/public/styles-7EFV5QBG.css +1 -0
  124. package/scripts/extract-plugin-alias.js +2 -53
  125. package/dist/core/spa/spa-html.service.d.ts +0 -5
  126. package/dist/core/spa/spa-html.service.js +0 -32
  127. package/dist/core/spa/spa-html.service.js.map +0 -1
  128. package/dist/core/ssl/ssl-cert-generator.service.d.ts +0 -15
  129. package/dist/core/ssl/ssl-cert-generator.service.js +0 -125
  130. package/dist/core/ssl/ssl-cert-generator.service.js.map +0 -1
  131. package/dist/modules/accessories/accessories.interfaces.d.ts +0 -94
  132. package/dist/modules/accessories/accessories.interfaces.js +0 -2
  133. package/dist/modules/accessories/accessories.interfaces.js.map +0 -1
  134. package/docs/matter-todo.md +0 -15
  135. package/docs/ssl-upload-pr.md +0 -103
  136. package/public/assets/matter.svg +0 -8
  137. package/public/chunk-2D7CDA3H.js +0 -1
  138. package/public/chunk-2GBZLCJW.js +0 -1
  139. package/public/chunk-33YDZRAK.js +0 -1
  140. package/public/chunk-3DG6CT5D.js +0 -2
  141. package/public/chunk-3F75CKTQ.js +0 -1
  142. package/public/chunk-3OSRGC5M.js +0 -1
  143. package/public/chunk-3UTT42KH.js +0 -1
  144. package/public/chunk-442FBVB5.js +0 -1
  145. package/public/chunk-4PPFVY5K.js +0 -1
  146. package/public/chunk-4RWLV5CJ.js +0 -1
  147. package/public/chunk-4UDSSFBN.js +0 -1
  148. package/public/chunk-4XZK5MQY.js +0 -1
  149. package/public/chunk-5S4MIY7E.js +0 -1
  150. package/public/chunk-5X5S4L7Y.js +0 -1
  151. package/public/chunk-6ELMQIBK.js +0 -1
  152. package/public/chunk-6I27GJJF.js +0 -1
  153. package/public/chunk-7DWXCRSP.js +0 -1
  154. package/public/chunk-7RJ5H5OP.js +0 -1
  155. package/public/chunk-ABQLMP2L.js +0 -1
  156. package/public/chunk-B4AJQJMI.js +0 -1
  157. package/public/chunk-BEI5QPKL.js +0 -5
  158. package/public/chunk-BEWAKOMK.js +0 -1
  159. package/public/chunk-BOW5E4YK.js +0 -50
  160. package/public/chunk-BSST5MPT.js +0 -1
  161. package/public/chunk-BSXPNFI5.js +0 -1
  162. package/public/chunk-C4IIDRJP.js +0 -1
  163. package/public/chunk-CIWR3BDK.js +0 -5
  164. package/public/chunk-CMS4LVBG.js +0 -1
  165. package/public/chunk-CO3QJQRO.js +0 -1
  166. package/public/chunk-CS2WBXWW.js +0 -1
  167. package/public/chunk-CTWHZU36.js +0 -1
  168. package/public/chunk-DAMERMP3.js +0 -1
  169. package/public/chunk-DM74WNXP.js +0 -1
  170. package/public/chunk-DMKHEJF5.js +0 -3
  171. package/public/chunk-DTFJZNTX.js +0 -1
  172. package/public/chunk-DWU5C3KH.js +0 -1
  173. package/public/chunk-EBFB2GZT.js +0 -1
  174. package/public/chunk-EEA6UA46.js +0 -2
  175. package/public/chunk-EJACNX3Z.js +0 -1
  176. package/public/chunk-GPMU3WMO.js +0 -68
  177. package/public/chunk-GWHA2DEF.js +0 -1
  178. package/public/chunk-GXD2SS6L.js +0 -1
  179. package/public/chunk-H6QDC36H.js +0 -1
  180. package/public/chunk-HAJT335F.js +0 -1
  181. package/public/chunk-HK3N2YPM.js +0 -1
  182. package/public/chunk-HLNMCR4K.js +0 -1
  183. package/public/chunk-IC6BLNW5.js +0 -1
  184. package/public/chunk-IMRVMPXI.js +0 -1
  185. package/public/chunk-IPRQGPVV.js +0 -1
  186. package/public/chunk-IVZ5ER6L.js +0 -1
  187. package/public/chunk-JRQC3M7W.js +0 -4
  188. package/public/chunk-JT7TYR5C.js +0 -1
  189. package/public/chunk-KDXCBENV.js +0 -2
  190. package/public/chunk-KGOOP2T6.js +0 -1
  191. package/public/chunk-KMSHJTEM.js +0 -1
  192. package/public/chunk-L77RLTDM.js +0 -1
  193. package/public/chunk-LCGZABYG.js +0 -1
  194. package/public/chunk-LG53BDFP.js +0 -1
  195. package/public/chunk-LJMU7UD3.js +0 -1
  196. package/public/chunk-LKNJHPL6.js +0 -1
  197. package/public/chunk-LKODOMMX.js +0 -1
  198. package/public/chunk-LUUAC57N.js +0 -1
  199. package/public/chunk-MIWSF7W2.js +0 -1
  200. package/public/chunk-MQTRL6KN.js +0 -1
  201. package/public/chunk-NP23WSXR.js +0 -1
  202. package/public/chunk-O3SZVIF6.js +0 -1
  203. package/public/chunk-ODXGF3LF.js +0 -1
  204. package/public/chunk-OPDTKONB.js +0 -1
  205. package/public/chunk-ORK6IK47.js +0 -4
  206. package/public/chunk-OZI5E5HI.js +0 -1
  207. package/public/chunk-P4KZ2HSY.js +0 -1
  208. package/public/chunk-PI4V6TBF.js +0 -1
  209. package/public/chunk-PMN4OFOP.js +0 -1
  210. package/public/chunk-Q4WN5E2X.js +0 -1
  211. package/public/chunk-QA6IRNX4.js +0 -1
  212. package/public/chunk-QGV5S3KG.js +0 -1
  213. package/public/chunk-QKEI7JJT.js +0 -1
  214. package/public/chunk-QNQ4HXBD.js +0 -1
  215. package/public/chunk-QNQIBHMP.js +0 -1
  216. package/public/chunk-R4E7RV22.js +0 -1
  217. package/public/chunk-R5Q7W4AU.js +0 -1
  218. package/public/chunk-RQG4TZOZ.js +0 -1
  219. package/public/chunk-SN3EVQDP.js +0 -1
  220. package/public/chunk-T3526HQB.js +0 -1
  221. package/public/chunk-TTPURYKZ.js +0 -1
  222. package/public/chunk-UAFCVKMR.js +0 -1
  223. package/public/chunk-UBCYUHPO.js +0 -1
  224. package/public/chunk-UJEB6C35.js +0 -1
  225. package/public/chunk-UQP4IIIX.js +0 -1
  226. package/public/chunk-URTTNRYM.js +0 -1
  227. package/public/chunk-USFURAEW.js +0 -1
  228. package/public/chunk-UVRDZGSU.js +0 -1
  229. package/public/chunk-VBTEO65F.js +0 -1
  230. package/public/chunk-WCRO6YQB.js +0 -16
  231. package/public/chunk-XL5BAQKW.js +0 -8
  232. package/public/chunk-XUAJJMQ4.js +0 -1
  233. package/public/chunk-Y67I4K2H.js +0 -1
  234. package/public/chunk-YHOHHKYL.js +0 -1
  235. package/public/chunk-ZABK6QJY.js +0 -1
  236. package/public/chunk-ZCGZM7LU.js +0 -1
  237. package/public/chunk-ZE7IZECI.js +0 -19
  238. package/public/chunk-ZGIR65XW.js +0 -1
  239. package/public/chunk-ZXID2WUA.js +0 -1
  240. package/public/main-VGG7NRKO.js +0 -1
  241. package/public/media/matter-P563JGDL.svg +0 -8
  242. package/public/styles-CT2LPGES.css +0 -1
  243. /package/public/{polyfills-NISNRVWY.js → polyfills-5KWHJ7II.js} +0 -0
@@ -1 +0,0 @@
1
- import{a as oe}from"./chunk-TUN7H57E.js";import{a as le}from"./chunk-CIWR3BDK.js";import{a as se}from"./chunk-R5Q7W4AU.js";import{a as pe}from"./chunk-IMRVMPXI.js";import{a as de}from"./chunk-3OSRGC5M.js";import{a as re}from"./chunk-T4IEJNVJ.js";import{a as we,c as ke}from"./chunk-BMOLDRJ3.js";import{a as Pt}from"./chunk-YHOHHKYL.js";import{a as Te}from"./chunk-H7F7H5MW.js";import{a as ae}from"./chunk-LUUAC57N.js";import{g as It,m as W,n as ut,t as Et}from"./chunk-BEI5QPKL.js";import{e as J,f as Wt}from"./chunk-UJEB6C35.js";import{a as B}from"./chunk-NP23WSXR.js";import"./chunk-URTTNRYM.js";import{A as ie,B as ne,C as ct,D as mt,b as dt,c as xt,e as pt,f as Gt,i as jt,j as F,k as Qt,l as St,m as qt,n as Jt,q as yt,t as Xt,u as Yt,w as Zt,x as te,y as ee}from"./chunk-QKEI7JJT.js";import{b as X}from"./chunk-RQG4TZOZ.js";import{D as O,E as N,G as z,I as Kt,J as U,h as lt,j as Ot,u as zt,v as Ut}from"./chunk-KDXCBENV.js";import{Bb as K,Cb as G,Db as j,Dc as o,Eb as _,Ec as s,F as $,Fb as a,Fc as q,Gb as r,Hb as c,Ib as b,Jb as v,Kb as R,Nc as rt,Qb as T,Qc as Nt,Rb as D,Ta as et,Ua as Vt,Wb as k,Xb as A,Ya as i,Yb as h,Zc as Ft,_c as _t,aa as w,ad as at,cb as At,cd as ht,dc as ot,ec as Ct,fc as $t,ga as I,gc as it,ha as E,hc as Q,ic as M,jc as d,kc as g,lc as C,ma as gt,mb as L,mc as Ht,n as P,qc as ft,rc as bt,sc as vt,tc as nt,uc as Dt,wc as Lt,xb as f,xc as Y,yb as m,yc as H,zb as u,zc as st}from"./chunk-JRQC3M7W.js";import{a as kt,b as Tt,g as Bt,h as y}from"./chunk-B4AJQJMI.js";var ce=(e,p)=>({"green-text":e,"grey-text":p});function Be(e,p){if(e&1){let t=T();a(0,"li",9)(1,"div",10),d(2),c(3,"br"),a(4,"small",11),c(5,"i",12),o(6,"translate"),d(7," \xB7 "),a(8,"span",13),d(9),r(),d(10),o(11,"titlecase"),r()(),a(12,"div",14)(13,"input",23),o(14,"translate"),k("click",function(){let l=I(t).$implicit,x=h();return E(x.toggleList(l._username))}),r(),c(15,"label",24),r()()}if(e&2){let t=p.$implicit,n=h();i(2),C(" ",t.name," "),i(3),M(H(18,ce,t._isPaired,!t._isPaired)),_("ngbTooltip",s(6,12,t._isPaired?"status.widget.qr_paired":"status.widget.qr_unpaired"))("openDelay",150),i(4),g(t._username),i(),C(" \xB7 ",s(11,14,t._category)," "),i(3),_("id","hidePluginUpdates_"+t._username)("checked",!n.isInList(t._username))("disabled",n.clicked),f("aria-label",s(14,16,"form.button_allow")+" "+t.name),i(2),_("for","hidePluginUpdates_"+t._username)}}function $e(e,p){e&1&&(d(0),o(1,"translate")),e&2&&C(" ",s(1,1,"form.button_save")," ")}function Fe(e,p){e&1&&c(0,"i",22)}var me=(()=>{class e{$activeModal=w(W);$api=w(U);$settings=w(X);$toastr=w(z);$translate=w(O);originalBlacklist=[];updatedBlacklist=[];existingBlacklist=[];clicked=!1;mainPairing={};pairings=[];get blacklistHasUpdated(){return this.updatedBlacklist.join(",")!==this.originalBlacklist.join(",")}ngOnInit(){return y(this,null,function*(){this.updatedBlacklist=this.existingBlacklist.map(t=>t.trim().toUpperCase()).sort((t,n)=>t.localeCompare(n)),this.originalBlacklist=[...this.updatedBlacklist];try{let t=yield P(this.$api.get("/server/pairings"));this.mainPairing=t.find(n=>n._main),this.pairings=t.filter(n=>!n._main).sort((n,l)=>n.name.localeCompare(l.name))}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error")),this.$activeModal.close()}})}toggleList(t){this.updatedBlacklist.includes(t)?this.updatedBlacklist=this.updatedBlacklist.filter(n=>n!==t):(this.updatedBlacklist.push(t),this.updatedBlacklist.sort((n,l)=>n.localeCompare(l)))}isInList(t){return this.updatedBlacklist.includes(t)}updateBlacklist(){return y(this,null,function*(){this.clicked=!0;try{yield P(this.$api.put("/config-editor/ui/accessory-control/instance-blacklist",{body:this.updatedBlacklist})),this.$settings.setEnvItem("accessoryControl.instanceBlacklist",this.updatedBlacklist),this.$activeModal.close()}catch(t){this.clicked=!1,console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=L({type:e,selectors:[["ng-component"]],inputs:{existingBlacklist:"existingBlacklist"},decls:45,vars:36,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-list-check","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mt-3","mb-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"grey-text"],["container","body","triggers","hover","placement","left",1,"fas","fa-link",3,"ngbTooltip","openDelay"],[1,"font-monospace"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","id","controlMainBridge",1,"rendux-input",3,"click","checked","disabled"],["for","controlMainBridge",1,"rendux-label","ms-3"],[1,"modal-footer","justify-content-between"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"],[1,"fas","fa-spinner","fa-pulse"],["type","checkbox",1,"rendux-input",3,"click","id","checked","disabled"],[1,"rendux-label","ms-3",3,"for"]],template:function(n,l){n&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),d(3),o(4,"translate"),r(),a(5,"button",3),o(6,"translate"),k("click",function(){return l.dismissModal()}),r()(),a(7,"div",4)(8,"div",5),c(9,"i",6),r(),a(10,"ul",7)(11,"li"),d(12),o(13,"translate"),r(),a(14,"li"),d(15),o(16,"translate"),r()(),a(17,"ul",8)(18,"li",9)(19,"div",10),d(20),c(21,"br"),a(22,"small",11),c(23,"i",12),o(24,"translate"),d(25," \xB7 "),a(26,"span",13),d(27),r(),d(28," \xB7 Homebridge "),r()(),a(29,"div",14)(30,"input",15),o(31,"translate"),k("click",function(){return l.toggleList(l.mainPairing._username)}),r(),c(32,"label",16),r()(),G(33,Be,16,21,"li",9,K),r()(),a(35,"div",17)(36,"div",10)(37,"button",18),k("click",function(){return l.dismissModal()}),d(38),o(39,"translate"),r()(),c(40,"div",19),a(41,"div",20)(42,"button",21),k("click",function(){return l.updateBlacklist()}),m(43,$e,2,3),m(44,Fe,1,0,"i",22),r()()()()),n&2&&(i(3),g(s(4,19,"settings.security.ui_control")),i(2),_("disabled",l.clicked),f("aria-label",s(6,21,"form.button_close")),i(7),g(s(13,23,"settings.security.ui_control_desc")),i(3),g(s(16,25,"settings.security.ui_control_desc_2")),i(5),C(" ",l.mainPairing.name),i(3),M(H(33,ce,l.mainPairing._isPaired,!l.mainPairing._isPaired)),_("ngbTooltip",s(24,27,l.mainPairing._isPaired?"status.widget.qr_paired":"status.widget.qr_unpaired"))("openDelay",150),i(4),g(l.mainPairing._username),i(3),_("checked",!l.isInList(l.mainPairing._username))("disabled",l.clicked),f("aria-label",s(31,29,"plugins.manage.hide_updates")),i(3),j(l.pairings),i(4),_("disabled",l.clicked),i(),C(" ",s(39,31,"form.button_close")," "),i(4),_("disabled",!l.blacklistHasUpdated||l.clicked),i(),u(l.clicked?-1:43),i(),u(l.clicked?44:-1))},dependencies:[ct,Et,N,lt],encapsulation:2})}return e})();var fe=Bt(Te(),1);var ue=Bt(we(),1),_e=Bt(ke(),1);var Pe=e=>({maxBackupSizeText:e});function Re(e,p){if(e&1&&R(0,"input",10),e&2){let t=h(2);D("value",t.selectedBackup.fileName)}}function Me(e,p){if(e&1){let t=T();b(0,"input",12),A("change",function(l){I(t);let x=h(2);return E(x.handleRestoreFileInput(l.target.files))}),v()}}function Ve(e,p){if(e&1&&(b(0,"div",4)(1,"div",7),R(2,"i",8),v(),b(3,"ul",9)(4,"li"),d(5),o(6,"translate"),v(),b(7,"li"),d(8),o(9,"translate"),v(),b(10,"li"),d(11),o(12,"translate"),v(),b(13,"li"),d(14),o(15,"translate"),v()(),m(16,Re,1,1,"input",10),m(17,Me,1,0,"input",11),v()),e&2){let t=h();i(5),g(s(6,6,"backup.restore_help_one")),i(3),g(s(9,8,"backup.restore_help_two")),i(3),g(q(12,10,"backup.restore_max_size",Y(15,Pe,t.maxFileSizeText))),i(3),g(s(15,13,"backup.restore_warning")),i(2),u(t.selectedBackup?16:-1),i(),u(t.selectedBackup?-1:17)}}function Ae(e,p){if(e&1){let t=T();b(0,"button",18),o(1,"translate"),A("click",function(){I(t);let l=h(2);return E(l.dismissModal())}),d(2),o(3,"translate"),v()}if(e&2){let t=h(2);D("disabled",t.clicked),f("aria-label",s(1,3,"form.button_close")),i(2),C(" ",s(3,5,"form.button_close")," ")}}function He(e,p){if(e&1){let t=T();b(0,"button",18),o(1,"translate"),A("click",function(){I(t);let l=h(2);return E(l.reopenBackupModal())}),d(2),o(3,"translate"),v()}if(e&2){let t=h(2);D("disabled",t.clicked),f("aria-label",s(1,3,"form.button_back")),i(2),C(" ",s(3,5,"form.button_back")," ")}}function De(e,p){e&1&&R(0,"i",19)}function Le(e,p){if(e&1&&(b(0,"span"),d(1),v()),e&2){let t=h(3);i(),C("",t.uploadPercent,"% - ")}}function Ne(e,p){e&1&&(b(0,"span"),d(1),o(2,"translate"),v()),e&2&&(i(),g(s(2,1,"backup.label_extracting")))}function Oe(e,p){e&1&&(b(0,"span"),d(1),o(2,"translate"),v()),e&2&&(i(),g(s(2,1,"backup.label_uploading")))}function ze(e,p){if(e&1&&(b(0,"span"),m(1,De,1,0,"i",19),m(2,Le,2,1,"span"),m(3,Ne,3,3,"span"),m(4,Oe,3,3,"span"),v()),e&2){let t=h(2);i(),u(!t.uploadPercent||t.uploadPercent===100?1:-1),i(),u(t.uploadPercent&&t.uploadPercent!==100?2:-1),i(),u(t.uploadPercent===100?3:-1),i(),u(t.uploadPercent!==100?4:-1)}}function Ue(e,p){e&1&&(d(0),o(1,"translate")),e&2&&C(" ",s(1,1,"form.button_restore")," ")}function We(e,p){if(e&1){let t=T();b(0,"div",6)(1,"div",13),m(2,Ae,4,7,"button",14),m(3,He,4,7,"button",14),v(),R(4,"div",15),b(5,"div",16)(6,"button",17),A("click",function(){I(t);let l=h();return E(l.onRestoreBackupClick())}),m(7,ze,5,4,"span"),m(8,Ue,2,3),v()()()}if(e&2){let t=h();i(2),u(t.setupWizardRestore?2:-1),i(),u(t.setupWizardRestore?-1:3),i(3),D("disabled",!t.selectedBackup&&!t.selectedFile||t.clicked),i(),u(t.clicked?7:-1),i(),u(t.clicked?-1:8)}}function Ke(e,p){if(e&1){let t=T();b(0,"div",6),R(1,"div",13),b(2,"div",15)(3,"button",20),A("click",function(){I(t);let l=h();return E(l.postBackupRestart())}),d(4),o(5,"translate"),v()(),R(6,"div",16),v()}e&2&&(i(4),C(" ",s(5,1,"menu.hbrestart.title")," "))}var he=(()=>{class e{$activeModal=w(W);$api=w(U);$modal=w(ut);$router=w(J);$toastr=w(z);$translate=w(O);$ws=w(ae);io;term=new _e.Terminal;termTarget;fitAddon=new ue.FitAddon;setupWizardRestore=!1;selectedBackup=null;clicked=!1;maxFileSizeText=globalThis.backup.maxBackupSizeText;selectedFile;restoreInProgress=!1;restoreStarted=!1;restoreFailed=!1;restoreArchiveType="homebridge";uploadPercent=0;ngOnInit(){return y(this,null,function*(){this.io=this.$ws.connectToNamespace("backup"),this.termTarget=document.getElementById("plugin-log-output"),this.term.open(this.termTarget),this.fitAddon.fit(),this.io.socket.on("stdout",t=>{this.term.write(t)}),this.setupWizardRestore&&(this.restoreStarted=!0,this.restoreInProgress=!0,this.startRestore())})}onRestoreBackupClick(){this.selectedBackup?this.restoreScheduledBackup():this.restoreArchiveType==="homebridge"?this.uploadHomebridgeArchive():this.restoreArchiveType==="hbfx"&&this.uploadHbfxArchive()}handleRestoreFileInput(t){t.length?(this.selectedFile=t[0],this.selectedFile.name.endsWith(".hbfx")?this.restoreArchiveType="hbfx":this.restoreArchiveType="homebridge"):delete this.selectedFile}postBackupRestart(){this.$api.put("/backup/restart",{}).subscribe({next:()=>{this.$activeModal.close(!0),this.$router.navigate(["/"])},error:()=>{}})}reopenBackupModal(){this.$activeModal.dismiss(),this.$modal.open(wt,{size:"lg",backdrop:"static"})}ngOnDestroy(){this.io.end()}dismissModal(){this.$activeModal.dismiss("Dismiss")}uploadHomebridgeArchive(){this.term.reset(),this.clicked=!0;let t=new FormData;t.append("restoreArchive",this.selectedFile,this.selectedFile.name),this.$api.post("/backup/restore",t).subscribe({next:()=>{this.restoreStarted=!0,this.restoreInProgress=!0,setTimeout(()=>{this.startRestore()},500),this.clicked=!1},error:n=>{console.error(n),this.$toastr.error(n.error?.message||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error")),this.clicked=!1}})}restoreScheduledBackup(){return y(this,null,function*(){this.term.reset(),this.clicked=!0,this.$api.post(`/backup/scheduled-backups/${this.selectedBackup.id}/restore`,{}).subscribe({next:()=>{this.restoreStarted=!0,this.restoreInProgress=!0,setTimeout(()=>{this.startRestore()},500),this.clicked=!1},error:t=>{console.error(t),this.$toastr.error(t.error?.message||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error")),this.clicked=!1}})})}startRestore(){return y(this,null,function*(){this.io.request("do-restore").subscribe({next:()=>{this.restoreInProgress=!1,this.$toastr.success(this.$translate.instant("backup.backup_restored"),this.$translate.instant("toast.title_success")),this.setupWizardRestore&&this.postBackupRestart()},error:t=>{this.restoreFailed=!0,console.error(t),this.$toastr.error(this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})})}uploadHbfxArchive(){this.term.reset(),this.clicked=!0;let t=new FormData;t.append("restoreArchive",this.selectedFile,this.selectedFile.name),this.$api.post("/backup/restore/hbfx",t,{reportProgress:!0,observe:"events"}).subscribe({next:n=>{n.type===zt.UploadProgress?this.uploadPercent=Math.round(100*n.loaded/n.total):n instanceof Ut&&(this.restoreStarted=!0,this.restoreInProgress=!0,setTimeout(()=>{this.startHbfxRestore()},500),this.clicked=!1)},error:n=>{this.clicked=!1,console.error(n),this.$toastr.error(n.error?.message||this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})}startHbfxRestore(){return y(this,null,function*(){this.io.request("do-restore-hbfx").subscribe({next:()=>{this.restoreInProgress=!1,this.$toastr.success(this.$translate.instant("backup.backup_restored"),this.$translate.instant("toast.title_success"))},error:t=>{this.restoreFailed=!0,console.error(t),this.$toastr.error(this.$translate.instant("backup.restore_failed"),this.$translate.instant("toast.title_error"))}})})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=L({type:e,selectors:[["ng-component"]],inputs:{setupWizardRestore:"setupWizardRestore",selectedBackup:"selectedBackup"},decls:11,vars:11,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"],["id","plugin-log-output",1,"modal-body",3,"hidden"],[1,"modal-footer","justify-content-between"],[1,"text-center","mb-3"],[1,"fas","fa-hard-drive","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","text","disabled","",1,"form-control","custom-input",3,"value"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz, .hbfx",1,"form-control"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz, .hbfx",1,"form-control",3,"change"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"disabled"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"fa","fa-circle-notch","fa-spin"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click"]],template:function(n,l){n&1&&(b(0,"div",0)(1,"div",1)(2,"h5",2),d(3),o(4,"translate"),v(),b(5,"button",3),o(6,"translate"),A("click",function(){return l.dismissModal()}),v()(),m(7,Ve,18,17,"div",4),R(8,"div",5),m(9,We,9,5,"div",6),m(10,Ke,7,3,"div",6),v()),n&2&&(i(3),g(s(4,7,"backup.title_backup")),i(2),D("disabled",l.restoreInProgress),f("aria-label",s(6,9,"form.button_close")),i(2),u(!l.restoreStarted&&!l.setupWizardRestore?7:-1),i(),D("hidden",!l.restoreStarted),i(),u(!l.restoreStarted||l.restoreFailed===!0?9:-1),i(),u(!l.restoreInProgress&&l.restoreStarted?10:-1))},dependencies:[N],encapsulation:2})}return e})();var ge=(e,p)=>({"fa-arrow-right":e,"fa-cog fa-spin":p}),Ge=e=>({backupTime:e,dayCount:7}),je=(e,p)=>({"fa-trash":e,"fa-cog fa-spin":p}),Qe=(e,p)=>({backupSize:e,maxBackupSizeText:p});function qe(e,p){if(e&1&&(d(0),o(1,"date"),o(2,"translate")),e&2){let t=h(2);C(" ",q(2,4,"backup.scheduled_backup_time",Y(7,Ge,q(1,1,t.backupTime,"shortTime")))," ")}}function Je(e,p){e&1&&(d(0),o(1,"translate")),e&2&&C(" ",s(1,1,"plugins.settings.restart_required")," ")}function Xe(e,p){if(e&1&&m(0,qe,3,9)(1,Je,2,3),e&2){let t=h();u(t.backupTime?0:1)}}function Ye(e,p){if(e&1&&(d(0),o(1,"translate")),e&2){let t=h();C(" ",s(1,1,t.backupTime?"plugins.settings.restart_required":"backup.scheduled_backup_disabled")," ")}}function Ze(e,p){if(e&1&&(a(0,"span",33),o(1,"translate"),c(2,"i",40),d(3),r()),e&2){let t=h().$implicit;_("ngbTooltip",q(1,3,"backup.backup_exceeds_max_size",H(6,Qe,t.size+"MB",t.maxBackupSizeText)))("openDelay",150),i(3),C(" ",t.size,"MB ")}}function ti(e,p){if(e&1&&(a(0,"span"),d(1),r()),e&2){let t=h().$implicit;i(),C("",t.size,"MB")}}function ei(e,p){if(e&1){let t=T();a(0,"li",22)(1,"span")(2,"span",32),d(3),o(4,"date"),r(),c(5,"br"),a(6,"small",23),d(7),o(8,"date"),m(9,Ze,4,9,"span",33),m(10,ti,2,1,"span"),r()(),a(11,"span",34)(12,"button",35),o(13,"translate"),o(14,"translate"),k("click",function(){let l=I(t).$implicit,x=h(2);return E(x.restore(l))}),c(15,"i",36),r(),a(16,"button",37),o(17,"translate"),o(18,"translate"),k("click",function(){let l=I(t).$implicit,x=h(2);return E(x.download(l))}),c(19,"i",38),r(),a(20,"button",39),o(21,"translate"),o(22,"translate"),k("click",function(){let l=I(t).$implicit,x=h(2);return E(x.delete(l))}),c(23,"i",25),r()()()}if(e&2){let t=p.$implicit,n=h(2);i(2),_("ngbTooltip",t.fileName)("openDelay",150),i(),C(" ",q(4,20,t.timestamp,"mediumDate")," "),i(4),C(" ",q(8,23,t.timestamp,"shortTime")," \xB7 "),i(2),u(t.size>t.maxBackupSize?9:-1),i(),u(t.size<=t.maxBackupSize?10:-1),i(2),_("disabled",n.clicked||n.deleting||t.size>t.maxBackupSize)("ngbTooltip",s(13,26,"form.button_restore"))("openDelay",150),f("aria-label",s(14,28,"form.button_restore")),i(4),_("disabled",n.clicked||n.deleting)("ngbTooltip",s(17,30,"form.button_download"))("openDelay",150),f("aria-label",s(18,32,"form.button_download")),i(4),_("disabled",n.clicked||n.deleting)("ngbTooltip",s(21,34,"form.button_delete"))("openDelay",150),f("aria-label",s(22,36,"form.button_delete")),i(3),M(H(38,je,t.id!==n.deleting,t.id===n.deleting))}}function ii(e,p){if(e&1&&(a(0,"ul",27)(1,"li",9)(2,"h6",10),d(3),o(4,"translate"),r()(),G(5,ei,24,41,"li",22,K),r()),e&2){let t=h();i(3),g(s(4,1,"backup.files_auto")),i(2),j(t.scheduledBackups)}}var wt=(()=>{class e{destroyRef=w(gt);$activeModal=w(W);$api=w(U);$backup=w(pe);$modal=w(ut);$router=w(J);$settings=w(X);$toastr=w(z);$translate=w(O);restartToastIsShown=!1;Date=Date;clicked=!1;scheduledBackups=[];backupTime;deleting=null;currentSettingEnabled=!1;currentSettingPath="";enabledFormControl=new F(!1);pathFormControl=new F("");ngOnInit(){this.getScheduledBackups(),this.getNextBackup(),this.currentSettingEnabled=!this.$settings.env.scheduledBackupDisable,this.currentSettingPath=this.$settings.env.scheduledBackupPath,this.enabledFormControl.patchValue(this.currentSettingEnabled),this.pathFormControl.patchValue(this.currentSettingPath),this.enabledFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(t=>y(this,null,function*(){this.currentSettingEnabled=t,yield this.saveUiSettingChange("scheduledBackupDisable",!this.currentSettingEnabled)})),this.pathFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(t=>y(this,null,function*(){this.currentSettingPath=t,yield this.saveUiSettingChange("scheduledBackupPath",this.currentSettingPath)}))}download(t){this.$api.get(`/backup/scheduled-backups/${t.id}`,{observe:"response",responseType:"blob"}).subscribe({next:n=>{let l=t.fileName||"homebridge-backup.tar.gz",x=n.body.size;if(x>globalThis.backup.maxBackupSize){let V=this.$translate.instant("backup.backup_exceeds_max_size",{maxBackupSizeText:globalThis.backup.maxBackupSizeText,size:`${(x/1048576).toFixed(1)}MB`});this.$toastr.warning(V,this.$translate.instant("toast.title_warning"))}(0,fe.saveAs)(n.body,l)},error:n=>{console.error(n),this.$toastr.error(this.$translate.instant("backup.backup_download_failed"),this.$translate.instant("toast.title_error"))}})}restore(t){this.$activeModal.close();let n=this.$modal.open(he,{size:"lg",backdrop:"static"});n.componentInstance.selectedBackup=t}delete(t){this.deleting=t.id,this.$api.delete(`/backup/scheduled-backups/${t.id}`).subscribe({next:()=>{this.getScheduledBackups(),this.deleting=null},error:n=>{this.deleting=null,console.error(n),this.$toastr.error(this.$translate.instant("backup.backup_delete_failed"),this.$translate.instant("toast.title_error"))}})}onDownloadBackupClick(){return y(this,null,function*(){this.clicked=!0;try{yield this.$backup.downloadBackup(),this.clicked=!1}catch(t){this.clicked=!1,console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}onCreateBackupClick(){return y(this,null,function*(){this.clicked=!0;try{yield P(this.$api.post("/backup",{})),this.clicked=!1,this.getScheduledBackups()}catch(t){this.clicked=!1,console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}saveUiSettingChange(t,n){return y(this,null,function*(){try{yield P(this.$api.put("/config-editor/ui",{key:t,value:n})),this.$settings.setEnvItem(t,n),this.showRestartToast()}catch(l){console.error(l),this.$toastr.error(l.message,this.$translate.instant("toast.title_error"))}})}getScheduledBackups(){this.$api.get("/backup/scheduled-backups").pipe(B(this.destroyRef)).subscribe({next:t=>{this.scheduledBackups=t},error:t=>console.error(t)})}getNextBackup(){this.$api.get("/backup/scheduled-backups/next").pipe(B(this.destroyRef)).subscribe({next:t=>{this.backupTime=t.next},error:t=>{console.error(t)}})}showRestartToast(){if(!this.restartToastIsShown){this.restartToastIsShown=!0;let t=this.$toastr.info(this.$translate.instant("settings.changes.saved"),this.$translate.instant("menu.hbrestart.title"),{timeOut:0,tapToDismiss:!0,disableTimeOut:!0,positionClass:"toast-bottom-right",enableHtml:!0});t&&t.onTap&&t.onTap.pipe(B(this.destroyRef)).subscribe(()=>{this.$router.navigate(["/restart"])})}}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=L({type:e,selectors:[["ng-component"]],decls:92,vars:82,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-hard-drive","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item"],[1,"mb-0","text-center"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],[1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"grey-text","small"],[1,"text-start","text-md-end","w-100","w-md-50"],["type","text","placeholder","/home/pi/homebridge-backups",1,"form-control","custom-input","font-monospace",3,"formControl"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"text-start"],[1,"small","grey-text"],[1,"text-end","grey-text","d-flex","align-items-center"],["type","checkbox","id","disableScheduledBackups",1,"rendux-input",3,"formControl"],["for","disableScheduledBackups",1,"rendux-label"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"grey-text"],[1,"btn","btn-primary","m-0","ms-3","py-1",3,"click","disabled"],[1,"fas"],[1,"fas","fa-arrow-right"],[1,"list-group","list-group-box","mt-3","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-end"],["container","modal","triggers","hover",3,"ngbTooltip","openDelay"],["container","modal","triggers","hover",1,"red-text",3,"ngbTooltip","openDelay"],[2,"display","flex","flex-wrap","nowrap"],["placement","bottom","container","modal","triggers","hover",1,"btn","btn-primary","m-0","ms-3","py-1",3,"click","disabled","ngbTooltip","openDelay"],[1,"fas","fa-history"],["placement","bottom","container","modal","triggers","hover",1,"btn","btn-primary","m-0","ms-2",3,"click","disabled","ngbTooltip","openDelay"],[1,"fas","fa-download"],["placement","bottom","container","modal","triggers","hover",1,"btn","btn-danger","m-0","ms-2",3,"click","disabled","ngbTooltip","openDelay"],[1,"fas","fa-exclamation-circle"]],template:function(n,l){n&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),d(3),o(4,"translate"),r(),a(5,"button",3),o(6,"translate"),k("click",function(){return l.dismissModal()}),r()(),a(7,"div",4)(8,"div",5),c(9,"i",6),r(),a(10,"ul",7)(11,"li"),d(12),o(13,"translate"),r(),a(14,"li"),d(15),o(16,"translate"),r(),a(17,"li"),d(18),o(19,"translate"),r()(),a(20,"ul",8)(21,"li",9)(22,"h6",10),d(23),o(24,"translate"),r()(),a(25,"li",11)(26,"div",12),d(27),o(28,"translate"),c(29,"br"),a(30,"span",13),d(31),o(32,"translate"),r()(),a(33,"div",14),c(34,"input",15),o(35,"translate"),r()(),a(36,"li",16)(37,"div",17),d(38),o(39,"translate"),c(40,"br"),a(41,"span",18),m(42,Xe,2,1)(43,Ye,2,3),r()(),a(44,"div",19),c(45,"input",20),o(46,"translate"),c(47,"label",21),r()(),a(48,"li",22)(49,"div")(50,"span"),d(51),o(52,"translate"),r(),c(53,"br"),a(54,"small",23),d(55),o(56,"translate"),r()(),a(57,"button",24),o(58,"translate"),k("click",function(){return l.onDownloadBackupClick()}),c(59,"i",25),r()(),a(60,"li",22)(61,"div")(62,"span"),d(63),o(64,"translate"),r(),c(65,"br"),a(66,"small",23),d(67),o(68,"translate"),r()(),a(69,"button",24),o(70,"translate"),k("click",function(){return l.onCreateBackupClick()}),c(71,"i",25),r()(),a(72,"li",22)(73,"div")(74,"span"),d(75),o(76,"translate"),r(),c(77,"br"),a(78,"small",23),d(79),o(80,"translate"),r()(),a(81,"button",24),o(82,"translate"),k("click",function(){return l.restore(null)}),c(83,"i",26),r()()(),m(84,ii,7,3,"ul",27),r(),a(85,"div",28),c(86,"div",17),a(87,"div",29)(88,"button",30),k("click",function(){return l.dismissModal()}),d(89),o(90,"translate"),r()(),c(91,"div",31),r()()),n&2&&(i(3),g(s(4,34,"backup.title_backup")),i(2),_("disabled",l.clicked||l.deleting),f("aria-label",s(6,36,"form.button_close")),i(7),g(s(13,38,"backup.backup_help_one")),i(3),g(s(16,40,"backup.backup_help_two")),i(3),g(s(19,42,"backup.backup_warning")),i(5),g(s(24,44,"backup.settings_title")),i(4),C(" ",s(28,46,"backup.settings_path")),i(4),g(s(32,48,"backup.settings_path_desc")),i(3),_("formControl",l.pathFormControl),f("aria-label",s(35,50,"backup.settings_path")),i(4),C(" ",s(39,52,"backup.settings_enable")),i(4),u(l.enabledFormControl.value?42:43),i(3),_("formControl",l.enabledFormControl),f("aria-label",s(46,54,"backup.settings_enable")),i(6),g(s(52,56,"backup.backup_now")),i(4),g(s(56,58,"backup.backup_now_desc")),i(2),_("disabled",l.clicked),f("aria-label",s(58,60,"backup.backup_now")),i(2),M(H(76,ge,!l.clicked,l.clicked)),i(4),g(s(64,62,"backup.backup_now")),i(4),g(s(68,64,"backup.backup_now_save_desc")),i(2),_("disabled",l.clicked),f("aria-label",s(70,66,"backup.backup_now")),i(2),M(H(79,ge,!l.clicked,l.clicked)),i(4),g(s(76,68,"backup.restore_now")),i(4),g(s(80,70,"backup.restore_now_desc")),i(2),_("disabled",l.clicked),f("aria-label",s(82,72,"backup.restore_now")),i(3),u(l.scheduledBackups.length?84:-1),i(4),_("disabled",l.clicked||l.deleting),i(),C(" ",s(90,74,"form.button_close")," "))},dependencies:[Et,mt,xt,dt,pt,yt,Ot,N],encapsulation:2})}return e})();function ni(e,p){e&1&&(a(0,"div",12),c(1,"i",13),r(),a(2,"p",14),d(3),o(4,"translate"),r()),e&2&&(i(3),g(s(4,1,"reset.no_accessories")))}function ai(e,p){e&1&&(a(0,"div",12),c(1,"i",15),r(),a(2,"ul",16)(3,"li"),d(4),o(5,"translate"),r(),a(6,"li"),d(7),o(8,"translate"),r(),a(9,"li"),d(10),o(11,"translate"),r()(),a(12,"ngb-alert",17)(13,"p",18),d(14),o(15,"translate"),r()()),e&2&&(i(4),g(s(5,5,"reset.accessory_all.list_1")),i(3),g(s(8,7,"reset.accessory_all.list_2")),i(3),g(s(11,9,"reset.accessory_all.list_3")),i(2),_("dismissible",!1),i(2),g(s(15,11,"reset.action_is_irreversible")))}function oi(e,p){if(e&1){let t=T();a(0,"button",19),o(1,"translate"),k("click",function(){I(t);let l=h();return E(l.dismissModal())}),d(2),o(3,"translate"),r()}if(e&2){let t=h();_("disabled",t.clicked),f("aria-label",s(1,3,"form.button_close")),i(2),C(" ",s(3,5,"form.button_close")," ")}}function si(e,p){if(e&1){let t=T();a(0,"button",20),o(1,"translate"),k("click",function(){I(t);let l=h();return E(l.dismissModal())}),d(2),o(3,"translate"),r()}e&2&&(f("aria-label",s(1,2,"form.button_close")),i(2),C(" ",s(3,4,"form.button_close")," "))}function ri(e,p){e&1&&(d(0),o(1,"translate")),e&2&&C(" ",s(1,1,"form.button_remove")," ")}function li(e,p){e&1&&c(0,"i",22)}function di(e,p){if(e&1){let t=T();a(0,"button",21),k("click",function(){I(t);let l=h();return E(l.onResetCachedAccessoriesClick())}),m(1,ri,2,3),m(2,li,1,0,"i",22),r()}if(e&2){let t=h();_("disabled",t.clicked),i(),u(t.clicked?-1:1),i(),u(t.clicked?2:-1)}}var be=(()=>{class e{$activeModal=w(W);$api=w(U);$router=w(J);$toastr=w(z);$translate=w(O);clicked=!1;cachedAccessories=[];ngOnInit(){this.loadCachedAccessories()}onResetCachedAccessoriesClick(){return this.clicked=!0,this.$api.put("/server/reset-cached-accessories",{}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("reset.delete_success"),this.$translate.instant("toast.title_success")),this.$activeModal.close(),this.$router.navigate(["/restart"],{queryParams:{restarting:!0}})},error:t=>{this.clicked=!1,console.error(t),this.$toastr.error(this.$translate.instant("reset.failed_to_reset"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadCachedAccessories(){return y(this,null,function*(){try{this.cachedAccessories=yield P(this.$api.get("/server/cached-accessories"))}catch(t){console.error(t),this.$toastr.error(this.$translate.instant("reset.error_message"),this.$translate.instant("toast.title_error")),this.$activeModal.close()}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=L({type:e,selectors:[["ng-component"]],decls:17,vars:12,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,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"disabled"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"disabled"],[1,"text-center","mb-3"],[1,"fas","fa-circle-check","primary-text",2,"font-size","75px"],[1,"mb-0","text-center"],[1,"fas","fa-network-wired","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","error",1,"mb-0",3,"dismissible"],[1,"text-center","mb-0"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"fas","fa-spinner","fa-pulse"]],template:function(n,l){n&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),d(3),o(4,"translate"),r(),a(5,"button",3),o(6,"translate"),k("click",function(){return l.dismissModal()}),r()(),a(7,"div",4),m(8,ni,5,3),m(9,ai,16,13),r(),a(10,"div",5)(11,"div",6),m(12,oi,4,7,"button",7),r(),a(13,"div",8),m(14,si,4,6,"button",9),r(),a(15,"div",10),m(16,di,3,3,"button",11),r()()()),n&2&&(i(3),g(s(4,8,"reset.accessory_all.title")),i(2),_("disabled",l.clicked),f("aria-label",s(6,10,"form.button_close")),i(3),u(l.cachedAccessories.length===0?8:-1),i(),u(l.cachedAccessories.length>0?9:-1),i(3),u(l.cachedAccessories.length>0?12:-1),i(2),u(l.cachedAccessories.length===0?14:-1),i(2),u(l.cachedAccessories.length>0?16:-1))},dependencies:[It,N],encapsulation:2})}return e})();var pi=(e,p)=>({"fa-matter":e,"fa-hap":p}),ci=(e,p)=>({"btn-danger":e,"btn-elegant":p}),mi=(e,p,t)=>({"fa-broom":e,"fa-undo":p,"fa-spinner fa-pulse":t});function ui(e,p){e&1&&(b(0,"div",12),R(1,"i",13),v(),b(2,"p",14),d(3),o(4,"translate"),v()),e&2&&(i(3),g(s(4,1,"reset.bridge_accessories.empty")))}function _i(e,p){if(e&1){let t=T();b(0,"li",18)(1,"span",19),R(2,"i",20),v(),b(3,"span",21),d(4),R(5,"br"),b(6,"small",22)(7,"span",23),d(8),v()()(),b(9,"button",24),o(10,"translate"),A("click",function(){let l=I(t).$implicit,x=h(2);return E(x.toggleList(l._id,l._protocol))}),R(11,"i",25),v()()}if(e&2){let t=p.$implicit,n=h(2);i(2),M(H(12,pi,t._protocol==="matter",t._protocol!=="matter")),i(2),C(" ",t.name," "),i(4),g(t._username),i(),M(H(15,ci,!n.isInList(t._id,t._protocol),n.isInList(t._id,t._protocol))),D("disabled",n.clicked),f("aria-label",s(10,10,"form.button_delete")),i(2),M(st(18,mi,!n.isInList(t._id,t._protocol),n.isInList(t._id,t._protocol)&&!n.clicked,n.isInList(t._id,t._protocol)&&n.clicked))}}function hi(e,p){if(e&1&&(b(0,"div",12),R(1,"i",15),v(),b(2,"ul",16)(3,"li"),d(4),o(5,"translate"),v(),b(6,"li"),d(7),o(8,"translate"),v(),b(9,"li"),d(10),o(11,"translate"),v()(),b(12,"ul",17),G(13,_i,12,22,"li",18,K),v()),e&2){let t=h();i(4),g(s(5,3,"reset.bridge_accessories.list_1")),i(3),g(s(8,5,"reset.clear_cache_single.list_3")),i(3),g(s(11,7,"reset.bridge_accessories.list_2")),i(3),j(t.pairings)}}function gi(e,p){if(e&1){let t=T();b(0,"button",26),A("click",function(){I(t);let l=h();return E(l.dismissModal())}),d(1),o(2,"translate"),v()}if(e&2){let t=h();D("disabled",t.clicked),i(),C(" ",s(2,2,"form.button_close")," ")}}function Ci(e,p){if(e&1){let t=T();b(0,"button",27),A("click",function(){I(t);let l=h();return E(l.dismissModal())}),d(1),o(2,"translate"),v()}e&2&&(i(),C(" ",s(2,1,"form.button_close")," "))}function fi(e,p){e&1&&R(0,"i",29)}function bi(e,p){if(e&1&&d(0),e&2){let t=h(3);C(" (",t.toDelete.length,") ")}}function vi(e,p){if(e&1&&(d(0),o(1,"translate"),m(2,bi,1,1)),e&2){let t=h(2);C(" ",s(1,2,"form.button_remove")," "),i(2),u(t.toDelete.length>0?2:-1)}}function xi(e,p){if(e&1){let t=T();b(0,"button",28),A("click",function(){I(t);let l=h();return E(l.cleanBridges())}),m(1,fi,1,0,"i",29)(2,vi,3,4),v()}if(e&2){let t=h();D("disabled",!t.toDelete.length||t.clicked),i(),u(t.clicked?1:2)}}var ve=(()=>{class e{$activeModal=w(W);$api=w(U);$router=w(J);$settings=w(X);$toastr=w(z);$translate=w(O);isMatterSupported=this.$settings.isFeatureEnabled("matterSupport");clicked=!1;pairings=[];toDelete=[];ngOnInit(){this.loadPairings()}cleanBridges(){return this.clicked=!0,this.$api.delete("/server/pairings/accessories",{body:this.toDelete}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("reset.accessory_ind.done"),this.$translate.instant("toast.title_success")),this.$activeModal.close(),this.$router.navigate(["/restart"],{queryParams:{restarting:!0}})},error:t=>{this.clicked=!1,console.error(t),this.$toastr.error(this.$translate.instant("reset.accessory_ind.fail"),this.$translate.instant("toast.title_error"))}})}toggleList(t,n){this.toDelete.some(l=>l.id===t&&l.protocol===n)?this.toDelete=this.toDelete.filter(l=>l.id!==t||l.protocol!==n):this.toDelete.push({id:t,protocol:n})}isInList(t,n){return this.toDelete.some(l=>l.id===t&&l.protocol===n)}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadPairings(){return y(this,null,function*(){try{let t=(yield P(this.$api.get("/server/pairings"))).filter(n=>n._category==="bridge"&&!n._main).sort((n,l)=>n.name.localeCompare(l.name));this.pairings=[];for(let n of t)this.pairings.push(Tt(kt({},n),{_protocol:"hap",_displayName:n.name})),this.isMatterSupported&&n._matter&&this.pairings.push(Tt(kt({},n),{_protocol:"matter",_displayName:n.name}))}catch(t){console.error(t),this.$toastr.error(this.$translate.instant("settings.unpair_bridge.load_error"),this.$translate.instant("toast.title_error")),this.$activeModal.close()}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=L({type:e,selectors:[["ng-component"]],decls:17,vars:12,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,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"disabled"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"disabled"],[1,"text-center","mb-3"],[1,"fas","fa-circle-check","primary-text",2,"font-size","75px"],[1,"mb-0","text-center"],[1,"fas","fa-broom","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"me-3"],[1,"fas","fa-lg"],[1,"flex-grow-1"],[1,"grey-text"],[1,"font-monospace"],[1,"btn","btn-danger","m-0","ms-3",3,"click","disabled"],[1,"fas"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"fas","fa-spinner","fa-pulse"]],template:function(n,l){n&1&&(b(0,"div",0)(1,"div",1)(2,"h5",2),d(3),o(4,"translate"),v(),b(5,"button",3),o(6,"translate"),A("click",function(){return l.dismissModal()}),v()(),b(7,"div",4),m(8,ui,5,3),m(9,hi,15,9),v(),b(10,"div",5)(11,"div",6),m(12,gi,3,4,"button",7),v(),b(13,"div",8),m(14,Ci,3,3,"button",9),v(),b(15,"div",10),m(16,xi,3,2,"button",11),v()()()),n&2&&(i(3),g(s(4,8,"reset.bridge_accessories.title")),i(2),D("disabled",l.clicked),f("aria-label",s(6,10,"form.button_close")),i(3),u(l.pairings.length===0?8:-1),i(),u(l.pairings.length>0?9:-1),i(3),u(l.pairings.length>0?12:-1),i(2),u(l.pairings.length===0?14:-1),i(2),u(l.pairings.length>0?16:-1))},dependencies:[N],encapsulation:2})}return e})();function Si(e,p){e&1&&(d(0),o(1,"translate")),e&2&&C(" ",s(1,1,"form.button_reset")," ")}function yi(e,p){e&1&&c(0,"i",16)}var xe=(()=>{class e{$activeModal=w(W);$api=w(U);$router=w(J);$toastr=w(z);$translate=w(O);clicked;onResetHomebridgeAccessoryClick(){return this.clicked=!0,this.$api.put("/server/reset-homebridge-accessory",{}).subscribe({next:()=>{this.$toastr.success(this.$translate.instant("reset.accessory_reset"),this.$translate.instant("toast.title_success")),this.$activeModal.close(),this.$router.navigate(["/restart"])},error:t=>{console.error(t),this.$toastr.error(this.$translate.instant("reset.failed_to_reset"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=L({type:e,selectors:[["ng-component"]],decls:38,vars:33,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-bridge","primary-text",2,"font-size","75px"],[1,"mb-3"],["type","error",1,"mb-0",3,"dismissible"],[1,"text-center","mb-0"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"fas","fa-spinner","fa-pulse"]],template:function(n,l){n&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),d(3),o(4,"translate"),r(),a(5,"button",3),o(6,"translate"),k("click",function(){return l.dismissModal()}),r()(),a(7,"div",4)(8,"div",5),c(9,"i",6),r(),a(10,"ul",7)(11,"li"),d(12),o(13,"translate"),r(),a(14,"li"),d(15),o(16,"translate"),r(),a(17,"li"),d(18),o(19,"translate"),r(),a(20,"li"),d(21),o(22,"translate"),r()(),a(23,"ngb-alert",8)(24,"p",9),d(25),o(26,"translate"),r()()(),a(27,"div",10)(28,"div",11)(29,"button",12),o(30,"translate"),k("click",function(){return l.dismissModal()}),d(31),o(32,"translate"),r()(),c(33,"div",13),a(34,"div",14)(35,"button",15),k("click",function(){return l.onResetHomebridgeAccessoryClick()}),m(36,Si,2,3),m(37,yi,1,0,"i",16),r()()()()),n&2&&(i(3),g(s(4,15,"reset.bridge_all.title")),i(2),_("disabled",l.clicked),f("aria-label",s(6,17,"form.button_close")),i(7),g(s(13,19,"reset.bridge_all.list_1")),i(3),g(s(16,21,"reset.bridge_all.list_2")),i(3),g(s(19,23,"reset.bridge_all.list_3")),i(3),g(s(22,25,"reset.bridge_all.list_4")),i(2),_("dismissible",!1),i(2),g(s(26,27,"reset.action_is_irreversible")),i(4),_("disabled",l.clicked),f("aria-label",s(30,29,"form.button_close")),i(2),C(" ",s(32,31,"form.button_close")," "),i(4),_("disabled",l.clicked),i(),u(l.clicked?-1:36),i(),u(l.clicked?37:-1))},dependencies:[It,N],encapsulation:2})}return e})();var Rt=(e,p)=>({"btn-danger":e,"btn-elegant":p}),Se=(e,p,t)=>({"fa-refresh":e,"fa-undo":p,"fa-spinner fa-pulse":t}),Ii=(e,p,t)=>({"fa-trash":e,"fa-undo":p,"fa-spinner fa-pulse":t});function Ei(e,p){e&1&&(b(0,"div",12),R(1,"i",13),v(),b(2,"p",14),d(3),o(4,"translate"),v()),e&2&&(i(3),g(s(4,1,"reset.bridges.empty")))}function wi(e,p){if(e&1&&R(0,"i",27)(1,"i",28),e&2){let t=h().$implicit;it("opacity",t._matterOnly?"0.25":"1"),i(),it("opacity",t._matter?"1":"0.25")}}function ki(e,p){e&1&&R(0,"i",22)}function Ti(e,p){if(e&1){let t=T();b(0,"li",20)(1,"span",21),m(2,wi,2,4)(3,ki,1,0,"i",22),v(),b(4,"span",23),d(5),R(6,"br"),b(7,"small",24),d(8),o(9,"titlecase"),v()(),b(10,"button",25),o(11,"translate"),A("click",function(){let l=I(t).$implicit,x=h(3);return E(x.toggleList(l._id,!1))}),R(12,"i",26),v()()}if(e&2){let t=p.$implicit,n=h(3);i(2),u(n.isMatterSupported?2:3),i(3),C(" ",t.name," "),i(3),Ht(" ",t._username," \xB7 ",t._main?"Homebridge":s(9,10,t._category)," "),i(2),M(H(14,Rt,!n.isInList(t._id),n.isInList(t._id))),D("disabled",n.clicked),f("aria-label",s(11,12,"form.button_unpair")),i(2),M(st(17,Se,!n.isInList(t._id),n.isInList(t._id)&&!n.clicked,n.isInList(t._id)&&n.clicked))}}function Bi(e,p){if(e&1&&(b(0,"ul",16)(1,"li",17)(2,"h6",18),d(3),o(4,"translate"),v(),b(5,"p",19),d(6),o(7,"translate"),v()(),G(8,Ti,13,21,"li",20,K),v()),e&2){let t=h(2);i(3),g(s(4,2,"reset.bridge_ind.head_non_child")),i(3),g(s(7,4,"reset.bridge_ind.desc_non_child")),i(2),j(t.pairingsNonChild)}}function $i(e,p){if(e&1&&R(0,"i",27)(1,"i",28),e&2){let t=h().$implicit;i(),it("opacity",t._matter?"1":"0.25")}}function Fi(e,p){e&1&&R(0,"i",22)}function Pi(e,p){if(e&1){let t=T();b(0,"li",20)(1,"span",21),m(2,$i,2,2)(3,Fi,1,0,"i",22),v(),b(4,"span",23),d(5),R(6,"br"),b(7,"small",24),d(8),v()(),b(9,"button",25),o(10,"translate"),A("click",function(){let l=I(t).$implicit,x=h(3);return E(x.toggleList(l._id,!0))}),R(11,"i",26),v()()}if(e&2){let t=p.$implicit,n=h(3);i(2),u(n.isMatterSupported?2:3),i(3),C(" ",t.name," "),i(3),g(t._username),i(),M(H(11,Rt,!n.isInList(t._id),n.isInList(t._id))),D("disabled",n.clicked),f("aria-label",s(10,9,"form.button_unpair")),i(2),M(st(14,Se,!n.isInList(t._id),n.isInList(t._id)&&!n.clicked,n.isInList(t._id)&&n.clicked))}}function Ri(e,p){if(e&1&&(b(0,"ul",16)(1,"li",17)(2,"h6",18),d(3),o(4,"translate"),v(),b(5,"p",19),d(6),o(7,"translate"),v()(),G(8,Pi,12,18,"li",20,K),v()),e&2){let t=h(2);i(3),g(s(4,2,"reset.bridge_ind.head_child_active")),i(3),g(s(7,4,"reset.bridge_ind.desc_child_active")),i(2),j(t.pairingsChildActive)}}function Mi(e,p){if(e&1&&R(0,"i",27)(1,"i",28),e&2){let t=h().$implicit;i(),it("opacity",t._matter?"1":"0.25")}}function Vi(e,p){e&1&&R(0,"i",22)}function Ai(e,p){if(e&1){let t=T();b(0,"li",20)(1,"span",21),m(2,Mi,2,2)(3,Vi,1,0,"i",22),v(),b(4,"span",23),d(5),R(6,"br"),b(7,"small",24),d(8),v()(),b(9,"button",25),o(10,"translate"),A("click",function(){let l=I(t).$implicit,x=h(3);return E(x.toggleList(l._id,!1))}),R(11,"i",26),v()()}if(e&2){let t=p.$implicit,n=h(3);i(2),u(n.isMatterSupported?2:3),i(3),C(" ",t.name," "),i(3),g(t._username),i(),M(H(11,Rt,!n.isInList(t._id),n.isInList(t._id))),D("disabled",n.clicked),f("aria-label",s(10,9,"form.button_unpair")),i(2),M(st(14,Ii,!n.isInList(t._id),n.isInList(t._id)&&!n.clicked,n.isInList(t._id)&&n.clicked))}}function Hi(e,p){if(e&1&&(b(0,"ul",16)(1,"li",17)(2,"h6",18),d(3),o(4,"translate"),v(),b(5,"p",19),d(6),o(7,"translate"),v()(),G(8,Ai,12,18,"li",20,K),v()),e&2){let t=h(2);i(3),g(s(4,2,"reset.bridge_ind.head_child_stale")),i(3),g(s(7,4,"reset.bridge_ind.desc_child_stale")),i(2),j(t.pairingsChildStale)}}function Di(e,p){if(e&1&&(b(0,"div",12),R(1,"i",15),v(),m(2,Bi,10,6,"ul",16),m(3,Ri,10,6,"ul",16),m(4,Hi,10,6,"ul",16)),e&2){let t=h();i(2),u(t.pairingsNonChild.length>0?2:-1),i(),u(t.pairingsChildActive.length>0?3:-1),i(),u(t.pairingsChildStale.length>0?4:-1)}}function Li(e,p){if(e&1){let t=T();b(0,"button",29),A("click",function(){I(t);let l=h();return E(l.dismissModal())}),d(1),o(2,"translate"),v()}if(e&2){let t=h();D("disabled",t.clicked),i(),C(" ",s(2,2,"form.button_close")," ")}}function Ni(e,p){if(e&1){let t=T();b(0,"button",30),A("click",function(){I(t);let l=h();return E(l.dismissModal())}),d(1),o(2,"translate"),v()}e&2&&(i(),C(" ",s(2,1,"form.button_close")," "))}function Oi(e,p){if(e&1&&d(0),e&2){let t=h(3);C(" (",t.toDelete.length,") ")}}function zi(e,p){if(e&1&&(d(0),o(1,"translate"),m(2,Oi,1,1)),e&2){let t=h(2);C(" ",s(1,2,"form.button_reset")," "),i(2),u(t.toDelete.length>0?2:-1)}}function Ui(e,p){e&1&&R(0,"i",32)}function Wi(e,p){if(e&1){let t=T();b(0,"button",31),A("click",function(){I(t);let l=h();return E(l.removeBridges())}),m(1,zi,3,4),m(2,Ui,1,0,"i",32),v()}if(e&2){let t=h();D("disabled",!t.toDelete.length||t.clicked),i(),u(t.clicked?-1:1),i(),u(t.clicked?2:-1)}}var ye=(()=>{class e{$activeModal=w(W);$api=w(U);$router=w(J);$settings=w(X);$toastr=w(z);$translate=w(O);clicked=!1;pairingsNonChild=[];pairingsChildActive=[];pairingsChildStale=[];toDelete=[];isMatterSupported=this.$settings.isFeatureEnabled("matterSupport");ngOnInit(){this.loadPairings()}toggleList(t,n=!1){this.toDelete.some(l=>l.id===t)?this.toDelete=this.toDelete.filter(l=>l.id!==t):this.toDelete.push({id:t,resetPairingInfo:n})}isInList(t){return this.toDelete.some(n=>n.id===t)}removeBridges(){return this.clicked=!0,this.$api.delete("/server/pairings",{body:this.toDelete}).subscribe({next:()=>{this.$activeModal.close(),this.$router.navigate(["/restart"],{queryParams:{restarting:!0}}),this.$toastr.success(this.$translate.instant("reset.bridge_ind.done"),this.$translate.instant("toast.title_success"))},error:t=>{this.clicked=!1,console.error(t),this.$toastr.error(this.$translate.instant("reset.bridge_ind.fail"),this.$translate.instant("toast.title_error"))}})}dismissModal(){this.$activeModal.dismiss("Dismiss")}loadPairings(){return y(this,null,function*(){try{let t=(yield P(this.$api.get("/server/pairings"))).filter(n=>!n._main).sort((n,l)=>n.name.localeCompare(l.name));this.pairingsChildActive=t.filter(n=>n._category==="bridge"&&!n._couldBeStale),this.pairingsNonChild=t.filter(n=>n._category!=="bridge"),this.pairingsChildStale=t.filter(n=>n._category==="bridge"&&n._couldBeStale)}catch(t){console.error(t),this.$toastr.error(this.$translate.instant("settings.unpair_bridge.load_error"),this.$translate.instant("toast.title_error")),this.$activeModal.close()}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=L({type:e,selectors:[["ng-component"]],decls:17,vars:12,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,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"disabled"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"disabled"],[1,"text-center","mb-3"],[1,"fas","fa-circle-check","primary-text",2,"font-size","75px"],[1,"text-center","mb-0"],[1,"fas","fa-bridge","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mt-3","mb-0"],[1,"list-group-item"],[1,"mb-1","text-center"],[1,"mb-0","small","grey-text","text-center"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"me-3"],[1,"fas","fa-lg","fa-hap"],[1,"flex-grow-1"],[1,"grey-text","font-monospace"],[1,"btn","btn-danger","m-0","ms-3",3,"click","disabled"],[1,"fas"],[1,"fas","fa-lg","fa-hap","me-2"],[1,"fas","fa-lg","fa-matter"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button","data-bs-dismiss","modal",1,"btn","btn-danger",3,"click","disabled"],[1,"fas","fa-spinner","fa-pulse"]],template:function(n,l){n&1&&(b(0,"div",0)(1,"div",1)(2,"h5",2),d(3),o(4,"translate"),v(),b(5,"button",3),o(6,"translate"),A("click",function(){return l.dismissModal()}),v()(),b(7,"div",4),m(8,Ei,5,3),m(9,Di,5,3),v(),b(10,"div",5)(11,"div",6),m(12,Li,3,4,"button",7),v(),b(13,"div",8),m(14,Ni,3,3,"button",9),v(),b(15,"div",10),m(16,Wi,3,3,"button",11),v()()()),n&2&&(i(3),g(s(4,8,"reset.bridge_ind.title")),i(2),D("disabled",l.clicked),f("aria-label",s(6,10,"form.button_close")),i(3),u(l.pairingsChildActive.length===0&&l.pairingsChildStale.length===0&&l.pairingsNonChild.length===0?8:-1),i(),u(l.pairingsChildActive.length>0||l.pairingsChildStale.length>0||l.pairingsNonChild.length>0?9:-1),i(3),u(l.pairingsChildActive.length>0||l.pairingsChildStale.length>0||l.pairingsNonChild.length>0?12:-1),i(2),u(l.pairingsChildActive.length===0&&l.pairingsChildStale.length===0&&l.pairingsNonChild.length===0?14:-1),i(2),u(l.pairingsChildActive.length>0||l.pairingsChildStale.length>0||l.pairingsNonChild.length>0?16:-1))},dependencies:[lt,N],encapsulation:2})}return e})();function Ki(e,p){if(e&1){let t=T();a(0,"li",9)(1,"div")(2,"span",16),d(3),r(),c(4,"br"),a(5,"span",17),d(6),r()(),a(7,"span")(8,"input",18),vt("ngModelChange",function(l){let x=I(t).$implicit;return bt(x.selected,l)||(x.selected=l),E(l)}),k("ngModelChange",function(){I(t);let l=h();return E(l.onAdapterSelectionChange())}),r(),c(9,"label",19),r()()}if(e&2){let t=p.$implicit;i(3),g(t.ip4||t.ip6),i(3),g(t.iface),i(2),_("id","adapter"+t.iface),ft("ngModel",t.selected),i(),_("for","adapter"+t.iface)}}var Ie=(()=>{class e{$activeModal=w(W);adaptersOriginal=[];adaptersAvailable=[];adaptersSelected=[];isUnchanged=!0;ngOnInit(){this.adaptersAvailable.forEach(t=>{t.selected=this.adaptersSelected.some(n=>n.iface===t.iface)}),this.adaptersOriginal=this.adaptersSelected.map(t=>t.iface)}onAdapterSelectionChange(){this.isUnchanged=this.adaptersOriginal.length===this.adaptersAvailable.filter(t=>t.selected).length&&this.adaptersOriginal.every(t=>this.adaptersAvailable.some(n=>n.iface===t&&n.selected))}submit(){this.$activeModal.close(this.adaptersAvailable.filter(t=>t.selected).map(t=>t.iface))}closeAndReset(){this.adaptersAvailable.forEach(t=>{t.selected=this.adaptersOriginal.includes(t.iface)}),this.isUnchanged=!0,this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=L({type:e,selectors:[["ng-component"]],inputs:{adaptersAvailable:"adaptersAvailable",adaptersSelected:"adaptersSelected"},decls:28,vars:19,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,"text-center","mb-3"],[1,"fas","fa-ethernet","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"list-group","list-group-box"],[1,"list-group-item","d-flex","justify-content-between","align-items-center","flex-row","pb-2"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"],[1,"font-monospace"],[1,"font-monospace","grey-text"],["type","checkbox",1,"rendux-input",3,"ngModelChange","id","ngModel"],[1,"rendux-label","ms-3",3,"for"]],template:function(n,l){n&1&&(a(0,"div",0)(1,"div",1)(2,"h5",2),d(3),o(4,"translate"),r(),a(5,"button",3),o(6,"translate"),k("click",function(){return l.closeAndReset()}),r()(),a(7,"div",4)(8,"div",5),c(9,"i",6),r(),a(10,"ul",7)(11,"li"),d(12),o(13,"translate"),r()(),a(14,"ul",8),G(15,Ki,10,5,"li",9,K),r()(),a(17,"div",10)(18,"div",11)(19,"button",12),o(20,"translate"),k("click",function(){return l.closeAndReset()}),d(21),o(22,"translate"),r()(),c(23,"div",13),a(24,"div",14)(25,"button",15),k("click",function(){return l.submit()}),d(26),o(27,"translate"),r()()()()),n&2&&(i(3),g(s(4,7,"settings.network.title_network_interfaces")),i(2),f("aria-label",s(6,9,"form.button_close")),i(7),g(s(13,11,"settings.network.message_network_interface")),i(3),j(l.adaptersAvailable),i(4),f("aria-label",s(20,13,"form.button_close")),i(2),C(" ",s(22,15,"form.button_close")," "),i(4),_("disabled",l.isUnchanged),i(),C(" ",s(27,17,"form.button_save")," "))},dependencies:[ct,dt,pt,St,N],encapsulation:2})}return e})();var Gi=["wallpaperInput"],ji=e=>({maxFileSizeText:e});function Qi(e,p){if(e&1){let t=T();b(0,"div",10),R(1,"img",20),b(2,"button",21),o(3,"translate"),A("click",function(){I(t);let l=h();return E(l.clearWallpaper())}),R(4,"i",22),v()()}if(e&2){let t=h();i(),D("src",t.wallpaperUrl,Vt),i(),f("aria-label",s(3,2,"form.button_delete"))}}function qi(e,p){e&1&&R(0,"div",11)}var Ee=(()=>{class e{$activeModal=w(W);$api=w(U);$settings=w(X);$toastr=w(z);$translate=w(O);clicked=!1;maxFileSizeText=globalThis.backup.maxBackupSizeText;selectedFile;wallpaperUrl=null;originalWallpaperUrl=null;wallpaperInput=rt("wallpaperInput");ngOnInit(){this.$settings.env.customWallpaperHash&&(this.wallpaperUrl=`${Kt.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`,this.originalWallpaperUrl=this.wallpaperUrl)}onFileChange(t){if(t.length){this.selectedFile=t[0];let n=new FileReader;n.onload=l=>{this.wallpaperUrl=l.target.result},n.readAsDataURL(this.selectedFile)}else delete this.selectedFile,this.wallpaperUrl=this.originalWallpaperUrl}saveWallpaper(){if(this.clicked=!0,this.selectedFile){let t=new FormData;t.append("wallpaper",this.selectedFile,this.selectedFile.name),this.$api.post("/server/wallpaper",t).subscribe({next:()=>{this.$settings.setItem("wallpaper",`ui-wallpaper.${this.selectedFile.name.split(".").pop()}`),this.$activeModal.close(),this.$toastr.success(this.$translate.instant("settings.display.wallpaper_success"),this.$translate.instant("toast.title_success"))},error:n=>{console.error(n),this.$toastr.error(n.error?.message,this.$translate.instant("toast.title_error")),this.clicked=!1}})}else this.$api.delete("/server/wallpaper").subscribe({next:()=>{this.$activeModal.close()},error:t=>{console.error(t),this.$toastr.error(t.error?.message,this.$translate.instant("toast.title_error")),this.clicked=!1}})}clearWallpaper(){this.selectedFile=null,this.wallpaperUrl=this.wallpaperUrl===this.originalWallpaperUrl?null:this.originalWallpaperUrl;let t=this.wallpaperInput();t&&(t.nativeElement.value="")}dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=L({type:e,selectors:[["ng-component"]],viewQuery:function(n,l){n&1&&ot(l.wallpaperInput,Gi,5),n&2&&Ct()},decls:36,vars:28,consts:[["wallpaperInput",""],[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-image","primary-text",2,"font-size","75px"],[1,"mb-3"],[1,"mb-3","text-center"],[1,"position-relative","d-inline-block"],[1,"gradient","anim","rounded",2,"height","200px","width","350px","margin","0 auto"],[1,"mb-0"],["type","file","id","wallpaper","accept","image/*",1,"form-control",3,"change"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click","disabled"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"],["alt","Current Wallpaper",1,"img-fluid","rounded","mx-auto","d-block",2,"height","200px",3,"src"],[1,"btn","btn-danger","position-absolute",2,"top","10px","right","10px",3,"click"],[1,"fas","fa-trash"]],template:function(n,l){if(n&1){let x=T();b(0,"div",1)(1,"div",2)(2,"h5",3),d(3),o(4,"translate"),v(),b(5,"button",4),o(6,"translate"),A("click",function(){return I(x),E(l.dismissModal())}),v()(),b(7,"div",5)(8,"div",6),R(9,"i",7),v(),b(10,"ul",8)(11,"li"),d(12),o(13,"translate"),v(),b(14,"li"),d(15),o(16,"translate"),v(),b(17,"li"),d(18),o(19,"translate"),v()(),b(20,"div",9),m(21,Qi,5,4,"div",10)(22,qi,1,0,"div",11),v(),b(23,"div",12)(24,"input",13,0),A("change",function(S){return I(x),E(l.onFileChange(S.target.files))}),v()()(),b(26,"div",14)(27,"div",15)(28,"button",16),A("click",function(){return I(x),E(l.dismissModal())}),d(29),o(30,"translate"),v()(),R(31,"div",17),b(32,"div",18)(33,"button",19),A("click",function(){return I(x),E(l.saveWallpaper())}),d(34),o(35,"translate"),v()()()()}n&2&&(i(3),g(s(4,11,"settings.display.wallpaper")),i(2),D("disabled",l.clicked),f("aria-label",s(6,13,"form.button_close")),i(7),g(s(13,15,"settings.display.wallpaper_intro")),i(3),g(q(16,17,"settings.display.wallpaper_rule",Y(26,ji,l.maxFileSizeText))),i(3),g(s(19,20,"settings.display.wallpaper_rule2")),i(3),u(l.wallpaperUrl?21:22),i(7),D("disabled",l.clicked),i(),C(" ",s(30,22,"form.button_close")," "),i(4),D("disabled",l.wallpaperUrl===l.originalWallpaperUrl||l.clicked),i(),C(" ",s(35,24,"form.button_save")," "))},dependencies:[mt,N],styles:[".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%}}"]})}return e})();var Ji=["searchInput"],Xi=["sslKeyCertInput"],Yi=["sslPfxInput"],Zi=()=>({standalone:!0}),tt=(e,p)=>({"fa-chevron-down":e,"fa-chevron-right":p}),Mt=e=>({link:e}),tn=(e,p)=>({"badge-danger":e,"badge-info":p});function en(e,p){if(e&1){let t=T();a(0,"button",13),o(1,"translate"),k("click",function(){I(t);let l=h(2);return E(l.clearSearch())}),c(2,"i",14),r()}e&2&&f("aria-label",s(1,1,"form.button_clear"))}function nn(e,p){if(e&1){let t=T();a(0,"div",8)(1,"div",9)(2,"form",10)(3,"input",11,0),o(5,"translate"),vt("ngModelChange",function(l){I(t);let x=h();return bt(x.searchQuery,l)||(x.searchQuery=l),E(l)}),k("ngModelChange",function(){I(t);let l=h();return E(l.filterSettings())}),r(),m(6,en,3,3,"button",12),r()()()}if(e&2){let t=h();i(3),_("placeholder",s(5,4,"form.search")),ft("ngModel",t.searchQuery),_("ngModelOptions",Lt(6,Zi)),i(3),u(t.searchQuery?6:-1)}}function an(e,p){e&1&&c(0,"app-spinner")}function on(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function sn(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),r(),a(4,"div",23),c(5,"input",24),o(6,"translate"),m(7,on,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),g(s(3,7,"settings.name")),i(3),Q("is-invalid",t.hbNameIsInvalid),_("formControl",t.hbNameFormControl),f("aria-label",s(6,9,"settings.name")),i(2),u(t.hbNameIsSaving?7:-1)}}function rn(e,p){if(e&1){let t=T();a(0,"li",22)(1,"span",26),d(2),o(3,"translate"),r(),a(4,"button",27),o(5,"translate"),k("click",function(){I(t);let l=h(4);return E(l.openBackupModal())}),c(6,"i",28),r()()}e&2&&(_("@smoothHide",void 0),i(2),g(s(3,3,"backup.title_backup")),i(2),f("aria-label",s(5,5,"backup.title_backup")))}function ln(e,p){if(e&1){let t=T();a(0,"li",22)(1,"span",26),d(2),o(3,"translate"),r(),a(4,"button",27),o(5,"translate"),k("click",function(){I(t);let l=h(4);return E(l.openConfigBackup())}),c(6,"i",28),r()()}e&2&&(_("@smoothHide",void 0),i(2),g(s(3,3,"config.restore.title")),i(2),f("aria-label",s(5,5,"config.restore.title")))}function dn(e,p){e&1&&(a(0,"li",22)(1,"span",26),d(2),o(3,"translate"),r(),a(4,"a",29),o(5,"translate"),c(6,"i",28),r()()),e&2&&(_("@smoothHide",void 0),i(2),g(s(3,3,"menu.tooltip_user_accounts")),i(2),f("aria-label",s(5,5,"menu.tooltip_user_accounts")))}function pn(e,p){if(e&1&&(a(0,"ul",20),m(1,sn,8,11,"li",21),m(2,rn,7,7,"li",22),m(3,ln,7,7,"li",22),m(4,dn,7,7,"li",22),r()),e&2){let t=h(3);i(),u(t.isItemHidden("setting-name")?-1:1),i(),u(t.isItemHidden("setting-backup")?-1:2),i(),u(t.isItemHidden("setting-restore")?-1:3),i(),u(t.isItemHidden("setting-users")?-1:4)}}function cn(e,p){if(e&1){let t=T();a(0,"div",15)(1,"div",17),k("click",function(){I(t);let l=h(2);return E(l.toggleSection("general"))}),a(2,"h5",18),c(3,"i",19),d(4),o(5,"translate"),r()(),m(6,pn,5,4,"ul",20),r()}if(e&2){let t=h(2);i(),f("aria-expanded",t.showFields.general?"true":"false")("aria-controls","fieldsGeneral"),i(2),M(H(8,tt,t.showFields.general,!t.showFields.general)),i(),C(" ",s(5,6,"settings.general.title_general")," "),i(2),u(t.showFields.general?6:-1)}}function mn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function un(e,p){if(e&1&&(a(0,"li",21),d(1),o(2,"translate"),a(3,"div",23)(4,"select",31)(5,"option",32),d(6),o(7,"translate"),r(),a(8,"option",33),d(9,"Bulgarian (bg)"),r(),a(10,"option",34),d(11,"Catalan (ca)"),r(),a(12,"option",35),d(13,"Chinese - Simplified (zh-CN)"),r(),a(14,"option",36),d(15,"Chinese - Traditional (zh-TW)"),r(),a(16,"option",37),d(17,"Czech (cs)"),r(),a(18,"option",38),d(19,"Dutch (nl)"),r(),a(20,"option",39),d(21,"English (en)"),r(),a(22,"option",40),d(23,"Finnish (fi)"),r(),a(24,"option",41),d(25,"French (fr)"),r(),a(26,"option",42),d(27,"German (de)"),r(),a(28,"option",43),d(29,"Hebrew (he)"),r(),a(30,"option",44),d(31,"Hungarian (hu)"),r(),a(32,"option",45),d(33,"Indonesian (id)"),r(),a(34,"option",46),d(35,"Italian (it)"),r(),a(36,"option",47),d(37,"Japanese (ja)"),r(),a(38,"option",48),d(39,"Korean (ko)"),r(),a(40,"option",49),d(41,"Macedonian (mk)"),r(),a(42,"option",50),d(43,"Norwegian (no)"),r(),a(44,"option",51),d(45,"Polish (pl)"),r(),a(46,"option",52),d(47,"Portuguese (Brazil)"),r(),a(48,"option",53),d(49,"Portuguese (Portugal)"),r(),a(50,"option",54),d(51,"Russian (ru)"),r(),a(52,"option",55),d(53,"Slovenian (sl)"),r(),a(54,"option",56),d(55,"Spanish (es)"),r(),a(56,"option",57),d(57,"Swedish (sv)"),r(),a(58,"option",58),d(59,"Thai (th)"),r(),a(60,"option",59),d(61,"Turkish (tr)"),r(),a(62,"option",60),d(63,"Ukrainian (uk)"),r()(),m(64,mn,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(),C(" ",s(2,5,"settings.display.lang")," "),i(3),_("formControl",t.uiLangFormControl),i(2),g(s(7,7,"form.select.auto")),i(58),u(t.uiLangIsSaving?64:-1)}}function _n(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function hn(e,p){if(e&1&&(a(0,"li",21),d(1),o(2,"translate"),a(3,"div",23)(4,"select",31)(5,"option",61),d(6),o(7,"translate"),r(),a(8,"option",62),d(9),o(10,"translate"),r(),a(11,"option",63),d(12),o(13,"translate"),r(),a(14,"option",64),d(15),o(16,"translate"),r(),a(17,"option",65),d(18),o(19,"translate"),r(),a(20,"option",66),d(21),o(22,"translate"),r(),a(23,"option",67),d(24),o(25,"translate"),r(),a(26,"option",68),d(27),o(28,"translate"),r(),a(29,"option",69),d(30),o(31,"translate"),r(),a(32,"option",70),d(33),o(34,"translate"),r(),a(35,"option",71),d(36),o(37,"translate"),r(),a(38,"option",72),d(39),o(40,"translate"),r(),a(41,"option",73),d(42),o(43,"translate"),r()(),m(44,_n,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(),C(" ",s(2,17,"settings.display.theme")," "),i(3),_("formControl",t.uiThemeFormControl),i(2),g(s(7,19,"settings.display.orange")),i(3),g(s(10,21,"settings.display.red")),i(3),g(s(13,23,"settings.display.pink")),i(3),g(s(16,25,"settings.display.purple")),i(3),g(s(19,27,"settings.display.deep_purple")),i(3),g(s(22,29,"settings.display.indigo")),i(3),g(s(25,31,"settings.display.blue")),i(3),g(s(28,33,"settings.display.bluegrey")),i(3),g(s(31,35,"settings.display.cyan")),i(3),g(s(34,37,"settings.display.green")),i(3),g(s(37,39,"settings.display.teal")),i(3),g(s(40,41,"settings.display.grey")),i(3),g(s(43,43,"settings.display.brown")),i(2),u(t.uiThemeIsSaving?44:-1)}}function gn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Cn(e,p){if(e&1&&(a(0,"li",21),d(1),o(2,"translate"),a(3,"div",23)(4,"select",31)(5,"option",32),d(6),o(7,"translate"),r(),a(8,"option",74),d(9),o(10,"translate"),r(),a(11,"option",75),d(12),o(13,"translate"),r()(),m(14,gn,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(),C(" ",s(2,7,"settings.display.lighting_mode")," "),i(3),_("formControl",t.uiLightFormControl),i(2),g(s(7,9,"form.select.auto")),i(3),g(s(10,11,"settings.display.light")),i(3),g(s(13,13,"settings.display.dark")),i(2),u(t.uiLightIsSaving?14:-1)}}function fn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function bn(e,p){if(e&1&&(a(0,"li",21),d(1),o(2,"translate"),a(3,"div",23)(4,"select",31)(5,"option",76),d(6),o(7,"translate"),r(),a(8,"option",77),d(9),o(10,"translate"),r()(),m(11,fn,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(),C(" ",s(2,6,"settings.display.menu_mode")," "),i(3),_("formControl",t.uiMenuFormControl),i(2),g(s(7,8,"settings.display.menu_default")),i(3),g(s(10,10,"settings.display.menu_freeze")),i(2),u(t.uiMenuIsSaving?11:-1)}}function vn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function xn(e,p){if(e&1&&(a(0,"li",21),d(1),o(2,"translate"),a(3,"div",23)(4,"select",31)(5,"option",78),d(6),o(7,"translate"),r(),a(8,"option",79),d(9),o(10,"translate"),r()(),m(11,vn,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(),C(" ",s(2,6,"settings.display.temp_units")," "),i(3),_("formControl",t.uiTempFormControl),i(2),g(s(7,8,"settings.display.temp_units.c")),i(3),g(s(10,10,"settings.display.temp_units.f")),i(2),u(t.uiTempIsSaving?11:-1)}}function Sn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function yn(e,p){if(e&1&&(a(0,"li",22),d(1),o(2,"translate"),a(3,"div",80)(4,"div",81),c(5,"input",82),o(6,"translate"),c(7,"label",83),r(),m(8,Sn,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(),C(" ",s(2,5,"settings.display.show_betas")," "),i(4),_("formControl",t.uiAlwaysShowBetasFormControl),f("aria-label",s(6,7,"settings.display.show_betas")),i(3),u(t.uiAlwaysShowBetasIsSaving?8:-1)}}function In(e,p){if(e&1){let t=T();a(0,"li",22)(1,"span",26),d(2),o(3,"translate"),r(),a(4,"button",27),o(5,"translate"),k("click",function(){I(t);let l=h(4);return E(l.openWallpaperModal())}),c(6,"i",28),r()()}e&2&&(_("@smoothHide",void 0),i(2),g(s(3,3,"settings.display.wallpaper")),i(2),f("aria-label",s(5,5,"settings.display.wallpaper")))}function En(e,p){if(e&1&&(a(0,"ul",30),m(1,un,65,9,"li",21),m(2,hn,45,45,"li",21),m(3,Cn,15,15,"li",21),m(4,bn,12,12,"li",21),m(5,xn,12,12,"li",21),m(6,yn,9,9,"li",22),m(7,In,7,7,"li",22),r()),e&2){let t=h(3);i(),u(t.isItemHidden("setting-lang")?-1:1),i(),u(t.isItemHidden("setting-theme")?-1:2),i(),u(t.isItemHidden("setting-lighting")?-1:3),i(),u(t.isItemHidden("setting-menu")?-1:4),i(),u(t.isItemHidden("setting-temp")?-1:5),i(),u(t.isItemHidden("setting-betas")?-1:6),i(),u(t.isItemHidden("setting-wallpaper")?-1:7)}}function wn(e,p){if(e&1){let t=T();a(0,"div",15)(1,"div",17),k("click",function(){I(t);let l=h(2);return E(l.toggleSection("display"))}),a(2,"h5",18),c(3,"i",19),d(4),o(5,"translate"),r()(),m(6,En,8,7,"ul",30),r()}if(e&2){let t=h(2);i(),f("aria-expanded",t.showFields.display?"true":"false")("aria-controls","fieldsDisplay"),i(2),M(H(8,tt,t.showFields.display,!t.showFields.display)),i(),C(" ",s(5,6,"settings.general.title_display")," "),i(2),u(t.showFields.display?6:-1)}}function kn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Tn(e,p){if(e&1&&(a(0,"li",22)(1,"span"),d(2),o(3,"translate"),a(4,"code"),d(5,"-D"),r(),c(6,"br"),a(7,"small",85),d(8),o(9,"translate"),r()(),a(10,"div",80)(11,"div",81),c(12,"input",86),o(13,"translate"),c(14,"label",87),r(),m(15,kn,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,6,"settings.startup.debug")," "),i(6),g(s(9,8,t.debugFieldDesc)),i(4),_("formControl",t.hbDebugFormControl),f("aria-label",s(13,10,"settings.startup.debug")),i(3),u(t.hbDebugIsSaving?15:-1)}}function Bn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function $n(e,p){if(e&1&&(a(0,"li",22)(1,"span"),d(2),o(3,"translate"),a(4,"code"),d(5,"-I"),r(),c(6,"br"),a(7,"small",85),d(8),o(9,"translate"),r()(),a(10,"div",80)(11,"div",81),c(12,"input",88),o(13,"translate"),c(14,"label",89),r(),m(15,Bn,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,6,"settings.startup.insecure")," "),i(6),g(s(9,8,"settings.startup.insecure_desc")),i(4),_("formControl",t.hbInsecureFormControl),f("aria-label",s(13,10,"settings.startup.insecure")),i(3),u(t.hbInsecureIsSaving?15:-1)}}function Fn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Pn(e,p){if(e&1&&(a(0,"li",22)(1,"span"),d(2),o(3,"translate"),a(4,"code"),d(5,"-K"),r(),c(6,"br"),a(7,"small",85),d(8),o(9,"translate"),r()(),a(10,"div",80)(11,"div",81),c(12,"input",90),o(13,"translate"),c(14,"label",91),r(),m(15,Fn,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,6,"settings.startup.keep_accessories")," "),i(6),g(s(9,8,"settings.startup.keep_accessories_desc")),i(4),_("formControl",t.hbKeepFormControl),f("aria-label",s(13,10,"settings.startup.keep_accessories")),i(3),u(t.hbKeepIsSaving?15:-1)}}function Rn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Mn(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),a(4,"span",92),d(5),o(6,"translate"),r(),c(7,"br"),a(8,"small",85),c(9,"span",93),o(10,"translate"),d(11),o(12,"translate"),r()(),a(13,"div",94)(14,"div",95),c(15,"input",96),o(16,"translate"),m(17,Rn,1,1,"i",25),r()()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,14,"settings.startup.scheduled_restart")," "),i(3),g(s(6,16,"common.labels.beta")),i(4),_("innerHtml",q(10,18,"settings.startup.scheduled_restart_desc",Y(25,Mt,t.linkCron)),et),i(2),C(" ",s(12,21,"settings.startup.scheduled_restart_desc_2")," "),i(4),it("letter-spacing","0.15em")("text-align","center"),Q("is-invalid",t.scheduledRestartCronIsInvalid),_("formControl",t.scheduledRestartCronFormControl),f("aria-label",s(16,23,"settings.startup.scheduled_restart")),i(2),u(t.scheduledRestartCronIsSaving?17:-1)}}function Vn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function An(e,p){if(e&1&&(a(0,"li",22)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"div",80)(9,"div",81),c(10,"input",97),o(11,"translate"),c(12,"label",98),r(),m(13,Vn,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,6,"settings.startup.metrics")),i(4),g(s(7,8,"settings.startup.metrics_desc")),i(4),_("formControl",t.uiMetricsFormControl),f("aria-label",s(11,10,"settings.startup.metrics")),i(3),u(t.uiMetricsIsSaving?13:-1)}}function Hn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Dn(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"div",23),c(9,"input",99),o(10,"translate"),m(11,Hn,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,6,"settings.network.hb_package")),i(4),g(s(7,8,"settings.network.hb_package_desc")),i(3),_("formControl",t.hbPackageFormControl),f("aria-label",s(10,10,"settings.network.hb_package")),i(2),u(t.hbPackageIsSaving?11:-1)}}function Ln(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Nn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function On(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"div",101),c(9,"input",102),o(10,"translate"),m(11,Nn,1,1,"i",25),r()()),e&2){let t=h(5);_("@smoothHide",void 0),i(2),C(" ",s(3,6,"settings.linux.restart")),i(4),g(s(7,8,"settings.linux.restart_desc")),i(3),_("formControl",t.hbLinuxRestartFormControl),f("aria-label",s(10,10,"settings.linux.restart")),i(2),u(t.hbLinuxRestartIsSaving?11:-1)}}function zn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Un(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"div",23),c(9,"input",103),o(10,"translate"),m(11,zn,1,1,"i",25),r()()),e&2){let t=h(5);_("@smoothHide",void 0),i(2),C(" ",s(3,6,"settings.linux.temp")),i(4),g(s(7,8,"settings.linux.temp_desc")),i(3),_("formControl",t.uiTempFileFormControl),f("aria-label",s(10,10,"settings.linux.temp")),i(2),u(t.uiTempFileIsSaving?11:-1)}}function Wn(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"div",23),c(9,"input",100),o(10,"translate"),m(11,Ln,1,1,"i",25),r()(),m(12,On,12,12,"li",21),m(13,Un,12,12,"li",21)),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,8,"settings.linux.shutdown")),i(4),g(s(7,10,"settings.linux.shutdown_desc")),i(3),_("formControl",t.hbLinuxShutdownFormControl),f("aria-label",s(10,12,"settings.linux.shutdown")),i(2),u(t.hbLinuxShutdownIsSaving?11:-1),i(),u(t.isItemHidden("setting-linux-restart")?-1:12),i(),u(t.runningOnRaspberryPi?13:-1)}}function Kn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Gn(e,p){if(e&1&&(a(0,"li",21)(1,"span")(2,"span",104),d(3,"DEBUG"),r(),c(4,"br")(5,"small",105),o(6,"translate"),r(),a(7,"div",23),c(8,"input",106),m(9,Kn,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(5),_("innerHTML",q(6,4,"settings.service.debug_tooltip",Y(7,Mt,t.linkDebug)),et),i(3),_("formControl",t.hbEnvDebugFormControl),i(),u(t.hbEnvDebugIsSaving?9:-1)}}function jn(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Qn(e,p){if(e&1&&(a(0,"li",21)(1,"span")(2,"span",104),d(3,"NODE_OPTIONS"),r(),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"div",23),c(9,"input",107),m(10,jn,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(6),g(s(7,4,"settings.service.node_tooltip")),i(3),_("formControl",t.hbEnvNodeFormControl),i(),u(t.hbEnvNodeIsSaving?10:-1)}}function qn(e,p){e&1&&(a(0,"li",22)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"a",108),o(9,"translate"),c(10,"i",28),r()()),e&2&&(_("@smoothHide",void 0),i(2),C(" ",s(3,4,"menu.docker.startup_script")),i(4),g(s(7,6,"platform.docker.script_help")),i(2),f("aria-label",s(9,8,"menu.docker.startup_script")))}function Jn(e,p){if(e&1&&(a(0,"ul",84),m(1,Tn,16,12,"li",22),m(2,$n,16,12,"li",22),m(3,Pn,16,12,"li",22),m(4,Mn,18,27,"li",21),m(5,An,14,12,"li",22),m(6,Dn,12,12,"li",21),m(7,Wn,14,14),m(8,Gn,10,9,"li",21),m(9,Qn,11,6,"li",21),m(10,qn,11,10,"li",22),r()),e&2){let t=h(3);i(),u(t.isItemHidden("setting-debug")?-1:1),i(),u(t.isItemHidden("setting-insecure")?-1:2),i(),u(t.isItemHidden("setting-keep")?-1:3),i(),u(t.isItemHidden("setting-scheduled-restart")?-1:4),i(),u(t.isItemHidden("setting-metrics-startup")?-1:5),i(),u(t.isItemHidden("setting-package-path")?-1:6),i(),u(t.platform==="linux"?7:-1),i(),u(t.isItemHidden("setting-env-debug-manual")?-1:8),i(),u(t.isItemHidden("setting-env-node")?-1:9),i(),u(t.runningInDocker?10:-1)}}function Xn(e,p){if(e&1){let t=T();a(0,"div",15)(1,"div",17),k("click",function(){I(t);let l=h(2);return E(l.toggleSection("startup"))}),a(2,"h5",18),c(3,"i",19),d(4),o(5,"translate"),r()(),m(6,Jn,11,10,"ul",84),r()}if(e&2){let t=h(2);i(),f("aria-expanded",t.showFields.startup?"true":"false")("aria-controls","fieldsStartup"),i(2),M(H(8,tt,t.showFields.startup,!t.showFields.startup)),i(),C(" ",s(5,6,"settings.title_startup_options")," "),i(2),u(t.showFields.startup?6:-1)}}function Yn(e,p){e&1&&c(0,"i",114)}function Zn(e,p){if(e&1&&(a(0,"span",113),m(1,Yn,1,0,"i",114),d(2),a(3,"span",115),d(4),o(5,"translate"),r()()),e&2){let t=p.$implicit;M(H(7,tn,t.missing,!t.missing)),i(),u(t.missing?1:-1),i(),C(" ",t.iface,": "),i(2),g(t.missing?s(5,5,"settings.mdns_advertiser_not_connected"):t.ip4||t.ip6)}}function ta(e,p){if(e&1){let t=T();a(0,"li",22)(1,"span",26),d(2),o(3,"translate"),c(4,"br"),a(5,"div",110),d(6),o(7,"translate"),r(),G(8,Zn,6,10,"span",111,K),r(),a(10,"button",112),o(11,"translate"),k("click",function(){I(t);let l=h(4);return E(l.selectNetworkInterfaces())}),c(12,"i",28),r()()}if(e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,5,"settings.network.title_network_interfaces")),i(4),g(s(7,7,"settings.network.message_network_interface")),i(2),j(t.adaptersSelected),i(2),_("disabled",!t.adaptersAvailable.length),f("aria-label",s(11,9,"settings.network.title_network_interfaces"))}}function ea(e,p){e&1&&(a(0,"option",116),d(1),o(2,"translate"),r()),e&2&&(i(),C("Avahi (",s(2,1,"settings.mdns_advertiser_rec"),")"))}function ia(e,p){e&1&&(a(0,"option",119),d(1),o(2,"translate"),r()),e&2&&(i(),C("systemd-resolved (",s(2,1,"settings.mdns_advertiser_exp"),")"))}function na(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function aa(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"div",23)(9,"select",31),o(10,"translate"),m(11,ea,3,3,"option",116),a(12,"option",117),d(13),o(14,"translate"),r(),a(15,"option",118),d(16,"Bonjour HAP"),r(),m(17,ia,3,3,"option",119),r(),m(18,na,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,9,"settings.mdns_advertiser")),i(4),g(s(7,11,"settings.mdns_advertiser_help")),i(3),_("formControl",t.hbMDnsFormControl),f("aria-label",s(10,13,"settings.mdns_advertiser")),i(2),u(t.showAvahiMdnsOption?11:-1),i(2),C(" Ciao ",t.showAvahiMdnsOption?"":"("+s(14,15,"settings.mdns_advertiser_rec")+")"," "),i(4),u(t.showResolvedMdnsOption?17:-1),i(),u(t.hbMDnsIsSaving?18:-1)}}function oa(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function sa(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"div",23),c(9,"input",120),o(10,"translate"),m(11,oa,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,8,"settings.network.port_hb")),i(4),g(s(7,10,"settings.network.port_hb_desc")),i(3),Q("is-invalid",t.hbPortIsInvalid),_("formControl",t.hbPortFormControl),f("aria-label",s(10,12,"settings.network.port_hb")),i(2),u(t.hbPortIsSaving?11:-1)}}function ra(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function la(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"div",23),c(9,"input",120),o(10,"translate"),m(11,ra,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,8,"settings.network.port_start")),i(4),g(s(7,10,"settings.network.port_start_desc")),i(3),Q("is-invalid",t.hbStartPortIsInvalid),_("formControl",t.hbStartPortFormControl),f("aria-label",s(10,12,"settings.network.port_start")),i(2),u(t.hbStartPortIsSaving?11:-1)}}function da(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function pa(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"div",23),c(9,"input",120),o(10,"translate"),m(11,da,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,8,"settings.network.port_end")),i(4),g(s(7,10,"settings.network.port_end_desc")),i(3),Q("is-invalid",t.hbEndPortIsInvalid),_("formControl",t.hbEndPortFormControl),f("aria-label",s(10,12,"settings.network.port_end")),i(2),u(t.hbEndPortIsSaving?11:-1)}}function ca(e,p){e&1&&(c(0,"br"),a(1,"small",85),c(2,"i",123),d(3),o(4,"translate"),r()),e&2&&(i(3),C(" ",s(4,1,"settings.warning_pwa")," "))}function ma(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function ua(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),c(4,"br")(5,"small",121),o(6,"translate"),m(7,ca,5,3),r(),a(8,"div",23),c(9,"input",122),o(10,"translate"),m(11,ma,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,7,"settings.network.host")),i(3),_("innerHtml",s(6,9,"settings.network.host_desc"),et),i(2),u(t.isPwa?7:-1),i(2),_("formControl",t.uiHostFormControl),f("aria-label",s(10,11,"settings.network.host")),i(2),u(t.uiHostIsSaving?11:-1)}}function _a(e,p){e&1&&(c(0,"br"),a(1,"small",85),c(2,"i",123),d(3),o(4,"translate"),r()),e&2&&(i(3),C(" ",s(4,1,"settings.warning_pwa")," "))}function ha(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function ga(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r(),m(8,_a,5,3),r(),a(9,"div",23),c(10,"input",124),o(11,"translate"),m(12,ha,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,7,"settings.network.proxy")),i(4),g(s(7,9,"settings.network.proxy_desc")),i(2),u(t.isPwa?8:-1),i(2),_("formControl",t.uiProxyHostFormControl),f("aria-label",s(11,11,"settings.network.proxy")),i(2),u(t.uiProxyHostIsSaving?12:-1)}}function Ca(e,p){e&1&&(c(0,"br"),a(1,"small",85),c(2,"i",123),d(3),o(4,"translate"),r()),e&2&&(i(3),C(" ",s(4,1,"settings.warning_pwa")," "))}function fa(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function ba(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r(),m(8,Ca,5,3),r(),a(9,"div",23),c(10,"input",125),o(11,"translate"),m(12,fa,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,9,"settings.network.port_ui")),i(4),g(s(7,11,"settings.network.port_ui_desc")),i(2),u(t.isPwa?8:-1),i(2),Q("is-invalid",t.uiPortIsInvalid),_("formControl",t.uiPortFormControl),f("aria-label",s(11,13,"settings.network.port_ui")),i(2),u(t.uiPortIsSaving?12:-1)}}function va(e,p){e&1&&(c(0,"br"),a(1,"small",85),c(2,"i",123)(3,"span",93),o(4,"translate"),r()),e&2&&(i(3),_("innerHtml",s(4,1,"settings.warning_webroot"),et))}function xa(e,p){e&1&&(c(0,"br"),a(1,"small",85),c(2,"i",123)(3,"span",93),o(4,"translate"),r()),e&2&&(i(3),_("innerHtml",s(4,1,"settings.warning_pwa"),et))}function Sa(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function ya(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),a(4,"span",92),d(5),o(6,"translate"),r(),c(7,"br")(8,"small",121),o(9,"translate"),m(10,va,5,3)(11,xa,5,3),r(),a(12,"div",23),c(13,"input",126),o(14,"translate"),m(15,Sa,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,8,"settings.network.webroot")," "),i(3),g(s(6,10,"common.labels.beta")),i(3),_("innerHtml",s(9,12,"settings.network.webroot_desc"),et),i(2),u(t.webrootSettingDisabledAccess?10:t.isPwa?11:-1),i(3),_("formControl",t.uiWebrootFormControl),f("aria-label",s(14,14,"settings.network.webroot")),i(2),u(t.uiWebrootIsSaving?15:-1)}}function Ia(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Ea(e,p){if(e&1&&(a(0,"li",22)(1,"span"),d(2),o(3,"translate"),a(4,"span",92),d(5),o(6,"translate"),r(),c(7,"br"),a(8,"small",85),d(9),o(10,"translate"),r()(),a(11,"div",80)(12,"div",81),c(13,"input",127),o(14,"translate"),c(15,"label",128),r(),m(16,Ia,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,7,"settings.network.mdns_advertise")," "),i(3),g(s(6,9,"common.labels.beta")),i(4),g(s(10,11,"settings.network.mdns_advertise_help")),i(4),_("formControl",t.enableMdnsAdvertiseFormControl),f("aria-label",s(14,13,"settings.network.mdns_advertise")),i(3),u(t.enableMdnsAdvertiseIsSaving?16:-1)}}function wa(e,p){if(e&1&&(a(0,"ul",109),m(1,ta,13,11,"li",22),m(2,aa,19,17,"li",21),m(3,sa,12,14,"li",21),m(4,la,12,14,"li",21),m(5,pa,12,14,"li",21),m(6,ua,12,13,"li",21),m(7,ga,13,13,"li",21),m(8,ba,13,15,"li",21),m(9,ya,16,16,"li",21),m(10,Ea,17,15,"li",22),r()),e&2){let t=h(3);i(),u(t.isItemHidden("setting-interfaces")?-1:1),i(),u(t.isItemHidden("setting-mdns")?-1:2),i(),u(t.isItemHidden("setting-port-hb")?-1:3),i(),u(t.isItemHidden("setting-port-range")?-1:4),i(),u(t.isItemHidden("setting-port-end")?-1:5),i(),u(t.isItemHidden("setting-network-host")?-1:6),i(),u(t.isItemHidden("setting-network-proxy")?-1:7),i(),u(t.isItemHidden("setting-ui-port-network")?-1:8),i(),u(t.isItemHidden("setting-webroot-network")?-1:9),i(),u(t.isItemHidden("setting-mdns-advertise")?-1:10)}}function ka(e,p){if(e&1){let t=T();a(0,"div",15)(1,"div",17),k("click",function(){I(t);let l=h(2);return E(l.toggleSection("network"))}),a(2,"h5",18),c(3,"i",19),d(4),o(5,"translate"),r()(),m(6,wa,11,10,"ul",109),r()}if(e&2){let t=h(2);i(),f("aria-expanded",t.showFields.network?"true":"false")("aria-controls","fieldsNetwork"),i(2),M(H(8,tt,t.showFields.network,!t.showFields.network)),i(),C(" ",s(5,6,"settings.network.title_network")," "),i(2),u(t.showFields.network?6:-1)}}function Ta(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Ba(e,p){if(e&1&&(a(0,"li",22)(1,"span"),d(2),o(3,"translate"),a(4,"span",92),d(5),o(6,"translate"),r(),c(7,"br"),a(8,"small",85),d(9),o(10,"translate"),r()(),a(11,"div",80)(12,"div",81),c(13,"input",131),o(14,"translate"),c(15,"label",132),r(),m(16,Ta,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,7,"settings.matter.enabled")," "),i(3),g(s(6,9,"common.labels.beta")),i(4),g(s(10,11,"settings.matter.enabled_desc")),i(4),_("formControl",t.matterEnabledFormControl),f("aria-label",s(14,13,"settings.matter.enabled")),i(3),u(t.matterEnabledIsSaving?16:-1)}}function $a(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Fa(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"div",23),c(9,"input",133),o(10,"translate"),m(11,$a,1,1,"i",25),r()()),e&2){let t=h(5);_("@smoothHide",void 0),i(2),C(" ",s(3,8,"settings.matter.port")),i(4),g(s(7,10,"settings.matter.port_desc")),i(3),Q("is-invalid",t.matterPortIsInvalid),_("formControl",t.matterPortFormControl),f("aria-label",s(10,12,"settings.matter.port")),i(2),u(t.matterPortIsSaving?11:-1)}}function Pa(e,p){if(e&1&&m(0,Fa,12,14,"li",21),e&2){let t=h(4);u(t.isItemHidden("setting-matter-port")?-1:0)}}function Ra(e,p){if(e&1&&(a(0,"p",129),d(1),o(2,"translate"),r(),a(3,"ul",130),m(4,Ba,17,15,"li",22),m(5,Pa,1,1),r()),e&2){let t=h(3);i(),g(s(2,3,"settings.matter.desc")),i(3),u(t.isItemHidden("setting-matter-enabled")?-1:4),i(),u(t.matterEnabledFormControl.value?5:-1)}}function Ma(e,p){if(e&1){let t=T();a(0,"div",15)(1,"div",17),k("click",function(){I(t);let l=h(2);return E(l.toggleSection("matter"))}),a(2,"h5",18),c(3,"i",19),d(4),o(5,"translate"),r()(),m(6,Ra,6,5),r()}if(e&2){let t=h(2);i(),f("aria-expanded",t.showFields.matter?"true":"false")("aria-controls","fieldsMatter"),i(2),M(H(8,tt,t.showFields.matter,!t.showFields.matter)),i(),C(" ",s(5,6,"settings.matter.title")," "),i(2),u(t.showFields.matter?6:-1)}}function Va(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Aa(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"div",23),c(9,"input",135),o(10,"translate"),m(11,Va,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,8,"settings.terminal.log_max")),i(4),g(s(7,10,"settings.terminal.log_max_desc")),i(3),Q("is-invalid",t.hbLogSizeIsInvalid),_("formControl",t.hbLogSizeFormControl),f("aria-label",s(10,12,"settings.terminal.log_max")),i(2),u(t.hbLogSizeIsSaving?11:-1)}}function Ha(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Da(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"div",23),c(9,"input",136),o(10,"translate"),m(11,Ha,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,8,"settings.terminal.log_truncate")),i(4),g(s(7,10,"settings.terminal.log_truncate_desc")),i(3),Q("is-invalid",t.hbLogTruncateIsInvalid),_("formControl",t.hbLogTruncateFormControl),f("aria-label",s(10,12,"settings.terminal.log_truncate")),i(2),u(t.hbLogTruncateIsSaving?11:-1)}}function La(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Na(e,p){if(e&1&&(a(0,"li",22)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"div",80)(9,"div",81),c(10,"input",137),o(11,"translate"),c(12,"label",138),r(),m(13,La,1,1,"i",25),r()()),e&2){let t=h(5);_("@smoothHide",void 0),i(2),C(" ",s(3,6,"settings.terminal.persistence")),i(4),g(s(7,8,"settings.terminal.persistence_help")),i(4),_("formControl",t.uiTerminalPersistenceFormControl),f("aria-label",s(11,10,"settings.terminal.persistence")),i(3),u(t.uiTerminalPersistenceIsSaving?13:-1)}}function Oa(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function za(e,p){if(e&1&&(a(0,"li",22)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"div",80)(9,"div",81),c(10,"input",139),o(11,"translate"),c(12,"label",140),r(),m(13,Oa,1,1,"i",25),r()()),e&2){let t=h(5);_("@smoothHide",void 0),i(2),C(" ",s(3,6,"settings.terminal.warning")),i(4),g(s(7,8,"settings.terminal.warning_help")),i(4),_("formControl",t.uiTerminalHideWarningFormControl),f("aria-label",s(11,10,"settings.terminal.warning")),i(3),u(t.uiTerminalHideWarningIsSaving?13:-1)}}function Ua(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Wa(e,p){if(e&1&&(a(0,"li",21)(1,"div",141)(2,"span"),d(3),o(4,"translate"),r(),a(5,"div",142),d(6),o(7,"translate"),r()(),a(8,"div",23),c(9,"input",143),o(10,"translate"),m(11,Ua,1,1,"i",25),r()()),e&2){let t=h(6);_("@smoothHide",void 0),i(3),g(s(4,8,"settings.terminal.buffer_size")),i(3),g(s(7,10,"settings.terminal.buffer_size_help")),i(3),Q("is-invalid",t.uiTerminalBufferSizeIsInvalid),_("formControl",t.uiTerminalBufferSizeFormControl),f("aria-label",s(10,12,"settings.terminal.buffer_size")),i(2),u(t.uiTerminalBufferSizeIsSaving?11:-1)}}function Ka(e,p){if(e&1&&m(0,Wa,12,14,"li",21),e&2){let t=h(5);u(t.isItemHidden("setting-terminal-buffer")?-1:0)}}function Ga(e,p){if(e&1&&(m(0,Na,14,12,"li",22),m(1,za,14,12,"li",22),m(2,Ka,1,1)),e&2){let t=h(4);u(t.isItemHidden("setting-terminal-persistence")?-1:0),i(),u(t.uiTerminalPersistenceFormControl.value?-1:1),i(),u(t.uiTerminalPersistenceFormControl.value?2:-1)}}function ja(e,p){if(e&1&&(a(0,"ul",134),m(1,Aa,12,14,"li",21),m(2,Da,12,14,"li",21),m(3,Ga,3,3),r()),e&2){let t=h(3);i(),u(t.isItemHidden("setting-terminal-log-max")?-1:1),i(),u(t.hbLogSizeFormControl.value>0?2:-1),i(),u(t.enableTerminalAccess?3:-1)}}function Qa(e,p){if(e&1){let t=T();a(0,"div",15)(1,"div",17),k("click",function(){I(t);let l=h(2);return E(l.toggleSection("terminal"))}),a(2,"h5",18),c(3,"i",19),d(4),o(5,"translate"),r()(),m(6,ja,4,3,"ul",134),r()}if(e&2){let t=h(2);i(),f("aria-expanded",t.showFields.terminal?"true":"false")("aria-controls","fieldsTerminal"),i(2),M(H(8,tt,t.showFields.terminal,!t.showFields.terminal)),i(),C(" ",s(5,6,"settings.network.title_terminal")," "),i(2),u(t.showFields.terminal?6:-1)}}function qa(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Ja(e,p){if(e&1&&(a(0,"li",22)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"div",80)(9,"div",81),c(10,"input",145),o(11,"translate"),c(12,"label",146),r(),m(13,qa,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,6,"settings.security.auth")),i(4),g(s(7,8,"settings.security.auth_desc")),i(4),_("formControl",t.uiAuthFormControl),f("aria-label",s(11,10,"settings.security.auth")),i(3),u(t.uiAuthIsSaving?13:-1)}}function Xa(e,p){e&1&&c(0,"i",149),e&2&&_("@fadeInOut",void 0)}function Ya(e,p){if(e&1&&(a(0,"li",22)(1,"span"),d(2),o(3,"translate"),a(4,"span",92),d(5),o(6,"translate"),r(),c(7,"br"),a(8,"small",85),d(9),o(10,"translate"),r()(),a(11,"div",80)(12,"div",81),c(13,"input",147),o(14,"translate"),c(15,"label",148),r(),m(16,Xa,1,1,"i",149),r()()),e&2){let t=h(5);_("@smoothHide",void 0),i(2),C(" ",s(3,7,"settings.startup.session_inactivity_based")," "),i(3),g(s(6,9,"common.labels.beta")),i(4),g(s(10,11,"settings.startup.session_inactivity_based_desc")),i(4),_("formControl",t.uiSessionTimeoutInactivityBasedFormControl),f("aria-label",s(14,13,"settings.startup.session_inactivity_based")),i(3),u(t.uiSessionTimeoutInactivityBasedIsSaving?16:-1)}}function Za(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function to(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"div",23)(9,"div",150)(10,"div",80),c(11,"input",151),o(12,"translate"),a(13,"label",152),d(14),o(15,"translate"),r()(),a(16,"div",80),c(17,"input",153),o(18,"translate"),a(19,"label",152),d(20),o(21,"translate"),r()(),a(22,"div",80),c(23,"input",154),o(24,"translate"),a(25,"label",152),d(26),o(27,"translate"),r()()(),m(28,Za,1,1,"i",25),r()()),e&2){let t=h(5);_("@smoothHide",void 0),i(2),C(" ",s(3,19,"settings.startup.session")),i(4),g(s(7,21,"settings.startup.session_desc")),i(5),Q("is-invalid",t.uiSessionTimeoutIsInvalid),_("formControl",t.uiSessionTimeoutDaysFormControl),f("aria-label",s(12,23,"settings.startup.session_days")),i(3),g(s(15,25,"settings.startup.session_days")),i(3),Q("is-invalid",t.uiSessionTimeoutIsInvalid),_("formControl",t.uiSessionTimeoutHoursFormControl),f("aria-label",s(18,27,"settings.startup.session_hours")),i(3),g(s(21,29,"settings.startup.session_hours")),i(3),Q("is-invalid",t.uiSessionTimeoutIsInvalid),_("formControl",t.uiSessionTimeoutMinutesFormControl),f("aria-label",s(24,31,"settings.startup.session_minutes")),i(3),g(s(27,33,"settings.startup.session_minutes")),i(2),u(t.uiSessionTimeoutIsSaving?28:-1)}}function eo(e,p){if(e&1&&(m(0,Ya,17,15,"li",22),m(1,to,29,35,"li",21)),e&2){let t=h(4);u(t.isItemHidden("setting-session-inactivity")?-1:0),i(),u(t.isItemHidden("setting-security-session")?-1:1)}}function io(e,p){if(e&1&&(a(0,"small",85),c(1,"span",93),o(2,"translate"),r()),e&2){let t=h(5);i(),_("innerHtml",q(2,1,"settings.security.https_raspbian",Y(4,Mt,t.linkRaspbianSsl)),et)}}function no(e,p){e&1&&(c(0,"br"),a(1,"small",85),c(2,"i",123),d(3),o(4,"translate"),r()),e&2&&(i(3),C(" ",s(4,1,"settings.warning_pwa")," "))}function ao(e,p){if(e&1&&(a(0,"small",85),d(1),o(2,"translate"),r(),m(3,no,5,3)),e&2){let t=h(5);i(),g(s(2,2,"settings.security.https_desc")),i(2),u(t.isPwa?3:-1)}}function oo(e,p){e&1&&(a(0,"option",157),d(1),o(2,"translate"),r()),e&2&&(i(),g(s(2,1,"settings.security.https_selfsigned")))}function so(e,p){if(e&1){let t=T();a(0,"button",161),o(1,"translate"),o(2,"translate"),k("click",function(){I(t);let l=h(5);return E(l.validateSsl())}),c(3,"i",162),r()}e&2&&(_("title",nt(s(1,3,"settings.security.ssl_validate"))),f("aria-label",s(2,5,"settings.security.ssl_validate")))}function ro(e,p){if(e&1&&(a(0,"li",21)(1,"span"),d(2),o(3,"translate"),c(4,"br"),m(5,io,3,6,"small",85)(6,ao,4,4),r(),a(7,"div",23)(8,"select",155),o(9,"translate"),a(10,"option",156),d(11),o(12,"translate"),r(),m(13,oo,3,3,"option",157),a(14,"option",158),d(15),o(16,"translate"),r(),a(17,"option",159),d(18),o(19,"translate"),r()(),m(20,so,4,7,"button",160),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,11,"settings.security.https")),i(3),u(t.runningOnRaspbianImage?5:6),i(3),_("formControl",t.uiSslTypeFormControl)("hidden",t.runningOnRaspbianImage),f("aria-label",s(9,13,"settings.security.https")),i(3),g(s(12,15,"accessories.control.off")),i(2),u(t.runningOnRaspbianImage?-1:13),i(2),g(s(16,17,"settings.security.https_keycert")),i(3),g(s(19,19,"settings.security.https_pfx")),i(2),u(t.uiSslTypeFormControl.value!=="off"?20:-1)}}function lo(e,p){e&1&&(c(0,"br"),a(1,"small",85),c(2,"i",123),d(3),o(4,"translate"),r()),e&2&&(i(3),C(" ",s(4,1,"settings.warning_pwa")," "))}function po(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function co(e,p){if(e&1){let t=T();a(0,"li",21)(1,"span"),d(2),o(3,"translate"),a(4,"span",92),d(5),o(6,"translate"),r(),c(7,"br"),a(8,"small",85),d(9),o(10,"translate"),r()(),m(11,lo,5,3),a(12,"div",23),c(13,"input",163),o(14,"translate"),a(15,"button",164),o(16,"translate"),o(17,"translate"),k("click",function(){I(t);let l=h(4);return E(l.generateSelfSigned("keycert"))}),c(18,"i",165),r(),a(19,"button",166),o(20,"translate"),o(21,"translate"),k("click",function(){I(t);let l=h(4);return E(l.generateSelfSigned("selfsigned"))}),c(22,"i",167),r(),m(23,po,1,1,"i",25),r()()}if(e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,14,"settings.security.selfsigned_hostnames")," "),i(3),g(s(6,16,"common.labels.beta")),i(4),g(s(10,18,"settings.security.selfsigned_hostnames_desc")),i(2),u(t.isPwa?11:-1),i(2),_("formControl",t.uiSslSelfSignedHostnamesFormControl),f("aria-label",s(14,20,"settings.security.selfsigned_hostnames")),i(2),_("title",nt(s(16,22,"settings.security.selfsigned_generate_keycert"))),f("aria-label",s(17,24,"settings.security.selfsigned_generate_keycert")),i(4),_("title",nt(s(20,26,"settings.security.selfsigned_generate_selfsigned"))),f("aria-label",s(21,28,"settings.security.selfsigned_generate_selfsigned")),i(4),u(t.uiSslSelfSignedHostnamesIsSaving?23:-1)}}function mo(e,p){e&1&&(c(0,"br"),a(1,"small",85),c(2,"i",123),d(3),o(4,"translate"),r()),e&2&&(i(3),C(" ",s(4,1,"settings.warning_pwa")," "))}function uo(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function _o(e,p){e&1&&(c(0,"br"),a(1,"small",85),c(2,"i",123),d(3),o(4,"translate"),r()),e&2&&(i(3),C(" ",s(4,1,"settings.warning_pwa")," "))}function ho(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function go(e,p){if(e&1){let t=T();a(0,"li",21)(1,"span"),d(2),o(3,"translate"),r(),m(4,_o,5,3),a(5,"div",168)(6,"button",173),o(7,"translate"),o(8,"translate"),k("click",function(){I(t);let l=h(6);return E(l.triggerKeyCertSelect())}),c(9,"i",170),r(),c(10,"input",174),o(11,"translate"),m(12,ho,1,1,"i",25),r()()}if(e&2){let t=h(6);_("@smoothHide",void 0),i(2),g(s(3,9,"settings.security.cert")),i(2),u(t.isPwa?4:-1),i(2),_("title",nt(s(7,11,"settings.security.ssl_upload_keycert_aria"))),f("aria-label",s(8,13,"settings.security.ssl_upload_keycert_aria")),i(4),_("formControl",t.uiSslCertFormControl),f("aria-label",s(11,15,"settings.security.cert")),i(2),u(t.uiSslCertIsSaving?12:-1)}}function Co(e,p){if(e&1){let t=T();a(0,"li",21)(1,"span"),d(2),o(3,"translate"),r(),m(4,mo,5,3),a(5,"div",168)(6,"button",169),o(7,"translate"),o(8,"translate"),k("click",function(){I(t);let l=h(5);return E(l.triggerKeyCertSelect())}),c(9,"i",170),r(),a(10,"input",171,1),k("change",function(){I(t);let l=$t(11),x=h(5);return E(x.onSslKeyCertChange(l.files))}),r(),c(12,"input",172),o(13,"translate"),m(14,uo,1,1,"i",25),r()(),m(15,go,13,17,"li",21)}if(e&2){let t=h(5);_("@smoothHide",void 0),i(2),g(s(3,10,"settings.security.key")),i(2),u(t.isPwa?4:-1),i(2),_("title",nt(s(7,12,"settings.security.ssl_upload_keycert_aria"))),f("aria-label",s(8,14,"settings.security.ssl_upload_keycert_aria")),i(6),_("formControl",t.uiSslKeyFormControl),f("aria-label",s(13,16,"settings.security.key")),i(2),u(t.uiSslKeyIsSaving?14:-1),i(),u(t.isItemHidden("setting-security-cert")?-1:15)}}function fo(e,p){e&1&&(c(0,"br"),a(1,"small",85),c(2,"i",123),d(3),o(4,"translate"),r()),e&2&&(i(3),C(" ",s(4,1,"settings.warning_pwa")," "))}function bo(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function vo(e,p){e&1&&(c(0,"br"),a(1,"small",85),c(2,"i",123),d(3),o(4,"translate"),r()),e&2&&(i(3),C(" ",s(4,1,"settings.warning_pwa")," "))}function xo(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function So(e,p){if(e&1){let t=T();a(0,"li",21)(1,"span"),d(2),o(3,"translate"),r(),m(4,vo,5,3),a(5,"div",23)(6,"input",178),o(7,"translate"),k("focus",function(){I(t);let l=h(6);return E(l.showPfxPassphrase=!0)})("blur",function(){I(t);let l=h(6);return E(l.showPfxPassphrase=!1)}),r(),m(8,xo,1,1,"i",25),r()()}if(e&2){let t=h(6);_("@smoothHide",void 0),i(2),g(s(3,7,"settings.security.pass")),i(2),u(t.isPwa?4:-1),i(2),_("type",t.showPfxPassphrase?"text":"password")("formControl",t.uiSslPassphraseFormControl),f("aria-label",s(7,9,"settings.security.pass")),i(2),u(t.uiSslPassphraseIsSaving?8:-1)}}function yo(e,p){if(e&1){let t=T();a(0,"li",21)(1,"span"),d(2),o(3,"translate"),r(),m(4,fo,5,3),a(5,"div",168)(6,"button",175),o(7,"translate"),o(8,"translate"),k("click",function(){I(t);let l=h(5);return E(l.triggerPfxSelect())}),c(9,"i",170),r(),a(10,"input",176,2),k("change",function(){I(t);let l=$t(11),x=h(5);return E(x.onSslPfxChange(l.files))}),r(),c(12,"input",177),o(13,"translate"),m(14,bo,1,1,"i",25),r()(),m(15,So,9,11,"li",21)}if(e&2){let t=h(5);_("@smoothHide",void 0),i(2),g(s(3,10,"settings.security.pfx")),i(2),u(t.isPwa?4:-1),i(2),_("title",nt(s(7,12,"settings.security.ssl_upload_pfx_aria"))),f("aria-label",s(8,14,"settings.security.ssl_upload_pfx_aria")),i(6),_("formControl",t.uiSslPfxFormControl),f("aria-label",s(13,16,"settings.security.pfx")),i(2),u(t.uiSslPfxIsSaving?14:-1),i(),u(t.isItemHidden("setting-security-pass")?-1:15)}}function Io(e,p){if(e&1&&(m(0,Co,16,18),m(1,yo,16,18)),e&2){let t=h(4);u(t.uiSslTypeFormControl.value==="keycert"?0:-1),i(),u(t.uiSslTypeFormControl.value==="pfx"?1:-1)}}function Eo(e,p){if(e&1){let t=T();a(0,"li",22)(1,"span",26),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"button",27),o(9,"translate"),k("click",function(){I(t);let l=h(4);return E(l.accessoryUiControl())}),c(10,"i",28),r()()}e&2&&(_("@smoothHide",void 0),i(2),C(" ",s(3,4,"settings.security.ui_control")),i(4),g(s(7,6,"settings.security.ui_control_desc")),i(2),f("aria-label",s(9,8,"settings.security.ui_control")))}function wo(e,p){if(e&1&&(a(0,"ul",144),m(1,Ja,14,12,"li",22),m(2,eo,2,2),m(3,ro,21,21,"li",21),m(4,co,24,30,"li",21),m(5,Io,2,2),m(6,Eo,11,10,"li",22),r()),e&2){let t=h(3);i(),u(t.isItemHidden("setting-security-auth")?-1:1),i(),u(t.uiAuthFormControl.value?2:-1),i(),u(t.isItemHidden("setting-security-https")?-1:3),i(),u(t.uiSslTypeFormControl.value==="selfsigned"?4:-1),i(),u(t.runningOnRaspbianImage?-1:5),i(),u(t.isItemHidden("setting-security-control")?-1:6)}}function ko(e,p){if(e&1){let t=T();a(0,"div",15)(1,"div",17),k("click",function(){I(t);let l=h(2);return E(l.toggleSection("security"))}),a(2,"h5",18),c(3,"i",19),d(4),o(5,"translate"),r()(),m(6,wo,7,6,"ul",144),r()}if(e&2){let t=h(2);i(),f("aria-expanded",t.showFields.security?"true":"false")("aria-controls","fieldsSecurity"),i(2),M(H(8,tt,t.showFields.security,!t.showFields.security)),i(),C(" ",s(5,6,"settings.network.title_security")," "),i(2),u(t.showFields.security?6:-1)}}function To(e,p){e&1&&c(0,"i",25),e&2&&_("@fadeInOut",void 0)}function Bo(e,p){if(e&1&&(a(0,"li",22)(1,"span"),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"div",80)(9,"div",81),c(10,"input",180),o(11,"translate"),c(12,"label",181),r(),m(13,To,1,1,"i",25),r()()),e&2){let t=h(4);_("@smoothHide",void 0),i(2),C(" ",s(3,6,"settings.accessory.debug")),i(4),g(s(7,8,"settings.accessory.debug_desc")),i(4),_("formControl",t.uiAccDebugFormControl),f("aria-label",s(11,10,"settings.accessory.debug")),i(3),u(t.uiAccDebugIsSaving?13:-1)}}function $o(e,p){if(e&1){let t=T();a(0,"li",22)(1,"span",26),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"button",27),o(9,"translate"),k("click",function(){I(t);let l=h(4);return E(l.removeSingleCachedAccessories())}),c(10,"i",28),r()()}e&2&&(_("@smoothHide",void 0),i(2),C(" ",s(3,4,"reset.accessory_ind.title")),i(4),g(s(7,6,"reset.accessory_ind.desc")),i(2),f("aria-label",s(9,8,"reset.accessory_ind.title")))}function Fo(e,p){if(e&1){let t=T();a(0,"li",22)(1,"span",26),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"button",27),o(9,"translate"),k("click",function(){I(t);let l=h(4);return E(l.removeBridgeAccessories())}),c(10,"i",28),r()()}e&2&&(_("@smoothHide",void 0),i(2),C(" ",s(3,4,"reset.bridge_accessories.title")),i(4),g(s(7,6,"reset.bridge_accessories.desc")),i(2),f("aria-label",s(9,8,"reset.accessory_all.title")))}function Po(e,p){if(e&1){let t=T();a(0,"li",22)(1,"span",26),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"button",27),o(9,"translate"),k("click",function(){I(t);let l=h(4);return E(l.removeAllCachedAccessories())}),c(10,"i",28),r()()}e&2&&(_("@smoothHide",void 0),i(2),C(" ",s(3,4,"reset.accessory_all.title")),i(4),g(s(7,6,"reset.accessory_all.desc")),i(2),f("aria-label",s(9,8,"reset.accessory_all.title")))}function Ro(e,p){if(e&1&&(a(0,"p",129),d(1),o(2,"translate"),r(),a(3,"ul",179),m(4,Bo,14,12,"li",22),m(5,$o,11,10,"li",22),m(6,Fo,11,10,"li",22),m(7,Po,11,10,"li",22),r()),e&2){let t=h(3);i(),g(s(2,5,"settings.cache.desc")),i(3),u(t.isItemHidden("setting-accessory-debug")?-1:4),i(),u(t.isItemHidden("setting-reset-accessory-ind")?-1:5),i(),u(t.isItemHidden("setting-reset-bridge-accessories")?-1:6),i(),u(t.isItemHidden("setting-reset-accessory-all")?-1:7)}}function Mo(e,p){if(e&1){let t=T();a(0,"div",15)(1,"div",17),k("click",function(){I(t);let l=h(2);return E(l.toggleSection("cache"))}),a(2,"h5",18),c(3,"i",19),d(4),o(5,"translate"),r()(),m(6,Ro,8,7),r()}if(e&2){let t=h(2);i(),f("aria-expanded",t.showFields.cache?"true":"false")("aria-controls","fieldsCache"),i(2),M(H(8,tt,t.showFields.cache,!t.showFields.cache)),i(),C(" ",s(5,6,"menu.label_accessories")," "),i(2),u(t.showFields.cache?6:-1)}}function Vo(e,p){if(e&1){let t=T();a(0,"li",22)(1,"span",26),d(2),o(3,"translate"),c(4,"br"),a(5,"small",85),d(6),o(7,"translate"),r()(),a(8,"button",27),o(9,"translate"),k("click",function(){I(t);let l=h(4);return E(l.unpairAccessory())}),c(10,"i",28),r()()}e&2&&(_("@smoothHide",void 0),i(2),C(" ",s(3,4,"reset.bridge_ind.title")),i(4),g(s(7,6,"reset.bridge_ind.desc")),i(2),f("aria-label",s(9,8,"reset.bridge_ind.title")))}function Ao(e,p){if(e&1){let t=T();a(0,"li",22)(1,"span",26),d(2),o(3,"translate"),o(4,"titlecase"),c(5,"br"),a(6,"small",85),d(7),o(8,"translate"),r()(),a(9,"button",27),o(10,"translate"),k("click",function(){I(t);let l=h(4);return E(l.resetHomebridgeState())}),c(11,"i",28),r()()}e&2&&(_("@smoothHide",void 0),i(2),C(" ",s(4,6,s(3,4,"reset.bridge_all.title"))),i(5),g(s(8,8,"reset.bridge_all.desc")),i(2),f("aria-label",s(10,10,"reset.bridge_all.title")))}function Ho(e,p){if(e&1&&(a(0,"p",129),d(1),o(2,"translate"),r(),a(3,"ul",182),m(4,Vo,11,10,"li",22),m(5,Ao,12,12,"li",22),r()),e&2){let t=h(3);i(),g(s(2,3,"reset.bridges.desc")),i(3),u(t.isItemHidden("setting-reset-bridge-ind")?-1:4),i(),u(t.isItemHidden("setting-reset-bridge-all")?-1:5)}}function Do(e,p){if(e&1){let t=T();a(0,"div",15)(1,"div",17),k("click",function(){I(t);let l=h(2);return E(l.toggleSection("reset"))}),a(2,"h5",18),c(3,"i",19),d(4),o(5,"translate"),r()(),m(6,Ho,6,5),r()}if(e&2){let t=h(2);i(),f("aria-expanded",t.showFields.reset?"true":"false")("aria-controls","fieldsReset"),i(2),M(H(8,tt,t.showFields.reset,!t.showFields.reset)),i(),C(" ",s(5,6,"reset.bridges.title")," "),i(2),u(t.showFields.reset?6:-1)}}function Lo(e,p){if(e&1&&(m(0,cn,7,11,"div",15),m(1,wn,7,11,"div",15),m(2,Xn,7,11,"div",15),m(3,ka,7,11,"div",15),m(4,Ma,7,11,"div",15),m(5,Qa,7,11,"div",15),m(6,ko,7,11,"div",15),m(7,Mo,7,11,"div",15),m(8,Do,7,11,"div",15),c(9,"div",16)),e&2){let t=h();u(t.isSectionVisible("general")?0:-1),i(),u(t.isSectionVisible("display")?1:-1),i(),u(t.isSectionVisible("startup")?2:-1),i(),u(t.isSectionVisible("network")?3:-1),i(),u(t.isMatterSupported&&t.isSectionVisible("matter")?4:-1),i(),u(t.isSectionVisible("terminal")?5:-1),i(),u(t.isSectionVisible("security")?6:-1),i(),u(t.isSectionVisible("cache")?7:-1),i(),u(t.isSectionVisible("reset")?8:-1)}}var rl=(()=>{class e{searchInput=rt("searchInput");destroyRef=w(gt);$api=w(U);$cdr=w(Nt);$modal=w(ut);$notification=w(se);$router=w(J);$settings=w(X);$terminal=w(le);$toastr=w(z);$translate=w(O);restartToastIsShown=!1;showSearchBar=!1;searchQuery="";showFields={general:!0,display:!0,startup:!0,network:!0,matter:!0,security:!0,terminal:!0,reset:!0,cache:!0};hiddenItems={};loading=!0;debugFieldDesc="settings.startup.debug_desc_v1";showAvahiMdnsOption=!1;showResolvedMdnsOption=!1;adaptersAvailable=[];adaptersSelected=[];showPfxPassphrase=!1;sslKeyCertInput=rt("sslKeyCertInput");sslPfxInput=rt("sslPfxInput");runningInDocker=this.$settings.env.runningInDocker;runningOnRaspberryPi=this.$settings.env.runningOnRaspberryPi;runningOnRaspbianImage=this.$settings.env.runningOnRaspbianImage;platform=this.$settings.env.platform;enableTerminalAccess=this.$settings.env.enableTerminalAccess;isMatterSupported=this.$settings.isFeatureEnabled("matterSupport");isPwa=!!oe();webrootSettingDisabledAccess=!1;hbNameIsInvalid=!1;hbNameIsSaving=!1;hbNameFormControl=new F("");uiLangIsSaving=!1;uiLangFormControl=new F("");uiThemeIsSaving=!1;uiThemeFormControl=new F("");uiLightIsSaving=!1;uiLightFormControl=new F("");uiMenuIsSaving=!1;uiMenuFormControl=new F("");uiTempIsSaving=!1;uiTempFormControl=new F("");uiAlwaysShowBetasIsSaving=!1;uiAlwaysShowBetasFormControl=new F(!1);uiTerminalPersistenceIsSaving=!1;uiTerminalPersistenceFormControl=new F(!1);uiTerminalHideWarningIsSaving=!1;uiTerminalHideWarningFormControl=new F(!1);uiTerminalBufferSizeIsSaving=!1;uiTerminalBufferSizeIsInvalid=!1;uiTerminalBufferSizeFormControl=new F(globalThis.terminal.bufferSize);hbDebugIsSaving=!1;hbDebugFormControl=new F(!1);hbInsecureIsSaving=!1;hbInsecureFormControl=new F(!1);hbKeepIsSaving=!1;hbKeepFormControl=new F(!1);hbEnvDebugIsSaving=!1;hbEnvDebugFormControl=new F("");hbEnvNodeIsSaving=!1;hbEnvNodeFormControl=new F("");hbLogSizeIsInvalid=!1;hbLogSizeIsSaving=!1;hbLogSizeFormControl=new F(-1);hbLogTruncateIsInvalid=!1;hbLogTruncateIsSaving=!1;hbLogTruncateFormControl=new F(0);hbMDnsIsSaving=!1;hbMDnsFormControl=new F("");enableMdnsAdvertiseFormControl=new F(!1);enableMdnsAdvertiseIsSaving=!1;hbPortIsInvalid=!1;hbPortIsSaving=!1;hbPortFormControl=new F(0);uiPortIsInvalid=!1;uiPortIsSaving=!1;uiPortFormControl=new F(0);hbStartPortIsInvalid=!1;hbStartPortIsSaving=!1;hbStartPortFormControl=new F(0);hbEndPortIsInvalid=!1;hbEndPortIsSaving=!1;hbEndPortFormControl=new F(0);uiHostIsSaving=!1;uiHostFormControl=new F("");uiWebrootIsSaving=!1;uiWebrootFormControl=new F("");uiProxyHostIsSaving=!1;uiProxyHostFormControl=new F("");uiAuthIsSaving=!1;uiAuthFormControl=new Qt(!0);uiSessionTimeoutIsInvalid=!1;uiSessionTimeoutIsSaving=!1;uiSessionTimeoutDaysFormControl=new F(0);uiSessionTimeoutHoursFormControl=new F(8);uiSessionTimeoutMinutesFormControl=new F(0);uiSessionTimeoutInactivityBasedIsSaving=!1;uiSessionTimeoutInactivityBasedFormControl=new F(!1);uiSslTypeFormControl=new F("off");uiSslKeyIsSaving=!1;uiSslKeyFormControl=new F("");uiSslCertIsSaving=!1;uiSslCertFormControl=new F("");uiSslPfxIsSaving=!1;uiSslPfxFormControl=new F("");uiSslPassphraseIsSaving=!1;uiSslPassphraseFormControl=new F("");uiSslSelfSignedHostnamesIsSaving=!1;uiSslSelfSignedHostnamesFormControl=new F("");hbPackageIsSaving=!1;hbPackageFormControl=new F("");uiMetricsIsSaving=!1;uiMetricsFormControl=new F(!0);uiAccDebugIsSaving=!1;uiAccDebugFormControl=new F(!1);uiTempFileIsSaving=!1;uiTempFileFormControl=new F("");hbLinuxShutdownIsSaving=!1;hbLinuxShutdownFormControl=new F("");hbLinuxRestartIsSaving=!1;hbLinuxRestartFormControl=new F("");scheduledRestartCronIsSaving=!1;scheduledRestartCronFormControl=new F("");matterEnabledIsSaving=!1;matterEnabledFormControl=new F(!1);matterPortIsInvalid=!1;matterPortIsSaving=!1;matterPortFormControl=new F(0);matterConfigCache={};linkDebug='<a href="https://github.com/homebridge/homebridge-config-ui-x/wiki/Debug-Common-Values" target="_blank" rel="noopener noreferrer"><i class="fa fa-external-link-alt primary-text"></i></a>';linkRaspbianSsl='<a href="https://github.com/homebridge/homebridge-raspbian-image/wiki/SSL-HTTPS-Access" target="_blank" rel="noopener noreferrer"><i class="fa fa-external-link-alt primary-text"></i></a>';linkCron='<a href="https://crontab.guru/" target="_blank" rel="noopener noreferrer"><i class="fa fa-external-link-alt primary-text"></i></a>';toggleSearch(){this.showSearchBar=!this.showSearchBar,this.showSearchBar?At(()=>{let t=this.searchInput();t&&t.nativeElement.focus()}):this.clearSearch()}clearSearch(){this.searchQuery="",this.filterSettings()}filterSettings(){if(this.hiddenItems={},!this.searchQuery)return;let t=this.searchQuery.toLowerCase(),n=this.getItemsContent();Object.entries(n).forEach(([l,x])=>{x&&x.toLowerCase().includes(t)||(this.hiddenItems[l]=!0)}),this.$cdr.detectChanges()}isItemHidden(t){let n=!!this.hiddenItems[t];return this.searchQuery,n}isSectionVisible(t){if(!this.searchQuery)return!0;let l={general:["setting-name","setting-backup","setting-restore","setting-users"],display:["setting-lang","setting-theme","setting-lighting","setting-menu","setting-temp","setting-betas","setting-wallpaper"],startup:["setting-debug","setting-insecure","setting-keep","setting-scheduled-restart","setting-metrics-startup","setting-package-path","setting-linux-restart","setting-env-debug-manual","setting-env-node"],network:["setting-interfaces","setting-mdns","setting-port-hb","setting-port-range","setting-port-end","setting-network-host","setting-network-proxy","setting-ui-port-network","setting-webroot-network","setting-mdns-advertise"],matter:["setting-matter-enabled","setting-matter-port"],terminal:["setting-terminal-log-max","setting-terminal-persistence","setting-terminal-buffer"],security:["setting-security-auth","setting-session-inactivity","setting-security-session","setting-security-https","setting-security-cert","setting-security-pass","setting-security-selfsigned-hostnames","setting-security-control"],cache:["setting-accessory-debug","setting-reset-accessory-ind","setting-reset-bridge-accessories","setting-reset-accessory-all"],reset:["setting-reset-bridge-ind","setting-reset-bridge-all"]}[t];return l?l.some(x=>!this.isItemHidden(x)):!0}getItemsContent(){return{"setting-name":this.$translate.instant("settings.name"),"setting-backup":this.$translate.instant("backup.title_backup"),"setting-restore":this.$translate.instant("config.restore.title"),"setting-users":this.$translate.instant("menu.tooltip_user_accounts"),"setting-lang":this.$translate.instant("settings.display.lang"),"setting-theme":this.$translate.instant("settings.display.theme"),"setting-lighting":this.$translate.instant("settings.display.lighting_mode"),"setting-menu":this.$translate.instant("settings.display.menu_mode"),"setting-temp":this.$translate.instant("settings.display.temp_units"),"setting-betas":this.$translate.instant("settings.display.show_betas"),"setting-wallpaper":this.$translate.instant("settings.display.wallpaper"),"setting-debug":this.$translate.instant("settings.startup.debug"),"setting-insecure":this.$translate.instant("settings.startup.insecure"),"setting-keep":this.$translate.instant("settings.startup.keep_accessories"),"setting-scheduled-restart":this.$translate.instant("settings.startup.scheduled_restart"),"setting-metrics-startup":this.$translate.instant("settings.startup.metrics"),"setting-env-debug":this.$translate.instant("settings.startup.env_debug"),"setting-env-debug-manual":"DEBUG","setting-env-node":this.$translate.instant("settings.startup.env_node_options"),"setting-log-size":this.$translate.instant("settings.startup.log_length"),"setting-log-truncate":this.$translate.instant("settings.startup.truncate_log"),"setting-package-path":this.$translate.instant("settings.startup.homebridge_package_path"),"setting-mdns":this.$translate.instant("settings.mdns_advertiser"),"setting-interfaces":this.$translate.instant("settings.network.title_network_interfaces"),"setting-port-hb":this.$translate.instant("settings.network.port_hb"),"setting-port-bridge":this.$translate.instant("settings.network.port.bridge"),"setting-port-range":this.$translate.instant("settings.network.port.start"),"setting-port-end":this.$translate.instant("settings.network.port.end"),"setting-network-host":this.$translate.instant("settings.network.host"),"setting-network-proxy":this.$translate.instant("settings.network.proxy"),"setting-ui-port-network":this.$translate.instant("settings.network.port_ui"),"setting-webroot-network":this.$translate.instant("settings.network.webroot"),"setting-mdns-advertise":this.$translate.instant("settings.network.mdns_advertise"),"setting-matter-enabled":this.$translate.instant("settings.matter.enabled"),"setting-matter-port":this.$translate.instant("settings.matter.port"),"setting-security-auth":this.$translate.instant("settings.security.auth"),"setting-security-session":this.$translate.instant("settings.startup.session"),"setting-security-https":this.$translate.instant("settings.security.https"),"setting-security-cert":this.$translate.instant("settings.security.cert"),"setting-security-pass":this.$translate.instant("settings.security.pass"),"setting-security-selfsigned-hostnames":this.$translate.instant("settings.security.selfsigned_hostnames"),"setting-security-control":this.$translate.instant("settings.security.ui_control"),"setting-ui-port":this.$translate.instant("settings.security.webui_port"),"setting-ui-host":this.$translate.instant("settings.security.webui_host"),"setting-ui-auth":this.$translate.instant("settings.security.webui_auth"),"setting-session-timeout":this.$translate.instant("settings.security.session_timeout"),"setting-session-inactivity":this.$translate.instant("settings.startup.session_inactivity_based"),"setting-proxy":this.$translate.instant("settings.security.webui_proxy_host"),"setting-ssl":this.$translate.instant("settings.security.ssl_key"),"setting-terminal-log-max":this.$translate.instant("settings.terminal.log_max"),"setting-terminal-persistence":this.$translate.instant("settings.terminal.persistence"),"setting-terminal-warning":this.$translate.instant("settings.terminal.hide_warning"),"setting-terminal-buffer":this.$translate.instant("settings.terminal.buffer_size"),"setting-reset-accessory-ind":this.$translate.instant("reset.accessory_ind.title"),"setting-reset-bridge-accessories":this.$translate.instant("reset.bridge_accessories.title"),"setting-reset-accessory-all":this.$translate.instant("reset.accessory_all.title"),"setting-reset-bridge-ind":this.$translate.instant("reset.bridge_ind.title"),"setting-reset-bridge-all":this.$translate.instant("reset.bridge_all.title"),"setting-reset-state":this.$translate.instant("settings.reset.reset_homebridge_state"),"setting-unpair":this.$translate.instant("settings.reset.unpair_bridges"),"setting-metrics":this.$translate.instant("settings.reset.enable_metrics"),"setting-accessory-control":this.$translate.instant("settings.reset.control_panel"),"setting-accessory-debug":this.$translate.instant("settings.accessory.debug"),"setting-temp-files":this.$translate.instant("settings.reset.temp_files"),"setting-linux-shutdown":this.$translate.instant("settings.reset.linux_shutdown"),"setting-linux-restart":this.$translate.instant("settings.reset.linux_restart"),"setting-cache-all":this.$translate.instant("settings.cache.title_clear_cache"),"setting-cache-bridge":this.$translate.instant("settings.cache.title_clear_bridge_cache"),"setting-cache-accessories":this.$translate.instant("settings.cache.title_clear_cached_accessories")}}ngOnInit(){return y(this,null,function*(){let t=this.$translate.instant("menu.label_settings");this.$settings.setPageTitle(t),this.$settings.isFeatureEnabled("childBridgeDebugMode")&&(this.debugFieldDesc="settings.startup.debug_desc_v2"),yield this.initNetworkingOptions(),yield this.initStartupSettings(),this.$settings.originalWebroot===globalThis.webroot.errorCode&&(this.webrootSettingDisabledAccess=!0,this.uiWebrootFormControl.disable()),this.isPwa&&(this.uiPortFormControl.disable(),this.uiHostFormControl.disable(),this.uiWebrootFormControl.disable(),this.uiProxyHostFormControl.disable(),this.uiSslTypeFormControl.disable(),this.uiSslKeyFormControl.disable(),this.uiSslCertFormControl.disable(),this.uiSslPfxFormControl.disable(),this.uiSslPassphraseFormControl.disable(),this.uiSslSelfSignedHostnamesFormControl.disable()),this.runningOnRaspbianImage&&this.uiSslTypeFormControl.disable(),this.hbNameFormControl.patchValue(this.$settings.env.homebridgeInstanceName),this.hbNameFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.hbNameSave(S)),this.uiLangFormControl.patchValue(this.$settings.env.lang),this.uiLangFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(S=>this.uiLangSave(S)),this.uiThemeFormControl.patchValue(this.$settings.theme),this.uiThemeFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(S=>this.uiThemeSave(S)),this.uiLightFormControl.patchValue(this.$settings.lightingMode),this.uiLightFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(S=>this.uiLightSave(S)),this.uiMenuFormControl.patchValue(this.$settings.menuMode),this.uiMenuFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(S=>this.uiMenuSave(S)),this.uiTempFormControl.patchValue(this.$settings.env.temperatureUnits),this.uiTempFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(S=>this.uiTempSave(S)),this.uiAlwaysShowBetasFormControl.patchValue(this.$settings.env.plugins?.alwaysShowBetas||!1),this.uiAlwaysShowBetasFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(S=>this.uiAlwaysShowBetasSave(S)),this.uiTerminalPersistenceFormControl.patchValue(this.$settings.env.terminal?.persistence),this.uiTerminalPersistenceFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(S=>this.uiTerminalPersistenceSave(S)),this.uiTerminalHideWarningFormControl.patchValue(this.$settings.env.terminal?.hideWarning),this.uiTerminalHideWarningFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(S=>this.uiTerminalHideWarningSave(S)),this.uiTerminalBufferSizeFormControl.patchValue(this.$settings.env.terminal?.bufferSize),this.uiTerminalBufferSizeFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.uiTerminalBufferSizeSave(S)),this.hbLogSizeFormControl.patchValue(this.$settings.env.log?.maxSize),this.hbLogSizeFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.hbLogSizeSave(S)),this.hbLogTruncateFormControl.patchValue(this.$settings.env.log?.truncateSize),this.hbLogTruncateFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.hbLogTruncateSave(S)),this.uiPortFormControl.patchValue(this.$settings.env.port),this.uiPortFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.uiPortSave(S)),this.uiAuthFormControl.patchValue(this.$settings.formAuth),this.uiAuthFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(S=>this.uiAuthSave(S));let n=this.$settings.sessionTimeout,l=Math.floor(n/86400),x=Math.floor(n%86400/3600),V=Math.floor(n%3600/60);this.uiSessionTimeoutDaysFormControl.patchValue(l),this.uiSessionTimeoutHoursFormControl.patchValue(x),this.uiSessionTimeoutMinutesFormControl.patchValue(V),this.uiSessionTimeoutDaysFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(()=>this.uiSessionTimeoutSaveFromFields()),this.uiSessionTimeoutHoursFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(()=>this.uiSessionTimeoutSaveFromFields()),this.uiSessionTimeoutMinutesFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(()=>this.uiSessionTimeoutSaveFromFields()),this.uiSessionTimeoutInactivityBasedFormControl.patchValue(this.$settings.sessionTimeoutInactivityBased||!1),this.uiSessionTimeoutInactivityBasedFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(S=>this.uiSessionTimeoutInactivityBasedSave(S)),this.uiSslKeyFormControl.patchValue(this.$settings.env.ssl?.key||""),this.uiSslKeyFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.uiSslKeySave(S)),this.uiSslCertFormControl.patchValue(this.$settings.env.ssl?.cert||""),this.uiSslCertFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.uiSslCertSave(S)),this.uiSslPfxFormControl.patchValue(this.$settings.env.ssl?.pfx||""),this.uiSslPfxFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.uiSslPfxSave(S)),this.uiSslPassphraseFormControl.patchValue(this.$settings.env.ssl?.passphrase||""),this.uiSslPassphraseFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.uiSslPassphraseSave(S)),this.uiSslSelfSignedHostnamesFormControl.patchValue(this.$settings.env.ssl?.selfSignedHostnames?.join(", ")||"localhost, 127.0.0.1"),this.uiSslSelfSignedHostnamesFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.uiSslSelfSignedHostnamesSave(S)),this.uiSslTypeFormControl.patchValue(this.$settings.env.ssl?.selfSigned?"selfsigned":this.uiSslKeyFormControl.value||this.uiSslCertFormControl.value?"keycert":this.uiSslPfxFormControl.value||this.uiSslPassphraseFormControl.value?"pfx":"off"),this.uiSslTypeFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(S=>this.uiSslTypeSave(S)),this.uiHostFormControl.patchValue(this.$settings.host||""),this.uiHostFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.uiHostSave(S)),this.uiWebrootFormControl.patchValue(this.$settings.webroot||""),this.uiWebrootFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.uiWebrootSave(S)),this.uiProxyHostFormControl.patchValue(this.$settings.proxyHost||""),this.uiProxyHostFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.uiProxyHostSave(S)),this.hbPackageFormControl.patchValue(this.$settings.env.homebridgePackagePath||""),this.hbPackageFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.hbPackageSave(S)),this.uiMetricsFormControl.patchValue(!this.$settings.env.disableServerMetricsMonitoring),this.uiMetricsFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(S=>this.uiMetricsSave(S)),this.enableMdnsAdvertiseFormControl.patchValue(this.$settings.env.enableMdnsAdvertise||!1),this.enableMdnsAdvertiseFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(S=>this.enableMdnsAdvertiseSave(S)),this.uiAccDebugFormControl.patchValue(this.$settings.env.accessoryControl?.debug),this.uiAccDebugFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(S=>this.uiAccDebugSave(S)),this.uiTempFileFormControl.patchValue(this.$settings.env.temp),this.uiTempFileFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.uiTempFileSave(S)),this.hbLinuxShutdownFormControl.patchValue(this.$settings.env.linux?.shutdown),this.hbLinuxShutdownFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.hbLinuxShutdownSave(S)),this.hbLinuxRestartFormControl.patchValue(this.$settings.env.linux?.restart),this.hbLinuxRestartFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.hbLinuxRestartSave(S)),this.scheduledRestartCronFormControl.patchValue(this.$settings.env.scheduledRestartCron||""),this.scheduledRestartCronFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.scheduledRestartCronSave(S)),yield this.initMatterSettings(),this.loading=!1})}openBackupModal(){this.$modal.open(wt,{size:"lg",backdrop:"static"})}openConfigBackup(){this.$router.navigate(["/config"],{queryParams:{action:"restore"}})}openWallpaperModal(){this.$modal.open(Ee,{size:"lg",backdrop:"static"})}resetHomebridgeState(){this.$modal.open(xe,{size:"lg",backdrop:"static"})}unpairAccessory(){this.$modal.open(ye,{size:"lg",backdrop:"static"})}removeAllCachedAccessories(){this.$modal.open(be,{size:"lg",backdrop:"static"})}accessoryUiControl(){return y(this,null,function*(){try{let t=this.$modal.open(me,{size:"lg",backdrop:"static"});t.componentInstance.existingBlacklist=this.$settings.env.accessoryControl?.instanceBlacklist||[],yield t.result,this.showRestartToast()}catch(t){t!=="Dismiss"&&(console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error")))}})}removeSingleCachedAccessories(){this.$modal.open(de,{size:"lg",backdrop:"static"})}removeBridgeAccessories(){this.$modal.open(ve,{size:"lg",backdrop:"static"})}selectNetworkInterfaces(){return y(this,null,function*(){let t=this.$modal.open(Ie,{size:"lg",backdrop:"static"});t.componentInstance.adaptersAvailable=this.adaptersAvailable,t.componentInstance.adaptersSelected=this.adaptersSelected;try{let n=yield t.result;this.buildBridgeNetworkAdapterList(n),yield P(this.$api.put("/server/network-interfaces/bridge",{adapters:n})),this.showRestartToast()}catch(n){n!=="Dismiss"&&(console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")))}})}toggleSection(t){this.showFields[t]=!this.showFields[t]}initStartupSettings(){return y(this,null,function*(){try{let t=yield P(this.$api.get("/platform-tools/hb-service/homebridge-startup-settings"));this.hbDebugFormControl.patchValue(t.HOMEBRIDGE_DEBUG),this.hbDebugFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(n=>this.hbDebugSave(n)),this.hbInsecureFormControl.patchValue(t.HOMEBRIDGE_INSECURE),this.hbInsecureFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(n=>this.hbInsecureSave(n)),this.hbKeepFormControl.patchValue(t.HOMEBRIDGE_KEEP_ORPHANS),this.hbKeepFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(n=>this.hbKeepSave(n)),this.hbEnvDebugFormControl.patchValue(t.ENV_DEBUG),this.hbEnvDebugFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(n=>this.hbEnvDebugSave(n)),this.hbEnvNodeFormControl.patchValue(t.ENV_NODE_OPTIONS),this.hbEnvNodeFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(n=>this.hbEnvNodeSave(n))}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}initNetworkingOptions(){return y(this,null,function*(){try{yield this.getNetworkSettings(),(this.$settings.env.runningInLinux||this.$settings.env.runningInDocker||this.$settings.env.runningInSynologyPackage||this.$settings.env.runningInPackageMode)&&(this.showAvahiMdnsOption=!0,this.showResolvedMdnsOption=!0)}catch(t){console.error(t),this.$toastr.error(t.message,this.$translate.instant("toast.title_error"))}})}getNetworkSettings(){return y(this,null,function*(){return Promise.all([P(this.$api.get("/server/network-interfaces/system")),P(this.$api.get("/server/network-interfaces/bridge")),P(this.$api.get("/server/mdns-advertiser")),P(this.$api.get("/server/port")),P(this.$api.get("/server/ports"))]).then(([t,n,l,x,V])=>{this.adaptersAvailable=t,this.buildBridgeNetworkAdapterList(n),this.hbMDnsFormControl.patchValue(l.advertiser),this.hbMDnsFormControl.valueChanges.pipe($(750),B(this.destroyRef)).subscribe(S=>this.hbMDnsSave(S)),this.hbPortFormControl.patchValue(x.port),this.hbPortFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.hbPortSave(S)),this.hbStartPortFormControl.patchValue(V.start),this.hbStartPortFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.hbStartPortSave(S)),this.hbEndPortFormControl.patchValue(V.end),this.hbEndPortFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(S=>this.hbEndPortSave(S))})})}saveUiSettingChange(t,n){return y(this,null,function*(){try{yield P(this.$api.put("/config-editor/ui",{key:t,value:n}))}catch(l){console.error(l),this.$toastr.error(l.message,this.$translate.instant("toast.title_error"))}})}hbNameSave(t){return y(this,null,function*(){if(!t||!/^[\p{L}\p{N}][\p{L}\p{N} ']*[\p{L}\p{N}]$/u.test(t)){this.hbNameIsInvalid=!0;return}try{this.hbNameIsSaving=!0,yield P(this.$api.put("/server/name",{name:t})),this.$settings.setEnvItem("homebridgeInstanceName",t),this.hbNameIsInvalid=!1,setTimeout(()=>{this.hbNameIsSaving=!1},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbNameIsSaving=!1}})}uiLangSave(t){return y(this,null,function*(){try{this.uiLangIsSaving=!0,this.$settings.setLang(t),yield this.saveUiSettingChange("lang",t),setTimeout(()=>{this.uiLangIsSaving=!1},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiLangIsSaving=!1}})}uiThemeSave(t){return y(this,null,function*(){try{this.uiThemeIsSaving=!0,this.$settings.setTheme(t),yield this.saveUiSettingChange("theme",t),setTimeout(()=>{this.uiThemeIsSaving=!1},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiThemeIsSaving=!1}})}uiLightSave(t){return y(this,null,function*(){try{this.uiLightIsSaving=!0,this.$settings.setLightingMode(t,"user"),yield this.saveUiSettingChange("lightingMode",t),setTimeout(()=>{this.uiLightIsSaving=!1},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiLightIsSaving=!1}})}uiMenuSave(t){return y(this,null,function*(){try{this.uiMenuIsSaving=!0,this.$settings.setMenuMode(t),yield this.saveUiSettingChange("menuMode",t),window.location.reload()}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiMenuIsSaving=!1}})}uiTempSave(t){return y(this,null,function*(){try{this.uiTempIsSaving=!0,this.$settings.setEnvItem("temperatureUnits",t),yield this.saveUiSettingChange("tempUnits",t),setTimeout(()=>{this.uiTempIsSaving=!1},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiTempIsSaving=!1}})}uiAlwaysShowBetasSave(t){return y(this,null,function*(){try{this.uiAlwaysShowBetasIsSaving=!0,this.$settings.setEnvItem("plugins.alwaysShowBetas",t),yield this.saveUiSettingChange("plugins.alwaysShowBetas",t),setTimeout(()=>{this.uiAlwaysShowBetasIsSaving=!1},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiAlwaysShowBetasIsSaving=!1}})}uiTerminalPersistenceSave(t){return y(this,null,function*(){if(!t&&this.$terminal.hasActiveSession()){let n=this.$modal.open(Pt,{size:"lg",backdrop:"static"});n.componentInstance.title=this.$translate.instant("settings.terminal.persistence_confirm_title"),n.componentInstance.message=this.$translate.instant("settings.terminal.persistence_confirm_message"),n.componentInstance.message2=this.$translate.instant("common.phrases.are_you_sure"),n.componentInstance.confirmButtonLabel=this.$translate.instant("form.button_continue"),n.componentInstance.confirmButtonClass="btn-primary",n.componentInstance.faIconClass="fas fa-exclamation-triangle text-warning";try{yield n.result}catch{this.uiTerminalPersistenceFormControl.patchValue(!0,{emitEvent:!1});return}}try{this.uiTerminalPersistenceIsSaving=!0,t||this.$terminal.destroyPersistentSession(),this.$settings.setEnvItem("terminal.persistence",t),yield this.saveUiSettingChange("terminal.persistence",t),setTimeout(()=>{this.uiTerminalPersistenceIsSaving=!1},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiTerminalPersistenceIsSaving=!1}})}uiTerminalHideWarningSave(t){return y(this,null,function*(){try{this.uiTerminalHideWarningIsSaving=!0,this.$settings.setEnvItem("terminal.hideWarning",t),yield this.saveUiSettingChange("terminal.hideWarning",t),setTimeout(()=>{this.uiTerminalHideWarningIsSaving=!1},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiTerminalHideWarningIsSaving=!1}})}uiTerminalBufferSizeSave(t){return y(this,null,function*(){if(t&&(typeof t!="number"||t<0||Number.isInteger(t)===!1)){this.uiTerminalBufferSizeIsInvalid=!0;return}try{this.uiTerminalBufferSizeIsSaving=!0,this.$settings.setEnvItem("terminal.bufferSize",t),yield this.saveUiSettingChange("terminal.bufferSize",t),this.uiTerminalBufferSizeIsInvalid=!1,setTimeout(()=>{this.uiTerminalBufferSizeIsSaving=!1},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiTerminalBufferSizeIsSaving=!1}})}hbDebugSave(t){return y(this,null,function*(){try{this.hbDebugIsSaving=!0,yield P(this.$api.put("/platform-tools/hb-service/homebridge-startup-settings",{HOMEBRIDGE_DEBUG:t,HOMEBRIDGE_KEEP_ORPHANS:this.hbKeepFormControl.value,HOMEBRIDGE_INSECURE:this.hbInsecureFormControl.value,ENV_DEBUG:this.hbEnvDebugFormControl.value,ENV_NODE_OPTIONS:this.hbEnvNodeFormControl.value})),setTimeout(()=>{this.hbDebugIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbDebugIsSaving=!1}})}hbInsecureSave(t){return y(this,null,function*(){try{this.hbInsecureIsSaving=!0,yield P(this.$api.put("/platform-tools/hb-service/homebridge-startup-settings",{HOMEBRIDGE_DEBUG:this.hbDebugFormControl.value,HOMEBRIDGE_KEEP_ORPHANS:this.hbKeepFormControl.value,HOMEBRIDGE_INSECURE:t,ENV_DEBUG:this.hbEnvDebugFormControl.value,ENV_NODE_OPTIONS:this.hbEnvNodeFormControl.value})),setTimeout(()=>{this.hbInsecureIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbInsecureIsSaving=!1}})}hbKeepSave(t){return y(this,null,function*(){try{this.hbKeepIsSaving=!0,yield P(this.$api.put("/platform-tools/hb-service/homebridge-startup-settings",{HOMEBRIDGE_DEBUG:this.hbDebugFormControl.value,HOMEBRIDGE_KEEP_ORPHANS:t,HOMEBRIDGE_INSECURE:this.hbInsecureFormControl.value,ENV_DEBUG:this.hbEnvDebugFormControl.value,ENV_NODE_OPTIONS:this.hbEnvNodeFormControl.value})),this.$settings.setKeepOrphans(t),setTimeout(()=>{this.hbKeepIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbKeepIsSaving=!1}})}hbEnvDebugSave(t){return y(this,null,function*(){try{this.hbEnvDebugIsSaving=!0,yield P(this.$api.put("/platform-tools/hb-service/homebridge-startup-settings",{HOMEBRIDGE_DEBUG:this.hbDebugFormControl.value,HOMEBRIDGE_KEEP_ORPHANS:this.hbKeepFormControl.value,HOMEBRIDGE_INSECURE:this.hbInsecureFormControl.value,ENV_DEBUG:t,ENV_NODE_OPTIONS:this.hbEnvNodeFormControl.value})),setTimeout(()=>{this.hbEnvDebugIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbEnvDebugIsSaving=!1}})}hbEnvNodeSave(t){return y(this,null,function*(){try{this.hbEnvNodeIsSaving=!0,yield P(this.$api.put("/platform-tools/hb-service/homebridge-startup-settings",{HOMEBRIDGE_DEBUG:this.hbDebugFormControl.value,HOMEBRIDGE_KEEP_ORPHANS:this.hbKeepFormControl.value,HOMEBRIDGE_INSECURE:this.hbInsecureFormControl.value,ENV_DEBUG:this.hbEnvDebugFormControl.value,ENV_NODE_OPTIONS:t})),setTimeout(()=>{this.hbEnvNodeIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbEnvNodeIsSaving=!1}})}hbLogSizeSave(t){return y(this,null,function*(){if(t&&(typeof t!="number"||t<-1||Number.isInteger(t)===!1)){this.hbLogSizeIsInvalid=!0;return}try{this.hbLogSizeIsSaving=!0,this.$settings.setEnvItem("log.maxSize",t),(!t||t===-1)&&(yield this.saveUiSettingChange("log.truncateSize",null),this.hbLogTruncateIsInvalid=!1),yield this.saveUiSettingChange("log.maxSize",t),this.hbLogSizeIsInvalid=!1,setTimeout(()=>{this.hbLogSizeIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbLogSizeIsSaving=!1}})}hbLogTruncateSave(t){return y(this,null,function*(){if(t&&(typeof t!="number"||t<0||Number.isInteger(t)===!1)){this.hbLogTruncateIsInvalid=!0;return}try{this.hbLogTruncateIsSaving=!0,this.$settings.setEnvItem("log.truncateSize",t),yield this.saveUiSettingChange("log.truncateSize",t),this.hbLogTruncateIsInvalid=!1,setTimeout(()=>{this.hbLogTruncateIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbLogTruncateIsSaving=!1}})}hbMDnsSave(t){return y(this,null,function*(){try{this.hbMDnsIsSaving=!0,yield P(this.$api.put("/server/mdns-advertiser",{advertiser:t})),setTimeout(()=>{this.hbMDnsIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbMDnsIsSaving=!1}})}hbPortSave(t){return y(this,null,function*(){if(t===this.uiPortFormControl.value){this.hbPortIsInvalid=!0;return}try{this.hbPortIsSaving=!0,yield P(this.$api.put("/server/port",{port:t})),this.hbPortIsInvalid=!1,setTimeout(()=>{this.hbPortIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbPortIsSaving=!1}})}hbStartPortSave(t){return y(this,null,function*(){try{this.hbStartPortIsSaving=!0,yield P(this.$api.put("/server/ports",{start:t,end:this.hbEndPortFormControl.value})),this.hbStartPortIsInvalid=!1,setTimeout(()=>{this.hbStartPortIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbStartPortIsSaving=!1}})}hbEndPortSave(t){return y(this,null,function*(){try{this.hbEndPortIsSaving=!0,yield P(this.$api.put("/server/ports",{start:this.hbStartPortFormControl.value,end:t})),this.hbEndPortIsInvalid=!1,setTimeout(()=>{this.hbEndPortIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbEndPortIsSaving=!1}})}uiPortSave(t){return y(this,null,function*(){if(!t||typeof t!="number"||t<1025||t>65533||Number.isInteger(t)===!1||t===this.hbPortFormControl.value){this.uiPortIsInvalid=!0;return}try{this.uiPortIsSaving=!0,this.$settings.setEnvItem("port",t),yield this.saveUiSettingChange("port",t),this.uiPortIsInvalid=!1,setTimeout(()=>{this.uiPortIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiPortIsSaving=!1}})}uiAuthSave(t){return y(this,null,function*(){try{this.uiAuthIsSaving=!0,this.$settings.setItem("formAuth",t),yield this.saveUiSettingChange("auth",t?"form":"none"),this.$notification.formAuthEnabled.next(t),setTimeout(()=>{this.uiAuthIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiAuthIsSaving=!1}})}uiSessionTimeoutSaveFromFields(){return y(this,null,function*(){let t=this.uiSessionTimeoutDaysFormControl.value||0,n=this.uiSessionTimeoutHoursFormControl.value||0,l=this.uiSessionTimeoutMinutesFormControl.value||0;if(typeof t!="number"||t<0||t>365||!Number.isInteger(t)||typeof n!="number"||n<0||n>23||!Number.isInteger(n)||typeof l!="number"||l<0||l>59||!Number.isInteger(l)){this.uiSessionTimeoutIsInvalid=!0;return}let x=t*86400+n*3600+l*60;if(x<600||x>864e5){this.uiSessionTimeoutIsInvalid=!0;return}try{this.uiSessionTimeoutIsSaving=!0,this.$settings.setItem("sessionTimeout",x),yield this.saveUiSettingChange("sessionTimeout",x),this.uiSessionTimeoutIsInvalid=!1,setTimeout(()=>{this.uiSessionTimeoutIsSaving=!1,this.showRestartToast()},1e3)}catch(V){console.error(V),this.$toastr.error(V.message,this.$translate.instant("toast.title_error")),this.uiSessionTimeoutIsSaving=!1}})}uiSessionTimeoutInactivityBasedSave(t){return y(this,null,function*(){try{this.uiSessionTimeoutInactivityBasedIsSaving=!0,this.$settings.setItem("sessionTimeoutInactivityBased",t),yield this.saveUiSettingChange("sessionTimeoutInactivityBased",t),setTimeout(()=>{this.uiSessionTimeoutInactivityBasedIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiSessionTimeoutInactivityBasedIsSaving=!1}})}uiSslKeySave(t){return y(this,null,function*(){try{this.uiSslKeyIsSaving=!0,this.$settings.setEnvItem("ssl.key",t),yield this.saveUiSettingChange("ssl.key",t),setTimeout(()=>{this.uiSslKeyIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiSslKeyIsSaving=!1}})}uiSslCertSave(t){return y(this,null,function*(){try{this.uiSslCertIsSaving=!0,this.$settings.setEnvItem("ssl.cert",t),yield this.saveUiSettingChange("ssl.cert",t),setTimeout(()=>{this.uiSslCertIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiSslCertIsSaving=!1}})}uiSslPfxSave(t){return y(this,null,function*(){try{this.uiSslPfxIsSaving=!0,this.$settings.setEnvItem("ssl.pfx",t),yield this.saveUiSettingChange("ssl.pfx",t),setTimeout(()=>{this.uiSslPfxIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiSslPfxIsSaving=!1}})}uiSslPassphraseSave(t){return y(this,null,function*(){try{this.uiSslPassphraseIsSaving=!0,this.$settings.setEnvItem("ssl.passphrase",t),yield this.saveUiSettingChange("ssl.passphrase",t),setTimeout(()=>{this.uiSslPassphraseIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiSslPassphraseIsSaving=!1}})}uiSslSelfSignedHostnamesSave(t){return y(this,null,function*(){try{this.uiSslSelfSignedHostnamesIsSaving=!0;let n=t.split(",").map(l=>l.trim()).filter(l=>l.length>0);this.$settings.setEnvItem("ssl.selfSignedHostnames",n),yield this.saveUiSettingChange("ssl.selfSignedHostnames",n),setTimeout(()=>{this.uiSslSelfSignedHostnamesIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiSslSelfSignedHostnamesIsSaving=!1}})}generateSelfSigned(t="keycert"){let n=this.uiSslSelfSignedHostnamesFormControl.value||"",l=String(n).split(",").map(V=>V.trim()).filter(V=>!!V),x={hostnames:l,mode:t};this.$api.post("/server/ssl/selfsigned/generate",x).subscribe({next:V=>{t==="keycert"?(V?.keyPath&&(this.$settings.setEnvItem("ssl.key",V.keyPath),this.uiSslKeyFormControl.patchValue(V.keyPath,{emitEvent:!1})),V?.certPath&&(this.$settings.setEnvItem("ssl.cert",V.certPath),this.uiSslCertFormControl.patchValue(V.certPath,{emitEvent:!1})),this.$settings.setEnvItem("ssl.selfSigned",!1),this.uiSslTypeFormControl.patchValue("keycert",{emitEvent:!0}),this.$toastr.success(this.$translate.instant("settings.security.selfsigned_generate_success_keycert"),this.$translate.instant("toast.title_success"))):(this.$settings.setEnvItem("ssl.selfSigned",!0),this.$settings.setEnvItem("ssl.selfSignedHostnames",l),this.uiSslTypeFormControl.patchValue("selfsigned",{emitEvent:!0}),this.$toastr.success(this.$translate.instant("settings.security.selfsigned_generate_success_selfsigned"),this.$translate.instant("toast.title_success"))),this.showRestartToast()},error:V=>{console.error(V),this.$toastr.error(V.error?.message||V.message,this.$translate.instant("toast.title_error"))}})}uiSslTypeSave(t){return y(this,null,function*(){switch(t){case"keycert":this.uiSslPfxFormControl.patchValue("",{emitEvent:!1}),this.uiSslPassphraseFormControl.patchValue("",{emitEvent:!1}),this.$settings.setEnvItem("ssl.pfx",""),this.$settings.setEnvItem("ssl.passphrase",""),this.$settings.setEnvItem("ssl.selfSigned",!1),yield this.saveUiSettingChange("ssl.selfSigned",!1);break;case"pfx":this.uiSslKeyFormControl.patchValue("",{emitEvent:!1}),this.uiSslCertFormControl.patchValue("",{emitEvent:!1}),this.$settings.setEnvItem("ssl.key",""),this.$settings.setEnvItem("ssl.cert",""),this.$settings.setEnvItem("ssl.selfSigned",!1),yield this.saveUiSettingChange("ssl.selfSigned",!1);break;case"selfsigned":this.uiSslKeyFormControl.patchValue("",{emitEvent:!1}),this.uiSslCertFormControl.patchValue("",{emitEvent:!1}),this.uiSslPfxFormControl.patchValue("",{emitEvent:!1}),this.uiSslPassphraseFormControl.patchValue("",{emitEvent:!1}),this.$settings.setEnvItem("ssl.key",""),this.$settings.setEnvItem("ssl.cert",""),this.$settings.setEnvItem("ssl.pfx",""),this.$settings.setEnvItem("ssl.passphrase",""),this.$settings.setEnvItem("ssl.selfSigned",!0),yield this.saveUiSettingChange("ssl.selfSigned",!0),this.uiSslSelfSignedHostnamesFormControl.value||this.uiSslSelfSignedHostnamesFormControl.patchValue("localhost, 127.0.0.1",{emitEvent:!0}),this.showRestartToast();break;default:this.uiSslKeyFormControl.patchValue("",{emitEvent:!1}),this.uiSslCertFormControl.patchValue("",{emitEvent:!1}),this.uiSslPfxFormControl.patchValue("",{emitEvent:!1}),this.uiSslPassphraseFormControl.patchValue("",{emitEvent:!1}),this.uiSslSelfSignedHostnamesFormControl.patchValue("",{emitEvent:!1}),this.$settings.setEnvItem("ssl.key",""),this.$settings.setEnvItem("ssl.cert",""),this.$settings.setEnvItem("ssl.pfx",""),this.$settings.setEnvItem("ssl.passphrase",""),this.$settings.setEnvItem("ssl.selfSigned",!1),this.$settings.setEnvItem("ssl.selfSignedHostnames",[]),yield this.saveUiSettingChange("ssl",""),this.showRestartToast()}})}uiHostSave(t){return y(this,null,function*(){try{this.uiHostIsSaving=!0,this.$settings.setItem("host",t),yield this.saveUiSettingChange("host",t),setTimeout(()=>{this.uiHostIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiHostIsSaving=!1}})}uiWebrootSave(t){return y(this,null,function*(){try{this.uiWebrootIsSaving=!0,t=t?`/${t}`.replace(/\/+/g,"/").replace(/\/$/,""):"",t==="/"&&(t=""),this.$settings.setItem("webroot",t),yield this.saveUiSettingChange("webroot",t),this.uiWebrootFormControl.patchValue(t,{emitEvent:!1}),setTimeout(()=>{this.uiWebrootIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiWebrootIsSaving=!1}})}uiProxyHostSave(t){return y(this,null,function*(){try{this.uiProxyHostIsSaving=!0,this.$settings.setItem("proxyHost",t),yield this.saveUiSettingChange("proxyHost",t),setTimeout(()=>{this.uiProxyHostIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiProxyHostIsSaving=!1}})}hbPackageSave(t){return y(this,null,function*(){try{this.hbPackageIsSaving=!0,this.$settings.setEnvItem("homebridgePackagePath",t),yield this.saveUiSettingChange("homebridgePackagePath",t),setTimeout(()=>{this.hbPackageIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbPackageIsSaving=!1}})}uiMetricsSave(t){return y(this,null,function*(){try{this.uiMetricsIsSaving=!0,this.$settings.setEnvItem("disableServerMetricsMonitoring",!t),yield this.saveUiSettingChange("disableServerMetricsMonitoring",!t),setTimeout(()=>{this.uiMetricsIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiMetricsIsSaving=!1}})}enableMdnsAdvertiseSave(t){return y(this,null,function*(){try{this.enableMdnsAdvertiseIsSaving=!0,this.$settings.setEnvItem("enableMdnsAdvertise",t),yield this.saveUiSettingChange("enableMdnsAdvertise",t),setTimeout(()=>{this.enableMdnsAdvertiseIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error"))}})}uiAccDebugSave(t){return y(this,null,function*(){try{this.uiAccDebugIsSaving=!0,this.$settings.setEnvItem("accessoryControl.debug",t),yield this.saveUiSettingChange("accessoryControl.debug",t),setTimeout(()=>{this.uiAccDebugIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiAccDebugIsSaving=!1}})}uiTempFileSave(t){return y(this,null,function*(){try{this.uiTempFileIsSaving=!0,this.$settings.setEnvItem("temp",t),yield this.saveUiSettingChange("temp",t),setTimeout(()=>{this.uiTempFileIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.uiTempFileIsSaving=!1}})}hbLinuxShutdownSave(t){return y(this,null,function*(){try{this.hbLinuxShutdownIsSaving=!0,this.$settings.setEnvItem("linux.shutdown",t),yield this.saveUiSettingChange("linux.shutdown",t),setTimeout(()=>{this.hbLinuxShutdownIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbLinuxShutdownIsSaving=!1}})}hbLinuxRestartSave(t){return y(this,null,function*(){try{this.hbLinuxRestartIsSaving=!0,this.$settings.setEnvItem("linux.restart",t),yield this.saveUiSettingChange("linux.restart",t),setTimeout(()=>{this.hbLinuxRestartIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:n=>{console.error(n),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.hbLinuxRestartIsSaving=!1}})}scheduledRestartCronSave(t){return y(this,null,function*(){try{this.scheduledRestartCronIsSaving=!0;let n=t?.trim()?t:null;this.$settings.setEnvItem("scheduledRestartCron",n),yield P(this.$api.put("/config-editor/ui",{key:"scheduledRestartCron",value:n})),setTimeout(()=>{this.scheduledRestartCronIsSaving=!1,this.$api.put("/platform-tools/hb-service/set-full-service-restart-flag",{}).subscribe({next:()=>this.showRestartToast(),error:l=>{console.error(l),this.showRestartToast()}})},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.scheduledRestartCronIsSaving=!1}})}initMatterSettings(){return y(this,null,function*(){try{let t=yield P(this.$api.get("/config-editor/matter")),n=t!==null;n?this.matterPortFormControl.patchValue(t.port||""):this.matterPortFormControl.patchValue(0),this.matterPortFormControl.valueChanges.pipe($(1500),B(this.destroyRef)).subscribe(l=>this.matterPortSave(l)),this.matterEnabledFormControl.patchValue(n,{emitEvent:!1}),this.matterEnabledFormControl.valueChanges.subscribe(l=>this.matterEnabledSave(l))}catch(t){console.error(t),this.matterEnabledFormControl.valueChanges.subscribe(n=>this.matterEnabledSave(n))}})}matterPortSave(t){return y(this,null,function*(){if(!t&&t!==0){try{this.matterPortIsSaving=!0,this.matterPortIsInvalid=!1,yield P(this.$api.put("/config-editor/matter",{port:void 0})),setTimeout(()=>{this.matterPortIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.matterPortIsSaving=!1}return}if(typeof t!="number"||t<1024||t>65535||Number.isInteger(t)===!1){this.matterPortIsInvalid=!0,this.$cdr.detectChanges();return}if([5353,8080,8443].includes(t)){this.matterPortIsInvalid=!0,this.$cdr.detectChanges(),this.$toastr.error("Port 5353, 8080, and 8443 are reserved and cannot be used",this.$translate.instant("toast.title_error"));return}try{this.matterPortIsSaving=!0,this.matterPortIsInvalid=!1,yield P(this.$api.put("/config-editor/matter",{port:t})),setTimeout(()=>{this.matterPortIsSaving=!1,this.showRestartToast()},1e3)}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.matterPortIsSaving=!1,this.matterPortIsInvalid=!0}})}matterEnabledSave(t){return y(this,null,function*(){try{if(this.matterEnabledIsSaving=!0,t){let n;if(this.matterConfigCache.port)n=this.matterConfigCache.port;else try{n=(yield P(this.$api.get("/server/port/new/matter"))).port}catch(l){console.error("Failed to get Matter port, using fallback",l),n=Math.floor(Math.random()*12+5530)}yield P(this.$api.put("/config-editor/matter",{port:n})),n!==void 0&&this.matterPortFormControl.patchValue(n,{emitEvent:!1}),this.matterConfigCache={port:n},setTimeout(()=>{this.matterEnabledIsSaving=!1,this.showRestartToast()},1e3)}else{let n=this.$modal.open(Pt,{size:"lg",backdrop:"static"});n.componentInstance.title="Disable Matter",n.componentInstance.message="Disabling Matter will delete all Matter bridge files. This action cannot be undone.",n.componentInstance.message2="Are you sure you want to continue?",n.componentInstance.confirmButtonLabel="Continue",n.componentInstance.confirmButtonClass="btn-danger",n.componentInstance.faIconClass="fas fa-exclamation-triangle text-warning";try{yield n.result,this.matterConfigCache={port:this.matterPortFormControl.value||void 0},this.$settings.restartToastRef&&(this.$toastr.clear(this.$settings.restartToastRef.toastId),this.$settings.restartToastRef=null,this.restartToastIsShown=!1),this.$router.navigate(["/restart"],{queryParams:{alreadyRestarting:"true"}}),yield P(this.$api.delete("/config-editor/matter"))}catch(l){l==="Dismiss"?(this.matterEnabledFormControl.patchValue(!0,{emitEvent:!1}),this.matterEnabledIsSaving=!1):(console.error(l),this.$toastr.error(l.message,this.$translate.instant("toast.title_error")),this.matterEnabledFormControl.patchValue(!0,{emitEvent:!1}),this.matterEnabledIsSaving=!1)}}}catch(n){console.error(n),this.$toastr.error(n.message,this.$translate.instant("toast.title_error")),this.matterEnabledFormControl.patchValue(t,{emitEvent:!1}),this.matterEnabledIsSaving=!1}})}buildBridgeNetworkAdapterList(t){if(!t.length){this.adaptersSelected=[];return}this.adaptersSelected=t.map(n=>{let l=this.adaptersAvailable.find(x=>x.iface===n);return l?{iface:l.iface,selected:!0,missing:!1,ip4:l.ip4,ip6:l.ip6}:{iface:n,selected:!0,missing:!0}})}showRestartToast(){this.restartToastIsShown||(this.restartToastIsShown=!0,this.$settings.restartToastRef=this.$toastr.info(this.$translate.instant("settings.changes.saved"),this.$translate.instant("menu.hbrestart.title"),{timeOut:0,tapToDismiss:!0,disableTimeOut:!0,positionClass:"toast-bottom-right",enableHtml:!0}),this.$settings.restartToastRef&&this.$settings.restartToastRef.onTap&&this.$settings.restartToastRef.onTap.pipe(B(this.destroyRef)).subscribe(()=>{this.$router.navigate(["/restart"])}))}triggerKeyCertSelect(){let t=this.sslKeyCertInput();t&&(t.nativeElement.value="",t.nativeElement.click())}onSslKeyCertChange(t){if(!t||t.length===0)return;let n=new FormData;Array.from(t).forEach(l=>{n.append("files",l,l.name)}),this.$api.post("/server/ssl/keycert",n).subscribe({next:l=>{l?.keyPath&&(this.$settings.setEnvItem("ssl.key",l.keyPath),this.uiSslKeyFormControl.patchValue(l.keyPath,{emitEvent:!1})),l?.certPath&&(this.$settings.setEnvItem("ssl.cert",l.certPath),this.uiSslCertFormControl.patchValue(l.certPath,{emitEvent:!1})),this.$settings.setEnvItem("ssl.selfSigned",!1),this.uiSslTypeFormControl.patchValue("keycert",{emitEvent:!0}),this.$toastr.success(this.$translate.instant("settings.security.ssl_upload_success_keycert"),this.$translate.instant("toast.title_success")),this.showRestartToast()},error:l=>{console.error(l),this.$toastr.error(l.error?.message||l.message,this.$translate.instant("toast.title_error"))}})}triggerPfxSelect(){let t=this.sslPfxInput();t&&(t.nativeElement.value="",t.nativeElement.click())}onSslPfxChange(t){if(!t||t.length===0)return;let n=new FormData;n.append("pfx",t[0],t[0].name),this.uiSslPassphraseFormControl.value&&n.append("passphrase",this.uiSslPassphraseFormControl.value),this.$api.post("/server/ssl/pfx",n).subscribe({next:l=>{l?.pfxPath&&(this.$settings.setEnvItem("ssl.pfx",l.pfxPath),this.uiSslPfxFormControl.patchValue(l.pfxPath,{emitEvent:!1})),this.$settings.setEnvItem("ssl.selfSigned",!1),this.uiSslTypeFormControl.patchValue("pfx",{emitEvent:!0}),this.$toastr.success(this.$translate.instant("settings.security.ssl_upload_success_pfx"),this.$translate.instant("toast.title_success")),this.showRestartToast()},error:l=>{console.error(l),this.$toastr.error(l.error?.message||l.message,this.$translate.instant("toast.title_error"))}})}validateSsl(){this.$api.post("/server/ssl/validate",{}).subscribe({next:t=>{if(t?.valid)this.$toastr.success(t?.details||this.$translate.instant("settings.security.ssl_validate_success"),this.$translate.instant("toast.title_success"));else{let n=t?.details||this.$translate.instant("settings.security.ssl_validate_error");this.$toastr.error(n,this.$translate.instant("toast.title_error"))}},error:t=>{console.error(t),this.$toastr.error(t.error?.message||t.message,this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=L({type:e,selectors:[["ng-component"]],viewQuery:function(n,l){n&1&&(ot(l.searchInput,Ji,5),ot(l.sslKeyCertInput,Xi,5),ot(l.sslPfxInput,Yi,5)),n&2&&Ct(3)},decls:12,vars:11,consts:[["searchInput",""],["sslKeyCertInput",""],["sslPfxInput",""],[1,"row","mb-3"],[1,"col-6"],[1,"primary-text","m-0"],[1,"col-6","text-end"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"row"],[1,"col-md-12"],["novalidate",""],["type","text",1,"search-bar",3,"ngModelChange","placeholder","ngModel","ngModelOptions"],["type","button",1,"search-bar-clear"],["type","button",1,"search-bar-clear",3,"click"],["aria-hidden","true",1,"fas","fa-square-xmark"],[1,"my-4"],[1,"pb-3"],["role","button","tabindex","0",1,"mt-3","hover-pointer",3,"click"],[1,"primary-text"],[1,"fa"],["id","fieldsGeneral",1,"list-group","list-group-box","mt-2","mx-0"],[1,"list-group-item","d-block","d-md-flex","justify-content-between","align-items-center"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"my-3","my-md-0","ps-0","ps-md-5","w-auto","d-flex","align-items-center"],["type","text",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl"],[1,"fas","fa-floppy-disk","primary-text","fa-xl","me-0","me-md-2","ms-2","ms-md-0","order-2","order-md-1"],[1,"pe-2"],[1,"btn","btn-primary","waves-effect","m-0","ms-3","py-1",2,"min-width","50px",3,"click"],[1,"fas","fa-arrow-right"],["routerLink","/users",1,"btn","btn-primary","waves-effect","m-0","ms-3","py-1",2,"min-width","50px"],["id","fieldsDisplay",1,"list-group","list-group-box","mt-2","mx-0"],[1,"custom-select","resp-select","order-1","order-md-2",3,"formControl"],["value","auto"],["value","bg"],["value","ca"],["value","zh-CN"],["value","zh-TW"],["value","cs"],["value","nl"],["value","en"],["value","fi"],["value","fr"],["value","de"],["value","he"],["value","hu"],["value","id"],["value","it"],["value","ja"],["value","ko"],["value","mk"],["value","no"],["value","pl"],["value","pt-BR"],["value","pt"],["value","ru"],["value","sl"],["value","es"],["value","sv"],["value","th"],["value","tr"],["value","uk"],["value","orange"],["value","red"],["value","pink"],["value","purple"],["value","deep-purple"],["value","indigo"],["value","blue"],["value","blue-grey"],["value","cyan"],["value","green"],["value","teal"],["value","grey"],["value","brown"],["value","light"],["value","dark"],["value","default"],["value","freeze"],["value","c"],["value","f"],[1,"d-flex","align-items-center"],[1,"order-1","order-md-2"],["type","checkbox","id","uiAlwaysShowBetas",1,"rendux-input",3,"formControl"],["for","uiAlwaysShowBetas",1,"rendux-label","ms-3",2,"min-width","50px"],["id","fieldsStartup",1,"list-group","list-group-box","mb-4","mx-0"],[1,"grey-text","pe-2"],["type","checkbox","id","homebridgeDebugMode",1,"rendux-input",3,"formControl"],["for","homebridgeDebugMode",1,"rendux-label","ms-3",2,"min-width","50px"],["type","checkbox","id","homebridgeInsecureMode",1,"rendux-input",3,"formControl"],["for","homebridgeInsecureMode",1,"rendux-label","ms-3",2,"min-width","50px"],["type","checkbox","id","homebridgeKeepOrphans",1,"rendux-input",3,"formControl"],["for","homebridgeKeepOrphans",1,"rendux-label","ms-3",2,"min-width","50px"],[1,"badge","badge-primary","ms-1"],[3,"innerHtml"],[1,"my-3","my-md-0","ps-0","ps-md-5","w-auto","d-flex","flex-column","align-items-end"],[1,"d-flex","align-items-center","w-100"],["type","text","placeholder","mm hh dd MM ww","maxlength","30",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["type","checkbox","id","homebridgeMetrics",1,"rendux-input",3,"formControl"],["for","homebridgeMetrics",1,"rendux-label","ms-3",2,"min-width","50px"],["type","text","placeholder","/usr/local/lib/node_modules/homebridge",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["type","text","placeholder","shutdown",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],[1,"my-3","my-md-0","ps-0","ps-md-5","w-auto","d-flex","align-items-center","font-monospace"],["type","text","placeholder","reboot",1,"form-control","custom-input","resp-input","order-1","order-md-2",3,"formControl"],["type","text","placeholder","/sys/class/thermal/thermal_zone0/temp",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],[1,"font-monospace"],[1,"grey-text","pe-2",3,"innerHTML"],["type","text","placeholder","HAP-NodeJS:Advertiser,HAP-NodeJS:Service",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["type","text","placeholder","--max-old-space-size=512 --max-http-header-size=8192",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["routerLink","/platform-tools/docker/startup-script",1,"btn","btn-primary","waves-effect","m-0","ms-3","py-1",2,"min-width","50px"],["id","fieldsNetwork",1,"list-group","list-group-box","mt-2","mx-0"],[1,"small","grey-text","pe-2"],[1,"badge","badge-primary","me-1",3,"class"],[1,"btn","btn-primary","waves-effect","m-0","ms-3","py-1",2,"min-width","50px",3,"click","disabled"],[1,"badge","badge-primary","me-1"],[1,"fas","fa-exclamation-triangle"],[1,"fw-normal"],["value","avahi"],["value","ciao"],["value","bonjour-hap"],["value","resolved"],["type","number","min","1025","max","65533",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],[1,"grey-text","pe-2",3,"innerHtml"],["type","text","pattern","^[^{}/:\\\\s]+(?::\\d+)?$","placeholder","0.0.0.0",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],[1,"fas","fa-exclamation-triangle","red-text"],["type","text","pattern","^[^{}/:\\\\s]+(?::\\d+)?$","placeholder","example.com:8443",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["type","number","min","1025","max","65533","placeholder","8581",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["type","text","placeholder","/",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["type","checkbox","id","enableMdnsAdvertise",1,"rendux-input",3,"formControl"],["for","enableMdnsAdvertise",1,"rendux-label","ms-3",2,"min-width","50px"],[1,"small","grey-text","mb-2","mx-0"],["id","fieldsMatter",1,"list-group","list-group-box","mt-2","mx-0"],["type","checkbox","id","matterEnabled",1,"rendux-input",3,"formControl"],["for","matterEnabled",1,"rendux-label","ms-3",2,"min-width","50px"],["type","number","min","1024","max","65535","placeholder","5540",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["id","fieldsTerminal",1,"list-group","list-group-box","mt-2","mx-0"],["type","number","min","-1","placeholder","1000000",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["type","number","min","0","placeholder","200000",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["type","checkbox","id","terminalPersistence",1,"rendux-input",3,"formControl"],["for","terminalPersistence",1,"rendux-label","ms-3",2,"min-width","50px"],["type","checkbox","id","terminalHideWarning",1,"rendux-input",3,"formControl"],["for","terminalHideWarning",1,"rendux-label","ms-3",2,"min-width","50px"],[1,"d-flex","flex-column"],[1,"small","grey-text"],["type","number","min","10000","max","100000","step","10000",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["id","fieldsSecurity",1,"list-group","list-group-box","mt-2","mx-0"],["type","checkbox","id","uiAuthForm",1,"rendux-input",3,"formControl"],["for","uiAuthForm",1,"rendux-label","ms-3",2,"min-width","50px"],["type","checkbox","id","session-inactivity-based",1,"rendux-input",3,"formControl"],["for","session-inactivity-based",1,"rendux-label","ms-3",2,"min-width","50px"],[1,"fas","fa-floppy-disk","primary-text","fa-xl","me-0","me-md-2","ms-2","ms-md-0"],[1,"d-flex","align-items-center","gap-2"],["type","number","min","0","max","365","placeholder","0",1,"form-control","custom-input","font-monospace",2,"width","44px","text-align","right",3,"formControl"],[1,"ms-1","me-2","mb-0","text-nowrap","grey-text","small"],["type","number","min","0","max","23","placeholder","8",1,"form-control","custom-input","font-monospace",2,"width","44px","text-align","right",3,"formControl"],["type","number","min","0","max","59","placeholder","0",1,"form-control","custom-input","font-monospace",2,"width","44px","text-align","right",3,"formControl"],[1,"custom-select","resp-select","order-1","order-md-2",3,"formControl","hidden"],["value","off"],["value","selfsigned"],["value","keycert"],["value","pfx"],["type","button",1,"btn","btn-elegant","mx-2","py-1",2,"min-width","50px",3,"title"],["type","button",1,"btn","btn-elegant","mx-2","py-1",2,"min-width","50px",3,"click","title"],[1,"fas","fa-check"],["type","text","placeholder","localhost, 127.0.0.1, homebridge.local",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["type","button",1,"btn","btn-elegant","m-0","waves-effect","ms-2","py-1",2,"min-width","50px",3,"click","title"],[1,"fas","fa-magic"],["type","button",1,"btn","btn-elegant","m-0","py-1","mx-2",2,"min-width","50px",3,"click","title"],[1,"fas","fa-shield-alt"],[1,"my-3","my-md-0","ps-0","ps-md-5","w-auto","d-flex","align-items-center","gap-2"],["type","button",1,"btn","btn-elegant","m-0","py-1",2,"min-width","50px",3,"click","title"],[1,"fas","fa-upload"],["type","file","multiple","",1,"d-none",3,"change"],["type","text","placeholder","/Users/.../certs/server.key",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["type","button",1,"btn","btn-elegant","m-0",2,"min-width","50px",3,"click","title"],["type","text","placeholder","/Users/.../certs/server.crt",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["type","button",1,"btn","btn-elegant","waves-effect","m-0","py-1",2,"min-width","50px",3,"click","title"],["type","file",1,"d-none",3,"change"],["type","text","placeholder","/Users/.../certs/server.pfx",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"formControl"],["placeholder","mypassphrase",1,"form-control","custom-input","resp-input","order-1","order-md-2","font-monospace",3,"focus","blur","type","formControl"],["id","fieldsCache",1,"list-group","list-group-box","mb-4","mx-0"],["type","checkbox","id","accessoryDebug",1,"rendux-input",3,"formControl"],["for","accessoryDebug",1,"rendux-label","ms-3",2,"min-width","50px"],["id","fieldsReset",1,"list-group","list-group-box","mt-2","mx-0"]],template:function(n,l){n&1&&(a(0,"div",3)(1,"div",4)(2,"h3",5),d(3),o(4,"translate"),r()(),a(5,"div",6)(6,"button",7),o(7,"translate"),k("click",function(){return l.toggleSearch()}),c(8,"i"),r()()(),m(9,nn,7,7,"div",8),m(10,an,1,0,"app-spinner")(11,Lo,10,9)),n&2&&(i(3),g(s(4,7,"menu.settings.title")),i(3),f("aria-label",s(7,9,"form.search")),i(2),M(Dt("fas",l.showSearchBar?" primary-text":""," fa-search")),i(),u(l.showSearchBar?9:-1),i(),u(l.loading?10:11))},dependencies:[Wt,ct,qt,Yt,Zt,xt,Jt,dt,Xt,pt,Gt,ie,ne,ee,te,St,jt,mt,yt,re,lt,N],styles:[".search-bar[_ngcontent-%COMP%]{outline:none;box-sizing:inherit!important;background-color:inherit;height:50px!important;width:100%;border-width:.5px;padding:10px;margin-bottom:15px}@media(hover:hover){.search-bar[_ngcontent-%COMP%]:hover{border:1px solid #000000}}.search-bar[_ngcontent-%COMP%]:focus{border:1px solid #000000;box-shadow:0 1px #000}.search-bar-clear[_ngcontent-%COMP%]{position:absolute;right:30px;font-size:25px;color:#d0d0d0;line-height:50px;cursor:pointer}"],data:{animation:[Ft("fadeInOut",[ht(":enter",[at({opacity:0}),_t("750ms",at({opacity:1}))]),ht(":leave",[_t("750ms",at({opacity:0}))])]),Ft("smoothHide",[ht(":enter",[at({opacity:.01,height:"0px",overflow:"hidden",marginBottom:0,transform:"scale(0.97)"}),_t("450ms cubic-bezier(0.0, 0.0, 0.2, 1)",at({opacity:1,height:"*",marginBottom:"*",transform:"scale(1)"}))]),ht(":leave",[_t("150ms cubic-bezier(0.4, 0.0, 1, 1)",at({opacity:0,height:0,marginBottom:0,paddingTop:0,paddingBottom:0,overflow:"hidden",transform:"scale(0.98)"}))])])]}})}return e})();export{rl as SettingsComponent};
@@ -1 +0,0 @@
1
- var p=Object.create;var h=Object.defineProperty,q=Object.defineProperties,r=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyDescriptors,t=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,u=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty,m=Object.prototype.propertyIsEnumerable;var l=(b,a,c)=>a in b?h(b,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):b[a]=c,w=(b,a)=>{for(var c in a||={})k.call(a,c)&&l(b,c,a[c]);if(g)for(var c of g(a))m.call(a,c)&&l(b,c,a[c]);return b},x=(b,a)=>q(b,s(a));var y=b=>a=>{var c=b[a];if(c)return c();throw new Error("Module not found in bundle: "+a)};var z=(b,a)=>{var c={};for(var d in b)k.call(b,d)&&a.indexOf(d)<0&&(c[d]=b[d]);if(b!=null&&g)for(var d of g(b))a.indexOf(d)<0&&m.call(b,d)&&(c[d]=b[d]);return c};var A=(b,a)=>()=>(a||b((a={exports:{}}).exports,a),a.exports),B=(b,a)=>{for(var c in a)h(b,c,{get:a[c],enumerable:!0})},v=(b,a,c,d)=>{if(a&&typeof a=="object"||typeof a=="function")for(let e of t(a))!k.call(b,e)&&e!==c&&h(b,e,{get:()=>a[e],enumerable:!(d=r(a,e))||d.enumerable});return b};var C=(b,a,c)=>(c=b!=null?p(u(b)):{},v(a||!b||!b.__esModule?h(c,"default",{value:b,enumerable:!0}):c,b));var D=(b,a,c)=>new Promise((d,e)=>{var n=f=>{try{i(c.next(f))}catch(j){e(j)}},o=f=>{try{i(c.throw(f))}catch(j){e(j)}},i=f=>f.done?d(f.value):Promise.resolve(f.value).then(n,o);i((c=c.apply(b,a)).next())});export{w as a,x as b,y as c,z as d,A as e,B as f,C as g,D as h};