homebridge-config-ui-x 5.4.2-beta.0 → 5.4.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/package.json +1 -1
  3. package/public/assets/service-icons/air-quality-sensor.svg +15 -15
  4. package/public/assets/service-icons/leak-sensor.svg +42 -0
  5. package/public/assets/service-icons/light-sensor.svg +34 -0
  6. package/public/assets/service-icons/motion-sensor.svg +84 -0
  7. package/public/assets/service-icons/occupancy-sensor.svg +49 -0
  8. package/public/{chunk-4TF2J3KA.js → chunk-2FM5PPJA.js} +1 -1
  9. package/public/{chunk-EKCAZN24.js → chunk-2PQCVYHY.js} +1 -1
  10. package/public/{chunk-7BA3FPY6.js → chunk-3ELSLPXD.js} +1 -1
  11. package/public/{chunk-D7HRLNTC.js → chunk-3Q6PUSIQ.js} +1 -1
  12. package/public/{chunk-TPRXTBLB.js → chunk-4LKN5WQ2.js} +1 -1
  13. package/public/{chunk-MSAADZHQ.js → chunk-4LTZ5TVN.js} +1 -1
  14. package/public/{chunk-Z4YLS7KX.js → chunk-55WWMXPN.js} +1 -1
  15. package/public/{chunk-MP3K6Q5N.js → chunk-5EOLSGNC.js} +1 -1
  16. package/public/{chunk-J7JPVBEU.js → chunk-5GTAKNFH.js} +1 -1
  17. package/public/{chunk-QN444QJC.js → chunk-6PGTBS2L.js} +1 -1
  18. package/public/{chunk-DP45OUJJ.js → chunk-7N3D3R4N.js} +1 -1
  19. package/public/{chunk-FMXKLBH7.js → chunk-A34J5LMH.js} +1 -1
  20. package/public/{chunk-VDRXJTTX.js → chunk-BFDH5H4M.js} +1 -1
  21. package/public/{chunk-3ERUWF5D.js → chunk-BIUKRAP5.js} +1 -1
  22. package/public/{chunk-BNC2LVDJ.js → chunk-BWE5NZTG.js} +1 -1
  23. package/public/{chunk-6EH7VRJE.js → chunk-C26THLFD.js} +1 -1
  24. package/public/{chunk-46JGHSBB.js → chunk-DQJTU7SJ.js} +1 -1
  25. package/public/{chunk-JCCQ75XM.js → chunk-ETENXVXQ.js} +1 -1
  26. package/public/{chunk-WXQICPJE.js → chunk-F6VPU4OB.js} +1 -1
  27. package/public/{chunk-2LMFJYC4.js → chunk-FBHFDXKU.js} +1 -1
  28. package/public/{chunk-PWOW5ZGG.js → chunk-FVLGW5AW.js} +1 -1
  29. package/public/{chunk-YQ7MFP33.js → chunk-GEOFZWCT.js} +1 -1
  30. package/public/{chunk-HPHUBXGR.js → chunk-GOUQJ6IU.js} +2 -2
  31. package/public/{chunk-VQAYHIBO.js → chunk-GRC6QQGR.js} +1 -1
  32. package/public/{chunk-AC47AP7G.js → chunk-HWHM6ACA.js} +1 -1
  33. package/public/{chunk-GS72D2DZ.js → chunk-IJVEKP7K.js} +1 -1
  34. package/public/{chunk-LJIRF4HJ.js → chunk-JLWMZIYV.js} +1 -1
  35. package/public/{chunk-SKU647MV.js → chunk-JONTLP2T.js} +1 -1
  36. package/public/{chunk-ESIX4ZF5.js → chunk-JRG7ZOJK.js} +1 -1
  37. package/public/{chunk-HLNHT6LZ.js → chunk-K2DLW4M4.js} +1 -1
  38. package/public/{chunk-B57CTOBG.js → chunk-K4XV2HUU.js} +1 -1
  39. package/public/{chunk-ULDXS7ZK.js → chunk-KT7FH6PP.js} +1 -1
  40. package/public/{chunk-BYDZXXU7.js → chunk-KTUC5YRH.js} +1 -1
  41. package/public/{chunk-S6BEKQWI.js → chunk-MF4B4RDR.js} +1 -1
  42. package/public/{chunk-LJL5JUBH.js → chunk-NCU34GBK.js} +1 -1
  43. package/public/{chunk-MFYUC6U7.js → chunk-NFOWCDOY.js} +1 -1
  44. package/public/{chunk-C54645MD.js → chunk-OIVH2FRT.js} +1 -1
  45. package/public/{chunk-6X3MH72N.js → chunk-PDR2DPWY.js} +1 -1
  46. package/public/{chunk-33UHWR5O.js → chunk-PKLEEBKP.js} +1 -1
  47. package/public/{chunk-HTZJUJUZ.js → chunk-PZDZMQIH.js} +1 -1
  48. package/public/{chunk-FUYV7IZZ.js → chunk-R3YDN2RN.js} +1 -1
  49. package/public/{chunk-4HRWU2J3.js → chunk-RHKVQD3P.js} +1 -1
  50. package/public/{chunk-ADF46RFT.js → chunk-TEEROAPU.js} +1 -1
  51. package/public/{chunk-QSP4KI3N.js → chunk-TLDD55XE.js} +1 -1
  52. package/public/{chunk-QBC4X3JS.js → chunk-UFWMJUXF.js} +1 -1
  53. package/public/{chunk-ZY5SUCRL.js → chunk-Y6ETBMB7.js} +1 -1
  54. package/public/{chunk-2LEJFO4U.js → chunk-ZAAYNVER.js} +1 -1
  55. package/public/index.html +1 -1
  56. package/public/{main-VZG2XBKX.js → main-AAF4AVF2.js} +1 -1
  57. package/public/assets/hap-icons/leak-sensor.svg +0 -53
  58. package/public/assets/hap-icons/light-sensor.svg +0 -50
  59. package/public/assets/hap-icons/motion-sensor.svg +0 -101
  60. package/public/assets/hap-icons/occupancy-sensor.svg +0 -98
