homebridge-config-ui-x 5.0.0-beta.98 → 5.0.0-beta.99
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.
- package/dist/modules/plugins/plugins.service.js +1 -1
- package/dist/modules/plugins/plugins.service.js.map +1 -1
- package/package.json +1 -1
- package/public/chunk-2CDSAOHD.js +1 -0
- package/public/{chunk-XS6MELBC.js → chunk-2OUR67N4.js} +1 -1
- package/public/{chunk-G5RWHP3O.js → chunk-3CYHPVRJ.js} +1 -1
- package/public/{chunk-O5SDY7HB.js → chunk-3DF7CHZW.js} +1 -1
- package/public/chunk-5F327T7H.js +1 -0
- package/public/{chunk-A6DQHT27.js → chunk-6CNQKPV4.js} +1 -1
- package/public/{chunk-H6KZQBHH.js → chunk-AF2VUIEE.js} +1 -1
- package/public/{chunk-OYGKO2NW.js → chunk-B3LZRDAG.js} +1 -1
- package/public/{chunk-R4M7DOGG.js → chunk-BGDBPFZN.js} +1 -1
- package/public/{chunk-KEADQZKG.js → chunk-BSGFKU4J.js} +1 -1
- package/public/{chunk-5UMALEYG.js → chunk-C6A3CFIK.js} +1 -1
- package/public/{chunk-MRGYH67M.js → chunk-CLQDCNVA.js} +1 -1
- package/public/{chunk-AEILHSZB.js → chunk-CMO7ESK6.js} +1 -1
- package/public/{chunk-LFLMMBSQ.js → chunk-DGIKPYZP.js} +1 -1
- package/public/{chunk-ZJQSABF2.js → chunk-DNW5N3YO.js} +1 -1
- package/public/{chunk-XPNC7FSV.js → chunk-EGELGD5H.js} +1 -1
- package/public/{chunk-EMBQZR2X.js → chunk-EJBJOBK4.js} +1 -1
- package/public/{chunk-PXDI7H2S.js → chunk-F4KGCHEZ.js} +1 -1
- package/public/{chunk-R33JZ54E.js → chunk-FATD52DV.js} +1 -1
- package/public/{chunk-YNZBVFGD.js → chunk-FXS45ML3.js} +1 -1
- package/public/{chunk-NZRZWGZB.js → chunk-G6KG4MKA.js} +1 -1
- package/public/{chunk-QAH2DTID.js → chunk-GTAHH5HN.js} +1 -1
- package/public/{chunk-GICBHDKJ.js → chunk-HLTIIGIP.js} +1 -1
- package/public/{chunk-PQSAMCEQ.js → chunk-HLTWQSH5.js} +1 -1
- package/public/chunk-IORHLUIJ.js +1 -0
- package/public/{chunk-L5JATRB2.js → chunk-JADR4A63.js} +1 -1
- package/public/{chunk-2ACWBXKD.js → chunk-KAUSPTCQ.js} +1 -1
- package/public/{chunk-HVAWB5LJ.js → chunk-KCQQTZKO.js} +1 -1
- package/public/{chunk-J533TMJM.js → chunk-L3HD45SY.js} +1 -1
- package/public/{chunk-OOXGRVPC.js → chunk-LDLWF7GI.js} +1 -1
- package/public/chunk-LHL5TI6S.js +1 -0
- package/public/chunk-LX47K6J2.js +1 -0
- package/public/{chunk-Z2FWKPUU.js → chunk-M2H64FFG.js} +1 -1
- package/public/{chunk-YKZEL5PF.js → chunk-OAQSXFHE.js} +1 -1
- package/public/chunk-ODU3K7H7.js +1 -0
- package/public/chunk-P3KVHPZJ.js +1 -0
- package/public/{chunk-DPQLWSOP.js → chunk-P64V4GHS.js} +1 -1
- package/public/{chunk-TJ2GNHP4.js → chunk-PI76B7WZ.js} +1 -1
- package/public/chunk-PNSPASX3.js +1 -0
- package/public/chunk-PUIKXI6O.js +1 -0
- package/public/{chunk-P7X2NAW3.js → chunk-QMAGO5VD.js} +1 -1
- package/public/{chunk-PLAF4BZD.js → chunk-RFFIRBUY.js} +1 -1
- package/public/{chunk-OLHWAUXG.js → chunk-RLGSRK2P.js} +1 -1
- package/public/{chunk-K543HIWQ.js → chunk-RN4NDBWE.js} +1 -1
- package/public/{chunk-WVVL4OBP.js → chunk-U2HZ2JFO.js} +1 -1
- package/public/{chunk-WPUGJVJI.js → chunk-VA5XNGEK.js} +1 -1
- package/public/{chunk-ULYM2OMP.js → chunk-X6PEPNG4.js} +1 -1
- package/public/{chunk-2APWDSJR.js → chunk-XHI7IAUN.js} +1 -1
- package/public/{chunk-RQHGYVH7.js → chunk-XP6B4WXR.js} +1 -1
- package/public/{chunk-4ONUW2YX.js → chunk-XUH357B7.js} +1 -1
- package/public/{chunk-MYR6B6HA.js → chunk-Y4QFUO3K.js} +1 -1
- package/public/{chunk-Q74BIJTW.js → chunk-YJXHSHNO.js} +1 -1
- package/public/chunk-YZCEDH6X.js +1 -0
- package/public/{chunk-LI25YDIE.js → chunk-YZWIZGAQ.js} +1 -1
- package/public/{chunk-IZ6FAXQI.js → chunk-ZF22CBM2.js} +1 -1
- package/public/{chunk-UNTA76B2.js → chunk-ZIBK7SYP.js} +1 -1
- package/public/chunk-ZLCELPBH.js +1 -0
- package/public/{chunk-6FMNBEZI.js → chunk-ZMYR3JWC.js} +1 -1
- package/public/index.html +1 -1
- package/public/{main-OJD6Y5G5.js → main-AS7ULDAC.js} +1 -1
- package/public/chunk-2KPQDW5Y.js +0 -1
- package/public/chunk-33CYNVTV.js +0 -1
- package/public/chunk-3XCKNGSY.js +0 -1
- package/public/chunk-A2GCWL2B.js +0 -1
- package/public/chunk-AOMS2ZZA.js +0 -1
- package/public/chunk-IJYOZ5IV.js +0 -1
- package/public/chunk-IOPQ6XLG.js +0 -1
- package/public/chunk-N6ZKSYU7.js +0 -1
- package/public/chunk-NITLIK4Z.js +0 -1
- package/public/chunk-SDPMBXWG.js +0 -1
- package/public/chunk-YNNM676U.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as a}from"./chunk-
|
|
1
|
+
import{g as a}from"./chunk-RN4NDBWE.js";import"./chunk-G6KG4MKA.js";import"./chunk-CG7LPZUJ.js";import"./chunk-GMY5QOXR.js";import"./chunk-ALG7CIS3.js";import"./chunk-VLX322GM.js";import"./chunk-2G7GNBIF.js";import"./chunk-YJXHSHNO.js";import"./chunk-B3LZRDAG.js";import"./chunk-XHI7IAUN.js";import"./chunk-XUH357B7.js";import"./chunk-VUYAK52W.js";import"./chunk-QMB5XE4Y.js";import"./chunk-R3VPSO5X.js";export{a as SettingsComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-ZF22CBM2.js";import"./chunk-BMCQHGMB.js";import"./chunk-P64V4GHS.js";import"./chunk-UTAVUGTT.js";import"./chunk-IOWBVW62.js";import"./chunk-WAA5KWIN.js";import"./chunk-UVOJ3BF7.js";import"./chunk-DGIKPYZP.js";import"./chunk-VHTQTL2S.js";import"./chunk-CG7LPZUJ.js";import"./chunk-GMY5QOXR.js";import"./chunk-RNHMRKPJ.js";import"./chunk-BIRWL4X3.js";import"./chunk-DDFZVHUO.js";import"./chunk-ALG7CIS3.js";import"./chunk-VLX322GM.js";import"./chunk-2G7GNBIF.js";import"./chunk-YJXHSHNO.js";import"./chunk-B3LZRDAG.js";import"./chunk-XHI7IAUN.js";import"./chunk-XUH357B7.js";import"./chunk-VUYAK52W.js";import"./chunk-QMB5XE4Y.js";import"./chunk-R3VPSO5X.js";export{a as PluginsComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-F4KGCHEZ.js";import"./chunk-2G7GNBIF.js";import"./chunk-YJXHSHNO.js";import"./chunk-B3LZRDAG.js";import"./chunk-XHI7IAUN.js";import"./chunk-XUH357B7.js";import"./chunk-VUYAK52W.js";import"./chunk-QMB5XE4Y.js";import"./chunk-R3VPSO5X.js";export{a as RestartComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-EJBJOBK4.js";import"./chunk-ALG7CIS3.js";import"./chunk-VLX322GM.js";import"./chunk-2G7GNBIF.js";import"./chunk-XHI7IAUN.js";import"./chunk-XUH357B7.js";import"./chunk-VUYAK52W.js";import"./chunk-QMB5XE4Y.js";import"./chunk-R3VPSO5X.js";export{a as PowerOptionsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-ZMYR3JWC.js";import"./chunk-DGIKPYZP.js";import"./chunk-VHTQTL2S.js";import"./chunk-CG7LPZUJ.js";import"./chunk-GMY5QOXR.js";import"./chunk-DDFZVHUO.js";import{q as n}from"./chunk-ALG7CIS3.js";import"./chunk-VLX322GM.js";import{g as i}from"./chunk-2G7GNBIF.js";import"./chunk-YJXHSHNO.js";import"./chunk-B3LZRDAG.js";import"./chunk-XHI7IAUN.js";import"./chunk-XUH357B7.js";import"./chunk-VUYAK52W.js";import{c as s}from"./chunk-QMB5XE4Y.js";import{ha as t,kd as m,mb as r}from"./chunk-R3VPSO5X.js";var f=[{path:"",loadComponent:()=>import("./chunk-ZLCELPBH.js").then(o=>o.LogsComponent)}],p=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i.forChild(f),i]})}return o})();var h=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[m,p,n,s.forChild()]})}return o})();export{h as LogsModule};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-FATD52DV.js";import"./chunk-2G7GNBIF.js";import"./chunk-YJXHSHNO.js";import"./chunk-B3LZRDAG.js";import"./chunk-XHI7IAUN.js";import"./chunk-XUH357B7.js";import"./chunk-VUYAK52W.js";import"./chunk-QMB5XE4Y.js";import"./chunk-R3VPSO5X.js";export{a as RestartLinuxComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-CLQDCNVA.js";import"./chunk-VLX322GM.js";import"./chunk-YJXHSHNO.js";import"./chunk-B3LZRDAG.js";import"./chunk-XHI7IAUN.js";import"./chunk-XUH357B7.js";import"./chunk-VUYAK52W.js";import"./chunk-QMB5XE4Y.js";import"./chunk-R3VPSO5X.js";export{a as SetupWizardComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as cu,b as Q6}from"./chunk-UTAVUGTT.js";import{a as $1}from"./chunk-IOWBVW62.js";import{a as Jr,b as Xr}from"./chunk-WAA5KWIN.js";import{a as T1}from"./chunk-UVOJ3BF7.js";import{a as j1}from"./chunk-LFLMMBSQ.js";import{a as ff}from"./chunk-CG7LPZUJ.js";import{a as O1,b as M1}from"./chunk-GMY5QOXR.js";import{a as P1}from"./chunk-RNHMRKPJ.js";import{a as Gr}from"./chunk-BIRWL4X3.js";import{a as k1}from"./chunk-DDFZVHUO.js";import{a as Lr,b as zr,c as Ur,d as Hr,e as Wr,f as Kr,g as du,m as Ae,n as it,o as en}from"./chunk-ALG7CIS3.js";import{A as nf,a as y1,b as Yu,c as Zi,e as vt,f as v1,h as B1,i as x1,j as w1,k as S1,l as Zu,m as I1,o as Qu,r as Qi,s as wi,t as Si,y as A1,z as tu}from"./chunk-VLX322GM.js";import{d as Ut}from"./chunk-2G7GNBIF.js";import{a as ti}from"./chunk-Q74BIJTW.js";import{b as qe}from"./chunk-2APWDSJR.js";import{k as _e,m as ei,n as Ee}from"./chunk-4ONUW2YX.js";import{e as _1}from"./chunk-VUYAK52W.js";import{a as be,b as $e}from"./chunk-QMB5XE4Y.js";import{$a as l,Ac as v,Bc as x,Ca as Uu,Cc as He,D as r1,Da as l1,Fa as Hu,Gb as G,Hb as S,Ib as I,Jc as gt,Kb as nt,Kc as U,Lb as ft,Lc as Xu,M as Gi,Mb as rt,Nb as E,Nc as E1,Ob as c,Pb as p,Qb as B,Rb as m1,Sb as F1,Ub as W,Xa as Ce,Xb as M,Yb as g,Z as rs,_a as d1,a as X,aa as uf,ac as os,b as xe,bc as as,bd as zt,cc as ss,cd as xi,dc as Wu,dd as Et,e as F,eb as qr,ec as Ku,fa as o1,fb as yu,g as Ne,ga as Ot,gc as eu,h as K,ha as Ji,hb as vi,hc as Gu,ic as Z,ja as a1,jc as _,k as u1,ka as s1,kc as z,kd as Rr,la as w,lb as Y,lc as q,mb as Xi,mc as Bi,n as Pt,nb as vu,nc as C1,o as fs,ob as c1,q as i1,qc as Le,ra as j,rb as de,rc as ze,sa as N,sc as Ue,sd as b1,ta as D1,tb as p1,tc as h1,ub as Vr,uc as g1,v as n1,vc as we,w as ae,wc as Bu,x as f1,xc as Ju,yc as xu,za as Nr,zc as Yi}from"./chunk-R3VPSO5X.js";var af=F(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.regexpCode=ge.getEsmExportName=ge.getProperty=ge.safeStringify=ge.stringify=ge.strConcat=ge.addCodeArg=ge.str=ge._=ge.nil=ge._Code=ge.Name=ge.IDENTIFIER=ge._CodeOrName=void 0;var rf=class{};ge._CodeOrName=rf;ge.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ii=class extends rf{constructor(u){if(super(),!ge.IDENTIFIER.test(u))throw new Error("CodeGen: name must be a valid identifier");this.str=u}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ge.Name=Ii;var Ht=class extends rf{constructor(u){super(),this._items=typeof u=="string"?[u]:u}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let u=this._items[0];return u===""||u==='""'}get str(){var u;return(u=this._str)!==null&&u!==void 0?u:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var u;return(u=this._names)!==null&&u!==void 0?u:this._names=this._items.reduce((t,i)=>(i instanceof Ii&&(t[i.str]=(t[i.str]||0)+1),t),{})}};ge._Code=Ht;ge.nil=new Ht("");function N1(e,...u){let t=[e[0]],i=0;for(;i<u.length;)ls(t,u[i]),t.push(e[++i]);return new Ht(t)}ge._=N1;var Ds=new Ht("+");function q1(e,...u){let t=[of(e[0])],i=0;for(;i<u.length;)t.push(Ds),ls(t,u[i]),t.push(Ds,of(e[++i]));return tE(t),new Ht(t)}ge.str=q1;function ls(e,u){u instanceof Ht?e.push(...u._items):u instanceof Ii?e.push(u):e.push(nE(u))}ge.addCodeArg=ls;function tE(e){let u=1;for(;u<e.length-1;){if(e[u]===Ds){let t=uE(e[u-1],e[u+1]);if(t!==void 0){e.splice(u-1,3,t);continue}e[u++]="+"}u++}}function uE(e,u){if(u==='""')return e;if(e==='""')return u;if(typeof e=="string")return u instanceof Ii||e[e.length-1]!=='"'?void 0:typeof u!="string"?`${e.slice(0,-1)}${u}"`:u[0]==='"'?e.slice(0,-1)+u.slice(1):void 0;if(typeof u=="string"&&u[0]==='"'&&!(e instanceof Ii))return`"${e}${u.slice(1)}`}function iE(e,u){return u.emptyStr()?e:e.emptyStr()?u:q1`${e}${u}`}ge.strConcat=iE;function nE(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:of(Array.isArray(e)?e.join(","):e)}function fE(e){return new Ht(of(e))}ge.stringify=fE;function of(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ge.safeStringify=of;function rE(e){return typeof e=="string"&&ge.IDENTIFIER.test(e)?new Ht(`.${e}`):N1`[${e}]`}ge.getProperty=rE;function oE(e){if(typeof e=="string"&&ge.IDENTIFIER.test(e))return new Ht(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ge.getEsmExportName=oE;function aE(e){return new Ht(e.toString())}ge.regexpCode=aE});var ps=F(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.ValueScope=xt.ValueScopeName=xt.Scope=xt.varKinds=xt.UsedValueState=void 0;var Bt=af(),ds=class extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}},Yr=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(Yr||(xt.UsedValueState=Yr={}));xt.varKinds={const:new Bt.Name("const"),let:new Bt.Name("let"),var:new Bt.Name("var")};var Zr=class{constructor({prefixes:u,parent:t}={}){this._names={},this._prefixes=u,this._parent=t}toName(u){return u instanceof Bt.Name?u:this.name(u)}name(u){return new Bt.Name(this._newName(u))}_newName(u){let t=this._names[u]||this._nameGroup(u);return`${u}${t.index++}`}_nameGroup(u){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}};xt.Scope=Zr;var Qr=class extends Bt.Name{constructor(u,t){super(t),this.prefix=u}setValue(u,{property:t,itemIndex:i}){this.value=u,this.scopePath=(0,Bt._)`.${new Bt.Name(t)}[${i}]`}};xt.ValueScopeName=Qr;var sE=(0,Bt._)`\n`,cs=class extends Zr{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts=xe(X({},u),{_n:u.lines?sE:Bt.nil})}get(){return this._scope}name(u){return new Qr(u,this._newName(u))}value(u,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(u),{prefix:f}=n,r=(i=t.key)!==null&&i!==void 0?i:t.ref,o=this._values[f];if(o){let D=o.get(r);if(D)return D}else o=this._values[f]=new Map;o.set(r,n);let a=this._scope[f]||(this._scope[f]=[]),s=a.length;return a[s]=t.ref,n.setValue(t,{property:f,itemIndex:s}),n}getValue(u,t){let i=this._values[u];if(i)return i.get(t)}scopeRefs(u,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,Bt._)`${u}${i.scopePath}`})}scopeCode(u=this._values,t,i){return this._reduceValues(u,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,i)}_reduceValues(u,t,i={},n){let f=Bt.nil;for(let r in u){let o=u[r];if(!o)continue;let a=i[r]=i[r]||new Map;o.forEach(s=>{if(a.has(s))return;a.set(s,Yr.Started);let D=t(s);if(D){let d=this.opts.es5?xt.varKinds.var:xt.varKinds.const;f=(0,Bt._)`${f}${d} ${s} = ${D};${this.opts._n}`}else if(D=n?.(s))f=(0,Bt._)`${f}${D}${this.opts._n}`;else throw new ds(s);a.set(s,Yr.Completed)})}return f}};xt.ValueScope=cs});var ee=F(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.or=se.and=se.not=se.CodeGen=se.operators=se.varKinds=se.ValueScopeName=se.ValueScope=se.Scope=se.Name=se.regexpCode=se.stringify=se.getProperty=se.nil=se.strConcat=se.str=se._=void 0;var me=af(),uu=ps(),ui=af();Object.defineProperty(se,"_",{enumerable:!0,get:function(){return ui._}});Object.defineProperty(se,"str",{enumerable:!0,get:function(){return ui.str}});Object.defineProperty(se,"strConcat",{enumerable:!0,get:function(){return ui.strConcat}});Object.defineProperty(se,"nil",{enumerable:!0,get:function(){return ui.nil}});Object.defineProperty(se,"getProperty",{enumerable:!0,get:function(){return ui.getProperty}});Object.defineProperty(se,"stringify",{enumerable:!0,get:function(){return ui.stringify}});Object.defineProperty(se,"regexpCode",{enumerable:!0,get:function(){return ui.regexpCode}});Object.defineProperty(se,"Name",{enumerable:!0,get:function(){return ui.Name}});var no=ps();Object.defineProperty(se,"Scope",{enumerable:!0,get:function(){return no.Scope}});Object.defineProperty(se,"ValueScope",{enumerable:!0,get:function(){return no.ValueScope}});Object.defineProperty(se,"ValueScopeName",{enumerable:!0,get:function(){return no.ValueScopeName}});Object.defineProperty(se,"varKinds",{enumerable:!0,get:function(){return no.varKinds}});se.operators={GT:new me._Code(">"),GTE:new me._Code(">="),LT:new me._Code("<"),LTE:new me._Code("<="),EQ:new me._Code("==="),NEQ:new me._Code("!=="),NOT:new me._Code("!"),OR:new me._Code("||"),AND:new me._Code("&&"),ADD:new me._Code("+")};var wu=class{optimizeNodes(){return this}optimizeNames(u,t){return this}},ms=class extends wu{constructor(u,t,i){super(),this.varKind=u,this.name=t,this.rhs=i}render({es5:u,_n:t}){let i=u?uu.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+t}optimizeNames(u,t){if(u[this.name.str])return this.rhs&&(this.rhs=un(this.rhs,u,t)),this}get names(){return this.rhs instanceof me._CodeOrName?this.rhs.names:{}}},to=class extends wu{constructor(u,t,i){super(),this.lhs=u,this.rhs=t,this.sideEffects=i}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,t){if(!(this.lhs instanceof me.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=un(this.rhs,u,t),this}get names(){let u=this.lhs instanceof me.Name?{}:X({},this.lhs.names);return io(u,this.rhs)}},Fs=class extends to{constructor(u,t,i,n){super(u,i,n),this.op=t}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}},Cs=class extends wu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}},hs=class extends wu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}},gs=class extends wu{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}},Es=class extends wu{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,t){return this.code=un(this.code,u,t),this}get names(){return this.code instanceof me._CodeOrName?this.code.names:{}}},sf=class extends wu{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((t,i)=>t+i.render(u),"")}optimizeNodes(){let{nodes:u}=this,t=u.length;for(;t--;){let i=u[t].optimizeNodes();Array.isArray(i)?u.splice(t,1,...i):i?u[t]=i:u.splice(t,1)}return u.length>0?this:void 0}optimizeNames(u,t){let{nodes:i}=this,n=i.length;for(;n--;){let f=i[n];f.optimizeNames(u,t)||(DE(u,f.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((u,t)=>Ai(u,t.names),{})}},Su=class extends sf{render(u){return"{"+u._n+super.render(u)+"}"+u._n}},bs=class extends sf{},_s=(()=>{class e extends Su{}return e.kind="else",e})(),eo=(()=>{class e extends Su{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let n=i.optimizeNodes();i=this.else=Array.isArray(n)?new _s(n):n}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(U1(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=un(this.condition,t,i),this}get names(){let t=super.names;return io(t,this.condition),this.else&&Ai(t,this.else.names),t}}return e.kind="if",e})(),fo=(()=>{class e extends Su{}return e.kind="for",e})(),ys=class extends fo{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iteration=un(this.iteration,u,t),this}get names(){return Ai(super.names,this.iteration.names)}},vs=class extends fo{constructor(u,t,i,n){super(),this.varKind=u,this.name=t,this.from=i,this.to=n}render(u){let t=u.es5?uu.varKinds.var:this.varKind,{name:i,from:n,to:f}=this;return`for(${t} ${i}=${n}; ${i}<${f}; ${i}++)`+super.render(u)}get names(){let u=io(super.names,this.from);return io(u,this.to)}},uo=class extends fo{constructor(u,t,i,n){super(),this.loop=u,this.varKind=t,this.name=i,this.iterable=n}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iterable=un(this.iterable,u,t),this}get names(){return Ai(super.names,this.iterable.names)}},V1=(()=>{class e extends Su{constructor(t,i,n){super(),this.name=t,this.args=i,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),R1=(()=>{class e extends sf{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Bs=class extends Su{render(u){let t="try"+super.render(u);return this.catch&&(t+=this.catch.render(u)),this.finally&&(t+=this.finally.render(u)),t}optimizeNodes(){var u,t;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(u,t){var i,n;return super.optimizeNames(u,t),(i=this.catch)===null||i===void 0||i.optimizeNames(u,t),(n=this.finally)===null||n===void 0||n.optimizeNames(u,t),this}get names(){let u=super.names;return this.catch&&Ai(u,this.catch.names),this.finally&&Ai(u,this.finally.names),u}},L1=(()=>{class e extends Su{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),z1=(()=>{class e extends Su{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),xs=class{constructor(u,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=xe(X({},t),{_n:t.lines?`
|
|
1
|
+
import{a as cu,b as Q6}from"./chunk-UTAVUGTT.js";import{a as $1}from"./chunk-IOWBVW62.js";import{a as Jr,b as Xr}from"./chunk-WAA5KWIN.js";import{a as T1}from"./chunk-UVOJ3BF7.js";import{a as j1}from"./chunk-DGIKPYZP.js";import{a as ff}from"./chunk-CG7LPZUJ.js";import{a as O1,b as M1}from"./chunk-GMY5QOXR.js";import{a as P1}from"./chunk-RNHMRKPJ.js";import{a as Gr}from"./chunk-BIRWL4X3.js";import{a as k1}from"./chunk-DDFZVHUO.js";import{a as Lr,b as zr,c as Ur,d as Hr,e as Wr,f as Kr,g as du,m as Ae,n as it,o as en}from"./chunk-ALG7CIS3.js";import{A as nf,a as y1,b as Yu,c as Zi,e as vt,f as v1,h as B1,i as x1,j as w1,k as S1,l as Zu,m as I1,o as Qu,r as Qi,s as wi,t as Si,y as A1,z as tu}from"./chunk-VLX322GM.js";import{d as Ut}from"./chunk-2G7GNBIF.js";import{a as ti}from"./chunk-YJXHSHNO.js";import{b as qe}from"./chunk-XHI7IAUN.js";import{k as _e,m as ei,n as Ee}from"./chunk-XUH357B7.js";import{e as _1}from"./chunk-VUYAK52W.js";import{a as be,b as $e}from"./chunk-QMB5XE4Y.js";import{$a as l,Ac as v,Bc as x,Ca as Uu,Cc as He,D as r1,Da as l1,Fa as Hu,Gb as G,Hb as S,Ib as I,Jc as gt,Kb as nt,Kc as U,Lb as ft,Lc as Xu,M as Gi,Mb as rt,Nb as E,Nc as E1,Ob as c,Pb as p,Qb as B,Rb as m1,Sb as F1,Ub as W,Xa as Ce,Xb as M,Yb as g,Z as rs,_a as d1,a as X,aa as uf,ac as os,b as xe,bc as as,bd as zt,cc as ss,cd as xi,dc as Wu,dd as Et,e as F,eb as qr,ec as Ku,fa as o1,fb as yu,g as Ne,ga as Ot,gc as eu,h as K,ha as Ji,hb as vi,hc as Gu,ic as Z,ja as a1,jc as _,k as u1,ka as s1,kc as z,kd as Rr,la as w,lb as Y,lc as q,mb as Xi,mc as Bi,n as Pt,nb as vu,nc as C1,o as fs,ob as c1,q as i1,qc as Le,ra as j,rb as de,rc as ze,sa as N,sc as Ue,sd as b1,ta as D1,tb as p1,tc as h1,ub as Vr,uc as g1,v as n1,vc as we,w as ae,wc as Bu,x as f1,xc as Ju,yc as xu,za as Nr,zc as Yi}from"./chunk-R3VPSO5X.js";var af=F(ge=>{"use strict";Object.defineProperty(ge,"__esModule",{value:!0});ge.regexpCode=ge.getEsmExportName=ge.getProperty=ge.safeStringify=ge.stringify=ge.strConcat=ge.addCodeArg=ge.str=ge._=ge.nil=ge._Code=ge.Name=ge.IDENTIFIER=ge._CodeOrName=void 0;var rf=class{};ge._CodeOrName=rf;ge.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Ii=class extends rf{constructor(u){if(super(),!ge.IDENTIFIER.test(u))throw new Error("CodeGen: name must be a valid identifier");this.str=u}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ge.Name=Ii;var Ht=class extends rf{constructor(u){super(),this._items=typeof u=="string"?[u]:u}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let u=this._items[0];return u===""||u==='""'}get str(){var u;return(u=this._str)!==null&&u!==void 0?u:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var u;return(u=this._names)!==null&&u!==void 0?u:this._names=this._items.reduce((t,i)=>(i instanceof Ii&&(t[i.str]=(t[i.str]||0)+1),t),{})}};ge._Code=Ht;ge.nil=new Ht("");function N1(e,...u){let t=[e[0]],i=0;for(;i<u.length;)ls(t,u[i]),t.push(e[++i]);return new Ht(t)}ge._=N1;var Ds=new Ht("+");function q1(e,...u){let t=[of(e[0])],i=0;for(;i<u.length;)t.push(Ds),ls(t,u[i]),t.push(Ds,of(e[++i]));return tE(t),new Ht(t)}ge.str=q1;function ls(e,u){u instanceof Ht?e.push(...u._items):u instanceof Ii?e.push(u):e.push(nE(u))}ge.addCodeArg=ls;function tE(e){let u=1;for(;u<e.length-1;){if(e[u]===Ds){let t=uE(e[u-1],e[u+1]);if(t!==void 0){e.splice(u-1,3,t);continue}e[u++]="+"}u++}}function uE(e,u){if(u==='""')return e;if(e==='""')return u;if(typeof e=="string")return u instanceof Ii||e[e.length-1]!=='"'?void 0:typeof u!="string"?`${e.slice(0,-1)}${u}"`:u[0]==='"'?e.slice(0,-1)+u.slice(1):void 0;if(typeof u=="string"&&u[0]==='"'&&!(e instanceof Ii))return`"${e}${u.slice(1)}`}function iE(e,u){return u.emptyStr()?e:e.emptyStr()?u:q1`${e}${u}`}ge.strConcat=iE;function nE(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:of(Array.isArray(e)?e.join(","):e)}function fE(e){return new Ht(of(e))}ge.stringify=fE;function of(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ge.safeStringify=of;function rE(e){return typeof e=="string"&&ge.IDENTIFIER.test(e)?new Ht(`.${e}`):N1`[${e}]`}ge.getProperty=rE;function oE(e){if(typeof e=="string"&&ge.IDENTIFIER.test(e))return new Ht(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}ge.getEsmExportName=oE;function aE(e){return new Ht(e.toString())}ge.regexpCode=aE});var ps=F(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.ValueScope=xt.ValueScopeName=xt.Scope=xt.varKinds=xt.UsedValueState=void 0;var Bt=af(),ds=class extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}},Yr=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(Yr||(xt.UsedValueState=Yr={}));xt.varKinds={const:new Bt.Name("const"),let:new Bt.Name("let"),var:new Bt.Name("var")};var Zr=class{constructor({prefixes:u,parent:t}={}){this._names={},this._prefixes=u,this._parent=t}toName(u){return u instanceof Bt.Name?u:this.name(u)}name(u){return new Bt.Name(this._newName(u))}_newName(u){let t=this._names[u]||this._nameGroup(u);return`${u}${t.index++}`}_nameGroup(u){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}};xt.Scope=Zr;var Qr=class extends Bt.Name{constructor(u,t){super(t),this.prefix=u}setValue(u,{property:t,itemIndex:i}){this.value=u,this.scopePath=(0,Bt._)`.${new Bt.Name(t)}[${i}]`}};xt.ValueScopeName=Qr;var sE=(0,Bt._)`\n`,cs=class extends Zr{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts=xe(X({},u),{_n:u.lines?sE:Bt.nil})}get(){return this._scope}name(u){return new Qr(u,this._newName(u))}value(u,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(u),{prefix:f}=n,r=(i=t.key)!==null&&i!==void 0?i:t.ref,o=this._values[f];if(o){let D=o.get(r);if(D)return D}else o=this._values[f]=new Map;o.set(r,n);let a=this._scope[f]||(this._scope[f]=[]),s=a.length;return a[s]=t.ref,n.setValue(t,{property:f,itemIndex:s}),n}getValue(u,t){let i=this._values[u];if(i)return i.get(t)}scopeRefs(u,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,Bt._)`${u}${i.scopePath}`})}scopeCode(u=this._values,t,i){return this._reduceValues(u,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,i)}_reduceValues(u,t,i={},n){let f=Bt.nil;for(let r in u){let o=u[r];if(!o)continue;let a=i[r]=i[r]||new Map;o.forEach(s=>{if(a.has(s))return;a.set(s,Yr.Started);let D=t(s);if(D){let d=this.opts.es5?xt.varKinds.var:xt.varKinds.const;f=(0,Bt._)`${f}${d} ${s} = ${D};${this.opts._n}`}else if(D=n?.(s))f=(0,Bt._)`${f}${D}${this.opts._n}`;else throw new ds(s);a.set(s,Yr.Completed)})}return f}};xt.ValueScope=cs});var ee=F(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.or=se.and=se.not=se.CodeGen=se.operators=se.varKinds=se.ValueScopeName=se.ValueScope=se.Scope=se.Name=se.regexpCode=se.stringify=se.getProperty=se.nil=se.strConcat=se.str=se._=void 0;var me=af(),uu=ps(),ui=af();Object.defineProperty(se,"_",{enumerable:!0,get:function(){return ui._}});Object.defineProperty(se,"str",{enumerable:!0,get:function(){return ui.str}});Object.defineProperty(se,"strConcat",{enumerable:!0,get:function(){return ui.strConcat}});Object.defineProperty(se,"nil",{enumerable:!0,get:function(){return ui.nil}});Object.defineProperty(se,"getProperty",{enumerable:!0,get:function(){return ui.getProperty}});Object.defineProperty(se,"stringify",{enumerable:!0,get:function(){return ui.stringify}});Object.defineProperty(se,"regexpCode",{enumerable:!0,get:function(){return ui.regexpCode}});Object.defineProperty(se,"Name",{enumerable:!0,get:function(){return ui.Name}});var no=ps();Object.defineProperty(se,"Scope",{enumerable:!0,get:function(){return no.Scope}});Object.defineProperty(se,"ValueScope",{enumerable:!0,get:function(){return no.ValueScope}});Object.defineProperty(se,"ValueScopeName",{enumerable:!0,get:function(){return no.ValueScopeName}});Object.defineProperty(se,"varKinds",{enumerable:!0,get:function(){return no.varKinds}});se.operators={GT:new me._Code(">"),GTE:new me._Code(">="),LT:new me._Code("<"),LTE:new me._Code("<="),EQ:new me._Code("==="),NEQ:new me._Code("!=="),NOT:new me._Code("!"),OR:new me._Code("||"),AND:new me._Code("&&"),ADD:new me._Code("+")};var wu=class{optimizeNodes(){return this}optimizeNames(u,t){return this}},ms=class extends wu{constructor(u,t,i){super(),this.varKind=u,this.name=t,this.rhs=i}render({es5:u,_n:t}){let i=u?uu.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+t}optimizeNames(u,t){if(u[this.name.str])return this.rhs&&(this.rhs=un(this.rhs,u,t)),this}get names(){return this.rhs instanceof me._CodeOrName?this.rhs.names:{}}},to=class extends wu{constructor(u,t,i){super(),this.lhs=u,this.rhs=t,this.sideEffects=i}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,t){if(!(this.lhs instanceof me.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=un(this.rhs,u,t),this}get names(){let u=this.lhs instanceof me.Name?{}:X({},this.lhs.names);return io(u,this.rhs)}},Fs=class extends to{constructor(u,t,i,n){super(u,i,n),this.op=t}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}},Cs=class extends wu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}},hs=class extends wu{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}},gs=class extends wu{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}},Es=class extends wu{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,t){return this.code=un(this.code,u,t),this}get names(){return this.code instanceof me._CodeOrName?this.code.names:{}}},sf=class extends wu{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((t,i)=>t+i.render(u),"")}optimizeNodes(){let{nodes:u}=this,t=u.length;for(;t--;){let i=u[t].optimizeNodes();Array.isArray(i)?u.splice(t,1,...i):i?u[t]=i:u.splice(t,1)}return u.length>0?this:void 0}optimizeNames(u,t){let{nodes:i}=this,n=i.length;for(;n--;){let f=i[n];f.optimizeNames(u,t)||(DE(u,f.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((u,t)=>Ai(u,t.names),{})}},Su=class extends sf{render(u){return"{"+u._n+super.render(u)+"}"+u._n}},bs=class extends sf{},_s=(()=>{class e extends Su{}return e.kind="else",e})(),eo=(()=>{class e extends Su{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let n=i.optimizeNodes();i=this.else=Array.isArray(n)?new _s(n):n}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(U1(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=un(this.condition,t,i),this}get names(){let t=super.names;return io(t,this.condition),this.else&&Ai(t,this.else.names),t}}return e.kind="if",e})(),fo=(()=>{class e extends Su{}return e.kind="for",e})(),ys=class extends fo{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iteration=un(this.iteration,u,t),this}get names(){return Ai(super.names,this.iteration.names)}},vs=class extends fo{constructor(u,t,i,n){super(),this.varKind=u,this.name=t,this.from=i,this.to=n}render(u){let t=u.es5?uu.varKinds.var:this.varKind,{name:i,from:n,to:f}=this;return`for(${t} ${i}=${n}; ${i}<${f}; ${i}++)`+super.render(u)}get names(){let u=io(super.names,this.from);return io(u,this.to)}},uo=class extends fo{constructor(u,t,i,n){super(),this.loop=u,this.varKind=t,this.name=i,this.iterable=n}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iterable=un(this.iterable,u,t),this}get names(){return Ai(super.names,this.iterable.names)}},V1=(()=>{class e extends Su{constructor(t,i,n){super(),this.name=t,this.args=i,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),R1=(()=>{class e extends sf{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Bs=class extends Su{render(u){let t="try"+super.render(u);return this.catch&&(t+=this.catch.render(u)),this.finally&&(t+=this.finally.render(u)),t}optimizeNodes(){var u,t;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(u,t){var i,n;return super.optimizeNames(u,t),(i=this.catch)===null||i===void 0||i.optimizeNames(u,t),(n=this.finally)===null||n===void 0||n.optimizeNames(u,t),this}get names(){let u=super.names;return this.catch&&Ai(u,this.catch.names),this.finally&&Ai(u,this.finally.names),u}},L1=(()=>{class e extends Su{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),z1=(()=>{class e extends Su{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),xs=class{constructor(u,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=xe(X({},t),{_n:t.lines?`
|
|
2
2
|
`:""}),this._extScope=u,this._scope=new uu.Scope({parent:u}),this._nodes=[new bs]}toString(){return this._root.render(this.opts)}name(u){return this._scope.name(u)}scopeName(u){return this._extScope.name(u)}scopeValue(u,t){let i=this._extScope.value(u,t);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(u,t){return this._extScope.getValue(u,t)}scopeRefs(u){return this._extScope.scopeRefs(u,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(u,t,i,n){let f=this._scope.toName(t);return i!==void 0&&n&&(this._constants[f.str]=i),this._leafNode(new ms(u,f,i)),f}const(u,t,i){return this._def(uu.varKinds.const,u,t,i)}let(u,t,i){return this._def(uu.varKinds.let,u,t,i)}var(u,t,i){return this._def(uu.varKinds.var,u,t,i)}assign(u,t,i){return this._leafNode(new to(u,t,i))}add(u,t){return this._leafNode(new Fs(u,se.operators.ADD,t))}code(u){return typeof u=="function"?u():u!==me.nil&&this._leafNode(new Es(u)),this}object(...u){let t=["{"];for(let[i,n]of u)t.length>1&&t.push(","),t.push(i),(i!==n||this.opts.es5)&&(t.push(":"),(0,me.addCodeArg)(t,n));return t.push("}"),new me._Code(t)}if(u,t,i){if(this._blockNode(new eo(u)),t&&i)this.code(t).else().code(i).endIf();else if(t)this.code(t).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(u){return this._elseNode(new eo(u))}else(){return this._elseNode(new _s)}endIf(){return this._endBlockNode(eo,_s)}_for(u,t){return this._blockNode(u),t&&this.code(t).endFor(),this}for(u,t){return this._for(new ys(u),t)}forRange(u,t,i,n,f=this.opts.es5?uu.varKinds.var:uu.varKinds.let){let r=this._scope.toName(u);return this._for(new vs(f,r,t,i),()=>n(r))}forOf(u,t,i,n=uu.varKinds.const){let f=this._scope.toName(u);if(this.opts.es5){let r=t instanceof me.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,me._)`${r}.length`,o=>{this.var(f,(0,me._)`${r}[${o}]`),i(f)})}return this._for(new uo("of",n,f,t),()=>i(f))}forIn(u,t,i,n=this.opts.es5?uu.varKinds.var:uu.varKinds.const){if(this.opts.ownProperties)return this.forOf(u,(0,me._)`Object.keys(${t})`,i);let f=this._scope.toName(u);return this._for(new uo("in",n,f,t),()=>i(f))}endFor(){return this._endBlockNode(fo)}label(u){return this._leafNode(new Cs(u))}break(u){return this._leafNode(new hs(u))}return(u){let t=new R1;if(this._blockNode(t),this.code(u),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(R1)}try(u,t,i){if(!t&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new Bs;if(this._blockNode(n),this.code(u),t){let f=this.name("e");this._currNode=n.catch=new L1(f),t(f)}return i&&(this._currNode=n.finally=new z1,this.code(i)),this._endBlockNode(L1,z1)}throw(u){return this._leafNode(new gs(u))}block(u,t){return this._blockStarts.push(this._nodes.length),u&&this.code(u).endBlock(t),this}endBlock(u){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let i=this._nodes.length-t;if(i<0||u!==void 0&&i!==u)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${u} expected`);return this._nodes.length=t,this}func(u,t=me.nil,i,n){return this._blockNode(new V1(u,t,i)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(V1)}optimize(u=1){for(;u-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(u){return this._currNode.nodes.push(u),this}_blockNode(u){this._currNode.nodes.push(u),this._nodes.push(u)}_endBlockNode(u,t){let i=this._currNode;if(i instanceof u||t&&i instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${u.kind}/${t.kind}`:u.kind}"`)}_elseNode(u){let t=this._currNode;if(!(t instanceof eo))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=u,this}get _root(){return this._nodes[0]}get _currNode(){let u=this._nodes;return u[u.length-1]}set _currNode(u){let t=this._nodes;t[t.length-1]=u}};se.CodeGen=xs;function Ai(e,u){for(let t in u)e[t]=(e[t]||0)+(u[t]||0);return e}function io(e,u){return u instanceof me._CodeOrName?Ai(e,u.names):e}function un(e,u,t){if(e instanceof me.Name)return i(e);if(!n(e))return e;return new me._Code(e._items.reduce((f,r)=>(r instanceof me.Name&&(r=i(r)),r instanceof me._Code?f.push(...r._items):f.push(r),f),[]));function i(f){let r=t[f.str];return r===void 0||u[f.str]!==1?f:(delete u[f.str],r)}function n(f){return f instanceof me._Code&&f._items.some(r=>r instanceof me.Name&&u[r.str]===1&&t[r.str]!==void 0)}}function DE(e,u){for(let t in u)e[t]=(e[t]||0)-(u[t]||0)}function U1(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,me._)`!${ws(e)}`}se.not=U1;var lE=H1(se.operators.AND);function dE(...e){return e.reduce(lE)}se.and=dE;var cE=H1(se.operators.OR);function pE(...e){return e.reduce(cE)}se.or=pE;function H1(e){return(u,t)=>u===me.nil?t:t===me.nil?u:(0,me._)`${ws(u)} ${e} ${ws(t)}`}function ws(e){return e instanceof me.Name?e:(0,me._)`(${e})`}});var le=F(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.checkStrictMode=De.getErrorPath=De.Type=De.useFunc=De.setEvaluated=De.evaluatedPropsToName=De.mergeEvaluated=De.eachItem=De.unescapeJsonPointer=De.escapeJsonPointer=De.escapeFragment=De.unescapeFragment=De.schemaRefOrVal=De.schemaHasRulesButRef=De.schemaHasRules=De.checkUnknownRules=De.alwaysValidSchema=De.toHash=void 0;var Se=ee(),mE=af();function FE(e){let u={};for(let t of e)u[t]=!0;return u}De.toHash=FE;function CE(e,u){return typeof u=="boolean"?u:Object.keys(u).length===0?!0:(G1(e,u),!J1(u,e.self.RULES.all))}De.alwaysValidSchema=CE;function G1(e,u=e.schema){let{opts:t,self:i}=e;if(!t.strictSchema||typeof u=="boolean")return;let n=i.RULES.keywords;for(let f in u)n[f]||Z1(e,`unknown keyword: "${f}"`)}De.checkUnknownRules=G1;function J1(e,u){if(typeof e=="boolean")return!e;for(let t in e)if(u[t])return!0;return!1}De.schemaHasRules=J1;function hE(e,u){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&u.all[t])return!0;return!1}De.schemaHasRulesButRef=hE;function gE({topSchemaRef:e,schemaPath:u},t,i,n){if(!n){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Se._)`${t}`}return(0,Se._)`${e}${u}${(0,Se.getProperty)(i)}`}De.schemaRefOrVal=gE;function EE(e){return X1(decodeURIComponent(e))}De.unescapeFragment=EE;function bE(e){return encodeURIComponent(Is(e))}De.escapeFragment=bE;function Is(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}De.escapeJsonPointer=Is;function X1(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}De.unescapeJsonPointer=X1;function _E(e,u){if(Array.isArray(e))for(let t of e)u(t);else u(e)}De.eachItem=_E;function W1({mergeNames:e,mergeToName:u,mergeValues:t,resultToName:i}){return(n,f,r,o)=>{let a=r===void 0?f:r instanceof Se.Name?(f instanceof Se.Name?e(n,f,r):u(n,f,r),r):f instanceof Se.Name?(u(n,r,f),f):t(f,r);return o===Se.Name&&!(a instanceof Se.Name)?i(n,a):a}}De.mergeEvaluated={props:W1({mergeNames:(e,u,t)=>e.if((0,Se._)`${t} !== true && ${u} !== undefined`,()=>{e.if((0,Se._)`${u} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,Se._)`${t} || {}`).code((0,Se._)`Object.assign(${t}, ${u})`))}),mergeToName:(e,u,t)=>e.if((0,Se._)`${t} !== true`,()=>{u===!0?e.assign(t,!0):(e.assign(t,(0,Se._)`${t} || {}`),As(e,t,u))}),mergeValues:(e,u)=>e===!0?!0:X(X({},e),u),resultToName:Y1}),items:W1({mergeNames:(e,u,t)=>e.if((0,Se._)`${t} !== true && ${u} !== undefined`,()=>e.assign(t,(0,Se._)`${u} === true ? true : ${t} > ${u} ? ${t} : ${u}`)),mergeToName:(e,u,t)=>e.if((0,Se._)`${t} !== true`,()=>e.assign(t,u===!0?!0:(0,Se._)`${t} > ${u} ? ${t} : ${u}`)),mergeValues:(e,u)=>e===!0?!0:Math.max(e,u),resultToName:(e,u)=>e.var("items",u)})};function Y1(e,u){if(u===!0)return e.var("props",!0);let t=e.var("props",(0,Se._)`{}`);return u!==void 0&&As(e,t,u),t}De.evaluatedPropsToName=Y1;function As(e,u,t){Object.keys(t).forEach(i=>e.assign((0,Se._)`${u}${(0,Se.getProperty)(i)}`,!0))}De.setEvaluated=As;var K1={};function yE(e,u){return e.scopeValue("func",{ref:u,code:K1[u.code]||(K1[u.code]=new mE._Code(u.code))})}De.useFunc=yE;var Ss=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(Ss||(De.Type=Ss={}));function vE(e,u,t){if(e instanceof Se.Name){let i=u===Ss.Num;return t?i?(0,Se._)`"[" + ${e} + "]"`:(0,Se._)`"['" + ${e} + "']"`:i?(0,Se._)`"/" + ${e}`:(0,Se._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Se.getProperty)(e).toString():"/"+Is(e)}De.getErrorPath=vE;function Z1(e,u,t=e.opts.strictSchema){if(t){if(u=`strict mode: ${u}`,t===!0)throw new Error(u);e.self.logger.warn(u)}}De.checkStrictMode=Z1});var Wt=F($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});var lt=ee(),BE={data:new lt.Name("data"),valCxt:new lt.Name("valCxt"),instancePath:new lt.Name("instancePath"),parentData:new lt.Name("parentData"),parentDataProperty:new lt.Name("parentDataProperty"),rootData:new lt.Name("rootData"),dynamicAnchors:new lt.Name("dynamicAnchors"),vErrors:new lt.Name("vErrors"),errors:new lt.Name("errors"),this:new lt.Name("this"),self:new lt.Name("self"),scope:new lt.Name("scope"),json:new lt.Name("json"),jsonPos:new lt.Name("jsonPos"),jsonLen:new lt.Name("jsonLen"),jsonPart:new lt.Name("jsonPart")};$s.default=BE});var Df=F(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.extendErrors=dt.resetErrorsCount=dt.reportExtraError=dt.reportError=dt.keyword$DataError=dt.keywordError=void 0;var he=ee(),ro=le(),bt=Wt();dt.keywordError={message:({keyword:e})=>(0,he.str)`must pass "${e}" keyword validation`};dt.keyword$DataError={message:({keyword:e,schemaType:u})=>u?(0,he.str)`"${e}" keyword must be ${u} ($data)`:(0,he.str)`"${e}" keyword is invalid ($data)`};function xE(e,u=dt.keywordError,t,i){let{it:n}=e,{gen:f,compositeRule:r,allErrors:o}=n,a=td(e,u,t);i??(r||o)?Q1(f,a):ed(n,(0,he._)`[${a}]`)}dt.reportError=xE;function wE(e,u=dt.keywordError,t){let{it:i}=e,{gen:n,compositeRule:f,allErrors:r}=i,o=td(e,u,t);Q1(n,o),f||r||ed(i,bt.default.vErrors)}dt.reportExtraError=wE;function SE(e,u){e.assign(bt.default.errors,u),e.if((0,he._)`${bt.default.vErrors} !== null`,()=>e.if(u,()=>e.assign((0,he._)`${bt.default.vErrors}.length`,u),()=>e.assign(bt.default.vErrors,null)))}dt.resetErrorsCount=SE;function IE({gen:e,keyword:u,schemaValue:t,data:i,errsCount:n,it:f}){if(n===void 0)throw new Error("ajv implementation error");let r=e.name("err");e.forRange("i",n,bt.default.errors,o=>{e.const(r,(0,he._)`${bt.default.vErrors}[${o}]`),e.if((0,he._)`${r}.instancePath === undefined`,()=>e.assign((0,he._)`${r}.instancePath`,(0,he.strConcat)(bt.default.instancePath,f.errorPath))),e.assign((0,he._)`${r}.schemaPath`,(0,he.str)`${f.errSchemaPath}/${u}`),f.opts.verbose&&(e.assign((0,he._)`${r}.schema`,t),e.assign((0,he._)`${r}.data`,i))})}dt.extendErrors=IE;function Q1(e,u){let t=e.const("err",u);e.if((0,he._)`${bt.default.vErrors} === null`,()=>e.assign(bt.default.vErrors,(0,he._)`[${t}]`),(0,he._)`${bt.default.vErrors}.push(${t})`),e.code((0,he._)`${bt.default.errors}++`)}function ed(e,u){let{gen:t,validateName:i,schemaEnv:n}=e;n.$async?t.throw((0,he._)`new ${e.ValidationError}(${u})`):(t.assign((0,he._)`${i}.errors`,u),t.return(!1))}var $i={keyword:new he.Name("keyword"),schemaPath:new he.Name("schemaPath"),params:new he.Name("params"),propertyName:new he.Name("propertyName"),message:new he.Name("message"),schema:new he.Name("schema"),parentSchema:new he.Name("parentSchema")};function td(e,u,t){let{createErrors:i}=e.it;return i===!1?(0,he._)`{}`:AE(e,u,t)}function AE(e,u,t={}){let{gen:i,it:n}=e,f=[$E(n,t),kE(e,t)];return TE(e,u,f),i.object(...f)}function $E({errorPath:e},{instancePath:u}){let t=u?(0,he.str)`${e}${(0,ro.getErrorPath)(u,ro.Type.Str)}`:e;return[bt.default.instancePath,(0,he.strConcat)(bt.default.instancePath,t)]}function kE({keyword:e,it:{errSchemaPath:u}},{schemaPath:t,parentSchema:i}){let n=i?u:(0,he.str)`${u}/${e}`;return t&&(n=(0,he.str)`${n}${(0,ro.getErrorPath)(t,ro.Type.Str)}`),[$i.schemaPath,n]}function TE(e,{params:u,message:t},i){let{keyword:n,data:f,schemaValue:r,it:o}=e,{opts:a,propertyName:s,topSchemaRef:D,schemaPath:d}=o;i.push([$i.keyword,n],[$i.params,typeof u=="function"?u(e):u||(0,he._)`{}`]),a.messages&&i.push([$i.message,typeof t=="function"?t(e):t]),a.verbose&&i.push([$i.schema,r],[$i.parentSchema,(0,he._)`${D}${d}`],[bt.default.data,f]),s&&i.push([$i.propertyName,s])}});var id=F(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.boolOrEmptySchema=nn.topBoolOrEmptySchema=void 0;var PE=Df(),OE=ee(),ME=Wt(),jE={message:"boolean schema is false"};function NE(e){let{gen:u,schema:t,validateName:i}=e;t===!1?ud(e,!1):typeof t=="object"&&t.$async===!0?u.return(ME.default.data):(u.assign((0,OE._)`${i}.errors`,null),u.return(!0))}nn.topBoolOrEmptySchema=NE;function qE(e,u){let{gen:t,schema:i}=e;i===!1?(t.var(u,!1),ud(e)):t.var(u,!0)}nn.boolOrEmptySchema=qE;function ud(e,u){let{gen:t,data:i}=e,n={gen:t,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,PE.reportError)(n,jE,void 0,u)}});var ks=F(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.getRules=fn.isJSONType=void 0;var VE=["string","number","integer","boolean","null","object","array"],RE=new Set(VE);function LE(e){return typeof e=="string"&&RE.has(e)}fn.isJSONType=LE;function zE(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:xe(X({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}fn.getRules=zE});var Ts=F(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.shouldUseRule=ii.shouldUseGroup=ii.schemaHasRulesForType=void 0;function UE({schema:e,self:u},t){let i=u.RULES.types[t];return i&&i!==!0&&nd(e,i)}ii.schemaHasRulesForType=UE;function nd(e,u){return u.rules.some(t=>fd(e,t))}ii.shouldUseGroup=nd;function fd(e,u){var t;return e[u.keyword]!==void 0||((t=u.definition.implements)===null||t===void 0?void 0:t.some(i=>e[i]!==void 0))}ii.shouldUseRule=fd});var lf=F(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.reportTypeError=ct.checkDataTypes=ct.checkDataType=ct.coerceAndCheckDataType=ct.getJSONTypes=ct.getSchemaTypes=ct.DataType=void 0;var HE=ks(),WE=Ts(),KE=Df(),re=ee(),rd=le(),rn=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(rn||(ct.DataType=rn={}));function GE(e){let u=od(e.type);if(u.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!u.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&u.push("null")}return u}ct.getSchemaTypes=GE;function od(e){let u=Array.isArray(e)?e:e?[e]:[];if(u.every(HE.isJSONType))return u;throw new Error("type must be JSONType or JSONType[]: "+u.join(","))}ct.getJSONTypes=od;function JE(e,u){let{gen:t,data:i,opts:n}=e,f=XE(u,n.coerceTypes),r=u.length>0&&!(f.length===0&&u.length===1&&(0,WE.schemaHasRulesForType)(e,u[0]));if(r){let o=Os(u,i,n.strictNumbers,rn.Wrong);t.if(o,()=>{f.length?YE(e,u,f):Ms(e)})}return r}ct.coerceAndCheckDataType=JE;var ad=new Set(["string","number","integer","boolean","null"]);function XE(e,u){return u?e.filter(t=>ad.has(t)||u==="array"&&t==="array"):[]}function YE(e,u,t){let{gen:i,data:n,opts:f}=e,r=i.let("dataType",(0,re._)`typeof ${n}`),o=i.let("coerced",(0,re._)`undefined`);f.coerceTypes==="array"&&i.if((0,re._)`${r} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>i.assign(n,(0,re._)`${n}[0]`).assign(r,(0,re._)`typeof ${n}`).if(Os(u,n,f.strictNumbers),()=>i.assign(o,n))),i.if((0,re._)`${o} !== undefined`);for(let s of t)(ad.has(s)||s==="array"&&f.coerceTypes==="array")&&a(s);i.else(),Ms(e),i.endIf(),i.if((0,re._)`${o} !== undefined`,()=>{i.assign(n,o),ZE(e,o)});function a(s){switch(s){case"string":i.elseIf((0,re._)`${r} == "number" || ${r} == "boolean"`).assign(o,(0,re._)`"" + ${n}`).elseIf((0,re._)`${n} === null`).assign(o,(0,re._)`""`);return;case"number":i.elseIf((0,re._)`${r} == "boolean" || ${n} === null
|
|
3
3
|
|| (${r} == "string" && ${n} && ${n} == +${n})`).assign(o,(0,re._)`+${n}`);return;case"integer":i.elseIf((0,re._)`${r} === "boolean" || ${n} === null
|
|
4
4
|
|| (${r} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(o,(0,re._)`+${n}`);return;case"boolean":i.elseIf((0,re._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(o,!1).elseIf((0,re._)`${n} === "true" || ${n} === 1`).assign(o,!0);return;case"null":i.elseIf((0,re._)`${n} === "" || ${n} === 0 || ${n} === false`),i.assign(o,null);return;case"array":i.elseIf((0,re._)`${r} === "string" || ${r} === "number"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-
|
|
1
|
+
import"./chunk-FATD52DV.js";import"./chunk-AF2VUIEE.js";import{g as n}from"./chunk-2G7GNBIF.js";import"./chunk-YJXHSHNO.js";import"./chunk-B3LZRDAG.js";import"./chunk-XHI7IAUN.js";import"./chunk-XUH357B7.js";import"./chunk-VUYAK52W.js";import{c as m}from"./chunk-QMB5XE4Y.js";import{ha as t,kd as i,mb as r}from"./chunk-R3VPSO5X.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"restart-server",loadComponent:()=>import("./chunk-ODU3K7H7.js").then(o=>o.RestartLinuxComponent)},{path:"shutdown-server",loadComponent:()=>import("./chunk-2OUR67N4.js").then(o=>o.ShutdownLinuxComponent)}],u=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[n.forChild(d),n]})}return o})();var g=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i,m.forChild(),u]})}return o})();export{g as LinuxModule};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-XP6B4WXR.js";import"./chunk-VLX322GM.js";import"./chunk-2G7GNBIF.js";import"./chunk-B3LZRDAG.js";import"./chunk-XHI7IAUN.js";import"./chunk-XUH357B7.js";import"./chunk-VUYAK52W.js";import"./chunk-QMB5XE4Y.js";import"./chunk-R3VPSO5X.js";export{a as LoginComponent};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a}from"./chunk-C6A3CFIK.js";import"./chunk-CMO7ESK6.js";import"./chunk-G6KG4MKA.js";import"./chunk-UVOJ3BF7.js";import"./chunk-ALG7CIS3.js";import"./chunk-VLX322GM.js";import"./chunk-2G7GNBIF.js";import"./chunk-YJXHSHNO.js";import"./chunk-B3LZRDAG.js";import"./chunk-XHI7IAUN.js";import"./chunk-XUH357B7.js";import"./chunk-VUYAK52W.js";import"./chunk-QMB5XE4Y.js";import"./chunk-R3VPSO5X.js";export{a as AccessoriesComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as ee}from"./chunk-BRW7C4BZ.js";import{a as Z,b as ne}from"./chunk-UTAVUGTT.js";import{a as W,b as Y}from"./chunk-IOWBVW62.js";import{a as X}from"./chunk-UVOJ3BF7.js";import{m as J,n as K,o as U}from"./chunk-ALG7CIS3.js";import{c as N,e as F,l as q,z}from"./chunk-VLX322GM.js";import{b as G}from"./chunk-2G7GNBIF.js";import{b as Q}from"./chunk-2APWDSJR.js";import{k as M,n as V}from"./chunk-4ONUW2YX.js";import{a as k,b as T}from"./chunk-QMB5XE4Y.js";import{$a as n,Ac as s,Bc as d,Cc as O,Gb as C,Hb as m,Ib as p,Kb as I,Lb as j,Mb as H,Nb as v,Ob as r,Pb as a,Qb as w,Ub as b,Xb as _,Yb as l,eb as D,g as oe,h as S,id as L,jc as y,kc as x,la as h,lb as $,lc as E,qc as R,ra as g,rc as P,sa as u,sc as B,w as A}from"./chunk-R3VPSO5X.js";var ie=oe(ne(),1);function ae(o,f){o&1&&(r(0,"div",5),w(1,"i",12),a())}function se(o,f){if(o&1){let e=b();r(0,"li",17),y(1),s(2,"date"),r(3,"button",18),s(4,"translate"),_("click",function(){let t=g(e).$implicit,c=l(3);return u(c.restore(t.id))}),w(5,"i",19),a()()}if(o&2){let e=f.$implicit;n(),E(" ",O(2,2,e.timestamp,"medium")," "),n(2),C("aria-label",d(4,5,"config.restore.copy_to_editor"))}}function le(o,f){if(o&1&&(r(0,"ul",15),j(1,se,6,7,"li",17,I),a()),o&2){let e=l(2);n(),H(e.backupList)}}function de(o,f){o&1&&(r(0,"p",16),y(1),s(2,"translate"),a()),o&2&&(n(),x(d(2,1,"config.restore.no_backups")))}function ce(o,f){if(o&1&&(r(0,"div",13),w(1,"i",14),a(),r(2,"p",13),y(3),s(4,"translate"),a(),m(5,le,3,0,"ul",15),m(6,de,3,3,"p",16)),o&2){let e=l();n(3),x(d(4,3,"config.restore.title_restore_homebridge_backup")),n(2),p(e.backupList&&e.backupList.length?5:-1),n(),p(!e.backupList||!e.backupList.length?6:-1)}}function me(o,f){if(o&1){let e=b();r(0,"button",20),s(1,"translate"),_("click",function(){g(e);let t=l();return u(t.$activeModal.dismiss("Dismiss"))}),y(2),s(3,"translate"),a()}o&2&&(C("aria-label",d(1,2,"form.button_close")),n(2),E(" ",d(3,4,"form.button_close")," "))}function pe(o,f){if(o&1){let e=b();r(0,"button",20),s(1,"translate"),_("click",function(){g(e);let t=l();return u(t.$activeModal.dismiss("Dismiss"))}),y(2),s(3,"translate"),a()}o&2&&(C("aria-label",d(1,2,"form.button_close")),n(2),E(" ",d(3,4,"form.button_close")," "))}function fe(o,f){if(o&1){let e=b();r(0,"button",21),s(1,"translate"),_("click",function(){g(e);let t=l();return u(t.deleteAllBackups())}),y(2),s(3,"translate"),a()}o&2&&(C("aria-label",d(1,2,"form.button_remove")),n(2),E(" ",d(3,4,"form.button_remove")," "))}var te=(()=>{class o{$activeModal=h(J);$api=h(V);$toastr=h(M);$translate=h(k);loading=!0;backupList=[];constructor(){}ngOnInit(){this.$api.get("/config-editor/backups").subscribe({next:e=>{this.loading=!1,this.backupList=e},error:e=>{this.loading=!1,console.error(e),this.$toastr.error(e.error.message||e.message,this.$translate.instant("toast.title_error"))}})}restore(e){return this.$activeModal.close(e)}deleteAllBackups(){return this.$api.delete("/config-editor/backups").subscribe({next:()=>{this.$activeModal.dismiss(),this.$toastr.success(this.$translate.instant("config.restore.toast_backups_deleted"),this.$translate.instant("toast.title_success"))},error:e=>{console.error(e),this.$toastr.error(e.error.message||e.message,this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=$({type:o,selectors:[["ng-component"]],decls:17,vars:11,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","primary-text"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["type","button",1,"btn","btn-danger","me-auto"],[1,"fa","fa-fw","fa-cog","fa-spin",2,"font-size","75px"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-history","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box"],[1,"text-center","mb-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"btn","btn-primary","m-0","ms-3",3,"click"],[1,"fas","fa-fw","fa-arrow-right"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button",1,"btn","btn-danger","me-auto",3,"click"]],template:function(i,t){i&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),y(3),s(4,"translate"),a(),r(5,"button",3),s(6,"translate"),_("click",function(){return t.$activeModal.dismiss("Dismiss")}),a()(),r(7,"div",4),m(8,ae,2,0,"div",5),m(9,ce,7,5),a(),r(10,"div",6)(11,"div",7),m(12,me,4,6,"button",8),a(),r(13,"div",9),m(14,pe,4,6,"button",8),a(),r(15,"div",10),m(16,fe,4,6,"button",11),a()()()),i&2&&(n(3),x(d(4,7,"form.button_restore")),n(2),C("aria-label",d(6,9,"form.button_close")),n(3),p(t.loading?8:-1),n(),p(t.loading?-1:9),n(3),p(!t.loading&&t.backupList.length?12:-1),n(2),p(t.loading||!t.loading&&!t.backupList.length?14:-1),n(2),p(!t.loading&&t.backupList.length?16:-1))},dependencies:[L,T],encapsulation:2})}return o})();function ge(o,f){if(o&1){let e=b();r(0,"button",13),s(1,"translate"),s(2,"translate"),_("click",function(){g(e);let t=l();return u(t.onExportConfig())}),w(3,"i",14),a()}o&2&&(v("ngbTooltip",d(1,2,"form.button_download")),C("aria-label",d(2,4,"form.button_download")))}function ue(o,f){if(o&1){let e=b();r(0,"button",15),s(1,"translate"),s(2,"translate"),_("click",function(){g(e);let t=l();return u(t.onCancelRestore())}),w(3,"i",16),a()}if(o&2){let e=l();v("disabled",e.saveInProgress)("ngbTooltip",d(1,3,"form.button_cancel")),C("aria-label",d(2,5,"form.button_cancel"))}}function he(o,f){if(o&1){let e=b();r(0,"button",13),s(1,"translate"),s(2,"translate"),_("click",function(){g(e);let t=l();return u(t.onRestore())}),w(3,"i",17),a()}o&2&&(v("ngbTooltip",d(1,2,"form.button_restore")),C("aria-label",d(2,4,"form.button_restore")))}function _e(o,f){o&1&&w(0,"i",8)}function be(o,f){o&1&&w(0,"i",9)}function Ce(o,f){if(o&1){let e=b();r(0,"ngx-monaco-editor",18),_("onInit",function(t){g(e);let c=l();return u(c.onEditorInit(t))})("keydown.control.s",function(t){g(e);let c=l();return t.preventDefault(),u(c.onSave())})("keydown.meta.s",function(t){g(e);let c=l();return t.preventDefault(),u(c.onSave())}),a()}if(o&2){let e=l();v("options",e.editorOptions)("model",e.monacoEditorModel)}}function ye(o,f){if(o&1){let e=b();r(0,"ngx-monaco-diff-editor",19),_("onInit",function(t){g(e);let c=l();return u(c.onInitDiffEditor(t))})("keydown.control.s",function(t){g(e);let c=l();return t.preventDefault(),u(c.onSave())})("keydown.meta.s",function(t){g(e);let c=l();return t.preventDefault(),u(c.onSave())}),a()}if(o&2){let e=l();v("options",e.editorOptions)("originalModel",e.monacoEditorModel)("modifiedModel",e.monacoEditorModel)}}function we(o,f){if(o&1){let e=b();r(0,"textarea",20),B("ngModelChange",function(t){g(e);let c=l();return P(c.homebridgeConfig,t)||(c.homebridgeConfig=t),u(t)}),y(1," "),a()}if(o&2){let e=l();R("ngModel",e.homebridgeConfig)}}var Ke=(()=>{class o{$api=h(V);$md=h(X);$modal=h(K);$monacoEditor=h(ee);$route=h(G);$renderer=h(D);$settings=h(Q);$toastr=h(M);$translate=h(k);homebridgeConfig;originalConfig;saveInProgress;isMobile=!1;monacoEditor;editorOptions;monacoEditorModel;editorDecorations=[];lastHeight;visualViewPortEventCallback;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"json",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light",automaticLayout:!0};let e=document.querySelector(".content");this.$renderer.setStyle(e,"height","100%"),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(i=>{this.homebridgeConfig=i.config}),this.monacoEditorModel={value:"{}",language:"json",uri:window.monaco?window.monaco.Uri.parse("a://homebridge/config.json"):void 0},window.monaco?this.setMonacoEditorModel():this.$monacoEditor.readyEvent.subscribe({next:()=>{this.setMonacoEditorModel()}})}onEditorInit(e){window.editor=e,this.monacoEditor=e,this.monacoEditor.getModel().setValue(this.homebridgeConfig)}onInitDiffEditor(e){this.monacoEditor=e.modifiedEditor,e.getModel().original.setValue(this.originalConfig),e.getModel().modified.setValue(this.homebridgeConfig),window.editor=e}onSave(){return S(this,null,function*(){if(!this.saveInProgress){this.monacoEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[])),this.saveInProgress=!0;try{if(!this.isMobile){yield this.monacoEditor.getAction("editor.action.formatDocument").run();let i=window.monaco.editor.getModelMarkers({owner:"json"});for(let t of i)if(t.message==="Duplicate object key"){this.saveInProgress=!1,this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"));return}this.homebridgeConfig=this.monacoEditor.getModel().getValue()}let e=this.parseConfigFromEditor();this.homebridgeConfig=JSON.stringify(e,null,4),typeof e.bridge!="object"?this.$toastr.error(this.$translate.instant("config.config_bridge_missing"),this.$translate.instant("toast.title_error")):/^(?:[0-9A-F]{2}:){5}[0-9A-F]{2}$/i.test(e.bridge.username)?e.accessories&&!Array.isArray(e.accessories)?this.$toastr.error(this.$translate.instant("config.config_accessory_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&!Array.isArray(e.platforms)?this.$toastr.error(this.$translate.instant("config.config_platform_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&Array.isArray(e.platforms)&&!this.validateSection(e.platforms,"platform")||e.accessories&&Array.isArray(e.accessories)&&!this.validateSection(e.accessories,"accessory")||e.plugins&&Array.isArray(e.plugins)&&!this.validatePlugins(e.plugins,"plugins")||e.disabledPlugins&&Array.isArray(e.disabledPlugins)&&!this.validatePlugins(e.disabledPlugins,"disabledPlugins")||(yield this.saveConfig(e),this.originalConfig=""):this.$toastr.error(this.$translate.instant("config.config_username_error"),this.$translate.instant("toast.title_error"))}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}parseConfigFromEditor(){try{return JSON.parse(this.homebridgeConfig)}catch{let i=ie.default.parse(this.homebridgeConfig);return this.homebridgeConfig=JSON.stringify(i,null,4),this.monacoEditor&&this.monacoEditor.getModel().setValue(this.homebridgeConfig),i}}saveConfig(e){return S(this,null,function*(){try{let i=yield A(this.$api.post("/config-editor",e));this.homebridgeConfig=JSON.stringify(i,null,4),this.$modal.open(Z,{size:"lg",backdrop:"static"})}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("config.failed_to_save_config"),this.$translate.instant("toast.title_error"))}})}onRestore(){this.$modal.open(te,{size:"lg",backdrop:"static"}).result.then(e=>{this.originalConfig||(this.originalConfig=this.homebridgeConfig),this.$api.get(`/config-editor/backups/${e}`).subscribe({next:i=>{this.$toastr.info(this.$translate.instant("config.restore.confirm"),this.$translate.instant("config.title_backup_loaded")),this.homebridgeConfig=JSON.stringify(i,null,4),this.monacoEditor&&window.editor.modifiedEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[]),this.monacoEditor.executeEdits("beautifier",[{identifier:"delete",range:new monaco.Range(1,1,this.monacoEditor.getModel().getLineCount()+10,1),text:"",forceMoveMarkers:!0}]),this.monacoEditor.executeEdits("beautifier",[{identifier:"insert",range:new monaco.Range(1,1,1,1),text:this.homebridgeConfig,forceMoveMarkers:!0}]))},error:i=>{console.error(i),this.$toastr.error(i.error.message||this.$translate.instant("backup.load_error"),this.$translate.instant("toast.title_error"))}})}).catch(()=>{})}onExportConfig(){let e=`data:text/json;charset=utf-8,${encodeURIComponent(this.homebridgeConfig)}`,i=document.createElement("a");i.setAttribute("href",e),i.setAttribute("download","config.json"),document.body.appendChild(i),i.click(),i.remove()}onCancelRestore(){this.homebridgeConfig=this.originalConfig,this.originalConfig=""}validateSection(e,i){for(let t of e){if(typeof t!="object"||Array.isArray(t))return this.$toastr.error(this.$translate.instant("config.error_blocks_objects",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1;if(!t[i])return this.$toastr.error(this.$translate.instant("config.error_blocks_type",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1;if(typeof t[i]!="string")return this.$toastr.error(this.$translate.instant("config.error_string_type",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1}return!0}validatePlugins(e,i){for(let t of e)if(typeof t!="string")return this.$toastr.error(this.$translate.instant("config.error_string_array",{key:i}),this.$translate.instant("toast.title_error")),!1;return!0}highlightOffendingArrayItem(e){this.monacoEditor&&(e=JSON.stringify(e,null,4).split(`
|
|
1
|
+
import{a as ee}from"./chunk-BRW7C4BZ.js";import{a as Z,b as ne}from"./chunk-UTAVUGTT.js";import{a as W,b as Y}from"./chunk-IOWBVW62.js";import{a as X}from"./chunk-UVOJ3BF7.js";import{m as J,n as K,o as U}from"./chunk-ALG7CIS3.js";import{c as N,e as F,l as q,z}from"./chunk-VLX322GM.js";import{b as G}from"./chunk-2G7GNBIF.js";import{b as Q}from"./chunk-XHI7IAUN.js";import{k as M,n as V}from"./chunk-XUH357B7.js";import{a as k,b as T}from"./chunk-QMB5XE4Y.js";import{$a as n,Ac as s,Bc as d,Cc as O,Gb as C,Hb as m,Ib as p,Kb as I,Lb as j,Mb as H,Nb as v,Ob as r,Pb as a,Qb as w,Ub as b,Xb as _,Yb as l,eb as D,g as oe,h as S,id as L,jc as y,kc as x,la as h,lb as $,lc as E,qc as R,ra as g,rc as P,sa as u,sc as B,w as A}from"./chunk-R3VPSO5X.js";var ie=oe(ne(),1);function ae(o,f){o&1&&(r(0,"div",5),w(1,"i",12),a())}function se(o,f){if(o&1){let e=b();r(0,"li",17),y(1),s(2,"date"),r(3,"button",18),s(4,"translate"),_("click",function(){let t=g(e).$implicit,c=l(3);return u(c.restore(t.id))}),w(5,"i",19),a()()}if(o&2){let e=f.$implicit;n(),E(" ",O(2,2,e.timestamp,"medium")," "),n(2),C("aria-label",d(4,5,"config.restore.copy_to_editor"))}}function le(o,f){if(o&1&&(r(0,"ul",15),j(1,se,6,7,"li",17,I),a()),o&2){let e=l(2);n(),H(e.backupList)}}function de(o,f){o&1&&(r(0,"p",16),y(1),s(2,"translate"),a()),o&2&&(n(),x(d(2,1,"config.restore.no_backups")))}function ce(o,f){if(o&1&&(r(0,"div",13),w(1,"i",14),a(),r(2,"p",13),y(3),s(4,"translate"),a(),m(5,le,3,0,"ul",15),m(6,de,3,3,"p",16)),o&2){let e=l();n(3),x(d(4,3,"config.restore.title_restore_homebridge_backup")),n(2),p(e.backupList&&e.backupList.length?5:-1),n(),p(!e.backupList||!e.backupList.length?6:-1)}}function me(o,f){if(o&1){let e=b();r(0,"button",20),s(1,"translate"),_("click",function(){g(e);let t=l();return u(t.$activeModal.dismiss("Dismiss"))}),y(2),s(3,"translate"),a()}o&2&&(C("aria-label",d(1,2,"form.button_close")),n(2),E(" ",d(3,4,"form.button_close")," "))}function pe(o,f){if(o&1){let e=b();r(0,"button",20),s(1,"translate"),_("click",function(){g(e);let t=l();return u(t.$activeModal.dismiss("Dismiss"))}),y(2),s(3,"translate"),a()}o&2&&(C("aria-label",d(1,2,"form.button_close")),n(2),E(" ",d(3,4,"form.button_close")," "))}function fe(o,f){if(o&1){let e=b();r(0,"button",21),s(1,"translate"),_("click",function(){g(e);let t=l();return u(t.deleteAllBackups())}),y(2),s(3,"translate"),a()}o&2&&(C("aria-label",d(1,2,"form.button_remove")),n(2),E(" ",d(3,4,"form.button_remove")," "))}var te=(()=>{class o{$activeModal=h(J);$api=h(V);$toastr=h(M);$translate=h(k);loading=!0;backupList=[];constructor(){}ngOnInit(){this.$api.get("/config-editor/backups").subscribe({next:e=>{this.loading=!1,this.backupList=e},error:e=>{this.loading=!1,console.error(e),this.$toastr.error(e.error.message||e.message,this.$translate.instant("toast.title_error"))}})}restore(e){return this.$activeModal.close(e)}deleteAllBackups(){return this.$api.delete("/config-editor/backups").subscribe({next:()=>{this.$activeModal.dismiss(),this.$toastr.success(this.$translate.instant("config.restore.toast_backups_deleted"),this.$translate.instant("toast.title_success"))},error:e=>{console.error(e),this.$toastr.error(e.error.message||e.message,this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=$({type:o,selectors:[["ng-component"]],decls:17,vars:11,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","primary-text"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["type","button",1,"btn","btn-danger","me-auto"],[1,"fa","fa-fw","fa-cog","fa-spin",2,"font-size","75px"],[1,"text-center","mb-3"],[1,"fas","fa-fw","fa-history","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box"],[1,"text-center","mb-0"],[1,"list-group-item","d-flex","justify-content-between","align-items-center"],[1,"btn","btn-primary","m-0","ms-3",3,"click"],[1,"fas","fa-fw","fa-arrow-right"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],["type","button",1,"btn","btn-danger","me-auto",3,"click"]],template:function(i,t){i&1&&(r(0,"div",0)(1,"div",1)(2,"h5",2),y(3),s(4,"translate"),a(),r(5,"button",3),s(6,"translate"),_("click",function(){return t.$activeModal.dismiss("Dismiss")}),a()(),r(7,"div",4),m(8,ae,2,0,"div",5),m(9,ce,7,5),a(),r(10,"div",6)(11,"div",7),m(12,me,4,6,"button",8),a(),r(13,"div",9),m(14,pe,4,6,"button",8),a(),r(15,"div",10),m(16,fe,4,6,"button",11),a()()()),i&2&&(n(3),x(d(4,7,"form.button_restore")),n(2),C("aria-label",d(6,9,"form.button_close")),n(3),p(t.loading?8:-1),n(),p(t.loading?-1:9),n(3),p(!t.loading&&t.backupList.length?12:-1),n(2),p(t.loading||!t.loading&&!t.backupList.length?14:-1),n(2),p(!t.loading&&t.backupList.length?16:-1))},dependencies:[L,T],encapsulation:2})}return o})();function ge(o,f){if(o&1){let e=b();r(0,"button",13),s(1,"translate"),s(2,"translate"),_("click",function(){g(e);let t=l();return u(t.onExportConfig())}),w(3,"i",14),a()}o&2&&(v("ngbTooltip",d(1,2,"form.button_download")),C("aria-label",d(2,4,"form.button_download")))}function ue(o,f){if(o&1){let e=b();r(0,"button",15),s(1,"translate"),s(2,"translate"),_("click",function(){g(e);let t=l();return u(t.onCancelRestore())}),w(3,"i",16),a()}if(o&2){let e=l();v("disabled",e.saveInProgress)("ngbTooltip",d(1,3,"form.button_cancel")),C("aria-label",d(2,5,"form.button_cancel"))}}function he(o,f){if(o&1){let e=b();r(0,"button",13),s(1,"translate"),s(2,"translate"),_("click",function(){g(e);let t=l();return u(t.onRestore())}),w(3,"i",17),a()}o&2&&(v("ngbTooltip",d(1,2,"form.button_restore")),C("aria-label",d(2,4,"form.button_restore")))}function _e(o,f){o&1&&w(0,"i",8)}function be(o,f){o&1&&w(0,"i",9)}function Ce(o,f){if(o&1){let e=b();r(0,"ngx-monaco-editor",18),_("onInit",function(t){g(e);let c=l();return u(c.onEditorInit(t))})("keydown.control.s",function(t){g(e);let c=l();return t.preventDefault(),u(c.onSave())})("keydown.meta.s",function(t){g(e);let c=l();return t.preventDefault(),u(c.onSave())}),a()}if(o&2){let e=l();v("options",e.editorOptions)("model",e.monacoEditorModel)}}function ye(o,f){if(o&1){let e=b();r(0,"ngx-monaco-diff-editor",19),_("onInit",function(t){g(e);let c=l();return u(c.onInitDiffEditor(t))})("keydown.control.s",function(t){g(e);let c=l();return t.preventDefault(),u(c.onSave())})("keydown.meta.s",function(t){g(e);let c=l();return t.preventDefault(),u(c.onSave())}),a()}if(o&2){let e=l();v("options",e.editorOptions)("originalModel",e.monacoEditorModel)("modifiedModel",e.monacoEditorModel)}}function we(o,f){if(o&1){let e=b();r(0,"textarea",20),B("ngModelChange",function(t){g(e);let c=l();return P(c.homebridgeConfig,t)||(c.homebridgeConfig=t),u(t)}),y(1," "),a()}if(o&2){let e=l();R("ngModel",e.homebridgeConfig)}}var Ke=(()=>{class o{$api=h(V);$md=h(X);$modal=h(K);$monacoEditor=h(ee);$route=h(G);$renderer=h(D);$settings=h(Q);$toastr=h(M);$translate=h(k);homebridgeConfig;originalConfig;saveInProgress;isMobile=!1;monacoEditor;editorOptions;monacoEditorModel;editorDecorations=[];lastHeight;visualViewPortEventCallback;constructor(){this.isMobile=this.$md.detect.mobile()}ngOnInit(){this.editorOptions={language:"json",theme:this.$settings.actualLightingMode==="dark"?"vs-dark":"vs-light",automaticLayout:!0};let e=document.querySelector(".content");this.$renderer.setStyle(e,"height","100%"),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.visualViewPortEventCallback=()=>this.visualViewPortChanged(),this.lastHeight=window.innerHeight,window.visualViewport&&!this.isMobile&&(window.visualViewport.addEventListener("resize",this.visualViewPortEventCallback,!0),this.$md.disableTouchMove()),this.$route.data.subscribe(i=>{this.homebridgeConfig=i.config}),this.monacoEditorModel={value:"{}",language:"json",uri:window.monaco?window.monaco.Uri.parse("a://homebridge/config.json"):void 0},window.monaco?this.setMonacoEditorModel():this.$monacoEditor.readyEvent.subscribe({next:()=>{this.setMonacoEditorModel()}})}onEditorInit(e){window.editor=e,this.monacoEditor=e,this.monacoEditor.getModel().setValue(this.homebridgeConfig)}onInitDiffEditor(e){this.monacoEditor=e.modifiedEditor,e.getModel().original.setValue(this.originalConfig),e.getModel().modified.setValue(this.homebridgeConfig),window.editor=e}onSave(){return S(this,null,function*(){if(!this.saveInProgress){this.monacoEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[])),this.saveInProgress=!0;try{if(!this.isMobile){yield this.monacoEditor.getAction("editor.action.formatDocument").run();let i=window.monaco.editor.getModelMarkers({owner:"json"});for(let t of i)if(t.message==="Duplicate object key"){this.saveInProgress=!1,this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"));return}this.homebridgeConfig=this.monacoEditor.getModel().getValue()}let e=this.parseConfigFromEditor();this.homebridgeConfig=JSON.stringify(e,null,4),typeof e.bridge!="object"?this.$toastr.error(this.$translate.instant("config.config_bridge_missing"),this.$translate.instant("toast.title_error")):/^(?:[0-9A-F]{2}:){5}[0-9A-F]{2}$/i.test(e.bridge.username)?e.accessories&&!Array.isArray(e.accessories)?this.$toastr.error(this.$translate.instant("config.config_accessory_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&!Array.isArray(e.platforms)?this.$toastr.error(this.$translate.instant("config.config_platform_must_be_array"),this.$translate.instant("toast.title_error")):e.platforms&&Array.isArray(e.platforms)&&!this.validateSection(e.platforms,"platform")||e.accessories&&Array.isArray(e.accessories)&&!this.validateSection(e.accessories,"accessory")||e.plugins&&Array.isArray(e.plugins)&&!this.validatePlugins(e.plugins,"plugins")||e.disabledPlugins&&Array.isArray(e.disabledPlugins)&&!this.validatePlugins(e.disabledPlugins,"disabledPlugins")||(yield this.saveConfig(e),this.originalConfig=""):this.$toastr.error(this.$translate.instant("config.config_username_error"),this.$translate.instant("toast.title_error"))}catch(e){console.error(e),this.$toastr.error(this.$translate.instant("config.config_invalid_json"),this.$translate.instant("toast.title_error"))}this.saveInProgress=!1}})}parseConfigFromEditor(){try{return JSON.parse(this.homebridgeConfig)}catch{let i=ie.default.parse(this.homebridgeConfig);return this.homebridgeConfig=JSON.stringify(i,null,4),this.monacoEditor&&this.monacoEditor.getModel().setValue(this.homebridgeConfig),i}}saveConfig(e){return S(this,null,function*(){try{let i=yield A(this.$api.post("/config-editor",e));this.homebridgeConfig=JSON.stringify(i,null,4),this.$modal.open(Z,{size:"lg",backdrop:"static"})}catch(i){console.error(i),this.$toastr.error(this.$translate.instant("config.failed_to_save_config"),this.$translate.instant("toast.title_error"))}})}onRestore(){this.$modal.open(te,{size:"lg",backdrop:"static"}).result.then(e=>{this.originalConfig||(this.originalConfig=this.homebridgeConfig),this.$api.get(`/config-editor/backups/${e}`).subscribe({next:i=>{this.$toastr.info(this.$translate.instant("config.restore.confirm"),this.$translate.instant("config.title_backup_loaded")),this.homebridgeConfig=JSON.stringify(i,null,4),this.monacoEditor&&window.editor.modifiedEditor&&(this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[]),this.monacoEditor.executeEdits("beautifier",[{identifier:"delete",range:new monaco.Range(1,1,this.monacoEditor.getModel().getLineCount()+10,1),text:"",forceMoveMarkers:!0}]),this.monacoEditor.executeEdits("beautifier",[{identifier:"insert",range:new monaco.Range(1,1,1,1),text:this.homebridgeConfig,forceMoveMarkers:!0}]))},error:i=>{console.error(i),this.$toastr.error(i.error.message||this.$translate.instant("backup.load_error"),this.$translate.instant("toast.title_error"))}})}).catch(()=>{})}onExportConfig(){let e=`data:text/json;charset=utf-8,${encodeURIComponent(this.homebridgeConfig)}`,i=document.createElement("a");i.setAttribute("href",e),i.setAttribute("download","config.json"),document.body.appendChild(i),i.click(),i.remove()}onCancelRestore(){this.homebridgeConfig=this.originalConfig,this.originalConfig=""}validateSection(e,i){for(let t of e){if(typeof t!="object"||Array.isArray(t))return this.$toastr.error(this.$translate.instant("config.error_blocks_objects",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1;if(!t[i])return this.$toastr.error(this.$translate.instant("config.error_blocks_type",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1;if(typeof t[i]!="string")return this.$toastr.error(this.$translate.instant("config.error_string_type",{type:i}),this.$translate.instant("toast.title_error")),this.highlightOffendingArrayItem(t),!1}return!0}validatePlugins(e,i){for(let t of e)if(typeof t!="string")return this.$toastr.error(this.$translate.instant("config.error_string_array",{key:i}),this.$translate.instant("toast.title_error")),!1;return!0}highlightOffendingArrayItem(e){this.monacoEditor&&(e=JSON.stringify(e,null,4).split(`
|
|
2
2
|
`).map(i=>` ${i}`).join(`
|
|
3
3
|
`),setTimeout(()=>{let i=this.monacoEditor.getModel().findMatches(e);if(i.length){let t=i[0].range,c=new monaco.Range(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn);this.editorDecorations=this.monacoEditor.deltaDecorations(this.editorDecorations,[{range:c,options:{isWholeLine:!0,linesDecorationsClassName:"hb-monaco-editor-line-error"}}])}},200))}setMonacoEditorModel(){if(window.monaco.languages.json.jsonDefaults.diagnosticsOptions.schemas.some(i=>i.uri==="http://homebridge/config.json"))return;let e=monaco.Uri.parse("a://homebridge/config.json");window.monaco.languages.json.jsonDefaults.setDiagnosticsOptions({allowComments:!1,validate:!0,schemas:[{uri:"http://homebridge/config.json",fileMatch:[e.toString()],schema:{type:"object",required:["bridge"],properties:{bridge:{type:"object",required:["name","username","port","pin"],properties:{name:{type:"string",description:`The Homebridge instance name.
|
|
4
4
|
This should be unique if you are running multiple instances of Homebridge.`,default:"Homebridge"},username:{type:"string",description:`Homebridge username must be 6 pairs of colon-separated hexadecimal characters (A-F 0-9).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as N,B as x,C as D,D as W,E as I,F as j,G as O,H as V,I as q,J as B,K as G,L as R,M as U,N as z,O as E,P as J,Q as K,R as P,S as Q,T as X,U as Y,e as f,f as a,g as C,h as s,i as c,j as d,k as u,l,m as g,n as M,o as y,p as h,q as v,r as S,s as b,t as w,u as k,v as A,w as F,x as L,y as T,z as H}from"./chunk-
|
|
1
|
+
import{A as N,B as x,C as D,D as W,E as I,F as j,G as O,H as V,I as q,J as B,K as G,L as R,M as U,N as z,O as E,P as J,Q as K,R as P,S as Q,T as X,U as Y,e as f,f as a,g as C,h as s,i as c,j as d,k as u,l,m as g,n as M,o as y,p as h,q as v,r as S,s as b,t as w,u as k,v as A,w as F,x as L,y as T,z as H}from"./chunk-CMO7ESK6.js";import{b as Z}from"./chunk-WAA5KWIN.js";import{q as i}from"./chunk-ALG7CIS3.js";import{A as t,z as e}from"./chunk-VLX322GM.js";import{c as p}from"./chunk-QMB5XE4Y.js";import{ha as m,kd as n,mb as r}from"./chunk-R3VPSO5X.js";var cm=(()=>{class o{static \u0275fac=function($){return new($||o)};static \u0275mod=r({type:o});static \u0275inj=m({providers:[a],imports:[n,e,t,p.forChild(),C,i,Z,Y,f,G,B,U,W,h,v,z,L,F,T,N,H,S,x,D,d,X,Q,P,K,y,M,R,g,q,V,j,I,A,O,J,E,k,c,s,b,w,l,u]})}return o})();export{cm as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as j}from"./chunk-
|
|
1
|
+
import{a as j}from"./chunk-QMAGO5VD.js";import"./chunk-BRW7C4BZ.js";import"./chunk-UTAVUGTT.js";import{c as M}from"./chunk-IOWBVW62.js";import"./chunk-UVOJ3BF7.js";import{q as u}from"./chunk-ALG7CIS3.js";import{A as d,z as l}from"./chunk-VLX322GM.js";import{d as h,g as a}from"./chunk-2G7GNBIF.js";import"./chunk-XHI7IAUN.js";import{k as v,n as y}from"./chunk-XUH357B7.js";import"./chunk-VUYAK52W.js";import{a as g,c as C}from"./chunk-QMB5XE4Y.js";import{ga as c,h as s,ha as i,kd as p,la as e,mb as n,w as f}from"./chunk-R3VPSO5X.js";var m=(()=>{class o{$api=e(y);$router=e(h);$toastr=e(v);$translate=e(g);constructor(){}resolve(){return s(this,null,function*(){try{let r=yield f(this.$api.get("/config-editor"));return JSON.stringify(r,null,4)}catch(r){console.error(r),this.$toastr.error(r.message,this.$translate.instant("toast.title_error")),this.$router.navigate(["/"])}})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=c({token:o,factory:o.\u0275fac})}return o})();var $=[{path:"",loadComponent:()=>import("./chunk-JADR4A63.js").then(o=>o.ConfigEditorComponent),resolve:{config:m}}],R=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=n({type:o});static \u0275inj=i({imports:[a.forChild($),a]})}return o})();var Q=(()=>{class o{static \u0275fac=function(t){return new(t||o)};static \u0275mod=n({type:o});static \u0275inj=i({providers:[m],imports:[p,l,d,M,u,C.forChild(),R,j]})}return o})();export{Q as ConfigEditorModule};
|