@@ -1 +1 @@
1
- import{d as f,g as s}from"./chunk-DFFTJVRY.js";import{k as u,n as d}from"./chunk-JCCQ75XM.js";import{a as l}from"./chunk-KZKL7DGI.js";import"./chunk-OA7Y3E5A.js";import{ga as m,h as p,ha as i,la as e,nb as a,w as c}from"./chunk-IOKYXV5M.js";var n=(()=>{class t{$api=e(d);$router=e(f);$toastr=e(u);$translate=e(l);resolve(){return p(this,null,function*(){try{return yield c(this.$api.get("/platform-tools/docker/startup-script"))}catch(r){console.error(r),this.$toastr.error(r.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(o){return new(o||t)};static \u0275prov=m({token:t,factory:t.\u0275fac})}return t})();var S=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"startup-script",loadComponent:()=>import("./chunk-4HRWU2J3.js").then(t=>t.StartupScriptComponent),resolve:{startupScript:n}},{path:"restart-container",loadComponent:()=>import("./chunk-ADF46RFT.js").then(t=>t.ContainerRestartComponent)}],v=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({imports:[s.forChild(S),s]})}return t})();var T=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({providers:[n],imports:[v]})}return t})();export{T as DockerModule};
1
+ import{d as f,g as s}from"./chunk-DFFTJVRY.js";import{k as u,n as d}from"./chunk-ETENXVXQ.js";import{a as l}from"./chunk-KZKL7DGI.js";import"./chunk-OA7Y3E5A.js";import{ga as m,h as p,ha as i,la as e,nb as a,w as c}from"./chunk-IOKYXV5M.js";var n=(()=>{class t{$api=e(d);$router=e(f);$toastr=e(u);$translate=e(l);resolve(){return p(this,null,function*(){try{return yield c(this.$api.get("/platform-tools/docker/startup-script"))}catch(r){console.error(r),this.$toastr.error(r.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(o){return new(o||t)};static \u0275prov=m({token:t,factory:t.\u0275fac})}return t})();var S=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"startup-script",loadComponent:()=>import("./chunk-RHKVQD3P.js").then(t=>t.StartupScriptComponent),resolve:{startupScript:n}},{path:"restart-container",loadComponent:()=>import("./chunk-TEEROAPU.js").then(t=>t.ContainerRestartComponent)}],v=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({imports:[s.forChild(S),s]})}return t})();var T=(()=>{class t{static \u0275fac=function(o){return new(o||t)};static \u0275mod=a({type:t});static \u0275inj=i({providers:[n],imports:[v]})}return t})();export{T as DockerModule};
@@ -1,4 +1,4 @@
1
- import{a as Ag}from"./chunk-2LMFJYC4.js";import{a as tl,c as Ig,d as Pg,e as Ds,f as ri,g as CS}from"./chunk-ULDXS7ZK.js";import{a as kg}from"./chunk-2C3X2ESN.js";import{a as Tg}from"./chunk-D7VCPH6W.js";import{a as jg}from"./chunk-S6BEKQWI.js";import{a as Sg,b as Cg,c as xg}from"./chunk-FVKMBZOU.js";import{a as ko}from"./chunk-H5WTK5UT.js";import{a as zg}from"./chunk-WCOLHYTR.js";import{a as gn,b as hn}from"./chunk-H45DK7IX.js";import{a as pn,b as mn}from"./chunk-J6CJ26QN.js";import{a as Hg}from"./chunk-ZUTM7S4U.js";import{a as nn,b as an,c as ln,d as dn,e as cn,f as un,g as Ns,m as Re,n as et,o as bg,p as fg,q as yg,r as vg,s as wg,t as Ei}from"./chunk-IWFKJHPR.js";import{A as wo,a as dg,b as Ni,c as js,e as yt,f as cg,h as ug,i as gg,j as pg,k as mg,l as Di,m as hg,o as Bi,r as As,s as ns,t as as,y as _g,z as Yt}from"./chunk-7EQFLCW4.js";import{a as Ri}from"./chunk-QSP4KI3N.js";import{d as oi}from"./chunk-DFFTJVRY.js";import{b as Oe}from"./chunk-ZY5SUCRL.js";import{k as He,m as Ui,n as ve}from"./chunk-JCCQ75XM.js";import{a as ke,b as Fe}from"./chunk-KZKL7DGI.js";import{e as lg}from"./chunk-OA7Y3E5A.js";import{$a as Qu,Ac as og,Bc as rg,Bd as ag,Ca as Ii,Cc as Pe,D as Gu,Da as Zu,Dc as Gt,Ec as os,Fa as Is,Fc as Et,Gc as zs,Hb as Y,Ib as T,Jb as I,Jc as H,Kc as C,Lb as ut,Lc as Ke,M as xs,Mb as gt,Nb as pt,Ob as y,Pb as m,Qb as p,Rb as x,Sb as Xr,Sc as mt,Tb as en,Tc as V,Ub as tn,Uc as Ai,Vb as tg,Wb as ig,Wc as ng,Xa as he,Z as Za,_b as $,a as J,aa as vo,ab as u,b as xe,bc as R,c as qu,cc as sn,dc as b,e as _,fa as Yu,fb as Zr,g as je,ga as Pt,gb as pi,h as G,ha as Ts,hc as Qa,ib as ts,ic as Xa,ja as Wu,jc as el,k as Ku,ka as Ju,kc as Pi,kd as Ut,la as z,lc as zi,ld as rs,mb as Q,mc as sg,md as ht,n as It,nb as Ps,nc as Lt,o as Ja,ob as is,oc as ji,pb as Xu,pc as Z,q as Vu,qc as w,ra as E,rc as K,sa as U,sb as de,sc as O,tc as ss,td as rn,ub as eg,uc as on,v as $u,vb as Qr,w as le,x as Lu,xc as Ae,yc as Ne,za as Jr,zc as De}from"./chunk-IOKYXV5M.js";var Co=_(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.regexpCode=ye.getEsmExportName=ye.getProperty=ye.safeStringify=ye.stringify=ye.strConcat=ye.addCodeArg=ye.str=ye._=ye.nil=ye._Code=ye.Name=ye.IDENTIFIER=ye._CodeOrName=void 0;var Ho=class{};ye._CodeOrName=Ho;ye.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ls=class extends Ho{constructor(i){if(super(),!ye.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ye.Name=ls;var Rt=class extends Ho{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof ls&&(t[s.str]=(t[s.str]||0)+1),t),{})}};ye._Code=Rt;ye.nil=new Rt("");function Ng(e,...i){let t=[e[0]],s=0;for(;s<i.length;)sl(t,i[s]),t.push(e[++s]);return new Rt(t)}ye._=Ng;var il=new Rt("+");function Dg(e,...i){let t=[So(e[0])],s=0;for(;s<i.length;)t.push(il),sl(t,i[s]),t.push(il,So(e[++s]));return xS(t),new Rt(t)}ye.str=Dg;function sl(e,i){i instanceof Rt?e.push(...i._items):i instanceof ls?e.push(i):e.push(PS(i))}ye.addCodeArg=sl;function xS(e){let i=1;for(;i<e.length-1;){if(e[i]===il){let t=TS(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function TS(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof ls||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof ls))return`"${e}${i.slice(1)}`}function IS(e,i){return i.emptyStr()?e:e.emptyStr()?i:Dg`${e}${i}`}ye.strConcat=IS;function PS(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:So(Array.isArray(e)?e.join(","):e)}function zS(e){return new Rt(So(e))}ye.stringify=zS;function So(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ye.safeStringify=So;function jS(e){return typeof e=="string"&&ye.IDENTIFIER.test(e)?new Rt(`.${e}`):Ng`[${e}]`}ye.getProperty=jS;function AS(e){if(typeof e=="string"&&ye.IDENTIFIER.test(e))return new Rt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ye.getEsmExportName=AS;function NS(e){return new Rt(e.toString())}ye.regexpCode=NS});var nl=_(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.ValueScope=wt.ValueScopeName=wt.Scope=wt.varKinds=wt.UsedValueState=void 0;var vt=Co(),ol=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},_n=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(_n||(wt.UsedValueState=_n={}));wt.varKinds={const:new vt.Name("const"),let:new vt.Name("let"),var:new vt.Name("var")};var bn=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof vt.Name?i:this.name(i)}name(i){return new vt.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};wt.Scope=bn;var fn=class extends vt.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,vt._)`.${new vt.Name(t)}[${s}]`}};wt.ValueScopeName=fn;var DS=(0,vt._)`\n`,rl=class extends bn{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=xe(J({},i),{_n:i.lines?DS:vt.nil})}get(){return this._scope}name(i){return new fn(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(i),{prefix:r}=o,n=(s=t.key)!==null&&s!==void 0?s:t.ref,a=this._values[r];if(a){let c=a.get(n);if(c)return c}else a=this._values[r]=new Map;a.set(n,o);let l=this._scope[r]||(this._scope[r]=[]),d=l.length;return l[d]=t.ref,o.setValue(t,{property:r,itemIndex:d}),o}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,vt._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,s)}_reduceValues(i,t,s={},o){let r=vt.nil;for(let n in i){let a=i[n];if(!a)continue;let l=s[n]=s[n]||new Map;a.forEach(d=>{if(l.has(d))return;l.set(d,_n.Started);let c=t(d);if(c){let g=this.opts.es5?wt.varKinds.var:wt.varKinds.const;r=(0,vt._)`${r}${g} ${d} = ${c};${this.opts._n}`}else if(c=o?.(d))r=(0,vt._)`${r}${c}${this.opts._n}`;else throw new ol(d);l.set(d,_n.Completed)})}return r}};wt.ValueScope=rl});var ee=_(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.or=ce.and=ce.not=ce.CodeGen=ce.operators=ce.varKinds=ce.ValueScopeName=ce.ValueScope=ce.Scope=ce.Name=ce.regexpCode=ce.stringify=ce.getProperty=ce.nil=ce.strConcat=ce.str=ce._=void 0;var _e=Co(),Wt=nl(),Fi=Co();Object.defineProperty(ce,"_",{enumerable:!0,get:function(){return Fi._}});Object.defineProperty(ce,"str",{enumerable:!0,get:function(){return Fi.str}});Object.defineProperty(ce,"strConcat",{enumerable:!0,get:function(){return Fi.strConcat}});Object.defineProperty(ce,"nil",{enumerable:!0,get:function(){return Fi.nil}});Object.defineProperty(ce,"getProperty",{enumerable:!0,get:function(){return Fi.getProperty}});Object.defineProperty(ce,"stringify",{enumerable:!0,get:function(){return Fi.stringify}});Object.defineProperty(ce,"regexpCode",{enumerable:!0,get:function(){return Fi.regexpCode}});Object.defineProperty(ce,"Name",{enumerable:!0,get:function(){return Fi.Name}});var Hn=nl();Object.defineProperty(ce,"Scope",{enumerable:!0,get:function(){return Hn.Scope}});Object.defineProperty(ce,"ValueScope",{enumerable:!0,get:function(){return Hn.ValueScope}});Object.defineProperty(ce,"ValueScopeName",{enumerable:!0,get:function(){return Hn.ValueScopeName}});Object.defineProperty(ce,"varKinds",{enumerable:!0,get:function(){return Hn.varKinds}});ce.operators={GT:new _e._Code(">"),GTE:new _e._Code(">="),LT:new _e._Code("<"),LTE:new _e._Code("<="),EQ:new _e._Code("==="),NEQ:new _e._Code("!=="),NOT:new _e._Code("!"),OR:new _e._Code("||"),AND:new _e._Code("&&"),ADD:new _e._Code("+")};var mi=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},al=class extends mi{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?Wt.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${o};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=Bs(this.rhs,i,t)),this}get names(){return this.rhs instanceof _e._CodeOrName?this.rhs.names:{}}},vn=class extends mi{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof _e.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=Bs(this.rhs,i,t),this}get names(){let i=this.lhs instanceof _e.Name?{}:J({},this.lhs.names);return kn(i,this.rhs)}},ll=class extends vn{constructor(i,t,s,o){super(i,s,o),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},dl=class extends mi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},cl=class extends mi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},ul=class extends mi{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},gl=class extends mi{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=Bs(this.code,i,t),this}get names(){return this.code instanceof _e._CodeOrName?this.code.names:{}}},xo=class extends mi{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,o=s.length;for(;o--;){let r=s[o];r.optimizeNames(i,t)||(BS(i,r.names),s.splice(o,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>ds(i,t.names),{})}},hi=class extends xo{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},pl=class extends xo{},ml=(()=>{class e extends hi{}return e.kind="else",e})(),yn=(()=>{class e extends hi{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let o=s.optimizeNodes();s=this.else=Array.isArray(o)?new ml(o):o}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(Fg(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=Bs(this.condition,t,s),this}get names(){let t=super.names;return kn(t,this.condition),this.else&&ds(t,this.else.names),t}}return e.kind="if",e})(),Sn=(()=>{class e extends hi{}return e.kind="for",e})(),hl=class extends Sn{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=Bs(this.iteration,i,t),this}get names(){return ds(super.names,this.iteration.names)}},_l=class extends Sn{constructor(i,t,s,o){super(),this.varKind=i,this.name=t,this.from=s,this.to=o}render(i){let t=i.es5?Wt.varKinds.var:this.varKind,{name:s,from:o,to:r}=this;return`for(${t} ${s}=${o}; ${s}<${r}; ${s}++)`+super.render(i)}get names(){let i=kn(super.names,this.from);return kn(i,this.to)}},wn=class extends Sn{constructor(i,t,s,o){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=o}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=Bs(this.iterable,i,t),this}get names(){return ds(super.names,this.iterable.names)}},Bg=(()=>{class e extends hi{constructor(t,s,o){super(),this.name=t,this.args=s,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),Eg=(()=>{class e extends xo{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),bl=class extends hi{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var s,o;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(o=this.finally)===null||o===void 0||o.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&ds(i,this.catch.names),this.finally&&ds(i,this.finally.names),i}},Ug=(()=>{class e extends hi{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),Rg=(()=>{class e extends hi{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),fl=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=xe(J({},t),{_n:t.lines?`
1
+ import{a as Ag}from"./chunk-FBHFDXKU.js";import{a as tl,c as Ig,d as Pg,e as Ds,f as ri,g as CS}from"./chunk-KT7FH6PP.js";import{a as kg}from"./chunk-2C3X2ESN.js";import{a as Tg}from"./chunk-D7VCPH6W.js";import{a as jg}from"./chunk-MF4B4RDR.js";import{a as Sg,b as Cg,c as xg}from"./chunk-FVKMBZOU.js";import{a as ko}from"./chunk-H5WTK5UT.js";import{a as zg}from"./chunk-WCOLHYTR.js";import{a as gn,b as hn}from"./chunk-H45DK7IX.js";import{a as pn,b as mn}from"./chunk-J6CJ26QN.js";import{a as Hg}from"./chunk-ZUTM7S4U.js";import{a as nn,b as an,c as ln,d as dn,e as cn,f as un,g as Ns,m as Re,n as et,o as bg,p as fg,q as yg,r as vg,s as wg,t as Ei}from"./chunk-IWFKJHPR.js";import{A as wo,a as dg,b as Ni,c as js,e as yt,f as cg,h as ug,i as gg,j as pg,k as mg,l as Di,m as hg,o as Bi,r as As,s as ns,t as as,y as _g,z as Yt}from"./chunk-7EQFLCW4.js";import{a as Ri}from"./chunk-TLDD55XE.js";import{d as oi}from"./chunk-DFFTJVRY.js";import{b as Oe}from"./chunk-Y6ETBMB7.js";import{k as He,m as Ui,n as ve}from"./chunk-ETENXVXQ.js";import{a as ke,b as Fe}from"./chunk-KZKL7DGI.js";import{e as lg}from"./chunk-OA7Y3E5A.js";import{$a as Qu,Ac as og,Bc as rg,Bd as ag,Ca as Ii,Cc as Pe,D as Gu,Da as Zu,Dc as Gt,Ec as os,Fa as Is,Fc as Et,Gc as zs,Hb as Y,Ib as T,Jb as I,Jc as H,Kc as C,Lb as ut,Lc as Ke,M as xs,Mb as gt,Nb as pt,Ob as y,Pb as m,Qb as p,Rb as x,Sb as Xr,Sc as mt,Tb as en,Tc as V,Ub as tn,Uc as Ai,Vb as tg,Wb as ig,Wc as ng,Xa as he,Z as Za,_b as $,a as J,aa as vo,ab as u,b as xe,bc as R,c as qu,cc as sn,dc as b,e as _,fa as Yu,fb as Zr,g as je,ga as Pt,gb as pi,h as G,ha as Ts,hc as Qa,ib as ts,ic as Xa,ja as Wu,jc as el,k as Ku,ka as Ju,kc as Pi,kd as Ut,la as z,lc as zi,ld as rs,mb as Q,mc as sg,md as ht,n as It,nb as Ps,nc as Lt,o as Ja,ob as is,oc as ji,pb as Xu,pc as Z,q as Vu,qc as w,ra as E,rc as K,sa as U,sb as de,sc as O,tc as ss,td as rn,ub as eg,uc as on,v as $u,vb as Qr,w as le,x as Lu,xc as Ae,yc as Ne,za as Jr,zc as De}from"./chunk-IOKYXV5M.js";var Co=_(ye=>{"use strict";Object.defineProperty(ye,"__esModule",{value:!0});ye.regexpCode=ye.getEsmExportName=ye.getProperty=ye.safeStringify=ye.stringify=ye.strConcat=ye.addCodeArg=ye.str=ye._=ye.nil=ye._Code=ye.Name=ye.IDENTIFIER=ye._CodeOrName=void 0;var Ho=class{};ye._CodeOrName=Ho;ye.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var ls=class extends Ho{constructor(i){if(super(),!ye.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ye.Name=ls;var Rt=class extends Ho{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof ls&&(t[s.str]=(t[s.str]||0)+1),t),{})}};ye._Code=Rt;ye.nil=new Rt("");function Ng(e,...i){let t=[e[0]],s=0;for(;s<i.length;)sl(t,i[s]),t.push(e[++s]);return new Rt(t)}ye._=Ng;var il=new Rt("+");function Dg(e,...i){let t=[So(e[0])],s=0;for(;s<i.length;)t.push(il),sl(t,i[s]),t.push(il,So(e[++s]));return xS(t),new Rt(t)}ye.str=Dg;function sl(e,i){i instanceof Rt?e.push(...i._items):i instanceof ls?e.push(i):e.push(PS(i))}ye.addCodeArg=sl;function xS(e){let i=1;for(;i<e.length-1;){if(e[i]===il){let t=TS(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function TS(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof ls||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof ls))return`"${e}${i.slice(1)}`}function IS(e,i){return i.emptyStr()?e:e.emptyStr()?i:Dg`${e}${i}`}ye.strConcat=IS;function PS(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:So(Array.isArray(e)?e.join(","):e)}function zS(e){return new Rt(So(e))}ye.stringify=zS;function So(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ye.safeStringify=So;function jS(e){return typeof e=="string"&&ye.IDENTIFIER.test(e)?new Rt(`.${e}`):Ng`[${e}]`}ye.getProperty=jS;function AS(e){if(typeof e=="string"&&ye.IDENTIFIER.test(e))return new Rt(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ye.getEsmExportName=AS;function NS(e){return new Rt(e.toString())}ye.regexpCode=NS});var nl=_(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.ValueScope=wt.ValueScopeName=wt.Scope=wt.varKinds=wt.UsedValueState=void 0;var vt=Co(),ol=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},_n=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(_n||(wt.UsedValueState=_n={}));wt.varKinds={const:new vt.Name("const"),let:new vt.Name("let"),var:new vt.Name("var")};var bn=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof vt.Name?i:this.name(i)}name(i){return new vt.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};wt.Scope=bn;var fn=class extends vt.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,vt._)`.${new vt.Name(t)}[${s}]`}};wt.ValueScopeName=fn;var DS=(0,vt._)`\n`,rl=class extends bn{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=xe(J({},i),{_n:i.lines?DS:vt.nil})}get(){return this._scope}name(i){return new fn(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let o=this.toName(i),{prefix:r}=o,n=(s=t.key)!==null&&s!==void 0?s:t.ref,a=this._values[r];if(a){let c=a.get(n);if(c)return c}else a=this._values[r]=new Map;a.set(n,o);let l=this._scope[r]||(this._scope[r]=[]),d=l.length;return l[d]=t.ref,o.setValue(t,{property:r,itemIndex:d}),o}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,vt._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,o=>{if(o.value===void 0)throw new Error(`CodeGen: name "${o}" has no value`);return o.value.code},t,s)}_reduceValues(i,t,s={},o){let r=vt.nil;for(let n in i){let a=i[n];if(!a)continue;let l=s[n]=s[n]||new Map;a.forEach(d=>{if(l.has(d))return;l.set(d,_n.Started);let c=t(d);if(c){let g=this.opts.es5?wt.varKinds.var:wt.varKinds.const;r=(0,vt._)`${r}${g} ${d} = ${c};${this.opts._n}`}else if(c=o?.(d))r=(0,vt._)`${r}${c}${this.opts._n}`;else throw new ol(d);l.set(d,_n.Completed)})}return r}};wt.ValueScope=rl});var ee=_(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.or=ce.and=ce.not=ce.CodeGen=ce.operators=ce.varKinds=ce.ValueScopeName=ce.ValueScope=ce.Scope=ce.Name=ce.regexpCode=ce.stringify=ce.getProperty=ce.nil=ce.strConcat=ce.str=ce._=void 0;var _e=Co(),Wt=nl(),Fi=Co();Object.defineProperty(ce,"_",{enumerable:!0,get:function(){return Fi._}});Object.defineProperty(ce,"str",{enumerable:!0,get:function(){return Fi.str}});Object.defineProperty(ce,"strConcat",{enumerable:!0,get:function(){return Fi.strConcat}});Object.defineProperty(ce,"nil",{enumerable:!0,get:function(){return Fi.nil}});Object.defineProperty(ce,"getProperty",{enumerable:!0,get:function(){return Fi.getProperty}});Object.defineProperty(ce,"stringify",{enumerable:!0,get:function(){return Fi.stringify}});Object.defineProperty(ce,"regexpCode",{enumerable:!0,get:function(){return Fi.regexpCode}});Object.defineProperty(ce,"Name",{enumerable:!0,get:function(){return Fi.Name}});var Hn=nl();Object.defineProperty(ce,"Scope",{enumerable:!0,get:function(){return Hn.Scope}});Object.defineProperty(ce,"ValueScope",{enumerable:!0,get:function(){return Hn.ValueScope}});Object.defineProperty(ce,"ValueScopeName",{enumerable:!0,get:function(){return Hn.ValueScopeName}});Object.defineProperty(ce,"varKinds",{enumerable:!0,get:function(){return Hn.varKinds}});ce.operators={GT:new _e._Code(">"),GTE:new _e._Code(">="),LT:new _e._Code("<"),LTE:new _e._Code("<="),EQ:new _e._Code("==="),NEQ:new _e._Code("!=="),NOT:new _e._Code("!"),OR:new _e._Code("||"),AND:new _e._Code("&&"),ADD:new _e._Code("+")};var mi=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},al=class extends mi{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?Wt.varKinds.var:this.varKind,o=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${o};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=Bs(this.rhs,i,t)),this}get names(){return this.rhs instanceof _e._CodeOrName?this.rhs.names:{}}},vn=class extends mi{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof _e.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=Bs(this.rhs,i,t),this}get names(){let i=this.lhs instanceof _e.Name?{}:J({},this.lhs.names);return kn(i,this.rhs)}},ll=class extends vn{constructor(i,t,s,o){super(i,s,o),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},dl=class extends mi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},cl=class extends mi{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},ul=class extends mi{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},gl=class extends mi{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=Bs(this.code,i,t),this}get names(){return this.code instanceof _e._CodeOrName?this.code.names:{}}},xo=class extends mi{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,o=s.length;for(;o--;){let r=s[o];r.optimizeNames(i,t)||(BS(i,r.names),s.splice(o,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>ds(i,t.names),{})}},hi=class extends xo{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},pl=class extends xo{},ml=(()=>{class e extends hi{}return e.kind="else",e})(),yn=(()=>{class e extends hi{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let o=s.optimizeNodes();s=this.else=Array.isArray(o)?new ml(o):o}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(Fg(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var o;if(this.else=(o=this.else)===null||o===void 0?void 0:o.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=Bs(this.condition,t,s),this}get names(){let t=super.names;return kn(t,this.condition),this.else&&ds(t,this.else.names),t}}return e.kind="if",e})(),Sn=(()=>{class e extends hi{}return e.kind="for",e})(),hl=class extends Sn{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=Bs(this.iteration,i,t),this}get names(){return ds(super.names,this.iteration.names)}},_l=class extends Sn{constructor(i,t,s,o){super(),this.varKind=i,this.name=t,this.from=s,this.to=o}render(i){let t=i.es5?Wt.varKinds.var:this.varKind,{name:s,from:o,to:r}=this;return`for(${t} ${s}=${o}; ${s}<${r}; ${s}++)`+super.render(i)}get names(){let i=kn(super.names,this.from);return kn(i,this.to)}},wn=class extends Sn{constructor(i,t,s,o){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=o}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=Bs(this.iterable,i,t),this}get names(){return ds(super.names,this.iterable.names)}},Bg=(()=>{class e extends hi{constructor(t,s,o){super(),this.name=t,this.args=s,this.async=o}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),Eg=(()=>{class e extends xo{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),bl=class extends hi{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var s,o;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(o=this.finally)===null||o===void 0||o.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&ds(i,this.catch.names),this.finally&&ds(i,this.finally.names),i}},Ug=(()=>{class e extends hi{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),Rg=(()=>{class e extends hi{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),fl=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=xe(J({},t),{_n:t.lines?`
2
2
  `:""}),this._extScope=i,this._scope=new Wt.Scope({parent:i}),this._nodes=[new pl]}toString(){return this._root.render(this.opts)}name(i){return this._scope.name(i)}scopeName(i){return this._extScope.name(i)}scopeValue(i,t){let s=this._extScope.value(i,t);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(i,t){return this._extScope.getValue(i,t)}scopeRefs(i){return this._extScope.scopeRefs(i,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(i,t,s,o){let r=this._scope.toName(t);return s!==void 0&&o&&(this._constants[r.str]=s),this._leafNode(new al(i,r,s)),r}const(i,t,s){return this._def(Wt.varKinds.const,i,t,s)}let(i,t,s){return this._def(Wt.varKinds.let,i,t,s)}var(i,t,s){return this._def(Wt.varKinds.var,i,t,s)}assign(i,t,s){return this._leafNode(new vn(i,t,s))}add(i,t){return this._leafNode(new ll(i,ce.operators.ADD,t))}code(i){return typeof i=="function"?i():i!==_e.nil&&this._leafNode(new gl(i)),this}object(...i){let t=["{"];for(let[s,o]of i)t.length>1&&t.push(","),t.push(s),(s!==o||this.opts.es5)&&(t.push(":"),(0,_e.addCodeArg)(t,o));return t.push("}"),new _e._Code(t)}if(i,t,s){if(this._blockNode(new yn(i)),t&&s)this.code(t).else().code(s).endIf();else if(t)this.code(t).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(i){return this._elseNode(new yn(i))}else(){return this._elseNode(new ml)}endIf(){return this._endBlockNode(yn,ml)}_for(i,t){return this._blockNode(i),t&&this.code(t).endFor(),this}for(i,t){return this._for(new hl(i),t)}forRange(i,t,s,o,r=this.opts.es5?Wt.varKinds.var:Wt.varKinds.let){let n=this._scope.toName(i);return this._for(new _l(r,n,t,s),()=>o(n))}forOf(i,t,s,o=Wt.varKinds.const){let r=this._scope.toName(i);if(this.opts.es5){let n=t instanceof _e.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,_e._)`${n}.length`,a=>{this.var(r,(0,_e._)`${n}[${a}]`),s(r)})}return this._for(new wn("of",o,r,t),()=>s(r))}forIn(i,t,s,o=this.opts.es5?Wt.varKinds.var:Wt.varKinds.const){if(this.opts.ownProperties)return this.forOf(i,(0,_e._)`Object.keys(${t})`,s);let r=this._scope.toName(i);return this._for(new wn("in",o,r,t),()=>s(r))}endFor(){return this._endBlockNode(Sn)}label(i){return this._leafNode(new dl(i))}break(i){return this._leafNode(new cl(i))}return(i){let t=new Eg;if(this._blockNode(t),this.code(i),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Eg)}try(i,t,s){if(!t&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let o=new bl;if(this._blockNode(o),this.code(i),t){let r=this.name("e");this._currNode=o.catch=new Ug(r),t(r)}return s&&(this._currNode=o.finally=new Rg,this.code(s)),this._endBlockNode(Ug,Rg)}throw(i){return this._leafNode(new ul(i))}block(i,t){return this._blockStarts.push(this._nodes.length),i&&this.code(i).endBlock(t),this}endBlock(i){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-t;if(s<0||i!==void 0&&s!==i)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${i} expected`);return this._nodes.length=t,this}func(i,t=_e.nil,s,o){return this._blockNode(new Bg(i,t,s)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(Bg)}optimize(i=1){for(;i-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(i){return this._currNode.nodes.push(i),this}_blockNode(i){this._currNode.nodes.push(i),this._nodes.push(i)}_endBlockNode(i,t){let s=this._currNode;if(s instanceof i||t&&s instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${i.kind}/${t.kind}`:i.kind}"`)}_elseNode(i){let t=this._currNode;if(!(t instanceof yn))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=i,this}get _root(){return this._nodes[0]}get _currNode(){let i=this._nodes;return i[i.length-1]}set _currNode(i){let t=this._nodes;t[t.length-1]=i}};ce.CodeGen=fl;function ds(e,i){for(let t in i)e[t]=(e[t]||0)+(i[t]||0);return e}function kn(e,i){return i instanceof _e._CodeOrName?ds(e,i.names):e}function Bs(e,i,t){if(e instanceof _e.Name)return s(e);if(!o(e))return e;return new _e._Code(e._items.reduce((r,n)=>(n instanceof _e.Name&&(n=s(n)),n instanceof _e._Code?r.push(...n._items):r.push(n),r),[]));function s(r){let n=t[r.str];return n===void 0||i[r.str]!==1?r:(delete i[r.str],n)}function o(r){return r instanceof _e._Code&&r._items.some(n=>n instanceof _e.Name&&i[n.str]===1&&t[n.str]!==void 0)}}function BS(e,i){for(let t in i)e[t]=(e[t]||0)-(i[t]||0)}function Fg(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,_e._)`!${yl(e)}`}ce.not=Fg;var ES=Og(ce.operators.AND);function US(...e){return e.reduce(ES)}ce.and=US;var RS=Og(ce.operators.OR);function FS(...e){return e.reduce(RS)}ce.or=FS;function Og(e){return(i,t)=>i===_e.nil?t:t===_e.nil?i:(0,_e._)`${yl(i)} ${e} ${yl(t)}`}function yl(e){return e instanceof _e.Name?e:(0,_e._)`(${e})`}});var ge=_(ue=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.checkStrictMode=ue.getErrorPath=ue.Type=ue.useFunc=ue.setEvaluated=ue.evaluatedPropsToName=ue.mergeEvaluated=ue.eachItem=ue.unescapeJsonPointer=ue.escapeJsonPointer=ue.escapeFragment=ue.unescapeFragment=ue.schemaRefOrVal=ue.schemaHasRulesButRef=ue.schemaHasRules=ue.checkUnknownRules=ue.alwaysValidSchema=ue.toHash=void 0;var Te=ee(),OS=Co();function MS(e){let i={};for(let t of e)i[t]=!0;return i}ue.toHash=MS;function qS(e,i){return typeof i=="boolean"?i:Object.keys(i).length===0?!0:(Kg(e,i),!Vg(i,e.self.RULES.all))}ue.alwaysValidSchema=qS;function Kg(e,i=e.schema){let{opts:t,self:s}=e;if(!t.strictSchema||typeof i=="boolean")return;let o=s.RULES.keywords;for(let r in i)o[r]||Gg(e,`unknown keyword: "${r}"`)}ue.checkUnknownRules=Kg;function Vg(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(i[t])return!0;return!1}ue.schemaHasRules=Vg;function KS(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&i.all[t])return!0;return!1}ue.schemaHasRulesButRef=KS;function VS({topSchemaRef:e,schemaPath:i},t,s,o){if(!o){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Te._)`${t}`}return(0,Te._)`${e}${i}${(0,Te.getProperty)(s)}`}ue.schemaRefOrVal=VS;function $S(e){return $g(decodeURIComponent(e))}ue.unescapeFragment=$S;function LS(e){return encodeURIComponent(wl(e))}ue.escapeFragment=LS;function wl(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}ue.escapeJsonPointer=wl;function $g(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}ue.unescapeJsonPointer=$g;function GS(e,i){if(Array.isArray(e))for(let t of e)i(t);else i(e)}ue.eachItem=GS;function Mg({mergeNames:e,mergeToName:i,mergeValues:t,resultToName:s}){return(o,r,n,a)=>{let l=n===void 0?r:n instanceof Te.Name?(r instanceof Te.Name?e(o,r,n):i(o,r,n),n):r instanceof Te.Name?(i(o,n,r),r):t(r,n);return a===Te.Name&&!(l instanceof Te.Name)?s(o,l):l}}ue.mergeEvaluated={props:Mg({mergeNames:(e,i,t)=>e.if((0,Te._)`${t} !== true && ${i} !== undefined`,()=>{e.if((0,Te._)`${i} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,Te._)`${t} || {}`).code((0,Te._)`Object.assign(${t}, ${i})`))}),mergeToName:(e,i,t)=>e.if((0,Te._)`${t} !== true`,()=>{i===!0?e.assign(t,!0):(e.assign(t,(0,Te._)`${t} || {}`),kl(e,t,i))}),mergeValues:(e,i)=>e===!0?!0:J(J({},e),i),resultToName:Lg}),items:Mg({mergeNames:(e,i,t)=>e.if((0,Te._)`${t} !== true && ${i} !== undefined`,()=>e.assign(t,(0,Te._)`${i} === true ? true : ${t} > ${i} ? ${t} : ${i}`)),mergeToName:(e,i,t)=>e.if((0,Te._)`${t} !== true`,()=>e.assign(t,i===!0?!0:(0,Te._)`${t} > ${i} ? ${t} : ${i}`)),mergeValues:(e,i)=>e===!0?!0:Math.max(e,i),resultToName:(e,i)=>e.var("items",i)})};function Lg(e,i){if(i===!0)return e.var("props",!0);let t=e.var("props",(0,Te._)`{}`);return i!==void 0&&kl(e,t,i),t}ue.evaluatedPropsToName=Lg;function kl(e,i,t){Object.keys(t).forEach(s=>e.assign((0,Te._)`${i}${(0,Te.getProperty)(s)}`,!0))}ue.setEvaluated=kl;var qg={};function YS(e,i){return e.scopeValue("func",{ref:i,code:qg[i.code]||(qg[i.code]=new OS._Code(i.code))})}ue.useFunc=YS;var vl=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(vl||(ue.Type=vl={}));function WS(e,i,t){if(e instanceof Te.Name){let s=i===vl.Num;return t?s?(0,Te._)`"[" + ${e} + "]"`:(0,Te._)`"['" + ${e} + "']"`:s?(0,Te._)`"/" + ${e}`:(0,Te._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Te.getProperty)(e).toString():"/"+wl(e)}ue.getErrorPath=WS;function Gg(e,i,t=e.opts.strictSchema){if(t){if(i=`strict mode: ${i}`,t===!0)throw new Error(i);e.self.logger.warn(i)}}ue.checkStrictMode=Gg});var Ft=_(Hl=>{"use strict";Object.defineProperty(Hl,"__esModule",{value:!0});var rt=ee(),JS={data:new rt.Name("data"),valCxt:new rt.Name("valCxt"),instancePath:new rt.Name("instancePath"),parentData:new rt.Name("parentData"),parentDataProperty:new rt.Name("parentDataProperty"),rootData:new rt.Name("rootData"),dynamicAnchors:new rt.Name("dynamicAnchors"),vErrors:new rt.Name("vErrors"),errors:new rt.Name("errors"),this:new rt.Name("this"),self:new rt.Name("self"),scope:new rt.Name("scope"),json:new rt.Name("json"),jsonPos:new rt.Name("jsonPos"),jsonLen:new rt.Name("jsonLen"),jsonPart:new rt.Name("jsonPart")};Hl.default=JS});var To=_(nt=>{"use strict";Object.defineProperty(nt,"__esModule",{value:!0});nt.extendErrors=nt.resetErrorsCount=nt.reportExtraError=nt.reportError=nt.keyword$DataError=nt.keywordError=void 0;var fe=ee(),Cn=ge(),_t=Ft();nt.keywordError={message:({keyword:e})=>(0,fe.str)`must pass "${e}" keyword validation`};nt.keyword$DataError={message:({keyword:e,schemaType:i})=>i?(0,fe.str)`"${e}" keyword must be ${i} ($data)`:(0,fe.str)`"${e}" keyword is invalid ($data)`};function ZS(e,i=nt.keywordError,t,s){let{it:o}=e,{gen:r,compositeRule:n,allErrors:a}=o,l=Jg(e,i,t);s??(n||a)?Yg(r,l):Wg(o,(0,fe._)`[${l}]`)}nt.reportError=ZS;function QS(e,i=nt.keywordError,t){let{it:s}=e,{gen:o,compositeRule:r,allErrors:n}=s,a=Jg(e,i,t);Yg(o,a),r||n||Wg(s,_t.default.vErrors)}nt.reportExtraError=QS;function XS(e,i){e.assign(_t.default.errors,i),e.if((0,fe._)`${_t.default.vErrors} !== null`,()=>e.if(i,()=>e.assign((0,fe._)`${_t.default.vErrors}.length`,i),()=>e.assign(_t.default.vErrors,null)))}nt.resetErrorsCount=XS;function eC({gen:e,keyword:i,schemaValue:t,data:s,errsCount:o,it:r}){if(o===void 0)throw new Error("ajv implementation error");let n=e.name("err");e.forRange("i",o,_t.default.errors,a=>{e.const(n,(0,fe._)`${_t.default.vErrors}[${a}]`),e.if((0,fe._)`${n}.instancePath === undefined`,()=>e.assign((0,fe._)`${n}.instancePath`,(0,fe.strConcat)(_t.default.instancePath,r.errorPath))),e.assign((0,fe._)`${n}.schemaPath`,(0,fe.str)`${r.errSchemaPath}/${i}`),r.opts.verbose&&(e.assign((0,fe._)`${n}.schema`,t),e.assign((0,fe._)`${n}.data`,s))})}nt.extendErrors=eC;function Yg(e,i){let t=e.const("err",i);e.if((0,fe._)`${_t.default.vErrors} === null`,()=>e.assign(_t.default.vErrors,(0,fe._)`[${t}]`),(0,fe._)`${_t.default.vErrors}.push(${t})`),e.code((0,fe._)`${_t.default.errors}++`)}function Wg(e,i){let{gen:t,validateName:s,schemaEnv:o}=e;o.$async?t.throw((0,fe._)`new ${e.ValidationError}(${i})`):(t.assign((0,fe._)`${s}.errors`,i),t.return(!1))}var cs={keyword:new fe.Name("keyword"),schemaPath:new fe.Name("schemaPath"),params:new fe.Name("params"),propertyName:new fe.Name("propertyName"),message:new fe.Name("message"),schema:new fe.Name("schema"),parentSchema:new fe.Name("parentSchema")};function Jg(e,i,t){let{createErrors:s}=e.it;return s===!1?(0,fe._)`{}`:tC(e,i,t)}function tC(e,i,t={}){let{gen:s,it:o}=e,r=[iC(o,t),sC(e,t)];return oC(e,i,r),s.object(...r)}function iC({errorPath:e},{instancePath:i}){let t=i?(0,fe.str)`${e}${(0,Cn.getErrorPath)(i,Cn.Type.Str)}`:e;return[_t.default.instancePath,(0,fe.strConcat)(_t.default.instancePath,t)]}function sC({keyword:e,it:{errSchemaPath:i}},{schemaPath:t,parentSchema:s}){let o=s?i:(0,fe.str)`${i}/${e}`;return t&&(o=(0,fe.str)`${o}${(0,Cn.getErrorPath)(t,Cn.Type.Str)}`),[cs.schemaPath,o]}function oC(e,{params:i,message:t},s){let{keyword:o,data:r,schemaValue:n,it:a}=e,{opts:l,propertyName:d,topSchemaRef:c,schemaPath:g}=a;s.push([cs.keyword,o],[cs.params,typeof i=="function"?i(e):i||(0,fe._)`{}`]),l.messages&&s.push([cs.message,typeof t=="function"?t(e):t]),l.verbose&&s.push([cs.schema,n],[cs.parentSchema,(0,fe._)`${c}${g}`],[_t.default.data,r]),d&&s.push([cs.propertyName,d])}});var Qg=_(Es=>{"use strict";Object.defineProperty(Es,"__esModule",{value:!0});Es.boolOrEmptySchema=Es.topBoolOrEmptySchema=void 0;var rC=To(),nC=ee(),aC=Ft(),lC={message:"boolean schema is false"};function dC(e){let{gen:i,schema:t,validateName:s}=e;t===!1?Zg(e,!1):typeof t=="object"&&t.$async===!0?i.return(aC.default.data):(i.assign((0,nC._)`${s}.errors`,null),i.return(!0))}Es.topBoolOrEmptySchema=dC;function cC(e,i){let{gen:t,schema:s}=e;s===!1?(t.var(i,!1),Zg(e)):t.var(i,!0)}Es.boolOrEmptySchema=cC;function Zg(e,i){let{gen:t,data:s}=e,o={gen:t,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,rC.reportError)(o,lC,void 0,i)}});var Sl=_(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});Us.getRules=Us.isJSONType=void 0;var uC=["string","number","integer","boolean","null","object","array"],gC=new Set(uC);function pC(e){return typeof e=="string"&&gC.has(e)}Us.isJSONType=pC;function mC(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:xe(J({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Us.getRules=mC});var Cl=_(Oi=>{"use strict";Object.defineProperty(Oi,"__esModule",{value:!0});Oi.shouldUseRule=Oi.shouldUseGroup=Oi.schemaHasRulesForType=void 0;function hC({schema:e,self:i},t){let s=i.RULES.types[t];return s&&s!==!0&&Xg(e,s)}Oi.schemaHasRulesForType=hC;function Xg(e,i){return i.rules.some(t=>ep(e,t))}Oi.shouldUseGroup=Xg;function ep(e,i){var t;return e[i.keyword]!==void 0||((t=i.definition.implements)===null||t===void 0?void 0:t.some(s=>e[s]!==void 0))}Oi.shouldUseRule=ep});var Io=_(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.reportTypeError=at.checkDataTypes=at.checkDataType=at.coerceAndCheckDataType=at.getJSONTypes=at.getSchemaTypes=at.DataType=void 0;var _C=Sl(),bC=Cl(),fC=To(),ne=ee(),tp=ge(),Rs=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(Rs||(at.DataType=Rs={}));function yC(e){let i=ip(e.type);if(i.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!i.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&i.push("null")}return i}at.getSchemaTypes=yC;function ip(e){let i=Array.isArray(e)?e:e?[e]:[];if(i.every(_C.isJSONType))return i;throw new Error("type must be JSONType or JSONType[]: "+i.join(","))}at.getJSONTypes=ip;function vC(e,i){let{gen:t,data:s,opts:o}=e,r=wC(i,o.coerceTypes),n=i.length>0&&!(r.length===0&&i.length===1&&(0,bC.schemaHasRulesForType)(e,i[0]));if(n){let a=Tl(i,s,o.strictNumbers,Rs.Wrong);t.if(a,()=>{r.length?kC(e,i,r):Il(e)})}return n}at.coerceAndCheckDataType=vC;var sp=new Set(["string","number","integer","boolean","null"]);function wC(e,i){return i?e.filter(t=>sp.has(t)||i==="array"&&t==="array"):[]}function kC(e,i,t){let{gen:s,data:o,opts:r}=e,n=s.let("dataType",(0,ne._)`typeof ${o}`),a=s.let("coerced",(0,ne._)`undefined`);r.coerceTypes==="array"&&s.if((0,ne._)`${n} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,()=>s.assign(o,(0,ne._)`${o}[0]`).assign(n,(0,ne._)`typeof ${o}`).if(Tl(i,o,r.strictNumbers),()=>s.assign(a,o))),s.if((0,ne._)`${a} !== undefined`);for(let d of t)(sp.has(d)||d==="array"&&r.coerceTypes==="array")&&l(d);s.else(),Il(e),s.endIf(),s.if((0,ne._)`${a} !== undefined`,()=>{s.assign(o,a),HC(e,a)});function l(d){switch(d){case"string":s.elseIf((0,ne._)`${n} == "number" || ${n} == "boolean"`).assign(a,(0,ne._)`"" + ${o}`).elseIf((0,ne._)`${o} === null`).assign(a,(0,ne._)`""`);return;case"number":s.elseIf((0,ne._)`${n} == "boolean" || ${o} === null
3
3
  || (${n} == "string" && ${o} && ${o} == +${o})`).assign(a,(0,ne._)`+${o}`);return;case"integer":s.elseIf((0,ne._)`${n} === "boolean" || ${o} === null
4
4
  || (${n} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(a,(0,ne._)`+${o}`);return;case"boolean":s.elseIf((0,ne._)`${o} === "false" || ${o} === 0 || ${o} === null`).assign(a,!1).elseIf((0,ne._)`${o} === "true" || ${o} === 1`).assign(a,!0);return;case"null":s.elseIf((0,ne._)`${o} === "" || ${o} === 0 || ${o} === false`),s.assign(a,null);return;case"array":s.elseIf((0,ne._)`${n} === "string" || ${n} === "number"
@@ -1 +1 @@
1
- import{g as i}from"./chunk-DFFTJVRY.js";import"./chunk-OA7Y3E5A.js";import{ha as o,nb as e}from"./chunk-IOKYXV5M.js";var m=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"restart-server",loadComponent:()=>import("./chunk-MP3K6Q5N.js").then(t=>t.RestartLinuxComponent)},{path:"shutdown-server",loadComponent:()=>import("./chunk-DP45OUJJ.js").then(t=>t.ShutdownLinuxComponent)}],n=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[i.forChild(m),i]})}return t})();var c=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[n]})}return t})();export{c as LinuxModule};
1
+ import{g as i}from"./chunk-DFFTJVRY.js";import"./chunk-OA7Y3E5A.js";import{ha as o,nb as e}from"./chunk-IOKYXV5M.js";var m=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"restart-server",loadComponent:()=>import("./chunk-5EOLSGNC.js").then(t=>t.RestartLinuxComponent)},{path:"shutdown-server",loadComponent:()=>import("./chunk-7N3D3R4N.js").then(t=>t.ShutdownLinuxComponent)}],n=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[i.forChild(m),i]})}return t})();var c=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[n]})}return t})();export{c as LinuxModule};
@@ -1,2 +1,2 @@
1
- import{A as Z,c as G,d as k,e as j,f as D,g as K,j as $,m as A,p as J,q as Q,w as X,z as Y}from"./chunk-7EQFLCW4.js";import{a as ae}from"./chunk-QSP4KI3N.js";import{b as oe}from"./chunk-BYDZXXU7.js";import{b as re}from"./chunk-ZY5SUCRL.js";import{k as ie,m as U,n as ne}from"./chunk-JCCQ75XM.js";import{a as ee,b as te}from"./chunk-KZKL7DGI.js";import{m as q}from"./chunk-OA7Y3E5A.js";import{Bd as R,Cc as L,Dc as B,Ec as E,Hb as M,Ib as z,Jb as T,Jc as a,Kc as s,Ob as m,Pb as o,Qb as r,Rb as u,Xa as W,_b as I,ab as n,bc as x,dc as _,h as S,kd as H,la as w,mb as V,nc as O,nd as N,qc as l,ra as C,rc as f,sa as b,sc as g,w as h}from"./chunk-IOKYXV5M.js";var pe=t=>({background:t}),de=t=>({anim:t}),ce=t=>({"progress-bar-animated":t}),me=()=>["restoring","restarting","restore-complete"],P=(t,d)=>({"is-valid":t,"is-invalid":d});function ue(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),u(4,"div",7),a(5,"translate"),o(6,"button",8),x("click",function(){C(e);let i=_();return b(i.onClickGettingStarted())}),l(7),a(8,"translate"),r(),o(9,"a",9),x("click",function(){C(e);let i=_();return b(i.onClickRestoreBackup())}),l(10),a(11,"translate"),r()()}t&2&&(n(2),f(s(3,4,"setup.welcome_to_homebridge")),n(2),m("innerHTML",s(5,6,"setup.intro"),W),n(3),g(" ",s(8,8,"setup.button_get_started")," "),n(3),f(s(11,10,"setup_wizard_restore")))}function ge(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"div",11)(8,"form",12),x("ngSubmit",function(){C(e);let i=_();return b(i.createFirstUser())}),o(9,"div",13)(10,"span",14),u(11,"i",15),r(),u(12,"input",16),a(13,"translate"),r(),o(14,"div",13)(15,"span",14),u(16,"i",17),r(),u(17,"input",18),a(18,"translate"),r(),o(19,"div",13)(20,"span",14),u(21,"i",17),r(),u(22,"input",19),a(23,"translate"),r(),o(24,"div",20)(25,"button",21),x("click",function(){C(e);let i=_();return b(i.onClickCancelRestore())}),l(26),a(27,"translate"),r(),o(28,"button",22),l(29),a(30,"translate"),r()()()()()}if(t&2){let e=_();n(2),f(s(3,16,"setup.create_account")),n(3),f(s(6,18,"setup_wizard_create_info")),n(3),m("formGroup",e.createUserForm),n(4),m("readonly",e.loading)("ngClass",E(30,P,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid))("placeholder",s(13,20,"users.label_username")),n(5),m("readonly",e.loading)("ngClass",E(33,P,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors))("placeholder",s(18,22,"users.label_password")),n(5),m("readonly",e.loading)("ngClass",E(36,P,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors))("placeholder",s(23,24,"users.label_confirm_password")),n(3),m("disabled",e.restoreUploading),n(),g(" ",s(27,26,"form.button_back")," "),n(2),m("disabled",e.createUserForm.invalid||e.loading),n(),g(" ",s(30,28,"form.button_continue")," ")}}function _e(t,d){t&1&&(u(0,"i",25),l(1),a(2,"translate")),t&2&&(n(),g(" ",s(2,1,"backup.label_uploading")," "))}function fe(t,d){t&1&&(l(0),a(1,"translate")),t&2&&g(" ",s(1,1,"form.button_continue")," ")}function he(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"input",23),x("change",function(i){C(e);let F=_();return b(F.handleRestoreFileInput(i.target.files))}),r(),o(8,"div",20)(9,"button",21),x("click",function(){C(e);let i=_();return b(i.onClickCancelRestore())}),l(10),a(11,"translate"),r(),o(12,"button",24),x("click",function(){C(e);let i=_();return b(i.onRestoreBackupClick())}),z(13,_e,3,3)(14,fe,2,3),r()()()}if(t&2){let e=_();n(2),f(s(3,6,"setup_wizard_restore")),n(3),f(s(6,8,"backup.restore_help_one")),n(4),m("disabled",e.restoreUploading),n(),g(" ",s(11,10,"form.button_back")," "),n(2),m("disabled",e.restoreUploading||!e.selectedFile),n(),T(e.restoreUploading?13:14)}}function we(t,d){t&1&&(l(0),a(1,"translate")),t&2&&g(" ",s(1,1,"setup_wizard_restoring")," ")}function Ce(t,d){t&1&&(l(0),a(1,"translate")),t&2&&g(" ",s(1,1,"setup_wizard_starting")," ")}function be(t,d){t&1&&(l(0),a(1,"translate")),t&2&&g(" ",s(1,1,"setup_wizard_complete")," ")}function xe(t,d){t&1&&(o(0,"a",27),l(1),a(2,"translate"),r()),t&2&&(n(),g(" ",s(2,1,"form.button_continue")," "))}function ve(t,d){if(t&1&&(o(0,"div",5)(1,"h4",6),z(2,we,2,3)(3,Ce,2,3)(4,be,2,3),r(),u(5,"div",26),z(6,xe,3,3,"a",27),r()),t&2){let e=_();n(2),T(e.step==="restoring"?2:e.step==="restarting"?3:e.step==="restore-complete"?4:-1),n(4),T(e.step==="restore-complete"?6:-1)}}function ye(t,d){t&1&&(o(0,"div",5)(1,"h4",28),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"a",29),l(8),a(9,"translate"),r()()),t&2&&(n(2),f(s(3,3,"setup_wizard_complete_title")),n(3),f(s(6,5,"setup_wizard_completed")),n(3),g(" ",s(9,7,"form.button_continue")," "))}var He=(()=>{class t{$api=w(ne);$auth=w(oe);$settings=w(re);$title=w(q);$toastr=w(ie);$translate=w(ee);$ws=w(ae);io;step="welcome";backgroundStyle;progress=1;restoreInProgress=!1;restoreStarted=!1;restoreFailed=!1;loading=!1;selectedFile;restoreUploading=!1;createUserForm=new K({username:new $("",[k.required]),password:new $("",[k.compose([k.required,k.minLength(4)])]),passwordConfirm:new $("",[k.required])},this.matchPassword);ngOnInit(){return S(this,null,function*(){this.$title.setTitle(this.$translate.instant("setup_wizard_page_title")),yield this.setBackground()})}onClickGettingStarted(){this.step="create-account",this.progress=50}onClickRestoreBackup(){this.step="restore-backup",this.progress=20}onClickCancelRestore(){this.selectedFile=null,this.step="welcome",this.progress=1}createFirstUser(){return S(this,null,function*(){this.loading=!0,this.progress=75;let e=this.createUserForm.getRawValue();e.name=e.username;try{yield h(this.$api.post("/setup-wizard/create-first-user",e)),this.$settings.env.setupWizardComplete=!0,this.progress=100,this.loading=!1,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}catch(p){this.loading=!1,this.progress=50,console.error(p),this.$toastr.error(p.message,this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?(this.selectedFile=e[0],this.progress=40):(delete this.selectedFile,this.progress=20)}onRestoreBackupClick(){return S(this,null,function*(){this.restoreUploading=!0,this.step="restoring",this.progress=60;try{let e=yield h(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(U.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token,this.progress=65;let p=new FormData;p.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield h(this.$api.post("/backup/restore",p)),this.progress=70,this.io=this.$ws.connectToNamespace("backup");let i=document.getElementById("output");this.io.socket.on("stdout",c=>{c.split(`
1
+ import{A as Z,c as G,d as k,e as j,f as D,g as K,j as $,m as A,p as J,q as Q,w as X,z as Y}from"./chunk-7EQFLCW4.js";import{a as ae}from"./chunk-TLDD55XE.js";import{b as oe}from"./chunk-KTUC5YRH.js";import{b as re}from"./chunk-Y6ETBMB7.js";import{k as ie,m as U,n as ne}from"./chunk-ETENXVXQ.js";import{a as ee,b as te}from"./chunk-KZKL7DGI.js";import{m as q}from"./chunk-OA7Y3E5A.js";import{Bd as R,Cc as L,Dc as B,Ec as E,Hb as M,Ib as z,Jb as T,Jc as a,Kc as s,Ob as m,Pb as o,Qb as r,Rb as u,Xa as W,_b as I,ab as n,bc as x,dc as _,h as S,kd as H,la as w,mb as V,nc as O,nd as N,qc as l,ra as C,rc as f,sa as b,sc as g,w as h}from"./chunk-IOKYXV5M.js";var pe=t=>({background:t}),de=t=>({anim:t}),ce=t=>({"progress-bar-animated":t}),me=()=>["restoring","restarting","restore-complete"],P=(t,d)=>({"is-valid":t,"is-invalid":d});function ue(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),u(4,"div",7),a(5,"translate"),o(6,"button",8),x("click",function(){C(e);let i=_();return b(i.onClickGettingStarted())}),l(7),a(8,"translate"),r(),o(9,"a",9),x("click",function(){C(e);let i=_();return b(i.onClickRestoreBackup())}),l(10),a(11,"translate"),r()()}t&2&&(n(2),f(s(3,4,"setup.welcome_to_homebridge")),n(2),m("innerHTML",s(5,6,"setup.intro"),W),n(3),g(" ",s(8,8,"setup.button_get_started")," "),n(3),f(s(11,10,"setup_wizard_restore")))}function ge(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"div",11)(8,"form",12),x("ngSubmit",function(){C(e);let i=_();return b(i.createFirstUser())}),o(9,"div",13)(10,"span",14),u(11,"i",15),r(),u(12,"input",16),a(13,"translate"),r(),o(14,"div",13)(15,"span",14),u(16,"i",17),r(),u(17,"input",18),a(18,"translate"),r(),o(19,"div",13)(20,"span",14),u(21,"i",17),r(),u(22,"input",19),a(23,"translate"),r(),o(24,"div",20)(25,"button",21),x("click",function(){C(e);let i=_();return b(i.onClickCancelRestore())}),l(26),a(27,"translate"),r(),o(28,"button",22),l(29),a(30,"translate"),r()()()()()}if(t&2){let e=_();n(2),f(s(3,16,"setup.create_account")),n(3),f(s(6,18,"setup_wizard_create_info")),n(3),m("formGroup",e.createUserForm),n(4),m("readonly",e.loading)("ngClass",E(30,P,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.valid,e.createUserForm.controls.username.dirty&&e.createUserForm.controls.username.invalid))("placeholder",s(13,20,"users.label_username")),n(5),m("readonly",e.loading)("ngClass",E(33,P,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.valid,e.createUserForm.controls.password.dirty&&e.createUserForm.controls.password.errors))("placeholder",s(18,22,"users.label_password")),n(5),m("readonly",e.loading)("ngClass",E(36,P,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.valid,e.createUserForm.controls.passwordConfirm.dirty&&e.createUserForm.controls.passwordConfirm.errors))("placeholder",s(23,24,"users.label_confirm_password")),n(3),m("disabled",e.restoreUploading),n(),g(" ",s(27,26,"form.button_back")," "),n(2),m("disabled",e.createUserForm.invalid||e.loading),n(),g(" ",s(30,28,"form.button_continue")," ")}}function _e(t,d){t&1&&(u(0,"i",25),l(1),a(2,"translate")),t&2&&(n(),g(" ",s(2,1,"backup.label_uploading")," "))}function fe(t,d){t&1&&(l(0),a(1,"translate")),t&2&&g(" ",s(1,1,"form.button_continue")," ")}function he(t,d){if(t&1){let e=I();o(0,"div",5)(1,"h4",6),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"input",23),x("change",function(i){C(e);let F=_();return b(F.handleRestoreFileInput(i.target.files))}),r(),o(8,"div",20)(9,"button",21),x("click",function(){C(e);let i=_();return b(i.onClickCancelRestore())}),l(10),a(11,"translate"),r(),o(12,"button",24),x("click",function(){C(e);let i=_();return b(i.onRestoreBackupClick())}),z(13,_e,3,3)(14,fe,2,3),r()()()}if(t&2){let e=_();n(2),f(s(3,6,"setup_wizard_restore")),n(3),f(s(6,8,"backup.restore_help_one")),n(4),m("disabled",e.restoreUploading),n(),g(" ",s(11,10,"form.button_back")," "),n(2),m("disabled",e.restoreUploading||!e.selectedFile),n(),T(e.restoreUploading?13:14)}}function we(t,d){t&1&&(l(0),a(1,"translate")),t&2&&g(" ",s(1,1,"setup_wizard_restoring")," ")}function Ce(t,d){t&1&&(l(0),a(1,"translate")),t&2&&g(" ",s(1,1,"setup_wizard_starting")," ")}function be(t,d){t&1&&(l(0),a(1,"translate")),t&2&&g(" ",s(1,1,"setup_wizard_complete")," ")}function xe(t,d){t&1&&(o(0,"a",27),l(1),a(2,"translate"),r()),t&2&&(n(),g(" ",s(2,1,"form.button_continue")," "))}function ve(t,d){if(t&1&&(o(0,"div",5)(1,"h4",6),z(2,we,2,3)(3,Ce,2,3)(4,be,2,3),r(),u(5,"div",26),z(6,xe,3,3,"a",27),r()),t&2){let e=_();n(2),T(e.step==="restoring"?2:e.step==="restarting"?3:e.step==="restore-complete"?4:-1),n(4),T(e.step==="restore-complete"?6:-1)}}function ye(t,d){t&1&&(o(0,"div",5)(1,"h4",28),l(2),a(3,"translate"),r(),o(4,"div",10),l(5),a(6,"translate"),r(),o(7,"a",29),l(8),a(9,"translate"),r()()),t&2&&(n(2),f(s(3,3,"setup_wizard_complete_title")),n(3),f(s(6,5,"setup_wizard_completed")),n(3),g(" ",s(9,7,"form.button_continue")," "))}var He=(()=>{class t{$api=w(ne);$auth=w(oe);$settings=w(re);$title=w(q);$toastr=w(ie);$translate=w(ee);$ws=w(ae);io;step="welcome";backgroundStyle;progress=1;restoreInProgress=!1;restoreStarted=!1;restoreFailed=!1;loading=!1;selectedFile;restoreUploading=!1;createUserForm=new K({username:new $("",[k.required]),password:new $("",[k.compose([k.required,k.minLength(4)])]),passwordConfirm:new $("",[k.required])},this.matchPassword);ngOnInit(){return S(this,null,function*(){this.$title.setTitle(this.$translate.instant("setup_wizard_page_title")),yield this.setBackground()})}onClickGettingStarted(){this.step="create-account",this.progress=50}onClickRestoreBackup(){this.step="restore-backup",this.progress=20}onClickCancelRestore(){this.selectedFile=null,this.step="welcome",this.progress=1}createFirstUser(){return S(this,null,function*(){this.loading=!0,this.progress=75;let e=this.createUserForm.getRawValue();e.name=e.username;try{yield h(this.$api.post("/setup-wizard/create-first-user",e)),this.$settings.env.setupWizardComplete=!0,this.progress=100,this.loading=!1,yield this.$auth.login({username:e.username,password:e.password}),this.step="setup-complete"}catch(p){this.loading=!1,this.progress=50,console.error(p),this.$toastr.error(p.message,this.$translate.instant("toast.title_error"))}})}handleRestoreFileInput(e){e.length?(this.selectedFile=e[0],this.progress=40):(delete this.selectedFile,this.progress=20)}onRestoreBackupClick(){return S(this,null,function*(){this.restoreUploading=!0,this.step="restoring",this.progress=60;try{let e=yield h(this.$api.get("/setup-wizard/get-setup-wizard-token"));window.localStorage.setItem(U.jwt.tokenKey,e.access_token),this.$auth.token=e.access_token,this.progress=65;let p=new FormData;p.append("restoreArchive",this.selectedFile,this.selectedFile.name),yield h(this.$api.post("/backup/restore",p)),this.progress=70,this.io=this.$ws.connectToNamespace("backup");let i=document.getElementById("output");this.io.socket.on("stdout",c=>{c.split(`
2
2
  \r`).forEach(v=>{if(v&&!/^[⠇⠏⠋⠙⠹⠸]+$/.test(v)){let y=document.createElement("div"),le=/\x1B\[(\d{1,2}(;\d{1,2})?)?[mGK]/g;y.innerHTML=v.replace(le,""),v.includes("[0;31m")?y.classList.add("red-text"):v.includes("[0;32m")?y.classList.add("green-text"):v.includes("[0;33m")?y.classList.add("orange-text"):v.includes("[0;36m")&&y.classList.add("cyan-text"),i.appendChild(y),i.scrollTop=i.scrollHeight}})}),this.restoreStarted=!0,this.restoreInProgress=!0,this.progress=75,yield h(this.io.request("do-restore")),this.progress=80,this.restoreInProgress=!1,yield h(this.$api.put("/backup/restart",{})),this.step="restarting",this.progress=85,window.localStorage.removeItem(U.jwt.tokenKey),this.$auth.token=null;let F=document.createElement("div");F.classList.add("orange-text"),F.innerHTML="Starting Homebridge, please wait...",i.appendChild(F),i.scrollTop=i.scrollHeight,yield new Promise(c=>setTimeout(c,3e3)),this.progress=88,yield new Promise(c=>setTimeout(c,3e3)),this.progress=91,yield new Promise(c=>setTimeout(c,3e3)),this.progress=94,yield new Promise(c=>setTimeout(c,3e3)),this.progress=97,yield new Promise(c=>setTimeout(c,3e3)),this.progress=99;let se=setInterval(()=>S(this,null,function*(){try{yield h(this.$api.get("/auth/settings")),clearInterval(se),this.progress=100,this.restoreUploading=!1,this.step="restore-complete"}catch{}}),1e3)}catch(e){console.error(e),this.restoreUploading=!1,this.restoreFailed=!0,this.progress=20,this.step="restore-backup",this.$toastr.error(e.message,this.$translate.instant("toast.title_error"))}finally{this.io&&this.io.end()}})}setBackground(){return S(this,null,function*(){if(this.$settings.settingsLoaded||(yield h(this.$settings.onSettingsLoaded)),this.$settings.env.customWallpaperHash){let e=`${U.api.base}/auth/wallpaper/${this.$settings.env.customWallpaperHash}`;this.backgroundStyle=`url('${e}') center/cover`}})}matchPassword(e){let p=e.get("password").value,i=e.get("passwordConfirm").value;if(p!==i)e.get("passwordConfirm").setErrors({matchPassword:!0});else return null}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=V({type:t,selectors:[["ng-component"]],decls:10,vars:14,consts:[[1,"setup-container","gradient","d-flex","align-items-start","justify-content-center",3,"ngStyle","ngClass"],[1,"w-100","setup-card","d-flex","py-4","flex-column"],["ngSrc","/assets/homebridge-color-round.svg","alt","Homebridge Logo","height","100","width","100","priority","true",1,"homebridge-logo","mx-auto","my-3"],[1,"progress","w-100","my-4"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"progress-bar","progress-bar-striped","bg-success",3,"ngClass"],[1,"w-100","d-flex","flex-column","align-items-center","mb-2"],[1,"mb-3","text-center"],[1,"mb-4","small","grey-text","text-center",3,"innerHTML"],["type","button",1,"btn","btn-lg","btn-primary","mb-4",3,"click"],["href","javascript:void(0)",1,"grey-text",3,"click"],[1,"mb-4","small","grey-text","text-center"],[1,"w-100"],["novalidate","",3,"ngSubmit","formGroup"],[1,"input-group","mb-4"],[1,"input-group-text","custom-input"],[1,"fas","fa-fw","fa-user","primary-text","fa-lg"],["formControlName","username","type","text","id","form-username","autocomplete","username","autocapitalize","none","tabindex","1","required","",1,"form-control","custom-input",3,"readonly","ngClass","placeholder"],[1,"fas","fa-fw","fa-lock","primary-text","fa-lg"],["formControlName","password","type","password","id","form-pass","autocomplete","new-password","tabindex","2","required","",1,"form-control","custom-input",3,"readonly","ngClass","placeholder"],["formControlName","passwordConfirm","type","password","id","form-pass-confirm","autocomplete","new-password","tabindex","2","required","",1,"form-control","custom-input",3,"readonly","ngClass","placeholder"],[1,"mt-3","w-100","d-flex","justify-content-between"],["type","button",1,"btn","btn-elegant","ms-0",3,"click","disabled"],["type","submit",1,"btn","btn-primary",3,"disabled"],["type","file","id","restoreFileUpload","accept","application/gzip, .gz",1,"form-control","custom-input","mb-3",3,"change"],["type","button",1,"btn","btn-primary","me-0",3,"click","disabled"],[1,"fas","fa-fw","fa-spinner","fa-pulse"],["id","output",1,"font-monospace","small","alert","alert-info","w-100","text-start","mt-1","mb-0"],["href","/login",1,"btn","btn-lg","btn-primary","mt-4"],[1,"mb-3"],["href","/",1,"btn","btn-lg","btn-primary"]],template:function(p,i){p&1&&(o(0,"div",0)(1,"div",1),u(2,"img",2),o(3,"div",3),u(4,"div",4),r(),z(5,ue,12,12,"div",5)(6,ge,31,39,"div",5)(7,he,15,12,"div",5)(8,ve,7,2,"div",5)(9,ye,10,9,"div",5),r()()),p&2&&(m("ngStyle",B(7,pe,i.backgroundStyle))("ngClass",B(9,de,!i.backgroundStyle)),n(4),O("width",i.progress+"%"),m("ngClass",B(11,ce,i.loading||i.restoreUploading)),M("aria-valuenow",i.progress),n(),T(i.step==="welcome"?5:i.step==="create-account"?6:i.step==="restore-backup"?7:L(13,me).includes(i.step)?8:i.step==="setup-complete"?9:-1))},dependencies:[H,R,Y,A,G,j,D,X,Z,J,Q,N,te],styles:["body{overflow:scroll!important} body.dark-mode .setup-card{background-color:#2b2b2b;color:#fff}.setup-container[_ngcontent-%COMP%]{z-index:-1;padding-top:2em;padding-bottom:2em;min-height:100%;background-size:300% 300%}.anim[_ngcontent-%COMP%]{-webkit-animation:_ngcontent-%COMP%_gradient 20s ease infinite;-moz-animation:gradient 20s ease infinite;-o-animation:gradient 20s ease infinite;animation:_ngcontent-%COMP%_gradient 20s ease infinite}@keyframes _ngcontent-%COMP%_gradient{0%{background-position:0 50%}50%{background-position:100% 50%}to{background-position:0 50%}}.setup-card[_ngcontent-%COMP%]{max-width:550px;border-radius:1rem;padding-right:25px;padding-left:25px;background-color:#ffffffe6}.setup-card[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]:focus{background-color:inherit!important}@media screen and (max-width: 575px){.setup-card[_ngcontent-%COMP%]{margin-left:1em;margin-right:1em}}.homebridge-logo[_ngcontent-%COMP%]{margin-bottom:10px}.progress[_ngcontent-%COMP%]{background-color:#ddd}#output[_ngcontent-%COMP%]{height:200px;overflow-y:scroll;white-space:pre-wrap}"]})}return t})();export{He as SetupWizardComponent};
@@ -1 +1 @@
1
- import{d as n}from"./chunk-DFFTJVRY.js";import{b as s}from"./chunk-ZY5SUCRL.js";import{ga as o,h as r,la as e,w as i}from"./chunk-IOKYXV5M.js";var l=(()=>{class t{$router=e(n);$settings=e(s);canActivate(){return r(this,null,function*(){return this.$settings.settingsLoaded||(yield i(this.$settings.onSettingsLoaded)),this.$settings.env.setupWizardComplete===!1||this.$router.navigate(["/"]),!0})}static \u0275fac=function(a){return new(a||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{l as a};
1
+ import{d as n}from"./chunk-DFFTJVRY.js";import{b as s}from"./chunk-Y6ETBMB7.js";import{ga as o,h as r,la as e,w as i}from"./chunk-IOKYXV5M.js";var l=(()=>{class t{$router=e(n);$settings=e(s);canActivate(){return r(this,null,function*(){return this.$settings.settingsLoaded||(yield i(this.$settings.onSettingsLoaded)),this.$settings.env.setupWizardComplete===!1||this.$router.navigate(["/"]),!0})}static \u0275fac=function(a){return new(a||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{l as a};
@@ -1 +1 @@
1
- import{a as w}from"./chunk-QSP4KI3N.js";import"./chunk-BYDZXXU7.js";import{d as $}from"./chunk-DFFTJVRY.js";import{b as S}from"./chunk-ZY5SUCRL.js";import{k as E,n as y}from"./chunk-JCCQ75XM.js";import{a as g,b as _}from"./chunk-KZKL7DGI.js";import"./chunk-OA7Y3E5A.js";import{Ib as c,Jb as d,Jc as m,Kc as l,Sb as r,Tb as i,Ub as f,ab as n,dc as v,la as o,mb as h,qc as a,rc as s}from"./chunk-IOKYXV5M.js";function T(t,u){if(t&1&&(r(0,"div",7),a(1),i()),t&2){let e=v();n(),s(e.error)}}function C(t,u){t&1&&(r(0,"p",9),a(1),m(2,"translate"),i(),r(3,"div",10)(4,"div",11),f(5,"i",12),i()()),t&2&&(n(),s(l(2,1,"restart.please_wait_while_server_restarts")))}function k(t,u){t&1&&(r(0,"div",8),a(1),m(2,"translate"),i()),t&2&&(n(),s(l(2,1,"platform.linux.long_time")))}var z=(()=>{class t{$api=o(y);$router=o($);$settings=o(S);$toastr=o(E);$translate=o(g);$ws=o(w);checkTimeout;checkDelay;io;resp={};timeout=!1;error=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/linux/restart-host",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{console.error(e),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="up"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.linux.server_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},3e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("platform.linux.server_taking_long_time"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},12e4)}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=h({type:t,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-fw","fa-spinner","fa-spin"]],template:function(p,x){p&1&&(r(0,"div",0)(1,"h3",1),a(2),m(3,"translate"),i()(),r(4,"div",2)(5,"div",3),f(6,"i",4),i(),r(7,"div",5)(8,"h4",6),a(9),m(10,"translate"),i(),c(11,T,2,1,"div",7)(12,C,6,3),c(13,k,3,3,"div",8),i()()),p&2&&(n(2),s(l(3,4,"menu.restart.title")),n(7),s(l(10,6,"platform.linux.restarting_server")),n(2),d(x.error?11:12),n(2),d(x.timeout?13:-1))},dependencies:[_],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{z as RestartLinuxComponent};
1
+ import{a as w}from"./chunk-TLDD55XE.js";import"./chunk-KTUC5YRH.js";import{d as $}from"./chunk-DFFTJVRY.js";import{b as S}from"./chunk-Y6ETBMB7.js";import{k as E,n as y}from"./chunk-ETENXVXQ.js";import{a as g,b as _}from"./chunk-KZKL7DGI.js";import"./chunk-OA7Y3E5A.js";import{Ib as c,Jb as d,Jc as m,Kc as l,Sb as r,Tb as i,Ub as f,ab as n,dc as v,la as o,mb as h,qc as a,rc as s}from"./chunk-IOKYXV5M.js";function T(t,u){if(t&1&&(r(0,"div",7),a(1),i()),t&2){let e=v();n(),s(e.error)}}function C(t,u){t&1&&(r(0,"p",9),a(1),m(2,"translate"),i(),r(3,"div",10)(4,"div",11),f(5,"i",12),i()()),t&2&&(n(),s(l(2,1,"restart.please_wait_while_server_restarts")))}function k(t,u){t&1&&(r(0,"div",8),a(1),m(2,"translate"),i()),t&2&&(n(),s(l(2,1,"platform.linux.long_time")))}var z=(()=>{class t{$api=o(y);$router=o($);$settings=o(S);$toastr=o(E);$translate=o(g);$ws=o(w);checkTimeout;checkDelay;io;resp={};timeout=!1;error=!1;ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/linux/restart-host",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{console.error(e),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="up"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.linux.server_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},3e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("platform.linux.server_taking_long_time"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},12e4)}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=h({type:t,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-fw","fa-spinner","fa-spin"]],template:function(p,x){p&1&&(r(0,"div",0)(1,"h3",1),a(2),m(3,"translate"),i()(),r(4,"div",2)(5,"div",3),f(6,"i",4),i(),r(7,"div",5)(8,"h4",6),a(9),m(10,"translate"),i(),c(11,T,2,1,"div",7)(12,C,6,3),c(13,k,3,3,"div",8),i()()),p&2&&(n(2),s(l(3,4,"menu.restart.title")),n(7),s(l(10,6,"platform.linux.restarting_server")),n(2),d(x.error?11:12),n(2),d(x.timeout?13:-1))},dependencies:[_],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{z as RestartLinuxComponent};
@@ -1 +1 @@
1
- import{g as i}from"./chunk-DFFTJVRY.js";import"./chunk-OA7Y3E5A.js";import{ha as t,nb as e}from"./chunk-IOKYXV5M.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-7BA3FPY6.js").then(o=>o.DockerModule)},{path:"linux",loadChildren:()=>import("./chunk-TPRXTBLB.js").then(o=>o.LinuxModule)},{path:"terminal",loadChildren:()=>import("./chunk-6X3MH72N.js").then(o=>o.TerminalModule)}],l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[i.forChild(d),i]})}return o})();var p=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[l]})}return o})();export{p as PlatformToolsModule};
1
+ import{g as i}from"./chunk-DFFTJVRY.js";import"./chunk-OA7Y3E5A.js";import{ha as t,nb as e}from"./chunk-IOKYXV5M.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-3ELSLPXD.js").then(o=>o.DockerModule)},{path:"linux",loadChildren:()=>import("./chunk-4LKN5WQ2.js").then(o=>o.LinuxModule)},{path:"terminal",loadChildren:()=>import("./chunk-PDR2DPWY.js").then(o=>o.TerminalModule)}],l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[i.forChild(d),i]})}return o})();var p=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[l]})}return o})();export{p as PlatformToolsModule};